@azure/communication-react 1.18.0-alpha-202407060013 → 1.18.0-alpha-202407100014
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 +110 -4
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DMEk2o-G.js → ChatMessageComponentAsRichTextEditBox-B4-VwPSY.js} +62 -17
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-B4-VwPSY.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-ByJFtf0Z.js → RichTextSendBoxWrapper-C_Nb8f_T.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-ByJFtf0Z.js.map → RichTextSendBoxWrapper-C_Nb8f_T.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-BPO9X27C.js → index-CTMK90l4.js} +418 -111
- package/dist/dist-cjs/communication-react/index-CTMK90l4.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +2 -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/calling-component-bindings/src/notificationStackSelector.js +21 -2
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +42 -4
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +34 -8
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +11 -0
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +3 -0
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/index.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +3 -0
- package/dist/dist-esm/communication-react/src/index.js +2 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +7 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +62 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +1 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ErrorBar.js +2 -2
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.d.ts +64 -0
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js +86 -0
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +18 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +7 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +5 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -4
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +7 -35
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/index.js +2 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +4 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +18 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +17 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +70 -4
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.js +2 -0
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +2 -0
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +16 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +3 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +5 -1
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +10 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +71 -24
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +3 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DMEk2o-G.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-BPO9X27C.js.map +0 -1
@@ -5261,6 +5261,7 @@ export declare type ChatThreadClientState = {
|
|
5261
5261
|
export declare type ChatThreadProperties = {
|
5262
5262
|
topic?: string;
|
5263
5263
|
createdBy?: CommunicationIdentifierKind;
|
5264
|
+
messagingPolicy?: MessagingPolicy;
|
5264
5265
|
};
|
5265
5266
|
|
5266
5267
|
/**
|
@@ -5859,6 +5860,7 @@ export declare interface ComponentStrings {
|
|
5859
5860
|
ParticipantList: ParticipantListStrings;
|
5860
5861
|
/** Strings for the MeetingConferencePhoneInfoModal */
|
5861
5862
|
MeetingConferencePhoneInfo: MeetingConferencePhoneInfoModalStrings;
|
5863
|
+
IncomingCallNotification: IncomingCallNotificationStrings;
|
5862
5864
|
}
|
5863
5865
|
|
5864
5866
|
/**
|
@@ -6724,6 +6726,9 @@ export declare const DEFAULT_COMPONENT_ICONS: {
|
|
6724
6726
|
RichTextTableInsertMenuIcon: React_2.JSX.Element;
|
6725
6727
|
RichTextTableDeleteMenuIcon: React_2.JSX.Element;
|
6726
6728
|
ContextualMenuMicMutedIcon: React_2.JSX.Element;
|
6729
|
+
IncomingCallNotificationRejectIcon: React_2.JSX.Element;
|
6730
|
+
IncomingCallNotificationAcceptIcon: React_2.JSX.Element;
|
6731
|
+
IncomingCallNotificationAcceptWithVideoIcon: React_2.JSX.Element;
|
6727
6732
|
};
|
6728
6733
|
|
6729
6734
|
/**
|
@@ -6898,6 +6903,9 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
|
|
6898
6903
|
RichTextTableInsertMenuIcon: React_2.JSX.Element;
|
6899
6904
|
RichTextTableDeleteMenuIcon: React_2.JSX.Element;
|
6900
6905
|
ContextualMenuMicMutedIcon: React_2.JSX.Element;
|
6906
|
+
IncomingCallNotificationRejectIcon: React_2.JSX.Element;
|
6907
|
+
IncomingCallNotificationAcceptIcon: React_2.JSX.Element;
|
6908
|
+
IncomingCallNotificationAcceptWithVideoIcon: React_2.JSX.Element;
|
6901
6909
|
};
|
6902
6910
|
|
6903
6911
|
/**
|
@@ -7437,6 +7445,10 @@ export declare interface ErrorBarStrings {
|
|
7437
7445
|
* Message shown when poor network quality is detected during a call.
|
7438
7446
|
*/
|
7439
7447
|
callNetworkQualityLow: string;
|
7448
|
+
/**
|
7449
|
+
* Message shown when poor network quality is detected during a call.
|
7450
|
+
*/
|
7451
|
+
teamsMeetingCallNetworkQualityLow: string;
|
7440
7452
|
/**
|
7441
7453
|
* Message shown on failure to detect audio output devices.
|
7442
7454
|
*/
|
@@ -7867,6 +7879,71 @@ export declare type IncomingCallManagement = {
|
|
7867
7879
|
incomingCalls: ReadonlyArray<DeclarativeIncomingCall>;
|
7868
7880
|
};
|
7869
7881
|
|
7882
|
+
/**
|
7883
|
+
* A Notification component that is to be used to represent incoming calls to the end user.
|
7884
|
+
* Allows the user to accept or reject the incoming call.
|
7885
|
+
* @beta
|
7886
|
+
*/
|
7887
|
+
export declare const IncomingCallNotification: (props: IncomingCallNotificationProps) => JSX.Element;
|
7888
|
+
|
7889
|
+
/**
|
7890
|
+
* Properties for the incoming call notification component.
|
7891
|
+
* @beta
|
7892
|
+
*/
|
7893
|
+
export declare type IncomingCallNotificationProps = {
|
7894
|
+
/**
|
7895
|
+
* Caller's Name
|
7896
|
+
*/
|
7897
|
+
callerName?: string;
|
7898
|
+
/**
|
7899
|
+
* Alert Text"
|
7900
|
+
*/
|
7901
|
+
alertText?: string;
|
7902
|
+
/**
|
7903
|
+
* URL to the avatar image for the user
|
7904
|
+
*/
|
7905
|
+
avatar?: string;
|
7906
|
+
/**
|
7907
|
+
* Callback to accept the call with audio
|
7908
|
+
*/
|
7909
|
+
onAcceptWithAudio: () => void;
|
7910
|
+
/**
|
7911
|
+
* Callback to accept the call with Video
|
7912
|
+
*/
|
7913
|
+
onAcceptWithVideo: () => void;
|
7914
|
+
/**
|
7915
|
+
* Callback to reject the call
|
7916
|
+
*/
|
7917
|
+
onReject: () => void;
|
7918
|
+
};
|
7919
|
+
|
7920
|
+
/**
|
7921
|
+
* Strings for the incoming call notification component.
|
7922
|
+
* @beta
|
7923
|
+
*/
|
7924
|
+
export declare type IncomingCallNotificationStrings = {
|
7925
|
+
/**
|
7926
|
+
*Placeholder CallerID for the incoming call notification.
|
7927
|
+
*/
|
7928
|
+
incomingCallNotificationPlaceholderId?: string;
|
7929
|
+
/**
|
7930
|
+
* Placeholder Alert for the incoming call notification.
|
7931
|
+
*/
|
7932
|
+
incomingCallNotificationPlaceholderAlert?: string;
|
7933
|
+
/**
|
7934
|
+
* Aria label for the accept with audio button in the incoming call notification.
|
7935
|
+
*/
|
7936
|
+
incomingCallNoticicationAcceptWithAudioAriaLabel?: string;
|
7937
|
+
/**
|
7938
|
+
* Aria label for the accept with video button in the incoming call notification.
|
7939
|
+
*/
|
7940
|
+
incomingCallNoticicationAcceptWithVideoAriaLabel?: string;
|
7941
|
+
/**
|
7942
|
+
* Aria label for the reject button in the incoming call notification.
|
7943
|
+
*/
|
7944
|
+
incomingCallNoticicationRejectAriaLabel?: string;
|
7945
|
+
};
|
7946
|
+
|
7870
7947
|
/**
|
7871
7948
|
* State only version of {@link @azure/communication-calling#IncomingCall}. {@link StatefulCallClient} will
|
7872
7949
|
* automatically detect incoming calls and add their state to the state exposed by {@link StatefulCallClient}.
|
@@ -8780,6 +8857,10 @@ export declare interface MessageThreadStrings {
|
|
8780
8857
|
blockedWarningLinkText: string;
|
8781
8858
|
/** String for aria text in attachment card group*/
|
8782
8859
|
attachmentCardGroupMessage: string;
|
8860
|
+
/**
|
8861
|
+
* Error message indicating that all attachment uploads are not complete.
|
8862
|
+
*/
|
8863
|
+
attachmentUploadsPendingError: string;
|
8783
8864
|
}
|
8784
8865
|
|
8785
8866
|
/**
|
@@ -8812,6 +8893,17 @@ export declare interface MessageThreadStyles extends BaseCustomStyles {
|
|
8812
8893
|
messageStatusContainer?: (mine: boolean) => IStyle;
|
8813
8894
|
}
|
8814
8895
|
|
8896
|
+
/**
|
8897
|
+
*
|
8898
|
+
* Messaging policy of a chat thread.
|
8899
|
+
*
|
8900
|
+
* @beta
|
8901
|
+
*/
|
8902
|
+
export declare type MessagingPolicy = {
|
8903
|
+
/** Boolean to track whether or not messages are restricted to only text. */
|
8904
|
+
textOnlyChat?: boolean;
|
8905
|
+
};
|
8906
|
+
|
8815
8907
|
/**
|
8816
8908
|
* A button to turn microphone on / off.
|
8817
8909
|
*
|
@@ -9160,6 +9252,11 @@ export declare interface NotificationStackStrings {
|
|
9160
9252
|
* Message shown when poor network quality is detected during a call.
|
9161
9253
|
*/
|
9162
9254
|
callNetworkQualityLow?: NotificationStrings;
|
9255
|
+
/**
|
9256
|
+
* Message shown when poor network quality is detected during a teams meetings.
|
9257
|
+
* Contains actions to open phone info modal.
|
9258
|
+
*/
|
9259
|
+
teamsMeetingCallNetworkQualityLow?: NotificationStrings;
|
9163
9260
|
/**
|
9164
9261
|
* Message shown on failure to detect audio output devices.
|
9165
9262
|
*/
|
@@ -10238,6 +10335,19 @@ export declare interface RichTextEditorOptions {
|
|
10238
10335
|
onPaste?: (event: {
|
10239
10336
|
content: DocumentFragment;
|
10240
10337
|
}) => void;
|
10338
|
+
/**
|
10339
|
+
* Optional callback to upload an inline image in the rich text editor.
|
10340
|
+
*/
|
10341
|
+
onUploadInlineImage?: (imageUrl: string, imageFileName: string) => void;
|
10342
|
+
/**
|
10343
|
+
* Optional callback to remove the attachment upload or delete the image before sending.
|
10344
|
+
*/
|
10345
|
+
onCancelInlineImageUpload?: (imageId: string) => void;
|
10346
|
+
/**
|
10347
|
+
* Optional array of type {@link AttachmentMetadataInProgress}
|
10348
|
+
* to render inline images being uploaded in the RichTextSendBox.
|
10349
|
+
*/
|
10350
|
+
imageUploadsInProgress?: AttachmentMetadataInProgress[];
|
10241
10351
|
}
|
10242
10352
|
|
10243
10353
|
/**
|
@@ -10286,12 +10396,10 @@ export declare interface RichTextSendBoxProps {
|
|
10286
10396
|
/**
|
10287
10397
|
* Optional callback to remove the attachment upload before sending by clicking on
|
10288
10398
|
* cancel icon.
|
10289
|
-
* @beta
|
10290
10399
|
*/
|
10291
10400
|
onCancelAttachmentUpload?: (attachmentId: string) => void;
|
10292
10401
|
/**
|
10293
10402
|
* Optional callback to remove the attachment upload or delete the image before sending.
|
10294
|
-
* @beta
|
10295
10403
|
*/
|
10296
10404
|
onCancelInlineImageUpload?: (imageId: string) => void;
|
10297
10405
|
/**
|
@@ -10304,13 +10412,11 @@ export declare interface RichTextSendBoxProps {
|
|
10304
10412
|
onTyping?: () => Promise<void>;
|
10305
10413
|
/**
|
10306
10414
|
* Optional callback to upload an inline image in the rich text editor.
|
10307
|
-
* @beta
|
10308
10415
|
*/
|
10309
10416
|
onUploadInlineImage?: (imageUrl: string, imageFileName: string) => void;
|
10310
10417
|
/**
|
10311
10418
|
* Optional array of type {@link AttachmentMetadataInProgress}
|
10312
10419
|
* to render inline images being uploaded in the RichTextSendBox.
|
10313
|
-
* @beta
|
10314
10420
|
*/
|
10315
10421
|
imageUploadsInProgress?: AttachmentMetadataInProgress[];
|
10316
10422
|
}
|
@@ -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-CTMK90l4.js');
|
8
8
|
var React = require('react');
|
9
9
|
require('reselect');
|
10
10
|
require('@azure/communication-calling');
|
@@ -43,10 +43,18 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
43
43
|
var _a;
|
44
44
|
const { onCancel, onSubmit, strings, message,
|
45
45
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
46
|
-
onPaste
|
46
|
+
onPaste,
|
47
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
48
|
+
onUploadInlineImage,
|
49
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
50
|
+
imageUploadsInProgress,
|
51
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
52
|
+
onCancelInlineImageUpload } = props;
|
47
53
|
const [textValue, setTextValue] = React.useState(message.content || '');
|
48
54
|
/* @conditional-compile-remove(file-sharing-acs) */
|
49
55
|
const [attachmentMetadata, handleAttachmentAction] = React.useReducer(index.attachmentMetadataReducer, (_a = index.getMessageWithAttachmentMetadata(message)) !== null && _a !== void 0 ? _a : []);
|
56
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
57
|
+
const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = React.useState(undefined);
|
50
58
|
const editTextFieldRef = React.useRef(null);
|
51
59
|
const theme = index.useTheme();
|
52
60
|
const messageState = React.useMemo(() => {
|
@@ -82,32 +90,56 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
82
90
|
const hasMultipleAttachments = React.useMemo(() => {
|
83
91
|
return index.doesMessageContainMultipleAttachments(message);
|
84
92
|
}, [message]);
|
93
|
+
const onSubmitHandler = React.useCallback(() => {
|
94
|
+
if (!submitEnabled) {
|
95
|
+
return;
|
96
|
+
}
|
97
|
+
// Don't send message until all attachments have been uploaded successfully
|
98
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
99
|
+
setAttachmentUploadsPendingError(undefined);
|
100
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
101
|
+
if (index.hasIncompleteAttachmentUploads(imageUploadsInProgress)) {
|
102
|
+
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
103
|
+
return;
|
104
|
+
}
|
105
|
+
let content = textValue;
|
106
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
107
|
+
if (imageUploadsInProgress && index.isAttachmentUploadCompleted(imageUploadsInProgress)) {
|
108
|
+
content = index.insertAttachmentsAndImages(textValue, undefined, imageUploadsInProgress).content;
|
109
|
+
}
|
110
|
+
// it's very important to pass an empty attachment here
|
111
|
+
// so when user removes all attachments, UI can reflect it instantly
|
112
|
+
// if you set it to undefined, the attachments pre-edited would still be there
|
113
|
+
// until edit message event is received
|
114
|
+
onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);
|
115
|
+
}, [
|
116
|
+
submitEnabled,
|
117
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
118
|
+
imageUploadsInProgress,
|
119
|
+
textValue,
|
120
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
121
|
+
strings.attachmentUploadsPendingError,
|
122
|
+
onSubmit,
|
123
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
124
|
+
attachmentMetadata
|
125
|
+
]);
|
85
126
|
const actionButtons = React.useMemo(() => {
|
86
127
|
return (React.createElement(react.Stack, { horizontal: true },
|
87
128
|
React.createElement(index.InputBoxButton, { className: index.richTextActionButtonsStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
|
88
129
|
onCancel && onCancel(message.messageId);
|
89
130
|
}, id: 'dismissIconWrapper', "data-testId": strings.editBoxCancelButton }),
|
90
131
|
React.createElement(index.InputBoxButton, { className: index.richTextActionButtonsStyle, ariaLabel: strings.editBoxSubmitButton, tooltipContent: strings.editBoxSubmitButton, onRenderIcon: onRenderThemedSubmitIcon, onClick: (e) => {
|
91
|
-
|
92
|
-
// so when user removes all attachments, UI can reflect it instantly
|
93
|
-
// if you set it to undefined, the attachments pre-edited would still be there
|
94
|
-
// until edit message event is received
|
95
|
-
submitEnabled &&
|
96
|
-
onSubmit(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata);
|
132
|
+
onSubmitHandler();
|
97
133
|
e.stopPropagation();
|
98
134
|
}, id: 'submitIconWrapper', "data-testId": strings.editBoxSubmitButton })));
|
99
135
|
}, [
|
100
|
-
/* @conditional-compile-remove(file-sharing-acs) */
|
101
|
-
attachmentMetadata,
|
102
136
|
message.messageId,
|
103
137
|
onCancel,
|
104
138
|
onRenderThemedCancelIcon,
|
105
139
|
onRenderThemedSubmitIcon,
|
106
|
-
onSubmit,
|
107
140
|
strings.editBoxCancelButton,
|
108
141
|
strings.editBoxSubmitButton,
|
109
|
-
|
110
|
-
textValue
|
142
|
+
onSubmitHandler
|
111
143
|
]);
|
112
144
|
const richTextLocaleStrings = React.useMemo(() => {
|
113
145
|
/* @conditional-compile-remove(rich-text-editor) */
|
@@ -130,14 +162,27 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
130
162
|
React.createElement(index.FluentV9ThemeProvider, { v8Theme: theme },
|
131
163
|
React.createElement(index._AttachmentUploadCards, { attachments: attachmentMetadata, onCancelAttachmentUpload: onCancelAttachmentUpload }))));
|
132
164
|
}, [attachmentMetadata, onCancelAttachmentUpload, theme]);
|
165
|
+
const onChangeHandler = React.useCallback((content,
|
166
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray) => {
|
167
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
168
|
+
index.cancelInlineImageUpload(imageSrcArray, imageUploadsInProgress, onCancelInlineImageUpload);
|
169
|
+
setText(content);
|
170
|
+
}, [
|
171
|
+
setText,
|
172
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ imageUploadsInProgress,
|
173
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload
|
174
|
+
]);
|
133
175
|
const getContent = () => {
|
134
176
|
return (React.createElement(react.Stack, { className: react.mergeStyles(index.editBoxWidthStyles) },
|
135
|
-
React.createElement(index.RichTextSendBoxErrors, { textTooLongMessage: textTooLongMessage, systemMessage: message.failureReason
|
136
|
-
|
177
|
+
React.createElement(index.RichTextSendBoxErrors, { textTooLongMessage: textTooLongMessage, systemMessage: message.failureReason,
|
178
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachmentUploadsPendingError: attachmentUploadsPendingError }),
|
179
|
+
React.createElement(index.RichTextInputBoxComponent, { placeholderText: strings.editBoxPlaceholderText, onChange: onChangeHandler, editorComponentRef: editTextFieldRef, initialContent: message.content, strings: richTextLocaleStrings, disabled: false, actionComponents: actionButtons, richTextEditorStyleProps: index.editBoxRichTextEditorStyle, isHorizontalLayoutDisabled: true,
|
137
180
|
/* @conditional-compile-remove(file-sharing-acs) */
|
138
181
|
onRenderAttachmentUploads: onRenderAttachmentUploads,
|
139
182
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
140
|
-
onPaste: onPaste
|
183
|
+
onPaste: onPaste,
|
184
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
185
|
+
onUploadInlineImage: onUploadInlineImage })));
|
141
186
|
};
|
142
187
|
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
143
188
|
return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
|
@@ -151,4 +196,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
151
196
|
|
152
197
|
exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
|
153
198
|
exports.default = ChatMessageComponentAsRichTextEditBox;
|
154
|
-
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-
|
199
|
+
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-B4-VwPSY.js.map
|
package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-B4-VwPSY.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ChatMessageComponentAsRichTextEditBox-B4-VwPSY.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 insertAttachmentsAndImages,\n isAttachmentUploadCompleted\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 } from '../../SendBoxErrorBar';\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) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onUploadInlineImage?: (imageUrl: string, imageFileName: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n imageUploadsInProgress?: 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 onUploadInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n imageUploadsInProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload\n } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\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 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(imageUploadsInProgress)) {\n setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (imageUploadsInProgress && isAttachmentUploadCompleted(imageUploadsInProgress)) {\n content = insertAttachmentsAndImages(textValue, undefined, imageUploadsInProgress).content;\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 imageUploadsInProgress,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.attachmentUploadsPendingError,\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(imageSrcArray, imageUploadsInProgress, onCancelInlineImageUpload);\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageUploadsInProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload\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(file-sharing-acs) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={message.content}\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 onUploadInlineImage={onUploadInlineImage}\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.multipleAttachments : 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":["useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","useMemo","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","hasIncompleteAttachmentUploads","isAttachmentUploadCompleted","insertAttachmentsAndImages","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","cancelInlineImageUpload","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAwEA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;AACf,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO;;IAEP,OAAO;;IAEP,mBAAmB;;IAEnB,sBAAsB;;IAEtB,yBAAyB,EAC1B,GAAG,KAAK,CAAC;AAEV,IAAA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAS,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;;AAE1E,IAAA,MAAM,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,GAAGC,gBAAU,CAC7DC,+BAAyB,EACzB,CAAA,EAAA,GAAAC,sCAAgC,CAAC,OAAO,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,EAAE,CAChD,CAAC;;IAGF,MAAM,CAAC,6BAA6B,EAAE,gCAAgC,CAAC,GAAGH,cAAQ,CAChF,SAAS,CACV,CAAC;IACF,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAA6B,IAAI,CAAC,CAAC;AACxE,IAAA,MAAM,KAAK,GAAGI,cAAQ,EAAE,CAAC;AACzB,IAAA,MAAM,YAAY,GAAGC,aAAO,CAAC,MAAK;AAChC,QAAA,OAAOC,qBAAe,CAAC,SAAS,sDAAsD,kBAAkB,KAAlB,IAAA,IA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AA,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-CTMK90l4.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-C_Nb8f_T.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RichTextSendBoxWrapper-
|
1
|
+
{"version":3,"file":"RichTextSendBoxWrapper-C_Nb8f_T.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;;;;"}
|