@oracle/oraclejet-preact 18.0.6 → 18.0.7

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 (613) hide show
  1. package/amd/ActionCard-3f86f73f.js +1 -1
  2. package/amd/{BarChart-077c5f02.js → BarChart-5e9f46b4.js} +2 -2
  3. package/amd/{BarChart-077c5f02.js.map → BarChart-5e9f46b4.js.map} +1 -1
  4. package/amd/BarGroup-76ef0839.js +1 -1
  5. package/amd/BaseButton-19a622bc.js +1 -1
  6. package/amd/{BaseCardView-70b177ed.js → BaseCardView-ab799b69.js} +2 -2
  7. package/amd/{BaseCardView-70b177ed.js.map → BaseCardView-ab799b69.js.map} +1 -1
  8. package/amd/{BaseCardViewSelectionTest-0ec52156.js → BaseCardViewSelectionTest-d026d26c.js} +2 -2
  9. package/amd/{BaseCardViewSelectionTest-0ec52156.js.map → BaseCardViewSelectionTest-d026d26c.js.map} +1 -1
  10. package/amd/BaseNavigationListItem-fe9cb691.js +1 -1
  11. package/amd/BaseRichSelection-9d8f3ee4.js +1 -1
  12. package/amd/ButtonSet-d95872cc.js +1 -1
  13. package/amd/ButtonSetIconButton-7a2c113c.js +1 -1
  14. package/amd/{Card-f6f2dc90.js → Card-8e081def.js} +2 -2
  15. package/amd/{Card-f6f2dc90.js.map → Card-8e081def.js.map} +1 -1
  16. package/amd/CardFlexView-296f97f5.js +2 -0
  17. package/amd/{CardFlexView-bb5c4369.js.map → CardFlexView-296f97f5.js.map} +1 -1
  18. package/amd/{CardGridView-c28ff2f7.js → CardGridView-054ffc3f.js} +2 -2
  19. package/amd/{CardGridView-c28ff2f7.js.map → CardGridView-054ffc3f.js.map} +1 -1
  20. package/amd/{Center-b449a95c.js → Center-9ec5524e.js} +2 -2
  21. package/amd/{Center-b449a95c.js.map → Center-9ec5524e.js.map} +1 -1
  22. package/amd/{Chart-3621e125.js → Chart-e2807ff7.js} +2 -2
  23. package/amd/{Chart-3621e125.js.map → Chart-e2807ff7.js.map} +1 -1
  24. package/amd/CheckboxControl-83484a5a.js +1 -1
  25. package/amd/CheckboxRadioField-9733dd24.js +1 -1
  26. package/amd/Chip-cd210507.js +1 -1
  27. package/amd/ClearIcon-de20285c.js +1 -1
  28. package/amd/CollapseIcon-e030531c.js +1 -1
  29. package/amd/Collapsible-924afd71.js +1 -1
  30. package/amd/{ComboChart-fd7da90e.js → ComboChart-71c0f51f.js} +2 -2
  31. package/amd/{ComboChart-fd7da90e.js.map → ComboChart-71c0f51f.js.map} +1 -1
  32. package/amd/CompactHelpSource-74498e92.js +1 -1
  33. package/amd/CompactLabelAssistance-c6928282.js +2 -0
  34. package/amd/{CompactLabelAssistance-44ba87b0.js.map → CompactLabelAssistance-c6928282.js.map} +1 -1
  35. package/amd/CompactUserAssistance-3370a318.js +1 -1
  36. package/amd/ComponentMessageContainer-8028ba70.js +1 -1
  37. package/amd/ConveyorBeltItem-08720127.js +1 -1
  38. package/amd/{DatePicker-2c94a3bb.js → DatePicker-bf0e0c69.js} +2 -2
  39. package/amd/{DatePicker-2c94a3bb.js.map → DatePicker-bf0e0c69.js.map} +1 -1
  40. package/amd/DatePickerHeader-f21e020d.js +1 -1
  41. package/amd/{Diagram-c3afb211.js → Diagram-04db0931.js} +2 -2
  42. package/amd/{Diagram-c3afb211.js.map → Diagram-04db0931.js.map} +1 -1
  43. package/amd/{Dialog-53f92591.js → Dialog-5f36f8aa.js} +2 -2
  44. package/amd/{Dialog-53f92591.js.map → Dialog-5f36f8aa.js.map} +1 -1
  45. package/amd/DirectionalCollapseArrowIcon-20cef34d.js +1 -1
  46. package/amd/DirectionalExpandArrowIcon-e9bdb06e.js +1 -1
  47. package/amd/{DragHandle-699fefd6.js → DragHandle-406d7f9a.js} +2 -2
  48. package/amd/{DragHandle-699fefd6.js.map → DragHandle-406d7f9a.js.map} +1 -1
  49. package/amd/{Dropdown-4b421eff.js → Dropdown-abcacf49.js} +2 -2
  50. package/amd/{Dropdown-4b421eff.js.map → Dropdown-abcacf49.js.map} +1 -1
  51. package/amd/{EnvironmentProvider-8f6fc388.js → EnvironmentProvider-c0e1e39b.js} +2 -2
  52. package/amd/{EnvironmentProvider-8f6fc388.js.map → EnvironmentProvider-c0e1e39b.js.map} +1 -1
  53. package/amd/ExpandableList-dd3a05b4.js +1 -1
  54. package/amd/FilePicker-4636b49b.js +1 -1
  55. package/amd/Flex-3421f0df.js +2 -0
  56. package/amd/{Flex-56ecdf4c.js.map → Flex-3421f0df.js.map} +1 -1
  57. package/amd/{Floating-1ec5ec2a.js → Floating-5d98c1ca.js} +2 -2
  58. package/amd/{Floating-1ec5ec2a.js.map → Floating-5d98c1ca.js.map} +1 -1
  59. package/amd/FormLayout-a4a29a2d.js +1 -1
  60. package/amd/Gantt-d94af58e.js +1 -1
  61. package/amd/{Grid-160f4885.js → Grid-8911aa0f.js} +2 -2
  62. package/amd/{Grid-160f4885.js.map → Grid-8911aa0f.js.map} +1 -1
  63. package/amd/{Gridlines-7851bb20.js → Gridlines-bef7bbfc.js} +2 -2
  64. package/amd/{Gridlines-7851bb20.js.map → Gridlines-bef7bbfc.js.map} +1 -1
  65. package/amd/GroupLoadingIndicator-6b2ab709.js +1 -1
  66. package/amd/HighlightText-644bc74e.js +2 -0
  67. package/amd/{HighlightText-bd4c0101.js.map → HighlightText-644bc74e.js.map} +1 -1
  68. package/amd/Icon-2d38c876.js +1 -1
  69. package/amd/IconButton-ae9a01ce.js +1 -1
  70. package/amd/IconMenuButton-b0468fa8.js +1 -1
  71. package/amd/IconProgressButton-ff5372eb.js +1 -1
  72. package/amd/IconSwitchButton-22f907e7.js +1 -1
  73. package/amd/IconToggleButton-20d411e6.js +1 -1
  74. package/amd/{IconUserAssistance-d2bd2691.js → IconUserAssistance-37107cea.js} +2 -2
  75. package/amd/{IconUserAssistance-d2bd2691.js.map → IconUserAssistance-37107cea.js.map} +1 -1
  76. package/amd/{Indexer-357554c4.js → Indexer-1531dbc3.js} +2 -2
  77. package/amd/{Indexer-357554c4.js.map → Indexer-1531dbc3.js.map} +1 -1
  78. package/amd/InlineHelpSource-85961e81.js +1 -1
  79. package/amd/InlineUserAssistance-4656c2a6.js +1 -1
  80. package/amd/InputDateMask-6d54c3e6.js +1 -1
  81. package/amd/InputDatePicker-fc39f0a6.js +1 -1
  82. package/amd/InputPassword-f6ea728a.js +1 -1
  83. package/amd/InputText-57f60b6f.js +1 -1
  84. package/amd/Label-3912beb2.js +1 -1
  85. package/amd/LabelValueLayout-194e64d9.js +1 -1
  86. package/amd/{Layer-447c68e6.js → Layer-6f29b67f.js} +2 -2
  87. package/amd/{Layer-447c68e6.js.map → Layer-6f29b67f.js.map} +1 -1
  88. package/amd/{LayerHost-e95c5f30.js → LayerHost-639b3284.js} +2 -2
  89. package/amd/{LayerHost-e95c5f30.js.map → LayerHost-639b3284.js.map} +1 -1
  90. package/amd/{LayerManager-76fcfb58.js → LayerManager-2972de92.js} +2 -2
  91. package/amd/{LayerManager-76fcfb58.js.map → LayerManager-2972de92.js.map} +1 -1
  92. package/amd/Legend-e4949499.js +1 -1
  93. package/amd/{LineAreaChart-4140d004.js → LineAreaChart-2ba275ab.js} +2 -2
  94. package/amd/{LineAreaChart-4140d004.js.map → LineAreaChart-2ba275ab.js.map} +1 -1
  95. package/amd/{LineSeries-a549e727.js → LineSeries-797d8d16.js} +2 -2
  96. package/amd/{LineSeries-a549e727.js.map → LineSeries-797d8d16.js.map} +1 -1
  97. package/amd/Link-c4a57187.js +1 -1
  98. package/amd/List-0b764e84.js +2 -0
  99. package/amd/{List-04c4fed0.js.map → List-0b764e84.js.map} +1 -1
  100. package/amd/{ListItemLayout-4208363c.js → ListItemLayout-e0b2c71e.js} +2 -2
  101. package/amd/{ListItemLayout-4208363c.js.map → ListItemLayout-e0b2c71e.js.map} +1 -1
  102. package/amd/{ListView-bf740071.js → ListView-5bb45f81.js} +2 -2
  103. package/amd/{ListView-bf740071.js.map → ListView-5bb45f81.js.map} +1 -1
  104. package/amd/LiveRegion-9a362373.js +2 -0
  105. package/amd/{LiveRegion-8142ed0d.js.map → LiveRegion-9a362373.js.map} +1 -1
  106. package/amd/LoadMoreCollection-83413a59.js +2 -0
  107. package/amd/{LoadMoreCollection-a6adbc3f.js.map → LoadMoreCollection-83413a59.js.map} +1 -1
  108. package/amd/MaxLengthLiveRegion-bb956138.js +2 -0
  109. package/amd/{MaxLengthLiveRegion-8954fc30.js.map → MaxLengthLiveRegion-bb956138.js.map} +1 -1
  110. package/amd/Menu-5d447084.js +1 -1
  111. package/amd/MenuButton-410aa4e1.js +1 -1
  112. package/amd/MenuItem-87cd59b8.js +1 -1
  113. package/amd/Message-621fb578.js +1 -1
  114. package/amd/{MessageLayer-ba56f7e2.js → MessageLayer-8bac8c50.js} +2 -2
  115. package/amd/{MessageLayer-ba56f7e2.js.map → MessageLayer-8bac8c50.js.map} +1 -1
  116. package/amd/MessageToast-06773c79.js +1 -1
  117. package/amd/MessagesManager-d5686336.js +1 -1
  118. package/amd/MeterBar-e1b4a93b.js +1 -1
  119. package/amd/MeterCircle-9887cf28.js +1 -1
  120. package/amd/{Modal-d6b2e905.js → Modal-7bece8d5.js} +2 -2
  121. package/amd/{Modal-d6b2e905.js.map → Modal-7bece8d5.js.map} +1 -1
  122. package/amd/{MonthView-4a0401cd.js → MonthView-3d0968a1.js} +2 -2
  123. package/amd/{MonthView-4a0401cd.js.map → MonthView-3d0968a1.js.map} +1 -1
  124. package/amd/NavigationListItem-044a79fd.js +1 -1
  125. package/amd/NumberInputText-cac12eb3.js +1 -1
  126. package/amd/OverflowTabBarItem-c59db4a2.js +1 -1
  127. package/amd/PRIVATE_BaseCardView.js +1 -1
  128. package/amd/PRIVATE_Chart.js +1 -1
  129. package/amd/PRIVATE_CheckboxControl.js +1 -1
  130. package/amd/PRIVATE_CheckboxRadioField.js +1 -1
  131. package/amd/PRIVATE_ClearIcon.js +1 -1
  132. package/amd/PRIVATE_DatePickerHeader.js +1 -1
  133. package/amd/PRIVATE_DatePickerLayout.js +1 -1
  134. package/amd/PRIVATE_EmbeddedIconButton.js +1 -1
  135. package/amd/PRIVATE_FormControls.js +1 -1
  136. package/amd/PRIVATE_IconSwitchButton.js +1 -1
  137. package/amd/PRIVATE_Icons/CheckboxMixed.js +1 -1
  138. package/amd/PRIVATE_Icons/CheckboxOff.js +1 -1
  139. package/amd/PRIVATE_Icons/CheckboxOn.js +1 -1
  140. package/amd/PRIVATE_Icons/DragV.js +1 -1
  141. package/amd/PRIVATE_Icons/WarningS.js +1 -1
  142. package/amd/PRIVATE_List.js +1 -1
  143. package/amd/PRIVATE_LoadMoreCollection.js +1 -1
  144. package/amd/PRIVATE_Message.js +1 -1
  145. package/amd/PRIVATE_MessageLayer.js +1 -1
  146. package/amd/PRIVATE_MonthView.js +1 -1
  147. package/amd/PRIVATE_MonthYearGridView.js +1 -1
  148. package/amd/PRIVATE_PlotArea.js +1 -1
  149. package/amd/PRIVATE_RevealToggleIcon.js +1 -1
  150. package/amd/PRIVATE_RichSelectionCommon.js +1 -1
  151. package/amd/PRIVATE_SelectCommon.js +1 -1
  152. package/amd/PRIVATE_StyledCard.js +1 -1
  153. package/amd/PRIVATE_StyledCheckbox.js +1 -1
  154. package/amd/PRIVATE_Table.js +1 -1
  155. package/amd/PRIVATE_ThemedIcons/CalendarIcon.js +1 -1
  156. package/amd/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +1 -1
  157. package/amd/PRIVATE_ThemedIcons/ChartPanIcon.js +1 -1
  158. package/amd/PRIVATE_ThemedIcons/ChartZoomIcon.js +1 -1
  159. package/amd/PRIVATE_ThemedIcons/CheckIcon.js +1 -1
  160. package/amd/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +1 -1
  161. package/amd/PRIVATE_ThemedIcons/CheckboxOffIcon.js +1 -1
  162. package/amd/PRIVATE_ThemedIcons/CheckboxOnIcon.js +1 -1
  163. package/amd/PRIVATE_ThemedIcons/CloseIcon.js +1 -1
  164. package/amd/PRIVATE_ThemedIcons/CollapseIcon.js +1 -1
  165. package/amd/PRIVATE_ThemedIcons/CollapseUpIcon.js +1 -1
  166. package/amd/PRIVATE_ThemedIcons/DecrementIcon.js +1 -1
  167. package/amd/PRIVATE_ThemedIcons/DeleteIcon.js +1 -1
  168. package/amd/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +1 -1
  169. package/amd/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +1 -1
  170. package/amd/PRIVATE_ThemedIcons/DragHandleIcon.js +1 -1
  171. package/amd/PRIVATE_ThemedIcons/DropdownArrowIcon.js +1 -1
  172. package/amd/PRIVATE_ThemedIcons/ExpandIcon.js +1 -1
  173. package/amd/PRIVATE_ThemedIcons/HelpIcon.js +1 -1
  174. package/amd/PRIVATE_ThemedIcons/IncrementIcon.js +1 -1
  175. package/amd/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +1 -1
  176. package/amd/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +1 -1
  177. package/amd/PRIVATE_ThemedIcons/MessageErrorIcon.js +1 -1
  178. package/amd/PRIVATE_ThemedIcons/MessageInfoIcon.js +1 -1
  179. package/amd/PRIVATE_ThemedIcons/MessageWarningIcon.js +1 -1
  180. package/amd/PRIVATE_ThemedIcons/MinusIcon.js +1 -1
  181. package/amd/PRIVATE_ThemedIcons/NavDownIcon.js +1 -1
  182. package/amd/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +1 -1
  183. package/amd/PRIVATE_ThemedIcons/PlusIcon.js +1 -1
  184. package/amd/PRIVATE_ThemedIcons/RadioOffIcon.js +1 -1
  185. package/amd/PRIVATE_ThemedIcons/RadioOnIcon.js +1 -1
  186. package/amd/PRIVATE_ThemedIcons/SortAscendingIcon.js +1 -1
  187. package/amd/PRIVATE_ThemedIcons/SortDescendingIcon.js +1 -1
  188. package/amd/PRIVATE_ThemedIcons/ViewHideIcon.js +1 -1
  189. package/amd/PRIVATE_ThemedIcons/ViewIcon.js +1 -1
  190. package/amd/PRIVATE_TimeComponent.js +1 -1
  191. package/amd/PRIVATE_VirtualizedCollection.js +1 -1
  192. package/amd/PRIVATE_VisOverview.js +1 -1
  193. package/amd/PRIVATE_VisTabularDatatip.js +1 -1
  194. package/amd/PictoChart-48a25c75.js +1 -1
  195. package/amd/PieChart-2197746d.js +1 -1
  196. package/amd/{Popup-d51bf3f4.js → Popup-66e79afa.js} +2 -2
  197. package/amd/{Popup-d51bf3f4.js.map → Popup-66e79afa.js.map} +1 -1
  198. package/amd/{ProgressBar-3f4cd8d6.js → ProgressBar-e72c5a67.js} +2 -2
  199. package/amd/{ProgressBar-3f4cd8d6.js.map → ProgressBar-e72c5a67.js.map} +1 -1
  200. package/amd/ProgressButton-f1d27773.js +1 -1
  201. package/amd/ProgressButtonLabelLayout-6df4290e.js +1 -1
  202. package/amd/{ProgressCircle-74b6fc89.js → ProgressCircle-2b4ba9cd.js} +2 -2
  203. package/amd/{ProgressCircle-74b6fc89.js.map → ProgressCircle-2b4ba9cd.js.map} +1 -1
  204. package/amd/RadioItem-b17c346c.js +1 -1
  205. package/amd/RatingGauge-539ede8e.js +1 -1
  206. package/amd/ReadonlyTextFieldInput-608bddc1.js +1 -1
  207. package/amd/RemovableNavigationListItem-e01b6693.js +1 -1
  208. package/amd/RemovableTabBarItem-29b54206.js +1 -1
  209. package/amd/ReorderableTabBar-462d357c.js +1 -1
  210. package/amd/RevealToggleIcon-f975229d.js +1 -1
  211. package/amd/{ScatterChart-88304601.js → ScatterChart-7f0b817b.js} +2 -2
  212. package/amd/{ScatterChart-88304601.js.map → ScatterChart-7f0b817b.js.map} +1 -1
  213. package/amd/SectionalLegend-8f203cac.js +1 -1
  214. package/amd/SectionedContent-19bef3cc.js +2 -0
  215. package/amd/{SectionedContent-2a261004.js.map → SectionedContent-19bef3cc.js.map} +1 -1
  216. package/amd/{SelectMultiple-e3a6732b.js → SelectMultiple-7e9bd455.js} +2 -2
  217. package/amd/{SelectMultiple-e3a6732b.js.map → SelectMultiple-7e9bd455.js.map} +1 -1
  218. package/amd/{SelectSingle-9d0dca8f.js → SelectSingle-466bcd67.js} +2 -2
  219. package/amd/{SelectSingle-9d0dca8f.js.map → SelectSingle-466bcd67.js.map} +1 -1
  220. package/amd/SelectionCard-13aac54a.js +2 -0
  221. package/amd/{SelectionCard-895b014d.js.map → SelectionCard-13aac54a.js.map} +1 -1
  222. package/amd/Selector-2b0c34a7.js +1 -1
  223. package/amd/{SelectorAll-e884a225.js → SelectorAll-1c889a9c.js} +2 -2
  224. package/amd/{SelectorAll-e884a225.js.map → SelectorAll-1c889a9c.js.map} +1 -1
  225. package/amd/{Sheet-46782f99.js → Sheet-0b58b0a5.js} +2 -2
  226. package/amd/{Sheet-46782f99.js.map → Sheet-0b58b0a5.js.map} +1 -1
  227. package/amd/SplitMenuButton-031ae5e3.js +1 -1
  228. package/amd/{StyledCard-c4d0324d.js → StyledCard-0da6f6b5.js} +2 -2
  229. package/amd/{StyledCard-c4d0324d.js.map → StyledCard-0da6f6b5.js.map} +1 -1
  230. package/amd/StyledTextField-b4278437.js +1 -1
  231. package/amd/TabBar-d8890a47.js +1 -1
  232. package/amd/TabBarItem-547825e2.js +1 -1
  233. package/amd/TabBarLayout-685ac295.js +1 -1
  234. package/amd/TabBarMixed-a75796a6.js +1 -1
  235. package/amd/TabBarMixedSeparator-ed764207.js +2 -0
  236. package/amd/{TabBarMixedSeparator-8c278254.js.map → TabBarMixedSeparator-ed764207.js.map} +1 -1
  237. package/amd/{Table-31cc83c6.js → Table-87f7e3c4.js} +2 -2
  238. package/amd/{Table-31cc83c6.js.map → Table-87f7e3c4.js.map} +1 -1
  239. package/amd/{TableView-ab5d0c12.js → TableView-2b884e2c.js} +2 -2
  240. package/amd/{TableView-ab5d0c12.js.map → TableView-2b884e2c.js.map} +1 -1
  241. package/amd/TagCloud-5dc4b5ff.js +1 -1
  242. package/amd/TextArea-a7a3d82f.js +2 -0
  243. package/amd/TextArea-a7a3d82f.js.map +1 -0
  244. package/amd/TextAreaAutosize-9cd2c1e8.js +2 -0
  245. package/amd/{TextAreaAutosize-81449e46.js.map → TextAreaAutosize-9cd2c1e8.js.map} +1 -1
  246. package/amd/TextField-1021f00b.js +1 -1
  247. package/amd/TextFieldInput-ba4e508c.js +1 -1
  248. package/amd/Theme-redwood/theme.css +230 -230
  249. package/amd/Theme-stable/theme.css +342 -342
  250. package/amd/TimeComponentCanvas2D-6b4e6ead.js +1 -1
  251. package/amd/Toolbar-05d42276.js +1 -1
  252. package/amd/TruncatingBadge-7f66faaf.js +2 -0
  253. package/amd/{TruncatingBadge-04f9ef4c.js.map → TruncatingBadge-7f66faaf.js.map} +1 -1
  254. package/amd/{TruncatingText-d18d41c5.js → TruncatingText-69770aa9.js} +2 -2
  255. package/amd/{TruncatingText-d18d41c5.js.map → TruncatingText-69770aa9.js.map} +1 -1
  256. package/amd/UNSAFE_ActionCard.js +1 -1
  257. package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
  258. package/amd/UNSAFE_BarChart.js +1 -1
  259. package/amd/UNSAFE_BaseButton.js +1 -1
  260. package/amd/UNSAFE_Button.js +1 -1
  261. package/amd/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
  262. package/amd/UNSAFE_ButtonSet.js +1 -1
  263. package/amd/UNSAFE_ButtonSetButton.js +1 -1
  264. package/amd/UNSAFE_ButtonSetIconButton.js +1 -1
  265. package/amd/UNSAFE_ButtonSetItem.js +1 -1
  266. package/amd/UNSAFE_ButtonSetMultiple.js +1 -1
  267. package/amd/UNSAFE_ButtonSetSingle.js +1 -1
  268. package/amd/UNSAFE_Card.js +1 -1
  269. package/amd/UNSAFE_CardFlexView.js +1 -1
  270. package/amd/UNSAFE_CardGridView.js +1 -1
  271. package/amd/UNSAFE_Center.js +1 -1
  272. package/amd/UNSAFE_ChartWithLegend.js +1 -1
  273. package/amd/UNSAFE_Checkbox.js +1 -1
  274. package/amd/UNSAFE_CheckboxItem.js +1 -1
  275. package/amd/UNSAFE_CheckboxSet.js +1 -1
  276. package/amd/UNSAFE_Chip.js +1 -1
  277. package/amd/UNSAFE_Collapsible.js +1 -1
  278. package/amd/UNSAFE_ComboChart.js +1 -1
  279. package/amd/UNSAFE_ComponentMessage.js +1 -1
  280. package/amd/UNSAFE_ConveyorBelt.js +1 -1
  281. package/amd/UNSAFE_DatePicker.js +1 -1
  282. package/amd/UNSAFE_Diagram.js +1 -1
  283. package/amd/UNSAFE_Dialog.js +1 -1
  284. package/amd/UNSAFE_DragHandle.js +1 -1
  285. package/amd/UNSAFE_DrawerLayout.js +1 -1
  286. package/amd/UNSAFE_DrawerPopup.js +1 -1
  287. package/amd/UNSAFE_Dropdown.js +1 -1
  288. package/amd/UNSAFE_Environment.js +1 -1
  289. package/amd/UNSAFE_ExpandableList.js +1 -1
  290. package/amd/UNSAFE_FilePicker.js +1 -1
  291. package/amd/UNSAFE_Flex.js +1 -1
  292. package/amd/UNSAFE_Floating.js +1 -1
  293. package/amd/UNSAFE_FormLayout.js +1 -1
  294. package/amd/UNSAFE_Gantt.js +1 -1
  295. package/amd/UNSAFE_Grid.js +1 -1
  296. package/amd/UNSAFE_HighlightText.js +1 -1
  297. package/amd/UNSAFE_Icon.js +1 -1
  298. package/amd/UNSAFE_IconButton.js +1 -1
  299. package/amd/UNSAFE_IconMenuButton.js +1 -1
  300. package/amd/UNSAFE_IconProgressButton.js +1 -1
  301. package/amd/UNSAFE_IconToggleButton.js +1 -1
  302. package/amd/UNSAFE_Indexer.js +1 -1
  303. package/amd/UNSAFE_InputDateMask.js +1 -1
  304. package/amd/UNSAFE_InputDatePicker.js +1 -1
  305. package/amd/UNSAFE_InputPassword.js +1 -1
  306. package/amd/UNSAFE_InputSensitiveText.js +1 -1
  307. package/amd/UNSAFE_InputText.js +1 -1
  308. package/amd/UNSAFE_InputTimeMask.js +1 -1
  309. package/amd/UNSAFE_Label.js +1 -1
  310. package/amd/UNSAFE_LabelValueLayout.js +1 -1
  311. package/amd/UNSAFE_LabelledLink.js +1 -1
  312. package/amd/UNSAFE_Layer.js +1 -1
  313. package/amd/UNSAFE_Legend.js +1 -1
  314. package/amd/UNSAFE_LineAreaChart.js +1 -1
  315. package/amd/UNSAFE_Link.js +1 -1
  316. package/amd/UNSAFE_ListItemLayout.js +1 -1
  317. package/amd/UNSAFE_ListView.js +1 -1
  318. package/amd/UNSAFE_LiveRegion.js +1 -1
  319. package/amd/UNSAFE_Menu.js +1 -1
  320. package/amd/UNSAFE_MenuButton.js +1 -1
  321. package/amd/UNSAFE_MessageBanner.js +1 -1
  322. package/amd/UNSAFE_MessageToast.js +1 -1
  323. package/amd/UNSAFE_MeterBar.js +1 -1
  324. package/amd/UNSAFE_MeterCircle.js +1 -1
  325. package/amd/UNSAFE_Modal.js +1 -1
  326. package/amd/UNSAFE_NavigationList.js +1 -1
  327. package/amd/UNSAFE_NavigationListCommon.js +1 -1
  328. package/amd/UNSAFE_NumberInputText.js +1 -1
  329. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  330. package/amd/UNSAFE_PictoChart.js +1 -1
  331. package/amd/UNSAFE_PieChart/__test__/PieChart.spec.js +1 -1
  332. package/amd/UNSAFE_PieChart.js +1 -1
  333. package/amd/UNSAFE_Popup.js +1 -1
  334. package/amd/UNSAFE_ProgressBar.js +1 -1
  335. package/amd/UNSAFE_ProgressButton.js +1 -1
  336. package/amd/UNSAFE_ProgressButtonLabelLayout.js +1 -1
  337. package/amd/UNSAFE_ProgressCircle.js +1 -1
  338. package/amd/UNSAFE_RadioItem.js +1 -1
  339. package/amd/UNSAFE_RadioSet.js +1 -1
  340. package/amd/UNSAFE_RatingGauge.js +1 -1
  341. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  342. package/amd/UNSAFE_RichCheckboxSet.js +1 -1
  343. package/amd/UNSAFE_RichRadioSet.js +1 -1
  344. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  345. package/amd/UNSAFE_ScatterChart.js +1 -1
  346. package/amd/UNSAFE_SectionalLegend.js +1 -1
  347. package/amd/UNSAFE_SelectMultiple.js +1 -1
  348. package/amd/UNSAFE_SelectSingle.js +1 -1
  349. package/amd/UNSAFE_SelectionCard.js +1 -1
  350. package/amd/UNSAFE_Selector.js +1 -1
  351. package/amd/UNSAFE_SelectorAll.js +1 -1
  352. package/amd/UNSAFE_Sheet/__test__/Sheet.spec.js +1 -1
  353. package/amd/UNSAFE_Sheet.js +1 -1
  354. package/amd/UNSAFE_SplitMenuButton.js +1 -1
  355. package/amd/UNSAFE_TabBar.js +1 -1
  356. package/amd/UNSAFE_TabBarCommon.js +1 -1
  357. package/amd/UNSAFE_TabBarMixed.js +1 -1
  358. package/amd/UNSAFE_TableView.js +1 -1
  359. package/amd/UNSAFE_TagCloud.js +1 -1
  360. package/amd/UNSAFE_TextArea.js +1 -1
  361. package/amd/UNSAFE_TextAreaAutosize.js +1 -1
  362. package/amd/UNSAFE_TextField.js +1 -1
  363. package/amd/UNSAFE_ToggleButton.js +1 -1
  364. package/amd/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
  365. package/amd/UNSAFE_Toolbar.js +1 -1
  366. package/amd/UNSAFE_Train.js +1 -1
  367. package/amd/UNSAFE_TruncatingBadge.js +1 -1
  368. package/amd/UNSAFE_TruncatingText.js +1 -1
  369. package/amd/UNSAFE_UserAssistance.js +1 -1
  370. package/amd/UNSAFE_View.js +1 -1
  371. package/amd/UNSAFE_VirtualizedListView.js +1 -1
  372. package/amd/UNSAFE_VisProgressiveLoader/__test__/VisProgressiveLoader.spec.js +1 -1
  373. package/amd/UNSAFE_VisProgressiveLoader.js +1 -1
  374. package/amd/UNSAFE_VisStatusMessage.js +1 -1
  375. package/amd/UNSAFE_WindowOverlay.js +1 -1
  376. package/amd/{View-ce970ed7.js → View-bd5c7fa7.js} +2 -2
  377. package/amd/{View-ce970ed7.js.map → View-bd5c7fa7.js.map} +1 -1
  378. package/amd/{VirtualizedCollection-63223f5e.js → VirtualizedCollection-897516a5.js} +2 -2
  379. package/amd/{VirtualizedCollection-63223f5e.js.map → VirtualizedCollection-897516a5.js.map} +1 -1
  380. package/amd/{VirtualizedListView-554eaee6.js → VirtualizedListView-cbe87ec2.js} +2 -2
  381. package/amd/{VirtualizedListView-554eaee6.js.map → VirtualizedListView-cbe87ec2.js.map} +1 -1
  382. package/amd/VisNoData-10983ace.js +2 -0
  383. package/amd/{VisNoData-6fa39277.js.map → VisNoData-10983ace.js.map} +1 -1
  384. package/amd/{VisProgressiveLoader-68d8d8b3.js → VisProgressiveLoader-06a60c8f.js} +2 -2
  385. package/amd/{VisProgressiveLoader-68d8d8b3.js.map → VisProgressiveLoader-06a60c8f.js.map} +1 -1
  386. package/amd/{VisTabularDatatip-1051eaca.js → VisTabularDatatip-55bbd19f.js} +2 -2
  387. package/amd/{VisTabularDatatip-1051eaca.js.map → VisTabularDatatip-55bbd19f.js.map} +1 -1
  388. package/amd/{WindowOverlay-a2d80d55.js → WindowOverlay-43c10424.js} +2 -2
  389. package/amd/{WindowOverlay-a2d80d55.js.map → WindowOverlay-43c10424.js.map} +1 -1
  390. package/amd/{YearsGridView-d799dc5c.js → YearsGridView-d7b2184e.js} +2 -2
  391. package/amd/{YearsGridView-d799dc5c.js.map → YearsGridView-d7b2184e.js.map} +1 -1
  392. package/amd/hoc/PRIVATE_withDirectionIcon.js +1 -1
  393. package/amd/hoc/PRIVATE_withThemeIcon.js +1 -1
  394. package/amd/hoc/UNSAFE_withThemeProps.js +1 -1
  395. package/amd/hooks/PRIVATE_useChartContextMenu.js +1 -1
  396. package/amd/hooks/PRIVATE_useChartDatatip.js +1 -1
  397. package/amd/hooks/PRIVATE_useChartEvents.js +1 -1
  398. package/amd/hooks/PRIVATE_useChartMarquee.js +1 -1
  399. package/amd/hooks/PRIVATE_useCssVars.js +1 -1
  400. package/amd/hooks/PRIVATE_useCurrentKey.js +1 -1
  401. package/amd/hooks/PRIVATE_useDatatip.js +1 -1
  402. package/amd/hooks/PRIVATE_useFloating.js +1 -1
  403. package/amd/hooks/PRIVATE_useReorderable.js +1 -1
  404. package/amd/hooks/PRIVATE_useRovingTabIndexContainer.js +1 -1
  405. package/amd/hooks/PRIVATE_useSelection.js +1 -1
  406. package/amd/hooks/PRIVATE_useTabBar.js +1 -1
  407. package/amd/hooks/PRIVATE_useVisContextMenu.js +1 -1
  408. package/amd/hooks/PRIVATE_useVisDragModeControls.js +1 -1
  409. package/amd/hooks/PRIVATE_useVisEvents.js +1 -1
  410. package/amd/hooks/PRIVATE_useVisMeterEvents.js +1 -1
  411. package/amd/hooks/PRIVATE_useVisSelection.js +1 -1
  412. package/amd/hooks/UNSAFE_useColorScheme.js +1 -1
  413. package/amd/hooks/UNSAFE_useCurrentBgColor.js +1 -1
  414. package/amd/hooks/UNSAFE_useDensity.js +1 -1
  415. package/amd/hooks/UNSAFE_useOutsideClick.js +1 -1
  416. package/amd/hooks/UNSAFE_usePrefixSuffix.js +1 -1
  417. package/amd/hooks/UNSAFE_useScale.js +1 -1
  418. package/amd/hooks/UNSAFE_useTestId.js +1 -1
  419. package/amd/hooks/UNSAFE_useTheme.js +1 -1
  420. package/amd/hooks/UNSAFE_useThemeInterpolations.js +1 -1
  421. package/amd/hooks/UNSAFE_useTooltip.js +1 -1
  422. package/amd/hooks/UNSAFE_useTranslationBundle.js +1 -1
  423. package/amd/hooks/UNSAFE_useUser.js +1 -1
  424. package/amd/{index-b7b9300d.js → index-95227deb.js} +2 -2
  425. package/amd/index-95227deb.js.map +1 -0
  426. package/amd/listViewSelectionTests-c9777ea8.js +1 -1
  427. package/amd/render-85c034d7.js +2 -0
  428. package/amd/{render-366c27ff.js.map → render-85c034d7.js.map} +1 -1
  429. package/amd/{tabbableUtils-88d4fa35.js → tabbableUtils-591fdc8d.js} +2 -2
  430. package/amd/{tabbableUtils-88d4fa35.js.map → tabbableUtils-591fdc8d.js.map} +1 -1
  431. package/amd/{testData-783b8823.js → testData-02652eda.js} +2 -2
  432. package/amd/{testData-783b8823.js.map → testData-02652eda.js.map} +1 -1
  433. package/amd/{tooltipUtils-69ce0a2d.js → tooltipUtils-e5bdb734.js} +2 -2
  434. package/amd/{tooltipUtils-69ce0a2d.js.map → tooltipUtils-e5bdb734.js.map} +1 -1
  435. package/amd/useCellNavigation-1feec094.js +1 -1
  436. package/amd/useChartContextMenu-8606bfa2.js +1 -1
  437. package/amd/useChartDatatip-947eeffe.js +2 -0
  438. package/amd/{useChartDatatip-ee3783af.js.map → useChartDatatip-947eeffe.js.map} +1 -1
  439. package/amd/{useColorScheme-10dc88de.js → useColorScheme-443e7cc7.js} +2 -2
  440. package/amd/{useColorScheme-10dc88de.js.map → useColorScheme-443e7cc7.js.map} +1 -1
  441. package/amd/useContextMenu-e08aad46.js +1 -1
  442. package/amd/{useCssVars-c043f8da.js → useCssVars-dc52806c.js} +2 -2
  443. package/amd/{useCssVars-c043f8da.js.map → useCssVars-dc52806c.js.map} +1 -1
  444. package/amd/{useCurrentBgColor-2426ee24.js → useCurrentBgColor-50142bd8.js} +2 -2
  445. package/amd/{useCurrentBgColor-2426ee24.js.map → useCurrentBgColor-50142bd8.js.map} +1 -1
  446. package/amd/useCurrentKey-a993db56.js +2 -0
  447. package/amd/{useCurrentKey-31c18053.js.map → useCurrentKey-a993db56.js.map} +1 -1
  448. package/amd/{useDatatip-ac26447a.js → useDatatip-9942601b.js} +2 -2
  449. package/amd/{useDatatip-ac26447a.js.map → useDatatip-9942601b.js.map} +1 -1
  450. package/amd/{useDensity-c83df7b4.js → useDensity-f0f7ae9a.js} +2 -2
  451. package/amd/{useDensity-c83df7b4.js.map → useDensity-f0f7ae9a.js.map} +1 -1
  452. package/amd/{useFloating-acd30a55.js → useFloating-bf8ed6cb.js} +2 -2
  453. package/amd/{useFloating-acd30a55.js.map → useFloating-bf8ed6cb.js.map} +1 -1
  454. package/amd/useKeyboardEvents-8ada7a1f.js +2 -0
  455. package/amd/{useKeyboardEvents-d87e3587.js.map → useKeyboardEvents-8ada7a1f.js.map} +1 -1
  456. package/amd/useLegendContextMenu-e629139a.js +1 -1
  457. package/amd/useMeterDatatip-173593b4.js +2 -0
  458. package/amd/{useMeterDatatip-fff3c329.js.map → useMeterDatatip-173593b4.js.map} +1 -1
  459. package/amd/{useOutsideClick-f99b7a84.js → useOutsideClick-76c1ff6e.js} +2 -2
  460. package/amd/{useOutsideClick-f99b7a84.js.map → useOutsideClick-76c1ff6e.js.map} +1 -1
  461. package/amd/{usePopupAnimation-f679a4b0.js → usePopupAnimation-6e53a0fe.js} +2 -2
  462. package/amd/{usePopupAnimation-f679a4b0.js.map → usePopupAnimation-6e53a0fe.js.map} +1 -1
  463. package/amd/usePrefixSuffix-f7544e05.js +2 -0
  464. package/amd/{usePrefixSuffix-09bd5925.js.map → usePrefixSuffix-f7544e05.js.map} +1 -1
  465. package/amd/{useReorderableItem-4c4779f7.js → useReorderableItem-726c3c03.js} +2 -2
  466. package/amd/{useReorderableItem-4c4779f7.js.map → useReorderableItem-726c3c03.js.map} +1 -1
  467. package/amd/{useRovingTabIndexContainer-955e23a8.js → useRovingTabIndexContainer-473f7e43.js} +2 -2
  468. package/amd/{useRovingTabIndexContainer-955e23a8.js.map → useRovingTabIndexContainer-473f7e43.js.map} +1 -1
  469. package/amd/useScale-e311d35f.js +2 -0
  470. package/amd/{useScale-37d42c9d.js.map → useScale-e311d35f.js.map} +1 -1
  471. package/amd/{useSelectCommon-e7f123ce.js → useSelectCommon-d9c4a7bd.js} +2 -2
  472. package/amd/{useSelectCommon-e7f123ce.js.map → useSelectCommon-d9c4a7bd.js.map} +1 -1
  473. package/amd/{useSelectDrill-6361116b.js → useSelectDrill-216c007c.js} +2 -2
  474. package/amd/{useSelectDrill-6361116b.js.map → useSelectDrill-216c007c.js.map} +1 -1
  475. package/amd/useSelection-01203394.js +2 -0
  476. package/amd/{useSelection-af7b4b52.js.map → useSelection-01203394.js.map} +1 -1
  477. package/amd/{useSelection-f0c7d74d.js → useSelection-4249360e.js} +2 -2
  478. package/amd/{useSelection-f0c7d74d.js.map → useSelection-4249360e.js.map} +1 -1
  479. package/amd/useTabBar-2c4573fe.js +1 -1
  480. package/amd/{useTestId-3a316499.js → useTestId-b5cd4766.js} +2 -2
  481. package/amd/{useTestId-3a316499.js.map → useTestId-b5cd4766.js.map} +1 -1
  482. package/amd/{useTheme-ac980f9a.js → useTheme-a8334e06.js} +2 -2
  483. package/amd/{useTheme-ac980f9a.js.map → useTheme-a8334e06.js.map} +1 -1
  484. package/amd/useThemeInterpolations-ab618dee.js +2 -0
  485. package/amd/{useThemeInterpolations-6b2de213.js.map → useThemeInterpolations-ab618dee.js.map} +1 -1
  486. package/amd/useTooltip-b43ad881.js +2 -0
  487. package/amd/{useTooltip-7b11fd35.js.map → useTooltip-b43ad881.js.map} +1 -1
  488. package/amd/{useTooltipControlled-52183a08.js → useTooltipControlled-ee3276de.js} +2 -2
  489. package/amd/{useTooltipControlled-52183a08.js.map → useTooltipControlled-ee3276de.js.map} +1 -1
  490. package/amd/{useTranslationBundle-516b1b83.js → useTranslationBundle-d07d4b20.js} +2 -2
  491. package/amd/{useTranslationBundle-516b1b83.js.map → useTranslationBundle-d07d4b20.js.map} +1 -1
  492. package/amd/{useUser-85c781ea.js → useUser-3ef25571.js} +2 -2
  493. package/amd/{useUser-85c781ea.js.map → useUser-3ef25571.js.map} +1 -1
  494. package/amd/useVisDragModeControls-a5685835.js +1 -1
  495. package/amd/{useVisEvents-0166e4cc.js → useVisEvents-dc86164f.js} +2 -2
  496. package/amd/{useVisEvents-0166e4cc.js.map → useVisEvents-dc86164f.js.map} +1 -1
  497. package/amd/utils/PRIVATE_tooltipUtils.js +1 -1
  498. package/amd/utils/PRIVATE_visTestUtils.js +1 -1
  499. package/amd/{withDirectionIcon-ce0c7432.js → withDirectionIcon-74c39ee3.js} +2 -2
  500. package/amd/{withDirectionIcon-ce0c7432.js.map → withDirectionIcon-74c39ee3.js.map} +1 -1
  501. package/amd/withThemeProps-4c23997e.js +1 -1
  502. package/cjs/{BarChart-ca7f8ed5.js → BarChart-93a3813c.js} +2 -2
  503. package/cjs/{BarChart-ca7f8ed5.js.map → BarChart-93a3813c.js.map} +1 -1
  504. package/cjs/{Chart-fbbd3329.js → Chart-40d95d14.js} +2 -2
  505. package/cjs/{Chart-fbbd3329.js.map → Chart-40d95d14.js.map} +1 -1
  506. package/cjs/{ComboChart-95863e7a.js → ComboChart-cffd0759.js} +2 -2
  507. package/cjs/{ComboChart-95863e7a.js.map → ComboChart-cffd0759.js.map} +1 -1
  508. package/cjs/{InputDatePicker-4d36637f.js → InputDatePicker-bc2c534a.js} +2 -2
  509. package/cjs/{InputDatePicker-4d36637f.js.map → InputDatePicker-bc2c534a.js.map} +1 -1
  510. package/cjs/{LineAreaChart-46dde5d3.js → LineAreaChart-bb1350fa.js} +2 -2
  511. package/cjs/{LineAreaChart-46dde5d3.js.map → LineAreaChart-bb1350fa.js.map} +1 -1
  512. package/cjs/PRIVATE_Chart.js +4 -4
  513. package/cjs/{ScatterChart-0497f41a.js → ScatterChart-763e1f3e.js} +2 -2
  514. package/cjs/{ScatterChart-0497f41a.js.map → ScatterChart-763e1f3e.js.map} +1 -1
  515. package/cjs/Theme-redwood/theme.css +305 -305
  516. package/cjs/Theme-stable/theme.css +401 -401
  517. package/cjs/UNSAFE_BarChart/__test__/BarChart.spec.js +5 -5
  518. package/cjs/UNSAFE_BarChart.js +5 -5
  519. package/cjs/UNSAFE_ComboChart.js +5 -5
  520. package/cjs/UNSAFE_InputDatePicker.js +90 -90
  521. package/cjs/UNSAFE_LineAreaChart.js +5 -5
  522. package/cjs/UNSAFE_ScatterChart.js +5 -5
  523. package/es/{BaseCardView-c5a8ee6a.js → BaseCardView-229fa119.js} +2 -2
  524. package/es/{BaseCardView-c5a8ee6a.js.map → BaseCardView-229fa119.js.map} +1 -1
  525. package/es/{CardFlexView-529906e0.js → CardFlexView-3ef6bf4d.js} +2 -2
  526. package/es/{CardFlexView-529906e0.js.map → CardFlexView-3ef6bf4d.js.map} +1 -1
  527. package/es/{CardGridView-ec18c929.js → CardGridView-e15226c9.js} +2 -2
  528. package/es/{CardGridView-ec18c929.js.map → CardGridView-e15226c9.js.map} +1 -1
  529. package/es/ExpandableList-478db30a.js +1 -1
  530. package/es/GroupLoadingIndicator-63035d08.js +1 -1
  531. package/es/{Indexer-ba2c7593.js → Indexer-eb00ba0b.js} +2 -2
  532. package/es/{Indexer-ba2c7593.js.map → Indexer-eb00ba0b.js.map} +1 -1
  533. package/es/{List-97b7be70.js → List-e6886091.js} +3 -4
  534. package/es/{List-97b7be70.js.map → List-e6886091.js.map} +1 -1
  535. package/es/{ListView-936d8a4f.js → ListView-137e31fd.js} +2 -2
  536. package/es/{ListView-936d8a4f.js.map → ListView-137e31fd.js.map} +1 -1
  537. package/es/{LoadMoreCollection-95a49d2a.js → LoadMoreCollection-7df1be36.js} +2 -2
  538. package/es/{LoadMoreCollection-95a49d2a.js.map → LoadMoreCollection-7df1be36.js.map} +1 -1
  539. package/es/PRIVATE_BaseCardView.js +3 -3
  540. package/es/PRIVATE_List.js +4 -4
  541. package/es/PRIVATE_LoadMoreCollection.js +2 -2
  542. package/es/PRIVATE_SelectCommon.js +5 -5
  543. package/es/PRIVATE_Table.js +3 -3
  544. package/es/PRIVATE_VirtualizedCollection.js +2 -2
  545. package/es/SegmentStyles.styles.css +8 -8
  546. package/es/SegmentStyles.styles2.css +8 -8
  547. package/es/{SelectMultiple-ad8fc99a.js → SelectMultiple-488a49d1.js} +2 -2
  548. package/es/{SelectMultiple-ad8fc99a.js.map → SelectMultiple-488a49d1.js.map} +1 -1
  549. package/es/{SelectSingle-abaf271c.js → SelectSingle-e8b9a33a.js} +2 -2
  550. package/es/{SelectSingle-abaf271c.js.map → SelectSingle-e8b9a33a.js.map} +1 -1
  551. package/es/SplitMenuButtonTheme.styles.css +4 -4
  552. package/es/SplitMenuButtonTheme.styles2.css +4 -4
  553. package/es/{Table-1ba124ec.js → Table-3cfb9443.js} +2 -2
  554. package/es/{Table-1ba124ec.js.map → Table-3cfb9443.js.map} +1 -1
  555. package/es/{TableView-20223ba6.js → TableView-fd5104cd.js} +2 -2
  556. package/es/{TableView-20223ba6.js.map → TableView-fd5104cd.js.map} +1 -1
  557. package/es/Theme-redwood/theme.css +326 -326
  558. package/es/Theme-stable/theme.css +540 -540
  559. package/es/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
  560. package/es/UNSAFE_CardFlexView.js +4 -4
  561. package/es/UNSAFE_CardGridView.js +4 -4
  562. package/es/UNSAFE_ExpandableList.js +3 -3
  563. package/es/UNSAFE_Indexer.js +2 -2
  564. package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
  565. package/es/UNSAFE_InputDateMask.js +1 -1
  566. package/es/UNSAFE_InputDatePicker.js +1 -1
  567. package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
  568. package/es/UNSAFE_InputTimeMask.js +1 -1
  569. package/es/UNSAFE_ListView.js +5 -5
  570. package/es/UNSAFE_SelectMultiple.js +6 -6
  571. package/es/UNSAFE_SelectSingle.js +6 -6
  572. package/es/UNSAFE_SplitMenuButton/themes/redwood/SplitMenuButtonTheme.css.js +1 -1
  573. package/es/UNSAFE_SplitMenuButton/themes/stable/SplitMenuButtonTheme.css.js +1 -1
  574. package/es/UNSAFE_SplitMenuButton.js +1 -1
  575. package/es/UNSAFE_TableView.js +4 -4
  576. package/es/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
  577. package/es/UNSAFE_VirtualizedListView.js +5 -5
  578. package/es/{VirtualizedCollection-e73890a1.js → VirtualizedCollection-f048fbb8.js} +2 -2
  579. package/es/{VirtualizedCollection-e73890a1.js.map → VirtualizedCollection-f048fbb8.js.map} +1 -1
  580. package/es/{VirtualizedListView-3ef40bde.js → VirtualizedListView-0532e46c.js} +2 -2
  581. package/es/{VirtualizedListView-3ef40bde.js.map → VirtualizedListView-0532e46c.js.map} +1 -1
  582. package/es/{useSelectCommon-1dafa6f9.js → useSelectCommon-af8e715e.js} +2 -2
  583. package/es/{useSelectCommon-1dafa6f9.js.map → useSelectCommon-af8e715e.js.map} +1 -1
  584. package/package.json +2 -2
  585. package/amd/CardFlexView-bb5c4369.js +0 -2
  586. package/amd/CompactLabelAssistance-44ba87b0.js +0 -2
  587. package/amd/Flex-56ecdf4c.js +0 -2
  588. package/amd/HighlightText-bd4c0101.js +0 -2
  589. package/amd/List-04c4fed0.js +0 -2
  590. package/amd/LiveRegion-8142ed0d.js +0 -2
  591. package/amd/LoadMoreCollection-a6adbc3f.js +0 -2
  592. package/amd/MaxLengthCounter-9a95922c.js +0 -2
  593. package/amd/MaxLengthCounter-9a95922c.js.map +0 -1
  594. package/amd/MaxLengthLiveRegion-8954fc30.js +0 -2
  595. package/amd/SectionedContent-2a261004.js +0 -2
  596. package/amd/SelectionCard-895b014d.js +0 -2
  597. package/amd/TabBarMixedSeparator-8c278254.js +0 -2
  598. package/amd/TextArea-89b9ed65.js +0 -2
  599. package/amd/TextArea-89b9ed65.js.map +0 -1
  600. package/amd/TextAreaAutosize-81449e46.js +0 -2
  601. package/amd/TruncatingBadge-04f9ef4c.js +0 -2
  602. package/amd/VisNoData-6fa39277.js +0 -2
  603. package/amd/index-b7b9300d.js.map +0 -1
  604. package/amd/render-366c27ff.js +0 -2
  605. package/amd/useChartDatatip-ee3783af.js +0 -2
  606. package/amd/useCurrentKey-31c18053.js +0 -2
  607. package/amd/useKeyboardEvents-d87e3587.js +0 -2
  608. package/amd/useMeterDatatip-fff3c329.js +0 -2
  609. package/amd/usePrefixSuffix-09bd5925.js +0 -2
  610. package/amd/useScale-37d42c9d.js +0 -2
  611. package/amd/useSelection-af7b4b52.js +0 -2
  612. package/amd/useThemeInterpolations-6b2de213.js +0 -2
  613. package/amd/useTooltip-7b11fd35.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemLayout-4208363c.js","sources":["../../src/UNSAFE_ListItemLayout/ListItemLayout.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentChildren, JSX } from 'preact';\nimport { Grid } from '../UNSAFE_Grid';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { styles } from './themes/ListItemLayoutStyles.css';\n\ntype IntrinsicProps = Pick<JSX.HTMLAttributes<HTMLDivElement>, 'children'>;\ntype Props = {\n children?: ComponentChildren;\n /**\n * The centermost element that should display more important data.\n */\n primary?: ComponentChildren;\n /**\n * Render Selector component in the leftmost column of the grid.\n */\n selector?: ComponentChildren;\n /**\n * Visual element to the left of the primary section.\n * Supports image, avatar, badge, initials, or icon.\n */\n leading?: ComponentChildren;\n /**\n * A section that is rendered above the primary line.\n */\n overline?: ComponentChildren;\n /**\n * A section below the primary line.\n */\n secondary?: ComponentChildren;\n /**\n * Another section below secondary.\n */\n tertiary?: ComponentChildren;\n /**\n * Provides information about other data.\n * Some examples of basic metadata are author, date created, date modified, file size, abbreviations, etc.\n */\n metadata?: ComponentChildren;\n /**\n * Visual element to the right of the primary section and metadata.\n * Example components are image, avatar, badge, initials, or icon.\n */\n trailing?: ComponentChildren;\n /**\n * The action prop displays either one primary action or one or more secondary actions.\n * A common example is using Toolbar.\n */\n action?: ComponentChildren;\n /**\n * Additional section separated with a space between itself and tertiary.\n */\n quaternary?: ComponentChildren;\n /**\n * Navigation should normally be used for linking away from the layout.\n */\n navigation?: ComponentChildren;\n /**\n * Aligns content to top of cell and moves overline to a row above primary.\n */\n verticalAlignment?: 'middle' | 'top';\n} & IntrinsicProps;\n\n// TODO: revisit idea of negative margin when selector has a proper API for handling spacing\n// Jira: JET-54543\n/**\n * A ListItemLayout component represents a layout used for list view item elements.\n */\nexport function ListItemLayout({\n children,\n selector,\n leading,\n primary,\n secondary,\n tertiary,\n overline,\n metadata,\n trailing,\n action,\n quaternary,\n navigation,\n verticalAlignment = 'middle'\n}: Props) {\n // generate grid skeleton, adding cells based on which props are defined\n const { columnsTemplate, firstCell, secondCell, lastCell, hasSecondRow } =\n verticalAlignment === 'top'\n ? getOptInColumnsTemplate(\n selector,\n leading,\n metadata,\n trailing,\n action,\n quaternary,\n navigation\n )\n : getColumnsTemplate(selector, leading, metadata, trailing, action, quaternary, navigation);\n\n // extra row placed before the other rows, only used with top alignment\n const topRow =\n overline && verticalAlignment === 'top'\n ? [\n firstCell && <span> </span>,\n secondCell && <span> </span>,\n <div className={styles.topRowStyles}>{overline}</div>,\n lastCell && <span> </span>\n ]\n : null;\n\n // if ListItemLayout component has a child (ListItemTextLayout) then render that instead of individual props\n const textArea = children ? (\n <div className={styles.childrenStyles}>{children}</div>\n ) : (\n <div className={styles.flexColumnStyles}>\n {verticalAlignment === 'top' ? null : <div>{overline}</div>}\n <div>{primary}</div>\n <div>{secondary}</div>\n <div>{tertiary}</div>\n </div>\n );\n\n // a second row is needed when quaternary or navigation are defined\n const secondRow = hasSecondRow\n ? [\n firstCell && <span> </span>,\n secondCell && <span> </span>,\n <div\n className={classNames([\n verticalAlignment === 'top' ? styles.optInTopPaddingStyles : '',\n styles.rowAlignStyles\n ])}>\n {quaternary}\n </div>,\n lastCell && (\n <div\n className={classNames([\n verticalAlignment === 'top' ? styles.optInTopPaddingStyles : '',\n styles.endJustifyStyles\n ])}>\n {navigation}\n </div>\n )\n ]\n : null;\n\n return (\n <Grid gap={verticalAlignment === 'top' ? '0x' : '4x'} gridTemplateColumns={columnsTemplate}>\n {topRow}\n {firstCell}\n {secondCell}\n <div className={styles.centerVerticalStyles}>{textArea}</div>\n {lastCell}\n {secondRow}\n </Grid>\n );\n}\n\nfunction getColumnsTemplate(\n selector: ComponentChildren,\n leading: ComponentChildren,\n metadata: ComponentChildren,\n trailing: ComponentChildren,\n action: ComponentChildren,\n quaternary: ComponentChildren,\n navigation: ComponentChildren\n) {\n const columnsTemplateBuilder = [];\n\n let firstCell = null;\n if (selector) {\n columnsTemplateBuilder.push('auto');\n firstCell = <div className={styles.selectorStyles}>{selector}</div>;\n }\n\n let secondCell = null;\n if (leading) {\n columnsTemplateBuilder.push('auto');\n secondCell = (\n <div className={classNames([styles.centerVerticalStyles, styles.displayFlexStyle])}>\n {leading}\n </div>\n );\n }\n\n columnsTemplateBuilder.push('1fr'); // Text area always gets 1 full fraction of allotted space\n\n let lastCell = null;\n if (metadata || trailing || action || navigation) {\n columnsTemplateBuilder.push('auto');\n lastCell = (\n <div className={styles.flexRowStyles}>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n metadata ? styles.leftPaddingStyles : ''\n ])}>\n {metadata}\n </div>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n trailing ? styles.leftPaddingStyles : ''\n ])}>\n {trailing}\n </div>\n <div\n className={classNames([styles.centerVerticalStyles, action ? styles.actionStyles : ''])}>\n {action}\n </div>\n </div>\n );\n }\n\n const columnsTemplate = columnsTemplateBuilder.join(' ');\n const hasSecondRow = quaternary || navigation ? true : false;\n\n return { columnsTemplate, firstCell, secondCell, lastCell, hasSecondRow };\n}\n\nfunction getOptInColumnsTemplate(\n selector: ComponentChildren,\n leading: ComponentChildren,\n metadata: ComponentChildren,\n trailing: ComponentChildren,\n action: ComponentChildren,\n quaternary: ComponentChildren,\n navigation: ComponentChildren\n) {\n const columnsTemplateBuilder = [];\n\n let firstCell = null;\n if (selector) {\n columnsTemplateBuilder.push('auto');\n firstCell = <div className={styles.optInSelectorStyles}>{selector}</div>;\n }\n\n let secondCell = null;\n if (selector || leading) {\n columnsTemplateBuilder.push('auto');\n secondCell = (\n <div\n className={classNames([\n selector ? styles.leftPaddingStyles : '',\n styles.topAlignStyles,\n leading ? styles.optInRightPaddingStyles : ''\n ])}>\n {leading}\n </div>\n );\n }\n\n columnsTemplateBuilder.push('1fr'); // Text area always gets 1 full fraction of allotted space\n\n let lastCell = null;\n if (metadata || trailing || action || navigation) {\n columnsTemplateBuilder.push('auto');\n lastCell = (\n <div className={classNames([styles.topAlignStyles])}>\n <div className={classNames([styles.optInExtraStyles, styles.flexRowStyles])}>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n metadata ? styles.leftPaddingStyles : ''\n ])}>\n {metadata}\n </div>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n trailing ? styles.leftPaddingStyles : ''\n ])}>\n {trailing}\n </div>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n action ? styles.actionStyles : ''\n ])}>\n {action}\n </div>\n </div>\n </div>\n );\n }\n\n const columnsTemplate = columnsTemplateBuilder.join(' ');\n const hasSecondRow = quaternary || navigation ? true : false;\n\n return { columnsTemplate, firstCell, secondCell, lastCell, hasSecondRow };\n}\n"],"names":["children","selector","leading","primary","secondary","tertiary","overline","metadata","trailing","action","quaternary","navigation","verticalAlignment","columnsTemplate","firstCell","secondCell","lastCell","hasSecondRow","columnsTemplateBuilder","push","_jsx","className","styles","optInSelectorStyles","classNames","leftPaddingStyles","topAlignStyles","optInRightPaddingStyles","jsx","_jsxs","optInExtraStyles","flexRowStyles","centerVerticalStyles","actionStyles","join","getOptInColumnsTemplate","selectorStyles","displayFlexStyle","getColumnsTemplate","topRow","topRowStyles","textArea","childrenStyles","flexColumnStyles","secondRow","optInTopPaddingStyles","rowAlignStyles","endJustifyStyles","jsxs","Grid","gap","gridTemplateColumns"],"mappings":"+LA0EgB,UAAeA,SAC7BA,EAAQC,SACRA,EAAQC,QACRA,EAAOC,QACPA,EAAOC,UACPA,EAASC,SACTA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,OACRA,EAAMC,WACNA,EAAUC,WACVA,EAAUC,kBACVA,EAAoB,WAGpB,MAAMC,gBAAEA,EAAeC,UAAEA,EAASC,WAAEA,EAAUC,SAAEA,EAAQC,aAAEA,GAClC,QAAtBL,EAqIJ,SACEX,EACAC,EACAK,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMO,EAAyB,GAE/B,IAAIJ,EAAY,KACZb,IACFiB,EAAuBC,KAAK,QAC5BL,EAAYM,EAAAA,IAAK,MAAA,CAAAC,UAAWC,EAAMA,OAACC,oBAAmBvB,SAAGC,KAG3D,IAAIc,EA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BACE,QAAtB/B,EAA8B,KAAOQ,EAAMQ,IAAA,MAAA,CAAA5B,SAAAM,IAC5Cc,sBAAMjB,IACNiB,MAAA,MAAA,CAAApB,SAAMI,IACNgB,EAAAA,IAAA,MAAA,CAAApB,SAAMK,OAKJuC,EAAY3B,EACd,CACEH,GAAaM,EAAAA,IAAc,OAAA,CAAApB,SAAA,MAC3Be,GAAcK,EAAAA,IAAc,OAAA,CAAApB,SAAA,MAC5BoB,EAAAA,IACE,MAAA,CAAAC,UAAWG,aAAW,CACE,QAAtBZ,EAA8BU,SAAOuB,sBAAwB,GAC7DvB,EAAAA,OAAOwB,iBACP9C,SACDU,IAEHM,GACEI,EAAAA,IAAA,MAAA,CACEC,UAAWG,EAAAA,WAAW,CACE,QAAtBZ,EAA8BU,SAAOuB,sBAAwB,GAC7DvB,EAAAA,OAAOyB,mBACP/C,SACDW,KAIP,KAEJ,OACEkB,EAACmB,KAAAC,EAAIA,MAACC,IAA2B,QAAtBtC,EAA8B,KAAO,KAAMuC,oBAAqBtC,YACxE0B,EACAzB,EACAC,EACDK,EAAKQ,IAAA,MAAA,CAAAP,UAAWC,EAAMA,OAACU,qBAAuBhC,SAAAyC,IAC7CzB,EACA4B,IAGP"}
