@strapi/upload 5.52.3 → 5.53.0
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/dist/admin/future/components/Drawer.js +6 -3
- package/dist/admin/future/components/Drawer.js.map +1 -1
- package/dist/admin/future/components/Drawer.mjs +6 -3
- package/dist/admin/future/components/Drawer.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/AssetsPage.js +16 -2
- package/dist/admin/future/pages/Assets/AssetsPage.js.map +1 -1
- package/dist/admin/future/pages/Assets/AssetsPage.mjs +16 -2
- package/dist/admin/future/pages/Assets/AssetsPage.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetActionsMenu.js +5 -0
- package/dist/admin/future/pages/Assets/components/AssetActionsMenu.js.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetActionsMenu.mjs +5 -0
- package/dist/admin/future/pages/Assets/components/AssetActionsMenu.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetCropEditor.js +19 -4
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetCropEditor.js.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetCropEditor.mjs +19 -4
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetCropEditor.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetDetailsDrawer.js +35 -1
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetDetailsDrawer.js.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetDetailsDrawer.mjs +35 -1
- package/dist/admin/future/pages/Assets/components/AssetDetails/AssetDetailsDrawer.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetsGrid.js +10 -0
- package/dist/admin/future/pages/Assets/components/AssetsGrid.js.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetsGrid.mjs +10 -0
- package/dist/admin/future/pages/Assets/components/AssetsGrid.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetsTable.js +9 -0
- package/dist/admin/future/pages/Assets/components/AssetsTable.js.map +1 -1
- package/dist/admin/future/pages/Assets/components/AssetsTable.mjs +10 -1
- package/dist/admin/future/pages/Assets/components/AssetsTable.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/components/BulkActionsBar.js +132 -88
- package/dist/admin/future/pages/Assets/components/BulkActionsBar.js.map +1 -1
- package/dist/admin/future/pages/Assets/components/BulkActionsBar.mjs +135 -91
- package/dist/admin/future/pages/Assets/components/BulkActionsBar.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/components/MainAreaContextMenu.js +181 -0
- package/dist/admin/future/pages/Assets/components/MainAreaContextMenu.js.map +1 -0
- package/dist/admin/future/pages/Assets/components/MainAreaContextMenu.mjs +179 -0
- package/dist/admin/future/pages/Assets/components/MainAreaContextMenu.mjs.map +1 -0
- package/dist/admin/future/pages/Assets/constants.js +22 -0
- package/dist/admin/future/pages/Assets/constants.js.map +1 -1
- package/dist/admin/future/pages/Assets/constants.mjs +19 -1
- package/dist/admin/future/pages/Assets/constants.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/hooks/useInfiniteAssets.js +65 -10
- package/dist/admin/future/pages/Assets/hooks/useInfiniteAssets.js.map +1 -1
- package/dist/admin/future/pages/Assets/hooks/useInfiniteAssets.mjs +66 -11
- package/dist/admin/future/pages/Assets/hooks/useInfiniteAssets.mjs.map +1 -1
- package/dist/admin/future/pages/Assets/hooks/useListScrollRestoration.js +111 -0
- package/dist/admin/future/pages/Assets/hooks/useListScrollRestoration.js.map +1 -0
- package/dist/admin/future/pages/Assets/hooks/useListScrollRestoration.mjs +109 -0
- package/dist/admin/future/pages/Assets/hooks/useListScrollRestoration.mjs.map +1 -0
- package/dist/admin/src/future/components/Drawer.d.ts +10 -0
- package/dist/admin/src/future/pages/Assets/components/MainAreaContextMenu.d.ts +28 -0
- package/dist/admin/src/future/pages/Assets/constants.d.ts +20 -0
- package/dist/admin/src/future/pages/Assets/hooks/useInfiniteAssets.d.ts +4 -0
- package/dist/admin/src/future/pages/Assets/hooks/useListScrollRestoration.d.ts +15 -0
- package/dist/admin/translations/en.json.js +1 -0
- package/dist/admin/translations/en.json.js.map +1 -1
- package/dist/admin/translations/en.json.mjs +1 -0
- package/dist/admin/translations/en.json.mjs.map +1 -1
- package/dist/server/services/upload.js +20 -8
- package/dist/server/services/upload.js.map +1 -1
- package/dist/server/services/upload.mjs +20 -8
- package/dist/server/services/upload.mjs.map +1 -1
- package/dist/server/src/index.d.ts +2 -0
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +2 -0
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/upload.d.ts +2 -0
- package/dist/server/src/services/upload.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -161,12 +161,15 @@ const CloseIconButton = styledComponents.styled(designSystem.IconButton)`
|
|
|
161
161
|
background: transparent;
|
|
162
162
|
}
|
|
163
163
|
`;
|
|
164
|
-
|
|
164
|
+
/** Vetoes an outside interaction that would otherwise dismiss the drawer. */ const keepOpen = (event)=>event.preventDefault();
|
|
165
|
+
const DrawerBody = /*#__PURE__*/ React__namespace.forwardRef(({ animationDirection, width, maxHeight, onPointerDownOutside = keepOpen, children, ...props }, ref)=>/*#__PURE__*/ jsxRuntime.jsx(Dialog__namespace.Content, {
|
|
165
166
|
ref: ref,
|
|
166
167
|
forceMount: true,
|
|
167
168
|
asChild: true,
|
|
168
|
-
onPointerDownOutside:
|
|
169
|
-
|
|
169
|
+
onPointerDownOutside: onPointerDownOutside,
|
|
170
|
+
// Non-modal, so focus legitimately moves outside (tabbing past the last
|
|
171
|
+
// field); only a pointer press should ever dismiss.
|
|
172
|
+
onFocusOutside: keepOpen,
|
|
170
173
|
"data-animation-direction": animationDirection,
|
|
171
174
|
children: /*#__PURE__*/ jsxRuntime.jsx(DrawerContainer, {
|
|
172
175
|
$animationDirection: animationDirection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../../../admin/src/future/components/Drawer.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Box, ScrollArea, IconButton, Flex, FlexProps } from '@strapi/design-system';\nimport { Cross } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { keyframes, styled } from 'styled-components';\n\n/** Duration of the close animation in ms. Use for timing cleanup (e.g. removing URL params). */\nexport const DRAWER_CLOSE_ANIMATION_MS = 300;\n\n/* -------------------------------------------------------------------------------------------------\n * Animations\n * -----------------------------------------------------------------------------------------------*/\n\n// Direction: up\nconst slideUpFromBottomIn = keyframes`\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n\nconst slideUpFromBottomOut = keyframes`\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n`;\n\n// Direction: left\nconst slideLeftFromRightIn = keyframes`\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n`;\n\nconst slideLeftFromRightOut = keyframes`\n from {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(100%);\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Styled components\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerContainerProps {\n $animationDirection?: DrawerBodyProps['animationDirection'];\n $width?: string;\n $maxHeight?: string;\n}\n\nconst DrawerContainer = styled(Flex)<DrawerContainerProps>`\n flex-direction: column;\n position: fixed;\n bottom: 0;\n /* Mobile: full-bleed sheet. Anchoring to the right at a fixed width left a\n dead gutter on every phone wider than the panel, and the panel only filled\n the screen once the viewport happened to be narrower than it. Below the\n medium breakpoint the panel is the screen; medium+ restores the\n right-anchored rail. */\n left: 0;\n right: 0;\n width: 100%;\n padding: ${({ theme }) => theme.spaces[2]};\n max-width: 100%;\n /* Sit just below the overlay token (300) so that:\n - popovers (500) and tooltips (1000) rendered from descendant components\n surface above the drawer panel,\n - AlertDialog overlays (300) and contents (310) opened from inside the\n drawer (e.g. the asset details \"delete\" confirm) cover the drawer. */\n z-index: 200;\n overflow: hidden;\n /* dvh, not vh: anchored to the bottom, a 100vh cap on mobile (visual\n viewport < 100vh under the URL bar) would push the drawer top off-screen. */\n max-height: ${({ $maxHeight }) => $maxHeight ?? '100dvh'};\n\n ${({ theme }) => theme.breakpoints.medium} {\n left: auto;\n width: ${({ $width }) => $width ?? '400px'};\n }\n\n &:focus {\n outline: none;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-state='open'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomIn : slideLeftFromRightIn}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n }\n\n &[data-state='closed'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomOut : slideLeftFromRightOut}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n pointer-events: none;\n }\n }\n`;\n\nconst DrawerContent = styled(Box)`\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral0};\n border-radius: ${({ theme }) => theme.borderRadius};\n box-shadow: ${({ theme }) => theme.shadows.popupShadow};\n overflow: hidden;\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\ninterface CollapsibleContentProps {\n $isVisible: boolean;\n}\n\nconst CollapsibleContent = styled(Box)<CollapsibleContentProps>`\n display: grid;\n flex: 1;\n min-height: 0;\n grid-template-rows: ${({ $isVisible }) => ($isVisible ? '1fr' : '0fr')};\n transition: grid-template-rows 0.3s ease-in-out;\n\n > div {\n overflow: hidden;\n min-height: 0;\n }\n\n /* The scroll area wraps its children in a div styled inline as\n display: table, min-width: 100%. A table box grows to its content, so a\n single unbreakable string (a long file name) widens it past the scrollport\n and the panel gains a horizontal scrollbar — with nothing left to clamp the\n row, the name never truncates. Overriding to a block box makes the\n scrollport the width again, which is what the vertical-only list wants.\n Inline styles, hence the important. */\n [data-radix-scroll-area-viewport] > div {\n display: block !important;\n }\n`;\n\nconst CloseIconButton = styled(IconButton)`\n &:hover {\n background: transparent;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Body\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerBodyProps extends Omit<FlexProps, 'width' | 'maxHeight'> {\n animationDirection?: 'up' | 'left';\n /** Width of the panel from the medium breakpoint up. Mobile is always full-bleed. */\n width?: string;\n /** Cap on the panel height. Defaults to the dynamic viewport height. */\n maxHeight?: string;\n children: React.ReactNode;\n}\n\nconst DrawerBody = React.forwardRef<HTMLDivElement, DrawerBodyProps>(\n ({ animationDirection, width, maxHeight, children, ...props }, ref) => (\n <Dialog.Content\n ref={ref}\n forceMount\n asChild\n onPointerDownOutside={(e) => e.preventDefault()}\n onInteractOutside={(e) => e.preventDefault()}\n data-animation-direction={animationDirection}\n >\n {/* width/maxHeight go through transient props so the DS Flex never emits a\n competing `width` rule that would outrank the mobile full-bleed one. */}\n <DrawerContainer\n $animationDirection={animationDirection}\n $width={width}\n $maxHeight={maxHeight}\n {...props}\n >\n <DrawerContent>{children}</DrawerContent>\n </DrawerContainer>\n </Dialog.Content>\n )\n);\nDrawerBody.displayName = 'DrawerBody';\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerRootProps {\n isVisible?: boolean;\n onClose?: () => void;\n children: React.ReactNode;\n}\n\nconst DrawerRoot = ({ isVisible, onClose, children }: DrawerRootProps): React.ReactElement => (\n <Dialog.Root\n open={isVisible}\n onOpenChange={(nextVisible) => !nextVisible && onClose?.()}\n modal={false}\n >\n <Dialog.Portal>{children}</Dialog.Portal>\n </Dialog.Root>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Content - composable content slot (collapsible when isContentExpanded is used)\n * Contains a scrollable area\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerScrollableContentProps {\n children: React.ReactNode;\n /** When provided, content can collapse/expand (e.g. for minimize). Omit to always show. */\n isContentExpanded?: boolean;\n}\n\nconst DrawerScrollableContent = ({\n children,\n isContentExpanded = true,\n}: DrawerScrollableContentProps) => (\n <CollapsibleContent $isVisible={isContentExpanded} data-collapsed={!isContentExpanded}>\n <ScrollArea>{children}</ScrollArea>\n </CollapsibleContent>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.CloseButton - composable close icon button (Cross icon by default)\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerCloseButtonProps extends React.PropsWithChildren {\n onClose: () => void;\n label?: string;\n}\n\nconst DrawerCloseButton = ({ onClose, label, children }: DrawerCloseButtonProps) => {\n const { formatMessage } = useIntl();\n const labelMessage = label ?? formatMessage({ id: 'global.close', defaultMessage: 'Close' });\n return (\n <CloseIconButton onClick={onClose} label={labelMessage} variant=\"ghost\">\n {children ?? <Cross />}\n </CloseIconButton>\n );\n};\n\nconst Drawer = {\n Root: DrawerRoot,\n Body: DrawerBody,\n ScrollableContent: DrawerScrollableContent,\n CloseButton: DrawerCloseButton,\n Title: Dialog.Title,\n Description: Dialog.Description,\n};\n\nexport { Drawer };\n"],"names":["DRAWER_CLOSE_ANIMATION_MS","slideUpFromBottomIn","keyframes","slideUpFromBottomOut","slideLeftFromRightIn","slideLeftFromRightOut","DrawerContainer","styled","Flex","theme","spaces","$maxHeight","breakpoints","medium","$width","$animationDirection","DrawerContent","Box","colors","neutral0","borderRadius","shadows","popupShadow","neutral150","CollapsibleContent","$isVisible","CloseIconButton","IconButton","DrawerBody","React","forwardRef","animationDirection","width","maxHeight","children","props","ref","_jsx","Dialog","Content","forceMount","asChild","onPointerDownOutside","e","preventDefault","onInteractOutside","data-animation-direction","displayName","DrawerRoot","isVisible","onClose","Root","open","onOpenChange","nextVisible","modal","Portal","DrawerScrollableContent","isContentExpanded","data-collapsed","ScrollArea","DrawerCloseButton","label","formatMessage","useIntl","labelMessage","id","defaultMessage","onClick","variant","Cross","Drawer","Body","ScrollableContent","CloseButton","Title","Description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,iGACO,MAAMA,yBAAAA,GAA4B;AAEzC;;AAEkG;AAGlG,MAAMC,mBAAAA,GAAsBC,0BAAS;;;;;;;;;AASrC,CAAC;AAED,MAAMC,oBAAAA,GAAuBD,0BAAS;;;;;;;;;AAStC,CAAC;AAED;AACA,MAAME,oBAAAA,GAAuBF,0BAAS;;;;;;;;;AAStC,CAAC;AAED,MAAMG,qBAAAA,GAAwBH,0BAAS;;;;;;;;;AASvC,CAAC;AAYD,MAAMI,eAAAA,GAAkBC,uBAAAA,CAAOC,iBAAAA,CAA2B;;;;;;;;;;;;WAY/C,EAAE,CAAC,EAAEC,KAAK,EAAE,GAAKA,KAAAA,CAAMC,MAAM,CAAC,CAAA,CAAE,CAAC;;;;;;;;;;;AAW9B,cAAA,EAAE,CAAC,EAAEC,UAAU,EAAE,GAAKA,cAAc,QAAA,CAAS;;EAEzD,EAAE,CAAC,EAAEF,KAAK,EAAE,GAAKA,KAAAA,CAAMG,WAAW,CAACC,MAAM,CAAC;;AAEjC,WAAA,EAAE,CAAC,EAAEC,MAAM,EAAE,GAAKA,UAAU,OAAA,CAAQ;;;;;;;;;iBAS9B,EAAE,CAAC,EAAEC,mBAAmB,EAAE,GACjCA,mBAAAA,KAAwB,IAAA,GAAOd,sBAAsBG,oBAAAA;AACvD,QAAA,EAAEJ,yBAAAA,CAA0B;;;;iBAInB,EAAE,CAAC,EAAEe,mBAAmB,EAAE,GACjCA,mBAAAA,KAAwB,IAAA,GAAOZ,uBAAuBE,qBAAAA;AACxD,QAAA,EAAEL,yBAAAA,CAA0B;;;;AAIpC,CAAC;AAED,MAAMgB,aAAAA,GAAgBT,uBAAAA,CAAOU,gBAAAA,CAAI;;;;;;o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AA;;AAGpB,CAAA;AAEA,MAAMC,MAAAA,GAAS;IACbpB,IAAAA,EAAMH,UAAAA;IACNwB,IAAAA,EAAM5C,UAAAA;IACN6C,iBAAAA,EAAmBhB,uBAAAA;IACnBiB,WAAAA,EAAab,iBAAAA;AACbc,IAAAA,KAAAA,EAAOrC,kBAAOqC,KAAK;AACnBC,IAAAA,WAAAA,EAAatC,kBAAOsC;AACtB;;;;;"}
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../../../admin/src/future/components/Drawer.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Box, ScrollArea, IconButton, Flex, FlexProps } from '@strapi/design-system';\nimport { Cross } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { keyframes, styled } from 'styled-components';\n\n/** Duration of the close animation in ms. Use for timing cleanup (e.g. removing URL params). */\nexport const DRAWER_CLOSE_ANIMATION_MS = 300;\n\n/* -------------------------------------------------------------------------------------------------\n * Animations\n * -----------------------------------------------------------------------------------------------*/\n\n// Direction: up\nconst slideUpFromBottomIn = keyframes`\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n\nconst slideUpFromBottomOut = keyframes`\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n`;\n\n// Direction: left\nconst slideLeftFromRightIn = keyframes`\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n`;\n\nconst slideLeftFromRightOut = keyframes`\n from {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(100%);\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Styled components\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerContainerProps {\n $animationDirection?: DrawerBodyProps['animationDirection'];\n $width?: string;\n $maxHeight?: string;\n}\n\nconst DrawerContainer = styled(Flex)<DrawerContainerProps>`\n flex-direction: column;\n position: fixed;\n bottom: 0;\n /* Mobile: full-bleed sheet. Anchoring to the right at a fixed width left a\n dead gutter on every phone wider than the panel, and the panel only filled\n the screen once the viewport happened to be narrower than it. Below the\n medium breakpoint the panel is the screen; medium+ restores the\n right-anchored rail. */\n left: 0;\n right: 0;\n width: 100%;\n padding: ${({ theme }) => theme.spaces[2]};\n max-width: 100%;\n /* Sit just below the overlay token (300) so that:\n - popovers (500) and tooltips (1000) rendered from descendant components\n surface above the drawer panel,\n - AlertDialog overlays (300) and contents (310) opened from inside the\n drawer (e.g. the asset details \"delete\" confirm) cover the drawer. */\n z-index: 200;\n overflow: hidden;\n /* dvh, not vh: anchored to the bottom, a 100vh cap on mobile (visual\n viewport < 100vh under the URL bar) would push the drawer top off-screen. */\n max-height: ${({ $maxHeight }) => $maxHeight ?? '100dvh'};\n\n ${({ theme }) => theme.breakpoints.medium} {\n left: auto;\n width: ${({ $width }) => $width ?? '400px'};\n }\n\n &:focus {\n outline: none;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-state='open'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomIn : slideLeftFromRightIn}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n }\n\n &[data-state='closed'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomOut : slideLeftFromRightOut}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n pointer-events: none;\n }\n }\n`;\n\nconst DrawerContent = styled(Box)`\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral0};\n border-radius: ${({ theme }) => theme.borderRadius};\n box-shadow: ${({ theme }) => theme.shadows.popupShadow};\n overflow: hidden;\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\ninterface CollapsibleContentProps {\n $isVisible: boolean;\n}\n\nconst CollapsibleContent = styled(Box)<CollapsibleContentProps>`\n display: grid;\n flex: 1;\n min-height: 0;\n grid-template-rows: ${({ $isVisible }) => ($isVisible ? '1fr' : '0fr')};\n transition: grid-template-rows 0.3s ease-in-out;\n\n > div {\n overflow: hidden;\n min-height: 0;\n }\n\n /* The scroll area wraps its children in a div styled inline as\n display: table, min-width: 100%. A table box grows to its content, so a\n single unbreakable string (a long file name) widens it past the scrollport\n and the panel gains a horizontal scrollbar — with nothing left to clamp the\n row, the name never truncates. Overriding to a block box makes the\n scrollport the width again, which is what the vertical-only list wants.\n Inline styles, hence the important. */\n [data-radix-scroll-area-viewport] > div {\n display: block !important;\n }\n`;\n\nconst CloseIconButton = styled(IconButton)`\n &:hover {\n background: transparent;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Body\n * -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideHandler = NonNullable<Dialog.DialogContentProps['onPointerDownOutside']>;\n\n/** Vetoes an outside interaction that would otherwise dismiss the drawer. */\nconst keepOpen = (event: { preventDefault: () => void }) => event.preventDefault();\n\ninterface DrawerBodyProps extends Omit<FlexProps, 'width' | 'maxHeight'> {\n animationDirection?: 'up' | 'left';\n /** Width of the panel from the medium breakpoint up. Mobile is always full-bleed. */\n width?: string;\n /** Cap on the panel height. Defaults to the dynamic viewport height. */\n maxHeight?: string;\n /**\n * Opt in to dismiss-on-outside-click. Omitted, an outside pointer press never\n * closes the drawer — it must be closed explicitly, as long-running panels\n * like the upload progress dialog need. Passed, the handler can still veto\n * individual presses via `event.preventDefault()`. Content rendered from\n * inside the panel but portaled elsewhere (DS dialogs, popovers, tooltips)\n * never counts as outside — Radix reads the React tree, not the DOM.\n */\n onPointerDownOutside?: PointerDownOutsideHandler;\n children: React.ReactNode;\n}\n\nconst DrawerBody = React.forwardRef<HTMLDivElement, DrawerBodyProps>(\n (\n { animationDirection, width, maxHeight, onPointerDownOutside = keepOpen, children, ...props },\n ref\n ) => (\n <Dialog.Content\n ref={ref}\n forceMount\n asChild\n onPointerDownOutside={onPointerDownOutside}\n // Non-modal, so focus legitimately moves outside (tabbing past the last\n // field); only a pointer press should ever dismiss.\n onFocusOutside={keepOpen}\n data-animation-direction={animationDirection}\n >\n {/* width/maxHeight go through transient props so the DS Flex never emits a\n competing `width` rule that would outrank the mobile full-bleed one. */}\n <DrawerContainer\n $animationDirection={animationDirection}\n $width={width}\n $maxHeight={maxHeight}\n {...props}\n >\n <DrawerContent>{children}</DrawerContent>\n </DrawerContainer>\n </Dialog.Content>\n )\n);\nDrawerBody.displayName = 'DrawerBody';\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerRootProps {\n isVisible?: boolean;\n onClose?: () => void;\n children: React.ReactNode;\n}\n\nconst DrawerRoot = ({ isVisible, onClose, children }: DrawerRootProps): React.ReactElement => (\n <Dialog.Root\n open={isVisible}\n onOpenChange={(nextVisible) => !nextVisible && onClose?.()}\n modal={false}\n >\n <Dialog.Portal>{children}</Dialog.Portal>\n </Dialog.Root>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Content - composable content slot (collapsible when isContentExpanded is used)\n * Contains a scrollable area\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerScrollableContentProps {\n children: React.ReactNode;\n /** When provided, content can collapse/expand (e.g. for minimize). Omit to always show. */\n isContentExpanded?: boolean;\n}\n\nconst DrawerScrollableContent = ({\n children,\n isContentExpanded = true,\n}: DrawerScrollableContentProps) => (\n <CollapsibleContent $isVisible={isContentExpanded} data-collapsed={!isContentExpanded}>\n <ScrollArea>{children}</ScrollArea>\n </CollapsibleContent>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.CloseButton - composable close icon button (Cross icon by default)\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerCloseButtonProps extends React.PropsWithChildren {\n onClose: () => void;\n label?: string;\n}\n\nconst DrawerCloseButton = ({ onClose, label, children }: DrawerCloseButtonProps) => {\n const { formatMessage } = useIntl();\n const labelMessage = label ?? formatMessage({ id: 'global.close', defaultMessage: 'Close' });\n return (\n <CloseIconButton onClick={onClose} label={labelMessage} variant=\"ghost\">\n {children ?? <Cross />}\n </CloseIconButton>\n );\n};\n\nconst Drawer = {\n Root: DrawerRoot,\n Body: DrawerBody,\n ScrollableContent: DrawerScrollableContent,\n CloseButton: DrawerCloseButton,\n Title: Dialog.Title,\n Description: Dialog.Description,\n};\n\nexport { Drawer };\n"],"names":["DRAWER_CLOSE_ANIMATION_MS","slideUpFromBottomIn","keyframes","slideUpFromBottomOut","slideLeftFromRightIn","slideLeftFromRightOut","DrawerContainer","styled","Flex","theme","spaces","$maxHeight","breakpoints","medium","$width","$animationDirection","DrawerContent","Box","colors","neutral0","borderRadius","shadows","popupShadow","neutral150","CollapsibleContent","$isVisible","CloseIconButton","IconButton","keepOpen","event","preventDefault","DrawerBody","React","forwardRef","animationDirection","width","maxHeight","onPointerDownOutside","children","props","ref","_jsx","Dialog","Content","forceMount","asChild","onFocusOutside","data-animation-direction","displayName","DrawerRoot","isVisible","onClose","Root","open","onOpenChange","nextVisible","modal","Portal","DrawerScrollableContent","isContentExpanded","data-collapsed","ScrollArea","DrawerCloseButton","label","formatMessage","useIntl","labelMessage","id","defaultMessage","onClick","variant","Cross","Drawer","Body","ScrollableContent","CloseButton","Title","Description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,iGACO,MAAMA,yBAAAA,GAA4B;AAEzC;;AAEkG;AAGlG,MAAMC,mBAAAA,GAAsBC,0BAAS;;;;;;;;;AASrC,CAAC;AAED,MAAMC,oBAAAA,GAAuBD,0BAAS;;;;;;;;;AAStC,CAAC;AAED;AACA,MAAME,oBAAAA,GAAuBF,0BAAS;;;;;;;;;AAStC,CAAC;AAED,MAAMG,qBAAAA,GAAwBH,0BAAS;;;;;;;;;AASvC,CAAC;AAYD,MAAMI,eAAAA,G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AAepB,MAAMoB,uBAAAA,GAA0B,CAAC,EAC/BpB,QAAQ,EACRqB,iBAAAA,GAAoB,IAAI,EACK,iBAC7BlB,cAAA,CAACjB,kBAAAA,EAAAA;QAAmBC,UAAAA,EAAYkC,iBAAAA;AAAmBC,QAAAA,gBAAAA,EAAgB,CAACD,iBAAAA;AAClE,QAAA,QAAA,gBAAAlB,cAAA,CAACoB,uBAAAA,EAAAA;AAAYvB,YAAAA,QAAAA,EAAAA;;;AAajB,MAAMwB,iBAAAA,GAAoB,CAAC,EAAEX,OAAO,EAAEY,KAAK,EAAEzB,QAAQ,EAA0B,GAAA;IAC7E,MAAM,EAAE0B,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;IAC1B,MAAMC,YAAAA,GAAeH,SAASC,aAAAA,CAAc;QAAEG,EAAAA,EAAI,cAAA;QAAgBC,cAAAA,EAAgB;AAAQ,KAAA,CAAA;AAC1F,IAAA,qBACE3B,cAAA,CAACf,eAAAA,EAAAA;QAAgB2C,OAAAA,EAASlB,OAAAA;QAASY,KAAAA,EAAOG,YAAAA;QAAcI,OAAAA,EAAQ,OAAA;AAC7DhC,QAAAA,QAAAA,EAAAA,QAAAA,kBAAYG,cAAA,CAAC8B,WAAAA,EAAAA,EAAAA;;AAGpB,CAAA;AAEA,MAAMC,MAAAA,GAAS;IACbpB,IAAAA,EAAMH,UAAAA;IACNwB,IAAAA,EAAM1C,UAAAA;IACN2C,iBAAAA,EAAmBhB,uBAAAA;IACnBiB,WAAAA,EAAab,iBAAAA;AACbc,IAAAA,KAAAA,EAAOlC,kBAAOkC,KAAK;AACnBC,IAAAA,WAAAA,EAAanC,kBAAOmC;AACtB;;;;;"}
|
|
@@ -138,12 +138,15 @@ const CloseIconButton = styled(IconButton)`
|
|
|
138
138
|
background: transparent;
|
|
139
139
|
}
|
|
140
140
|
`;
|
|
141
|
-
|
|
141
|
+
/** Vetoes an outside interaction that would otherwise dismiss the drawer. */ const keepOpen = (event)=>event.preventDefault();
|
|
142
|
+
const DrawerBody = /*#__PURE__*/ React.forwardRef(({ animationDirection, width, maxHeight, onPointerDownOutside = keepOpen, children, ...props }, ref)=>/*#__PURE__*/ jsx(Dialog.Content, {
|
|
142
143
|
ref: ref,
|
|
143
144
|
forceMount: true,
|
|
144
145
|
asChild: true,
|
|
145
|
-
onPointerDownOutside:
|
|
146
|
-
|
|
146
|
+
onPointerDownOutside: onPointerDownOutside,
|
|
147
|
+
// Non-modal, so focus legitimately moves outside (tabbing past the last
|
|
148
|
+
// field); only a pointer press should ever dismiss.
|
|
149
|
+
onFocusOutside: keepOpen,
|
|
147
150
|
"data-animation-direction": animationDirection,
|
|
148
151
|
children: /*#__PURE__*/ jsx(DrawerContainer, {
|
|
149
152
|
$animationDirection: animationDirection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.mjs","sources":["../../../../admin/src/future/components/Drawer.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Box, ScrollArea, IconButton, Flex, FlexProps } from '@strapi/design-system';\nimport { Cross } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { keyframes, styled } from 'styled-components';\n\n/** Duration of the close animation in ms. Use for timing cleanup (e.g. removing URL params). */\nexport const DRAWER_CLOSE_ANIMATION_MS = 300;\n\n/* -------------------------------------------------------------------------------------------------\n * Animations\n * -----------------------------------------------------------------------------------------------*/\n\n// Direction: up\nconst slideUpFromBottomIn = keyframes`\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n\nconst slideUpFromBottomOut = keyframes`\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n`;\n\n// Direction: left\nconst slideLeftFromRightIn = keyframes`\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n`;\n\nconst slideLeftFromRightOut = keyframes`\n from {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(100%);\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Styled components\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerContainerProps {\n $animationDirection?: DrawerBodyProps['animationDirection'];\n $width?: string;\n $maxHeight?: string;\n}\n\nconst DrawerContainer = styled(Flex)<DrawerContainerProps>`\n flex-direction: column;\n position: fixed;\n bottom: 0;\n /* Mobile: full-bleed sheet. Anchoring to the right at a fixed width left a\n dead gutter on every phone wider than the panel, and the panel only filled\n the screen once the viewport happened to be narrower than it. Below the\n medium breakpoint the panel is the screen; medium+ restores the\n right-anchored rail. */\n left: 0;\n right: 0;\n width: 100%;\n padding: ${({ theme }) => theme.spaces[2]};\n max-width: 100%;\n /* Sit just below the overlay token (300) so that:\n - popovers (500) and tooltips (1000) rendered from descendant components\n surface above the drawer panel,\n - AlertDialog overlays (300) and contents (310) opened from inside the\n drawer (e.g. the asset details \"delete\" confirm) cover the drawer. */\n z-index: 200;\n overflow: hidden;\n /* dvh, not vh: anchored to the bottom, a 100vh cap on mobile (visual\n viewport < 100vh under the URL bar) would push the drawer top off-screen. */\n max-height: ${({ $maxHeight }) => $maxHeight ?? '100dvh'};\n\n ${({ theme }) => theme.breakpoints.medium} {\n left: auto;\n width: ${({ $width }) => $width ?? '400px'};\n }\n\n &:focus {\n outline: none;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-state='open'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomIn : slideLeftFromRightIn}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n }\n\n &[data-state='closed'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomOut : slideLeftFromRightOut}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n pointer-events: none;\n }\n }\n`;\n\nconst DrawerContent = styled(Box)`\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral0};\n border-radius: ${({ theme }) => theme.borderRadius};\n box-shadow: ${({ theme }) => theme.shadows.popupShadow};\n overflow: hidden;\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\ninterface CollapsibleContentProps {\n $isVisible: boolean;\n}\n\nconst CollapsibleContent = styled(Box)<CollapsibleContentProps>`\n display: grid;\n flex: 1;\n min-height: 0;\n grid-template-rows: ${({ $isVisible }) => ($isVisible ? '1fr' : '0fr')};\n transition: grid-template-rows 0.3s ease-in-out;\n\n > div {\n overflow: hidden;\n min-height: 0;\n }\n\n /* The scroll area wraps its children in a div styled inline as\n display: table, min-width: 100%. A table box grows to its content, so a\n single unbreakable string (a long file name) widens it past the scrollport\n and the panel gains a horizontal scrollbar — with nothing left to clamp the\n row, the name never truncates. Overriding to a block box makes the\n scrollport the width again, which is what the vertical-only list wants.\n Inline styles, hence the important. */\n [data-radix-scroll-area-viewport] > div {\n display: block !important;\n }\n`;\n\nconst CloseIconButton = styled(IconButton)`\n &:hover {\n background: transparent;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Body\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerBodyProps extends Omit<FlexProps, 'width' | 'maxHeight'> {\n animationDirection?: 'up' | 'left';\n /** Width of the panel from the medium breakpoint up. Mobile is always full-bleed. */\n width?: string;\n /** Cap on the panel height. Defaults to the dynamic viewport height. */\n maxHeight?: string;\n children: React.ReactNode;\n}\n\nconst DrawerBody = React.forwardRef<HTMLDivElement, DrawerBodyProps>(\n ({ animationDirection, width, maxHeight, children, ...props }, ref) => (\n <Dialog.Content\n ref={ref}\n forceMount\n asChild\n onPointerDownOutside={(e) => e.preventDefault()}\n onInteractOutside={(e) => e.preventDefault()}\n data-animation-direction={animationDirection}\n >\n {/* width/maxHeight go through transient props so the DS Flex never emits a\n competing `width` rule that would outrank the mobile full-bleed one. */}\n <DrawerContainer\n $animationDirection={animationDirection}\n $width={width}\n $maxHeight={maxHeight}\n {...props}\n >\n <DrawerContent>{children}</DrawerContent>\n </DrawerContainer>\n </Dialog.Content>\n )\n);\nDrawerBody.displayName = 'DrawerBody';\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerRootProps {\n isVisible?: boolean;\n onClose?: () => void;\n children: React.ReactNode;\n}\n\nconst DrawerRoot = ({ isVisible, onClose, children }: DrawerRootProps): React.ReactElement => (\n <Dialog.Root\n open={isVisible}\n onOpenChange={(nextVisible) => !nextVisible && onClose?.()}\n modal={false}\n >\n <Dialog.Portal>{children}</Dialog.Portal>\n </Dialog.Root>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Content - composable content slot (collapsible when isContentExpanded is used)\n * Contains a scrollable area\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerScrollableContentProps {\n children: React.ReactNode;\n /** When provided, content can collapse/expand (e.g. for minimize). Omit to always show. */\n isContentExpanded?: boolean;\n}\n\nconst DrawerScrollableContent = ({\n children,\n isContentExpanded = true,\n}: DrawerScrollableContentProps) => (\n <CollapsibleContent $isVisible={isContentExpanded} data-collapsed={!isContentExpanded}>\n <ScrollArea>{children}</ScrollArea>\n </CollapsibleContent>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.CloseButton - composable close icon button (Cross icon by default)\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerCloseButtonProps extends React.PropsWithChildren {\n onClose: () => void;\n label?: string;\n}\n\nconst DrawerCloseButton = ({ onClose, label, children }: DrawerCloseButtonProps) => {\n const { formatMessage } = useIntl();\n const labelMessage = label ?? formatMessage({ id: 'global.close', defaultMessage: 'Close' });\n return (\n <CloseIconButton onClick={onClose} label={labelMessage} variant=\"ghost\">\n {children ?? <Cross />}\n </CloseIconButton>\n );\n};\n\nconst Drawer = {\n Root: DrawerRoot,\n Body: DrawerBody,\n ScrollableContent: DrawerScrollableContent,\n CloseButton: DrawerCloseButton,\n Title: Dialog.Title,\n Description: Dialog.Description,\n};\n\nexport { Drawer };\n"],"names":["DRAWER_CLOSE_ANIMATION_MS","slideUpFromBottomIn","keyframes","slideUpFromBottomOut","slideLeftFromRightIn","slideLeftFromRightOut","DrawerContainer","styled","Flex","theme","spaces","$maxHeight","breakpoints","medium","$width","$animationDirection","DrawerContent","Box","colors","neutral0","borderRadius","shadows","popupShadow","neutral150","CollapsibleContent","$isVisible","CloseIconButton","IconButton","DrawerBody","React","forwardRef","animationDirection","width","maxHeight","children","props","ref","_jsx","Dialog","Content","forceMount","asChild","onPointerDownOutside","e","preventDefault","onInteractOutside","data-animation-direction","displayName","DrawerRoot","isVisible","onClose","Root","open","onOpenChange","nextVisible","modal","Portal","DrawerScrollableContent","isContentExpanded","data-collapsed","ScrollArea","DrawerCloseButton","label","formatMessage","useIntl","labelMessage","id","defaultMessage","onClick","variant","Cross","Drawer","Body","ScrollableContent","CloseButton","Title","Description"],"mappings":";;;;;;;;AAQA,iGACO,MAAMA,yBAAAA,GAA4B;AAEzC;;AAEkG;AAGlG,MAAMC,mBAAAA,GAAsBC,SAAS;;;;;;;;;AASrC,CAAC;AAED,MAAMC,oBAAAA,GAAuBD,SAAS;;;;;;;;;AAStC,CAAC;AAED;AACA,MAAME,oBAAAA,GAAuBF,SAAS;;;;;;;;;AAStC,CAAC;AAED,MAAMG,qBAAAA,GAAwBH,SAAS;;;;;;;;;AASvC,CAAC;AAYD,MAAMI,eAAAA,GAAkBC,MAAAA,CAAOC,IAAAA,CAA2B;;;;;;;;;;;;WAY/C,EAAE,CAAC,EAAEC,KAAK,EAAE,GAAKA,KAAAA,CAAMC,MAAM,CAAC,CAAA,CAAE,CAAC;;;;;;;;;;;AAW9B,cAAA,EAAE,CAAC,EAAEC,UAAU,EAAE,GAAKA,cAAc,QAAA,CAAS;;EAEzD,EAAE,CAAC,EAAEF,KAAK,EAAE,GAAK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AAA,GAAoB,CAAC,EAAEX,OAAO,EAAEY,KAAK,EAAE5B,QAAQ,EAA0B,GAAA;IAC7E,MAAM,EAAE6B,aAAa,EAAE,GAAGC,OAAAA,EAAAA;IAC1B,MAAMC,YAAAA,GAAeH,SAASC,aAAAA,CAAc;QAAEG,EAAAA,EAAI,cAAA;QAAgBC,cAAAA,EAAgB;AAAQ,KAAA,CAAA;AAC1F,IAAA,qBACE9B,GAAA,CAACX,eAAAA,EAAAA;QAAgB0C,OAAAA,EAASlB,OAAAA;QAASY,KAAAA,EAAOG,YAAAA;QAAcI,OAAAA,EAAQ,OAAA;AAC7DnC,QAAAA,QAAAA,EAAAA,QAAAA,kBAAYG,GAAA,CAACiC,KAAAA,EAAAA,EAAAA;;AAGpB,CAAA;AAEA,MAAMC,MAAAA,GAAS;IACbpB,IAAAA,EAAMH,UAAAA;IACNwB,IAAAA,EAAM5C,UAAAA;IACN6C,iBAAAA,EAAmBhB,uBAAAA;IACnBiB,WAAAA,EAAab,iBAAAA;AACbc,IAAAA,KAAAA,EAAOrC,OAAOqC,KAAK;AACnBC,IAAAA,WAAAA,EAAatC,OAAOsC;AACtB;;;;"}
|
|
1
|
+
{"version":3,"file":"Drawer.mjs","sources":["../../../../admin/src/future/components/Drawer.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Box, ScrollArea, IconButton, Flex, FlexProps } from '@strapi/design-system';\nimport { Cross } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { keyframes, styled } from 'styled-components';\n\n/** Duration of the close animation in ms. Use for timing cleanup (e.g. removing URL params). */\nexport const DRAWER_CLOSE_ANIMATION_MS = 300;\n\n/* -------------------------------------------------------------------------------------------------\n * Animations\n * -----------------------------------------------------------------------------------------------*/\n\n// Direction: up\nconst slideUpFromBottomIn = keyframes`\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n\nconst slideUpFromBottomOut = keyframes`\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n`;\n\n// Direction: left\nconst slideLeftFromRightIn = keyframes`\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n`;\n\nconst slideLeftFromRightOut = keyframes`\n from {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(100%);\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Styled components\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerContainerProps {\n $animationDirection?: DrawerBodyProps['animationDirection'];\n $width?: string;\n $maxHeight?: string;\n}\n\nconst DrawerContainer = styled(Flex)<DrawerContainerProps>`\n flex-direction: column;\n position: fixed;\n bottom: 0;\n /* Mobile: full-bleed sheet. Anchoring to the right at a fixed width left a\n dead gutter on every phone wider than the panel, and the panel only filled\n the screen once the viewport happened to be narrower than it. Below the\n medium breakpoint the panel is the screen; medium+ restores the\n right-anchored rail. */\n left: 0;\n right: 0;\n width: 100%;\n padding: ${({ theme }) => theme.spaces[2]};\n max-width: 100%;\n /* Sit just below the overlay token (300) so that:\n - popovers (500) and tooltips (1000) rendered from descendant components\n surface above the drawer panel,\n - AlertDialog overlays (300) and contents (310) opened from inside the\n drawer (e.g. the asset details \"delete\" confirm) cover the drawer. */\n z-index: 200;\n overflow: hidden;\n /* dvh, not vh: anchored to the bottom, a 100vh cap on mobile (visual\n viewport < 100vh under the URL bar) would push the drawer top off-screen. */\n max-height: ${({ $maxHeight }) => $maxHeight ?? '100dvh'};\n\n ${({ theme }) => theme.breakpoints.medium} {\n left: auto;\n width: ${({ $width }) => $width ?? '400px'};\n }\n\n &:focus {\n outline: none;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-state='open'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomIn : slideLeftFromRightIn}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n }\n\n &[data-state='closed'] {\n animation: ${({ $animationDirection }) =>\n $animationDirection === 'up' ? slideUpFromBottomOut : slideLeftFromRightOut}\n ${DRAWER_CLOSE_ANIMATION_MS}ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n pointer-events: none;\n }\n }\n`;\n\nconst DrawerContent = styled(Box)`\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral0};\n border-radius: ${({ theme }) => theme.borderRadius};\n box-shadow: ${({ theme }) => theme.shadows.popupShadow};\n overflow: hidden;\n border: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\ninterface CollapsibleContentProps {\n $isVisible: boolean;\n}\n\nconst CollapsibleContent = styled(Box)<CollapsibleContentProps>`\n display: grid;\n flex: 1;\n min-height: 0;\n grid-template-rows: ${({ $isVisible }) => ($isVisible ? '1fr' : '0fr')};\n transition: grid-template-rows 0.3s ease-in-out;\n\n > div {\n overflow: hidden;\n min-height: 0;\n }\n\n /* The scroll area wraps its children in a div styled inline as\n display: table, min-width: 100%. A table box grows to its content, so a\n single unbreakable string (a long file name) widens it past the scrollport\n and the panel gains a horizontal scrollbar — with nothing left to clamp the\n row, the name never truncates. Overriding to a block box makes the\n scrollport the width again, which is what the vertical-only list wants.\n Inline styles, hence the important. */\n [data-radix-scroll-area-viewport] > div {\n display: block !important;\n }\n`;\n\nconst CloseIconButton = styled(IconButton)`\n &:hover {\n background: transparent;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Body\n * -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideHandler = NonNullable<Dialog.DialogContentProps['onPointerDownOutside']>;\n\n/** Vetoes an outside interaction that would otherwise dismiss the drawer. */\nconst keepOpen = (event: { preventDefault: () => void }) => event.preventDefault();\n\ninterface DrawerBodyProps extends Omit<FlexProps, 'width' | 'maxHeight'> {\n animationDirection?: 'up' | 'left';\n /** Width of the panel from the medium breakpoint up. Mobile is always full-bleed. */\n width?: string;\n /** Cap on the panel height. Defaults to the dynamic viewport height. */\n maxHeight?: string;\n /**\n * Opt in to dismiss-on-outside-click. Omitted, an outside pointer press never\n * closes the drawer — it must be closed explicitly, as long-running panels\n * like the upload progress dialog need. Passed, the handler can still veto\n * individual presses via `event.preventDefault()`. Content rendered from\n * inside the panel but portaled elsewhere (DS dialogs, popovers, tooltips)\n * never counts as outside — Radix reads the React tree, not the DOM.\n */\n onPointerDownOutside?: PointerDownOutsideHandler;\n children: React.ReactNode;\n}\n\nconst DrawerBody = React.forwardRef<HTMLDivElement, DrawerBodyProps>(\n (\n { animationDirection, width, maxHeight, onPointerDownOutside = keepOpen, children, ...props },\n ref\n ) => (\n <Dialog.Content\n ref={ref}\n forceMount\n asChild\n onPointerDownOutside={onPointerDownOutside}\n // Non-modal, so focus legitimately moves outside (tabbing past the last\n // field); only a pointer press should ever dismiss.\n onFocusOutside={keepOpen}\n data-animation-direction={animationDirection}\n >\n {/* width/maxHeight go through transient props so the DS Flex never emits a\n competing `width` rule that would outrank the mobile full-bleed one. */}\n <DrawerContainer\n $animationDirection={animationDirection}\n $width={width}\n $maxHeight={maxHeight}\n {...props}\n >\n <DrawerContent>{children}</DrawerContent>\n </DrawerContainer>\n </Dialog.Content>\n )\n);\nDrawerBody.displayName = 'DrawerBody';\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerRootProps {\n isVisible?: boolean;\n onClose?: () => void;\n children: React.ReactNode;\n}\n\nconst DrawerRoot = ({ isVisible, onClose, children }: DrawerRootProps): React.ReactElement => (\n <Dialog.Root\n open={isVisible}\n onOpenChange={(nextVisible) => !nextVisible && onClose?.()}\n modal={false}\n >\n <Dialog.Portal>{children}</Dialog.Portal>\n </Dialog.Root>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.Content - composable content slot (collapsible when isContentExpanded is used)\n * Contains a scrollable area\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerScrollableContentProps {\n children: React.ReactNode;\n /** When provided, content can collapse/expand (e.g. for minimize). Omit to always show. */\n isContentExpanded?: boolean;\n}\n\nconst DrawerScrollableContent = ({\n children,\n isContentExpanded = true,\n}: DrawerScrollableContentProps) => (\n <CollapsibleContent $isVisible={isContentExpanded} data-collapsed={!isContentExpanded}>\n <ScrollArea>{children}</ScrollArea>\n </CollapsibleContent>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer.CloseButton - composable close icon button (Cross icon by default)\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DrawerCloseButtonProps extends React.PropsWithChildren {\n onClose: () => void;\n label?: string;\n}\n\nconst DrawerCloseButton = ({ onClose, label, children }: DrawerCloseButtonProps) => {\n const { formatMessage } = useIntl();\n const labelMessage = label ?? formatMessage({ id: 'global.close', defaultMessage: 'Close' });\n return (\n <CloseIconButton onClick={onClose} label={labelMessage} variant=\"ghost\">\n {children ?? <Cross />}\n </CloseIconButton>\n );\n};\n\nconst Drawer = {\n Root: DrawerRoot,\n Body: DrawerBody,\n ScrollableContent: DrawerScrollableContent,\n CloseButton: DrawerCloseButton,\n Title: Dialog.Title,\n Description: Dialog.Description,\n};\n\nexport { Drawer };\n"],"names":["DRAWER_CLOSE_ANIMATION_MS","slideUpFromBottomIn","keyframes","slideUpFromBottomOut","slideLeftFromRightIn","slideLeftFromRightOut","DrawerContainer","styled","Flex","theme","spaces","$maxHeight","breakpoints","medium","$width","$animationDirection","DrawerContent","Box","colors","neutral0","borderRadius","shadows","popupShadow","neutral150","CollapsibleContent","$isVisible","CloseIconButton","IconButton","keepOpen","event","preventDefault","DrawerBody","React","forwardRef","animationDirection","width","maxHeight","onPointerDownOutside","children","props","ref","_jsx","Dialog","Content","forceMount","asChild","onFocusOutside","data-animation-direction","displayName","DrawerRoot","isVisible","onClose","Root","open","onOpenChange","nextVisible","modal","Portal","DrawerScrollableContent","isContentExpanded","data-collapsed","ScrollArea","DrawerCloseButton","label","formatMessage","useIntl","labelMessage","id","defaultMessage","onClick","variant","Cross","Drawer","Body","ScrollableContent","CloseButton","Title","Description"],"mappings":";;;;;;;;AAQA,iGACO,MAAMA,yBAAAA,GAA4B;AAEzC;;AAEkG;AAGlG,MAAMC,mBAAAA,GAAsBC,SAAS;;;;;;;;;AASrC,CAAC;AAED,MAAMC,oBAAAA,GAAuBD,SAAS;;;;;;;;;AAStC,CAAC;AAED;AACA,MAAME,oBAAAA,GAAuBF,SAAS;;;;;;;;;AAStC,CAAC;AAED,MAAMG,qBAAAA,GAAwBH,SAAS;;;;;;;;;AASvC,CAAC;AAYD,MAAMI,eAAAA,GAAkBC,MAAAA,CAAOC,IAAAA,CAA2B;;;;;;;;;;;;WAY/C,EAAE,CAAC,EAAEC,KAAK,EAAE,GAAKA,KAAAA,CAAMC,MAAM,CAAC,CAAA,CAAE,CAAC;;;;;;;;;;;AAW9B,cAAA,EAAE,CAAC,EAAEC,UAAU,EAAE,GAAKA,cAAc,QAAA,CAAS;;EAEzD,EAAE,CAAC,EAAEF,KAAK,EAAE,GAAKA,KAAAA,CAAMG,WAAW,CAACC,MAAM,CAAC;;AAEjC,WAAA,EAAE,CAAC,EAAEC,MAAM,EAAE,GAAKA,UAAU,OAAA,CAAQ;;;;;;;;;iBAS9B,EAAE,CAAC,EAAEC,mBAAmB,EAAE,GACjCA,mBAAAA,KAAwB,IAAA,GAAOd,sBAAsBG,oBAAAA;AACvD,QAAA,EAAEJ,yBAAAA,CAA0B;;;;iBAInB,EAAE,CAAC,EAAEe,mBAAmB,EAAE,GACjCA,mBAAAA,KAAwB,IAAA,GAAOZ,uBAAuBE,qBAAAA;AACxD,QAAA,EAAEL,yBAAAA,CAA0B;;;;AAIpC,CAAC;AAED,MAAMgB,aAAAA,GAAgBT,MAAAA,CAAOU,GAAAA,CAAI;;;;;;oBAMb,EAAE,CAAC,EAAER,KAAK,EAAE,GAAKA,KAAAA,CAAMS,MAAM,CAACC,Q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IAAAA,EAAMH,UAAAA;IACNwB,IAAAA,EAAM1C,UAAAA;IACN2C,iBAAAA,EAAmBhB,uBAAAA;IACnBiB,WAAAA,EAAab,iBAAAA;AACbc,IAAAA,KAAAA,EAAOlC,OAAOkC,KAAK;AACnBC,IAAAA,WAAAA,EAAanC,OAAOmC;AACtB;;;;"}
|
|
@@ -32,6 +32,7 @@ var FilterMenu = require('./components/FilterMenu.js');
|
|
|
32
32
|
var FolderFormDialog = require('./components/FolderFormDialog.js');
|
|
33
33
|
var FolderTree = require('./components/FolderTree/FolderTree.js');
|
|
34
34
|
var ImportFromUrlDialog = require('./components/ImportFromUrlDialog.js');
|
|
35
|
+
var MainAreaContextMenu = require('./components/MainAreaContextMenu.js');
|
|
35
36
|
var SortMenu = require('./components/SortMenu.js');
|
|
36
37
|
var constants = require('./constants.js');
|
|
37
38
|
var useAssetSearch = require('./hooks/useAssetSearch.js');
|
|
@@ -42,6 +43,7 @@ var useFolderNavigation = require('./hooks/useFolderNavigation.js');
|
|
|
42
43
|
var useInfiniteAssets = require('./hooks/useInfiniteAssets.js');
|
|
43
44
|
var useInfiniteScrollSentinel = require('./hooks/useInfiniteScrollSentinel.js');
|
|
44
45
|
var useListFilters = require('./hooks/useListFilters.js');
|
|
46
|
+
var useListScrollRestoration = require('./hooks/useListScrollRestoration.js');
|
|
45
47
|
var useListSort = require('./hooks/useListSort.js');
|
|
46
48
|
var buildAssetFilters = require('./utils/buildAssetFilters.js');
|
|
47
49
|
var listQueryKey = require('./utils/listQueryKey.js');
|
|
@@ -591,6 +593,7 @@ const AssetsPage = ()=>{
|
|
|
591
593
|
sort: `${listSort.assetsSort};folders=${listSort.foldersPosition}`,
|
|
592
594
|
filter: listFilters.serialized || null
|
|
593
595
|
});
|
|
596
|
+
const scrollAnchorRef = useListScrollRestoration.useListScrollRestoration(listQueryKey$1);
|
|
594
597
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
595
598
|
children: [
|
|
596
599
|
/*#__PURE__*/ jsxRuntime.jsx(UploadDropZoneContext.UploadDropZoneProvider, {
|
|
@@ -628,6 +631,17 @@ const AssetsPage = ()=>{
|
|
|
628
631
|
height: 0,
|
|
629
632
|
"aria-hidden": true
|
|
630
633
|
}),
|
|
634
|
+
/*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
|
|
635
|
+
ref: scrollAnchorRef,
|
|
636
|
+
height: 0,
|
|
637
|
+
"aria-hidden": true
|
|
638
|
+
}),
|
|
639
|
+
/*#__PURE__*/ jsxRuntime.jsx(MainAreaContextMenu.MainAreaContextMenu, {
|
|
640
|
+
disabled: !canCreate,
|
|
641
|
+
onCreateFolder: ()=>setIsCreateFolderDialogOpen(true),
|
|
642
|
+
onImportFiles: handleFileSelect,
|
|
643
|
+
onImportFromUrl: ()=>setIsUrlDialogOpen(true)
|
|
644
|
+
}),
|
|
631
645
|
/*#__PURE__*/ jsxRuntime.jsxs(StickyHeader, {
|
|
632
646
|
$compact: isHeaderCompact,
|
|
633
647
|
children: [
|
|
@@ -660,7 +674,7 @@ const AssetsPage = ()=>{
|
|
|
660
674
|
startIcon: /*#__PURE__*/ jsxRuntime.jsx(icons.Files, {}),
|
|
661
675
|
children: formatMessage({
|
|
662
676
|
id: translations.getTranslationKey('import-files'),
|
|
663
|
-
defaultMessage: '
|
|
677
|
+
defaultMessage: 'File upload'
|
|
664
678
|
})
|
|
665
679
|
}),
|
|
666
680
|
/*#__PURE__*/ jsxRuntime.jsx(designSystem.MenuItem, {
|
|
@@ -668,7 +682,7 @@ const AssetsPage = ()=>{
|
|
|
668
682
|
startIcon: /*#__PURE__*/ jsxRuntime.jsx(icons.Link, {}),
|
|
669
683
|
children: formatMessage({
|
|
670
684
|
id: translations.getTranslationKey('import-from-url'),
|
|
671
|
-
defaultMessage: '
|
|
685
|
+
defaultMessage: 'File upload from URL'
|
|
672
686
|
})
|
|
673
687
|
})
|
|
674
688
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsPage.js","sources":["../../../../../admin/src/future/pages/Assets/AssetsPage.tsx"],"sourcesContent":["import { useRef, useCallback, useMemo, useState, useEffect, type ChangeEvent } from 'react';\n\nimport * as ToggleGroup from '@radix-ui/react-toggle-group';\nimport { Layouts, Page, useElementOnScreen, usePersistentState } from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Flex,\n Loader,\n MenuItem,\n SimpleMenu,\n Typography,\n VisuallyHidden,\n} from '@strapi/design-system';\nimport {\n ChevronDown,\n Files,\n Folder as FolderIcon,\n GridFour as GridIcon,\n Link,\n List,\n} from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { styled, css } from 'styled-components';\n\nimport { typeFromMime } from '../../../utils/typeFromMime';\nimport { BetaNotice } from '../../components/BetaNotice';\nimport { useAIMetadataEnabled } from '../../hooks/useAIMetadataEnabled';\nimport { useMediaLibraryPermissions } from '../../hooks/useMediaLibraryPermissions';\nimport { useTracking, MEDIA_LIBRARY_LOCATION } from '../../hooks/useTracking';\nimport { useUploadFromUrlsMutation, useUploadFilesMutation } from '../../services/api';\nimport { useGetFolderQuery, useGetFoldersQuery } from '../../services/folders';\nimport { useGetUploadSettingsQuery } from '../../services/settings';\nimport { buildItemLocations, type ItemLocations } from '../../utils/itemLocations';\nimport { getTranslationKey } from '../../utils/translations';\n\nimport {\n AssetDetailsDrawer,\n useAssetDetailsParam,\n} from './components/AssetDetails/AssetDetailsDrawer';\nimport { AssetsGrid } from './components/AssetsGrid';\nimport { AssetsSearchInput } from './components/AssetsSearchInput';\nimport { AssetsTable } from './components/AssetsTable';\nimport { BulkActionsBar } from './components/BulkActionsBar';\nimport { AssetsDndProvider } from './components/Dnd/AssetsDndProvider';\nimport { DropFilesMessage, DropZoneWithOverlay } from './components/DropZone/UploadDropZone';\nimport { UploadDropZoneProvider } from './components/DropZone/UploadDropZoneContext';\nimport { EmptyState, FilteredEmptyState } from './components/EmptyState';\nimport { FilterBadges } from './components/FilterBadges';\nimport { FilterMenu } from './components/FilterMenu';\nimport { FolderFormDialog } from './components/FolderFormDialog';\nimport { FolderTree } from './components/FolderTree/FolderTree';\nimport { ImportFromUrlDialog } from './components/ImportFromUrlDialog';\nimport { SortMenu } from './components/SortMenu';\nimport { localStorageKeys, viewOptions } from './constants';\nimport { useAssetSearch } from './hooks/useAssetSearch';\nimport { AssetSelectionProvider, useAssetSelection } from './hooks/useAssetSelection';\nimport { BusyAssetsProvider } from './hooks/useBusyAssets';\nimport { useFolderInfo } from './hooks/useFolderInfo';\nimport { useFolderNavigation } from './hooks/useFolderNavigation';\nimport { useInfiniteAssets } from './hooks/useInfiniteAssets';\nimport { useInfiniteScrollSentinel } from './hooks/useInfiniteScrollSentinel';\nimport { useListFilters } from './hooks/useListFilters';\nimport { useListSort, type FoldersPosition } from './hooks/useListSort';\nimport { buildAssetFilters } from './utils/buildAssetFilters';\nimport { getListQueryKey } from './utils/listQueryKey';\nimport { mergeMixedList } from './utils/mergeMixedList';\nimport { buildRenderedKeys } from './utils/renderedKeys';\n\nimport type { File, UploadFileInfo } from '../../../../../shared/contracts/files';\nimport type { Folder } from '../../../../../shared/contracts/folders';\n\n// The negative bottom margin shrinks the trigger area by a pixel so the 1px\n// sentinel sitting exactly at the fold (when a page's rows happen to fill the\n// viewport) reads as \"not visible\" and doesn't pull an extra page. It still\n// triggers as soon as the sentinel scrolls a hair into view. Tune the bottom\n// value if the list over- or under-fetches near the fold.\nconst INTERSECTION_OPTIONS: IntersectionObserverInit = {\n threshold: 0,\n rootMargin: '0px 0px -1px 0px',\n};\n\n// Module-level so the header sentinel's observer isn't rebuilt every render.\nconst HEADER_SENTINEL_OPTIONS: IntersectionObserverInit = { threshold: 0 };\n\nconst ITEM_COUNT_MESSAGE = {\n id: getTranslationKey('header.content.item-count'),\n defaultMessage: '{count, plural, =1 {# item} other {# items}}',\n};\n\nconst SEARCH_RESULTS_COUNT_MESSAGES = {\n both: {\n id: getTranslationKey('header.search-results.count'),\n defaultMessage:\n '{numberFolders, plural, one {1 folder} other {# folders}} - {numberAssets, plural, one {1 asset} other {# assets}}',\n },\n folders: {\n id: getTranslationKey('header.search-results.count.folders'),\n defaultMessage: '{numberFolders, plural, one {1 folder} other {# folders}}',\n },\n assets: {\n id: getTranslationKey('header.search-results.count.assets'),\n defaultMessage: '{numberAssets, plural, =0 {0 assets} one {1 asset} other {# assets}}',\n },\n};\n\nconst getSearchResultsCountMessage = (numberFolders: number, numberAssets: number) => {\n if (numberFolders === 0) {\n return SEARCH_RESULTS_COUNT_MESSAGES.assets;\n }\n\n if (numberAssets === 0) {\n return SEARCH_RESULTS_COUNT_MESSAGES.folders;\n }\n\n return SEARCH_RESULTS_COUNT_MESSAGES.both;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * AssetsView\n * -----------------------------------------------------------------------------------------------*/\n\ninterface AssetsViewProps {\n view: number;\n folders: Folder[];\n isLoadingFolders: boolean;\n assets: File[];\n isLoadingAssets: boolean;\n isFetchingMore: boolean;\n hasNextPage: boolean;\n fetchNextPage: () => void;\n error: unknown;\n locations: ItemLocations;\n searchQuery: string;\n assetsSort: string;\n foldersPosition: FoldersPosition;\n hasActiveFilters: boolean;\n onClearFilters: () => void;\n onAssetItemClick: (assetId: number) => void;\n onAddAssets: () => void;\n canAddAssets: boolean;\n onClearSearch: () => void;\n}\n\nconst AssetsView = ({\n view,\n folders,\n isLoadingFolders,\n assets,\n isLoadingAssets,\n isFetchingMore,\n hasNextPage,\n fetchNextPage,\n error,\n locations,\n searchQuery,\n assetsSort,\n foldersPosition,\n hasActiveFilters,\n onClearFilters,\n onAssetItemClick,\n onAddAssets,\n canAddAssets,\n onClearSearch,\n}: AssetsViewProps) => {\n const { formatMessage } = useIntl();\n\n const isGridView = view === viewOptions.GRID;\n const isLoading = isLoadingAssets || isLoadingFolders;\n\n // \"Folders: Mixed with files\" — interleave the complete folder list into the\n // loaded asset stream client-side, following the active sort. Table view\n // only: the grid always keeps folders in their own band on top.\n const mixedItems = useMemo(\n () =>\n foldersPosition === 'mixed' && !isGridView\n ? mergeMixedList({ folders, assets, sort: assetsSort, hasNextPage })\n : null,\n [foldersPosition, isGridView, folders, assets, assetsSort, hasNextPage]\n );\n\n // Derived once here so the table, the grid and the bulk bar all agree on what\n // is on screen — in mixed mode that is not simply every folder.\n const renderedKeys = buildRenderedKeys({ folders, assets, mixedItems });\n\n const loadMoreRef = useInfiniteScrollSentinel({\n hasNextPage,\n isFetchingMore,\n onLoadMore: fetchNextPage,\n options: INTERSECTION_OPTIONS,\n });\n\n if (isLoading) {\n return (\n <Flex justifyContent=\"center\" padding={8}>\n <Loader>{formatMessage({ id: 'app.loading', defaultMessage: 'Loading...' })}</Loader>\n </Flex>\n );\n }\n\n if (error) {\n return (\n <Box padding={8}>\n <Typography textColor=\"danger600\">\n {formatMessage({\n id: getTranslationKey('list.assets.error'),\n defaultMessage: 'An error occurred while fetching assets.',\n })}\n </Typography>\n </Box>\n );\n }\n\n if (folders.length === 0 && assets.length === 0) {\n // While searching, the search empty state wins (it names the query); a\n // filter-only dead end gets the filtered variant with its Clear action.\n return hasActiveFilters && !searchQuery ? (\n <FilteredEmptyState onClearFilters={onClearFilters} />\n ) : (\n <EmptyState\n onAddAssets={onAddAssets}\n canAddAssets={canAddAssets}\n searchQuery={searchQuery}\n onClearSearch={onClearSearch}\n />\n );\n }\n return (\n <>\n {isGridView ? (\n <AssetsGrid\n folders={folders}\n assets={assets}\n renderedKeys={renderedKeys}\n onAssetItemClick={onAssetItemClick}\n />\n ) : (\n <AssetsTable\n assets={assets}\n folders={folders}\n mixedItems={mixedItems}\n renderedKeys={renderedKeys}\n onAssetItemClick={onAssetItemClick}\n />\n )}\n <div ref={loadMoreRef} style={{ height: 1 }} />\n {isFetchingMore && (\n <Flex justifyContent=\"center\" padding={4}>\n <Loader>\n {formatMessage({\n id: getTranslationKey('list.assets.loading-more'),\n defaultMessage: 'Loading more assets...',\n })}\n </Loader>\n </Flex>\n )}\n {/* Lives here rather than in `AssetsPage` so it can read the loaded\n assets: the AI metadata action needs their mime types to know what\n the provider can handle. `position: fixed` keeps it visually anchored\n regardless of where it sits in the tree. */}\n <BulkActionsBar assets={assets} renderedKeys={renderedKeys} locations={locations} />\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ClearSelectionOnChange\n *\n * Selection is list-scoped: it resets when the user is looking at a different list.\n * The list fingerprint is getListQueryKey() — folder, search, sort, filter.\n *\n * Hybrid rule: infinite scroll does not change the key (selection persists), and\n * neither does the table/grid toggle — both views render the same list.\n * Search/sort/filter changes do (selection clears) — same mental model as folder nav.\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ClearSelectionOnChangeProps {\n listQueryKey: string;\n}\n\nconst ClearSelectionOnChange = ({ listQueryKey }: ClearSelectionOnChangeProps) => {\n const { clear } = useAssetSelection();\n\n useEffect(() => {\n clear();\n }, [listQueryKey, clear]);\n\n return null;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * AssetsPage\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Mirrors the design-system Toggle look (grey track, white active segment\n * card) — reproduced locally because the DS component is a labels-only\n * boolean input (no icons) and paints its left segment in danger red. Here\n * both segments use the primary blue when active.\n */\nconst StyledToggleGroup = styled(ToggleGroup.Root)`\n display: flex;\n padding: ${({ theme }) => theme.spaces[1]};\n background: ${({ theme }) => theme.colors.neutral100};\n border: 1px solid ${({ theme }) => theme.colors.neutral200};\n border-radius: ${({ theme }) => theme.borderRadius};\n`;\n\nconst StyledToggleItem = styled(ToggleGroup.Item)`\n display: flex;\n flex: 1 1 50%;\n align-items: center;\n justify-content: center;\n gap: ${({ theme }) => theme.spaces[2]};\n padding: 0.6rem ${({ theme }) => theme.spaces[3]};\n border: 1px solid transparent;\n border-radius: ${({ theme }) => theme.borderRadius};\n background: transparent;\n color: ${({ theme }) => theme.colors.neutral600};\n cursor: pointer;\n font-size: ${({ theme }) => theme.fontSizes[1]};\n font-weight: ${({ theme }) => theme.fontWeights.semiBold};\n white-space: nowrap;\n\n &:hover {\n color: ${({ theme }) => theme.colors.neutral700};\n }\n\n &[data-state='on'] {\n background: ${({ theme }) => theme.colors.neutral0};\n border-color: ${({ theme }) => theme.colors.neutral200};\n color: ${({ theme }) => theme.colors.primary600};\n }\n\n svg {\n width: 1.6rem;\n height: 1.6rem;\n }\n`;\n\n// A single sticky header — same layout scrolled or not, so the toolbar\n// alignment can't reflow the way the shared sticky header did. Once the list\n// scrolls under it, it shrinks (reduced vertical padding + a shadow to lift it\n// off the rows), like the sticky headers elsewhere in the admin. Horizontal\n// padding stays responsive (passed as props); only the vertical rhythm + shadow\n// change here so they can animate.\nconst StickyHeader = styled(Box)<{ $compact: boolean }>`\n position: sticky;\n top: 0;\n z-index: 2;\n /* Transparent at rest (the grey page shows through); an opaque background +\n shadow appear only once it sticks and content scrolls under it. */\n background: transparent;\n /* Horizontal padding matches the list's default spacing (Layouts.Content /\n RESPONSIVE_DEFAULT_SPACING: 4 / 6 / 10) so the header lines up with the rows. */\n padding: ${({ theme }) => `${theme.spaces[6]} ${theme.spaces[4]}`};\n transition:\n padding 0.2s ease,\n background 0.2s ease,\n box-shadow 0.2s ease;\n\n ${({ theme }) => theme.breakpoints.medium} {\n padding-left: ${({ theme }) => theme.spaces[6]};\n padding-right: ${({ theme }) => theme.spaces[6]};\n }\n ${({ theme }) => theme.breakpoints.large} {\n padding-left: ${({ theme }) => theme.spaces[10]};\n padding-right: ${({ theme }) => theme.spaces[10]};\n }\n\n /* Compacting is scoped to medium and up, where the header actually sticks. On\n mobile it scrolls away with the list, so shrinking it mid-scroll animated a\n header the user could no longer see — the transition read as a glitch on the\n way back up rather than as the header settling. */\n ${({ $compact, theme }) =>\n $compact &&\n css`\n ${theme.breakpoints.medium} {\n padding-top: ${theme.spaces[3]};\n padding-bottom: ${theme.spaces[3]};\n padding-left: ${theme.spaces[4]};\n padding-right: ${theme.spaces[4]};\n background: ${theme.colors.neutral0};\n box-shadow: ${theme.shadows.tableShadow};\n }\n ${theme.breakpoints.large} {\n padding-left: ${theme.spaces[6]};\n padding-right: ${theme.spaces[6]};\n }\n `}\n`;\n\n// New button aligns with the title, not the toolbar.\nconst TitleRow = styled(Flex)`\n justify-content: space-between;\n align-items: flex-start;\n gap: ${({ theme }) => theme.spaces[4]};\n\n h1 {\n font-size: 1.8rem;\n }\n`;\n\n// Two groups in source order (Filter, Search / Sort, Toggle). Mobile: stacked —\n// Filter+Search on row 1, Sort+Toggle on row 2. Desktop (large+): one row,\n// Filter+Search on the left, Sort+Toggle pushed right.\nconst Toolbar = styled(Flex)<{ $compact: boolean }>`\n margin-top: ${({ theme }) => theme.spaces[5]};\n flex-direction: column;\n align-items: stretch;\n gap: ${({ theme }) => theme.spaces[3]};\n transition: margin-top 0.2s ease;\n\n /* Tightening the gap to the title belongs to the compact header, so it is\n scoped to the breakpoints that compact. On mobile the header never sticks,\n and this was the last thing still shifting as the page scrolled. */\n ${({ $compact, theme }) =>\n $compact &&\n css`\n ${theme.breakpoints.medium} {\n margin-top: ${theme.spaces[2]};\n }\n `}\n\n ${({ theme }) => theme.breakpoints.large} {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n`;\n\nconst ToolbarGroup = styled(Flex)`\n align-items: center;\n gap: ${({ theme }) => theme.spaces[3]};\n`;\n\n// Filter + Search. On mobile the group fills the row (search grows into it);\n// on desktop it keeps its intrinsic size and sits at the left edge.\nconst FilterSearchGroup = styled(ToolbarGroup)``;\n\n// Sort + Toggle. Mobile: spread across the row (Sort left, Toggle right).\n// Desktop: sit together at the right edge (space-between on the toolbar leaves\n// the empty space between the search and here).\nconst SortToggleGroup = styled(ToolbarGroup)`\n justify-content: space-between;\n\n ${({ theme }) => theme.breakpoints.large} {\n justify-content: flex-end;\n flex: 0 0 auto;\n }\n`;\n\n// Fills the row on mobile; intrinsic width on desktop.\nconst SearchSlot = styled(Box)`\n flex: 1;\n\n ${({ theme }) => theme.breakpoints.large} {\n flex: 0 1 auto;\n }\n`;\n\n// Toggle labels are hidden below desktop — icons only (buttons keep aria-label).\nconst ToggleLabel = styled.span`\n display: none;\n\n ${({ theme }) => theme.breakpoints.large} {\n display: inline;\n }\n`;\n\nexport const AssetsPage = () => {\n const { formatMessage } = useIntl();\n const { openDetails } = useAssetDetailsParam();\n const { canCreate, canUpdate } = useMediaLibraryPermissions();\n\n const { currentFolderId, navigateToFolderId, navigateToRoot } = useFolderNavigation();\n // Deleted or missing folders (404) need a fetch — handled here, not in\n // `useFolderNavigation` (which only strips malformed ?folder= values).\n const { error: currentFolderError } = useGetFolderQuery(\n { id: currentFolderId! },\n { skip: currentFolderId === null }\n );\n\n useEffect(() => {\n if (currentFolderError?.name === 'NotFoundError') {\n navigateToRoot();\n }\n }, [currentFolderError, navigateToRoot]);\n const { title, itemCount } = useFolderInfo(currentFolderId);\n\n const { searchQuery, isSearching, clearSearch } = useAssetSearch();\n const listSort = useListSort();\n const listFilters = useListFilters();\n\n // Resolve relative presets against \"now\" only when the filters change —\n // keeps the query args (and RTK cache keys) stable between renders.\n const builtFilters = useMemo(\n () => buildAssetFilters(listFilters.filters, new Date()),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- serialized is the value identity of filters\n [listFilters.serialized]\n );\n\n const {\n assets,\n subscribers: assetPageSubscribers,\n pagination,\n isLoading: isLoadingAssets,\n isFetchingMore,\n hasNextPage,\n fetchNextPage,\n error: assetsError,\n } = useInfiniteAssets({\n // The real folder is passed even while searching: the service drops the folder\n // filter when `search` is set, so results are still global. List filters\n // compose with both modes.\n folder: currentFolderId,\n search: searchQuery || undefined,\n sort: listSort.assetsSort,\n filters: builtFilters.fileClauses,\n enabled: builtFilters.showFiles,\n });\n\n const { data: fetchedFolders = [], isLoading: isLoadingFolders } = useGetFoldersQuery(\n {\n parentId: currentFolderId,\n search: searchQuery || undefined,\n sort: listSort.foldersSort,\n filters: builtFilters.folderClauses,\n },\n { skip: !builtFilters.showFolders }\n );\n // A type badge can exclude folders structurally (e.g. \"Type is Picture\").\n const folders = useMemo(\n () => (builtFilters.showFolders ? fetchedFolders : []),\n [builtFilters.showFolders, fetchedFolders]\n );\n\n // Both move affordances (drag and the bulk bar) resolve each item's parent\n // from the rows on screen — while searching, results are global and the\n // folder currently open says nothing about where an item lives.\n const itemLocations = useMemo(() => buildItemLocations(assets, folders), [assets, folders]);\n\n const itemCountLabel = formatMessage(ITEM_COUNT_MESSAGE, { count: itemCount });\n\n const searchResultsTitle = formatMessage(\n {\n id: getTranslationKey('header.search-results'),\n defaultMessage: 'Search results for \"{query}\"',\n },\n { query: searchQuery }\n );\n const numberFolders = folders.length;\n const numberAssets = pagination?.total ?? 0;\n\n const searchResultsCountLabel = formatMessage(\n getSearchResultsCountMessage(numberFolders, numberAssets),\n { numberFolders, numberAssets }\n );\n\n let pageHeaderTitle: string;\n if (isSearching) {\n pageHeaderTitle = `${searchResultsTitle} (${searchResultsCountLabel})`;\n } else if (title) {\n pageHeaderTitle = `${title} (${itemCountLabel})`;\n } else {\n pageHeaderTitle = formatMessage({ id: 'app.loading', defaultMessage: 'Loading...' });\n }\n\n const [isCreateFolderDialogOpen, setIsCreateFolderDialogOpen] = useState(false);\n\n // View state\n const [view, setView] = usePersistentState(localStorageKeys.view, viewOptions.GRID);\n const isGridView = view === viewOptions.GRID;\n\n // Dialog state\n const [isUrlDialogOpen, setIsUrlDialogOpen] = useState(false);\n\n // Refs\n const fileInputRef = useRef<HTMLInputElement>(null);\n const uploadDropZoneRef = useRef<HTMLDivElement>(null);\n\n // Shrink the sticky header once the list scrolls beneath it. A zero-height\n // sentinel sits at the very top of the scroll content; when it leaves the\n // viewport we're scrolled → compact.\n const [isHeaderCompact, setIsHeaderCompact] = useState(false);\n const onHeaderSentinelVisibility = useCallback(\n (isVisible: boolean) => setIsHeaderCompact(!isVisible),\n []\n );\n const headerSentinelRef = useElementOnScreen<HTMLDivElement>(\n onHeaderSentinelVisibility,\n HEADER_SENTINEL_OPTIONS\n );\n\n // Upload handlers\n const [uploadFiles] = useUploadFilesMutation();\n const [uploadFromUrls] = useUploadFromUrlsMutation();\n // `concurrentUploadRequests` echoes the app config. Missing settings (still\n // loading, no permission) fall back to sequential — never faster than the\n // server asked for.\n const { data: settings } = useGetUploadSettingsQuery();\n const concurrency = settings?.data?.concurrentUploadRequests ?? 1;\n // Drives the post-upload AI metadata phase shown per row in the progress\n // dialog. No mime argument: the files are not known until they are picked,\n // and the server filters the batch on the same allowlist anyway.\n const isAiMetadataEnabled = useAIMetadataEnabled();\n const { trackUsage } = useTracking();\n\n const uploadFilesToFolder = async (files: globalThis.File[], folderId: number | null) => {\n if (files.length === 0) return;\n\n // Mirror the legacy `willAddMediaLibraryAssets` payload: the count of files\n // about to upload, broken down by asset type.\n const assetsCountByType = files.reduce<Record<string, number>>((acc, file) => {\n const type = typeFromMime(file.type);\n acc[type] = (acc[type] ?? 0) + 1;\n return acc;\n }, {});\n trackUsage('willAddMediaLibraryAssets', {\n location: MEDIA_LIBRARY_LOCATION,\n ...assetsCountByType,\n });\n\n const formData = new FormData();\n const fileInfoArray: UploadFileInfo[] = [];\n\n files.forEach((file) => {\n formData.append('files', file);\n fileInfoArray.push({\n name: file.name,\n caption: null,\n alternativeText: null,\n folder: folderId,\n });\n });\n\n formData.append('fileInfo', JSON.stringify(fileInfoArray));\n try {\n await uploadFiles({\n formData,\n totalFiles: files.length,\n concurrency,\n generateAiMetadata: Boolean(isAiMetadataEnabled),\n }).unwrap();\n } catch {\n // Error is already dispatched to store from the API queryFn\n }\n };\n\n const handleFileSelect = () => {\n fileInputRef.current?.click();\n };\n\n const handleFileChange = async (e: ChangeEvent<HTMLInputElement>) => {\n const files = e.target.files;\n if (files && files.length > 0) {\n trackUsage('didSelectFile', { source: 'computer', location: MEDIA_LIBRARY_LOCATION });\n await uploadFilesToFolder(Array.from(files), currentFolderId);\n }\n e.target.value = '';\n };\n\n const handleDrop = async (files: globalThis.File[]) => {\n // Defence in depth: the provider is `disabled` without `assets.create`\n // (so onDrop won't fire), but guard here too in case it's ever wired live.\n if (!canCreate) return;\n trackUsage('didSelectFile', { source: 'computer', location: MEDIA_LIBRARY_LOCATION });\n await uploadFilesToFolder(files, currentFolderId);\n };\n\n const handleUrlUpload = async (urls: string[]) => {\n trackUsage('didSelectFile', { source: 'url', location: MEDIA_LIBRARY_LOCATION });\n // Counts-by-type aren't available client-side for the URL flow (the server\n // fetches the files), so this fires the event with location only.\n trackUsage('willAddMediaLibraryAssets', { location: MEDIA_LIBRARY_LOCATION });\n try {\n await uploadFromUrls({\n urls,\n folderId: currentFolderId,\n generateAiMetadata: Boolean(isAiMetadataEnabled),\n }).unwrap();\n } catch {\n // Error is already dispatched to store from the API queryFn\n }\n };\n\n // The view is deliberately absent: table and grid render the same list, so\n // toggling views keeps the selection.\n const listQueryKey = getListQueryKey({\n folderId: currentFolderId,\n search: searchQuery,\n // Folder position changes the render order too — selection must reset.\n sort: `${listSort.assetsSort};folders=${listSort.foldersPosition}`,\n filter: listFilters.serialized || null,\n });\n\n return (\n <>\n <UploadDropZoneProvider onDrop={handleDrop} disabled={!canCreate}>\n <AssetSelectionProvider disabled={!canUpdate}>\n <BusyAssetsProvider>\n <AssetsDndProvider locations={itemLocations}>\n <ClearSelectionOnChange listQueryKey={listQueryKey} />\n <Layouts.Root\n sideNav={\n <FolderTree\n currentFolderId={currentFolderId}\n showActiveFolder={!isSearching}\n onSelectFolder={navigateToFolderId}\n />\n }\n >\n <Page.Main>\n <Box ref={uploadDropZoneRef}>\n <VisuallyHidden>\n <input type=\"file\" ref={fileInputRef} onChange={handleFileChange} multiple />\n </VisuallyHidden>\n\n {/* Zero-height marker: leaves the viewport as soon as the list\n scrolls, flipping the header into its compact state. */}\n <Box ref={headerSentinelRef} height={0} aria-hidden />\n\n <StickyHeader $compact={isHeaderCompact}>\n <TitleRow>\n <Typography variant=\"alpha\" tag=\"h1\">\n {pageHeaderTitle}\n </Typography>\n {canCreate && (\n <SimpleMenu\n popoverPlacement=\"bottom-end\"\n variant=\"default\"\n endIcon={<ChevronDown />}\n label={formatMessage({\n id: getTranslationKey('new'),\n defaultMessage: 'New',\n })}\n >\n <MenuItem\n onSelect={() => setIsCreateFolderDialogOpen(true)}\n startIcon={<FolderIcon />}\n >\n {formatMessage({\n id: getTranslationKey('folder.create.title'),\n defaultMessage: 'New folder',\n })}\n </MenuItem>\n <MenuItem onSelect={handleFileSelect} startIcon={<Files />}>\n {formatMessage({\n id: getTranslationKey('import-files'),\n defaultMessage: 'Import files',\n })}\n </MenuItem>\n <MenuItem\n onSelect={() => setIsUrlDialogOpen(true)}\n startIcon={<Link />}\n >\n {formatMessage({\n id: getTranslationKey('import-from-url'),\n defaultMessage: 'Import from URL',\n })}\n </MenuItem>\n </SimpleMenu>\n )}\n </TitleRow>\n\n <Toolbar $compact={isHeaderCompact}>\n <FilterSearchGroup>\n <Box>\n <FilterMenu listFilters={listFilters} />\n </Box>\n <SearchSlot>\n <AssetsSearchInput />\n </SearchSlot>\n </FilterSearchGroup>\n <SortToggleGroup>\n <Box>\n <SortMenu sort={listSort} showFoldersGroup={!isGridView} />\n </Box>\n <StyledToggleGroup\n type=\"single\"\n value={isGridView ? 'grid' : 'table'}\n onValueChange={(value) =>\n value &&\n setView(value === 'grid' ? viewOptions.GRID : viewOptions.TABLE)\n }\n aria-label={formatMessage({\n id: getTranslationKey('view.switch.label'),\n defaultMessage: 'View options',\n })}\n >\n <StyledToggleItem\n value=\"table\"\n aria-label={formatMessage({\n id: getTranslationKey('view.table'),\n defaultMessage: 'Table view',\n })}\n >\n <List />\n <ToggleLabel>\n {formatMessage({\n id: getTranslationKey('view.table'),\n defaultMessage: 'Table view',\n })}\n </ToggleLabel>\n </StyledToggleItem>\n <StyledToggleItem\n value=\"grid\"\n aria-label={formatMessage({\n id: getTranslationKey('view.grid'),\n defaultMessage: 'Grid view',\n })}\n >\n <GridIcon />\n <ToggleLabel>\n {formatMessage({\n id: getTranslationKey('view.grid'),\n defaultMessage: 'Grid view',\n })}\n </ToggleLabel>\n </StyledToggleItem>\n </StyledToggleGroup>\n </SortToggleGroup>\n </Toolbar>\n\n <FilterBadges listFilters={listFilters} compact={isHeaderCompact} />\n </StickyHeader>\n\n <Layouts.Content>\n <BetaNotice />\n {/* Renders nothing — keeps every loaded page's query subscribed\n so a rename/delete refreshes the whole list. */}\n {assetPageSubscribers}\n <DropZoneWithOverlay>\n <DropFilesMessage\n uploadDropZoneRef={uploadDropZoneRef}\n folderName={title}\n />\n <AssetsView\n view={view}\n folders={folders}\n isLoadingFolders={isLoadingFolders}\n assets={assets}\n isLoadingAssets={isLoadingAssets}\n isFetchingMore={isFetchingMore}\n hasNextPage={hasNextPage}\n fetchNextPage={fetchNextPage}\n error={assetsError}\n locations={itemLocations}\n searchQuery={searchQuery}\n assetsSort={listSort.assetsSort}\n foldersPosition={listSort.foldersPosition}\n hasActiveFilters={listFilters.filters.length > 0}\n onClearFilters={listFilters.clearFilters}\n onAssetItemClick={openDetails}\n onAddAssets={handleFileSelect}\n canAddAssets={canCreate}\n onClearSearch={clearSearch}\n />\n </DropZoneWithOverlay>\n </Layouts.Content>\n </Box>\n </Page.Main>\n </Layouts.Root>\n </AssetsDndProvider>\n </BusyAssetsProvider>\n </AssetSelectionProvider>\n </UploadDropZoneProvider>\n <FolderFormDialog\n open={isCreateFolderDialogOpen}\n mode=\"create\"\n parentFolderName={title}\n parentFolderId={currentFolderId}\n onClose={() => setIsCreateFolderDialogOpen(false)}\n />\n <ImportFromUrlDialog\n open={isUrlDialogOpen}\n onClose={() => setIsUrlDialogOpen(false)}\n onUpload={handleUrlUpload}\n />\n <AssetDetailsDrawer />\n </>\n );\n};\n"],"names":["INTERSECTION_OPTIONS","threshold","rootMargin","HEADER_SENTINEL_OPTIONS","ITEM_COUNT_MESSAGE","id","getTranslationKey","defaultMessage","SEARCH_RESULTS_COUNT_MESSAGES","both","folders","assets","getSearchResultsCountMessage","numberFolders","numberAssets","AssetsView","view","isLoadingFolders","isLoadingAssets","isFetchingMore","hasNextPage","fetchNextPage","error","locations","searchQuery","assetsSort","foldersPosition","hasActiveFilters","onClearFilters","onAssetItemClick","onAddAssets","canAddAssets","onClearSearch","formatMessage","useIntl","isGridView","viewOptions","GRID","isLoading","mixedItems","useMemo","mergeMixedList","sort","renderedKeys","buildRenderedKeys","loadMoreRef","useInfiniteScrollSentinel","onLoadMore","options","_jsx","Flex","justifyContent","padding","Loader","Box","Typography","textColor","length","FilteredEmptyState","EmptyState","_jsxs","_Fragment","AssetsGrid","AssetsTable","div","ref","style","height","BulkActionsBar","ClearSelectionOnChange","listQueryKey","clear","useAssetSelection","useEffect","StyledToggleGroup","styled","ToggleGroup","Root","theme","spaces","colors","neutral100","neutral200","borderRadius","StyledToggleItem","Item","neutral600","fontSizes","fontWeights","semiBold","neutral700","neutral0","primary600","StickyHeader","breakpoints","medium","large","$compact","css","shadows","tableShadow","TitleRow","Toolbar","ToolbarGroup","FilterSearchGroup","SortToggleGroup","SearchSlot","ToggleLabel","span","AssetsPage","openDetails","useAssetDetailsParam","canCreate","canUpdate","useMediaLibraryPermissions","currentFolderId","navigateToFolderId","navigateToRoot","useFolderNavigation","currentFolderError","useGetFolderQuery","skip","name","title","itemCount","useFolderInfo","isSearching","clearSearch","useAssetSearch","listSort","useListSort","listFilters","useListFilters","builtFilters","buildAssetFilters","filters","Date","serialized","subscribers","assetPageSubscribers","pagination","assetsError","useInfiniteAssets","folder","search","undefined","fileClauses","enabled","showFiles","data","fetchedFolders","useGetFoldersQuery","parentId","foldersSort","folderClauses","showFolders","itemLocations","buildItemLocations","itemCountLabel","count","searchResultsTitle","query","total","searchResultsCountLabel","pageHeaderTitle","isCreateFolderDialogOpen","setIsCreateFolderDialogOpen","useState","setView","usePersistentState","localStorageKeys","isUrlDialogOpen","setIsUrlDialogOpen","fileInputRef","useRef","uploadDropZoneRef","isHeaderCompact","setIsHeaderCompact","onHeaderSentinelVisibility","useCallback","isVisible","headerSentinelRef","useElementOnScreen","uploadFiles","useUploadFilesMutation","uploadFromUrls","useUploadFromUrlsMutation","settings","useGetUploadSettingsQuery","concurrency","concurrentUploadRequests","isAiMetadataEnabled","useAIMetadataEnabled","trackUsage","useTracking","uploadFilesToFolder","files","folderId","assetsCountByType","reduce","acc","file","type","typeFromMime","location","MEDIA_LIBRARY_LOCATION","formData","FormData","fileInfoArray","forEach","append","push","caption","alternativeText","JSON","stringify","totalFiles","generateAiMetadata","Boolean","unwrap","handleFileSelect","current","click","handleFileChange","e","target","source","Array","from","value","handleDrop","handleUrlUpload","urls","getListQueryKey","filter","UploadDropZoneProvider","onDrop","disabled","AssetSelectionProvider","BusyAssetsProvider","AssetsDndProvider","Layouts","sideNav","FolderTree","showActiveFolder","onSelectFolder","Page","Main","VisuallyHidden","input","onChange","multiple","aria-hidden","variant","tag","SimpleMenu","popoverPlacement","endIcon","ChevronDown","label","MenuItem","onSelect","startIcon","FolderIcon","Files","Link","FilterMenu","AssetsSearchInput","SortMenu","showFoldersGroup","onValueChange","TABLE","aria-label","List","GridIcon","FilterBadges","compact","Content","BetaNotice","DropZoneWithOverlay","DropFilesMessage","folderName","clearFilters","FolderFormDialog","open","mode","parentFolderName","parentFolderId","onClose","ImportFromUrlDialog","onUpload","AssetDetailsDrawer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA;AACA;AACA;AACA;AACA;AACA,MAAMA,oBAAAA,GAAiD;IACrDC,SAAAA,EAAW,CAAA;IACXC,UAAAA,EAAY;AACd,CAAA;AAEA;AACA,MAAMC,uBAAAA,GAAoD;IAAEF,SAAAA,EAAW;AAAE,CAAA;AAEzE,MAAMG,kBAAAA,GAAqB;AACzBC,IAAAA,EAAAA,EAAIC,8BAAAA,CAAkB,2BAAA,CAAA;IACtBC,cAAAA,EAAgB;AAClB,CAAA;AAEA,MAAMC,6BAAAA,GAAgC;IACpCC,IAAAA,EAAM;AACJJ,QAAAA,EAAAA,EAAIC,8BAAAA,CAAkB,6BAAA,CAAA;QACtBC,cAAAA,EACE;AACJ,KAAA;IACAG,OAAAA,EAAS;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ACxC7P,gBAAAA,EAAkBiF,WAAAA;oEAClBhF,WAAAA,EAAa8L,gBAAAA;oEACb7L,YAAAA,EAAciF,SAAAA;oEACdhF,aAAAA,EAAe+F;;;;;;;;;;;;;;;0BAWnC9E,cAAA,CAAC0O,iCAAAA,EAAAA;gBACCC,IAAAA,EAAMvH,wBAAAA;gBACNwH,IAAAA,EAAK,QAAA;gBACLC,gBAAAA,EAAkBnK,KAAAA;gBAClBoK,cAAAA,EAAgB5K,eAAAA;AAChB6K,gBAAAA,OAAAA,EAAS,IAAM1H,2BAAAA,CAA4B,KAAA;;0BAE7CrH,cAAA,CAACgP,uCAAAA,EAAAA;gBACCL,IAAAA,EAAMjH,eAAAA;AACNqH,gBAAAA,OAAAA,EAAS,IAAMpH,kBAAAA,CAAmB,KAAA,CAAA;gBAClCsH,QAAAA,EAAU3D;;0BAEZtL,cAAA,CAACkP,qCAAAA,EAAAA,EAAAA;;;AAGP;;;;"}
|
|
1
|
+
{"version":3,"file":"AssetsPage.js","sources":["../../../../../admin/src/future/pages/Assets/AssetsPage.tsx"],"sourcesContent":["import { useRef, useCallback, useMemo, useState, useEffect, type ChangeEvent } from 'react';\n\nimport * as ToggleGroup from '@radix-ui/react-toggle-group';\nimport { Layouts, Page, useElementOnScreen, usePersistentState } from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Flex,\n Loader,\n MenuItem,\n SimpleMenu,\n Typography,\n VisuallyHidden,\n} from '@strapi/design-system';\nimport {\n ChevronDown,\n Files,\n Folder as FolderIcon,\n GridFour as GridIcon,\n Link,\n List,\n} from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { styled, css } from 'styled-components';\n\nimport { typeFromMime } from '../../../utils/typeFromMime';\nimport { BetaNotice } from '../../components/BetaNotice';\nimport { useAIMetadataEnabled } from '../../hooks/useAIMetadataEnabled';\nimport { useMediaLibraryPermissions } from '../../hooks/useMediaLibraryPermissions';\nimport { useTracking, MEDIA_LIBRARY_LOCATION } from '../../hooks/useTracking';\nimport { useUploadFromUrlsMutation, useUploadFilesMutation } from '../../services/api';\nimport { useGetFolderQuery, useGetFoldersQuery } from '../../services/folders';\nimport { useGetUploadSettingsQuery } from '../../services/settings';\nimport { buildItemLocations, type ItemLocations } from '../../utils/itemLocations';\nimport { getTranslationKey } from '../../utils/translations';\n\nimport {\n AssetDetailsDrawer,\n useAssetDetailsParam,\n} from './components/AssetDetails/AssetDetailsDrawer';\nimport { AssetsGrid } from './components/AssetsGrid';\nimport { AssetsSearchInput } from './components/AssetsSearchInput';\nimport { AssetsTable } from './components/AssetsTable';\nimport { BulkActionsBar } from './components/BulkActionsBar';\nimport { AssetsDndProvider } from './components/Dnd/AssetsDndProvider';\nimport { DropFilesMessage, DropZoneWithOverlay } from './components/DropZone/UploadDropZone';\nimport { UploadDropZoneProvider } from './components/DropZone/UploadDropZoneContext';\nimport { EmptyState, FilteredEmptyState } from './components/EmptyState';\nimport { FilterBadges } from './components/FilterBadges';\nimport { FilterMenu } from './components/FilterMenu';\nimport { FolderFormDialog } from './components/FolderFormDialog';\nimport { FolderTree } from './components/FolderTree/FolderTree';\nimport { ImportFromUrlDialog } from './components/ImportFromUrlDialog';\nimport { MainAreaContextMenu } from './components/MainAreaContextMenu';\nimport { SortMenu } from './components/SortMenu';\nimport { localStorageKeys, viewOptions } from './constants';\nimport { useAssetSearch } from './hooks/useAssetSearch';\nimport { AssetSelectionProvider, useAssetSelection } from './hooks/useAssetSelection';\nimport { BusyAssetsProvider } from './hooks/useBusyAssets';\nimport { useFolderInfo } from './hooks/useFolderInfo';\nimport { useFolderNavigation } from './hooks/useFolderNavigation';\nimport { useInfiniteAssets } from './hooks/useInfiniteAssets';\nimport { useInfiniteScrollSentinel } from './hooks/useInfiniteScrollSentinel';\nimport { useListFilters } from './hooks/useListFilters';\nimport { useListScrollRestoration } from './hooks/useListScrollRestoration';\nimport { useListSort, type FoldersPosition } from './hooks/useListSort';\nimport { buildAssetFilters } from './utils/buildAssetFilters';\nimport { getListQueryKey } from './utils/listQueryKey';\nimport { mergeMixedList } from './utils/mergeMixedList';\nimport { buildRenderedKeys } from './utils/renderedKeys';\n\nimport type { File, UploadFileInfo } from '../../../../../shared/contracts/files';\nimport type { Folder } from '../../../../../shared/contracts/folders';\n\n// The negative bottom margin shrinks the trigger area by a pixel so the 1px\n// sentinel sitting exactly at the fold (when a page's rows happen to fill the\n// viewport) reads as \"not visible\" and doesn't pull an extra page. It still\n// triggers as soon as the sentinel scrolls a hair into view. Tune the bottom\n// value if the list over- or under-fetches near the fold.\nconst INTERSECTION_OPTIONS: IntersectionObserverInit = {\n threshold: 0,\n rootMargin: '0px 0px -1px 0px',\n};\n\n// Module-level so the header sentinel's observer isn't rebuilt every render.\nconst HEADER_SENTINEL_OPTIONS: IntersectionObserverInit = { threshold: 0 };\n\nconst ITEM_COUNT_MESSAGE = {\n id: getTranslationKey('header.content.item-count'),\n defaultMessage: '{count, plural, =1 {# item} other {# items}}',\n};\n\nconst SEARCH_RESULTS_COUNT_MESSAGES = {\n both: {\n id: getTranslationKey('header.search-results.count'),\n defaultMessage:\n '{numberFolders, plural, one {1 folder} other {# folders}} - {numberAssets, plural, one {1 asset} other {# assets}}',\n },\n folders: {\n id: getTranslationKey('header.search-results.count.folders'),\n defaultMessage: '{numberFolders, plural, one {1 folder} other {# folders}}',\n },\n assets: {\n id: getTranslationKey('header.search-results.count.assets'),\n defaultMessage: '{numberAssets, plural, =0 {0 assets} one {1 asset} other {# assets}}',\n },\n};\n\nconst getSearchResultsCountMessage = (numberFolders: number, numberAssets: number) => {\n if (numberFolders === 0) {\n return SEARCH_RESULTS_COUNT_MESSAGES.assets;\n }\n\n if (numberAssets === 0) {\n return SEARCH_RESULTS_COUNT_MESSAGES.folders;\n }\n\n return SEARCH_RESULTS_COUNT_MESSAGES.both;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * AssetsView\n * -----------------------------------------------------------------------------------------------*/\n\ninterface AssetsViewProps {\n view: number;\n folders: Folder[];\n isLoadingFolders: boolean;\n assets: File[];\n isLoadingAssets: boolean;\n isFetchingMore: boolean;\n hasNextPage: boolean;\n fetchNextPage: () => void;\n error: unknown;\n locations: ItemLocations;\n searchQuery: string;\n assetsSort: string;\n foldersPosition: FoldersPosition;\n hasActiveFilters: boolean;\n onClearFilters: () => void;\n onAssetItemClick: (assetId: number) => void;\n onAddAssets: () => void;\n canAddAssets: boolean;\n onClearSearch: () => void;\n}\n\nconst AssetsView = ({\n view,\n folders,\n isLoadingFolders,\n assets,\n isLoadingAssets,\n isFetchingMore,\n hasNextPage,\n fetchNextPage,\n error,\n locations,\n searchQuery,\n assetsSort,\n foldersPosition,\n hasActiveFilters,\n onClearFilters,\n onAssetItemClick,\n onAddAssets,\n canAddAssets,\n onClearSearch,\n}: AssetsViewProps) => {\n const { formatMessage } = useIntl();\n\n const isGridView = view === viewOptions.GRID;\n const isLoading = isLoadingAssets || isLoadingFolders;\n\n // \"Folders: Mixed with files\" — interleave the complete folder list into the\n // loaded asset stream client-side, following the active sort. Table view\n // only: the grid always keeps folders in their own band on top.\n const mixedItems = useMemo(\n () =>\n foldersPosition === 'mixed' && !isGridView\n ? mergeMixedList({ folders, assets, sort: assetsSort, hasNextPage })\n : null,\n [foldersPosition, isGridView, folders, assets, assetsSort, hasNextPage]\n );\n\n // Derived once here so the table, the grid and the bulk bar all agree on what\n // is on screen — in mixed mode that is not simply every folder.\n const renderedKeys = buildRenderedKeys({ folders, assets, mixedItems });\n\n const loadMoreRef = useInfiniteScrollSentinel({\n hasNextPage,\n isFetchingMore,\n onLoadMore: fetchNextPage,\n options: INTERSECTION_OPTIONS,\n });\n\n if (isLoading) {\n return (\n <Flex justifyContent=\"center\" padding={8}>\n <Loader>{formatMessage({ id: 'app.loading', defaultMessage: 'Loading...' })}</Loader>\n </Flex>\n );\n }\n\n if (error) {\n return (\n <Box padding={8}>\n <Typography textColor=\"danger600\">\n {formatMessage({\n id: getTranslationKey('list.assets.error'),\n defaultMessage: 'An error occurred while fetching assets.',\n })}\n </Typography>\n </Box>\n );\n }\n\n if (folders.length === 0 && assets.length === 0) {\n // While searching, the search empty state wins (it names the query); a\n // filter-only dead end gets the filtered variant with its Clear action.\n return hasActiveFilters && !searchQuery ? (\n <FilteredEmptyState onClearFilters={onClearFilters} />\n ) : (\n <EmptyState\n onAddAssets={onAddAssets}\n canAddAssets={canAddAssets}\n searchQuery={searchQuery}\n onClearSearch={onClearSearch}\n />\n );\n }\n return (\n <>\n {isGridView ? (\n <AssetsGrid\n folders={folders}\n assets={assets}\n renderedKeys={renderedKeys}\n onAssetItemClick={onAssetItemClick}\n />\n ) : (\n <AssetsTable\n assets={assets}\n folders={folders}\n mixedItems={mixedItems}\n renderedKeys={renderedKeys}\n onAssetItemClick={onAssetItemClick}\n />\n )}\n <div ref={loadMoreRef} style={{ height: 1 }} />\n {isFetchingMore && (\n <Flex justifyContent=\"center\" padding={4}>\n <Loader>\n {formatMessage({\n id: getTranslationKey('list.assets.loading-more'),\n defaultMessage: 'Loading more assets...',\n })}\n </Loader>\n </Flex>\n )}\n {/* Lives here rather than in `AssetsPage` so it can read the loaded\n assets: the AI metadata action needs their mime types to know what\n the provider can handle. `position: fixed` keeps it visually anchored\n regardless of where it sits in the tree. */}\n <BulkActionsBar assets={assets} renderedKeys={renderedKeys} locations={locations} />\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ClearSelectionOnChange\n *\n * Selection is list-scoped: it resets when the user is looking at a different list.\n * The list fingerprint is getListQueryKey() — folder, search, sort, filter.\n *\n * Hybrid rule: infinite scroll does not change the key (selection persists), and\n * neither does the table/grid toggle — both views render the same list.\n * Search/sort/filter changes do (selection clears) — same mental model as folder nav.\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ClearSelectionOnChangeProps {\n listQueryKey: string;\n}\n\nconst ClearSelectionOnChange = ({ listQueryKey }: ClearSelectionOnChangeProps) => {\n const { clear } = useAssetSelection();\n\n useEffect(() => {\n clear();\n }, [listQueryKey, clear]);\n\n return null;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * AssetsPage\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Mirrors the design-system Toggle look (grey track, white active segment\n * card) — reproduced locally because the DS component is a labels-only\n * boolean input (no icons) and paints its left segment in danger red. Here\n * both segments use the primary blue when active.\n */\nconst StyledToggleGroup = styled(ToggleGroup.Root)`\n display: flex;\n padding: ${({ theme }) => theme.spaces[1]};\n background: ${({ theme }) => theme.colors.neutral100};\n border: 1px solid ${({ theme }) => theme.colors.neutral200};\n border-radius: ${({ theme }) => theme.borderRadius};\n`;\n\nconst StyledToggleItem = styled(ToggleGroup.Item)`\n display: flex;\n flex: 1 1 50%;\n align-items: center;\n justify-content: center;\n gap: ${({ theme }) => theme.spaces[2]};\n padding: 0.6rem ${({ theme }) => theme.spaces[3]};\n border: 1px solid transparent;\n border-radius: ${({ theme }) => theme.borderRadius};\n background: transparent;\n color: ${({ theme }) => theme.colors.neutral600};\n cursor: pointer;\n font-size: ${({ theme }) => theme.fontSizes[1]};\n font-weight: ${({ theme }) => theme.fontWeights.semiBold};\n white-space: nowrap;\n\n &:hover {\n color: ${({ theme }) => theme.colors.neutral700};\n }\n\n &[data-state='on'] {\n background: ${({ theme }) => theme.colors.neutral0};\n border-color: ${({ theme }) => theme.colors.neutral200};\n color: ${({ theme }) => theme.colors.primary600};\n }\n\n svg {\n width: 1.6rem;\n height: 1.6rem;\n }\n`;\n\n// A single sticky header — same layout scrolled or not, so the toolbar\n// alignment can't reflow the way the shared sticky header did. Once the list\n// scrolls under it, it shrinks (reduced vertical padding + a shadow to lift it\n// off the rows), like the sticky headers elsewhere in the admin. Horizontal\n// padding stays responsive (passed as props); only the vertical rhythm + shadow\n// change here so they can animate.\nconst StickyHeader = styled(Box)<{ $compact: boolean }>`\n position: sticky;\n top: 0;\n z-index: 2;\n /* Transparent at rest (the grey page shows through); an opaque background +\n shadow appear only once it sticks and content scrolls under it. */\n background: transparent;\n /* Horizontal padding matches the list's default spacing (Layouts.Content /\n RESPONSIVE_DEFAULT_SPACING: 4 / 6 / 10) so the header lines up with the rows. */\n padding: ${({ theme }) => `${theme.spaces[6]} ${theme.spaces[4]}`};\n transition:\n padding 0.2s ease,\n background 0.2s ease,\n box-shadow 0.2s ease;\n\n ${({ theme }) => theme.breakpoints.medium} {\n padding-left: ${({ theme }) => theme.spaces[6]};\n padding-right: ${({ theme }) => theme.spaces[6]};\n }\n ${({ theme }) => theme.breakpoints.large} {\n padding-left: ${({ theme }) => theme.spaces[10]};\n padding-right: ${({ theme }) => theme.spaces[10]};\n }\n\n /* Compacting is scoped to medium and up, where the header actually sticks. On\n mobile it scrolls away with the list, so shrinking it mid-scroll animated a\n header the user could no longer see — the transition read as a glitch on the\n way back up rather than as the header settling. */\n ${({ $compact, theme }) =>\n $compact &&\n css`\n ${theme.breakpoints.medium} {\n padding-top: ${theme.spaces[3]};\n padding-bottom: ${theme.spaces[3]};\n padding-left: ${theme.spaces[4]};\n padding-right: ${theme.spaces[4]};\n background: ${theme.colors.neutral0};\n box-shadow: ${theme.shadows.tableShadow};\n }\n ${theme.breakpoints.large} {\n padding-left: ${theme.spaces[6]};\n padding-right: ${theme.spaces[6]};\n }\n `}\n`;\n\n// New button aligns with the title, not the toolbar.\nconst TitleRow = styled(Flex)`\n justify-content: space-between;\n align-items: flex-start;\n gap: ${({ theme }) => theme.spaces[4]};\n\n h1 {\n font-size: 1.8rem;\n }\n`;\n\n// Two groups in source order (Filter, Search / Sort, Toggle). Mobile: stacked —\n// Filter+Search on row 1, Sort+Toggle on row 2. Desktop (large+): one row,\n// Filter+Search on the left, Sort+Toggle pushed right.\nconst Toolbar = styled(Flex)<{ $compact: boolean }>`\n margin-top: ${({ theme }) => theme.spaces[5]};\n flex-direction: column;\n align-items: stretch;\n gap: ${({ theme }) => theme.spaces[3]};\n transition: margin-top 0.2s ease;\n\n /* Tightening the gap to the title belongs to the compact header, so it is\n scoped to the breakpoints that compact. On mobile the header never sticks,\n and this was the last thing still shifting as the page scrolled. */\n ${({ $compact, theme }) =>\n $compact &&\n css`\n ${theme.breakpoints.medium} {\n margin-top: ${theme.spaces[2]};\n }\n `}\n\n ${({ theme }) => theme.breakpoints.large} {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n`;\n\nconst ToolbarGroup = styled(Flex)`\n align-items: center;\n gap: ${({ theme }) => theme.spaces[3]};\n`;\n\n// Filter + Search. On mobile the group fills the row (search grows into it);\n// on desktop it keeps its intrinsic size and sits at the left edge.\nconst FilterSearchGroup = styled(ToolbarGroup)``;\n\n// Sort + Toggle. Mobile: spread across the row (Sort left, Toggle right).\n// Desktop: sit together at the right edge (space-between on the toolbar leaves\n// the empty space between the search and here).\nconst SortToggleGroup = styled(ToolbarGroup)`\n justify-content: space-between;\n\n ${({ theme }) => theme.breakpoints.large} {\n justify-content: flex-end;\n flex: 0 0 auto;\n }\n`;\n\n// Fills the row on mobile; intrinsic width on desktop.\nconst SearchSlot = styled(Box)`\n flex: 1;\n\n ${({ theme }) => theme.breakpoints.large} {\n flex: 0 1 auto;\n }\n`;\n\n// Toggle labels are hidden below desktop — icons only (buttons keep aria-label).\nconst ToggleLabel = styled.span`\n display: none;\n\n ${({ theme }) => theme.breakpoints.large} {\n display: inline;\n }\n`;\n\nexport const AssetsPage = () => {\n const { formatMessage } = useIntl();\n const { openDetails } = useAssetDetailsParam();\n const { canCreate, canUpdate } = useMediaLibraryPermissions();\n\n const { currentFolderId, navigateToFolderId, navigateToRoot } = useFolderNavigation();\n // Deleted or missing folders (404) need a fetch — handled here, not in\n // `useFolderNavigation` (which only strips malformed ?folder= values).\n const { error: currentFolderError } = useGetFolderQuery(\n { id: currentFolderId! },\n { skip: currentFolderId === null }\n );\n\n useEffect(() => {\n if (currentFolderError?.name === 'NotFoundError') {\n navigateToRoot();\n }\n }, [currentFolderError, navigateToRoot]);\n const { title, itemCount } = useFolderInfo(currentFolderId);\n\n const { searchQuery, isSearching, clearSearch } = useAssetSearch();\n const listSort = useListSort();\n const listFilters = useListFilters();\n\n // Resolve relative presets against \"now\" only when the filters change —\n // keeps the query args (and RTK cache keys) stable between renders.\n const builtFilters = useMemo(\n () => buildAssetFilters(listFilters.filters, new Date()),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- serialized is the value identity of filters\n [listFilters.serialized]\n );\n\n const {\n assets,\n subscribers: assetPageSubscribers,\n pagination,\n isLoading: isLoadingAssets,\n isFetchingMore,\n hasNextPage,\n fetchNextPage,\n error: assetsError,\n } = useInfiniteAssets({\n // The real folder is passed even while searching: the service drops the folder\n // filter when `search` is set, so results are still global. List filters\n // compose with both modes.\n folder: currentFolderId,\n search: searchQuery || undefined,\n sort: listSort.assetsSort,\n filters: builtFilters.fileClauses,\n enabled: builtFilters.showFiles,\n });\n\n const { data: fetchedFolders = [], isLoading: isLoadingFolders } = useGetFoldersQuery(\n {\n parentId: currentFolderId,\n search: searchQuery || undefined,\n sort: listSort.foldersSort,\n filters: builtFilters.folderClauses,\n },\n { skip: !builtFilters.showFolders }\n );\n // A type badge can exclude folders structurally (e.g. \"Type is Picture\").\n const folders = useMemo(\n () => (builtFilters.showFolders ? fetchedFolders : []),\n [builtFilters.showFolders, fetchedFolders]\n );\n\n // Both move affordances (drag and the bulk bar) resolve each item's parent\n // from the rows on screen — while searching, results are global and the\n // folder currently open says nothing about where an item lives.\n const itemLocations = useMemo(() => buildItemLocations(assets, folders), [assets, folders]);\n\n const itemCountLabel = formatMessage(ITEM_COUNT_MESSAGE, { count: itemCount });\n\n const searchResultsTitle = formatMessage(\n {\n id: getTranslationKey('header.search-results'),\n defaultMessage: 'Search results for \"{query}\"',\n },\n { query: searchQuery }\n );\n const numberFolders = folders.length;\n const numberAssets = pagination?.total ?? 0;\n\n const searchResultsCountLabel = formatMessage(\n getSearchResultsCountMessage(numberFolders, numberAssets),\n { numberFolders, numberAssets }\n );\n\n let pageHeaderTitle: string;\n if (isSearching) {\n pageHeaderTitle = `${searchResultsTitle} (${searchResultsCountLabel})`;\n } else if (title) {\n pageHeaderTitle = `${title} (${itemCountLabel})`;\n } else {\n pageHeaderTitle = formatMessage({ id: 'app.loading', defaultMessage: 'Loading...' });\n }\n\n const [isCreateFolderDialogOpen, setIsCreateFolderDialogOpen] = useState(false);\n\n // View state\n const [view, setView] = usePersistentState(localStorageKeys.view, viewOptions.GRID);\n const isGridView = view === viewOptions.GRID;\n\n // Dialog state\n const [isUrlDialogOpen, setIsUrlDialogOpen] = useState(false);\n\n // Refs\n const fileInputRef = useRef<HTMLInputElement>(null);\n const uploadDropZoneRef = useRef<HTMLDivElement>(null);\n\n // Shrink the sticky header once the list scrolls beneath it. A zero-height\n // sentinel sits at the very top of the scroll content; when it leaves the\n // viewport we're scrolled → compact.\n const [isHeaderCompact, setIsHeaderCompact] = useState(false);\n const onHeaderSentinelVisibility = useCallback(\n (isVisible: boolean) => setIsHeaderCompact(!isVisible),\n []\n );\n const headerSentinelRef = useElementOnScreen<HTMLDivElement>(\n onHeaderSentinelVisibility,\n HEADER_SENTINEL_OPTIONS\n );\n\n // Upload handlers\n const [uploadFiles] = useUploadFilesMutation();\n const [uploadFromUrls] = useUploadFromUrlsMutation();\n // `concurrentUploadRequests` echoes the app config. Missing settings (still\n // loading, no permission) fall back to sequential — never faster than the\n // server asked for.\n const { data: settings } = useGetUploadSettingsQuery();\n const concurrency = settings?.data?.concurrentUploadRequests ?? 1;\n // Drives the post-upload AI metadata phase shown per row in the progress\n // dialog. No mime argument: the files are not known until they are picked,\n // and the server filters the batch on the same allowlist anyway.\n const isAiMetadataEnabled = useAIMetadataEnabled();\n const { trackUsage } = useTracking();\n\n const uploadFilesToFolder = async (files: globalThis.File[], folderId: number | null) => {\n if (files.length === 0) return;\n\n // Mirror the legacy `willAddMediaLibraryAssets` payload: the count of files\n // about to upload, broken down by asset type.\n const assetsCountByType = files.reduce<Record<string, number>>((acc, file) => {\n const type = typeFromMime(file.type);\n acc[type] = (acc[type] ?? 0) + 1;\n return acc;\n }, {});\n trackUsage('willAddMediaLibraryAssets', {\n location: MEDIA_LIBRARY_LOCATION,\n ...assetsCountByType,\n });\n\n const formData = new FormData();\n const fileInfoArray: UploadFileInfo[] = [];\n\n files.forEach((file) => {\n formData.append('files', file);\n fileInfoArray.push({\n name: file.name,\n caption: null,\n alternativeText: null,\n folder: folderId,\n });\n });\n\n formData.append('fileInfo', JSON.stringify(fileInfoArray));\n try {\n await uploadFiles({\n formData,\n totalFiles: files.length,\n concurrency,\n generateAiMetadata: Boolean(isAiMetadataEnabled),\n }).unwrap();\n } catch {\n // Error is already dispatched to store from the API queryFn\n }\n };\n\n const handleFileSelect = () => {\n fileInputRef.current?.click();\n };\n\n const handleFileChange = async (e: ChangeEvent<HTMLInputElement>) => {\n const files = e.target.files;\n if (files && files.length > 0) {\n trackUsage('didSelectFile', { source: 'computer', location: MEDIA_LIBRARY_LOCATION });\n await uploadFilesToFolder(Array.from(files), currentFolderId);\n }\n e.target.value = '';\n };\n\n const handleDrop = async (files: globalThis.File[]) => {\n // Defence in depth: the provider is `disabled` without `assets.create`\n // (so onDrop won't fire), but guard here too in case it's ever wired live.\n if (!canCreate) return;\n trackUsage('didSelectFile', { source: 'computer', location: MEDIA_LIBRARY_LOCATION });\n await uploadFilesToFolder(files, currentFolderId);\n };\n\n const handleUrlUpload = async (urls: string[]) => {\n trackUsage('didSelectFile', { source: 'url', location: MEDIA_LIBRARY_LOCATION });\n // Counts-by-type aren't available client-side for the URL flow (the server\n // fetches the files), so this fires the event with location only.\n trackUsage('willAddMediaLibraryAssets', { location: MEDIA_LIBRARY_LOCATION });\n try {\n await uploadFromUrls({\n urls,\n folderId: currentFolderId,\n generateAiMetadata: Boolean(isAiMetadataEnabled),\n }).unwrap();\n } catch {\n // Error is already dispatched to store from the API queryFn\n }\n };\n\n // The view is deliberately absent: table and grid render the same list, so\n // toggling views keeps the selection.\n const listQueryKey = getListQueryKey({\n folderId: currentFolderId,\n search: searchQuery,\n // Folder position changes the render order too — selection must reset.\n sort: `${listSort.assetsSort};folders=${listSort.foldersPosition}`,\n filter: listFilters.serialized || null,\n });\n\n const scrollAnchorRef = useListScrollRestoration(listQueryKey);\n\n return (\n <>\n <UploadDropZoneProvider onDrop={handleDrop} disabled={!canCreate}>\n <AssetSelectionProvider disabled={!canUpdate}>\n <BusyAssetsProvider>\n <AssetsDndProvider locations={itemLocations}>\n <ClearSelectionOnChange listQueryKey={listQueryKey} />\n <Layouts.Root\n sideNav={\n <FolderTree\n currentFolderId={currentFolderId}\n showActiveFolder={!isSearching}\n onSelectFolder={navigateToFolderId}\n />\n }\n >\n <Page.Main>\n <Box ref={uploadDropZoneRef}>\n <VisuallyHidden>\n <input type=\"file\" ref={fileInputRef} onChange={handleFileChange} multiple />\n </VisuallyHidden>\n\n {/* Zero-height marker: leaves the viewport as soon as the list\n scrolls, flipping the header into its compact state. */}\n <Box ref={headerSentinelRef} height={0} aria-hidden />\n <Box ref={scrollAnchorRef} height={0} aria-hidden />\n\n {/* Renders no wrapper: it listens on the scrolling column\n itself, so the header band and the padding below the list\n are both in the hit area. Interactive controls, the table\n header row and the list items are excluded — see\n MainAreaContextMenu. */}\n <MainAreaContextMenu\n disabled={!canCreate}\n onCreateFolder={() => setIsCreateFolderDialogOpen(true)}\n onImportFiles={handleFileSelect}\n onImportFromUrl={() => setIsUrlDialogOpen(true)}\n />\n <StickyHeader $compact={isHeaderCompact}>\n <TitleRow>\n <Typography variant=\"alpha\" tag=\"h1\">\n {pageHeaderTitle}\n </Typography>\n {canCreate && (\n <SimpleMenu\n popoverPlacement=\"bottom-end\"\n variant=\"default\"\n endIcon={<ChevronDown />}\n label={formatMessage({\n id: getTranslationKey('new'),\n defaultMessage: 'New',\n })}\n >\n <MenuItem\n onSelect={() => setIsCreateFolderDialogOpen(true)}\n startIcon={<FolderIcon />}\n >\n {formatMessage({\n id: getTranslationKey('folder.create.title'),\n defaultMessage: 'New folder',\n })}\n </MenuItem>\n <MenuItem onSelect={handleFileSelect} startIcon={<Files />}>\n {formatMessage({\n id: getTranslationKey('import-files'),\n defaultMessage: 'File upload',\n })}\n </MenuItem>\n <MenuItem\n onSelect={() => setIsUrlDialogOpen(true)}\n startIcon={<Link />}\n >\n {formatMessage({\n id: getTranslationKey('import-from-url'),\n defaultMessage: 'File upload from URL',\n })}\n </MenuItem>\n </SimpleMenu>\n )}\n </TitleRow>\n\n <Toolbar $compact={isHeaderCompact}>\n <FilterSearchGroup>\n <Box>\n <FilterMenu listFilters={listFilters} />\n </Box>\n <SearchSlot>\n <AssetsSearchInput />\n </SearchSlot>\n </FilterSearchGroup>\n <SortToggleGroup>\n <Box>\n <SortMenu sort={listSort} showFoldersGroup={!isGridView} />\n </Box>\n <StyledToggleGroup\n type=\"single\"\n value={isGridView ? 'grid' : 'table'}\n onValueChange={(value) =>\n value &&\n setView(value === 'grid' ? viewOptions.GRID : viewOptions.TABLE)\n }\n aria-label={formatMessage({\n id: getTranslationKey('view.switch.label'),\n defaultMessage: 'View options',\n })}\n >\n <StyledToggleItem\n value=\"table\"\n aria-label={formatMessage({\n id: getTranslationKey('view.table'),\n defaultMessage: 'Table view',\n })}\n >\n <List />\n <ToggleLabel>\n {formatMessage({\n id: getTranslationKey('view.table'),\n defaultMessage: 'Table view',\n })}\n </ToggleLabel>\n </StyledToggleItem>\n <StyledToggleItem\n value=\"grid\"\n aria-label={formatMessage({\n id: getTranslationKey('view.grid'),\n defaultMessage: 'Grid view',\n })}\n >\n <GridIcon />\n <ToggleLabel>\n {formatMessage({\n id: getTranslationKey('view.grid'),\n defaultMessage: 'Grid view',\n })}\n </ToggleLabel>\n </StyledToggleItem>\n </StyledToggleGroup>\n </SortToggleGroup>\n </Toolbar>\n\n <FilterBadges listFilters={listFilters} compact={isHeaderCompact} />\n </StickyHeader>\n\n <Layouts.Content>\n <BetaNotice />\n {/* Renders nothing — keeps every loaded page's query subscribed\n so a rename/delete refreshes the whole list. */}\n {assetPageSubscribers}\n <DropZoneWithOverlay>\n <DropFilesMessage\n uploadDropZoneRef={uploadDropZoneRef}\n folderName={title}\n />\n <AssetsView\n view={view}\n folders={folders}\n isLoadingFolders={isLoadingFolders}\n assets={assets}\n isLoadingAssets={isLoadingAssets}\n isFetchingMore={isFetchingMore}\n hasNextPage={hasNextPage}\n fetchNextPage={fetchNextPage}\n error={assetsError}\n locations={itemLocations}\n searchQuery={searchQuery}\n assetsSort={listSort.assetsSort}\n foldersPosition={listSort.foldersPosition}\n hasActiveFilters={listFilters.filters.length > 0}\n onClearFilters={listFilters.clearFilters}\n onAssetItemClick={openDetails}\n onAddAssets={handleFileSelect}\n canAddAssets={canCreate}\n onClearSearch={clearSearch}\n />\n </DropZoneWithOverlay>\n </Layouts.Content>\n </Box>\n </Page.Main>\n </Layouts.Root>\n </AssetsDndProvider>\n </BusyAssetsProvider>\n </AssetSelectionProvider>\n </UploadDropZoneProvider>\n <FolderFormDialog\n open={isCreateFolderDialogOpen}\n mode=\"create\"\n parentFolderName={title}\n parentFolderId={currentFolderId}\n onClose={() => setIsCreateFolderDialogOpen(false)}\n />\n <ImportFromUrlDialog\n open={isUrlDialogOpen}\n onClose={() => setIsUrlDialogOpen(false)}\n onUpload={handleUrlUpload}\n />\n <AssetDetailsDrawer />\n </>\n );\n};\n"],"names":["INTERSECTION_OPTIONS","threshold","rootMargin","HEADER_SENTINEL_OPTIONS","ITEM_COUNT_MESSAGE","id","getTranslationKey","defaultMessage","SEARCH_RESULTS_COUNT_MESSAGES","both","folders","assets","getSearchResultsCountMessage","numberFolders","numberAssets","AssetsView","view","isLoadingFolders","isLoadingAssets","isFetchingMore","hasNextPage","fetchNextPage","error","locations","searchQuery","assetsSort","foldersPosition","hasActiveFilters","onClearFilters","onAssetItemClick","onAddAssets","canAddAssets","onClearSearch","formatMessage","useIntl","isGridView","viewOptions","GRID","isLoading","mixedItems","useMemo","mergeMixedList","sort","renderedKeys","buildRenderedKeys","loadMoreRef","useInfiniteScrollSentinel","onLoadMore","options","_jsx","Flex","justifyContent","padding","Loader","Box","Typography","textColor","length","FilteredEmptyState","EmptyState","_jsxs","_Fragment","AssetsGrid","AssetsTable","div","ref","style","height","BulkActionsBar","ClearSelectionOnChange","listQueryKey","clear","useAssetSelection","useEffect","StyledToggleGroup","styled","ToggleGroup","Root","theme","spaces","colors","neutral100","neutral200","borderRadius","StyledToggleItem","Item","neutral600","fontSizes","fontWeights","semiBold","neutral700","neutral0","primary600","StickyHeader","breakpoints","medium","large","$compact","css","shadows","tableShadow","TitleRow","Toolbar","ToolbarGroup","FilterSearchGroup","SortToggleGroup","SearchSlot","ToggleLabel","span","AssetsPage","openDetails","useAssetDetailsParam","canCreate","canUpdate","useMediaLibraryPermissions","currentFolderId","navigateToFolderId","navigateToRoot","useFolderNavigation","currentFolderError","useGetFolderQuery","skip","name","title","itemCount","useFolderInfo","isSearching","clearSearch","useAssetSearch","listSort","useListSort","listFilters","useListFilters","builtFilters","buildAssetFilters","filters","Date","serialized","subscribers","assetPageSubscribers","pagination","assetsError","useInfiniteAssets","folder","search","undefined","fileClauses","enabled","showFiles","data","fetchedFolders","useGetFoldersQuery","parentId","foldersSort","folderClauses","showFolders","itemLocations","buildItemLocations","itemCountLabel","count","searchResultsTitle","query","total","searchResultsCountLabel","pageHeaderTitle","isCreateFolderDialogOpen","setIsCreateFolderDialogOpen","useState","setView","usePersistentState","localStorageKeys","isUrlDialogOpen","setIsUrlDialogOpen","fileInputRef","useRef","uploadDropZoneRef","isHeaderCompact","setIsHeaderCompact","onHeaderSentinelVisibility","useCallback","isVisible","headerSentinelRef","useElementOnScreen","uploadFiles","useUploadFilesMutation","uploadFromUrls","useUploadFromUrlsMutation","settings","useGetUploadSettingsQuery","concurrency","concurrentUploadRequests","isAiMetadataEnabled","useAIMetadataEnabled","trackUsage","useTracking","uploadFilesToFolder","files","folderId","assetsCountByType","reduce","acc","file","type","typeFromMime","location","MEDIA_LIBRARY_LOCATION","formData","FormData","fileInfoArray","forEach","append","push","caption","alternativeText","JSON","stringify","totalFiles","generateAiMetadata","Boolean","unwrap","handleFileSelect","current","click","handleFileChange","e","target","source","Array","from","value","handleDrop","handleUrlUpload","urls","getListQueryKey","filter","scrollAnchorRef","useListScrollRestoration","UploadDropZoneProvider","onDrop","disabled","AssetSelectionProvider","BusyAssetsProvider","AssetsDndProvider","Layouts","sideNav","FolderTree","showActiveFolder","onSelectFolder","Page","Main","VisuallyHidden","input","onChange","multiple","aria-hidden","MainAreaContextMenu","onCreateFolder","onImportFiles","onImportFromUrl","variant","tag","SimpleMenu","popoverPlacement","endIcon","ChevronDown","label","MenuItem","onSelect","startIcon","FolderIcon","Files","Link","FilterMenu","AssetsSearchInput","SortMenu","showFoldersGroup","onValueChange","TABLE","aria-label","List","GridIcon","FilterBadges","compact","Content","BetaNotice","DropZoneWithOverlay","DropFilesMessage","folderName","clearFilters","FolderFormDialog","open","mode","parentFolderName","parentFolderId","onClose","ImportFromUrlDialog","onUpload","AssetDetailsDrawer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA;AACA;AACA;AACA;AACA;AACA,MAAMA,oBAAAA,GAAiD;IACrDC,SAAAA,EAAW,CAAA;IACXC,UAAAA,EAAY;AACd,CAAA;AAEA;AACA,MAAMC,uBAAAA,GAAoD;IAAEF,SAAAA,EAAW;AAAE,CAAA;AAEzE,MAAMG,kBAAAA,GAAqB;AACzBC,IAAAA,EAAAA,EAAIC,8BAAAA,CAAkB,2BAAA,CAAA;IACtBC,cAAAA,EAAgB;AAClB,CAAA;AAEA,MAAMC,6BAAAA,GAAgC;IACpCC,IAAAA,EAAM;AACJJ,QAAAA,EAAAA,EAAIC,8BAAAA,CAAkB,6BAAA,CAAA;QACtBC,cAAAA,EACE;AACJ,KAAA;IACAG,OAAAA,EAAS;AACPL,QAAAA,EAAAA,EAAIC,8BAAAA,CAAkB,qCAAA,CAAA;QACtBC,cAAAA,EAAgB;AAClB,KAAA;IACAI,MAAAA,EAAQ;AACNN,QAAAA,EAAAA,EAAIC,8BAAAA,CAAkB,oCAAA,CAAA;QACtBC,cA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