@azure/communication-react 1.4.3-alpha-202301060015.0 → 1.4.3-alpha-202301070013.0
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 +2 -1
- package/dist/dist-cjs/communication-react/index.js +11 -54
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/identifier.js +3 -47
- package/dist/dist-esm/acs-ui-common/src/identifier.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-stateful-client/src/CallClientState.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +4 -2
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
- package/package.json +9 -9
@@ -26,6 +26,7 @@ import { CallClientOptions } from '@azure/communication-calling';
|
|
26
26
|
import { CallDirection } from '@azure/communication-calling';
|
27
27
|
import { CallEndReason } from '@azure/communication-calling';
|
28
28
|
import { CallerInfo } from '@azure/communication-calling';
|
29
|
+
import { CallKind } from '@azure/communication-calling';
|
29
30
|
import { CallState as CallState_2 } from '@azure/communication-calling';
|
30
31
|
import { ChatClient } from '@azure/communication-chat';
|
31
32
|
import { ChatClientOptions } from '@azure/communication-chat';
|
@@ -1887,7 +1888,7 @@ export declare interface CallState {
|
|
1887
1888
|
/**
|
1888
1889
|
* Type of the call.
|
1889
1890
|
*/
|
1890
|
-
|
1891
|
+
kind: CallKind;
|
1891
1892
|
/**
|
1892
1893
|
* Proxy of {@link @azure/communication-calling#Call.callerInfo}.
|
1893
1894
|
*/
|
@@ -123,12 +123,6 @@ const memoizeFnAll = (fnToMemoize, shouldCacheUpdate = Object.is) => {
|
|
123
123
|
};
|
124
124
|
|
125
125
|
// Copyright (c) Microsoft Corporation.
|
126
|
-
const COMMUNICATION_USER_PREFIX = '8:acs:';
|
127
|
-
const PHONE_NUMBER_PREFIX = '4:';
|
128
|
-
const TEAMS_DOD_PREFIX = '8:dod:';
|
129
|
-
const TEAMS_GCCH_PREFIX = '8:gcch:';
|
130
|
-
const TEAMS_USER_PREFIX = '8:orgid:';
|
131
|
-
const TEAMS_VISITOR_PREFIX = '8:teamsvisitor:';
|
132
126
|
/**
|
133
127
|
* A string representation of a {@link @azure/communication-common#CommunicationIdentifier}.
|
134
128
|
*
|
@@ -140,25 +134,7 @@ const TEAMS_VISITOR_PREFIX = '8:teamsvisitor:';
|
|
140
134
|
* @public
|
141
135
|
*/
|
142
136
|
const toFlatCommunicationIdentifier = (identifier) => {
|
143
|
-
|
144
|
-
return identifier.communicationUserId;
|
145
|
-
}
|
146
|
-
if (communicationCommon.isMicrosoftTeamsUserIdentifier(identifier)) {
|
147
|
-
if (identifier.isAnonymous) {
|
148
|
-
return TEAMS_VISITOR_PREFIX + identifier.microsoftTeamsUserId;
|
149
|
-
}
|
150
|
-
if (identifier.cloud === 'dod') {
|
151
|
-
return TEAMS_DOD_PREFIX + identifier.microsoftTeamsUserId;
|
152
|
-
}
|
153
|
-
if (identifier.cloud === 'gcch') {
|
154
|
-
return TEAMS_GCCH_PREFIX + identifier.microsoftTeamsUserId;
|
155
|
-
}
|
156
|
-
return TEAMS_USER_PREFIX + identifier.microsoftTeamsUserId;
|
157
|
-
}
|
158
|
-
if (communicationCommon.isPhoneNumberIdentifier(identifier)) {
|
159
|
-
return PHONE_NUMBER_PREFIX + identifier.phoneNumber;
|
160
|
-
}
|
161
|
-
return identifier.id;
|
137
|
+
return communicationCommon.getIdentifierRawId(identifier);
|
162
138
|
};
|
163
139
|
/**
|
164
140
|
* Reverse operation of {@link toFlatCommunicationIdentifier}.
|
@@ -166,27 +142,7 @@ const toFlatCommunicationIdentifier = (identifier) => {
|
|
166
142
|
* @public
|
167
143
|
*/
|
168
144
|
const fromFlatCommunicationIdentifier = (id) => {
|
169
|
-
|
170
|
-
// The prefix is preserved for this variant of the identifier.
|
171
|
-
return { communicationUserId: id };
|
172
|
-
}
|
173
|
-
if (id.startsWith(PHONE_NUMBER_PREFIX) || id.startsWith('+')) {
|
174
|
-
const isPhoneNumber = id.startsWith(PHONE_NUMBER_PREFIX) ? id.replace(PHONE_NUMBER_PREFIX, '') : id;
|
175
|
-
return { phoneNumber: isPhoneNumber };
|
176
|
-
}
|
177
|
-
if (id.startsWith(TEAMS_USER_PREFIX)) {
|
178
|
-
return { microsoftTeamsUserId: id.replace(TEAMS_USER_PREFIX, '') };
|
179
|
-
}
|
180
|
-
if (id.startsWith(TEAMS_DOD_PREFIX)) {
|
181
|
-
return { microsoftTeamsUserId: id.replace(TEAMS_DOD_PREFIX, ''), cloud: 'dod' };
|
182
|
-
}
|
183
|
-
if (id.startsWith(TEAMS_GCCH_PREFIX)) {
|
184
|
-
return { microsoftTeamsUserId: id.replace(TEAMS_GCCH_PREFIX, ''), cloud: 'gcch' };
|
185
|
-
}
|
186
|
-
if (id.startsWith(TEAMS_VISITOR_PREFIX)) {
|
187
|
-
return { microsoftTeamsUserId: id.replace(TEAMS_VISITOR_PREFIX, ''), isAnonymous: true };
|
188
|
-
}
|
189
|
-
return { id };
|
145
|
+
return communicationCommon.createIdentifierFromRawId(id);
|
190
146
|
};
|
191
147
|
/**
|
192
148
|
* Returns a CommunicationIdentifier.
|
@@ -202,7 +158,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
202
158
|
// Copyright (c) Microsoft Corporation.
|
203
159
|
// Licensed under the MIT license.
|
204
160
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
205
|
-
var telemetryVersion = '1.4.3-alpha-
|
161
|
+
var telemetryVersion = '1.4.3-alpha-202301070013.0';
|
206
162
|
|
207
163
|
// Copyright (c) Microsoft Corporation.
|
208
164
|
/**
|
@@ -1886,7 +1842,7 @@ function convertSdkCallToDeclarativeCall(call) {
|
|
1886
1842
|
return {
|
1887
1843
|
id: call.id,
|
1888
1844
|
/* @conditional-compile-remove(teams-identity-support) */
|
1889
|
-
|
1845
|
+
kind: _isACSCall(call) ? 'Call' : 'TeamsCall',
|
1890
1846
|
callerInfo: call.callerInfo,
|
1891
1847
|
state: call.state,
|
1892
1848
|
callEndReason: call.callEndReason,
|
@@ -7609,13 +7565,15 @@ const ParticipantItem = (props) => {
|
|
7609
7565
|
const localeStrings = useLocale$1().strings.participantItem;
|
7610
7566
|
const ids = useIdentifiers();
|
7611
7567
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
7568
|
+
// For 'me' show empty name so avatar will get 'Person' icon, when there is no name
|
7569
|
+
const meAvatarText = (displayName === null || displayName === void 0 ? void 0 : displayName.trim()) || '';
|
7612
7570
|
const avatarOptions = {
|
7613
|
-
text: (displayName === null || displayName === void 0 ? void 0 : displayName.trim()) || strings.displayNamePlaceholder,
|
7571
|
+
text: me ? meAvatarText : (displayName === null || displayName === void 0 ? void 0 : displayName.trim()) || strings.displayNamePlaceholder,
|
7614
7572
|
size: react.PersonaSize.size32,
|
7615
7573
|
presence: presence,
|
7616
7574
|
initialsTextColor: 'white',
|
7617
7575
|
showOverflowTooltip: showParticipantOverflowTooltip,
|
7618
|
-
showUnknownPersonaCoin: !(displayName === null || displayName === void 0 ? void 0 : displayName.trim()) || displayName === strings.displayNamePlaceholder
|
7576
|
+
showUnknownPersonaCoin: !me && (!(displayName === null || displayName === void 0 ? void 0 : displayName.trim()) || displayName === strings.displayNamePlaceholder)
|
7619
7577
|
};
|
7620
7578
|
const avatar = onRenderAvatar ? (onRenderAvatar(userId !== null && userId !== void 0 ? userId : '', avatarOptions)) : (React__default['default'].createElement(react.Persona, Object.assign({ className: react.mergeStyles({
|
7621
7579
|
// Prevents persona text from being vertically truncated if a global line height is less than 1.15.
|
@@ -8519,7 +8477,7 @@ const VideoTile = (props) => {
|
|
8519
8477
|
]);
|
8520
8478
|
const placeholderOptions = {
|
8521
8479
|
userId,
|
8522
|
-
text: initialsName
|
8480
|
+
text: initialsName !== null && initialsName !== void 0 ? initialsName : displayName,
|
8523
8481
|
noVideoAvailableAriaLabel,
|
8524
8482
|
coinSize: personaSize,
|
8525
8483
|
styles: defaultPersonaStyles,
|
@@ -10288,7 +10246,7 @@ const VideoGallery = (props) => {
|
|
10288
10246
|
const localVideoTileStyles = react.concatStyleSets(shouldFloatLocalVideo ? floatingLocalVideoTileStyle : {}, {
|
10289
10247
|
root: { borderRadius: theme.effects.roundedCorner4 }
|
10290
10248
|
}, styles === null || styles === void 0 ? void 0 : styles.localVideo);
|
10291
|
-
const initialsName = !localParticipant.displayName ?
|
10249
|
+
const initialsName = !localParticipant.displayName ? '' : localParticipant.displayName;
|
10292
10250
|
return (React__default['default'].createElement(react.Stack, { key: "local-video-tile-key", tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
|
10293
10251
|
React__default['default'].createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: isNarrow ? '' : strings.localVideoLabel, initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: !(shouldFloatLocalVideo && isNarrow), showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles })));
|
10294
10252
|
}, [
|
@@ -10307,7 +10265,6 @@ const VideoGallery = (props) => {
|
|
10307
10265
|
strings.localVideoLabel,
|
10308
10266
|
strings.localVideoMovementLabel,
|
10309
10267
|
strings.localVideoSelectedDescription,
|
10310
|
-
strings.displayNamePlaceholder,
|
10311
10268
|
styles === null || styles === void 0 ? void 0 : styles.localVideo,
|
10312
10269
|
theme.effects.roundedCorner4,
|
10313
10270
|
/* @conditional-compile-remove(rooms) */ permissions.cameraButton
|
@@ -18589,7 +18546,7 @@ const createAnnouncmentString = (direction, participants, strings) => {
|
|
18589
18546
|
* Filter participants into two arrays to put all the unnamed participants at the back of the
|
18590
18547
|
* names being announced.
|
18591
18548
|
*/
|
18592
|
-
const unnamedParticipants = participants.filter((p) => p.displayName
|
18549
|
+
const unnamedParticipants = participants.filter((p) => !p.displayName);
|
18593
18550
|
const namedParicipants = participants.filter((p) => p.displayName);
|
18594
18551
|
const sortedParticipants = namedParicipants.concat(unnamedParticipants);
|
18595
18552
|
/**
|