@azure/communication-react 1.18.0-alpha-202406220013 → 1.18.0-alpha-202406250013
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +4 -0
 - package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Digltj4H.js → ChatMessageComponentAsRichTextEditBox-D8CIuj9U.js} +2 -2
 - package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Digltj4H.js.map → ChatMessageComponentAsRichTextEditBox-D8CIuj9U.js.map} +1 -1
 - package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CiwclH9-.js → RichTextSendBoxWrapper-D0jx96DX.js} +2 -2
 - package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CiwclH9-.js.map → RichTextSendBoxWrapper-D0jx96DX.js.map} +1 -1
 - package/dist/dist-cjs/communication-react/{index-DnTVRxCz.js → index-D40Kfey5.js} +15 -13
 - package/dist/dist-cjs/communication-react/{index-DnTVRxCz.js.map → index-D40Kfey5.js.map} +1 -1
 - package/dist/dist-cjs/communication-react/index.js +1 -1
 - package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
 - package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +1 -0
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -4
 - package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
 - package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +4 -0
 - package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
 - package/package.json +1 -1
 
| 
         @@ -5348,6 +5348,10 @@ export declare type CommonCallControlOptions = { 
     | 
|
| 
       5348 
5348 
     | 
    
         
             
                     * @defaultValue false
         
     | 
| 
       5349 
5349 
     | 
    
         
             
                     */
         
     | 
| 
       5350 
5350 
     | 
    
         
             
                    hangUpForEveryone?: false | 'endCallOptions';
         
     | 
| 
      
 5351 
     | 
    
         
            +
                    /**
         
     | 
| 
      
 5352 
     | 
    
         
            +
                     * Wether to disable the end call confirmation modal.
         
     | 
| 
      
 5353 
     | 
    
         
            +
                     */
         
     | 
| 
      
 5354 
     | 
    
         
            +
                    disableEndCallModal?: boolean;
         
     | 
| 
       5351 
5355 
     | 
    
         
             
                };
         
     | 
| 
       5352 
