@azure/communication-react 1.15.0-alpha-202404060012 → 1.15.0-alpha-202404100012

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 (158) hide show
  1. package/dist/communication-react.d.ts +36 -43
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js → ChatMessageComponentAsRichTextEditBox-CeSMD9E_.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js.map → ChatMessageComponentAsRichTextEditBox-CeSMD9E_.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{index-CeUuqiwO.js → index-DtankK1c.js} +264 -228
  5. package/dist/dist-cjs/communication-react/index-DtankK1c.js.map +1 -0
  6. package/dist/dist-cjs/communication-react/index.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +3 -0
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +6 -0
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +2 -2
  13. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -3
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +2 -8
  18. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +6 -20
  22. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  23. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +1 -9
  24. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +8 -31
  25. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
  27. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +11 -28
  28. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +1 -5
  30. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  31. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +14 -9
  32. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  33. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
  34. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +9 -0
  35. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -2
  37. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +7 -20
  38. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +15 -1
  40. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +42 -0
  41. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/Converter.js +3 -1
  43. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  44. package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.js +6 -10
  45. package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +5 -0
  47. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +33 -2
  48. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  49. package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +3 -3
  50. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  51. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +1 -0
  53. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +2 -2
  54. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  55. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +1 -0
  56. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +2 -2
  57. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +5 -0
  59. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +2 -2
  60. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  61. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +3 -6
  62. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +0 -4
  64. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +0 -21
  65. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +0 -1
  67. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +0 -2
  69. package/dist/dist-esm/react-components/src/components/VideoTile.js +5 -0
  70. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +4 -0
  72. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +16 -0
  73. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -1
  75. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +16 -2
  77. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +16 -2
  78. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +16 -2
  79. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +16 -2
  80. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +16 -2
  81. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +16 -2
  82. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +16 -2
  83. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +16 -2
  84. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +16 -2
  85. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +16 -2
  86. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +16 -2
  87. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +16 -2
  88. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +16 -2
  89. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +16 -2
  90. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +16 -2
  91. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +16 -2
  92. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +16 -2
  93. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +16 -2
  94. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +16 -2
  95. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +16 -2
  96. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.d.ts +1 -1
  97. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +2 -2
  99. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  100. package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +2 -6
  101. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/types/SurveyIssues.d.ts +1 -1
  103. package/dist/dist-esm/react-components/src/types/SurveyIssues.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.d.ts +1 -1
  105. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.js.map +1 -1
  106. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +1 -2
  107. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +1 -5
  109. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  110. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +3 -3
  111. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  112. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +11 -6
  113. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +3 -0
  117. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +6 -0
  118. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  119. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -2
  120. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  121. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -1
  122. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  123. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +1 -1
  124. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +1 -1
  125. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  126. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -1
  127. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  128. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  129. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +1 -1
  130. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -1
  131. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  132. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -1
  133. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  134. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js +1 -1
  135. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  136. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +9 -2
  137. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +9 -2
  138. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +9 -2
  139. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +8 -1
  140. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -2
  141. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +9 -2
  142. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +9 -2
  143. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +9 -2
  144. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +9 -2
  145. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +9 -2
  146. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +9 -2
  147. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +9 -2
  148. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +9 -2
  149. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +9 -2
  150. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +9 -2
  151. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +9 -2
  152. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +10 -3
  153. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +9 -2
  154. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +9 -2
  155. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +9 -2
  156. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +9 -2
  157. package/package.json +1 -1
  158. package/dist/dist-cjs/communication-react/index-CeUuqiwO.js.map +0 -1
@@ -36,6 +36,7 @@ import { CallState as CallState_2 } from '@azure/communication-calling';
36
36
  import { CallSurvey } from '@azure/communication-calling';
37
37
  import { CallSurveyResponse } from '@azure/communication-calling';
38
38
  import { CapabilitiesChangeInfo } from '@azure/communication-calling';
39
+ import { CaptionsKind } from '@azure/communication-calling';
39
40
  import { CaptionsResultType } from '@azure/communication-calling';
40
41
  import { ChatClient } from '@azure/communication-chat';
41
42
  import { ChatClientOptions } from '@azure/communication-chat';
