@azure/communication-react 1.19.0-alpha-202407260014 → 1.19.0-alpha-202407300014

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 (43) hide show
  1. package/dist/communication-react.d.ts +3 -3
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CWwHwLsl.js → ChatMessageComponentAsRichTextEditBox-CjGUWd0g.js} +7 -5
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CWwHwLsl.js.map → ChatMessageComponentAsRichTextEditBox-CjGUWd0g.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-OHSjE5aJ.js → RichTextSendBoxWrapper-BRxGYpDK.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-OHSjE5aJ.js.map → RichTextSendBoxWrapper-BRxGYpDK.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-Dl3wPPJe.js → index-DPlK1Gtb.js} +37 -35
  7. package/dist/dist-cjs/communication-react/index-DPlK1Gtb.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/calling-stateful-client/src/CallClientState.js.map +1 -1
  12. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  14. package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -3
  15. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +5 -3
  17. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +1 -1
  19. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +3 -1
  21. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +3 -0
  23. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +3 -0
  25. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/VideoGallery.js +9 -6
  27. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +6 -1
  29. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -2
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +1 -6
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -4
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -2
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -7
  39. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -8
  40. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  41. package/dist/tsdoc-metadata.json +1 -1
  42. package/package.json +4 -4
  43. package/dist/dist-cjs/communication-react/index-Dl3wPPJe.js.map +0 -1
@@ -572,7 +572,7 @@ export declare type AzureCommunicationCallWithChatAdapterArgs = {
572
572
  userId: CommunicationUserIdentifier;
573
573
  displayName: string;
574
574
  credential: CommunicationTokenCredential;
575
- locator: CallAndChatLocator | TeamsMeetingLinkLocator | /** @conditional-compile-remove(meeting-id) */ TeamsMeetingIdLocator;
575
+ locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator;
576
576
  alternateCallerId?: string;
577
577
  callAdapterOptions?: AzureCommunicationCallAdapterOptions;
578
578
  };
