@oracle/oraclejet-preact 20.0.6 → 20.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 (110) hide show
  1. package/amd/{BarChart-ac13883f.js → BarChart-54a0a7e6.js} +2 -2
  2. package/amd/{BarChart-ac13883f.js.map → BarChart-54a0a7e6.js.map} +1 -1
  3. package/amd/{Chart-44c6404b.js → Chart-18ff7280.js} +2 -2
  4. package/amd/{Chart-44c6404b.js.map → Chart-18ff7280.js.map} +1 -1
  5. package/amd/{ComboChart-71b78e7f.js → ComboChart-bed13144.js} +2 -2
  6. package/amd/{ComboChart-71b78e7f.js.map → ComboChart-bed13144.js.map} +1 -1
  7. package/amd/{LineAreaChart-565c2a3c.js → LineAreaChart-39766a4b.js} +2 -2
  8. package/amd/{LineAreaChart-565c2a3c.js.map → LineAreaChart-39766a4b.js.map} +1 -1
  9. package/amd/NavigationListItem-672b4363.js +2 -0
  10. package/amd/{NavigationListItem-e59797c5.js.map → NavigationListItem-672b4363.js.map} +1 -1
  11. package/amd/{OverflowTabBar-6264d822.js → OverflowTabBar-fd567fb3.js} +2 -2
  12. package/amd/{OverflowTabBar-6264d822.js.map → OverflowTabBar-fd567fb3.js.map} +1 -1
  13. package/amd/{OverflowTabBarItem-551bc390.js → OverflowTabBarItem-ca1e2612.js} +2 -2
  14. package/amd/{OverflowTabBarItem-551bc390.js.map → OverflowTabBarItem-ca1e2612.js.map} +1 -1
  15. package/amd/PRIVATE_Chart.js +1 -1
  16. package/amd/{ScatterChart-86dc0c59.js → ScatterChart-568ef9fa.js} +2 -2
  17. package/amd/{ScatterChart-86dc0c59.js.map → ScatterChart-568ef9fa.js.map} +1 -1
  18. package/amd/Theme-redwood/theme.css +200 -200
  19. package/amd/Theme-stable/theme.css +229 -229
  20. package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
  21. package/amd/UNSAFE_BarChart.js +1 -1
  22. package/amd/UNSAFE_ComboChart.js +1 -1
  23. package/amd/UNSAFE_LineAreaChart.js +1 -1
  24. package/amd/UNSAFE_NavigationList.js +1 -1
  25. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  26. package/amd/UNSAFE_ScatterChart.js +1 -1
  27. package/amd/UNSAFE_TabBar.js +1 -1
  28. package/amd/UNSAFE_TabBarCommon.js +1 -1
  29. package/amd/UNSAFE_TabBarMixed.js +1 -1
  30. package/cjs/{ColorPalette-158446ef.js → ColorPalette-975a3476.js} +2 -2
  31. package/cjs/{ColorPalette-158446ef.js.map → ColorPalette-975a3476.js.map} +1 -1
  32. package/cjs/{ColorPicker-d36881eb.js → ColorPicker-9608b09c.js} +2 -2
  33. package/cjs/{ColorPicker-d36881eb.js.map → ColorPicker-9608b09c.js.map} +1 -1
  34. package/cjs/Theme-redwood/theme.css +201 -201
  35. package/cjs/Theme-stable/theme.css +233 -233
  36. package/cjs/UNSAFE_BaseButton/themes/stable/BaseButtonTheme.js +0 -1
  37. package/cjs/UNSAFE_BaseButton/themes/stable/BaseButtonTheme.js.map +1 -1
  38. package/cjs/UNSAFE_ColorPalette.js +80 -80
  39. package/cjs/UNSAFE_ColorPicker.js +77 -77
  40. package/cjs/UNSAFE_InputColor.js +11 -11
  41. package/cjs/UNSAFE_TextArea.js +224 -109
  42. package/cjs/UNSAFE_TextArea.js.map +1 -1
  43. package/cjs/UNSAFE_TextAreaAutosize.js +3 -3
  44. package/cjs/UNSAFE_TextAreaAutosize.js.map +1 -1
  45. package/cjs/useTextAreaAltEnter-11424062.js +64 -0
  46. package/cjs/useTextAreaAltEnter-11424062.js.map +1 -0
  47. package/es/{BaseCardView-35315f78.js → BaseCardView-f262a5b4.js} +1 -4
  48. package/es/{BaseCardView-35315f78.js.map → BaseCardView-f262a5b4.js.map} +1 -1
  49. package/es/{Chart-74ef9942.js → Chart-b1338ecd.js} +2 -2
  50. package/es/{Chart-74ef9942.js.map → Chart-b1338ecd.js.map} +1 -1
  51. package/es/CheckboxSet-87ef81e2.js +51 -0
  52. package/es/CheckboxSet-87ef81e2.js.map +1 -0
  53. package/es/ConveyorBeltVariants.styles.css +6 -6
  54. package/es/ConveyorBeltVariants.styles2.css +6 -6
  55. package/es/DiagramStyles.styles2.css +16 -10
  56. package/es/DiagramStyles.styles3.css +10 -16
  57. package/es/PRIVATE_BaseCardView.js +1 -1
  58. package/es/PRIVATE_Chart.js +4 -4
  59. package/es/PRIVATE_CollapsibleNavigationList.js +25 -25
  60. package/es/PRIVATE_TableList.js +4 -4
  61. package/es/{TabBar-8672dd9f.js → TabBar-0105b4a0.js} +1 -3
  62. package/es/{TabBar-8672dd9f.js.map → TabBar-0105b4a0.js.map} +1 -1
  63. package/es/Theme-redwood/theme.css +540 -545
  64. package/es/Theme-stable/theme.css +444 -439
  65. package/es/UNSAFE_BarChart.js +4 -4
  66. package/es/UNSAFE_CardFlexView.js +1 -1
  67. package/es/UNSAFE_CardGridView.js +1 -1
  68. package/es/UNSAFE_CheckboxItem.js +123 -62
  69. package/es/UNSAFE_CheckboxItem.js.map +1 -1
  70. package/es/UNSAFE_CheckboxSet.js +15 -49
  71. package/es/UNSAFE_CheckboxSet.js.map +1 -1
  72. package/es/UNSAFE_ComboChart.js +4 -4
  73. package/es/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
  74. package/es/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltTheme.js +1 -1
  75. package/es/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltVariants.css.js +1 -1
  76. package/es/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltTheme.js +1 -1
  77. package/es/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltVariants.css.js +1 -1
  78. package/es/UNSAFE_ConveyorBelt.js +1 -1
  79. package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
  80. package/es/UNSAFE_FlatTreeView.js +14 -14
  81. package/es/UNSAFE_LineAreaChart.js +4 -4
  82. package/es/UNSAFE_ListView.js +53 -53
  83. package/es/UNSAFE_OverflowTabBar.js +10 -10
  84. package/es/UNSAFE_ReorderableTabBar.js +12 -12
  85. package/es/UNSAFE_RichCheckboxSet.js +46 -42
  86. package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
  87. package/es/UNSAFE_RichSelectionItem.js +153 -90
  88. package/es/UNSAFE_RichSelectionItem.js.map +1 -1
  89. package/es/UNSAFE_ScatterChart.js +4 -4
  90. package/es/UNSAFE_Switch/themes/redwood/SwitchBaseTheme.css.js +1 -1
  91. package/es/UNSAFE_Switch/themes/redwood/SwitchTheme.js +1 -1
  92. package/es/UNSAFE_Switch/themes/stable/SwitchBaseTheme.css.js +1 -1
  93. package/es/UNSAFE_Switch/themes/stable/SwitchTheme.js +1 -1
  94. package/es/UNSAFE_Switch.js +1 -1
  95. package/es/UNSAFE_TabBar.js +10 -10
  96. package/es/UNSAFE_TabBarMixed.js +8 -8
  97. package/es/UNSAFE_TextArea.js +227 -107
  98. package/es/UNSAFE_TextArea.js.map +1 -1
  99. package/es/UNSAFE_TextAreaAutosize.js +1 -1
  100. package/es/useTextAreaAltEnter-ac460f4c.js +61 -0
  101. package/es/useTextAreaAltEnter-ac460f4c.js.map +1 -0
  102. package/package.json +2 -2
  103. package/amd/NavigationListItem-e59797c5.js +0 -2
  104. package/cjs/TextArea-4d2df019.js +0 -230
  105. package/cjs/TextArea-4d2df019.js.map +0 -1
  106. package/es/CheckboxSetContext-1be56556.js +0 -9
  107. package/es/CheckboxSetContext-1be56556.js.map +0 -1
  108. package/es/TextArea-1d78b5d8.js +0 -226
  109. package/es/TextArea-1d78b5d8.js.map +0 -1
  110. /package/es/UNSAFE_Switch/themes/{redwood → stable}/SwitchBaseTheme.styles.css +0 -0
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', './utils-8bf50f08', './ReferenceLineArea-450530dd', './MarkersWithLabel-2960e007', './dataStyleUtils-1a157bd8', './useUser-08901aba', './colorUtils-1c8d0c00', './accUtils-7e057eef', './themeContract.css-b6ec3943', './chartUtils-2415ea65', 'preact/compat', './Chart-44c6404b'], (function(e,t,i,s,n,r,a,o,l,d,g,c,h){"use strict";const p=c.forwardRef((({width:e,height:l,selectedIds:c=[],hiddenIds:p=[],highlightedIds:I,hideAndShowBehavior:u="none",orientation:m="vertical",yAxis:S,y2Axis:f,series:y,groups:v,isStacked:A=!1,getDataItem:C,selectionMode:T="none",drilling:b="off",type:L="line",overview:D="off",dataLabelEffect:k="outline",...R},E)=>{const{direction:M,forcedColors:w}=a.useUser(),U="active"===w,j=void 0!==R.testId,W="rtl"===M,P="log"===S?.scale,F=R.xAxis?.timeAxisType,z=new Set(p),H=new Set(c),N=new Set(I),O="horizontal"===m,q=o.getColorRamp();let B=A?i.getCumulativeSeries(y.length,v.length,C,z,P):i.getSeriesData(y?.length,v?.length,C,z,P);const V=(e,t)=>A?{...C(e,t),value:B[e][t]}:C(e,t),{hasCenteredSeries:Y,hasUncenteredSeries:G}=y.reduce(((e,t)=>({hasCenteredSeries:e.hasCenteredSeries||"centeredSegmented"===t.lineType||"centeredStepped"===t.lineType,hasUncenteredSeries:e.hasUncenteredSeries||"segmented"===t.lineType||"stepped"===t.lineType})),{hasCenteredSeries:!1,hasUncenteredSeries:!1}),J=i.getMarkers(),K="lineWithArea"===L?.2:1,Q="area"===L||"lineWithArea"===L,X="area"===L,Z=[];return t.jsx(h.Chart,{ref:E,width:e,height:l,selectedIds:H,hiddenIds:p,hideAndShowBehavior:u,orientation:m,yAxis:S,y2Axis:f,series:y,groups:v,selectionMode:T,drilling:b,isStacked:A,getDataItem:C,findNearest:(e,t,s)=>i.findNearestDataPoint(y,v,e,t,V,A,(()=>({offset:0,dataWidth:0})),((e,t)=>t.transform(e)),P,0,z,F,s),getDataItemPos:(e,t,i)=>(s,n)=>{const r="y2"===y[s].associatedYAxis;return g.getLineAreaChartItemPosition(s,n,B,C,v,O,e,r?i:t,F)},getMarkerInfo:(e,t)=>({color:r.getItemColor(e,t,y,C),type:r.getMarkerType(e,t,C)}),renderGridLinesInFront:Q,getNavUtil:(e,t)=>r.getLineAreaChartNavUtil(C,y.length,e,t,A,W,O),getGapRatio:()=>1,getStartAndEndAxesOffset:e=>i.getStartAndEndAxesOffset(Y,G,O,e),isRtl:W,overview:D,defaultOverviewContentRenderer:()=>t.jsx(x,{series:y,groups:v,getDataItem:C,type:L}),...R,children:({getItemAriaLabel:e,groupsInfo:r,xStartIndex:a,xEndIndex:o,xScale:l,yScale:g,y2Scale:c,activeId:h,focusedItemInfo:p,hoveredItemInfo:x,isPointInsideMarquee:u,defaultFontSize:S,getTextDimensions:f,plotAreaClipPathId:v,axisStepWidth:L})=>{const D=r.map((({item:e})=>e));return B=A?i.getCumulativeSeries(y.length,D.length,C,z,P):i.getSeriesData(y?.length,D?.length,C,z,P),t.jsxs(t.Fragment,{children:[B.map(((r,E)=>{if(0===r.length)return;const M=y[E],w="y2"===M.associatedYAxis,z=i.getLineAreaSegments(w?c:g,l,r,a,o,P,D,E,V,F);Z[E]=z[0];const Y="curved"===M.lineType&&A&&B.length>1&&E>0,G=void 0===I||0===I.length||N.has(M.id),$=A&&0!=E?Z.reduce(((e,t,i)=>i>=E?e:t.length>0?i:e),0):void 0;return t.jsxs(t.Fragment,{children:[Q&&t.jsx(s.AreaSeries,{yScale:w?c:g,lineType:M.lineType,color:M.areaColor||q[E%q.length],isHorizontal:O,areaColorOpacity:K,isBottomSegmentCurved:Y,bottomCoords:void 0!==$&&Z[$].some((e=>null!=e))?Z[$]:void 0,lineSegments:z,isLog:P,isHighlighted:G,seriesIndex:E,groupWidth:L,isRtl:W,timeAxisType:F,plotAreaClipPathId:v}),t.jsx(s.LineSeries,{lineType:M.lineType,lineColor:X?d.colorSchemeVars.dvt.contrastLine:M.lineColor,lineWidth:X?A?2.5:1.25:M.lineWidth,lineStyle:M.lineStyle,color:M.lineColor||q[E%q.length],lineSegmentCoords:z,isHorizontal:O,isHighlighted:G,seriesIndex:E,groupWidth:L,isRtl:W,timeAxisType:F,plotAreaClipPathId:v}),!A&&"stepped"!==M.lineType&&"segmented"!==M.lineType&&t.jsx(n.MarkersWithLabel,{yScale:w?c:g,xScale:l,groups:D,series:M,timeAxisType:F,color:M.lineColor||M.areaColor||q[E%q.length],seriesIndex:E,startIndex:a,endIndex:o,markerType:J[E%J.length],orientation:m,isLog:P,activeId:h,getDataItem:C,isPointInsideMarquee:u,selectedIds:H,highlightedIds:void 0!==I?N:void 0,focusedItemIndex:p.seriesIndex!==E||!p.isFocusVisible||R.isDataCursorEnabled&&R.dataCursorStyle?.isMarkerDisplayed?void 0:p.groupIndex,hoveredItemIndex:x?.isCurrent&&x.seriesIndex===E?x.groupIndex:void 0,isSelectionEnabled:"single"===T||"multiple"===T,isDrillEnabled:"on"===b,defaultFontSize:S,dataLabelEffect:k,isHighContrast:U,isTestEnv:j,getTextDimensions:f,getItemAriaLabel:e,isRtl:W})]})})),B.map(((i,s)=>{if(0===i.length)return;const r=y[s],d="y2"===r.associatedYAxis;return A||"segmented"===r.lineType||"stepped"===r.lineType?t.jsx(n.MarkersWithLabel,{yScale:d?c:g,series:y[s],xScale:l,groups:D,timeAxisType:F,color:r.lineColor||r.areaColor||q[s%q.length],seriesIndex:s,isPointInsideMarquee:u,startIndex:a,endIndex:o,markerType:J[s%J.length],orientation:m,isLog:P,activeId:h,getDataItem:V,selectedIds:H,focusedItemIndex:p.seriesIndex===s&&p.isFocusVisible?p.groupIndex:void 0,hoveredItemIndex:x?.isCurrent&&x.seriesIndex===s?x.groupIndex:void 0,isSelectionEnabled:"single"===T||"multiple"===T,isDrillEnabled:"on"===b,defaultFontSize:S,dataLabelEffect:k,isHighContrast:U,isTestEnv:j,getTextDimensions:f,getItemAriaLabel:e,isRtl:W}):void 0}))]})}})}));function x(e){return t.jsx(p,{datatip:()=>({content:""}),zoomAndScroll:"off",overview:"off",plotArea:{yMajorTick:{isRendered:!1}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},type:e.type})}e.LineAreaChart=p}));
2
- //# sourceMappingURL=LineAreaChart-565c2a3c.js.map
1
+ define(['exports', 'preact/jsx-runtime', './utils-8bf50f08', './ReferenceLineArea-450530dd', './MarkersWithLabel-2960e007', './dataStyleUtils-1a157bd8', './useUser-08901aba', './colorUtils-1c8d0c00', './accUtils-7e057eef', './themeContract.css-b6ec3943', './chartUtils-2415ea65', 'preact/compat', './Chart-18ff7280'], (function(e,t,i,s,n,r,a,o,l,d,g,c,h){"use strict";const p=c.forwardRef((({width:e,height:l,selectedIds:c=[],hiddenIds:p=[],highlightedIds:I,hideAndShowBehavior:u="none",orientation:m="vertical",yAxis:S,y2Axis:f,series:y,groups:v,isStacked:A=!1,getDataItem:C,selectionMode:T="none",drilling:b="off",type:L="line",overview:D="off",dataLabelEffect:k="outline",...R},E)=>{const{direction:M,forcedColors:w}=a.useUser(),U="active"===w,j=void 0!==R.testId,W="rtl"===M,P="log"===S?.scale,F=R.xAxis?.timeAxisType,z=new Set(p),H=new Set(c),N=new Set(I),O="horizontal"===m,q=o.getColorRamp();let B=A?i.getCumulativeSeries(y.length,v.length,C,z,P):i.getSeriesData(y?.length,v?.length,C,z,P);const V=(e,t)=>A?{...C(e,t),value:B[e][t]}:C(e,t),{hasCenteredSeries:Y,hasUncenteredSeries:G}=y.reduce(((e,t)=>({hasCenteredSeries:e.hasCenteredSeries||"centeredSegmented"===t.lineType||"centeredStepped"===t.lineType,hasUncenteredSeries:e.hasUncenteredSeries||"segmented"===t.lineType||"stepped"===t.lineType})),{hasCenteredSeries:!1,hasUncenteredSeries:!1}),J=i.getMarkers(),K="lineWithArea"===L?.2:1,Q="area"===L||"lineWithArea"===L,X="area"===L,Z=[];return t.jsx(h.Chart,{ref:E,width:e,height:l,selectedIds:H,hiddenIds:p,hideAndShowBehavior:u,orientation:m,yAxis:S,y2Axis:f,series:y,groups:v,selectionMode:T,drilling:b,isStacked:A,getDataItem:C,findNearest:(e,t,s)=>i.findNearestDataPoint(y,v,e,t,V,A,(()=>({offset:0,dataWidth:0})),((e,t)=>t.transform(e)),P,0,z,F,s),getDataItemPos:(e,t,i)=>(s,n)=>{const r="y2"===y[s].associatedYAxis;return g.getLineAreaChartItemPosition(s,n,B,C,v,O,e,r?i:t,F)},getMarkerInfo:(e,t)=>({color:r.getItemColor(e,t,y,C),type:r.getMarkerType(e,t,C)}),renderGridLinesInFront:Q,getNavUtil:(e,t)=>r.getLineAreaChartNavUtil(C,y.length,e,t,A,W,O),getGapRatio:()=>1,getStartAndEndAxesOffset:e=>i.getStartAndEndAxesOffset(Y,G,O,e),isRtl:W,overview:D,defaultOverviewContentRenderer:()=>t.jsx(x,{series:y,groups:v,getDataItem:C,type:L}),...R,children:({getItemAriaLabel:e,groupsInfo:r,xStartIndex:a,xEndIndex:o,xScale:l,yScale:g,y2Scale:c,activeId:h,focusedItemInfo:p,hoveredItemInfo:x,isPointInsideMarquee:u,defaultFontSize:S,getTextDimensions:f,plotAreaClipPathId:v,axisStepWidth:L})=>{const D=r.map((({item:e})=>e));return B=A?i.getCumulativeSeries(y.length,D.length,C,z,P):i.getSeriesData(y?.length,D?.length,C,z,P),t.jsxs(t.Fragment,{children:[B.map(((r,E)=>{if(0===r.length)return;const M=y[E],w="y2"===M.associatedYAxis,z=i.getLineAreaSegments(w?c:g,l,r,a,o,P,D,E,V,F);Z[E]=z[0];const Y="curved"===M.lineType&&A&&B.length>1&&E>0,G=void 0===I||0===I.length||N.has(M.id),$=A&&0!=E?Z.reduce(((e,t,i)=>i>=E?e:t.length>0?i:e),0):void 0;return t.jsxs(t.Fragment,{children:[Q&&t.jsx(s.AreaSeries,{yScale:w?c:g,lineType:M.lineType,color:M.areaColor||q[E%q.length],isHorizontal:O,areaColorOpacity:K,isBottomSegmentCurved:Y,bottomCoords:void 0!==$&&Z[$].some((e=>null!=e))?Z[$]:void 0,lineSegments:z,isLog:P,isHighlighted:G,seriesIndex:E,groupWidth:L,isRtl:W,timeAxisType:F,plotAreaClipPathId:v}),t.jsx(s.LineSeries,{lineType:M.lineType,lineColor:X?d.colorSchemeVars.dvt.contrastLine:M.lineColor,lineWidth:X?A?2.5:1.25:M.lineWidth,lineStyle:M.lineStyle,color:M.lineColor||q[E%q.length],lineSegmentCoords:z,isHorizontal:O,isHighlighted:G,seriesIndex:E,groupWidth:L,isRtl:W,timeAxisType:F,plotAreaClipPathId:v}),!A&&"stepped"!==M.lineType&&"segmented"!==M.lineType&&t.jsx(n.MarkersWithLabel,{yScale:w?c:g,xScale:l,groups:D,series:M,timeAxisType:F,color:M.lineColor||M.areaColor||q[E%q.length],seriesIndex:E,startIndex:a,endIndex:o,markerType:J[E%J.length],orientation:m,isLog:P,activeId:h,getDataItem:C,isPointInsideMarquee:u,selectedIds:H,highlightedIds:void 0!==I?N:void 0,focusedItemIndex:p.seriesIndex!==E||!p.isFocusVisible||R.isDataCursorEnabled&&R.dataCursorStyle?.isMarkerDisplayed?void 0:p.groupIndex,hoveredItemIndex:x?.isCurrent&&x.seriesIndex===E?x.groupIndex:void 0,isSelectionEnabled:"single"===T||"multiple"===T,isDrillEnabled:"on"===b,defaultFontSize:S,dataLabelEffect:k,isHighContrast:U,isTestEnv:j,getTextDimensions:f,getItemAriaLabel:e,isRtl:W})]})})),B.map(((i,s)=>{if(0===i.length)return;const r=y[s],d="y2"===r.associatedYAxis;return A||"segmented"===r.lineType||"stepped"===r.lineType?t.jsx(n.MarkersWithLabel,{yScale:d?c:g,series:y[s],xScale:l,groups:D,timeAxisType:F,color:r.lineColor||r.areaColor||q[s%q.length],seriesIndex:s,isPointInsideMarquee:u,startIndex:a,endIndex:o,markerType:J[s%J.length],orientation:m,isLog:P,activeId:h,getDataItem:V,selectedIds:H,focusedItemIndex:p.seriesIndex===s&&p.isFocusVisible?p.groupIndex:void 0,hoveredItemIndex:x?.isCurrent&&x.seriesIndex===s?x.groupIndex:void 0,isSelectionEnabled:"single"===T||"multiple"===T,isDrillEnabled:"on"===b,defaultFontSize:S,dataLabelEffect:k,isHighContrast:U,isTestEnv:j,getTextDimensions:f,getItemAriaLabel:e,isRtl:W}):void 0}))]})}})}));function x(e){return t.jsx(p,{datatip:()=>({content:""}),zoomAndScroll:"off",overview:"off",plotArea:{yMajorTick:{isRendered:!1}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},type:e.type})}e.LineAreaChart=p}));
2
+ //# sourceMappingURL=LineAreaChart-39766a4b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineAreaChart-565c2a3c.js","sources":["../../src/UNSAFE_LineAreaChart/LineAreaChart.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 { LineAreaChartProps, LineAreaItem } from './lineAreaChart.types';\nimport {\n findNearestDataPoint,\n getStartAndEndAxesOffset\n} from '#utils/PRIVATE_chartUtils/layoutUtils';\nimport { AreaSeries } from '#PRIVATE_LineAreaComponents/AreaSeries';\nimport { getCumulativeSeries, getMarkers, getSeriesData } from '#utils/PRIVATE_chartUtils/utils';\nimport { MarkersWithLabel } from '#PRIVATE_Chart/MarkersWithLabel';\nimport { getLineAreaChartNavUtil } from '#utils/PRIVATE_chartUtils/navUtils';\nimport { Chart } from '#PRIVATE_Chart';\nimport { Scale, TimeAxisProps, SizeHandle } from '#utils/UNSAFE_visTypes/chart';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { getColorRamp } from '#utils/UNSAFE_visUtils';\nimport { LineSeries } from '#PRIVATE_LineAreaComponents/LineSeries';\nimport { Point } from '#utils/PRIVATE_visSVGUtils';\nimport { getLineAreaSegments } from '#utils/PRIVATE_chartUtils/utils';\nimport { colorSchemeVars } from '@oracle/oraclejet-internal-theme-contract/themeContract.css';\nimport { getItemColor, getMarkerType } from '#utils/PRIVATE_chartUtils/dataStyleUtils';\nimport { getLineAreaChartItemPosition } from '#PRIVATE_LineAreaComponents/utils/chartUtils';\nimport { forwardRef, Ref } from 'preact/compat';\nimport { VNode } from 'preact';\n\nconst LINE_WITH_AREA_OPACITY = 0.2;\nexport type ForwardRefLineAreaChart = <K extends string | number, D extends LineAreaItem<K>>(\n props: LineAreaChartProps<K, D> & {\n ref?: Ref<SizeHandle>;\n }\n) => VNode | null;\n\n/**\n * The LineAreaChart displays information graphically using lines and filled areas, making relationships among the data easier to understand.\n */\nexport const LineAreaChart = forwardRef(\n <K extends string | number, D extends LineAreaItem<K>>(\n {\n width,\n height,\n selectedIds = [],\n hiddenIds = [],\n highlightedIds,\n hideAndShowBehavior = 'none',\n orientation = 'vertical',\n yAxis,\n y2Axis,\n series,\n groups,\n isStacked = false,\n getDataItem,\n selectionMode = 'none',\n drilling = 'off',\n type = 'line',\n overview = 'off',\n dataLabelEffect = 'outline',\n ...props\n }: LineAreaChartProps<K, D>,\n ref: Ref<SizeHandle>\n ) => {\n const { direction, forcedColors } = useUser();\n const isHighContrast = forcedColors === 'active';\n const isTestEnv = props.testId !== undefined;\n const isRtl = direction === 'rtl';\n const isLog = yAxis?.scale === 'log';\n const timeAxisType = (props.xAxis as TimeAxisProps)?.timeAxisType;\n const hiddenSet = new Set(hiddenIds);\n const selectedSet = new Set(selectedIds);\n const highlightedSet = new Set(highlightedIds);\n const isHoriz = orientation === 'horizontal';\n const colors = getColorRamp();\n let renderedSeries = isStacked\n ? getCumulativeSeries(series.length, groups.length, getDataItem, hiddenSet, isLog)\n : getSeriesData(series?.length, groups?.length, getDataItem, hiddenSet, isLog);\n\n const renderedGetDataItem = (seriesIndex: number, groupIndex: number): D | undefined => {\n if (!isStacked) return getDataItem(seriesIndex, groupIndex);\n return {\n ...getDataItem(seriesIndex, groupIndex),\n value: renderedSeries[seriesIndex][groupIndex]\n } as D;\n };\n\n const getGapRatio = () => {\n return 1;\n };\n\n const getNextChartItemFunc = (startIndex: number, endIndex: number) => {\n // TODO: JET-71332\n //@ts-ignore\n return getLineAreaChartNavUtil<D>(\n getDataItem,\n series.length,\n startIndex,\n endIndex,\n isStacked,\n isRtl,\n isHoriz\n );\n };\n\n const getDataItemPos = (xScale: Scale, yScale: Scale, y2Scale: Scale) => {\n return (seriesIndex: number, groupIndex: number) => {\n const isAssociatedToY2 = series[seriesIndex].associatedYAxis === 'y2';\n return getLineAreaChartItemPosition(\n seriesIndex,\n groupIndex,\n renderedSeries,\n getDataItem,\n groups,\n isHoriz,\n xScale,\n isAssociatedToY2 ? y2Scale : yScale,\n timeAxisType\n );\n };\n };\n\n const getMarkerColorAndType = (seriesIndex: number, groupIndex: number) => {\n return {\n color: getItemColor(seriesIndex, groupIndex, series, getDataItem),\n type: getMarkerType(seriesIndex, groupIndex, getDataItem)\n };\n };\n\n const findNearest = (xScale: Scale, yScale: Scale, y2Scale: Scale) => {\n const getSeriesDataInfo = () => {\n return {\n offset: 0,\n dataWidth: 0\n };\n };\n\n const getYCoord = (value: number, yScale: Scale) => {\n return yScale.transform(value);\n };\n\n return findNearestDataPoint<K, D>(\n series,\n groups,\n xScale,\n yScale,\n renderedGetDataItem,\n isStacked,\n getSeriesDataInfo,\n getYCoord,\n isLog,\n 0,\n hiddenSet,\n timeAxisType,\n y2Scale\n );\n };\n const { hasCenteredSeries, hasUncenteredSeries } = series.reduce(\n (acc, s) => {\n return {\n hasCenteredSeries:\n acc.hasCenteredSeries ||\n s.lineType === 'centeredSegmented' ||\n s.lineType === 'centeredStepped',\n hasUncenteredSeries:\n acc.hasUncenteredSeries || s.lineType === 'segmented' || s.lineType === 'stepped'\n };\n },\n { hasCenteredSeries: false, hasUncenteredSeries: false }\n );\n\n const getOffset = (groupCount: number) => {\n return getStartAndEndAxesOffset(hasCenteredSeries, hasUncenteredSeries, isHoriz, groupCount);\n };\n\n const markers = getMarkers();\n const areaOpacity = type === 'lineWithArea' ? LINE_WITH_AREA_OPACITY : 1;\n const isAreaRendered = type === 'area' || type === 'lineWithArea';\n const isContrastLineNeeded = type === 'area';\n const allLineSegmentCoords: Point[][] = [];\n\n return (\n <Chart\n ref={ref}\n width={width}\n height={height}\n selectedIds={selectedSet}\n hiddenIds={hiddenIds}\n hideAndShowBehavior={hideAndShowBehavior}\n orientation={orientation}\n yAxis={yAxis}\n y2Axis={y2Axis}\n series={series}\n groups={groups}\n selectionMode={selectionMode}\n drilling={drilling}\n isStacked={isStacked}\n getDataItem={getDataItem}\n findNearest={findNearest}\n getDataItemPos={getDataItemPos}\n getMarkerInfo={getMarkerColorAndType}\n renderGridLinesInFront={isAreaRendered}\n getNavUtil={getNextChartItemFunc}\n getGapRatio={getGapRatio}\n getStartAndEndAxesOffset={getOffset}\n isRtl={isRtl}\n overview={overview}\n defaultOverviewContentRenderer={() => {\n return (\n <OverviewLineAreaChart\n series={series}\n groups={groups}\n getDataItem={getDataItem}\n type={type}\n />\n );\n }}\n {...props}>\n {({\n getItemAriaLabel,\n groupsInfo,\n xStartIndex,\n xEndIndex,\n xScale,\n yScale,\n y2Scale,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n isPointInsideMarquee,\n defaultFontSize,\n getTextDimensions,\n plotAreaClipPathId,\n axisStepWidth\n }) => {\n const leafGroups = groupsInfo.map(({ item }) => item);\n renderedSeries = isStacked\n ? getCumulativeSeries(series.length, leafGroups.length, getDataItem, hiddenSet, isLog)\n : getSeriesData(series?.length, leafGroups?.length, getDataItem, hiddenSet, isLog);\n return (\n <>\n {renderedSeries.map((lineAreaSeries, index) => {\n if (lineAreaSeries.length === 0) {\n /* TODO: need a better way to handle when a series is hidden. */\n return;\n }\n const seriesItem = series[index];\n const isAssociatedToY2 = seriesItem.associatedYAxis === 'y2';\n const lineSegmentCoords: Point[][] = getLineAreaSegments<K, D>(\n isAssociatedToY2 ? y2Scale : yScale,\n xScale,\n lineAreaSeries,\n xStartIndex,\n xEndIndex,\n isLog,\n leafGroups,\n index,\n renderedGetDataItem,\n timeAxisType\n );\n allLineSegmentCoords[index] = lineSegmentCoords[0];\n const isBottomSegmentCurved =\n seriesItem.lineType === 'curved' &&\n isStacked &&\n renderedSeries.length > 1 &&\n index > 0;\n\n const isHighlighted =\n highlightedIds === undefined ||\n highlightedIds.length === 0 ||\n highlightedSet.has(seriesItem.id);\n\n const prevCoords =\n isStacked && index != 0\n ? allLineSegmentCoords.reduce((prevValue, newValue, j) => {\n // find the index i such that i < index, and series i has at least\n // one or more data item unhidden. Only such series will can be\n // used as bottomCoord for current series. Otherwise we have to use\n // baseline coord\n if (j >= index) {\n return prevValue;\n }\n if (newValue.length > 0) {\n return j;\n }\n return prevValue;\n }, 0)\n : undefined;\n\n return (\n <>\n {isAreaRendered && (\n <AreaSeries\n yScale={isAssociatedToY2 ? y2Scale : yScale}\n lineType={seriesItem.lineType}\n color={seriesItem.areaColor || colors[index % colors.length]}\n isHorizontal={isHoriz}\n areaColorOpacity={areaOpacity}\n isBottomSegmentCurved={isBottomSegmentCurved}\n bottomCoords={\n prevCoords !== undefined &&\n allLineSegmentCoords[prevCoords].some((value) => value != null)\n ? allLineSegmentCoords[prevCoords]\n : undefined\n }\n lineSegments={lineSegmentCoords}\n isLog={isLog}\n isHighlighted={isHighlighted}\n seriesIndex={index}\n groupWidth={axisStepWidth}\n isRtl={isRtl}\n timeAxisType={timeAxisType}\n plotAreaClipPathId={plotAreaClipPathId}\n />\n )}\n <LineSeries\n lineType={seriesItem.lineType}\n /* TODO: confirm with UX if this is contrastLine (changes depending on dark/light mode) or always white. \n It's always white in legacy.*/\n lineColor={\n isContrastLineNeeded\n ? colorSchemeVars.dvt.contrastLine\n : seriesItem.lineColor\n }\n /* The area generated in legacy are bit apart and not touching when stacked. Preact areas are a bit closer than legacy when curved. \n Increased the contrast linewidth (to 2.5 from legacy 1.25) to give legacy visual treatment.\n TODO: investivage why legacy areas are not touching. maybe we want to do the same in preact svg utils that\n generates this curve.\n */\n lineWidth={\n isContrastLineNeeded ? (isStacked ? 2.5 : 1.25) : seriesItem.lineWidth\n }\n lineStyle={seriesItem.lineStyle}\n color={seriesItem.lineColor || colors[index % colors.length]}\n lineSegmentCoords={lineSegmentCoords}\n isHorizontal={isHoriz}\n isHighlighted={isHighlighted}\n seriesIndex={index}\n groupWidth={axisStepWidth}\n isRtl={isRtl}\n timeAxisType={timeAxisType}\n plotAreaClipPathId={plotAreaClipPathId}\n />\n {\n /* For non stacked charts, markers should render in the order of series. Some markers might get hidden behind area but this preserves the legacy behavior.\n JET-75357: Segmented and stepped lines may stack markers/lines incorrectly by series order, so excluded from non-stacked charts.\n */\n !isStacked &&\n seriesItem.lineType !== 'stepped' &&\n seriesItem.lineType !== 'segmented' && (\n <MarkersWithLabel\n yScale={isAssociatedToY2 ? y2Scale : yScale}\n xScale={xScale}\n groups={leafGroups}\n series={seriesItem}\n timeAxisType={timeAxisType}\n color={\n seriesItem.lineColor ||\n seriesItem.areaColor ||\n colors[\n index % colors.length\n ] /* TODO : make this use getItemColor function from dataStyleUtils. */\n }\n seriesIndex={index}\n startIndex={xStartIndex}\n endIndex={xEndIndex}\n markerType={markers[index % markers.length]}\n orientation={orientation}\n isLog={isLog}\n activeId={activeId}\n getDataItem={getDataItem}\n isPointInsideMarquee={isPointInsideMarquee}\n selectedIds={selectedSet}\n highlightedIds={\n highlightedIds !== undefined ? highlightedSet : undefined\n }\n focusedItemIndex={\n focusedItemInfo.seriesIndex === index &&\n focusedItemInfo.isFocusVisible &&\n !(\n props.isDataCursorEnabled &&\n props.dataCursorStyle?.isMarkerDisplayed\n )\n ? focusedItemInfo.groupIndex\n : undefined\n }\n hoveredItemIndex={\n hoveredItemInfo?.isCurrent && hoveredItemInfo.seriesIndex === index\n ? hoveredItemInfo.groupIndex\n : undefined\n }\n isSelectionEnabled={\n selectionMode === 'single' || selectionMode === 'multiple'\n }\n isDrillEnabled={drilling === 'on'}\n defaultFontSize={defaultFontSize}\n dataLabelEffect={dataLabelEffect}\n isHighContrast={isHighContrast}\n isTestEnv={isTestEnv}\n getTextDimensions={getTextDimensions}\n getItemAriaLabel={getItemAriaLabel}\n isRtl={isRtl}\n />\n )\n }\n </>\n );\n })}\n {renderedSeries.map((lineAreaSeries, index) => {\n if (lineAreaSeries.length === 0) {\n /* TODO: need a better way to handle when a series is hidden.*/\n return;\n }\n const seriesItem = series[index];\n const isAssociatedToY2 = seriesItem.associatedYAxis === 'y2';\n return isStacked ||\n seriesItem.lineType === 'segmented' ||\n seriesItem.lineType === 'stepped' ? (\n <MarkersWithLabel\n yScale={isAssociatedToY2 ? y2Scale : yScale}\n series={series[index]}\n xScale={xScale}\n groups={leafGroups}\n timeAxisType={timeAxisType}\n color={\n seriesItem.lineColor || seriesItem.areaColor || colors[index % colors.length]\n }\n seriesIndex={index}\n isPointInsideMarquee={isPointInsideMarquee}\n startIndex={xStartIndex}\n endIndex={xEndIndex}\n markerType={markers[index % markers.length]}\n orientation={orientation}\n isLog={isLog}\n activeId={activeId}\n getDataItem={renderedGetDataItem}\n selectedIds={selectedSet}\n focusedItemIndex={\n focusedItemInfo.seriesIndex === index && focusedItemInfo.isFocusVisible\n ? focusedItemInfo.groupIndex\n : undefined\n }\n hoveredItemIndex={\n hoveredItemInfo?.isCurrent && hoveredItemInfo.seriesIndex === index\n ? hoveredItemInfo.groupIndex\n : undefined\n }\n isSelectionEnabled={selectionMode === 'single' || selectionMode === 'multiple'}\n isDrillEnabled={drilling === 'on'}\n defaultFontSize={defaultFontSize}\n dataLabelEffect={dataLabelEffect}\n isHighContrast={isHighContrast}\n isTestEnv={isTestEnv}\n getTextDimensions={getTextDimensions}\n getItemAriaLabel={getItemAriaLabel}\n isRtl={isRtl}\n />\n ) : undefined;\n })}\n </>\n );\n }}\n </Chart>\n );\n }\n) as ForwardRefLineAreaChart;\n\nfunction OverviewLineAreaChart<K extends string | number, D extends LineAreaItem<K>>(\n props: LineAreaChartProps<K, D>\n) {\n return (\n <LineAreaChart\n datatip={() => ({ content: '' })}\n zoomAndScroll=\"off\"\n overview=\"off\"\n plotArea={{\n yMajorTick: {\n isRendered: false\n }\n }}\n xAxis={{\n tickLabel: {\n autoRotate: false,\n // @ts-ignore\n isRendered: props.xAxis?.timeAxisType ? true : false\n }\n }}\n series={props.series}\n groups={props.groups}\n getDataItem={props.getDataItem}\n yAxis={{\n tickLabel: {\n isRendered: false\n }\n }}\n type={props.type}\n />\n );\n}\n"],"names":["LineAreaChart","forwardRef","width","height","selectedIds","hiddenIds","highlightedIds","hideAndShowBehavior","orientation","yAxis","y2Axis","series","groups","isStacked","getDataItem","selectionMode","drilling","type","overview","dataLabelEffect","props","ref","direction","forcedColors","useUser","isHighContrast","isTestEnv","undefined","testId","isRtl","isLog","scale","timeAxisType","xAxis","hiddenSet","Set","selectedSet","highlightedSet","isHoriz","colors","getColorRamp","renderedSeries","getCumulativeSeries","length","getSeriesData","renderedGetDataItem","seriesIndex","groupIndex","value","hasCenteredSeries","hasUncenteredSeries","reduce","acc","s","lineType","markers","getMarkers","areaOpacity","isAreaRendered","isContrastLineNeeded","allLineSegmentCoords","_jsx","Chart","findNearest","xScale","yScale","y2Scale","findNearestDataPoint","offset","dataWidth","transform","getDataItemPos","isAssociatedToY2","associatedYAxis","getLineAreaChartItemPosition","getMarkerInfo","color","getItemColor","getMarkerType","renderGridLinesInFront","getNavUtil","startIndex","endIndex","getLineAreaChartNavUtil","getGapRatio","getStartAndEndAxesOffset","groupCount","defaultOverviewContentRenderer","OverviewLineAreaChart","children","getItemAriaLabel","groupsInfo","xStartIndex","xEndIndex","activeId","focusedItemInfo","hoveredItemInfo","isPointInsideMarquee","defaultFontSize","getTextDimensions","plotAreaClipPathId","axisStepWidth","leafGroups","map","item","_jsxs","jsxs","_Fragment","Fragment","lineAreaSeries","index","seriesItem","lineSegmentCoords","getLineAreaSegments","isBottomSegmentCurved","isHighlighted","has","id","prevCoords","prevValue","newValue","j","AreaSeries","areaColor","isHorizontal","areaColorOpacity","bottomCoords","some","lineSegments","groupWidth","LineSeries","lineColor","colorSchemeVars","dvt","contrastLine","lineWidth","lineStyle","MarkersWithLabel","markerType","focusedItemIndex","isFocusVisible","isDataCursorEnabled","dataCursorStyle","isMarkerDisplayed","hoveredItemIndex","isCurrent","isSelectionEnabled","isDrillEnabled","jsx","datatip","content","zoomAndScroll","plotArea","yMajorTick","isRendered","tickLabel","autoRotate"],"mappings":"mWA6BA,MAUaA,EAAgBC,EAAUA,YACrC,EAEIC,QACAC,SACAC,cAAc,GACdC,YAAY,GACZC,iBACAC,sBAAsB,OACtBC,cAAc,WACdC,QACAC,SACAC,SACAC,SACAC,aAAY,EACZC,cACAC,gBAAgB,OAChBC,WAAW,MACXC,OAAO,OACPC,WAAW,MACXC,kBAAkB,aACfC,GAELC,KAEA,MAAMC,UAAEA,EAASC,aAAEA,GAAiBC,EAAOA,UACrCC,EAAkC,WAAjBF,EACjBG,OAA6BC,IAAjBP,EAAMQ,OAClBC,EAAsB,QAAdP,EACRQ,EAAyB,QAAjBrB,GAAOsB,MACfC,EAAgBZ,EAAMa,OAAyBD,aAC/CE,EAAY,IAAIC,IAAI9B,GACpB+B,EAAc,IAAID,IAAI/B,GACtBiC,EAAiB,IAAIF,IAAI7B,GACzBgC,EAA0B,eAAhB9B,EACV+B,EAASC,EAAAA,eACf,IAAIC,EAAiB5B,EACjB6B,EAAmBA,oBAAC/B,EAAOgC,OAAQ/B,EAAO+B,OAAQ7B,EAAaoB,EAAWJ,GAC1Ec,gBAAcjC,GAAQgC,OAAQ/B,GAAQ+B,OAAQ7B,EAAaoB,EAAWJ,GAE1E,MAAMe,EAAsB,CAACC,EAAqBC,IAC3ClC,EACE,IACFC,EAAYgC,EAAaC,GAC5BC,MAAOP,EAAeK,GAAaC,IAHdjC,EAAYgC,EAAaC,IA6E5CE,kBAAEA,EAAiBC,oBAAEA,GAAwBvC,EAAOwC,QACxD,CAACC,EAAKC,KACG,CACLJ,kBACEG,EAAIH,mBACW,sBAAfI,EAAEC,UACa,oBAAfD,EAAEC,SACJJ,oBACEE,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UAAWA,EACXyE,kBAAmBA,EACnBT,iBAAkBA,EAClB7D,MAAOA,SAEPF,CAAS,MAGjB,GAGN,IAIN,SAAS6D,EACPpE,GAEA,OACEyC,EAACuF,IAAApJ,EACC,CAAAqJ,QAAS,KAAO,CAAEC,QAAS,KAC3BC,cAAc,MACdrI,SAAS,MACTsI,SAAU,CACRC,WAAY,CACVC,YAAY,IAGhBzH,MAAO,CACL0H,UAAW,CACTC,YAAY,EAEZF,aAAYtI,EAAMa,OAAOD,eAG7BrB,OAAQS,EAAMT,OACdC,OAAQQ,EAAMR,OACdE,YAAaM,EAAMN,YACnBL,MAAO,CACLkJ,UAAW,CACTD,YAAY,IAGhBzI,KAAMG,EAAMH,MAGlB"}
1
+ {"version":3,"file":"LineAreaChart-39766a4b.js","sources":["../../src/UNSAFE_LineAreaChart/LineAreaChart.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 { LineAreaChartProps, LineAreaItem } from './lineAreaChart.types';\nimport {\n findNearestDataPoint,\n getStartAndEndAxesOffset\n} from '#utils/PRIVATE_chartUtils/layoutUtils';\nimport { AreaSeries } from '#PRIVATE_LineAreaComponents/AreaSeries';\nimport { getCumulativeSeries, getMarkers, getSeriesData } from '#utils/PRIVATE_chartUtils/utils';\nimport { MarkersWithLabel } from '#PRIVATE_Chart/MarkersWithLabel';\nimport { getLineAreaChartNavUtil } from '#utils/PRIVATE_chartUtils/navUtils';\nimport { Chart } from '#PRIVATE_Chart';\nimport { Scale, TimeAxisProps, SizeHandle } from '#utils/UNSAFE_visTypes/chart';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { getColorRamp } from '#utils/UNSAFE_visUtils';\nimport { LineSeries } from '#PRIVATE_LineAreaComponents/LineSeries';\nimport { Point } from '#utils/PRIVATE_visSVGUtils';\nimport { getLineAreaSegments } from '#utils/PRIVATE_chartUtils/utils';\nimport { colorSchemeVars } from '@oracle/oraclejet-internal-theme-contract/themeContract.css';\nimport { getItemColor, getMarkerType } from '#utils/PRIVATE_chartUtils/dataStyleUtils';\nimport { getLineAreaChartItemPosition } from '#PRIVATE_LineAreaComponents/utils/chartUtils';\nimport { forwardRef, Ref } from 'preact/compat';\nimport { VNode } from 'preact';\n\nconst LINE_WITH_AREA_OPACITY = 0.2;\nexport type ForwardRefLineAreaChart = <K extends string | number, D extends LineAreaItem<K>>(\n props: LineAreaChartProps<K, D> & {\n ref?: Ref<SizeHandle>;\n }\n) => VNode | null;\n\n/**\n * The LineAreaChart displays information graphically using lines and filled areas, making relationships among the data easier to understand.\n */\nexport const LineAreaChart = forwardRef(\n <K extends string | number, D extends LineAreaItem<K>>(\n {\n width,\n height,\n selectedIds = [],\n hiddenIds = [],\n highlightedIds,\n hideAndShowBehavior = 'none',\n orientation = 'vertical',\n yAxis,\n y2Axis,\n series,\n groups,\n isStacked = false,\n getDataItem,\n selectionMode = 'none',\n drilling = 'off',\n type = 'line',\n overview = 'off',\n dataLabelEffect = 'outline',\n ...props\n }: LineAreaChartProps<K, D>,\n ref: Ref<SizeHandle>\n ) => {\n const { direction, forcedColors } = useUser();\n const isHighContrast = forcedColors === 'active';\n const isTestEnv = props.testId !== undefined;\n const isRtl = direction === 'rtl';\n const isLog = yAxis?.scale === 'log';\n const timeAxisType = (props.xAxis as TimeAxisProps)?.timeAxisType;\n const hiddenSet = new Set(hiddenIds);\n const selectedSet = new Set(selectedIds);\n const highlightedSet = new Set(highlightedIds);\n const isHoriz = orientation === 'horizontal';\n const colors = getColorRamp();\n let renderedSeries = isStacked\n ? getCumulativeSeries(series.length, groups.length, getDataItem, hiddenSet, isLog)\n : getSeriesData(series?.length, groups?.length, getDataItem, hiddenSet, isLog);\n\n const renderedGetDataItem = (seriesIndex: number, groupIndex: number): D | undefined => {\n if (!isStacked) return getDataItem(seriesIndex, groupIndex);\n return {\n ...getDataItem(seriesIndex, groupIndex),\n value: renderedSeries[seriesIndex][groupIndex]\n } as D;\n };\n\n const getGapRatio = () => {\n return 1;\n };\n\n const getNextChartItemFunc = (startIndex: number, endIndex: number) => {\n // TODO: JET-71332\n //@ts-ignore\n return getLineAreaChartNavUtil<D>(\n getDataItem,\n series.length,\n startIndex,\n endIndex,\n isStacked,\n isRtl,\n isHoriz\n );\n };\n\n const getDataItemPos = (xScale: Scale, yScale: Scale, y2Scale: Scale) => {\n return (seriesIndex: number, groupIndex: number) => {\n const isAssociatedToY2 = series[seriesIndex].associatedYAxis === 'y2';\n return getLineAreaChartItemPosition(\n seriesIndex,\n groupIndex,\n renderedSeries,\n getDataItem,\n groups,\n isHoriz,\n xScale,\n isAssociatedToY2 ? y2Scale : yScale,\n timeAxisType\n );\n };\n };\n\n const getMarkerColorAndType = (seriesIndex: number, groupIndex: number) => {\n return {\n color: getItemColor(seriesIndex, groupIndex, series, getDataItem),\n type: getMarkerType(seriesIndex, groupIndex, getDataItem)\n };\n };\n\n const findNearest = (xScale: Scale, yScale: Scale, y2Scale: Scale) => {\n const getSeriesDataInfo = () => {\n return {\n offset: 0,\n dataWidth: 0\n };\n };\n\n const getYCoord = (value: number, yScale: Scale) => {\n return yScale.transform(value);\n };\n\n return findNearestDataPoint<K, D>(\n series,\n groups,\n xScale,\n yScale,\n renderedGetDataItem,\n isStacked,\n getSeriesDataInfo,\n getYCoord,\n isLog,\n 0,\n hiddenSet,\n timeAxisType,\n y2Scale\n );\n };\n const { hasCenteredSeries, hasUncenteredSeries } = series.reduce(\n (acc, s) => {\n return {\n hasCenteredSeries:\n acc.hasCenteredSeries ||\n s.lineType === 'centeredSegmented' ||\n s.lineType === 'centeredStepped',\n hasUncenteredSeries:\n acc.hasUncenteredSeries || s.lineType === 'segmented' || s.lineType === 'stepped'\n };\n },\n { hasCenteredSeries: false, hasUncenteredSeries: false }\n );\n\n const getOffset = (groupCount: number) => {\n return getStartAndEndAxesOffset(hasCenteredSeries, hasUncenteredSeries, isHoriz, groupCount);\n };\n\n const markers = getMarkers();\n const areaOpacity = type === 'lineWithArea' ? LINE_WITH_AREA_OPACITY : 1;\n const isAreaRendered = type === 'area' || type === 'lineWithArea';\n const isContrastLineNeeded = type === 'area';\n const allLineSegmentCoords: Point[][] = [];\n\n return (\n <Chart\n ref={ref}\n width={width}\n height={height}\n selectedIds={selectedSet}\n hiddenIds={hiddenIds}\n hideAndShowBehavior={hideAndShowBehavior}\n orientation={orientation}\n yAxis={yAxis}\n y2Axis={y2Axis}\n series={series}\n groups={groups}\n selectionMode={selectionMode}\n drilling={drilling}\n isStacked={isStacked}\n getDataItem={getDataItem}\n findNearest={findNearest}\n getDataItemPos={getDataItemPos}\n getMarkerInfo={getMarkerColorAndType}\n renderGridLinesInFront={isAreaRendered}\n getNavUtil={getNextChartItemFunc}\n getGapRatio={getGapRatio}\n getStartAndEndAxesOffset={getOffset}\n isRtl={isRtl}\n overview={overview}\n defaultOverviewContentRenderer={() => {\n return (\n <OverviewLineAreaChart\n series={series}\n groups={groups}\n getDataItem={getDataItem}\n type={type}\n />\n );\n }}\n {...props}>\n {({\n getItemAriaLabel,\n groupsInfo,\n xStartIndex,\n xEndIndex,\n xScale,\n yScale,\n y2Scale,\n activeId,\n focusedItemInfo,\n hoveredItemInfo,\n isPointInsideMarquee,\n defaultFontSize,\n getTextDimensions,\n plotAreaClipPathId,\n axisStepWidth\n }) => {\n const leafGroups = groupsInfo.map(({ item }) => item);\n renderedSeries = isStacked\n ? getCumulativeSeries(series.length, leafGroups.length, getDataItem, hiddenSet, isLog)\n : getSeriesData(series?.length, leafGroups?.length, getDataItem, hiddenSet, isLog);\n return (\n <>\n {renderedSeries.map((lineAreaSeries, index) => {\n if (lineAreaSeries.length === 0) {\n /* TODO: need a better way to handle when a series is hidden. */\n return;\n }\n const seriesItem = series[index];\n const isAssociatedToY2 = seriesItem.associatedYAxis === 'y2';\n const lineSegmentCoords: Point[][] = getLineAreaSegments<K, D>(\n isAssociatedToY2 ? y2Scale : yScale,\n xScale,\n lineAreaSeries,\n xStartIndex,\n xEndIndex,\n isLog,\n leafGroups,\n index,\n renderedGetDataItem,\n timeAxisType\n );\n allLineSegmentCoords[index] = lineSegmentCoords[0];\n const isBottomSegmentCurved =\n seriesItem.lineType === 'curved' &&\n isStacked &&\n renderedSeries.length > 1 &&\n index > 0;\n\n const isHighlighted =\n highlightedIds === undefined ||\n highlightedIds.length === 0 ||\n highlightedSet.has(seriesItem.id);\n\n const prevCoords =\n isStacked && index != 0\n ? allLineSegmentCoords.reduce((prevValue, newValue, j) => {\n // find the index i such that i < index, and series i has at least\n // one or more data item unhidden. Only such series will can be\n // used as bottomCoord for current series. Otherwise we have to use\n // baseline coord\n if (j >= index) {\n return prevValue;\n }\n if (newValue.length > 0) {\n return j;\n }\n return prevValue;\n }, 0)\n : undefined;\n\n return (\n <>\n {isAreaRendered && (\n <AreaSeries\n yScale={isAssociatedToY2 ? y2Scale : yScale}\n lineType={seriesItem.lineType}\n color={seriesItem.areaColor || colors[index % colors.length]}\n isHorizontal={isHoriz}\n areaColorOpacity={areaOpacity}\n isBottomSegmentCurved={isBottomSegmentCurved}\n bottomCoords={\n prevCoords !== undefined &&\n allLineSegmentCoords[prevCoords].some((value) => value != null)\n ? allLineSegmentCoords[prevCoords]\n : undefined\n }\n lineSegments={lineSegmentCoords}\n isLog={isLog}\n isHighlighted={isHighlighted}\n seriesIndex={index}\n groupWidth={axisStepWidth}\n isRtl={isRtl}\n timeAxisType={timeAxisType}\n plotAreaClipPathId={plotAreaClipPathId}\n />\n )}\n <LineSeries\n lineType={seriesItem.lineType}\n /* TODO: confirm with UX if this is contrastLine (changes depending on dark/light mode) or always white. \n It's always white in legacy.*/\n lineColor={\n isContrastLineNeeded\n ? colorSchemeVars.dvt.contrastLine\n : seriesItem.lineColor\n }\n /* The area generated in legacy are bit apart and not touching when stacked. Preact areas are a bit closer than legacy when curved. \n Increased the contrast linewidth (to 2.5 from legacy 1.25) to give legacy visual treatment.\n TODO: investivage why legacy areas are not touching. maybe we want to do the same in preact svg utils that\n generates this curve.\n */\n lineWidth={\n isContrastLineNeeded ? (isStacked ? 2.5 : 1.25) : seriesItem.lineWidth\n }\n lineStyle={seriesItem.lineStyle}\n color={seriesItem.lineColor || colors[index % colors.length]}\n lineSegmentCoords={lineSegmentCoords}\n isHorizontal={isHoriz}\n isHighlighted={isHighlighted}\n seriesIndex={index}\n groupWidth={axisStepWidth}\n isRtl={isRtl}\n timeAxisType={timeAxisType}\n plotAreaClipPathId={plotAreaClipPathId}\n />\n {\n /* For non stacked charts, markers should render in the order of series. Some markers might get hidden behind area but this preserves the legacy behavior.\n JET-75357: Segmented and stepped lines may stack markers/lines incorrectly by series order, so excluded from non-stacked charts.\n */\n !isStacked &&\n seriesItem.lineType !== 'stepped' &&\n seriesItem.lineType !== 'segmented' && (\n <MarkersWithLabel\n yScale={isAssociatedToY2 ? y2Scale : yScale}\n xScale={xScale}\n groups={leafGroups}\n series={seriesItem}\n timeAxisType={timeAxisType}\n color={\n seriesItem.lineColor ||\n seriesItem.areaColor ||\n colors[\n index % colors.length\n ] /* TODO : make this use getItemColor function from dataStyleUtils. */\n }\n seriesIndex={index}\n startIndex={xStartIndex}\n endIndex={xEndIndex}\n markerType={markers[index % markers.length]}\n orientation={orientation}\n isLog={isLog}\n activeId={activeId}\n getDataItem={getDataItem}\n isPointInsideMarquee={isPointInsideMarquee}\n selectedIds={selectedSet}\n highlightedIds={\n highlightedIds !== undefined ? highlightedSet : undefined\n }\n focusedItemIndex={\n focusedItemInfo.seriesIndex === index &&\n focusedItemInfo.isFocusVisible &&\n !(\n props.isDataCursorEnabled &&\n props.dataCursorStyle?.isMarkerDisplayed\n )\n ? focusedItemInfo.groupIndex\n : undefined\n }\n hoveredItemIndex={\n hoveredItemInfo?.isCurrent && hoveredItemInfo.seriesIndex === index\n ? hoveredItemInfo.groupIndex\n : undefined\n }\n isSelectionEnabled={\n selectionMode === 'single' || selectionMode === 'multiple'\n }\n isDrillEnabled={drilling === 'on'}\n defaultFontSize={defaultFontSize}\n dataLabelEffect={dataLabelEffect}\n isHighContrast={isHighContrast}\n isTestEnv={isTestEnv}\n getTextDimensions={getTextDimensions}\n getItemAriaLabel={getItemAriaLabel}\n isRtl={isRtl}\n />\n )\n }\n </>\n );\n })}\n {renderedSeries.map((lineAreaSeries, index) => {\n if (lineAreaSeries.length === 0) {\n /* TODO: need a better way to handle when a series is hidden.*/\n return;\n }\n const seriesItem = series[index];\n const isAssociatedToY2 = seriesItem.associatedYAxis === 'y2';\n return isStacked ||\n seriesItem.lineType === 'segmented' ||\n seriesItem.lineType === 'stepped' ? (\n <MarkersWithLabel\n yScale={isAssociatedToY2 ? y2Scale : yScale}\n series={series[index]}\n xScale={xScale}\n groups={leafGroups}\n timeAxisType={timeAxisType}\n color={\n seriesItem.lineColor || seriesItem.areaColor || colors[index % colors.length]\n }\n seriesIndex={index}\n isPointInsideMarquee={isPointInsideMarquee}\n startIndex={xStartIndex}\n endIndex={xEndIndex}\n markerType={markers[index % markers.length]}\n orientation={orientation}\n isLog={isLog}\n activeId={activeId}\n getDataItem={renderedGetDataItem}\n selectedIds={selectedSet}\n focusedItemIndex={\n focusedItemInfo.seriesIndex === index && focusedItemInfo.isFocusVisible\n ? focusedItemInfo.groupIndex\n : undefined\n }\n hoveredItemIndex={\n hoveredItemInfo?.isCurrent && hoveredItemInfo.seriesIndex === index\n ? hoveredItemInfo.groupIndex\n : undefined\n }\n isSelectionEnabled={selectionMode === 'single' || selectionMode === 'multiple'}\n isDrillEnabled={drilling === 'on'}\n defaultFontSize={defaultFontSize}\n dataLabelEffect={dataLabelEffect}\n isHighContrast={isHighContrast}\n isTestEnv={isTestEnv}\n getTextDimensions={getTextDimensions}\n getItemAriaLabel={getItemAriaLabel}\n isRtl={isRtl}\n />\n ) : undefined;\n })}\n </>\n );\n }}\n </Chart>\n );\n }\n) as ForwardRefLineAreaChart;\n\nfunction OverviewLineAreaChart<K extends string | number, D extends LineAreaItem<K>>(\n props: LineAreaChartProps<K, D>\n) {\n return (\n <LineAreaChart\n datatip={() => ({ content: '' })}\n zoomAndScroll=\"off\"\n overview=\"off\"\n plotArea={{\n yMajorTick: {\n isRendered: false\n }\n }}\n xAxis={{\n tickLabel: {\n autoRotate: false,\n // @ts-ignore\n isRendered: props.xAxis?.timeAxisType ? true : false\n }\n }}\n series={props.series}\n groups={props.groups}\n getDataItem={props.getDataItem}\n yAxis={{\n tickLabel: {\n isRendered: false\n }\n }}\n type={props.type}\n />\n );\n}\n"],"names":["LineAreaChart","forwardRef","width","height","selectedIds","hiddenIds","highlightedIds","hideAndShowBehavior","orientation","yAxis","y2Axis","series","groups","isStacked","getDataItem","selectionMode","drilling","type","overview","dataLabelEffect","props","ref","direction","forcedColors","useUser","isHighContrast","isTestEnv","undefined","testId","isRtl","isLog","scale","timeAxisType","xAxis","hiddenSet","Set","selectedSet","highlightedSet","isHoriz","colors","getColorRamp","renderedSeries","getCumulativeSeries","length","getSeriesData","renderedGetDataItem","seriesIndex","groupIndex","value","hasCenteredSeries","hasUncenteredSeries","reduce","acc","s","lineType","markers","getMarkers","areaOpacity","isAreaRendered","isContrastLineNeeded","allLineSegmentCoords","_jsx","Chart","findNearest","xScale","yScale","y2Scale","findNearestDataPoint","offset","dataWidth","transform","getDataItemPos","isAssociatedToY2","associatedYAxis","getLineAreaChartItemPosition","getMarkerInfo","color","getItemColor","getMarkerType","renderGridLinesInFront","getNavUtil","startIndex","endIndex","getLineAreaChartNavUtil","getGapRatio","getStartAndEndAxesOffset","groupCount","defaultOverviewContentRenderer","OverviewLineAreaChart","children","getItemAriaLabel","groupsInfo","xStartIndex","xEndIndex","activeId","focusedItemInfo","hoveredItemInfo","isPointInsideMarquee","defaultFontSize","getTextDimensions","plotAreaClipPathId","axisStepWidth","leafGroups","map","item","_jsxs","jsxs","_Fragment","Fragment","lineAreaSeries","index","seriesItem","lineSegmentCoords","getLineAreaSegments","isBottomSegmentCurved","isHighlighted","has","id","prevCoords","prevValue","newValue","j","AreaSeries","areaColor","isHorizontal","areaColorOpacity","bottomCoords","some","lineSegments","groupWidth","LineSeries","lineColor","colorSchemeVars","dvt","contrastLine","lineWidth","lineStyle","MarkersWithLabel","markerType","focusedItemIndex","isFocusVisible","isDataCursorEnabled","dataCursorStyle","isMarkerDisplayed","hoveredItemIndex","isCurrent","isSelectionEnabled","isDrillEnabled","jsx","datatip","content","zoomAndScroll","plotArea","yMajorTick","isRendered","tickLabel","autoRotate"],"mappings":"mWA6BA,MAUaA,EAAgBC,EAAUA,YACrC,EAEIC,QACAC,SACAC,cAAc,GACdC,YAAY,GACZC,iBACAC,sBAAsB,OACtBC,cAAc,WACdC,QACAC,SACAC,SACAC,SACAC,aAAY,EACZC,cACAC,gBAAgB,OAChBC,WAAW,MACXC,OAAO,OACPC,WAAW,MACXC,kBAAkB,aACfC,GAELC,KAEA,MAAMC,UAAEA,EAASC,aAAEA,GAAiBC,EAAOA,UACrCC,EAAkC,WAAjBF,EACjBG,OAA6BC,IAAjBP,EAAMQ,OAClBC,EAAsB,QAAdP,EACRQ,EAAyB,QAAjBrB,GAAOsB,MACfC,EAAgBZ,EAAMa,OAAyBD,aAC/CE,EAAY,IAAIC,IAAI9B,GACpB+B,EAAc,IAAID,IAAI/B,GACtBiC,EAAiB,IAAIF,IAAI7B,GACzBgC,EAA0B,eAAhB9B,EACV+B,EAASC,EAAAA,eACf,IAAIC,EAAiB5B,EACjB6B,EAAmBA,oBAAC/B,EAAOgC,OAAQ/B,EAAO+B,OAAQ7B,EAAaoB,EAAWJ,GAC1Ec,gBAAcjC,GAAQgC,OAAQ/B,GAAQ+B,OAAQ7B,EAAaoB,EAAWJ,GAE1E,MAAMe,EAAsB,CAACC,EAAqBC,IAC3ClC,EACE,IACFC,EAAYgC,EAAaC,GAC5BC,MAAOP,EAAeK,GAAaC,IAHdjC,EAAYgC,EAAaC,IA6E5CE,kBAAEA,EAAiBC,oBAAEA,GAAwBvC,EAAOwC,QACxD,CAACC,E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AlBA,EAClDoI,eAA6B,OAAbnI,EAChBkF,gBAAiBA,EACjB/E,gBAAiBA,EACjBM,eAAgBA,EAChBC,UAAWA,EACXyE,kBAAmBA,EACnBT,iBAAkBA,EAClB7D,MAAOA,SAEPF,CAAS,MAGjB,GAGN,IAIN,SAAS6D,EACPpE,GAEA,OACEyC,EAACuF,IAAApJ,EACC,CAAAqJ,QAAS,KAAO,CAAEC,QAAS,KAC3BC,cAAc,MACdrI,SAAS,MACTsI,SAAU,CACRC,WAAY,CACVC,YAAY,IAGhBzH,MAAO,CACL0H,UAAW,CACTC,YAAY,EAEZF,aAAYtI,EAAMa,OAAOD,eAG7BrB,OAAQS,EAAMT,OACdC,OAAQQ,EAAMR,OACdE,YAAaM,EAAMN,YACnBL,MAAO,CACLkJ,UAAW,CACTD,YAAY,IAGhBzI,KAAMG,EAAMH,MAGlB"}
@@ -0,0 +1,2 @@
1
+ define(['exports', 'preact/jsx-runtime', 'preact/hooks', './mergeProps-bcfa6a92', './classNames-08d99695', './clientUtils-f1eea2db', './useId-c9578d26', './UNSAFE_NavigationList/themes/NavigationListStyles.css', './collectionUtils-89bc31e1', './useCollectionFocusRing-39368fdd', './useCurrentKey-5749e7fb', './useContextMenuGesture-750ef2c6', './useTranslationBundle-e4dd341e', './TabBarContextMenu-8ddc9b2d', 'preact/compat', './useTestId-f4240cbd', './HiddenAccessible-037ef42d', './LiveRegion-dbefb95b', './NavigationListLinkItem-82fd633c'], (function(e,t,n,o,r,i,s,a,c,l,u,d,f,m,y,b,g,v,x){"use strict";const C='[role="tab"]',h="[data-oj-navigationlist-item-remove-icon]",K={mouse:{initialFocus:"menu",placement:"bottom-start",offsetValue:0},keyboard:{initialFocus:"firstItem",placement:"bottom-start",offsetValue:0},touch:{initialFocus:"menu",placement:"end",offsetValue:40}},p={isOpen:!1,initialFocus:"menu",placement:"bottom-start",offsetValue:0,anchorRef:{current:null}};const R=(e,t,n)=>{const o=c.findElementByKey(t,e,C);if(o){return o.querySelector(n)}},I=(e,t)=>{const n=c.findElementByKey(t,e,C);if(n)return n.innerText},M=(e,t,n)=>{const o=e.closest(t),r=e.closest(n);return o?.contains(r)?null:c.keyExtractor(e,t)},k=(e,t,n)=>{const o=n.indexOf(e);if(o>0){const e=n[o===n.length-1?o-1:o+1];if(-1!==t.indexOf(e))return e}return t[0]},S=y.forwardRef((({children:e,selection:S,edge:F="start",onSelectionChange:L,onRemove:N,"aria-label":w,"aria-labelledby":j,testId:D,display:E="standard"},A)=>{const P=n.useRef(null),B=i.isMobile(),H=n.useMemo((()=>B?{itemsRenderer:e=>{if(e){if(null!=R(e.itemKey,P.current,h)){const n=e.defaultMenuItems;return t.jsx(t.Fragment,{children:n})}}return null}}:void 0),[B]),{showFocusRing:V,currentKey:T,onCurrentKeyChange:O,containerHandlers:U,onKeyDown:_,contextMenuContext:q,menuProps:G,contextMenuDescription:$,contextMenuDescriptionId:z,accStatusInfo:J}=function({containerRef:e,selection:t,onRemove:r,onSelectionChange:i,children:s,contextMenuConfig:a}){const y=f.useTranslationBundle("@oracle/oraclejet-preact"),[b,g]=n.useState(t),v=n.useCallback((e=>{g(e.value)}),[]),{currentKeyProps:x}=u.useCurrentKey((e=>r?M(e,C,h):c.keyExtractor(e,C)),!1,!1,c.getPrevNextKeyUsingRef(e,b,!0,C),c.getPrevNextKeyUsingRef(e,b,!1,C),void 0,void 0,b,v),[S,F]=l.useCollectionFocusRing(e,["Home","End","ArrowUp","ArrowDown"]),L={onFocus:n.useCallback((()=>{if(e.current&&void 0===b){const t=c.getFirstVisibleKey(e.current,C);t&&g(t)}}),[b,e])},N=n.useRef();n.useEffect((()=>{if(e.current){const t=Array.from(e.current.querySelectorAll(C),(e=>c.getKey(e)));if(null!=b&&-1!==t.indexOf(b)){const t=c.findElementByKey(e.current,b,C);t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView({block:"nearest"})}else b&&-1===t.indexOf(b)&&(N.current?g(k(b,t,N.current)):g(t[0])),N.current=t}}),[s,b,e]);const w=n.useCallback((t=>{if(("Home"===t.key||"End"===t.key)&&e.current&&b){const n=Array.from(e.current.querySelectorAll(C),(e=>c.getKey(e)));v?.({value:n["Home"===t.key?0:n.length-1]})}!b||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),i?.({value:b,reason:"keyboard"})),b&&"Delete"===t.key&&r?.({value:b})}),[b,i,r,v,e]),[j,D]=n.useState(),[E,A]=n.useState(p),[P,B]=n.useState(),{triggerProps:H}=d.useContextMenuGesture((({gesture:t,anchor:n,target:o})=>{let i=n,s=b;if("keyboard"===t){i=c.findElementByKey(e.current,b,C)||n}else{const e=c.keyExtractor(o,C);s=null!=e?e:b}let l=!1;e.current&&(l=null!=R(s,e.current,h));const u=m.getDefaultContextMenu({isRemovable:l,handleRemove:r,handleReorder:void 0,itemKey:s,tabKeys:void 0,direction:void 0,itemLabels:{labelRemove:l?y.tabbar_labelRemove():void 0},handleAccStatus:t=>{const n=I(t.removedKey,e.current),o=l&&t.removedKey?` Removed ${n}`:"";B(o)}});D(u),A({...K[t],anchorRef:{current:i},isOpen:null!=a})}),{isDisabled:!a}),V=n.useCallback((t=>{"dismissed"!==t.reason&&"itemAction"!==t.reason||(g(j?.itemKey),e.current?.focus()),A({...p})}),[e,j?.itemKey]),T="contextMenu_"+n.useId(),O=y.tabbar_labelContextMenu();return{showFocusRing:S,currentKey:b,onCurrentKeyChange:v,onKeyDown:w,menuProps:{...E,onClose:V},contextMenuContext:j,contextMenuDescription:O,contextMenuDescriptionId:T,accStatusInfo:P,containerHandlers:o.mergeProps(F,x,L,H)}}({containerRef:P,selection:S,onRemove:N,onSelectionChange:L,children:e,contextMenuConfig:H}),Q={onKeyDown:_},W=r.classNames([a.navigationListStyles.uListStyle]),X=s.useId()+"_",Y=b.useTestId(D);return y.useImperativeHandle(A,(()=>({focus:()=>{P.current&&P.current.focus()},blur:()=>{P.current&&P.current.focus()}}))),t.jsxs(t.Fragment,{children:[t.jsx("div",{"aria-label":w,"aria-labelledby":j,role:"tablist",ref:P,"aria-orientation":"vertical",tabIndex:0,"aria-activedescendant":T?X+T:"",...o.mergeProps(Q,U),...Y,class:W,children:t.jsx(x.NavigationListContext.Provider,{value:{selection:S,display:E,onSelectionChange:L,onCurrentKeyChange:O,currentKey:T,showFocusRing:V,navigationListItemPrefix:X,onRemove:N,edge:F},children:e})}),H&&z&&$&&t.jsx("span",{id:z,children:t.jsx(g.HiddenAccessible,{children:$})}),H&&J&&t.jsx(v.LiveRegion,{children:J}),H&&t.jsx(m.TabBarContextMenu,{...G,contextMenuConfig:H,contextMenuContext:q})]})}));e.NavigationList=S,e.NavigationListItem=function({itemKey:e,label:n,badge:o,metadata:r,severity:i,icon:s}){return t.jsx(x.BaseNavigationListItem,{itemKey:e,label:n,badge:o,metadata:r,severity:i,icon:s})}}));
2
+ //# sourceMappingURL=NavigationListItem-672b4363.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationListItem-e59797c5.js","sources":["../../src/UNSAFE_NavigationList/useNavigationList.ts","../../src/UNSAFE_NavigationList/NavigationList.tsx","../../src/UNSAFE_NavigationList/NavigationListItem.tsx"],"sourcesContent":["import { ComponentChildren, ComponentProps } from 'preact';\nimport { useState, useCallback, MutableRef, useRef, useEffect, useId } from 'preact/hooks';\nimport {\n keyExtractor,\n getFirstVisibleKey,\n getKey,\n getPrevNextKeyUsingRef,\n findElementByKey\n} from '../utils/PRIVATE_collectionUtils';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { useCollectionFocusRing } from '../hooks/PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../hooks/PRIVATE_useCurrentKey';\nimport { MenuProps } from '../hooks/PRIVATE_useVisContextMenu/util';\nimport { useContextMenuGesture } from '../hooks/UNSAFE_useContextMenuGesture';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { Menu } from '../UNSAFE_Menu';\nimport { getDefaultContextMenu } from '../UNSAFE_TabBar/TabBarContextMenu';\nimport { TabBarContextMenuConfig, TabBarItemContextMenuContext } from '../UNSAFE_TabBarCommon';\nimport { NavigationListContextProps } from '../UNSAFE_NavigationListCommon';\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nexport const REMOVE_ICON_SELECTOR = '[data-oj-navigationlist-item-remove-icon]';\nconst TOUCH_OFFSET_VALUE = 40;\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\n/**\n * type for payload of current key change event handler\n */\ntype CurrentKeyDetail<K> = {\n value: K;\n};\n/**\n * type for payload of selection change event handler\n */\ntype SelectionDetail<K> = {\n value: K;\n reason: 'pointer' | 'keyboard';\n};\n/**\n * type for payload of remove event handler\n */\ntype RemoveDetail<K> = {\n value: K;\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\n/*TODO: JET-58534. Create a hook to share some logic between navlist and tabbar. Hook will be used inside this one. */\nexport function useNavigationList<K extends string | number>({\n containerRef,\n selection,\n onRemove,\n onSelectionChange,\n children,\n contextMenuConfig\n}: {\n containerRef: MutableRef<HTMLDivElement>;\n selection?: K;\n onRemove?: <K extends string | number>(detail: RemoveDetail<K>) => void;\n onSelectionChange?: <K extends string | number>(detail: SelectionDetail<K>) => void;\n children: ComponentChildren;\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n}) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection);\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K | undefined>) => {\n setCurrentKey(detail.value);\n }, []) as NavigationListContextProps<K>['onCurrentKeyChange'];\n\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? (extractOnlyItemKey(element, ITEM_SELECTOR, REMOVE_ICON_SELECTOR) as K)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n false,\n getPrevNextKeyUsingRef(containerRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(containerRef, currentKey, false, ITEM_SELECTOR),\n undefined,\n undefined,\n currentKey,\n onCurrentKeyChange\n );\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(containerRef, [\n 'Home',\n 'End',\n 'ArrowUp',\n 'ArrowDown'\n ]);\n\n const onFocus = useCallback(() => {\n if (containerRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(containerRef.current, ITEM_SELECTOR);\n if (key) {\n setCurrentKey(key as K);\n }\n }\n }, [currentKey, containerRef]);\n\n const onFocusProps = { onFocus };\n const prevNavItems = useRef<K[]>();\n\n useEffect(() => {\n if (containerRef.current) {\n const navListItemKeys = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n if (currentKey != null && navListItemKeys.indexOf(currentKey) !== -1) {\n const navListItem = findElementByKey(\n containerRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as any;\n if (navListItem.scrollIntoViewIfNeeded) {\n // for some browsers, we'll need the non-standard scrollIntoViewIfNeeded\n navListItem.scrollIntoViewIfNeeded();\n } else {\n navListItem.scrollIntoView({ block: 'nearest' });\n }\n } else {\n if (currentKey && navListItemKeys.indexOf(currentKey) === -1) {\n prevNavItems.current\n ? setCurrentKey(findNextCurrentKey(currentKey, navListItemKeys, prevNavItems.current))\n : setCurrentKey(navListItemKeys[0] as K);\n }\n prevNavItems.current = navListItemKeys;\n }\n }\n }, [children, currentKey, containerRef]);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if ((event.key === 'Home' || event.key === 'End') && containerRef.current && currentKey) {\n const navListItemKey = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n onCurrentKeyChange?.({\n value: navListItemKey[event.key === 'Home' ? 0 : navListItemKey.length - 1] as K\n });\n }\n if (currentKey && (event.key === 'Enter' || event.key === ' ')) {\n // Prevent default to avoid page scrolling on Space (and native actions on Enter)\n event.preventDefault();\n onSelectionChange?.({\n value: currentKey as K,\n reason: 'keyboard'\n });\n }\n if (currentKey && event.key === 'Delete') {\n onRemove?.({ value: currentKey as K });\n }\n },\n [currentKey, onSelectionChange, onRemove, onCurrentKeyChange, containerRef]\n );\n\n const [contextMenuContext, setContextMenuContext] = useState<TabBarItemContextMenuContext<K>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n const [accStatusInfo, setAccStatusInfo] = useState<string>();\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n let itemKey = currentKey as K;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n containerRef.current as HTMLElement,\n currentKey as K,\n ITEM_SELECTOR\n );\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n //On touch devices, the keyExtractor returns null because target of touch event is the entire tabbar. Hence we make use of currentkey since the context menu is always launched from selected item and its key is currentKey\n itemKey = key != null ? (key as K) : (currentKey as K);\n }\n let isRemovable = false;\n if (containerRef.current) {\n isRemovable = getItemAttribute(itemKey, containerRef.current, REMOVE_ICON_SELECTOR) != null;\n }\n const defaultContext = getDefaultContextMenu<K>({\n // For default menu items the existence of REMOVE_ICON_SELECTOR is the indicator that it is removable because we render the default menu in touch devices not the application.\n // Furthermore in corepack due to delegations onRemove is always defined as it is a even handler hence not a good check for isRemovable.\n isRemovable: isRemovable,\n handleRemove: onRemove,\n handleReorder: undefined,\n itemKey: itemKey,\n tabKeys: undefined,\n // As direction is only needed for reorder to switch the labels\n direction: undefined,\n itemLabels: {\n labelRemove: isRemovable ? translations.tabbar_labelRemove() : undefined\n },\n handleAccStatus: (detail) => {\n const removeItemLabel = getItemLabel(detail.removedKey!, containerRef.current!) as string;\n const removeStatus =\n isRemovable && detail.removedKey ? ` Removed ${removeItemLabel}` : '';\n\n setAccStatusInfo(removeStatus);\n }\n });\n setContextMenuContext(defaultContext);\n\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n // This is set so that when no contextMenuConfig and when items is not removable we need not open it.\n isOpen: contextMenuConfig != null\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n setCurrentKey(contextMenuContext?.itemKey);\n containerRef.current?.focus();\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [containerRef, contextMenuContext?.itemKey]\n );\n\n const contextMenuDescriptionId = 'contextMenu_' + useId();\n const contextMenuDescription = translations.tabbar_labelContextMenu();\n\n return {\n showFocusRing,\n currentKey,\n onCurrentKeyChange,\n onKeyDown,\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n contextMenuContext,\n contextMenuDescription,\n contextMenuDescriptionId,\n accStatusInfo,\n containerHandlers: mergeProps(focusRingProps, currentKeyProps, onFocusProps, triggerProps)\n };\n}\n// Utility that returns the value for a attribute related to the role=\"tab\" item.\nexport const getItemAttribute = <K extends string | number>(\n itemKey: K,\n root: HTMLElement,\n attribute: string\n) => {\n const navItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (navItem) {\n const tabBarItemAttribute = navItem.querySelector(attribute);\n return tabBarItemAttribute;\n }\n return;\n};\n\n// Utility that returns the visible inner text inside the role=\"tab\" item.\nconst getItemLabel = <K extends string | number>(itemKey: K, root: HTMLElement) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n return tabBarItem.innerText;\n }\n return;\n};\n\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const navigationListItem = element.closest(itemSelector);\n const removeButton = element.closest(itemEliminator);\n return navigationListItem?.contains(removeButton) ? null : keyExtractor(element, itemSelector);\n};\n\nconst findNextCurrentKey = <K>(currentKey: K, currNavs: K[], prevNavs: K[]) => {\n const index = prevNavs.indexOf(currentKey);\n if (index > 0) {\n const nextIndex = index === prevNavs.length - 1 ? index - 1 : index + 1;\n const nextKey = prevNavs[nextIndex];\n if (currNavs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n }\n // update current key to be the first one if we can't find a suitable next key\n return currNavs[0];\n};\n","import { Ref } from 'preact';\nimport { MutableRef, useMemo, useRef } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { isMobile } from '#utils/UNSAFE_clientUtils';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { navigationListStyles } from './themes/NavigationListStyles.css';\nimport { getItemAttribute, REMOVE_ICON_SELECTOR, useNavigationList } from './useNavigationList';\nimport { forwardRef, useImperativeHandle } from 'preact/compat';\nimport { useTestId, TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { NavigationListProps, NavigationListContext } from '../UNSAFE_NavigationListCommon';\nimport { TabBarContextMenu } from '../UNSAFE_TabBar/TabBarContextMenu';\nimport type { TabBarContextMenuConfig as NavigationListContextMenuConfig } from '../UNSAFE_TabBarCommon';\nexport {\n RemovableNavigationListItem,\n NavigationListLinkItem\n} from '../UNSAFE_NavigationListCommon';\n\nexport type FocusableHandle = {\n focus: () => void;\n blur: () => void;\n};\n\nexport const NavigationList = forwardRef(\n <K extends string | number>(\n {\n children,\n selection,\n edge = 'start',\n onSelectionChange,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelLedBy,\n testId,\n display = 'standard'\n }: NavigationListProps<K> & TestIdProps,\n ref?: Ref<FocusableHandle>\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const isMobileDevice = isMobile();\n const defaultContextMenuConfig = useMemo<\n NavigationListContextMenuConfig<string | number> | undefined\n >(() => {\n return isMobileDevice\n ? {\n itemsRenderer: (context) => {\n //Only if context is available, it is a mobile device and it is removable item, we will return remove context menu item\n if (context) {\n const isRemovableItem =\n getItemAttribute(context.itemKey, containerRef.current!, REMOVE_ICON_SELECTOR) !=\n null;\n if (isRemovableItem) {\n const defaultItems = context.defaultMenuItems;\n return <>{defaultItems}</>;\n }\n }\n return null;\n }\n }\n : undefined;\n }, [isMobileDevice]);\n\n const {\n showFocusRing,\n currentKey,\n onCurrentKeyChange,\n containerHandlers,\n onKeyDown,\n contextMenuContext,\n menuProps,\n contextMenuDescription,\n contextMenuDescriptionId,\n accStatusInfo\n } = useNavigationList({\n containerRef: containerRef as MutableRef<HTMLDivElement>,\n selection,\n onRemove,\n onSelectionChange,\n children,\n contextMenuConfig: defaultContextMenuConfig\n });\n\n const eventProps = { onKeyDown };\n const navigationListClass = classNames([navigationListStyles.uListStyle]);\n const navigationListItemPrefix = useId() + '_';\n const testIdProps = useTestId(testId);\n\n //Allows to call focus on rootRef without having to expose it\n useImperativeHandle(ref!, () => ({\n focus: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n },\n blur: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n }\n }));\n\n return (\n <>\n <div\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelLedBy}\n role=\"tablist\"\n ref={containerRef}\n aria-orientation={'vertical'}\n tabIndex={0}\n aria-activedescendant={currentKey ? navigationListItemPrefix + currentKey : ''}\n {...mergeProps(eventProps, containerHandlers)}\n {...testIdProps}\n class={navigationListClass}>\n <NavigationListContext.Provider\n value={{\n selection,\n display,\n onSelectionChange,\n onCurrentKeyChange,\n currentKey,\n showFocusRing,\n navigationListItemPrefix,\n onRemove,\n edge\n }}>\n {children}\n </NavigationListContext.Provider>\n </div>\n {defaultContextMenuConfig && contextMenuDescriptionId && contextMenuDescription && (\n <span id={contextMenuDescriptionId}>\n <HiddenAccessible>{contextMenuDescription}</HiddenAccessible>\n </span>\n )}\n {defaultContextMenuConfig && accStatusInfo && <LiveRegion>{accStatusInfo}</LiveRegion>}\n {defaultContextMenuConfig && (\n <TabBarContextMenu\n {...menuProps}\n contextMenuConfig={defaultContextMenuConfig}\n contextMenuContext={contextMenuContext!}\n />\n )}\n </>\n );\n }\n);\n","import {\n BaseNavigationListItem,\n BaseNavigationListItemProps\n} from '../UNSAFE_NavigationListCommon/BaseNavigationListItem';\n\nexport type NavigationListItemProps<K extends string | number> = Omit<\n BaseNavigationListItemProps<K>,\n 'removeIcon'\n>;\n\nexport function NavigationListItem<K extends string | number>({\n itemKey,\n label,\n badge,\n metadata,\n severity,\n icon\n}: NavigationListItemProps<K>) {\n return (\n <BaseNavigationListItem\n itemKey={itemKey}\n label={label}\n badge={badge}\n metadata={metadata}\n severity={severity}\n icon={icon}\n />\n );\n}\n"],"names":["ITEM_SELECTOR","REMOVE_ICON_SELECTOR","menuPropGestureStates","mouse","initialFocus","placement","offsetValue","keyboard","touch","initialMenuProps","isOpen","anchorRef","current","getItemAttribute","itemKey","root","attribute","navItem","findElementByKey","querySelector","getItemLabel","tabBarItem","innerText","extractOnlyItemKey","element","itemSelector","itemEliminator","navigationListItem","closest","removeButton","contains","keyExtractor","findNextCurrentKey","currentKey","currNavs","prevNavs","index","indexOf","nextKey","length","NavigationList","forwardRef","children","selection","edge","onSelectionChange","onRemove","ariaLabel","ariaLabelLedBy","testId","display","ref","containerRef","useRef","isMobileDevice","isMobile","defaultContextMenuConfig","useMemo","itemsRenderer","context","defaultItems","defaultMenuItems","_jsx","jsx","_Fragment","Fragment","undefined","showFocusRing","onCurrentKeyChange","containerHandlers","onKeyDown","contextMenuContext","menuProps","contextMenuDescription","contextMenuDescriptionId","accStatusInfo","contextMenuConfig","translations","useTranslationBundle","setCurrentKey","useState","useCallback","detail","value","currentKeyProps","useCurrentKey","getPrevNextKeyUsingRef","focusRingProps","useCollectionFocusRing","onFocusProps","onFocus","key","getFirstVisibleKey","prevNavItems","useEffect","navListItemKeys","Array","from","querySelectorAll","elem","getKey","navListItem","scrollIntoViewIfNeeded","scrollIntoView","block","event","navListItemKey","preventDefault","reason","setContextMenuContext","setMenuProps","setAccStatusInfo","triggerProps","useContextMenuGesture","gesture","anchor","target","anchorBasedOnGesture","isRemovable","defaultContext","getDefaultContextMenu","handleRemove","handleReorder","tabKeys","direction","itemLabels","labelRemove","tabbar_labelRemove","handleAccStatus","removeItemLabel","removedKey","removeStatus","isDisabled","handleCloseContextMenu","focus","useId","tabbar_labelContextMenu","onClose","mergeProps","useNavigationList","eventProps","navigationListClass","classNames","navigationListStyles","uListStyle","navigationListItemPrefix","testIdProps","useTestId","useImperativeHandle","blur","_jsxs","role","tabIndex","class","NavigationListContext","Provider","id","HiddenAccessible","LiveRegion","TabBarContextMenu","label","badge","metadata","severity","icon","BaseNavigationListItem"],"mappings":"w3CAqBA,MAAMA,EAAgB,eACTC,EAAuB,4CAE9BC,EAGF,CACFC,MAAO,CACLC,aAAc,OACdC,UAAW,eACXC,YAAa,GAEfC,SAAU,CACRH,aAAc,YACdC,UAAW,eACXC,YAAa,GAEfE,MAAO,CACLJ,aAAc,OACdC,UAAW,MACXC,YAlBuB,KA0CrBG,EAA8B,CAClCC,QAAQ,EACRN,aAAc,OACdC,UAAW,eACXC,YAAa,EACbK,UAAW,CAAEC,QAAS,OAkNjB,MAAMC,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AAKC,EAAY,mBACC,WAClBoG,SAAU,EACa,wBAAAvH,EAAagH,EAA2BhH,EAAa,MACxEyG,EAAAA,WAAWE,EAAYvE,MACvB6E,EACJO,MAAOZ,EACPnG,SAAAoB,EAAAC,IAAC2F,wBAAsBC,SACrB,CAAAxE,MAAO,CACLxC,YACAO,UACAL,oBACAuB,qBACAnC,aACAkC,gBACA8E,2BACAnG,WACAF,QAEDF,SAAAA,MAGJc,GAA4BkB,GAA4BD,GACvDX,MAAA,OAAA,CAAM8F,GAAIlF,EACRhC,SAAAoB,EAAAC,IAAC8F,EAAgBA,iBAAA,CAAAnH,SAAE+B,MAGtBjB,GAA4BmB,GAAiBb,EAAAC,IAAC+F,aAAU,CAAApH,SAAEiC,IAC1DnB,GACCM,EAAAC,IAACgG,EAAiBA,kBAAA,IACZvF,EACJI,kBAAmBpB,EACnBe,mBAAoBA,MAI1B,4CCxIU,UAA8CzD,QAC5DA,EAAOkJ,MACPA,EAAKC,MACLA,EAAKC,SACLA,EAAQC,SACRA,EAAQC,KACRA,IAEA,OACEtG,EAAAA,IAACuG,EAAAA,uBAAsB,CACrBvJ,QAASA,EACTkJ,MAAOA,EACPC,MAAOA,EACPC,SAAUA,EACVC,SAAUA,EACVC,KAAMA,GAGZ"}
1
+ {"version":3,"file":"NavigationListItem-672b4363.js","sources":["../../src/UNSAFE_NavigationList/useNavigationList.ts","../../src/UNSAFE_NavigationList/NavigationList.tsx","../../src/UNSAFE_NavigationList/NavigationListItem.tsx"],"sourcesContent":["import { ComponentChildren, ComponentProps } from 'preact';\nimport { useState, useCallback, MutableRef, useRef, useEffect, useId } from 'preact/hooks';\nimport {\n keyExtractor,\n getFirstVisibleKey,\n getKey,\n getPrevNextKeyUsingRef,\n findElementByKey\n} from '../utils/PRIVATE_collectionUtils';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { useCollectionFocusRing } from '../hooks/PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../hooks/PRIVATE_useCurrentKey';\nimport { MenuProps } from '../hooks/PRIVATE_useVisContextMenu/util';\nimport { useContextMenuGesture } from '../hooks/UNSAFE_useContextMenuGesture';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { Menu } from '../UNSAFE_Menu';\nimport { getDefaultContextMenu } from '../UNSAFE_TabBar/TabBarContextMenu';\nimport { TabBarContextMenuConfig, TabBarItemContextMenuContext } from '../UNSAFE_TabBarCommon';\nimport { NavigationListContextProps } from '../UNSAFE_NavigationListCommon';\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nexport const REMOVE_ICON_SELECTOR = '[data-oj-navigationlist-item-remove-icon]';\nconst TOUCH_OFFSET_VALUE = 40;\nconst menuPropGestureStates: Record<\n 'mouse' | 'keyboard' | 'touch',\n Omit<Required<MenuProps>, 'anchorRef' | 'isOpen'>\n> = {\n mouse: {\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0\n },\n keyboard: {\n initialFocus: 'firstItem',\n placement: 'bottom-start',\n offsetValue: 0\n },\n touch: {\n initialFocus: 'menu',\n placement: 'end',\n offsetValue: TOUCH_OFFSET_VALUE\n }\n};\n\n/**\n * type for payload of current key change event handler\n */\ntype CurrentKeyDetail<K> = {\n value: K;\n};\n/**\n * type for payload of selection change event handler\n */\ntype SelectionDetail<K> = {\n value: K;\n reason: 'pointer' | 'keyboard';\n};\n/**\n * type for payload of remove event handler\n */\ntype RemoveDetail<K> = {\n value: K;\n};\n\nconst initialMenuProps: MenuProps = {\n isOpen: false,\n initialFocus: 'menu',\n placement: 'bottom-start',\n offsetValue: 0,\n anchorRef: { current: null }\n};\n\n/*TODO: JET-58534. Create a hook to share some logic between navlist and tabbar. Hook will be used inside this one. */\nexport function useNavigationList<K extends string | number>({\n containerRef,\n selection,\n onRemove,\n onSelectionChange,\n children,\n contextMenuConfig\n}: {\n containerRef: MutableRef<HTMLDivElement>;\n selection?: K;\n onRemove?: <K extends string | number>(detail: RemoveDetail<K>) => void;\n onSelectionChange?: <K extends string | number>(detail: SelectionDetail<K>) => void;\n children: ComponentChildren;\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n}) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection);\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K | undefined>) => {\n setCurrentKey(detail.value);\n }, []) as NavigationListContextProps<K>['onCurrentKeyChange'];\n\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? (extractOnlyItemKey(element, ITEM_SELECTOR, REMOVE_ICON_SELECTOR) as K)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n false,\n getPrevNextKeyUsingRef(containerRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(containerRef, currentKey, false, ITEM_SELECTOR),\n undefined,\n undefined,\n currentKey,\n onCurrentKeyChange\n );\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(containerRef, [\n 'Home',\n 'End',\n 'ArrowUp',\n 'ArrowDown'\n ]);\n\n const onFocus = useCallback(() => {\n if (containerRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(containerRef.current, ITEM_SELECTOR);\n if (key) {\n setCurrentKey(key as K);\n }\n }\n }, [currentKey, containerRef]);\n\n const onFocusProps = { onFocus };\n const prevNavItems = useRef<K[]>();\n\n useEffect(() => {\n if (containerRef.current) {\n const navListItemKeys = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n if (currentKey != null && navListItemKeys.indexOf(currentKey) !== -1) {\n const navListItem = findElementByKey(\n containerRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as any;\n if (navListItem.scrollIntoViewIfNeeded) {\n // for some browsers, we'll need the non-standard scrollIntoViewIfNeeded\n navListItem.scrollIntoViewIfNeeded();\n } else {\n navListItem.scrollIntoView({ block: 'nearest' });\n }\n } else {\n if (currentKey && navListItemKeys.indexOf(currentKey) === -1) {\n prevNavItems.current\n ? setCurrentKey(findNextCurrentKey(currentKey, navListItemKeys, prevNavItems.current))\n : setCurrentKey(navListItemKeys[0] as K);\n }\n prevNavItems.current = navListItemKeys;\n }\n }\n }, [children, currentKey, containerRef]);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if ((event.key === 'Home' || event.key === 'End') && containerRef.current && currentKey) {\n const navListItemKey = Array.from(\n containerRef.current.querySelectorAll(ITEM_SELECTOR),\n (elem) => getKey(elem as HTMLElement) as K\n );\n onCurrentKeyChange?.({\n value: navListItemKey[event.key === 'Home' ? 0 : navListItemKey.length - 1] as K\n });\n }\n if (currentKey && (event.key === 'Enter' || event.key === ' ')) {\n // Prevent default to avoid page scrolling on Space (and native actions on Enter)\n event.preventDefault();\n onSelectionChange?.({\n value: currentKey as K,\n reason: 'keyboard'\n });\n }\n if (currentKey && event.key === 'Delete') {\n onRemove?.({ value: currentKey as K });\n }\n },\n [currentKey, onSelectionChange, onRemove, onCurrentKeyChange, containerRef]\n );\n\n const [contextMenuContext, setContextMenuContext] = useState<TabBarItemContextMenuContext<K>>();\n\n const [menuProps, setMenuProps] = useState<MenuProps>(initialMenuProps);\n const [accStatusInfo, setAccStatusInfo] = useState<string>();\n\n const { triggerProps } = useContextMenuGesture(\n ({ gesture, anchor, target }) => {\n let anchorBasedOnGesture = anchor;\n let itemKey = currentKey as K;\n if (gesture === 'keyboard') {\n //We find the element where the position of the menu is going to be based of\n const elem = findElementByKey(\n containerRef.current as HTMLElement,\n currentKey as K,\n ITEM_SELECTOR\n );\n //We set the correct anchor\n anchorBasedOnGesture = elem ? elem : anchor;\n } else {\n //We search for the key using the target of the event\n const key = keyExtractor(target as HTMLElement, ITEM_SELECTOR);\n\n //On touch devices, the keyExtractor returns null because target of touch event is the entire tabbar. Hence we make use of currentkey since the context menu is always launched from selected item and its key is currentKey\n itemKey = key != null ? (key as K) : (currentKey as K);\n }\n let isRemovable = false;\n if (containerRef.current) {\n isRemovable = getItemAttribute(itemKey, containerRef.current, REMOVE_ICON_SELECTOR) != null;\n }\n const defaultContext = getDefaultContextMenu<K>({\n // For default menu items the existence of REMOVE_ICON_SELECTOR is the indicator that it is removable because we render the default menu in touch devices not the application.\n // Furthermore in corepack due to delegations onRemove is always defined as it is a even handler hence not a good check for isRemovable.\n isRemovable: isRemovable,\n handleRemove: onRemove,\n handleReorder: undefined,\n itemKey: itemKey,\n tabKeys: undefined,\n // As direction is only needed for reorder to switch the labels\n direction: undefined,\n itemLabels: {\n labelRemove: isRemovable ? translations.tabbar_labelRemove() : undefined\n },\n handleAccStatus: (detail) => {\n const removeItemLabel = getItemLabel(detail.removedKey!, containerRef.current!) as string;\n const removeStatus =\n isRemovable && detail.removedKey ? ` Removed ${removeItemLabel}` : '';\n\n setAccStatusInfo(removeStatus);\n }\n });\n setContextMenuContext(defaultContext);\n\n setMenuProps({\n ...menuPropGestureStates[gesture],\n anchorRef: { current: anchorBasedOnGesture },\n // This is set so that when no contextMenuConfig and when items is not removable we need not open it.\n isOpen: contextMenuConfig != null\n });\n },\n {\n isDisabled: !contextMenuConfig //If there is no a context menu renderer we disable the hook\n }\n );\n\n const handleCloseContextMenu = useCallback<Required<ComponentProps<typeof Menu>>['onClose']>(\n (detail) => {\n //Focus has to be set on the current target that was obtained\n //during context menu gesture when menu is dismissed or item is \"selected\"\n if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {\n setCurrentKey(contextMenuContext?.itemKey);\n containerRef.current?.focus();\n }\n // We close the menu.The only prop that matters here is isOpen\n setMenuProps({ ...initialMenuProps });\n },\n [containerRef, contextMenuContext?.itemKey]\n );\n\n const contextMenuDescriptionId = 'contextMenu_' + useId();\n const contextMenuDescription = translations.tabbar_labelContextMenu();\n\n return {\n showFocusRing,\n currentKey,\n onCurrentKeyChange,\n onKeyDown,\n menuProps: { ...menuProps, onClose: handleCloseContextMenu },\n contextMenuContext,\n contextMenuDescription,\n contextMenuDescriptionId,\n accStatusInfo,\n containerHandlers: mergeProps(focusRingProps, currentKeyProps, onFocusProps, triggerProps)\n };\n}\n// Utility that returns the value for a attribute related to the role=\"tab\" item.\nexport const getItemAttribute = <K extends string | number>(\n itemKey: K,\n root: HTMLElement,\n attribute: string\n) => {\n const navItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (navItem) {\n const tabBarItemAttribute = navItem.querySelector(attribute);\n return tabBarItemAttribute;\n }\n return;\n};\n\n// Utility that returns the visible inner text inside the role=\"tab\" item.\nconst getItemLabel = <K extends string | number>(itemKey: K, root: HTMLElement) => {\n const tabBarItem = findElementByKey(root, itemKey as K, ITEM_SELECTOR) as HTMLElement;\n if (tabBarItem) {\n return tabBarItem.innerText;\n }\n return;\n};\n\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const navigationListItem = element.closest(itemSelector);\n const removeButton = element.closest(itemEliminator);\n return navigationListItem?.contains(removeButton) ? null : keyExtractor(element, itemSelector);\n};\n\nconst findNextCurrentKey = <K>(currentKey: K, currNavs: K[], prevNavs: K[]) => {\n const index = prevNavs.indexOf(currentKey);\n if (index > 0) {\n const nextIndex = index === prevNavs.length - 1 ? index - 1 : index + 1;\n const nextKey = prevNavs[nextIndex];\n if (currNavs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n }\n // update current key to be the first one if we can't find a suitable next key\n return currNavs[0];\n};\n","import { Ref } from 'preact';\nimport { MutableRef, useMemo, useRef } from 'preact/hooks';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { isMobile } from '#utils/UNSAFE_clientUtils';\nimport { useId } from '../hooks/UNSAFE_useId';\nimport { navigationListStyles } from './themes/NavigationListStyles.css';\nimport { getItemAttribute, REMOVE_ICON_SELECTOR, useNavigationList } from './useNavigationList';\nimport { forwardRef, useImperativeHandle } from 'preact/compat';\nimport { useTestId, TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { NavigationListProps, NavigationListContext } from '../UNSAFE_NavigationListCommon';\nimport { TabBarContextMenu } from '../UNSAFE_TabBar/TabBarContextMenu';\nimport type { TabBarContextMenuConfig as NavigationListContextMenuConfig } from '../UNSAFE_TabBarCommon';\nexport {\n RemovableNavigationListItem,\n NavigationListLinkItem\n} from '../UNSAFE_NavigationListCommon';\n\nexport type FocusableHandle = {\n focus: () => void;\n blur: () => void;\n};\n\nexport const NavigationList = forwardRef(\n <K extends string | number>(\n {\n children,\n selection,\n edge = 'start',\n onSelectionChange,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelLedBy,\n testId,\n display = 'standard'\n }: NavigationListProps<K> & TestIdProps,\n ref?: Ref<FocusableHandle>\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const isMobileDevice = isMobile();\n const defaultContextMenuConfig = useMemo<\n NavigationListContextMenuConfig<string | number> | undefined\n >(() => {\n return isMobileDevice\n ? {\n itemsRenderer: (context) => {\n //Only if context is available, it is a mobile device and it is removable item, we will return remove context menu item\n if (context) {\n const isRemovableItem =\n getItemAttribute(context.itemKey, containerRef.current!, REMOVE_ICON_SELECTOR) !=\n null;\n if (isRemovableItem) {\n const defaultItems = context.defaultMenuItems;\n return <>{defaultItems}</>;\n }\n }\n return null;\n }\n }\n : undefined;\n }, [isMobileDevice]);\n\n const {\n showFocusRing,\n currentKey,\n onCurrentKeyChange,\n containerHandlers,\n onKeyDown,\n contextMenuContext,\n menuProps,\n contextMenuDescription,\n contextMenuDescriptionId,\n accStatusInfo\n } = useNavigationList({\n containerRef: containerRef as MutableRef<HTMLDivElement>,\n selection,\n onRemove,\n onSelectionChange,\n children,\n contextMenuConfig: defaultContextMenuConfig\n });\n\n const eventProps = { onKeyDown };\n const navigationListClass = classNames([navigationListStyles.uListStyle]);\n const navigationListItemPrefix = useId() + '_';\n const testIdProps = useTestId(testId);\n\n //Allows to call focus on rootRef without having to expose it\n useImperativeHandle(ref!, () => ({\n focus: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n },\n blur: () => {\n if (containerRef.current) {\n containerRef.current.focus();\n }\n }\n }));\n\n return (\n <>\n <div\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelLedBy}\n role=\"tablist\"\n ref={containerRef}\n aria-orientation={'vertical'}\n tabIndex={0}\n aria-activedescendant={currentKey ? navigationListItemPrefix + currentKey : ''}\n {...mergeProps(eventProps, containerHandlers)}\n {...testIdProps}\n class={navigationListClass}>\n <NavigationListContext.Provider\n value={{\n selection,\n display,\n onSelectionChange,\n onCurrentKeyChange,\n currentKey,\n showFocusRing,\n navigationListItemPrefix,\n onRemove,\n edge\n }}>\n {children}\n </NavigationListContext.Provider>\n </div>\n {defaultContextMenuConfig && contextMenuDescriptionId && contextMenuDescription && (\n <span id={contextMenuDescriptionId}>\n <HiddenAccessible>{contextMenuDescription}</HiddenAccessible>\n </span>\n )}\n {defaultContextMenuConfig && accStatusInfo && <LiveRegion>{accStatusInfo}</LiveRegion>}\n {defaultContextMenuConfig && (\n <TabBarContextMenu\n {...menuProps}\n contextMenuConfig={defaultContextMenuConfig}\n contextMenuContext={contextMenuContext!}\n />\n )}\n </>\n );\n }\n);\n","import {\n BaseNavigationListItem,\n BaseNavigationListItemProps\n} from '../UNSAFE_NavigationListCommon/BaseNavigationListItem';\n\nexport type NavigationListItemProps<K extends string | number> = Omit<\n BaseNavigationListItemProps<K>,\n 'removeIcon'\n>;\n\nexport function NavigationListItem<K extends string | number>({\n itemKey,\n label,\n badge,\n metadata,\n severity,\n icon\n}: NavigationListItemProps<K>) {\n return (\n <BaseNavigationListItem\n itemKey={itemKey}\n label={label}\n badge={badge}\n metadata={metadata}\n severity={severity}\n icon={icon}\n />\n );\n}\n"],"names":["ITEM_SELECTOR","REMOVE_ICON_SELECTOR","menuPropGestureStates","mouse","initialFocus","placement","offsetValue","keyboard","touch","initialMenuProps","isOpen","anchorRef","current","getItemAttribute","itemKey","root","attribute","navItem","findElementByKey","querySelector","getItemLabel","tabBarItem","innerText","extractOnlyItemKey","element","itemSelector","itemEliminator","navigationListItem","closest","removeButton","contains","keyExtractor","findNextCurrentKey","currentKey","currNavs","prevNavs","index","indexOf","nextKey","length","NavigationList","forwardRef","children","selection","edge","onSelectionChange","onRemove","ariaLabel","ariaLabelLedBy","testId","display","ref","containerRef","useRef","isMobileDevice","isMobile","defaultContextMenuConfig","useMemo","itemsRenderer","context","defaultItems","defaultMenuItems","_jsx","jsx","_Fragment","Fragment","undefined","showFocusRing","onCurrentKeyChange","containerHandlers","onKeyDown","contextMenuContext","menuProps","contextMenuDescription","contextMenuDescriptionId","accStatusInfo","contextMenuConfig","translations","useTranslationBundle","setCurrentKey","useState","useCallback","detail","value","currentKeyProps","useCurrentKey","getPrevNextKeyUsingRef","focusRingProps","useCollectionFocusRing","onFocusProps","onFocus","key","getFirstVisibleKey","prevNavItems","useEffect","navListItemKeys","Array","from","querySelectorAll","elem","getKey","navListItem","scrollIntoViewIfNeeded","scrollIntoView","block","event","navListItemKey","preventDefault","reason","setContextMenuContext","setMenuProps","setAccStatusInfo","triggerProps","useContextMenuGesture","gesture","anchor","target","anchorBasedOnGesture","isRemovable","defaultContext","getDefaultContextMenu","handleRemove","handleReorder","tabKeys","direction","itemLabels","labelRemove","tabbar_labelRemove","handleAccStatus","removeItemLabel","removedKey","removeStatus","isDisabled","handleCloseContextMenu","focus","useId","tabbar_labelContextMenu","onClose","mergeProps","useNavigationList","eventProps","navigationListClass","classNames","navigationListStyles","uListStyle","navigationListItemPrefix","testIdProps","useTestId","useImperativeHandle","blur","_jsxs","role","tabIndex","class","NavigationListContext","Provider","id","HiddenAccessible","LiveRegion","TabBarContextMenu","label","badge","metadata","severity","icon","BaseNavigationListItem"],"mappings":"4kBAqBA,MAAMA,EAAgB,eACTC,EAAuB,4CAE9BC,EAGF,CACFC,MAAO,CACLC,aAAc,OACdC,UA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KACDlF,EAAaxC,SACfwC,EAAaxC,QAAQ0H,OACtB,EAEHe,KAAM,KACAjG,EAAaxC,SACfwC,EAAaxC,QAAQ0H,OACtB,MAKHgB,EAAAA,KACEtF,EAAAA,SAAA,CAAAtB,SAAA,CAAAoB,MAAA,MAAA,CAAA,aACcf,EAAS,kBACJC,EACjBuG,KAAK,UACLpG,IAAKC,EAAY,mBACC,WAClBoG,SAAU,EACa,wBAAAvH,EAAagH,EAA2BhH,EAAa,MACxEyG,EAAAA,WAAWE,EAAYvE,MACvB6E,EACJO,MAAOZ,EACPnG,SAAAoB,EAAAC,IAAC2F,wBAAsBC,SACrB,CAAAxE,MAAO,CACLxC,YACAO,UACAL,oBACAuB,qBACAnC,aACAkC,gBACA8E,2BACAnG,WACAF,QAEDF,SAAAA,MAGJc,GAA4BkB,GAA4BD,GACvDX,MAAA,OAAA,CAAM8F,GAAIlF,EACRhC,SAAAoB,EAAAC,IAAC8F,EAAgBA,iBAAA,CAAAnH,SAAE+B,MAGtBjB,GAA4BmB,GAAiBb,EAAAC,IAAC+F,aAAU,CAAApH,SAAEiC,IAC1DnB,GACCM,EAAAC,IAACgG,EAAiBA,kBAAA,IACZvF,EACJI,kBAAmBpB,EACnBe,mBAAoBA,MAI1B,4CCxIU,UAA8CzD,QAC5DA,EAAOkJ,MACPA,EAAKC,MACLA,EAAKC,SACLA,EAAQC,SACRA,EAAQC,KACRA,IAEA,OACEtG,EAAAA,IAACuG,EAAAA,uBAAsB,CACrBvJ,QAASA,EACTkJ,MAAOA,EACPC,MAAOA,EACPC,SAAUA,EACVC,SAAUA,EACVC,KAAMA,GAGZ"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact', 'preact/hooks', './classNames-08d99695', './TabBar-00fe9057', './UNSAFE_OverflowTabBar/themes/OverflowTabBarStyles.css', './useDetectHorizontalOverflow-b00641ee', './TabBarLinkItem-131722a1', './RemovableTabBarItem-41219bd9', './TabBarItem-545e9bdd', './OverflowTabBarItem-551bc390'], (function(e,a,t,l,r,s,i,o,n,m,b,d){"use strict";e.OverflowTabBar=function({items:e,layout:c="stretch",display:u="standard",size:y="md",edge:f="top",selection:v,truncation:I,onSelect:g,onRemove:B,"aria-label":K,"aria-labelledby":T,contextMenuConfig:h,testId:x}){const p="stacked"===u?{display:u}:{display:u,size:y},w=l.useRef(null),R=t.createRef(),[O,j]=l.useState(!1),M=l.useRef(!1),k=l.useCallback((e=>{"more"===e.value?M.current?j(!1):j(!0):g?.(e),M.current=!1}),[g]),S=l.useMemo((()=>e.map((e=>e.itemKey))),[e]),{visibleItemKeys:z,overflowItemKeys:C,maxWidths:W}=o.useDetectHorizontalOverflow({rootRef:R,keysArray:S,isTruncationDisabled:!(I&&"progressive"===I)}),A=r.classNames([i.styles.overflowTabBarBase]);return a.jsx("div",{ref:w,class:A,children:a.jsxs(s.TabBar,{ref:R,selection:v,onSelect:k,...p,layout:c,edge:f,onRemove:B,"aria-label":K,"aria-labelledby":T,testId:x,contextMenuConfig:h,children:[null!=z&&z.length>0&&e.filter((e=>z?.includes(e.itemKey))).map((e=>null!=e.href?a.jsx(n.TabBarLinkItem,{href:e.href,itemKey:e.itemKey,label:e.label,icon:e.icon,badge:e.badge,metadata:e.metadata,severity:e.severity,"aria-controls":e.tabPanelId,labelMaxWidth:W?.get(e.itemKey)}):e.isRemovable?a.jsx(m.RemovableTabBarItem,{itemKey:e.itemKey,label:e.label,icon:e.icon,badge:e.badge,metadata:e.metadata,severity:e.severity,"aria-controls":e.tabPanelId,labelMaxWidth:W?.get(e.itemKey)}):a.jsx(b.TabBarItem,{itemKey:e.itemKey,label:e.label,icon:e.icon,badge:e.badge,metadata:e.metadata,severity:e.severity,"aria-controls":e.tabPanelId,labelMaxWidth:W?.get(e.itemKey)}))),null!=C&&C.length>0&&a.jsx(d.OverflowTabBarItem,{isOpen:O,onClose:e=>{R.current&&["itemAction","dismissed"].includes(e.reason)&&R?.current?.focus(),"outsideMousedown"===e.reason&&(M.current=!0),j(!1)},overflowItemKey:"more",overflowItems:e.filter((e=>C?.includes(e.itemKey)))})]})})}}));
2
- //# sourceMappingURL=OverflowTabBar-6264d822.js.map
1
+ define(['exports', 'preact/jsx-runtime', 'preact', 'preact/hooks', './classNames-08d99695', './TabBar-00fe9057', './UNSAFE_OverflowTabBar/themes/OverflowTabBarStyles.css', './useDetectHorizontalOverflow-b00641ee', './TabBarLinkItem-131722a1', './RemovableTabBarItem-41219bd9', './TabBarItem-545e9bdd', './OverflowTabBarItem-ca1e2612'], (function(e,a,t,l,r,s,i,o,n,m,d,b){"use strict";e.OverflowTabBar=function({items:e,layout:c="stretch",display:u="standard",size:y="md",edge:f="top",selection:v,truncation:I,onSelect:g,onRemove:B,"aria-label":K,"aria-labelledby":T,contextMenuConfig:h,testId:x}){const p="stacked"===u?{display:u}:{display:u,size:y},w=l.useRef(null),R=t.createRef(),[O,j]=l.useState(!1),M=l.useRef(!1),k=l.useCallback((e=>{"more"===e.value?M.current?j(!1):j(!0):g?.(e),M.current=!1}),[g]),S=l.useMemo((()=>e.map((e=>e.itemKey))),[e]),{visibleItemKeys:z,overflowItemKeys:C,maxWidths:W}=o.useDetectHorizontalOverflow({rootRef:R,keysArray:S,isTruncationDisabled:!(I&&"progressive"===I)}),A=r.classNames([i.styles.overflowTabBarBase]);return a.jsx("div",{ref:w,class:A,children:a.jsxs(s.TabBar,{ref:R,selection:v,onSelect:k,...p,layout:c,edge:f,onRemove:B,"aria-label":K,"aria-labelledby":T,testId:x,contextMenuConfig:h,children:[null!=z&&z.length>0&&e.filter((e=>z?.includes(e.itemKey))).map((e=>null!=e.href?a.jsx(n.TabBarLinkItem,{href:e.href,itemKey:e.itemKey,label:e.label,icon:e.icon,badge:e.badge,metadata:e.metadata,severity:e.severity,"aria-controls":e.tabPanelId,labelMaxWidth:W?.get(e.itemKey)}):e.isRemovable?a.jsx(m.RemovableTabBarItem,{itemKey:e.itemKey,label:e.label,icon:e.icon,badge:e.badge,metadata:e.metadata,severity:e.severity,"aria-controls":e.tabPanelId,labelMaxWidth:W?.get(e.itemKey)}):a.jsx(d.TabBarItem,{itemKey:e.itemKey,label:e.label,icon:e.icon,badge:e.badge,metadata:e.metadata,severity:e.severity,"aria-controls":e.tabPanelId,labelMaxWidth:W?.get(e.itemKey)}))),null!=C&&C.length>0&&a.jsx(b.OverflowTabBarItem,{isOpen:O,onClose:e=>{R.current&&["itemAction","dismissed"].includes(e.reason)&&R?.current?.focus(),"outsideMousedown"===e.reason&&(M.current=!0),j(!1)},overflowItemKey:"more",overflowItems:e.filter((e=>C?.includes(e.itemKey)))})]})})}}));
2
+ //# sourceMappingURL=OverflowTabBar-fd567fb3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTabBar-6264d822.js","sources":["../../src/UNSAFE_OverflowTabBar/OverflowTabBar.tsx"],"sourcesContent":["import { ComponentProps, createRef } from 'preact';\nimport { useCallback, useMemo, useRef, useState } from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport {\n OverflowTabBarItem,\n RemovableTabBarItem,\n TabBar,\n TabBarItem,\n TabBarLinkItem\n} from '../UNSAFE_TabBar';\nimport { CloseDetail, Item } from '../UNSAFE_TabBarCommon';\nimport { styles } from './themes/OverflowTabBarStyles.css';\nimport { useDetectHorizontalOverflow } from '../hooks/PRIVATE_useDetectHorizontalOverflow';\n\ntype OverflowTabBarProps<K extends string | number> = {\n /**\n * An array of data to render individual tabs\n */\n items: Item<K>[];\n /**\n * The truncation configuration for tab labels.\n * 'progressive' will restrict the width of each tab label to allow all tabs to fit if enough space is not available to display all of the tabs.\n * Labels that are truncated are displayed with ellipses. However the width of each tab label will not be truncated below a specific threshold.\n * 'none' tabs always take up the space needed by the labels even if enough space is not available to display all of the tabs.\n */\n truncation?: 'none' | 'progressive';\n} & Omit<ComponentProps<typeof TabBar>, 'children' | 'aria-describedby' | 'ref'>;\n\n/**\n * OverflowTabBar handles the rendering of overflowing tab items.\n */\nexport function OverflowTabBar<K extends string | number>({\n items,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n truncation,\n onSelect,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n contextMenuConfig,\n testId\n}: OverflowTabBarProps<K> & TestIdProps) {\n const displayStackProps = {\n display: display\n };\n const displayNonStackProps = {\n display: display,\n size: size\n };\n\n const displayProps = display === 'stacked' ? displayStackProps : displayNonStackProps;\n const rootRef = useRef<HTMLDivElement>(null);\n const tabBarRef = createRef<HTMLDivElement>();\n\n const [isDropDownOpen, setIsDropDownOpen] = useState<boolean>(false);\n\n const isOutsideMouseDown = useRef<boolean>(false);\n\n const handleClose = (e: CloseDetail) => {\n if (tabBarRef.current && ['itemAction', 'dismissed'].includes(e.reason)) {\n tabBarRef?.current?.focus();\n }\n if (e.reason === 'outsideMousedown') {\n isOutsideMouseDown.current = true;\n }\n setIsDropDownOpen(false);\n };\n\n const handleSelect = useCallback<Required<ComponentProps<typeof TabBar>>['onSelect']>(\n (e: { value: string | number }) => {\n if (e.value === 'more') {\n //If overflow item is clicked after dropdown is open, the reason is outsideMouseDown and it needs to be closed\n if (isOutsideMouseDown.current) {\n setIsDropDownOpen(false);\n } else {\n setIsDropDownOpen(true);\n }\n } else {\n onSelect?.(e);\n }\n isOutsideMouseDown.current = false;\n },\n [onSelect]\n );\n\n const overflowItemKey = 'more' as K;\n\n const keysArray = useMemo(() => items.map((item) => item.itemKey) as K[], [items]);\n\n const { visibleItemKeys, overflowItemKeys, maxWidths } = useDetectHorizontalOverflow({\n rootRef: tabBarRef,\n keysArray,\n isTruncationDisabled: !(truncation && truncation === 'progressive')\n });\n\n const overflowTabBarClass = classNames([styles.overflowTabBarBase]);\n\n return (\n <div ref={rootRef} class={overflowTabBarClass}>\n <TabBar\n ref={tabBarRef}\n selection={selection}\n onSelect={handleSelect}\n {...displayProps}\n layout={layout}\n edge={edge}\n onRemove={onRemove}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n testId={testId}\n contextMenuConfig={contextMenuConfig}>\n {visibleItemKeys != null &&\n visibleItemKeys.length > 0 &&\n items\n .filter((item) => visibleItemKeys?.includes(item.itemKey))\n .map((item: Item<K>) =>\n item.href != null ? (\n <TabBarLinkItem\n href={item.href}\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n labelMaxWidth={maxWidths?.get(item.itemKey)}\n />\n ) : item.isRemovable ? (\n <RemovableTabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n labelMaxWidth={maxWidths?.get(item.itemKey)}\n />\n ) : (\n <TabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n labelMaxWidth={maxWidths?.get(item.itemKey)}\n />\n )\n )}\n {overflowItemKeys != null && overflowItemKeys.length > 0 && (\n <OverflowTabBarItem\n isOpen={isDropDownOpen}\n onClose={handleClose}\n overflowItemKey={overflowItemKey}\n overflowItems={items.filter((item) => overflowItemKeys?.includes(item.itemKey))}\n />\n )}\n </TabBar>\n </div>\n );\n}\n"],"names":["items","layout","display","size","edge","selection","truncation","onSelect","onRemove","ariaLabel","ariaLabelledby","contextMenuConfig","testId","displayProps","rootRef","useRef","tabBarRef","createRef","isDropDownOpen","setIsDropDownOpen","useState","isOutsideMouseDown","handleSelect","useCallback","e","value","current","keysArray","useMemo","map","item","itemKey","visibleItemKeys","overflowItemKeys","maxWidths","useDetectHorizontalOverflow","isTruncationDisabled","overflowTabBarClass","classNames","styles","overflowTabBarBase","_jsx","ref","class","children","_jsxs","jsxs","TabBar","length","filter","includes","href","TabBarLinkItem","label","icon","badge","metadata","severity","tabPanelId","labelMaxWidth","get","isRemovable","jsx","RemovableTabBarItem","TabBarItem","OverflowTabBarItem","isOpen","onClose","reason","focus","overflowItemKey","overflowItems"],"mappings":"+YAgC0DA,MACxDA,EAAKC,OACLA,EAAS,UAASC,QAClBA,EAAU,WAAUC,KACpBA,EAAO,KAAIC,KACXA,EAAO,MAAKC,UACZA,EAASC,WACTA,EAAUC,SACVA,EAAQC,SACRA,EACA,aAAcC,EACd,kBAAmBC,EAAcC,kBACjCA,EAAiBC,OACjBA,IAEA,MAQMC,EAA2B,YAAZX,EARK,CACxBA,QAASA,GAEkB,CAC3BA,QAASA,EACTC,KAAMA,GAIFW,EAAUC,SAAuB,MACjCC,EAAYC,EAAAA,aAEXC,EAAgBC,GAAqBC,EAAQA,UAAU,GAExDC,EAAqBN,UAAgB,GAYrCO,EAAeC,eAClBC,IACiB,SAAZA,EAAEC,MAEAJ,EAAmBK,QACrBP,GAAkB,GAElBA,GAAkB,GAGpBZ,IAAWiB,GAEbH,EAAmBK,SAAU,CAAK,GAEpC,CAACnB,IAKGoB,EAAYC,EAAAA,SAAQ,IAAM5B,EAAM6B,KAAKC,GAASA,EAAKC,WAAiB,CAAC/B,KAErEgC,gBAAEA,EAAeC,iBAAEA,EAAgBC,UAAEA,GAAcC,EAAAA,4BAA4B,CACnFrB,QAASE,EACTW,YACAS,uBAAwB9B,GAA6B,gBAAfA,KAGlC+B,EAAsBC,EAAUA,WAAC,CAACC,EAAAA,OAAOC,qBAE/C,OACEC,EAAAA,IAAK,MAAA,CAAAC,IAAK5B,EAAS6B,MAAON,EAAmBO,SAC3CC,EAACC,KAAAC,EAAMA,QACLL,IAAK1B,EACLX,UAAWA,EACXE,SAAUe,KACNT,EACJZ,OAAQA,EACRG,KAAMA,EACNI,SAAUA,EACE,aAAAC,oBACKC,EACjBE,OAAQA,EACRD,kBAAmBA,EAAiBiC,SAAA,CAChB,MAAnBZ,GACCA,EAAgBgB,OAAS,GACzBhD,EACGiD,QAAQnB,GAASE,GAAiBkB,SAASpB,EAAKC,WAChDF,KAAKC,GACS,MAAbA,EAAKqB,KACHV,EAAAA,IAACW,EAAAA,eAAc,CACbD,KAAMrB,EAAKqB,KACXpB,QAASD,EAAKC,QACdsB,MAAOvB,EAAKuB,MACZC,KAAMxB,EAAKwB,KACXC,MAAOzB,EAAKyB,MACZC,SAAU1B,EAAK0B,SACfC,SAAU3B,EAAK2B,SAAQ,gBACR3B,EAAK4B,WACpBC,cAAezB,GAAW0B,IAAI9B,EAAKC,WAEnCD,EAAK+B,YACPpB,EAACqB,IAAAC,EAAmBA,oBAClB,CAAAhC,QAASD,EAAKC,QACdsB,MAAOvB,EAAKuB,MACZC,KAAMxB,EAAKwB,KACXC,MAAOzB,EAAKyB,MACZC,SAAU1B,EAAK0B,SACfC,SAAU3B,EAAK2B,SACA,gBAAA3B,EAAK4B,WACpBC,cAAezB,GAAW0B,IAAI9B,EAAKC,WAGrCU,EAAAA,IAACuB,EAAAA,WAAU,CACTjC,QAASD,EAAKC,QACdsB,MAAOvB,EAAKuB,MACZC,KAAMxB,EAAKwB,KACXC,MAAOzB,EAAKyB,MACZC,SAAU1B,EAAK0B,SACfC,SAAU3B,EAAK2B,SAAQ,gBACR3B,EAAK4B,WACpBC,cAAezB,GAAW0B,IAAI9B,EAAKC,aAIxB,MAApBE,GAA4BA,EAAiBe,OAAS,GACrDP,EAAAqB,IAACG,EAAkBA,mBAAA,CACjBC,OAAQhD,EACRiD,QAjGW3C,IACfR,EAAUU,SAAW,CAAC,aAAc,aAAawB,SAAS1B,EAAE4C,SAC9DpD,GAAWU,SAAS2C,QAEL,qBAAb7C,EAAE4C,SACJ/C,EAAmBK,SAAU,GAE/BP,GAAkB,EAAM,EA2FhBmD,gBAvEc,OAwEdC,cAAevE,EAAMiD,QAAQnB,GAASG,GAAkBiB,SAASpB,EAAKC,iBAMlF"}
1
+ {"version":3,"file":"OverflowTabBar-fd567fb3.js","sources":["../../src/UNSAFE_OverflowTabBar/OverflowTabBar.tsx"],"sourcesContent":["import { ComponentProps, createRef } from 'preact';\nimport { useCallback, useMemo, useRef, useState } from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport {\n OverflowTabBarItem,\n RemovableTabBarItem,\n TabBar,\n TabBarItem,\n TabBarLinkItem\n} from '../UNSAFE_TabBar';\nimport { CloseDetail, Item } from '../UNSAFE_TabBarCommon';\nimport { styles } from './themes/OverflowTabBarStyles.css';\nimport { useDetectHorizontalOverflow } from '../hooks/PRIVATE_useDetectHorizontalOverflow';\n\ntype OverflowTabBarProps<K extends string | number> = {\n /**\n * An array of data to render individual tabs\n */\n items: Item<K>[];\n /**\n * The truncation configuration for tab labels.\n * 'progressive' will restrict the width of each tab label to allow all tabs to fit if enough space is not available to display all of the tabs.\n * Labels that are truncated are displayed with ellipses. However the width of each tab label will not be truncated below a specific threshold.\n * 'none' tabs always take up the space needed by the labels even if enough space is not available to display all of the tabs.\n */\n truncation?: 'none' | 'progressive';\n} & Omit<ComponentProps<typeof TabBar>, 'children' | 'aria-describedby' | 'ref'>;\n\n/**\n * OverflowTabBar handles the rendering of overflowing tab items.\n */\nexport function OverflowTabBar<K extends string | number>({\n items,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n truncation,\n onSelect,\n onRemove,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n contextMenuConfig,\n testId\n}: OverflowTabBarProps<K> & TestIdProps) {\n const displayStackProps = {\n display: display\n };\n const displayNonStackProps = {\n display: display,\n size: size\n };\n\n const displayProps = display === 'stacked' ? displayStackProps : displayNonStackProps;\n const rootRef = useRef<HTMLDivElement>(null);\n const tabBarRef = createRef<HTMLDivElement>();\n\n const [isDropDownOpen, setIsDropDownOpen] = useState<boolean>(false);\n\n const isOutsideMouseDown = useRef<boolean>(false);\n\n const handleClose = (e: CloseDetail) => {\n if (tabBarRef.current && ['itemAction', 'dismissed'].includes(e.reason)) {\n tabBarRef?.current?.focus();\n }\n if (e.reason === 'outsideMousedown') {\n isOutsideMouseDown.current = true;\n }\n setIsDropDownOpen(false);\n };\n\n const handleSelect = useCallback<Required<ComponentProps<typeof TabBar>>['onSelect']>(\n (e: { value: string | number }) => {\n if (e.value === 'more') {\n //If overflow item is clicked after dropdown is open, the reason is outsideMouseDown and it needs to be closed\n if (isOutsideMouseDown.current) {\n setIsDropDownOpen(false);\n } else {\n setIsDropDownOpen(true);\n }\n } else {\n onSelect?.(e);\n }\n isOutsideMouseDown.current = false;\n },\n [onSelect]\n );\n\n const overflowItemKey = 'more' as K;\n\n const keysArray = useMemo(() => items.map((item) => item.itemKey) as K[], [items]);\n\n const { visibleItemKeys, overflowItemKeys, maxWidths } = useDetectHorizontalOverflow({\n rootRef: tabBarRef,\n keysArray,\n isTruncationDisabled: !(truncation && truncation === 'progressive')\n });\n\n const overflowTabBarClass = classNames([styles.overflowTabBarBase]);\n\n return (\n <div ref={rootRef} class={overflowTabBarClass}>\n <TabBar\n ref={tabBarRef}\n selection={selection}\n onSelect={handleSelect}\n {...displayProps}\n layout={layout}\n edge={edge}\n onRemove={onRemove}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n testId={testId}\n contextMenuConfig={contextMenuConfig}>\n {visibleItemKeys != null &&\n visibleItemKeys.length > 0 &&\n items\n .filter((item) => visibleItemKeys?.includes(item.itemKey))\n .map((item: Item<K>) =>\n item.href != null ? (\n <TabBarLinkItem\n href={item.href}\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n labelMaxWidth={maxWidths?.get(item.itemKey)}\n />\n ) : item.isRemovable ? (\n <RemovableTabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n labelMaxWidth={maxWidths?.get(item.itemKey)}\n />\n ) : (\n <TabBarItem\n itemKey={item.itemKey}\n label={item.label}\n icon={item.icon}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n aria-controls={item.tabPanelId}\n labelMaxWidth={maxWidths?.get(item.itemKey)}\n />\n )\n )}\n {overflowItemKeys != null && overflowItemKeys.length > 0 && (\n <OverflowTabBarItem\n isOpen={isDropDownOpen}\n onClose={handleClose}\n overflowItemKey={overflowItemKey}\n overflowItems={items.filter((item) => overflowItemKeys?.includes(item.itemKey))}\n />\n )}\n </TabBar>\n </div>\n );\n}\n"],"names":["items","layout","display","size","edge","selection","truncation","onSelect","onRemove","ariaLabel","ariaLabelledby","contextMenuConfig","testId","displayProps","rootRef","useRef","tabBarRef","createRef","isDropDownOpen","setIsDropDownOpen","useState","isOutsideMouseDown","handleSelect","useCallback","e","value","current","keysArray","useMemo","map","item","itemKey","visibleItemKeys","overflowItemKeys","maxWidths","useDetectHorizontalOverflow","isTruncationDisabled","overflowTabBarClass","classNames","styles","overflowTabBarBase","_jsx","ref","class","children","_jsxs","jsxs","TabBar","length","filter","includes","href","TabBarLinkItem","label","icon","badge","metadata","severity","tabPanelId","labelMaxWidth","get","isRemovable","jsx","RemovableTabBarItem","TabBarItem","OverflowTabBarItem","isOpen","onClose","reason","focus","overflowItemKey","overflowItems"],"mappings":"+YAgC0DA,MACxDA,EAAKC,OACLA,EAAS,UAASC,QAClBA,EAAU,WAAUC,KACpBA,EAAO,KAAIC,KACXA,EAAO,MAAKC,UACZA,EAASC,WACTA,EAAUC,SACVA,EAAQC,SACRA,EACA,aAAcC,EACd,kBAAmBC,EAAcC,kBACjCA,EAAiBC,OACjBA,IAEA,MAQMC,EAA2B,YAAZX,EARK,CACxBA,QAASA,GAEkB,CAC3BA,QAASA,EACTC,KAAMA,GAIFW,EAAUC,SAAuB,MACjCC,EAAYC,EAAAA,aAEXC,EAAgBC,GAAqBC,EAAQA,UAAU,GAExDC,EAAqBN,UAAgB,GAYrCO,EAAeC,eAClBC,IACiB,SAAZA,EAAEC,MAEAJ,EAAmBK,QACrB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GrCU,EAAAA,IAACuB,EAAAA,WAAU,CACTjC,QAASD,EAAKC,QACdsB,MAAOvB,EAAKuB,MACZC,KAAMxB,EAAKwB,KACXC,MAAOzB,EAAKyB,MACZC,SAAU1B,EAAK0B,SACfC,SAAU3B,EAAK2B,SAAQ,gBACR3B,EAAK4B,WACpBC,cAAezB,GAAW0B,IAAI9B,EAAKC,aAIxB,MAApBE,GAA4BA,EAAiBe,OAAS,GACrDP,EAAAqB,IAACG,EAAkBA,mBAAA,CACjBC,OAAQhD,EACRiD,QAjGW3C,IACfR,EAAUU,SAAW,CAAC,aAAc,aAAawB,SAAS1B,EAAE4C,SAC9DpD,GAAWU,SAAS2C,QAEL,qBAAb7C,EAAE4C,SACJ/C,EAAmBK,SAAU,GAE/BP,GAAkB,EAAM,EA2FhBmD,gBAvEc,OAwEdC,cAAevE,EAAMiD,QAAQnB,GAASG,GAAkBiB,SAASpB,EAAKC,iBAMlF"}
@@ -1,2 +1,2 @@
1
- define(['exports', 'preact/jsx-runtime', 'preact', 'preact/hooks', './useTranslationBundle-e4dd341e', './clientHints-6d361eaa', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './classNames-08d99695', './Icon-1e9e773e', './useTabBarContext-15a23bb6', './Dropdown-68f5424a', './Sheet-2f362cd6', './BaseTabBarItem-bdd9ea3b', './UNSAFE_TabBarCommon/themes/OverflowTabBarItemStyles.css', './NavigationListItem-e59797c5', './NavigationListLinkItem-82fd633c', './RemovableNavigationListItem-257c9f29'], (function(e,a,t,n,s,o,i,l,r,c,d,m,u,b,f,v,g,h){"use strict";const p=e=>a.jsx(c.Icon,{viewBox:"0 0 24 24",...e,children:a.jsx("g",{fill:"none",children:a.jsx("path",{d:"M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z",fill:"currentcolor"})})});const x=()=>{const{deviceRenderMode:e}=o.getClientHints();return"phone"===e};e.OverflowTabBarItem=function({overflowItemKey:e,icon:o,badge:c,overflowItems:y,isOpen:I,onClose:j}){const{selection:B,showFocusRing:C,isEdgeBottom:w,onSelect:R,onRemove:K,layout:L}=d.useTabBarContext(),N=n.useRef(!1);n.useEffect((()=>{I||(N.current=!1)}),[I]);const k=n.useRef(null),O=t.createRef(),T=n.useCallback((e=>{"pointer"===e.reason&&(N.current=!0),R?.({value:e.value}),j?.({reason:"itemAction"})}),[R,j]),F=n.useCallback((e=>{j?.({reason:e.reason})}),[j]),S=n.useCallback((()=>{j?.({reason:"dismissed"})}),[j]),D=C&&!N.current&&!x(),z=y?.find((e=>e.itemKey===B))?.tabPanelId,A=s.useTranslationBundle("@oracle/oraclejet-preact"),E=void 0!==B&&(H=B,null!=y?.find((e=>e.itemKey===H)));var H;const M=i.mergeInterpolations([...Object.values(l.flexitemInterpolations)])({flex:"stretch"===L?"1 0 auto":"0 0 auto"}),P=r.classNames([f.styles.navContainerBase]),U=n.useRef(null),_=n.useCallback((e=>{"ArrowDown"===e.key&&(e.preventDefault(),O.current?.focus())}),[O]),q=n.useCallback((()=>a.jsx("div",{onKeyDown:_,tabIndex:0,ref:U,class:P,children:a.jsx(v.NavigationList,{ref:O,selection:B,onSelectionChange:T,onRemove:K,children:y?.map((e=>null!=e.href?a.jsx(g.NavigationListLinkItem,{href:e.href,itemKey:e.itemKey,label:e.label,badge:e.badge,metadata:e.metadata,severity:e.severity}):e.isRemovable?a.jsx(h.RemovableNavigationListItem,{itemKey:e.itemKey,label:e.label,badge:e.badge,metadata:e.metadata,severity:e.severity}):a.jsx(v.NavigationListItem,{itemKey:e.itemKey,label:e.label,badge:e.badge,metadata:e.metadata,severity:e.severity})))})})),[_,P,O,B,T,K,y]);return a.jsxs(a.Fragment,{children:[y&&y.length>0&&a.jsx("div",{ref:k,style:M,children:a.jsx(b.BaseTabBarItem,{"aria-controls":z,itemKey:e,label:A.overflowItemLabel(),icon:o||a.jsx(p,{}),badge:c,showFocusRingOverride:D,selectionOverride:E,displayOverride:"icons","aria-haspopup":!0})}),x()?a.jsx(u.Sheet,{isOpen:I,onClose:S,initialFocus:"firstFocusable",children:q()}):a.jsx(m.Dropdown,{initialFocus:"firstFocusable",isOpen:I,onClose:F,placement:w?"top-end":"bottom-end",anchorRef:k,children:q()})]})}}));
2
- //# sourceMappingURL=OverflowTabBarItem-551bc390.js.map
1
+ define(['exports', 'preact/jsx-runtime', 'preact', 'preact/hooks', './useTranslationBundle-e4dd341e', './clientHints-6d361eaa', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './classNames-08d99695', './Icon-1e9e773e', './useTabBarContext-15a23bb6', './Dropdown-68f5424a', './Sheet-2f362cd6', './BaseTabBarItem-bdd9ea3b', './UNSAFE_TabBarCommon/themes/OverflowTabBarItemStyles.css', './NavigationListItem-672b4363', './NavigationListLinkItem-82fd633c', './RemovableNavigationListItem-257c9f29'], (function(e,a,t,n,s,o,i,l,r,c,d,m,u,b,f,v,g,h){"use strict";const p=e=>a.jsx(c.Icon,{viewBox:"0 0 24 24",...e,children:a.jsx("g",{fill:"none",children:a.jsx("path",{d:"M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z",fill:"currentcolor"})})});const x=()=>{const{deviceRenderMode:e}=o.getClientHints();return"phone"===e};e.OverflowTabBarItem=function({overflowItemKey:e,icon:o,badge:c,overflowItems:y,isOpen:I,onClose:j}){const{selection:B,showFocusRing:C,isEdgeBottom:w,onSelect:R,onRemove:K,layout:L}=d.useTabBarContext(),N=n.useRef(!1);n.useEffect((()=>{I||(N.current=!1)}),[I]);const k=n.useRef(null),O=t.createRef(),T=n.useCallback((e=>{"pointer"===e.reason&&(N.current=!0),R?.({value:e.value}),j?.({reason:"itemAction"})}),[R,j]),F=n.useCallback((e=>{j?.({reason:e.reason})}),[j]),S=n.useCallback((()=>{j?.({reason:"dismissed"})}),[j]),D=C&&!N.current&&!x(),z=y?.find((e=>e.itemKey===B))?.tabPanelId,A=s.useTranslationBundle("@oracle/oraclejet-preact"),E=void 0!==B&&(H=B,null!=y?.find((e=>e.itemKey===H)));var H;const M=i.mergeInterpolations([...Object.values(l.flexitemInterpolations)])({flex:"stretch"===L?"1 0 auto":"0 0 auto"}),P=r.classNames([f.styles.navContainerBase]),U=n.useRef(null),_=n.useCallback((e=>{"ArrowDown"===e.key&&(e.preventDefault(),O.current?.focus())}),[O]),q=n.useCallback((()=>a.jsx("div",{onKeyDown:_,tabIndex:0,ref:U,class:P,children:a.jsx(v.NavigationList,{ref:O,selection:B,onSelectionChange:T,onRemove:K,children:y?.map((e=>null!=e.href?a.jsx(g.NavigationListLinkItem,{href:e.href,itemKey:e.itemKey,label:e.label,badge:e.badge,metadata:e.metadata,severity:e.severity}):e.isRemovable?a.jsx(h.RemovableNavigationListItem,{itemKey:e.itemKey,label:e.label,badge:e.badge,metadata:e.metadata,severity:e.severity}):a.jsx(v.NavigationListItem,{itemKey:e.itemKey,label:e.label,badge:e.badge,metadata:e.metadata,severity:e.severity})))})})),[_,P,O,B,T,K,y]);return a.jsxs(a.Fragment,{children:[y&&y.length>0&&a.jsx("div",{ref:k,style:M,children:a.jsx(b.BaseTabBarItem,{"aria-controls":z,itemKey:e,label:A.overflowItemLabel(),icon:o||a.jsx(p,{}),badge:c,showFocusRingOverride:D,selectionOverride:E,displayOverride:"icons","aria-haspopup":!0})}),x()?a.jsx(u.Sheet,{isOpen:I,onClose:S,initialFocus:"firstFocusable",children:q()}):a.jsx(m.Dropdown,{initialFocus:"firstFocusable",isOpen:I,onClose:F,placement:w?"top-end":"bottom-end",anchorRef:k,children:q()})]})}}));
2
+ //# sourceMappingURL=OverflowTabBarItem-ca1e2612.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTabBarItem-551bc390.js","sources":["../../src/UNSAFE_RedwoodIcons/OverflowH/OverflowH.tsx","../../src/UNSAFE_TabBarCommon/OverflowTabBarItem.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates. All rights reserved.\n * https://www.oracle.com/contracts/docs/cloud_csa_online_v062223_us_eng.pdf?download=false&er=221886\n * @ignore\n */\n// DO NOT MODIFY THIS FILE MANUALLY!\n// This file is automatically generated based on the corresponding SVG image in\n// the packages/oraclejet-preact/resources/icons folder.\nimport { ComponentProps } from 'preact';\nimport { Icon } from '../../UNSAFE_Icon';\ntype Props = Omit<ComponentProps<typeof Icon>, 'viewBox' | 'children'>;\nconst SvgOverflowH = (props: Props) => (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <g fill=\"none\">\n <path\n d=\"M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z\"\n fill=\"currentcolor\"\n />\n </g>\n </Icon>\n);\nexport { SvgOverflowH as OverflowH };\n","import { ComponentChild, ComponentProps, createRef } from 'preact';\nimport { useCallback, useRef, useEffect } from 'preact/hooks';\nimport type { BundleType } from '../resources/nls/bundle';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport {\n NavigationListItem,\n NavigationList,\n RemovableNavigationListItem,\n FocusableHandle,\n NavigationListLinkItem\n} from '../UNSAFE_NavigationList';\nimport { OverflowH } from '../UNSAFE_RedwoodIcons/OverflowH';\nimport { useTabBarContext } from './useTabBarContext';\nimport { Dropdown } from '../UNSAFE_Dropdown';\nimport { Sheet } from '../UNSAFE_Sheet';\nimport { BaseTabBarItem } from './BaseTabBarItem';\nimport { styles } from './themes/OverflowTabBarItemStyles.css';\nimport { TabBarItem } from './TabBarItem';\n\nexport type OverflowSelectionDetail<K> = {\n value: K;\n};\n\nexport type CloseDetail = {\n /**\n * dismissed represents dismissing the DropDown\n */\n reason: 'dismissed' | 'itemAction' | 'outsideMousedown';\n};\n\nexport type Item<K extends string | number> = Omit<\n ComponentProps<typeof TabBarItem<K>>,\n 'testId' | 'aria-controls'\n> & {\n isRemovable?: boolean;\n /**\n * Accepts the tabpanel element's ID associated with the tab item\n **/\n tabPanelId?: string;\n /**\n * Sets the URL that the hyperlink points to.\n */\n href?: string;\n};\n\nexport type OverflowTabBarItemProps<K extends string | number> = {\n /**\n * Key of the TabBarItem\n */\n overflowItemKey: K;\n /**\n * Whether to open the popup\n */\n isOpen: boolean;\n /**\n * Property that triggers a callback when DropDown is supposed to be closed.\n */\n onClose?: (detail: CloseDetail) => void;\n /**\n * The icon of the OverflowTabBarItem\n */\n icon?: ComponentChild;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * An array of data used by NavigationList to render individual overflow items.\n */\n overflowItems?: Item<K>[];\n};\n\n/**\n * An OverflowTabBarItem renders TabBarItems in a device appropriate popup. OverflowTabBarItem is used internally in an OverflowTabBar.\n */\n\nexport function OverflowTabBarItem<K extends string | number>({\n overflowItemKey,\n icon,\n badge,\n overflowItems,\n isOpen,\n onClose\n}: OverflowTabBarItemProps<K>) {\n const { selection, showFocusRing, isEdgeBottom, onSelect, onRemove, layout } = useTabBarContext();\n\n const isPointerSelection = useRef<boolean>(false);\n\n // Reset pointer selection flag when the popup closes so keyboard navigation\n // restores focus-visible on the overflow trigger.\n useEffect(() => {\n if (!isOpen) {\n isPointerSelection.current = false;\n }\n }, [isOpen]);\n\n const overflowTabBarItemRef = useRef<HTMLDivElement>(null);\n const navigationListRef = createRef<FocusableHandle>();\n\n const handleSelectionChange = useCallback<\n Required<ComponentProps<typeof NavigationList>>['onSelectionChange']\n >(\n (detail: { value: string | number; reason?: 'pointer' | 'keyboard' }) => {\n if (detail.reason === 'pointer') {\n isPointerSelection.current = true;\n }\n onSelect?.({ value: detail.value });\n onClose?.({ reason: 'itemAction' });\n },\n [onSelect, onClose]\n );\n\n const handleDropdownClose = useCallback(\n (e: CloseDetail) => {\n onClose?.({ reason: e.reason });\n },\n [onClose]\n );\n\n const handleSheetClose = useCallback(() => {\n onClose?.({ reason: 'dismissed' });\n }, [onClose]);\n\n //When NavigationList steals focus the app resets it. Not always would it be reset to\n //parent of OverflowTabBarItem. Though currentKey would be correct, but focusRing would would not be visible\n //Hence we check for isPointerSelection.current\n\n const focusRingRequirement = showFocusRing && !isPointerSelection.current && !getIsMobile();\n\n const overflowContainsKey = (searchKey: K) => {\n return overflowItems?.find((item) => item.itemKey === searchKey) != null;\n };\n\n const currentPanelId = overflowItems?.find((item) => item.itemKey === selection)?.tabPanelId;\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const isSelected = selection !== undefined && overflowContainsKey(selection as K);\n\n //instead of specifying flex: '1 0 auto' in cssProps var\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const navContainerClasses = classNames([styles.navContainerBase]);\n\n const navContainerRef = useRef<HTMLDivElement>(null);\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n navigationListRef.current?.focus();\n }\n },\n [navigationListRef]\n );\n const getNavigationList = useCallback(() => {\n return (\n <div onKeyDown={handleKeyDown} tabIndex={0} ref={navContainerRef} class={navContainerClasses}>\n <NavigationList\n ref={navigationListRef}\n selection={selection}\n onSelectionChange={handleSelectionChange}\n onRemove={onRemove}>\n {overflowItems?.map((item) =>\n item.href != null ? (\n <NavigationListLinkItem\n href={item.href}\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : item.isRemovable ? (\n <RemovableNavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : (\n <NavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n )\n )}\n </NavigationList>\n </div>\n );\n }, [\n handleKeyDown,\n navContainerClasses,\n navigationListRef,\n selection,\n handleSelectionChange,\n onRemove,\n overflowItems\n ]);\n\n return (\n <>\n {overflowItems && overflowItems.length > 0 && (\n <div ref={overflowTabBarItemRef} style={flexDimensions}>\n <BaseTabBarItem\n aria-controls={currentPanelId}\n itemKey={overflowItemKey}\n label={translations.overflowItemLabel()}\n icon={icon ? icon : <OverflowH />}\n badge={badge}\n showFocusRingOverride={focusRingRequirement}\n selectionOverride={isSelected}\n displayOverride={'icons'}\n aria-haspopup={true}\n />\n </div>\n )}\n {getIsMobile() ? (\n <Sheet isOpen={isOpen} onClose={handleSheetClose} initialFocus=\"firstFocusable\">\n {getNavigationList()}\n </Sheet>\n ) : (\n <Dropdown\n initialFocus=\"firstFocusable\"\n isOpen={isOpen}\n onClose={handleDropdownClose}\n placement={isEdgeBottom ? 'top-end' : 'bottom-end'}\n anchorRef={overflowTabBarItemRef}>\n {getNavigationList()}\n </Dropdown>\n )}\n </>\n );\n}\n\nconst getIsMobile = () => {\n const { deviceRenderMode } = getClientHints();\n return deviceRenderMode === 'phone';\n};\n"],"names":["SvgOverflowH","props","_jsx","jsx","Icon","viewBox","children","fill","d","getIsMobile","deviceRenderMode","getClientHints","overflowItemKey","icon","badge","overflowItems","isOpen","onClose","selection","showFocusRing","isEdgeBottom","onSelect","onRemove","layout","useTabBarContext","isPointerSelection","useRef","useEffect","current","overflowTabBarItemRef","navigationListRef","createRef","handleSelectionChange","useCallback","detail","reason","value","handleDropdownClose","e","handleSheetClose","focusRingRequirement","currentPanelId","find","item","itemKey","tabPanelId","translations","useTranslationBundle","isSelected","undefined","searchKey","flexDimensions","mergeInterpolations","Object","values","flexitemInterpolations","styleInterpolations","flex","navContainerClasses","classNames","styles","navContainerBase","navContainerRef","handleKeyDown","event","key","preventDefault","focus","getNavigationList","onKeyDown","tabIndex","ref","class","NavigationList","onSelectionChange","map","href","NavigationListLinkItem","label","metadata","severity","isRemovable","RemovableNavigationListItem","NavigationListItem","_jsxs","jsxs","_Fragment","Fragment","length","style","BaseTabBarItem","overflowItemLabel","OverflowH","showFocusRingOverride","selectionOverride","displayOverride","Sheet","initialFocus","Dropdown","placement","anchorRef"],"mappings":"oiBAYA,MAAMA,EAAgBC,GACpBC,EAAAC,IAACC,EAAIA,KAAC,CAAAC,QAAQ,eAAgBJ,EAAKK,SACjCJ,EAAAA,IAAG,IAAA,CAAAK,KAAK,OACND,SAAAJ,MAAA,OAAA,CACEM,EAAE,uGACFD,KAAK,qBCuOb,MAAME,EAAc,KAClB,MAAMC,iBAAEA,GAAqBC,EAAAA,iBAC7B,MAA4B,UAArBD,CAA4B,uBAzKrB,UAA8CE,gBAC5DA,EAAeC,KACfA,EAAIC,MACJA,EAAKC,cACLA,EAAaC,OACbA,EAAMC,QACNA,IAEA,MAAMC,UAAEA,EAASC,cAAEA,EAAaC,aAAEA,EAAYC,SAAEA,EAAQC,SAAEA,EAAQC,OAAEA,GAAWC,EAAAA,mBAEzEC,EAAqBC,UAAgB,GAI3CC,EAAAA,WAAU,KACHX,IACHS,EAAmBG,SAAU,EAC9B,GACA,CAACZ,IAEJ,MAAMa,EAAwBH,SAAuB,MAC/CI,EAAoBC,EAAAA,YAEpBC,EAAwBC,eAG3BC,IACuB,YAAlBA,EAAOC,SACTV,EAAmBG,SAAU,GAE/BP,IAAW,CAAEe,MAAOF,EAAOE,QAC3BnB,IAAU,CAAEkB,OAAQ,cAAe,GAErC,CAACd,EAAUJ,IAGPoB,EAAsBJ,eACzBK,IACCrB,IAAU,CAAEkB,OAAQG,EAAEH,QAAS,GAEjC,CAAClB,IAGGsB,EA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C,QAASD,EAAKC,QACdkC,MAAOnC,EAAKmC,MACZhE,MAAO6B,EAAK7B,MACZiE,SAAUpC,EAAKoC,SACfC,SAAUrC,EAAKqC,kBAO1B,CACDjB,EACAL,EACA5B,EACAZ,EACAc,EACAV,EACAP,IAGF,OACEqE,EAAAC,KAAAC,EAAAC,SAAA,CAAAjF,SAAA,CACGS,GAAiBA,EAAcyE,OAAS,GACvCtF,EAAAA,IAAA,MAAA,CAAKqE,IAAK1C,EAAuB4D,MAAOtC,EACtC7C,SAAAJ,EAAAA,IAACwF,EAAAA,eACgB,CAAA,gBAAAjD,EACfG,QAAShC,EACTkE,MAAOhC,EAAa6C,oBACpB9E,KAAMA,GAAcX,EAAAC,IAACyF,EAAY,CAAA,GACjC9E,MAAOA,EACP+E,sBAAuBrD,EACvBsD,kBAAmB9C,EACnB+C,gBAAiB,yBACF,MAIpBtF,IACCP,EAAAC,IAAC6F,QAAK,CAAChF,OAAQA,EAAQC,QAASsB,EAAkB0D,aAAa,0BAC5D7B,MAGHlE,EAAAA,IAACgG,EAAAA,SAAQ,CACPD,aAAa,iBACbjF,OAAQA,EACRC,QAASoB,EACT8D,UAAW/E,EAAe,UAAY,aACtCgF,UAAWvE,EACVvB,SAAA8D,QAKX"}
1
+ {"version":3,"file":"OverflowTabBarItem-ca1e2612.js","sources":["../../src/UNSAFE_RedwoodIcons/OverflowH/OverflowH.tsx","../../src/UNSAFE_TabBarCommon/OverflowTabBarItem.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates. All rights reserved.\n * https://www.oracle.com/contracts/docs/cloud_csa_online_v062223_us_eng.pdf?download=false&er=221886\n * @ignore\n */\n// DO NOT MODIFY THIS FILE MANUALLY!\n// This file is automatically generated based on the corresponding SVG image in\n// the packages/oraclejet-preact/resources/icons folder.\nimport { ComponentProps } from 'preact';\nimport { Icon } from '../../UNSAFE_Icon';\ntype Props = Omit<ComponentProps<typeof Icon>, 'viewBox' | 'children'>;\nconst SvgOverflowH = (props: Props) => (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <g fill=\"none\">\n <path\n d=\"M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z\"\n fill=\"currentcolor\"\n />\n </g>\n </Icon>\n);\nexport { SvgOverflowH as OverflowH };\n","import { ComponentChild, ComponentProps, createRef } from 'preact';\nimport { useCallback, useRef, useEffect } from 'preact/hooks';\nimport type { BundleType } from '../resources/nls/bundle';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport {\n NavigationListItem,\n NavigationList,\n RemovableNavigationListItem,\n FocusableHandle,\n NavigationListLinkItem\n} from '../UNSAFE_NavigationList';\nimport { OverflowH } from '../UNSAFE_RedwoodIcons/OverflowH';\nimport { useTabBarContext } from './useTabBarContext';\nimport { Dropdown } from '../UNSAFE_Dropdown';\nimport { Sheet } from '../UNSAFE_Sheet';\nimport { BaseTabBarItem } from './BaseTabBarItem';\nimport { styles } from './themes/OverflowTabBarItemStyles.css';\nimport { TabBarItem } from './TabBarItem';\n\nexport type OverflowSelectionDetail<K> = {\n value: K;\n};\n\nexport type CloseDetail = {\n /**\n * dismissed represents dismissing the DropDown\n */\n reason: 'dismissed' | 'itemAction' | 'outsideMousedown';\n};\n\nexport type Item<K extends string | number> = Omit<\n ComponentProps<typeof TabBarItem<K>>,\n 'testId' | 'aria-controls'\n> & {\n isRemovable?: boolean;\n /**\n * Accepts the tabpanel element's ID associated with the tab item\n **/\n tabPanelId?: string;\n /**\n * Sets the URL that the hyperlink points to.\n */\n href?: string;\n};\n\nexport type OverflowTabBarItemProps<K extends string | number> = {\n /**\n * Key of the TabBarItem\n */\n overflowItemKey: K;\n /**\n * Whether to open the popup\n */\n isOpen: boolean;\n /**\n * Property that triggers a callback when DropDown is supposed to be closed.\n */\n onClose?: (detail: CloseDetail) => void;\n /**\n * The icon of the OverflowTabBarItem\n */\n icon?: ComponentChild;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * An array of data used by NavigationList to render individual overflow items.\n */\n overflowItems?: Item<K>[];\n};\n\n/**\n * An OverflowTabBarItem renders TabBarItems in a device appropriate popup. OverflowTabBarItem is used internally in an OverflowTabBar.\n */\n\nexport function OverflowTabBarItem<K extends string | number>({\n overflowItemKey,\n icon,\n badge,\n overflowItems,\n isOpen,\n onClose\n}: OverflowTabBarItemProps<K>) {\n const { selection, showFocusRing, isEdgeBottom, onSelect, onRemove, layout } = useTabBarContext();\n\n const isPointerSelection = useRef<boolean>(false);\n\n // Reset pointer selection flag when the popup closes so keyboard navigation\n // restores focus-visible on the overflow trigger.\n useEffect(() => {\n if (!isOpen) {\n isPointerSelection.current = false;\n }\n }, [isOpen]);\n\n const overflowTabBarItemRef = useRef<HTMLDivElement>(null);\n const navigationListRef = createRef<FocusableHandle>();\n\n const handleSelectionChange = useCallback<\n Required<ComponentProps<typeof NavigationList>>['onSelectionChange']\n >(\n (detail: { value: string | number; reason?: 'pointer' | 'keyboard' }) => {\n if (detail.reason === 'pointer') {\n isPointerSelection.current = true;\n }\n onSelect?.({ value: detail.value });\n onClose?.({ reason: 'itemAction' });\n },\n [onSelect, onClose]\n );\n\n const handleDropdownClose = useCallback(\n (e: CloseDetail) => {\n onClose?.({ reason: e.reason });\n },\n [onClose]\n );\n\n const handleSheetClose = useCallback(() => {\n onClose?.({ reason: 'dismissed' });\n }, [onClose]);\n\n //When NavigationList steals focus the app resets it. Not always would it be reset to\n //parent of OverflowTabBarItem. Though currentKey would be correct, but focusRing would would not be visible\n //Hence we check for isPointerSelection.current\n\n const focusRingRequirement = showFocusRing && !isPointerSelection.current && !getIsMobile();\n\n const overflowContainsKey = (searchKey: K) => {\n return overflowItems?.find((item) => item.itemKey === searchKey) != null;\n };\n\n const currentPanelId = overflowItems?.find((item) => item.itemKey === selection)?.tabPanelId;\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const isSelected = selection !== undefined && overflowContainsKey(selection as K);\n\n //instead of specifying flex: '1 0 auto' in cssProps var\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const navContainerClasses = classNames([styles.navContainerBase]);\n\n const navContainerRef = useRef<HTMLDivElement>(null);\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n navigationListRef.current?.focus();\n }\n },\n [navigationListRef]\n );\n const getNavigationList = useCallback(() => {\n return (\n <div onKeyDown={handleKeyDown} tabIndex={0} ref={navContainerRef} class={navContainerClasses}>\n <NavigationList\n ref={navigationListRef}\n selection={selection}\n onSelectionChange={handleSelectionChange}\n onRemove={onRemove}>\n {overflowItems?.map((item) =>\n item.href != null ? (\n <NavigationListLinkItem\n href={item.href}\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : item.isRemovable ? (\n <RemovableNavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : (\n <NavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n )\n )}\n </NavigationList>\n </div>\n );\n }, [\n handleKeyDown,\n navContainerClasses,\n navigationListRef,\n selection,\n handleSelectionChange,\n onRemove,\n overflowItems\n ]);\n\n return (\n <>\n {overflowItems && overflowItems.length > 0 && (\n <div ref={overflowTabBarItemRef} style={flexDimensions}>\n <BaseTabBarItem\n aria-controls={currentPanelId}\n itemKey={overflowItemKey}\n label={translations.overflowItemLabel()}\n icon={icon ? icon : <OverflowH />}\n badge={badge}\n showFocusRingOverride={focusRingRequirement}\n selectionOverride={isSelected}\n displayOverride={'icons'}\n aria-haspopup={true}\n />\n </div>\n )}\n {getIsMobile() ? (\n <Sheet isOpen={isOpen} onClose={handleSheetClose} initialFocus=\"firstFocusable\">\n {getNavigationList()}\n </Sheet>\n ) : (\n <Dropdown\n initialFocus=\"firstFocusable\"\n isOpen={isOpen}\n onClose={handleDropdownClose}\n placement={isEdgeBottom ? 'top-end' : 'bottom-end'}\n anchorRef={overflowTabBarItemRef}>\n {getNavigationList()}\n </Dropdown>\n )}\n </>\n );\n}\n\nconst getIsMobile = () => {\n const { deviceRenderMode } = getClientHints();\n return deviceRenderMode === 'phone';\n};\n"],"names":["SvgOverflowH","props","_jsx","jsx","Icon","viewBox","children","fill","d","getIsMobile","deviceRenderMode","getClientHints","overflowItemKey","icon","badge","overflowItems","isOpen","onClose","selection","showFocusRing","isEdgeBottom","onSelect","onRemove","layout","useTabBarContext","isPointerSelection","useRef","useEffect","current","overflowTabBarItemRef","navigationListRef","createRef","handleSelectionChange","useCallback","detail","reason","value","handleDropdownClose","e","handleSheetClose","focusRingRequirement","currentPanelId","find","item","itemKey","tabPanelId","translations","useTranslationBundle","isSelected","undefined","searchKey","flexDimensions","mergeInterpolations","Object","values","flexitemInterpolations","styleInterpolations","flex","navContainerClasses","classNames","styles","navContainerBase","navContainerRef","handleKeyDown","event","key","preventDefault","focus","getNavigationList","onKeyDown","tabIndex","ref","class","NavigationList","onSelectionChange","map","href","NavigationListLinkItem","label","metadata","severity","isRemovable","RemovableNavigationListItem","NavigationListItem","_jsxs","jsxs","_Fragment","Fragment","length","style","BaseTabBarItem","overflowItemLabel","OverflowH","showFocusRingOverride","selectionOverride","displayOverride","Sheet","initialFocus","Dropdown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EAAAA,eACgB,CAAA,gBAAAjD,EACfG,QAAShC,EACTkE,MAAOhC,EAAa6C,oBACpB9E,KAAMA,GAAcX,EAAAC,IAACyF,EAAY,CAAA,GACjC9E,MAAOA,EACP+E,sBAAuBrD,EACvBsD,kBAAmB9C,EACnB+C,gBAAiB,yBACF,MAIpBtF,IACCP,EAAAC,IAAC6F,QAAK,CAAChF,OAAQA,EAAQC,QAASsB,EAAkB0D,aAAa,0BAC5D7B,MAGHlE,EAAAA,IAACgG,EAAAA,SAAQ,CACPD,aAAa,iBACbjF,OAAQA,EACRC,QAASoB,EACT8D,UAAW/E,EAAe,UAAY,aACtCgF,UAAWvE,EACVvB,SAAA8D,QAKX"}
@@ -1,2 +1,2 @@
1
- define(['exports', './Chart-44c6404b', 'preact/jsx-runtime', './PRIVATE_Chart/themes/ChartStyles.css', 'css!./ChartStyles.styles.css', './TrackResizeContainer-d8fa612c', 'preact/hooks', './useSize-165f7da4', './useResizeObserver-25032462', './useAddBusyState-8ed5cc58', './BusyStateContext-ab2c549a', 'preact', './useBusyStateContext-26bb2acb', './unsafeDomAccess-602c5dde', './size-114c63df', './utils-9a3f9606', './themeContract.css-b6ec3943', './colorUtils-b9dc1bd1', './_curry1-df649359', './UNSAFE_visErrors', './useTextDimensions-f254e8f5', './clientHints-6d361eaa', './useCssVars-3194b2f6', './useUser-08901aba', './LayerHost-0b288129', './index-055933ab', 'preact/compat', './UNSAFE_Layer/themes/LayerHostStyles.css', 'css!./LayerHostStyles.styles.css', './useTheme-da27e1d1', './useColorScheme-097c31ff', './useScale-04a448c3', './ReferenceLineArea-450530dd', './PRIVATE_PlotArea/themes/PlotAreaStyles.css', 'css!./PlotAreaStyles.styles.css', './hooks/PRIVATE_useVisDnd/themes/VisDndStyles.css', 'css!./VisDndStyles.styles.css', './classNames-08d99695', './utils-8bf50f08', './getLocale-ae79e654', './stringUtils-4ffd9d59', './labelUtils-c05e2f28', './textUtils-ae0a246c', './accUtils-7e057eef', './utils-cd60c9d4', './datatipUtils-6846028e', './clientUtils-df9caee0', './dimensionUtils-61978138', './scale-2f3251e1', './lineUtils-3b56374d', './useId-c9578d26', './Axis-7b649fe2', './PRIVATE_Axis/themes/AxisStyles.css', 'css!./AxisStyles.styles.css', './MultilineText-a4fcc3cb', './PRIVATE_Axis/themes/redwood/AxisTheme', './PRIVATE_Axis/themes/redwood/AxisBaseTheme.css', 'module', './PRIVATE_Axis/themes/redwood/AxisVariants.css', './vanilla-extract-recipes-createRuntimeFn.esm-d881c69a', './useComponentTheme-db55de25', './logger-00b673c5', './useChartViewport-ef746160', './eventsUtils-1f5dc91a', './usePinch-fc8ed928', './usePointerGesture-1c1dd806', './mergeProps-bcfa6a92', './useChartNav-0cd4f614', './layoutUtils-517a546d', './useVisHover-28319fef', './ScrollBar-fae26188', './PRIVATE_ChartScrollBar/themes/ScrollBarStyles.css', 'css!./ScrollBarStyles.styles.css', './useSelectDrill-b650174d', './useChartDataCursor-670b8448', './hooks/PRIVATE_useChartDataCursor/themes/DataCursorStyles.css', 'css!./DataCursorStyles.styles.css', './Marker-cf672e83', 'css!./SvgShapesStyles.styles.css', './useChartDatatip-570d6077', './useDatatip-a1713300', './Layer-1971eddb', './UNSAFE_Layer/themes/LayerStyles.css', 'css!./LayerStyles.styles.css', './useThemeInterpolations-cc05b0f0', './theme-a8f3d819', './Theme-d945adae', './mergeInterpolations-9ede4cf7', './mergeDeepWithKey-aaab9019', './_curry3-83878f86', './_curry2-86c52b86', './_isObject-42bafc94', './useDensity-8a10fc70', './Floating-eca152d7', './useFloating-5cb85d2b', './positionUtils-6e4daa31', './refUtils-77e97004', './useOutsideClick-b9b661a4', './arrayUtils-6ee96a35', './useModal-536cb7ff', './UNSAFE_Floating/themes/redwood/FloatingTheme', './UNSAFE_Floating/themes/FloatingStyles.css', 'css!./FloatingStyles.styles.css', './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.css', 'module', './UNSAFE_Floating/themes/redwood/FloatingVariants.css', './vanilla-extract-dynamic.esm-6065bbd7', './UNSAFE_Floating/themes/FloatingContract.css', './useUnsafeDomElementRef-75afb461', './hooks/PRIVATE_useDatatip/themes/useDatatip.css', 'css!./useDatatip.styles.css', './VisTabularDatatip-93d56ae8', './PRIVATE_VisTabularDatatip/themes/VisTabularDatatipStyles.css', 'css!./VisTabularDatatipStyles.styles.css', './colorUtils-1c8d0c00', './useChartDrill-d320dd10', './useVisDrill-7dce7e9a', './useDoubleTap-b6bf5458', './clientUtils-f1eea2db', './useSelection-5cb56713', './BaseButton-d0f59de5', './useHover-8b8a1496', './useToggle-a29f97af', './useActive-bb5dc069', './dimensions-95c0c920', './UNSAFE_BaseButton/themes/redwood/BaseButtonTheme', './UNSAFE_BaseButton/themes/BaseButtonStyles.css', 'css!./BaseButtonStyles.styles.css', './UNSAFE_BaseButton/themes/redwood/BaseButtonVariants.css', 'module', './BareButton-d02b4870', './useBareButton-0afa84c2', './usePress-949a0d03', './usePressClick-b5bf4243', './TabbableModeContext-a9c97640', './useTabbableMode-0a9ef009', './buttonUtils-cbbb0130', './id-c70ab33c', './useTestId-f4240cbd', './Text-31cabc49', './UNSAFE_Text/themes/TextStyles.css', 'css!./TextStyles.styles.css', './useTranslationBundle-e4dd341e', './hooks/PRIVATE_useVisSelection/themes/ClearSelection.css', 'css!./ClearSelection.styles.css', './cssUtils-af3bf5fd', './useChartContextMenu-e5e5aa80', './useContextMenu-2070c875', './Menu-4e8c7340', './Sheet-2f362cd6', './Modal-95bf034f', './UNSAFE_Modal/themes/ModalStyles.css', 'css!./ModalStyles.styles.css', './tabbableUtils-f95361a6', './head-9cb1a3da', './_arity-5a5f5f71', './_isArray-32602db6', './_isString-d0ada3cb', './popupUtils-d42db8bf', './WindowOverlay-3293b108', './UNSAFE_WindowOverlay/themes/WindowOverlayStyles.css', 'css!./WindowOverlayStyles.styles.css', './UNSAFE_WindowOverlay/themes/WindowOverlayContract.css', './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayTheme', './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.css', 'module', './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayVariants.css', './UNSAFE_Sheet/themes/SheetStyles.css', 'css!./SheetStyles.styles.css', './useAnimationStatus-0cae3dff', './useAnimation-d90c433f', './animationUtils-716a9aa6', './Dropdown-68f5424a', './keyboardUtils-fb6219eb', './usePopupAnimation-dc282b02', './popupAnimationUtils-49b93365', './CollectionInteractionContext-0b4ed98b', './UNSAFE_Dropdown/themes/dropdownStyles.css', 'css!./dropdownStyles.styles.css', './useOutsideMousedown-cb88da60', './useEffectEvent-6aa4d559', './menuUtils-8e42385f', './MenuItem-0e04f165', './flexitem-5db48325', 'css!./flexitem.styles.css', './vanilla-extract-sprinkles-createRuntimeSprinkles.esm-84d30764', './useInteractionStyle-15a2bdd0', './UNSAFE_Menu/themes/redwood/MenuItemTheme', './UNSAFE_Menu/themes/MenuItemStyles.css', 'css!./MenuItemStyles.styles.css', './UNSAFE_Menu/themes/redwood/MenuItemBaseTheme.css', 'module', './UNSAFE_Menu/themes/redwood/MenuItemVariants.css', 'css!./MenuItemVariants.styles.css', './UNSAFE_Menu/themes/MenuStyles.css', 'css!./MenuStyles.styles.css', './UNSAFE_Menu/themes/DropdownMenuStyles.css', 'css!./DropdownMenuStyles.styles.css', './Flex-4b81b412', './boxalignment-8d80de7e', 'css!./boxalignment.styles.css', './flexbox-8521f6aa', 'css!./flexbox.styles.css', 'css!./FlexStyles.styles.css', './Skeleton-a12452e9', './borders-e15a6927', './UNSAFE_Skeleton/themes/redwood/SkeletonTheme', './UNSAFE_Skeleton/themes/SkeletonStyles.css', 'css!./SkeletonStyles.styles.css', './UNSAFE_Skeleton/themes/redwood/SkeletonBaseTheme.css', 'module', './UNSAFE_Skeleton/themes/redwood/SkeletonVariants.css', './UNSAFE_Menu/themes/MenuSkeletonStyles.css', 'css!./MenuSkeletonStyles.styles.css', './LiveRegion-dbefb95b', 'css!./LiveRegionStyles.styles.css', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', 'css!./TooltipContentVariants.styles.css', './tooltipUtils-d855e8f2', './EnvironmentProvider-403bf554', './LayerManager-426c669d', 'css!./IconStyle.styles.css', './SelectMenuGroupContext-67f24a8f', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./SeparatorStyles.styles.css', 'css!./MenuSeparatorStyles.styles.css', 'module', './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css', './useContextMenuGesture-750ef2c6', './textSelectionUtils-3022f002', './useChartDnd-cee046fb', './utils-bd8f2a3c', './useDnd-33ec1cdf', './useTooltip-31ac71c4', './useTooltipControlled-e7021312', './useFocus-4194fc59', './useTouch-37489bb5', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentTheme', './hooks/UNSAFE_useTooltip/themes/TooltipContentStyles.css', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.css', './useChartMarquee-3e8fb905', './useVisDragModeControls-5af02996', './Button-caed9f15', './Icon-1e9e773e', './UNSAFE_Icon/themes/IconStyle.css', './Move-cdc81b93', './hooks/PRIVATE_useVisDragModeControls/themes/useVisDragModeControls.css', 'css!./useVisDragModeControls.styles.css', './ZoomAlt-e2983051', './ButtonSetSingle-bf1b8c68', './useButtonSetContext-dffdaea3', './ButtonSet-9f26cc51', './UNSAFE_ButtonSet/themes/ButtonSetStyles.css', 'css!./ButtonSetStyles.styles.css', './ButtonSetPositionContext-fd98cc11', './toggleButtonUtils-0ebe4c56', './useRovingTabIndexContainer-9aa2fbcf', './ButtonSetItem-adf6c384', './ButtonSetButton-c66d1474', './ToggleButtonLabel-f1664301', './ButtonLabelLayout-c93ed2fa', './useButtonLabelLayoutTheme-a14fb6b8', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme', './UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css', 'css!./ButtonLabelLayoutStyles.styles.css', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutBaseTheme.css', 'module', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutVariants.css', 'css!./ButtonLabelLayoutVariants.styles.css', './HiddenAccessible-037ef42d', 'css!./HiddenAccessibleStyles.styles.css', './ButtonSetIconButton-9a13b644', './useButtonSetPositionContext-b8534679', './IconToggleButton-a7d5d3cf', './useToggleAction-59741954', './hooks/PRIVATE_useChartMarquee/themes/useChartMarquee.css', 'css!./useChartMarquee.styles.css', './useVisTouchResponse-88a7bb09', './useOverviewContext-dd00c487', './OverviewSlidingWindow-fc942dfa', './PRIVATE_VisOverview/themes/VisOverview.css', 'css!./VisOverview.styles.css', './DragH-ce9355f9'], (function(e,s,t,o,a,l,n,c,i,r,d,u,S,y,h,m,b,f,A,T,U,B,_,E,F,p,w,C,M,N,x,V,g,v,L,I,D,k,P,R,O,W,H,q,z,j,G,K,Z,J,Q,X,Y,$,ee,se,te,oe,ae,le,ne,ce,ie,re,de,ue,Se,ye,he,me,be,fe,Ae,Te,Ue,Be,_e,Ee,Fe,pe,we,Ce,Me,Ne,xe,Ve,ge,ve,Le,Ie,De,ke,Pe,Re,Oe,We,He,qe,ze,je,Ge,Ke,Ze,Je,Qe,Xe,Ye,$e,es,ss,ts,os,as,ls,ns,cs,is,rs,ds,us,Ss,ys,hs,ms,bs,fs,As,Ts,Us,Bs,_s,Es,Fs,ps,ws,Cs,Ms,Ns,xs,Vs,gs,vs,Ls,Is,Ds,ks,Ps,Rs,Os,Ws,Hs,qs,zs,js,Gs,Ks,Zs,Js,Qs,Xs,Ys,$s,et,st,tt,ot,at,lt,nt,ct,it,rt,dt,ut,St,yt,ht,mt,bt,ft,At,Tt,Ut,Bt,_t,Et,Ft,pt,wt,Ct,Mt,Nt,xt,Vt,gt,vt,Lt,It,Dt,kt,Pt,Rt,Ot,Wt,Ht,qt,zt,jt,Gt,Kt,Zt,Jt,Qt,Xt,Yt,$t,eo,so,to,oo,ao,lo,no,co,io,ro,uo,So,yo,ho,mo,bo,fo,Ao,To,Uo,Bo,_o,Eo,Fo,po,wo,Co,Mo,No,xo,Vo,go,vo,Lo,Io,Do,ko,Po,Ro,Oo,Wo,Ho,qo,zo,jo,Go,Ko,Zo,Jo,Qo,Xo,Yo,$o,ea,sa,ta,oa,aa,la,na,ca,ia,ra,da,ua,Sa,ya,ha,ma){"use strict";e.Chart=s.Chart,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ define(['exports', './Chart-18ff7280', 'preact/jsx-runtime', './PRIVATE_Chart/themes/ChartStyles.css', 'css!./ChartStyles.styles.css', './TrackResizeContainer-d8fa612c', 'preact/hooks', './useSize-165f7da4', './useResizeObserver-25032462', './useAddBusyState-8ed5cc58', './BusyStateContext-ab2c549a', 'preact', './useBusyStateContext-26bb2acb', './unsafeDomAccess-602c5dde', './size-114c63df', './utils-9a3f9606', './themeContract.css-b6ec3943', './colorUtils-b9dc1bd1', './_curry1-df649359', './UNSAFE_visErrors', './useTextDimensions-f254e8f5', './clientHints-6d361eaa', './useCssVars-3194b2f6', './useUser-08901aba', './LayerHost-0b288129', './index-055933ab', 'preact/compat', './UNSAFE_Layer/themes/LayerHostStyles.css', 'css!./LayerHostStyles.styles.css', './useTheme-da27e1d1', './useColorScheme-097c31ff', './useScale-04a448c3', './ReferenceLineArea-450530dd', './PRIVATE_PlotArea/themes/PlotAreaStyles.css', 'css!./PlotAreaStyles.styles.css', './hooks/PRIVATE_useVisDnd/themes/VisDndStyles.css', 'css!./VisDndStyles.styles.css', './classNames-08d99695', './utils-8bf50f08', './getLocale-ae79e654', './stringUtils-4ffd9d59', './labelUtils-c05e2f28', './textUtils-ae0a246c', './accUtils-7e057eef', './utils-cd60c9d4', './datatipUtils-6846028e', './clientUtils-df9caee0', './dimensionUtils-61978138', './scale-2f3251e1', './lineUtils-3b56374d', './useId-c9578d26', './Axis-7b649fe2', './PRIVATE_Axis/themes/AxisStyles.css', 'css!./AxisStyles.styles.css', './MultilineText-a4fcc3cb', './PRIVATE_Axis/themes/redwood/AxisTheme', './PRIVATE_Axis/themes/redwood/AxisBaseTheme.css', 'module', './PRIVATE_Axis/themes/redwood/AxisVariants.css', './vanilla-extract-recipes-createRuntimeFn.esm-d881c69a', './useComponentTheme-db55de25', './logger-00b673c5', './useChartViewport-ef746160', './eventsUtils-1f5dc91a', './usePinch-fc8ed928', './usePointerGesture-1c1dd806', './mergeProps-bcfa6a92', './useChartNav-0cd4f614', './layoutUtils-517a546d', './useVisHover-28319fef', './useSelectDrill-b650174d', './useChartDataCursor-670b8448', './hooks/PRIVATE_useChartDataCursor/themes/DataCursorStyles.css', 'css!./DataCursorStyles.styles.css', './Marker-cf672e83', 'css!./SvgShapesStyles.styles.css', './useChartDatatip-570d6077', './useDatatip-a1713300', './Layer-1971eddb', './UNSAFE_Layer/themes/LayerStyles.css', 'css!./LayerStyles.styles.css', './useThemeInterpolations-cc05b0f0', './theme-a8f3d819', './Theme-d945adae', './mergeInterpolations-9ede4cf7', './mergeDeepWithKey-aaab9019', './_curry3-83878f86', './_curry2-86c52b86', './_isObject-42bafc94', './useDensity-8a10fc70', './Floating-eca152d7', './useFloating-5cb85d2b', './positionUtils-6e4daa31', './refUtils-77e97004', './useOutsideClick-b9b661a4', './arrayUtils-6ee96a35', './useModal-536cb7ff', './UNSAFE_Floating/themes/redwood/FloatingTheme', './UNSAFE_Floating/themes/FloatingStyles.css', 'css!./FloatingStyles.styles.css', './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.css', 'module', './UNSAFE_Floating/themes/redwood/FloatingVariants.css', './vanilla-extract-dynamic.esm-6065bbd7', './UNSAFE_Floating/themes/FloatingContract.css', './useUnsafeDomElementRef-75afb461', './hooks/PRIVATE_useDatatip/themes/useDatatip.css', 'css!./useDatatip.styles.css', './VisTabularDatatip-93d56ae8', './PRIVATE_VisTabularDatatip/themes/VisTabularDatatipStyles.css', 'css!./VisTabularDatatipStyles.styles.css', './colorUtils-1c8d0c00', './useChartDrill-d320dd10', './useVisDrill-7dce7e9a', './useDoubleTap-b6bf5458', './clientUtils-f1eea2db', './useSelection-5cb56713', './BaseButton-d0f59de5', './useHover-8b8a1496', './useToggle-a29f97af', './useActive-bb5dc069', './dimensions-95c0c920', './UNSAFE_BaseButton/themes/redwood/BaseButtonTheme', './UNSAFE_BaseButton/themes/BaseButtonStyles.css', 'css!./BaseButtonStyles.styles.css', './UNSAFE_BaseButton/themes/redwood/BaseButtonVariants.css', 'module', './BareButton-d02b4870', './useBareButton-0afa84c2', './usePress-949a0d03', './usePressClick-b5bf4243', './TabbableModeContext-a9c97640', './useTabbableMode-0a9ef009', './buttonUtils-cbbb0130', './id-c70ab33c', './useTestId-f4240cbd', './Text-31cabc49', './UNSAFE_Text/themes/TextStyles.css', 'css!./TextStyles.styles.css', './useTranslationBundle-e4dd341e', './hooks/PRIVATE_useVisSelection/themes/ClearSelection.css', 'css!./ClearSelection.styles.css', './cssUtils-af3bf5fd', './useChartContextMenu-e5e5aa80', './useContextMenu-2070c875', './Menu-4e8c7340', './Sheet-2f362cd6', './Modal-95bf034f', './UNSAFE_Modal/themes/ModalStyles.css', 'css!./ModalStyles.styles.css', './tabbableUtils-f95361a6', './head-9cb1a3da', './_arity-5a5f5f71', './_isArray-32602db6', './_isString-d0ada3cb', './popupUtils-d42db8bf', './WindowOverlay-3293b108', './UNSAFE_WindowOverlay/themes/WindowOverlayStyles.css', 'css!./WindowOverlayStyles.styles.css', './UNSAFE_WindowOverlay/themes/WindowOverlayContract.css', './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayTheme', './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.css', 'module', './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayVariants.css', './UNSAFE_Sheet/themes/SheetStyles.css', 'css!./SheetStyles.styles.css', './useAnimationStatus-0cae3dff', './useAnimation-d90c433f', './animationUtils-716a9aa6', './Dropdown-68f5424a', './keyboardUtils-fb6219eb', './usePopupAnimation-dc282b02', './popupAnimationUtils-49b93365', './CollectionInteractionContext-0b4ed98b', './UNSAFE_Dropdown/themes/dropdownStyles.css', 'css!./dropdownStyles.styles.css', './useOutsideMousedown-cb88da60', './useEffectEvent-6aa4d559', './menuUtils-8e42385f', './MenuItem-0e04f165', './flexitem-5db48325', 'css!./flexitem.styles.css', './vanilla-extract-sprinkles-createRuntimeSprinkles.esm-84d30764', './useInteractionStyle-15a2bdd0', './UNSAFE_Menu/themes/redwood/MenuItemTheme', './UNSAFE_Menu/themes/MenuItemStyles.css', 'css!./MenuItemStyles.styles.css', './UNSAFE_Menu/themes/redwood/MenuItemBaseTheme.css', 'module', './UNSAFE_Menu/themes/redwood/MenuItemVariants.css', 'css!./MenuItemVariants.styles.css', './UNSAFE_Menu/themes/MenuStyles.css', 'css!./MenuStyles.styles.css', './UNSAFE_Menu/themes/DropdownMenuStyles.css', 'css!./DropdownMenuStyles.styles.css', './Flex-4b81b412', './boxalignment-8d80de7e', 'css!./boxalignment.styles.css', './flexbox-8521f6aa', 'css!./flexbox.styles.css', 'css!./FlexStyles.styles.css', './Skeleton-a12452e9', './borders-e15a6927', './UNSAFE_Skeleton/themes/redwood/SkeletonTheme', './UNSAFE_Skeleton/themes/SkeletonStyles.css', 'css!./SkeletonStyles.styles.css', './UNSAFE_Skeleton/themes/redwood/SkeletonBaseTheme.css', 'module', './UNSAFE_Skeleton/themes/redwood/SkeletonVariants.css', './UNSAFE_Menu/themes/MenuSkeletonStyles.css', 'css!./MenuSkeletonStyles.styles.css', './LiveRegion-dbefb95b', 'css!./LiveRegionStyles.styles.css', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', 'css!./TooltipContentVariants.styles.css', './tooltipUtils-d855e8f2', './EnvironmentProvider-403bf554', './LayerManager-426c669d', 'css!./IconStyle.styles.css', './SelectMenuGroupContext-67f24a8f', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./SeparatorStyles.styles.css', 'css!./MenuSeparatorStyles.styles.css', 'module', './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css', './useContextMenuGesture-750ef2c6', './textSelectionUtils-3022f002', './useChartDnd-cee046fb', './utils-bd8f2a3c', './useDnd-33ec1cdf', './useTooltip-31ac71c4', './useTooltipControlled-e7021312', './useFocus-4194fc59', './useTouch-37489bb5', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentTheme', './hooks/UNSAFE_useTooltip/themes/TooltipContentStyles.css', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.css', './useChartMarquee-3e8fb905', './useVisDragModeControls-5af02996', './Button-caed9f15', './Icon-1e9e773e', './UNSAFE_Icon/themes/IconStyle.css', './Move-cdc81b93', './hooks/PRIVATE_useVisDragModeControls/themes/useVisDragModeControls.css', 'css!./useVisDragModeControls.styles.css', './ZoomAlt-e2983051', './ButtonSetSingle-bf1b8c68', './useButtonSetContext-dffdaea3', './ButtonSet-9f26cc51', './UNSAFE_ButtonSet/themes/ButtonSetStyles.css', 'css!./ButtonSetStyles.styles.css', './ButtonSetPositionContext-fd98cc11', './toggleButtonUtils-0ebe4c56', './useRovingTabIndexContainer-9aa2fbcf', './ButtonSetItem-adf6c384', './ButtonSetButton-c66d1474', './ToggleButtonLabel-f1664301', './ButtonLabelLayout-c93ed2fa', './useButtonLabelLayoutTheme-a14fb6b8', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme', './UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css', 'css!./ButtonLabelLayoutStyles.styles.css', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutBaseTheme.css', 'module', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutVariants.css', 'css!./ButtonLabelLayoutVariants.styles.css', './HiddenAccessible-037ef42d', 'css!./HiddenAccessibleStyles.styles.css', './ButtonSetIconButton-9a13b644', './useButtonSetPositionContext-b8534679', './IconToggleButton-a7d5d3cf', './useToggleAction-59741954', './hooks/PRIVATE_useChartMarquee/themes/useChartMarquee.css', 'css!./useChartMarquee.styles.css', './useVisTouchResponse-88a7bb09', './useOverviewContext-dd00c487', './OverviewSlidingWindow-fc942dfa', './PRIVATE_VisOverview/themes/VisOverview.css', 'css!./VisOverview.styles.css', './DragH-ce9355f9', './ScrollBar-fae26188', './PRIVATE_ChartScrollBar/themes/ScrollBarStyles.css', 'css!./ScrollBarStyles.styles.css'], (function(e,s,t,o,a,l,n,c,i,r,d,u,S,y,h,m,b,f,A,T,U,B,_,E,F,p,w,C,M,N,x,V,g,v,L,I,D,k,P,R,O,W,H,q,z,j,G,K,Z,J,Q,X,Y,$,ee,se,te,oe,ae,le,ne,ce,ie,re,de,ue,Se,ye,he,me,be,fe,Ae,Te,Ue,Be,_e,Ee,Fe,pe,we,Ce,Me,Ne,xe,Ve,ge,ve,Le,Ie,De,ke,Pe,Re,Oe,We,He,qe,ze,je,Ge,Ke,Ze,Je,Qe,Xe,Ye,$e,es,ss,ts,os,as,ls,ns,cs,is,rs,ds,us,Ss,ys,hs,ms,bs,fs,As,Ts,Us,Bs,_s,Es,Fs,ps,ws,Cs,Ms,Ns,xs,Vs,gs,vs,Ls,Is,Ds,ks,Ps,Rs,Os,Ws,Hs,qs,zs,js,Gs,Ks,Zs,Js,Qs,Xs,Ys,$s,et,st,tt,ot,at,lt,nt,ct,it,rt,dt,ut,St,yt,ht,mt,bt,ft,At,Tt,Ut,Bt,_t,Et,Ft,pt,wt,Ct,Mt,Nt,xt,Vt,gt,vt,Lt,It,Dt,kt,Pt,Rt,Ot,Wt,Ht,qt,zt,jt,Gt,Kt,Zt,Jt,Qt,Xt,Yt,$t,eo,so,to,oo,ao,lo,no,co,io,ro,uo,So,yo,ho,mo,bo,fo,Ao,To,Uo,Bo,_o,Eo,Fo,po,wo,Co,Mo,No,xo,Vo,go,vo,Lo,Io,Do,ko,Po,Ro,Oo,Wo,Ho,qo,zo,jo,Go,Ko,Zo,Jo,Qo,Xo,Yo,$o,ea,sa,ta,oa,aa,la,na,ca,ia,ra,da,ua,Sa,ya,ha,ma){"use strict";e.Chart=s.Chart,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=PRIVATE_Chart.js.map