1
+ {"version":3,"file":"ListItemLayout-e0b2c71e.js","sources":["../../src/UNSAFE_ListItemLayout/ListItemLayout.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentChildren, JSX } from 'preact';\nimport { Grid } from '../UNSAFE_Grid';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { styles } from './themes/ListItemLayoutStyles.css';\n\ntype IntrinsicProps = Pick<JSX.HTMLAttributes<HTMLDivElement>, 'children'>;\ntype Props = {\n children?: ComponentChildren;\n /**\n * The centermost element that should display more important data.\n */\n primary?: ComponentChildren;\n /**\n * Render Selector component in the leftmost column of the grid.\n */\n selector?: ComponentChildren;\n /**\n * Visual element to the left of the primary section.\n * Supports image, avatar, badge, initials, or icon.\n */\n leading?: ComponentChildren;\n /**\n * A section that is rendered above the primary line.\n */\n overline?: ComponentChildren;\n /**\n * A section below the primary line.\n */\n secondary?: ComponentChildren;\n /**\n * Another section below secondary.\n */\n tertiary?: ComponentChildren;\n /**\n * Provides information about other data.\n * Some examples of basic metadata are author, date created, date modified, file size, abbreviations, etc.\n */\n metadata?: ComponentChildren;\n /**\n * Visual element to the right of the primary section and metadata.\n * Example components are image, avatar, badge, initials, or icon.\n */\n trailing?: ComponentChildren;\n /**\n * The action prop displays either one primary action or one or more secondary actions.\n * A common example is using Toolbar.\n */\n action?: ComponentChildren;\n /**\n * Additional section separated with a space between itself and tertiary.\n */\n quaternary?: ComponentChildren;\n /**\n * Navigation should normally be used for linking away from the layout.\n */\n navigation?: ComponentChildren;\n /**\n * Aligns content to top of cell and moves overline to a row above primary.\n */\n verticalAlignment?: 'middle' | 'top';\n} & IntrinsicProps;\n\n// TODO: revisit idea of negative margin when selector has a proper API for handling spacing\n// Jira: JET-54543\n/**\n * A ListItemLayout component represents a layout used for list view item elements.\n */\nexport function ListItemLayout({\n children,\n selector,\n leading,\n primary,\n secondary,\n tertiary,\n overline,\n metadata,\n trailing,\n action,\n quaternary,\n navigation,\n verticalAlignment = 'middle'\n}: Props) {\n // generate grid skeleton, adding cells based on which props are defined\n const { columnsTemplate, firstCell, secondCell, lastCell, hasSecondRow } =\n verticalAlignment === 'top'\n ? getOptInColumnsTemplate(\n selector,\n leading,\n metadata,\n trailing,\n action,\n quaternary,\n navigation\n )\n : getColumnsTemplate(selector, leading, metadata, trailing, action, quaternary, navigation);\n\n // extra row placed before the other rows, only used with top alignment\n const topRow =\n overline && verticalAlignment === 'top'\n ? [\n firstCell && <span> </span>,\n secondCell && <span> </span>,\n <div className={styles.topRowStyles}>{overline}</div>,\n lastCell && <span> </span>\n ]\n : null;\n\n // if ListItemLayout component has a child (ListItemTextLayout) then render that instead of individual props\n const textArea = children ? (\n <div className={styles.childrenStyles}>{children}</div>\n ) : (\n <div className={styles.flexColumnStyles}>\n {verticalAlignment === 'top' ? null : <div>{overline}</div>}\n <div>{primary}</div>\n <div>{secondary}</div>\n <div>{tertiary}</div>\n </div>\n );\n\n // a second row is needed when quaternary or navigation are defined\n const secondRow = hasSecondRow\n ? [\n firstCell && <span> </span>,\n secondCell && <span> </span>,\n <div\n className={classNames([\n verticalAlignment === 'top' ? styles.optInTopPaddingStyles : '',\n styles.rowAlignStyles\n ])}>\n {quaternary}\n </div>,\n lastCell && (\n <div\n className={classNames([\n verticalAlignment === 'top' ? styles.optInTopPaddingStyles : '',\n styles.endJustifyStyles\n ])}>\n {navigation}\n </div>\n )\n ]\n : null;\n\n return (\n <Grid gap={verticalAlignment === 'top' ? '0x' : '4x'} gridTemplateColumns={columnsTemplate}>\n {topRow}\n {firstCell}\n {secondCell}\n <div className={styles.centerVerticalStyles}>{textArea}</div>\n {lastCell}\n {secondRow}\n </Grid>\n );\n}\n\nfunction getColumnsTemplate(\n selector: ComponentChildren,\n leading: ComponentChildren,\n metadata: ComponentChildren,\n trailing: ComponentChildren,\n action: ComponentChildren,\n quaternary: ComponentChildren,\n navigation: ComponentChildren\n) {\n const columnsTemplateBuilder = [];\n\n let firstCell = null;\n if (selector) {\n columnsTemplateBuilder.push('auto');\n firstCell = <div className={styles.selectorStyles}>{selector}</div>;\n }\n\n let secondCell = null;\n if (leading) {\n columnsTemplateBuilder.push('auto');\n secondCell = (\n <div className={classNames([styles.centerVerticalStyles, styles.displayFlexStyle])}>\n {leading}\n </div>\n );\n }\n\n columnsTemplateBuilder.push('1fr'); // Text area always gets 1 full fraction of allotted space\n\n let lastCell = null;\n if (metadata || trailing || action || navigation) {\n columnsTemplateBuilder.push('auto');\n lastCell = (\n <div className={styles.flexRowStyles}>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n metadata ? styles.leftPaddingStyles : ''\n ])}>\n {metadata}\n </div>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n trailing ? styles.leftPaddingStyles : ''\n ])}>\n {trailing}\n </div>\n <div\n className={classNames([styles.centerVerticalStyles, action ? styles.actionStyles : ''])}>\n {action}\n </div>\n </div>\n );\n }\n\n const columnsTemplate = columnsTemplateBuilder.join(' ');\n const hasSecondRow = quaternary || navigation ? true : false;\n\n return { columnsTemplate, firstCell, secondCell, lastCell, hasSecondRow };\n}\n\nfunction getOptInColumnsTemplate(\n selector: ComponentChildren,\n leading: ComponentChildren,\n metadata: ComponentChildren,\n trailing: ComponentChildren,\n action: ComponentChildren,\n quaternary: ComponentChildren,\n navigation: ComponentChildren\n) {\n const columnsTemplateBuilder = [];\n\n let firstCell = null;\n if (selector) {\n columnsTemplateBuilder.push('auto');\n firstCell = <div className={styles.optInSelectorStyles}>{selector}</div>;\n }\n\n let secondCell = null;\n if (selector || leading) {\n columnsTemplateBuilder.push('auto');\n secondCell = (\n <div\n className={classNames([\n selector ? styles.leftPaddingStyles : '',\n styles.topAlignStyles,\n leading ? styles.optInRightPaddingStyles : ''\n ])}>\n {leading}\n </div>\n );\n }\n\n columnsTemplateBuilder.push('1fr'); // Text area always gets 1 full fraction of allotted space\n\n let lastCell = null;\n if (metadata || trailing || action || navigation) {\n columnsTemplateBuilder.push('auto');\n lastCell = (\n <div className={classNames([styles.topAlignStyles])}>\n <div className={classNames([styles.optInExtraStyles, styles.flexRowStyles])}>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n metadata ? styles.leftPaddingStyles : ''\n ])}>\n {metadata}\n </div>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n trailing ? styles.leftPaddingStyles : ''\n ])}>\n {trailing}\n </div>\n <div\n className={classNames([\n styles.centerVerticalStyles,\n action ? styles.actionStyles : ''\n ])}>\n {action}\n </div>\n </div>\n </div>\n );\n }\n\n const columnsTemplate = columnsTemplateBuilder.join(' ');\n const hasSecondRow = quaternary || navigation ? true : false;\n\n return { columnsTemplate, firstCell, secondCell, lastCell, hasSecondRow };\n}\n"],"names":["children","selector","leading","primary","secondary","tertiary","overline","metadata","trailing","action","quaternary","navigation","verticalAlignment","columnsTemplate","firstCell","secondCell","lastCell","hasSecondRow","columnsTemplateBuilder","push","_jsx","className","styles","optInSelectorStyles","classNames","leftPaddingStyles","topAlignStyles","optInRightPaddingStyles","jsx","_jsxs","optInExtraStyles","flexRowStyles","centerVerticalStyles","actionStyles","join","getOptInColumnsTemplate","selectorStyles","displayFlexStyle","getColumnsTemplate","topRow","topRowStyles","textArea","childrenStyles","flexColumnStyles","secondRow","optInTopPaddingStyles","rowAlignStyles","endJustifyStyles","jsxs","Grid","gap","gridTemplateColumns"],"mappings":"+LA0EgB,UAAeA,SAC7BA,EAAQC,SACRA,EAAQC,QACRA,EAAOC,QACPA,EAAOC,UACPA,EAASC,SACTA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,OACRA,EAAMC,WACNA,EAAUC,WACVA,EAAUC,kBACVA,EAAoB,WAGpB,MAAMC,gBAAEA,EAAeC,UAAEA,EAASC,WAAEA,EAAUC,SAAEA,EAAQC,aAAEA,GAClC,QAAtBL,EAqIJ,SACEX,EACAC,EACAK,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMO,EAAyB,GAE/B,IAAIJ,EAAY,KACZb,IACFiB,EAAuBC,KAAK,QAC5BL,EAAYM,EAAAA,IAAK,MAAA,CAAAC,UAAWC,EAAMA,OAACC,oBAAmBvB,SAAGC,KAG3D,IAAIc,EAAa,MACbd,GAAYC,KACdgB,EAAuBC,KAAK,QAC5BJ,EACEK,EAAAA,IAAA,MAAA,CACEC,UAAWG,EAAAA,WAAW,CACpBvB,EAAWqB,EAAAA,OAAOG,kBAAoB,GACtCH,EAAAA,OAAOI,eACPxB,EAAUoB,EAAAA,OAAOK,wBAA0B,KAE5C3B,SAAAE,KAKPgB,EAAuBC,KAAK,OAE5B,IAAIH,EAAW,MACXT,GAAYC,G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,MAC5BoB,EAAAA,IACE,MAAA,CAAAC,UAAWG,aAAW,CACE,QAAtBZ,EAA8BU,SAAOuB,sBAAwB,GAC7DvB,EAAAA,OAAOwB,iBACP9C,SACDU,IAEHM,GACEI,EAAAA,IAAA,MAAA,CACEC,UAAWG,EAAAA,WAAW,CACE,QAAtBZ,EAA8BU,SAAOuB,sBAAwB,GAC7DvB,EAAAA,OAAOyB,mBACP/C,SACDW,KAIP,KAEJ,OACEkB,EAACmB,KAAAC,EAAIA,MAACC,IAA2B,QAAtBtC,EAA8B,KAAO,KAAMuC,oBAAqBtC,YACxE0B,EACAzB,EACAC,EACDK,EAAKQ,IAAA,MAAA,CAAAP,UAAWC,EAAMA,OAACU,qBAAuBhC,SAAAyC,IAC7CzB,EACA4B,IAGP"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact/compat', 'preact/hooks', './LayerHost-e95c5f30', 'css!./DragAndDropStyles.styles.css', 'css!./ReorderableItemStyles.styles.css', './ReorderableContext-6d10a1b7', './HiddenAccessible-037ef42d', './collectionUtils-17f5cc64', './useReorderableItem-4c4779f7', './classNames-08d99695', './UNSAFE_ListView/themes/ListViewStyles.css', './keys-4755c121', './mergeProps-bcfa6a92', './List-04c4fed0', './Menu-5d447084', './MenuItem-87cd59b8', 'preact', './logger-0f873e29', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-69ce0a2d', 'css!./IconStyle.styles.css', './SelectMenuGroupContext-67f24a8f', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./MenuSeparatorStyles.styles.css', 'module', './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css', './useItemAction-821d1b6e', './useContextMenuGesture-d55fbea5'], (function(e,r,t,o,n,s,l,i,c,a,u,d,f,y,m,g,p,x,C,h,I,R,S,b,v,M,E,P,T,O,K,k){"use strict";const w=(e,r)=>{if(null!=e){const t=e.querySelectorAll("[role='row']");if(t.length>r)return a.getKey(t[r])}return null};function L(e,r){const t=Math.abs(null==r?e.scrollTop:r),o={y:t,key:void 0,offsetY:void 0};let n=0;const s=e.querySelectorAll("[role='row']");if(s.length>0&&0===t)return o.key=w(e,0),o.offsetY=0,o;for(let r=0;r<s.length;r++){const l=s[r].getBoundingClientRect().height;if(n+=l,t<n){o.key=w(e,r),o.offsetY=l+t-n;break}}return o}function D(e,r){const t=function(e,r){if(null!=r){let t,o=!1;if(null!=r.key?(o=!0,t=r.key):null!=r.offsetY&&null==r.y&&(o=!0,t=L(e).key),o){if(null!=t){let o=0;const n=e.querySelectorAll("[role ='row']");for(let e=0;e<n.length;e++){if(t===a.getKey(n[e]))return o+(null!=r.offsetY?r.offsetY:0);o+=n[e].getBoundingClientRect().height}}}else if(null!=r.y)return r.y}return}(e,r);e.scrollTop=null!=t?t:0}const j=t.memo((function({children:e,dragKey:t,setDragKey:n,onReorder:s,rootRef:l,itemKey:i}){const c=o.useRef(null),m={itemOverlayFront:f.styles.reorderableItemOverlayFront,itemOverlayRear:f.styles.reorderableItemOverlayRear,itemDragger:f.styles.reorderableItemDragger},g=o.useCallback((e=>{e.dataTransfer?.setData("text/listview-items-key",JSON.stringify(i))}),[i]),{rootProps:p,isDragged:x,overlayZoneBeforeProps:C,overlayZoneAfterProps:h}=u.useReorderableItem({isDisabled:!s,dragKey:t,setDragKey:n,onReorder:s,rootRef:l,ref:c,getItem:()=>c?.current?.closest(a.ITEM_SELECTOR),setTransferData:g,itemStyles:m,itemSelector:a.ITEM_SELECTOR,isVertical:!0}),I=d.classNames([p?.class,f.styles.reorderableItemDnd]);return r.jsxs("div",{...p,class:I,children:[e,!x&&y.isKeyDefined(t)&&r.jsxs(r.Fragment,{children:[r.jsx("div",{...C}),r.jsx("div",{...h})]})]})}),((e,r)=>!(!e||!r)&&(e?.children===r?.children&&e?.dragKey===r?.dragKey)));function A({contextMenuConfig:e,contextMenuContext:t,...o}){const n=e.accessibleLabel;return r.jsx(r.Fragment,{children:r.jsx(p.Menu,{...o,...n&&{"aria-label":n},children:o.isOpen&&e.itemsRenderer(t)})})}const F={mouse:{initialFocus:"menu",placement:"bottom-start",offsetValue:0},keyboard:{initialFocus:"firstItem",placement:"bottom-start",offsetValue:0},touch:{initialFocus:"menu",placement:"end",offsetValue:40}},_={isOpen:!1,initialFocus:"menu",placement:"bottom-start",offsetValue:0,anchorRef:{current:null}},V=t.forwardRef(((e,t)=>{const{contextMenuConfig:n}=e,s=o.useRef(),l=o.useRef(null),{currentItemOverride:d,updateCurrentItemOverride:f}=(e=>{const r=o.useRef(),t=o.useRef();t.current!==e&&(t.current=e,r.current=e);const n=o.useCallback((e=>{r.current={rowKey:e}}),[]);return{currentItemOverride:r.current,updateCurrentItemOverride:n}})(e.currentItemOverride),y=e.data?e.data.map((r=>({data:r,metadata:{key:e.getRowKey(r)}}))):null,p=e.onLoadMore?e.onLoadMore:()=>{},x=y?{offset:0,data:y,sizePrecision:e.hasMore?"atLeast":"exact",totalSize:y.length}:null;o.useImperativeHandle(t,(()=>({getScrollPosition:()=>l.current?L(l.current):{y:0},focus:()=>{l.current&&l.current.focus()}}))),o.useLayoutEffect((()=>{l.current&&s.current!==e.scrollPositionOverride&&(D(l.current,e.scrollPositionOverride),s.current=e.scrollPositionOverride)}),[e.scrollPositionOverride]);const C=null!=e.onReorder,{reorderProps:h,reorderItemProps:I,reorderContext:R,reorderInstructionsId:S,reorderInstructions:b}=(({onReorder:e,rootRef:r,viewportConfig:t})=>{const n=null!=e,[s,l]=o.useState(void 0),{reorderProps:i,reorderContext:c,reorderInstructionsId:d,reorderInstructions:f}=u.useReorderable({onReorder:e,rootRef:r,itemSelector:a.ITEM_SELECTOR,isDisabled:!n,columns:1}),y=o.useRef(!1);return o.useEffect((()=>{if(n&&y.current){const e=r.current,o=a.findElementByKey(e,c.currentItemKey.current,a.ITEM_SELECTOR);if(o){const r=t?.scroller()||e;g.scrollToVisible(o,r,0),y.current=!1}}})),n?{reorderProps:m.mergeProps({onKeyDown:e=>{n&&("ArrowUp"===e.key||"ArrowDown"===e.key)&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(y.current=!0,i.onKeyDown?.(e))},onDragOver:e=>{void 0!==s&&(y.current=!1,a.dragToScroll(e,void 0!==s,r.current))}}),reorderItemProps:{dragKey:s,setDragKey:l,onReorder:e,rootRef:r},reorderContext:c,reorderInstructionsId:d,reorderInstructions:f}:{reorderProps:i,reorderContext:c,reorderInstructionsId:d,reorderInstructions:f}})({onReorder:e.onReorder,rootRef:l,viewportConfig:e.viewportConfig}),{triggerProps:v,menuProps:M,contextMenuContext:E,notifyCurrentKeyChanged:P}=((e,r,t,n)=>{const[s,l]=o.useState(),[i,c]=o.useState(_),u=o.useRef(),{triggerProps:d}=k.useContextMenuGesture((({gesture:r,anchor:o,target:s})=>{let i=o;if("keyboard"===r){i=a.findElementByKey(t.current,u.current,a.ITEM_SELECTOR)||o;const r=K.findItemContext(u.current,e);l(r)}else{const r=a.keyExtractor(s,a.ITEM_SELECTOR),t=K.findItemContext(r,e);l(t),n(r)}c({...F[r],anchorRef:{current:i},isOpen:!0})}),{isDisabled:!r}),f=o.useCallback((e=>{"dismissed"!==e.reason&&"itemAction"!==e.reason||t.current?.focus({preventScroll:!0}),c({..._})}),[t]);return{menuProps:{...i,onClose:f},onClose:f,contextMenuContext:s,triggerProps:d,notifyCurrentKeyChanged:e=>{u.current=e.value}}})(x,n,l,f),T=r=>{e.onPersistCurrentItem?.(r),P(r)};return C&&I?r.jsxs(r.Fragment,{children:[r.jsxs(i.ReorderableContext.Provider,{value:R,children:[r.jsx(g.List,{...e,"aria-describedby":S,contextMenuTriggerProps:v,reorderProps:h,onLoadRange:p,scrollerRef:l,data:x,currentItemOverride:d,onPersistCurrentItem:T,children:t=>r.jsx(j,{...I,itemKey:t.metadata.key,children:e.children(t)})}),r.jsx("span",{id:S,children:r.jsx(c.HiddenAccessible,{children:b})})]}),n&&r.jsx(A,{...M,contextMenuConfig:n,contextMenuContext:E})]}):r.jsxs(r.Fragment,{children:[r.jsx(g.List,{...e,onLoadRange:p,scrollerRef:l,data:x,contextMenuTriggerProps:v,currentItemOverride:d,onPersistCurrentItem:T,children:e.children}),n&&r.jsx(A,{...M,contextMenuConfig:n,contextMenuContext:E})]})}));e.ListView=V}));
2
- //# sourceMappingURL=ListView-bf740071.js.map
1
+ define(['exports', 'preact/jsx-runtime', 'preact/compat', 'preact/hooks', './LayerHost-639b3284', 'css!./DragAndDropStyles.styles.css', 'css!./ReorderableItemStyles.styles.css', './ReorderableContext-6d10a1b7', './HiddenAccessible-037ef42d', './collectionUtils-17f5cc64', './useReorderableItem-726c3c03', './classNames-08d99695', './UNSAFE_ListView/themes/ListViewStyles.css', './keys-4755c121', './mergeProps-bcfa6a92', './List-0b764e84', './Menu-5d447084', './MenuItem-87cd59b8', 'preact', './logger-0f873e29', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-e5bdb734', 'css!./IconStyle.styles.css', './SelectMenuGroupContext-67f24a8f', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./MenuSeparatorStyles.styles.css', 'module', './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css', './useItemAction-821d1b6e', './useContextMenuGesture-d55fbea5'], (function(e,r,t,o,n,s,l,i,c,u,a,d,f,y,m,g,p,x,C,h,I,R,b,S,v,M,E,P,T,O,K,k){"use strict";const w=(e,r)=>{if(null!=e){const t=e.querySelectorAll("[role='row']");if(t.length>r)return u.getKey(t[r])}return null};function L(e,r){const t=Math.abs(null==r?e.scrollTop:r),o={y:t,key:void 0,offsetY:void 0};let n=0;const s=e.querySelectorAll("[role='row']");if(s.length>0&&0===t)return o.key=w(e,0),o.offsetY=0,o;for(let r=0;r<s.length;r++){const l=s[r].getBoundingClientRect().height;if(n+=l,t<n){o.key=w(e,r),o.offsetY=l+t-n;break}}return o}function D(e,r){const t=function(e,r){if(null!=r){let t,o=!1;if(null!=r.key?(o=!0,t=r.key):null!=r.offsetY&&null==r.y&&(o=!0,t=L(e).key),o){if(null!=t){let o=0;const n=e.querySelectorAll("[role ='row']");for(let e=0;e<n.length;e++){if(t===u.getKey(n[e]))return o+(null!=r.offsetY?r.offsetY:0);o+=n[e].getBoundingClientRect().height}}}else if(null!=r.y)return r.y}return}(e,r);e.scrollTop=null!=t?t:0}const j=t.memo((function({children:e,dragKey:t,setDragKey:n,onReorder:s,rootRef:l,itemKey:i}){const c=o.useRef(null),m={itemOverlayFront:f.styles.reorderableItemOverlayFront,itemOverlayRear:f.styles.reorderableItemOverlayRear,itemDragger:f.styles.reorderableItemDragger},g=o.useCallback((e=>{e.dataTransfer?.setData("text/listview-items-key",JSON.stringify(i))}),[i]),{rootProps:p,isDragged:x,overlayZoneBeforeProps:C,overlayZoneAfterProps:h}=a.useReorderableItem({isDisabled:!s,dragKey:t,setDragKey:n,onReorder:s,rootRef:l,ref:c,getItem:()=>c?.current?.closest(u.ITEM_SELECTOR),setTransferData:g,itemStyles:m,itemSelector:u.ITEM_SELECTOR,isVertical:!0}),I=d.classNames([p?.class,f.styles.reorderableItemDnd]);return r.jsxs("div",{...p,class:I,children:[e,!x&&y.isKeyDefined(t)&&r.jsxs(r.Fragment,{children:[r.jsx("div",{...C}),r.jsx("div",{...h})]})]})}),((e,r)=>!(!e||!r)&&(e?.children===r?.children&&e?.dragKey===r?.dragKey)));function A({contextMenuConfig:e,contextMenuContext:t,...o}){const n=e.accessibleLabel;return r.jsx(r.Fragment,{children:r.jsx(p.Menu,{...o,...n&&{"aria-label":n},children:o.isOpen&&e.itemsRenderer(t)})})}const F={mouse:{initialFocus:"menu",placement:"bottom-start",offsetValue:0},keyboard:{initialFocus:"firstItem",placement:"bottom-start",offsetValue:0},touch:{initialFocus:"menu",placement:"end",offsetValue:40}},_={isOpen:!1,initialFocus:"menu",placement:"bottom-start",offsetValue:0,anchorRef:{current:null}},V=t.forwardRef(((e,t)=>{const{contextMenuConfig:n}=e,s=o.useRef(),l=o.useRef(null),{currentItemOverride:d,updateCurrentItemOverride:f}=(e=>{const r=o.useRef(),t=o.useRef();t.current!==e&&(t.current=e,r.current=e);const n=o.useCallback((e=>{r.current={rowKey:e}}),[]);return{currentItemOverride:r.current,updateCurrentItemOverride:n}})(e.currentItemOverride),y=e.data?e.data.map((r=>({data:r,metadata:{key:e.getRowKey(r)}}))):null,p=e.onLoadMore?e.onLoadMore:()=>{},x=y?{offset:0,data:y,sizePrecision:e.hasMore?"atLeast":"exact",totalSize:y.length}:null;o.useImperativeHandle(t,(()=>({getScrollPosition:()=>l.current?L(l.current):{y:0},focus:()=>{l.current&&l.current.focus()}}))),o.useLayoutEffect((()=>{l.current&&s.current!==e.scrollPositionOverride&&(D(l.current,e.scrollPositionOverride),s.current=e.scrollPositionOverride)}),[e.scrollPositionOverride]);const C=null!=e.onReorder,{reorderProps:h,reorderItemProps:I,reorderContext:R,reorderInstructionsId:b,reorderInstructions:S}=(({onReorder:e,rootRef:r,viewportConfig:t})=>{const n=null!=e,[s,l]=o.useState(void 0),{reorderProps:i,reorderContext:c,reorderInstructionsId:d,reorderInstructions:f}=a.useReorderable({onReorder:e,rootRef:r,itemSelector:u.ITEM_SELECTOR,isDisabled:!n,columns:1}),y=o.useRef(!1);return o.useEffect((()=>{if(n&&y.current){const e=r.current,o=u.findElementByKey(e,c.currentItemKey.current,u.ITEM_SELECTOR);if(o){const r=t?.scroller()||e;g.scrollToVisible(o,r,0),y.current=!1}}})),n?{reorderProps:m.mergeProps({onKeyDown:e=>{n&&("ArrowUp"===e.key||"ArrowDown"===e.key)&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(y.current=!0,i.onKeyDown?.(e))},onDragOver:e=>{void 0!==s&&(y.current=!1,u.dragToScroll(e,void 0!==s,r.current))}}),reorderItemProps:{dragKey:s,setDragKey:l,onReorder:e,rootRef:r},reorderContext:c,reorderInstructionsId:d,reorderInstructions:f}:{reorderProps:i,reorderContext:c,reorderInstructionsId:d,reorderInstructions:f}})({onReorder:e.onReorder,rootRef:l,viewportConfig:e.viewportConfig}),{triggerProps:v,menuProps:M,contextMenuContext:E,notifyCurrentKeyChanged:P}=((e,r,t,n)=>{const[s,l]=o.useState(),[i,c]=o.useState(_),a=o.useRef(),{triggerProps:d}=k.useContextMenuGesture((({gesture:r,anchor:o,target:s})=>{let i=o;if("keyboard"===r){i=u.findElementByKey(t.current,a.current,u.ITEM_SELECTOR)||o;const r=K.findItemContext(a.current,e);l(r)}else{const r=u.keyExtractor(s,u.ITEM_SELECTOR),t=K.findItemContext(r,e);l(t),n(r)}c({...F[r],anchorRef:{current:i},isOpen:!0})}),{isDisabled:!r}),f=o.useCallback((e=>{"dismissed"!==e.reason&&"itemAction"!==e.reason||t.current?.focus({preventScroll:!0}),c({..._})}),[t]);return{menuProps:{...i,onClose:f},onClose:f,contextMenuContext:s,triggerProps:d,notifyCurrentKeyChanged:e=>{a.current=e.value}}})(x,n,l,f),T=r=>{e.onPersistCurrentItem?.(r),P(r)};return C&&I?r.jsxs(r.Fragment,{children:[r.jsxs(i.ReorderableContext.Provider,{value:R,children:[r.jsx(g.List,{...e,"aria-describedby":b,contextMenuTriggerProps:v,reorderProps:h,onLoadRange:p,scrollerRef:l,data:x,currentItemOverride:d,onPersistCurrentItem:T,children:t=>r.jsx(j,{...I,itemKey:t.metadata.key,children:e.children(t)})}),r.jsx("span",{id:b,children:r.jsx(c.HiddenAccessible,{children:S})})]}),n&&r.jsx(A,{...M,contextMenuConfig:n,contextMenuContext:E})]}):r.jsxs(r.Fragment,{children:[r.jsx(g.List,{...e,onLoadRange:p,scrollerRef:l,data:x,contextMenuTriggerProps:v,currentItemOverride:d,onPersistCurrentItem:T,children:e.children}),n&&r.jsx(A,{...M,contextMenuConfig:n,contextMenuContext:E})]})}));e.ListView=V}));
2
+ //# sourceMappingURL=ListView-5bb45f81.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListView-bf740071.js","sources":["../../src/UNSAFE_ListView/ScrollPositionUtils.ts","../../src/UNSAFE_ListView/ListViewReorderableItem.tsx","../../src/UNSAFE_ListView/ListViewContextMenu.tsx","../../src/UNSAFE_ListView/useListViewContextMenu.ts","../../src/UNSAFE_ListView/ListView.tsx","../../src/UNSAFE_ListView/useListViewCurrentItemOverride.tsx","../../src/UNSAFE_ListView/useListViewReorder.ts"],"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 */\nimport { getKey } from '../utils/PRIVATE_collectionUtils';\n\n/**\n * Type for scroll position in ListView\n */\nexport type ListViewScrollPosition<K> = {\n offsetY?: number;\n key?: K;\n y?: number;\n};\n\n/**\n * Returns the key for the row at the given index\n */\nconst getKeyForIndex = (root: HTMLElement, index: number) => {\n if (root != null) {\n const rowElements = root.querySelectorAll(`[role='row']`);\n if (rowElements.length > index) {\n return getKey(rowElements[index] as HTMLElement);\n }\n }\n return null;\n};\n\nexport function getScrollPosition<K>(root: HTMLDivElement, newScrollTop?: number) {\n // ensure scroll position y value is initialized\n const scrollTop = Math.abs(newScrollTop == null ? root.scrollTop : newScrollTop);\n\n const scrollPosition: ListViewScrollPosition<K> = {\n y: scrollTop,\n key: undefined,\n offsetY: undefined\n };\n\n let rowBottom = 0;\n const rowElements = root.querySelectorAll(`[role='row']`);\n if (rowElements.length > 0) {\n if (scrollTop === 0) {\n scrollPosition.key = getKeyForIndex(root, 0) as K;\n scrollPosition.offsetY = 0;\n return scrollPosition;\n }\n }\n for (let i = 0; i < rowElements.length; i++) {\n const rowHeight = rowElements[i].getBoundingClientRect().height;\n rowBottom += rowHeight;\n if (scrollTop < rowBottom) {\n scrollPosition.key = getKeyForIndex(root, i) as K;\n scrollPosition.offsetY = rowHeight + scrollTop - rowBottom;\n break;\n }\n }\n return scrollPosition;\n}\n\n/**\n * Helper to set the scroll position on the ListView.\n */\nexport function setScrollPosition<K>(\n root: HTMLDivElement,\n scrollPosition?: ListViewScrollPosition<K>\n) {\n const y = _getScrollTopFromScrollPosition(root, scrollPosition);\n root.scrollTop = y != null ? y : 0;\n}\n\n/**\n * Helper to determine the 'y' value of a given scroll position.\n */\nfunction _getScrollTopFromScrollPosition<K>(\n root: HTMLDivElement,\n scrollPosition?: ListViewScrollPosition<K>\n) {\n if (scrollPosition != null) {\n let key;\n let useRow = false;\n if (scrollPosition.key != null) {\n // key takes precedence over everything else\n useRow = true;\n key = scrollPosition.key;\n } else if (scrollPosition.offsetY != null && scrollPosition.y == null) {\n // offsetY can be used on its own if it is the only vertical aspect provided\n useRow = true;\n key = getScrollPosition(root).key;\n }\n if (useRow) {\n if (key != null) {\n let y = 0;\n const rowElements = root.querySelectorAll(`[role ='row']`);\n for (let i = 0; i < rowElements.length; i++) {\n if (key === getKey(rowElements[i] as HTMLElement)) {\n return y + (scrollPosition.offsetY != null ? scrollPosition.offsetY : 0);\n }\n y += rowElements[i].getBoundingClientRect().height;\n }\n }\n } else if (scrollPosition.y != null) {\n return scrollPosition.y;\n }\n }\n // either nothing was provided, or what was provided was invalid\n return undefined;\n}\n","import { memo } from 'preact/compat';\nimport { useRef, useCallback } from 'preact/hooks';\nimport { useReorderableItem } from '../hooks/PRIVATE_useReorderable';\nimport { ReorderableItemProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { ITEM_SELECTOR } from '../utils/PRIVATE_collectionUtils';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { styles } from './themes/ListViewStyles.css';\nimport { isKeyDefined } from '../utils/UNSAFE_keys';\n\nexport type ListReorderableItemProps<K> = ReorderableItemProps<K>;\n\n/**\n * A private item that will be used by ReorderableCardFlexView, location TBD (could be moved to PRIVATE_CardFlexView)\n */\nexport function ListViewReorderableItem<K extends string | number>({\n children,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n itemKey\n}: ListReorderableItemProps<K> & { itemKey: K }) {\n const itemRef = useRef<HTMLDivElement | null>(null);\n const itemStyles = {\n itemOverlayFront: styles.reorderableItemOverlayFront,\n itemOverlayRear: styles.reorderableItemOverlayRear,\n itemDragger: styles.reorderableItemDragger\n };\n const getItem = () => itemRef?.current?.closest(ITEM_SELECTOR);\n const setTransferData = useCallback(\n (event: DragEvent) => {\n event.dataTransfer?.setData('text/listview-items-key', JSON.stringify(itemKey));\n },\n [itemKey]\n );\n const { rootProps, isDragged, overlayZoneBeforeProps, overlayZoneAfterProps } =\n useReorderableItem({\n isDisabled: onReorder ? false : true,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n ref: itemRef,\n getItem,\n setTransferData,\n itemStyles,\n itemSelector: ITEM_SELECTOR,\n isVertical: true\n });\n const classes = classNames([rootProps?.class, styles.reorderableItemDnd]);\n\n return (\n <div {...rootProps} class={classes}>\n {children}\n {!isDragged && isKeyDefined(dragKey) && (\n <>\n <div {...overlayZoneBeforeProps}></div>\n <div {...overlayZoneAfterProps}></div>\n </>\n )}\n </div>\n );\n}\n\nexport const MemoizeListViewReorderableItem = memo(\n ListViewReorderableItem,\n <K,>(prev: ListReorderableItemProps<K>, next: ListReorderableItemProps<K>) => {\n if (prev && next) {\n return prev?.children === next?.children && prev?.dragKey === next?.dragKey;\n }\n return false;\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 */\nimport { ComponentProps } from 'preact';\n\nimport { ListItemContext } from '#UNSAFE_Collection';\nimport { Menu } from '#UNSAFE_Menu';\nimport { ListViewContextMenuConfig } from './List.types';\n\nexport type Props<K extends string | number, D> = Omit<ComponentProps<typeof Menu>, 'children'> & {\n contextMenuConfig: ListViewContextMenuConfig<K, D>;\n} & { contextMenuContext: ListItemContext<K, D> };\n\n/**\n * The internal component used to render a custom context menu\n */\nexport function ListViewContextMenu<K extends string | number, D>({\n contextMenuConfig,\n contextMenuContext,\n ...menuProps\n}: Props<K, D>) {\n const accessibleLabel = contextMenuConfig.accessibleLabel;\n\n return (\n <>\n <Menu\n {...menuProps}\n {...(accessibleLabel && {\n 'aria-label': accessibleLabel\n })}>\n {menuProps.isOpen && contextMenuConfig.itemsRenderer(contextMenuContext)}\n </Menu>\n </>\n );\n}\n","import type { ComponentProps, RefObject } from 'preact';\nimport { useCallback, useState, useRef } from 'preact/hooks';\n\nimport { DataState, ListItemContext, CurrentKeyDetail } from '#UNSAFE_Collection';\nimport { Menu } from '#UNSAFE_Menu';\nimport { findItemContext } from '#hooks/PRIVATE_useItemAction';\nimport { useContextMenuGesture } from '#hooks/UNSAFE_useContextMenuGesture';\nimport { ITEM_SELECTOR, findElementByKey, keyExtractor } from '#utils/PRIVATE_collectionUtils';\nimport { ListView } from './ListView';\n\ntype MenuProps = Pick<\n ComponentProps<typeof Menu>,\n 'anchorRef' | 'initialFocus' | 'placement' | 'offsetValue' | 'isOpen'\n>;\n\nconst TOUCH_OFFSET_VALUE = 40;\n\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\ntype ListViewProps<K extends string | number, D> = ComponentProps<typeof ListView<K, D>>;\n\nexport const useListViewContextMenu = <K extends string | number, D>(\n dataState: DataState<K, D> | null,\n contextMenuConfig: ListViewProps<K, D>['contextMenuConfig'],\n scrollListRef: RefObject<HTMLElement | null>,\n updateCurrentKey: (key: K) => void\n) => {\n /*Context Menu section\n TODO: A version of context Menu listview will be merged using useContextMenuGesture instead. Once it's merged we \n can go back to this to create a hook or utility that could be share among all collection comps. JET-60320\n */\n\n /* \n Steps to open a menu:\n 1.- useContextMenu handler is called when menu is supposed to be opened.\n 2.- We set contextMenuContext when contextMenuRenderer is called.\n 3.- We dispatch opening the menu with the correct anchor.\n 5.- Menu receives updated props and updated contextMenuContext.\n 6.- Menu is opened. \n\n */\n\n //Supposed to be updated when menu is about to be opened\n //We set an initial key value for the context menu context, to allow user use object destructuring inside the\n //contextMenuRenderer. It doesn't matter if the key is not correct at the initial rendering since menu starts\n //being closed always\n const [contextMenuContext, setContextMenuContext] = useState<ListItemContext<K, D>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n\n const currentKeyRef = useRef<K>();\n const notifyCurrentKeyChanged = (detail: CurrentKeyDetail<K>) => {\n currentKeyRef.current = detail.value;\n };\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n scrollListRef.current as HTMLElement,\n currentKeyRef.current as K,\n ITEM_SELECTOR\n );\n\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n\n const context = findItemContext(\n currentKeyRef.current as K,\n dataState as DataState<string | number | null, D>\n );\n\n setContextMenuContext(context as ListItemContext<K, D>);\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n const context = findItemContext(key, dataState as DataState<string | number | null, D>);\n\n setContextMenuContext(context as ListItemContext<K, D>);\n\n //We update the key so when we close logical focus is on the correct item\n updateCurrentKey(key as K);\n }\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n isOpen: true\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n /* \n TODO: Focus ring should be visible when context menu was closed because of selecting an item using keyboard, \n but should not be visible when the selection was done using mouse or touch. This would probably means menu \n onClose API is going to be changed a little bit so we can satisfy this requirement. JET-62372\n */\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n scrollListRef.current?.focus({ preventScroll: true });\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [scrollListRef]\n );\n\n return {\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n onClose: handleCloseContextMenu,\n contextMenuContext: contextMenuContext as ListItemContext<K, D>,\n triggerProps,\n notifyCurrentKeyChanged\n } as const;\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 */\nimport { JSX } from 'preact';\nimport { ForwardedRef, forwardRef } from 'preact/compat';\nimport { useImperativeHandle, useRef, useLayoutEffect } from 'preact/hooks';\nimport { ReorderableContext } from '../hooks/PRIVATE_useReorderable';\nimport { DataState, CurrentKeyDetail } from '../UNSAFE_Collection';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { List } from '../PRIVATE_List';\nimport { ListProps, ListViewContextMenuConfig, ListViewHandle } from './List.types';\nimport {\n getScrollPosition,\n setScrollPosition,\n ListViewScrollPosition\n} from './ScrollPositionUtils';\nimport { MemoizeListViewReorderableItem } from './ListViewReorderableItem';\nimport { useListViewReorder } from './useListViewReorder';\nimport { ListViewContextMenu } from './ListViewContextMenu';\nimport { useListViewContextMenu } from './useListViewContextMenu';\nimport { useListViewCurrentItemOverride } from './useListViewCurrentItemOverride';\n\n/**\n * Props specific to non-virtualized ListView\n */\ntype NonVirtualizedListProps<K, D> = {\n /**\n * The data that is used to render each item in ListView. If the value is null, then ListView will show nothing\n * if hasMore is false, or loading indicator if hasMore is true.\n */\n data: D[] | null;\n /**\n * A callback function to extract the key which is used to identify the item.\n */\n getRowKey: (data: D) => K;\n /**\n * Whether there are more data available to load. By default this returns false.\n */\n hasMore?: boolean;\n /**\n * An optional callback function which is invoked when user scrolls to the end of the list.\n */\n onLoadMore?: () => void;\n\n /**\n * Configuration used to specify a context menu.\n */\n contextMenuConfig?: ListViewContextMenuConfig<K, D>;\n};\n\n/**\n * Props for the ListView Component\n */\nexport type Props<K, D> = Pick<\n ListProps<K, D>,\n | 'aria-label'\n | 'aria-labelledby'\n | 'children'\n | 'gridlines'\n | 'currentItemOverride'\n | 'onPersistCurrentItem'\n | 'onItemAction'\n | 'onSelectionChange'\n | 'promotedSection'\n | 'selectedKeys'\n | 'selectionMode'\n | 'viewportConfig'\n | 'testId'\n | 'scrollPositionOverride'\n | 'onReorder'\n | 'itemPadding'\n> &\n NonVirtualizedListProps<K, D>;\n/**\n * A list view displays data items as a list or a grid with highly interactive features.\n */\nexport const ListView = forwardRef(\n <K extends string | number, D>(props: Props<K, D>, ref?: ForwardedRef<ListViewHandle<K>>) => {\n const { contextMenuConfig } = props;\n const scrollPositionRef = useRef<ListViewScrollPosition<K>>();\n const listRef = useRef<HTMLDivElement | null>(null);\n\n const { currentItemOverride, updateCurrentItemOverride } = useListViewCurrentItemOverride(\n props.currentItemOverride\n );\n\n const dataMetadata = props.data\n ? props.data.map((aData: D) => {\n const key = props.getRowKey(aData);\n return { data: aData, metadata: { key } };\n })\n : null;\n\n const loadRange = props.onLoadMore ? props.onLoadMore : () => {};\n const dataState = dataMetadata\n ? ({\n offset: 0,\n data: dataMetadata,\n sizePrecision: props.hasMore ? 'atLeast' : 'exact',\n totalSize: dataMetadata.length\n } as DataState<K, D>)\n : null;\n\n useImperativeHandle(ref!, () => ({\n getScrollPosition: () => {\n if (listRef.current) {\n return getScrollPosition(listRef.current);\n }\n return { y: 0 };\n },\n focus: () => {\n if (listRef.current) {\n listRef.current.focus();\n }\n }\n }));\n\n // update scroll position if a new value is provided\n useLayoutEffect(() => {\n if (listRef.current && scrollPositionRef.current !== props.scrollPositionOverride) {\n setScrollPosition(listRef.current, props.scrollPositionOverride);\n scrollPositionRef.current = props.scrollPositionOverride;\n }\n }, [props.scrollPositionOverride]);\n\n /**\n * Reorder Section\n */\n const isReorderEnabled = props.onReorder != undefined;\n const {\n reorderProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } = useListViewReorder({\n onReorder: props.onReorder,\n rootRef: listRef,\n viewportConfig: props.viewportConfig\n });\n\n const { triggerProps, menuProps, contextMenuContext, notifyCurrentKeyChanged } =\n useListViewContextMenu(dataState, contextMenuConfig, listRef, updateCurrentItemOverride);\n\n const onPersistCurrentItem = (detail: CurrentKeyDetail<K>) => {\n props.onPersistCurrentItem?.(detail);\n notifyCurrentKeyChanged(detail);\n };\n\n if (isReorderEnabled && reorderItemProps) {\n return (\n <>\n <ReorderableContext.Provider value={reorderContext}>\n <List\n {...props}\n aria-describedby={reorderInstructionsId}\n contextMenuTriggerProps={triggerProps}\n reorderProps={reorderProps}\n onLoadRange={loadRange}\n scrollerRef={listRef}\n data={dataState}\n currentItemOverride={currentItemOverride}\n onPersistCurrentItem={onPersistCurrentItem}>\n {(context) => (\n <MemoizeListViewReorderableItem\n {...reorderItemProps}\n itemKey={context.metadata.key}>\n {props.children(context)}\n </MemoizeListViewReorderableItem>\n )}\n </List>\n <span id={reorderInstructionsId}>\n <HiddenAccessible>{reorderInstructions}</HiddenAccessible>\n </span>\n </ReorderableContext.Provider>\n {contextMenuConfig && (\n <ListViewContextMenu\n {...menuProps}\n contextMenuConfig={contextMenuConfig}\n contextMenuContext={contextMenuContext}\n />\n )}\n </>\n );\n }\n\n return (\n <>\n <List\n {...props}\n onLoadRange={loadRange}\n scrollerRef={listRef}\n data={dataState}\n contextMenuTriggerProps={triggerProps}\n currentItemOverride={currentItemOverride}\n onPersistCurrentItem={onPersistCurrentItem}>\n {props.children}\n </List>\n {contextMenuConfig && (\n <ListViewContextMenu\n {...menuProps}\n contextMenuConfig={contextMenuConfig}\n contextMenuContext={contextMenuContext}\n />\n )}\n </>\n );\n }\n) as <K extends string | number, D>(\n props: Props<K, D> & { ref?: ForwardedRef<ListViewHandle<K>> }\n) => JSX.Element;\n","import { useCallback, useRef } from 'preact/hooks';\nimport { Item as CurrentItem } from '#UNSAFE_Collection';\nimport { ListProps } from './List.types';\n\n/**\n * This hook handles the currentItemOverride passing to PRIVATE_List layer.\n *\n * If the app provided new value for 'currentItemOverride', we pass that down to PRIVATE_List layer;\n * otherwise, we will pass down the value of internal override, which would be the value\n * updated by useListViewContextMenu hook\n *\n * @param currentItemOverride\n */\nexport const useListViewCurrentItemOverride = <K extends string | number, D>(\n currentItemOverride: ListProps<K, D>['currentItemOverride']\n) => {\n // the override that will be passed down to PRIVATE_List layer\n const listOverrideRef = useRef<CurrentItem<K>>();\n\n // track the currentItemOverride attribute set by app\n const appOverrideRef = useRef<CurrentItem<K>>();\n if (appOverrideRef.current !== currentItemOverride) {\n appOverrideRef.current = currentItemOverride;\n listOverrideRef.current = currentItemOverride;\n }\n\n // track the internal override updated by useListViewContextMenu hook\n // we can just update ref here since the hook will trigger a state update for its context, which will trigger a rerender\n const updateCurrentItemOverride = useCallback((key: K) => {\n listOverrideRef.current = { rowKey: key };\n }, []);\n\n return {\n currentItemOverride: listOverrideRef.current,\n updateCurrentItemOverride\n };\n};\n","import type { RefObject } from 'preact';\nimport { useState, useEffect, useRef } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { ITEM_SELECTOR, dragToScroll, findElementByKey } from '../utils/PRIVATE_collectionUtils';\nimport { ViewportConfig } from '../hooks/UNSAFE_useViewportIntersect';\nimport { useReorderable } from '../hooks/PRIVATE_useReorderable';\nimport { scrollToVisible } from '../PRIVATE_List';\nimport { ListProps } from './List.types';\n\ntype useListViewReorderProps<K, D> = Pick<ListProps<K, D>, 'onReorder'> & {\n rootRef: RefObject<HTMLDivElement>;\n viewportConfig?: ViewportConfig;\n};\n\nexport const useListViewReorder = <K extends string | number, D>({\n onReorder,\n rootRef,\n viewportConfig\n}: useListViewReorderProps<K, D>) => {\n const isReorderEnabled = onReorder != undefined;\n\n const [dragKey, setDragKey] = useState<K | undefined>(undefined);\n const { reorderProps, reorderContext, reorderInstructionsId, reorderInstructions } =\n useReorderable({\n onReorder,\n rootRef,\n itemSelector: ITEM_SELECTOR,\n isDisabled: !isReorderEnabled,\n columns: 1\n });\n\n // ensure the current item is scrolled into view during keyboard reordering,\n // disable that during mouse reordering\n const reorderScrollIntoView = useRef(false);\n useEffect(() => {\n if (isReorderEnabled && reorderScrollIntoView.current) {\n const rootElement = rootRef.current as HTMLElement;\n const elem = findElementByKey(\n rootElement,\n reorderContext.currentItemKey.current as K,\n ITEM_SELECTOR\n );\n if (elem) {\n const scroller = viewportConfig?.scroller() || rootElement;\n // make sure item is visible\n scrollToVisible(elem, scroller, 0);\n reorderScrollIntoView.current = false;\n }\n }\n });\n\n if (!isReorderEnabled) {\n return {\n reorderProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // listview only do keyboard reordering with arrow up/down keys\n if (\n isReorderEnabled &&\n (event.key === 'ArrowUp' || event.key === 'ArrowDown') &&\n (event.metaKey || event.ctrlKey) &&\n event.shiftKey\n ) {\n reorderScrollIntoView.current = true;\n reorderProps.onKeyDown?.(event);\n }\n };\n\n const handleDragOver = (event: DragEvent) => {\n if (dragKey !== undefined) {\n reorderScrollIntoView.current = false;\n dragToScroll(event, dragKey !== undefined, rootRef.current);\n }\n };\n\n const reorderEventProps = mergeProps({ onKeyDown: handleKeyDown, onDragOver: handleDragOver });\n\n const reorderItemProps = {\n dragKey,\n setDragKey,\n onReorder,\n rootRef\n };\n\n return {\n reorderProps: reorderEventProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n};\n"],"names":["getKeyForIndex","root","index","rowElements","querySelectorAll","length","getKey","getScrollPosition","newScrollTop","scrollTop","Math","abs","scrollPosition","y","key","undefined","offsetY","rowBottom","i","rowHeight","getBoundingClientRect","height","setScrollPosition","useRow","_getScrollTopFromScrollPosition","MemoizeListViewReorderableItem","memo","children","dragKey","setDragKey","onReorder","rootRef","itemKey","itemRef","useRef","itemStyles","itemOverlayFront","styles","reorderableItemOverlayFront","itemOverlayRear","reorderableItemOverlayRear","itemDragger","reorderableItemDragger","setTransferData","useCallback","event","dataTransfer","setData","JSON","stringify","rootProps","isDragged","overlayZoneBeforeProps","overlayZoneAfterProps","useReorderableItem","isDisabled","ref","getItem","current","closest","ITEM_SELECTOR","itemSelector","isVertical","classes","classNames","class","reorderableItemDnd","_jsxs","isKeyDefined","jsxs","_Fragment","Fragment","_jsx","jsx","prev","next","ListViewContextMenu","contextMenuConfig","contextMenuContext","menuProps","accessibleLabel","Menu","isOpen","itemsRenderer","menuPropGestureStates","mouse","initialFocus","placement","offsetValue","keyboard","touch","initialMenuProps","anchorRef","ListView","forwardRef","props","scrollPositionRef","listRef","currentItemOverride","updateCurrentItemOverride","listOverrideRef","appOverrideRef","rowKey","useListViewCurrentItemOverride","dataMetadata","data","map","aData","metadata","getRowKey","loadRange","onLoadMore","dataState","offset","sizePrecision","hasMore","totalSize","useImperativeHandle","focus","useLayoutEffect","scrollPositionOverride","isReorderEnabled","reorderProps","reorderItemProps","reorderContext","reorderInstructionsId","reorderInstructions","viewportConfig","useState","useReorderable","columns","reorderScrollIntoView","useEffect","rootElement","elem","findElementByKey","currentItemKey","scroller","scrollToVisible","mergeProps","onKeyDown","metaKey","ctrlKey","shiftKey","onDragOver","dragToScroll","useListViewReorder","triggerProps","notifyCurrentKeyChanged","scrollListRef","updateCurrentKey","setContextMenuContext","setMenuProps","currentKeyRef","useContextMenuGesture","gesture","anchor","target","anchorBasedOnGesture","context","findItemContext","keyExtractor","handleCloseContextMenu","detail","reason","preventScroll","onClose","value","useListViewContextMenu","onPersistCurrentItem","ReorderableContext","Provider","List","contextMenuTriggerProps","onLoadRange","scrollerRef","id","HiddenAccessible"],"mappings":"wlCAqBA,MAAMA,EAAiB,CAACC,EAAmBC,KACzC,GAAY,MAARD,EAAc,CAChB,MAAME,EAAcF,EAAKG,iBAAiB,gBAC1C,GAAID,EAAYE,OAASH,EACvB,OAAOI,SAAOH,EAAYD,GAE7B,CACD,OAAO,IAAI,EAGG,SAAAK,EAAqBN,EAAsBO,GAEzD,MAAMC,EAAYC,KAAKC,IAAoB,MAAhBH,EAAuBP,EAAKQ,UAAYD,GAE7DI,EAA4C,CAChDC,EAAGJ,EACHK,SAAKC,EACLC,aAASD,GAGX,IAAIE,EAAY,EAChB,MAAMd,EAAcF,EAAKG,iBAAiB,gBAC1C,GAAID,EAAYE,OAAS,GACL,IAAdI,EAGF,OAFAG,EAAeE,IAAMd,EAAeC,EAAM,GAC1CW,EAAeI,QAAU,EAClBJ,EAGX,IAAK,IAAIM,EAAI,EAAGA,EAAIf,EAAYE,OAAQa,IAAK,CAC3C,MAAMC,EAAYhB,EAAYe,GAAGE,wBAAwBC,OAEzD,GADAJ,GAAaE,EACTV,EAAYQ,EAAW,CACzBL,EAAeE,IAAMd,EAAeC,EAAMiB,GAC1CN,EAAeI,QAAUG,EAAYV,EAAYQ,EACjD,KACD,CACF,CACD,OAAOL,CACT,CAKgB,SAAAU,EACdrB,EACAW,GAEA,MAAMC,EAOR,SACEZ,EACAW,GAEA,GAAsB,MAAlBA,EAAwB,CAC1B,IAAIE,EACAS,GAAS,EAUb,GAT0B,MAAtBX,EAAeE,KAEjBS,GAAS,EACTT,EAAMF,EAAeE,KACc,MAA1BF,EAAeI,SAAuC,MAApBJ,EAAeC,IAE1DU,GAAS,EACTT,EAAMP,EAAkBN,GAAMa,KAE5BS,GACF,GAAW,MAAPT,EAAa,CACf,IAAID,EAAI,EACR,MAAMV,EAAcF,EAAKG,iBAAiB,iBAC1C,IAAK,IAAIc,EAAI,E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f81.js","sources":["../../src/UNSAFE_ListView/ScrollPositionUtils.ts","../../src/UNSAFE_ListView/ListViewReorderableItem.tsx","../../src/UNSAFE_ListView/ListViewContextMenu.tsx","../../src/UNSAFE_ListView/useListViewContextMenu.ts","../../src/UNSAFE_ListView/ListView.tsx","../../src/UNSAFE_ListView/useListViewCurrentItemOverride.tsx","../../src/UNSAFE_ListView/useListViewReorder.ts"],"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 */\nimport { getKey } from '../utils/PRIVATE_collectionUtils';\n\n/**\n * Type for scroll position in ListView\n */\nexport type ListViewScrollPosition<K> = {\n offsetY?: number;\n key?: K;\n y?: number;\n};\n\n/**\n * Returns the key for the row at the given index\n */\nconst getKeyForIndex = (root: HTMLElement, index: number) => {\n if (root != null) {\n const rowElements = root.querySelectorAll(`[role='row']`);\n if (rowElements.length > index) {\n return getKey(rowElements[index] as HTMLElement);\n }\n }\n return null;\n};\n\nexport function getScrollPosition<K>(root: HTMLDivElement, newScrollTop?: number) {\n // ensure scroll position y value is initialized\n const scrollTop = Math.abs(newScrollTop == null ? root.scrollTop : newScrollTop);\n\n const scrollPosition: ListViewScrollPosition<K> = {\n y: scrollTop,\n key: undefined,\n offsetY: undefined\n };\n\n let rowBottom = 0;\n const rowElements = root.querySelectorAll(`[role='row']`);\n if (rowElements.length > 0) {\n if (scrollTop === 0) {\n scrollPosition.key = getKeyForIndex(root, 0) as K;\n scrollPosition.offsetY = 0;\n return scrollPosition;\n }\n }\n for (let i = 0; i < rowElements.length; i++) {\n const rowHeight = rowElements[i].getBoundingClientRect().height;\n rowBottom += rowHeight;\n if (scrollTop < rowBottom) {\n scrollPosition.key = getKeyForIndex(root, i) as K;\n scrollPosition.offsetY = rowHeight + scrollTop - rowBottom;\n break;\n }\n }\n return scrollPosition;\n}\n\n/**\n * Helper to set the scroll position on the ListView.\n */\nexport function setScrollPosition<K>(\n root: HTMLDivElement,\n scrollPosition?: ListViewScrollPosition<K>\n) {\n const y = _getScrollTopFromScrollPosition(root, scrollPosition);\n root.scrollTop = y != null ? y : 0;\n}\n\n/**\n * Helper to determine the 'y' value of a given scroll position.\n */\nfunction _getScrollTopFromScrollPosition<K>(\n root: HTMLDivElement,\n scrollPosition?: ListViewScrollPosition<K>\n) {\n if (scrollPosition != null) {\n let key;\n let useRow = false;\n if (scrollPosition.key != null) {\n // key takes precedence over everything else\n useRow = true;\n key = scrollPosition.key;\n } else if (scrollPosition.offsetY != null && scrollPosition.y == null) {\n // offsetY can be used on its own if it is the only vertical aspect provided\n useRow = true;\n key = getScrollPosition(root).key;\n }\n if (useRow) {\n if (key != null) {\n let y = 0;\n const rowElements = root.querySelectorAll(`[role ='row']`);\n for (let i = 0; i < rowElements.length; i++) {\n if (key === getKey(rowElements[i] as HTMLElement)) {\n return y + (scrollPosition.offsetY != null ? scrollPosition.offsetY : 0);\n }\n y += rowElements[i].getBoundingClientRect().height;\n }\n }\n } else if (scrollPosition.y != null) {\n return scrollPosition.y;\n }\n }\n // either nothing was provided, or what was provided was invalid\n return undefined;\n}\n","import { memo } from 'preact/compat';\nimport { useRef, useCallback } from 'preact/hooks';\nimport { useReorderableItem } from '../hooks/PRIVATE_useReorderable';\nimport { ReorderableItemProps } from '../UNSAFE_Collection/Reorderable.types';\nimport { ITEM_SELECTOR } from '../utils/PRIVATE_collectionUtils';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { styles } from './themes/ListViewStyles.css';\nimport { isKeyDefined } from '../utils/UNSAFE_keys';\n\nexport type ListReorderableItemProps<K> = ReorderableItemProps<K>;\n\n/**\n * A private item that will be used by ReorderableCardFlexView, location TBD (could be moved to PRIVATE_CardFlexView)\n */\nexport function ListViewReorderableItem<K extends string | number>({\n children,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n itemKey\n}: ListReorderableItemProps<K> & { itemKey: K }) {\n const itemRef = useRef<HTMLDivElement | null>(null);\n const itemStyles = {\n itemOverlayFront: styles.reorderableItemOverlayFront,\n itemOverlayRear: styles.reorderableItemOverlayRear,\n itemDragger: styles.reorderableItemDragger\n };\n const getItem = () => itemRef?.current?.closest(ITEM_SELECTOR);\n const setTransferData = useCallback(\n (event: DragEvent) => {\n event.dataTransfer?.setData('text/listview-items-key', JSON.stringify(itemKey));\n },\n [itemKey]\n );\n const { rootProps, isDragged, overlayZoneBeforeProps, overlayZoneAfterProps } =\n useReorderableItem({\n isDisabled: onReorder ? false : true,\n dragKey,\n setDragKey,\n onReorder,\n rootRef,\n ref: itemRef,\n getItem,\n setTransferData,\n itemStyles,\n itemSelector: ITEM_SELECTOR,\n isVertical: true\n });\n const classes = classNames([rootProps?.class, styles.reorderableItemDnd]);\n\n return (\n <div {...rootProps} class={classes}>\n {children}\n {!isDragged && isKeyDefined(dragKey) && (\n <>\n <div {...overlayZoneBeforeProps}></div>\n <div {...overlayZoneAfterProps}></div>\n </>\n )}\n </div>\n );\n}\n\nexport const MemoizeListViewReorderableItem = memo(\n ListViewReorderableItem,\n <K,>(prev: ListReorderableItemProps<K>, next: ListReorderableItemProps<K>) => {\n if (prev && next) {\n return prev?.children === next?.children && prev?.dragKey === next?.dragKey;\n }\n return false;\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 */\nimport { ComponentProps } from 'preact';\n\nimport { ListItemContext } from '#UNSAFE_Collection';\nimport { Menu } from '#UNSAFE_Menu';\nimport { ListViewContextMenuConfig } from './List.types';\n\nexport type Props<K extends string | number, D> = Omit<ComponentProps<typeof Menu>, 'children'> & {\n contextMenuConfig: ListViewContextMenuConfig<K, D>;\n} & { contextMenuContext: ListItemContext<K, D> };\n\n/**\n * The internal component used to render a custom context menu\n */\nexport function ListViewContextMenu<K extends string | number, D>({\n contextMenuConfig,\n contextMenuContext,\n ...menuProps\n}: Props<K, D>) {\n const accessibleLabel = contextMenuConfig.accessibleLabel;\n\n return (\n <>\n <Menu\n {...menuProps}\n {...(accessibleLabel && {\n 'aria-label': accessibleLabel\n })}>\n {menuProps.isOpen && contextMenuConfig.itemsRenderer(contextMenuContext)}\n </Menu>\n </>\n );\n}\n","import type { ComponentProps, RefObject } from 'preact';\nimport { useCallback, useState, useRef } from 'preact/hooks';\n\nimport { DataState, ListItemContext, CurrentKeyDetail } from '#UNSAFE_Collection';\nimport { Menu } from '#UNSAFE_Menu';\nimport { findItemContext } from '#hooks/PRIVATE_useItemAction';\nimport { useContextMenuGesture } from '#hooks/UNSAFE_useContextMenuGesture';\nimport { ITEM_SELECTOR, findElementByKey, keyExtractor } from '#utils/PRIVATE_collectionUtils';\nimport { ListView } from './ListView';\n\ntype MenuProps = Pick<\n ComponentProps<typeof Menu>,\n 'anchorRef' | 'initialFocus' | 'placement' | 'offsetValue' | 'isOpen'\n>;\n\nconst TOUCH_OFFSET_VALUE = 40;\n\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\ntype ListViewProps<K extends string | number, D> = ComponentProps<typeof ListView<K, D>>;\n\nexport const useListViewContextMenu = <K extends string | number, D>(\n dataState: DataState<K, D> | null,\n contextMenuConfig: ListViewProps<K, D>['contextMenuConfig'],\n scrollListRef: RefObject<HTMLElement | null>,\n updateCurrentKey: (key: K) => void\n) => {\n /*Context Menu section\n TODO: A version of context Menu listview will be merged using useContextMenuGesture instead. Once it's merged we \n can go back to this to create a hook or utility that could be share among all collection comps. JET-60320\n */\n\n /* \n Steps to open a menu:\n 1.- useContextMenu handler is called when menu is supposed to be opened.\n 2.- We set contextMenuContext when contextMenuRenderer is called.\n 3.- We dispatch opening the menu with the correct anchor.\n 5.- Menu receives updated props and updated contextMenuContext.\n 6.- Menu is opened. \n\n */\n\n //Supposed to be updated when menu is about to be opened\n //We set an initial key value for the context menu context, to allow user use object destructuring inside the\n //contextMenuRenderer. It doesn't matter if the key is not correct at the initial rendering since menu starts\n //being closed always\n const [contextMenuContext, setContextMenuContext] = useState<ListItemContext<K, D>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n\n const currentKeyRef = useRef<K>();\n const notifyCurrentKeyChanged = (detail: CurrentKeyDetail<K>) => {\n currentKeyRef.current = detail.value;\n };\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n scrollListRef.current as HTMLElement,\n currentKeyRef.current as K,\n ITEM_SELECTOR\n );\n\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n\n const context = findItemContext(\n currentKeyRef.current as K,\n dataState as DataState<string | number | null, D>\n );\n\n setContextMenuContext(context as ListItemContext<K, D>);\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n const context = findItemContext(key, dataState as DataState<string | number | null, D>);\n\n setContextMenuContext(context as ListItemContext<K, D>);\n\n //We update the key so when we close logical focus is on the correct item\n updateCurrentKey(key as K);\n }\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n isOpen: true\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n /* \n TODO: Focus ring should be visible when context menu was closed because of selecting an item using keyboard, \n but should not be visible when the selection was done using mouse or touch. This would probably means menu \n onClose API is going to be changed a little bit so we can satisfy this requirement. JET-62372\n */\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n scrollListRef.current?.focus({ preventScroll: true });\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [scrollListRef]\n );\n\n return {\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n onClose: handleCloseContextMenu,\n contextMenuContext: contextMenuContext as ListItemContext<K, D>,\n triggerProps,\n notifyCurrentKeyChanged\n } as const;\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 */\nimport { JSX } from 'preact';\nimport { ForwardedRef, forwardRef } from 'preact/compat';\nimport { useImperativeHandle, useRef, useLayoutEffect } from 'preact/hooks';\nimport { ReorderableContext } from '../hooks/PRIVATE_useReorderable';\nimport { DataState, CurrentKeyDetail } from '../UNSAFE_Collection';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { List } from '../PRIVATE_List';\nimport { ListProps, ListViewContextMenuConfig, ListViewHandle } from './List.types';\nimport {\n getScrollPosition,\n setScrollPosition,\n ListViewScrollPosition\n} from './ScrollPositionUtils';\nimport { MemoizeListViewReorderableItem } from './ListViewReorderableItem';\nimport { useListViewReorder } from './useListViewReorder';\nimport { ListViewContextMenu } from './ListViewContextMenu';\nimport { useListViewContextMenu } from './useListViewContextMenu';\nimport { useListViewCurrentItemOverride } from './useListViewCurrentItemOverride';\n\n/**\n * Props specific to non-virtualized ListView\n */\ntype NonVirtualizedListProps<K, D> = {\n /**\n * The data that is used to render each item in ListView. If the value is null, then ListView will show nothing\n * if hasMore is false, or loading indicator if hasMore is true.\n */\n data: D[] | null;\n /**\n * A callback function to extract the key which is used to identify the item.\n */\n getRowKey: (data: D) => K;\n /**\n * Whether there are more data available to load. By default this returns false.\n */\n hasMore?: boolean;\n /**\n * An optional callback function which is invoked when user scrolls to the end of the list.\n */\n onLoadMore?: () => void;\n\n /**\n * Configuration used to specify a context menu.\n */\n contextMenuConfig?: ListViewContextMenuConfig<K, D>;\n};\n\n/**\n * Props for the ListView Component\n */\nexport type Props<K, D> = Pick<\n ListProps<K, D>,\n | 'aria-label'\n | 'aria-labelledby'\n | 'children'\n | 'gridlines'\n | 'currentItemOverride'\n | 'onPersistCurrentItem'\n | 'onItemAction'\n | 'onSelectionChange'\n | 'promotedSection'\n | 'selectedKeys'\n | 'selectionMode'\n | 'viewportConfig'\n | 'testId'\n | 'scrollPositionOverride'\n | 'onReorder'\n | 'itemPadding'\n> &\n NonVirtualizedListProps<K, D>;\n/**\n * A list view displays data items as a list or a grid with highly interactive features.\n */\nexport const ListView = forwardRef(\n <K extends string | number, D>(props: Props<K, D>, ref?: ForwardedRef<ListViewHandle<K>>) => {\n const { contextMenuConfig } = props;\n const scrollPositionRef = useRef<ListViewScrollPosition<K>>();\n const listRef = useRef<HTMLDivElement | null>(null);\n\n const { currentItemOverride, updateCurrentItemOverride } = useListViewCurrentItemOverride(\n props.currentItemOverride\n );\n\n const dataMetadata = props.data\n ? props.data.map((aData: D) => {\n const key = props.getRowKey(aData);\n return { data: aData, metadata: { key } };\n })\n : null;\n\n const loadRange = props.onLoadMore ? props.onLoadMore : () => {};\n const dataState = dataMetadata\n ? ({\n offset: 0,\n data: dataMetadata,\n sizePrecision: props.hasMore ? 'atLeast' : 'exact',\n totalSize: dataMetadata.length\n } as DataState<K, D>)\n : null;\n\n useImperativeHandle(ref!, () => ({\n getScrollPosition: () => {\n if (listRef.current) {\n return getScrollPosition(listRef.current);\n }\n return { y: 0 };\n },\n focus: () => {\n if (listRef.current) {\n listRef.current.focus();\n }\n }\n }));\n\n // update scroll position if a new value is provided\n useLayoutEffect(() => {\n if (listRef.current && scrollPositionRef.current !== props.scrollPositionOverride) {\n setScrollPosition(listRef.current, props.scrollPositionOverride);\n scrollPositionRef.current = props.scrollPositionOverride;\n }\n }, [props.scrollPositionOverride]);\n\n /**\n * Reorder Section\n */\n const isReorderEnabled = props.onReorder != undefined;\n const {\n reorderProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } = useListViewReorder({\n onReorder: props.onReorder,\n rootRef: listRef,\n viewportConfig: props.viewportConfig\n });\n\n const { triggerProps, menuProps, contextMenuContext, notifyCurrentKeyChanged } =\n useListViewContextMenu(dataState, contextMenuConfig, listRef, updateCurrentItemOverride);\n\n const onPersistCurrentItem = (detail: CurrentKeyDetail<K>) => {\n props.onPersistCurrentItem?.(detail);\n notifyCurrentKeyChanged(detail);\n };\n\n if (isReorderEnabled && reorderItemProps) {\n return (\n <>\n <ReorderableContext.Provider value={reorderContext}>\n <List\n {...props}\n aria-describedby={reorderInstructionsId}\n contextMenuTriggerProps={triggerProps}\n reorderProps={reorderProps}\n onLoadRange={loadRange}\n scrollerRef={listRef}\n data={dataState}\n currentItemOverride={currentItemOverride}\n onPersistCurrentItem={onPersistCurrentItem}>\n {(context) => (\n <MemoizeListViewReorderableItem\n {...reorderItemProps}\n itemKey={context.metadata.key}>\n {props.children(context)}\n </MemoizeListViewReorderableItem>\n )}\n </List>\n <span id={reorderInstructionsId}>\n <HiddenAccessible>{reorderInstructions}</HiddenAccessible>\n </span>\n </ReorderableContext.Provider>\n {contextMenuConfig && (\n <ListViewContextMenu\n {...menuProps}\n contextMenuConfig={contextMenuConfig}\n contextMenuContext={contextMenuContext}\n />\n )}\n </>\n );\n }\n\n return (\n <>\n <List\n {...props}\n onLoadRange={loadRange}\n scrollerRef={listRef}\n data={dataState}\n contextMenuTriggerProps={triggerProps}\n currentItemOverride={currentItemOverride}\n onPersistCurrentItem={onPersistCurrentItem}>\n {props.children}\n </List>\n {contextMenuConfig && (\n <ListViewContextMenu\n {...menuProps}\n contextMenuConfig={contextMenuConfig}\n contextMenuContext={contextMenuContext}\n />\n )}\n </>\n );\n }\n) as <K extends string | number, D>(\n props: Props<K, D> & { ref?: ForwardedRef<ListViewHandle<K>> }\n) => JSX.Element;\n","import { useCallback, useRef } from 'preact/hooks';\nimport { Item as CurrentItem } from '#UNSAFE_Collection';\nimport { ListProps } from './List.types';\n\n/**\n * This hook handles the currentItemOverride passing to PRIVATE_List layer.\n *\n * If the app provided new value for 'currentItemOverride', we pass that down to PRIVATE_List layer;\n * otherwise, we will pass down the value of internal override, which would be the value\n * updated by useListViewContextMenu hook\n *\n * @param currentItemOverride\n */\nexport const useListViewCurrentItemOverride = <K extends string | number, D>(\n currentItemOverride: ListProps<K, D>['currentItemOverride']\n) => {\n // the override that will be passed down to PRIVATE_List layer\n const listOverrideRef = useRef<CurrentItem<K>>();\n\n // track the currentItemOverride attribute set by app\n const appOverrideRef = useRef<CurrentItem<K>>();\n if (appOverrideRef.current !== currentItemOverride) {\n appOverrideRef.current = currentItemOverride;\n listOverrideRef.current = currentItemOverride;\n }\n\n // track the internal override updated by useListViewContextMenu hook\n // we can just update ref here since the hook will trigger a state update for its context, which will trigger a rerender\n const updateCurrentItemOverride = useCallback((key: K) => {\n listOverrideRef.current = { rowKey: key };\n }, []);\n\n return {\n currentItemOverride: listOverrideRef.current,\n updateCurrentItemOverride\n };\n};\n","import type { RefObject } from 'preact';\nimport { useState, useEffect, useRef } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { ITEM_SELECTOR, dragToScroll, findElementByKey } from '../utils/PRIVATE_collectionUtils';\nimport { ViewportConfig } from '../hooks/UNSAFE_useViewportIntersect';\nimport { useReorderable } from '../hooks/PRIVATE_useReorderable';\nimport { scrollToVisible } from '../PRIVATE_List';\nimport { ListProps } from './List.types';\n\ntype useListViewReorderProps<K, D> = Pick<ListProps<K, D>, 'onReorder'> & {\n rootRef: RefObject<HTMLDivElement>;\n viewportConfig?: ViewportConfig;\n};\n\nexport const useListViewReorder = <K extends string | number, D>({\n onReorder,\n rootRef,\n viewportConfig\n}: useListViewReorderProps<K, D>) => {\n const isReorderEnabled = onReorder != undefined;\n\n const [dragKey, setDragKey] = useState<K | undefined>(undefined);\n const { reorderProps, reorderContext, reorderInstructionsId, reorderInstructions } =\n useReorderable({\n onReorder,\n rootRef,\n itemSelector: ITEM_SELECTOR,\n isDisabled: !isReorderEnabled,\n columns: 1\n });\n\n // ensure the current item is scrolled into view during keyboard reordering,\n // disable that during mouse reordering\n const reorderScrollIntoView = useRef(false);\n useEffect(() => {\n if (isReorderEnabled && reorderScrollIntoView.current) {\n const rootElement = rootRef.current as HTMLElement;\n const elem = findElementByKey(\n rootElement,\n reorderContext.currentItemKey.current as K,\n ITEM_SELECTOR\n );\n if (elem) {\n const scroller = viewportConfig?.scroller() || rootElement;\n // make sure item is visible\n scrollToVisible(elem, scroller, 0);\n reorderScrollIntoView.current = false;\n }\n }\n });\n\n if (!isReorderEnabled) {\n return {\n reorderProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n }\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // listview only do keyboard reordering with arrow up/down keys\n if (\n isReorderEnabled &&\n (event.key === 'ArrowUp' || event.key === 'ArrowDown') &&\n (event.metaKey || event.ctrlKey) &&\n event.shiftKey\n ) {\n reorderScrollIntoView.current = true;\n reorderProps.onKeyDown?.(event);\n }\n };\n\n const handleDragOver = (event: DragEvent) => {\n if (dragKey !== undefined) {\n reorderScrollIntoView.current = false;\n dragToScroll(event, dragKey !== undefined, rootRef.current);\n }\n };\n\n const reorderEventProps = mergeProps({ onKeyDown: handleKeyDown, onDragOver: handleDragOver });\n\n const reorderItemProps = {\n dragKey,\n setDragKey,\n onReorder,\n rootRef\n };\n\n return {\n reorderProps: reorderEventProps,\n reorderItemProps,\n reorderContext,\n reorderInstructionsId,\n reorderInstructions\n } as const;\n};\n"],"names":["getKeyForIndex","root","index","rowElements","querySelectorAll","length","getKey","getScrollPosition","newScrollTop","scrollTop","Math","abs","scrollPosition","y","key","undefined","offsetY","rowBottom","i","rowHeight","getBoundingClientRect","height","setScrollPosition","useRow","_getScrollTopFromScrollPosition","MemoizeListViewReorderableItem","memo","children","dragKey","setDragKey","onReorder","rootRef","itemKey","itemRef","useRef","itemStyles","itemOverlayFront","styles","reorderableItemOverlayFront","itemOverlayRear","reorderableItemOverlayRear","itemDragger","reorderableItemDragger","setTransferData","useCallback","event","dataTransfer","setData","JSON","stringify","rootProps","isDragged","overlayZoneBeforeProps","overlayZoneAfterProps","useReorderableItem","isDisabled","ref","getItem","current","closest","ITEM_SELECTOR","itemSelector","isVertical","classes","classNames","class","reorderableItemDnd","_jsxs","isKeyDefined","jsxs","_Fragment","Fragment","_jsx","jsx","prev","next","ListViewContextMenu","contextMenuConfig","contextMenuContext","menuProps","accessibleLabel","Menu","isOpen","itemsRenderer","menuPropGestureStates","mouse","initialFocus","placement","offsetValue","keyboard","touch","initialMenuProps","anchorRef","ListView","forwardRef","props","scrollPositionRef","listRef","currentItemOverride","updateCurrentItemOverride","listOverrideRef","appOverrideRef","rowKey","useListViewCurrentItemOverride","dataMetadata","data","map","aData","metadata","getRowKey","loadRange","onLoadMore","dataState","offset","sizePrecision","hasMore","totalSize","useImperativeHandle","focus","useLayoutEffect","scrollPositionOverride","isReorderEnabled","reorderProps","reorderItemProps","reorderContext","reorderInstructionsId","reorderInstructions","viewportConfig","useState","useReorderable","columns","reorderScrollIntoView","useEffect","rootElement","elem","findElementByKey","currentItemKey","scroller","scrollToVisible","mergeProps","onKeyDown","metaKey","ctrlKey","shiftKey","onDragOver","dragToScroll","useListViewReorder","triggerProps","notifyCurrentKeyChanged","scrollListRef","updateCurrentKey","setContextMenuContext","setMenuProps","currentKeyRef","useContextMenuGesture","gesture","anchor","target","anchorBasedOnGesture","context","findItemContext","keyExtractor","handleCloseContextMenu","detail","reason","preventScroll","onClose","value","useListViewContextMenu","onPersistCurrentItem","ReorderableContext","Provider","List","contextMenuTriggerProps","onLoadRange","scrollerRef","id","HiddenAccessible"],"mappings":"wlCAqBA,MAAMA,EAAiB,CAACC,EAAmBC,KACzC,GAAY,MAARD,EAAc,CAChB,MAAME,EAAcF,EAAKG,iBAAiB,gBAC1C,GAAID,EAAYE,OAASH,EACvB,OAAOI,SAAOH,EAAYD,GAE7B,CACD,OAAO,IAAI,EAGG,SAAAK,EAAqBN,EAAsBO,GAEzD,MAAMC,EAAYC,KAAKC,IAAoB,MAAhBH,EAAuBP,EAAKQ,UAAYD,GAE7DI,EAA4C,CAChDC,EAAGJ,EACHK,SAAKC,EACLC,aAASD,GAGX,IAAIE,EAAY,EAChB,MAAMd,EAAcF,EAAKG,iBAAiB,gBAC1C,GAAID,EAAYE,OAAS,GACL,IAAdI,EAGF,OAFAG,EAAeE,IAAMd,EAAeC,EAAM,GAC1CW,EAAeI,QAAU,EAClBJ,EAGX,IAAK,IAAIM,EAAI,EAAGA,EAAIf,EAAYE,OAAQa,IAAK,CAC3C,MAAMC,EAAYhB,EAAYe,GAAGE,wBAAwBC,OAEzD,GADAJ,GAAaE,EACTV,EAAYQ,EAAW,CACzBL,EAAeE,IAAMd,EAAeC,EAAMiB,GAC1CN,EAAeI,QAAUG,EAAYV,EAAYQ,EACjD,KACD,CACF,CACD,OAAOL,CACT,CAKgB,SAAAU,EACdrB,EACAW,GAEA,MAAMC,EAOR,SACEZ,EACAW,GAEA,GAAsB,MAAlBA,EAAwB,CAC1B,IAAIE,EACAS,GAAS,EAUb,GAT0B,MAAtBX,EAAeE,KAEjBS,GAAS,EACTT,EAAMF,EAAeE,KACc,MAA1BF,EAAeI,SAAuC,MAApBJ,EAAeC,IAE1DU,GAAS,EACTT,EAAMP,EAAkBN,GAAMa,KAE5BS,GACF,GAAW,MAAPT,EAAa,CACf,IAAID,EAAI,EACR,MAAMV,EAAcF,EA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AoBA,MAI1B"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', 'css!./LiveRegionStyles.styles.css', './useTestId-b5cd4766'], (function(e,t,s,i,c){"use strict";e.LiveRegion=function({testId:e,atomic:i="false",children:n="",timeout:o=100,type:u="polite"}){const a=function(e,t){const[i,c]=s.useState(""),n=s.useCallback((()=>c(e)),[e]),o=s.useCallback((()=>setTimeout(n,t)),[n,t]);return s.useEffect((()=>{const e=o();return()=>clearTimeout(e)}),[o]),i}(n,o),r=c.useTestId(e);return t.jsx("span",{"aria-live":u,"aria-atomic":i,class:"LiveRegionStyles_offScreenStyle__1uvpdtw0",...r,children:a})}}));
2
+ //# sourceMappingURL=LiveRegion-9a362373.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LiveRegion-8142ed0d.js","sources":["../../src/UNSAFE_LiveRegion/LiveRegion.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'preact/hooks';\nimport { offScreenStyle } from './LiveRegionStyles.css';\nimport { TestIdProps, useTestId } from '#hooks/UNSAFE_useTestId';\n\ntype Props = TestIdProps & {\n /**\n * Whether this live region is atomic\n */\n atomic?: 'true' | 'false';\n\n /**\n * The text to be read out in the live region\n */\n children?: string;\n\n /**\n * Timeout for updating the text\n */\n timeout?: number;\n\n /**\n * The value for the aria-live attribute\n */\n type?: 'assertive' | 'polite' | 'off';\n};\n\n/**\n * A helper component that renders an aria-live region\n *\n * TODO: Create a more centralized component that can handle aria-live region for\n * the whole application and use context api to communicate\n */\nfunction LiveRegion({\n testId,\n atomic = 'false',\n children = '',\n timeout = 100,\n type = 'polite'\n}: Props) {\n const ariaLiveText = useLiveText(children, timeout);\n const testIdProps = useTestId(testId);\n\n return (\n <span aria-live={type} aria-atomic={atomic} class={offScreenStyle} {...testIdProps}>\n {ariaLiveText}\n </span>\n );\n}\n\n/**\n * A custom hook for handling the aria-live region\n *\n * @param text The aria-live text to use\n * @param timeout The timeout for setting the aria-live text async\n * @returns The aria-live text\n */\nfunction useLiveText(text: string, timeout: number) {\n const [liveText, setLiveText] = useState('');\n const updateText = useCallback(() => setLiveText(text), [text]);\n const updateTextAsync = useCallback(() => setTimeout(updateText, timeout), [updateText, timeout]);\n\n useEffect(() => {\n const timeoutId = updateTextAsync();\n\n return () => clearTimeout(timeoutId);\n }, [updateTextAsync]);\n\n return liveText;\n}\n\nexport { LiveRegion };\n"],"names":["testId","atomic","children","timeout","type","ariaLiveText","text","liveText","setLiveText","useState","updateText","useCallback","updateTextAsync","setTimeout","useEffect","timeoutId","clearTimeout","useLiveText","testIdProps","useTestId","_jsx","jsx","class"],"mappings":"6JAgCA,UAAoBA,OAClBA,EAAMC,OACNA,EAAS,QAAOC,SAChBA,EAAW,GAAEC,QACbA,EAAU,IAAGC,KACbA,EAAO,WAEP,MAAMC,EAiBR,SAAqBC,EAAcH,GACjC,MAAOI,EAAUC,GAAeC,EAAQA,SAAC,IACnCC,EAAaC,EAAAA,aAAY,IAAMH,EAAYF,IAAO,CAACA,IACnDM,EAAkBD,eAAY,IAAME,WAAWH,EAAYP,IAAU,CAACO,EAAYP,IAQxF,OANAW,EAAAA,WAAU,KACR,MAAMC,EAAYH,IAElB,MAAO,IAAMI,aAAaD,EAAU,GACnC,CAACH,IAEGL,CACT,CA7BuBU,CAAYf,EAAUC,GACrCe,EAAcC,YAAUnB,GAE9B,OACEoB,EAAAC,IAAA,OAAA,CAAA,YAAiBjB,EAAI,cAAeH,EAAQqB,qDAA2BJ,EAAWhB,SAC/EG,GAGP"}
1
+ {"version":3,"file":"LiveRegion-9a362373.js","sources":["../../src/UNSAFE_LiveRegion/LiveRegion.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'preact/hooks';\nimport { offScreenStyle } from './LiveRegionStyles.css';\nimport { TestIdProps, useTestId } from '#hooks/UNSAFE_useTestId';\n\ntype Props = TestIdProps & {\n /**\n * Whether this live region is atomic\n */\n atomic?: 'true' | 'false';\n\n /**\n * The text to be read out in the live region\n */\n children?: string;\n\n /**\n * Timeout for updating the text\n */\n timeout?: number;\n\n /**\n * The value for the aria-live attribute\n */\n type?: 'assertive' | 'polite' | 'off';\n};\n\n/**\n * A helper component that renders an aria-live region\n *\n * TODO: Create a more centralized component that can handle aria-live region for\n * the whole application and use context api to communicate\n */\nfunction LiveRegion({\n testId,\n atomic = 'false',\n children = '',\n timeout = 100,\n type = 'polite'\n}: Props) {\n const ariaLiveText = useLiveText(children, timeout);\n const testIdProps = useTestId(testId);\n\n return (\n <span aria-live={type} aria-atomic={atomic} class={offScreenStyle} {...testIdProps}>\n {ariaLiveText}\n </span>\n );\n}\n\n/**\n * A custom hook for handling the aria-live region\n *\n * @param text The aria-live text to use\n * @param timeout The timeout for setting the aria-live text async\n * @returns The aria-live text\n */\nfunction useLiveText(text: string, timeout: number) {\n const [liveText, setLiveText] = useState('');\n const updateText = useCallback(() => setLiveText(text), [text]);\n const updateTextAsync = useCallback(() => setTimeout(updateText, timeout), [updateText, timeout]);\n\n useEffect(() => {\n const timeoutId = updateTextAsync();\n\n return () => clearTimeout(timeoutId);\n }, [updateTextAsync]);\n\n return liveText;\n}\n\nexport { LiveRegion };\n"],"names":["testId","atomic","children","timeout","type","ariaLiveText","text","liveText","setLiveText","useState","updateText","useCallback","updateTextAsync","setTimeout","useEffect","timeoutId","clearTimeout","useLiveText","testIdProps","useTestId","_jsx","jsx","class"],"mappings":"6JAgCA,UAAoBA,OAClBA,EAAMC,OACNA,EAAS,QAAOC,SAChBA,EAAW,GAAEC,QACbA,EAAU,IAAGC,KACbA,EAAO,WAEP,MAAMC,EAiBR,SAAqBC,EAAcH,GACjC,MAAOI,EAAUC,GAAeC,EAAQA,SAAC,IACnCC,EAAaC,EAAAA,aAAY,IAAMH,EAAYF,IAAO,CAACA,IACnDM,EAAkBD,eAAY,IAAME,WAAWH,EAAYP,IAAU,CAACO,EAAYP,IAQxF,OANAW,EAAAA,WAAU,KACR,MAAMC,EAAYH,IAElB,MAAO,IAAMI,aAAaD,EAAU,GACnC,CAACH,IAEGL,CACT,CA7BuBU,CAAYf,EAAUC,GACrCe,EAAcC,YAAUnB,GAE9B,OACEoB,EAAAC,IAAA,OAAA,CAAA,YAAiBjB,EAAI,cAAeH,EAAQqB,qDAA2BJ,EAAWhB,SAC/EG,GAGP"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', 'preact', './Collection-46cfa244', './useViewportIntersect-b2d47a4b'], (function(e,o,t,r,n){"use strict";const i="oj-collection-loadmore",s=`.${i}`;e.LOADMORE_STYLE_CLASS=i,e.LoadMoreCollection=function({data:e,children:i,viewportConfig:c,hasMore:a,onLoadMore:l,loadMoreIndicator:d,suggestions:u,loadMoreThreshold:h=1}){return n.useViewportIntersect(c,Math.max(h,1),0,s,(()=>{e&&l()})),e?o.jsxs(t.Fragment,{children:[u,o.jsx(r.Collection,{items:e,children:i}),a&&d]}):o.jsx("div",{})}}));
2
+ //# sourceMappingURL=LoadMoreCollection-83413a59.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadMoreCollection-a6adbc3f.js","sources":["../../src/PRIVATE_LoadMoreCollection/LoadMoreCollection.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentChildren, Fragment } from 'preact';\nimport { ItemContext } from '../UNSAFE_Collection';\nimport { Collection } from '../PRIVATE_Collection';\nimport { useViewportIntersect, ViewportConfig } from '../hooks/UNSAFE_useViewportIntersect';\n\n/**\n * Props for the LoadMoreCollection component\n */\ntype Props<D> = {\n /**\n * A DataState object that provide information including data and metadata to the LoadMoreCollection.\n */\n data: D[] | null;\n\n /**\n * Renderer callback used to render each item\n */\n children: (context: ItemContext<D>) => ComponentChildren;\n\n /**\n * Viewport configuration including specifying the element which is used to determine what range\n * of data to render\n */\n viewportConfig: ViewportConfig;\n\n /**\n * Whether there are still more data to load. Internally, LoadMoreCollection will render the load\n * more indicator at the bottom if this is true\n */\n hasMore: boolean;\n\n /**\n * Callback function to handle when user scrolls to the end of the component and there are more items to load.\n * The function should update data prop on the component to include the next set of items fetched.\n */\n onLoadMore: () => void;\n\n /**\n * Optionally specify the custom load more indicator\n */\n loadMoreIndicator?: ComponentChildren;\n\n /**\n * Optionally provide the suggestion indicator sparkle\n */\n suggestions?: ComponentChildren;\n\n /**\n * Optionally specify how far in pixel from the bottom should load more occurs\n */\n loadMoreThreshold?: number;\n};\n\nexport const LOADMORE_STYLE_CLASS = 'oj-collection-loadmore';\n\nconst DEFAULT_MARGIN = 1;\nconst LOAD_MORE_SELECTOR = `.${LOADMORE_STYLE_CLASS}`;\n\n/**\n * Component that only render items in the specified viewport.\n * @param props\n */\nexport function LoadMoreCollection<D>({\n data,\n children,\n viewportConfig,\n hasMore,\n onLoadMore,\n loadMoreIndicator,\n suggestions,\n loadMoreThreshold = DEFAULT_MARGIN\n}: Props<D>) {\n // detect if viewport has changed and it needs to re-render based on a new range\n useViewportIntersect(\n viewportConfig,\n Math.max(loadMoreThreshold, DEFAULT_MARGIN),\n 0,\n LOAD_MORE_SELECTOR,\n () => {\n if (data) {\n onLoadMore();\n }\n }\n );\n\n // if DataState is invalid (including not specified), just render blank\n if (!data) {\n return <div />;\n }\n\n // might need to support elementType prop in the future to allow customization of what\n // type of element to render for the root\n return (\n <Fragment>\n {suggestions}\n <Collection items={data}>{children}</Collection>\n {hasMore && loadMoreIndicator}\n </Fragment>\n );\n}\n"],"names":["LOADMORE_STYLE_CLASS","LOAD_MORE_SELECTOR","data","children","viewportConfig","hasMore","onLoadMore","loadMoreIndicator","suggestions","loadMoreThreshold","useViewportIntersect","Math","max","_jsxs","Fragment","_jsx","jsx","Collection","items"],"mappings":"6IA4Da,MAAAA,EAAuB,yBAG9BC,EAAqB,IAAID,kDAMzB,UAAgCE,KACpCA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,QACdA,EAAOC,WACPA,EAAUC,kBACVA,EAAiBC,YACjBA,EAAWC,kBACXA,EAfqB,IA+BrB,OAbAC,uBACEN,EACAO,KAAKC,IAAIH,EApBU,GAqBnB,EACAR,GACA,KACMC,GACFI,GACD,IAKAJ,EAOHW,EAAAA,KAACC,EAAAA,SAAQ,CAAAX,SAAA,CACNK,EACDO,EAAAC,IAACC,aAAW,CAAAC,MAAOhB,EAAIC,SAAGA,IACzBE,GAAWE,KATPQ,eAYX"}
1
+ {"version":3,"file":"LoadMoreCollection-83413a59.js","sources":["../../src/PRIVATE_LoadMoreCollection/LoadMoreCollection.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentChildren, Fragment } from 'preact';\nimport { ItemContext } from '../UNSAFE_Collection';\nimport { Collection } from '../PRIVATE_Collection';\nimport { useViewportIntersect, ViewportConfig } from '../hooks/UNSAFE_useViewportIntersect';\n\n/**\n * Props for the LoadMoreCollection component\n */\ntype Props<D> = {\n /**\n * A DataState object that provide information including data and metadata to the LoadMoreCollection.\n */\n data: D[] | null;\n\n /**\n * Renderer callback used to render each item\n */\n children: (context: ItemContext<D>) => ComponentChildren;\n\n /**\n * Viewport configuration including specifying the element which is used to determine what range\n * of data to render\n */\n viewportConfig: ViewportConfig;\n\n /**\n * Whether there are still more data to load. Internally, LoadMoreCollection will render the load\n * more indicator at the bottom if this is true\n */\n hasMore: boolean;\n\n /**\n * Callback function to handle when user scrolls to the end of the component and there are more items to load.\n * The function should update data prop on the component to include the next set of items fetched.\n */\n onLoadMore: () => void;\n\n /**\n * Optionally specify the custom load more indicator\n */\n loadMoreIndicator?: ComponentChildren;\n\n /**\n * Optionally provide the suggestion indicator sparkle\n */\n suggestions?: ComponentChildren;\n\n /**\n * Optionally specify how far in pixel from the bottom should load more occurs\n */\n loadMoreThreshold?: number;\n};\n\nexport const LOADMORE_STYLE_CLASS = 'oj-collection-loadmore';\n\nconst DEFAULT_MARGIN = 1;\nconst LOAD_MORE_SELECTOR = `.${LOADMORE_STYLE_CLASS}`;\n\n/**\n * Component that only render items in the specified viewport.\n * @param props\n */\nexport function LoadMoreCollection<D>({\n data,\n children,\n viewportConfig,\n hasMore,\n onLoadMore,\n loadMoreIndicator,\n suggestions,\n loadMoreThreshold = DEFAULT_MARGIN\n}: Props<D>) {\n // detect if viewport has changed and it needs to re-render based on a new range\n useViewportIntersect(\n viewportConfig,\n Math.max(loadMoreThreshold, DEFAULT_MARGIN),\n 0,\n LOAD_MORE_SELECTOR,\n () => {\n if (data) {\n onLoadMore();\n }\n }\n );\n\n // if DataState is invalid (including not specified), just render blank\n if (!data) {\n return <div />;\n }\n\n // might need to support elementType prop in the future to allow customization of what\n // type of element to render for the root\n return (\n <Fragment>\n {suggestions}\n <Collection items={data}>{children}</Collection>\n {hasMore && loadMoreIndicator}\n </Fragment>\n );\n}\n"],"names":["LOADMORE_STYLE_CLASS","LOAD_MORE_SELECTOR","data","children","viewportConfig","hasMore","onLoadMore","loadMoreIndicator","suggestions","loadMoreThreshold","useViewportIntersect","Math","max","_jsxs","Fragment","_jsx","jsx","Collection","items"],"mappings":"6IA4Da,MAAAA,EAAuB,yBAG9BC,EAAqB,IAAID,kDAMzB,UAAgCE,KACpCA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,QACdA,EAAOC,WACPA,EAAUC,kBACVA,EAAiBC,YACjBA,EAAWC,kBACXA,EAfqB,IA+BrB,OAbAC,uBACEN,EACAO,KAAKC,IAAIH,EApBU,GAqBnB,EACAR,GACA,KACMC,GACFI,GACD,IAKAJ,EAOHW,EAAAA,KAACC,EAAAA,SAAQ,CAAAX,SAAA,CACNK,EACDO,EAAAC,IAACC,aAAW,CAAAC,MAAOhB,EAAIC,SAAGA,IACzBE,GAAWE,KATPQ,eAYX"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', './useDebounce-8b4d8cfb', './useTranslationBundle-d07d4b20', './LiveRegion-9a362373'], (function(e,n,t,i,o){"use strict";e.MaxLengthLiveRegion=function({maxLength:e,testId:a,valueLength:r=0}){const s=t.useDebounce(e-r,500),u=i.useTranslationBundle("@oracle/oraclejet-preact").formControl_maxLengthRemaining({CHARACTER_COUNT:`${s}`});return n.jsx(o.LiveRegion,{testId:a,children:u})}}));
2
+ //# sourceMappingURL=MaxLengthLiveRegion-bb956138.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MaxLengthLiveRegion-8954fc30.js","sources":["../../src/UNSAFE_TextField/MaxLengthLiveRegion.tsx"],"sourcesContent":["import { useDebounce } from '../hooks/UNSAFE_useDebounce';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\n\ntype Props = TestIdProps & {\n maxLength: number;\n valueLength?: number;\n};\n\nconst MAX_LENGTH_UPDATE_DELAY = 500;\n\nexport function MaxLengthLiveRegion({ maxLength, testId, valueLength = 0 }: Props) {\n // Comment copied from InputBase.js in Big JET:\n // Only update the aria-live div when the user has paused for more than\n // 500 milliseconds. That way, we avoid queued up aria-live messages which\n // would be annoying and not helpful. The 500ms was agreed upon in the\n // accessibility review meeting.\n const debouncedRemainingChars = useDebounce(maxLength - valueLength, MAX_LENGTH_UPDATE_DELAY);\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const remainingCharsTranslatedString = translations.formControl_maxLengthRemaining({\n CHARACTER_COUNT: `${debouncedRemainingChars}`\n });\n\n return <LiveRegion testId={testId}>{remainingCharsTranslatedString}</LiveRegion>;\n}\n"],"names":["maxLength","testId","valueLength","debouncedRemainingChars","useDebounce","remainingCharsTranslatedString","useTranslationBundle","formControl_maxLengthRemaining","CHARACTER_COUNT","_jsx","LiveRegion","children"],"mappings":"mLAaM,UAA8BA,UAAEA,EAASC,OAAEA,EAAMC,YAAEA,EAAc,IAMrE,MAAMC,EAA0BC,EAAWA,YAACJ,EAAYE,EAR1B,KAUxBG,EADeC,uBAAiC,4BACFC,+BAA+B,CACjFC,gBAAiB,GAAGL,MAGtB,OAAOM,EAAAA,IAACC,EAAAA,WAAW,CAAAT,OAAQA,EAAMU,SAAGN,GACtC"}
1
+ {"version":3,"file":"MaxLengthLiveRegion-bb956138.js","sources":["../../src/UNSAFE_TextField/MaxLengthLiveRegion.tsx"],"sourcesContent":["import { useDebounce } from '../hooks/UNSAFE_useDebounce';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\n\ntype Props = TestIdProps & {\n maxLength: number;\n valueLength?: number;\n};\n\nconst MAX_LENGTH_UPDATE_DELAY = 500;\n\nexport function MaxLengthLiveRegion({ maxLength, testId, valueLength = 0 }: Props) {\n // Comment copied from InputBase.js in Big JET:\n // Only update the aria-live div when the user has paused for more than\n // 500 milliseconds. That way, we avoid queued up aria-live messages which\n // would be annoying and not helpful. The 500ms was agreed upon in the\n // accessibility review meeting.\n const debouncedRemainingChars = useDebounce(maxLength - valueLength, MAX_LENGTH_UPDATE_DELAY);\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const remainingCharsTranslatedString = translations.formControl_maxLengthRemaining({\n CHARACTER_COUNT: `${debouncedRemainingChars}`\n });\n\n return <LiveRegion testId={testId}>{remainingCharsTranslatedString}</LiveRegion>;\n}\n"],"names":["maxLength","testId","valueLength","debouncedRemainingChars","useDebounce","remainingCharsTranslatedString","useTranslationBundle","formControl_maxLengthRemaining","CHARACTER_COUNT","_jsx","LiveRegion","children"],"mappings":"mLAaM,UAA8BA,UAAEA,EAASC,OAAEA,EAAMC,YAAEA,EAAc,IAMrE,MAAMC,EAA0BC,EAAWA,YAACJ,EAAYE,EAR1B,KAUxBG,EADeC,uBAAiC,4BACFC,+BAA+B,CACjFC,gBAAiB,GAAGL,MAGtB,OAAOM,EAAAA,IAACC,EAAAA,WAAW,CAAAT,OAAQA,EAAMU,SAAGN,GACtC"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact/compat', './Dropdown-4b421eff', 'preact/hooks', './mergeProps-bcfa6a92', './classNames-08d99695', './useUser-85c781ea', './MenuItem-87cd59b8', './UNSAFE_Menu/themes/MenuStyles.css', './useTestId-3a316499', './UNSAFE_Menu/themes/DropdownMenuStyles.css', './Sheet-46782f99', './useModal-536cb7ff', './Layer-447c68e6', './LayerHost-e95c5f30', './UNSAFE_Menu/themes/SheetMenuStyles.css'], (function(e,n,s,t,o,r,a,u,l,c,i,d,m,f,p,h,b){"use strict";const y=({children:e,"aria-label":s,currentFocus:t="menu",display:d,closeSubmenu:m,menuId:f,menuLevel:p,anchorRef:h})=>{const{onClose:b,testId:y}=l.useMenuContext(),{direction:v}=u.useUser(),x=o.useRef(null),k=o.useRef({wasMouseMoved:!1,lastMouseLeaveMenuItemdRelatedTarget:null}),[C,S]=o.useState(),[g,w]=o.useState(!1),[j,E]=o.useState(!1),F=o.useCallback((e=>{S(e.key),"keyboard"===e.reason?w(!0):w(!1)}),[]),I=o.useCallback((()=>{const e=n=>{const s=l.keyElemExtractor(n.target),t=s?.key,o=s?.elem;if(t&&o){k.current.wasMouseMoved=!0;const n=new MouseEvent("mouseenter");o.dispatchEvent(n),x.current?.removeEventListener("mousemove",e)}};x.current?.addEventListener("mousemove",e)}),[]),{currentKeyProps:L}=function(e,n,s,t,r){const a=o.useMemo((()=>({ArrowDown:n,ArrowUp:e,Home:s,End:t})),[n,e,s,t]),u=o.useCallback((e=>{if(r){const n=a[e.key];if(n&&!e.shiftKey){const s=n();s&&r({key:s,reason:"keyboard"}),e.preventDefault()}}}),[r,a]);return{currentKeyProps:null==r?{}:{onKeyDown:u}}}(l.getPrevNext(x.current,!0,C),l.getPrevNext(x.current,!1,C),(()=>l.getNVisible(x.current,0)),(()=>l.getLastVisible(x.current)),F);o.useEffect((()=>{const e=x.current;let n;if("none"!==t&&e)if("menu"===t){F({key:void 0,reason:"click"});const s=()=>{e.focus()};"sheet"===d?s():n=setTimeout((()=>{s()}),M)}else if("firstItem"===t){const e=l.getNVisible(x.current,0);e&&F({key:e,reason:"keyboard"})}else if("secondItem"===t){const e=l.getNVisible(x.current,1);e&&F({key:e,reason:"keyboard"})}return()=>{clearTimeout(n)}}),[F,t,p,d,h]),o.useEffect((()=>{I()}),[I]);const P=i.useTestId(y);return n.jsx("div",{...f&&{id:f},ref:x,tabIndex:C||"main"!==p&&"sheet"!==d?-1:0,role:"menu","aria-label":s,class:a.classNames([c.menuStyles.menuContainerStyle,c.menuStyles[`${d}MenuContainerStyle`]]),...r.mergeProps(L,l.getKeyboardCloseProps(b,p),l.getCloseSubmenuEvent(v,m),l.getMenuContainerFocusMethods((()=>{x.current?.contains(document.activeElement)||(w(!1),E(!1))}),(()=>{E(!0)})),l.getMenuContainerMouseLeave((e=>{e.relatedTarget&&e.relatedTarget.isEqualNode(k.current.lastMouseLeaveMenuItemdRelatedTarget)||(F({key:void 0,reason:"mouseEnter"}),x.current?.focus())})),l.getMenuPointerDown()),...P,children:n.jsx(l.MenuContainerContext.Provider,{value:{menuContainerRef:x,currentKey:C,showFocusRing:g,changeKey:F,menuContainerGeneralInformation:k,isContainerFocused:j},children:e})})},M=0,v=s.forwardRef((({anchorRef:e,defaultPlacement:o,offsetValue:r,closeSubmenu:a,children:u,"aria-label":c,currentFocus:i,menuId:m,menuLevel:f,flipOptions:p,isOpen:h},b)=>{const{onClose:M}=l.useMenuContext(),v=s.useCallback((e=>{if("sub"!==f&&"outsideMousedown"===e.reason){const n=l.keyElemExtractor(e.target)?.key;n||M?.({reason:"outsideClick",target:e.target})}}),[M,f]);return n.jsx(t.Dropdown,{onClose:v,isOpen:h,placement:o,anchorRef:e,flipOptions:p,offset:r,shiftOptions:{mainAxis:!1,crossAxis:!1},children:n.jsx("div",{class:d.dropdownMenuStyles.base,style:{minWidth:x},ref:b,children:n.jsx(y,{menuLevel:f,closeSubmenu:a,"aria-label":c,currentFocus:i,menuId:m,display:"dropdown",anchorRef:e,children:u})})})})),x=200,k=({children:e})=>n.jsx("div",{class:b.sheetMenuStyles.modalWrapper,children:e}),C=s.forwardRef((({children:e},s)=>n.jsx("div",{class:b.sheetMenuStyles.modalContainer,ref:s,children:e}))),S=({backdropVisible:e=!1})=>n.jsx("div",{class:a.classNames([b.sheetMenuStyles.modalBackdrop,e&&b.sheetMenuStyles.modalBackdropVisible])}),g=({children:e,"aria-label":s,currentFocus:t,anchorRef:r,closeSubmenu:a,menuLevel:u})=>{const{onClose:c}=l.useMenuContext();o.useEffect((()=>{const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]);const i=o.useCallback((()=>{c?.({reason:"dismissed"})}),[c]),{backdropRef:d}=f.useModal({isOpen:!0,onBackdropClick:i}),{swipeProps:h}=m.useSheetSwipe(i);return n.jsx(p.Layer,{logicalParentRef:r,children:n.jsxs(k,{children:[n.jsx(S,{backdropVisible:"main"===u}),n.jsx(C,{ref:d,children:n.jsx("div",{class:b.sheetMenuStyles.sheetMenuContainerWrapper,...h,children:n.jsx(y,{"aria-label":s,currentFocus:t,display:"sheet",closeSubmenu:a,menuLevel:u,children:e})})})]})})},w=l.getIsMobile();e.DropdownMenu=v,e.Menu=({onClose:e,isOpen:s,testId:t,initialFocus:o="menu",placement:r,offsetValue:a,...u})=>n.jsx(l.MenuContext.Provider,{value:{onClose:e,isMobile:w,testId:t},children:n.jsx(n.Fragment,{children:w?n.jsx(n.Fragment,{children:s?n.jsx(g,{...u,currentFocus:o,menuLevel:"main"}):null}):n.jsx(v,{...u,isOpen:s,currentFocus:o,menuLevel:"main",defaultPlacement:r,offsetValue:a,flipOptions:{crossAxis:!0,mainAxis:!0,fallbackPlacements:["bottom-start","bottom-end","top-start","top-end","end-top","start-top","end-bottom","start-bottom"]}})})}),e.SheetMenu=g}));
1
+ define(['exports', 'preact/jsx-runtime', 'preact/compat', './Dropdown-abcacf49', 'preact/hooks', './mergeProps-bcfa6a92', './classNames-08d99695', './useUser-3ef25571', './MenuItem-87cd59b8', './UNSAFE_Menu/themes/MenuStyles.css', './useTestId-b5cd4766', './UNSAFE_Menu/themes/DropdownMenuStyles.css', './Sheet-0b58b0a5', './useModal-536cb7ff', './Layer-6f29b67f', './LayerHost-639b3284', './UNSAFE_Menu/themes/SheetMenuStyles.css'], (function(e,n,s,t,o,r,a,u,l,c,i,d,m,f,b,p,h){"use strict";const y=({children:e,"aria-label":s,currentFocus:t="menu",display:d,closeSubmenu:m,menuId:f,menuLevel:b,anchorRef:p})=>{const{onClose:h,testId:y}=l.useMenuContext(),{direction:v}=u.useUser(),x=o.useRef(null),k=o.useRef({wasMouseMoved:!1,lastMouseLeaveMenuItemdRelatedTarget:null}),[C,S]=o.useState(),[g,w]=o.useState(!1),[j,E]=o.useState(!1),F=o.useCallback((e=>{S(e.key),"keyboard"===e.reason?w(!0):w(!1)}),[]),I=o.useCallback((()=>{const e=n=>{const s=l.keyElemExtractor(n.target),t=s?.key,o=s?.elem;if(t&&o){k.current.wasMouseMoved=!0;const n=new MouseEvent("mouseenter");o.dispatchEvent(n),x.current?.removeEventListener("mousemove",e)}};x.current?.addEventListener("mousemove",e)}),[]),{currentKeyProps:L}=function(e,n,s,t,r){const a=o.useMemo((()=>({ArrowDown:n,ArrowUp:e,Home:s,End:t})),[n,e,s,t]),u=o.useCallback((e=>{if(r){const n=a[e.key];if(n&&!e.shiftKey){const s=n();s&&r({key:s,reason:"keyboard"}),e.preventDefault()}}}),[r,a]);return{currentKeyProps:null==r?{}:{onKeyDown:u}}}(l.getPrevNext(x.current,!0,C),l.getPrevNext(x.current,!1,C),(()=>l.getNVisible(x.current,0)),(()=>l.getLastVisible(x.current)),F);o.useEffect((()=>{const e=x.current;let n;if("none"!==t&&e)if("menu"===t){F({key:void 0,reason:"click"});const s=()=>{e.focus()};"sheet"===d?s():n=setTimeout((()=>{s()}),M)}else if("firstItem"===t){const e=l.getNVisible(x.current,0);e&&F({key:e,reason:"keyboard"})}else if("secondItem"===t){const e=l.getNVisible(x.current,1);e&&F({key:e,reason:"keyboard"})}return()=>{clearTimeout(n)}}),[F,t,b,d,p]),o.useEffect((()=>{I()}),[I]);const P=i.useTestId(y);return n.jsx("div",{...f&&{id:f},ref:x,tabIndex:C||"main"!==b&&"sheet"!==d?-1:0,role:"menu","aria-label":s,class:a.classNames([c.menuStyles.menuContainerStyle,c.menuStyles[`${d}MenuContainerStyle`]]),...r.mergeProps(L,l.getKeyboardCloseProps(h,b),l.getCloseSubmenuEvent(v,m),l.getMenuContainerFocusMethods((()=>{x.current?.contains(document.activeElement)||(w(!1),E(!1))}),(()=>{E(!0)})),l.getMenuContainerMouseLeave((e=>{e.relatedTarget&&e.relatedTarget.isEqualNode(k.current.lastMouseLeaveMenuItemdRelatedTarget)||(F({key:void 0,reason:"mouseEnter"}),x.current?.focus())})),l.getMenuPointerDown()),...P,children:n.jsx(l.MenuContainerContext.Provider,{value:{menuContainerRef:x,currentKey:C,showFocusRing:g,changeKey:F,menuContainerGeneralInformation:k,isContainerFocused:j},children:e})})},M=0,v=s.forwardRef((({anchorRef:e,defaultPlacement:o,offsetValue:r,closeSubmenu:a,children:u,"aria-label":c,currentFocus:i,menuId:m,menuLevel:f,flipOptions:b,isOpen:p},h)=>{const{onClose:M}=l.useMenuContext(),v=s.useCallback((e=>{if("sub"!==f&&"outsideMousedown"===e.reason){const n=l.keyElemExtractor(e.target)?.key;n||M?.({reason:"outsideClick",target:e.target})}}),[M,f]);return n.jsx(t.Dropdown,{onClose:v,isOpen:p,placement:o,anchorRef:e,flipOptions:b,offset:r,shiftOptions:{mainAxis:!1,crossAxis:!1},children:n.jsx("div",{class:d.dropdownMenuStyles.base,style:{minWidth:x},ref:h,children:n.jsx(y,{menuLevel:f,closeSubmenu:a,"aria-label":c,currentFocus:i,menuId:m,display:"dropdown",anchorRef:e,children:u})})})})),x=200,k=({children:e})=>n.jsx("div",{class:h.sheetMenuStyles.modalWrapper,children:e}),C=s.forwardRef((({children:e},s)=>n.jsx("div",{class:h.sheetMenuStyles.modalContainer,ref:s,children:e}))),S=({backdropVisible:e=!1})=>n.jsx("div",{class:a.classNames([h.sheetMenuStyles.modalBackdrop,e&&h.sheetMenuStyles.modalBackdropVisible])}),g=({children:e,"aria-label":s,currentFocus:t,anchorRef:r,closeSubmenu:a,menuLevel:u})=>{const{onClose:c}=l.useMenuContext();o.useEffect((()=>{const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]);const i=o.useCallback((()=>{c?.({reason:"dismissed"})}),[c]),{backdropRef:d}=f.useModal({isOpen:!0,onBackdropClick:i}),{swipeProps:p}=m.useSheetSwipe(i);return n.jsx(b.Layer,{logicalParentRef:r,children:n.jsxs(k,{children:[n.jsx(S,{backdropVisible:"main"===u}),n.jsx(C,{ref:d,children:n.jsx("div",{class:h.sheetMenuStyles.sheetMenuContainerWrapper,...p,children:n.jsx(y,{"aria-label":s,currentFocus:t,display:"sheet",closeSubmenu:a,menuLevel:u,children:e})})})]})})},w=l.getIsMobile();e.DropdownMenu=v,e.Menu=({onClose:e,isOpen:s,testId:t,initialFocus:o="menu",placement:r,offsetValue:a,...u})=>n.jsx(l.MenuContext.Provider,{value:{onClose:e,isMobile:w,testId:t},children:n.jsx(n.Fragment,{children:w?n.jsx(n.Fragment,{children:s?n.jsx(g,{...u,currentFocus:o,menuLevel:"main"}):null}):n.jsx(v,{...u,isOpen:s,currentFocus:o,menuLevel:"main",defaultPlacement:r,offsetValue:a,flipOptions:{crossAxis:!0,mainAxis:!0,fallbackPlacements:["bottom-start","bottom-end","top-start","top-end","end-top","start-top","end-bottom","start-bottom"]}})})}),e.SheetMenu=g}));
2
2
  //# sourceMappingURL=Menu-5d447084.js.map
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './ButtonLabelLayout-2e0e8d09', './ChevronDown-64f938c5', './Menu-5d447084', './MenuItem-87cd59b8', 'preact/hooks', 'preact', './mergeProps-bcfa6a92', './logger-0f873e29', './LayerHost-e95c5f30', 'preact/compat', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-69ce0a2d', 'css!./IconStyle.styles.css', './SelectMenuGroupContext-67f24a8f', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./MenuSeparatorStyles.styles.css', 'module', './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css', './useMenuAction-700f6c20', './BaseButton-19a622bc'], (function(e,t,o,s,n,a,r,u,i,l,c,d,p,h,M,f,m,y,b,S,T,g,B,x){"use strict";const v=d.forwardRef((({children:e,label:a,suffix:l,variant:c="outlined",isDisabled:d=!1,isMenuOpen:p=!1,onToggleMenu:h,size:M="md",type:f="button",width:m,icon:y,testId:b,"aria-describedby":S,onBlur:T,onFocus:g,onMouseEnter:v,onMouseLeave:w,onTouchEnd:E,onTouchStart:F},A)=>{const I=r.useRef(null);r.useImperativeHandle(A,(()=>I.current),[I]);const{triggerProps:L,menuProps:j}=B.useMenuAction({isDisabled:d,onToggleMenu:h,isMenuOpen:p,anchorRef:I}),C={type:"button",buttonType:f},D={onBlur:T,onFocus:g,onMouseEnter:v,onMouseLeave:w,onTouchEnd:E,onTouchStart:F},N=t.jsx(x.BaseButton,{...i.mergeProps(L,D),styling:p?["min","active"]:["min"],elementDetails:C,isDisabled:d,variant:c,width:m,size:M,ref:I,testId:b,"aria-label":l?`${a} ${l}`:a,"aria-describedby":S,children:t.jsx(o.ButtonLabelLayout,{display:"all",suffix:l,startIcon:y,endIcon:t.jsx(s.SvgChevronDown,{}),size:M,children:a})});return d?N:t.jsxs(u.Fragment,{children:[N,t.jsx(n.Menu,{...j,"aria-label":a,offsetValue:4,children:e})]})}));v.displayName="MenuButton",e.MenuButton=v}));
1
+ define(['exports', 'preact/jsx-runtime', './ButtonLabelLayout-2e0e8d09', './ChevronDown-64f938c5', './Menu-5d447084', './MenuItem-87cd59b8', 'preact/hooks', 'preact', './mergeProps-bcfa6a92', './logger-0f873e29', './LayerHost-639b3284', 'preact/compat', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-e5bdb734', 'css!./IconStyle.styles.css', './SelectMenuGroupContext-67f24a8f', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./MenuSeparatorStyles.styles.css', 'module', './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css', './useMenuAction-700f6c20', './BaseButton-19a622bc'], (function(e,t,o,s,n,a,r,u,i,l,c,d,p,h,b,M,m,y,f,S,T,g,B,x){"use strict";const v=d.forwardRef((({children:e,label:a,suffix:l,variant:c="outlined",isDisabled:d=!1,isMenuOpen:p=!1,onToggleMenu:h,size:b="md",type:M="button",width:m,icon:y,testId:f,"aria-describedby":S,onBlur:T,onFocus:g,onMouseEnter:v,onMouseLeave:w,onTouchEnd:E,onTouchStart:F},A)=>{const I=r.useRef(null);r.useImperativeHandle(A,(()=>I.current),[I]);const{triggerProps:L,menuProps:j}=B.useMenuAction({isDisabled:d,onToggleMenu:h,isMenuOpen:p,anchorRef:I}),C={type:"button",buttonType:M},D={onBlur:T,onFocus:g,onMouseEnter:v,onMouseLeave:w,onTouchEnd:E,onTouchStart:F},N=t.jsx(x.BaseButton,{...i.mergeProps(L,D),styling:p?["min","active"]:["min"],elementDetails:C,isDisabled:d,variant:c,width:m,size:b,ref:I,testId:f,"aria-label":l?`${a} ${l}`:a,"aria-describedby":S,children:t.jsx(o.ButtonLabelLayout,{display:"all",suffix:l,startIcon:y,endIcon:t.jsx(s.SvgChevronDown,{}),size:b,children:a})});return d?N:t.jsxs(u.Fragment,{children:[N,t.jsx(n.Menu,{...j,"aria-label":a,offsetValue:4,children:e})]})}));v.displayName="MenuButton",e.MenuButton=v}));
2
2
  //# sourceMappingURL=MenuButton-410aa4e1.js.map
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact/hooks', './Text-cd61a065', './classNames-08d99695', './useId-c9578d26', './mergeProps-bcfa6a92', './usePress-949a0d03', './useUser-85c781ea', './useComponentTheme-5aa41a8f', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './useInteractionStyle-76a64325', 'preact', 'preact/compat', './clientHints-4f5a07b0', './useToggle-a29f97af', './UNSAFE_Menu/themes/redwood/MenuItemTheme'], (function(e,n,t,o,r,s,a,u,i,l,c,d,m,p,f,g,y,h){"use strict";const C=e=>e.dataset.ojMenuItemKey,M=e=>{const n=e.closest("[data-oj-menu-item-key]");if(n){const e=C(n);return void 0===e?null:{key:e,elem:n}}return null},b=(e,n)=>{if(!n)return{};return{onKeyDown:t=>{"ltr"===e?"ArrowRight"===t.key&&n?.():"ArrowLeft"===t.key&&n?.()}}},v=p.createContext({isMobile:!1,onClose:()=>null,testId:""});function x(){return t.useContext(v)}const I=p.createContext({menuContainerRef:{current:null},currentKey:void 0,showFocusRing:!1,changeKey:()=>{},isContainerFocused:!1,menuContainerGeneralInformation:{current:{wasMouseMoved:!1,lastMouseLeaveMenuItemdRelatedTarget:null}}});function k(){return t.useContext(I)}const w=f.forwardRef((({id:e,label:s,onAction:p,startIcon:f,endIcon:g,role:C,isChecked:M,isDisabled:v=!1,variant:I="standard",type:w,hoverInfo:j,openSubmenu:S,menuItemLabelWeight:T="normal",isSubmenuOpen:P,submenuId:R,submenuRef:E,itemKey:F},L)=>{const{onClose:A}=x(),{currentKey:D,changeKey:K,showFocusRing:N,menuContainerRef:U,menuContainerGeneralInformation:O,isContainerFocused:q}=k(),B=t.useRef(null),{direction:G}=i.useUser(),H=D===e,V=t.useCallback((e=>{"submenu"!==w&&A?.({reason:"itemAction"}),p?.(e)}),[w,A,p]),{hoverProps:z}=function(e){const{bool:n,setTrue:t,setFalse:o}=y.useToggle(!1);return{hoverProps:{ontouchend:t,onMouseEnter:t=>{n?o():e.onMouseEnter(t)},onMouseLeave:n=>{e.onMouseLeave(n)}}}}({onMouseEnter:n=>{j?.hoverStatus.current.recentClose||j?.hoverStatus.current.pendingUnhover||(j&&O.current.wasMouseMoved&&(j.hoverStatus.current.pendingUnhover=!0),O.current.wasMouseMoved&&(j?.hoverProps.onMouseEnter(n),K({key:e,reason:"mouseEnter"})))},onMouseLeave:e=>{j&&(j.hoverStatus.current.pendingUnhover=!1),(U.current?.contains(e.relatedTarget)||E?.current?.parentElement?.contains(e.relatedTarget))&&(O.current.lastMouseLeaveMenuItemdRelatedTarget=e.relatedTarget)}}),{pressProps:W}=u.usePress(V,{isDisabled:v});t.useLayoutEffect((()=>{H&&B.current?.focus()}),[H]);const{interactionProps:$}=m.useInteractionStyle({isDisabled:v}),{classes:_,styles:{iconLabelContainer:J,iconContainer:Q,startIconContainer:X,labelContainer:Y,endIconContainer:Z}}=l.useComponentTheme(h.MenuItemRedwoodTheme,{current:H?"isCurrent":"notCurrent",focusRing:N?"isFocusRing":"notFocusRing",variant:v?"disabled":I,containerFocused:q?"isContainerFocused":"notContainerFocused",submenuOpen:P?"isSubmenuOpen":"notSubmenuOpen"}),ee=c.mergeInterpolations([...Object.values(d.flexitemInterpolations)]),{class:ne,...te}=ee({flex:"1 1 auto",alignSelf:"center"}),{class:oe,...re}=ee({flex:"0 0 auto",alignSelf:"center"}),se=r.classNames([oe,J,Q,X]),ae=r.classNames([ne,J,Y]),ue=r.classNames([oe,J,Q,Z]);return n.jsx("div",{role:"presentation",...void 0!==R&&"submenu"===w&&{"aria-owns":R},children:n.jsxs("a",{ref:e=>{B.current=e,"function"==typeof L?L(e):L&&(L.current=e)},"data-oj-label":s,"data-oj-key":F,class:_,...a.mergeProps($,z,W,b(G,S),(ie=e,le=K,{onClick:()=>{le({key:ie,reason:"click"})}})),role:C,"data-oj-menu-item-key":e,..."submenu"===w&&{"aria-haspopup":!0,"aria-expanded":"bold"===T||!!P},...v&&{"aria-disabled":!0},..."select"===w&&{"aria-checked":!!M},tabIndex:H?0:-1,children:[f&&n.jsx("span",{style:re,class:se,children:f}),n.jsx("span",{style:te,class:ae,children:n.jsx(o.Text,{variant:"inherit",size:"md",weight:T,children:s})}),g&&n.jsx("span",{style:re,class:ue,children:g})]})});var ie,le}));e.BaseMenuItem=w,e.MenuContainerContext=I,e.MenuContext=v,e.MenuItem=function(e){const o=s.useId(),r=t.useMemo((()=>`oj-menu-item-${o}`),[o]);return n.jsx(w,{...e,role:"menuitem",type:"simple",id:r})},e.getCloseSubmenuEvent=(e,n)=>{if(!n)return{};return{onKeyDown:t=>{("Escape"===t.key||"ltr"===e&&"ArrowLeft"===t.key||"rtl"===e&&"ArrowRight"===t.key)&&(t.stopPropagation(),n?.())}}},e.getIsMobile=()=>{const{deviceType:e}=g.getClientHints();return"phone"===e},e.getKeyboardCloseProps=(e,n)=>({onKeyDown:t=>{"Tab"===t.key?(t.stopPropagation(),e?.({reason:"dismissed"}),t.preventDefault()):"Escape"===t.key&&"main"===n&&(t.stopPropagation(),e?.({reason:"dismissed"}))}}),e.getLastVisible=e=>{if(e){const n=e.querySelectorAll("[data-oj-menu-item-key]"),t=n[n.length-1];if(t){const e=C(t);if(e)return e}}return null},e.getMenuContainerFocusMethods=(e,n)=>({onBlur:()=>{setTimeout((()=>{e()}),100)},onFocus:()=>{n()}}),e.getMenuContainerMouseLeave=e=>({onMouseLeave:n=>{e(n)}}),e.getMenuPointerDown=()=>({onPointerDown:e=>{const n=M(e.target);n?.key||e.preventDefault()}}),e.getNVisible=(e,n)=>{if(e){const t=e.querySelectorAll("[data-oj-menu-item-key]")[n];if(t){const e=C(t);if(e)return e}}return null},e.getPrevNext=(e,n,t)=>()=>{if(e){const o=Array.from(e.querySelectorAll("[data-oj-menu-item-key]"));let r=o.findIndex((e=>C(e)===t))+(n?-1:1);const s=o.length-1;r<0&&(r=s),r>s&&(r=0);const a=C(o[r]);return a||null}return null},e.keyElemExtractor=M,e.useMenuContainerContext=k,e.useMenuContext=x}));
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './Text-cd61a065', './classNames-08d99695', './useId-c9578d26', './mergeProps-bcfa6a92', './usePress-949a0d03', './useUser-3ef25571', './useComponentTheme-5aa41a8f', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './useInteractionStyle-76a64325', 'preact', 'preact/compat', './clientHints-4f5a07b0', './useToggle-a29f97af', './UNSAFE_Menu/themes/redwood/MenuItemTheme'], (function(e,n,t,o,r,s,a,u,i,l,c,d,m,p,f,g,y,h){"use strict";const C=e=>e.dataset.ojMenuItemKey,M=e=>{const n=e.closest("[data-oj-menu-item-key]");if(n){const e=C(n);return void 0===e?null:{key:e,elem:n}}return null},b=(e,n)=>{if(!n)return{};return{onKeyDown:t=>{"ltr"===e?"ArrowRight"===t.key&&n?.():"ArrowLeft"===t.key&&n?.()}}},v=p.createContext({isMobile:!1,onClose:()=>null,testId:""});function x(){return t.useContext(v)}const I=p.createContext({menuContainerRef:{current:null},currentKey:void 0,showFocusRing:!1,changeKey:()=>{},isContainerFocused:!1,menuContainerGeneralInformation:{current:{wasMouseMoved:!1,lastMouseLeaveMenuItemdRelatedTarget:null}}});function k(){return t.useContext(I)}const w=f.forwardRef((({id:e,label:s,onAction:p,startIcon:f,endIcon:g,role:C,isChecked:M,isDisabled:v=!1,variant:I="standard",type:w,hoverInfo:j,openSubmenu:S,menuItemLabelWeight:T="normal",isSubmenuOpen:P,submenuId:R,submenuRef:E,itemKey:F},L)=>{const{onClose:A}=x(),{currentKey:D,changeKey:K,showFocusRing:N,menuContainerRef:U,menuContainerGeneralInformation:O,isContainerFocused:q}=k(),B=t.useRef(null),{direction:G}=i.useUser(),H=D===e,V=t.useCallback((e=>{"submenu"!==w&&A?.({reason:"itemAction"}),p?.(e)}),[w,A,p]),{hoverProps:z}=function(e){const{bool:n,setTrue:t,setFalse:o}=y.useToggle(!1);return{hoverProps:{ontouchend:t,onMouseEnter:t=>{n?o():e.onMouseEnter(t)},onMouseLeave:n=>{e.onMouseLeave(n)}}}}({onMouseEnter:n=>{j?.hoverStatus.current.recentClose||j?.hoverStatus.current.pendingUnhover||(j&&O.current.wasMouseMoved&&(j.hoverStatus.current.pendingUnhover=!0),O.current.wasMouseMoved&&(j?.hoverProps.onMouseEnter(n),K({key:e,reason:"mouseEnter"})))},onMouseLeave:e=>{j&&(j.hoverStatus.current.pendingUnhover=!1),(U.current?.contains(e.relatedTarget)||E?.current?.parentElement?.contains(e.relatedTarget))&&(O.current.lastMouseLeaveMenuItemdRelatedTarget=e.relatedTarget)}}),{pressProps:W}=u.usePress(V,{isDisabled:v});t.useLayoutEffect((()=>{H&&B.current?.focus()}),[H]);const{interactionProps:$}=m.useInteractionStyle({isDisabled:v}),{classes:_,styles:{iconLabelContainer:J,iconContainer:Q,startIconContainer:X,labelContainer:Y,endIconContainer:Z}}=l.useComponentTheme(h.MenuItemRedwoodTheme,{current:H?"isCurrent":"notCurrent",focusRing:N?"isFocusRing":"notFocusRing",variant:v?"disabled":I,containerFocused:q?"isContainerFocused":"notContainerFocused",submenuOpen:P?"isSubmenuOpen":"notSubmenuOpen"}),ee=c.mergeInterpolations([...Object.values(d.flexitemInterpolations)]),{class:ne,...te}=ee({flex:"1 1 auto",alignSelf:"center"}),{class:oe,...re}=ee({flex:"0 0 auto",alignSelf:"center"}),se=r.classNames([oe,J,Q,X]),ae=r.classNames([ne,J,Y]),ue=r.classNames([oe,J,Q,Z]);return n.jsx("div",{role:"presentation",...void 0!==R&&"submenu"===w&&{"aria-owns":R},children:n.jsxs("a",{ref:e=>{B.current=e,"function"==typeof L?L(e):L&&(L.current=e)},"data-oj-label":s,"data-oj-key":F,class:_,...a.mergeProps($,z,W,b(G,S),(ie=e,le=K,{onClick:()=>{le({key:ie,reason:"click"})}})),role:C,"data-oj-menu-item-key":e,..."submenu"===w&&{"aria-haspopup":!0,"aria-expanded":"bold"===T||!!P},...v&&{"aria-disabled":!0},..."select"===w&&{"aria-checked":!!M},tabIndex:H?0:-1,children:[f&&n.jsx("span",{style:re,class:se,children:f}),n.jsx("span",{style:te,class:ae,children:n.jsx(o.Text,{variant:"inherit",size:"md",weight:T,children:s})}),g&&n.jsx("span",{style:re,class:ue,children:g})]})});var ie,le}));e.BaseMenuItem=w,e.MenuContainerContext=I,e.MenuContext=v,e.MenuItem=function(e){const o=s.useId(),r=t.useMemo((()=>`oj-menu-item-${o}`),[o]);return n.jsx(w,{...e,role:"menuitem",type:"simple",id:r})},e.getCloseSubmenuEvent=(e,n)=>{if(!n)return{};return{onKeyDown:t=>{("Escape"===t.key||"ltr"===e&&"ArrowLeft"===t.key||"rtl"===e&&"ArrowRight"===t.key)&&(t.stopPropagation(),n?.())}}},e.getIsMobile=()=>{const{deviceType:e}=g.getClientHints();return"phone"===e},e.getKeyboardCloseProps=(e,n)=>({onKeyDown:t=>{"Tab"===t.key?(t.stopPropagation(),e?.({reason:"dismissed"}),t.preventDefault()):"Escape"===t.key&&"main"===n&&(t.stopPropagation(),e?.({reason:"dismissed"}))}}),e.getLastVisible=e=>{if(e){const n=e.querySelectorAll("[data-oj-menu-item-key]"),t=n[n.length-1];if(t){const e=C(t);if(e)return e}}return null},e.getMenuContainerFocusMethods=(e,n)=>({onBlur:()=>{setTimeout((()=>{e()}),100)},onFocus:()=>{n()}}),e.getMenuContainerMouseLeave=e=>({onMouseLeave:n=>{e(n)}}),e.getMenuPointerDown=()=>({onPointerDown:e=>{const n=M(e.target);n?.key||e.preventDefault()}}),e.getNVisible=(e,n)=>{if(e){const t=e.querySelectorAll("[data-oj-menu-item-key]")[n];if(t){const e=C(t);if(e)return e}}return null},e.getPrevNext=(e,n,t)=>()=>{if(e){const o=Array.from(e.querySelectorAll("[data-oj-menu-item-key]"));let r=o.findIndex((e=>C(e)===t))+(n?-1:1);const s=o.length-1;r<0&&(r=s),r>s&&(r=0);const a=C(o[r]);return a||null}return null},e.keyElemExtractor=M,e.useMenuContainerContext=k,e.useMenuContext=x}));
2
2
  //# sourceMappingURL=MenuItem-87cd59b8.js.map
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact/hooks', './Flex-56ecdf4c', './UNSAFE_MessageBanner/themes/redwood/MessageBannerTheme', './useComponentTheme-5aa41a8f', './timer-571d3748', './classNames-08d99695', './Close-04d8a398', './IconButton-ae9a01ce', './useTranslationBundle-516b1b83', './PRIVATE_Message/themes/MessageStyles.css', 'preact', './MessageFormattingUtils-2e19d8de', './MessagesManager-d5686336', './utils-5077c092'], (function(e,s,a,t,n,r,o,l,i,c,u,m,d,g,y,v){"use strict";function f({onAction:e,variant:a="banner"}){const t=u.useTranslationBundle("@oracle/oraclejet-preact"),n=s.jsx(c.IconButton,{"aria-label":t.message_close(),size:"sm",variant:"borderless",onAction:e,children:s.jsx(i.SvgClose,{})}),r=l.classNames([m.messageCloseButtonStyles.base,m.messageCloseButtonStyles[a]]);return s.jsx("div",{class:r,"data-oj-message-close-button":"",children:n})}function p({item:e,renderer:a}){const t=l.classNames([m.messageStartIconStyles.base,m.messageStartIconStyles.toast,m.messageStartIconStyles.customToast]);return s.jsx("div",{class:t,role:"presentation","data-oj-message-custom-icon":"",children:a(e)})}function x(e){const{detail:a}=e.data;return g.isValidValueForProp(a)?s.jsx(d.Fragment,{children:a}):null}function b({item:e,renderer:a,variant:t="banner"}){const n=null!=a,r=(a??x)(e);if(null==r)return null;const o=l.classNames([m.messageDetailStyles.base,m.messageDetailStyles[t]]);return s.jsx("div",{class:o,...n?{"data-oj-message-custom-detail":""}:{},children:r})}function j({children:e,variant:a="banner"}){const t=l.classNames([m.messageHeaderStyles.base,m.messageHeaderStyles[a]]);return s.jsx("div",{role:"presentation",class:t,children:e})}function S({value:e,variant:a="banner"}){const t=l.classNames([m.messageTimestampStyles[a]]),n=g.formatTimestamp(e);return s.jsx("div",{class:t,children:n})}function h(e){return g.isValidValueForProp(e,"severity")&&"none"!==e}e.Message=function({detailRenderer:e,iconRenderer:i,item:c,onClose:u,messageRef:d=(()=>{}),variant:x="pageBanner"}){const{closeAffordance:C="on",severity:B="error",sound:M,summary:T,timestamp:k}=c.data,{autoTimeout:F="off"}=c.data,I=function(e){return"pageBanner"===e||"sectionBanner"===e?"banner":"toast"}(x),N=a.useCallback((()=>{u?.(c)}),[c,u]),V=a.useCallback((e=>{"Escape"===e.key&&"on"===C&&u?.(c)}),[C,c,u]),A="toast"===I&&"off"!==F,R=a.useRef(),P="on"===F?5e3:"number"==typeof F?F:5e3,E=a.useCallback((()=>{R.current||(R.current=new o.Timer(N,P))}),[N,P]),U=a.useCallback((()=>{R.current&&(R.current.clear(),R.current=void 0)}),[]),w=a.useCallback((()=>{R.current?.pause()}),[]),D=a.useCallback((()=>{R.current?.resume()}),[]);a.useEffect((()=>(g.isValidValueForProp(M)&&y.playSound(M),A&&E(),()=>{U()})),[]);const{variantClasses:_}=r.useComponentTheme(n.MessageBannerRedwoodTheme,{severity:B}),H=l.classNames(["banner"===I&&_,m.messageStyles.base[I],"toast"!==x&&y.severityBasedStyleClass(B,I),"sectionBanner"===x&&m.messageStyles.section]),$=l.classNames([m.messageStyles.content.base,m.messageStyles.content[I]]);return s.jsx("div",{ref:d,class:H,role:"alert","aria-atomic":"true","data-oj-key":`${typeof c.key}-${c.key}`,tabIndex:0,onKeyUp:V,onFocusIn:w,onFocusOut:D,children:s.jsxs("div",{class:$,children:[i?s.jsx(p,{item:c,renderer:i}):h(B)?s.jsx(y.MessageStartIcon,{severity:B,variant:I}):null,s.jsxs(t.Flex,{direction:"column",flex:"1",gap:v.xUnits(2),children:[s.jsxs(j,{variant:I,children:[s.jsx(y.MessageSummary,{variant:I,text:T,role:"heading","aria-level":2}),g.isValidValueForProp(k,"timestamp")&&"toast"!==x&&s.jsx(S,{variant:I,value:k})]}),s.jsx(b,{variant:I,item:c,renderer:e})]}),"on"===C&&s.jsx(f,{variant:I,onAction:N})]})})},e.MessageCloseButton=f,e.MessageDetail=b,e.MessageTimestamp=S}));
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './Flex-3421f0df', './UNSAFE_MessageBanner/themes/redwood/MessageBannerTheme', './useComponentTheme-5aa41a8f', './timer-571d3748', './classNames-08d99695', './Close-04d8a398', './IconButton-ae9a01ce', './useTranslationBundle-d07d4b20', './PRIVATE_Message/themes/MessageStyles.css', 'preact', './MessageFormattingUtils-2e19d8de', './MessagesManager-d5686336', './utils-5077c092'], (function(e,s,a,t,n,r,o,l,i,c,u,m,d,g,y,f){"use strict";function v({onAction:e,variant:a="banner"}){const t=u.useTranslationBundle("@oracle/oraclejet-preact"),n=s.jsx(c.IconButton,{"aria-label":t.message_close(),size:"sm",variant:"borderless",onAction:e,children:s.jsx(i.SvgClose,{})}),r=l.classNames([m.messageCloseButtonStyles.base,m.messageCloseButtonStyles[a]]);return s.jsx("div",{class:r,"data-oj-message-close-button":"",children:n})}function p({item:e,renderer:a}){const t=l.classNames([m.messageStartIconStyles.base,m.messageStartIconStyles.toast,m.messageStartIconStyles.customToast]);return s.jsx("div",{class:t,role:"presentation","data-oj-message-custom-icon":"",children:a(e)})}function x(e){const{detail:a}=e.data;return g.isValidValueForProp(a)?s.jsx(d.Fragment,{children:a}):null}function b({item:e,renderer:a,variant:t="banner"}){const n=null!=a,r=(a??x)(e);if(null==r)return null;const o=l.classNames([m.messageDetailStyles.base,m.messageDetailStyles[t]]);return s.jsx("div",{class:o,...n?{"data-oj-message-custom-detail":""}:{},children:r})}function j({children:e,variant:a="banner"}){const t=l.classNames([m.messageHeaderStyles.base,m.messageHeaderStyles[a]]);return s.jsx("div",{role:"presentation",class:t,children:e})}function S({value:e,variant:a="banner"}){const t=l.classNames([m.messageTimestampStyles[a]]),n=g.formatTimestamp(e);return s.jsx("div",{class:t,children:n})}function h(e){return g.isValidValueForProp(e,"severity")&&"none"!==e}e.Message=function({detailRenderer:e,iconRenderer:i,item:c,onClose:u,messageRef:d=(()=>{}),variant:x="pageBanner"}){const{closeAffordance:C="on",severity:B="error",sound:M,summary:T,timestamp:k}=c.data,{autoTimeout:F="off"}=c.data,I=function(e){return"pageBanner"===e||"sectionBanner"===e?"banner":"toast"}(x),N=a.useCallback((()=>{u?.(c)}),[c,u]),V=a.useCallback((e=>{"Escape"===e.key&&"on"===C&&u?.(c)}),[C,c,u]),A="toast"===I&&"off"!==F,R=a.useRef(),P="on"===F?5e3:"number"==typeof F?F:5e3,E=a.useCallback((()=>{R.current||(R.current=new o.Timer(N,P))}),[N,P]),U=a.useCallback((()=>{R.current&&(R.current.clear(),R.current=void 0)}),[]),w=a.useCallback((()=>{R.current?.pause()}),[]),D=a.useCallback((()=>{R.current?.resume()}),[]);a.useEffect((()=>(g.isValidValueForProp(M)&&y.playSound(M),A&&E(),()=>{U()})),[]);const{variantClasses:_}=r.useComponentTheme(n.MessageBannerRedwoodTheme,{severity:B}),H=l.classNames(["banner"===I&&_,m.messageStyles.base[I],"toast"!==x&&y.severityBasedStyleClass(B,I),"sectionBanner"===x&&m.messageStyles.section]),$=l.classNames([m.messageStyles.content.base,m.messageStyles.content[I]]);return s.jsx("div",{ref:d,class:H,role:"alert","aria-atomic":"true","data-oj-key":`${typeof c.key}-${c.key}`,tabIndex:0,onKeyUp:V,onFocusIn:w,onFocusOut:D,children:s.jsxs("div",{class:$,children:[i?s.jsx(p,{item:c,renderer:i}):h(B)?s.jsx(y.MessageStartIcon,{severity:B,variant:I}):null,s.jsxs(t.Flex,{direction:"column",flex:"1",gap:f.xUnits(2),children:[s.jsxs(j,{variant:I,children:[s.jsx(y.MessageSummary,{variant:I,text:T,role:"heading","aria-level":2}),g.isValidValueForProp(k,"timestamp")&&"toast"!==x&&s.jsx(S,{variant:I,value:k})]}),s.jsx(b,{variant:I,item:c,renderer:e})]}),"on"===C&&s.jsx(v,{variant:I,onAction:N})]})})},e.MessageCloseButton=v,e.MessageDetail=b,e.MessageTimestamp=S}));
2
2
  //# sourceMappingURL=Message-621fb578.js.map
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './Flex-56ecdf4c', './WindowOverlay-a2d80d55', './useUser-85c781ea', './Layer-447c68e6', 'preact/compat', './LayerHost-e95c5f30'], (function(t,e,o,s,r,i,a,n){"use strict";t.MessageLayer=({children:t,offset:a,testId:n,position:c="bottom"})=>{const l=c.split("-")[0];let d;d="number"==typeof a?{mainAxis:a,crossAxis:a}:"top"==l||"bottom"==l?{mainAxis:a?.vertical,crossAxis:a?.horizontal}:{mainAxis:a?.horizontal,crossAxis:a?.vertical};const{direction:p}=r.useUser(),m="ltr"===p;let b;switch(c){case"top-left":b=m?"top-start":"top-end";break;case"top-right":b=m?"top-end":"top-start";break;case"bottom-left":b=m?"bottom-start":"bottom-end";break;case"bottom-right":b=m?"bottom-end":"bottom-start";break;default:b=c}return e.jsx(i.Layer,{priority:"messages",level:"topLevel",children:e.jsx(s.WindowOverlay,{placement:b,offset:d,children:e.jsx("div",{"data-testid":n,children:e.jsx(o.Flex,{direction:"column",gap:"2x",children:t})})})})},t.positions=["top","top-left","top-right","top-start","top-end","bottom","bottom-left","bottom-right","bottom-start","bottom-end"]}));
2
- //# sourceMappingURL=MessageLayer-ba56f7e2.js.map
1
+ define(['exports', 'preact/jsx-runtime', './Flex-3421f0df', './WindowOverlay-43c10424', './useUser-3ef25571', './Layer-6f29b67f', 'preact/compat', './LayerHost-639b3284'], (function(t,e,o,s,r,i,a,n){"use strict";t.MessageLayer=({children:t,offset:a,testId:n,position:c="bottom"})=>{const l=c.split("-")[0];let p;p="number"==typeof a?{mainAxis:a,crossAxis:a}:"top"==l||"bottom"==l?{mainAxis:a?.vertical,crossAxis:a?.horizontal}:{mainAxis:a?.horizontal,crossAxis:a?.vertical};const{direction:d}=r.useUser(),m="ltr"===d;let b;switch(c){case"top-left":b=m?"top-start":"top-end";break;case"top-right":b=m?"top-end":"top-start";break;case"bottom-left":b=m?"bottom-start":"bottom-end";break;case"bottom-right":b=m?"bottom-end":"bottom-start";break;default:b=c}return e.jsx(i.Layer,{priority:"messages",level:"topLevel",children:e.jsx(s.WindowOverlay,{placement:b,offset:p,children:e.jsx("div",{"data-testid":n,children:e.jsx(o.Flex,{direction:"column",gap:"2x",children:t})})})})},t.positions=["top","top-left","top-right","top-start","top-end","bottom","bottom-left","bottom-right","bottom-start","bottom-end"]}));
2
+ //# sourceMappingURL=MessageLayer-8bac8c50.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageLayer-ba56f7e2.js","sources":["../../src/PRIVATE_MessageLayer/MessageLayer.tsx"],"sourcesContent":["import { ComponentChildren } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { WindowOverlay, WindowOverlayPlacement } from '../UNSAFE_WindowOverlay';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { Layer } from '../UNSAFE_Layer';\n\nconst positions = [\n 'top',\n 'top-left',\n 'top-right',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-left',\n 'bottom-right',\n 'bottom-start',\n 'bottom-end'\n] as const;\n\ntype Position = (typeof positions)[number];\n\ntype Offset =\n | number\n | {\n horizontal?: number;\n vertical?: number;\n };\n\ntype Props = {\n children: ComponentChildren;\n\n /**\n * Defines the fixed position where the notifications will to be placed on the screen.\n * - top-start resolves to top-left in LTR (top-right in RTL)\n * - top-end resolves to top-right in LTR (top-left in RTL)\n * - bottom-start resolves to bottom-left in LTR (bottom-right in RTL)\n * - bottom-end resolves to bottom-right in LTR (bottom-left in RTL)\n *\n * default bottom\n */\n position?: Position;\n\n /**\n * Defines an offset (in pixels) in the placement. Value can be supplied as a number or\n * an object with horizontal and vertical values.\n *\n * default 0\n */\n offset?: Offset;\n\n /**\n * The test id which is assigned to the \"data-testid\" for the component's element.\n * Used for test automation, it is assigned to the wrapper element rendered by the component.\n */\n testId?: string;\n};\n\nconst MessageLayer = ({ children, offset, testId, position = 'bottom' }: Props) => {\n const side = position.split('-')[0];\n let windowOverlayOffset;\n if (typeof offset === 'number') {\n windowOverlayOffset = { mainAxis: offset, crossAxis: offset };\n } else if (side == 'top' || side == 'bottom') {\n windowOverlayOffset = { mainAxis: offset?.vertical, crossAxis: offset?.horizontal };\n } else {\n windowOverlayOffset = { mainAxis: offset?.horizontal, crossAxis: offset?.vertical };\n }\n\n const { direction } = useUser();\n const isLtr = direction === 'ltr';\n let windowOverlayPlacement: WindowOverlayPlacement | undefined;\n switch (position) {\n case 'top-left':\n windowOverlayPlacement = isLtr ? 'top-start' : 'top-end';\n break;\n case 'top-right':\n windowOverlayPlacement = isLtr ? 'top-end' : 'top-start';\n break;\n case 'bottom-left':\n windowOverlayPlacement = isLtr ? 'bottom-start' : 'bottom-end';\n break;\n case 'bottom-right':\n windowOverlayPlacement = isLtr ? 'bottom-end' : 'bottom-start';\n break;\n default:\n windowOverlayPlacement = position;\n break;\n }\n return (\n <Layer priority=\"messages\" level=\"topLevel\">\n <WindowOverlay placement={windowOverlayPlacement} offset={windowOverlayOffset}>\n <div data-testid={testId}>\n <Flex direction=\"column\" gap=\"2x\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n};\n\nexport type { Position, Offset };\nexport { MessageLayer, positions };\n"],"names":["children","offset","testId","position","side","split","windowOverlayOffset","mainAxis","crossAxis","vertical","horizontal","direction","useUser","isLtr","windowOverlayPlacement","_jsx","Layer","priority","level","WindowOverlay","placement","jsx","Flex","gap"],"mappings":"2NAyDqB,EAAGA,WAAUC,SAAQC,SAAQC,WAAW,aAC3D,MAAMC,EAAOD,EAASE,MAAM,KAAK,GACjC,IAAIC,EAEFA,EADoB,iBAAXL,EACa,CAAEM,SAAUN,EAAQO,UAAWP,GACpC,OAARG,GAAyB,UAARA,EACJ,CAAEG,SAAUN,GAAQQ,SAAUD,UAAWP,GAAQS,YAEjD,CAAEH,SAAUN,GAAQS,WAAYF,UAAWP,GAAQQ,UAG3E,MAAME,UAAEA,GAAcC,EAAAA,UAChBC,EAAsB,QAAdF,EACd,IAAIG,EACJ,OAAQX,GACN,IAAK,WACHW,EAAyBD,EAAQ,YAAc,UAC/C,MACF,IAAK,YACHC,EAAyBD,EAAQ,UAAY,YAC7C,MACF,IAAK,cACHC,EAAyBD,EAAQ,eAAiB,aAClD,MACF,IAAK,eACHC,EAAyBD,EAAQ,aAAe,eAChD,MACF,QACEC,EAAyBX,EAG7B,OACEY,EAAAA,IAACC,EAAAA,OAAMC,SAAS,WAAWC,MAAM,WAAUlB,SACzCe,EAAAA,IAACI,EAAAA,cAAa,CAACC,UAAWN,EAAwBb,OAAQK,EACxDN,SAAAe,EAAAM,IAAA,MAAA,CAAA,cAAkBnB,EAChBF,SAAAe,EAAAA,IAACO,EAAAA,KAAK,CAAAX,UAAU,SAASY,IAAI,cAC1BvB,SAKT,cA5Fc,CAChB,MACA,WACA,YACA,YACA,UACA,SACA,cACA,eACA,eACA"}
1
+ {"version":3,"file":"MessageLayer-8bac8c50.js","sources":["../../src/PRIVATE_MessageLayer/MessageLayer.tsx"],"sourcesContent":["import { ComponentChildren } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { WindowOverlay, WindowOverlayPlacement } from '../UNSAFE_WindowOverlay';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { Layer } from '../UNSAFE_Layer';\n\nconst positions = [\n 'top',\n 'top-left',\n 'top-right',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-left',\n 'bottom-right',\n 'bottom-start',\n 'bottom-end'\n] as const;\n\ntype Position = (typeof positions)[number];\n\ntype Offset =\n | number\n | {\n horizontal?: number;\n vertical?: number;\n };\n\ntype Props = {\n children: ComponentChildren;\n\n /**\n * Defines the fixed position where the notifications will to be placed on the screen.\n * - top-start resolves to top-left in LTR (top-right in RTL)\n * - top-end resolves to top-right in LTR (top-left in RTL)\n * - bottom-start resolves to bottom-left in LTR (bottom-right in RTL)\n * - bottom-end resolves to bottom-right in LTR (bottom-left in RTL)\n *\n * default bottom\n */\n position?: Position;\n\n /**\n * Defines an offset (in pixels) in the placement. Value can be supplied as a number or\n * an object with horizontal and vertical values.\n *\n * default 0\n */\n offset?: Offset;\n\n /**\n * The test id which is assigned to the \"data-testid\" for the component's element.\n * Used for test automation, it is assigned to the wrapper element rendered by the component.\n */\n testId?: string;\n};\n\nconst MessageLayer = ({ children, offset, testId, position = 'bottom' }: Props) => {\n const side = position.split('-')[0];\n let windowOverlayOffset;\n if (typeof offset === 'number') {\n windowOverlayOffset = { mainAxis: offset, crossAxis: offset };\n } else if (side == 'top' || side == 'bottom') {\n windowOverlayOffset = { mainAxis: offset?.vertical, crossAxis: offset?.horizontal };\n } else {\n windowOverlayOffset = { mainAxis: offset?.horizontal, crossAxis: offset?.vertical };\n }\n\n const { direction } = useUser();\n const isLtr = direction === 'ltr';\n let windowOverlayPlacement: WindowOverlayPlacement | undefined;\n switch (position) {\n case 'top-left':\n windowOverlayPlacement = isLtr ? 'top-start' : 'top-end';\n break;\n case 'top-right':\n windowOverlayPlacement = isLtr ? 'top-end' : 'top-start';\n break;\n case 'bottom-left':\n windowOverlayPlacement = isLtr ? 'bottom-start' : 'bottom-end';\n break;\n case 'bottom-right':\n windowOverlayPlacement = isLtr ? 'bottom-end' : 'bottom-start';\n break;\n default:\n windowOverlayPlacement = position;\n break;\n }\n return (\n <Layer priority=\"messages\" level=\"topLevel\">\n <WindowOverlay placement={windowOverlayPlacement} offset={windowOverlayOffset}>\n <div data-testid={testId}>\n <Flex direction=\"column\" gap=\"2x\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n};\n\nexport type { Position, Offset };\nexport { MessageLayer, positions };\n"],"names":["children","offset","testId","position","side","split","windowOverlayOffset","mainAxis","crossAxis","vertical","horizontal","direction","useUser","isLtr","windowOverlayPlacement","_jsx","Layer","priority","level","WindowOverlay","placement","jsx","Flex","gap"],"mappings":"2NAyDqB,EAAGA,WAAUC,SAAQC,SAAQC,WAAW,aAC3D,MAAMC,EAAOD,EAASE,MAAM,KAAK,GACjC,IAAIC,EAEFA,EADoB,iBAAXL,EACa,CAAEM,SAAUN,EAAQO,UAAWP,GACpC,OAARG,GAAyB,UAARA,EACJ,CAAEG,SAAUN,GAAQQ,SAAUD,UAAWP,GAAQS,YAEjD,CAAEH,SAAUN,GAAQS,WAAYF,UAAWP,GAAQQ,UAG3E,MAAME,UAAEA,GAAcC,EAAAA,UAChBC,EAAsB,QAAdF,EACd,IAAIG,EACJ,OAAQX,GACN,IAAK,WACHW,EAAyBD,EAAQ,YAAc,UAC/C,MACF,IAAK,YACHC,EAAyBD,EAAQ,UAAY,YAC7C,MACF,IAAK,cACHC,EAAyBD,EAAQ,eAAiB,aAClD,MACF,IAAK,eACHC,EAAyBD,EAAQ,aAAe,eAChD,MACF,QACEC,EAAyBX,EAG7B,OACEY,EAAAA,IAACC,EAAAA,OAAMC,SAAS,WAAWC,MAAM,WAAUlB,SACzCe,EAAAA,IAACI,EAAAA,cAAa,CAACC,UAAWN,EAAwBb,OAAQK,EACxDN,SAAAe,EAAAM,IAAA,MAAA,CAAA,cAAkBnB,EAChBF,SAAAe,EAAAA,IAACO,EAAAA,KAAK,CAAAX,UAAU,SAASY,IAAI,cAC1BvB,SAKT,cA5Fc,CAChB,MACA,WACA,YACA,YACA,UACA,SACA,cACA,eACA,eACA"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact/hooks', './LayerHost-e95c5f30', './EnvironmentProvider-8f6fc388', './useMessagesFocusManager-8777bce0', './useBreakpointValues-3a067093', './MessagesContext-602a69a2', './useMessagesContext-1395a997', './useTranslationBundle-516b1b83', './Message-621fb578', 'preact', './utils-5077c092', './useComponentTheme-5aa41a8f', './useTestId-3a316499', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-69ce0a2d', 'css!./IconStyle.styles.css', './IconButton-ae9a01ce', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-2e19d8de', './MessagesManager-d5686336', './Flex-56ecdf4c', './FocusTrap-60520575', './LiveRegion-8142ed0d', './UNSAFE_MessageToast/themes/redwood/MessageToastTheme', './MessageLayer-ba56f7e2'], (function(e,s,t,n,o,a,r,i,l,c,u,d,g,m,f,h,p,y,M,v,x,T,R,F,b,k,C,S,j){"use strict";const E={entering:e=>({from:{transform:`translate(0, ${e.offsetHeight}px)`,opacity:1},to:{transform:"translate(0, 0)",opacity:1},end:{transform:"unset",opacity:1},options:{duration:250}}),exiting:{from:{opacity:1},to:{opacity:0},end:{opacity:0},options:{duration:250}}},U={opacity:0};e.MessageToast=function({data:e,detailRendererKey:n,iconRendererKey:i,renderers:d,onClose:h,offset:p,position:y,testId:M}){const v=f.useTestId(M),x=t.useRef(new Map),T=t.useRef(null),R=t.useRef(null),I=t.useRef(null),[L,w]=t.useState(),[B,_]=t.useState(e.length>0),[z,A]=t.useState(!1),N=c.useTranslationBundle("@oracle/oraclejet-preact"),{UNSAFE_messagesLayerId:V}=l.useMessagesContext(),$=t.useRef(e.length),H=t.useRef(0);$.current=e.length,t.useImperativeHandle(I,(()=>({focus:()=>!!e.length&&(T.current=x.current.get(e[0].key)??null,A(!0),!0),contains:s=>!(!e.length||!s)&&(R.current?.contains(s)??!1)})),[e]);const{controller:K,handlers:P}=a.useMessageFocusManager(I,{onFocus:t.useCallback((()=>{w(N.message_navigationFromMessagesRegion())}),[N]),onFocusLeave:t.useCallback((()=>{A(!1)}),[])},{handleEscapeKey:!1}),W=t.useCallback(((s,t,n)=>{const o=n?.contains(document.activeElement);if(0===$.current)return _(!1),A(!1),void(o&&setTimeout((()=>K.restorePriorFocus()),0));const a=t+1<e.length?t+1:t-1;if(a>-1&&o){const s=e[a].key;x.current.get(s)?.focus()}}),[K,e]),D=t.useCallback((e=>s=>x.current.set(e,s)),[]);t.useEffect((()=>{const s=H.current;if(H.current=e.length,e.length)return _(!0),e.length>s&&w(N.message_navigationToMessagesRegion()),void K.prioritize();w(s?N.messageToast_allMessagesClosed():"")}),[K,e.length,N]);const q=r.useBreakpointValues({sm:`calc(100vw - ${g.xUnits(8)})`,md:`calc(100vw - ${g.xUnits(12)})`,lg:`calc(150 * ${g.xUnits(1)})`}),G=r.useBreakpointValues({sm:{horizontal:"number"==typeof p?p:p?.horizontal??0,vertical:16+("number"==typeof p?p:p?.vertical??0)},lg:{horizontal:"number"==typeof p?p:p?.horizontal??0,vertical:24+("number"==typeof p?p:p?.vertical??0)}}),{classes:J}=m.useComponentTheme(S.MessageToastRedwoodTheme);return B||0!==e.length?s.jsxs(o.EnvironmentProvider,{environment:{colorScheme:"dark"},children:[s.jsx(j.MessageLayer,{offset:G,position:y,children:s.jsx("div",{class:J,ref:R,tabIndex:-1,id:V,...P,...v,children:s.jsx(k.FocusTrap,{autoFocusRef:T,isDisabled:!z,children:s.jsx(b.Flex,{direction:"column",gap:"1x",align:"center",maxWidth:q,children:s.jsx(F.MessagesManager,{animationStates:E,initialAnimationStyles:U,data:e,onMessageWillRemove:W,children:({item:e})=>s.jsx(u.Message,{messageRef:D(e.key),item:e,detailRenderer:F.getRenderer(e,n,d),iconRenderer:F.getRenderer(e,i,d),onClose:h,variant:"toast"},e.key)})})})})}),s.jsx(C.LiveRegion,{children:L})]}):s.jsx(C.LiveRegion,{children:L})}}));
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './LayerHost-639b3284', './EnvironmentProvider-c0e1e39b', './useMessagesFocusManager-8777bce0', './useBreakpointValues-3a067093', './MessagesContext-602a69a2', './useMessagesContext-1395a997', './useTranslationBundle-d07d4b20', './Message-621fb578', 'preact', './utils-5077c092', './useComponentTheme-5aa41a8f', './useTestId-b5cd4766', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-e5bdb734', 'css!./IconStyle.styles.css', './IconButton-ae9a01ce', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-2e19d8de', './MessagesManager-d5686336', './Flex-3421f0df', './FocusTrap-60520575', './LiveRegion-9a362373', './UNSAFE_MessageToast/themes/redwood/MessageToastTheme', './MessageLayer-8bac8c50'], (function(e,s,t,n,o,a,r,i,l,c,u,d,g,m,h,p,f,y,M,v,x,T,R,b,F,k,C,S,j){"use strict";const E={entering:e=>({from:{transform:`translate(0, ${e.offsetHeight}px)`,opacity:1},to:{transform:"translate(0, 0)",opacity:1},end:{transform:"unset",opacity:1},options:{duration:250}}),exiting:{from:{opacity:1},to:{opacity:0},end:{opacity:0},options:{duration:250}}},U={opacity:0};e.MessageToast=function({data:e,detailRendererKey:n,iconRendererKey:i,renderers:d,onClose:p,offset:f,position:y,testId:M}){const v=h.useTestId(M),x=t.useRef(new Map),T=t.useRef(null),R=t.useRef(null),I=t.useRef(null),[L,w]=t.useState(),[B,_]=t.useState(e.length>0),[z,A]=t.useState(!1),N=c.useTranslationBundle("@oracle/oraclejet-preact"),{UNSAFE_messagesLayerId:V}=l.useMessagesContext(),$=t.useRef(e.length),H=t.useRef(0);$.current=e.length,t.useImperativeHandle(I,(()=>({focus:()=>!!e.length&&(T.current=x.current.get(e[0].key)??null,A(!0),!0),contains:s=>!(!e.length||!s)&&(R.current?.contains(s)??!1)})),[e]);const{controller:K,handlers:P}=a.useMessageFocusManager(I,{onFocus:t.useCallback((()=>{w(N.message_navigationFromMessagesRegion())}),[N]),onFocusLeave:t.useCallback((()=>{A(!1)}),[])},{handleEscapeKey:!1}),W=t.useCallback(((s,t,n)=>{const o=n?.contains(document.activeElement);if(0===$.current)return _(!1),A(!1),void(o&&setTimeout((()=>K.restorePriorFocus()),0));const a=t+1<e.length?t+1:t-1;if(a>-1&&o){const s=e[a].key;x.current.get(s)?.focus()}}),[K,e]),D=t.useCallback((e=>s=>x.current.set(e,s)),[]);t.useEffect((()=>{const s=H.current;if(H.current=e.length,e.length)return _(!0),e.length>s&&w(N.message_navigationToMessagesRegion()),void K.prioritize();w(s?N.messageToast_allMessagesClosed():"")}),[K,e.length,N]);const q=r.useBreakpointValues({sm:`calc(100vw - ${g.xUnits(8)})`,md:`calc(100vw - ${g.xUnits(12)})`,lg:`calc(150 * ${g.xUnits(1)})`}),G=r.useBreakpointValues({sm:{horizontal:"number"==typeof f?f:f?.horizontal??0,vertical:16+("number"==typeof f?f:f?.vertical??0)},lg:{horizontal:"number"==typeof f?f:f?.horizontal??0,vertical:24+("number"==typeof f?f:f?.vertical??0)}}),{classes:J}=m.useComponentTheme(S.MessageToastRedwoodTheme);return B||0!==e.length?s.jsxs(o.EnvironmentProvider,{environment:{colorScheme:"dark"},children:[s.jsx(j.MessageLayer,{offset:G,position:y,children:s.jsx("div",{class:J,ref:R,tabIndex:-1,id:V,...P,...v,children:s.jsx(k.FocusTrap,{autoFocusRef:T,isDisabled:!z,children:s.jsx(F.Flex,{direction:"column",gap:"1x",align:"center",maxWidth:q,children:s.jsx(b.MessagesManager,{animationStates:E,initialAnimationStyles:U,data:e,onMessageWillRemove:W,children:({item:e})=>s.jsx(u.Message,{messageRef:D(e.key),item:e,detailRenderer:b.getRenderer(e,n,d),iconRenderer:b.getRenderer(e,i,d),onClose:p,variant:"toast"},e.key)})})})})}),s.jsx(C.LiveRegion,{children:L})]}):s.jsx(C.LiveRegion,{children:L})}}));
2
2
  //# sourceMappingURL=MessageToast-06773c79.js.map
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './classNames-08d99695', './SuccessS-c5d520d2', './ErrorS-d2efaf06', './InformationS-2f6b535d', './WarningS-2b4729ba', './Flex-56ecdf4c', './PRIVATE_Message/themes/MessageStyles.css', './useTranslationBundle-516b1b83', './useTestId-3a316499', './logger-0f873e29', './soundUtils-f6535f03', './MessageFormattingUtils-2e19d8de', 'preact', 'preact/hooks', './TransitionGroup-3b9d81b6', './useAnimation-5a74955f', './MessagesContext-602a69a2', './useMessagesContext-1395a997', './Transition-04efcc49'], (function(e,n,t,a,s,i,r,o,c,l,u,d,g,m,f,y,S,v,x,h,p){"use strict";const b={confirmation:a.SvgSuccessS,error:s.SvgErrorS,info:i.SvgInformationS,warning:r.SvgWarningS};const I=(e,n="common")=>d.warn(`JET Message(${n}): ${e}`);function j(e,n="common"){throw new Error(`JET Message(${n}) - ${e}`)}const E={};function M({animationStates:e=E,initialAnimationStyles:t,onEntering:a,onExiting:s,...i}){const[r,o]=y.useState("entering"),c=y.useRef(),l=y.useRef(),{controller:u,nodeRef:d}=v.useAnimation(r,{animationStates:e,isAnimatedOnMount:!0,onAnimationEnd:y.useCallback((()=>{c.current?.(),c.current=void 0,l.current?.(),l.current=void 0}),[])}),{addBusyState:g}=h.useMessagesContext(),m=y.useCallback(((n,t,s)=>{c.current&&(c.current=void 0,u.cancel()),l.current?.(),l.current=void 0,a?.(n,void 0,s),o("entering"),void 0!==e.entering||void 0!==e["exiting => entering"]?(c.current=t,l.current=g?.("messages animating")):t?.()}),[e,u,g,a]),f=y.useCallback(((n,t,a)=>{c.current&&(c.current=void 0,u.cancel()),l.current?.(),l.current=void 0,s?.(n,void 0,a),o("exiting"),void 0!==e.exiting||void 0!==e["entering => exiting"]?(c.current=t,l.current=g?.("messages animating")):t?.()}),[e,u,g,s]);return y.useLayoutEffect((()=>()=>l.current?.()),[]),n.jsx("div",{ref:d,style:t,children:n.jsx(p.Transition,{...i,onEntering:m,onExiting:f})})}e.MessageStartIcon=function({severity:e,testId:a,variant:s="banner"}){const i=b[e],r=l.useTranslationBundle("@oracle/oraclejet-preact"),d={confirmation:r.message_confirmation(),error:r.message_error(),info:r.message_info(),warning:r.message_warning()},g=u.useTestId(a),m="inline"!==s?n.jsx(o.Flex,{align:"center",height:"100%",children:n.jsx("span",{class:c.startIconContainerStyles[s],role:"img","aria-label":d[e],children:n.jsx(i,{})})}):n.jsx("span",{class:c.startIconContainerStyles.inline,role:"img","aria-label":d[e],children:n.jsx(i,{})});return n.jsx("div",{class:t.classNames([c.messageStartIconStyles.base,c.messageStartIconStyles[s],c.severityIconStyles[s]]),role:"presentation",...g,children:m})},e.MessageSummary=function({"aria-level":e,role:a,text:s,testId:i,variant:r="banner"}){const o=u.useTestId(i),l=t.classNames([c.messageSummaryStyles.base,c.messageSummaryStyles[r]]);return n.jsx("div",{"aria-level":e,role:a,class:l,...o,children:s})},e.MessagesManager=function({data:e,animationStates:t,children:a,initialAnimationStyles:s,onMessageWillRemove:i}){const r=y.useCallback((async(e,n)=>{n&&i?.(n.key,n.index,e)}),[i]);return n.jsx(S.TransitionGroup,{elementType:f.Fragment,children:e.map(((e,i)=>n.jsx(M,{animationStates:t,initialAnimationStyles:s,metadata:{index:i,key:e.key},onExited:r,children:a?.({index:i,item:e})},e.key)))})},e.getRenderer=function(e,n,t,a){if(!n||!t)return;const s="function"==typeof n?n(e):n;return null!=s?(s in t||j(`${s} is not a valid template name for the message with key=${e.key}`,a),t[s]):void 0},e.isSeverityIconNeeded=function(e){return m.isValidValueForProp(e,"severity")&&"none"!==e},e.playSound=async function(e){if("none"!==e)if("default"!==e)try{await g.playAudioFromURL(e)}catch(n){I(`Failed to play the audio from the url ${e}. ${n}.`)}else try{g.playDefaultNotificationSound()}catch(e){I(`Failed to play the default sound. ${e}.`)}},e.severityBasedStyleClass=function(e,n){return m.isValidValueForProp(e,"severity")&&"none"!==e?`oj-c-message${n}-${e}`:""},e.throwError=j}));
1
+ define(['exports', 'preact/jsx-runtime', './classNames-08d99695', './SuccessS-c5d520d2', './ErrorS-d2efaf06', './InformationS-2f6b535d', './WarningS-2b4729ba', './Flex-3421f0df', './PRIVATE_Message/themes/MessageStyles.css', './useTranslationBundle-d07d4b20', './useTestId-b5cd4766', './logger-0f873e29', './soundUtils-f6535f03', './MessageFormattingUtils-2e19d8de', 'preact', 'preact/hooks', './TransitionGroup-3b9d81b6', './useAnimation-5a74955f', './MessagesContext-602a69a2', './useMessagesContext-1395a997', './Transition-04efcc49'], (function(e,n,t,a,s,i,r,o,c,l,u,d,g,m,f,y,S,v,x,h,p){"use strict";const b={confirmation:a.SvgSuccessS,error:s.SvgErrorS,info:i.SvgInformationS,warning:r.SvgWarningS};const I=(e,n="common")=>d.warn(`JET Message(${n}): ${e}`);function j(e,n="common"){throw new Error(`JET Message(${n}) - ${e}`)}const E={};function M({animationStates:e=E,initialAnimationStyles:t,onEntering:a,onExiting:s,...i}){const[r,o]=y.useState("entering"),c=y.useRef(),l=y.useRef(),{controller:u,nodeRef:d}=v.useAnimation(r,{animationStates:e,isAnimatedOnMount:!0,onAnimationEnd:y.useCallback((()=>{c.current?.(),c.current=void 0,l.current?.(),l.current=void 0}),[])}),{addBusyState:g}=h.useMessagesContext(),m=y.useCallback(((n,t,s)=>{c.current&&(c.current=void 0,u.cancel()),l.current?.(),l.current=void 0,a?.(n,void 0,s),o("entering"),void 0!==e.entering||void 0!==e["exiting => entering"]?(c.current=t,l.current=g?.("messages animating")):t?.()}),[e,u,g,a]),f=y.useCallback(((n,t,a)=>{c.current&&(c.current=void 0,u.cancel()),l.current?.(),l.current=void 0,s?.(n,void 0,a),o("exiting"),void 0!==e.exiting||void 0!==e["entering => exiting"]?(c.current=t,l.current=g?.("messages animating")):t?.()}),[e,u,g,s]);return y.useLayoutEffect((()=>()=>l.current?.()),[]),n.jsx("div",{ref:d,style:t,children:n.jsx(p.Transition,{...i,onEntering:m,onExiting:f})})}e.MessageStartIcon=function({severity:e,testId:a,variant:s="banner"}){const i=b[e],r=l.useTranslationBundle("@oracle/oraclejet-preact"),d={confirmation:r.message_confirmation(),error:r.message_error(),info:r.message_info(),warning:r.message_warning()},g=u.useTestId(a),m="inline"!==s?n.jsx(o.Flex,{align:"center",height:"100%",children:n.jsx("span",{class:c.startIconContainerStyles[s],role:"img","aria-label":d[e],children:n.jsx(i,{})})}):n.jsx("span",{class:c.startIconContainerStyles.inline,role:"img","aria-label":d[e],children:n.jsx(i,{})});return n.jsx("div",{class:t.classNames([c.messageStartIconStyles.base,c.messageStartIconStyles[s],c.severityIconStyles[s]]),role:"presentation",...g,children:m})},e.MessageSummary=function({"aria-level":e,role:a,text:s,testId:i,variant:r="banner"}){const o=u.useTestId(i),l=t.classNames([c.messageSummaryStyles.base,c.messageSummaryStyles[r]]);return n.jsx("div",{"aria-level":e,role:a,class:l,...o,children:s})},e.MessagesManager=function({data:e,animationStates:t,children:a,initialAnimationStyles:s,onMessageWillRemove:i}){const r=y.useCallback((async(e,n)=>{n&&i?.(n.key,n.index,e)}),[i]);return n.jsx(S.TransitionGroup,{elementType:f.Fragment,children:e.map(((e,i)=>n.jsx(M,{animationStates:t,initialAnimationStyles:s,metadata:{index:i,key:e.key},onExited:r,children:a?.({index:i,item:e})},e.key)))})},e.getRenderer=function(e,n,t,a){if(!n||!t)return;const s="function"==typeof n?n(e):n;return null!=s?(s in t||j(`${s} is not a valid template name for the message with key=${e.key}`,a),t[s]):void 0},e.isSeverityIconNeeded=function(e){return m.isValidValueForProp(e,"severity")&&"none"!==e},e.playSound=async function(e){if("none"!==e)if("default"!==e)try{await g.playAudioFromURL(e)}catch(n){I(`Failed to play the audio from the url ${e}. ${n}.`)}else try{g.playDefaultNotificationSound()}catch(e){I(`Failed to play the default sound. ${e}.`)}},e.severityBasedStyleClass=function(e,n){return m.isValidValueForProp(e,"severity")&&"none"!==e?`oj-c-message${n}-${e}`:""},e.throwError=j}));
2
2
  //# sourceMappingURL=MessagesManager-d5686336.js.map