@azure/communication-react 1.17.0-alpha-202405250013 → 1.17.0-alpha-202405280013

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/communication-react.d.ts +16 -18
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D6ea1yzU.js → ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D6ea1yzU.js.map → ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-TueLs8OS.js → RichTextSendBoxWrapper-DZz_bfUw.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-TueLs8OS.js.map → RichTextSendBoxWrapper-DZz_bfUw.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-Bj8WXYGE.js → index-DzeOTGqS.js} +46 -24
  7. package/dist/dist-cjs/communication-react/index-DzeOTGqS.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +5 -5
  12. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +18 -7
  13. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +1 -1
  18. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  20. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +1 -0
  21. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/Announcer.js +1 -1
  23. package/dist/dist-esm/react-components/src/components/Announcer.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
  25. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +2 -2
  27. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -0
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -5
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +5 -4
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +5 -7
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +18 -2
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/dist-cjs/communication-react/index-Bj8WXYGE.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Bj8WXYGE.js');
3
+ var index = require('./index-DzeOTGqS.js');
4
4
  require('react');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-components');
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.17.0-alpha-202405250013';
5
+ module.exports = '1.17.0-alpha-202405280013';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -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.17.0-alpha-202405250013';\n"]}
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.17.0-alpha-202405280013';\n"]}
@@ -11,7 +11,7 @@ import { CommonCallingHandlers, VideoBackgroundEffectsDependency } from './creat
11
11
  * Calling related components from this package are able to pick out relevant handlers from this object.
12
12
  * See {@link useHandlers} and {@link usePropsFor}.
13
13
  *
14
- * @beta
14
+ * @public
15
15
  */
16
16
  export interface TeamsCallingHandlers extends CommonCallingHandlers {
17
17
  onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;
@@ -22,11 +22,11 @@ export interface TeamsCallingHandlers extends CommonCallingHandlers {
22
22
  * Useful when implementing a custom component that utilizes the providers
23
23
  * exported from this library.
24
24
  *
25
- * @beta
25
+ * @public
26
26
  */
27
- export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent, deviceManager: StatefulDeviceManager | undefined, call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall, options?: {
27
+ export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent?: TeamsCallAgent, deviceManager?: StatefulDeviceManager, call?: TeamsCall, options?: {
28
28
  onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;
29
- }) => never | TeamsCallingHandlers;
29
+ }) => TeamsCallingHandlers;
30
30
  /**
31
31
  * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with
32
32
  * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and
@@ -39,7 +39,7 @@ export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCal
39
39
  * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
40
40
  * @param _ - React component that you want to generate handlers for.
41
41
  *
42
- * @beta
42
+ * @public
43
43
  */
44
44
  export declare const createTeamsCallingHandlersForComponent: <Props>(callClient: StatefulCallClient, callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent, deviceManager: StatefulDeviceManager | undefined, call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall, _Component: (props: Props) => ReactElement | null) => Common<TeamsCallingHandlers, Props>;
45
45
  //# sourceMappingURL=createTeamsCallHandlers.d.ts.map
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  });
11
11
  };
12
12
  import { isCommunicationUserIdentifier, isMicrosoftTeamsAppIdentifier } from '@azure/communication-common';
13
- /* @conditional-compile-remove(teams-identity-support) */
13
+ /* @conditional-compile-remove(PSTN-calls) */
14
14
  import { isPhoneNumberIdentifier } from '@azure/communication-common';
15
15
  import { _toCommunicationIdentifier } from "../../../acs-ui-common/src";
16
16
  import memoizeOne from 'memoize-one';
@@ -22,22 +22,24 @@ import { createDefaultCommonCallingHandlers } from './createCommonHandlers';
22
22
  * Useful when implementing a custom component that utilizes the providers
23
23
  * exported from this library.
24
24
  *
25
- * @beta
25
+ * @public
26
26
  */