@@ -877,7 +878,7 @@ export declare interface CallAdapterCallOperations {
877
878
  /**
878
879
  * Send reaction emoji
879
880
  *
880
- * @beta
881
+ * @public
881
882
  */
882
883
  onReactionClick(reaction: Reaction_2): Promise<void>;
883
884
  /**
@@ -1028,7 +1029,7 @@ export declare interface CallAdapterCallOperations {
1028
1029
  /**
1029
1030
  * Send the end of call survey result
1030
1031
  *
1031
- * @beta
1032
+ * @public
1032
1033
  */
1033
1034
  submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;
1034
1035
  /**
@@ -1111,7 +1112,7 @@ export declare type CallAdapterClientState = {
1111
1112
  sounds?: CallingSounds;
1112
1113
  /**
1113
1114
  * State to track the reactions to be used.
1114
- * @beta
1115
+ * @public
1115
1116
  */
1116
1117
  reactions?: ReactionResources;
1117
1118
  };
@@ -2498,10 +2499,6 @@ export declare interface CallCompositeStrings {
2498
2499
  * Cancel button label for survey
2499
2500
  */
2500
2501
  surveySkipButtonLabel: string;
2501
- /**
2502
- * Default text for free form text box
2503
- */
2504
- surveyTextboxDefaultText: string;
2505
2502
  /**
2506
2503
  * Thank you text appeared on screen after survey is submitted
2507
2504
  */
@@ -2513,7 +2510,7 @@ export declare interface CallCompositeStrings {
2513
2510
  /**
2514
2511
  * Corresponding texts to each call category
2515
2512
  */
2516
- SurveyIssuesHeadingStrings: SurveyIssuesHeadingStrings;
2513
+ surveyIssuesHeadingStrings: SurveyIssuesHeadingStrings;
2517
2514
  /**
2518
2515
  * String for the dismiss control on the local and remote PIP on mobile
2519
2516
  */
@@ -2921,7 +2918,7 @@ export declare interface CallState {
2921
2918
  /**
2922
2919
  * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature}.
2923
2920
  *
2924
- *@beta
2921
+ *@public
2925
2922
  */
2926
2923
  pptLive: PPTLiveCallFeatureState;
2927
2924
  /**
@@ -2932,7 +2929,7 @@ export declare interface CallState {
2932
2929
  * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with
2933
2930
  * UI helper props receivedOn which indicates the timestamp when the message was received.
2934
2931
  *
2935
- * @beta
2932
+ * @public
2936
2933
  */
2937
2934
  localParticipantReaction?: ReactionState;
2938
2935
  /**
@@ -2953,7 +2950,7 @@ export declare interface CallState {
2953
2950
  *
2954
2951
  * This property is added by the stateful layer and is not a proxy of SDK state
2955
2952
  *
2956
- *@beta
2953
+ *@public
2957
2954
  */
2958
2955
  contentSharingRemoteParticipant?: string;
2959
2956
  /**
@@ -3002,7 +2999,7 @@ export declare interface CallState {
3002
2999
 
3003
3000
  /**
3004
3001
  * Represents the improvement suggestion part of call survey
3005
- * @beta
3002
+ * @public
3006
3003
  */
3007
3004
  export declare interface CallSurveyImprovementSuggestions {
3008
3005
  /**
@@ -3149,7 +3146,7 @@ export declare interface CallWithChatAdapterManagement {
3149
3146
  * Send Reaction to ongoing meeting.
3150
3147
  * @param reaction - A value of type {@link @azure/communication-calling#Reaction}
3151
3148
  *
3152
- * @beta
3149
+ * @public
3153
3150
  */
3154
3151
  onReactionClick(reaction: Reaction_2): Promise<void>;
3155
3152
  /**
@@ -3412,7 +3409,7 @@ export declare interface CallWithChatAdapterManagement {
3412
3409
  /**
3413
3410
  * Send the end of call survey result
3414
3411
  *
3415
- * @beta
3412
+ * @public
3416
3413
  */
3417
3414
  submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;
3418
3415
  /**
@@ -3567,7 +3564,6 @@ export declare interface CallWithChatClientState {
3567
3564
  hideAttendeeNames?: boolean;
3568
3565
  /**
3569
3566
  * Reaction resources to render in meetings
3570
- * @beta
3571
3567
  * */
3572
3568
  reactions?: ReactionResources;
3573
3569
  }
@@ -4408,6 +4404,10 @@ export declare interface CaptionsCallFeatureState {
4408
4404
  * current caption language
4409
4405
  */
4410
4406
  currentCaptionLanguage: string;
4407
+ /**
4408
+ * current caption kind: teams or acs captions
4409
+ */
4410
+ captionsKind: CaptionsKind;
4411
4411
  }
4412
4412
 
4413
4413
  /**
@@ -5259,9 +5259,6 @@ export declare interface CommonCallingHandlers {
5259
5259
  onRaiseHand: () => Promise<void>;
5260
5260
  onLowerHand: () => Promise<void>;
5261
5261
  onToggleRaiseHand: () => Promise<void>;
5262
- /**
5263
- * @beta
5264
- */
5265
5262
  onReactionClick: (reaction: Reaction_2) => Promise<void>;
5266
5263
  onToggleHold: () => Promise<void>;
5267
5264
  onAddParticipant(participant: CommunicationUserIdentifier): Promise<void>;
@@ -5559,7 +5556,6 @@ export declare interface ComponentStrings {
5559
5556
  raiseHandButton: RaiseHandButtonStrings;
5560
5557
  /**
5561
5558
  * Strings for ReactionButton
5562
- * @beta
5563
5559
  * */
5564
5560
  reactionButton: ReactionButtonStrings;
5565
5561
  /** Strings for TypingIndicator */
@@ -9178,7 +9174,7 @@ export declare type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Conn
9178
9174
  * State only version of {@link @azure/communication-calling#PPTLiveCallFeature}. {@link StatefulCallClient} will
9179
9175
  * automatically listen for pptLive on the call and update the state exposed by {@link StatefulCallClient} accordingly.
9180
9176
  *
9181
- * @beta
9177
+ * @public
9182
9178
  */
9183
9179
  export declare interface PPTLiveCallFeatureState {
9184
9180
  /**
@@ -9291,7 +9287,7 @@ export declare interface RaiseHandCallFeature {
9291
9287
  /**
9292
9288
  * Reaction state with reaction type to render
9293
9289
  *
9294
- * @beta
9290
+ * @public
9295
9291
  */
9296
9292
  export declare type Reaction = {
9297
9293
  /**
@@ -9307,7 +9303,7 @@ export declare type Reaction = {
9307
9303
  /**
9308
9304
  * Props for {@link ReactionButton}.
9309
9305
  *
9310
- * @beta
9306
+ * @public
9311
9307
  */
9312
9308
  export declare interface ReactionButtonProps extends ControlBarButtonProps {
9313
9309
  /**
@@ -9327,7 +9323,7 @@ export declare interface ReactionButtonProps extends ControlBarButtonProps {
9327
9323
  /**
9328
9324
  * Strings of {@link ReactionButton} that can be overridden.
9329
9325
  *
9330
- * @beta
9326
+ * @public
9331
9327
  */
9332
9328
  export declare interface ReactionButtonStrings {
9333
9329
  /** Label of the button. */
@@ -9352,7 +9348,7 @@ export declare interface ReactionButtonStrings {
9352
9348
 
9353
9349
  /**
9354
9350
  * Interface for animation sprite image and related metadata
9355
- * @beta
9351
+ * @public
9356
9352
  */
9357
9353
  export declare interface ReactionResources {
9358
9354
  /**
@@ -9379,7 +9375,7 @@ export declare interface ReactionResources {
9379
9375
 
9380
9376
  /**
9381
9377
  * Type for animation sprite image and related metadata
9382
- * @beta
9378
+ * @public
9383
9379
  */
9384
9380
  export declare type ReactionSprite = {
9385
9381
  /**
@@ -9390,17 +9386,13 @@ export declare type ReactionSprite = {
9390
9386
  * The frame count of the resource reaction in the sprite image
9391
9387
  */
9392
9388
  frameCount: number;
9393
- /**
9394
- * The square size of one frame in the animation resource..
9395
- */
9396
- size?: number;
9397
9389
  };
9398
9390
 
9399
9391
  /**
9400
9392
  * State only version of {@link @azure/communication-calling#Call.ReactionMessage} with UI helper props receivedOn.
9401
9393
  * Reaction state with a timestamp which helps UI to decide to render the reaction accordingly.
9402
9394
  *
9403
- * @beta
9395
+ * @public
9404
9396
  */
9405
9397
  export declare type ReactionState = {
9406
9398
  /**
@@ -9496,14 +9488,14 @@ export declare interface RemoteParticipantState {
9496
9488
  /**
9497
9489
  * Proxy of {@link @azure/communication-calling#Call.PPTLive.target}.
9498
9490
  *
9499
- * @beta
9491
+ * @public
9500
9492
  */
9501
9493
  contentSharingStream?: HTMLElement;
9502
9494
  /**
9503
9495
  * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with
9504
9496
  * UI helper props receivedOn which indicates the timestamp when the message was received.
9505
9497
  *
9506
- * @beta
9498
+ * @public
9507
9499
  */
9508
9500
  reactionState?: ReactionState;
9509
9501
  /**
@@ -9615,6 +9607,11 @@ export declare interface RichTextSendBoxProps {
9615
9607
  * @beta
9616
9608
  */
9617
9609
  activeAttachmentUploads?: AttachmentMetadata[];
9610
+ /**
9611
+ * enumerable to determine if the input box has focus on render or not.
9612
+ * When undefined nothing has focus on render
9613
+ */
9614
+ autoFocus?: 'sendBoxTextField';
9618
9615
  /**
9619
9616
  * Optional callback to remove the attachment upload before sending by clicking on
9620
9617
  * cancel icon.
@@ -10045,7 +10042,7 @@ export declare interface SpokenLanguageStrings {
10045
10042
  /**
10046
10043
  * Spotlight state with order
10047
10044
  *
10048
- * @beta
10045
+ * @public
10049
10046
  */
10050
10047
  export declare type Spotlight = {
10051
10048
  /**
@@ -10057,7 +10054,7 @@ export declare type Spotlight = {
10057
10054
  /**
10058
10055
  * State only version of {@link @azure/communication-calling#SpotlightCallFeature}
10059
10056
  *
10060
- * @beta
10057
+ * @public
10061
10058
  */
10062
10059
  export declare interface SpotlightCallFeatureState {
10063
10060
  /**
@@ -10086,7 +10083,7 @@ export declare type SpotlightChangedListener = (args: {
10086
10083
 
10087
10084
  /**
10088
10085
  * Strings used in prompt related to spotlight
10089
- * @beta
10086
+ * @public
10090
10087
  */
10091
10088
  export declare interface SpotlightPromptStrings {
10092
10089
  /**
@@ -10150,7 +10147,7 @@ export declare interface SpotlightPromptStrings {
10150
10147
  /**
10151
10148
  * Spotlight state with order
10152
10149
  *
10153
- * @beta
10150
+ * @public
10154
10151
  */
10155
10152
  export declare interface SpotlightState {
10156
10153
  /**
@@ -10460,7 +10457,7 @@ export declare interface StreamMediaProps {
10460
10457
  }
10461
10458
 
10462
10459
  /**
10463
- * @beta
10460
+ * @public
10464
10461
  * Corresponding texts to each call issue
10465
10462
  */
10466
10463
  export declare interface SurveyIssues {
@@ -10505,7 +10502,7 @@ export declare interface SurveyIssues {
10505
10502
  }
10506
10503
 
10507
10504
  /**
10508
- * @beta
10505
+ * @public
10509
10506
  * Corresponding texts to each call issue category
10510
10507
  */
10511
10508
  export declare interface SurveyIssuesHeadingStrings {
@@ -11258,7 +11255,6 @@ export declare interface VideoGalleryLocalParticipant extends VideoGalleryPartic
11258
11255
  /**
11259
11256
  * Whether local participant has reacted
11260
11257
  *
11261
- * @beta
11262
11258
  * */
11263
11259
  reaction?: Reaction;
11264
11260
  }
@@ -11408,7 +11404,6 @@ export declare interface VideoGalleryProps {
11408
11404
  localVideoTileSize?: LocalVideoTileSize;
11409
11405
  /**
11410
11406
  * Reaction resources for like, heart, laugh, applause and surprised.
11411
- * @beta
11412
11407
  */
11413
11408
  reactionResources?: ReactionResources;
11414
11409
  }
@@ -11433,7 +11428,7 @@ export declare interface VideoGalleryRemoteParticipant extends VideoGalleryParti
11433
11428
  /**
11434
11429
  * Whether participant has reacted
11435
11430
  *
11436
- * @beta
11431
+ * @public
11437
11432
  * */
11438
11433
  reaction?: Reaction;
11439
11434
  }
@@ -11637,7 +11632,6 @@ export declare interface VideoTileProps {
11637
11632
  renderElement?: JSX.Element | null;
11638
11633
  /**
11639
11634
  * Overlay component responsible for rendering reaction
11640
- * @beta
11641
11635
  */
11642
11636
  overlay?: JSX.Element | null;
11643
11637
  /** Determines if the video is mirrored or not. */
@@ -11714,7 +11708,6 @@ export declare interface VideoTileProps {
11714
11708
  isSpotlighted?: boolean;
11715
11709
  /**
11716
11710
  * Reactions resources' url and metadata.
11717
- * @beta
11718
11711
  */
11719
11712
  reactionResources?: ReactionResources;
11720
11713
  }
@@ -4,7 +4,7 @@ var react = require('@fluentui/react');
4
4
  var reactChat = require('@fluentui-contrib/react-chat');
5
5
  var reactComponents = require('@fluentui/react-components');
6
6
  require('@azure/communication-common');
7
- var index = require('./index-CeUuqiwO.js');
7
+ var index = require('./index-DtankK1c.js');
8
8
  var React = require('react');
9
9
  require('reselect');
10
10
  require('@azure/communication-calling');
@@ -125,4 +125,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
125
125
  };
126
126
 
127
127
  exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
128
- //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js.map
128
+ //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-CeSMD9E_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '../../../types/Attachment';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(attachment-upload) */\nimport { getMessageWithAttachmentMetadata } from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(attachment-upload) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n metadata?: Record<string, string>,\n options?: {\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[];\n }\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const { onCancel, onSubmit, strings, message } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const [attachmentMetadata, setAttachmentMetadata] = useState(getMessageWithAttachmentMetadata(message));\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = getMessageState(\n textValue,\n /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata ?? []\n );\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = (newValue?: string): void => {\n setTextValue(newValue ?? '');\n };\n\n const textTooLongMessage =\n messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n submitEnabled &&\n onSubmit(\n textValue,\n message.metadata,\n /* @conditional-compile-remove(attachment-upload) */ {\n attachmentMetadata\n }\n );\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata,\n message.messageId,\n message.metadata,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n onSubmit,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n submitEnabled,\n textValue\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return locale.richTextSendBox;\n return locale.sendBox;\n }, [/* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox, locale.sendBox]);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onCancelAttachmentUpload = useCallback(\n (attachmentId: string) => {\n setAttachmentMetadata(attachmentMetadata?.filter((attachment) => attachment.id !== attachmentId));\n },\n [attachmentMetadata]\n );\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n activeAttachmentUploads={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors textTooLongMessage={textTooLongMessage} systemMessage={message.failureReason} />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={setText}\n editorComponentRef={editTextFieldRef}\n initialContent={message.content}\n content={textValue}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: chatMyMessageStyles.root\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n"],"names":["useState","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","useCallback","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","useMemo","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBox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AAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;YACJ,SAAS,EAAE,mBAAmB,CAAC,IAAI;AACpC,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS,CAClE;AACF,SAAA,EAAA,EAEA,UAAU,EAAE,CACC,EAChB;AACJ;;;;"}
1
+ {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-CeSMD9E_.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '../../../types/Attachment';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(attachment-upload) */\nimport { getMessageWithAttachmentMetadata } from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(attachment-upload) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n metadata?: Record<string, string>,\n options?: {\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[];\n }\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const { onCancel, onSubmit, strings, message } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const [attachmentMetadata, setAttachmentMetadata] = useState(getMessageWithAttachmentMetadata(message));\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = getMessageState(\n textValue,\n /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata ?? []\n );\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = (newValue?: string): void => {\n setTextValue(newValue ?? '');\n };\n\n const textTooLongMessage =\n messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n submitEnabled &&\n onSubmit(\n textValue,\n message.metadata,\n /* @conditional-compile-remove(attachment-upload) */ {\n attachmentMetadata\n }\n );\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata,\n message.messageId,\n message.metadata,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n onSubmit,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n submitEnabled,\n textValue\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return locale.richTextSendBox;\n return locale.sendBox;\n }, [/* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox, locale.sendBox]);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onCancelAttachmentUpload = useCallback(\n (attachmentId: string) => {\n setAttachmentMetadata(attachmentMetadata?.filter((attachment) => attachment.id !== attachmentId));\n },\n [attachmentMetadata]\n );\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n activeAttachmentUploads={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors textTooLongMessage={textTooLongMessage} systemMessage={message.failureReason} />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={setText}\n editorComponentRef={editTextFieldRef}\n initialContent={message.content}\n content={textValue}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: chatMyMessageStyles.root\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n"],"names":["useState","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","useCallback","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","useMemo","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9Th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