@azure/communication-react 1.15.0-alpha-202404052151 → 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 (150) hide show
  1. package/dist/communication-react.d.ts +37 -45
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BD4CYGc0.js → ChatMessageComponentAsRichTextEditBox-CkXr0tIb.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BD4CYGc0.js.map → ChatMessageComponentAsRichTextEditBox-CkXr0tIb.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{index-6MBkcLnx.js → index-BcyLWrGT.js} +266 -239
  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/EndCallButton.js +16 -3
  45. package/dist/dist-esm/react-components/src/components/EndCallButton.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +3 -3
  47. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  48. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  49. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +3 -6
  50. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  51. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +0 -4
  52. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +0 -21
  53. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +0 -1
  55. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +0 -2
  57. package/dist/dist-esm/react-components/src/components/VideoTile.js +5 -0
  58. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  59. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +4 -0
  60. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +16 -0
  61. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -1
  63. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  64. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +16 -2
  65. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +16 -2
  66. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +16 -2
  67. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +16 -2
  68. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -1
  69. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +16 -2
  70. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +16 -2
  71. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +16 -2
  72. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +16 -2
  73. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +16 -2
  74. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +16 -2
  75. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +16 -2
  76. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +16 -2
  77. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +16 -2
  78. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +16 -2
  79. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +16 -2
  80. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +16 -2
  81. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +16 -2
  82. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +16 -2
  83. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +16 -2
  84. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +16 -2
  85. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.d.ts +1 -1
  86. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.js.map +1 -1
  87. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +2 -2
  88. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +2 -6
  90. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
  91. package/dist/dist-esm/react-components/src/types/SurveyIssues.d.ts +1 -1
  92. package/dist/dist-esm/react-components/src/types/SurveyIssues.js.map +1 -1
  93. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.d.ts +1 -1
  94. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +1 -2
  96. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +7 -7
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +3 -3
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +11 -6
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +3 -1
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js +4 -2
  105. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
  106. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +26 -21
  107. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +3 -0
  109. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +6 -0
  110. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -2
  112. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  113. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -1
  114. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  118. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -1
  119. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  121. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +1 -1
  122. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -1
  123. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  124. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -1
  125. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  126. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js +1 -1
  127. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  128. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +9 -2
  129. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +9 -2
  130. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +9 -2
  131. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +8 -1
  132. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +3 -3
  133. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +9 -2
  134. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +9 -2
  135. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +9 -2
  136. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +9 -2
  137. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +9 -2
  138. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +9 -2
  139. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +9 -2
  140. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +9 -2
  141. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +9 -2
  142. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +9 -2
  143. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +9 -2
  144. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +10 -3
  145. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +9 -2
  146. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +9 -2
  147. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +9 -2
  148. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +9 -2
  149. package/package.json +1 -1
  150. package/dist/dist-cjs/communication-react/index-6MBkcLnx.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
  */
