@box/metadata-template-browser 2.5.4 → 2.5.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../esm/lib/constants.js";import{useConsumerState}from"../esm/lib/contexts/hooks.js";import{t as TemplateRowVariant}from"./types.js";import{t as LoadMoreErrorRow}from"./load-more-error-row.js";import{t as LoadMoreLoadingRow}from"./load-more-loading-row.js";import{t as GridListLoadMoreSentinel}from"./grid-list-load-more-sentinel.js";import{useCallback,useMemo,useRef}from"react";import{jsx,jsxs}from"react/jsx-runtime";import{Collection,GridList,ListLayout,Virtualizer}from"react-aria-components";import '../styles/virtualized-grid-list.css';var virtualized_grid_list_module_default={list:`
|
|
1
|
+
import"../esm/lib/constants.js";import{useConsumerState}from"../esm/lib/contexts/hooks.js";import{t as TemplateRowVariant}from"./types.js";import{t as LoadMoreErrorRow}from"./load-more-error-row.js";import{t as LoadMoreLoadingRow}from"./load-more-loading-row.js";import{t as GridListLoadMoreSentinel}from"./grid-list-load-more-sentinel.js";import{useCallback,useMemo,useRef}from"react";import{jsx,jsxs}from"react/jsx-runtime";import{Collection,GridList,ListLayout,Virtualizer}from"react-aria-components";import '../styles/virtualized-grid-list.css';var virtualized_grid_list_module_default={list:`_list_yqrnf_1`},BROWSE_ESTIMATED_ROW_HEIGHT=40,SEARCH_ESTIMATED_ROW_HEIGHT=58,ROW_GAP=2;function VirtualizedGridList({ariaLabel,items,onAction,children,onLoadMore,hasMoreItems,isFetchingMore,loadMoreError,onRetry,selectedKeys,listType}){let{isDisabled,appliedTemplateIds}=useConsumerState(),listLayout=useMemo(()=>new ListLayout({estimatedRowHeight:listType===TemplateRowVariant.Browse?BROWSE_ESTIMATED_ROW_HEIGHT:SEARCH_ESTIMATED_ROW_HEIGHT,gap:ROW_GAP}),[listType]),scrollContainerRef=useRef(null),handleAction=useCallback(key=>{if(key===`LOAD_MORE_ERROR_ROW_ID`){isDisabled||onRetry();return}onAction(key)},[isDisabled,onAction,onRetry]),handleSelectionChange=useCallback(selection=>{if(selection===`all`)return;let[key]=selection;key!==void 0&&!selectedKeys.has(String(key))&&!appliedTemplateIds.has(String(key))&&handleAction(key)},[appliedTemplateIds,handleAction,selectedKeys]),showLoadMoreTrigger=hasMoreItems&&!isFetchingMore&&loadMoreError===null&&!isDisabled;return jsx(Virtualizer,{layout:listLayout,children:jsxs(GridList,{ref:scrollContainerRef,"aria-label":ariaLabel,className:virtualized_grid_list_module_default.list,onSelectionChange:handleSelectionChange,selectedKeys,selectionMode:`single`,shouldSelectOnPressUp:!0,children:[jsx(Collection,{items,children}),isFetchingMore&&jsx(LoadMoreLoadingRow,{}),loadMoreError!==null&&jsx(LoadMoreErrorRow,{onRetry}),showLoadMoreTrigger&&jsx(GridListLoadMoreSentinel,{onLoadMore,scrollContainerRef})]})})}export{VirtualizedGridList as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._list_yqrnf_1{scrollbar-width:thin;scrollbar-color:transparent transparent;outline:none;flex:1;min-height:0;overflow:hidden auto}._list_yqrnf_1::-webkit-scrollbar{width:6px}._list_yqrnf_1::-webkit-scrollbar-track{background:0 0}._list_yqrnf_1::-webkit-scrollbar-thumb{background-color:#0000;border-radius:3px;transition:background-color .2s}._list_yqrnf_1:hover::-webkit-scrollbar-thumb{background-color:var(--token-color-border-default,#0003)}._list_yqrnf_1:active::-webkit-scrollbar-thumb{background-color:var(--token-color-border-default,#0003)}._list_yqrnf_1:hover{scrollbar-color:var(--token-color-border-default,#0003) transparent}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-template-browser",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^17.19.
|
|
7
|
-
"@box/blueprint-web-assets": "^5.11.
|
|
6
|
+
"@box/blueprint-web": "^17.19.2",
|
|
7
|
+
"@box/blueprint-web-assets": "^5.11.5",
|
|
8
8
|
"lodash": "^4.17.15",
|
|
9
9
|
"react": "^18.0.0",
|
|
10
10
|
"react-aria-components": "1.16.0",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"react-intl": "^6.4.2"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@box/blueprint-web": "^17.19.
|
|
16
|
-
"@box/blueprint-web-assets": "^5.11.
|
|
15
|
+
"@box/blueprint-web": "^17.19.2",
|
|
16
|
+
"@box/blueprint-web-assets": "^5.11.5",
|
|
17
17
|
"@box/eslint-plugin-blueprint": "2.2.26",
|
|
18
|
-
"@box/storybook-utils": "1.
|
|
18
|
+
"@box/storybook-utils": "1.4.0",
|
|
19
19
|
"react-intl": "^6.4.2"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|