@elliemae/ds-shuttle-v2 3.70.0-next.35 → 3.70.0-next.36
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/constants/index.js +1 -2
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/parts/Dnd/DndHandle.js +7 -6
- package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/cjs/parts/Dnd/DragOverlay.js +1 -1
- package/dist/cjs/parts/Dnd/DragOverlay.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +16 -14
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +29 -68
- package/dist/cjs/parts/Item/Item.js.map +3 -3
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +2 -2
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +6 -6
- package/dist/cjs/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
- package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +72 -0
- package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
- package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js +83 -0
- package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
- package/dist/cjs/parts/{HoC/withConditionalUseSortable.js → Item/ItemSelectionUi/ItemSelectionUI.types.js} +3 -18
- package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
- package/dist/cjs/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +14 -13
- package/dist/cjs/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
- package/dist/cjs/parts/Item/useItemInnerRefHandlers.js +73 -0
- package/dist/cjs/parts/Item/useItemInnerRefHandlers.js.map +7 -0
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +6 -6
- package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +7 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +1 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +2 -2
- package/dist/esm/constants/index.js +1 -2
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/parts/Dnd/DndHandle.js +8 -7
- package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/esm/parts/Dnd/DragOverlay.js +1 -1
- package/dist/esm/parts/Dnd/DragOverlay.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +16 -14
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/esm/parts/Item/Item.js +30 -69
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +3 -3
- package/dist/esm/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
- package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +42 -0
- package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js +53 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js +2 -0
- package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
- package/dist/esm/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +11 -10
- package/dist/esm/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
- package/dist/esm/parts/Item/useItemInnerRefHandlers.js +43 -0
- package/dist/esm/parts/Item/useItemInnerRefHandlers.js.map +7 -0
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +2 -2
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +3 -3
- package/dist/esm/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +7 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +1 -0
- package/dist/esm/typescript-testing/slot-props.js.map +2 -2
- package/dist/types/constants/index.d.ts +2 -1
- package/dist/types/parts/Item/Item.d.ts +1 -5
- package/dist/types/parts/Item/ItemActions/{useInnerRefHandlers.d.ts → useInnerRefActionHandlers.d.ts} +1 -1
- package/dist/types/parts/Item/ItemSelectionUi/CheckboxSelectionUI.d.ts +2 -0
- package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.d.ts +2 -0
- package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.types.d.ts +11 -0
- package/dist/types/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.d.ts +2 -0
- package/dist/types/parts/Item/useItemInnerRefHandlers.d.ts +5 -0
- package/dist/types/parts/Panel/bottom/{useInnerRefHandlers.d.ts → useLoadMoreBtnInnerRefHandlers.d.ts} +1 -1
- package/dist/types/react-desc-prop-types.d.ts +2 -0
- package/package.json +23 -23
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +0 -7
- package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
- package/dist/cjs/parts/Item/ItemSelection.js.map +0 -7
- package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
- package/dist/esm/parts/HoC/withConditionalUseSortable.js +0 -13
- package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +0 -7
- package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
- package/dist/esm/parts/Item/ItemSelection.js.map +0 -7
- package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
- package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +0 -9
- package/dist/types/parts/Item/ItemSelection.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* 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 type { useAutoCalculated } from './config/useAutoCalculated/index.js';\nimport type { ACTIONS_FOCUSES, DropIndicatorPosition, ITEMS_FOCUSES, REGIONS_FOCUSES } from './constants/index.js';\nimport { DSShuttleV2DataTestIds, DSShuttleV2Name, DSShuttleV2Slots } from './constants/index.js';\n\nexport declare namespace DSShuttleV2T {\n export type Datum<D extends Record<string, unknown> = Record<string, unknown>> = D;\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<D extends Record<string, unknown> = Record<string, unknown>> = {\n datum: Datum<D>;\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<D extends Record<string, unknown> = Record<string, unknown>> = {\n Icon?: React.ComponentType<ComponentProps<D>>;\n CustomRenderer?: React.ComponentType<ComponentProps<D>> | null;\n };\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables<D extends Record<string, unknown> = Record<string, unknown>> =\n OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents<D>;\n export type DatumHydratables<D extends Record<string, unknown> = Record<string, unknown>> = PrimaryKeyHydratables &\n RequiredDatumHydratables &\n OptionalDatumHydratables<D>;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<PrimaryKeyHydratables, [Datum<D>]>;\n export type FunctionalHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<FunctionalHydratables, [Datum<D>, Partial<PanelMetaInfo>]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<RequiredDatumHydratables, [Datum<D>, HydratersMeta]>;\n type OptionalDatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<OptionalDatumHydratables<D>, [Datum<D>, HydratersMeta]>;\n\n type DatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> = PrimaryKeyHydraters<D> &\n FunctionalHydraters<D> &\n RequiredDatumHydraters<D> &\n OptionalDatumHydraters<D>;\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<D extends Record<string, unknown> = Record<string, unknown>> = DatumInternalMeta & {\n original: Datum<D>;\n };\n export interface ItemMeta<D extends Record<string, unknown> = Record<string, unknown>> extends PanelMetaInfo {\n datum: Datum<D>;\n datumHydratables: DatumHydratables<D>;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Slot argument types \u2014 per-slot getOwnerPropsArguments shapes\n // =============================================================================\n export type DragHandleArguments = {\n id: string;\n innerRef: React.RefObject<HTMLDivElement> | React.RefCallback<HTMLDivElement>;\n useSortableHelpers: ReturnType<typeof useSortable>;\n isDndActive: boolean;\n isDragging: boolean;\n disabled?: boolean;\n ariaLabelledby?: string;\n };\n\n export type ItemMidSectionArguments<D extends Record<string, unknown> = Record<string, unknown>> = ItemMeta<D> & {\n tooltipHelpers?: ComponentProps<D>['tooltipHelpers'];\n };\n\n // The to-source / to-destination icon slots render in two contexts (per-item action row and\n // bulk-action button). Both receive this single unified shape: the panel info is always present,\n // and the per-item extras (only available in the item-row context) are optional under extraMetaInfo.\n export type ItemActionIconArguments<D extends Record<string, unknown> = Record<string, unknown>> = {\n panelMetaInfo: PanelMetaInfo;\n extraMetaInfo?: { itemMeta?: ItemMeta<D> };\n };\n\n export type SlotFunctionArguments<D extends Record<string, unknown> = Record<string, unknown>> = {\n // Panel-level slots \u2014 receive PanelMetaInfo\n dsShuttlev2PanelWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2HeaderSearchIcon: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperTop: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSearchWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSearchBar: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSelectionHeader: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSelectionHeaderCountLabel: (args: PanelMetaInfo) => object;\n dsShuttlev2AriaLivePanelCenter: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperMid: (args: PanelMetaInfo) => object;\n dsShuttlev2ItemsWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleBtn: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleLiveRegion: (args: PanelMetaInfo) => object;\n dsShuttlev2EmptyListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2LoadingListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2ListBottomLoadingMore: (args: PanelMetaInfo) => object;\n dsShuttlev2ListBottomLoadMoreBtn: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperBottom: (args: PanelMetaInfo) => object;\n // Item-level slots \u2014 receive ItemMeta\n dsShuttlev2ItemWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemCheckbox: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemSelection: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemLabelWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionsWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionBtn: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionBtnDrilldownIcon: (args: ItemMeta<D>) => object;\n // Item-level slots \u2014 receive ItemMeta & { tooltipHelpers? }\n dsShuttlev2ItemMidsectionWrapper: (args: ItemMidSectionArguments<D>) => object;\n dsShuttlev2ItemIconWrapper: (args: ItemMidSectionArguments<D>) => object;\n // Dual-context slots \u2014 rendered in both the item-action row and the bulk-action button;\n // both pass the same unified ItemActionIconArguments shape\n dsShuttlev2ItemActionBtnToSourceIcon: (args: ItemActionIconArguments<D>) => object;\n dsShuttlev2ItemActionBtnToDestinationIcon: (args: ItemActionIconArguments<D>) => object;\n // Drag-and-drop slots \u2014 receive DragHandleArguments\n dsShuttlev2DragAndDropHandleWrapper: (args: DragHandleArguments) => object;\n dsShuttlev2DragAndDropHandle: (args: DragHandleArguments) => object;\n // Root wrapper \u2014 no getOwnerPropsArguments passed\n dsShuttlev2Wrapper: () => object;\n };\n\n export type SlotProps<D extends Record<string, unknown> = Record<string, unknown>> = {\n [K in keyof SlotFunctionArguments<D>]?: object | SlotFunctionArguments<D>[K];\n };\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange<D extends Record<string, unknown> = Record<string, unknown>> = (\n newData: Datum<D>[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum<D>;\n selectedItems?: Datum<D>[];\n },\n ) => void;\n\n type OnChangeEvent<T> = (\n items: T,\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata<D extends Record<string, unknown> = Record<string, unknown>> = Omit<\n DnDKitTree.OnReorder<Datum<D>>,\n 'considerExpanding'\n >;\n type OnReorderEvent<D extends Record<string, unknown> = Record<string, unknown>> = (\n movedItem: Datum<D>,\n metadata: OnReorderEventMetadata<D>,\n ) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange<D extends Record<string, unknown> = Record<string, unknown>> = (\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<D>;\n },\n ) => void;\n\n type OnSelectionDrilldown<T> = (\n item: T,\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,\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<D extends Record<string, unknown> = Record<string, unknown>> = (\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<D>;\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 shuttleInternalId: string;\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<D extends Record<string, unknown> = Record<string, unknown>>\n extends RequiredDatumHydraters<D>,\n PrimaryKeyHydraters<D> {\n sourceData: Datum<D>[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange<D>;\n // The header component and its props are owned and typed by the consumer; we only render\n // whatever component they pass with whatever props they pass. We deliberately use `any` (not\n // Record<string, unknown>) so a consumer component with its own required prop shape is accepted \u2014\n // ComponentType<Record<string, unknown>> would reject it via parameter contravariance.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n SourceHeader: React.ComponentType<any>;\n onSourceDrilldown: OnSelectionDrilldown<Datum<D>>;\n\n destinationData: Datum<D>[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange<D>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n DestinationHeader: React.ComponentType<any>;\n onDestinationDrilldown: OnSelectionDrilldown<Datum<D>>;\n }\n\n export interface DefaultProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends Required<FunctionalHydraters<D>> {\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<Datum<D>[]>;\n onSourceRemove: OnChangeEvent<Datum<D>[]>;\n onDestinationAdd: OnChangeEvent<Datum<D>[]>;\n onDestinationRemove: OnChangeEvent<Datum<D>[]>;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent<D>;\n onDestinationReorder: OnReorderEvent<D>;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange<D>;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange<D>;\n }\n export interface OptionalProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends OptionalDatumHydraters<D>,\n OptionalPanelHydraters,\n SlotProps<D> {\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 sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n\n moveButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta<D>;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n drillDownButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta<D>;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n\n checkboxSelectAllProps?: (metainfo: PanelMetaInfo) => DSControlledCheckboxT.Props;\n areaSearchBarProps?: (metaInfo: PanelMetaInfo) => DSInputTextT.Props;\n }\n\n export interface Props<D extends Record<string, unknown> = Record<string, unknown>>\n extends Partial<DefaultProps<D>>,\n OptionalProps<D>,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<D> | keyof OptionalProps<D> | keyof RequiredProps<D>\n >,\n XstyledProps,\n RequiredProps<D> {}\n\n export interface InternalProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends DefaultProps<D>,\n OptionalProps<D>,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<D> | keyof OptionalProps<D> | keyof RequiredProps<D>\n >,\n XstyledProps,\n RequiredProps<D> {}\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};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as ValidationMap<DSShuttleV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOvB,8BAMO;AAMP,uBAA0E;
|
|
4
|
+
"sourcesContent": ["/* 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 type { useAutoCalculated } from './config/useAutoCalculated/index.js';\nimport type { ACTIONS_FOCUSES, DropIndicatorPosition, ITEMS_FOCUSES, REGIONS_FOCUSES } from './constants/index.js';\nimport { DSShuttleV2DataTestIds, DSShuttleV2Name, DSShuttleV2Slots } from './constants/index.js';\n\nexport declare namespace DSShuttleV2T {\n export type Datum<D extends Record<string, unknown> = Record<string, unknown>> = D;\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<D extends Record<string, unknown> = Record<string, unknown>> = {\n datum: Datum<D>;\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<D extends Record<string, unknown> = Record<string, unknown>> = {\n Icon?: React.ComponentType<ComponentProps<D>>;\n CustomRenderer?: React.ComponentType<ComponentProps<D>> | null;\n };\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables<D extends Record<string, unknown> = Record<string, unknown>> =\n OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents<D>;\n export type DatumHydratables<D extends Record<string, unknown> = Record<string, unknown>> = PrimaryKeyHydratables &\n RequiredDatumHydratables &\n OptionalDatumHydratables<D>;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<PrimaryKeyHydratables, [Datum<D>]>;\n export type FunctionalHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<FunctionalHydratables, [Datum<D>, Partial<PanelMetaInfo>]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<RequiredDatumHydratables, [Datum<D>, HydratersMeta]>;\n type OptionalDatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<OptionalDatumHydratables<D>, [Datum<D>, HydratersMeta]>;\n\n type DatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> = PrimaryKeyHydraters<D> &\n FunctionalHydraters<D> &\n RequiredDatumHydraters<D> &\n OptionalDatumHydraters<D>;\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<D extends Record<string, unknown> = Record<string, unknown>> = DatumInternalMeta & {\n original: Datum<D>;\n };\n export interface ItemMeta<D extends Record<string, unknown> = Record<string, unknown>> extends PanelMetaInfo {\n datum: Datum<D>;\n datumHydratables: DatumHydratables<D>;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Slot argument types \u2014 per-slot getOwnerPropsArguments shapes\n // =============================================================================\n export type DragHandleArguments = {\n id: string;\n innerRef: React.RefObject<HTMLDivElement> | React.RefCallback<HTMLDivElement>;\n useSortableHelpers: ReturnType<typeof useSortable>;\n isDndActive: boolean;\n isDragging: boolean;\n disabled?: boolean;\n ariaLabelledby?: string;\n };\n\n export type ItemMidSectionArguments<D extends Record<string, unknown> = Record<string, unknown>> = ItemMeta<D> & {\n tooltipHelpers?: ComponentProps<D>['tooltipHelpers'];\n };\n\n // The to-source / to-destination icon slots render in two contexts (per-item action row and\n // bulk-action button). Both receive this single unified shape: the panel info is always present,\n // and the per-item extras (only available in the item-row context) are optional under extraMetaInfo.\n export type ItemActionIconArguments<D extends Record<string, unknown> = Record<string, unknown>> = {\n panelMetaInfo: PanelMetaInfo;\n extraMetaInfo?: { itemMeta?: ItemMeta<D> };\n };\n\n export type SlotFunctionArguments<D extends Record<string, unknown> = Record<string, unknown>> = {\n // Panel-level slots \u2014 receive PanelMetaInfo\n dsShuttlev2PanelWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2HeaderSearchIcon: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperTop: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSearchWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSearchBar: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSelectionHeader: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSelectionHeaderCountLabel: (args: PanelMetaInfo) => object;\n dsShuttlev2AriaLivePanelCenter: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperMid: (args: PanelMetaInfo) => object;\n dsShuttlev2ItemsWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleBtn: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleLiveRegion: (args: PanelMetaInfo) => object;\n dsShuttlev2EmptyListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2LoadingListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2ListBottomLoadingMore: (args: PanelMetaInfo) => object;\n dsShuttlev2ListBottomLoadMoreBtn: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperBottom: (args: PanelMetaInfo) => object;\n // Item-level slots \u2014 receive ItemMeta\n dsShuttlev2ItemWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemCheckbox: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemSelection: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemSelectionCheckboxUi: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemLabelWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionsWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionBtn: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionBtnDrilldownIcon: (args: ItemMeta<D>) => object;\n // Item-level slots \u2014 receive ItemMeta & { tooltipHelpers? }\n dsShuttlev2ItemMidsectionWrapper: (args: ItemMidSectionArguments<D>) => object;\n dsShuttlev2ItemIconWrapper: (args: ItemMidSectionArguments<D>) => object;\n // Dual-context slots \u2014 rendered in both the item-action row and the bulk-action button;\n // both pass the same unified ItemActionIconArguments shape\n dsShuttlev2ItemActionBtnToSourceIcon: (args: ItemActionIconArguments<D>) => object;\n dsShuttlev2ItemActionBtnToDestinationIcon: (args: ItemActionIconArguments<D>) => object;\n // Drag-and-drop slots \u2014 receive DragHandleArguments\n dsShuttlev2DragAndDropHandleWrapper: (args: DragHandleArguments) => object;\n dsShuttlev2DragAndDropHandle: (args: DragHandleArguments) => object;\n // Root wrapper \u2014 no getOwnerPropsArguments passed\n dsShuttlev2Wrapper: () => object;\n };\n\n export type SlotProps<D extends Record<string, unknown> = Record<string, unknown>> = {\n [K in keyof SlotFunctionArguments<D>]?: object | SlotFunctionArguments<D>[K];\n };\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange<D extends Record<string, unknown> = Record<string, unknown>> = (\n newData: Datum<D>[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum<D>;\n selectedItems?: Datum<D>[];\n },\n ) => void;\n\n type OnChangeEvent<T> = (\n items: T,\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata<D extends Record<string, unknown> = Record<string, unknown>> = Omit<\n DnDKitTree.OnReorder<Datum<D>>,\n 'considerExpanding'\n >;\n type OnReorderEvent<D extends Record<string, unknown> = Record<string, unknown>> = (\n movedItem: Datum<D>,\n metadata: OnReorderEventMetadata<D>,\n ) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange<D extends Record<string, unknown> = Record<string, unknown>> = (\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<D>;\n },\n ) => void;\n\n type OnSelectionDrilldown<T> = (\n item: T,\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,\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<D extends Record<string, unknown> = Record<string, unknown>> = (\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<D>;\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 shuttleInternalId: string;\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<D extends Record<string, unknown> = Record<string, unknown>>\n extends RequiredDatumHydraters<D>,\n PrimaryKeyHydraters<D> {\n sourceData: Datum<D>[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange<D>;\n // The header component and its props are owned and typed by the consumer; we only render\n // whatever component they pass with whatever props they pass. We deliberately use `any` (not\n // Record<string, unknown>) so a consumer component with its own required prop shape is accepted \u2014\n // ComponentType<Record<string, unknown>> would reject it via parameter contravariance.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n SourceHeader: React.ComponentType<any>;\n onSourceDrilldown: OnSelectionDrilldown<Datum<D>>;\n\n destinationData: Datum<D>[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange<D>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n DestinationHeader: React.ComponentType<any>;\n onDestinationDrilldown: OnSelectionDrilldown<Datum<D>>;\n }\n\n export interface DefaultProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends Required<FunctionalHydraters<D>> {\n // additional flag to condition how the selection UI renders (checkbox vs highlight only)\n // \u2014 can be used by the consumer to decide whether to use the ItemSelectionUI or not\n // incremental change for\n // PUI-18536 - [Dev][ShuttleV2] Non-color indicators needed for item states \u2014 WCAG 1.4.1 Use of Color\n explicitSelectionUI: boolean;\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<Datum<D>[]>;\n onSourceRemove: OnChangeEvent<Datum<D>[]>;\n onDestinationAdd: OnChangeEvent<Datum<D>[]>;\n onDestinationRemove: OnChangeEvent<Datum<D>[]>;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent<D>;\n onDestinationReorder: OnReorderEvent<D>;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange<D>;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange<D>;\n }\n export interface OptionalProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends OptionalDatumHydraters<D>,\n OptionalPanelHydraters,\n SlotProps<D> {\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 sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n\n moveButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta<D>;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n drillDownButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta<D>;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n\n checkboxSelectAllProps?: (metainfo: PanelMetaInfo) => DSControlledCheckboxT.Props;\n areaSearchBarProps?: (metaInfo: PanelMetaInfo) => DSInputTextT.Props;\n }\n\n export interface Props<D extends Record<string, unknown> = Record<string, unknown>>\n extends Partial<DefaultProps<D>>,\n OptionalProps<D>,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<D> | keyof OptionalProps<D> | keyof RequiredProps<D>\n >,\n XstyledProps,\n RequiredProps<D> {}\n\n export interface InternalProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends DefaultProps<D>,\n OptionalProps<D>,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<D> | keyof OptionalProps<D> | keyof RequiredProps<D>\n >,\n XstyledProps,\n RequiredProps<D> {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n // we start as false to avoid breaking changes, eventually converge to true for better accessibility\n explicitSelectionUI: false,\n\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 getPreventMove: () => false,\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...getPropsPerSlotPropTypes(DSShuttleV2Name, DSShuttleV2Slots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n explicitSelectionUI: PropTypes.bool\n .description(\n 'A boolean indicating whether to use WCAG-compliant selection indicators (checkboxes) instead of color-only indicators for selected items, must be true for the component to meet WCAG 1.4.1 Use of Color guidelines',\n )\n .defaultValue(false),\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.elementType.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.elementType.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};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as ValidationMap<DSShuttleV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOvB,8BAMO;AAMP,uBAA0E;AA8ZnE,MAAM,eAA0C;AAAA;AAAA,EAErD,qBAAqB;AAAA,EAErB,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA,EAClC,6BAA6B;AAAA,EAC7B,wBAAwB;AAAA,EACxB,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,uBAAuB,MAAM;AAAA,EAAC;AAAA,EAE9B,aAAa,MAAM;AAAA,EAAC;AAAA,EACpB,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,qBAAqB,MAAM;AAAA,EAAC;AAAA,EAC5B,iBAAiB,MAAM;AAAA,EAAC;AAAA,EACxB,sBAAsB,MAAM;AAAA,EAAC;AAAA,EAE7B,wBAAwB,CAAC;AAAA,EACzB,oBAAoB,MAAM;AAAA,EAAC;AAAA,EAC3B,6BAA6B,CAAC;AAAA,EAC9B,yBAAyB,MAAM;AAAA,EAAC;AAAA,EAChC,gBAAgB,MAAM;AACxB;AAEA,MAAM,uBAA8D;AAAA,EAClE,OAAG,kDAAyB,kCAAiB,iCAAgB;AAAA,EAC7D,GAAG;AAAA,EACH,GAAG;AAAA,EAEH,qBAAqB,kCAAU,KAC5B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EAErB,YAAY,kCAAU,QAAQ,kCAAU,MAAM,EAAE;AAAA,IAC9C;AAAA,EACF,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C/B,YAAY,qFAAqF,EACjG,aAAa,+BAA+B;AAAA,EAC/C,wBAAwB,kCAAU,KAC/B,YAAY,8EAA8E,EAC1F,aAAa,CAAC,CAAC;AAAA,EAClB,iBAAiB,kCAAU,KACxB,YAAY,kDAAkD,EAC9D,aAAa,OAAO,CAAC,EAAE,EACvB,UAAU,oEAAoE;AAAA,EACjF,sBAAsB,kCAAU,KAC7B,YAAY,uDAAuD,EACnE,aAAa,OAAO,CAAC,EAAE,EACvB,UAAU,oEAAoE;AAAA,EACjF,oBAAoB,kCAAU,KAC3B,YAAY,sDAAsD,EAClE,aAAa,OAAO,CAAC,EAAE;AAC5B;AAEO,MAAM,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -159,6 +159,7 @@ const SlotPropsAsFunctions = {
|
|
|
159
159
|
dsShuttlev2ItemWrapper: itemMetaProbe,
|
|
160
160
|
dsShuttlev2ItemCheckbox: itemMetaProbe,
|
|
161
161
|
dsShuttlev2ItemSelection: itemMetaProbe,
|
|
162
|
+
dsShuttlev2ItemSelectionCheckboxUi: itemMetaProbe,
|
|
162
163
|
dsShuttlev2ItemLabelWrapper: itemMetaProbe,
|
|
163
164
|
dsShuttlev2ItemActionsWrapper: itemMetaProbe,
|
|
164
165
|
dsShuttlev2ItemActionWrapper: itemMetaProbe,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSShuttleV2Name, DSShuttleV2Slots } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSShuttleV2T.Props> = {\n // Panel-level\n dsShuttlev2PanelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2HeaderSearchIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperTop: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchBar: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeader: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeaderCountLabel: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AriaLivePanelCenter: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperMid: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleLiveRegion: { 'aria-label': 'just a typescript test' },\n dsShuttlev2EmptyListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2LoadingListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadingMore: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadMoreBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperBottom: { 'aria-label': 'just a typescript test' },\n // Item-level\n dsShuttlev2ItemWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemCheckbox: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemSelection: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemLabelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnDrilldownIcon: { 'aria-label': 'just a typescript test' },\n // Item-level with tooltipHelpers\n dsShuttlev2ItemMidsectionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemIconWrapper: { 'aria-label': 'just a typescript test' },\n // Dual-context\n dsShuttlev2ItemActionBtnToSourceIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnToDestinationIcon: { 'aria-label': 'just a typescript test' },\n // Drag-and-drop\n dsShuttlev2DragAndDropHandleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2DragAndDropHandle: { 'aria-label': 'just a typescript test' },\n // Root wrapper\n dsShuttlev2Wrapper: { 'aria-label': 'just a typescript test' },\n};\n\n// Probes: each fully deconstructs its argument interface and assigns every field to a const of the\n// exact expected type. This makes the test shield against ANY change to the argument shape \u2014 a\n// removed/renamed field breaks the destructure; a retyped field breaks the typed assignment.\nconst testReturn = { 'aria-label': 'just a typescript test' };\n\nconst panelMetaProbe = (args: DSShuttleV2T.PanelMetaInfo): object => {\n const { isDestinationPanel, hasMultipleSelection, height } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n return testReturn;\n};\n\nconst itemMetaProbe = (args: DSShuttleV2T.ItemMeta): object => {\n const {\n isDestinationPanel,\n hasMultipleSelection,\n height,\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n return testReturn;\n};\n\nconst itemMidSectionProbe = (args: DSShuttleV2T.ItemMidSectionArguments): object => {\n const {\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n isDestinationPanel,\n tooltipHelpers,\n } = args;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _tooltipHelpers: DSShuttleV2T.ComponentProps['tooltipHelpers'] = tooltipHelpers;\n return testReturn;\n};\n\nconst itemActionIconProbe = (args: DSShuttleV2T.ItemActionIconArguments): object => {\n const { panelMetaInfo, extraMetaInfo } = args;\n const _panelMetaInfo: DSShuttleV2T.PanelMetaInfo = panelMetaInfo;\n const _extraMetaInfo: { itemMeta?: DSShuttleV2T.ItemMeta } | undefined = extraMetaInfo;\n const _itemMeta: DSShuttleV2T.ItemMeta | undefined = extraMetaInfo?.itemMeta;\n return testReturn;\n};\n\nconst dragHandleProbe = (args: DSShuttleV2T.DragHandleArguments): object => {\n const { id, innerRef, useSortableHelpers, isDndActive, isDragging, disabled, ariaLabelledby } = args;\n const _id: string = id;\n const _innerRef: DSShuttleV2T.DragHandleArguments['innerRef'] = innerRef;\n const _useSortableHelpers: DSShuttleV2T.DragHandleArguments['useSortableHelpers'] = useSortableHelpers;\n const _isDndActive: boolean = isDndActive;\n const _isDragging: boolean = isDragging;\n const _disabled: boolean | undefined = disabled;\n const _ariaLabelledby: string | undefined = ariaLabelledby;\n return testReturn;\n};\n\nconst SlotPropsAsFunctions: DSShuttleV2T.SlotFunctionArguments = {\n // Panel-level \u2014 receive PanelMetaInfo\n dsShuttlev2PanelWrapper: panelMetaProbe,\n dsShuttlev2ListWrapper: panelMetaProbe,\n dsShuttlev2HeaderSearchIcon: panelMetaProbe,\n dsShuttlev2ListWrapperTop: panelMetaProbe,\n dsShuttlev2AreaSearchWrapper: panelMetaProbe,\n dsShuttlev2AreaSearchBar: panelMetaProbe,\n dsShuttlev2AreaSelectionHeader: panelMetaProbe,\n dsShuttlev2AreaSelectionHeaderCountLabel: panelMetaProbe,\n dsShuttlev2AriaLivePanelCenter: panelMetaProbe,\n dsShuttlev2ListWrapperMid: panelMetaProbe,\n dsShuttlev2ItemsWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleBtn: panelMetaProbe,\n dsShuttlev2MoveMultipleLiveRegion: panelMetaProbe,\n dsShuttlev2EmptyListWrapper: panelMetaProbe,\n dsShuttlev2LoadingListWrapper: panelMetaProbe,\n dsShuttlev2ListBottomLoadingMore: panelMetaProbe,\n dsShuttlev2ListBottomLoadMoreBtn: panelMetaProbe,\n dsShuttlev2ListWrapperBottom: panelMetaProbe,\n // Item-level \u2014 receive ItemMeta\n dsShuttlev2ItemWrapper: itemMetaProbe,\n dsShuttlev2ItemCheckbox: itemMetaProbe,\n dsShuttlev2ItemSelection: itemMetaProbe,\n dsShuttlev2ItemLabelWrapper: itemMetaProbe,\n dsShuttlev2ItemActionsWrapper: itemMetaProbe,\n dsShuttlev2ItemActionWrapper: itemMetaProbe,\n dsShuttlev2ItemActionBtn: itemMetaProbe,\n dsShuttlev2ItemActionBtnDrilldownIcon: itemMetaProbe,\n // Item-level with tooltipHelpers \u2014 receive ItemMidSectionArguments\n dsShuttlev2ItemMidsectionWrapper: itemMidSectionProbe,\n dsShuttlev2ItemIconWrapper: itemMidSectionProbe,\n // Dual-context \u2014 receive ItemActionIconArguments\n dsShuttlev2ItemActionBtnToSourceIcon: itemActionIconProbe,\n dsShuttlev2ItemActionBtnToDestinationIcon: itemActionIconProbe,\n // Drag-and-drop \u2014 receive DragHandleArguments\n dsShuttlev2DragAndDropHandleWrapper: dragHandleProbe,\n dsShuttlev2DragAndDropHandle: dragHandleProbe,\n // Root wrapper \u2014 no arguments\n dsShuttlev2Wrapper: () => testReturn,\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot defined in DSShuttleV2Slots\n// is missing from SlotFunctionArguments (or vice versa).\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSShuttleV2Name, typeof DSShuttleV2Slots>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACQvB,MAAM,iBAA8C;AAAA;AAAA,EAElD,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,8BAA8B,EAAE,cAAc,yBAAyB;AAAA,EACvE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,0CAA0C,EAAE,cAAc,yBAAyB;AAAA,EACnF,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,mCAAmC,EAAE,cAAc,yBAAyB;AAAA,EAC5E,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,+BAA+B,EAAE,cAAc,yBAAyB;AAAA,EACxE,kCAAkC,EAAE,cAAc,yBAAyB;AA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8BAA8B;AAAA;AAAA,EAE9B,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,0BAA0B;AAAA,EAC1B,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,0BAA0B;AAAA,EAC1B,uCAAuC;AAAA;AAAA,EAEvC,kCAAkC;AAAA,EAClC,4BAA4B;AAAA;AAAA,EAE5B,sCAAsC;AAAA,EACtC,2CAA2C;AAAA;AAAA,EAE3C,qCAAqC;AAAA,EACrC,8BAA8B;AAAA;AAAA,EAE9B,oBAAoB,MAAM;AAC5B;AAIA,MAAM,6CAEF;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSShuttleV2Name, DSShuttleV2Slots } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSShuttleV2T.Props> = {\n // Panel-level\n dsShuttlev2PanelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2HeaderSearchIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperTop: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchBar: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeader: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeaderCountLabel: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AriaLivePanelCenter: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperMid: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleLiveRegion: { 'aria-label': 'just a typescript test' },\n dsShuttlev2EmptyListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2LoadingListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadingMore: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadMoreBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperBottom: { 'aria-label': 'just a typescript test' },\n // Item-level\n dsShuttlev2ItemWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemCheckbox: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemSelection: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemLabelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnDrilldownIcon: { 'aria-label': 'just a typescript test' },\n // Item-level with tooltipHelpers\n dsShuttlev2ItemMidsectionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemIconWrapper: { 'aria-label': 'just a typescript test' },\n // Dual-context\n dsShuttlev2ItemActionBtnToSourceIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnToDestinationIcon: { 'aria-label': 'just a typescript test' },\n // Drag-and-drop\n dsShuttlev2DragAndDropHandleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2DragAndDropHandle: { 'aria-label': 'just a typescript test' },\n // Root wrapper\n dsShuttlev2Wrapper: { 'aria-label': 'just a typescript test' },\n};\n\n// Probes: each fully deconstructs its argument interface and assigns every field to a const of the\n// exact expected type. This makes the test shield against ANY change to the argument shape \u2014 a\n// removed/renamed field breaks the destructure; a retyped field breaks the typed assignment.\nconst testReturn = { 'aria-label': 'just a typescript test' };\n\nconst panelMetaProbe = (args: DSShuttleV2T.PanelMetaInfo): object => {\n const { isDestinationPanel, hasMultipleSelection, height } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n return testReturn;\n};\n\nconst itemMetaProbe = (args: DSShuttleV2T.ItemMeta): object => {\n const {\n isDestinationPanel,\n hasMultipleSelection,\n height,\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n return testReturn;\n};\n\nconst itemMidSectionProbe = (args: DSShuttleV2T.ItemMidSectionArguments): object => {\n const {\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n isDestinationPanel,\n tooltipHelpers,\n } = args;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _tooltipHelpers: DSShuttleV2T.ComponentProps['tooltipHelpers'] = tooltipHelpers;\n return testReturn;\n};\n\nconst itemActionIconProbe = (args: DSShuttleV2T.ItemActionIconArguments): object => {\n const { panelMetaInfo, extraMetaInfo } = args;\n const _panelMetaInfo: DSShuttleV2T.PanelMetaInfo = panelMetaInfo;\n const _extraMetaInfo: { itemMeta?: DSShuttleV2T.ItemMeta } | undefined = extraMetaInfo;\n const _itemMeta: DSShuttleV2T.ItemMeta | undefined = extraMetaInfo?.itemMeta;\n return testReturn;\n};\n\nconst dragHandleProbe = (args: DSShuttleV2T.DragHandleArguments): object => {\n const { id, innerRef, useSortableHelpers, isDndActive, isDragging, disabled, ariaLabelledby } = args;\n const _id: string = id;\n const _innerRef: DSShuttleV2T.DragHandleArguments['innerRef'] = innerRef;\n const _useSortableHelpers: DSShuttleV2T.DragHandleArguments['useSortableHelpers'] = useSortableHelpers;\n const _isDndActive: boolean = isDndActive;\n const _isDragging: boolean = isDragging;\n const _disabled: boolean | undefined = disabled;\n const _ariaLabelledby: string | undefined = ariaLabelledby;\n return testReturn;\n};\n\nconst SlotPropsAsFunctions: DSShuttleV2T.SlotFunctionArguments = {\n // Panel-level \u2014 receive PanelMetaInfo\n dsShuttlev2PanelWrapper: panelMetaProbe,\n dsShuttlev2ListWrapper: panelMetaProbe,\n dsShuttlev2HeaderSearchIcon: panelMetaProbe,\n dsShuttlev2ListWrapperTop: panelMetaProbe,\n dsShuttlev2AreaSearchWrapper: panelMetaProbe,\n dsShuttlev2AreaSearchBar: panelMetaProbe,\n dsShuttlev2AreaSelectionHeader: panelMetaProbe,\n dsShuttlev2AreaSelectionHeaderCountLabel: panelMetaProbe,\n dsShuttlev2AriaLivePanelCenter: panelMetaProbe,\n dsShuttlev2ListWrapperMid: panelMetaProbe,\n dsShuttlev2ItemsWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleBtn: panelMetaProbe,\n dsShuttlev2MoveMultipleLiveRegion: panelMetaProbe,\n dsShuttlev2EmptyListWrapper: panelMetaProbe,\n dsShuttlev2LoadingListWrapper: panelMetaProbe,\n dsShuttlev2ListBottomLoadingMore: panelMetaProbe,\n dsShuttlev2ListBottomLoadMoreBtn: panelMetaProbe,\n dsShuttlev2ListWrapperBottom: panelMetaProbe,\n // Item-level \u2014 receive ItemMeta\n dsShuttlev2ItemWrapper: itemMetaProbe,\n dsShuttlev2ItemCheckbox: itemMetaProbe,\n dsShuttlev2ItemSelection: itemMetaProbe,\n dsShuttlev2ItemSelectionCheckboxUi: itemMetaProbe,\n dsShuttlev2ItemLabelWrapper: itemMetaProbe,\n dsShuttlev2ItemActionsWrapper: itemMetaProbe,\n dsShuttlev2ItemActionWrapper: itemMetaProbe,\n dsShuttlev2ItemActionBtn: itemMetaProbe,\n dsShuttlev2ItemActionBtnDrilldownIcon: itemMetaProbe,\n // Item-level with tooltipHelpers \u2014 receive ItemMidSectionArguments\n dsShuttlev2ItemMidsectionWrapper: itemMidSectionProbe,\n dsShuttlev2ItemIconWrapper: itemMidSectionProbe,\n // Dual-context \u2014 receive ItemActionIconArguments\n dsShuttlev2ItemActionBtnToSourceIcon: itemActionIconProbe,\n dsShuttlev2ItemActionBtnToDestinationIcon: itemActionIconProbe,\n // Drag-and-drop \u2014 receive DragHandleArguments\n dsShuttlev2DragAndDropHandleWrapper: dragHandleProbe,\n dsShuttlev2DragAndDropHandle: dragHandleProbe,\n // Root wrapper \u2014 no arguments\n dsShuttlev2Wrapper: () => testReturn,\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot defined in DSShuttleV2Slots\n// is missing from SlotFunctionArguments (or vice versa).\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSShuttleV2Name, typeof DSShuttleV2Slots>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACQvB,MAAM,iBAA8C;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-wrapper",
|
|
13
13
|
ITEM_MIDSECTION_WRAPPER: "item-midsection-wrapper",
|
|
14
14
|
ITEM_SELECTION: "item-selection",
|
|
15
|
+
ITEM_SELECTION_CHECKBOX_UI: "item-selection-checkbox-ui",
|
|
15
16
|
ITEM_ACTIONS_WRAPPER: "item-actions-wrapper",
|
|
16
17
|
ITEM_ACTION_WRAPPER: "item-action-wrapper",
|
|
17
18
|
ITEM_ACTION_BTN: "item-action-btn",
|
|
@@ -77,7 +78,6 @@ const DropIndicatorPosition = {
|
|
|
77
78
|
After: "after",
|
|
78
79
|
Inside: "inside"
|
|
79
80
|
};
|
|
80
|
-
const ITEM_SELECTION_WIDTH = 5;
|
|
81
81
|
export {
|
|
82
82
|
ACTIONS_FOCUSES,
|
|
83
83
|
DATA_TESTID,
|
|
@@ -86,7 +86,6 @@ export {
|
|
|
86
86
|
DSShuttleV2Slots,
|
|
87
87
|
DropIndicatorPosition,
|
|
88
88
|
ITEMS_FOCUSES,
|
|
89
|
-
ITEM_SELECTION_WIDTH,
|
|
90
89
|
REGIONS_FOCUSES,
|
|
91
90
|
SHUTTLE_IDS
|
|
92
91
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttlev2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_CHECKBOX: 'item-checkbox',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n MOVE_MULTIPLE_LIVE_REGION: 'move-multiple-live-region',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n DRAG_AND_DROP_HANDLE_WRAPPER: 'drag-and-drop-handle-wrapper',\n DRAG_AND_DROP_HANDLE: 'drag-and-drop-handle',\n ARIA_LIVE_PANEL_CENTER: 'aria-live-panel-center',\n} as const;\n\nexport const SHUTTLE_IDS = {\n SOURCE_PANEL_SEARCH: 'ds-shuttle-v2-source-panel-search',\n DESTINATION_PANEL_SEARCH: 'ds-shuttle-v2-destination-panel-search',\n} as const;\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n\nexport const REGIONS_FOCUSES = {\n SOURCE_HEADER: 'source-header',\n SOURCE_PANEL: 'source-panel',\n SOURCE_PANEL_ITEM: 'source-panel-item',\n SOURCE_PANEL_ITEM_MOVE_ALL: 'source-panel-move-all',\n SOURCE_BOTTOM: 'source-bottom',\n DESTINATION_HEADER: 'destination-header',\n DESTINATION_PANEL: 'destination-panel',\n DESTINATION_PANEL_ITEM: 'destination-panel-item',\n DESTINATION_PANEL_ITEM_MOVE_ALL: 'destination-panel-move-all',\n DESTINATION_BOTTOM: 'destination-bottom',\n RESET: '',\n} as const;\n\nexport const ACTIONS_FOCUSES = {\n MOVE_BTN: 'move-btn',\n DRILLDOWN_BTN: 'drilldown-btn',\n DRAG_N_DROP: 'drag-n-drop',\n PARENT: 'parent',\n RESET: '',\n} as const;\n\nexport const ITEMS_FOCUSES = {\n LOAD_MORE_BTN_SOURCE: 'load-more-btn-source',\n LOAD_MORE_BTN_DESTINATION: 'load-more-btn-destination',\n GET_SPECIFIC_ITEM: ({ hydratedId }: { hydratedId: string }) => hydratedId,\n RESET: '',\n} as const;\n\nexport const DATA_TESTID = {\n SHUTTLE_DRAG_HANDLE: 'shuttle-drag-handle',\n} as const;\n\nexport const DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n} as const;\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,gCAAgC;AAAA,EAChC,gCAAgC;AAAA,EAChC,qCAAqC;AAAA,EACrC,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,mCAAmC;AAAA,EACnC,8BAA8B;AAAA,EAC9B,sBAAsB;AAAA,EACtB,wBAAwB;AAC1B;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AAAA,EACrB,0BAA0B;AAC5B;AAEO,MAAM,yBAAyB,wBAAwB,iBAAiB,gBAAgB;AAExF,MAAM,kBAAkB;AAAA,EAC7B,eAAe;AAAA,EACf,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,oBAAoB;AAAA,EACpB,OAAO;AACT;AAEO,MAAM,kBAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,eAAe;AAAA,EACf,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,OAAO;AACT;AAEO,MAAM,gBAAgB;AAAA,EAC3B,sBAAsB;AAAA,EACtB,2BAA2B;AAAA,EAC3B,mBAAmB,CAAC,EAAE,WAAW,MAA8B;AAAA,EAC/D,OAAO;AACT;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AACvB;AAEO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSShuttleV2Name = 'DSShuttlev2';\n\nexport const DSShuttleV2Slots = {\n HEADER_SEARCH_ICON: 'header-search-icon',\n WRAPPER: 'wrapper',\n PANEL_WRAPPER: 'panel-wrapper',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n ITEM_CHECKBOX: 'item-checkbox',\n ITEM_ICON_WRAPPER: 'item-icon-wrapper',\n ITEM_LABEL_WRAPPER: 'item-label-wrapper',\n ITEM_MIDSECTION_WRAPPER: 'item-midsection-wrapper',\n ITEM_SELECTION: 'item-selection',\n ITEM_SELECTION_CHECKBOX_UI: 'item-selection-checkbox-ui',\n ITEM_ACTIONS_WRAPPER: 'item-actions-wrapper',\n ITEM_ACTION_WRAPPER: 'item-action-wrapper',\n ITEM_ACTION_BTN: 'item-action-btn',\n ITEM_ACTION_BTN_DRILLDOWN_ICON: 'item-action-btn-drilldown-icon',\n ITEM_ACTION_BTN_TO_SOURCE_ICON: 'item-action-btn-to-source-icon',\n ITEM_ACTION_BTN_TO_DESTINATION_ICON: 'item-action-btn-to-destination-icon',\n LIST_BOTTOM_LOADING_MORE: 'list-bottom-loading-more',\n LIST_BOTTOM_LOAD_MORE_BTN: 'list-bottom-load-more-btn',\n LIST_WRAPPER_BOTTOM: 'list-wrapper-bottom',\n EMPTY_LIST_WRAPPER: 'empty-list-wrapper',\n ITEMS_WRAPPER: 'items-wrapper',\n LOADING_LIST_WRAPPER: 'loading-list-wrapper',\n MOVE_MULTIPLE_WRAPPER: 'move-multiple-wrapper',\n MOVE_MULTIPLE_BTN: 'move-multiple-btn',\n MOVE_MULTIPLE_LIVE_REGION: 'move-multiple-live-region',\n LIST_WRAPPER_MID: 'list-wrapper-mid',\n LIST_WRAPPER_TOP: 'list-wrapper-top',\n AREA_SEARCH_WRAPPER: 'area-search-wrapper',\n AREA_SEARCH_BAR: 'area-search-bar',\n AREA_SELECTION_HEADER: 'area-selection-header',\n AREA_SELECTION_HEADER_COUNT_LABEL: 'area-selection-header-count-label',\n DRAG_AND_DROP_HANDLE_WRAPPER: 'drag-and-drop-handle-wrapper',\n DRAG_AND_DROP_HANDLE: 'drag-and-drop-handle',\n ARIA_LIVE_PANEL_CENTER: 'aria-live-panel-center',\n} as const;\n\nexport const SHUTTLE_IDS = {\n SOURCE_PANEL_SEARCH: 'ds-shuttle-v2-source-panel-search',\n DESTINATION_PANEL_SEARCH: 'ds-shuttle-v2-destination-panel-search',\n} as const;\n\nexport const DSShuttleV2DataTestIds = slotObjectToDataTestIds(DSShuttleV2Name, DSShuttleV2Slots);\n\nexport const REGIONS_FOCUSES = {\n SOURCE_HEADER: 'source-header',\n SOURCE_PANEL: 'source-panel',\n SOURCE_PANEL_ITEM: 'source-panel-item',\n SOURCE_PANEL_ITEM_MOVE_ALL: 'source-panel-move-all',\n SOURCE_BOTTOM: 'source-bottom',\n DESTINATION_HEADER: 'destination-header',\n DESTINATION_PANEL: 'destination-panel',\n DESTINATION_PANEL_ITEM: 'destination-panel-item',\n DESTINATION_PANEL_ITEM_MOVE_ALL: 'destination-panel-move-all',\n DESTINATION_BOTTOM: 'destination-bottom',\n RESET: '',\n} as const;\n\nexport const ACTIONS_FOCUSES = {\n MOVE_BTN: 'move-btn',\n DRILLDOWN_BTN: 'drilldown-btn',\n DRAG_N_DROP: 'drag-n-drop',\n PARENT: 'parent',\n RESET: '',\n} as const;\n\nexport const ITEMS_FOCUSES = {\n LOAD_MORE_BTN_SOURCE: 'load-more-btn-source',\n LOAD_MORE_BTN_DESTINATION: 'load-more-btn-destination',\n GET_SPECIFIC_ITEM: ({ hydratedId }: { hydratedId: string }) => hydratedId,\n RESET: '',\n} as const;\n\nexport const DATA_TESTID = {\n SHUTTLE_DRAG_HANDLE: 'shuttle-drag-handle',\n} as const;\n\nexport const DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n} as const;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kBAAkB;AAExB,MAAM,mBAAmB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A2B;AAAA,EAC3B,mBAAmB,CAAC,EAAE,WAAW,MAA8B;AAAA,EAC/D,OAAO;AACT;AAEO,MAAM,cAAc;AAAA,EACzB,qBAAqB;AACvB;AAEO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { GripperVertical } from "@elliemae/ds-icons";
|
|
|
5
5
|
import { mergeRefs, styled } from "@elliemae/ds-system";
|
|
6
6
|
import React2 from "react";
|
|
7
7
|
import { usePropsStore } from "../../config/useStore/useStore.js";
|
|
8
|
-
import { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots
|
|
8
|
+
import { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots } from "../../constants/index.js";
|
|
9
9
|
const StyledGripperButtonOrOverlay = styled("div", {
|
|
10
10
|
name: DSShuttleV2Name,
|
|
11
11
|
slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE
|
|
@@ -19,8 +19,13 @@ const StyledGripperButtonOrOverlay = styled("div", {
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
touch-action: none;
|
|
22
|
+
display: flex;
|
|
23
|
+
min-width: 24px;
|
|
24
|
+
justify-content: center;
|
|
22
25
|
&:focus {
|
|
23
|
-
|
|
26
|
+
.em-ds-icon {
|
|
27
|
+
outline: 2px solid brand-700;
|
|
28
|
+
}
|
|
24
29
|
}
|
|
25
30
|
`;
|
|
26
31
|
const StyledGripperWrapper = styled("div", {
|
|
@@ -29,11 +34,7 @@ const StyledGripperWrapper = styled("div", {
|
|
|
29
34
|
})`
|
|
30
35
|
display: flex;
|
|
31
36
|
height: 100%;
|
|
32
|
-
min-width: 24px;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
padding-left: ${ITEM_SELECTION_WIDTH}px;
|
|
35
37
|
position: relative;
|
|
36
|
-
left: -${ITEM_SELECTION_WIDTH}px;
|
|
37
38
|
`;
|
|
38
39
|
const DragHandle = (props) => {
|
|
39
40
|
const { id, isDndActive, isDragging, disabled = false, innerRef, useSortableHelpers, ariaLabelledby } = props;
|
|
@@ -67,7 +68,7 @@ const DragHandle = (props) => {
|
|
|
67
68
|
getOwnerProps,
|
|
68
69
|
getOwnerPropsArguments
|
|
69
70
|
},
|
|
70
|
-
/* @__PURE__ */ jsx(GripperVertical, {
|
|
71
|
+
/* @__PURE__ */ jsx(GripperVertical, { color: isDragging || disabled ? ["neutral", "500"] : ["brand-primary", "800"] })
|
|
71
72
|
)
|
|
72
73
|
}
|
|
73
74
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Dnd/DndHandle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { mergeRefs, styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { usePropsStore } from '../../config/useStore/useStore.js';\nimport { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { mergeRefs, styled } from '@elliemae/ds-system';\nimport React from 'react';\nimport { usePropsStore } from '../../config/useStore/useStore.js';\nimport { DATA_TESTID, DSShuttleV2Name, DSShuttleV2Slots } from '../../constants/index.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\nexport const StyledGripperButtonOrOverlay = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE,\n})<{\n isActive: boolean;\n isDragOverlay?: boolean;\n disabled?: boolean;\n}>`\n cursor: ${({ isActive, isDragOverlay, disabled }) => {\n if (isActive || isDragOverlay) return 'grabbing';\n if (disabled) return 'not-allowed';\n return 'grab';\n }};\n outline: none;\n display: flex;\n align-items: center;\n touch-action: none;\n display: flex;\n min-width: 24px;\n justify-content: center;\n &:focus {\n .em-ds-icon {\n outline: 2px solid brand-700;\n }\n }\n`;\n\nexport const StyledGripperWrapper = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.DRAG_AND_DROP_HANDLE_WRAPPER,\n})`\n display: flex;\n height: 100%;\n position: relative;\n`;\n\nexport const DragHandle: React.ComponentType<DSShuttleV2T.DragHandleArguments> = (props) => {\n const { id, isDndActive, isDragging, disabled = false, innerRef, useSortableHelpers, ariaLabelledby } = props;\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => props, [props]);\n\n // Interacting with the drag handle must not bubble up to the row's onClick (selectItem) /\n // onMouseDown handlers \u2014 grabbing the handle should not toggle item selection.\n const stopPropagation = React.useCallback((event: React.SyntheticEvent) => {\n event.stopPropagation();\n }, []);\n\n return (\n <StyledGripperWrapper\n onClick={stopPropagation}\n onMouseDown={stopPropagation}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledGripperButtonOrOverlay\n {...(!disabled && useSortableHelpers\n ? {\n ...useSortableHelpers.listeners,\n ...useSortableHelpers.attributes,\n }\n : {})}\n aria-labelledby={ariaLabelledby}\n isActive={isDndActive}\n innerRef={mergeRefs(innerRef, useSortableHelpers?.setActivatorNodeRef)}\n tabIndex={-1}\n data-testid={DATA_TESTID.SHUTTLE_DRAG_HANDLE}\n id={`${id}-drag-handle`}\n key={`${id}-drag-handle`}\n disabled={disabled}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <GripperVertical color={isDragging || disabled ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledGripperButtonOrOverlay>\n </StyledGripperWrapper>\n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;AAAA,UACV,eAAa,YAAY;AAAA,UACzB,IAAI,GAAG,EAAE;AAAA,UACT,KAAK,GAAG,EAAE;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA;AAAA,QAEA,oBAAC,mBAAgB,OAAO,cAAc,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA,MAClG;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@ const DragOverlay = ({ id, isDragging, isDndActive }) => /* @__PURE__ */ jsx(
|
|
|
11
11
|
tabIndex: -1,
|
|
12
12
|
"data-testid": DATA_TESTID.SHUTTLE_DRAG_HANDLE,
|
|
13
13
|
id: `${id}-drag-overlay`,
|
|
14
|
-
children: /* @__PURE__ */ jsx(GripperVertical, {
|
|
14
|
+
children: /* @__PURE__ */ jsx(GripperVertical, { color: isDragging ? ["neutral", "500"] : ["brand-primary", "800"] })
|
|
15
15
|
},
|
|
16
16
|
`${id}-drag-overlay`
|
|
17
17
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Dnd/DragOverlay.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { DATA_TESTID } from '../../constants/index.js';\nimport { StyledGripperButtonOrOverlay } from './DndHandle.js';\n\nexport const DragOverlay: React.ComponentType<{\n id: string;\n isDndActive: boolean;\n isDragging: boolean;\n}> = ({ id, isDragging, isDndActive }) => (\n <StyledGripperButtonOrOverlay\n isDragOverlay\n isActive={isDndActive}\n tabIndex={-1}\n data-testid={DATA_TESTID.SHUTTLE_DRAG_HANDLE}\n id={`${id}-drag-overlay`}\n key={`${id}-drag-overlay`}\n >\n <GripperVertical
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACkBnB;AAjBJ,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oCAAoC;AAEtC,MAAM,cAIR,CAAC,EAAE,IAAI,YAAY,YAAY,MAClC;AAAA,EAAC;AAAA;AAAA,IACC,eAAa;AAAA,IACb,UAAU;AAAA,IACV,UAAU;AAAA,IACV,eAAa,YAAY;AAAA,IACzB,IAAI,GAAG,EAAE;AAAA,IAGT,8BAAC,mBAAgB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { DATA_TESTID } from '../../constants/index.js';\nimport { StyledGripperButtonOrOverlay } from './DndHandle.js';\n\nexport const DragOverlay: React.ComponentType<{\n id: string;\n isDndActive: boolean;\n isDragging: boolean;\n}> = ({ id, isDragging, isDndActive }) => (\n <StyledGripperButtonOrOverlay\n isDragOverlay\n isActive={isDndActive}\n tabIndex={-1}\n data-testid={DATA_TESTID.SHUTTLE_DRAG_HANDLE}\n id={`${id}-drag-overlay`}\n key={`${id}-drag-overlay`}\n >\n <GripperVertical color={isDragging ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledGripperButtonOrOverlay>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkBnB;AAjBJ,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oCAAoC;AAEtC,MAAM,cAIR,CAAC,EAAE,IAAI,YAAY,YAAY,MAClC;AAAA,EAAC;AAAA;AAAA,IACC,eAAa;AAAA,IACb,UAAU;AAAA,IACV,UAAU;AAAA,IACV,eAAa,YAAY;AAAA,IACzB,IAAI,GAAG,EAAE;AAAA,IAGT,8BAAC,mBAAgB,OAAO,aAAa,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,EAF/E,GAAG,EAAE;AAGZ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,14 +6,11 @@ import { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from "@
|
|
|
6
6
|
import { createPortal } from "react-dom";
|
|
7
7
|
import { useInternalStore, usePropsStore } from "../../config/useStore/index.js";
|
|
8
8
|
import { ItemOverlay } from "../Item/ItemOverlay.js";
|
|
9
|
-
const
|
|
9
|
+
const DnDRowContext = ({ Component, ...props }) => {
|
|
10
10
|
const { isDestinationPanel } = props;
|
|
11
11
|
const itemList = usePropsStore(
|
|
12
12
|
(state) => isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData
|
|
13
13
|
);
|
|
14
|
-
const withDragNDrop = usePropsStore(
|
|
15
|
-
(state) => isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource
|
|
16
|
-
);
|
|
17
14
|
const theme = useContext(ThemeContext);
|
|
18
15
|
const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);
|
|
19
16
|
const dndDraggingItemMeta = useInternalStore((state) => state.dndDraggingItemMeta);
|
|
@@ -37,7 +34,6 @@ const withConditionalDnDRowContext = (Component) => (props) => {
|
|
|
37
34
|
);
|
|
38
35
|
const treeConfig = React2.useMemo(() => {
|
|
39
36
|
const configuredItemList = itemList.map((item, i) => ({
|
|
40
|
-
// dnd
|
|
41
37
|
uid: item.hydratedId,
|
|
42
38
|
depth: 0,
|
|
43
39
|
parentId: null,
|
|
@@ -78,15 +74,21 @@ const withConditionalDnDRowContext = (Component) => (props) => {
|
|
|
78
74
|
setLastActiveId,
|
|
79
75
|
setOverId
|
|
80
76
|
]);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
77
|
+
return /* @__PURE__ */ jsx(DndContext, { ...dndContextProps, children: /* @__PURE__ */ jsxs(SortableContext, { ...containerSortableContextProps, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Component, { ...props }),
|
|
79
|
+
createPortal(
|
|
80
|
+
/* @__PURE__ */ jsx(DragOverlay, { style: { width: "auto" }, zIndex: theme.zIndex.tooltip, children: dndDraggingItemMeta ? /* @__PURE__ */ jsx(ItemOverlay, { ...dndDraggingItemMeta }) : null }),
|
|
81
|
+
document.body
|
|
82
|
+
)
|
|
83
|
+
] }) });
|
|
84
|
+
};
|
|
85
|
+
const withConditionalDnDRowContext = (Component) => (props) => {
|
|
86
|
+
const { isDestinationPanel } = props;
|
|
87
|
+
const withDragNDrop = usePropsStore(
|
|
88
|
+
(state) => isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource
|
|
89
|
+
);
|
|
90
|
+
if (!withDragNDrop) return /* @__PURE__ */ jsx(Component, { ...props });
|
|
91
|
+
return /* @__PURE__ */ jsx(DnDRowContext, { Component, ...props });
|
|
90
92
|
};
|
|
91
93
|
export {
|
|
92
94
|
withConditionalDnDRowContext
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/HoC/withConditionalDnDRowContext.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-statements */\n/* eslint-disable max-params */\n/* eslint-disable react/function-component-definition */\nimport React, { useCallback, useContext, useEffect } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { ThemeContext } from '@xstyled/styled-components';\nimport type { DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from '@elliemae/ds-drag-and-drop';\nimport { createPortal } from 'react-dom';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport type { DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { ItemOverlay } from '../Item/ItemOverlay.js';\n\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-statements */\n/* eslint-disable max-params */\n/* eslint-disable react/function-component-definition */\nimport React, { useCallback, useContext, useEffect } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { ThemeContext } from '@xstyled/styled-components';\nimport type { DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from '@elliemae/ds-drag-and-drop';\nimport { createPortal } from 'react-dom';\nimport { useInternalStore, usePropsStore } from '../../config/useStore/index.js';\nimport type { DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { ItemOverlay } from '../Item/ItemOverlay.js';\n\ntype HoCConfig = DSShuttleV2T.PanelMetaInfo;\ntype InternalHoCStates = {\n activeId?: DSShuttleV2T.HydratedId;\n overId?: DSShuttleV2T.HydratedId;\n isDropValid?: boolean;\n};\ntype ResultComponentProps = DSShuttleV2T.PanelMetaInfo & InternalHoCStates;\n\ntype DnDRowContextProps = DSShuttleV2T.PanelMetaInfo & {\n Component: React.ComponentType<ResultComponentProps>;\n};\n\n// Only mounts when DnD is enabled \u2014 all DnD machinery is paid here and nowhere else\nconst DnDRowContext = ({ Component, ...props }: DnDRowContextProps) => {\n const { isDestinationPanel } = props;\n const itemList = usePropsStore((state) =>\n isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData,\n );\n\n const theme = useContext(ThemeContext);\n\n const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);\n const dndDraggingItemMeta = useInternalStore((state) => state.dndDraggingItemMeta);\n const setOverId = useInternalStore((state) => state.setOverId);\n const setIsDropValid = useInternalStore((state) => state.setIsDropValid);\n const setDndDraggingItem = useInternalStore((state) => state.setDndDraggingItem);\n const setLastActiveId = useInternalStore((state) => state.setLastActiveId);\n const setDropIndicatorPosition = useInternalStore((state) => state.setDropIndicatorPosition);\n\n const onItemsReorder = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationReorder : state.onSourceReorder,\n );\n\n const onReorder: DnDKitTree.OnReorder<DSShuttleV2T.ConfiguredDatum> = useCallback(\n (dndActive, targetIndex, metadata) => {\n // eslint-disable-next-line no-unused-vars\n const { considerExpanding, over: dndOver, ...dndData } = metadata;\n const over = dndOver.original.original;\n const active = dndActive.original.original;\n const cleanedMetaData = { ...dndData, over, active, targetIndex };\n onItemsReorder(active, cleanedMetaData);\n },\n [onItemsReorder],\n );\n\n const treeConfig = React.useMemo(() => {\n const configuredItemList = itemList.map((item, i) => ({\n uid: item.hydratedId,\n depth: 0,\n parentId: null,\n realIndex: i,\n childrenCount: 0,\n original: item,\n subitems: [],\n index: i,\n }));\n return {\n flattenedItems: configuredItemList,\n isHorizontalDnD: false,\n isExpandable: false,\n onReorder,\n maxDragAndDropLevel: 0,\n getIsDropValid: () => true,\n };\n }, [itemList, onReorder]);\n\n const { dndContextProps, sortableContextProps, activeItem, active, over, dropIndicatorPosition, isDropValid } =\n useTreeDndkitConfig(treeConfig);\n\n const containerSortableContextProps = sortableContextProps.root;\n\n useEffect(() => {\n setLastActiveId(active?.id?.toString() ?? '');\n setOverId(over?.id?.toString() ?? '');\n setIsDropValid(isDropValid);\n setDndDraggingItem(activeItem?.original ?? null);\n setDropIndicatorPosition(dropIndicatorPosition);\n if (!active) setDndDraggingItemMeta(null);\n }, [\n active,\n activeItem,\n dropIndicatorPosition,\n isDropValid,\n over,\n setDndDraggingItem,\n setDndDraggingItemMeta,\n setDropIndicatorPosition,\n setIsDropValid,\n setLastActiveId,\n setOverId,\n ]);\n\n return (\n <DndContext {...dndContextProps}>\n <SortableContext {...containerSortableContextProps}>\n <Component {...props} />\n {createPortal(\n <DragOverlay style={{ width: 'auto' }} zIndex={theme.zIndex.tooltip}>\n {dndDraggingItemMeta ? <ItemOverlay {...dndDraggingItemMeta} /> : null}\n </DragOverlay>,\n document.body,\n )}\n </SortableContext>\n </DndContext>\n );\n};\n\n// only wraps in \"DnDContext\" and \"DnDTreeContext\" if any Drag and Drop functionality is requested\nexport const withConditionalDnDRowContext: TypescriptHelpersT.ReactFunctionalHOCWithDifferentInterface<\n HoCConfig,\n ResultComponentProps\n> = (Component) => (props) => {\n const { isDestinationPanel } = props;\n const withDragNDrop = usePropsStore((state) =>\n isDestinationPanel ? !state.removeDragAndDropFromDestination : state.addDragAndDropFromSource,\n );\n\n if (!withDragNDrop) return <Component {...props} />;\n return <DnDRowContext Component={Component} {...props} />;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4GjB,SACE,KADF;AAxGN,OAAOA,UAAS,aAAa,YAAY,iBAAiB;AAE1D,SAAS,oBAAoB;AAE7B,SAAS,YAAY,aAAa,iBAAiB,2BAA2B;AAC9E,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,qBAAqB;AAEhD,SAAS,mBAAmB;AAe5B,MAAM,gBAAgB,CAAC,EAAE,WAAW,GAAG,MAAM,MAA0B;AACrE,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,WAAW;AAAA,IAAc,CAAC,UAC9B,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AAEA,QAAM,QAAQ,WAAW,YAAY;AAErC,QAAM,yBAAyB,iBAAiB,CAAC,UAAU,MAAM,sBAAsB;AACvF,QAAM,sBAAsB,iBAAiB,CAAC,UAAU,MAAM,mBAAmB;AACjF,QAAM,YAAY,iBAAiB,CAAC,UAAU,MAAM,SAAS;AAC7D,QAAM,iBAAiB,iBAAiB,CAAC,UAAU,MAAM,cAAc;AACvE,QAAM,qBAAqB,iBAAiB,CAAC,UAAU,MAAM,kBAAkB;AAC/E,QAAM,kBAAkB,iBAAiB,CAAC,UAAU,MAAM,eAAe;AACzE,QAAM,2BAA2B,iBAAiB,CAAC,UAAU,MAAM,wBAAwB;AAE3F,QAAM,iBAAiB;AAAA,IAAc,CAAC,UACpC,qBAAqB,MAAM,uBAAuB,MAAM;AAAA,EAC1D;AAEA,QAAM,YA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