@@ -1326,7 +1326,7 @@ export declare interface CallAdapterDeviceManagement {
1326
1326
  *
1327
1327
  * @public
1328
1328
  */
1329
- export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | RoomCallLocator | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator | /* @conditional-compile-remove(meeting-id) */ TeamsMeetingIdLocator;
1329
+ export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | RoomCallLocator | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator | TeamsMeetingIdLocator;
1330
1330
 
1331
1331
  /**
1332
1332
  * {@link CommonCallAdapter} state.
@@ -11723,7 +11723,7 @@ export declare interface TeamsCallAdapter extends CommonCallAdapter {
11723
11723
  * @public
11724
11724
  */
11725
11725
  export declare type TeamsCallAdapterArgs = TeamsCallAdapterArgsCommon & {
11726
- locator: TeamsMeetingLinkLocator | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator | /* @conditional-compile-remove(meeting-id) */ TeamsMeetingIdLocator;
11726
+ locator: TeamsMeetingLinkLocator | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator | TeamsMeetingIdLocator;
11727
11727
  };
11728
11728
 
11729
11729
  /**
@@ -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-Dl3wPPJe.js');
7
+ var index = require('./index-DPlK1Gtb.js');
8
8
  var React = require('react');
9
9
  require('react-dom/client');
10
10
  require('@azure/communication-chat');
@@ -236,9 +236,11 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
236
236
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
237
237
  onPaste: onPaste,
238
238
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
239
- onInsertInlineImage: (imageUrl, imageFileName) => {
240
- onInsertInlineImage && onInsertInlineImage(imageUrl, imageFileName, message.messageId);
241
- } })));
239
+ onInsertInlineImage: onInsertInlineImage
240
+ ? (imageUrl, imageFileName) => {
241
+ onInsertInlineImage(imageUrl, imageFileName, message.messageId);
242
+ }
243
+ : undefined })));
242
244
  };
243
245
  const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
244
246
  return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
@@ -252,4 +254,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
252
254
 
253
255
  exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
254
256
  exports.default = ChatMessageComponentAsRichTextEditBox;
255
- //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-CWwHwLsl.js.map
257
+ //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-CjGUWd0g.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-CWwHwLsl.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';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } 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';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n hasIncompleteAttachmentUploads,\n insertImagesToContentString,\n isAttachmentUploadCompleted,\n removeBrokenImageContentAndClearImageSizeStyles\n} 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/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages?: AttachmentMetadataInProgress[];\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload\n } = props;\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImages?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImages]);\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 onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImages)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (isAttachmentUploadCompleted(inlineImages)) {\n insertImagesToContentString(textValue, inlineImages, (content) => {\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n return;\n }\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 onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\n ]);\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 onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\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 onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray?: Array<string>\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n cancelInlineImageUpload({\n imageSrcArray,\n inlineImages,\n messageId: message.messageId,\n editBoxOnCancelInlineImageUpload: onCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload: undefined\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={(imageUrl: string, imageFileName: string) => {\n onInsertInlineImage && onInsertInlineImage(imageUrl, imageFileName, message.messageId);\n }}\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.multipleAttachmentsInEditing : 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":["useMemo","BROKEN_IMAGE_SVG_DATA","useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","isAttachmentUploadCompleted","insertImagesToContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","c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CAAC,QAAgB,EAAE,aAAqB,KAAI;oBAC/D,mBAAmB,IAAI,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;iBACxF,EAAA,CACD,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,4BAA4B,GAAG,SAAS,CACtF;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-CjGUWd0g.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';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } 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';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n hasIncompleteAttachmentUploads,\n insertImagesToContentString,\n isAttachmentUploadCompleted,\n removeBrokenImageContentAndClearImageSizeStyles\n} 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/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages?: AttachmentMetadataInProgress[];\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload\n } = props;\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImages?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImages]);\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 onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImages)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (isAttachmentUploadCompleted(inlineImages)) {\n insertImagesToContentString(textValue, inlineImages, (content) => {\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n return;\n }\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 onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\n ]);\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 onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\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 onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray?: Array<string>\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n cancelInlineImageUpload({\n imageSrcArray,\n inlineImages,\n messageId: message.messageId,\n editBoxOnCancelInlineImageUpload: onCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload: undefined\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\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 /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={\n onInsertInlineImage\n ? (imageUrl: string, imageFileName: string) => {\n onInsertInlineImage(imageUrl, imageFileName, message.messageId);\n }\n : undefined\n }\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.multipleAttachmentsInEditing : 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":["useMemo","BROKEN_IMAGE_SVG_DATA","useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","isAttachmentUploadCompleted","insertImagesToContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","cancelInlineImageUpload","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA2EA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;AACf,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO;;IAEP,OAAO;;IAEP,mBAAmB;;IAEnB,YAAY;;IAEZ,yBAAyB,EAC1B,GAAG,KAAK,CAAC;AAEV,IAAA,MAAM,cAAc,GAAGA,aAAO,CAAC,MAAK;;AAElC,QAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;AAEhC,QAAA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sB,GAAG,mBAAmB,CAAC,4BAA4B,GAAG,SAAS,CACtF;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-Dl3wPPJe.js');
4
+ var index = require('./index-DPlK1Gtb.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-OHSjE5aJ.js.map
53
+ //# sourceMappingURL=RichTextSendBoxWrapper-BRxGYpDK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextSendBoxWrapper-OHSjE5aJ.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-BRxGYpDK.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;;;;"}
@@ -189,7 +189,7 @@ function getDefaultExportFromCjs (x) {
189
189
  // Copyright (c) Microsoft Corporation.
190
190
  // Licensed under the MIT License.
191
191
  // GENERATED FILE. DO NOT EDIT MANUALLY.
192
- var telemetryVersion = '1.19.0-alpha-202407260014';
192
+ var telemetryVersion = '1.19.0-alpha-202407300014';
193
193
 
194
194
 
195
195
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -5641,7 +5641,9 @@ const addUploadedImagesToMessage = (message, inlineImages) => __awaiter$O(void 0
5641
5641
  var _a;
5642
5642
  // imageElement is a copy of original img element, so changes need to be made to the original img element
5643
5643
  img.id = (_a = uploadInlineImage === null || uploadInlineImage === void 0 ? void 0 : uploadInlineImage.id) !== null && _a !== void 0 ? _a : '';
5644
- img.src = '';
5644
+ if (uploadInlineImage === null || uploadInlineImage === void 0 ? void 0 : uploadInlineImage.url) {
5645
+ img.src = uploadInlineImage.url;
5646
+ }
5645
5647
  img.width = imageElement.width;
5646
5648
  img.height = imageElement.height;
5647
5649
  img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;
@@ -5757,7 +5759,10 @@ const removeBrokenImageContentAndClearImageSizeStyles = (content) => {
5757
5759
  img.removeAttribute('data-ui-id');
5758
5760
  }
5759
5761
  // Clear maxWidth and maxHeight styles that are set by roosterJS.
5762
+ // Clear width and height styles as the width and height is set in attributes
5760
5763
  // This is so that they can be set in messageThread styles without using the important flag.
5764
+ img.style.width = '';
5765
+ img.style.height = '';
5761
5766
  img.style.maxWidth = '';
5762
5767
  img.style.maxHeight = '';
5763
5768
  });
@@ -7343,6 +7348,9 @@ const RichTextToolbar = (props) => {
7343
7348
  React.useEffect(() => {
7344
7349
  // update the format state on editor events
7345
7350
  plugin.onFormatChanged = setFormatState;
7351
+ // plugin editor ready event may happen before onFormatChanged is set
7352
+ // call update format function to ensure the format state is set
7353
+ plugin.updateFormat();
7346
7354
  }, [plugin]);
7347
7355
  const boldButton = React.useMemo(() => {
7348
7356
  return getCommandBarItem({
@@ -7976,7 +7984,9 @@ const createEditorInitialModel = (initialContent, contentModel) => {
7976
7984
  }
7977
7985
  };
7978
7986
  const setSelectionAfterLastSegment = (model, block) => {
7979
- const marker = roosterjsContentModelDom.createSelectionMarker();
7987
+ //selection marker should have the same format as the last segment if any
7988
+ const format = block.segments.length > 0 ? block.segments[block.segments.length - 1].format : undefined;
7989
+ const marker = roosterjsContentModelDom.createSelectionMarker(format);
7980
7990
  block.segments.push(marker);
7981
7991
  roosterjsContentModelDom.setSelection(model, marker);
7982
7992
  };
@@ -10446,7 +10456,7 @@ class _ErrorBoundary extends React.Component {
10446
10456
  // Copyright (c) Microsoft Corporation.
10447
10457
  // Licensed under the MIT License.
10448
10458
  /* @conditional-compile-remove(rich-text-editor) */
10449
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-CWwHwLsl.js'); }));
10459
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-CjGUWd0g.js'); }));
10450
10460
  /**
10451
10461
  * @private
10452
10462
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -10454,7 +10464,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
10454
10464
  *
10455
10465
  * @conditional-compile-remove(rich-text-editor)
10456
10466
  */
10457
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-CWwHwLsl.js'); });
10467
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-CjGUWd0g.js'); });
10458
10468
  /**
10459
10469
  * @private
10460
10470
  */
@@ -16483,7 +16493,7 @@ const MAX_PINNED_REMOTE_VIDEO_TILES$1 = 4;
16483
16493
  * @public
16484
16494
  */
16485
16495
  const VideoGallery = (props) => {
16486
- var _a, _b, _c, _d;
16496
+ var _a, _b, _c;
16487
16497
  const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteScreenShareStreamView, onDisposeRemoteVideoStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, onPinParticipant: onPinParticipantHandler, onUnpinParticipant: onUnpinParticipantHandler, remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS, overflowGalleryPosition = 'horizontalBottom', localVideoTileSize = 'followDeviceOrientation', spotlightedParticipants, onStartLocalSpotlight, onStartRemoteSpotlight, onStopLocalSpotlight, onStopRemoteSpotlight, maxParticipantsToSpotlight, reactionResources, videoTilesOptions,
16488
16498
  /* @conditional-compile-remove(soft-mute) */
16489
16499
  onMuteParticipant } = props;
@@ -16519,7 +16529,10 @@ const VideoGallery = (props) => {
16519
16529
  });
16520
16530
  }, [props.pinnedParticipants, props.remoteParticipants]);
16521
16531
  // Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants
16522
- const pinnedParticipants = (_a = props.pinnedParticipants) !== null && _a !== void 0 ? _a : pinnedParticipantsState;
16532
+ const pinnedParticipants = React.useMemo(() => {
16533
+ var _a;
16534
+ return (_a = props.pinnedParticipants) !== null && _a !== void 0 ? _a : pinnedParticipantsState.filter((pinnedParticipantId) => remoteParticipants.find((remoteParticipant) => remoteParticipant.userId === pinnedParticipantId));
16535
+ }, [props.pinnedParticipants, pinnedParticipantsState, remoteParticipants]);
16523
16536
  const showLocalVideoTileLabel = !((localTileNotInGrid && isNarrow) || localVideoTileSize === '9:16') || layout === 'default';
16524
16537
  /**
16525
16538
  * Utility function for memoized rendering of LocalParticipant.
@@ -16573,11 +16586,11 @@ const VideoGallery = (props) => {
16573
16586
  if (pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES$1) {
16574
16587
  return;
16575
16588
  }
16576
- if (!pinnedParticipantsState.includes(userId)) {
16577
- setPinnedParticipantsState(pinnedParticipantsState.concat(userId));
16589
+ if (!pinnedParticipants.includes(userId)) {
16590
+ setPinnedParticipantsState(pinnedParticipants.concat(userId));
16578
16591
  }
16579
16592
  onPinParticipantHandler === null || onPinParticipantHandler === void 0 ? void 0 : onPinParticipantHandler(userId);
16580
- }, [pinnedParticipants.length, pinnedParticipantsState, setPinnedParticipantsState, onPinParticipantHandler]);
16593
+ }, [pinnedParticipants, setPinnedParticipantsState, onPinParticipantHandler]);
16581
16594
  const onUnpinParticipant = React.useCallback((userId) => {
16582
16595
  setPinnedParticipantsState(pinnedParticipantsState.filter((p) => p !== userId));
16583
16596
  onUnpinParticipantHandler === null || onUnpinParticipantHandler === void 0 ? void 0 : onUnpinParticipantHandler(userId);
@@ -16651,7 +16664,7 @@ const VideoGallery = (props) => {
16651
16664
  ]);
16652
16665
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
16653
16666
  const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
16654
- const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId], localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources, isPPTLive: !((_d = screenShareParticipant.screenShareStream) === null || _d === void 0 ? void 0 : _d.id) })));
16667
+ const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_a = screenShareParticipant.screenShareStream) === null || _a === void 0 ? void 0 : _a.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId], localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources, isPPTLive: !((_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.id) })));
16655
16668
  const screenShareComponent = remoteScreenShareComponent
16656
16669
  ? remoteScreenShareComponent
16657
16670
  : localParticipant.isScreenSharingOn
@@ -18670,6 +18683,9 @@ const freeFormTextFieldClassName = react.mergeStyles({
18670
18683
 
18671
18684
  // Copyright (c) Microsoft Corporation.
18672
18685
  // Licensed under the MIT License.
18686
+ // Permit `any` in this file to handle the overloaded issue type. Todo: refactor CallSurvey to have PartialDeep<_CallSurvey> instead of any
18687
+ // for tracking incomplete survey responses.
18688
+ /* eslint-disable @typescript-eslint/no-explicit-any */
18673
18689
  /**
18674
18690
  * A component to allow users to send numerical ratings regarding call quality
18675
18691
  *
@@ -22689,7 +22705,7 @@ const AttachmentDownloadErrorBar = (props) => {
22689
22705
  /**
22690
22706
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
22691
22707
  */
22692
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-OHSjE5aJ.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
22708
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BRxGYpDK.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
22693
22709
  /**
22694
22710
  * @private
22695
22711
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -22697,7 +22713,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
22697
22713
  *
22698
22714
  /* @conditional-compile-remove(rich-text-editor-composite-support)
22699
22715
  */
22700
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-OHSjE5aJ.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
22716
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BRxGYpDK.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
22701
22717
  /**
22702
22718
  * @private
22703
22719
  */
@@ -25152,7 +25168,6 @@ function convertSdkCallToDeclarativeCall(call) {
25152
25168
  },
25153
25169
  /* @conditional-compile-remove(hide-attendee-name) */
25154
25170
  hideAttendeeNames,
25155
- /* @conditional-compile-remove(meeting-id) */
25156
25171
  info: callInfo,
25157
25172
  /* @conditional-compile-remove(teams-meeting-conference) */
25158
25173
  meetingConference: { conferencePhones: [] }
@@ -25465,7 +25480,6 @@ let CallContext$2 = class CallContext {
25465
25480
  // We don't update the startTime and endTime if we are updating an existing active call
25466
25481
  existingCall.captionsFeature.currentSpokenLanguage = call.captionsFeature.currentSpokenLanguage;
25467
25482
  existingCall.captionsFeature.currentCaptionLanguage = call.captionsFeature.currentCaptionLanguage;
25468
- /* @conditional-compile-remove(meeting-id) */
25469
25483
  existingCall.info = call.info;
25470
25484
  /* @conditional-compile-remove(teams-meeting-conference) */
25471
25485
  existingCall.meetingConference = call.meetingConference;
@@ -30063,7 +30077,6 @@ const ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;
30063
30077
  const REMOTE_PSTN_USER_HUNG_UP = 560000;
30064
30078
  const REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];
30065
30079
  const CALL_REJECTED_CODE$1 = 603;
30066
- /* @conditional-compile-remove(meeting-id) */
30067
30080
  const INVALID_MEETING_IDENTIFIER = 5751;
30068
30081
  /** @private */
30069
30082
  const ROOM_NOT_FOUND_SUB_CODE = 5732;
@@ -30257,7 +30270,6 @@ const getEndedCallPageProps = (locale, endedCall) => {
30257
30270
  }
30258
30271
  break;
30259
30272
  }
30260
- /* @conditional-compile-remove(meeting-id) */
30261
30273
  switch ((_f = endedCall === null || endedCall === void 0 ? void 0 : endedCall.callEndReason) === null || _f === void 0 ? void 0 : _f.subCode) {
30262
30274
  case INVALID_MEETING_IDENTIFIER:
30263
30275
  if (locale.strings.call.callRejectedTitle) {
@@ -36339,7 +36351,7 @@ const DtmfDialpadPage = (props) => {
36339
36351
  */
36340
36352
  const CallPage = (props) => {
36341
36353
  var _a, _b;
36342
- const { callInvitationURL, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, mobileView, galleryLayout = 'floatingLocalVideo', onUserSetGalleryLayoutChange, userSetOverflowGalleryPosition = 'Responsive', onSetUserSetOverflowGalleryPosition, onCloseChatPane, pinnedParticipants, setPinnedParticipants, compositeAudioContext, disableAutoShowDtmfDialer = false,
36354
+ const { callInvitationURL, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, mobileView, galleryLayout = 'floatingLocalVideo', onUserSetGalleryLayoutChange, userSetOverflowGalleryPosition = 'Responsive', onSetUserSetOverflowGalleryPosition, onCloseChatPane, pinnedParticipants = [], setPinnedParticipants, compositeAudioContext, disableAutoShowDtmfDialer = false,
36343
36355
  /* @conditional-compile-remove(notifications) */
36344
36356
  latestNotifications,
36345
36357
  /* @conditional-compile-remove(notifications) */
@@ -36358,6 +36370,7 @@ const CallPage = (props) => {
36358
36370
  const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected);
36359
36371
  const [dtmfDialerPresent, setDtmfDialerPresent] = React.useState(renderDtmfDialerFromStart && disableAutoShowDtmfDialer);
36360
36372
  const strings = useLocale().strings.call;
36373
+ const pinnedParticipantsChecked = React.useMemo(() => pinnedParticipants.filter((pinnedParticipant) => remoteParticipantsConnected.find((remoteParticipant) => toFlatCommunicationIdentifier(remoteParticipant.identifier) === pinnedParticipant)), [pinnedParticipants, remoteParticipantsConnected]);
36361
36374
  // Reduce the controls shown when mobile view is enabled.
36362
36375
  const callControlOptions = mobileView ? reduceCallControlsForMobile(options === null || options === void 0 ? void 0 : options.callControls) : options === null || options === void 0 ? void 0 : options.callControls;
36363
36376
  const drawerMenuHostId = reactHooks.useId('drawerMenuHost');
@@ -36369,7 +36382,7 @@ const CallPage = (props) => {
36369
36382
  return (React.createElement(DtmfDialpadPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, compositeAudioContext: compositeAudioContext }));
36370
36383
  }
36371
36384
  else {
36372
- return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_a = options === null || options === void 0 ? void 0 : options.spotlight) === null || _a === void 0 ? void 0 : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === void 0 ? void 0 : options.videoTilesOptions })));
36385
+ return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_a = options === null || options === void 0 ? void 0 : options.spotlight) === null || _a === void 0 ? void 0 : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === void 0 ? void 0 : options.videoTilesOptions })));
36373
36386
  }
