@azure/communication-react 1.5.1-alpha-202303010017 → 1.5.1-alpha-202303030153
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 +32 -13
- 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/VerticalGallery.js +10 -7
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +3 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +12 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js +6 -3
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js.map +1 -1
- package/package.json +8 -8
@@ -161,7 +161,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
161
161
|
// Copyright (c) Microsoft Corporation.
|
162
162
|
// Licensed under the MIT license.
|
163
163
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
164
|
-
var telemetryVersion = '1.5.1-alpha-
|
164
|
+
var telemetryVersion = '1.5.1-alpha-202303030153';
|
165
165
|
|
166
166
|
// Copyright (c) Microsoft Corporation.
|
167
167
|
/**
|
@@ -9554,9 +9554,12 @@ const VERTICAL_GALLERY_GAP = 0.5;
|
|
9554
9554
|
/**
|
9555
9555
|
* @private
|
9556
9556
|
*/
|
9557
|
-
const childrenContainerStyle = {
|
9558
|
-
|
9559
|
-
|
9557
|
+
const childrenContainerStyle = (pageControlBarHeight) => {
|
9558
|
+
return {
|
9559
|
+
width: '100%',
|
9560
|
+
height: `calc(100% - ${pageControlBarHeight + VERTICAL_GALLERY_GAP}rem)`,
|
9561
|
+
gap: `${VERTICAL_GALLERY_GAP}rem`
|
9562
|
+
};
|
9560
9563
|
};
|
9561
9564
|
/**
|
9562
9565
|
* @private
|
@@ -9615,16 +9618,16 @@ const navIconStyles = {
|
|
9615
9618
|
*/
|
9616
9619
|
const VerticalGallery = (props) => {
|
9617
9620
|
const { children, styles, childrenPerPage } = props;
|
9618
|
-
const [page, setPage] = React.useState(
|
9621
|
+
const [page, setPage] = React.useState(1);
|
9619
9622
|
const [buttonState, setButtonState] = React.useState({ previous: true, next: true });
|
9620
9623
|
const numberOfChildren = React__default['default'].Children.count(children);
|
9621
|
-
const lastPage = Math.ceil(numberOfChildren / childrenPerPage)
|
9624
|
+
const lastPage = Math.ceil(numberOfChildren / childrenPerPage);
|
9622
9625
|
const paginatedChildren = React.useMemo(() => {
|
9623
9626
|
return bucketize(React__default['default'].Children.toArray(children), childrenPerPage);
|
9624
9627
|
}, [children, childrenPerPage]);
|
9625
|
-
const firstIndexOfCurrentPage = page * childrenPerPage;
|
9628
|
+
const firstIndexOfCurrentPage = (page - 1) * childrenPerPage;
|
9626
9629
|
const clippedPage = firstIndexOfCurrentPage < numberOfChildren - 1 ? page : lastPage;
|
9627
|
-
const childrenOnCurrentPage = paginatedChildren[clippedPage];
|
9630
|
+
const childrenOnCurrentPage = paginatedChildren[clippedPage - 1];
|
9628
9631
|
const showButtons = numberOfChildren > childrenPerPage;
|
9629
9632
|
const onPreviousButtonClick = () => {
|
9630
9633
|
setPage(page - 1);
|
@@ -9632,12 +9635,15 @@ const VerticalGallery = (props) => {
|
|
9632
9635
|
const onNextButtonClick = () => {
|
9633
9636
|
setPage(page + 1);
|
9634
9637
|
};
|
9638
|
+
if (page > lastPage && lastPage > 0) {
|
9639
|
+
setPage(lastPage);
|
9640
|
+
}
|
9635
9641
|
React.useEffect(() => {
|
9636
|
-
if (page >
|
9642
|
+
if (page > 1 && page < lastPage && showButtons) {
|
9637
9643
|
// we are somewhere in between first and last pages.
|
9638
9644
|
setButtonState({ previous: false, next: false });
|
9639
9645
|
}
|
9640
|
-
else if (page ===
|
9646
|
+
else if (page === 1 && showButtons) {
|
9641
9647
|
// we are on the first page.
|
9642
9648
|
setButtonState({ previous: true, next: false });
|
9643
9649
|
}
|
@@ -9647,7 +9653,7 @@ const VerticalGallery = (props) => {
|
|
9647
9653
|
}
|
9648
9654
|
}, [page, numberOfChildren, lastPage, showButtons]);
|
9649
9655
|
const childContainerStyle = React.useMemo(() => {
|
9650
|
-
return { root: childrenContainerStyle };
|
9656
|
+
return { root: childrenContainerStyle(2) };
|
9651
9657
|
}, []);
|
9652
9658
|
const childrenStyles = React.useMemo(() => {
|
9653
9659
|
return { root: styles === null || styles === void 0 ? void 0 : styles.children };
|
@@ -9800,7 +9806,9 @@ const VERTICAL_GALLERY_TILE_STYLE = {
|
|
9800
9806
|
minHeight: `${VERTICAL_GALLERY_TILE_SIZE_REM.minHeight}rem`,
|
9801
9807
|
minWidth: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9802
9808
|
maxHeight: `${VERTICAL_GALLERY_TILE_SIZE_REM.maxHeight}rem`,
|
9803
|
-
maxWidth: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem
|
9809
|
+
maxWidth: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9810
|
+
width: '100%',
|
9811
|
+
height: '100%'
|
9804
9812
|
};
|
9805
9813
|
/**
|
9806
9814
|
* @private
|
@@ -10878,6 +10886,17 @@ const FloatingLocalVideoLayout = (props) => {
|
|
10878
10886
|
* Currently the Calling JS SDK supports up to 4 remote video streams
|
10879
10887
|
*/
|
10880
10888
|
const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;
|
10889
|
+
/**
|
10890
|
+
* @private
|
10891
|
+
* Styles to disable the selectivity of a text in video gallery
|
10892
|
+
*/
|
10893
|
+
const unselectable = {
|
10894
|
+
'-webkit-user-select': 'none',
|
10895
|
+
'-webkit-touch-callout': 'none',
|
10896
|
+
'-moz-user-select': 'none',
|
10897
|
+
'-ms-user-select': 'none',
|
10898
|
+
'user-select': 'none'
|
10899
|
+
};
|
10881
10900
|
/**
|
10882
10901
|
* @private
|
10883
10902
|
* Default remote video tile menu options
|
@@ -11093,7 +11112,7 @@ const VideoGallery = (props) => {
|
|
11093
11112
|
return (React__default['default'].createElement("div", {
|
11094
11113
|
/* @conditional-compile-remove(pinned-participants) */
|
11095
11114
|
// We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props
|
11096
|
-
id: drawerMenuHostIdFromProp ? undefined : drawerMenuHostId, "data-ui-id": ids.videoGallery, ref: containerRef, className: react.mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root) },
|
11115
|
+
id: drawerMenuHostIdFromProp ? undefined : drawerMenuHostId, "data-ui-id": ids.videoGallery, ref: containerRef, className: react.mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root, unselectable) },
|
11097
11116
|
videoGalleryLayout,
|
11098
11117
|
/* @conditional-compile-remove(pinned-participants) */
|
11099
11118
|
React__default['default'].createElement(Announcer, { announcementString: announcementString, ariaLive: "polite" })));
|