@azure/communication-react 1.19.0-alpha-202407270014 → 1.19.0-alpha-202407310012
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.
- package/dist/communication-react.d.ts +68 -5
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BueeC-ud.js → ChatMessageComponentAsRichTextEditBox-CsHqT8dY.js} +7 -5
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BueeC-ud.js.map → ChatMessageComponentAsRichTextEditBox-CsHqT8dY.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-Br441vhG.js → RichTextSendBoxWrapper-TGDmjXvl.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-Br441vhG.js.map → RichTextSendBoxWrapper-TGDmjXvl.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-DznlW8XT.js → index-BBPqvw4B.js} +698 -550
- package/dist/dist-cjs/communication-react/index-BBPqvw4B.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +3 -1
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.d.ts +2 -2
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +3 -10
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.d.ts +18 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +43 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.d.ts +18 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +43 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/index.d.ts +4 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/index.js +2 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.d.ts +2 -2
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +3 -10
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/utils.d.ts +7 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/utils.js +17 -0
- package/dist/dist-esm/acs-ui-javascript-loaders/src/utils.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.d.ts +18 -0
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +36 -0
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +14 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +3 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +18 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +5 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +3 -0
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +3 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +13 -3
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +12 -2
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +14 -4
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +14 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +11 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +5 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +3 -3
- package/dist/dist-cjs/communication-react/index-DznlW8XT.js.map +0 -1
@@ -23,6 +23,9 @@ import { BackgroundBlurConfig } from '@azure/communication-calling';
|
|
23
23
|
import { BackgroundBlurEffect } from '@azure/communication-calling';
|
24
24
|
import { BackgroundReplacementConfig } from '@azure/communication-calling';
|
25
25
|
import { BackgroundReplacementEffect } from '@azure/communication-calling';
|
26
|
+
import { BreakoutRoom } from '@azure/communication-calling';
|
27
|
+
import { BreakoutRoomsSettings } from '@azure/communication-calling';
|
28
|
+
import { BreakoutRoomsUpdatedListener } from '@azure/communication-calling';
|
26
29
|
import { Call } from '@azure/communication-calling';
|
27
30
|
import { CallAgent } from '@azure/communication-calling';
|
28
31
|
import { CallClient } from '@azure/communication-calling';
|
@@ -704,6 +707,16 @@ export declare interface BlockedMessage extends MessageCommon {
|
|
704
707
|
mine?: boolean;
|
705
708
|
}
|
706
709
|
|
710
|
+
/**
|
711
|
+
* Breakout rooms state
|
712
|
+
*
|
713
|
+
* @public
|
714
|
+
*/
|
715
|
+
export declare interface BreakoutRoomsState {
|
716
|
+
assignedBreakoutRoom?: BreakoutRoom;
|
717
|
+
breakoutRoomSettings?: BreakoutRoomsSettings;
|
718
|
+
}
|
719
|
+
|
707
720
|
/**
|
708
721
|
* @beta
|
709
722
|
* Props for BrowserPermissionDeniedIOS component.
|
@@ -1439,6 +1452,10 @@ export declare interface CallAdapterSubscribers {
|
|
1439
1452
|
* Subscribe function for 'mutedByOthers' event.
|
1440
1453
|
*/
|
1441
1454
|
on(event: 'mutedByOthers', listener: PropertyChangedEvent): void;
|
1455
|
+
/**
|
1456
|
+
* Subscribe function for 'breakoutRoomsUpdated' event.
|
1457
|
+
*/
|
1458
|
+
on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
|
1442
1459
|
/**
|
1443
1460
|
* Unsubscribe function for 'participantsJoined' event.
|
1444
1461
|
*/
|
@@ -1523,6 +1540,10 @@ export declare interface CallAdapterSubscribers {
|
|
1523
1540
|
* Unsubscribe function for 'mutedByOthers' event.
|
1524
1541
|
*/
|
1525
1542
|
off(event: 'mutedByOthers', listener: PropertyChangedEvent): void;
|
1543
|
+
/**
|
1544
|
+
* Unsubscribe function for 'breakoutRoomsUpdated' event.
|
1545
|
+
*/
|
1546
|
+
off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
|
1526
1547
|
}
|
1527
1548
|
|
1528
1549
|
/**
|
@@ -1777,7 +1798,7 @@ export declare type CallCompositeIcons = {
|
|
1777
1798
|
|
1778
1799
|
/**
|
1779
1800
|
* Props for the OutboundCallComposite that you can use in your application.
|
1780
|
-
* @
|
1801
|
+
* @beta
|
1781
1802
|
*/
|
1782
1803
|
export declare type CallCompositeLoaderProps = {
|
1783
1804
|
userId: string;
|
@@ -3240,6 +3261,10 @@ export declare interface CallState {
|
|
3240
3261
|
meetingConference?: {
|
3241
3262
|
conferencePhones: ConferencePhoneInfo[];
|
3242
3263
|
};
|
3264
|
+
/**
|
3265
|
+
* Proxy of {@link @azure/communication-calling#BreakoutRoomsFeature}.
|
3266
|
+
*/
|
3267
|
+
breakoutRooms?: BreakoutRoomsState;
|
3243
3268
|
}
|
3244
3269
|
|
3245
3270
|
/**
|
@@ -3708,6 +3733,7 @@ export declare interface CallWithChatAdapterSubscriptions {
|
|
3708
3733
|
on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
|
3709
3734
|
on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
|
3710
3735
|
on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;
|
3736
|
+
on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
|
3711
3737
|
off(event: 'callEnded', listener: CallEndedListener): void;
|
3712
3738
|
off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;
|
3713
3739
|
off(event: 'callIdChanged', listener: CallIdChangedListener): void;
|
@@ -3725,6 +3751,7 @@ export declare interface CallWithChatAdapterSubscriptions {
|
|
3725
3751
|
off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
|
3726
3752
|
off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
|
3727
3753
|
off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;
|
3754
|
+
off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
|
3728
3755
|
on(event: 'messageReceived', listener: MessageReceivedListener): void;
|
3729
3756
|
on(event: 'messageEdited', listener: MessageEditedListener): void;
|
3730
3757
|
on(event: 'messageDeleted', listener: MessageDeletedListener): void;
|
@@ -3903,6 +3930,18 @@ export declare type CallWithChatCompositeIcons = {
|
|
3903
3930
|
StopAllSpotlightMenuButton?: JSX.Element;
|
3904
3931
|
};
|
3905
3932
|
|
3933
|
+
/**
|
3934
|
+
* Props for the CallWithChatComposite that you can use in your application.
|
3935
|
+
* @beta
|
3936
|
+
*/
|
3937
|
+
export declare type CallWithChatCompositeLoaderProps = {
|
3938
|
+
userId: string;
|
3939
|
+
token: string;
|
3940
|
+
displayName: string;
|
3941
|
+
endpoint: string;
|
3942
|
+
locator: CallAndChatLocator;
|
3943
|
+
};
|
3944
|
+
|
3906
3945
|
/**
|
3907
3946
|
* Optional features of the {@link CallWithChatComposite}.
|
3908
3947
|
*
|
@@ -4312,7 +4351,7 @@ export declare interface CallWithChatControlOptions extends CommonCallControlOpt
|
|
4312
4351
|
*
|
4313
4352
|
* @public
|
4314
4353
|
*/
|
4315
|
-
export declare type CallWithChatEvent = 'callError' | 'chatError' | 'callEnded' | 'isMutedChanged' | 'callIdChanged' | 'isLocalScreenSharingActiveChanged' | 'displayNameChanged' | 'isSpeakingChanged' | 'callParticipantsJoined' | 'callParticipantsLeft' | 'selectedMicrophoneChanged' | 'selectedSpeakerChanged' | 'isCaptionsActiveChanged' | 'captionsReceived' | 'isCaptionLanguageChanged' | 'isSpokenLanguageChanged' | 'capabilitiesChanged' | 'spotlightChanged' | 'messageReceived' | 'messageEdited' | 'messageDeleted' | 'messageSent' | 'messageRead' | 'chatParticipantsAdded' | 'chatParticipantsRemoved' | 'chatInitialized';
|
4354
|
+
export declare type CallWithChatEvent = 'callError' | 'chatError' | 'callEnded' | 'isMutedChanged' | 'callIdChanged' | 'isLocalScreenSharingActiveChanged' | 'displayNameChanged' | 'isSpeakingChanged' | 'callParticipantsJoined' | 'callParticipantsLeft' | 'selectedMicrophoneChanged' | 'selectedSpeakerChanged' | 'isCaptionsActiveChanged' | 'captionsReceived' | 'isCaptionLanguageChanged' | 'isSpokenLanguageChanged' | 'capabilitiesChanged' | 'spotlightChanged' | /* @conditional-compile-remove(breakout-rooms) */ 'breakoutRoomsUpdated' | 'messageReceived' | 'messageEdited' | 'messageDeleted' | 'messageSent' | 'messageRead' | 'chatParticipantsAdded' | 'chatParticipantsRemoved' | 'chatInitialized';
|
4316
4355
|
|
4317
4356
|
/**
|
4318
4357
|
* @beta
|
@@ -5021,6 +5060,18 @@ export declare type ChatCompositeIcons = {
|
|
5021
5060
|
SendBoxAttachFile?: JSX.Element;
|
5022
5061
|
};
|
5023
5062
|
|
5063
|
+
/**
|
5064
|
+
* Props for the ChatComposite that you can use in your application.
|
5065
|
+
* @beta
|
5066
|
+
*/
|
5067
|
+
export declare type ChatCompositeLoaderProps = {
|
5068
|
+
userId: string;
|
5069
|
+
token: string;
|
5070
|
+
displayName?: string;
|
5071
|
+
endpoint: string;
|
5072
|
+
threadId: string;
|
5073
|
+
};
|
5074
|
+
|
5024
5075
|
/**
|
5025
5076
|
* Optional features of the {@link ChatComposite}.
|
5026
5077
|
*
|
@@ -8312,10 +8363,22 @@ export declare const lightTheme: PartialTheme & CallingTheme;
|
|
8312
8363
|
/**
|
8313
8364
|
* Loader function for the OutboundCallComposite that you can use in your application.
|
8314
8365
|
*
|
8315
|
-
* @
|
8366
|
+
* @beta
|
8316
8367
|
*/
|
8317
8368
|
export declare const loadCallComposite: (adapterArgs: CallCompositeLoaderProps, htmlElement: HTMLElement | null, props?: CallCompositeOptions) => Promise<CallAdapter | undefined>;
|
8318
8369
|
|
8370
|
+
/**
|
8371
|
+
* Props for the CallWithChatComposite that you can use in your application.
|
8372
|
+
* @beta
|
8373
|
+
*/
|
8374
|
+
export declare const loadCallWithChatComposite: (args: CallWithChatCompositeLoaderProps, htmlElement: HTMLElement | null, props: CallWithChatCompositeOptions) => Promise<CallWithChatAdapter | undefined>;
|
8375
|
+
|
8376
|
+
/**
|
8377
|
+
* Loader function for the ChatComposite that you can use in your application.
|
8378
|
+
* @beta
|
8379
|
+
*/
|
8380
|
+
export declare const loadChatComposite: (args: ChatCompositeLoaderProps, htmlElement: HTMLElement | null, props: ChatCompositeOptions) => Promise<ChatAdapter | undefined>;
|
8381
|
+
|
8319
8382
|
/**
|
8320
8383
|
* Whether the stream is loading or not.
|
8321
8384
|
* @public
|
@@ -8325,7 +8388,7 @@ export declare type LoadingState = 'loading' | 'none';
|
|
8325
8388
|
/**
|
8326
8389
|
* Loader function for the OutboundCallComposite that you can use in your application.
|
8327
8390
|
*
|
8328
|
-
* @
|
8391
|
+
* @beta
|
8329
8392
|
*/
|
8330
8393
|
export declare const loadOutboundCallComposite: (adapterArgs: OutboundCallCompositeLoaderProps, htmlElement: HTMLElement | null, props?: CallCompositeOptions) => Promise<CallAdapter | undefined>;
|
8331
8394
|
|
@@ -9713,7 +9776,7 @@ export declare interface OptionsDevice {
|
|
9713
9776
|
|
9714
9777
|
/**
|
9715
9778
|
* Props for the OutboundCallComposite that you can use in your application.
|
9716
|
-
* @
|
9779
|
+
* @beta
|
9717
9780
|
*/
|
9718
9781
|
export declare type OutboundCallCompositeLoaderProps = {
|
9719
9782
|
userId: string;
|
@@ -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-
|
7
|
+
var index = require('./index-BBPqvw4B.js');
|
8
8
|
var React = require('react');
|
9
9
|
require('react-dom/client');
|
10
10
|
require('@azure/communication-chat');
|
@@ -236,9 +236,11 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
236
236
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
237
237
|
onPaste: onPaste,
|
238
238
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
239
|
-
onInsertInlineImage:
|
240
|
-
|
241
|
-
|
239
|
+
onInsertInlineImage: onInsertInlineImage
|
240
|
+
? (imageUrl, imageFileName) => {
|
241
|
+
onInsertInlineImage(imageUrl, imageFileName, message.messageId);
|
242
|
+
}
|
243
|
+
: undefined })));
|
242
244
|
};
|
243
245
|
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
244
246
|
return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
|
@@ -252,4 +254,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
252
254
|
|
253
255
|
exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
|
254
256
|
exports.default = ChatMessageComponentAsRichTextEditBox;
|
255
|
-
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-
|
257
|
+
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-CsHqT8dY.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponentAsRichTextEditBox-BueeC-ud.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';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } 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 '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n hasIncompleteAttachmentUploads,\n insertImagesToContentString,\n isAttachmentUploadCompleted,\n removeBrokenImageContentAndClearImageSizeStyles\n} from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} 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(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste?: (event: { content: DocumentFragment }) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload\n } = props;\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImages?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImages]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [messageState, strings.editBoxTextLimit]);\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 /* @conditional-compile-remove(file-sharing-acs) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImages)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (isAttachmentUploadCompleted(inlineImages)) {\n insertImagesToContentString(textValue, inlineImages, (content) => {\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n return;\n }\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\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 data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray?: Array<string>\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n cancelInlineImageUpload({\n imageSrcArray,\n inlineImages,\n messageId: message.messageId,\n editBoxOnCancelInlineImageUpload: onCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload: undefined\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste={onPaste}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={(imageUrl: string, imageFileName: string) => {\n onInsertInlineImage && onInsertInlineImage(imageUrl, imageFileName, message.messageId);\n }}\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: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined\n )\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\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useMemo","BROKEN_IMAGE_SVG_DATA","useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","isAttachmentUploadCompleted","insertImagesToContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","cancelInlineImageUpload","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA2EA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;AACf,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO;;IAEP,OAAO;;IAEP,mBAAmB;;IAEnB,YAAY;;IAEZ,yBAAyB,EAC1B,GAAG,KAAK,CAAC;AAEV,IAAA,MAAM,cAAc,GAAGA,aAAO,CAAC,MAAK;;AAElC,QAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;AAEhC,QAAA,MAAM,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,OAAO,KAAP,IAAA,IAAA,OAAO,cAAP,OAAO,GAAI,EAAE,EAAE,WAAW,CAAC,CAAC;;;;;;QAM7E,QAAQ,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,KAAI;;YACzE,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACnD,YAAA,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;AAC1C,YAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;gBAClC,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;aAC5D;AAED,YAAA,YAAY,CAAC,GAAG,GAAGC,2B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BAAqB,EAC9B,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,aAAa,EAC/B,wBAAwB,EAAEC,gCAA0B,EACpD,0BAA0B,EAAE,IAAI;;AAEhC,gBAAA,yBAAyB,EAAE,yBAAyB;;AAEpD,gBAAA,OAAO,EAAE,OAAO;;AAEhB,gBAAA,mBAAmB,EAAE,CAAC,QAAgB,EAAE,aAAqB,KAAI;oBAC/D,mBAAmB,IAAI,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;iBACxF,EAAA,CACD,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;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,4BAA4B,GAAG,SAAS,CACtF;AACF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,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-CsHqT8dY.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';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } 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 '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n hasIncompleteAttachmentUploads,\n insertImagesToContentString,\n isAttachmentUploadCompleted,\n removeBrokenImageContentAndClearImageSizeStyles\n} from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} 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(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste?: (event: { content: DocumentFragment }) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload\n } = props;\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImages?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImages]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [messageState, strings.editBoxTextLimit]);\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 /* @conditional-compile-remove(file-sharing-acs) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImages)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (isAttachmentUploadCompleted(inlineImages)) {\n insertImagesToContentString(textValue, inlineImages, (content) => {\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n return;\n }\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\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 data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray?: Array<string>\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n cancelInlineImageUpload({\n imageSrcArray,\n inlineImages,\n messageId: message.messageId,\n editBoxOnCancelInlineImageUpload: onCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload: undefined\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste={onPaste}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={\n onInsertInlineImage\n ? (imageUrl: string, imageFileName: string) => {\n onInsertInlineImage(imageUrl, imageFileName, message.messageId);\n }\n : undefined\n }\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: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined\n )\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\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useMemo","BROKEN_IMAGE_SVG_DATA","useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","isAttachmentUploadCompleted","insertImagesToContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","cancelInlineImageUpload","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA2EA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;AACf,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,E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QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,4BAA4B,GAAG,SAAS,CACtF;AACF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,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,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
var React = require('react');
|
4
|
-
var index = require('./index-
|
4
|
+
var index = require('./index-BBPqvw4B.js');
|
5
5
|
require('@fluentui/react');
|
6
6
|
require('@fluentui/react-components');
|
7
7
|
require('@fluentui-contrib/react-chat');
|
@@ -50,4 +50,4 @@ const RichTextSendBoxWrapper = (props) => {
|
|
50
50
|
};
|
51
51
|
|
52
52
|
exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
|
53
|
-
//# sourceMappingURL=RichTextSendBoxWrapper-
|
53
|
+
//# sourceMappingURL=RichTextSendBoxWrapper-TGDmjXvl.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RichTextSendBoxWrapper-
|
1
|
+
{"version":3,"file":"RichTextSendBoxWrapper-TGDmjXvl.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC,CAAC;AAE1D,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI,CAAC;AAClE;;;;"}
|