@azure/communication-react 1.5.1-alpha-202306170013 → 1.5.1-alpha-202306180015
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 +7 -0
- package/dist/dist-cjs/communication-react/index.js +10 -8
- 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/react-components/src/components/ParticipantItem.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +3 -2
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -4
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +4 -3
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/package.json +8 -8
@@ -7514,6 +7514,11 @@ export declare interface ParticipantItemProps {
|
|
7514
7514
|
* For example, `strings.participantStateConnecting` will be used if `participantState` is `Connecting`.
|
7515
7515
|
*/
|
7516
7516
|
participantState?: ParticipantState;
|
7517
|
+
/**
|
7518
|
+
* Optional aria property that prefixes the ParticipantItems aria content
|
7519
|
+
* Takes in a unique id value of the element you would like to be read before the ParticipantItem.
|
7520
|
+
*/
|
7521
|
+
ariaLabelledBy?: string;
|
7517
7522
|
}
|
7518
7523
|
|
7519
7524
|
/**
|
@@ -7617,6 +7622,8 @@ export declare type ParticipantListProps = {
|
|
7617
7622
|
styles?: ParticipantListStyles;
|
7618
7623
|
/** prop to determine if we should show tooltip for participants or not */
|
7619
7624
|
showParticipantOverflowTooltip?: boolean;
|
7625
|
+
/** Optional aria-lablledby prop that prefixes each ParticipantItem aria-label */
|
7626
|
+
participantAriaLabelledBy?: string;
|
7620
7627
|
};
|
7621
7628
|
|
7622
7629
|
/**
|
@@ -167,7 +167,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
167
167
|
// Copyright (c) Microsoft Corporation.
|
168
168
|
// Licensed under the MIT license.
|
169
169
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
170
|
-
var telemetryVersion = '1.5.1-alpha-
|
170
|
+
var telemetryVersion = '1.5.1-alpha-202306180015';
|
171
171
|
|
172
172
|
// Copyright (c) Microsoft Corporation.
|
173
173
|
/**
|
@@ -10283,6 +10283,7 @@ const ParticipantItem = (props) => {
|
|
10283
10283
|
const theme = useTheme();
|
10284
10284
|
const localeStrings = useLocale$1().strings.participantItem;
|
10285
10285
|
const ids = useIdentifiers();
|
10286
|
+
const uniqueId = React.useId();
|
10286
10287
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
10287
10288
|
// For 'me' show empty name so avatar will get 'Person' icon, when there is no name
|
10288
10289
|
const meAvatarText = (displayName === null || displayName === void 0 ? void 0 : displayName.trim()) || '';
|
@@ -10322,7 +10323,7 @@ const ParticipantItem = (props) => {
|
|
10322
10323
|
React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles({
|
10323
10324
|
width: `calc(100% - ${!me && participantStateString ? participantStateMaxWidth : menuButtonContainerStyle.width})`,
|
10324
10325
|
alignItems: 'center'
|
10325
|
-
}) },
|
10326
|
+
}), id: uniqueId, "aria-labelledby": `${props.ariaLabelledBy} ${uniqueId}` },
|
10326
10327
|
avatar,
|
10327
10328
|
me && React__default['default'].createElement(react.Text, { className: meTextStyle }, strings.isMeText),
|
10328
10329
|
React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(infoContainerStyle) }, onRenderIcon && onRenderIcon(props))),
|
@@ -10444,7 +10445,7 @@ const iconStyles$2 = react.mergeStyles({
|
|
10444
10445
|
});
|
10445
10446
|
|
10446
10447
|
// Copyright (c) Microsoft Corporation.
|
10447
|
-
const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, styles, onParticipantClick, showParticipantOverflowTooltip) => {
|
10448
|
+
const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, styles, onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy) => {
|
10448
10449
|
const callingParticipant = participant;
|
10449
10450
|
let presence = undefined;
|
10450
10451
|
if (callingParticipant) {
|
@@ -10464,7 +10465,7 @@ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvat
|
|
10464
10465
|
return (React__default['default'].createElement(ParticipantItem, { styles: styles, key: participant.userId, userId: participant.userId, displayName: participant.displayName, me: myUserId ? participant.userId === myUserId : false, menuItems: menuItems, presence: presence, onRenderIcon: onRenderIcon, onRenderAvatar: onRenderAvatar, onClick: () => onParticipantClick === null || onParticipantClick === void 0 ? void 0 : onParticipantClick(participant), showParticipantOverflowTooltip: showParticipantOverflowTooltip,
|
10465
10466
|
/* @conditional-compile-remove(one-to-n-calling) */
|
10466
10467
|
/* @conditional-compile-remove(PSTN-calls) */
|
10467
|
-
participantState: callingParticipant.state }));
|
10468
|
+
participantState: callingParticipant.state, ariaLabelledBy: participantAriaLabelledBy }));
|
10468
10469
|
};
|
10469
10470
|
const getParticipantsForDefaultRender = (participants, excludeMe, myUserId) => {
|
10470
10471
|
if (!excludeMe || !myUserId) {
|
@@ -10487,7 +10488,7 @@ const getParticipantsForDefaultRender = (participants, excludeMe, myUserId) => {
|
|
10487
10488
|
*/
|
10488
10489
|
const ParticipantList = (props) => {
|
10489
10490
|
var _a, _b, _c, _d;
|
10490
|
-
const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip } = props;
|
10491
|
+
const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip, participantAriaLabelledBy } = props;
|
10491
10492
|
const ids = useIdentifiers();
|
10492
10493
|
const strings = useLocale$1().strings.participantItem;
|
10493
10494
|
const displayedParticipants = React.useMemo(() => {
|
@@ -10525,7 +10526,7 @@ const ParticipantList = (props) => {
|
|
10525
10526
|
const participantItemStyles = React.useMemo(() => { var _a; return react.merge(participantListItemStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles); }, [(_c = props.styles) === null || _c === void 0 ? void 0 : _c.participantItemStyles]);
|
10526
10527
|
return (React__default['default'].createElement(react.Stack, { "data-ui-id": ids.participantList, className: react.mergeStyles(participantListStyle$1, (_d = props.styles) === null || _d === void 0 ? void 0 : _d.root) }, displayedParticipants.map((participant) => onRenderParticipant
|
10527
10528
|
? onRenderParticipant(participant)
|
10528
|
-
: onRenderParticipantDefault(participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip))));
|
10529
|
+
: onRenderParticipantDefault(participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy))));
|
10529
10530
|
};
|
10530
10531
|
|
10531
10532
|
// Copyright (c) Microsoft Corporation.
|
@@ -20687,6 +20688,7 @@ const ParticipantContainer = (props) => {
|
|
20687
20688
|
*/
|
20688
20689
|
const ParticipantListWithHeading = (props) => {
|
20689
20690
|
const { onFetchAvatarPersonaData, onFetchParticipantMenuItems, title, participantListProps } = props;
|
20691
|
+
const subheadingUniqueId = React.useId();
|
20690
20692
|
const theme = react.useTheme();
|
20691
20693
|
const subheadingStyleThemed = React.useMemo(() => ({
|
20692
20694
|
root: {
|
@@ -20696,11 +20698,11 @@ const ParticipantListWithHeading = (props) => {
|
|
20696
20698
|
}
|
20697
20699
|
}), [theme.palette.neutralSecondary, theme.fonts.smallPlus.fontSize, props.isMobile]);
|
20698
20700
|
return (React__default['default'].createElement(react.Stack, { className: participantListStack },
|
20699
|
-
React__default['default'].createElement(react.Stack.Item, { styles: subheadingStyleThemed, "aria-label": title }, title),
|
20701
|
+
React__default['default'].createElement(react.Stack.Item, { styles: subheadingStyleThemed, "aria-label": title, id: subheadingUniqueId }, title),
|
20700
20702
|
React__default['default'].createElement(react.FocusZone, { className: participantListContainerStyle, shouldFocusOnMount: true },
|
20701
20703
|
React__default['default'].createElement(ParticipantList, Object.assign({}, participantListProps, { styles: props.isMobile ? participantListMobileStyle : participantListStyle, onRenderAvatar: (userId, options) => (React__default['default'].createElement(React__default['default'].Fragment, null,
|
20702
20704
|
React__default['default'].createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { hidePersonaDetails: !!(options === null || options === void 0 ? void 0 : options.text) }, { dataProvider: onFetchAvatarPersonaData })),
|
20703
|
-
(options === null || options === void 0 ? void 0 : options.text) && (React__default['default'].createElement(react.Text, { nowrap: true, styles: displayNameStyles$1 }, options === null || options === void 0 ? void 0 : options.text)))), onFetchParticipantMenuItems: onFetchParticipantMenuItems, showParticipantOverflowTooltip: !props.isMobile })))));
|
20705
|
+
(options === null || options === void 0 ? void 0 : options.text) && (React__default['default'].createElement(react.Text, { nowrap: true, styles: displayNameStyles$1 }, options === null || options === void 0 ? void 0 : options.text)))), onFetchParticipantMenuItems: onFetchParticipantMenuItems, showParticipantOverflowTooltip: !props.isMobile, participantAriaLabelledBy: subheadingUniqueId })))));
|
20704
20706
|
};
|
20705
20707
|
|
20706
20708
|
// Copyright (c) Microsoft Corporation.
|