@purpurds/table 8.3.1 → 8.4.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/LICENSE.txt +205 -35
- package/dist/drag-indicator-circle.d.ts +13 -0
- package/dist/drag-indicator-circle.d.ts.map +1 -0
- package/dist/draggable-table.d.ts +23 -0
- package/dist/draggable-table.d.ts.map +1 -0
- package/dist/empty-table.d.ts +14 -0
- package/dist/empty-table.d.ts.map +1 -0
- package/dist/loading-table-rows.d.ts +13 -0
- package/dist/loading-table-rows.d.ts.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/table-body.d.ts +2 -2
- package/dist/table-body.d.ts.map +1 -1
- package/dist/table-column-header-cell.d.ts +15 -2
- package/dist/table-column-header-cell.d.ts.map +1 -1
- package/dist/table-content.d.ts +42 -0
- package/dist/table-content.d.ts.map +1 -0
- package/dist/table-headers.d.ts +28 -0
- package/dist/table-headers.d.ts.map +1 -0
- package/dist/table-row-cell-skeleton.d.ts +1 -1
- package/dist/table-row-cell-skeleton.d.ts.map +1 -1
- package/dist/table-row-cell.d.ts +5 -2
- package/dist/table-row-cell.d.ts.map +1 -1
- package/dist/table-row.d.ts +2 -2
- package/dist/table-row.d.ts.map +1 -1
- package/dist/table-settings-drawer.d.ts +44 -11
- package/dist/table-settings-drawer.d.ts.map +1 -1
- package/dist/table.cjs.js +89 -85
- package/dist/table.cjs.js.map +1 -1
- package/dist/table.d.ts +3 -3
- package/dist/table.d.ts.map +1 -1
- package/dist/table.es.js +14397 -10195
- package/dist/table.es.js.map +1 -1
- package/dist/test-utils/helpers.d.ts +1 -0
- package/dist/test-utils/helpers.d.ts.map +1 -1
- package/dist/types.d.ts +23 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/use-drag-handle.hook.d.ts +15 -0
- package/dist/use-drag-handle.hook.d.ts.map +1 -0
- package/dist/use-drag-indicator-position.hook.d.ts +19 -0
- package/dist/use-drag-indicator-position.hook.d.ts.map +1 -0
- package/dist/use-drop-indicator.hook.d.ts +15 -0
- package/dist/use-drop-indicator.hook.d.ts.map +1 -0
- package/dist/use-element-visibility.hook.d.ts +4 -0
- package/dist/use-element-visibility.hook.d.ts.map +1 -0
- package/dist/use-table-scroll.hook.d.ts +6 -0
- package/dist/use-table-scroll.hook.d.ts.map +1 -0
- package/dist/utils/custom-keyboard-coordinates.d.ts +8 -0
- package/dist/utils/custom-keyboard-coordinates.d.ts.map +1 -0
- package/package.json +27 -23
- package/src/drag-indicator-circle.tsx +36 -0
- package/src/draggable-table.test.tsx +381 -0
- package/src/draggable-table.tsx +191 -0
- package/src/empty-table.tsx +54 -0
- package/src/loading-table-rows.tsx +41 -0
- package/src/table-body.tsx +1 -3
- package/src/table-column-header-cell.tsx +135 -64
- package/src/table-content-drag.test.tsx +505 -0
- package/src/table-content.tsx +165 -0
- package/src/table-dnd-integration.test.tsx +425 -0
- package/src/table-drag-and-drop.test.tsx +276 -0
- package/src/table-headers.tsx +118 -0
- package/src/table-row-cell-skeleton.tsx +1 -1
- package/src/table-row-cell.test.tsx +2 -1
- package/src/table-row-cell.tsx +42 -31
- package/src/table-row.tsx +1 -3
- package/src/table-settings-drawer.module.scss +165 -2
- package/src/table-settings-drawer.test.tsx +0 -99
- package/src/table-settings-drawer.tsx +359 -53
- package/src/table.module.scss +191 -30
- package/src/table.stories.tsx +60 -4
- package/src/table.test.tsx +5 -1
- package/src/table.tsx +255 -213
- package/src/test-utils/helpers.ts +2 -0
- package/src/types.ts +25 -2
- package/src/use-drag-handle.hook.tsx +60 -0
- package/src/use-drag-handle.test.tsx +380 -0
- package/src/use-drag-indicator-position.hook.ts +74 -0
- package/src/use-drop-indicator.hook.ts +46 -0
- package/src/use-element-visibility.hook.ts +28 -0
- package/src/use-table-scroll.hook.tsx +30 -0
- package/src/utils/custom-keyboard-coordinates.ts +83 -0
- package/vitest.setup.ts +1 -1
package/dist/table.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React, ReactElement } from 'react';
|
|
2
2
|
import { ColumnDef, ColumnFiltersState, CoreOptions, PaginationState, RowData, RowSelectionState, SortingState, TableOptions, VisibilityState } from '@tanstack/react-table';
|
|
3
3
|
import { PaginationProps } from '@purpurds/pagination';
|
|
4
|
-
import { WithActionBarProps, WithEmptyTableProps, WithLoadingProps, WithoutActionBarProps, WithoutEmptyTableProps, WithoutLoadingProps, WithoutRowSelectionProps, WithoutSortingProps, WithoutToolbarProps, WithRowSelectionProps, WithSortingProps, WithToolbarProps } from './types';
|
|
4
|
+
import { WithActionBarProps, WithColumnDragProps, WithEmptyTableProps, WithLoadingProps, WithoutActionBarProps, WithoutColumnDragProps, WithoutEmptyTableProps, WithoutLoadingProps, WithoutRowSelectionProps, WithoutSortingProps, WithoutToolbarProps, WithRowSelectionProps, WithSortingProps, WithToolbarProps } from './types';
|
|
5
5
|
|
|
6
6
|
export { createColumnHelper } from '@tanstack/react-table';
|
|
7
7
|
export type { ColumnDef, ColumnFiltersState, CoreOptions, PaginationState, RowData, RowSelectionState, SortingState, TableOptions, VisibilityState, };
|
|
@@ -16,9 +16,9 @@ export type TableProps<TData extends RowData> = {
|
|
|
16
16
|
stickyFirstColumn?: boolean;
|
|
17
17
|
onRowsCountChange?: (rowsCount: number) => void;
|
|
18
18
|
drawerZIndex?: number;
|
|
19
|
-
} & (WithToolbarProps | WithoutToolbarProps) & (WithSortingProps | WithoutSortingProps) & (WithActionBarProps | WithoutActionBarProps) & (WithEmptyTableProps | WithoutEmptyTableProps) & (WithoutLoadingProps | WithLoadingProps) & (WithoutRowSelectionProps | WithRowSelectionProps<TData>) & Partial<TableOptions<TData>>;
|
|
19
|
+
} & (WithToolbarProps | WithoutToolbarProps) & (WithSortingProps | WithoutSortingProps) & (WithActionBarProps | WithoutActionBarProps) & (WithEmptyTableProps | WithoutEmptyTableProps) & (WithoutLoadingProps | WithLoadingProps) & (WithoutRowSelectionProps | WithRowSelectionProps<TData>) & (WithColumnDragProps | WithoutColumnDragProps) & Partial<TableOptions<TData>>;
|
|
20
20
|
export declare const Table: {
|
|
21
|
-
<TData extends RowData>({ actionbarCopy, actionBarTotalRowCount, className, columns, data, emptyTableCopy, emptyTableHeadingTag, emptyTableIcon, enableActionBar, enableToolbar, exportDrawerCopy, exportFormats, fullWidth, loading, paginationComponent, rowSelectionAriaLabels, settingsDrawerCopy, showOnlySelectedRows, skeletonRows, sortingAriaLabels, state, stickyFirstColumn: stickyFirstColumnProp, stickyHeaders: stickyHeadersProp, toolbarCopy, toolbarTotalRowCount, variant, getRowId, onExportData, onRowsCountChange, onToggleExpand, onPrimaryButtonClick, onSecondaryButtonClick, setShowOnlySelectedRows, drawerZIndex, ...props }: TableProps<TData>): React.JSX.Element;
|
|
21
|
+
<TData extends RowData>({ actionbarCopy, actionBarTotalRowCount, className, columns, data, emptyTableCopy, emptyTableHeadingTag, emptyTableIcon, enableActionBar, enableToolbar, exportDrawerCopy, exportFormats, fullWidth, loading, paginationComponent, rowSelectionAriaLabels, settingsDrawerCopy, showOnlySelectedRows, skeletonRows, sortingAriaLabels, state, stickyFirstColumn: stickyFirstColumnProp, stickyHeaders: stickyHeadersProp, toolbarCopy, toolbarTotalRowCount, variant, getRowId, onExportData, onRowsCountChange, onToggleExpand, onPrimaryButtonClick, onSecondaryButtonClick, setShowOnlySelectedRows, drawerZIndex, enableColumnDrag, columnDragAriaLabelsCopy, ...props }: TableProps<TData>): React.JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=table.d.ts.map
|
package/dist/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY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