@azure/communication-react 1.22.0-alpha-202412040017 → 1.22.0-alpha-202412070017
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 +85 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DtCoVNyP.js → ChatMessageComponentAsRichTextEditBox-CTHWXMl0.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DtCoVNyP.js.map → ChatMessageComponentAsRichTextEditBox-CTHWXMl0.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-7qJEM1bW.js → RichTextSendBoxWrapper-C0YPqtKB.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-7qJEM1bW.js.map → RichTextSendBoxWrapper-C0YPqtKB.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-BO9Ei_hI.js → index-Bf1eybwR.js} +61 -68
- package/dist/dist-cjs/communication-react/index-Bf1eybwR.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +2 -1
- package/dist/dist-cjs/communication-react/index.js.map +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/calling-component-bindings/src/captionsSelector.d.ts +6 -6
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +2 -2
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +4 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -0
- package/dist/dist-esm/communication-react/src/index.js +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +42 -11
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -3
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SystemMessage.js +15 -4
- package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +4 -4
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +4 -2
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +0 -13
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +0 -13
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +3 -3
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +3 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +1 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.d.ts → CallingCaptionsBanner.d.ts} +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.js → CallingCaptionsBanner.js} +7 -10
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-BO9Ei_hI.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +0 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var index = require('./index-
|
3
|
+
var index = require('./index-Bf1eybwR.js');
|
4
4
|
require('react');
|
5
5
|
require('@fluentui/react');
|
6
6
|
require('@fluentui/react-components');
|
@@ -92,6 +92,7 @@ exports.CallWithChatComposite = index.CallWithChatComposite;
|
|
92
92
|
exports.CameraAndMicrophoneSitePermissions = index.CameraAndMicrophoneSitePermissions;
|
93
93
|
exports.CameraButton = index.CameraButton;
|
94
94
|
exports.CameraSitePermissions = index.CameraSitePermissions;
|
95
|
+
exports.CaptionsBanner = index.CaptionsBanner;
|
95
96
|
exports.ChatClientProvider = index.ChatClientProvider;
|
96
97
|
exports.ChatComposite = index.ChatComposite;
|
97
98
|
exports.ChatThreadClientProvider = index.ChatThreadClientProvider;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -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.22.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.22.0-alpha-202412070017';\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CallClientState } from "../../calling-stateful-client/src";
|
2
2
|
import { CallingBaseSelectorProps } from './baseSelectors';
|
3
|
-
import {
|
3
|
+
import { CaptionsInformation, _SupportedCaptionLanguage, _SupportedSpokenLanguage } from "../../react-components/src";
|
4
4
|
/**
|
5
5
|
* Selector type for the {@link StartCaptionsButton} component.
|
6
6
|
* @internal
|
@@ -35,16 +35,16 @@ export type _CaptionSettingsSelector = (state: CallClientState, props: CallingBa
|
|
35
35
|
export declare const _captionSettingsSelector: _CaptionSettingsSelector;
|
36
36
|
/**
|
37
37
|
* Selector type for the {@link CaptionsBanner} component.
|
38
|
-
* @
|
38
|
+
* @public
|
39
39
|
*/
|
40
|
-
export type
|
41
|
-
captions:
|
40
|
+
export type CaptionsBannerSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
|
41
|
+
captions: CaptionsInformation[];
|
42
42
|
isCaptionsOn: boolean;
|
43
43
|
};
|
44
44
|
/**
|
45
45
|
* Selector for {@link CaptionsBanner} component.
|
46
46
|
*
|
47
|
-
* @
|
47
|
+
* @public
|
48
48
|
*/
|
49
|
-
export declare const
|
49
|
+
export declare const captionsBannerSelector: CaptionsBannerSelector;
|
50
50
|
//# sourceMappingURL=captionsSelector.d.ts.map
|
@@ -39,9 +39,9 @@ export const _captionSettingsSelector = reselect.createSelector([
|
|
39
39
|
/**
|
40
40
|
* Selector for {@link CaptionsBanner} component.
|
41
41
|
*
|
42
|
-
* @
|
42
|
+
* @public
|
43
43
|
*/
|
44
|
-
export const
|
44
|
+
export const captionsBannerSelector = reselect.createSelector([getCaptions, getCaptionsStatus, getStartCaptionsInProgress, getRemoteParticipants, getDisplayName, getIdentifier], (captions, isCaptionsFeatureActive, startCaptionsInProgress, remoteParticipants, displayName, identifier) => {
|
45
45
|
const captionsInfo = captions === null || captions === void 0 ? void 0 : captions.map((c, index) => {
|
46
46
|
var _a;
|
47
47
|
const userId = getCaptionsSpeakerIdentifier(c);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"captionsSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/captionsSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAgBxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAiC,QAAQ,CAAC,cAAc,CAC/F,CAAC,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,CAAC,EACxE,CAAC,uBAAuB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,EAAE;IACzE,OAAO;QACL,OAAO,EAAE,uBAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,KAAK;QACzC,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE;QACpD,qBAAqB,EAAE,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,OAAO;KACxD,CAAC;AACJ,CAAC,CACF,CAAC;AAiBF;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA6B,QAAQ,CAAC,cAAc,CACvF;IACE,4BAA4B;IAC5B,yBAAyB;IACzB,2BAA2B;IAC3B,wBAAwB;IACxB,iBAAiB;CAClB,EACD,CACE,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,EAAE;IACF,OAAO;QACL,yBAAyB,EAAE,yBAAyB,aAAzB,yBAAyB,cAAzB,yBAAyB,GAAI,EAAE;QAC1D,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,IAAI;QACtD,wBAAwB,EAAE,wBAAwB,aAAxB,wBAAwB,cAAxB,wBAAwB,GAAI,CAAC,OAAO,CAAC;QAC/D,qBAAqB,EAAE,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,OAAO;QACvD,uBAAuB,EAAE,uBAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,KAAK;KAC1D,CAAC;AACJ,CAAC,CACF,CAAC;AAaF;;;;GAIG;AACH,MAAM,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"captionsSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/captionsSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B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BAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,KAAK;QAC9C,uBAAuB,EAAE,uBAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,KAAK;KAC1D,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,4BAA4B,GAAG,CAAC,QAAsB,EAAU,EAAE;IACtE,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, CaptionsInfo } from '@internal/calling-stateful-client';\nimport {\n CallingBaseSelectorProps,\n getDisplayName,\n getIdentifier,\n getRemoteParticipants,\n getStartCaptionsInProgress,\n getSupportedCaptionLanguages\n} from './baseSelectors';\nimport {\n getCaptions,\n getCaptionsStatus,\n getCurrentCaptionLanguage,\n getCurrentSpokenLanguage,\n getSupportedSpokenLanguages\n} from './baseSelectors';\nimport * as reselect from 'reselect';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CaptionsInformation, _SupportedCaptionLanguage, _SupportedSpokenLanguage } from '@internal/react-components';\n\n/**\n * Selector type for the {@link StartCaptionsButton} component.\n * @internal\n */\nexport type _StartCaptionsButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked: boolean;\n currentCaptionLanguage: string;\n currentSpokenLanguage: string;\n};\n\n/**\n * Selector for {@link StartCaptionsButton} component.\n *\n * @internal\n */\nexport const _startCaptionsButtonSelector: _StartCaptionsButtonSelector = reselect.createSelector(\n [getCaptionsStatus, getCurrentCaptionLanguage, getCurrentSpokenLanguage],\n (isCaptionsFeatureActive, currentCaptionLanguage, currentSpokenLanguage) => {\n return {\n checked: isCaptionsFeatureActive ?? false,\n currentCaptionLanguage: currentCaptionLanguage ?? '',\n currentSpokenLanguage: currentSpokenLanguage ?? 'en-us'\n };\n }\n);\n\n/**\n * Selector type for components for Changing caption language and spoken language\n * @internal\n */\nexport type _CaptionSettingsSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n supportedCaptionLanguages: _SupportedCaptionLanguage[];\n currentCaptionLanguage: _SupportedCaptionLanguage;\n supportedSpokenLanguages: _SupportedSpokenLanguage[];\n currentSpokenLanguage: _SupportedSpokenLanguage;\n isCaptionsFeatureActive: boolean;\n};\n\n/**\n * Selector for Changing caption language and spoken language\n *\n * @internal\n */\nexport const _captionSettingsSelector: _CaptionSettingsSelector = reselect.createSelector(\n [\n getSupportedCaptionLanguages,\n getCurrentCaptionLanguage,\n getSupportedSpokenLanguages,\n getCurrentSpokenLanguage,\n getCaptionsStatus\n ],\n (\n supportedCaptionLanguages,\n currentCaptionLanguage,\n supportedSpokenLanguages,\n currentSpokenLanguage,\n isCaptionsFeatureActive\n ) => {\n return {\n supportedCaptionLanguages: supportedCaptionLanguages ?? [],\n currentCaptionLanguage: currentCaptionLanguage ?? 'en',\n supportedSpokenLanguages: supportedSpokenLanguages ?? ['en-us'],\n currentSpokenLanguage: currentSpokenLanguage ?? 'en-us',\n isCaptionsFeatureActive: isCaptionsFeatureActive ?? false\n };\n }\n);\n/**\n * Selector type for the {@link CaptionsBanner} component.\n * @public\n */\nexport type CaptionsBannerSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n captions: CaptionsInformation[];\n isCaptionsOn: boolean;\n};\n\n/**\n * Selector for {@link CaptionsBanner} component.\n *\n * @public\n */\nexport const captionsBannerSelector: CaptionsBannerSelector = reselect.createSelector(\n [getCaptions, getCaptionsStatus, getStartCaptionsInProgress, getRemoteParticipants, getDisplayName, getIdentifier],\n (captions, isCaptionsFeatureActive, startCaptionsInProgress, remoteParticipants, displayName, identifier) => {\n const captionsInfo = captions?.map((c, index) => {\n const userId = getCaptionsSpeakerIdentifier(c);\n let finalDisplayName;\n if (userId === identifier) {\n finalDisplayName = displayName;\n } else if (remoteParticipants) {\n const participant = remoteParticipants[userId];\n if (participant) {\n finalDisplayName = participant.displayName;\n }\n }\n return {\n id: (finalDisplayName ?? 'Unnamed Participant') + index,\n displayName: finalDisplayName ?? 'Unnamed Participant',\n captionText: c.captionText ?? '',\n userId\n };\n });\n return {\n captions: captionsInfo ?? [],\n isCaptionsOn: isCaptionsFeatureActive ?? false,\n startCaptionsInProgress: startCaptionsInProgress ?? false\n };\n }\n);\n\nconst getCaptionsSpeakerIdentifier = (captions: CaptionsInfo): string => {\n return captions.speaker.identifier ? toFlatCommunicationIdentifier(captions.speaker.identifier) : '';\n};\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery } from "../../../react-components/src";
|
2
|
+
import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery, CaptionsBanner } from "../../../react-components/src";
|
3
3
|
import { IncomingCallStack } from "../../../react-components/src";
|
4
4
|
import { NotificationStack } from "../../../react-components/src";
|
5
5
|
import { Dialpad } from "../../../react-components/src";
|
@@ -52,7 +52,7 @@ export type EmptySelector = () => Record<string, never>;
|
|
52
52
|
*
|
53
53
|
* @public
|
54
54
|
*/
|
55
|
-
export type GetSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<Component, typeof VideoGallery> extends true ? VideoGallerySelector : AreEqual<Component, typeof DevicesButton> extends true ? DevicesButtonSelector : AreEqual<Component, typeof MicrophoneButton> extends true ? MicrophoneButtonSelector : AreEqual<Component, typeof CameraButton> extends true ? CameraButtonSelector : AreEqual<Component, typeof ScreenShareButton> extends true ? ScreenShareButtonSelector : AreEqual<Component, typeof ParticipantList> extends true ? ParticipantListSelector : AreEqual<Component, typeof ParticipantsButton> extends true ? ParticipantsButtonSelector : AreEqual<Component, typeof EndCallButton> extends true ? EmptySelector : AreEqual<Component, typeof ErrorBar> extends true ? ErrorBarSelector : AreEqual<Component, typeof Dialpad> extends true ? EmptySelector : AreEqual<Component, typeof HoldButton> extends true ? HoldButtonSelector : AreEqual<Component, typeof NotificationStack> extends true ? NotificationStackSelector : AreEqual<Component, typeof IncomingCallStack> extends true ? IncomingCallStackSelector : AreEqual<Component, typeof ReactionButton> extends true ? RaiseHandButtonSelector : AreEqual<Component, typeof RaiseHandButton> extends true ? EmptySelector : undefined;
|
55
|
+
export type GetSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<Component, typeof VideoGallery> extends true ? VideoGallerySelector : AreEqual<Component, typeof DevicesButton> extends true ? DevicesButtonSelector : AreEqual<Component, typeof MicrophoneButton> extends true ? MicrophoneButtonSelector : AreEqual<Component, typeof CameraButton> extends true ? CameraButtonSelector : AreEqual<Component, typeof ScreenShareButton> extends true ? ScreenShareButtonSelector : AreEqual<Component, typeof ParticipantList> extends true ? ParticipantListSelector : AreEqual<Component, typeof ParticipantsButton> extends true ? ParticipantsButtonSelector : AreEqual<Component, typeof EndCallButton> extends true ? EmptySelector : AreEqual<Component, typeof ErrorBar> extends true ? ErrorBarSelector : AreEqual<Component, typeof Dialpad> extends true ? EmptySelector : AreEqual<Component, typeof HoldButton> extends true ? HoldButtonSelector : AreEqual<Component, typeof NotificationStack> extends true ? NotificationStackSelector : AreEqual<Component, typeof IncomingCallStack> extends true ? IncomingCallStackSelector : AreEqual<Component, typeof ReactionButton> extends true ? RaiseHandButtonSelector : AreEqual<Component, typeof RaiseHandButton> extends true ? EmptySelector : AreEqual<Component, typeof CaptionsBanner> extends true ? EmptySelector : undefined;
|
56
56
|
/**
|
57
57
|
* Get the selector for a specified component.
|
58
58
|
*
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery } from "../../../react-components/src";
|
3
|
+
import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery, CaptionsBanner } from "../../../react-components/src";
|
4
4
|
import { IncomingCallStack } from "../../../react-components/src";
|
5
5
|
import { NotificationStack } from "../../../react-components/src";
|
6
6
|
import { Dialpad } from "../../../react-components/src";
|
@@ -20,6 +20,7 @@ import { reactionButtonSelector } from '../callControlSelectors';
|
|
20
20
|
import { ReactionButton } from "../../../react-components/src";
|
21
21
|
import { notificationStackSelector } from '../notificationStackSelector';
|
22
22
|
import { incomingCallStackSelector } from '../incomingCallStackSelector';
|
23
|
+
import { captionsBannerSelector } from '../captionsSelector';
|
23
24
|
/**
|
24
25
|
* Primary hook to get all hooks necessary for a calling Component.
|
25
26
|
*
|
@@ -94,6 +95,8 @@ const findSelector = (component) => {
|
|
94
95
|
return holdButtonSelector;
|
95
96
|
case IncomingCallStack:
|
96
97
|
return incomingCallStackSelector;
|
98
|
+
case CaptionsBanner:
|
99
|
+
return captionsBannerSelector;
|
97
100
|
}
|
98
101
|
return undefined;
|
99
102
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usePropsFor.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/hooks/usePropsFor.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,sCAAmC;AACpC,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAC/D,OAAO,EAAE,OAAO,EAAE,sCAAmC;AAErD,OAAO,EAAE,UAAU,EAAE,sCAAmC;AACxD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAA2B,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,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CAAC,MAAM,WAAW,GAAG,CACzB,SAAoB,EACI,EAAE;IAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAkD,EAAO,EAAE;IAC/E,wHAAwH;IACxH,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QAC1B,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,gBAAgB;YACnB,OAAO,wBAAwB,CAAC;QAClC,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,aAAa;YAChB,OAAO,qBAAqB,CAAC;QAC/B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,kBAAkB;YACrB,OAAO,0BAA0B,CAAC;QACpC,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC;QAC1B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,cAAc;YACjB,OAAO,sBAAsB,CAAC;QAChC,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,kBAAkB,CAAC;QAC5B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACF;;GAEG;AACH,yGAAyG;AACzG,yBAAyB;AACzB,MAAM;AACN,KAAK","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CameraButton,\n EndCallButton,\n ErrorBar,\n MicrophoneButton,\n DevicesButton,\n ParticipantList,\n ScreenShareButton,\n VideoGallery\n} from '@internal/react-components';\nimport { IncomingCallStack } from '@internal/react-components';\n\nimport { NotificationStack } from '@internal/react-components';\nimport { Dialpad } from '@internal/react-components';\n\nimport { HoldButton } from '@internal/react-components';\nimport { RaiseHandButton } from '@internal/react-components';\nimport { RaiseHandButtonSelector, raiseHandButtonSelector } from '../callControlSelectors';\nimport {\n CameraButtonSelector,\n cameraButtonSelector,\n MicrophoneButtonSelector,\n microphoneButtonSelector,\n DevicesButtonSelector,\n devicesButtonSelector,\n ScreenShareButtonSelector,\n screenShareButtonSelector\n} from '../callControlSelectors';\nimport { holdButtonSelector, HoldButtonSelector } from '../callControlSelectors';\nimport { VideoGallerySelector, videoGallerySelector } from '../videoGallerySelector';\nimport { ParticipantListSelector, participantListSelector } from '../participantListSelector';\nimport { ParticipantsButtonSelector, participantsButtonSelector } from '../participantsButtonSelector';\nimport { useHandlers } from './useHandlers';\nimport { useSelector } from './useSelector';\nimport { Common } from '@internal/acs-ui-common';\nimport { AreEqual } from '@internal/acs-ui-common';\nimport { ParticipantsButton } from '@internal/react-components';\nimport { ErrorBarSelector, errorBarSelector } from '../errorBarSelector';\nimport { CommonCallingHandlers } from '../handlers/createCommonHandlers';\nimport { reactionButtonSelector } from '../callControlSelectors';\nimport { ReactionButton } from '@internal/react-components';\nimport { _ComponentCallingHandlers } from '../handlers/createHandlers';\nimport { notificationStackSelector, NotificationStackSelector } from '../notificationStackSelector';\nimport { incomingCallStackSelector, IncomingCallStackSelector } from '../incomingCallStackSelector';\n\n/**\n * Primary hook to get all hooks necessary for a calling Component.\n *\n * Most straightforward usage of calling components looks like:\n *\n * @example\n * ```\n * import { ParticipantList, usePropsFor } from '@azure/communication-react';\n *\n * const App = (): JSX.Element => {\n * // ... code to setup Providers ...\n *\n * return <ParticipantList {...usePropsFor(ParticipantList)}/>\n * }\n * ```\n *\n * @public\n */\nexport const usePropsFor = <Component extends (props: any) => JSX.Element>(\n component: Component\n): GetSelector<Component> extends (props: any) => any\n ? ReturnType<GetSelector<Component>> &\n Common<CommonCallingHandlers & _ComponentCallingHandlers, Parameters<Component>[0]>\n : undefined => {\n const selector = getSelector(component);\n const props = useSelector(selector);\n const handlers = useHandlers<Parameters<Component>[0]>(component);\n if (props !== undefined) {\n return { ...props, ...handlers } as any;\n }\n return undefined as any;\n};\n\n/**\n * A type for trivial selectors that return no data.\n *\n * Used as a default return value if {@link usePropsFor} is called for a component that requires no data.\n *\n * @public\n */\nexport type EmptySelector = () => Record<string, never>;\n\nconst emptySelector: EmptySelector = (): Record<string, never> => ({});\n\n/**\n * Specific type of the selector applicable to a given Component.\n *\n * @public\n */\nexport type GetSelector<Component extends (props: any) => JSX.Element | undefined> =\n AreEqual<Component, typeof VideoGallery> extends true\n ? VideoGallerySelector\n : AreEqual<Component, typeof DevicesButton> extends true\n ? DevicesButtonSelector\n : AreEqual<Component, typeof MicrophoneButton> extends true\n ? MicrophoneButtonSelector\n : AreEqual<Component, typeof CameraButton> extends true\n ? CameraButtonSelector\n : AreEqual<Component, typeof ScreenShareButton> extends true\n ? ScreenShareButtonSelector\n : AreEqual<Component, typeof ParticipantList> extends true\n ? ParticipantListSelector\n : AreEqual<Component, typeof ParticipantsButton> extends true\n ? ParticipantsButtonSelector\n : AreEqual<Component, typeof EndCallButton> extends true\n ? EmptySelector\n : AreEqual<Component, typeof ErrorBar> extends true\n ? ErrorBarSelector\n : AreEqual<Component, typeof Dialpad> extends true\n ? EmptySelector\n : AreEqual<Component, typeof HoldButton> extends true\n ? HoldButtonSelector\n : AreEqual<Component, typeof NotificationStack> extends true\n ? NotificationStackSelector\n : AreEqual<Component, typeof IncomingCallStack> extends true\n ? IncomingCallStackSelector\n : AreEqual<Component, typeof ReactionButton> extends true\n ? RaiseHandButtonSelector\n : AreEqual<Component, typeof RaiseHandButton> extends true\n ? EmptySelector\n : undefined;\n\n/**\n * Get the selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getSelector = <Component extends (props: any) => JSX.Element | undefined>(\n component: Component\n): GetSelector<Component> => {\n return findSelector(component);\n};\n\nconst findSelector = (component: (props: any) => JSX.Element | undefined): any => {\n // Dialpad only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector\n if (component === Dialpad) {\n return emptySelector;\n }\n\n switch (component) {\n case VideoGallery:\n return videoGallerySelector;\n case MicrophoneButton:\n return microphoneButtonSelector;\n case CameraButton:\n return cameraButtonSelector;\n case ScreenShareButton:\n return screenShareButtonSelector;\n case DevicesButton:\n return devicesButtonSelector;\n case ParticipantList:\n return participantListSelector;\n case ParticipantsButton:\n return participantsButtonSelector;\n case EndCallButton:\n return emptySelector;\n case ErrorBar:\n return errorBarSelector;\n case RaiseHandButton:\n return raiseHandButtonSelector;\n case ReactionButton:\n return reactionButtonSelector;\n case NotificationStack:\n return notificationStackSelector;\n case HoldButton:\n return holdButtonSelector;\n case IncomingCallStack:\n return incomingCallStackSelector;\n }\n return undefined;\n};\n/**\n * Selector for new components that are conditionally compiled. Comment out when there is no CC'd components\n */\n// const findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {\n// switch (component) {\n// }\n// };\n"]}
|
1
|
+
{"version":3,"file":"usePropsFor.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/hooks/usePropsFor.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACf,sCAAmC;AACpC,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAC/D,OAAO,EAAE,OAAO,EAAE,sCAAmC;AAErD,OAAO,EAAE,UAAU,EAAE,sCAAmC;AACxD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAA2B,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAEL,oBA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;;;;GAOG;AACH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,SAAoB,EACI,EAAE;IAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAkD,EAAO,EAAE;IAC/E,wHAAwH;IACxH,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QAC1B,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,gBAAgB;YACnB,OAAO,wBAAwB,CAAC;QAClC,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,aAAa;YAChB,OAAO,qBAAqB,CAAC;QAC/B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,kBAAkB;YACrB,OAAO,0BAA0B,CAAC;QACpC,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC;QAC1B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,cAAc;YACjB,OAAO,sBAAsB,CAAC;QAChC,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,kBAAkB,CAAC;QAC5B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,cAAc;YACjB,OAAO,sBAAsB,CAAC;IAClC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACF;;GAEG;AACH,yGAAyG;AACzG,yBAAyB;AACzB,MAAM;AACN,KAAK","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CameraButton,\n EndCallButton,\n ErrorBar,\n MicrophoneButton,\n DevicesButton,\n ParticipantList,\n ScreenShareButton,\n VideoGallery,\n CaptionsBanner\n} from '@internal/react-components';\nimport { IncomingCallStack } from '@internal/react-components';\n\nimport { NotificationStack } from '@internal/react-components';\nimport { Dialpad } from '@internal/react-components';\n\nimport { HoldButton } from '@internal/react-components';\nimport { RaiseHandButton } from '@internal/react-components';\nimport { RaiseHandButtonSelector, raiseHandButtonSelector } from '../callControlSelectors';\nimport {\n CameraButtonSelector,\n cameraButtonSelector,\n MicrophoneButtonSelector,\n microphoneButtonSelector,\n DevicesButtonSelector,\n devicesButtonSelector,\n ScreenShareButtonSelector,\n screenShareButtonSelector\n} from '../callControlSelectors';\nimport { holdButtonSelector, HoldButtonSelector } from '../callControlSelectors';\nimport { VideoGallerySelector, videoGallerySelector } from '../videoGallerySelector';\nimport { ParticipantListSelector, participantListSelector } from '../participantListSelector';\nimport { ParticipantsButtonSelector, participantsButtonSelector } from '../participantsButtonSelector';\nimport { useHandlers } from './useHandlers';\nimport { useSelector } from './useSelector';\nimport { Common } from '@internal/acs-ui-common';\nimport { AreEqual } from '@internal/acs-ui-common';\nimport { ParticipantsButton } from '@internal/react-components';\nimport { ErrorBarSelector, errorBarSelector } from '../errorBarSelector';\nimport { CommonCallingHandlers } from '../handlers/createCommonHandlers';\nimport { reactionButtonSelector } from '../callControlSelectors';\nimport { ReactionButton } from '@internal/react-components';\nimport { _ComponentCallingHandlers } from '../handlers/createHandlers';\nimport { notificationStackSelector, NotificationStackSelector } from '../notificationStackSelector';\nimport { incomingCallStackSelector, IncomingCallStackSelector } from '../incomingCallStackSelector';\nimport { captionsBannerSelector } from '../captionsSelector';\n\n/**\n * Primary hook to get all hooks necessary for a calling Component.\n *\n * Most straightforward usage of calling components looks like:\n *\n * @example\n * ```\n * import { ParticipantList, usePropsFor } from '@azure/communication-react';\n *\n * const App = (): JSX.Element => {\n * // ... code to setup Providers ...\n *\n * return <ParticipantList {...usePropsFor(ParticipantList)}/>\n * }\n * ```\n *\n * @public\n */\nexport const usePropsFor = <Component extends (props: any) => JSX.Element>(\n component: Component\n): GetSelector<Component> extends (props: any) => any\n ? ReturnType<GetSelector<Component>> &\n Common<CommonCallingHandlers & _ComponentCallingHandlers, Parameters<Component>[0]>\n : undefined => {\n const selector = getSelector(component);\n const props = useSelector(selector);\n const handlers = useHandlers<Parameters<Component>[0]>(component);\n if (props !== undefined) {\n return { ...props, ...handlers } as any;\n }\n return undefined as any;\n};\n\n/**\n * A type for trivial selectors that return no data.\n *\n * Used as a default return value if {@link usePropsFor} is called for a component that requires no data.\n *\n * @public\n */\nexport type EmptySelector = () => Record<string, never>;\n\nconst emptySelector: EmptySelector = (): Record<string, never> => ({});\n\n/**\n * Specific type of the selector applicable to a given Component.\n *\n * @public\n */\nexport type GetSelector<Component extends (props: any) => JSX.Element | undefined> =\n AreEqual<Component, typeof VideoGallery> extends true\n ? VideoGallerySelector\n : AreEqual<Component, typeof DevicesButton> extends true\n ? DevicesButtonSelector\n : AreEqual<Component, typeof MicrophoneButton> extends true\n ? MicrophoneButtonSelector\n : AreEqual<Component, typeof CameraButton> extends true\n ? CameraButtonSelector\n : AreEqual<Component, typeof ScreenShareButton> extends true\n ? ScreenShareButtonSelector\n : AreEqual<Component, typeof ParticipantList> extends true\n ? ParticipantListSelector\n : AreEqual<Component, typeof ParticipantsButton> extends true\n ? ParticipantsButtonSelector\n : AreEqual<Component, typeof EndCallButton> extends true\n ? EmptySelector\n : AreEqual<Component, typeof ErrorBar> extends true\n ? ErrorBarSelector\n : AreEqual<Component, typeof Dialpad> extends true\n ? EmptySelector\n : AreEqual<Component, typeof HoldButton> extends true\n ? HoldButtonSelector\n : AreEqual<Component, typeof NotificationStack> extends true\n ? NotificationStackSelector\n : AreEqual<Component, typeof IncomingCallStack> extends true\n ? IncomingCallStackSelector\n : AreEqual<Component, typeof ReactionButton> extends true\n ? RaiseHandButtonSelector\n : AreEqual<Component, typeof RaiseHandButton> extends true\n ? EmptySelector\n : AreEqual<Component, typeof CaptionsBanner> extends true\n ? EmptySelector\n : undefined;\n\n/**\n * Get the selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getSelector = <Component extends (props: any) => JSX.Element | undefined>(\n component: Component\n): GetSelector<Component> => {\n return findSelector(component);\n};\n\nconst findSelector = (component: (props: any) => JSX.Element | undefined): any => {\n // Dialpad only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector\n if (component === Dialpad) {\n return emptySelector;\n }\n\n switch (component) {\n case VideoGallery:\n return videoGallerySelector;\n case MicrophoneButton:\n return microphoneButtonSelector;\n case CameraButton:\n return cameraButtonSelector;\n case ScreenShareButton:\n return screenShareButtonSelector;\n case DevicesButton:\n return devicesButtonSelector;\n case ParticipantList:\n return participantListSelector;\n case ParticipantsButton:\n return participantsButtonSelector;\n case EndCallButton:\n return emptySelector;\n case ErrorBar:\n return errorBarSelector;\n case RaiseHandButton:\n return raiseHandButtonSelector;\n case ReactionButton:\n return reactionButtonSelector;\n case NotificationStack:\n return notificationStackSelector;\n case HoldButton:\n return holdButtonSelector;\n case IncomingCallStack:\n return incomingCallStackSelector;\n case CaptionsBanner:\n return captionsBannerSelector;\n }\n return undefined;\n};\n/**\n * Selector for new components that are conditionally compiled. Comment out when there is no CC'd components\n */\n// const findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {\n// switch (component) {\n// }\n// };\n"]}
|
@@ -11,8 +11,8 @@ export { notificationStackSelector } from './notificationStackSelector';
|
|
11
11
|
export type { HoldButtonSelector } from './callControlSelectors';
|
12
12
|
export type { IncomingCallStackSelector } from './incomingCallStackSelector';
|
13
13
|
export { incomingCallStackSelector } from './incomingCallStackSelector';
|
14
|
-
export type { _StartCaptionsButtonSelector, _CaptionSettingsSelector,
|
15
|
-
export {
|
14
|
+
export type { _StartCaptionsButtonSelector, _CaptionSettingsSelector, CaptionsBannerSelector } from './captionsSelector';
|
15
|
+
export { captionsBannerSelector, _startCaptionsButtonSelector, _captionSettingsSelector } from './captionsSelector';
|
16
16
|
export type { CallingHandlers, CreateDefaultCallingHandlers } from './handlers/createHandlers';
|
17
17
|
export type { TeamsCallingHandlers } from './handlers/createTeamsCallHandlers';
|
18
18
|
export type { CommonCallingHandlers } from './handlers/createCommonHandlers';
|
@@ -5,7 +5,7 @@ export { createDefaultCallingHandlers } from './handlers/createHandlers';
|
|
5
5
|
export { createDefaultTeamsCallingHandlers } from './handlers/createTeamsCallHandlers';
|
6
6
|
export { notificationStackSelector } from './notificationStackSelector';
|
7
7
|
export { incomingCallStackSelector } from './incomingCallStackSelector';
|
8
|
-
export {
|
8
|
+
export { captionsBannerSelector, _startCaptionsButtonSelector, _captionSettingsSelector } from './captionsSelector';
|
9
9
|
export { useTeamsCall, useTeamsCallAgent } from './providers';
|
10
10
|
export { CallAgentProvider, CallClientProvider, CallProvider, useCall, useCallAgent, useCallClient, useDeviceManager } from './providers';
|
11
11
|
export { usePropsFor as useCallingPropsFor, getSelector as getCallingSelector } from './hooks/usePropsFor';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAQvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAQxE,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAQvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAQxE,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAepH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG3G,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,EACL,SAAS,EACT,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,mCAAmC,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type { CallingBaseSelectorProps } from './baseSelectors';\nexport * from './callControlSelectors';\nexport { createDefaultCallingHandlers } from './handlers/createHandlers';\n\nexport { createDefaultTeamsCallingHandlers } from './handlers/createTeamsCallHandlers';\nexport type { ParticipantListSelector } from './participantListSelector';\nexport type { ParticipantsButtonSelector } from './participantsButtonSelector';\nexport type { VideoGallerySelector } from './videoGallerySelector';\nexport type { ErrorBarSelector } from './errorBarSelector';\n\nexport type { NotificationStackSelector } from './notificationStackSelector';\n\nexport { notificationStackSelector } from './notificationStackSelector';\nexport type { HoldButtonSelector } from './callControlSelectors';\nexport type { IncomingCallStackSelector } from './incomingCallStackSelector';\nexport { incomingCallStackSelector } from './incomingCallStackSelector';\n\nexport type {\n _StartCaptionsButtonSelector,\n _CaptionSettingsSelector,\n CaptionsBannerSelector\n} from './captionsSelector';\n\nexport { captionsBannerSelector, _startCaptionsButtonSelector, _captionSettingsSelector } from './captionsSelector';\n\nexport type { CallingHandlers, CreateDefaultCallingHandlers } from './handlers/createHandlers';\n\nexport type { TeamsCallingHandlers } from './handlers/createTeamsCallHandlers';\nexport type { CommonCallingHandlers } from './handlers/createCommonHandlers';\nexport type { CaptionsOptions } from './handlers/createCommonHandlers';\n\nexport type {\n DeepNoiseSuppressionEffectDependency,\n VideoBackgroundEffectsDependency\n} from './handlers/createCommonHandlers';\n\nexport type { _ComponentCallingHandlers, CallingHandlersOptions } from './handlers/createHandlers';\n\nexport { useTeamsCall, useTeamsCallAgent } from './providers';\n\nexport {\n CallAgentProvider,\n CallClientProvider,\n CallProvider,\n useCall,\n useCallAgent,\n useCallClient,\n useDeviceManager\n} from './providers';\nexport type { CallAgentProviderProps, CallClientProviderProps, CallProviderProps } from './providers';\n\nexport { usePropsFor as useCallingPropsFor, getSelector as getCallingSelector } from './hooks/usePropsFor';\nexport type { GetSelector as GetCallingSelector, EmptySelector } from './hooks/usePropsFor';\n\nexport { useSelector as useCallingSelector } from './hooks/useSelector';\nexport { useHandlers as useCallingHandlers } from './hooks/useHandlers';\n\nexport {\n _isInCall,\n _isPreviewOn,\n _isInLobbyOrConnecting,\n _updateUserDisplayNames,\n _getEnvironmentInfo\n} from './utils/callUtils';\n\nexport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId } from './utils/videoGalleryUtils';\nexport type { _VideoGalleryRemoteParticipantsMemoFn } from './utils/videoGalleryUtils';\n"]}
|
@@ -103,4 +103,6 @@ export { RTTDisclosureBanner } from '../../react-components/src';
|
|
103
103
|
export type { RealTimeTextProps, RealTimeTextStrings } from '../../react-components/src/components/RealTimeText';
|
104
104
|
export { RealTimeText } from '../../react-components/src/components/RealTimeText';
|
105
105
|
export type { MediaAccess } from '../../react-components/src';
|
106
|
+
export type { CaptionsBannerProps, CaptionsInformation, CaptionsBannerStrings } from '../../react-components/src/components/CaptionsBanner';
|
107
|
+
export { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';
|
106
108
|
//# sourceMappingURL=index.d.ts.map
|
@@ -52,4 +52,5 @@ export { RTTModal } from '../../react-components/src';
|
|
52
52
|
export { RTTDisclosureBanner } from '../../react-components/src';
|
53
53
|
/* @conditional-compile-remove(rtt) */
|
54
54
|
export { RealTimeText } from '../../react-components/src/components/RealTimeText';
|
55
|
+
export { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';
|
55
56
|
//# sourceMappingURL=index.js.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;AA0CzG,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;AAuB9C,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,eAA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,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,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAItD,sCAAsC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,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 { CaptionsOptions } 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} from '../../calling-component-bindings/src';\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 { TogetherModeStreamViewResult } 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 { RTTModalStrings, RTTModalProps } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTModal } from '../../react-components/src';\n\n/* @conditional-compile-remove(rtt) */\nexport type { RTTDisclosureBannerProps, RTTDisclosureBannerStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTDisclosureBanner } 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(media-access) */\nexport type { MediaAccess } from '../../react-components/src';\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;AA0CzG,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;AAuB9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,e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BzE,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,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAItD,sCAAsC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAQlF,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,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 { CaptionsOptions } 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} from '../../calling-component-bindings/src';\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 { TogetherModeStreamViewResult } 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 { RTTModalStrings, RTTModalProps } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTModal } from '../../react-components/src';\n\n/* @conditional-compile-remove(rtt) */\nexport type { RTTDisclosureBannerProps, RTTDisclosureBannerStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTDisclosureBanner } 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(media-access) */\nexport type { MediaAccess } 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';\n"]}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { OnRenderAvatarCallback } from '../types';
|
3
|
-
import {
|
3
|
+
import { CaptionsInformation } from './CaptionsBanner';
|
4
4
|
/**
|
5
5
|
* @internal
|
6
6
|
* Props for a single line of caption.
|
7
7
|
*/
|
8
|
-
export interface _CaptionProps extends
|
8
|
+
export interface _CaptionProps extends CaptionsInformation {
|
9
9
|
/**
|
10
10
|
* Optional callback to override render of the avatar.
|
11
11
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,iCAAiC,EACjC,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACd,MAAM,yBAAyB,CAAC;AAgBjC;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEnE,MAAM,cAAc,GAAa;QAC/B,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,KAAK;QAC1B,uBAAuB,EAAE,IAAI;QAC7B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,MAAM,EAAE,SAAS;aAClB;SACF;KACF,CAAC;IAEF,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IAEjH,OAAO,CACL,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO;QAC7D,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,CAAC,IAAI,IAAC,SAAS,EAAE,6BAA6B;gBAClD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ,CAChD;YACb,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,WAAW,CACD,CACP,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { OnRenderAvatarCallback } from '../types';\nimport {\n captionClassName,\n captionsContentContainerClassName,\n displayNameClassName,\n displayNameContainerClassName,\n iconClassName\n} from './styles/Captions.style';\nimport {
|
1
|
+
{"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,iCAAiC,EACjC,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACd,MAAM,yBAAyB,CAAC;AAgBjC;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEnE,MAAM,cAAc,GAAa;QAC/B,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,KAAK;QAC1B,uBAAuB,EAAE,IAAI;QAC7B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,MAAM,EAAE,SAAS;aAClB;SACF;KACF,CAAC;IAEF,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IAEjH,OAAO,CACL,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO;QAC7D,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,CAAC,IAAI,IAAC,SAAS,EAAE,6BAA6B;gBAClD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ,CAChD;YACb,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,WAAW,CACD,CACP,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { OnRenderAvatarCallback } from '../types';\nimport {\n captionClassName,\n captionsContentContainerClassName,\n displayNameClassName,\n displayNameContainerClassName,\n iconClassName\n} from './styles/Captions.style';\nimport { CaptionsInformation } from './CaptionsBanner';\n\n/**\n * @internal\n * Props for a single line of caption.\n */\nexport interface _CaptionProps extends CaptionsInformation {\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n}\n\n/**\n * @internal\n * A component for displaying a single line of caption\n */\nexport const _Caption = (props: _CaptionProps): JSX.Element => {\n const { displayName, userId, captionText, onRenderAvatar } = props;\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 horizontal verticalAlign=\"start\" horizontalAlign=\"start\">\n <Stack.Item className={iconClassName}>{userIcon}</Stack.Item>\n\n <Stack verticalAlign=\"start\" className={captionsContentContainerClassName}>\n <Stack.Item className={displayNameContainerClassName}>\n <Text className={displayNameClassName}>{displayName}</Text>\n </Stack.Item>\n <Stack.Item className={captionClassName} dir=\"auto\">\n {captionText}\n </Stack.Item>\n </Stack>\n </Stack>\n );\n};\n"]}
|
@@ -1,29 +1,54 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { OnRenderAvatarCallback } from '../types';
|
3
3
|
/**
|
4
|
-
* @
|
4
|
+
* @public
|
5
5
|
* information required for each line of caption
|
6
6
|
*/
|
7
|
-
export type
|
7
|
+
export type CaptionsInformation = {
|
8
|
+
/**
|
9
|
+
* unique id for each caption
|
10
|
+
*/
|
8
11
|
id: string;
|
12
|
+
/**
|
13
|
+
* speaker's display name
|
14
|
+
*/
|
9
15
|
displayName: string;
|
16
|
+
/**
|
17
|
+
* content of the caption
|
18
|
+
*/
|
10
19
|
captionText: string;
|
20
|
+
/**
|
21
|
+
* id of the speaker
|
22
|
+
*/
|
11
23
|
userId?: string;
|
12
24
|
};
|
13
25
|
/**
|
14
|
-
* @
|
26
|
+
* @public
|
15
27
|
* strings for captions banner
|
16
28
|
*/
|
17
|
-
export interface
|
29
|
+
export interface CaptionsBannerStrings {
|
30
|
+
/**
|
31
|
+
* Spinner text for captions banner
|
32
|
+
*/
|
18
33
|
captionsBannerSpinnerText?: string;
|
19
34
|
}
|
20
35
|
/**
|
21
|
-
* @
|
22
|
-
*
|
36
|
+
* @public
|
37
|
+
* CaptionsBanner Component Props.
|
23
38
|
*/
|
24
|
-
export interface
|
25
|
-
|
39
|
+
export interface CaptionsBannerProps {
|
40
|
+
/**
|
41
|
+
* Array of captions to be displayed
|
42
|
+
*/
|
43
|
+
captions: CaptionsInformation[];
|
44
|
+
/**
|
45
|
+
* Flag to indicate if captions are on
|
46
|
+
*/
|
26
47
|
isCaptionsOn?: boolean;
|
48
|
+
/**
|
49
|
+
* Flag to indicate if captions are being started
|
50
|
+
* This is used to show spinner while captions are being started
|
51
|
+
*/
|
27
52
|
startCaptionsInProgress?: boolean;
|
28
53
|
/**
|
29
54
|
* Optional callback to override render of the avatar.
|
@@ -31,19 +56,25 @@ export interface _CaptionsBannerProps {
|
|
31
56
|
* @param userId - user Id
|
32
57
|
*/
|
33
58
|
onRenderAvatar?: OnRenderAvatarCallback;
|
34
|
-
|
59
|
+
/**
|
60
|
+
* Optional strings for the component
|
61
|
+
*/
|
62
|
+
strings?: CaptionsBannerStrings;
|
35
63
|
/**
|
36
64
|
* Optional form factor for the component.
|
37
65
|
* @defaultValue 'default'
|
38
66
|
*/
|
39
67
|
formFactor?: 'default' | 'compact';
|
68
|
+
/**
|
69
|
+
* Optional options for the component.
|
70
|
+
*/
|
40
71
|
captionsOptions?: {
|
41
72
|
height: 'full' | 'default';
|
42
73
|
};
|
43
74
|
}
|
44
75
|
/**
|
45
|
-
* @
|
76
|
+
* @public
|
46
77
|
* A component for displaying a CaptionsBanner with user icon, displayName and captions text.
|
47
78
|
*/
|
48
|
-
export declare const
|
79
|
+
export declare const CaptionsBanner: (props: CaptionsBannerProps) => JSX.Element;
|
49
80
|
//# sourceMappingURL=CaptionsBanner.d.ts.map
|
@@ -4,13 +4,16 @@ import { Stack, FocusZone, Spinner, useTheme } from '@fluentui/react';
|
|
4
4
|
import React, { useEffect, useRef, useState, useCallback } from 'react';
|
5
5
|
import { _Caption } from './Caption';
|
6
6
|
import { captionContainerClassName, captionsBannerClassName, captionsBannerFullHeightClassName, captionsContainerClassName, loadingBannerFullHeightStyles, loadingBannerStyles } from './styles/Captions.style';
|
7
|
+
import { useLocale } from '../localization';
|
7
8
|
const SCROLL_OFFSET_ALLOWANCE = 20;
|
8
9
|
/**
|
9
|
-
* @
|
10
|
+
* @public
|
10
11
|
* A component for displaying a CaptionsBanner with user icon, displayName and captions text.
|
11
12
|
*/
|
12
|
-
export const
|
13
|
-
const { captions, isCaptionsOn, startCaptionsInProgress, onRenderAvatar,
|
13
|
+
export const CaptionsBanner = (props) => {
|
14
|
+
const { captions, isCaptionsOn, startCaptionsInProgress, onRenderAvatar, formFactor = 'default', captionsOptions } = props;
|
15
|
+
const localeStrings = useLocale().strings.captionsBanner;
|
16
|
+
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
14
17
|
const captionsScrollDivRef = useRef(null);
|
15
18
|
const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState(true);
|
16
19
|
const theme = useTheme();
|
@@ -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,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;
|
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,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;AA6E5C,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAe,EAAE;IACxE,MAAM,EACJ,QAAQ,EACR,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,UAAU,GAAG,SAAS,EACtB,eAAe,EAChB,GAAG,KAAK,CAAC;IACV,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC;IACzD,MAAM,OAAO,mCAAQ,aAAa,GAAK,KAAK,CAAC,OAAO,CAAE,CAAC;IACvD,MAAM,oBAAoB,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC5D,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAU,IAAI,CAAC,CAAC;IAC5E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,cAAc,GAAG,GAAS,EAAE;QAChC,IAAI,oBAAoB,CAAC,OAAO,EAAE,CAAC;YACjC,oBAAo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AAf,eAAe,uBAAf,eAAe,CAAE,MAAM,MAAK,MAAM;gBAChC,CAAC,CAAC,iCAAiC,CAAC,KAAK,CAAC;gBAC1C,CAAC,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAE9B,uBAAuB,IAEjC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YACxB,OAAO,CACL,4BAAI,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,yBAAyB,uBAAqB,IAAI;gBAChF,oBAAC,QAAQ,oBAAK,OAAO,IAAE,cAAc,EAAE,cAAc,IAAI,CACtD,CACN,CAAC;QACJ,CAAC,CAAC,CACC,CACN;QACA,CAAC,YAAY,IAAI,CAChB,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';\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\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};\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}\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 /**\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}\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 } = 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\n return (\n <>\n {startCaptionsInProgress && (\n <FocusZone className={captionsContainerClassName} data-ui-id=\"captions-banner\">\n {isCaptionsOn && (\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 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 {!isCaptionsOn && (\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"]}
|