@ntbjs/react-components 2.0.11 → 2.0.12-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,7 +40,7 @@ const AssetGalleryBase = React__default.forwardRef(function AssetGalleryBase({
40
40
  const PRIMARY_SCROLL_BUFFER_HEIGHT = 1500;
41
41
  const SECONDARY_SCROLL_BUFFER_HEIGHT = 500;
42
42
  const GRID_VIEW_MODE_ASSET_MIN_WIDTH = 300;
43
- const GRID_VIEW_MODE_ASSET_HEIGHT = 537;
43
+ const GRID_VIEW_MODE_ASSET_HEIGHT = 556;
44
44
  const MISSING_WIDTH_PLACEHOLDER = 1920;
45
45
  const MISSING_HEIGHT_PLACEHOLDER = 1080;
46
46
  const isBrowser = typeof window !== 'undefined';
@@ -1 +1 @@
1
- {"version":3,"file":"AssetGalleryBase.js","sources":["../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { throttle } from 'lodash';\nimport PropTypes from 'prop-types';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { assetShape } from '../asset.propType';\nimport useIsomorphicLayoutEffect from './../../../../hooks/useIsomorphicLayoutEffect';\nimport * as S from './AssetGalleryBase.styled';\nimport AssetGalleryCompactCard from './AssetGalleryCompactCard/AssetGalleryCompactCard';\nimport AssetGalleryGridCard from './AssetGalleryGridCard/AssetGalleryGridCard';\nconst AssetGalleryBase = React.forwardRef(function AssetGalleryBase(\n {\n assets: assetsProp,\n activeSummaryCard,\n displayIcon,\n viewMode,\n thumbnailMaxHeight,\n selectable,\n customSelectedBorder,\n selectedAssetKeys,\n onAssetSelected,\n onAssetUnselected,\n softSelectable,\n softSelectedAssetKey,\n scrollElement: scrollElementProp,\n onAssetSoftSelectedChanged,\n component,\n ...props\n },\n forwardedRef\n) {\n // Combine forwarded ref and the local ref\n const assetGalleryDOMNode = useRef();\n const assetGalleryCompactRef = useMergedRefs(forwardedRef, assetGalleryDOMNode);\n\n const assetGalleryWidth = useRef(0);\n const minimumRowAspectRatio = useRef(0);\n\n // Calculated assets\n const calculatedAssets = useRef([]);\n const [assets, setAssets] = useState([]);\n\n // Constants\n const MAXIMUM_ROW_HEIGHT = useMemo(\n () => (viewMode === 'grid' ? 450 : thumbnailMaxHeight),\n [viewMode, thumbnailMaxHeight]\n );\n const SPACE_BETWEEN_ASSETS = 8;\n const SPACE_UNDER_ASSETS = 8;\n const PRIMARY_SCROLL_BUFFER_HEIGHT = 1500;\n const SECONDARY_SCROLL_BUFFER_HEIGHT = 500;\n const GRID_VIEW_MODE_ASSET_MIN_WIDTH = 300;\n const GRID_VIEW_MODE_ASSET_HEIGHT = 537;\n const MISSING_WIDTH_PLACEHOLDER = 1920;\n const MISSING_HEIGHT_PLACEHOLDER = 1080;\n\n const isBrowser = typeof window !== 'undefined';\n\n const scrollElement = scrollElementProp || window;\n\n // Scroll position and direction\n const previousYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const latestYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const scrollDirection = useRef('down');\n\n // Track resize changes and set the current Asset Gallery width\n useIsomorphicLayoutEffect(() => {\n if (!assetGalleryDOMNode.current) return;\n\n const throttledOnResize = throttle(onResize, 1);\n\n const resizeObserver = new ResizeObserver(throttledOnResize);\n\n resizeObserver.observe(assetGalleryDOMNode.current);\n\n function onResize(entries) {\n entries.forEach(entry => {\n // setAssetGalleryWidth(entry.contentRect.width);\n if (assetGalleryWidth.current === entry.contentRect.width) return;\n window.requestAnimationFrame(() => {\n assetGalleryWidth.current = entry.contentRect.width;\n main();\n });\n });\n }\n\n return () => {\n resizeObserver.unobserve(assetGalleryDOMNode.current);\n };\n }, [assetsProp, assetGalleryDOMNode, MAXIMUM_ROW_HEIGHT]);\n\n //Re calculate Asset Gallery when something changes `MAXIMUM_ROW_HEIGHT` or `assetsProp` changes\n useEffect(() => {\n main();\n }, [MAXIMUM_ROW_HEIGHT, assetsProp]);\n\n const main = () => {\n calculateAssetGalleryAspectRatio();\n calculateLayout();\n calculateVisibility();\n };\n\n const calculateAssetGalleryAspectRatio = () => {\n // We don't care to compute the aspect ratio if the width of the gallery is 0\n if (assetGalleryWidth.current > 0) {\n minimumRowAspectRatio.current = calculateAspectRatio(\n assetGalleryWidth.current,\n MAXIMUM_ROW_HEIGHT\n );\n }\n };\n\n // Calculate asset gallery layout\n const calculateLayout = () => {\n // Check for required attributes and omit assets that are missing the attribute\n const assetsWithoutAKey = assetsProp.filter(a => !a.key);\n if (assetsWithoutAKey.length > 0) {\n assetsProp = assetsProp.filter(a => a.key);\n assetsWithoutAKey.forEach(a =>\n console.warn(\n 'Omitted asset from the gallery because it was missing the unique `key` property.',\n a\n )\n );\n }\n\n if (viewMode === 'grid' && assetGalleryWidth.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n const computedAssets = [];\n let lastGroup = null; // The last group that was created\n\n // Calculate how many assets we can put in a row before violating `ASSET_MIN_WIDTH`\n // but we always want minimum of 1 asset in a row\n const desiredAssetCountInRow =\n Math.floor(assetGalleryWidth.current / GRID_VIEW_MODE_ASSET_MIN_WIDTH) || 1;\n\n // Calculate the width of each asset in a row\n const desiredAssetWidth =\n assetGalleryWidth.current / desiredAssetCountInRow -\n SPACE_BETWEEN_ASSETS +\n SPACE_BETWEEN_ASSETS / desiredAssetCountInRow;\n\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n row.push(asset);\n\n if (\n row.length === desiredAssetCountInRow ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n const rowHeight = GRID_VIEW_MODE_ASSET_HEIGHT;\n\n row.forEach(rowAsset => {\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset and not a group label\n width: Math.round(desiredAssetWidth),\n height: Math.round(rowHeight),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n\n translateX += desiredAssetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n row = [];\n translateX = 0;\n translateY += rowHeight + SPACE_UNDER_ASSETS;\n }\n });\n\n calculatedAssets.current = computedAssets;\n } else {\n if (minimumRowAspectRatio.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n let rowAspectRatio = 0; // The aspect ratio of the row we are building\n let lastGroup = null; // The last group that was created\n\n const computedAssets = [];\n\n // Loop through all our images, building them up into rows and computing\n // the working rowAspectRatio.\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n rowAspectRatio += calculateAspectRatio(\n asset.width || MISSING_WIDTH_PLACEHOLDER,\n asset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n row.push(asset);\n\n // End the row if any of the conditions match\n if (\n rowAspectRatio >= minimumRowAspectRatio.current ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n // Make sure that the last row also has a reasonable height\n rowAspectRatio = Math.max(rowAspectRatio, minimumRowAspectRatio.current);\n\n // Compute this row's height.\n const totalDesiredWidthOfImages =\n assetGalleryWidth.current - SPACE_BETWEEN_ASSETS * (row.length - 1);\n const rowHeight = totalDesiredWidthOfImages / rowAspectRatio;\n\n row.forEach(rowAsset => {\n const assetWidth =\n rowHeight *\n calculateAspectRatio(\n rowAsset.width || MISSING_WIDTH_PLACEHOLDER,\n rowAsset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset an not a group label\n width: Math.round(assetWidth),\n height: Math.round(rowHeight),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY),\n hasHeightAndWidth: Boolean(rowAsset.width && rowAsset.height)\n }\n });\n\n // The next image is `SPACE_BETWEEN_ASSETS` pixels to the right of this image.\n translateX += assetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n // Reset our state variables for next row.\n row = [];\n rowAspectRatio = 0;\n translateY += rowHeight + SPACE_UNDER_ASSETS;\n translateX = 0;\n }\n });\n\n calculatedAssets.current = computedAssets;\n }\n }\n };\n\n // Utility function to calculate the aspect ratio of a width and height\n function calculateAspectRatio(width, height) {\n return width / height;\n }\n\n // Calculate the total height of the gallery\n const totalGalleryHeight = useMemo(() => {\n if (assets.length === 0) {\n return 0;\n }\n\n const lastAsset = assets[assets.length - 1];\n\n if (assets.length < 8) {\n return (lastAsset.layout.translateY + lastAsset.layout.height) * 2;\n }\n\n return lastAsset.layout.translateY + lastAsset.layout.height;\n }, [assets]);\n\n useEffect(() => {\n const throttledOnScroll = throttle(onScroll, 200);\n\n scrollElement.addEventListener('scroll', throttledOnScroll, false);\n return () => scrollElement.removeEventListener('scroll', throttledOnScroll, false);\n }, [assetGalleryDOMNode, calculatedAssets]);\n\n function onScroll() {\n setScrollPositionAndDirection();\n calculateVisibility();\n }\n\n function setScrollPositionAndDirection() {\n const newYOffset = scrollElement.pageYOffset;\n previousYOffset.current = latestYOffset.current;\n latestYOffset.current = newYOffset;\n scrollDirection.current = latestYOffset.current > previousYOffset.current ? 'down' : 'up';\n }\n\n /**\n * +---------------------------+\n * | |\n * | |\n * | |\n * | |\n * + - - - - - - - - - - - - - + -------\n * | | A\n * | Secondary Buffer | SECONDARY_SCROLL_BUFFER_HEIGHT\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | Viewport | window.innerHeight\n * | | |\n * | | |\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | | |\n * | Primary Buffer | PRIMARY_SCROLL_BUFFER_HEIGHT\n * | | |\n * | | |\n * | | |\n * | | V\n * + - - - - - - - - - - - - - + -------\n * | |\n * | (Scroll direction) |\n * | | |\n * | | |\n * | V |\n * | |\n *\n */\n\n const calculateVisibility = () => {\n if (!assetGalleryDOMNode.current) return;\n\n // Get the top and bottom buffers heights.\n const bufferTop =\n scrollDirection.current === 'up'\n ? PRIMARY_SCROLL_BUFFER_HEIGHT\n : SECONDARY_SCROLL_BUFFER_HEIGHT;\n\n const bufferBottom =\n scrollDirection.current === 'up'\n ? SECONDARY_SCROLL_BUFFER_HEIGHT\n : PRIMARY_SCROLL_BUFFER_HEIGHT;\n\n const containerOffset = getOffsetTop(assetGalleryDOMNode.current);\n const scrollerHeight = scrollElement.innerHeight;\n\n const yOffset = latestYOffset.current;\n\n // This is the top of the top buffer. If the bottom of an image is above\n // this line, it will be removed.\n const minTranslateYPlusHeight = yOffset - containerOffset - bufferTop;\n\n // This is the bottom of the bottom buffer. If the top of an image is\n // below this line, it will be removed.\n const maxTranslateY = yOffset - containerOffset + scrollerHeight + bufferBottom;\n\n const finalizedAssets = calculatedAssets.current.map(asset => {\n if (\n scrollElement.self == window &&\n (asset.layout.translateY + asset.layout.height < minTranslateYPlusHeight ||\n asset.layout.translateY > maxTranslateY)\n ) {\n // Hide Image\n asset.layout.show = false;\n } else {\n // Show Image\n asset.layout.show = true;\n }\n\n return asset;\n });\n\n setAssets(finalizedAssets);\n };\n\n // Utility function that returns the distance from `elem` to the top of the page.\n // This is done by walking up the node tree, getting the offsetTop of each\n // parent node, until the top of the page.\n function getOffsetTop(elem) {\n let offsetTop = 0;\n do {\n if (!isNaN(elem.offsetTop)) {\n offsetTop += elem.offsetTop;\n }\n elem = elem.offsetParent;\n } while (elem);\n return offsetTop;\n }\n\n const handleKeyPress = useCallback(\n e => {\n function isElementVisible(el) {\n const rect = el.getBoundingClientRect(),\n vWidth = scrollElement.innerWidth || document.documentElement.clientWidth,\n vHeight = scrollElement.innerHeight || document.documentElement.clientHeight,\n efp = function (x, y) {\n return document.elementFromPoint(x, y);\n };\n\n // Return false if it's not in the viewport\n if (rect.right < 0 || rect.bottom < 0 || rect.left > vWidth || rect.top > vHeight)\n return false;\n\n // Return true if any of its four corners are visible\n return (\n el.contains(efp(rect.left, rect.top)) ||\n el.contains(efp(rect.right, rect.top)) ||\n el.contains(efp(rect.right, rect.bottom)) ||\n el.contains(efp(rect.left, rect.bottom))\n );\n }\n\n function softSelectFirstVisibleAsset() {\n const visibleAssets = assets.filter(asset => asset.layout.show);\n\n for (let i = 0; i < assetGalleryDOMNode.current.children.length; i++) {\n if (isElementVisible(assetGalleryDOMNode.current.children[i])) {\n onAssetSoftSelectedChanged(visibleAssets[i].key);\n break;\n }\n }\n }\n\n if (assets.length === 0) return;\n\n if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n if (softSelectedAssetKey === null) {\n softSelectFirstVisibleAsset();\n\n return;\n }\n }\n\n if (e.key === 'ArrowLeft') {\n const previousAssetIndex =\n assets.findIndex(asset => asset.key === softSelectedAssetKey) - 1;\n\n const previousAsset = assets[previousAssetIndex];\n\n if (previousAsset) {\n if (previousAsset.layout.show) {\n onAssetSoftSelectedChanged(previousAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'ArrowRight') {\n const nextAssetIndex = assets.findIndex(asset => asset.key === softSelectedAssetKey) + 1;\n\n const nextAsset = assets[nextAssetIndex];\n\n if (nextAsset) {\n if (nextAsset.layout.show) {\n onAssetSoftSelectedChanged(nextAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'Enter') {\n if (softSelectedAssetKey === null) return;\n\n if (selectedAssetKeys.includes(softSelectedAssetKey)) {\n onAssetUnselected(softSelectedAssetKey);\n } else {\n onAssetSelected(softSelectedAssetKey);\n }\n }\n },\n [\n assets,\n softSelectedAssetKey,\n onAssetSoftSelectedChanged,\n selectedAssetKeys,\n assetGalleryCompactRef\n ]\n );\n\n const handleClick = useCallback(() => {\n onAssetSoftSelectedChanged(null);\n }, []);\n\n // Add event listeners for keyboard navigation (soft select)\n useEffect(() => {\n if (softSelectable) {\n document.addEventListener('keydown', handleKeyPress);\n }\n\n return () => document.removeEventListener('keydown', handleKeyPress);\n }, [softSelectable, handleKeyPress]);\n\n useEffect(() => {\n if (softSelectable && softSelectedAssetKey !== null) {\n document.addEventListener('click', handleClick, true);\n }\n\n return () => document.removeEventListener('click', handleClick, true);\n }, [softSelectable, softSelectedAssetKey, handleClick]);\n\n return (\n <>\n <S.AssetGalleryBase\n ref={assetGalleryCompactRef}\n style={{ height: `${totalGalleryHeight}px` }}\n className={props.className}\n {...props}\n >\n {assets.map(\n asset =>\n asset.layout.show && (\n <React.Fragment key={`asset-gallery-${asset.layout.type}-${asset.key}`}>\n {asset.layout.type === 'groupLabel' && (\n <S.GroupLabel\n style={{\n transform: `translate3d(${asset.layout.translateX}px,${asset.layout.translateY}px, 0)`,\n height: `${asset.layout.height}px`\n }}\n >\n {asset.title}\n </S.GroupLabel>\n )}\n\n {asset.layout.type === 'asset' && (\n <S.AssetGalleryCardBase\n style={{\n transform: `translate3d(${asset.layout.translateX}px, ${asset.layout.translateY}px, 0)`,\n width: `${asset.layout.width}px`,\n height: `${asset.layout.height}px`,\n display: 'flex',\n justifyContent: 'center'\n }}\n >\n {viewMode === 'grid' ? (\n <AssetGalleryGridCard\n asset={asset}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n ) : (\n <AssetGalleryCompactCard\n asset={asset}\n activeSummaryCard={activeSummaryCard}\n displayIcon={displayIcon}\n hasHeightAndWidth={asset.layout.hasHeightAndWidth}\n collapseExtraInfo={asset.layout.width < 90}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n )}\n </S.AssetGalleryCardBase>\n )}\n </React.Fragment>\n )\n )}\n </S.AssetGalleryBase>\n </>\n );\n});\n\nAssetGalleryBase.propTypes = {\n /**\n * An array of assets to display in the gallery.\n */\n assets: PropTypes.arrayOf(PropTypes.shape(assetShape)),\n\n /**\n * Whether the asset gallery should render the Asset Summary Card on hover.\n */\n activeSummaryCard: PropTypes.bool,\n\n /**\n * Whether the asset gallery should display the Version Count or Verifications on default.\n */\n displayIcon: PropTypes.string,\n\n /**\n * The view mode of the gallery.\n */\n viewMode: PropTypes.oneOf(['compact', 'grid']),\n\n /**\n * The maximum height of thumbnails in the gallery. When the grid is computed the gallery will try\n * to have each row of the gallery as close to the max height as possible.\n */\n thumbnailMaxHeight: PropTypes.number,\n\n /**\n * Whether or not the asset gallery should have selectable asset cards\n */\n selectable: PropTypes.bool,\n\n /**\n * Whether or not the asset gallery should have custom borders on selected asset\n */\n customSelectedBorder: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * An array containing the key of all selected assets\n */\n selectedAssetKeys: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.arrayOf(PropTypes.number)\n ]).isRequired,\n\n /**\n * Scrollable element to attach event listeners to. Defaults to window.\n */\n scrollElement: PropTypes.instanceOf(Element),\n\n /**\n * The callback function when an asset is selected - returns the selected asset key\n */\n onAssetSelected: PropTypes.func.isRequired,\n\n /**\n * The callback function when an asset is unselected - returns the unselected asset key\n */\n onAssetUnselected: PropTypes.func.isRequired,\n\n /**\n * Whether or not the asset gallery should have soft selectable asset cards\n */\n softSelectable: PropTypes.bool,\n\n /**\n * A value containing the key of the soft selected asset or null\n */\n softSelectedAssetKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The callback function when soft selected asset changes - returns the selected asset key or null\n */\n onAssetSoftSelectedChanged: PropTypes.func.isRequired,\n\n /**\n * A function that returns a custom component to use for the card in the gallery - The function provides\n * `asset` as its first argument\n */\n component: PropTypes.func,\n\n /**\n * Optional className\n */\n className: PropTypes.string\n};\n\nexport default AssetGalleryBase;\n"],"names":["AssetGalleryBase","React","forwardRef","assets","assetsProp","activeSummaryCard","displayIcon","viewMode","thumbnailMaxHeight","selectable","customSelectedBorder","selectedAssetKeys","onAssetSelected","onAssetUnselected","softSelectable","softSelectedAssetKey","scrollElement","scrollElementProp","onAssetSoftSelectedChanged","component","props","forwardedRef","assetGalleryDOMNode","useRef","assetGalleryCompactRef","useMergedRefs","assetGalleryWidth","minimumRowAspectRatio","calculatedAssets","setAssets","useState","MAXIMUM_ROW_HEIGHT","useMemo","SPACE_BETWEEN_ASSETS","SPACE_UNDER_ASSETS","PRIMARY_SCROLL_BUFFER_HEIGHT","SECONDARY_SCROLL_BUFFER_HEIGHT","GRID_VIEW_MODE_ASSET_MIN_WIDTH","GRID_VIEW_MODE_ASSET_HEIGHT","MISSING_WIDTH_PLACEHOLDER","MISSING_HEIGHT_PLACEHOLDER","isBrowser","window","previousYOffset","pageYOffset","latestYOffset","scrollDirection","useIsomorphicLayoutEffect","current","throttledOnResize","throttle","onResize","resizeObserver","ResizeObserver","observe","entries","forEach","entry","contentRect","width","requestAnimationFrame","main","unobserve","useEffect","calculateAssetGalleryAspectRatio","calculateLayout","calculateVisibility","calculateAspectRatio","assetsWithoutAKey","filter","a","key","length","console","warn","row","translateX","translateY","computedAssets","lastGroup","desiredAssetCountInRow","Math","floor","desiredAssetWidth","asset","index","group","push","title","layout","type","height","round","rowHeight","rowAsset","rowAspectRatio","max","totalDesiredWidthOfImages","assetWidth","hasHeightAndWidth","Boolean","totalGalleryHeight","lastAsset","throttledOnScroll","onScroll","addEventListener","removeEventListener","setScrollPositionAndDirection","newYOffset","bufferTop","bufferBottom","containerOffset","getOffsetTop","scrollerHeight","innerHeight","yOffset","minTranslateYPlusHeight","maxTranslateY","finalizedAssets","map","self","show","elem","offsetTop","isNaN","offsetParent","handleKeyPress","useCallback","e","isElementVisible","el","rect","getBoundingClientRect","vWidth","innerWidth","document","documentElement","clientWidth","vHeight","clientHeight","efp","x","y","elementFromPoint","right","bottom","left","top","contains","softSelectFirstVisibleAsset","visibleAssets","i","children","previousAssetIndex","findIndex","previousAsset","nextAssetIndex","nextAsset","includes","handleClick","createElement","Fragment","S","_extends","ref","style","className","transform","display","justifyContent","AssetGalleryGridCard","selected","extendedSelectMode","softSelected","AssetGalleryCompactCard","collapseExtraInfo","propTypes","process","env","NODE_ENV","PropTypes","arrayOf","shape","assetShape","bool","string","oneOf","number","oneOfType","isRequired","instanceOf","Element","func"],"mappings":";;;;;;;;;;;;AAUMA,MAAAA,gBAAgB,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,gBAAgBA,CACjE;AACEG,EAAAA,MAAM,EAAEC,UAAU;EAClBC,iBAAiB;EACjBC,WAAW;EACXC,QAAQ;EACRC,kBAAkB;EAClBC,UAAU;EACVC,oBAAoB;EACpBC,iBAAiB;EACjBC,eAAe;EACfC,iBAAiB;EACjBC,cAAc;EACdC,oBAAoB;AACpBC,EAAAA,aAAa,EAAEC,iBAAiB;EAChCC,0BAA0B;EAC1BC,SAAS;EACT,GAAGC,KAAAA;AACL,CAAC,EACDC,YAAY,EACZ;AAEA,EAAA,MAAMC,mBAAmB,GAAGC,MAAM,EAAE,CAAA;AACpC,EAAA,MAAMC,sBAAs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KAAK,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;EAM9ClL,kBAAkB,EAAE4K,SAAS,CAACO,MAAM;EAKpClL,UAAU,EAAE2K,SAAS,CAACI,IAAI;EAK1B9K,oBAAoB,EAAE0K,SAAS,CAACC,OAAO,CAACD,SAAS,CAACK,MAAM,CAAC;EAKzD9K,iBAAiB,EAAEyK,SAAS,CAACQ,SAAS,CAAC,CACrCR,SAAS,CAACC,OAAO,CAACD,SAAS,CAACK,MAAM,CAAC,EACnCL,SAAS,CAACC,OAAO,CAACD,SAAS,CAACO,MAAM,CAAC,CACpC,CAAC,CAACE,UAAU;AAKb7K,EAAAA,aAAa,EAAEoK,SAAS,CAACU,UAAU,CAACC,OAAO,CAAC;AAK5CnL,EAAAA,eAAe,EAAEwK,SAAS,CAACY,IAAI,CAACH,UAAU;AAK1ChL,EAAAA,iBAAiB,EAAEuK,SAAS,CAACY,IAAI,CAACH,UAAU;EAK5C/K,cAAc,EAAEsK,SAAS,CAACI,IAAI;AAK9BzK,EAAAA,oBAAoB,EAAEqK,SAAS,CAACQ,SAAS,CAAC,CAACR,SAAS,CAACK,MAAM,EAAEL,SAAS,CAACO,MAAM,CAAC,CAAC;AAK/EzK,EAAAA,0BAA0B,EAAEkK,SAAS,CAACY,IAAI,CAACH,UAAU;EAMrD1K,SAAS,EAAEiK,SAAS,CAACY,IAAI;EAKzB1B,SAAS,EAAEc,SAAS,CAACK,MAAAA;AACvB,CAAC,GAAA,EAAA;;;;"}
1
+ {"version":3,"file":"AssetGalleryBase.js","sources":["../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { throttle } from 'lodash';\nimport PropTypes from 'prop-types';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { assetShape } from '../asset.propType';\nimport useIsomorphicLayoutEffect from './../../../../hooks/useIsomorphicLayoutEffect';\nimport * as S from './AssetGalleryBase.styled';\nimport AssetGalleryCompactCard from './AssetGalleryCompactCard/AssetGalleryCompactCard';\nimport AssetGalleryGridCard from './AssetGalleryGridCard/AssetGalleryGridCard';\nconst AssetGalleryBase = React.forwardRef(function AssetGalleryBase(\n {\n assets: assetsProp,\n activeSummaryCard,\n displayIcon,\n viewMode,\n thumbnailMaxHeight,\n selectable,\n customSelectedBorder,\n selectedAssetKeys,\n onAssetSelected,\n onAssetUnselected,\n softSelectable,\n softSelectedAssetKey,\n scrollElement: scrollElementProp,\n onAssetSoftSelectedChanged,\n component,\n ...props\n },\n forwardedRef\n) {\n // Combine forwarded ref and the local ref\n const assetGalleryDOMNode = useRef();\n const assetGalleryCompactRef = useMergedRefs(forwardedRef, assetGalleryDOMNode);\n\n const assetGalleryWidth = useRef(0);\n const minimumRowAspectRatio = useRef(0);\n\n // Calculated assets\n const calculatedAssets = useRef([]);\n const [assets, setAssets] = useState([]);\n\n // Constants\n const MAXIMUM_ROW_HEIGHT = useMemo(\n () => (viewMode === 'grid' ? 450 : thumbnailMaxHeight),\n [viewMode, thumbnailMaxHeight]\n );\n const SPACE_BETWEEN_ASSETS = 8;\n const SPACE_UNDER_ASSETS = 8;\n const PRIMARY_SCROLL_BUFFER_HEIGHT = 1500;\n const SECONDARY_SCROLL_BUFFER_HEIGHT = 500;\n const GRID_VIEW_MODE_ASSET_MIN_WIDTH = 300;\n const GRID_VIEW_MODE_ASSET_HEIGHT = 556;\n const MISSING_WIDTH_PLACEHOLDER = 1920;\n const MISSING_HEIGHT_PLACEHOLDER = 1080;\n\n const isBrowser = typeof window !== 'undefined';\n\n const scrollElement = scrollElementProp || window;\n\n // Scroll position and direction\n const previousYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const latestYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const scrollDirection = useRef('down');\n\n // Track resize changes and set the current Asset Gallery width\n useIsomorphicLayoutEffect(() => {\n if (!assetGalleryDOMNode.current) return;\n\n const throttledOnResize = throttle(onResize, 1);\n\n const resizeObserver = new ResizeObserver(throttledOnResize);\n\n resizeObserver.observe(assetGalleryDOMNode.current);\n\n function onResize(entries) {\n entries.forEach(entry => {\n // setAssetGalleryWidth(entry.contentRect.width);\n if (assetGalleryWidth.current === entry.contentRect.width) return;\n window.requestAnimationFrame(() => {\n assetGalleryWidth.current = entry.contentRect.width;\n main();\n });\n });\n }\n\n return () => {\n resizeObserver.unobserve(assetGalleryDOMNode.current);\n };\n }, [assetsProp, assetGalleryDOMNode, MAXIMUM_ROW_HEIGHT]);\n\n //Re calculate Asset Gallery when something changes `MAXIMUM_ROW_HEIGHT` or `assetsProp` changes\n useEffect(() => {\n main();\n }, [MAXIMUM_ROW_HEIGHT, assetsProp]);\n\n const main = () => {\n calculateAssetGalleryAspectRatio();\n calculateLayout();\n calculateVisibility();\n };\n\n const calculateAssetGalleryAspectRatio = () => {\n // We don't care to compute the aspect ratio if the width of the gallery is 0\n if (assetGalleryWidth.current > 0) {\n minimumRowAspectRatio.current = calculateAspectRatio(\n assetGalleryWidth.current,\n MAXIMUM_ROW_HEIGHT\n );\n }\n };\n\n // Calculate asset gallery layout\n const calculateLayout = () => {\n // Check for required attributes and omit assets that are missing the attribute\n const assetsWithoutAKey = assetsProp.filter(a => !a.key);\n if (assetsWithoutAKey.length > 0) {\n assetsProp = assetsProp.filter(a => a.key);\n assetsWithoutAKey.forEach(a =>\n console.warn(\n 'Omitted asset from the gallery because it was missing the unique `key` property.',\n a\n )\n );\n }\n\n if (viewMode === 'grid' && assetGalleryWidth.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n const computedAssets = [];\n let lastGroup = null; // The last group that was created\n\n // Calculate how many assets we can put in a row before violating `ASSET_MIN_WIDTH`\n // but we always want minimum of 1 asset in a row\n const desiredAssetCountInRow =\n Math.floor(assetGalleryWidth.current / GRID_VIEW_MODE_ASSET_MIN_WIDTH) || 1;\n\n // Calculate the width of each asset in a row\n const desiredAssetWidth =\n assetGalleryWidth.current / desiredAssetCountInRow -\n SPACE_BETWEEN_ASSETS +\n SPACE_BETWEEN_ASSETS / desiredAssetCountInRow;\n\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n row.push(asset);\n\n if (\n row.length === desiredAssetCountInRow ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n const rowHeight = GRID_VIEW_MODE_ASSET_HEIGHT;\n\n row.forEach(rowAsset => {\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset and not a group label\n width: Math.round(desiredAssetWidth),\n height: Math.round(rowHeight),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n\n translateX += desiredAssetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n row = [];\n translateX = 0;\n translateY += rowHeight + SPACE_UNDER_ASSETS;\n }\n });\n\n calculatedAssets.current = computedAssets;\n } else {\n if (minimumRowAspectRatio.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n let rowAspectRatio = 0; // The aspect ratio of the row we are building\n let lastGroup = null; // The last group that was created\n\n const computedAssets = [];\n\n // Loop through all our images, building them up into rows and computing\n // the working rowAspectRatio.\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n rowAspectRatio += calculateAspectRatio(\n asset.width || MISSING_WIDTH_PLACEHOLDER,\n asset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n row.push(asset);\n\n // End the row if any of the conditions match\n if (\n rowAspectRatio >= minimumRowAspectRatio.current ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n // Make sure that the last row also has a reasonable height\n rowAspectRatio = Math.max(rowAspectRatio, minimumRowAspectRatio.current);\n\n // Compute this row's height.\n const totalDesiredWidthOfImages =\n assetGalleryWidth.current - SPACE_BETWEEN_ASSETS * (row.length - 1);\n const rowHeight = totalDesiredWidthOfImages / rowAspectRatio;\n\n row.forEach(rowAsset => {\n const assetWidth =\n rowHeight *\n calculateAspectRatio(\n rowAsset.width || MISSING_WIDTH_PLACEHOLDER,\n rowAsset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset an not a group label\n width: Math.round(assetWidth),\n height: Math.round(rowHeight),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY),\n hasHeightAndWidth: Boolean(rowAsset.width && rowAsset.height)\n }\n });\n\n // The next image is `SPACE_BETWEEN_ASSETS` pixels to the right of this image.\n translateX += assetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n // Reset our state variables for next row.\n row = [];\n rowAspectRatio = 0;\n translateY += rowHeight + SPACE_UNDER_ASSETS;\n translateX = 0;\n }\n });\n\n calculatedAssets.current = computedAssets;\n }\n }\n };\n\n // Utility function to calculate the aspect ratio of a width and height\n function calculateAspectRatio(width, height) {\n return width / height;\n }\n\n // Calculate the total height of the gallery\n const totalGalleryHeight = useMemo(() => {\n if (assets.length === 0) {\n return 0;\n }\n\n const lastAsset = assets[assets.length - 1];\n\n if (assets.length < 8) {\n return (lastAsset.layout.translateY + lastAsset.layout.height) * 2;\n }\n\n return lastAsset.layout.translateY + lastAsset.layout.height;\n }, [assets]);\n\n useEffect(() => {\n const throttledOnScroll = throttle(onScroll, 200);\n\n scrollElement.addEventListener('scroll', throttledOnScroll, false);\n return () => scrollElement.removeEventListener('scroll', throttledOnScroll, false);\n }, [assetGalleryDOMNode, calculatedAssets]);\n\n function onScroll() {\n setScrollPositionAndDirection();\n calculateVisibility();\n }\n\n function setScrollPositionAndDirection() {\n const newYOffset = scrollElement.pageYOffset;\n previousYOffset.current = latestYOffset.current;\n latestYOffset.current = newYOffset;\n scrollDirection.current = latestYOffset.current > previousYOffset.current ? 'down' : 'up';\n }\n\n /**\n * +---------------------------+\n * | |\n * | |\n * | |\n * | |\n * + - - - - - - - - - - - - - + -------\n * | | A\n * | Secondary Buffer | SECONDARY_SCROLL_BUFFER_HEIGHT\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | Viewport | window.innerHeight\n * | | |\n * | | |\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | | |\n * | Primary Buffer | PRIMARY_SCROLL_BUFFER_HEIGHT\n * | | |\n * | | |\n * | | |\n * | | V\n * + - - - - - - - - - - - - - + -------\n * | |\n * | (Scroll direction) |\n * | | |\n * | | |\n * | V |\n * | |\n *\n */\n\n const calculateVisibility = () => {\n if (!assetGalleryDOMNode.current) return;\n\n // Get the top and bottom buffers heights.\n const bufferTop =\n scrollDirection.current === 'up'\n ? PRIMARY_SCROLL_BUFFER_HEIGHT\n : SECONDARY_SCROLL_BUFFER_HEIGHT;\n\n const bufferBottom =\n scrollDirection.current === 'up'\n ? SECONDARY_SCROLL_BUFFER_HEIGHT\n : PRIMARY_SCROLL_BUFFER_HEIGHT;\n\n const containerOffset = getOffsetTop(assetGalleryDOMNode.current);\n const scrollerHeight = scrollElement.innerHeight;\n\n const yOffset = latestYOffset.current;\n\n // This is the top of the top buffer. If the bottom of an image is above\n // this line, it will be removed.\n const minTranslateYPlusHeight = yOffset - containerOffset - bufferTop;\n\n // This is the bottom of the bottom buffer. If the top of an image is\n // below this line, it will be removed.\n const maxTranslateY = yOffset - containerOffset + scrollerHeight + bufferBottom;\n\n const finalizedAssets = calculatedAssets.current.map(asset => {\n if (\n scrollElement.self == window &&\n (asset.layout.translateY + asset.layout.height < minTranslateYPlusHeight ||\n asset.layout.translateY > maxTranslateY)\n ) {\n // Hide Image\n asset.layout.show = false;\n } else {\n // Show Image\n asset.layout.show = true;\n }\n\n return asset;\n });\n\n setAssets(finalizedAssets);\n };\n\n // Utility function that returns the distance from `elem` to the top of the page.\n // This is done by walking up the node tree, getting the offsetTop of each\n // parent node, until the top of the page.\n function getOffsetTop(elem) {\n let offsetTop = 0;\n do {\n if (!isNaN(elem.offsetTop)) {\n offsetTop += elem.offsetTop;\n }\n elem = elem.offsetParent;\n } while (elem);\n return offsetTop;\n }\n\n const handleKeyPress = useCallback(\n e => {\n function isElementVisible(el) {\n const rect = el.getBoundingClientRect(),\n vWidth = scrollElement.innerWidth || document.documentElement.clientWidth,\n vHeight = scrollElement.innerHeight || document.documentElement.clientHeight,\n efp = function (x, y) {\n return document.elementFromPoint(x, y);\n };\n\n // Return false if it's not in the viewport\n if (rect.right < 0 || rect.bottom < 0 || rect.left > vWidth || rect.top > vHeight)\n return false;\n\n // Return true if any of its four corners are visible\n return (\n el.contains(efp(rect.left, rect.top)) ||\n el.contains(efp(rect.right, rect.top)) ||\n el.contains(efp(rect.right, rect.bottom)) ||\n el.contains(efp(rect.left, rect.bottom))\n );\n }\n\n function softSelectFirstVisibleAsset() {\n const visibleAssets = assets.filter(asset => asset.layout.show);\n\n for (let i = 0; i < assetGalleryDOMNode.current.children.length; i++) {\n if (isElementVisible(assetGalleryDOMNode.current.children[i])) {\n onAssetSoftSelectedChanged(visibleAssets[i].key);\n break;\n }\n }\n }\n\n if (assets.length === 0) return;\n\n if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n if (softSelectedAssetKey === null) {\n softSelectFirstVisibleAsset();\n\n return;\n }\n }\n\n if (e.key === 'ArrowLeft') {\n const previousAssetIndex =\n assets.findIndex(asset => asset.key === softSelectedAssetKey) - 1;\n\n const previousAsset = assets[previousAssetIndex];\n\n if (previousAsset) {\n if (previousAsset.layout.show) {\n onAssetSoftSelectedChanged(previousAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'ArrowRight') {\n const nextAssetIndex = assets.findIndex(asset => asset.key === softSelectedAssetKey) + 1;\n\n const nextAsset = assets[nextAssetIndex];\n\n if (nextAsset) {\n if (nextAsset.layout.show) {\n onAssetSoftSelectedChanged(nextAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'Enter') {\n if (softSelectedAssetKey === null) return;\n\n if (selectedAssetKeys.includes(softSelectedAssetKey)) {\n onAssetUnselected(softSelectedAssetKey);\n } else {\n onAssetSelected(softSelectedAssetKey);\n }\n }\n },\n [\n assets,\n softSelectedAssetKey,\n onAssetSoftSelectedChanged,\n selectedAssetKeys,\n assetGalleryCompactRef\n ]\n );\n\n const handleClick = useCallback(() => {\n onAssetSoftSelectedChanged(null);\n }, []);\n\n // Add event listeners for keyboard navigation (soft select)\n useEffect(() => {\n if (softSelectable) {\n document.addEventListener('keydown', handleKeyPress);\n }\n\n return () => document.removeEventListener('keydown', handleKeyPress);\n }, [softSelectable, handleKeyPress]);\n\n useEffect(() => {\n if (softSelectable && softSelectedAssetKey !== null) {\n document.addEventListener('click', handleClick, true);\n }\n\n return () => document.removeEventListener('click', handleClick, true);\n }, [softSelectable, softSelectedAssetKey, handleClick]);\n\n return (\n <>\n <S.AssetGalleryBase\n ref={assetGalleryCompactRef}\n style={{ height: `${totalGalleryHeight}px` }}\n className={props.className}\n {...props}\n >\n {assets.map(\n asset =>\n asset.layout.show && (\n <React.Fragment key={`asset-gallery-${asset.layout.type}-${asset.key}`}>\n {asset.layout.type === 'groupLabel' && (\n <S.GroupLabel\n style={{\n transform: `translate3d(${asset.layout.translateX}px,${asset.layout.translateY}px, 0)`,\n height: `${asset.layout.height}px`\n }}\n >\n {asset.title}\n </S.GroupLabel>\n )}\n\n {asset.layout.type === 'asset' && (\n <S.AssetGalleryCardBase\n style={{\n transform: `translate3d(${asset.layout.translateX}px, ${asset.layout.translateY}px, 0)`,\n width: `${asset.layout.width}px`,\n height: `${asset.layout.height}px`,\n display: 'flex',\n justifyContent: 'center'\n }}\n >\n {viewMode === 'grid' ? (\n <AssetGalleryGridCard\n asset={asset}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n ) : (\n <AssetGalleryCompactCard\n asset={asset}\n activeSummaryCard={activeSummaryCard}\n displayIcon={displayIcon}\n hasHeightAndWidth={asset.layout.hasHeightAndWidth}\n collapseExtraInfo={asset.layout.width < 90}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n )}\n </S.AssetGalleryCardBase>\n )}\n </React.Fragment>\n )\n )}\n </S.AssetGalleryBase>\n </>\n );\n});\n\nAssetGalleryBase.propTypes = {\n /**\n * An array of assets to display in the gallery.\n */\n assets: PropTypes.arrayOf(PropTypes.shape(assetShape)),\n\n /**\n * Whether the asset gallery should render the Asset Summary Card on hover.\n */\n activeSummaryCard: PropTypes.bool,\n\n /**\n * Whether the asset gallery should display the Version Count or Verifications on default.\n */\n displayIcon: PropTypes.string,\n\n /**\n * The view mode of the gallery.\n */\n viewMode: PropTypes.oneOf(['compact', 'grid']),\n\n /**\n * The maximum height of thumbnails in the gallery. When the grid is computed the gallery will try\n * to have each row of the gallery as close to the max height as possible.\n */\n thumbnailMaxHeight: PropTypes.number,\n\n /**\n * Whether or not the asset gallery should have selectable asset cards\n */\n selectable: PropTypes.bool,\n\n /**\n * Whether or not the asset gallery should have custom borders on selected asset\n */\n customSelectedBorder: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * An array containing the key of all selected assets\n */\n selectedAssetKeys: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.arrayOf(PropTypes.number)\n ]).isRequired,\n\n /**\n * Scrollable element to attach event listeners to. Defaults to window.\n */\n scrollElement: PropTypes.instanceOf(Element),\n\n /**\n * The callback function when an asset is selected - returns the selected asset key\n */\n onAssetSelected: PropTypes.func.isRequired,\n\n /**\n * The callback function when an asset is unselected - returns the unselected asset key\n */\n onAssetUnselected: PropTypes.func.isRequired,\n\n /**\n * Whether or not the asset gallery should have soft selectable asset cards\n */\n softSelectable: PropTypes.bool,\n\n /**\n * A value containing the key of the soft selected asset or null\n */\n softSelectedAssetKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The callback function when soft selected asset changes - returns the selected asset key or null\n */\n onAssetSoftSelectedChanged: PropTypes.func.isRequired,\n\n /**\n * A function that returns a custom component to use for the card in the gallery - The function provides\n * `asset` as its first argument\n */\n component: PropTypes.func,\n\n /**\n * Optional className\n */\n className: PropTypes.string\n};\n\nexport default AssetGalleryBase;\n"],"names":["AssetGalleryBase","React","forwardRef","assets","assetsProp","activeSummaryCard","displayIcon","viewMode","thumbnailMaxHeight","selectable","customSelectedBorder","selectedAssetKeys","onAssetSelected","onAssetUnselected","softSelectable","softSelectedAssetKey","scrollElement","scrollElementProp","onAssetSoftSelectedChanged","component","props","forwardedRef","assetGalleryDOMNode","useRef","assetGalleryCompactRef","useMergedRefs","assetGalleryWidth","minimumRowAspectRatio","calculatedAssets","setAssets","useState","MAXIMUM_ROW_HEIGHT","useMemo","SPACE_BETWEEN_ASSETS","SPACE_UNDER_ASSETS","PRIMARY_SCROLL_BUFFER_HEIGHT","SECONDARY_SCROLL_BUFFER_HEIGHT","GRID_VIEW_MODE_ASSET_MIN_WIDTH","GRID_VIEW_MODE_ASSET_HEIGHT","MISSING_WIDTH_PLACEHOLDER","MISSING_HEIGHT_PLACEHOLDER","isBrowser","window","previousYOffset","pageYOffset","latestYOffset","scrollDirection","useIsomorphicLayoutEffect","current","throttledOnResize","throttle","onResize","resizeObserver","ResizeObserver","observe","entries","forEach","entry","contentRect","width","requestAnimationFrame","main","unobserve","useEffect","calculateAssetGalleryAspectRatio","calculateLayout","calculateVisibility","calculateAspectRatio","assetsWithoutAKey","filter","a","key","length","console","warn","row","translateX","translateY","computedAssets","lastGroup","desiredAssetCountInRow","Math","floor","desiredAssetWidth","asset","index","group","push","title","layout","type","height","round","rowHeight","rowAsset","rowAspectRatio","max","totalDesiredWidthOfImages","assetWidth","hasHeightAndWidth","Boolean","totalGalleryHeight","lastAsset","throttledOnScroll","onScroll","addEventListener","removeEventListener","setScrollPositionAndDirection","newYOffset","bufferTop","bufferBottom","containerOffset","getOffsetTop","scrollerHeight","innerHeight","yOffset","minTranslateYPlusHeight","maxTranslateY","finalizedAssets","map","self","show","elem","offsetTop","isNaN","offsetParent","handleKeyPress","useCallback","e","isElementVisible","el","rect","getBoundingClientRect","vWidth","innerWidth","document","documentElement","clientWidth","vHeight","clientHeight","efp","x","y","elementFromPoint","right","bottom","left","top","contains","softSelectFirstVisibleAsset","visibleAssets","i","children","previousAssetIndex","findIndex","previousAsset","nextAssetIndex","nextAsset","includes","handleClick","createElement","Fragment","S","_extends","ref","style","className","transform","display","justifyContent","AssetGalleryGridCard","selected","extendedSelectMode","softSelected","AssetGalleryCompactCard","collapseExtraInfo","propTypes","process","env","NODE_ENV","PropTypes","arrayOf","shape","assetShape","bool","string","oneOf","number","oneOfType","isRequired","instanceOf","Element","func"],"mappings":";;;;;;;;;;;;AAUMA,MAAAA,gBAAgB,GAAGC,cAAK,CAACC,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1K,SAAS,EAAEiK,SAAS,CAACY,IAAI;EAKzB1B,SAAS,EAAEc,SAAS,CAACK,MAAAA;AACvB,CAAC,GAAA,EAAA;;;;"}
@@ -32,7 +32,7 @@ import '../../../../inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js'
32
32
  import ContextMenu from '../../../ContextMenu/ContextMenu.js';
33
33
  import ContextMenuItem from '../../../ContextMenu/ContextMenuItem/ContextMenuItem.js';
34
34
  import { assetShapeWithLayout } from '../../asset.propType.js';
35
- import { AssetGalleryWrapper, AssetGalleryGridCard as AssetGalleryGridCard$2, ThumbnailSection, ThumbnailSelectedOverlay, HorizontalBar, HorizontalBarLeft, HorizontalBarRight, StatusIconCircle, ThumbnailRow, ThumbnailSpacer, ThumbnailWrapper, ThumbnailBox, ConsumerOverlay, ThumbnailActions, ActionsContainer, Action, CardBody, CardTitle, CardDescription, InstructionsWrapper, CardDivider, CardFooter, CardFooterLeft, CardFooterRight, CheckboxRow } from './AssetGalleryGridCard.styled.js';
35
+ import { AssetGalleryWrapper, AssetGalleryGridCard as AssetGalleryGridCard$2, ThumbnailSection, ThumbnailSelectedOverlay, HorizontalBar, HorizontalBarLeft, HorizontalBarRight, StatusIconCircle, ThumbnailRow, ThumbnailSpacer, ThumbnailWrapper, ThumbnailBox, ConsumerOverlay, ThumbnailActions, ActionsContainer, Action, CardBody, CardTitle, CardDescription, InstructionsWrapper, CardFooter, CardFooterLeft, CardFooterRight, CardDivider, CheckboxRow } from './AssetGalleryGridCard.styled.js';
36
36
  import InstructionSeverityDisplay from '../../../InstructionSeverityDisplay/InstructionSeverityDisplay.js';
37
37
 
38
38
  const ComputedRootComponent = ({
@@ -331,21 +331,22 @@ const AssetGalleryGridCard = props => {
331
331
  title: asset.title || ''
332
332
  }, asset.title || ''), React__default.createElement(CardDescription, {
333
333
  title: asset.description || ''
334
- }, asset.description || ''), React__default.createElement(InstructionsWrapper, null, asset.imageRights && React__default.createElement(InstructionSeverityDisplay, {
334
+ }, asset.description || ''), React__default.createElement(InstructionsWrapper, {
335
+ $hasContent: Boolean(asset.imageRights)
336
+ }, asset.imageRights && React__default.createElement(InstructionSeverityDisplay, {
335
337
  labels: asset.instructionLabels,
336
338
  instructionText: asset.imageRights,
337
339
  severity: asset.instructionSeverity,
338
340
  showCard: false,
339
- padding: "0px 0px",
341
+ padding: "16px",
340
342
  detailsFontSize: "12px",
341
- bgLight: 'transparent',
342
- bgDark: 'transparent',
343
+ bgLight: "transparent",
344
+ bgDark: "transparent",
343
345
  maxLines: 2
344
346
  })));
345
347
  };
346
348
  const renderConsentSummaryInfo = () => {
347
- const hasContent = asset.summary?.footerLeft || asset.summary?.footerRight;
348
- return React__default.createElement(React__default.Fragment, null, hasContent && React__default.createElement(CardDivider, null), React__default.createElement(CardFooter, null, React__default.createElement(CardFooterLeft, null, asset.summary?.footerLeft || null), React__default.createElement(CardFooterRight, null, asset.summary?.footerRight || null)), React__default.createElement(CardDivider, null));
349
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(CardFooter, null, React__default.createElement(CardFooterLeft, null, asset.summary?.footerLeft || null), React__default.createElement(CardFooterRight, null, asset.summary?.footerRight || null)), React__default.createElement(CardDivider, null));
349
350
  };
350
351
  const renderCheckboxRow = () => {
351
352
  return React__default.createElement(CheckboxRow, null, selectable && React__default.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"AssetGalleryGridCard.js","sources":["../../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js"],"sourcesContent":["import { get, isEmpty, isFunction, mapKeys, omit } from 'lodash';\nimport PropTypes from 'prop-types';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport {\n LazyLoadComponent,\n LazyLoadImage,\n trackWindowScroll\n} from 'react-lazy-load-image-component';\nimport { HeadsetIcon, LayersIcon, PlayIcon } from '../../../../../icons';\nimport { convertMsToHMS } from '../../../../../utils/dateTime';\nimport { Badge, Popover, Tooltip } from '../../../../data';\nimport { ActionButton, Checkbox } from '../../../../inputs';\nimport ContextMenu from '../../../ContextMenu/ContextMenu';\nimport ContextMenuItem from '../../../ContextMenu/ContextMenuItem/ContextMenuItem';\nimport { assetShapeWithLayout } from '../../asset.propType';\nimport * as S from './AssetGalleryGridCard.styled';\nimport InstructionSeverityDisplay from '../../../InstructionSeverityDisplay';\n\n/**\n >>> Section 1: renderThumbnail():\n┌─────────────────────────────────────────┐ ← S.AssetGalleryGridCard (Root)\n│[renderversionsBadge] [severityIcon]│ ← S.HorizontalBar (Top)\n├─────────────────────────────────────────┤\n│ │ │ │\n│ (spacer) │ [renderPreview]│ [action]│ ← S.ThumbnailRow (Inc. ComputedActionButton)\n│ │ │ [action]│ ← S.ActionsContainer\n│ │ │ │\n├─────────────────────────────────────────┤\n│ [renderMediaBadge] │ ← S.HorizontalBar (Bottom)\n├─────────────────────────────────────────┤\n│ | >>> Section 2: renderDetails():\n│ [asset.title] │ ← S.CardTitle\n│ [asset.description] │ ← S.CardDescription\n├─────────────────────────────────────────┤\n│ [InstructionSeverityDisplay] │ ← S.InstructionsWrapper\n| |\n| | >>> Section 3:renderConsentSummaryInfo():\n├─────────────────────────────────────────┤ ← S.CardDivider\n│ [footerLeft] [footerRight] │ ← S.CardFooter\n├─────────────────────────────────────────┤ ← S.CardDivider\n| |\n│ | >>> Section 4:renderCheckboxRow():\n│ [CheckRectangleIcon / Outline] │ ← S.CheckboxRow\n└─────────────────────────────────────────┘\n Approx Height: 536px (Updated severity card takes more space than XD Design)\n Note: Every block renders ALWAYS to maintain same height+alignment in gallery\n */\n\n// eslint-disable-next-line react/prop-types\nconst ComputedRootComponent = ({ component, asset, ...props }) => {\n // Omit props we don't need\n const newProps = mapKeys(\n omit(props, [\n 'theme',\n 'extendedSelectMode',\n 'softSelected',\n '$softSelected',\n 'customSelectedBorder',\n '$customSelectedBorder',\n 'isCardHovered',\n '$isCardHovered',\n 'completed',\n '$hasError'\n ]),\n (_, key) => (key === 'innerRef' ? 'ref' : key)\n );\n\n if (component) {\n if (!isFunction(component)) throw Error('Expected a function in component-prop');\n\n if (React.isValidElement(component(asset, newProps.children))) {\n return React.cloneElement(component(asset, newProps.children), omit(newProps, ['children']));\n }\n }\n\n return <S.AssetGalleryGridCard ref={newProps.ref} {...newProps} />;\n};\n\n/* eslint-disable react/prop-types */\nconst ComputedActionButton = React.forwardRef(function ComputedActionButton(\n // eslint-disable-next-line react/prop-types\n { component, className, subActions = [], isSubActionsOpened, ...props },\n forwardedRef\n) {\n const newProps = props;\n if (!isEmpty(subActions)) {\n const contextMenuItems = subActions.map((subAction, key) => {\n const { onClick, title, icon } = subAction;\n return <ContextMenuItem key={key} onClickEffect={onClick} title={title} icon={icon} />;\n });\n const contextMenu = <ContextMenu>{contextMenuItems}</ContextMenu>;\n newProps.children = (\n <Popover\n contextMenu={true}\n content={contextMenu}\n placement={'bottom-end'}\n visible={isSubActionsOpened}\n zIndex={10001}\n offset={[0, -8]}\n >\n <ActionButton\n useShadow={false}\n active={true}\n ref={forwardedRef}\n className={className}\n icon={newProps.icon}\n backgroundColors={['black', 'white']}\n onClick={newProps.onClick}\n actionWidthHeight={[40, 40]}\n />\n </Popover>\n );\n } else {\n newProps.children = (\n <ActionButton\n useShadow={false}\n active={true}\n ref={forwardedRef}\n className={className}\n icon={newProps.icon}\n onClick={newProps.onClick}\n backgroundColors={['black', 'white']}\n actionWidthHeight={[40, 40]}\n />\n );\n }\n\n if (component) {\n if (!isFunction(component)) throw Error('Expected a function in component-prop');\n\n if (React.isValidElement(component())) {\n return React.cloneElement(component(), { ...omit(newProps, 'icon') });\n }\n }\n\n return <React.Fragment>{newProps.children}</React.Fragment>;\n});\n/* eslint-disable react/prop-types */\n\nconst AssetGalleryGridCard = props => {\n const {\n asset,\n selectable,\n selected,\n customSelectedBorder,\n extendedSelectMode,\n onAssetSelected,\n onAssetUnselected,\n softSelected,\n component,\n scrollPosition\n } = props;\n\n const [isCardHovered, setIsCardHovered] = React.useState(false);\n const [openedSubActions, updateOpenedSubActions] = React.useState([]);\n useEffect(() => {\n const newOpenedSubActions = (asset?.actions ?? []).map(() => false);\n updateOpenedSubActions(newOpenedSubActions);\n }, [asset]);\n\n useEffect(() => {\n if (!isCardHovered && openedSubActions?.length) {\n updateOpenedSubActions(openedSubActions.map(() => false));\n }\n }, [isCardHovered]);\n\n const mouseHasEnteredCard = useCallback(() => {\n setIsCardHovered(true);\n }, []);\n\n const mouseHasLeftCard = useCallback(() => {\n setIsCardHovered(false);\n }, []);\n\n const onSubActionsViewToggle = useCallback(\n actionIndex => {\n const newOpenedSubActions = openedSubActions.map((isOpened, index) => {\n if (index !== actionIndex) {\n return false;\n }\n return !isOpened;\n });\n updateOpenedSubActions(newOpenedSubActions);\n },\n [openedSubActions]\n );\n\n const videoPlayerRef = useRef();\n const cardRef = useRef();\n const dragRef = useRef(null);\n\n function onMouseEnter(event) {\n if (videoPlayerRef.current) {\n const playPromise = videoPlayerRef.current.play();\n if (playPromise !== undefined) {\n playPromise\n .then(() => {\n // Playback started!\n })\n .catch(() => {\n // Play was prevented - silently swallow play errors\n });\n }\n }\n\n if (isFunction(asset.onMouseEnter)) {\n asset.onMouseEnter(event, asset);\n }\n\n mouseHasEnteredCard();\n }\n\n function onMouseLeave() {\n if (videoPlayerRef.current) {\n videoPlayerRef.current.pause();\n }\n\n mouseHasLeftCard();\n }\n\n function onClick(event) {\n if (extendedSelectMode) {\n return onSelectClick(event);\n }\n\n if (isFunction(asset.onClick)) {\n asset.onClick(event, asset);\n }\n }\n\n function onSelectClick(event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (selected) {\n return onAssetUnselected(asset.key);\n }\n\n return onAssetSelected(asset.key);\n }\n\n const onActionClick = useCallback(\n (event, action, index) => {\n event.preventDefault();\n event.stopPropagation();\n\n if (isFunction(action?.onClick)) {\n action.onClick(asset);\n }\n\n if (!isEmpty(action?.subActions)) {\n onSubActionsViewToggle(index);\n }\n },\n [onSubActionsViewToggle]\n );\n\n const shouldOpenSubActions = useCallback(\n actionIndex => openedSubActions[actionIndex],\n [openedSubActions]\n );\n\n function onContextMenu(event) {\n event.preventDefault();\n asset.onContextMenu(event);\n }\n\n function renderPreview(asset) {\n let previewContent = null;\n\n if (asset.fileType?.toLowerCase() === 'video') {\n previewContent = (\n <LazyLoadComponent scrollPosition={scrollPosition}>\n <video ref={videoPlayerRef} loop muted>\n <source src={asset.previewUrl} type=\"video/mp4\" />\n </video>\n </LazyLoadComponent>\n );\n } else if (asset.fileType?.toLowerCase() === 'audio') {\n previewContent = (\n <LazyLoadComponent scrollPosition={scrollPosition}>\n <div className=\"audio\">\n <HeadsetIcon />\n </div>\n </LazyLoadComponent>\n );\n } else {\n previewContent = (\n <LazyLoadImage\n alt={asset.title}\n src={asset.previewUrl}\n height=\"100%\"\n width=\"100%\"\n delayMethod=\"debounce\"\n delayTime={0}\n threshold={1500}\n scrollPosition={scrollPosition}\n />\n );\n }\n\n return previewContent;\n }\n\n useEffect(() => {\n if (isFunction(asset.onContextMenu)) {\n if (cardRef.current) {\n cardRef.current.addEventListener('contextmenu', onContextMenu);\n }\n return () => {\n if (cardRef.current) {\n cardRef.current.removeEventListener('contextmenu', onContextMenu);\n }\n };\n }\n }, []);\n\n function onDragstart(event) {\n asset.onDragstart(event);\n }\n\n useEffect(() => {\n if (isFunction(asset.onDragstart)) {\n if (dragRef.current) {\n dragRef.current.addEventListener('dragstart', onDragstart);\n }\n return () => {\n if (dragRef.current) {\n dragRef.current.removeEventListener('dragstart', onDragstart);\n }\n };\n }\n }, []);\n\n // If this asset is soft selected we will scroll it into the viewport if it's outside\n useEffect(() => {\n if (softSelected) {\n cardRef.current.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n }, [softSelected]);\n\n const renderVersionsBadge = useCallback(() => {\n if (!asset?.versions) return null;\n\n return (\n <Badge\n badgeIcon={<LayersIcon />}\n badgeContent={asset.versions}\n backgroundColors={['black', 'black']}\n colors={['#f7f8f9', '#f7f8f9']}\n fontSize={12}\n fontWeight={500}\n lineHeight={16}\n verticalPadding={4}\n horizontalPadding={8}\n />\n );\n }, [asset]);\n\n const renderMediaBadge = useCallback(() => {\n let badgeIcon = null;\n let badgeContent = null;\n\n if (asset?.fileType === 'video') {\n badgeIcon = <PlayIcon />;\n }\n\n if (asset?.duration) {\n badgeContent = convertMsToHMS(asset.duration);\n }\n\n if (!badgeIcon && !badgeContent) return null;\n return (\n <Badge\n badgeIcon={badgeIcon}\n badgeContent={badgeContent}\n backgroundColors={['black', 'black']}\n colors={['#f7f8f9', '#f7f8f9']}\n fontSize={12}\n fontWeight={500}\n lineHeight={16}\n verticalPadding={4}\n horizontalPadding={8}\n minWidth={32}\n height={24}\n />\n );\n }, [asset]);\n\n const renderThumbnail = () => {\n return (\n <S.ThumbnailSection>\n <S.ThumbnailSelectedOverlay selected={selected} />\n {/* Thumbnail Top bar */}\n <S.HorizontalBar>\n <S.HorizontalBarLeft>{renderVersionsBadge()}</S.HorizontalBarLeft>\n <S.HorizontalBarRight>\n {asset.statusIcon && <S.StatusIconCircle>{asset.statusIcon}</S.StatusIconCircle>}\n </S.HorizontalBarRight>\n </S.HorizontalBar>\n <S.ThumbnailRow>\n <S.ThumbnailSpacer />\n {/* Thumbnail */}\n <S.ThumbnailWrapper>\n <S.ThumbnailBox>\n {renderPreview(asset)}\n\n {asset.overlay && <S.ConsumerOverlay>{asset.overlay}</S.ConsumerOverlay>}\n </S.ThumbnailBox>\n </S.ThumbnailWrapper>\n <S.ThumbnailActions>\n <S.ActionsContainer>\n {(asset.actions ?? []).map((action, index) => (\n <Tooltip key={`${asset.key}-${action.title}`} content={action.title}>\n <S.Action>\n <ComputedActionButton\n component={action.component}\n className={action.className}\n icon={action.icon}\n isSubActionsOpened={shouldOpenSubActions(index)}\n onClick={event => onActionClick(event, action, index)}\n subActions={action?.subActions}\n actionWidthHeight={action.actionWidthHeight}\n />\n </S.Action>\n </Tooltip>\n ))}\n </S.ActionsContainer>\n </S.ThumbnailActions>\n </S.ThumbnailRow>\n {/* Thumbnail Bottom bar */}\n <S.HorizontalBar>\n <S.HorizontalBarLeft></S.HorizontalBarLeft>\n <S.HorizontalBarRight>{renderMediaBadge()}</S.HorizontalBarRight>\n </S.HorizontalBar>\n </S.ThumbnailSection>\n );\n };\n\n const renderDetails = () => {\n return (\n <S.CardBody>\n <S.CardTitle title={asset.title || ''}>{asset.title || ''}</S.CardTitle>\n <S.CardDescription title={asset.description || ''}>\n {asset.description || ''}\n </S.CardDescription>\n <S.InstructionsWrapper>\n {asset.imageRights && (\n <InstructionSeverityDisplay\n labels={asset.instructionLabels}\n instructionText={asset.imageRights}\n severity={asset.instructionSeverity}\n showCard={false}\n padding=\"0px 0px\"\n detailsFontSize=\"12px\"\n bgLight={'transparent'}\n bgDark={'transparent'}\n maxLines={2}\n />\n )}\n </S.InstructionsWrapper>\n </S.CardBody>\n );\n };\n\n const renderConsentSummaryInfo = () => {\n const hasContent = asset.summary?.footerLeft || asset.summary?.footerRight;\n return (\n <>\n {hasContent && <S.CardDivider />}\n <S.CardFooter>\n <S.CardFooterLeft>{asset.summary?.footerLeft || null}</S.CardFooterLeft>\n <S.CardFooterRight>{asset.summary?.footerRight || null}</S.CardFooterRight>\n </S.CardFooter>\n <S.CardDivider />\n </>\n );\n };\n\n const renderCheckboxRow = () => {\n return (\n <S.CheckboxRow>\n {selectable && (\n <div onClick={onSelectClick}>\n <Checkbox\n variant=\"black\"\n checked={selected}\n onChange={event => {\n if (event.target.checked) {\n onAssetSelected(asset.key);\n } else {\n onAssetUnselected(asset.key);\n }\n }}\n />\n </div>\n )}\n </S.CheckboxRow>\n );\n };\n\n return (\n <S.AssetGalleryWrapper disabled={asset.disabled} ref={cardRef}>\n <S.AssetGalleryGridCard\n as={ComputedRootComponent}\n component={component}\n asset={asset}\n disabled={asset.disabled}\n onClick={onClick}\n extendedSelectMode={extendedSelectMode}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n draggable={asset.draggable}\n innerRef={dragRef}\n selected={selected}\n $softSelected={softSelected}\n completed={asset?.completed}\n $hasError={asset?.hasError}\n $customSelectedBorder={customSelectedBorder}\n >\n {renderThumbnail()}\n {renderDetails()}\n {renderConsentSummaryInfo()}\n {renderCheckboxRow()}\n </S.AssetGalleryGridCard>\n </S.AssetGalleryWrapper>\n );\n};\n\nAssetGalleryGridCard.propTypes = {\n /**\n * An array of assets to display in the gallery.\n */\n asset: PropTypes.shape(assetShapeWithLayout).isRequired,\n\n /**\n * Whether or not the asset gallery should have selectable asset cards\n */\n selectable: PropTypes.bool,\n\n /**\n * Is the asset selected\n */\n selected: PropTypes.bool,\n\n /**\n * Whether or not the asset gallery should have custom borders on selected asset\n */\n customSelectedBorder: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * Makes the whole asset card into a selectable area\n */\n extendedSelectMode: PropTypes.bool,\n\n /**\n * The callback function when an asset is selected - returns the selected asset key\n */\n onAssetSelected: PropTypes.func.isRequired,\n\n /**\n * The callback function when an asset is unselected - returns the unselected asset key\n */\n onAssetUnselected: PropTypes.func.isRequired,\n\n /**\n * Is the asset soft selected\n */\n softSelected: PropTypes.bool.isRequired,\n\n /**\n * A function that returns a custom component to use for the card in the gallery - The function provides\n * `asset` as its first argument\n */\n component: PropTypes.func,\n\n /**\n * Internal prop used by the gallery to determine if the card is in the viewport - This prop is\n * not intended to be used by consumers\n */\n scrollPosition: PropTypes.number\n};\n\nAssetGalleryGridCard.defaultProps = {};\n\nexport default trackWindowScroll(\n React.memo(AssetGalleryGridCard, (prevProps, nextProps) => {\n // The asset card will only re-render if any of the following props change.\n const reactiveProps = [\n 'selectable',\n 'selected',\n 'extendedSelectMode',\n 'softSelected',\n 'asset.previewUrl',\n 'asset.overlay',\n 'asset.statusIcon',\n 'asset.layout',\n 'asset.imageRights',\n 'asset.instructionSeverity',\n 'asset.description',\n 'asset.title'\n ];\n\n return reactiveProps.every(propKey => get(prevProps, propKey) === get(nextProps, propKey));\n })\n);\n"],"names":["ComputedRootComponent","component","asset","props","newProps","mapKeys","omit","_","key","isFunction","Error","React","isValidElement","children","cloneElement","createElement","S","_extends","ref","ComputedActionButton","forwardRef","className","subActions","isSubActionsOpened","forwardedRef","isEmpty","contextMenuItems","map","subAction","onClick","title","icon","ContextMenuItem","onClickEffect","contextMenu","ContextMenu","Popover","content","placement","visible","zIndex","offset","ActionButton","useShadow","active","backgroundColors","actionWidthHeight","Fragment","AssetGalleryGridCard","selectable","selected","customSelectedBorder","extendedSelectMode","onAssetSelected","onAssetUnselected","softSelected","scrollPosition","isCardHovered","setIsCardHovered","useState","openedSubActions","updateOpenedSubActions","useEffect","newOpenedSubActions","actions","length","mouseHasEnteredCard","useCallback","mouseHasLeftCard","onSubActionsViewToggle","actionIndex","isOpened","index","videoPlayerRef","useRef","cardRef","dragRef","onMouseEnter","event","current","playPromise","play","undefined","then","catch","onMouseLeave","pause","onSelectClick","preventDefault","stopPropagation","onActionClick","action","shouldOpenSubActions","onContextMenu","renderPreview","previewContent","fileType","toLowerCase","LazyLoadComponent","loop","muted","src","previewUrl","type","HeadsetIcon","LazyLoadImage","alt","height","width","delayMethod","delayTime","threshold","addEventListener","removeEventListener","onDragstart","scrollIntoView","behavior","block","renderVersionsBadge","versions","Badge","badgeIcon","LayersIcon","badgeContent","colors","fontSize","fontWeight","lineHeight","verticalPadding","horizontalPadding","renderMediaBadge","PlayIcon","duration","convertMsToHMS","minWidth","renderThumbnail","statusIcon","overlay","Tooltip","renderDetails","description","imageRights","InstructionSeverityDisplay","labels","instructionLabels","instructionText","severity","instructionSeverity","showCard","padding","detailsFontSize","bgLight","bgDark","maxLines","renderConsentSummaryInfo","hasContent","summary","footerLeft","footerRight","renderCheckboxRow","Checkbox","variant","checked","onChange","target","disabled","as","draggable","innerRef","$softSelected","completed","$hasError","hasError","$customSelectedBorder","propTypes","process","env","NODE_ENV","PropTypes","shape","assetShapeWithLayout","isRequired","bool","arrayOf","string","func","number","defaultProps","trackWindowScroll","memo","prevProps","nextProps","reactiveProps","every","propKey","get"],"mappings":";;;;;;;;;;;;;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S,CAACI,IAAI,CAACD,UAAU;EAMvCpL,SAAS,EAAEiL,SAAS,CAACO,IAAI;EAMzBjI,cAAc,EAAE0H,SAAS,CAACQ,MAAAA;AAC5B,CAAC,GAAA,EAAA,CAAA;AAED1I,oBAAoB,CAAC2I,YAAY,GAAG,EAAE,CAAA;AAEtC,6BAAeC,iBAAiB,CAC9BjL,cAAK,CAACkL,IAAI,CAAC7I,oBAAoB,EAAE,CAAC8I,SAAS,EAAEC,SAAS,KAAK;EAEzD,MAAMC,aAAa,GAAG,CACpB,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,CACd,CAAA;AAED,EAAA,OAAOA,aAAa,CAACC,KAAK,CAACC,OAAO,IAAIC,GAAG,CAACL,SAAS,EAAEI,OAAO,CAAC,KAAKC,GAAG,CAACJ,SAAS,EAAEG,OAAO,CAAC,CAAC,CAAA;AAC5F,CAAC,CACH,CAAC;;;;"}
1
+ {"version":3,"file":"AssetGalleryGridCard.js","sources":["../../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js"],"sourcesContent":["import { get, isEmpty, isFunction, mapKeys, omit } from 'lodash';\nimport PropTypes from 'prop-types';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport {\n LazyLoadComponent,\n LazyLoadImage,\n trackWindowScroll\n} from 'react-lazy-load-image-component';\nimport { HeadsetIcon, LayersIcon, PlayIcon } from '../../../../../icons';\nimport { convertMsToHMS } from '../../../../../utils/dateTime';\nimport { Badge, Popover, Tooltip } from '../../../../data';\nimport { ActionButton, Checkbox } from '../../../../inputs';\nimport ContextMenu from '../../../ContextMenu/ContextMenu';\nimport ContextMenuItem from '../../../ContextMenu/ContextMenuItem/ContextMenuItem';\nimport { assetShapeWithLayout } from '../../asset.propType';\nimport * as S from './AssetGalleryGridCard.styled';\nimport InstructionSeverityDisplay from '../../../InstructionSeverityDisplay';\n\n/**\n >>> Section 1: renderThumbnail():\n┌─────────────────────────────────────────┐ ← S.AssetGalleryGridCard (Root)\n│[renderversionsBadge] [severityIcon]│ ← S.HorizontalBar (Top)\n├─────────────────────────────────────────┤\n│ │ │ │\n│ (spacer) │ [renderPreview]│ [action]│ ← S.ThumbnailRow (Inc. ComputedActionButton)\n│ │ │ [action]│ ← S.ActionsContainer\n│ │ │ │\n├─────────────────────────────────────────┤\n│ [renderMediaBadge] │ ← S.HorizontalBar (Bottom)\n├─────────────────────────────────────────┤\n│ | >>> Section 2: renderDetails():\n│ [asset.title] │ ← S.CardTitle\n│ [asset.description] │ ← S.CardDescription\n├─────────────────────────────────────────┤\n│ [InstructionSeverityDisplay] │ ← S.InstructionsWrapper\n| |\n| | >>> Section 3:renderConsentSummaryInfo():\n├─────────────────────────────────────────┤ ← S.CardDivider\n│ [footerLeft] [footerRight] │ ← S.CardFooter\n├─────────────────────────────────────────┤ ← S.CardDivider\n| |\n│ | >>> Section 4:renderCheckboxRow():\n│ [CheckRectangleIcon / Outline] │ ← S.CheckboxRow\n└─────────────────────────────────────────┘\n Approx Height: 536px (Updated severity card takes more space than XD Design)\n Note: Every block renders ALWAYS to maintain same height+alignment in gallery\n */\n\n// eslint-disable-next-line react/prop-types\nconst ComputedRootComponent = ({ component, asset, ...props }) => {\n // Omit props we don't need\n const newProps = mapKeys(\n omit(props, [\n 'theme',\n 'extendedSelectMode',\n 'softSelected',\n '$softSelected',\n 'customSelectedBorder',\n '$customSelectedBorder',\n 'isCardHovered',\n '$isCardHovered',\n 'completed',\n '$hasError'\n ]),\n (_, key) => (key === 'innerRef' ? 'ref' : key)\n );\n\n if (component) {\n if (!isFunction(component)) throw Error('Expected a function in component-prop');\n\n if (React.isValidElement(component(asset, newProps.children))) {\n return React.cloneElement(component(asset, newProps.children), omit(newProps, ['children']));\n }\n }\n\n return <S.AssetGalleryGridCard ref={newProps.ref} {...newProps} />;\n};\n\n/* eslint-disable react/prop-types */\nconst ComputedActionButton = React.forwardRef(function ComputedActionButton(\n // eslint-disable-next-line react/prop-types\n { component, className, subActions = [], isSubActionsOpened, ...props },\n forwardedRef\n) {\n const newProps = props;\n if (!isEmpty(subActions)) {\n const contextMenuItems = subActions.map((subAction, key) => {\n const { onClick, title, icon } = subAction;\n return <ContextMenuItem key={key} onClickEffect={onClick} title={title} icon={icon} />;\n });\n const contextMenu = <ContextMenu>{contextMenuItems}</ContextMenu>;\n newProps.children = (\n <Popover\n contextMenu={true}\n content={contextMenu}\n placement={'bottom-end'}\n visible={isSubActionsOpened}\n zIndex={10001}\n offset={[0, -8]}\n >\n <ActionButton\n useShadow={false}\n active={true}\n ref={forwardedRef}\n className={className}\n icon={newProps.icon}\n backgroundColors={['black', 'white']}\n onClick={newProps.onClick}\n actionWidthHeight={[40, 40]}\n />\n </Popover>\n );\n } else {\n newProps.children = (\n <ActionButton\n useShadow={false}\n active={true}\n ref={forwardedRef}\n className={className}\n icon={newProps.icon}\n onClick={newProps.onClick}\n backgroundColors={['black', 'white']}\n actionWidthHeight={[40, 40]}\n />\n );\n }\n\n if (component) {\n if (!isFunction(component)) throw Error('Expected a function in component-prop');\n\n if (React.isValidElement(component())) {\n return React.cloneElement(component(), { ...omit(newProps, 'icon') });\n }\n }\n\n return <React.Fragment>{newProps.children}</React.Fragment>;\n});\n/* eslint-disable react/prop-types */\n\nconst AssetGalleryGridCard = props => {\n const {\n asset,\n selectable,\n selected,\n customSelectedBorder,\n extendedSelectMode,\n onAssetSelected,\n onAssetUnselected,\n softSelected,\n component,\n scrollPosition\n } = props;\n\n const [isCardHovered, setIsCardHovered] = React.useState(false);\n const [openedSubActions, updateOpenedSubActions] = React.useState([]);\n useEffect(() => {\n const newOpenedSubActions = (asset?.actions ?? []).map(() => false);\n updateOpenedSubActions(newOpenedSubActions);\n }, [asset]);\n\n useEffect(() => {\n if (!isCardHovered && openedSubActions?.length) {\n updateOpenedSubActions(openedSubActions.map(() => false));\n }\n }, [isCardHovered]);\n\n const mouseHasEnteredCard = useCallback(() => {\n setIsCardHovered(true);\n }, []);\n\n const mouseHasLeftCard = useCallback(() => {\n setIsCardHovered(false);\n }, []);\n\n const onSubActionsViewToggle = useCallback(\n actionIndex => {\n const newOpenedSubActions = openedSubActions.map((isOpened, index) => {\n if (index !== actionIndex) {\n return false;\n }\n return !isOpened;\n });\n updateOpenedSubActions(newOpenedSubActions);\n },\n [openedSubActions]\n );\n\n const videoPlayerRef = useRef();\n const cardRef = useRef();\n const dragRef = useRef(null);\n\n function onMouseEnter(event) {\n if (videoPlayerRef.current) {\n const playPromise = videoPlayerRef.current.play();\n if (playPromise !== undefined) {\n playPromise\n .then(() => {\n // Playback started!\n })\n .catch(() => {\n // Play was prevented - silently swallow play errors\n });\n }\n }\n\n if (isFunction(asset.onMouseEnter)) {\n asset.onMouseEnter(event, asset);\n }\n\n mouseHasEnteredCard();\n }\n\n function onMouseLeave() {\n if (videoPlayerRef.current) {\n videoPlayerRef.current.pause();\n }\n\n mouseHasLeftCard();\n }\n\n function onClick(event) {\n if (extendedSelectMode) {\n return onSelectClick(event);\n }\n\n if (isFunction(asset.onClick)) {\n asset.onClick(event, asset);\n }\n }\n\n function onSelectClick(event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (selected) {\n return onAssetUnselected(asset.key);\n }\n\n return onAssetSelected(asset.key);\n }\n\n const onActionClick = useCallback(\n (event, action, index) => {\n event.preventDefault();\n event.stopPropagation();\n\n if (isFunction(action?.onClick)) {\n action.onClick(asset);\n }\n\n if (!isEmpty(action?.subActions)) {\n onSubActionsViewToggle(index);\n }\n },\n [onSubActionsViewToggle]\n );\n\n const shouldOpenSubActions = useCallback(\n actionIndex => openedSubActions[actionIndex],\n [openedSubActions]\n );\n\n function onContextMenu(event) {\n event.preventDefault();\n asset.onContextMenu(event);\n }\n\n function renderPreview(asset) {\n let previewContent = null;\n\n if (asset.fileType?.toLowerCase() === 'video') {\n previewContent = (\n <LazyLoadComponent scrollPosition={scrollPosition}>\n <video ref={videoPlayerRef} loop muted>\n <source src={asset.previewUrl} type=\"video/mp4\" />\n </video>\n </LazyLoadComponent>\n );\n } else if (asset.fileType?.toLowerCase() === 'audio') {\n previewContent = (\n <LazyLoadComponent scrollPosition={scrollPosition}>\n <div className=\"audio\">\n <HeadsetIcon />\n </div>\n </LazyLoadComponent>\n );\n } else {\n previewContent = (\n <LazyLoadImage\n alt={asset.title}\n src={asset.previewUrl}\n height=\"100%\"\n width=\"100%\"\n delayMethod=\"debounce\"\n delayTime={0}\n threshold={1500}\n scrollPosition={scrollPosition}\n />\n );\n }\n\n return previewContent;\n }\n\n useEffect(() => {\n if (isFunction(asset.onContextMenu)) {\n if (cardRef.current) {\n cardRef.current.addEventListener('contextmenu', onContextMenu);\n }\n return () => {\n if (cardRef.current) {\n cardRef.current.removeEventListener('contextmenu', onContextMenu);\n }\n };\n }\n }, []);\n\n function onDragstart(event) {\n asset.onDragstart(event);\n }\n\n useEffect(() => {\n if (isFunction(asset.onDragstart)) {\n if (dragRef.current) {\n dragRef.current.addEventListener('dragstart', onDragstart);\n }\n return () => {\n if (dragRef.current) {\n dragRef.current.removeEventListener('dragstart', onDragstart);\n }\n };\n }\n }, []);\n\n // If this asset is soft selected we will scroll it into the viewport if it's outside\n useEffect(() => {\n if (softSelected) {\n cardRef.current.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n }, [softSelected]);\n\n const renderVersionsBadge = useCallback(() => {\n if (!asset?.versions) return null;\n\n return (\n <Badge\n badgeIcon={<LayersIcon />}\n badgeContent={asset.versions}\n backgroundColors={['black', 'black']}\n colors={['#f7f8f9', '#f7f8f9']}\n fontSize={12}\n fontWeight={500}\n lineHeight={16}\n verticalPadding={4}\n horizontalPadding={8}\n />\n );\n }, [asset]);\n\n const renderMediaBadge = useCallback(() => {\n let badgeIcon = null;\n let badgeContent = null;\n\n if (asset?.fileType === 'video') {\n badgeIcon = <PlayIcon />;\n }\n\n if (asset?.duration) {\n badgeContent = convertMsToHMS(asset.duration);\n }\n\n if (!badgeIcon && !badgeContent) return null;\n return (\n <Badge\n badgeIcon={badgeIcon}\n badgeContent={badgeContent}\n backgroundColors={['black', 'black']}\n colors={['#f7f8f9', '#f7f8f9']}\n fontSize={12}\n fontWeight={500}\n lineHeight={16}\n verticalPadding={4}\n horizontalPadding={8}\n minWidth={32}\n height={24}\n />\n );\n }, [asset]);\n\n const renderThumbnail = () => {\n return (\n <S.ThumbnailSection>\n <S.ThumbnailSelectedOverlay selected={selected} />\n {/* Thumbnail Top bar */}\n <S.HorizontalBar>\n <S.HorizontalBarLeft>{renderVersionsBadge()}</S.HorizontalBarLeft>\n <S.HorizontalBarRight>\n {asset.statusIcon && <S.StatusIconCircle>{asset.statusIcon}</S.StatusIconCircle>}\n </S.HorizontalBarRight>\n </S.HorizontalBar>\n <S.ThumbnailRow>\n <S.ThumbnailSpacer />\n {/* Thumbnail */}\n <S.ThumbnailWrapper>\n <S.ThumbnailBox>\n {renderPreview(asset)}\n\n {asset.overlay && <S.ConsumerOverlay>{asset.overlay}</S.ConsumerOverlay>}\n </S.ThumbnailBox>\n </S.ThumbnailWrapper>\n <S.ThumbnailActions>\n <S.ActionsContainer>\n {(asset.actions ?? []).map((action, index) => (\n <Tooltip key={`${asset.key}-${action.title}`} content={action.title}>\n <S.Action>\n <ComputedActionButton\n component={action.component}\n className={action.className}\n icon={action.icon}\n isSubActionsOpened={shouldOpenSubActions(index)}\n onClick={event => onActionClick(event, action, index)}\n subActions={action?.subActions}\n actionWidthHeight={action.actionWidthHeight}\n />\n </S.Action>\n </Tooltip>\n ))}\n </S.ActionsContainer>\n </S.ThumbnailActions>\n </S.ThumbnailRow>\n {/* Thumbnail Bottom bar */}\n <S.HorizontalBar>\n <S.HorizontalBarLeft></S.HorizontalBarLeft>\n <S.HorizontalBarRight>{renderMediaBadge()}</S.HorizontalBarRight>\n </S.HorizontalBar>\n </S.ThumbnailSection>\n );\n };\n\n const renderDetails = () => {\n return (\n <S.CardBody>\n <S.CardTitle title={asset.title || ''}>{asset.title || ''}</S.CardTitle>\n <S.CardDescription title={asset.description || ''}>\n {asset.description || ''}\n </S.CardDescription>\n <S.InstructionsWrapper $hasContent={Boolean(asset.imageRights)}>\n {asset.imageRights && (\n <InstructionSeverityDisplay\n labels={asset.instructionLabels}\n instructionText={asset.imageRights}\n severity={asset.instructionSeverity}\n showCard={false}\n padding=\"16px\"\n detailsFontSize=\"12px\"\n bgLight=\"transparent\"\n bgDark=\"transparent\"\n maxLines={2}\n />\n )}\n </S.InstructionsWrapper>\n </S.CardBody>\n );\n };\n\n const renderConsentSummaryInfo = () => {\n return (\n <>\n <S.CardFooter>\n <S.CardFooterLeft>{asset.summary?.footerLeft || null}</S.CardFooterLeft>\n <S.CardFooterRight>{asset.summary?.footerRight || null}</S.CardFooterRight>\n </S.CardFooter>\n <S.CardDivider />\n </>\n );\n };\n\n const renderCheckboxRow = () => {\n return (\n <S.CheckboxRow>\n {selectable && (\n <div onClick={onSelectClick}>\n <Checkbox\n variant=\"black\"\n checked={selected}\n onChange={event => {\n if (event.target.checked) {\n onAssetSelected(asset.key);\n } else {\n onAssetUnselected(asset.key);\n }\n }}\n />\n </div>\n )}\n </S.CheckboxRow>\n );\n };\n\n return (\n <S.AssetGalleryWrapper disabled={asset.disabled} ref={cardRef}>\n <S.AssetGalleryGridCard\n as={ComputedRootComponent}\n component={component}\n asset={asset}\n disabled={asset.disabled}\n onClick={onClick}\n extendedSelectMode={extendedSelectMode}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n draggable={asset.draggable}\n innerRef={dragRef}\n selected={selected}\n $softSelected={softSelected}\n completed={asset?.completed}\n $hasError={asset?.hasError}\n $customSelectedBorder={customSelectedBorder}\n >\n {renderThumbnail()}\n {renderDetails()}\n {renderConsentSummaryInfo()}\n {renderCheckboxRow()}\n </S.AssetGalleryGridCard>\n </S.AssetGalleryWrapper>\n );\n};\n\nAssetGalleryGridCard.propTypes = {\n /**\n * An array of assets to display in the gallery.\n */\n asset: PropTypes.shape(assetShapeWithLayout).isRequired,\n\n /**\n * Whether or not the asset gallery should have selectable asset cards\n */\n selectable: PropTypes.bool,\n\n /**\n * Is the asset selected\n */\n selected: PropTypes.bool,\n\n /**\n * Whether or not the asset gallery should have custom borders on selected asset\n */\n customSelectedBorder: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * Makes the whole asset card into a selectable area\n */\n extendedSelectMode: PropTypes.bool,\n\n /**\n * The callback function when an asset is selected - returns the selected asset key\n */\n onAssetSelected: PropTypes.func.isRequired,\n\n /**\n * The callback function when an asset is unselected - returns the unselected asset key\n */\n onAssetUnselected: PropTypes.func.isRequired,\n\n /**\n * Is the asset soft selected\n */\n softSelected: PropTypes.bool.isRequired,\n\n /**\n * A function that returns a custom component to use for the card in the gallery - The function provides\n * `asset` as its first argument\n */\n component: PropTypes.func,\n\n /**\n * Internal prop used by the gallery to determine if the card is in the viewport - This prop is\n * not intended to be used by consumers\n */\n scrollPosition: PropTypes.number\n};\n\nAssetGalleryGridCard.defaultProps = {};\n\nexport default trackWindowScroll(\n React.memo(AssetGalleryGridCard, (prevProps, nextProps) => {\n // The asset card will only re-render if any of the following props change.\n const reactiveProps = [\n 'selectable',\n 'selected',\n 'extendedSelectMode',\n 'softSelected',\n 'asset.previewUrl',\n 'asset.overlay',\n 'asset.statusIcon',\n 'asset.layout',\n 'asset.imageRights',\n 'asset.instructionSeverity',\n 'asset.description',\n 'asset.title'\n ];\n\n return reactiveProps.every(propKey => get(prevProps, propKey) === get(nextProps, propKey));\n })\n);\n"],"names":["ComputedRootComponent","component","asset","props","newProps","mapKeys","omit","_","key","isFunction","Error","React","isValidElement","children","cloneElement","createElement","S","_extends","ref","ComputedActionButton","forwardRef","className","subActions","isSubActionsOpened","forwardedRef","isEmpty","contextMenuItems","map","subAction","onClick","title","icon","ContextMenuItem","onClickEffect","contextMenu","ContextMenu","Popover","content","placement","visible","zIndex","offset","ActionButton","useShadow","active","backgroundColors","actionWidthHeight","Fragment","AssetGalleryGridCard","selectable","selected","customSelectedBorder","extendedSelectMode","onAssetSelected","onAssetUnselected","softSelected","scrollPosition","isCardHovered","setIsCardHovered","useState","openedSubActions","updateOpenedSubActions","useEffect","newOpenedSubActions","actions","length","mouseHasEnteredCard","useCallback","mouseHasLeftCard","onSubActionsViewToggle","actionIndex","isOpened","index","videoPlayerRef","useRef","cardRef","dragRef","onMouseEnter","event","current","playPromise","play","undefined","then","catch","onMouseLeave","pause","onSelectClick","preventDefault","stopPropagation","onActionClick","action","shouldOpenSubActions","onContextMenu","renderPreview","previewContent","fileType","toLowerCase","LazyLoadComponent","loop","muted","src","previewUrl","type","HeadsetIcon","LazyLoadImage","alt","height","width","delayMethod","delayTime","threshold","addEventListener","removeEventListener","onDragstart","scrollIntoView","behavior","block","renderVersionsBadge","versions","Badge","badgeIcon","LayersIcon","badgeContent","colors","fontSize","fontWeight","lineHeight","verticalPadding","horizontalPadding","renderMediaBadge","PlayIcon","duration","convertMsToHMS","minWidth","renderThumbnail","statusIcon","overlay","Tooltip","renderDetails","description","$hasContent","Boolean","imageRights","InstructionSeverityDisplay","labels","instructionLabels","instructionText","severity","instructionSeverity","showCard","padding","detailsFontSize","bgLight","bgDark","maxLines","renderConsentSummaryInfo","summary","footerLeft","footerRight","renderCheckboxRow","Checkbox","variant","checked","onChange","target","disabled","as","draggable","innerRef","$softSelected","completed","$hasError","hasError","$customSelectedBorder","propTypes","process","env","NODE_ENV","PropTypes","shape","assetShapeWithLayout","isRequired","bool","arrayOf","string","func","number","defaultProps","trackWindowScroll","memo","prevProps","nextProps","reactiveProps","every","propKey","get"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,MAAMA,qBAAqB,GAAGA,CAAC;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC,KAAAA;AAAM,CAAC,KAAK;AAEhE,EAAA,MAAMC,QAAQ,GAAGC,OAAO,CACtBC,IAAI,CAACH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C,SAAS,KAAK;EAEzD,MAAMC,aAAa,GAAG,CACpB,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,CACd,CAAA;AAED,EAAA,OAAOA,aAAa,CAACC,KAAK,CAACC,OAAO,IAAIC,GAAG,CAACL,SAAS,EAAEI,OAAO,CAAC,KAAKC,GAAG,CAACJ,SAAS,EAAEG,OAAO,CAAC,CAAC,CAAA;AAC5F,CAAC,CACH,CAAC;;;;"}
@@ -6,6 +6,25 @@ const darkBorderColor = '#52525B';
6
6
  const darkBgColor = '#27272A';
7
7
  const darkHoverBgColor = '#3F3F46';
8
8
  const lightHoverBgColor = '#E4E4E7';
9
+ const getOutline = props => {
10
+ const ring = (dark, light) => [`3.25px solid ${dark}`, `3.25px solid ${light}`];
11
+ if (props.$softSelected) {
12
+ return ring(rgba(props.theme.getColor('gray-100'), 0.5), rgba(props.theme.getColor('gray-700'), 0.5));
13
+ }
14
+ if (props.selected) {
15
+ if (props.$customSelectedBorder) {
16
+ return ring(props.$customSelectedBorder[0], props.$customSelectedBorder[1]);
17
+ }
18
+ return ring(props.theme.getColor('gray-100'), darkBorderColor);
19
+ }
20
+ if (props.completed) {
21
+ return ring(props.theme.getColor('emerald-500'), rgba(props.theme.getColor('emerald-500'), 0.7));
22
+ }
23
+ if (props.hasError) {
24
+ return ring(props.theme.getColor('red-600'), rgba(props.theme.getColor('red-500'), 0.7));
25
+ }
26
+ return [`1.5px solid ${darkBorderColor}`, `1.5px solid ${props.theme.getColor('gray-300')}`];
27
+ };
9
28
  const AssetGalleryWrapper = styled.div.attrs(applyDefaultTheme)`
10
29
  width: 100%;
11
30
  height: 100%;
@@ -19,23 +38,10 @@ const AssetGalleryGridCard = styled.div.attrs(applyDefaultTheme)`
19
38
  height: 100%;
20
39
  margin: 0;
21
40
  box-sizing: border-box;
22
- border-width: ${props => {
23
- const {
24
- selected,
25
- $softSelected,
26
- hasError,
27
- completed
28
- } = props;
29
- return selected || $softSelected || hasError || completed ? 3 : 1;
30
- }}px;
31
- border-style: solid;
32
41
  text-decoration: none;
33
42
  cursor: pointer;
34
43
  transition: box-shadow 220ms;
35
44
  overflow: hidden;
36
- &:hover {
37
- box-shadow: 0px 3px 6px #00000029;
38
- }
39
45
  ${props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-700'))}
40
46
 
41
47
  ${props => props.disabled && css`
@@ -47,24 +53,13 @@ const AssetGalleryGridCard = styled.div.attrs(applyDefaultTheme)`
47
53
  cursor: pointer;
48
54
  `}
49
55
 
50
- ${props => {
51
- if (props.$softSelected) {
52
- return props.theme.themeProp('border-color', rgba(props.theme.getColor('gray-100'), 0.5), rgba(props.theme.getColor('gray-700'), 0.5));
53
- }
54
- if (props.selected) {
55
- if (props.$customSelectedBorder) {
56
- return props.theme.themeProp('border-color', props.$customSelectedBorder[0], props.$customSelectedBorder[1]);
57
- } else {
58
- return props.theme.themeProp('border-color', props.theme.getColor('gray-100'), darkBorderColor);
59
- }
60
- }
61
- if (props.completed) {
62
- return props.theme.themeProp('border-color', props.theme.getColor('emerald-500'), rgba(props.theme.getColor('emerald-500'), 0.7));
63
- }
64
- if (props.hasError) {
65
- return props.theme.themeProp('border-color', props.theme.getColor('red-600'), rgba(props.theme.getColor('red-500'), 0.7));
56
+ outline-offset: 0;
57
+ &:hover {
58
+ box-shadow: 0px 3px 6px #00000029;
66
59
  }
67
- return props.theme.themeProp('border-color', darkBorderColor, props.theme.getColor('gray-300'));
60
+ ${props => {
61
+ const [darkOutline, lightOutline] = getOutline(props);
62
+ return props.theme.themeProp('outline', darkOutline, lightOutline);
68
63
  }};
69
64
  `;
70
65
  const ThumbnailSection = styled.div.attrs(applyDefaultTheme)`
@@ -199,7 +194,7 @@ const CardBody = styled.div.attrs(applyDefaultTheme)`
199
194
  display: flex;
200
195
  flex-direction: column;
201
196
  flex: 1;
202
- padding: 16px 16px 16px 16px;
197
+ padding: 16px 0px 0px 0px;
203
198
  `;
204
199
  const CardTitle = styled.span.attrs(applyDefaultTheme)`
205
200
  display: -webkit-box;
@@ -207,7 +202,7 @@ const CardTitle = styled.span.attrs(applyDefaultTheme)`
207
202
  -webkit-box-orient: vertical;
208
203
  overflow: hidden;
209
204
  text-overflow: ellipsis;
210
-
205
+ padding: 0px 16px;
211
206
  font: normal normal 500 14px/19px Roboto;
212
207
  letter-spacing: 0.28px;
213
208
  height: 19px;
@@ -221,7 +216,7 @@ const CardDescription = styled.span.attrs(applyDefaultTheme)`
221
216
  -webkit-box-orient: vertical;
222
217
  overflow: hidden;
223
218
  text-overflow: ellipsis;
224
- padding: 6px 0px 6px 0px;
219
+ padding: 6px 16px;
225
220
  font: normal normal normal 12px/1.286em Roboto;
226
221
  letter-spacing: 0.24px;
227
222
  height: 52px;
@@ -231,12 +226,25 @@ const CardDescription = styled.span.attrs(applyDefaultTheme)`
231
226
 
232
227
  ${props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}
233
228
  `;
234
- const InstructionsWrapper = styled.div`
235
- padding-top: 14px;
236
- height: 75px;
229
+ const InstructionsWrapper = styled.div.attrs(applyDefaultTheme)`
230
+ min-height: 96px;
231
+ margin-top: 16px;
237
232
  box-sizing: border-box;
238
- overflow: hidden;
239
233
  flex-shrink: 0;
234
+ transition: background 220ms;
235
+
236
+ ${props => props.$hasContent && css`
237
+ border-top: 0.56px solid;
238
+ border-bottom: 0.56px solid;
239
+ ${props.theme.themeProp('border-color', darkBorderColor, props.theme.getColor('gray-300'))}
240
+ `}
241
+
242
+ ${props => props.$hasContent && css`
243
+ ${props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}
244
+ ${AssetGalleryGridCard}:hover & {
245
+ ${props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}
246
+ }
247
+ `}
240
248
  `;
241
249
  const CardFooter = styled.div.attrs(applyDefaultTheme)`
242
250
  display: flex;
@@ -263,6 +271,7 @@ const CardFooterRight = styled.div`
263
271
  const CardDivider = styled.div.attrs(applyDefaultTheme)`
264
272
  height: 1px;
265
273
  flex-shrink: 0;
274
+ opacity: ${props => props.invisible ? 0 : 1};
266
275
  ${props => props.theme.themeProp('background', darkBorderColor, props.theme.getColor('gray-300'))}
267
276
  `;
268
277
  const CheckboxRow = styled.div`
@@ -1 +1 @@
1
- {"version":3,"file":"AssetGalleryGridCard.styled.js","sources":["../../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js"],"sourcesContent":["import { rgba } from 'polished';\nimport styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../../../utils/defaultTheme';\n\nconst darkBorderColor = '#52525B';\nconst darkBgColor = '#27272A';\nconst darkHoverBgColor = '#3F3F46';\nconst lightHoverBgColor = '#E4E4E7';\n\nexport const AssetGalleryWrapper = styled.div.attrs(applyDefaultTheme)`\n width: 100%;\n height: 100%;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `};\n`;\n\nexport const AssetGalleryGridCard = styled.div.attrs(applyDefaultTheme)`\n display: block;\n position: relative;\n height: 100%;\n margin: 0;\n box-sizing: border-box;\n border-width: ${props => {\n const { selected, $softSelected, hasError, completed } = props;\n return selected || $softSelected || hasError || completed ? 3 : 1;\n }}px;\n border-style: solid;\n text-decoration: none;\n cursor: pointer;\n transition: box-shadow 220ms;\n overflow: hidden;\n &:hover {\n box-shadow: 0px 3px 6px #00000029;\n }\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-700')\n )}\n\n ${props =>\n props.disabled &&\n css`\n pointer-events: none;\n opacity: 0.4;\n `};\n\n ${props =>\n props.extendedSelectMode &&\n css`\n cursor: pointer;\n `}\n\n ${props => {\n if (props.$softSelected) {\n return props.theme.themeProp(\n 'border-color',\n rgba(props.theme.getColor('gray-100'), 0.5),\n rgba(props.theme.getColor('gray-700'), 0.5)\n );\n }\n\n if (props.selected) {\n if (props.$customSelectedBorder) {\n return props.theme.themeProp(\n 'border-color',\n props.$customSelectedBorder[0],\n props.$customSelectedBorder[1]\n );\n } else {\n return props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-100'),\n darkBorderColor\n );\n }\n }\n\n if (props.completed) {\n return props.theme.themeProp(\n 'border-color',\n props.theme.getColor('emerald-500'),\n rgba(props.theme.getColor('emerald-500'), 0.7)\n );\n }\n\n if (props.hasError) {\n return props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-600'),\n rgba(props.theme.getColor('red-500'), 0.7)\n );\n }\n\n return props.theme.themeProp('border-color', darkBorderColor, props.theme.getColor('gray-300'));\n }};\n`;\n\nexport const ThumbnailSection = styled.div.attrs(applyDefaultTheme)`\n position: relative;\n overflow: hidden;\n transition: background 220ms;\n ${props => props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}\n ${AssetGalleryGridCard}:hover & {\n ${props => props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}\n }\n`;\n\n// ── Top bar ──────────────────────────────────────────────────────────────────\n\nexport const HorizontalBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px;\n height: 40px;\n box-sizing: border-box;\n flex-shrink: 0;\n position: relative;\n z-index: 2;\n`;\n\nexport const HorizontalBarLeft = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const HorizontalBarRight = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const StatusIconCircle = styled.span.attrs(applyDefaultTheme)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n pointer-events: none;\n svg {\n width: 100%;\n height: 100%;\n }\n`;\n\n// ── Thumbnail ─────────────────────────────────────────────────────────────────\n\nexport const ThumbnailRow = styled.div`\n position: relative;\n display: flex;\n width: 100%;\n`;\n\nexport const ThumbnailSpacer = styled.div`\n flex: 1;\n`;\n\nexport const ThumbnailWrapper = styled.div`\n width: max(66%, 268px);\n flex-shrink: 0;\n`;\n\nexport const ThumbnailBox = styled.div.attrs(applyDefaultTheme)`\n position: relative;\n height: 168px;\n\n flex-shrink: 0;\n overflow: hidden;\n\n img,\n video {\n width: 100%;\n height: 100%;\n object-fit: contain;\n display: block;\n }\n\n .audio {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n svg {\n width: 35%;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-400')\n )}\n }\n }\n`;\n\nexport const ThumbnailSelectedOverlay = styled.div.attrs(applyDefaultTheme)`\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: ${props => (props.selected ? 0.6 : 0)};\n background-color: #accef7;\n transition: opacity 220ms;\n z-index: 1;\n`;\n\nexport const ThumbnailActions = styled.div`\n flex: 1;\n`;\n\nexport const ActionsContainer = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n align-items: end;\n flex-direction: column;\n gap: 8px;\n opacity: 0;\n transition: opacity 220ms;\n z-index: 1;\n position: absolute;\n right: 8px;\n ${AssetGalleryGridCard}:hover & {\n opacity: 1;\n }\n\n ${AssetGalleryGridCard}:focus-within & {\n opacity: 1;\n }\n`;\n\nexport const Action = styled.div`\n margin: 0;\n\n button {\n box-shadow: 0px 3px 6px #00000033;\n }\n svg {\n width: 16px;\n height: 16px;\n max-height: unset;\n max-width: unset;\n }\n`;\n\nexport const ConsumerOverlay = styled.div`\n position: absolute;\n inset: 0;\n pointer-events: none;\n`;\n\n// ── Card body ─────────────────────────────────────────────────────────────────\n\nexport const CardBody = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n flex: 1;\n padding: 16px 16px 16px 16px;\n`;\n\nexport const CardTitle = styled.span.attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n\n font: normal normal 500 14px/19px Roboto;\n letter-spacing: 0.28px;\n height: 19px;\n box-sizing: border-box;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\nexport const CardDescription = styled.span.attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 6px 0px 6px 0px;\n font: normal normal normal 12px/1.286em Roboto;\n letter-spacing: 0.24px;\n height: 52px;\n box-sizing: border-box;\n overflow-wrap: break-word;\n word-break: break-word;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\nexport const InstructionsWrapper = styled.div`\n padding-top: 14px;\n height: 75px;\n box-sizing: border-box;\n overflow: hidden;\n flex-shrink: 0;\n`;\n\nexport const CardFooter = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0px 16px;\n min-height: 52px;\n box-sizing: border-box;\n`;\n\nexport const CardFooterLeft = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const CardFooterRight = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-left: 4px;\n }\n`;\n\nexport const CardDivider = styled.div.attrs(applyDefaultTheme)`\n height: 1px;\n flex-shrink: 0;\n ${props => props.theme.themeProp('background', darkBorderColor, props.theme.getColor('gray-300'))}\n`;\n\nexport const CheckboxRow = styled.div`\n display: flex;\n padding: 0px 16px;\n align-items: center;\n height: 56px;\n box-sizing: border-box;\n flex-shrink: 0;\n`;\n\nexport const CheckboxButton = styled.div.attrs(applyDefaultTheme)`\n opacity: 1;\n flex-shrink: 0;\n cursor: pointer;\n transition: opacity 220ms;\n ${props => props.theme.themeProp('color', 'white', 'black')}\n > svg {\n width: 23px;\n height: 100%;\n }\n`;\n"],"names":["darkBorderColor","darkBgColor","darkHoverBgColor","lightHoverBgColor","AssetGalleryWrapper","styled","div","attrs","applyDefaultTheme","props","disabled","css","AssetGalleryGridCard","selected","$softSelected","hasError","completed","theme","themeProp","getColor","extendedSelectMode","rgba","$customSelectedBorder","ThumbnailSection","HorizontalBar","HorizontalBarLeft","HorizontalBarRight","StatusIconCircle","span","ThumbnailRow","ThumbnailSpacer","ThumbnailWrapper","ThumbnailBox","ThumbnailSelectedOverlay","ThumbnailActions","ActionsContainer","Action","ConsumerOverlay","CardBody","CardTitle","CardDescription","InstructionsWrapper","CardFooter","CardFooterLeft","CardFooterRight","CardDivider","CheckboxRow"],"mappings":";;;;AAIA,MAAMA,eAAe,GAAG,SAAS,CAAA;AACjC,MAAMC,WAAW,GAAG,SAAS,CAAA;AAC7B,MAAMC,gBAAgB,GAAG,SAAS,CAAA;AAClC,MAAMC,iBAAiB,GAAG,SAAS,CAAA;AAE5B,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,GAAG,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AACtE;AACA;AACA,EAAA,EAAIC,KAAK,IACLA,KAAK,CAACC,QAAQ,IACdC,GAAG,CAAA;AACP;AACA,IAAK,CAAA,CAAA;AACL,EAAC;AAEM,MAAMC,oBAAoB,GAAGP,MAAM,CAACC,GAAG,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AACvE;AACA;AACA;AACA;AACA;AACA,gBAAA,EAAkBC,KAAK,IAAI;EACvB,MAAM;IAAEI,QAAQ;IAAEC,aAAa;IAAEC,QAAQ;AAAEC,IAAAA,SAAAA;AAAU,GAAC,GAAGP,KAAK,CAAA;EAC9D,OAAOI,QAAQ,IAAIC,aAAa,IAAIC,QAAQ,IAAIC,SAAS,GAAG,CAAC,GAAG,CAAC,CAAA;AACnE,CAAC,CAAA;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAIP,EAAAA,KAAK,IACLA,KAAK,CAACQ,KAAK,CAACC,SAAS,CACnB,OAAO,EACPT,KAAK,CAACQ,KAAK,CAAC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A;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMoC,UAAU,GAAGrC,MAAM,CAACC,GAAG,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEYmC,MAAAA,cAAc,GAAGtC,MAAM,CAACC,GAAG,CAAA;AACxC;AACA;AACA;AACA;AACA;AACA,EAAC;AAEYsC,MAAAA,eAAe,GAAGvC,MAAM,CAACC,GAAG,CAAA;AACzC;AACA;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMuC,WAAW,GAAGxC,MAAM,CAACC,GAAG,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC9D;AACA;AACA,EAAIC,EAAAA,KAAK,IAAIA,KAAK,CAACQ,KAAK,CAACC,SAAS,CAAC,YAAY,EAAElB,eAAe,EAAES,KAAK,CAACQ,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAA;AACnG,EAAC;AAEY2B,MAAAA,WAAW,GAAGzC,MAAM,CAACC,GAAG,CAAA;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAE6BD,MAAM,CAACC,GAAG,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AACjE;AACA;AACA;AACA;AACA,EAAA,EAAIC,KAAK,IAAIA,KAAK,CAACQ,KAAK,CAACC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAC7D;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"AssetGalleryGridCard.styled.js","sources":["../../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js"],"sourcesContent":["import { rgba } from 'polished';\nimport styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../../../utils/defaultTheme';\n\nconst darkBorderColor = '#52525B';\nconst darkBgColor = '#27272A';\nconst darkHoverBgColor = '#3F3F46';\nconst lightHoverBgColor = '#E4E4E7';\n\nconst getOutline = props => {\n const ring = (dark, light) => [`3.25px solid ${dark}`, `3.25px solid ${light}`];\n\n if (props.$softSelected) {\n return ring(\n rgba(props.theme.getColor('gray-100'), 0.5),\n rgba(props.theme.getColor('gray-700'), 0.5)\n );\n }\n if (props.selected) {\n if (props.$customSelectedBorder) {\n return ring(props.$customSelectedBorder[0], props.$customSelectedBorder[1]);\n }\n return ring(props.theme.getColor('gray-100'), darkBorderColor);\n }\n if (props.completed) {\n return ring(\n props.theme.getColor('emerald-500'),\n rgba(props.theme.getColor('emerald-500'), 0.7)\n );\n }\n if (props.hasError) {\n return ring(props.theme.getColor('red-600'), rgba(props.theme.getColor('red-500'), 0.7));\n }\n return [`1.5px solid ${darkBorderColor}`, `1.5px solid ${props.theme.getColor('gray-300')}`];\n};\n\nexport const AssetGalleryWrapper = styled.div.attrs(applyDefaultTheme)`\n width: 100%;\n height: 100%;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `};\n`;\n\nexport const AssetGalleryGridCard = styled.div.attrs(applyDefaultTheme)`\n display: block;\n position: relative;\n height: 100%;\n margin: 0;\n box-sizing: border-box;\n text-decoration: none;\n cursor: pointer;\n transition: box-shadow 220ms;\n overflow: hidden;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-700')\n )}\n\n ${props =>\n props.disabled &&\n css`\n pointer-events: none;\n opacity: 0.4;\n `};\n\n ${props =>\n props.extendedSelectMode &&\n css`\n cursor: pointer;\n `}\n\n outline-offset: 0;\n &:hover {\n box-shadow: 0px 3px 6px #00000029;\n }\n ${props => {\n const [darkOutline, lightOutline] = getOutline(props);\n return props.theme.themeProp('outline', darkOutline, lightOutline);\n }};\n`;\n\nexport const ThumbnailSection = styled.div.attrs(applyDefaultTheme)`\n position: relative;\n overflow: hidden;\n transition: background 220ms;\n ${props => props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}\n ${AssetGalleryGridCard}:hover & {\n ${props => props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}\n }\n`;\n\n// ── Top bar ──────────────────────────────────────────────────────────────────\n\nexport const HorizontalBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px;\n height: 40px;\n box-sizing: border-box;\n flex-shrink: 0;\n position: relative;\n z-index: 2;\n`;\n\nexport const HorizontalBarLeft = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const HorizontalBarRight = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const StatusIconCircle = styled.span.attrs(applyDefaultTheme)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n pointer-events: none;\n svg {\n width: 100%;\n height: 100%;\n }\n`;\n\n// ── Thumbnail ─────────────────────────────────────────────────────────────────\n\nexport const ThumbnailRow = styled.div`\n position: relative;\n display: flex;\n width: 100%;\n`;\n\nexport const ThumbnailSpacer = styled.div`\n flex: 1;\n`;\n\nexport const ThumbnailWrapper = styled.div`\n width: max(66%, 268px);\n flex-shrink: 0;\n`;\n\nexport const ThumbnailBox = styled.div.attrs(applyDefaultTheme)`\n position: relative;\n height: 168px;\n\n flex-shrink: 0;\n overflow: hidden;\n\n img,\n video {\n width: 100%;\n height: 100%;\n object-fit: contain;\n display: block;\n }\n\n .audio {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n svg {\n width: 35%;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-400')\n )}\n }\n }\n`;\n\nexport const ThumbnailSelectedOverlay = styled.div.attrs(applyDefaultTheme)`\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: ${props => (props.selected ? 0.6 : 0)};\n background-color: #accef7;\n transition: opacity 220ms;\n z-index: 1;\n`;\n\nexport const ThumbnailActions = styled.div`\n flex: 1;\n`;\n\nexport const ActionsContainer = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n align-items: end;\n flex-direction: column;\n gap: 8px;\n opacity: 0;\n transition: opacity 220ms;\n z-index: 1;\n position: absolute;\n right: 8px;\n ${AssetGalleryGridCard}:hover & {\n opacity: 1;\n }\n\n ${AssetGalleryGridCard}:focus-within & {\n opacity: 1;\n }\n`;\n\nexport const Action = styled.div`\n margin: 0;\n\n button {\n box-shadow: 0px 3px 6px #00000033;\n }\n svg {\n width: 16px;\n height: 16px;\n max-height: unset;\n max-width: unset;\n }\n`;\n\nexport const ConsumerOverlay = styled.div`\n position: absolute;\n inset: 0;\n pointer-events: none;\n`;\n\n// ── Card body ─────────────────────────────────────────────────────────────────\n\nexport const CardBody = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n flex: 1;\n padding: 16px 0px 0px 0px;\n`;\n\nexport const CardTitle = styled.span.attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0px 16px;\n font: normal normal 500 14px/19px Roboto;\n letter-spacing: 0.28px;\n height: 19px;\n box-sizing: border-box;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\nexport const CardDescription = styled.span.attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 6px 16px;\n font: normal normal normal 12px/1.286em Roboto;\n letter-spacing: 0.24px;\n height: 52px;\n box-sizing: border-box;\n overflow-wrap: break-word;\n word-break: break-word;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\nexport const InstructionsWrapper = styled.div.attrs(applyDefaultTheme)`\n min-height: 96px;\n margin-top: 16px;\n box-sizing: border-box;\n flex-shrink: 0;\n transition: background 220ms;\n\n ${props =>\n props.$hasContent &&\n css`\n border-top: 0.56px solid;\n border-bottom: 0.56px solid;\n ${props.theme.themeProp('border-color', darkBorderColor, props.theme.getColor('gray-300'))}\n `}\n\n ${props =>\n props.$hasContent &&\n css`\n ${props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}\n ${AssetGalleryGridCard}:hover & {\n ${props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}\n }\n `}\n`;\n\nexport const CardFooter = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0px 16px;\n min-height: 52px;\n box-sizing: border-box;\n`;\n\nexport const CardFooterLeft = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const CardFooterRight = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-left: 4px;\n }\n`;\n\nexport const CardDivider = styled.div.attrs(applyDefaultTheme)`\n height: 1px;\n flex-shrink: 0;\n opacity: ${props => (props.invisible ? 0 : 1)};\n ${props => props.theme.themeProp('background', darkBorderColor, props.theme.getColor('gray-300'))}\n`;\n\nexport const CheckboxRow = styled.div`\n display: flex;\n padding: 0px 16px;\n align-items: center;\n height: 56px;\n box-sizing: border-box;\n flex-shrink: 0;\n`;\n\nexport const CheckboxButton = styled.div.attrs(applyDefaultTheme)`\n opacity: 1;\n flex-shrink: 0;\n cursor: pointer;\n transition: opacity 220ms;\n ${props => props.theme.themeProp('color', 'white', 'black')}\n > svg {\n width: 23px;\n height: 100%;\n }\n`;\n"],"names":["darkBorderColor","darkBgColor","darkHoverBgColor","lightHoverBgColor","getOutline","props","ring","dark","light","$softSelected","rgba","theme","getColor","selected","$customSelectedBorder","completed","hasError","AssetGalleryWrapper","styled","div","attrs","applyDefaultTheme","disabled","css","AssetGalleryGridCard","themeProp","extendedSelectMode","darkOutline","lightOutline","ThumbnailSection","HorizontalBar","HorizontalBarLeft","HorizontalBarRight","StatusIconCircle","span","ThumbnailRow","ThumbnailSpacer","ThumbnailWrapper","ThumbnailBox","ThumbnailSelectedOverlay","ThumbnailActions","ActionsContainer","Action","ConsumerOverlay","CardBody","CardTitle","CardDescription","InstructionsWrapper","$hasContent","CardFooter","CardFooterLeft","CardFooterRight","CardDivider","invisible","CheckboxRow"],"mappings":";;;;AAIA,MAAMA,eAAe,GAAG,SAAS,CAAA;AACjC,MAAMC,WAAW,GAAG,SAAS,CAAA;AAC7B,MAAMC,gBAAgB,GAAG,SAAS,CAAA;AAClC,MAAMC,iBAAiB,GAAG,SAAS,CAAA;AAEnC,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,EAAA,MAAMC,IAAI,GAAGA,CAACC,IAAI,EAAEC,KAAK,KAAK,CAAC,CAAA,aAAA,EAAgBD,IAAI,CAAE,CAAA,EAAE,CAAgBC,aAAAA,EAAAA,KAAK,EAAE,CAAC,CAAA;EAE/E,IAAIH,KAAK,CAACI,aAAa,EAAE;AACvB,IAAA,OAAOH,IAAI,CACTI,IAAI,CAACL,KAAK,CAACM,KAAK,CAACC,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,EAC3CF,IAAI,CAACL,KAAK,CAACM,KAAK,CAACC,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,CAC5C,CAAC,CAAA;AACH,GAAA;EACA,IAAIP,KAAK,CAACQ,QAAQ,EAAE;IAClB,IAAIR,KAAK,CAACS,qBAAqB,EAAE;AAC/B,MAAA,OAAOR,IAAI,CAACD,KAAK,CAACS,qBAAqB,CAAC,CAAC,CAAC,EAAET,KAAK,CAACS,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7E,KAAA;AACA,IAAA,OAAOR,IAAI,CAACD,KAAK,CAACM,KAAK,CAACC,QAAQ,CAAC,UAAU,CAAC,EAAEZ,eAAe,CAAC,CAAA;AAChE,GAAA;EACA,IAAIK,KAAK,CAACU,SAAS,EAAE;IACnB,OAAOT,IAAI,CACTD,KAAK,CAACM,KAAK,CAACC,QAAQ,CAAC,aAAa,CAAC,EACnCF,IAAI,CAACL,KAAK,CAACM,KAAK,CAACC,QAAQ,CAAC,aAAa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AK,IAAIA,KAAK,CAACM,KAAK,CAACc,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAC7D;AACA;AACA;AACA;AACA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntbjs/react-components",
3
- "version": "2.0.11",
3
+ "version": "2.0.12-rc.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },