@azure/communication-react 1.17.0-alpha-202405180013 → 1.17.0-alpha-202405230013

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.
Files changed (39) hide show
  1. package/dist/communication-react.d.ts +2 -0
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-r0U_8d3I.js → ChatMessageComponentAsRichTextEditBox-BIM6HeBg.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-r0U_8d3I.js.map → ChatMessageComponentAsRichTextEditBox-BIM6HeBg.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DNlYAgO2.js → RichTextSendBoxWrapper-bWS9ze-2.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DNlYAgO2.js.map → RichTextSendBoxWrapper-bWS9ze-2.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-BLj9R9ms.js → index-CwHFMnmg.js} +37 -34
  7. package/dist/dist-cjs/communication-react/index-CwHFMnmg.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js +1 -3
  12. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
  14. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -0
  16. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  18. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +5 -7
  20. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
  21. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +5 -3
  23. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +2 -8
  24. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +10 -8
  26. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
  28. package/dist/dist-esm/react-components/src/theming/icons.js +2 -1
  29. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +7 -4
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -1
  33. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  34. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +4 -1
  35. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -3
  36. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -0
  38. package/package.json +1 -1
  39. package/dist/dist-cjs/communication-react/index-BLj9R9ms.js.map +0 -1
@@ -6512,6 +6512,7 @@ export declare const DEFAULT_COMPONENT_ICONS: {
6512
6512
  ContextMenuCameraIcon: React_2.JSX.Element;
6513
6513
  ContextMenuMicIcon: React_2.JSX.Element;
6514
6514
  ContextMenuSpeakerIcon: React_2.JSX.Element;
6515
+ ContextMenuRemoveParticipant: React_2.JSX.Element;
6515
6516
  SurveyStarIcon: React_2.JSX.Element;
6516
6517
  SurveyStarIconFilled: React_2.JSX.Element;
6517
6518
  StartSpotlightContextualMenuItem: React_2.JSX.Element;
@@ -6679,6 +6680,7 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
6679
6680
  ContextMenuCameraIcon: React_2.JSX.Element;
6680
6681
  ContextMenuMicIcon: React_2.JSX.Element;
6681
6682
  ContextMenuSpeakerIcon: React_2.JSX.Element;
6683
+ ContextMenuRemoveParticipant: React_2.JSX.Element;
6682
6684
  SurveyStarIcon: React_2.JSX.Element;
6683
6685
  SurveyStarIconFilled: React_2.JSX.Element;
6684
6686
  StartSpotlightContextualMenuItem: React_2.JSX.Element;
@@ -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-BLj9R9ms.js');
7
+ var index = require('./index-CwHFMnmg.js');
8
8
  var React = require('react');
9
9
  require('reselect');
10
10
  require('@azure/communication-calling');
@@ -146,4 +146,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
146
146
 
147
147
  exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
148
148
  exports.default = ChatMessageComponentAsRichTextEditBox;
149
- //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-r0U_8d3I.js.map
149
+ //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-BIM6HeBg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-r0U_8d3I.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(attachment-upload) */\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(attachment-upload) */\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(attachment-upload) */\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(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(attachment-upload) */\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(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const { onCancel, onSubmit, strings, message } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\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(attachment-upload) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(attachment-upload) */ 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(attachment-upload) */\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(attachment-upload) */ attachmentMetadata);\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(attachment-upload) */\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(attachment-download) @conditional-compile-remove(attachment-upload) */\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(attachment-download) @conditional-compile-remove(attachment-upload) */\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(attachment-upload) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\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(attachment-upload) */\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;AAqDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;IACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,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,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAA6B,IAAI,CAAC,CAAC;AACxE,IAAA,MAAM,KAAK,GAAGC,cAAQ,EAAE,CAAC;AACzB,IAAA,MAAM,YAAY,GAAGC,aAAO,CAAC,MAAK;AAChC,QAAA,OAAOC,qBAAe,CAAC,SAAS,uDAAuD,kBAAkB,KAAlB,IAAA,IAAA,kBAAkB,KAAlB,KAAA,CAAA,GAAA,kBAAkB,GAAI,EAAE,CAAC,CAAC;KAClH,EAAE,sDAAsD,kBAAkB,EAAE,SAAS,CAAC,CAAC,CAAC;AAEzF,IAAA,MAAM,aAAa,GAAG,YAAY,KAAK,IAAI,CAAC;AAE5C,IAAA,MAAM,mBAAmB,GAAGC,+C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,"file":"ChatMessageComponentAsRichTextEditBox-BIM6HeBg.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(attachment-upload) */\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(attachment-upload) */\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(attachment-upload) */\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(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(attachment-upload) */\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(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const { onCancel, onSubmit, strings, message } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\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(attachment-upload) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(attachment-upload) */ 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(attachment-upload) */\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(attachment-upload) */ attachmentMetadata);\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(attachment-upload) */\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(attachment-download) @conditional-compile-remove(attachment-upload) */\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(attachment-download) @conditional-compile-remove(attachment-upload) */\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(attachment-upload) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\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(attachment-upload) */\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;AAqDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;IACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,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,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAA6B,IAAI,CAAC,CAAC;AACxE,IAAA,MAAM,KAAK,GAAGC,cAAQ,EAAE,CAAC;AACzB,IAAA,MAAM,YAAY,GAAGC,aAAO,CAAC,MAAK;AAChC,QAAA,OAAOC,qBAAe,CAAC,SAAS,uDAAuD,kBAAkB,KAAl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AS,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-BLj9R9ms.js');
4
+ var index = require('./index-CwHFMnmg.js');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-components');
7
7
  require('@fluentui-contrib/react-chat');
@@ -49,4 +49,4 @@ const RichTextSendBoxWrapper = (props) => {
49
49
  };
50
50
 
51
51
  exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
52
- //# sourceMappingURL=RichTextSendBoxWrapper-DNlYAgO2.js.map
52
+ //# sourceMappingURL=RichTextSendBoxWrapper-bWS9ze-2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextSendBoxWrapper-DNlYAgO2.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;;;;"}
1
+ {"version":3,"file":"RichTextSendBoxWrapper-bWS9ze-2.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;;;;"}
@@ -174,7 +174,7 @@ function getDefaultExportFromCjs (x) {
174
174
  // Copyright (c) Microsoft Corporation.
175
175
  // Licensed under the MIT License.
176
176
  // GENERATED FILE. DO NOT EDIT MANUALLY.
177
- var telemetryVersion = '1.17.0-alpha-202405180013';
177
+ var telemetryVersion = '1.17.0-alpha-202405230013';
178
178
 
179
179
 
180
180
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -6843,6 +6843,7 @@ const DEFAULT_COMPONENT_ICONS = {
6843
6843
  ContextMenuCameraIcon: React.createElement(reactIcons.Video20Regular, null),
6844
6844
  ContextMenuMicIcon: React.createElement(reactIcons.Mic20Regular, null),
6845
6845
  ContextMenuSpeakerIcon: React.createElement(reactIcons.Speaker220Regular, null),
6846
+ ContextMenuRemoveParticipant: React.createElement(reactIcons.PersonDelete20Regular, null),
6846
6847
  /* @conditional-compile-remove(end-of-call-survey) */
6847
6848
  SurveyStarIcon: React.createElement(reactIcons.Star28Regular, null),
6848
6849
  /* @conditional-compile-remove(end-of-call-survey) */
@@ -11748,14 +11749,14 @@ const useChatStyles = reactComponents.makeStyles({
11748
11749
  * @private
11749
11750
  */
11750
11751
  const useChatMessageRenderStyles = reactComponents.makeStyles({
11751
- rootCommon: {
11752
- '&:focus-visible': Object.assign({}, reactComponents.shorthands.outline('0'))
11753
- },
11752
+ rootCommon: {},
11754
11753
  rootMessage: Object.assign(Object.assign(Object.assign({}, reactComponents.shorthands.padding('0')), reactComponents.shorthands.margin('0')), { maxWidth: '100%', minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem` }),
11755
11754
  rootMyMessage: Object.assign(Object.assign({ gridTemplateColumns: 'auto fit-content(0)', gridTemplateAreas: `
11756
11755
  "body status"
11757
11756
  `, columnGap: '0', gridGap: '0' }, reactComponents.shorthands.padding('0')), { marginTop: '0', marginRight: '0', marginBottom: '0', marginLeft: '50px', width: `calc(100% - 50px)` }),
11758
- bodyCommon: Object.assign(Object.assign({}, reactComponents.shorthands.padding('0')), { marginRight: '0', marginBottom: '0', backgroundColor: 'transparent', maxWidth: '100%', minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem` }),
11757
+ bodyCommon: Object.assign(Object.assign({}, reactComponents.shorthands.padding('0')), { marginRight: '0', marginBottom: '0', backgroundColor: 'transparent', maxWidth: '100%', minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`, '&:focus-visible': {
11758
+ outlineStyle: 'auto'
11759
+ } }),
11759
11760
  bodyMyMessage: {
11760
11761
  width: '100%',
11761
11762
  marginTop: '0'
@@ -11790,8 +11791,7 @@ const useChatMyMessageStyles = reactComponents.makeStyles({
11790
11791
  gridGap: '0',
11791
11792
  columnGap: '0',
11792
11793
  paddingTop: '0',
11793
- marginLeft: '0',
11794
- '&:focus-visible': Object.assign({}, reactComponents.shorthands.outline('0'))
11794
+ marginLeft: '0'
11795
11795
  },
11796
11796
  body: Object.assign(Object.assign({ paddingBottom: '10px', marginTop: '1rem', maxWidth: '100%', minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`, marginLeft: '0rem' }, reactComponents.shorthands.border('1px', 'solid', 'transparent')), { '&:hover ~ .fui-ChatMyMessage__actions': {
11797
11797
  visibility: 'visible'
@@ -11800,6 +11800,8 @@ const useChatMyMessageStyles = reactComponents.makeStyles({
11800
11800
  }, '& msft-mention': {
11801
11801
  color: reactComponents.tokens.colorStatusWarningBackground3,
11802
11802
  fontWeight: 600
11803
+ }, '&:focus-visible': {
11804
+ outlineStyle: 'auto'
11803
11805
  } }),
11804
11806
  bodyAttached: {
11805
11807
  marginTop: '0.125rem'
@@ -11836,8 +11838,7 @@ const newMessageButtonContainerStyle = react.mergeStyles({
11836
11838
  */
11837
11839
  const useChatMessageStyles = reactComponents.makeStyles({
11838
11840
  root: {
11839
- paddingTop: '0',
11840
- '&:focus-visible': Object.assign({}, reactComponents.shorthands.outline('0'))
11841
+ paddingTop: '0'
11841
11842
  },
11842
11843
  body: Object.assign(Object.assign({ maxWidth: '100%', minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`, marginRight: '0rem', paddingBottom: '10px', zIndex: CHAT_MESSAGE_ZINDEX }, reactComponents.shorthands.border('1px', 'solid', 'transparent')), { '& > div:first-of-type': {
11843
11844
  flexWrap: 'wrap'
@@ -11852,6 +11853,8 @@ const useChatMessageStyles = reactComponents.makeStyles({
11852
11853
  height: 'auto !important'
11853
11854
  }, '& p': Object.assign({}, reactComponents.shorthands.marginBlock('0.125rem')), '& blockquote': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ backgroundColor: reactComponents.tokens.colorBrandBackgroundInverted, clear: 'left', minHeight: '2.25rem', width: 'fit-content', marginTop: '7px', marginRight: '0px', marginLeft: '0px', marginBottom: '7px', paddingTop: '7px', paddingRight: '15px', paddingLeft: '15px', paddingBottom: '7px' }, reactComponents.shorthands.border('solid')), reactComponents.shorthands.borderRadius('4px')), reactComponents.shorthands.borderWidth('1px')), reactComponents.shorthands.borderColor(reactComponents.tokens.colorNeutralStroke1Selected)), { borderLeftWidth: '4px' }), '& code': {
11854
11855
  whiteSpace: 'pre-wrap'
11856
+ }, '&:focus-visible': {
11857
+ outlineStyle: 'auto'
11855
11858
  } }),
11856
11859
  bodyWithPlaceholderImage: {
11857
11860
  '& img[src=""]': {
@@ -12214,9 +12217,7 @@ const MessageStatusIcon = (props) => {
12214
12217
  const { shouldAnnounce, iconName, iconClassName, ariaLabel } = props;
12215
12218
  return (React.createElement(React.Fragment, null,
12216
12219
  ariaLabel && shouldAnnounce && React.createElement(LiveMessage, { message: ariaLabel, ariaLive: "polite" }),
12217
- React.createElement("div", {
12218
- // make icon accessible
12219
- tabIndex: 0 },
12220
+ React.createElement("div", null,
12220
12221
  React.createElement(react.Icon, { role: 'status', "aria-live": shouldAnnounce ? 'polite' : 'off', "data-ui-id": 'chat-composite-message-status-icon', "aria-label": ariaLabel, iconName: iconName, className: iconClassName }))));
12221
12222
  };
12222
12223
 
@@ -13511,7 +13512,7 @@ class _ErrorBoundary extends React.Component {
13511
13512
  // Copyright (c) Microsoft Corporation.
13512
13513
  // Licensed under the MIT License.
13513
13514
  /* @conditional-compile-remove(rich-text-editor) */
13514
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-r0U_8d3I.js'); }));
13515
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-BIM6HeBg.js'); }));
13515
13516
  /**
13516
13517
  * @private
13517
13518
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -13519,7 +13520,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
13519
13520
  *
13520
13521
  * @conditional-compile-remove(rich-text-editor)
13521
13522
  */
13522
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-r0U_8d3I.js'); });
13523
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-BIM6HeBg.js'); });
13523
13524
  /**
13524
13525
  * @private
13525
13526
  */
@@ -14736,7 +14737,7 @@ const ParticipantItem = (props) => {
14736
14737
  }, styles === null || styles === void 0 ? void 0 : styles.avatar) }, avatarOptions)));
14737
14738
  const meTextStyle = React.useMemo(() => react.mergeStyles(meContainerStyle, { color: theme.palette.neutralSecondary }, styles === null || styles === void 0 ? void 0 : styles.me), [theme.palette.neutralSecondary, styles === null || styles === void 0 ? void 0 : styles.me]);
14738
14739
  const contextualMenuStyle = React.useMemo(() => react.mergeStyles({ background: theme.palette.neutralLighterAlt }, styles === null || styles === void 0 ? void 0 : styles.menu), [theme.palette.neutralLighterAlt, styles === null || styles === void 0 ? void 0 : styles.menu]);
14739
- const infoContainerStyle = React.useMemo(() => react.mergeStyles(iconContainerStyle$1, { color: theme.palette.neutralTertiary, marginLeft: 'auto' }, styles === null || styles === void 0 ? void 0 : styles.iconContainer), [theme.palette.neutralTertiary, styles === null || styles === void 0 ? void 0 : styles.iconContainer]);
14740
+ const infoContainerStyle = React.useMemo(() => react.mergeStyles(iconContainerStyle$1, { color: theme.palette.neutralSecondary, marginLeft: 'auto' }, styles === null || styles === void 0 ? void 0 : styles.iconContainer), [theme.palette.neutralSecondary, styles === null || styles === void 0 ? void 0 : styles.iconContainer]);
14740
14741
  const onDismissMenu = () => {
14741
14742
  setItemHovered(false);
14742
14743
  setMenuHidden(true);
@@ -15149,6 +15150,10 @@ const ParticipantList$k = (props) => {
15149
15150
  itemProps: {
15150
15151
  styles: (_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles) === null || _b === void 0 ? void 0 : _b.participantSubMenuItemsStyles
15151
15152
  },
15153
+ iconProps: {
15154
+ iconName: 'ContextMenuRemoveParticipant',
15155
+ styles: { root: { lineHeight: 0 } }
15156
+ },
15152
15157
  'data-ui-id': ids.participantListRemoveParticipantButton
15153
15158
  });
15154
15159
  }
@@ -21060,7 +21065,7 @@ const ReactionButton = (props) => {
21060
21065
  React.createElement(react.IconButton, { key: index, onClick: () => {
21061
21066
  props.onReactionClick(emoji);
21062
21067
  dismissMenu();
21063
- }, className: classname })));
21068
+ }, className: classname, ariaLabel: emojiButtonTooltip.get(emoji) })));
21064
21069
  })));
21065
21070
  const emojiList = [
21066
21071
  { key: 'reactions', itemType: react.ContextualMenuItemType.Normal, onRender: renderEmoji }
@@ -22447,15 +22452,9 @@ const _VideoEffectsItem = (props) => {
22447
22452
  disabled,
22448
22453
  backgroundImage
22449
22454
  }), [backgroundImage, disabled, isSelected, theme]);
22450
- const componentRef = React.createRef();
22451
- React.useEffect(() => {
22452
- if (props.focusOnMount && componentRef.current) {
22453
- componentRef.current.focus();
22454
- }
22455
- }, [componentRef, props.focusOnMount]);
22456
22455
  return (React.createElement(react.TooltipHost, Object.assign({}, props.tooltipProps),
22457
22456
  React.createElement(react.Stack, { key: props.itemKey, className: react.mergeStyles((_f = props.styles) === null || _f === void 0 ? void 0 : _f.root), verticalAlign: "center", horizontalAlign: "center", "data-ui-id": `video-effects-item`, "aria-label": (_g = props.ariaLabel) !== null && _g !== void 0 ? _g : props.itemKey, "aria-disabled": props.disabled },
22458
- React.createElement(react.DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: componentRef, autoFocus: props.focusOnMount },
22457
+ React.createElement(react.DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: props.componentRef },
22459
22458
  React.createElement(react.Stack, { horizontalAlign: 'center' },
22460
22459
  props.iconProps && (React.createElement(react.Stack.Item, { className: iconContainerStyles },
22461
22460
  React.createElement(react.Icon, Object.assign({}, props.iconProps)))),
@@ -22504,7 +22503,7 @@ const _VideoBackgroundEffectsPicker = (props) => {
22504
22503
  return (React.createElement(react.Stack, { className: react.mergeStyles((_a = props.styles) === null || _a === void 0 ? void 0 : _a.rowRoot), wrap: props.itemsPerRow === 'wrap', horizontal: true, key: rowIndex, tokens: { childrenGap: '0.5rem' }, "data-ui-id": "video-effects-picker-row" },
22505
22504
  options.map((option, i) => {
22506
22505
  if (i === 0 && rowIndex === 0) {
22507
- return (React.createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey, focusOnMount: !props.ignoreFocusOnMount })));
22506
+ return (React.createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey, componentRef: props.componentRef })));
22508
22507
  }
22509
22508
  return React.createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey }));
22510
22509
  }),
@@ -27622,7 +27621,7 @@ const AttachmentDownloadErrorBar = (props) => {
27622
27621
  /**
27623
27622
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
27624
27623
  */
27625
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DNlYAgO2.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
27624
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-bWS9ze-2.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
27626
27625
  /**
27627
27626
  * @private
27628
27627
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -27630,7 +27629,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
27630
27629
  *
27631
27630
  /* @conditional-compile-remove(rich-text-editor-composite-support)
27632
27631
  */
27633
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DNlYAgO2.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
27632
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-bWS9ze-2.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
27634
27633
  /**
27635
27634
  * @private
27636
27635
  */
@@ -32271,7 +32270,8 @@ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticip
32271
32270
  }
32272
32271
  },
32273
32272
  iconProps: {
32274
- iconName: 'UserRemove'
32273
+ iconName: 'ContextMenuRemoveParticipant',
32274
+ styles: { root: { lineHeight: 0 } }
32275
32275
  },
32276
32276
  'data-ui-id': 'participant-list-remove-participant-button'
32277
32277
  });
@@ -32592,9 +32592,9 @@ const VideoEffectsPaneContent = (props) => {
32592
32592
  };
32593
32593
  adapter.updateSelectedVideoBackgroundEffect(noneEffect);
32594
32594
  }
32595
- return VideoEffectsPaneTrampoline(onDismissError, activeVideoEffectError, selectableVideoEffects, onEffectChange);
32595
+ return VideoEffectsPaneTrampoline(onDismissError, props.updateFocusHandle, activeVideoEffectError, selectableVideoEffects, onEffectChange);
32596
32596
  };
32597
- const VideoEffectsPaneTrampoline = (onDismissError, activeVideoEffectError, selectableVideoEffects, onEffectChange) => {
32597
+ const VideoEffectsPaneTrampoline = (onDismissError, updateFocusHandle, activeVideoEffectError, selectableVideoEffects, onEffectChange) => {
32598
32598
  const selectedEffect = useSelector$1(activeVideoBackgroundEffectSelector);
32599
32599
  const isCameraOn = useSelector$1(localVideoSelector).isAvailable;
32600
32600
  const showWarning = !isCameraOn && selectedEffect !== 'none';
@@ -32602,7 +32602,7 @@ const VideoEffectsPaneTrampoline = (onDismissError, activeVideoEffectError, sele
32602
32602
  return (React.createElement(react.Stack, { tokens: { childrenGap: '0.75rem' }, className: react.mergeStyles({ paddingLeft: '0.5rem' }) },
32603
32603
  activeVideoEffectError && isCameraOn && (React.createElement(react.MessageBar, { messageBarType: react.MessageBarType.error, onDismiss: () => onDismissError(activeVideoEffectError) }, locale.strings.call.unableToStartVideoEffect)),
32604
32604
  showWarning && (React.createElement(react.MessageBar, { messageBarType: react.MessageBarType.warning }, locale.strings.call.cameraOffBackgroundEffectWarningText)),
32605
- React.createElement(_VideoBackgroundEffectsPicker, { label: locale.strings.call.videoEffectsPaneBackgroundSelectionTitle, styles: backgroundPickerStyles, options: selectableVideoEffects !== null && selectableVideoEffects !== void 0 ? selectableVideoEffects : [], onChange: onEffectChange, selectedEffectKey: selectedEffect })));
32605
+ React.createElement(_VideoBackgroundEffectsPicker, { label: locale.strings.call.videoEffectsPaneBackgroundSelectionTitle, styles: backgroundPickerStyles, options: selectableVideoEffects !== null && selectableVideoEffects !== void 0 ? selectableVideoEffects : [], onChange: onEffectChange, selectedEffectKey: selectedEffect, componentRef: updateFocusHandle })));
32606
32606
  };
32607
32607
  const backgroundPickerStyles = {
32608
32608
  label: {
@@ -32631,12 +32631,13 @@ const useVideoEffectsPane = (updateSidePaneRenderer, mobileView, latestErrors, o
32631
32631
  return (React.createElement(SidePaneHeader, { onClose: closePane, headingText: locale.strings.call.videoEffectsPaneTitle, dismissSidePaneButtonAriaLabel: (_b = (_a = locale.strings.call.dismissSidePaneButtonLabel) !== null && _a !== void 0 ? _a : locale.strings.callWithChat.dismissSidePaneButtonLabel) !== null && _b !== void 0 ? _b : 'Close', mobileView: mobileView }));
32632
32632
  }, [closePane, locale.strings, mobileView]);
32633
32633
  const latestVideoEffectError = latestErrors.find((error) => error.type === 'unableToStartVideoEffect');
32634
+ const updateFocusHandle = React.useMemo(() => React.createRef(), []);
32634
32635
  const onRenderContent = React.useCallback(() => {
32635
32636
  return (React.createElement(VideoEffectsPaneContent, { onDismissError: onDismissError, activeVideoEffectError: latestVideoEffectError, activeVideoEffectChange: () => {
32636
32637
  // Clear any existing video effects error when the user clicks on a new video effect
32637
32638
  latestVideoEffectError && (onDismissError === null || onDismissError === void 0 ? void 0 : onDismissError(latestVideoEffectError));
32638
- } }));
32639
- }, [latestVideoEffectError, onDismissError]);
32639
+ }, updateFocusHandle: updateFocusHandle }));
32640
+ }, [latestVideoEffectError, onDismissError, updateFocusHandle]);
32640
32641
  const sidePaneRenderer = React.useMemo(() => ({
32641
32642
  headerRenderer: onRenderHeader,
32642
32643
  contentRenderer: onRenderContent,
@@ -32644,7 +32645,9 @@ const useVideoEffectsPane = (updateSidePaneRenderer, mobileView, latestErrors, o
32644
32645
  }), [onRenderContent, onRenderHeader]);
32645
32646
  const openPane = React.useCallback(() => {
32646
32647
  updateSidePaneRenderer(sidePaneRenderer);
32647
- }, [sidePaneRenderer, updateSidePaneRenderer]);
32648
+ // Run in a setTimeout as it must be called only once the imperative handle is available
32649
+ setTimeout(() => { var _a; return (_a = updateFocusHandle.current) === null || _a === void 0 ? void 0 : _a.focus(); }, 0);
32650
+ }, [sidePaneRenderer, updateSidePaneRenderer, updateFocusHandle]);
32648
32651
  const isOpen = useIsParticularSidePaneOpen(VIDEO_EFFECTS_SIDE_PANE_ID);
32649
32652
  // Update pane renderer if it is open and the openPane dep changes
32650
32653
  React.useEffect(() => {
@@ -40310,4 +40313,4 @@ exports.useTeamsCall = useTeamsCall;
40310
40313
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
40311
40314
  exports.useTeamsCallAgent = useTeamsCallAgent;
40312
40315
  exports.useTheme = useTheme;
40313
- //# sourceMappingURL=index-BLj9R9ms.js.map
40316
+ //# sourceMappingURL=index-CwHFMnmg.js.map