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Ac,GACVjI,EAAAA,cAAAgC,EAAAA,EAAA,CAAiBrB,GAAG,qBAAqBwH,OAAQ,CAAEF,iBAExDjI,EAAAA,cAACf,EAAA,IACOqG,EACJ/F,kBAAmBK,KAInC,GAvQNgG,E,iFAANyC,CAAA,CADC3C,EAAAA,IACKE,GA4QN,IAAA0C,GAAepJ,EAAAA,EAAAA,IAAW0G,G,sDCzR1B,MAKM2C,EAA8BC,GACf,UAAVA,EAAoB,GAAK,IAwBpCvG,EAAAA,EAAAA,IAAO,kBAED,IAAAwG,EAAN,cAA2BzI,EAAAA,UAGvBmC,WAAAA,CAAYtE,GACRuE,MAAMvE,GACA,wBAAE0B,GAAsBsD,KAAKhF,MACnCgF,KAAKtD,kBAAoBA,GAtCL,CAsC0B,CAG3CyF,MAAAA,GACG,qBACF1F,EAAA,oBACAD,EAAA,iBACAqJ,EAAA,eACAzD,EAAA,qBACAvF,EAAA,MACA8I,GACA3F,KAAKhF,MACHI,EAAOqB,EAAe8B,iBAAiBrB,OAAS,EAChDP,EAAoBmJ,GACtBA,EAAQC,QAAQ1I,GAAWA,EAAO2I,UAAUvJ,EAAe8B,oBACzDhC,EAAUI,EAAiBkJ,GAC3BI,EAAuC,CACzC7K,OACAqB,iBACAF,UACA6F,iBACAxB,wBAAyB8E,EAA2BC,GACpDnJ,sBACAG,mBACAE,wBAGJ,OAEQM,EAAAA,cAAAA,EAAAA,SAAA,KAAAA,EAAAA,cAACsI,EAAA,CACG/I,kBAAmBsD,KAAKtD,kBACxB+G,UAnEF,MAoEMwC,IAER9I,EAAAA,cAAC2F,EAAoB,IAAGmD,IAC5B,GAzCNL,E,iFAANM,CAAA,CADCrD,EAAAA,IACK+C,GA8CN,IAAAO,GAAe9J,EAAAA,EAAAA,IAAWuJ,E","sources":["webpack://UniversalAssetBrowser/../../node_modules/@ccx-public/spectrum-wrapper/src/ActionBar.tsx","webpack://UniversalAssetBrowser/../src/components/ActionBarActions.tsx","webpack://UniversalAssetBrowser/../src/components/CDOActionBarMobile.tsx","webpack://UniversalAssetBrowser/../src/components/CDOActionBarDesktop.tsx","webpack://UniversalAssetBrowser/../src/components/CDOActionBar.tsx"],"sourcesContent":["/*************************************************************************\n *\n * ADOBE CONFIDENTIAL\n * ___________________\n *\n * Copyright 2023 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n **************************************************************************/\n\n// https://opensource.adobe.com/spectrum-web-components/components/action-bar\n// Currently, there is no Action Bar component in RS2. This PR adds the SWC ActionBar as part of the Spectrum Wrapper set of components. Clients will use the wrapper instead of the SWC directly and maintain their own React fallback (unless an RS2 action bar is created in the future).\n// Even without RS2 fallback, library consistency will provide benefits such as bundle size optimization with version pinning and web component registration\nimport type { ActionBar as ActionBarType } from '@ccx-public/spectrum-web-component-fallbacks/dist/action-bar';\nimport React, { forwardRef, useEffect, useRef } from 'react';\nimport { filterBooleanProps, useComponent } from './utils';\nimport createWrapper from './utils/createWrapper';\nimport mergeRefs from './utils/mergeRefs';\nimport { SWCLoader } from './utils/SWCLoader';\n\nlet swcLoader;\nif (!process.env.EXCLUDE_SWC) {\n swcLoader = new SWCLoader(['sp-action-bar'], async () => {\n const { ActionBar } = await import(\n /* webpackChunkName: \"SpActionBar\" */\n '@ccx-public/spectrum-web-component-fallbacks/dist/action-bar'\n );\n return [ActionBar];\n });\n}\n\ntype ActionBarCompatProps = {\n onClose?: () => void;\n};\n\n// Currently, no action bar exists in RS2 for fallback\nexport default createWrapper<ActionBarType, ActionBarCompatProps>({\n displayName: 'ActionBar',\n fallback: undefined,\n swcLoader,\n SWCWrapper: forwardRef(function SpActionBar(props, ref) {\n const { className, flexible, open, emphasized, onClose, ...rest } =\n props;\n const actionBarRef = useRef<ActionBarType>();\n\n useEffect(() => {\n const actionBar = actionBarRef.current;\n if (actionBar && onClose) {\n actionBar.addEventListener('close', onClose);\n }\n\n return () => {\n if (actionBar && onClose) {\n actionBar.removeEventListener('close', onClose);\n }\n };\n }, [onClose]);\n\n const swcProps = {\n ...filterBooleanProps({\n emphasized,\n flexible,\n open,\n }),\n class: className,\n ...rest,\n };\n\n const ActionBar = useComponent('sp-action-bar');\n\n return <ActionBar {...swcProps} ref={mergeRefs([actionBarRef, ref])} />;\n }),\n tagName: 'sp-action-bar',\n});\n","/*************************************************************************\n *\n * ADOBE CONFIDENTIAL\n * ___________________\n *\n * Copyright 2023 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n **************************************************************************/\n\nimport React from 'react';\nimport type { WrappedComponentProps } from 'react-intl';\nimport { FormattedMessage, injectIntl } from 'react-intl';\n\nimport type { ActionArgs } from '../../src/utils/action';\nimport type Action from '../../src/utils/action';\nimport type { ISelectionStore } from '../../src/stores/SelectionStore';\nimport type ICollectionItem from '../../src/types/ICollectionItem';\nimport type { IOnActionBarClick } from './CDOView';\n\nimport '../styles/ActionBarActions.css';\nimport ActionMenu from './ActionMenu';\nimport Button from '@ccx-public/spectrum-wrapper/dist/Button';\nimport Icon from '@ccx-public/spectrum-wrapper/dist/Icon';\nimport I18NCollectionView from '../utils/i18n';\n\nexport type ActionBarActionsProps = {\n actions: Action[];\n selectionStore: ISelectionStore<ICollectionItem>;\n maxVisibleActions: number;\n tabIndex?: number;\n onActionButtonClick: IOnActionBarClick;\n getActiveActions: (actions: Action[] | ActionArgs[]) => Action[];\n isFeatureFlagEnabled: (feature: string) => boolean;\n};\n\nconst ActionBarActions = ({\n actions,\n onActionButtonClick,\n selectionStore,\n maxVisibleActions,\n getActiveActions,\n tabIndex,\n isFeatureFlagEnabled,\n intl,\n}: ActionBarActionsProps & WrappedComponentProps) => {\n const visibleActions = actions.slice(0, maxVisibleActions);\n const overflowActions = actions.slice(maxVisibleActions);\n\n if (!actions?.length) {\n return (\n <span slot=\"buttons\" className=\"cdo-ActionBar_NoActions\">\n <FormattedMessage id=\"actionBar.noActions\" />\n </span>\n );\n }\n\n return (\n <>\n {visibleActions.map((action) => {\n const icon = action.icon && React.cloneElement(action.icon, { size: 'S' });\n // TODO - remove this check once all actions have been updated to use a localized label\n const labelText = I18NCollectionView.isMessageDefined(intl, action.label)\n ? intl.formatMessage({ id: action.label })\n : action.label;\n\n if (action.children?.length) {\n const subMenuActions = getActiveActions(action.children);\n return (\n <div key={action.value} className=\"cdo-ActionBar_ActionMenu\" slot=\"buttons\">\n <ActionMenu\n disabled={false}\n elements={selectionStore.selectedElements}\n onActionButtonClick={onActionButtonClick}\n actionMenuItems={subMenuActions}\n label={action.label}\n icon={action.icon}\n placement=\"top-end\"\n tabIndex={tabIndex ?? 0}\n isFeatureFlagEnabled={isFeatureFlagEnabled}\n />\n </div>\n );\n }\n return (\n <Button\n className=\"cdo-ActionBar_ActionButton\"\n key={action.value}\n id={`ActionButton_${action.value}`}\n variant={action.buttonVariant}\n quiet={action.buttonQuiet}\n icon={<Icon size=\"S\">{icon}</Icon>}\n onClick={() => onActionButtonClick(action)}\n label={labelText}\n disabled={!action.isEnabled(selectionStore.selectedElements)}\n tabIndex={tabIndex}\n slot=\"buttons\"\n staticColor=\"white\"\n />\n );\n })}\n {overflowActions.length > 0 && (\n <div className=\"cdo-ActionBar_ActionMenu\" slot=\"buttons\">\n <ActionMenu\n disabled={false}\n elements={selectionStore.selectedElements}\n onActionButtonClick={onActionButtonClick}\n actionMenuItems={overflowActions}\n placement=\"top-end\"\n tabIndex={tabIndex ?? 0}\n isFeatureFlagEnabled={isFeatureFlagEnabled}\n />\n </div>\n )}\n </>\n );\n};\n\nexport default injectIntl(ActionBarActions);\nexport { ActionBarActions as ActionBarActionsForTest };\n","/*************************************************************************\n *\n * ADOBE CONFIDENTIAL\n * ___________________\n *\n * Copyright 2023 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n **************************************************************************/\n\nimport React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { inject, observer } from 'mobx-react';\nimport type { WrappedComponentProps } from 'react-intl';\nimport { injectIntl } from 'react-intl';\n\nimport type { CDOActionBarCommonProps } from './CDOActionBar';\nimport ActionBarActions from './ActionBarActions';\nimport type Action from '../../src/utils/action';\n\nimport '../styles/CDOActionBarMobile.css';\n\nconst MINIMUM_GAP = 8;\nconst MAX_VISIBLE_ACTIONS = 3;\n\nexport type CDOActionBarMobileState = {\n visibleActions: number;\n};\n\ninject('selectionStore');\n@observer\nclass CDOActionBarMobile extends React.Component<\n CDOActionBarCommonProps & WrappedComponentProps,\n CDOActionBarMobileState\n> {\n private ref = React.createRef<HTMLDivElement>();\n private resizeObserver: ResizeObserver;\n\n constructor(props: CDOActionBarCommonProps & WrappedComponentProps) {\n super(props);\n this.state = {\n visibleActions: 0,\n };\n }\n\n private getDimensions = (actions: Action[], referencePopover: Element) => {\n const actionButtons = [];\n actions.forEach((action) => {\n const actionButton = this.ref.current?.querySelector(`#ActionButton_${action.value}`);\n if (actionButton) {\n actionButtons.push(actionButton);\n }\n });\n const referenceWidth = this.ref.current.clientWidth;\n const rightPadding = parseInt(getComputedStyle(referencePopover).paddingRight);\n const rightMargin = parseInt(getComputedStyle(referencePopover).marginRight);\n const leftMargin = parseInt(getComputedStyle(referencePopover).marginLeft);\n return {\n actionButtons,\n gap: MINIMUM_GAP,\n rightPadding,\n referenceWidth,\n rightMargin,\n leftMargin,\n };\n };\n\n private computeNoOfVisibleActions = () => {\n const { actions, overflowMenuButtonWidth } = this.props;\n const parent = this.ref.current;\n const referencePopover = parent?.children[0];\n if (!referencePopover || !parent) {\n return;\n }\n const { actionButtons, gap, rightPadding, referenceWidth, rightMargin, leftMargin } =\n this.getDimensions(actions, referencePopover);\n\n let visibleActions = 0;\n for (let i = 0; i < actionButtons.length; i++) {\n const actionPos = actionButtons[i].offsetLeft + actionButtons[i].offsetWidth;\n if (\n i >= MAX_VISIBLE_ACTIONS ||\n referenceWidth - actionPos < rightPadding + rightMargin + leftMargin\n ) {\n break;\n }\n visibleActions++;\n }\n\n // If visible actions < actions.length, then second pass to check if gap and overflow menu button can fit.\n if (visibleActions < actions.length) {\n for (let i = visibleActions - 1; i >= 0; i--) {\n const actionPos = actionButtons[i].offsetLeft + actionButtons[i].offsetWidth;\n if (\n referenceWidth - actionPos >\n rightPadding + gap + overflowMenuButtonWidth + rightMargin + leftMargin\n ) {\n break;\n }\n visibleActions--;\n }\n }\n return visibleActions;\n };\n\n private handleResize = () => {\n // Wait for next frame to ensure layout is complete\n requestAnimationFrame(() => {\n const visibleActions = this.computeNoOfVisibleActions();\n if (visibleActions <= 0 || visibleActions == this.state.visibleActions) {\n return;\n }\n this.setState({ visibleActions });\n });\n };\n\n private createResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n if (this.ref?.current) {\n this.resizeObserver.observe(this.ref.current);\n }\n };\n\n componentDidMount() {\n this.createResizeObserver();\n }\n\n componentDidUpdate(prevProps: CDOActionBarCommonProps & WrappedComponentProps) {\n const { actions } = this.props;\n const areActionsEqual = (cur: Action[], prev: Action[]) =>\n cur.every((action, i) => action?.value === prev[i]?.value);\n // When props change if the actions are different, then we need to recompute the number of visible actions.\n if (!areActionsEqual(actions, prevProps?.actions)) {\n this.handleResize();\n }\n }\n\n componentWillUnmount() {\n if (this.ref?.current) {\n this.resizeObserver.unobserve(this.ref.current);\n }\n }\n\n render() {\n const { visibleActions } = this.state;\n const {\n open,\n selectionStore,\n actions,\n intl,\n onActionButtonClick,\n getActiveActions,\n viewStateStore,\n isFeatureFlagEnabled,\n } = this.props;\n const { showSelectionBar } = viewStateStore;\n const actualMaxVisibleActions = Math.min(actions.length, MAX_VISIBLE_ACTIONS);\n const actionbarActionsProps = {\n open,\n selectionStore,\n actions,\n intl,\n maxVisibleActions: actualMaxVisibleActions,\n visibleActions,\n onActionButtonClick,\n getActiveActions,\n isFeatureFlagEnabled,\n };\n const overflowMenuExists = visibleActions < actions.length;\n const actionGroupClasses = `cdo-action-group ${\n overflowMenuExists ? 'cdo-popover-actions' : ''\n }`;\n const showActionBarMobile = showSelectionBar && selectionStore?.selectedElements.length > 0;\n return (\n <>\n <div ref={this.ref} className=\"cdo-reference-popover-measurement-container\">\n {open && (\n <div className=\"cdo-mobile-action-bar\">\n <div className={actionGroupClasses}>\n <ActionBarActions\n {...actionbarActionsProps}\n maxVisibleActions={actualMaxVisibleActions}\n tabIndex={-1}\n />\n </div>\n </div>\n )}\n </div>\n {showActionBarMobile && open && (\n <div className=\"cdo-mobile-action-bar\">\n <div className={actionGroupClasses}>\n <ActionBarActions\n {...actionbarActionsProps}\n maxVisibleActions={visibleActions}\n />\n </div>\n </div>\n )}\n </>\n );\n }\n}\n\nexport default injectIntl(CDOActionBarMobile);\nexport { CDOActionBarMobile as CDOActionBarMobileForTests };\n","/*************************************************************************\n *\n * ADOBE CONFIDENTIAL\n * ___________________\n *\n * Copyright 2023 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n **************************************************************************/\n\nimport React from 'react';\nimport { inject, observer } from 'mobx-react';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport type { WrappedComponentProps } from 'react-intl';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport ActionBar from '@ccx-public/spectrum-wrapper/dist/ActionBar';\n\nimport type { CDOActionBarCommonProps } from './CDOActionBar';\nimport ActionBarActions from './ActionBarActions';\nimport type Action from '../../src/utils/action';\n\nimport '../styles/CDOActionBarDesktop.css';\nimport Utils from '../utils/utils';\nimport { isMobile } from '../utils/platform';\n\nconst MIN_VISIBLE_ACTIONS = 3;\n\nexport type CDOActionBarDesktopProps = {\n maxVisibleActions: number;\n threshold: number;\n};\n\nexport type CDOActionBarDesktopState = {\n visibleActions: number;\n};\n\ninject('selectionStore');\n@observer\nclass CDOActionBarDesktop extends React.Component<\n CDOActionBarCommonProps & CDOActionBarDesktopProps & WrappedComponentProps,\n CDOActionBarDesktopState\n> {\n private ref = React.createRef<HTMLDivElement>();\n private resizeObserver: ResizeObserver;\n private mutationObserver: MutationObserver;\n\n constructor(props: CDOActionBarCommonProps & CDOActionBarDesktopProps & WrappedComponentProps) {\n super(props);\n this.state = {\n visibleActions: 0,\n };\n }\n\n /**\n * This function returns array of action buttons reference\n * and dimensions like right margin of the action group,\n * gap between action buttons, right padding of the action bar and parent width.\n * It is used to compute the number of visible actions in the action bar.\n * @param actions: Action[]\n * @param referenceActionBar: Reference Action Bar Element\n * @returns { actionButtons: Element[], rightMargin: number, gap: number, actionBarRightPadding: number, parentWidth: number }\n */\n private getDimensions = (actions: Action[], referenceActionBar: Element) => {\n const actionGroup = referenceActionBar.shadowRoot.querySelector('.action-group');\n const actionGroupStyles = getComputedStyle(actionGroup);\n const rightMargin = parseInt(actionGroupStyles.marginRight);\n const actionButtons = [];\n actions.forEach((action) => {\n const actionButton = this.ref.current?.querySelector(`#ActionButton_${action.value}`);\n if (actionButton) {\n actionButtons.push(actionButton);\n }\n });\n const gap = parseInt(actionGroupStyles.columnGap);\n const actionBarRightPadding = parseInt(getComputedStyle(referenceActionBar).paddingRight);\n const parentWidth = this.ref.current?.clientWidth;\n return { actionButtons, rightMargin, gap, actionBarRightPadding, parentWidth };\n };\n\n /**\n * This function computes the number of visible actions in the action bar.\n * It does so by checking the offsetLeft and offsetWidth of each action button and comparing it with the parent width.\n * It also checks if the overflow menu button can fit in the action bar.\n * @returns { number } visibleActions\n */\n private computeNoOfVisibleActions = async () => {\n const { actions, threshold, maxVisibleActions, overflowMenuButtonWidth } = this.props;\n const parent = this.ref.current;\n const referenceActionBar = parent?.children[0];\n if (!referenceActionBar || !parent) {\n return;\n }\n if (Utils.usingUXP()) {\n // UXP's SWC ActionBar emulation aka @swc-uxp-wrappers/action-bar does not\n // have a shadowRoot so we just count child sp-action-buttons.\n // FWIW, both this path and getDimension paths are sort of white-box\n // drilling into ActionBar which is a fragile practice. Might want to just\n // write our own ActionBar as a flex container.\n return referenceActionBar.querySelectorAll('sp-action-button').length;\n }\n\n const { actionButtons, rightMargin, gap, actionBarRightPadding, parentWidth } =\n this.getDimensions(actions, referenceActionBar);\n let visibleActions = 0;\n\n // First Pass to get the no. of visible actions\n for (let i = 0; i < actionButtons.length; i++) {\n // Wait for the action button to update if it is pending to get the correct offsetLeft and offsetWidth\n if (actionButtons[i].isUpdatePending) {\n await actionButtons[i].updateComplete;\n }\n const actionPos = actionButtons[i].offsetLeft + actionButtons[i].offsetWidth;\n if (\n i >= maxVisibleActions ||\n parentWidth - actionPos < rightMargin + actionBarRightPadding + threshold\n ) {\n break;\n }\n visibleActions++;\n }\n\n // If visible actions < actions.length, then second pass to check if gap and overflow menu button can fit.\n if (visibleActions < actions.length) {\n for (let i = visibleActions - 1; i >= 0; i--) {\n const actionPos = actionButtons[i].offsetLeft + actionButtons[i].offsetWidth;\n if (\n parentWidth - actionPos >\n rightMargin + actionBarRightPadding + threshold + gap + overflowMenuButtonWidth\n ) {\n break;\n }\n visibleActions--;\n }\n }\n return visibleActions;\n };\n\n /**\n * This function is used to switch between CDOActionBarDesktop and CDOActionBarMobile based on the number of visible actions\n * @param visibleActions: number\n */\n private switchStates = (visibleActions: number) => {\n const { actions, viewStateStore } = this.props;\n const { showSelectionBar } = viewStateStore;\n\n const check = Math.min(actions.length, MIN_VISIBLE_ACTIONS);\n if (visibleActions < check || (isMobile() && visibleActions <= check)) {\n if (!showSelectionBar) {\n viewStateStore.setSelectionBarDisplayState(true);\n }\n } else {\n this.setState({ visibleActions });\n if (showSelectionBar) {\n viewStateStore.setSelectionBarDisplayState(false);\n }\n }\n };\n\n private isActionGroupAvailable = () => {\n if (Utils.usingUXP()) {\n const actionBar = this.ref?.current?.querySelector('sp-action-bar');\n return actionBar !== null;\n }\n const actionGroup =\n this.ref?.current?.children[0]?.shadowRoot?.querySelector('.action-group');\n return actionGroup && (actionGroup as HTMLElement).offsetWidth > 0;\n };\n\n private handleResize = async () => {\n // Computation of visible actions is dependent on the availability of action group\n // inside the shadowDOM of the reference action bar.\n if (this.isActionGroupAvailable()) {\n const visibleActions = await this.computeNoOfVisibleActions();\n this.switchStates(visibleActions);\n }\n };\n\n private handleMutation = async () => {\n if (this.isActionGroupAvailable()) {\n await this.handleResize();\n }\n };\n\n private createResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n if (this.ref?.current) {\n this.resizeObserver.observe(this.ref.current);\n }\n };\n\n /**\n * This function is used to observe the changes in the reference action bar.\n * In the initial render there is a slight delay in shadowDOM creation/attachment and the action group is not available.\n * So, we need to observe the changes in the reference action bar and once the action group is available,\n * we disconnect the observer and call handleResize to compute the number of visible actions.\n */\n private createMutationObserver = () => {\n this.mutationObserver = new MutationObserver(this.handleMutation);\n if (this.ref?.current?.children[0]) {\n this.mutationObserver.observe(this.ref.current.children[0], {\n attributes: true,\n childList: true,\n subtree: true,\n });\n }\n };\n\n private handleClose = () => {\n const { selectionStore } = this.props;\n selectionStore.clear();\n };\n\n private areActionsEqual = (current: Action[], prev: Action[]) => {\n return (\n current.length === prev.length &&\n current.every((action, index) => action.value === prev[index].value)\n );\n };\n\n componentDidMount() {\n this.createResizeObserver();\n this.createMutationObserver();\n }\n\n async componentDidUpdate(prevProps) {\n const { actions } = this.props;\n // When props change if the actions are different, then we need to recompute the number of visible actions.\n if (!this.areActionsEqual(actions, prevProps?.actions)) {\n await this.handleResize();\n }\n }\n\n componentWillUnmount() {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n render() {\n const {\n open,\n selectionStore,\n actions,\n intl,\n onActionButtonClick,\n maxVisibleActions,\n viewStateStore,\n getActiveActions,\n isFeatureFlagEnabled,\n } = this.props;\n const { showSelectionBar } = viewStateStore;\n const actionbarActionsProps = {\n selectionStore,\n actions,\n intl,\n maxVisibleActions,\n onActionButtonClick,\n getActiveActions,\n isFeatureFlagEnabled,\n };\n const numSelected = selectionStore?.selectedElements.length;\n const { visibleActions } = this.state;\n const showActionBarDesktop = !showSelectionBar && numSelected > 0;\n return (\n <>\n <div ref={this.ref} className=\"cdo-action-bar-measurement-container\">\n <ActionBar\n className=\"cdo-action-bar-measurement\"\n onClose={this.handleClose}\n open={open}\n >\n {numSelected > 0 && (\n <FormattedMessage\n id=\"actionbar.selected\"\n values={{ numSelected }}\n defaultMessage=\"{numSelected, plural, =1 {# item} other {# items}} selected\"\n />\n )}\n <ActionBarActions tabIndex={-1} {...actionbarActionsProps} />\n </ActionBar>\n </div>\n {showActionBarDesktop && (\n <ActionBar\n className=\"cdo-desktop-action-bar \"\n onClose={this.handleClose}\n open={open}\n emphasized\n >\n {numSelected > 0 && (\n <FormattedMessage id=\"actionbar.selected\" values={{ numSelected }} />\n )}\n <ActionBarActions\n {...actionbarActionsProps}\n maxVisibleActions={visibleActions}\n />\n </ActionBar>\n )}\n </>\n );\n }\n}\n\nexport default injectIntl(CDOActionBarDesktop);\nexport { CDOActionBarDesktop as CDOActionBarDesktopForTests };\n","/*************************************************************************\n *\n * ADOBE CONFIDENTIAL\n * ___________________\n *\n * Copyright 2023 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n **************************************************************************/\n\nimport React from 'react';\nimport type { WrappedComponentProps } from 'react-intl';\nimport { injectIntl } from 'react-intl';\nimport { inject, observer } from 'mobx-react';\n\nimport type Action from '../utils/action';\nimport type { ISelectionStore } from '../stores/SelectionStore';\nimport type ICollectionItem from '../types/ICollectionItem';\nimport type { IOnActionBarClick } from './CDOView';\nimport CDOActionBarMobile from './CDOActionBarMobile';\nimport CDOActionBarDesktop from './CDOActionBarDesktop';\nimport type ViewStateStore from '../../src/stores/ViewStateStore';\nimport type { Scale } from '@ccx-public/component-types';\n\n// default to 5 max visible actions in the action bar\nconst MAX_VISIBLE_ACTIONS = 5;\n// Threshold to switch between desktop and mobile view as per design\nconst THRESHOLD = 24;\n// Overflow Menu Button is rendered only when needed, so keeping it's width as constant according to the scale specified by the host.\n// Please do not override overflow menu width!\nconst getOverflowMenuButtonWidth = (scale?: Scale): number => {\n return scale === 'large' ? 40 : 32;\n};\n\nexport type ICDOActionBarProps = {\n selectionStore: ISelectionStore<ICollectionItem>;\n viewStateStore: ViewStateStore;\n availableActions: Action[];\n onActionButtonClick: IOnActionBarClick;\n maxVisibleActions?: number;\n isFeatureFlagEnabled: (feature: string) => boolean;\n scale?: Scale;\n};\n\nexport type CDOActionBarCommonProps = {\n open: boolean;\n selectionStore: ISelectionStore<ICollectionItem>;\n actions: Action[];\n overflowMenuButtonWidth: number;\n viewStateStore: ViewStateStore;\n onActionButtonClick: IOnActionBarClick;\n getActiveActions: (actions: Action[]) => Action[];\n isFeatureFlagEnabled: (feature: string) => boolean;\n};\n\ninject('selectionStore');\n@observer\nclass CDOActionBar extends React.Component<ICDOActionBarProps & WrappedComponentProps> {\n private maxVisibleActions: number;\n\n constructor(props: ICDOActionBarProps & WrappedComponentProps) {\n super(props);\n const { maxVisibleActions } = this.props;\n this.maxVisibleActions = maxVisibleActions || MAX_VISIBLE_ACTIONS;\n }\n\n public render() {\n const {\n selectionStore,\n onActionButtonClick,\n availableActions,\n viewStateStore,\n isFeatureFlagEnabled,\n scale,\n } = this.props;\n const open = selectionStore.selectedElements.length > 0;\n const getActiveActions = (actions: Action[]): Action[] =>\n actions.filter((action) => action.isVisible(selectionStore.selectedElements));\n const actions = getActiveActions(availableActions);\n const commonProps: CDOActionBarCommonProps = {\n open,\n selectionStore,\n actions,\n viewStateStore,\n overflowMenuButtonWidth: getOverflowMenuButtonWidth(scale),\n onActionButtonClick,\n getActiveActions,\n isFeatureFlagEnabled,\n };\n\n return (\n <>\n <CDOActionBarDesktop\n maxVisibleActions={this.maxVisibleActions}\n threshold={THRESHOLD}\n {...commonProps}\n />\n <CDOActionBarMobile {...commonProps} />\n </>\n );\n }\n}\n\nexport default injectIntl(CDOActionBar);\nexport { CDOActionBar as CDOActionBarForTests };\n"],"names":["createWrapper","displayName","fallback","undefined","swcLoader","SWCWrapper","forwardRef","props","ref","className","flexible","open","emphasized","onClose","rest","actionBarRef","useRef","useEffect","actionBar","current","addEventListener","removeEventListener","swcProps","class","ActionBar","mergeRefs","tagName","ActionBarActions$1","injectIntl","ActionBarActions","actions","onActionButtonClick","selectionStore","maxVisibleActions","getActiveActions","tabIndex","isFeatureFlagEnabled","intl","visibleActions","slice","overflowActions","length","React__default","map","action","_a","icon","size","labelText","I18NCollectionView","isMessageDefined","label","formatMessage","id","children","subMenuActions","key","value","slot","ActionMenu","disabled","elements","selectedElements","actionMenuItems","placement","Button","variant","buttonVariant","quiet","buttonQuiet","Icon","onClick","isEnabled","staticColor","FormattedMessage","inject","CDOActionBarMobile","constructor","super","getDimensions","referencePopover","actionButtons","forEach","actionButton","querySelector","push","referenceWidth","this","clientWidth","rightPadding","parseInt","getComputedStyle","paddingRight","rightMargin","marginRight","leftMargin","marginLeft","gap","computeNoOfVisibleActions","overflowMenuButtonWidth","parent","i","actionPos","offsetLeft","offsetWidth","handleResize","requestAnimationFrame","state","setState","createResizeObserver","resizeObserver","ResizeObserver","observe","componentDidMount","componentDidUpdate","prevProps","areActionsEqual","cur","prev","every","componentWillUnmount","unobserve","render","viewStateStore","showSelectionBar","actualMaxVisibleActions","Math","min","actionbarActionsProps","actionGroupClasses","showActionBarMobile","__decorateClass$2","observer","CDOActionBarMobile$1","CDOActionBarDesktop","referenceActionBar","actionGroup","shadowRoot","actionGroupStyles","_a2","columnGap","actionBarRightPadding","parentWidth","async","threshold","Utils","usingUXP","querySelectorAll","isUpdatePending","updateComplete","switchStates","check","isMobile","setSelectionBarDisplayState","isActionGroupAvailable","_b","_c","_d","_e","_f","handleMutation","createMutationObserver","mutationObserver","MutationObserver","attributes","childList","subtree","handleClose","clear","index","disconnect","numSelected","showActionBarDesktop","values","defaultMessage","__decorateClass$1","CDOActionBarDesktop$1","getOverflowMenuButtonWidth","scale","CDOActionBar","availableActions","actions2","filter","isVisible","commonProps","__decorateClass","CDOActionBar$1"],"sourceRoot":""}