@elliemae/ds-shuttle-v2 3.14.2 → 3.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cjs/config/useAutoCalculated/useDataStructure.js +25 -6
  2. package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
  3. package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js +4 -4
  4. package/dist/cjs/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
  5. package/dist/cjs/config/useStore/focusAndTabIndexManager.js.map +1 -1
  6. package/dist/cjs/config/useStore/useStore.js.map +2 -2
  7. package/dist/cjs/parts/Item/Item.js +6 -2
  8. package/dist/cjs/parts/Item/Item.js.map +2 -2
  9. package/dist/cjs/parts/Item/ItemActions/ItemActions.js +3 -3
  10. package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
  11. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +3 -4
  12. package/dist/cjs/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
  13. package/dist/cjs/react-desc-prop-types.js +52 -2
  14. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  15. package/dist/esm/config/useAutoCalculated/useDataStructure.js +25 -6
  16. package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
  17. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js +4 -4
  18. package/dist/esm/config/useFocusTracker/useFocusActionTrackers.js.map +2 -2
  19. package/dist/esm/config/useStore/focusAndTabIndexManager.js.map +1 -1
  20. package/dist/esm/config/useStore/useStore.js.map +2 -2
  21. package/dist/esm/parts/Item/Item.js +6 -2
  22. package/dist/esm/parts/Item/Item.js.map +2 -2
  23. package/dist/esm/parts/Item/ItemActions/ItemActions.js +3 -3
  24. package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
  25. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js +3 -4
  26. package/dist/esm/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.js.map +2 -2
  27. package/dist/esm/react-desc-prop-types.js +52 -2
  28. package/dist/esm/react-desc-prop-types.js.map +2 -2
  29. package/dist/types/config/useFocusTracker/useFocusActionTrackers.d.ts +2 -2
  30. package/dist/types/config/useFocusTracker/useFocusTracker.d.ts +2 -2
  31. package/dist/types/config/useStore/focusAndTabIndexManager.d.ts +5 -5
  32. package/dist/types/config/useStore/useStore.d.ts +12 -13
  33. package/dist/types/parts/Item/ItemActions/useActionsHandlers.d.ts +2 -2
  34. package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +1 -1
  35. package/dist/types/react-desc-prop-types.d.ts +35 -4
  36. package/package.json +15 -15
  37. package/dist/cjs/config/useStore/types.js +0 -24
  38. package/dist/cjs/config/useStore/types.js.map +0 -7
  39. package/dist/esm/config/useStore/types.js +0 -2
  40. package/dist/esm/config/useStore/types.js.map +0 -7
  41. package/dist/types/config/useStore/types.d.ts +0 -28
@@ -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 { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type useSortable, type DnDKitTree } from '@elliemae/ds-drag-and-drop';\n\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection: boolean };\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 };\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 // =============================================================================\n // Hydratables section\n // Component-less\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n preventMove?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section\n // Component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps>;\n };\n // =============================================================================\n // Hydratables section\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = Hydraters<PrimaryKeyHydratables, [Datum]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata = Omit<DnDKitTree.OnReorder<DSShuttleV2T.Datum>, 'considerExpanding'>;\n type OnReorderEvent = (movedItem: Datum, metadata: OnReorderEventMetadata) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<unknown>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<unknown>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps {\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\n // switch side\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n\n export interface OptionalProps extends OptionalDatumHydraters {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n\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\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n sourceSelectedItems: PropTypes.object.description('hello!').isRequired,\n onSourceSelectionChange: PropTypes.func.description('hello!').isRequired,\n SourceHeader: PropTypes.node.description('hello!').isRequired,\n onSourceDrilldown: PropTypes.func.description('hello!').isRequired,\n\n destinationData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n destinationSelectedItems: PropTypes.object.description('hello!').isRequired,\n onDestinationSelectionChange: PropTypes.func.description('hello!').isRequired,\n DestinationHeader: PropTypes.node.description('hello!').isRequired,\n onDestinationDrilldown: PropTypes.func.description('hello!').isRequired,\n\n getId: PropTypes.func.description('hello!').isRequired,\n getLabel: PropTypes.func.description('hello!').isRequired,\n};\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as WeakValidationMap<DSShuttleV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,0BAAuE;AAyOhE,MAAM,eAA0C;AAAA,EACrD,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA,EAElC,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;AAClC;AAEA,MAAM,uBAA8D;AAAA,EAClE,GAAG;AAAA,EACH,GAAG;AAAA,EAEH,YAAY,8BAAU,QAAQ,8BAAU,MAAM,EAAE,YAAY,QAAQ,EAAE;AAAA,EACtE,qBAAqB,8BAAU,OAAO,YAAY,QAAQ,EAAE;AAAA,EAC5D,yBAAyB,8BAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EAC9D,cAAc,8BAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EACnD,mBAAmB,8BAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EAExD,iBAAiB,8BAAU,QAAQ,8BAAU,MAAM,EAAE,YAAY,QAAQ,EAAE;AAAA,EAC3E,0BAA0B,8BAAU,OAAO,YAAY,QAAQ,EAAE;AAAA,EACjE,8BAA8B,8BAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EACnE,mBAAmB,8BAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EACxD,wBAAwB,8BAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EAE7D,OAAO,8BAAU,KAAK,YAAY,QAAQ,EAAE;AAAA,EAC5C,UAAU,8BAAU,KAAK,YAAY,QAAQ,EAAE;AACjD;AACO,MAAM,6BAA6B;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSButtonT } from '@elliemae/ds-button-v2';\nimport { type useSortable, type DnDKitTree } from '@elliemae/ds-drag-and-drop';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\n\nimport type { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from './constants';\nimport type { useAutoCalculated } from './config/useAutoCalculated';\n\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection: boolean };\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 // =============================================================================\n // Hydratables section\n // Component-less\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\n // Component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps>;\n };\n // =============================================================================\n // Hydratables section\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = Hydraters<PrimaryKeyHydratables, [Datum]>;\n export type FunctionalHydraters = Hydraters<FunctionalHydratables, [Datum]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & FunctionalHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent = (\n items: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata = Omit<DnDKitTree.OnReorder<DSShuttleV2T.Datum>, 'considerExpanding'>;\n type OnReorderEvent = (movedItem: Datum, metadata: OnReorderEventMetadata) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n type OnSelectionDrilldown = (\n item: Datum,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string | null,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Zustand Store\n // =============================================================================\n export type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];\n export type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;\n export type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusItem: FocusItem;\n focusItemAction: FocusItemAction;\n shouldFocusItemOnRender: boolean;\n dropIndicatorPosition: number;\n overId: string;\n dndDraggingItem: ConfiguredDatum | null;\n dndDraggingItemMeta: ItemMeta | null;\n lastActiveId: string;\n isDropValid: boolean;\n sourcePanelLastSelectedItem: string | null | undefined;\n destinationPanelLastSelectedItem: string | null | undefined;\n };\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n export type Selectors = {\n getIsDragAndDropHappening: () => boolean;\n getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;\n };\n export type Reducers = Record<string, never>;\n export type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<unknown>;\n onSourceDrilldown: OnSelectionDrilldown;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<unknown>;\n onDestinationDrilldown: OnSelectionDrilldown;\n }\n\n export interface DefaultProps extends Required<FunctionalHydraters> {\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n\n // switch side\n onSourceAdd: OnChangeEvent;\n onSourceRemove: OnChangeEvent;\n onDestinationAdd: OnChangeEvent;\n onDestinationRemove: OnChangeEvent;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n\n export interface OptionalProps extends OptionalDatumHydraters {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n\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 ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n sourceSelectedItems: PropTypes.object.description('hello!').isRequired,\n onSourceSelectionChange: PropTypes.func.description('hello!').isRequired,\n SourceHeader: PropTypes.node.description('hello!').isRequired,\n onSourceDrilldown: PropTypes.func.description('hello!').isRequired,\n\n destinationData: PropTypes.arrayOf(PropTypes.object).description('hello!').isRequired,\n destinationSelectedItems: PropTypes.object.description('hello!').isRequired,\n onDestinationSelectionChange: PropTypes.func.description('hello!').isRequired,\n DestinationHeader: PropTypes.node.description('hello!').isRequired,\n onDestinationDrilldown: PropTypes.func.description('hello!').isRequired,\n\n getId: PropTypes.func.description('hello!').isRequired,\n getLabel: PropTypes.func.description('hello!').isRequired,\n\n sourceIsLoading: PropTypes.bool.description('hello!').defaultValue(false),\n destinationIsLoading: PropTypes.bool.description('hello!').defaultValue(false),\n sourceWithLoadMore: PropTypes.bool.description('hello!').defaultValue(false),\n destinationWithLoadMore: PropTypes.bool.description('hello!').defaultValue(false),\n sourceIsLoadingMore: PropTypes.bool.description('hello!').defaultValue(false),\n destinationIsLoadingMore: PropTypes.bool.description('hello!').defaultValue(false),\n onSourceLoadMore: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationLoadMore: PropTypes.func.description('hello!').defaultValue(() => {}),\n onSourceAdd: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationAdd: PropTypes.func.description('hello!').defaultValue(() => {}),\n onSourceRemove: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationRemove: PropTypes.func.description('hello!').defaultValue(() => {}),\n onSourceReorder: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationReorder: PropTypes.func.description('hello!').defaultValue(() => {}),\n sourceSoftDeletedItems: PropTypes.object.description('hello!').defaultValue({}),\n onSourceSoftDelete: PropTypes.func.description('hello!').defaultValue(() => {}),\n destinationSoftDeletedItems: PropTypes.object.description('hello!').defaultValue({}),\n onDestinationSoftDelete: PropTypes.func.description('hello!').defaultValue(() => {}),\n getPreventMove: PropTypes.func.description('hello!').defaultValue(() => false),\n\n addDragAndDropFromSource: PropTypes.bool.description('hello!').defaultValue(false),\n removeDragAndDropFromDestination: PropTypes.bool.description('hello!').defaultValue(false),\n\n sourceItemProps: PropTypes.object.description('hello!').defaultValue({}),\n destinationItemProps: PropTypes.object.description('hello!').defaultValue({}),\n\n sourceShowSearchbar: PropTypes.bool.description('hello!').defaultValue(false),\n destinationShowSearchbar: PropTypes.bool.description('hello!').defaultValue(false),\n onSourceOpenSearchbar: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDesinationOpenSearchbar: PropTypes.func.description('hello!').defaultValue(() => {}),\n sourceFilterValue: PropTypes.string.description('hello!').defaultValue(''),\n destinationFilterValue: PropTypes.string.description('hello!').defaultValue(''),\n onSourceFilterChange: PropTypes.func.description('hello!').defaultValue(() => {}),\n onDestinationFilterChange: PropTypes.func.description('hello!').defaultValue(() => {}),\n\n getSubtitle: PropTypes.func.description('hello!').defaultValue(() => ''),\n getIcon: PropTypes.func.description('hello!').defaultValue(() => ''),\n getPreventDrilldown: PropTypes.func.description('hello!').defaultValue(() => false),\n\n getCustomRenderer: PropTypes.func.description('hello!').defaultValue(() => undefined),\n};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as WeakValidationMap<DSShuttleV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,0BAAuE;AA6QhE,MAAM,eAA0C;AAAA,EACrD,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA,EAElC,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,EAEhC,gBAAgB,MAAM;AACxB;AAEA,MAAM,uBAA8D;AAAA,EAClE,GAAG;AAAA,EACH,GAAG;AAAA,EAEH,YAAY,8BAAU,QAAQ,8BAAU,MAAM,EAAE,YAAY,QAAQ,EAAE;AAAA,EACtE,q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U,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACjF,2BAA2B,8BAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACrF,mBAAmB,8BAAU,OAAO,YAAY,QAAQ,EAAE,aAAa,EAAE;AAAA,EACzE,wBAAwB,8BAAU,OAAO,YAAY,QAAQ,EAAE,aAAa,EAAE;AAAA,EAC9E,sBAAsB,8BAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAChF,2BAA2B,8BAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAErF,aAAa,8BAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,EAAE;AAAA,EACvE,SAAS,8BAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,EAAE;AAAA,EACnE,qBAAqB,8BAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,KAAK;AAAA,EAElF,mBAAmB,8BAAU,KAAK,YAAY,QAAQ,EAAE,aAAa,MAAM,MAAS;AACtF;AAEO,MAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -4,7 +4,8 @@ const configureDestination = ({
4
4
  destinationData,
