@oracle/oraclejet-preact 19.0.5 → 19.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/amd/{BarChart-8521c53a.js → BarChart-d94f9c56.js} +2 -2
  2. package/amd/{BarChart-8521c53a.js.map → BarChart-d94f9c56.js.map} +1 -1
  3. package/amd/{Chart-061335fe.js → Chart-3108fa88.js} +2 -2
  4. package/amd/{Chart-061335fe.js.map → Chart-3108fa88.js.map} +1 -1
  5. package/amd/CheckboxSet-678ea1d4.js +2 -0
  6. package/{es/CheckboxSet-751d4298.js.map → amd/CheckboxSet-678ea1d4.js.map} +1 -1
  7. package/amd/ColorPicker-8ef0b6e0.js +2 -0
  8. package/amd/{ColorPicker-d8bda48d.js.map → ColorPicker-8ef0b6e0.js.map} +1 -1
  9. package/amd/{ComboChart-f3876b51.js → ComboChart-e61b5581.js} +2 -2
  10. package/amd/{ComboChart-f3876b51.js.map → ComboChart-e61b5581.js.map} +1 -1
  11. package/amd/{InputColor-192a309b.js → InputColor-5315b76a.js} +2 -2
  12. package/amd/{InputColor-192a309b.js.map → InputColor-5315b76a.js.map} +1 -1
  13. package/amd/InputDatePicker-c5ceeb44.js +2 -0
  14. package/amd/{InputDatePicker-8c8e14ca.js.map → InputDatePicker-c5ceeb44.js.map} +1 -1
  15. package/amd/{LineAreaChart-68050d87.js → LineAreaChart-f8aefe07.js} +2 -2
  16. package/amd/{LineAreaChart-68050d87.js.map → LineAreaChart-f8aefe07.js.map} +1 -1
  17. package/amd/NavigationListItem-82b0c382.js +2 -0
  18. package/amd/{NavigationListItem-cdbcc394.js.map → NavigationListItem-82b0c382.js.map} +1 -1
  19. package/amd/{OverflowTabBar-587b7c2a.js → OverflowTabBar-e2b5f36e.js} +2 -2
  20. package/amd/{OverflowTabBar-587b7c2a.js.map → OverflowTabBar-e2b5f36e.js.map} +1 -1
  21. package/amd/{OverflowTabBarItem-bcf24ceb.js → OverflowTabBarItem-e01e53ae.js} +2 -2
  22. package/amd/{OverflowTabBarItem-bcf24ceb.js.map → OverflowTabBarItem-e01e53ae.js.map} +1 -1
  23. package/amd/PRIVATE_Chart.js +1 -1
  24. package/amd/{ScatterChart-6fc3c47e.js → ScatterChart-1999acf0.js} +2 -2
  25. package/amd/{ScatterChart-6fc3c47e.js.map → ScatterChart-1999acf0.js.map} +1 -1
  26. package/amd/Theme-redwood/theme.css +187 -187
  27. package/amd/Theme-stable/theme.css +173 -173
  28. package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
  29. package/amd/UNSAFE_BarChart.js +1 -1
  30. package/amd/UNSAFE_CheckboxItem.js +1 -1
  31. package/amd/UNSAFE_CheckboxItem.js.map +1 -1
  32. package/amd/UNSAFE_CheckboxSet.js +1 -1
  33. package/amd/UNSAFE_CheckboxSet.js.map +1 -1
  34. package/amd/UNSAFE_ColorPicker.js +1 -1
  35. package/amd/UNSAFE_ComboChart.js +1 -1
  36. package/amd/UNSAFE_InputColor.js +1 -1
  37. package/amd/UNSAFE_InputDatePicker.js +1 -1
  38. package/amd/UNSAFE_LineAreaChart.js +1 -1
  39. package/amd/UNSAFE_NavigationList.js +1 -1
  40. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  41. package/amd/UNSAFE_RichCheckboxSet.js +1 -1
  42. package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
  43. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  44. package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
  45. package/amd/UNSAFE_ScatterChart.js +1 -1
  46. package/amd/UNSAFE_TabBar.js +1 -1
  47. package/amd/UNSAFE_TabBarCommon.js +1 -1
  48. package/amd/UNSAFE_TabBarMixed.js +1 -1
  49. package/cjs/{Chart-55c4cd8f.js → Chart-c07adbbd.js} +2 -2
  50. package/cjs/{Chart-55c4cd8f.js.map → Chart-c07adbbd.js.map} +1 -1
  51. package/cjs/{ColorPalette-ea5e1bed.js → ColorPalette-f8fbe6a4.js} +2 -2
  52. package/cjs/{ColorPalette-ea5e1bed.js.map → ColorPalette-f8fbe6a4.js.map} +1 -1
  53. package/cjs/{ColorPicker-03036ee3.js → ColorPicker-efe1edb3.js} +2 -2
  54. package/cjs/{ColorPicker-03036ee3.js.map → ColorPicker-efe1edb3.js.map} +1 -1
  55. package/cjs/{Expander-96ce2888.js → Expander-01af6642.js} +2 -2
  56. package/cjs/{Expander-96ce2888.js.map → Expander-01af6642.js.map} +1 -1
  57. package/cjs/MaxLengthCounter-39055ba1.js +27 -0
  58. package/cjs/MaxLengthCounter-39055ba1.js.map +1 -0
  59. package/cjs/{NavigationListItem-24abe2ab.js → NavigationListItem-843e014d.js} +4 -2
  60. package/cjs/{NavigationListItem-24abe2ab.js.map → NavigationListItem-843e014d.js.map} +1 -1
  61. package/cjs/{NavigationListLinkItem-35f33123.js → NavigationListLinkItem-0931af4d.js} +2 -2
  62. package/cjs/{NavigationListLinkItem-35f33123.js.map → NavigationListLinkItem-0931af4d.js.map} +1 -1
  63. package/cjs/{OverflowTabBarItem-c8809159.js → OverflowTabBarItem-6c3c9629.js} +4 -4
  64. package/cjs/{OverflowTabBarItem-c8809159.js.map → OverflowTabBarItem-6c3c9629.js.map} +1 -1
  65. package/cjs/PRIVATE_Chart.js +4 -4
  66. package/cjs/PRIVATE_Expander.js +55 -55
  67. package/cjs/PRIVATE_Table.js +5 -5
  68. package/cjs/{SortControl-7be650eb.js → SortControl-5ca85c6b.js} +2 -2
  69. package/cjs/{SortControl-7be650eb.js.map → SortControl-5ca85c6b.js.map} +1 -1
  70. package/cjs/{TabBar-afd26c75.js → TabBar-1885c9c5.js} +3 -1
  71. package/cjs/{TabBar-afd26c75.js.map → TabBar-1885c9c5.js.map} +1 -1
  72. package/cjs/{TabBarLinkItem-4e4f8da0.js → TabBarLinkItem-cdff6676.js} +2 -2
  73. package/cjs/{TabBarLinkItem-4e4f8da0.js.map → TabBarLinkItem-cdff6676.js.map} +1 -1
  74. package/cjs/{Table-0bca32d4.js → Table-49575528.js} +2 -2
  75. package/cjs/{Table-0bca32d4.js.map → Table-49575528.js.map} +1 -1
  76. package/cjs/Theme-redwood/theme.css +148 -148
  77. package/cjs/Theme-stable/theme.css +239 -239
  78. package/cjs/UNSAFE_BarChart.js +4 -4
  79. package/cjs/UNSAFE_ColorPalette.js +69 -69
  80. package/cjs/UNSAFE_ColorPicker.js +64 -64
  81. package/cjs/UNSAFE_ComboChart.js +4 -4
  82. package/cjs/UNSAFE_FlatTreeView.js +30 -30
  83. package/cjs/UNSAFE_InputColor.js +12 -12
  84. package/cjs/UNSAFE_InputDatePicker.js +92 -92
  85. package/cjs/UNSAFE_LineAreaChart.js +4 -4
  86. package/cjs/UNSAFE_NavigationList.js +13 -13
  87. package/cjs/UNSAFE_NavigationListCommon.js +2 -2
  88. package/cjs/UNSAFE_OverflowTabBar.js +35 -35
  89. package/cjs/UNSAFE_ReorderableTabBar.js +30 -9
  90. package/cjs/UNSAFE_ReorderableTabBar.js.map +1 -1
  91. package/cjs/UNSAFE_ScatterChart.js +4 -4
  92. package/cjs/UNSAFE_SortControl.js +47 -47
  93. package/cjs/UNSAFE_TabBar.js +35 -35
  94. package/cjs/UNSAFE_TabBarCommon.js +55 -55
  95. package/cjs/UNSAFE_TabBarMixed.js +34 -34
  96. package/cjs/UNSAFE_TableView.js +5 -5
  97. package/cjs/UNSAFE_TextArea.js +216 -106
  98. package/cjs/UNSAFE_TextArea.js.map +1 -1
  99. package/cjs/UNSAFE_TextAreaAutosize.js +2 -2
  100. package/cjs/UNSAFE_TextAreaAutosize.js.map +1 -1
  101. package/es/CheckboxSetContext-1be56556.js +9 -0
  102. package/{amd/CheckboxSetContext-2e486ea8.js.map → es/CheckboxSetContext-1be56556.js.map} +1 -1
  103. package/es/{ColorPicker-3bb4cad3.js → ColorPicker-b0f5a7f2.js} +2 -2
  104. package/es/{ColorPicker-3bb4cad3.js.map → ColorPicker-b0f5a7f2.js.map} +1 -1
  105. package/es/DiagramStyles.styles.css +10 -16
  106. package/es/DiagramStyles.styles2.css +16 -10
  107. package/es/PRIVATE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
  108. package/es/PRIVATE_ContainerDiagram.js +1 -1
  109. package/es/Theme-redwood/theme.css +406 -406
  110. package/es/Theme-stable/theme.css +457 -457
  111. package/es/UNSAFE_CheckboxItem.js +47 -101
  112. package/es/UNSAFE_CheckboxItem.js.map +1 -1
  113. package/es/UNSAFE_CheckboxSet.js +44 -10
  114. package/es/UNSAFE_CheckboxSet.js.map +1 -1
  115. package/es/UNSAFE_ColorPicker.js +25 -25
  116. package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
  117. package/es/UNSAFE_Diagram.js +1 -1
  118. package/es/UNSAFE_InputColor.js +2 -2
  119. package/es/UNSAFE_InputDatePicker.js +92 -92
  120. package/es/UNSAFE_RichCheckboxSet.js +25 -29
  121. package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
  122. package/es/UNSAFE_RichSelectionItem.js +29 -172
  123. package/es/UNSAFE_RichSelectionItem.js.map +1 -1
  124. package/package.json +2 -2
  125. package/amd/CheckboxSetContext-2e486ea8.js +0 -2
  126. package/amd/ColorPicker-d8bda48d.js +0 -2
  127. package/amd/InputDatePicker-8c8e14ca.js +0 -2
  128. package/amd/NavigationListItem-cdbcc394.js +0 -2
  129. package/cjs/TextArea-8608dba1.js +0 -187
  130. package/cjs/TextArea-8608dba1.js.map +0 -1
  131. package/es/CheckboxSet-751d4298.js +0 -49
