@azure/communication-react 1.20.0-alpha-202410030015 → 1.20.0-alpha-202410050015

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 (139) hide show
  1. package/dist/communication-react.d.ts +67 -1
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BfMoXn7s.js → ChatMessageComponentAsRichTextEditBox-Bc2rnHE3.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BfMoXn7s.js.map → ChatMessageComponentAsRichTextEditBox-Bc2rnHE3.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DoRv_d64.js → RichTextSendBoxWrapper-BhEvRpXU.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DoRv_d64.js.map → RichTextSendBoxWrapper-BhEvRpXU.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-BcfT9uWf.js → index-CM02z9d2.js} +585 -412
  7. package/dist/dist-cjs/communication-react/index-CM02z9d2.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +3 -1
  9. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +5 -1
  11. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  14. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +1 -1
  15. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
  16. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +1 -1
  17. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -1
  18. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +1 -1
  19. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -1
  20. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +1 -1
  21. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
  22. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +3 -3
  23. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js +2 -1
  27. package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js.map +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +2 -1
  29. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  30. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +2 -2
  31. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -1
  32. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +46 -0
  33. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +3 -0
  35. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +57 -12
  36. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  38. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -0
  39. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  40. package/dist/dist-esm/calling-stateful-client/src/Converter.js +2 -0
  41. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +49 -43
  43. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -1
  45. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.d.ts +2 -1
  47. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.d.ts +19 -0
  49. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js +32 -0
  50. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js.map +1 -0
  51. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +1 -1
  52. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +2 -0
  54. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  55. package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
  56. package/dist/dist-esm/communication-react/src/index.js +1 -1
  57. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +2 -1
  59. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +1 -1
  61. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/components/Notification.js +1 -1
  63. package/dist/dist-esm/react-components/src/components/Notification.js.map +1 -1
  64. package/dist/dist-esm/react-components/src/components/VerticalGallery.js +2 -1
  65. package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +1 -1
  67. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/index.d.ts +1 -0
  69. package/dist/dist-esm/react-components/src/index.js +1 -0
  70. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/ComponentLocale.d.ts +8 -0
  72. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/ComponentLocale.js +13 -0
  73. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/ComponentLocale.js.map +1 -0
  74. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +670 -0
  75. package/dist/dist-esm/react-components/src/theming/generateTheme.js +10 -2
  76. package/dist/dist-esm/react-components/src/theming/generateTheme.js.map +1 -1
  77. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +13 -9
  78. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  79. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +4 -0
  80. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +15 -14
  82. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -3
  84. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +28 -21
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +11 -7
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +7 -8
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +1 -0
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +1 -1
  92. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +7 -3
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +5 -2
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +7 -6
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +4 -4
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +6 -7
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +5 -5
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +3 -2
  106. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +15 -10
  108. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  109. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +7 -9
  110. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +20 -1
  112. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +19 -0
  113. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +33 -36
  115. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +6 -0
  117. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
  118. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
  119. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +16 -0
  120. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +15 -0
  121. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
  122. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +4 -5
  123. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  124. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +3 -0
  125. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +4 -7
  126. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  127. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +2 -0
  128. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +9 -4
  129. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  130. package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -0
  131. package/dist/dist-esm/react-composites/src/composites/index.js +1 -0
  132. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  133. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/CompositeLocale.d.ts +8 -0
  134. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/CompositeLocale.js +15 -0
  135. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/CompositeLocale.js.map +1 -0
  136. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +411 -0
  137. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -0
  138. package/package.json +5 -5
  139. package/dist/dist-cjs/communication-react/index-BcfT9uWf.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BcfT9uWf.js');
3
+ var index = require('./index-CM02z9d2.js');
4
4
  require('react');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-components');
@@ -37,6 +37,7 @@ require('@azure/communication-calling-effects');
37
37
 
38
38
  exports.COMPONENT_LOCALE_AR_SA = index.COMPONENT_LOCALE_AR_SA;
39
39
  exports.COMPONENT_LOCALE_CS_CZ = index.COMPONENT_LOCALE_CS_CZ;
40
+ exports.COMPONENT_LOCALE_CY_GB = index.COMPONENT_LOCALE_CY_GB;
40
41
  exports.COMPONENT_LOCALE_DE_DE = index.COMPONENT_LOCALE_DE_DE;
41
42
  exports.COMPONENT_LOCALE_EN_GB = index.COMPONENT_LOCALE_EN_GB;
42
43
  exports.COMPONENT_LOCALE_EN_US = index.COMPONENT_LOCALE_EN_US;
@@ -58,6 +59,7 @@ exports.COMPONENT_LOCALE_ZH_CN = index.COMPONENT_LOCALE_ZH_CN;
58
59
  exports.COMPONENT_LOCALE_ZH_TW = index.COMPONENT_LOCALE_ZH_TW;
59
60
  exports.COMPOSITE_LOCALE_AR_SA = index.COMPOSITE_LOCALE_AR_SA;
60
61
  exports.COMPOSITE_LOCALE_CS_CZ = index.COMPOSITE_LOCALE_CS_CZ;
62
+ exports.COMPOSITE_LOCALE_CY_GB = index.COMPOSITE_LOCALE_CY_GB;
61
63
  exports.COMPOSITE_LOCALE_DE_DE = index.COMPOSITE_LOCALE_DE_DE;
62
64
  exports.COMPOSITE_LOCALE_EN_GB = index.COMPOSITE_LOCALE_EN_GB;
63
65
  exports.COMPOSITE_LOCALE_EN_US = index.COMPOSITE_LOCALE_EN_US;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,7 +6,11 @@
6
6
  * @internal
7
7
  */
8
8
  export const _base64ToBlob = (dataURI) => {
9
- const byteString = atob(dataURI.split(',')[1]);
9
+ const str = dataURI.split(',')[1];
10
+ if (!str) {
11
+ throw new Error('Invalid base64 string');
12
+ }
13
+ const byteString = atob(str);
10
14
  const arrayBuffer = new ArrayBuffer(byteString.length);
11
15
  const uint8Array = new Uint8Array(arrayBuffer);
12
16
  for (let i = 0; i < byteString.length; i++) {
@@ -1 +1 @@
1
- {"version":3,"file":"dataConversion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/dataConversion.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,gEAAgE;AAChE;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAQ,EAAE;IACrD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,IAAI,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Convert a base64 string to a Blob.\n * @internal\n */\nexport const _base64ToBlob = (dataURI: string): Blob => {\n const byteString = atob(dataURI.split(',')[1]);\n const arrayBuffer = new ArrayBuffer(byteString.length);\n const uint8Array = new Uint8Array(arrayBuffer);\n\n for (let i = 0; i < byteString.length; i++) {\n uint8Array[i] = byteString.charCodeAt(i);\n }\n return new Blob([arrayBuffer]);\n};\n"]}
1
+ {"version":3,"file":"dataConversion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/dataConversion.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,gEAAgE;AAChE;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAQ,EAAE;IACrD,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,IAAI,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Convert a base64 string to a Blob.\n * @internal\n */\nexport const _base64ToBlob = (dataURI: string): Blob => {\n const str = dataURI.split(',')[1];\n if (!str) {\n throw new Error('Invalid base64 string');\n }\n\n const byteString = atob(str);\n const arrayBuffer = new ArrayBuffer(byteString.length);\n const uint8Array = new Uint8Array(arrayBuffer);\n\n for (let i = 0; i < byteString.length; i++) {\n uint8Array[i] = byteString.charCodeAt(i);\n }\n return new Blob([arrayBuffer]);\n};\n"]}
@@ -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.20.0-alpha-202410030015';
5
+ module.exports = '1.20.0-alpha-202410050015';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.20.0-alpha-202410030015';\n"]}
1
+ {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.20.0-alpha-202410050015';\n"]}
@@ -37,7 +37,7 @@ export const loadCallComposite = function (adapterArgs, htmlElement, props) {
37
37
  if (!htmlElement) {
38
38
  throw new Error('Failed to find the root element');
39
39
  }
40
- createRoot(htmlElement).render(React.createElement(CallComposite, Object.assign(Object.assign({}, props), { adapter }), null));
40
+ createRoot(htmlElement).render(React.createElement(CallComposite, { options: props, adapter }, null));
41
41
  return adapter;
42
42
  });
