@azure/communication-react 1.12.1-alpha-202401260012 → 1.12.1-alpha-202401280013

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 (111) hide show
  1. package/dist/communication-react.d.ts +75 -8
  2. package/dist/dist-cjs/communication-react/index.js +823 -780
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +33 -10
  7. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  8. package/dist/dist-esm/chat-stateful-client/src/ChatContext.d.ts +4 -1
  9. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +26 -1
  10. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
  11. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.d.ts +32 -0
  12. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +127 -0
  13. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -0
  14. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +2 -1
  15. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
  16. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
  17. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  18. package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
  19. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +0 -9
  21. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +0 -4
  22. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +0 -9
  24. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +0 -4
  25. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +0 -3
  27. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -3
  29. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +0 -27
  30. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +0 -13
  32. package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +8 -2
  34. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +12 -5
  35. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  36. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +2 -0
  37. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +6 -2
  38. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +0 -7
  40. package/dist/dist-esm/react-components/src/components/MessageThread.js +0 -28
  41. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +5 -0
  43. package/dist/dist-esm/react-components/src/components/ReactionButton.js +23 -15
  44. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +2 -0
  46. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +5 -2
  47. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +5 -0
  49. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +20 -0
  50. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  51. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +5 -0
  52. package/dist/dist-esm/react-components/src/components/VideoGallery.js +14 -5
  53. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -0
  55. package/dist/dist-esm/react-components/src/components/VideoTile.js +28 -9
  56. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  57. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -1
  58. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  59. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.d.ts +1 -1
  60. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +2 -1
  61. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +1 -1
  63. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +19 -16
  64. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +4 -1
  66. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  67. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.d.ts +0 -5
  68. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +0 -12
  69. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +1 -1
  70. package/dist/dist-esm/react-components/src/index.d.ts +1 -1
  71. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +45 -0
  73. package/dist/dist-esm/react-components/src/types/ReactionTypes.js +4 -0
  74. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -0
  75. package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
  76. package/dist/dist-esm/react-components/src/types/index.js +1 -0
  77. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -1
  79. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  80. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +6 -0
  81. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -34
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  84. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +3 -36
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +8 -2
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.d.ts +2 -0
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js +1 -1
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +10 -4
  92. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +4 -0
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +4 -0
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  96. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -0
  97. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  98. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +1 -13
  99. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  100. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -1
  102. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  103. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -1
  104. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  105. package/package.json +1 -1
  106. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +0 -17
  107. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +0 -42
  108. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +0 -1
  109. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +0 -11
  110. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +0 -40
  111. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/ChatScreen.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,gDAAgD;AAChD,OAAO,EAAE,KAAK,EAAE,MA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,IAAI,CAC7E,CACG;oBACN,oBAAC,KAAK,IAAC,UAAU,EAAE,UAAU,KAAK,QAAQ;wBACvC,UAAU,KAAK,QAAQ,IAAI,CAC1B,oBAAC,KAAK,IAAC,aAAa,EAAC,QAAQ;4BAC3B,oBAAC,gBAAgB,OAAG,CACd,CACT;wBACD,oBAAC,KAAK,IAAC,IAAI;4BACT,oBAAC,OAAO,oBACF,YAAY,IAChB,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAC7B,MAAM,EAAE,aAAa;gCACrB,+CAA+C;gCAC/C,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC,KAAK;gCACzD,+CAA+C;gCAC/C,kBAAkB,EAAE,OAAO,CAAC,gBAAgB,IAC5C,CACI;wBACP,UAAU,KAAK,QAAQ,IAAI,oBAAC,gBAAgB,OAAG,CAC1C,CACF,CACF;YAEN,kEAAkE;YAClE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,MAAK,IAAI,IAAI,CACnC,oBAAC,oBAAoB,IACnB,wBAAwB,EAAE,wBAAwB,EAClD,2BAA2B,EAAE,KAAK,CAAC,2BAA2B,EAC9D,QAAQ,EAAE,UAAU,KAAK,QAAQ,GACjC,CACH,CAEG;QAEN,gDAAgD;QAChD,oBAAC,YAAY,IACX,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,GAAG,EAAE;gBACd,gBAAgB,CAAC,EAAE,CAAC,CAAC;gBACrB,qBAAqB,CAAC,KAAK,CAAC,CAAC;YAC/B,CAAC,EACD,4BAA4B,EAAE,4BAA4B,GAC1D,CAEE,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(image-gallery) */\nimport { isIOS } from '@fluentui/react';\nimport { mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(image-gallery) */\nimport { PersonaSize } from '@fluentui/react';\nimport {\n CommunicationParticipant,\n ErrorBar,\n MessageProps,\n MessageRenderer,\n MessageThread,\n MessageThreadStyles,\n ParticipantMenuItemsCallback,\n SendBox,\n SendBoxStylesProps,\n TypingIndicator,\n TypingIndicatorStylesProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(image-gallery) */ /* @conditional-compile-remove(file-sharing) */\nimport { ChatMessage } from '@internal/react-components';\n\nimport React, { useCallback, useEffect, useMemo } from 'react';\n/* @conditional-compile-remove(image-gallery) */\nimport { useState } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\nimport { FileDownloadHandler } from '@internal/react-components';\nimport { FileUploadButtonWrapper as FileUploadButton, FileUploadHandler } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\n\nimport {\n chatArea,\n chatContainer,\n chatWrapper,\n messageThreadChatCompositeStyles,\n sendboxContainerStyles,\n typingIndicatorContainerStyles\n} from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\n/* @conditional-compile-remove(chat-composite-participant-pane) */\nimport { ChatScreenPeoplePane } from './ChatScreenPeoplePane';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing) */\nimport { fileUploadsSelector } from './selectors/fileUploadsSelector';\n/* @conditional-compile-remove(file-sharing) */\nimport { useSelector } from './hooks/useSelector';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileDownloadErrorBar } from './FileDownloadErrorBar';\n/* @conditional-compile-remove(file-sharing) */\nimport { _FileDownloadCards } from '@internal/react-components';\n/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\nimport { AttachmentDownloadResult, AttachmentMetadata } from '@internal/react-components';\n/* @conditional-compile-remove(image-gallery) */\nimport { ImageGallery, ImageGalleryImageProps } from '@internal/react-components';\n\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n hasFocusOnMount?: 'sendBoxTextField';\n fileSharing?: FileSharingOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * Properties for configuring the File Sharing feature.\n * @beta\n */\nexport interface FileSharingOptions {\n /**\n * A string containing the comma separated list of accepted file types.\n * Similar to the `accept` attribute of the `<input type=\"file\" />` element.\n * Accepts any type of file if not specified.\n * @beta\n */\n accept?: string;\n /**\n * Allows multiple files to be selected if set to `true`.\n * Similar to the `multiple` attribute of the `<input type=\"file\" />` element.\n * @defaultValue false\n * @beta\n */\n multiple?: boolean;\n /**\n * A function of type {@link FileUploadHandler} for handling file uploads.\n * @beta\n */\n uploadHandler: FileUploadHandler;\n /**\n * A function of type {@link FileDownloadHandler} for handling file downloads.\n * If the function is not specified, the file's `url` will be opened in a new tab to\n * initiate the download.\n */\n downloadHandler?: FileDownloadHandler;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n fileSharing,\n formFactor\n } = props;\n\n const defaultNumberOfChatMessagesToReload = 5;\n /* @conditional-compile-remove(file-sharing) */\n const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');\n /* @conditional-compile-remove(image-gallery) */\n const [fullSizeAttachments, setFullSizeAttachments] = useState<Record<string, string>>({});\n /* @conditional-compile-remove(image-gallery) */\n const [galleryImages, setGalleryImages] = useState<Array<ImageGalleryImageProps>>([]);\n /* @conditional-compile-remove(image-gallery) */\n const [isImageGalleryOpen, setIsImageGalleryOpen] = useState<boolean>(false);\n\n const adapter = useAdapter();\n const theme = useTheme();\n\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n\n const messageThreadProps = usePropsFor(MessageThread);\n const sendBoxProps = usePropsFor(SendBox);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n\n const onRenderAvatarCallback = useCallback(\n (userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return (\n <AvatarPersona\n userId={userId}\n hidePersonaDetails={true}\n {...defaultOptions}\n dataProvider={onFetchAvatarPersonaData}\n />\n );\n },\n [onFetchAvatarPersonaData]\n );\n\n const messageThreadStyles = useMemo(() => {\n return Object.assign(\n {},\n messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground),\n styles?.messageThread\n );\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n const userId = toFlatCommunicationIdentifier(adapter.getState().userId);\n\n const fileUploadButtonOnChange = useCallback(\n (files: FileList | null): void => {\n if (!files) {\n return;\n }\n\n /* @conditional-compile-remove(file-sharing) */\n const fileUploads = adapter.registerActiveFileUploads(Array.from(files));\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?.uploadHandler(userId, fileUploads);\n },\n [adapter, fileSharing, userId]\n );\n\n /* @conditional-compile-remove(file-sharing) */\n const onRenderFileDownloads = useCallback(\n (userId: string, message: ChatMessage) => (\n <_FileDownloadCards\n userId={userId}\n fileMetadata={message.files || []}\n downloadHandler={fileSharing?.downloadHandler}\n onDownloadErrorMessage={(errorMessage: string) => {\n setDownloadErrorMessage(errorMessage);\n }}\n />\n ),\n [fileSharing?.downloadHandler]\n );\n\n /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n const onRenderInlineAttachment = useCallback(\n async (attachment: AttachmentMetadata[]): Promise<AttachmentDownloadResult[]> => {\n const entry: Record<string, string> = {};\n attachment.forEach((target) => {\n if (target.attachmentType === 'inlineImage' && target.previewUrl) {\n entry[target.id] = target.previewUrl;\n }\n });\n\n const blob = await adapter.downloadAttachments({ attachmentUrls: entry });\n return blob;\n },\n [adapter]\n );\n\n /* @conditional-compile-remove(image-gallery) */\n const onInlineImageClicked = useCallback(\n async (attachmentId: string, messageId: string): Promise<void> => {\n const messages = messageThreadProps.messages?.filter((message) => {\n return message.messageId === messageId;\n });\n if (!messages || messages.length <= 0) {\n return;\n }\n const chatMessage = messages[0] as ChatMessage;\n\n const inlinedImages = chatMessage.inlineImages?.filter((attachment) => {\n return attachment.id === attachmentId;\n });\n\n if (!inlinedImages || inlinedImages.length <= 0) {\n return;\n }\n\n const attachment = inlinedImages[0];\n\n const titleIconRenderOptions = {\n text: chatMessage.senderDisplayName,\n size: PersonaSize.size32,\n showOverflowTooltip: false,\n imageAlt: chatMessage.senderDisplayName\n };\n const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(chatMessage.senderId, titleIconRenderOptions);\n const galleryImage: ImageGalleryImageProps = {\n title: chatMessage.senderDisplayName || '',\n titleIcon: titleIcon,\n downloadFilename: attachment.id,\n imageUrl: ''\n };\n setIsImageGalleryOpen(true);\n\n if (attachment.id in fullSizeAttachments) {\n setGalleryImages([\n {\n ...galleryImage,\n imageUrl: fullSizeAttachments[attachment.id]\n }\n ]);\n return;\n }\n\n if (attachment.attachmentType === 'inlineImage' && attachment.url) {\n const blob = await adapter.downloadAttachments({ attachmentUrls: { [attachment.id]: attachment.url } });\n if (blob[0]) {\n const blobUrl = blob[0].blobUrl;\n setFullSizeAttachments((prev) => ({ ...prev, [attachment.id]: blobUrl }));\n setGalleryImages([\n {\n ...galleryImage,\n imageUrl: blobUrl\n }\n ]);\n }\n }\n },\n [adapter, fullSizeAttachments, messageThreadProps.messages, onRenderAvatarCallback]\n );\n\n /* @conditional-compile-remove(image-gallery) */\n const onImageDownloadButtonClicked = useCallback((imageUrl: string, downloadFilename: string): void => {\n if (imageUrl === '') {\n return;\n }\n if (isIOS()) {\n window.open(imageUrl, '_blank');\n } else {\n // Create a new anchor element\n const a = document.createElement('a');\n // Set the href and download attributes for the anchor element\n a.href = imageUrl;\n a.download = downloadFilename;\n a.rel = 'noopener noreferrer';\n a.target = '_blank';\n\n // Programmatically click the anchor element to trigger the download\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n }, []);\n\n const AttachFileButton = useCallback(() => {\n if (!fileSharing?.uploadHandler) {\n return null;\n }\n return (\n <FileUploadButton\n accept={fileSharing?.accept}\n multiple={fileSharing?.multiple}\n onChange={fileUploadButtonOnChange}\n />\n );\n }, [fileSharing?.accept, fileSharing?.multiple, fileSharing?.uploadHandler, fileUploadButtonOnChange]);\n return (\n <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {\n /* @conditional-compile-remove(file-sharing) */\n <FileDownloadErrorBar\n onDismissDownloadErrorMessage={useCallback(() => {\n setDownloadErrorMessage('');\n }, [])}\n fileDownloadErrorMessage={downloadErrorMessage || ''}\n />\n }\n <MessageThread\n {...messageThreadProps}\n onRenderAvatar={onRenderAvatarCallback}\n onRenderMessage={onRenderMessage}\n /* @conditional-compile-remove(file-sharing) */\n onRenderFileDownloads={onRenderFileDownloads}\n /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n onFetchAttachments={onRenderInlineAttachment}\n /* @conditional-compile-remove(image-gallery) */\n onInlineImageClicked={onInlineImageClicked}\n numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload}\n styles={messageThreadStyles}\n />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? (\n onRenderTypingIndicator(typingIndicatorProps.typingUsers)\n ) : (\n <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />\n )}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && (\n <Stack verticalAlign=\"center\">\n <AttachFileButton />\n </Stack>\n )}\n <Stack grow>\n <SendBox\n {...sendBoxProps}\n autoFocus={options?.autoFocus}\n styles={sendBoxStyles}\n /* @conditional-compile-remove(file-sharing) */\n activeFileUploads={useSelector(fileUploadsSelector).files}\n /* @conditional-compile-remove(file-sharing) */\n onCancelFileUpload={adapter.cancelFileUpload}\n />\n </Stack>\n {formFactor !== 'mobile' && <AttachFileButton />}\n </Stack>\n </Stack>\n </Stack>\n {\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n options?.participantPane === true && (\n <ChatScreenPeoplePane\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n isMobile={formFactor === 'mobile'}\n />\n )\n }\n </Stack>\n {\n /* @conditional-compile-remove(image-gallery) */\n <ImageGallery\n isOpen={isImageGalleryOpen}\n images={galleryImages}\n onDismiss={() => {\n setGalleryImages([]);\n setIsImageGalleryOpen(false);\n }}\n onImageDownloadButtonClicked={onImageDownloadButtonClicked}\n />\n }\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/ChatScreen.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,gDAAgD;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,gDAAgD;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAEL,QAAQ,EAGR,aAAa,EAGb,OAAO,EAEP,eAAe,EAEf,QAAQ,EACT,yCAAmC;AAIpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,gDAAgD;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAiD,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,uBAAuB,IAAI,gBAAgB,EAAqB,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,gCAAgC,EAChC,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,kEAAkE;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,sCAAgC;AACxE,+CAA+C;AAC/C,OAAO,EAAE,mBA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EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC,KAAK;gCACzD,+CAA+C;gCAC/C,kBAAkB,EAAE,OAAO,CAAC,gBAAgB,IAC5C,CACI;wBACP,UAAU,KAAK,QAAQ,IAAI,oBAAC,gBAAgB,OAAG,CAC1C,CACF,CACF;YAEN,kEAAkE;YAClE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,MAAK,IAAI,IAAI,CACnC,oBAAC,oBAAoB,IACnB,wBAAwB,EAAE,wBAAwB,EAClD,2BAA2B,EAAE,KAAK,CAAC,2BAA2B,EAC9D,QAAQ,EAAE,UAAU,KAAK,QAAQ,GACjC,CACH,CAEG;QAEN,gDAAgD;QAChD,oBAAC,YAAY,IACX,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,GAAG,EAAE;gBACd,gBAAgB,CAAC,EAAE,CAAC,CAAC;gBACrB,qBAAqB,CAAC,KAAK,CAAC,CAAC;YAC/B,CAAC,EACD,4BAA4B,EAAE,4BAA4B,GAC1D,CAEE,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(image-gallery) */\nimport { isIOS } from '@fluentui/react';\nimport { mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(image-gallery) */\nimport { PersonaSize } from '@fluentui/react';\nimport {\n CommunicationParticipant,\n ErrorBar,\n MessageProps,\n MessageRenderer,\n MessageThread,\n MessageThreadStyles,\n ParticipantMenuItemsCallback,\n SendBox,\n SendBoxStylesProps,\n TypingIndicator,\n TypingIndicatorStylesProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(image-gallery) */ /* @conditional-compile-remove(file-sharing) */\nimport { ChatMessage } from '@internal/react-components';\n\nimport React, { useCallback, useEffect, useMemo } from 'react';\n/* @conditional-compile-remove(image-gallery) */\nimport { useState } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\nimport { FileDownloadHandler } from '@internal/react-components';\nimport { FileUploadButtonWrapper as FileUploadButton, FileUploadHandler } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\n\nimport {\n chatArea,\n chatContainer,\n chatWrapper,\n messageThreadChatCompositeStyles,\n sendboxContainerStyles,\n typingIndicatorContainerStyles\n} from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\n/* @conditional-compile-remove(chat-composite-participant-pane) */\nimport { ChatScreenPeoplePane } from './ChatScreenPeoplePane';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing) */\nimport { fileUploadsSelector } from './selectors/fileUploadsSelector';\n/* @conditional-compile-remove(file-sharing) */\nimport { useSelector } from './hooks/useSelector';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileDownloadErrorBar } from './FileDownloadErrorBar';\n/* @conditional-compile-remove(file-sharing) */\nimport { _FileDownloadCards } from '@internal/react-components';\n/* @conditional-compile-remove(image-gallery) */\nimport { ImageGallery, ImageGalleryImageProps } from '@internal/react-components';\n\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n hasFocusOnMount?: 'sendBoxTextField';\n fileSharing?: FileSharingOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * Properties for configuring the File Sharing feature.\n * @beta\n */\nexport interface FileSharingOptions {\n /**\n * A string containing the comma separated list of accepted file types.\n * Similar to the `accept` attribute of the `<input type=\"file\" />` element.\n * Accepts any type of file if not specified.\n * @beta\n */\n accept?: string;\n /**\n * Allows multiple files to be selected if set to `true`.\n * Similar to the `multiple` attribute of the `<input type=\"file\" />` element.\n * @defaultValue false\n * @beta\n */\n multiple?: boolean;\n /**\n * A function of type {@link FileUploadHandler} for handling file uploads.\n * @beta\n */\n uploadHandler: FileUploadHandler;\n /**\n * A function of type {@link FileDownloadHandler} for handling file downloads.\n * If the function is not specified, the file's `url` will be opened in a new tab to\n * initiate the download.\n */\n downloadHandler?: FileDownloadHandler;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n fileSharing,\n formFactor\n } = props;\n\n const defaultNumberOfChatMessagesToReload = 5;\n /* @conditional-compile-remove(file-sharing) */\n const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');\n /* @conditional-compile-remove(image-gallery) */\n const [fullSizeAttachments, setFullSizeAttachments] = useState<Record<string, string>>({});\n /* @conditional-compile-remove(image-gallery) */\n const [galleryImages, setGalleryImages] = useState<Array<ImageGalleryImageProps>>([]);\n /* @conditional-compile-remove(image-gallery) */\n const [isImageGalleryOpen, setIsImageGalleryOpen] = useState<boolean>(false);\n\n const adapter = useAdapter();\n const theme = useTheme();\n\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n\n const messageThreadProps = usePropsFor(MessageThread);\n const sendBoxProps = usePropsFor(SendBox);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n\n const onRenderAvatarCallback = useCallback(\n (userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return (\n <AvatarPersona\n userId={userId}\n hidePersonaDetails={true}\n {...defaultOptions}\n dataProvider={onFetchAvatarPersonaData}\n />\n );\n },\n [onFetchAvatarPersonaData]\n );\n\n const messageThreadStyles = useMemo(() => {\n return Object.assign(\n {},\n messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground),\n styles?.messageThread\n );\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n const userId = toFlatCommunicationIdentifier(adapter.getState().userId);\n\n const fileUploadButtonOnChange = useCallback(\n (files: FileList | null): void => {\n if (!files) {\n return;\n }\n\n /* @conditional-compile-remove(file-sharing) */\n const fileUploads = adapter.registerActiveFileUploads(Array.from(files));\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?.uploadHandler(userId, fileUploads);\n },\n [adapter, fileSharing, userId]\n );\n\n /* @conditional-compile-remove(file-sharing) */\n const onRenderFileDownloads = useCallback(\n (userId: string, message: ChatMessage) => (\n <_FileDownloadCards\n userId={userId}\n fileMetadata={message.files || []}\n downloadHandler={fileSharing?.downloadHandler}\n onDownloadErrorMessage={(errorMessage: string) => {\n setDownloadErrorMessage(errorMessage);\n }}\n />\n ),\n [fileSharing?.downloadHandler]\n );\n\n /* @conditional-compile-remove(image-gallery) */\n const onInlineImageClicked = useCallback(\n async (attachmentId: string, messageId: string): Promise<void> => {\n const messages = messageThreadProps.messages?.filter((message) => {\n return message.messageId === messageId;\n });\n if (!messages || messages.length <= 0) {\n return;\n }\n const chatMessage = messages[0] as ChatMessage;\n\n const inlinedImages = chatMessage.inlineImages?.filter((attachment) => {\n return attachment.id === attachmentId;\n });\n\n if (!inlinedImages || inlinedImages.length <= 0) {\n return;\n }\n\n const attachment = inlinedImages[0];\n\n const titleIconRenderOptions = {\n text: chatMessage.senderDisplayName,\n size: PersonaSize.size32,\n showOverflowTooltip: false,\n imageAlt: chatMessage.senderDisplayName\n };\n const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(chatMessage.senderId, titleIconRenderOptions);\n const galleryImage: ImageGalleryImageProps = {\n title: chatMessage.senderDisplayName || '',\n titleIcon: titleIcon,\n downloadFilename: attachment.id,\n imageUrl: ''\n };\n setIsImageGalleryOpen(true);\n\n if (attachment.id in fullSizeAttachments) {\n setGalleryImages([\n {\n ...galleryImage,\n imageUrl: fullSizeAttachments[attachment.id]\n }\n ]);\n return;\n }\n\n if (attachment.attachmentType === 'inlineImage' && attachment.url) {\n // TBD: Need to begin investigating how to download HQ images.\n const blob = await adapter.downloadAttachments({ attachmentUrls: { [attachment.id]: attachment.url } });\n if (blob[0]) {\n const blobUrl = blob[0].blobUrl;\n setFullSizeAttachments((prev) => ({ ...prev, [attachment.id]: blobUrl }));\n setGalleryImages([\n {\n ...galleryImage,\n imageUrl: blobUrl\n }\n ]);\n }\n }\n },\n [adapter, fullSizeAttachments, messageThreadProps.messages, onRenderAvatarCallback]\n );\n\n /* @conditional-compile-remove(image-gallery) */\n const onImageDownloadButtonClicked = useCallback((imageUrl: string, downloadFilename: string): void => {\n if (imageUrl === '') {\n return;\n }\n if (isIOS()) {\n window.open(imageUrl, '_blank');\n } else {\n // Create a new anchor element\n const a = document.createElement('a');\n // Set the href and download attributes for the anchor element\n a.href = imageUrl;\n a.download = downloadFilename;\n a.rel = 'noopener noreferrer';\n a.target = '_blank';\n\n // Programmatically click the anchor element to trigger the download\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n }, []);\n\n const AttachFileButton = useCallback(() => {\n if (!fileSharing?.uploadHandler) {\n return null;\n }\n return (\n <FileUploadButton\n accept={fileSharing?.accept}\n multiple={fileSharing?.multiple}\n onChange={fileUploadButtonOnChange}\n />\n );\n }, [fileSharing?.accept, fileSharing?.multiple, fileSharing?.uploadHandler, fileUploadButtonOnChange]);\n return (\n <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {\n /* @conditional-compile-remove(file-sharing) */\n <FileDownloadErrorBar\n onDismissDownloadErrorMessage={useCallback(() => {\n setDownloadErrorMessage('');\n }, [])}\n fileDownloadErrorMessage={downloadErrorMessage || ''}\n />\n }\n <MessageThread\n {...messageThreadProps}\n onRenderAvatar={onRenderAvatarCallback}\n onRenderMessage={onRenderMessage}\n /* @conditional-compile-remove(file-sharing) */\n onRenderFileDownloads={onRenderFileDownloads}\n /* @conditional-compile-remove(image-gallery) */\n onInlineImageClicked={onInlineImageClicked}\n numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload}\n styles={messageThreadStyles}\n />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? (\n onRenderTypingIndicator(typingIndicatorProps.typingUsers)\n ) : (\n <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />\n )}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && (\n <Stack verticalAlign=\"center\">\n <AttachFileButton />\n </Stack>\n )}\n <Stack grow>\n <SendBox\n {...sendBoxProps}\n autoFocus={options?.autoFocus}\n styles={sendBoxStyles}\n /* @conditional-compile-remove(file-sharing) */\n activeFileUploads={useSelector(fileUploadsSelector).files}\n /* @conditional-compile-remove(file-sharing) */\n onCancelFileUpload={adapter.cancelFileUpload}\n />\n </Stack>\n {formFactor !== 'mobile' && <AttachFileButton />}\n </Stack>\n </Stack>\n </Stack>\n {\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n options?.participantPane === true && (\n <ChatScreenPeoplePane\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n isMobile={formFactor === 'mobile'}\n />\n )\n }\n </Stack>\n {\n /* @conditional-compile-remove(image-gallery) */\n <ImageGallery\n isOpen={isImageGalleryOpen}\n images={galleryImages}\n onDismiss={() => {\n setGalleryImages([]);\n setIsImageGalleryOpen(false);\n }}\n onImageDownloadButtonClicked={onImageDownloadButtonClicked}\n />\n }\n </Stack>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AddPeopleDropdown.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/AddPeopleDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,aAAa,EACb,KAAK,EACL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAwB,SAAS,EAAE,yCAAmC;AAC1F,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,6CAA6C;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,sBAAsB,IAAI,qBAAqB,EAAE,sCAAgC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,E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E,KAAK,EACf,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,GACpC,CACH;QAEA,gBAAgB,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACpC,oBAAC,KAAK,IAAC,MAAM,EAAE,yBAAyB;YACtC,oBAAC,aAAa,IACZ,YAAY,EAAE,GAAG,EAAE,CAAC,iCAAiC,EAAE,EACvD,IAAI,EAAE,OAAO,CAAC,8BAA8B,EAC5C,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,0BAA0B,gBACvB,wBAAwB,GACnC,CACI,CACT,CACK,CAET,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,uCAAuC;IAC9C,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC;IAE/B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,iCAAiC;IACxC,6CAA6C;IAC7C,OAAO,oBAAC,yBAAyB,IAAC,QAAQ,EAAC,qBAAqB,GAAG,CAAC;IAEpE,OAAO,yCAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport {\n DefaultButton,\n IContextualMenuItem,\n IContextualMenuProps,\n PrimaryButton,\n Stack,\n useTheme\n} from '@fluentui/react';\n\nimport { _DrawerMenu, _DrawerMenuItemProps, Announcer } from '@internal/react-components';\nimport copy from 'copy-to-clipboard';\nimport { useMemo, useState } from 'react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallWithChatCompositeIcon } from './icons';\nimport { iconStyles, themedCopyLinkButtonStyles, themedMenuStyle } from './AddPeopleDropdown.styles';\nimport { CallingDialpad } from './CallingDialpad';\nimport { CallingDialpadStrings } from './CallingDialpad';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { copyLinkButtonContainerStyles, copyLinkButtonStackStyles } from './styles/PeoplePaneContent.styles';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n\n/** @private */\nexport interface AddPeopleDropdownStrings extends CallingDialpadStrings {\n copyInviteLinkButtonLabel: string;\n openDialpadButtonLabel: string;\n peoplePaneAddPeopleButtonLabel: string;\n copyInviteLinkActionedAriaLabel: string;\n}\n\n/** @private */\nexport interface AddPeopleDropdownProps {\n inviteLink?: string;\n mobileView?: boolean;\n strings: AddPeopleDropdownStrings;\n onAddParticipant: (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions) => void;\n alternateCallerId?: string;\n}\n\n/** @private */\nexport const AddPeopleDropdown = (props: AddPeopleDropdownProps): JSX.Element => {\n const theme = useTheme();\n\n const { inviteLink, strings, mobileView, onAddParticipant, alternateCallerId } = props;\n\n const [showDialpad, setShowDialpad] = useState(false);\n\n const [announcerStrings, setAnnouncerStrings] = useState<string>();\n\n const menuStyleThemed = useMemo(() => themedMenuStyle(theme), [theme]);\n\n const copyLinkButtonStylesThemed = useMemo(() => themedCopyLinkButtonStyles(theme, mobileView), [mobileView, theme]);\n\n const defaultMenuProps = useMemo((): IContextualMenuProps => {\n const menuProps: IContextualMenuProps = {\n styles: menuStyleThemed,\n items: [],\n useTargetWidth: true,\n calloutProps: {\n preventDismissOnEvent\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onMenuOpened(contextualMenu?) {\n setAnnouncerStrings(undefined);\n }\n };\n\n if (inviteLink) {\n menuProps.items.push({\n key: 'InviteLinkKey',\n text: strings.copyInviteLinkButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: 'Link', style: iconStyles },\n onClick: () => {\n setAnnouncerStrings(strings.copyInviteLinkActionedAriaLabel);\n copy(inviteLink);\n }\n });\n }\n\n // only show the dialpad option when alternateCallerId is set\n if (alternateCallerId) {\n menuProps.items.push({\n key: 'DialpadKey',\n text: strings.openDialpadButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: PeoplePaneOpenDialpadIconNameTrampoline(), style: iconStyles },\n onClick: () => setShowDialpad(true),\n 'data-ui-id': 'call-dial-phone-number-button'\n });\n }\n\n return menuProps;\n }, [\n menuStyleThemed,\n inviteLink,\n alternateCallerId,\n strings.copyInviteLinkButtonLabel,\n strings.copyInviteLinkActionedAriaLabel,\n strings.openDialpadButtonLabel,\n copyLinkButtonStylesThemed\n ]);\n\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n const [addPeopleDrawerMenuItems, setAddPeopleDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const setDrawerMenuItemsForAddPeople: () => void = useMemo(() => {\n return () => {\n const drawerMenuItems = defaultMenuProps.items.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setAddPeopleDrawerMenuItems([]))\n );\n setAddPeopleDrawerMenuItems(drawerMenuItems);\n };\n }, [defaultMenuProps, setAddPeopleDrawerMenuItems]);\n\n if (mobileView) {\n return (\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {defaultMenuProps.items.length > 0 && (\n <Stack.Item styles={copyLinkButtonContainerStyles}>\n <PrimaryButton\n onClick={setDrawerMenuItemsForAddPeople}\n styles={copyLinkButtonStylesThemed}\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack.Item>\n )}\n\n {addPeopleDrawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()} data-ui-id=\"call-add-people-dropdown\">\n <_DrawerMenu\n disableMaxHeight={true}\n onLightDismiss={() => setAddPeopleDrawerMenuItems([])}\n items={addPeopleDrawerMenuItems}\n />\n </Stack>\n )}\n {alternateCallerId && (\n <CallingDialpad\n isMobile\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {alternateCallerId && (\n <CallingDialpad\n isMobile={false}\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n\n {defaultMenuProps.items.length > 0 && (\n <Stack styles={copyLinkButtonStackStyles}>\n <DefaultButton\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n menuProps={defaultMenuProps}\n styles={copyLinkButtonStylesThemed}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack>\n )}\n </Stack>\n }\n </>\n );\n};\n\nfunction PeoplePaneOpenDialpadIconNameTrampoline(): string {\n /* @conditional-compile-remove(PSTN-calls) */\n return 'PeoplePaneOpenDialpad';\n\n return '';\n}\n\nfunction PeoplePaneAddPersonIconTrampoline(): JSX.Element {\n /* @conditional-compile-remove(PSTN-calls) */\n return <CallWithChatCompositeIcon iconName=\"PeoplePaneAddPerson\" />;\n\n return <></>;\n}\n"]}
1
+ {"version":3,"file":"AddPeopleDropdown.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/AddPeopleDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,aAAa,EACb,KAAK,EACL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAwB,SAAS,EAAE,yCAAmC;AAC1F,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAA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YACA,iBAAiB,IAAI,CACpB,oBAAC,cAAc,IACb,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,GACpC,CACH,CACK,CACT,CAAC;IACJ,CAAC;IAED,OAAO,CACL,0CAEI,oBAAC,KAAK;QACJ,oBAAC,SAAS,IAAC,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,GAAI;QACzE,iBAAiB,IAAI,CACpB,oBAAC,cAAc,IACb,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,GACpC,CACH;QAEA,gBAAgB,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACpC,oBAAC,KAAK,IAAC,MAAM,EAAE,yBAAyB;YACtC,oBAAC,aAAa,IACZ,YAAY,EAAE,GAAG,EAAE,CAAC,iCAAiC,EAAE,EACvD,IAAI,EAAE,OAAO,CAAC,8BAA8B,EAC5C,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,0BAA0B,gBACvB,wBAAwB,GACnC,CACI,CACT,CACK,CAET,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,uCAAuC;IAC9C,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC;IAE/B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,iCAAiC;IACxC,6CAA6C;IAC7C,OAAO,oBAAC,yBAAyB,IAAC,QAAQ,EAAC,qBAAqB,GAAG,CAAC;IAEpE,OAAO,yCAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport {\n DefaultButton,\n IContextualMenuItem,\n IContextualMenuProps,\n PrimaryButton,\n Stack,\n useTheme\n} from '@fluentui/react';\n\nimport { _DrawerMenu, _DrawerMenuItemProps, Announcer } from '@internal/react-components';\nimport copy from 'copy-to-clipboard';\nimport { useMemo, useState } from 'react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallWithChatCompositeIcon } from './icons';\nimport { iconStyles, themedCopyLinkButtonStyles, themedMenuStyle } from './AddPeopleDropdown.styles';\nimport { CallingDialpad } from './CallingDialpad';\nimport { CallingDialpadStrings } from './CallingDialpad';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { copyLinkButtonContainerStyles, copyLinkButtonStackStyles } from './styles/PeoplePaneContent.styles';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n\n/** @private */\nexport interface AddPeopleDropdownStrings extends CallingDialpadStrings {\n copyInviteLinkButtonLabel: string;\n openDialpadButtonLabel: string;\n peoplePaneAddPeopleButtonLabel: string;\n copyInviteLinkActionedAriaLabel: string;\n}\n\n/** @private */\nexport interface AddPeopleDropdownProps {\n inviteLink?: string;\n mobileView?: boolean;\n strings: AddPeopleDropdownStrings;\n onAddParticipant: (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions) => void;\n alternateCallerId?: string;\n}\n\n/** @private */\nexport const AddPeopleDropdown = (props: AddPeopleDropdownProps): JSX.Element => {\n const theme = useTheme();\n\n const { inviteLink, strings, mobileView, onAddParticipant, alternateCallerId } = props;\n\n const [showDialpad, setShowDialpad] = useState(false);\n\n const [announcerStrings, setAnnouncerStrings] = useState<string>();\n\n const menuStyleThemed = useMemo(() => themedMenuStyle(theme), [theme]);\n\n const copyLinkButtonStylesThemed = useMemo(() => themedCopyLinkButtonStyles(theme, mobileView), [mobileView, theme]);\n\n const defaultMenuProps = useMemo((): IContextualMenuProps => {\n const menuProps: IContextualMenuProps = {\n styles: menuStyleThemed,\n items: [],\n useTargetWidth: true,\n calloutProps: {\n preventDismissOnEvent\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onMenuOpened(contextualMenu?) {\n setAnnouncerStrings(undefined);\n }\n };\n\n if (inviteLink) {\n menuProps.items.push({\n key: 'InviteLinkKey',\n text: strings.copyInviteLinkButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: 'Link', style: iconStyles },\n onClick: () => {\n setAnnouncerStrings(strings.copyInviteLinkActionedAriaLabel);\n copy(inviteLink);\n }\n });\n }\n\n // only show the dialpad option when alternateCallerId is set\n if (alternateCallerId) {\n menuProps.items.push({\n key: 'DialpadKey',\n text: strings.openDialpadButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: PeoplePaneOpenDialpadIconNameTrampoline(), style: iconStyles },\n onClick: () => setShowDialpad(true),\n 'data-ui-id': 'call-dial-phone-number-button'\n });\n }\n\n return menuProps;\n }, [\n menuStyleThemed,\n inviteLink,\n alternateCallerId,\n strings.copyInviteLinkButtonLabel,\n strings.copyInviteLinkActionedAriaLabel,\n strings.openDialpadButtonLabel,\n copyLinkButtonStylesThemed\n ]);\n\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n const [addPeopleDrawerMenuItems, setAddPeopleDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const setDrawerMenuItemsForAddPeople: () => void = useMemo(() => {\n return () => {\n const drawerMenuItems = defaultMenuProps.items.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setAddPeopleDrawerMenuItems([]))\n );\n setAddPeopleDrawerMenuItems(drawerMenuItems);\n };\n }, [defaultMenuProps, setAddPeopleDrawerMenuItems]);\n\n if (mobileView) {\n return (\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {defaultMenuProps.items.length > 0 && (\n <Stack.Item styles={copyLinkButtonContainerStyles}>\n <PrimaryButton\n onClick={setDrawerMenuItemsForAddPeople}\n styles={copyLinkButtonStylesThemed}\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack.Item>\n )}\n\n {addPeopleDrawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()} data-ui-id=\"call-add-people-dropdown\">\n <_DrawerMenu\n disableMaxHeight={true}\n onLightDismiss={() => setAddPeopleDrawerMenuItems([])}\n items={addPeopleDrawerMenuItems}\n />\n </Stack>\n )}\n {alternateCallerId && (\n <CallingDialpad\n isMobile={true}\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {alternateCallerId && (\n <CallingDialpad\n isMobile={false}\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n\n {defaultMenuProps.items.length > 0 && (\n <Stack styles={copyLinkButtonStackStyles}>\n <DefaultButton\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n menuProps={defaultMenuProps}\n styles={copyLinkButtonStylesThemed}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack>\n )}\n </Stack>\n }\n </>\n );\n};\n\nfunction PeoplePaneOpenDialpadIconNameTrampoline(): string {\n /* @conditional-compile-remove(PSTN-calls) */\n return 'PeoplePaneOpenDialpad';\n\n return '';\n}\n\nfunction PeoplePaneAddPersonIconTrampoline(): JSX.Element {\n /* @conditional-compile-remove(PSTN-calls) */\n return <CallWithChatCompositeIcon iconName=\"PeoplePaneAddPerson\" />;\n\n return <></>;\n}\n"]}
@@ -37,7 +37,7 @@ export const CallingDialpad = (props) => {
37
37
  const callButtonStyle = useMemo(() => themedCallButtonStyle(theme), [theme]);
38
38
  const dialpadComponent = () => {
39
39
  return (React.createElement(React.Fragment, null,
40
- React.createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput, isMobile: isMobile }),
40
+ React.createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput, longPressTrigger: isMobile ? 'touch' : 'mouseAndTouch' }),
41
41
  React.createElement(PrimaryButton, { text: strings.dialpadStartCallButtonLabel, onRenderIcon: () => DialpadStartCallIconTrampoline(), onClick: onClickCall, styles: callButtonStyle, disabled: textFieldInput === '' })));
