@elliemae/ds-shuttle-v2 3.53.0-next.9 → 3.54.0-beta.1
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/useAutoCalculated/index.js.map +2 -2
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js +34 -7
- package/dist/cjs/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
- package/dist/cjs/config/useStore/focusAndTabIndexManager.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +26 -21
- package/dist/cjs/parts/Item/Item.js.map +2 -2
- package/dist/cjs/parts/Item/useThisItemIsFocused.js +1 -1
- package/dist/cjs/parts/Item/useThisItemIsFocused.js.map +2 -2
- package/dist/cjs/parts/MainContent.js +8 -7
- package/dist/cjs/parts/MainContent.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +29 -5
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +2 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/index.js.map +2 -2
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js +34 -7
- package/dist/esm/config/useFocusTracker/useFocusItemTracker.js.map +2 -2
- package/dist/esm/config/useStore/focusAndTabIndexManager.js.map +2 -2
- package/dist/esm/parts/Item/Item.js +27 -22
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/useThisItemIsFocused.js +1 -1
- package/dist/esm/parts/Item/useThisItemIsFocused.js.map +2 -2
- package/dist/esm/parts/MainContent.js +8 -7
- package/dist/esm/parts/MainContent.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +29 -5
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +5 -5
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/config/itemMovementHelpers.d.ts +1 -1
- package/dist/types/config/useAutoCalculated/index.d.ts +0 -1
- package/dist/types/config/useAutoCalculated/useShuttleVirtualized.d.ts +0 -1
- package/dist/types/config/useFocusTracker/useFocusItemTracker.d.ts +2 -0
- package/dist/types/config/useFocusTracker/useFocusTracker.d.ts +2 -0
- package/dist/types/config/useStore/focusAndTabIndexManager.d.ts +1 -1
- package/dist/types/config/useStore/useStore.d.ts +2 -3
- package/dist/types/parts/Dnd/DndHandle.d.ts +2 -2
- package/dist/types/parts/Item/ItemActions/useActionsHandlers.d.ts +2 -2
- package/dist/types/parts/Item/ItemMiddleSection.d.ts +1 -1
- package/dist/types/parts/Item/ItemOverlay.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +9 -10
- package/dist/types/tests/loadMore/ShuttleV2WithLoadMoreTestable.d.ts +2 -0
- package/dist/types/tests/loadMore/shuttle-v2.load-more.focus.test.d.ts +1 -0
- package/package.json +24 -23
|
@@ -16,18 +16,42 @@ const StyledLoadMoreBtn = styled(DSButtonV2, {
|
|
|
16
16
|
`;
|
|
17
17
|
const LoadMoreBtn = (panelMetaInfo) => {
|
|
18
18
|
const { isDestinationPanel = false } = panelMetaInfo;
|
|
19
|
-
const {
|
|
19
|
+
const {
|
|
20
|
+
getCanFocusLastItem,
|
|
21
|
+
trackFocusItemLast,
|
|
22
|
+
trackFocusActionParent,
|
|
23
|
+
trackFocusRegionPanelItem,
|
|
24
|
+
trackFocusRegionPanel,
|
|
25
|
+
trackFocusItemReset,
|
|
26
|
+
trackFocusActionReset
|
|
27
|
+
} = useFocusTracker();
|
|
20
28
|
const onLoadMore = usePropsStore(
|
|
21
29
|
(state) => isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore
|
|
22
30
|
);
|
|
23
31
|
const handleOnClick = React2.useCallback(
|
|
24
32
|
(e) => {
|
|
25
33
|
onLoadMore(e);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
if (getCanFocusLastItem(panelMetaInfo)) {
|
|
35
|
+
trackFocusItemLast(panelMetaInfo);
|
|
36
|
+
trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);
|
|
37
|
+
trackFocusActionParent();
|
|
38
|
+
} else {
|
|
39
|
+
trackFocusItemReset();
|
|
40
|
+
trackFocusActionReset();
|
|
41
|
+
trackFocusRegionPanel(panelMetaInfo.isDestinationPanel);
|
|
42
|
+
}
|
|
29
43
|
},
|
|
30
|
-
[
|
|
44
|
+
[
|
|
45
|
+
getCanFocusLastItem,
|
|
46
|
+
onLoadMore,
|
|
47
|
+
panelMetaInfo,
|
|
48
|
+
trackFocusActionParent,
|
|
49
|
+
trackFocusActionReset,
|
|
50
|
+
trackFocusItemLast,
|
|
51
|
+
trackFocusItemReset,
|
|
52
|
+
trackFocusRegionPanel,
|
|
53
|
+
trackFocusRegionPanelItem
|
|
54
|
+
]
|
|
31
55
|
);
|
|
32
56
|
const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);
|
|
33
57
|
const getOwnerProps = usePropsStore((store) => store.get);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Panel/bottom/LoadMoreBtn.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const {\n getCanFocusLastItem,\n trackFocusItemLast,\n trackFocusActionParent,\n trackFocusRegionPanelItem,\n trackFocusRegionPanel,\n trackFocusItemReset,\n trackFocusActionReset,\n } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n if (getCanFocusLastItem(panelMetaInfo)) {\n trackFocusItemLast(panelMetaInfo);\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n } else {\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanel(panelMetaInfo.isDestinationPanel);\n }\n },\n [\n getCanFocusLastItem,\n onLoadMore,\n panelMetaInfo,\n trackFocusActionParent,\n trackFocusActionReset,\n trackFocusItemLast,\n trackFocusItemReset,\n trackFocusRegionPanel,\n trackFocusRegionPanelItem,\n ],\n );\n const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC6DnB;AA7DJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY,oBAAoC;AACzD,SAAS,qBAAqB;AAE9B,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,oBAAoB,OAAO,YAAY;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAKM,MAAM,cAAc,CAAC,kBAA8C;AACxE,QAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,gBAAgB;AACpB,QAAM,aAAa;AAAA,IAAc,CAAC,UAChC,qBAAqB,MAAM,wBAAwB,MAAM;AAAA,EAC3D;AACA,QAAM,gBAAgBA,OAAM;AAAA,IAC1B,CAAC,MAA2D;AAC1D,iBAAW,CAAC;AACZ,UAAI,oBAAoB,aAAa,GAAG;AACtC,2BAAmB,aAAa;AAChC,kCAA0B,cAAc,kBAAkB;AAC1D,+BAAuB;AAAA,MACzB,OAAO;AACL,4BAAoB;AACpB,8BAAsB;AACtB,8BAAsB,cAAc,kBAAkB;AAAA,MACxD;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,QAAM,EAAE,2BAA2B,IAAI,oBAAoB,aAAa;AACxE,QAAM,gBAAgB,cAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyBA,OAAM,YAAY,MAAM,eAAe,CAAC,aAAa,CAAC;AAErF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM,aAAa;AAAA,MACnB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACD;AAAA;AAAA,EAED;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import {
|
|
3
3
|
PropTypes,
|
|
4
|
-
globalAttributesPropTypes,
|
|
5
|
-
xstyledPropTypes,
|
|
6
4
|
getPropsPerDatatestIdPropTypes,
|
|
7
|
-
getPropsPerSlotPropTypes
|
|
5
|
+
getPropsPerSlotPropTypes,
|
|
6
|
+
globalAttributesPropTypes,
|
|
7
|
+
xstyledPropTypes
|
|
8
8
|
} from "@elliemae/ds-props-helpers";
|
|
9
9
|
import { DSShuttleV2DataTestIds, DSShuttleV2Name, DSShuttleV2Slots } from "./config/DSShuttleV2Definitions.js";
|
|
10
10
|
const defaultProps = {
|
|
@@ -51,7 +51,7 @@ const DSShuttleV2PropTypes = {
|
|
|
51
51
|
).isRequired,
|
|
52
52
|
sourceSelectedItems: PropTypes.object.description("An object representing the selected items in the source list").isRequired,
|
|
53
53
|
onSourceSelectionChange: PropTypes.func.description("A function called when the selection in the source list changes").isRequired,
|
|
54
|
-
SourceHeader: PropTypes.
|
|
54
|
+
SourceHeader: PropTypes.func.description("The header component for the source list").isRequired,
|
|
55
55
|
sourceHeaderProps: PropTypes.object.description("Props to be passed to the source header").defaultValue({}),
|
|
56
56
|
onSourceDrilldown: PropTypes.func.description("A function called when an item in the source list is clicked").isRequired,
|
|
57
57
|
destinationData: PropTypes.arrayOf(PropTypes.object).description(
|
|
@@ -63,7 +63,7 @@ const DSShuttleV2PropTypes = {
|
|
|
63
63
|
onDestinationSelectionChange: PropTypes.func.description(
|
|
64
64
|
"A function called when the selection in the destination list changes"
|
|
65
65
|
).isRequired,
|
|
66
|
-
DestinationHeader: PropTypes.
|
|
66
|
+
DestinationHeader: PropTypes.func.description("The header component for the destination list").isRequired,
|
|
67
67
|
destinationHeaderProps: PropTypes.object.description("Props to be passed to the destination header").defaultValue({}),
|
|
68
68
|
onDestinationDrilldown: PropTypes.func.description(
|
|
69
69
|
"A function called when an item in the destination list is clicked"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerDatatestIdPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\n\nimport { type useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\n\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSInputTextT } from '@elliemae/ds-form-input-text';\nimport { type DSButtonT, type DSButtonV3T } from '@elliemae/ds-button-v2';\nimport { type useSortable, type DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\n\nimport type { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES, DropIndicatorPosition } from './constants/index.js';\nimport type { useAutoCalculated } from './config/useAutoCalculated/index.js';\nimport { DSShuttleV2DataTestIds, DSShuttleV2Name, DSShuttleV2Slots } from './config/DSShuttleV2Definitions.js';\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection?: boolean; height?: number };\n type HydratedId = string;\n\n export type DatumInternalMeta = {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n softDeleted: boolean;\n localIndex: number;\n hydratedId: HydratedId;\n hydratedPreventMove: boolean;\n };\n export type DatumRenderFlags = {\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n internallyDisabledMove: boolean;\n internallyDisabledDrilldown: boolean;\n };\n\n export type DropIndicatorPositionValues = TypescriptHelpersT.ObjectValues<typeof DropIndicatorPosition>;\n\n // =============================================================================\n // Hydratables section - panel level hydratables\n // =============================================================================\n type RequiredPanelHydratables = Record<string, never>;\n type OptionalPanelHydratables = {\n batchActionableButtonProps: Record<string, unknown>;\n };\n export type PanelHydratables = RequiredPanelHydratables & OptionalPanelHydratables;\n\n // =============================================================================\n // Hydratables section - datum level hydratables\n // shared usage between internal and custom component\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type FunctionalHydratables = {\n preventMove?: boolean;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n FunctionalHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Custom component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n thisItemIsFocused: boolean;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n tooltipHelpers?: ReturnType<typeof useHeadlessTooltip>;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps>;\n };\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = PrimaryKeyHydratables & RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = TypescriptHelpersT.Hydraters<PrimaryKeyHydratables, [Datum]>;\n export type FunctionalHydraters = TypescriptHelpersT.Hydraters<\n FunctionalHydratables,\n [Datum, Partial<PanelMetaInfo>]\n >;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = TypescriptHelpersT.Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = TypescriptHelpersT.Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & FunctionalHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n type RequiredPanelHydraters = TypescriptHelpersT.Hydraters<RequiredPanelHydratables, [PanelMetaInfo]>;\n type OptionalPanelHydraters = Partial<TypescriptHelpersT.Hydraters<OptionalPanelHydratables, [PanelMetaInfo]>>;\n type PanelHydraters = RequiredPanelHydraters & OptionalPanelHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata = Omit<DnDKitTree.OnReorder<DSShuttleV2T.Datum>, 'considerExpanding'>;\n type OnReorderEvent = (movedItem: Datum, metadata: OnReorderEventMetadata) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Zustand Store\n // =============================================================================\n export type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];\n export type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;\n export type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusItem: FocusItem;\n focusItemAction: FocusItemAction;\n deferFocusUntilFirstRender: boolean;\n dropIndicatorPosition: DropIndicatorPositionValues;\n overId: string;\n dndDraggingItem: ConfiguredDatum | null;\n dndDraggingItemMeta: ItemMeta | null;\n lastActiveId: string;\n isDropValid: boolean;\n sourcePanelLastSelectedItem: string | null | undefined;\n destinationPanelLastSelectedItem: string | null | undefined;\n };\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n export type Selectors = {\n getIsDragAndDropHappening: () => boolean;\n getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;\n };\n export type Reducers = Record<string, never>;\n export type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<Record<string, unknown>>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<Record<string, unknown>>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps extends Required<FunctionalHydraters> {\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n destinationNoOptionsMessage: string;\n sourceNoOptionsMessage: string;\n // switch side\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n export interface OptionalProps\n extends OptionalDatumHydraters,\n OptionalPanelHydraters,\n TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSShuttleV2Name, typeof DSShuttleV2Slots> {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n sourceHeaderProps?: Record<string, unknown>;\n destinationHeaderProps?: Record<string, unknown>;\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n\n moveButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n drillDownButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n\n checkboxSelectAllProps?: (metainfo: PanelMetaInfo) => DSControlledCheckboxT.Props;\n dsShuttleV2ListWrapperMid?: (metaInfo: PanelMetaInfo) => Record<string, unknown>;\n areaSearchBarProps?: (metaInfo: PanelMetaInfo) => DSInputTextT.Props;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n destinationNoOptionsMessage: 'There are no items to display',\n sourceNoOptionsMessage: 'There are no items to display',\n sourceIsLoading: false,\n destinationIsLoading: false,\n sourceWithLoadMore: false,\n destinationWithLoadMore: false,\n sourceIsLoadingMore: false,\n destinationIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onDestinationLoadMore: () => {},\n\n onSourceAdd: () => {},\n onDestinationAdd: () => {},\n onSourceRemove: () => {},\n onDestinationRemove: () => {},\n onSourceReorder: () => {},\n onDestinationReorder: () => {},\n\n sourceSoftDeletedItems: {},\n onSourceSoftDelete: () => {},\n destinationSoftDeletedItems: {},\n onDestinationSoftDelete: () => {},\n\n getPreventMove: () => false,\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...getPropsPerSlotPropTypes(DSShuttleV2Name, DSShuttleV2Slots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the source list',\n ).isRequired,\n sourceSelectedItems: PropTypes.object.description('An object representing the selected items in the source list')\n .isRequired,\n onSourceSelectionChange: PropTypes.func.description('A function called when the selection in the source list changes')\n .isRequired,\n SourceHeader: PropTypes.node.description('The header component for the source list').isRequired,\n sourceHeaderProps: PropTypes.object.description('Props to be passed to the source header').defaultValue({}),\n onSourceDrilldown: PropTypes.func.description('A function called when an item in the source list is clicked')\n .isRequired,\n destinationData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the destination list',\n ).isRequired,\n destinationSelectedItems: PropTypes.object.description(\n 'An object representing the selected items in the destination list',\n ).isRequired,\n onDestinationSelectionChange: PropTypes.func.description(\n 'A function called when the selection in the destination list changes',\n ).isRequired,\n DestinationHeader: PropTypes.node.description('The header component for the destination list').isRequired,\n destinationHeaderProps: PropTypes.object.description('Props to be passed to the destination header').defaultValue({}),\n onDestinationDrilldown: PropTypes.func.description(\n 'A function called when an item in the destination list is clicked',\n ).isRequired,\n getId: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its unique identifier',\n ).isRequired,\n getLabel: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its display label',\n ).isRequired,\n sourceIsLoading: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading data')\n .defaultValue(false),\n destinationIsLoading: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading data')\n .defaultValue(false),\n sourceWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the source list supports \"load more\" functionality')\n .defaultValue(false),\n destinationWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the destination list supports \"load more\" functionality')\n .defaultValue(false),\n sourceIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading more data')\n .defaultValue(false),\n destinationIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading more data')\n .defaultValue(false),\n onSourceLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the source list is clicked')\n .defaultValue(() => {}),\n onDestinationLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the destination list is clicked')\n .defaultValue(() => {}),\n onSourceAdd: PropTypes.func\n .description('A function called when an item is added from the source list to the destination list')\n .defaultValue(() => {}),\n onDestinationAdd: PropTypes.func\n .description('A function called when an item is added from the destination list to the source list')\n .defaultValue(() => {}),\n onSourceRemove: PropTypes.func\n .description('A function called when an item is removed from the destination list')\n .defaultValue(() => {}),\n onDestinationRemove: PropTypes.func\n .description('Callback function to handle when an item is removed from the destination shuttle list. ')\n .defaultValue(() => {}),\n onSourceReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the source shuttle list.')\n .defaultValue(() => {}),\n onDestinationReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the destination shuttle list. ')\n .defaultValue(() => {}),\n sourceSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the source shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onSourceSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the source shuttle list. ')\n .defaultValue(() => {}),\n destinationSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the destination shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onDestinationSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the destination shuttle list.')\n .defaultValue(() => {}),\n getPreventMove: PropTypes.func\n .description('Function that determines whether a specific item can be moved to the destination shuttle list. ')\n .defaultValue(() => false),\n addDragAndDropFromSource: PropTypes.bool\n .description('Specifies whether items can be dragged from the source list and dropped into the destination list.')\n .defaultValue(false),\n removeDragAndDropFromDestination: PropTypes.bool\n .description('Specifies whether items can be removed from the destination list by dragging them out of the list.')\n .defaultValue(false),\n sourceItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the source list.')\n .defaultValue({}),\n destinationItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the destination list.')\n .defaultValue({}),\n sourceShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the source list.')\n .defaultValue(false),\n destinationShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the destination list.')\n .defaultValue(false),\n onSourceOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the source list is opened.')\n .defaultValue(() => {}),\n onDesinationOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the destination list is opened.')\n .defaultValue(() => {}),\n sourceFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the source list.')\n .defaultValue(''),\n destinationFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the destination list.')\n .defaultValue(''),\n onSourceFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the source list is changed.')\n .defaultValue(() => {}),\n onDestinationFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the destination list is changed.')\n .defaultValue(() => {}),\n getSubtitle: PropTypes.func\n .description('Callback function that returns the subtitle to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getIcon: PropTypes.func\n .description('Callback function that returns the icon to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getPreventDrilldown: PropTypes.func\n .description('Callback function that determines whether drilldown should be prevented for a particular item.')\n .defaultValue(() => false),\n getCustomRenderer: PropTypes.func\n .description('Callback function that returns a custom renderer for each item in the list.')\n .defaultValue(() => undefined),\n getBatchActionableButtonProps: PropTypes.func\n .description('Callback function that returns the props for the batch actionable button in the destination list.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n ...getPropsPerDatatestIdPropTypes(DSShuttleV2DataTestIds),\n destinationNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in destination panel')\n .defaultValue('There are no items to display'),\n sourceNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in source panel')\n .defaultValue('There are no items to display'),\n checkboxSelectAllProps: PropTypes.func\n .description('Function that returns props for the select all checkbox in the source panel.')\n .defaultValue({}),\n moveButtonProps: PropTypes.func\n .description('Function that returns props for the move button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n drillDownButtonProps: PropTypes.func\n .description('Function that returns props for the drilldown button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n areaSearchBarProps: PropTypes.func\n .description('Function that returns props for the area search bar.')\n .defaultValue(() => ({})),\n dsShuttleV2ListWrapperMid: PropTypes.func\n .description('Function that returns props for the list wrapper.')\n .defaultValue(() => ({})),\n};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as WeakValidationMap<DSShuttleV2T.Props>;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { type DSButtonT, type DSButtonV3T } from '@elliemae/ds-button-v2';\nimport { type DnDKitTree, type useSortable } from '@elliemae/ds-drag-and-drop';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSInputTextT } from '@elliemae/ds-form-input-text';\nimport { type useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerDatatestIdPropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\nimport type React from 'react';\nimport { DSShuttleV2DataTestIds, DSShuttleV2Name, DSShuttleV2Slots } from './config/DSShuttleV2Definitions.js';\nimport type { useAutoCalculated } from './config/useAutoCalculated/index.js';\nimport type { ACTIONS_FOCUSES, DropIndicatorPosition, ITEMS_FOCUSES, REGIONS_FOCUSES } from './constants/index.js';\n\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection?: boolean; height?: number };\n type HydratedId = string;\n\n export type DatumInternalMeta = {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n softDeleted: boolean;\n localIndex: number;\n hydratedId: HydratedId;\n hydratedPreventMove: boolean;\n };\n export type DatumRenderFlags = {\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n internallyDisabledMove: boolean;\n internallyDisabledDrilldown: boolean;\n };\n\n export type DropIndicatorPositionValues = TypescriptHelpersT.ObjectValues<typeof DropIndicatorPosition>;\n\n // =============================================================================\n // Hydratables section - panel level hydratables\n // =============================================================================\n type RequiredPanelHydratables = Record<string, never>;\n type OptionalPanelHydratables = {\n batchActionableButtonProps: Record<string, unknown>;\n };\n export type PanelHydratables = RequiredPanelHydratables & OptionalPanelHydratables;\n\n // =============================================================================\n // Hydratables section - datum level hydratables\n // shared usage between internal and custom component\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type FunctionalHydratables = {\n preventMove?: boolean;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n FunctionalHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Custom component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n thisItemIsFocused: boolean;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n tooltipHelpers?: ReturnType<typeof useHeadlessTooltip>;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps>;\n };\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = PrimaryKeyHydratables & RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = TypescriptHelpersT.Hydraters<PrimaryKeyHydratables, [Datum]>;\n export type FunctionalHydraters = TypescriptHelpersT.Hydraters<\n FunctionalHydratables,\n [Datum, Partial<PanelMetaInfo>]\n >;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = TypescriptHelpersT.Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = TypescriptHelpersT.Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & FunctionalHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n type RequiredPanelHydraters = TypescriptHelpersT.Hydraters<RequiredPanelHydratables, [PanelMetaInfo]>;\n type OptionalPanelHydraters = Partial<TypescriptHelpersT.Hydraters<OptionalPanelHydratables, [PanelMetaInfo]>>;\n type PanelHydraters = RequiredPanelHydraters & OptionalPanelHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata = Omit<DnDKitTree.OnReorder<DSShuttleV2T.Datum>, 'considerExpanding'>;\n type OnReorderEvent = (movedItem: Datum, metadata: OnReorderEventMetadata) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Zustand Store\n // =============================================================================\n export type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];\n export type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;\n export type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusItem: FocusItem;\n focusItemAction: FocusItemAction;\n deferFocusUntilFirstRender: boolean;\n dropIndicatorPosition: DropIndicatorPositionValues;\n overId: string;\n dndDraggingItem: ConfiguredDatum | null;\n dndDraggingItemMeta: ItemMeta | null;\n lastActiveId: string;\n isDropValid: boolean;\n sourcePanelLastSelectedItem: string | null | undefined;\n destinationPanelLastSelectedItem: string | null | undefined;\n };\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n export type Selectors = {\n getIsDragAndDropHappening: () => boolean;\n getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;\n };\n export type Reducers = Record<string, never>;\n export type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<Record<string, unknown>>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<Record<string, unknown>>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps extends Required<FunctionalHydraters> {\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n destinationNoOptionsMessage: string;\n sourceNoOptionsMessage: string;\n // switch side\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n export interface OptionalProps\n extends OptionalDatumHydraters,\n OptionalPanelHydraters,\n TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSShuttleV2Name, typeof DSShuttleV2Slots> {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n sourceHeaderProps?: Record<string, unknown>;\n destinationHeaderProps?: Record<string, unknown>;\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n\n moveButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n drillDownButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n\n checkboxSelectAllProps?: (metainfo: PanelMetaInfo) => DSControlledCheckboxT.Props;\n dsShuttleV2ListWrapperMid?: (metaInfo: PanelMetaInfo) => Record<string, unknown>;\n areaSearchBarProps?: (metaInfo: PanelMetaInfo) => DSInputTextT.Props;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n destinationNoOptionsMessage: 'There are no items to display',\n sourceNoOptionsMessage: 'There are no items to display',\n sourceIsLoading: false,\n destinationIsLoading: false,\n sourceWithLoadMore: false,\n destinationWithLoadMore: false,\n sourceIsLoadingMore: false,\n destinationIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onDestinationLoadMore: () => {},\n\n onSourceAdd: () => {},\n onDestinationAdd: () => {},\n onSourceRemove: () => {},\n onDestinationRemove: () => {},\n onSourceReorder: () => {},\n onDestinationReorder: () => {},\n\n sourceSoftDeletedItems: {},\n onSourceSoftDelete: () => {},\n destinationSoftDeletedItems: {},\n onDestinationSoftDelete: () => {},\n\n getPreventMove: () => false,\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...getPropsPerSlotPropTypes(DSShuttleV2Name, DSShuttleV2Slots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the source list',\n ).isRequired,\n sourceSelectedItems: PropTypes.object.description('An object representing the selected items in the source list')\n .isRequired,\n onSourceSelectionChange: PropTypes.func.description('A function called when the selection in the source list changes')\n .isRequired,\n SourceHeader: PropTypes.func.description('The header component for the source list').isRequired,\n sourceHeaderProps: PropTypes.object.description('Props to be passed to the source header').defaultValue({}),\n onSourceDrilldown: PropTypes.func.description('A function called when an item in the source list is clicked')\n .isRequired,\n destinationData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the destination list',\n ).isRequired,\n destinationSelectedItems: PropTypes.object.description(\n 'An object representing the selected items in the destination list',\n ).isRequired,\n onDestinationSelectionChange: PropTypes.func.description(\n 'A function called when the selection in the destination list changes',\n ).isRequired,\n DestinationHeader: PropTypes.func.description('The header component for the destination list').isRequired,\n destinationHeaderProps: PropTypes.object.description('Props to be passed to the destination header').defaultValue({}),\n onDestinationDrilldown: PropTypes.func.description(\n 'A function called when an item in the destination list is clicked',\n ).isRequired,\n getId: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its unique identifier',\n ).isRequired,\n getLabel: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its display label',\n ).isRequired,\n sourceIsLoading: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading data')\n .defaultValue(false),\n destinationIsLoading: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading data')\n .defaultValue(false),\n sourceWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the source list supports \"load more\" functionality')\n .defaultValue(false),\n destinationWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the destination list supports \"load more\" functionality')\n .defaultValue(false),\n sourceIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading more data')\n .defaultValue(false),\n destinationIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading more data')\n .defaultValue(false),\n onSourceLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the source list is clicked')\n .defaultValue(() => {}),\n onDestinationLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the destination list is clicked')\n .defaultValue(() => {}),\n onSourceAdd: PropTypes.func\n .description('A function called when an item is added from the source list to the destination list')\n .defaultValue(() => {}),\n onDestinationAdd: PropTypes.func\n .description('A function called when an item is added from the destination list to the source list')\n .defaultValue(() => {}),\n onSourceRemove: PropTypes.func\n .description('A function called when an item is removed from the destination list')\n .defaultValue(() => {}),\n onDestinationRemove: PropTypes.func\n .description('Callback function to handle when an item is removed from the destination shuttle list. ')\n .defaultValue(() => {}),\n onSourceReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the source shuttle list.')\n .defaultValue(() => {}),\n onDestinationReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the destination shuttle list. ')\n .defaultValue(() => {}),\n sourceSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the source shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onSourceSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the source shuttle list. ')\n .defaultValue(() => {}),\n destinationSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the destination shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onDestinationSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the destination shuttle list.')\n .defaultValue(() => {}),\n getPreventMove: PropTypes.func\n .description('Function that determines whether a specific item can be moved to the destination shuttle list. ')\n .defaultValue(() => false),\n addDragAndDropFromSource: PropTypes.bool\n .description('Specifies whether items can be dragged from the source list and dropped into the destination list.')\n .defaultValue(false),\n removeDragAndDropFromDestination: PropTypes.bool\n .description('Specifies whether items can be removed from the destination list by dragging them out of the list.')\n .defaultValue(false),\n sourceItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the source list.')\n .defaultValue({}),\n destinationItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the destination list.')\n .defaultValue({}),\n sourceShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the source list.')\n .defaultValue(false),\n destinationShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the destination list.')\n .defaultValue(false),\n onSourceOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the source list is opened.')\n .defaultValue(() => {}),\n onDesinationOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the destination list is opened.')\n .defaultValue(() => {}),\n sourceFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the source list.')\n .defaultValue(''),\n destinationFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the destination list.')\n .defaultValue(''),\n onSourceFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the source list is changed.')\n .defaultValue(() => {}),\n onDestinationFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the destination list is changed.')\n .defaultValue(() => {}),\n getSubtitle: PropTypes.func\n .description('Callback function that returns the subtitle to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getIcon: PropTypes.func\n .description('Callback function that returns the icon to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getPreventDrilldown: PropTypes.func\n .description('Callback function that determines whether drilldown should be prevented for a particular item.')\n .defaultValue(() => false),\n getCustomRenderer: PropTypes.func\n .description('Callback function that returns a custom renderer for each item in the list.')\n .defaultValue(() => undefined),\n getBatchActionableButtonProps: PropTypes.func\n .description('Callback function that returns the props for the batch actionable button in the destination list.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n ...getPropsPerDatatestIdPropTypes(DSShuttleV2DataTestIds),\n destinationNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in destination panel')\n .defaultValue('There are no items to display'),\n sourceNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in source panel')\n .defaultValue('There are no items to display'),\n checkboxSelectAllProps: PropTypes.func\n .description('Function that returns props for the select all checkbox in the source panel.')\n .defaultValue({}),\n moveButtonProps: PropTypes.func\n .description('Function that returns props for the move button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n drillDownButtonProps: PropTypes.func\n .description('Function that returns props for the drilldown button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n areaSearchBarProps: PropTypes.func\n .description('Function that returns props for the area search bar.')\n .defaultValue(() => ({})),\n dsShuttleV2ListWrapperMid: PropTypes.func\n .description('Function that returns props for the list wrapper.')\n .defaultValue(() => ({})),\n};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as ValidationMap<DSShuttleV2T.Props>;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { type DSButtonT } from '@elliemae/ds-button-v2';
|
|
3
3
|
import { type DSShuttleV2T } from '../react-desc-prop-types.js';
|
|
4
4
|
export declare const useHandleMoveSelection: ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => {
|
|
5
|
-
moveSelection: (event: Parameters<Required<DSButtonT.Props>[
|
|
5
|
+
moveSelection: (event: Parameters<Required<DSButtonT.Props>["onClick"]>[0]) => void;
|
|
6
6
|
};
|
|
7
7
|
export declare const useHandleMoveItem: ({ datum, datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
@@ -2,7 +2,9 @@ import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
|
2
2
|
export declare const useFocusItemTracker: () => {
|
|
3
3
|
trackFocusItem: (item: DSShuttleV2T.ConfiguredDatum) => void;
|
|
4
4
|
trackFocusItemReset: () => void;
|
|
5
|
+
getCanFocusFirstItem: ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => boolean;
|
|
5
6
|
trackFocusItemFirst: ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => void;
|
|
7
|
+
getCanFocusLastItem: ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => boolean;
|
|
6
8
|
trackFocusItemLast: ({ isDestinationPanel }: DSShuttleV2T.PanelMetaInfo) => void;
|
|
7
9
|
trackFocusLoadMoreBtnDestination: () => void;
|
|
8
10
|
trackFocusLoadMoreBtn: () => void;
|
|
@@ -8,7 +8,9 @@ export declare const useFocusTracker: () => {
|
|
|
8
8
|
trackFocusNextAction: ({ isDestinationPanel, datumHydratables, datumInternalMeta: { hydratedPreventMove } }: import("../../react-desc-prop-types.js").DSShuttleV2T.ItemMeta) => void;
|
|
9
9
|
trackFocusItem: (item: import("../../react-desc-prop-types.js").DSShuttleV2T.ConfiguredDatum) => void;
|
|
10
10
|
trackFocusItemReset: () => void;
|
|
11
|
+
getCanFocusFirstItem: ({ isDestinationPanel }: import("../../react-desc-prop-types.js").DSShuttleV2T.PanelMetaInfo) => boolean;
|
|
11
12
|
trackFocusItemFirst: ({ isDestinationPanel }: import("../../react-desc-prop-types.js").DSShuttleV2T.PanelMetaInfo) => void;
|
|
13
|
+
getCanFocusLastItem: ({ isDestinationPanel }: import("../../react-desc-prop-types.js").DSShuttleV2T.PanelMetaInfo) => boolean;
|
|
12
14
|
trackFocusItemLast: ({ isDestinationPanel }: import("../../react-desc-prop-types.js").DSShuttleV2T.PanelMetaInfo) => void;
|
|
13
15
|
trackFocusLoadMoreBtnDestination: () => void;
|
|
14
16
|
trackFocusLoadMoreBtn: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
2
1
|
import type { ZustandT } from '@elliemae/ds-zustand-helpers';
|
|
2
|
+
import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
3
3
|
type State = readonly [
|
|
4
4
|
DSShuttleV2T.FocusRegion,
|
|
5
5
|
DSShuttleV2T.FocusItem,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type ZustandT } from '@elliemae/ds-zustand-helpers';
|
|
3
2
|
import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
4
3
|
export declare const PropsProvider: ({ createStore, children, }: {
|
|
@@ -128,7 +127,7 @@ export declare const PropsProvider: ({ createStore, children, }: {
|
|
|
128
127
|
children: import("react").ReactNode;
|
|
129
128
|
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>> | undefined>>, useInternalStore: {
|
|
130
129
|
(): ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>;
|
|
131
|
-
<
|
|
130
|
+
<U>(selector: (state: ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined): U;
|
|
132
131
|
};
|
|
133
132
|
export declare const config: {
|
|
134
133
|
defaultProps: DSShuttleV2T.InternalProps;
|
|
@@ -296,6 +295,6 @@ export declare const config: {
|
|
|
296
295
|
}) => import("react").FunctionComponentElement<import("react").ProviderProps<ZustandT.ZustandStore<ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>> | undefined>>;
|
|
297
296
|
useInternalStore: {
|
|
298
297
|
(): ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>;
|
|
299
|
-
<
|
|
298
|
+
<U>(selector: (state: ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined): U;
|
|
300
299
|
};
|
|
301
300
|
};
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { useSortable } from '@elliemae/ds-drag-and-drop';
|
|
3
3
|
export declare const StyledGripperButtonOrOverlay: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
|
|
4
4
|
isActive: boolean;
|
|
5
|
-
isDragOverlay?: boolean
|
|
6
|
-
disabled?: boolean
|
|
5
|
+
isDragOverlay?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
7
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, 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.js';
|
|
3
3
|
export declare const useActionsHandlers: (itemMeta: DSShuttleV2T.ItemMeta) => {
|
|
4
|
-
handleClickDrilldown: (e: React.
|
|
5
|
-
handleClickSingleMove: (e: React.
|
|
4
|
+
handleClickDrilldown: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
5
|
+
handleClickSingleMove: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
6
6
|
handleKeyDownSelectionBubbleUp: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
3
3
|
export declare const ItemMiddleSection: React.MemoExoticComponent<(props: DSShuttleV2T.ItemMeta & {
|
|
4
|
-
tooltipHelpers?: DSShuttleV2T.ComponentProps[
|
|
4
|
+
tooltipHelpers?: DSShuttleV2T.ComponentProps["tooltipHelpers"];
|
|
5
5
|
}) => import("react/jsx-runtime.js").JSX.Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DSShuttleV2T } from '../../react-desc-prop-types.js';
|
|
3
3
|
export declare const ItemOverlay: React.MemoExoticComponent<(itemMeta: DSShuttleV2T.ItemMeta & {
|
|
4
|
-
tooltipHelpers?: DSShuttleV2T.ComponentProps[
|
|
4
|
+
tooltipHelpers?: DSShuttleV2T.ComponentProps["tooltipHelpers"];
|
|
5
5
|
}) => import("react/jsx-runtime.js").JSX.Element>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
3
|
-
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
4
|
-
import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
5
|
-
import { type useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';
|
|
1
|
+
import { type DSButtonT, type DSButtonV3T } from '@elliemae/ds-button-v2';
|
|
2
|
+
import { type DnDKitTree, type useSortable } from '@elliemae/ds-drag-and-drop';
|
|
6
3
|
import { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';
|
|
7
4
|
import { type DSInputTextT } from '@elliemae/ds-form-input-text';
|
|
8
|
-
import { type
|
|
9
|
-
import {
|
|
5
|
+
import { type useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';
|
|
6
|
+
import type { GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
7
|
+
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
10
8
|
import type { ZustandT } from '@elliemae/ds-zustand-helpers';
|
|
11
|
-
import type
|
|
12
|
-
import type { useAutoCalculated } from './config/useAutoCalculated/index.js';
|
|
9
|
+
import type React from 'react';
|
|
13
10
|
import { DSShuttleV2Name, DSShuttleV2Slots } from './config/DSShuttleV2Definitions.js';
|
|
11
|
+
import type { useAutoCalculated } from './config/useAutoCalculated/index.js';
|
|
12
|
+
import type { ACTIONS_FOCUSES, DropIndicatorPosition, ITEMS_FOCUSES, REGIONS_FOCUSES } from './constants/index.js';
|
|
14
13
|
export declare namespace DSShuttleV2T {
|
|
15
14
|
type Datum = Record<string, unknown>;
|
|
16
15
|
type PanelMetaInfo = {
|
|
@@ -219,4 +218,4 @@ export declare namespace DSShuttleV2T {
|
|
|
219
218
|
}
|
|
220
219
|
}
|
|
221
220
|
export declare const defaultProps: DSShuttleV2T.DefaultProps;
|
|
222
|
-
export declare const DSShuttleV2PropTypesSchema:
|
|
221
|
+
export declare const DSShuttleV2PropTypesSchema: ValidationMap<DSShuttleV2T.Props>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-shuttle-v2",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.54.0-beta.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Shuttle v2",
|
|
6
6
|
"files": [
|
|
@@ -38,33 +38,34 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"fast-deep-equal": "~3.1.3",
|
|
40
40
|
"uid": "~2.0.1",
|
|
41
|
-
"@elliemae/ds-
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
45
|
-
"@elliemae/ds-
|
|
46
|
-
"@elliemae/ds-form-input-text": "3.
|
|
47
|
-
"@elliemae/ds-hooks-headless-tooltip": "3.
|
|
48
|
-
"@elliemae/ds-
|
|
49
|
-
"@elliemae/ds-
|
|
50
|
-
"@elliemae/ds-
|
|
51
|
-
"@elliemae/ds-
|
|
52
|
-
"@elliemae/ds-icons": "3.
|
|
53
|
-
"@elliemae/ds-props-helpers": "3.
|
|
54
|
-
"@elliemae/ds-popperjs": "3.
|
|
55
|
-
"@elliemae/ds-system": "3.
|
|
56
|
-
"@elliemae/ds-typescript-helpers": "3.
|
|
57
|
-
"@elliemae/ds-
|
|
58
|
-
"@elliemae/ds-
|
|
41
|
+
"@elliemae/ds-circular-progress-indicator": "3.54.0-beta.1",
|
|
42
|
+
"@elliemae/ds-drag-and-drop": "3.54.0-beta.1",
|
|
43
|
+
"@elliemae/ds-button-v2": "3.54.0-beta.1",
|
|
44
|
+
"@elliemae/ds-form-checkbox": "3.54.0-beta.1",
|
|
45
|
+
"@elliemae/ds-fast-list": "3.54.0-beta.1",
|
|
46
|
+
"@elliemae/ds-form-input-text": "3.54.0-beta.1",
|
|
47
|
+
"@elliemae/ds-hooks-headless-tooltip": "3.54.0-beta.1",
|
|
48
|
+
"@elliemae/ds-grid": "3.54.0-beta.1",
|
|
49
|
+
"@elliemae/ds-hooks-fontsize-detector": "3.54.0-beta.1",
|
|
50
|
+
"@elliemae/ds-indeterminate-progress-indicator": "3.54.0-beta.1",
|
|
51
|
+
"@elliemae/ds-hooks-on-blur-out": "3.54.0-beta.1",
|
|
52
|
+
"@elliemae/ds-icons": "3.54.0-beta.1",
|
|
53
|
+
"@elliemae/ds-props-helpers": "3.54.0-beta.1",
|
|
54
|
+
"@elliemae/ds-popperjs": "3.54.0-beta.1",
|
|
55
|
+
"@elliemae/ds-system": "3.54.0-beta.1",
|
|
56
|
+
"@elliemae/ds-typescript-helpers": "3.54.0-beta.1",
|
|
57
|
+
"@elliemae/ds-zustand-helpers": "3.54.0-beta.1",
|
|
58
|
+
"@elliemae/ds-typography": "3.54.0-beta.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
61
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
62
62
|
"jest": "~29.7.0",
|
|
63
63
|
"lodash-es": "^4.17.21",
|
|
64
64
|
"styled-components": "~5.3.9",
|
|
65
|
-
"@elliemae/ds-breadcrumb": "3.
|
|
66
|
-
"@elliemae/ds-
|
|
67
|
-
"@elliemae/ds-
|
|
65
|
+
"@elliemae/ds-breadcrumb": "3.54.0-beta.1",
|
|
66
|
+
"@elliemae/ds-monorepo-devops": "3.54.0-beta.1",
|
|
67
|
+
"@elliemae/ds-tree-model": "3.54.0-beta.1",
|
|
68
|
+
"@elliemae/ds-test-utils": "3.54.0-beta.1"
|
|
68
69
|
},
|
|
69
70
|
"peerDependencies": {
|
|
70
71
|
"lodash-es": "^4.17.21",
|