@@ -2575,9 +2572,13 @@ export declare interface CallCompositeStrings {
2575
2572
  */
2576
2573
  exitSpotlightButtonTooltip: string;
2577
2574
  /**
2578
- * Label for confirm button in hang up confirm dialog
2575
+ * Label for confirm button of hang up for everyone dialog
2579
2576
  */
2580
- hangUpConfirmButtonLabel?: string;
2577
+ leaveConfirmButtonLabel?: string;
2578
+ /**
2579
+ * Label for confirm button of leave confim dialog
2580
+ */
2581
+ endCallConfirmButtonLabel?: string;
2581
2582
  /**
2582
2583
  * Label for cancel button in hang up confirm dialog
2583
2584
  */
@@ -2917,7 +2918,7 @@ export declare interface CallState {
2917
2918
  /**
2918
2919
  * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature}.
2919
2920
  *
2920
- *@beta
2921
+ *@public
2921
2922
  */
2922
2923
  pptLive: PPTLiveCallFeatureState;
2923
2924
  /**
@@ -2928,7 +2929,7 @@ export declare interface CallState {
2928
2929
  * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with
2929
2930
  * UI helper props receivedOn which indicates the timestamp when the message was received.
2930
2931
  *
2931
- * @beta
2932
+ * @public
2932
2933
  */
2933
2934
  localParticipantReaction?: ReactionState;
2934
2935
  /**
@@ -2949,7 +2950,7 @@ export declare interface CallState {
2949
2950
  *
2950
2951
  * This property is added by the stateful layer and is not a proxy of SDK state
2951
2952
  *
2952
- *@beta
2953
+ *@public
2953
2954
  */
2954
2955
  contentSharingRemoteParticipant?: string;
2955
2956
  /**
@@ -2998,7 +2999,7 @@ export declare interface CallState {
2998
2999
 
2999
3000
  /**
3000
3001
  * Represents the improvement suggestion part of call survey
3001
- * @beta
3002
+ * @public
3002
3003
  */
3003
3004
  export declare interface CallSurveyImprovementSuggestions {
3004
3005
  /**
@@ -3145,7 +3146,7 @@ export declare interface CallWithChatAdapterManagement {
3145
3146
  * Send Reaction to ongoing meeting.
3146
3147
  * @param reaction - A value of type {@link @azure/communication-calling#Reaction}
3147
3148
  *
3148
- * @beta
3149
+ * @public
3149
3150
  */
3150
3151
  onReactionClick(reaction: Reaction_2): Promise<void>;
3151
3152
  /**
@@ -3408,7 +3409,7 @@ export declare interface CallWithChatAdapterManagement {
3408
3409
  /**
3409
3410
  * Send the end of call survey result
3410
3411
  *
3411
- * @beta
3412
+ * @public
3412
3413
  */
3413
3414
  submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;
3414
3415
  /**
@@ -3563,7 +3564,6 @@ export declare interface CallWithChatClientState {
3563
3564
  hideAttendeeNames?: boolean;
3564
3565
  /**
3565
3566
  * Reaction resources to render in meetings
3566
- * @beta
3567
3567
  * */
3568
3568
  reactions?: ReactionResources;
3569
3569
  }
@@ -4404,6 +4404,10 @@ export declare interface CaptionsCallFeatureState {
4404
4404
  * current caption language
4405
4405
  */
4406
4406
  currentCaptionLanguage: string;
4407
+ /**
4408
+ * current caption kind: teams or acs captions
4409
+ */
4410
+ captionsKind: CaptionsKind;
4407
4411
  }
4408
4412
 
4409
4413
  /**
@@ -5255,9 +5259,6 @@ export declare interface CommonCallingHandlers {
5255
5259
  onRaiseHand: () => Promise<void>;
5256
5260
  onLowerHand: () => Promise<void>;
5257
5261
  onToggleRaiseHand: () => Promise<void>;
5258
- /**
5259
- * @beta
5260
- */
5261
5262
  onReactionClick: (reaction: Reaction_2) => Promise<void>;
5262
5263
  onToggleHold: () => Promise<void>;
5263
5264
  onAddParticipant(participant: CommunicationUserIdentifier): Promise<void>;
@@ -5555,7 +5556,6 @@ export declare interface ComponentStrings {
5555
5556
  raiseHandButton: RaiseHandButtonStrings;
5556
5557
  /**
5557
5558
  * Strings for ReactionButton
5558
- * @beta
5559
5559
  * */
5560
5560
  reactionButton: ReactionButtonStrings;
5561
5561
  /** Strings for TypingIndicator */
@@ -9174,7 +9174,7 @@ export declare type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Conn
9174
9174
  * State only version of {@link @azure/communication-calling#PPTLiveCallFeature}. {@link StatefulCallClient} will
9175
9175
  * automatically listen for pptLive on the call and update the state exposed by {@link StatefulCallClient} accordingly.
9176
9176
  *
9177
- * @beta
9177
+ * @public
9178
9178
  */
9179
9179
  export declare interface PPTLiveCallFeatureState {
9180
9180
  /**
@@ -9287,7 +9287,7 @@ export declare interface RaiseHandCallFeature {
9287
9287
  /**
9288
9288
  * Reaction state with reaction type to render
9289
9289
  *
9290
- * @beta
9290
+ * @public
9291
9291
  */
9292
9292
  export declare type Reaction = {
9293
9293
  /**
@@ -9303,7 +9303,7 @@ export declare type Reaction = {
9303
9303
  /**
9304
9304
  * Props for {@link ReactionButton}.
9305
9305
  *
9306
- * @beta
9306
+ * @public
9307
9307
  */
9308
9308
  export declare interface ReactionButtonProps extends ControlBarButtonProps {
9309
9309
  /**
@@ -9323,7 +9323,7 @@ export declare interface ReactionButtonProps extends ControlBarButtonProps {
9323
9323
  /**
9324
9324
  * Strings of {@link ReactionButton} that can be overridden.
9325
9325
  *
9326
- * @beta
9326
+ * @public
9327
9327
  */
9328
9328
  export declare interface ReactionButtonStrings {
9329
9329
  /** Label of the button. */
@@ -9348,7 +9348,7 @@ export declare interface ReactionButtonStrings {
9348
9348
 
9349
9349
  /**
9350
9350
  * Interface for animation sprite image and related metadata
9351
- * @beta
9351
+ * @public
9352
9352
  */
9353
9353
  export declare interface ReactionResources {
9354
9354
  /**
@@ -9375,7 +9375,7 @@ export declare interface ReactionResources {
9375
9375
 
9376
9376
  /**
9377
9377
  * Type for animation sprite image and related metadata
9378
- * @beta
9378
+ * @public
9379
9379
  */
9380
9380
  export declare type ReactionSprite = {
9381
9381
  /**
@@ -9386,17 +9386,13 @@ export declare type ReactionSprite = {
9386
9386
  * The frame count of the resource reaction in the sprite image
9387
9387
  */
9388
9388
  frameCount: number;
9389
- /**
9390
- * The square size of one frame in the animation resource..
9391
- */
9392
- size?: number;
9393
9389
  };
9394
9390
 
9395
9391
  /**
9396
9392
  * State only version of {@link @azure/communication-calling#Call.ReactionMessage} with UI helper props receivedOn.
9397
9393
  * Reaction state with a timestamp which helps UI to decide to render the reaction accordingly.
9398
9394
  *
9399
- * @beta
9395
+ * @public
9400
9396
  */
9401
9397
  export declare type ReactionState = {
9402
9398
  /**
@@ -9492,14 +9488,14 @@ export declare interface RemoteParticipantState {
9492
9488
  /**
9493
9489
  * Proxy of {@link @azure/communication-calling#Call.PPTLive.target}.
9494
9490
  *
9495
- * @beta
9491
+ * @public
9496
9492
  */
9497
9493
  contentSharingStream?: HTMLElement;
9498
9494
  /**
9499
9495
  * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with
9500
9496
  * UI helper props receivedOn which indicates the timestamp when the message was received.
9501
9497
  *
9502
- * @beta
9498
+ * @public
9503
9499
  */
9504
9500
  reactionState?: ReactionState;
9505
9501
  /**
@@ -10041,7 +10037,7 @@ export declare interface SpokenLanguageStrings {
10041
10037
  /**
10042
10038
  * Spotlight state with order
10043
10039
  *
10044
- * @beta
10040
+ * @public
10045
10041
  */
10046
10042
  export declare type Spotlight = {
10047
10043
  /**
@@ -10053,7 +10049,7 @@ export declare type Spotlight = {
10053
10049
  /**
10054
10050
  * State only version of {@link @azure/communication-calling#SpotlightCallFeature}
10055
10051
  *
10056
- * @beta
10052
+ * @public
10057
10053
  */
10058
10054
  export declare interface SpotlightCallFeatureState {
10059
10055
  /**
@@ -10082,7 +10078,7 @@ export declare type SpotlightChangedListener = (args: {
10082
10078
 
10083
10079
  /**
10084
10080
  * Strings used in prompt related to spotlight
10085
- * @beta
10081
+ * @public
10086
10082
  */
10087
10083
  export declare interface SpotlightPromptStrings {
10088
10084
  /**
@@ -10146,7 +10142,7 @@ export declare interface SpotlightPromptStrings {
10146
10142
  /**
10147
10143
  * Spotlight state with order
10148
10144
  *
10149
- * @beta
10145
+ * @public
10150
10146
  */
10151
10147
  export declare interface SpotlightState {
10152
10148
  /**
@@ -10456,7 +10452,7 @@ export declare interface StreamMediaProps {
10456
10452
  }
10457
10453
 
10458
10454
  /**
10459
- * @beta
10455
+ * @public
10460
10456
  * Corresponding texts to each call issue
10461
10457
  */
10462
10458
  export declare interface SurveyIssues {
@@ -10501,7 +10497,7 @@ export declare interface SurveyIssues {
10501
10497
  }
10502
10498
 
10503
10499
  /**
10504
- * @beta
10500
+ * @public
10505
10501
  * Corresponding texts to each call issue category
10506
10502
  */
10507
10503
  export declare interface SurveyIssuesHeadingStrings {
@@ -11254,7 +11250,6 @@ export declare interface VideoGalleryLocalParticipant extends VideoGalleryPartic
11254
11250
  /**
11255
11251
  * Whether local participant has reacted
11256
11252
  *
11257
- * @beta
11258
11253
  * */
11259
11254
  reaction?: Reaction;
11260
11255
  }
@@ -11404,7 +11399,6 @@ export declare interface VideoGalleryProps {
11404
11399
  localVideoTileSize?: LocalVideoTileSize;
11405
11400
  /**
11406
11401
  * Reaction resources for like, heart, laugh, applause and surprised.
11407
- * @beta
11408
11402
  */
11409
11403
  reactionResources?: ReactionResources;
11410
11404
  }
@@ -11429,7 +11423,7 @@ export declare interface VideoGalleryRemoteParticipant extends VideoGalleryParti
11429
11423
  /**
11430
11424
  * Whether participant has reacted
11431
11425
  *
11432
- * @beta
11426
+ * @public
11433
11427
  * */
11434
11428
  reaction?: Reaction;
11435
11429
  }
@@ -11633,7 +11627,6 @@ export declare interface VideoTileProps {
11633
11627
  renderElement?: JSX.Element | null;
11634
11628
  /**
11635
11629
  * Overlay component responsible for rendering reaction
11636
- * @beta
11637
11630
  */
11638
11631
  overlay?: JSX.Element | null;
11639
11632
  /** Determines if the video is mirrored or not. */
@@ -11710,7 +11703,6 @@ export declare interface VideoTileProps {
11710
11703
  isSpotlighted?: boolean;
11711
11704
  /**
11712
11705
  * Reactions resources' url and metadata.
11713
- * @beta
11714
11706
  */
11715
11707
  reactionResources?: ReactionResources;
11716
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-6MBkcLnx.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-BD4CYGc0.js.map
128
+ //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-CkXr0tIb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-BD4CYGc0.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,M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,MAAM,UAAU,GAAG,MAAkB;QACnC,QACE,oBAACL,WAAK,EAAA,EAAC,SAAS,EAAEL,iBAAW,CAACW,wBAAkB,CAAC,EAAA;YAC/C,KAAC,CAAA,aAAA,CAAAC,2BAAqB,EAAC,EAAA,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAI,CAAA;YACvG,KAAC,CAAA,aAAA,CAAAC,+BAAyB,IACxB,eAAe,EAAE,OAAO,CAAC,sBAAsB,EAC/C,QAAQ,EAAE,OAAO,EACjB,kBAAkB,EAAE,gBAAgB,EACpC,cAAc,EAAE,OAAO,CAAC,OAAO,EAC/B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,aAAa,EAC/B,wBAAwB,EAAEC,gCAA0B,EACpD,0BAA0B,EAAE,IAAI;;AAEhC,gBAAA,yBAAyB,EAAE,yBAAyB,EACpD,CAAA,CACI,EACR;AACJ,KAAC,CAAC;IAEF,MAAM,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,C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