@azure/communication-react 1.3.3-alpha-202210290014.0 → 1.4.2-alpha-202211010021.0

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 (51) hide show
  1. package/CHANGELOG.json +1800 -0
  2. package/CHANGELOG.md +81 -5
  3. package/dist/communication-react.d.ts +6 -2
  4. package/dist/dist-cjs/communication-react/index.js +289 -235
  5. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js +5 -0
  9. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/DomainPermissions.d.ts +6 -2
  11. package/dist/dist-esm/react-components/src/components/DomainPermissions.js +9 -5
  12. package/dist/dist-esm/react-components/src/components/DomainPermissions.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -1
  14. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -3
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +1 -1
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +1 -0
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js +3 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.d.ts +1 -0
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js +4 -2
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +1 -0
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js +5 -3
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +7 -3
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +1 -0
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +45 -3
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +6 -2
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +9 -4
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -3
  37. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +2 -2
  39. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  40. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -2
  41. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
  42. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +3 -1
  44. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  45. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +2 -2
  48. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +2 -2
  50. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
  51. package/package.json +8 -8
@@ -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.3.3-alpha-202210290014.0';
5
+ module.exports = '1.4.2-alpha-202211010021.0';
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,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.3.3-alpha-202210290014.0';\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,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.4.2-alpha-202211010021.0';\n"]}
@@ -98,6 +98,11 @@ class ProxyChatThreadClient {
98
98
  case 'listReadReceipts': {
99
99
  return createDecoratedListReadReceipts(chatThreadClient, this._context);
100
100
  }
101
+ case 'sendTypingNotification': {
102
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter(this, void 0, void 0, function* () {
103
+ return yield chatThreadClient.sendTypingNotification(...args);
104
+ }), 'ChatThreadClient.sendTypingNotification');
105
+ }
101
106
  case 'removeParticipant': {
102
107
  return this._context.withAsyncErrorTeedToState((...args) => __awaiter(this, void 0, void 0, function* () {
103
108
  const result = yield chatThreadClient.removeParticipant(...args);
@@ -1 +1 @@
1
- {"version":3,"file":"StatefulChatThreadClient.js","sourceRoot":"","sources":["../../../../../chat-stateful-client/src/StatefulChatThreadClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,qBAAqB;IAGzB,YAAY,OAAoB;QAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAEM,GAAG,CAAmC,gBAAkC,EAAE,IAAO;QACtF,QAAQ,IAAI,EAAE;YACZ,KAAK,cAAc,CAAC,CAAC;gBACnB,OAAO,2BAA2B,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,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,YAAY,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;oBAC9D,OAAO,MAAM,CAAC;gBAChB,CAAC,CAAA,EACD,gCAAgC,CACjC,CAAC;aACH;YACD;gBACE,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;SAC9C;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,gBAAkC,EAClC,OAAoB,EACF,EAAE;IACpB,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1D,OAAO,IAAI,KAAK,CAAC,gBAAgB,EAAE,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAqB,CAAC;AAC7F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ChatThreadClient, SendChatMessageResult } from '@azure/communication-chat';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { ChatMessageWithStatus } from './types/ChatMessageWithStatus';\nimport { ChatContext } from './ChatContext';\nimport { nanoid } from 'nanoid';\nimport { createDecoratedListMessages } from './iterators/createDecoratedListMessages';\nimport { createDecoratedListReadReceipts } from './iterators/createDecoratedListReadReceipts';\nimport { createDecoratedListParticipants } from './iterators/createDecoratedListParticipants';\nimport { convertChatMessage } from './convertChatMessage';\n\nclass ProxyChatThreadClient implements ProxyHandler<ChatThreadClient> {\n private _context: ChatContext;\n\n constructor(context: ChatContext) {\n this._context = context;\n }\n\n public get<P extends keyof ChatThreadClient>(chatThreadClient: ChatThreadClient, prop: P): any {\n switch (prop) {\n case 'listMessages': {\n return createDecoratedListMessages(chatThreadClient, this._context);\n }\n case 'getMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['getMessage']>) => {\n const message = await chatThreadClient.getMessage(...args);\n this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));\n return message;\n }, 'ChatThreadClient.getMessage');\n }\n case 'sendMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['sendMessage']>) => {\n // Retry logic?\n const [request, options] = args;\n const { content } = request;\n const clientMessageId = nanoid(); // Generate a local short uuid for message\n const newMessage: ChatMessageWithStatus = {\n content: { message: content },\n clientMessageId,\n id: '',\n type: 'text',\n sequenceId: '',\n version: '',\n createdOn: new Date(),\n status: 'sending',\n senderDisplayName: this._context.getState().displayName,\n sender: this._context.getState().userId,\n metadata: options?.metadata\n };\n this._context.setChatMessage(chatThreadClient.threadId, newMessage);\n\n let result: SendChatMessageResult | undefined = undefined;\n try {\n result = await chatThreadClient.sendMessage(...args);\n } catch (e) {\n this._context.setChatMessage(chatThreadClient.threadId, { ...newMessage, status: 'failed' });\n throw e;\n }\n\n if (result?.id) {\n this._context.batch(() => {\n if (!result) {\n return;\n }\n this._context.setChatMessage(chatThreadClient.threadId, {\n ...newMessage,\n clientMessageId: undefined,\n status: 'delivered',\n id: result.id\n });\n this._context.deleteLocalMessage(chatThreadClient.threadId, clientMessageId);\n });\n }\n return result;\n }, 'ChatThreadClient.sendMessage');\n }\n case 'addParticipants': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['addParticipants']>) => {\n const result = await chatThreadClient.addParticipants(...args);\n const [addRequest] = args;\n const participantsToAdd = addRequest.participants;\n this._context.setParticipants(chatThreadClient.threadId, participantsToAdd);\n return result;\n },\n 'ChatThreadClient.addParticipants'\n );\n }\n case 'deleteMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['deleteMessage']>) => {\n // DeleteMessage is able to either delete local one(for failed message) or synced message\n const [messageId] = args;\n if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {\n return {};\n }\n const result = await chatThreadClient.deleteMessage(...args);\n this._context.deleteMessage(chatThreadClient.threadId, messageId);\n return result;\n },\n 'ChatThreadClient.deleteMessage'\n );\n }\n case 'listParticipants': {\n return createDecoratedListParticipants(chatThreadClient, this._context);\n }\n case 'listReadReceipts': {\n return createDecoratedListReadReceipts(chatThreadClient, this._context);\n }\n case 'removeParticipant': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['removeParticipant']>) => {\n const result = await chatThreadClient.removeParticipant(...args);\n const [removeIdentifier] = args;\n this._context.deleteParticipant(chatThreadClient.threadId, getIdentifierKind(removeIdentifier));\n return result;\n },\n 'ChatThreadClient.removeParticipant'\n );\n }\n case 'updateMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['updateMessage']>) => {\n const result = await chatThreadClient.updateMessage(...args);\n const [messageId, updateOption] = args;\n\n this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption?.content);\n return result;\n },\n 'ChatThreadClient.updateMessage'\n );\n }\n case 'updateTopic': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['updateTopic']>) => {\n const result = await chatThreadClient.updateTopic(...args);\n const [topic] = args;\n this._context.updateThreadTopic(chatThreadClient.threadId, topic);\n return result;\n }, 'ChatThreadClient.updateTopic');\n }\n case 'getProperties': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['getProperties']>) => {\n const result = await chatThreadClient.getProperties(...args);\n this._context.updateThread(chatThreadClient.threadId, result);\n return result;\n },\n 'ChatThreadClient.getProperties'\n );\n }\n default:\n return Reflect.get(chatThreadClient, prop);\n }\n }\n}\n\n/**\n * @private\n */\nexport const chatThreadClientDeclaratify = (\n chatThreadClient: ChatThreadClient,\n context: ChatContext\n): ChatThreadClient => {\n context.createThreadIfNotExist(chatThreadClient.threadId);\n return new Proxy(chatThreadClient, new ProxyChatThreadClient(context)) as ChatThreadClient;\n};\n"]}
1
+ {"version":3,"file":"StatefulChatThreadClient.js","sourceRoot":"","sources":["../../../../../chat-stateful-client/src/StatefulChatThreadClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;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CAAC,gBAAgB,EAAE,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAqB,CAAC;AAC7F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ChatThreadClient, SendChatMessageResult } from '@azure/communication-chat';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { ChatMessageWithStatus } from './types/ChatMessageWithStatus';\nimport { ChatContext } from './ChatContext';\nimport { nanoid } from 'nanoid';\nimport { createDecoratedListMessages } from './iterators/createDecoratedListMessages';\nimport { createDecoratedListReadReceipts } from './iterators/createDecoratedListReadReceipts';\nimport { createDecoratedListParticipants } from './iterators/createDecoratedListParticipants';\nimport { convertChatMessage } from './convertChatMessage';\n\nclass ProxyChatThreadClient implements ProxyHandler<ChatThreadClient> {\n private _context: ChatContext;\n\n constructor(context: ChatContext) {\n this._context = context;\n }\n\n public get<P extends keyof ChatThreadClient>(chatThreadClient: ChatThreadClient, prop: P): any {\n switch (prop) {\n case 'listMessages': {\n return createDecoratedListMessages(chatThreadClient, this._context);\n }\n case 'getMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['getMessage']>) => {\n const message = await chatThreadClient.getMessage(...args);\n this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));\n return message;\n }, 'ChatThreadClient.getMessage');\n }\n case 'sendMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['sendMessage']>) => {\n // Retry logic?\n const [request, options] = args;\n const { content } = request;\n const clientMessageId = nanoid(); // Generate a local short uuid for message\n const newMessage: ChatMessageWithStatus = {\n content: { message: content },\n clientMessageId,\n id: '',\n type: 'text',\n sequenceId: '',\n version: '',\n createdOn: new Date(),\n status: 'sending',\n senderDisplayName: this._context.getState().displayName,\n sender: this._context.getState().userId,\n metadata: options?.metadata\n };\n this._context.setChatMessage(chatThreadClient.threadId, newMessage);\n\n let result: SendChatMessageResult | undefined = undefined;\n try {\n result = await chatThreadClient.sendMessage(...args);\n } catch (e) {\n this._context.setChatMessage(chatThreadClient.threadId, { ...newMessage, status: 'failed' });\n throw e;\n }\n\n if (result?.id) {\n this._context.batch(() => {\n if (!result) {\n return;\n }\n this._context.setChatMessage(chatThreadClient.threadId, {\n ...newMessage,\n clientMessageId: undefined,\n status: 'delivered',\n id: result.id\n });\n this._context.deleteLocalMessage(chatThreadClient.threadId, clientMessageId);\n });\n }\n return result;\n }, 'ChatThreadClient.sendMessage');\n }\n case 'addParticipants': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['addParticipants']>) => {\n const result = await chatThreadClient.addParticipants(...args);\n const [addRequest] = args;\n const participantsToAdd = addRequest.participants;\n this._context.setParticipants(chatThreadClient.threadId, participantsToAdd);\n return result;\n },\n 'ChatThreadClient.addParticipants'\n );\n }\n case 'deleteMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['deleteMessage']>) => {\n // DeleteMessage is able to either delete local one(for failed message) or synced message\n const [messageId] = args;\n if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {\n return {};\n }\n const result = await chatThreadClient.deleteMessage(...args);\n this._context.deleteMessage(chatThreadClient.threadId, messageId);\n return result;\n },\n 'ChatThreadClient.deleteMessage'\n );\n }\n case 'listParticipants': {\n return createDecoratedListParticipants(chatThreadClient, this._context);\n }\n case 'listReadReceipts': {\n return createDecoratedListReadReceipts(chatThreadClient, this._context);\n }\n case 'sendTypingNotification': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['sendTypingNotification']>) => {\n return await chatThreadClient.sendTypingNotification(...args);\n },\n 'ChatThreadClient.sendTypingNotification'\n );\n }\n case 'removeParticipant': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['removeParticipant']>) => {\n const result = await chatThreadClient.removeParticipant(...args);\n const [removeIdentifier] = args;\n this._context.deleteParticipant(chatThreadClient.threadId, getIdentifierKind(removeIdentifier));\n return result;\n },\n 'ChatThreadClient.removeParticipant'\n );\n }\n case 'updateMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['updateMessage']>) => {\n const result = await chatThreadClient.updateMessage(...args);\n const [messageId, updateOption] = args;\n\n this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption?.content);\n return result;\n },\n 'ChatThreadClient.updateMessage'\n );\n }\n case 'updateTopic': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['updateTopic']>) => {\n const result = await chatThreadClient.updateTopic(...args);\n const [topic] = args;\n this._context.updateThreadTopic(chatThreadClient.threadId, topic);\n return result;\n }, 'ChatThreadClient.updateTopic');\n }\n case 'getProperties': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['getProperties']>) => {\n const result = await chatThreadClient.getProperties(...args);\n this._context.updateThread(chatThreadClient.threadId, result);\n return result;\n },\n 'ChatThreadClient.getProperties'\n );\n }\n default:\n return Reflect.get(chatThreadClient, prop);\n }\n }\n}\n\n/**\n * @private\n */\nexport const chatThreadClientDeclaratify = (\n chatThreadClient: ChatThreadClient,\n context: ChatContext\n): ChatThreadClient => {\n context.createThreadIfNotExist(chatThreadClient.threadId);\n return new Proxy(chatThreadClient, new ProxyChatThreadClient(context)) as ChatThreadClient;\n};\n"]}
@@ -11,7 +11,7 @@ export interface DomainPermissionsProps {
11
11
  /**
12
12
  * Action to be taken by the more help link. Possible to send to external page or show other modal.
13
13
  */
14
- onTroubleshootingClick: () => void;
14
+ onTroubleshootingClick?: () => void;
15
15
  /**
16
16
  * Action to be taken by the Allow Access button.
17
17
  */
@@ -19,7 +19,7 @@ export interface DomainPermissionsProps {
19
19
  /**
20
20
  * Localization strings for DomainPermissions component.
21
21
  */
22
- strings: DomainPermissionsStrings;
22
+ strings?: DomainPermissionsStrings;
23
23
  }
24
24
  /**
25
25
  * @beta
@@ -42,6 +42,10 @@ export interface DomainPermissionsStrings {
42
42
  * Primary button text string.
43
43
  */
44
44
  primaryButtonText: string;
45
+ /**
46
+ * Aira label describing the content of the container
47
+ */
48
+ ariaLabel: string;
45
49
  }
46
50
  /**
47
51
  * @beta
@@ -13,7 +13,7 @@ import { iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonSt
13
13
  const DomainPermissionsContainer = (props) => {
14
14
  const { appName, onTroubleshootingClick, onAllowAccessClick, strings } = props;
15
15
  const theme = useTheme();
16
- return (React.createElement(Stack, { style: { padding: '2rem', maxWidth: '25.375rem' } },
16
+ return (React.createElement(Stack, { style: { padding: '2rem', maxWidth: '25.375rem' }, "aria-label": strings === null || strings === void 0 ? void 0 : strings.ariaLabel },
17
17
  React.createElement(Stack, { horizontal: true, style: { paddingBottom: '1rem' }, horizontalAlign: 'space-between' },
18
18
  React.createElement(Stack, { styles: iconContainerStyles, horizontalAlign: 'center' },
19
19
  React.createElement(Icon, { styles: iconPrimaryStyles, iconName: 'DomainPermissionCamera' })),
@@ -22,10 +22,10 @@ const DomainPermissionsContainer = (props) => {
22
22
  React.createElement(Stack, { styles: iconContainerStyles, horizontalAlign: 'center' },
23
23
  React.createElement(Icon, { styles: iconPrimaryStyles, iconName: 'DomainPermissionMic' }))),
24
24
  React.createElement(Stack, { styles: textContainerStyles },
25
- React.createElement(Text, { styles: primaryTextStyles }, _formatString(strings.primaryText, { appName: appName })),
26
- React.createElement(Text, { styles: secondaryTextStyles }, strings.secondaryText),
27
- onAllowAccessClick && (React.createElement(PrimaryButton, { styles: primaryButtonStyles, text: strings.primaryButtonText, onClick: onAllowAccessClick })),
28
- React.createElement(Link, { styles: linkTextStyles, onClick: onTroubleshootingClick }, strings.linkText))));
25
+ strings && isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryText) && (React.createElement(Text, { styles: primaryTextStyles }, _formatString(strings.primaryText, { appName: appName }))),
26
+ strings && isValidString(strings === null || strings === void 0 ? void 0 : strings.secondaryText) && (React.createElement(Text, { styles: secondaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.secondaryText)),
27
+ onAllowAccessClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryButtonText) && (React.createElement(PrimaryButton, { styles: primaryButtonStyles, text: strings === null || strings === void 0 ? void 0 : strings.primaryButtonText, onClick: onAllowAccessClick })),
28
+ onTroubleshootingClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.linkText) && (React.createElement(Link, { styles: linkTextStyles, onClick: onTroubleshootingClick }, strings === null || strings === void 0 ? void 0 : strings.linkText)))));
29
29
  };
30
30
  /**
31
31
  * @beta
@@ -40,4 +40,8 @@ export const DomainPermissions = (props) => {
40
40
  return React.createElement(DomainPermissionsContainer, Object.assign({}, props, { strings: props.strings ? props.strings : locale }));
41
41
  return React.createElement(React.Fragment, null);
42
42
  };
43
+ /* @conditional-compile-remove(call-readiness) */
44
+ const isValidString = (string) => {
45
+ return !!string && string.length > 0;
46
+ };
43
47
  //# sourceMappingURL=DomainPermissions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DomainPermissions.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/DomainPermissions.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnF,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,iDAAiD;AACjD,OAAO,EAAE,aAAa,EAAY,mCAAgC;AAClE,iDAAiD;AACjD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,mCAAmC,CAAC;AAgD3C,iDAAiD;AACjD,MAAM,0BAA0B,GAAG,CAAC,KAA6B,EAA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AI,CAC7G;YACD,oBAAC,IAAI,IAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,sBAAsB,IAC1D,OAAO,CAAC,QAAQ,CACZ,CACD,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC9E,iDAAiD;IACjD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;IACrD,iDAAiD;IACjD,OAAO,oBAAC,0BAA0B,oBAAK,KAAK,IAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC;IAClG,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { Stack, Text, Link, Icon, useTheme, PrimaryButton } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(call-readiness) */\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n iconContainerStyles,\n iconPrimaryStyles,\n linkTextStyles,\n primaryButtonStyles,\n primaryTextStyles,\n secondaryTextStyles,\n sparkleIconBackdropStyles,\n textContainerStyles\n} from './styles/DomainPermissions.styles';\n\n/**\n * @beta\n * Props for DomainPermissions component.\n */\nexport interface DomainPermissionsProps {\n /**\n * Name of application calling experience is in.\n */\n appName: string;\n /**\n * Action to be taken by the more help link. Possible to send to external page or show other modal.\n */\n onTroubleshootingClick: () => void;\n /**\n * Action to be taken by the Allow Access button.\n */\n onAllowAccessClick?: () => void;\n /**\n * Localization strings for DomainPermissions component.\n */\n strings: DomainPermissionsStrings;\n}\n\n/**\n * @beta\n * Strings for DomainPermissions component\n */\nexport interface DomainPermissionsStrings {\n /**\n * Main text string.\n */\n primaryText: string;\n /**\n * Subtext string.\n */\n secondaryText: string;\n /**\n * More help link string.\n */\n linkText: string;\n /**\n * Primary button text string.\n */\n primaryButtonText: string;\n}\n\n/* @conditional-compile-remove(call-readiness) */\nconst DomainPermissionsContainer = (props: DomainPermissionsProps): JSX.Element => {\n const { appName, onTroubleshootingClick, onAllowAccessClick, strings } = props;\n const theme = useTheme();\n return (\n <Stack style={{ padding: '2rem', maxWidth: '25.375rem' }}>\n <Stack horizontal style={{ paddingBottom: '1rem' }} horizontalAlign={'space-between'}>\n <Stack styles={iconContainerStyles} horizontalAlign={'center'}>\n <Icon styles={iconPrimaryStyles} iconName={'DomainPermissionCamera'}></Icon>\n </Stack>\n <Stack styles={iconContainerStyles} horizontalAlign={'center'}>\n <Icon styles={sparkleIconBackdropStyles(theme)} iconName={'DomainPermissionsSparkle'}></Icon>\n </Stack>\n <Stack styles={iconContainerStyles} horizontalAlign={'center'}>\n <Icon styles={iconPrimaryStyles} iconName={'DomainPermissionMic'}></Icon>\n </Stack>\n </Stack>\n <Stack styles={textContainerStyles}>\n <Text styles={primaryTextStyles}>{_formatString(strings.primaryText, { appName: appName })}</Text>\n <Text styles={secondaryTextStyles}>{strings.secondaryText}</Text>\n {onAllowAccessClick && (\n <PrimaryButton styles={primaryButtonStyles} text={strings.primaryButtonText} onClick={onAllowAccessClick} />\n )}\n <Link styles={linkTextStyles} onClick={onTroubleshootingClick}>\n {strings.linkText}\n </Link>\n </Stack>\n </Stack>\n );\n};\n\n/**\n * @beta\n *\n * Component to allow Contoso to help their end user with their devices should their permissions be blocked\n * by their browsers settings.\n */\nexport const DomainPermissions = (props: DomainPermissionsProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings.DomainPermissions;\n /* @conditional-compile-remove(call-readiness) */\n return <DomainPermissionsContainer {...props} strings={props.strings ? props.strings : locale} />;\n return <></>;\n};\n\"../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"DomainPermissions.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/DomainPermissions.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnF,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,iDAAiD;AACjD,OAAO,EAAE,aAAa,EAAY,mCAAgC;AAClE,iDAAiD;AACjD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,mCAAmC,CAAC;AAoD3C,iDAAiD;AACjD,MAAM,0BAA0B,GAAG,CAAC,KAA6B,EAAe,EAAE;IAChF,MAAM,EAAE,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC/E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACL,oBAAC,KAAK,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAc,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;QACtF,oBAAC,KAAK,IAAC,UAAU,QAAC,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,eAAe;YAClF,oBAAC,KAAK,IAAC,MAAM,EAAE,mBAAmB,EAAE,eAAe,EAAE,QAAQ;gBAC3D,oBAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,wBAAwB,GAAS,CACtE;YACR,oBAAC,KAAK,IAAC,MAAM,EAAE,mBAAmB,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C;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC9E,iDAAiD;IACjD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;IACrD,iDAAiD;IACjD,OAAO,oBAAC,0BAA0B,oBAAK,KAAK,IAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC;IAClG,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC;AAEF,iDAAiD;AACjD,MAAM,aAAa,GAAG,CAAC,MAA0B,EAAW,EAAE;IAC5D,OAAO,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AACvC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { Stack, Text, Link, Icon, useTheme, PrimaryButton } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(call-readiness) */\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n iconContainerStyles,\n iconPrimaryStyles,\n linkTextStyles,\n primaryButtonStyles,\n primaryTextStyles,\n secondaryTextStyles,\n sparkleIconBackdropStyles,\n textContainerStyles\n} from './styles/DomainPermissions.styles';\n\n/**\n * @beta\n * Props for DomainPermissions component.\n */\nexport interface DomainPermissionsProps {\n /**\n * Name of application calling experience is in.\n */\n appName: string;\n /**\n * Action to be taken by the more help link. Possible to send to external page or show other modal.\n */\n onTroubleshootingClick?: () => void;\n /**\n * Action to be taken by the Allow Access button.\n */\n onAllowAccessClick?: () => void;\n /**\n * Localization strings for DomainPermissions component.\n */\n strings?: DomainPermissionsStrings;\n}\n\n/**\n * @beta\n * Strings for DomainPermissions component\n */\nexport interface DomainPermissionsStrings {\n /**\n * Main text string.\n */\n primaryText: string;\n /**\n * Subtext string.\n */\n secondaryText: string;\n /**\n * More help link string.\n */\n linkText: string;\n /**\n * Primary button text string.\n */\n primaryButtonText: string;\n /**\n * Aira label describing the content of the container\n */\n ariaLabel: string;\n}\n\n/* @conditional-compile-remove(call-readiness) */\nconst DomainPermissionsContainer = (props: DomainPermissionsProps): JSX.Element => {\n const { appName, onTroubleshootingClick, onAllowAccessClick, strings } = props;\n const theme = useTheme();\n return (\n <Stack style={{ padding: '2rem', maxWidth: '25.375rem' }} aria-label={strings?.ariaLabel}>\n <Stack horizontal style={{ paddingBottom: '1rem' }} horizontalAlign={'space-between'}>\n <Stack styles={iconContainerStyles} horizontalAlign={'center'}>\n <Icon styles={iconPrimaryStyles} iconName={'DomainPermissionCamera'}></Icon>\n </Stack>\n <Stack styles={iconContainerStyles} horizontalAlign={'center'}>\n <Icon styles={sparkleIconBackdropStyles(theme)} iconName={'DomainPermissionsSparkle'}></Icon>\n </Stack>\n <Stack styles={iconContainerStyles} horizontalAlign={'center'}>\n <Icon styles={iconPrimaryStyles} iconName={'DomainPermissionMic'}></Icon>\n </Stack>\n </Stack>\n <Stack styles={textContainerStyles}>\n {strings && isValidString(strings?.primaryText) && (\n <Text styles={primaryTextStyles}>{_formatString(strings.primaryText, { appName: appName })}</Text>\n )}\n {strings && isValidString(strings?.secondaryText) && (\n <Text styles={secondaryTextStyles}>{strings?.secondaryText}</Text>\n )}\n\n {onAllowAccessClick && isValidString(strings?.primaryButtonText) && (\n <PrimaryButton styles={primaryButtonStyles} text={strings?.primaryButtonText} onClick={onAllowAccessClick} />\n )}\n {onTroubleshootingClick && isValidString(strings?.linkText) && (\n <Link styles={linkTextStyles} onClick={onTroubleshootingClick}>\n {strings?.linkText}\n </Link>\n )}\n </Stack>\n </Stack>\n );\n};\n\n/**\n * @beta\n *\n * Component to allow Contoso to help their end user with their devices should their permissions be blocked\n * by their browsers settings.\n */\nexport const DomainPermissions = (props: DomainPermissionsProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings.DomainPermissions;\n /* @conditional-compile-remove(call-readiness) */\n return <DomainPermissionsContainer {...props} strings={props.strings ? props.strings : locale} />;\n return <></>;\n};\n\n/* @conditional-compile-remove(call-readiness) */\nconst isValidString = (string: string | undefined): boolean => {\n return !!string && string.length > 0;\n};\n\"../../../acs-ui-common/src\""]}
@@ -188,7 +188,8 @@
188
188
  "primaryText": "Allow {appName} to use your camera and microphone",
189
189
  "secondaryText": "This is so participants can see and hear you.",
190
190
  "linkText": "Need help? Get troubleshooting help",
191
- "primaryButtonText": "Allow Access"
191
+ "primaryButtonText": "Allow Access",
192
+ "ariaLabel": "Allow camera and microphone access"
192
193
  },
193
194
  "UnsupportedBrowser": {
194
195
  "primaryText": "Browser not supported",
@@ -33,7 +33,7 @@ import { HoldPage } from './pages/HoldPage';
33
33
  /* @conditional-compile-remove(unsupported-browser) */
34
34
  import { UnsupportedBrowserPage } from './pages/UnsupportedBrowser';
35
35
  const MainScreen = (props) => {
36
- var _a, _b, _c, _d;
36
+ var _a, _b, _c, _d, _e;
37
37
  const { callInvitationUrl, onRenderAvatar, onFetchAvatarPersonaData, onFetchParticipantMenuItems } = props;
38
38
  const page = useSelector(getPage);
39
39
  const adapter = useAdapter();
@@ -58,7 +58,9 @@ const MainScreen = (props) => {
58
58
  /* @conditional-compile-remove(call-readiness) */
59
59
  onPermissionsTroubleshootingClick: (_b = props.options) === null || _b === void 0 ? void 0 : _b.onPermissionsTroubleshootingClick,
60
60
  /* @conditional-compile-remove(call-readiness) */
61
- onNetworkingTroubleShootingClick: (_c = props.options) === null || _c === void 0 ? void 0 : _c.onNetworkingTroubleShootingClick }));
61
+ onNetworkingTroubleShootingClick: (_c = props.options) === null || _c === void 0 ? void 0 : _c.onNetworkingTroubleShootingClick,
62
+ /* @conditional-compile-remove(call-readiness) */
63
+ callReadinessOptedIn: (_d = props.options) === null || _d === void 0 ? void 0 : _d.callReadinessOptedIn }));
62
64
  break;
