@elliemae/ds-shuttle-v2 3.70.0-next.4 → 3.70.0-next.40

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 (149) hide show
  1. package/dist/cjs/DSShuttleV2.js.map +2 -2
  2. package/dist/cjs/config/useAutoCalculated/index.js.map +2 -2
  3. package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
  4. package/dist/cjs/config/useStore/useStore.js.map +1 -1
  5. package/dist/cjs/config/useValidateProps.js.map +2 -2
  6. package/dist/cjs/constants/index.js +3 -1
  7. package/dist/cjs/constants/index.js.map +2 -2
  8. package/dist/cjs/exported-related/ShuttleItem.js +27 -3
  9. package/dist/cjs/exported-related/ShuttleItem.js.map +2 -2
  10. package/dist/cjs/parts/Dnd/DndHandle.js +47 -21
  11. package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
  12. package/dist/cjs/parts/Dnd/DragOverlay.js +1 -1
  13. package/dist/cjs/parts/Dnd/DragOverlay.js.map +2 -2
  14. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +16 -14
  15. package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  16. package/dist/cjs/parts/Item/Item.js +29 -68
  17. package/dist/cjs/parts/Item/Item.js.map +3 -3
  18. package/dist/cjs/parts/Item/ItemActions/ItemActions.js +19 -5
  19. package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
  20. package/dist/cjs/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +6 -6
  21. package/dist/cjs/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
  22. package/dist/cjs/parts/Item/ItemMiddleSection.js +1 -0
  23. package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
  24. package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +72 -0
  25. package/dist/cjs/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
  26. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js +83 -0
  27. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
  28. package/dist/cjs/parts/{HoC/withConditionalUseSortable.js → Item/ItemSelectionUi/ItemSelectionUI.types.js} +3 -18
  29. package/dist/cjs/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
  30. package/dist/cjs/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +14 -12
  31. package/dist/cjs/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
  32. package/dist/cjs/parts/Item/useItemInnerRefHandlers.js +73 -0
  33. package/dist/cjs/parts/Item/useItemInnerRefHandlers.js.map +7 -0
  34. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +2 -2
  35. package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  36. package/dist/cjs/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +6 -6
  37. package/dist/cjs/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
  38. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +65 -33
  39. package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  40. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
  41. package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  42. package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
  43. package/dist/cjs/react-desc-prop-types.js +8 -4
  44. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  45. package/dist/cjs/typescript-testing/slot-props.js +181 -0
  46. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  47. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid-with-datum.js +159 -0
  48. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid-with-datum.js.map +7 -0
  49. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js +0 -1
  50. package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js.map +2 -2
  51. package/dist/esm/DSShuttleV2.js.map +2 -2
  52. package/dist/esm/config/useAutoCalculated/index.js.map +2 -2
  53. package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
  54. package/dist/esm/config/useStore/useStore.js.map +1 -1
  55. package/dist/esm/config/useValidateProps.js.map +2 -2
  56. package/dist/esm/constants/index.js +3 -1
  57. package/dist/esm/constants/index.js.map +2 -2
  58. package/dist/esm/exported-related/ShuttleItem.js +28 -4
  59. package/dist/esm/exported-related/ShuttleItem.js.map +2 -2
  60. package/dist/esm/parts/Dnd/DndHandle.js +48 -22
  61. package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
  62. package/dist/esm/parts/Dnd/DragOverlay.js +1 -1
  63. package/dist/esm/parts/Dnd/DragOverlay.js.map +2 -2
  64. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +16 -14
  65. package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
  66. package/dist/esm/parts/Item/Item.js +30 -69
  67. package/dist/esm/parts/Item/Item.js.map +2 -2
  68. package/dist/esm/parts/Item/ItemActions/ItemActions.js +19 -5
  69. package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
  70. package/dist/esm/parts/Item/ItemActions/{useInnerRefHandlers.js → useInnerRefActionHandlers.js} +3 -3
  71. package/dist/esm/parts/Item/ItemActions/useInnerRefActionHandlers.js.map +7 -0
  72. package/dist/esm/parts/Item/ItemMiddleSection.js +1 -0
  73. package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
  74. package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js +42 -0
  75. package/dist/esm/parts/Item/ItemSelectionUi/CheckboxSelectionUI.js.map +7 -0
  76. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js +53 -0
  77. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.js.map +7 -0
  78. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js +2 -0
  79. package/dist/esm/parts/Item/ItemSelectionUi/ItemSelectionUI.types.js.map +7 -0
  80. package/dist/esm/parts/Item/{ItemSelection.js → ItemSelectionUi/VerticalBarSelectionUI.js} +11 -9
  81. package/dist/esm/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.js.map +7 -0
  82. package/dist/esm/parts/Item/useItemInnerRefHandlers.js +43 -0
  83. package/dist/esm/parts/Item/useItemInnerRefHandlers.js.map +7 -0
  84. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +2 -2
  85. package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
  86. package/dist/esm/parts/Panel/bottom/{useInnerRefHandlers.js → useLoadMoreBtnInnerRefHandlers.js} +3 -3
  87. package/dist/esm/parts/Panel/bottom/useLoadMoreBtnInnerRefHandlers.js.map +7 -0
  88. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +66 -34
  89. package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
  90. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +2 -2
  91. package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
  92. package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
  93. package/dist/esm/react-desc-prop-types.js +8 -4
  94. package/dist/esm/react-desc-prop-types.js.map +2 -2
  95. package/dist/esm/typescript-testing/slot-props.js +158 -0
  96. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  97. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid-with-datum.js +136 -0
  98. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid-with-datum.js.map +7 -0
  99. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js +0 -1
  100. package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js.map +2 -2
  101. package/dist/types/DSShuttleV2.d.ts +2 -2
  102. package/dist/types/config/useAutoCalculated/index.d.ts +7 -7
  103. package/dist/types/config/useAutoCalculated/useDataStructure.d.ts +7 -7
  104. package/dist/types/config/useStore/useStore.d.ts +64 -64
  105. package/dist/types/config/useValidateProps.d.ts +1 -1
  106. package/dist/types/constants/index.d.ts +6 -2
  107. package/dist/types/parts/Dnd/DndHandle.d.ts +3 -10
  108. package/dist/types/parts/Item/Item.d.ts +1 -5
  109. package/dist/types/parts/Item/ItemActions/{useInnerRefHandlers.d.ts → useInnerRefActionHandlers.d.ts} +1 -1
  110. package/dist/types/parts/Item/ItemSelectionUi/CheckboxSelectionUI.d.ts +2 -0
  111. package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.d.ts +2 -0
  112. package/dist/types/parts/Item/ItemSelectionUi/ItemSelectionUI.types.d.ts +11 -0
  113. package/dist/types/parts/Item/ItemSelectionUi/VerticalBarSelectionUI.d.ts +2 -0
  114. package/dist/types/parts/Item/useItemInnerRefHandlers.d.ts +5 -0
  115. package/dist/types/parts/Panel/bottom/{useInnerRefHandlers.d.ts → useLoadMoreBtnInnerRefHandlers.d.ts} +1 -1
  116. package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +2 -2
  117. package/dist/types/react-desc-prop-types.d.ts +111 -57
  118. package/package.json +25 -25
  119. package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +0 -7
  120. package/dist/cjs/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
  121. package/dist/cjs/parts/Item/ItemSelection.js.map +0 -7
  122. package/dist/cjs/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
  123. package/dist/esm/parts/HoC/withConditionalUseSortable.js +0 -13
  124. package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +0 -7
  125. package/dist/esm/parts/Item/ItemActions/useInnerRefHandlers.js.map +0 -7
  126. package/dist/esm/parts/Item/ItemSelection.js.map +0 -7
  127. package/dist/esm/parts/Panel/bottom/useInnerRefHandlers.js.map +0 -7
  128. package/dist/types/parts/HoC/withConditionalUseSortable.d.ts +0 -9
  129. package/dist/types/parts/Item/ItemSelection.d.ts +0 -3
  130. package/dist/types/tests/DSShuttlev2.PUI-16059.test.d.ts +0 -1
  131. package/dist/types/tests/configs/ControlledTestRender.d.ts +0 -1
  132. package/dist/types/tests/configs/basic.d.ts +0 -24
  133. package/dist/types/tests/configs/breadcrumb.d.ts +0 -1
  134. package/dist/types/tests/configs/dnd.d.ts +0 -1
  135. package/dist/types/tests/configs/filter.d.ts +0 -30
  136. package/dist/types/tests/configs/loadMore.d.ts +0 -28
  137. package/dist/types/tests/configs/soft-delete.d.ts +0 -1
  138. package/dist/types/tests/loadMore/ShuttleV2WithLoadMoreTestable.d.ts +0 -2
  139. package/dist/types/tests/loadMore/shuttle-v2.load-more.focus.test.d.ts +0 -1
  140. package/dist/types/tests/loadMore/shuttle-v2.load-more.test.d.ts +0 -1
  141. package/dist/types/tests/shuttle-v2.a11y.test.d.ts +0 -1
  142. package/dist/types/tests/shuttle-v2.data-testid.test.d.ts +0 -1
  143. package/dist/types/tests/shuttle-v2.dnd.test.d.ts +0 -1
  144. package/dist/types/tests/shuttle-v2.events.test.d.ts +0 -1
  145. package/dist/types/tests/shuttle-v2.exports.test.d.ts +0 -1
  146. package/dist/types/tests/shuttle-v2.get-owner-props.test.d.ts +0 -1
  147. package/dist/types/tests/shuttle-v2.keyboard.test.d.ts +0 -1
  148. package/dist/types/tests/shuttle-v2.soft-delete.test.d.ts +0 -1
  149. package/dist/types/typescript-testing/typescript-shuttle-v2-valid.d.ts +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Panel/top/SelectionHeader.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSControlledCheckbox, type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { AriaLivePanelCenter } from './AriaLivePanelCenter.js';\n\nconst StyledSelectionHeaderWrapper = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER,\n})`\n line-height: 1;\n font-size: 1rem;\n background-color: neutral-000;\n border-bottom: 1px solid neutral-400;\n`;\nconst StyledSelectionHeaderCountLabel = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER_COUNT_LABEL,\n})`\n text-align: end;\n color: neutral-500;\n font-weight: 600;\n`;\n\nconst StyledCheckbox = styled(DSControlledCheckbox)``;\n\nconst wrapperCols = ['auto', '1fr'];\nexport const SelectionHeader = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const selectionableItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionableData : state.sourceSelectionableData,\n );\n const ids = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionableIds : state.sourceSelectionableIds,\n );\n\n const checkboxSelectAllProps = usePropsStore((state) => state.checkboxSelectAllProps);\n\n const ariaControls = useMemo(\n () =>\n ids.length === 0\n ? ''\n : ids\n .split(' ')\n .map((d) => `${d}-wrapper`)\n .join(' '),\n [ids],\n );\n\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n const selectionLength = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionItemArray.length : state.sourceSelectionItemArray.length,\n );\n const checkboxValue = React.useMemo(() => {\n let newVal: boolean | 'mixed' = false;\n if (selectionLength > 0)\n if (selectionLength === selectionableItems.length) newVal = true;\n else newVal = 'mixed';\n return newVal;\n }, [selectionableItems.length, selectionLength]);\n\n const handleSelectAll = React.useCallback<DSControlledCheckboxT.InternalProps['onChange']>(\n (_, event) => {\n if (checkboxValue === true) {\n onSelectionChange({}, { event });\n } else {\n const newSelection: DSShuttleV2T.InternalProps<object, object, object, object>['sourceSelectedItems'] = {};\n selectionableItems.forEach((selectableItem) => {\n newSelection[selectableItem.hydratedId] = true;\n });\n onSelectionChange(newSelection, { event });\n }\n },\n [checkboxValue, onSelectionChange, selectionableItems],\n );\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n return (\n <StyledSelectionHeaderWrapper\n cols={wrapperCols}\n justifyContent=\"center\"\n alignItems=\"center\"\n py=\"7px\"\n px=\"xxs2\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid justifyContent=\"center\" alignItems=\"center\">\n <StyledCheckbox\n checked={checkboxValue}\n aria-label={`${checkboxValue === true ? 'Deselect' : 'Select'} all ${\n isDestinationPanel ? 'destination' : 'source'\n } items`}\n onChange={handleSelectAll}\n aria-controls={ariaControls}\n // need to overwrite this becasue the default aria-labelledby is not working for axe-core\n aria-labelledby=\"\"\n disabled={selectionableItems.length === 0}\n aria-disabled={selectionableItems.length === 0}\n {...(checkboxSelectAllProps &&\n checkboxSelectAllProps({ isDestinationPanel, hasMultipleSelection: selectionLength > 1 }))}\n />\n </Grid>\n <AriaLivePanelCenter {...panelMetaInfo} />\n <StyledSelectionHeaderCountLabel getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {selectionLength} selected\n </StyledSelectionHeaderCountLabel>\n </StyledSelectionHeaderWrapper>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+Ff;AA/FR,mBAA4C;AAC5C,uBAAuB;AACvB,8BAAiE;AACjE,qBAAqB;AACrB,s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nimport { DSControlledCheckbox, type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { AriaLivePanelCenter } from './AriaLivePanelCenter.js';\n\nconst StyledSelectionHeaderWrapper = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER,\n})`\n line-height: 1;\n font-size: 1rem;\n background-color: neutral-000;\n border-bottom: 1px solid neutral-400;\n`;\nconst StyledSelectionHeaderCountLabel = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER_COUNT_LABEL,\n})`\n text-align: end;\n color: neutral-500;\n font-weight: 600;\n`;\n\nconst StyledCheckbox = styled(DSControlledCheckbox)``;\n\nconst wrapperCols = ['auto', '1fr'];\nexport const SelectionHeader = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const selectionableItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionableData : state.sourceSelectionableData,\n );\n const ids = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionableIds : state.sourceSelectionableIds,\n );\n\n const checkboxSelectAllProps = usePropsStore((state) => state.checkboxSelectAllProps);\n\n const ariaControls = useMemo(\n () =>\n ids.length === 0\n ? ''\n : ids\n .split(' ')\n .map((d) => `${d}-wrapper`)\n .join(' '),\n [ids],\n );\n\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n const selectionLength = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionItemArray.length : state.sourceSelectionItemArray.length,\n );\n const checkboxValue = React.useMemo(() => {\n let newVal: boolean | 'mixed' = false;\n if (selectionLength > 0)\n if (selectionLength === selectionableItems.length) newVal = true;\n else newVal = 'mixed';\n return newVal;\n }, [selectionableItems.length, selectionLength]);\n\n const handleSelectAll = React.useCallback<DSControlledCheckboxT.InternalProps['onChange']>(\n (_, event) => {\n if (checkboxValue === true) {\n onSelectionChange({}, { event });\n } else {\n const newSelection: DSShuttleV2T.InternalProps['sourceSelectedItems'] = {};\n selectionableItems.forEach((selectableItem) => {\n newSelection[selectableItem.hydratedId] = true;\n });\n onSelectionChange(newSelection, { event });\n }\n },\n [checkboxValue, onSelectionChange, selectionableItems],\n );\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n return (\n <StyledSelectionHeaderWrapper\n cols={wrapperCols}\n justifyContent=\"center\"\n alignItems=\"center\"\n py=\"7px\"\n px=\"xxs2\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid justifyContent=\"center\" alignItems=\"center\">\n <StyledCheckbox\n checked={checkboxValue}\n aria-label={`${checkboxValue === true ? 'Deselect' : 'Select'} all ${\n isDestinationPanel ? 'destination' : 'source'\n } items`}\n onChange={handleSelectAll}\n aria-controls={ariaControls}\n // need to overwrite this becasue the default aria-labelledby is not working for axe-core\n aria-labelledby=\"\"\n disabled={selectionableItems.length === 0}\n aria-disabled={selectionableItems.length === 0}\n {...(checkboxSelectAllProps &&\n checkboxSelectAllProps({ isDestinationPanel, hasMultipleSelection: selectionLength > 1 }))}\n />\n </Grid>\n <AriaLivePanelCenter {...panelMetaInfo} />\n <StyledSelectionHeaderCountLabel getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {selectionLength} selected\n </StyledSelectionHeaderCountLabel>\n </StyledSelectionHeaderWrapper>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+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AC;",
6
6
  "names": ["React"]
7
7
  }