43
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"callCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/callCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EACL,aAAa,EACb,mCAAmC,EAKpC,gDAAmC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAC/B,WAAqC,EACrC,WAA+B,EAC/B,KAA4B;;QAE5B,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC;QAErE,MAAM,OAAO,GAAG,MAAM,mCAAmC,CAAC;YACxD,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,OAAO;YACP,OAAO;SACR,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,kCAAO,KAAK,KAAE,OAAO,KAAI,IAAI,CAAC,CAAC,CAAC;QAChG,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallComposite,\n createAzureCommunicationCallAdapter,\n AzureCommunicationCallAdapterOptions,\n CallAdapter,\n CallAdapterLocator,\n CallCompositeOptions\n} from '@internal/react-composites';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the OutboundCallComposite that you can use in your application.\n * @beta\n */\nexport type CallCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName: string;\n locator: CallAdapterLocator;\n options?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Loader function for the OutboundCallComposite that you can use in your application.\n *\n * @beta\n */\nexport const loadCallComposite = async function (\n adapterArgs: CallCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props?: CallCompositeOptions\n): Promise<CallAdapter | undefined> {\n initializeIcons();\n const { userId, token, displayName, locator, options } = adapterArgs;\n\n const adapter = await createAzureCommunicationCallAdapter({\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n locator,\n options\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(CallComposite, { ...props, adapter }, null));\n return adapter;\n};\n"]}
1
+ {"version":3,"file":"callCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/callCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EACL,aAAa,EACb,mCAAmC,EAKpC,gDAAmC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAC/B,WAAqC,EACrC,WAA+B,EAC/B,KAA4B;;QAE5B,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC;QAErE,MAAM,OAAO,GAAG,MAAM,mCAAmC,CAAC;YACxD,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,OAAO;YACP,OAAO;SACR,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QACtG,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallComposite,\n createAzureCommunicationCallAdapter,\n AzureCommunicationCallAdapterOptions,\n CallAdapter,\n CallAdapterLocator,\n CallCompositeOptions\n} from '@internal/react-composites';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the OutboundCallComposite that you can use in your application.\n * @beta\n */\nexport type CallCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName: string;\n locator: CallAdapterLocator;\n options?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Loader function for the OutboundCallComposite that you can use in your application.\n *\n * @beta\n */\nexport const loadCallComposite = async function (\n adapterArgs: CallCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props?: CallCompositeOptions\n): Promise<CallAdapter | undefined> {\n initializeIcons();\n const { userId, token, displayName, locator, options } = adapterArgs;\n\n const adapter = await createAzureCommunicationCallAdapter({\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n locator,\n options\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(CallComposite, { options: props, adapter }, null));\n return adapter;\n};\n"]}
@@ -36,7 +36,7 @@ export const loadCallWithChatComposite = function (args, htmlElement, props) {
36
36
  if (!htmlElement) {
37
37
  throw new Error('Failed to find the root element');
38
38
  }
39
- createRoot(htmlElement).render(React.createElement(CallWithChatComposite, Object.assign(Object.assign({}, props), { adapter }), null));
39
+ createRoot(htmlElement).render(React.createElement(CallWithChatComposite, { options: props, adapter }, null));
40
40
  return adapter;
41
41
  });
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"callWithChatCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/callWithChatCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EAIL,2CAA2C,EAC3C,qBAAqB,EACtB,gDAAmC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,UACvC,IAAsC,EACtC,WAA+B,EAC/B,KAAmC;;QAEnC,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAC/D,MAAM,OAAO,GAAG,MAAM,2CAA2C,CAAC;YAChE,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,QAAQ,EAAE,QAAQ;YAClB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,qBAAqB,kCAAO,KAAK,KAAE,OAAO,KAAI,IAAI,CAAC,CAAC,CAAC;QACxG,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallWithChatAdapter,\n CallAndChatLocator,\n CallWithChatCompositeOptions,\n createAzureCommunicationCallWithChatAdapter,\n CallWithChatComposite\n} from '@internal/react-composites';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the CallWithChatComposite that you can use in your application.\n * @beta\n */\nexport type CallWithChatCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName: string;\n endpoint: string;\n locator: CallAndChatLocator;\n};\n\n/**\n * Props for the CallWithChatComposite that you can use in your application.\n * @beta\n */\nexport const loadCallWithChatComposite = async function (\n args: CallWithChatCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props: CallWithChatCompositeOptions\n): Promise<CallWithChatAdapter | undefined> {\n initializeIcons();\n const { userId, token, displayName, endpoint, locator } = args;\n const adapter = await createAzureCommunicationCallWithChatAdapter({\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n endpoint: endpoint,\n locator: locator\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(CallWithChatComposite, { ...props, adapter }, null));\n return adapter;\n};\n"]}
1
+ {"version":3,"file":"callWithChatCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/callWithChatCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EAIL,2CAA2C,EAC3C,qBAAqB,EACtB,gDAAmC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,UACvC,IAAsC,EACtC,WAA+B,EAC/B,KAAmC;;QAEnC,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAC/D,MAAM,OAAO,GAAG,MAAM,2CAA2C,CAAC;YAChE,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,QAAQ,EAAE,QAAQ;YAClB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAC9G,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallWithChatAdapter,\n CallAndChatLocator,\n CallWithChatCompositeOptions,\n createAzureCommunicationCallWithChatAdapter,\n CallWithChatComposite\n} from '@internal/react-composites';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the CallWithChatComposite that you can use in your application.\n * @beta\n */\nexport type CallWithChatCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName: string;\n endpoint: string;\n locator: CallAndChatLocator;\n};\n\n/**\n * Props for the CallWithChatComposite that you can use in your application.\n * @beta\n */\nexport const loadCallWithChatComposite = async function (\n args: CallWithChatCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props: CallWithChatCompositeOptions\n): Promise<CallWithChatAdapter | undefined> {\n initializeIcons();\n const { userId, token, displayName, endpoint, locator } = args;\n const adapter = await createAzureCommunicationCallWithChatAdapter({\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n endpoint: endpoint,\n locator: locator\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(CallWithChatComposite, { options: props, adapter }, null));\n return adapter;\n};\n"]}
@@ -36,7 +36,7 @@ export const loadChatComposite = function (args, htmlElement, props) {
36
36
  if (!htmlElement) {
37
37
  throw new Error('Failed to find the root element');
38
38
  }
39
- createRoot(htmlElement).render(React.createElement(ChatComposite, Object.assign(Object.assign({}, props), { adapter }), null));
39
+ createRoot(htmlElement).render(React.createElement(ChatComposite, { options: props, adapter }, null));
40
40
  return adapter;
41
41
  });
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"chatCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/chatCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAEL,aAAa,EAEb,mCAAmC,EACpC,gDAAmC;AACpC,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAC/B,IAA8B,EAC9B,WAA+B,EAC/B,KAA2B;;QAE3B,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAChE,MAAM,OAAO,GAAG,MAAM,mCAAmC,CAAC;YACxD,QAAQ;YACR,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,QAAQ;SACT,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,kCAAO,KAAK,KAAE,OAAO,KAAI,IAAI,CAAC,CAAC,CAAC;QAChG,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport {\n ChatAdapter,\n ChatComposite,\n ChatCompositeOptions,\n createAzureCommunicationChatAdapter\n} from '@internal/react-composites';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the ChatComposite that you can use in your application.\n * @beta\n */\nexport type ChatCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName?: string;\n endpoint: string;\n threadId: string;\n};\n\n/**\n * Loader function for the ChatComposite that you can use in your application.\n * @beta\n */\nexport const loadChatComposite = async function (\n args: ChatCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props: ChatCompositeOptions\n): Promise<ChatAdapter | undefined> {\n initializeIcons();\n const { userId, token, endpoint, threadId, displayName } = args;\n const adapter = await createAzureCommunicationChatAdapter({\n endpoint,\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n threadId\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(ChatComposite, { ...props, adapter }, null));\n return adapter;\n};\n"]}
1
+ {"version":3,"file":"chatCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/chatCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAEL,aAAa,EAEb,mCAAmC,EACpC,gDAAmC;AACpC,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAC/B,IAA8B,EAC9B,WAA+B,EAC/B,KAA2B;;QAE3B,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAChE,MAAM,OAAO,GAAG,MAAM,mCAAmC,CAAC;YACxD,QAAQ;YACR,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,QAAQ;SACT,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QACtG,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport {\n ChatAdapter,\n ChatComposite,\n ChatCompositeOptions,\n createAzureCommunicationChatAdapter\n} from '@internal/react-composites';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the ChatComposite that you can use in your application.\n * @beta\n */\nexport type ChatCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName?: string;\n endpoint: string;\n threadId: string;\n};\n\n/**\n * Loader function for the ChatComposite that you can use in your application.\n * @beta\n */\nexport const loadChatComposite = async function (\n args: ChatCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props: ChatCompositeOptions\n): Promise<ChatAdapter | undefined> {\n initializeIcons();\n const { userId, token, endpoint, threadId, displayName } = args;\n const adapter = await createAzureCommunicationChatAdapter({\n endpoint,\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n threadId\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(ChatComposite, { options: props, adapter }, null));\n return adapter;\n};\n"]}
@@ -43,7 +43,7 @@ export const loadOutboundCallComposite = function (adapterArgs, htmlElement, pro
43
43
  if (!htmlElement) {
44
44
  throw new Error('Failed to find the root element');
45
45
  }
46
- createRoot(htmlElement).render(React.createElement(CallComposite, Object.assign(Object.assign({}, props), { adapter }), null));
46
+ createRoot(htmlElement).render(React.createElement(CallComposite, { options: props, adapter }, null));
47
47
  return adapter;
48
48
  });