63
65
  case 'accessDeniedTeamsMeeting':
64
66
  pageElement = (React.createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
@@ -90,7 +92,7 @@ const MainScreen = (props) => {
90
92
  case unsupportedEnvironmentPageTrampoline():
91
93
  pageElement = (React.createElement(React.Fragment, null,
92
94
  /* @conditional-compile-remove(unsupported-browser) */
93
- React.createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (_d = props.options) === null || _d === void 0 ? void 0 : _d.onEnvironmentInfoTroubleshootingClick })));
95
+ React.createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (_e = props.options) === null || _e === void 0 ? void 0 : _e.onEnvironmentInfoTroubleshootingClick })));
94
96
  }
95
97
  if (!pageElement) {
96
98
  throw new Error('Invalid call composite page');
@@ -1 +1 @@
1
- {"version":3,"file":"CallComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/CallComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAIlC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE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AAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAW,EAAE;IACtC,mDAAmD;IACnD,6CAA6C;IAC7C,OAAO,MAAM,CAAC;IACd,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,oCAAoC,GAAG,GAAW,EAAE;IACxD,sDAAsD;IACtD,OAAO,wBAAwB,CAAC;IAChC,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,OAGxB,EAAyB,EAAE;IAC1B,iDAAiD;IACjD,IAAI,OAAO,CAAC,oBAAoB,EAAE;QAChC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACb,CAAC;KACH;IACD,wCAAwC;IACxC,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;QAC/B,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,IAAI;SACZ,CAAC;KACH;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACtC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { OnRenderAvatarCallback, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport React, { useEffect, useMemo } from 'react';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallCompositeIcons } from '../common/icons';\nimport { useLocale } from '../localization';\nimport { CallAdapter } from './adapter/CallAdapter';\nimport { CallAdapterProvider, useAdapter } from './adapter/CallAdapterProvider';\nimport { CallPage } from './pages/CallPage';\nimport { ConfigurationPage } from './pages/ConfigurationPage';\nimport { NoticePage } from './pages/NoticePage';\nimport { useSelector } from './hooks/useSelector';\nimport { getPage } from './selectors/baseSelectors';\nimport { LobbyPage } from './pages/LobbyPage';\nimport { mainScreenContainerStyleDesktop, mainScreenContainerStyleMobile } from './styles/CallComposite.styles';\nimport { CallControlOptions } from './types/CallControlOptions';\n\n/* @conditional-compile-remove(rooms) */\nimport { _PermissionsProvider, Role, _getPermissions } from '@internal/react-components';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { LayerHost, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useId } from '@fluentui/react-hooks';\n/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { HoldPage } from './pages/HoldPage';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserPage } from './pages/UnsupportedBrowser';\nimport { PermissionConstraints } from '@azure/communication-calling';\n\n/**\n * Props for {@link CallComposite}.\n *\n * @public\n */\nexport interface CallCompositeProps extends BaseCompositeProps<CallCompositeIcons> {\n /**\n * An adapter provides logic and data to the composite.\n * Composite can also be controlled using the adapter.\n */\n adapter: CallAdapter;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL to invite new participants to the current call. If this is supplied, a button appears in the Participants\n * Button flyout menu.\n */\n callInvitationUrl?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallComposite}.\n */\n options?: CallCompositeOptions;\n\n /* @conditional-compile-remove(rooms) */\n /**\n * Set this to enable/disable capacities for different roles\n */\n role?: Role;\n}\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Device Permission restrictions.\n * Be able to start a call depending on camera and microphone permission options.\n *\n * @beta\n */\nexport interface DevicePermissionRestrictions {\n /**\n * Camera Permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n camera: 'required' | 'optional' | 'doNotPrompt';\n /**\n * Microphone permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n microphone: 'required' | 'optional' | 'doNotPrompt';\n}\n\n/**\n * Optional features of the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositeOptions = {\n /**\n * Surface Azure Communication Services backend errors in the UI with {@link @azure/communication-react#ErrorBar}.\n * Hide or show the error bar.\n * @defaultValue true\n */\n errorBar?: boolean;\n /**\n * Hide or Customize the control bar element.\n * Can be customized by providing an object of type {@link @azure/communication-react#CallControlOptions}.\n * @defaultValue true\n */\n callControls?: boolean | CallControlOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permission restrictions for your call.\n * Require device permissions to be set or have them as optional or not required to start a call\n */\n devicePermissions?: DevicePermissionRestrictions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Opt in call readiness feature for your call\n * Setting this to `true` will add call readiness features to the call experience\n */\n callReadinessOptedIn?: boolean;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * having network issues when connecting to the call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\ntype MainScreenProps = {\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n onRenderAvatar?: OnRenderAvatarCallback;\n callInvitationUrl?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: CallCompositeOptions;\n /* @conditional-compile-remove(rooms) */\n role?: Role;\n};\n\nconst MainScreen = (props: MainScreenProps): JSX.Element => {\n const { callInvitationUrl, onRenderAvatar, onFetchAvatarPersonaData, onFetchParticipantMenuItems } = props;\n const page = useSelector(getPage);\n\n const adapter = useAdapter();\n const locale = useLocale();\n\n let pageElement: JSX.Element | undefined;\n /* @conditional-compile-remove(rooms) */\n switch (page) {\n case 'roomNotFound':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageInvalidRoom\"\n title={locale.strings.call.roomNotFoundTitle}\n moreDetails={locale.strings.call.roomNotFoundDetails}\n dataUiId={'room-not-found-page'}\n />\n );\n break;\n case 'deniedPermissionToRoom':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageInvalidRoom\"\n title={locale.strings.call.deniedPermissionToRoomTitle}\n moreDetails={locale.strings.call.deniedPermissionToRoomDetails}\n dataUiId={'not-invited-to-room-page'}\n />\n );\n break;\n }\n switch (page) {\n case 'configuration':\n pageElement = (\n <ConfigurationPage\n mobileView={props.mobileView}\n startCallHandler={(): void => {\n adapter.joinCall();\n }}\n /* @conditional-compile-remove(call-readiness) */\n devicePermissions={props.options?.devicePermissions}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={props.options?.onPermissionsTroubleshootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={props.options?.onNetworkingTroubleShootingClick}\n />\n );\n break;\n case 'accessDeniedTeamsMeeting':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageAccessDeniedTeamsMeeting\"\n title={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle}\n moreDetails={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails}\n dataUiId={'access-denied-teams-meeting-page'}\n />\n );\n break;\n case 'removedFromCall':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageRemovedFromCall\"\n title={locale.strings.call.removedFromCallTitle}\n moreDetails={locale.strings.call.removedFromCallMoreDetails}\n dataUiId={'removed-from-call-page'}\n />\n );\n break;\n case 'joinCallFailedDueToNoNetwork':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageJoinCallFailedDueToNoNetwork\"\n title={locale.strings.call.failedToJoinCallDueToNoNetworkTitle}\n moreDetails={locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails}\n dataUiId={'join-call-failed-due-to-no-network-page'}\n />\n );\n break;\n case 'leftCall':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageLeftCall\"\n title={locale.strings.call.leftCallTitle}\n moreDetails={locale.strings.call.leftCallMoreDetails}\n dataUiId={'left-call-page'}\n />\n );\n break;\n case 'lobby':\n pageElement = (\n <LobbyPage\n mobileView={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n />\n );\n break;\n case 'call':\n pageElement = (\n <CallPage\n onRenderAvatar={onRenderAvatar}\n callInvitationURL={callInvitationUrl}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={onFetchParticipantMenuItems}\n mobileView={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n />\n );\n break;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n case holdPageTrampoline():\n pageElement = (\n <>\n {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ <HoldPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n />\n }\n </>\n );\n break;\n case unsupportedEnvironmentPageTrampoline():\n pageElement = (\n <>\n {\n /* @conditional-compile-remove(unsupported-browser) */\n <UnsupportedBrowserPage onTroubleshootingClick={props.options?.onEnvironmentInfoTroubleshootingClick} />\n }\n </>\n );\n }\n\n if (!pageElement) {\n throw new Error('Invalid call composite page');\n }\n\n /* @conditional-compile-remove(rooms) */\n const permissions = _getPermissions(props.role);\n\n // default retElement for stable version\n let retElement = pageElement;\n /* @conditional-compile-remove(rooms) */\n retElement = <_PermissionsProvider permissions={permissions}>{pageElement}</_PermissionsProvider>;\n\n return retElement;\n};\n\n/**\n * A customizable UI composite for calling experience.\n *\n * @remarks Call composite min width/height are as follow:\n * - mobile: 17.5rem x 21rem (280px x 336px, with default rem at 16px)\n * - desktop: 30rem x 22rem (480px x 352px, with default rem at 16px)\n *\n * @public\n */\nexport const CallComposite = (props: CallCompositeProps): JSX.Element => {\n const {\n adapter,\n callInvitationUrl,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n formFactor = 'desktop',\n /* @conditional-compile-remove(rooms) */\n role\n } = props;\n\n useEffect(() => {\n (async () => {\n const constrain = getQueryOptions({\n /* @conditional-compile-remove(rooms) */ role: role,\n /* @conditional-compile-remove(call-readiness) */ callReadinessOptedIn: options?.callReadinessOptedIn ?? false\n });\n await adapter.askDevicePermission(constrain);\n adapter.queryCameras();\n adapter.queryMicrophones();\n adapter.querySpeakers();\n })();\n }, [\n adapter,\n /* @conditional-compile-remove(rooms) */ role,\n /* @conditional-compile-remove(call-readiness) */ options?.callReadinessOptedIn\n ]);\n\n const mobileView = formFactor === 'mobile';\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const modalLayerHostId = useId('modalLayerhost');\n\n const mainScreenContainerClassName = useMemo(() => {\n return mobileView ? mainScreenContainerStyleMobile : mainScreenContainerStyleDesktop;\n }, [mobileView]);\n\n return (\n <div className={mainScreenContainerClassName}>\n <BaseProvider {...props}>\n <CallAdapterProvider adapter={adapter}>\n <MainScreen\n callInvitationUrl={callInvitationUrl}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={onFetchParticipantMenuItems}\n mobileView={mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={modalLayerHostId}\n options={options}\n /* @conditional-compile-remove(rooms) */\n role={role}\n />\n {\n // This layer host is for ModalLocalAndRemotePIP in CallPane. This LayerHost cannot be inside the CallPane\n // because when the CallPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n // Additionally, this layer host cannot be in the Call Arrangement as it needs to be rendered before useMinMaxDragPosition() in\n // common/utils useRef is called.\n // Warning: this is fragile and works because the call arrangement page is only rendered after the call has connected and thus this\n // LayerHost will be guaranteed to have rendered (and subsequently mounted in the DOM). This ensures the DOM element will be available\n // before the call to `document.getElementById(modalLayerHostId)` is made.\n /* @conditional-compile-remove(one-to-n-calling) */\n mobileView && <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />\n }\n </CallAdapterProvider>\n </BaseProvider>\n </div>\n );\n};\n\nconst holdPageTrampoline = (): string => {\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n return 'hold';\n return 'call';\n};\n\nconst unsupportedEnvironmentPageTrampoline = (): string => {\n /* @conditional-compile-remove(unsupported-browser) */\n return 'unsupportedEnvironment';\n return 'call';\n};\n\nconst getQueryOptions = (options: {\n /* @conditional-compile-remove(rooms) */ role?: Role;\n /* @conditional-compile-remove(call-readiness) */ callReadinessOptedIn?: boolean;\n}): PermissionConstraints => {\n /* @conditional-compile-remove(call-readiness) */\n if (options.callReadinessOptedIn) {\n return {\n video: false,\n audio: false\n };\n }\n /* @conditional-compile-remove(rooms) */\n if (options.role === 'Consumer') {\n return {\n video: false,\n audio: true\n };\n }\n return { video: true, audio: true };\n};\n\"../../../../calling-component-bindings/src\"\"../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/CallComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAIlC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAGhH,wCAAwC;AACxC,OAAO,EAAE,oBAAoB,EAAQ,eAAe,EAAE,yCAAmC;AACzF,mDAAmD;AACnD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,mDAAmD;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,mDAA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AAI,OAAO,CAAC,oBAAoB,EAAE;QAChC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACb,CAAC;KACH;IACD,wCAAwC;IACxC,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;QAC/B,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,IAAI;SACZ,CAAC;KACH;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACtC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { OnRenderAvatarCallback, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport React, { useEffect, useMemo } from 'react';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallCompositeIcons } from '../common/icons';\nimport { useLocale } from '../localization';\nimport { CallAdapter } from './adapter/CallAdapter';\nimport { CallAdapterProvider, useAdapter } from './adapter/CallAdapterProvider';\nimport { CallPage } from './pages/CallPage';\nimport { ConfigurationPage } from './pages/ConfigurationPage';\nimport { NoticePage } from './pages/NoticePage';\nimport { useSelector } from './hooks/useSelector';\nimport { getPage } from './selectors/baseSelectors';\nimport { LobbyPage } from './pages/LobbyPage';\nimport { mainScreenContainerStyleDesktop, mainScreenContainerStyleMobile } from './styles/CallComposite.styles';\nimport { CallControlOptions } from './types/CallControlOptions';\n\n/* @conditional-compile-remove(rooms) */\nimport { _PermissionsProvider, Role, _getPermissions } from '@internal/react-components';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { LayerHost, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useId } from '@fluentui/react-hooks';\n/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { HoldPage } from './pages/HoldPage';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserPage } from './pages/UnsupportedBrowser';\nimport { PermissionConstraints } from '@azure/communication-calling';\n\n/**\n * Props for {@link CallComposite}.\n *\n * @public\n */\nexport interface CallCompositeProps extends BaseCompositeProps<CallCompositeIcons> {\n /**\n * An adapter provides logic and data to the composite.\n * Composite can also be controlled using the adapter.\n */\n adapter: CallAdapter;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL to invite new participants to the current call. If this is supplied, a button appears in the Participants\n * Button flyout menu.\n */\n callInvitationUrl?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallComposite}.\n */\n options?: CallCompositeOptions;\n\n /* @conditional-compile-remove(rooms) */\n /**\n * Set this to enable/disable capacities for different roles\n */\n role?: Role;\n}\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Device Permission restrictions.\n * Be able to start a call depending on camera and microphone permission options.\n *\n * @beta\n */\nexport interface DevicePermissionRestrictions {\n /**\n * Camera Permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n camera: 'required' | 'optional' | 'doNotPrompt';\n /**\n * Microphone permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n microphone: 'required' | 'optional' | 'doNotPrompt';\n}\n\n/**\n * Optional features of the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositeOptions = {\n /**\n * Surface Azure Communication Services backend errors in the UI with {@link @azure/communication-react#ErrorBar}.\n * Hide or show the error bar.\n * @defaultValue true\n */\n errorBar?: boolean;\n /**\n * Hide or Customize the control bar element.\n * Can be customized by providing an object of type {@link @azure/communication-react#CallControlOptions}.\n * @defaultValue true\n */\n callControls?: boolean | CallControlOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permission restrictions for your call.\n * Require device permissions to be set or have them as optional or not required to start a call\n */\n devicePermissions?: DevicePermissionRestrictions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Opt in call readiness feature for your call\n * Setting this to `true` will add call readiness features to the call experience\n */\n callReadinessOptedIn?: boolean;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * having network issues when connecting to the call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\ntype MainScreenProps = {\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n onRenderAvatar?: OnRenderAvatarCallback;\n callInvitationUrl?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: CallCompositeOptions;\n /* @conditional-compile-remove(rooms) */\n role?: Role;\n};\n\nconst MainScreen = (props: MainScreenProps): JSX.Element => {\n const { callInvitationUrl, onRenderAvatar, onFetchAvatarPersonaData, onFetchParticipantMenuItems } = props;\n const page = useSelector(getPage);\n\n const adapter = useAdapter();\n const locale = useLocale();\n\n let pageElement: JSX.Element | undefined;\n /* @conditional-compile-remove(rooms) */\n switch (page) {\n case 'roomNotFound':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageInvalidRoom\"\n title={locale.strings.call.roomNotFoundTitle}\n moreDetails={locale.strings.call.roomNotFoundDetails}\n dataUiId={'room-not-found-page'}\n />\n );\n break;\n case 'deniedPermissionToRoom':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageInvalidRoom\"\n title={locale.strings.call.deniedPermissionToRoomTitle}\n moreDetails={locale.strings.call.deniedPermissionToRoomDetails}\n dataUiId={'not-invited-to-room-page'}\n />\n );\n break;\n }\n switch (page) {\n case 'configuration':\n pageElement = (\n <ConfigurationPage\n mobileView={props.mobileView}\n startCallHandler={(): void => {\n adapter.joinCall();\n }}\n /* @conditional-compile-remove(call-readiness) */\n devicePermissions={props.options?.devicePermissions}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={props.options?.onPermissionsTroubleshootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={props.options?.onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */\n callReadinessOptedIn={props.options?.callReadinessOptedIn}\n />\n );\n break;\n case 'accessDeniedTeamsMeeting':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageAccessDeniedTeamsMeeting\"\n title={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle}\n moreDetails={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails}\n dataUiId={'access-denied-teams-meeting-page'}\n />\n );\n break;\n case 'removedFromCall':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageRemovedFromCall\"\n title={locale.strings.call.removedFromCallTitle}\n moreDetails={locale.strings.call.removedFromCallMoreDetails}\n dataUiId={'removed-from-call-page'}\n />\n );\n break;\n case 'joinCallFailedDueToNoNetwork':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageJoinCallFailedDueToNoNetwork\"\n title={locale.strings.call.failedToJoinCallDueToNoNetworkTitle}\n moreDetails={locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails}\n dataUiId={'join-call-failed-due-to-no-network-page'}\n />\n );\n break;\n case 'leftCall':\n pageElement = (\n <NoticePage\n iconName=\"NoticePageLeftCall\"\n title={locale.strings.call.leftCallTitle}\n moreDetails={locale.strings.call.leftCallMoreDetails}\n dataUiId={'left-call-page'}\n />\n );\n break;\n case 'lobby':\n pageElement = (\n <LobbyPage\n mobileView={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n />\n );\n break;\n case 'call':\n pageElement = (\n <CallPage\n onRenderAvatar={onRenderAvatar}\n callInvitationURL={callInvitationUrl}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={onFetchParticipantMenuItems}\n mobileView={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n />\n );\n break;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n case holdPageTrampoline():\n pageElement = (\n <>\n {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ <HoldPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n />\n }\n </>\n );\n break;\n case unsupportedEnvironmentPageTrampoline():\n pageElement = (\n <>\n {\n /* @conditional-compile-remove(unsupported-browser) */\n <UnsupportedBrowserPage onTroubleshootingClick={props.options?.onEnvironmentInfoTroubleshootingClick} />\n }\n </>\n );\n }\n\n if (!pageElement) {\n throw new Error('Invalid call composite page');\n }\n\n /* @conditional-compile-remove(rooms) */\n const permissions = _getPermissions(props.role);\n\n // default retElement for stable version\n let retElement = pageElement;\n /* @conditional-compile-remove(rooms) */\n retElement = <_PermissionsProvider permissions={permissions}>{pageElement}</_PermissionsProvider>;\n\n return retElement;\n};\n\n/**\n * A customizable UI composite for calling experience.\n *\n * @remarks Call composite min width/height are as follow:\n * - mobile: 17.5rem x 21rem (280px x 336px, with default rem at 16px)\n * - desktop: 30rem x 22rem (480px x 352px, with default rem at 16px)\n *\n * @public\n */\nexport const CallComposite = (props: CallCompositeProps): JSX.Element => {\n const {\n adapter,\n callInvitationUrl,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n formFactor = 'desktop',\n /* @conditional-compile-remove(rooms) */\n role\n } = props;\n\n useEffect(() => {\n (async () => {\n const constrain = getQueryOptions({\n /* @conditional-compile-remove(rooms) */ role: role,\n /* @conditional-compile-remove(call-readiness) */ callReadinessOptedIn: options?.callReadinessOptedIn ?? false\n });\n await adapter.askDevicePermission(constrain);\n adapter.queryCameras();\n adapter.queryMicrophones();\n adapter.querySpeakers();\n })();\n }, [\n adapter,\n /* @conditional-compile-remove(rooms) */ role,\n /* @conditional-compile-remove(call-readiness) */ options?.callReadinessOptedIn\n ]);\n\n const mobileView = formFactor === 'mobile';\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const modalLayerHostId = useId('modalLayerhost');\n\n const mainScreenContainerClassName = useMemo(() => {\n return mobileView ? mainScreenContainerStyleMobile : mainScreenContainerStyleDesktop;\n }, [mobileView]);\n\n return (\n <div className={mainScreenContainerClassName}>\n <BaseProvider {...props}>\n <CallAdapterProvider adapter={adapter}>\n <MainScreen\n callInvitationUrl={callInvitationUrl}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={onFetchParticipantMenuItems}\n mobileView={mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={modalLayerHostId}\n options={options}\n /* @conditional-compile-remove(rooms) */\n role={role}\n />\n {\n // This layer host is for ModalLocalAndRemotePIP in CallPane. This LayerHost cannot be inside the CallPane\n // because when the CallPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n // Additionally, this layer host cannot be in the Call Arrangement as it needs to be rendered before useMinMaxDragPosition() in\n // common/utils useRef is called.\n // Warning: this is fragile and works because the call arrangement page is only rendered after the call has connected and thus this\n // LayerHost will be guaranteed to have rendered (and subsequently mounted in the DOM). This ensures the DOM element will be available\n // before the call to `document.getElementById(modalLayerHostId)` is made.\n /* @conditional-compile-remove(one-to-n-calling) */\n mobileView && <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />\n }\n </CallAdapterProvider>\n </BaseProvider>\n </div>\n );\n};\n\nconst holdPageTrampoline = (): string => {\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n return 'hold';\n return 'call';\n};\n\nconst unsupportedEnvironmentPageTrampoline = (): string => {\n /* @conditional-compile-remove(unsupported-browser) */\n return 'unsupportedEnvironment';\n return 'call';\n};\n\nconst getQueryOptions = (options: {\n /* @conditional-compile-remove(rooms) */ role?: Role;\n /* @conditional-compile-remove(call-readiness) */ callReadinessOptedIn?: boolean;\n}): PermissionConstraints => {\n /* @conditional-compile-remove(call-readiness) */\n if (options.callReadinessOptedIn) {\n return {\n video: false,\n audio: false\n };\n }\n /* @conditional-compile-remove(rooms) */\n if (options.role === 'Consumer') {\n return {\n video: false,\n audio: true\n };\n }\n return { video: true, audio: true };\n};\n\"../../../../calling-component-bindings/src\"\"../../../../react-components/src\""]}
@@ -74,7 +74,7 @@ export const CallPane = (props) => {
74
74
  alternateCallerId: alternateCallerId }))))))),