27
27
  export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, deviceManager, call, options) => {
28
28
  return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call, options)), { onStartCall: (participants, options) => {
29
- /* @conditional-compile-remove(teams-identity-support) */
29
+ /* @conditional-compile-remove(teams-identity-support-beta) */
30
30
  const threadId = options === null || options === void 0 ? void 0 : options.threadId;
31
31
  if (!isTeamsCallParticipants(participants)) {
32
32
  throw new Error('CommunicationIdentifier in Teams call is not supported!');
33
33
  }
34
- /* @conditional-compile-remove(teams-identity-support) */
35
34
  if (callAgent) {
36
- return callAgent.startCall(participants, threadId ? { threadId } : undefined);
35
+ /* @conditional-compile-remove(teams-identity-support-beta) */
36
+ return callAgent.startCall(participants, threadId ? Object.assign({ threadId }, options) : undefined);
37
+ /* @conditional-compile-remove(teams-identity-support) */
38
+ // Remove when teams identity in stable support multiple participants
39
+ return teamsSingleParticipantTrampoline(callAgent, participants, options);
37
40
  }
38
41
  return undefined;
39
42
  },
40
- /* @conditional-compile-remove(teams-identity-support) */
41
43
  /* @conditional-compile-remove(PSTN-calls) */
42
44
  onAddParticipant: (userId, options) => __awaiter(void 0, void 0, void 0, function* () {
43
45
  const participant = _toCommunicationIdentifier(userId);
@@ -79,9 +81,18 @@ export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAge
79
81
  * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
80
82
  * @param _ - React component that you want to generate handlers for.
81
83
  *
82
- * @beta
84
+ * @public
83
85
  */
84
86
  export const createTeamsCallingHandlersForComponent = (callClient, callAgent, deviceManager, call, _Component) => {
85
87
  return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);
86
88
  };
89
+ /* @conditional-compile-remove(teams-identity-support) */
90
+ const teamsSingleParticipantTrampoline = (callAgent, participants, options) => {
91
+ if (participants.length !== 1) {
92
+ throw new Error('Only one participant is supported in Teams call!');
93
+ }
94
+ else {
95
+ return callAgent.startCall(participants[0], options);
96
+ }
97
+ };
87
98
  //# sourceMappingURL=createTeamsCallHandlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createTeamsCallHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAQlC,OAAO,EAEL,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AACrC,yDAAyD;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAU,0BAA0B,EAAE,mCAAgC;AAE7E,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,kCAAkC,EAGnC,MAAM,wBAAwB,CAAC;AAgBhC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,UAAU,CACzD,CACE,UAA8B,EAC9B,SAA+F,EAC/F,aAAgD,EAChD,IAAqF,EACrF,OAEC,EAC6B,EAAE;IAChC,uCACK,kCAAkC,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,KAC/E,WAAW,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE;YACrC,yDAAyD;YACzD,MAAM,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC;YACnC,IAAI,CAAC,uBAA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,6BAA6B,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;YAC7E,CAAC;YAED,IAAI,6BAA6B,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;YAC/E,CAAC;YACD,yDAAyD;YACzD,MAAM,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA,CAAC;QAC7C,CAAC,CAAA,IACD;AACJ,CAAC,CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACpD,UAA8B,EAC9B,SAA+F,EAC/F,aAAgD,EAChD,IAAqF,EACrF,UAAiD,EACZ,EAAE;IACvC,OAAO,iCAAiC,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AACvF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StartCallOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall, TeamsCallAgent } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsAppIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { Common, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { ReactElement } from 'react';\nimport { isTeamsCallParticipants } from '../utils/callUtils';\nimport {\n createDefaultCommonCallingHandlers,\n CommonCallingHandlers,\n VideoBackgroundEffectsDependency\n} from './createCommonHandlers';\n/**\n * Object containing all the teams call handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @beta\n */\nexport interface TeamsCallingHandlers extends CommonCallingHandlers {\n onStartCall: (\n participants: CommunicationIdentifier[],\n options?: StartCallOptions\n ) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * Create the default implementation of {@link TeamsCallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @beta\n */\nexport const createDefaultTeamsCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent,\n deviceManager: StatefulDeviceManager | undefined,\n call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n }\n ): never | TeamsCallingHandlers => {\n return {\n ...createDefaultCommonCallingHandlers(callClient, deviceManager, call, options),\n onStartCall: (participants, options) => {\n /* @conditional-compile-remove(teams-identity-support) */\n const threadId = options?.threadId;\n if (!isTeamsCallParticipants(participants)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n if (callAgent) {\n return callAgent.startCall(participants, threadId ? { threadId } : undefined);\n }\n return undefined;\n },\n /* @conditional-compile-remove(teams-identity-support) */\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n /* @conditional-compile-remove(teams-identity-support) */\n const threadId = options?.threadId;\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Adding Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, threadId ? { threadId } : undefined);\n }\n /* @conditional-compile-remove(teams-identity-support) */\n call?.addParticipant(participant);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Removing Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n await call?.removeParticipant(participant);\n }\n };\n }\n);\n\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @beta\n */\nexport const createTeamsCallingHandlersForComponent = <Props>(\n callClient: StatefulCallClient,\n callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent,\n deviceManager: StatefulDeviceManager | undefined,\n call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall,\n _Component: (props: Props) => ReactElement | null\n): Common<TeamsCallingHandlers, Props> => {\n return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);\n};\n"]}
1
+ {"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createTeamsCallHandlers.ts"],"names":[],"mappings":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AEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACpD,UAA8B,EAC9B,SAA+F,EAC/F,aAAgD,EAChD,IAAqF,EACrF,UAAiD,EACZ,EAAE;IACvC,OAAO,iCAAiC,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AACvF,CAAC,CAAC;AAEF,yDAAyD;AACzD,MAAM,gCAAgC,GAAG,CACvC,SAAyB,EACzB,YAAuC,EACvC,OAA+B,EACpB,EAAE;IACb,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAQ,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StartCallOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall, TeamsCallAgent, TeamsCallAgentOptions } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsAppIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { Common, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { ReactElement } from 'react';\nimport { isTeamsCallParticipants } from '../utils/callUtils';\nimport {\n createDefaultCommonCallingHandlers,\n CommonCallingHandlers,\n VideoBackgroundEffectsDependency\n} from './createCommonHandlers';\n/**\n * Object containing all the teams call handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface TeamsCallingHandlers extends CommonCallingHandlers {\n onStartCall: (\n participants: CommunicationIdentifier[],\n options?: StartCallOptions\n ) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * Create the default implementation of {@link TeamsCallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultTeamsCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent?: TeamsCallAgent,\n deviceManager?: StatefulDeviceManager,\n call?: TeamsCall,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n }\n ): TeamsCallingHandlers => {\n return {\n ...createDefaultCommonCallingHandlers(callClient, deviceManager, call, options),\n onStartCall: (participants, options) => {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n const threadId = options?.threadId;\n if (!isTeamsCallParticipants(participants)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n if (callAgent) {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n return callAgent.startCall(participants, threadId ? { threadId, ...options } : undefined);\n /* @conditional-compile-remove(teams-identity-support) */\n // Remove when teams identity in stable support multiple participants\n return teamsSingleParticipantTrampoline(callAgent as TeamsCallAgent, participants, options);\n }\n\n return undefined;\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n /* @conditional-compile-remove(teams-identity-support) */\n const threadId = options?.threadId;\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Adding Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, threadId ? { threadId } : undefined);\n }\n /* @conditional-compile-remove(teams-identity-support) */\n call?.addParticipant(participant);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Removing Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n await call?.removeParticipant(participant);\n }\n };\n }\n);\n\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @public\n */\nexport const createTeamsCallingHandlersForComponent = <Props>(\n callClient: StatefulCallClient,\n callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent,\n deviceManager: StatefulDeviceManager | undefined,\n call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall,\n _Component: (props: Props) => ReactElement | null\n): Common<TeamsCallingHandlers, Props> => {\n return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\nconst teamsSingleParticipantTrampoline = (\n callAgent: TeamsCallAgent,\n participants: CommunicationIdentifier[],\n options?: TeamsCallAgentOptions\n): TeamsCall => {\n if (participants.length !== 1) {\n throw new Error('Only one participant is supported in Teams call!');\n } else {\n return callAgent.startCall(participants[0] as any, options);\n }\n};\n"]}
@@ -43,7 +43,7 @@ export declare const useCallAgent: () => CallAgent | undefined;
43
43
  * Useful when implementing a custom component that utilizes the providers
44
44
  * exported from this library.
45
45
  *
46
- * @beta
46
+ * @public
47
47
  */
48
48
  export declare const useTeamsCallAgent: () => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;
49
49
  //# sourceMappingURL=CallAgentProvider.d.ts.map
@@ -43,7 +43,7 @@ export const useCallAgent = () => {
43
43
  * Useful when implementing a custom component that utilizes the providers
44
44
  * exported from this library.
45
45
  *
46
- * @beta
46
+ * @public
47
47
  */
48
48
  export const useTeamsCallAgent = () => {
49
49
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"CallAgentProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallAgentProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASzD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAmC,SAAS,CAAC,CAAC;AAY3F,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5B,MAAM,YAAY,GAAyB;QACzC,SAAS;KACV,CAAC;IAEF,OAAO,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAC,QAAQ,CAA6B,CAAC;AACtG,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE,CAAC,oBAAC,qBAAqB,oBAAK,KAAK,EAAI,CAAC;AAEtH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAA0B,EAAE;;IACtD,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAE4C,EAAE;;IAC7E,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { _isACSCallAgent } from '@internal/calling-stateful-client';\nimport React, { createContext, useContext } from 'react';\n\n/**\n * @private\n */\nexport type CallAgentContextType = {\n callAgent: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent | undefined;\n};\n\n/**\n * @private\n */\nexport const CallAgentContext = createContext<CallAgentContextType | undefined>(undefined);\n\n/**\n * Arguments to initialize a {@link CallAgentProvider}.\n *\n * @public\n */\nexport interface CallAgentProviderProps {\n children: React.ReactNode;\n callAgent?: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;\n}\n\nconst CallAgentProviderBase = (props: CallAgentProviderProps): JSX.Element => {\n const { callAgent } = props;\n\n const initialState: CallAgentContextType = {\n callAgent\n };\n\n return <CallAgentContext.Provider value={initialState}>{props.children}</CallAgentContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.\n *\n * Calling components from this package must be wrapped with a {@link CallAgentProvider}.\n *\n * @public\n */\nexport const CallAgentProvider = (props: CallAgentProviderProps): JSX.Element => <CallAgentProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallAgent = (): CallAgent | undefined => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && !_isACSCallAgent(callAgent)) {\n throw new Error('TeamsCallAgent object was provided, try useTeamsCall() instead');\n }\n return callAgent;\n};\n\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @beta\n */\nexport const useTeamsCallAgent = ():\n | undefined\n | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && _isACSCallAgent(callAgent)) {\n throw new Error('Regular CallAgent object was provided, try useCall() instead');\n }\n return callAgent;\n};\n"]}
1
+ {"version":3,"file":"CallAgentProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallAgentProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASzD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAmC,SAAS,CAAC,CAAC;AAY3F,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5B,MAAM,YAAY,GAAyB;QACzC,SAAS;KACV,CAAC;IAEF,OAAO,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAC,QAAQ,CAA6B,CAAC;AACtG,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE,CAAC,oBAAC,qBAAqB,oBAAK,KAAK,EAAI,CAAC;AAEtH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAA0B,EAAE;;IACtD,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAE4C,EAAE;;IAC7E,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { _isACSCallAgent } from '@internal/calling-stateful-client';\nimport React, { createContext, useContext } from 'react';\n\n/**\n * @private\n */\nexport type CallAgentContextType = {\n callAgent: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent | undefined;\n};\n\n/**\n * @private\n */\nexport const CallAgentContext = createContext<CallAgentContextType | undefined>(undefined);\n\n/**\n * Arguments to initialize a {@link CallAgentProvider}.\n *\n * @public\n */\nexport interface CallAgentProviderProps {\n children: React.ReactNode;\n callAgent?: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;\n}\n\nconst CallAgentProviderBase = (props: CallAgentProviderProps): JSX.Element => {\n const { callAgent } = props;\n\n const initialState: CallAgentContextType = {\n callAgent\n };\n\n return <CallAgentContext.Provider value={initialState}>{props.children}</CallAgentContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.\n *\n * Calling components from this package must be wrapped with a {@link CallAgentProvider}.\n *\n * @public\n */\nexport const CallAgentProvider = (props: CallAgentProviderProps): JSX.Element => <CallAgentProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallAgent = (): CallAgent | undefined => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && !_isACSCallAgent(callAgent)) {\n throw new Error('TeamsCallAgent object was provided, try useTeamsCall() instead');\n }\n return callAgent;\n};\n\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useTeamsCallAgent = ():\n | undefined\n | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && _isACSCallAgent(callAgent)) {\n throw new Error('Regular CallAgent object was provided, try useCall() instead');\n }\n return callAgent;\n};\n"]}
@@ -47,7 +47,7 @@ export declare const useCall: () => Call | undefined;
47
47
  *
48
48
  * you must have previously used the CallProvider with a TeamsCall object to use this hook
49
49
  *
50
- * @beta
50
+ * @public
51
51
  */
52
52
  export declare const useTeamsCall: () => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;
53
53
  //# sourceMappingURL=CallProvider.d.ts.map
@@ -51,7 +51,7 @@ export const useCall = () => {
51
51
  *
52
52
  * you must have previously used the CallProvider with a TeamsCall object to use this hook
53
53
  *
54
- * @beta
54
+ * @public
55
55
  */
56
56
  export const useTeamsCall = () => {
57
57
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"CallProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,6CAA0C;AAmB7E;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAwB,EAAe,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,YAAY,GAAoB;QACpC,IAAI;KACL,CAAC;IAEF,OAAO,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAwB,CAAC;AACtF,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE,CAAC,oBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAC;AAEvG;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAqB,EAAE;;IAC5C,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,yDAAyD;AACzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAoF,EAAE;;IAChH,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext } from 'react';\nimport { Call } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { _isACSCall, _isTeamsCall } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport type CallContextType = {\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined;\n};\n\n/**\n * Arguments to initialize a {@link CallProvider}.\n *\n * @public\n */\nexport interface CallProviderProps {\n children: React.ReactNode;\n call?: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * @private\n */\nexport const CallContext = createContext<CallContextType | undefined>(undefined);\n\n/**\n * @private\n */\nconst CallProviderBase = (props: CallProviderProps): JSX.Element => {\n const { children, call } = props;\n\n const initialState: CallContextType = {\n call\n };\n\n return <CallContext.Provider value={initialState}>{children}</CallContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.\n *\n * Calling components from this package must be wrapped with a {@link CallProvider}.\n *\n * @public\n */\nexport const CallProvider = (props: CallProviderProps): JSX.Element => <CallProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#Call} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a Call object to use this hook\n *\n * @public\n */\nexport const useCall = (): Call | undefined => {\n const call = useContext(CallContext)?.call;\n if (call && !_isACSCall(call)) {\n throw new Error('Incorrect call type: Must provide a Regular Call object.');\n }\n return call;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCall} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a TeamsCall object to use this hook\n *\n * @beta\n */\nexport const useTeamsCall = (): undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall => {\n const call = useContext(CallContext)?.call;\n if (call && !_isTeamsCall(call)) {\n throw new Error('Incorrect call type: Must provide a TeamsCall object.');\n }\n return call;\n};\n"]}
1
+ {"version":3,"file":"CallProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,6CAA0C;AAmB7E;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAwB,EAAe,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,YAAY,GAAoB;QACpC,IAAI;KACL,CAAC;IAEF,OAAO,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAwB,CAAC;AACtF,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE,CAAC,oBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAC;AAEvG;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAqB,EAAE;;IAC5C,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,yDAAyD;AACzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAoF,EAAE;;IAChH,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext } from 'react';\nimport { Call } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { _isACSCall, _isTeamsCall } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport type CallContextType = {\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined;\n};\n\n/**\n * Arguments to initialize a {@link CallProvider}.\n *\n * @public\n */\nexport interface CallProviderProps {\n children: React.ReactNode;\n call?: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * @private\n */\nexport const CallContext = createContext<CallContextType | undefined>(undefined);\n\n/**\n * @private\n */\nconst CallProviderBase = (props: CallProviderProps): JSX.Element => {\n const { children, call } = props;\n\n const initialState: CallContextType = {\n call\n };\n\n return <CallContext.Provider value={initialState}>{children}</CallContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.\n *\n * Calling components from this package must be wrapped with a {@link CallProvider}.\n *\n * @public\n */\nexport const CallProvider = (props: CallProviderProps): JSX.Element => <CallProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#Call} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a Call object to use this hook\n *\n * @public\n */\nexport const useCall = (): Call | undefined => {\n const call = useContext(CallContext)?.call;\n if (call && !_isACSCall(call)) {\n throw new Error('Incorrect call type: Must provide a Regular Call object.');\n }\n return call;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCall} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a TeamsCall object to use this hook\n *\n * @public\n */\nexport const useTeamsCall = (): undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall => {\n const call = useContext(CallContext)?.call;\n if (call && !_isTeamsCall(call)) {\n throw new Error('Incorrect call type: Must provide a TeamsCall object.');\n }\n return call;\n};\n"]}
@@ -14,6 +14,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
14
14
  get(target, prop) {
15
15
  /* @conditional-compile-remove(teams-identity-support) */
16
16
  switch (prop) {
17
+ /* @conditional-compile-remove(PSTN-calls) */
17
18
  case 'addParticipant': {
18
19
  return this.getContext().withAsyncErrorTeedToState(function (...args) {
19
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"TeamsCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAe1D,MAAM,cAAe,SAAQ,eAAe;IACnC,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,yDAAyD;QACzD,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,gBAAgB,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,yBAAyB,CAAC,UACjD,GAAG,IAA6C;;wBAEhD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;oBAC9C,CAAC;iBAAA,EACD,0BAA0B,CAAC,CAAC;YAC9B,CAAC;YACD;gBACE,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAe,EAAE,OAAoB,EAAwB,EAAE;IAClG,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;QACzC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,CAAyB,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ProxyCallCommon } from './CallDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { TeamsCall } from './BetaToStableTypes';\n\n/**\n *\n * @private\n */\nexport type DeclarativeTeamsCall = TeamsCall & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\nclass ProxyTeamsCall extends ProxyCallCommon implements ProxyHandler<TeamsCall> {\n public get<P extends keyof TeamsCall>(target: TeamsCall, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n switch (prop) {\n case 'addParticipant': {\n return this.getContext().withAsyncErrorTeedToState(async function (\n ...args: Parameters<TeamsCall['addParticipant']>\n ) {\n return await target.addParticipant(...args);\n },\n 'TeamsCall.addParticipant');\n }\n default:\n return super.get(target, prop as any);\n }\n return super.get(target, prop as any);\n }\n}\n\n/**\n * Creates a declarative Call by proxying Call with ProxyCall.\n * This should only be used with CallAgentDeclarative as CallAgentDeclarative will add that\n * call to the context properly (need to have the Call in context to update it - CallAgentDeclarative will add Call to\n * context)\n *\n * @param call - TeamsCall from SDK\n * @param context - CallContext from StatefulCallClient\n */\nexport const teamsCallDeclaratify = (call: TeamsCall, context: CallContext): DeclarativeTeamsCall => {\n const proxyCall = new ProxyTeamsCall(context);\n proxyCall.unsubscribe();\n Object.defineProperty(call, 'unsubscribe', {\n configurable: false,\n value: () => proxyCall.unsubscribe()\n });\n\n return new Proxy(call, proxyCall) as DeclarativeTeamsCall;\n};\n"]}
1
+ {"version":3,"file":"TeamsCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAe1D,MAAM,cAAe,SAAQ,eAAe;IACnC,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,yDAAyD;QACzD,QAAQ,IAAI,EAAE,CAAC;YACb,6CAA6C;YAC7C,KAAK,gBAAgB,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,yBAAyB,CAAC,UACjD,GAAG,IAA6C;;wBAEhD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;oBAC9C,CAAC;iBAAA,EACD,0BAA0B,CAAC,CAAC;YAC9B,CAAC;YACD;gBACE,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAe,EAAE,OAAoB,EAAwB,EAAE;IAClG,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;QACzC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,CAAyB,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ProxyCallCommon } from './CallDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { TeamsCall } from './BetaToStableTypes';\n\n/**\n *\n * @private\n */\nexport type DeclarativeTeamsCall = TeamsCall & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\nclass ProxyTeamsCall extends ProxyCallCommon implements ProxyHandler<TeamsCall> {\n public get<P extends keyof TeamsCall>(target: TeamsCall, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n switch (prop) {\n /* @conditional-compile-remove(PSTN-calls) */\n case 'addParticipant': {\n return this.getContext().withAsyncErrorTeedToState(async function (\n ...args: Parameters<TeamsCall['addParticipant']>\n ) {\n return await target.addParticipant(...args);\n },\n 'TeamsCall.addParticipant');\n }\n default:\n return super.get(target, prop as any);\n }\n return super.get(target, prop as any);\n }\n}\n\n/**\n * Creates a declarative Call by proxying Call with ProxyCall.\n * This should only be used with CallAgentDeclarative as CallAgentDeclarative will add that\n * call to the context properly (need to have the Call in context to update it - CallAgentDeclarative will add Call to\n * context)\n *\n * @param call - TeamsCall from SDK\n * @param context - CallContext from StatefulCallClient\n */\nexport const teamsCallDeclaratify = (call: TeamsCall, context: CallContext): DeclarativeTeamsCall => {\n const proxyCall = new ProxyTeamsCall(context);\n proxyCall.unsubscribe();\n Object.defineProperty(call, 'unsubscribe', {\n configurable: false,\n value: () => proxyCall.unsubscribe()\n });\n\n return new Proxy(call, proxyCall) as DeclarativeTeamsCall;\n};\n"]}
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  */
9
9
  export const Announcer = (props) => {
10
10
  const { announcementString, ariaLive } = props;
11
- return React.createElement(Stack, { "aria-label": announcementString, "aria-live": ariaLive, styles: announcerStyles });
11
+ return React.createElement(Stack, { "aria-label": announcementString, "aria-live": ariaLive, role: "status", styles: announcerStyles });
12
12
  };
13
13
  /**
14
14
  * Styles to hide the announcer from view but still existing on the DOM tree it so that narration can happen.
@@ -1 +1 @@
1
- {"version":3,"file":"Announcer.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/Announcer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAe,EAAE;IAC9D,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE/C,OAAO,oBAAC,KAAK,kBAAa,kBAAkB,eAAa,QAAQ,EAAE,MAAM,EAAE,eAAe,GAAU,CAAC;AACvG,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAAiB;IACpC,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,CAAC;KACV;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStackStyles, Stack } from '@fluentui/react';\nimport React from 'react';\n\n/**\n * @internal\n * aria props for this hidden component.\n */\nexport type AnnouncerProps = {\n announcementString?: string;\n ariaLive: 'off' | 'polite' | 'assertive' | undefined;\n};\n\n/**\n * @internal\n * Announcer component to maker aria announcements on actions\n */\nexport const Announcer = (props: AnnouncerProps): JSX.Element => {\n const { announcementString, ariaLive } = props;\n\n return <Stack aria-label={announcementString} aria-live={ariaLive} styles={announcerStyles}></Stack>;\n};\n\n/**\n * Styles to hide the announcer from view but still existing on the DOM tree it so that narration can happen.\n */\nconst announcerStyles: IStackStyles = {\n root: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0,0,0,0)',\n whiteSpace: 'nowrap',\n border: 0\n }\n};\n"]}
1
+ {"version":3,"file":"Announcer.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/Announcer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAe,EAAE;IAC9D,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE/C,OAAO,oBAAC,KAAK,kBAAa,kBAAkB,eAAa,QAAQ,EAAE,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAE,eAAe,GAAU,CAAC;AACrH,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAAiB;IACpC,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,CAAC;KACV;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStackStyles, Stack } from '@fluentui/react';\nimport React from 'react';\n\n/**\n * @internal\n * aria props for this hidden component.\n */\nexport type AnnouncerProps = {\n announcementString?: string;\n ariaLive: 'off' | 'polite' | 'assertive' | undefined;\n};\n\n/**\n * @internal\n * Announcer component to maker aria announcements on actions\n */\nexport const Announcer = (props: AnnouncerProps): JSX.Element => {\n const { announcementString, ariaLive } = props;\n\n return <Stack aria-label={announcementString} aria-live={ariaLive} role=\"status\" styles={announcerStyles}></Stack>;\n};\n\n/**\n * Styles to hide the announcer from view but still existing on the DOM tree it so that narration can happen.\n */\nconst announcerStyles: IStackStyles = {\n root: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0,0,0,0)',\n whiteSpace: 'nowrap',\n border: 0\n }\n};\n"]}
@@ -31,6 +31,6 @@ export const ControlBarButton = (props) => {
31
31
  : (_l = props === null || props === void 0 ? void 0 : props.strings) === null || _l === void 0 ? void 0 : _l.tooltipOffContent);
32
32
  const tooltipId = ((_m = props.tooltipId) !== null && _m !== void 0 ? _m : props.labelKey) ? props.labelKey + '-tooltip' : undefined;
33
33
  return (React.createElement(ControlButtonTooltip, { hidden: props.disableTooltip, content: tooltipContent, id: tooltipId },
34
- React.createElement(DefaultButton, Object.assign({}, props, { styles: componentStyles, onRenderText: props.showLabel && props.onRenderText ? props.onRenderText : undefined, onRenderIcon: (_o = props.onRenderIcon) !== null && _o !== void 0 ? _o : DefaultRenderIcon, ariaLabel: (_r = (_q = (_p = props.splitButtonAriaLabel) !== null && _p !== void 0 ? _p : props.ariaLabel) !== null && _q !== void 0 ? _q : tooltipContent) !== null && _r !== void 0 ? _r : labelText, allowDisabledFocus: (_s = props.allowDisabledFocus) !== null && _s !== void 0 ? _s : true, menuTriggerKeyCode: KeyCodes.down, text: undefined }), props.showLabel ? labelText : React.createElement(React.Fragment, null))));
34
+ React.createElement(DefaultButton, Object.assign({}, props, { styles: componentStyles, onRenderText: props.showLabel && props.onRenderText ? props.onRenderText : undefined, onRenderIcon: (_o = props.onRenderIcon) !== null && _o !== void 0 ? _o : DefaultRenderIcon, ariaLabel: (_r = (_q = (_p = props.splitButtonAriaLabel) !== null && _p !== void 0 ? _p : props.ariaLabel) !== null && _q !== void 0 ? _q : labelText) !== null && _r !== void 0 ? _r : tooltipContent, allowDisabledFocus: (_s = props.allowDisabledFocus) !== null && _s !== void 0 ? _s : true, menuTriggerKeyCode: KeyCodes.down, text: undefined }), props.showLabel ? labelText : React.createElement(React.Fragment, null))));
35
35
  };
36
36
  //# sourceMappingURL=ControlBarButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ControlBarButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ControlBarButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,eAAe,EAEf,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAkG9D,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAsB,EAAE;IAC9E,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO;QACnB,CAAC,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc;YACrB,CAAC,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAE;YACzB,CAAC,CAAC,IAAI;QACR,CAAC,CAAC,C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SAAS,GAAG,CAAA,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK,CAAC,QAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9F,OAAO,CACL,oBAAC,oBAAoB,IAAC,MAAM,EAAE,KAAK,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS;QACxF,oBAAC,aAAa,oBACR,KAAK,IACT,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACpF,YAAY,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,iBAAiB,EACrD,SAAS,EAAE,MAAA,MAAA,MAAA,KAAK,CAAC,oBAAoB,mCAAI,KAAK,CAAC,SAAS,mCAAI,cAAc,mCAAI,SAAS,EACvF,kBAAkB,EAAE,MAAA,KAAK,CAAC,kBAAkB,mCAAI,IAAI,EACpD,kBAAkB,EAAE,QAAQ,CAAC,IAAI,EACjC,IAAI,EAAE,SAAS,KAEd,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,yCAAK,CACtB,CACK,CACxB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport {\n DefaultButton,\n IButtonProps,\n IRenderFunction,\n concatStyleSets,\n IButtonStyles,\n KeyCodes\n} from '@fluentui/react';\nimport { controlButtonStyles } from './styles/ControlBar.styles';\nimport { ControlButtonTooltip } from './ControlButtonTooltip';\n\n/**\n * Strings of {@link ControlBarButton} that can be overridden.\n *\n * @public\n */\nexport interface ControlBarButtonStrings {\n /**\n * Label of the button. This supersedes onLabel or offLabel if used.\n */\n label?: string;\n /**\n * Label of the button shown when the button is checked.\n */\n onLabel?: string;\n /**\n * Label of the button shown when the button is not checked.\n */\n offLabel?: string;\n /**\n * Tooltip content of the button. This supersedes tooltipDisabledContent, tooltipOnContent and tooltipOffContent if used.\n */\n tooltipContent?: string;\n /**\n * Tooltip content when the button is disabled.\n */\n tooltipDisabledContent?: string;\n /**\n * Tooltip content when the button is in the checked state.\n */\n tooltipOnContent?: string;\n /**\n * Tooltip content when the button is in the unchecked state.\n */\n tooltipOffContent?: string;\n}\n\n/**\n * Styles for all {@link ControlBarButton} implementations.\n *\n * @public\n */\nexport type ControlBarButtonStyles = IButtonStyles;\n\n/**\n * Props for {@link ControlBarButton}.\n *\n * @public\n */\nexport interface ControlBarButtonProps extends IButtonProps {\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n\n /**\n * Key to use for the Label component\n */\n labelKey?: string;\n\n /**\n * Disable tooltip.\n *\n * @defaultValue 'false'\n */\n disableTooltip?: boolean;\n\n /**\n * Id to use for the tooltip host.\n *\n * @defaultValue This uses the labelKey and appends -tooltip by default\n */\n tooltipId?: string;\n\n /**\n * Optional strings to override in component.\n */\n strings?: ControlBarButtonStrings;\n\n /**\n * Icon to render when the button is checked.\n */\n onRenderOnIcon?: IRenderFunction<IButtonProps>;\n\n /**\n * Icon to render when the button is not checked.\n */\n onRenderOffIcon?: IRenderFunction<IButtonProps>;\n\n /**\n * Fluent styles, including extensions common to all {@link ControlBarButton}s.\n */\n styles?: ControlBarButtonStyles;\n}\n\nconst DefaultRenderIcon = (props?: ControlBarButtonProps): JSX.Element | null => {\n return props?.checked\n ? props?.onRenderOnIcon\n ? props?.onRenderOnIcon()\n : null\n : props?.onRenderOffIcon\n ? props?.onRenderOffIcon()\n : null;\n};\n\n/**\n * Default button styled for the {@link ControlBar}.\n *\n * Use this component create custom buttons that are styled the same as other buttons provided by the UI Library.\n *\n * @public\n */\nexport const ControlBarButton = (props: ControlBarButtonProps): JSX.Element => {\n const componentStyles = concatStyleSets(controlButtonStyles, props.styles ?? {});\n\n const labelText =\n props?.text ?? props?.strings?.label ?? (props?.checked ? props?.strings?.onLabel : props?.strings?.offLabel);\n\n const tooltipContent =\n props?.strings?.tooltipContent ??\n (props?.disabled\n ? props?.strings?.tooltipDisabledContent\n : props?.checked\n ? props?.strings?.tooltipOnContent\n : props?.strings?.tooltipOffContent);\n\n const tooltipId = props.tooltipId ?? props.labelKey ? props.labelKey + '-tooltip' : undefined;\n\n return (\n <ControlButtonTooltip hidden={props.disableTooltip} content={tooltipContent} id={tooltipId}>\n <DefaultButton\n {...props}\n styles={componentStyles}\n onRenderText={props.showLabel && props.onRenderText ? props.onRenderText : undefined}\n onRenderIcon={props.onRenderIcon ?? DefaultRenderIcon}\n ariaLabel={props.splitButtonAriaLabel ?? props.ariaLabel ?? tooltipContent ?? labelText}\n allowDisabledFocus={props.allowDisabledFocus ?? true}\n menuTriggerKeyCode={KeyCodes.down} // explicitly sets the keypress to activiate the split button drop down.\n text={undefined} // this is handled as a child of the button, without this the `showLabel` prop may be ignored.\n >\n {props.showLabel ? labelText : <></>}\n </DefaultButton>\n </ControlButtonTooltip>\n );\n};\n"]}
