@elliemae/ds-shuttle-v2 3.14.1 → 3.14.3
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/cjs/config/DSShuttleV2Definitions.js +2 -1
- package/dist/cjs/config/DSShuttleV2Definitions.js.map +2 -2
- package/dist/cjs/config/itemMovementHelpers.js +29 -52
- package/dist/cjs/config/itemMovementHelpers.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js +25 -6
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js +10 -13
- package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js +16 -49
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js +1 -5
- package/dist/cjs/config/useFocusTracker/useFocusRegionTrackers.js.map +2 -2
- package/dist/cjs/config/useStore/focusAndTabIndexManager.js +73 -0
- package/dist/cjs/config/useStore/focusAndTabIndexManager.js.map +7 -0
- package/dist/cjs/config/useStore/useStore.js +13 -0
- package/dist/cjs/config/useStore/useStore.js.map +3 -3
- package/dist/cjs/constants/index.js +1 -3
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/parts/Dnd/DndHandle.js +5 -1
- package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +14 -12
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +44 -39
- package/dist/cjs/parts/Item/Item.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +6 -6
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js +8 -23
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
- package/dist/cjs/parts/Item/ItemOverlay.js +2 -1
- package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/cjs/parts/Item/useItemArrowNavigation.js +7 -22
- package/dist/cjs/parts/Item/useItemArrowNavigation.js.map +2 -2
- package/dist/cjs/parts/Item/useSelectionLogic.js +1 -1
- package/dist/cjs/parts/Item/useSelectionLogic.js.map +2 -2
- package/dist/cjs/parts/MainContent.js +2 -2
- package/dist/cjs/parts/MainContent.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +2 -8
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js +7 -12
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js +3 -12
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +3 -4
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +3 -7
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +21 -19
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/SelectionHeader.js +3 -3
- package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +52 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/config/DSShuttleV2Definitions.js +2 -1
- package/dist/esm/config/DSShuttleV2Definitions.js.map +2 -2
- package/dist/esm/config/itemMovementHelpers.js +30 -53
- package/dist/esm/config/itemMovementHelpers.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useDataStructure.js +25 -6
- package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js +10 -13
- package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +16 -49
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
- package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js +1 -5
- package/dist/esm/config/useFocusTracker/useFocusRegionTrackers.js.map +2 -2
- package/dist/esm/config/useStore/focusAndTabIndexManager.js +47 -0
- package/dist/esm/config/useStore/focusAndTabIndexManager.js.map +7 -0
- package/dist/esm/config/useStore/useStore.js +13 -0
- package/dist/esm/config/useStore/useStore.js.map +2 -2
- package/dist/esm/constants/index.js +1 -3
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/parts/Dnd/DndHandle.js +5 -1
- package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +14 -12
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/esm/parts/Item/Item.js +44 -39
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +6 -6
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js +8 -23
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +2 -2
- package/dist/esm/parts/Item/ItemOverlay.js +2 -1
- package/dist/esm/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/esm/parts/Item/useItemArrowNavigation.js +7 -22
- package/dist/esm/parts/Item/useItemArrowNavigation.js.map +2 -2
- package/dist/esm/parts/Item/useSelectionLogic.js +1 -1
- package/dist/esm/parts/Item/useSelectionLogic.js.map +2 -2
- package/dist/esm/parts/MainContent.js +3 -3
- package/dist/esm/parts/MainContent.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +2 -8
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js +7 -12
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +2 -2
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js +4 -13
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
- package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +3 -4
- package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +3 -7
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +21 -19
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/SelectionHeader.js +4 -4
- package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +52 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/config/DSShuttleV2Definitions.d.ts +1 -0
- package/dist/types/config/useFocusTracker/useFocusActionTrackers.d.ts +2 -4
- package/dist/types/config/useFocusTracker/useFocusItemTracker.d.ts +2 -6
- package/dist/types/config/useFocusTracker/useFocusRegionTrackers.d.ts +0 -2
- package/dist/types/config/useFocusTracker/useFocusTracker.d.ts +4 -10
- package/dist/types/config/useStore/focusAndTabIndexManager.d.ts +10 -0
- package/dist/types/config/useStore/useStore.d.ts +35 -60
- package/dist/types/constants/index.d.ts +1 -3
- package/dist/types/parts/Dnd/DndHandle.d.ts +3 -3
- package/dist/types/parts/Item/ItemActions/useActionsHandlers.d.ts +2 -2
- package/dist/types/parts/Item/ItemActions/useInnerRefHandlers.d.ts +0 -2
- package/dist/types/parts/Panel/bottom/useInnerRefHandlers.d.ts +0 -1
- package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +35 -4
- package/package.json +17 -17
- package/dist/cjs/config/useStore/createAtomInStore.bak +0 -18
- package/dist/esm/config/useStore/createAtomInStore.bak +0 -18
|
@@ -1,39 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ZustandT } from '@elliemae/ds-zustand-helpers';
|
|
3
3
|
import { type DSShuttleV2T } from '../../react-desc-prop-types';
|
|
4
|
-
import { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from '../../constants';
|
|
5
|
-
import { useAutoCalculated } from '../useAutoCalculated';
|
|
6
|
-
type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];
|
|
7
|
-
type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;
|
|
8
|
-
type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];
|
|
9
|
-
type InternalAtoms = {
|
|
10
|
-
focusRegion: FocusRegion;
|
|
11
|
-
focusItem: FocusItem;
|
|
12
|
-
focusItemAction: FocusItemAction;
|
|
13
|
-
dropIndicatorPosition: number;
|
|
14
|
-
overId: string;
|
|
15
|
-
dndDraggingItem: DSShuttleV2T.ConfiguredDatum | null;
|
|
16
|
-
dndDraggingItemMeta: DSShuttleV2T.ItemMeta | null;
|
|
17
|
-
lastActiveId: string;
|
|
18
|
-
isDropValid: boolean;
|
|
19
|
-
sourcePanelLastSelectedItem: string | null | undefined;
|
|
20
|
-
destinationPanelLastSelectedItem: string | null | undefined;
|
|
21
|
-
};
|
|
22
|
-
type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;
|
|
23
|
-
type Selectors = {
|
|
24
|
-
getIsDragAndDropHappening: () => boolean;
|
|
25
|
-
getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;
|
|
26
|
-
};
|
|
27
|
-
type Reducers = Record<string, never>;
|
|
28
|
-
type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, UseAutoCalculatedT, Selectors, Reducers>;
|
|
29
4
|
export declare const PropsProvider: ({ createStore, children, }: {
|
|
30
|
-
createStore: () => ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps
|
|
31
|
-
children: import("react").ReactNode;
|
|
32
|
-
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps>> | undefined>>, usePropsStore: {
|
|
33
|
-
(): ZustandT.PropsStore<DSShuttleV2T.InternalProps>;
|
|
34
|
-
<U>(selector: (state: ZustandT.PropsStore<DSShuttleV2T.InternalProps>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined): U;
|
|
35
|
-
}, InternalProvider: ({ createStore, children, }: {
|
|
36
|
-
createStore: () => ZustandT.ZustandStore<ZustandT.InternalStore<InternalAtoms, {
|
|
5
|
+
createStore: () => ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
37
6
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
38
7
|
sourceTotalSize: number;
|
|
39
8
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -68,9 +37,9 @@ export declare const PropsProvider: ({ createStore, children, }: {
|
|
|
68
37
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
69
38
|
sourceSelectionableDataIds: string[];
|
|
70
39
|
sourceSelectionableIds: string;
|
|
71
|
-
}
|
|
40
|
+
}>>;
|
|
72
41
|
children: import("react").ReactNode;
|
|
73
|
-
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.
|
|
42
|
+
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
74
43
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
75
44
|
sourceTotalSize: number;
|
|
76
45
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -105,8 +74,8 @@ export declare const PropsProvider: ({ createStore, children, }: {
|
|
|
105
74
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
106
75
|
sourceSelectionableDataIds: string[];
|
|
107
76
|
sourceSelectionableIds: string;
|
|
108
|
-
}
|
|
109
|
-
(): ZustandT.
|
|
77
|
+
}>> | undefined>>, usePropsStore: {
|
|
78
|
+
(): ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
110
79
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
111
80
|
sourceTotalSize: number;
|
|
112
81
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -141,8 +110,8 @@ export declare const PropsProvider: ({ createStore, children, }: {
|
|
|
141
110
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
142
111
|
sourceSelectionableDataIds: string[];
|
|
143
112
|
sourceSelectionableIds: string;
|
|
144
|
-
}
|
|
145
|
-
<
|
|
113
|
+
}>;
|
|
114
|
+
<U>(selector: (state: ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
146
115
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
147
116
|
sourceTotalSize: number;
|
|
148
117
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -177,11 +146,17 @@ export declare const PropsProvider: ({ createStore, children, }: {
|
|
|
177
146
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
178
147
|
sourceSelectionableDataIds: string[];
|
|
179
148
|
sourceSelectionableIds: string;
|
|
180
|
-
}
|
|
149
|
+
}>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined): U;
|
|
150
|
+
}, InternalProvider: ({ createStore, children, }: {
|
|
151
|
+
createStore: () => ZustandT.ZustandStore<ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>>;
|
|
152
|
+
children: import("react").ReactNode;
|
|
153
|
+
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>> | undefined>>, useInternalStore: {
|
|
154
|
+
(): ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>;
|
|
155
|
+
<U_1>(selector: (state: ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>) => U_1, equalityFn?: ((a: U_1, b: U_1) => boolean) | undefined): U_1;
|
|
181
156
|
};
|
|
182
157
|
export declare const config: {
|
|
183
158
|
defaultProps: DSShuttleV2T.InternalProps;
|
|
184
|
-
internalAtomDefaultValues: InternalAtoms;
|
|
159
|
+
internalAtomDefaultValues: DSShuttleV2T.InternalAtoms;
|
|
185
160
|
useAutoCalculated: (propsWithDefaults: DSShuttleV2T.InternalProps) => {
|
|
186
161
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
187
162
|
sourceTotalSize: number;
|
|
@@ -218,18 +193,11 @@ export declare const config: {
|
|
|
218
193
|
sourceSelectionableDataIds: string[];
|
|
219
194
|
sourceSelectionableIds: string;
|
|
220
195
|
};
|
|
221
|
-
selectors: ZustandT.SelectorObject<ShuttleInternalStore, Selectors>;
|
|
222
|
-
reducers: ZustandT.ReducerObject<ShuttleInternalStore, Reducers>;
|
|
196
|
+
selectors: ZustandT.SelectorObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Selectors>;
|
|
197
|
+
reducers: ZustandT.ReducerObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Reducers>;
|
|
198
|
+
subscribers: ZustandT.Subscribers<DSShuttleV2T.ShuttleInternalStore>;
|
|
223
199
|
PropsProvider: ({ createStore, children, }: {
|
|
224
|
-
createStore: () => ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps
|
|
225
|
-
children: import("react").ReactNode;
|
|
226
|
-
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps>> | undefined>>;
|
|
227
|
-
usePropsStore: {
|
|
228
|
-
(): ZustandT.PropsStore<DSShuttleV2T.InternalProps>;
|
|
229
|
-
<U>(selector: (state: ZustandT.PropsStore<DSShuttleV2T.InternalProps>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined): U;
|
|
230
|
-
};
|
|
231
|
-
InternalProvider: ({ createStore, children, }: {
|
|
232
|
-
createStore: () => ZustandT.ZustandStore<ZustandT.InternalStore<InternalAtoms, {
|
|
200
|
+
createStore: () => ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
233
201
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
234
202
|
sourceTotalSize: number;
|
|
235
203
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -264,9 +232,9 @@ export declare const config: {
|
|
|
264
232
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
265
233
|
sourceSelectionableDataIds: string[];
|
|
266
234
|
sourceSelectionableIds: string;
|
|
267
|
-
}
|
|
235
|
+
}>>;
|
|
268
236
|
children: import("react").ReactNode;
|
|
269
|
-
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.
|
|
237
|
+
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
270
238
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
271
239
|
sourceTotalSize: number;
|
|
272
240
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -301,9 +269,9 @@ export declare const config: {
|
|
|
301
269
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
302
270
|
sourceSelectionableDataIds: string[];
|
|
303
271
|
sourceSelectionableIds: string;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
(): ZustandT.
|
|
272
|
+
}>> | undefined>>;
|
|
273
|
+
usePropsStore: {
|
|
274
|
+
(): ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
307
275
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
308
276
|
sourceTotalSize: number;
|
|
309
277
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -338,8 +306,8 @@ export declare const config: {
|
|
|
338
306
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
339
307
|
sourceSelectionableDataIds: string[];
|
|
340
308
|
sourceSelectionableIds: string;
|
|
341
|
-
}
|
|
342
|
-
<
|
|
309
|
+
}>;
|
|
310
|
+
<U>(selector: (state: ZustandT.PropsStore<DSShuttleV2T.InternalProps & {
|
|
343
311
|
sourceVirtualItems: import("react-virtual").VirtualItem[];
|
|
344
312
|
sourceTotalSize: number;
|
|
345
313
|
sourceScrollToOffset: (index: number, options?: import("react-virtual").ScrollToOptions | undefined) => void;
|
|
@@ -374,7 +342,14 @@ export declare const config: {
|
|
|
374
342
|
sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[];
|
|
375
343
|
sourceSelectionableDataIds: string[];
|
|
376
344
|
sourceSelectionableIds: string;
|
|
377
|
-
}
|
|
345
|
+
}>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined): U;
|
|
346
|
+
};
|
|
347
|
+
InternalProvider: ({ createStore, children, }: {
|
|
348
|
+
createStore: () => ZustandT.ZustandStore<ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>>;
|
|
349
|
+
children: import("react").ReactNode;
|
|
350
|
+
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>> | undefined>>;
|
|
351
|
+
useInternalStore: {
|
|
352
|
+
(): ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>;
|
|
353
|
+
<U_1>(selector: (state: ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>) => U_1, equalityFn?: ((a: U_1, b: U_1) => boolean) | undefined): U_1;
|
|
378
354
|
};
|
|
379
355
|
};
|
|
380
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DSShuttleV2Name: "
|
|
1
|
+
export declare const DSShuttleV2Name: "DSShuttleV2";
|
|
2
2
|
export declare const REGIONS_FOCUSES: {
|
|
3
3
|
readonly SOURCE_HEADER: "source-header";
|
|
4
4
|
readonly SOURCE_PANEL: "source-panel";
|
|
@@ -20,8 +20,6 @@ export declare const ACTIONS_FOCUSES: {
|
|
|
20
20
|
readonly RESET: "";
|
|
21
21
|
};
|
|
22
22
|
export declare const ITEMS_FOCUSES: {
|
|
23
|
-
readonly FIRST: "first";
|
|
24
|
-
readonly LAST: "last";
|
|
25
23
|
readonly LOAD_MORE_BTN_SOURCE: "load-more-btn-source";
|
|
26
24
|
readonly LOAD_MORE_BTN_DESTINATION: "load-more-btn-destination";
|
|
27
25
|
readonly GET_SPECIFIC_ITEM: ({ hydratedId }: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { useSortable } from '@elliemae/ds-drag-and-drop';
|
|
3
|
-
export declare const StyledGripperButtonOrOverlay: import("styled-components").StyledComponent<
|
|
3
|
+
export declare const StyledGripperButtonOrOverlay: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
|
|
4
4
|
isActive: boolean;
|
|
5
|
-
isDragOverlay
|
|
6
|
-
disabled
|
|
5
|
+
isDragOverlay?: boolean | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
7
|
}, never>;
|
|
8
8
|
export declare const DragHandle: React.ComponentType<{
|
|
9
9
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DSShuttleV2T } from '../../../react-desc-prop-types';
|
|
3
3
|
export declare const useActionsHandlers: (itemMeta: DSShuttleV2T.ItemMeta) => {
|
|
4
|
-
handleClickDrilldown: (e: React.
|
|
5
|
-
handleClickSingleMove: (e: React.
|
|
4
|
+
handleClickDrilldown: (e: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
5
|
+
handleClickSingleMove: (e: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
6
6
|
handleKeyDownSelectionBubbleUp: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
7
7
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { type DSShuttleV2T } from '../../../react-desc-prop-types';
|
|
2
2
|
export declare const useInnerRefHandlers: ({ datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {
|
|
3
|
-
shouldFocusDrilldown: boolean;
|
|
4
|
-
shouldFocusMove: boolean;
|
|
5
3
|
innerRefHandlerDnd: (node: HTMLDivElement | null) => void;
|
|
6
4
|
innerRefHandlerDrilldown: (node: HTMLButtonElement) => void;
|
|
7
5
|
innerRefHandlerMove: (node: HTMLButtonElement) => void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type DSShuttleV2T } from '../../../react-desc-prop-types';
|
|
2
2
|
export declare const useInnerRefHandlers: ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {
|
|
3
|
-
shouldFocusLoadMoreBtn: boolean;
|
|
4
3
|
innerRefHandlerLoadMoreBtn: (node: HTMLButtonElement) => void;
|
|
5
4
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DSShuttleV2T } from '../../../../react-desc-prop-types';
|
|
3
3
|
export declare const useGetDatumHydratables: (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => (item: DSShuttleV2T.ConfiguredDatum) => {
|
|
4
|
-
preventMove?: boolean | undefined;
|
|
5
4
|
preventDrilldown?: boolean | undefined;
|
|
6
5
|
CustomRenderer?: React.ComponentType<DSShuttleV2T.ComponentProps> | undefined;
|
|
7
6
|
Icon?: React.ComponentType<DSShuttleV2T.ComponentProps> | undefined;
|
|
8
7
|
subtitle?: string | undefined;
|
|
9
8
|
id: string;
|
|
9
|
+
preventMove: boolean;
|
|
10
10
|
label: string;
|
|
11
11
|
};
|
|
@@ -4,6 +4,9 @@ import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-utilities';
|
|
|
4
4
|
import { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';
|
|
5
5
|
import { type DSButtonT } from '@elliemae/ds-button-v2';
|
|
6
6
|
import { type useSortable, type DnDKitTree } from '@elliemae/ds-drag-and-drop';
|
|
7
|
+
import type { ZustandT } from '@elliemae/ds-zustand-helpers';
|
|
8
|
+
import type { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from './constants';
|
|
9
|
+
import type { useAutoCalculated } from './config/useAutoCalculated';
|
|
7
10
|
export declare namespace DSShuttleV2T {
|
|
8
11
|
type Datum = Record<string, unknown>;
|
|
9
12
|
type PanelMetaInfo = {
|
|
@@ -18,6 +21,7 @@ export declare namespace DSShuttleV2T {
|
|
|
18
21
|
softDeleted: boolean;
|
|
19
22
|
localIndex: number;
|
|
20
23
|
hydratedId: HydratedId;
|
|
24
|
+
hydratedPreventMove: boolean;
|
|
21
25
|
};
|
|
22
26
|
type DatumRenderFlags = {
|
|
23
27
|
selectionPrevented: boolean;
|
|
@@ -30,15 +34,17 @@ export declare namespace DSShuttleV2T {
|
|
|
30
34
|
type PrimaryKeyHydratables = {
|
|
31
35
|
id: HydratedId;
|
|
32
36
|
};
|
|
37
|
+
type FunctionalHydratables = {
|
|
38
|
+
preventMove?: boolean;
|
|
39
|
+
};
|
|
33
40
|
type RequiredDatumHydratablesWithoutComponents = {
|
|
34
41
|
label: string;
|
|
35
42
|
};
|
|
36
43
|
type OptionalDatumHydratablesWithoutComponents = {
|
|
37
44
|
subtitle?: string;
|
|
38
45
|
preventDrilldown?: boolean;
|
|
39
|
-
preventMove?: boolean;
|
|
40
46
|
};
|
|
41
|
-
type DatumHydratablesWithoutComponents = PrimaryKeyHydratables & RequiredDatumHydratablesWithoutComponents & OptionalDatumHydratablesWithoutComponents;
|
|
47
|
+
type DatumHydratablesWithoutComponents = PrimaryKeyHydratables & FunctionalHydratables & RequiredDatumHydratablesWithoutComponents & OptionalDatumHydratablesWithoutComponents;
|
|
42
48
|
type ComponentProps = {
|
|
43
49
|
datum: Datum;
|
|
44
50
|
panelMetaInfo: PanelMetaInfo;
|
|
@@ -54,13 +60,14 @@ export declare namespace DSShuttleV2T {
|
|
|
54
60
|
type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;
|
|
55
61
|
type DatumHydratables = RequiredDatumHydratables & OptionalDatumHydratables;
|
|
56
62
|
type PrimaryKeyHydraters = Hydraters<PrimaryKeyHydratables, [Datum]>;
|
|
63
|
+
type FunctionalHydraters = Hydraters<FunctionalHydratables, [Datum]>;
|
|
57
64
|
type HydratersMeta = {
|
|
58
65
|
datumMeta: DatumInternalMeta;
|
|
59
66
|
panelMetaInfo: PanelMetaInfo;
|
|
60
67
|
};
|
|
61
68
|
type RequiredDatumHydraters = Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;
|
|
62
69
|
type OptionalDatumHydraters = Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;
|
|
63
|
-
type DatumHydraters = PrimaryKeyHydraters & RequiredDatumHydraters & OptionalDatumHydraters;
|
|
70
|
+
type DatumHydraters = PrimaryKeyHydraters & FunctionalHydraters & RequiredDatumHydraters & OptionalDatumHydraters;
|
|
64
71
|
type ConfiguredDatum = DatumInternalMeta & {
|
|
65
72
|
original: Datum;
|
|
66
73
|
};
|
|
@@ -102,6 +109,30 @@ export declare namespace DSShuttleV2T {
|
|
|
102
109
|
event: Parameters<Required<DSButtonT.Props>['onClick']>[0] | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1] | React.MouseEvent<HTMLButtonElement | HTMLDivElement> | React.KeyboardEvent<HTMLDivElement> | React.ChangeEvent<HTMLInputElement>;
|
|
103
110
|
item?: Datum;
|
|
104
111
|
}) => void;
|
|
112
|
+
type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];
|
|
113
|
+
type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;
|
|
114
|
+
type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];
|
|
115
|
+
type InternalAtoms = {
|
|
116
|
+
focusRegion: FocusRegion;
|
|
117
|
+
focusItem: FocusItem;
|
|
118
|
+
focusItemAction: FocusItemAction;
|
|
119
|
+
shouldFocusItemOnRender: boolean;
|
|
120
|
+
dropIndicatorPosition: number;
|
|
121
|
+
overId: string;
|
|
122
|
+
dndDraggingItem: ConfiguredDatum | null;
|
|
123
|
+
dndDraggingItemMeta: ItemMeta | null;
|
|
124
|
+
lastActiveId: string;
|
|
125
|
+
isDropValid: boolean;
|
|
126
|
+
sourcePanelLastSelectedItem: string | null | undefined;
|
|
127
|
+
destinationPanelLastSelectedItem: string | null | undefined;
|
|
128
|
+
};
|
|
129
|
+
type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;
|
|
130
|
+
type Selectors = {
|
|
131
|
+
getIsDragAndDropHappening: () => boolean;
|
|
132
|
+
getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;
|
|
133
|
+
};
|
|
134
|
+
type Reducers = Record<string, never>;
|
|
135
|
+
type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;
|
|
105
136
|
interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {
|
|
106
137
|
sourceData: Datum[];
|
|
107
138
|
sourceSelectedItems: SelectionMap;
|
|
@@ -114,7 +145,7 @@ export declare namespace DSShuttleV2T {
|
|
|
114
145
|
DestinationHeader: React.ComponentType<unknown>;
|
|
115
146
|
onDestinationDrilldown: OnSelectionDrilldown;
|
|
116
147
|
}
|
|
117
|
-
interface DefaultProps {
|
|
148
|
+
interface DefaultProps extends Required<FunctionalHydraters> {
|
|
118
149
|
sourceIsLoading: boolean;
|
|
119
150
|
sourceWithLoadMore: boolean;
|
|
120
151
|
sourceIsLoadingMore: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-shuttle-v2",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Shuttle v2",
|
|
6
6
|
"files": [
|
|
@@ -35,30 +35,30 @@
|
|
|
35
35
|
"indent": 4
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"fast-deep-equal": "~3.1.3",
|
|
38
39
|
"react-virtual": "~2.10.4",
|
|
39
|
-
"
|
|
40
|
-
"@elliemae/ds-button-v2": "3.14.
|
|
41
|
-
"@elliemae/ds-
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-form-checkbox": "3.14.
|
|
44
|
-
"@elliemae/ds-form-input-text": "3.14.
|
|
45
|
-
"@elliemae/ds-grid": "3.14.
|
|
46
|
-
"@elliemae/ds-
|
|
47
|
-
"@elliemae/ds-
|
|
48
|
-
"@elliemae/ds-
|
|
49
|
-
"@elliemae/ds-typography": "3.14.
|
|
50
|
-
"@elliemae/ds-utilities": "3.14.
|
|
51
|
-
"@elliemae/ds-zustand-helpers": "3.14.
|
|
40
|
+
"uid": "~2.0.0",
|
|
41
|
+
"@elliemae/ds-button-v2": "3.14.3",
|
|
42
|
+
"@elliemae/ds-circular-progress-indicator": "3.14.3",
|
|
43
|
+
"@elliemae/ds-drag-and-drop": "3.14.3",
|
|
44
|
+
"@elliemae/ds-form-checkbox": "3.14.3",
|
|
45
|
+
"@elliemae/ds-form-input-text": "3.14.3",
|
|
46
|
+
"@elliemae/ds-grid": "3.14.3",
|
|
47
|
+
"@elliemae/ds-icons": "3.14.3",
|
|
48
|
+
"@elliemae/ds-indeterminate-progress-indicator": "3.14.3",
|
|
49
|
+
"@elliemae/ds-system": "3.14.3",
|
|
50
|
+
"@elliemae/ds-typography": "3.14.3",
|
|
51
|
+
"@elliemae/ds-utilities": "3.14.3",
|
|
52
|
+
"@elliemae/ds-zustand-helpers": "3.14.3"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@testing-library/dom": "~8.19.0",
|
|
55
|
-
"@testing-library/jest-dom": "~5.16.4",
|
|
56
56
|
"@testing-library/react": "~12.1.3",
|
|
57
57
|
"@testing-library/user-event": "~13.5.0",
|
|
58
58
|
"lodash": "^4.17.21",
|
|
59
59
|
"styled-components": "~5.3.6",
|
|
60
|
-
"@elliemae/ds-breadcrumb": "3.14.
|
|
61
|
-
"@elliemae/ds-tree-model": "3.14.
|
|
60
|
+
"@elliemae/ds-breadcrumb": "3.14.3",
|
|
61
|
+
"@elliemae/ds-tree-model": "3.14.3"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"lodash": "^4.17.21",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type StoreApi } from 'zustand';
|
|
2
|
-
import type { InternalAtoms, Store } from './useStore';
|
|
3
|
-
|
|
4
|
-
type StateSetterNewVal =
|
|
5
|
-
| InternalAtoms[keyof InternalAtoms][0]
|
|
6
|
-
| ((oldVal: InternalAtoms[keyof InternalAtoms][0]) => InternalAtoms[keyof InternalAtoms][0]);
|
|
7
|
-
export const createAtomInStore = (
|
|
8
|
-
defaultVal: InternalAtoms[keyof InternalAtoms][0],
|
|
9
|
-
stateKey: keyof InternalAtoms,
|
|
10
|
-
set: StoreApi<Store>['setState'],
|
|
11
|
-
get: StoreApi<Store>['getState'],
|
|
12
|
-
) => {
|
|
13
|
-
const stateSetter = (newVal: StateSetterNewVal) => {
|
|
14
|
-
if (typeof newVal === 'function') set({ [stateKey]: [newVal(get()[stateKey][0]), stateSetter] });
|
|
15
|
-
else set({ [stateKey]: [newVal, stateSetter] });
|
|
16
|
-
};
|
|
17
|
-
return [defaultVal, stateSetter] as const;
|
|
18
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type StoreApi } from 'zustand';
|
|
2
|
-
import type { InternalAtoms, Store } from './useStore';
|
|
3
|
-
|
|
4
|
-
type StateSetterNewVal =
|
|
5
|
-
| InternalAtoms[keyof InternalAtoms][0]
|
|
6
|
-
| ((oldVal: InternalAtoms[keyof InternalAtoms][0]) => InternalAtoms[keyof InternalAtoms][0]);
|
|
7
|
-
export const createAtomInStore = (
|
|
8
|
-
defaultVal: InternalAtoms[keyof InternalAtoms][0],
|
|
9
|
-
stateKey: keyof InternalAtoms,
|
|
10
|
-
set: StoreApi<Store>['setState'],
|
|
11
|
-
get: StoreApi<Store>['getState'],
|
|
12
|
-
) => {
|
|
13
|
-
const stateSetter = (newVal: StateSetterNewVal) => {
|
|
14
|
-
if (typeof newVal === 'function') set({ [stateKey]: [newVal(get()[stateKey][0]), stateSetter] });
|
|
15
|
-
else set({ [stateKey]: [newVal, stateSetter] });
|
|
16
|
-
};
|
|
17
|
-
return [defaultVal, stateSetter] as const;
|
|
18
|
-
};
|