@oracle/oraclejet-preact 18.1.7 → 18.1.9

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 (264) hide show
  1. package/amd/{BarChart-254aecbb.js → BarChart-0ad4ca6d.js} +2 -2
  2. package/amd/{BarChart-254aecbb.js.map → BarChart-0ad4ca6d.js.map} +1 -1
  3. package/amd/BaseNavigationListItem-84f4be5c.js +2 -0
  4. package/{cjs/BaseNavigationListItem-709591de.js.map → amd/BaseNavigationListItem-84f4be5c.js.map} +1 -1
  5. package/amd/{Chart-87ae799b.js → Chart-79cfc878.js} +2 -2
  6. package/amd/{Chart-87ae799b.js.map → Chart-79cfc878.js.map} +1 -1
  7. package/amd/CheckboxSetContext-2e486ea8.js +2 -0
  8. package/{cjs/CheckboxSetContext-c62db26d.js.map → amd/CheckboxSetContext-2e486ea8.js.map} +1 -1
  9. package/amd/{ComboChart-79e7d438.js → ComboChart-72eda15f.js} +2 -2
  10. package/amd/{ComboChart-79e7d438.js.map → ComboChart-72eda15f.js.map} +1 -1
  11. package/amd/InputDatePicker-03bdeb95.js +2 -0
  12. package/amd/{InputDatePicker-4c3c6bb4.js.map → InputDatePicker-03bdeb95.js.map} +1 -1
  13. package/amd/{LineAreaChart-1f66d439.js → LineAreaChart-cacd5576.js} +2 -2
  14. package/amd/{LineAreaChart-1f66d439.js.map → LineAreaChart-cacd5576.js.map} +1 -1
  15. package/amd/NavigationListItem-32ded4a5.js +2 -0
  16. package/{cjs/NavigationListItem-0a49d6b5.js.map → amd/NavigationListItem-32ded4a5.js.map} +1 -1
  17. package/amd/{OverflowTabBar-0ff69ae0.js → OverflowTabBar-1dd5c327.js} +2 -2
  18. package/amd/{OverflowTabBar-0ff69ae0.js.map → OverflowTabBar-1dd5c327.js.map} +1 -1
  19. package/amd/OverflowTabBarItem-f8128e3d.js +2 -0
  20. package/amd/{OverflowTabBarItem-74276a21.js.map → OverflowTabBarItem-f8128e3d.js.map} +1 -1
  21. package/amd/PRIVATE_Chart.js +1 -1
  22. package/amd/RemovableNavigationListItem-1f69907c.js +2 -0
  23. package/amd/{RemovableNavigationListItem-cf7a0648.js.map → RemovableNavigationListItem-1f69907c.js.map} +1 -1
  24. package/amd/{ReorderableTabBar-2983fae4.js → ReorderableTabBar-23f7e3c3.js} +2 -2
  25. package/amd/{ReorderableTabBar-2983fae4.js.map → ReorderableTabBar-23f7e3c3.js.map} +1 -1
  26. package/amd/{ScatterChart-2acbcccd.js → ScatterChart-5a9fe642.js} +2 -2
  27. package/amd/{ScatterChart-2acbcccd.js.map → ScatterChart-5a9fe642.js.map} +1 -1
  28. package/amd/TabBar-ca32462a.js +2 -0
  29. package/amd/{TabBar-0b3704ca.js.map → TabBar-ca32462a.js.map} +1 -1
  30. package/amd/TabBarMixed-dab4e4a2.js +2 -0
  31. package/amd/{TabBarMixed-1cfdf66e.js.map → TabBarMixed-dab4e4a2.js.map} +1 -1
  32. package/amd/Theme-redwood/theme.css +244 -244
  33. package/amd/Theme-stable/theme.css +356 -356
  34. package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
  35. package/amd/UNSAFE_BarChart.js +1 -1
  36. package/amd/UNSAFE_CheckboxItem.js +1 -1
  37. package/amd/UNSAFE_CheckboxItem.js.map +1 -1
  38. package/amd/UNSAFE_CheckboxSet.js +1 -1
  39. package/amd/UNSAFE_CheckboxSet.js.map +1 -1
  40. package/amd/UNSAFE_ComboChart.js +1 -1
  41. package/amd/UNSAFE_InputDatePicker.js +1 -1
  42. package/amd/UNSAFE_LineAreaChart.js +1 -1
  43. package/amd/UNSAFE_NavigationList.js +1 -1
  44. package/amd/UNSAFE_NavigationListCommon.js +1 -1
  45. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  46. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  47. package/amd/UNSAFE_RichCheckboxSet.js +1 -1
  48. package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
  49. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  50. package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
  51. package/amd/UNSAFE_ScatterChart.js +1 -1
  52. package/amd/UNSAFE_TabBar.js +1 -1
  53. package/amd/UNSAFE_TabBarCommon.js +1 -1
  54. package/amd/UNSAFE_TabBarMixed.js +1 -1
  55. package/cjs/{BarChart-66dbe5be.js → BarChart-02e819aa.js} +2 -2
  56. package/cjs/{BarChart-66dbe5be.js.map → BarChart-02e819aa.js.map} +1 -1
  57. package/cjs/{BaseCardView-0be36db0.js → BaseCardView-5c483f52.js} +2 -2
  58. package/cjs/{BaseCardView-0be36db0.js.map → BaseCardView-5c483f52.js.map} +1 -1
  59. package/cjs/BaseNavigationListItem-3dbb8d31.js +49 -0
  60. package/{amd/BaseNavigationListItem-84858a0f.js.map → cjs/BaseNavigationListItem-3dbb8d31.js.map} +1 -1
  61. package/cjs/{CardFlexView-2547fc13.js → CardFlexView-385f1b2d.js} +2 -2
  62. package/cjs/{CardFlexView-2547fc13.js.map → CardFlexView-385f1b2d.js.map} +1 -1
  63. package/cjs/{CardGridView-c355e9d4.js → CardGridView-d337b9f4.js} +2 -2
  64. package/cjs/{CardGridView-c355e9d4.js.map → CardGridView-d337b9f4.js.map} +1 -1
  65. package/cjs/{Chart-13ccd345.js → Chart-7a0ccb93.js} +2 -2
  66. package/cjs/{Chart-13ccd345.js.map → Chart-7a0ccb93.js.map} +1 -1
  67. package/cjs/CheckboxSet-749e326f.js +53 -0
  68. package/{amd/CheckboxSet-05423d28.js.map → cjs/CheckboxSet-749e326f.js.map} +1 -1
  69. package/cjs/{ComboChart-7188af92.js → ComboChart-bfc7d7f0.js} +2 -2
  70. package/cjs/{ComboChart-7188af92.js.map → ComboChart-bfc7d7f0.js.map} +1 -1
  71. package/cjs/ExpandableList-0a0d75b3.js +1 -1
  72. package/cjs/GroupLoadingIndicator-824d658f.js +1 -1
  73. package/cjs/{Indexer-099ecbad.js → Indexer-a4a2d6b8.js} +2 -2
  74. package/cjs/{Indexer-099ecbad.js.map → Indexer-a4a2d6b8.js.map} +1 -1
  75. package/cjs/{InputDatePicker-7eb5931a.js → InputDatePicker-026ea769.js} +2 -2
  76. package/cjs/{InputDatePicker-7eb5931a.js.map → InputDatePicker-026ea769.js.map} +1 -1
  77. package/cjs/{LineAreaChart-05a58ac5.js → LineAreaChart-86429497.js} +2 -2
  78. package/cjs/{LineAreaChart-05a58ac5.js.map → LineAreaChart-86429497.js.map} +1 -1
  79. package/cjs/{List-24abb3df.js → List-bad74e43.js} +4 -3
  80. package/cjs/{List-24abb3df.js.map → List-bad74e43.js.map} +1 -1
  81. package/cjs/{ListView-7e894199.js → ListView-80a9c725.js} +2 -2
  82. package/cjs/{ListView-7e894199.js.map → ListView-80a9c725.js.map} +1 -1
  83. package/cjs/{LoadMoreCollection-69bc038c.js → LoadMoreCollection-73112ff0.js} +2 -2
  84. package/cjs/{LoadMoreCollection-69bc038c.js.map → LoadMoreCollection-73112ff0.js.map} +1 -1
  85. package/cjs/{NavigationListItem-0a49d6b5.js → NavigationList-cd86b7a5.js} +3 -21
  86. package/{amd/NavigationList-ae9fcc27.js.map → cjs/NavigationList-cd86b7a5.js.map} +1 -1
  87. package/cjs/NavigationListItem-bf607636.js +12 -0
  88. package/{amd/NavigationListItem-cd84dcba.js.map → cjs/NavigationListItem-bf607636.js.map} +1 -1
  89. package/cjs/{OverflowTabBar-c70fb3bf.js → OverflowTabBar-95014877.js} +3 -3
  90. package/cjs/{OverflowTabBar-c70fb3bf.js.map → OverflowTabBar-95014877.js.map} +1 -1
  91. package/cjs/{OverflowTabBarItem-70484f54.js → OverflowTabBarItem-7b383fbd.js} +5 -4
  92. package/cjs/{OverflowTabBarItem-70484f54.js.map → OverflowTabBarItem-7b383fbd.js.map} +1 -1
  93. package/cjs/PRIVATE_BaseCardView.js +3 -3
  94. package/cjs/PRIVATE_Chart.js +4 -4
  95. package/cjs/PRIVATE_List.js +4 -4
  96. package/cjs/PRIVATE_LoadMoreCollection.js +2 -2
  97. package/cjs/PRIVATE_SelectCommon.js +5 -5
  98. package/cjs/PRIVATE_Table.js +3 -3
  99. package/cjs/PRIVATE_VirtualizedCollection.js +2 -2
  100. package/cjs/{RemovableNavigationListItem-f3ad6e8e.js → RemovableNavigationListItem-e7cd4dbf.js} +4 -3
  101. package/cjs/{RemovableNavigationListItem-f3ad6e8e.js.map → RemovableNavigationListItem-e7cd4dbf.js.map} +1 -1
  102. package/cjs/{ReorderableTabBar-0a94441d.js → ReorderableTabBar-027413d9.js} +2 -2
  103. package/cjs/{ReorderableTabBar-0a94441d.js.map → ReorderableTabBar-027413d9.js.map} +1 -1
  104. package/cjs/{ScatterChart-9226c20d.js → ScatterChart-b6d22923.js} +2 -2
  105. package/cjs/{ScatterChart-9226c20d.js.map → ScatterChart-b6d22923.js.map} +1 -1
  106. package/cjs/{SelectMultiple-3582b180.js → SelectMultiple-3569988d.js} +2 -2
  107. package/cjs/{SelectMultiple-3582b180.js.map → SelectMultiple-3569988d.js.map} +1 -1
  108. package/cjs/{SelectSingle-d4a4de82.js → SelectSingle-43d6953e.js} +2 -2
  109. package/cjs/{SelectSingle-d4a4de82.js.map → SelectSingle-43d6953e.js.map} +1 -1
  110. package/cjs/{TabBar-ae497b21.js → TabBar-fe7bc2c4.js} +6 -1
  111. package/cjs/{TabBar-ae497b21.js.map → TabBar-fe7bc2c4.js.map} +1 -1
  112. package/cjs/{TabBarMixed-d6b512da.js → TabBarMixed-539d1779.js} +6 -1
  113. package/cjs/{TabBarMixed-d6b512da.js.map → TabBarMixed-539d1779.js.map} +1 -1
  114. package/cjs/{Table-f225ad02.js → Table-6987731e.js} +2 -2
  115. package/cjs/{Table-f225ad02.js.map → Table-6987731e.js.map} +1 -1
  116. package/cjs/{TableView-6dcc1bd7.js → TableView-1bed3e0b.js} +2 -2
  117. package/cjs/{TableView-6dcc1bd7.js.map → TableView-1bed3e0b.js.map} +1 -1
  118. package/cjs/Theme-redwood/theme.css +287 -287
  119. package/cjs/Theme-stable/theme.css +290 -290
  120. package/cjs/UNSAFE_BarChart/__test__/BarChart.spec.js +5 -5
  121. package/cjs/UNSAFE_BarChart.js +5 -5
  122. package/cjs/UNSAFE_CardFlexView.js +4 -4
  123. package/cjs/UNSAFE_CardGridView.js +4 -4
  124. package/cjs/UNSAFE_CheckboxItem.js +83 -31
  125. package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
  126. package/cjs/UNSAFE_CheckboxSet.js +15 -44
  127. package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
  128. package/cjs/UNSAFE_ComboChart.js +5 -5
  129. package/cjs/UNSAFE_ExpandableList.js +3 -3
  130. package/cjs/UNSAFE_Indexer.js +2 -2
  131. package/cjs/UNSAFE_InputDatePicker.js +90 -90
  132. package/cjs/UNSAFE_LineAreaChart.js +5 -5
  133. package/cjs/UNSAFE_ListView.js +5 -5
  134. package/cjs/UNSAFE_NavigationList.js +16 -14
  135. package/cjs/UNSAFE_NavigationList.js.map +1 -1
  136. package/cjs/UNSAFE_NavigationListCommon.js +58 -57
  137. package/cjs/UNSAFE_NavigationListCommon.js.map +1 -1
  138. package/cjs/UNSAFE_OverflowTabBar.js +29 -27
  139. package/cjs/UNSAFE_OverflowTabBar.js.map +1 -1
  140. package/cjs/UNSAFE_ReorderableTabBar.js +25 -14
  141. package/cjs/UNSAFE_ReorderableTabBar.js.map +1 -1
  142. package/cjs/UNSAFE_RichCheckboxSet.js +29 -26
  143. package/cjs/UNSAFE_RichCheckboxSet.js.map +1 -1
  144. package/cjs/UNSAFE_RichSelectionItem.js +185 -46
  145. package/cjs/UNSAFE_RichSelectionItem.js.map +1 -1
  146. package/cjs/UNSAFE_ScatterChart.js +5 -5
  147. package/cjs/UNSAFE_SelectMultiple.js +6 -6
  148. package/cjs/UNSAFE_SelectSingle.js +6 -6
  149. package/cjs/UNSAFE_TabBar.js +28 -26
  150. package/cjs/UNSAFE_TabBar.js.map +1 -1
  151. package/cjs/UNSAFE_TabBarCommon.js +20 -18
  152. package/cjs/UNSAFE_TabBarCommon.js.map +1 -1
  153. package/cjs/UNSAFE_TabBarMixed.js +39 -37
  154. package/cjs/UNSAFE_TabBarMixed.js.map +1 -1
  155. package/cjs/UNSAFE_TableView.js +4 -4
  156. package/cjs/UNSAFE_VirtualizedListView.js +5 -5
  157. package/cjs/{VirtualizedCollection-9e8c48b9.js → VirtualizedCollection-00aedb8b.js} +2 -2
  158. package/cjs/{VirtualizedCollection-9e8c48b9.js.map → VirtualizedCollection-00aedb8b.js.map} +1 -1
  159. package/cjs/{VirtualizedListView-0a4f07ca.js → VirtualizedListView-ad3219ba.js} +2 -2
  160. package/cjs/{VirtualizedListView-0a4f07ca.js.map → VirtualizedListView-ad3219ba.js.map} +1 -1
  161. package/cjs/{BaseNavigationListItem-709591de.js → useNavigationListItem-bf89c20b.js} +2 -40
  162. package/{amd/useNavigationListItem-d79484b7.js.map → cjs/useNavigationListItem-bf89c20b.js.map} +1 -1
  163. package/cjs/{useSelectCommon-21c36506.js → useSelectCommon-38a38427.js} +2 -2
  164. package/cjs/{useSelectCommon-21c36506.js.map → useSelectCommon-38a38427.js.map} +1 -1
  165. package/es/BadgeVariants.styles.css +14 -14
  166. package/es/BadgeVariants.styles2.css +14 -14
  167. package/es/{BaseCardView-724422f3.js → BaseCardView-89398a60.js} +2 -2
  168. package/es/{BaseCardView-724422f3.js.map → BaseCardView-89398a60.js.map} +1 -1
  169. package/es/ButtonLayoutVariants.styles.css +2 -2
  170. package/es/ButtonLayoutVariants.styles2.css +2 -2
  171. package/es/{CardFlexView-acaf0c83.js → CardFlexView-e8f05006.js} +2 -2
  172. package/es/{CardFlexView-acaf0c83.js.map → CardFlexView-e8f05006.js.map} +1 -1
  173. package/es/{CardGridView-05852cf3.js → CardGridView-1ea797f2.js} +2 -2
  174. package/es/{CardGridView-05852cf3.js.map → CardGridView-1ea797f2.js.map} +1 -1
  175. package/es/ExpandableList-27f4f0d4.js +1 -1
  176. package/es/GroupLoadingIndicator-93bcf33f.js +1 -1
  177. package/es/{Indexer-18ec7af3.js → Indexer-01c03c68.js} +2 -2
  178. package/es/{Indexer-18ec7af3.js.map → Indexer-01c03c68.js.map} +1 -1
  179. package/es/{List-58b8d3c9.js → List-7a0e20bb.js} +3 -4
  180. package/es/{List-58b8d3c9.js.map → List-7a0e20bb.js.map} +1 -1
  181. package/es/{ListView-be2e2736.js → ListView-66efb96e.js} +2 -2
  182. package/es/{ListView-be2e2736.js.map → ListView-66efb96e.js.map} +1 -1
  183. package/es/{LoadMoreCollection-95a49d2a.js → LoadMoreCollection-7df1be36.js} +2 -2
  184. package/es/{LoadMoreCollection-95a49d2a.js.map → LoadMoreCollection-7df1be36.js.map} +1 -1
  185. package/es/MaxLengthCounter-181b4fc9.js +25 -0
  186. package/es/MaxLengthCounter-181b4fc9.js.map +1 -0
  187. package/es/PRIVATE_BaseCardView.js +3 -3
  188. package/es/PRIVATE_List.js +4 -4
  189. package/es/PRIVATE_LoadMoreCollection.js +2 -2
  190. package/es/PRIVATE_SelectCommon.js +5 -5
  191. package/es/PRIVATE_Table.js +3 -3
  192. package/es/PRIVATE_VirtualizedCollection.js +2 -2
  193. package/es/SegmentStyles.styles.css +8 -11
  194. package/es/SegmentStyles.styles2.css +11 -8
  195. package/es/{SelectMultiple-c7f9e747.js → SelectMultiple-a6799615.js} +2 -2
  196. package/es/{SelectMultiple-c7f9e747.js.map → SelectMultiple-a6799615.js.map} +1 -1
  197. package/es/{SelectSingle-75270526.js → SelectSingle-ae14678c.js} +2 -2
  198. package/es/{SelectSingle-75270526.js.map → SelectSingle-ae14678c.js.map} +1 -1
  199. package/es/{Table-b8c41429.js → Table-527429e9.js} +2 -2
  200. package/es/{Table-b8c41429.js.map → Table-527429e9.js.map} +1 -1
  201. package/es/{TableView-2261b9de.js → TableView-aabbe062.js} +2 -2
  202. package/es/{TableView-2261b9de.js.map → TableView-aabbe062.js.map} +1 -1
  203. package/es/{TextArea-6584935d.js → TextArea-a888d849.js} +8 -25
  204. package/es/TextArea-a888d849.js.map +1 -0
  205. package/es/{TextAreaAutosize-2ca5256e.js → TextAreaAutosize-c2a52cba.js} +2 -2
  206. package/es/{TextAreaAutosize-2ca5256e.js.map → TextAreaAutosize-c2a52cba.js.map} +1 -1
  207. package/es/Theme-redwood/theme.css +335 -335
  208. package/es/Theme-stable/theme.css +478 -478
  209. package/es/UNSAFE_Badge/themes/redwood/BadgeTheme.js +1 -1
  210. package/es/UNSAFE_Badge/themes/redwood/BadgeVariants.css.js +1 -1
  211. package/es/UNSAFE_Badge/themes/stable/BadgeTheme.js +1 -1
  212. package/es/UNSAFE_Badge/themes/stable/BadgeVariants.css.js +1 -1
  213. package/es/UNSAFE_Badge.js +1 -1
  214. package/es/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
  215. package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutTheme.js +1 -1
  216. package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutVariants.css.js +1 -1
  217. package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutTheme.js +1 -1
  218. package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutVariants.css.js +1 -1
  219. package/es/UNSAFE_ButtonLayout.js +1 -1
  220. package/es/UNSAFE_CardFlexView.js +4 -4
  221. package/es/UNSAFE_CardGridView.js +4 -4
  222. package/es/UNSAFE_ExpandableList.js +3 -3
  223. package/es/UNSAFE_Indexer.js +2 -2
  224. package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
  225. package/es/UNSAFE_InputDateMask.js +1 -1
  226. package/es/UNSAFE_InputDatePicker.js +1 -1
  227. package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
  228. package/es/UNSAFE_InputTimeMask.js +1 -1
  229. package/es/UNSAFE_ListView.js +5 -5
  230. package/es/UNSAFE_NavigationList.js +1 -1
  231. package/es/UNSAFE_NavigationListCommon.js +1 -1
  232. package/es/UNSAFE_OverflowTabBar.js +1 -1
  233. package/es/UNSAFE_SelectMultiple.js +6 -6
  234. package/es/UNSAFE_SelectSingle.js +6 -6
  235. package/es/UNSAFE_TabBar.js +1 -1
  236. package/es/UNSAFE_TabBarCommon.js +1 -1
  237. package/es/UNSAFE_TabBarMixed.js +1 -1
  238. package/es/UNSAFE_TableView.js +4 -4
  239. package/es/UNSAFE_TextArea.js +3 -2
  240. package/es/UNSAFE_TextArea.js.map +1 -1
  241. package/es/UNSAFE_TextAreaAutosize.js +3 -3
  242. package/es/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
  243. package/es/UNSAFE_Toolbar.js +1 -1
  244. package/es/UNSAFE_TruncatingBadge.js +1 -1
  245. package/es/UNSAFE_VirtualizedListView.js +5 -5
  246. package/es/{VirtualizedCollection-e73890a1.js → VirtualizedCollection-f048fbb8.js} +2 -2
  247. package/es/{VirtualizedCollection-e73890a1.js.map → VirtualizedCollection-f048fbb8.js.map} +1 -1
  248. package/es/{VirtualizedListView-18ca5b09.js → VirtualizedListView-0f244411.js} +2 -2
  249. package/es/{VirtualizedListView-18ca5b09.js.map → VirtualizedListView-0f244411.js.map} +1 -1
  250. package/es/{useSelectCommon-896b594a.js → useSelectCommon-62eb8f41.js} +2 -2
  251. package/es/{useSelectCommon-896b594a.js.map → useSelectCommon-62eb8f41.js.map} +1 -1
  252. package/package.json +2 -2
  253. package/amd/BaseNavigationListItem-84858a0f.js +0 -2
  254. package/amd/CheckboxSet-05423d28.js +0 -2
  255. package/amd/InputDatePicker-4c3c6bb4.js +0 -2
  256. package/amd/NavigationList-ae9fcc27.js +0 -2
  257. package/amd/NavigationListItem-cd84dcba.js +0 -2
  258. package/amd/OverflowTabBarItem-74276a21.js +0 -2
  259. package/amd/RemovableNavigationListItem-cf7a0648.js +0 -2
  260. package/amd/TabBar-0b3704ca.js +0 -2
  261. package/amd/TabBarMixed-1cfdf66e.js +0 -2
  262. package/amd/useNavigationListItem-d79484b7.js +0 -2
  263. package/cjs/CheckboxSetContext-c62db26d.js +0 -12
  264. package/es/TextArea-6584935d.js.map +0 -1
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './BarGroup-d6909cb1', './useUser-e8dd7f7c', './layoutUtils-4304ffe4', './dataStyleUtils-a0ecedd5', './Chart-87ae799b'], (function(e,t,r,n,i,o,s){"use strict";function d(e,t,r,n){const i=o.getNextItemInGroup(e,r,n);if(i)return i;if(e.groupIndex<t){let i={seriesIndex:0,groupIndex:e.groupIndex+1};if(n(i.seriesIndex,i.groupIndex))return i;if(i=d(i,t,r,n),i)return i}return e}function a(e,t,r,n){const i=o.getPrevItemInGroup(e,n);if(i)return i;if(e.groupIndex>t){let i={groupIndex:e.groupIndex-1,seriesIndex:r-1};if(n(i.seriesIndex,i.groupIndex))return i;if(i=a(i,t,r,n),i)return i}return e}function I(e){return t.jsx(u,{datatip:()=>({content:""}),zoomAndScroll:"off",plotArea:{yMajorTick:{isRendered:!1},xMajorTick:{}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},overview:"off"})}const g=.5;function u({width:e,height:u,selectedIds:l=[],hiddenIds:c=[],highlightedIds:x,hideAndShowBehavior:p="none",orientation:f="vertical",yAxis:h,series:m,groups:S,isStacked:A=!1,getDataItem:w,selectionMode:v="none",drilling:y="off",dataItemGaps:D=.5,...R}){const{direction:G}=n.useUser(),k="rtl"===G,b=new Set(c),B="horizontal"===f,P=R.xAxis?.timeAxisType,j=new Set(l),L=new Set(x);return t.jsx(s.Chart,{width:e,height:u,selectedIds:j,hiddenIds:c,hideAndShowBehavior:p,orientation:f,yAxis:h,series:m,groups:S,isStacked:A,getDataItem:w,selectionMode:v,drilling:y,renderGridLinesInFront:!1,findNearest:(e,t,n,o)=>{const s=r.getSeriesOffsetAndWidth(n,o,m.length,D,A,k);return i.findNearestDataPoint(m,S,e,t,w,A,s,r.getBarCenterCoordinate,"log"===h?.scale,D,b,P)},getDataItemPos:(e,t,n,i)=>r.getBarPosition(m,S,w,e,t,b,D,n,i,"log"===h?.scale,A,k,B,P),getNavUtil:(e,t)=>function(e,t,r,n,i,s){const I=(t,r)=>{const n=e(t,r);return Boolean(n)};return(e,g)=>{if(!i&&("ArrowDown"===g||"ArrowUp"===g))return e;let u;const l={groupIndex:e.groupIndex,seriesIndex:e.seriesIndex};return l.groupIndex<r?(l.groupIndex=r,l):l.groupIndex>n?(l.groupIndex=n,l):(i?u="ArrowLeft"===g?s?o.getNextItemInSeries(l,n,I):o.getPrevItemInSeries(l,r,I):"ArrowRight"===g?s?o.getPrevItemInSeries(l,r,I):o.getNextItemInSeries(l,n,I):"ArrowDown"===g?o.getPrevItemInGroup(l,I):o.getNextItemInGroup(l,t,I):"ArrowRight"===g?u=s?a(l,r,t,I):d(l,n,t,I):"ArrowLeft"===g&&(u=s?d(l,n,t,I):a(l,r,t,I)),u||l)}}(w,m.length,e,t,A,k),getGapRatio:(e,t)=>r.getBarGapRatio(A,e,t),getMarkerInfo:(e,t)=>({color:o.getItemColor(e,t,m,w),type:"circle"}),isRtl:k,offset:g,defaultOverviewContentRenderer:()=>t.jsx(I,{series:m,groups:S,getDataItem:w}),...R,children:({xStartIndex:e,xEndIndex:n,xScale:i,yScale:o,gapRatio:s,activeId:d,focusedItemInfo:a,hoveredItemInfo:I,groupWidth:g,isPointInsideMarquee:u,getTextDimensions:l,defaultFontSize:c,colors:p})=>t.jsx(t.Fragment,{children:S.slice(e,n+1).map(((n,G)=>t.jsx(r.BarGroup,{yScale:o,xScale:i,groupIndex:G+e,selectedIds:j,hiddenIds:b,highlightedIds:x?L:x,isDrillEnabled:"on"===y,series:m,barGapRatio:s,dataItemGaps:D,isPointInsideMarquee:u,isStacked:A,groupWidth:g,group:S[G],timeAxisType:R.xAxis?.timeAxisType,colors:p,activeId:d,isLog:"log"===h?.scale,orientation:f,getDataItem:w,isSelectionEnabled:"none"!=v,isRtl:k,focusedItemInfo:a,hoveredItemInfo:I,getTextDimensions:l,defaultFontSize:c,getStackLabel:R.getStackLabel})))})})}e.BarChart=u}));
2
- //# sourceMappingURL=BarChart-254aecbb.js.map
1
+ define(['exports', 'preact/jsx-runtime', './BarGroup-d6909cb1', './useUser-e8dd7f7c', './layoutUtils-4304ffe4', './dataStyleUtils-a0ecedd5', './Chart-79cfc878'], (function(e,t,r,n,i,o,s){"use strict";function d(e,t,r,n){const i=o.getNextItemInGroup(e,r,n);if(i)return i;if(e.groupIndex<t){let i={seriesIndex:0,groupIndex:e.groupIndex+1};if(n(i.seriesIndex,i.groupIndex))return i;if(i=d(i,t,r,n),i)return i}return e}function a(e,t,r,n){const i=o.getPrevItemInGroup(e,n);if(i)return i;if(e.groupIndex>t){let i={groupIndex:e.groupIndex-1,seriesIndex:r-1};if(n(i.seriesIndex,i.groupIndex))return i;if(i=a(i,t,r,n),i)return i}return e}function I(e){return t.jsx(u,{datatip:()=>({content:""}),zoomAndScroll:"off",plotArea:{yMajorTick:{isRendered:!1},xMajorTick:{}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},overview:"off"})}const g=.5;function u({width:e,height:u,selectedIds:l=[],hiddenIds:c=[],highlightedIds:x,hideAndShowBehavior:p="none",orientation:f="vertical",yAxis:h,series:m,groups:S,isStacked:A=!1,getDataItem:w,selectionMode:v="none",drilling:y="off",dataItemGaps:D=.5,...R}){const{direction:G}=n.useUser(),k="rtl"===G,B=new Set(c),P="horizontal"===f,b=R.xAxis?.timeAxisType,j=new Set(l),L=new Set(x);return t.jsx(s.Chart,{width:e,height:u,selectedIds:j,hiddenIds:c,hideAndShowBehavior:p,orientation:f,yAxis:h,series:m,groups:S,isStacked:A,getDataItem:w,selectionMode:v,drilling:y,renderGridLinesInFront:!1,findNearest:(e,t,n,o)=>{const s=r.getSeriesOffsetAndWidth(n,o,m.length,D,A,k);return i.findNearestDataPoint(m,S,e,t,w,A,s,r.getBarCenterCoordinate,"log"===h?.scale,D,B,b)},getDataItemPos:(e,t,n,i)=>r.getBarPosition(m,S,w,e,t,B,D,n,i,"log"===h?.scale,A,k,P,b),getNavUtil:(e,t)=>function(e,t,r,n,i,s){const I=(t,r)=>{const n=e(t,r);return Boolean(n)};return(e,g)=>{if(!i&&("ArrowDown"===g||"ArrowUp"===g))return e;let u;const l={groupIndex:e.groupIndex,seriesIndex:e.seriesIndex};return l.groupIndex<r?(l.groupIndex=r,l):l.groupIndex>n?(l.groupIndex=n,l):(i?u="ArrowLeft"===g?s?o.getNextItemInSeries(l,n,I):o.getPrevItemInSeries(l,r,I):"ArrowRight"===g?s?o.getPrevItemInSeries(l,r,I):o.getNextItemInSeries(l,n,I):"ArrowDown"===g?o.getPrevItemInGroup(l,I):o.getNextItemInGroup(l,t,I):"ArrowRight"===g?u=s?a(l,r,t,I):d(l,n,t,I):"ArrowLeft"===g&&(u=s?d(l,n,t,I):a(l,r,t,I)),u||l)}}(w,m.length,e,t,A,k),getGapRatio:(e,t)=>r.getBarGapRatio(A,e,t),getMarkerInfo:(e,t)=>({color:o.getItemColor(e,t,m,w),type:"circle"}),isRtl:k,offset:g,defaultOverviewContentRenderer:()=>t.jsx(I,{series:m,groups:S,getDataItem:w}),...R,children:({xStartIndex:e,xEndIndex:n,xScale:i,yScale:o,gapRatio:s,activeId:d,focusedItemInfo:a,hoveredItemInfo:I,groupWidth:g,isPointInsideMarquee:u,getTextDimensions:l,defaultFontSize:c,colors:p})=>t.jsx(t.Fragment,{children:S.slice(e,n+1).map(((n,G)=>t.jsx(r.BarGroup,{yScale:o,xScale:i,groupIndex:G+e,selectedIds:j,hiddenIds:B,highlightedIds:x?L:x,isDrillEnabled:"on"===y,series:m,barGapRatio:s,dataItemGaps:D,isPointInsideMarquee:u,isStacked:A,groupWidth:g,group:S[G],timeAxisType:R.xAxis?.timeAxisType,colors:p,activeId:d,isLog:"log"===h?.scale,orientation:f,getDataItem:w,isSelectionEnabled:"none"!=v,isRtl:k,focusedItemInfo:a,hoveredItemInfo:I,getTextDimensions:l,defaultFontSize:c,getStackLabel:R.getStackLabel})))})})}e.BarChart=u}));
2
+ //# sourceMappingURL=BarChart-0ad4ca6d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarChart-254aecbb.js","sources":["../../src/UNSAFE_BarChart/utils/barNavUtils.ts","../../src/UNSAFE_BarChart/OverviewBarChart.tsx","../../src/UNSAFE_BarChart/BarChart.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 */\n\nimport { Info, ItemInfo } from '#utils/UNSAFE_visTypes/chart';\nimport {\n getNextItemInGroup,\n getNextItemInSeries,\n getPrevItemInGroup,\n getPrevItemInSeries\n} from '#utils/PRIVATE_chartUtils/navUtils';\nimport { BarItemData } from '#UNSAFE_BarChart/barChart.types';\n\ntype isItemNavigableType = (seriesIndex: number, groupIndex: number) => boolean;\n\n/**\n * Get next item in unstacked bar chart.\n * @param info\n * @param viewportEndIndex\n * @param numSeries\n * @param isNavigable\n * @returns\n */\nexport function getNextItem(\n info: ItemInfo,\n viewportEndIndex: number,\n numSeries: number,\n isNavigable: isItemNavigableType\n): ItemInfo {\n const nextItemInGroup = getNextItemInGroup(info, numSeries, isNavigable);\n if (nextItemInGroup) return nextItemInGroup;\n\n if (info.groupIndex < viewportEndIndex) {\n let nextItem = { seriesIndex: 0, groupIndex: info.groupIndex + 1 };\n if (isNavigable(nextItem.seriesIndex, nextItem.groupIndex)) return nextItem;\n nextItem = getNextItem(nextItem, viewportEndIndex, numSeries, isNavigable);\n if (nextItem) return nextItem;\n }\n return info;\n}\n\n/**\n * Get prev item in unstacked bar chart.\n * @param info\n * @param viewportStartIndex\n * @param numSeries\n * @param isNavigable\n * @returns\n */\nexport function getPreviousItem(\n info: ItemInfo,\n viewportStartIndex: number,\n numSeries: number,\n isNavigable: (seriesIndex: number, groupIndex: number) => boolean\n) {\n const prevItemInGroup = getPrevItemInGroup(info, isNavigable);\n if (prevItemInGroup) return prevItemInGroup;\n\n if (info.groupIndex > viewportStartIndex) {\n let prevItem = { groupIndex: info.groupIndex - 1, seriesIndex: numSeries - 1 };\n if (isNavigable(prevItem.seriesIndex, prevItem.groupIndex)) return prevItem;\n prevItem = getPreviousItem(prevItem, viewportStartIndex, numSeries, isNavigable);\n if (prevItem) return prevItem;\n }\n return info;\n}\n\nexport function getBarChartNavUtil<K, D extends BarItemData<K>>(\n getDataItem: (seriesIndex: number, groupIndex: number) => D | undefined,\n numSeries: number,\n viewportStartIndex: number,\n viewportEndIndex: number,\n isStacked: boolean,\n isRtl: boolean\n) {\n const isItemNavigable = (seriesIndex: number, groupIndex: number) => {\n const barItem = getDataItem(seriesIndex, groupIndex);\n return Boolean(barItem);\n };\n\n const getNextChartItem = (\n itemInfo: Info,\n arrow: 'ArrowLeft' | 'ArrowRight' | 'ArrowDown' | 'ArrowUp'\n ): Info => {\n if (!isStacked && (arrow === 'ArrowDown' || arrow === 'ArrowUp')) {\n return itemInfo;\n }\n let newInfo: Info | undefined;\n // TODO: this is just to keep typescript happy.\n // figure out consistent typing while doing type cleanup.\n const info = {\n groupIndex: itemInfo.groupIndex!,\n seriesIndex: itemInfo.seriesIndex!\n };\n\n if (info.groupIndex! < viewportStartIndex) {\n info.groupIndex = viewportStartIndex;\n return info;\n } else if (info.groupIndex! > viewportEndIndex) {\n info.groupIndex = viewportEndIndex;\n return info;\n }\n\n if (isStacked) {\n if (arrow === 'ArrowLeft') {\n newInfo = isRtl\n ? getNextItemInSeries(info, viewportEndIndex, isItemNavigable)\n : getPrevItemInSeries(info, viewportStartIndex, isItemNavigable);\n } else if (arrow === 'ArrowRight') {\n newInfo = isRtl\n ? getPrevItemInSeries(info, viewportStartIndex, isItemNavigable)\n : getNextItemInSeries(info, viewportEndIndex, isItemNavigable);\n } else if (arrow === 'ArrowDown') {\n newInfo = getPrevItemInGroup(info, isItemNavigable);\n } else {\n newInfo = getNextItemInGroup(info, numSeries, isItemNavigable);\n }\n } else {\n if (arrow === 'ArrowRight') {\n newInfo = isRtl\n ? getPreviousItem(info, viewportStartIndex, numSeries, isItemNavigable)\n : getNextItem(info, viewportEndIndex, numSeries, isItemNavigable);\n } else if (arrow === 'ArrowLeft') {\n newInfo = isRtl\n ? getNextItem(info, viewportEndIndex, numSeries, isItemNavigable)\n : getPreviousItem(info, viewportStartIndex, numSeries, isItemNavigable);\n }\n }\n return newInfo || info;\n };\n\n return getNextChartItem;\n}\n","import { BarChart } from './BarChart';\nimport { BarChartProps, BarItemData } from './barChart.types';\n\nexport function OverviewBarChart<K extends string | number, D extends BarItemData<K>>(\n props: BarChartProps<K, D>\n) {\n return (\n <BarChart\n datatip={() => ({ content: '' })}\n zoomAndScroll=\"off\"\n plotArea={{\n yMajorTick: {\n isRendered: false\n },\n xMajorTick: {\n \n }\n }}\n xAxis={{\n tickLabel: {\n autoRotate: false,\n // @ts-ignore\n isRendered: props.xAxis?.timeAxisType ? true : false\n }\n }}\n series={props.series}\n groups={props.groups}\n getDataItem={props.getDataItem}\n yAxis={{\n tickLabel: {\n isRendered: false\n }\n }}\n overview=\"off\"\n />\n );\n}\n","/**\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 */\n\nimport { BarChartProps, BarItemData } from './barChart.types';\nimport { getBarGapRatio } from './utils/barSeriesUtils';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { BarGroup } from './BarGroup';\nimport { findNearestDataPoint } from '#utils/PRIVATE_chartUtils/layoutUtils';\nimport {\n getBarCenterCoordinate,\n getBarPosition,\n getSeriesOffsetAndWidth\n} from './utils/barLayoutUtils';\nimport { getBarChartNavUtil } from './utils/barNavUtils';\nimport { Chart } from '#PRIVATE_Chart';\nimport { TimeAxisProps, Scale } from '#utils/UNSAFE_visTypes/chart';\nimport { getItemColor } from '#utils/PRIVATE_chartUtils/dataStyleUtils';\nimport { OverviewBarChart } from './OverviewBarChart';\n\n/* bar chart start and end axis offset */\nconst AXIS_OFFSET = 0.5;\n\n/**\n * A Bar chart displays information graphically using rectangular bars with heights or lengths proportional to the values that they represent,\n * making relationships among the data easier to understand.\n */\nexport function BarChart<K extends string | number, D extends BarItemData<K>>({\n width,\n height,\n selectedIds = [],\n hiddenIds = [],\n highlightedIds,\n hideAndShowBehavior = 'none',\n orientation = 'vertical',\n yAxis,\n series,\n groups,\n isStacked = false,\n getDataItem,\n selectionMode = 'none',\n drilling = 'off',\n dataItemGaps = 0.5,\n ...props\n}: BarChartProps<K, D>) {\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n const hiddenSet = new Set(hiddenIds);\n const isHoriz = orientation === 'horizontal';\n const timeAxisType = (props.xAxis as TimeAxisProps)?.timeAxisType;\n const selectedSet = new Set(selectedIds);\n const highlightedSet = new Set(highlightedIds);\n const getGapRatio = (startIndex: number, endIndex: number) => {\n return getBarGapRatio(isStacked, startIndex, endIndex);\n };\n const getNextChartItemFunc = (startIndex: number, endIndex: number) => {\n return getBarChartNavUtil(getDataItem, series.length, startIndex, endIndex, isStacked, isRtl);\n };\n const getDataItemPos = (xScale: Scale, yScale: Scale, groupWidth: number, gapRatio: number) => {\n return getBarPosition(\n series,\n groups,\n getDataItem,\n xScale,\n yScale,\n hiddenSet,\n dataItemGaps,\n groupWidth,\n gapRatio,\n yAxis?.scale === 'log',\n isStacked,\n isRtl,\n isHoriz,\n timeAxisType\n );\n };\n\n const findNearest = (xScale: Scale, yScale: Scale, groupWidth: number, gapRatio: number) => {\n const getSeriesDataInfo = getSeriesOffsetAndWidth(\n groupWidth,\n gapRatio,\n series.length,\n dataItemGaps,\n isStacked,\n isRtl\n );\n return findNearestDataPoint(\n series,\n groups,\n xScale,\n yScale,\n getDataItem,\n isStacked,\n getSeriesDataInfo,\n getBarCenterCoordinate,\n yAxis?.scale === 'log',\n dataItemGaps,\n hiddenSet,\n timeAxisType\n );\n };\n\n const getMarkerColorAndType = (seriesIndex: number, groupIndex: number) => {\n return {\n color: getItemColor(seriesIndex, groupIndex, series, getDataItem),\n type: 'circle' as const\n };\n };\n\n return (\n <Chart\n width={width}\n height={height}\n selectedIds={selectedSet}\n hiddenIds={hiddenIds}\n hideAndShowBehavior={hideAndShowBehavior}\n orientation={orientation}\n yAxis={yAxis}\n series={series}\n groups={groups}\n isStacked={isStacked}\n getDataItem={getDataItem}\n selectionMode={selectionMode}\n drilling={drilling}\n renderGridLinesInFront={false}\n findNearest={findNearest}\n getDataItemPos={getDataItemPos}\n getNavUtil={getNextChartItemFunc}\n getGapRatio={getGapRatio}\n getMarkerInfo={getMarkerColorAndType}\n isRtl={isRtl}\n offset={AXIS_OFFSET}\n defaultOverviewContentRenderer={() => {\n return <OverviewBarChart series={series} groups={groups} getDataItem={getDataItem} />;\n }}\n {...props}>\n {({\n xStartIndex,\n xEndIndex,\n xScale,\n yScale,\n gapRatio,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n groupWidth,\n isPointInsideMarquee,\n getTextDimensions,\n defaultFontSize,\n colors\n }) => {\n return (\n <>\n {groups.slice(xStartIndex, xEndIndex + 1).map((_, index) => (\n <BarGroup\n yScale={yScale}\n xScale={xScale}\n groupIndex={index + xStartIndex}\n selectedIds={selectedSet}\n hiddenIds={hiddenSet}\n highlightedIds={highlightedIds ? highlightedSet : highlightedIds}\n isDrillEnabled={drilling === 'on'}\n series={series}\n barGapRatio={gapRatio}\n dataItemGaps={dataItemGaps}\n isPointInsideMarquee={isPointInsideMarquee}\n isStacked={isStacked}\n groupWidth={groupWidth}\n group={groups[index]}\n timeAxisType={(props.xAxis as TimeAxisProps)?.timeAxisType}\n colors={colors}\n activeId={activeId}\n isLog={yAxis?.scale === 'log'}\n orientation={orientation}\n getDataItem={getDataItem}\n isSelectionEnabled={selectionMode != 'none'}\n isRtl={isRtl}\n focusedItemInfo={focusedItemInfo}\n hoveredItemInfo={hoveredItemInfo}\n getTextDimensions={getTextDimensions}\n defaultFontSize={defaultFontSize}\n getStackLabel={props.getStackLabel}\n />\n ))}\n </>\n );\n }}\n </Chart>\n );\n}\n"],"names":["getNextItem","info","viewportEndIndex","numSeries","isNavigable","nextItemInGroup","getNextItemInGroup","groupIndex","nextItem","seriesIndex","getPreviousItem","viewportStartIndex","prevItemInGroup","getPrevItemInGroup","prevItem","OverviewBarChart","props","_jsx","BarChart","datatip","content","zoomAndScroll","plotArea","yMajorTick","isRendered","xMajorTick","xAxis","tickLabel","autoRotate","timeAxisType","series","groups","getDataItem","yAxis","overview","AXIS_OFFSET","width","height","selectedIds","hiddenIds","highlightedIds","hideAndShowBehavior","orientation","isStacked","selectionMode","drilling","dataItemGaps","direction","useUser","isRtl","hiddenSet","Set","isHoriz","selectedSet","highlightedSet","Chart","renderGridLinesInFront","findNearest","xScale","yScale","groupWidth","gapRatio","getSeriesDataInfo","getSeriesOffsetAndWidth","length","findNearestDataPoint","getBarCenterCoordinate","scale","getDataItemPos","getBarPosition","getNavUtil","startIndex","endIndex","isItemNavigable","barItem","Boolean","itemInfo","arrow","newInfo","getNextItemInSeries","getPrevItemInSeries","getBarChartNavUtil","getGapRatio","getBarGapRatio","getMarkerInfo","color","getItemColor","type","offset","defaultOverviewContentRenderer","jsx","children","xStartIndex","xEndIndex","activeId","focusedItemInfo","hoveredItemInfo","isPointInsideMarquee","getTextDimensions","defaultFontSize","colors","_Fragment","Fragment","slice","map","_","index","BarGroup","isDrillEnabled","barGapRatio","group","isLog","isSelectionEnabled","getStackLabel"],"mappings":"iMA2BM,SAAUA,EACdC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAkBC,EAAkBA,mBAACL,EAAME,EAAWC,GAC5D,GAAIC,EAAiB,OAAOA,EAE5B,GAAIJ,EAAKM,WAAaL,EAAkB,CACtC,IAAIM,EAAW,CAAEC,YAAa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BtD,YAAae,EACbd,UAAWW,EACXV,eAAgBA,EAAiBc,EAAiBd,EAClDoE,eAA6B,OAAb/D,EAChBf,OAAQA,EACR+E,YAAahD,EACbf,aAAcA,EACdmD,qBAAsBA,EACtBtD,UAAWA,EACXiB,WAAYA,EACZkD,MAAO/E,EAAO2E,GACd7E,aAAeb,EAAMU,OAAyBG,aAC9CuE,OAAQA,EACRN,SAAUA,EACViB,MAAwB,QAAjB9E,GAAOkC,MACdzB,YAAaA,EACbV,YAAaA,EACbgF,mBAAqC,QAAjBpE,EACpBK,MAAOA,EACP8C,gBAAiBA,EACjBC,gBAAiBA,EACjBE,kBAAmBA,EACnBC,gBAAiBA,EACjBc,cAAejG,EAAMiG,qBAQrC"}
1
+ {"version":3,"file":"BarChart-0ad4ca6d.js","sources":["../../src/UNSAFE_BarChart/utils/barNavUtils.ts","../../src/UNSAFE_BarChart/OverviewBarChart.tsx","../../src/UNSAFE_BarChart/BarChart.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 */\n\nimport { Info, ItemInfo } from '#utils/UNSAFE_visTypes/chart';\nimport {\n getNextItemInGroup,\n getNextItemInSeries,\n getPrevItemInGroup,\n getPrevItemInSeries\n} from '#utils/PRIVATE_chartUtils/navUtils';\nimport { BarItemData } from '#UNSAFE_BarChart/barChart.types';\n\ntype isItemNavigableType = (seriesIndex: number, groupIndex: number) => boolean;\n\n/**\n * Get next item in unstacked bar chart.\n * @param info\n * @param viewportEndIndex\n * @param numSeries\n * @param isNavigable\n * @returns\n */\nexport function getNextItem(\n info: ItemInfo,\n viewportEndIndex: number,\n numSeries: number,\n isNavigable: isItemNavigableType\n): ItemInfo {\n const nextItemInGroup = getNextItemInGroup(info, numSeries, isNavigable);\n if (nextItemInGroup) return nextItemInGroup;\n\n if (info.groupIndex < viewportEndIndex) {\n let nextItem = { seriesIndex: 0, groupIndex: info.groupIndex + 1 };\n if (isNavigable(nextItem.seriesIndex, nextItem.groupIndex)) return nextItem;\n nextItem = getNextItem(nextItem, viewportEndIndex, numSeries, isNavigable);\n if (nextItem) return nextItem;\n }\n return info;\n}\n\n/**\n * Get prev item in unstacked bar chart.\n * @param info\n * @param viewportStartIndex\n * @param numSeries\n * @param isNavigable\n * @returns\n */\nexport function getPreviousItem(\n info: ItemInfo,\n viewportStartIndex: number,\n numSeries: number,\n isNavigable: (seriesIndex: number, groupIndex: number) => boolean\n) {\n const prevItemInGroup = getPrevItemInGroup(info, isNavigable);\n if (prevItemInGroup) return prevItemInGroup;\n\n if (info.groupIndex > viewportStartIndex) {\n let prevItem = { groupIndex: info.groupIndex - 1, seriesIndex: numSeries - 1 };\n if (isNavigable(prevItem.seriesIndex, prevItem.groupIndex)) return prevItem;\n prevItem = getPreviousItem(prevItem, viewportStartIndex, numSeries, isNavigable);\n if (prevItem) return prevItem;\n }\n return info;\n}\n\nexport function getBarChartNavUtil<K, D extends BarItemData<K>>(\n getDataItem: (seriesIndex: number, groupIndex: number) => D | undefined,\n numSeries: number,\n viewportStartIndex: number,\n viewportEndIndex: number,\n isStacked: boolean,\n isRtl: boolean\n) {\n const isItemNavigable = (seriesIndex: number, groupIndex: number) => {\n const barItem = getDataItem(seriesIndex, groupIndex);\n return Boolean(barItem);\n };\n\n const getNextChartItem = (\n itemInfo: Info,\n arrow: 'ArrowLeft' | 'ArrowRight' | 'ArrowDown' | 'ArrowUp'\n ): Info => {\n if (!isStacked && (arrow === 'ArrowDown' || arrow === 'ArrowUp')) {\n return itemInfo;\n }\n let newInfo: Info | undefined;\n // TODO: this is just to keep typescript happy.\n // figure out consistent typing while doing type cleanup.\n const info = {\n groupIndex: itemInfo.groupIndex!,\n seriesIndex: itemInfo.seriesIndex!\n };\n\n if (info.groupIndex! < viewportStartIndex) {\n info.groupIndex = viewportStartIndex;\n return info;\n } else if (info.groupIndex! > viewportEndIndex) {\n info.groupIndex = viewportEndIndex;\n return info;\n }\n\n if (isStacked) {\n if (arrow === 'ArrowLeft') {\n newInfo = isRtl\n ? getNextItemInSeries(info, viewportEndIndex, isItemNavigable)\n : getPrevItemInSeries(info, viewportStartIndex, isItemNavigable);\n } else if (arrow === 'ArrowRight') {\n newInfo = isRtl\n ? getPrevItemInSeries(info, viewportStartIndex, isItemNavigable)\n : getNextItemInSeries(info, viewportEndIndex, isItemNavigable);\n } else if (arrow === 'ArrowDown') {\n newInfo = getPrevItemInGroup(info, isItemNavigable);\n } else {\n newInfo = getNextItemInGroup(info, numSeries, isItemNavigable);\n }\n } else {\n if (arrow === 'ArrowRight') {\n newInfo = isRtl\n ? getPreviousItem(info, viewportStartIndex, numSeries, isItemNavigable)\n : getNextItem(info, viewportEndIndex, numSeries, isItemNavigable);\n } else if (arrow === 'ArrowLeft') {\n newInfo = isRtl\n ? getNextItem(info, viewportEndIndex, numSeries, isItemNavigable)\n : getPreviousItem(info, viewportStartIndex, numSeries, isItemNavigable);\n }\n }\n return newInfo || info;\n };\n\n return getNextChartItem;\n}\n","import { BarChart } from './BarChart';\nimport { BarChartProps, BarItemData } from './barChart.types';\n\nexport function OverviewBarChart<K extends string | number, D extends BarItemData<K>>(\n props: BarChartProps<K, D>\n) {\n return (\n <BarChart\n datatip={() => ({ content: '' })}\n zoomAndScroll=\"off\"\n plotArea={{\n yMajorTick: {\n isRendered: false\n },\n xMajorTick: {\n \n }\n }}\n xAxis={{\n tickLabel: {\n autoRotate: false,\n // @ts-ignore\n isRendered: props.xAxis?.timeAxisType ? true : false\n }\n }}\n series={props.series}\n groups={props.groups}\n getDataItem={props.getDataItem}\n yAxis={{\n tickLabel: {\n isRendered: false\n }\n }}\n overview=\"off\"\n />\n );\n}\n","/**\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 */\n\nimport { BarChartProps, BarItemData } from './barChart.types';\nimport { getBarGapRatio } from './utils/barSeriesUtils';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { BarGroup } from './BarGroup';\nimport { findNearestDataPoint } from '#utils/PRIVATE_chartUtils/layoutUtils';\nimport {\n getBarCenterCoordinate,\n getBarPosition,\n getSeriesOffsetAndWidth\n} from './utils/barLayoutUtils';\nimport { getBarChartNavUtil } from './utils/barNavUtils';\nimport { Chart } from '#PRIVATE_Chart';\nimport { TimeAxisProps, Scale } from '#utils/UNSAFE_visTypes/chart';\nimport { getItemColor } from '#utils/PRIVATE_chartUtils/dataStyleUtils';\nimport { OverviewBarChart } from './OverviewBarChart';\n\n/* bar chart start and end axis offset */\nconst AXIS_OFFSET = 0.5;\n\n/**\n * A Bar chart displays information graphically using rectangular bars with heights or lengths proportional to the values that they represent,\n * making relationships among the data easier to understand.\n */\nexport function BarChart<K extends string | number, D extends BarItemData<K>>({\n width,\n height,\n selectedIds = [],\n hiddenIds = [],\n highlightedIds,\n hideAndShowBehavior = 'none',\n orientation = 'vertical',\n yAxis,\n series,\n groups,\n isStacked = false,\n getDataItem,\n selectionMode = 'none',\n drilling = 'off',\n dataItemGaps = 0.5,\n ...props\n}: BarChartProps<K, D>) {\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n const hiddenSet = new Set(hiddenIds);\n const isHoriz = orientation === 'horizontal';\n const timeAxisType = (props.xAxis as TimeAxisProps)?.timeAxisType;\n const selectedSet = new Set(selectedIds);\n const highlightedSet = new Set(highlightedIds);\n const getGapRatio = (startIndex: number, endIndex: number) => {\n return getBarGapRatio(isStacked, startIndex, endIndex);\n };\n const getNextChartItemFunc = (startIndex: number, endIndex: number) => {\n return getBarChartNavUtil(getDataItem, series.length, startIndex, endIndex, isStacked, isRtl);\n };\n const getDataItemPos = (xScale: Scale, yScale: Scale, groupWidth: number, gapRatio: number) => {\n return getBarPosition(\n series,\n groups,\n getDataItem,\n xScale,\n yScale,\n hiddenSet,\n dataItemGaps,\n groupWidth,\n gapRatio,\n yAxis?.scale === 'log',\n isStacked,\n isRtl,\n isHoriz,\n timeAxisType\n );\n };\n\n const findNearest = (xScale: Scale, yScale: Scale, groupWidth: number, gapRatio: number) => {\n const getSeriesDataInfo = getSeriesOffsetAndWidth(\n groupWidth,\n gapRatio,\n series.length,\n dataItemGaps,\n isStacked,\n isRtl\n );\n return findNearestDataPoint(\n series,\n groups,\n xScale,\n yScale,\n getDataItem,\n isStacked,\n getSeriesDataInfo,\n getBarCenterCoordinate,\n yAxis?.scale === 'log',\n dataItemGaps,\n hiddenSet,\n timeAxisType\n );\n };\n\n const getMarkerColorAndType = (seriesIndex: number, groupIndex: number) => {\n return {\n color: getItemColor(seriesIndex, groupIndex, series, getDataItem),\n type: 'circle' as const\n };\n };\n\n return (\n <Chart\n width={width}\n height={height}\n selectedIds={selectedSet}\n hiddenIds={hiddenIds}\n hideAndShowBehavior={hideAndShowBehavior}\n orientation={orientation}\n yAxis={yAxis}\n series={series}\n groups={groups}\n isStacked={isStacked}\n getDataItem={getDataItem}\n selectionMode={selectionMode}\n drilling={drilling}\n renderGridLinesInFront={false}\n findNearest={findNearest}\n getDataItemPos={getDataItemPos}\n getNavUtil={getNextChartItemFunc}\n getGapRatio={getGapRatio}\n getMarkerInfo={getMarkerColorAndType}\n isRtl={isRtl}\n offset={AXIS_OFFSET}\n defaultOverviewContentRenderer={() => {\n return <OverviewBarChart series={series} groups={groups} getDataItem={getDataItem} />;\n }}\n {...props}>\n {({\n xStartIndex,\n xEndIndex,\n xScale,\n yScale,\n gapRatio,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n groupWidth,\n isPointInsideMarquee,\n getTextDimensions,\n defaultFontSize,\n colors\n }) => {\n return (\n <>\n {groups.slice(xStartIndex, xEndIndex + 1).map((_, index) => (\n <BarGroup\n yScale={yScale}\n xScale={xScale}\n groupIndex={index + xStartIndex}\n selectedIds={selectedSet}\n hiddenIds={hiddenSet}\n highlightedIds={highlightedIds ? highlightedSet : highlightedIds}\n isDrillEnabled={drilling === 'on'}\n series={series}\n barGapRatio={gapRatio}\n dataItemGaps={dataItemGaps}\n isPointInsideMarquee={isPointInsideMarquee}\n isStacked={isStacked}\n groupWidth={groupWidth}\n group={groups[index]}\n timeAxisType={(props.xAxis as TimeAxisProps)?.timeAxisType}\n colors={colors}\n activeId={activeId}\n isLog={yAxis?.scale === 'log'}\n orientation={orientation}\n getDataItem={getDataItem}\n isSelectionEnabled={selectionMode != 'none'}\n isRtl={isRtl}\n focusedItemInfo={focusedItemInfo}\n hoveredItemInfo={hoveredItemInfo}\n getTextDimensions={getTextDimensions}\n defaultFontSize={defaultFontSize}\n getStackLabel={props.getStackLabel}\n />\n ))}\n </>\n );\n }}\n </Chart>\n );\n}\n"],"names":["getNextItem","info","viewportEndIndex","numSeries","isNavigable","nextItemInGroup","getNextItemInGroup","groupIndex","nextItem","seriesIndex","getPreviousItem","viewportStartIndex","prevItemInGroup","getPrevItemInGroup","prevItem","OverviewBarChart","props","_jsx","BarChart","datatip","content","zoomAndScroll","plotArea","yMajorTick","isRendered","xMajorTick","xAxis","tickLabel","autoRotate","timeAxisType","series","groups","getDataItem","yAxis","overview","AXIS_OFFSET","width","height","selectedIds","hiddenIds","highlightedIds","hideAndShowBehavior","orientation","isStacked","selectionMode","drilling","dataItemGaps","direction","useUser","isRtl","hiddenSet","Set","isHoriz","selectedSet","highlightedSet","Chart","renderGridLinesInFront","findNearest","xScale","yScale","groupWidth","gapRatio","getSeriesDataInfo","getSeriesOffsetAndWidth","length","findNearestDataPoint","getBarCenterCoordinate","scale","getDataItemPos","getBarPosition","getNavUtil","startIndex","endIndex","isItemNavigable","barItem","Boolean","itemInfo","arrow","newInfo","getNextItemInSeries","getPrevItemInSeries","getBarChartNavUtil","getGapRatio","getBarGapRatio","getMarkerInfo","color","getItemColor","type","offset","defaultOverviewContentRenderer","jsx","children","xStartIndex","xEndIndex","activeId","focusedItemInfo","hoveredItemInfo","isPointInsideMarquee","getTextDimensions","defaultFontSize","colors","_Fragment","Fragment","slice","map","_","index","BarGroup","isDrillEnabled","barGapRatio","group","isLog","isSelectionEnabled","getStackLabel"],"mappings":"iMA2BM,SAAUA,EACdC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAkBC,EAAkBA,mBAACL,EAAME,EAAWC,GAC5D,GAAIC,EAAiB,OAAOA,EAE5B,GAAIJ,EAAKM,WAAaL,EAAkB,CACtC,IAAIM,EAAW,CAAEC,YAAa,EAAGF,WAAYN,EAAKM,WAAa,GAC/D,GAAIH,EAAYI,EAASC,YAAaD,EAASD,YAAa,OAAOC,EAEnE,GADAA,EAAWR,EAAYQ,EAAUN,EAAkBC,EAAWC,GAC1DI,EAAU,OAAOA,CACtB,CACD,OAAOP,CACT,CAUM,SAAUS,EACdT,EACAU,EACAR,EACAC,GAEA,MAAMQ,EAAkBC,EAAAA,mBAAmBZ,EAAMG,GACjD,GAAIQ,EAAiB,OAAOA,EAE5B,GAAIX,EAAKM,WAAaI,EAAoB,CACxC,IAAIG,EAAW,CAAEP,WAAYN,EAAKM,WAAa,EAAGE,YAAaN,EAAY,GAC3E,GAAIC,EAAYU,EAASL,YAAaK,EAASP,YAAa,OAAOO,EAEnE,GADAA,EAAWJ,EAAgBI,EAAUH,EAAoBR,EAAWC,GAChEU,EAAU,OAAOA,CACtB,CACD,OAAOb,CACT,CClEM,SAAUc,EACdC,GAEA,OACEC,MAACC,EAAQ,CACPC,QAAS,KAAO,CAAEC,QAAS,KAC3BC,cAAc,MACdC,SAAU,CACRC,WAAY,CACVC,YAAY,GAEdC,WAAY,CAEX,GAEHC,MAAO,CACLC,UAAW,CACTC,YAAY,EAEZJ,aAAYR,EAAMU,OAAOG,eAG7BC,OAAQd,EAAMc,OACdC,OAAQf,EAAMe,OACdC,YAAahB,EAAMgB,YACnBC,MAAO,CACLN,UAAW,CACTH,YAAY,IAGhBU,SAAS,OAGf,CCXA,MAAMC,EAAc,GAMd,SAAUjB,GAA8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YAAaA,OAEpEhB,EACH2E,SAAA,EACCC,cACAC,YACAnC,SACAC,SACAE,WACAiC,WACAC,kBACAC,kBACApC,aACAqC,uBACAC,oBACAC,kBACAC,YAGEnF,EACGyE,IAAAW,EAAAC,SAAA,CAAAX,SAAA5D,EAAOwE,MAAMX,EAAaC,EAAY,GAAGW,KAAI,CAACC,EAAGC,IAChDzF,MAAC0F,EAAAA,SAAQ,CACPhD,OAAQA,EACRD,OAAQA,EACRnD,WAAYmG,EAAQd,EACpBtD,YAAae,EACbd,UAAWW,EACXV,eAAgBA,EAAiBc,EAAiBd,EAClDoE,eAA6B,OAAb/D,EAChBf,OAAQA,EACR+E,YAAahD,EACbf,aAAcA,EACdmD,qBAAsBA,EACtBtD,UAAWA,EACXiB,WAAYA,EACZkD,MAAO/E,EAAO2E,GACd7E,aAAeb,EAAMU,OAAyBG,aAC9CuE,OAAQA,EACRN,SAAUA,EACViB,MAAwB,QAAjB9E,GAAOkC,MACdzB,YAAaA,EACbV,YAAaA,EACbgF,mBAAqC,QAAjBpE,EACpBK,MAAOA,EACP8C,gBAAiBA,EACjBC,gBAAiBA,EACjBE,kBAAmBA,EACnBC,gBAAiBA,EACjBc,cAAejG,EAAMiG,qBAQrC"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './Text-0609bf4d', './usePress-949a0d03', './mergeProps-bcfa6a92', './classNames-08d99695', './useInteractionStyle-ee1dc0c0', './useComponentTheme-5aa41a8f', 'preact', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './UNSAFE_NavigationListCommon/themes/redwood/NavigationListItemTheme', './Flex-b8764305', './WarningS-83630d39', './ErrorS-f5d0be49', './InformationS-3dc89e6f', './SuccessS-64274879', './Badge-b28ef084'], (function(e,s,t,n,a,i,o,r,l,c,d,m,u,g,v,p,x,S,h){"use strict";const f=c.createContext(null);function C(){return t.useContext(f)}const y=d.mergeInterpolations([...Object.values(m.flexitemInterpolations)]),{class:b,...j}=y({alignSelf:"center"});e.BaseNavigationListItem=function({itemKey:e,label:c,badge:d,metadata:m,severity:f="none",removeIcon:y}){const I=t.useRef(null),{itemId:N,itemHandlers:H,itemClasses:T,isSelected:L,labelContainerClasses:P,labelContainerStyle:w}=function({itemKey:e}){const{onSelectionChange:s,selection:n,currentKey:c,showFocusRing:d,navigationListItemPrefix:m}=C(),g=c===e,v=n===e,{interactionProps:p,applyPseudoHoverStyle:x,applyHoverStyle:S,applyActiveStyle:h}=r.useInteractionStyle(),{classes:f,styles:{labelContainerClasses:y}}=l.useComponentTheme(u.NavigationListItemRedwoodTheme,{focusRing:d?"isFocusRing":"notFocusRing",current:g?"isCurrent":"notCurrtent",selected:v?"isSelected":"notSelected",hybridHover:S?"isHybridHover":"notHybridHover",pseudoHover:x?"isPseudoHover":"notPseudoHover",active:h?"isActive":"notActive"}),I=t.useCallback((()=>{s?.({value:e,reason:"pointer"})}),[e,s]),{pressProps:N}=a.usePress(I);return{itemId:m+e,itemHandlers:i.mergeProps(p,N),itemClasses:o.classNames([f]),isSelected:v,labelContainerClasses:o.classNames([y,b]),labelContainerStyle:j}}({itemKey:e}),R=!("none"===f||void 0===f),{styles:{iconLabelContainer:F,iconContainer:A,navigationItemMetadata:K}}=l.useComponentTheme(u.NavigationListItemRedwoodTheme),k=o.classNames([K]),B=o.classNames([F,A]),{styles:{navigationlistRemoveIcon:E}}=l.useComponentTheme(u.NavigationListItemRedwoodTheme),z=o.classNames([E]);return s.jsxs("li",{role:"tab",...H,"data-oj-key":e,id:N,class:T,"aria-selected":L,ref:I,children:[c&&s.jsx("span",{class:P,style:w,children:s.jsx(n.Text,{size:"inherit",weight:"inherit",variant:"inherit",children:c})}),(m||R||d||y)&&s.jsxs(g.Flex,{gap:"2x",align:"center",justify:"end",flex:"1 1 auto",children:[" ",d&&s.jsx("span",{class:B,children:s.jsx(h.Badge,{size:"md",variant:"neutralSubtle",children:d})}),m&&s.jsx("span",{class:k,children:s.jsx(n.Text,{children:"( "+m+" )"})}),R&&s.jsx("span",{class:B,children:(e=>{switch(e){case"error":return s.jsx(p.SvgErrorS,{color:"danger"});case"warning":return s.jsx(v.SvgWarningS,{color:"warning"});case"info":return s.jsx(x.SvgInformationS,{color:"info"});case"confirmation":return s.jsx(S.SvgSuccessS,{color:"success"});default:return null}})(f)}),y&&s.jsx("span",{class:z,children:y})]})]})},e.NavigationListContext=f,e.useNavigationListContext=C}));
2
+ //# sourceMappingURL=BaseNavigationListItem-84f4be5c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseNavigationListItem-709591de.js","sources":["../../src/UNSAFE_NavigationListCommon/NavigationListContext.ts","../../src/UNSAFE_NavigationListCommon/useNavigationListContext.ts","../../src/UNSAFE_NavigationListCommon/useNavigationListItem.ts","../../src/UNSAFE_NavigationListCommon/BaseNavigationListItem.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 */\n\nimport { createContext } from 'preact';\nimport { NavigationListProps } from './NavigationListProps';\n\ntype CurrentKeyDetail<K> = {\n value: K;\n};\n\nexport type NavigationListContextProps<K extends string | number> = Pick<\n NavigationListProps<K>,\n 'selection' | 'onSelectionChange' | 'onRemove'\n> & {\n currentKey?: K;\n showFocusRing: boolean;\n onCurrentKeyChange:\n | (<K extends string | number>(detail: CurrentKeyDetail<K>) => void)\n | undefined;\n navigationListItemPrefix: string;\n};\n\n/**\n * Context used to pass navlist information without having to pass it to navlist children props.\n * We want to communicate information down to any interested navlist item children.\n */\n\nconst NavigationListContext = createContext<NavigationListContextProps<string | number>>(null!);\n\nexport { NavigationListContext };\n","/**\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 */\n\nimport { useContext } from 'preact/hooks';\nimport { NavigationListContext } from './NavigationListContext';\n\n/**\n * Utility hook for consuming the NavigationListContext\n *\n * @returns The value of NavigationListContext provider\n */\nfunction useNavigationListContext() {\n return useContext(NavigationListContext);\n}\n\nexport { useNavigationListContext };\n","import { useCallback } from 'preact/hooks';\n\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { useInteractionStyle } from '../hooks/UNSAFE_useInteractionStyle';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { useNavigationListContext } from './useNavigationListContext';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport {\n NavigationListItemStyles,\n NavigationListItemVariantOptions\n} from '../UNSAFE_NavigationList/themes/NavigationListItemStyles.css';\nimport { NavigationListItemRedwoodTheme } from './themes/redwood/NavigationListItemTheme';\n\nconst flexItemStyleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n]);\nconst { class: labelContainerFlexItemClasses, ...labelContainerFlexItemStyle } =\n flexItemStyleInterpolations({\n alignSelf: 'center'\n });\n\nexport function useNavigationListItem<K extends string | number>({ itemKey }: { itemKey: K }) {\n const { onSelectionChange, selection, currentKey, showFocusRing, navigationListItemPrefix } =\n useNavigationListContext();\n\n //Selection and focus state\n const isCurrent = currentKey === itemKey;\n\n const isSelected = selection === itemKey;\n\n //Styling\n const { interactionProps, applyPseudoHoverStyle, applyHoverStyle, applyActiveStyle } =\n useInteractionStyle();\n\n const {\n classes: listItemClasses,\n styles: { labelContainerClasses }\n } = useComponentTheme<NavigationListItemVariantOptions, NavigationListItemStyles>(\n NavigationListItemRedwoodTheme,\n {\n focusRing: showFocusRing ? 'isFocusRing' : 'notFocusRing',\n current: isCurrent ? 'isCurrent' : 'notCurrtent',\n selected: isSelected ? 'isSelected' : 'notSelected',\n hybridHover: applyHoverStyle ? 'isHybridHover' : 'notHybridHover',\n pseudoHover: applyPseudoHoverStyle ? 'isPseudoHover' : 'notPseudoHover',\n active: applyActiveStyle ? 'isActive' : 'notActive'\n }\n );\n\n //Item handlers\n const handlePress = useCallback(() => {\n onSelectionChange?.({ value: itemKey as K, reason: 'pointer' });\n }, [itemKey, onSelectionChange]);\n\n //Legacy navlist makes selection on keyDown, but since preact tabbar made selection after keyUp, will do the same\n //for preact navlist\n const { pressProps } = usePress(handlePress);\n\n return {\n itemId: navigationListItemPrefix + itemKey,\n itemHandlers: mergeProps(interactionProps, pressProps /*,onFocusProps*/),\n itemClasses: classNames([listItemClasses]),\n isSelected,\n labelContainerClasses: classNames([labelContainerClasses, labelContainerFlexItemClasses]),\n labelContainerStyle: labelContainerFlexItemStyle\n };\n}\n","import { useRef } from 'preact/hooks';\n\nimport { Text } from '../UNSAFE_Text';\n\nimport { useNavigationListItem } from './useNavigationListItem';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Badge } from '../UNSAFE_Badge';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { WarningS } from '../UNSAFE_RedwoodIcons/WarningS';\nimport { ErrorS } from '../UNSAFE_RedwoodIcons/ErrorS';\nimport { InformationS } from '../UNSAFE_RedwoodIcons/InformationS';\nimport { SuccessS } from '../UNSAFE_RedwoodIcons/SuccessS';\nimport {\n NavigationListItemStyles,\n NavigationListItemVariantOptions\n} from '../UNSAFE_NavigationList/themes/NavigationListItemStyles.css';\nimport { NavigationListItemRedwoodTheme } from './themes/redwood/NavigationListItemTheme';\nimport { ComponentChildren } from 'preact';\n\ntype Severity = 'warning' | 'info' | 'none' | 'error' | 'confirmation';\n\nexport type BaseNavigationListItemProps<K extends string | number> = {\n /**\n * Key of the NavigationListItem.\n */\n itemKey: K;\n /**\n * Label of the NavigationListItem.\n */\n label?: string;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * The content to be rendered inside the Text component as a metadata.\n */\n metadata?: string;\n /**\n * The status icon to be rendered after the label.\n */\n severity?: Severity;\n /**\n * The content to be rendered for remove icon\n */\n removeIcon?: ComponentChildren;\n};\n\n/*TODO: JET-58535. Add ripple effect when touching navigationListItem. */\nexport function BaseNavigationListItem<K extends string | number>({\n itemKey,\n label,\n badge,\n metadata,\n severity = 'none',\n removeIcon\n}: BaseNavigationListItemProps<K>) {\n const itemRef = useRef<HTMLLIElement | null>(null);\n\n //Logic of the component handled here\n const {\n itemId,\n itemHandlers,\n itemClasses,\n isSelected,\n labelContainerClasses,\n labelContainerStyle\n } = useNavigationListItem({\n itemKey\n });\n\n const severityRequirement = !(severity === 'none' || severity === undefined);\n\n const IconComponent = (severityValue: Severity) => {\n switch (severityValue) {\n case 'error':\n return <ErrorS color=\"danger\" />;\n case 'warning':\n return <WarningS color=\"warning\" />;\n case 'info':\n return <InformationS color=\"info\" />;\n case 'confirmation':\n return <SuccessS color=\"success\" />;\n default:\n return null;\n }\n };\n\n const {\n styles: { iconLabelContainer, iconContainer, navigationItemMetadata }\n } = useComponentTheme<NavigationListItemVariantOptions, NavigationListItemStyles>(\n NavigationListItemRedwoodTheme\n );\n\n const navigationItemMatadata = classNames([navigationItemMetadata]);\n\n const endIconContainerClasses = classNames([iconLabelContainer, iconContainer]);\n const {\n styles: { navigationlistRemoveIcon }\n } = useComponentTheme<NavigationListItemVariantOptions, NavigationListItemStyles>(\n NavigationListItemRedwoodTheme\n );\n\n const removeClass = classNames([navigationlistRemoveIcon]);\n\n return (\n <li\n role=\"tab\"\n {...itemHandlers}\n data-oj-key={itemKey}\n id={itemId}\n class={itemClasses}\n aria-selected={isSelected}\n ref={itemRef}>\n {label && (\n <span class={labelContainerClasses} style={labelContainerStyle}>\n <Text size=\"inherit\" weight=\"inherit\" variant=\"inherit\">\n {label}\n </Text>\n </span>\n )}\n {(metadata || severityRequirement || badge || removeIcon) && (\n <Flex gap=\"2x\" align=\"center\" justify=\"end\" flex=\"1 1 auto\">\n {' '}\n {badge && (\n <span class={endIconContainerClasses}>\n <Badge size=\"md\" variant=\"neutralSubtle\">\n {badge}\n </Badge>\n </span>\n )}\n {metadata && (\n <span class={navigationItemMatadata}>\n <Text>{'( ' + metadata + ' )'}</Text>\n </span>\n )}\n {severityRequirement && (\n <span class={endIconContainerClasses}>{IconComponent(severity)}</span>\n )}\n {removeIcon && <span class={removeClass}>{removeIcon}</span>}\n </Flex>\n )}\n </li>\n );\n}\n"],"names":["createContext","useContext","mergeInterpolations","flexitemInterpolations","useInteractionStyle","useComponentTheme","NavigationListItemRedwoodTheme","useCallback","usePress","mergeProps","classNames","useRef","_jsx","ErrorS","WarningS","InformationS","SuccessS","_jsxs","Text","Flex","Badge"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AAqBH;;;AAGG;AAEH,MAAM,qBAAqB,GAAGA,oBAAa,CAA8C,IAAK;;AChC9F;;;;;;AAMG;AAKH;;;;AAIG;AACH,SAAS,wBAAwB,GAAA;AAC/B,IAAA,OAAOC,gBAAU,CAAC,qBAAqB,CAAC,CAAC;AAC3C;;ACDA,MAAM,2BAA2B,GAAGC,uCAAmB,CAAgB;AACrE,IAAA,GAAG,MAAM,CAAC,MAAM,CAACC,+BAAsB,CAAC;AACzC,CAAA,CAAC,CAAC;AACH,MAAM,EAAE,KAAK,EAAE,6BAA6B,EAAE,GAAG,2BAA2B,EAAE,GAC5E,2BAA2B,CAAC;AAC1B,IAAA,SAAS,EAAE,QAAQ;AACpB,CAAA,CAAC,CAAC;AAEW,SAAA,qBAAqB,CAA4B,EAAE,OAAO,EAAkB,EAAA;AAC1F,IAAA,MAAM,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,wBAAwB,EAAE,GACzF,wBAAwB,EAAE,CAAC;;AAG7B,IAAA,MAAM,SAAS,GAAG,UAAU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,IAAI,GAAQ,EAChC,CAAA,CACR,EACA,mBAAmB,KAClBN,cAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAE,uBAAuB,EAAG,QAAA,EAAA,aAAa,CAAC,QAAQ,CAAC,EAAQ,CAAA,CACvE,EACA,UAAU,IAAIA,cAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,WAAW,YAAG,UAAU,EAAA,CAAQ,IACvD,CACR,CAAA,EAAA,CACE,EACL;AACJ;;;;;;"}
1
+ {"version":3,"file":"BaseNavigationListItem-84f4be5c.js","sources":["../../src/UNSAFE_NavigationListCommon/NavigationListContext.ts","../../src/UNSAFE_NavigationListCommon/useNavigationListContext.ts","../../src/UNSAFE_NavigationListCommon/useNavigationListItem.ts","../../src/UNSAFE_NavigationListCommon/BaseNavigationListItem.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 */\n\nimport { createContext } from 'preact';\nimport { NavigationListProps } from './NavigationListProps';\n\ntype CurrentKeyDetail<K> = {\n value: K;\n};\n\nexport type NavigationListContextProps<K extends string | number> = Pick<\n NavigationListProps<K>,\n 'selection' | 'onSelectionChange' | 'onRemove'\n> & {\n currentKey?: K;\n showFocusRing: boolean;\n onCurrentKeyChange:\n | (<K extends string | number>(detail: CurrentKeyDetail<K>) => void)\n | undefined;\n navigationListItemPrefix: string;\n};\n\n/**\n * Context used to pass navlist information without having to pass it to navlist children props.\n * We want to communicate information down to any interested navlist item children.\n */\n\nconst NavigationListContext = createContext<NavigationListContextProps<string | number>>(null!);\n\nexport { NavigationListContext };\n","/**\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 */\n\nimport { useContext } from 'preact/hooks';\nimport { NavigationListContext } from './NavigationListContext';\n\n/**\n * Utility hook for consuming the NavigationListContext\n *\n * @returns The value of NavigationListContext provider\n */\nfunction useNavigationListContext() {\n return useContext(NavigationListContext);\n}\n\nexport { useNavigationListContext };\n","import { useCallback } from 'preact/hooks';\n\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { useInteractionStyle } from '../hooks/UNSAFE_useInteractionStyle';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { useNavigationListContext } from './useNavigationListContext';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport {\n NavigationListItemStyles,\n NavigationListItemVariantOptions\n} from '../UNSAFE_NavigationList/themes/NavigationListItemStyles.css';\nimport { NavigationListItemRedwoodTheme } from './themes/redwood/NavigationListItemTheme';\n\nconst flexItemStyleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n]);\nconst { class: labelContainerFlexItemClasses, ...labelContainerFlexItemStyle } =\n flexItemStyleInterpolations({\n alignSelf: 'center'\n });\n\nexport function useNavigationListItem<K extends string | number>({ itemKey }: { itemKey: K }) {\n const { onSelectionChange, selection, currentKey, showFocusRing, navigationListItemPrefix } =\n useNavigationListContext();\n\n //Selection and focus state\n const isCurrent = currentKey === itemKey;\n\n const isSelected = selection === itemKey;\n\n //Styling\n const { interactionProps, applyPseudoHoverStyle, applyHoverStyle, applyActiveStyle } =\n useInteractionStyle();\n\n const {\n classes: listItemClasses,\n styles: { labelContainerClasses }\n } = useComponentTheme<NavigationListItemVariantOptions, NavigationListItemStyles>(\n NavigationListItemRedwoodTheme,\n {\n focusRing: showFocusRing ? 'isFocusRing' : 'notFocusRing',\n current: isCurrent ? 'isCurrent' : 'notCurrtent',\n selected: isSelected ? 'isSelected' : 'notSelected',\n hybridHover: applyHoverStyle ? 'isHybridHover' : 'notHybridHover',\n pseudoHover: applyPseudoHoverStyle ? 'isPseudoHover' : 'notPseudoHover',\n active: applyActiveStyle ? 'isActive' : 'notActive'\n }\n );\n\n //Item handlers\n const handlePress = useCallback(() => {\n onSelectionChange?.({ value: itemKey as K, reason: 'pointer' });\n }, [itemKey, onSelectionChange]);\n\n //Legacy navlist makes selection on keyDown, but since preact tabbar made selection after keyUp, will do the same\n //for preact navlist\n const { pressProps } = usePress(handlePress);\n\n return {\n itemId: navigationListItemPrefix + itemKey,\n itemHandlers: mergeProps(interactionProps, pressProps /*,onFocusProps*/),\n itemClasses: classNames([listItemClasses]),\n isSelected,\n labelContainerClasses: classNames([labelContainerClasses, labelContainerFlexItemClasses]),\n labelContainerStyle: labelContainerFlexItemStyle\n };\n}\n","import { useRef } from 'preact/hooks';\n\nimport { Text } from '../UNSAFE_Text';\n\nimport { useNavigationListItem } from './useNavigationListItem';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Badge } from '../UNSAFE_Badge';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { WarningS } from '../UNSAFE_RedwoodIcons/WarningS';\nimport { ErrorS } from '../UNSAFE_RedwoodIcons/ErrorS';\nimport { InformationS } from '../UNSAFE_RedwoodIcons/InformationS';\nimport { SuccessS } from '../UNSAFE_RedwoodIcons/SuccessS';\nimport {\n NavigationListItemStyles,\n NavigationListItemVariantOptions\n} from '../UNSAFE_NavigationList/themes/NavigationListItemStyles.css';\nimport { NavigationListItemRedwoodTheme } from './themes/redwood/NavigationListItemTheme';\nimport { ComponentChildren } from 'preact';\n\ntype Severity = 'warning' | 'info' | 'none' | 'error' | 'confirmation';\n\nexport type BaseNavigationListItemProps<K extends string | number> = {\n /**\n * Key of the NavigationListItem.\n */\n itemKey: K;\n /**\n * Label of the NavigationListItem.\n */\n label?: string;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * The content to be rendered inside the Text component as a metadata.\n */\n metadata?: string;\n /**\n * The status icon to be rendered after the label.\n */\n severity?: Severity;\n /**\n * The content to be rendered for remove icon\n */\n removeIcon?: ComponentChildren;\n};\n\n/*TODO: JET-58535. Add ripple effect when touching navigationListItem. */\nexport function BaseNavigationListItem<K extends string | number>({\n itemKey,\n label,\n badge,\n metadata,\n severity = 'none',\n removeIcon\n}: BaseNavigationListItemProps<K>) {\n const itemRef = useRef<HTMLLIElement | null>(null);\n\n //Logic of the component handled here\n const {\n itemId,\n itemHandlers,\n itemClasses,\n isSelected,\n labelContainerClasses,\n labelContainerStyle\n } = useNavigationListItem({\n itemKey\n });\n\n const severityRequirement = !(severity === 'none' || severity === undefined);\n\n const IconComponent = (severityValue: Severity) => {\n switch (severityValue) {\n case 'error':\n return <ErrorS color=\"danger\" />;\n case 'warning':\n return <WarningS color=\"warning\" />;\n case 'info':\n return <InformationS color=\"info\" />;\n case 'confirmation':\n return <SuccessS color=\"success\" />;\n default:\n return null;\n }\n };\n\n const {\n styles: { iconLabelContainer, iconContainer, navigationItemMetadata }\n } = useComponentTheme<NavigationListItemVariantOptions, NavigationListItemStyles>(\n NavigationListItemRedwoodTheme\n );\n\n const navigationItemMatadata = classNames([navigationItemMetadata]);\n\n const endIconContainerClasses = classNames([iconLabelContainer, iconContainer]);\n const {\n styles: { navigationlistRemoveIcon }\n } = useComponentTheme<NavigationListItemVariantOptions, NavigationListItemStyles>(\n NavigationListItemRedwoodTheme\n );\n\n const removeClass = classNames([navigationlistRemoveIcon]);\n\n return (\n <li\n role=\"tab\"\n {...itemHandlers}\n data-oj-key={itemKey}\n id={itemId}\n class={itemClasses}\n aria-selected={isSelected}\n ref={itemRef}>\n {label && (\n <span class={labelContainerClasses} style={labelContainerStyle}>\n <Text size=\"inherit\" weight=\"inherit\" variant=\"inherit\">\n {label}\n </Text>\n </span>\n )}\n {(metadata || severityRequirement || badge || removeIcon) && (\n <Flex gap=\"2x\" align=\"center\" justify=\"end\" flex=\"1 1 auto\">\n {' '}\n {badge && (\n <span class={endIconContainerClasses}>\n <Badge size=\"md\" variant=\"neutralSubtle\">\n {badge}\n </Badge>\n </span>\n )}\n {metadata && (\n <span class={navigationItemMatadata}>\n <Text>{'( ' + metadata + ' )'}</Text>\n </span>\n )}\n {severityRequirement && (\n <span class={endIconContainerClasses}>{IconComponent(severity)}</span>\n )}\n {removeIcon && <span class={removeClass}>{removeIcon}</span>}\n </Flex>\n )}\n </li>\n );\n}\n"],"names":["NavigationListContext","createContext","useNavigationListContext","useContext","flexItemStyleInterpolations","mergeInterpolations","Object","values","flexitemInterpolations","class","labelContainerFlexItemClasses","labelContainerFlexItemStyle","alignSelf","itemKey","label","badge","metadata","severity","removeIcon","itemRef","useRef","itemId","itemHandlers","itemClasses","isSelected","labelContainerClasses","labelContainerStyle","onSelectionChange","selection","currentKey","showFocusRing","navigationListItemPrefix","isCurrent","interactionProps","applyPseudoHoverStyle","applyHoverStyle","applyActiveStyle","useInteractionStyle","classes","listItemClasses","styles","useComponentTheme","NavigationListItemRedwoodTheme","focusRing","current","selected","hybridHover","pseudoHover","active","handlePress","useCallback","value","reason","pressProps","usePress","mergeProps","classNames","useNavigationListItem","severityRequirement","undefined","iconLabelContainer","iconContainer","navigationItemMetadata","navigationItemMatadata","endIconContainerClasses","navigationlistRemoveIcon","removeClass","_jsxs","jsxs","role","id","ref","children","_jsx","jsx","style","Text","size","weight","variant","Flex","gap","align","justify","flex","Badge","severityValue","ErrorS","SvgErrorS","color","WarningS","SvgWarningS","InformationS","SvgInformationS","SuccessS","SvgSuccessS","IconComponent"],"mappings":"mhBAgCA,MAAMA,EAAwBC,EAAaA,cAA8C,MChBzF,SAASC,IACP,OAAOC,EAAAA,WAAWH,EACpB,CCDA,MAAMI,EAA8BC,EAAAA,oBAAmC,IAClEC,OAAOC,OAAOC,6BAEXC,MAAOC,KAAkCC,GAC/CP,EAA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1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './PRIVATE_Chart/themes/ChartStyles.css', './TrackResizeContainer-c6b5de04', './useTextDimensions-030c6dbd', './useCssVars-311f2956', 'preact/hooks', './Gridlines-efa5606a', './useId-c9578d26', './Axis-56371b34', './useChartViewport-b6aa68eb', './layoutUtils-4304ffe4', './useChartNav-a9d203a5', './mergeProps-bcfa6a92', './useSelectDrill-b64a92ea', './useUser-e8dd7f7c', './useTestId-0140aa44', './cssUtils-19c17965', './useChartContextMenu-59a5f8c0', './useChartDnd-44674b7d', './eventsUtils-edf8f4e5', './accUtils-93ee6f16', './layoutUtils-ba7693df', './useTooltip-682ae8ca', './logger-0f873e29', './LayerHost-27dfba9e', 'preact/compat', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-36ddb881', './useChartMarquee-2f7d51c4', './useVisTouchResponse-88a7bb09', './stringUtils-0ae982c2', './useOverviewContext-dd00c487', './scale-3ae48ed5', './OverviewSlidingWindow-0029380e', './PRIVATE_VisOverview/themes/VisOverview.css', './ScrollBar-4046f84f'], (function(e,t,o,i,r,s,n,a,d,l,c,u,x,p,g,h,v,f,w,m,I,y,S,C,D,b,A,M,P,T,j,R,E,k,O,V,G,N,F){"use strict";function z(e,t,o){const i=e.groupIndex+1;if(!(i>=t))return o(i)?{groupIndex:i}:z({groupIndex:i},t,o)}function B(e,t){const o=e.groupIndex-1;if(!(o<0))return t(o)?{groupIndex:o}:B({groupIndex:o},t)}function L({x:e,width:o,height:i,y:r,windowX:s,windowHeight:n,windowWidth:a,windowY:d}){return t.jsxs(t.Fragment,{children:[t.jsx("rect",{x:e,y:r,width:Math.max(0,s-e),height:i,class:N.styles.overviewBackground}),t.jsx("rect",{x:s+a,width:Math.max(0,e+o-s-a),y:r,height:i,class:N.styles.overviewBackground}),t.jsx("rect",{x:s,y:r,height:Math.max(0,d-r),width:a,class:N.styles.overviewBackground}),t.jsx("rect",{x:s,y:d+n,width:a,class:N.styles.overviewBackground,height:Math.max(r+i-d-n,0)})]})}const U=10,W=f.getChartVars();function H({width:e,height:i,selectedIds:f,hiddenIds:y,hideAndShowBehavior:D="none",orientation:b="vertical",xAxis:A,yAxis:M,plotArea:P,dragMode:T="user",series:j,groups:N,isStacked:H=!1,getDataItem:X,selectionMode:q="none",drilling:Y="off",dataCursorPosition:$,onSelectionChange:_,isDataCursorEnabled:Z,dataCursorStyle:J,onViewportChange:K,onDataCursorPositionChange:Q,onItemDrill:ee,onGroupDrill:te,onItemHover:oe,onItemFocus:ie,datatip:re,zoomAndScroll:se="off",offset:ne,getNavUtil:ae,getDataItemPos:de,getGapRatio:le,valueFormats:ce,findNearest:ue,getMarkerInfo:xe,isRtl:pe,children:ge,testId:he,renderGridLinesInFront:ve,isDataXAxis:fe,contextMenuConfig:we,overview:me="off",defaultOverviewContentRenderer:Ie,isOverview:ye,yAxisSize:Se,overviewRenderer:Ce,...De}){const be=v.useTestId(he),Ae=n.useRef(null),Me=void 0!==be["data-testid"],Pe="horizontal"===b,{xAxisPosition:Te,yAxisPosition:je}=u.getAxesPosition(M,Pe,pe),{resolvedVars:Re,cssContent:Ee}=s.useCssVars(W),ke=Array.from(Array(12)).map(((e,t)=>Re[`color${t+1}`])),{textMeasureContent:Oe,getTextDimensions:Ve}=r.useTextDimensions();let Ge=u.getAvailSpace(e,i);if(ye&&Se){const e=Ge.width-Se,t=u.getOuterGaps(e,i);Ge.width-=Se-2*t.width,Ge.x+=Se-t.width}const Ne=null!=A?.timeAxisType,Fe=u.getScrollBarSpace(Ne,Ge,se,Te,me);let ze=Fe.scrollDims;Ge=Fe.availSpace;const{locale:Be}=h.useUser(),{x:Le,y:Ue,width:We,height:He}=Ge,Xe=Re.labelFontSize,qe=n.useMemo((()=>{const e=new Set(y);return u.getLayoutInfo(j,N,X,A,M,{x:Le,y:Ue,width:We,height:He},e,D,Pe,pe,H,Xe,ne,Be,Ve,Me,fe)}),[Le,Ue,We,He,X,Ve,N,y,D,fe,Pe,pe,H,Me,Be,ne,Xe,j,A,M]),{xProps:Ye,xScale:$e,xViewportExtent:_e,xAxisExtent:Ze,xIndexExtent:Je,xAxisMinExtent:Ke,yViewportExtent:Qe,yAxisExtent:et,groupWidth:tt,yProps:ot,yScale:it,yMaxDim:rt,yMajorTicks:st,xMajorTicks:nt,yMinorTicks:at,xMinorTicks:dt,plotAreaSpace:lt,xSpace:ct,ySpace:ut,idToDataMap:xt,formatAxisLabel:pt,formatYValue:gt}=qe;ze=u.updateScrollBarSpace(ze,"bottom"===Te,pe,rt);const ht=le(Je.startIndex,Je.endIndex),vt=ae(Je.startIndex,Je.endIndex),ft=Ye.tickLabels.map((({index:e})=>e+Je.startIndex)),{getNextNavGroup:wt,getDefaultNavGroup:mt}=function(e,t,o,i,r){const s=o=>{const r=e[t[o]].drilling;return("on"===i||"groupsOnly"===i)&&"off"!=r},n=e=>o.startIndex>t[e.groupIndex]?(e.groupIndex=0,e):o.endIndex<t[e.groupIndex]?(e.groupIndex=t.length-1,e):void 0;return{getDefaultNavGroup:n,getNextNavGroup:(e,o)=>{let i=n(e);return i||(i="ArrowRight"===o?r?B(e,s):z(e,t.length,s):r?z(e,t.length,s):B(e,s),i||e)}}}(N,ft,Je,Y,pe),{ignoreSelectPointerUp:It,cursor:yt,yAxisCursor:St,marqueeProps:Ct,marqueeContent:Dt,toggleButtonContent:bt,isPointInsideMarquee:At,dragMode:Mt}=R.useChartMarquee({plotAreaSpace:lt,xSpace:ct,ySpace:ut,dragMode:T,chartWidth:e,isMultiSelection:"multiple"===q,onViewportChange:K,isZoomScroll:"live"===se,xAxisExtent:Ze,xScale:$e,selectedIds:f,getDataById:e=>xt.get(e),onSelectionChange:_,viewportMax:_e.viewportMax,viewportMin:_e.viewportMin,isRtl:pe,xAxisMinExtent:Ke}),{touchResponse:Pt,touchResponseStyle:Tt}=E.useVisTouchResponse({type:"auto",supportsTouchDragGestures:"off"!==Mt,rootRef:Ae}),{activeId:jt,focusedItemInfo:Rt,hoveredItemInfo:Et,focusedGroupInfo:kt,navProps:Ot,onFocusUpdate:Vt}=x.useChartNav({rootRef:Ae,getNextChartItem:vt,getNextNavGroup:wt,getDefaultNavGroup:mt,touchResponse:Pt,onItemHover:oe,onItemFocus:ie,drilling:Y,xIndexExtent:Je}),{tooltipContent:Gt,tooltipProps:Nt}=function({getTextAndBounds:e,width:t,isRtl:o}){const[i,r]=n.useState(),s=n.useRef(),{tooltipContent:a,tooltipProps:d}=C.useTooltip({text:i,position:"top-start",offset:S.calculateOffset(o,t,s.current)});return{tooltipContent:a,tooltipProps:p.mergeProps({onPointerMove:t=>{const o=e(t.target);o?(s.current=o.bounds,r(o.text)):r(void 0)}},d)}}({getTextAndBounds:e=>{if(e!=Ae.current){const t=I.getElementData(Ae,e),o=t?.ojText;if(!o)return;if(o===A?.title)return{text:o,bounds:Ye.titleProps?.dims};if(o===M?.title)return{text:o,bounds:ot.titleProps?.dims};if(t?.ojGroupIndex){const e=parseInt(t.ojGroupIndex);return{bounds:Ye.tickLabels[e].dims,text:o}}}if(e===Ae.current&&kt.isFocusVisible){const e=N[kt.groupIndex];return{bounds:Ye.tickLabels[kt.groupIndex].dims,text:e.name||e.id}}},width:e,isRtl:pe}),Ft=c.useChartViewport({rootRef:Ae,width:e,height:i,xViewportExtent:_e,yViewportExtent:Qe,xAxisExtent:Ze,yAxisExtent:et,xScale:$e,yScale:it,plotAreaSpace:lt,isRtl:pe,isHoriz:Pe,zoomAndScroll:se,onViewportChange:K}),{selectDrillProps:zt,selectionContent:Bt}=g.useSelectDrill({selectionMode:q,selection:[...f],onChange:_,rootRef:Ae,drilling:Y,onItemDrill:ee,onGroupDrill:te,focusedGroupInfo:kt,focusedItemInfo:Rt,groups:N,getDataItem:X,getDataById:e=>xt.get(e),ignoreAsTrigger:e=>{if(!e)return!1;const t=I.getElementData(Ae,e);return!((!t||"marquee"!==t.ojPrivateObject&&"dragModeControls"!==t.ojPrivateObject&&"scrollBar"!==t.ojPrivateObject)&&!It)}}),Lt=ue($e,it,tt,ht),Ut=de($e,it,tt,ht),[Wt,Ht]=n.useState(!1),{datatipContent:Xt,dataCursorContent:qt,datatipProps:{"aria-describedby":Yt,...$t}}=g.useChartDatatipAndCursor({series:j,groups:N,width:e,height:i,findNearest:Lt,plotAreaSpace:lt,onDataCursorPositionChange:Q,isDataCursorEnabled:Z,dataCursorPosition:$,dataCursorStyle:J,hoveredItemInfo:Et,focusedItemInfo:Rt,getDataItem:X,getMarkerInfo:xe,getDataItemPos:Ut,datatip:re,valueFormats:ce,isHoriz:Pe,touchResponse:Pt,isDisabled:Wt,xScale:$e,yScale:it,timeAxisType:A?.timeAxisType,formatAxisLabel:pt,formatYValue:gt,hasXYValues:fe}),_t=d.useId(),{startIndex:Zt,endIndex:Jt}=Je,Kt=t.jsx(a.Gridlines,{plotArea:P,yMinorTicks:at,xMinorTicks:dt,xScale:$e,yScale:it,isLog:"log"===M?.scale,yTicks:st,xTicks:nt,yAxisPosition:je,isDataXAxis:fe}),Qt=j.length>0&&N.length>0,{contextMenuContent:eo,contextMenuProps:to}=w.useChartContextMenu({isRtl:pe,width:e,height:i,getDataItemPosition:Ut,series:j,groups:N,getDataItem:X,focusedItemInfo:Rt,rootRef:Ae,xAxisTitle:A?.title,yAxisTitle:M?.title,contextMenuConfig:Qt?we:void 0,onContextMenuDismissed:e=>{"keyboard"===e&&Vt()}}),[oo,io]=n.useState({accepted:void 0,type:""}),{draggable:ro,dndProps:so,dndContent:no}=m.useChartDnd({onDrag:De.onDrag,onDragStart:De.onDragStart,onDragEnd:De.onDragEnd,onDragEnter:De.onDragEnter,onDragLeave:De.onDragLeave,onDragOver:De.onDragOver,onDrop:De.onDrop,itemsDraggable:De.itemsDraggable,groupDraggable:De.groupDraggable,rootRef:Ae,groups:N,series:j,selectedIds:f,getDataItem:X,xSpace:ct,ySpace:ut,plotAreaSpace:lt,setDragOver:io,setDatatipDisabled:Ht,onSelectionChange:_}),ao=p.mergeProps(Ot,zt,Ft,$t,Ct,Nt,to,so),lo="off"==me||"on"!==me&&me.renderer?void 0:Ie,{background:co,slidingWindow:uo}=Ce(lt);return t.jsxs(t.Fragment,{children:[Ve&&null!=Re.labelFontSize&&t.jsxs("div",{tabIndex:ye?void 0:0,draggable:ro,ref:Ae,"aria-activedescendant":jt,"aria-label":De["aria-label"],"aria-labelledby":De["aria-labelledby"],"aria-describedby":k.merge([De["aria-describedby"],Yt]),style:{...Tt},role:ye?void 0:"application",className:o.styles.baseChartStyle,"data-oj-private-selection-mode":Me?q:void 0,...be,...ye?{}:ao,children:[t.jsxs("svg",{width:"100%",height:0!=ze.height&&"off"!=me?Math.ceil(100*(Fe.availSpace.height+U))/i+"%":"100%",children:[t.jsx("clipPath",{id:`${_t}`,children:t.jsx("rect",{...lt})}),co,t.jsx(a.PlotArea,{color:P?.color,dragOverStyle:"plotArea"!==oo.type?"none":oo.accepted?"accept":"reject",yScale:it,hasAxisLine:!ye,cursor:yt,isLog:"log"===M?.scale,availSpace:lt,xAxisPosition:Te,isDataXAxis:fe,isRtl:pe}),!ve&&Kt,t.jsx(l.Axis,{...ot,axisPosition:je,isRtl:pe,cursor:St,availSpace:ut,dragOverStyle:"yAxis"!==oo.type?"none":oo.accepted?"accept":"reject"}),t.jsx(l.Axis,{...Ye,isRtl:pe,axisPosition:Te,isTextInteractive:e=>{if(null!=A?.timeAxisType)return!1;const t=N[e]?.drilling;return"on"===t||"off"!=t&&("on"===Y||"groupsOnly"===Y)},activeId:jt,cursor:yt,focusedGroupIndex:kt.isFocusVisible?kt.groupIndex:void 0,availSpace:ct,dragOverStyle:"xAxis"!==oo.type?"none":oo.accepted?"accept":"reject"}),t.jsxs("g",{"clip-path":`url(#${_t})`,children:[ge({xStartIndex:Zt,xEndIndex:Jt,colors:ke,xScale:$e,yScale:it,isPointInsideMarquee:At,defaultFontSize:Re.labelFontSize,gapRatio:ht,activeId:jt,focusedItemInfo:Rt,hoveredItemInfo:Et,getTextDimensions:Ve,groupWidth:tt}),ve&&Kt,qt]}),uo,"live"===se&&!ye&&t.jsx(F.ScrollBar,{availSpace:ze,isRtl:pe,viewport:_e,axisExtent:Ze,isHoriz:"bottom"===Te}),Dt]}),t.jsx(O.OverviewContext.Provider,{value:{yAxisSize:ut.width,isOverview:!0,width:e,height:ze.height,overviewRenderer:e=>{const{xScale:o,...i}=function(e,t,o,i,r,s){const n=[o.min,o.max],a=e?[s.x+s.width,s.x]:[s.x,s.x+s.width],d=new V.ScaleLinear(n,a),l=[r.min,r.max],c=[s.y+s.height,s.y],u=new V.ScaleLinear(l,c),x=d.transform(t.viewportMin),p=Math.abs(d.transform(t.viewportMax)-d.transform(t.viewportMin));return{windowX:e?x-p:x+.5,windowWidth:p-.5,windowY:u.transform(i.viewportMax),windowHeight:Math.abs(u.transform(i.viewportMax)-u.transform(i.viewportMin)),xScale:d,yScale:u}}(pe,_e,Ze,Qe,et,e);return function(e,o,i,r,s,n,a){return{slidingWindow:t.jsx(G.OverviewSlidingWindow,{...r,...s,hasHandles:n,onWindowDimsChange:t=>{u.updateViewportFromOverview(e,o,s.windowX,s.windowWidth,t.deltaX,t.deltaWidth,i,a)}}),background:t.jsx(L,{...r,...s})}}(Ze,pe,o,e,i,!0,K)}},children:!ye&&"off"!==me&&lo&&t.jsx("div",{style:{width:e,height:ze.height},children:lo()})}),bt,Xt,Gt,eo,Bt,no]}),Oe,Ee]})}e.Chart=function({width:e,height:r,...s}){const{isOverview:n,overviewRenderer:a,yAxisSize:d,width:l,height:c}=O.useOverviewContext();let u=e,x=r;return void 0===u&&n&&void 0!==l&&(u=`${l}px`),void 0===x&&n&&void 0!==c&&(x=`${c}px`),t.jsx(i.TrackResizeContainer,{width:u,height:x,class:o.dimensionStyle,children:(e,o)=>e||o?t.jsx(H,{width:e,height:o,...s,yAxisSize:d,isOverview:n,overviewRenderer:a}):void 0})}}));
2
- //# sourceMappingURL=Chart-87ae799b.js.map
1
+ define(['exports', 'preact/jsx-runtime', './PRIVATE_Chart/themes/ChartStyles.css', './TrackResizeContainer-c6b5de04', './useTextDimensions-030c6dbd', './useCssVars-311f2956', 'preact/hooks', './Gridlines-efa5606a', './useId-c9578d26', './Axis-56371b34', './useChartViewport-b6aa68eb', './layoutUtils-4304ffe4', './useChartNav-a9d203a5', './mergeProps-bcfa6a92', './ScrollBar-4046f84f', './useSelectDrill-b64a92ea', './useUser-e8dd7f7c', './useTestId-0140aa44', './cssUtils-19c17965', './useChartContextMenu-59a5f8c0', './useChartDnd-44674b7d', './eventsUtils-edf8f4e5', './accUtils-93ee6f16', './layoutUtils-ba7693df', './useTooltip-682ae8ca', './logger-0f873e29', './LayerHost-27dfba9e', 'preact/compat', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-36ddb881', './useChartMarquee-2f7d51c4', './useVisTouchResponse-88a7bb09', './stringUtils-0ae982c2', './useOverviewContext-dd00c487', './scale-3ae48ed5', './OverviewSlidingWindow-0029380e', './PRIVATE_VisOverview/themes/VisOverview.css'], (function(e,t,o,i,r,s,n,a,d,l,c,u,x,p,g,h,v,f,w,m,I,y,S,C,D,b,A,M,P,T,j,R,E,k,O,V,G,N,F){"use strict";function z(e,t,o){const i=e.groupIndex+1;if(!(i>=t))return o(i)?{groupIndex:i}:z({groupIndex:i},t,o)}function B(e,t){const o=e.groupIndex-1;if(!(o<0))return t(o)?{groupIndex:o}:B({groupIndex:o},t)}function L({x:e,width:o,height:i,y:r,windowX:s,windowHeight:n,windowWidth:a,windowY:d}){return t.jsxs(t.Fragment,{children:[t.jsx("rect",{x:e,y:r,width:Math.max(0,s-e),height:i,class:F.styles.overviewBackground}),t.jsx("rect",{x:s+a,width:Math.max(0,e+o-s-a),y:r,height:i,class:F.styles.overviewBackground}),t.jsx("rect",{x:s,y:r,height:Math.max(0,d-r),width:a,class:F.styles.overviewBackground}),t.jsx("rect",{x:s,y:d+n,width:a,class:F.styles.overviewBackground,height:Math.max(r+i-d-n,0)})]})}const U=10,W=w.getChartVars();function H({width:e,height:i,selectedIds:w,hiddenIds:S,hideAndShowBehavior:b="none",orientation:A="vertical",xAxis:M,yAxis:P,plotArea:T,dragMode:j="user",series:R,groups:F,isStacked:H=!1,getDataItem:X,selectionMode:q="none",drilling:Y="off",dataCursorPosition:$,onSelectionChange:_,isDataCursorEnabled:Z,dataCursorStyle:J,onViewportChange:K,onDataCursorPositionChange:Q,onItemDrill:ee,onGroupDrill:te,onItemHover:oe,onItemFocus:ie,datatip:re,zoomAndScroll:se="off",offset:ne,getNavUtil:ae,getDataItemPos:de,getGapRatio:le,valueFormats:ce,findNearest:ue,getMarkerInfo:xe,isRtl:pe,children:ge,testId:he,renderGridLinesInFront:ve,isDataXAxis:fe,contextMenuConfig:we,overview:me="off",defaultOverviewContentRenderer:Ie,isOverview:ye,yAxisSize:Se,overviewRenderer:Ce,...De}){const be=f.useTestId(he),Ae=n.useRef(null),Me=void 0!==be["data-testid"],Pe="horizontal"===A,{xAxisPosition:Te,yAxisPosition:je}=u.getAxesPosition(P,Pe,pe),{resolvedVars:Re,cssContent:Ee}=s.useCssVars(W),ke=Array.from(Array(12)).map(((e,t)=>Re[`color${t+1}`])),{textMeasureContent:Oe,getTextDimensions:Ve}=r.useTextDimensions();let Ge=u.getAvailSpace(e,i);if(ye&&Se){const e=Ge.width-Se,t=u.getOuterGaps(e,i);Ge.width-=Se-2*t.width,Ge.x+=Se-t.width}const Ne=null!=M?.timeAxisType,Fe=u.getScrollBarSpace(Ne,Ge,se,Te,me);let ze=Fe.scrollDims;Ge=Fe.availSpace;const{locale:Be}=v.useUser(),{x:Le,y:Ue,width:We,height:He}=Ge,Xe=Re.labelFontSize,qe=n.useMemo((()=>{const e=new Set(S);return u.getLayoutInfo(R,F,X,M,P,{x:Le,y:Ue,width:We,height:He},e,b,Pe,pe,H,Xe,ne,Be,Ve,Me,fe)}),[Le,Ue,We,He,X,Ve,F,S,b,fe,Pe,pe,H,Me,Be,ne,Xe,R,M,P]),{xProps:Ye,xScale:$e,xViewportExtent:_e,xAxisExtent:Ze,xIndexExtent:Je,xAxisMinExtent:Ke,yViewportExtent:Qe,yAxisExtent:et,groupWidth:tt,yProps:ot,yScale:it,yMaxDim:rt,yMajorTicks:st,xMajorTicks:nt,yMinorTicks:at,xMinorTicks:dt,plotAreaSpace:lt,xSpace:ct,ySpace:ut,idToDataMap:xt,formatAxisLabel:pt,formatYValue:gt}=qe;ze=u.updateScrollBarSpace(ze,"bottom"===Te,pe,rt);const ht=le(Je.startIndex,Je.endIndex),vt=ae(Je.startIndex,Je.endIndex),ft=Ye.tickLabels.map((({index:e})=>e+Je.startIndex)),{getNextNavGroup:wt,getDefaultNavGroup:mt}=function(e,t,o,i,r){const s=o=>{const r=e[t[o]].drilling;return("on"===i||"groupsOnly"===i)&&"off"!=r},n=e=>o.startIndex>t[e.groupIndex]?(e.groupIndex=0,e):o.endIndex<t[e.groupIndex]?(e.groupIndex=t.length-1,e):void 0;return{getDefaultNavGroup:n,getNextNavGroup:(e,o)=>{let i=n(e);return i||(i="ArrowRight"===o?r?B(e,s):z(e,t.length,s):r?z(e,t.length,s):B(e,s),i||e)}}}(F,ft,Je,Y,pe),{ignoreSelectPointerUp:It,cursor:yt,yAxisCursor:St,marqueeProps:Ct,marqueeContent:Dt,toggleButtonContent:bt,isPointInsideMarquee:At,dragMode:Mt}=E.useChartMarquee({plotAreaSpace:lt,xSpace:ct,ySpace:ut,dragMode:j,chartWidth:e,isMultiSelection:"multiple"===q,onViewportChange:K,isZoomScroll:"live"===se,xAxisExtent:Ze,xScale:$e,selectedIds:w,getDataById:e=>xt.get(e),onSelectionChange:_,viewportMax:_e.viewportMax,viewportMin:_e.viewportMin,isRtl:pe,xAxisMinExtent:Ke}),{touchResponse:Pt,touchResponseStyle:Tt}=k.useVisTouchResponse({type:"auto",supportsTouchDragGestures:"off"!==Mt,rootRef:Ae}),{activeId:jt,focusedItemInfo:Rt,hoveredItemInfo:Et,focusedGroupInfo:kt,navProps:Ot,onFocusUpdate:Vt}=x.useChartNav({rootRef:Ae,getNextChartItem:vt,getNextNavGroup:wt,getDefaultNavGroup:mt,touchResponse:Pt,onItemHover:oe,onItemFocus:ie,drilling:Y,xIndexExtent:Je}),{tooltipContent:Gt,tooltipProps:Nt}=function({getTextAndBounds:e,width:t,isRtl:o}){const[i,r]=n.useState(),s=n.useRef(),{tooltipContent:a,tooltipProps:d}=D.useTooltip({text:i,position:"top-start",offset:C.calculateOffset(o,t,s.current)});return{tooltipContent:a,tooltipProps:p.mergeProps({onPointerMove:t=>{const o=e(t.target);o?(s.current=o.bounds,r(o.text)):r(void 0)}},d)}}({getTextAndBounds:e=>{if(e!=Ae.current){const t=y.getElementData(Ae,e),o=t?.ojText;if(!o)return;if(o===M?.title)return{text:o,bounds:Ye.titleProps?.dims};if(o===P?.title)return{text:o,bounds:ot.titleProps?.dims};if(t?.ojGroupIndex){const e=parseInt(t.ojGroupIndex);return{bounds:Ye.tickLabels[e].dims,text:o}}}if(e===Ae.current&&kt.isFocusVisible){const e=F[kt.groupIndex];return{bounds:Ye.tickLabels[kt.groupIndex].dims,text:e.name||e.id}}},width:e,isRtl:pe}),Ft=c.useChartViewport({rootRef:Ae,width:e,height:i,xViewportExtent:_e,yViewportExtent:Qe,xAxisExtent:Ze,yAxisExtent:et,xScale:$e,yScale:it,plotAreaSpace:lt,isRtl:pe,isHoriz:Pe,zoomAndScroll:se,onViewportChange:K}),{selectDrillProps:zt,selectionContent:Bt}=h.useSelectDrill({selectionMode:q,selection:[...w],onChange:_,rootRef:Ae,drilling:Y,onItemDrill:ee,onGroupDrill:te,focusedGroupInfo:kt,focusedItemInfo:Rt,groups:F,getDataItem:X,getDataById:e=>xt.get(e),ignoreAsTrigger:e=>{if(!e)return!1;const t=y.getElementData(Ae,e);return!((!t||"marquee"!==t.ojPrivateObject&&"dragModeControls"!==t.ojPrivateObject&&"scrollBar"!==t.ojPrivateObject)&&!It)}}),Lt=ue($e,it,tt,ht),Ut=de($e,it,tt,ht),[Wt,Ht]=n.useState(!1),{datatipContent:Xt,dataCursorContent:qt,datatipProps:{"aria-describedby":Yt,...$t}}=h.useChartDatatipAndCursor({series:R,groups:F,width:e,height:i,findNearest:Lt,plotAreaSpace:lt,onDataCursorPositionChange:Q,isDataCursorEnabled:Z,dataCursorPosition:$,dataCursorStyle:J,hoveredItemInfo:Et,focusedItemInfo:Rt,getDataItem:X,getMarkerInfo:xe,getDataItemPos:Ut,datatip:re,valueFormats:ce,isHoriz:Pe,touchResponse:Pt,isDisabled:Wt,xScale:$e,yScale:it,timeAxisType:M?.timeAxisType,formatAxisLabel:pt,formatYValue:gt,hasXYValues:fe}),_t=d.useId(),{startIndex:Zt,endIndex:Jt}=Je,Kt=t.jsx(a.Gridlines,{plotArea:T,yMinorTicks:at,xMinorTicks:dt,xScale:$e,yScale:it,isLog:"log"===P?.scale,yTicks:st,xTicks:nt,yAxisPosition:je,isDataXAxis:fe}),Qt=R.length>0&&F.length>0,{contextMenuContent:eo,contextMenuProps:to}=m.useChartContextMenu({isRtl:pe,width:e,height:i,getDataItemPosition:Ut,series:R,groups:F,getDataItem:X,focusedItemInfo:Rt,rootRef:Ae,xAxisTitle:M?.title,yAxisTitle:P?.title,contextMenuConfig:Qt?we:void 0,onContextMenuDismissed:e=>{"keyboard"===e&&Vt()}}),[oo,io]=n.useState({accepted:void 0,type:""}),{draggable:ro,dndProps:so,dndContent:no}=I.useChartDnd({onDrag:De.onDrag,onDragStart:De.onDragStart,onDragEnd:De.onDragEnd,onDragEnter:De.onDragEnter,onDragLeave:De.onDragLeave,onDragOver:De.onDragOver,onDrop:De.onDrop,itemsDraggable:De.itemsDraggable,groupDraggable:De.groupDraggable,rootRef:Ae,groups:F,series:R,selectedIds:w,getDataItem:X,xSpace:ct,ySpace:ut,plotAreaSpace:lt,setDragOver:io,setDatatipDisabled:Ht,onSelectionChange:_}),ao=p.mergeProps(Ot,zt,Ft,$t,Ct,Nt,to,so),lo="off"==me||"on"!==me&&me.renderer?void 0:Ie,{background:co,slidingWindow:uo}=Ce(lt);return t.jsxs(t.Fragment,{children:[Ve&&null!=Re.labelFontSize&&t.jsxs("div",{tabIndex:ye?void 0:0,draggable:ro,ref:Ae,"aria-activedescendant":jt,"aria-label":De["aria-label"],"aria-labelledby":De["aria-labelledby"],"aria-describedby":O.merge([De["aria-describedby"],Yt]),style:{...Tt},role:ye?void 0:"application",className:o.styles.baseChartStyle,"data-oj-private-selection-mode":Me?q:void 0,...be,...ye?{}:ao,children:[t.jsxs("svg",{width:"100%",height:0!=ze.height&&"off"!=me?Math.ceil(100*(Fe.availSpace.height+U))/i+"%":"100%",children:[t.jsx("clipPath",{id:`${_t}`,children:t.jsx("rect",{...lt})}),co,t.jsx(a.PlotArea,{color:T?.color,dragOverStyle:"plotArea"!==oo.type?"none":oo.accepted?"accept":"reject",yScale:it,hasAxisLine:!ye,cursor:yt,isLog:"log"===P?.scale,availSpace:lt,xAxisPosition:Te,isDataXAxis:fe,isRtl:pe}),!ve&&Kt,t.jsx(l.Axis,{...ot,axisPosition:je,isRtl:pe,cursor:St,availSpace:ut,dragOverStyle:"yAxis"!==oo.type?"none":oo.accepted?"accept":"reject"}),t.jsx(l.Axis,{...Ye,isRtl:pe,axisPosition:Te,isTextInteractive:e=>{if(null!=M?.timeAxisType)return!1;const t=F[e]?.drilling;return"on"===t||"off"!=t&&("on"===Y||"groupsOnly"===Y)},activeId:jt,cursor:yt,focusedGroupIndex:kt.isFocusVisible?kt.groupIndex:void 0,availSpace:ct,dragOverStyle:"xAxis"!==oo.type?"none":oo.accepted?"accept":"reject"}),t.jsxs("g",{"clip-path":`url(#${_t})`,children:[ge({xStartIndex:Zt,xEndIndex:Jt,colors:ke,xScale:$e,yScale:it,isPointInsideMarquee:At,defaultFontSize:Re.labelFontSize,gapRatio:ht,activeId:jt,focusedItemInfo:Rt,hoveredItemInfo:Et,getTextDimensions:Ve,groupWidth:tt}),ve&&Kt,qt]}),uo,"live"===se&&!ye&&t.jsx(g.ScrollBar,{availSpace:ze,isRtl:pe,viewport:_e,axisExtent:Ze,isHoriz:"bottom"===Te}),Dt]}),t.jsx(V.OverviewContext.Provider,{value:{yAxisSize:ut.width,isOverview:!0,width:e,height:ze.height,overviewRenderer:e=>{const{xScale:o,...i}=function(e,t,o,i,r,s){const n=[o.min,o.max],a=e?[s.x+s.width,s.x]:[s.x,s.x+s.width],d=new G.ScaleLinear(n,a),l=[r.min,r.max],c=[s.y+s.height,s.y],u=new G.ScaleLinear(l,c),x=d.transform(t.viewportMin),p=Math.abs(d.transform(t.viewportMax)-d.transform(t.viewportMin));return{windowX:e?x-p:x+.5,windowWidth:p-.5,windowY:u.transform(i.viewportMax),windowHeight:Math.abs(u.transform(i.viewportMax)-u.transform(i.viewportMin)),xScale:d,yScale:u}}(pe,_e,Ze,Qe,et,e);return function(e,o,i,r,s,n,a){return{slidingWindow:t.jsx(N.OverviewSlidingWindow,{...r,...s,hasHandles:n,onWindowDimsChange:t=>{u.updateViewportFromOverview(e,o,s.windowX,s.windowWidth,t.deltaX,t.deltaWidth,i,a)}}),background:t.jsx(L,{...r,...s})}}(Ze,pe,o,e,i,!0,K)}},children:!ye&&"off"!==me&&lo&&t.jsx("div",{style:{width:e,height:ze.height},children:lo()})}),bt,Xt,Gt,eo,Bt,no]}),Oe,Ee]})}e.Chart=function({width:e,height:r,...s}){const{isOverview:n,overviewRenderer:a,yAxisSize:d,width:l,height:c}=V.useOverviewContext();let u=e,x=r;return void 0===u&&n&&void 0!==l&&(u=`${l}px`),void 0===x&&n&&void 0!==c&&(x=`${c}px`),t.jsx(i.TrackResizeContainer,{width:u,height:x,class:o.dimensionStyle,children:(e,o)=>e||o?t.jsx(H,{width:e,height:o,...s,yAxisSize:d,isOverview:n,overviewRenderer:a}):void 0})}}));
2
+ //# sourceMappingURL=Chart-79cfc878.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chart-87ae799b.js","sources":["../../src/PRIVATE_Axis/utils/axisNavUtils.ts","../../src/PRIVATE_VisOverview/OverviewBackground.tsx","../../src/PRIVATE_Chart/ChartWithDimensions.tsx","../../src/PRIVATE_VisSVGText/useTextTruncation.ts","../../src/PRIVATE_VisOverview/utils.ts","../../src/PRIVATE_Chart/overviewUtils.tsx","../../src/PRIVATE_Chart/Chart.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 { Group, ChartGroupInfo } from '#utils/UNSAFE_visTypes/chart';\ntype isGroupNavigableType = (groupIndex: number) => boolean;\n\nexport function getNextGroup(\n info: ChartGroupInfo,\n viewportEndIndex: number,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex + 1;\n if (groupIndex >= viewportEndIndex) {\n return;\n }\n\n if (isGroupNavigable(groupIndex)) {\n return { groupIndex };\n }\n return getNextGroup({ groupIndex }, viewportEndIndex, isGroupNavigable);\n}\n\nexport function getPreviousGroup(\n info: ChartGroupInfo,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex - 1;\n if (groupIndex < 0) {\n return;\n }\n if (isGroupNavigable(groupIndex)) {\n return { groupIndex };\n }\n return getPreviousGroup({ groupIndex }, isGroupNavigable);\n}\n\nexport function getGroupNavUtil(\n groups: Group[],\n renderedGroups: number[],\n xIndexExtent: { startIndex: number; endIndex: number },\n drilling: 'on' | 'off' | 'groupsOnly',\n isRtl: boolean\n) {\n const isGroupNavigable = (groupIndex: number) => {\n const groupsDrilling = groups[renderedGroups[groupIndex]].drilling;\n return (drilling === 'on' || drilling === 'groupsOnly') && groupsDrilling != 'off';\n };\n\n const getDefaultNavGroup = (info: ChartGroupInfo) => {\n if (xIndexExtent.startIndex > renderedGroups[info.groupIndex]) {\n info.groupIndex = 0;\n return info;\n } else if (xIndexExtent.endIndex < renderedGroups[info.groupIndex]) {\n info.groupIndex = renderedGroups.length - 1;\n return info;\n }\n return;\n };\n\n const getNextNavGroup = (info: ChartGroupInfo, arrow: 'ArrowRight' | 'ArrowLeft') => {\n let nextGroup = getDefaultNavGroup(info);\n\n if (nextGroup) return nextGroup;\n\n if (arrow === 'ArrowRight') {\n nextGroup = isRtl\n ? getPreviousGroup(info, isGroupNavigable)\n : getNextGroup(info, renderedGroups.length, isGroupNavigable);\n } else {\n nextGroup = isRtl\n ? getNextGroup(info, renderedGroups.length, isGroupNavigable)\n : getPreviousGroup(info, isGroupNavigable);\n }\n return nextGroup || info;\n };\n\n return { getDefaultNavGroup, getNextNavGroup };\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { OverviewProps } from './overview.types';\nimport { styles } from './themes/VisOverview.css';\n\nexport function OverviewBackground({\n x,\n width,\n height,\n y,\n windowX,\n windowHeight,\n windowWidth,\n windowY\n}: OverviewProps) {\n return (\n <>\n <rect\n x={x}\n y={y}\n width={Math.max(0, windowX - x)}\n height={height}\n class={styles.overviewBackground}></rect>\n\n <rect\n x={windowX + windowWidth}\n width={Math.max(0, x + width - windowX - windowWidth)}\n y={y}\n height={height}\n class={styles.overviewBackground}></rect>\n\n <rect\n x={windowX}\n y={y}\n height={Math.max(0, windowY - y)}\n width={windowWidth}\n class={styles.overviewBackground}></rect>\n\n <rect\n x={windowX}\n y={windowY + windowHeight}\n width={windowWidth}\n class={styles.overviewBackground}\n height={Math.max(y + height - windowY - windowHeight, 0)}></rect>\n </>\n );\n}\n","/**\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 */\n\nimport { useTextDimensions } from '#hooks/PRIVATE_useTextDimensions';\nimport { useCssVars } from '#hooks/PRIVATE_useCssVars/useCssVars';\nimport { styles } from './themes/ChartStyles.css';\nimport { useMemo, useRef, useState } from 'preact/hooks';\nimport { PlotArea } from '#PRIVATE_PlotArea';\nimport { useId } from '#hooks/UNSAFE_useId';\nimport { Axis } from '#PRIVATE_Axis/Axis';\nimport { useChartViewport } from '#hooks/PRIVATE_useChartViewport';\nimport {\n getAvailSpace,\n getLayoutInfo,\n getOuterGaps,\n getScrollBarSpace,\n updateScrollBarSpace\n} from '#utils/PRIVATE_chartUtils/layoutUtils';\nimport { useChartNav } from '#hooks/PRIVATE_useChartNav/useChartNav';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { getAxesPosition } from '#PRIVATE_Axis/utils/axisUtils';\nimport { ScrollBar } from '#PRIVATE_ChartScrollBar';\nimport { useSelectDrill } from '#hooks/PRIVATE_useChartEvents/useSelectDrill';\nimport { useChartDatatipAndCursor } from '#hooks/PRIVATE_useChartEvents/useDatatipAndCursor';\nimport { getGroupNavUtil } from '#PRIVATE_Axis/utils/axisNavUtils';\nimport { TimeAxisProps } from '#utils/UNSAFE_visTypes/chart';\nimport { Gridlines } from '#PRIVATE_PlotArea/Gridlines';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { useTestId } from '#hooks/UNSAFE_useTestId';\nimport { getChartVars } from '#utils/PRIVATE_chartUtils';\nimport { useChartContextMenu } from '#hooks/PRIVATE_useChartContextMenu';\nimport { useChartDnd } from '#hooks/PRIVATE_useChartDnd';\nimport { getElementData } from '#utils/UNSAFE_visUtils';\nimport { useTextTruncation } from '#PRIVATE_VisSVGText/useTextTruncation';\nimport { useChartMarquee } from '#hooks/PRIVATE_useChartMarquee';\nimport { ChartProps } from './Chart';\nimport type { gestureTypes } from '#hooks/PRIVATE_useVisContextMenu';\nimport { useVisTouchResponse } from '#hooks/PRIVATE_useVisTouchResponse';\nimport { merge } from '#utils/UNSAFE_stringUtils';\nimport { LineAreaItem } from '#UNSAFE_LineAreaChart/lineAreaChart.types';\nimport { ScatterItem } from '#UNSAFE_ScatterChart/scatterChart.types';\nimport { BarItemData } from '#UNSAFE_BarChart/barChart.types';\nimport { OverviewContext } from '#hooks/PRIVATE_useOverviewContext';\nimport { getWindowCoords } from '#PRIVATE_VisOverview/utils';\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\nimport { getRenderer } from './overviewUtils';\nimport { ComponentChildren } from 'preact';\n\ntype ChartWithDimensionsProps<K, D> = Omit<ChartProps<K, D>, 'width' | 'height'> & {\n width: number;\n height: number;\n overviewRenderer: (props: Dimension) => {\n background: ComponentChildren;\n slidingWindow: ComponentChildren;\n };\n yAxisSize: number;\n isOverview: boolean;\n};\n\nconst OVERVIEW_GAP = 10;\n\nconst chartVars = getChartVars();\n\nexport function ChartWithDimensions<\n K extends string | number,\n D extends LineAreaItem<K> | ScatterItem<K> | BarItemData<K>\n>({\n width,\n height,\n selectedIds,\n hiddenIds,\n hideAndShowBehavior = 'none',\n orientation = 'vertical',\n xAxis,\n yAxis,\n plotArea,\n dragMode = 'user',\n series,\n groups,\n isStacked = false,\n getDataItem,\n selectionMode = 'none',\n drilling = 'off',\n dataCursorPosition,\n onSelectionChange,\n isDataCursorEnabled,\n dataCursorStyle,\n onViewportChange,\n onDataCursorPositionChange,\n onItemDrill,\n onGroupDrill,\n onItemHover,\n onItemFocus,\n datatip,\n zoomAndScroll = 'off',\n offset,\n getNavUtil,\n getDataItemPos,\n getGapRatio,\n valueFormats,\n findNearest,\n getMarkerInfo,\n isRtl,\n children,\n testId,\n renderGridLinesInFront,\n isDataXAxis,\n contextMenuConfig,\n overview = 'off',\n defaultOverviewContentRenderer,\n isOverview,\n yAxisSize,\n overviewRenderer,\n ...props\n}: ChartWithDimensionsProps<K, D>) {\n const testIdProps = useTestId(testId);\n const rootRef = useRef<HTMLDivElement>(null);\n const isTestEnv = testIdProps['data-testid'] !== undefined;\n const isHoriz = orientation === 'horizontal';\n const { xAxisPosition, yAxisPosition } = getAxesPosition(yAxis, isHoriz, isRtl);\n const { resolvedVars, cssContent } = useCssVars(chartVars);\n const colors = Array.from(Array(12)).map((_, index) => {\n return resolvedVars[`color${index + 1}`];\n });\n const { textMeasureContent, getTextDimensions } = useTextDimensions();\n let availSpace = getAvailSpace(width, height);\n\n if (isOverview && yAxisSize) {\n const w = availSpace.width - yAxisSize;\n const gaps = getOuterGaps(w, height);\n availSpace.width -= yAxisSize - 2 * gaps.width;\n availSpace.x += yAxisSize - gaps.width;\n }\n const isTimeAxis = (xAxis as TimeAxisProps)?.timeAxisType != null;\n\n const updatedSpace = getScrollBarSpace(\n isTimeAxis,\n availSpace,\n zoomAndScroll,\n xAxisPosition,\n overview\n );\n let scrollDims = updatedSpace.scrollDims;\n availSpace = updatedSpace.availSpace;\n const { locale } = useUser();\n const { x, y, width: _width, height: _height } = availSpace;\n const labelFontSize = resolvedVars['labelFontSize'];\n const layoutInfo = useMemo(() => {\n const hiddenSet = new Set(hiddenIds);\n return getLayoutInfo<K, D>(\n series,\n groups,\n getDataItem,\n xAxis,\n yAxis,\n { x, y, width: _width, height: _height }, // availSpace\n hiddenSet,\n hideAndShowBehavior,\n isHoriz,\n isRtl,\n isStacked,\n labelFontSize,\n offset,\n locale,\n getTextDimensions,\n isTestEnv,\n isDataXAxis\n );\n }, [\n x,\n y,\n _width,\n _height,\n getDataItem,\n getTextDimensions,\n groups,\n hiddenIds,\n hideAndShowBehavior,\n isDataXAxis,\n isHoriz,\n isRtl,\n isStacked,\n isTestEnv,\n locale,\n offset,\n labelFontSize,\n series,\n xAxis,\n yAxis\n ]);\n\n const {\n xProps,\n xScale,\n xViewportExtent,\n xAxisExtent,\n xIndexExtent,\n xAxisMinExtent,\n yViewportExtent,\n yAxisExtent,\n groupWidth,\n yProps,\n yScale,\n yMaxDim,\n yMajorTicks,\n xMajorTicks,\n yMinorTicks,\n xMinorTicks,\n plotAreaSpace,\n xSpace,\n ySpace,\n idToDataMap,\n formatAxisLabel,\n formatYValue\n } = layoutInfo;\n\n scrollDims = updateScrollBarSpace(scrollDims, xAxisPosition === 'bottom', isRtl, yMaxDim);\n\n const gapRatio = getGapRatio(xIndexExtent.startIndex!, xIndexExtent.endIndex!);\n\n const getNextChartItem = getNavUtil(xIndexExtent.startIndex!, xIndexExtent.endIndex!);\n\n const renderedGroupsIndex = xProps.tickLabels.map(({ index }) => index + xIndexExtent.startIndex);\n const { getNextNavGroup, getDefaultNavGroup } = getGroupNavUtil(\n groups,\n renderedGroupsIndex,\n xIndexExtent as { startIndex: number; endIndex: number }, // TODO : JET-71301 | Scatter should have different nav utils call.\n drilling,\n isRtl\n );\n\n const {\n ignoreSelectPointerUp,\n cursor,\n yAxisCursor,\n marqueeProps,\n marqueeContent,\n toggleButtonContent,\n isPointInsideMarquee,\n dragMode: mode\n } = useChartMarquee<K, D>({\n plotAreaSpace,\n xSpace,\n ySpace,\n dragMode,\n chartWidth: width,\n isMultiSelection: selectionMode === 'multiple',\n onViewportChange,\n isZoomScroll: zoomAndScroll === 'live',\n xAxisExtent,\n xScale,\n selectedIds,\n getDataById: (id) => idToDataMap.get(id),\n onSelectionChange,\n viewportMax: xViewportExtent.viewportMax!,\n viewportMin: xViewportExtent.viewportMin!,\n isRtl,\n xAxisMinExtent\n });\n\n const { touchResponse, touchResponseStyle } = useVisTouchResponse({\n type: 'auto',\n supportsTouchDragGestures: mode !== 'off',\n rootRef\n });\n\n const { activeId, focusedItemInfo, hoveredItemInfo, focusedGroupInfo, navProps, onFocusUpdate } =\n useChartNav({\n rootRef,\n getNextChartItem,\n getNextNavGroup,\n getDefaultNavGroup,\n touchResponse,\n onItemHover,\n onItemFocus,\n drilling,\n xIndexExtent\n });\n\n const onContextMenuDismissed = (gesture: gestureTypes) => {\n if (gesture === 'keyboard') {\n onFocusUpdate();\n }\n };\n\n const getTextAndBounds = (target: EventTarget | null) => {\n if (target != rootRef.current) {\n const dataSet = getElementData(rootRef, target as HTMLElement);\n const text = dataSet?.['ojText']!;\n\n if (!text) {\n return;\n }\n\n if (text === xAxis?.title) {\n return {\n text,\n bounds: xProps.titleProps?.dims\n };\n } else if (text === yAxis?.title) {\n return {\n text,\n bounds: yProps.titleProps?.dims\n };\n } else if (dataSet?.['ojGroupIndex']) {\n const index = parseInt(dataSet['ojGroupIndex']);\n return {\n bounds: xProps.tickLabels[index].dims,\n text: text!\n };\n }\n }\n\n if (target === rootRef.current && focusedGroupInfo.isFocusVisible) {\n const group = groups[focusedGroupInfo.groupIndex];\n return {\n bounds: xProps.tickLabels[focusedGroupInfo.groupIndex].dims,\n text: group.name || group.id\n };\n }\n return;\n };\n\n const { tooltipContent, tooltipProps } = useTextTruncation({\n getTextAndBounds,\n width,\n isRtl\n });\n\n const viewportProps = useChartViewport({\n rootRef,\n width,\n height,\n xViewportExtent,\n yViewportExtent,\n xAxisExtent,\n yAxisExtent,\n xScale,\n yScale,\n plotAreaSpace,\n isRtl,\n isHoriz,\n zoomAndScroll,\n onViewportChange\n });\n\n const ignoreAsTrigger = (target: EventTarget | null) => {\n if (!target) {\n return false;\n }\n\n const dataset = getElementData(rootRef, target as HTMLElement);\n if (\n (dataset &&\n (dataset['ojPrivateObject'] === 'marquee' ||\n dataset['ojPrivateObject'] === 'dragModeControls' ||\n dataset['ojPrivateObject'] === 'scrollBar')) ||\n ignoreSelectPointerUp\n ) {\n return true;\n }\n\n return false;\n };\n\n const { selectDrillProps, selectionContent } = useSelectDrill<K, D>({\n selectionMode,\n selection: [...selectedIds],\n onChange: onSelectionChange,\n rootRef,\n drilling,\n onItemDrill,\n onGroupDrill,\n focusedGroupInfo,\n focusedItemInfo,\n groups,\n getDataItem,\n getDataById: (id) => idToDataMap.get(id),\n ignoreAsTrigger\n });\n\n const findNearestData = findNearest(xScale as any, yScale, groupWidth, gapRatio);\n const getDataItemPosition = getDataItemPos(xScale as any, yScale, groupWidth, gapRatio);\n const [datatipDisabled, setDatatipDisabled] = useState(false);\n const {\n datatipContent,\n dataCursorContent,\n datatipProps: { 'aria-describedby': datatipAriaDescribedby, ...datatipProps }\n } = useChartDatatipAndCursor<K, D>({\n series,\n groups,\n width,\n height,\n findNearest: findNearestData,\n plotAreaSpace,\n onDataCursorPositionChange,\n isDataCursorEnabled,\n dataCursorPosition,\n dataCursorStyle,\n hoveredItemInfo,\n focusedItemInfo,\n getDataItem,\n getMarkerInfo,\n getDataItemPos: getDataItemPosition,\n datatip,\n valueFormats,\n isHoriz,\n touchResponse,\n isDisabled: datatipDisabled,\n xScale: xScale as any,\n yScale,\n timeAxisType: (xAxis as TimeAxisProps)?.timeAxisType,\n formatAxisLabel,\n formatYValue,\n hasXYValues: isDataXAxis\n });\n\n const isGroupInteractive = (index: number) => {\n if ((xAxis as TimeAxisProps)?.timeAxisType != null) {\n return false;\n }\n const groupDrill = groups[index]?.drilling;\n if (groupDrill === 'on') {\n return true;\n }\n\n if (groupDrill != 'off' && (drilling === 'on' || drilling === 'groupsOnly')) {\n return true;\n }\n return false;\n };\n\n const plotAreaClipPathId = useId();\n const { startIndex: xStartIndex, endIndex: xEndIndex } = xIndexExtent;\n const gridLines = (\n <Gridlines\n plotArea={plotArea}\n yMinorTicks={yMinorTicks}\n xMinorTicks={xMinorTicks}\n xScale={xScale}\n yScale={yScale}\n isLog={yAxis?.scale === 'log'}\n yTicks={yMajorTicks}\n xTicks={xMajorTicks}\n yAxisPosition={yAxisPosition}\n isDataXAxis={isDataXAxis}\n />\n );\n const hasData = series.length > 0 && groups.length > 0;\n\n const { contextMenuContent, contextMenuProps } = useChartContextMenu<K, D>({\n isRtl,\n width,\n height,\n getDataItemPosition,\n series,\n groups,\n getDataItem,\n focusedItemInfo,\n rootRef,\n xAxisTitle: xAxis?.title,\n yAxisTitle: yAxis?.title,\n contextMenuConfig: hasData ? contextMenuConfig : undefined,\n onContextMenuDismissed\n });\n\n const [dragOver, setDragOver] = useState<{ accepted: boolean | undefined; type: string }>({\n accepted: undefined,\n type: ''\n });\n\n const { draggable, dndProps, dndContent } = useChartDnd<K, D>({\n onDrag: props.onDrag,\n onDragStart: props.onDragStart,\n onDragEnd: props.onDragEnd,\n onDragEnter: props.onDragEnter,\n onDragLeave: props.onDragLeave,\n onDragOver: props.onDragOver,\n onDrop: props.onDrop,\n itemsDraggable: props.itemsDraggable,\n groupDraggable: props.groupDraggable,\n rootRef,\n groups,\n series,\n selectedIds,\n getDataItem,\n xSpace,\n ySpace,\n plotAreaSpace,\n setDragOver,\n setDatatipDisabled,\n onSelectionChange\n });\n\n const eventsProps = mergeProps(\n navProps,\n selectDrillProps,\n viewportProps,\n datatipProps,\n marqueeProps,\n tooltipProps,\n contextMenuProps,\n dndProps\n );\n\n const overviewContentRenderer =\n overview != 'off' && (overview === 'on' || !overview.renderer)\n ? defaultOverviewContentRenderer\n : undefined;\n\n const { background, slidingWindow } = overviewRenderer(plotAreaSpace);\n return (\n <>\n {getTextDimensions && resolvedVars['labelFontSize'] != undefined && (\n <div\n tabIndex={isOverview ? undefined : 0}\n draggable={draggable}\n ref={rootRef}\n aria-activedescendant={activeId}\n aria-label={props['aria-label']}\n aria-labelledby={props['aria-labelledby']}\n aria-describedby={merge([props['aria-describedby'], datatipAriaDescribedby])}\n style={{ ...touchResponseStyle }}\n role={isOverview ? undefined : 'application'}\n className={styles.baseChartStyle}\n data-oj-private-selection-mode={isTestEnv ? selectionMode : undefined}\n {...testIdProps}\n {...(isOverview ? {} : eventsProps)}>\n <svg\n width=\"100%\"\n height={\n scrollDims.height != 0 && overview != 'off'\n ? `${Math.ceil((updatedSpace.availSpace.height + OVERVIEW_GAP) * 100) / height}%`\n : '100%'\n }>\n <clipPath id={`${plotAreaClipPathId}`}>\n <rect {...plotAreaSpace}></rect>\n </clipPath>\n {background}\n <PlotArea\n color={plotArea?.color}\n dragOverStyle={\n dragOver.type !== 'plotArea' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n yScale={yScale}\n hasAxisLine={!isOverview}\n cursor={cursor}\n isLog={yAxis?.scale === 'log'}\n availSpace={plotAreaSpace}\n xAxisPosition={xAxisPosition}\n isDataXAxis={isDataXAxis}\n isRtl={isRtl}\n />\n {!renderGridLinesInFront && gridLines}\n <Axis\n {...(yProps as any)}\n axisPosition={yAxisPosition}\n isRtl={isRtl}\n cursor={yAxisCursor}\n availSpace={ySpace}\n dragOverStyle={\n dragOver.type !== 'yAxis' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n />\n <Axis\n {...xProps}\n isRtl={isRtl}\n axisPosition={xAxisPosition}\n isTextInteractive={isGroupInteractive}\n activeId={activeId}\n cursor={cursor}\n focusedGroupIndex={\n focusedGroupInfo.isFocusVisible ? focusedGroupInfo.groupIndex : undefined\n }\n availSpace={xSpace}\n dragOverStyle={\n dragOver.type !== 'xAxis' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n />\n <g clip-path={`url(#${plotAreaClipPathId})`}>\n {children({\n xStartIndex,\n xEndIndex,\n colors,\n xScale: xScale as any,\n yScale,\n isPointInsideMarquee,\n defaultFontSize: resolvedVars['labelFontSize'],\n gapRatio,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n getTextDimensions,\n groupWidth\n })}\n {renderGridLinesInFront && gridLines}\n {dataCursorContent}\n </g>\n {slidingWindow}\n {zoomAndScroll === 'live' && !isOverview && (\n <ScrollBar\n availSpace={scrollDims}\n isRtl={isRtl}\n viewport={xViewportExtent}\n axisExtent={xAxisExtent}\n isHoriz={xAxisPosition === 'bottom'}\n />\n )}\n {marqueeContent}\n </svg>\n <OverviewContext.Provider\n value={{\n yAxisSize: ySpace.width,\n isOverview: true,\n width,\n height: scrollDims.height,\n overviewRenderer: (overviewChartPlotArea: Dimension) => {\n const { xScale: overviewXScale, ...windowCoords } = getWindowCoords(\n isRtl,\n xViewportExtent,\n xAxisExtent,\n yViewportExtent,\n yAxisExtent,\n overviewChartPlotArea\n );\n return getRenderer(\n xAxisExtent,\n isRtl,\n overviewXScale,\n overviewChartPlotArea,\n windowCoords,\n true,\n onViewportChange\n );\n }\n }}>\n {!isOverview && overview !== 'off' && overviewContentRenderer && (\n <div style={{ width, height: scrollDims.height }}>{overviewContentRenderer()}</div>\n )}\n </OverviewContext.Provider>\n {toggleButtonContent}\n {datatipContent}\n {tooltipContent}\n {contextMenuContent}\n {selectionContent}\n {dndContent}\n </div>\n )}\n {textMeasureContent}\n {cssContent}\n </>\n );\n}\n","/**\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 */\n\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\nimport { calculateOffset } from '#utils/PRIVATE_visLayoutUtils/layoutUtils';\nimport { useTooltip } from '#hooks/UNSAFE_useTooltip';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { useRef, useState } from 'preact/hooks';\n\ntype Props = {\n getTextAndBounds: (target: EventTarget | null) =>\n | {\n text?: string;\n bounds?: Dimension;\n }\n | undefined;\n isRtl: boolean;\n width: number;\n};\n\nexport function useTextTruncation({ getTextAndBounds, width, isRtl }: Props) {\n const [text, setText] = useState<string>();\n const bounds = useRef<Dimension>();\n\n const { tooltipContent, tooltipProps } = useTooltip({\n text,\n position: 'top-start',\n offset: calculateOffset(isRtl, width, bounds.current)\n });\n\n const onPointerMove = (event: Event) => {\n const textAndBounds = getTextAndBounds(event.target);\n\n if (textAndBounds) {\n bounds.current = textAndBounds.bounds;\n setText(textAndBounds.text);\n } else {\n setText(undefined);\n }\n };\n\n return {\n tooltipContent,\n tooltipProps: mergeProps({ onPointerMove }, tooltipProps)\n };\n}\n","/**\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 */\n\nimport { ScaleLinear } from '#utils/PRIVATE_chartUtils';\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\n\nexport function getWindowCoords(\n isRtl: boolean,\n xViewportExtent: { viewportMin: number; viewportMax: number },\n xAxisExtent: { min: number; max: number },\n yViewportExtent: { viewportMin: number; viewportMax: number },\n yAxisExtent: { min: number; max: number },\n plotAreaSpace: Dimension\n) {\n const xDomain = [xAxisExtent.min, xAxisExtent.max] as [number, number];\n const xRange = (\n isRtl\n ? [plotAreaSpace.x + plotAreaSpace.width, plotAreaSpace.x]\n : [plotAreaSpace.x, plotAreaSpace.x + plotAreaSpace.width]\n ) as [number, number];\n const xScale = new ScaleLinear(xDomain, xRange);\n\n const yDomain = [yAxisExtent.min, yAxisExtent.max] as [number, number];\n const yRange = [plotAreaSpace.y + plotAreaSpace.height, plotAreaSpace.y] as [number, number];\n\n const yScale = new ScaleLinear(yDomain, yRange);\n\n const windowX = xScale.transform(xViewportExtent.viewportMin);\n const windowWidth = Math.abs(\n xScale.transform(xViewportExtent.viewportMax) - xScale.transform(xViewportExtent.viewportMin)\n );\n\n return {\n windowX: isRtl ? windowX - windowWidth : windowX + 0.5,\n windowWidth: windowWidth - 0.5,\n windowY: yScale.transform(yViewportExtent.viewportMax),\n windowHeight: Math.abs(\n yScale.transform(yViewportExtent.viewportMax) - yScale.transform(yViewportExtent.viewportMin)\n ),\n xScale,\n yScale\n };\n}\n","/**\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 */\n\nimport { OverviewSlidingWindow } from '#PRIVATE_VisOverview';\nimport { OverviewBackground } from '#PRIVATE_VisOverview/OverviewBackground';\nimport { updateViewportFromOverview } from '#utils/PRIVATE_chartUtils/overviewUtils';\nimport { Scale } from '#utils/UNSAFE_visTypes/chart';\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\n\nexport function getRenderer(\n xAxisExtent: { min: number; max: number },\n isRtl: boolean,\n overviewXScale: Scale,\n plotAreaSpace: Dimension,\n windowCoords: { windowX: number; windowY: number; windowHeight: number; windowWidth: number },\n hasHandles: boolean,\n onViewportChange?: (detail: {\n xMin?: number;\n xMax?: number;\n yMin?: number;\n yMax?: number;\n }) => void\n) {\n return {\n slidingWindow: (\n <OverviewSlidingWindow\n {...plotAreaSpace}\n {...windowCoords}\n hasHandles={hasHandles}\n onWindowDimsChange={(props: { deltaX: number; deltaWidth: number }) => {\n updateViewportFromOverview(\n xAxisExtent,\n isRtl,\n windowCoords.windowX,\n windowCoords.windowWidth,\n props.deltaX,\n props.deltaWidth,\n overviewXScale,\n onViewportChange\n );\n }}\n />\n ),\n background: <OverviewBackground {...plotAreaSpace} {...windowCoords} />\n };\n}\n","/**\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 */\n\nimport { dimensionStyle } from './themes/ChartStyles.css';\nimport { TrackResizeContainer } from '#UNSAFE_TrackResizeContainer';\nimport { ChartWithDimensions } from './ChartWithDimensions';\nimport {\n ChartCommonProps,\n ChartSeriesData,\n GetNextChartItemType,\n Info,\n Scale,\n getDataPosType\n} from '#utils/UNSAFE_visTypes/chart';\nimport { Dimension, MarkerShapes } from '#utils/UNSAFE_visTypes/common';\nimport { ComponentChildren, VNode } from 'preact';\nimport { Property } from 'csstype';\nimport { LineAreaItem } from '#UNSAFE_LineAreaChart/lineAreaChart.types';\nimport { ScatterItem } from '#UNSAFE_ScatterChart/scatterChart.types';\nimport { BarItemData } from '#UNSAFE_BarChart/barChart.types';\nimport { useOverviewContext } from '#hooks/PRIVATE_useOverviewContext';\n\nexport type ChartProps<K, D> = {\n selectedIds: Set<K>;\n getGapRatio: (startIndex: number, endIndex: number) => number;\n getNavUtil: (startIndex: number, endIndex: number) => GetNextChartItemType;\n getDataItemPos: (\n xScale: Scale,\n yScale: Scale,\n groupWidth: number,\n gapRatio: number\n ) => getDataPosType;\n findNearest: (\n xScale: Scale,\n yScale: Scale,\n groupWidth: number,\n gapRatio: number\n ) => (\n x: number,\n y: number\n ) =>\n | {\n seriesIndex: number;\n groupIndex: number;\n y: number | undefined;\n x: number;\n }\n | undefined;\n children: (context: {\n xStartIndex: number;\n xEndIndex: number;\n xScale: Scale;\n yScale: Scale;\n gapRatio: number;\n activeId?: string;\n focusedItemInfo: Info;\n hoveredItemInfo?: Info;\n groupWidth: number;\n isPointInsideMarquee: ((id: K, point: { x: number; y: number }) => boolean) | undefined;\n getTextDimensions?: (text: string, style: Record<string, any>) => Dimension;\n defaultFontSize: string;\n colors: string[];\n }) => VNode;\n offset: number;\n series: ChartSeriesData<K, D>[];\n isRtl: boolean;\n renderGridLinesInFront: boolean;\n isDataXAxis?: boolean;\n getMarkerInfo: (\n seriesIndex: number,\n groupIndex: number\n ) => { color: Property.Color | undefined; type?: MarkerShapes };\n defaultOverviewContentRenderer: () => ComponentChildren;\n} & Omit<ChartCommonProps<K, D>, 'highlightedIds' | 'hoverBehavior' | 'selectedIds'>;\n\nexport function Chart<\n K extends string | number,\n D extends LineAreaItem<K> | ScatterItem<K> | BarItemData<K>\n>({ width, height, ...props }: ChartProps<K, D>) {\n // TODO: reevaluate how we handle empty data\n const {\n isOverview,\n overviewRenderer,\n yAxisSize,\n width: overviewWidth,\n height: overviewHeight\n } = useOverviewContext();\n\n let chartWidth = width;\n let chartHeight = height;\n\n if (chartWidth === undefined && isOverview && overviewWidth !== undefined) {\n chartWidth = `${overviewWidth}px`;\n }\n\n if (chartHeight === undefined && isOverview && overviewHeight !== undefined) {\n chartHeight = `${overviewHeight}px`;\n }\n\n return (\n <TrackResizeContainer width={chartWidth} height={chartHeight} class={dimensionStyle}>\n {(width, height) =>\n width || height ? (\n <ChartWithDimensions\n width={width}\n height={height}\n {...props}\n yAxisSize={yAxisSize}\n isOverview={isOverview}\n overviewRenderer={overviewRenderer}\n />\n ) : undefined\n }\n </TrackResizeContainer>\n );\n}\n"],"names":["getNextGroup","info","viewportEndIndex","isGroupNavigable","groupIndex","getPreviousGroup","OverviewBackground","x","width","height","y","windowX","windowHeight","windowWidth","windowY","_jsxs","jsxs","_Fragment","children","_jsx","jsx","Math","max","class","styles","overviewBackground","OVERVIEW_GAP","chartVars","getChartVars","ChartWithDimensions","selectedIds","hiddenIds","hideAndShowBehavior","orientation","xAxis","yAxis","plotArea","dragMode","series","groups","isStacked","getDataItem","selectionMode","drilling","dataCursorPosition","onSelectionChange","isDataCursorEnabled","dataCursorStyle","onViewportChange","onDataCursorPositionChange","onItemDrill","onGroupDrill","onItemHover","onItemFocus","datatip","zoomAndScroll","offset","getNavUtil","getDataItemPos","getGapRatio","valueFormats","findNearest","getMarkerInfo","isRtl","testId","renderGridLinesInFront","isDataXAxis","contextMenuConfig","overview","defaultOverviewContentRenderer","isOverview","yAxisSize","overviewRenderer","props","testIdProps","useTestId","rootRef","useRef","isTestEnv","undefined","isHoriz","xAxisPosition","yAxisPosition","getAxesPosition","resolvedVars","cssContent","useCssVars","colors","Array","from","map","_","index","textMeasureContent","getTextDimensions","useTextDimensions","availSpace","getAvailSpace","w","gaps","getOuterGaps","isTimeAxis","timeAxisType","updatedSpace","getScrollBarSpace","scrollDims","locale","useUser","_width","_height","labelFontSize","layoutInfo","useMemo","hiddenSet","Set","getLayoutInfo","xProps","xScale","xViewportExtent","xAxisExtent","xIndexExtent","xAxisMinExtent","yViewportExtent","yAxisExtent","groupWidth","yProps","yScale","yMaxDim","yMajorTicks","xMajorTicks","yMinorTicks","xMinorTicks","plotAreaSpace","xSpace","ySpace","idToDataMap","formatAxisLabel","formatYValue","updateScrollBarSpace","gapRatio","startIndex","endIndex","getNextChartItem","renderedGroupsIndex","tickLabels","getNextNavGroup","getDefaultNavGroup","renderedGroups","groupsDrilling","length","arrow","nextGroup","getGroupNavUtil","ignoreSelectPointerUp","cursor","yAxisCursor","marqueeProps","marqueeContent","toggleButtonContent","isPointInsideMarquee","mode","useChartMarquee","chartWidth","isMultiSelection","isZoomScroll","getDataById","id","get","viewportMax","viewportMin","touchResponse","touchResponseStyle","useVisTouchResponse","type","supportsTouchDragGestures","activeId","focusedItemInfo","hoveredItemInfo","focusedGroupInfo","navProps","onFocusUpdate","useChartNav","tooltipContent","tooltipProps","getTextAndBounds","text","setText","useState","bounds","useTooltip","position","calculateOffset","current","mergeProps","onPointerMove","event","textAndBounds","target","useTextTruncation","dataSet","getElementData","title","titleProps","dims","parseInt","isFocusVisible","group","name","viewportProps","useChartViewport","selectDrillProps","selectionContent","useSelectDrill","selection","onChange","ignoreAsTrigger","dataset","findNearestData","getDataItemPosition","datatipDisabled","setDatatipDisabled","datatipContent","dataCursorContent","datatipProps","datatipAriaDescribedby","useChartDatatipAndCursor","isDisabled","hasXYValues","plotAreaClipPathId","useId","xStartIndex","xEndIndex","gridLines","Gridlines","isLog","scale","yTicks","xTicks","hasData","contextMenuContent","contextMenuProps","useChartContextMenu","xAxisTitle","yAxisTitle","onContextMenuDismissed","gesture","dragOver","setDragOver","accepted","draggable","dndProps","dndContent","useChartDnd","onDrag","onDragStart","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop","itemsDraggable","groupDraggable","eventsProps","overviewContentRenderer","renderer","background","slidingWindow","tabIndex","ref","merge","style","role","className","baseChartStyle","ceil","PlotArea","color","dragOverStyle","hasAxisLine","Axis","axisPosition","isTextInteractive","groupDrill","focusedGroupIndex","defaultFontSize","ScrollBar","viewport","axisExtent","OverviewContext","Provider","value","overviewChartPlotArea","overviewXScale","windowCoords","xDomain","min","xRange","ScaleLinear","yDomain","yRange","transform","abs","getWindowCoords","hasHandles","OverviewSlidingWindow","onWindowDimsChange","updateViewportFromOverview","deltaX","deltaWidth","getRenderer","overviewWidth","overviewHeight","useOverviewContext","chartHeight","TrackResizeContainer","dimensionStyle"],"mappings":"osCAUgBA,EACdC,EACAC,EACAC,GAEA,MAAMC,EAAaH,EAAKG,WAAa,EACrC,KAAIA,GAAcF,GAIlB,OAAIC,EAAiBC,GACZ,CAAEA,cAEJJ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,KACJgE,EACJF,UAAWA,EACXD,WAAYA,EACZE,iBAAkBA,SAElBO,GAIZ"}
1
+ {"version":3,"file":"Chart-79cfc878.js","sources":["../../src/PRIVATE_Axis/utils/axisNavUtils.ts","../../src/PRIVATE_VisOverview/OverviewBackground.tsx","../../src/PRIVATE_Chart/ChartWithDimensions.tsx","../../src/PRIVATE_VisSVGText/useTextTruncation.ts","../../src/PRIVATE_VisOverview/utils.ts","../../src/PRIVATE_Chart/overviewUtils.tsx","../../src/PRIVATE_Chart/Chart.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 { Group, ChartGroupInfo } from '#utils/UNSAFE_visTypes/chart';\ntype isGroupNavigableType = (groupIndex: number) => boolean;\n\nexport function getNextGroup(\n info: ChartGroupInfo,\n viewportEndIndex: number,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex + 1;\n if (groupIndex >= viewportEndIndex) {\n return;\n }\n\n if (isGroupNavigable(groupIndex)) {\n return { groupIndex };\n }\n return getNextGroup({ groupIndex }, viewportEndIndex, isGroupNavigable);\n}\n\nexport function getPreviousGroup(\n info: ChartGroupInfo,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex - 1;\n if (groupIndex < 0) {\n return;\n }\n if (isGroupNavigable(groupIndex)) {\n return { groupIndex };\n }\n return getPreviousGroup({ groupIndex }, isGroupNavigable);\n}\n\nexport function getGroupNavUtil(\n groups: Group[],\n renderedGroups: number[],\n xIndexExtent: { startIndex: number; endIndex: number },\n drilling: 'on' | 'off' | 'groupsOnly',\n isRtl: boolean\n) {\n const isGroupNavigable = (groupIndex: number) => {\n const groupsDrilling = groups[renderedGroups[groupIndex]].drilling;\n return (drilling === 'on' || drilling === 'groupsOnly') && groupsDrilling != 'off';\n };\n\n const getDefaultNavGroup = (info: ChartGroupInfo) => {\n if (xIndexExtent.startIndex > renderedGroups[info.groupIndex]) {\n info.groupIndex = 0;\n return info;\n } else if (xIndexExtent.endIndex < renderedGroups[info.groupIndex]) {\n info.groupIndex = renderedGroups.length - 1;\n return info;\n }\n return;\n };\n\n const getNextNavGroup = (info: ChartGroupInfo, arrow: 'ArrowRight' | 'ArrowLeft') => {\n let nextGroup = getDefaultNavGroup(info);\n\n if (nextGroup) return nextGroup;\n\n if (arrow === 'ArrowRight') {\n nextGroup = isRtl\n ? getPreviousGroup(info, isGroupNavigable)\n : getNextGroup(info, renderedGroups.length, isGroupNavigable);\n } else {\n nextGroup = isRtl\n ? getNextGroup(info, renderedGroups.length, isGroupNavigable)\n : getPreviousGroup(info, isGroupNavigable);\n }\n return nextGroup || info;\n };\n\n return { getDefaultNavGroup, getNextNavGroup };\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { OverviewProps } from './overview.types';\nimport { styles } from './themes/VisOverview.css';\n\nexport function OverviewBackground({\n x,\n width,\n height,\n y,\n windowX,\n windowHeight,\n windowWidth,\n windowY\n}: OverviewProps) {\n return (\n <>\n <rect\n x={x}\n y={y}\n width={Math.max(0, windowX - x)}\n height={height}\n class={styles.overviewBackground}></rect>\n\n <rect\n x={windowX + windowWidth}\n width={Math.max(0, x + width - windowX - windowWidth)}\n y={y}\n height={height}\n class={styles.overviewBackground}></rect>\n\n <rect\n x={windowX}\n y={y}\n height={Math.max(0, windowY - y)}\n width={windowWidth}\n class={styles.overviewBackground}></rect>\n\n <rect\n x={windowX}\n y={windowY + windowHeight}\n width={windowWidth}\n class={styles.overviewBackground}\n height={Math.max(y + height - windowY - windowHeight, 0)}></rect>\n </>\n );\n}\n","/**\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 */\n\nimport { useTextDimensions } from '#hooks/PRIVATE_useTextDimensions';\nimport { useCssVars } from '#hooks/PRIVATE_useCssVars/useCssVars';\nimport { styles } from './themes/ChartStyles.css';\nimport { useMemo, useRef, useState } from 'preact/hooks';\nimport { PlotArea } from '#PRIVATE_PlotArea';\nimport { useId } from '#hooks/UNSAFE_useId';\nimport { Axis } from '#PRIVATE_Axis/Axis';\nimport { useChartViewport } from '#hooks/PRIVATE_useChartViewport';\nimport {\n getAvailSpace,\n getLayoutInfo,\n getOuterGaps,\n getScrollBarSpace,\n updateScrollBarSpace\n} from '#utils/PRIVATE_chartUtils/layoutUtils';\nimport { useChartNav } from '#hooks/PRIVATE_useChartNav/useChartNav';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { getAxesPosition } from '#PRIVATE_Axis/utils/axisUtils';\nimport { ScrollBar } from '#PRIVATE_ChartScrollBar';\nimport { useSelectDrill } from '#hooks/PRIVATE_useChartEvents/useSelectDrill';\nimport { useChartDatatipAndCursor } from '#hooks/PRIVATE_useChartEvents/useDatatipAndCursor';\nimport { getGroupNavUtil } from '#PRIVATE_Axis/utils/axisNavUtils';\nimport { TimeAxisProps } from '#utils/UNSAFE_visTypes/chart';\nimport { Gridlines } from '#PRIVATE_PlotArea/Gridlines';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { useTestId } from '#hooks/UNSAFE_useTestId';\nimport { getChartVars } from '#utils/PRIVATE_chartUtils';\nimport { useChartContextMenu } from '#hooks/PRIVATE_useChartContextMenu';\nimport { useChartDnd } from '#hooks/PRIVATE_useChartDnd';\nimport { getElementData } from '#utils/UNSAFE_visUtils';\nimport { useTextTruncation } from '#PRIVATE_VisSVGText/useTextTruncation';\nimport { useChartMarquee } from '#hooks/PRIVATE_useChartMarquee';\nimport { ChartProps } from './Chart';\nimport type { gestureTypes } from '#hooks/PRIVATE_useVisContextMenu';\nimport { useVisTouchResponse } from '#hooks/PRIVATE_useVisTouchResponse';\nimport { merge } from '#utils/UNSAFE_stringUtils';\nimport { LineAreaItem } from '#UNSAFE_LineAreaChart/lineAreaChart.types';\nimport { ScatterItem } from '#UNSAFE_ScatterChart/scatterChart.types';\nimport { BarItemData } from '#UNSAFE_BarChart/barChart.types';\nimport { OverviewContext } from '#hooks/PRIVATE_useOverviewContext';\nimport { getWindowCoords } from '#PRIVATE_VisOverview/utils';\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\nimport { getRenderer } from './overviewUtils';\nimport { ComponentChildren } from 'preact';\n\ntype ChartWithDimensionsProps<K, D> = Omit<ChartProps<K, D>, 'width' | 'height'> & {\n width: number;\n height: number;\n overviewRenderer: (props: Dimension) => {\n background: ComponentChildren;\n slidingWindow: ComponentChildren;\n };\n yAxisSize: number;\n isOverview: boolean;\n};\n\nconst OVERVIEW_GAP = 10;\n\nconst chartVars = getChartVars();\n\nexport function ChartWithDimensions<\n K extends string | number,\n D extends LineAreaItem<K> | ScatterItem<K> | BarItemData<K>\n>({\n width,\n height,\n selectedIds,\n hiddenIds,\n hideAndShowBehavior = 'none',\n orientation = 'vertical',\n xAxis,\n yAxis,\n plotArea,\n dragMode = 'user',\n series,\n groups,\n isStacked = false,\n getDataItem,\n selectionMode = 'none',\n drilling = 'off',\n dataCursorPosition,\n onSelectionChange,\n isDataCursorEnabled,\n dataCursorStyle,\n onViewportChange,\n onDataCursorPositionChange,\n onItemDrill,\n onGroupDrill,\n onItemHover,\n onItemFocus,\n datatip,\n zoomAndScroll = 'off',\n offset,\n getNavUtil,\n getDataItemPos,\n getGapRatio,\n valueFormats,\n findNearest,\n getMarkerInfo,\n isRtl,\n children,\n testId,\n renderGridLinesInFront,\n isDataXAxis,\n contextMenuConfig,\n overview = 'off',\n defaultOverviewContentRenderer,\n isOverview,\n yAxisSize,\n overviewRenderer,\n ...props\n}: ChartWithDimensionsProps<K, D>) {\n const testIdProps = useTestId(testId);\n const rootRef = useRef<HTMLDivElement>(null);\n const isTestEnv = testIdProps['data-testid'] !== undefined;\n const isHoriz = orientation === 'horizontal';\n const { xAxisPosition, yAxisPosition } = getAxesPosition(yAxis, isHoriz, isRtl);\n const { resolvedVars, cssContent } = useCssVars(chartVars);\n const colors = Array.from(Array(12)).map((_, index) => {\n return resolvedVars[`color${index + 1}`];\n });\n const { textMeasureContent, getTextDimensions } = useTextDimensions();\n let availSpace = getAvailSpace(width, height);\n\n if (isOverview && yAxisSize) {\n const w = availSpace.width - yAxisSize;\n const gaps = getOuterGaps(w, height);\n availSpace.width -= yAxisSize - 2 * gaps.width;\n availSpace.x += yAxisSize - gaps.width;\n }\n const isTimeAxis = (xAxis as TimeAxisProps)?.timeAxisType != null;\n\n const updatedSpace = getScrollBarSpace(\n isTimeAxis,\n availSpace,\n zoomAndScroll,\n xAxisPosition,\n overview\n );\n let scrollDims = updatedSpace.scrollDims;\n availSpace = updatedSpace.availSpace;\n const { locale } = useUser();\n const { x, y, width: _width, height: _height } = availSpace;\n const labelFontSize = resolvedVars['labelFontSize'];\n const layoutInfo = useMemo(() => {\n const hiddenSet = new Set(hiddenIds);\n return getLayoutInfo<K, D>(\n series,\n groups,\n getDataItem,\n xAxis,\n yAxis,\n { x, y, width: _width, height: _height }, // availSpace\n hiddenSet,\n hideAndShowBehavior,\n isHoriz,\n isRtl,\n isStacked,\n labelFontSize,\n offset,\n locale,\n getTextDimensions,\n isTestEnv,\n isDataXAxis\n );\n }, [\n x,\n y,\n _width,\n _height,\n getDataItem,\n getTextDimensions,\n groups,\n hiddenIds,\n hideAndShowBehavior,\n isDataXAxis,\n isHoriz,\n isRtl,\n isStacked,\n isTestEnv,\n locale,\n offset,\n labelFontSize,\n series,\n xAxis,\n yAxis\n ]);\n\n const {\n xProps,\n xScale,\n xViewportExtent,\n xAxisExtent,\n xIndexExtent,\n xAxisMinExtent,\n yViewportExtent,\n yAxisExtent,\n groupWidth,\n yProps,\n yScale,\n yMaxDim,\n yMajorTicks,\n xMajorTicks,\n yMinorTicks,\n xMinorTicks,\n plotAreaSpace,\n xSpace,\n ySpace,\n idToDataMap,\n formatAxisLabel,\n formatYValue\n } = layoutInfo;\n\n scrollDims = updateScrollBarSpace(scrollDims, xAxisPosition === 'bottom', isRtl, yMaxDim);\n\n const gapRatio = getGapRatio(xIndexExtent.startIndex!, xIndexExtent.endIndex!);\n\n const getNextChartItem = getNavUtil(xIndexExtent.startIndex!, xIndexExtent.endIndex!);\n\n const renderedGroupsIndex = xProps.tickLabels.map(({ index }) => index + xIndexExtent.startIndex);\n const { getNextNavGroup, getDefaultNavGroup } = getGroupNavUtil(\n groups,\n renderedGroupsIndex,\n xIndexExtent as { startIndex: number; endIndex: number }, // TODO : JET-71301 | Scatter should have different nav utils call.\n drilling,\n isRtl\n );\n\n const {\n ignoreSelectPointerUp,\n cursor,\n yAxisCursor,\n marqueeProps,\n marqueeContent,\n toggleButtonContent,\n isPointInsideMarquee,\n dragMode: mode\n } = useChartMarquee<K, D>({\n plotAreaSpace,\n xSpace,\n ySpace,\n dragMode,\n chartWidth: width,\n isMultiSelection: selectionMode === 'multiple',\n onViewportChange,\n isZoomScroll: zoomAndScroll === 'live',\n xAxisExtent,\n xScale,\n selectedIds,\n getDataById: (id) => idToDataMap.get(id),\n onSelectionChange,\n viewportMax: xViewportExtent.viewportMax!,\n viewportMin: xViewportExtent.viewportMin!,\n isRtl,\n xAxisMinExtent\n });\n\n const { touchResponse, touchResponseStyle } = useVisTouchResponse({\n type: 'auto',\n supportsTouchDragGestures: mode !== 'off',\n rootRef\n });\n\n const { activeId, focusedItemInfo, hoveredItemInfo, focusedGroupInfo, navProps, onFocusUpdate } =\n useChartNav({\n rootRef,\n getNextChartItem,\n getNextNavGroup,\n getDefaultNavGroup,\n touchResponse,\n onItemHover,\n onItemFocus,\n drilling,\n xIndexExtent\n });\n\n const onContextMenuDismissed = (gesture: gestureTypes) => {\n if (gesture === 'keyboard') {\n onFocusUpdate();\n }\n };\n\n const getTextAndBounds = (target: EventTarget | null) => {\n if (target != rootRef.current) {\n const dataSet = getElementData(rootRef, target as HTMLElement);\n const text = dataSet?.['ojText']!;\n\n if (!text) {\n return;\n }\n\n if (text === xAxis?.title) {\n return {\n text,\n bounds: xProps.titleProps?.dims\n };\n } else if (text === yAxis?.title) {\n return {\n text,\n bounds: yProps.titleProps?.dims\n };\n } else if (dataSet?.['ojGroupIndex']) {\n const index = parseInt(dataSet['ojGroupIndex']);\n return {\n bounds: xProps.tickLabels[index].dims,\n text: text!\n };\n }\n }\n\n if (target === rootRef.current && focusedGroupInfo.isFocusVisible) {\n const group = groups[focusedGroupInfo.groupIndex];\n return {\n bounds: xProps.tickLabels[focusedGroupInfo.groupIndex].dims,\n text: group.name || group.id\n };\n }\n return;\n };\n\n const { tooltipContent, tooltipProps } = useTextTruncation({\n getTextAndBounds,\n width,\n isRtl\n });\n\n const viewportProps = useChartViewport({\n rootRef,\n width,\n height,\n xViewportExtent,\n yViewportExtent,\n xAxisExtent,\n yAxisExtent,\n xScale,\n yScale,\n plotAreaSpace,\n isRtl,\n isHoriz,\n zoomAndScroll,\n onViewportChange\n });\n\n const ignoreAsTrigger = (target: EventTarget | null) => {\n if (!target) {\n return false;\n }\n\n const dataset = getElementData(rootRef, target as HTMLElement);\n if (\n (dataset &&\n (dataset['ojPrivateObject'] === 'marquee' ||\n dataset['ojPrivateObject'] === 'dragModeControls' ||\n dataset['ojPrivateObject'] === 'scrollBar')) ||\n ignoreSelectPointerUp\n ) {\n return true;\n }\n\n return false;\n };\n\n const { selectDrillProps, selectionContent } = useSelectDrill<K, D>({\n selectionMode,\n selection: [...selectedIds],\n onChange: onSelectionChange,\n rootRef,\n drilling,\n onItemDrill,\n onGroupDrill,\n focusedGroupInfo,\n focusedItemInfo,\n groups,\n getDataItem,\n getDataById: (id) => idToDataMap.get(id),\n ignoreAsTrigger\n });\n\n const findNearestData = findNearest(xScale as any, yScale, groupWidth, gapRatio);\n const getDataItemPosition = getDataItemPos(xScale as any, yScale, groupWidth, gapRatio);\n const [datatipDisabled, setDatatipDisabled] = useState(false);\n const {\n datatipContent,\n dataCursorContent,\n datatipProps: { 'aria-describedby': datatipAriaDescribedby, ...datatipProps }\n } = useChartDatatipAndCursor<K, D>({\n series,\n groups,\n width,\n height,\n findNearest: findNearestData,\n plotAreaSpace,\n onDataCursorPositionChange,\n isDataCursorEnabled,\n dataCursorPosition,\n dataCursorStyle,\n hoveredItemInfo,\n focusedItemInfo,\n getDataItem,\n getMarkerInfo,\n getDataItemPos: getDataItemPosition,\n datatip,\n valueFormats,\n isHoriz,\n touchResponse,\n isDisabled: datatipDisabled,\n xScale: xScale as any,\n yScale,\n timeAxisType: (xAxis as TimeAxisProps)?.timeAxisType,\n formatAxisLabel,\n formatYValue,\n hasXYValues: isDataXAxis\n });\n\n const isGroupInteractive = (index: number) => {\n if ((xAxis as TimeAxisProps)?.timeAxisType != null) {\n return false;\n }\n const groupDrill = groups[index]?.drilling;\n if (groupDrill === 'on') {\n return true;\n }\n\n if (groupDrill != 'off' && (drilling === 'on' || drilling === 'groupsOnly')) {\n return true;\n }\n return false;\n };\n\n const plotAreaClipPathId = useId();\n const { startIndex: xStartIndex, endIndex: xEndIndex } = xIndexExtent;\n const gridLines = (\n <Gridlines\n plotArea={plotArea}\n yMinorTicks={yMinorTicks}\n xMinorTicks={xMinorTicks}\n xScale={xScale}\n yScale={yScale}\n isLog={yAxis?.scale === 'log'}\n yTicks={yMajorTicks}\n xTicks={xMajorTicks}\n yAxisPosition={yAxisPosition}\n isDataXAxis={isDataXAxis}\n />\n );\n const hasData = series.length > 0 && groups.length > 0;\n\n const { contextMenuContent, contextMenuProps } = useChartContextMenu<K, D>({\n isRtl,\n width,\n height,\n getDataItemPosition,\n series,\n groups,\n getDataItem,\n focusedItemInfo,\n rootRef,\n xAxisTitle: xAxis?.title,\n yAxisTitle: yAxis?.title,\n contextMenuConfig: hasData ? contextMenuConfig : undefined,\n onContextMenuDismissed\n });\n\n const [dragOver, setDragOver] = useState<{ accepted: boolean | undefined; type: string }>({\n accepted: undefined,\n type: ''\n });\n\n const { draggable, dndProps, dndContent } = useChartDnd<K, D>({\n onDrag: props.onDrag,\n onDragStart: props.onDragStart,\n onDragEnd: props.onDragEnd,\n onDragEnter: props.onDragEnter,\n onDragLeave: props.onDragLeave,\n onDragOver: props.onDragOver,\n onDrop: props.onDrop,\n itemsDraggable: props.itemsDraggable,\n groupDraggable: props.groupDraggable,\n rootRef,\n groups,\n series,\n selectedIds,\n getDataItem,\n xSpace,\n ySpace,\n plotAreaSpace,\n setDragOver,\n setDatatipDisabled,\n onSelectionChange\n });\n\n const eventsProps = mergeProps(\n navProps,\n selectDrillProps,\n viewportProps,\n datatipProps,\n marqueeProps,\n tooltipProps,\n contextMenuProps,\n dndProps\n );\n\n const overviewContentRenderer =\n overview != 'off' && (overview === 'on' || !overview.renderer)\n ? defaultOverviewContentRenderer\n : undefined;\n\n const { background, slidingWindow } = overviewRenderer(plotAreaSpace);\n return (\n <>\n {getTextDimensions && resolvedVars['labelFontSize'] != undefined && (\n <div\n tabIndex={isOverview ? undefined : 0}\n draggable={draggable}\n ref={rootRef}\n aria-activedescendant={activeId}\n aria-label={props['aria-label']}\n aria-labelledby={props['aria-labelledby']}\n aria-describedby={merge([props['aria-describedby'], datatipAriaDescribedby])}\n style={{ ...touchResponseStyle }}\n role={isOverview ? undefined : 'application'}\n className={styles.baseChartStyle}\n data-oj-private-selection-mode={isTestEnv ? selectionMode : undefined}\n {...testIdProps}\n {...(isOverview ? {} : eventsProps)}>\n <svg\n width=\"100%\"\n height={\n scrollDims.height != 0 && overview != 'off'\n ? `${Math.ceil((updatedSpace.availSpace.height + OVERVIEW_GAP) * 100) / height}%`\n : '100%'\n }>\n <clipPath id={`${plotAreaClipPathId}`}>\n <rect {...plotAreaSpace}></rect>\n </clipPath>\n {background}\n <PlotArea\n color={plotArea?.color}\n dragOverStyle={\n dragOver.type !== 'plotArea' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n yScale={yScale}\n hasAxisLine={!isOverview}\n cursor={cursor}\n isLog={yAxis?.scale === 'log'}\n availSpace={plotAreaSpace}\n xAxisPosition={xAxisPosition}\n isDataXAxis={isDataXAxis}\n isRtl={isRtl}\n />\n {!renderGridLinesInFront && gridLines}\n <Axis\n {...(yProps as any)}\n axisPosition={yAxisPosition}\n isRtl={isRtl}\n cursor={yAxisCursor}\n availSpace={ySpace}\n dragOverStyle={\n dragOver.type !== 'yAxis' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n />\n <Axis\n {...xProps}\n isRtl={isRtl}\n axisPosition={xAxisPosition}\n isTextInteractive={isGroupInteractive}\n activeId={activeId}\n cursor={cursor}\n focusedGroupIndex={\n focusedGroupInfo.isFocusVisible ? focusedGroupInfo.groupIndex : undefined\n }\n availSpace={xSpace}\n dragOverStyle={\n dragOver.type !== 'xAxis' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n />\n <g clip-path={`url(#${plotAreaClipPathId})`}>\n {children({\n xStartIndex,\n xEndIndex,\n colors,\n xScale: xScale as any,\n yScale,\n isPointInsideMarquee,\n defaultFontSize: resolvedVars['labelFontSize'],\n gapRatio,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n getTextDimensions,\n groupWidth\n })}\n {renderGridLinesInFront && gridLines}\n {dataCursorContent}\n </g>\n {slidingWindow}\n {zoomAndScroll === 'live' && !isOverview && (\n <ScrollBar\n availSpace={scrollDims}\n isRtl={isRtl}\n viewport={xViewportExtent}\n axisExtent={xAxisExtent}\n isHoriz={xAxisPosition === 'bottom'}\n />\n )}\n {marqueeContent}\n </svg>\n <OverviewContext.Provider\n value={{\n yAxisSize: ySpace.width,\n isOverview: true,\n width,\n height: scrollDims.height,\n overviewRenderer: (overviewChartPlotArea: Dimension) => {\n const { xScale: overviewXScale, ...windowCoords } = getWindowCoords(\n isRtl,\n xViewportExtent,\n xAxisExtent,\n yViewportExtent,\n yAxisExtent,\n overviewChartPlotArea\n );\n return getRenderer(\n xAxisExtent,\n isRtl,\n overviewXScale,\n overviewChartPlotArea,\n windowCoords,\n true,\n onViewportChange\n );\n }\n }}>\n {!isOverview && overview !== 'off' && overviewContentRenderer && (\n <div style={{ width, height: scrollDims.height }}>{overviewContentRenderer()}</div>\n )}\n </OverviewContext.Provider>\n {toggleButtonContent}\n {datatipContent}\n {tooltipContent}\n {contextMenuContent}\n {selectionContent}\n {dndContent}\n </div>\n )}\n {textMeasureContent}\n {cssContent}\n </>\n );\n}\n","/**\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 */\n\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\nimport { calculateOffset } from '#utils/PRIVATE_visLayoutUtils/layoutUtils';\nimport { useTooltip } from '#hooks/UNSAFE_useTooltip';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { useRef, useState } from 'preact/hooks';\n\ntype Props = {\n getTextAndBounds: (target: EventTarget | null) =>\n | {\n text?: string;\n bounds?: Dimension;\n }\n | undefined;\n isRtl: boolean;\n width: number;\n};\n\nexport function useTextTruncation({ getTextAndBounds, width, isRtl }: Props) {\n const [text, setText] = useState<string>();\n const bounds = useRef<Dimension>();\n\n const { tooltipContent, tooltipProps } = useTooltip({\n text,\n position: 'top-start',\n offset: calculateOffset(isRtl, width, bounds.current)\n });\n\n const onPointerMove = (event: Event) => {\n const textAndBounds = getTextAndBounds(event.target);\n\n if (textAndBounds) {\n bounds.current = textAndBounds.bounds;\n setText(textAndBounds.text);\n } else {\n setText(undefined);\n }\n };\n\n return {\n tooltipContent,\n tooltipProps: mergeProps({ onPointerMove }, tooltipProps)\n };\n}\n","/**\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 */\n\nimport { ScaleLinear } from '#utils/PRIVATE_chartUtils';\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\n\nexport function getWindowCoords(\n isRtl: boolean,\n xViewportExtent: { viewportMin: number; viewportMax: number },\n xAxisExtent: { min: number; max: number },\n yViewportExtent: { viewportMin: number; viewportMax: number },\n yAxisExtent: { min: number; max: number },\n plotAreaSpace: Dimension\n) {\n const xDomain = [xAxisExtent.min, xAxisExtent.max] as [number, number];\n const xRange = (\n isRtl\n ? [plotAreaSpace.x + plotAreaSpace.width, plotAreaSpace.x]\n : [plotAreaSpace.x, plotAreaSpace.x + plotAreaSpace.width]\n ) as [number, number];\n const xScale = new ScaleLinear(xDomain, xRange);\n\n const yDomain = [yAxisExtent.min, yAxisExtent.max] as [number, number];\n const yRange = [plotAreaSpace.y + plotAreaSpace.height, plotAreaSpace.y] as [number, number];\n\n const yScale = new ScaleLinear(yDomain, yRange);\n\n const windowX = xScale.transform(xViewportExtent.viewportMin);\n const windowWidth = Math.abs(\n xScale.transform(xViewportExtent.viewportMax) - xScale.transform(xViewportExtent.viewportMin)\n );\n\n return {\n windowX: isRtl ? windowX - windowWidth : windowX + 0.5,\n windowWidth: windowWidth - 0.5,\n windowY: yScale.transform(yViewportExtent.viewportMax),\n windowHeight: Math.abs(\n yScale.transform(yViewportExtent.viewportMax) - yScale.transform(yViewportExtent.viewportMin)\n ),\n xScale,\n yScale\n };\n}\n","/**\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 */\n\nimport { OverviewSlidingWindow } from '#PRIVATE_VisOverview';\nimport { OverviewBackground } from '#PRIVATE_VisOverview/OverviewBackground';\nimport { updateViewportFromOverview } from '#utils/PRIVATE_chartUtils/overviewUtils';\nimport { Scale } from '#utils/UNSAFE_visTypes/chart';\nimport { Dimension } from '#utils/UNSAFE_visTypes/common';\n\nexport function getRenderer(\n xAxisExtent: { min: number; max: number },\n isRtl: boolean,\n overviewXScale: Scale,\n plotAreaSpace: Dimension,\n windowCoords: { windowX: number; windowY: number; windowHeight: number; windowWidth: number },\n hasHandles: boolean,\n onViewportChange?: (detail: {\n xMin?: number;\n xMax?: number;\n yMin?: number;\n yMax?: number;\n }) => void\n) {\n return {\n slidingWindow: (\n <OverviewSlidingWindow\n {...plotAreaSpace}\n {...windowCoords}\n hasHandles={hasHandles}\n onWindowDimsChange={(props: { deltaX: number; deltaWidth: number }) => {\n updateViewportFromOverview(\n xAxisExtent,\n isRtl,\n windowCoords.windowX,\n windowCoords.windowWidth,\n props.deltaX,\n props.deltaWidth,\n overviewXScale,\n onViewportChange\n );\n }}\n />\n ),\n background: <OverviewBackground {...plotAreaSpace} {...windowCoords} />\n };\n}\n","/**\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 */\n\nimport { dimensionStyle } from './themes/ChartStyles.css';\nimport { TrackResizeContainer } from '#UNSAFE_TrackResizeContainer';\nimport { ChartWithDimensions } from './ChartWithDimensions';\nimport {\n ChartCommonProps,\n ChartSeriesData,\n GetNextChartItemType,\n Info,\n Scale,\n getDataPosType\n} from '#utils/UNSAFE_visTypes/chart';\nimport { Dimension, MarkerShapes } from '#utils/UNSAFE_visTypes/common';\nimport { ComponentChildren, VNode } from 'preact';\nimport { Property } from 'csstype';\nimport { LineAreaItem } from '#UNSAFE_LineAreaChart/lineAreaChart.types';\nimport { ScatterItem } from '#UNSAFE_ScatterChart/scatterChart.types';\nimport { BarItemData } from '#UNSAFE_BarChart/barChart.types';\nimport { useOverviewContext } from '#hooks/PRIVATE_useOverviewContext';\n\nexport type ChartProps<K, D> = {\n selectedIds: Set<K>;\n getGapRatio: (startIndex: number, endIndex: number) => number;\n getNavUtil: (startIndex: number, endIndex: number) => GetNextChartItemType;\n getDataItemPos: (\n xScale: Scale,\n yScale: Scale,\n groupWidth: number,\n gapRatio: number\n ) => getDataPosType;\n findNearest: (\n xScale: Scale,\n yScale: Scale,\n groupWidth: number,\n gapRatio: number\n ) => (\n x: number,\n y: number\n ) =>\n | {\n seriesIndex: number;\n groupIndex: number;\n y: number | undefined;\n x: number;\n }\n | undefined;\n children: (context: {\n xStartIndex: number;\n xEndIndex: number;\n xScale: Scale;\n yScale: Scale;\n gapRatio: number;\n activeId?: string;\n focusedItemInfo: Info;\n hoveredItemInfo?: Info;\n groupWidth: number;\n isPointInsideMarquee: ((id: K, point: { x: number; y: number }) => boolean) | undefined;\n getTextDimensions?: (text: string, style: Record<string, any>) => Dimension;\n defaultFontSize: string;\n colors: string[];\n }) => VNode;\n offset: number;\n series: ChartSeriesData<K, D>[];\n isRtl: boolean;\n renderGridLinesInFront: boolean;\n isDataXAxis?: boolean;\n getMarkerInfo: (\n seriesIndex: number,\n groupIndex: number\n ) => { color: Property.Color | undefined; type?: MarkerShapes };\n defaultOverviewContentRenderer: () => ComponentChildren;\n} & Omit<ChartCommonProps<K, D>, 'highlightedIds' | 'hoverBehavior' | 'selectedIds'>;\n\nexport function Chart<\n K extends string | number,\n D extends LineAreaItem<K> | ScatterItem<K> | BarItemData<K>\n>({ width, height, ...props }: ChartProps<K, D>) {\n // TODO: reevaluate how we handle empty data\n const {\n isOverview,\n overviewRenderer,\n yAxisSize,\n width: overviewWidth,\n height: overviewHeight\n } = useOverviewContext();\n\n let chartWidth = width;\n let chartHeight = height;\n\n if (chartWidth === undefined && isOverview && overviewWidth !== undefined) {\n chartWidth = `${overviewWidth}px`;\n }\n\n if (chartHeight === undefined && isOverview && overviewHeight !== undefined) {\n chartHeight = `${overviewHeight}px`;\n }\n\n return (\n <TrackResizeContainer width={chartWidth} height={chartHeight} class={dimensionStyle}>\n {(width, height) =>\n width || height ? (\n <ChartWithDimensions\n width={width}\n height={height}\n {...props}\n yAxisSize={yAxisSize}\n isOverview={isOverview}\n overviewRenderer={overviewRenderer}\n />\n ) : undefined\n }\n </TrackResizeContainer>\n );\n}\n"],"names":["getNextGroup","info","viewportEndIndex","isGroupNavigable","groupIndex","getPreviousGroup","OverviewBackground","x","width","height","y","windowX","windowHeight","windowWidth","windowY","_jsxs","jsxs","_Fragment","children","_jsx","jsx","Math","max","class","styles","overviewBackground","OVERVIEW_GAP","chartVars","getChartVars","ChartWithDimensions","selectedIds","hiddenIds","hideAndShowBehavior","orientation","xAxis","yAxis","plotArea","dragMode","series","groups","isStacked","getDataItem","selectionMode","drilling","dataCursorPosition","onSelectionChange","isDataCursorEnabled","dataCursorStyle","onViewportChange","onDataCursorPositionChange","onItemDrill","onGroupDrill","onItemHover","onItemFocus","datatip","zoomAndScroll","offset","getNavUtil","getDataItemPos","getGapRatio","valueFormats","findNearest","getMarkerInfo","isRtl","testId","renderGridLinesInFront","isDataXAxis","contextMenuConfig","overview","defaultOverviewContentRenderer","isOverview","yAxisSize","overviewRenderer","props","testIdProps","useTestId","rootRef","useRef","isTestEnv","undefined","isHoriz","xAxisPosition","yAxisPosition","getAxesPosition","resolvedVars","cssContent","useCssVars","colors","Array","from","map","_","index","textMeasureContent","getTextDimensions","useTextDimensions","availSpace","getAvailSpace","w","gaps","getOuterGaps","isTimeAxis","timeAxisType","updatedSpace","getScrollBarSpace","scrollDims","locale","useUser","_width","_height","labelFontSize","layoutInfo","useMemo","hiddenSet","Set","getLayoutInfo","xProps","xScale","xViewportExtent","xAxisExtent","xIndexExtent","xAxisMinExtent","yViewportExtent","yAxisExtent","groupWidth","yProps","yScale","yMaxDim","yMajorTicks","xMajorTicks","yMinorTicks","xMinorTicks","plotAreaSpace","xSpace","ySpace","idToDataMap","formatAxisLabel","formatYValue","updateScrollBarSpace","gapRatio","startIndex","endIndex","getNextChartItem","renderedGroupsIndex","tickLabels","getNextNavGroup","getDefaultNavGroup","renderedGroups","groupsDrilling","length","arrow","nextGroup","getGroupNavUtil","ignoreSelectPointerUp","cursor","yAxisCursor","marqueeProps","marqueeContent","toggleButtonContent","isPointInsideMarquee","mode","useChartMarquee","chartWidth","isMultiSelection","isZoomScroll","getDataById","id","get","viewportMax","viewportMin","touchResponse","touchResponseStyle","useVisTouchResponse","type","supportsTouchDragGestures","activeId","focusedItemInfo","hoveredItemInfo","focusedGroupInfo","navProps","onFocusUpdate","useChartNav","tooltipContent","tooltipProps","getTextAndBounds","text","setText","useState","bounds","useTooltip","position","calculateOffset","current","mergeProps","onPointerMove","event","textAndBounds","target","useTextTruncation","dataSet","getElementData","title","titleProps","dims","parseInt","isFocusVisible","group","name","viewportProps","useChartViewport","selectDrillProps","selectionContent","useSelectDrill","selection","onChange","ignoreAsTrigger","dataset","findNearestData","getDataItemPosition","datatipDisabled","setDatatipDisabled","datatipContent","dataCursorContent","datatipProps","datatipAriaDescribedby","useChartDatatipAndCursor","isDisabled","hasXYValues","plotAreaClipPathId","useId","xStartIndex","xEndIndex","gridLines","Gridlines","isLog","scale","yTicks","xTicks","hasData","contextMenuContent","contextMenuProps","useChartContextMenu","xAxisTitle","yAxisTitle","onContextMenuDismissed","gesture","dragOver","setDragOver","accepted","draggable","dndProps","dndContent","useChartDnd","onDrag","onDragStart","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop","itemsDraggable","groupDraggable","eventsProps","overviewContentRenderer","renderer","background","slidingWindow","tabIndex","ref","merge","style","role","className","baseChartStyle","ceil","PlotArea","color","dragOverStyle","hasAxisLine","Axis","axisPosition","isTextInteractive","groupDrill","focusedGroupIndex","defaultFontSize","ScrollBar","viewport","axisExtent","OverviewContext","Provider","value","overviewChartPlotArea","overviewXScale","windowCoords","xDomain","min","xRange","ScaleLinear","yDomain","yRange","transform","abs","getWindowCoords","hasHandles","OverviewSlidingWindow","onWindowDimsChange","updateViewportFromOverview","deltaX","deltaWidth","getRenderer","overviewWidth","overviewHeight","useOverviewContext","chartHe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BAAoB,CAAClT,MAAO0J,EAAYzJ,OAAQgT,EAAalS,MAAOoS,EAAcA,eAAAzS,SAChF,CAACV,EAAOC,IACPD,GAASC,EACPU,EAAAC,IAACS,EAAmB,CAClBrB,MAAOA,EACPC,OAAQA,KACJgE,EACJF,UAAWA,EACXD,WAAYA,EACZE,iBAAkBA,SAElBO,GAIZ"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact', 'preact/hooks'], (function(e,t,o){"use strict";const c=t.createContext({});e.CheckboxSetContext=c,e.useCheckboxSetContext=()=>o.useContext(c)}));
2
+ //# sourceMappingURL=CheckboxSetContext-2e486ea8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxSetContext-c62db26d.js","sources":["../../src/UNSAFE_CheckboxSet/CheckboxSetContext.ts"],"sourcesContent":["import { createContext } from 'preact';\nimport { useContext } from 'preact/hooks';\n\nimport { ValueUpdateDetail } from '../utils/UNSAFE_valueUpdateDetail';\n\ntype CheckboxSetContextValue = {\n name: string;\n value?: Set<string | number>;\n onCommit?: (detail: ValueUpdateDetail<Set<string | number>>) => void;\n};\n\nconst CheckboxSetContext = createContext<CheckboxSetContextValue>({} as CheckboxSetContextValue);\nconst useCheckboxSetContext = () => useContext(CheckboxSetContext);\n\nexport { CheckboxSetContext, useCheckboxSetContext };\n"],"names":["createContext","useContext"],"mappings":";;;;;;AAWA,MAAM,kBAAkB,GAAGA,oBAAa,CAA0B,EAA6B,EAAE;AAC3F,MAAA,qBAAqB,GAAG,MAAMC,gBAAU,CAAC,kBAAkB;;;;;"}
1
+ {"version":3,"file":"CheckboxSetContext-2e486ea8.js","sources":["../../src/UNSAFE_CheckboxSet/CheckboxSetContext.ts"],"sourcesContent":["import { createContext } from 'preact';\nimport { useContext } from 'preact/hooks';\n\nimport { ValueUpdateDetail } from '../utils/UNSAFE_valueUpdateDetail';\n\ntype CheckboxSetContextValue = {\n name: string;\n value?: Set<string | number>;\n onCommit?: (detail: ValueUpdateDetail<Set<string | number>>) => void;\n};\n\nconst CheckboxSetContext = createContext<CheckboxSetContextValue>({} as CheckboxSetContextValue);\nconst useCheckboxSetContext = () => useContext(CheckboxSetContext);\n\nexport { CheckboxSetContext, useCheckboxSetContext };\n"],"names":["CheckboxSetContext","createContext","useContext"],"mappings":"yEAWA,MAAMA,EAAqBC,EAAaA,cAA0B,mDACpC,IAAMC,EAAAA,WAAWF"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './layoutUtils-4304ffe4', './chartUtils-a85dd8f3', './useChartDnd-44674b7d', './LineSeries-fe392d85', './dataStyleUtils-a0ecedd5', './useUser-e8dd7f7c', './colorUtils-bc5b1d84', './accUtils-93ee6f16', './Common/themes/themeContract.css', './BarGroup-d6909cb1', './Chart-87ae799b'], (function(e,t,i,r,s,o,n,a,d,l,c,g,h){"use strict";function p(e){return t.jsx(x,{datatip:()=>({content:""}),zoomAndScroll:"off",plotArea:{yMajorTick:{isRendered:!1},xMajorTick:{}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},overview:"off"})}const I=.5,m=.2,u=.2;function x({width:e,height:l,selectedIds:x=[],hiddenIds:f=[],highlightedIds:y,hideAndShowBehavior:S="none",orientation:v="vertical",yAxis:b,series:C,groups:A,isStacked:D=!1,getDataItem:T,selectionMode:L="none",drilling:k="off",dataItemGaps:j=.5,dataLabelEffect:M="outline",...R}){const{direction:w,forcedColors:U}=a.useUser(),W="active"===U,z=C.filter((e=>"bar"===e.type)),E="rtl"===w,G="log"===b?.scale,B=R.xAxis?.timeAxisType,F=new Set(f),P=new Set(x),H=new Set(y),N="horizontal"===v,q=d.getColorRamp(),O=s.getSeriesData(C.length,A.length,T,F,G),V=O.some(((e,t)=>"area"===C[t].type||"lineWithArea"===C[t].type)),J=O.some(((e,t)=>"bar"===C[t].type)),K=(e,t)=>D?{...T(e,t),value:O[e][t]}:T(e,t),Q=s.getMarkers(),X=[];return t.jsx(h.Chart,{width:e,height:l,selectedIds:P,hiddenIds:f,hideAndShowBehavior:S,orientation:v,yAxis:b,series:C,defaultOverviewContentRenderer:()=>t.jsx(p,{groups:A,series:C,getDataItem:T}),groups:A,selectionMode:L,drilling:k,isStacked:D,getDataItem:T,findNearest:(e,t)=>i.findNearestDataPoint(C,A,e,t,K,D,(()=>({offset:0,dataWidth:0})),((e,t)=>t.transform(e)),G,0,F,B),getDataItemPos:(e,t,i,s)=>{const o=J?g.getBarPosition(z,A,T,e,t,F,j,i,s,"log"===b?.scale,D,E,N,B):void 0;return(i,s)=>"bar"===C[i].type?o?o(i,s):void 0:r.getLineAreaChartItemPosition(i,s,O,T,A,N,e,t,B)},getMarkerInfo:(e,t)=>({color:n.getItemColor(e,t,C,T),markerType:n.getMarkerType(e,t,T)}),renderGridLinesInFront:V,getNavUtil:(e,t)=>n.getLineAreaChartNavUtil(T,C.length,e,t,D,E,N),getGapRatio:()=>1,offset:J?I:m,isRtl:E,...R,children:({xStartIndex:e,xEndIndex:i,xScale:n,yScale:a,activeId:d,focusedItemInfo:l,hoveredItemInfo:h,isPointInsideMarquee:p,getTextDimensions:I,defaultFontSize:m,groupWidth:x})=>{let f=-1;return t.jsx(t.Fragment,{children:O.map(((S,w)=>{const U=C[w],V="lineWithArea"===U.type?u:1,J="area"===U.type||"lineWithArea"===U.type,Y="area"===U.type;if(0===S.length)return;const Z=s.getLineAreaSegments(a,n,S,e,i,N,G,A,w,K,B);X[w]=Z[0];const $="bar"!==U.type?"curved"===U.lineType&&D&&O.length>1&&w>0:D&&O.length>1&&w>0,_=void 0===y||0===H.size||H.has(U.id),ee=D&&0!=w?X.reduce(((e,t,i)=>i>=w?e:t.length>0?i:e),0):void 0;return"bar"===U.type&&(f+=1),t.jsxs(t.Fragment,{children:["bar"===U.type&&A.slice(e,i+1).map(((r,s)=>t.jsx(g.BarGroup,{yScale:a,xScale:n,groupIndex:s+e,selectedIds:P,hiddenIds:F,highlightedIds:y?H:y,isDrillEnabled:"on"===k,series:z,barGapRatio:g.getBarGapRatio(D,e,i),dataItemGaps:j,isPointInsideMarquee:p,isStacked:D,groupWidth:x,group:A[s],timeAxisType:R.xAxis?.timeAxisType,colors:q,activeId:d,isLog:"log"===b?.scale,orientation:v,getDataItem:T,isSelectionEnabled:"none"!=L,isRtl:E,focusedItemInfo:l,hoveredItemInfo:h,getTextDimensions:I,defaultFontSize:m,seriesIndex:f}))),J&&t.jsx(r.AreaSeries,{yScale:a,lineType:U.lineType,color:U.areaColor||q[w%q.length],isHorizontal:N,areaColorOpacity:V,isBottomSegmentCurved:$,bottomCoords:void 0!==ee&&X[ee].some((e=>null!=e))?X[ee]:void 0,lineSegments:Z,isLog:G,isHighlighted:_,seriesIndex:w}),"line"===U.type&&t.jsx(o.LineSeries,{lineType:U.lineType,lineColor:Y?c.colorSchemeVars.dvt.contrastLine:U.lineColor,lineWidth:Y?1.25:U.lineWidth,lineStyle:U.lineStyle||"solid",color:U.lineColor||q[w%q.length],lineSegmentCoords:Z,isHorizontal:N,isHighlighted:_,seriesIndex:w}),!D&&("line"===U.type||J)&&t.jsx(o.MarkersWithLabel,{yScale:a,xScale:n,groups:A,series:U,timeAxisType:B,color:q[w%q.length],seriesIndex:w,startIndex:e,endIndex:i,markerType:Q[w%Q.length],orientation:v,isLog:G,activeId:d,getDataItem:T,isPointInsideMarquee:p,selectedIds:P,focusedItemIndex:l.seriesIndex!==w||!l.isFocusVisible||R.isDataCursorEnabled&&R.dataCursorStyle?.isMarkerDisplayed?void 0:l.groupIndex,hoveredItemIndex:h?.isCurrent&&h.seriesIndex===w?h.groupIndex:void 0,isSelectionEnabled:"single"===L||"multiple"===L,isDrillEnabled:"on"===k,defaultFontSize:m,dataLabelEffect:M,isHighContrast:W})]})}))})}})}e.ComboChart=x}));
2
- //# sourceMappingURL=ComboChart-79e7d438.js.map
1
+ define(['exports', 'preact/jsx-runtime', './layoutUtils-4304ffe4', './chartUtils-a85dd8f3', './useChartDnd-44674b7d', './LineSeries-fe392d85', './dataStyleUtils-a0ecedd5', './useUser-e8dd7f7c', './colorUtils-bc5b1d84', './accUtils-93ee6f16', './Common/themes/themeContract.css', './BarGroup-d6909cb1', './Chart-79cfc878'], (function(e,t,i,r,s,o,n,a,d,l,c,g,h){"use strict";function p(e){return t.jsx(x,{datatip:()=>({content:""}),zoomAndScroll:"off",plotArea:{yMajorTick:{isRendered:!1},xMajorTick:{}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},overview:"off"})}const I=.5,m=.2,u=.2;function x({width:e,height:l,selectedIds:x=[],hiddenIds:f=[],highlightedIds:y,hideAndShowBehavior:S="none",orientation:v="vertical",yAxis:C,series:b,groups:A,isStacked:D=!1,getDataItem:T,selectionMode:L="none",drilling:k="off",dataItemGaps:j=.5,dataLabelEffect:M="outline",...R}){const{direction:w,forcedColors:U}=a.useUser(),W="active"===U,z=b.filter((e=>"bar"===e.type)),E="rtl"===w,G="log"===C?.scale,B=R.xAxis?.timeAxisType,F=new Set(f),P=new Set(x),H=new Set(y),N="horizontal"===v,q=d.getColorRamp(),O=s.getSeriesData(b.length,A.length,T,F,G),V=O.some(((e,t)=>"area"===b[t].type||"lineWithArea"===b[t].type)),J=O.some(((e,t)=>"bar"===b[t].type)),K=(e,t)=>D?{...T(e,t),value:O[e][t]}:T(e,t),Q=s.getMarkers(),X=[];return t.jsx(h.Chart,{width:e,height:l,selectedIds:P,hiddenIds:f,hideAndShowBehavior:S,orientation:v,yAxis:C,series:b,defaultOverviewContentRenderer:()=>t.jsx(p,{groups:A,series:b,getDataItem:T}),groups:A,selectionMode:L,drilling:k,isStacked:D,getDataItem:T,findNearest:(e,t)=>i.findNearestDataPoint(b,A,e,t,K,D,(()=>({offset:0,dataWidth:0})),((e,t)=>t.transform(e)),G,0,F,B),getDataItemPos:(e,t,i,s)=>{const o=J?g.getBarPosition(z,A,T,e,t,F,j,i,s,"log"===C?.scale,D,E,N,B):void 0;return(i,s)=>"bar"===b[i].type?o?o(i,s):void 0:r.getLineAreaChartItemPosition(i,s,O,T,A,N,e,t,B)},getMarkerInfo:(e,t)=>({color:n.getItemColor(e,t,b,T),markerType:n.getMarkerType(e,t,T)}),renderGridLinesInFront:V,getNavUtil:(e,t)=>n.getLineAreaChartNavUtil(T,b.length,e,t,D,E,N),getGapRatio:()=>1,offset:J?I:m,isRtl:E,...R,children:({xStartIndex:e,xEndIndex:i,xScale:n,yScale:a,activeId:d,focusedItemInfo:l,hoveredItemInfo:h,isPointInsideMarquee:p,getTextDimensions:I,defaultFontSize:m,groupWidth:x})=>{let f=-1;return t.jsx(t.Fragment,{children:O.map(((S,w)=>{const U=b[w],V="lineWithArea"===U.type?u:1,J="area"===U.type||"lineWithArea"===U.type,Y="area"===U.type;if(0===S.length)return;const Z=s.getLineAreaSegments(a,n,S,e,i,N,G,A,w,K,B);X[w]=Z[0];const $="bar"!==U.type?"curved"===U.lineType&&D&&O.length>1&&w>0:D&&O.length>1&&w>0,_=void 0===y||0===H.size||H.has(U.id),ee=D&&0!=w?X.reduce(((e,t,i)=>i>=w?e:t.length>0?i:e),0):void 0;return"bar"===U.type&&(f+=1),t.jsxs(t.Fragment,{children:["bar"===U.type&&A.slice(e,i+1).map(((r,s)=>t.jsx(g.BarGroup,{yScale:a,xScale:n,groupIndex:s+e,selectedIds:P,hiddenIds:F,highlightedIds:y?H:y,isDrillEnabled:"on"===k,series:z,barGapRatio:g.getBarGapRatio(D,e,i),dataItemGaps:j,isPointInsideMarquee:p,isStacked:D,groupWidth:x,group:A[s],timeAxisType:R.xAxis?.timeAxisType,colors:q,activeId:d,isLog:"log"===C?.scale,orientation:v,getDataItem:T,isSelectionEnabled:"none"!=L,isRtl:E,focusedItemInfo:l,hoveredItemInfo:h,getTextDimensions:I,defaultFontSize:m,seriesIndex:f}))),J&&t.jsx(r.AreaSeries,{yScale:a,lineType:U.lineType,color:U.areaColor||q[w%q.length],isHorizontal:N,areaColorOpacity:V,isBottomSegmentCurved:$,bottomCoords:void 0!==ee&&X[ee].some((e=>null!=e))?X[ee]:void 0,lineSegments:Z,isLog:G,isHighlighted:_,seriesIndex:w}),"line"===U.type&&t.jsx(o.LineSeries,{lineType:U.lineType,lineColor:Y?c.colorSchemeVars.dvt.contrastLine:U.lineColor,lineWidth:Y?1.25:U.lineWidth,lineStyle:U.lineStyle||"solid",color:U.lineColor||q[w%q.length],lineSegmentCoords:Z,isHorizontal:N,isHighlighted:_,seriesIndex:w}),!D&&("line"===U.type||J)&&t.jsx(o.MarkersWithLabel,{yScale:a,xScale:n,groups:A,series:U,timeAxisType:B,color:q[w%q.length],seriesIndex:w,startIndex:e,endIndex:i,markerType:Q[w%Q.length],orientation:v,isLog:G,activeId:d,getDataItem:T,isPointInsideMarquee:p,selectedIds:P,focusedItemIndex:l.seriesIndex!==w||!l.isFocusVisible||R.isDataCursorEnabled&&R.dataCursorStyle?.isMarkerDisplayed?void 0:l.groupIndex,hoveredItemIndex:h?.isCurrent&&h.seriesIndex===w?h.groupIndex:void 0,isSelectionEnabled:"single"===L||"multiple"===L,isDrillEnabled:"on"===k,defaultFontSize:m,dataLabelEffect:M,isHighContrast:W})]})}))})}})}e.ComboChart=x}));
2
+ //# sourceMappingURL=ComboChart-72eda15f.js.map