1
+ {"version":3,"file":"ControlBarButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ControlBarButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,eAAe,EAEf,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAkG9D,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAsB,EAAE;IAC9E,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO;QACnB,CAAC,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc;YACrB,CAAC,CAAC,KAAK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A,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAE,iBAAiB,CAAC,CAAC;IAEzC,MAAM,SAAS,GAAG,CAAA,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK,CAAC,QAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9F,OAAO,CACL,oBAAC,oBAAoB,IAAC,MAAM,EAAE,KAAK,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS;QACxF,oBAAC,aAAa,oBACR,KAAK,IACT,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACpF,YAAY,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,iBAAiB,EACrD,SAAS,EAAE,MAAA,MAAA,MAAA,KAAK,CAAC,oBAAoB,mCAAI,KAAK,CAAC,SAAS,mCAAI,SAAS,mCAAI,cAAc,EACvF,kBAAkB,EAAE,MAAA,KAAK,CAAC,kBAAkB,mCAAI,IAAI,EACpD,kBAAkB,EAAE,QAAQ,CAAC,IAAI,EACjC,IAAI,EAAE,SAAS,KAEd,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,yCAAK,CACtB,CACK,CACxB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport {\n DefaultButton,\n IButtonProps,\n IRenderFunction,\n concatStyleSets,\n IButtonStyles,\n KeyCodes\n} from '@fluentui/react';\nimport { controlButtonStyles } from './styles/ControlBar.styles';\nimport { ControlButtonTooltip } from './ControlButtonTooltip';\n\n/**\n * Strings of {@link ControlBarButton} that can be overridden.\n *\n * @public\n */\nexport interface ControlBarButtonStrings {\n /**\n * Label of the button. This supersedes onLabel or offLabel if used.\n */\n label?: string;\n /**\n * Label of the button shown when the button is checked.\n */\n onLabel?: string;\n /**\n * Label of the button shown when the button is not checked.\n */\n offLabel?: string;\n /**\n * Tooltip content of the button. This supersedes tooltipDisabledContent, tooltipOnContent and tooltipOffContent if used.\n */\n tooltipContent?: string;\n /**\n * Tooltip content when the button is disabled.\n */\n tooltipDisabledContent?: string;\n /**\n * Tooltip content when the button is in the checked state.\n */\n tooltipOnContent?: string;\n /**\n * Tooltip content when the button is in the unchecked state.\n */\n tooltipOffContent?: string;\n}\n\n/**\n * Styles for all {@link ControlBarButton} implementations.\n *\n * @public\n */\nexport type ControlBarButtonStyles = IButtonStyles;\n\n/**\n * Props for {@link ControlBarButton}.\n *\n * @public\n */\nexport interface ControlBarButtonProps extends IButtonProps {\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n\n /**\n * Key to use for the Label component\n */\n labelKey?: string;\n\n /**\n * Disable tooltip.\n *\n * @defaultValue 'false'\n */\n disableTooltip?: boolean;\n\n /**\n * Id to use for the tooltip host.\n *\n * @defaultValue This uses the labelKey and appends -tooltip by default\n */\n tooltipId?: string;\n\n /**\n * Optional strings to override in component.\n */\n strings?: ControlBarButtonStrings;\n\n /**\n * Icon to render when the button is checked.\n */\n onRenderOnIcon?: IRenderFunction<IButtonProps>;\n\n /**\n * Icon to render when the button is not checked.\n */\n onRenderOffIcon?: IRenderFunction<IButtonProps>;\n\n /**\n * Fluent styles, including extensions common to all {@link ControlBarButton}s.\n */\n styles?: ControlBarButtonStyles;\n}\n\nconst DefaultRenderIcon = (props?: ControlBarButtonProps): JSX.Element | null => {\n return props?.checked\n ? props?.onRenderOnIcon\n ? props?.onRenderOnIcon()\n : null\n : props?.onRenderOffIcon\n ? props?.onRenderOffIcon()\n : null;\n};\n\n/**\n * Default button styled for the {@link ControlBar}.\n *\n * Use this component create custom buttons that are styled the same as other buttons provided by the UI Library.\n *\n * @public\n */\nexport const ControlBarButton = (props: ControlBarButtonProps): JSX.Element => {\n const componentStyles = concatStyleSets(controlButtonStyles, props.styles ?? {});\n\n const labelText =\n props?.text ?? props?.strings?.label ?? (props?.checked ? props?.strings?.onLabel : props?.strings?.offLabel);\n\n const tooltipContent =\n props?.strings?.tooltipContent ??\n (props?.disabled\n ? props?.strings?.tooltipDisabledContent\n : props?.checked\n ? props?.strings?.tooltipOnContent\n : props?.strings?.tooltipOffContent);\n\n const tooltipId = props.tooltipId ?? props.labelKey ? props.labelKey + '-tooltip' : undefined;\n\n return (\n <ControlButtonTooltip hidden={props.disableTooltip} content={tooltipContent} id={tooltipId}>\n <DefaultButton\n {...props}\n styles={componentStyles}\n onRenderText={props.showLabel && props.onRenderText ? props.onRenderText : undefined}\n onRenderIcon={props.onRenderIcon ?? DefaultRenderIcon}\n ariaLabel={props.splitButtonAriaLabel ?? props.ariaLabel ?? labelText ?? tooltipContent}\n allowDisabledFocus={props.allowDisabledFocus ?? true}\n menuTriggerKeyCode={KeyCodes.down} // explicitly sets the keypress to activiate the split button drop down.\n text={undefined} // this is handled as a child of the button, without this the `showLabel` prop may be ignored.\n >\n {props.showLabel ? labelText : <></>}\n </DefaultButton>\n </ControlButtonTooltip>\n );\n};\n"]}
@@ -23,8 +23,8 @@ export const _VideoEffectsItem = (props) => {
23
23
  backgroundImage
24
24
  }), [backgroundImage, disabled, isSelected, theme]);
