@azure/communication-react 1.14.0-alpha-202402290012 → 1.14.0-alpha-202403020011

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 (94) hide show
  1. package/dist/communication-react.d.ts +8 -2
  2. package/dist/dist-cjs/communication-react/index.js +194 -150
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/common.d.ts +5 -0
  5. package/dist/dist-esm/acs-ui-common/src/common.js +7 -0
  6. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/index.d.ts +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +25 -6
  14. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  17. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +6 -0
  18. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  19. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +4 -4
  21. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +1 -1
  23. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/ImageOverlay.d.ts +1 -1
  25. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.d.ts +2 -1
  28. package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js +11 -3
  29. package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/RTE/RTERibbonButtons.js +1 -1
  31. package/dist/dist-esm/react-components/src/components/RTE/RTERibbonButtons.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js +4 -9
  33. package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js.map +1 -1
  34. package/dist/dist-esm/react-components/src/components/RTE/RTESendBoxErrors.js +6 -0
  35. package/dist/dist-esm/react-components/src/components/RTE/RTESendBoxErrors.js.map +1 -1
  36. package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.d.ts +1 -1
  37. package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js +12 -18
  38. package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +4 -4
  40. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +5 -1
  43. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +49 -84
  44. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/utils.d.ts +0 -6
  46. package/dist/dist-esm/react-components/src/components/utils.js +0 -8
  47. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/localization/locales/utils.js +2 -2
  49. package/dist/dist-esm/react-components/src/localization/locales/utils.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +3 -7
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js +3 -3
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +2 -2
  56. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  57. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +15 -2
  58. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  59. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +1 -1
  60. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
  61. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js +9 -3
  62. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js.map +1 -1
  63. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +8 -0
  64. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  65. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  66. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +6 -1
  67. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  68. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  69. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +3 -1
  70. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +10 -1
  72. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +5 -1
  73. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
  74. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.d.ts +21 -0
  75. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js +43 -0
  76. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -0
  77. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +4 -3
  78. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  79. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.d.ts +21 -0
  80. package/dist/dist-esm/react-composites/src/composites/common/Drawer/{CaptionSettingsDrawer.js → SpokenLanguageSettingsDrawer.js} +4 -3
  81. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -0
  82. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
  84. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +2 -2
  85. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  86. package/dist/dist-esm/react-composites/src/composites/common/Survey.js +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/common/Survey.js.map +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.d.ts +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.js.map +1 -1
  90. package/dist/dist-esm/react-composites/src/composites/localization/locales/utils.js +5 -1
  91. package/dist/dist-esm/react-composites/src/composites/localization/locales/utils.js.map +1 -1
  92. package/package.json +6 -5
  93. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.d.ts +0 -21
  94. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Survey.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/styles/Survey.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qDAAqD;AACrD,OAAO,EAAS,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD,qDAAqD;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAY,EAAU,EAAE,CACxD,WAAW,CAAC;IACV,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;CACpC,CAAC,CAAC;AAEL,qDAAqD;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,QAAQ,EAAU,EAAE,CACvD,WAAW,CACT,QAAQ;IACN,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B;IACH,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B,CACN,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Theme, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/* @conditional-compile-remove(end-of-call-survey) */\n/**\n * @private\n */\nexport const questionTextStyle = (theme: Theme): string =>\n mergeStyles({\n fontWeight: 600,\n fontSize: _pxToRem(20),\n lineHeight: _pxToRem(20),\n color: theme.palette.neutralPrimary\n });\n\n/* @conditional-compile-remove(end-of-call-survey) */\n/**\n * @private\n */\nexport const surveyContainerStyle = (isMobile): string =>\n mergeStyles(\n isMobile\n ? {\n width: '20rem',\n position: 'absolute',\n top: '10%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n : {\n width: '24rem',\n position: 'absolute',\n top: '20%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n );\n"]}
1
+ {"version":3,"file":"Survey.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/styles/Survey.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qDAAqD;AACrD,OAAO,EAAS,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD,qDAAqD;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAY,EAAU,EAAE,CACxD,WAAW,CAAC;IACV,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;CACpC,CAAC,CAAC;AAEL,qDAAqD;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,QAAiB,EAAU,EAAE,CAChE,WAAW,CACT,QAAQ;IACN,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B;IACH,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B,CACN,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Theme, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/* @conditional-compile-remove(end-of-call-survey) */\n/**\n * @private\n */\nexport const questionTextStyle = (theme: Theme): string =>\n mergeStyles({\n fontWeight: 600,\n fontSize: _pxToRem(20),\n lineHeight: _pxToRem(20),\n color: theme.palette.neutralPrimary\n });\n\n/* @conditional-compile-remove(end-of-call-survey) */\n/**\n * @private\n */\nexport const surveyContainerStyle = (isMobile: boolean): string =>\n mergeStyles(\n isMobile\n ? {\n width: '20rem',\n position: 'absolute',\n top: '10%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n : {\n width: '24rem',\n position: 'absolute',\n top: '20%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n );\n"]}
@@ -1,13 +1,17 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import en_US from './en-US/strings.json';
4
+ import { _getKeys } from "../../../../../acs-ui-common/src";
4
5
  /**
5
6
  *
6
7
  * @private
7
8
  */
