ab-ui-library 1.39.3 → 1.39.4

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.
@@ -1,3 +1,3 @@
1
1
  import type { TTableProps } from './types';
2
2
  import 'react-loading-skeleton/dist/skeleton.css';
3
- export declare function Table<TData>({ data, columns, isLoading, hasError, isActionsVisible, totalCount, emptyTitle, emptySubTitle, emptyIllustration, withSelect, withBorder, defaultPageIndex, defaultPageSize, defaultHiddenColumns, collapsibleRows, renderExpandedContent, renderHeader, renderFooter, onSortChange, onRowClick, tableSettings, onRowSelection, onColumnSizing, onPaginationChange }: TTableProps<TData>): import("react/jsx-runtime").JSX.Element;
3
+ export declare function Table<TData>({ data, columns, isLoading, hasError, isActionsVisible, totalCount, emptyTitle, emptySubTitle, emptyIllustration, withSelect, withBorder, defaultPageIndex, defaultPageSize, defaultHiddenColumns, collapsibleRows, renderExpandedContent, renderHeader, renderFooter, onSortChange, onRowClick, tableSettings, onRowSelection, onColumnSizing, onPaginationChange, rowEventsProps, }: TTableProps<TData>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { _ as _extends } from '../../extends-cc60c71c.js';
1
2
  import { _ as _defineProperty } from '../../defineProperty-109927cc.js';
2
3
  import { _ as _toConsumableArray } from '../../toConsumableArray-d592cd83.js';
3
4
  import { _ as _slicedToArray } from '../../slicedToArray-093df980.js';
@@ -15,7 +16,6 @@ import { Button } from '../Button/Button.js';
15
16
  import { IconChevronDown } from '../SVGIcons/IconChevronDown.js';
16
17
  import { IconChevronUp } from '../SVGIcons/IconChevronUp.js';
17
18
  import '../../typeof-e9310111.js';
18
- import '../../extends-cc60c71c.js';
19
19
  import '../SVGIcons/IconArrowDown.js';
20
20
  import '../SVGIcons/IconArrowSort.js';
21
21
  import '../SVGIcons/IconArrowUp.js';
@@ -106,7 +106,8 @@ function Table(_ref2) {
106
106
  tableSettings = _ref2.tableSettings,
107
107
  onRowSelection = _ref2.onRowSelection,
108
108
  onColumnSizing = _ref2.onColumnSizing,
109
- onPaginationChange = _ref2.onPaginationChange;
109
+ onPaginationChange = _ref2.onPaginationChange,
110
+ rowEventsProps = _ref2.rowEventsProps;
110
111
  var _useState = useState(new Set()),
111
112
  _useState2 = _slicedToArray(_useState, 2),
112
113
  expandedRows = _useState2[0],
@@ -255,11 +256,11 @@ function Table(_ref2) {
255
256
  }) : table.getRowModel().rows.map(function (row) {
256
257
  return /*#__PURE__*/React.createElement(React.Fragment, {
257
258
  key: row.id
258
- }, /*#__PURE__*/React.createElement("tr", {
259
+ }, /*#__PURE__*/React.createElement("tr", _extends({}, rowEventsProps, {
259
260
  className: classNames({
260
261
  selected: row.getIsSelected()
261
262
  })
262
- }, row.getVisibleCells().map(function (cell) {
263
+ }), row.getVisibleCells().map(function (cell) {
263
264
  return /*#__PURE__*/React.createElement("td", {
264
265
  className: classNames({
265
266
  'with-checkbox': cell.column.id === ColumnId.Select,
@@ -1,6 +1,7 @@
1
1
  export { Table as AdvancedTable } from './Table.js';
2
2
  export { ColumnSettings } from './ColumnSettings.js';
3
3
  export { AdvancedPagination } from './AdvancedPagination.js';
4
+ import '../../extends-cc60c71c.js';
4
5
  import '../../defineProperty-109927cc.js';
5
6
  import '../../typeof-e9310111.js';
6
7
  import '../../toConsumableArray-d592cd83.js';
@@ -10,7 +11,6 @@ import '@tanstack/react-table';
10
11
  import '@dnd-kit/core';
11
12
  import '@dnd-kit/sortable';
12
13
  import './ColumnHeader.js';
13
- import '../../extends-cc60c71c.js';
14
14
  import '../SVGIcons/IconArrowDown.js';
15
15
  import 'classnames';
16
16
  import '../SVGIcons/IconArrowSort.js';
@@ -1,5 +1,5 @@
1
1
  import type { ColumnDef, ColumnSizingState, PaginationState, RowSelectionState, Table, Row } from '@tanstack/react-table';
2
- import type { ReactNode } from 'react';
2
+ import type { HTMLAttributes, ReactNode } from 'react';
3
3
  export type TTable<TData> = Table<TData>;
4
4
  export type TRowSelectionState = RowSelectionState;
5
5
  export type TColumnSizingState = ColumnSizingState;
@@ -36,6 +36,7 @@ export type TTableProps<TData> = {
36
36
  renderFooter?: (table: Table<TData>) => ReactNode;
37
37
  onRowClick?: (row: Row<TData>) => void;
38
38
  onSortChange?: (state: SortingUpdateEvent) => void;
39
+ rowEventsProps?: HTMLAttributes<HTMLTableRowElement>;
39
40
  onRowSelection?: (state: TRowSelectionState) => void;
40
41
  onColumnSizing?: (state: TColumnSizingState) => void;
41
42
  onPaginationChange?: (state: TPaginationState) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ab-ui-library",
3
- "version": "1.39.3",
3
+ "version": "1.39.4",
4
4
  "description": "UI library for AM",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",