@oracle/oraclejet-preact 18.0.0 → 18.0.1
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.
- package/amd/{BarChart-077c5f02.js → BarChart-5e9f46b4.js} +2 -2
- package/amd/{BarChart-077c5f02.js.map → BarChart-5e9f46b4.js.map} +1 -1
- package/amd/{BaseCardView-ab799b69.js → BaseCardView-70b177ed.js} +2 -2
- package/amd/{BaseCardView-ab799b69.js.map → BaseCardView-70b177ed.js.map} +1 -1
- package/amd/CardFlexView-bb5c4369.js +2 -0
- package/amd/{CardFlexView-296f97f5.js.map → CardFlexView-bb5c4369.js.map} +1 -1
- package/amd/{CardGridView-054ffc3f.js → CardGridView-c28ff2f7.js} +2 -2
- package/amd/{CardGridView-054ffc3f.js.map → CardGridView-c28ff2f7.js.map} +1 -1
- package/amd/{Chart-3621e125.js → Chart-e2807ff7.js} +2 -2
- package/amd/{Chart-3621e125.js.map → Chart-e2807ff7.js.map} +1 -1
- package/amd/{ComboChart-fd7da90e.js → ComboChart-71c0f51f.js} +2 -2
- package/amd/{ComboChart-fd7da90e.js.map → ComboChart-71c0f51f.js.map} +1 -1
- package/amd/ExpandableList-dd3a05b4.js +1 -1
- package/amd/GroupLoadingIndicator-6b2ab709.js +1 -1
- package/amd/{Indexer-1531dbc3.js → Indexer-357554c4.js} +2 -2
- package/amd/{Indexer-1531dbc3.js.map → Indexer-357554c4.js.map} +1 -1
- package/amd/InputDatePicker-18e2546b.js +2 -0
- package/amd/{InputDatePicker-fc39f0a6.js.map → InputDatePicker-18e2546b.js.map} +1 -1
- package/amd/{LineAreaChart-ae915d7a.js → LineAreaChart-dda5240f.js} +2 -2
- package/amd/{LineAreaChart-ae915d7a.js.map → LineAreaChart-dda5240f.js.map} +1 -1
- package/amd/List-04c4fed0.js +2 -0
- package/amd/{List-0b764e84.js.map → List-04c4fed0.js.map} +1 -1
- package/amd/{ListView-5bb45f81.js → ListView-bf740071.js} +2 -2
- package/amd/{ListView-5bb45f81.js.map → ListView-bf740071.js.map} +1 -1
- package/amd/LoadMoreCollection-a6adbc3f.js +2 -0
- package/amd/{LoadMoreCollection-83413a59.js.map → LoadMoreCollection-a6adbc3f.js.map} +1 -1
- package/amd/PRIVATE_BaseCardView.js +1 -1
- package/amd/PRIVATE_Chart.js +1 -1
- package/amd/PRIVATE_List.js +1 -1
- package/amd/PRIVATE_LoadMoreCollection.js +1 -1
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/PRIVATE_Table.js +1 -1
- package/amd/PRIVATE_VirtualizedCollection.js +1 -1
- package/amd/{ScatterChart-bb9854b0.js → ScatterChart-7f0b817b.js} +2 -2
- package/amd/{ScatterChart-bb9854b0.js.map → ScatterChart-7f0b817b.js.map} +1 -1
- package/amd/{SelectMultiple-7e9bd455.js → SelectMultiple-e3a6732b.js} +2 -2
- package/amd/{SelectMultiple-7e9bd455.js.map → SelectMultiple-e3a6732b.js.map} +1 -1
- package/amd/{SelectSingle-466bcd67.js → SelectSingle-9d0dca8f.js} +2 -2
- package/amd/{SelectSingle-466bcd67.js.map → SelectSingle-9d0dca8f.js.map} +1 -1
- package/amd/{Table-87f7e3c4.js → Table-31cc83c6.js} +2 -2
- package/amd/{Table-87f7e3c4.js.map → Table-31cc83c6.js.map} +1 -1
- package/amd/{TableView-2b884e2c.js → TableView-ab5d0c12.js} +2 -2
- package/amd/{TableView-2b884e2c.js.map → TableView-ab5d0c12.js.map} +1 -1
- package/amd/Theme-redwood/theme.css +243 -243
- package/amd/Theme-stable/theme.css +266 -266
- package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
- package/amd/UNSAFE_BarChart.js +1 -1
- package/amd/UNSAFE_CardFlexView.js +1 -1
- package/amd/UNSAFE_CardGridView.js +1 -1
- package/amd/UNSAFE_ComboChart.js +1 -1
- package/amd/UNSAFE_ExpandableList.js +1 -1
- package/amd/UNSAFE_Indexer.js +1 -1
- package/amd/UNSAFE_InputDatePicker.js +1 -1
- package/amd/UNSAFE_LineAreaChart.js +1 -1
- package/amd/UNSAFE_ListView.js +1 -1
- package/amd/UNSAFE_ScatterChart.js +1 -1
- package/amd/UNSAFE_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_TableView.js +1 -1
- package/amd/UNSAFE_VirtualizedListView.js +1 -1
- package/amd/{VirtualizedCollection-897516a5.js → VirtualizedCollection-63223f5e.js} +2 -2
- package/amd/{VirtualizedCollection-897516a5.js.map → VirtualizedCollection-63223f5e.js.map} +1 -1
- package/amd/{VirtualizedListView-cbe87ec2.js → VirtualizedListView-554eaee6.js} +2 -2
- package/amd/{VirtualizedListView-cbe87ec2.js.map → VirtualizedListView-554eaee6.js.map} +1 -1
- package/amd/{useSelectCommon-d9c4a7bd.js → useSelectCommon-e7f123ce.js} +2 -2
- package/amd/{useSelectCommon-d9c4a7bd.js.map → useSelectCommon-e7f123ce.js.map} +1 -1
- package/cjs/{BarChart-ca7f8ed5.js → BarChart-93a3813c.js} +2 -2
- package/cjs/{BarChart-ca7f8ed5.js.map → BarChart-93a3813c.js.map} +1 -1
- package/cjs/{useNavigationListItem-ae481fdc.js → BaseNavigationListItem-50e4c603.js} +40 -2
- package/cjs/BaseNavigationListItem-50e4c603.js.map +1 -0
- package/cjs/{Chart-fbbd3329.js → Chart-40d95d14.js} +2 -2
- package/cjs/{Chart-fbbd3329.js.map → Chart-40d95d14.js.map} +1 -1
- package/cjs/CheckboxSetContext-c62db26d.js +12 -0
- package/{es/CheckboxSetContext-1be56556.js.map → cjs/CheckboxSetContext-c62db26d.js.map} +1 -1
- package/cjs/{ComboChart-95863e7a.js → ComboChart-cffd0759.js} +2 -2
- package/cjs/{ComboChart-95863e7a.js.map → ComboChart-cffd0759.js.map} +1 -1
- package/cjs/{LineAreaChart-4a54a017.js → LineAreaChart-53aa461c.js} +2 -2
- package/cjs/{LineAreaChart-4a54a017.js.map → LineAreaChart-53aa461c.js.map} +1 -1
- package/cjs/{NavigationList-7495908b.js → NavigationListItem-4c4e804d.js} +21 -3
- package/cjs/NavigationListItem-4c4e804d.js.map +1 -0
- package/cjs/{OverflowTabBar-e92bab53.js → OverflowTabBar-428798a0.js} +3 -3
- package/cjs/{OverflowTabBar-e92bab53.js.map → OverflowTabBar-428798a0.js.map} +1 -1
- package/cjs/{OverflowTabBarItem-5820e1fa.js → OverflowTabBarItem-3c7adb01.js} +4 -5
- package/cjs/{OverflowTabBarItem-5820e1fa.js.map → OverflowTabBarItem-3c7adb01.js.map} +1 -1
- package/cjs/PRIVATE_Chart.js +4 -4
- package/cjs/{RemovableNavigationListItem-39312f9c.js → RemovableNavigationListItem-0eea31bc.js} +3 -4
- package/cjs/{RemovableNavigationListItem-39312f9c.js.map → RemovableNavigationListItem-0eea31bc.js.map} +1 -1
- package/cjs/{ReorderableTabBar-5614d872.js → ReorderableTabBar-344938e7.js} +2 -2
- package/cjs/{ReorderableTabBar-5614d872.js.map → ReorderableTabBar-344938e7.js.map} +1 -1
- package/cjs/{ScatterChart-80ef4bee.js → ScatterChart-9c748a81.js} +2 -2
- package/cjs/{ScatterChart-80ef4bee.js.map → ScatterChart-9c748a81.js.map} +1 -1
- package/cjs/{TabBar-bcf66387.js → TabBar-bf94b95a.js} +1 -6
- package/cjs/{TabBar-bcf66387.js.map → TabBar-bf94b95a.js.map} +1 -1
- package/cjs/{TabBarMixed-ac642788.js → TabBarMixed-975141a6.js} +1 -6
- package/cjs/{TabBarMixed-ac642788.js.map → TabBarMixed-975141a6.js.map} +1 -1
- package/cjs/Theme-redwood/theme.css +143 -143
- package/cjs/Theme-stable/theme.css +241 -241
- package/cjs/UNSAFE_BarChart/__test__/BarChart.spec.js +5 -5
- package/cjs/UNSAFE_BarChart.js +5 -5
- package/cjs/UNSAFE_CheckboxItem.js +30 -81
- package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
- package/cjs/UNSAFE_CheckboxSet.js +44 -15
- package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_ComboChart.js +5 -5
- package/cjs/UNSAFE_LineAreaChart.js +5 -5
- package/cjs/UNSAFE_NavigationList.js +14 -16
- package/cjs/UNSAFE_NavigationList.js.map +1 -1
- package/cjs/UNSAFE_NavigationListCommon.js +55 -56
- package/cjs/UNSAFE_NavigationListCommon.js.map +1 -1
- package/cjs/UNSAFE_OverflowTabBar.js +27 -29
- package/cjs/UNSAFE_OverflowTabBar.js.map +1 -1
- package/cjs/UNSAFE_ReorderableTabBar.js +14 -25
- package/cjs/UNSAFE_ReorderableTabBar.js.map +1 -1
- package/cjs/UNSAFE_RichCheckboxSet.js +13 -15
- package/cjs/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_RichSelectionItem.js +44 -181
- package/cjs/UNSAFE_RichSelectionItem.js.map +1 -1
- package/cjs/UNSAFE_ScatterChart.js +5 -5
- package/cjs/UNSAFE_TabBar.js +26 -28
- package/cjs/UNSAFE_TabBar.js.map +1 -1
- package/cjs/UNSAFE_TabBarCommon.js +18 -20
- package/cjs/UNSAFE_TabBarCommon.js.map +1 -1
- package/cjs/UNSAFE_TabBarMixed.js +37 -39
- package/cjs/UNSAFE_TabBarMixed.js.map +1 -1
- package/es/{BarChart-dd37d569.js → BarChart-a3209793.js} +2 -2
- package/es/{BarChart-dd37d569.js.map → BarChart-a3209793.js.map} +1 -1
- package/es/{Chart-b046fb6a.js → Chart-b97e00f1.js} +2 -2
- package/es/{Chart-b046fb6a.js.map → Chart-b97e00f1.js.map} +1 -1
- package/es/CheckboxSet-3c3b7c71.js +49 -0
- package/{cjs/CheckboxSet-1bdbc419.js.map → es/CheckboxSet-3c3b7c71.js.map} +1 -1
- package/es/CollapsibleVariants.styles.css +3 -3
- package/es/CollapsibleVariants.styles2.css +3 -3
- package/es/{ComboChart-58ac07b4.js → ComboChart-b8c2be4d.js} +2 -2
- package/es/{ComboChart-58ac07b4.js.map → ComboChart-b8c2be4d.js.map} +1 -1
- package/es/{InputDatePicker-dd3b6c89.js → InputDatePicker-59bbd31d.js} +2 -2
- package/es/{InputDatePicker-dd3b6c89.js.map → InputDatePicker-59bbd31d.js.map} +1 -1
- package/es/{LineAreaChart-8711bbfd.js → LineAreaChart-d4ed8c0d.js} +2 -2
- package/es/{LineAreaChart-8711bbfd.js.map → LineAreaChart-d4ed8c0d.js.map} +1 -1
- package/es/PRIVATE_Chart.js +4 -4
- package/es/{ScatterChart-4bfeca5d.js → ScatterChart-d26d4ea9.js} +2 -2
- package/es/{ScatterChart-4bfeca5d.js.map → ScatterChart-d26d4ea9.js.map} +1 -1
- package/es/Theme-redwood/theme.css +692 -692
- package/es/Theme-stable/theme.css +570 -570
- package/es/TrainVariants.styles.css +6 -6
- package/es/TrainVariants.styles2.css +6 -6
- package/es/UNSAFE_BarChart/__test__/BarChart.spec.js +5 -5
- package/es/UNSAFE_BarChart.js +5 -5
- package/es/UNSAFE_CheckboxItem.js +81 -30
- package/es/UNSAFE_CheckboxItem.js.map +1 -1
- package/es/UNSAFE_CheckboxSet.js +10 -44
- package/es/UNSAFE_CheckboxSet.js.map +1 -1
- package/es/UNSAFE_Collapsible/themes/redwood/CollapsibleTheme.js +1 -1
- package/es/UNSAFE_Collapsible/themes/redwood/CollapsibleVariants.css.js +1 -1
- package/es/UNSAFE_Collapsible/themes/stable/CollapsibleTheme.js +1 -1
- package/es/UNSAFE_Collapsible/themes/stable/CollapsibleVariants.css.js +1 -1
- package/es/UNSAFE_Collapsible.js +1 -1
- package/es/UNSAFE_ComboChart.js +5 -5
- package/es/UNSAFE_InputDatePicker.js +91 -91
- package/es/UNSAFE_LineAreaChart.js +5 -5
- package/es/UNSAFE_RichCheckboxSet.js +14 -12
- package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/es/UNSAFE_RichSelectionItem.js +179 -42
- package/es/UNSAFE_RichSelectionItem.js.map +1 -1
- package/es/UNSAFE_ScatterChart.js +5 -5
- package/es/UNSAFE_Train/themes/redwood/TrainTheme.js +1 -1
- package/es/UNSAFE_Train/themes/redwood/TrainVariants.css.js +1 -1
- package/es/UNSAFE_Train/themes/stable/TrainTheme.js +1 -1
- package/es/UNSAFE_Train/themes/stable/TrainVariants.css.js +1 -1
- package/es/UNSAFE_Train.js +1 -1
- package/package.json +2 -2
- package/amd/CardFlexView-296f97f5.js +0 -2
- package/amd/InputDatePicker-fc39f0a6.js +0 -2
- package/amd/List-0b764e84.js +0 -2
- package/amd/LoadMoreCollection-83413a59.js +0 -2
- package/cjs/BaseNavigationListItem-ac85812c.js +0 -49
- package/cjs/BaseNavigationListItem-ac85812c.js.map +0 -1
- package/cjs/CheckboxSet-1bdbc419.js +0 -53
- package/cjs/NavigationList-7495908b.js.map +0 -1
- package/cjs/NavigationListItem-d927906d.js +0 -12
- package/cjs/NavigationListItem-d927906d.js.map +0 -1
- package/cjs/useNavigationListItem-ae481fdc.js.map +0 -1
- package/es/CheckboxSetContext-1be56556.js +0 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', 'preact/hooks', './
|
|
2
|
-
//# sourceMappingURL=VirtualizedCollection-
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', 'preact/hooks', './useViewportIntersect-b2d47a4b', './Collection-46cfa244'], (function(e,t,o,n,r){"use strict";const c="oj-collection-placeholder",i=({context:e,placeholderHeight:o})=>{const{fromIndex:n,toIndex:r,which:i,estimateItemSize:l}=e;let s=0;if(o)s=o(e);else{const e=0===l?48:l;s=Math.max(0,r-n)*e}const a="topPlaceholder"===i?"_topPlaceholder":"_bottomPlaceholder",d={height:s+"px"};return 0===s&&(d.display="none"),t.jsx("div",{className:c,style:d},a)};function l(e){return function({itemSize:t,viewportHeight:o,scrollOffset:n,overscan:r=0}){if(void 0===t||0===t||void 0===o||void 0===n)return{offset:0,count:e};const c=Math.ceil(n/t),i=Math.ceil(o/t);return{offset:Math.max(0,c-r),count:i+r*(c>0?2:1)}}}const s=(e,t,o,n,r)=>{let c,i;if(e&&t){const o=t.getBoundingClientRect(),n=(e=>{let t,o;if(e===document.documentElement)t=0,o=document.documentElement.clientHeight;else{const n=e.getBoundingClientRect();t=n.top,o=n.bottom}return{top:t,bottom:o}})(e);o&&n&&(c=n.top-o.top-1,i=n.bottom-n.top+1)}if(void 0!==c&&void 0!==i){return n({scrollOffset:c,viewportHeight:i,overscan:o,itemSize:r})}return null},a=`.oj-collection-loadmore, .${c}`,d=l(25);e.PLACEHOLDER_STYLE_CLASS=c,e.VirtualizedCollection=function({data:e,children:c,viewportConfig:l,itemSelector:u,placeholderHeight:h,rangeExtractor:f=d,overscan:m=1,onLoadRange:g,loadMoreIndicator:x,suggestions:p}){const v=o.useRef(null),I=o.useRef(0);if(n.useViewportIntersect(l,1,0,a,(()=>{const e=s(l.scroller(),v.current,m,f,I.current??0);e&&g(e)})),o.useEffect((()=>{if(0===I.current){let e=0;const t=v.current.querySelectorAll(u);t.length>0&&(t.forEach((t=>{e+=t.offsetHeight})),I.current=e/t.length)}})),!(e&&(S=e,S&&S.data&&S.offset>=0&&S.totalSize>=0)))return t.jsx("div",{ref:v});var S;const z=e.data,j=e.offset,w=j+z.length,E=e.totalSize,H=j>=0?{fromIndex:0,toIndex:j,which:"topPlaceholder",estimateItemSize:I.current??0}:void 0,C=w&&w<=E?{fromIndex:w,toIndex:E,which:"bottomPlaceholder",estimateItemSize:I.current??0}:void 0,b=x&&"atLeast"===e.sizePrecision&&w<=E;return t.jsxs("div",{ref:v,style:"will-change: contents",children:[p,H&&t.jsx(i,{context:H,placeholderHeight:h}),t.jsx(r.Collection,{items:z,children:(P=j,e=>{const t={index:P+e.index,data:e.data};return c(t)})}),C&&t.jsx(i,{context:C,placeholderHeight:h}),b&&x]});var P},e.getVirtualizedRangeExtractor=l}));
|
|
2
|
+
//# sourceMappingURL=VirtualizedCollection-63223f5e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedCollection-897516a5.js","sources":["../../src/PRIVATE_VirtualizedCollection/Placeholder.tsx","../../src/PRIVATE_VirtualizedCollection/VirtualizedCollection.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 { JSX } from 'preact';\n\nexport const placeholderTypes = ['topPlaceholder', 'bottomPlaceholder'] as const;\n/**\n * Type of placeholder (top which is before the data content and bottom which is after the data content)\n */\nexport type PlaceholderType = (typeof placeholderTypes)[number];\n\n/**\n * Context object which is pass to the placeholderHeight function callback\n */\nexport type PlaceholderContext = {\n fromIndex: number;\n toIndex: number;\n estimateItemSize: number;\n which: PlaceholderType;\n};\n\nexport const PLACEHOLDER_STYLE_CLASS = 'oj-collection-placeholder';\n\nconst DEFAULT_PLACEHOLDER_SIZE = 48; // min-height defined in Redwood spec for item\nconst TOP_PLACEHOLDER_KEY = '_topPlaceholder';\nconst BOTTOM_PLACEHOLDER_KEY = '_bottomPlaceholder';\n\ntype Props = {\n context: PlaceholderContext;\n placeholderHeight?: (context: PlaceholderContext) => number;\n};\n\n/**\n * A component that renders placeholder which is used internally by VirtualizeViewportCollection\n */\nexport const Placeholder = ({ context, placeholderHeight }: Props) => {\n const { fromIndex, toIndex, which, estimateItemSize } = context;\n let totalHeight = 0;\n if (placeholderHeight) {\n totalHeight = placeholderHeight(context);\n } else {\n const placeholderUnitHeight =\n estimateItemSize === 0 ? DEFAULT_PLACEHOLDER_SIZE : estimateItemSize;\n totalHeight = Math.max(0, toIndex - fromIndex) * placeholderUnitHeight;\n }\n\n const key = which === 'topPlaceholder' ? TOP_PLACEHOLDER_KEY : BOTTOM_PLACEHOLDER_KEY;\n const style: JSX.CSSProperties = { height: totalHeight + 'px' };\n if (totalHeight === 0) {\n style.display = 'none';\n }\n return <div key={key} className={PLACEHOLDER_STYLE_CLASS} style={style}></div>;\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { RefObject, ComponentChildren } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport { DataState, ItemContext, Range, Metadata, ViewportInfo } from '../UNSAFE_Collection';\nimport { Collection } from '../PRIVATE_Collection';\nimport {\n Placeholder,\n PlaceholderContext,\n PlaceholderType,\n PLACEHOLDER_STYLE_CLASS\n} from './Placeholder';\nimport { useViewportIntersect, ViewportConfig } from '../hooks/UNSAFE_useViewportIntersect';\n\n/**\n * Props for the VirtualizedCollection component\n */\ntype Props<K, D> = {\n /**\n * A DataState object that provide information including data and metadata to the VirtualizedCollection.\n */\n data: DataState<K, D> | null;\n\n /**\n * Renderer callback used to render each item\n */\n children: (context: ItemContext<{ data: D; metadata: Metadata<K> }>) => ComponentChildren;\n\n /**\n * Callback to calculate placeholder height\n */\n placeholderHeight?: (context: PlaceholderContext) => number;\n\n /**\n * Viewport configuration including specifying the element which is used to determine what range\n * of data to render\n */\n viewportConfig: ViewportConfig;\n\n /**\n * The selector string to identify the children items\n */\n itemSelector: string;\n\n /**\n * Callback function to handle when viewport has changed, including the case\n * where user scrolls to the end of the component and there are more items to load.\n * The function should sets a new DataState on the component for the specified range.\n */\n onLoadRange: (range: Range) => void;\n\n /**\n * The number of additional items to render before and after the current viewport. This is\n * mainly used for performance tuning. Increase the overscan will result in less frequent\n * rendering when scroll but at the same time each render will take longer depending on the\n * item content.\n */\n overscan?: number;\n\n /**\n * Optionally provide a custom callback to return the range to render based on viewport info\n */\n rangeExtractor?: (info: ViewportInfo) => Range;\n\n /**\n * Optionally specify the custom load more indicator\n */\n loadMoreIndicator?: ComponentChildren;\n\n /**\n * Optionally provide the suggestion indicator sparkle\n */\n suggestions?: ComponentChildren;\n};\n\n/**\n * A function that returns the default range extractor\n * @param fetchSize\n */\nexport function getVirtualizedRangeExtractor(fetchSize: number) {\n return function ({ itemSize, viewportHeight, scrollOffset, overscan = 0 }: ViewportInfo): Range {\n // if any of these is missing then return default initial range\n if (\n itemSize === undefined ||\n itemSize === 0 ||\n viewportHeight === undefined ||\n scrollOffset === undefined\n ) {\n return { offset: 0, count: fetchSize };\n }\n const offset = Math.ceil(scrollOffset / itemSize);\n const count = Math.ceil(viewportHeight / itemSize);\n return {\n offset: Math.max(0, offset - overscan),\n count: count + overscan * (offset > 0 ? 2 : 1)\n };\n };\n}\n\n/**\n * Helper function to find the top and bottom of an element relative to the viewport\n * @param elem\n */\nconst getElementTopBottom = (elem: HTMLElement): { top: number; bottom: number } => {\n let top;\n let bottom;\n if (elem === document.documentElement) {\n top = 0;\n bottom = document.documentElement.clientHeight;\n } else {\n const scrollerBounds = elem.getBoundingClientRect();\n top = scrollerBounds.top;\n bottom = scrollerBounds.bottom;\n }\n return { top, bottom };\n};\n\nconst isDataStateValid = <K, D>(dataState: DataState<K, D>) => {\n return dataState && dataState.data && dataState.offset >= 0 && dataState.totalSize >= 0;\n};\n\nconst DEFAULT_MARGIN = 1;\n\n/**\n * Returns the range for the current viewport\n */\nconst getViewportRange = (\n scroller: HTMLElement | null,\n root: HTMLElement,\n overscan: number,\n rangeExtractor: (info: ViewportInfo) => Range,\n estimateItemSize: number\n) => {\n let scrollOffset;\n let viewportHeight;\n\n if (scroller && root) {\n const rootRect = root.getBoundingClientRect();\n const viewportRect = getElementTopBottom(scroller);\n if (rootRect && viewportRect) {\n scrollOffset = viewportRect.top - rootRect.top - DEFAULT_MARGIN;\n viewportHeight = viewportRect.bottom - viewportRect.top + DEFAULT_MARGIN;\n }\n }\n\n if (scrollOffset !== undefined && viewportHeight !== undefined) {\n // figure out what the new range should be\n const range = rangeExtractor({\n scrollOffset,\n viewportHeight,\n overscan: overscan,\n itemSize: estimateItemSize\n });\n\n return range;\n }\n return null;\n};\n\nconst DEFAULT_OVERSCAN = 1;\nconst DEFAULT_END_INDEX = 25; // match default fetch size\nconst LOADMORE_STYLE_CLASS = 'oj-collection-loadmore';\nconst LOAD_MORE_AND_PLACEHOLDER_SELECTOR = `.${LOADMORE_STYLE_CLASS}, .${PLACEHOLDER_STYLE_CLASS}`;\nconst DEFAULT_RANGE_EXTRACTOR = getVirtualizedRangeExtractor(DEFAULT_END_INDEX);\n\n/**\n * Component that only render items in the specified viewport.\n * @param props\n */\nexport function VirtualizedCollection<K, D>({\n data,\n children,\n viewportConfig,\n itemSelector,\n placeholderHeight,\n rangeExtractor = DEFAULT_RANGE_EXTRACTOR,\n overscan = DEFAULT_OVERSCAN,\n onLoadRange,\n loadMoreIndicator,\n suggestions\n}: Props<K, D>) {\n const rootRef: RefObject<any> = useRef<HTMLElement>(null);\n const estimateItemSizeRef: RefObject<number> = useRef(0);\n\n // detect if viewport has changed and it needs to re-render based on a new range\n useViewportIntersect(\n viewportConfig,\n DEFAULT_MARGIN,\n 0,\n LOAD_MORE_AND_PLACEHOLDER_SELECTOR,\n () => {\n const range = getViewportRange(\n viewportConfig.scroller(),\n rootRef.current,\n overscan,\n rangeExtractor,\n estimateItemSizeRef.current ?? 0\n );\n if (range) {\n onLoadRange(range);\n }\n }\n );\n\n // calculate average item height. For now, we'll just do this once, but we can\n // do a rolling average where we'll adjust on every render.\n useEffect(() => {\n if (estimateItemSizeRef.current === 0) {\n let totalHeight = 0;\n const nodes = rootRef.current.querySelectorAll(itemSelector);\n if (nodes.length > 0) {\n nodes.forEach((item: HTMLElement) => {\n totalHeight += item.offsetHeight;\n });\n estimateItemSizeRef.current = totalHeight / nodes.length;\n }\n }\n });\n\n // override itemRenderer to adjust the index\n const _getItemRenderer = (startIndex: number) => {\n // returns a new render function\n return (context: ItemContext<{ data: D; metadata: Metadata<K> }>) => {\n const itemContext: ItemContext<{ data: D; metadata: Metadata<K> }> = {\n index: startIndex + context.index,\n data: context.data\n };\n return children(itemContext);\n };\n };\n\n // if DataState is invalid (including not specified), just render blank\n if (!data || !isDataStateValid(data)) {\n return <div ref={rootRef} />;\n }\n\n const rangeData = data.data;\n const offset = data.offset;\n const endIndex = offset + rangeData.length;\n const itemCount = data.totalSize;\n const topPlaceholderContext =\n offset >= 0\n ? {\n fromIndex: 0,\n toIndex: offset,\n which: 'topPlaceholder' as PlaceholderType,\n estimateItemSize: estimateItemSizeRef.current ?? 0\n }\n : undefined;\n const bottomPlaceholderContext =\n endIndex && endIndex <= itemCount\n ? {\n fromIndex: endIndex,\n toIndex: itemCount,\n which: 'bottomPlaceholder' as PlaceholderType,\n estimateItemSize: estimateItemSizeRef.current ?? 0\n }\n : undefined;\n\n const renderLoadMore =\n loadMoreIndicator && data.sizePrecision === 'atLeast' && endIndex <= itemCount;\n\n // might need to support elementType prop in the future to allow customization of what\n // type of element to render for the root\n return (\n <div ref={rootRef} style=\"will-change: contents\">\n {suggestions}\n {topPlaceholderContext && (\n <Placeholder\n context={topPlaceholderContext}\n placeholderHeight={placeholderHeight}></Placeholder>\n )}\n <Collection items={rangeData}>{_getItemRenderer(offset)}</Collection>\n {bottomPlaceholderContext && (\n <Placeholder\n context={bottomPlaceholderContext}\n placeholderHeight={placeholderHeight}></Placeholder>\n )}\n {renderLoadMore && loadMoreIndicator}\n </div>\n );\n}\n"],"names":["PLACEHOLDER_STYLE_CLASS","Placeholder","context","placeholderHeight","fromIndex","toIndex","which","estimateItemSize","totalHeight","placeholderUnitHeight","Math","max","key","style","height","display","_jsx","jsx","className","getVirtualizedRangeExtractor","fetchSize","itemSize","viewportHeight","scrollOffset","overscan","undefined","offset","count","ceil","getViewportRange","scroller","root","rangeExtractor","rootRect","getBoundingClientRect","viewportRect","elem","top","bottom","document","documentElement","clientHeight","scrollerBounds","getElementTopBottom","LOAD_MORE_AND_PLACEHOLDER_SELECTOR","DEFAULT_RANGE_EXTRACTOR","data","children","viewportConfig","itemSelector","onLoadRange","loadMoreIndicator","suggestions","rootRef","useRef","estimateItemSizeRef","useViewportIntersect","range","current","useEffect","nodes","querySelectorAll","length","forEach","item","offsetHeight","dataState","totalSize","ref","rangeData","endIndex","itemCount","topPlaceholderContext","bottomPlaceholderContext","renderLoadMore","sizePrecision","_jsxs","jsxs","Collection","items","startIndex","itemContext","index"],"mappings":"mJAyBa,MAAAA,EAA0B,4BAc1BC,EAAc,EAAGC,UAASC,wBACrC,MAAMC,UAAEA,EAASC,QAAEA,EAAOC,MAAEA,EAAKC,iBAAEA,GAAqBL,EACxD,IAAIM,EAAc,EAClB,GAAIL,EACFK,EAAcL,EAAkBD,OAC3B,CACL,MAAMO,EACiB,IAArBF,EAnB2B,GAmByBA,EACtDC,EAAcE,KAAKC,IAAI,EAAGN,EAAUD,GAAaK,CAClD,CAED,MAAMG,EAAgB,mBAAVN,EAtBc,kBACG,qBAsBvBO,EAA2B,CAAEC,OAAQN,EAAc,MAIzD,OAHoB,IAAhBA,IACFK,EAAME,QAAU,QAEXC,EAAAC,IAAA,MAAA,CAAeC,UAAWlB,EAAyBa,MAAOA,GAAhDD,EAA6D,EC6B1E,SAAUO,EAA6BC,GAC3C,OAAO,UAAUC,SAAEA,EAAQC,eAAEA,EAAcC,aAAEA,EAAYC,SAAEA,EAAW,IAEpE,QACeC,IAAbJ,GACa,IAAbA,QACmBI,IAAnBH,QACiBG,IAAjBF,EAEA,MAAO,CAAEG,OAAQ,EAAGC,MAAOP,GAE7B,MAAMM,EAAShB,KAAKkB,KAAKL,EAAeF,GAClCM,EAAQjB,KAAKkB,KAAKN,EAAiBD,GACzC,MAAO,CACLK,OAAQhB,KAAKC,IAAI,EAAGe,EAASF,GAC7BG,MAAOA,EAAQH,GAAYE,EAAS,EAAI,EAAI,GAEhD,CACF,CAMA,MAuBMG,EAAmB,CACvBC,EACAC,EACAP,EACAQ,EACAzB,KAEA,IAAIgB,EACAD,EAEJ,GAAIQ,GAAYC,EAAM,CACpB,MAAME,EAAWF,EAAKG,wBAChBC,EAnCkB,CAACC,IAC3B,IAAIC,EACAC,EACJ,GAAIF,IAASG,SAASC,gBACpBH,EAAM,EACNC,EAASC,SAASC,gBAAgBC,iBAC7B,CACL,MAAMC,EAAi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YvB,EAAKA,KACjBpB,EAASoB,EAAKpB,OACd4C,EAAW5C,EAAS2C,EAAUP,OAC9BS,EAAYzB,EAAKqB,UACjBK,EACJ9C,GAAU,EACN,CACEtB,UAAW,EACXC,QAASqB,EACTpB,MAAO,iBACPC,iBAAkBgD,EAAoBG,SAAW,QAEnDjC,EACAgD,EACJH,GAAYA,GAAYC,EACpB,CACEnE,UAAWkE,EACXjE,QAASkE,EACTjE,MAAO,oBACPC,iBAAkBgD,EAAoBG,SAAW,QAEnDjC,EAEAiD,EACJvB,GAA4C,YAAvBL,EAAK6B,eAA+BL,GAAYC,EAIvE,OACEK,EAAAC,KAAA,MAAA,CAAKT,IAAKf,EAASxC,MAAM,wBAAuBkC,SAAA,CAC7CK,EACAoB,GACCxD,EAAAC,IAAChB,EAAW,CACVC,QAASsE,EACTrE,kBAAmBA,IAEvBa,MAAC8D,EAAUA,WAAA,CAACC,MAAOV,EAAStB,UApDNiC,EAoD0BtD,EAlD1CxB,IACN,MAAM+E,EAA+D,CACnEC,MAAOF,EAAa9E,EAAQgF,MAC5BpC,KAAM5C,EAAQ4C,MAEhB,OAAOC,EAASkC,EAAY,KA8C3BR,GACCzD,MAACf,EAAW,CACVC,QAASuE,EACTtE,kBAAmBA,IAEtBuE,GAAkBvB,KA1DE,IAAC6B,CA6D5B"}
|
|
1
|
+
{"version":3,"file":"VirtualizedCollection-63223f5e.js","sources":["../../src/PRIVATE_VirtualizedCollection/Placeholder.tsx","../../src/PRIVATE_VirtualizedCollection/VirtualizedCollection.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 { JSX } from 'preact';\n\nexport const placeholderTypes = ['topPlaceholder', 'bottomPlaceholder'] as const;\n/**\n * Type of placeholder (top which is before the data content and bottom which is after the data content)\n */\nexport type PlaceholderType = (typeof placeholderTypes)[number];\n\n/**\n * Context object which is pass to the placeholderHeight function callback\n */\nexport type PlaceholderContext = {\n fromIndex: number;\n toIndex: number;\n estimateItemSize: number;\n which: PlaceholderType;\n};\n\nexport const PLACEHOLDER_STYLE_CLASS = 'oj-collection-placeholder';\n\nconst DEFAULT_PLACEHOLDER_SIZE = 48; // min-height defined in Redwood spec for item\nconst TOP_PLACEHOLDER_KEY = '_topPlaceholder';\nconst BOTTOM_PLACEHOLDER_KEY = '_bottomPlaceholder';\n\ntype Props = {\n context: PlaceholderContext;\n placeholderHeight?: (context: PlaceholderContext) => number;\n};\n\n/**\n * A component that renders placeholder which is used internally by VirtualizeViewportCollection\n */\nexport const Placeholder = ({ context, placeholderHeight }: Props) => {\n const { fromIndex, toIndex, which, estimateItemSize } = context;\n let totalHeight = 0;\n if (placeholderHeight) {\n totalHeight = placeholderHeight(context);\n } else {\n const placeholderUnitHeight =\n estimateItemSize === 0 ? DEFAULT_PLACEHOLDER_SIZE : estimateItemSize;\n totalHeight = Math.max(0, toIndex - fromIndex) * placeholderUnitHeight;\n }\n\n const key = which === 'topPlaceholder' ? TOP_PLACEHOLDER_KEY : BOTTOM_PLACEHOLDER_KEY;\n const style: JSX.CSSProperties = { height: totalHeight + 'px' };\n if (totalHeight === 0) {\n style.display = 'none';\n }\n return <div key={key} className={PLACEHOLDER_STYLE_CLASS} style={style}></div>;\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { RefObject, ComponentChildren } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport { DataState, ItemContext, Range, Metadata, ViewportInfo } from '../UNSAFE_Collection';\nimport { Collection } from '../PRIVATE_Collection';\nimport {\n Placeholder,\n PlaceholderContext,\n PlaceholderType,\n PLACEHOLDER_STYLE_CLASS\n} from './Placeholder';\nimport { useViewportIntersect, ViewportConfig } from '../hooks/UNSAFE_useViewportIntersect';\n\n/**\n * Props for the VirtualizedCollection component\n */\ntype Props<K, D> = {\n /**\n * A DataState object that provide information including data and metadata to the VirtualizedCollection.\n */\n data: DataState<K, D> | null;\n\n /**\n * Renderer callback used to render each item\n */\n children: (context: ItemContext<{ data: D; metadata: Metadata<K> }>) => ComponentChildren;\n\n /**\n * Callback to calculate placeholder height\n */\n placeholderHeight?: (context: PlaceholderContext) => number;\n\n /**\n * Viewport configuration including specifying the element which is used to determine what range\n * of data to render\n */\n viewportConfig: ViewportConfig;\n\n /**\n * The selector string to identify the children items\n */\n itemSelector: string;\n\n /**\n * Callback function to handle when viewport has changed, including the case\n * where user scrolls to the end of the component and there are more items to load.\n * The function should sets a new DataState on the component for the specified range.\n */\n onLoadRange: (range: Range) => void;\n\n /**\n * The number of additional items to render before and after the current viewport. This is\n * mainly used for performance tuning. Increase the overscan will result in less frequent\n * rendering when scroll but at the same time each render will take longer depending on the\n * item content.\n */\n overscan?: number;\n\n /**\n * Optionally provide a custom callback to return the range to render based on viewport info\n */\n rangeExtractor?: (info: ViewportInfo) => Range;\n\n /**\n * Optionally specify the custom load more indicator\n */\n loadMoreIndicator?: ComponentChildren;\n\n /**\n * Optionally provide the suggestion indicator sparkle\n */\n suggestions?: ComponentChildren;\n};\n\n/**\n * A function that returns the default range extractor\n * @param fetchSize\n */\nexport function getVirtualizedRangeExtractor(fetchSize: number) {\n return function ({ itemSize, viewportHeight, scrollOffset, overscan = 0 }: ViewportInfo): Range {\n // if any of these is missing then return default initial range\n if (\n itemSize === undefined ||\n itemSize === 0 ||\n viewportHeight === undefined ||\n scrollOffset === undefined\n ) {\n return { offset: 0, count: fetchSize };\n }\n const offset = Math.ceil(scrollOffset / itemSize);\n const count = Math.ceil(viewportHeight / itemSize);\n return {\n offset: Math.max(0, offset - overscan),\n count: count + overscan * (offset > 0 ? 2 : 1)\n };\n };\n}\n\n/**\n * Helper function to find the top and bottom of an element relative to the viewport\n * @param elem\n */\nconst getElementTopBottom = (elem: HTMLElement): { top: number; bottom: number } => {\n let top;\n let bottom;\n if (elem === document.documentElement) {\n top = 0;\n bottom = document.documentElement.clientHeight;\n } else {\n const scrollerBounds = elem.getBoundingClientRect();\n top = scrollerBounds.top;\n bottom = scrollerBounds.bottom;\n }\n return { top, bottom };\n};\n\nconst isDataStateValid = <K, D>(dataState: DataState<K, D>) => {\n return dataState && dataState.data && dataState.offset >= 0 && dataState.totalSize >= 0;\n};\n\nconst DEFAULT_MARGIN = 1;\n\n/**\n * Returns the range for the current viewport\n */\nconst getViewportRange = (\n scroller: HTMLElement | null,\n root: HTMLElement,\n overscan: number,\n rangeExtractor: (info: ViewportInfo) => Range,\n estimateItemSize: number\n) => {\n let scrollOffset;\n let viewportHeight;\n\n if (scroller && root) {\n const rootRect = root.getBoundingClientRect();\n const viewportRect = getElementTopBottom(scroller);\n if (rootRect && viewportRect) {\n scrollOffset = viewportRect.top - rootRect.top - DEFAULT_MARGIN;\n viewportHeight = viewportRect.bottom - viewportRect.top + DEFAULT_MARGIN;\n }\n }\n\n if (scrollOffset !== undefined && viewportHeight !== undefined) {\n // figure out what the new range should be\n const range = rangeExtractor({\n scrollOffset,\n viewportHeight,\n overscan: overscan,\n itemSize: estimateItemSize\n });\n\n return range;\n }\n return null;\n};\n\nconst DEFAULT_OVERSCAN = 1;\nconst DEFAULT_END_INDEX = 25; // match default fetch size\nconst LOADMORE_STYLE_CLASS = 'oj-collection-loadmore';\nconst LOAD_MORE_AND_PLACEHOLDER_SELECTOR = `.${LOADMORE_STYLE_CLASS}, .${PLACEHOLDER_STYLE_CLASS}`;\nconst DEFAULT_RANGE_EXTRACTOR = getVirtualizedRangeExtractor(DEFAULT_END_INDEX);\n\n/**\n * Component that only render items in the specified viewport.\n * @param props\n */\nexport function VirtualizedCollection<K, D>({\n data,\n children,\n viewportConfig,\n itemSelector,\n placeholderHeight,\n rangeExtractor = DEFAULT_RANGE_EXTRACTOR,\n overscan = DEFAULT_OVERSCAN,\n onLoadRange,\n loadMoreIndicator,\n suggestions\n}: Props<K, D>) {\n const rootRef: RefObject<any> = useRef<HTMLElement>(null);\n const estimateItemSizeRef: RefObject<number> = useRef(0);\n\n // detect if viewport has changed and it needs to re-render based on a new range\n useViewportIntersect(\n viewportConfig,\n DEFAULT_MARGIN,\n 0,\n LOAD_MORE_AND_PLACEHOLDER_SELECTOR,\n () => {\n const range = getViewportRange(\n viewportConfig.scroller(),\n rootRef.current,\n overscan,\n rangeExtractor,\n estimateItemSizeRef.current ?? 0\n );\n if (range) {\n onLoadRange(range);\n }\n }\n );\n\n // calculate average item height. For now, we'll just do this once, but we can\n // do a rolling average where we'll adjust on every render.\n useEffect(() => {\n if (estimateItemSizeRef.current === 0) {\n let totalHeight = 0;\n const nodes = rootRef.current.querySelectorAll(itemSelector);\n if (nodes.length > 0) {\n nodes.forEach((item: HTMLElement) => {\n totalHeight += item.offsetHeight;\n });\n estimateItemSizeRef.current = totalHeight / nodes.length;\n }\n }\n });\n\n // override itemRenderer to adjust the index\n const _getItemRenderer = (startIndex: number) => {\n // returns a new render function\n return (context: ItemContext<{ data: D; metadata: Metadata<K> }>) => {\n const itemContext: ItemContext<{ data: D; metadata: Metadata<K> }> = {\n index: startIndex + context.index,\n data: context.data\n };\n return children(itemContext);\n };\n };\n\n // if DataState is invalid (including not specified), just render blank\n if (!data || !isDataStateValid(data)) {\n return <div ref={rootRef} />;\n }\n\n const rangeData = data.data;\n const offset = data.offset;\n const endIndex = offset + rangeData.length;\n const itemCount = data.totalSize;\n const topPlaceholderContext =\n offset >= 0\n ? {\n fromIndex: 0,\n toIndex: offset,\n which: 'topPlaceholder' as PlaceholderType,\n estimateItemSize: estimateItemSizeRef.current ?? 0\n }\n : undefined;\n const bottomPlaceholderContext =\n endIndex && endIndex <= itemCount\n ? {\n fromIndex: endIndex,\n toIndex: itemCount,\n which: 'bottomPlaceholder' as PlaceholderType,\n estimateItemSize: estimateItemSizeRef.current ?? 0\n }\n : undefined;\n\n const renderLoadMore =\n loadMoreIndicator && data.sizePrecision === 'atLeast' && endIndex <= itemCount;\n\n // might need to support elementType prop in the future to allow customization of what\n // type of element to render for the root\n return (\n <div ref={rootRef} style=\"will-change: contents\">\n {suggestions}\n {topPlaceholderContext && (\n <Placeholder\n context={topPlaceholderContext}\n placeholderHeight={placeholderHeight}></Placeholder>\n )}\n <Collection items={rangeData}>{_getItemRenderer(offset)}</Collection>\n {bottomPlaceholderContext && (\n <Placeholder\n context={bottomPlaceholderContext}\n placeholderHeight={placeholderHeight}></Placeholder>\n )}\n {renderLoadMore && loadMoreIndicator}\n </div>\n );\n}\n"],"names":["PLACEHOLDER_STYLE_CLASS","Placeholder","context","placeholderHeight","fromIndex","toIndex","which","estimateItemSize","totalHeight","placeholderUnitHeight","Math","max","key","style","height","display","_jsx","jsx","className","getVirtualizedRangeExtractor","fetchSize","itemSize","viewportHeight","scrollOffset","overscan","undefined","offset","count","ceil","getViewportRange","scroller","root","rangeExtractor","rootRect","getBoundingClientRect","viewportRect","elem","top","bottom","document","documentElement","clientHeight","scrollerBounds","getElementTopBottom","LOAD_MORE_AND_PLACEHOLDER_SELECTOR","DEFAULT_RANGE_EXTRACTOR","data","children","viewportConfig","itemSelector","onLoadRange","loadMoreIndicator","suggestions","rootRef","useRef","estimateItemSizeRef","useViewportIntersect","range","current","useEffect","nodes","querySelectorAll","length","forEach","item","offsetHeight","dataState","totalSize","ref","rangeData","endIndex","itemCount","topPlaceholderContext","bottomPlaceholderContext","renderLoadMore","sizePrecision","_jsxs","jsxs","Collection","items","startIndex","itemContext","index"],"mappings":"mJAyBa,MAAAA,EAA0B,4BAc1BC,EAAc,EAAGC,UAASC,wBACrC,MAAMC,UAAEA,EAASC,QAAEA,EAAOC,MAAEA,EAAKC,iBAAEA,GAAqBL,EACxD,IAAIM,EAAc,EAClB,GAAIL,EACFK,EAAcL,EAAkBD,OAC3B,CACL,MAAMO,EACiB,IAArBF,EAnB2B,GAmByBA,EACtDC,EAAcE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iD,EACJvB,GAA4C,YAAvBL,EAAK6B,eAA+BL,GAAYC,EAIvE,OACEK,EAAAC,KAAA,MAAA,CAAKT,IAAKf,EAASxC,MAAM,wBAAuBkC,SAAA,CAC7CK,EACAoB,GACCxD,EAAAC,IAAChB,EAAW,CACVC,QAASsE,EACTrE,kBAAmBA,IAEvBa,MAAC8D,EAAUA,WAAA,CAACC,MAAOV,EAAStB,UApDNiC,EAoD0BtD,EAlD1CxB,IACN,MAAM+E,EAA+D,CACnEC,MAAOF,EAAa9E,EAAQgF,MAC5BpC,KAAM5C,EAAQ4C,MAEhB,OAAOC,EAASkC,EAAY,KA8C3BR,GACCzD,MAACf,EAAW,CACVC,QAASuE,EACTtE,kBAAmBA,IAEtBuE,GAAkBvB,KA1DE,IAAC6B,CA6D5B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', './List-
|
|
2
|
-
//# sourceMappingURL=VirtualizedListView-
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', './List-04c4fed0'], (function(i,e,t){"use strict";i.VirtualizedListView=function(i){return e.jsx(t.List,{isVirtualized:!0,...i,children:i.children})}}));
|
|
2
|
+
//# sourceMappingURL=VirtualizedListView-554eaee6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedListView-
|
|
1
|
+
{"version":3,"file":"VirtualizedListView-554eaee6.js","sources":["../../src/UNSAFE_VirtualizedListView/VirtualizedListView.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { List } from '../PRIVATE_List';\nimport { ListProps } from '../UNSAFE_ListView/List.types';\n\n/**\n * Props for the VirtualizedListView Component\n */\nexport type Props<K, D> = Pick<\n ListProps<K, D>,\n | 'aria-label'\n | 'aria-labelledby'\n | 'children'\n | 'currentItemVariant'\n | 'currentItemOverride'\n | 'data'\n | 'gridlines'\n | 'onPersistCurrentItem'\n | 'onItemAction'\n | 'onLoadRange'\n | 'onSelectionChange'\n | 'selectedKeys'\n | 'selectionMode'\n | 'viewportConfig'\n>;\n\n/**\n * Component that renders items as a flat list.\n * In order to maximize performance, only items that are visible in the viewport are rendered.\n */\n\nexport function VirtualizedListView<K extends string | number, D>(props: Props<K, D>) {\n return (\n <List isVirtualized={true} {...props}>\n {props.children}\n </List>\n );\n}\n"],"names":["props","_jsx","List","isVirtualized","children"],"mappings":"8GAoCM,SAA4DA,GAChE,OACEC,MAACC,EAAAA,KAAI,CAACC,eAAe,KAAUH,WAC5BA,EAAMI,UAGb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', './Flex-3421f0df', './HighlightText-644bc74e', './Grid-8911aa0f', 'css!./ListItemLayoutStyles.styles.css', './ListItemText-a3b0ed3b', './Skeleton-5839404b', 'preact/hooks', './logger-0f873e29', './PRIVATE_SelectCommon/themes/dropdownStyles.css', './List-0b764e84', './Floating-5d98c1ca', './Layer-6f29b67f', 'preact/compat', './LayerHost-639b3284', './keyboardUtils-fbb389f8', './useOutsideMousedown-73d5a78a', './usePress-949a0d03', './CaretDown-80d7b5cf', './classNames-08d99695', './useComponentTheme-5aa41a8f', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme', './useTestId-b5cd4766', './UNSAFE_BaseButton/themes/redwood/BaseButtonTheme', './CollectionInteractionContext-0b4ed98b', './FormFieldContext-3c44aaaa', './TabbableModeContext-a9c97640', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-4656c2a6', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-e5bdb734', 'css!./IconStyle.styles.css', './IconButton-ae9a01ce', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-2e19d8de', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './Popup-66e79afa', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './useTranslationBundle-d07d4b20', './Link-c4a57187', './useFocusWithin-5a504fca', './useHover-7964884c', './Separator-181f7541', './WindowOverlay-43c10424', './PRIVATE_SelectCommon/themes/mobileDropdownStyles.css', './PRIVATE_SelectCommon/themes/selectMobileDropdownStyles.css', './textAlign-ef924afd', './mergeInterpolations-9ede4cf7', './useFormFieldContext-8196183c', './PRIVATE_SelectCommon/themes/SelectMobileFieldInputStyles.css', './TextFieldUtils-f3868e96', './useTabbableMode-dc440317', './Text-cd61a065', './useAccessibleContext-23e8a333', './stringUtils-0ae982c2', './UNSAFE_TextField/themes/redwood/TextFieldInputTheme', './clientHints-4f5a07b0', './tabbableUtils-85aa6918'], (function(e,t,s,n,a,o,l,r,i,d,c,u,p,h,b,m,y,S,f,x,w,C,g,v,T,F,A,D,I,k,M,E,U,j,K,P,L,R,B,N,O,_,V,H,W,Y,G,z,q,$,J,Q,X,Z,ee,te,se,ne,ae,oe,le,re,ie,de,ce,ue,pe,he,be,me,ye,Se,fe,xe,we,Ce,ge,ve){"use strict";function Te(e,t){if("string"!=typeof t)return t(e);if(e.data?.hasOwnProperty(t)){const s=e.data[t];return String(s)}d.error("SelectMultiple: itemText specifies field that does not exist: "+t)}const Fe=()=>{};const Ae=t.jsx(u.SkeletonContainer,{minimumCount:3,children:()=>t.jsx(s.Flex,{height:"12x",align:"center",children:t.jsx(r.Skeleton,{height:"4x"})})}),De=e=>0===e.button&&!e.ctrlKey,Ie=e=>{e.currentTarget===e.target&&e.preventDefault()},ke="bottom-start";const Me=()=>{};function Ee({"aria-labelledby":e,children:n,id:a,isOpen:o}){return o?t.jsx(h.Layer,{children:t.jsx(de.WindowOverlay,{children:t.jsx("div",{id:a,class:ce.mobileDropdownStyles.base,role:"dialog","aria-modal":"true","aria-labelledby":e,children:t.jsx(s.Flex,{width:"100%",height:"100%",maxHeight:"100%",direction:"column",children:n})})})}):null}const Ue=[...Object.values(pe.textInterpolations)],je=he.mergeInterpolations(Ue),Ke=b.forwardRef((({"aria-controls":e,"aria-describedby":s,"aria-expanded":n,"aria-invalid":a,"aria-label":o,"aria-labelledby":l,displayValue:r,hasEmptyLabel:i,hasInsideLabel:d=!1,isRequired:c,onBlur:u,onFocus:p,placeholder:h,textAlign:b,variant:m="default"},y)=>{const{isDisabled:S,isFocused:f,hasValue:x=!1}=be.useFormFieldContext(),{isTabbable:g,tabbableModeProps:v}=Se.useTabbableMode(),T=ye.isInputPlaceholderShown(d,x,f)?h:void 0,{UNSAFE_ariaLabelledBy:F}=xe.useAccessibleContext(),A=i?we.merge([l,F]):l,{class:D}=je({textAlign:b}),{classes:I}=C.useComponentTheme(Ce.TextFieldInputRedwoodTheme,{type:"notPassword",styleVariant:m,textarea:"notTextArea",input:"isInput",prefix:"noPrefix",suffix:"noSuffix",startContent:"noStartContent",endContent:"hasEndContent",insideLabel:d?"hasInsideLabel":"noInsideLabel",value:x?"hasValue":"noValue",focused:f?"isFocused":"notFocused",disabled:S?"isDisabled":"notDisabled"}),k=w.classNames([me.selectMobileFieldInputStyles.base,D,I]);return t.jsx("div",{"aria-autocomplete":"list","aria-controls":e,"aria-describedby":s,"aria-expanded":n,"aria-invalid":a,"aria-label":o,"aria-labelledby":A,"aria-required":c?"true":void 0,class:k,onBlur:u,onFocus:p,ref:y,role:"combobox",...g&&v,children:t.jsx("div",{class:me.selectMobileFieldInputStyles.content,children:t.jsx(fe.Text,{variant:r?"inherit":"secondary",children:r||T})})})}));e.DefaultList=function({"aria-label":e,currentItemVariant:a,currentKey:o,data:r,itemRenderer:d,itemText:p,onCurrentKeyChange:h,onItemAction:b,onLoadRange:m=Fe,onSelectionChange:y,searchText:S,selectedKeys:f,selectionMode:x}){const w=i.useCallback((e=>{const a={data:e.data,index:e.index,metadata:e.metadata,selector:e.selector,searchText:S,selectedKeys:f,onSelectionChange:({value:e})=>{y?.({value:e})}},o={data:e.data,key:e.metadata.key,metadata:e.metadata};return d?d(a):t.jsxs(s.Flex,{align:"center",children:[e.selector&&t.jsx("div",{class:c.dropdownStyles.selectorWrapper,children:e.selector()}),t.jsx("div",{class:"single"===x?c.dropdownStyles.singleSelectItem:c.dropdownStyles.multiSelectItem,children:t.jsx(l.ListItemText,{variant:"primary",children:t.jsx(n.HighlightText,{matchText:S,children:Te(o,p)})})})]})}),[d,p,y,S,f,x]),C=i.useMemo((()=>({all:!1,keys:f??new Set})),[f]),g=i.useMemo((()=>void 0!==o?{rowKey:o}:void 0),[o]),v=i.useCallback((({context:{data:e,metadata:t}})=>{b?.({context:{data:e,key:t.key,metadata:t}})}),[b]),T=i.useCallback((({value:e})=>{y?.({value:new Set(e.keys?.values())})}),[y]);return t.jsx(u.List,{"aria-label":e,allowTabbableMode:!1,currentItemVariant:a,currentItemOverride:g,data:r??null,loadingIndicator:Ae,onPersistCurrentItem:h,onItemAction:v,onLoadRange:m,onSelectionChange:T,role:"listbox",selectedKeys:C,selectionMode:x,children:e=>w(e)})},e.Dropdown=function({anchorRef:e,children:s,dropdownRef:n,id:a,isOpen:o,onAutoDismiss:l,onPosition:r}){const[d,u]=i.useState(ke),[b,m]=i.useState(o);b!==o&&(o||u(ke));const f=i.useCallback((e=>{u(e.placement),r?.(e)}),[r,u]),x=i.useCallback((e=>{l?.(e)}),[l]),w=i.useCallback((e=>{if(!e.defaultPrevented&&!y.isControlOrFunctionKey(e))switch(e.code){case y.KEYS.ESC:case y.KEYS.TAB:x(e)}}),[x]);S.useOutsideMousedown({isDisabled:!o,ref:[e,n],handler:x});const C=o?{minWidth:`${e.current?.offsetWidth}px`}:{};return b!==o&&m(o),o?t.jsx(h.Layer,{logicalParentRef:e,children:t.jsx(p.Floating,{anchorRef:e,sizeOptions:{isMaxHeightAdjusted:!0,maxHeightCeiling:400},ref:n,placement:d,offsetValue:{mainAxis:4,crossAxis:0},onPosition:f,children:t.jsx("div",{class:c.dropdownStyles.base,id:a,style:C,onKeyDown:w,onMouseDown:Ie,children:s})})}):null},e.DropdownArrow=function({isDisabled:e=!1,onClick:s,testId:n}){const{classes:a}=C.useComponentTheme(g.ButtonLabelLayoutRedwoodTheme,{size:"sm"}),{baseTheme:o}=C.useComponentTheme(T.BaseButtonRedwoodTheme),l=i.useCallback((e=>{e.preventDefault()}),[]),{pressProps:r}=f.usePress(s??Me,{isDisabled:e}),d=w.classNames([a,o,c.dropdownStyles.arrow.base,e?c.dropdownStyles.arrow.disabled:c.dropdownStyles.arrow.enabled]),u=v.useTestId(n);return t.jsx("span",{"aria-hidden":"true",class:d,tabIndex:-1,onMouseDown:l,...u,...r,children:t.jsx(x.SvgCaretDown,{})})},e.DropdownList=function({children:e,hasTopGap:s=!0,hasBottomGap:n=!0,isLoading:a=!1}){const o=w.classNames([c.dropdownStyles.list.base,s&&c.dropdownStyles.list.topGap,n&&c.dropdownStyles.list.bottomGap,a&&c.dropdownStyles.list.loading]);return t.jsx(F.CollectionInteractionContext.Provider,{value:"embedded",children:t.jsx("div",{class:o,onMouseDown:Ie,children:e})})},e.DropdownUserAssistance=function(e){const s=i.useCallback((e=>{"A"!==e.target?.tagName&&e.preventDefault()}),[]);return t.jsx(A.FormFieldContext.Provider,{value:{isFocused:!0},children:t.jsx("div",{class:c.dropdownStyles.userAssistance,onMouseDown:s,children:t.jsx(E.InlineUserAssistance,{...e})})})},e.EmptyResults=function(){const e=ae.useTranslationBundle("@oracle/oraclejet-preact");return t.jsx("div",{class:c.dropdownStyles.results.extraItem,onMouseDown:Ie,children:e.select_noMatchesFound()})},e.LinkItem=({children:e,isHighlighted:s,onAction:n})=>{const{isHover:a,hoverProps:o}=re.useHover(),{isFocused:l,focusProps:r}=le.useFocusWithin(),d=i.useCallback((e=>(e.preventDefault(),n?.(),!1)),[n]),u=w.classNames([l?c.dropdownStyles.results.linkItemFocus:void 0]),p=w.classNames([c.dropdownStyles.results.extraItem,a||l||s?c.dropdownStyles.results.linkItemHighlight:void 0]);return t.jsx("div",{class:u,...r,children:t.jsx(oe.Link,{href:"#",onClick:d,children:t.jsx("div",{class:p,...o,children:e})})})},e.MobileDropdown=Ee,e.SelectMobileDropdown=function({children:e,footer:s,hasHeaderSeparator:n=!0,header:a,id:o,isOpen:l,labelId:r}){return t.jsxs(Ee,{id:o,isOpen:l,"aria-labelledby":r,children:[a,n&&t.jsx(ie.Separator,{}),t.jsx("div",{class:ue.selectMobileDropdownStyles.content,children:e}),t.jsx(ie.Separator,{}),s]})},e.SelectMobileFieldInput=Ke,e.createKeysFromValueItems=function(e){const t=e?.reduce(((e,t)=>(e.add(t.key),e)),new Set);return t},e.isBeforeDataFetch=function(e){return"atLeast"===e.sizePrecision&&0===e.totalSize},e.isMobile=function(){const e=ge.getClientHints().deviceType;return"phone"===e||"tablet"===e},e.isPhone=function(){return"phone"===ge.getClientHints().deviceType},e.isSearchTextEmptyOrUndefined=function(e){return void 0===e||0===e.length},e.isSimpleClick=De,e.isTablet=function(){return"tablet"===ge.getClientHints().deviceType},e.preventDefault=e=>{e.preventDefault()},e.preventDefaultForCurrentTarget=Ie,e.renderItemText=Te,e.useCollectionRenderer=function({currentKey:e,onCurrentKeyChange:t,onItemAction:s,onSelectedKeysChange:n,searchText:a,selectedKeys:o,selectedOnlyData:l}){return b.useMemo((()=>{const r={searchText:a,currentRowKeyOverride:e,onPersistCurrentRowKey:t,selected:o};return void 0!==s?{...r,onRowAction:s}:{...r,onSelectedChange:n,selectedOnlyData:l}}),[e,t,s,n,a,o,l])},e.useSelectCommon=function({data:e,inputRef:t,isFocused:s,onFilter:n}){const a=i.useRef(null),o=i.useRef(null),[l,r]=i.useState(!1),[d,c]=i.useState(!1),[u,p]=i.useState({rowKey:void 0}),h=i.useRef(),b=i.useCallback((e=>{h.current=e.rowKey,p(e)}),[]),[m,S]=i.useState(!1),[f,x]=i.useState(),[w,C]=i.useState(),[g,v]=i.useState(l),[T,F]=i.useState(s),[A,D]=i.useState(m),I=i.useCallback((e=>{!e.defaultPrevented&&De(e)&&(l||r(!0),setTimeout((function(){t.current?.focus()}),0))}),[t,l]),k=i.useCallback((()=>{r(!l),t.current?.focus()}),[t,l]),M=i.useCallback((e=>{if(l)switch(r(!1),e?.type){case"keydown":if(e.code===y.KEYS.ESC)t.current?.focus();break;case"mousedown":o.current?.contains(document.activeElement)&&t.current?.focus()}}),[t,l]),E=i.useCallback((e=>{c(e.placement.startsWith("top"))}),[]),U=i.useCallback((()=>l&&o.current?ve.allTabbableElements(o.current):void 0),[l]),j=i.useCallback((t=>{if(l){if(null!=e){const t=U();t?.[0]?.focus(),void 0===u.rowKey&&b({rowKey:e.data[0]?.metadata?.key})}}else r(!0);t.preventDefault()}),[u,e,U,l,b]),K=i.useCallback((e=>{if(!y.isControlOrFunctionKey(e))switch(e.code){case y.KEYS.PAGE_UP:case y.KEYS.PAGE_DOWN:return void e.preventDefault();case y.KEYS.UP:case y.KEYS.DOWN:e.preventDefault();break;case y.KEYS.ESC:l&&(r(!1),e.preventDefault(),e.stopPropagation())}}),[l]),P=i.useCallback((e=>{if(!y.isControlOrFunctionKey(e))switch(e.code){case y.KEYS.UP:case y.KEYS.DOWN:j(e)}}),[j]),L=i.useCallback((e=>{l||r(!0),S(!0),x(e.value);const t=e.value;C(t),n?.({searchText:t})}),[l,n]),R=i.useCallback((e=>{h.current=e.value}),[]),B=i.useCallback((()=>{S(!1),x(""),C("")}),[]);return g===l&&T===s&&A===m||l||s||!m||B(),i.useEffect((()=>{l&&!m&&n?.({searchText:void 0})}),[l,m,n]),g!==l&&(l||c(!1),v(l)),T!==s&&F(s),A!==m&&D(m),{currentRowKeyRef:h,currentRowOverride:u,dropdownRef:o,getDropdownTabbableElems:U,handleDropdownArrowClick:k,handleDropdownAutoDismiss:M,handleDropdownPosition:E,handleInput:L,handleMainFieldKeyDown:K,handleMainFieldKeyUp:P,handleUpDownArrowKeys:j,isDropdownAbove:d,isDropdownOpen:l,isFocused:s||l,isUserFiltering:m,mainFieldRef:a,onCurrentKeyChange:R,onMouseDown:I,searchText:w,setCurrentRowOverride:b,setDropdownOpen:r,setUserInput:x,stopFiltering:B,userInput:f}}}));
|
|
2
|
-
//# sourceMappingURL=useSelectCommon-
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', './Flex-3421f0df', './HighlightText-644bc74e', './Grid-8911aa0f', 'css!./ListItemLayoutStyles.styles.css', './ListItemText-a3b0ed3b', './Skeleton-5839404b', 'preact/hooks', './logger-0f873e29', './PRIVATE_SelectCommon/themes/dropdownStyles.css', './List-04c4fed0', './Floating-5d98c1ca', './Layer-6f29b67f', 'preact/compat', './LayerHost-639b3284', './keyboardUtils-fbb389f8', './useOutsideMousedown-73d5a78a', './usePress-949a0d03', './CaretDown-80d7b5cf', './classNames-08d99695', './useComponentTheme-5aa41a8f', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme', './useTestId-b5cd4766', './UNSAFE_BaseButton/themes/redwood/BaseButtonTheme', './CollectionInteractionContext-0b4ed98b', './FormFieldContext-3c44aaaa', './TabbableModeContext-a9c97640', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-4656c2a6', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-e5bdb734', 'css!./IconStyle.styles.css', './IconButton-ae9a01ce', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-2e19d8de', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './Popup-66e79afa', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './useTranslationBundle-d07d4b20', './Link-c4a57187', './useFocusWithin-5a504fca', './useHover-7964884c', './Separator-181f7541', './WindowOverlay-43c10424', './PRIVATE_SelectCommon/themes/mobileDropdownStyles.css', './PRIVATE_SelectCommon/themes/selectMobileDropdownStyles.css', './textAlign-ef924afd', './mergeInterpolations-9ede4cf7', './useFormFieldContext-8196183c', './PRIVATE_SelectCommon/themes/SelectMobileFieldInputStyles.css', './TextFieldUtils-f3868e96', './useTabbableMode-dc440317', './Text-cd61a065', './useAccessibleContext-23e8a333', './stringUtils-0ae982c2', './UNSAFE_TextField/themes/redwood/TextFieldInputTheme', './clientHints-4f5a07b0', './tabbableUtils-85aa6918'], (function(e,t,s,n,a,o,l,r,i,d,c,u,p,h,b,m,y,S,f,x,w,C,g,v,T,F,A,D,I,k,M,E,U,j,K,P,L,R,B,N,O,_,V,H,W,Y,G,z,q,$,J,Q,X,Z,ee,te,se,ne,ae,oe,le,re,ie,de,ce,ue,pe,he,be,me,ye,Se,fe,xe,we,Ce,ge,ve){"use strict";function Te(e,t){if("string"!=typeof t)return t(e);if(e.data?.hasOwnProperty(t)){const s=e.data[t];return String(s)}d.error("SelectMultiple: itemText specifies field that does not exist: "+t)}const Fe=()=>{};const Ae=t.jsx(u.SkeletonContainer,{minimumCount:3,children:()=>t.jsx(s.Flex,{height:"12x",align:"center",children:t.jsx(r.Skeleton,{height:"4x"})})}),De=e=>0===e.button&&!e.ctrlKey,Ie=e=>{e.currentTarget===e.target&&e.preventDefault()},ke="bottom-start";const Me=()=>{};function Ee({"aria-labelledby":e,children:n,id:a,isOpen:o}){return o?t.jsx(h.Layer,{children:t.jsx(de.WindowOverlay,{children:t.jsx("div",{id:a,class:ce.mobileDropdownStyles.base,role:"dialog","aria-modal":"true","aria-labelledby":e,children:t.jsx(s.Flex,{width:"100%",height:"100%",maxHeight:"100%",direction:"column",children:n})})})}):null}const Ue=[...Object.values(pe.textInterpolations)],je=he.mergeInterpolations(Ue),Ke=b.forwardRef((({"aria-controls":e,"aria-describedby":s,"aria-expanded":n,"aria-invalid":a,"aria-label":o,"aria-labelledby":l,displayValue:r,hasEmptyLabel:i,hasInsideLabel:d=!1,isRequired:c,onBlur:u,onFocus:p,placeholder:h,textAlign:b,variant:m="default"},y)=>{const{isDisabled:S,isFocused:f,hasValue:x=!1}=be.useFormFieldContext(),{isTabbable:g,tabbableModeProps:v}=Se.useTabbableMode(),T=ye.isInputPlaceholderShown(d,x,f)?h:void 0,{UNSAFE_ariaLabelledBy:F}=xe.useAccessibleContext(),A=i?we.merge([l,F]):l,{class:D}=je({textAlign:b}),{classes:I}=C.useComponentTheme(Ce.TextFieldInputRedwoodTheme,{type:"notPassword",styleVariant:m,textarea:"notTextArea",input:"isInput",prefix:"noPrefix",suffix:"noSuffix",startContent:"noStartContent",endContent:"hasEndContent",insideLabel:d?"hasInsideLabel":"noInsideLabel",value:x?"hasValue":"noValue",focused:f?"isFocused":"notFocused",disabled:S?"isDisabled":"notDisabled"}),k=w.classNames([me.selectMobileFieldInputStyles.base,D,I]);return t.jsx("div",{"aria-autocomplete":"list","aria-controls":e,"aria-describedby":s,"aria-expanded":n,"aria-invalid":a,"aria-label":o,"aria-labelledby":A,"aria-required":c?"true":void 0,class:k,onBlur:u,onFocus:p,ref:y,role:"combobox",...g&&v,children:t.jsx("div",{class:me.selectMobileFieldInputStyles.content,children:t.jsx(fe.Text,{variant:r?"inherit":"secondary",children:r||T})})})}));e.DefaultList=function({"aria-label":e,currentItemVariant:a,currentKey:o,data:r,itemRenderer:d,itemText:p,onCurrentKeyChange:h,onItemAction:b,onLoadRange:m=Fe,onSelectionChange:y,searchText:S,selectedKeys:f,selectionMode:x}){const w=i.useCallback((e=>{const a={data:e.data,index:e.index,metadata:e.metadata,selector:e.selector,searchText:S,selectedKeys:f,onSelectionChange:({value:e})=>{y?.({value:e})}},o={data:e.data,key:e.metadata.key,metadata:e.metadata};return d?d(a):t.jsxs(s.Flex,{align:"center",children:[e.selector&&t.jsx("div",{class:c.dropdownStyles.selectorWrapper,children:e.selector()}),t.jsx("div",{class:"single"===x?c.dropdownStyles.singleSelectItem:c.dropdownStyles.multiSelectItem,children:t.jsx(l.ListItemText,{variant:"primary",children:t.jsx(n.HighlightText,{matchText:S,children:Te(o,p)})})})]})}),[d,p,y,S,f,x]),C=i.useMemo((()=>({all:!1,keys:f??new Set})),[f]),g=i.useMemo((()=>void 0!==o?{rowKey:o}:void 0),[o]),v=i.useCallback((({context:{data:e,metadata:t}})=>{b?.({context:{data:e,key:t.key,metadata:t}})}),[b]),T=i.useCallback((({value:e})=>{y?.({value:new Set(e.keys?.values())})}),[y]);return t.jsx(u.List,{"aria-label":e,allowTabbableMode:!1,currentItemVariant:a,currentItemOverride:g,data:r??null,loadingIndicator:Ae,onPersistCurrentItem:h,onItemAction:v,onLoadRange:m,onSelectionChange:T,role:"listbox",selectedKeys:C,selectionMode:x,children:e=>w(e)})},e.Dropdown=function({anchorRef:e,children:s,dropdownRef:n,id:a,isOpen:o,onAutoDismiss:l,onPosition:r}){const[d,u]=i.useState(ke),[b,m]=i.useState(o);b!==o&&(o||u(ke));const f=i.useCallback((e=>{u(e.placement),r?.(e)}),[r,u]),x=i.useCallback((e=>{l?.(e)}),[l]),w=i.useCallback((e=>{if(!e.defaultPrevented&&!y.isControlOrFunctionKey(e))switch(e.code){case y.KEYS.ESC:case y.KEYS.TAB:x(e)}}),[x]);S.useOutsideMousedown({isDisabled:!o,ref:[e,n],handler:x});const C=o?{minWidth:`${e.current?.offsetWidth}px`}:{};return b!==o&&m(o),o?t.jsx(h.Layer,{logicalParentRef:e,children:t.jsx(p.Floating,{anchorRef:e,sizeOptions:{isMaxHeightAdjusted:!0,maxHeightCeiling:400},ref:n,placement:d,offsetValue:{mainAxis:4,crossAxis:0},onPosition:f,children:t.jsx("div",{class:c.dropdownStyles.base,id:a,style:C,onKeyDown:w,onMouseDown:Ie,children:s})})}):null},e.DropdownArrow=function({isDisabled:e=!1,onClick:s,testId:n}){const{classes:a}=C.useComponentTheme(g.ButtonLabelLayoutRedwoodTheme,{size:"sm"}),{baseTheme:o}=C.useComponentTheme(T.BaseButtonRedwoodTheme),l=i.useCallback((e=>{e.preventDefault()}),[]),{pressProps:r}=f.usePress(s??Me,{isDisabled:e}),d=w.classNames([a,o,c.dropdownStyles.arrow.base,e?c.dropdownStyles.arrow.disabled:c.dropdownStyles.arrow.enabled]),u=v.useTestId(n);return t.jsx("span",{"aria-hidden":"true",class:d,tabIndex:-1,onMouseDown:l,...u,...r,children:t.jsx(x.SvgCaretDown,{})})},e.DropdownList=function({children:e,hasTopGap:s=!0,hasBottomGap:n=!0,isLoading:a=!1}){const o=w.classNames([c.dropdownStyles.list.base,s&&c.dropdownStyles.list.topGap,n&&c.dropdownStyles.list.bottomGap,a&&c.dropdownStyles.list.loading]);return t.jsx(F.CollectionInteractionContext.Provider,{value:"embedded",children:t.jsx("div",{class:o,onMouseDown:Ie,children:e})})},e.DropdownUserAssistance=function(e){const s=i.useCallback((e=>{"A"!==e.target?.tagName&&e.preventDefault()}),[]);return t.jsx(A.FormFieldContext.Provider,{value:{isFocused:!0},children:t.jsx("div",{class:c.dropdownStyles.userAssistance,onMouseDown:s,children:t.jsx(E.InlineUserAssistance,{...e})})})},e.EmptyResults=function(){const e=ae.useTranslationBundle("@oracle/oraclejet-preact");return t.jsx("div",{class:c.dropdownStyles.results.extraItem,onMouseDown:Ie,children:e.select_noMatchesFound()})},e.LinkItem=({children:e,isHighlighted:s,onAction:n})=>{const{isHover:a,hoverProps:o}=re.useHover(),{isFocused:l,focusProps:r}=le.useFocusWithin(),d=i.useCallback((e=>(e.preventDefault(),n?.(),!1)),[n]),u=w.classNames([l?c.dropdownStyles.results.linkItemFocus:void 0]),p=w.classNames([c.dropdownStyles.results.extraItem,a||l||s?c.dropdownStyles.results.linkItemHighlight:void 0]);return t.jsx("div",{class:u,...r,children:t.jsx(oe.Link,{href:"#",onClick:d,children:t.jsx("div",{class:p,...o,children:e})})})},e.MobileDropdown=Ee,e.SelectMobileDropdown=function({children:e,footer:s,hasHeaderSeparator:n=!0,header:a,id:o,isOpen:l,labelId:r}){return t.jsxs(Ee,{id:o,isOpen:l,"aria-labelledby":r,children:[a,n&&t.jsx(ie.Separator,{}),t.jsx("div",{class:ue.selectMobileDropdownStyles.content,children:e}),t.jsx(ie.Separator,{}),s]})},e.SelectMobileFieldInput=Ke,e.createKeysFromValueItems=function(e){const t=e?.reduce(((e,t)=>(e.add(t.key),e)),new Set);return t},e.isBeforeDataFetch=function(e){return"atLeast"===e.sizePrecision&&0===e.totalSize},e.isMobile=function(){const e=ge.getClientHints().deviceType;return"phone"===e||"tablet"===e},e.isPhone=function(){return"phone"===ge.getClientHints().deviceType},e.isSearchTextEmptyOrUndefined=function(e){return void 0===e||0===e.length},e.isSimpleClick=De,e.isTablet=function(){return"tablet"===ge.getClientHints().deviceType},e.preventDefault=e=>{e.preventDefault()},e.preventDefaultForCurrentTarget=Ie,e.renderItemText=Te,e.useCollectionRenderer=function({currentKey:e,onCurrentKeyChange:t,onItemAction:s,onSelectedKeysChange:n,searchText:a,selectedKeys:o,selectedOnlyData:l}){return b.useMemo((()=>{const r={searchText:a,currentRowKeyOverride:e,onPersistCurrentRowKey:t,selected:o};return void 0!==s?{...r,onRowAction:s}:{...r,onSelectedChange:n,selectedOnlyData:l}}),[e,t,s,n,a,o,l])},e.useSelectCommon=function({data:e,inputRef:t,isFocused:s,onFilter:n}){const a=i.useRef(null),o=i.useRef(null),[l,r]=i.useState(!1),[d,c]=i.useState(!1),[u,p]=i.useState({rowKey:void 0}),h=i.useRef(),b=i.useCallback((e=>{h.current=e.rowKey,p(e)}),[]),[m,S]=i.useState(!1),[f,x]=i.useState(),[w,C]=i.useState(),[g,v]=i.useState(l),[T,F]=i.useState(s),[A,D]=i.useState(m),I=i.useCallback((e=>{!e.defaultPrevented&&De(e)&&(l||r(!0),setTimeout((function(){t.current?.focus()}),0))}),[t,l]),k=i.useCallback((()=>{r(!l),t.current?.focus()}),[t,l]),M=i.useCallback((e=>{if(l)switch(r(!1),e?.type){case"keydown":if(e.code===y.KEYS.ESC)t.current?.focus();break;case"mousedown":o.current?.contains(document.activeElement)&&t.current?.focus()}}),[t,l]),E=i.useCallback((e=>{c(e.placement.startsWith("top"))}),[]),U=i.useCallback((()=>l&&o.current?ve.allTabbableElements(o.current):void 0),[l]),j=i.useCallback((t=>{if(l){if(null!=e){const t=U();t?.[0]?.focus(),void 0===u.rowKey&&b({rowKey:e.data[0]?.metadata?.key})}}else r(!0);t.preventDefault()}),[u,e,U,l,b]),K=i.useCallback((e=>{if(!y.isControlOrFunctionKey(e))switch(e.code){case y.KEYS.PAGE_UP:case y.KEYS.PAGE_DOWN:return void e.preventDefault();case y.KEYS.UP:case y.KEYS.DOWN:e.preventDefault();break;case y.KEYS.ESC:l&&(r(!1),e.preventDefault(),e.stopPropagation())}}),[l]),P=i.useCallback((e=>{if(!y.isControlOrFunctionKey(e))switch(e.code){case y.KEYS.UP:case y.KEYS.DOWN:j(e)}}),[j]),L=i.useCallback((e=>{l||r(!0),S(!0),x(e.value);const t=e.value;C(t),n?.({searchText:t})}),[l,n]),R=i.useCallback((e=>{h.current=e.value}),[]),B=i.useCallback((()=>{S(!1),x(""),C("")}),[]);return g===l&&T===s&&A===m||l||s||!m||B(),i.useEffect((()=>{l&&!m&&n?.({searchText:void 0})}),[l,m,n]),g!==l&&(l||c(!1),v(l)),T!==s&&F(s),A!==m&&D(m),{currentRowKeyRef:h,currentRowOverride:u,dropdownRef:o,getDropdownTabbableElems:U,handleDropdownArrowClick:k,handleDropdownAutoDismiss:M,handleDropdownPosition:E,handleInput:L,handleMainFieldKeyDown:K,handleMainFieldKeyUp:P,handleUpDownArrowKeys:j,isDropdownAbove:d,isDropdownOpen:l,isFocused:s||l,isUserFiltering:m,mainFieldRef:a,onCurrentKeyChange:R,onMouseDown:I,searchText:w,setCurrentRowOverride:b,setDropdownOpen:r,setUserInput:x,stopFiltering:B,userInput:f}}}));
|
|
2
|
+
//# sourceMappingURL=useSelectCommon-e7f123ce.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectCommon-d9c4a7bd.js","sources":["../../src/PRIVATE_SelectCommon/itemTextUtils.ts","../../src/PRIVATE_SelectCommon/DefaultList.tsx","../../src/PRIVATE_SelectCommon/eventUtils.ts","../../src/PRIVATE_SelectCommon/Dropdown.tsx","../../src/PRIVATE_SelectCommon/DropdownArrow.tsx","../../src/PRIVATE_SelectCommon/MobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileFieldInput.tsx","../../src/PRIVATE_SelectCommon/DropdownList.tsx","../../src/PRIVATE_SelectCommon/DropdownUserAssistance.tsx","../../src/PRIVATE_SelectCommon/EmptyResults.tsx","../../src/PRIVATE_SelectCommon/LinkItem.tsx","../../src/PRIVATE_SelectCommon/SelectMobileDropdown.tsx","../../src/PRIVATE_SelectCommon/selectUtils.ts","../../src/PRIVATE_SelectCommon/useCollectionRenderer.ts","../../src/PRIVATE_SelectCommon/useSelectCommon.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { Item } from '../utils/UNSAFE_dataProvider';\nimport { error } from '../utils/UNSAFE_logger';\nimport { ItemTextFunctionType, ItemTextType } from '../utils/UNSAFE_selectUtils';\n\nexport function renderItemText<K, D>(item: Item<K, D>, itemText: ItemTextType<K, D>) {\n // if item-text is a string and the data has the specified field, return it;\n // otherwise log an error\n if (typeof itemText === 'string') {\n if ((item.data as any)?.hasOwnProperty(itemText)) {\n const retData = item.data[itemText];\n return String(retData);\n }\n error('SelectMultiple: itemText specifies field that does not exist: ' + itemText);\n // return undefined if the field doesn't exist\n return undefined;\n }\n // if item-text is a function, call it to create a display label\n return (itemText as ItemTextFunctionType<K, D>)(item);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { List, SkeletonContainer } from '#PRIVATE_List';\nimport type { DataState, ListItemRendererContext, Metadata } from '#UNSAFE_Collection';\nimport { Flex } from '#UNSAFE_Flex';\nimport { HighlightText } from '#UNSAFE_HighlightText';\nimport { ListItemText } from '#UNSAFE_ListItemLayout';\nimport { Skeleton } from '#UNSAFE_Skeleton';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport type { Keys } from '#utils/UNSAFE_keys';\nimport type { ItemTextType } from '#utils/UNSAFE_selectUtils';\nimport type { ComponentChildren, ComponentProps } from 'preact';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { renderItemText } from './itemTextUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype ListProps<K extends string | number, D> = ComponentProps<typeof List<K, D>>;\ntype PickedPropsFromList = Pick<\n ComponentProps<typeof List>,\n 'aria-label' | 'currentItemVariant' | 'selectionMode'\n>;\n\n// pick the props from the ListItemContext instead of extending it directly so that we\n// don't automatically expose any new props that may be added to it\ntype PickedPropsFromListItemContext<K, D> = Pick<\n ListItemRendererContext<K, D>,\n 'data' | 'index' | 'selector'\n>;\ntype ItemRendererSelectionDetail<K> = {\n value: Set<K>;\n target: EventTarget | null;\n};\ntype ItemRendererMetadata<K> = Pick<Metadata<K>, 'key' | 'suggestion'>;\ntype ItemRendererProps<K, D> = PickedPropsFromListItemContext<K, D> & {\n metadata: ItemRendererMetadata<K>;\n searchText?: string;\n selectedKeys?: Set<K>;\n onSelectionChange: (detail: ItemRendererSelectionDetail<K>) => void;\n};\n\ntype DefaultListCurrentKeyDetail<K> = { value: K };\ntype DefaultListItemActionDetail<K, D> = { context: Item<K, D> };\ntype DefaultListSelectionDetail<K> = { value: Set<K> };\n\ntype Props<K extends string | number, D extends Record<string, any>> = PickedPropsFromList & {\n itemRenderer?: (itemRendererProps: ItemRendererProps<K, D>) => ComponentChildren;\n itemText: ItemTextType<K, D>;\n // props from List that we constrain or unconstrain\n currentKey?: K;\n data?: DataState<K, D> | null;\n onCurrentKeyChange: (detail: DefaultListCurrentKeyDetail<K>) => void;\n onItemAction?: (detail: DefaultListItemActionDetail<K, D>) => void;\n onLoadRange?: ComponentProps<typeof List>['onLoadRange'];\n onSelectionChange?: (detail: DefaultListSelectionDetail<K>) => void;\n searchText?: string;\n selectedKeys?: Set<K>;\n};\n\nconst noOp = () => {};\n\nexport function DefaultList<K extends string | number, D extends Record<string, any>>({\n 'aria-label': ariaLabel,\n currentItemVariant,\n currentKey,\n data,\n itemRenderer,\n itemText,\n onCurrentKeyChange,\n onItemAction,\n onLoadRange = noOp,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n}: Props<K, D>) {\n const listItemRenderer = useCallback(\n (listItemContext: ListItemRendererContext<K, D>) => {\n // specify the listItemContext props that we want to expose individually instead of\n // spreading the whole object so that we don't automatically include any new props that\n // may be added to it\n const itemRendererProps: ItemRendererProps<K, D> = {\n data: listItemContext.data,\n index: listItemContext.index,\n metadata: listItemContext.metadata,\n selector: listItemContext.selector,\n searchText,\n selectedKeys,\n onSelectionChange: ({ value }) => {\n onSelectionChange?.({ value });\n }\n };\n const itemContext = {\n data: listItemContext.data,\n key: listItemContext.metadata.key,\n metadata: listItemContext.metadata\n };\n return itemRenderer ? (\n itemRenderer(itemRendererProps)\n ) : (\n <Flex align=\"center\">\n {listItemContext.selector && (\n <div class={dropdownStyles.selectorWrapper}>{listItemContext.selector()}</div>\n )}\n <div\n class={\n selectionMode === 'single'\n ? dropdownStyles.singleSelectItem\n : dropdownStyles.multiSelectItem\n }>\n <ListItemText variant=\"primary\">\n <HighlightText matchText={searchText}>\n {renderItemText(itemContext, itemText) as string}\n </HighlightText>\n </ListItemText>\n </div>\n </Flex>\n );\n },\n [itemRenderer, itemText, onSelectionChange, searchText, selectedKeys, selectionMode]\n );\n\n const keys = useMemo(() => {\n return { all: false, keys: selectedKeys ?? new Set<K>() };\n }, [selectedKeys]) as Keys<K>;\n\n const currentItemOverride = useMemo(\n () => (currentKey !== undefined ? { rowKey: currentKey } : undefined),\n [currentKey]\n );\n const handleItemAction = useCallback<NonNullable<ListProps<K, D>['onItemAction']>>(\n ({ context: { data, metadata } }) => {\n onItemAction?.({ context: { data, key: metadata.key, metadata } });\n },\n [onItemAction]\n );\n const handleSelectionChange = useCallback<NonNullable<ListProps<K, D>['onSelectionChange']>>(\n ({ value }) => {\n onSelectionChange?.({ value: new Set(value.keys?.values()) });\n },\n [onSelectionChange]\n );\n\n return (\n <List<K, D>\n aria-label={ariaLabel}\n allowTabbableMode={false}\n currentItemVariant={currentItemVariant}\n currentItemOverride={currentItemOverride}\n data={data ?? null}\n loadingIndicator={loadingIndicator}\n onPersistCurrentItem={onCurrentKeyChange}\n onItemAction={handleItemAction}\n onLoadRange={onLoadRange}\n onSelectionChange={handleSelectionChange}\n role=\"listbox\"\n selectedKeys={keys}\n selectionMode={selectionMode}>\n {(context: ListItemRendererContext<K, D>) => listItemRenderer(context)}\n </List>\n );\n}\n\n/**\n * Custom 3 Skeleton loader for select multiple\n * TODO: to remove this once is solved\n */\nconst loadingIndicator = (\n <SkeletonContainer minimumCount={3}>\n {() => {\n return (\n <Flex height=\"12x\" align=\"center\">\n <Skeleton height=\"4x\" />\n </Flex>\n );\n }}\n </SkeletonContainer>\n);\n","export const isSimpleClick = (event: MouseEvent) => {\n return event.button === 0 && !event.ctrlKey;\n};\n\nexport const preventDefault = (event: Event) => {\n event.preventDefault();\n};\n\nexport const preventDefaultForCurrentTarget = (event: MouseEvent) => {\n if (event.currentTarget === event.target) {\n event.preventDefault();\n }\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren, ComponentProps } from 'preact';\nimport { MutableRef, useCallback, useState } from 'preact/hooks';\nimport { Floating, PositionData } from '../UNSAFE_Floating';\nimport { Layer } from '../UNSAFE_Layer';\nimport { isControlOrFunctionKey, KEYS } from '../utils/PRIVATE_keyboardUtils';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n//Once Dropdown is consumed this will be removed\nimport { useOutsideMousedown } from '../hooks/PRIVATE_useOutsideMousedown';\n\ntype FloatingProps = ComponentProps<typeof Floating>;\n\ntype Props = {\n anchorRef: MutableRef<HTMLElement | null>;\n children?: ComponentChildren;\n dropdownRef: MutableRef<HTMLElement | null>;\n id?: string;\n isOpen?: boolean;\n onAutoDismiss?: (event?: Event) => void;\n onPosition?: FloatingProps['onPosition'];\n};\n\nconst DEFAULT_PLACEMENT = 'bottom-start';\n\n//TODO: Start consuming PRIVATE_Dropdown. JET-62565\nexport function Dropdown({\n anchorRef,\n children,\n dropdownRef,\n id,\n isOpen,\n onAutoDismiss,\n onPosition\n}: Props) {\n const [placement, setPlacement] = useState<FloatingProps['placement']>(DEFAULT_PLACEMENT);\n\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\n if (prevIsOpen !== isOpen) {\n // reset the placement to the default when the dropdown closes, not opens, so that it doesn't\n // initially open in the previous position and then move to the default position on the\n // rerender after the state is updated\n if (!isOpen) {\n setPlacement(DEFAULT_PLACEMENT);\n }\n }\n\n const handlePosition = useCallback(\n (positionData: PositionData) => {\n // update the placement so that the dropdown stays where it is until there is a collision,\n // i.e. it no longer fits, instead of letting it try to move back to the default position\n // on every render\n setPlacement(positionData.placement);\n\n // call the callback that was passed in through props\n onPosition?.(positionData);\n },\n [onPosition, setPlacement]\n );\n\n const handleAutoDismiss = useCallback(\n (event: Event) => {\n onAutoDismiss?.(event);\n },\n [onAutoDismiss]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.defaultPrevented || isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.ESC:\n case KEYS.TAB:\n handleAutoDismiss(event);\n break;\n }\n },\n [handleAutoDismiss]\n );\n\n // use the mousedown event to be consistent with legacy JET and so that we're hiding the dropdown\n // on the same event where focus will transfer\n useOutsideMousedown({\n isDisabled: !isOpen,\n ref: [anchorRef, dropdownRef],\n handler: handleAutoDismiss\n });\n\n // TODO: get dropdown y (mainAxis) offset from --oj-c-PRIVATE-DO-NOT-USE-private-core-global-dropdown-offset\n const offsetValue = { mainAxis: 4, crossAxis: 0 };\n\n const inlineStyle = isOpen\n ? {\n minWidth: `${anchorRef.current?.offsetWidth}px`\n }\n : {};\n\n if (prevIsOpen !== isOpen) {\n setPrevIsOpen(isOpen);\n }\n\n return !isOpen ? null : (\n <Layer logicalParentRef={anchorRef}>\n <Floating\n anchorRef={anchorRef}\n sizeOptions={{\n isMaxHeightAdjusted: true,\n maxHeightCeiling: 400\n }}\n ref={dropdownRef}\n placement={placement}\n offsetValue={offsetValue}\n onPosition={handlePosition}>\n <div\n class={dropdownStyles.base}\n id={id}\n style={inlineStyle}\n onKeyDown={handleKeyDown}\n onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </Floating>\n </Layer>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { DropdownArrowIcon } from '../PRIVATE_ThemedIcons/DropdownArrowIcon';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { ButtonLabelLayoutRedwoodTheme } from '#UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme';\nimport type { ButtonLabelLayoutVariantOptions } from '#UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css';\nimport { TestIdProps, useTestId } from '#hooks/UNSAFE_useTestId';\nimport { BaseButtonRedwoodTheme } from '#UNSAFE_BaseButton/themes/redwood/BaseButtonTheme';\n\ntype Props = TestIdProps & {\n isDisabled?: boolean;\n onClick?: () => void;\n};\n\nconst noop = () => {};\n\nexport function DropdownArrow({ isDisabled = false, onClick, testId }: Props) {\n const { classes } = useComponentTheme<ButtonLabelLayoutVariantOptions>(\n ButtonLabelLayoutRedwoodTheme,\n { size: 'sm' }\n );\n const { baseTheme } = useComponentTheme(BaseButtonRedwoodTheme);\n\n const preventDefault = useCallback((event: Event) => {\n event.preventDefault();\n }, []);\n const { pressProps } = usePress(onClick ?? noop, { isDisabled });\n\n // TODO: JET-67410 replace this with a icon button\n const styleClasses = classNames([\n classes,\n baseTheme,\n dropdownStyles.arrow.base,\n isDisabled ? dropdownStyles.arrow.disabled : dropdownStyles.arrow.enabled\n ]);\n\n const testIdProps = useTestId(testId);\n\n return (\n <span\n aria-hidden=\"true\"\n class={styleClasses}\n tabIndex={-1}\n onMouseDown={preventDefault}\n {...testIdProps}\n {...pressProps}>\n <DropdownArrowIcon />\n </span>\n );\n}\n","import { ComponentChildren } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Layer } from '../UNSAFE_Layer';\nimport { WindowOverlay } from '../UNSAFE_WindowOverlay';\nimport { HTMLAttributesSignalExcluded } from '../utils/UNSAFE_attributeUtils';\nimport { mobileDropdownStyles } from './themes/mobileDropdownStyles.css';\n\ntype Props = {\n /**\n * Id of the label to associate with the dropdown (e.g. the label of the filter field).\n */\n 'aria-labelledby'?: HTMLAttributesSignalExcluded['aria-labelledby'];\n\n /**\n * The dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The id for the top level element\n */\n id?: string;\n\n /**\n * Specifies whether the dropdown is being shown\n */\n isOpen?: boolean;\n};\n\nexport function MobileDropdown({ 'aria-labelledby': ariaLabelledBy, children, id, isOpen }: Props) {\n return !isOpen ? null : (\n <Layer>\n <WindowOverlay>\n <div\n id={id}\n class={mobileDropdownStyles.base}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ariaLabelledBy}>\n <Flex width=\"100%\" height=\"100%\" maxHeight=\"100%\" direction=\"column\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n}\n","import { Ref } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport {\n AriaAttributesSignalExcluded,\n HTMLAttributesSignalExcluded\n} from '../utils/UNSAFE_attributeUtils';\nimport { TextProps, textInterpolations } from '../utils/UNSAFE_interpolations/text';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { TextFieldInputVariantOptions } from '../UNSAFE_TextField/themes/TextFieldInputStyles.css';\nimport { useFormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { selectMobileFieldInputStyles } from './themes/SelectMobileFieldInputStyles.css';\nimport { isInputPlaceholderShown } from '../UNSAFE_TextField/TextFieldUtils';\nimport { useTabbableMode } from '../hooks/UNSAFE_useTabbableMode';\nimport { Text } from '../UNSAFE_Text';\nimport { useAccessibleContext } from '../hooks/UNSAFE_useAccessibleContext';\nimport { merge } from '../utils/UNSAFE_stringUtils';\nimport { TextFieldInputRedwoodTheme } from '../UNSAFE_TextField/themes/redwood/TextFieldInputTheme';\n\ntype AriaProps = Pick<\n AriaAttributesSignalExcluded,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'aria-labelledby'\n>;\n\ntype EventProps = Pick<HTMLAttributesSignalExcluded<HTMLDivElement>, 'onBlur' | 'onFocus'>;\n\ntype Props = AriaProps &\n EventProps &\n TextProps & {\n displayValue?: string;\n hasEmptyLabel?: boolean;\n hasInsideLabel?: boolean;\n isRequired?: boolean;\n placeholder?: string;\n variant?: 'default' | 'embedded';\n };\n\nconst interpolations = [...Object.values(textInterpolations)];\nconst styleInterpolations = mergeInterpolations<Props>(interpolations);\n\n/**\n * This component is used for rendering the main field in mobile phones. This is a bit different from the\n * normal main field (TextFieldInput) that we use for desktop & tablet devices in the way that\n * a user will not be able to edit the value of this field. But, one can still have other functionalities\n * of having a placeholder, tab in & out of it, and other such functionalities of an enabled field.\n *\n * This also differs from ReadonlyTextFieldInput in the following ways:\n * 1. This will be rendered as div as well, but has a role of combobox set on it\n * 2. This will not be read as readonly input by the screen readers\n * 3. This has the stylings much similar to the TextFieldInput component\n * 4. This supports the use of placeholder and shows it when there is no value present\n * 5. This supports having the variant property and styles accordingly\n *\n * As such, this is very similar to the TextFieldInput except that this does not allow user input.\n * Note: we cannot use TextFieldInput with readonly set on it; even though it might provide us the\n * behavior we need, it will make the field as readonly and screen readers read the same about this\n * field. This will be an incorrect representation contextually as one can still edit the value by opening\n * the dropdown and changing the selection.\n */\nexport const SelectMobileFieldInput = forwardRef(\n (\n {\n 'aria-controls': ariaControls,\n 'aria-describedby': ariaDescribedBy,\n 'aria-expanded': ariaExpanded,\n 'aria-invalid': ariaInvalid,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n displayValue,\n hasEmptyLabel,\n hasInsideLabel = false,\n isRequired,\n onBlur,\n onFocus,\n placeholder,\n textAlign,\n variant = 'default'\n }: Props,\n ref?: Ref<HTMLDivElement>\n ) => {\n // consume required contexts\n const { isDisabled, isFocused, hasValue = false } = useFormFieldContext();\n const { isTabbable, tabbableModeProps } = useTabbableMode();\n\n // setup properties\n const myPlaceholder = isInputPlaceholderShown(hasInsideLabel, hasValue, isFocused)\n ? placeholder\n : undefined;\n\n // Add unsafe API for specifying an external label which is added to ariaLabelledBy on the input,\n // only when labelEdge is 'none' and label is ''. Since ariaLabelledBy takes precedence over all other\n // kinds of labels, this helps to ensure we don't override a meaningful label.\n const { UNSAFE_ariaLabelledBy } = useAccessibleContext();\n const mergedAriaLabelledBy = hasEmptyLabel\n ? merge([ariaLabelledBy, UNSAFE_ariaLabelledBy])\n : ariaLabelledBy;\n\n // setup style classes\n const { class: styleInterpolationClasses } = styleInterpolations({ textAlign });\n const { classes: themeClasses } = useComponentTheme<TextFieldInputVariantOptions>(\n TextFieldInputRedwoodTheme,\n {\n type: 'notPassword',\n styleVariant: variant,\n textarea: 'notTextArea',\n input: 'isInput',\n prefix: 'noPrefix',\n suffix: 'noSuffix',\n startContent: 'noStartContent',\n endContent: 'hasEndContent',\n insideLabel: hasInsideLabel ? 'hasInsideLabel' : 'noInsideLabel',\n value: hasValue ? 'hasValue' : 'noValue',\n focused: isFocused ? 'isFocused' : 'notFocused',\n disabled: isDisabled ? 'isDisabled' : 'notDisabled'\n }\n );\n const rootDivStyleClasses = classNames([\n selectMobileFieldInputStyles.base,\n styleInterpolationClasses,\n themeClasses\n ]);\n\n return (\n <div\n aria-autocomplete=\"list\"\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-invalid={ariaInvalid}\n aria-label={ariaLabel}\n aria-labelledby={mergedAriaLabelledBy}\n aria-required={isRequired ? 'true' : undefined}\n class={rootDivStyleClasses}\n onBlur={onBlur}\n onFocus={onFocus}\n ref={ref}\n role=\"combobox\"\n {...(isTabbable && tabbableModeProps)}>\n <div class={selectMobileFieldInputStyles.content}>\n <Text variant={displayValue ? 'inherit' : 'secondary'}>\n {displayValue || myPlaceholder}\n </Text>\n </div>\n </div>\n );\n }\n);\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren } from 'preact';\nimport { CollectionInteractionContext } from '../hooks/UNSAFE_useCollectionInteractionContext';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n children?: ComponentChildren;\n hasTopGap?: boolean;\n hasBottomGap?: boolean;\n isLoading?: boolean;\n};\n\nexport function DropdownList({\n children,\n hasTopGap = true,\n hasBottomGap = true,\n isLoading = false\n}: Props) {\n const styleClasses = classNames([\n dropdownStyles.list.base,\n hasTopGap && dropdownStyles.list.topGap,\n hasBottomGap && dropdownStyles.list.bottomGap,\n isLoading && dropdownStyles.list.loading\n ]);\n return (\n <CollectionInteractionContext.Provider value={'embedded'}>\n <div class={styleClasses} onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </CollectionInteractionContext.Provider>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype InlineUserAssistanceProps = Pick<\n ComponentProps<typeof InlineUserAssistance>,\n | 'assistiveText'\n | 'fieldLabel'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'id'\n | 'userAssistanceDensity'\n>;\n\nexport function DropdownUserAssistance(props: InlineUserAssistanceProps) {\n // Prevent the focus from transferring when the user clicks on an empty/non-clickable area\n // of the user assistance\n const handleMouseDown = useCallback((event: MouseEvent) => {\n // Don't call preventDefault when the user clicks on the help source link, so that the\n // focus is allowed to transfer in that case.\n if ((event.target as Element)?.tagName !== 'A') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={dropdownStyles.userAssistance} onMouseDown={handleMouseDown}>\n <InlineUserAssistance {...props} />\n </div>\n </FormFieldContext.Provider>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\nexport function EmptyResults() {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n // call preventDefault for mousedown on this div so that focus does not transfer from\n // the input\n return (\n <div class={dropdownStyles.results.extraItem} onMouseDown={preventDefaultForCurrentTarget}>\n {translations.select_noMatchesFound()}\n </div>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { Link } from '#UNSAFE_Link';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useHover } from '#hooks/UNSAFE_useHover';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n /**\n * Child content of the item.\n */\n children: string;\n /**\n * Specifies whether to highlight the item.\n */\n isHighlighted?: boolean;\n /**\n * Callback invoked when the user triggers the link, for example by clicking or pressing Enter.\n */\n onAction?: () => void;\n};\n\n/**\n * This component renders a link that looks like a list item in a Select* component dropdown.\n * It fires an action when the user triggers it, and is intended to be used for launching\n * external application UI from within the dropdown, for example to provide advanced search or\n * add to list functionality.\n * The LinkItem would typically be shown in a fixed position above or below the list itself.\n */\nconst LinkItem = ({ children, isHighlighted, onAction }: Props) => {\n const { isHover, hoverProps } = useHover();\n const { isFocused, focusProps } = useFocusWithin();\n\n const handleClick = useCallback(\n (e: Event) => {\n // prevent the link from actually navigating by preventing default and returning false\n e.preventDefault();\n onAction?.();\n return false;\n },\n [onAction]\n );\n\n const rootClasses = classNames([isFocused ? dropdownStyles.results.linkItemFocus : undefined]);\n\n const linkClasses = classNames([\n dropdownStyles.results.extraItem,\n isHover || isFocused || isHighlighted ? dropdownStyles.results.linkItemHighlight : undefined\n ]);\n\n return (\n <div class={rootClasses} {...focusProps}>\n <Link href=\"#\" onClick={handleClick}>\n <div class={linkClasses} {...hoverProps}>\n {children}\n </div>\n </Link>\n </div>\n );\n};\n\nexport { LinkItem };\n","import { ComponentChildren, ComponentProps } from 'preact';\nimport { Separator } from '../UNSAFE_Separator';\nimport { MobileDropdown } from './MobileDropdown';\nimport { selectMobileDropdownStyles } from './themes/selectMobileDropdownStyles.css';\n\ntype MobileDropdownProps = ComponentProps<typeof MobileDropdown>;\ntype PassThroughMobileDropdownProps = Pick<MobileDropdownProps, 'id' | 'isOpen'>;\n\ntype Props = PassThroughMobileDropdownProps & {\n /**\n * The main dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The components to be placed in the end of the dropdown\n */\n footer?: ComponentChildren;\n\n /**\n * The components to be placed in the beginning of the dropdown\n */\n header?: ComponentChildren;\n\n /**\n * Specifies whether to have a separator between header and content\n */\n hasHeaderSeparator?: boolean;\n\n /**\n * Id of the label for the filter field.\n */\n labelId?: string;\n};\n\nexport function SelectMobileDropdown({\n children,\n footer,\n hasHeaderSeparator = true,\n header,\n id,\n isOpen,\n labelId\n}: Props) {\n return (\n <MobileDropdown id={id} isOpen={isOpen} aria-labelledby={labelId}>\n {header}\n {hasHeaderSeparator && <Separator />}\n {/* TODO: Add overflow support to View and use it here */}\n {/* */}\n <div class={selectMobileDropdownStyles.content}>{children}</div>\n <Separator />\n {footer}\n </MobileDropdown>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\n\n/**\n * Helper function to determine whether the current device is a mobile device\n * @returns true if running on a mobile device, false otherwise\n */\nexport function isMobile() {\n const deviceType = getClientHints().deviceType;\n return deviceType === 'phone' || deviceType === 'tablet';\n}\n\n/**\n * Helper function to determine whether the current device is a phone\n * @returns true if running on a phone, false otherwise\n */\nexport function isPhone() {\n return getClientHints().deviceType === 'phone';\n}\n\n/**\n * Helper function to determine whether the current device is a tablet\n * @returns true if running on a tablet, false otherwise\n */\nexport function isTablet() {\n return getClientHints().deviceType === 'tablet';\n}\n\nexport function isBeforeDataFetch<K, D>(data: DataState<K, D>) {\n return data.sizePrecision === 'atLeast' && data.totalSize === 0;\n}\n\nexport function isSearchTextEmptyOrUndefined(searchText?: string) {\n return searchText === undefined || searchText.length === 0;\n}\n\n/**\n * Extract keys from a value items array.\n *\n * @param valueItems The value items from which the keys are to be extracted\n * @returns The set of keys\n */\nexport function createKeysFromValueItems<K, D>(valueItems?: Item<K, D>[]) {\n const keys = valueItems?.reduce((accumKeys, currentItem) => {\n accumKeys.add(currentItem.key);\n return accumKeys;\n }, new Set<K>());\n return keys;\n}\n","import type { DataState } from '#UNSAFE_Collection';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport { useMemo } from 'preact/compat';\n\ntype Key = string | number;\ntype Data = Record<string, any>;\n\ntype UseCollectionRendererCommonParams<K> = {\n currentKey?: K;\n searchText?: string;\n selectedKeys?: Set<K>;\n onCurrentKeyChange: (detail: { value?: K }) => void;\n};\n\nexport type UseCollectionRendererSelectSingleParams<K, D> = UseCollectionRendererCommonParams<K> & {\n onItemAction: (detail: { context: Item<K, D> }) => void;\n onSelectedKeysChange?: never;\n selectedOnlyData?: never;\n};\n\nexport type UseCollectionRendererSelectMultipleParams<K, D> =\n UseCollectionRendererCommonParams<K> & {\n onItemAction?: never;\n onSelectedKeysChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n };\n\ntype UseCollectionRendererParams<K, D> =\n | UseCollectionRendererSelectSingleParams<K, D>\n | UseCollectionRendererSelectMultipleParams<K, D>;\n\ntype CommonCollectionRendererContext<K extends Key> = {\n searchText?: string;\n currentRowKeyOverride?: K;\n onPersistCurrentRowKey: (detail: { value?: K }) => void;\n selected?: Set<K>;\n};\n\nexport type SelectSingleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onRowAction: (detail: { context: Item<K, D> }) => void;\n};\n\nexport type SelectMultipleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onSelectedChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n};\n\ntype CollectionRendererContext<K extends Key, D extends Data> =\n | SelectSingleCollectionRendererContext<K, D>\n | SelectMultipleCollectionRendererContext<K, D>;\n\n// NOTE: We will using a single hook that constructs the collection renderer context for both select single and\n// select multiple. This is ok as they both share most of the properties and differ only in a few areas. So, we will\n// be using function overloading to determine which component is calling the hook (based on the args) and return the\n// correct context.\n\n/**\n * A custom hook that constructs the context for SelectSingle's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectSingleParams<K, D>\n): SelectSingleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectMultiple's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectMultipleParams<K, D>\n): SelectMultipleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectSingle/SelectMultiple's collectionRenderer.\n * @param param0 Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>({\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n}: UseCollectionRendererParams<K, D>) {\n return useMemo<CollectionRendererContext<K, D>>(() => {\n const common = {\n searchText,\n currentRowKeyOverride: currentKey,\n onPersistCurrentRowKey: onCurrentKeyChange,\n selected: selectedKeys\n } satisfies CommonCollectionRendererContext<K>;\n\n // If onItemAction is present, then we are constructing context for SelectSingle. So,\n // return the context satisfying SelectSingleCollectionRendererContext type.\n if (onItemAction !== undefined)\n return {\n ...common,\n onRowAction: onItemAction\n } satisfies SelectSingleCollectionRendererContext<K, D>;\n\n // If onItemAction is not present, then we are constructing context for SelectMultiple. So,\n // return the context satisfying SelectMultipleCollectionRendererContext type.\n return {\n ...common,\n onSelectedChange: onSelectedKeysChange,\n selectedOnlyData\n } satisfies SelectMultipleCollectionRendererContext<K, D>;\n }, [\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n ]);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport type { PositionData } from '#UNSAFE_Floating';\nimport { KEYS, isControlOrFunctionKey } from '#utils/PRIVATE_keyboardUtils';\nimport { allTabbableElements } from '#utils/PRIVATE_tabbableUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport type { RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { isSimpleClick } from './eventUtils';\n\ntype UseSelectCommonProps<K, D> = {\n data?: DataState<K, D> | null;\n inputRef: RefObject<HTMLElement>;\n isFocused?: boolean;\n onFilter?: ({ searchText }: { searchText?: string }) => void;\n};\n\nexport type CurrentKeyDetail<K> = {\n value?: K;\n};\n\n/**\n * Hook that manages state and behavior for a Select* component. This hook creates state\n * variables and event listeners, returning properties to apply to components internally\n * rendered by a Select* component, as well as state information.\n *\n * @param data Specifies data for the dropdown list.\n * @param inputRef Ref to the input element.\n * @param isFocused Specifies whether the component has focus.\n * @param onFilter Callback function to trigger loading data for the dropdown list,\n * which may or may not be filtered by user entered text.\n *\n * @returns Component state and event listeners.\n */\nexport function useSelectCommon<K, D>({\n data,\n inputRef,\n isFocused,\n onFilter\n}: UseSelectCommonProps<K, D>) {\n const mainFieldRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const [isDropdownOpen, setDropdownOpen] = useState(false);\n const [isDropdownAbove, setDropdownAbove] = useState(false);\n\n // We only need to push currentRow when we need to override the\n // current row, like when the dropdown is opened and we want to set the initial\n // focused row or when filtering and we want to focus the first row.\n const [currentRowOverride, _setCurrentRowOverride] = useState<{ rowKey?: K }>({\n rowKey: undefined\n });\n // We still need information on what the current row actually is, but we do not need\n // to react to it until certain scenarios like pressing Tab from the dropdown. So, we\n // just store this in a ref.\n const currentRowKeyRef = useRef<K>();\n // When we want to update the currentRowOverride, we also want to keep the currentRowKeyRef\n // in sync as the collection will not call onChanged for this change.\n const setCurrentRowOverride = useCallback((currentRow: { rowKey?: K }) => {\n currentRowKeyRef.current = currentRow.rowKey;\n _setCurrentRowOverride(currentRow);\n }, []);\n const [isUserFiltering, setUserFiltering] = useState(false);\n const [userInput, setUserInput] = useState<string>();\n const [searchText, setSearchText] = useState<string>();\n\n const [prevIsDropdownOpen, setPrevIsDropdownOpen] = useState(isDropdownOpen);\n const [prevIsFocused, setPrevIsFocused] = useState(isFocused);\n const [prevIsUserFiltering, setPrevIsUserFiltering] = useState(isUserFiltering);\n\n const onMouseDown = useCallback(\n (event: MouseEvent) => {\n // const target = event.target as HTMLElement;\n if (event.defaultPrevented || !isSimpleClick(event)) {\n return;\n }\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n // this is needed to focus the input when clicking on the inside label when there is no\n // value; otherwise the component looks focused but doesn't actually have physical focus\n setTimeout(function () {\n inputRef.current?.focus();\n }, 0);\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownArrowClick = useCallback(() => {\n setDropdownOpen(!isDropdownOpen);\n\n // focus the input so that if the user Tabs afterwards, it loses focus and the dropdown closes\n inputRef.current?.focus();\n }, [inputRef, isDropdownOpen]);\n\n const handleDropdownAutoDismiss = useCallback(\n (event?: Event) => {\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n switch (event?.type) {\n case 'keydown':\n const keyboardEvent = event as KeyboardEvent;\n switch (keyboardEvent.code) {\n case KEYS.ESC:\n // focus the input when the user cancels out of the dropdown\n inputRef.current?.focus();\n break;\n default:\n break;\n }\n break;\n case 'mousedown':\n // if focus is in the dropdown, focus the input before the dropdown is hidden so that\n // focus will transfer correctly when the target is not focusable;\n // otherwise the text cursor appears in the input again\n if (dropdownRef.current?.contains(document.activeElement)) {\n inputRef.current?.focus();\n }\n break;\n default:\n break;\n }\n }\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownPosition = useCallback((data: PositionData) => {\n setDropdownAbove(data.placement.startsWith('top'));\n }, []);\n\n const getDropdownTabbableElems = useCallback(() => {\n return isDropdownOpen && dropdownRef.current\n ? allTabbableElements(dropdownRef.current)\n : undefined;\n }, [isDropdownOpen]);\n\n const handleUpDownArrowKeys = useCallback(\n (event: KeyboardEvent) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n } else {\n // JET-64909 - focus / 'current' dropped when arrow keying during loading\n // Transfer physical focus into the dropdown only if the data is present and the dropdown\n // has rendered the data. Otherwise, keep the focus in the field.\n if (data != null) {\n const tabbableElems = getDropdownTabbableElems();\n tabbableElems?.[0]?.focus();\n\n // if there is no current item set, make the first item current\n if (currentRowOverride.rowKey === undefined) {\n setCurrentRowOverride({ rowKey: data.data[0]?.metadata?.key });\n }\n }\n }\n\n // prevent the page from scrolling\n event.preventDefault();\n },\n [currentRowOverride, data, getDropdownTabbableElems, isDropdownOpen, setCurrentRowOverride]\n );\n\n const handleMainFieldKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // const target = event.target as HTMLElement;\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.PAGE_UP:\n case KEYS.PAGE_DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n\n return;\n\n case KEYS.UP:\n case KEYS.DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n break;\n\n case KEYS.ESC:\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n event.preventDefault();\n\n // JET-53183 - core pack compat: stop propagation of handled events\n // we don't want a parent collection component to stop editing the row when we close\n // the dropdown\n event.stopPropagation();\n }\n break;\n\n default:\n break;\n }\n },\n [isDropdownOpen]\n );\n\n const handleMainFieldKeyUp = useCallback(\n (event: KeyboardEvent) => {\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n handleUpDownArrowKeys(event);\n break;\n\n default:\n break;\n }\n },\n [handleUpDownArrowKeys]\n );\n\n const handleInput = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n setUserFiltering(true);\n setUserInput(detail.value);\n const str = detail.value;\n setSearchText(str);\n onFilter?.({ searchText: str });\n },\n [isDropdownOpen, onFilter]\n );\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K>) => {\n // when the collection changes the current key, we only want to store the information\n // and not do anything.\n currentRowKeyRef.current = detail.value;\n }, []);\n\n const stopFiltering = useCallback(() => {\n setUserFiltering(false);\n setUserInput('');\n setSearchText('');\n }, []);\n\n // the user is not actively filtering if the dropdown is closed and the component doesn't\n // have focus\n if (\n prevIsDropdownOpen !== isDropdownOpen ||\n prevIsFocused !== isFocused ||\n prevIsUserFiltering !== isUserFiltering\n ) {\n if (!isDropdownOpen && !isFocused && isUserFiltering) {\n stopFiltering();\n }\n }\n\n // need to call onFilter with undefined searchText when the dropdown opens and the\n // user is NOT filtering\n useEffect(() => {\n if (isDropdownOpen && !isUserFiltering) {\n onFilter?.({ searchText: undefined });\n }\n }, [isDropdownOpen, isUserFiltering, onFilter]);\n\n // when the dropdown closes, reset the isDropdownAbove flag\n if (prevIsDropdownOpen !== isDropdownOpen) {\n if (!isDropdownOpen) {\n setDropdownAbove(false);\n }\n setPrevIsDropdownOpen(isDropdownOpen);\n }\n\n if (prevIsFocused !== isFocused) {\n setPrevIsFocused(isFocused);\n }\n if (prevIsUserFiltering !== isUserFiltering) {\n setPrevIsUserFiltering(isUserFiltering);\n }\n\n return {\n currentRowKeyRef,\n currentRowOverride,\n dropdownRef,\n getDropdownTabbableElems,\n handleDropdownArrowClick,\n handleDropdownAutoDismiss,\n handleDropdownPosition,\n handleInput,\n handleMainFieldKeyDown,\n handleMainFieldKeyUp,\n handleUpDownArrowKeys,\n isDropdownAbove,\n isDropdownOpen,\n // the field should remain to look focused while the dropdown is open,\n // in case physical focus is in the dropdown\n isFocused: isFocused || isDropdownOpen,\n isUserFiltering,\n mainFieldRef,\n onCurrentKeyChange,\n onMouseDown,\n searchText,\n setCurrentRowOverride,\n setDropdownOpen,\n setUserInput,\n stopFiltering,\n userInput\n };\n}\n"],"names":["renderItemText","item","itemText","data","hasOwnProperty","retData","String","error","noOp","loadingIndicator","_jsx","jsx","SkeletonContainer","minimumCount","children","Flex","height","align","Skeleton","isSimpleClick","event","button","ctrlKey","preventDefaultForCurrentTarget","currentTarget","target","preventDefault","DEFAULT_PLACEMENT","noop","MobileDropdown","ariaLabelledBy","id","isOpen","Layer","WindowOverlay","class","mobileDropdownStyles","base","role","width","maxHeight","direction","interpolations","Object","values","textInterpolations","styleInterpolations","mergeInterpolations","SelectMobileFieldInput","forwardRef","ariaControls","ariaDescribedBy","ariaExpanded","ariaInvalid","ariaLabel","displayValue","hasEmptyLabel","hasInsideLabel","isRequired","onBlur","onFocus","placeholder","textAlign","variant","ref","isDisabled","isFocused","hasValue","useFormFieldContext","isTabbable","tabbableModeProps","useTabbableMode","myPlaceholder","isInputPlaceholderShown","undefined","UNSAFE_ariaLabelledBy","useAccessibleContext","mergedAriaLabelledBy","merge","styleInterpolationClasses","classes","themeClasses","useComponentTheme","TextFieldInputRedwoodTheme","type","styleVariant","textarea","input","prefix","suffix","startContent","endContent","insideLabel","value","focused","disabled","rootDivStyleClasses","classNames","selectMobileFieldInputStyles","content","Text","currentItemVariant","currentKey","itemRenderer","onCurrentKeyChange","onItemAction","onLoadRange","onSelectionChange","searchText","selectedKeys","selectionMode","listItemRenderer","useCallback","listItemContext","itemRendererProps","index","metadata","selector","itemContext","key","_jsxs","jsxs","dropdownStyles","selectorWrapper","singleSelectItem","multiSelectItem","ListItemText","HighlightText","matchText","keys","useMemo","all","Set","currentItemOverride","rowKey","handleItemAction","context","handleSelectionChange","List","allowTabbableMode","onPersistCurrentItem","anchorRef","dropdownRef","onAutoDismiss","onPosition","placement","setPlacement","useState","prevIsOpen","setPrevIsOpen","handlePosition","positionData","handleAutoDismiss","handleKeyDown","defaultPrevented","isControlOrFunctionKey","code","KEYS","ESC","TAB","useOutsideMousedown","handler","inlineStyle","minWidth","current","offsetWidth","logicalParentRef","Floating","sizeOptions","isMaxHeightAdjusted","maxHeightCeiling","offsetValue","mainAxis","crossAxis","style","onKeyDown","onMouseDown","onClick","testId","ButtonLabelLayoutRedwoodTheme","size","baseTheme","BaseButtonRedwoodTheme","pressProps","usePress","styleClasses","arrow","enabled","testIdProps","useTestId","tabIndex","DropdownArrowIcon","SvgCaretDown","hasTopGap","hasBottomGap","isLoading","list","topGap","bottomGap","loading","CollectionInteractionContext","Provider","props","handleMouseDown","tagName","FormFieldContext","userAssistance","InlineUserAssistance","translations","useTranslationBundle","results","extraItem","select_noMatchesFound","isHighlighted","onAction","isHover","hoverProps","useHover","focusProps","useFocusWithin","handleClick","e","rootClasses","linkItemFocus","linkClasses","linkItemHighlight","Link","href","footer","hasHeaderSeparator","header","labelId","Separator","selectMobileDropdownStyles","valueItems","reduce","accumKeys","currentItem","add","sizePrecision","totalSize","deviceType","getClientHints","length","onSelectedKeysChange","selectedOnlyData","common","currentRowKeyOverride","onPersistCurrentRowKey","selected","onRowAction","onSelectedChange","inputRef","onFilter","mainFieldRef","useRef","isDropdownOpen","setDropdownOpen","isDropdownAbove","setDropdownAbove","currentRowOverride","_setCurrentRowOverride","currentRowKeyRef","setCurrentRowOverride","currentRow","isUserFiltering","setUserFiltering","userInput","setUserInput","setSearchText","prevIsDropdownOpen","setPrevIsDropdownOpen","prevIsFocused","setPrevIsFocused","prevIsUserFiltering","setPrevIsUserFiltering","setTimeout","focus","handleDropdownArrowClick","handleDropdownAutoDismiss","contains","document","activeElement","handleDropdownPosition","startsWith","getDropdownTabbableElems","allTabbableElements","handleUpDownArrowKeys","tabbableElems","handleMainFieldKeyDown","PAGE_UP","PAGE_DOWN","UP","DOWN","stopPropagation","handleMainFieldKeyUp","handleInput","detail","str","stopFiltering","useEffect"],"mappings":"w7FAYgB,SAAAA,GAAqBC,EAAkBC,GAGrD,GAAwB,iBAAbA,EAUX,OAAQA,EAAwCD,GAT9C,GAAKA,EAAKE,MAAcC,eAAeF,GAAW,CAChD,MAAMG,EAAUJ,EAAKE,KAAKD,GAC1B,OAAOI,OAAOD,EACf,CACDE,QAAM,iEAAmEL,EAM7E,CCsCA,MAAMM,GAAO,OA4Gb,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GAGlB,CACLH,mBACAF,qBACAtH,cACA+I,2BACAP,2BACAC,4BACAI,yBACAa,cACAP,yBACAM,uBACAR,wBACA7B,kBACAF,iBAGA9L,UAAWA,GAAa8L,EACxBS,kBACAX,eACAtJ,qBACAwE,cACApE,aACA2J,wBACAN,kBACAW,eACA+B,gBACAhC,YAEJ"}
|
|
1
|
+
{"version":3,"file":"useSelectCommon-e7f123ce.js","sources":["../../src/PRIVATE_SelectCommon/itemTextUtils.ts","../../src/PRIVATE_SelectCommon/DefaultList.tsx","../../src/PRIVATE_SelectCommon/eventUtils.ts","../../src/PRIVATE_SelectCommon/Dropdown.tsx","../../src/PRIVATE_SelectCommon/DropdownArrow.tsx","../../src/PRIVATE_SelectCommon/MobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileFieldInput.tsx","../../src/PRIVATE_SelectCommon/DropdownList.tsx","../../src/PRIVATE_SelectCommon/DropdownUserAssistance.tsx","../../src/PRIVATE_SelectCommon/EmptyResults.tsx","../../src/PRIVATE_SelectCommon/LinkItem.tsx","../../src/PRIVATE_SelectCommon/SelectMobileDropdown.tsx","../../src/PRIVATE_SelectCommon/selectUtils.ts","../../src/PRIVATE_SelectCommon/useCollectionRenderer.ts","../../src/PRIVATE_SelectCommon/useSelectCommon.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { Item } from '../utils/UNSAFE_dataProvider';\nimport { error } from '../utils/UNSAFE_logger';\nimport { ItemTextFunctionType, ItemTextType } from '../utils/UNSAFE_selectUtils';\n\nexport function renderItemText<K, D>(item: Item<K, D>, itemText: ItemTextType<K, D>) {\n // if item-text is a string and the data has the specified field, return it;\n // otherwise log an error\n if (typeof itemText === 'string') {\n if ((item.data as any)?.hasOwnProperty(itemText)) {\n const retData = item.data[itemText];\n return String(retData);\n }\n error('SelectMultiple: itemText specifies field that does not exist: ' + itemText);\n // return undefined if the field doesn't exist\n return undefined;\n }\n // if item-text is a function, call it to create a display label\n return (itemText as ItemTextFunctionType<K, D>)(item);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { List, SkeletonContainer } from '#PRIVATE_List';\nimport type { DataState, ListItemRendererContext, Metadata } from '#UNSAFE_Collection';\nimport { Flex } from '#UNSAFE_Flex';\nimport { HighlightText } from '#UNSAFE_HighlightText';\nimport { ListItemText } from '#UNSAFE_ListItemLayout';\nimport { Skeleton } from '#UNSAFE_Skeleton';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport type { Keys } from '#utils/UNSAFE_keys';\nimport type { ItemTextType } from '#utils/UNSAFE_selectUtils';\nimport type { ComponentChildren, ComponentProps } from 'preact';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { renderItemText } from './itemTextUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype ListProps<K extends string | number, D> = ComponentProps<typeof List<K, D>>;\ntype PickedPropsFromList = Pick<\n ComponentProps<typeof List>,\n 'aria-label' | 'currentItemVariant' | 'selectionMode'\n>;\n\n// pick the props from the ListItemContext instead of extending it directly so that we\n// don't automatically expose any new props that may be added to it\ntype PickedPropsFromListItemContext<K, D> = Pick<\n ListItemRendererContext<K, D>,\n 'data' | 'index' | 'selector'\n>;\ntype ItemRendererSelectionDetail<K> = {\n value: Set<K>;\n target: EventTarget | null;\n};\ntype ItemRendererMetadata<K> = Pick<Metadata<K>, 'key' | 'suggestion'>;\ntype ItemRendererProps<K, D> = PickedPropsFromListItemContext<K, D> & {\n metadata: ItemRendererMetadata<K>;\n searchText?: string;\n selectedKeys?: Set<K>;\n onSelectionChange: (detail: ItemRendererSelectionDetail<K>) => void;\n};\n\ntype DefaultListCurrentKeyDetail<K> = { value: K };\ntype DefaultListItemActionDetail<K, D> = { context: Item<K, D> };\ntype DefaultListSelectionDetail<K> = { value: Set<K> };\n\ntype Props<K extends string | number, D extends Record<string, any>> = PickedPropsFromList & {\n itemRenderer?: (itemRendererProps: ItemRendererProps<K, D>) => ComponentChildren;\n itemText: ItemTextType<K, D>;\n // props from List that we constrain or unconstrain\n currentKey?: K;\n data?: DataState<K, D> | null;\n onCurrentKeyChange: (detail: DefaultListCurrentKeyDetail<K>) => void;\n onItemAction?: (detail: DefaultListItemActionDetail<K, D>) => void;\n onLoadRange?: ComponentProps<typeof List>['onLoadRange'];\n onSelectionChange?: (detail: DefaultListSelectionDetail<K>) => void;\n searchText?: string;\n selectedKeys?: Set<K>;\n};\n\nconst noOp = () => {};\n\nexport function DefaultList<K extends string | number, D extends Record<string, any>>({\n 'aria-label': ariaLabel,\n currentItemVariant,\n currentKey,\n data,\n itemRenderer,\n itemText,\n onCurrentKeyChange,\n onItemAction,\n onLoadRange = noOp,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n}: Props<K, D>) {\n const listItemRenderer = useCallback(\n (listItemContext: ListItemRendererContext<K, D>) => {\n // specify the listItemContext props that we want to expose individually instead of\n // spreading the whole object so that we don't automatically include any new props that\n // may be added to it\n const itemRendererProps: ItemRendererProps<K, D> = {\n data: listItemContext.data,\n index: listItemContext.index,\n metadata: listItemContext.metadata,\n selector: listItemContext.selector,\n searchText,\n selectedKeys,\n onSelectionChange: ({ value }) => {\n onSelectionChange?.({ value });\n }\n };\n const itemContext = {\n data: listItemContext.data,\n key: listItemContext.metadata.key,\n metadata: listItemContext.metadata\n };\n return itemRenderer ? (\n itemRenderer(itemRendererProps)\n ) : (\n <Flex align=\"center\">\n {listItemContext.selector && (\n <div class={dropdownStyles.selectorWrapper}>{listItemContext.selector()}</div>\n )}\n <div\n class={\n selectionMode === 'single'\n ? dropdownStyles.singleSelectItem\n : dropdownStyles.multiSelectItem\n }>\n <ListItemText variant=\"primary\">\n <HighlightText matchText={searchText}>\n {renderItemText(itemContext, itemText) as string}\n </HighlightText>\n </ListItemText>\n </div>\n </Flex>\n );\n },\n [itemRenderer, itemText, onSelectionChange, searchText, selectedKeys, selectionMode]\n );\n\n const keys = useMemo(() => {\n return { all: false, keys: selectedKeys ?? new Set<K>() };\n }, [selectedKeys]) as Keys<K>;\n\n const currentItemOverride = useMemo(\n () => (currentKey !== undefined ? { rowKey: currentKey } : undefined),\n [currentKey]\n );\n const handleItemAction = useCallback<NonNullable<ListProps<K, D>['onItemAction']>>(\n ({ context: { data, metadata } }) => {\n onItemAction?.({ context: { data, key: metadata.key, metadata } });\n },\n [onItemAction]\n );\n const handleSelectionChange = useCallback<NonNullable<ListProps<K, D>['onSelectionChange']>>(\n ({ value }) => {\n onSelectionChange?.({ value: new Set(value.keys?.values()) });\n },\n [onSelectionChange]\n );\n\n return (\n <List<K, D>\n aria-label={ariaLabel}\n allowTabbableMode={false}\n currentItemVariant={currentItemVariant}\n currentItemOverride={currentItemOverride}\n data={data ?? null}\n loadingIndicator={loadingIndicator}\n onPersistCurrentItem={onCurrentKeyChange}\n onItemAction={handleItemAction}\n onLoadRange={onLoadRange}\n onSelectionChange={handleSelectionChange}\n role=\"listbox\"\n selectedKeys={keys}\n selectionMode={selectionMode}>\n {(context: ListItemRendererContext<K, D>) => listItemRenderer(context)}\n </List>\n );\n}\n\n/**\n * Custom 3 Skeleton loader for select multiple\n * TODO: to remove this once is solved\n */\nconst loadingIndicator = (\n <SkeletonContainer minimumCount={3}>\n {() => {\n return (\n <Flex height=\"12x\" align=\"center\">\n <Skeleton height=\"4x\" />\n </Flex>\n );\n }}\n </SkeletonContainer>\n);\n","export const isSimpleClick = (event: MouseEvent) => {\n return event.button === 0 && !event.ctrlKey;\n};\n\nexport const preventDefault = (event: Event) => {\n event.preventDefault();\n};\n\nexport const preventDefaultForCurrentTarget = (event: MouseEvent) => {\n if (event.currentTarget === event.target) {\n event.preventDefault();\n }\n};\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren, ComponentProps } from 'preact';\nimport { MutableRef, useCallback, useState } from 'preact/hooks';\nimport { Floating, PositionData } from '../UNSAFE_Floating';\nimport { Layer } from '../UNSAFE_Layer';\nimport { isControlOrFunctionKey, KEYS } from '../utils/PRIVATE_keyboardUtils';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n//Once Dropdown is consumed this will be removed\nimport { useOutsideMousedown } from '../hooks/PRIVATE_useOutsideMousedown';\n\ntype FloatingProps = ComponentProps<typeof Floating>;\n\ntype Props = {\n anchorRef: MutableRef<HTMLElement | null>;\n children?: ComponentChildren;\n dropdownRef: MutableRef<HTMLElement | null>;\n id?: string;\n isOpen?: boolean;\n onAutoDismiss?: (event?: Event) => void;\n onPosition?: FloatingProps['onPosition'];\n};\n\nconst DEFAULT_PLACEMENT = 'bottom-start';\n\n//TODO: Start consuming PRIVATE_Dropdown. JET-62565\nexport function Dropdown({\n anchorRef,\n children,\n dropdownRef,\n id,\n isOpen,\n onAutoDismiss,\n onPosition\n}: Props) {\n const [placement, setPlacement] = useState<FloatingProps['placement']>(DEFAULT_PLACEMENT);\n\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\n if (prevIsOpen !== isOpen) {\n // reset the placement to the default when the dropdown closes, not opens, so that it doesn't\n // initially open in the previous position and then move to the default position on the\n // rerender after the state is updated\n if (!isOpen) {\n setPlacement(DEFAULT_PLACEMENT);\n }\n }\n\n const handlePosition = useCallback(\n (positionData: PositionData) => {\n // update the placement so that the dropdown stays where it is until there is a collision,\n // i.e. it no longer fits, instead of letting it try to move back to the default position\n // on every render\n setPlacement(positionData.placement);\n\n // call the callback that was passed in through props\n onPosition?.(positionData);\n },\n [onPosition, setPlacement]\n );\n\n const handleAutoDismiss = useCallback(\n (event: Event) => {\n onAutoDismiss?.(event);\n },\n [onAutoDismiss]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.defaultPrevented || isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.ESC:\n case KEYS.TAB:\n handleAutoDismiss(event);\n break;\n }\n },\n [handleAutoDismiss]\n );\n\n // use the mousedown event to be consistent with legacy JET and so that we're hiding the dropdown\n // on the same event where focus will transfer\n useOutsideMousedown({\n isDisabled: !isOpen,\n ref: [anchorRef, dropdownRef],\n handler: handleAutoDismiss\n });\n\n // TODO: get dropdown y (mainAxis) offset from --oj-c-PRIVATE-DO-NOT-USE-private-core-global-dropdown-offset\n const offsetValue = { mainAxis: 4, crossAxis: 0 };\n\n const inlineStyle = isOpen\n ? {\n minWidth: `${anchorRef.current?.offsetWidth}px`\n }\n : {};\n\n if (prevIsOpen !== isOpen) {\n setPrevIsOpen(isOpen);\n }\n\n return !isOpen ? null : (\n <Layer logicalParentRef={anchorRef}>\n <Floating\n anchorRef={anchorRef}\n sizeOptions={{\n isMaxHeightAdjusted: true,\n maxHeightCeiling: 400\n }}\n ref={dropdownRef}\n placement={placement}\n offsetValue={offsetValue}\n onPosition={handlePosition}>\n <div\n class={dropdownStyles.base}\n id={id}\n style={inlineStyle}\n onKeyDown={handleKeyDown}\n onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </Floating>\n </Layer>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { DropdownArrowIcon } from '../PRIVATE_ThemedIcons/DropdownArrowIcon';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { ButtonLabelLayoutRedwoodTheme } from '#UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme';\nimport type { ButtonLabelLayoutVariantOptions } from '#UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css';\nimport { TestIdProps, useTestId } from '#hooks/UNSAFE_useTestId';\nimport { BaseButtonRedwoodTheme } from '#UNSAFE_BaseButton/themes/redwood/BaseButtonTheme';\n\ntype Props = TestIdProps & {\n isDisabled?: boolean;\n onClick?: () => void;\n};\n\nconst noop = () => {};\n\nexport function DropdownArrow({ isDisabled = false, onClick, testId }: Props) {\n const { classes } = useComponentTheme<ButtonLabelLayoutVariantOptions>(\n ButtonLabelLayoutRedwoodTheme,\n { size: 'sm' }\n );\n const { baseTheme } = useComponentTheme(BaseButtonRedwoodTheme);\n\n const preventDefault = useCallback((event: Event) => {\n event.preventDefault();\n }, []);\n const { pressProps } = usePress(onClick ?? noop, { isDisabled });\n\n // TODO: JET-67410 replace this with a icon button\n const styleClasses = classNames([\n classes,\n baseTheme,\n dropdownStyles.arrow.base,\n isDisabled ? dropdownStyles.arrow.disabled : dropdownStyles.arrow.enabled\n ]);\n\n const testIdProps = useTestId(testId);\n\n return (\n <span\n aria-hidden=\"true\"\n class={styleClasses}\n tabIndex={-1}\n onMouseDown={preventDefault}\n {...testIdProps}\n {...pressProps}>\n <DropdownArrowIcon />\n </span>\n );\n}\n","import { ComponentChildren } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Layer } from '../UNSAFE_Layer';\nimport { WindowOverlay } from '../UNSAFE_WindowOverlay';\nimport { HTMLAttributesSignalExcluded } from '../utils/UNSAFE_attributeUtils';\nimport { mobileDropdownStyles } from './themes/mobileDropdownStyles.css';\n\ntype Props = {\n /**\n * Id of the label to associate with the dropdown (e.g. the label of the filter field).\n */\n 'aria-labelledby'?: HTMLAttributesSignalExcluded['aria-labelledby'];\n\n /**\n * The dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The id for the top level element\n */\n id?: string;\n\n /**\n * Specifies whether the dropdown is being shown\n */\n isOpen?: boolean;\n};\n\nexport function MobileDropdown({ 'aria-labelledby': ariaLabelledBy, children, id, isOpen }: Props) {\n return !isOpen ? null : (\n <Layer>\n <WindowOverlay>\n <div\n id={id}\n class={mobileDropdownStyles.base}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ariaLabelledBy}>\n <Flex width=\"100%\" height=\"100%\" maxHeight=\"100%\" direction=\"column\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n}\n","import { Ref } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport {\n AriaAttributesSignalExcluded,\n HTMLAttributesSignalExcluded\n} from '../utils/UNSAFE_attributeUtils';\nimport { TextProps, textInterpolations } from '../utils/UNSAFE_interpolations/text';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { TextFieldInputVariantOptions } from '../UNSAFE_TextField/themes/TextFieldInputStyles.css';\nimport { useFormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { selectMobileFieldInputStyles } from './themes/SelectMobileFieldInputStyles.css';\nimport { isInputPlaceholderShown } from '../UNSAFE_TextField/TextFieldUtils';\nimport { useTabbableMode } from '../hooks/UNSAFE_useTabbableMode';\nimport { Text } from '../UNSAFE_Text';\nimport { useAccessibleContext } from '../hooks/UNSAFE_useAccessibleContext';\nimport { merge } from '../utils/UNSAFE_stringUtils';\nimport { TextFieldInputRedwoodTheme } from '../UNSAFE_TextField/themes/redwood/TextFieldInputTheme';\n\ntype AriaProps = Pick<\n AriaAttributesSignalExcluded,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'aria-labelledby'\n>;\n\ntype EventProps = Pick<HTMLAttributesSignalExcluded<HTMLDivElement>, 'onBlur' | 'onFocus'>;\n\ntype Props = AriaProps &\n EventProps &\n TextProps & {\n displayValue?: string;\n hasEmptyLabel?: boolean;\n hasInsideLabel?: boolean;\n isRequired?: boolean;\n placeholder?: string;\n variant?: 'default' | 'embedded';\n };\n\nconst interpolations = [...Object.values(textInterpolations)];\nconst styleInterpolations = mergeInterpolations<Props>(interpolations);\n\n/**\n * This component is used for rendering the main field in mobile phones. This is a bit different from the\n * normal main field (TextFieldInput) that we use for desktop & tablet devices in the way that\n * a user will not be able to edit the value of this field. But, one can still have other functionalities\n * of having a placeholder, tab in & out of it, and other such functionalities of an enabled field.\n *\n * This also differs from ReadonlyTextFieldInput in the following ways:\n * 1. This will be rendered as div as well, but has a role of combobox set on it\n * 2. This will not be read as readonly input by the screen readers\n * 3. This has the stylings much similar to the TextFieldInput component\n * 4. This supports the use of placeholder and shows it when there is no value present\n * 5. This supports having the variant property and styles accordingly\n *\n * As such, this is very similar to the TextFieldInput except that this does not allow user input.\n * Note: we cannot use TextFieldInput with readonly set on it; even though it might provide us the\n * behavior we need, it will make the field as readonly and screen readers read the same about this\n * field. This will be an incorrect representation contextually as one can still edit the value by opening\n * the dropdown and changing the selection.\n */\nexport const SelectMobileFieldInput = forwardRef(\n (\n {\n 'aria-controls': ariaControls,\n 'aria-describedby': ariaDescribedBy,\n 'aria-expanded': ariaExpanded,\n 'aria-invalid': ariaInvalid,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n displayValue,\n hasEmptyLabel,\n hasInsideLabel = false,\n isRequired,\n onBlur,\n onFocus,\n placeholder,\n textAlign,\n variant = 'default'\n }: Props,\n ref?: Ref<HTMLDivElement>\n ) => {\n // consume required contexts\n const { isDisabled, isFocused, hasValue = false } = useFormFieldContext();\n const { isTabbable, tabbableModeProps } = useTabbableMode();\n\n // setup properties\n const myPlaceholder = isInputPlaceholderShown(hasInsideLabel, hasValue, isFocused)\n ? placeholder\n : undefined;\n\n // Add unsafe API for specifying an external label which is added to ariaLabelledBy on the input,\n // only when labelEdge is 'none' and label is ''. Since ariaLabelledBy takes precedence over all other\n // kinds of labels, this helps to ensure we don't override a meaningful label.\n const { UNSAFE_ariaLabelledBy } = useAccessibleContext();\n const mergedAriaLabelledBy = hasEmptyLabel\n ? merge([ariaLabelledBy, UNSAFE_ariaLabelledBy])\n : ariaLabelledBy;\n\n // setup style classes\n const { class: styleInterpolationClasses } = styleInterpolations({ textAlign });\n const { classes: themeClasses } = useComponentTheme<TextFieldInputVariantOptions>(\n TextFieldInputRedwoodTheme,\n {\n type: 'notPassword',\n styleVariant: variant,\n textarea: 'notTextArea',\n input: 'isInput',\n prefix: 'noPrefix',\n suffix: 'noSuffix',\n startContent: 'noStartContent',\n endContent: 'hasEndContent',\n insideLabel: hasInsideLabel ? 'hasInsideLabel' : 'noInsideLabel',\n value: hasValue ? 'hasValue' : 'noValue',\n focused: isFocused ? 'isFocused' : 'notFocused',\n disabled: isDisabled ? 'isDisabled' : 'notDisabled'\n }\n );\n const rootDivStyleClasses = classNames([\n selectMobileFieldInputStyles.base,\n styleInterpolationClasses,\n themeClasses\n ]);\n\n return (\n <div\n aria-autocomplete=\"list\"\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-invalid={ariaInvalid}\n aria-label={ariaLabel}\n aria-labelledby={mergedAriaLabelledBy}\n aria-required={isRequired ? 'true' : undefined}\n class={rootDivStyleClasses}\n onBlur={onBlur}\n onFocus={onFocus}\n ref={ref}\n role=\"combobox\"\n {...(isTabbable && tabbableModeProps)}>\n <div class={selectMobileFieldInputStyles.content}>\n <Text variant={displayValue ? 'inherit' : 'secondary'}>\n {displayValue || myPlaceholder}\n </Text>\n </div>\n </div>\n );\n }\n);\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren } from 'preact';\nimport { CollectionInteractionContext } from '../hooks/UNSAFE_useCollectionInteractionContext';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n children?: ComponentChildren;\n hasTopGap?: boolean;\n hasBottomGap?: boolean;\n isLoading?: boolean;\n};\n\nexport function DropdownList({\n children,\n hasTopGap = true,\n hasBottomGap = true,\n isLoading = false\n}: Props) {\n const styleClasses = classNames([\n dropdownStyles.list.base,\n hasTopGap && dropdownStyles.list.topGap,\n hasBottomGap && dropdownStyles.list.bottomGap,\n isLoading && dropdownStyles.list.loading\n ]);\n return (\n <CollectionInteractionContext.Provider value={'embedded'}>\n <div class={styleClasses} onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </CollectionInteractionContext.Provider>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype InlineUserAssistanceProps = Pick<\n ComponentProps<typeof InlineUserAssistance>,\n | 'assistiveText'\n | 'fieldLabel'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'id'\n | 'userAssistanceDensity'\n>;\n\nexport function DropdownUserAssistance(props: InlineUserAssistanceProps) {\n // Prevent the focus from transferring when the user clicks on an empty/non-clickable area\n // of the user assistance\n const handleMouseDown = useCallback((event: MouseEvent) => {\n // Don't call preventDefault when the user clicks on the help source link, so that the\n // focus is allowed to transfer in that case.\n if ((event.target as Element)?.tagName !== 'A') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={dropdownStyles.userAssistance} onMouseDown={handleMouseDown}>\n <InlineUserAssistance {...props} />\n </div>\n </FormFieldContext.Provider>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\nexport function EmptyResults() {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n // call preventDefault for mousedown on this div so that focus does not transfer from\n // the input\n return (\n <div class={dropdownStyles.results.extraItem} onMouseDown={preventDefaultForCurrentTarget}>\n {translations.select_noMatchesFound()}\n </div>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useCallback } from 'preact/hooks';\nimport { Link } from '#UNSAFE_Link';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useHover } from '#hooks/UNSAFE_useHover';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n /**\n * Child content of the item.\n */\n children: string;\n /**\n * Specifies whether to highlight the item.\n */\n isHighlighted?: boolean;\n /**\n * Callback invoked when the user triggers the link, for example by clicking or pressing Enter.\n */\n onAction?: () => void;\n};\n\n/**\n * This component renders a link that looks like a list item in a Select* component dropdown.\n * It fires an action when the user triggers it, and is intended to be used for launching\n * external application UI from within the dropdown, for example to provide advanced search or\n * add to list functionality.\n * The LinkItem would typically be shown in a fixed position above or below the list itself.\n */\nconst LinkItem = ({ children, isHighlighted, onAction }: Props) => {\n const { isHover, hoverProps } = useHover();\n const { isFocused, focusProps } = useFocusWithin();\n\n const handleClick = useCallback(\n (e: Event) => {\n // prevent the link from actually navigating by preventing default and returning false\n e.preventDefault();\n onAction?.();\n return false;\n },\n [onAction]\n );\n\n const rootClasses = classNames([isFocused ? dropdownStyles.results.linkItemFocus : undefined]);\n\n const linkClasses = classNames([\n dropdownStyles.results.extraItem,\n isHover || isFocused || isHighlighted ? dropdownStyles.results.linkItemHighlight : undefined\n ]);\n\n return (\n <div class={rootClasses} {...focusProps}>\n <Link href=\"#\" onClick={handleClick}>\n <div class={linkClasses} {...hoverProps}>\n {children}\n </div>\n </Link>\n </div>\n );\n};\n\nexport { LinkItem };\n","import { ComponentChildren, ComponentProps } from 'preact';\nimport { Separator } from '../UNSAFE_Separator';\nimport { MobileDropdown } from './MobileDropdown';\nimport { selectMobileDropdownStyles } from './themes/selectMobileDropdownStyles.css';\n\ntype MobileDropdownProps = ComponentProps<typeof MobileDropdown>;\ntype PassThroughMobileDropdownProps = Pick<MobileDropdownProps, 'id' | 'isOpen'>;\n\ntype Props = PassThroughMobileDropdownProps & {\n /**\n * The main dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The components to be placed in the end of the dropdown\n */\n footer?: ComponentChildren;\n\n /**\n * The components to be placed in the beginning of the dropdown\n */\n header?: ComponentChildren;\n\n /**\n * Specifies whether to have a separator between header and content\n */\n hasHeaderSeparator?: boolean;\n\n /**\n * Id of the label for the filter field.\n */\n labelId?: string;\n};\n\nexport function SelectMobileDropdown({\n children,\n footer,\n hasHeaderSeparator = true,\n header,\n id,\n isOpen,\n labelId\n}: Props) {\n return (\n <MobileDropdown id={id} isOpen={isOpen} aria-labelledby={labelId}>\n {header}\n {hasHeaderSeparator && <Separator />}\n {/* TODO: Add overflow support to View and use it here */}\n {/* */}\n <div class={selectMobileDropdownStyles.content}>{children}</div>\n <Separator />\n {footer}\n </MobileDropdown>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\n\n/**\n * Helper function to determine whether the current device is a mobile device\n * @returns true if running on a mobile device, false otherwise\n */\nexport function isMobile() {\n const deviceType = getClientHints().deviceType;\n return deviceType === 'phone' || deviceType === 'tablet';\n}\n\n/**\n * Helper function to determine whether the current device is a phone\n * @returns true if running on a phone, false otherwise\n */\nexport function isPhone() {\n return getClientHints().deviceType === 'phone';\n}\n\n/**\n * Helper function to determine whether the current device is a tablet\n * @returns true if running on a tablet, false otherwise\n */\nexport function isTablet() {\n return getClientHints().deviceType === 'tablet';\n}\n\nexport function isBeforeDataFetch<K, D>(data: DataState<K, D>) {\n return data.sizePrecision === 'atLeast' && data.totalSize === 0;\n}\n\nexport function isSearchTextEmptyOrUndefined(searchText?: string) {\n return searchText === undefined || searchText.length === 0;\n}\n\n/**\n * Extract keys from a value items array.\n *\n * @param valueItems The value items from which the keys are to be extracted\n * @returns The set of keys\n */\nexport function createKeysFromValueItems<K, D>(valueItems?: Item<K, D>[]) {\n const keys = valueItems?.reduce((accumKeys, currentItem) => {\n accumKeys.add(currentItem.key);\n return accumKeys;\n }, new Set<K>());\n return keys;\n}\n","import type { DataState } from '#UNSAFE_Collection';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport { useMemo } from 'preact/compat';\n\ntype Key = string | number;\ntype Data = Record<string, any>;\n\ntype UseCollectionRendererCommonParams<K> = {\n currentKey?: K;\n searchText?: string;\n selectedKeys?: Set<K>;\n onCurrentKeyChange: (detail: { value?: K }) => void;\n};\n\nexport type UseCollectionRendererSelectSingleParams<K, D> = UseCollectionRendererCommonParams<K> & {\n onItemAction: (detail: { context: Item<K, D> }) => void;\n onSelectedKeysChange?: never;\n selectedOnlyData?: never;\n};\n\nexport type UseCollectionRendererSelectMultipleParams<K, D> =\n UseCollectionRendererCommonParams<K> & {\n onItemAction?: never;\n onSelectedKeysChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n };\n\ntype UseCollectionRendererParams<K, D> =\n | UseCollectionRendererSelectSingleParams<K, D>\n | UseCollectionRendererSelectMultipleParams<K, D>;\n\ntype CommonCollectionRendererContext<K extends Key> = {\n searchText?: string;\n currentRowKeyOverride?: K;\n onPersistCurrentRowKey: (detail: { value?: K }) => void;\n selected?: Set<K>;\n};\n\nexport type SelectSingleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onRowAction: (detail: { context: Item<K, D> }) => void;\n};\n\nexport type SelectMultipleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onSelectedChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n};\n\ntype CollectionRendererContext<K extends Key, D extends Data> =\n | SelectSingleCollectionRendererContext<K, D>\n | SelectMultipleCollectionRendererContext<K, D>;\n\n// NOTE: We will using a single hook that constructs the collection renderer context for both select single and\n// select multiple. This is ok as they both share most of the properties and differ only in a few areas. So, we will\n// be using function overloading to determine which component is calling the hook (based on the args) and return the\n// correct context.\n\n/**\n * A custom hook that constructs the context for SelectSingle's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectSingleParams<K, D>\n): SelectSingleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectMultiple's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectMultipleParams<K, D>\n): SelectMultipleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectSingle/SelectMultiple's collectionRenderer.\n * @param param0 Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>({\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n}: UseCollectionRendererParams<K, D>) {\n return useMemo<CollectionRendererContext<K, D>>(() => {\n const common = {\n searchText,\n currentRowKeyOverride: currentKey,\n onPersistCurrentRowKey: onCurrentKeyChange,\n selected: selectedKeys\n } satisfies CommonCollectionRendererContext<K>;\n\n // If onItemAction is present, then we are constructing context for SelectSingle. So,\n // return the context satisfying SelectSingleCollectionRendererContext type.\n if (onItemAction !== undefined)\n return {\n ...common,\n onRowAction: onItemAction\n } satisfies SelectSingleCollectionRendererContext<K, D>;\n\n // If onItemAction is not present, then we are constructing context for SelectMultiple. So,\n // return the context satisfying SelectMultipleCollectionRendererContext type.\n return {\n ...common,\n onSelectedChange: onSelectedKeysChange,\n selectedOnlyData\n } satisfies SelectMultipleCollectionRendererContext<K, D>;\n }, [\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n ]);\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport type { PositionData } from '#UNSAFE_Floating';\nimport { KEYS, isControlOrFunctionKey } from '#utils/PRIVATE_keyboardUtils';\nimport { allTabbableElements } from '#utils/PRIVATE_tabbableUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport type { RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { isSimpleClick } from './eventUtils';\n\ntype UseSelectCommonProps<K, D> = {\n data?: DataState<K, D> | null;\n inputRef: RefObject<HTMLElement>;\n isFocused?: boolean;\n onFilter?: ({ searchText }: { searchText?: string }) => void;\n};\n\nexport type CurrentKeyDetail<K> = {\n value?: K;\n};\n\n/**\n * Hook that manages state and behavior for a Select* component. This hook creates state\n * variables and event listeners, returning properties to apply to components internally\n * rendered by a Select* component, as well as state information.\n *\n * @param data Specifies data for the dropdown list.\n * @param inputRef Ref to the input element.\n * @param isFocused Specifies whether the component has focus.\n * @param onFilter Callback function to trigger loading data for the dropdown list,\n * which may or may not be filtered by user entered text.\n *\n * @returns Component state and event listeners.\n */\nexport function useSelectCommon<K, D>({\n data,\n inputRef,\n isFocused,\n onFilter\n}: UseSelectCommonProps<K, D>) {\n const mainFieldRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const [isDropdownOpen, setDropdownOpen] = useState(false);\n const [isDropdownAbove, setDropdownAbove] = useState(false);\n\n // We only need to push currentRow when we need to override the\n // current row, like when the dropdown is opened and we want to set the initial\n // focused row or when filtering and we want to focus the first row.\n const [currentRowOverride, _setCurrentRowOverride] = useState<{ rowKey?: K }>({\n rowKey: undefined\n });\n // We still need information on what the current row actually is, but we do not need\n // to react to it until certain scenarios like pressing Tab from the dropdown. So, we\n // just store this in a ref.\n const currentRowKeyRef = useRef<K>();\n // When we want to update the currentRowOverride, we also want to keep the currentRowKeyRef\n // in sync as the collection will not call onChanged for this change.\n const setCurrentRowOverride = useCallback((currentRow: { rowKey?: K }) => {\n currentRowKeyRef.current = currentRow.rowKey;\n _setCurrentRowOverride(currentRow);\n }, []);\n const [isUserFiltering, setUserFiltering] = useState(false);\n const [userInput, setUserInput] = useState<string>();\n const [searchText, setSearchText] = useState<string>();\n\n const [prevIsDropdownOpen, setPrevIsDropdownOpen] = useState(isDropdownOpen);\n const [prevIsFocused, setPrevIsFocused] = useState(isFocused);\n const [prevIsUserFiltering, setPrevIsUserFiltering] = useState(isUserFiltering);\n\n const onMouseDown = useCallback(\n (event: MouseEvent) => {\n // const target = event.target as HTMLElement;\n if (event.defaultPrevented || !isSimpleClick(event)) {\n return;\n }\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n // this is needed to focus the input when clicking on the inside label when there is no\n // value; otherwise the component looks focused but doesn't actually have physical focus\n setTimeout(function () {\n inputRef.current?.focus();\n }, 0);\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownArrowClick = useCallback(() => {\n setDropdownOpen(!isDropdownOpen);\n\n // focus the input so that if the user Tabs afterwards, it loses focus and the dropdown closes\n inputRef.current?.focus();\n }, [inputRef, isDropdownOpen]);\n\n const handleDropdownAutoDismiss = useCallback(\n (event?: Event) => {\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n switch (event?.type) {\n case 'keydown':\n const keyboardEvent = event as KeyboardEvent;\n switch (keyboardEvent.code) {\n case KEYS.ESC:\n // focus the input when the user cancels out of the dropdown\n inputRef.current?.focus();\n break;\n default:\n break;\n }\n break;\n case 'mousedown':\n // if focus is in the dropdown, focus the input before the dropdown is hidden so that\n // focus will transfer correctly when the target is not focusable;\n // otherwise the text cursor appears in the input again\n if (dropdownRef.current?.contains(document.activeElement)) {\n inputRef.current?.focus();\n }\n break;\n default:\n break;\n }\n }\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownPosition = useCallback((data: PositionData) => {\n setDropdownAbove(data.placement.startsWith('top'));\n }, []);\n\n const getDropdownTabbableElems = useCallback(() => {\n return isDropdownOpen && dropdownRef.current\n ? allTabbableElements(dropdownRef.current)\n : undefined;\n }, [isDropdownOpen]);\n\n const handleUpDownArrowKeys = useCallback(\n (event: KeyboardEvent) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n } else {\n // JET-64909 - focus / 'current' dropped when arrow keying during loading\n // Transfer physical focus into the dropdown only if the data is present and the dropdown\n // has rendered the data. Otherwise, keep the focus in the field.\n if (data != null) {\n const tabbableElems = getDropdownTabbableElems();\n tabbableElems?.[0]?.focus();\n\n // if there is no current item set, make the first item current\n if (currentRowOverride.rowKey === undefined) {\n setCurrentRowOverride({ rowKey: data.data[0]?.metadata?.key });\n }\n }\n }\n\n // prevent the page from scrolling\n event.preventDefault();\n },\n [currentRowOverride, data, getDropdownTabbableElems, isDropdownOpen, setCurrentRowOverride]\n );\n\n const handleMainFieldKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // const target = event.target as HTMLElement;\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.PAGE_UP:\n case KEYS.PAGE_DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n\n return;\n\n case KEYS.UP:\n case KEYS.DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n break;\n\n case KEYS.ESC:\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n event.preventDefault();\n\n // JET-53183 - core pack compat: stop propagation of handled events\n // we don't want a parent collection component to stop editing the row when we close\n // the dropdown\n event.stopPropagation();\n }\n break;\n\n default:\n break;\n }\n },\n [isDropdownOpen]\n );\n\n const handleMainFieldKeyUp = useCallback(\n (event: KeyboardEvent) => {\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n handleUpDownArrowKeys(event);\n break;\n\n default:\n break;\n }\n },\n [handleUpDownArrowKeys]\n );\n\n const handleInput = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n setUserFiltering(true);\n setUserInput(detail.value);\n const str = detail.value;\n setSearchText(str);\n onFilter?.({ searchText: str });\n },\n [isDropdownOpen, onFilter]\n );\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K>) => {\n // when the collection changes the current key, we only want to store the information\n // and not do anything.\n currentRowKeyRef.current = detail.value;\n }, []);\n\n const stopFiltering = useCallback(() => {\n setUserFiltering(false);\n setUserInput('');\n setSearchText('');\n }, []);\n\n // the user is not actively filtering if the dropdown is closed and the component doesn't\n // have focus\n if (\n prevIsDropdownOpen !== isDropdownOpen ||\n prevIsFocused !== isFocused ||\n prevIsUserFiltering !== isUserFiltering\n ) {\n if (!isDropdownOpen && !isFocused && isUserFiltering) {\n stopFiltering();\n }\n }\n\n // need to call onFilter with undefined searchText when the dropdown opens and the\n // user is NOT filtering\n useEffect(() => {\n if (isDropdownOpen && !isUserFiltering) {\n onFilter?.({ searchText: undefined });\n }\n }, [isDropdownOpen, isUserFiltering, onFilter]);\n\n // when the dropdown closes, reset the isDropdownAbove flag\n if (prevIsDropdownOpen !== isDropdownOpen) {\n if (!isDropdownOpen) {\n setDropdownAbove(false);\n }\n setPrevIsDropdownOpen(isDropdownOpen);\n }\n\n if (prevIsFocused !== isFocused) {\n setPrevIsFocused(isFocused);\n }\n if (prevIsUserFiltering !== isUserFiltering) {\n setPrevIsUserFiltering(isUserFiltering);\n }\n\n return {\n currentRowKeyRef,\n currentRowOverride,\n dropdownRef,\n getDropdownTabbableElems,\n handleDropdownArrowClick,\n handleDropdownAutoDismiss,\n handleDropdownPosition,\n handleInput,\n handleMainFieldKeyDown,\n handleMainFieldKeyUp,\n handleUpDownArrowKeys,\n isDropdownAbove,\n isDropdownOpen,\n // the field should remain to look focused while the dropdown is open,\n // in case physical focus is in the dropdown\n isFocused: isFocused || isDropdownOpen,\n isUserFiltering,\n mainFieldRef,\n onCurrentKeyChange,\n onMouseDown,\n searchText,\n setCurrentRowOverride,\n setDropdownOpen,\n setUserInput,\n stopFiltering,\n userInput\n };\n}\n"],"names":["renderItemText","item","itemText","data","hasOwnProperty","retData","String","error","noOp","loadingIndicator","_jsx","jsx","SkeletonContainer","minimumCount","children","Flex","height","align","Skeleton","isSimpleClick","event","button","ctrlKey","preventDefaultForCurrentTarget","currentTarget","target","preventDefault","DEFAULT_PLACEMENT","noop","MobileDropdown","ariaLabelledBy","id","isOpen","Layer","WindowOverlay","class","mobileDropdownStyles","base","role","width","maxHeight","direction","interpolations","Object","values","textInterpolations","styleInterpolations","mergeInterpolations","SelectMobileFieldInput","forwardRef","ariaControls","ariaDescribedBy","ariaExpanded","ariaInvalid","ariaLabel","displayValue","hasEmptyLabel","hasInsideLabel","isRequired","onBlur","onFocus","placeholder","textAlign","variant","ref","isDisabled","isFocused","hasValue","useFormFieldContext","isTabbable","tabbableModeProps","useTabbableMode","myPlaceholder","isInputPlaceholderShown","undefined","UNSAFE_ariaLabelledBy","useAccessibleContext","mergedAriaLabelledBy","merge","styleInterpolationClasses","classes","themeClasses","useComponentTheme","TextFieldInputRedwoodTheme","type","styleVariant","textarea","input","prefix","suffix","startContent","endContent","insideLabel","value","focused","disabled","rootDivStyleClasses","classNames","selectMobileFieldInputStyles","content","Text","currentItemVariant","currentKey","itemRenderer","onCurrentKeyChange","onItemAction","onLoadRange","onSelectionChange","searchText","selectedKeys","selectionMode","listItemRenderer","useCallback","listItemContext","itemRendererProps","index","metadata","selector","itemContext","key","_jsxs","jsxs","dropdownStyles","selectorWrapper","singleSelectItem","multiSelectItem","ListItemText","HighlightText","matchText","keys","useMemo","all","Set","currentItemOverride","rowKey","handleItemAction","context","handleSelectionChange","List","allowTabbableMode","onPersistCurrentItem","anchorRef","dropdownRef","onAutoDismiss","onPosition","placement","setPlacement","useState","prevIsOpen","setPrevIsOpen","handlePosition","positionData","handleAutoDismiss","handleKeyDown","defaultPrevented","isControlOrFunctionKey","code","KEYS","ESC","TAB","useOutsideMousedown","handler","inlineStyle","minWidth","current","offsetWidth","logicalParentRef","Floating","sizeOptions","isMaxHeightAdjusted","maxHeightCeiling","offsetValue","mainAxis","crossAxis","style","onKeyDown","onMouseDown","onClick","testId","ButtonLabelLayoutRedwoodTheme","size","baseTheme","BaseButtonRedwoodTheme","pressProps","usePress","styleClasses","arrow","enabled","testIdProps","useTestId","tabIndex","DropdownArrowIcon","SvgCaretDown","hasTopGap","hasBottomGap","isLoading","list","topGap","bottomGap","loading","CollectionInteractionContext","Provider","props","handleMouseDown","tagName","FormFieldContext","userAssistance","InlineUserAssistance","translations","useTranslationBundle","results","extraItem","select_noMatchesFound","isHighlighted","onAction","isHover","hoverProps","useHover","focusProps","useFocusWithin","handleClick","e","rootClasses","linkItemFocus","linkClasses","linkItemHighlight","Link","href","footer","hasHeaderSeparator","header","labelId","Separator","selectMobileDropdownStyles","valueItems","reduce","accumKeys","currentItem","add","sizePrecision","totalSize","deviceType","getClientHints","length","onSelectedKeysChange","selectedOnlyData","common","currentRowKeyOverride","onPersistCurrentRowKey","selected","onRowAction","onSelectedChange","inputRef","onFilter","mainFieldRef","useRef","isDropdownOpen","setDropdownOpen","isDropdownAbove","setDropdownAbove","currentRowOverride","_setCurrentRowOverride","currentRowKeyRef","setCurrentRowOverride","currentRow","isUserFiltering","setUserFiltering","userInput","setUserInput","setSearchText","prevIsDropdownOpen","setPrevIsDropdownOpen","prevIsFocused","setPrevIsFocused","prevIsUserFiltering","setPrevIsUserFiltering","setTimeout","focus","handleDropdownArrowClick","handleDropdownAutoDismiss","contains","document","activeElement","handleDropdownPosition","startsWith","getDropdownTabbableElems","allTabbableElements","handleUpDownArrowKeys","tabbableElems","handleMainFieldKeyDown","PAGE_UP","PAGE_DOWN","UP","DOWN","stopPropagation","handleMainFieldKeyUp","handleInput","detail","str","stopFiltering","useEffect"],"mappings":"w7FAYgB,SAAAA,GAAqBC,EAAkBC,GAGrD,GAAwB,iBAAbA,EAUX,OAAQA,EAAwCD,GAT9C,GAAKA,EAAKE,MAAcC,eAAeF,GAAW,CAChD,MAAMG,EAAUJ,EAAKE,KAAKD,GAC1B,OAAOI,OAAOD,EACf,CACDE,QAAM,iEAAmEL,EAM7E,CCsCA,MAAMM,GAAO,OA4Gb,MAAMC,GACJC,EAACC,IAAAC,EAAiBA,kBAAC,CAAAC,aAAc,EAC9BC,SAAA,IAEGJ,EAAAA,IAACK,EAAAA,KAAI,CAACC,OAAO,MAAMC,MAAM,SACvBH,SAAAJ,EAAAC,IAACO,EAAQA,SAAC,CAAAF,OAAO,WC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A+B,gBACAhC,YAEJ"}
|
|
@@ -6,7 +6,7 @@ var BarGroup = require('./BarGroup-4a24a995.js');
|
|
|
6
6
|
var useUser = require('./useUser-a4bfc560.js');
|
|
7
7
|
var layoutUtils = require('./layoutUtils-a8eb2cca.js');
|
|
8
8
|
var dataStyleUtils = require('./dataStyleUtils-7c8f7496.js');
|
|
9
|
-
var Chart = require('./Chart-
|
|
9
|
+
var Chart = require('./Chart-40d95d14.js');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -178,4 +178,4 @@ function BarChart({ width, height, selectedIds = [], hiddenIds = [], highlighted
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
exports.BarChart = BarChart;
|
|
181
|
-
//# sourceMappingURL=BarChart-
|
|
181
|
+
//# sourceMappingURL=BarChart-93a3813c.js.map
|