@azure/communication-react 1.23.0-alpha-202501120018 → 1.23.0-alpha-202501160016
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +82 -21
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BbYciITo.js → ChatMessageComponentAsRichTextEditBox-R5C_P0J9.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BbYciITo.js.map → ChatMessageComponentAsRichTextEditBox-R5C_P0J9.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CcLqgWsO.js → RichTextSendBoxWrapper-D0KlP9qO.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CcLqgWsO.js.map → RichTextSendBoxWrapper-D0KlP9qO.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-CuxcFFWR.js → index-iq0jAnxX.js} +527 -34
- package/dist/dist-cjs/communication-react/index-iq0jAnxX.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +44 -8
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +42 -13
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +12 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/RealTimeText.js +2 -2
- package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +5 -2
- package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +123 -0
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js +85 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.d.ts +24 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +53 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +61 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.d.ts +89 -0
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js +173 -0
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.d.ts +8 -0
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js +25 -0
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +6 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-CuxcFFWR.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.23.0-alpha-
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.23.0-alpha-202501160016';\n"]}
|
@@ -109,4 +109,5 @@ export type { CaptionsBannerProps, CaptionsInformation, CaptionsBannerStrings }
|
|
109
109
|
export { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';
|
110
110
|
export { StartCaptionsButton } from '../../react-components/src/components/StartCaptionsButton';
|
111
111
|
export type { StartCaptionsButtonProps, StartCaptionsButtonStrings } from '../../react-components/src/components/StartCaptionsButton';
|
112
|
+
export type { RealTimeTextInformation } from '../../react-components/src/components/CaptionsBanner';
|
112
113
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAwCzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AA2B9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,4BAA4B,C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AAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAOnE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type {\n DeepNoiseSuppressionEffectDependency,\n VideoBackgroundEffectsDependency,\n CallingHandlersOptions\n} from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers,\n CaptionSettingsSelector,\n CaptionsBannerSelector,\n StartCaptionsButtonSelector\n} from '../../calling-component-bindings/src';\n\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_CY_GB,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_ES_MX,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_FR_CA,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n IncomingCallStackCall\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(together-mode) */\nexport type {\n TogetherModeStreamViewResult,\n VideoGalleryTogetherModeStreams,\n VideoGalleryTogetherModeParticipantPosition,\n VideoGalleryTogetherModeSeatingInfo,\n TogetherModeStreamOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite,\n ReactionButtonReaction\n} from '../../react-components/src';\n\nexport { ReactionButton } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextEditBoxOptions } from '../../react-components/src';\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n\nexport { NotificationStack, Notification } from '../../react-components/src';\n\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification,\n NotificationStyles\n} from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RealTimeTextModalStrings, RealTimeTextModalProps } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RealTimeTextModal } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RealTimeTextProps, RealTimeTextStrings } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(rtt) */\nexport { RealTimeText } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(rtt) */\nexport { StartRealTimeTextButton } from '../../react-components/src/components/StartRealTimeTextButton';\n/* @conditional-compile-remove(rtt) */\nexport type {\n StartRealTimeTextButtonProps,\n StartRealTimeTextButtonStrings\n} from '../../react-components/src/components/StartRealTimeTextButton';\n/* @conditional-compile-remove(media-access) */\nexport type { MediaAccess } from '../../react-components/src';\nexport type { CaptionsSettingsModalStrings, CaptionsSettingsModalProps } from '../../react-components/src';\nexport { CaptionsSettingsModal } from '../../react-components/src';\nexport type { SupportedCaptionLanguage, SupportedSpokenLanguage, CaptionsOptions } from '../../react-components/src';\nexport type {\n CaptionsBannerProps,\n CaptionsInformation,\n CaptionsBannerStrings\n} from '../../react-components/src/components/CaptionsBanner';\nexport { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';\nexport { StartCaptionsButton } from '../../react-components/src/components/StartCaptionsButton';\nexport type {\n StartCaptionsButtonProps,\n StartCaptionsButtonStrings\n} from '../../react-components/src/components/StartCaptionsButton';\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAwCzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,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jD,OAAO,EACL,kCAAkC,EAClC,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAqJpC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAqC7D,mDAAmD;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAiBzE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAiB1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAiBxE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAc7E,sCAAsC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAClF,sCAAsC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AASxG,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAOnE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type {\n DeepNoiseSuppressionEffectDependency,\n VideoBackgroundEffectsDependency,\n CallingHandlersOptions\n} from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers,\n CaptionSettingsSelector,\n CaptionsBannerSelector,\n StartCaptionsButtonSelector\n} from '../../calling-component-bindings/src';\n\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_CY_GB,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_ES_MX,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_FR_CA,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n IncomingCallStackCall\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(together-mode) */\nexport type {\n TogetherModeStreamViewResult,\n VideoGalleryTogetherModeStreams,\n VideoGalleryTogetherModeParticipantPosition,\n VideoGalleryTogetherModeSeatingInfo,\n TogetherModeStreamOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite,\n ReactionButtonReaction\n} from '../../react-components/src';\n\nexport { ReactionButton } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextEditBoxOptions } from '../../react-components/src';\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n\nexport { NotificationStack, Notification } from '../../react-components/src';\n\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification,\n NotificationStyles\n} from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RealTimeTextModalStrings, RealTimeTextModalProps } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RealTimeTextModal } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RealTimeTextProps, RealTimeTextStrings } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(rtt) */\nexport { RealTimeText } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(rtt) */\nexport { StartRealTimeTextButton } from '../../react-components/src/components/StartRealTimeTextButton';\n/* @conditional-compile-remove(rtt) */\nexport type {\n StartRealTimeTextButtonProps,\n StartRealTimeTextButtonStrings\n} from '../../react-components/src/components/StartRealTimeTextButton';\n/* @conditional-compile-remove(media-access) */\nexport type { MediaAccess } from '../../react-components/src';\nexport type { CaptionsSettingsModalStrings, CaptionsSettingsModalProps } from '../../react-components/src';\nexport { CaptionsSettingsModal } from '../../react-components/src';\nexport type { SupportedCaptionLanguage, SupportedSpokenLanguage, CaptionsOptions } from '../../react-components/src';\nexport type {\n CaptionsBannerProps,\n CaptionsInformation,\n CaptionsBannerStrings\n} from '../../react-components/src/components/CaptionsBanner';\nexport { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';\nexport { StartCaptionsButton } from '../../react-components/src/components/StartCaptionsButton';\nexport type {\n StartCaptionsButtonProps,\n StartCaptionsButtonStrings\n} from '../../react-components/src/components/StartCaptionsButton';\n/* @conditional-compile-remove(rtt) */\nexport type { RealTimeTextInformation } from '../../react-components/src/components/CaptionsBanner';\n"]}
|
@@ -22,17 +22,45 @@ export type CaptionsInformation = {
|
|
22
22
|
*/
|
23
23
|
userId?: string;
|
24
24
|
/**
|
25
|
-
*
|
25
|
+
* timestamp when the caption was created
|
26
|
+
* Please note that this value is essential for determining the order of captions and real time text messages
|
27
|
+
* If you are using both captions and real time text, please ensure that the createdTimeStamp is populated
|
26
28
|
*/
|
27
|
-
|
29
|
+
createdTimeStamp?: Date;
|
30
|
+
};
|
31
|
+
/**
|
32
|
+
* @beta
|
33
|
+
* information required for each line of real time text
|
34
|
+
*/
|
35
|
+
export type RealTimeTextInformation = {
|
36
|
+
/**
|
37
|
+
* The sequence id of the real time text.
|
38
|
+
*/
|
39
|
+
id: number;
|
40
|
+
/**
|
41
|
+
* sender's display name
|
42
|
+
*/
|
43
|
+
displayName: string;
|
44
|
+
/**
|
45
|
+
* id of the sender
|
46
|
+
*/
|
47
|
+
userId?: string;
|
28
48
|
/**
|
29
|
-
*
|
49
|
+
* The real time text message.
|
30
50
|
*/
|
31
|
-
|
51
|
+
message: string;
|
32
52
|
/**
|
33
|
-
* if the
|
53
|
+
* if the real time text received is partial
|
34
54
|
*/
|
35
|
-
|
55
|
+
isTyping: boolean;
|
56
|
+
/**
|
57
|
+
* If message originated from the local participant
|
58
|
+
*/
|
59
|
+
isMe: boolean;
|
60
|
+
/**
|
61
|
+
* timestamp when the real time text was finalized
|
62
|
+
*/
|
63
|
+
finalizedTimeStamp: Date;
|
36
64
|
};
|
37
65
|
/**
|
38
66
|
* @public
|
@@ -69,6 +97,14 @@ export interface CaptionsBannerProps {
|
|
69
97
|
* Array of captions to be displayed
|
70
98
|
*/
|
71
99
|
captions: CaptionsInformation[];
|
100
|
+
/**
|
101
|
+
* Array of finalized and partial real time text messages
|
102
|
+
*/
|
103
|
+
realTimeTexts?: {
|
104
|
+
completedMessages?: RealTimeTextInformation[];
|
105
|
+
currentInProgress?: RealTimeTextInformation[];
|
106
|
+
myInProgress?: RealTimeTextInformation;
|
107
|
+
};
|
72
108
|
/**
|
73
109
|
* Flag to indicate if captions are on
|
74
110
|
*/
|
@@ -106,11 +142,11 @@ export interface CaptionsBannerProps {
|
|
106
142
|
/**
|
107
143
|
* Optional callback to send real time text.
|
108
144
|
*/
|
109
|
-
onSendRealTimeText?: (text: string, finalized
|
145
|
+
onSendRealTimeText?: (text: string, finalized: boolean) => Promise<void>;
|
110
146
|
/**
|
111
147
|
* Latest local real time text
|
112
148
|
*/
|
113
|
-
latestLocalRealTimeText?:
|
149
|
+
latestLocalRealTimeText?: RealTimeTextInformation;
|
114
150
|
}
|
115
151
|
/**
|
116
152
|
* @public
|
@@ -4,6 +4,8 @@ import { Stack, FocusZone, Spinner, useTheme } from '@fluentui/react';
|
|
4
4
|
/* @conditional-compile-remove(rtt) */
|
5
5
|
import { TextField } from '@fluentui/react';
|
6
6
|
import React, { useEffect, useRef, useState, useCallback } from 'react';
|
7
|
+
/* @conditional-compile-remove(rtt) */
|
8
|
+
import { useMemo } from 'react';
|
7
9
|
import { _Caption } from './Caption';
|
8
10
|
import { captionContainerClassName, captionsBannerClassName, captionsBannerFullHeightClassName, captionsContainerClassName, loadingBannerFullHeightStyles, loadingBannerStyles } from './styles/Captions.style';
|
9
11
|
import { useLocale } from '../localization';
|
@@ -11,6 +13,8 @@ import { useLocale } from '../localization';
|
|
11
13
|
import { RealTimeText } from './RealTimeText';
|
12
14
|
/* @conditional-compile-remove(rtt) */
|
13
15
|
import { _RTTDisclosureBanner } from './RTTDisclosureBanner';
|
16
|
+
/* @conditional-compile-remove(rtt) */
|
17
|
+
import { sortCaptionsAndRealTimeTexts } from './utils/sortCaptionsAndRealTimeTexts';
|
14
18
|
const SCROLL_OFFSET_ALLOWANCE = 20;
|
15
19
|
/**
|
16
20
|
* @public
|
@@ -18,7 +22,9 @@ const SCROLL_OFFSET_ALLOWANCE = 20;
|
|
18
22
|
*/
|
19
23
|
export const CaptionsBanner = (props) => {
|
20
24
|
var _a, _b, _c;
|
21
|
-
const { captions,
|
25
|
+
const { captions,
|
26
|
+
/* @conditional-compile-remove(rtt) */
|
27
|
+
realTimeTexts, isCaptionsOn, startCaptionsInProgress, onRenderAvatar, formFactor = 'default', captionsOptions,
|
22
28
|
/* @conditional-compile-remove(rtt) */
|
23
29
|
isRealTimeTextOn,
|
24
30
|
/* @conditional-compile-remove(rtt) */
|
@@ -30,6 +36,18 @@ export const CaptionsBanner = (props) => {
|
|
30
36
|
const captionsScrollDivRef = useRef(null);
|
31
37
|
const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState(true);
|
32
38
|
const theme = useTheme();
|
39
|
+
/* @conditional-compile-remove(rtt) */
|
40
|
+
// merge realtimetexts and captions into one array based on timestamp
|
41
|
+
// Combine captions and realTimeTexts into one list
|
42
|
+
const combinedList = useMemo(() => {
|
43
|
+
var _a;
|
44
|
+
return sortCaptionsAndRealTimeTexts(captions, (_a = realTimeTexts === null || realTimeTexts === void 0 ? void 0 : realTimeTexts.completedMessages) !== null && _a !== void 0 ? _a : []);
|
45
|
+
}, [captions, realTimeTexts === null || realTimeTexts === void 0 ? void 0 : realTimeTexts.completedMessages]);
|
46
|
+
/* @conditional-compile-remove(rtt) */
|
47
|
+
const mergedCaptions = useMemo(() => {
|
48
|
+
var _a;
|
49
|
+
return [...combinedList, ...((_a = realTimeTexts === null || realTimeTexts === void 0 ? void 0 : realTimeTexts.currentInProgress) !== null && _a !== void 0 ? _a : []), realTimeTexts === null || realTimeTexts === void 0 ? void 0 : realTimeTexts.myInProgress];
|
50
|
+
}, [combinedList, realTimeTexts]);
|
33
51
|
const scrollToBottom = () => {
|
34
52
|
if (captionsScrollDivRef.current) {
|
35
53
|
captionsScrollDivRef.current.scrollTop = captionsScrollDivRef.current.scrollHeight;
|
@@ -61,7 +79,7 @@ export const CaptionsBanner = (props) => {
|
|
61
79
|
/* @conditional-compile-remove(rtt) */
|
62
80
|
useEffect(() => {
|
63
81
|
// if the latest real time text sent by myself is final, clear the text field
|
64
|
-
if (latestLocalRealTimeText && !latestLocalRealTimeText.
|
82
|
+
if (latestLocalRealTimeText && !latestLocalRealTimeText.isTyping) {
|
65
83
|
setTextFieldValue('');
|
66
84
|
}
|
67
85
|
}, [latestLocalRealTimeText]);
|
@@ -81,22 +99,33 @@ export const CaptionsBanner = (props) => {
|
|
81
99
|
bannerContent: (_b = strings.realTimeTextBannerContent) !== null && _b !== void 0 ? _b : '',
|
82
100
|
bannerLinkLabel: (_c = strings.realTimeTextBannerLinkLabel) !== null && _c !== void 0 ? _c : ''
|
83
101
|
};
|
84
|
-
|
85
|
-
/* @conditional-compile-remove(rtt) */
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
102
|
+
const captionsTrampoline = () => {
|
103
|
+
/* @conditional-compile-remove(rtt) */
|
104
|
+
return (React.createElement(React.Fragment, null, mergedCaptions.map((caption) => {
|
105
|
+
if (caption) {
|
106
|
+
if ('message' in caption) {
|
107
|
+
return (React.createElement("li", { key: `RealTimeText - ${caption.id}`, className: captionContainerClassName, "data-is-focusable": true },
|
108
|
+
React.createElement(RealTimeText, Object.assign({}, caption))));
|
109
|
+
}
|
110
|
+
return (React.createElement("li", { key: `Captions - ${caption.id}`, className: captionContainerClassName, "data-is-focusable": true },
|
111
|
+
React.createElement(_Caption, Object.assign({}, caption, { onRenderAvatar: onRenderAvatar }))));
|
93
112
|
}
|
113
|
+
return React.createElement(React.Fragment, null);
|
114
|
+
})));
|
115
|
+
return (React.createElement(React.Fragment, null, captions.map((caption) => {
|
94
116
|
return (React.createElement("li", { key: caption.id, className: captionContainerClassName, "data-is-focusable": true },
|
95
117
|
React.createElement(_Caption, Object.assign({}, caption, { onRenderAvatar: onRenderAvatar }))));
|
96
|
-
})))
|
118
|
+
})));
|
119
|
+
};
|
120
|
+
return (React.createElement(React.Fragment, null, (startCaptionsInProgress || /* @conditional-compile-remove(rtt) */ isRealTimeTextOn) && (React.createElement(FocusZone, { shouldFocusOnMount: true, className: captionsContainerClassName, "data-ui-id": "captions-banner" },
|
121
|
+
/* @conditional-compile-remove(rtt) */ isRealTimeTextOn && (React.createElement("div", { style: { paddingTop: '0.5rem' } },
|
122
|
+
React.createElement(_RTTDisclosureBanner, { strings: realTimeTextDisclosureBannerStrings }))),
|
123
|
+
(isCaptionsOn || /* @conditional-compile-remove(rtt) */ isRealTimeTextOn) && (React.createElement("ul", { ref: captionsScrollDivRef, className: (captionsOptions === null || captionsOptions === void 0 ? void 0 : captionsOptions.height) === 'full'
|
124
|
+
? captionsBannerFullHeightClassName(theme)
|
125
|
+
: captionsBannerClassName(formFactor), "data-ui-id": "captions-banner-inner" }, captionsTrampoline())),
|
97
126
|
/* @conditional-compile-remove(rtt) */ isRealTimeTextOn && onSendRealTimeText && (React.createElement(TextField, { label: strings.realTimeTextInputBoxDefaultText, value: textFieldValue, onKeyDown: handleKeyDown, onChange: (_, newValue) => {
|
98
127
|
setTextFieldValue(newValue || '');
|
99
|
-
onSendRealTimeText(newValue || '');
|
128
|
+
onSendRealTimeText(newValue || '', false);
|
100
129
|
} })),
|
101
130
|
!isCaptionsOn && /* @conditional-compile-remove(rtt) */ !isRealTimeTextOn && (React.createElement(Stack, { verticalAlign: "center", styles: (captionsOptions === null || captionsOptions === void 0 ? void 0 : captionsOptions.height) === 'full'
|
102
131
|
? loadingBannerFullHeightStyles(theme)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CaptionsBanner.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/CaptionsBanner.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtE,sCAAsC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,iCAAiC,EACjC,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,sCAAsC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AA+H7D,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAe,EAAE;;IACx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ACR,KAAK,EAAE,OAAO,CAAC,+BAA+B,EAC9C,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;gBACxB,iBAAiB,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;gBAClC,kBAAkB,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;YACrC,CAAC,GACD,CACH;QAEF,CAAC,YAAY,IAAI,sCAAsC,CAAC,CAAC,gBAAgB,IAAI,CAC5E,oBAAC,KAAK,IACJ,aAAa,EAAC,QAAQ,EACtB,MAAM,EACJ,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,MAAK,MAAM;gBAChC,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC;gBACtC,CAAC,CAAC,mBAAmB,CAAC,UAAU,CAAC,uBAElB,IAAI;YAEvB,oBAAC,OAAO,IAAC,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,yBAAyB,EAAE,QAAQ,EAAC,WAAW,EAAC,aAAa,EAAC,OAAO,GAAG,CAC3F,CACT,CACS,CACb,CACA,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { Stack, FocusZone, Spinner, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(rtt) */\nimport { TextField } from '@fluentui/react';\nimport React, { useEffect, useRef, useState, useCallback } from 'react';\nimport { _Caption } from './Caption';\nimport {\n captionContainerClassName,\n captionsBannerClassName,\n captionsBannerFullHeightClassName,\n captionsContainerClassName,\n loadingBannerFullHeightStyles,\n loadingBannerStyles\n} from './styles/Captions.style';\nimport { OnRenderAvatarCallback } from '../types';\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeText } from './RealTimeText';\n/* @conditional-compile-remove(rtt) */\nimport { _RTTDisclosureBanner } from './RTTDisclosureBanner';\n\n/**\n * @public\n * information required for each line of caption\n */\nexport type CaptionsInformation = {\n /**\n * unique id for each caption\n */\n id: string;\n /**\n * speaker's display name\n */\n displayName: string;\n /**\n * content of the caption\n */\n captionText: string;\n /**\n * id of the speaker\n */\n userId?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * if the caption received is real time text\n */\n isRealTimeText?: boolean;\n /* @conditional-compile-remove(rtt) */\n /**\n * if the caption received is a non finalized caption\n */\n isPartial?: boolean;\n /* @conditional-compile-remove(rtt) */\n /**\n * if the caption received is from the local user\n */\n isLocalUser?: boolean;\n};\n\n/**\n * @public\n * strings for captions banner\n */\nexport interface CaptionsBannerStrings {\n /**\n * Spinner text for captions banner\n */\n captionsBannerSpinnerText?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Default text for RTT input text box\n */\n realTimeTextInputBoxDefaultText?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Real time text disclosure banner title\n */\n realTimeTextBannerTitle?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Real time text disclosure banner content\n */\n realTimeTextBannerContent?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Real time text disclosure banner link label\n */\n realTimeTextBannerLinkLabel?: string;\n}\n\n/**\n * @public\n * CaptionsBanner Component Props.\n */\nexport interface CaptionsBannerProps {\n /**\n * Array of captions to be displayed\n */\n captions: CaptionsInformation[];\n /**\n * Flag to indicate if captions are on\n */\n isCaptionsOn?: boolean;\n /* @conditional-compile-remove(rtt) */\n /**\n * Flag to indicate if real time text is on\n */\n isRealTimeTextOn?: boolean;\n /**\n * Flag to indicate if captions are being started\n * This is used to show spinner while captions are being started\n */\n startCaptionsInProgress?: boolean;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Optional strings for the component\n */\n strings?: CaptionsBannerStrings;\n /**\n * Optional form factor for the component.\n * @defaultValue 'default'\n */\n formFactor?: 'default' | 'compact';\n /**\n * Optional options for the component.\n */\n captionsOptions?: {\n height: 'full' | 'default';\n };\n /* @conditional-compile-remove(rtt) */\n /**\n * Optional callback to send real time text.\n */\n onSendRealTimeText?: (text: string, finalized?: boolean) => Promise<void>;\n /* @conditional-compile-remove(rtt) */\n /**\n * Latest local real time text\n */\n latestLocalRealTimeText?: CaptionsInformation;\n}\n\nconst SCROLL_OFFSET_ALLOWANCE = 20;\n\n/**\n * @public\n * A component for displaying a CaptionsBanner with user icon, displayName and captions text.\n */\nexport const CaptionsBanner = (props: CaptionsBannerProps): JSX.Element => {\n const {\n captions,\n isCaptionsOn,\n startCaptionsInProgress,\n onRenderAvatar,\n formFactor = 'default',\n captionsOptions,\n /* @conditional-compile-remove(rtt) */\n isRealTimeTextOn,\n /* @conditional-compile-remove(rtt) */\n onSendRealTimeText,\n /* @conditional-compile-remove(rtt) */\n latestLocalRealTimeText\n } = props;\n const localeStrings = useLocale().strings.captionsBanner;\n const strings = { ...localeStrings, ...props.strings };\n const captionsScrollDivRef = useRef<HTMLUListElement>(null);\n const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState<boolean>(true);\n const theme = useTheme();\n\n const scrollToBottom = (): void => {\n if (captionsScrollDivRef.current) {\n captionsScrollDivRef.current.scrollTop = captionsScrollDivRef.current.scrollHeight;\n }\n };\n\n const handleScrollToTheBottom = useCallback((): void => {\n if (!captionsScrollDivRef.current) {\n return;\n }\n const atBottom =\n Math.ceil(captionsScrollDivRef.current.scrollTop) >=\n captionsScrollDivRef.current.scrollHeight - captionsScrollDivRef.current.clientHeight - SCROLL_OFFSET_ALLOWANCE;\n\n setIsAtBottomOfScroll(atBottom);\n }, []);\n\n useEffect(() => {\n const captionsScrollDiv = captionsScrollDivRef.current;\n captionsScrollDiv?.addEventListener('scroll', handleScrollToTheBottom);\n\n return () => {\n captionsScrollDiv?.removeEventListener('scroll', handleScrollToTheBottom);\n };\n }, [handleScrollToTheBottom, isCaptionsOn]);\n\n useEffect(() => {\n // only auto scroll to bottom is already is at bottom of scroll before new caption comes in\n if (isAtBottomOfScroll) {\n scrollToBottom();\n }\n }, [captions, isAtBottomOfScroll]);\n /* @conditional-compile-remove(rtt) */\n const [textFieldValue, setTextFieldValue] = useState<string>('');\n /* @conditional-compile-remove(rtt) */\n useEffect(() => {\n // if the latest real time text sent by myself is final, clear the text field\n if (latestLocalRealTimeText && !latestLocalRealTimeText.isPartial) {\n setTextFieldValue('');\n }\n }, [latestLocalRealTimeText]);\n\n /* @conditional-compile-remove(rtt) */\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>): void => {\n if (event.key === 'Enter') {\n event.preventDefault();\n if (textFieldValue && onSendRealTimeText) {\n onSendRealTimeText(textFieldValue, true);\n setTextFieldValue('');\n }\n }\n };\n\n /* @conditional-compile-remove(rtt) */\n const realTimeTextDisclosureBannerStrings = {\n bannerTitle: strings.realTimeTextBannerTitle ?? '',\n bannerContent: strings.realTimeTextBannerContent ?? '',\n bannerLinkLabel: strings.realTimeTextBannerLinkLabel ?? ''\n };\n\n return (\n <>\n {(startCaptionsInProgress || /* @conditional-compile-remove(rtt) */ isRealTimeTextOn) && (\n <FocusZone shouldFocusOnMount className={captionsContainerClassName} data-ui-id=\"captions-banner\">\n {\n /* @conditional-compile-remove(rtt) */ isRealTimeTextOn && (\n <_RTTDisclosureBanner strings={realTimeTextDisclosureBannerStrings} />\n )\n }\n {(isCaptionsOn || /* @conditional-compile-remove(rtt) */ isRealTimeTextOn) && (\n <ul\n ref={captionsScrollDivRef}\n className={\n captionsOptions?.height === 'full'\n ? captionsBannerFullHeightClassName(theme)\n : captionsBannerClassName(formFactor)\n }\n data-ui-id=\"captions-banner-inner\"\n >\n {captions.map((caption) => {\n /* @conditional-compile-remove(rtt) */\n if (caption.isRealTimeText) {\n return (\n <li key={caption.id} className={captionContainerClassName} data-is-focusable={true}>\n <RealTimeText {...caption} isTyping={caption.isPartial} onRenderAvatar={onRenderAvatar} />\n </li>\n );\n }\n return (\n <li key={caption.id} className={captionContainerClassName} data-is-focusable={true}>\n <_Caption {...caption} onRenderAvatar={onRenderAvatar} />\n </li>\n );\n })}\n </ul>\n )}\n {\n /* @conditional-compile-remove(rtt) */ isRealTimeTextOn && onSendRealTimeText && (\n <TextField\n label={strings.realTimeTextInputBoxDefaultText}\n value={textFieldValue}\n onKeyDown={handleKeyDown}\n onChange={(_, newValue) => {\n setTextFieldValue(newValue || '');\n onSendRealTimeText(newValue || '');\n }}\n />\n )\n }\n {!isCaptionsOn && /* @conditional-compile-remove(rtt) */ !isRealTimeTextOn && (\n <Stack\n verticalAlign=\"center\"\n styles={\n captionsOptions?.height === 'full'\n ? loadingBannerFullHeightStyles(theme)\n : loadingBannerStyles(formFactor)\n }\n data-is-focusable={true}\n >\n <Spinner label={strings?.captionsBannerSpinnerText} ariaLive=\"assertive\" labelPosition=\"right\" />\n </Stack>\n )}\n </FocusZone>\n )}\n </>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"CaptionsBanner.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/CaptionsBanner.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtE,sCAAsC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACxE,sCAAsC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,iCAAiC,EACjC,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC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AAE,MAAM,MAAK,MAAM;gBAChC,CAAC,CAAC,iCAAiC,CAAC,KAAK,CAAC;gBAC1C,CAAC,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAE9B,uBAAuB,IAEjC,kBAAkB,EAAE,CAClB,CACN;QAEC,sCAAsC,CAAC,gBAAgB,IAAI,kBAAkB,IAAI,CAC/E,oBAAC,SAAS,IACR,KAAK,EAAE,OAAO,CAAC,+BAA+B,EAC9C,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;gBACxB,iBAAiB,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;gBAClC,kBAAkB,CAAC,QAAQ,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;YAC5C,CAAC,GACD,CACH;QAEF,CAAC,YAAY,IAAI,sCAAsC,CAAC,CAAC,gBAAgB,IAAI,CAC5E,oBAAC,KAAK,IACJ,aAAa,EAAC,QAAQ,EACtB,MAAM,EACJ,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,MAAK,MAAM;gBAChC,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC;gBACtC,CAAC,CAAC,mBAAmB,CAAC,UAAU,CAAC,uBAElB,IAAI;YAEvB,oBAAC,OAAO,IAAC,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,yBAAyB,EAAE,QAAQ,EAAC,WAAW,EAAC,aAAa,EAAC,OAAO,GAAG,CAC3F,CACT,CACS,CACb,CACA,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { Stack, FocusZone, Spinner, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(rtt) */\nimport { TextField } from '@fluentui/react';\nimport React, { useEffect, useRef, useState, useCallback } from 'react';\n/* @conditional-compile-remove(rtt) */\nimport { useMemo } from 'react';\nimport { _Caption } from './Caption';\nimport {\n captionContainerClassName,\n captionsBannerClassName,\n captionsBannerFullHeightClassName,\n captionsContainerClassName,\n loadingBannerFullHeightStyles,\n loadingBannerStyles\n} from './styles/Captions.style';\nimport { OnRenderAvatarCallback } from '../types';\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeText } from './RealTimeText';\n/* @conditional-compile-remove(rtt) */\nimport { _RTTDisclosureBanner } from './RTTDisclosureBanner';\n/* @conditional-compile-remove(rtt) */\nimport { sortCaptionsAndRealTimeTexts } from './utils/sortCaptionsAndRealTimeTexts';\n\n/**\n * @public\n * information required for each line of caption\n */\nexport type CaptionsInformation = {\n /**\n * unique id for each caption\n */\n id: string;\n /**\n * speaker's display name\n */\n displayName: string;\n /**\n * content of the caption\n */\n captionText: string;\n /**\n * id of the speaker\n */\n userId?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * timestamp when the caption was created\n * Please note that this value is essential for determining the order of captions and real time text messages\n * If you are using both captions and real time text, please ensure that the createdTimeStamp is populated\n */\n createdTimeStamp?: Date;\n};\n\n/* @conditional-compile-remove(rtt) */\n/**\n * @beta\n * information required for each line of real time text\n */\nexport type RealTimeTextInformation = {\n /**\n * The sequence id of the real time text.\n */\n id: number;\n /**\n * sender's display name\n */\n displayName: string;\n /**\n * id of the sender\n */\n userId?: string;\n /**\n * The real time text message.\n */\n message: string;\n /**\n * if the real time text received is partial\n */\n isTyping: boolean;\n /**\n * If message originated from the local participant\n */\n isMe: boolean;\n /**\n * timestamp when the real time text was finalized\n */\n finalizedTimeStamp: Date;\n};\n/**\n * @public\n * strings for captions banner\n */\nexport interface CaptionsBannerStrings {\n /**\n * Spinner text for captions banner\n */\n captionsBannerSpinnerText?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Default text for RTT input text box\n */\n realTimeTextInputBoxDefaultText?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Real time text disclosure banner title\n */\n realTimeTextBannerTitle?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Real time text disclosure banner content\n */\n realTimeTextBannerContent?: string;\n /* @conditional-compile-remove(rtt) */\n /**\n * Real time text disclosure banner link label\n */\n realTimeTextBannerLinkLabel?: string;\n}\n\n/**\n * @public\n * CaptionsBanner Component Props.\n */\nexport interface CaptionsBannerProps {\n /**\n * Array of captions to be displayed\n */\n captions: CaptionsInformation[];\n /* @conditional-compile-remove(rtt) */\n /**\n * Array of finalized and partial real time text messages\n */\n realTimeTexts?: {\n completedMessages?: RealTimeTextInformation[];\n currentInProgress?: RealTimeTextInformation[];\n myInProgress?: RealTimeTextInformation;\n };\n /**\n * Flag to indicate if captions are on\n */\n isCaptionsOn?: boolean;\n /* @conditional-compile-remove(rtt) */\n /**\n * Flag to indicate if real time text is on\n */\n isRealTimeTextOn?: boolean;\n /**\n * Flag to indicate if captions are being started\n * This is used to show spinner while captions are being started\n */\n startCaptionsInProgress?: boolean;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Optional strings for the component\n */\n strings?: CaptionsBannerStrings;\n /**\n * Optional form factor for the component.\n * @defaultValue 'default'\n */\n formFactor?: 'default' | 'compact';\n /**\n * Optional options for the component.\n */\n captionsOptions?: {\n height: 'full' | 'default';\n };\n /* @conditional-compile-remove(rtt) */\n /**\n * Optional callback to send real time text.\n */\n onSendRealTimeText?: (text: string, finalized: boolean) => Promise<void>;\n /* @conditional-compile-remove(rtt) */\n /**\n * Latest local real time text\n */\n latestLocalRealTimeText?: RealTimeTextInformation;\n}\n\nconst SCROLL_OFFSET_ALLOWANCE = 20;\n\n/**\n * @public\n * A component for displaying a CaptionsBanner with user icon, displayName and captions text.\n */\nexport const CaptionsBanner = (props: CaptionsBannerProps): JSX.Element => {\n const {\n captions,\n /* @conditional-compile-remove(rtt) */\n realTimeTexts,\n isCaptionsOn,\n startCaptionsInProgress,\n onRenderAvatar,\n formFactor = 'default',\n captionsOptions,\n /* @conditional-compile-remove(rtt) */\n isRealTimeTextOn,\n /* @conditional-compile-remove(rtt) */\n onSendRealTimeText,\n /* @conditional-compile-remove(rtt) */\n latestLocalRealTimeText\n } = props;\n const localeStrings = useLocale().strings.captionsBanner;\n const strings = { ...localeStrings, ...props.strings };\n const captionsScrollDivRef = useRef<HTMLUListElement>(null);\n const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState<boolean>(true);\n const theme = useTheme();\n /* @conditional-compile-remove(rtt) */\n // merge realtimetexts and captions into one array based on timestamp\n // Combine captions and realTimeTexts into one list\n const combinedList: (CaptionsInformation | RealTimeTextInformation)[] = useMemo(() => {\n return sortCaptionsAndRealTimeTexts(captions, realTimeTexts?.completedMessages ?? []);\n }, [captions, realTimeTexts?.completedMessages]);\n\n /* @conditional-compile-remove(rtt) */\n const mergedCaptions: (CaptionsInformation | RealTimeTextInformation)[] = useMemo(() => {\n return [...combinedList, ...(realTimeTexts?.currentInProgress ?? []), realTimeTexts?.myInProgress] as (\n | CaptionsInformation\n | RealTimeTextInformation\n )[];\n }, [combinedList, realTimeTexts]);\n\n const scrollToBottom = (): void => {\n if (captionsScrollDivRef.current) {\n captionsScrollDivRef.current.scrollTop = captionsScrollDivRef.current.scrollHeight;\n }\n };\n\n const handleScrollToTheBottom = useCallback((): void => {\n if (!captionsScrollDivRef.current) {\n return;\n }\n const atBottom =\n Math.ceil(captionsScrollDivRef.current.scrollTop) >=\n captionsScrollDivRef.current.scrollHeight - captionsScrollDivRef.current.clientHeight - SCROLL_OFFSET_ALLOWANCE;\n\n setIsAtBottomOfScroll(atBottom);\n }, []);\n\n useEffect(() => {\n const captionsScrollDiv = captionsScrollDivRef.current;\n captionsScrollDiv?.addEventListener('scroll', handleScrollToTheBottom);\n\n return () => {\n captionsScrollDiv?.removeEventListener('scroll', handleScrollToTheBottom);\n };\n }, [handleScrollToTheBottom, isCaptionsOn]);\n\n useEffect(() => {\n // only auto scroll to bottom is already is at bottom of scroll before new caption comes in\n if (isAtBottomOfScroll) {\n scrollToBottom();\n }\n }, [captions, isAtBottomOfScroll]);\n /* @conditional-compile-remove(rtt) */\n const [textFieldValue, setTextFieldValue] = useState<string>('');\n /* @conditional-compile-remove(rtt) */\n useEffect(() => {\n // if the latest real time text sent by myself is final, clear the text field\n if (latestLocalRealTimeText && !latestLocalRealTimeText.isTyping) {\n setTextFieldValue('');\n }\n }, [latestLocalRealTimeText]);\n\n /* @conditional-compile-remove(rtt) */\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>): void => {\n if (event.key === 'Enter') {\n event.preventDefault();\n if (textFieldValue && onSendRealTimeText) {\n onSendRealTimeText(textFieldValue, true);\n setTextFieldValue('');\n }\n }\n };\n\n /* @conditional-compile-remove(rtt) */\n const realTimeTextDisclosureBannerStrings = {\n bannerTitle: strings.realTimeTextBannerTitle ?? '',\n bannerContent: strings.realTimeTextBannerContent ?? '',\n bannerLinkLabel: strings.realTimeTextBannerLinkLabel ?? ''\n };\n\n const captionsTrampoline = (): JSX.Element => {\n /* @conditional-compile-remove(rtt) */\n return (\n <>\n {mergedCaptions.map((caption) => {\n if (caption) {\n if ('message' in caption) {\n return (\n <li key={`RealTimeText - ${caption.id}`} className={captionContainerClassName} data-is-focusable={true}>\n <RealTimeText {...(caption as RealTimeTextInformation)} />\n </li>\n );\n }\n return (\n <li key={`Captions - ${caption.id}`} className={captionContainerClassName} data-is-focusable={true}>\n <_Caption {...(caption as CaptionsInformation)} onRenderAvatar={onRenderAvatar} />\n </li>\n );\n }\n return <></>;\n })}\n </>\n );\n\n return (\n <>\n {captions.map((caption) => {\n return (\n <li key={caption.id} className={captionContainerClassName} data-is-focusable={true}>\n <_Caption {...(caption as CaptionsInformation)} onRenderAvatar={onRenderAvatar} />\n </li>\n );\n })}\n </>\n );\n };\n\n return (\n <>\n {(startCaptionsInProgress || /* @conditional-compile-remove(rtt) */ isRealTimeTextOn) && (\n <FocusZone shouldFocusOnMount className={captionsContainerClassName} data-ui-id=\"captions-banner\">\n {\n /* @conditional-compile-remove(rtt) */ isRealTimeTextOn && (\n <div style={{ paddingTop: '0.5rem' }}>\n <_RTTDisclosureBanner strings={realTimeTextDisclosureBannerStrings} />\n </div>\n )\n }\n {(isCaptionsOn || /* @conditional-compile-remove(rtt) */ isRealTimeTextOn) && (\n <ul\n ref={captionsScrollDivRef}\n className={\n captionsOptions?.height === 'full'\n ? captionsBannerFullHeightClassName(theme)\n : captionsBannerClassName(formFactor)\n }\n data-ui-id=\"captions-banner-inner\"\n >\n {captionsTrampoline()}\n </ul>\n )}\n {\n /* @conditional-compile-remove(rtt) */ isRealTimeTextOn && onSendRealTimeText && (\n <TextField\n label={strings.realTimeTextInputBoxDefaultText}\n value={textFieldValue}\n onKeyDown={handleKeyDown}\n onChange={(_, newValue) => {\n setTextFieldValue(newValue || '');\n onSendRealTimeText(newValue || '', false);\n }}\n />\n )\n }\n {!isCaptionsOn && /* @conditional-compile-remove(rtt) */ !isRealTimeTextOn && (\n <Stack\n verticalAlign=\"center\"\n styles={\n captionsOptions?.height === 'full'\n ? loadingBannerFullHeightStyles(theme)\n : loadingBannerStyles(formFactor)\n }\n data-is-focusable={true}\n >\n <Spinner label={strings?.captionsBannerSpinnerText} ariaLive=\"assertive\" labelPosition=\"right\" />\n </Stack>\n )}\n </FocusZone>\n )}\n </>\n );\n};\n"]}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { OverlayModeTypes, Reaction, ReactionResources, VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '../types';
|
3
|
+
import { VideoGalleryTogetherModeParticipantPosition } from '../types';
|
3
4
|
/**
|
4
5
|
* Reaction overlay component props
|
5
6
|
*
|
@@ -28,6 +29,7 @@ export interface MeetingReactionOverlayProps {
|
|
28
29
|
* Remote participant's reaction event.
|
29
30
|
*/
|
30
31
|
remoteParticipants?: VideoGalleryRemoteParticipant[];
|
32
|
+
togetherModeSeatPositions?: VideoGalleryTogetherModeParticipantPosition;
|
31
33
|
}
|
32
34
|
/**
|
33
35
|
* Reaction overlay component
|
@@ -3,6 +3,10 @@
|
|
3
3
|
import React, { useLayoutEffect, useRef, useState } from 'react';
|
4
4
|
import { ParticipantVideoTileOverlay } from './VideoGallery/ParticipantVideoTileOverlay';
|
5
5
|
import { RemoteContentShareReactionOverlay } from './VideoGallery/RemoteContentShareReactionOverlay';
|
6
|
+
/* @conditional-compile-remove(together-mode) */
|
7
|
+
import { TogetherModeOverlay } from './TogetherModeOverlay';
|
8
|
+
/* @conditional-compile-remove(together-mode) */
|
9
|
+
import { togetherModeMeetingOverlayStyle } from './styles/TogetherMode.styles';
|
6
10
|
/**
|
7
11
|
* Emoji max size
|
8
12
|
* @internal
|
@@ -26,7 +30,8 @@ const REACTION_EMOJI_RESIZE_SCALE_CONSTANT = 3;
|
|
26
30
|
* @internal
|
27
31
|
*/
|
28
32
|
export const MeetingReactionOverlay = (props) => {
|
29
|
-
const { overlayMode, reaction, reactionResources, localParticipant, remoteParticipants
|
33
|
+
const { overlayMode, reaction, reactionResources, localParticipant, remoteParticipants,
|
34
|
+
/* @conditional-compile-remove(together-mode) */ togetherModeSeatPositions } = props;
|
30
35
|
const [emojiSizePx, setEmojiSizePx] = useState(0);
|
31
36
|
const [divHeight, setDivHeight] = useState(0);
|
32
37
|
const [divWidth, setDivWidth] = useState(0);
|
@@ -63,6 +68,12 @@ export const MeetingReactionOverlay = (props) => {
|
|
63
68
|
return (React.createElement("div", { ref: videoTileRef, style: { width: '100%', height: '100%', pointerEvents: 'none' } },
|
64
69
|
React.createElement(RemoteContentShareReactionOverlay, { hostDivHeight: divHeight, hostDivWidth: divWidth, reactionResources: reactionResources, localParticipant: localParticipant, remoteParticipants: remoteParticipants })));
|
65
70
|
}
|
71
|
+
else if (props.overlayMode === 'together-mode') {
|
72
|
+
/* @conditional-compile-remove(together-mode) */
|
73
|
+
return (React.createElement("div", { style: Object.assign({}, togetherModeMeetingOverlayStyle) },
|
74
|
+
React.createElement(TogetherModeOverlay, { emojiSize: emojiSizePx, reactionResources: reactionResources, localParticipant: localParticipant !== null && localParticipant !== void 0 ? localParticipant : {}, remoteParticipants: remoteParticipants !== null && remoteParticipants !== void 0 ? remoteParticipants : [], togetherModeSeatPositions: togetherModeSeatPositions !== null && togetherModeSeatPositions !== void 0 ? togetherModeSeatPositions : {} })));
|
75
|
+
return React.createElement(React.Fragment, null);
|
76
|
+
}
|
66
77
|
else {
|
67
78
|
return React.createElement(React.Fragment, null);
|
68
79
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MeetingReactionOverlay.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MeetingReactionOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"MeetingReactionOverlay.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MeetingReactionOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AACrG,gDAAgD;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,gDAAgD;AAChD,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAmC/E;;;GAGG;AACH,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAErC;;;GAGG;AACH,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAErC;;;GAGG;AACH,MAAM,oCAAoC,GAAG,CAAC,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;IACxF,MAAM,EACJ,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,kB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BAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAK,EAAmC,EAC1E,kBAAkB,EAAE,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAK,EAAsC,EACjF,yBAAyB,EAAE,yBAAyB,aAAzB,yBAAyB,cAAzB,yBAAyB,GAAI,EAAE,GAC1D,CACE,CACP,CAAC;QACF,OAAO,yCAAK,CAAC;IACf,CAAC;SAAM,CAAC;QACN,OAAO,yCAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n OverlayModeTypes,\n Reaction,\n ReactionResources,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant\n} from '../types';\n/* @conditional-compile-remove(together-mode) */\nimport { VideoGalleryTogetherModeParticipantPosition } from '../types';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { ParticipantVideoTileOverlay } from './VideoGallery/ParticipantVideoTileOverlay';\nimport { RemoteContentShareReactionOverlay } from './VideoGallery/RemoteContentShareReactionOverlay';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeOverlay } from './TogetherModeOverlay';\n/* @conditional-compile-remove(together-mode) */\nimport { togetherModeMeetingOverlayStyle } from './styles/TogetherMode.styles';\n\n/**\n * Reaction overlay component props\n *\n * Can be used with {@link VideoTile}.\n *\n * @internal\n */\nexport interface MeetingReactionOverlayProps {\n /**\n * Reaction rendering overlay type. i.e. single reaction rendering on grid-tile, screen share mode overlay\n */\n overlayMode: OverlayModeTypes;\n /**\n * Received reaction when overlay mode is grid-tile\n */\n reaction?: Reaction;\n /**\n * Reactions resources' url and metadata.\n */\n reactionResources: ReactionResources;\n /**\n * Local participant's reaction event that comes from participant object.\n */\n localParticipant?: VideoGalleryLocalParticipant;\n /**\n * Remote participant's reaction event.\n */\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n\n /* @conditional-compile-remove(together-mode) */\n togetherModeSeatPositions?: VideoGalleryTogetherModeParticipantPosition;\n}\n\n/**\n * Emoji max size\n * @internal\n */\nconst DEFAULT_EMOJI_MAX_SIZE_PX = 70;\n\n/**\n * Emoji min size\n * @internal\n */\nconst DEFAULT_EMOJI_MIN_SIZE_PX = 32;\n\n/**\n * Emoji resize scale constant\n * @internal\n */\nconst REACTION_EMOJI_RESIZE_SCALE_CONSTANT = 3;\n\n/**\n * Reaction overlay component\n *\n * Can be used with {@link VideoTile}.\n *\n * @internal\n */\nexport const MeetingReactionOverlay = (props: MeetingReactionOverlayProps): JSX.Element => {\n const {\n overlayMode,\n reaction,\n reactionResources,\n localParticipant,\n remoteParticipants,\n /* @conditional-compile-remove(together-mode) */ togetherModeSeatPositions\n } = props;\n const [emojiSizePx, setEmojiSizePx] = useState(0);\n const [divHeight, setDivHeight] = useState(0);\n const [divWidth, setDivWidth] = useState(0);\n const videoTileRef = useRef<HTMLDivElement>(null);\n\n const observer = useRef(\n new ResizeObserver((entries): void => {\n const domRect = entries.at(0)?.contentRect;\n const width = domRect !== undefined ? domRect.width : 0;\n const height = domRect !== undefined ? domRect.height : 0;\n const reactionEmojiCalcSize = Math.min(width, height) / REACTION_EMOJI_RESIZE_SCALE_CONSTANT;\n // we only want to set the persona size if it has changed\n if (reactionEmojiCalcSize !== emojiSizePx) {\n setEmojiSizePx(Math.max(Math.min(reactionEmojiCalcSize, DEFAULT_EMOJI_MAX_SIZE_PX), DEFAULT_EMOJI_MIN_SIZE_PX));\n }\n\n if (height !== divHeight) {\n setDivHeight(height);\n }\n\n if (width !== divWidth) {\n setDivWidth(width);\n }\n })\n );\n\n useLayoutEffect(() => {\n if (videoTileRef.current) {\n observer.current.observe(videoTileRef.current);\n }\n const currentObserver = observer.current;\n return () => currentObserver.disconnect();\n }, [videoTileRef]);\n\n if (overlayMode === 'grid-tiles') {\n return (\n <div ref={videoTileRef} style={{ width: '100%', height: '100%', pointerEvents: 'none' }}>\n <ParticipantVideoTileOverlay\n emojiSize={emojiSizePx}\n reaction={reaction}\n reactionResources={reactionResources}\n />\n </div>\n );\n } else if (props.overlayMode === 'screen-share' || props.overlayMode === 'content-share') {\n return (\n <div ref={videoTileRef} style={{ width: '100%', height: '100%', pointerEvents: 'none' }}>\n <RemoteContentShareReactionOverlay\n hostDivHeight={divHeight}\n hostDivWidth={divWidth}\n reactionResources={reactionResources}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n />\n </div>\n );\n } else if (props.overlayMode === 'together-mode') {\n /* @conditional-compile-remove(together-mode) */\n return (\n <div\n style={{\n ...togetherModeMeetingOverlayStyle\n }}\n >\n <TogetherModeOverlay\n emojiSize={emojiSizePx}\n reactionResources={reactionResources}\n localParticipant={localParticipant ?? ({} as VideoGalleryLocalParticipant)}\n remoteParticipants={remoteParticipants ?? ([] as VideoGalleryRemoteParticipant[])}\n togetherModeSeatPositions={togetherModeSeatPositions ?? {}}\n />\n </div>\n );\n return <></>;\n } else {\n return <></>;\n }\n};\n"]}
|
@@ -18,7 +18,7 @@ export interface RealTimeTextProps {
|
|
18
18
|
/**
|
19
19
|
* RealTimeText id
|
20
20
|
*/
|
21
|
-
id:
|
21
|
+
id: number;
|
22
22
|
/**
|
23
23
|
* Display name of the user
|
24
24
|
*/
|
@@ -26,7 +26,7 @@ export interface RealTimeTextProps {
|
|
26
26
|
/**
|
27
27
|
* RealTimeText content
|
28
28
|
*/
|
29
|
-
|
29
|
+
message: string;
|
30
30
|
/**
|
31
31
|
* user id of the user
|
32
32
|
*/
|
@@ -44,7 +44,7 @@ export interface RealTimeTextProps {
|
|
44
44
|
/**
|
45
45
|
* Boolean indicating whether the RealTimeText is from the local user
|
46
46
|
*/
|
47
|
-
|
47
|
+
isMe?: boolean;
|
48
48
|
/**
|
49
49
|
* Strings for RealTimeText
|
50
50
|
*/
|
@@ -14,7 +14,7 @@ import { useLocale } from '../localization';
|
|
14
14
|
* A component for displaying a single line of RealTimeText
|
15
15
|
*/
|
16
16
|
export const RealTimeText = (props) => {
|
17
|
-
const { displayName, userId,
|
17
|
+
const { displayName, userId, message, onRenderAvatar, isTyping } = props;
|
18
18
|
const theme = useTheme();
|
19
19
|
const localeStrings = useLocale().strings.realTimeText;
|
20
20
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
@@ -38,6 +38,6 @@ export const RealTimeText = (props) => {
|
|
38
38
|
React.createElement(Stack, { className: displayNameContainerClassName, horizontal: true },
|
39
39
|
React.createElement(Text, { className: displayNameClassName }, displayName),
|
40
40
|
isTyping && React.createElement(Text, { className: isTypingClassName(theme) }, strings === null || strings === void 0 ? void 0 : strings.isTypingText)),
|
41
|
-
React.createElement(Stack.Item, { className: captionClassName, dir: "auto" },
|
41
|
+
React.createElement(Stack.Item, { className: captionClassName, dir: "auto" }, message))));
|
42
42
|
};
|
43
43
|
//# sourceMappingURL=RealTimeText.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RealTimeText.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/RealTimeText.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,sCAAsC;AACtC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACxF,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,sCAAsC;AACtC,OAAO,EACL,gBAAgB,EAChB,iCAAiC,EACjC,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,sCAAsC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAwD5C,sCAAsC;AACtC;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE;IACpE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,
|
1
|
+
{"version":3,"file":"RealTimeText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c,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IAEjH,OAAO,CACL,oBAAC,KAAK,IACJ,UAAU,QACV,aAAa,EAAC,OAAO,EACrB,eAAe,EAAC,OAAO,EACvB,SAAS,EAAE,qBAAqB,CAAC,KAAK,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAK,CAAC;QAE1D,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,aAAa,IAAG,QAAQ,CAAc;QAE7D,oBAAC,KAAK,IAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAE,iCAAiC;YACvE,oBAAC,KAAK,IAAC,SAAS,EAAE,6BAA6B,EAAE,UAAU;gBACzD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ;gBAC1D,QAAQ,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAE,iBAAiB,CAAC,KAAK,CAAC,IAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAQ,CAChF;YACR,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,OAAO,CACG,CACP,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* @conditional-compile-remove(rtt) */\nimport { IPersona, Persona, Stack, PersonaSize, Text, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(rtt) */\nimport React from 'react';\n/* @conditional-compile-remove(rtt) */\nimport { OnRenderAvatarCallback } from '../types';\n/* @conditional-compile-remove(rtt) */\nimport {\n captionClassName,\n captionsContentContainerClassName,\n displayNameClassName,\n displayNameContainerClassName,\n iconClassName,\n isTypingClassName,\n rttContainerClassName\n} from './styles/Captions.style';\n/* @conditional-compile-remove(rtt) */\nimport { useLocale } from '../localization';\n\n/* @conditional-compile-remove(rtt) */\n/**\n * @beta\n * strings for rtt\n */\nexport interface RealTimeTextStrings {\n /**\n * String indicating that the user is typing\n */\n isTypingText?: string;\n}\n\n/* @conditional-compile-remove(rtt) */\n/**\n * @beta\n * Props for a single line of RealTimeText.\n */\nexport interface RealTimeTextProps {\n /**\n * RealTimeText id\n */\n id: number;\n /**\n * Display name of the user\n */\n displayName: string;\n /**\n * RealTimeText content\n */\n message: string;\n /**\n * user id of the user\n */\n userId?: string;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Boolean indicating whether the RealTimeText is still in progress\n */\n isTyping?: boolean;\n /**\n * Boolean indicating whether the RealTimeText is from the local user\n */\n isMe?: boolean;\n /**\n * Strings for RealTimeText\n */\n strings?: RealTimeTextStrings;\n}\n\n/* @conditional-compile-remove(rtt) */\n/**\n * @beta\n * A component for displaying a single line of RealTimeText\n */\nexport const RealTimeText = (props: RealTimeTextProps): JSX.Element => {\n const { displayName, userId, message, onRenderAvatar, isTyping } = props;\n const theme = useTheme();\n const localeStrings = useLocale().strings.realTimeText;\n const strings = { ...localeStrings, ...props.strings };\n\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: displayName,\n showOverflowTooltip: false,\n imageShouldStartVisible: true,\n initialsTextColor: 'white',\n styles: {\n root: {\n margin: '0.25rem'\n }\n }\n };\n\n const userIcon = onRenderAvatar ? onRenderAvatar(userId ?? '', personaOptions) : <Persona {...personaOptions} />;\n\n return (\n <Stack\n horizontal\n verticalAlign=\"start\"\n horizontalAlign=\"start\"\n className={rttContainerClassName(theme, isTyping ?? false)}\n >\n <Stack.Item className={iconClassName}>{userIcon}</Stack.Item>\n\n <Stack verticalAlign=\"start\" className={captionsContentContainerClassName}>\n <Stack className={displayNameContainerClassName} horizontal>\n <Text className={displayNameClassName}>{displayName}</Text>\n {isTyping && <Text className={isTypingClassName(theme)}>{strings?.isTypingText}</Text>}\n </Stack>\n <Stack.Item className={captionClassName} dir=\"auto\">\n {message}\n </Stack.Item>\n </Stack>\n </Stack>\n );\n};\n"]}
|
@@ -28,8 +28,11 @@ export interface RealTimeTextModalProps {
|
|
28
28
|
showModal?: boolean;
|
29
29
|
/** The function to dismiss the modal */
|
30
30
|
onDismissModal?: () => void;
|
31
|
-
/**
|
32
|
-
|
31
|
+
/**
|
32
|
+
* Use this function to show RealTimeText UI in the calling experience.
|
33
|
+
* Note that real time text should not be started for everyone in the call until the first real time text is received.
|
34
|
+
*/
|
35
|
+
onStartRealTimeText?: () => void;
|
33
36
|
}
|
34
37
|
/**
|
35
38
|
* @beta
|