75
75
  props.mobileView && (React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
76
76
  React.createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: !props.activePane, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition }))),
77
- drawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles },
77
+ drawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles() },
78
78
  React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
79
79
  };
80
80
  //# sourceMappingURL=CallPane.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CallPane.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,WAAW,EAKX,QAAQ,EACT,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,Y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IT license.\nimport { Stack } from '@fluentui/react';\nimport {\n _DrawerMenu,\n _DrawerMenuItemProps,\n _useContainerHeight,\n _useContainerWidth,\n ParticipantMenuItemsCallback,\n useTheme\n} from '@internal/react-components';\nimport React, { useMemo, useState } from 'react';\nimport { CallAdapter, CallControlOptions } from '../';\nimport { CallAdapterProvider } from '../adapter/CallAdapterProvider';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../../common/SidePaneHeader';\nimport { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../../common/PeoplePaneContent';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\nimport { TabHeader } from '../../common/TabHeader';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { useLocale } from '../../localization';\nimport { getPipStyles } from '../../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useMinMaxDragPosition } from '../../common/utils';\nimport { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../../common/styles/Pane.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { CallSidePaneOption } from '../hooks/useSidePaneState';\n\n/**\n * Pane that is used to store participants for Call composite\n * @private\n */\n/** @beta */\nexport const CallPane = (props: {\n callAdapter: CallAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallSidePaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n rtl?: boolean;\n callControls?: CallControlOptions;\n}): JSX.Element => {\n const [drawerMenuItems, setDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n\n const strings = getStrings();\n const theme = useTheme();\n\n const header = !props.activePane ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={strings}\n activeTab={props.activePane}\n disablePeopleButton={isDisabled(props.callControls?.participantsButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={strings}\n headingText={props.activePane === 'people' ? strings.peoplePaneTitle : ''}\n />\n );\n\n /**\n * In a Call Composite when a participant is removed, we must remove them from the call.\n */\n const removeParticipantFromCall = async (participantId: string): Promise<void> => {\n await props.callAdapter.removeParticipant(participantId);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = async (\n participant: PhoneNumberIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n await props.callAdapter.addParticipant(participant, options);\n };\n\n const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n return (\n <Stack verticalFill grow styles={paneStyles} data-ui-id={dataUiId} tokens={props.mobileView ? {} : sidePaneTokens}>\n {header}\n <Stack.Item verticalFill grow styles={paneBodyContainer}>\n <Stack horizontal styles={scrollableContainer}>\n <Stack.Item verticalFill styles={scrollableContainerContents}>\n <Stack styles={props.activePane === 'people' ? availableSpaceStyles : hiddenStyles}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n active={props.activePane === 'people'}\n {...props}\n onRemoveParticipant={removeParticipantFromCall}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n </Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <CallAdapterProvider adapter={props.callAdapter}>\n <ModalLocalAndRemotePIP\n modalLayerHostId={props.modalLayerHostId}\n hidden={!props.activePane}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\n </CallAdapterProvider>\n )}\n {drawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles}>\n <_DrawerMenu onLightDismiss={() => setDrawerMenuItems([])} items={drawerMenuItems} />\n </Stack>\n )}\n </Stack>\n );\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"CallPane.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,WAAW,EAKX,QAAQ,EACT,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,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C,KAAK,IAAC,MAAM,EAAE,qBAAqB,EAAE;YACpC,oBAAC,WAAW,IAAC,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,GAAI,CAC/E,CACT,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Stack } from '@fluentui/react';\nimport {\n _DrawerMenu,\n _DrawerMenuItemProps,\n _useContainerHeight,\n _useContainerWidth,\n ParticipantMenuItemsCallback,\n useTheme\n} from '@internal/react-components';\nimport React, { useMemo, useState } from 'react';\nimport { CallAdapter, CallControlOptions } from '../';\nimport { CallAdapterProvider } from '../adapter/CallAdapterProvider';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../../common/SidePaneHeader';\nimport { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../../common/PeoplePaneContent';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\nimport { TabHeader } from '../../common/TabHeader';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { useLocale } from '../../localization';\nimport { getPipStyles } from '../../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useMinMaxDragPosition } from '../../common/utils';\nimport { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../../common/styles/Pane.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { CallSidePaneOption } from '../hooks/useSidePaneState';\n\n/**\n * Pane that is used to store participants for Call composite\n * @private\n */\n/** @beta */\nexport const CallPane = (props: {\n callAdapter: CallAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallSidePaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n rtl?: boolean;\n callControls?: CallControlOptions;\n}): JSX.Element => {\n const [drawerMenuItems, setDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n\n const strings = getStrings();\n const theme = useTheme();\n\n const header = !props.activePane ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={strings}\n activeTab={props.activePane}\n disablePeopleButton={isDisabled(props.callControls?.participantsButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={strings}\n headingText={props.activePane === 'people' ? strings.peoplePaneTitle : ''}\n />\n );\n\n /**\n * In a Call Composite when a participant is removed, we must remove them from the call.\n */\n const removeParticipantFromCall = async (participantId: string): Promise<void> => {\n await props.callAdapter.removeParticipant(participantId);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = async (\n participant: PhoneNumberIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n await props.callAdapter.addParticipant(participant, options);\n };\n\n const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n return (\n <Stack verticalFill grow styles={paneStyles} data-ui-id={dataUiId} tokens={props.mobileView ? {} : sidePaneTokens}>\n {header}\n <Stack.Item verticalFill grow styles={paneBodyContainer}>\n <Stack horizontal styles={scrollableContainer}>\n <Stack.Item verticalFill styles={scrollableContainerContents}>\n <Stack styles={props.activePane === 'people' ? availableSpaceStyles : hiddenStyles}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n active={props.activePane === 'people'}\n {...props}\n onRemoveParticipant={removeParticipantFromCall}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n </Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <CallAdapterProvider adapter={props.callAdapter}>\n <ModalLocalAndRemotePIP\n modalLayerHostId={props.modalLayerHostId}\n hidden={!props.activePane}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\n </CallAdapterProvider>\n )}\n {drawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerMenu onLightDismiss={() => setDrawerMenuItems([])} items={drawerMenuItems} />\n </Stack>\n )}\n </Stack>\n );\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
