@azure/communication-react 1.28.0-alpha-202506070019 → 1.28.0-alpha-202506120019
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/README.md +2 -2
- package/dist/communication-react.d.ts +3 -1
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BLQjFCiz.js → ChatMessageComponentAsRichTextEditBox-ngP-K5bA.js} +8 -9
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ngP-K5bA.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DKX9Hw77.js → RichTextSendBoxWrapper-CsGkX3is.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DKX9Hw77.js.map → RichTextSendBoxWrapper-CsGkX3is.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-B1nXGt3n.js → index-rf3tf-XH.js} +185 -93
- package/dist/dist-cjs/communication-react/index-rf3tf-XH.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +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-stateful-client/src/DeviceManagerDeclarative.js +5 -2
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +9 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +7 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +3 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +6 -6
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +12 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +13 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +12 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +30 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -2
- 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/CallWithChatBackedCallAdapter.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +6 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +9 -5
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +31 -17
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +8 -4
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/package.json +4 -4
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BLQjFCiz.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-B1nXGt3n.js.map +0 -1
package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
import React from 'react';
|
4
4
|
import { Icon } from '@fluentui/react';
|
5
5
|
import { isMessageTooLong } from './SendBoxUtils';
|
6
|
+
import { _formatString } from "../../../../acs-ui-common/src";
|
7
|
+
import { MAXIMUM_LENGTH_OF_MESSAGE } from '../utils/SendBoxUtils';
|
6
8
|
/**
|
7
9
|
* @private
|
8
10
|
*/
|
@@ -33,6 +35,16 @@ export function getMessageState(messageText,
|
|
33
35
|
? 'too long'
|
34
36
|
: 'OK';
|
35
37
|
}
|
38
|
+
/**
|
39
|
+
* @private
|
40
|
+
*/
|
41
|
+
export const getTextValidationErrorMessage = (messageState, tooLongString, tooShortString, imageOverflow = false) => {
|
42
|
+
return messageState === 'too long' || imageOverflow
|
43
|
+
? _formatString(tooLongString, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })
|
44
|
+
: messageState === 'too short'
|
45
|
+
? tooShortString
|
46
|
+
: undefined;
|
47
|
+
};
|
36
48
|
/* @conditional-compile-remove(file-sharing-acs) */
|
37
49
|
/**
|
38
50
|
* @private
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponentAsEditBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"ChatMessageComponentAsEditBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,sCAAgC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAOF,SAAS,cAAc,CACrB,WAAmB;AACnB,mDAAmD;AACnD,kBAAyC;IAEzC,mDAAmD;IACnD,OAAO,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB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DAAmD;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,OAAoB,EAAW,EAAE;;IACrF,MAAM,MAAM,GAAG,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,CAAC;IAChD,OAAO,MAAM,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon } from '@fluentui/react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { isMessageTooLong } from './SendBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { ChatMessage } from '../../types';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../utils/SendBoxUtils';\n\n/**\n * @private\n */\nexport const onRenderCancelIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxCancel'} className={className} />;\n};\n\n/**\n * @private\n */\nexport const onRenderSubmitIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxSubmit'} className={className} />;\n};\n\n/**\n * Enumeration for whether a message can be sent\n */\nexport type MessageState = 'OK' | 'too short' | 'too long';\n\nfunction isMessageEmpty(\n messageText: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n): boolean {\n /* @conditional-compile-remove(file-sharing-acs) */\n return messageText.trim().length === 0 && attachmentMetadata?.length === 0;\n return messageText.trim().length === 0;\n}\n\n/**\n * @private\n */\nexport function getMessageState(\n messageText: string,\n /* @conditional-compile-remove(file-sharing-acs) */ attachments: AttachmentMetadata[]\n): MessageState {\n return isMessageEmpty(messageText, /* @conditional-compile-remove(file-sharing-acs) */ attachments)\n ? 'too short'\n : isMessageTooLong(messageText.length)\n ? 'too long'\n : 'OK';\n}\n\n/**\n * @private\n */\nexport const getTextValidationErrorMessage = (\n messageState: string, tooLongString: string, tooShortString: string, imageOverflow: boolean = false\n): string | undefined => {\n return messageState === 'too long' || imageOverflow\n ? _formatString(tooLongString, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : messageState === 'too short'\n ? tooShortString\n : undefined;\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n * @TODO: Remove when file-sharing feature becomes stable.\n */\nexport function getMessageWithAttachmentMetadata(message: ChatMessage): AttachmentMetadata[] | undefined {\n return message.attachments;\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\ninterface Action {\n type: string;\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * Currently `Actions` only have one action which is to remove.\n * But in the future, we may have more actions like `add`, `update`, etc.\n * And this action would be a uinon of all those actions.\n * i.e. `type Actions = RemoveAction | AddAction | UpdateAction;`\n * @private\n */\ntype Actions = RemoveAction;\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\ninterface RemoveAction extends Action {\n type: 'remove';\n id: string;\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const attachmentMetadataReducer = (state: AttachmentMetadata[], action: Actions): AttachmentMetadata[] => {\n switch (action.type) {\n case 'remove':\n return state.filter((v) => v.id !== action.id);\n default:\n return state;\n }\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const doesMessageContainMultipleAttachments = (message: ChatMessage): boolean => {\n const length = message.attachments?.length ?? 0;\n return length > 1;\n};\n"]}
|
@@ -330,6 +330,7 @@
|
|
330
330
|
"messageContentAriaText": "{status} {author} said {message}",
|
331
331
|
"messageContentMineAriaText": "{status} You said {message}",
|
332
332
|
"editBoxTextLimit": "Your message is over the limit of {limitNumber} characters",
|
333
|
+
"editBoxEmptyWarningText": "Please type a message to continue",
|
333
334
|
"editBoxPlaceholderText": "Edit your message",
|
334
335
|
"newMessagesIndicator": "New messages",
|
335
336
|
"noDisplayNameSub": "No name",
|
@@ -1139,7 +1139,7 @@ export class AzureCommunicationCallAdapter {
|
|
1139
1139
|
});
|
1140
1140
|
removed.forEach((participant) => {
|
1141
1141
|
const subscriber = this.participantSubscribers.get(toFlatCommunicationIdentifier(participant.identifier));
|
1142
|
-
subscriber
|
1142
|
+
subscriber === null || subscriber === void 0 ? void 0 : subscriber.unsubscribeAll();
|
1143
1143
|
this.participantSubscribers.delete(toFlatCommunicationIdentifier(participant.identifier));
|
1144
1144
|
});
|
1145
1145
|
}
|
@@ -1247,7 +1247,9 @@ export class AzureCommunicationCallAdapter {
|
|
1247
1247
|
}
|
1248
1248
|
callIdChanged() {
|
1249
1249
|
var _a;
|
1250
|
-
((_a = this.call) === null || _a === void 0 ? void 0 : _a.id)
|
1250
|
+
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.id) {
|
1251
|
+
this.emitter.emit('callIdChanged', { callId: this.call.id });
|
1252
|
+
}
|
1251
1253
|
}
|
1252
1254
|
resetDiagnosticsForwarder(newCall) {
|
1253
1255
|
if (this.diagnosticsForwarder) {
|