8
9
  export const createCompositeStrings = (localizedStrings) => {
9
10
  const strings = Object.assign({}, en_US);
10
- Object.keys(localizedStrings).forEach((key) => {
11
+ _getKeys(localizedStrings).forEach((key) => {
12
+ // mark the value as unknown because the type changes based on the key.
13
+ // this is unsafe at runtime as we could assign the wrong type based on the key here.
14
+ // but typescript isn't smart enough to know that the key used across each access will result in the same type
11
15
  strings[key] = Object.assign(Object.assign({}, strings[key]), localizedStrings[key]);
12
16
  });
13
17
  return strings;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/localization/locales/utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,KAAK,MAAM,sBAAsB,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,gBAA+C,EAAoB,EAAE;IAC1G,MAAM,OAAO,qBAA0B,KAAK,CAAE,CAAC;IAC/C,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;QACpD,OAAO,CAAC,GAAG,CAAC,mCAAQ,OAAO,CAAC,GAAG,CAAC,GAAK,gBAAgB,CAAC,GAAG,CAAC,CAAE,CAAC;IAC/D,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { PartialDeep } from 'type-fest';\nimport { CompositeStrings } from '../LocalizationProvider';\nimport en_US from './en-US/strings.json';\n\n/**\n *\n * @private\n */\nexport const createCompositeStrings = (localizedStrings: PartialDeep<CompositeStrings>): CompositeStrings => {\n const strings: CompositeStrings = { ...en_US };\n Object.keys(localizedStrings).forEach((key: string) => {\n strings[key] = { ...strings[key], ...localizedStrings[key] };\n });\n return strings;\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/localization/locales/utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,gBAA+C,EAAoB,EAAE;IAC1G,MAAM,OAAO,qBAA0B,KAAK,CAAE,CAAC;IAC/C,QAAQ,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACzC,uEAAuE;QACvE,qFAAqF;QACrF,8GAA8G;QAC7G,OAAmD,CAAC,GAAG,CAAC,mCAAQ,OAAO,CAAC,GAAG,CAAC,GAAK,gBAAgB,CAAC,GAAG,CAAC,CAAE,CAAC;IAC5G,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { PartialDeep } from 'type-fest';\nimport { CompositeStrings } from '../LocalizationProvider';\nimport en_US from './en-US/strings.json';\nimport { _getKeys } from '@internal/acs-ui-common';\n\n/**\n *\n * @private\n */\nexport const createCompositeStrings = (localizedStrings: PartialDeep<CompositeStrings>): CompositeStrings => {\n const strings: CompositeStrings = { ...en_US };\n _getKeys(localizedStrings).forEach((key) => {\n // mark the value as unknown because the type changes based on the key.\n // this is unsafe at runtime as we could assign the wrong type based on the key here.\n // but typescript isn't smart enough to know that the key used across each access will result in the same type\n (strings as Record<keyof CompositeStrings, unknown>)[key] = { ...strings[key], ...localizedStrings[key] };\n });\n return strings;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.14.0-alpha-202402290012",
3
+ "version": "1.14.0-alpha-202403020011",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -46,10 +46,11 @@
46
46
  "react-linkify": "^1.0.0-alpha",
47
47
  "react-use-draggable-scroll": "^0.4.7",
48
48
  "reselect": "^4.0.0",
49
- "roosterjs-editor-core": "^8.54.0",
50
- "roosterjs-editor-plugins": "^8.54.0",
51
- "roosterjs-editor-types-compatible": "^8.54.0",
52
- "roosterjs-react": "^8.54.0",
49
+ "roosterjs-editor-api": "^8.60.0",
50
+ "roosterjs-editor-core": "^8.60.0",
51
+ "roosterjs-editor-plugins": "^8.60.0",
52
+ "roosterjs-editor-types-compatible": "^8.60.0",
53
+ "roosterjs-react": "^8.55.0",
53
54
  "textarea-caret-ts": "^4.1.1",
54
55
  "use-debounce": "^10.0.0",
55
56
  "uuid": "^9.0.0"
@@ -1,21 +0,0 @@
1
- /// <reference types="react" />
2
- import { SpokenLanguageStrings, CaptionLanguageStrings } from "../../../../../react-components/src";
3
- /** @private */
4
- export interface CaptionSettingsDrawerStrings {
5
- /**
6
- * Label for spoken language/caption language drawerMenuItem
7
- *
8
- * @remarks Only displayed when in Teams call, disabled until captions is on
9
- */
10
- menuTitle: string;
11
- }
12
- /** @private */
13
- export declare const CaptionSettingsDrawer: (props: {
14
- selectLanguage: (language: string) => void;
15
- setCurrentLanguage: (language: string) => void;
16
- currentLanguage: string;
17
- onLightDismiss: () => void;
18
- strings?: CaptionSettingsDrawerStrings | undefined;
19
- supportedLanguageStrings?: SpokenLanguageStrings | CaptionLanguageStrings | undefined;
20
- }) => JSX.Element;
21
- //# sourceMappingURL=CaptionSettingsDrawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CaptionSettingsDrawer.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7C,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,4CAAmC;AAGtD,iDAAiD;AACjD,OAAO,EACL,WAAW,IAAI,UAAU,EAG1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAY7E,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KASrC,EAAe,EAAE;;IAChB,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,iDAAiD;IACjD,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,YAAoB,EAAE,EAAE;QACvB,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IACrC,CAAC,EACD,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,iDAAiD;IACjD,MAAM,WAAW,GAA0B,OAAO,CAAC,GAAG,EAAE;;QACtD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAA,KAAK,CAAC,wBAAwB,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;YAC9E,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY;YAClG,WAAW,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC;YAClD,kBAAkB,EAAE,KAAK,CAAC,eAAe,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;SAChG,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,wBAAwB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAE/E,MAAM,iBAAiB,GAA0B,OAAO,CAAC,GAAG,EAAE;QAC5D,MAAM,IAAI,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,iDAAiD;IACjD,OAAO,CACL,oBAAC,UAAU,IACT,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,SAAS,EACjC,KAAK,EAAE,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,EAAE,EAC9B,cAAc,EAAE,GAAG,EAAE;YACnB,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAChD,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,CAAC,EACD,MAAM,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAC1C,CACH,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { useMemo, useCallback } from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { useTheme } from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport { _CaptionsSettingsModal, SpokenLanguageStrings, CaptionLanguageStrings } from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport {\n _DrawerMenu as DrawerMenu,\n _DrawerMenuItemProps as DrawerMenuItemProps,\n _DrawerMenuStyles\n} from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport { captionSettingsDrawerStyles } from './captionSettingsDrawer.styles';\n\n/** @private */\nexport interface CaptionSettingsDrawerStrings {\n /**\n * Label for spoken language/caption language drawerMenuItem\n *\n * @remarks Only displayed when in Teams call, disabled until captions is on\n */\n menuTitle: string;\n}\n\n/** @private */\nexport const CaptionSettingsDrawer = (props: {\n /* @conditional-compile-remove(close-captions) */ selectLanguage: (language: string) => void;\n /* @conditional-compile-remove(close-captions) */ setCurrentLanguage: (language: string) => void;\n /* @conditional-compile-remove(close-captions) */ currentLanguage: string;\n /* @conditional-compile-remove(close-captions) */ onLightDismiss: () => void;\n /* @conditional-compile-remove(close-captions) */ strings?: CaptionSettingsDrawerStrings;\n /* @conditional-compile-remove(close-captions) */ supportedLanguageStrings?:\n | SpokenLanguageStrings\n | CaptionLanguageStrings;\n}): JSX.Element => {\n /* @conditional-compile-remove(close-captions) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(close-captions) */\n const onDrawerItemClick = useCallback(\n (languageCode: string) => {\n props.selectLanguage(languageCode);\n },\n [props]\n );\n\n /* @conditional-compile-remove(close-captions) */\n const drawerItems: DrawerMenuItemProps[] = useMemo(() => {\n return Object.keys(props.supportedLanguageStrings ?? []).map((languageCode) => ({\n itemKey: languageCode,\n text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,\n onItemClick: () => onDrawerItemClick(languageCode),\n secondaryIconProps: props.currentLanguage === languageCode ? { iconName: 'Accept' } : undefined\n }));\n }, [props.currentLanguage, props.supportedLanguageStrings, onDrawerItemClick]);\n\n const sortedDrawerItems: DrawerMenuItemProps[] = useMemo(() => {\n const copy = [...drawerItems];\n return copy.sort((a, b) => (a.text && b.text && a.text > b.text ? 1 : -1));\n }, [drawerItems]);\n\n /* @conditional-compile-remove(close-captions) */\n return (\n <DrawerMenu\n heading={props.strings?.menuTitle}\n items={sortedDrawerItems ?? []}\n onLightDismiss={() => {\n props.setCurrentLanguage(props.currentLanguage);\n props.onLightDismiss();\n }}\n styles={captionSettingsDrawerStyles(theme)}\n />\n );\n return <></>;\n};\n"]}