49
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"outboundCallCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/outboundCallCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EACL,aAAa,EACb,mCAAmC,EAKpC,gDAAmC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,UACvC,WAA6C,EAC7C,WAA+B,EAC/B,KAA4B;;;QAE5B,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC;QAC3E,MAAM,sBAAsB,GAC1B,OAAO,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ;YAClC,CAAC,CAAE,aAA0B,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE;gBACjD,OAAO,+BAA+B,CAAC,MAAM,CAAC,CAAC;YACjD,CAAC,CAAC;YACJ,CAAC,CAAC,SAAS,CAAC;QAEhB,MAAM,OAAO,GAAG,MAAM,mCAAmC,CAAC;YACxD,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,aAAa,EAAE,MAAC,sBAAgD,mCAAK,aAAuC;YAC5G,OAAO;SACR,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,kCAAO,KAAK,KAAE,OAAO,KAAI,IAAI,CAAC,CAAC,CAAC;QAChG,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallComposite,\n createAzureCommunicationCallAdapter,\n CallCompositeOptions,\n StartCallIdentifier,\n AzureCommunicationCallAdapterOptions,\n CallAdapter\n} from '@internal/react-composites';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the OutboundCallComposite that you can use in your application.\n * @beta\n */\nexport type OutboundCallCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName: string;\n targetCallees: string[] | StartCallIdentifier[];\n options?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Loader function for the OutboundCallComposite that you can use in your application.\n *\n * @beta\n */\nexport const loadOutboundCallComposite = async function (\n adapterArgs: OutboundCallCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props?: CallCompositeOptions\n): Promise<CallAdapter | undefined> {\n initializeIcons();\n const { userId, token, displayName, targetCallees, options } = adapterArgs;\n const formattedTargetCallees =\n typeof targetCallees[0] === 'string'\n ? (targetCallees as string[]).map((callee: string) => {\n return fromFlatCommunicationIdentifier(callee);\n })\n : undefined;\n\n const adapter = await createAzureCommunicationCallAdapter({\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n targetCallees: (formattedTargetCallees as StartCallIdentifier[]) ?? (targetCallees as StartCallIdentifier[]),\n options\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(CallComposite, { ...props, adapter }, null));\n return adapter;\n};\n"]}
1
+ {"version":3,"file":"outboundCallCompositeLoader.js","sourceRoot":"","sources":["../../../../../acs-ui-javascript-loaders/src/outboundCallCompositeLoader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;AACnC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAA+B,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,gCAAgC;AAC1E,OAAO,EACL,aAAa,EACb,mCAAmC,EAKpC,gDAAmC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclD;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,UACvC,WAA6C,EAC7C,WAA+B,EAC/B,KAA4B;;;QAE5B,eAAe,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC;QAC3E,MAAM,sBAAsB,GAC1B,OAAO,aAAa,CAAC,CAAC,CAAC,KAAK,QAAQ;YAClC,CAAC,CAAE,aAA0B,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE;gBACjD,OAAO,+BAA+B,CAAC,MAAM,CAAC,CAAC;YACjD,CAAC,CAAC;YACJ,CAAC,CAAC,SAAS,CAAC;QAEhB,MAAM,OAAO,GAAG,MAAM,mCAAmC,CAAC;YACxD,MAAM,EAAE,+BAA+B,CAAC,MAAM,CAAgC;YAC9E,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW;YACvC,UAAU,EAAE,IAAI,iCAAiC,CAAC,KAAK,CAAC;YACxD,aAAa,EAAE,MAAC,sBAAgD,mCAAK,aAAuC;YAC5G,OAAO;SACR,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QACtG,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { parseReactVersion } from './utils';\n\nconst reactVersion = React.version;\nparseReactVersion(reactVersion);\n\nimport { createRoot } from 'react-dom/client';\nimport { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallComposite,\n createAzureCommunicationCallAdapter,\n CallCompositeOptions,\n StartCallIdentifier,\n AzureCommunicationCallAdapterOptions,\n CallAdapter\n} from '@internal/react-composites';\nimport { initializeIcons } from '@fluentui/react';\n\n/**\n * Props for the OutboundCallComposite that you can use in your application.\n * @beta\n */\nexport type OutboundCallCompositeLoaderProps = {\n userId: string;\n token: string;\n displayName: string;\n targetCallees: string[] | StartCallIdentifier[];\n options?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Loader function for the OutboundCallComposite that you can use in your application.\n *\n * @beta\n */\nexport const loadOutboundCallComposite = async function (\n adapterArgs: OutboundCallCompositeLoaderProps,\n htmlElement: HTMLElement | null,\n props?: CallCompositeOptions\n): Promise<CallAdapter | undefined> {\n initializeIcons();\n const { userId, token, displayName, targetCallees, options } = adapterArgs;\n const formattedTargetCallees =\n typeof targetCallees[0] === 'string'\n ? (targetCallees as string[]).map((callee: string) => {\n return fromFlatCommunicationIdentifier(callee);\n })\n : undefined;\n\n const adapter = await createAzureCommunicationCallAdapter({\n userId: fromFlatCommunicationIdentifier(userId) as CommunicationUserIdentifier,\n displayName: displayName ?? 'anonymous',\n credential: new AzureCommunicationTokenCredential(token),\n targetCallees: (formattedTargetCallees as StartCallIdentifier[]) ?? (targetCallees as StartCallIdentifier[]),\n options\n });\n\n if (!htmlElement) {\n throw new Error('Failed to find the root element');\n }\n\n createRoot(htmlElement).render(React.createElement(CallComposite, { options: props, adapter }, null));\n return adapter;\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { DominantSpeakersInfo } from '@azure/communication-calling';
1
+ import { CallState, DominantSpeakersInfo } from '@azure/communication-calling';
2
2
  import { BreakoutRoom } from '@azure/communication-calling';
3
3
  import { ParticipantCapabilities } from '@azure/communication-calling';
4
4
  import { EnvironmentInfo } from '@azure/communication-calling';
@@ -105,7 +105,7 @@ export declare const getDiagnostics: (state: CallClientState, props: CallingBase
105
105
  /**
106
106
  * @private
107
107
  */
108
- export declare const getCallState: (state: CallClientState, props: CallingBaseSelectorProps) => string;
108
+ export declare const getCallState: (state: CallClientState, props: CallingBaseSelectorProps) => CallState | undefined;
109
109
  /**
110
110
  * @private
111
111
  */
@@ -113,7 +113,7 @@ export declare const getEnvironmentInfo: (state: CallClientState) => undefined |
113
113
  /** @private */
114
114
  export declare const getParticipantCount: (state: CallClientState, props: CallingBaseSelectorProps) => number | undefined;
115
115
  /** @private */
116
- export declare const getCaptionsKind: (state: CallClientState, props: CallingBaseSelectorProps) => CaptionsKind;
116
+ export declare const getCaptionsKind: (state: CallClientState, props: CallingBaseSelectorProps) => CaptionsKind | undefined;
117
117
  /** @private */
118
118
  export declare const getCaptions: (state: CallClientState, props: CallingBaseSelectorProps) => CaptionsInfo[] | undefined;
119
119
  /** @private */
@@ -1 +1 @@
1
- {"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/baseSelectors.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AA+BxE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAsB,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAA+B,EAAE;;IAC9G,OAAO,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,IAAI,CAAC;AACzC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAAW,EAAE;;IAC7G,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,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nimport { DominantSpeakersInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoom } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallClientState,\n DeviceManagerState,\n RemoteParticipantState,\n LocalVideoStreamState,\n CallErrors,\n DiagnosticsCallFeatureState,\n SpotlightCallFeatureState,\n IncomingCallState\n} from '@internal/calling-stateful-client';\nimport { TeamsIncomingCallState } from '@internal/calling-stateful-client';\nimport { ReactionState } from '@internal/calling-stateful-client';\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsKind } from '@azure/communication-calling';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { _SupportedCaptionLanguage, _SupportedSpokenLanguage } from '@internal/react-components';\nimport { ConferencePhoneInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { CallNotifications } from '@internal/calling-stateful-client';\n\n/**\n * Common props used to reference calling declarative client state.\n *\n * @public\n */\nexport type CallingBaseSelectorProps = {\n callId: string;\n};\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallClientState): DeviceManagerState => state.deviceManager;\n\n/**\n * @private\n */\nexport const getRole = (state: CallClientState, props: CallingBaseSelectorProps): ParticipantRole | undefined => {\n return state.calls[props.callId]?.role;\n};\n\n/**\n * @private\n */\nexport const isHideAttendeeNamesEnabled = (state: CallClientState, props: CallingBaseSelectorProps): boolean => {\n return state.calls[props.callId]?.hideAttendeeNames ?? false;\n};\n\n/**\n * @private\n */\nexport const getCapabilities = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ParticipantCapabilities | undefined => state.calls[props.callId]?.capabilitiesFeature?.capabilities;\n\n/**\n * @private\n */\nexport const getCallExists = (state: CallClientState, props: CallingBaseSelectorProps): boolean =>\n !!state.calls[props.callId];\n\n/**\n * @private\n */\nexport const getDominantSpeakers = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): undefined | DominantSpeakersInfo => state.calls[props.callId]?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n return state.calls[props.callId]?.remoteParticipants;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): RaisedHandState | undefined => {\n return state.calls[props.callId]?.raiseHand?.localParticipantRaisedHand;\n};\n\n/**\n * @private\n */\nexport const getSpotlightCallFeature = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SpotlightCallFeatureState | undefined => {\n return state.calls[props.callId]?.spotlight;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantReactionState = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ReactionState | undefined => {\n return state.calls[props.callId]?.localParticipantReaction;\n};\n\n/**\n * @private\n */\nexport const getIsScreenSharingOn = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isScreenSharingOn;\n\n/**\n * @private\n */\nexport const getIsMuted = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isMuted;\n\n/**\n * @private\n */\nexport const getOptimalVideoCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined =>\n state.calls[props.callId]?.optimalVideoCount.maxRemoteVideoStreams;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): LocalVideoStreamState[] | undefined => state.calls[props.callId]?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getScreenShareRemoteParticipant = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): string | undefined => state.calls[props.callId]?.screenShareRemoteParticipant;\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallClientState): string | undefined => state.callAgent?.displayName;\n\n/**\n * @private\n */\nexport const getIdentifier = (state: CallClientState): string => toFlatCommunicationIdentifier(state.userId);\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallClientState): CallErrors => state.latestErrors;\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * @private\n */\nexport const getLatestNotifications = (state: CallClientState): CallNotifications => state.latestNotifications;\n\n/**\n * @private\n */\nexport const getDiagnostics = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): DiagnosticsCallFeatureState | undefined => state.calls[props.callId]?.diagnostics;\n\n/**\n * @private\n */\nexport const getCallState = (state: CallClientState, props: CallingBaseSelectorProps): string =>\n state.calls[props.callId]?.state;\n\n/**\n * @private\n */\nexport const getEnvironmentInfo = (\n state: CallClientState\n): undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo => {\n /* @conditional-compile-remove(unsupported-browser) */\n return state.environmentInfo;\n return undefined;\n};\n\n/** @private */\nexport const getParticipantCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined => {\n /* @conditional-compile-remove(total-participant-count) */\n return state.calls[props.callId]?.totalParticipantCount;\n return undefined;\n};\n\n/* @conditional-compile-remove(acs-close-captions) */\n/** @private */\nexport const getCaptionsKind = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsKind => {\n return state.calls[props.callId]?.captionsFeature.captionsKind;\n};\n\n/** @private */\nexport const getCaptions = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsInfo[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.captions;\n};\n\n/** @private */\nexport const getCaptionsStatus = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/** @private */\nexport const getStartCaptionsInProgress = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.startCaptionsInProgress;\n};\n\n/** @private */\nexport const getCurrentCaptionLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedCaptionLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentCaptionLanguage as _SupportedCaptionLanguage;\n};\n\n/** @private */\nexport const getCurrentSpokenLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedSpokenLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentSpokenLanguage as _SupportedSpokenLanguage;\n};\n\n/** @private */\nexport const getSupportedCaptionLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedCaptionLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedCaptionLanguages as _SupportedCaptionLanguage[];\n};\n\n/** @private */\nexport const getSupportedSpokenLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedSpokenLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedSpokenLanguages as _SupportedSpokenLanguage[];\n};\n\n/** @private */\nexport const getMeetingConferencePhones = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ConferencePhoneInfo[] | undefined => {\n return state.calls[props.callId]?.meetingConference?.conferencePhones;\n};\n\n/**\n * selector for retrieving the incoming calls from state\n * @returns the incoming calls in the call client state\n * @private\n */\nexport const getIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCalls);\n};\n\n/**\n * selector for retrieving the incoming calls that have been removed from state\n * @returns the incoming calls that have been removed\n * @private\n */\nexport const getRemovedIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCallsEnded);\n};\n\n/* @conditional-compile-remove(breakout-rooms) */\n/** @private */\nexport const getAssignedBreakoutRoom = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): BreakoutRoom | undefined => {\n return state.calls[props.callId]?.breakoutRooms?.assignedBreakout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;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAkD,EAAE;IACzG,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAsB,EAAkD,EAAE;IAChH,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,iDAAiD;AACjD,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,KAAsB,EACtB,KAA+B,EACL,EAAE;;IAC5B,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,aAAa,0CAAE,oBAAoB,CAAC;AACxE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { CallState, DominantSpeakersInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoom } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallClientState,\n DeviceManagerState,\n RemoteParticipantState,\n LocalVideoStreamState,\n CallErrors,\n DiagnosticsCallFeatureState,\n SpotlightCallFeatureState,\n IncomingCallState\n} from '@internal/calling-stateful-client';\nimport { TeamsIncomingCallState } from '@internal/calling-stateful-client';\nimport { ReactionState } from '@internal/calling-stateful-client';\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsKind } from '@azure/communication-calling';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { _SupportedCaptionLanguage, _SupportedSpokenLanguage } from '@internal/react-components';\nimport { ConferencePhoneInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { CallNotifications } from '@internal/calling-stateful-client';\n\n/**\n * Common props used to reference calling declarative client state.\n *\n * @public\n */\nexport type CallingBaseSelectorProps = {\n callId: string;\n};\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallClientState): DeviceManagerState => state.deviceManager;\n\n/**\n * @private\n */\nexport const getRole = (state: CallClientState, props: CallingBaseSelectorProps): ParticipantRole | undefined => {\n return state.calls[props.callId]?.role;\n};\n\n/**\n * @private\n */\nexport const isHideAttendeeNamesEnabled = (state: CallClientState, props: CallingBaseSelectorProps): boolean => {\n return state.calls[props.callId]?.hideAttendeeNames ?? false;\n};\n\n/**\n * @private\n */\nexport const getCapabilities = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ParticipantCapabilities | undefined => state.calls[props.callId]?.capabilitiesFeature?.capabilities;\n\n/**\n * @private\n */\nexport const getCallExists = (state: CallClientState, props: CallingBaseSelectorProps): boolean =>\n !!state.calls[props.callId];\n\n/**\n * @private\n */\nexport const getDominantSpeakers = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): undefined | DominantSpeakersInfo => state.calls[props.callId]?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n return state.calls[props.callId]?.remoteParticipants;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): RaisedHandState | undefined => {\n return state.calls[props.callId]?.raiseHand?.localParticipantRaisedHand;\n};\n\n/**\n * @private\n */\nexport const getSpotlightCallFeature = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SpotlightCallFeatureState | undefined => {\n return state.calls[props.callId]?.spotlight;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantReactionState = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ReactionState | undefined => {\n return state.calls[props.callId]?.localParticipantReaction;\n};\n\n/**\n * @private\n */\nexport const getIsScreenSharingOn = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isScreenSharingOn;\n\n/**\n * @private\n */\nexport const getIsMuted = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isMuted;\n\n/**\n * @private\n */\nexport const getOptimalVideoCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined =>\n state.calls[props.callId]?.optimalVideoCount.maxRemoteVideoStreams;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): LocalVideoStreamState[] | undefined => state.calls[props.callId]?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getScreenShareRemoteParticipant = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): string | undefined => state.calls[props.callId]?.screenShareRemoteParticipant;\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallClientState): string | undefined => state.callAgent?.displayName;\n\n/**\n * @private\n */\nexport const getIdentifier = (state: CallClientState): string => toFlatCommunicationIdentifier(state.userId);\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallClientState): CallErrors => state.latestErrors;\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * @private\n */\nexport const getLatestNotifications = (state: CallClientState): CallNotifications => state.latestNotifications;\n\n/**\n * @private\n */\nexport const getDiagnostics = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): DiagnosticsCallFeatureState | undefined => state.calls[props.callId]?.diagnostics;\n\n/**\n * @private\n */\nexport const getCallState = (state: CallClientState, props: CallingBaseSelectorProps): CallState | undefined =>\n state.calls[props.callId]?.state;\n\n/**\n * @private\n */\nexport const getEnvironmentInfo = (\n state: CallClientState\n): undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo => {\n /* @conditional-compile-remove(unsupported-browser) */\n return state.environmentInfo;\n return undefined;\n};\n\n/** @private */\nexport const getParticipantCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined => {\n /* @conditional-compile-remove(total-participant-count) */\n return state.calls[props.callId]?.totalParticipantCount;\n return undefined;\n};\n\n/* @conditional-compile-remove(acs-close-captions) */\n/** @private */\nexport const getCaptionsKind = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsKind | undefined => {\n return state.calls[props.callId]?.captionsFeature.captionsKind;\n};\n\n/** @private */\nexport const getCaptions = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsInfo[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.captions;\n};\n\n/** @private */\nexport const getCaptionsStatus = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/** @private */\nexport const getStartCaptionsInProgress = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.startCaptionsInProgress;\n};\n\n/** @private */\nexport const getCurrentCaptionLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedCaptionLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentCaptionLanguage as _SupportedCaptionLanguage;\n};\n\n/** @private */\nexport const getCurrentSpokenLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedSpokenLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentSpokenLanguage as _SupportedSpokenLanguage;\n};\n\n/** @private */\nexport const getSupportedCaptionLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedCaptionLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedCaptionLanguages as _SupportedCaptionLanguage[];\n};\n\n/** @private */\nexport const getSupportedSpokenLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): _SupportedSpokenLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedSpokenLanguages as _SupportedSpokenLanguage[];\n};\n\n/** @private */\nexport const getMeetingConferencePhones = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ConferencePhoneInfo[] | undefined => {\n return state.calls[props.callId]?.meetingConference?.conferencePhones;\n};\n\n/**\n * selector for retrieving the incoming calls from state\n * @returns the incoming calls in the call client state\n * @private\n */\nexport const getIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCalls);\n};\n\n/**\n * selector for retrieving the incoming calls that have been removed from state\n * @returns the incoming calls that have been removed\n * @private\n */\nexport const getRemovedIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCallsEnded);\n};\n\n/* @conditional-compile-remove(breakout-rooms) */\n/** @private */\nexport const getAssignedBreakoutRoom = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): BreakoutRoom | undefined => {\n return state.calls[props.callId]?.breakoutRooms?.assignedBreakoutRoom;\n};\n"]}
@@ -82,7 +82,7 @@ export const screenShareButtonSelector = reselect.createSelector([getIsScreenSha
82
82
  ((capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.reason) !== 'NotInitialized') ||
83
83
  role === 'Consumer' ||
84
84
  role === 'Attendee';
85
- disabled = disabled || ['InLobby', 'Connecting', 'LocalHold'].includes(callState);
85
+ disabled = disabled || ['InLobby', 'Connecting', 'LocalHold'].includes(callState !== null && callState !== void 0 ? callState : 'None');
86
86
  return {
87
87
  checked: isScreenSharingOn,
88
88
  disabled
@@ -1 +1 @@
1
- {"version":3,"file":"callControlSelectors.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/callControlSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAEL,aAAa,EACb,gBAAgB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AAC;IACtB,QAAQ,GAAG,QAAQ,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClF,OAAO;QACL,OAAO,EAAE,iBAAiB;QAC1B,QAAQ;KACT,CAAC;AACJ,CAAC,CACF,CAAC;AAmBF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA0B,QAAQ,CAAC,cAAc,CACjF,CAAC,gBAAgB,CAAC,EAClB,CAAC,aAAa,EAAE,EAAE;IAChB,OAAO;QACL,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,WAAW,CAAC;QAC9D,QAAQ,EAAE,sBAAsB,CAAC,aAAa,CAAC,QAAQ,CAAC;QACxD,OAAO,EAAE,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC;QACtD,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;QACpD,eAAe,EAAE,aAAa,CAAC,eAAe;QAC9C,cAAc,EAAE,aAAa,CAAC,cAAc;KAC7C,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,sBAAsB,CAA6B,OAAY;IACtE,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;AACxD,CAAC;AAaD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAuB,QAAQ,CAAC,cAAc,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE;IAC1G,OAAO;QACL,OAAO,EAAE,SAAS,KAAK,WAAW;KACnC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';\nimport { CallClientState } from '@internal/calling-stateful-client';\nimport * as reselect from 'reselect';\nimport {\n CallingBaseSelectorProps,\n getCallExists,\n getDeviceManager,\n getIsMuted,\n getIsScreenSharingOn,\n getLocalVideoStreams\n} from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\n\nimport { getCapabilities, getRole } from './baseSelectors';\nimport { getCallState } from './baseSelectors';\nimport { _isPreviewOn } from './utils/callUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/**\n * Selector type for {@link MicrophoneButton} component.\n *\n * @public\n */\nexport type MicrophoneButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n disabled: boolean;\n checked: boolean;\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n};\n\n/**\n * Selector for {@link MicrophoneButton} component.\n *\n * @public\n */\nexport const microphoneButtonSelector: MicrophoneButtonSelector = reselect.createSelector(\n [getCallExists, getIsMuted, getDeviceManager, getCapabilities, getRole, getCallState],\n (callExists, isMuted, deviceManager, capabilities, role, callState) => {\n const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;\n\n const incapable =\n (capabilities?.unmuteMic.isPresent === false && capabilities?.unmuteMic.reason !== 'NotInitialized') ||\n role === 'Consumer';\n return {\n disabled: !callExists || !permission || incapable || callState === 'LocalHold',\n checked: callExists ? !isMuted : false,\n microphones: deviceManager.microphones,\n speakers: deviceManager.speakers,\n selectedMicrophone: deviceManager.selectedMicrophone,\n selectedSpeaker: deviceManager.selectedSpeaker\n };\n }\n);\n\n/**\n * Selector type for {@link CameraButton} component.\n *\n * @public\n */\nexport type CameraButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n disabled: boolean;\n checked: boolean;\n cameras: VideoDeviceInfo[];\n selectedCamera?: VideoDeviceInfo;\n};\n\n/**\n * Selector for {@link CameraButton} component.\n *\n * @public\n */\nexport const cameraButtonSelector: CameraButtonSelector = reselect.createSelector(\n [getLocalVideoStreams, getDeviceManager, getCapabilities, getRole, getCallState],\n (localVideoStreams, deviceManager, capabilities, role, callState) => {\n const previewOn = _isPreviewOn(deviceManager);\n const localVideoFromCall = localVideoStreams?.find((stream) => stream.mediaStreamType === 'Video');\n const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;\n\n const incapable =\n (capabilities?.turnVideoOn.isPresent === false && capabilities?.turnVideoOn.reason !== 'NotInitialized') ||\n role === 'Consumer';\n return {\n disabled:\n !deviceManager.selectedCamera ||\n !permission ||\n !deviceManager.cameras.length ||\n incapable ||\n callState === 'LocalHold',\n checked: localVideoStreams !== undefined && localVideoStreams.length > 0 ? !!localVideoFromCall : previewOn,\n cameras: deviceManager.cameras,\n selectedCamera: deviceManager.selectedCamera\n };\n }\n);\n\n/**\n * Selector type for {@link ScreenShareButton} component.\n *\n * @public\n */\nexport type ScreenShareButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked?: boolean;\n disabled?: boolean;\n};\n\n/**\n * Selector type for {@link RaiseHandButton} component.\n *\n * @public\n */\nexport type RaiseHandButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked?: boolean;\n disabled?: boolean;\n};\n\n/**\n * Selector for {@link RaiseHandButton} component.\n *\n * @public\n */\nexport const raiseHandButtonSelector: RaiseHandButtonSelector = reselect.createSelector(\n [getLocalParticipantRaisedHand, getCallState],\n (raisedHand, callState) => {\n return {\n checked: raisedHand ? true : false,\n disabled: callState === 'InLobby' ? true : callState === 'Connecting' ?? false\n };\n }\n);\n\n/**\n * Selector type for {@link ReactionButton} component.\n *\n * @public\n */\nexport type ReactionButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked?: boolean;\n disabled?: boolean;\n};\n\n/**\n * Selector for {@link ReactionButton} component.\n *\n * @public\n */\nexport const reactionButtonSelector: ReactionButtonSelector = reselect.createSelector(\n [getLocalParticipantReactionState, getCallState],\n (reaction, callState) => {\n return {\n checked: reaction ? true : false,\n disabled: callState !== 'Connected'\n };\n }\n);\n\n/**\n * Selector for {@link ScreenShareButton} component.\n *\n * @public\n */\nexport const screenShareButtonSelector: ScreenShareButtonSelector = reselect.createSelector(\n [getIsScreenSharingOn, getCallState, getCapabilities, getRole],\n (isScreenSharingOn, callState, capabilities, role) => {\n let disabled: boolean | undefined = undefined;\n\n disabled =\n disabled ||\n (capabilities?.shareScreen.isPresent === false && capabilities?.shareScreen.reason !== 'NotInitialized') ||\n role === 'Consumer' ||\n role === 'Attendee';\n disabled = disabled || ['InLobby', 'Connecting', 'LocalHold'].includes(callState);\n return {\n checked: isScreenSharingOn,\n disabled\n };\n }\n);\n\n/**\n * Selector type for {@link DevicesButton} component.\n *\n * @public\n */\nexport type DevicesButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n cameras: VideoDeviceInfo[];\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n selectedCamera?: VideoDeviceInfo;\n};\n\n/**\n * Selector for {@link DevicesButton} component.\n *\n * @public\n */\nexport const devicesButtonSelector: DevicesButtonSelector = reselect.createSelector(\n [getDeviceManager],\n (deviceManager) => {\n return {\n microphones: removeBlankNameDevices(deviceManager.microphones),\n speakers: removeBlankNameDevices(deviceManager.speakers),\n cameras: removeBlankNameDevices(deviceManager.cameras),\n selectedMicrophone: deviceManager.selectedMicrophone,\n selectedSpeaker: deviceManager.selectedSpeaker,\n selectedCamera: deviceManager.selectedCamera\n };\n }\n);\n\nfunction removeBlankNameDevices<T extends { name: string }>(devices: T[]): T[] {\n return devices.filter((device) => device.name !== '');\n}\n\n/**\n * Selector type for the {@link HoldButton} component.\n * @public\n */\nexport type HoldButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked: boolean;\n};\n\n/**\n * Selector for the {@link HoldButton} component.\n * @public\n */\nexport const holdButtonSelector: HoldButtonSelector = reselect.createSelector([getCallState], (callState) => {\n return {\n checked: callState === 'LocalHold'\n };\n});\n"]}
1
+ {"version":3,"file":"callControlSelectors.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/callControlSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAEL,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAkBhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA6B,QAAQ,CAAC,cAAc,CACvF,CAAC,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,CAAC,EACrF,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACpE,MAAM,UAAU,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAExF,MAAM,SAAS,GACb,CAAC,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,SAAS,MAAK,KAAK,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,MAAM,MAAK,gBAAgB,CAAC;QACpG,IAAI,KAAK,UAAU,CAAC;IACtB,OAAO;QACL,QAAQ,EAAE,CAAC,UAAU,IAAI,CAAC,UAAU,IAAI,SAAS,IAAI,SAA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,KAAK,WAAW;KACnC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';\nimport { CallClientState } from '@internal/calling-stateful-client';\nimport * as reselect from 'reselect';\nimport {\n CallingBaseSelectorProps,\n getCallExists,\n getDeviceManager,\n getIsMuted,\n getIsScreenSharingOn,\n getLocalVideoStreams\n} from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\n\nimport { getCapabilities, getRole } from './baseSelectors';\nimport { getCallState } from './baseSelectors';\nimport { _isPreviewOn } from './utils/callUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/**\n * Selector type for {@link MicrophoneButton} component.\n *\n * @public\n */\nexport type MicrophoneButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n disabled: boolean;\n checked: boolean;\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n};\n\n/**\n * Selector for {@link MicrophoneButton} component.\n *\n * @public\n */\nexport const microphoneButtonSelector: MicrophoneButtonSelector = reselect.createSelector(\n [getCallExists, getIsMuted, getDeviceManager, getCapabilities, getRole, getCallState],\n (callExists, isMuted, deviceManager, capabilities, role, callState) => {\n const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;\n\n const incapable =\n (capabilities?.unmuteMic.isPresent === false && capabilities?.unmuteMic.reason !== 'NotInitialized') ||\n role === 'Consumer';\n return {\n disabled: !callExists || !permission || incapable || callState === 'LocalHold',\n checked: callExists ? !isMuted : false,\n microphones: deviceManager.microphones,\n speakers: deviceManager.speakers,\n selectedMicrophone: deviceManager.selectedMicrophone,\n selectedSpeaker: deviceManager.selectedSpeaker\n };\n }\n);\n\n/**\n * Selector type for {@link CameraButton} component.\n *\n * @public\n */\nexport type CameraButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n disabled: boolean;\n checked: boolean;\n cameras: VideoDeviceInfo[];\n selectedCamera?: VideoDeviceInfo;\n};\n\n/**\n * Selector for {@link CameraButton} component.\n *\n * @public\n */\nexport const cameraButtonSelector: CameraButtonSelector = reselect.createSelector(\n [getLocalVideoStreams, getDeviceManager, getCapabilities, getRole, getCallState],\n (localVideoStreams, deviceManager, capabilities, role, callState) => {\n const previewOn = _isPreviewOn(deviceManager);\n const localVideoFromCall = localVideoStreams?.find((stream) => stream.mediaStreamType === 'Video');\n const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;\n\n const incapable =\n (capabilities?.turnVideoOn.isPresent === false && capabilities?.turnVideoOn.reason !== 'NotInitialized') ||\n role === 'Consumer';\n return {\n disabled:\n !deviceManager.selectedCamera ||\n !permission ||\n !deviceManager.cameras.length ||\n incapable ||\n callState === 'LocalHold',\n checked: localVideoStreams !== undefined && localVideoStreams.length > 0 ? !!localVideoFromCall : previewOn,\n cameras: deviceManager.cameras,\n selectedCamera: deviceManager.selectedCamera\n };\n }\n);\n\n/**\n * Selector type for {@link ScreenShareButton} component.\n *\n * @public\n */\nexport type ScreenShareButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked?: boolean;\n disabled?: boolean;\n};\n\n/**\n * Selector type for {@link RaiseHandButton} component.\n *\n * @public\n */\nexport type RaiseHandButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked?: boolean;\n disabled?: boolean;\n};\n\n/**\n * Selector for {@link RaiseHandButton} component.\n *\n * @public\n */\nexport const raiseHandButtonSelector: RaiseHandButtonSelector = reselect.createSelector(\n [getLocalParticipantRaisedHand, getCallState],\n (raisedHand, callState) => {\n return {\n checked: raisedHand ? true : false,\n disabled: callState === 'InLobby' ? true : callState === 'Connecting' ?? false\n };\n }\n);\n\n/**\n * Selector type for {@link ReactionButton} component.\n *\n * @public\n */\nexport type ReactionButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked?: boolean;\n disabled?: boolean;\n};\n\n/**\n * Selector for {@link ReactionButton} component.\n *\n * @public\n */\nexport const reactionButtonSelector: ReactionButtonSelector = reselect.createSelector(\n [getLocalParticipantReactionState, getCallState],\n (reaction, callState) => {\n return {\n checked: reaction ? true : false,\n disabled: callState !== 'Connected'\n };\n }\n);\n\n/**\n * Selector for {@link ScreenShareButton} component.\n *\n * @public\n */\nexport const screenShareButtonSelector: ScreenShareButtonSelector = reselect.createSelector(\n [getIsScreenSharingOn, getCallState, getCapabilities, getRole],\n (isScreenSharingOn, callState, capabilities, role) => {\n let disabled: boolean | undefined = undefined;\n\n disabled =\n disabled ||\n (capabilities?.shareScreen.isPresent === false && capabilities?.shareScreen.reason !== 'NotInitialized') ||\n role === 'Consumer' ||\n role === 'Attendee';\n disabled = disabled || ['InLobby', 'Connecting', 'LocalHold'].includes(callState ?? 'None');\n return {\n checked: isScreenSharingOn,\n disabled\n };\n }\n);\n\n/**\n * Selector type for {@link DevicesButton} component.\n *\n * @public\n */\nexport type DevicesButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n cameras: VideoDeviceInfo[];\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n selectedCamera?: VideoDeviceInfo;\n};\n\n/**\n * Selector for {@link DevicesButton} component.\n *\n * @public\n */\nexport const devicesButtonSelector: DevicesButtonSelector = reselect.createSelector(\n [getDeviceManager],\n (deviceManager) => {\n return {\n microphones: removeBlankNameDevices(deviceManager.microphones),\n speakers: removeBlankNameDevices(deviceManager.speakers),\n cameras: removeBlankNameDevices(deviceManager.cameras),\n selectedMicrophone: deviceManager.selectedMicrophone,\n selectedSpeaker: deviceManager.selectedSpeaker,\n selectedCamera: deviceManager.selectedCamera\n };\n }\n);\n\nfunction removeBlankNameDevices<T extends { name: string }>(devices: T[]): T[] {\n return devices.filter((device) => device.name !== '');\n}\n\n/**\n * Selector type for the {@link HoldButton} component.\n * @public\n */\nexport type HoldButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked: boolean;\n};\n\n/**\n * Selector for the {@link HoldButton} component.\n * @public\n */\nexport const holdButtonSelector: HoldButtonSelector = reselect.createSelector([getCallState], (callState) => {\n return {\n checked: callState === 'LocalHold'\n };\n});\n"]}
@@ -9,7 +9,8 @@ export const getRemoteParticipantsExcludingConsumers = createSelector([getRemote
9
9
  {
10
10
  const newRemoteParticipants = Object.assign({}, remoteParticipants);
11
11
  Object.keys(newRemoteParticipants).forEach((k) => {
12
- if (newRemoteParticipants[k].role === 'Consumer') {
12
+ var _a;
13
+ if (((_a = newRemoteParticipants[k]) === null || _a === void 0 ? void 0 : _a.role) === 'Consumer') {
13
14
  delete newRemoteParticipants[k];
14
15
  }
15
16
  });
@@ -1 +1 @@
1
- {"version":3,"file":"getRemoteParticipantsExcludingConsumers.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGxD;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,cAAc,CACnE,CAAC,qBAAqB,CAAC,EACvB,CACE,kBAAkB,EAKN,EAAE;IACd,CAAC;QACC,MAAM,qBAAqB,qBAAQ,kBAAkB,CAAE,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC/C,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBACjD,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,qBAAqB,CAAC;IAC/B,CAAC;AACH,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createSelector } from 'reselect';\nimport { getRemoteParticipants } from './baseSelectors';\nimport { RemoteParticipantState } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport const getRemoteParticipantsExcludingConsumers = createSelector(\n [getRemoteParticipants],\n (\n remoteParticipants\n ):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n {\n const newRemoteParticipants = { ...remoteParticipants };\n Object.keys(newRemoteParticipants).forEach((k) => {\n if (newRemoteParticipants[k].role === 'Consumer') {\n delete newRemoteParticipants[k];\n }\n });\n return newRemoteParticipants;\n }\n }\n);\n"]}
1
+ {"version":3,"file":"getRemoteParticipantsExcludingConsumers.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGxD;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,cAAc,CACnE,CAAC,qBAAqB,CAAC,EACvB,CACE,kBAAkB,EAKN,EAAE;IACd,CAAC;QACC,MAAM,qBAAqB,qBAAQ,kBAAkB,CAAE,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;;YAC/C,IAAI,CAAA,MAAA,qBAAqB,CAAC,CAAC,CAAC,0CAAE,IAAI,MAAK,UAAU,EAAE,CAAC;gBAClD,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,qBAAqB,CAAC;IAC/B,CAAC;AACH,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createSelector } from 'reselect';\nimport { getRemoteParticipants } from './baseSelectors';\nimport { RemoteParticipantState } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport const getRemoteParticipantsExcludingConsumers = createSelector(\n [getRemoteParticipants],\n (\n remoteParticipants\n ):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n {\n const newRemoteParticipants = { ...remoteParticipants };\n Object.keys(newRemoteParticipants).forEach((k) => {\n if (newRemoteParticipants[k]?.role === 'Consumer') {\n delete newRemoteParticipants[k];\n }\n });\n return newRemoteParticipants;\n }\n }\n);\n"]}
@@ -34,9 +34,10 @@ export const _isInLobbyOrConnecting = (callStatus) => !!callStatus && ['Connecti
34
34
  * @internal
35
35
  */
36
36
  export const _isPreviewOn = (deviceManager) => {
37
+ var _a;
37
38
  // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also
38
39
  // handle cases where 'Preview' view is in progress and not necessary completed.
39
- return deviceManager.unparentedViews.length > 0 && deviceManager.unparentedViews[0].view !== undefined;
40
+ return ((_a = deviceManager.unparentedViews[0]) === null || _a === void 0 ? void 0 : _a.view) !== undefined;
40
41
  };
41
42
  /**
42
43
  * Dispose of all preview views
@@ -1 +1 @@
1
- {"version":3,"file":"callUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/callUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAA2B,gBAAgB,EAAmB,MAAM,8BAA8B,CAAC;AAC1G,sDAAsD;AACtD,OAAO,EAAE,QAAQ,EAAmB,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAGL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EAIxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAkBtF;;;;GAIG;AACH,MAAM,CAAC,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BAAgB,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DeviceManagerState, RemoteParticipantState, StatefulCallClient } from '@internal/calling-stateful-client';\nimport { CallState as CallStatus, LocalVideoStream, ParticipantRole } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features, EnvironmentInfo } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier,\n MicrosoftTeamsUserIdentifier,\n PhoneNumberIdentifier,\n UnknownIdentifier\n} from '@azure/communication-common';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n\n/**\n * Type for connmection state\n *\n * @internal\n */\nexport type ParticipantConnectionState =\n | 'Idle'\n | 'Connecting'\n | 'Ringing'\n | 'Connected'\n | 'Hold'\n | 'InLobby'\n | 'EarlyMedia'\n | 'Disconnected'\n | 'Reconnecting';\n\n/**\n * Check if the call state represents being in the call\n *\n * @internal\n */\nexport const _isInCall = (callStatus?: CallStatus): boolean =>\n !!callStatus &&\n !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia', 'Disconnecting'].includes(callStatus);\n\n/**\n * Check if the call state represents being in the lobby or waiting to be admitted.\n *\n * @internal\n */\nexport const _isInLobbyOrConnecting = (callStatus: CallStatus | undefined): boolean =>\n !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);\n\n/**\n * Check if the device manager local video is on when not part of a call\n * i.e. do unparented views exist.\n *\n * @internal\n */\nexport const _isPreviewOn = (deviceManager: DeviceManagerState): boolean => {\n // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also\n // handle cases where 'Preview' view is in progress and not necessary completed.\n return deviceManager.unparentedViews.length > 0 && deviceManager.unparentedViews[0].view !== undefined;\n};\n\n/**\n * Dispose of all preview views\n * We assume all unparented views are local preview views.\n *\n * @private\n */\nexport const disposeAllLocalPreviewViews = async (callClient: StatefulCallClient): Promise<void> => {\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n for (const view of unparentedViews) {\n await callClient.disposeView(undefined, undefined, view);\n }\n};\n\n/**\n * Update the users displayNames based on the type of user they are\n *\n * @internal\n */\nexport const _updateUserDisplayNames = (participants: RemoteParticipantState[]): RemoteParticipantState[] => {\n if (participants) {\n return memoizedUpdateDisplayName((memoizedFn) => {\n return Object.values(participants).map((p) => {\n const pid = toFlatCommunicationIdentifier(p.identifier);\n return memoizedFn(pid, p);\n });\n });\n } else {\n return [];\n }\n};\n\nconst memoizedUpdateDisplayName = memoizeFnAll((participantId: string, participant: RemoteParticipantState) => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n ...participant,\n displayName: participant.identifier.phoneNumber\n };\n } else {\n return participant;\n }\n});\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * Check whether the call is in a supported browser\n *\n * @internal\n */\nexport const _getEnvironmentInfo = async (callClient: StatefulCallClient): Promise<EnvironmentInfo> => {\n const environmentInfo = await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return environmentInfo;\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for Teams call\n */\nexport const isTeamsCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isCommunicationUserIdentifier(p));\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for ACS call\n */\nexport const isACSCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | CommunicationUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isMicrosoftTeamsUserIdentifier(p));\n};\n\n/**\n * @private\n * Checks whether the user is a 'Ringing' PSTN user.\n */\nexport const _convertParticipantState = (participant: RemoteParticipantState): ParticipantConnectionState => {\n /* @conditional-compile-remove(remote-ufd) */\n if (\n participant.diagnostics &&\n participant.diagnostics['ServerConnection'] &&\n participant.diagnostics['ServerConnection']?.value === false\n ) {\n return 'Reconnecting';\n }\n return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting'\n ? 'Ringing'\n : participant.state;\n};\n\n/**\n * @private\n * Changes the display name of the participant based on the local and remote user's role.\n */\nexport const maskDisplayNameWithRole = (\n displayName: string | undefined,\n localUserRole?: ParticipantRole,\n participantRole?: ParticipantRole,\n isHideAttendeeNamesEnabled?: boolean\n): string | undefined => {\n let maskedDisplayName = displayName;\n if (isHideAttendeeNamesEnabled && participantRole && participantRole === 'Attendee') {\n if (localUserRole && localUserRole === 'Attendee') {\n maskedDisplayName = '{AttendeeRole}';\n }\n if (\n localUserRole &&\n (localUserRole === 'Presenter' || localUserRole === 'Co-organizer' || localUserRole === 'Organizer')\n ) {\n maskedDisplayName = `{AttendeeRole}(${displayName})`;\n }\n }\n return maskedDisplayName;\n};\n\n/**\n * Helper to create a local video stream from the selected camera.\n * @private\n */\nexport const createLocalVideoStream = async (callClient: StatefulCallClient): Promise<LocalVideoStream | undefined> => {\n const camera = await callClient?.getState().deviceManager.selectedCamera;\n if (camera) {\n return new LocalVideoStream(camera);\n }\n return undefined;\n};\n"]}
1
+ {"version":3,"file":"callUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/callUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAA2B,gBAAgB,EAAmB,MAAM,8BAA8B,CAAC;AAC1G,sDAAsD;AACtD,OAAO,EAAE,QAAQ,EAAmB,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAGL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EAIxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EA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,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DeviceManagerState, RemoteParticipantState, StatefulCallClient } from '@internal/calling-stateful-client';\nimport { CallState as CallStatus, LocalVideoStream, ParticipantRole } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features, EnvironmentInfo } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier,\n MicrosoftTeamsUserIdentifier,\n PhoneNumberIdentifier,\n UnknownIdentifier\n} from '@azure/communication-common';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n\n/**\n * Type for connmection state\n *\n * @internal\n */\nexport type ParticipantConnectionState =\n | 'Idle'\n | 'Connecting'\n | 'Ringing'\n | 'Connected'\n | 'Hold'\n | 'InLobby'\n | 'EarlyMedia'\n | 'Disconnected'\n | 'Reconnecting';\n\n/**\n * Check if the call state represents being in the call\n *\n * @internal\n */\nexport const _isInCall = (callStatus?: CallStatus): boolean =>\n !!callStatus &&\n !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia', 'Disconnecting'].includes(callStatus);\n\n/**\n * Check if the call state represents being in the lobby or waiting to be admitted.\n *\n * @internal\n */\nexport const _isInLobbyOrConnecting = (callStatus: CallStatus | undefined): boolean =>\n !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);\n\n/**\n * Check if the device manager local video is on when not part of a call\n * i.e. do unparented views exist.\n *\n * @internal\n */\nexport const _isPreviewOn = (deviceManager: DeviceManagerState): boolean => {\n // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also\n // handle cases where 'Preview' view is in progress and not necessary completed.\n return deviceManager.unparentedViews[0]?.view !== undefined;\n};\n\n/**\n * Dispose of all preview views\n * We assume all unparented views are local preview views.\n *\n * @private\n */\nexport const disposeAllLocalPreviewViews = async (callClient: StatefulCallClient): Promise<void> => {\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n for (const view of unparentedViews) {\n await callClient.disposeView(undefined, undefined, view);\n }\n};\n\n/**\n * Update the users displayNames based on the type of user they are\n *\n * @internal\n */\nexport const _updateUserDisplayNames = (participants: RemoteParticipantState[]): RemoteParticipantState[] => {\n if (participants) {\n return memoizedUpdateDisplayName((memoizedFn) => {\n return Object.values(participants).map((p) => {\n const pid = toFlatCommunicationIdentifier(p.identifier);\n return memoizedFn(pid, p);\n });\n });\n } else {\n return [];\n }\n};\n\nconst memoizedUpdateDisplayName = memoizeFnAll((participantId: string, participant: RemoteParticipantState) => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n ...participant,\n displayName: participant.identifier.phoneNumber\n };\n } else {\n return participant;\n }\n});\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * Check whether the call is in a supported browser\n *\n * @internal\n */\nexport const _getEnvironmentInfo = async (callClient: StatefulCallClient): Promise<EnvironmentInfo> => {\n const environmentInfo = await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return environmentInfo;\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for Teams call\n */\nexport const isTeamsCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isCommunicationUserIdentifier(p));\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for ACS call\n */\nexport const isACSCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | CommunicationUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isMicrosoftTeamsUserIdentifier(p));\n};\n\n/**\n * @private\n * Checks whether the user is a 'Ringing' PSTN user.\n */\nexport const _convertParticipantState = (participant: RemoteParticipantState): ParticipantConnectionState => {\n /* @conditional-compile-remove(remote-ufd) */\n if (\n participant.diagnostics &&\n participant.diagnostics['ServerConnection'] &&\n participant.diagnostics['ServerConnection']?.value === false\n ) {\n return 'Reconnecting';\n }\n return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting'\n ? 'Ringing'\n : participant.state;\n};\n\n/**\n * @private\n * Changes the display name of the participant based on the local and remote user's role.\n */\nexport const maskDisplayNameWithRole = (\n displayName: string | undefined,\n localUserRole?: ParticipantRole,\n participantRole?: ParticipantRole,\n isHideAttendeeNamesEnabled?: boolean\n): string | undefined => {\n let maskedDisplayName = displayName;\n if (isHideAttendeeNamesEnabled && participantRole && participantRole === 'Attendee') {\n if (localUserRole && localUserRole === 'Attendee') {\n maskedDisplayName = '{AttendeeRole}';\n }\n if (\n localUserRole &&\n (localUserRole === 'Presenter' || localUserRole === 'Co-organizer' || localUserRole === 'Organizer')\n ) {\n maskedDisplayName = `{AttendeeRole}(${displayName})`;\n }\n }\n return maskedDisplayName;\n};\n\n/**\n * Helper to create a local video stream from the selected camera.\n * @private\n */\nexport const createLocalVideoStream = async (callClient: StatefulCallClient): Promise<LocalVideoStream | undefined> => {\n const camera = await callClient?.getState().deviceManager.selectedCamera;\n if (camera) {\n return new LocalVideoStream(camera);\n }\n return undefined;\n};\n"]}
@@ -80,7 +80,7 @@ export class BreakoutRoomsSubscriber {
80
80
  this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);
81
81
  };
82
82
  this.onBreakoutRoomsJoined = (call) => {
83
- var _a, _b;
83
+ var _a, _b, _c;
84
84
  this._context.setBreakoutRoomOriginCallId(this._callIdRef.callId, call.id);
85
85
  this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');
86
86
  this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');
@@ -91,7 +91,7 @@ export class BreakoutRoomsSubscriber {
91
91
  timestamp: new Date(Date.now())
92
92
  });
93
93
  // If assigned breakout room has a display name, set the display name for its call state.
94
- const assignedBreakoutRoomDisplayName = (_b = (_a = this._context.getState().calls[this._callIdRef.callId].breakoutRooms) === null || _a === void 0 ? void 0 : _a.assignedBreakoutRoom) === null || _b === void 0 ? void 0 : _b.displayName;
94
+ const assignedBreakoutRoomDisplayName = (_c = (_b = (_a = this._context.getState().calls[this._callIdRef.callId]) === null || _a === void 0 ? void 0 : _a.breakoutRooms) === null || _b === void 0 ? void 0 : _b.assignedBreakoutRoom) === null || _c === void 0 ? void 0 : _c.displayName;
95
95
  if (assignedBreakoutRoomDisplayName) {
96
96
  this._context.setBreakoutRoomDisplayName(call.id, assignedBreakoutRoomDisplayName);
97
97
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BreakoutRoomsSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/BreakoutRoomsSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC,iDAAiD;AACjD,MAAM,wDAAwD,GAAG,KAAK,CAAC;AAEvE,iDAAiD;AACjD;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAMlC,YAAY,SAAoB,EAAE,OAAoB,EAAE,oBAA8C;QAQ/F,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACpF,yDAAyD;YACzD,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;YACrF,+DAA+D;YAC/D,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;YAC1F,YAAY,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QACvD,CAAC,CAAC;QAMM,2BAAsB,GAAG,CAAC,SAA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AAoB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,CAAC;gBAC7E,MAAM,iBAAiB,GAAG,eAAe,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;gBAC1D,MAAM,wCAAwC,GAAG,IAAI,CAAC,GAAG,CACvD,iBAAiB,GAAG,wDAAwD,EAC5E,CAAC,CACF,CAAC;gBACF,IAAI,CAAC,IAAI,CAAC,iCAAiC,EAAE,CAAC;oBAC5C,IAAI,CAAC,iCAAiC,GAAG,UAAU,CACjD,GAAG,EAAE,CACH,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;wBAC1D,MAAM,EAAE,yBAAyB;wBACjC,SAAS,EAAE,GAAG;qBACf,CAAC,EACJ,wCAAwC,CACzC,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;QACtF,CAAC,CAAC;QApIA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;QAElD,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAWO,SAAS;QACf,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACrF,CAAC;CAmHF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(breakout-rooms) */\nimport {\n BreakoutRoom,\n BreakoutRoomsCallFeature,\n BreakoutRoomsEventData,\n BreakoutRoomsSettings,\n Call,\n TeamsCall\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { CallIdRef } from './CallIdRef';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { NotificationTarget } from './CallClientState';\n\n/* @conditional-compile-remove(breakout-rooms) */\nconst MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION = 30000;\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * @private\n */\nexport class BreakoutRoomsSubscriber {\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _breakoutRoomsFeature: BreakoutRoomsCallFeature;\n private _breakoutRoomClosingSoonTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n constructor(callIdRef: CallIdRef, context: CallContext, breakoutRoomsFeature: BreakoutRoomsCallFeature) {\n this._callIdRef = callIdRef;\n this._context = context;\n this._breakoutRoomsFeature = breakoutRoomsFeature;\n\n this.subscribe();\n }\n\n public unsubscribe = (): void => {\n this._breakoutRoomsFeature.off('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n // Clear breakout room joined notification for this call.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomJoined');\n // Clear breakout room closing soon notification for this call.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n };\n\n private subscribe(): void {\n this._breakoutRoomsFeature.on('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n }\n\n private onBreakoutRoomsUpdated = (eventData: BreakoutRoomsEventData): void => {\n if (eventData.type === 'assignedBreakoutRooms') {\n this.onAssignedBreakoutRoomUpdated(eventData.data);\n } else if (eventData.type === 'join') {\n this.onBreakoutRoomsJoined(eventData.data);\n } else if (eventData.type === 'breakoutRoomsSettings' && eventData.data) {\n this.onBreakoutRoomSettingsUpdated(eventData.data);\n }\n };\n\n private onAssignedBreakoutRoomUpdated = (breakoutRoom?: BreakoutRoom): void => {\n const callState = this._context.getState().calls[this._callIdRef.callId];\n const currentAssignedBreakoutRoom = callState?.breakoutRooms?.assignedBreakoutRoom;\n\n // This call won't exist in the calls array in state if this call is a breakout room that was re-assigned.\n // If so, do nothing.\n if (callState === undefined) {\n return;\n }\n\n if (!breakoutRoom) {\n // This scenario covers the case where the user is unassigned from a breakout room.\n if (currentAssignedBreakoutRoom?.call?.id) {\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n return;\n }\n\n if (\n breakoutRoom.state === 'open' &&\n currentAssignedBreakoutRoom?.state === 'open' &&\n currentAssignedBreakoutRoom?.call?.id !== breakoutRoom.call?.id\n ) {\n if (\n !this._context.getState().latestNotifications['assignedBreakoutRoomOpened'] &&\n !this._context.getState().latestNotifications['assignedBreakoutRoomOpenedPromptJoin']\n ) {\n this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'assignedBreakoutRoomChanged',\n timestamp: new Date(Date.now())\n });\n }\n } else if (breakoutRoom.state === 'open') {\n if (!this._context.getState().latestNotifications['assignedBreakoutRoomChanged']) {\n const target: NotificationTarget =\n breakoutRoom.autoMoveParticipantToBreakoutRoom === false\n ? 'assignedBreakoutRoomOpenedPromptJoin'\n : 'assignedBreakoutRoomOpened';\n this._context.setLatestNotification(this._callIdRef.callId, { target, timestamp: new Date(Date.now()) });\n }\n } else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.state === 'closed') {\n // This scenario covers the case where the breakout room is opened but then closed before the user joins.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');\n } else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.call?.id) {\n // This scenario covers the case where the breakout room is changed to a closed breakout room.\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n };\n\n private onBreakoutRoomsJoined = (call: Call | TeamsCall): void => {\n this._context.setBreakoutRoomOriginCallId(this._callIdRef.callId, call.id);\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');\n\n // Send latest notification for breakoutRoomJoined on behalf of the call that was joined.\n this._context.setLatestNotification(call.id, {\n target: 'breakoutRoomJoined',\n timestamp: new Date(Date.now())\n });\n\n // If assigned breakout room has a display name, set the display name for its call state.\n const assignedBreakoutRoomDisplayName =\n this._context.getState().calls[this._callIdRef.callId].breakoutRooms?.assignedBreakoutRoom?.displayName;\n if (assignedBreakoutRoomDisplayName) {\n this._context.setBreakoutRoomDisplayName(call.id, assignedBreakoutRoomDisplayName);\n }\n };\n\n private onBreakoutRoomSettingsUpdated = (breakoutRoomSettings: BreakoutRoomsSettings): void => {\n // If the roomEndTime is available, set a timeout to show a notification before the room closes.\n if (\n typeof breakoutRoomSettings.roomEndTime === 'string' &&\n !Number.isNaN(Date.parse(breakoutRoomSettings.roomEndTime))\n ) {\n const now = new Date(Date.now());\n const roomClosingTime = new Date(breakoutRoomSettings.roomEndTime).getTime();\n const timeBeforeClosing = roomClosingTime - now.getTime();\n const timeBeforeSendingClosingSoonNotification = Math.max(\n timeBeforeClosing - MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION,\n 0\n );\n if (!this._breakoutRoomClosingSoonTimeoutId) {\n this._breakoutRoomClosingSoonTimeoutId = setTimeout(\n () =>\n this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'breakoutRoomClosingSoon',\n timestamp: now\n }),\n timeBeforeSendingClosingSoonNotification\n );\n }\n }\n this._context.setBreakoutRoomSettings(this._callIdRef.callId, breakoutRoomSettings);\n };\n}\n"]}
1
+ {"version":3,"file":"BreakoutRoomsSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/BreakoutRoomsSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC,iDAAiD;AACjD,MAAM,wDAAwD,GAAG,KAAK,CAAC;AAEvE,iDAAiD;AACjD;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAMlC,YAAY,SAAoB,EAAE,OAAoB,EAAE,oBAA8C;QAQ/F,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACpF,yDAAyD;YACzD,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;YACrF,+DAA+D;YAC/D,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;YAC1F,YAAY,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QACvD,CAAC,CAAC;QAMM,2BAAsB,GAAG,CAAC,SAAiC,EAAQ,EAAE;YAC3E,IAAI,SAAS,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;gBAC/C,IAAI,CAAC,6BAA6B,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;iBAAM,IAAI,SAAS,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBACrC,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC7C,CAAC;iBAAM,IAAI,SA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AAiC,GAAG,UAAU,CACjD,GAAG,EAAE,CACH,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;wBAC1D,MAAM,EAAE,yBAAyB;wBACjC,SAAS,EAAE,GAAG;qBACf,CAAC,EACJ,wCAAwC,CACzC,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;QACtF,CAAC,CAAC;QApIA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;QAElD,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAWO,SAAS;QACf,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACrF,CAAC;CAmHF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(breakout-rooms) */\nimport {\n BreakoutRoom,\n BreakoutRoomsCallFeature,\n BreakoutRoomsEventData,\n BreakoutRoomsSettings,\n Call,\n TeamsCall\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { CallIdRef } from './CallIdRef';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { NotificationTarget } from './CallClientState';\n\n/* @conditional-compile-remove(breakout-rooms) */\nconst MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION = 30000;\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * @private\n */\nexport class BreakoutRoomsSubscriber {\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _breakoutRoomsFeature: BreakoutRoomsCallFeature;\n private _breakoutRoomClosingSoonTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n constructor(callIdRef: CallIdRef, context: CallContext, breakoutRoomsFeature: BreakoutRoomsCallFeature) {\n this._callIdRef = callIdRef;\n this._context = context;\n this._breakoutRoomsFeature = breakoutRoomsFeature;\n\n this.subscribe();\n }\n\n public unsubscribe = (): void => {\n this._breakoutRoomsFeature.off('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n // Clear breakout room joined notification for this call.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomJoined');\n // Clear breakout room closing soon notification for this call.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n };\n\n private subscribe(): void {\n this._breakoutRoomsFeature.on('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n }\n\n private onBreakoutRoomsUpdated = (eventData: BreakoutRoomsEventData): void => {\n if (eventData.type === 'assignedBreakoutRooms') {\n this.onAssignedBreakoutRoomUpdated(eventData.data);\n } else if (eventData.type === 'join') {\n this.onBreakoutRoomsJoined(eventData.data);\n } else if (eventData.type === 'breakoutRoomsSettings' && eventData.data) {\n this.onBreakoutRoomSettingsUpdated(eventData.data);\n }\n };\n\n private onAssignedBreakoutRoomUpdated = (breakoutRoom?: BreakoutRoom): void => {\n const callState = this._context.getState().calls[this._callIdRef.callId];\n const currentAssignedBreakoutRoom = callState?.breakoutRooms?.assignedBreakoutRoom;\n\n // This call won't exist in the calls array in state if this call is a breakout room that was re-assigned.\n // If so, do nothing.\n if (callState === undefined) {\n return;\n }\n\n if (!breakoutRoom) {\n // This scenario covers the case where the user is unassigned from a breakout room.\n if (currentAssignedBreakoutRoom?.call?.id) {\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n return;\n }\n\n if (\n breakoutRoom.state === 'open' &&\n currentAssignedBreakoutRoom?.state === 'open' &&\n currentAssignedBreakoutRoom?.call?.id !== breakoutRoom.call?.id\n ) {\n if (\n !this._context.getState().latestNotifications['assignedBreakoutRoomOpened'] &&\n !this._context.getState().latestNotifications['assignedBreakoutRoomOpenedPromptJoin']\n ) {\n this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'assignedBreakoutRoomChanged',\n timestamp: new Date(Date.now())\n });\n }\n } else if (breakoutRoom.state === 'open') {\n if (!this._context.getState().latestNotifications['assignedBreakoutRoomChanged']) {\n const target: NotificationTarget =\n breakoutRoom.autoMoveParticipantToBreakoutRoom === false\n ? 'assignedBreakoutRoomOpenedPromptJoin'\n : 'assignedBreakoutRoomOpened';\n this._context.setLatestNotification(this._callIdRef.callId, { target, timestamp: new Date(Date.now()) });\n }\n } else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.state === 'closed') {\n // This scenario covers the case where the breakout room is opened but then closed before the user joins.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');\n } else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.call?.id) {\n // This scenario covers the case where the breakout room is changed to a closed breakout room.\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n };\n\n private onBreakoutRoomsJoined = (call: Call | TeamsCall): void => {\n this._context.setBreakoutRoomOriginCallId(this._callIdRef.callId, call.id);\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');\n\n // Send latest notification for breakoutRoomJoined on behalf of the call that was joined.\n this._context.setLatestNotification(call.id, {\n target: 'breakoutRoomJoined',\n timestamp: new Date(Date.now())\n });\n\n // If assigned breakout room has a display name, set the display name for its call state.\n const assignedBreakoutRoomDisplayName =\n this._context.getState().calls[this._callIdRef.callId]?.breakoutRooms?.assignedBreakoutRoom?.displayName;\n if (assignedBreakoutRoomDisplayName) {\n this._context.setBreakoutRoomDisplayName(call.id, assignedBreakoutRoomDisplayName);\n }\n };\n\n private onBreakoutRoomSettingsUpdated = (breakoutRoomSettings: BreakoutRoomsSettings): void => {\n // If the roomEndTime is available, set a timeout to show a notification before the room closes.\n if (\n typeof breakoutRoomSettings.roomEndTime === 'string' &&\n !Number.isNaN(Date.parse(breakoutRoomSettings.roomEndTime))\n ) {\n const now = new Date(Date.now());\n const roomClosingTime = new Date(breakoutRoomSettings.roomEndTime).getTime();\n const timeBeforeClosing = roomClosingTime - now.getTime();\n const timeBeforeSendingClosingSoonNotification = Math.max(\n timeBeforeClosing - MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION,\n 0\n );\n if (!this._breakoutRoomClosingSoonTimeoutId) {\n this._breakoutRoomClosingSoonTimeoutId = setTimeout(\n () =>\n this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'breakoutRoomClosingSoon',\n timestamp: now\n }),\n timeBeforeSendingClosingSoonNotification\n );\n }\n }\n this._context.setBreakoutRoomSettings(this._callIdRef.callId, breakoutRoomSettings);\n };\n}\n"]}