42
42
  return React.createElement(React.Fragment, null);
43
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CallingDialpad.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CallingDialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAiB,yCAAmC;AACpE,OAAO,EAAqC,cAAc,EAAE,yCAAmC;AAC/F,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAiB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpF,6CAA6C;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAIpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,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,kBAAkB,EAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GACrC,CACI;QAER,oBAAC,KAAK,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAG,gBAAgB,EAAE,CAAS,CAC5D,CAET,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,8BAA8B;IACrC,6CAA6C;IAC7C,OAAO,oBAAC,yBAAyB,IAAC,QAAQ,EAAC,kBAAkB,GAAG,CAAC;IACjE,OAAO,yCAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { useState } from 'react';\nimport { useMemo } from 'react';\nimport { Dialpad, DialpadStyles } from '@internal/react-components';\nimport { _DrawerMenu, _DrawerMenuItemProps, _DrawerSurface } from '@internal/react-components';\nimport { IModalStyles, Modal, Stack, useTheme, Text, IconButton } from '@fluentui/react';\nimport { IButtonStyles, PrimaryButton } from '@fluentui/react';\n\nimport { themeddialpadModalStyle } from './CallingDialpad.styles';\nimport { themedCallButtonStyle, themedDialpadStyle } from './CallingDialpad.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallWithChatCompositeIcon } from './icons';\n\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n\n/** @private */\nexport interface CallingDialpadStrings {\n dialpadModalAriaLabel: string;\n dialpadModalTitle: string;\n dialpadCloseModalButtonAriaLabel: string;\n dialpadStartCallButtonLabel: string;\n}\n\n/** @private */\nexport interface CallingDialpadProps {\n isMobile: boolean;\n showDialpad: boolean;\n strings: CallingDialpadStrings;\n onDismissDialpad: () => void;\n onAddParticipant: (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions) => void;\n alternateCallerId: string;\n}\n\n/** @private */\nexport const CallingDialpad = (props: CallingDialpadProps): JSX.Element => {\n const { strings, isMobile, showDialpad, onDismissDialpad, onAddParticipant, alternateCallerId } = props;\n const [textFieldInput, setTextFieldInput] = useState('');\n\n const theme = useTheme();\n\n const onDismissTriggered = (): void => {\n setTextFieldInput('');\n onDismissDialpad();\n };\n\n const onClickCall = (): void => {\n if (onAddParticipant) {\n /**\n * Format the phone number in dialpad textfield to make sure the phone number is in E.164 format.\n * We assume the input number always include countrycode\n */\n\n const phoneNumber = { phoneNumber: '+' + textFieldInput.replace(/\\D/g, '').replaceAll(' ', '') };\n\n onAddParticipant(phoneNumber, { alternateCallerId: { phoneNumber: alternateCallerId } });\n onDismissTriggered();\n }\n };\n\n const dialpadModalStyle: Partial<IModalStyles> = useMemo(() => themeddialpadModalStyle(theme), [theme]);\n\n const dialpadStyle: Partial<DialpadStyles> = useMemo(() => themedDialpadStyle(isMobile, theme), [theme, isMobile]);\n\n const callButtonStyle: Partial<IButtonStyles> = useMemo(() => themedCallButtonStyle(theme), [theme]);\n\n const dialpadComponent = (): JSX.Element => {\n return (\n <>\n <Dialpad styles={dialpadStyle} onChange={setTextFieldInput} isMobile={isMobile} />\n <PrimaryButton\n text={strings.dialpadStartCallButtonLabel}\n onRenderIcon={() => DialpadStartCallIconTrampoline()}\n onClick={onClickCall}\n styles={callButtonStyle}\n disabled={textFieldInput === ''}\n />\n </>\n );\n\n return <></>;\n };\n\n if (isMobile) {\n return (\n <Stack data-ui-id=\"call-with-chat-composite-dialpad\">\n {showDialpad && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerSurface onLightDismiss={onDismissTriggered} disableMaxHeight={true}>\n <Stack style={{ padding: '1rem' }}>{dialpadComponent()}</Stack>\n </_DrawerSurface>\n </Stack>\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Modal\n titleAriaId={strings.dialpadModalAriaLabel}\n isOpen={showDialpad}\n onDismiss={onDismissTriggered}\n isBlocking={true}\n styles={dialpadModalStyle}\n data-ui-id=\"call-with-chat-composite-dialpad\"\n >\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\">\n <Text>{strings.dialpadModalTitle}</Text>\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings.dialpadCloseModalButtonAriaLabel}\n onClick={onDismissTriggered}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n\n <Stack style={{ overflow: 'hidden' }}>{dialpadComponent()}</Stack>\n </Modal>\n }\n </>\n );\n};\n\nfunction DialpadStartCallIconTrampoline(): JSX.Element {\n /* @conditional-compile-remove(PSTN-calls) */\n return <CallWithChatCompositeIcon iconName=\"DialpadStartCall\" />;\n return <></>;\n}\n"]}
1
+ {"version":3,"file":"CallingDialpad.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CallingDialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAiB,yCAAmC;AACpE,OAAO,EAAqC,cAAc,EAAE,yCAAmC;AAC/F,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAiB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpF,6CAA6C;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAIpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAoBrF,eAAe;AACf,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAe,EAAE;IACxE,MAAM,EAAE,OAA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O,CAAC,KAAK,EAAE,GACrC,CACI;QAER,oBAAC,KAAK,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAG,gBAAgB,EAAE,CAAS,CAC5D,CAET,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,8BAA8B;IACrC,6CAA6C;IAC7C,OAAO,oBAAC,yBAAyB,IAAC,QAAQ,EAAC,kBAAkB,GAAG,CAAC;IACjE,OAAO,yCAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { useState } from 'react';\nimport { useMemo } from 'react';\nimport { Dialpad, DialpadStyles } from '@internal/react-components';\nimport { _DrawerMenu, _DrawerMenuItemProps, _DrawerSurface } from '@internal/react-components';\nimport { IModalStyles, Modal, Stack, useTheme, Text, IconButton } from '@fluentui/react';\nimport { IButtonStyles, PrimaryButton } from '@fluentui/react';\n\nimport { themeddialpadModalStyle } from './CallingDialpad.styles';\nimport { themedCallButtonStyle, themedDialpadStyle } from './CallingDialpad.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallWithChatCompositeIcon } from './icons';\n\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n\n/** @private */\nexport interface CallingDialpadStrings {\n dialpadModalAriaLabel: string;\n dialpadModalTitle: string;\n dialpadCloseModalButtonAriaLabel: string;\n dialpadStartCallButtonLabel: string;\n}\n\n/** @private */\nexport interface CallingDialpadProps {\n isMobile: boolean;\n showDialpad: boolean;\n strings: CallingDialpadStrings;\n onDismissDialpad: () => void;\n onAddParticipant: (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions) => void;\n alternateCallerId: string;\n}\n\n/** @private */\nexport const CallingDialpad = (props: CallingDialpadProps): JSX.Element => {\n const { strings, isMobile, showDialpad, onDismissDialpad, onAddParticipant, alternateCallerId } = props;\n const [textFieldInput, setTextFieldInput] = useState('');\n\n const theme = useTheme();\n\n const onDismissTriggered = (): void => {\n setTextFieldInput('');\n onDismissDialpad();\n };\n\n const onClickCall = (): void => {\n if (onAddParticipant) {\n /**\n * Format the phone number in dialpad textfield to make sure the phone number is in E.164 format.\n * We assume the input number always include countrycode\n */\n\n const phoneNumber = { phoneNumber: '+' + textFieldInput.replace(/\\D/g, '').replaceAll(' ', '') };\n\n onAddParticipant(phoneNumber, { alternateCallerId: { phoneNumber: alternateCallerId } });\n onDismissTriggered();\n }\n };\n\n const dialpadModalStyle: Partial<IModalStyles> = useMemo(() => themeddialpadModalStyle(theme), [theme]);\n\n const dialpadStyle: Partial<DialpadStyles> = useMemo(() => themedDialpadStyle(isMobile, theme), [theme, isMobile]);\n\n const callButtonStyle: Partial<IButtonStyles> = useMemo(() => themedCallButtonStyle(theme), [theme]);\n\n const dialpadComponent = (): JSX.Element => {\n return (\n <>\n <Dialpad\n styles={dialpadStyle}\n onChange={setTextFieldInput}\n longPressTrigger={isMobile ? 'touch' : 'mouseAndTouch'}\n />\n <PrimaryButton\n text={strings.dialpadStartCallButtonLabel}\n onRenderIcon={() => DialpadStartCallIconTrampoline()}\n onClick={onClickCall}\n styles={callButtonStyle}\n disabled={textFieldInput === ''}\n />\n </>\n );\n\n return <></>;\n };\n\n if (isMobile) {\n return (\n <Stack data-ui-id=\"call-with-chat-composite-dialpad\">\n {showDialpad && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerSurface onLightDismiss={onDismissTriggered} disableMaxHeight={true}>\n <Stack style={{ padding: '1rem' }}>{dialpadComponent()}</Stack>\n </_DrawerSurface>\n </Stack>\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Modal\n titleAriaId={strings.dialpadModalAriaLabel}\n isOpen={showDialpad}\n onDismiss={onDismissTriggered}\n isBlocking={true}\n styles={dialpadModalStyle}\n data-ui-id=\"call-with-chat-composite-dialpad\"\n >\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\">\n <Text>{strings.dialpadModalTitle}</Text>\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings.dialpadCloseModalButtonAriaLabel}\n onClick={onDismissTriggered}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n\n <Stack style={{ overflow: 'hidden' }}>{dialpadComponent()}</Stack>\n </Modal>\n }\n </>\n );\n};\n\nfunction DialpadStartCallIconTrampoline(): JSX.Element {\n /* @conditional-compile-remove(PSTN-calls) */\n return <CallWithChatCompositeIcon iconName=\"DialpadStartCall\" />;\n return <></>;\n}\n"]}
@@ -146,6 +146,8 @@ export const CommonCallControlBar = (props) => {
146
146
  const role = (_a = props.callAdapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
147
147
  /*@conditional-compile-remove(rooms) */
148
148
  const hideRaiseHandButtonInRoomsCall = props.callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);
149
+ /*@conditional-compile-remove(reaction) */
150
+ const reactionResources = props.callAdapter.getState().reactions;
149
151
  return (React.createElement("div", { ref: controlBarSizeRef },
150
152
  React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
151
153
  /* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (React.createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: props.isCaptionsOn }))),
@@ -166,7 +168,10 @@ export const CommonCallControlBar = (props) => {
166
168
  /* @conditional-compile-remove(video-background-effects) */
167
169
  onClickVideoEffects: props.onClickVideoEffects, componentRef: props.cameraButtonRef, disableTooltip: props.mobileView })),