@@ -1 +1 @@
1
- {"version":3,"file":"Chart-55c4cd8f.js","sources":["../../src/PRIVATE_Axis/utils/axisNavUtils.ts","../../src/PRIVATE_VisSVGText/useTextTruncation.ts","../../src/PRIVATE_VisOverview/utils.ts","../../src/PRIVATE_VisOverview/OverviewBackground.tsx","../../src/PRIVATE_Chart/overviewUtils.tsx","../../src/PRIVATE_Chart/ChartWithDimensions.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 */\n\nimport { GroupLevelItem } from '#PRIVATE_Axis/groupAxis/hierarchicalUtils';\nimport { ChartGroupInfo } from '#utils/UNSAFE_visTypes/chart';\n\ntype isGroupNavigableType = (levelIndex: number, groupIndex: number) => boolean;\n\n/**\n * Returns the parent group for the navigable item.\n * @param levelsArray The levels array.\n * @param levelIndex The levelIndex of current naviable group..\n * @param groupIndex The groupIndex of current navigable group.\n * @returns\n */\nexport function getParentGroup(\n levelsArray: GroupLevelItem[][],\n levelIndex: number,\n groupIndex: number,\n isGroupNavigable: isGroupNavigableType\n) {\n const path = levelsArray[levelIndex][groupIndex].path;\n if (path.length === 1) {\n return {\n levelIndex,\n groupIndex\n };\n }\n\n let lIndex = Math.max(0, levelIndex - 1);\n const groupItem = levelsArray[levelIndex][groupIndex];\n const { start, end } = groupItem;\n\n while (lIndex >= 0) {\n for (let i = 0; i < levelsArray[lIndex].length; i++) {\n const { start: s, end: e } = levelsArray[lIndex][i];\n if (s <= start && end <= e) {\n if (isGroupNavigable(lIndex, i)) {\n return { groupIndex: i, levelIndex: lIndex };\n }\n }\n }\n lIndex -= 1;\n }\n\n return {\n levelIndex,\n groupIndex\n };\n}\n\n/**\n * @param levelsArray The levels array.\n * @param levelIndex The levelIndex of current navigable item.\n * @param groupIndex The groupIndex of current navigable item.\n * @returns\n */\nexport function getChildGroup(\n levelsArray: GroupLevelItem[][],\n levelIndex: number,\n groupIndex: number,\n isGroupNavigable: isGroupNavigableType\n) {\n if (levelIndex === levelsArray.length - 1) {\n return { levelIndex, groupIndex };\n }\n\n const lIndex = Math.min(levelsArray.length - 1, levelIndex + 1);\n\n const groupItem = levelsArray[levelIndex][groupIndex];\n const { start, end } = groupItem;\n\n while (lIndex <= levelsArray.length - 1) {\n for (let i = 0; i < levelsArray[lIndex].length; i++) {\n const { start: s, end: e } = levelsArray[lIndex][i];\n if (start <= s && e <= end) {\n if (isGroupNavigable(lIndex, i)) {\n return { groupIndex: i, levelIndex: lIndex };\n }\n }\n }\n }\n return {\n levelIndex,\n groupIndex\n };\n}\n\nexport function getNextGroup(\n levelsArray: GroupLevelItem[][],\n info: ChartGroupInfo,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex! + 1;\n const levelIndex = info.levelIndex!;\n\n const maxgroup = levelsArray[levelIndex].length - 1;\n\n if (groupIndex > maxgroup) {\n return;\n }\n\n if (isGroupNavigable(levelIndex!, groupIndex)) {\n return { groupIndex, levelIndex };\n }\n return getNextGroup(levelsArray, { groupIndex, levelIndex }, isGroupNavigable);\n}\n\nexport function getPreviousGroup(\n info: ChartGroupInfo,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex! - 1;\n const levelIndex = info.levelIndex;\n if (groupIndex < 0) {\n return;\n }\n if (isGroupNavigable(levelIndex!, groupIndex)) {\n return { groupIndex, levelIndex };\n }\n return getPreviousGroup({ groupIndex, levelIndex }, isGroupNavigable);\n}\n\nexport function getGroupNavUtil(\n levelsArray: GroupLevelItem[][],\n drilling: 'on' | 'off' | 'groupsOnly',\n isRtl: boolean,\n isHoriz: boolean,\n isGroupLabelRendered?: (levelIndex: number, groupIndex: number) => boolean\n) {\n const isGroupNavigable = (levelIndex: number, groupIndex: number) => {\n const group = levelsArray[levelIndex][groupIndex].item;\n const groupName = group.name || group.id;\n const groupsDrilling = group.drilling;\n const isLabelRendered = !!isGroupLabelRendered?.(levelIndex, groupIndex);\n return (\n isLabelRendered &&\n groupName != null &&\n (drilling === 'on' || drilling === 'groupsOnly') &&\n groupsDrilling != 'off'\n );\n };\n\n const getDefaultNavGroup = () => {\n for (let levelIndex = 0; levelIndex < levelsArray.length; levelIndex++) {\n const numGroups = levelsArray[levelIndex].length;\n for (let groupIndex = 0; groupIndex < numGroups; groupIndex++) {\n if (isGroupNavigable(levelIndex, groupIndex)) {\n return { groupIndex, levelIndex };\n }\n }\n }\n return { groupIndex: 0, levelIndex: 0 };\n };\n\n const getNextNavGroup = (\n info: ChartGroupInfo,\n arrow: 'ArrowRight' | 'ArrowLeft' | 'ArrowUp' | 'ArrowDown'\n ) => {\n let nextGroup;\n\n if (arrow === 'ArrowRight') {\n if (isHoriz) {\n nextGroup = !isRtl\n ? getChildGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable)\n : getParentGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n } else {\n nextGroup = isRtl\n ? getPreviousGroup(info, isGroupNavigable)\n : getNextGroup(levelsArray, info, isGroupNavigable);\n }\n } else if (arrow === 'ArrowLeft') {\n if (isHoriz) {\n nextGroup = isRtl\n ? getChildGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable)\n : getParentGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n } else {\n nextGroup = isRtl\n ? getNextGroup(levelsArray, info, isGroupNavigable)\n : getPreviousGroup(info, isGroupNavigable);\n }\n } else if (arrow === 'ArrowDown') {\n nextGroup = isHoriz\n ? getNextGroup(levelsArray, info, isGroupNavigable)\n : getParentGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n } else if (arrow === 'ArrowUp') {\n nextGroup = isHoriz\n ? getPreviousGroup(info, isGroupNavigable)\n : getChildGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n }\n return nextGroup || info;\n };\n\n return { getNextNavGroup, getDefaultNavGroup };\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,\n windowWidth: windowWidth,\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 * 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 { 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 { 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 { GroupAxisProps, DataAxisProps, 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 '@oracle/oraclejet-internal-utilities/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';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { getAriaLabelGenerator } from '#utils/PRIVATE_chartUtils/dataTipUtils';\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 y2Axis,\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 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 getStartAndEndAxesOffset,\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, y2AxisPosition } = getAxesPosition(\n yAxis,\n y2Axis,\n isHoriz,\n isRtl\n );\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\n const split = y2Axis?.split ?? 'off';\n const isSplitDualY = split !== 'off';\n const splitterPosition = split !== 'off' ? split : 0.5;\n\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 y2Axis,\n { x, y, width: _width, height: _height }, // availSpace\n hiddenSet,\n hideAndShowBehavior,\n isHoriz,\n isRtl,\n isStacked,\n labelFontSize,\n getStartAndEndAxesOffset,\n locale,\n isSplitDualY,\n splitterPosition,\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 getStartAndEndAxesOffset,\n labelFontSize,\n series,\n xAxis,\n yAxis,\n y2Axis,\n splitterPosition,\n isSplitDualY\n ]);\n\n const {\n getGroupFromPath,\n levelsArray,\n xAxisInfo,\n xProps,\n xScale,\n yProps,\n y2Props,\n yScale,\n y2Scale,\n yMaxDim,\n yAxisInfo,\n plotAreaSpace,\n xSpace,\n ySpace,\n y2Space,\n idToDataMap,\n y2AxisInfo\n } = layoutInfo;\n\n const leafGroupsInfo = levelsArray.length > 0 ? levelsArray[levelsArray.length - 1] : [];\n\n scrollDims = updateScrollBarSpace(scrollDims, xAxisPosition === 'bottom', isRtl, yMaxDim);\n\n const gapRatio = getGapRatio(xAxisInfo.startIndex!, xAxisInfo.endIndex!);\n\n const getNextChartItem = getNavUtil(xAxisInfo.startIndex!, xAxisInfo.endIndex!);\n\n const { getNextNavGroup, getDefaultNavGroup } = getGroupNavUtil(\n levelsArray,\n drilling,\n isRtl,\n isHoriz,\n xProps.isGroupLabelRendered\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 rootRef,\n plotAreaSpace,\n xSpace,\n ySpace,\n dragMode,\n chartWidth: width,\n isMultiSelection: selectionMode === 'multiple',\n onViewportChange,\n isZoomScroll: zoomAndScroll === 'live',\n xScale,\n selectedIds,\n getDataById: (id) => idToDataMap.get(id),\n onSelectionChange,\n isRtl,\n xAxisInfo\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 xAxisInfo\n });\n\n const onContextMenuDismissed = (gesture: gestureTypes) => {\n if (gesture === 'keyboard') {\n onFocusUpdate();\n }\n };\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const getTextAndBounds = (target: EventTarget | null) => {\n if (target != rootRef.current) {\n const dataSet = getElementData(rootRef, target as HTMLElement);\n const text = dataSet?.['ojPrivateText']!;\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 (text === y2Axis?.title) {\n return {\n text,\n bounds: y2Props.titleProps?.dims\n };\n } else if (dataSet?.['ojPrivateGroupIndex'] && dataSet?.['ojPrivateLevelIndex']) {\n return {\n // @ts-ignore\n bounds: xProps.tickLabels.find(\n ({ dataProps }) =>\n dataProps['data-oj-private-level-index'] === dataSet['ojPrivateLevelIndex'] &&\n dataProps['data-oj-private-group-index'] === dataSet['ojPrivateGroupIndex']\n ).dims,\n text: text!\n };\n }\n }\n\n if (target === rootRef.current && focusedGroupInfo.isFocusVisible) {\n const group = groups[focusedGroupInfo.groupIndex || 0];\n return {\n bounds: xProps.tickLabels[focusedGroupInfo?.groupIndex || 0].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 xAxisInfo,\n yAxisInfo,\n y2AxisInfo,\n xScale,\n yScale,\n y2Scale,\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 levelsArray,\n getDataItem,\n getDataById: (id) => idToDataMap.get(id),\n ignoreAsTrigger\n });\n\n const findNearestData = findNearest(\n xScale as any,\n yScale,\n y2Scale,\n xProps.axisStepWidth!,\n xProps.averageGroupZ!,\n gapRatio\n );\n const getDataItemPosition = getDataItemPos(\n xScale as any,\n yScale,\n y2Scale,\n xProps.axisStepWidth!,\n xProps.averageGroupZ!,\n gapRatio\n );\n const [datatipDisabled, setDatatipDisabled] = useState(false);\n\n const getItemAriaLabel = getAriaLabelGenerator(\n series,\n translations,\n valueFormats,\n leafGroupsInfo,\n xAxis,\n !!isDataXAxis,\n getGroupFromPath,\n xProps.defaultLabelFormatter,\n yProps.defaultLabelFormatter,\n y2Props.defaultLabelFormatter\n );\n\n const {\n datatipContent,\n dataCursorContent,\n datatipProps: { 'aria-describedby': datatipAriaDescribedby, ...datatipProps }\n } = useChartDatatipAndCursor<K, D>({\n series,\n leafGroupsInfo,\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 y2Scale,\n timeAxisType: (xAxis as TimeAxisProps)?.timeAxisType,\n defaultXFormatter: xProps.defaultLabelFormatter,\n defaultYFormatter: yProps.defaultLabelFormatter,\n defaultY2Formatter: y2Props.defaultLabelFormatter,\n hasXYValues: isDataXAxis,\n getGroupFromPath,\n translations\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\n // const { yTicks, y2Ticks } = getYY2Ticks(yAxisInfo.ticks, y2AxisInfo.ticks, isHoriz, isSplitDualY);\n const gridLines = (\n <Gridlines\n plotArea={plotArea}\n availSpace={plotAreaSpace}\n xAxisPosition={xAxisPosition}\n isRtl={isRtl}\n yMinorTicks={yAxisInfo.minorTicks}\n xMinorTicks={xAxisInfo.minorTicks}\n xScale={xScale}\n yScale={yScale}\n y2Scale={y2Scale}\n isLog={yAxis?.scale === 'log'}\n yAxisPosition={yAxisPosition}\n isDataXAxis={isDataXAxis}\n xAxis={xAxis as DataAxisProps}\n yAxis={yAxis}\n y2Axis={y2Axis}\n hasAxisLine={!isOverview}\n y2MinorTicks={y2AxisInfo?.minorTicks}\n y2Ticks={y2AxisInfo.ticks}\n yTicks={yAxisInfo.ticks}\n xTicks={xAxisInfo.ticks}\n isSplitDualY={isSplitDualY}\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 levelsArray,\n focusedGroupInfo,\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 levelsArray,\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 cursor={cursor}\n availSpace={plotAreaSpace}\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 {...(y2Props as any)}\n axisPosition={y2AxisPosition}\n isRtl={isRtl}\n cursor={yAxisCursor}\n availSpace={y2Space}\n dragOverStyle={\n dragOver.type !== 'y2Axis' ? '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 focusedGroupLevelIndex={\n focusedGroupInfo.isFocusVisible ? focusedGroupInfo.levelIndex : undefined\n }\n availSpace={xSpace}\n dragOverStyle={\n dragOver.type !== 'xAxis' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n separatorColor={(xAxis as GroupAxisProps)?.groupSeparators?.color}\n />\n <g>\n {children({\n xStartIndex: xAxisInfo.startIndex!,\n xEndIndex: xAxisInfo.endIndex!,\n getItemAriaLabel,\n groupsInfo: leafGroupsInfo,\n colors,\n xScale: xScale as any,\n yScale,\n y2Scale,\n isPointInsideMarquee,\n defaultFontSize: resolvedVars['labelFontSize'],\n gapRatio,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n getTextDimensions,\n axisStepWidth: xProps.axisStepWidth!,\n averageGroupZ: xProps.averageGroupZ!,\n plotAreaClipPathId\n })}\n {renderGridLinesInFront && gridLines}\n {dataCursorContent}\n </g>\n {slidingWindow}\n {zoomAndScroll === 'live' && !isOverview && (\n <ScrollBar\n availSpace={scrollDims}\n isRtl={isRtl}\n viewport={xAxisInfo}\n axisExtent={xAxisInfo}\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 xAxisInfo,\n xAxisInfo,\n yAxisInfo,\n yAxisInfo,\n overviewChartPlotArea\n );\n return getRenderer(\n xAxisInfo,\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 { 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 } 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';\nimport { GroupLevelItem } from '#PRIVATE_Axis/groupAxis/hierarchicalUtils';\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 y2Scale: Scale,\n axisStepWidth: number,\n averageGroupZ: number,\n gapRatio: number\n ) => getDataPosType;\n findNearest: (\n xScale: Scale,\n yScale: Scale,\n y2Scale: Scale,\n axisStepWidth: number,\n averageGroupZ: number,\n gapRatio: number\n ) => (\n x: number,\n y?: number,\n y2?: number\n ) =>\n | {\n seriesIndex: number;\n groupIndex: number;\n y: number | undefined;\n y2: number | undefined;\n x: number;\n }\n | undefined;\n children: (context: {\n getItemAriaLabel: (\n data: D,\n seriesIndex: number,\n groupIndex: number,\n isSelectionEnabled: boolean,\n isSelected: boolean,\n isDrillable: boolean\n ) => string;\n xStartIndex: number;\n xEndIndex: number;\n xScale: Scale;\n yScale: Scale;\n y2Scale: Scale;\n gapRatio: number;\n activeId?: string;\n focusedItemInfo: Info;\n hoveredItemInfo?: Info;\n axisStepWidth: number;\n averageGroupZ: 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 groupsInfo: GroupLevelItem[];\n plotAreaClipPathId: string;\n }) => ComponentChildren;\n getStartAndEndAxesOffset: (groupCount: number) => { startOffset: number; endOffset: 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":["useState","useRef","useTooltip","calculateOffset","mergeProps","ScaleLinear","_jsxs","_Fragment","_jsx","styles","OverviewSlidingWindow","updateViewportFromOverview","getChartVars","useTestId","getAxesPosition","useCssVars","useTextDimensions","getAvailSpace","getOuterGaps","getScrollBarSpace","useUser","useMemo","getLayoutInfo","updateScrollBarSpace","useChartMarquee","useVisTouchResponse","useChartNav","useTranslationBundle","getElementData","useChartViewport","useSelectDrill","getAriaLabelGenerator","useChartDatatipAndCursor","useId","Gridlines","useChartContextMenu","useChartDnd","merge","PlotArea","Axis","ScrollBar","OverviewContext","useOverviewContext","TrackResizeContainer","dimensionStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AAOH;;;;;;AAMG;AACG,SAAU,cAAc,CAC5B,WAA+B,EAC/B,UAAkB,EAClB,UAAkB,EAClB,gBAAsC,EAAA;IAEtC,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,OAAO;YACL,UAAU;YACV,UAAU;SACX,CAAC;KACH;AAED,IAAA,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC;AACtD,IAAA,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AAEjC,IAAA,OAAO,MAAM,IAAI,CAAC,EAAE;AAClB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACnD,YAAA,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,IAAI,CAAC,IAAI,KAAK,IAAI,GAAG,IAAI,CAAC,EAAE;AAC1B,gBAAA,IAAI,gBAAgB,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U,IAAI,aAAa,KAAK,SAAS,EAAE;AACzE,QAAA,UAAU,GAAG,CAAA,EAAG,aAAa,CAAA,EAAA,CAAI,CAAC;KACnC;IAED,IAAI,WAAW,KAAK,SAAS,IAAI,UAAU,IAAI,cAAc,KAAK,SAAS,EAAE;AAC3E,QAAA,WAAW,GAAG,CAAA,EAAG,cAAc,CAAA,EAAA,CAAI,CAAC;KACrC;AAED,IAAA,QACElC,cAAA,CAACmC,yCAAoB,EAAA,EAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAEC,mDAAc,EAAA,QAAA,EAChF,CAAC,KAAK,EAAE,MAAM,KACb,KAAK,IAAI,MAAM,IACbpC,cAAA,CAAC,mBAAmB,EAAA,EAClB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EAAA,GACV,KAAK,EACT,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAAA,CAClC,IACA,SAAS,EAAA,CAEM,EACvB;AACJ;;;;"}
1
+ {"version":3,"file":"Chart-c07adbbd.js","sources":["../../src/PRIVATE_Axis/utils/axisNavUtils.ts","../../src/PRIVATE_VisSVGText/useTextTruncation.ts","../../src/PRIVATE_VisOverview/utils.ts","../../src/PRIVATE_VisOverview/OverviewBackground.tsx","../../src/PRIVATE_Chart/overviewUtils.tsx","../../src/PRIVATE_Chart/ChartWithDimensions.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 */\n\nimport { GroupLevelItem } from '#PRIVATE_Axis/groupAxis/hierarchicalUtils';\nimport { ChartGroupInfo } from '#utils/UNSAFE_visTypes/chart';\n\ntype isGroupNavigableType = (levelIndex: number, groupIndex: number) => boolean;\n\n/**\n * Returns the parent group for the navigable item.\n * @param levelsArray The levels array.\n * @param levelIndex The levelIndex of current naviable group..\n * @param groupIndex The groupIndex of current navigable group.\n * @returns\n */\nexport function getParentGroup(\n levelsArray: GroupLevelItem[][],\n levelIndex: number,\n groupIndex: number,\n isGroupNavigable: isGroupNavigableType\n) {\n const path = levelsArray[levelIndex][groupIndex].path;\n if (path.length === 1) {\n return {\n levelIndex,\n groupIndex\n };\n }\n\n let lIndex = Math.max(0, levelIndex - 1);\n const groupItem = levelsArray[levelIndex][groupIndex];\n const { start, end } = groupItem;\n\n while (lIndex >= 0) {\n for (let i = 0; i < levelsArray[lIndex].length; i++) {\n const { start: s, end: e } = levelsArray[lIndex][i];\n if (s <= start && end <= e) {\n if (isGroupNavigable(lIndex, i)) {\n return { groupIndex: i, levelIndex: lIndex };\n }\n }\n }\n lIndex -= 1;\n }\n\n return {\n levelIndex,\n groupIndex\n };\n}\n\n/**\n * @param levelsArray The levels array.\n * @param levelIndex The levelIndex of current navigable item.\n * @param groupIndex The groupIndex of current navigable item.\n * @returns\n */\nexport function getChildGroup(\n levelsArray: GroupLevelItem[][],\n levelIndex: number,\n groupIndex: number,\n isGroupNavigable: isGroupNavigableType\n) {\n if (levelIndex === levelsArray.length - 1) {\n return { levelIndex, groupIndex };\n }\n\n const lIndex = Math.min(levelsArray.length - 1, levelIndex + 1);\n\n const groupItem = levelsArray[levelIndex][groupIndex];\n const { start, end } = groupItem;\n\n while (lIndex <= levelsArray.length - 1) {\n for (let i = 0; i < levelsArray[lIndex].length; i++) {\n const { start: s, end: e } = levelsArray[lIndex][i];\n if (start <= s && e <= end) {\n if (isGroupNavigable(lIndex, i)) {\n return { groupIndex: i, levelIndex: lIndex };\n }\n }\n }\n }\n return {\n levelIndex,\n groupIndex\n };\n}\n\nexport function getNextGroup(\n levelsArray: GroupLevelItem[][],\n info: ChartGroupInfo,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex! + 1;\n const levelIndex = info.levelIndex!;\n\n const maxgroup = levelsArray[levelIndex].length - 1;\n\n if (groupIndex > maxgroup) {\n return;\n }\n\n if (isGroupNavigable(levelIndex!, groupIndex)) {\n return { groupIndex, levelIndex };\n }\n return getNextGroup(levelsArray, { groupIndex, levelIndex }, isGroupNavigable);\n}\n\nexport function getPreviousGroup(\n info: ChartGroupInfo,\n isGroupNavigable: isGroupNavigableType\n): ChartGroupInfo | undefined {\n const groupIndex = info.groupIndex! - 1;\n const levelIndex = info.levelIndex;\n if (groupIndex < 0) {\n return;\n }\n if (isGroupNavigable(levelIndex!, groupIndex)) {\n return { groupIndex, levelIndex };\n }\n return getPreviousGroup({ groupIndex, levelIndex }, isGroupNavigable);\n}\n\nexport function getGroupNavUtil(\n levelsArray: GroupLevelItem[][],\n drilling: 'on' | 'off' | 'groupsOnly',\n isRtl: boolean,\n isHoriz: boolean,\n isGroupLabelRendered?: (levelIndex: number, groupIndex: number) => boolean\n) {\n const isGroupNavigable = (levelIndex: number, groupIndex: number) => {\n const group = levelsArray[levelIndex][groupIndex].item;\n const groupName = group.name || group.id;\n const groupsDrilling = group.drilling;\n const isLabelRendered = !!isGroupLabelRendered?.(levelIndex, groupIndex);\n return (\n isLabelRendered &&\n groupName != null &&\n (drilling === 'on' || drilling === 'groupsOnly') &&\n groupsDrilling != 'off'\n );\n };\n\n const getDefaultNavGroup = () => {\n for (let levelIndex = 0; levelIndex < levelsArray.length; levelIndex++) {\n const numGroups = levelsArray[levelIndex].length;\n for (let groupIndex = 0; groupIndex < numGroups; groupIndex++) {\n if (isGroupNavigable(levelIndex, groupIndex)) {\n return { groupIndex, levelIndex };\n }\n }\n }\n return { groupIndex: 0, levelIndex: 0 };\n };\n\n const getNextNavGroup = (\n info: ChartGroupInfo,\n arrow: 'ArrowRight' | 'ArrowLeft' | 'ArrowUp' | 'ArrowDown'\n ) => {\n let nextGroup;\n\n if (arrow === 'ArrowRight') {\n if (isHoriz) {\n nextGroup = !isRtl\n ? getChildGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable)\n : getParentGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n } else {\n nextGroup = isRtl\n ? getPreviousGroup(info, isGroupNavigable)\n : getNextGroup(levelsArray, info, isGroupNavigable);\n }\n } else if (arrow === 'ArrowLeft') {\n if (isHoriz) {\n nextGroup = isRtl\n ? getChildGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable)\n : getParentGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n } else {\n nextGroup = isRtl\n ? getNextGroup(levelsArray, info, isGroupNavigable)\n : getPreviousGroup(info, isGroupNavigable);\n }\n } else if (arrow === 'ArrowDown') {\n nextGroup = isHoriz\n ? getNextGroup(levelsArray, info, isGroupNavigable)\n : getParentGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n } else if (arrow === 'ArrowUp') {\n nextGroup = isHoriz\n ? getPreviousGroup(info, isGroupNavigable)\n : getChildGroup(levelsArray, info.levelIndex!, info.groupIndex!, isGroupNavigable);\n }\n return nextGroup || info;\n };\n\n return { getNextNavGroup, getDefaultNavGroup };\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,\n windowWidth: windowWidth,\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 * 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 { 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 { 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 { GroupAxisProps, DataAxisProps, 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 '@oracle/oraclejet-internal-utilities/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';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { getAriaLabelGenerator } from '#utils/PRIVATE_chartUtils/dataTipUtils';\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 y2Axis,\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 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 getStartAndEndAxesOffset,\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, y2AxisPosition } = getAxesPosition(\n yAxis,\n y2Axis,\n isHoriz,\n isRtl\n );\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\n const split = y2Axis?.split ?? 'off';\n const isSplitDualY = split !== 'off';\n const splitterPosition = split !== 'off' ? split : 0.5;\n\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 y2Axis,\n { x, y, width: _width, height: _height }, // availSpace\n hiddenSet,\n hideAndShowBehavior,\n isHoriz,\n isRtl,\n isStacked,\n labelFontSize,\n getStartAndEndAxesOffset,\n locale,\n isSplitDualY,\n splitterPosition,\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 getStartAndEndAxesOffset,\n labelFontSize,\n series,\n xAxis,\n yAxis,\n y2Axis,\n splitterPosition,\n isSplitDualY\n ]);\n\n const {\n getGroupFromPath,\n levelsArray,\n xAxisInfo,\n xProps,\n xScale,\n yProps,\n y2Props,\n yScale,\n y2Scale,\n yMaxDim,\n yAxisInfo,\n plotAreaSpace,\n xSpace,\n ySpace,\n y2Space,\n idToDataMap,\n y2AxisInfo\n } = layoutInfo;\n\n const leafGroupsInfo = levelsArray.length > 0 ? levelsArray[levelsArray.length - 1] : [];\n\n scrollDims = updateScrollBarSpace(scrollDims, xAxisPosition === 'bottom', isRtl, yMaxDim);\n\n const gapRatio = getGapRatio(xAxisInfo.startIndex!, xAxisInfo.endIndex!);\n\n const getNextChartItem = getNavUtil(xAxisInfo.startIndex!, xAxisInfo.endIndex!);\n\n const { getNextNavGroup, getDefaultNavGroup } = getGroupNavUtil(\n levelsArray,\n drilling,\n isRtl,\n isHoriz,\n xProps.isGroupLabelRendered\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 rootRef,\n plotAreaSpace,\n xSpace,\n ySpace,\n dragMode,\n chartWidth: width,\n isMultiSelection: selectionMode === 'multiple',\n onViewportChange,\n isZoomScroll: zoomAndScroll === 'live',\n xScale,\n selectedIds,\n getDataById: (id) => idToDataMap.get(id),\n onSelectionChange,\n isRtl,\n xAxisInfo\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 xAxisInfo\n });\n\n const onContextMenuDismissed = (gesture: gestureTypes) => {\n if (gesture === 'keyboard') {\n onFocusUpdate();\n }\n };\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const getTextAndBounds = (target: EventTarget | null) => {\n if (target != rootRef.current) {\n const dataSet = getElementData(rootRef, target as HTMLElement);\n const text = dataSet?.['ojPrivateText']!;\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 (text === y2Axis?.title) {\n return {\n text,\n bounds: y2Props.titleProps?.dims\n };\n } else if (dataSet?.['ojPrivateGroupIndex'] && dataSet?.['ojPrivateLevelIndex']) {\n return {\n // @ts-ignore\n bounds: xProps.tickLabels.find(\n ({ dataProps }) =>\n dataProps['data-oj-private-level-index'] === dataSet['ojPrivateLevelIndex'] &&\n dataProps['data-oj-private-group-index'] === dataSet['ojPrivateGroupIndex']\n ).dims,\n text: text!\n };\n }\n }\n\n if (target === rootRef.current && focusedGroupInfo.isFocusVisible) {\n const group = groups[focusedGroupInfo.groupIndex || 0];\n return {\n bounds: xProps.tickLabels[focusedGroupInfo?.groupIndex || 0].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 xAxisInfo,\n yAxisInfo,\n y2AxisInfo,\n xScale,\n yScale,\n y2Scale,\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 levelsArray,\n getDataItem,\n getDataById: (id) => idToDataMap.get(id),\n ignoreAsTrigger\n });\n\n const findNearestData = findNearest(\n xScale as any,\n yScale,\n y2Scale,\n xProps.axisStepWidth!,\n xProps.averageGroupZ!,\n gapRatio\n );\n const getDataItemPosition = getDataItemPos(\n xScale as any,\n yScale,\n y2Scale,\n xProps.axisStepWidth!,\n xProps.averageGroupZ!,\n gapRatio\n );\n const [datatipDisabled, setDatatipDisabled] = useState(false);\n\n const getItemAriaLabel = getAriaLabelGenerator(\n series,\n translations,\n valueFormats,\n leafGroupsInfo,\n xAxis,\n !!isDataXAxis,\n getGroupFromPath,\n xProps.defaultLabelFormatter,\n yProps.defaultLabelFormatter,\n y2Props.defaultLabelFormatter\n );\n\n const {\n datatipContent,\n dataCursorContent,\n datatipProps: { 'aria-describedby': datatipAriaDescribedby, ...datatipProps }\n } = useChartDatatipAndCursor<K, D>({\n series,\n leafGroupsInfo,\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 y2Scale,\n timeAxisType: (xAxis as TimeAxisProps)?.timeAxisType,\n defaultXFormatter: xProps.defaultLabelFormatter,\n defaultYFormatter: yProps.defaultLabelFormatter,\n defaultY2Formatter: y2Props.defaultLabelFormatter,\n hasXYValues: isDataXAxis,\n getGroupFromPath,\n translations\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\n // const { yTicks, y2Ticks } = getYY2Ticks(yAxisInfo.ticks, y2AxisInfo.ticks, isHoriz, isSplitDualY);\n const gridLines = (\n <Gridlines\n plotArea={plotArea}\n availSpace={plotAreaSpace}\n xAxisPosition={xAxisPosition}\n isRtl={isRtl}\n yMinorTicks={yAxisInfo.minorTicks}\n xMinorTicks={xAxisInfo.minorTicks}\n xScale={xScale}\n yScale={yScale}\n y2Scale={y2Scale}\n isLog={yAxis?.scale === 'log'}\n yAxisPosition={yAxisPosition}\n isDataXAxis={isDataXAxis}\n xAxis={xAxis as DataAxisProps}\n yAxis={yAxis}\n y2Axis={y2Axis}\n hasAxisLine={!isOverview}\n y2MinorTicks={y2AxisInfo?.minorTicks}\n y2Ticks={y2AxisInfo.ticks}\n yTicks={yAxisInfo.ticks}\n xTicks={xAxisInfo.ticks}\n isSplitDualY={isSplitDualY}\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 levelsArray,\n focusedGroupInfo,\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 levelsArray,\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 cursor={cursor}\n availSpace={plotAreaSpace}\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 {...(y2Props as any)}\n axisPosition={y2AxisPosition}\n isRtl={isRtl}\n cursor={yAxisCursor}\n availSpace={y2Space}\n dragOverStyle={\n dragOver.type !== 'y2Axis' ? '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 focusedGroupLevelIndex={\n focusedGroupInfo.isFocusVisible ? focusedGroupInfo.levelIndex : undefined\n }\n availSpace={xSpace}\n dragOverStyle={\n dragOver.type !== 'xAxis' ? 'none' : dragOver.accepted ? 'accept' : 'reject'\n }\n separatorColor={(xAxis as GroupAxisProps)?.groupSeparators?.color}\n />\n <g>\n {children({\n xStartIndex: xAxisInfo.startIndex!,\n xEndIndex: xAxisInfo.endIndex!,\n getItemAriaLabel,\n groupsInfo: leafGroupsInfo,\n colors,\n xScale: xScale as any,\n yScale,\n y2Scale,\n isPointInsideMarquee,\n defaultFontSize: resolvedVars['labelFontSize'],\n gapRatio,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n getTextDimensions,\n axisStepWidth: xProps.axisStepWidth!,\n averageGroupZ: xProps.averageGroupZ!,\n plotAreaClipPathId\n })}\n {renderGridLinesInFront && gridLines}\n {dataCursorContent}\n </g>\n {slidingWindow}\n {zoomAndScroll === 'live' && !isOverview && (\n <ScrollBar\n availSpace={scrollDims}\n isRtl={isRtl}\n viewport={xAxisInfo}\n axisExtent={xAxisInfo}\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 xAxisInfo,\n xAxisInfo,\n yAxisInfo,\n yAxisInfo,\n overviewChartPlotArea\n );\n return getRenderer(\n xAxisInfo,\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 { 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 } 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';\nimport { GroupLevelItem } from '#PRIVATE_Axis/groupAxis/hierarchicalUtils';\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 y2Scale: Scale,\n axisStepWidth: number,\n averageGroupZ: number,\n gapRatio: number\n ) => getDataPosType;\n findNearest: (\n xScale: Scale,\n yScale: Scale,\n y2Scale: Scale,\n axisStepWidth: number,\n averageGroupZ: number,\n gapRatio: number\n ) => (\n x: number,\n y?: number,\n y2?: number\n ) =>\n | {\n seriesIndex: number;\n groupIndex: number;\n y: number | undefined;\n y2: number | undefined;\n x: number;\n }\n | undefined;\n children: (context: {\n getItemAriaLabel: (\n data: D,\n seriesIndex: number,\n groupIndex: number,\n isSelectionEnabled: boolean,\n isSelected: boolean,\n isDrillable: boolean\n ) => string;\n xStartIndex: number;\n xEndIndex: number;\n xScale: Scale;\n yScale: Scale;\n y2Scale: Scale;\n gapRatio: number;\n activeId?: string;\n focusedItemInfo: Info;\n hoveredItemInfo?: Info;\n axisStepWidth: number;\n averageGroupZ: 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 groupsInfo: GroupLevelItem[];\n plotAreaClipPathId: string;\n }) => ComponentChildren;\n getStartAndEndAxesOffset: (groupCount: number) => { startOffset: number; endOffset: 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":["useState","useRef","useTooltip","calculateOffset","mergeProps","ScaleLinear","_jsxs","_Fragment","_jsx","styles","OverviewSlidingWindow","updateViewportFromOverview","getChartVars","useTestId","getAxesPosition","useCssVars","useTextDimensions","getAvailSpace","getOuterGaps","getScrollBarSpace","useUser","useMemo","getLayoutInfo","updateScrollBarSpace","useChartMarquee","useVisTouchResponse","useChartNav","useTranslationBundle","getElementData","useChartViewport","useSelectDrill","getAriaLabelGenerator","useChartDatatipAndCursor","useId","Gridlines","useChartContextMenu","useChartDnd","merge","PlotArea","Axis","ScrollBar","OverviewContext","useOverviewContext","TrackResizeContainer","dimensionStyle"],"mappings":";;;;;;;;;;;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mC,yCAAoB,EAAA,EAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAEC,mDAAc,EAAA,QAAA,EAChF,CAAC,KAAK,EAAE,MAAM,KACb,KAAK,IAAI,MAAM,IACbpC,cAAA,CAAC,mBAAmB,EAAA,EAClB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EAAA,GACV,KAAK,EACT,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAAA,CAClC,IACA,SAAS,EAAA,CAEM,EACvB;AACJ;;;;"}
@@ -4,7 +4,6 @@
4
4
  var jsxRuntime = require('preact/jsx-runtime');
5
5
  var compat = require('preact/compat');
6
6
  var hooks = require('preact/hooks');
7
- var ColorSwatch = require('./ColorSwatch-590183e3.js');
8
7
  var swatchData = require('./swatchData-17c1d335.js');
9
8
  var Flex = require('./Flex-a6d1c038.js');
10
9
  var useTestId = require('./useTestId-15ee37d6.js');
@@ -15,6 +14,7 @@ var aria = require('./aria-889aedd0.js');
15
14
  var mergeInterpolations = require('./mergeInterpolations-6727b536.js');
16
15
  var resources_nls_en_bundle = require('./resources/nls/en/bundle.js');
17
16
  var SwatchFlexView = require('./SwatchFlexView-aeaf6c3e.js');
17
+ var ColorSwatch = require('./ColorSwatch-590183e3.js');
18
18
 
19
19
  const interpolations = [
20
20
  ...Object.values(dimensions.dimensionInterpolations),
@@ -80,4 +80,4 @@ const ColorPalette = compat.forwardRef(({ value, swatchSize = 'sm', palette, onC
80
80
  ColorPalette.displayName = 'ColorPalette';
81
81
 
82
82
  exports.ColorPalette = ColorPalette;
83
- //# sourceMappingURL=ColorPalette-ea5e1bed.js.map
83
+ //# sourceMappingURL=ColorPalette-f8fbe6a4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPalette-ea5e1bed.js","sources":["../../src/UNSAFE_ColorPalette/ColorPalette.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 { useState, useEffect, forwardRef, useImperativeHandle } from 'preact/compat';\nimport { useRef } from 'preact/hooks';\nimport { Ref } from 'preact';\nimport { SwatchFlexView } from '#PRIVATE_SwatchFlexView';\nimport { ColorSwatch } from '#UNSAFE_ColorSwatch';\nimport { parseColorValue, type ColorValue } from '#utils/UNSAFE_color';\nimport { Flex } from '#UNSAFE_Flex/Flex';\nimport { Keys } from '#utils/UNSAFE_keys';\nimport { ListItemRendererContext } from '#UNSAFE_Collection';\nimport { TestIdProps, useTestId } from '../hooks/UNSAFE_useTestId';\nimport { DimensionProps, dimensionInterpolations } from '../utils/UNSAFE_interpolations/dimensions';\nimport { PaddingProps, paddingInterpolations } from '../utils/UNSAFE_interpolations/padding';\nimport { ColorProps, colorInterpolations } from '../utils/UNSAFE_interpolations/colors';\nimport { AriaProps, ariaInterpolations } from '../utils/UNSAFE_interpolations/aria';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { sortPalette, convertPalette } from '#utils/UNSAFE_color';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport translations from '#resources/nls/en/bundle';\nexport type FocusableHandle = {\n focus: () => void;\n blur: () => void;\n};\n\ntype StyleProps = DimensionProps & PaddingProps & ColorProps & AriaProps;\n\nexport type ColorPaletteProps = StyleProps &\n TestIdProps & {\n /**\n * The selected color of the palette\n */\n value?: ColorValue;\n\n /**\n * The swatch size indicates how large the color swatches are rendered.\n */\n swatchSize?: 'xs' | 'sm';\n\n /**\n * An array of colors for the palette\n */\n palette?: Array<ColorValue>;\n\n /**\n * Invoked when a swatch is toggled\n */\n onCommit?: (details: ValueUpdateDetail<ColorValue>) => void;\n };\n\nconst interpolations = [\n ...Object.values(dimensionInterpolations),\n ...Object.values(colorInterpolations),\n ...Object.values(ariaInterpolations),\n ...Object.values(paddingInterpolations)\n];\n\nconst mergedInterpolations = mergeInterpolations<ColorPaletteProps>(interpolations);\n\n/**\n * A Color Palette is an interface that displays a variety of color swatches allowing\n * users to select a color value.\n *\n * @param {ColorPaletteProps} props ColorPalette component props.\n * @returns {JSX.Element} ColorPalette component element.\n */\nexport const ColorPalette = forwardRef(\n (\n { value, swatchSize = 'sm', palette, onCommit, testId, ...props }: ColorPaletteProps,\n focusHandleRef?: Ref<FocusableHandle>\n ) => {\n const {\n class: mergedClasses,\n ariaLabel,\n ariaLabelledBy,\n ...mergedStyles\n } = mergedInterpolations(props);\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n const testIdProps = useTestId(testId);\n const colorPaletteTranslated = translations.accColorPalette();\n\n const [current, setCurrent] = useState<string | undefined>(undefined);\n const [selected, setSelected] = useState<Keys<string | number>>({\n all: false,\n keys: new Set([(value as string) ?? undefined])\n });\n\n useEffect(() => {\n setSelected({\n all: false,\n keys: new Set([parseColorValue(value ?? undefined)])\n });\n }, [value]);\n\n useEffect(() => {}, [selected]); // redraw when selection occurs\n\n const getRowKey = (data: unknown) => {\n return data as string;\n };\n\n //Allows to call focus on rootRef without having to expose it\n useImperativeHandle(focusHandleRef!, () => ({\n focus: () => {\n if (rootRef.current) {\n rootRef.current.focus();\n }\n },\n blur: () => {\n if (rootRef.current) {\n rootRef.current.blur();\n }\n }\n }));\n\n const dropdownStyle = {\n width: '100%',\n height: '100%'\n };\n\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n className={mergedClasses}\n style={dropdownStyle}\n {...testIdProps}\n {...mergedStyles}>\n <Flex align=\"center\">\n <SwatchFlexView\n ref={rootRef}\n aria-label={ariaLabel ? ariaLabel : colorPaletteTranslated}\n focusBehavior=\"content\"\n data={palette ? convertPalette(sortPalette(palette)) : null}\n getRowKey={getRowKey}\n currentKey={current}\n onCurrentKeyChange={(detail) => {\n setCurrent(detail.value as string);\n }}\n selectedKeys={selected}>\n {(context: ListItemRendererContext<string | number, unknown>) => (\n <ColorSwatch\n size={swatchSize}\n testId={testId + '_palette' + '_colorSwatch_' + context.data}\n aria-hidden={true}\n value={context.data as ColorValue}\n onToggle={() => {\n onCommit?.({\n value: context.data as ColorValue,\n previousValue: selected.keys?.values().next().value as ColorValue\n });\n setSelected({ all: false, keys: new Set([context.data as string]) });\n }}\n isSelected={selected.keys?.has(context.data as string)}></ColorSwatch>\n )}\n </SwatchFlexView>\n </Flex>\n </div>\n );\n }\n);\n\nColorPalette.displayName = 'ColorPalette';\n"],"names":["dimensionInterpolations","colorInterpolations","ariaInterpolations","paddingInterpolations","mergeInterpolations","forwardRef","useRef","useTestId","translations","useState","useEffect","parseColorValue","useImperativeHandle","_jsx","Flex","SwatchFlexView","convertPalette","sortPalette","ColorSwatch"],"mappings":";;;;;;;;;;;;;;;;;;AAuDA,MAAM,cAAc,GAAG;AACrB,IAAA,GAAG,MAAM,CAAC,MAAM,CAACA,kCAAuB,CAAC;AACzC,IAAA,GAAG,MAAM,CAAC,MAAM,CAACC,0BAAmB,CAAC;AACrC,IAAA,GAAG,MAAM,CAAC,MAAM,CAACC,uBAAkB,CAAC;AACpC,IAAA,GAAG,MAAM,CAAC,MAAM,CAACC,6BAAqB,CAAC;CACxC,CAAC;AAEF,MAAM,oBAAoB,GAAGC,uCAAmB,CAAoB,cAAc,CAAC,CAAC;AAEpF;;;;;;AAMG;AACU,MAAA,YAAY,GAAGC,iBAAU,CACpC,CACE,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAqB,EACpF,cAAqC,KACnC;AACF,IAAA,MAAM,EACJ,KAAK,EAAE,aAAa,EACpB,SAAS,EACT,cAAc,EACd,GAAG,YAAY,EAChB,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAEhC,IAAA,MAAM,OAAO,GAAGC,YAAM,CAAiB,IAAI,CAAC,CAAC;AAE7C,IAAA,MAAM,WAAW,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,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,IAAc,CAAC,EAAgB,CAAA,CACzE,GACc,EACZ,CAAA,EAAA,CACH,EACN;AACJ,CAAC,EACD;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc;;;;"}
1
+ {"version":3,"file":"ColorPalette-f8fbe6a4.js","sources":["../../src/UNSAFE_ColorPalette/ColorPalette.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 { useState, useEffect, forwardRef, useImperativeHandle } from 'preact/compat';\nimport { useRef } from 'preact/hooks';\nimport { Ref } from 'preact';\nimport { SwatchFlexView } from '#PRIVATE_SwatchFlexView';\nimport { ColorSwatch } from '#UNSAFE_ColorSwatch';\nimport { parseColorValue, type ColorValue } from '#utils/UNSAFE_color';\nimport { Flex } from '#UNSAFE_Flex/Flex';\nimport { Keys } from '#utils/UNSAFE_keys';\nimport { ListItemRendererContext } from '#UNSAFE_Collection';\nimport { TestIdProps, useTestId } from '../hooks/UNSAFE_useTestId';\nimport { DimensionProps, dimensionInterpolations } from '../utils/UNSAFE_interpolations/dimensions';\nimport { PaddingProps, paddingInterpolations } from '../utils/UNSAFE_interpolations/padding';\nimport { ColorProps, colorInterpolations } from '../utils/UNSAFE_interpolations/colors';\nimport { AriaProps, ariaInterpolations } from '../utils/UNSAFE_interpolations/aria';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { sortPalette, convertPalette } from '#utils/UNSAFE_color';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport translations from '#resources/nls/en/bundle';\nexport type FocusableHandle = {\n focus: () => void;\n blur: () => void;\n};\n\ntype StyleProps = DimensionProps & PaddingProps & ColorProps & AriaProps;\n\nexport type ColorPaletteProps = StyleProps &\n TestIdProps & {\n /**\n * The selected color of the palette\n */\n value?: ColorValue;\n\n /**\n * The swatch size indicates how large the color swatches are rendered.\n */\n swatchSize?: 'xs' | 'sm';\n\n /**\n * An array of colors for the palette\n */\n palette?: Array<ColorValue>;\n\n /**\n * Invoked when a swatch is toggled\n */\n onCommit?: (details: ValueUpdateDetail<ColorValue>) => void;\n };\n\nconst interpolations = [\n ...Object.values(dimensionInterpolations),\n ...Object.values(colorInterpolations),\n ...Object.values(ariaInterpolations),\n ...Object.values(paddingInterpolations)\n];\n\nconst mergedInterpolations = mergeInterpolations<ColorPaletteProps>(interpolations);\n\n/**\n * A Color Palette is an interface that displays a variety of color swatches allowing\n * users to select a color value.\n *\n * @param {ColorPaletteProps} props ColorPalette component props.\n * @returns {JSX.Element} ColorPalette component element.\n */\nexport const ColorPalette = forwardRef(\n (\n { value, swatchSize = 'sm', palette, onCommit, testId, ...props }: ColorPaletteProps,\n focusHandleRef?: Ref<FocusableHandle>\n ) => {\n const {\n class: mergedClasses,\n ariaLabel,\n ariaLabelledBy,\n ...mergedStyles\n } = mergedInterpolations(props);\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n const testIdProps = useTestId(testId);\n const colorPaletteTranslated = translations.accColorPalette();\n\n const [current, setCurrent] = useState<string | undefined>(undefined);\n const [selected, setSelected] = useState<Keys<string | number>>({\n all: false,\n keys: new Set([(value as string) ?? undefined])\n });\n\n useEffect(() => {\n setSelected({\n all: false,\n keys: new Set([parseColorValue(value ?? undefined)])\n });\n }, [value]);\n\n useEffect(() => {}, [selected]); // redraw when selection occurs\n\n const getRowKey = (data: unknown) => {\n return data as string;\n };\n\n //Allows to call focus on rootRef without having to expose it\n useImperativeHandle(focusHandleRef!, () => ({\n focus: () => {\n if (rootRef.current) {\n rootRef.current.focus();\n }\n },\n blur: () => {\n if (rootRef.current) {\n rootRef.current.blur();\n }\n }\n }));\n\n const dropdownStyle = {\n width: '100%',\n height: '100%'\n };\n\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n className={mergedClasses}\n style={dropdownStyle}\n {...testIdProps}\n {...mergedStyles}>\n <Flex align=\"center\">\n <SwatchFlexView\n ref={rootRef}\n aria-label={ariaLabel ? ariaLabel : colorPaletteTranslated}\n focusBehavior=\"content\"\n data={palette ? convertPalette(sortPalette(palette)) : null}\n getRowKey={getRowKey}\n currentKey={current}\n onCurrentKeyChange={(detail) => {\n setCurrent(detail.value as string);\n }}\n selectedKeys={selected}>\n {(context: ListItemRendererContext<string | number, unknown>) => (\n <ColorSwatch\n size={swatchSize}\n testId={testId + '_palette' + '_colorSwatch_' + context.data}\n aria-hidden={true}\n value={context.data as ColorValue}\n onToggle={() => {\n onCommit?.({\n value: context.data as ColorValue,\n previousValue: selected.keys?.values().next().value as ColorValue\n });\n setSelected({ all: false, keys: new Set([context.data as string]) });\n }}\n isSelected={selected.keys?.has(context.data as string)}></ColorSwatch>\n )}\n </SwatchFlexView>\n </Flex>\n </div>\n );\n }\n);\n\nColorPalette.displayName = 'ColorPalette';\n"],"names":["dimensionInterpolations","colorInterpolations","ariaInterpolations","paddingInterpolations","mergeInterpolations","forwardRef","useRef","useTestId","translations","useState","useEffect","parseColorValue","useImperativeHandle","_jsx","Flex","SwatchFlexView","convertPalette","sortPalette","ColorSwatch"],"mappings":";;;;;;;;;;;;;;;;;;AAuDA,MAAM,cAAc,GAAG;AACrB,IAAA,GAAG,MAAM,CAAC,MAAM,CAACA,kCAAuB,CAAC;AACzC,IAAA,GAAG,MAAM,CAAC,MAAM,CAACC,0BAAmB,CAAC;AACrC,IAAA,GAAG,MAAM,CAAC,MAAM,CAACC,uBAAkB,CAAC;AACpC,IAAA,GAAG,MAAM,CAAC,MAAM,CAACC,6BAAqB,CAAC;CACxC,CAAC;AAEF,MAAM,oBAAoB,GAAGC,uCAAmB,CAAoB,cAAc,CAAC,CAAC;AAEpF;;;;;;AAMG;AACU,MAAA,YAAY,GAAGC,iBAAU,CACpC,CACE,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,QA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,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAmB;AAClE,yBAAA,CAAC,CAAC;AACH,wBAAA,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,IAAc,CAAC,CAAC,EAAE,CAAC,CAAC;AACvE,qBAAC,EACD,UAAU,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,IAAc,CAAC,EAAgB,CAAA,CACzE,GACc,EACZ,CAAA,EAAA,CACH,EACN;AACJ,CAAC,EACD;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc;;;;"}
@@ -6,10 +6,10 @@ var useTestId = require('./useTestId-15ee37d6.js');
6
6
  var UNSAFE_ColorPicker_themes_ColorPickerContract_css = require('./UNSAFE_ColorPicker/themes/ColorPickerContract.css.js');
7
7
  var useComponentTheme = require('./useComponentTheme-082fc8e4.js');
8
8
  var UNSAFE_ColorPicker_themes_redwood_ColorPickerTheme = require('./UNSAFE_ColorPicker/themes/redwood/ColorPickerTheme.js');
9
- var ColorPalette = require('./ColorPalette-ea5e1bed.js');
10
9
  var compat = require('preact/compat');
11
10
  var Flex = require('./Flex-a6d1c038.js');
12
11
  var clientUtils = require('./clientUtils-ef5e20ce.js');
12
+ var ColorPalette = require('./ColorPalette-f8fbe6a4.js');
13
13
 
14
14
  /**
15
15
  * A ColorPicker is a component that allows users to select a single color.
@@ -22,4 +22,4 @@ const ColorPicker = compat.forwardRef(({ swatchSize = 'xs', palette, height, max
22
22
  });
23
23
 
24
24
  exports.ColorPicker = ColorPicker;
25
- //# sourceMappingURL=ColorPicker-03036ee3.js.map
25
+ //# sourceMappingURL=ColorPicker-efe1edb3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker-03036ee3.js","sources":["../../src/UNSAFE_ColorPicker/ColorPicker.tsx"],"sourcesContent":["// import { Flex } from '#UNSAFE_Flex';\nimport { useTestId, type TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { colorPickerPropVars } from './themes/ColorPickerContract.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { ColorPickerRedwoodTheme } from './themes/redwood/ColorPickerTheme';\nimport { ColorPalette } from '#UNSAFE_ColorPalette';\nimport { Size } from '#utils/UNSAFE_size';\nimport { ComponentProps } from 'preact';\nimport { forwardRef, ForwardedRef } from 'preact/compat';\nimport { type ColorValue } from '#utils/UNSAFE_color';\nimport { Flex } from '#UNSAFE_Flex';\nimport { isMobile } from '#utils/UNSAFE_clientUtils';\n\ntype ColorPaletteProps = ComponentProps<typeof ColorPalette>;\ntype PickedPropsFromColorPalette = Pick<ColorPaletteProps, 'swatchSize' | 'palette'>;\n\ntype Props = TestIdProps &\n PickedPropsFromColorPalette & {\n /**\n * The selected color\n */\n value?: ColorValue;\n\n /**\n * When property is set to \"auto\", the color picker will automatically adjust to the height of the palette.\n * This is mainly to be used in conjunction with InputColor.\n * <p>If not specified, defaults to the theme specified height.<br/>\n */\n height?: 'auto';\n\n /**\n * Specifies the component style maxWidth.\n * <p>If not specified, defaults to the theme specified maxWidth.<br/>\n * This attribute accepts values of type:<br/>\n * 0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <p>When this component is used in composition and the component should take up 100% of the parent container's\n * width, set maxWidth to '100%'.<br/>\n * Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n maxWidth?: Size;\n\n /**\n * Specifies the component style width.\n * <p>If not specified, defaults to '100%'.</p>\n * <p>This attribute accepts values of type:</p>\n * <p>0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <br/>\n * <p>Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n width?: Size;\n\n /**\n * Callback invoked when the user selects a color in the Palette. This callback is called even when the previous\n * value and the value are the same, that is, when the user selects an already selected color.\n * The app needs to handle this to write back the controlled 'value' property, or else no color will be shown\n * to be selected.\n */\n onCommit: (detail: ValueUpdateDetail<ColorValue>) => void;\n };\n\n/**\n * A ColorPicker is a component that allows users to select a single color.\n */\nexport const ColorPicker = forwardRef(\n (\n { swatchSize = 'xs', palette, height, maxWidth, value, testId, width, onCommit }: Props,\n pickerRef?: ForwardedRef<HTMLDivElement>\n ) => {\n // we need to render the baseTheme on the root dom element so that the CSS vars in colorPickerPropVars will be defined.\n const { classes } = useComponentTheme(ColorPickerRedwoodTheme);\n\n const testIdProps = useTestId(testId);\n\n return (\n <div ref={pickerRef} class={classes} {...testIdProps}>\n <Flex\n direction=\"column\"\n height={\n height === 'auto' ? undefined : isMobile() ? undefined : colorPickerPropVars.maxHeight\n }\n maxWidth={\n maxWidth !== undefined ? maxWidth : isMobile() ? '100%' : colorPickerPropVars.maxWidth\n }\n width={width !== undefined ? width : colorPickerPropVars.width}>\n <ColorPalette\n palette={palette}\n swatchSize={swatchSize}\n value={value}\n testId={testId ? testId + '_picker' : undefined}\n onCommit={onCommit}></ColorPalette>\n </Flex>\n </div>\n );\n }\n);\n"],"names":["forwardRef","useComponentTheme","ColorPickerRedwoodTheme","useTestId","_jsx","Flex","isMobile","colorPickerPropVars","ColorPalette"],"mappings":";;;;;;;;;;;;;AA+DA;;AAEG;AACI,MAAM,WAAW,GAAGA,iBAAU,CACnC,CACE,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAS,EACvF,SAAwC,KACtC;;IAEF,MAAM,EAAE,OAAO,EAAE,GAAGC,mCAAiB,CAACC,0EAAuB,CAAC,CAAC;AAE/D,IAAA,MAAM,WAAW,GAAGC,mBAAS,CAAC,MAAM,CAAC,CAAC;IAEtC,QACEC,cAAK,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAM,GAAA,WAAW,EAClD,QAAA,EAAAA,cAAA,CAACC,SAAI,EAAA,EACH,SAAS,EAAC,QAAQ,EAClB,MAAM,EACJ,MAAM,KAAK,MAAM,GAAG,SAAS,GAAGC,oBAAQ,EAAE,GAAG,SAAS,GAAGC,qEAAmB,CAAC,SAAS,EAExF,QAAQ,EACN,QAAQ,KAAK,SAAS,GAAG,QAAQ,GAAGD,oBAAQ,EAAE,GAAG,MAAM,GAAGC,qEAAmB,CAAC,QAAQ,EAExF,KAAK,EAAE,KAAK,KAAK,SAAS,GAAG,KAAK,GAAGA,qEAAmB,CAAC,KAAK,EAAA,QAAA,EAC9DH,cAAC,CAAAI,yBAAY,EACX,EAAA,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,EAC/C,QAAQ,EAAE,QAAQ,EAAiB,CAAA,EAAA,CAChC,EACH,CAAA,EACN;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"ColorPicker-efe1edb3.js","sources":["../../src/UNSAFE_ColorPicker/ColorPicker.tsx"],"sourcesContent":["// import { Flex } from '#UNSAFE_Flex';\nimport { useTestId, type TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { colorPickerPropVars } from './themes/ColorPickerContract.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { ColorPickerRedwoodTheme } from './themes/redwood/ColorPickerTheme';\nimport { ColorPalette } from '#UNSAFE_ColorPalette';\nimport { Size } from '#utils/UNSAFE_size';\nimport { ComponentProps } from 'preact';\nimport { forwardRef, ForwardedRef } from 'preact/compat';\nimport { type ColorValue } from '#utils/UNSAFE_color';\nimport { Flex } from '#UNSAFE_Flex';\nimport { isMobile } from '#utils/UNSAFE_clientUtils';\n\ntype ColorPaletteProps = ComponentProps<typeof ColorPalette>;\ntype PickedPropsFromColorPalette = Pick<ColorPaletteProps, 'swatchSize' | 'palette'>;\n\ntype Props = TestIdProps &\n PickedPropsFromColorPalette & {\n /**\n * The selected color\n */\n value?: ColorValue;\n\n /**\n * When property is set to \"auto\", the color picker will automatically adjust to the height of the palette.\n * This is mainly to be used in conjunction with InputColor.\n * <p>If not specified, defaults to the theme specified height.<br/>\n */\n height?: 'auto';\n\n /**\n * Specifies the component style maxWidth.\n * <p>If not specified, defaults to the theme specified maxWidth.<br/>\n * This attribute accepts values of type:<br/>\n * 0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <p>When this component is used in composition and the component should take up 100% of the parent container's\n * width, set maxWidth to '100%'.<br/>\n * Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n maxWidth?: Size;\n\n /**\n * Specifies the component style width.\n * <p>If not specified, defaults to '100%'.</p>\n * <p>This attribute accepts values of type:</p>\n * <p>0 | `${number}${CssUnits}` | `${number}x` | `--${string}` | `var($string})` | `${number}%`</p>\n * <br/>\n * <p>Because there is a theme default value for maxWidth, when setting the width property to achieve a fixed width,\n * set the maxWidth property to the same value.</p>\n */\n width?: Size;\n\n /**\n * Callback invoked when the user selects a color in the Palette. This callback is called even when the previous\n * value and the value are the same, that is, when the user selects an already selected color.\n * The app needs to handle this to write back the controlled 'value' property, or else no color will be shown\n * to be selected.\n */\n onCommit: (detail: ValueUpdateDetail<ColorValue>) => void;\n };\n\n/**\n * A ColorPicker is a component that allows users to select a single color.\n */\nexport const ColorPicker = forwardRef(\n (\n { swatchSize = 'xs', palette, height, maxWidth, value, testId, width, onCommit }: Props,\n pickerRef?: ForwardedRef<HTMLDivElement>\n ) => {\n // we need to render the baseTheme on the root dom element so that the CSS vars in colorPickerPropVars will be defined.\n const { classes } = useComponentTheme(ColorPickerRedwoodTheme);\n\n const testIdProps = useTestId(testId);\n\n return (\n <div ref={pickerRef} class={classes} {...testIdProps}>\n <Flex\n direction=\"column\"\n height={\n height === 'auto' ? undefined : isMobile() ? undefined : colorPickerPropVars.maxHeight\n }\n maxWidth={\n maxWidth !== undefined ? maxWidth : isMobile() ? '100%' : colorPickerPropVars.maxWidth\n }\n width={width !== undefined ? width : colorPickerPropVars.width}>\n <ColorPalette\n palette={palette}\n swatchSize={swatchSize}\n value={value}\n testId={testId ? testId + '_picker' : undefined}\n onCommit={onCommit}></ColorPalette>\n </Flex>\n </div>\n );\n }\n);\n"],"names":["forwardRef","useComponentTheme","ColorPickerRedwoodTheme","useTestId","_jsx","Flex","isMobile","colorPickerPropVars","ColorPalette"],"mappings":";;;;;;;;;;;;;AA+DA;;AAEG;AACI,MAAM,WAAW,GAAGA,iBAAU,CACnC,CACE,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAS,EACvF,SAAwC,KACtC;;IAEF,MAAM,EAAE,OAAO,EAAE,GAAGC,mCAAiB,CAACC,0EAAuB,CAAC,CAAC;AAE/D,IAAA,MAAM,WAAW,GAAGC,mBAAS,CAAC,MAAM,CAAC,CAAC;IAEtC,QACEC,cAAK,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAM,GAAA,WAAW,EAClD,QAAA,EAAAA,cAAA,CAACC,SAAI,EAAA,EACH,SAAS,EAAC,QAAQ,EAClB,MAAM,EACJ,MAAM,KAAK,MAAM,GAAG,SAAS,GAAGC,oBAAQ,EAAE,GAAG,SAAS,GAAGC,qEAAmB,CAAC,SAAS,EAExF,QAAQ,EACN,QAAQ,KAAK,SAAS,GAAG,QAAQ,GAAGD,oBAAQ,EAAE,GAAG,MAAM,GAAGC,qEAAmB,CAAC,QAAQ,EAExF,KAAK,EAAE,KAAK,KAAK,SAAS,GAAG,KAAK,GAAGA,qEAAmB,CAAC,KAAK,EAAA,QAAA,EAC9DH,cAAC,CAAAI,yBAAY,EACX,EAAA,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,EAC/C,QAAQ,EAAE,QAAQ,EAAiB,CAAA,EAAA,CAChC,EACH,CAAA,EACN;AACJ,CAAC;;;;"}
@@ -2,10 +2,10 @@
2
2
  'use strict';
3
3
 
4
4
  var jsxRuntime = require('preact/jsx-runtime');
5
+ var EmbeddedIconButton = require('./EmbeddedIconButton-88b1a5cd.js');
5
6
  var ChevronDown = require('./ChevronDown-25b749b9.js');
6
7
  var ChevronRight = require('./ChevronRight-2019bb77.js');
7
8
  var classNames = require('./classNames-c14c6ef3.js');
8
- var EmbeddedIconButton = require('./EmbeddedIconButton-88b1a5cd.js');
9
9
 
10
10
  const ITEM_SELECTOR = 'oj-collection-expander';
11
11
  /**
@@ -28,4 +28,4 @@ const isExpander = (elem) => {
28
28
  exports.Expander = Expander;
29
29
  exports.ITEM_SELECTOR = ITEM_SELECTOR;
30
30
  exports.isExpander = isExpander;
31
- //# sourceMappingURL=Expander-96ce2888.js.map
31
+ //# sourceMappingURL=Expander-01af6642.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Expander-96ce2888.js","sources":["../../src/PRIVATE_Expander/Expander.tsx"],"sourcesContent":["import { EmbeddedIconButton } from '#PRIVATE_EmbeddedIconButton';\nimport { ChevronDown } from '#UNSAFE_RedwoodIcons/ChevronDown';\nimport { ChevronRight } from '#UNSAFE_RedwoodIcons/ChevronRight';\nimport { ToggleDetail } from '#UNSAFE_Collection';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { classNames } from '#utils/UNSAFE_classNames';\n\nexport const ITEM_SELECTOR = 'oj-collection-expander';\n\n/**\n * Props for the Expander component\n */\ntype Props<K> = TestIdProps & {\n /**\n * The key of the item\n */\n itemKey: K;\n /**\n * A boolean to indicate whether the expander is expander or collapsed\n */\n expanded: boolean;\n /**\n * Callback function to invoke when the user expands or collapses the expander.\n */\n onToggle: (detail: ToggleDetail<K>) => void;\n};\n\n/**\n * The Expander component renders expand and collapse icons in collections.\n */\nexport function Expander<K>({ itemKey, expanded, onToggle }: Props<K>) {\n const classes = classNames([ITEM_SELECTOR]);\n\n const actionHandler = () => {\n onToggle({ value: itemKey });\n };\n\n return (\n <span class={classes}>\n <EmbeddedIconButton\n aria-label={expanded ? 'collapsible' : 'expandable'}\n onAction={actionHandler}>\n {expanded ? <ChevronDown size=\"6x\" /> : <ChevronRight size=\"6x\" />}\n </EmbeddedIconButton>\n </span>\n );\n}\n\nexport const isExpander = (elem: HTMLElement) => {\n if (elem.parentElement && elem.parentElement.classList.contains(ITEM_SELECTOR)) {\n return true;\n }\n return false;\n};\n"],"names":["classNames","_jsx","EmbeddedIconButton","ChevronDown","ChevronRight"],"mappings":";;;;;;;;;AAOO,MAAM,aAAa,GAAG,yBAAyB;AAoBtD;;AAEG;AACG,SAAU,QAAQ,CAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAY,EAAA;IACnE,MAAM,OAAO,GAAGA,qBAAU,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;IAE5C,MAAM,aAAa,GAAG,MAAK;AACzB,QAAA,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/B,KAAC,CAAC;IAEF,QACEC,yBAAM,KAAK,EAAE,OAAO,EAClB,QAAA,EAAAA,cAAA,CAACC,qCAAkB,EACL,EAAA,YAAA,EAAA,QAAQ,GAAG,aAAa,GAAG,YAAY,EACnD,QAAQ,EAAE,aAAa,EAAA,QAAA,EACtB,QAAQ,GAAGD,cAAC,CAAAE,0BAAW,IAAC,IAAI,EAAC,IAAI,EAAA,CAAG,GAAGF,cAAC,CAAAG,4BAAY,IAAC,IAAI,EAAC,IAAI,EAAG,CAAA,EAAA,CAC/C,EAChB,CAAA,EACP;AACJ,CAAC;AAEY,MAAA,UAAU,GAAG,CAAC,IAAiB,KAAI;AAC9C,IAAA,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;AAC9E,QAAA,OAAO,IAAI,CAAC;KACb;AACD,IAAA,OAAO,KAAK,CAAC;AACf;;;;;;"}
1
+ {"version":3,"file":"Expander-01af6642.js","sources":["../../src/PRIVATE_Expander/Expander.tsx"],"sourcesContent":["import { EmbeddedIconButton } from '#PRIVATE_EmbeddedIconButton';\nimport { ChevronDown } from '#UNSAFE_RedwoodIcons/ChevronDown';\nimport { ChevronRight } from '#UNSAFE_RedwoodIcons/ChevronRight';\nimport { ToggleDetail } from '#UNSAFE_Collection';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { classNames } from '#utils/UNSAFE_classNames';\n\nexport const ITEM_SELECTOR = 'oj-collection-expander';\n\n/**\n * Props for the Expander component\n */\ntype Props<K> = TestIdProps & {\n /**\n * The key of the item\n */\n itemKey: K;\n /**\n * A boolean to indicate whether the expander is expander or collapsed\n */\n expanded: boolean;\n /**\n * Callback function to invoke when the user expands or collapses the expander.\n */\n onToggle: (detail: ToggleDetail<K>) => void;\n};\n\n/**\n * The Expander component renders expand and collapse icons in collections.\n */\nexport function Expander<K>({ itemKey, expanded, onToggle }: Props<K>) {\n const classes = classNames([ITEM_SELECTOR]);\n\n const actionHandler = () => {\n onToggle({ value: itemKey });\n };\n\n return (\n <span class={classes}>\n <EmbeddedIconButton\n aria-label={expanded ? 'collapsible' : 'expandable'}\n onAction={actionHandler}>\n {expanded ? <ChevronDown size=\"6x\" /> : <ChevronRight size=\"6x\" />}\n </EmbeddedIconButton>\n </span>\n );\n}\n\nexport const isExpander = (elem: HTMLElement) => {\n if (elem.parentElement && elem.parentElement.classList.contains(ITEM_SELECTOR)) {\n return true;\n }\n return false;\n};\n"],"names":["classNames","_jsx","EmbeddedIconButton","ChevronDown","ChevronRight"],"mappings":";;;;;;;;;AAOO,MAAM,aAAa,GAAG,yBAAyB;AAoBtD;;AAEG;AACG,SAAU,QAAQ,CAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAY,EAAA;IACnE,MAAM,OAAO,GAAGA,qBAAU,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;IAE5C,MAAM,aAAa,GAAG,MAAK;AACzB,QAAA,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/B,KAAC,CAAC;IAEF,QACEC,yBAAM,KAAK,EAAE,OAAO,EAClB,QAAA,EAAAA,cAAA,CAACC,qCAAkB,EACL,EAAA,YAAA,EAAA,QAAQ,GAAG,aAAa,GAAG,YAAY,EACnD,QAAQ,EAAE,aAAa,EAAA,QAAA,EACtB,QAAQ,GAAGD,cAAC,CAAAE,0BAAW,IAAC,IAAI,EAAC,IAAI,EAAA,CAAG,GAAGF,cAAC,CAAAG,4BAAY,IAAC,IAAI,EAAC,IAAI,EAAG,CAAA,EAAA,CAC/C,EAChB,CAAA,EACP;AACJ,CAAC;AAEY,MAAA,UAAU,GAAG,CAAC,IAAiB,KAAI;AAC9C,IAAA,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;AAC9E,QAAA,OAAO,IAAI,CAAC;KACb;AACD,IAAA,OAAO,KAAK,CAAC;AACf;;;;;;"}
@@ -0,0 +1,27 @@
1
+ /* @oracle/oraclejet-preact: undefined */
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('preact/jsx-runtime');
5
+ var hooks = require('preact/hooks');
6
+ var classNames = require('./classNames-c14c6ef3.js');
7
+ var usePress = require('./usePress-886180e4.js');
8
+ require('./FormFieldContext-69fe83d2.js');
9
+ var useFormFieldContext = require('./useFormFieldContext-4632eb73.js');
10
+
11
+
12
+ var hide = 'MaxLengthCounterStyles_hide__7dy9j71';
13
+ var maxLengthCounterBase = 'MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70';
14
+ var spanStyles = 'MaxLengthCounterStyles_spanStyles__7dy9j72';
15
+
16
+ const noop = () => { };
17
+ function MaxLengthCounter({ maxLength, valueLength = 0, onClick }) {
18
+ const { isFocused } = useFormFieldContext.useFormFieldContext();
19
+ // We don't want mousedown on this component to do anything, so prevent the default behavior.
20
+ const killEvent = hooks.useCallback((event) => event.preventDefault(), []);
21
+ const textClasses = classNames.classNames([!isFocused && hide]);
22
+ const { pressProps } = usePress.usePress(onClick ?? noop);
23
+ return (jsxRuntime.jsx("div", { class: maxLengthCounterBase, onMouseDown: killEvent, ...pressProps, children: jsxRuntime.jsxs("span", { class: textClasses, children: [jsxRuntime.jsx("span", { class: spanStyles, children: valueLength }), jsxRuntime.jsx("span", { class: spanStyles, children: "/" }), jsxRuntime.jsx("span", { class: spanStyles, children: maxLength })] }) }));
24
+ }
25
+
26
+ exports.MaxLengthCounter = MaxLengthCounter;
27
+ //# sourceMappingURL=MaxLengthCounter-39055ba1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MaxLengthCounter-39055ba1.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx"],"sourcesContent":["import { useCallback } from 'preact/hooks';\n\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useFormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { hide, maxLengthCounterBase, spanStyles } from './MaxLengthCounterStyles.css';\n\ntype Props = {\n maxLength: number;\n valueLength?: number;\n onClick?: () => void; // the calling component should focus on the appropriate element when clicked.\n};\n\nconst noop = () => {};\n\nexport function MaxLengthCounter({ maxLength, valueLength = 0, onClick }: Props) {\n const { isFocused } = useFormFieldContext();\n // We don't want mousedown on this component to do anything, so prevent the default behavior.\n const killEvent = useCallback((event: Event) => event.preventDefault(), []);\n const textClasses = classNames([!isFocused && hide]);\n const { pressProps } = usePress(onClick ?? noop);\n return (\n <div class={maxLengthCounterBase} onMouseDown={killEvent} {...pressProps}>\n <span class={textClasses}>\n <span class={spanStyles}>{valueLength}</span>\n <span class={spanStyles}>/</span>\n <span class={spanStyles}>{maxLength}</span>\n </span>\n </div>\n );\n}\n"],"names":["useFormFieldContext","useCallback","classNames","usePress","_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,IAAI,GAAG,MAAK,GAAG,CAAC;AAEhB,SAAU,gBAAgB,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAS,EAAA;AAC7E,IAAA,MAAM,EAAE,SAAS,EAAE,GAAGA,uCAAmB,EAAE,CAAC;;AAE5C,IAAA,MAAM,SAAS,GAAGC,iBAAW,CAAC,CAAC,KAAY,KAAK,KAAK,CAAC,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5E,MAAM,WAAW,GAAGC,qBAAU,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,UAAU,EAAE,GAAGC,iBAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;AACjD,IAAA,QACEC,cAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAM,GAAA,UAAU,YACtEC,eAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,WAAW,EAAA,QAAA,EAAA,CACtBD,yBAAM,KAAK,EAAE,UAAU,EAAA,QAAA,EAAG,WAAW,EAAQ,CAAA,EAC7CA,yBAAM,KAAK,EAAE,UAAU,EAAU,QAAA,EAAA,GAAA,EAAA,CAAA,EACjCA,yBAAM,KAAK,EAAE,UAAU,EAAG,QAAA,EAAA,SAAS,GAAQ,CACtC,EAAA,CAAA,EAAA,CACH,EACN;AACJ;;;;"}
@@ -19,7 +19,7 @@ var useTestId = require('./useTestId-15ee37d6.js');
19
19
  var HiddenAccessible = require('./HiddenAccessible-087eb49a.js');
20
20
  var LiveRegion = require('./LiveRegion-a2c839ea.js');
21
21
  require('./UNSAFE_Text/themes/TextStyles.css.js');
22
- var NavigationListLinkItem = require('./NavigationListLinkItem-35f33123.js');
22
+ var NavigationListLinkItem = require('./NavigationListLinkItem-0931af4d.js');
23
23
  require('./Flex-a6d1c038.js');
24
24
  require('./logger-2b636482.js');
25
25
  require('preact');
@@ -32,6 +32,8 @@ require('./tooltipUtils-842e04c7.js');
32
32
  require('./UNSAFE_NavigationList/themes/NavigationListItemStyles.css.js');
33
33
 
34
34
  require('./UNSAFE_NavigationList/themes/redwood/NavigationListItemVariants.css.js');
35
+ require('./BaseButton-acda944a.js');
36
+ require('./ButtonLabelLayout-8981b39a.js');
35
37
 
36
38
  const ITEM_SELECTOR = '[role="tab"]';
37
39
  const REMOVE_ICON_SELECTOR = '[data-oj-navigationlist-item-remove-icon]';
@@ -299,4 +301,4 @@ function NavigationListItem({ itemKey, label, badge, metadata, severity }) {
299
301
 
300
302
  exports.NavigationList = NavigationList;
301
303
  exports.NavigationListItem = NavigationListItem;
302
- //# sourceMappingURL=NavigationListItem-24abe2ab.js.map
304
+ //# sourceMappingURL=NavigationListItem-843e014d.js.map