@@ -36,6 +36,8 @@ var React = __toESM(require("react"));
36
36
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
37
  var import_constants = require("./constants/index.js");
38
38
  const defaultProps = {
39
+ // we start as false to avoid breaking changes, eventually converge to true for better accessibility
40
+ explicitSelectionUI: false,
39
41
  addDragAndDropFromSource: false,
40
42
  removeDragAndDropFromDestination: false,
41
43
  destinationNoOptionsMessage: "There are no items to display",
@@ -74,12 +76,15 @@ const DSShuttleV2PropTypes = {
74
76
  ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSShuttleV2Name, import_constants.DSShuttleV2Slots),
75
77
  ...import_ds_props_helpers.globalAttributesPropTypes,
76
78
  ...import_ds_props_helpers.xstyledPropTypes,
79
+ explicitSelectionUI: import_ds_props_helpers.PropTypes.bool.description(
80
+ "A boolean indicating whether to use WCAG-compliant selection indicators (checkboxes) instead of color-only indicators for selected items, must be true for the component to meet WCAG 1.4.1 Use of Color guidelines"
81
+ ).defaultValue(false),
77
82
  sourceData: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description(
78
83
  "An array of objects representing the items in the source list"
79
84
  ).isRequired,
80
85
  sourceSelectedItems: import_ds_props_helpers.PropTypes.object.description("An object representing the selected items in the source list").isRequired,
81
86
  onSourceSelectionChange: import_ds_props_helpers.PropTypes.func.description("A function called when the selection in the source list changes").isRequired,
82
- SourceHeader: import_ds_props_helpers.PropTypes.func.description("The header component for the source list").isRequired,
87
+ SourceHeader: import_ds_props_helpers.PropTypes.elementType.description("The header component for the source list").isRequired,
83
88
  sourceHeaderProps: import_ds_props_helpers.PropTypes.object.description("Props to be passed to the source header").defaultValue({}),
84
89
  onSourceDrilldown: import_ds_props_helpers.PropTypes.func.description("A function called when an item in the source list is clicked").isRequired,
85
90
  destinationData: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description(
@@ -91,7 +96,7 @@ const DSShuttleV2PropTypes = {
91
96
  onDestinationSelectionChange: import_ds_props_helpers.PropTypes.func.description(
92
97
  "A function called when the selection in the destination list changes"
93
98
  ).isRequired,
94
- DestinationHeader: import_ds_props_helpers.PropTypes.func.description("The header component for the destination list").isRequired,
99
+ DestinationHeader: import_ds_props_helpers.PropTypes.elementType.description("The header component for the destination list").isRequired,
95
100
  destinationHeaderProps: import_ds_props_helpers.PropTypes.object.description("Props to be passed to the destination header").defaultValue({}),
96
101
  onDestinationDrilldown: import_ds_props_helpers.PropTypes.func.description(
97
102
  "A function called when an item in the destination list is clicked"
@@ -162,8 +167,7 @@ const DSShuttleV2PropTypes = {
162
167
  checkboxSelectAllProps: import_ds_props_helpers.PropTypes.func.description("Function that returns props for the select all checkbox in the source panel.").defaultValue({}),
163
168
  moveButtonProps: import_ds_props_helpers.PropTypes.func.description("Function that returns props for the move button.").defaultValue(() => ({})).signature(`(({ isDestionationPanel: boolean }) => ({ "aria-label": string }))`),
164
169
  drillDownButtonProps: import_ds_props_helpers.PropTypes.func.description("Function that returns props for the drilldown button.").defaultValue(() => ({})).signature(`(({ isDestionationPanel: boolean }) => ({ "aria-label": string }))`),
165
- areaSearchBarProps: import_ds_props_helpers.PropTypes.func.description("Function that returns props for the area search bar.").defaultValue(() => ({})),
166
- dsShuttleV2ListWrapperMid: import_ds_props_helpers.PropTypes.func.description("Function that returns props for the list wrapper.").defaultValue(() => ({}))
170
+ areaSearchBarProps: import_ds_props_helpers.PropTypes.func.description("Function that returns props for the area search bar.").defaultValue(() => ({}))
167
171
  };
168
172
  const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes;
169
173
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport { type DSButtonT, type DSButtonV3T } from '@elliemae/ds-button-v2';\nimport { type DnDKitTree, type useSortable } from '@elliemae/ds-drag-and-drop';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSInputTextT } from '@elliemae/ds-form-input-text';\nimport { type useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerDatatestIdPropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\nimport type React from 'react';\nimport { DSShuttleV2DataTestIds, DSShuttleV2Name, DSShuttleV2Slots } from './constants/index.js';\nimport type { useAutoCalculated } from './config/useAutoCalculated/index.js';\nimport type { ACTIONS_FOCUSES, DropIndicatorPosition, ITEMS_FOCUSES, REGIONS_FOCUSES } from './constants/index.js';\n\nexport declare namespace DSShuttleV2T {\n export type Datum = Record<string, unknown>;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection?: boolean; height?: number };\n type HydratedId = string;\n\n export type DatumInternalMeta = {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n softDeleted: boolean;\n localIndex: number;\n hydratedId: HydratedId;\n hydratedPreventMove: boolean;\n };\n export type DatumRenderFlags = {\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n internallyDisabledMove: boolean;\n internallyDisabledDrilldown: boolean;\n };\n\n export type DropIndicatorPositionValues = TypescriptHelpersT.ObjectValues<typeof DropIndicatorPosition>;\n\n // =============================================================================\n // Hydratables section - panel level hydratables\n // =============================================================================\n type RequiredPanelHydratables = Record<string, never>;\n type OptionalPanelHydratables = {\n batchActionableButtonProps: Record<string, unknown>;\n };\n export type PanelHydratables = RequiredPanelHydratables & OptionalPanelHydratables;\n\n // =============================================================================\n // Hydratables section - datum level hydratables\n // shared usage between internal and custom component\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type FunctionalHydratables = {\n preventMove?: boolean;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n FunctionalHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Custom component-only\n // =============================================================================\n export type ComponentProps = {\n datum: Datum;\n thisItemIsFocused: boolean;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n tooltipHelpers?: ReturnType<typeof useHeadlessTooltip>;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents = {\n Icon?: React.ComponentType<ComponentProps>;\n CustomRenderer?: React.ComponentType<ComponentProps> | null;\n };\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables = OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents;\n export type DatumHydratables = PrimaryKeyHydratables & RequiredDatumHydratables & OptionalDatumHydratables;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters = TypescriptHelpersT.Hydraters<PrimaryKeyHydratables, [Datum]>;\n export type FunctionalHydraters = TypescriptHelpersT.Hydraters<\n FunctionalHydratables,\n [Datum, Partial<PanelMetaInfo>]\n >;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters = TypescriptHelpersT.Hydraters<RequiredDatumHydratables, [Datum, HydratersMeta]>;\n type OptionalDatumHydraters = TypescriptHelpersT.Hydraters<OptionalDatumHydratables, [Datum, HydratersMeta]>;\n\n type DatumHydraters = PrimaryKeyHydraters & FunctionalHydraters & RequiredDatumHydraters & OptionalDatumHydraters;\n\n type RequiredPanelHydraters = TypescriptHelpersT.Hydraters<RequiredPanelHydratables, [PanelMetaInfo]>;\n type OptionalPanelHydraters = Partial<TypescriptHelpersT.Hydraters<OptionalPanelHydratables, [PanelMetaInfo]>>;\n type PanelHydraters = RequiredPanelHydraters & OptionalPanelHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum = DatumInternalMeta & { original: Datum };\n export interface ItemMeta extends PanelMetaInfo {\n datum: Datum;\n datumHydratables: DatumHydratables;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange = (\n newData: Datum[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum;\n selectedItems?: Datum[];\n },\n ) => void;\n\n type OnChangeEvent<T> = (\n items: T,\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\n type OnSelectionDrilldown<T> = (\n item: T,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum;\n },\n ) => void;\n // =============================================================================\n // Zustand Store\n // =============================================================================\n export type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];\n export type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;\n export type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusItem: FocusItem;\n focusItemAction: FocusItemAction;\n deferFocusUntilFirstRender: boolean;\n dropIndicatorPosition: DropIndicatorPositionValues;\n overId: string;\n dndDraggingItem: ConfiguredDatum | null;\n dndDraggingItemMeta: ItemMeta | null;\n lastActiveId: string;\n isDropValid: boolean;\n sourcePanelLastSelectedItem: string | null | undefined;\n destinationPanelLastSelectedItem: string | null | undefined;\n shuttleInternalId: string;\n };\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n export type Selectors = {\n getIsDragAndDropHappening: () => boolean;\n getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;\n };\n export type Reducers = Record<string, never>;\n export type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps<T, H, K> extends RequiredDatumHydraters, PrimaryKeyHydraters {\n sourceData: Datum[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange;\n SourceHeader: React.ComponentType<T>;\n onSourceDrilldown: OnSelectionDrilldown<K>;\n\n destinationData: Datum[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange;\n DestinationHeader: React.ComponentType<H>;\n onDestinationDrilldown: OnSelectionDrilldown<K>;\n }\n\n export interface DefaultProps<T> extends Required<FunctionalHydraters> {\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n destinationNoOptionsMessage: string;\n sourceNoOptionsMessage: string;\n // switch side\n onSourceAdd: OnChangeEvent<T>;\n onSourceRemove: OnChangeEvent<T>;\n onDestinationAdd: OnChangeEvent<T>;\n onDestinationRemove: OnChangeEvent<T>;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent;\n onDestinationReorder: OnReorderEvent;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange;\n }\n export interface OptionalProps\n extends OptionalDatumHydraters,\n OptionalPanelHydraters,\n TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSShuttleV2Name, typeof DSShuttleV2Slots> {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n sourceHeaderProps?: Record<string, unknown>;\n destinationHeaderProps?: Record<string, unknown>;\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n\n moveButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n drillDownButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n\n checkboxSelectAllProps?: (metainfo: PanelMetaInfo) => DSControlledCheckboxT.Props;\n dsShuttleV2ListWrapperMid?: (metaInfo: PanelMetaInfo) => Record<string, unknown>;\n areaSearchBarProps?: (metaInfo: PanelMetaInfo) => DSInputTextT.Props;\n }\n\n export interface Props<T, H, N, K>\n extends Partial<DefaultProps<N>>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<N> | keyof OptionalProps | keyof RequiredProps<T, H, K>\n >,\n XstyledProps,\n RequiredProps<T, H, K> {}\n\n export interface InternalProps<T, H, N, K>\n extends DefaultProps<N>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<N> | keyof OptionalProps | keyof RequiredProps<T, H, K>\n >,\n XstyledProps,\n RequiredProps<T, H, K> {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps<object> = {\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n destinationNoOptionsMessage: 'There are no items to display',\n sourceNoOptionsMessage: 'There are no items to display',\n sourceIsLoading: false,\n destinationIsLoading: false,\n sourceWithLoadMore: false,\n destinationWithLoadMore: false,\n sourceIsLoadingMore: false,\n destinationIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onDestinationLoadMore: () => {},\n\n onSourceAdd: () => {},\n onDestinationAdd: () => {},\n onSourceRemove: () => {},\n onDestinationRemove: () => {},\n onSourceReorder: () => {},\n onDestinationReorder: () => {},\n\n sourceSoftDeletedItems: {},\n onSourceSoftDelete: () => {},\n destinationSoftDeletedItems: {},\n onDestinationSoftDelete: () => {},\n\n getPreventMove: () => false,\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props<object, object, object, object>> = {\n ...getPropsPerSlotPropTypes(DSShuttleV2Name, DSShuttleV2Slots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the source list',\n ).isRequired,\n sourceSelectedItems: PropTypes.object.description('An object representing the selected items in the source list')\n .isRequired,\n onSourceSelectionChange: PropTypes.func.description('A function called when the selection in the source list changes')\n .isRequired,\n SourceHeader: PropTypes.func.description('The header component for the source list').isRequired,\n sourceHeaderProps: PropTypes.object.description('Props to be passed to the source header').defaultValue({}),\n onSourceDrilldown: PropTypes.func.description('A function called when an item in the source list is clicked')\n .isRequired,\n destinationData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the destination list',\n ).isRequired,\n destinationSelectedItems: PropTypes.object.description(\n 'An object representing the selected items in the destination list',\n ).isRequired,\n onDestinationSelectionChange: PropTypes.func.description(\n 'A function called when the selection in the destination list changes',\n ).isRequired,\n DestinationHeader: PropTypes.func.description('The header component for the destination list').isRequired,\n destinationHeaderProps: PropTypes.object.description('Props to be passed to the destination header').defaultValue({}),\n onDestinationDrilldown: PropTypes.func.description(\n 'A function called when an item in the destination list is clicked',\n ).isRequired,\n getId: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its unique identifier',\n ).isRequired,\n getLabel: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its display label',\n ).isRequired,\n sourceIsLoading: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading data')\n .defaultValue(false),\n destinationIsLoading: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading data')\n .defaultValue(false),\n sourceWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the source list supports \"load more\" functionality')\n .defaultValue(false),\n destinationWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the destination list supports \"load more\" functionality')\n .defaultValue(false),\n sourceIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading more data')\n .defaultValue(false),\n destinationIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading more data')\n .defaultValue(false),\n onSourceLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the source list is clicked')\n .defaultValue(() => {}),\n onDestinationLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the destination list is clicked')\n .defaultValue(() => {}),\n onSourceAdd: PropTypes.func\n .description('A function called when an item is added from the source list to the destination list')\n .defaultValue(() => {}),\n onDestinationAdd: PropTypes.func\n .description('A function called when an item is added from the destination list to the source list')\n .defaultValue(() => {}),\n onSourceRemove: PropTypes.func\n .description('A function called when an item is removed from the destination list')\n .defaultValue(() => {}),\n onDestinationRemove: PropTypes.func\n .description('Callback function to handle when an item is removed from the destination shuttle list. ')\n .defaultValue(() => {}),\n onSourceReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the source shuttle list.')\n .defaultValue(() => {}),\n onDestinationReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the destination shuttle list. ')\n .defaultValue(() => {}),\n sourceSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the source shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onSourceSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the source shuttle list. ')\n .defaultValue(() => {}),\n destinationSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the destination shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onDestinationSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the destination shuttle list.')\n .defaultValue(() => {}),\n getPreventMove: PropTypes.func\n .description('Function that determines whether a specific item can be moved to the destination shuttle list. ')\n .defaultValue(() => false),\n addDragAndDropFromSource: PropTypes.bool\n .description('Specifies whether items can be dragged from the source list and dropped into the destination list.')\n .defaultValue(false),\n removeDragAndDropFromDestination: PropTypes.bool\n .description('Specifies whether items can be removed from the destination list by dragging them out of the list.')\n .defaultValue(false),\n sourceItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the source list.')\n .defaultValue({}),\n destinationItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the destination list.')\n .defaultValue({}),\n sourceShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the source list.')\n .defaultValue(false),\n destinationShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the destination list.')\n .defaultValue(false),\n onSourceOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the source list is opened.')\n .defaultValue(() => {}),\n onDesinationOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the destination list is opened.')\n .defaultValue(() => {}),\n sourceFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the source list.')\n .defaultValue(''),\n destinationFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the destination list.')\n .defaultValue(''),\n onSourceFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the source list is changed.')\n .defaultValue(() => {}),\n onDestinationFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the destination list is changed.')\n .defaultValue(() => {}),\n getSubtitle: PropTypes.func\n .description('Callback function that returns the subtitle to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getIcon: PropTypes.func\n .description('Callback function that returns the icon to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getPreventDrilldown: PropTypes.func\n .description('Callback function that determines whether drilldown should be prevented for a particular item.')\n .defaultValue(() => false),\n getCustomRenderer: PropTypes.func\n .description('Callback function that returns a custom renderer for each item in the list.')\n .defaultValue(() => undefined),\n getBatchActionableButtonProps: PropTypes.func\n .description('Callback function that returns the props for the batch actionable button in the destination list.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n ...getPropsPerDatatestIdPropTypes(DSShuttleV2DataTestIds),\n destinationNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in destination panel')\n .defaultValue('There are no items to display'),\n sourceNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in source panel')\n .defaultValue('There are no items to display'),\n checkboxSelectAllProps: PropTypes.func\n .description('Function that returns props for the select all checkbox in the source panel.')\n .defaultValue({}),\n moveButtonProps: PropTypes.func\n .description('Function that returns props for the move button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n drillDownButtonProps: PropTypes.func\n .description('Function that returns props for the drilldown button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n areaSearchBarProps: PropTypes.func\n .description('Function that returns props for the area search bar.')\n .defaultValue(() => ({})),\n dsShuttleV2ListWrapperMid: PropTypes.func\n .description('Function that returns props for the list wrapper.')\n .defaultValue(() => ({})),\n};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as ValidationMap<\n DSShuttleV2T.Props<object, object, object, object>\n>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOvB,8BAMO;AAIP,uBAA0E;AA0TnE,MAAM,eAAkD;AAAA,EAC7D,0BAA0B;AAAA,EAC1B,kCAAkC;AAAA,EAClC,6BAA6B;AAAA,EAC7B,wBAAwB;AAAA,EACxB,iBAAiB;A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5B;AAEO,MAAM,6BAA6B;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport { type DSButtonT, type DSButtonV3T } from '@elliemae/ds-button-v2';\nimport { type DnDKitTree, type useSortable } from '@elliemae/ds-drag-and-drop';\nimport { type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { type DSInputTextT } from '@elliemae/ds-form-input-text';\nimport { type useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerDatatestIdPropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\nimport type React from 'react';\nimport type { useAutoCalculated } from './config/useAutoCalculated/index.js';\nimport type { ACTIONS_FOCUSES, DropIndicatorPosition, ITEMS_FOCUSES, REGIONS_FOCUSES } from './constants/index.js';\nimport { DSShuttleV2DataTestIds, DSShuttleV2Name, DSShuttleV2Slots } from './constants/index.js';\n\nexport declare namespace DSShuttleV2T {\n export type Datum<D extends Record<string, unknown> = Record<string, unknown>> = D;\n export type PanelMetaInfo = { isDestinationPanel: boolean; hasMultipleSelection?: boolean; height?: number };\n type HydratedId = string;\n\n export type DatumInternalMeta = {\n isFirst: boolean;\n isLast: boolean;\n isSelected: boolean;\n softDeleted: boolean;\n localIndex: number;\n hydratedId: HydratedId;\n hydratedPreventMove: boolean;\n };\n export type DatumRenderFlags = {\n selectionPrevented: boolean;\n withActions: boolean;\n withMoveBtn: boolean;\n withDrilldownBtn: boolean;\n internallyDisabledMove: boolean;\n internallyDisabledDrilldown: boolean;\n };\n\n export type DropIndicatorPositionValues = TypescriptHelpersT.ObjectValues<typeof DropIndicatorPosition>;\n\n // =============================================================================\n // Hydratables section - panel level hydratables\n // =============================================================================\n type RequiredPanelHydratables = Record<string, never>;\n type OptionalPanelHydratables = {\n batchActionableButtonProps: Record<string, unknown>;\n };\n export type PanelHydratables = RequiredPanelHydratables & OptionalPanelHydratables;\n\n // =============================================================================\n // Hydratables section - datum level hydratables\n // shared usage between internal and custom component\n // =============================================================================\n export type PrimaryKeyHydratables = {\n id: HydratedId;\n };\n type FunctionalHydratables = {\n preventMove?: boolean;\n };\n type RequiredDatumHydratablesWithoutComponents = {\n label: string;\n };\n type OptionalDatumHydratablesWithoutComponents = {\n subtitle?: string;\n preventDrilldown?: boolean;\n };\n type DatumHydratablesWithoutComponents = PrimaryKeyHydratables &\n FunctionalHydratables &\n RequiredDatumHydratablesWithoutComponents &\n OptionalDatumHydratablesWithoutComponents;\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Custom component-only\n // =============================================================================\n export type ComponentProps<D extends Record<string, unknown> = Record<string, unknown>> = {\n datum: Datum<D>;\n thisItemIsFocused: boolean;\n panelMetaInfo: PanelMetaInfo;\n datumInternalMeta: DatumInternalMeta;\n datumHydratables: DatumHydratablesWithoutComponents;\n tooltipHelpers?: ReturnType<typeof useHeadlessTooltip>;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n type RequiredDatumHydratablesComponents = {};\n type OptionalDatumHydratablesComponents<D extends Record<string, unknown> = Record<string, unknown>> = {\n Icon?: React.ComponentType<ComponentProps<D>>;\n CustomRenderer?: React.ComponentType<ComponentProps<D>> | null;\n };\n // =============================================================================\n // Hydratables section - datum level hydratables\n // Finals\n // =============================================================================\n type RequiredDatumHydratables = RequiredDatumHydratablesWithoutComponents & RequiredDatumHydratablesComponents;\n type OptionalDatumHydratables<D extends Record<string, unknown> = Record<string, unknown>> =\n OptionalDatumHydratablesWithoutComponents & OptionalDatumHydratablesComponents<D>;\n export type DatumHydratables<D extends Record<string, unknown> = Record<string, unknown>> = PrimaryKeyHydratables &\n RequiredDatumHydratables &\n OptionalDatumHydratables<D>;\n\n // =============================================================================\n // Hydraters\n // =============================================================================\n export type PrimaryKeyHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<PrimaryKeyHydratables, [Datum<D>]>;\n export type FunctionalHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<FunctionalHydratables, [Datum<D>, Partial<PanelMetaInfo>]>;\n type HydratersMeta = { datumMeta: DatumInternalMeta; panelMetaInfo: PanelMetaInfo };\n type RequiredDatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<RequiredDatumHydratables, [Datum<D>, HydratersMeta]>;\n type OptionalDatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> =\n TypescriptHelpersT.Hydraters<OptionalDatumHydratables<D>, [Datum<D>, HydratersMeta]>;\n\n type DatumHydraters<D extends Record<string, unknown> = Record<string, unknown>> = PrimaryKeyHydraters<D> &\n FunctionalHydraters<D> &\n RequiredDatumHydraters<D> &\n OptionalDatumHydraters<D>;\n\n type RequiredPanelHydraters = TypescriptHelpersT.Hydraters<RequiredPanelHydratables, [PanelMetaInfo]>;\n type OptionalPanelHydraters = Partial<TypescriptHelpersT.Hydraters<OptionalPanelHydratables, [PanelMetaInfo]>>;\n type PanelHydraters = RequiredPanelHydraters & OptionalPanelHydraters;\n\n // =============================================================================\n // Datum & Internals structures\n // =============================================================================\n export type ConfiguredDatum<D extends Record<string, unknown> = Record<string, unknown>> = DatumInternalMeta & {\n original: Datum<D>;\n };\n export interface ItemMeta<D extends Record<string, unknown> = Record<string, unknown>> extends PanelMetaInfo {\n datum: Datum<D>;\n datumHydratables: DatumHydratables<D>;\n datumInternalMeta: DatumInternalMeta;\n datumRenderFlags: DatumRenderFlags;\n withDragNDrop: boolean;\n useSortableHelpers?: ReturnType<typeof useSortable>;\n }\n\n // =============================================================================\n // Slot argument types \u2014 per-slot getOwnerPropsArguments shapes\n // =============================================================================\n export type DragHandleArguments = {\n id: string;\n innerRef: React.RefObject<HTMLDivElement> | React.RefCallback<HTMLDivElement>;\n useSortableHelpers: ReturnType<typeof useSortable>;\n isDndActive: boolean;\n isDragging: boolean;\n disabled?: boolean;\n ariaLabelledby?: string;\n };\n\n export type ItemMidSectionArguments<D extends Record<string, unknown> = Record<string, unknown>> = ItemMeta<D> & {\n tooltipHelpers?: ComponentProps<D>['tooltipHelpers'];\n };\n\n // The to-source / to-destination icon slots render in two contexts (per-item action row and\n // bulk-action button). Both receive this single unified shape: the panel info is always present,\n // and the per-item extras (only available in the item-row context) are optional under extraMetaInfo.\n export type ItemActionIconArguments<D extends Record<string, unknown> = Record<string, unknown>> = {\n panelMetaInfo: PanelMetaInfo;\n extraMetaInfo?: { itemMeta?: ItemMeta<D> };\n };\n\n export type SlotFunctionArguments<D extends Record<string, unknown> = Record<string, unknown>> = {\n // Panel-level slots \u2014 receive PanelMetaInfo\n dsShuttlev2PanelWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2HeaderSearchIcon: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperTop: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSearchWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSearchBar: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSelectionHeader: (args: PanelMetaInfo) => object;\n dsShuttlev2AreaSelectionHeaderCountLabel: (args: PanelMetaInfo) => object;\n dsShuttlev2AriaLivePanelCenter: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperMid: (args: PanelMetaInfo) => object;\n dsShuttlev2ItemsWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleBtn: (args: PanelMetaInfo) => object;\n dsShuttlev2MoveMultipleLiveRegion: (args: PanelMetaInfo) => object;\n dsShuttlev2EmptyListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2LoadingListWrapper: (args: PanelMetaInfo) => object;\n dsShuttlev2ListBottomLoadingMore: (args: PanelMetaInfo) => object;\n dsShuttlev2ListBottomLoadMoreBtn: (args: PanelMetaInfo) => object;\n dsShuttlev2ListWrapperBottom: (args: PanelMetaInfo) => object;\n // Item-level slots \u2014 receive ItemMeta\n dsShuttlev2ItemWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemCheckbox: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemSelection: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemSelectionCheckboxUi: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemLabelWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionsWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionWrapper: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionBtn: (args: ItemMeta<D>) => object;\n dsShuttlev2ItemActionBtnDrilldownIcon: (args: ItemMeta<D>) => object;\n // Item-level slots \u2014 receive ItemMeta & { tooltipHelpers? }\n dsShuttlev2ItemMidsectionWrapper: (args: ItemMidSectionArguments<D>) => object;\n dsShuttlev2ItemIconWrapper: (args: ItemMidSectionArguments<D>) => object;\n // Dual-context slots \u2014 rendered in both the item-action row and the bulk-action button;\n // both pass the same unified ItemActionIconArguments shape\n dsShuttlev2ItemActionBtnToSourceIcon: (args: ItemActionIconArguments<D>) => object;\n dsShuttlev2ItemActionBtnToDestinationIcon: (args: ItemActionIconArguments<D>) => object;\n // Drag-and-drop slots \u2014 receive DragHandleArguments\n dsShuttlev2DragAndDropHandleWrapper: (args: DragHandleArguments) => object;\n dsShuttlev2DragAndDropHandle: (args: DragHandleArguments) => object;\n // Root wrapper \u2014 no getOwnerPropsArguments passed\n dsShuttlev2Wrapper: () => object;\n };\n\n export type SlotProps<D extends Record<string, unknown> = Record<string, unknown>> = {\n [K in keyof SlotFunctionArguments<D>]?: object | SlotFunctionArguments<D>[K];\n };\n\n // =============================================================================\n // Callbacks\n // =============================================================================\n type OnDataChange<D extends Record<string, unknown> = Record<string, unknown>> = (\n newData: Datum<D>[],\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n item?: Datum<D>;\n selectedItems?: Datum<D>[];\n },\n ) => void;\n\n type OnChangeEvent<T> = (\n items: T,\n metainfo: {\n event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>;\n },\n ) => void;\n\n type OnReorderEventMetadata<D extends Record<string, unknown> = Record<string, unknown>> = Omit<\n DnDKitTree.OnReorder<Datum<D>>,\n 'considerExpanding'\n >;\n type OnReorderEvent<D extends Record<string, unknown> = Record<string, unknown>> = (\n movedItem: Datum<D>,\n metadata: OnReorderEventMetadata<D>,\n ) => void;\n\n export type SelectionMap = Record<string, boolean>;\n type OnSelectionChange<D extends Record<string, unknown> = Record<string, unknown>> = (\n newSelection: SelectionMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum<D>;\n },\n ) => void;\n\n type OnSelectionDrilldown<T> = (\n item: T,\n metainfo: { event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> },\n ) => void;\n\n type OnLoadMore = (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => void;\n type OnFilterChange = (\n newfilter: string,\n metainfo: { event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement> },\n ) => void;\n type OnSearchbarOpen = (\n newfilter: boolean,\n metainfo: { event: Parameters<Required<DSButtonT.Props>['onClick']>[0] },\n ) => void;\n\n export type SoftDeletedMap = Record<string, boolean>;\n type OnSoftDeletedChange<D extends Record<string, unknown> = Record<string, unknown>> = (\n newSoftDeleted: SoftDeletedMap,\n metainfo: {\n event:\n | Parameters<Required<DSButtonT.Props>['onClick']>[0]\n | Parameters<DSControlledCheckboxT.InternalProps['onChange']>[1]\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>\n | React.ChangeEvent<HTMLInputElement>;\n item?: Datum<D>;\n },\n ) => void;\n // =============================================================================\n // Zustand Store\n // =============================================================================\n export type FocusRegion = (typeof REGIONS_FOCUSES)[keyof typeof REGIONS_FOCUSES];\n export type FocusItem = Omit<(typeof ITEMS_FOCUSES)[keyof typeof ITEMS_FOCUSES], 'GET_SPECIFIC_ITEM'> & string;\n export type FocusItemAction = (typeof ACTIONS_FOCUSES)[keyof typeof ACTIONS_FOCUSES];\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusItem: FocusItem;\n focusItemAction: FocusItemAction;\n deferFocusUntilFirstRender: boolean;\n dropIndicatorPosition: DropIndicatorPositionValues;\n overId: string;\n dndDraggingItem: ConfiguredDatum | null;\n dndDraggingItemMeta: ItemMeta | null;\n lastActiveId: string;\n isDropValid: boolean;\n sourcePanelLastSelectedItem: string | null | undefined;\n destinationPanelLastSelectedItem: string | null | undefined;\n shuttleInternalId: string;\n };\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n export type Selectors = {\n getIsDragAndDropHappening: () => boolean;\n getPanelLastSelectedItem: (isDestinationPanel: boolean) => string | null | undefined;\n };\n export type Reducers = Record<string, never>;\n export type ShuttleInternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n // =============================================================================\n // Final Props\n // =============================================================================\n export interface RequiredProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends RequiredDatumHydraters<D>,\n PrimaryKeyHydraters<D> {\n sourceData: Datum<D>[];\n sourceSelectedItems: SelectionMap;\n onSourceSelectionChange: OnSelectionChange<D>;\n // The header component and its props are owned and typed by the consumer; we only render\n // whatever component they pass with whatever props they pass. We deliberately use `any` (not\n // Record<string, unknown>) so a consumer component with its own required prop shape is accepted \u2014\n // ComponentType<Record<string, unknown>> would reject it via parameter contravariance.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n SourceHeader: React.ComponentType<any>;\n onSourceDrilldown: OnSelectionDrilldown<Datum<D>>;\n\n destinationData: Datum<D>[];\n destinationSelectedItems: SelectionMap;\n onDestinationSelectionChange: OnSelectionChange<D>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n DestinationHeader: React.ComponentType<any>;\n onDestinationDrilldown: OnSelectionDrilldown<Datum<D>>;\n }\n\n export interface DefaultProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends Required<FunctionalHydraters<D>> {\n // additional flag to condition how the selection UI renders (checkbox vs highlight only)\n // \u2014 can be used by the consumer to decide whether to use the ItemSelectionUI or not\n // incremental change for\n // PUI-18536 - [Dev][ShuttleV2] Non-color indicators needed for item states \u2014 WCAG 1.4.1 Use of Color\n explicitSelectionUI: boolean;\n // load-more and loaders\n sourceIsLoading: boolean;\n sourceWithLoadMore: boolean;\n sourceIsLoadingMore: boolean;\n onSourceLoadMore: OnLoadMore;\n destinationIsLoading: boolean;\n destinationWithLoadMore: boolean;\n destinationIsLoadingMore: boolean;\n onDestinationLoadMore: OnLoadMore;\n destinationNoOptionsMessage: string;\n sourceNoOptionsMessage: string;\n // switch side\n onSourceAdd: OnChangeEvent<Datum<D>[]>;\n onSourceRemove: OnChangeEvent<Datum<D>[]>;\n onDestinationAdd: OnChangeEvent<Datum<D>[]>;\n onDestinationRemove: OnChangeEvent<Datum<D>[]>;\n\n // dnd\n addDragAndDropFromSource: boolean;\n removeDragAndDropFromDestination: boolean;\n onSourceReorder: OnReorderEvent<D>;\n onDestinationReorder: OnReorderEvent<D>;\n\n // soft delete\n sourceSoftDeletedItems: SoftDeletedMap;\n onSourceSoftDelete: OnSoftDeletedChange<D>;\n destinationSoftDeletedItems: SoftDeletedMap;\n onDestinationSoftDelete: OnSoftDeletedChange<D>;\n }\n export interface OptionalProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends OptionalDatumHydraters<D>,\n OptionalPanelHydraters,\n SlotProps<D> {\n sourceItemProps?: Record<string, unknown>;\n destinationItemProps?: Record<string, unknown>;\n sourceHeaderProps?: Record<string, unknown>;\n destinationHeaderProps?: Record<string, unknown>;\n // filtering\n sourceShowSearchbar?: boolean;\n destinationShowSearchbar?: boolean;\n onSourceOpenSearchbar?: OnSearchbarOpen;\n onDesinationOpenSearchbar?: OnSearchbarOpen;\n sourceFilterValue?: string;\n destinationFilterValue?: string;\n onSourceFilterChange?: OnFilterChange;\n onDestinationFilterChange?: OnFilterChange;\n\n moveButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta<D>;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n drillDownButtonProps?: ({\n itemMeta,\n isDestinationPanel,\n }: {\n itemMeta: ItemMeta<D>;\n isDestinationPanel: boolean;\n }) => Omit<DSButtonV3T.Props, 'children'>;\n\n checkboxSelectAllProps?: (metainfo: PanelMetaInfo) => DSControlledCheckboxT.Props;\n areaSearchBarProps?: (metaInfo: PanelMetaInfo) => DSInputTextT.Props;\n }\n\n export interface Props<D extends Record<string, unknown> = Record<string, unknown>>\n extends Partial<DefaultProps<D>>,\n OptionalProps<D>,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<D> | keyof OptionalProps<D> | keyof RequiredProps<D>\n >,\n XstyledProps,\n RequiredProps<D> {}\n\n export interface InternalProps<D extends Record<string, unknown> = Record<string, unknown>>\n extends DefaultProps<D>,\n OptionalProps<D>,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps<D> | keyof OptionalProps<D> | keyof RequiredProps<D>\n >,\n XstyledProps,\n RequiredProps<D> {}\n}\n\nexport const defaultProps: DSShuttleV2T.DefaultProps = {\n // we start as false to avoid breaking changes, eventually converge to true for better accessibility\n explicitSelectionUI: false,\n\n addDragAndDropFromSource: false,\n removeDragAndDropFromDestination: false,\n destinationNoOptionsMessage: 'There are no items to display',\n sourceNoOptionsMessage: 'There are no items to display',\n sourceIsLoading: false,\n destinationIsLoading: false,\n sourceWithLoadMore: false,\n destinationWithLoadMore: false,\n sourceIsLoadingMore: false,\n destinationIsLoadingMore: false,\n onSourceLoadMore: () => {},\n onDestinationLoadMore: () => {},\n\n onSourceAdd: () => {},\n onDestinationAdd: () => {},\n onSourceRemove: () => {},\n onDestinationRemove: () => {},\n onSourceReorder: () => {},\n onDestinationReorder: () => {},\n\n sourceSoftDeletedItems: {},\n onSourceSoftDelete: () => {},\n destinationSoftDeletedItems: {},\n onDestinationSoftDelete: () => {},\n getPreventMove: () => false,\n};\n\nconst DSShuttleV2PropTypes: DSPropTypesSchema<DSShuttleV2T.Props> = {\n ...getPropsPerSlotPropTypes(DSShuttleV2Name, DSShuttleV2Slots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n explicitSelectionUI: PropTypes.bool\n .description(\n 'A boolean indicating whether to use WCAG-compliant selection indicators (checkboxes) instead of color-only indicators for selected items, must be true for the component to meet WCAG 1.4.1 Use of Color guidelines',\n )\n .defaultValue(false),\n\n sourceData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the source list',\n ).isRequired,\n sourceSelectedItems: PropTypes.object.description('An object representing the selected items in the source list')\n .isRequired,\n onSourceSelectionChange: PropTypes.func.description('A function called when the selection in the source list changes')\n .isRequired,\n SourceHeader: PropTypes.elementType.description('The header component for the source list').isRequired,\n sourceHeaderProps: PropTypes.object.description('Props to be passed to the source header').defaultValue({}),\n onSourceDrilldown: PropTypes.func.description('A function called when an item in the source list is clicked')\n .isRequired,\n destinationData: PropTypes.arrayOf(PropTypes.object).description(\n 'An array of objects representing the items in the destination list',\n ).isRequired,\n destinationSelectedItems: PropTypes.object.description(\n 'An object representing the selected items in the destination list',\n ).isRequired,\n onDestinationSelectionChange: PropTypes.func.description(\n 'A function called when the selection in the destination list changes',\n ).isRequired,\n DestinationHeader: PropTypes.elementType.description('The header component for the destination list').isRequired,\n destinationHeaderProps: PropTypes.object.description('Props to be passed to the destination header').defaultValue({}),\n onDestinationDrilldown: PropTypes.func.description(\n 'A function called when an item in the destination list is clicked',\n ).isRequired,\n getId: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its unique identifier',\n ).isRequired,\n getLabel: PropTypes.func.description(\n 'A function that takes an item from the source/destination list and returns its display label',\n ).isRequired,\n sourceIsLoading: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading data')\n .defaultValue(false),\n destinationIsLoading: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading data')\n .defaultValue(false),\n sourceWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the source list supports \"load more\" functionality')\n .defaultValue(false),\n destinationWithLoadMore: PropTypes.bool\n .description('A boolean indicating whether the destination list supports \"load more\" functionality')\n .defaultValue(false),\n sourceIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the source list is currently loading more data')\n .defaultValue(false),\n destinationIsLoadingMore: PropTypes.bool\n .description('A boolean indicating whether the destination list is currently loading more data')\n .defaultValue(false),\n onSourceLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the source list is clicked')\n .defaultValue(() => {}),\n onDestinationLoadMore: PropTypes.func\n .description('A function called when the \"load more\" button in the destination list is clicked')\n .defaultValue(() => {}),\n onSourceAdd: PropTypes.func\n .description('A function called when an item is added from the source list to the destination list')\n .defaultValue(() => {}),\n onDestinationAdd: PropTypes.func\n .description('A function called when an item is added from the destination list to the source list')\n .defaultValue(() => {}),\n onSourceRemove: PropTypes.func\n .description('A function called when an item is removed from the destination list')\n .defaultValue(() => {}),\n onDestinationRemove: PropTypes.func\n .description('Callback function to handle when an item is removed from the destination shuttle list. ')\n .defaultValue(() => {}),\n onSourceReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the source shuttle list.')\n .defaultValue(() => {}),\n onDestinationReorder: PropTypes.func\n .description('Callback function to handle when items are reordered in the destination shuttle list. ')\n .defaultValue(() => {}),\n sourceSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the source shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onSourceSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the source shuttle list. ')\n .defaultValue(() => {}),\n destinationSoftDeletedItems: PropTypes.object\n .description(\n 'Object containing the soft deleted items in the destination shuttle list, where the key is the item ID and the value is the deleted item.',\n )\n .defaultValue({}),\n onDestinationSoftDelete: PropTypes.func\n .description('Callback function to handle when an item is soft deleted in the destination shuttle list.')\n .defaultValue(() => {}),\n getPreventMove: PropTypes.func\n .description('Function that determines whether a specific item can be moved to the destination shuttle list. ')\n .defaultValue(() => false),\n addDragAndDropFromSource: PropTypes.bool\n .description('Specifies whether items can be dragged from the source list and dropped into the destination list.')\n .defaultValue(false),\n removeDragAndDropFromDestination: PropTypes.bool\n .description('Specifies whether items can be removed from the destination list by dragging them out of the list.')\n .defaultValue(false),\n sourceItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the source list.')\n .defaultValue({}),\n destinationItemProps: PropTypes.object\n .description('Specifies additional props to be applied to each item in the destination list.')\n .defaultValue({}),\n sourceShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the source list.')\n .defaultValue(false),\n destinationShowSearchbar: PropTypes.bool\n .description('Specifies whether the search bar should be shown in the destination list.')\n .defaultValue(false),\n onSourceOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the source list is opened.')\n .defaultValue(() => {}),\n onDesinationOpenSearchbar: PropTypes.func\n .description('Callback function that is called when the search bar in the destination list is opened.')\n .defaultValue(() => {}),\n sourceFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the source list.')\n .defaultValue(''),\n destinationFilterValue: PropTypes.string\n .description('Specifies the current value of the search filter in the destination list.')\n .defaultValue(''),\n onSourceFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the source list is changed.')\n .defaultValue(() => {}),\n onDestinationFilterChange: PropTypes.func\n .description('Callback function that is called when the search filter in the destination list is changed.')\n .defaultValue(() => {}),\n getSubtitle: PropTypes.func\n .description('Callback function that returns the subtitle to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getIcon: PropTypes.func\n .description('Callback function that returns the icon to be displayed for each item in the list.')\n .defaultValue(() => ''),\n getPreventDrilldown: PropTypes.func\n .description('Callback function that determines whether drilldown should be prevented for a particular item.')\n .defaultValue(() => false),\n getCustomRenderer: PropTypes.func\n .description('Callback function that returns a custom renderer for each item in the list.')\n .defaultValue(() => undefined),\n getBatchActionableButtonProps: PropTypes.func\n .description('Callback function that returns the props for the batch actionable button in the destination list.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n ...getPropsPerDatatestIdPropTypes(DSShuttleV2DataTestIds),\n destinationNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in destination panel')\n .defaultValue('There are no items to display'),\n sourceNoOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering in source panel')\n .defaultValue('There are no items to display'),\n checkboxSelectAllProps: PropTypes.func\n .description('Function that returns props for the select all checkbox in the source panel.')\n .defaultValue({}),\n moveButtonProps: PropTypes.func\n .description('Function that returns props for the move button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n drillDownButtonProps: PropTypes.func\n .description('Function that returns props for the drilldown button.')\n .defaultValue(() => ({}))\n .signature(`(({ isDestionationPanel: boolean }) => ({ \"aria-label\": string }))`),\n areaSearchBarProps: PropTypes.func\n .description('Function that returns props for the area search bar.')\n .defaultValue(() => ({})),\n};\n\nexport const DSShuttleV2PropTypesSchema = DSShuttleV2PropTypes as unknown as ValidationMap<DSShuttleV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOvB,8BAMO;AAMP,uBAA0E;AA8ZnE,M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D,EACnE,aAAa,OAAO,CAAC,EAAE,EACvB,UAAU,oEAAoE;AAAA,EACjF,oBAAoB,kCAAU,KAC3B,YAAY,sDAAsD,EAClE,aAAa,OAAO,CAAC,EAAE;AAC5B;AAEO,MAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ const SlotPropsAsObj = {
26
+ // Panel-level
27
+ dsShuttlev2PanelWrapper: { "aria-label": "just a typescript test" },
28
+ dsShuttlev2ListWrapper: { "aria-label": "just a typescript test" },
29
+ dsShuttlev2HeaderSearchIcon: { "aria-label": "just a typescript test" },
30
+ dsShuttlev2ListWrapperTop: { "aria-label": "just a typescript test" },
31
+ dsShuttlev2AreaSearchWrapper: { "aria-label": "just a typescript test" },
32
+ dsShuttlev2AreaSearchBar: { "aria-label": "just a typescript test" },
33
+ dsShuttlev2AreaSelectionHeader: { "aria-label": "just a typescript test" },
34
+ dsShuttlev2AreaSelectionHeaderCountLabel: { "aria-label": "just a typescript test" },
35
+ dsShuttlev2AriaLivePanelCenter: { "aria-label": "just a typescript test" },
36
+ dsShuttlev2ListWrapperMid: { "aria-label": "just a typescript test" },
37
+ dsShuttlev2ItemsWrapper: { "aria-label": "just a typescript test" },
38
+ dsShuttlev2MoveMultipleWrapper: { "aria-label": "just a typescript test" },
39
+ dsShuttlev2MoveMultipleBtn: { "aria-label": "just a typescript test" },
40
+ dsShuttlev2MoveMultipleLiveRegion: { "aria-label": "just a typescript test" },
41
+ dsShuttlev2EmptyListWrapper: { "aria-label": "just a typescript test" },
42
+ dsShuttlev2LoadingListWrapper: { "aria-label": "just a typescript test" },
43
+ dsShuttlev2ListBottomLoadingMore: { "aria-label": "just a typescript test" },
44
+ dsShuttlev2ListBottomLoadMoreBtn: { "aria-label": "just a typescript test" },
45
+ dsShuttlev2ListWrapperBottom: { "aria-label": "just a typescript test" },
46
+ // Item-level
47
+ dsShuttlev2ItemWrapper: { "aria-label": "just a typescript test" },
48
+ dsShuttlev2ItemCheckbox: { "aria-label": "just a typescript test" },
49
+ dsShuttlev2ItemSelection: { "aria-label": "just a typescript test" },
50
+ dsShuttlev2ItemLabelWrapper: { "aria-label": "just a typescript test" },
51
+ dsShuttlev2ItemActionsWrapper: { "aria-label": "just a typescript test" },
52
+ dsShuttlev2ItemActionWrapper: { "aria-label": "just a typescript test" },
53
+ dsShuttlev2ItemActionBtn: { "aria-label": "just a typescript test" },
54
+ dsShuttlev2ItemActionBtnDrilldownIcon: { "aria-label": "just a typescript test" },
55
+ // Item-level with tooltipHelpers
56
+ dsShuttlev2ItemMidsectionWrapper: { "aria-label": "just a typescript test" },
57
+ dsShuttlev2ItemIconWrapper: { "aria-label": "just a typescript test" },
58
+ // Dual-context
59
+ dsShuttlev2ItemActionBtnToSourceIcon: { "aria-label": "just a typescript test" },
60
+ dsShuttlev2ItemActionBtnToDestinationIcon: { "aria-label": "just a typescript test" },
61
+ // Drag-and-drop
62
+ dsShuttlev2DragAndDropHandleWrapper: { "aria-label": "just a typescript test" },
63
+ dsShuttlev2DragAndDropHandle: { "aria-label": "just a typescript test" },
64
+ // Root wrapper
65
+ dsShuttlev2Wrapper: { "aria-label": "just a typescript test" }
66
+ };
67
+ const testReturn = { "aria-label": "just a typescript test" };
68
+ const panelMetaProbe = (args) => {
69
+ const { isDestinationPanel, hasMultipleSelection, height } = args;
70
+ const _isDestinationPanel = isDestinationPanel;
71
+ const _hasMultipleSelection = hasMultipleSelection;
72
+ const _height = height;
73
+ return testReturn;
74
+ };
75
+ const itemMetaProbe = (args) => {
76
+ const {
77
+ isDestinationPanel,
78
+ hasMultipleSelection,
79
+ height,
80
+ datum,
81
+ datumHydratables,
82
+ datumInternalMeta,
83
+ datumRenderFlags,
84
+ withDragNDrop,
85
+ useSortableHelpers
86
+ } = args;
87
+ const _isDestinationPanel = isDestinationPanel;
88
+ const _hasMultipleSelection = hasMultipleSelection;
89
+ const _height = height;
90
+ const _datum = datum;
91
+ const _datumHydratables = datumHydratables;
92
+ const _datumInternalMeta = datumInternalMeta;
93
+ const _datumRenderFlags = datumRenderFlags;
94
+ const _withDragNDrop = withDragNDrop;
95
+ const _useSortableHelpers = useSortableHelpers;
96
+ return testReturn;
97
+ };
98
+ const itemMidSectionProbe = (args) => {
99
+ const {
100
+ datum,
101
+ datumHydratables,
102
+ datumInternalMeta,
103
+ datumRenderFlags,
104
+ withDragNDrop,
105
+ useSortableHelpers,
106
+ isDestinationPanel,
107
+ tooltipHelpers
108
+ } = args;
109
+ const _datum = datum;
110
+ const _datumHydratables = datumHydratables;
111
+ const _datumInternalMeta = datumInternalMeta;
112
+ const _datumRenderFlags = datumRenderFlags;
113
+ const _withDragNDrop = withDragNDrop;
114
+ const _useSortableHelpers = useSortableHelpers;
115
+ const _isDestinationPanel = isDestinationPanel;
116
+ const _tooltipHelpers = tooltipHelpers;
117
+ return testReturn;
118
+ };
119
+ const itemActionIconProbe = (args) => {
120
+ const { panelMetaInfo, extraMetaInfo } = args;
121
+ const _panelMetaInfo = panelMetaInfo;
122
+ const _extraMetaInfo = extraMetaInfo;
123
+ const _itemMeta = extraMetaInfo?.itemMeta;
124
+ return testReturn;
125
+ };
126
+ const dragHandleProbe = (args) => {
127
+ const { id, innerRef, useSortableHelpers, isDndActive, isDragging, disabled, ariaLabelledby } = args;
128
+ const _id = id;
129
+ const _innerRef = innerRef;
130
+ const _useSortableHelpers = useSortableHelpers;
131
+ const _isDndActive = isDndActive;
132
+ const _isDragging = isDragging;
133
+ const _disabled = disabled;
134
+ const _ariaLabelledby = ariaLabelledby;
135
+ return testReturn;
136
+ };
137
+ const SlotPropsAsFunctions = {
138
+ // Panel-level — receive PanelMetaInfo
139
+ dsShuttlev2PanelWrapper: panelMetaProbe,
140
+ dsShuttlev2ListWrapper: panelMetaProbe,
141
+ dsShuttlev2HeaderSearchIcon: panelMetaProbe,
142
+ dsShuttlev2ListWrapperTop: panelMetaProbe,
143
+ dsShuttlev2AreaSearchWrapper: panelMetaProbe,
144
+ dsShuttlev2AreaSearchBar: panelMetaProbe,
145
+ dsShuttlev2AreaSelectionHeader: panelMetaProbe,
146
+ dsShuttlev2AreaSelectionHeaderCountLabel: panelMetaProbe,
147
+ dsShuttlev2AriaLivePanelCenter: panelMetaProbe,
148
+ dsShuttlev2ListWrapperMid: panelMetaProbe,
149
+ dsShuttlev2ItemsWrapper: panelMetaProbe,
150
+ dsShuttlev2MoveMultipleWrapper: panelMetaProbe,
151
+ dsShuttlev2MoveMultipleBtn: panelMetaProbe,
152
+ dsShuttlev2MoveMultipleLiveRegion: panelMetaProbe,
153
+ dsShuttlev2EmptyListWrapper: panelMetaProbe,
154
+ dsShuttlev2LoadingListWrapper: panelMetaProbe,
155
+ dsShuttlev2ListBottomLoadingMore: panelMetaProbe,
156
+ dsShuttlev2ListBottomLoadMoreBtn: panelMetaProbe,
157
+ dsShuttlev2ListWrapperBottom: panelMetaProbe,
158
+ // Item-level — receive ItemMeta
159
+ dsShuttlev2ItemWrapper: itemMetaProbe,
160
+ dsShuttlev2ItemCheckbox: itemMetaProbe,
161
+ dsShuttlev2ItemSelection: itemMetaProbe,
162
+ dsShuttlev2ItemSelectionCheckboxUi: itemMetaProbe,
163
+ dsShuttlev2ItemLabelWrapper: itemMetaProbe,
164
+ dsShuttlev2ItemActionsWrapper: itemMetaProbe,
165
+ dsShuttlev2ItemActionWrapper: itemMetaProbe,
166
+ dsShuttlev2ItemActionBtn: itemMetaProbe,
167
+ dsShuttlev2ItemActionBtnDrilldownIcon: itemMetaProbe,
168
+ // Item-level with tooltipHelpers — receive ItemMidSectionArguments
169
+ dsShuttlev2ItemMidsectionWrapper: itemMidSectionProbe,
170
+ dsShuttlev2ItemIconWrapper: itemMidSectionProbe,
171
+ // Dual-context — receive ItemActionIconArguments
172
+ dsShuttlev2ItemActionBtnToSourceIcon: itemActionIconProbe,
173
+ dsShuttlev2ItemActionBtnToDestinationIcon: itemActionIconProbe,
174
+ // Drag-and-drop — receive DragHandleArguments
175
+ dsShuttlev2DragAndDropHandleWrapper: dragHandleProbe,
176
+ dsShuttlev2DragAndDropHandle: dragHandleProbe,
177
+ // Root wrapper — no arguments
178
+ dsShuttlev2Wrapper: () => testReturn
179
+ };
180
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
181
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSShuttleV2Name, DSShuttleV2Slots } from '../constants/index.js';\nimport type { DSShuttleV2T } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSShuttleV2T.Props> = {\n // Panel-level\n dsShuttlev2PanelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2HeaderSearchIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperTop: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSearchBar: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeader: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AreaSelectionHeaderCountLabel: { 'aria-label': 'just a typescript test' },\n dsShuttlev2AriaLivePanelCenter: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperMid: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2MoveMultipleLiveRegion: { 'aria-label': 'just a typescript test' },\n dsShuttlev2EmptyListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2LoadingListWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadingMore: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListBottomLoadMoreBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ListWrapperBottom: { 'aria-label': 'just a typescript test' },\n // Item-level\n dsShuttlev2ItemWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemCheckbox: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemSelection: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemLabelWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionsWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtn: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnDrilldownIcon: { 'aria-label': 'just a typescript test' },\n // Item-level with tooltipHelpers\n dsShuttlev2ItemMidsectionWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemIconWrapper: { 'aria-label': 'just a typescript test' },\n // Dual-context\n dsShuttlev2ItemActionBtnToSourceIcon: { 'aria-label': 'just a typescript test' },\n dsShuttlev2ItemActionBtnToDestinationIcon: { 'aria-label': 'just a typescript test' },\n // Drag-and-drop\n dsShuttlev2DragAndDropHandleWrapper: { 'aria-label': 'just a typescript test' },\n dsShuttlev2DragAndDropHandle: { 'aria-label': 'just a typescript test' },\n // Root wrapper\n dsShuttlev2Wrapper: { 'aria-label': 'just a typescript test' },\n};\n\n// Probes: each fully deconstructs its argument interface and assigns every field to a const of the\n// exact expected type. This makes the test shield against ANY change to the argument shape \u2014 a\n// removed/renamed field breaks the destructure; a retyped field breaks the typed assignment.\nconst testReturn = { 'aria-label': 'just a typescript test' };\n\nconst panelMetaProbe = (args: DSShuttleV2T.PanelMetaInfo): object => {\n const { isDestinationPanel, hasMultipleSelection, height } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n return testReturn;\n};\n\nconst itemMetaProbe = (args: DSShuttleV2T.ItemMeta): object => {\n const {\n isDestinationPanel,\n hasMultipleSelection,\n height,\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n } = args;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _hasMultipleSelection: boolean | undefined = hasMultipleSelection;\n const _height: number | undefined = height;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n return testReturn;\n};\n\nconst itemMidSectionProbe = (args: DSShuttleV2T.ItemMidSectionArguments): object => {\n const {\n datum,\n datumHydratables,\n datumInternalMeta,\n datumRenderFlags,\n withDragNDrop,\n useSortableHelpers,\n isDestinationPanel,\n tooltipHelpers,\n } = args;\n const _datum: DSShuttleV2T.Datum = datum;\n const _datumHydratables: DSShuttleV2T.DatumHydratables = datumHydratables;\n const _datumInternalMeta: DSShuttleV2T.DatumInternalMeta = datumInternalMeta;\n const _datumRenderFlags: DSShuttleV2T.DatumRenderFlags = datumRenderFlags;\n const _withDragNDrop: boolean = withDragNDrop;\n const _useSortableHelpers: DSShuttleV2T.ItemMeta['useSortableHelpers'] = useSortableHelpers;\n const _isDestinationPanel: boolean = isDestinationPanel;\n const _tooltipHelpers: DSShuttleV2T.ComponentProps['tooltipHelpers'] = tooltipHelpers;\n return testReturn;\n};\n\nconst itemActionIconProbe = (args: DSShuttleV2T.ItemActionIconArguments): object => {\n const { panelMetaInfo, extraMetaInfo } = args;\n const _panelMetaInfo: DSShuttleV2T.PanelMetaInfo = panelMetaInfo;\n const _extraMetaInfo: { itemMeta?: DSShuttleV2T.ItemMeta } | undefined = extraMetaInfo;\n const _itemMeta: DSShuttleV2T.ItemMeta | undefined = extraMetaInfo?.itemMeta;\n return testReturn;\n};\n\nconst dragHandleProbe = (args: DSShuttleV2T.DragHandleArguments): object => {\n const { id, innerRef, useSortableHelpers, isDndActive, isDragging, disabled, ariaLabelledby } = args;\n const _id: string = id;\n const _innerRef: DSShuttleV2T.DragHandleArguments['innerRef'] = innerRef;\n const _useSortableHelpers: DSShuttleV2T.DragHandleArguments['useSortableHelpers'] = useSortableHelpers;\n const _isDndActive: boolean = isDndActive;\n const _isDragging: boolean = isDragging;\n const _disabled: boolean | undefined = disabled;\n const _ariaLabelledby: string | undefined = ariaLabelledby;\n return testReturn;\n};\n\nconst SlotPropsAsFunctions: DSShuttleV2T.SlotFunctionArguments = {\n // Panel-level \u2014 receive PanelMetaInfo\n dsShuttlev2PanelWrapper: panelMetaProbe,\n dsShuttlev2ListWrapper: panelMetaProbe,\n dsShuttlev2HeaderSearchIcon: panelMetaProbe,\n dsShuttlev2ListWrapperTop: panelMetaProbe,\n dsShuttlev2AreaSearchWrapper: panelMetaProbe,\n dsShuttlev2AreaSearchBar: panelMetaProbe,\n dsShuttlev2AreaSelectionHeader: panelMetaProbe,\n dsShuttlev2AreaSelectionHeaderCountLabel: panelMetaProbe,\n dsShuttlev2AriaLivePanelCenter: panelMetaProbe,\n dsShuttlev2ListWrapperMid: panelMetaProbe,\n dsShuttlev2ItemsWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleWrapper: panelMetaProbe,\n dsShuttlev2MoveMultipleBtn: panelMetaProbe,\n dsShuttlev2MoveMultipleLiveRegion: panelMetaProbe,\n dsShuttlev2EmptyListWrapper: panelMetaProbe,\n dsShuttlev2LoadingListWrapper: panelMetaProbe,\n dsShuttlev2ListBottomLoadingMore: panelMetaProbe,\n dsShuttlev2ListBottomLoadMoreBtn: panelMetaProbe,\n dsShuttlev2ListWrapperBottom: panelMetaProbe,\n // Item-level \u2014 receive ItemMeta\n dsShuttlev2ItemWrapper: itemMetaProbe,\n dsShuttlev2ItemCheckbox: itemMetaProbe,\n dsShuttlev2ItemSelection: itemMetaProbe,\n dsShuttlev2ItemSelectionCheckboxUi: itemMetaProbe,\n dsShuttlev2ItemLabelWrapper: itemMetaProbe,\n dsShuttlev2ItemActionsWrapper: itemMetaProbe,\n dsShuttlev2ItemActionWrapper: itemMetaProbe,\n dsShuttlev2ItemActionBtn: itemMetaProbe,\n dsShuttlev2ItemActionBtnDrilldownIcon: itemMetaProbe,\n // Item-level with tooltipHelpers \u2014 receive ItemMidSectionArguments\n dsShuttlev2ItemMidsectionWrapper: itemMidSectionProbe,\n dsShuttlev2ItemIconWrapper: itemMidSectionProbe,\n // Dual-context \u2014 receive ItemActionIconArguments\n dsShuttlev2ItemActionBtnToSourceIcon: itemActionIconProbe,\n dsShuttlev2ItemActionBtnToDestinationIcon: itemActionIconProbe,\n // Drag-and-drop \u2014 receive DragHandleArguments\n dsShuttlev2DragAndDropHandleWrapper: dragHandleProbe,\n dsShuttlev2DragAndDropHandle: dragHandleProbe,\n // Root wrapper \u2014 no arguments\n dsShuttlev2Wrapper: () => testReturn,\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot defined in DSShuttleV2Slots\n// is missing from SlotFunctionArguments (or vice versa).\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSShuttleV2Name, typeof DSShuttleV2Slots>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACQvB,MAAM,iBAA8C;AAAA;AAAA,EAElD,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,8BAA8B,EAAE,cAAc,yBAAyB;AAAA,EACvE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,0CAA0C,EAAE,cAAc,yBAAyB;AAAA,EACnF,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,mCAAmC,EAAE,cAAc,yBAAyB;AAAA,EAC5E,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,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