@@ -7,6 +7,7 @@ export interface ConfigurationpageCameraDropdownProps {
7
7
  cameraGrantedDropdown: JSX.Element;
8
8
  cameraPermissionGranted: boolean;
9
9
  dropdownProps?: Record<string, never> & Partial<CallingHandlers>;
10
+ callReadinessOptedIn?: boolean;
10
11
  }
11
12
  /**
12
13
  * @private
@@ -22,7 +22,9 @@ export const ConfigurationpageCameraDropdown = (props) => {
22
22
  /* @conditional-compile-remove(call-readiness) */
23
23
  const cameraBlockedDropdown = (React.createElement(_DevicePermissionDropdown, Object.assign({ styles: dropDownStyles(theme), constrain: { video: true, audio: false }, strings: devicePermissionDropdownStringsCamera, icon: React.createElement(CallCompositeIcon, { iconName: "ControlButtonCameraOn", style: { height: '1.25rem', marginRight: '0.625rem' } }) }, props.dropdownProps)));
24
24
  /* @conditional-compile-remove(call-readiness) */
25
- return React.createElement(React.Fragment, null, props.cameraPermissionGranted ? props.cameraGrantedDropdown : cameraBlockedDropdown);
25
+ if (props.callReadinessOptedIn) {
26
+ return React.createElement(React.Fragment, null, props.cameraPermissionGranted ? props.cameraGrantedDropdown : cameraBlockedDropdown);
27
+ }
26
28
  return props.cameraGrantedDropdown;
