@azure/communication-react 1.4.3-alpha-202301140013.0 → 1.4.3-alpha-202301150014.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.
Files changed (34) hide show
  1. package/dist/dist-cjs/communication-react/index.js +244 -153
  2. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  3. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  5. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
  6. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +18 -4
  7. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +16 -3
  9. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +18 -5
  11. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  12. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js +7 -4
  13. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +9 -0
  15. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +18 -0
  16. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -0
  17. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +2 -3
  18. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.d.ts +6 -0
  20. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js +9 -0
  21. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js.map +1 -0
  22. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.d.ts +10 -0
  23. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +29 -0
  24. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -0
  25. package/dist/dist-esm/react-components/src/components/VideoGallery.js +5 -1
  26. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +1 -0
  28. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +7 -2
  29. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -2
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +2 -0
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  34. package/package.json +11 -10
@@ -17,6 +17,7 @@ var reactFileTypeIcons = require('@fluentui/react-file-type-icons');
17
17
  var reactAriaLive = require('react-aria-live');
18
18
  var htmlToReact = require('html-to-react');
19
19
  var Linkify = require('react-linkify');
20
+ var reactUseDraggableScroll = require('react-use-draggable-scroll');
20
21
  var reactHooks = require('@fluentui/react-hooks');
21
22
  var reactWindowProvider = require('@fluentui/react-window-provider');
22
23
  var copy = require('copy-to-clipboard');