36374
36387
  };
36375
36388
  return (React.createElement(React.Fragment, null,
@@ -36385,7 +36398,7 @@ const CallPage = (props) => {
36385
36398
  /* @conditional-compile-remove(notifications) */
36386
36399
  latestNotifications: latestNotifications, onDismissError: props.onDismissError,
36387
36400
  /* @conditional-compile-remove(notifications) */
36388
- onDismissNotification: onDismissNotification, onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition, onUserSetGalleryLayoutChange: onUserSetGalleryLayoutChange, userSetGalleryLayout: galleryLayout, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_b = options === null || options === void 0 ? void 0 : options.spotlight) === null || _b === void 0 ? void 0 : _b.hideSpotlightButtons, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants }),
36401
+ onDismissNotification: onDismissNotification, onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition, onUserSetGalleryLayoutChange: onUserSetGalleryLayoutChange, userSetGalleryLayout: galleryLayout, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_b = options === null || options === void 0 ? void 0 : options.spotlight) === null || _b === void 0 ? void 0 : _b.hideSpotlightButtons, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants }),
36389
36402
  React.createElement(Prompt, Object.assign({ isOpen: isPromptOpen, onDismiss: () => setIsPromptOpen(false) }, promptProps))));
36390
36403
  };
36391
36404
  /**
@@ -39339,9 +39352,7 @@ class AzureCommunicationCallAdapter {
39339
39352
  ? locatorOrTargetCalless
39340
39353
  : undefined;
39341
39354
  this.deviceManager = deviceManager;
39342
- const isTeamsMeeting = this.locator
39343
- ? 'meetingLink' in this.locator || /* @conditional-compile-remove(meeting-id) */ 'meetingId' in this.locator
39344
- : false;
39355
+ const isTeamsMeeting = this.locator ? 'meetingLink' in this.locator || 'meetingId' in this.locator : false;
39345
39356
  let isTeamsCall;