27
29
  };
28
30
  //# sourceMappingURL=ConfigurationpageCameraDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationpageCameraDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAYvD;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAA2C,EAAe,EAAE;IAC1G,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,iDAAiD;IACjD,MAAM,qCAAqC,GAAqC;QAC9E,eAAe,EAAE,0BAA0B;QAC3C,mBAAmB,EAAE,OAAO;KAC7B,CAAC;IACF,iDAAiD;IACjD,MAAM,qBAAqB,GAAG,CAC5B,oBAAC,yBAAyB,kBACxB,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EACxC,OAAO,EAAE,qCAAqC,EAC9C,IAAI,EACF,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,uBAAuB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,GAAI,IAE3G,KAAK,CAAC,aAAa,EACvB,CACH,CAAC;IAEF,iDAAiD;IACjD,OAAO,0CAAG,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,CAAI,CAAC;IAElG,OAAO,KAAK,CAAC,qBAAqB,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* @conditional-compile-remove(call-readiness) */\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n useTheme,\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { dropDownStyles } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallCompositeIcon } from '../../common/icons';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\n\n/**\n * @private\n */\nexport interface ConfigurationpageCameraDropdownProps {\n cameraGrantedDropdown: JSX.Element;\n cameraPermissionGranted: boolean;\n dropdownProps?: Record<string, never> & Partial<CallingHandlers>;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageCameraDropdown = (props: ConfigurationpageCameraDropdownProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(call-readiness) */\n const devicePermissionDropdownStringsCamera: _DevicePermissionDropdownStrings = {\n placeHolderText: 'Enable Camera (optional)',\n actionButtonContent: 'Allow'\n };\n /* @conditional-compile-remove(call-readiness) */\n const cameraBlockedDropdown = (\n <_DevicePermissionDropdown\n styles={dropDownStyles(theme)}\n constrain={{ video: true, audio: false }}\n strings={devicePermissionDropdownStringsCamera}\n icon={\n <CallCompositeIcon iconName=\"ControlButtonCameraOn\" style={{ height: '1.25rem', marginRight: '0.625rem' }} />\n }\n {...props.dropdownProps}\n />\n );\n\n /* @conditional-compile-remove(call-readiness) */\n return <>{props.cameraPermissionGranted ? props.cameraGrantedDropdown : cameraBlockedDropdown}</>;\n\n return props.cameraGrantedDropdown;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