5
5
  destinationSelectedItems,
6
6
  destinationSoftDeletedItems,
7
- getId
7
+ getId,
8
+ getPreventMove
8
9
  }) => {
9
10
  const destinationSelectedItemsMap = {};
10
11
  const destinationSelectionArray = [];
@@ -14,6 +15,7 @@ const configureDestination = ({
14
15
  const destinationSelectionableData = [];
15
16
  destinationData.forEach((datum, i) => {
16
17
  const hydratedId = getId(datum);
18
+ const hydratedPreventMove = getPreventMove?.(datum) ?? false;
17
19
  let isSelected = false;
18
20
  if (destinationSelectedItems[hydratedId] === true) {
19
21
  destinationSelectionItemArray.push(datum);
@@ -27,6 +29,7 @@ const configureDestination = ({
27
29
  destinationSelectedItemsMap[hydratedId] = { datum, index: i };
28
30
  const configuredItem = {
29
31
  hydratedId,
32
+ hydratedPreventMove,
30
33
  isSelected,
31
34
  softDeleted,
32
35
  original: datum,
@@ -35,7 +38,7 @@ const configureDestination = ({
35
38
  isLast: i === destinationData.length - 1
36
39
  };
37
40
  destinationConfiguredData.push(configuredItem);
38
- if (!datum.preventMove) {
41
+ if (!hydratedPreventMove && !softDeleted) {
39
42
  destinationSelectionableData.push(configuredItem);
40
43
  destinationSelectionableDataIds.push(`${hydratedId}`);
41
44
  }
@@ -53,7 +56,13 @@ const configureDestination = ({
53
56
  destinationSelectionableIds
54
57
  };
55
58
  };
56
- const configureSource = ({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }) => {
59
+ const configureSource = ({
60
+ sourceData,
61
+ sourceSelectedItems,
62
+ sourceSoftDeletedItems,
63
+ getId,
64
+ getPreventMove
65
+ }) => {
57
66
  const sourceSelectedItemsMap = {};
58
67
  const sourceSelectionArray = [];
59
68
  const sourceSelectionableDataIds = [];
@@ -62,6 +71,7 @@ const configureSource = ({ sourceData, sourceSelectedItems, sourceSoftDeletedIte
62
71
  const sourceSelectionableData = [];
63
72
  sourceData.forEach((datum, i) => {
64
73
  const hydratedId = getId(datum);
74
+ const hydratedPreventMove = getPreventMove?.(datum) ?? false;
65
75
  let isSelected = false;
66
76
  if (sourceSelectedItems[hydratedId] === true) {
67
77
  sourceSelectionItemArray.push(datum);
@@ -75,6 +85,7 @@ const configureSource = ({ sourceData, sourceSelectedItems, sourceSoftDeletedIte
75
85
  sourceSelectedItemsMap[hydratedId] = { datum, index: i };
76
86
  const configuredItem = {
77
87
  hydratedId,
88
+ hydratedPreventMove,
78
89
  isSelected,
79
90
  softDeleted,
80
91
  original: datum,
@@ -83,7 +94,7 @@ const configureSource = ({ sourceData, sourceSelectedItems, sourceSoftDeletedIte
83
94
  isLast: i === sourceData.length - 1
84
95
  };
85
96
  sourceConfiguredData.push(configuredItem);
86
- if (!datum.preventMove) {
97
+ if (!hydratedPreventMove && !softDeleted) {
87
98
  sourceSelectionableData.push(configuredItem);
88
99
  sourceSelectionableDataIds.push(`${hydratedId}`);
89
100
  }
@@ -108,19 +119,27 @@ const useDataStructure = (propsFromUser) => {
108
119
  destinationData,
109
120
  destinationSelectedItems,
110
121
  getId,
122
+ getPreventMove,
111
123
  sourceSoftDeletedItems,
112
124
  destinationSoftDeletedItems
113
125
  } = propsFromUser;
114
126
  return useMemo(
115
127
  () => ({
116
- ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }),
117
- ...configureDestination({ destinationData, destinationSelectedItems, destinationSoftDeletedItems, getId })
128
+ ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId, getPreventMove }),
129
+ ...configureDestination({
130
+ destinationData,
131
+ destinationSelectedItems,
132
+ destinationSoftDeletedItems,
133
+ getId,
134
+ getPreventMove
135
+ })
118
136
  }),
119
137
  [
120
138
  sourceData,
121
139
  sourceSelectedItems,
122
140
  sourceSoftDeletedItems,
123
141
  getId,
142
+ getPreventMove,
124
143
  destinationData,
125
144
  destinationSelectedItems,
126
145
  destinationSoftDeletedItems
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useAutoCalculated/useDataStructure.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// import { useRef } from 'react';\n// import { useVirtual } from 'react-virtual';\nimport { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!datum.preventMove) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n};\n\nconst configureSource = ({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!datum.preventMove) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = (propsFromUser: DSShuttleV2T.InternalProps) => {\n const {\n sourceData,\n sourceSelectedItems,\n destinationData,\n destinationSelectedItems,\n getId,\n sourceSoftDeletedItems,\n destinationSoftDeletedItems,\n } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId }),\n ...configureDestination({ destinationData, destinationSelectedItems, destinationSoftDeletedItems, getId }),\n }),\n [\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n ],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,eAAe;AASxB,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAkC;AAChC,QAAM,8BAA4F,CAAC;AACnG,QAAM,4BAAwE,CAAC;AAC/E,QAAM,kCAA8E,CAAC;AAErF,QAAM,gCAAsD,CAAC;AAC7D,QAAM,4BAA4D,CAAC;AACnE,QAAM,+BAA+D,CAAC;AAEtE,kBAAgB,QAAQ,CAAC,OAAO,MAAM;AACpC,UAAM,aAAa,MAAM,KAAK;AAC9B,QAAI,aAAa;AACjB,QAAI,yBAAyB,gBAAgB,MAAM;AACjD,oCAA8B,KAAK,KAAK;AACxC,gCAA0B,KAAK,UAAU;AACzC,mBAAa;AAAA,IACf;AACA,QAAI,cAAc;AAClB,QAAI,4BAA4B,gBAAgB,MAAM;AACpD,oBAAc;AAAA,IAChB;AACA,gCAA4B,cAAc,EAAE,OAAO,OAAO,EAAE;AAC5D,UAAM,iBAAiB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,SAAS,MAAM;AAAA,MACf,QAAQ,MAAM,gBAAgB,SAAS;AAAA,IACzC;AACA,8BAA0B,KAAK,cAAc;AAC7C,QAAI,CAAC,MAAM,aAAa;AACtB,mCAA6B,KAAK,cAAc;AAChD,sCAAgC,KAAK,GAAG,YAAY;AAAA,IACtD;AAAA,EACF,CAAC;AACD,QAAM,sCAAsC,0BAA0B,UAAU;AAChF,QAAM,8BAA8B,gCAAgC,KAAK,GAAG;AAE5E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAQA,MAAM,kBAAkB,CAAC,EAAE,YAAY,qBAAqB,w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CAAC;AAAA,MACrF,GAAG,qBAAqB,EAAE,iBAAiB,0BAA0B,6BAA6B,MAAM,CAAC;AAAA,IAC3G;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// import { useRef } from 'react';\n// import { useVirtual } from 'react-virtual';\nimport { useMemo } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\n\ntype ConfigureDestinationConfig = {\n destinationData: DSShuttleV2T.Datum[];\n destinationSelectedItems: DSShuttleV2T.SelectionMap;\n destinationSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\nconst configureDestination = ({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureDestinationConfig) => {\n const destinationSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const destinationSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const destinationSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const destinationSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const destinationConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const destinationSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n\n destinationData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum) ?? false;\n let isSelected = false;\n if (destinationSelectedItems[hydratedId] === true) {\n destinationSelectionItemArray.push(datum);\n destinationSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (destinationSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n destinationSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === destinationData.length - 1,\n } as const;\n destinationConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n destinationSelectionableData.push(configuredItem);\n destinationSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const destinationHasMultipleSelectedItems = destinationSelectionArray.length >= 1;\n const destinationSelectionableIds = destinationSelectionableDataIds.join(' ');\n\n return {\n destinationSelectedItemsMap,\n destinationSelectionItemArray,\n destinationSelectionArray,\n destinationHasMultipleSelectedItems,\n destinationConfiguredData,\n destinationSelectionableData,\n destinationSelectionableDataIds,\n destinationSelectionableIds,\n };\n};\ntype ConfigureSourceConfig = {\n sourceData: DSShuttleV2T.Datum[];\n sourceSelectedItems: DSShuttleV2T.SelectionMap;\n sourceSoftDeletedItems: DSShuttleV2T.SoftDeletedMap;\n getId: DSShuttleV2T.PrimaryKeyHydraters['getId'];\n getPreventMove: DSShuttleV2T.FunctionalHydraters['getPreventMove'];\n};\n\nconst configureSource = ({\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n}: ConfigureSourceConfig) => {\n const sourceSelectedItemsMap: Record<string, { datum: DSShuttleV2T.Datum; index: number }> = {};\n const sourceSelectionArray: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n const sourceSelectionableDataIds: DSShuttleV2T.PrimaryKeyHydratables['id'][] = [];\n\n const sourceSelectionItemArray: DSShuttleV2T.Datum[] = [];\n const sourceConfiguredData: DSShuttleV2T.ConfiguredDatum[] = [];\n const sourceSelectionableData: DSShuttleV2T.ConfiguredDatum[] = [];\n sourceData.forEach((datum, i) => {\n const hydratedId = getId(datum);\n const hydratedPreventMove = getPreventMove?.(datum) ?? false;\n let isSelected = false;\n if (sourceSelectedItems[hydratedId] === true) {\n sourceSelectionItemArray.push(datum);\n sourceSelectionArray.push(hydratedId);\n isSelected = true;\n }\n let softDeleted = false;\n if (sourceSoftDeletedItems[hydratedId] === true) {\n softDeleted = true;\n }\n\n sourceSelectedItemsMap[hydratedId] = { datum, index: i };\n const configuredItem = {\n hydratedId,\n hydratedPreventMove,\n isSelected,\n softDeleted,\n original: datum,\n localIndex: i,\n isFirst: i === 0,\n isLast: i === sourceData.length - 1,\n } as const;\n sourceConfiguredData.push(configuredItem);\n if (!hydratedPreventMove && !softDeleted) {\n sourceSelectionableData.push(configuredItem);\n sourceSelectionableDataIds.push(`${hydratedId}`);\n }\n });\n const sourceHasMultipleSelectedItems = sourceSelectionArray.length >= 1;\n const sourceSelectionableIds = sourceSelectionableDataIds.join(' ');\n return {\n sourceConfiguredData,\n sourceSelectedItemsMap,\n sourceSelectionItemArray,\n sourceSelectionArray,\n sourceHasMultipleSelectedItems,\n sourceSelectionableData,\n sourceSelectionableDataIds,\n sourceSelectionableIds,\n };\n};\n\nexport const useDataStructure = (propsFromUser: DSShuttleV2T.InternalProps) => {\n const {\n sourceData,\n sourceSelectedItems,\n destinationData,\n destinationSelectedItems,\n getId,\n getPreventMove,\n sourceSoftDeletedItems,\n destinationSoftDeletedItems,\n } = propsFromUser;\n return useMemo(\n () => ({\n ...configureSource({ sourceData, sourceSelectedItems, sourceSoftDeletedItems, getId, getPreventMove }),\n ...configureDestination({\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n getId,\n getPreventMove,\n }),\n }),\n [\n sourceData,\n sourceSelectedItems,\n sourceSoftDeletedItems,\n getId,\n getPreventMove,\n destinationData,\n destinationSelectedItems,\n destinationSoftDeletedItems,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,eAAe;AAUxB,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAkC;AAChC,QAAM,8BAA4F,CAAC;AACnG,QAAM,4BAAwE,CAAC;AAC/E,QAAM,kCAA8E,CAAC;AAErF,QAAM,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MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -75,8 +75,8 @@ const useFocusActionTrackers = () => {
75
75
  const removeDragAndDropFromDestination = usePropsStore((state) => state.removeDragAndDropFromDestination);
76
76
  const addDragAndDropFromSource = usePropsStore((state) => state.addDragAndDropFromSource);
77
77
  const trackFocusPrevAction = useCallback(
78
- ({ isDestinationPanel, datumHydratables }) => {
79
- const preventMove = Boolean(datumHydratables.preventMove);
78
+ ({ isDestinationPanel, datumHydratables, datumInternalMeta: { hydratedPreventMove } }) => {
79
+ const preventMove = Boolean(hydratedPreventMove);
80
80
  const preventDrilldown = Boolean(datumHydratables.preventDrilldown);
81
81
  const withDragAndDrop = isDestinationPanel && !removeDragAndDropFromDestination || !isDestinationPanel && addDragAndDropFromSource;
82
82
  const { prevAction } = getActionByProxymity({
@@ -88,8 +88,8 @@ const useFocusActionTrackers = () => {
88
88
  [addDragAndDropFromSource, getFocusItemAction, removeDragAndDropFromDestination, setFocusItemAction]
89
89
  );
90
90
  const trackFocusNextAction = useCallback(
91
- ({ isDestinationPanel, datumHydratables }) => {
92
- const preventMove = Boolean(datumHydratables.preventMove);
91
+ ({ isDestinationPanel, datumHydratables, datumInternalMeta: { hydratedPreventMove } }) => {
92
+ const preventMove = Boolean(hydratedPreventMove);
93
93
  const preventDrilldown = Boolean(datumHydratables.preventDrilldown);
94
94
  const withDragAndDrop = isDestinationPanel && !removeDragAndDropFromDestination || !isDestinationPanel && addDragAndDropFromSource;
95
95
  const { nextAction } = getActionByProxymity({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useFocusTracker/useFocusActionTrackers.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo, useCallback } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { ACTIONS_FOCUSES } from '../../constants';\nimport { useInternalStore, usePropsStore } from '../useStore';\n\ntype ActionFlags = {\n preventDrilldown: boolean;\n withDragAndDrop: boolean;\n preventMove: boolean;\n};\ntype ActionByProxymity = {\n prevAction: (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n nextAction: (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n};\nconst getMoveBtnActionByProxymity = (flags: ActionFlags) => {\n // move button\n const { preventDrilldown, withDragAndDrop } = flags;\n const actionMap = { prevAction: '', nextAction: '' } as ActionByProxymity;\n // prev\n // drilldown if it exist\n // else drag n drop if it exist\n // else parent\n if (!preventDrilldown) actionMap.prevAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else if (withDragAndDrop) actionMap.prevAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.prevAction = ACTIONS_FOCUSES.PARENT;\n // next\n // drag n drop if it exist\n // else parent\n if (withDragAndDrop) actionMap.nextAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.nextAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getDragAndDropBtnActionByProxymity = (flags: ActionFlags) => {\n // Drag and drop handler\n const { preventMove, preventDrilldown } = flags;\n // next\n // always parent\n const actionMap = { prevAction: '', nextAction: ACTIONS_FOCUSES.PARENT } as ActionByProxymity;\n // prev\n // move if it exist\n // else drilldown if it exist\n // else parent\n if (!preventMove) actionMap.prevAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (!preventDrilldown) actionMap.prevAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else actionMap.prevAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getDrilldownBtnActionByProxymity = (flags: ActionFlags) => {\n // Drilldown handler\n const { withDragAndDrop, preventMove } = flags;\n // prev\n // always parent\n const actionMap = { prevAction: ACTIONS_FOCUSES.PARENT, nextAction: '' } as ActionByProxymity;\n // next\n // move if it exist\n // else drag n drop if it exist\n // else parent\n if (!preventMove) actionMap.nextAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (withDragAndDrop) actionMap.nextAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.nextAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getParenBtnActionByProxymity = (flags: ActionFlags) => {\n // Parent handler\n const { preventDrilldown, withDragAndDrop, preventMove } = flags;\n const actionMap = { prevAction: '', nextAction: '' } as ActionByProxymity;\n // prev\n // drag n drop if it exist\n // else move if it exist\n // else drilldown if it exist\n // else parent\n if (withDragAndDrop) actionMap.prevAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else if (!preventMove) actionMap.prevAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (!preventDrilldown) actionMap.prevAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else actionMap.prevAction = ACTIONS_FOCUSES.PARENT;\n // next\n // drilldown if it exist\n // else move if it exist\n // else drag n drop if it exist\n // else parent\n if (!preventDrilldown) actionMap.nextAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else if (!preventMove) actionMap.nextAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (withDragAndDrop) actionMap.nextAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.nextAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getActionByProxymity = ({ flags, currentAction }: { flags: ActionFlags; currentAction: string }) => {\n if (currentAction === ACTIONS_FOCUSES.MOVE_BTN) return getMoveBtnActionByProxymity(flags);\n if (currentAction === ACTIONS_FOCUSES.DRAG_N_DROP) return getDragAndDropBtnActionByProxymity(flags);\n if (currentAction === ACTIONS_FOCUSES.DRILLDOWN_BTN) return getDrilldownBtnActionByProxymity(flags);\n return getParenBtnActionByProxymity(flags);\n};\nexport const useFocusActionTrackers = () => {\n const getFocusItemAction = useInternalStore((state) => state.getFocusItemAction);\n const setFocusItemAction = useInternalStore((state) => state.setFocusItemAction);\n const removeDragAndDropFromDestination = usePropsStore((state) => state.removeDragAndDropFromDestination);\n const addDragAndDropFromSource = usePropsStore((state) => state.addDragAndDropFromSource);\n const trackFocusPrevAction = useCallback(\n ({ isDestinationPanel, datumHydratables }: DSShuttleV2T.ItemMeta) => {\n const preventMove = Boolean(datumHydratables.preventMove);\n const preventDrilldown = Boolean(datumHydratables.preventDrilldown);\n const withDragAndDrop =\n (isDestinationPanel && !removeDragAndDropFromDestination) || (!isDestinationPanel && addDragAndDropFromSource);\n const { prevAction } = getActionByProxymity({\n flags: { preventMove, preventDrilldown, withDragAndDrop },\n currentAction: getFocusItemAction(),\n });\n setFocusItemAction(prevAction);\n },\n [addDragAndDropFromSource, getFocusItemAction, removeDragAndDropFromDestination, setFocusItemAction],\n );\n const trackFocusNextAction = useCallback(\n ({ isDestinationPanel, datumHydratables }: DSShuttleV2T.ItemMeta) => {\n const preventMove = Boolean(datumHydratables.preventMove);\n const preventDrilldown = Boolean(datumHydratables.preventDrilldown);\n const withDragAndDrop =\n (isDestinationPanel && !removeDragAndDropFromDestination) || (!isDestinationPanel && addDragAndDropFromSource);\n const { nextAction } = getActionByProxymity({\n flags: { preventMove, preventDrilldown, withDragAndDrop },\n currentAction: getFocusItemAction(),\n });\n setFocusItemAction(nextAction);\n },\n [addDragAndDropFromSource, getFocusItemAction, removeDragAndDropFromDestination, setFocusItemAction],\n );\n return useMemo(\n () => ({\n trackFocusActionMove: () => setFocusItemAction('move-btn'),\n trackFocusActionDrilldown: () => setFocusItemAction('drilldown-btn'),\n trackFocusActionDragAndDrop: () => setFocusItemAction('drag-n-drop'),\n trackFocusActionParent: () => setFocusItemAction('parent'),\n trackFocusActionReset: () => setFocusItemAction(''),\n trackFocusPrevAction,\n trackFocusNextAction,\n }),\n [setFocusItemAction, trackFocusNextAction, trackFocusPrevAction],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,SAAS,mBAAmB;AAErC,S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,iBAAiB,gBAAgB;AAClE,YAAM,kBACH,sBAAsB,CAAC,oCAAsC,CAAC,sBAAsB;AACvF,YAAM,EAAE,WAAW,IAAI,qBAAqB;AAAA,QAC1C,OAAO,EAAE,aAAa,kBAAkB,gBAAgB;AAAA,QACxD,eAAe,mBAAmB;AAAA,MACpC,CAAC;AACD,yBAAmB,UAAU;AAAA,IAC/B;AAAA,IACA,CAAC,0BAA0B,oBAAoB,kCAAkC,kBAAkB;AAAA,EACrG;AACA,SAAO;AAAA,IACL,OAAO;AAAA,MACL,sBAAsB,MAAM,mBAAmB,UAAU;AAAA,MACzD,2BAA2B,MAAM,mBAAmB,eAAe;AAAA,MACnE,6BAA6B,MAAM,mBAAmB,aAAa;AAAA,MACnE,wBAAwB,MAAM,mBAAmB,QAAQ;AAAA,MACzD,uBAAuB,MAAM,mBAAmB,EAAE;AAAA,MAClD;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,oBAAoB,sBAAsB,oBAAoB;AAAA,EACjE;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo, useCallback } from 'react';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { ACTIONS_FOCUSES } from '../../constants';\nimport { useInternalStore, usePropsStore } from '../useStore';\n\ntype ActionFlags = {\n preventDrilldown: boolean;\n withDragAndDrop: boolean;\n preventMove: boolean;\n};\ntype ActionByProxymity = {\n prevAction: (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n nextAction: (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n};\nconst getMoveBtnActionByProxymity = (flags: ActionFlags) => {\n // move button\n const { preventDrilldown, withDragAndDrop } = flags;\n const actionMap = { prevAction: '', nextAction: '' } as ActionByProxymity;\n // prev\n // drilldown if it exist\n // else drag n drop if it exist\n // else parent\n if (!preventDrilldown) actionMap.prevAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else if (withDragAndDrop) actionMap.prevAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.prevAction = ACTIONS_FOCUSES.PARENT;\n // next\n // drag n drop if it exist\n // else parent\n if (withDragAndDrop) actionMap.nextAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.nextAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getDragAndDropBtnActionByProxymity = (flags: ActionFlags) => {\n // Drag and drop handler\n const { preventMove, preventDrilldown } = flags;\n // next\n // always parent\n const actionMap = { prevAction: '', nextAction: ACTIONS_FOCUSES.PARENT } as ActionByProxymity;\n // prev\n // move if it exist\n // else drilldown if it exist\n // else parent\n if (!preventMove) actionMap.prevAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (!preventDrilldown) actionMap.prevAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else actionMap.prevAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getDrilldownBtnActionByProxymity = (flags: ActionFlags) => {\n // Drilldown handler\n const { withDragAndDrop, preventMove } = flags;\n // prev\n // always parent\n const actionMap = { prevAction: ACTIONS_FOCUSES.PARENT, nextAction: '' } as ActionByProxymity;\n // next\n // move if it exist\n // else drag n drop if it exist\n // else parent\n if (!preventMove) actionMap.nextAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (withDragAndDrop) actionMap.nextAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.nextAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getParenBtnActionByProxymity = (flags: ActionFlags) => {\n // Parent handler\n const { preventDrilldown, withDragAndDrop, preventMove } = flags;\n const actionMap = { prevAction: '', nextAction: '' } as ActionByProxymity;\n // prev\n // drag n drop if it exist\n // else move if it exist\n // else drilldown if it exist\n // else parent\n if (withDragAndDrop) actionMap.prevAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else if (!preventMove) actionMap.prevAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (!preventDrilldown) actionMap.prevAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else actionMap.prevAction = ACTIONS_FOCUSES.PARENT;\n // next\n // drilldown if it exist\n // else move if it exist\n // else drag n drop if it exist\n // else parent\n if (!preventDrilldown) actionMap.nextAction = ACTIONS_FOCUSES.DRILLDOWN_BTN;\n else if (!preventMove) actionMap.nextAction = ACTIONS_FOCUSES.MOVE_BTN;\n else if (withDragAndDrop) actionMap.nextAction = ACTIONS_FOCUSES.DRAG_N_DROP;\n else actionMap.nextAction = ACTIONS_FOCUSES.PARENT;\n return actionMap;\n};\nconst getActionByProxymity = ({ flags, currentAction }: { flags: ActionFlags; currentAction: string }) => {\n if (currentAction === ACTIONS_FOCUSES.MOVE_BTN) return getMoveBtnActionByProxymity(flags);\n if (currentAction === ACTIONS_FOCUSES.DRAG_N_DROP) return getDragAndDropBtnActionByProxymity(flags);\n if (currentAction === ACTIONS_FOCUSES.DRILLDOWN_BTN) return getDrilldownBtnActionByProxymity(flags);\n return getParenBtnActionByProxymity(flags);\n};\nexport const useFocusActionTrackers = () => {\n const getFocusItemAction = useInternalStore((state) => state.getFocusItemAction);\n const setFocusItemAction = useInternalStore((state) => state.setFocusItemAction);\n const removeDragAndDropFromDestination = usePropsStore((state) => state.removeDragAndDropFromDestination);\n const addDragAndDropFromSource = usePropsStore((state) => state.addDragAndDropFromSource);\n const trackFocusPrevAction = useCallback(\n ({ isDestinationPanel, datumHydratables, datumInternalMeta: { hydratedPreventMove } }: DSShuttleV2T.ItemMeta) => {\n const preventMove = Boolean(hydratedPreventMove);\n const preventDrilldown = Boolean(datumHydratables.preventDrilldown);\n const withDragAndDrop =\n (isDestinationPanel && !removeDragAndDropFromDestination) || (!isDestinationPanel && addDragAndDropFromSource);\n const { prevAction } = getActionByProxymity({\n flags: { preventMove, preventDrilldown, withDragAndDrop },\n currentAction: getFocusItemAction(),\n });\n setFocusItemAction(prevAction);\n },\n [addDragAndDropFromSource, getFocusItemAction, removeDragAndDropFromDestination, setFocusItemAction],\n );\n const trackFocusNextAction = useCallback(\n ({ isDestinationPanel, datumHydratables, datumInternalMeta: { hydratedPreventMove } }: DSShuttleV2T.ItemMeta) => {\n const preventMove = Boolean(hydratedPreventMove);\n const preventDrilldown = Boolean(datumHydratables.preventDrilldown);\n const withDragAndDrop =\n (isDestinationPanel && !removeDragAndDropFromDestination) || (!isDestinationPanel && addDragAndDropFromSource);\n const { nextAction } = getActionByProxymity({\n flags: { preventMove, preventDrilldown, withDragAndDrop },\n currentAction: getFocusItemAction(),\n });\n setFocusItemAction(nextAction);\n },\n [addDragAndDropFromSource, getFocusItemAction, removeDragAndDropFromDestination, setFocusItemAction],\n );\n return useMemo(\n () => ({\n trackFocusActionMove: () => setFocusItemAction('move-btn'),\n trackFocusActionDrilldown: () => setFocusItemAction('drilldown-btn'),\n trackFocusActionDragAndDrop: () => setFocusItemAction('drag-n-drop'),\n trackFocusActionParent: () => setFocusItemAction('parent'),\n trackFocusActionReset: () => setFocusItemAction(''),\n trackFocusPrevAction,\n trackFocusNextAction,\n }),\n [setFocusItemAction, trackFocusNextAction, trackFocusPrevAction],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,SAAS,mBAAmB;AAErC,SAAS,uBAAuB;AAChC,SAAS,kBAAkB,qBAAqB;AAWhD,MAAM,8BAA8B,CAAC,UAAuB;AAE1D,QAAM,EAAE,kBAAkB,gBAAgB,IAAI;AAC9C,QAAM,YAAY,EAAE,YAAY,IAAI,YAAY,GAAG;AAKnD,MAAI,CAAC;AAAkB,cAAU,aAAa,gBAAgB;AAAA,WACrD;AAAiB,cAAU,aAAa,gBAAgB;AAAA;AAC5D,cAAU,aAAa,gBAAgB;AAI5C,MAAI;AAAiB,cAAU,aAAa,gBAAgB;AAAA;AACvD,cAAU,aAAa,gBAAgB;AAC5C,SAAO;AACT;AACA,MAAM,qCAAqC,CAAC,UAAuB;AAEjE,QAAM,EAAE,aAAa,iBAAiB,IAAI;AAG1C,QAAM,YAAY,EAAE,YA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MAAM,mBAAmB,aAAa;AAAA,MACnE,wBAAwB,MAAM,mBAAmB,QAAQ;AAAA,MACzD,uBAAuB,MAAM,mBAAmB,EAAE;AAAA,MAClD;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,oBAAoB,sBAAsB,oBAAoB;AAAA,EACjE;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useStore/focusAndTabIndexManager.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { ITEMS_FOCUSES, REGIONS_FOCUSES } from '../../constants';\nimport type { FocusItem, FocusItemAction, FocusRegion, InternalAtoms, Reducers, Selectors } from './types';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\n\ntype State = readonly [\n FocusRegion,\n FocusItem,\n FocusItemAction,\n () => ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>,\n];\n\nconst getElementFromState = (state: State) => {\n const [focusRegion, focusItem, focusItemAction, get] = state;\n\n const { getZustandRef } = get();\n\n if (\n focusItem === ITEMS_FOCUSES.LOAD_MORE_BTN_SOURCE &&\n (focusRegion === REGIONS_FOCUSES.SOURCE_BOTTOM || focusRegion === REGIONS_FOCUSES.SOURCE_PANEL_ITEM)\n ) {\n return getZustandRef([focusItem]);\n }\n if (\n focusItem === ITEMS_FOCUSES.LOAD_MORE_BTN_DESTINATION &&\n (focusRegion === REGIONS_FOCUSES.DESTINATION_BOTTOM || focusRegion === REGIONS_FOCUSES.DESTINATION_PANEL_ITEM)\n ) {\n return getZustandRef([focusItem]);\n }\n\n return getZustandRef([focusRegion, focusItem, focusItemAction]);\n};\n\nconst isItem = (state: State) =>\n state[2] === 'parent' &&\n state[1] !== ITEMS_FOCUSES.LOAD_MORE_BTN_SOURCE &&\n state[1] !== ITEMS_FOCUSES.LOAD_MORE_BTN_DESTINATION;\n\nconst isMove = (state: State) => state[2] === 'move-btn';\n\nconst isDrilldown = (state: State) => state[2] === 'drilldown-btn';\n\nconst shouldApplyRovingTabIndex = (state: State) => isItem(state) || isMove(state) || isDrilldown(state);\n\nconst tabIndexManager = ({\n selectedState,\n previousSelectedState,\n currentFocusedItem,\n nextFocusedItem,\n}: {\n selectedState: State;\n previousSelectedState: State;\n currentFocusedItem: HTMLElement | null;\n nextFocusedItem: HTMLElement | null;\n}) => {\n if (currentFocusedItem && shouldApplyRovingTabIndex(previousSelectedState)) {\n currentFocusedItem.tabIndex = -1;\n }\n\n if (nextFocusedItem && shouldApplyRovingTabIndex(selectedState)) {\n nextFocusedItem.tabIndex = 0;\n }\n};\n\nexport const focusAndTabIndexManager = (selectedState: State, previousSelectedState: State) => {\n const currentFocusedItem = getElementFromState(previousSelectedState);\n const nextFocusedItem = getElementFromState(selectedState);\n\n const get = selectedState[3];\n const { setShouldFocusItemOnRender } = get();\n\n tabIndexManager({ selectedState, previousSelectedState, currentFocusedItem, nextFocusedItem });\n\n if (isItem(selectedState)) {\n // The item on `nextFocusItem` could be an old virtualized item.\n // If this is the case, we should focus it on render too just in case\n setShouldFocusItemOnRender(true); // we will reset this flag inside the ref callback of the item\n } else {\n setShouldFocusItemOnRender(false);\n }\n\n nextFocusedItem?.focus();\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { ITEMS_FOCUSES, REGIONS_FOCUSES } from '../../constants';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\n\ntype State = readonly [\n DSShuttleV2T.FocusRegion,\n DSShuttleV2T.FocusItem,\n DSShuttleV2T.FocusItemAction,\n () => ZustandT.InternalStore<DSShuttleV2T.InternalAtoms, DSShuttleV2T.Selectors, DSShuttleV2T.Reducers>,\n];\n\nconst getElementFromState = (state: State) => {\n const [focusRegion, focusItem, focusItemAction, get] = state;\n\n const { getZustandRef } = get();\n\n if (\n focusItem === ITEMS_FOCUSES.LOAD_MORE_BTN_SOURCE &&\n (focusRegion === REGIONS_FOCUSES.SOURCE_BOTTOM || focusRegion === REGIONS_FOCUSES.SOURCE_PANEL_ITEM)\n ) {\n return getZustandRef([focusItem]);\n }\n if (\n focusItem === ITEMS_FOCUSES.LOAD_MORE_BTN_DESTINATION &&\n (focusRegion === REGIONS_FOCUSES.DESTINATION_BOTTOM || focusRegion === REGIONS_FOCUSES.DESTINATION_PANEL_ITEM)\n ) {\n return getZustandRef([focusItem]);\n }\n\n return getZustandRef([focusRegion, focusItem, focusItemAction]);\n};\n\nconst isItem = (state: State) =>\n state[2] === 'parent' &&\n state[1] !== ITEMS_FOCUSES.LOAD_MORE_BTN_SOURCE &&\n state[1] !== ITEMS_FOCUSES.LOAD_MORE_BTN_DESTINATION;\n\nconst isMove = (state: State) => state[2] === 'move-btn';\n\nconst isDrilldown = (state: State) => state[2] === 'drilldown-btn';\n\nconst shouldApplyRovingTabIndex = (state: State) => isItem(state) || isMove(state) || isDrilldown(state);\n\nconst tabIndexManager = ({\n selectedState,\n previousSelectedState,\n currentFocusedItem,\n nextFocusedItem,\n}: {\n selectedState: State;\n previousSelectedState: State;\n currentFocusedItem: HTMLElement | null;\n nextFocusedItem: HTMLElement | null;\n}) => {\n if (currentFocusedItem && shouldApplyRovingTabIndex(previousSelectedState)) {\n currentFocusedItem.tabIndex = -1;\n }\n\n if (nextFocusedItem && shouldApplyRovingTabIndex(selectedState)) {\n nextFocusedItem.tabIndex = 0;\n }\n};\n\nexport const focusAndTabIndexManager = (selectedState: State, previousSelectedState: State) => {\n const currentFocusedItem = getElementFromState(previousSelectedState);\n const nextFocusedItem = getElementFromState(selectedState);\n\n const get = selectedState[3];\n const { setShouldFocusItemOnRender } = get();\n\n tabIndexManager({ selectedState, previousSelectedState, currentFocusedItem, nextFocusedItem });\n\n if (isItem(selectedState)) {\n // The item on `nextFocusItem` could be an old virtualized item.\n // If this is the case, we should focus it on render too just in case\n setShouldFocusItemOnRender(true); // we will reset this flag inside the ref callback of the item\n } else {\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E3C,kBAAgB,EAAE,eAAe,uBAAuB,oBAAoB,gBAAgB,CAAC;AAE7F,MAAI,OAAO,aAAa,GAAG;AAGzB,+BAA2B,IAAI;AAAA,EACjC,OAAO;AACL,+BAA2B,KAAK;AAAA,EAClC;AAEA,mBAAiB,MAAM;AACzB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/config/useStore/useStore.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInternalAndPropsContext, type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport deepequal from 'fast-deep-equal/react';\nimport { defaultProps, type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from '../../constants';\nimport { useAutoCalculated } from '../useAutoCalculated';\nimport type { InternalAtoms, ShuttleInternalStore, Selectors, Reducers, UseAutoCalculatedT } from './types';\nimport { focusAndTabIndexManager } from './focusAndTabIndexManager';\n\nconst internalAtomDefaultValues: InternalAtoms = {\n focusRegion: REGIONS_FOCUSES.RESET,\n focusItem: ITEMS_FOCUSES.RESET,\n focusItemAction: ACTIONS_FOCUSES.RESET,\n shouldFocusItemOnRender: false,\n dropIndicatorPosition: 0,\n overId: '',\n lastActiveId: '',\n dndDraggingItem: null,\n dndDraggingItemMeta: null,\n isDropValid: false,\n sourcePanelLastSelectedItem: null,\n destinationPanelLastSelectedItem: null,\n};\n\nconst selectors: ZustandT.SelectorObject<ShuttleInternalStore, Selectors> = (get) => ({\n getIsDragAndDropHappening: () => Boolean(get()?.lastActiveId) && get()?.lastActiveId !== '',\n getPanelLastSelectedItem: (isDestinationPanel: boolean) =>\n isDestinationPanel ? get()?.destinationPanelLastSelectedItem : get()?.sourcePanelLastSelectedItem,\n});\n\nconst reducers: ZustandT.ReducerObject<ShuttleInternalStore, Reducers> = () => ({});\n\nconst subscribers: ZustandT.Subscribers<ShuttleInternalStore> = (api) => {\n api.subscribe(\n (state) => [state.focusRegion, state.focusItem, state.focusItemAction, state.get] as const,\n focusAndTabIndexManager,\n {\n equalityFn: deepequal,\n },\n );\n};\n\nexport const { PropsProvider, usePropsStore, InternalProvider, useInternalStore } = createInternalAndPropsContext<\n DSShuttleV2T.InternalProps,\n InternalAtoms,\n UseAutoCalculatedT,\n Selectors,\n Reducers\n>();\n\nexport const config = {\n defaultProps: defaultProps as DSShuttleV2T.InternalProps,\n internalAtomDefaultValues: internalAtomDefaultValues,\n useAutoCalculated,\n selectors,\n reducers,\n subscribers,\n PropsProvider,\n usePropsStore,\n InternalProvider,\n useInternalStore,\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qCAAoD;AAC7D,OAAO,eAAe;AACtB,SAAS,oBAAuC;AAChD,SAAS,iBAAiB,iBAAiB,qBAAqB;AAChE,SAAS,yBAAyB;AAElC,SAAS,+BAA+B;AAExC,MAAM,4BAA2C;AAAA,EAC/C,aAAa,gBAAgB;AAAA,EAC7B,WAAW,cAAc;AAAA,EACzB,iBAAiB,gBAAgB;AAAA,EACjC,yBAAyB;AAAA,EACzB,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,aAAa;AAAA,EACb,6BAA6B;AAAA,EAC7B,kCAAkC;AACpC;AAEA,MAAM,YAAsE,CAAC,SAAS;AAAA,EACpF,2BAA2B,MAAM,QAAQ,IAAI,GAAG,YAAY,KAAK,IAAI,GAAG,iBAAiB;AAAA,EACzF,0BAA0B,CAAC,uBACzB,qBAAqB,IAAI,GAAG,mCAAmC,IAAI,GAAG;AAC1E;AAEA,MAAM,WAAmE,OAAO,CAAC;AAEjF,MAAM,cAA0D,CAAC,QAAQ;AACvE,MAAI;AAAA,IACF,CAAC,UAAU,CAAC,MAAM,aAAa,MAAM,WAAW,MAAM,iBAAiB,MAAM,GAAG;AAAA,IAChF;AAAA,IACA;AAAA,MACE,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAEO,MAAM,EAAE,eAAe,eAAe,kBAAkB,iBAAiB,IAAI,8BAMlF;AAEK,MAAM,SAAS;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInternalAndPropsContext, type ZustandT } from '@elliemae/ds-zustand-helpers';\nimport deepequal from 'fast-deep-equal/react';\nimport { defaultProps, type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { REGIONS_FOCUSES, ACTIONS_FOCUSES, ITEMS_FOCUSES } from '../../constants';\nimport { useAutoCalculated } from '../useAutoCalculated';\nimport { focusAndTabIndexManager } from './focusAndTabIndexManager';\n\nconst internalAtomDefaultValues: DSShuttleV2T.InternalAtoms = {\n focusRegion: REGIONS_FOCUSES.RESET,\n focusItem: ITEMS_FOCUSES.RESET,\n focusItemAction: ACTIONS_FOCUSES.RESET,\n shouldFocusItemOnRender: false,\n dropIndicatorPosition: 0,\n overId: '',\n lastActiveId: '',\n dndDraggingItem: null,\n dndDraggingItemMeta: null,\n isDropValid: false,\n sourcePanelLastSelectedItem: null,\n destinationPanelLastSelectedItem: null,\n};\n\nconst selectors: ZustandT.SelectorObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Selectors> = (get) => ({\n getIsDragAndDropHappening: () => Boolean(get()?.lastActiveId) && get()?.lastActiveId !== '',\n getPanelLastSelectedItem: (isDestinationPanel: boolean) =>\n isDestinationPanel ? get()?.destinationPanelLastSelectedItem : get()?.sourcePanelLastSelectedItem,\n});\n\nconst reducers: ZustandT.ReducerObject<DSShuttleV2T.ShuttleInternalStore, DSShuttleV2T.Reducers> = () => ({});\n\nconst subscribers: ZustandT.Subscribers<DSShuttleV2T.ShuttleInternalStore> = (api) => {\n api.subscribe(\n (state) => [state.focusRegion, state.focusItem, state.focusItemAction, state.get] as const,\n focusAndTabIndexManager,\n {\n equalityFn: deepequal,\n },\n );\n};\n\nexport const { PropsProvider, usePropsStore, InternalProvider, useInternalStore } = createInternalAndPropsContext<\n DSShuttleV2T.InternalProps,\n DSShuttleV2T.InternalAtoms,\n DSShuttleV2T.UseAutoCalculatedT,\n DSShuttleV2T.Selectors,\n DSShuttleV2T.Reducers\n>();\n\nexport const config = {\n defaultProps: defaultProps as DSShuttleV2T.InternalProps,\n internalAtomDefaultValues: internalAtomDefaultValues,\n useAutoCalculated,\n selectors,\n reducers,\n subscribers,\n PropsProvider,\n usePropsStore,\n InternalProvider,\n useInternalStore,\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qCAAoD;AAC7D,OAAO,eAAe;AACtB,SAAS,oBAAuC;AAChD,SAAS,iBAAiB,iBAAiB,qBAAqB;AAChE,SAAS,yBAAyB;AAClC,SAAS,+BAA+B;AAExC,MAAM,4BAAwD;AAAA,EAC5D,aAAa,gBAAgB;AAAA,EAC7B,WAAW,cAAc;AAAA,EACzB,iBAAiB,gBAAgB;AAAA,EACjC,yBAAyB;AAAA,EACzB,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,aAAa;AAAA,EACb,6BAA6B;AAAA,EAC7B,kCAAkC;AACpC;AAEA,MAAM,YAAgG,CAAC,SAAS;AAAA,EAC9G,2BAA2B,MAAM,QAAQ,IAAI,GAAG,YAAY,KAAK,IAAI,GAAG,iBAAiB;AAAA,EACzF,0BAA0B,CAAC,uBACzB,qBAAqB,IAAI,GAAG,mCAAmC,IAAI,GAAG;AAC1E;AAEA,MAAM,WAA6F,OAAO,CAAC;AAE3G,MAAM,cAAuE,CAAC,QAAQ;AACpF,MAAI;AAAA,IACF,CAAC,UAAU,CAAC,MAAM,aAAa,MAAM,WAAW,MAAM,iBAAiB,MAAM,GAAG;AAAA,IAChF;AAAA,IACA;AAAA,MACE,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAEO,MAAM,EAAE,eAAe,eAAe,kBAAkB,iBAAiB,IAAI,8BAMlF;AAEK,MAAM,SAAS;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
@@ -93,9 +93,13 @@ const Item = React2.memo((itemMeta) => {
93
93
  const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);
94
94
  React2.useEffect(() => {
95
95
  if (isDraggingThisItem) {
96
- setDndDraggingItemMeta(itemMeta);
96
+ setDndDraggingItemMeta((prevItemMeta) => {
97
+ if (prevItemMeta?.datumInternalMeta.hydratedId === hydratedId)
98
+ return prevItemMeta;
99
+ return itemMeta;
100
+ });
97
101
  }
98
- }, [isDraggingThisItem, itemMeta, setDndDraggingItemMeta]);
102
+ }, [hydratedId, isDraggingThisItem, itemMeta, setDndDraggingItemMeta]);
99
103
  const { selectItem, onShiftMouseDownPreventTextSelection } = useSelectionLogic(itemMeta);
100
104
  const { onItemContainerKeyDown } = useItemArrowNavigation(itemMeta);
101
105
  const { onItemKeyDownSelection } = useItemKeyboardSelection(itemMeta);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Item/Item.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport React, { useMemo } from 'react';\nimport { styled, css } from '@elliemae/ds-system';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\n\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions';\nimport { useInternalStore } from '../../config/useStore';\nimport { ItemSelection } from './ItemSelection';\nimport { ItemActions } from './ItemActions';\nimport { ItemMiddleSection } from './ItemMiddleSection';\nimport { useSelectionLogic } from './useSelectionLogic';\nimport { useItemArrowNavigation } from './useItemArrowNavigation';\nimport { REGIONS_FOCUSES } from '../../constants';\nimport { DragHandle } from '../Dnd/DndHandle';\nimport { DropIndicator } from '../Dnd/DropIndicator';\nimport { withConditionalUseSortable } from '../HoC/withConditionalUseSortable';\nimport { useInnerRefHandlers as useInnerRefActionHandlers } from './ItemActions/useInnerRefHandlers';\nimport { useItemKeyboardSelection } from './useItemKeyboardSelection';\n// we are using the class-name added via slot for the children `:hover` styling of icon colors\n\nconst cssDisabled = css`\n background-color: ${({ theme }) => theme.colors.neutral['100']};\n color: ${({ theme }) => theme.colors.neutral['300']};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: ${({ theme }) => theme.colors.neutral['300']};\n }\n`;\n\ninterface ItemWrapperT {\n isDragging: boolean;\n isDndActive: boolean;\n}\n\nconst ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_WRAPPER })<ItemWrapperT>`\n min-height: 2.769rem;\n position: relative;\n background-color: white;\n &:hover {\n background-color: ${({ isDndActive, theme }) => (!isDndActive ? theme.colors.brand['200'] : 'white')};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: brand-700;\n }\n ${({ isDragging }) => isDragging && cssDisabled}\n }\n\n &:focus {\n outline: 2px solid brand-700;\n outline-offset: -2px;\n }\n border-bottom: 1px solid neutral-100;\n\n ${({ isDragging }) => isDragging && cssDisabled}\n`;\n\nconst useInnerRefHandlers = ({ datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const { hydratedId } = datumInternalMeta;\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const getShouldFocusItemOnRender = useInternalStore((state) => state.getShouldFocusItemOnRender);\n const setShouldFocusItemOnRender = useInternalStore((state) => state.setShouldFocusItemOnRender);\n const getFocusRegion = useInternalStore((state) => state.getFocusRegion);\n const getFocusItem = useInternalStore((state) => state.getFocusItem);\n const getFocusItemAction = useInternalStore((state) => state.getFocusItemAction);\n\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;\n const currItemId = hydratedId;\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement | null) => {\n setZustandRef([currRegion, currItemId, 'parent'], node);\n\n // This is the only place we should do this check + focus\n // See focusAndTabIndexManager for more info -- TLDR: virtualization + focus is a pain\n const shouldThisItemHaveFocus =\n currRegion === getFocusRegion() && currItemId === getFocusItem() && 'parent' === getFocusItemAction();\n\n if (getShouldFocusItemOnRender() && shouldThisItemHaveFocus && node) {\n node?.focus();\n setShouldFocusItemOnRender(false);\n }\n },\n [\n currItemId,\n currRegion,\n getFocusItem,\n getFocusItemAction,\n getFocusRegion,\n getShouldFocusItemOnRender,\n setShouldFocusItemOnRender,\n setZustandRef,\n ],\n );\n return React.useMemo(() => ({ innerRefHandlerParentItem }), [innerRefHandlerParentItem]);\n};\n\nexport const Item = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta, withDragNDrop, useSortableHelpers, hasMultipleSelection } = itemMeta;\n const { isSelected, hydratedId } = datumInternalMeta;\n\n const cols = useMemo(() => {\n if (withDragNDrop) return ['5px', 'auto', '1fr', 'auto'];\n return ['5px', '1fr', 'auto'];\n }, [withDragNDrop]);\n\n const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);\n React.useEffect(() => {\n if (isDraggingThisItem) {\n setDndDraggingItemMeta(itemMeta);\n }\n }, [isDraggingThisItem, itemMeta, setDndDraggingItemMeta]);\n\n const { selectItem, onShiftMouseDownPreventTextSelection } = useSelectionLogic(itemMeta);\n const { onItemContainerKeyDown } = useItemArrowNavigation(itemMeta);\n const { onItemKeyDownSelection } = useItemKeyboardSelection(itemMeta);\n\n const handleItemKeyDown: React.KeyboardEventHandler<HTMLDivElement> = React.useCallback(\n (event) => {\n onItemKeyDownSelection(event);\n onItemContainerKeyDown(event);\n },\n [onItemKeyDownSelection, onItemContainerKeyDown],\n );\n const { innerRefHandlerParentItem } = useInnerRefHandlers(itemMeta);\n const { innerRefHandlerDnd } = useInnerRefActionHandlers(itemMeta);\n const overId = useInternalStore((state) => state.overId);\n const isDropValid = useInternalStore((state) => state.isDropValid);\n const dropIndicatorPosition = useInternalStore((state) => state.dropIndicatorPosition);\n\n const showDropIndicatorPosition = hydratedId === overId && dropIndicatorPosition;\n const sortableRef = useSortableHelpers?.setNodeRef ?? (() => {});\n return (\n <ItemWrapper\n isDragging={isDraggingThisItem}\n isDndActive={getIsDragAndDropHappening()}\n cols={cols}\n alignItems=\"center\"\n onClick={selectItem}\n ref={mergeRefs(innerRefHandlerParentItem, sortableRef)}\n onKeyDown={handleItemKeyDown}\n onMouseDown={onShiftMouseDownPreventTextSelection}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n role=\"option\"\n aria-checked={isSelected}\n id={`${hydratedId}-wrapper`}\n >\n <ItemSelection {...itemMeta} />\n {withDragNDrop && useSortableHelpers ? (\n <DragHandle\n id={hydratedId}\n useSortableHelpers={useSortableHelpers}\n isDndActive={getIsDragAndDropHappening()}\n isDragging={isDraggingThisItem}\n innerRef={innerRefHandlerDnd}\n disabled={hasMultipleSelection}\n />\n ) : null}\n <ItemMiddleSection {...itemMeta} />\n <ItemActions {...itemMeta} />\n <DropIndicator vertical={false} dropIndicatorPosition={showDropIndicatorPosition} isDropValid={isDropValid} />\n </ItemWrapper>\n );\n});\n\nconst ItemSortable = withConditionalUseSortable(Item);\nexport { ItemSortable };\nexport default ItemSortable;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC2InB,SAcE,KAdF;AA1IJ,OAAOA,UAAS,eAAe;AAC/B,SAAS,QAAQ,WAAW;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAGrB,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,yBAAyB;AAClC,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAC3C,SAAS,uBAAuB,iCAAiC;AACjE,SAAS,gCAAgC;AAGzC,MAAM,cAAc;AAAA,sBACE,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA,WAC/C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,YAInC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAShD,MAAM,cAAc,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKvE,CAAC,EAAE,aAAa,MAAM,MAAO,CAAC,cAAc,MAAM,OAAO,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAM1F,CAAC,EAAE,WAAW,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASpC,CAAC,EAAE,WAAW,MAAM,cAAc;AAAA;AAGtC,MAAM,sBAAsB,CAAC,EAAE,mBAAmB,mBAAmB,MAA6B;AAChG,QAAM,EAAE,WAAW,IAAI;AACvB,QAAM,gBAAgB,iBAAiB,CAAC,U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;AAAA,YACJ;AAAA,YACA,aAAa,0BAA0B;AAAA,YACvC,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA;AAAA,QACZ,IACE;AAAA,QACJ,oBAAC,qBAAmB,GAAG,UAAU;AAAA,QACjC,oBAAC,eAAa,GAAG,UAAU;AAAA,QAC3B,oBAAC,iBAAc,UAAU,OAAO,uBAAuB,2BAA2B,aAA0B;AAAA;AAAA;AAAA,EAC9G;AAEJ,CAAC;AAED,MAAM,eAAe,2BAA2B,IAAI;AAEpD,IAAO,eAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport React, { useMemo } from 'react';\nimport { styled, css } from '@elliemae/ds-system';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\n\nimport { type DSShuttleV2T } from '../../react-desc-prop-types';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions';\nimport { useInternalStore } from '../../config/useStore';\nimport { ItemSelection } from './ItemSelection';\nimport { ItemActions } from './ItemActions';\nimport { ItemMiddleSection } from './ItemMiddleSection';\nimport { useSelectionLogic } from './useSelectionLogic';\nimport { useItemArrowNavigation } from './useItemArrowNavigation';\nimport { REGIONS_FOCUSES } from '../../constants';\nimport { DragHandle } from '../Dnd/DndHandle';\nimport { DropIndicator } from '../Dnd/DropIndicator';\nimport { withConditionalUseSortable } from '../HoC/withConditionalUseSortable';\nimport { useInnerRefHandlers as useInnerRefActionHandlers } from './ItemActions/useInnerRefHandlers';\nimport { useItemKeyboardSelection } from './useItemKeyboardSelection';\n// we are using the class-name added via slot for the children `:hover` styling of icon colors\n\nconst cssDisabled = css`\n background-color: ${({ theme }) => theme.colors.neutral['100']};\n color: ${({ theme }) => theme.colors.neutral['300']};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: ${({ theme }) => theme.colors.neutral['300']};\n }\n`;\n\ninterface ItemWrapperT {\n isDragging: boolean;\n isDndActive: boolean;\n}\n\nconst ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_WRAPPER })<ItemWrapperT>`\n min-height: 2.769rem;\n position: relative;\n background-color: white;\n &:hover {\n background-color: ${({ isDndActive, theme }) => (!isDndActive ? theme.colors.brand['200'] : 'white')};\n .DSShuttleV2-item-action-btn-to-source-icon > svg,\n .DSShuttleV2-item-action-btn-to-destination-icon > svg,\n .DSShuttleV2-item-action-btn-drilldown-icon > svg {\n fill: brand-700;\n }\n ${({ isDragging }) => isDragging && cssDisabled}\n }\n\n &:focus {\n outline: 2px solid brand-700;\n outline-offset: -2px;\n }\n border-bottom: 1px solid neutral-100;\n\n ${({ isDragging }) => isDragging && cssDisabled}\n`;\n\nconst useInnerRefHandlers = ({ datumInternalMeta, isDestinationPanel }: DSShuttleV2T.ItemMeta) => {\n const { hydratedId } = datumInternalMeta;\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const getShouldFocusItemOnRender = useInternalStore((state) => state.getShouldFocusItemOnRender);\n const setShouldFocusItemOnRender = useInternalStore((state) => state.setShouldFocusItemOnRender);\n const getFocusRegion = useInternalStore((state) => state.getFocusRegion);\n const getFocusItem = useInternalStore((state) => state.getFocusItem);\n const getFocusItemAction = useInternalStore((state) => state.getFocusItemAction);\n\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM : REGIONS_FOCUSES.SOURCE_PANEL_ITEM;\n const currItemId = hydratedId;\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement | null) => {\n setZustandRef([currRegion, currItemId, 'parent'], node);\n\n // This is the only place we should do this check + focus\n // See focusAndTabIndexManager for more info -- TLDR: virtualization + focus is a pain\n const shouldThisItemHaveFocus =\n currRegion === getFocusRegion() && currItemId === getFocusItem() && 'parent' === getFocusItemAction();\n\n if (getShouldFocusItemOnRender() && shouldThisItemHaveFocus && node) {\n node?.focus();\n setShouldFocusItemOnRender(false);\n }\n },\n [\n currItemId,\n currRegion,\n getFocusItem,\n getFocusItemAction,\n getFocusRegion,\n getShouldFocusItemOnRender,\n setShouldFocusItemOnRender,\n setZustandRef,\n ],\n );\n return React.useMemo(() => ({ innerRefHandlerParentItem }), [innerRefHandlerParentItem]);\n};\n\nexport const Item = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const { datumInternalMeta, withDragNDrop, useSortableHelpers, hasMultipleSelection } = itemMeta;\n const { isSelected, hydratedId } = datumInternalMeta;\n\n const cols = useMemo(() => {\n if (withDragNDrop) return ['5px', 'auto', '1fr', 'auto'];\n return ['5px', '1fr', 'auto'];\n }, [withDragNDrop]);\n\n const setDndDraggingItemMeta = useInternalStore((state) => state.setDndDraggingItemMeta);\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const isDraggingThisItem = useInternalStore((state) => state.dndDraggingItem?.hydratedId === hydratedId);\n\n React.useEffect(() => {\n if (isDraggingThisItem) {\n setDndDraggingItemMeta((prevItemMeta) => {\n if (prevItemMeta?.datumInternalMeta.hydratedId === hydratedId) return prevItemMeta;\n return itemMeta;\n });\n }\n }, [hydratedId, isDraggingThisItem, itemMeta, setDndDraggingItemMeta]);\n\n const { selectItem, onShiftMouseDownPreventTextSelection } = useSelectionLogic(itemMeta);\n const { onItemContainerKeyDown } = useItemArrowNavigation(itemMeta);\n const { onItemKeyDownSelection } = useItemKeyboardSelection(itemMeta);\n\n const handleItemKeyDown: React.KeyboardEventHandler<HTMLDivElement> = React.useCallback(\n (event) => {\n onItemKeyDownSelection(event);\n onItemContainerKeyDown(event);\n },\n [onItemKeyDownSelection, onItemContainerKeyDown],\n );\n const { innerRefHandlerParentItem } = useInnerRefHandlers(itemMeta);\n const { innerRefHandlerDnd } = useInnerRefActionHandlers(itemMeta);\n const overId = useInternalStore((state) => state.overId);\n const isDropValid = useInternalStore((state) => state.isDropValid);\n const dropIndicatorPosition = useInternalStore((state) => state.dropIndicatorPosition);\n\n const showDropIndicatorPosition = hydratedId === overId && dropIndicatorPosition;\n const sortableRef = useSortableHelpers?.setNodeRef ?? (() => {});\n return (\n <ItemWrapper\n isDragging={isDraggingThisItem}\n isDndActive={getIsDragAndDropHappening()}\n cols={cols}\n alignItems=\"center\"\n onClick={selectItem}\n ref={mergeRefs(innerRefHandlerParentItem, sortableRef)}\n onKeyDown={handleItemKeyDown}\n onMouseDown={onShiftMouseDownPreventTextSelection}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n role=\"option\"\n aria-checked={isSelected}\n id={`${hydratedId}-wrapper`}\n >\n <ItemSelection {...itemMeta} />\n {withDragNDrop && useSortableHelpers ? (\n <DragHandle\n id={hydratedId}\n useSortableHelpers={useSortableHelpers}\n isDndActive={getIsDragAndDropHappening()}\n isDragging={isDraggingThisItem}\n innerRef={innerRefHandlerDnd}\n disabled={hasMultipleSelection}\n />\n ) : null}\n <ItemMiddleSection {...itemMeta} />\n <ItemActions {...itemMeta} />\n <DropIndicator vertical={false} dropIndicatorPosition={showDropIndicatorPosition} isDropValid={isDropValid} />\n </ItemWrapper>\n );\n});\n\nconst ItemSortable = withConditionalUseSortable(Item);\nexport { ItemSortable };\nexport default ItemSortable;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC+InB,SAcE,KAdF;AA9IJ,OAAOA,UAAS,eAAe;AAC/B,SAAS,QAAQ,WAAW;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAGrB,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,yBAAyB;AAClC,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAC3C,SAAS,uBAAuB,iCAAiC;AAC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
38
  isDestinationPanel,
39
39
  datumRenderFlags,
40
- datum: { label }
40
+ datumInternalMeta: { hydratedPreventMove }
41
41
  } = itemMeta;
42
42
  const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;
43
- const { preventDrilldown, preventMove } = datumHydratables;
43
+ const { preventDrilldown, label } = datumHydratables;
44
44
  const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefHandlers(itemMeta);
45
45
  const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);
46
46
  const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);
@@ -73,7 +73,7 @@ const ItemActions = React2.memo((itemMeta) => {
73
73
  size: BUTTON_SIZES.S,
74
74
  innerRef: innerRefHandlerMove,
75
75
  tabIndex: -1,
76
- disabled: internallyDisabledMove || preventMove === true,
76
+ disabled: internallyDisabledMove || hydratedPreventMove === true,
77
77
  children: isDestinationPanel ? /* @__PURE__ */ jsx(StyledCloseMediumIcon, { width: "1.538rem", height: "1.538rem" }) : /* @__PURE__ */ jsx(StyledArrowShortRightIcon, { width: "1.538rem", height: "1.538rem" })
78
78
  }
79
79
  ) })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Item/ItemActions/ItemActions.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2, BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { ArrowShortReturn, ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useActionsHandlers } from './useActionsHandlers';\nimport { useInnerRefHandlers } from './useInnerRefHandlers';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledItemActions = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })``;\nconst StyledItemActionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_WRAPPER })``;\nconst StyledButton = styled(DSButtonV2, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_BTN })`\n height: 1.692rem !important;\n svg {\n fill: brand-600;\n }\n :disabled svg {\n fill: neutral-200 !important;\n }\n`;\nconst StyledDrilldownIcon = styled(ArrowShortReturn, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_DRILLDOWN_ICON,\n})``;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})``;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})``;\n\nconst actionsCols = ['1.538rem', '1.538rem'];\n\nexport const ItemActions = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const {\n datumHydratables,\n isDestinationPanel,\n datumRenderFlags,\n datum: { label },\n } = itemMeta;\n // withActions is calculated in /src/config/configureAutoCalculated.ts\n const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;\n const { preventDrilldown, preventMove } = datumHydratables;\n const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefHandlers(itemMeta);\n const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);\n const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);\n const moveAriaLabel = useMemo(\n () => `Move option ${label} into ${isDestinationPanel ? 'source' : 'destination'} panel`,\n [label, isDestinationPanel],\n );\n\n return (\n <StyledItemActions cols={actionsCols} gutter=\"xxs\" pl=\"xs\" pr=\"xxs\" alignItems=\"center\">\n {withActions ? (\n <>\n <StyledItemActionWrapper>\n <StyledButton\n buttonType=\"icon\"\n aria-label={drillDownAriaLabel}\n onClick={handleClickDrilldown}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerDrilldown}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledDrilldown || preventDrilldown === true}\n >\n <StyledDrilldownIcon width=\"1.538rem\" height=\"1.538rem\" />\n </StyledButton>\n </StyledItemActionWrapper>\n <StyledItemActionWrapper>\n <StyledButton\n buttonType=\"icon\"\n aria-label={moveAriaLabel}\n onClick={handleClickSingleMove}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerMove}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledMove || preventMove === true}\n >\n {isDestinationPanel ? (\n <StyledCloseMediumIcon width=\"1.538rem\" height=\"1.538rem\" />\n ) : (\n <StyledArrowShortRightIcon width=\"1.538rem\" height=\"1.538rem\" />\n )}\n </StyledButton>\n </StyledItemActionWrapper>\n </>\n ) : (\n // this is a place-holder used for mantainting the grid spacing when item has no actions (so when item is soft-deleted)\n <>\n <div />\n <div />\n </>\n )}\n </StyledItemActions>\n );\n});\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACyDf,mBAYM,KAZN;AAzDR,OAAOA,UAAS,eAAe;AAC/B,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY,oBAAoB;AACzC,SAAS,kBAAkB,iBAAiB,mBAAmB;AAE/D,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,oBAAoB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,qBAAqB,CAAC;AAC7G,MAAM,0BAA0B,OAAO,MAAM,EAAE,MAAM,iBAAiB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;AAAA,QACV,UAAU;AAAA,QACV,UAAU,+BAA+B,qBAAqB;AAAA,QAE9D,8BAAC,uBAAoB,OAAM,YAAW,QAAO,YAAW;AAAA;AAAA,IAC1D,GACF;AAAA,IACA,oBAAC,2BACC;AAAA,MAAC;AAAA;AAAA,QACC,YAAW;AAAA,QACX,cAAY;AAAA,QACZ,SAAS;AAAA,QACT,WAAW;AAAA,QACX,MAAM,aAAa;AAAA,QACnB,UAAU;AAAA,QACV,UAAU;AAAA,QACV,UAAU,0BAA0B,gBAAgB;AAAA,QAEnD,+BACC,oBAAC,yBAAsB,OAAM,YAAW,QAAO,YAAW,IAE1D,oBAAC,6BAA0B,OAAM,YAAW,QAAO,YAAW;AAAA;AAAA,IAElE,GACF;AAAA,KACF,IAGA,iCACE;AAAA,wBAAC,SAAI;AAAA,IACL,oBAAC,SAAI;AAAA,KACP,GAEJ;AAEJ,CAAC;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2, BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { ArrowShortReturn, ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types';\nimport { useActionsHandlers } from './useActionsHandlers';\nimport { useInnerRefHandlers } from './useInnerRefHandlers';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions';\n\nconst StyledItemActions = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })``;\nconst StyledItemActionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_WRAPPER })``;\nconst StyledButton = styled(DSButtonV2, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_BTN })`\n height: 1.692rem !important;\n svg {\n fill: brand-600;\n }\n :disabled svg {\n fill: neutral-200 !important;\n }\n`;\nconst StyledDrilldownIcon = styled(ArrowShortReturn, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_DRILLDOWN_ICON,\n})``;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})``;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})``;\n\nconst actionsCols = ['1.538rem', '1.538rem'];\n\nexport const ItemActions = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const {\n datumHydratables,\n isDestinationPanel,\n datumRenderFlags,\n datumInternalMeta: { hydratedPreventMove },\n } = itemMeta;\n // withActions is calculated in /src/config/configureAutoCalculated.ts\n const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;\n const { preventDrilldown, label } = datumHydratables;\n const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefHandlers(itemMeta);\n const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);\n const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);\n const moveAriaLabel = useMemo(\n () => `Move option ${label} into ${isDestinationPanel ? 'source' : 'destination'} panel`,\n [label, isDestinationPanel],\n );\n\n return (\n <StyledItemActions cols={actionsCols} gutter=\"xxs\" pl=\"xs\" pr=\"xxs\" alignItems=\"center\">\n {withActions ? (\n <>\n <StyledItemActionWrapper>\n <StyledButton\n buttonType=\"icon\"\n aria-label={drillDownAriaLabel}\n onClick={handleClickDrilldown}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerDrilldown}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledDrilldown || preventDrilldown === true}\n >\n <StyledDrilldownIcon width=\"1.538rem\" height=\"1.538rem\" />\n </StyledButton>\n </StyledItemActionWrapper>\n <StyledItemActionWrapper>\n <StyledButton\n buttonType=\"icon\"\n aria-label={moveAriaLabel}\n onClick={handleClickSingleMove}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerMove}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledMove || hydratedPreventMove === true}\n >\n {isDestinationPanel ? (\n <StyledCloseMediumIcon width=\"1.538rem\" height=\"1.538rem\" />\n ) : (\n <StyledArrowShortRightIcon width=\"1.538rem\" height=\"1.538rem\" />\n )}\n </StyledButton>\n </StyledItemActionWrapper>\n </>\n ) : (\n // this is a place-holder used for mantainting the grid spacing when item has no actions (so when item is soft-deleted)\n <>\n <div />\n <div />\n </>\n )}\n </StyledItemActions>\n );\n});\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACyDf,mBAYM,KAZN;AAzDR,OAAOA,UAAS,eAAe;AAC/B,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY,oBAAoB;AACzC,SAAS,kBAAkB,iBAAiB,mBAAmB;AAE/D,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,iBAAiB,wBAAwB;AAElD,MAAM,oBAAoB,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,qBAAqB,CAAC;AAC7G,MAAM,0BAA0B,OAAO,MAAM,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,oBAAoB,CAAC;AAClH,MAAM,eAAe,OAAO,YAAY,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,gBAAgB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASzG,MAAM,sBAAsB,OAAO,kBAAkB;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AACD,MAAM,wBAAwB,OAAO,aAAa;AAA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U;AAAA,QACV,UAAU;AAAA,QACV,UAAU,0BAA0B,wBAAwB;AAAA,QAE3D,+BACC,oBAAC,yBAAsB,OAAM,YAAW,QAAO,YAAW,IAE1D,oBAAC,6BAA0B,OAAM,YAAW,QAAO,YAAW;AAAA;AAAA,IAElE,GACF;AAAA,KACF,IAGA,iCACE;AAAA,wBAAC,SAAI;AAAA,IACL,oBAAC,SAAI;AAAA,KACP,GAEJ;AAEJ,CAAC;",
6
6
  "names": ["React"]
7
7
  }
@@ -7,21 +7,20 @@ const useGetDatumHydratables = (panelMetaInfo) => {
7
7
  const getIcon = usePropsStore((state) => state.getIcon);
8
8
  const getCustomRenderer = usePropsStore((state) => state.getCustomRenderer);
9
9
  const getPreventDrilldown = usePropsStore((state) => state.getPreventDrilldown);
10
- const getPreventMove = usePropsStore((state) => state.getPreventMove);
11
10
  const getDatumHydratables = React2.useCallback(
12
11
  (item) => {
13
12
  const { original, ...datumMeta } = item;
14
13
  return {
15
14
  id: datumMeta.hydratedId,
15
+ preventMove: datumMeta.hydratedPreventMove,
16
16
  label: getLabel(original, { datumMeta, panelMetaInfo }),
17
17
  ...getSubtitle !== void 0 ? { subtitle: getSubtitle(original, { datumMeta, panelMetaInfo }) } : {},
18
18
  ...getIcon !== void 0 ? { Icon: getIcon(original, { datumMeta, panelMetaInfo }) } : {},
19
19
  ...getCustomRenderer !== void 0 ? { CustomRenderer: getCustomRenderer(original, { datumMeta, panelMetaInfo }) } : {},
20
- ...getPreventDrilldown !== void 0 ? { preventDrilldown: getPreventDrilldown(original, { datumMeta, panelMetaInfo }) } : {},
21
- ...getPreventMove !== void 0 ? { preventMove: getPreventMove(original, { datumMeta, panelMetaInfo }) } : {}
20
+ ...getPreventDrilldown !== void 0 ? { preventDrilldown: getPreventDrilldown(original, { datumMeta, panelMetaInfo }) } : {}
22
21
  };
23
22
  },
24
- [getCustomRenderer, getIcon, getLabel, getPreventDrilldown, getPreventMove, getSubtitle, panelMetaInfo]
23
+ [getCustomRenderer, getIcon, getLabel, getPreventDrilldown, getSubtitle, panelMetaInfo]
25
24
  );
26
25
  return getDatumHydratables;
27
26
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { usePropsStore } from '../../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../../react-desc-prop-types';\n\nexport const useGetDatumHydratables = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const getLabel = usePropsStore((state) => state.getLabel);\n const getSubtitle = usePropsStore((state) => state.getSubtitle);\n const getIcon = usePropsStore((state) => state.getIcon);\n const getCustomRenderer = usePropsStore((state) => state.getCustomRenderer);\n const getPreventDrilldown = usePropsStore((state) => state.getPreventDrilldown);\n const getPreventMove = usePropsStore((state) => state.getPreventMove);\n\n const getDatumHydratables = React.useCallback(\n (item: DSShuttleV2T.ConfiguredDatum) => {\n const { original, ...datumMeta } = item;\n\n return {\n id: datumMeta.hydratedId,\n label: getLabel(original, { datumMeta, panelMetaInfo }),\n ...(getSubtitle !== undefined ? { subtitle: getSubtitle(original, { datumMeta, panelMetaInfo }) } : {}),\n ...(getIcon !== undefined ? { Icon: getIcon(original, { datumMeta, panelMetaInfo }) } : {}),\n ...(getCustomRenderer !== undefined\n ? { CustomRenderer: getCustomRenderer(original, { datumMeta, panelMetaInfo }) }\n : {}),\n ...(getPreventDrilldown !== undefined\n ? { preventDrilldown: getPreventDrilldown(original, { datumMeta, panelMetaInfo }) }\n : {}),\n ...(getPreventMove !== undefined\n ? { preventMove: getPreventMove(original, { datumMeta, panelMetaInfo }) }\n : {}),\n };\n },\n [getCustomRenderer, getIcon, getLabel, getPreventDrilldown, getPreventMove, getSubtitle, panelMetaInfo],\n );\n return getDatumHydratables;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;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import { usePropsStore } from '../../../../config/useStore';\nimport { type DSShuttleV2T } from '../../../../react-desc-prop-types';\n\nexport const useGetDatumHydratables = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const getLabel = usePropsStore((state) => state.getLabel);\n const getSubtitle = usePropsStore((state) => state.getSubtitle);\n const getIcon = usePropsStore((state) => state.getIcon);\n const getCustomRenderer = usePropsStore((state) => state.getCustomRenderer);\n const getPreventDrilldown = usePropsStore((state) => state.getPreventDrilldown);\n\n const getDatumHydratables = React.useCallback(\n (item: DSShuttleV2T.ConfiguredDatum) => {\n const { original, ...datumMeta } = item;\n\n return {\n id: datumMeta.hydratedId,\n preventMove: datumMeta.hydratedPreventMove,\n label: getLabel(original, { datumMeta, panelMetaInfo }),\n ...(getSubtitle !== undefined ? { subtitle: getSubtitle(original, { datumMeta, panelMetaInfo }) } : {}),\n ...(getIcon !== undefined ? { Icon: getIcon(original, { datumMeta, panelMetaInfo }) } : {}),\n ...(getCustomRenderer !== undefined\n ? { CustomRenderer: getCustomRenderer(original, { datumMeta, panelMetaInfo }) }\n : {}),\n ...(getPreventDrilldown !== undefined\n ? { preventDrilldown: getPreventDrilldown(original, { datumMeta, panelMetaInfo }) }\n : {}),\n };\n },\n [getCustomRenderer, getIcon, getLabel, getPreventDrilldown, getSubtitle, panelMetaInfo],\n );\n return getDatumHydratables;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB;AAGvB,MAAM,yBAAyB,CAAC,kBAA8C;AACnF,QAAM,WAAW,cAAc,CAAC,UAAU,MAAM,QAAQ;AACxD,QAAM,cAAc,cAAc,CAAC,UAAU,MAAM,WAAW;AAC9D,QAAM,UAAU,cAAc,CAAC,UAAU,MAAM,OAAO;AACtD,QAAM,oBAAoB,cAAc,CAAC,UAAU,MAAM,iBAAiB;AAC1E,QAAM,sBAAsB,cAAc,CAAC,UAAU,MAAM,mBAAmB;AAE9E,QAAM,sBAAsBA,OAAM;AAAA,IAChC,CAAC,SAAuC;AACtC,YAAM,EAAE,aAAa,UAAU,IAAI;AAEnC,aAAO;AAAA,QACL,IAAI,UAAU;AAAA,QACd,aAAa,UAAU;AAAA,QACvB,OAAO,SAAS,UAAU,EAAE,WAAW,cAAc,CAAC;AAAA,QACtD,GAAI,gBAAgB,SAAY,EAAE,UAAU,YAAY,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAAI,CAAC;AAAA,QACrG,GAAI,YAAY,SAAY,EAAE,MAAM,QAAQ,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAAI,CAAC;AAAA,QACzF,GAAI,sBAAsB,SACtB,EAAE,gBAAgB,kBAAkB,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAC5E,CAAC;AAAA,QACL,GAAI,wBAAwB,SACxB,EAAE,kBAAkB,oBAAoB,UAAU,EAAE,WAAW,cAAc,CAAC,EAAE,IAChF,CAAC;AAAA,MACP;AAAA,IACF;AAAA,IACA,CAAC,mBAAmB,SAAS,UAAU,qBAAqB,aAAa,aAAa;AAAA,EACxF;AACA,SAAO;AACT;",
6
6
  "names": ["React"]
7
7
  }