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

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 (144) hide show
  1. package/dist/communication-react.d.ts +31 -43
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js → ChatMessageComponentAsRichTextEditBox-CkXr0tIb.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js.map → ChatMessageComponentAsRichTextEditBox-CkXr0tIb.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{index-CeUuqiwO.js → index-BcyLWrGT.js} +223 -214
  5. package/dist/dist-cjs/communication-react/index-BcyLWrGT.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/ReactionButton.d.ts +3 -3
  45. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  46. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +3 -6
  48. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  49. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +0 -4
  50. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +0 -21
  51. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +0 -1
  53. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +0 -2
  55. package/dist/dist-esm/react-components/src/components/VideoTile.js +5 -0
  56. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  57. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +4 -0
  58. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +16 -0
  59. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -1
  61. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +16 -2
  63. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +16 -2
  64. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +16 -2
  65. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +16 -2
  66. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +16 -2
  67. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +16 -2
  68. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +16 -2
  69. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +16 -2
  70. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +16 -2
  71. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +16 -2
  72. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +16 -2
  73. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +16 -2
  74. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +16 -2
  75. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +16 -2
  76. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +16 -2
  77. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +16 -2
  78. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +16 -2
  79. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +16 -2
  80. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +16 -2
  81. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +16 -2
  82. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.d.ts +1 -1
  83. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +2 -2
  85. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +2 -6
  87. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
  88. package/dist/dist-esm/react-components/src/types/SurveyIssues.d.ts +1 -1
  89. package/dist/dist-esm/react-components/src/types/SurveyIssues.js.map +1 -1
  90. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.d.ts +1 -1
  91. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +1 -2
  93. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +1 -5
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +3 -3
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +11 -6
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +3 -0
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +6 -0
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -2
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  109. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +1 -1
  110. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  112. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -1
  113. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  118. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -1
  119. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js +1 -1
  121. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  122. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +9 -2
  123. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +9 -2
  124. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +9 -2
  125. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +8 -1
  126. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -2
  127. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +9 -2
  128. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +9 -2
  129. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +9 -2
  130. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +9 -2
  131. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +9 -2
  132. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +9 -2
  133. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +9 -2
  134. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +9 -2
  135. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +9 -2
  136. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +9 -2
  137. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +9 -2
  138. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +10 -3
  139. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +9 -2
  140. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +9 -2
  141. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +9 -2
  142. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +9 -2
  143. package/package.json +1 -1
  144. 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
  /**
@@ -10045,7 +10037,7 @@ export declare interface SpokenLanguageStrings {
10045
10037
  /**
10046
10038
  * Spotlight state with order
10047
10039
  *
10048
- * @beta
10040
+ * @public
10049
10041
  */