1
+ {"version":3,"file":"ConfigurationpageCameraDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAavD;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAA2C,EAAe,EAAE;IAC1G,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,iDAAiD;IACjD,MAAM,qCAAqC,GAAqC;QAC9E,eAAe,EAAE,0BAA0B;QAC3C,mBAAmB,EAAE,OAAO;KAC7B,CAAC;IACF,iDAAiD;IACjD,MAAM,qBAAqB,GAAG,CAC5B,oBAAC,yBAAyB,kBACxB,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EACxC,OAAO,EAAE,qCAAqC,EAC9C,IAAI,EACF,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,uBAAuB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,GAAI,IAE3G,KAAK,CAAC,aAAa,EACvB,CACH,CAAC;IAEF,iDAAiD;IACjD,IAAI,KAAK,CAAC,oBAAoB,EAAE;QAC9B,OAAO,0CAAG,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,CAAI,CAAC;KACnG;IAED,OAAO,KAAK,CAAC,qBAAqB,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* @conditional-compile-remove(call-readiness) */\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n useTheme,\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { dropDownStyles } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallCompositeIcon } from '../../common/icons';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\n\n/**\n * @private\n */\nexport interface ConfigurationpageCameraDropdownProps {\n cameraGrantedDropdown: JSX.Element;\n cameraPermissionGranted: boolean;\n dropdownProps?: Record<string, never> & Partial<CallingHandlers>;\n callReadinessOptedIn?: boolean;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageCameraDropdown = (props: ConfigurationpageCameraDropdownProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(call-readiness) */\n const devicePermissionDropdownStringsCamera: _DevicePermissionDropdownStrings = {\n placeHolderText: 'Enable Camera (optional)',\n actionButtonContent: 'Allow'\n };\n /* @conditional-compile-remove(call-readiness) */\n const cameraBlockedDropdown = (\n <_DevicePermissionDropdown\n styles={dropDownStyles(theme)}\n constrain={{ video: true, audio: false }}\n strings={devicePermissionDropdownStringsCamera}\n icon={\n <CallCompositeIcon iconName=\"ControlButtonCameraOn\" style={{ height: '1.25rem', marginRight: '0.625rem' }} />\n }\n {...props.dropdownProps}\n />\n );\n\n /* @conditional-compile-remove(call-readiness) */\n if (props.callReadinessOptedIn) {\n return <>{props.cameraPermissionGranted ? props.cameraGrantedDropdown : cameraBlockedDropdown}</>;\n }\n\n return props.cameraGrantedDropdown;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
@@ -19,6 +19,7 @@ export interface ConfigurationpageErrorBarProps {
19
19
  camera: PermissionState;
20
20
  microphone: PermissionState;
21
21
  };
22
+ callReadinessOptedIn?: boolean;
22
23
  }