168
170
  /* @conditional-compile-remove(reaction) */
169
- !props.mobileView && isReactionAllowed && isEnabled(options.reactionButton) && (React.createElement(Reaction, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen })),
171
+ !props.mobileView &&
172
+ isReactionAllowed &&
173
+ isEnabled(options.reactionButton) &&
174
+ reactionResources && (React.createElement(Reaction, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen, reactionResource: reactionResources })),
170
175
  /* @conditional-compile-remove(raise-hand) */ !props.mobileView &&
171
176
  isEnabled(options.raiseHandButton) &&
172
177
  /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options.displayType, styles: commonButtonStyles,
@@ -1 +1 @@
1
- {"version":3,"file":"CommonCallControlBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/ControlBar/CommonCallControlBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,eAAe,EAIf,WAAW,EACX,cAAc,EACd,KAAK,EACL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,mEAAmE,CAAC;AAIpH,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,oDAAoD,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACL,qBAAqB,EACrB,kCAAkC,EAClC,kCAAkC,EACn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S,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,8CAA8C;AAC9C,MAAM,oBAAoB,GAAG,CAAC,OAA8D,EAAW,EAAE;IACvG,IAAI,OAAO,CAAC,UAAU,KAAK,KAAK,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,EAAE,CAAC;QACvE,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useMemo, useRef, useEffect, useState, useCallback } from 'react';\nimport { CallAdapterProvider } from '../../CallComposite/adapter/CallAdapterProvider';\nimport { CallAdapter } from '../../CallComposite';\nimport { PeopleButton } from './PeopleButton';\nimport {\n concatStyleSets,\n IButton,\n IStyle,\n ITheme,\n mergeStyles,\n mergeStyleSets,\n Stack,\n useTheme\n} from '@fluentui/react';\nimport { controlBarContainerStyles } from '../../CallComposite/styles/CallControls.styles';\nimport { callControlsContainerStyles } from '../../CallComposite/styles/CallPage.styles';\nimport { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport { ControlBar } from '@internal/react-components';\nimport { Microphone } from '../../CallComposite/components/buttons/Microphone';\nimport { Camera } from '../../CallComposite/components/buttons/Camera';\nimport { ScreenShare } from '../../CallComposite/components/buttons/ScreenShare';\nimport { EndCall } from '../../CallComposite/components/buttons/EndCall';\nimport { MoreButton } from '../MoreButton';\nimport { ContainerRectProps } from '../ContainerRectProps';\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallControlBarButton,\n onFetchCustomButtonPropsTrampoline\n} from './CustomButton';\n/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */\nimport { DesktopMoreButton } from './DesktopMoreButton';\nimport { isDisabled } from '../../CallComposite/utils';\nimport { HiddenFocusStartPoint } from '../HiddenFocusStartPoint';\nimport { CallWithChatControlOptions } from '../../CallWithChatComposite';\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsSettingsModal } from '../CaptionsSettingsModal';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHand } from '../../CallComposite/components/buttons/RaiseHand';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '../../CallComposite/components/buttons/Reaction';\n/* @conditional-compile-remove(reaction) */\nimport { useSelector } from '../../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(reaction) */\nimport { capabilitySelector } from '../../CallComposite/selectors/capabilitySelector';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { DtmfDialpadButton } from './DtmfDialerButton';\n/**\n * @private\n */\nexport interface CommonCallControlBarProps {\n callAdapter: CallAdapter;\n peopleButtonChecked: boolean;\n onPeopleButtonClicked: () => void;\n onMoreButtonClicked?: () => void;\n mobileView: boolean;\n disableButtonsForLobbyPage: boolean;\n callControls?: boolean | CommonCallControlOptions | CallWithChatControlOptions;\n disableButtonsForHoldScreen?: boolean;\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad?: () => void;\n /* @conditional-compile-remove(video-background-effects) */\n onClickVideoEffects?: (showVideoEffects: boolean) => void;\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported?: boolean;\n /* @conditional-compile-remove(close-captions) */\n isCaptionsOn?: boolean;\n displayVertical?: boolean;\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetOverflowGalleryPositionChange?: (position: 'Responsive' | 'horizontalTop') => void;\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayout?: (layout: VideoGalleryLayout) => void;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout?: VideoGalleryLayout;\n peopleButtonRef?: React.RefObject<IButton>;\n cameraButtonRef?: React.RefObject<IButton>;\n /* @conditional-compile-remove(video-background-effects) */\n videoBackgroundPickerRef?: React.RefObject<IButton>;\n /* @conditional-compile-remove(dtmf-dialer) */\n onSetDialpadPage?: () => void;\n /* @conditional-compile-remove(dtmf-dialer) */\n dtmfDialerPresent?: boolean;\n}\n\nconst inferCommonCallControlOptions = (\n mobileView: boolean,\n commonCallControlOptions?: boolean | CallWithChatControlOptions\n): CallWithChatControlOptions | false => {\n if (commonCallControlOptions === false) {\n return false;\n }\n\n const options =\n commonCallControlOptions === true || commonCallControlOptions === undefined ? {} : commonCallControlOptions;\n if (mobileView) {\n // Set to compressed mode when composite is optimized for mobile\n options.displayType = 'compact';\n // Set options to always not show screen share button for mobile\n options.screenShareButton = false;\n }\n return options;\n};\n\n/**\n * @private\n */\nexport const CommonCallControlBar = (props: CommonCallControlBarProps & ContainerRectProps): JSX.Element => {\n const theme = useTheme();\n const rtl = theme.rtl;\n\n const controlBarContainerRef = useRef<HTMLHeadingElement>(null);\n const sidepaneControlsRef = useRef<HTMLHeadingElement>(null);\n const controlBarSizeRef = useRef<HTMLHeadingElement>(null);\n\n const [controlBarButtonsWidth, setControlBarButtonsWidth] = useState(0);\n const [panelsButtonsWidth, setPanelsButtonsWidth] = useState(0);\n const [controlBarContainerWidth, setControlBarContainerWidth] = useState(0);\n\n const [totalButtonsWidth, setTotalButtonsWidth] = useState(0);\n const [isOutOfSpace, setIsOutOfSpace] = useState(false);\n\n const callWithChatStrings = useCallWithChatCompositeStrings();\n const options = inferCommonCallControlOptions(props.mobileView, props.callControls);\n\n /* @conditional-compile-remove(close-captions) */\n const [showCaptionsSettingsModal, setShowCaptionsSettingsModal] = useState(false);\n\n const handleResize = useCallback((): void => {\n setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);\n setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);\n setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);\n }, []);\n\n // on load set inital width\n useEffect(() => {\n setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);\n setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);\n setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);\n }, []);\n\n // get the current width of control bar buttons and panel control buttons when browser size change\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [handleResize]);\n\n /* when size change, reset total buttons width and compare with the control bar container width\n if the total width of those buttons exceed container width, do not center the control bar buttons based on parent container width\n Instead let them take up the remaining white space on the left */\n useEffect(() => {\n // white space on the left when control bar buttons are centered based on container width + control bar buttons width + panel control buttons width\n setTotalButtonsWidth(\n (controlBarContainerWidth - controlBarButtonsWidth) / 2 + controlBarButtonsWidth + panelsButtonsWidth\n );\n }, [controlBarButtonsWidth, panelsButtonsWidth, controlBarContainerWidth]);\n\n useEffect(() => {\n setIsOutOfSpace(totalButtonsWidth > controlBarContainerWidth);\n }, [totalButtonsWidth, controlBarContainerWidth]);\n\n /* @conditional-compile-remove(close-captions) */\n const openCaptionsSettingsModal = useCallback((): void => {\n setShowCaptionsSettingsModal(true);\n }, []);\n /* @conditional-compile-remove(close-captions) */\n const onDismissCaptionsSettings = useCallback((): void => {\n setShowCaptionsSettingsModal(false);\n }, []);\n const peopleButtonStrings = useMemo(\n () => ({\n label: callWithChatStrings.peopleButtonLabel,\n selectedLabel: callWithChatStrings.selectedPeopleButtonLabel,\n tooltipOffContent: callWithChatStrings.peopleButtonTooltipOpen,\n tooltipOnContent: callWithChatStrings.peopleButtonTooltipClose\n }),\n [callWithChatStrings]\n );\n const moreButtonStrings = useMemo(\n () => ({\n label: callWithChatStrings.moreDrawerButtonLabel,\n tooltipContent: callWithChatStrings.moreDrawerButtonTooltip\n }),\n [callWithChatStrings]\n );\n\n const centerContainerStyles = useMemo(() => {\n const styles: BaseCustomStyles = !props.mobileView ? desktopControlBarStyles : {};\n return mergeStyleSets(styles, {\n root: {\n // Enforce a background color on control bar to ensure it matches the composite background color.\n background: theme.semanticColors.bodyBackground\n }\n });\n }, [props.mobileView, theme.semanticColors.bodyBackground]);\n const screenShareButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopScreenShareButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n const commonButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopCommonButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n const endCallButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopEndCallButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n\n const controlBarWrapperDesktopStyles: IStyle = useMemo(\n // only center control bar buttons based on parent container if there are enough space on the screen and not mobile\n () => (!props.mobileView && !isOutOfSpace ? (rtl ? wrapperDesktopRtlStyles : wrapperDesktopStyles) : {}),\n [props.mobileView, rtl, isOutOfSpace]\n );\n\n // only center control bar buttons based on parent container if there are enough space on the screen and not mobile\n const controlBarDesktopContainerStyles: IStyle = useMemo(\n () => (!props.mobileView && !isOutOfSpace ? { position: 'relative', minHeight: '4.5rem', width: '100%' } : {}),\n [props.mobileView, isOutOfSpace]\n );\n\n const customButtons = useMemo(\n () =>\n generateCustomCallControlBarButton(\n onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined),\n options !== false ? options?.displayType : undefined\n ),\n [options]\n );\n\n /* @conditional-compile-remove(reaction) */\n const capabilitiesSelector = useSelector(capabilitySelector);\n /* @conditional-compile-remove(reaction) */\n const isReactionAllowed =\n !capabilitiesSelector?.capabilities || capabilitiesSelector.capabilities.useReactions.isPresent;\n\n // when options is false then we want to hide the whole control bar.\n if (options === false) {\n return <></>;\n }\n\n const sideButtonsPresent =\n isEnabled(options.peopleButton) || isEnabled(options.chatButton) || customButtons['secondary'] !== undefined;\n\n const screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n\n const microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n\n const cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n\n const showDesktopMoreButton =\n /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ isEnabled(\n options?.moreButton\n ) &&\n (false ||\n /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(\n options?.holdButton\n ) ||\n /* @conditional-compile-remove(close-captions) */ props.isCaptionsSupported ||\n /* @conditional-compile-remove(gallery-layouts) */ props.onUserSetGalleryLayout);\n\n /*@conditional-compile-remove(rooms) */\n const role = props.callAdapter.getState().call?.role;\n /*@conditional-compile-remove(rooms) */\n const hideRaiseHandButtonInRoomsCall =\n props.callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);\n\n return (\n <div ref={controlBarSizeRef}>\n <CallAdapterProvider adapter={props.callAdapter}>\n {\n /* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (\n <CaptionsSettingsModal\n showCaptionsSettingsModal={showCaptionsSettingsModal}\n onDismissCaptionsSettings={onDismissCaptionsSettings}\n changeCaptionLanguage={props.isCaptionsOn}\n />\n )\n }\n </CallAdapterProvider>\n <Stack\n horizontal\n reversed={!props.mobileView && !isOutOfSpace}\n horizontalAlign=\"space-between\"\n className={mergeStyles(\n callControlsContainerStyles,\n controlBarContainerStyles,\n controlBarDesktopContainerStyles\n )}\n >\n <Stack.Item grow className={mergeStyles(controlBarWrapperDesktopStyles)}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <Stack horizontalAlign=\"center\">\n {/*\n HiddenFocusStartPoint is a util component used when we can't ensure the initial element for first\n tab focus is at the top of dom tree. It moves the first-tab focus to the next interact-able element\n immediately after it in the dom tree.\n */}\n <HiddenFocusStartPoint />\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <div ref={controlBarContainerRef}>\n <ControlBar layout={props.displayVertical ? 'vertical' : 'horizontal'} styles={centerContainerStyles}>\n {microphoneButtonIsEnabled && (\n <Microphone\n displayType={options.displayType}\n styles={commonButtonStyles}\n splitButtonsForDeviceSelection={!props.mobileView}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton)}\n disableTooltip={props.mobileView}\n />\n )}\n {cameraButtonIsEnabled && (\n <Camera\n displayType={options.displayType}\n styles={commonButtonStyles}\n splitButtonsForDeviceSelection={!props.mobileView}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.cameraButton)}\n /* @conditional-compile-remove(video-background-effects) */\n onClickVideoEffects={props.onClickVideoEffects}\n componentRef={props.cameraButtonRef}\n disableTooltip={props.mobileView}\n />\n )}\n {\n /* @conditional-compile-remove(reaction) */\n !props.mobileView && isReactionAllowed && isEnabled(options.reactionButton) && (\n <Reaction\n displayType={options.displayType}\n styles={commonButtonStyles}\n disabled={props.disableButtonsForHoldScreen}\n />\n )\n }\n {\n /* @conditional-compile-remove(raise-hand) */ !props.mobileView &&\n isEnabled(options.raiseHandButton) &&\n /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (\n <RaiseHand\n displayType={options.displayType}\n styles={commonButtonStyles}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton)}\n />\n )\n }\n {\n /* @conditional-compile-remove(dtmf-dialer) */ showDtmfDialerButton(options) &&\n props.onSetDialpadPage !== undefined && (\n <DtmfDialpadButton\n styles={commonButtonStyles}\n displayType={options.displayType}\n onClick={() => {\n if (props.onSetDialpadPage !== undefined) {\n props.onSetDialpadPage();\n }\n }}\n />\n )\n }\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options.screenShareButton}\n displayType={options.displayType}\n styles={screenShareButtonStyles}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.screenShareButton)}\n />\n )}\n {customButtons['primary']\n ?.slice(\n 0,\n props.mobileView\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`primary-custom-button-${i}`}\n styles={commonButtonStyles}\n showLabel={options.displayType !== 'compact'}\n disableTooltip={props.mobileView}\n />\n );\n })}\n {props.mobileView && (\n <MoreButton\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n onClick={props.onMoreButtonClicked}\n disabled={props.disableButtonsForLobbyPage}\n disableTooltip={props.mobileView}\n />\n )}\n {!props.mobileView && showDesktopMoreButton && (\n <DesktopMoreButton\n disableButtonsForHoldScreen={props.disableButtonsForHoldScreen}\n styles={commonButtonStyles}\n /*@conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={props.onClickShowDialpad}\n /* @conditional-compile-remove(control-bar-button-injection) */\n callControls={props.callControls}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={props.isCaptionsSupported}\n /* @conditional-compile-remove(close-captions) */\n onCaptionsSettingsClick={openCaptionsSettingsModal}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetOverflowGalleryPositionChange={props.onUserSetOverflowGalleryPositionChange}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayout={props.onUserSetGalleryLayout}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout={props.userSetGalleryLayout}\n /* @conditional-compile-remove(dtmf-dialer) */\n dtmfDialerPresent={props.dtmfDialerPresent}\n /* @conditional-compile-remove(dtmf-dialer) */\n onSetDialpadPage={props.onSetDialpadPage}\n />\n )}\n <EndCall displayType=\"compact\" styles={endCallButtonStyles} />\n </ControlBar>\n </div>\n </Stack.Item>\n </Stack>\n </CallAdapterProvider>\n </Stack.Item>\n {!props.mobileView && sideButtonsPresent && (\n <Stack.Item>\n <div ref={sidepaneControlsRef}>\n <Stack horizontal className={!props.mobileView ? mergeStyles(desktopButtonContainerStyle) : undefined}>\n {isEnabled(options?.peopleButton) && (\n <PeopleButton\n checked={props.peopleButtonChecked}\n ariaLabel={\n props.peopleButtonChecked ? peopleButtonStrings?.selectedLabel : peopleButtonStrings?.label\n }\n showLabel={options.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"common-call-composite-people-button\"\n disabled={\n props.disableButtonsForLobbyPage ||\n props.disableButtonsForHoldScreen ||\n isDisabled(options.peopleButton)\n }\n strings={peopleButtonStrings}\n styles={commonButtonStyles}\n componentRef={props.peopleButtonRef}\n />\n )}\n {customButtons['secondary']\n ?.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS)\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`secondary-custom-button-${i}`}\n styles={commonButtonStyles}\n showLabel={options.displayType !== 'compact'}\n />\n );\n })}\n </Stack>\n </div>\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\nconst desktopButtonContainerStyle: IStyle = {\n padding: '0.75rem',\n columnGap: '0.5rem'\n};\n\nconst desktopControlBarStyles: BaseCustomStyles = {\n root: desktopButtonContainerStyle\n};\n\n{\n /*\n Styling here to ensure the control bar buttons stay in the center of the parent component (control Container) regardless of its siblings\n Need to add 'reversed' to parent container because the styling here reverse the position of the two stack items \n */\n}\nconst wrapperDesktopStyles: IStyle = {\n position: 'absolute',\n left: '50%',\n transform: 'translate(-50%, 0)'\n};\n\nconst wrapperDesktopRtlStyles: IStyle = {\n position: 'absolute',\n right: '50%',\n transform: 'translate(-50%, 0)'\n};\n\n/** @private */\nexport const getDesktopCommonButtonStyles = (theme: ITheme): ControlBarButtonStyles => ({\n root: {\n border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,\n borderRadius: theme.effects.roundedCorner4,\n minHeight: '2.5rem',\n maxWidth: '12rem' // allot extra space than the regular ControlBarButton. This is to give extra room to have the icon beside the text.\n },\n flexContainer: {\n display: 'flex',\n flexFlow: 'row nowrap'\n },\n textContainer: {\n // Override the default so that label doesn't introduce a new block.\n display: 'inline',\n\n // Ensure width is set to permit child to show ellipsis when there is a label that is too long\n maxWidth: '100%'\n },\n label: {\n fontSize: theme.fonts.medium.fontSize,\n\n // Ensure there is enough space between the icon and text to allow for the unread messages badge in the chat button\n marginLeft: '0.625rem',\n\n // Ensure letters that go above and below the standard text line like 'g', 'y', 'j' are not clipped\n lineHeight: '1.5rem',\n\n // Do not allow very long button texts to ruin the control bar experience, instead ensure long text is truncated and shows ellipsis\n display: 'block',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n splitButtonMenuButton: {\n border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,\n borderTopRightRadius: theme.effects.roundedCorner4,\n borderBottomRightRadius: theme.effects.roundedCorner4,\n borderTopLeftRadius: '0',\n borderBottomLeftRadius: '0'\n },\n splitButtonMenuButtonChecked: {\n // Default colors the menu half similarly for :hover and when button is checked.\n // To align with how the left-half is styled, override the checked style.\n background: 'none'\n }\n});\n\nconst getDesktopScreenShareButtonStyles = (theme: ITheme): ControlBarButtonStyles => {\n const overrideStyles = {\n border: 'none',\n background: theme.palette.themePrimary,\n color: theme.palette.white,\n '* > svg': { fill: theme.palette.white },\n '@media (forced-colors: active)': {\n border: '1px solid',\n borderColor: theme.palette.black\n }\n };\n const overrides: ControlBarButtonStyles = {\n rootChecked: overrideStyles,\n rootCheckedHovered: overrideStyles\n };\n return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);\n};\n\nconst getDesktopEndCallButtonStyles = (theme: ITheme): ControlBarButtonStyles => {\n const overrides: ControlBarButtonStyles = {\n root: {\n // Suppress border around the dark-red button.\n border: 'none'\n },\n rootFocused: {\n '@media (forced-colors: active)': {\n background: 'highlight',\n color: 'highlightText',\n borderColor: theme.palette.black,\n borderRadius: 'unset',\n outline: `3px solid ${theme.palette.black}`\n }\n },\n icon: {\n '@media (forced-colors: active)': {\n ':focused': {\n color: theme.palette.white\n }\n }\n }\n };\n return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/* @conditional-compile-remove(dtmf-dialer) */\nconst showDtmfDialerButton = (options: CommonCallControlOptions | CallWithChatControlOptions): boolean => {\n if (options.moreButton === false && options.dtmfDialerButton !== false) {\n return true;\n } else {\n return false;\n }\n};\n"]}
1
+ {"version":3,"file":"CommonCallControlBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/ControlBar/CommonCallControlBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,eAAe,EAIf,WAAW,EACX,cAAc,EACd,KAAK,EACL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,mEAAmE,CAA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AM,EAAE,MAAM;SACf;QACD,WAAW,EAAE;YACX,gCAAgC,EAAE;gBAChC,UAAU,EAAE,WAAW;gBACvB,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;gBAChC,YAAY,EAAE,OAAO;gBACrB,OAAO,EAAE,aAAa,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE;aAC5C;SACF;QACD,IAAI,EAAE;YACJ,gCAAgC,EAAE;gBAChC,UAAU,EAAE;oBACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;iBAC3B;aACF;SACF;KACF,CAAC;IACF,OAAO,eAAe,CAAC,4BAA4B,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,8CAA8C;AAC9C,MAAM,oBAAoB,GAAG,CAAC,OAA8D,EAAW,EAAE;IACvG,IAAI,OAAO,CAAC,UAAU,KAAK,KAAK,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,EAAE,CAAC;QACvE,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useMemo, useRef, useEffect, useState, useCallback } from 'react';\nimport { CallAdapterProvider } from '../../CallComposite/adapter/CallAdapterProvider';\nimport { CallAdapter } from '../../CallComposite';\nimport { PeopleButton } from './PeopleButton';\nimport {\n concatStyleSets,\n IButton,\n IStyle,\n ITheme,\n mergeStyles,\n mergeStyleSets,\n Stack,\n useTheme\n} from '@fluentui/react';\nimport { controlBarContainerStyles } from '../../CallComposite/styles/CallControls.styles';\nimport { callControlsContainerStyles } from '../../CallComposite/styles/CallPage.styles';\nimport { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport { ControlBar } from '@internal/react-components';\nimport { Microphone } from '../../CallComposite/components/buttons/Microphone';\nimport { Camera } from '../../CallComposite/components/buttons/Camera';\nimport { ScreenShare } from '../../CallComposite/components/buttons/ScreenShare';\nimport { EndCall } from '../../CallComposite/components/buttons/EndCall';\nimport { MoreButton } from '../MoreButton';\nimport { ContainerRectProps } from '../ContainerRectProps';\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallControlBarButton,\n onFetchCustomButtonPropsTrampoline\n} from './CustomButton';\n/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */\nimport { DesktopMoreButton } from './DesktopMoreButton';\nimport { isDisabled } from '../../CallComposite/utils';\nimport { HiddenFocusStartPoint } from '../HiddenFocusStartPoint';\nimport { CallWithChatControlOptions } from '../../CallWithChatComposite';\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsSettingsModal } from '../CaptionsSettingsModal';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHand } from '../../CallComposite/components/buttons/RaiseHand';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '../../CallComposite/components/buttons/Reaction';\n/* @conditional-compile-remove(reaction) */\nimport { useSelector } from '../../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(reaction) */\nimport { capabilitySelector } from '../../CallComposite/selectors/capabilitySelector';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { DtmfDialpadButton } from './DtmfDialerButton';\n/**\n * @private\n */\nexport interface CommonCallControlBarProps {\n callAdapter: CallAdapter;\n peopleButtonChecked: boolean;\n onPeopleButtonClicked: () => void;\n onMoreButtonClicked?: () => void;\n mobileView: boolean;\n disableButtonsForLobbyPage: boolean;\n callControls?: boolean | CommonCallControlOptions | CallWithChatControlOptions;\n disableButtonsForHoldScreen?: boolean;\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad?: () => void;\n /* @conditional-compile-remove(video-background-effects) */\n onClickVideoEffects?: (showVideoEffects: boolean) => void;\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported?: boolean;\n /* @conditional-compile-remove(close-captions) */\n isCaptionsOn?: boolean;\n displayVertical?: boolean;\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetOverflowGalleryPositionChange?: (position: 'Responsive' | 'horizontalTop') => void;\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayout?: (layout: VideoGalleryLayout) => void;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout?: VideoGalleryLayout;\n peopleButtonRef?: React.RefObject<IButton>;\n cameraButtonRef?: React.RefObject<IButton>;\n /* @conditional-compile-remove(video-background-effects) */\n videoBackgroundPickerRef?: React.RefObject<IButton>;\n /* @conditional-compile-remove(dtmf-dialer) */\n onSetDialpadPage?: () => void;\n /* @conditional-compile-remove(dtmf-dialer) */\n dtmfDialerPresent?: boolean;\n}\n\nconst inferCommonCallControlOptions = (\n mobileView: boolean,\n commonCallControlOptions?: boolean | CallWithChatControlOptions\n): CallWithChatControlOptions | false => {\n if (commonCallControlOptions === false) {\n return false;\n }\n\n const options =\n commonCallControlOptions === true || commonCallControlOptions === undefined ? {} : commonCallControlOptions;\n if (mobileView) {\n // Set to compressed mode when composite is optimized for mobile\n options.displayType = 'compact';\n // Set options to always not show screen share button for mobile\n options.screenShareButton = false;\n }\n return options;\n};\n\n/**\n * @private\n */\nexport const CommonCallControlBar = (props: CommonCallControlBarProps & ContainerRectProps): JSX.Element => {\n const theme = useTheme();\n const rtl = theme.rtl;\n\n const controlBarContainerRef = useRef<HTMLHeadingElement>(null);\n const sidepaneControlsRef = useRef<HTMLHeadingElement>(null);\n const controlBarSizeRef = useRef<HTMLHeadingElement>(null);\n\n const [controlBarButtonsWidth, setControlBarButtonsWidth] = useState(0);\n const [panelsButtonsWidth, setPanelsButtonsWidth] = useState(0);\n const [controlBarContainerWidth, setControlBarContainerWidth] = useState(0);\n\n const [totalButtonsWidth, setTotalButtonsWidth] = useState(0);\n const [isOutOfSpace, setIsOutOfSpace] = useState(false);\n\n const callWithChatStrings = useCallWithChatCompositeStrings();\n const options = inferCommonCallControlOptions(props.mobileView, props.callControls);\n\n /* @conditional-compile-remove(close-captions) */\n const [showCaptionsSettingsModal, setShowCaptionsSettingsModal] = useState(false);\n\n const handleResize = useCallback((): void => {\n setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);\n setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);\n setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);\n }, []);\n\n // on load set inital width\n useEffect(() => {\n setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);\n setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);\n setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);\n }, []);\n\n // get the current width of control bar buttons and panel control buttons when browser size change\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [handleResize]);\n\n /* when size change, reset total buttons width and compare with the control bar container width\n if the total width of those buttons exceed container width, do not center the control bar buttons based on parent container width\n Instead let them take up the remaining white space on the left */\n useEffect(() => {\n // white space on the left when control bar buttons are centered based on container width + control bar buttons width + panel control buttons width\n setTotalButtonsWidth(\n (controlBarContainerWidth - controlBarButtonsWidth) / 2 + controlBarButtonsWidth + panelsButtonsWidth\n );\n }, [controlBarButtonsWidth, panelsButtonsWidth, controlBarContainerWidth]);\n\n useEffect(() => {\n setIsOutOfSpace(totalButtonsWidth > controlBarContainerWidth);\n }, [totalButtonsWidth, controlBarContainerWidth]);\n\n /* @conditional-compile-remove(close-captions) */\n const openCaptionsSettingsModal = useCallback((): void => {\n setShowCaptionsSettingsModal(true);\n }, []);\n /* @conditional-compile-remove(close-captions) */\n const onDismissCaptionsSettings = useCallback((): void => {\n setShowCaptionsSettingsModal(false);\n }, []);\n const peopleButtonStrings = useMemo(\n () => ({\n label: callWithChatStrings.peopleButtonLabel,\n selectedLabel: callWithChatStrings.selectedPeopleButtonLabel,\n tooltipOffContent: callWithChatStrings.peopleButtonTooltipOpen,\n tooltipOnContent: callWithChatStrings.peopleButtonTooltipClose\n }),\n [callWithChatStrings]\n );\n const moreButtonStrings = useMemo(\n () => ({\n label: callWithChatStrings.moreDrawerButtonLabel,\n tooltipContent: callWithChatStrings.moreDrawerButtonTooltip\n }),\n [callWithChatStrings]\n );\n\n const centerContainerStyles = useMemo(() => {\n const styles: BaseCustomStyles = !props.mobileView ? desktopControlBarStyles : {};\n return mergeStyleSets(styles, {\n root: {\n // Enforce a background color on control bar to ensure it matches the composite background color.\n background: theme.semanticColors.bodyBackground\n }\n });\n }, [props.mobileView, theme.semanticColors.bodyBackground]);\n const screenShareButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopScreenShareButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n const commonButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopCommonButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n const endCallButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopEndCallButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n\n const controlBarWrapperDesktopStyles: IStyle = useMemo(\n // only center control bar buttons based on parent container if there are enough space on the screen and not mobile\n () => (!props.mobileView && !isOutOfSpace ? (rtl ? wrapperDesktopRtlStyles : wrapperDesktopStyles) : {}),\n [props.mobileView, rtl, isOutOfSpace]\n );\n\n // only center control bar buttons based on parent container if there are enough space on the screen and not mobile\n const controlBarDesktopContainerStyles: IStyle = useMemo(\n () => (!props.mobileView && !isOutOfSpace ? { position: 'relative', minHeight: '4.5rem', width: '100%' } : {}),\n [props.mobileView, isOutOfSpace]\n );\n\n const customButtons = useMemo(\n () =>\n generateCustomCallControlBarButton(\n onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined),\n options !== false ? options?.displayType : undefined\n ),\n [options]\n );\n\n /* @conditional-compile-remove(reaction) */\n const capabilitiesSelector = useSelector(capabilitySelector);\n /* @conditional-compile-remove(reaction) */\n const isReactionAllowed =\n !capabilitiesSelector?.capabilities || capabilitiesSelector.capabilities.useReactions.isPresent;\n\n // when options is false then we want to hide the whole control bar.\n if (options === false) {\n return <></>;\n }\n\n const sideButtonsPresent =\n isEnabled(options.peopleButton) || isEnabled(options.chatButton) || customButtons['secondary'] !== undefined;\n\n const screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n\n const microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n\n const cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n\n const showDesktopMoreButton =\n /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ isEnabled(\n options?.moreButton\n ) &&\n (false ||\n /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(\n options?.holdButton\n ) ||\n /* @conditional-compile-remove(close-captions) */ props.isCaptionsSupported ||\n /* @conditional-compile-remove(gallery-layouts) */ props.onUserSetGalleryLayout);\n\n /*@conditional-compile-remove(rooms) */\n const role = props.callAdapter.getState().call?.role;\n /*@conditional-compile-remove(rooms) */\n const hideRaiseHandButtonInRoomsCall =\n props.callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);\n /*@conditional-compile-remove(reaction) */\n const reactionResources = props.callAdapter.getState().reactions;\n\n return (\n <div ref={controlBarSizeRef}>\n <CallAdapterProvider adapter={props.callAdapter}>\n {\n /* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (\n <CaptionsSettingsModal\n showCaptionsSettingsModal={showCaptionsSettingsModal}\n onDismissCaptionsSettings={onDismissCaptionsSettings}\n changeCaptionLanguage={props.isCaptionsOn}\n />\n )\n }\n </CallAdapterProvider>\n <Stack\n horizontal\n reversed={!props.mobileView && !isOutOfSpace}\n horizontalAlign=\"space-between\"\n className={mergeStyles(\n callControlsContainerStyles,\n controlBarContainerStyles,\n controlBarDesktopContainerStyles\n )}\n >\n <Stack.Item grow className={mergeStyles(controlBarWrapperDesktopStyles)}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <Stack horizontalAlign=\"center\">\n {/*\n HiddenFocusStartPoint is a util component used when we can't ensure the initial element for first\n tab focus is at the top of dom tree. It moves the first-tab focus to the next interact-able element\n immediately after it in the dom tree.\n */}\n <HiddenFocusStartPoint />\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <div ref={controlBarContainerRef}>\n <ControlBar layout={props.displayVertical ? 'vertical' : 'horizontal'} styles={centerContainerStyles}>\n {microphoneButtonIsEnabled && (\n <Microphone\n displayType={options.displayType}\n styles={commonButtonStyles}\n splitButtonsForDeviceSelection={!props.mobileView}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton)}\n disableTooltip={props.mobileView}\n />\n )}\n {cameraButtonIsEnabled && (\n <Camera\n displayType={options.displayType}\n styles={commonButtonStyles}\n splitButtonsForDeviceSelection={!props.mobileView}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.cameraButton)}\n /* @conditional-compile-remove(video-background-effects) */\n onClickVideoEffects={props.onClickVideoEffects}\n componentRef={props.cameraButtonRef}\n disableTooltip={props.mobileView}\n />\n )}\n {\n /* @conditional-compile-remove(reaction) */\n !props.mobileView &&\n isReactionAllowed &&\n isEnabled(options.reactionButton) &&\n reactionResources && (\n <Reaction\n displayType={options.displayType}\n styles={commonButtonStyles}\n disabled={props.disableButtonsForHoldScreen}\n reactionResource={reactionResources}\n />\n )\n }\n {\n /* @conditional-compile-remove(raise-hand) */ !props.mobileView &&\n isEnabled(options.raiseHandButton) &&\n /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (\n <RaiseHand\n displayType={options.displayType}\n styles={commonButtonStyles}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton)}\n />\n )\n }\n {\n /* @conditional-compile-remove(dtmf-dialer) */ showDtmfDialerButton(options) &&\n props.onSetDialpadPage !== undefined && (\n <DtmfDialpadButton\n styles={commonButtonStyles}\n displayType={options.displayType}\n onClick={() => {\n if (props.onSetDialpadPage !== undefined) {\n props.onSetDialpadPage();\n }\n }}\n />\n )\n }\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options.screenShareButton}\n displayType={options.displayType}\n styles={screenShareButtonStyles}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.screenShareButton)}\n />\n )}\n {customButtons['primary']\n ?.slice(\n 0,\n props.mobileView\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`primary-custom-button-${i}`}\n styles={commonButtonStyles}\n showLabel={options.displayType !== 'compact'}\n disableTooltip={props.mobileView}\n />\n );\n })}\n {props.mobileView && (\n <MoreButton\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n onClick={props.onMoreButtonClicked}\n disabled={props.disableButtonsForLobbyPage}\n disableTooltip={props.mobileView}\n />\n )}\n {!props.mobileView && showDesktopMoreButton && (\n <DesktopMoreButton\n disableButtonsForHoldScreen={props.disableButtonsForHoldScreen}\n styles={commonButtonStyles}\n /*@conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={props.onClickShowDialpad}\n /* @conditional-compile-remove(control-bar-button-injection) */\n callControls={props.callControls}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={props.isCaptionsSupported}\n /* @conditional-compile-remove(close-captions) */\n onCaptionsSettingsClick={openCaptionsSettingsModal}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetOverflowGalleryPositionChange={props.onUserSetOverflowGalleryPositionChange}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayout={props.onUserSetGalleryLayout}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout={props.userSetGalleryLayout}\n /* @conditional-compile-remove(dtmf-dialer) */\n dtmfDialerPresent={props.dtmfDialerPresent}\n /* @conditional-compile-remove(dtmf-dialer) */\n onSetDialpadPage={props.onSetDialpadPage}\n />\n )}\n <EndCall displayType=\"compact\" styles={endCallButtonStyles} />\n </ControlBar>\n </div>\n </Stack.Item>\n </Stack>\n </CallAdapterProvider>\n </Stack.Item>\n {!props.mobileView && sideButtonsPresent && (\n <Stack.Item>\n <div ref={sidepaneControlsRef}>\n <Stack horizontal className={!props.mobileView ? mergeStyles(desktopButtonContainerStyle) : undefined}>\n {isEnabled(options?.peopleButton) && (\n <PeopleButton\n checked={props.peopleButtonChecked}\n ariaLabel={\n props.peopleButtonChecked ? peopleButtonStrings?.selectedLabel : peopleButtonStrings?.label\n }\n showLabel={options.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"common-call-composite-people-button\"\n disabled={\n props.disableButtonsForLobbyPage ||\n props.disableButtonsForHoldScreen ||\n isDisabled(options.peopleButton)\n }\n strings={peopleButtonStrings}\n styles={commonButtonStyles}\n componentRef={props.peopleButtonRef}\n />\n )}\n {customButtons['secondary']\n ?.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS)\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`secondary-custom-button-${i}`}\n styles={commonButtonStyles}\n showLabel={options.displayType !== 'compact'}\n />\n );\n })}\n </Stack>\n </div>\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\nconst desktopButtonContainerStyle: IStyle = {\n padding: '0.75rem',\n columnGap: '0.5rem'\n};\n\nconst desktopControlBarStyles: BaseCustomStyles = {\n root: desktopButtonContainerStyle\n};\n\n{\n /*\n Styling here to ensure the control bar buttons stay in the center of the parent component (control Container) regardless of its siblings\n Need to add 'reversed' to parent container because the styling here reverse the position of the two stack items \n */\n}\nconst wrapperDesktopStyles: IStyle = {\n position: 'absolute',\n left: '50%',\n transform: 'translate(-50%, 0)'\n};\n\nconst wrapperDesktopRtlStyles: IStyle = {\n position: 'absolute',\n right: '50%',\n transform: 'translate(-50%, 0)'\n};\n\n/** @private */\nexport const getDesktopCommonButtonStyles = (theme: ITheme): ControlBarButtonStyles => ({\n root: {\n border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,\n borderRadius: theme.effects.roundedCorner4,\n minHeight: '2.5rem',\n maxWidth: '12rem' // allot extra space than the regular ControlBarButton. This is to give extra room to have the icon beside the text.\n },\n flexContainer: {\n display: 'flex',\n flexFlow: 'row nowrap'\n },\n textContainer: {\n // Override the default so that label doesn't introduce a new block.\n display: 'inline',\n\n // Ensure width is set to permit child to show ellipsis when there is a label that is too long\n maxWidth: '100%'\n },\n label: {\n fontSize: theme.fonts.medium.fontSize,\n\n // Ensure there is enough space between the icon and text to allow for the unread messages badge in the chat button\n marginLeft: '0.625rem',\n\n // Ensure letters that go above and below the standard text line like 'g', 'y', 'j' are not clipped\n lineHeight: '1.5rem',\n\n // Do not allow very long button texts to ruin the control bar experience, instead ensure long text is truncated and shows ellipsis\n display: 'block',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n splitButtonMenuButton: {\n border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,\n borderTopRightRadius: theme.effects.roundedCorner4,\n borderBottomRightRadius: theme.effects.roundedCorner4,\n borderTopLeftRadius: '0',\n borderBottomLeftRadius: '0'\n },\n splitButtonMenuButtonChecked: {\n // Default colors the menu half similarly for :hover and when button is checked.\n // To align with how the left-half is styled, override the checked style.\n background: 'none'\n }\n});\n\nconst getDesktopScreenShareButtonStyles = (theme: ITheme): ControlBarButtonStyles => {\n const overrideStyles = {\n border: 'none',\n background: theme.palette.themePrimary,\n color: theme.palette.white,\n '* > svg': { fill: theme.palette.white },\n '@media (forced-colors: active)': {\n border: '1px solid',\n borderColor: theme.palette.black\n }\n };\n const overrides: ControlBarButtonStyles = {\n rootChecked: overrideStyles,\n rootCheckedHovered: overrideStyles\n };\n return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);\n};\n\nconst getDesktopEndCallButtonStyles = (theme: ITheme): ControlBarButtonStyles => {\n const overrides: ControlBarButtonStyles = {\n root: {\n // Suppress border around the dark-red button.\n border: 'none'\n },\n rootFocused: {\n '@media (forced-colors: active)': {\n background: 'highlight',\n color: 'highlightText',\n borderColor: theme.palette.black,\n borderRadius: 'unset',\n outline: `3px solid ${theme.palette.black}`\n }\n },\n icon: {\n '@media (forced-colors: active)': {\n ':focused': {\n color: theme.palette.white\n }\n }\n }\n };\n return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/* @conditional-compile-remove(dtmf-dialer) */\nconst showDtmfDialerButton = (options: CommonCallControlOptions | CallWithChatControlOptions): boolean => {\n if (options.moreButton === false && options.dtmfDialerButton !== false) {\n return true;\n } else {\n return false;\n }\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.12.1-alpha-202401260012",
3
+ "version": "1.12.1-alpha-202401280013",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- /** @private */
3
- export interface SendDtmfDialpadStrings {
4
- dialpadModalAriaLabel: string;
5
- dialpadCloseModalButtonAriaLabel: string;
6
- placeholderText: string;
7
- }
8
- /** @private */
9
- export interface SendDtmfDialpadProps {
10
- isMobile: boolean;
11
- showDialpad: boolean;
12
- strings: SendDtmfDialpadStrings;
13
- onDismissDialpad: () => void;
14
- }
15
- /** @private */
16
- export declare const SendDtmfDialpad: (props: SendDtmfDialpadProps) => JSX.Element;
17
- //# sourceMappingURL=SendDtmfDialpad.d.ts.map
@@ -1,42 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useState } from 'react';
4
- import { useMemo } from 'react';
5
- import { Dialpad } from "../../../../react-components/src";
6
- import { _DrawerSurface } from "../../../../react-components/src";
7
- import { Modal, Stack, useTheme, IconButton } from '@fluentui/react';
8
- import { themeddialpadModalStyle, themedDialpadStyle } from './SendDtmfDialpad.styles';
9
- import { usePropsFor } from '../CallComposite/hooks/usePropsFor';
10
- import { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';
11
- /** @private */
12
- export const SendDtmfDialpad = (props) => {
13
- const dialpadProps = usePropsFor(Dialpad);
14
- const { strings, isMobile, showDialpad, onDismissDialpad } = props;
15
- const theme = useTheme();
16
- const onDismissTriggered = () => {
17
- onDismissDialpad();
18
- };
19
- const [textFieldValue, setTextFieldValue] = useState();
20
- const onChange = (input) => {
21
- if (input.length > 25) {
22
- setTextFieldValue(input.slice(1));
23
- }
24
- else {
25
- setTextFieldValue(input);
26
- }
27
- };
28
- const dialpadModalStyle = useMemo(() => themeddialpadModalStyle(theme), [theme]);
29
- const dialpadStyle = useMemo(() => themedDialpadStyle(isMobile, theme), [theme, isMobile]);
30
- if (isMobile) {
31
- return (React.createElement(Stack, null, showDialpad && (React.createElement(Stack, { styles: drawerContainerStyles() },
32
- React.createElement(_DrawerSurface, { disableMaxHeight: true, onLightDismiss: onDismissTriggered },
33
- React.createElement(Stack, { style: { padding: '1rem' } },
34
- React.createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, textFieldValue: textFieldValue, onChange: onChange, strings: strings, isMobile: isMobile }))))))));
35
- }
36
- return (React.createElement(React.Fragment, null, React.createElement(Modal, { titleAriaId: strings.dialpadModalAriaLabel, isOpen: showDialpad, onDismiss: onDismissTriggered, isBlocking: true, styles: dialpadModalStyle },
37
- React.createElement(Stack, { horizontal: true, horizontalAlign: "end", verticalAlign: "center" },
38
- React.createElement(IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings.dialpadCloseModalButtonAriaLabel, onClick: onDismissTriggered, style: { color: theme.palette.black } })),
39
- React.createElement(Stack, { style: { overflow: 'hidden' } },
40
- React.createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { textFieldValue: textFieldValue, onChange: onChange, showDeleteButton: false, strings: strings, isMobile: isMobile }))))));
41
- };
42
- //# sourceMappingURL=SendDtmfDialpad.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SendDtmfDialpad.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/SendDtmfDialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAiB,yCAAmC;AACpE,OAAO,EAAqC,cAAc,EAAE,yCAAmC;AAC/F,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iB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the MIT License.\n\nimport React, { useState } from 'react';\nimport { useMemo } from 'react';\nimport { Dialpad, DialpadStyles } from '@internal/react-components';\nimport { _DrawerMenu, _DrawerMenuItemProps, _DrawerSurface } from '@internal/react-components';\nimport { IModalStyles, Modal, Stack, useTheme, IconButton } from '@fluentui/react';\n\nimport { themeddialpadModalStyle, themedDialpadStyle } from './SendDtmfDialpad.styles';\nimport { usePropsFor } from '../CallComposite/hooks/usePropsFor';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n\n/** @private */\nexport interface SendDtmfDialpadStrings {\n dialpadModalAriaLabel: string;\n dialpadCloseModalButtonAriaLabel: string;\n placeholderText: string;\n}\n\n/** @private */\nexport interface SendDtmfDialpadProps {\n isMobile: boolean;\n showDialpad: boolean;\n strings: SendDtmfDialpadStrings;\n onDismissDialpad: () => void;\n}\n\n/** @private */\nexport const SendDtmfDialpad = (props: SendDtmfDialpadProps): JSX.Element => {\n const dialpadProps = usePropsFor(Dialpad);\n\n const { strings, isMobile, showDialpad, onDismissDialpad } = props;\n\n const theme = useTheme();\n\n const onDismissTriggered = (): void => {\n onDismissDialpad();\n };\n\n const [textFieldValue, setTextFieldValue] = useState<string>();\n\n const onChange = (input: string): void => {\n if (input.length > 25) {\n setTextFieldValue(input.slice(1));\n } else {\n setTextFieldValue(input);\n }\n };\n\n const dialpadModalStyle: Partial<IModalStyles> = useMemo(() => themeddialpadModalStyle(theme), [theme]);\n\n const dialpadStyle: Partial<DialpadStyles> = useMemo(() => themedDialpadStyle(isMobile, theme), [theme, isMobile]);\n\n if (isMobile) {\n return (\n <Stack>\n {showDialpad && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerSurface disableMaxHeight={true} onLightDismiss={onDismissTriggered}>\n <Stack style={{ padding: '1rem' }}>\n <Dialpad\n styles={dialpadStyle}\n {...dialpadProps}\n showDeleteButton={false}\n textFieldValue={textFieldValue}\n onChange={onChange}\n strings={strings}\n isMobile={isMobile}\n />\n </Stack>\n </_DrawerSurface>\n </Stack>\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Modal\n titleAriaId={strings.dialpadModalAriaLabel}\n isOpen={showDialpad}\n onDismiss={onDismissTriggered}\n isBlocking={true}\n styles={dialpadModalStyle}\n >\n <Stack horizontal horizontalAlign=\"end\" verticalAlign=\"center\">\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings.dialpadCloseModalButtonAriaLabel}\n onClick={onDismissTriggered}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n\n <Stack style={{ overflow: 'hidden' }}>\n <Dialpad\n styles={dialpadStyle}\n {...dialpadProps}\n textFieldValue={textFieldValue}\n onChange={onChange}\n showDeleteButton={false}\n strings={strings}\n isMobile={isMobile}\n />\n </Stack>\n </Modal>\n }\n </>\n );\n};\n"]}
@@ -1,11 +0,0 @@
1
- import { IModalStyles, Theme } from '@fluentui/react';
2
- import { DialpadStyles } from "../../../../react-components/src";
3
- /**
4
- * @private
5
- */
6
- export declare const themeddialpadModalStyle: (theme: Theme) => Partial<IModalStyles>;
7
- /**
8
- * @private
9
- */
10
- export declare const themedDialpadStyle: (isMobile: boolean, theme: Theme) => Partial<DialpadStyles>;
11
- //# sourceMappingURL=SendDtmfDialpad.styles.d.ts.map