10050
10042
  export declare type Spotlight = {
10051
10043
  /**
@@ -10057,7 +10049,7 @@ export declare type Spotlight = {
10057
10049
  /**
10058
10050
  * State only version of {@link @azure/communication-calling#SpotlightCallFeature}
10059
10051
  *
10060
- * @beta
10052
+ * @public
10061
10053
  */
10062
10054
  export declare interface SpotlightCallFeatureState {
10063
10055
  /**
@@ -10086,7 +10078,7 @@ export declare type SpotlightChangedListener = (args: {
10086
10078
 
10087
10079
  /**
10088
10080
  * Strings used in prompt related to spotlight
10089
- * @beta
10081
+ * @public
10090
10082
  */
10091
10083
  export declare interface SpotlightPromptStrings {
10092
10084
  /**
@@ -10150,7 +10142,7 @@ export declare interface SpotlightPromptStrings {
10150
10142
  /**
10151
10143
  * Spotlight state with order
10152
10144
  *
10153
- * @beta
10145
+ * @public
10154
10146
  */
10155
10147
  export declare interface SpotlightState {
10156
10148
  /**
@@ -10460,7 +10452,7 @@ export declare interface StreamMediaProps {
10460
10452
  }
10461
10453
 
10462
10454
  /**
10463
- * @beta
10455
+ * @public
10464
10456
  * Corresponding texts to each call issue
10465
10457
  */
10466
10458
  export declare interface SurveyIssues {
@@ -10505,7 +10497,7 @@ export declare interface SurveyIssues {
10505
10497
  }
10506
10498
 
10507
10499
  /**
10508
- * @beta
10500
+ * @public
10509
10501
  * Corresponding texts to each call issue category
10510
10502
  */
10511
10503
  export declare interface SurveyIssuesHeadingStrings {
@@ -11258,7 +11250,6 @@ export declare interface VideoGalleryLocalParticipant extends VideoGalleryPartic
11258
11250
  /**
11259
11251
  * Whether local participant has reacted
11260
11252
  *
11261
- * @beta
11262
11253
  * */
11263
11254
  reaction?: Reaction;
11264
11255
  }
@@ -11408,7 +11399,6 @@ export declare interface VideoGalleryProps {
11408
11399
  localVideoTileSize?: LocalVideoTileSize;
11409
11400
  /**
11410
11401
  * Reaction resources for like, heart, laugh, applause and surprised.
11411
- * @beta
11412
11402
  */
11413
11403
  reactionResources?: ReactionResources;
11414
11404
  }
@@ -11433,7 +11423,7 @@ export declare interface VideoGalleryRemoteParticipant extends VideoGalleryParti
11433
11423
  /**
11434
11424
  * Whether participant has reacted
11435
11425
  *
11436
- * @beta
11426
+ * @public
11437
11427
  * */
11438
11428
  reaction?: Reaction;
11439
11429
  }
@@ -11637,7 +11627,6 @@ export declare interface VideoTileProps {
11637
11627
  renderElement?: JSX.Element | null;
11638
11628
  /**
11639
11629
  * Overlay component responsible for rendering reaction
11640
- * @beta
11641
11630
  */
11642
11631
  overlay?: JSX.Element | null;
11643
11632
  /** Determines if the video is mirrored or not. */
@@ -11714,7 +11703,6 @@ export declare interface VideoTileProps {
11714
11703
  isSpotlighted?: boolean;
11715
11704
  /**
11716
11705
  * Reactions resources' url and metadata.
11717
- * @beta
11718
11706
  */
11719
11707
  reactionResources?: ReactionResources;
11720
11708
  }
@@ -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-BcyLWrGT.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-CkXr0tIb.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","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAkDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;IACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,IAAA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAS,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;;AAE1E,IAAA,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAGA,cAAQ,CAACC,sCAAgC,CAAC,OAAO,CAAC,CAAC,CAAC;IACxG,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAA6B,IAAI,CAAC,CAAC;AACxE,IAAA,MAAM,KAAK,GAAGC,cAAQ,EAAE,CAAC;AACzB,IAAA,MAAM,YAAY,GAAGC,qBAAe,CAClC,SAAS;yDAC4C,kBAAkB,KAAlB,IAAA,IAAA,kBAAkB,cAAlB,kBAAkB,GAAI,EAAE,CAC9E,CAAC;AACF,IAAA,MAAM,aAAa,GAAG,YAAY,KAAK,IAAI,CAAC;AAE5C,IAAA,MAAM,mBAAmB,GAAGC,+CAAyC,EAAE,CAAC;AACxE,IAAA,MAAM,mBAAmB,GAAGC,4BAAsB,EAAE,CAAC;AACrD,IAAA,MAAM,MAAM,GAAGC,eAAS,EAAE,CAAC,OAAO,CAAC;AAEnC,IAAA,MAAM,OAAO,GAAG,CAAC,QAAiB,KAAU;QAC1C,YAAY,CAAC,QAA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M,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,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-CkXr0tIb.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","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAkDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;IACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,IAAA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAS,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;;AAE1E,IAAA,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAGA,cAAQ,CAACC,sCAAgC,CAAC,OAAO,CAAC,CAAC,CAAC;IACxG,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAA6B,IAAI,CAAC,CAAC;AACxE,IAAA,MAAM,KAAK,GAAGC,cAAQ,EAAE,CAAC;AACzB,IAAA,MAAM,YAAY,GAAGC,qBAAe,CAClC,SAAS;yDAC4C,kBAAkB,KAAlB,IAAA,IAAA,kBAAkB,cAAlB,kBAAkB,GAAI,EAAE,CAC9E,CAAC;AACF,IAAA,MAAM,aAAa,GAAG,YAAY,KAAK,IAAI,CAAC;AAE5C,IAAA,MAAM,mBAAmB,GAAGC,+CAAyC,EAAE,CAAC;AACxE,IAAA,MAAM,mBAAmB,GAAGC,4BAAsB,EAAE,CAAC;AACrD,IAAA,MAAM,MAAM,GAAGC,eAAS,EAAE,CAAC,OAAO,CAAC;AAEnC,IAAA,MAAM,OAAO,GAAG,CAAC,QAAiB,KA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