23
24
  /**
24
25
  * @private
@@ -14,7 +14,9 @@ export const ConfigurationpageErrorBar = (props) => {
14
14
  /* @conditional-compile-remove(call-readiness) */
15
15
  onNetworkingTroubleShootingClick,
16
16
  /* @conditional-compile-remove(call-readiness) */
17
- permissionsState } = props;
17
+ permissionsState,
18
+ /* @conditional-compile-remove(call-readiness) */
19
+ callReadinessOptedIn = false } = props;
18
20
  /* @conditional-compile-remove(call-readiness) */
19
21
  const permissionTroubleshootingGuideStrings = {
20
22
  devicePermissionLinkText: 'Troubleshooting Camera and Microphone Permissions',
@@ -22,7 +24,7 @@ export const ConfigurationpageErrorBar = (props) => {
22
24
  dismissButtonText: 'OK'
23
25
  };
24
26
  /* @conditional-compile-remove(call-readiness) */
25
- if (showTroubleShootingErrorBar) {
27
+ if (showTroubleShootingErrorBar && callReadinessOptedIn) {
26
28
  return (React.createElement(_TroubleshootingGuideErrorBar, Object.assign({ troubleshootingGuideStrings: permissionTroubleshootingGuideStrings, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, onNetworkingTroubleshootingClick: onNetworkingTroubleShootingClick, permissionsState: permissionsState }, errorBarProps)));
27
29
  }
28
30
  return React.createElement(ErrorBar, Object.assign({}, errorBarProps));
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationpageErrorBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAOL,6BAA6B,EAC7B,QAAQ,EACT,4CAAmC;AAuBpC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAqC,EAAe,EAAE;IAC9F,MAAM,EACJ,aAAa;IACb,iDAAiD;IACjD,2BAA2B,GAAG,KAAK;IACnC,iDAAiD;IACjD,iCAAiC;IACjC,iDAAiD;IACjD,gCAAgC;IAChC,iDAAiD;IACjD,gBAAgB,EACjB,GAAG,KAAK,CAAC;IAEV,iDAAiD;IACjD,MAAM,qCAAqC,GAAyC;QAClF,wBAAwB,EAAE,mDAAmD;QAC7E,8BAA8B,EAAE,oCAAoC;QACpE,iBAAiB,EAAE,IAAI;KACxB,CAAC;IAEF,iDAAiD;IACjD,IAAI,2BAA2B,EAAE;QAC/B,OAAO,CACL,oBAAC,6BAA6B,kBAC5B,2BAA2B,EAAE,qCAAqC,EAClE,iCAAiC,EAAE,iCAAiC,EACpE,gCAAgC,EAAE,gCAAgC,EAClE,gBAAgB,EAAE,gBAAgB,IAC9B,aAAa,EACjB,CACH,CAAC;KACH;IAED,OAAO,oBAAC,QAAQ,oBAAK,aAAa,EAAI,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps,\n ActiveErrorMessage,\n ErrorBarProps,\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBar,\n ErrorBar\n} from '@internal/react-components';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\nimport { Common } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport interface ConfigurationpageErrorBarProps {\n errorBarProps: {\n activeErrorMessages: ActiveErrorMessage[];\n } & Common<CallingHandlers, ErrorBarProps>;\n showTroubleShootingErrorBar?: boolean;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n onNetworkingTroubleShootingClick?: () => void;\n permissionsState?: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageErrorBar = (props: ConfigurationpageErrorBarProps): JSX.Element => {\n const {\n errorBarProps,\n /* @conditional-compile-remove(call-readiness) */\n showTroubleShootingErrorBar = false,\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n permissionsState\n } = props;\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionTroubleshootingGuideStrings: _TroubleshootingGuideErrorBarStrings = {\n devicePermissionLinkText: 'Troubleshooting Camera and Microphone Permissions',\n networkTroubleshootingLinkText: 'Troubleshooting Network Connection',\n dismissButtonText: 'OK'\n };\n\n /* @conditional-compile-remove(call-readiness) */\n if (showTroubleShootingErrorBar) {\n return (\n <_TroubleshootingGuideErrorBar\n troubleshootingGuideStrings={permissionTroubleshootingGuideStrings}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n onNetworkingTroubleshootingClick={onNetworkingTroubleShootingClick}\n permissionsState={permissionsState}\n {...errorBarProps}\n />\n );\n }\n\n return <ErrorBar {...errorBarProps} />;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\"\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"ConfigurationpageErrorBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAOL,6BAA6B,EAC7B,QAAQ,EACT,4CAAmC;AAwBpC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAqC,EAAe,EAAE;IAC9F,MAAM,EACJ,aAAa;IACb,iDAAiD;IACjD,2BAA2B,GAAG,KAAK;IACnC,iDAAiD;IACjD,iCAAiC;IACjC,iDAAiD;IACjD,gCAAgC;IAChC,iDAAiD;IACjD,gBAAgB;IAChB,iDAAiD;IACjD,oBAAoB,GAAG,KAAK,EAC7B,GAAG,KAAK,CAAC;IAEV,iDAAiD;IACjD,MAAM,qCAAqC,GAAyC;QAClF,wBAAwB,EAAE,mDAAmD;QAC7E,8BAA8B,EAAE,oCAAoC;QACpE,iBAAiB,EAAE,IAAI;KACxB,CAAC;IAEF,iDAAiD;IACjD,IAAI,2BAA2B,IAAI,oBAAoB,EAAE;QACvD,OAAO,CACL,oBAAC,6BAA6B,kBAC5B,2BAA2B,EAAE,qCAAqC,EAClE,iCAAiC,EAAE,iCAAiC,EACpE,gCAAgC,EAAE,gCAAgC,EAClE,gBAAgB,EAAE,gBAAgB,IAC9B,aAAa,EACjB,CACH,CAAC;KACH;IAED,OAAO,oBAAC,QAAQ,oBAAK,aAAa,EAAI,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps,\n ActiveErrorMessage,\n ErrorBarProps,\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBar,\n ErrorBar\n} from '@internal/react-components';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\nimport { Common } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport interface ConfigurationpageErrorBarProps {\n errorBarProps: {\n activeErrorMessages: ActiveErrorMessage[];\n } & Common<CallingHandlers, ErrorBarProps>;\n showTroubleShootingErrorBar?: boolean;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n onNetworkingTroubleShootingClick?: () => void;\n permissionsState?: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n callReadinessOptedIn?: boolean;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageErrorBar = (props: ConfigurationpageErrorBarProps): JSX.Element => {\n const {\n errorBarProps,\n /* @conditional-compile-remove(call-readiness) */\n showTroubleShootingErrorBar = false,\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n permissionsState,\n /* @conditional-compile-remove(call-readiness) */\n callReadinessOptedIn = false\n } = props;\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionTroubleshootingGuideStrings: _TroubleshootingGuideErrorBarStrings = {\n devicePermissionLinkText: 'Troubleshooting Camera and Microphone Permissions',\n networkTroubleshootingLinkText: 'Troubleshooting Network Connection',\n dismissButtonText: 'OK'\n };\n\n /* @conditional-compile-remove(call-readiness) */\n if (showTroubleShootingErrorBar && callReadinessOptedIn) {\n return (\n <_TroubleshootingGuideErrorBar\n troubleshootingGuideStrings={permissionTroubleshootingGuideStrings}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n onNetworkingTroubleshootingClick={onNetworkingTroubleShootingClick}\n permissionsState={permissionsState}\n {...errorBarProps}\n />\n );\n }\n\n return <ErrorBar {...errorBarProps} />;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\"\"../../../../../acs-ui-common/src\""]}
@@ -7,6 +7,7 @@ export interface ConfigurationpageMicDropdownProps {
7
7
  micGrantedDropdown: JSX.Element;
8
8
  micPermissionGranted: boolean;
9
9
  dropdownProps?: Record<string, never> & Partial<CallingHandlers>;
10
+ callReadinessOptedIn?: boolean;
10
11
  }
11
12
  /**
12
13
  * @private
@@ -22,9 +22,11 @@ export const ConfigurationpageMicDropdown = (props) => {
22
22
  /* @conditional-compile-remove(call-readiness) */
23
23
  const microphoneBlockedDropdown = (React.createElement(_DevicePermissionDropdown, Object.assign({ styles: dropDownStyles(theme), constrain: { video: false, audio: true }, strings: devicePermissionDropdownStringsMicrophone, icon: React.createElement(CallCompositeIcon, { iconName: "ControlButtonMicOn", style: { height: '1.25rem', marginRight: '0.625rem' } }) }, props.dropdownProps)));
24
24
  /* @conditional-compile-remove(call-readiness) */
25
- return React.createElement(React.Fragment, null,
26
- " ",
27
- props.micPermissionGranted ? props.micGrantedDropdown : microphoneBlockedDropdown);
25
+ if (props.callReadinessOptedIn) {
26
+ return React.createElement(React.Fragment, null,
27
+ " ",
28
+ props.micPermissionGranted ? props.micGrantedDropdown : microphoneBlockedDropdown);
29
+ }
28
30
  return props.micGrantedDropdown;
29
31
  };
30
32
  //# sourceMappingURL=ConfigurationpageMicDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationpageMicDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAYvD;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAwC,EAAe,EAAE;IACpG,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,iDAAiD;IACjD,MAAM,yCAAyC,GAAqC;QAClF,eAAe,EAAE,8BAA8B;QAC/C,mBAAmB,EAAE,OAAO;KAC7B,CAAC;IAEF,iDAAiD;IACjD,MAAM,yBAAyB,GAAG,CAChC,oBAAC,yBAAyB,kBACxB,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EACxC,OAAO,EAAE,yCAAyC,EAClD,IAAI,EAAE,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,oBAAoB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,GAAI,IAC5G,KAAK,CAAC,aAAa,EACvB,CACH,CAAC;IAEF,iDAAiD;IACjD,OAAO;;QAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,yBAAyB,CAAI,CAAC;IACjG,OAAO,KAAK,CAAC,kBAAkB,CAAC;AAClC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* @conditional-compile-remove(call-readiness) */\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n useTheme,\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { dropDownStyles } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallCompositeIcon } from '../../common/icons';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\n\n/**\n * @private\n */\nexport interface ConfigurationpageMicDropdownProps {\n micGrantedDropdown: JSX.Element;\n micPermissionGranted: boolean;\n dropdownProps?: Record<string, never> & Partial<CallingHandlers>;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageMicDropdown = (props: ConfigurationpageMicDropdownProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const theme = useTheme();\n /* @conditional-compile-remove(call-readiness) */\n const devicePermissionDropdownStringsMicrophone: _DevicePermissionDropdownStrings = {\n placeHolderText: 'Enable Microphone (required)',\n actionButtonContent: 'Allow'\n };\n\n /* @conditional-compile-remove(call-readiness) */\n const microphoneBlockedDropdown = (\n <_DevicePermissionDropdown\n styles={dropDownStyles(theme)}\n constrain={{ video: false, audio: true }}\n strings={devicePermissionDropdownStringsMicrophone}\n icon={<CallCompositeIcon iconName=\"ControlButtonMicOn\" style={{ height: '1.25rem', marginRight: '0.625rem' }} />}\n {...props.dropdownProps}\n />\n );\n\n /* @conditional-compile-remove(call-readiness) */\n return <> {props.micPermissionGranted ? props.micGrantedDropdown : microphoneBlockedDropdown}</>;\n return props.micGrantedDropdown;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
1
+ {"version":3,"file":"ConfigurationpageMicDropdown.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iDAAiD;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,QAAQ,EAER,yBAAyB,EAE1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAavD;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAwC,EAAe,EAAE;IACpG,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,iDAAiD;IACjD,MAAM,yCAAyC,GAAqC;QAClF,eAAe,EAAE,8BAA8B;QAC/C,mBAAmB,EAAE,OAAO;KAC7B,CAAC;IAEF,iDAAiD;IACjD,MAAM,yBAAyB,GAAG,CAChC,oBAAC,yBAAyB,kBACxB,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EACxC,OAAO,EAAE,yCAAyC,EAClD,IAAI,EAAE,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,oBAAoB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,GAAI,IAC5G,KAAK,CAAC,aAAa,EACvB,CACH,CAAC;IAEF,iDAAiD;IACjD,IAAI,KAAK,CAAC,oBAAoB,EAAE;QAC9B,OAAO;;YAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,yBAAyB,CAAI,CAAC;KAClG;IACD,OAAO,KAAK,CAAC,kBAAkB,CAAC;AAClC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* @conditional-compile-remove(call-readiness) */\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n useTheme,\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdown,\n _DevicePermissionDropdownProps\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { dropDownStyles } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallCompositeIcon } from '../../common/icons';\nimport { CallingHandlers } from '@internal/calling-component-bindings';\n\n/**\n * @private\n */\nexport interface ConfigurationpageMicDropdownProps {\n micGrantedDropdown: JSX.Element;\n micPermissionGranted: boolean;\n dropdownProps?: Record<string, never> & Partial<CallingHandlers>;\n callReadinessOptedIn?: boolean;\n}\n\n/**\n * @private\n */\nexport const ConfigurationpageMicDropdown = (props: ConfigurationpageMicDropdownProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const theme = useTheme();\n /* @conditional-compile-remove(call-readiness) */\n const devicePermissionDropdownStringsMicrophone: _DevicePermissionDropdownStrings = {\n placeHolderText: 'Enable Microphone (required)',\n actionButtonContent: 'Allow'\n };\n\n /* @conditional-compile-remove(call-readiness) */\n const microphoneBlockedDropdown = (\n <_DevicePermissionDropdown\n styles={dropDownStyles(theme)}\n constrain={{ video: false, audio: true }}\n strings={devicePermissionDropdownStringsMicrophone}\n icon={<CallCompositeIcon iconName=\"ControlButtonMicOn\" style={{ height: '1.25rem', marginRight: '0.625rem' }} />}\n {...props.dropdownProps}\n />\n );\n\n /* @conditional-compile-remove(call-readiness) */\n if (props.callReadinessOptedIn) {\n return <> {props.micPermissionGranted ? props.micGrantedDropdown : microphoneBlockedDropdown}</>;\n }\n return props.micGrantedDropdown;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
@@ -16,6 +16,7 @@ export interface LocalDeviceSettingsType {
16
16
  onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;
17
17
  onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;
18
18
  onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;
19
+ callReadinessOptedIn?: boolean;
19
20
  }
20
21
  /**
21
22
  * @private