39346
39357
  (_a = this.targetCallees) === null || _a === void 0 ? void 0 : _a.forEach((callee) => {
39347
39358
  if (communicationCommon.isMicrosoftTeamsUserIdentifier(callee) || communicationCommon.isMicrosoftTeamsAppIdentifier(callee)) {
@@ -39577,7 +39588,6 @@ class AzureCommunicationCallAdapter {
39577
39588
  }
39578
39589
  _joinCall(audioOptions, videoOptions) {
39579
39590
  const isTeamsMeeting = this.locator ? 'meetingLink' in this.locator : false;
39580
- /* @conditional-compile-remove(meeting-id) */
39581
39591
  const isTeamsMeetingId = this.locator ? 'meetingId' in this.locator : false;
39582
39592
  const isRoomsCall = this.locator ? 'roomId' in this.locator : false;
39583
39593
  /* @conditional-compile-remove(teams-identity-support) */
@@ -39588,7 +39598,6 @@ class AzureCommunicationCallAdapter {
39588
39598
  videoOptions
39589
39599
  });
39590
39600
  }
39591
- /* @conditional-compile-remove(meeting-id) */
39592
39601
  if (isTeamsMeetingId) {
39593
39602
  return this.callAgent.join(this.locator, {
39594
39603
  audioOptions,
@@ -39603,7 +39612,6 @@ class AzureCommunicationCallAdapter {
39603
39612
  videoOptions
39604
39613
  });
39605
39614
  }
39606
- /* @conditional-compile-remove(meeting-id) */
39607
39615
  if (isTeamsMeetingId) {
39608
39616
  return this.callAgent.join(this.locator, {
39609
39617
  audioOptions,
@@ -42127,22 +42135,18 @@ class CallAndChatProvider {
42127
42135
  * @private
42128
42136
  */
42129
42137
  class TeamsMeetingLinkProvider {
42130
- constructor(locator,
42131
- /** @conditional-compile-remove(meeting-id) */ callAdapterPromise) {
42138
+ constructor(locator, callAdapterPromise) {
42132
42139
  this.locator = locator;
42133
- /** @conditional-compile-remove(meeting-id) */
42134
42140
  this.callAdapterPromise = callAdapterPromise;
42135
42141
  }
42136
42142
  isCallInfoRequired() {
42137
42143
  return true;
42138
42144
  }
42139
42145
  getChatThread() {
42140
- /** @conditional-compile-remove(meeting-id) */
42141
42146
  throw new Error('Chat thread ID should be retrieved from call.callInfo using method getChatThreadPromise');
42142
42147
  }
42143
42148
  getChatThreadPromise() {
42144
42149
  return __awaiter$4(this, void 0, void 0, function* () {
42145
- /** @conditional-compile-remove(meeting-id) */
42146
42150
  {
42147
42151
  // Wait for the call to be connected and get the chat thread ID from `call.callInfo`.
42148
42152
  const chatThreadPromise = new Promise((resolve) => {
@@ -42165,7 +42169,6 @@ class TeamsMeetingLinkProvider {
42165
42169
  });
42166
42170
  }
42167
42171
  }
42168
- /** @conditional-compile-remove(meeting-id) */
42169
42172
  /**
42170
42173
  * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Teams meeting using meeting id.
42171
42174
  *
@@ -42378,9 +42381,8 @@ const isTeamsMeetingLocator = (locator) => {
42378
42381
  };
42379
42382
  const _createChatThreadAdapterInner = (locator, adapter) => {
42380
42383
  if ('meetingLink' in locator) {
42381
- return new TeamsMeetingLinkProvider(locator, /** @conditional-compile-remove(meeting-id) */ adapter);
42384
+ return new TeamsMeetingLinkProvider(locator, adapter);
42382
42385
  }
42383
- /** @conditional-compile-remove(meeting-id) */
42384
42386
  if ('meetingId' in locator) {
42385
42387
  return new TeamsMeetingIdProvider(locator, adapter);
42386
42388
  }
@@ -43070,4 +43072,4 @@ exports.useTeamsCall = useTeamsCall;
43070
43072
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
43071
43073
  exports.useTeamsCallAgent = useTeamsCallAgent;
43072
43074
  exports.useTheme = useTheme;
43073
- //# sourceMappingURL=index-Dl3wPPJe.js.map
43075
+ //# sourceMappingURL=index-DPlK1Gtb.js.map