@@ -158,7 +159,7 @@ const _toCommunicationIdentifier = (id) => {
158
159
  // Copyright (c) Microsoft Corporation.
159
160
  // Licensed under the MIT license.
160
161
  // GENERATED FILE. DO NOT EDIT MANUALLY.
161
- var telemetryVersion = '1.4.3-alpha-202301140013.0';
162
+ var telemetryVersion = '1.4.3-alpha-202301150014.0';
162
163
 
163
164
  // Copyright (c) Microsoft Corporation.
164
165
  /**
@@ -8421,6 +8422,9 @@ function useLongPress(props) {
8421
8422
  const handleOnTouchEnd = React.useCallback(() => {
8422
8423
  timerRef.current && clearTimeout(timerRef.current);
8423
8424
  }, []);
8425
+ const handleOnTouchMove = React.useCallback(() => {
8426
+ timerRef.current && clearTimeout(timerRef.current);
8427
+ }, []);
8424
8428
  return React.useMemo(() => ({
8425
8429
  onClick: handleOnClick,
8426
8430
  onMouseDown: handleOnMouseDown,
@@ -8428,7 +8432,8 @@ function useLongPress(props) {
8428
8432
  onTouchStart: handleOnTouchStart,
8429
8433
  onTouchEnd: handleOnTouchEnd,
8430
8434
  onKeyDown: handleOnKeyDown,
8431
- onKeyUp: handleOnKeyUp
8435
+ onKeyUp: handleOnKeyUp,
8436
+ onTouchMove: handleOnTouchMove
8432
8437
  }), [
8433
8438
  handleOnClick,
8434
8439
  handleOnKeyDown,
@@ -8436,7 +8441,8 @@ function useLongPress(props) {
8436
8441
  handleOnMouseDown,
8437
8442
  handleOnMouseUp,
8438
8443
  handleOnTouchEnd,
8439
- handleOnTouchStart
8444
+ handleOnTouchStart,
8445
+ handleOnTouchMove
8440
8446
  ]);
8441
8447
  }
8442
8448
 
@@ -8598,7 +8604,7 @@ const bracketedParticipantString = (participantString, withBrackets) => {
8598
8604
  */
8599
8605
  const _RemoteVideoTile = React__default['default'].memo((props) => {
8600
8606
  const { isAvailable, isReceiving = true, // default to true to prevent any breaking change
8601
- isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, showRemoteVideoTileContextualMenu = true, isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem } = props;
8607
+ isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, menuKind = 'contextual', isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem } = props;
8602
8608
  const remoteVideoStreamProps = React.useMemo(() => ({
8603
8609
  isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
8604
8610
  isScreenSharingOn,
@@ -8633,11 +8639,11 @@ const _RemoteVideoTile = React__default['default'].memo((props) => {
8633
8639
  disablePinMenuItem
8634
8640
  });
8635
8641
  const videoTileContextualMenuProps = React.useMemo(() => {
8636
- if (!showRemoteVideoTileContextualMenu) {
8642
+ if (menuKind !== 'contextual') {
8637
8643
  return {};
8638
8644
  }
8639
8645
  return videoTileContextualMenuPropsTrampoline(contextualMenuProps);
8640
- }, [contextualMenuProps, showRemoteVideoTileContextualMenu]);
8646
+ }, [contextualMenuProps, menuKind]);
8641
8647
  const showLoadingIndicator = isAvailable && isReceiving === false && participantState !== 'Disconnected';
8642
8648
  const [drawerMenuItemProps, setDrawerMenuItemProps] = React__default['default'].useState([]);
8643
8649
  const renderVideoStreamElement = React.useMemo(() => {
@@ -8649,7 +8655,19 @@ const _RemoteVideoTile = React__default['default'].memo((props) => {
8649
8655
  }
8650
8656
  return (React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: showLoadingIndicator ? 'loading' : 'none' }));
8651
8657
  }, [renderElement, showLoadingIndicator]);
8652
- return (React__default['default'].createElement(react.Stack, { style: remoteVideoTileWrapperStyle },
8658
+ /* @conditional-compile-remove(pinned-participants) */
8659
+ const onKeyDown = React.useCallback((e) => {
8660
+ if (e.key === 'Enter') {
8661
+ setDrawerMenuItemProps(convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([])));
8662
+ }
8663
+ }, [setDrawerMenuItemProps, contextualMenuProps]);
8664
+ return (React__default['default'].createElement(react.Stack
8665
+ /* @conditional-compile-remove(pinned-participants) */
8666
+ , {
8667
+ /* @conditional-compile-remove(pinned-participants) */
8668
+ tabIndex: menuKind === 'drawer' ? 0 : undefined,
8669
+ /* @conditional-compile-remove(pinned-participants) */
8670
+ onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined, style: remoteVideoTileWrapperStyle },
8653
8671
  React__default['default'].createElement(VideoTile, Object.assign({ key: userId, userId: userId, renderElement: renderVideoStreamElement, displayName: remoteParticipant.displayName, onRenderPlaceholder: onRenderAvatar, isMuted: remoteParticipant.isMuted, isSpeaking: remoteParticipant.isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel,
8654
8672
  /* @conditional-compile-remove(one-to-n-calling) */
8655
8673
  /* @conditional-compile-remove(PSTN-calls) */
@@ -8910,6 +8928,176 @@ const FloatingLocalCameraCycleButton = (props) => {
8910
8928
  (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.onSelectCamera) !== undefined && (React__default['default'].createElement(LocalVideoCameraCycleButton, { cameras: localVideoCameraCycleButtonProps.cameras, selectedCamera: localVideoCameraCycleButtonProps.selectedCamera, onSelectCamera: localVideoCameraCycleButtonProps.onSelectCamera, label: localVideoCameraSwitcherLabel, ariaDescription: ariaDescription }))));
8911
8929
  };
8912
8930
 
8931
+ // Copyright (c) Microsoft Corporation.
8932
+ /**
8933
+ * @private
8934
+ */
8935
+ react.mergeStyles({ position: 'relative', width: '100%', height: '100%' });
8936
+ /**
8937
+ * Small floating modal width and height in rem for small screen
8938
+ */
8939
+ const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
8940
+ /**
8941
+ * Large floating modal width and height in rem for large screen
8942
+ * Aspect ratio: 16:9
8943
+ */
8944
+ const LARGE_FLOATING_MODAL_SIZE_PX = { width: 215, height: 120 };
8945
+ /**
8946
+ * @private
8947
+ * z-index to ensure that the local video tile is above the video gallery.
8948
+ */
8949
+ const LOCAL_VIDEO_TILE_ZINDEX = 2;
8950
+ /**
8951
+ * @private
8952
+ */
8953
+ const localVideoTileContainerStyle = (theme, isNarrow) => {
8954
+ return Object.assign({ minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width), minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height), position: 'absolute', bottom: _pxToRem(localVideoTileOuterPaddingPX), borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl
8955
+ ? { left: _pxToRem(localVideoTileOuterPaddingPX) }
8956
+ : { right: _pxToRem(localVideoTileOuterPaddingPX) }));
8957
+ };
8958
+ /**
8959
+ * @private
8960
+ */
8961
+ const localVideoTileWithControlsContainerStyle = (theme, isNarrow) => {
8962
+ return react.concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {
8963
+ root: { boxShadow: theme.effects.elevation8 }
8964
+ });
8965
+ };
8966
+ /**
8967
+ * @private
8968
+ */
8969
+ const floatingLocalVideoModalStyle = (theme, isNarrow) => {
8970
+ return react.concatStyleSets({
8971
+ main: localVideoTileContainerStyle(theme, isNarrow)
8972
+ }, {
8973
+ main: {
8974
+ boxShadow: theme.effects.elevation8,
8975
+ ':focus-within': {
8976
+ boxShadow: theme.effects.elevation16,
8977
+ border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`
8978
+ }
8979
+ }
8980
+ }, localVideoModalStyles);
8981
+ };
8982
+ /**
8983
+ * Padding equal to the amount the modal should stay inside the bounds of the container.
8984
+ * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
8985
+ * @private
8986
+ */
8987
+ const localVideoTileOuterPaddingPX = 8;
8988
+ /**
8989
+ * @private
8990
+ */
8991
+ const floatingLocalVideoTileStyle = {
8992
+ root: {
8993
+ position: 'absolute',
8994
+ zIndex: LOCAL_VIDEO_TILE_ZINDEX,
8995
+ height: '100%',
8996
+ width: '100%'
8997
+ }
8998
+ };
8999
+ /**
9000
+ * Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video
9001
+ * @private
9002
+ */
9003
+ const localVideoModalStyles = {
9004
+ keyboardMoveIconContainer: {
9005
+ zIndex: LOCAL_VIDEO_TILE_ZINDEX + 1 // zIndex to set the keyboard movement Icon above the other layers in the video tile.
9006
+ }
9007
+ };
9008
+
9009
+ // Copyright (c) Microsoft Corporation.
9010
+ /**
9011
+ * @private
9012
+ */
9013
+ const horizontalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow) => {
9014
+ return {
9015
+ minHeight: isNarrow
9016
+ ? `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`
9017
+ : `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9018
+ width: shouldFloatLocalVideo
9019
+ ? isNarrow
9020
+ ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width)})`
9021
+ : `calc(100% - ${_pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width)})`
9022
+ : '100%',
9023
+ paddingRight: '0.5rem'
9024
+ };
9025
+ };
9026
+ /**
9027
+ * @private
9028
+ */
9029
+ const horizontalGalleryStyle = (isNarrow) => {
9030
+ return {
9031
+ children: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_STYLE : LARGE_HORIZONTAL_GALLERY_TILE_STYLE
9032
+ };
9033
+ };
9034
+ /**
9035
+ * Small horizontal gallery tile size in rem
9036
+ * @private
9037
+ */
9038
+ const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };
9039
+ /**
9040
+ * Large horizontal gallery tile size in rem
9041
+ * @private
9042
+ */
9043
+ const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 7.5, width: 10 };
9044
+ /**
9045
+ * @private
9046
+ */
9047
+ const SMALL_HORIZONTAL_GALLERY_TILE_STYLE = {
9048
+ minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9049
+ minWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
9050
+ maxHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9051
+ maxWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
9052
+ };
9053
+ /**
9054
+ * @private
9055
+ */
9056
+ const LARGE_HORIZONTAL_GALLERY_TILE_STYLE = {
9057
+ minHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9058
+ minWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
9059
+ maxHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9060
+ maxWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
9061
+ };
9062
+
9063
+ // Copyright (c) Microsoft Corporation.
9064
+ /**
9065
+ * @private
9066
+ */
9067
+ const scrollableHorizontalGalleryStyles = {
9068
+ root: {
9069
+ width: '100%',
9070
+ minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9071
+ paddingRight: '0.5rem',
9072
+ '> *': SMALL_HORIZONTAL_GALLERY_TILE_STYLE
9073
+ }
9074
+ };
9075
+ /**
9076
+ * @private
9077
+ */
9078
+ const scrollableHorizontalGalleryContainerStyles = react.mergeStyles({
9079
+ display: 'flex',
9080
+ width: `calc(100% - ${SMALL_FLOATING_MODAL_SIZE_PX.width}px)`,
9081
+ minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9082
+ overflow: 'scroll',
9083
+ '-ms-overflow-style': 'none',
9084
+ 'scrollbar-width': 'none',
9085
+ '::-webkit-scrollbar': { display: 'none' }
9086
+ });
9087
+
9088
+ // Copyright (c) Microsoft Corporation.
9089
+ /**
9090
+ * Component to display elements horizontally in a scrollable container
9091
+ * @private
9092
+ */
9093
+ const ScrollableHorizontalGallery = (props) => {
9094
+ const { horizontalGalleryElements } = props;
9095
+ const ref = React.useRef();
9096
+ const { events: dragabbleEvents } = reactUseDraggableScroll.useDraggable(ref);
9097
+ return (React__default['default'].createElement("div", Object.assign({ ref: ref }, dragabbleEvents, { className: scrollableHorizontalGalleryContainerStyles }),
9098
+ React__default['default'].createElement(react.Stack, { "data-ui-id": "scrollable-horizontal-gallery", horizontal: true, styles: scrollableHorizontalGalleryStyles, tokens: { childrenGap: '0.5rem' } }, horizontalGalleryElements)));
9099
+ };
9100
+
8913
9101
  // Copyright (c) Microsoft Corporation.
8914
9102
  // Licensed under the MIT license.
8915
9103
  /**
@@ -8919,6 +9107,15 @@ const rootLayoutStyle$1 = {
8919
9107
  root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
8920
9108
  };
8921
9109
 
9110
+ // Copyright (c) Microsoft Corporation.
9111
+ // Licensed under the MIT license.
9112
+ /**
9113
+ * @private
9114
+ */
9115
+ const videoGalleryLayoutGap = {
9116
+ childrenGap: '0.5rem'
9117
+ };
9118
+
8922
9119
  /**
8923
9120
  * Calculates the participants that should be rendered based on the list of dominant
8924
9121
  * speakers and currently rendered participants in a call.
@@ -9225,138 +9422,6 @@ const calculateChildrenPerPage = (args) => {
9225
9422
  return Math.floor((childrenSpace + gapWidth) / (childWidth + gapWidth));
9226
9423
  };
9227
9424
 
9228
- // Copyright (c) Microsoft Corporation.
9229
- /**
9230
- * @private
9231
- */
9232
- react.mergeStyles({ position: 'relative', width: '100%', height: '100%' });
9233
- /**
9234
- * Small floating modal width and height in rem for small screen
9235
- */
9236
- const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
9237
- /**
9238
- * Large floating modal width and height in rem for large screen
9239
- * Aspect ratio: 16:9
9240
- */
9241
- const LARGE_FLOATING_MODAL_SIZE_PX = { width: 215, height: 120 };
9242
- /**
9243
- * @private
9244
- * z-index to ensure that the local video tile is above the video gallery.
9245
- */
9246
- const LOCAL_VIDEO_TILE_ZINDEX = 2;
9247
- /**
9248
- * @private
9249
- */
9250
- const localVideoTileContainerStyle = (theme, isNarrow) => {
9251
- return Object.assign({ minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width), minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height), position: 'absolute', bottom: _pxToRem(localVideoTileOuterPaddingPX), borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl
9252
- ? { left: _pxToRem(localVideoTileOuterPaddingPX) }
9253
- : { right: _pxToRem(localVideoTileOuterPaddingPX) }));
9254
- };
9255
- /**
9256
- * @private
9257
- */
9258
- const localVideoTileWithControlsContainerStyle = (theme, isNarrow) => {
9259
- return react.concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {
9260
- root: { boxShadow: theme.effects.elevation8 }
9261
- });
9262
- };
9263
- /**
9264
- * @private
9265
- */
9266
- const floatingLocalVideoModalStyle = (theme, isNarrow) => {
9267
- return react.concatStyleSets({
9268
- main: localVideoTileContainerStyle(theme, isNarrow)
9269
- }, {
9270
- main: {
9271
- boxShadow: theme.effects.elevation8,
9272
- ':focus-within': {
9273
- boxShadow: theme.effects.elevation16,
9274
- border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`
9275
- }
9276
- }
9277
- }, localVideoModalStyles);
9278
- };
9279
- /**
9280
- * Padding equal to the amount the modal should stay inside the bounds of the container.
9281
- * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
9282
- * @private
9283
- */
9284
- const localVideoTileOuterPaddingPX = 8;
9285
- /**
9286
- * @private
9287
- */
9288
- const floatingLocalVideoTileStyle = {
9289
- root: {
9290
- position: 'absolute',
9291
- zIndex: LOCAL_VIDEO_TILE_ZINDEX,
9292
- height: '100%',
9293
- width: '100%'
9294
- }
9295
- };
9296
- /**
9297
- * Styles for the local video tile modal when it is focused, will cause keyboard move icon to appear over video
9298
- * @private
9299
- */
9300
- const localVideoModalStyles = {
9301
- keyboardMoveIconContainer: {
9302
- zIndex: LOCAL_VIDEO_TILE_ZINDEX + 1 // zIndex to set the keyboard movement Icon above the other layers in the video tile.
9303
- }
9304
- };
9305
-
9306
- // Copyright (c) Microsoft Corporation.
9307
- /**
9308
- * @private
9309
- */
9310
- const horizontalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow) => {
9311
- return {
9312
- minHeight: isNarrow
9313
- ? `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`
9314
- : `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9315
- width: shouldFloatLocalVideo
9316
- ? isNarrow
9317
- ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width)})`
9318
- : `calc(100% - ${_pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width)})`
9319
- : '100%',
9320
- paddingRight: '0.5rem'
9321
- };
9322
- };
9323
- /**
9324
- * @private
9325
- */
9326
- const horizontalGalleryStyle = (isNarrow) => {
9327
- return {
9328
- children: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_STYLE : LARGE_HORIZONTAL_GALLERY_TILE_STYLE
9329
- };
9330
- };
9331
- /**
9332
- * Small horizontal gallery tile size in rem
9333
- * @private
9334
- */
9335
- const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };
9336
- /**
9337
- * Large horizontal gallery tile size in rem
9338
- * @private
9339
- */
9340
- const LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 7.5, width: 10 };
9341
- /**
9342
- * @private
9343
- */
9344
- const SMALL_HORIZONTAL_GALLERY_TILE_STYLE = {
9345
- minHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9346
- minWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
9347
- maxHeight: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9348
- maxWidth: `${SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
9349
- };
9350
- /**
9351
- * @private
9352
- */
9353
- const LARGE_HORIZONTAL_GALLERY_TILE_STYLE = {
9354
- minHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9355
- minWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`,
9356
- maxHeight: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.height}rem`,
9357
- maxWidth: `${LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width}rem`
9358
- };
9359
-
9360
9425
  // Copyright (c) Microsoft Corporation.
9361
9426
  /**
9362
9427
  * A ResponsiveHorizontalGallery styled for the {@link VideoGallery}
@@ -9367,8 +9432,7 @@ const VideoGalleryResponsiveHorizontalGallery = (props) => {
9367
9432
  const { shouldFloatLocalVideo = false, isNarrow = false, horizontalGalleryElements, styles } = props;
9368
9433
  const containerStyles = React.useMemo(() => horizontalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow), [shouldFloatLocalVideo, isNarrow]);
9369
9434
  const galleryStyles = React.useMemo(() => react.concatStyleSets(horizontalGalleryStyle(isNarrow), styles), [isNarrow, styles]);
9370
- return (React__default['default'].createElement(react.Stack, { styles: { root: { paddingTop: '0.5rem' } } },
9371
- React__default['default'].createElement(ResponsiveHorizontalGallery, { key: "responsive-horizontal-gallery", containerStyles: containerStyles, horizontalGalleryStyles: galleryStyles, childWidthRem: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width, buttonWidthRem: HORIZONTAL_GALLERY_BUTTON_WIDTH, gapWidthRem: HORIZONTAL_GALLERY_GAP }, horizontalGalleryElements)));
9435
+ return (React__default['default'].createElement(ResponsiveHorizontalGallery, { key: "responsive-horizontal-gallery", containerStyles: containerStyles, horizontalGalleryStyles: galleryStyles, childWidthRem: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width, buttonWidthRem: HORIZONTAL_GALLERY_BUTTON_WIDTH, gapWidthRem: HORIZONTAL_GALLERY_GAP }, horizontalGalleryElements));
9372
9436
  };
9373
9437
 
9374
9438
  // Copyright (c) Microsoft Corporation.
@@ -9403,9 +9467,19 @@ const DefaultLayout = (props) => {
9403
9467
  if (localVideoComponent) {
9404
9468
  gridTiles.push(localVideoComponent);
9405
9469
  }
9406
- return (React__default['default'].createElement(react.Stack, { horizontal: false, styles: rootLayoutStyle$1 },
9470
+ const horizontalGallery = React.useMemo(() => {
9471
+ if (horizontalGalleryTiles.length === 0) {
9472
+ return null;
9473
+ }
9474
+ /* @conditional-compile-remove(pinned-participants) */
9475
+ if (isNarrow) {
9476
+ return React__default['default'].createElement(ScrollableHorizontalGallery, { horizontalGalleryElements: horizontalGalleryTiles });
9477
+ }
9478
+ return (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery }));
9479
+ }, [isNarrow, horizontalGalleryTiles, styles === null || styles === void 0 ? void 0 : styles.horizontalGallery]);
9480
+ return (React__default['default'].createElement(react.Stack, { horizontal: false, styles: rootLayoutStyle$1, tokens: videoGalleryLayoutGap },
9407
9481
  screenShareComponent ? (screenShareComponent) : (React__default['default'].createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
9408
- horizontalGalleryTiles.length > 0 && (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery }))));
9482
+ horizontalGallery));
9409
9483
  };
9410
9484
 
9411
9485
  // Copyright (c) Microsoft Corporation.
@@ -10184,12 +10258,22 @@ const FloatingLocalVideoLayout = (props) => {
10184
10258
  boxShadow: theme.effects.elevation8,
10185
10259
  zIndex: LOCAL_VIDEO_TILE_ZINDEX
10186
10260
  }) }, localVideoComponent)) : horizontalGalleryTiles.length > 0 ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileContainerStyle(theme, isNarrow)) }, localVideoComponent)) : (React__default['default'].createElement(FloatingLocalVideo, { localVideoComponent: localVideoComponent, layerHostId: layerHostId, isNarrow: isNarrow, parentWidth: parentWidth, parentHeight: parentHeight }))) : undefined;
10261
+ const horizontalGallery = React.useMemo(() => {
10262
+ if (horizontalGalleryTiles.length === 0) {
10263
+ return null;
10264
+ }
10265
+ /* @conditional-compile-remove(pinned-participants) */
10266
+ if (isNarrow) {
10267
+ return React__default['default'].createElement(ScrollableHorizontalGallery, { horizontalGalleryElements: horizontalGalleryTiles });
10268
+ }
10269
+ return (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery }));
10270
+ }, [isNarrow, horizontalGalleryTiles, styles === null || styles === void 0 ? void 0 : styles.horizontalGallery]);
10187
10271
  return (React__default['default'].createElement(react.Stack, { styles: rootLayoutStyle },
10188
- wrappedLocalVideoComponent,
10189
- React__default['default'].createElement(react.Stack, { horizontal: false, styles: innerLayoutStyle },
10272
+ React__default['default'].createElement(react.Stack, { horizontal: false, styles: innerLayoutStyle, tokens: videoGalleryLayoutGap },
10190
10273
  screenShareComponent ? (screenShareComponent) : (React__default['default'].createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
10191
- horizontalGalleryTiles.length > 0 && (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery })),
10192
- React__default['default'].createElement(react.LayerHost, { id: layerHostId, className: react.mergeStyles(layerHostStyle) }))));
10274
+ horizontalGallery),
10275
+ wrappedLocalVideoComponent,
10276
+ React__default['default'].createElement(react.LayerHost, { id: layerHostId, className: react.mergeStyles(layerHostStyle) })));
10193
10277
  };
10194
10278
 
10195
10279
  // Copyright (c) Microsoft Corporation.
@@ -10235,11 +10319,12 @@ const PinnedParticipantsLayout = (props) => {
10235
10319
  zIndex: LOCAL_VIDEO_TILE_ZINDEX
10236
10320
  }) }, localVideoComponent)) : horizontalGalleryTiles.length > 0 ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileContainerStyle(theme, isNarrow)) }, localVideoComponent)) : (React__default['default'].createElement(FloatingLocalVideo, { localVideoComponent: localVideoComponent, layerHostId: layerHostId, isNarrow: isNarrow, parentWidth: parentWidth, parentHeight: parentHeight }))) : undefined;
10237
10321
  return (React__default['default'].createElement(react.Stack, { styles: rootLayoutStyle },
10238
- wrappedLocalVideoComponent,
10239
- React__default['default'].createElement(react.Stack, { horizontal: false, styles: innerLayoutStyle },
10322
+ React__default['default'].createElement(react.Stack, { horizontal: false, styles: innerLayoutStyle, tokens: videoGalleryLayoutGap },
10240
10323
  screenShareComponent ? (screenShareComponent) : (React__default['default'].createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
10241
- horizontalGalleryTiles.length > 0 && (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery })),
10242
- React__default['default'].createElement(react.LayerHost, { id: layerHostId, className: react.mergeStyles(layerHostStyle) }))));
10324
+ horizontalGalleryTiles.length > 0 &&
10325
+ (isNarrow ? (React__default['default'].createElement(ScrollableHorizontalGallery, { horizontalGalleryElements: horizontalGalleryTiles })) : (React__default['default'].createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery })))),
10326
+ wrappedLocalVideoComponent,
10327
+ React__default['default'].createElement(react.LayerHost, { id: layerHostId, className: react.mergeStyles(layerHostStyle) })));
10243
10328
  };
10244
10329
 
10245
10330
  // Copyright (c) Microsoft Corporation.
@@ -10359,7 +10444,11 @@ const VideoGallery = (props) => {
10359
10444
  /* @conditional-compile-remove(PSTN-calls) */
10360
10445
  participantState: participant.state,
10361
10446
  /* @conditional-compile-remove(pinned-participants) */
10362
- showRemoteVideoTileContextualMenu: remoteVideoTileMenuOptions && remoteVideoTileMenuOptions.kind === 'contextual',
10447
+ menuKind: remoteVideoTileMenuOptions
10448
+ ? remoteVideoTileMenuOptions.kind === 'drawer'
10449
+ ? 'drawer'
10450
+ : 'contextual'
10451
+ : undefined,
10363
10452
  /* @conditional-compile-remove(pinned-participants) */
10364
10453
  drawerMenuHostId: drawerMenuHostId,
10365
10454
  /* @conditional-compile-remove(pinned-participants) */
@@ -17507,6 +17596,8 @@ const bannerNotificationStyles = {
17507
17596
  */
17508
17597
  const callArrangementContainerStyles = {
17509
17598
  root: {
17599
+ width: '100%',
17600
+ height: '100%',
17510
17601
  flexDirection: 'column-reverse' // to allow first initial keyboard focus on ControlBar
17511
17602
  }
17512
17603
  };
@@ -18471,7 +18562,7 @@ const CallArrangement = (props) => {
18471
18562
  const isMobileWithActivePane = props.mobileView && activePane;
18472
18563
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
18473
18564
  const callCompositeContainerCSS = React.useMemo(() => {
18474
- return { display: isMobileWithActivePane ? 'none' : 'flex' };
18565
+ return { display: isMobileWithActivePane ? 'none' : 'flex', width: '100%', height: '100%' };
18475
18566
  }, [isMobileWithActivePane]);
18476
18567
  // To be removed once feature is out of beta, replace with callCompositeContainerCSS
18477
18568
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type