@oracle/oraclejet-preact 20.0.2 → 20.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/amd/BaseCardView-b8119561.js +2 -0
  2. package/amd/{BaseCardView-16fda4c3.js.map → BaseCardView-b8119561.js.map} +1 -1
  3. package/amd/CardFlexView-aa2f3de8.js +2 -0
  4. package/amd/{CardFlexView-d3eb7373.js.map → CardFlexView-aa2f3de8.js.map} +1 -1
  5. package/amd/CardGridView-85f90c75.js +2 -0
  6. package/amd/{CardGridView-842f70cd.js.map → CardGridView-85f90c75.js.map} +1 -1
  7. package/amd/CheckboxSet-f000e5c2.js +2 -0
  8. package/amd/CheckboxSet-f000e5c2.js.map +1 -0
  9. package/amd/ExpandableList-233c279e.js +2 -0
  10. package/amd/{ExpandableList-a9a86ad8.js.map → ExpandableList-233c279e.js.map} +1 -1
  11. package/amd/{InlineSelectSingle-7c1cc5b5.js → InlineSelectSingle-87bc8a45.js} +2 -2
  12. package/amd/{InlineSelectSingle-7c1cc5b5.js.map → InlineSelectSingle-87bc8a45.js.map} +1 -1
  13. package/amd/ListView-2678b2af.js +2 -0
  14. package/amd/{ListView-6d21e8f9.js.map → ListView-2678b2af.js.map} +1 -1
  15. package/amd/NavigationList-a6bb123d.js +2 -0
  16. package/amd/NavigationList-a6bb123d.js.map +1 -0
  17. package/amd/NavigationListItem-10bf6656.js +2 -0
  18. package/amd/NavigationListItem-10bf6656.js.map +1 -0
  19. package/amd/NavigationListLinkItem-df1826e6.js +2 -0
  20. package/amd/NavigationListLinkItem-df1826e6.js.map +1 -0
  21. package/amd/{OverflowTabBar-5ff68da7.js → OverflowTabBar-f8bf9356.js} +2 -2
  22. package/amd/{OverflowTabBar-5ff68da7.js.map → OverflowTabBar-f8bf9356.js.map} +1 -1
  23. package/amd/OverflowTabBarItem-0aa39512.js +2 -0
  24. package/amd/{OverflowTabBarItem-926b0c8a.js.map → OverflowTabBarItem-0aa39512.js.map} +1 -1
  25. package/amd/PRIVATE_BaseCardView.js +1 -1
  26. package/amd/PRIVATE_SelectCommon.js +1 -1
  27. package/amd/PRIVATE_TableList.js +1 -1
  28. package/amd/RemovableNavigationListItem-60593d4c.js +2 -0
  29. package/amd/{RemovableNavigationListItem-e298c5de.js.map → RemovableNavigationListItem-60593d4c.js.map} +1 -1
  30. package/amd/ReorderableTabBar-19a503c7.js +2 -0
  31. package/amd/{ReorderableTabBar-0c69bfd4.js.map → ReorderableTabBar-19a503c7.js.map} +1 -1
  32. package/amd/{SelectMobileFieldInput-d499ef86.js → SelectMobileFieldInput-4795a794.js} +2 -2
  33. package/amd/{SelectMobileFieldInput-d499ef86.js.map → SelectMobileFieldInput-4795a794.js.map} +1 -1
  34. package/amd/{SelectMultiple-cc9bffc6.js → SelectMultiple-e216b16c.js} +2 -2
  35. package/amd/{SelectMultiple-cc9bffc6.js.map → SelectMultiple-e216b16c.js.map} +1 -1
  36. package/amd/{SelectSingle-2bb35b67.js → SelectSingle-d53cf202.js} +2 -2
  37. package/amd/{SelectSingle-2bb35b67.js.map → SelectSingle-d53cf202.js.map} +1 -1
  38. package/amd/TabBar-92bac52f.js +2 -0
  39. package/amd/{TabBar-de723fbc.js.map → TabBar-92bac52f.js.map} +1 -1
  40. package/amd/TabBarMixed-5b5a5047.js +2 -0
  41. package/amd/{TabBarMixed-cfd346bf.js.map → TabBarMixed-5b5a5047.js.map} +1 -1
  42. package/amd/TextArea-345f89d4.js +2 -0
  43. package/amd/TextArea-345f89d4.js.map +1 -0
  44. package/amd/TextAreaAutosize-01dfd98e.js +2 -0
  45. package/amd/{TextAreaAutosize-3a13ebb2.js.map → TextAreaAutosize-01dfd98e.js.map} +1 -1
  46. package/amd/Theme-redwood/theme.css +122 -122
  47. package/amd/Theme-stable/theme.css +174 -174
  48. package/amd/UNSAFE_CardFlexView.js +1 -1
  49. package/amd/UNSAFE_CardGridView.js +1 -1
  50. package/amd/UNSAFE_CheckboxItem.js +1 -1
  51. package/amd/UNSAFE_CheckboxItem.js.map +1 -1
  52. package/amd/UNSAFE_CheckboxSet.js +1 -1
  53. package/amd/UNSAFE_CheckboxSet.js.map +1 -1
  54. package/amd/UNSAFE_ExpandableList.js +1 -1
  55. package/amd/UNSAFE_InlineSelectSingle.js +1 -1
  56. package/amd/UNSAFE_ListView.js +1 -1
  57. package/amd/UNSAFE_NavigationList.js +1 -1
  58. package/amd/UNSAFE_NavigationListCommon.js +1 -1
  59. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  60. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  61. package/amd/UNSAFE_RichCheckboxSet.js +1 -1
  62. package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
  63. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  64. package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
  65. package/amd/UNSAFE_SelectMultiple.js +1 -1
  66. package/amd/UNSAFE_SelectSingle.js +1 -1
  67. package/amd/UNSAFE_TabBar.js +1 -1
  68. package/amd/UNSAFE_TabBarCommon.js +1 -1
  69. package/amd/UNSAFE_TabBarMixed.js +1 -1
  70. package/amd/UNSAFE_TextArea.js +1 -1
  71. package/amd/UNSAFE_TextAreaAutosize.js +1 -1
  72. package/amd/UNSAFE_VirtualizedListView.js +1 -1
  73. package/amd/VirtualizedListView-a0f338c2.js +2 -0
  74. package/amd/{VirtualizedListView-1ae7151d.js.map → VirtualizedListView-a0f338c2.js.map} +1 -1
  75. package/amd/{useDisplayValue-0e90bf4c.js → useDisplayValue-9b671893.js} +2 -2
  76. package/amd/{useDisplayValue-0e90bf4c.js.map → useDisplayValue-9b671893.js.map} +1 -1
  77. package/amd/useNavigationListItem-582f5564.js +2 -0
  78. package/amd/useNavigationListItem-582f5564.js.map +1 -0
  79. package/amd/useSelectCommon-f33709d2.js +2 -0
  80. package/amd/{useSelectCommon-a02ddf3c.js.map → useSelectCommon-f33709d2.js.map} +1 -1
  81. package/cjs/{BaseCardView-c0909427.js → BaseCardView-ba63723a.js} +4 -1
  82. package/cjs/{BaseCardView-c0909427.js.map → BaseCardView-ba63723a.js.map} +1 -1
  83. package/cjs/{NavigationListItem-3b9eb0fb.js → NavigationList-d0d74565.js} +21 -8
  84. package/cjs/NavigationList-d0d74565.js.map +1 -0
  85. package/cjs/NavigationListItem-b0b03089.js +12 -0
  86. package/cjs/NavigationListItem-b0b03089.js.map +1 -0
  87. package/cjs/{NavigationListLinkItem-62c3912e.js → NavigationListLinkItem-317a5200.js} +8 -99
  88. package/cjs/NavigationListLinkItem-317a5200.js.map +1 -0
  89. package/cjs/{OverflowTabBarItem-abcd2327.js → OverflowTabBarItem-19ad4971.js} +6 -4
  90. package/cjs/{OverflowTabBarItem-abcd2327.js.map → OverflowTabBarItem-19ad4971.js.map} +1 -1
  91. package/cjs/PRIVATE_BaseCardView.js +1 -1
  92. package/cjs/PRIVATE_TableList.js +4 -4
  93. package/cjs/SegmentStyles.styles.css +9 -12
  94. package/cjs/SegmentStyles.styles2.css +12 -9
  95. package/cjs/{TabBar-27ae2c21.js → TabBar-d84e222e.js} +9 -1
  96. package/cjs/{TabBar-27ae2c21.js.map → TabBar-d84e222e.js.map} +1 -1
  97. package/cjs/{TabBarLinkItem-b0c4b100.js → TabBarLinkItem-e924f83b.js} +2 -2
  98. package/cjs/{TabBarLinkItem-b0c4b100.js.map → TabBarLinkItem-e924f83b.js.map} +1 -1
  99. package/cjs/Theme-redwood/theme.css +131 -131
  100. package/cjs/Theme-stable/theme.css +233 -233
  101. package/cjs/UNSAFE_CardFlexView.js +1 -1
  102. package/cjs/UNSAFE_CardGridView.js +1 -1
  103. package/cjs/UNSAFE_ListView.js +53 -53
  104. package/cjs/UNSAFE_NavigationList.js +17 -15
  105. package/cjs/UNSAFE_NavigationList.js.map +1 -1
  106. package/cjs/UNSAFE_NavigationListCommon.js +14 -13
  107. package/cjs/UNSAFE_NavigationListCommon.js.map +1 -1
  108. package/cjs/UNSAFE_OverflowTabBar.js +56 -53
  109. package/cjs/UNSAFE_OverflowTabBar.js.map +1 -1
  110. package/cjs/UNSAFE_ReorderableTabBar.js +43 -30
  111. package/cjs/UNSAFE_ReorderableTabBar.js.map +1 -1
  112. package/cjs/UNSAFE_TabBar.js +57 -54
  113. package/cjs/UNSAFE_TabBar.js.map +1 -1
  114. package/cjs/UNSAFE_TabBarCommon.js +78 -75
  115. package/cjs/UNSAFE_TabBarCommon.js.map +1 -1
  116. package/cjs/UNSAFE_TabBarMixed.js +38 -35
  117. package/cjs/UNSAFE_TabBarMixed.js.map +1 -1
  118. package/cjs/useNavigationListItem-b97e76d5.js +104 -0
  119. package/cjs/useNavigationListItem-b97e76d5.js.map +1 -0
  120. package/es/{Chart-b866a74c.js → Chart-8c63da28.js} +2 -2
  121. package/es/{Chart-b866a74c.js.map → Chart-8c63da28.js.map} +1 -1
  122. package/es/PRIVATE_Chart.js +4 -4
  123. package/es/TextArea-93ce78a7.js +225 -0
  124. package/es/TextArea-93ce78a7.js.map +1 -0
  125. package/es/Theme-redwood/theme.css +427 -427
  126. package/es/Theme-stable/theme.css +583 -583
  127. package/es/UNSAFE_BarChart.js +4 -4
  128. package/es/UNSAFE_ComboChart.js +4 -4
  129. package/es/UNSAFE_LineAreaChart.js +4 -4
  130. package/es/UNSAFE_ScatterChart.js +4 -4
  131. package/es/UNSAFE_TextArea.js +106 -226
  132. package/es/UNSAFE_TextArea.js.map +1 -1
  133. package/es/UNSAFE_TextAreaAutosize.js +1 -1
  134. package/package.json +2 -2
  135. package/amd/BaseCardView-16fda4c3.js +0 -2
  136. package/amd/CardFlexView-d3eb7373.js +0 -2
  137. package/amd/CardGridView-842f70cd.js +0 -2
  138. package/amd/CheckboxSetContext-2e486ea8.js +0 -2
  139. package/amd/CheckboxSetContext-2e486ea8.js.map +0 -1
  140. package/amd/ExpandableList-a9a86ad8.js +0 -2
  141. package/amd/ListView-6d21e8f9.js +0 -2
  142. package/amd/NavigationListItem-9df5446c.js +0 -2
  143. package/amd/NavigationListItem-9df5446c.js.map +0 -1
  144. package/amd/NavigationListLinkItem-161049bb.js +0 -2
  145. package/amd/NavigationListLinkItem-161049bb.js.map +0 -1
  146. package/amd/OverflowTabBarItem-926b0c8a.js +0 -2
  147. package/amd/RemovableNavigationListItem-e298c5de.js +0 -2
  148. package/amd/ReorderableTabBar-0c69bfd4.js +0 -2
  149. package/amd/TabBar-de723fbc.js +0 -2
  150. package/amd/TabBarMixed-cfd346bf.js +0 -2
  151. package/amd/TextArea-4a3b8b56.js +0 -2
  152. package/amd/TextArea-4a3b8b56.js.map +0 -1
  153. package/amd/TextAreaAutosize-3a13ebb2.js +0 -2
  154. package/amd/VirtualizedListView-1ae7151d.js +0 -2
  155. package/amd/useSelectCommon-a02ddf3c.js +0 -2
  156. package/amd/useTextAreaAltEnter-32272da6.js +0 -2
  157. package/amd/useTextAreaAltEnter-32272da6.js.map +0 -1
  158. package/cjs/NavigationListItem-3b9eb0fb.js.map +0 -1
  159. package/cjs/NavigationListLinkItem-62c3912e.js.map +0 -1
  160. package/es/useTextAreaAltEnter-ac460f4c.js +0 -61
  161. package/es/useTextAreaAltEnter-ac460f4c.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderableTabBar-0c69bfd4.js","sources":["../../src/UNSAFE_ReorderableTabBar/ReorderableTabBarItem.tsx","../../src/UNSAFE_ReorderableTabBar/ReorderableTabBar.tsx"],"sourcesContent":["import { useRef, useCallback } from 'preact/hooks';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { getKey } from '../utils/PRIVATE_collectionUtils';\nimport { useReorderableItem } from '../hooks/PRIVATE_useReorderable';\nimport { ReorderableItemProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { styles } from './themes/ReorderableTabBarItemStyles.css';\nimport { isKeyDefined } from '../utils/UNSAFE_keys';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { classNames } from '#utils/UNSAFE_classNames';\n\nexport const ITEM_SELECTOR = '[role=\"tab\"]';\n\ntype ReorderableTabBarItem<K extends string | number> = ReorderableItemProps<K> & {\n layout: 'stretch' | 'condense' | undefined;\n isFirstItem?: boolean;\n isLastItem?: boolean;\n};\n\n/**\n * A private item that will be used by ReorderableTabBar, location TBD (could be moved to PRIVATE_TabBar)\n */\nexport function ReorderableTabBarItem<K extends string | number>({\n children,\n dragKey,\n setDragKey,\n onReorder,\n layout,\n rootRef,\n isFirstItem,\n isLastItem\n}: ReorderableTabBarItem<K>) {\n const tabBarItemRef = useRef<HTMLDivElement | null>(null);\n const getItem = useCallback(\n () => tabBarItemRef?.current?.querySelector(ITEM_SELECTOR) as HTMLElement,\n []\n );\n const setTransferData = useCallback(\n (event: DragEvent) => {\n event.dataTransfer?.setData('text/tabbar-item-key', getKey(getItem()) + '');\n },\n [getItem]\n );\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n\n // Flex dimensions\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const { rootProps, isDragged, overlayZoneBeforeProps, overlayZoneAfterProps } =\n useReorderableItem({\n isDisabled: onReorder ? false : true,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n ref: tabBarItemRef,\n getItem,\n setTransferData,\n itemStyles: {\n itemOverlayFront: styles.itemOverlayFront,\n itemOverlayRear: styles.itemOverlayRear,\n itemDragger: styles.itemDragger\n },\n itemSelector: ITEM_SELECTOR\n });\n\n const overlayZoneBeforeClass = classNames([\n overlayZoneBeforeProps?.class,\n // Set the classes specific to isFirstItem/isLastItem which is passed down from reorderable tabbar which evaluated while mapping the children\n !isRtl && isFirstItem && styles.itemOverlayFrontFirst,\n isRtl && isLastItem && styles.itemOverlayFrontFirst\n ]);\n\n const overlayZoneAfterClass = classNames([\n overlayZoneAfterProps?.class,\n // Set the classes specific to isFirstItem/isLastItem which is passed down from reorderable tabbar which evaluated while mapping the children\n !isRtl && isLastItem && styles.itemOverlayRearLast,\n isRtl && isFirstItem && styles.itemOverlayRearLast\n ]);\n\n return (\n <div\n {...rootProps}\n draggable={onReorder ? true : false}\n data-oj-draggable={onReorder ? '' : undefined}\n style={flexDimensions}>\n {children}\n {!isDragged && isKeyDefined(dragKey) && (\n <>\n <div {...overlayZoneBeforeProps} class={overlayZoneBeforeClass}></div>\n <div {...overlayZoneAfterProps} class={overlayZoneAfterClass}></div>\n </>\n )}\n </div>\n );\n}\n","import { toChildArray, Ref, ContextType } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport { useRef, useState } from 'preact/hooks';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { TabBar, TabBarProps } from '../UNSAFE_TabBar';\nimport { ReorderableTabBarItem, ITEM_SELECTOR } from './ReorderableTabBarItem';\nimport { ReorderableContext, useReorderable } from '../hooks/PRIVATE_useReorderable';\nimport { ReorderProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { TabBarContextMenuConfig } from '../UNSAFE_TabBarCommon';\n\nexport type ReorderableTabBarProps<K extends string | number> = Omit<\n TabBarProps<K>,\n 'aria-describedby'\n> &\n ReorderProps<K> &\n TestIdProps;\n\ntype TabBarReorderContextProps = ContextType<typeof ReorderableContext>;\n/**\n * A component that allows reordering of tabs within a TabBar.\n */\nexport const ReorderableTabBar = forwardRef(\n <K extends string | number>(\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n onReorder,\n contextMenuConfig,\n testId\n }: ReorderableTabBarProps<K>,\n ref: Ref<HTMLDivElement>\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const [dragKey, setDragKey] = useState<K | undefined>(undefined);\n const childrenArray = toChildArray(children);\n\n const displayStackProps = {\n display: display\n };\n const displayNonStackProps = {\n display: display,\n size: size\n };\n const displayProps = display === 'stacked' ? displayStackProps : displayNonStackProps;\n\n const {\n reorderProps,\n reorderContext,\n reorderInstructionsId,\n reorderStatus,\n reorderInstructions\n } = useReorderable({\n onReorder,\n rootRef,\n itemSelector: ITEM_SELECTOR\n });\n\n const tabBarReorderContext = {\n currentItemKey: reorderContext.currentItemKey,\n onReorder: onReorder as TabBarReorderContextProps['onReorder']\n };\n\n return (\n <div ref={rootRef} {...reorderProps}>\n <ReorderableContext.Provider value={tabBarReorderContext}>\n <TabBar\n ref={ref}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n layout={layout}\n edge={edge}\n selection={selection}\n onSelect={onSelect}\n onRemove={onRemove}\n testId={testId}\n {...displayProps}\n aria-describedby={reorderInstructionsId}\n contextMenuConfig={contextMenuConfig as TabBarContextMenuConfig<string | number>}>\n {childrenArray.map((child, idx) => {\n return (\n <ReorderableTabBarItem\n dragKey={dragKey}\n setDragKey={setDragKey}\n onReorder={onReorder}\n layout={layout}\n rootRef={rootRef}\n isFirstItem={idx === 0}\n isLastItem={idx === childrenArray.length - 1}>\n {child}\n </ReorderableTabBarItem>\n );\n })}\n </TabBar>\n </ReorderableContext.Provider>\n <span id={reorderInstructionsId}>\n <HiddenAccessible>{reorderInstructions}</HiddenAccessible>\n </span>\n <LiveRegion>{reorderStatus}</LiveRegion>\n </div>\n );\n }\n);\n"],"names":["ITEM_SELECTOR","ReorderableTabBarItem","children","dragKey","setDragKey","onReorder","layout","rootRef","isFirstItem","isLastItem","tabBarItemRef","useRef","getItem","useCallback","current","querySelector","setTransferData","event","dataTransfer","setData","getKey","direction","useUser","isRtl","flexDimensions","mergeInterpolations","Object","values","flexitemInterpolations","styleInterpolations","flex","rootProps","isDragged","overlayZoneBeforeProps","overlayZoneAfterProps","useReorderableItem","isDisabled","ref","itemStyles","itemOverlayFront","styles","itemOverlayRear","itemDragger","itemSelector","overlayZoneBeforeClass","classNames","class","itemOverlayFrontFirst","overlayZoneAfterClass","itemOverlayRearLast","_jsxs","jsxs","draggable","undefined","style","isKeyDefined","_Fragment","_jsx","jsx","ReorderableTabBar","forwardRef","ariaLabel","ariaLabelledby","display","size","edge","selection","onSelect","onRemove","contextMenuConfig","testId","useState","childrenArray","toChildArray","displayProps","reorderProps","reorderContext","reorderInstructionsId","reorderStatus","reorderInstructions","useReorderable","tabBarReorderContext","currentItemKey","ReorderableContext","Provider","value","TabBar","map","child","idx","length","id","HiddenAccessible","LiveRegion"],"mappings":"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"}
1
+ {"version":3,"file":"ReorderableTabBar-19a503c7.js","sources":["../../src/UNSAFE_ReorderableTabBar/ReorderableTabBarItem.tsx","../../src/UNSAFE_ReorderableTabBar/ReorderableTabBar.tsx"],"sourcesContent":["import { useRef, useCallback } from 'preact/hooks';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { getKey } from '../utils/PRIVATE_collectionUtils';\nimport { useReorderableItem } from '../hooks/PRIVATE_useReorderable';\nimport { ReorderableItemProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { styles } from './themes/ReorderableTabBarItemStyles.css';\nimport { isKeyDefined } from '../utils/UNSAFE_keys';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { classNames } from '#utils/UNSAFE_classNames';\n\nexport const ITEM_SELECTOR = '[role=\"tab\"]';\n\ntype ReorderableTabBarItem<K extends string | number> = ReorderableItemProps<K> & {\n layout: 'stretch' | 'condense' | undefined;\n isFirstItem?: boolean;\n isLastItem?: boolean;\n};\n\n/**\n * A private item that will be used by ReorderableTabBar, location TBD (could be moved to PRIVATE_TabBar)\n */\nexport function ReorderableTabBarItem<K extends string | number>({\n children,\n dragKey,\n setDragKey,\n onReorder,\n layout,\n rootRef,\n isFirstItem,\n isLastItem\n}: ReorderableTabBarItem<K>) {\n const tabBarItemRef = useRef<HTMLDivElement | null>(null);\n const getItem = useCallback(\n () => tabBarItemRef?.current?.querySelector(ITEM_SELECTOR) as HTMLElement,\n []\n );\n const setTransferData = useCallback(\n (event: DragEvent) => {\n event.dataTransfer?.setData('text/tabbar-item-key', getKey(getItem()) + '');\n },\n [getItem]\n );\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n\n // Flex dimensions\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const { rootProps, isDragged, overlayZoneBeforeProps, overlayZoneAfterProps } =\n useReorderableItem({\n isDisabled: onReorder ? false : true,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n ref: tabBarItemRef,\n getItem,\n setTransferData,\n itemStyles: {\n itemOverlayFront: styles.itemOverlayFront,\n itemOverlayRear: styles.itemOverlayRear,\n itemDragger: styles.itemDragger\n },\n itemSelector: ITEM_SELECTOR\n });\n\n const overlayZoneBeforeClass = classNames([\n overlayZoneBeforeProps?.class,\n // Set the classes specific to isFirstItem/isLastItem which is passed down from reorderable tabbar which evaluated while mapping the children\n !isRtl && isFirstItem && styles.itemOverlayFrontFirst,\n isRtl && isLastItem && styles.itemOverlayFrontFirst\n ]);\n\n const overlayZoneAfterClass = classNames([\n overlayZoneAfterProps?.class,\n // Set the classes specific to isFirstItem/isLastItem which is passed down from reorderable tabbar which evaluated while mapping the children\n !isRtl && isLastItem && styles.itemOverlayRearLast,\n isRtl && isFirstItem && styles.itemOverlayRearLast\n ]);\n\n return (\n <div\n {...rootProps}\n draggable={onReorder ? true : false}\n data-oj-draggable={onReorder ? '' : undefined}\n style={flexDimensions}>\n {children}\n {!isDragged && isKeyDefined(dragKey) && (\n <>\n <div {...overlayZoneBeforeProps} class={overlayZoneBeforeClass}></div>\n <div {...overlayZoneAfterProps} class={overlayZoneAfterClass}></div>\n </>\n )}\n </div>\n );\n}\n","import { toChildArray, Ref, ContextType } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport { useRef, useState } from 'preact/hooks';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { TabBar, TabBarProps } from '../UNSAFE_TabBar';\nimport { ReorderableTabBarItem, ITEM_SELECTOR } from './ReorderableTabBarItem';\nimport { ReorderableContext, useReorderable } from '../hooks/PRIVATE_useReorderable';\nimport { ReorderProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { TabBarContextMenuConfig } from '../UNSAFE_TabBarCommon';\n\nexport type ReorderableTabBarProps<K extends string | number> = Omit<\n TabBarProps<K>,\n 'aria-describedby'\n> &\n ReorderProps<K> &\n TestIdProps;\n\ntype TabBarReorderContextProps = ContextType<typeof ReorderableContext>;\n/**\n * A component that allows reordering of tabs within a TabBar.\n */\nexport const ReorderableTabBar = forwardRef(\n <K extends string | number>(\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n onReorder,\n contextMenuConfig,\n testId\n }: ReorderableTabBarProps<K>,\n ref: Ref<HTMLDivElement>\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const [dragKey, setDragKey] = useState<K | undefined>(undefined);\n const childrenArray = toChildArray(children);\n\n const displayStackProps = {\n display: display\n };\n const displayNonStackProps = {\n display: display,\n size: size\n };\n const displayProps = display === 'stacked' ? displayStackProps : displayNonStackProps;\n\n const {\n reorderProps,\n reorderContext,\n reorderInstructionsId,\n reorderStatus,\n reorderInstructions\n } = useReorderable({\n onReorder,\n rootRef,\n itemSelector: ITEM_SELECTOR\n });\n\n const tabBarReorderContext = {\n currentItemKey: reorderContext.currentItemKey,\n onReorder: onReorder as TabBarReorderContextProps['onReorder']\n };\n\n return (\n <div ref={rootRef} {...reorderProps}>\n <ReorderableContext.Provider value={tabBarReorderContext}>\n <TabBar\n ref={ref}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n layout={layout}\n edge={edge}\n selection={selection}\n onSelect={onSelect}\n onRemove={onRemove}\n testId={testId}\n {...displayProps}\n aria-describedby={reorderInstructionsId}\n contextMenuConfig={contextMenuConfig as TabBarContextMenuConfig<string | number>}>\n {childrenArray.map((child, idx) => {\n return (\n <ReorderableTabBarItem\n dragKey={dragKey}\n setDragKey={setDragKey}\n onReorder={onReorder}\n layout={layout}\n rootRef={rootRef}\n isFirstItem={idx === 0}\n isLastItem={idx === childrenArray.length - 1}>\n {child}\n </ReorderableTabBarItem>\n );\n })}\n </TabBar>\n </ReorderableContext.Provider>\n <span id={reorderInstructionsId}>\n <HiddenAccessible>{reorderInstructions}</HiddenAccessible>\n </span>\n <LiveRegion>{reorderStatus}</LiveRegion>\n </div>\n );\n }\n);\n"],"names":["ITEM_SELECTOR","ReorderableTabBarItem","children","dragKey","setDragKey","onReorder","layout","rootRef","isFirstItem","isLastItem","tabBarItemRef","useRef","getItem","useCallback","current","querySelector","setTransferData","event","dataTransfer","setData","getKey","direction","useUser","isRtl","flexDimensions","mergeInterpolations","Object","values","flexitemInterpolations","styleInterpolations","flex","rootProps","isDragged","overlayZoneBeforeProps","overlayZoneAfterProps","useReorderableItem","isDisabled","ref","itemStyles","itemOverlayFront","styles","itemOverlayRear","itemDragger","itemSelector","overlayZoneBeforeClass","classNames","class","itemOverlayFrontFirst","overlayZoneAfterClass","itemOverlayRearLast","_jsxs","jsxs","draggable","undefined","style","isKeyDefined","_Fragment","_jsx","jsx","ReorderableTabBar","forwardRef","ariaLabel","ariaLabelledby","display","size","edge","selection","onSelect","onRemove","contextMenuConfig","testId","useState","childrenArray","toChildArray","displayProps","reorderProps","reorderContext","reorderInstructionsId","reorderStatus","reorderInstructions","useReorderable","tabBarReorderContext","currentItemKey","ReorderableContext","Provider","value","TabBar","map","child","idx","length","id","HiddenAccessible","LiveRegion"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact/hooks', './Floating-c3558e44', './Layer-1971eddb', 'preact/compat', './LayerHost-0b288129', './keyboardUtils-fb6219eb', './useSelectCommon-a02ddf3c', './PRIVATE_SelectCommon/themes/dropdownStyles.css', './useOutsideMousedown-cb88da60', './FormFieldContext-a024b891', './logger-0f873e29', './TabbableModeContext-a9c97640', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-a59440e5', './Flex-4b81b412', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', 'css!./IconStyle.styles.css', './IconButton-dc1be00e', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-ea0be23e', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './Popup-6b57cc3e', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './Link-a8fad252', './useFocusWithin-5a504fca', './useHover-8b8a1496', './classNames-08d99695', './Separator-181f7541', './WindowOverlay-11d88211', './PRIVATE_SelectCommon/themes/mobileDropdownStyles.css', './PRIVATE_SelectCommon/themes/selectMobileDropdownStyles.css', './stringUtils-4ffd9d59', './Text-31cabc49', './TextFieldUtils-f3868e96', './UNSAFE_TextField/themes/FormControlUtilsStyles.css', './UNSAFE_TextField/themes/redwood/TextFieldInputTheme', './useAccessibleContext-23e8a333', './useComponentTheme-5aa41a8f', './useFormFieldContext-9260f081', './useTabbableMode-0a9ef009', './formControlUtils-de035f75', './textAlign-ef924afd', './mergeInterpolations-9ede4cf7', './PRIVATE_SelectCommon/themes/SelectMobileFieldInputStyles.css'], (function(e,s,t,o,a,n,l,i,r,d,c,u,b,p,h,m,x,y,S,f,F,A,w,C,g,T,v,U,I,M,E,j,N,P,_,D,L,V,k,B,O,R,H,W,K,q,G,Y,z,$,J,Q,X,Z,ee,se,te,oe,ae,ne,le,ie,re,de,ce,ue){"use strict";const be="bottom-start",pe={mainAxis:4,crossAxis:0},he={isMaxHeightAdjusted:!0,maxHeightCeiling:400},me={mainAxis:!1};function xe({"aria-labelledby":e,children:t,id:o,isOpen:n}){return n?s.jsx(a.Layer,{children:s.jsx(J.WindowOverlay,{children:s.jsx("div",{id:o,class:Q.mobileDropdownStyles.base,role:"dialog","aria-modal":"true","aria-labelledby":e,children:s.jsx(S.Flex,{width:"100%",height:"100%",maxHeight:"100%",direction:"column",children:t})})})}):null}const ye=[...Object.values(de.textInterpolations)],Se=ce.mergeInterpolations(ye),fe=n.forwardRef((({"aria-controls":e,"aria-describedby":t,"aria-expanded":o,"aria-invalid":a,"aria-label":n,"aria-labelledby":l,displayValue:i,hasEmptyLabel:r,hasInsideLabel:d=!1,isRequired:c,onBlur:u,onFocus:b,placeholder:p,textAlign:h,variant:m="default"},x)=>{const{isDisabled:y,isFocused:S,hasValue:f=!1}=le.useFormFieldContext(),{isTabbable:F,tabbableModeProps:A}=ie.useTabbableMode(),w=se.isInputPlaceholderShown(d,f,S)?p:void 0,{UNSAFE_ariaLabelledBy:C}=ae.useAccessibleContext(),g=r?Z.l([l,C]):l,{class:T}=Se({textAlign:h}),{classes:v}=ne.useComponentTheme(oe.TextFieldInputRedwoodTheme,{type:"notPassword",styleVariant:re.isEmbeddedVariant(m)?"embedded":"default",textarea:"notTextArea",input:"isInput",prefix:"noPrefix",suffix:"noSuffix",startContent:"noStartContent",endContent:"hasEndContent",insideLabel:d?"hasInsideLabel":"noInsideLabel",value:f?"hasValue":"noValue",focused:S?"isFocused":"notFocused",disabled:y?"isDisabled":"notDisabled"}),U=z.classNames([ue.selectMobileFieldInputStyles.base,T,v,"legacyEmbedded"===m&&void 0===h&&te.formControlInheritTextAlign]);return s.jsx("div",{"aria-autocomplete":"list","aria-controls":e,"aria-describedby":t,"aria-expanded":o,"aria-invalid":a,"aria-label":n,"aria-labelledby":g,"aria-required":c?"true":void 0,class:U,onBlur:u,onFocus:b,ref:x,role:"combobox",...F&&A,children:s.jsx("div",{class:ue.selectMobileFieldInputStyles.content,children:s.jsx(ee.Text,{variant:i?"inherit":"secondary",children:i||w})})})}));e.Dropdown=function({anchorRef:e,children:n,dropdownRef:l,id:u,isOpen:b,onAutoDismiss:p,onPosition:h}){const[m,x]=t.useState(be),[y,S]=t.useState(b);y!==b&&(b||x(be),S(b));const f=t.useCallback((e=>{x(e.placement),h?.(e)}),[h,x]),F=t.useCallback((e=>{p?.(e)}),[p]),A=t.useCallback((e=>{if(!e.defaultPrevented&&!i.isControlOrFunctionKey(e))switch(e.code){case i.KEYS.ESC:case i.KEYS.TAB:F(e)}}),[F]);c.useOutsideMousedown({isDisabled:!b,ref:[e,l],handler:F});const w=b?{minWidth:`${e.current?.offsetWidth}px`}:{};return b?s.jsx(a.Layer,{logicalParentRef:e,children:s.jsx(o.Floating,{anchorRef:e,sizeOptions:he,shiftOptions:me,ref:l,placement:m,offsetValue:pe,onPosition:f,children:s.jsx("div",{class:d.dropdownStyles.base,id:u,style:w,onKeyDown:A,onMouseDown:r.preventDefaultForCurrentTarget,children:n})})}):null},e.DropdownUserAssistance=function(e){const o=t.useCallback((e=>{"A"!==e.target?.tagName&&e.preventDefault()}),[]);return s.jsx(u.FormFieldContext.Provider,{value:{isFocused:!0},children:s.jsx("div",{class:d.dropdownStyles.userAssistance,onMouseDown:o,children:s.jsx(y.InlineUserAssistance,{...e})})})},e.LinkItem=({children:e,isHighlighted:o,onAction:a})=>{const{isHover:n,hoverProps:l}=Y.useHover(),{isFocused:i,focusProps:r}=G.useFocusWithin(),c=t.useCallback((e=>(e.preventDefault(),a?.(),!1)),[a]),u=z.classNames([d.dropdownStyles.results.linkItemRoot,i?d.dropdownStyles.results.linkItemFocus:void 0]),b=z.classNames([d.dropdownStyles.results.extraItem,n||i||o?d.dropdownStyles.results.linkItemHighlight:void 0]);return s.jsx("div",{class:u,...r,children:s.jsx(q.Link,{href:"#",onClick:c,children:s.jsx("div",{class:b,...l,children:e})})})},e.MobileDropdown=xe,e.SelectMobileDropdown=function({children:e,footer:t,hasHeaderSeparator:o=!0,header:a,id:n,isOpen:l,labelId:i}){return s.jsxs(xe,{id:n,isOpen:l,"aria-labelledby":i,children:[a,o&&s.jsx($.Separator,{}),s.jsx("div",{class:X.selectMobileDropdownStyles.content,children:e}),s.jsx($.Separator,{}),t]})},e.SelectMobileFieldInput=fe}));
2
- //# sourceMappingURL=SelectMobileFieldInput-d499ef86.js.map
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './Floating-c3558e44', './Layer-1971eddb', 'preact/compat', './LayerHost-0b288129', './keyboardUtils-fb6219eb', './useSelectCommon-f33709d2', './PRIVATE_SelectCommon/themes/dropdownStyles.css', './useOutsideMousedown-cb88da60', './FormFieldContext-a024b891', './logger-0f873e29', './TabbableModeContext-a9c97640', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-a59440e5', './Flex-4b81b412', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', 'css!./IconStyle.styles.css', './IconButton-dc1be00e', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-ea0be23e', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './Popup-6b57cc3e', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './Link-a8fad252', './useFocusWithin-5a504fca', './useHover-8b8a1496', './classNames-08d99695', './Separator-181f7541', './WindowOverlay-11d88211', './PRIVATE_SelectCommon/themes/mobileDropdownStyles.css', './PRIVATE_SelectCommon/themes/selectMobileDropdownStyles.css', './stringUtils-4ffd9d59', './Text-31cabc49', './TextFieldUtils-f3868e96', './UNSAFE_TextField/themes/FormControlUtilsStyles.css', './UNSAFE_TextField/themes/redwood/TextFieldInputTheme', './useAccessibleContext-23e8a333', './useComponentTheme-5aa41a8f', './useFormFieldContext-9260f081', './useTabbableMode-0a9ef009', './formControlUtils-de035f75', './textAlign-ef924afd', './mergeInterpolations-9ede4cf7', './PRIVATE_SelectCommon/themes/SelectMobileFieldInputStyles.css'], (function(e,s,t,o,a,n,l,i,r,d,c,u,b,p,h,m,x,y,S,f,F,A,w,C,g,T,v,U,I,M,E,j,N,P,_,D,L,V,k,B,O,R,H,W,K,q,G,Y,z,$,J,Q,X,Z,ee,se,te,oe,ae,ne,le,ie,re,de,ce,ue){"use strict";const be="bottom-start",pe={mainAxis:4,crossAxis:0},he={isMaxHeightAdjusted:!0,maxHeightCeiling:400},me={mainAxis:!1};function xe({"aria-labelledby":e,children:t,id:o,isOpen:n}){return n?s.jsx(a.Layer,{children:s.jsx(J.WindowOverlay,{children:s.jsx("div",{id:o,class:Q.mobileDropdownStyles.base,role:"dialog","aria-modal":"true","aria-labelledby":e,children:s.jsx(S.Flex,{width:"100%",height:"100%",maxHeight:"100%",direction:"column",children:t})})})}):null}const ye=[...Object.values(de.textInterpolations)],Se=ce.mergeInterpolations(ye),fe=n.forwardRef((({"aria-controls":e,"aria-describedby":t,"aria-expanded":o,"aria-invalid":a,"aria-label":n,"aria-labelledby":l,displayValue:i,hasEmptyLabel:r,hasInsideLabel:d=!1,isRequired:c,onBlur:u,onFocus:b,placeholder:p,textAlign:h,variant:m="default"},x)=>{const{isDisabled:y,isFocused:S,hasValue:f=!1}=le.useFormFieldContext(),{isTabbable:F,tabbableModeProps:A}=ie.useTabbableMode(),w=se.isInputPlaceholderShown(d,f,S)?p:void 0,{UNSAFE_ariaLabelledBy:C}=ae.useAccessibleContext(),g=r?Z.l([l,C]):l,{class:T}=Se({textAlign:h}),{classes:v}=ne.useComponentTheme(oe.TextFieldInputRedwoodTheme,{type:"notPassword",styleVariant:re.isEmbeddedVariant(m)?"embedded":"default",textarea:"notTextArea",input:"isInput",prefix:"noPrefix",suffix:"noSuffix",startContent:"noStartContent",endContent:"hasEndContent",insideLabel:d?"hasInsideLabel":"noInsideLabel",value:f?"hasValue":"noValue",focused:S?"isFocused":"notFocused",disabled:y?"isDisabled":"notDisabled"}),U=z.classNames([ue.selectMobileFieldInputStyles.base,T,v,"legacyEmbedded"===m&&void 0===h&&te.formControlInheritTextAlign]);return s.jsx("div",{"aria-autocomplete":"list","aria-controls":e,"aria-describedby":t,"aria-expanded":o,"aria-invalid":a,"aria-label":n,"aria-labelledby":g,"aria-required":c?"true":void 0,class:U,onBlur:u,onFocus:b,ref:x,role:"combobox",...F&&A,children:s.jsx("div",{class:ue.selectMobileFieldInputStyles.content,children:s.jsx(ee.Text,{variant:i?"inherit":"secondary",children:i||w})})})}));e.Dropdown=function({anchorRef:e,children:n,dropdownRef:l,id:u,isOpen:b,onAutoDismiss:p,onPosition:h}){const[m,x]=t.useState(be),[y,S]=t.useState(b);y!==b&&(b||x(be),S(b));const f=t.useCallback((e=>{x(e.placement),h?.(e)}),[h,x]),F=t.useCallback((e=>{p?.(e)}),[p]),A=t.useCallback((e=>{if(!e.defaultPrevented&&!i.isControlOrFunctionKey(e))switch(e.code){case i.KEYS.ESC:case i.KEYS.TAB:F(e)}}),[F]);c.useOutsideMousedown({isDisabled:!b,ref:[e,l],handler:F});const w=b?{minWidth:`${e.current?.offsetWidth}px`}:{};return b?s.jsx(a.Layer,{logicalParentRef:e,children:s.jsx(o.Floating,{anchorRef:e,sizeOptions:he,shiftOptions:me,ref:l,placement:m,offsetValue:pe,onPosition:f,children:s.jsx("div",{class:d.dropdownStyles.base,id:u,style:w,onKeyDown:A,onMouseDown:r.preventDefaultForCurrentTarget,children:n})})}):null},e.DropdownUserAssistance=function(e){const o=t.useCallback((e=>{"A"!==e.target?.tagName&&e.preventDefault()}),[]);return s.jsx(u.FormFieldContext.Provider,{value:{isFocused:!0},children:s.jsx("div",{class:d.dropdownStyles.userAssistance,onMouseDown:o,children:s.jsx(y.InlineUserAssistance,{...e})})})},e.LinkItem=({children:e,isHighlighted:o,onAction:a})=>{const{isHover:n,hoverProps:l}=Y.useHover(),{isFocused:i,focusProps:r}=G.useFocusWithin(),c=t.useCallback((e=>(e.preventDefault(),a?.(),!1)),[a]),u=z.classNames([d.dropdownStyles.results.linkItemRoot,i?d.dropdownStyles.results.linkItemFocus:void 0]),b=z.classNames([d.dropdownStyles.results.extraItem,n||i||o?d.dropdownStyles.results.linkItemHighlight:void 0]);return s.jsx("div",{class:u,...r,children:s.jsx(q.Link,{href:"#",onClick:c,children:s.jsx("div",{class:b,...l,children:e})})})},e.MobileDropdown=xe,e.SelectMobileDropdown=function({children:e,footer:t,hasHeaderSeparator:o=!0,header:a,id:n,isOpen:l,labelId:i}){return s.jsxs(xe,{id:n,isOpen:l,"aria-labelledby":i,children:[a,o&&s.jsx($.Separator,{}),s.jsx("div",{class:X.selectMobileDropdownStyles.content,children:e}),s.jsx($.Separator,{}),t]})},e.SelectMobileFieldInput=fe}));
2
+ //# sourceMappingURL=SelectMobileFieldInput-4795a794.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectMobileFieldInput-d499ef86.js","sources":["../../src/PRIVATE_SelectCommon/Dropdown.tsx","../../src/PRIVATE_SelectCommon/MobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileFieldInput.tsx","../../src/PRIVATE_SelectCommon/DropdownUserAssistance.tsx","../../src/PRIVATE_SelectCommon/LinkItem.tsx","../../src/PRIVATE_SelectCommon/SelectMobileDropdown.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren, ComponentProps } from 'preact';\nimport { MutableRef, useCallback, useState } from 'preact/hooks';\nimport { Floating, PositionData } from '../UNSAFE_Floating';\nimport { Layer } from '../UNSAFE_Layer';\nimport { isControlOrFunctionKey, KEYS } from '../utils/PRIVATE_keyboardUtils';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n//Once Dropdown is consumed this will be removed\nimport { useOutsideMousedown } from '../hooks/PRIVATE_useOutsideMousedown';\n\ntype FloatingProps = ComponentProps<typeof Floating>;\n\ntype Props = {\n anchorRef: MutableRef<HTMLElement | null>;\n children?: ComponentChildren;\n dropdownRef: MutableRef<HTMLElement | null>;\n id?: string;\n isOpen?: boolean;\n onAutoDismiss?: (event?: Event) => void;\n onPosition?: FloatingProps['onPosition'];\n};\n\nconst DEFAULT_PLACEMENT = 'bottom-start';\n// TODO: get dropdown y (mainAxis) offset from --oj-c-PRIVATE-DO-NOT-USE-private-core-global-dropdown-offset\nconst DROPDOWN_OFFSET: FloatingProps['offsetValue'] = { mainAxis: 4, crossAxis: 0 };\nconst DROPDOWN_SIZE_OPTIONS: FloatingProps['sizeOptions'] = {\n isMaxHeightAdjusted: true,\n maxHeightCeiling: 400\n};\nconst DROPDOWN_SHIFT_OPTIONS: FloatingProps['shiftOptions'] = {\n mainAxis: false\n};\n\n//TODO: Start consuming PRIVATE_Dropdown. JET-62565\nexport function Dropdown({\n anchorRef,\n children,\n dropdownRef,\n id,\n isOpen,\n onAutoDismiss,\n onPosition\n}: Props) {\n const [placement, setPlacement] = useState<FloatingProps['placement']>(DEFAULT_PLACEMENT);\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\n if (prevIsOpen !== isOpen) {\n // reset the placement to the default when the dropdown closes, not opens, so that it doesn't\n // initially open in the previous position and then move to the default position on the\n // rerender after the state is updated\n if (!isOpen) {\n setPlacement(DEFAULT_PLACEMENT);\n }\n setPrevIsOpen(isOpen);\n }\n\n const handlePosition = useCallback(\n (positionData: PositionData) => {\n // update the placement so that the dropdown stays where it is until there is a collision,\n // i.e. it no longer fits, instead of letting it try to move back to the default position\n // on every render\n setPlacement(positionData.placement);\n\n // call the callback that was passed in through props\n onPosition?.(positionData);\n },\n [onPosition, setPlacement]\n );\n\n const handleAutoDismiss = useCallback(\n (event: Event) => {\n onAutoDismiss?.(event);\n },\n [onAutoDismiss]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.defaultPrevented || isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.ESC:\n case KEYS.TAB:\n handleAutoDismiss(event);\n break;\n }\n },\n [handleAutoDismiss]\n );\n\n // use the mousedown event to be consistent with legacy JET and so that we're hiding the dropdown\n // on the same event where focus will transfer\n useOutsideMousedown({\n isDisabled: !isOpen,\n ref: [anchorRef, dropdownRef],\n handler: handleAutoDismiss\n });\n\n const inlineStyle = isOpen\n ? {\n minWidth: `${anchorRef.current?.offsetWidth}px`\n }\n : {};\n\n return !isOpen ? null : (\n <Layer logicalParentRef={anchorRef}>\n <Floating\n anchorRef={anchorRef}\n sizeOptions={DROPDOWN_SIZE_OPTIONS}\n shiftOptions={DROPDOWN_SHIFT_OPTIONS}\n ref={dropdownRef}\n placement={placement}\n offsetValue={DROPDOWN_OFFSET}\n onPosition={handlePosition}>\n <div\n class={dropdownStyles.base}\n id={id}\n style={inlineStyle}\n onKeyDown={handleKeyDown}\n onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </Floating>\n </Layer>\n );\n}\n","import type { ComponentChildren, JSX } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Layer } from '../UNSAFE_Layer';\nimport { WindowOverlay } from '../UNSAFE_WindowOverlay';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { mobileDropdownStyles } from './themes/mobileDropdownStyles.css';\n\ntype Props = {\n /**\n * Id of the label to associate with the dropdown (e.g. the label of the filter field).\n */\n 'aria-labelledby'?: UnpackSignals<JSX.AriaAttributes>['aria-labelledby'];\n\n /**\n * The dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The id for the top level element\n */\n id?: string;\n\n /**\n * Specifies whether the dropdown is being shown\n */\n isOpen?: boolean;\n};\n\nexport function MobileDropdown({ 'aria-labelledby': ariaLabelledBy, children, id, isOpen }: Props) {\n return !isOpen ? null : (\n <Layer>\n <WindowOverlay>\n <div\n id={id}\n class={mobileDropdownStyles.base}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ariaLabelledBy}>\n <Flex width=\"100%\" height=\"100%\" maxHeight=\"100%\" direction=\"column\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n}\n","import type { ContextType, Ref, JSX } from 'preact';\nimport { forwardRef } from 'preact/compat';\n\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { merge } from '@oracle/oraclejet-internal-utilities/stringUtils';\n\nimport { Text } from '#UNSAFE_Text';\nimport { isInputPlaceholderShown } from '#UNSAFE_TextField/TextFieldUtils';\nimport { formControlInheritTextAlign } from '#UNSAFE_TextField/themes/FormControlUtilsStyles.css';\nimport type { TextFieldInputVariantOptions } from '#UNSAFE_TextField/themes/TextFieldInputStyles.css';\nimport { TextFieldInputRedwoodTheme } from '#UNSAFE_TextField/themes/redwood/TextFieldInputTheme';\nimport { useAccessibleContext } from '#hooks/UNSAFE_useAccessibleContext';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { useFormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { FormVariantContext } from '#hooks/UNSAFE_useFormVariantContext';\nimport { useTabbableMode } from '#hooks/UNSAFE_useTabbableMode';\nimport { isEmbeddedVariant } from '#utils/PRIVATE_formControlUtils';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { type TextProps, textInterpolations } from '#utils/UNSAFE_interpolations/text';\nimport { mergeInterpolations } from '#utils/UNSAFE_mergeInterpolations';\nimport { selectMobileFieldInputStyles } from './themes/SelectMobileFieldInputStyles.css';\n\ntype AriaProps = Pick<\n UnpackSignals<JSX.AriaAttributes>,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'aria-labelledby'\n>;\n\ntype EventProps = Pick<UnpackSignals<JSX.IntrinsicElements['div']>, 'onBlur' | 'onFocus'>;\n\ntype Props = AriaProps &\n EventProps &\n TextProps & {\n displayValue?: string;\n hasEmptyLabel?: boolean;\n hasInsideLabel?: boolean;\n isRequired?: boolean;\n placeholder?: string;\n variant?: ContextType<typeof FormVariantContext>;\n };\n\nconst interpolations = [...Object.values(textInterpolations)];\nconst styleInterpolations = mergeInterpolations<Props>(interpolations);\n\n/**\n * This component is used for rendering the main field in mobile phones. This is a bit different from the\n * normal main field (TextFieldInput) that we use for desktop & tablet devices in the way that\n * a user will not be able to edit the value of this field. But, one can still have other functionalities\n * of having a placeholder, tab in & out of it, and other such functionalities of an enabled field.\n *\n * This also differs from ReadonlyTextFieldInput in the following ways:\n * 1. This will be rendered as div as well, but has a role of combobox set on it\n * 2. This will not be read as readonly input by the screen readers\n * 3. This has the stylings much similar to the TextFieldInput component\n * 4. This supports the use of placeholder and shows it when there is no value present\n * 5. This supports having the variant property and styles accordingly\n *\n * As such, this is very similar to the TextFieldInput except that this does not allow user input.\n * Note: we cannot use TextFieldInput with readonly set on it; even though it might provide us the\n * behavior we need, it will make the field as readonly and screen readers read the same about this\n * field. This will be an incorrect representation contextually as one can still edit the value by opening\n * the dropdown and changing the selection.\n */\nexport const SelectMobileFieldInput = forwardRef(\n (\n {\n 'aria-controls': ariaControls,\n 'aria-describedby': ariaDescribedBy,\n 'aria-expanded': ariaExpanded,\n 'aria-invalid': ariaInvalid,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n displayValue,\n hasEmptyLabel,\n hasInsideLabel = false,\n isRequired,\n onBlur,\n onFocus,\n placeholder,\n textAlign,\n variant = 'default'\n }: Props,\n ref?: Ref<HTMLDivElement>\n ) => {\n // consume required contexts\n const { isDisabled, isFocused, hasValue = false } = useFormFieldContext();\n const { isTabbable, tabbableModeProps } = useTabbableMode();\n\n // setup properties\n const myPlaceholder = isInputPlaceholderShown(hasInsideLabel, hasValue, isFocused)\n ? placeholder\n : undefined;\n\n // Add unsafe API for specifying an external label which is added to ariaLabelledBy on the input,\n // only when labelEdge is 'none' and label is ''. Since ariaLabelledBy takes precedence over all other\n // kinds of labels, this helps to ensure we don't override a meaningful label.\n const { UNSAFE_ariaLabelledBy } = useAccessibleContext();\n const mergedAriaLabelledBy = hasEmptyLabel\n ? merge([ariaLabelledBy, UNSAFE_ariaLabelledBy])\n : ariaLabelledBy;\n\n // setup style classes\n const { class: styleInterpolationClasses } = styleInterpolations({ textAlign });\n const { classes: themeClasses } = useComponentTheme<TextFieldInputVariantOptions>(\n TextFieldInputRedwoodTheme,\n {\n type: 'notPassword',\n styleVariant: isEmbeddedVariant(variant) ? 'embedded' : 'default',\n textarea: 'notTextArea',\n input: 'isInput',\n prefix: 'noPrefix',\n suffix: 'noSuffix',\n startContent: 'noStartContent',\n endContent: 'hasEndContent',\n insideLabel: hasInsideLabel ? 'hasInsideLabel' : 'noInsideLabel',\n value: hasValue ? 'hasValue' : 'noValue',\n focused: isFocused ? 'isFocused' : 'notFocused',\n disabled: isDisabled ? 'isDisabled' : 'notDisabled'\n }\n );\n const rootDivStyleClasses = classNames([\n selectMobileFieldInputStyles.base,\n styleInterpolationClasses,\n themeClasses,\n // JET-72775 - Form control alignment in tables\n // When we are in legacy collection components, we want to inherit the text align\n // when it is not set explicitly.\n variant === 'legacyEmbedded' && textAlign === undefined && formControlInheritTextAlign\n ]);\n\n return (\n <div\n aria-autocomplete=\"list\"\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-invalid={ariaInvalid}\n aria-label={ariaLabel}\n aria-labelledby={mergedAriaLabelledBy}\n aria-required={isRequired ? 'true' : undefined}\n class={rootDivStyleClasses}\n onBlur={onBlur}\n onFocus={onFocus}\n ref={ref}\n role=\"combobox\"\n {...(isTabbable && tabbableModeProps)}>\n <div class={selectMobileFieldInputStyles.content}>\n <Text variant={displayValue ? 'inherit' : 'secondary'}>\n {displayValue || myPlaceholder}\n </Text>\n </div>\n </div>\n );\n }\n);\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype InlineUserAssistanceProps = Pick<\n ComponentProps<typeof InlineUserAssistance>,\n | 'assistiveText'\n | 'fieldLabel'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'id'\n | 'userAssistanceDensity'\n>;\n\nexport function DropdownUserAssistance(props: InlineUserAssistanceProps) {\n // Prevent the focus from transferring when the user clicks on an empty/non-clickable area\n // of the user assistance\n const handleMouseDown = useCallback((event: MouseEvent) => {\n // Don't call preventDefault when the user clicks on the help source link, so that the\n // focus is allowed to transfer in that case.\n if ((event.target as Element)?.tagName !== 'A') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={dropdownStyles.userAssistance} onMouseDown={handleMouseDown}>\n <InlineUserAssistance {...props} />\n </div>\n </FormFieldContext.Provider>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { Link } from '#UNSAFE_Link';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useHover } from '#hooks/UNSAFE_useHover';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n /**\n * Child content of the item.\n */\n children: string;\n /**\n * Specifies whether to highlight the item.\n */\n isHighlighted?: boolean;\n /**\n * Callback invoked when the user triggers the link, for example by clicking or pressing Enter.\n */\n onAction?: () => void;\n};\n\n/**\n * This component renders a link that looks like a list item in a Select* component dropdown.\n * It fires an action when the user triggers it, and is intended to be used for launching\n * external application UI from within the dropdown, for example to provide advanced search or\n * add to list functionality.\n * The LinkItem would typically be shown in a fixed position above or below the list itself.\n */\nconst LinkItem = ({ children, isHighlighted, onAction }: Props) => {\n const { isHover, hoverProps } = useHover();\n const { isFocused, focusProps } = useFocusWithin();\n\n const handleClick = useCallback(\n (e: Event) => {\n // prevent the link from actually navigating by preventing default and returning false\n e.preventDefault();\n onAction?.();\n return false;\n },\n [onAction]\n );\n\n const rootClasses = classNames([\n dropdownStyles.results.linkItemRoot,\n isFocused ? dropdownStyles.results.linkItemFocus : undefined\n ]);\n\n const linkClasses = classNames([\n dropdownStyles.results.extraItem,\n isHover || isFocused || isHighlighted ? dropdownStyles.results.linkItemHighlight : undefined\n ]);\n\n return (\n <div class={rootClasses} {...focusProps}>\n <Link href=\"#\" onClick={handleClick}>\n <div class={linkClasses} {...hoverProps}>\n {children}\n </div>\n </Link>\n </div>\n );\n};\n\nexport { LinkItem };\n","import { ComponentChildren, ComponentProps } from 'preact';\nimport { Separator } from '../UNSAFE_Separator';\nimport { MobileDropdown } from './MobileDropdown';\nimport { selectMobileDropdownStyles } from './themes/selectMobileDropdownStyles.css';\n\ntype MobileDropdownProps = ComponentProps<typeof MobileDropdown>;\ntype PassThroughMobileDropdownProps = Pick<MobileDropdownProps, 'id' | 'isOpen'>;\n\ntype Props = PassThroughMobileDropdownProps & {\n /**\n * The main dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The components to be placed in the end of the dropdown\n */\n footer?: ComponentChildren;\n\n /**\n * The components to be placed in the beginning of the dropdown\n */\n header?: ComponentChildren;\n\n /**\n * Specifies whether to have a separator between header and content\n */\n hasHeaderSeparator?: boolean;\n\n /**\n * Id of the label for the filter field.\n */\n labelId?: string;\n};\n\nexport function SelectMobileDropdown({\n children,\n footer,\n hasHeaderSeparator = true,\n header,\n id,\n isOpen,\n labelId\n}: Props) {\n return (\n <MobileDropdown id={id} isOpen={isOpen} aria-labelledby={labelId}>\n {header}\n {hasHeaderSeparator && <Separator />}\n {/* TODO: Add overflow support to View and use it here */}\n {/* */}\n <div class={selectMobileDropdownStyles.content}>{children}</div>\n <Separator />\n {footer}\n </MobileDropdown>\n );\n}\n"],"names":["DEFAULT_PLACEMENT","DROPDOWN_OFFSET","mainAxis","crossAxis","DROPDOWN_SIZE_OPTIONS","isMaxHeightAdjusted","maxHeightCeiling","DROPDOWN_SHIFT_OPTIONS","MobileDropdown","ariaLabelledBy","children","id","isOpen","_jsx","jsx","Layer","WindowOverlay","class","mobileDropdownStyles","base","role","Flex","width","height","maxHeight","direction","interpolations","Object","values","textInterpolations","styleInterpolations","mergeInterpolations","SelectMobileFieldInput","forwardRef","ariaControls","ariaDescribedBy","ariaExpanded","ariaInvalid","ariaLabel","displayValue","hasEmptyLabel","hasInsideLabel","isRequired","onBlur","onFocus","placeholder","textAlign","variant","ref","isDisabled","isFocused","hasValue","useFormFieldContext","isTabbable","tabbableModeProps","useTabbableMode","myPlaceholder","isInputPlaceholderShown","undefined","UNSAFE_ariaLabelledBy","useAccessibleContext","mergedAriaLabelledBy","merge","styleInterpolationClasses","classes","themeClasses","useComponentTheme","TextFieldInputRedwoodTheme","type","styleVariant","isEmbeddedVariant","textarea","input","prefix","suffix","startContent","endContent","insideLabel","value","focused","disabled","rootDivStyleClasses","classNames","selectMobileFieldInputStyles","formControlInheritTextAlign","content","Text","anchorRef","dropdownRef","onAutoDismiss","onPosition","placement","setPlacement","useState","prevIsOpen","setPrevIsOpen","handlePosition","useCallback","positionData","handleAutoDismiss","event","handleKeyDown","defaultPrevented","isControlOrFunctionKey","code","KEYS","ESC","TAB","useOutsideMousedown","handler","inlineStyle","minWidth","current","offsetWidth","logicalParentRef","Floating","sizeOptions","shiftOptions","offsetValue","dropdownStyles","style","onKeyDown","onMouseDown","preventDefaultForCurrentTarget","props","handleMouseDown","target","tagName","preventDefault","FormFieldContext","Provider","userAssistance","InlineUserAssistance","isHighlighted","onAction","isHover","hoverProps","useHover","focusProps","useFocusWithin","handleClick","e","rootClasses","results","linkItemRoot","linkItemFocus","linkClasses","extraItem","linkItemHighlight","Link","href","onClick","footer","hasHeaderSeparator","header","labelId","_jsxs","Separator","selectMobileDropdownStyles"],"mappings":"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"}
1
+ {"version":3,"file":"SelectMobileFieldInput-4795a794.js","sources":["../../src/PRIVATE_SelectCommon/Dropdown.tsx","../../src/PRIVATE_SelectCommon/MobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileFieldInput.tsx","../../src/PRIVATE_SelectCommon/DropdownUserAssistance.tsx","../../src/PRIVATE_SelectCommon/LinkItem.tsx","../../src/PRIVATE_SelectCommon/SelectMobileDropdown.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren, ComponentProps } from 'preact';\nimport { MutableRef, useCallback, useState } from 'preact/hooks';\nimport { Floating, PositionData } from '../UNSAFE_Floating';\nimport { Layer } from '../UNSAFE_Layer';\nimport { isControlOrFunctionKey, KEYS } from '../utils/PRIVATE_keyboardUtils';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n//Once Dropdown is consumed this will be removed\nimport { useOutsideMousedown } from '../hooks/PRIVATE_useOutsideMousedown';\n\ntype FloatingProps = ComponentProps<typeof Floating>;\n\ntype Props = {\n anchorRef: MutableRef<HTMLElement | null>;\n children?: ComponentChildren;\n dropdownRef: MutableRef<HTMLElement | null>;\n id?: string;\n isOpen?: boolean;\n onAutoDismiss?: (event?: Event) => void;\n onPosition?: FloatingProps['onPosition'];\n};\n\nconst DEFAULT_PLACEMENT = 'bottom-start';\n// TODO: get dropdown y (mainAxis) offset from --oj-c-PRIVATE-DO-NOT-USE-private-core-global-dropdown-offset\nconst DROPDOWN_OFFSET: FloatingProps['offsetValue'] = { mainAxis: 4, crossAxis: 0 };\nconst DROPDOWN_SIZE_OPTIONS: FloatingProps['sizeOptions'] = {\n isMaxHeightAdjusted: true,\n maxHeightCeiling: 400\n};\nconst DROPDOWN_SHIFT_OPTIONS: FloatingProps['shiftOptions'] = {\n mainAxis: false\n};\n\n//TODO: Start consuming PRIVATE_Dropdown. JET-62565\nexport function Dropdown({\n anchorRef,\n children,\n dropdownRef,\n id,\n isOpen,\n onAutoDismiss,\n onPosition\n}: Props) {\n const [placement, setPlacement] = useState<FloatingProps['placement']>(DEFAULT_PLACEMENT);\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\n if (prevIsOpen !== isOpen) {\n // reset the placement to the default when the dropdown closes, not opens, so that it doesn't\n // initially open in the previous position and then move to the default position on the\n // rerender after the state is updated\n if (!isOpen) {\n setPlacement(DEFAULT_PLACEMENT);\n }\n setPrevIsOpen(isOpen);\n }\n\n const handlePosition = useCallback(\n (positionData: PositionData) => {\n // update the placement so that the dropdown stays where it is until there is a collision,\n // i.e. it no longer fits, instead of letting it try to move back to the default position\n // on every render\n setPlacement(positionData.placement);\n\n // call the callback that was passed in through props\n onPosition?.(positionData);\n },\n [onPosition, setPlacement]\n );\n\n const handleAutoDismiss = useCallback(\n (event: Event) => {\n onAutoDismiss?.(event);\n },\n [onAutoDismiss]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.defaultPrevented || isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.ESC:\n case KEYS.TAB:\n handleAutoDismiss(event);\n break;\n }\n },\n [handleAutoDismiss]\n );\n\n // use the mousedown event to be consistent with legacy JET and so that we're hiding the dropdown\n // on the same event where focus will transfer\n useOutsideMousedown({\n isDisabled: !isOpen,\n ref: [anchorRef, dropdownRef],\n handler: handleAutoDismiss\n });\n\n const inlineStyle = isOpen\n ? {\n minWidth: `${anchorRef.current?.offsetWidth}px`\n }\n : {};\n\n return !isOpen ? null : (\n <Layer logicalParentRef={anchorRef}>\n <Floating\n anchorRef={anchorRef}\n sizeOptions={DROPDOWN_SIZE_OPTIONS}\n shiftOptions={DROPDOWN_SHIFT_OPTIONS}\n ref={dropdownRef}\n placement={placement}\n offsetValue={DROPDOWN_OFFSET}\n onPosition={handlePosition}>\n <div\n class={dropdownStyles.base}\n id={id}\n style={inlineStyle}\n onKeyDown={handleKeyDown}\n onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </Floating>\n </Layer>\n );\n}\n","import type { ComponentChildren, JSX } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Layer } from '../UNSAFE_Layer';\nimport { WindowOverlay } from '../UNSAFE_WindowOverlay';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { mobileDropdownStyles } from './themes/mobileDropdownStyles.css';\n\ntype Props = {\n /**\n * Id of the label to associate with the dropdown (e.g. the label of the filter field).\n */\n 'aria-labelledby'?: UnpackSignals<JSX.AriaAttributes>['aria-labelledby'];\n\n /**\n * The dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The id for the top level element\n */\n id?: string;\n\n /**\n * Specifies whether the dropdown is being shown\n */\n isOpen?: boolean;\n};\n\nexport function MobileDropdown({ 'aria-labelledby': ariaLabelledBy, children, id, isOpen }: Props) {\n return !isOpen ? null : (\n <Layer>\n <WindowOverlay>\n <div\n id={id}\n class={mobileDropdownStyles.base}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ariaLabelledBy}>\n <Flex width=\"100%\" height=\"100%\" maxHeight=\"100%\" direction=\"column\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n}\n","import type { ContextType, Ref, JSX } from 'preact';\nimport { forwardRef } from 'preact/compat';\n\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { merge } from '@oracle/oraclejet-internal-utilities/stringUtils';\n\nimport { Text } from '#UNSAFE_Text';\nimport { isInputPlaceholderShown } from '#UNSAFE_TextField/TextFieldUtils';\nimport { formControlInheritTextAlign } from '#UNSAFE_TextField/themes/FormControlUtilsStyles.css';\nimport type { TextFieldInputVariantOptions } from '#UNSAFE_TextField/themes/TextFieldInputStyles.css';\nimport { TextFieldInputRedwoodTheme } from '#UNSAFE_TextField/themes/redwood/TextFieldInputTheme';\nimport { useAccessibleContext } from '#hooks/UNSAFE_useAccessibleContext';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { useFormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { FormVariantContext } from '#hooks/UNSAFE_useFormVariantContext';\nimport { useTabbableMode } from '#hooks/UNSAFE_useTabbableMode';\nimport { isEmbeddedVariant } from '#utils/PRIVATE_formControlUtils';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { type TextProps, textInterpolations } from '#utils/UNSAFE_interpolations/text';\nimport { mergeInterpolations } from '#utils/UNSAFE_mergeInterpolations';\nimport { selectMobileFieldInputStyles } from './themes/SelectMobileFieldInputStyles.css';\n\ntype AriaProps = Pick<\n UnpackSignals<JSX.AriaAttributes>,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'aria-labelledby'\n>;\n\ntype EventProps = Pick<UnpackSignals<JSX.IntrinsicElements['div']>, 'onBlur' | 'onFocus'>;\n\ntype Props = AriaProps &\n EventProps &\n TextProps & {\n displayValue?: string;\n hasEmptyLabel?: boolean;\n hasInsideLabel?: boolean;\n isRequired?: boolean;\n placeholder?: string;\n variant?: ContextType<typeof FormVariantContext>;\n };\n\nconst interpolations = [...Object.values(textInterpolations)];\nconst styleInterpolations = mergeInterpolations<Props>(interpolations);\n\n/**\n * This component is used for rendering the main field in mobile phones. This is a bit different from the\n * normal main field (TextFieldInput) that we use for desktop & tablet devices in the way that\n * a user will not be able to edit the value of this field. But, one can still have other functionalities\n * of having a placeholder, tab in & out of it, and other such functionalities of an enabled field.\n *\n * This also differs from ReadonlyTextFieldInput in the following ways:\n * 1. This will be rendered as div as well, but has a role of combobox set on it\n * 2. This will not be read as readonly input by the screen readers\n * 3. This has the stylings much similar to the TextFieldInput component\n * 4. This supports the use of placeholder and shows it when there is no value present\n * 5. This supports having the variant property and styles accordingly\n *\n * As such, this is very similar to the TextFieldInput except that this does not allow user input.\n * Note: we cannot use TextFieldInput with readonly set on it; even though it might provide us the\n * behavior we need, it will make the field as readonly and screen readers read the same about this\n * field. This will be an incorrect representation contextually as one can still edit the value by opening\n * the dropdown and changing the selection.\n */\nexport const SelectMobileFieldInput = forwardRef(\n (\n {\n 'aria-controls': ariaControls,\n 'aria-describedby': ariaDescribedBy,\n 'aria-expanded': ariaExpanded,\n 'aria-invalid': ariaInvalid,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n displayValue,\n hasEmptyLabel,\n hasInsideLabel = false,\n isRequired,\n onBlur,\n onFocus,\n placeholder,\n textAlign,\n variant = 'default'\n }: Props,\n ref?: Ref<HTMLDivElement>\n ) => {\n // consume required contexts\n const { isDisabled, isFocused, hasValue = false } = useFormFieldContext();\n const { isTabbable, tabbableModeProps } = useTabbableMode();\n\n // setup properties\n const myPlaceholder = isInputPlaceholderShown(hasInsideLabel, hasValue, isFocused)\n ? placeholder\n : undefined;\n\n // Add unsafe API for specifying an external label which is added to ariaLabelledBy on the input,\n // only when labelEdge is 'none' and label is ''. Since ariaLabelledBy takes precedence over all other\n // kinds of labels, this helps to ensure we don't override a meaningful label.\n const { UNSAFE_ariaLabelledBy } = useAccessibleContext();\n const mergedAriaLabelledBy = hasEmptyLabel\n ? merge([ariaLabelledBy, UNSAFE_ariaLabelledBy])\n : ariaLabelledBy;\n\n // setup style classes\n const { class: styleInterpolationClasses } = styleInterpolations({ textAlign });\n const { classes: themeClasses } = useComponentTheme<TextFieldInputVariantOptions>(\n TextFieldInputRedwoodTheme,\n {\n type: 'notPassword',\n styleVariant: isEmbeddedVariant(variant) ? 'embedded' : 'default',\n textarea: 'notTextArea',\n input: 'isInput',\n prefix: 'noPrefix',\n suffix: 'noSuffix',\n startContent: 'noStartContent',\n endContent: 'hasEndContent',\n insideLabel: hasInsideLabel ? 'hasInsideLabel' : 'noInsideLabel',\n value: hasValue ? 'hasValue' : 'noValue',\n focused: isFocused ? 'isFocused' : 'notFocused',\n disabled: isDisabled ? 'isDisabled' : 'notDisabled'\n }\n );\n const rootDivStyleClasses = classNames([\n selectMobileFieldInputStyles.base,\n styleInterpolationClasses,\n themeClasses,\n // JET-72775 - Form control alignment in tables\n // When we are in legacy collection components, we want to inherit the text align\n // when it is not set explicitly.\n variant === 'legacyEmbedded' && textAlign === undefined && formControlInheritTextAlign\n ]);\n\n return (\n <div\n aria-autocomplete=\"list\"\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-invalid={ariaInvalid}\n aria-label={ariaLabel}\n aria-labelledby={mergedAriaLabelledBy}\n aria-required={isRequired ? 'true' : undefined}\n class={rootDivStyleClasses}\n onBlur={onBlur}\n onFocus={onFocus}\n ref={ref}\n role=\"combobox\"\n {...(isTabbable && tabbableModeProps)}>\n <div class={selectMobileFieldInputStyles.content}>\n <Text variant={displayValue ? 'inherit' : 'secondary'}>\n {displayValue || myPlaceholder}\n </Text>\n </div>\n </div>\n );\n }\n);\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype InlineUserAssistanceProps = Pick<\n ComponentProps<typeof InlineUserAssistance>,\n | 'assistiveText'\n | 'fieldLabel'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'id'\n | 'userAssistanceDensity'\n>;\n\nexport function DropdownUserAssistance(props: InlineUserAssistanceProps) {\n // Prevent the focus from transferring when the user clicks on an empty/non-clickable area\n // of the user assistance\n const handleMouseDown = useCallback((event: MouseEvent) => {\n // Don't call preventDefault when the user clicks on the help source link, so that the\n // focus is allowed to transfer in that case.\n if ((event.target as Element)?.tagName !== 'A') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={dropdownStyles.userAssistance} onMouseDown={handleMouseDown}>\n <InlineUserAssistance {...props} />\n </div>\n </FormFieldContext.Provider>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { Link } from '#UNSAFE_Link';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useHover } from '#hooks/UNSAFE_useHover';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n /**\n * Child content of the item.\n */\n children: string;\n /**\n * Specifies whether to highlight the item.\n */\n isHighlighted?: boolean;\n /**\n * Callback invoked when the user triggers the link, for example by clicking or pressing Enter.\n */\n onAction?: () => void;\n};\n\n/**\n * This component renders a link that looks like a list item in a Select* component dropdown.\n * It fires an action when the user triggers it, and is intended to be used for launching\n * external application UI from within the dropdown, for example to provide advanced search or\n * add to list functionality.\n * The LinkItem would typically be shown in a fixed position above or below the list itself.\n */\nconst LinkItem = ({ children, isHighlighted, onAction }: Props) => {\n const { isHover, hoverProps } = useHover();\n const { isFocused, focusProps } = useFocusWithin();\n\n const handleClick = useCallback(\n (e: Event) => {\n // prevent the link from actually navigating by preventing default and returning false\n e.preventDefault();\n onAction?.();\n return false;\n },\n [onAction]\n );\n\n const rootClasses = classNames([\n dropdownStyles.results.linkItemRoot,\n isFocused ? dropdownStyles.results.linkItemFocus : undefined\n ]);\n\n const linkClasses = classNames([\n dropdownStyles.results.extraItem,\n isHover || isFocused || isHighlighted ? dropdownStyles.results.linkItemHighlight : undefined\n ]);\n\n return (\n <div class={rootClasses} {...focusProps}>\n <Link href=\"#\" onClick={handleClick}>\n <div class={linkClasses} {...hoverProps}>\n {children}\n </div>\n </Link>\n </div>\n );\n};\n\nexport { LinkItem };\n","import { ComponentChildren, ComponentProps } from 'preact';\nimport { Separator } from '../UNSAFE_Separator';\nimport { MobileDropdown } from './MobileDropdown';\nimport { selectMobileDropdownStyles } from './themes/selectMobileDropdownStyles.css';\n\ntype MobileDropdownProps = ComponentProps<typeof MobileDropdown>;\ntype PassThroughMobileDropdownProps = Pick<MobileDropdownProps, 'id' | 'isOpen'>;\n\ntype Props = PassThroughMobileDropdownProps & {\n /**\n * The main dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The components to be placed in the end of the dropdown\n */\n footer?: ComponentChildren;\n\n /**\n * The components to be placed in the beginning of the dropdown\n */\n header?: ComponentChildren;\n\n /**\n * Specifies whether to have a separator between header and content\n */\n hasHeaderSeparator?: boolean;\n\n /**\n * Id of the label for the filter field.\n */\n labelId?: string;\n};\n\nexport function SelectMobileDropdown({\n children,\n footer,\n hasHeaderSeparator = true,\n header,\n id,\n isOpen,\n labelId\n}: Props) {\n return (\n <MobileDropdown id={id} isOpen={isOpen} aria-labelledby={labelId}>\n {header}\n {hasHeaderSeparator && <Separator />}\n {/* TODO: Add overflow support to View and use it here */}\n {/* */}\n <div class={selectMobileDropdownStyles.content}>{children}</div>\n <Separator />\n {footer}\n </MobileDropdown>\n );\n}\n"],"names":["DEFAULT_PLACEMENT","DROPDOWN_OFFSET","mainAxis","crossAxis","DROPDOWN_SIZE_OPTIONS","isMaxHeightAdjusted","maxHeightCeiling","DROPDOWN_SHIFT_OPTIONS","MobileDropdown","ariaLabelledBy","children","id","isOpen","_jsx","jsx","Layer","WindowOverlay","class","mobileDropdownStyles","base","role","Flex","width","height","maxHeight","direction","interpolations","Object","values","textInterpolations","styleInterpolations","mergeInterpolations","SelectMobileFieldInput","forwardRef","ariaControls","ariaDescribedBy","ariaExpanded","ariaInvalid","ariaLabel","displayValue","hasEmptyLabel","hasInsideLabel","isRequired","onBlur","onFocus","placeholder","textAlign","variant","ref","isDisabled","isFocused","hasValue","useFormFieldContext","isTabbable","tabbableModeProps","useTabbableMode","myPlaceholder","isInputPlaceholderShown","undefined","UNSAFE_ariaLabelledBy","useAccessibleContext","mergedAriaLabelledBy","merge","styleInterpolationClasses","classes","themeClasses","useComponentTheme","TextFieldInputRedwoodTheme","type","styleVariant","isEmbeddedVariant","textarea","input","prefix","suffix","startContent","endContent","insideLabel","value","focused","disabled","rootDivStyleClasses","classNames","selectMobileFieldInputStyles","formControlInheritTextAlign","content","Text","anchorRef","dropdownRef","onAutoDismiss","onPosition","placement","setPlacement","useState","prevIsOpen","setPrevIsOpen","handlePosition","useCallback","positionData","handleAutoDismiss","event","handleKeyDown","defaultPrevented","isControlOrFunctionKey","code","KEYS","ESC","TAB","useOutsideMousedown","handler","inlineStyle","minWidth","current","offsetWidth","logicalParentRef","Floating","sizeOptions","shiftOptions","offsetValue","dropdownStyles","style","onKeyDown","onMouseDown","preventDefaultForCurrentTarget","props","handleMouseDown","target","tagName","preventDefault","FormFieldContext","Provider","userAssistance","InlineUserAssistance","isHighlighted","onAction","isHover","hoverProps","useHover","focusProps","useFocusWithin","handleClick","e","rootClasses","results","linkItemRoot","linkItemFocus","linkClasses","extraItem","linkItemHighlight","Link","href","onClick","footer","hasHeaderSeparator","header","labelId","_jsxs","Separator","selectMobileDropdownStyles"],"mappings":"ujFA8BA,MAAMA,GAAoB,eAEpBC,GAAgD,CAAEC,SAAU,EAAGC,UAAW,GAC1EC,GAAsD,CAC1DC,qBAAqB,EACrBC,iBAAkB,KAEdC,GAAwD,CAC5DL,UAAU,GCTI,SAAAM,IAAiB,kBAAmBC,EAAcC,SAAEA,EAAQC,GAAEA,EAAEC,OAAEA,IAChF,OAAQA,EACNC,EAACC,IAAAC,EAAKA,MACJ,CAAAL,SAAAG,MAACG,EAAAA,cAAa,CAAAN,SACZG,EAAAA,IACE,MAAA,CAAAF,GAAIA,EACJM,MAAOC,EAAAA,qBAAqBC,KAC5BC,KAAK,SACM,aAAA,OACM,kBAAAX,EACjBC,SAAAG,EAAAC,IAACO,EAAIA,KAAA,CAACC,MAAM,OAAOC,OAAO,OAAOC,UAAU,OAAOC,UAAU,SAAQf,SACjEA,UAVM,IAgBnB,CCDA,MAAMgB,GAAiB,IAAIC,OAAOC,OAAOC,GAAAA,qBACnCC,GAAsBC,GAAAA,oBAA2BL,IAqB1CM,GAAyBC,EAAAA,YACpC,EAEI,gBAAiBC,EACjB,mBAAoBC,EACpB,gBAAiBC,EACjB,eAAgBC,EAChB,aAAcC,EACd,kBAAmB7B,EACnB8B,eACAC,gBACAC,kBAAiB,EACjBC,aACAC,SACAC,UACAC,cACAC,YACAC,UAAU,WAEZC,KAGA,MAAMC,WAAEA,EAAUC,UAAEA,EAASC,SAAEA,GAAW,GAAUC,GAAAA,uBAC9CC,WAAEA,EAAUC,kBAAEA,GAAsBC,GAAeA,kBAGnDC,EAAgBC,GAAuBA,wBAAChB,EAAgBU,EAAUD,GACpEL,OACAa,GAKEC,sBAAEA,GAA0BC,GAAAA,uBAC5BC,EAAuBrB,EACzBsB,IAAM,CAACrD,EAAgBkD,IACvBlD,GAGIQ,MAAO8C,GAA8BjC,GAAoB,CAAEgB,eAC3DkB,QAASC,GAAiBC,GAAAA,kBAChCC,GAAAA,2BACA,CACEC,KAAM,cACNC,aAAcC,GAAiBA,kBAACvB,GAAW,WAAa,UACxDwB,SAAU,cACVC,MAAO,UACPC,OAAQ,WACRC,OAAQ,WACRC,aAAc,iBACdC,WAAY,gBACZC,YAAapC,EAAiB,iBAAmB,gBACjDqC,MAAO3B,EAAW,WAAa,UAC/B4B,QAAS7B,EAAY,YAAc,aACnC8B,SAAU/B,EAAa,aAAe,gBAGpCgC,EAAsBC,EAAAA,WAAW,CACrCC,GAAAA,6BAA6BhE,KAC7B4C,EACAE,EAIY,mBAAZlB,QAA8CW,IAAdZ,GAA2BsC,GAA2BA,8BAGxF,OACEvE,MACoB,MAAA,CAAA,oBAAA,OACH,gBAAAqB,qBACGC,EAAe,gBAClBC,EAAY,eACbC,EACF,aAAAC,oBACKuB,EAAoB,gBACtBnB,EAAa,YAASgB,EACrCzC,MAAOgE,EACPtC,OAAQA,EACRC,QAASA,EACTI,IAAKA,EACL5B,KAAK,cACAiC,GAAcC,EAAkB5C,SACrCG,aAAKI,MAAOkE,GAA4BA,6BAACE,iBACvCxE,EAAAA,IAACyE,GAAAA,KAAK,CAAAvC,QAASR,EAAe,UAAY,YAAW7B,SAClD6B,GAAgBiB,OAIvB,yBFlHmB+B,UACvBA,EAAS7E,SACTA,EAAQ8E,YACRA,EAAW7E,GACXA,EAAEC,OACFA,EAAM6E,cACNA,EAAaC,WACbA,IAEA,MAAOC,EAAWC,GAAgBC,EAAQA,SAA6B7F,KAChE8F,EAAYC,GAAiBF,EAAQA,SAACjF,GAEzCkF,IAAelF,IAIZA,GACHgF,EAAa5F,IAEf+F,EAAcnF,IAGhB,MAAMoF,EAAiBC,eACpBC,IAICN,EAAaM,EAAaP,WAG1BD,IAAaQ,EAAa,GAE5B,CAACR,EAAYE,IAGTO,EAAoBF,eACvBG,IACCX,IAAgBW,EAAM,GAExB,CAACX,IAGGY,EAAgBJ,eACnBG,IACC,IAAIA,EAAME,mBAAoBC,EAAsBA,uBAACH,GAIrD,OAAQA,EAAMI,MACZ,KAAKC,EAAAA,KAAKC,IACV,KAAKD,EAAIA,KAACE,IACRR,EAAkBC,GAErB,GAEH,CAACD,IAKHS,sBAAoB,CAClB3D,YAAarC,EACboC,IAAK,CAACuC,EAAWC,GACjBqB,QAASV,IAGX,MAAMW,EAAclG,EAChB,CACEmG,SAAU,GAAGxB,EAAUyB,SAASC,iBAElC,GAEJ,OAAQrG,EACNC,MAACE,EAAAA,MAAK,CAACmG,iBAAkB3B,EACvB7E,SAAAG,EAAAA,IAACsG,EAAQA,SAAA,CACP5B,UAAWA,EACX6B,YAAahH,GACbiH,aAAc9G,GACdyC,IAAKwC,EACLG,UAAWA,EACX2B,YAAarH,GACbyF,WAAYM,EAActF,SAC1BG,MACE,MAAA,CAAAI,MAAOsG,EAAcA,eAACpG,KACtBR,GAAIA,EACJ6G,MAAOV,EACPW,UAAWpB,EACXqB,YAAaC,EAA8BA,wCAC1CjH,QAhBQ,IAqBnB,2BG/GM,SAAiCkH,GAGrC,MAAMC,EAAkB5B,eAAaG,IAGQ,MAAtCA,EAAM0B,QAAoBC,SAC7B3B,EAAM4B,gBACP,GACA,IAEH,OACEnH,MAACoH,EAAAA,iBAAiBC,SAAS,CAAApD,MAAO,CAAE5B,WAAW,YAC7CrC,EAAKC,IAAA,MAAA,CAAAG,MAAOsG,EAAcA,eAACY,eAAgBT,YAAaG,EAAenH,SACrEG,EAACC,IAAAsH,2BAAyBR,OAIlC,aCLiB,EAAGlH,WAAU2H,gBAAeC,eAC3C,MAAMC,QAAEA,EAAOC,WAAEA,GAAeC,EAAQA,YAClCvF,UAAEA,EAASwF,WAAEA,GAAeC,EAAcA,iBAE1CC,EAAc3C,eACjB4C,IAECA,EAAEb,iBACFM,OACO,IAET,CAACA,IAGGQ,EAAc5D,EAAAA,WAAW,CAC7BqC,EAAcA,eAACwB,QAAQC,aACvB9F,EAAYqE,EAAcA,eAACwB,QAAQE,mBAAgBvF,IAG/CwF,EAAchE,EAAAA,WAAW,CAC7BqC,EAAcA,eAACwB,QAAQI,UACvBZ,GAAWrF,GAAamF,EAAgBd,EAAcA,eAACwB,QAAQK,uBAAoB1F,IAGrF,OACE7C,MAAA,MAAA,CAAKI,MAAO6H,KAAiBJ,EAAUhI,SACrCG,EAAAA,IAACwI,EAAAA,KAAK,CAAAC,KAAK,IAAIC,QAASX,EAAWlI,SACjCG,EAAKC,IAAA,MAAA,CAAAG,MAAOiI,KAAiBV,EAAU9H,SACpCA,OAIP,uDClCiCA,SACnCA,EAAQ8I,OACRA,EAAMC,mBACNA,GAAqB,EAAIC,OACzBA,EAAM/I,GACNA,EAAEC,OACFA,EAAM+I,QACNA,IAEA,OACEC,EAAAA,KAACpJ,GAAe,CAAAG,GAAIA,EAAIC,OAAQA,EAAyB,kBAAA+I,YACtDD,EACAD,GAAsB5I,EAAAA,IAACgJ,EAAAA,UAAS,CAAA,GAGjChJ,EAAKC,IAAA,MAAA,CAAAG,MAAO6I,EAAAA,2BAA2BzE,QAAU3E,SAAAA,IACjDG,EAAAA,IAACgJ,EAAAA,UAAS,CAAA,GACTL,IAGP"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact', 'preact/compat', './Label-701506b1', './LiveRegion-dbefb95b', 'preact/hooks', './keyboardUtils-fb6219eb', './TextFieldInput-f8635c62', 'css!./ObfuscatedTextFieldInputStyles.styles.css', './ReadonlyTextFieldInput-41384d7e', './StyledTextField-2b62c81d', './LayerHost-0b288129', './FormContext-6b0879a0', './useFormContext-b8cbbb21', './FormFieldContext-a024b891', 'css!./LabelValueLayoutStyles.styles.css', './logger-0f873e29', './UNSAFE_TextField/themes/TextFieldStyles.css', 'css!./SkeletonStyles.styles.css', 'css!./TextFieldLoadingStyles.styles.css', 'css!./TextFieldStyles.styles.css', 'module', './UNSAFE_TextField/themes/redwood/TextFieldVariants.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './UNSAFE_TextField/themes/FormLayoutStyles.css', 'module', './Flex-4b81b412', 'css!./LayoutStyles.styles.css', './InputGroupContext-372087af', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', './formControlUtils-de035f75', './useTranslationBundle-e4dd341e', './TabbableModeContext-a9c97640', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-a59440e5', './CompactUserAssistance-fcc04dcc', 'css!./IconStyle.styles.css', './Popup-6b57cc3e', 'css!./HiddenAccessibleStyles.styles.css', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './useFocusableTextField-8b755b15', './useLoadingIndicatorTimer-20a3bf5f', './useTextField-3ab0a23b', './Separator-181f7541', './SelectMobileFieldInput-d499ef86', './useSelectCommon-a02ddf3c', './useAccessibleContext-23e8a333', './useFormFieldContext-9260f081', './textAlign-ef924afd', 'css!./FormControlUtilsStyles.styles.css', 'css!./ReadonlyTextFieldInputStyles.styles.css', './UNSAFE_TextField/themes/redwood/ReadonlyTextFieldInputVariants.css', './TextField-c8c71735', 'css!./LiveRegionStyles.styles.css', './UNSAFE_SelectMultiple/themes/SelectedValuesCountStyles.css', './Chip-8280de2e', './IconButton-dc1be00e', './NavLeft-d270ba82', './useFocusWithin-5a504fca', './useUser-08901aba', './classNames-08d99695', './dimensions-95c0c920', './mergeInterpolations-9ede4cf7', './HiddenAccessible-037ef42d', './Text-31cabc49', './Close-36cbae0d', './useId-c9578d26', './UNSAFE_SelectMultiple/themes/TextTagStyles.css', './UNSAFE_SelectMultiple/themes/TextTagListStyles.css', './View-35699bb2', './Button-e5d7c0e3', './UNSAFE_SelectMultiple/themes/MobileDropdownFooterStyles.css', './useEffectEvent-6aa4d559', './equals-e73adbe3', './mergeProps-bcfa6a92', './stringUtils-4ffd9d59', './useHiddenTestMethod-8321d341'], (function(e,t,s,o,n,l,i,a,r,d,c,u,p,h,b,m,y,x,v,f,S,T,w,g,F,C,D,A,R,I,L,E,k,K,V,j,U,P,M,B,O,N,_,H,z,q,Y,W,$,G,Z,J,Q,X,ee,te,se,oe,ne,le,ie,ae,re,de,ce,ue,pe,he,be,me,ye,xe,ve,fe,Se,Te,we,ge,Fe,Ce,De,Ae,Re,Ie,Le,Ee){"use strict";function ke({assistiveText:e,collectionRenderer:s,collectionRendererContext:o,data:n,dropdownId:l,dropdownRef:i,helpSourceLink:a,helpSourceText:r,isAddToListShown:d,isDisabled:c,isDropdownAbove:u,isEmptyResults:p,isOpen:h,isReadonly:b,label:m,mainFieldRef:y,userAssistanceDensity:x,onAddToListAction:v,onAutoDismiss:f,onPosition:S}){const T=P.useTranslationBundle("@oracle/oraclejet-preact"),w=!h||u||c||b||!e&&!a||"efficient"!==x&&"reflow"!==x?void 0:t.jsx(M.TabbableModeContext.Provider,{value:{isTabbable:!1},children:t.jsx(X.DropdownUserAssistance,{assistiveText:e,fieldLabel:m,helpSourceLink:a,helpSourceText:r,userAssistanceDensity:x})}),g=p?d?void 0:t.jsx(ee.EmptyResults,{}):s(o),F=d?t.jsxs(t.Fragment,{children:[!p&&t.jsx("div",{onMouseDown:ee.preventDefault,children:t.jsx(Q.Separator,{})}),t.jsx(X.LinkItem,{isHighlighted:p,onAction:v,children:T.select_addToList()})]}):void 0;return t.jsxs(X.Dropdown,{dropdownRef:i,id:l,isOpen:h,anchorRef:y,onAutoDismiss:f,onPosition:S,children:[t.jsxs(ee.DropdownList,{hasBottomGap:void 0===w,isLoading:null===n,children:[g,F]}),w]})}function Ke({"aria-label":e,count:s=0,onKeyDown:o,onKeyUp:n,onMouseDown:l,...i}){const a=P.useTranslationBundle("@oracle/oraclejet-preact"),r=a.selectMultiple_showSelectedValues(),d=e?`${e}. `:"",c=a.selectMultiple_countPlus({COUNT:"99"}),u=s>99?`${c}`:`${s}`,p=`${d}${a.selectMultiple_valuesSelected({VALUE_COUNT:`${s}`})} ${r}`;return t.jsx("div",{class:de.selectedValueCountStyles.base,onKeyDown:o,onKeyUp:n,onMouseDown:l,children:t.jsx(ce.Chip,{"aria-label":p,...i,children:u})})}function Ve({children:e,columnSpan:s,fieldLabel:o,hasInsideLabel:n,isBackButtonShown:l,isClearButtonShown:i,isDropdownArrowShown:a,isDropdownSelectedOnlyView:r,isSelectedValuesCountShown:d,selectedValuesCount:c,onBackButtonClick:u,onClearButtonClick:p,onDropdownArrowClick:h,onSelectedValuesCountKeyDown:b,onSelectedValuesCountKeyUp:m,onSelectedValuesCountMouseDown:y,onSelectedValuesCountToggle:x,...v}){const{isDisabled:f,isLoading:S}=se.useFormFieldContext(),T=P.useTranslationBundle("@oracle/oraclejet-preact"),w=l?t.jsx(ue.IconButton,{"aria-label":T.selectMultiple_back(),size:"xs",variant:"ghost",onAction:u,children:t.jsx(pe.SvgNavLeft,{})}):null,g=i?t.jsx(ue.IconButton,{"aria-label":T.formControl_clear(),size:"sm",variant:"ghost",onAction:p,children:t.jsx(pe.SvgCancelS,{})}):null,F=a?t.jsx(ee.DropdownArrow,{isDisabled:f,onClick:h,testId:`${v.testId}_dropdownarrow`}):null,C=S?void 0:d?t.jsxs(I.Flex,{align:"center",justify:"center",gap:[0,"1x"],children:[t.jsx(Ke,{"aria-label":o,count:c,isDisabled:f,isSelected:r,onKeyDown:b,onKeyUp:m,onMouseDown:y,onToggle:x}),i&&g,a&&F]}):t.jsxs(t.Fragment,{children:[i&&g,a&&F]});return t.jsx(ae.TextField,{columnSpan:s,startContent:l&&w,mainContent:e,endContent:C,...v})}function je({children:e,removeIcon:s="never",isSelected:o=!1,onRemoveAction:n,onSelect:l,onRemoveIconClick:r,isFocused:d,value:c}){const u=P.useTranslationBundle("@oracle/oraclejet-preact"),p=i.useRef(null),h=Te.useId(),b=me.classNames([we.textTagStyles.base,o&&we.textTagStyles.selected]),m=i.useCallback((()=>{n?.(c)}),[c,n]),y=i.useCallback((()=>{l?.(c)}),[c,l]),x=i.useCallback((()=>{r?.(c)}),[c,r]),v=i.useCallback((e=>{a.isBackspaceOrDelete(e)&&m()}),[m]);return i.useEffect((()=>{d&&o&&(p.current?.focus(),p.current?.scrollIntoView({block:"nearest"}))}),[d,o]),t.jsxs(t.Fragment,{children:[t.jsxs("span",{ref:p,class:b,tabIndex:-1,onClick:y,onKeyUp:v,onMouseDown:ee.preventDefault,role:"option","aria-describedby":"never"===s?h:void 0,"aria-selected":o?"true":"false",children:[t.jsx(fe.Text,{size:"md",variant:"inherit",children:e}),"always"===s&&t.jsx(M.TabbableModeContext.Provider,{value:{isTabbable:!1},children:t.jsx(ue.IconButton,{size:"xs",variant:"ghost",onAction:x,children:t.jsx(Se.SvgClose,{})})})]}),"never"===s&&t.jsx(ve.HiddenAccessible,{id:h,children:u.selectMultiple_removeSelectedTagInstructionText()})]})}const Ue=Array.from(["maxWidth"],(e=>ye.dimensionInterpolations[e])),Pe=xe.mergeInterpolations(Ue);const Me=o.forwardRef((function(e,s=()=>{}){const{"aria-label":o,data:n,hasInsideLabel:l=!1,removeIcon:r="never",onExitNavigation:d,onRemove:c}=e,u=i.useRef(null),[p,h]=i.useState([]),{direction:b}=be.useUser(),m=i.useRef(-1),y=n.at(-1)?.value,x=i.useRef({value:y,index:n.length-1});x.current={value:y,index:n.length-1};const v=i.useCallback((e=>{const t=n.at(e)?.value;null!=t&&h([t])}),[n]),f=i.useCallback((()=>{h((e=>(m.current=-1,e.length?[]:e)))}),[]),S=i.useCallback((e=>{c?.([e]),d?.(),f()}),[f,d,c]),T=i.useCallback((e=>{const t=[...p];p.includes(e)||t.push(e),c?.(t),d?.(),f()}),[p,f,d,c]),w=i.useCallback((e=>{h([e]),m.current=n.findIndex((t=>t.value===e))}),[n,h]),g=i.useCallback((e=>{if(0!==n.length){if("ltr"===b&&"ArrowLeft"===e.code||"rtl"===b&&"ArrowRight"===e.code){if(0===m.current)return;return m.current-=1,void v(m.current)}return"ltr"===b&&"ArrowRight"===e.code||"rtl"===b&&"ArrowLeft"===e.code?m.current===n.length-1?void d?.():(m.current+=1,void v(m.current)):"Home"===e.code?(m.current=0,void v(m.current)):"End"===e.code?(m.current=n.length-1,void v(m.current)):a.isSelectAll(e)?(h(n.map((e=>e.value))),void e.preventDefault()):void 0}}),[n,b,d,v,h]),F=i.useCallback((()=>{h((e=>e.length||void 0===x.current.value?e:(m.current=x.current.index,[x.current.value])))}),[]),C=i.useCallback((()=>{f()}),[f]),{focusProps:D}=he.useFocusWithin({onBlurWithin:C});i.useImperativeHandle(s,(()=>({blur:C,focus:F})),[C,F]),i.useEffect((()=>{u.current?.scrollTo({left:u.current.scrollWidth*("ltr"===b?1:-1)})}),[n,b]);const A=Pe(e),R=me.classNames([ge.textTagListStyles.textTagListBase,l&&ge.textTagListStyles.textTagListInsideLabel]);return t.jsx("div",{class:R,ref:u,tabIndex:-1,onKeyDown:g,role:"listbox","aria-label":o,"aria-multiselectable":"true",style:A,...D,children:n.map(((e,s)=>t.jsx(je,{isFocused:m.current===s,isSelected:p.includes(e.value),onRemoveAction:T,onSelect:w,onRemoveIconClick:S,removeIcon:r,value:e.value,children:e.label},e.value)))})}));function Be({displayValue:e,isAddToListShown:s,isKeyboardNavigable:o,isTextTagListShown:n,isUserFiltering:a,liveRegionText:d,onExitNavigation:c,onRemove:u,removeIcon:p,selectedValuesDescriptionId:h,selectedValuesKeyboardNavDescriptionId:b,textTagListData:m,textTagListRef:y,userInput:x,virtualKeyboard:v,placeholder:f,...S}){const T=P.useTranslationBundle("@oracle/oraclejet-preact"),w=s?T.select_addToListAvailable():void 0,g=o&&e&&e.length>0?T.selectMultiple_highlightSelectedTagsInstructionText():void 0,{isInputFocused:F}=se.useFormFieldContext(),[C,D]=i.useState(g),[A,R]=i.useState(!1);return F&&n&&!C&&g&&!A?R(!0):F||!A||R(!1),C!==g&&D(g),t.jsxs(t.Fragment,{children:[n&&t.jsx(Me,{"aria-label":T.selectMultiple_selectedValues(),data:m,hasInsideLabel:S.hasInsideLabel,maxWidth:"50%",onExitNavigation:c,onRemove:u,ref:y,removeIcon:p}),t.jsx(I.Flex,{flex:1,children:t.jsx(r.TextFieldInput,{"aria-autocomplete":"list",autoComplete:"off",hasPrefix:n,role:"combobox",hasEndContent:!0,spellcheck:!1,type:"auto"===v?"search":v,value:a||n?x:e,placeholder:n?void 0:f,...S})}),n&&t.jsx(ve.HiddenAccessible,{id:h,isHidden:!0,children:e}),n&&g&&!A&&t.jsx(ve.HiddenAccessible,{id:b,isHidden:!0,children:g}),t.jsx(l.LiveRegion,{children:d}),n&&t.jsx(l.LiveRegion,{children:A?g:void 0}),s?t.jsx(l.LiveRegion,{children:w}):void 0]})}function Oe({onApply:e}){const s=P.useTranslationBundle("@oracle/oraclejet-preact");return t.jsx("div",{class:De.mobileDropdownFooterStyles.base,children:t.jsx(Ce.Button,{display:"label",edge:"bottom",label:s.selectMultiple_apply(),size:"sm",variant:"callToAction",onAction:e})})}function Ne(e,t){const s=P.useTranslationBundle("@oracle/oraclejet-preact").plural_separator();return{displayValue:i.useMemo((()=>{if(void 0===t)return"";const o=function(e,t){const s=t?[...t.values()]:[],o=t=>ee.renderItemText(t,e,"SelectMultiple"),n=s.map(o);return new Set(n)}(e,t),n=function(e,t){return Array.from(e.values()).join(t)}(o,s);return n}),[e,s,t]),textTags:i.useMemo((()=>void 0===t?[]:function(e,t=[]){return t.map((t=>({label:ee.renderItemText(t,e,"SelectMultiple")??"",value:t.key})))}(e,t)),[e,t])}}function _e({isDropdownSelectedOnlyView:e=!1,valueItems:t}){const s=Ae.useEffectEvent((e=>e&&t&&0!==t.length?{offset:0,totalSize:t.length,sizePrecision:"exact",data:t.map((e=>({data:e.data,metadata:e.metadata??{key:e.key}})))}:void 0));return{data:i.useMemo((()=>s(e)),[s,e]),onLoadRange:void 0}}const He=(e,t,s)=>t.data.forEach((t=>{s.has(t.metadata.key)&&e.set(t.metadata.key,{data:t.data,key:t.metadata.key,metadata:t.metadata})}));function ze({"aria-describedby":e,"aria-label":s,assistiveText:o,collectionRenderer:l,data:a,dropdownId:r,enabledElementRef:d,helpSourceLink:c,helpSourceText:u,isAddToListShown:p,isDisabled:h,isEmptyResults:b,isFocused:y,isLoading:x,isOpen:v,isReadonly:f,isRequired:S,isSelectedOnlyView:T,itemText:w,label:g,liveRegionText:F,placeholder:C,propIsLoading:D,selectedValuesDescriptionId:A,setDropdownOpen:R,setUserInput:I,stopFiltering:L,textAlign:E,textTagListRef:k,userAssistanceDensity:K,userInput:V,valueItems:j,virtualKeyboard:U,onAddToListAction:M,onCommit:B,onFieldBlur:O,onFieldFocus:N,onFieldInput:_,onFieldKeyDown:H,onFieldKeyUp:z}){const q=P.useTranslationBundle("@oracle/oraclejet-preact"),{collectionRendererContext:Y,footerProps:W,selectMultipleFieldInputProps:$,selectMultipleFieldProps:G,selectedValuesCountProps:Z}=function({data:e,inputRef:t,isDropdownOpen:s,isDropdownSelectedOnlyView:o,itemText:n,textTagListRef:l,userInput:a,valueItems:r,onCommit:d,setDropdownOpen:c,setUserInput:u,stopFiltering:p}){const[h,b]=i.useState({rowKey:void 0}),[m,y]=i.useState(ee.createKeysFromValueItems(r)),[x,v]=i.useState(o),f=i.useRef(new Map),S=i.useMemo((()=>{const e=[];return m?.forEach((t=>{const s=r?.find((e=>e.key===t));s?e.push(s):f.current.has(t)&&e.push(f.current.get(t))})),e}),[m,r]),{textTags:T,displayValue:w}=Ne(n,S),g=i.useRef(null),{data:F}=_e({isDropdownSelectedOnlyView:x,valueItems:S}),C=i.useCallback((e=>{b({rowKey:e.value})}),[b]),D=i.useCallback((t=>{y(t.value),u(""),e&&He(f.current,e,t.value)}),[e,y,u]),A=i.useCallback((({value:e=!1})=>{v((t=>(t!==e&&p(),e)))}),[v,p]),R=i.useCallback((()=>{y(ee.createKeysFromValueItems(r)),f.current.clear(),c(!1),p(),t.current?.focus()}),[t,c,p,r]),I=i.useCallback((()=>{d({previousValue:ee.createKeysFromValueItems(r),value:m}),R()}),[m,r,R,d]),L=i.useCallback((()=>{R()}),[R]),E=i.useCallback((()=>{y(new Set),p()}),[p]),k=i.useCallback((e=>{const t=new Set(m);e.forEach((e=>t.delete(e))),y(t)}),[m]),K=i.useCallback((()=>{setTimeout((()=>g.current?.focus()),0)}),[]);i.useEffect((()=>{s&&setTimeout((()=>g.current?.focus()),0)}),[s]);const[V,j]=i.useState(r);return V!==r&&(s||y((e=>{const t=ee.createKeysFromValueItems(r);return Re.equals(e,t)?e:t})),j(r)),{collectionRendererContext:ee.useCollectionRenderer({currentKey:h.rowKey,onCurrentKeyChange:C,onSelectedKeysChange:D,searchText:a,selectedKeys:m,selectedOnlyData:F}),footerProps:{onApply:I},selectMultipleFieldInputProps:{displayValue:w,hasEmptyLabel:!1,hasInsideLabel:!0,inputRef:g,isTextTagListShown:T.length>0,isUserFiltering:!0,removeIcon:"always",userInput:a,textTagListData:T,textTagListRef:l,onExitNavigation:K,onRemove:k},selectMultipleFieldProps:{hasInsideLabel:!0,isBackButtonShown:!0,isClearButtonShown:!ee.isSearchTextEmptyOrUndefined(a)||0!==T.length,isDropdownArrowShown:!1,isDropdownSelectedOnlyView:x,isSelectedValuesCountShown:(m?.size??0)>0||x,selectedValuesCount:m?.size??0,styleVariant:"embedded",onBackButtonClick:L,onClearButtonClick:E},selectedValuesCountProps:{onSelectedValuesCountToggle:A},isDropdownSelectedOnlyView:x}}({data:a,inputRef:d,isDropdownOpen:v,isDropdownSelectedOnlyView:T,itemText:w,textTagListRef:k,userInput:V,valueItems:j,onCommit:B,setDropdownOpen:R,setUserInput:I,stopFiltering:L}),{formFieldContext:te,inputProps:se,labelProps:oe,textFieldProps:ne,userAssistanceProps:le}=J.useTextField({ariaDescribedBy:e,helpSourceLink:c,helpSourceText:u,isDisabled:!1,isFocused:y,isLoading:x,isReadonly:!1,isRequiredShown:!1,labelEdge:"inside",styleVariant:"default",value:G.selectedValuesCount>0||void 0});te.hasValue=D||te.hasValue;const ie={label:t.jsx(n.Label,{...oe,children:g}),labelEdge:"inside"},ae=!v||h||f||!o&&!c||"efficient"!==K&&"reflow"!==K?void 0:t.jsx(X.DropdownUserAssistance,{assistiveText:o,fieldLabel:g,helpSourceLink:c,helpSourceText:u,userAssistanceDensity:K,...le}),re=b?p?void 0:t.jsx(ee.EmptyResults,{}):l(Y),de=p?t.jsxs(t.Fragment,{children:[t.jsx("div",{onMouseDown:ee.preventDefault,children:t.jsx(Q.Separator,{})}),t.jsx(X.LinkItem,{onAction:M,children:q.select_addToList()})]}):void 0;return t.jsx(X.SelectMobileDropdown,{header:t.jsxs(m.FormFieldContext.Provider,{value:te,children:[t.jsx(Fe.View,{children:t.jsx(Ve,{fieldLabel:g,onBlur:O,onFocus:N,...ie,...ne,...G,...Z,children:t.jsx(Be,{"aria-controls":r,"aria-expanded":v,"aria-label":s,isAddToListShown:p,isRequired:S,liveRegionText:F,placeholder:C,selectedValuesDescriptionId:A,textAlign:E,virtualKeyboard:U,onInput:_,onKeyDown:H,onKeyUp:z,...se,...$})})}),ae,de]}),footer:t.jsx(Oe,{...W}),id:r,isOpen:v,labelId:oe.id,children:t.jsx(ee.DropdownList,{hasTopGap:!de,hasBottomGap:!0,isLoading:null===a,children:re})})}const qe=o.forwardRef((({addToList:e="off","aria-describedby":r,assistiveText:d,collectionRenderer:p,columnSpan:h,data:y,helpSourceLink:x,helpSourceText:v,isDisabled:f,isLoading:S,isReadonly:T,isRequired:w,isRequiredShown:g,itemRenderer:F,itemText:C,label:D,labelEdge:A,labelStartWidth:R,messages:I,onAddToListAction:L,onCommit:E,onFilter:k,onLoadRange:K,placeholder:V,testId:j,textAlign:M,userAssistanceDensity:B,valueItems:O,variant:N="default",virtualKeyboard:z},q)=>{const{isDisabled:Y,isReadonly:W,labelEdge:$,labelStartWidth:Q,textAlign:te,userAssistanceDensity:se}=b.useFormContext(),oe=f??Y,ne=T??W,le=A??$,ie=R??Q,ae=M??te??U.defaultTextAlignForVariant(N),re=B??se,de=o.useRef(null),ce=o.useRef(null),{focusProps:ue,isFocused:pe,methods:he}=G.useFocusableTextField({isDisabled:oe,isReadonly:ne,enabledElementRef:de,readonlyElementRef:ce});o.useImperativeHandle(q,(()=>he),[he]);const{addToListEventHandlers:me,ariaProps:ye,collectionRendererContext:xe,data:ve,dropdownArrowEventHandlers:fe,dropdownEventHandlers:Se,dropdownRef:we,hasSelectedValuesCount:ge,inputEventHandlers:Fe,isAddToListShown:Ce,isDataFetched:De,isDropdownAbove:Ae,isDropdownOpen:Re,isDropdownSelectedOnlyView:Ke,isEmptyResults:je,isFocused:Ue,isUserFiltering:Pe,mainFieldRef:Me,mouseProps:Oe,selectedValuesCountProps:He,selectedValuesDescriptionId:qe,selectedValuesKeyboardNavDescriptionId:Ye,setDropdownOpen:We,setUserInput:$e,stopFiltering:Ge,textFieldRef:Ze,textTagListProps:Je,userInput:Qe}=function({addToList:e,ariaDescribedBy:t,data:s,inputRef:o,isDisabled:n,isFocused:l,isReadonly:r,onAddToListAction:d,onCommit:c,onFilter:u,valueItems:p}){const[h,b]=i.useState(!1),m=p?.length,y=void 0!==m&&m>0||h,x=_e({isDropdownSelectedOnlyView:h,valueItems:p}),v=h?x.data:s,f=i.useCallback((e=>{ee.isSearchTextEmptyOrUndefined(e.searchText)||b(!1),u?.(e)}),[u]),{currentRowKeyRef:S,currentRowOverride:T,dropdownRef:w,getDropdownTabbableElems:g,handleDropdownArrowClick:F,handleDropdownAutoDismiss:C,handleDropdownPosition:D,handleInput:A,handleMainFieldKeyDown:R,handleMainFieldKeyUp:I,handleUpDownArrowKeys:L,isDropdownAbove:E,isDropdownOpen:k,isFocused:K,isUserFiltering:V,mainFieldRef:j,onCurrentKeyChange:U,onMouseDown:P,searchText:M,setCurrentRowOverride:B,setDropdownOpen:O,setUserInput:N,stopFiltering:_,userInput:H}=ee.useSelectCommon({data:v,inputRef:o,isFocused:l,onFilter:f}),[z,q]=i.useState(k),[Y,W]=i.useState(p),[$,G]=i.useState(ee.createKeysFromValueItems(p)),Z=null!=v&&!ee.isBeforeDataFetch(v),J=Z&&0===v?.totalSize,Q="on"===e&&V&&null!=M&&M.length>0,X=i.useCallback((()=>{O(!1),_(),d?.({searchText:V?M:void 0})}),[V,d,M,O,_]),te=i.useRef(null),{direction:se}=be.useUser(),oe=Te.useId(),ne=Te.useId(),le=Le.l([K&&ne,K&&oe,t]),ie=i.useCallback((()=>{w.current?.parentElement?.removeChild(w.current)}),[w]),ae=i.useCallback((e=>V&&k&&!ee.isSearchTextEmptyOrUndefined(H)&&(v?.data.length??0)>0&&void 0!==e),[v,k,V,H]),re=i.useCallback((e=>{if($?.has(e))return;const t=void 0===$?new Set([e]):new Set([...$.values(),e]);c({previousValue:$,value:t}),G(t)}),[c,$,G]),de=i.useRef(null),ce=i.useCallback((e=>r||n?Promise.reject("Component is readonly or disabled"):(c({value:e,previousValue:$}),Promise.resolve())),[n,r,c,$]);Ee.useHiddenTestMethod({elementRef:r?j:de,method:ce,name:"_changeValue"});const ue=i.useCallback((e=>{if(k&&"keydown"===e?.type){const t=e;switch(t.code){case a.KEYS.TAB:{const e=t.shiftKey,s=g();if(s&&s.length>1){const t=s[0],o=s[s.length-1];if(!e&&document.activeElement!==o||e&&document.activeElement!==t)return void O(!0)}t.shiftKey||!y?o.current?.focus():he.current?.focus(),ie();break}}}}),[g,y,o,k,ie,O]),pe=i.useCallback((e=>{if(!a.isControlOrFunctionKey(e))switch(e.code){case a.KEYS.TAB:k&&(e.shiftKey||!y&&!e.shiftKey)&&(ie(),O(!1)),y&&!e.shiftKey&&e.stopPropagation();break;case a.KEYS.LEFT:"ltr"===se&&o.current instanceof HTMLInputElement&&0===o.current?.selectionStart&&0===o.current?.selectionEnd&&te.current?.focus();break;case a.KEYS.RIGHT:"rtl"===se&&o.current instanceof HTMLInputElement&&0===o.current?.selectionStart&&0===o.current?.selectionEnd&&te.current?.focus();break;case a.KEYS.ENTER:case a.KEYS.NUMPAD_ENTER:if(ee.isPhone())return;if(Q&&J)return void X();ae(S.current)&&(O(!1),_(),re(S.current))}}),[S,se,X,y,o,Q,k,J,ie,re,O,ae,_]);if(Y!==p){const e=ee.createKeysFromValueItems(p);G(e)}const he=i.useRef(null);i.useEffect((()=>{he.current=y&&j.current?.querySelector?j.current.querySelector('[role="switch"]'):null}),[y,n,r,j]);const me=i.useCallback((e=>{switch(e.code){case a.KEYS.TAB:k&&!e.shiftKey&&(ie(),O(!1)),e.shiftKey&&e.stopPropagation();break;case a.KEYS.UP:case a.KEYS.DOWN:e.preventDefault();break;case a.KEYS.ESC:k&&(O(!1),e.preventDefault(),e.stopPropagation());break;case a.KEYS.ENTER:e.stopPropagation()}}),[k,ie,O]),ye=i.useCallback((e=>{switch(e.code){case a.KEYS.UP:case a.KEYS.DOWN:L(e)}}),[L]),xe=i.useCallback((e=>{e.preventDefault(),he.current?.focus()}),[he]),ve=i.useCallback((e=>{k||O(!0);const t=e.value??!1;t!==h&&(b(t),t&&_())}),[k,h,O,_]);!k&&h&&b(!1);const fe=i.useCallback((e=>{G(e.value),N(""),c?.({value:e.value,previousValue:$})}),[c,$,G,N]),Se=i.useCallback((()=>{setTimeout((()=>o.current?.focus()),0)}),[o]),we=i.useCallback((e=>{const t=$,s=new Set($);e.forEach((e=>s.delete(e))),c?.({previousValue:t,value:s})}),[c,$]),ge=i.useMemo((()=>Ie.mergeProps({onAutoDismiss:C,onPosition:D},{onAutoDismiss:ue})),[C,D,ue]),Fe=i.useMemo((()=>Ie.mergeProps({onInput:A,onKeyDown:R,onKeyUp:I},{onKeyDown:pe})),[R,A,I,pe]),Ce=i.useMemo((()=>({textTagListRef:te,onExitNavigation:Se,onRemove:we})),[Se,we]),De=ee.useCollectionRenderer({currentKey:T.rowKey,onCurrentKeyChange:U,onSelectedKeysChange:fe,searchText:M,selectedKeys:$,selectedOnlyData:x.data});k&&!z&&B({rowKey:void 0}),z&&!k&&!H&&_();const Ae=i.useRef(v);if(Ae.current!==v){const e=v?.data[0]?.metadata.key;k&&V&&null!=e&&0===v?.offset&&B({rowKey:ee.isSearchTextEmptyOrUndefined(M)?void 0:e}),Ae.current=v}return z!==k&&q(k),Y!==p&&W(p),{addToListEventHandlers:{onAction:X},ariaProps:{ariaDescribedBy:le},collectionRendererContext:De,data:v,dropdownArrowEventHandlers:{onClick:F},dropdownEventHandlers:ge,dropdownRef:w,hasSelectedValuesCount:y,inputEventHandlers:Fe,inputRef:o,isAddToListShown:Q,isDataFetched:Z,isDropdownAbove:E,isDropdownOpen:k,isDropdownSelectedOnlyView:h,isEmptyResults:J,isFocused:K,isUserFiltering:V,mainFieldRef:j,mouseProps:n||r?{}:{onMouseDown:P},searchText:M,selectedValuesCountProps:{onKeyDown:me,onKeyUp:ye,onMouseDown:xe,onToggle:ve},selectedValuesDescriptionId:oe,selectedValuesKeyboardNavDescriptionId:ne,setDropdownOpen:O,setUserInput:N,stopFiltering:_,textFieldRef:de,textTagListProps:Ce,userInput:H}}({addToList:e,ariaDescribedBy:r,data:y,inputRef:de,isDisabled:oe,isFocused:pe,isReadonly:ne,onAddToListAction:L,onCommit:E,onFilter:k,valueItems:O}),Xe=Z.useLoadingIndicatorTimer(S??!1),{baseId:et,formFieldContext:tt,inputProps:st,labelProps:ot,textFieldProps:nt,userAssistanceProps:lt}=J.useTextField({ariaDescribedBy:ye.ariaDescribedBy,helpSourceLink:x,helpSourceText:v,isDisabled:oe,isFocused:Ue,isLoading:Xe,isReadonly:ne,isRequiredShown:g,labelEdge:le,messages:I,styleVariant:N,userAssistanceDensity:re,value:void 0!==O&&O.length>0||void 0});tt.hasValue=S||tt.hasValue;const it=`${et}-dropdown`,{displayValue:at,textTags:rt}=Ne(C,O),dt="none"!==le?t.jsx(n.Label,{...ot,...ee.isPhone()?{forId:void 0}:{},children:D}):void 0,ct={label:"none"!==le?dt:void 0,labelEdge:"none"!==le?le:void 0,labelStartWidth:"none"!==le?ie:void 0,labelText:"inside"!==le||oe?void 0:D},ut="none"===le?D:void 0,pt="efficient"===re||"reflow"===re?oe?"efficient"!==re?void 0:t.jsx(_.InlineUserAssistance,{userAssistanceDensity:re,...lt}):ne?t.jsx(_.InlineUserAssistance,{fieldLabel:D,messages:I,userAssistanceDensity:re,...lt}):t.jsx(_.InlineUserAssistance,{assistiveText:d,fieldLabel:D,helpSourceLink:x,helpSourceText:v,messages:I,isRequiredShown:g,userAssistanceDensity:re,...lt}):void 0,ht="compact"===re?t.jsx(H.CompactUserAssistance,{anchorRef:Me,messages:I,assistiveText:d,...lt}):void 0,bt=P.useTranslationBundle("@oracle/oraclejet-preact"),mt=o.useCallback((({currentRowKeyOverride:e,onPersistCurrentRowKey:s,onSelectedChange:o,searchText:n,selected:l,selectedOnlyData:i})=>t.jsx(ee.DefaultList,{"aria-label":D??"",componentName:"SelectMultiple",currentItemVariant:"highlight",currentKey:e,data:i??y,itemRenderer:F,itemText:C,searchText:i?void 0:Pe?n:void 0,selectedKeys:l,selectionMode:"multiple",onCurrentKeyChange:s,onLoadRange:i?void 0:K,onSelectionChange:o})),[Pe,F,C,D,K,y]);if(ne){const e=t.jsx(c.ReadonlyTextFieldInput,{"aria-describedby":st["aria-describedby"],"aria-label":ut,"aria-labelledby":ot.id,as:"div",elementRef:ce,formVariant:N,hasEmptyLabel:""===D&&"none"===le,hasInsideLabel:void 0!==D&&"inside"===le,onBlur:st.onBlur,onFocus:st.onFocus,textAlign:ae,value:at});return t.jsx(m.FormFieldContext.Provider,{value:tt,children:t.jsx(u.ReadonlyTextField,{role:"presentation",columnSpan:h,compactUserAssistance:ht,inlineUserAssistance:pt,onBlur:ue.onFocusOut,onFocus:ue.onFocusIn,ref:Me,mainContent:e,testId:j,...ct})})}const yt="inside"===le,xt=Re&&De?0===ve?.totalSize?bt.select_noMatchesFound():1===ve?.totalSize?bt.select_oneMatchFound():"exact"===ve?.sizePrecision?bt.select_sizeMatchesFound({TOTAL_SIZE:`${ve?.totalSize}`}):bt.select_sizeOrMoreMatchesFound({TOTAL_SIZE:`${ve?.totalSize}`}):"",vt=Re&&void 0!==ve&&(null===ve||ve.totalSize>0||ee.isBeforeDataFetch(ve)||je),ft=""===D&&"none"===le,St=ee.isPhone()&&!oe?t.jsx(X.SelectMobileFieldInput,{"aria-controls":it,"aria-describedby":st["aria-describedby"],"aria-expanded":Re,"aria-invalid":st["aria-invalid"],"aria-label":ut,"aria-labelledby":ot.id,displayValue:at,hasEmptyLabel:ft,hasInsideLabel:yt,isRequired:w,onBlur:st.onBlur,onFocus:st.onFocus,placeholder:V,ref:de,textAlign:ae,variant:st.variant}):t.jsx(Be,{"aria-controls":it,"aria-expanded":Re,"aria-label":ut,displayValue:at,hasEmptyLabel:ft,hasInsideLabel:yt,inputRef:de,isAddToListShown:Ce,isKeyboardNavigable:!oe&&!ee.isMobile(),isRequired:w,isTextTagListShown:Ue&&0!==rt.length,isUserFiltering:Pe,liveRegionText:xt,placeholder:V,removeIcon:ee.isTablet()?"always":"never",selectedValuesDescriptionId:qe,selectedValuesKeyboardNavDescriptionId:Ye,textAlign:ae,textTagListData:rt,userInput:Qe,virtualKeyboard:ee.isTablet()?z:void 0,...Fe,...st,...Je}),Tt=vt?ee.isPhone()?t.jsx(ze,{"aria-describedby":ye.ariaDescribedBy,"aria-label":ut,assistiveText:d,collectionRenderer:p??mt,data:y,dropdownId:it,enabledElementRef:de,helpSourceLink:x,helpSourceText:v,isAddToListShown:Ce,isDisabled:oe,isEmptyResults:je,isFocused:Ue,isLoading:Xe,isOpen:vt,isReadonly:ne,isRequired:w,isSelectedOnlyView:Ke,itemText:C,label:D,liveRegionText:xt,placeholder:V,propIsLoading:S,selectedValuesDescriptionId:qe,setDropdownOpen:We,setUserInput:$e,stopFiltering:Ge,textAlign:ae,textTagListRef:Je.textTagListRef,userAssistanceDensity:re,userInput:Qe,valueItems:O,virtualKeyboard:z,onAddToListAction:me.onAction,onCommit:E,onFieldBlur:ue.onFocusOut,onFieldFocus:ue.onFocusIn,onFieldInput:Fe.onInput,onFieldKeyDown:Fe.onKeyDown,onFieldKeyUp:Fe.onKeyUp}):t.jsx(ke,{...Se,assistiveText:d,collectionRenderer:p??mt,collectionRendererContext:xe,dropdownId:it,dropdownRef:we,helpSourceLink:x,helpSourceText:v,isAddToListShown:Ce,isDisabled:oe,isDropdownAbove:Ae,isEmptyResults:je,isOpen:vt,isReadonly:ne,label:D,mainFieldRef:Me,onAddToListAction:me.onAction,userAssistanceDensity:re}):null;return t.jsxs(s.Fragment,{children:[t.jsxs(m.FormFieldContext.Provider,{value:tt,children:[t.jsx(Ve,{columnSpan:h,compactUserAssistance:ht,fieldLabel:D,hasInsideLabel:yt,inlineUserAssistance:pt,isDropdownArrowShown:!0,isDropdownSelectedOnlyView:Ke,isSelectedValuesCountShown:ge,mainFieldRef:Me,onBlur:ue.onFocusOut,onFocus:ue.onFocusIn,onDropdownArrowClick:fe.onClick,onSelectedValuesCountKeyDown:He.onKeyDown,onSelectedValuesCountKeyUp:He.onKeyUp,onSelectedValuesCountMouseDown:He.onMouseDown,onSelectedValuesCountToggle:He.onToggle,rootRef:Ze,selectedValuesCount:O?.length,testId:j,...ct,...Oe,...nt,children:St}),!ee.isPhone()&&t.jsx(l.LiveRegion,{children:vt?bt.select_closeDropdown():void 0})]}),Tt]})}));e.SelectMultiple=qe}));
2
- //# sourceMappingURL=SelectMultiple-cc9bffc6.js.map
1
+ define(['exports', 'preact/jsx-runtime', 'preact', 'preact/compat', './Label-701506b1', './LiveRegion-dbefb95b', 'preact/hooks', './keyboardUtils-fb6219eb', './TextFieldInput-f8635c62', 'css!./ObfuscatedTextFieldInputStyles.styles.css', './ReadonlyTextFieldInput-41384d7e', './StyledTextField-2b62c81d', './LayerHost-0b288129', './FormContext-6b0879a0', './useFormContext-b8cbbb21', './FormFieldContext-a024b891', 'css!./LabelValueLayoutStyles.styles.css', './logger-0f873e29', './UNSAFE_TextField/themes/TextFieldStyles.css', 'css!./SkeletonStyles.styles.css', 'css!./TextFieldLoadingStyles.styles.css', 'css!./TextFieldStyles.styles.css', 'module', './UNSAFE_TextField/themes/redwood/TextFieldVariants.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './UNSAFE_TextField/themes/FormLayoutStyles.css', 'module', './Flex-4b81b412', 'css!./LayoutStyles.styles.css', './InputGroupContext-372087af', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', './formControlUtils-de035f75', './useTranslationBundle-e4dd341e', './TabbableModeContext-a9c97640', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-a59440e5', './CompactUserAssistance-fcc04dcc', 'css!./IconStyle.styles.css', './Popup-6b57cc3e', 'css!./HiddenAccessibleStyles.styles.css', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './useFocusableTextField-8b755b15', './useLoadingIndicatorTimer-20a3bf5f', './useTextField-3ab0a23b', './Separator-181f7541', './SelectMobileFieldInput-4795a794', './useSelectCommon-f33709d2', './useAccessibleContext-23e8a333', './useFormFieldContext-9260f081', './textAlign-ef924afd', 'css!./FormControlUtilsStyles.styles.css', 'css!./ReadonlyTextFieldInputStyles.styles.css', './UNSAFE_TextField/themes/redwood/ReadonlyTextFieldInputVariants.css', './TextField-c8c71735', 'css!./LiveRegionStyles.styles.css', './UNSAFE_SelectMultiple/themes/SelectedValuesCountStyles.css', './Chip-8280de2e', './IconButton-dc1be00e', './NavLeft-d270ba82', './useFocusWithin-5a504fca', './useUser-08901aba', './classNames-08d99695', './dimensions-95c0c920', './mergeInterpolations-9ede4cf7', './HiddenAccessible-037ef42d', './Text-31cabc49', './Close-36cbae0d', './useId-c9578d26', './UNSAFE_SelectMultiple/themes/TextTagStyles.css', './UNSAFE_SelectMultiple/themes/TextTagListStyles.css', './View-35699bb2', './Button-e5d7c0e3', './UNSAFE_SelectMultiple/themes/MobileDropdownFooterStyles.css', './useEffectEvent-6aa4d559', './equals-e73adbe3', './mergeProps-bcfa6a92', './stringUtils-4ffd9d59', './useHiddenTestMethod-8321d341'], (function(e,t,s,o,n,l,i,a,r,d,c,u,p,h,b,m,y,x,v,f,S,T,w,g,F,C,D,A,R,I,L,E,k,K,V,j,U,P,M,B,O,N,_,H,z,q,Y,W,$,G,Z,J,Q,X,ee,te,se,oe,ne,le,ie,ae,re,de,ce,ue,pe,he,be,me,ye,xe,ve,fe,Se,Te,we,ge,Fe,Ce,De,Ae,Re,Ie,Le,Ee){"use strict";function ke({assistiveText:e,collectionRenderer:s,collectionRendererContext:o,data:n,dropdownId:l,dropdownRef:i,helpSourceLink:a,helpSourceText:r,isAddToListShown:d,isDisabled:c,isDropdownAbove:u,isEmptyResults:p,isOpen:h,isReadonly:b,label:m,mainFieldRef:y,userAssistanceDensity:x,onAddToListAction:v,onAutoDismiss:f,onPosition:S}){const T=P.useTranslationBundle("@oracle/oraclejet-preact"),w=!h||u||c||b||!e&&!a||"efficient"!==x&&"reflow"!==x?void 0:t.jsx(M.TabbableModeContext.Provider,{value:{isTabbable:!1},children:t.jsx(X.DropdownUserAssistance,{assistiveText:e,fieldLabel:m,helpSourceLink:a,helpSourceText:r,userAssistanceDensity:x})}),g=p?d?void 0:t.jsx(ee.EmptyResults,{}):s(o),F=d?t.jsxs(t.Fragment,{children:[!p&&t.jsx("div",{onMouseDown:ee.preventDefault,children:t.jsx(Q.Separator,{})}),t.jsx(X.LinkItem,{isHighlighted:p,onAction:v,children:T.select_addToList()})]}):void 0;return t.jsxs(X.Dropdown,{dropdownRef:i,id:l,isOpen:h,anchorRef:y,onAutoDismiss:f,onPosition:S,children:[t.jsxs(ee.DropdownList,{hasBottomGap:void 0===w,isLoading:null===n,children:[g,F]}),w]})}function Ke({"aria-label":e,count:s=0,onKeyDown:o,onKeyUp:n,onMouseDown:l,...i}){const a=P.useTranslationBundle("@oracle/oraclejet-preact"),r=a.selectMultiple_showSelectedValues(),d=e?`${e}. `:"",c=a.selectMultiple_countPlus({COUNT:"99"}),u=s>99?`${c}`:`${s}`,p=`${d}${a.selectMultiple_valuesSelected({VALUE_COUNT:`${s}`})} ${r}`;return t.jsx("div",{class:de.selectedValueCountStyles.base,onKeyDown:o,onKeyUp:n,onMouseDown:l,children:t.jsx(ce.Chip,{"aria-label":p,...i,children:u})})}function Ve({children:e,columnSpan:s,fieldLabel:o,hasInsideLabel:n,isBackButtonShown:l,isClearButtonShown:i,isDropdownArrowShown:a,isDropdownSelectedOnlyView:r,isSelectedValuesCountShown:d,selectedValuesCount:c,onBackButtonClick:u,onClearButtonClick:p,onDropdownArrowClick:h,onSelectedValuesCountKeyDown:b,onSelectedValuesCountKeyUp:m,onSelectedValuesCountMouseDown:y,onSelectedValuesCountToggle:x,...v}){const{isDisabled:f,isLoading:S}=se.useFormFieldContext(),T=P.useTranslationBundle("@oracle/oraclejet-preact"),w=l?t.jsx(ue.IconButton,{"aria-label":T.selectMultiple_back(),size:"xs",variant:"ghost",onAction:u,children:t.jsx(pe.SvgNavLeft,{})}):null,g=i?t.jsx(ue.IconButton,{"aria-label":T.formControl_clear(),size:"sm",variant:"ghost",onAction:p,children:t.jsx(pe.SvgCancelS,{})}):null,F=a?t.jsx(ee.DropdownArrow,{isDisabled:f,onClick:h,testId:`${v.testId}_dropdownarrow`}):null,C=S?void 0:d?t.jsxs(I.Flex,{align:"center",justify:"center",gap:[0,"1x"],children:[t.jsx(Ke,{"aria-label":o,count:c,isDisabled:f,isSelected:r,onKeyDown:b,onKeyUp:m,onMouseDown:y,onToggle:x}),i&&g,a&&F]}):t.jsxs(t.Fragment,{children:[i&&g,a&&F]});return t.jsx(ae.TextField,{columnSpan:s,startContent:l&&w,mainContent:e,endContent:C,...v})}function je({children:e,removeIcon:s="never",isSelected:o=!1,onRemoveAction:n,onSelect:l,onRemoveIconClick:r,isFocused:d,value:c}){const u=P.useTranslationBundle("@oracle/oraclejet-preact"),p=i.useRef(null),h=Te.useId(),b=me.classNames([we.textTagStyles.base,o&&we.textTagStyles.selected]),m=i.useCallback((()=>{n?.(c)}),[c,n]),y=i.useCallback((()=>{l?.(c)}),[c,l]),x=i.useCallback((()=>{r?.(c)}),[c,r]),v=i.useCallback((e=>{a.isBackspaceOrDelete(e)&&m()}),[m]);return i.useEffect((()=>{d&&o&&(p.current?.focus(),p.current?.scrollIntoView({block:"nearest"}))}),[d,o]),t.jsxs(t.Fragment,{children:[t.jsxs("span",{ref:p,class:b,tabIndex:-1,onClick:y,onKeyUp:v,onMouseDown:ee.preventDefault,role:"option","aria-describedby":"never"===s?h:void 0,"aria-selected":o?"true":"false",children:[t.jsx(fe.Text,{size:"md",variant:"inherit",children:e}),"always"===s&&t.jsx(M.TabbableModeContext.Provider,{value:{isTabbable:!1},children:t.jsx(ue.IconButton,{size:"xs",variant:"ghost",onAction:x,children:t.jsx(Se.SvgClose,{})})})]}),"never"===s&&t.jsx(ve.HiddenAccessible,{id:h,children:u.selectMultiple_removeSelectedTagInstructionText()})]})}const Ue=Array.from(["maxWidth"],(e=>ye.dimensionInterpolations[e])),Pe=xe.mergeInterpolations(Ue);const Me=o.forwardRef((function(e,s=()=>{}){const{"aria-label":o,data:n,hasInsideLabel:l=!1,removeIcon:r="never",onExitNavigation:d,onRemove:c}=e,u=i.useRef(null),[p,h]=i.useState([]),{direction:b}=be.useUser(),m=i.useRef(-1),y=n.at(-1)?.value,x=i.useRef({value:y,index:n.length-1});x.current={value:y,index:n.length-1};const v=i.useCallback((e=>{const t=n.at(e)?.value;null!=t&&h([t])}),[n]),f=i.useCallback((()=>{h((e=>(m.current=-1,e.length?[]:e)))}),[]),S=i.useCallback((e=>{c?.([e]),d?.(),f()}),[f,d,c]),T=i.useCallback((e=>{const t=[...p];p.includes(e)||t.push(e),c?.(t),d?.(),f()}),[p,f,d,c]),w=i.useCallback((e=>{h([e]),m.current=n.findIndex((t=>t.value===e))}),[n,h]),g=i.useCallback((e=>{if(0!==n.length){if("ltr"===b&&"ArrowLeft"===e.code||"rtl"===b&&"ArrowRight"===e.code){if(0===m.current)return;return m.current-=1,void v(m.current)}return"ltr"===b&&"ArrowRight"===e.code||"rtl"===b&&"ArrowLeft"===e.code?m.current===n.length-1?void d?.():(m.current+=1,void v(m.current)):"Home"===e.code?(m.current=0,void v(m.current)):"End"===e.code?(m.current=n.length-1,void v(m.current)):a.isSelectAll(e)?(h(n.map((e=>e.value))),void e.preventDefault()):void 0}}),[n,b,d,v,h]),F=i.useCallback((()=>{h((e=>e.length||void 0===x.current.value?e:(m.current=x.current.index,[x.current.value])))}),[]),C=i.useCallback((()=>{f()}),[f]),{focusProps:D}=he.useFocusWithin({onBlurWithin:C});i.useImperativeHandle(s,(()=>({blur:C,focus:F})),[C,F]),i.useEffect((()=>{u.current?.scrollTo({left:u.current.scrollWidth*("ltr"===b?1:-1)})}),[n,b]);const A=Pe(e),R=me.classNames([ge.textTagListStyles.textTagListBase,l&&ge.textTagListStyles.textTagListInsideLabel]);return t.jsx("div",{class:R,ref:u,tabIndex:-1,onKeyDown:g,role:"listbox","aria-label":o,"aria-multiselectable":"true",style:A,...D,children:n.map(((e,s)=>t.jsx(je,{isFocused:m.current===s,isSelected:p.includes(e.value),onRemoveAction:T,onSelect:w,onRemoveIconClick:S,removeIcon:r,value:e.value,children:e.label},e.value)))})}));function Be({displayValue:e,isAddToListShown:s,isKeyboardNavigable:o,isTextTagListShown:n,isUserFiltering:a,liveRegionText:d,onExitNavigation:c,onRemove:u,removeIcon:p,selectedValuesDescriptionId:h,selectedValuesKeyboardNavDescriptionId:b,textTagListData:m,textTagListRef:y,userInput:x,virtualKeyboard:v,placeholder:f,...S}){const T=P.useTranslationBundle("@oracle/oraclejet-preact"),w=s?T.select_addToListAvailable():void 0,g=o&&e&&e.length>0?T.selectMultiple_highlightSelectedTagsInstructionText():void 0,{isInputFocused:F}=se.useFormFieldContext(),[C,D]=i.useState(g),[A,R]=i.useState(!1);return F&&n&&!C&&g&&!A?R(!0):F||!A||R(!1),C!==g&&D(g),t.jsxs(t.Fragment,{children:[n&&t.jsx(Me,{"aria-label":T.selectMultiple_selectedValues(),data:m,hasInsideLabel:S.hasInsideLabel,maxWidth:"50%",onExitNavigation:c,onRemove:u,ref:y,removeIcon:p}),t.jsx(I.Flex,{flex:1,children:t.jsx(r.TextFieldInput,{"aria-autocomplete":"list",autoComplete:"off",hasPrefix:n,role:"combobox",hasEndContent:!0,spellcheck:!1,type:"auto"===v?"search":v,value:a||n?x:e,placeholder:n?void 0:f,...S})}),n&&t.jsx(ve.HiddenAccessible,{id:h,isHidden:!0,children:e}),n&&g&&!A&&t.jsx(ve.HiddenAccessible,{id:b,isHidden:!0,children:g}),t.jsx(l.LiveRegion,{children:d}),n&&t.jsx(l.LiveRegion,{children:A?g:void 0}),s?t.jsx(l.LiveRegion,{children:w}):void 0]})}function Oe({onApply:e}){const s=P.useTranslationBundle("@oracle/oraclejet-preact");return t.jsx("div",{class:De.mobileDropdownFooterStyles.base,children:t.jsx(Ce.Button,{display:"label",edge:"bottom",label:s.selectMultiple_apply(),size:"sm",variant:"callToAction",onAction:e})})}function Ne(e,t){const s=P.useTranslationBundle("@oracle/oraclejet-preact").plural_separator();return{displayValue:i.useMemo((()=>{if(void 0===t)return"";const o=function(e,t){const s=t?[...t.values()]:[],o=t=>ee.renderItemText(t,e,"SelectMultiple"),n=s.map(o);return new Set(n)}(e,t),n=function(e,t){return Array.from(e.values()).join(t)}(o,s);return n}),[e,s,t]),textTags:i.useMemo((()=>void 0===t?[]:function(e,t=[]){return t.map((t=>({label:ee.renderItemText(t,e,"SelectMultiple")??"",value:t.key})))}(e,t)),[e,t])}}function _e({isDropdownSelectedOnlyView:e=!1,valueItems:t}){const s=Ae.useEffectEvent((e=>e&&t&&0!==t.length?{offset:0,totalSize:t.length,sizePrecision:"exact",data:t.map((e=>({data:e.data,metadata:e.metadata??{key:e.key}})))}:void 0));return{data:i.useMemo((()=>s(e)),[s,e]),onLoadRange:void 0}}const He=(e,t,s)=>t.data.forEach((t=>{s.has(t.metadata.key)&&e.set(t.metadata.key,{data:t.data,key:t.metadata.key,metadata:t.metadata})}));function ze({"aria-describedby":e,"aria-label":s,assistiveText:o,collectionRenderer:l,data:a,dropdownId:r,enabledElementRef:d,helpSourceLink:c,helpSourceText:u,isAddToListShown:p,isDisabled:h,isEmptyResults:b,isFocused:y,isLoading:x,isOpen:v,isReadonly:f,isRequired:S,isSelectedOnlyView:T,itemText:w,label:g,liveRegionText:F,placeholder:C,propIsLoading:D,selectedValuesDescriptionId:A,setDropdownOpen:R,setUserInput:I,stopFiltering:L,textAlign:E,textTagListRef:k,userAssistanceDensity:K,userInput:V,valueItems:j,virtualKeyboard:U,onAddToListAction:M,onCommit:B,onFieldBlur:O,onFieldFocus:N,onFieldInput:_,onFieldKeyDown:H,onFieldKeyUp:z}){const q=P.useTranslationBundle("@oracle/oraclejet-preact"),{collectionRendererContext:Y,footerProps:W,selectMultipleFieldInputProps:$,selectMultipleFieldProps:G,selectedValuesCountProps:Z}=function({data:e,inputRef:t,isDropdownOpen:s,isDropdownSelectedOnlyView:o,itemText:n,textTagListRef:l,userInput:a,valueItems:r,onCommit:d,setDropdownOpen:c,setUserInput:u,stopFiltering:p}){const[h,b]=i.useState({rowKey:void 0}),[m,y]=i.useState(ee.createKeysFromValueItems(r)),[x,v]=i.useState(o),f=i.useRef(new Map),S=i.useMemo((()=>{const e=[];return m?.forEach((t=>{const s=r?.find((e=>e.key===t));s?e.push(s):f.current.has(t)&&e.push(f.current.get(t))})),e}),[m,r]),{textTags:T,displayValue:w}=Ne(n,S),g=i.useRef(null),{data:F}=_e({isDropdownSelectedOnlyView:x,valueItems:S}),C=i.useCallback((e=>{b({rowKey:e.value})}),[b]),D=i.useCallback((t=>{y(t.value),u(""),e&&He(f.current,e,t.value)}),[e,y,u]),A=i.useCallback((({value:e=!1})=>{v((t=>(t!==e&&p(),e)))}),[v,p]),R=i.useCallback((()=>{y(ee.createKeysFromValueItems(r)),f.current.clear(),c(!1),p(),t.current?.focus()}),[t,c,p,r]),I=i.useCallback((()=>{d({previousValue:ee.createKeysFromValueItems(r),value:m}),R()}),[m,r,R,d]),L=i.useCallback((()=>{R()}),[R]),E=i.useCallback((()=>{y(new Set),p()}),[p]),k=i.useCallback((e=>{const t=new Set(m);e.forEach((e=>t.delete(e))),y(t)}),[m]),K=i.useCallback((()=>{setTimeout((()=>g.current?.focus()),0)}),[]);i.useEffect((()=>{s&&setTimeout((()=>g.current?.focus()),0)}),[s]);const[V,j]=i.useState(r);return V!==r&&(s||y((e=>{const t=ee.createKeysFromValueItems(r);return Re.equals(e,t)?e:t})),j(r)),{collectionRendererContext:ee.useCollectionRenderer({currentKey:h.rowKey,onCurrentKeyChange:C,onSelectedKeysChange:D,searchText:a,selectedKeys:m,selectedOnlyData:F}),footerProps:{onApply:I},selectMultipleFieldInputProps:{displayValue:w,hasEmptyLabel:!1,hasInsideLabel:!0,inputRef:g,isTextTagListShown:T.length>0,isUserFiltering:!0,removeIcon:"always",userInput:a,textTagListData:T,textTagListRef:l,onExitNavigation:K,onRemove:k},selectMultipleFieldProps:{hasInsideLabel:!0,isBackButtonShown:!0,isClearButtonShown:!ee.isSearchTextEmptyOrUndefined(a)||0!==T.length,isDropdownArrowShown:!1,isDropdownSelectedOnlyView:x,isSelectedValuesCountShown:(m?.size??0)>0||x,selectedValuesCount:m?.size??0,styleVariant:"embedded",onBackButtonClick:L,onClearButtonClick:E},selectedValuesCountProps:{onSelectedValuesCountToggle:A},isDropdownSelectedOnlyView:x}}({data:a,inputRef:d,isDropdownOpen:v,isDropdownSelectedOnlyView:T,itemText:w,textTagListRef:k,userInput:V,valueItems:j,onCommit:B,setDropdownOpen:R,setUserInput:I,stopFiltering:L}),{formFieldContext:te,inputProps:se,labelProps:oe,textFieldProps:ne,userAssistanceProps:le}=J.useTextField({ariaDescribedBy:e,helpSourceLink:c,helpSourceText:u,isDisabled:!1,isFocused:y,isLoading:x,isReadonly:!1,isRequiredShown:!1,labelEdge:"inside",styleVariant:"default",value:G.selectedValuesCount>0||void 0});te.hasValue=D||te.hasValue;const ie={label:t.jsx(n.Label,{...oe,children:g}),labelEdge:"inside"},ae=!v||h||f||!o&&!c||"efficient"!==K&&"reflow"!==K?void 0:t.jsx(X.DropdownUserAssistance,{assistiveText:o,fieldLabel:g,helpSourceLink:c,helpSourceText:u,userAssistanceDensity:K,...le}),re=b?p?void 0:t.jsx(ee.EmptyResults,{}):l(Y),de=p?t.jsxs(t.Fragment,{children:[t.jsx("div",{onMouseDown:ee.preventDefault,children:t.jsx(Q.Separator,{})}),t.jsx(X.LinkItem,{onAction:M,children:q.select_addToList()})]}):void 0;return t.jsx(X.SelectMobileDropdown,{header:t.jsxs(m.FormFieldContext.Provider,{value:te,children:[t.jsx(Fe.View,{children:t.jsx(Ve,{fieldLabel:g,onBlur:O,onFocus:N,...ie,...ne,...G,...Z,children:t.jsx(Be,{"aria-controls":r,"aria-expanded":v,"aria-label":s,isAddToListShown:p,isRequired:S,liveRegionText:F,placeholder:C,selectedValuesDescriptionId:A,textAlign:E,virtualKeyboard:U,onInput:_,onKeyDown:H,onKeyUp:z,...se,...$})})}),ae,de]}),footer:t.jsx(Oe,{...W}),id:r,isOpen:v,labelId:oe.id,children:t.jsx(ee.DropdownList,{hasTopGap:!de,hasBottomGap:!0,isLoading:null===a,children:re})})}const qe=o.forwardRef((({addToList:e="off","aria-describedby":r,assistiveText:d,collectionRenderer:p,columnSpan:h,data:y,helpSourceLink:x,helpSourceText:v,isDisabled:f,isLoading:S,isReadonly:T,isRequired:w,isRequiredShown:g,itemRenderer:F,itemText:C,label:D,labelEdge:A,labelStartWidth:R,messages:I,onAddToListAction:L,onCommit:E,onFilter:k,onLoadRange:K,placeholder:V,testId:j,textAlign:M,userAssistanceDensity:B,valueItems:O,variant:N="default",virtualKeyboard:z},q)=>{const{isDisabled:Y,isReadonly:W,labelEdge:$,labelStartWidth:Q,textAlign:te,userAssistanceDensity:se}=b.useFormContext(),oe=f??Y,ne=T??W,le=A??$,ie=R??Q,ae=M??te??U.defaultTextAlignForVariant(N),re=B??se,de=o.useRef(null),ce=o.useRef(null),{focusProps:ue,isFocused:pe,methods:he}=G.useFocusableTextField({isDisabled:oe,isReadonly:ne,enabledElementRef:de,readonlyElementRef:ce});o.useImperativeHandle(q,(()=>he),[he]);const{addToListEventHandlers:me,ariaProps:ye,collectionRendererContext:xe,data:ve,dropdownArrowEventHandlers:fe,dropdownEventHandlers:Se,dropdownRef:we,hasSelectedValuesCount:ge,inputEventHandlers:Fe,isAddToListShown:Ce,isDataFetched:De,isDropdownAbove:Ae,isDropdownOpen:Re,isDropdownSelectedOnlyView:Ke,isEmptyResults:je,isFocused:Ue,isUserFiltering:Pe,mainFieldRef:Me,mouseProps:Oe,selectedValuesCountProps:He,selectedValuesDescriptionId:qe,selectedValuesKeyboardNavDescriptionId:Ye,setDropdownOpen:We,setUserInput:$e,stopFiltering:Ge,textFieldRef:Ze,textTagListProps:Je,userInput:Qe}=function({addToList:e,ariaDescribedBy:t,data:s,inputRef:o,isDisabled:n,isFocused:l,isReadonly:r,onAddToListAction:d,onCommit:c,onFilter:u,valueItems:p}){const[h,b]=i.useState(!1),m=p?.length,y=void 0!==m&&m>0||h,x=_e({isDropdownSelectedOnlyView:h,valueItems:p}),v=h?x.data:s,f=i.useCallback((e=>{ee.isSearchTextEmptyOrUndefined(e.searchText)||b(!1),u?.(e)}),[u]),{currentRowKeyRef:S,currentRowOverride:T,dropdownRef:w,getDropdownTabbableElems:g,handleDropdownArrowClick:F,handleDropdownAutoDismiss:C,handleDropdownPosition:D,handleInput:A,handleMainFieldKeyDown:R,handleMainFieldKeyUp:I,handleUpDownArrowKeys:L,isDropdownAbove:E,isDropdownOpen:k,isFocused:K,isUserFiltering:V,mainFieldRef:j,onCurrentKeyChange:U,onMouseDown:P,searchText:M,setCurrentRowOverride:B,setDropdownOpen:O,setUserInput:N,stopFiltering:_,userInput:H}=ee.useSelectCommon({data:v,inputRef:o,isFocused:l,onFilter:f}),[z,q]=i.useState(k),[Y,W]=i.useState(p),[$,G]=i.useState(ee.createKeysFromValueItems(p)),Z=null!=v&&!ee.isBeforeDataFetch(v),J=Z&&0===v?.totalSize,Q="on"===e&&V&&null!=M&&M.length>0,X=i.useCallback((()=>{O(!1),_(),d?.({searchText:V?M:void 0})}),[V,d,M,O,_]),te=i.useRef(null),{direction:se}=be.useUser(),oe=Te.useId(),ne=Te.useId(),le=Le.l([K&&ne,K&&oe,t]),ie=i.useCallback((()=>{w.current?.parentElement?.removeChild(w.current)}),[w]),ae=i.useCallback((e=>V&&k&&!ee.isSearchTextEmptyOrUndefined(H)&&(v?.data.length??0)>0&&void 0!==e),[v,k,V,H]),re=i.useCallback((e=>{if($?.has(e))return;const t=void 0===$?new Set([e]):new Set([...$.values(),e]);c({previousValue:$,value:t}),G(t)}),[c,$,G]),de=i.useRef(null),ce=i.useCallback((e=>r||n?Promise.reject("Component is readonly or disabled"):(c({value:e,previousValue:$}),Promise.resolve())),[n,r,c,$]);Ee.useHiddenTestMethod({elementRef:r?j:de,method:ce,name:"_changeValue"});const ue=i.useCallback((e=>{if(k&&"keydown"===e?.type){const t=e;switch(t.code){case a.KEYS.TAB:{const e=t.shiftKey,s=g();if(s&&s.length>1){const t=s[0],o=s[s.length-1];if(!e&&document.activeElement!==o||e&&document.activeElement!==t)return void O(!0)}t.shiftKey||!y?o.current?.focus():he.current?.focus(),ie();break}}}}),[g,y,o,k,ie,O]),pe=i.useCallback((e=>{if(!a.isControlOrFunctionKey(e))switch(e.code){case a.KEYS.TAB:k&&(e.shiftKey||!y&&!e.shiftKey)&&(ie(),O(!1)),y&&!e.shiftKey&&e.stopPropagation();break;case a.KEYS.LEFT:"ltr"===se&&o.current instanceof HTMLInputElement&&0===o.current?.selectionStart&&0===o.current?.selectionEnd&&te.current?.focus();break;case a.KEYS.RIGHT:"rtl"===se&&o.current instanceof HTMLInputElement&&0===o.current?.selectionStart&&0===o.current?.selectionEnd&&te.current?.focus();break;case a.KEYS.ENTER:case a.KEYS.NUMPAD_ENTER:if(ee.isPhone())return;if(Q&&J)return void X();ae(S.current)&&(O(!1),_(),re(S.current))}}),[S,se,X,y,o,Q,k,J,ie,re,O,ae,_]);if(Y!==p){const e=ee.createKeysFromValueItems(p);G(e)}const he=i.useRef(null);i.useEffect((()=>{he.current=y&&j.current?.querySelector?j.current.querySelector('[role="switch"]'):null}),[y,n,r,j]);const me=i.useCallback((e=>{switch(e.code){case a.KEYS.TAB:k&&!e.shiftKey&&(ie(),O(!1)),e.shiftKey&&e.stopPropagation();break;case a.KEYS.UP:case a.KEYS.DOWN:e.preventDefault();break;case a.KEYS.ESC:k&&(O(!1),e.preventDefault(),e.stopPropagation());break;case a.KEYS.ENTER:e.stopPropagation()}}),[k,ie,O]),ye=i.useCallback((e=>{switch(e.code){case a.KEYS.UP:case a.KEYS.DOWN:L(e)}}),[L]),xe=i.useCallback((e=>{e.preventDefault(),he.current?.focus()}),[he]),ve=i.useCallback((e=>{k||O(!0);const t=e.value??!1;t!==h&&(b(t),t&&_())}),[k,h,O,_]);!k&&h&&b(!1);const fe=i.useCallback((e=>{G(e.value),N(""),c?.({value:e.value,previousValue:$})}),[c,$,G,N]),Se=i.useCallback((()=>{setTimeout((()=>o.current?.focus()),0)}),[o]),we=i.useCallback((e=>{const t=$,s=new Set($);e.forEach((e=>s.delete(e))),c?.({previousValue:t,value:s})}),[c,$]),ge=i.useMemo((()=>Ie.mergeProps({onAutoDismiss:C,onPosition:D},{onAutoDismiss:ue})),[C,D,ue]),Fe=i.useMemo((()=>Ie.mergeProps({onInput:A,onKeyDown:R,onKeyUp:I},{onKeyDown:pe})),[R,A,I,pe]),Ce=i.useMemo((()=>({textTagListRef:te,onExitNavigation:Se,onRemove:we})),[Se,we]),De=ee.useCollectionRenderer({currentKey:T.rowKey,onCurrentKeyChange:U,onSelectedKeysChange:fe,searchText:M,selectedKeys:$,selectedOnlyData:x.data});k&&!z&&B({rowKey:void 0}),z&&!k&&!H&&_();const Ae=i.useRef(v);if(Ae.current!==v){const e=v?.data[0]?.metadata.key;k&&V&&null!=e&&0===v?.offset&&B({rowKey:ee.isSearchTextEmptyOrUndefined(M)?void 0:e}),Ae.current=v}return z!==k&&q(k),Y!==p&&W(p),{addToListEventHandlers:{onAction:X},ariaProps:{ariaDescribedBy:le},collectionRendererContext:De,data:v,dropdownArrowEventHandlers:{onClick:F},dropdownEventHandlers:ge,dropdownRef:w,hasSelectedValuesCount:y,inputEventHandlers:Fe,inputRef:o,isAddToListShown:Q,isDataFetched:Z,isDropdownAbove:E,isDropdownOpen:k,isDropdownSelectedOnlyView:h,isEmptyResults:J,isFocused:K,isUserFiltering:V,mainFieldRef:j,mouseProps:n||r?{}:{onMouseDown:P},searchText:M,selectedValuesCountProps:{onKeyDown:me,onKeyUp:ye,onMouseDown:xe,onToggle:ve},selectedValuesDescriptionId:oe,selectedValuesKeyboardNavDescriptionId:ne,setDropdownOpen:O,setUserInput:N,stopFiltering:_,textFieldRef:de,textTagListProps:Ce,userInput:H}}({addToList:e,ariaDescribedBy:r,data:y,inputRef:de,isDisabled:oe,isFocused:pe,isReadonly:ne,onAddToListAction:L,onCommit:E,onFilter:k,valueItems:O}),Xe=Z.useLoadingIndicatorTimer(S??!1),{baseId:et,formFieldContext:tt,inputProps:st,labelProps:ot,textFieldProps:nt,userAssistanceProps:lt}=J.useTextField({ariaDescribedBy:ye.ariaDescribedBy,helpSourceLink:x,helpSourceText:v,isDisabled:oe,isFocused:Ue,isLoading:Xe,isReadonly:ne,isRequiredShown:g,labelEdge:le,messages:I,styleVariant:N,userAssistanceDensity:re,value:void 0!==O&&O.length>0||void 0});tt.hasValue=S||tt.hasValue;const it=`${et}-dropdown`,{displayValue:at,textTags:rt}=Ne(C,O),dt="none"!==le?t.jsx(n.Label,{...ot,...ee.isPhone()?{forId:void 0}:{},children:D}):void 0,ct={label:"none"!==le?dt:void 0,labelEdge:"none"!==le?le:void 0,labelStartWidth:"none"!==le?ie:void 0,labelText:"inside"!==le||oe?void 0:D},ut="none"===le?D:void 0,pt="efficient"===re||"reflow"===re?oe?"efficient"!==re?void 0:t.jsx(_.InlineUserAssistance,{userAssistanceDensity:re,...lt}):ne?t.jsx(_.InlineUserAssistance,{fieldLabel:D,messages:I,userAssistanceDensity:re,...lt}):t.jsx(_.InlineUserAssistance,{assistiveText:d,fieldLabel:D,helpSourceLink:x,helpSourceText:v,messages:I,isRequiredShown:g,userAssistanceDensity:re,...lt}):void 0,ht="compact"===re?t.jsx(H.CompactUserAssistance,{anchorRef:Me,messages:I,assistiveText:d,...lt}):void 0,bt=P.useTranslationBundle("@oracle/oraclejet-preact"),mt=o.useCallback((({currentRowKeyOverride:e,onPersistCurrentRowKey:s,onSelectedChange:o,searchText:n,selected:l,selectedOnlyData:i})=>t.jsx(ee.DefaultList,{"aria-label":D??"",componentName:"SelectMultiple",currentItemVariant:"highlight",currentKey:e,data:i??y,itemRenderer:F,itemText:C,searchText:i?void 0:Pe?n:void 0,selectedKeys:l,selectionMode:"multiple",onCurrentKeyChange:s,onLoadRange:i?void 0:K,onSelectionChange:o})),[Pe,F,C,D,K,y]);if(ne){const e=t.jsx(c.ReadonlyTextFieldInput,{"aria-describedby":st["aria-describedby"],"aria-label":ut,"aria-labelledby":ot.id,as:"div",elementRef:ce,formVariant:N,hasEmptyLabel:""===D&&"none"===le,hasInsideLabel:void 0!==D&&"inside"===le,onBlur:st.onBlur,onFocus:st.onFocus,textAlign:ae,value:at});return t.jsx(m.FormFieldContext.Provider,{value:tt,children:t.jsx(u.ReadonlyTextField,{role:"presentation",columnSpan:h,compactUserAssistance:ht,inlineUserAssistance:pt,onBlur:ue.onFocusOut,onFocus:ue.onFocusIn,ref:Me,mainContent:e,testId:j,...ct})})}const yt="inside"===le,xt=Re&&De?0===ve?.totalSize?bt.select_noMatchesFound():1===ve?.totalSize?bt.select_oneMatchFound():"exact"===ve?.sizePrecision?bt.select_sizeMatchesFound({TOTAL_SIZE:`${ve?.totalSize}`}):bt.select_sizeOrMoreMatchesFound({TOTAL_SIZE:`${ve?.totalSize}`}):"",vt=Re&&void 0!==ve&&(null===ve||ve.totalSize>0||ee.isBeforeDataFetch(ve)||je),ft=""===D&&"none"===le,St=ee.isPhone()&&!oe?t.jsx(X.SelectMobileFieldInput,{"aria-controls":it,"aria-describedby":st["aria-describedby"],"aria-expanded":Re,"aria-invalid":st["aria-invalid"],"aria-label":ut,"aria-labelledby":ot.id,displayValue:at,hasEmptyLabel:ft,hasInsideLabel:yt,isRequired:w,onBlur:st.onBlur,onFocus:st.onFocus,placeholder:V,ref:de,textAlign:ae,variant:st.variant}):t.jsx(Be,{"aria-controls":it,"aria-expanded":Re,"aria-label":ut,displayValue:at,hasEmptyLabel:ft,hasInsideLabel:yt,inputRef:de,isAddToListShown:Ce,isKeyboardNavigable:!oe&&!ee.isMobile(),isRequired:w,isTextTagListShown:Ue&&0!==rt.length,isUserFiltering:Pe,liveRegionText:xt,placeholder:V,removeIcon:ee.isTablet()?"always":"never",selectedValuesDescriptionId:qe,selectedValuesKeyboardNavDescriptionId:Ye,textAlign:ae,textTagListData:rt,userInput:Qe,virtualKeyboard:ee.isTablet()?z:void 0,...Fe,...st,...Je}),Tt=vt?ee.isPhone()?t.jsx(ze,{"aria-describedby":ye.ariaDescribedBy,"aria-label":ut,assistiveText:d,collectionRenderer:p??mt,data:y,dropdownId:it,enabledElementRef:de,helpSourceLink:x,helpSourceText:v,isAddToListShown:Ce,isDisabled:oe,isEmptyResults:je,isFocused:Ue,isLoading:Xe,isOpen:vt,isReadonly:ne,isRequired:w,isSelectedOnlyView:Ke,itemText:C,label:D,liveRegionText:xt,placeholder:V,propIsLoading:S,selectedValuesDescriptionId:qe,setDropdownOpen:We,setUserInput:$e,stopFiltering:Ge,textAlign:ae,textTagListRef:Je.textTagListRef,userAssistanceDensity:re,userInput:Qe,valueItems:O,virtualKeyboard:z,onAddToListAction:me.onAction,onCommit:E,onFieldBlur:ue.onFocusOut,onFieldFocus:ue.onFocusIn,onFieldInput:Fe.onInput,onFieldKeyDown:Fe.onKeyDown,onFieldKeyUp:Fe.onKeyUp}):t.jsx(ke,{...Se,assistiveText:d,collectionRenderer:p??mt,collectionRendererContext:xe,dropdownId:it,dropdownRef:we,helpSourceLink:x,helpSourceText:v,isAddToListShown:Ce,isDisabled:oe,isDropdownAbove:Ae,isEmptyResults:je,isOpen:vt,isReadonly:ne,label:D,mainFieldRef:Me,onAddToListAction:me.onAction,userAssistanceDensity:re}):null;return t.jsxs(s.Fragment,{children:[t.jsxs(m.FormFieldContext.Provider,{value:tt,children:[t.jsx(Ve,{columnSpan:h,compactUserAssistance:ht,fieldLabel:D,hasInsideLabel:yt,inlineUserAssistance:pt,isDropdownArrowShown:!0,isDropdownSelectedOnlyView:Ke,isSelectedValuesCountShown:ge,mainFieldRef:Me,onBlur:ue.onFocusOut,onFocus:ue.onFocusIn,onDropdownArrowClick:fe.onClick,onSelectedValuesCountKeyDown:He.onKeyDown,onSelectedValuesCountKeyUp:He.onKeyUp,onSelectedValuesCountMouseDown:He.onMouseDown,onSelectedValuesCountToggle:He.onToggle,rootRef:Ze,selectedValuesCount:O?.length,testId:j,...ct,...Oe,...nt,children:St}),!ee.isPhone()&&t.jsx(l.LiveRegion,{children:vt?bt.select_closeDropdown():void 0})]}),Tt]})}));e.SelectMultiple=qe}));
2
+ //# sourceMappingURL=SelectMultiple-e216b16c.js.map