@azure/communication-react 1.7.1-alpha-202308250012 → 1.7.1-alpha-202308260012
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/dist-cjs/communication-react/index.js +35 -27
- 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/communication-react/src/index.js +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +4 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +10 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +11 -5
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -3
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +10 -10
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/captionSettingsDrawer.styles.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/captionSettingsDrawer.styles.js.map +1 -1
- package/package.json +8 -8
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
179
179
|
// Licensed under the MIT license.
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
181
|
-
var telemetryVersion = '1.7.1-alpha-
|
181
|
+
var telemetryVersion = '1.7.1-alpha-202308260012';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -8697,6 +8697,7 @@ const smallDownloadButtonContainerStyle = (theme, isDarkThemed) => {
|
|
8697
8697
|
};
|
8698
8698
|
|
8699
8699
|
// Copyright (c) Microsoft Corporation.
|
8700
|
+
/* @conditional-compile-remove(image-gallery) */
|
8700
8701
|
/**
|
8701
8702
|
* Component to render a fullscreen modal for a selected image.
|
8702
8703
|
*
|
@@ -8706,7 +8707,7 @@ const ImageGallery = (props) => {
|
|
8706
8707
|
const { isOpen, images, onImageDownloadButtonClicked, onDismiss, onError, startIndex = 0 } = props;
|
8707
8708
|
const theme = useTheme();
|
8708
8709
|
const isDarkTheme = isDarkThemed(theme);
|
8709
|
-
/* @conditional-compile-remove(
|
8710
|
+
/* @conditional-compile-remove(image-gallery) */
|
8710
8711
|
const localeStrings = useLocale$1().strings.imageGallery;
|
8711
8712
|
const [isImageLoaded, setIsImageLoaded] = React.useState(true);
|
8712
8713
|
const imageStyle = isImageLoaded ? normalImageStyle : brokenImageStyle(theme, isDarkTheme);
|
@@ -8722,11 +8723,11 @@ const ImageGallery = (props) => {
|
|
8722
8723
|
React__default['default'].createElement(react.Stack.Item, { className: react.mergeStyles(titleStyle$2(theme, isDarkTheme)), "aria-label": image.title }, image.title)),
|
8723
8724
|
React__default['default'].createElement(react.Stack, { className: react.mergeStyles(controlBarContainerStyle) },
|
8724
8725
|
React__default['default'].createElement(react.DefaultButton, { className: react.mergeStyles(downloadButtonStyle(theme, isDarkTheme)),
|
8725
|
-
/* @conditional-compile-remove(
|
8726
|
+
/* @conditional-compile-remove(image-gallery) */
|
8726
8727
|
text: localeStrings.downloadButtonLabel, onClick: () => onImageDownloadButtonClicked(image.imageUrl, image.saveAsName), onRenderIcon: () => React__default['default'].createElement(react.Icon, { iconName: downloadIcon.iconName, className: react.mergeStyles(downloadIconStyle) }), "aria-live": 'polite', "aria-label": localeStrings.downloadButtonLabel }),
|
8727
8728
|
React__default['default'].createElement(react.IconButton, { iconProps: downloadIcon, className: react.mergeStyles(smallDownloadButtonContainerStyle(theme, isDarkTheme)), onClick: () => onImageDownloadButtonClicked(image.imageUrl, image.saveAsName), "aria-label": localeStrings.downloadButtonLabel, "aria-live": 'polite' }),
|
8728
8729
|
React__default['default'].createElement(react.IconButton, { iconProps: cancelIcon, className: react.mergeStyles(closeButtonStyles(theme, isDarkTheme)), onClick: onDismiss,
|
8729
|
-
/* @conditional-compile-remove(
|
8730
|
+
/* @conditional-compile-remove(image-gallery) */
|
8730
8731
|
ariaLabel: localeStrings.dismissButtonAriaLabel, "aria-live": 'polite' }))));
|
8731
8732
|
};
|
8732
8733
|
const renderBodyWithLightDismiss = () => {
|
@@ -8742,7 +8743,7 @@ const ImageGallery = (props) => {
|
|
8742
8743
|
React__default['default'].createElement("img", { src: image.imageUrl, className: react.mergeStyles(imageStyle), alt: image.altText || 'image', "aria-label": 'image-gallery-main-image', onError: (event) => {
|
8743
8744
|
setIsImageLoaded(false);
|
8744
8745
|
onError && onError(event);
|
8745
|
-
}, onClick: (event) => event.stopPropagation() }))));
|
8746
|
+
}, onClick: (event) => event.stopPropagation(), "aria-live": 'polite' }))));
|
8746
8747
|
};
|
8747
8748
|
return (React__default['default'].createElement(react.Modal, { titleAriaId: image.title, isOpen: isOpen, onDismiss: onDismiss, overlay: { styles: Object.assign({}, overlayStyles(theme, isDarkTheme)) }, styles: { main: focusTrapZoneStyle, scrollableContent: scrollableContentStyle }, isDarkOverlay: true },
|
8748
8749
|
renderHeaderBar(),
|
@@ -9739,16 +9740,23 @@ const processInlineImage = (props) => ({
|
|
9739
9740
|
((_a = props.message.attachedFilesMetadata) === null || _a === void 0 ? void 0 : _a.find(isImageNode)));
|
9740
9741
|
},
|
9741
9742
|
processNode: (node, children, index) => {
|
9743
|
+
node.attribs = Object.assign(Object.assign({}, node.attribs), { 'aria-label': node.attribs.name });
|
9742
9744
|
// logic to check id in map/list
|
9743
9745
|
if (props.attachmentsMap && node.attribs.id in props.attachmentsMap) {
|
9744
9746
|
node.attribs = Object.assign(Object.assign({}, node.attribs), { src: props.attachmentsMap[node.attribs.id] });
|
9745
9747
|
}
|
9746
|
-
/* @conditional-compile-remove(
|
9748
|
+
/* @conditional-compile-remove(image-gallery) */
|
9747
9749
|
const handleOnClick = () => {
|
9748
9750
|
props.onInlineImageClicked && props.onInlineImageClicked(node.attribs.id);
|
9749
9751
|
};
|
9750
|
-
/* @conditional-compile-remove(
|
9751
|
-
return (React__default['default'].createElement("span", {
|
9752
|
+
/* @conditional-compile-remove(image-gallery) */
|
9753
|
+
return (React__default['default'].createElement("span", { "data-ui-id": node.attribs.id, onClick: handleOnClick, tabIndex: 0, role: "button", style: {
|
9754
|
+
cursor: 'pointer'
|
9755
|
+
}, onKeyDown: (e) => {
|
9756
|
+
if (e.key === 'Enter') {
|
9757
|
+
handleOnClick();
|
9758
|
+
}
|
9759
|
+
} }, processNodeDefinitions.processDefaultNode(node, children, index)));
|
9752
9760
|
}
|
9753
9761
|
});
|
9754
9762
|
/* @conditional-compile-remove(mention) */
|
@@ -9947,7 +9955,7 @@ const MessageBubble = (props) => {
|
|
9947
9955
|
const theme = useTheme();
|
9948
9956
|
const locale = useLocale$1();
|
9949
9957
|
const { userId, message, onRemoveClick, onResendClick, disableEditing, showDate, messageContainerStyle, strings, onEditClick, remoteParticipantsCount = 0, onRenderAvatar, showMessageStatus, messageStatus, fileDownloadHandler,
|
9950
|
-
/* @conditional-compile-remove(
|
9958
|
+
/* @conditional-compile-remove(image-gallery) */
|
9951
9959
|
onInlineImageClicked } = props;
|
9952
9960
|
const defaultTimeStamp = message.createdOn
|
9953
9961
|
? generateDefaultTimestamp(message.createdOn, showDate, strings)
|
@@ -10007,7 +10015,7 @@ const MessageBubble = (props) => {
|
|
10007
10015
|
}
|
10008
10016
|
return undefined;
|
10009
10017
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
10010
|
-
/* @conditional-compile-remove(
|
10018
|
+
/* @conditional-compile-remove(image-gallery) */
|
10011
10019
|
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$x(void 0, void 0, void 0, function* () {
|
10012
10020
|
if (onInlineImageClicked === undefined) {
|
10013
10021
|
return;
|
@@ -10028,7 +10036,7 @@ const MessageBubble = (props) => {
|
|
10028
10036
|
attachmentsMap: props.attachmentsMap,
|
10029
10037
|
/* @conditional-compile-remove(mention) */
|
10030
10038
|
mentionDisplayOptions: props.mentionDisplayOptions,
|
10031
|
-
/* @conditional-compile-remove(
|
10039
|
+
/* @conditional-compile-remove(image-gallery) */
|
10032
10040
|
onInlineImageClicked: handleOnInlineImageClicked }),
|
10033
10041
|
props.onRenderFileDownloads ? props.onRenderFileDownloads(userId, message) : defaultOnRenderFileDownloads()));
|
10034
10042
|
}, [
|
@@ -10037,7 +10045,7 @@ const MessageBubble = (props) => {
|
|
10037
10045
|
props,
|
10038
10046
|
strings,
|
10039
10047
|
userId,
|
10040
|
-
/* @conditional-compile-remove(
|
10048
|
+
/* @conditional-compile-remove(image-gallery) */
|
10041
10049
|
handleOnInlineImageClicked
|
10042
10050
|
]);
|
10043
10051
|
const chatMessage = (React__default['default'].createElement(React__default['default'].Fragment, null,
|
@@ -10115,9 +10123,9 @@ const ChatMessageComponent = (props) => {
|
|
10115
10123
|
onDisplayDateTimeString: props.onDisplayDateTimeString, strings: props.strings,
|
10116
10124
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10117
10125
|
onFetchAttachments: props.onFetchAttachments,
|
10118
|
-
/* @conditional-compile-remove(
|
10126
|
+
/* @conditional-compile-remove(image-gallery) */
|
10119
10127
|
onInlineImageClicked: props.onInlineImageClicked,
|
10120
|
-
/* @conditional-compile-remove(
|
10128
|
+
/* @conditional-compile-remove(image-gallery) */
|
10121
10129
|
attachmentsMap: props.attachmentsMap,
|
10122
10130
|
/* @conditional-compile-remove(mention) */
|
10123
10131
|
mentionDisplayOptions: (_b = props.mentionOptions) === null || _b === void 0 ? void 0 : _b.displayOptions })));
|
@@ -10491,7 +10499,7 @@ const MessageThread = (props) => {
|
|
10491
10499
|
onFetchAttachments,
|
10492
10500
|
/* @conditional-compile-remove(mention) */
|
10493
10501
|
mentionOptions,
|
10494
|
-
/* @conditional-compile-remove(
|
10502
|
+
/* @conditional-compile-remove(image-gallery) */
|
10495
10503
|
onInlineImageClicked } = props;
|
10496
10504
|
const onRenderFileDownloads = onRenderFileDownloadsTrampoline(props);
|
10497
10505
|
const [messages, setMessages] = React.useState([]);
|
@@ -10739,7 +10747,7 @@ const MessageThread = (props) => {
|
|
10739
10747
|
onDisplayDateTimeString: onDisplayDateTimeString,
|
10740
10748
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10741
10749
|
onFetchAttachments: onFetchInlineAttachment,
|
10742
|
-
/* @conditional-compile-remove(
|
10750
|
+
/* @conditional-compile-remove(image-gallery) */
|
10743
10751
|
onInlineImageClicked: onInlineImageClicked,
|
10744
10752
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10745
10753
|
attachmentsMap: inlineAttachments,
|
@@ -10761,7 +10769,7 @@ const MessageThread = (props) => {
|
|
10761
10769
|
onDisplayDateTimeString,
|
10762
10770
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10763
10771
|
onFetchInlineAttachment,
|
10764
|
-
/* @conditional-compile-remove(
|
10772
|
+
/* @conditional-compile-remove(image-gallery) */
|
10765
10773
|
onInlineImageClicked,
|
10766
10774
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10767
10775
|
inlineAttachments,
|
@@ -21927,9 +21935,9 @@ const ChatScreen = (props) => {
|
|
21927
21935
|
const defaultNumberOfChatMessagesToReload = 5;
|
21928
21936
|
/* @conditional-compile-remove(file-sharing) */
|
21929
21937
|
const [downloadErrorMessage, setDownloadErrorMessage] = React__default['default'].useState('');
|
21930
|
-
/* @conditional-compile-remove(
|
21938
|
+
/* @conditional-compile-remove(image-gallery) */
|
21931
21939
|
const [fullSizeAttachments, setFullSizeAttachments] = React.useState({});
|
21932
|
-
/* @conditional-compile-remove(
|
21940
|
+
/* @conditional-compile-remove(image-gallery) */
|
21933
21941
|
const [galleryImages, setGalleryImages] = React.useState([]);
|
21934
21942
|
const adapter = useAdapter$1();
|
21935
21943
|
const theme = useTheme();
|
@@ -21976,7 +21984,7 @@ const ChatScreen = (props) => {
|
|
21976
21984
|
}
|
21977
21985
|
return [{ blobUrl: '' }];
|
21978
21986
|
}), [adapter]);
|
21979
|
-
/* @conditional-compile-remove(
|
21987
|
+
/* @conditional-compile-remove(image-gallery) */
|
21980
21988
|
const onInlineImageClicked = React.useCallback((attachmentId, messageId) => __awaiter$i(void 0, void 0, void 0, function* () {
|
21981
21989
|
var _a, _b;
|
21982
21990
|
const messages = (_a = messageThreadProps.messages) === null || _a === void 0 ? void 0 : _a.filter((message) => {
|
@@ -22024,7 +22032,7 @@ const ChatScreen = (props) => {
|
|
22024
22032
|
}
|
22025
22033
|
}
|
22026
22034
|
}), [adapter, fullSizeAttachments, messageThreadProps.messages, onRenderAvatarCallback]);
|
22027
|
-
/* @conditional-compile-remove(
|
22035
|
+
/* @conditional-compile-remove(image-gallery) */
|
22028
22036
|
const onImageDownloadButtonClicked = React.useCallback((imageUrl, saveAsName) => {
|
22029
22037
|
if (react.isIOS()) {
|
22030
22038
|
window.open(imageUrl, '_blank');
|
@@ -22063,7 +22071,7 @@ const ChatScreen = (props) => {
|
|
22063
22071
|
onRenderFileDownloads: onRenderFileDownloads,
|
22064
22072
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
22065
22073
|
onFetchAttachments: onRenderInlineAttachment,
|
22066
|
-
/* @conditional-compile-remove(
|
22074
|
+
/* @conditional-compile-remove(image-gallery) */
|
22067
22075
|
onInlineImageClicked: onInlineImageClicked, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
22068
22076
|
React__default['default'].createElement(react.Stack, { className: react.mergeStyles(sendboxContainerStyles) },
|
22069
22077
|
React__default['default'].createElement("div", { className: react.mergeStyles(typingIndicatorContainerStyles) }, onRenderTypingIndicator ? (onRenderTypingIndicator(typingIndicatorProps.typingUsers)) : (React__default['default'].createElement(TypingIndicator, Object.assign({}, typingIndicatorProps, { styles: typingIndicatorStyles })))),
|
@@ -22079,7 +22087,7 @@ const ChatScreen = (props) => {
|
|
22079
22087
|
formFactor !== 'mobile' && React__default['default'].createElement(AttachFileButton, null)))),
|
22080
22088
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
22081
22089
|
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React__default['default'].createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' }))),
|
22082
|
-
/* @conditional-compile-remove(
|
22090
|
+
/* @conditional-compile-remove(image-gallery) */
|
22083
22091
|
React__default['default'].createElement(ImageGallery, { isOpen: galleryImages.length > 0, images: galleryImages, onDismiss: () => setGalleryImages([]), onImageDownloadButtonClicked: onImageDownloadButtonClicked })));
|
22084
22092
|
};
|
22085
22093
|
|
@@ -22975,7 +22983,7 @@ const CaptionsBannerMoreButton = (props) => {
|
|
22975
22983
|
/* @conditional-compile-remove(close-captions) */
|
22976
22984
|
const mobileViewBannerWidth = '90%';
|
22977
22985
|
/* @conditional-compile-remove(close-captions) */
|
22978
|
-
const desktopViewBannerWidth = '
|
22986
|
+
const desktopViewBannerWidth = '35rem';
|
22979
22987
|
/** @private */
|
22980
22988
|
const CaptionsBanner = (props) => {
|
22981
22989
|
/* @conditional-compile-remove(close-captions) */
|
@@ -23012,7 +23020,7 @@ const CaptionsBanner = (props) => {
|
|
23012
23020
|
/* @conditional-compile-remove(close-captions) */ isCaptionsSettingsOpen && (React__default['default'].createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: isCaptionsSettingsOpen, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: true })),
|
23013
23021
|
/* @conditional-compile-remove(close-captions) */ React__default['default'].createElement("div", { className: containerClassName },
|
23014
23022
|
React__default['default'].createElement(react.Stack, { horizontalAlign: "center" },
|
23015
|
-
React__default['default'].createElement(react.Stack.Item, { style: { width: props.isMobile ? mobileViewBannerWidth : desktopViewBannerWidth
|
23023
|
+
React__default['default'].createElement(react.Stack.Item, { style: { width: props.isMobile ? mobileViewBannerWidth : desktopViewBannerWidth } },
|
23016
23024
|
React__default['default'].createElement(_CaptionsBanner, Object.assign({}, captionsBannerProps, handlers, { formFactor: props.isMobile ? 'compact' : 'default', strings: captionsBannerStrings })))),
|
23017
23025
|
!props.isMobile && captionsBannerProps.isCaptionsOn && (React__default['default'].createElement("div", { className: floatingChildClassName },
|
23018
23026
|
React__default['default'].createElement(CaptionsBannerMoreButton, { onCaptionsSettingsClick: onClickCaptionsSettings }))))));
|
@@ -24507,8 +24515,8 @@ const captionSettingsDrawerStyles = (theme) => ({
|
|
24507
24515
|
drawerContentContainer: {
|
24508
24516
|
root: {
|
24509
24517
|
span: {
|
24510
|
-
fontWeight:
|
24511
|
-
fontSize: _pxToRem(
|
24518
|
+
fontWeight: 400,
|
24519
|
+
fontSize: _pxToRem(14),
|
24512
24520
|
lineHeight: _pxToRem(22),
|
24513
24521
|
color: theme.palette.neutralDark
|
24514
24522
|
}
|