25
25
  return (React.createElement(TooltipHost, Object.assign({}, props.tooltipProps),
26
- React.createElement(Stack, { key: props.itemKey, className: mergeStyles((_f = props.styles) === null || _f === void 0 ? void 0 : _f.root), verticalAlign: "center", horizontalAlign: "center", "data-ui-id": `video-effects-item`, "aria-label": (_g = props.ariaLabel) !== null && _g !== void 0 ? _g : props.itemKey, "aria-disabled": props.disabled },
27
- React.createElement(DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: props.componentRef },
26
+ React.createElement(Stack, { key: props.itemKey, className: mergeStyles((_f = props.styles) === null || _f === void 0 ? void 0 : _f.root), verticalAlign: "center", horizontalAlign: "center", "data-ui-id": `video-effects-item` },
27
+ React.createElement(DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: props.componentRef, "aria-label": (_g = props.ariaLabel) !== null && _g !== void 0 ? _g : props.itemKey, "aria-disabled": props.disabled },
28
28
  React.createElement(Stack, { horizontalAlign: 'center' },
29
29
  props.iconProps && (React.createElement(Stack.Item, { className: iconContainerStyles },
30
30
  React.createElement(Icon, Object.assign({}, props.iconProps)))),
@@ -1 +1 @@
1
- {"version":3,"file":"VideoEffectsItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoEffectsItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,aAAa,EAEb,IAAI,EAIJ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAqG5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,MAAA,KAAK,CAAC,UAAU,mCAAI,KAAK,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK,CAAC;IACzC,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,eAAe,0CAAE,GAAG,CAAC;IACnD,MAAM,mBAAmB,GAAG,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,MAAA,K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BAAmB;wBACxC,oBAAC,IAAI,IAAC,OAAO,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,CAC/B,CACd,CACK,CACM,CACV,CACI,CACf,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DefaultButton,\n IButton,\n Icon,\n IIconProps,\n IStyle,\n ITooltipHostProps,\n mergeStyles,\n Stack,\n Text,\n TooltipHost,\n useTheme\n} from '@fluentui/react';\nimport React, { useCallback } from 'react';\nimport { videoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemProps {\n /**\n * The key of the Video Background Effect.\n * This is used to identify the Video Background Effect and is returned in the onChange event.\n * It must be unique within the set of options.\n * @example 'blur'\n */\n itemKey: string;\n\n /**\n * The text to display for the Video effects item.\n */\n title?: string;\n\n /**\n * Whether the Video effects item is currently in the selected state.\n * @default false\n */\n isSelected?: boolean;\n\n /**\n * Callback to invoke when the Video effects item is selected.\n */\n onSelect?: (key: string) => void;\n\n /**\n * Whether the Video effects item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * The icon to display for the Video effects item.\n * @default undefined (no icon)\n */\n iconProps?: IIconProps;\n\n /**\n * Properties to have a Tooltip display when hovering over the Video effects item.\n * @default undefined (no tooltip)\n */\n tooltipProps?: ITooltipHostProps;\n\n /**\n * Aria label for the Video effects item.\n */\n ariaLabel?: string;\n\n /**\n * Background to display for the Video effects item.\n * @default undefined (no background image)\n */\n backgroundProps?: {\n /**\n * The URL of the background image.\n */\n url: string;\n };\n\n /**\n * Styles for the Video effects item.\n */\n styles?: _VideoEffectsItemStyles;\n\n /**\n * Imperative handle for calling focus()\n */\n componentRef?: React.RefObject<{\n focus: () => void;\n }>;\n}\n\n/**\n * Styles for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemStyles {\n /**\n * Styles for the container of the Video effects item.\n */\n root: IStyle;\n\n /**\n * Styles for the container of the icon of the Video effects item.\n */\n iconContainer: IStyle;\n\n /**\n * Styles for the text container of the Video effects item.\n */\n textContainer: IStyle;\n}\n\n/**\n * A component for displaying a Video Background Effect Option.\n *\n * @internal\n */\nexport const _VideoEffectsItem = (props: _VideoEffectsItemProps): JSX.Element => {\n const theme = useTheme();\n const isSelected = props.isSelected ?? false;\n const disabled = props.disabled ?? false;\n const backgroundImage = props.backgroundProps?.url;\n const iconContainerStyles = mergeStyles({ height: '1.25rem' }, props.styles?.iconContainer);\n const textContainerStyles = mergeStyles({ height: '1.25rem' }, props.styles?.textContainer);\n\n const containerStyles = useCallback(\n () =>\n videoEffectsItemContainerStyles({\n theme,\n isSelected,\n disabled,\n backgroundImage\n }),\n [backgroundImage, disabled, isSelected, theme]\n );\n\n return (\n <TooltipHost {...props.tooltipProps}>\n <Stack\n key={props.itemKey}\n className={mergeStyles(props.styles?.root)}\n verticalAlign=\"center\"\n horizontalAlign=\"center\"\n data-ui-id={`video-effects-item`}\n aria-label={props.ariaLabel ?? props.itemKey}\n aria-disabled={props.disabled}\n >\n <DefaultButton\n styles={containerStyles()}\n onClick={disabled ? undefined : () => props.onSelect?.(props.itemKey)}\n componentRef={props.componentRef as React.RefObject<IButton>}\n >\n <Stack horizontalAlign={'center'}>\n {props.iconProps && (\n <Stack.Item className={iconContainerStyles}>\n <Icon {...props.iconProps} />\n </Stack.Item>\n )}\n {props.title && (\n <Stack.Item className={textContainerStyles}>\n <Text variant=\"small\">{props.title}</Text>\n </Stack.Item>\n )}\n </Stack>\n </DefaultButton>\n </Stack>\n </TooltipHost>\n );\n};\n"]}
1
+ {"version":3,"file":"VideoEffectsItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoEffectsItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,aAAa,EAEb,IAAI,EAIJ,WAAW,EACX,KAAK,EAC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,MAAM,EAAE,eAAe,EAAE,EACzB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,QAAQ,sDAAG,KAAK,CAAC,OAAO,CAAC,CAAA,EAAA,EACrE,YAAY,EAAE,KAAK,CAAC,YAAwC,gBAChD,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK,CAAC,OAAO,mBAC7B,KAAK,CAAC,QAAQ;gBAE7B,oBAAC,KAAK,IAAC,eAAe,EAAE,QAAQ;oBAC7B,KAAK,CAAC,SAAS,IAAI,CAClB,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB;wBACxC,oBAAC,IAAI,oBAAK,KAAK,CAAC,SAAS,EAAI,CAClB,CACd;oBACA,KAAK,CAAC,KAAK,IAAI,CACd,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB;wBACxC,oBAAC,IAAI,IAAC,OAAO,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,CAC/B,CACd,CACK,CACM,CACV,CACI,CACf,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DefaultButton,\n IButton,\n Icon,\n IIconProps,\n IStyle,\n ITooltipHostProps,\n mergeStyles,\n Stack,\n Text,\n TooltipHost,\n useTheme\n} from '@fluentui/react';\nimport React, { useCallback } from 'react';\nimport { videoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemProps {\n /**\n * The key of the Video Background Effect.\n * This is used to identify the Video Background Effect and is returned in the onChange event.\n * It must be unique within the set of options.\n * @example 'blur'\n */\n itemKey: string;\n\n /**\n * The text to display for the Video effects item.\n */\n title?: string;\n\n /**\n * Whether the Video effects item is currently in the selected state.\n * @default false\n */\n isSelected?: boolean;\n\n /**\n * Callback to invoke when the Video effects item is selected.\n */\n onSelect?: (key: string) => void;\n\n /**\n * Whether the Video effects item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * The icon to display for the Video effects item.\n * @default undefined (no icon)\n */\n iconProps?: IIconProps;\n\n /**\n * Properties to have a Tooltip display when hovering over the Video effects item.\n * @default undefined (no tooltip)\n */\n tooltipProps?: ITooltipHostProps;\n\n /**\n * Aria label for the Video effects item.\n */\n ariaLabel?: string;\n\n /**\n * Background to display for the Video effects item.\n * @default undefined (no background image)\n */\n backgroundProps?: {\n /**\n * The URL of the background image.\n */\n url: string;\n };\n\n /**\n * Styles for the Video effects item.\n */\n styles?: _VideoEffectsItemStyles;\n\n /**\n * Imperative handle for calling focus()\n */\n componentRef?: React.RefObject<{\n focus: () => void;\n }>;\n}\n\n/**\n * Styles for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemStyles {\n /**\n * Styles for the container of the Video effects item.\n */\n root: IStyle;\n\n /**\n * Styles for the container of the icon of the Video effects item.\n */\n iconContainer: IStyle;\n\n /**\n * Styles for the text container of the Video effects item.\n */\n textContainer: IStyle;\n}\n\n/**\n * A component for displaying a Video Background Effect Option.\n *\n * @internal\n */\nexport const _VideoEffectsItem = (props: _VideoEffectsItemProps): JSX.Element => {\n const theme = useTheme();\n const isSelected = props.isSelected ?? false;\n const disabled = props.disabled ?? false;\n const backgroundImage = props.backgroundProps?.url;\n const iconContainerStyles = mergeStyles({ height: '1.25rem' }, props.styles?.iconContainer);\n const textContainerStyles = mergeStyles({ height: '1.25rem' }, props.styles?.textContainer);\n\n const containerStyles = useCallback(\n () =>\n videoEffectsItemContainerStyles({\n theme,\n isSelected,\n disabled,\n backgroundImage\n }),\n [backgroundImage, disabled, isSelected, theme]\n );\n\n return (\n <TooltipHost {...props.tooltipProps}>\n <Stack\n key={props.itemKey}\n className={mergeStyles(props.styles?.root)}\n verticalAlign=\"center\"\n horizontalAlign=\"center\"\n data-ui-id={`video-effects-item`}\n >\n <DefaultButton\n styles={containerStyles()}\n onClick={disabled ? undefined : () => props.onSelect?.(props.itemKey)}\n componentRef={props.componentRef as React.RefObject<IButton>}\n aria-label={props.ariaLabel ?? props.itemKey}\n aria-disabled={props.disabled}\n >\n <Stack horizontalAlign={'center'}>\n {props.iconProps && (\n <Stack.Item className={iconContainerStyles}>\n <Icon {...props.iconProps} />\n </Stack.Item>\n )}\n {props.title && (\n <Stack.Item className={textContainerStyles}>\n <Text variant=\"small\">{props.title}</Text>\n </Stack.Item>\n )}\n </Stack>\n </DefaultButton>\n </Stack>\n </TooltipHost>\n );\n};\n"]}
@@ -155,6 +155,11 @@ const MainScreen = (props) => {
155
155
  case 'leaving':
156
156
  pageElement = (React.createElement(NoticePage, { title: (_l = locale.strings.call.leavingCallTitle) !== null && _l !== void 0 ? _l : 'Leaving...', dataUiId: 'leaving-page', pageStyle: leavePageStyle, disableStartCallButton: true }));
157
157
  break;
158
+ case 'badRequest': {
159
+ const { title, moreDetails, disableStartCallButton, iconName } = getEndedCallPageProps(locale, endedCall);
160
+ pageElement = (React.createElement(NoticePage, { iconName: iconName, title: title, moreDetails: callees ? '' : moreDetails, dataUiId: 'left-call-page', disableStartCallButton: disableStartCallButton }));
161
+ break;
162
+ }
158
163
  case 'leftCall': {
159
164
  const { title, moreDetails, disableStartCallButton, iconName } = getEndedCallPageProps(locale, endedCall);
160
165
  /* @conditional-compile-remove(end-of-call-survey) */