5356 
     | 
    
         
             
                /**
         
     | 
| 
       5353 
5357 
     | 
    
         
             
                 * Show or Hide Microphone button during a call.
         
     | 
| 
         @@ -4,7 +4,7 @@ var react = require('@fluentui/react'); 
     | 
|
| 
       4 
4 
     | 
    
         
             
            var reactChat = require('@fluentui-contrib/react-chat');
         
     | 
| 
       5 
5 
     | 
    
         
             
            var reactComponents = require('@fluentui/react-components');
         
     | 
| 
       6 
6 
     | 
    
         
             
            require('@azure/communication-common');
         
     | 
| 
       7 
     | 
    
         
            -
            var index = require('./index- 
     | 
| 
      
 7 
     | 
    
         
            +
            var index = require('./index-D40Kfey5.js');
         
     | 
| 
       8 
8 
     | 
    
         
             
            var React = require('react');
         
     | 
| 
       9 
9 
     | 
    
         
             
            require('reselect');
         
     | 
| 
       10 
10 
     | 
    
         
             
            require('@azure/communication-calling');
         
     | 
| 
         @@ -151,4 +151,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => { 
     | 
|
| 
       151 
151 
     | 
    
         | 
| 
       152 
152 
     | 
    
         
             
            exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
         
     | 
| 
       153 
153 
     | 
    
         
             
            exports.default = ChatMessageComponentAsRichTextEditBox;
         
     | 
| 
       154 
     | 
    
         
            -
            //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox- 
     | 
| 
      
 154 
     | 
    
         
            +
            //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-D8CIuj9U.js.map
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-Digltj4H.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\nimport {\n  getMessageState,\n  onRenderCancelIcon,\n  onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n  attachmentMetadataReducer,\n  getMessageWithAttachmentMetadata,\n  doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n  onCancel?: (messageId: string) => void;\n  onSubmit: (\n    text: string,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentMetadata?: AttachmentMetadata[]\n  ) => void;\n  message: ChatMessage;\n  strings: MessageThreadStrings;\n  /* @conditional-compile-remove(rich-text-editor-image-upload) */\n  onPaste?: (event: { content: DocumentFragment }) => void;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n  props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n  const {\n    onCancel,\n    onSubmit,\n    strings,\n    message,\n    /* @conditional-compile-remove(rich-text-editor-image-upload) */\n    onPaste\n  } = props;\n\n  const [textValue, setTextValue] = useState<string>(message.content || '');\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const [attachmentMetadata, handleAttachmentAction] = useReducer(\n    attachmentMetadataReducer,\n    getMessageWithAttachmentMetadata(message) ?? []\n  );\n  const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n  const theme = useTheme();\n  const messageState = useMemo(() => {\n    return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n  }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n  const submitEnabled = messageState === 'OK';\n\n  const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n  const chatMyMessageStyles = useChatMyMessageStyles();\n  const locale = useLocale().strings;\n\n  const setText = useCallback((newValue?: string): void => {\n    setTextValue(newValue ?? '');\n  }, []);\n\n  useEffect(() => {\n    editTextFieldRef.current?.focus();\n  }, []);\n\n  const textTooLongMessage = useMemo(() => {\n    return messageState === 'too long'\n      ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n      : undefined;\n  }, [messageState, strings.editBoxTextLimit]);\n\n  const iconClassName = useCallback(\n    (isHover: boolean) => {\n      const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n      return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n    },\n    [theme.palette.accent, theme.palette.neutralSecondary]\n  );\n\n  const onRenderThemedCancelIcon = useCallback(\n    (isHover: boolean) => {\n      return onRenderCancelIcon(iconClassName(isHover));\n    },\n    [iconClassName]\n  );\n\n  const onRenderThemedSubmitIcon = useCallback(\n    (isHover: boolean) => {\n      return onRenderSubmitIcon(iconClassName(isHover));\n    },\n    [iconClassName]\n  );\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const hasMultipleAttachments = useMemo(() => {\n    return doesMessageContainMultipleAttachments(message);\n  }, [message]);\n\n  const actionButtons = useMemo(() => {\n    return (\n      <Stack horizontal>\n        <InputBoxButton\n          className={richTextActionButtonsStyle}\n          ariaLabel={strings.editBoxCancelButton}\n          tooltipContent={strings.editBoxCancelButton}\n          onRenderIcon={onRenderThemedCancelIcon}\n          onClick={() => {\n            onCancel && onCancel(message.messageId);\n          }}\n          id={'dismissIconWrapper'}\n          data-testId={strings.editBoxCancelButton}\n        />\n        <InputBoxButton\n          className={richTextActionButtonsStyle}\n          ariaLabel={strings.editBoxSubmitButton}\n          tooltipContent={strings.editBoxSubmitButton}\n          onRenderIcon={onRenderThemedSubmitIcon}\n          onClick={(e) => {\n            // it's very important to pass an empty attachment here\n            // so when user removes all attachments, UI can reflect it instantly\n            // if you set it to undefined, the attachments pre-edited would still be there\n            // until edit message event is received\n            submitEnabled &&\n              onSubmit(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata);\n            e.stopPropagation();\n          }}\n          id={'submitIconWrapper'}\n          data-testId={strings.editBoxSubmitButton}\n        />\n      </Stack>\n    );\n  }, [\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentMetadata,\n    message.messageId,\n    onCancel,\n    onRenderThemedCancelIcon,\n    onRenderThemedSubmitIcon,\n    onSubmit,\n    strings.editBoxCancelButton,\n    strings.editBoxSubmitButton,\n    submitEnabled,\n    textValue\n  ]);\n  const richTextLocaleStrings = useMemo(() => {\n    /* @conditional-compile-remove(rich-text-editor) */\n    return { ...locale.richTextSendBox, ...strings };\n    return locale.sendBox;\n  }, [\n    /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n    /* @conditional-compile-remove(rich-text-editor) */ strings,\n    locale.sendBox\n  ]);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n    // edit box only capable of removing attachments\n    // we need to expand attachment actions\n    // if we want to support more actions e.g. add\n    handleAttachmentAction({ type: 'remove', id: attachmentId });\n  }, []);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const onRenderAttachmentUploads = useCallback(() => {\n    return (\n      <Stack className={attachmentUploadCardsStyles}>\n        <FluentV9ThemeProvider v8Theme={theme}>\n          <_AttachmentUploadCards\n            attachments={attachmentMetadata}\n            onCancelAttachmentUpload={onCancelAttachmentUpload}\n          />\n        </FluentV9ThemeProvider>\n      </Stack>\n    );\n  }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n  const getContent = (): JSX.Element => {\n    return (\n      <Stack className={mergeStyles(editBoxWidthStyles)}>\n        <RichTextSendBoxErrors textTooLongMessage={textTooLongMessage} systemMessage={message.failureReason} />\n        <RichTextInputBoxComponent\n          placeholderText={strings.editBoxPlaceholderText}\n          onChange={setText}\n          editorComponentRef={editTextFieldRef}\n          initialContent={message.content}\n          strings={richTextLocaleStrings}\n          disabled={false}\n          actionComponents={actionButtons}\n          richTextEditorStyleProps={editBoxRichTextEditorStyle}\n          isHorizontalLayoutDisabled={true}\n          /* @conditional-compile-remove(file-sharing-acs) */\n          onRenderAttachmentUploads={onRenderAttachmentUploads}\n          /* @conditional-compile-remove(rich-text-editor-image-upload) */\n          onPaste={onPaste}\n        />\n      </Stack>\n    );\n  };\n\n  const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n  return (\n    <ChatMyMessage\n      attached={attached}\n      root={{\n        className: mergeClasses(\n          chatMyMessageStyles.root,\n          /* @conditional-compile-remove(file-sharing-acs) */\n          hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined\n        )\n      }}\n      body={{\n        className: mergeClasses(\n          editContainerStyles.body,\n          attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n        )\n      }}\n    >\n      {getContent()}\n    </ChatMyMessage>\n  );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","useMemo","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses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AAkB,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAI,CAAA;AACvG,YAAA,KAAA,CAAA,aAAA,CAACC,+BAAyB,EACxB,EAAA,eAAe,EAAE,OAAO,CAAC,sBAAsB,EAC/C,QAAQ,EAAE,OAAO,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,cAAc,EAAE,OAAO,CAAC,OAAO,EAC/B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,aAAa,EAC/B,wBAAwB,EAAEC,gCAA0B,EACpD,0BAA0B,EAAE,IAAI;;AAEhC,gBAAA,yBAAyB,EAAE,yBAAyB;;AAEpD,gBAAA,OAAO,EAAE,OAAO,EAChB,CAAA,CACI,EACR;AACJ,KAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,mBAAmB,GAAG,SAAS,CAC7E;AACF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,4BAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS,CAClE;AACF,SAAA,EAAA,EAEA,UAAU,EAAE,CACC,EAChB;AACJ;;;;;"}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-D8CIuj9U.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\nimport {\n  getMessageState,\n  onRenderCancelIcon,\n  onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n  attachmentMetadataReducer,\n  getMessageWithAttachmentMetadata,\n  doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n  onCancel?: (messageId: string) => void;\n  onSubmit: (\n    text: string,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentMetadata?: AttachmentMetadata[]\n  ) => void;\n  message: ChatMessage;\n  strings: MessageThreadStrings;\n  /* @conditional-compile-remove(rich-text-editor-image-upload) */\n  onPaste?: (event: { content: DocumentFragment }) => void;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n  props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n  const {\n    onCancel,\n    onSubmit,\n    strings,\n    message,\n    /* @conditional-compile-remove(rich-text-editor-image-upload) */\n    onPaste\n  } = props;\n\n  const [textValue, setTextValue] = useState<string>(message.content || '');\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const [attachmentMetadata, handleAttachmentAction] = useReducer(\n    attachmentMetadataReducer,\n    getMessageWithAttachmentMetadata(message) ?? []\n  );\n  const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n  const theme = useTheme();\n  const messageState = useMemo(() => {\n    return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n  }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n  const submitEnabled = messageState === 'OK';\n\n  const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n  const chatMyMessageStyles = useChatMyMessageStyles();\n  const locale = useLocale().strings;\n\n  const setText = useCallback((newValue?: string): void => {\n    setTextValue(newValue ?? '');\n  }, []);\n\n  useEffect(() => {\n    editTextFieldRef.current?.focus();\n  }, []);\n\n  const textTooLongMessage = useMemo(() => {\n    return messageState === 'too long'\n      ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n      : undefined;\n  }, [messageState, strings.editBoxTextLimit]);\n\n  const iconClassName = useCallback(\n    (isHover: boolean) => {\n      const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n      return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n    },\n    [theme.palette.accent, theme.palette.neutralSecondary]\n  );\n\n  const onRenderThemedCancelIcon = useCallback(\n    (isHover: boolean) => {\n      return onRenderCancelIcon(iconClassName(isHover));\n    },\n    [iconClassName]\n  );\n\n  const onRenderThemedSubmitIcon = useCallback(\n    (isHover: boolean) => {\n      return onRenderSubmitIcon(iconClassName(isHover));\n    },\n    [iconClassName]\n  );\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const hasMultipleAttachments = useMemo(() => {\n    return doesMessageContainMultipleAttachments(message);\n  }, [message]);\n\n  const actionButtons = useMemo(() => {\n    return (\n      <Stack horizontal>\n        <InputBoxButton\n          className={richTextActionButtonsStyle}\n          ariaLabel={strings.editBoxCancelButton}\n          tooltipContent={strings.editBoxCancelButton}\n          onRenderIcon={onRenderThemedCancelIcon}\n          onClick={() => {\n            onCancel && onCancel(message.messageId);\n          }}\n          id={'dismissIconWrapper'}\n          data-testId={strings.editBoxCancelButton}\n        />\n        <InputBoxButton\n          className={richTextActionButtonsStyle}\n          ariaLabel={strings.editBoxSubmitButton}\n          tooltipContent={strings.editBoxSubmitButton}\n          onRenderIcon={onRenderThemedSubmitIcon}\n          onClick={(e) => {\n            // it's very important to pass an empty attachment here\n            // so when user removes all attachments, UI can reflect it instantly\n            // if you set it to undefined, the attachments pre-edited would still be there\n            // until edit message event is received\n            submitEnabled &&\n              onSubmit(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata);\n            e.stopPropagation();\n          }}\n          id={'submitIconWrapper'}\n          data-testId={strings.editBoxSubmitButton}\n        />\n      </Stack>\n    );\n  }, [\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentMetadata,\n    message.messageId,\n    onCancel,\n    onRenderThemedCancelIcon,\n    onRenderThemedSubmitIcon,\n    onSubmit,\n    strings.editBoxCancelButton,\n    strings.editBoxSubmitButton,\n    submitEnabled,\n    textValue\n  ]);\n  const richTextLocaleStrings = useMemo(() => {\n    /* @conditional-compile-remove(rich-text-editor) */\n    return { ...locale.richTextSendBox, ...strings };\n    return locale.sendBox;\n  }, [\n    /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n    /* @conditional-compile-remove(rich-text-editor) */ strings,\n    locale.sendBox\n  ]);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n    // edit box only capable of removing attachments\n    // we need to expand attachment actions\n    // if we want to support more actions e.g. add\n    handleAttachmentAction({ type: 'remove', id: attachmentId });\n  }, []);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const onRenderAttachmentUploads = useCallback(() => {\n    return (\n      <Stack className={attachmentUploadCardsStyles}>\n        <FluentV9ThemeProvider v8Theme={theme}>\n          <_AttachmentUploadCards\n            attachments={attachmentMetadata}\n            onCancelAttachmentUpload={onCancelAttachmentUpload}\n          />\n        </FluentV9ThemeProvider>\n      </Stack>\n    );\n  }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n  const getContent = (): JSX.Element => {\n    return (\n      <Stack className={mergeStyles(editBoxWidthStyles)}>\n        <RichTextSendBoxErrors textTooLongMessage={textTooLongMessage} systemMessage={message.failureReason} />\n        <RichTextInputBoxComponent\n          placeholderText={strings.editBoxPlaceholderText}\n          onChange={setText}\n          editorComponentRef={editTextFieldRef}\n          initialContent={message.content}\n          strings={richTextLocaleStrings}\n          disabled={false}\n          actionComponents={actionButtons}\n          richTextEditorStyleProps={editBoxRichTextEditorStyle}\n          isHorizontalLayoutDisabled={true}\n          /* @conditional-compile-remove(file-sharing-acs) */\n          onRenderAttachmentUploads={onRenderAttachmentUploads}\n          /* @conditional-compile-remove(rich-text-editor-image-upload) */\n          onPaste={onPaste}\n        />\n      </Stack>\n    );\n  };\n\n  const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n  return (\n    <ChatMyMessage\n      attached={attached}\n      root={{\n        className: mergeClasses(\n          chatMyMessageStyles.root,\n          /* @conditional-compile-remove(file-sharing-acs) */\n          hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined\n        )\n      }}\n      body={{\n        className: mergeClasses(\n          editContainerStyles.body,\n          attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n        )\n      }}\n    >\n      {getContent()}\n    </ChatMyMessage>\n  );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","useMemo","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAuDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;AACf,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO;;IAEP,OAAO,EACR,GAAG,KAAK,CAAC;AAEV,IAAA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAS,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;;AAE1E,IAAA,MAAM,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,GAAGC,gBAAU,CAC7DC,+BAAyB,EACzB,CAAA,EAAA,GAAAC,sCAAgC,CAAC,OAAO,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,EAAE,CAChD,CAAC;IACF,MAAM,gBAAg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AAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,mBAAmB,GAAG,SAAS,CAC7E;AACF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,4BAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS,CAClE;AACF,SAAA,EAAA,EAEA,UAAU,EAAE,CACC,EAChB;AACJ;;;;;"}
         
     | 
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            'use strict';
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            var React = require('react');
         
     | 
| 
       4 
     | 
    
         
            -
            var index = require('./index- 
     | 
| 
      
 4 
     | 
    
         
            +
            var index = require('./index-D40Kfey5.js');
         
     | 
| 
       5 
5 
     | 
    
         
             
            require('@fluentui/react');
         
     | 
| 
       6 
6 
     | 
    
         
             
            require('@fluentui/react-components');
         
     | 
| 
       7 
7 
     | 
    
         
             
            require('@fluentui-contrib/react-chat');
         
     | 
| 
         @@ -50,4 +50,4 @@ const RichTextSendBoxWrapper = (props) => { 
     | 
|
| 
       50 
50 
     | 
    
         
             
            };
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
52 
     | 
    
         
             
            exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
         
     | 
| 
       53 
     | 
    
         
            -
            //# sourceMappingURL=RichTextSendBoxWrapper- 
     | 
| 
      
 53 
     | 
    
         
            +
            //# sourceMappingURL=RichTextSendBoxWrapper-D0jx96DX.js.map
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"RichTextSendBoxWrapper- 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"RichTextSendBoxWrapper-D0jx96DX.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n  const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n  return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC,CAAC;AAE1D,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI,CAAC;AAClE;;;;"}
         
     | 
| 
         @@ -175,7 +175,7 @@ function getDefaultExportFromCjs (x) { 
     | 
|
| 
       175 
175 
     | 
    
         
             
            // Copyright (c) Microsoft Corporation.
         
     | 
| 
       176 
176 
     | 
    
         
             
            // Licensed under the MIT License.
         
     | 
| 
       177 
177 
     | 
    
         
             
            // GENERATED FILE. DO NOT EDIT MANUALLY.
         
     | 
| 
       178 
     | 
    
         
            -
            var telemetryVersion = '1.18.0-alpha- 
     | 
| 
      
 178 
     | 
    
         
            +
            var telemetryVersion = '1.18.0-alpha-202406250013';
         
     | 
| 
       179 
179 
     | 
    
         | 
| 
       180 
180 
     | 
    
         | 
| 
       181 
181 
     | 
    
         
             
            var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
         
     | 
| 
         @@ -13939,7 +13939,7 @@ class _ErrorBoundary extends React.Component { 
     | 
|
| 
       13939 
13939 
     | 
    
         
             
            // Copyright (c) Microsoft Corporation.
         
     | 
| 
       13940 
13940 
     | 
    
         
             
            // Licensed under the MIT License.
         
     | 
| 
       13941 
13941 
     | 
    
         
             
            /* @conditional-compile-remove(rich-text-editor) */
         
     | 
| 
       13942 
     | 
    
         
            -
            const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox- 
     | 
| 
      
 13942 
     | 
    
         
            +
            const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-D8CIuj9U.js'); }));
         
     | 
| 
       13943 
13943 
     | 
    
         
             
            /**
         
     | 
| 
       13944 
13944 
     | 
    
         
             
             * @private
         
     | 
| 
       13945 
13945 
     | 
    
         
             
             * Use this function to load RoosterJS dependencies early in the lifecycle.
         
     | 
| 
         @@ -13947,7 +13947,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve() 
     | 
|
| 
       13947 
13947 
     | 
    
         
             
             *
         
     | 
| 
       13948 
13948 
     | 
    
         
             
             * @conditional-compile-remove(rich-text-editor)
         
     | 
| 
       13949 
13949 
     | 
    
         
             
             */
         
     | 
| 
       13950 
     | 
    
         
            -
            const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox- 
     | 
| 
      
 13950 
     | 
    
         
            +
            const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-D8CIuj9U.js'); });
         
     | 
| 
       13951 
13951 
     | 
    
         
             
            /**
         
     | 
| 
       13952 
13952 
     | 
    
         
             
             * @private
         
     | 
| 
       13953 
13953 
     | 
    
         
             
             */
         
     | 
| 
         @@ -28304,7 +28304,7 @@ const ParticipantListWithHeading = (props) => { 
     | 
|
| 
       28304 
28304 
     | 
    
         
             
                        /* @conditional-compile-remove(total-participant-count) */ totalParticipantCount)),
         
     | 
| 
       28305 
28305 
     | 
    
         
             
                        (onClickHeadingMoreButton ||
         
     | 
| 
       28306 
28306 
     | 
    
         
             
                            ((headingMoreButtonMenuProps === null || headingMoreButtonMenuProps === void 0 ? void 0 : headingMoreButtonMenuProps.items) && headingMoreButtonMenuProps.items.length > 0)) && (React.createElement(react.Stack.Item, null,
         
     | 
| 
       28307 
     | 
    
         
            -
                            React.createElement(react.DefaultButton, { ariaLabel: headingMoreButtonAriaLabel, styles: headingMoreButtonStyles(theme), iconProps: { iconName: 'PeoplePaneMoreButton' }, onClick: onClickHeadingMoreButton ? () => onClickHeadingMoreButton() : undefined, menuProps: props.onClickHeadingMoreButton ? undefined : props.headingMoreButtonMenuProps, onRenderMenuIcon: () => null })))),
         
     | 
| 
      
 28307 
     | 
    
         
            +
                            React.createElement(react.DefaultButton, { "data-ui-id": "people-pane-header-more-button", ariaLabel: headingMoreButtonAriaLabel, styles: headingMoreButtonStyles(theme), iconProps: { iconName: 'PeoplePaneMoreButton' }, onClick: onClickHeadingMoreButton ? () => onClickHeadingMoreButton() : undefined, menuProps: props.onClickHeadingMoreButton ? undefined : props.headingMoreButtonMenuProps, onRenderMenuIcon: () => null })))),
         
     | 
| 
       28308 
28308 
     | 
    
         
             
                    React.createElement(react.FocusZone, { className: participantListContainerStyle, shouldFocusOnMount: true },
         
     | 
| 
       28309 
28309 
     | 
    
         
             
                        React.createElement(ParticipantList$k, Object.assign({}, participantListProps, { pinnedParticipants: pinnedParticipants, styles: props.isMobile ? participantListMobileStyle : participantListStyle, onRenderAvatar: (userId, options) => (React.createElement(React.Fragment, null,
         
     | 
| 
       28310 
28310 
     | 
    
         
             
                                React.createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { hidePersonaDetails: !!(options === null || options === void 0 ? void 0 : options.text), dataProvider: onFetchAvatarPersonaData, allowActiveBorder: true })),
         
     | 
| 
         @@ -28357,7 +28357,7 @@ const AttachmentDownloadErrorBar = (props) => { 
     | 
|
| 
       28357 
28357 
     | 
    
         
             
            /**
         
     | 
| 
       28358 
28358 
     | 
    
         
             
             * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
         
     | 
| 
       28359 
28359 
     | 
    
         
             
             */
         
     | 
| 
       28360 
     | 
    
         
            -
            const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper- 
     | 
| 
      
 28360 
     | 
    
         
            +
            const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-D0jx96DX.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
         
     | 
| 
       28361 
28361 
     | 
    
         
             
            /**
         
     | 
| 
       28362 
28362 
     | 
    
         
             
             * @private
         
     | 
| 
       28363 
28363 
     | 
    
         
             
             * Use this function to load RoosterJS dependencies early in the lifecycle.
         
     | 
| 
         @@ -28365,7 +28365,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function 
     | 
|
| 
       28365 
28365 
     | 
    
         
             
             *
         
     | 
| 
       28366 
28366 
     | 
    
         
             
            /* @conditional-compile-remove(rich-text-editor-composite-support)
         
     | 
| 
       28367 
28367 
     | 
    
         
             
             */
         
     | 
| 
       28368 
     | 
    
         
            -
            const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper- 
     | 
| 
      
 28368 
     | 
    
         
            +
            const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-D0jx96DX.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
         
     | 
| 
       28369 
28369 
     | 
    
         
             
            /**
         
     | 
| 
       28370 
28370 
     | 
    
         
             
             * @private
         
     | 
| 
       28371 
28371 
     | 
    
         
             
             */
         
     | 
| 
         @@ -30035,7 +30035,7 @@ const EndCall = (props) => { 
     | 
|
| 
       30035 
30035 
     | 
    
         
             
                    React.createElement(Prompt, Object.assign({}, dialogLabels, { styles: { main: { minWidth: '22.5rem', padding: '1.5rem' } }, cancelButtonLabel: localeStrings.call.hangUpCancelButtonLabel, onConfirm: () => onHangUpConfirm(props.enableEndCallMenu), isOpen: showHangUpConfirm, onCancel: toggleConfirm })),
         
     | 
| 
       30036 
30036 
     | 
    
         
             
                    React.createElement(EndCallButton, Object.assign({ "data-ui-id": "call-composite-hangup-button" }, hangUpButtonProps, { 
         
     | 
| 
       30037 
30037 
     | 
    
         
             
                        /* @conditional-compile-remove(end-call-options) */
         
     | 
| 
       30038 
     | 
    
         
            -
                        onHangUp: hangUpOverride, styles: styles, showLabel: !compactMode, 
         
     | 
| 
      
 30038 
     | 
    
         
            +
                        onHangUp: props.disableEndCallModal ? onHangUp : hangUpOverride, styles: styles, showLabel: !compactMode, 
         
     | 
| 
       30039 
30039 
     | 
    
         
             
                        /* @conditional-compile-remove(end-call-options) */
         
     | 
| 
       30040 
30040 
     | 
    
         
             
                        enableEndCallMenu: (_a = props.enableEndCallMenu) !== null && _a !== void 0 ? _a : false }))));
         
     | 
| 
       30041 
30041 
     | 
    
         
             
            };
         
     | 
| 
         @@ -31480,7 +31480,7 @@ const inferCommonCallControlOptions = (mobileView, commonCallControlOptions) => 
     | 
|
| 
       31480 
31480 
     | 
    
         
             
             * @private
         
     | 
| 
       31481 
31481 
     | 
    
         
             
             */
         
     | 
| 
       31482 
31482 
     | 
    
         
             
            const CommonCallControlBar = (props) => {
         
     | 
| 
       31483 
     | 
    
         
            -
                var _a, _b, _c, _d, _e, _f, _g, _h, _j;
         
     | 
| 
      
 31483 
     | 
    
         
            +
                var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
         
     | 
| 
       31484 
31484 
     | 
    
         
             
                const theme = react.useTheme();
         
     | 
| 
       31485 
31485 
     | 
    
         
             
                const rtl = theme.rtl;
         
     | 
| 
       31486 
31486 
     | 
    
         
             
                const controlBarContainerRef = React.useRef(null);
         
     | 
| 
         @@ -31648,7 +31648,9 @@ const CommonCallControlBar = (props) => { 
     | 
|
| 
       31648 
31648 
     | 
    
         
             
                                                        ((_h = (_g = props.callControls) === null || _g === void 0 ? void 0 : _g.endCallButton) === null || _h === void 0 ? void 0 : _h.hangUpForEveryone) === 'endCallOptions' &&
         
     | 
| 
       31649 
31649 
     | 
    
         
             
                                                        // Only show the end call menu when the call is connected, user should not be able to end the call for everyone
         
     | 
| 
       31650 
31650 
     | 
    
         
             
                                                        // when they are not actively in the call to communicate they will.
         
     | 
| 
       31651 
     | 
    
         
            -
                                                        callState.callStatus === 'Connected'  
     | 
| 
      
 31651 
     | 
    
         
            +
                                                        callState.callStatus === 'Connected', disableEndCallModal: !isBoolean(props.callControls) &&
         
     | 
| 
      
 31652 
     | 
    
         
            +
                                                        !isBoolean((_j = props.callControls) === null || _j === void 0 ? void 0 : _j.endCallButton) &&
         
     | 
| 
      
 31653 
     | 
    
         
            +
                                                        ((_l = (_k = props.callControls) === null || _k === void 0 ? void 0 : _k.endCallButton) === null || _l === void 0 ? void 0 : _l.disableEndCallModal) }))))))),
         
     | 
| 
       31652 
31654 
     | 
    
         
             
                        !props.mobileView && sideButtonsPresent && (React.createElement(react.Stack.Item, null,
         
     | 
| 
       31653 
31655 
     | 
    
         
             
                            React.createElement("div", { ref: sidepaneControlsRef },
         
     | 
| 
       31654 
31656 
     | 
    
         
             
                                React.createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
         
     | 
| 
         @@ -31656,8 +31658,8 @@ const CommonCallControlBar = (props) => { 
     | 
|
| 
       31656 
31658 
     | 
    
         
             
                                            ? peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.tooltipCloseAriaLabel
         
     | 
| 
       31657 
31659 
     | 
    
         
             
                                            : peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.tooltipOpenAriaLabel, showLabel: options.displayType !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "common-call-composite-people-button", disabled: props.disableButtonsForLobbyPage ||
         
     | 
| 
       31658 
31660 
     | 
    
         
             
                                            props.disableButtonsForHoldScreen ||
         
     | 
| 
       31659 
     | 
    
         
            -
                                            isDisabled$4(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles, componentRef: props.peopleButtonRef })), ( 
     | 
| 
       31660 
     | 
    
         
            -
                                     
     | 
| 
      
 31661 
     | 
    
         
            +
                                            isDisabled$4(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles, componentRef: props.peopleButtonRef })), (_m = customButtons['secondary']) === null || _m === void 0 ? void 0 :
         
     | 
| 
      
 31662 
     | 
    
         
            +
                                    _m.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
         
     | 
| 
       31661 
31663 
     | 
    
         
             
                                        return (React.createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
         
     | 
| 
       31662 
31664 
     | 
    
         
             
                                    }))))))));
         
     | 
