@azure/communication-react 1.13.0-alpha-202402020012 → 1.13.0-alpha-202402040013
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 +14 -3
- package/dist/dist-cjs/communication-react/index.js +83 -35
- 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/participantListSelector.js +4 -0
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +5 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +15 -4
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.d.ts +4 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js +2 -2
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.d.ts +5 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js +85 -24
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBoxErrors.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBoxErrors.js +52 -8
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.d.ts +10 -2
- package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js +12 -3
- package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +4 -21
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +22 -0
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +4 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/package.json +1 -1
@@ -3322,7 +3322,10 @@ export declare interface CallWithChatClientState {
|
|
3322
3322
|
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
|
3323
3323
|
/** Hide attendee names in teams meeting */
|
3324
3324
|
hideAttendeeNames?: boolean;
|
3325
|
-
/**
|
3325
|
+
/**
|
3326
|
+
* Reaction resources to render in meetings
|
3327
|
+
* @beta
|
3328
|
+
* */
|
3326
3329
|
reactions?: ReactionResources;
|
3327
3330
|
}
|
3328
3331
|
|
@@ -5295,7 +5298,10 @@ export declare interface ComponentStrings {
|
|
5295
5298
|
screenShareButton: ScreenShareButtonStrings;
|
5296
5299
|
/** Strings for RaiseHandButton */
|
5297
5300
|
raiseHandButton: RaiseHandButtonStrings;
|
5298
|
-
/**
|
5301
|
+
/**
|
5302
|
+
* Strings for ReactionButton
|
5303
|
+
* @beta
|
5304
|
+
* */
|
5299
5305
|
reactionButton: ReactionButtonStrings;
|
5300
5306
|
/** Strings for TypingIndicator */
|
5301
5307
|
typingIndicator: TypingIndicatorStrings;
|
@@ -10957,6 +10963,7 @@ export declare interface VideoGalleryProps {
|
|
10957
10963
|
localVideoTileSize?: LocalVideoTileSize;
|
10958
10964
|
/**
|
10959
10965
|
* Reaction resources for like, heart, laugh, applause and surprised.
|
10966
|
+
* @beta
|
10960
10967
|
*/
|
10961
10968
|
reactionResources?: ReactionResources;
|
10962
10969
|
}
|
@@ -11230,7 +11237,10 @@ export declare interface VideoTileProps {
|
|
11230
11237
|
isSpeaking?: boolean;
|
11231
11238
|
/** Whether the participant is raised hand. Show a indicator (border) and icon with order */
|
11232
11239
|
raisedHand?: RaisedHand;
|
11233
|
-
/**
|
11240
|
+
/**
|
11241
|
+
* When the participant has reacted, animate the reaction.
|
11242
|
+
* @beta
|
11243
|
+
* */
|
11234
11244
|
reaction?: Reaction;
|
11235
11245
|
/**
|
11236
11246
|
* The call connection state of the participant.
|
@@ -11254,6 +11264,7 @@ export declare interface VideoTileProps {
|
|
11254
11264
|
isSpotlighted?: boolean;
|
11255
11265
|
/**
|
11256
11266
|
* Reactions resources' url and metadata.
|
11267
|
+
* @beta
|
11257
11268
|
*/
|
11258
11269
|
reactionResources?: ReactionResources;
|
11259
11270
|
}
|
@@ -14,9 +14,9 @@ var textareaCaretTs = require('textarea-caret-ts');
|
|
14
14
|
var reactComponents = require('@fluentui/react-components');
|
15
15
|
var useDebounce = require('use-debounce');
|
16
16
|
var reactFileTypeIcons = require('@fluentui/react-file-type-icons');
|
17
|
-
require('roosterjs-editor-plugins');
|
18
|
-
require('roosterjs-editor-core');
|
19
|
-
require('roosterjs-react');
|
17
|
+
var roosterjsEditorPlugins = require('roosterjs-editor-plugins');
|
18
|
+
var roosterjsEditorCore = require('roosterjs-editor-core');
|
19
|
+
var roosterjsReact = require('roosterjs-react');
|
20
20
|
var uuid = require('uuid');
|
21
21
|
var reactChat = require('@fluentui-contrib/react-chat');
|
22
22
|
var react$1 = require('@griffel/react');
|
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
|
|
173
173
|
// Copyright (c) Microsoft Corporation.
|
174
174
|
// Licensed under the MIT License.
|
175
175
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
176
|
-
var telemetryVersion = '1.13.0-alpha-
|
176
|
+
var telemetryVersion = '1.13.0-alpha-202402040013';
|
177
177
|
|
178
178
|
|
179
179
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -8378,7 +8378,7 @@ const SendBoxErrorBar = (props) => {
|
|
8378
8378
|
if (errorMessage) {
|
8379
8379
|
return (React.createElement(React.Fragment, null,
|
8380
8380
|
React.createElement(Announcer$1, { announcementString: errorMessage, ariaLive: 'polite' }),
|
8381
|
-
React.createElement(react.MessageBar, { messageBarType: react.MessageBarType.warning, styles: {
|
8381
|
+
React.createElement(react.MessageBar, { "data-test-id": 'send-box-message-bar', messageBarType: react.MessageBarType.warning, styles: {
|
8382
8382
|
iconContainer: {
|
8383
8383
|
display: 'none'
|
8384
8384
|
}
|
@@ -8576,6 +8576,11 @@ const _FileUploadCards = (props) => {
|
|
8576
8576
|
|
8577
8577
|
// Copyright (c) Microsoft Corporation.
|
8578
8578
|
// Licensed under the MIT License.
|
8579
|
+
/**
|
8580
|
+
* @private
|
8581
|
+
*/
|
8582
|
+
const MAXIMUM_LENGTH_OF_MESSAGE$1 = 8000;
|
8583
|
+
const EMPTY_MESSAGE_REGEX = /^\s*$/;
|
8579
8584
|
/* @conditional-compile-remove(file-sharing) */
|
8580
8585
|
/**
|
8581
8586
|
* @private
|
@@ -8591,11 +8596,26 @@ const hasIncompleteFileUploads = (activeFileUploads) => {
|
|
8591
8596
|
const hasCompletedFileUploads = (activeFileUploads) => {
|
8592
8597
|
return !!(activeFileUploads === null || activeFileUploads === void 0 ? void 0 : activeFileUploads.find((file) => !file.error));
|
8593
8598
|
};
|
8599
|
+
/**
|
8600
|
+
* @private
|
8601
|
+
*/
|
8602
|
+
const exceedsMaxAllowedLength = (valueLength) => {
|
8603
|
+
return valueLength > MAXIMUM_LENGTH_OF_MESSAGE$1;
|
8604
|
+
};
|
8605
|
+
/**
|
8606
|
+
* @private
|
8607
|
+
*/
|
8608
|
+
const sanitizeText = (message) => {
|
8609
|
+
if (EMPTY_MESSAGE_REGEX.test(message)) {
|
8610
|
+
return '';
|
8611
|
+
}
|
8612
|
+
else {
|
8613
|
+
return message;
|
8614
|
+
}
|
8615
|
+
};
|
8594
8616
|
|
8595
8617
|
// Copyright (c) Microsoft Corporation.
|
8596
8618
|
// Licensed under the MIT License.
|
8597
|
-
const MAXIMUM_LENGTH_OF_MESSAGE$1 = 8000;
|
8598
|
-
const EMPTY_MESSAGE_REGEX = /^\s*$/;
|
8599
8619
|
/**
|
8600
8620
|
* Component for typing and sending messages.
|
8601
8621
|
*
|
@@ -8636,9 +8656,9 @@ const SendBox = (props) => {
|
|
8636
8656
|
const message = textValue;
|
8637
8657
|
// we don't want to send empty messages including spaces, newlines, tabs
|
8638
8658
|
// Message can be empty if there is a valid file upload
|
8639
|
-
if (
|
8659
|
+
if (sanitizeText(message).length > 0 ||
|
8640
8660
|
/* @conditional-compile-remove(file-sharing) */ hasCompletedFileUploads(activeFileUploads)) {
|
8641
|
-
onSendMessage && onSendMessage(
|
8661
|
+
onSendMessage && onSendMessage(message);
|
8642
8662
|
setTextValue('');
|
8643
8663
|
}
|
8644
8664
|
(_a = sendTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
@@ -8647,12 +8667,7 @@ const SendBox = (props) => {
|
|
8647
8667
|
if (newValue === undefined) {
|
8648
8668
|
return;
|
8649
8669
|
}
|
8650
|
-
|
8651
|
-
setTextValueOverflow(true);
|
8652
|
-
}
|
8653
|
-
else {
|
8654
|
-
setTextValueOverflow(false);
|
8655
|
-
}
|
8670
|
+
setTextValueOverflow(exceedsMaxAllowedLength(newValue.length));
|
8656
8671
|
setTextValue(newValue);
|
8657
8672
|
};
|
8658
8673
|
const textTooLongMessage = textValueOverflow ? strings.textTooLong : undefined;
|
@@ -8728,17 +8743,6 @@ const SendBox = (props) => {
|
|
8728
8743
|
/* @conditional-compile-remove(file-sharing) */
|
8729
8744
|
onRenderFileUploads())));
|
8730
8745
|
};
|
8731
|
-
/**
|
8732
|
-
* @private
|
8733
|
-
*/
|
8734
|
-
const sanitizeText = (message) => {
|
8735
|
-
if (EMPTY_MESSAGE_REGEX.test(message)) {
|
8736
|
-
return '';
|
8737
|
-
}
|
8738
|
-
else {
|
8739
|
-
return message;
|
8740
|
-
}
|
8741
|
-
};
|
8742
8746
|
|
8743
8747
|
// Copyright (c) Microsoft Corporation.
|
8744
8748
|
// Licensed under the MIT License.
|
@@ -8991,7 +8995,7 @@ const ImageGallery = (props) => {
|
|
8991
8995
|
/**
|
8992
8996
|
* @private
|
8993
8997
|
*/
|
8994
|
-
react.mergeStyles({
|
8998
|
+
const richTextEditorStyle = react.mergeStyles({
|
8995
8999
|
border: 'none',
|
8996
9000
|
overflow: 'auto',
|
8997
9001
|
padding: '10px',
|
@@ -9001,6 +9005,50 @@ react.mergeStyles({
|
|
9001
9005
|
maxHeight: '8.25rem'
|
9002
9006
|
});
|
9003
9007
|
|
9008
|
+
// Copyright (c) Microsoft Corporation.
|
9009
|
+
// Licensed under the MIT License.
|
9010
|
+
/**
|
9011
|
+
* A component to wrap RoosterJS Rich Text Editor.
|
9012
|
+
*
|
9013
|
+
* @beta
|
9014
|
+
*/
|
9015
|
+
React.forwardRef((props, ref) => {
|
9016
|
+
const { content, onChange, placeholderText } = props;
|
9017
|
+
const editor = React.useRef(null);
|
9018
|
+
React.useImperativeHandle(ref, () => {
|
9019
|
+
return {
|
9020
|
+
focus() {
|
9021
|
+
if (editor.current) {
|
9022
|
+
editor.current.focus();
|
9023
|
+
}
|
9024
|
+
}
|
9025
|
+
};
|
9026
|
+
}, []);
|
9027
|
+
React.useEffect(() => {
|
9028
|
+
var _a, _b;
|
9029
|
+
if (content !== ((_a = editor.current) === null || _a === void 0 ? void 0 : _a.getContent())) {
|
9030
|
+
(_b = editor.current) === null || _b === void 0 ? void 0 : _b.setContent(content || '');
|
9031
|
+
}
|
9032
|
+
}, [content]);
|
9033
|
+
const editorCreator = React.useMemo(() => {
|
9034
|
+
return (div) => {
|
9035
|
+
const contentEdit = new roosterjsEditorPlugins.ContentEdit();
|
9036
|
+
const placeholderPlugin = new roosterjsEditorPlugins.Watermark(placeholderText || '');
|
9037
|
+
const updateContentPlugin = roosterjsReact.createUpdateContentPlugin(roosterjsReact.UpdateMode.OnContentChangedEvent | roosterjsReact.UpdateMode.OnUserInput, (content) => {
|
9038
|
+
onChange && onChange(content);
|
9039
|
+
});
|
9040
|
+
const options = {
|
9041
|
+
plugins: [placeholderPlugin, contentEdit, updateContentPlugin],
|
9042
|
+
imageSelectionBorderColor: 'blue'
|
9043
|
+
};
|
9044
|
+
editor.current = new roosterjsEditorCore.Editor(div, options);
|
9045
|
+
return editor.current;
|
9046
|
+
};
|
9047
|
+
}, [onChange, placeholderText]);
|
9048
|
+
return (React.createElement("div", null,
|
9049
|
+
React.createElement(roosterjsReact.Rooster, { className: richTextEditorStyle, editorCreator: editorCreator })));
|
9050
|
+
});
|
9051
|
+
|
9004
9052
|
// Copyright (c) Microsoft Corporation.
|
9005
9053
|
// Licensed under the MIT License.
|
9006
9054
|
/** @private */
|
@@ -19882,12 +19930,12 @@ const convertRemoteParticipantToParticipantListParticipant = (userId, displayNam
|
|
19882
19930
|
localUserCanRemoveOthers
|
19883
19931
|
};
|
19884
19932
|
};
|
19885
|
-
/* @conditional-compile-remove(
|
19933
|
+
/* @conditional-compile-remove(spotlight) */
|
19886
19934
|
/**
|
19887
19935
|
* @private
|
19888
19936
|
*/
|
19889
|
-
const
|
19890
|
-
return
|
19937
|
+
const memoizedConvertAllremoteParticipantsBetaSpotlight = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, isSpotlighted) => {
|
19938
|
+
return convertRemoteParticipantToParticipantListParticipantBetaSpotlight(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, isSpotlighted);
|
19891
19939
|
});
|
19892
19940
|
/* @conditional-compile-remove(reaction) */
|
19893
19941
|
/**
|
@@ -19901,7 +19949,7 @@ const memoizedConvertToVideoTileReaction = memoizeOne((reactionState) => {
|
|
19901
19949
|
}
|
19902
19950
|
: undefined;
|
19903
19951
|
});
|
19904
|
-
/* @conditional-compile-remove(
|
19952
|
+
/* @conditional-compile-remove(spotlight) */
|
19905
19953
|
/**
|
19906
19954
|
* @private
|
19907
19955
|
*/
|
@@ -19909,8 +19957,8 @@ const memoizedSpotlight = memoizeOne((spotlightedParticipants, userId) => {
|
|
19909
19957
|
const spotlightOrder = spotlightedParticipants === null || spotlightedParticipants === void 0 ? void 0 : spotlightedParticipants.find((spotlightedParticipant) => toFlatCommunicationIdentifier(spotlightedParticipant.identifier) === userId);
|
19910
19958
|
return spotlightOrder ? { spotlightOrderPosition: spotlightOrder.order } : undefined;
|
19911
19959
|
});
|
19912
|
-
/* @conditional-compile-remove(
|
19913
|
-
const
|
19960
|
+
/* @conditional-compile-remove(spotlight) */
|
19961
|
+
const convertRemoteParticipantToParticipantListParticipantBetaSpotlight = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, isSpotlighted) => {
|
19914
19962
|
return Object.assign(Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers)), { reaction,
|
19915
19963
|
isSpotlighted });
|
19916
19964
|
};
|
@@ -20195,8 +20243,8 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
|
|
20195
20243
|
}
|
20196
20244
|
}));
|
20197
20245
|
};
|
20198
|
-
/* @conditional-compile-remove(
|
20199
|
-
return
|
20246
|
+
/* @conditional-compile-remove(spotlight) */
|
20247
|
+
return memoizedConvertAllremoteParticipantsBetaSpotlight(conversionCallback);
|
20200
20248
|
};
|
20201
20249
|
/**
|
20202
20250
|
* Selects data that drives {@link ParticipantList} component.
|