@elliemae/ds-data-table 2.0.0-rc.9 → 2.0.2
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/cjs/DataTable.js +2 -2
- package/cjs/addons/Columns/ColumnExpand/ColumnExpand.js +2 -2
- package/cjs/addons/Columns/ColumnSelectMultiple/ColumnSelectMultiple.js +2 -2
- package/cjs/addons/Editables/TextEditableCell/TextEditableCell.js +16 -0
- package/cjs/addons/Filters/Components/CurrencyRangeFilter/index.js +6 -3
- package/cjs/addons/Filters/Components/DateSwitcherFilter/index.js +4 -1
- package/cjs/addons/Filters/Components/NumberRangeFilter/index.js +6 -3
- package/cjs/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +3 -3
- package/cjs/addons/Pagination/Pagination.js +2 -2
- package/cjs/configs/useTableColsWithAddons.js +2 -2
- package/cjs/exported-related/EditableCell.js +11 -5
- package/cjs/exported-related/FilterPopover.js +3 -3
- package/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js +2 -2
- package/cjs/exported-related/RowRenderer/index.js +2 -2
- package/cjs/exported-related/RowRenderer/useRowRendererProperties.js +2 -2
- package/cjs/parts/Cells/Cell.js +2 -2
- package/cjs/parts/DnDHandle.js +2 -2
- package/cjs/parts/Filters/index.js +2 -2
- package/cjs/parts/Headers/HeaderCell.js +2 -2
- package/cjs/parts/Headers/HeaderResizer.js +2 -2
- package/cjs/parts/Headers/useHeaderCellHandlers.js +2 -2
- package/cjs/parts/HoC/withConditionalDnDColumnContext.js +22 -5
- package/cjs/parts/HoC/withConditionalDnDRowContext.js +4 -4
- package/cjs/parts/HoC/withConditionalDnDSortableContext.js +2 -2
- package/cjs/parts/HoC/withDnDSortableColumnContext.js +2 -2
- package/cjs/parts/HoC/withDnDSortableRowContext.js +2 -2
- package/cjs/parts/RowVariants/index.js +2 -2
- package/cjs/parts/Rows.js +2 -2
- package/cjs/parts/SortableHeaderCell.js +2 -2
- package/cjs/parts/TableContent.js +2 -2
- package/cjs/prop-types.js +2 -2
- package/cjs/redux/reducers/headersReducers/logic.js +2 -2
- package/cjs/styled.js +16 -11
- package/esm/DataTable.js +2 -2
- package/esm/addons/Columns/ColumnExpand/ColumnExpand.js +2 -2
- package/esm/addons/Columns/ColumnSelectMultiple/ColumnSelectMultiple.js +2 -2
- package/esm/addons/Editables/TextEditableCell/TextEditableCell.js +16 -0
- package/esm/addons/Filters/Components/CurrencyRangeFilter/index.js +6 -3
- package/esm/addons/Filters/Components/DateSwitcherFilter/index.js +4 -1
- package/esm/addons/Filters/Components/NumberRangeFilter/index.js +6 -3
- package/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +3 -3
- package/esm/addons/Pagination/Pagination.js +2 -2
- package/esm/configs/useTableColsWithAddons.js +2 -2
- package/esm/exported-related/EditableCell.js +11 -5
- package/esm/exported-related/FilterPopover.js +3 -3
- package/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js +2 -2
- package/esm/exported-related/RowRenderer/index.js +2 -2
- package/esm/exported-related/RowRenderer/useRowRendererProperties.js +2 -2
- package/esm/parts/Cells/Cell.js +2 -2
- package/esm/parts/DnDHandle.js +2 -2
- package/esm/parts/Filters/index.js +2 -2
- package/esm/parts/Headers/HeaderCell.js +2 -2
- package/esm/parts/Headers/HeaderResizer.js +2 -2
- package/esm/parts/Headers/useHeaderCellHandlers.js +2 -2
- package/esm/parts/HoC/withConditionalDnDColumnContext.js +21 -4
- package/esm/parts/HoC/withConditionalDnDRowContext.js +3 -3
- package/esm/parts/HoC/withConditionalDnDSortableContext.js +2 -2
- package/esm/parts/HoC/withDnDSortableColumnContext.js +2 -2
- package/esm/parts/HoC/withDnDSortableRowContext.js +2 -2
- package/esm/parts/RowVariants/index.js +2 -2
- package/esm/parts/Rows.js +2 -2
- package/esm/parts/SortableHeaderCell.js +2 -2
- package/esm/parts/TableContent.js +2 -2
- package/esm/prop-types.js +2 -2
- package/esm/redux/reducers/headersReducers/logic.js +2 -2
- package/esm/styled.js +16 -11
- package/package.json +18 -81
- package/types/styled.d.ts +3 -1
- package/cjs/helpers/dndkit/hierarchy/customCollisionDetection.js +0 -89
- package/cjs/helpers/dndkit/hierarchy/getHierarchyKeyboardCoordinates.js +0 -143
- package/cjs/helpers/dndkit/hierarchy/types.js +0 -2
- package/cjs/helpers/dndkit/hierarchy/useHierarchyActionHandlers.js +0 -55
- package/cjs/helpers/dndkit/hierarchy/useHierarchyAnnouncements.js +0 -36
- package/cjs/helpers/dndkit/hierarchy/useHierarchyDndkitConfig.js +0 -111
- package/cjs/helpers/dndkit/hierarchy/useHierarchyPreviewHandlers.js +0 -87
- package/cjs/helpers/dndkit/tree/customCollisionDetection.js +0 -118
- package/cjs/helpers/dndkit/tree/getTreeKeyboardCoordinates.js +0 -134
- package/cjs/helpers/dndkit/tree/types.js +0 -2
- package/cjs/helpers/dndkit/tree/useTreeActionHandlers.js +0 -75
- package/cjs/helpers/dndkit/tree/useTreeAnnouncements.js +0 -55
- package/cjs/helpers/dndkit/tree/useTreeDndkitConfig.js +0 -141
- package/cjs/helpers/dndkit/tree/useTreePreviewHandlers.js +0 -54
- package/cjs/helpers/dndkit/types.js +0 -2
- package/cjs/helpers/dndkit/utilities.js +0 -52
- package/esm/helpers/dndkit/hierarchy/customCollisionDetection.js +0 -85
- package/esm/helpers/dndkit/hierarchy/getHierarchyKeyboardCoordinates.js +0 -135
- package/esm/helpers/dndkit/hierarchy/types.js +0 -1
- package/esm/helpers/dndkit/hierarchy/useHierarchyActionHandlers.js +0 -51
- package/esm/helpers/dndkit/hierarchy/useHierarchyAnnouncements.js +0 -32
- package/esm/helpers/dndkit/hierarchy/useHierarchyDndkitConfig.js +0 -105
- package/esm/helpers/dndkit/hierarchy/useHierarchyPreviewHandlers.js +0 -83
- package/esm/helpers/dndkit/tree/customCollisionDetection.js +0 -114
- package/esm/helpers/dndkit/tree/getTreeKeyboardCoordinates.js +0 -126
- package/esm/helpers/dndkit/tree/types.js +0 -1
- package/esm/helpers/dndkit/tree/useTreeActionHandlers.js +0 -71
- package/esm/helpers/dndkit/tree/useTreeAnnouncements.js +0 -51
- package/esm/helpers/dndkit/tree/useTreeDndkitConfig.js +0 -135
- package/esm/helpers/dndkit/tree/useTreePreviewHandlers.js +0 -50
- package/esm/helpers/dndkit/types.js +0 -1
- package/esm/helpers/dndkit/utilities.js +0 -47
- package/types/helpers/dndkit/hierarchy/customCollisionDetection.d.ts +0 -3
- package/types/helpers/dndkit/hierarchy/getHierarchyKeyboardCoordinates.d.ts +0 -3
- package/types/helpers/dndkit/hierarchy/types.d.ts +0 -66
- package/types/helpers/dndkit/hierarchy/useHierarchyActionHandlers.d.ts +0 -2
- package/types/helpers/dndkit/hierarchy/useHierarchyAnnouncements.d.ts +0 -3
- package/types/helpers/dndkit/hierarchy/useHierarchyDndkitConfig.d.ts +0 -3
- package/types/helpers/dndkit/hierarchy/useHierarchyPreviewHandlers.d.ts +0 -2
- package/types/helpers/dndkit/tree/customCollisionDetection.d.ts +0 -4
- package/types/helpers/dndkit/tree/getTreeKeyboardCoordinates.d.ts +0 -3
- package/types/helpers/dndkit/tree/types.d.ts +0 -82
- package/types/helpers/dndkit/tree/useTreeActionHandlers.d.ts +0 -2
- package/types/helpers/dndkit/tree/useTreeAnnouncements.d.ts +0 -4
- package/types/helpers/dndkit/tree/useTreeDndkitConfig.d.ts +0 -3
- package/types/helpers/dndkit/tree/useTreePreviewHandlers.d.ts +0 -2
- package/types/helpers/dndkit/types.d.ts +0 -20
- package/types/helpers/dndkit/utilities.d.ts +0 -7
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { DragStartEvent, DragMoveEvent, DragEndEvent, DragOverEvent, Over, Active } from '@dnd-kit/core';
|
|
2
|
-
import { DroppableContainers } from '@dnd-kit/core/dist/store';
|
|
3
|
-
import { Coordinates, DragCancelEvent, ViewRect } from '@dnd-kit/core/dist/types';
|
|
4
|
-
import { MutableRefObject } from 'react';
|
|
5
|
-
import { TypescriptRow } from '../../../types/props';
|
|
6
|
-
import { dndContextPropsType } from '../types';
|
|
7
|
-
export declare type Item = {
|
|
8
|
-
id: string;
|
|
9
|
-
depth: number;
|
|
10
|
-
parentId: string;
|
|
11
|
-
index: number;
|
|
12
|
-
};
|
|
13
|
-
export declare type useHierarchyPreviewHandlersReturn = {
|
|
14
|
-
handlePreviewDragStart: (e: DragStartEvent) => void;
|
|
15
|
-
handlePreviewDragMove: (e: DragMoveEvent) => void;
|
|
16
|
-
handlePreviewDragOver: (e: DragOverEvent) => void;
|
|
17
|
-
handlePreviewDragEnd: (e: DragEndEvent) => void;
|
|
18
|
-
handlePreviewDragCancel: (e: DragCancelEvent) => void;
|
|
19
|
-
};
|
|
20
|
-
export declare type useHierarchyPreviewHandlersArgs = {
|
|
21
|
-
setOverId: React.Dispatch<React.SetStateAction<string>>;
|
|
22
|
-
setActiveId: React.Dispatch<React.SetStateAction<string>>;
|
|
23
|
-
};
|
|
24
|
-
export declare type useHierarchyActionHandlersArgs = useHierarchyPreviewHandlersReturn & {
|
|
25
|
-
dndItems: Item[];
|
|
26
|
-
onReorder: (movedItem: Item, indexes: {
|
|
27
|
-
targetIndex: number;
|
|
28
|
-
fromIndex: number;
|
|
29
|
-
}) => void;
|
|
30
|
-
};
|
|
31
|
-
export declare type useHierarchyActionHandlersReturn = {
|
|
32
|
-
onDragStart: (e: DragStartEvent) => void;
|
|
33
|
-
onDragMove: (e: DragMoveEvent) => void;
|
|
34
|
-
onDragOver: (e: DragOverEvent) => void;
|
|
35
|
-
onDragEnd: (e: DragEndEvent) => void;
|
|
36
|
-
onDragCancel: (e: DragCancelEvent) => void;
|
|
37
|
-
};
|
|
38
|
-
export declare type useHierarchyDndkitConfigArgs = {
|
|
39
|
-
indentationWidth?: number;
|
|
40
|
-
flattenedItems: [Item, TypescriptRow][];
|
|
41
|
-
isHorizontalDnD?: boolean;
|
|
42
|
-
onReorder: (movedItem: Item, indexes: {
|
|
43
|
-
targetIndex: number;
|
|
44
|
-
fromIndex: number;
|
|
45
|
-
}) => void;
|
|
46
|
-
};
|
|
47
|
-
export declare type useHierarchyDndkitConfigType = (args: useHierarchyDndkitConfigArgs) => useHierarchyDndkitConfigReturn;
|
|
48
|
-
export declare type useHierarchyDndkitConfigReturn = {
|
|
49
|
-
dndContextProps: dndContextPropsType;
|
|
50
|
-
activeId: string;
|
|
51
|
-
overId: string;
|
|
52
|
-
activeIndex: number;
|
|
53
|
-
};
|
|
54
|
-
export declare type getKeyboardCoordinatesArgs = {
|
|
55
|
-
items: Item[];
|
|
56
|
-
active: Active;
|
|
57
|
-
over: Over;
|
|
58
|
-
event: KeyboardEvent;
|
|
59
|
-
currentCoordinates: Coordinates;
|
|
60
|
-
droppableContainers: DroppableContainers;
|
|
61
|
-
collisionRect: ViewRect;
|
|
62
|
-
};
|
|
63
|
-
export declare type SensorContext = MutableRefObject<{
|
|
64
|
-
items: Item[];
|
|
65
|
-
offset?: number;
|
|
66
|
-
}>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { useHierarchyActionHandlersReturn, useHierarchyActionHandlersArgs } from './types';
|
|
2
|
-
export declare const useHierarchyActionHandlers: ({ handlePreviewDragStart, handlePreviewDragMove, handlePreviewDragOver, handlePreviewDragEnd, handlePreviewDragCancel, onReorder, dndItems, }: useHierarchyActionHandlersArgs) => useHierarchyActionHandlersReturn;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CollisionDetection } from '@dnd-kit/core';
|
|
2
|
-
import { DropIndicatorPosition } from '../../../parts/HoC/SortableItemContext';
|
|
3
|
-
import { Item } from './types';
|
|
4
|
-
export declare const customCollisionDetection: (activeId: string, visibleItemsDictionary: Record<string, Item>, setDropIndicatorPosition: React.Dispatch<React.SetStateAction<DropIndicatorPosition>>, maxDragAndDropLevel: number, lastPosition: string, setLastPosition: React.Dispatch<React.SetStateAction<string>>) => CollisionDetection;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { DragStartEvent, DragMoveEvent, DragEndEvent, DragOverEvent, Over, DroppableContainers, Active } from '@dnd-kit/core';
|
|
2
|
-
import { Coordinates, DragCancelEvent, ViewRect } from '@dnd-kit/core/dist/types';
|
|
3
|
-
import React, { MutableRefObject } from 'react';
|
|
4
|
-
import { DropIndicatorPosition } from '../../../parts/HoC/SortableItemContext';
|
|
5
|
-
import { dndContextPropsType, sortableContextPropsType } from '../types';
|
|
6
|
-
export declare type Item = {
|
|
7
|
-
uid: string;
|
|
8
|
-
depth: number;
|
|
9
|
-
parentId: string;
|
|
10
|
-
realIndex: number;
|
|
11
|
-
original: Record<string, Record<string, any>>;
|
|
12
|
-
};
|
|
13
|
-
export declare type useTreePreviewHandlersReturn = {
|
|
14
|
-
handlePreviewDragStart: (e: DragStartEvent) => void;
|
|
15
|
-
handlePreviewDragMove: (e: DragMoveEvent) => void;
|
|
16
|
-
handlePreviewDragOver: (e: DragOverEvent) => void;
|
|
17
|
-
handlePreviewDragEnd: (e: DragEndEvent) => void;
|
|
18
|
-
handlePreviewDragCancel: (e: DragCancelEvent) => void;
|
|
19
|
-
};
|
|
20
|
-
export declare type useTreePreviewHandlersArgs = {
|
|
21
|
-
setOverId: React.Dispatch<React.SetStateAction<string>>;
|
|
22
|
-
setActiveId: React.Dispatch<React.SetStateAction<string>>;
|
|
23
|
-
setDropIndicatorPosition: React.Dispatch<React.SetStateAction<DropIndicatorPosition>>;
|
|
24
|
-
};
|
|
25
|
-
export declare type useTreeActionHandlersArgs = useTreePreviewHandlersReturn & {
|
|
26
|
-
dropIndicatorPosition: DropIndicatorPosition;
|
|
27
|
-
flattenedItems: Item[];
|
|
28
|
-
projected: {
|
|
29
|
-
depth: number;
|
|
30
|
-
parentId: string;
|
|
31
|
-
};
|
|
32
|
-
onReorder: (newData: Item[], indexes: {
|
|
33
|
-
targetIndex: number;
|
|
34
|
-
fromIndex: number;
|
|
35
|
-
}, considerExpanding: string) => void;
|
|
36
|
-
};
|
|
37
|
-
export declare type useTreeActionHandlersReturn = {
|
|
38
|
-
onDragStart: (e: DragStartEvent) => void;
|
|
39
|
-
onDragMove: (e: DragMoveEvent) => void;
|
|
40
|
-
onDragOver: (e: DragOverEvent) => void;
|
|
41
|
-
onDragEnd: (e: DragEndEvent) => void;
|
|
42
|
-
onDragCancel: (e: DragCancelEvent) => void;
|
|
43
|
-
};
|
|
44
|
-
export declare type useTreeDndkitConfigArgs = {
|
|
45
|
-
flattenedItems: Item[];
|
|
46
|
-
visibleItems: Item[];
|
|
47
|
-
isHorizontalDnD?: boolean;
|
|
48
|
-
isExpandable: boolean;
|
|
49
|
-
onReorder: (newData: Item[], indexes: {
|
|
50
|
-
targetIndex: number;
|
|
51
|
-
fromIndex: number;
|
|
52
|
-
}, considerExpanding: string) => void;
|
|
53
|
-
maxDragAndDropLevel: number;
|
|
54
|
-
};
|
|
55
|
-
export declare type useTreeDndkitConfigReturn = {
|
|
56
|
-
dndContextProps: dndContextPropsType;
|
|
57
|
-
sortableContextProps: sortableContextPropsType;
|
|
58
|
-
activeId: string;
|
|
59
|
-
activeIndex: number;
|
|
60
|
-
overId: string;
|
|
61
|
-
depth: number;
|
|
62
|
-
dropIndicatorPosition: DropIndicatorPosition;
|
|
63
|
-
visibleItems: Item[];
|
|
64
|
-
};
|
|
65
|
-
export declare type useTreeDndkitConfigType = (args: useTreeDndkitConfigArgs) => useTreeDndkitConfigReturn;
|
|
66
|
-
export declare type getKeyboardCoordinatesArgs = {
|
|
67
|
-
items: Item[];
|
|
68
|
-
active: Active;
|
|
69
|
-
over: Over;
|
|
70
|
-
event: KeyboardEvent;
|
|
71
|
-
currentCoordinates: Coordinates;
|
|
72
|
-
droppableContainers: DroppableContainers;
|
|
73
|
-
collisionRect: ViewRect;
|
|
74
|
-
dropIndicatorPosition: DropIndicatorPosition;
|
|
75
|
-
maxDragAndDropLevel: number;
|
|
76
|
-
};
|
|
77
|
-
export declare type SensorContext = MutableRefObject<{
|
|
78
|
-
items: Item[];
|
|
79
|
-
offset?: number;
|
|
80
|
-
dropIndicatorPosition?: DropIndicatorPosition;
|
|
81
|
-
setDropIndicatorPosition?: React.Dispatch<React.SetStateAction<DropIndicatorPosition>>;
|
|
82
|
-
}>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { useTreeActionHandlersReturn, useTreeActionHandlersArgs } from './types';
|
|
2
|
-
export declare const useTreeActionHandlers: ({ handlePreviewDragStart, handlePreviewDragMove, handlePreviewDragOver, handlePreviewDragEnd, handlePreviewDragCancel, onReorder, flattenedItems, projected, dropIndicatorPosition, }: useTreeActionHandlersArgs) => useTreeActionHandlersReturn;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Announcements } from '@dnd-kit/core';
|
|
2
|
-
import { DropIndicatorPosition } from '../../../parts/HoC/SortableItemContext';
|
|
3
|
-
import { Item } from './types';
|
|
4
|
-
export declare const useTreeAnnouncements: (visibleItemsDictionary: Record<string, Item>, dropIndicatorPosition: DropIndicatorPosition) => Announcements;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Announcements, closestCenter, DragCancelEvent } from '@dnd-kit/core';
|
|
2
|
-
import type { Modifier, DragStartEvent, DragMoveEvent, DragEndEvent, DragOverEvent, MeasuringConfiguration } from '@dnd-kit/core';
|
|
3
|
-
import type { SensorDescriptor, SensorOptions } from '@dnd-kit/core/dist/sensors';
|
|
4
|
-
import type { SortingStrategy } from '@dnd-kit/sortable';
|
|
5
|
-
export declare type dndContextPropsType = {
|
|
6
|
-
announcements: Announcements;
|
|
7
|
-
modifiers: Modifier[];
|
|
8
|
-
sensors: SensorDescriptor<SensorOptions>[];
|
|
9
|
-
measuring: Partial<MeasuringConfiguration>;
|
|
10
|
-
collisionDetection: typeof closestCenter;
|
|
11
|
-
onDragStart: (e: DragStartEvent) => void;
|
|
12
|
-
onDragMove: (e: DragMoveEvent) => void;
|
|
13
|
-
onDragOver: (e: DragOverEvent) => void;
|
|
14
|
-
onDragEnd: (e: DragEndEvent) => void;
|
|
15
|
-
onDragCancel: (e: DragCancelEvent) => void;
|
|
16
|
-
};
|
|
17
|
-
export declare type sortableContextPropsType = {
|
|
18
|
-
items: string[];
|
|
19
|
-
strategy: SortingStrategy;
|
|
20
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DropIndicatorPosition } from '../../parts/HoC/SortableItemContext';
|
|
2
|
-
import { Item } from './tree/types';
|
|
3
|
-
export declare const getProjection: (items: Item[], visibleItemsDictionary: Record<string, Item>, overId: string, dropIndicatorPosition: DropIndicatorPosition, isExpandable: boolean) => {
|
|
4
|
-
depth: number;
|
|
5
|
-
parentId: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const removeChildrenOf: (items: Item[], id: string) => Item[];
|