| 
       31663 
31665 
     | 
    
         
             
            };
         
     | 
| 
         @@ -33199,6 +33201,7 @@ const usePeoplePane = (props) => { 
     | 
|
| 
       33199 
33201 
     | 
    
         
             
                            }
         
     | 
| 
       33200 
33202 
     | 
    
         
             
                        }
         
     | 
| 
       33201 
33203 
     | 
    
         
             
                        menuItems.push({
         
     | 
| 
      
 33204 
     | 
    
         
            +
                            ['data-ui-id']: 'people-pane-mute-all-remote-participants',
         
     | 
| 
       33202 
33205 
     | 
    
         
             
                            key: 'muteAllRemoteParticipants',
         
     | 
| 
       33203 
33206 
     | 
    
         
             
                            text: localeStrings.muteAllMenuLabel,
         
     | 
| 
       33204 
33207 
     | 
    
         
             
                            iconProps: {
         
     | 
| 
         @@ -33208,7 +33211,6 @@ const usePeoplePane = (props) => { 
     | 
|
| 
       33208 
33211 
     | 
    
         
             
                            onClick: () => {
         
     | 
| 
       33209 
33212 
     | 
    
         
             
                                setShowMuteAllPrompt(true);
         
     | 
| 
       33210 
33213 
     | 
    
         
             
                            },
         
     | 
| 
       33211 
     | 
    
         
            -
                            'data-ui-id': 'participant-item-mute-all-remote-participants',
         
     | 
| 
       33212 
33214 
     | 
    
         
             
                            ariaLabel: localeStrings.muteAllMenuLabel,
         
     | 
| 
       33213 
33215 
     | 
    
         
             
                            disabled: isAllMuted
         
     | 
| 
       33214 
33216 
     | 
    
         
             
                        });
         
     | 
| 
         @@ -41671,4 +41673,4 @@ exports.useTeamsCall = useTeamsCall; 
     | 
|
| 
       41671 
41673 
     | 
    
         
             
            exports.useTeamsCallAdapter = useTeamsCallAdapter;
         
     | 
| 
       41672 
41674 
     | 
    
         
             
            exports.useTeamsCallAgent = useTeamsCallAgent;
         
     | 
| 
       41673 
41675 
     | 
    
         
             
            exports.useTheme = useTheme;
         
     | 
| 
       41674 
     | 
    
         
            -
            //# sourceMappingURL=index- 
     | 
| 
      
 41676 
     | 
    
         
            +
            //# sourceMappingURL=index-D40Kfey5.js.map
         
     |