@azure/communication-react 1.2.3-alpha-202205110014.0 → 1.2.3-alpha-202205120015.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 (58) hide show
  1. package/dist/dist-cjs/communication-react/index.js +130 -90
  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/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts.map +1 -1
  5. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +0 -2
  6. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  7. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +50 -0
  8. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts.map +1 -0
  9. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +72 -0
  10. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -0
  11. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts.map +1 -1
  12. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +1 -2
  13. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +29 -0
  15. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts.map +1 -0
  16. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +66 -0
  17. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -0
  18. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +2 -0
  19. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +2 -0
  21. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/SendBox.d.ts.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/SendBox.js +0 -2
  24. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/VideoGallery.js +18 -40
  27. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/components/index.d.ts +2 -0
  29. package/dist/dist-esm/react-components/src/components/index.d.ts.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/index.js +1 -0
  31. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +1 -2
  34. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +22 -0
  36. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts.map +1 -0
  37. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +74 -0
  38. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -0
  39. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.d.ts +1 -1
  40. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.d.ts.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +20 -25
  42. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  43. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +0 -1
  44. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +3 -3
  46. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.d.ts +5 -0
  48. package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.d.ts.map +1 -0
  49. package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js +44 -0
  50. package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js.map +1 -0
  51. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts.map +1 -1
  52. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/theming/themes.d.ts.map +1 -1
  54. package/dist/dist-esm/react-components/src/theming/themes.js +6 -0
  55. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  56. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -1
  57. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  58. package/package.json +7 -7
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
191
191
  // Copyright (c) Microsoft Corporation.
192
192
  // Licensed under the MIT license.
193
193
  // GENERATED FILE. DO NOT EDIT MANUALLY.
194
- var telemetryVersion = '1.2.3-alpha-202205110014.0';
194
+ var telemetryVersion = '1.2.3-alpha-202205120015.0';
195
195
 
196
196
  // Copyright (c) Microsoft Corporation.
197
197
  /**
@@ -1539,9 +1539,9 @@ const defaultSendBoxActiveBorderThicknessREM = 0.125;
1539
1539
  * @private
1540
1540
  */
1541
1541
  const borderAndBoxShadowStyle = (props) => {
1542
- const { theme, errorColor, hasErrorMessage, disabled } = props;
1543
- const borderColor = hasErrorMessage ? errorColor : theme.palette.neutralSecondary;
1544
- const borderColorActive = hasErrorMessage ? errorColor : theme.palette.themePrimary;
1542
+ const { theme, hasErrorMessage, disabled } = props;
1543
+ const borderColor = hasErrorMessage ? theme.semanticColors.errorText : theme.palette.neutralSecondary;
1544
+ const borderColorActive = hasErrorMessage ? theme.semanticColors.errorText : theme.palette.themePrimary;
1545
1545
  const borderThickness = disabled ? 0 : defaultSendBoxInactiveBorderThicknessREM;
1546
1546
  const borderActiveThickness = disabled ? 0 : defaultSendBoxActiveBorderThicknessREM;
1547
1547
  return {
@@ -1594,6 +1594,9 @@ const lightTheme = {
1594
1594
  callRedDark: '#8b2c3d',
1595
1595
  callRedDarker: '#772a38',
1596
1596
  iconWhite: '#ffffff'
1597
+ },
1598
+ semanticColors: {
1599
+ errorText: '#a80000'
1597
1600
  }
1598
1601
  };
1599
1602
  /**
@@ -1631,6 +1634,9 @@ const darkTheme = {
1631
1634
  callRedDark: '#a42e43',
1632
1635
  callRedDarker: '#8b2c3d',
1633
1636
  iconWhite: '#ffffff'
1637
+ },
1638
+ semanticColors: {
1639
+ errorText: '#f1707b'
1634
1640
  }
1635
1641
  };
1636
1642
 
@@ -1822,31 +1828,26 @@ const textContainerStyle = {
1822
1828
  /**
1823
1829
  * @private
1824
1830
  */
1825
- const textFieldStyle = (errorColor) => {
1826
- return {
1827
- root: {
1828
- width: '100%',
1829
- minHeight: '0',
1830
- fontSize: '8.25rem'
1831
- },
1832
- wrapper: {},
1833
- fieldGroup: {
1834
- outline: 'none',
1835
- border: 'none',
1836
- height: 'auto',
1837
- minHeight: '0',
1838
- /**
1839
- * Removing fieldGroup border to make sure no border is rendered around the text area in sendbox.
1840
- */
1841
- ':after': { border: 'none' }
1842
- },
1843
- field: {
1844
- borderRadius: '0.25rem'
1845
- },
1846
- errorMessage: {
1847
- color: errorColor
1848
- }
1849
- };
1831
+ const textFieldStyle = {
1832
+ root: {
1833
+ width: '100%',
1834
+ minHeight: '0',
1835
+ fontSize: '8.25rem'
1836
+ },
1837
+ wrapper: {},
1838
+ fieldGroup: {
1839
+ outline: 'none',
1840
+ border: 'none',
1841
+ height: 'auto',
1842
+ minHeight: '0',
1843
+ /**
1844
+ * Removing fieldGroup border to make sure no border is rendered around the text area in sendbox.
1845
+ */
1846
+ ':after': { border: 'none' }
1847
+ },
1848
+ field: {
1849
+ borderRadius: '0.25rem'
1850
+ }
1850
1851
  };
1851
1852
  /**
1852
1853
  * @private
@@ -1919,11 +1920,10 @@ const getPerceptualBrightnessOfHexColor = (hexColor) => {
1919
1920
  */
1920
1921
  const InputBoxComponent = (props) => {
1921
1922
  const { styles, id, 'data-ui-id': dataUiId, textValue, onChange, textFieldRef, placeholderText, onKeyDown, onEnterKeyDown, supportNewline, inputClassName, errorMessage, disabled, children } = props;
1922
- const theme = useTheme();
1923
1923
  const mergedRootStyle = react.mergeStyles(inputBoxWrapperStyle, styles === null || styles === void 0 ? void 0 : styles.root);
1924
1924
  const mergedTextFiledStyle = react.mergeStyles(inputBoxStyle, inputClassName, props.inlineChildren ? {} : inputBoxNewLineSpaceAffordance);
1925
1925
  const mergedTextContainerStyle = react.mergeStyles(textContainerStyle, styles === null || styles === void 0 ? void 0 : styles.textFieldContainer);
1926
- const mergedTextFieldStyle = react.concatStyleSets(textFieldStyle(isDarkThemed(theme) ? '#f1707b' : '#a80000'), {
1926
+ const mergedTextFieldStyle = react.concatStyleSets(textFieldStyle, {
1927
1927
  fieldGroup: styles === null || styles === void 0 ? void 0 : styles.textField,
1928
1928
  errorMessage: styles === null || styles === void 0 ? void 0 : styles.systemMessage
1929
1929
  });
@@ -2233,7 +2233,6 @@ const SendBox = (props) => {
2233
2233
  React__default['default'].createElement(SendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
2234
2234
  React__default['default'].createElement(react.Stack, { className: react.mergeStyles(borderAndBoxShadowStyle({
2235
2235
  theme,
2236
- errorColor: isDarkThemed(theme) ? '#f1707b' : '#a80000',
2237
2236
  hasErrorMessage: !!errorMessage,
2238
2237
  disabled: !!disabled
2239
2238
  })) },
@@ -2612,7 +2611,6 @@ const ChatMessageComponentAsEditBox = (props) => {
2612
2611
  }, [message.attachedFilesMetadata]);
2613
2612
  return (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(borderAndBoxShadowStyle({
2614
2613
  theme,
2615
- errorColor: isDarkThemed(theme) ? '#f1707b' : '#a80000',
2616
2614
  hasErrorMessage: false,
2617
2615
  disabled: false
2618
2616
  })) },
@@ -2679,7 +2677,7 @@ const chatMessageEditedTagStyle = (theme) => react.mergeStyles({ fontWeight: rea
2679
2677
  /**
2680
2678
  * @private
2681
2679
  */
2682
- const chatMessageFailedTagStyle = (theme) => react.mergeStyles({ fontWeight: react.FontWeights.light, color: isDarkThemed(theme) ? '#f1707b' : '#a80000' });
2680
+ const chatMessageFailedTagStyle = (theme) => react.mergeStyles({ fontWeight: react.FontWeights.light, color: theme.semanticColors.errorText });
2683
2681
  /**
2684
2682
  * @private
2685
2683
  */
@@ -4329,6 +4327,8 @@ const VideoTile = (props) => {
4329
4327
  * A memoized version of VideoTile for rendering remote participants. React.memo is used for a performance
4330
4328
  * boost by memoizing the same rendered component to avoid rerendering a VideoTile when its position in the
4331
4329
  * array changes causing a rerender in the parent component. https://reactjs.org/docs/react-api.html#reactmemo
4330
+ *
4331
+ * @private
4332
4332
  */
4333
4333
  const RemoteVideoTile = React__default['default'].memo((props) => {
4334
4334
  const { isAvailable, isMuted, isSpeaking, isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, displayName, onRenderAvatar, showMuteIndicator } = props;
@@ -4805,25 +4805,6 @@ const LoadingSpinner = (props) => {
4805
4805
  React__default['default'].createElement(react.Spinner, { label: props.loadingMessage, size: react.SpinnerSize.xSmall, "aria-live": 'assertive' })));
4806
4806
  };
4807
4807
 
4808
- // Copyright (c) Microsoft Corporation.
4809
- /**
4810
- * local video tile camera cycle button - for use on mobile screens only.
4811
- * @internal
4812
- */
4813
- const LocalVideoCameraCycleButton = (props) => {
4814
- const { cameras, selectedCamera, onSelectCamera, label, ariaDescription } = props;
4815
- const theme = react.useTheme();
4816
- return (React__default['default'].createElement(react.IconButton, { "data-ui-id": 'local-camera-switcher-button', styles: localVideoCameraCycleButtonStyles(theme), iconProps: { iconName: 'LocalCameraSwitch' }, ariaLabel: label, ariaDescription: ariaDescription, "aria-live": 'polite', onClick: () => {
4817
- if (cameras && cameras.length > 1 && selectedCamera !== undefined) {
4818
- const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);
4819
- const newCamera = cameras[(index + 1) % cameras.length];
4820
- if (onSelectCamera !== undefined) {
4821
- onSelectCamera(newCamera);
4822
- }
4823
- }
4824
- } }));
4825
- };
4826
-
4827
4808
  // Copyright (c) Microsoft Corporation.
4828
4809
  const animationDuration = react.AnimationVariables.durationValue2;
4829
4810
  const ZERO = { x: 0, y: 0 };
@@ -5496,6 +5477,84 @@ const _ModalClone = react.styled(ModalBase, getStyles, undefined, {
5496
5477
  });
5497
5478
  _ModalClone.displayName = 'Modal';
5498
5479
 
5480
+ // Copyright (c) Microsoft Corporation.
5481
+ /**
5482
+ * local video tile camera cycle button - for use on mobile screens only.
5483
+ * @internal
5484
+ */
5485
+ const LocalVideoCameraCycleButton = (props) => {
5486
+ const { cameras, selectedCamera, onSelectCamera, label, ariaDescription } = props;
5487
+ const theme = react.useTheme();
5488
+ return (React__default['default'].createElement(react.IconButton, { "data-ui-id": 'local-camera-switcher-button', styles: localVideoCameraCycleButtonStyles(theme), iconProps: { iconName: 'LocalCameraSwitch' }, ariaLabel: label, ariaDescription: ariaDescription, "aria-live": 'polite', onClick: () => {
5489
+ if (cameras && cameras.length > 1 && selectedCamera !== undefined) {
5490
+ const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);
5491
+ const newCamera = cameras[(index + 1) % cameras.length];
5492
+ if (onSelectCamera !== undefined) {
5493
+ onSelectCamera(newCamera);
5494
+ }
5495
+ }
5496
+ } }));
5497
+ };
5498
+
5499
+ // Copyright (c) Microsoft Corporation.
5500
+ /**
5501
+ * A memoized version of VideoTile for rendering local participant.
5502
+ *
5503
+ * @private
5504
+ */
5505
+ const LocalVideoTile = React__default['default'].memo((props) => {
5506
+ const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription } = props;
5507
+ React.useEffect(() => {
5508
+ if (isAvailable && !renderElement) {
5509
+ onCreateLocalStreamView === null || onCreateLocalStreamView === void 0 ? void 0 : onCreateLocalStreamView(localVideoViewOptions);
5510
+ }
5511
+ // Always clean up element to make tile up to date and be able to dispose correctly
5512
+ return () => {
5513
+ if (renderElement) {
5514
+ onDisposeLocalStreamView === null || onDisposeLocalStreamView === void 0 ? void 0 : onDisposeLocalStreamView();
5515
+ }
5516
+ };
5517
+ }, [isAvailable, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement]);
5518
+ // The execution order for above useEffect is onCreateRemoteStreamView =>(async time gap) RenderElement generated => element disposed => onDisposeRemoteStreamView
5519
+ // Element disposed could happen during async time gap, which still cause leaks for unused renderElement.
5520
+ // Need to do an entire cleanup when remoteTile gets disposed and make sure element gets correctly disposed
5521
+ React.useEffect(() => {
5522
+ return () => {
5523
+ onDisposeLocalStreamView === null || onDisposeLocalStreamView === void 0 ? void 0 : onDisposeLocalStreamView();
5524
+ };
5525
+ }, [onDisposeLocalStreamView]);
5526
+ const renderVideoStreamElement = React.useMemo(() => {
5527
+ // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which
5528
+ // implies that, after their threshold, all streams have no child (blank video)
5529
+ if (!renderElement || !renderElement.childElementCount) {
5530
+ // Returning `undefined` results in the placeholder with avatar being shown
5531
+ return undefined;
5532
+ }
5533
+ return (React__default['default'].createElement(React__default['default'].Fragment, null,
5534
+ React__default['default'].createElement(FloatingLocalCameraCycleButton, { showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview !== null && showCameraSwitcherInLocalPreview !== void 0 ? showCameraSwitcherInLocalPreview : false, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: localVideoCameraSwitcherLabel, localVideoSelectedDescription: localVideoSelectedDescription }),
5535
+ React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement })));
5536
+ }, [
5537
+ localVideoCameraCycleButtonProps,
5538
+ localVideoCameraSwitcherLabel,
5539
+ localVideoSelectedDescription,
5540
+ renderElement,
5541
+ showCameraSwitcherInLocalPreview
5542
+ ]);
5543
+ return (React__default['default'].createElement(VideoTile, { key: userId, userId: userId, renderElement: renderVideoStreamElement, showLabel: showLabel, displayName: displayName, initialsName: initialsName, styles: styles, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, showMuteIndicator: showMuteIndicator }));
5544
+ });
5545
+ const FloatingLocalCameraCycleButton = (props) => {
5546
+ const { showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription } = props;
5547
+ const ariaDescription = (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) &&
5548
+ localVideoSelectedDescription &&
5549
+ _formatString(localVideoSelectedDescription, {
5550
+ cameraName: localVideoCameraCycleButtonProps.selectedCamera.name
5551
+ });
5552
+ return (React__default['default'].createElement(react.Stack, { horizontalAlign: "end" }, showCameraSwitcherInLocalPreview &&
5553
+ (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.cameras) !== undefined &&
5554
+ (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) !== undefined &&
5555
+ (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 }))));
5556
+ };
5557
+
5499
5558
  // Copyright (c) Microsoft Corporation.
5500
5559
  // Currently the Calling JS SDK supports up to 4 remote video streams
5501
5560
  const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;
@@ -5520,7 +5579,7 @@ const modalMaxDragPosition = { x: localVideoTileOuterPaddingPX, y: localVideoTil
5520
5579
  */
5521
5580
  const VideoGallery = (props) => {
5522
5581
  var _a, _b, _c;
5523
- const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps } = props;
5582
+ const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps } = props;
5524
5583
  const ids = useIdentifiers();
5525
5584
  const theme = useTheme();
5526
5585
  const localeStrings = useLocale$1().strings.videoGallery;
@@ -5559,56 +5618,37 @@ const VideoGallery = (props) => {
5559
5618
  lastVisibleParticipants: visibleAudioParticipants.current,
5560
5619
  maxDominantSpeakers: MAX_AUDIO_DOMINANT_SPEAKERS
5561
5620
  });
5562
- const LocalCameraCycleButton = React.useCallback(() => {
5563
- const ariaDescription = (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) &&
5564
- _formatString(strings.localVideoSelectedDescription, {
5565
- cameraName: localVideoCameraCycleButtonProps.selectedCamera.name
5566
- });
5567
- return (React__default['default'].createElement(react.Stack, { horizontalAlign: "end" }, showCameraSwitcherInLocalPreview &&
5568
- (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.cameras) !== undefined &&
5569
- (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) !== undefined &&
5570
- (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: strings.localVideoCameraSwitcherLabel, ariaDescription: ariaDescription }))));
5571
- }, [
5572
- localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.cameras,
5573
- localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.onSelectCamera,
5574
- localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera,
5575
- showCameraSwitcherInLocalPreview,
5576
- strings.localVideoCameraSwitcherLabel,
5577
- strings.localVideoSelectedDescription
5578
- ]);
5579
5621
  /**
5580
5622
  * Utility function for memoized rendering of LocalParticipant.
5581
5623
  */
5582
5624
  const localVideoTile = React.useMemo(() => {
5583
- const localVideoStream = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream;
5625
+ var _a, _b;
5584
5626
  if (onRenderLocalVideoTile) {
5585
5627
  return onRenderLocalVideoTile(localParticipant);
5586
5628
  }
5587
- const localVideoTileStyles = shouldFloatLocalVideo ? floatingLocalVideoTileStyle : {};
5588
- const localVideoTileStylesThemed = react.concatStyleSets(localVideoTileStyles, {
5629
+ const localVideoTileStyles = react.concatStyleSets(shouldFloatLocalVideo ? floatingLocalVideoTileStyle : {}, {
5589
5630
  root: { borderRadius: theme.effects.roundedCorner4 }
5590
5631
  }, styles === null || styles === void 0 ? void 0 : styles.localVideo);
5591
- if (localVideoStream && !localVideoStream.renderElement) {
5592
- onCreateLocalStreamView && onCreateLocalStreamView(localVideoViewOptions);
5593
- }
5594
5632
  return (React__default['default'].createElement(react.Stack, { tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
5595
- React__default['default'].createElement(VideoTile, { key: localParticipant.userId, userId: localParticipant.userId, renderElement: (localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.renderElement) ? (React__default['default'].createElement(React__default['default'].Fragment, null,
5596
- React__default['default'].createElement(LocalCameraCycleButton, null),
5597
- React__default['default'].createElement(StreamMedia, { videoStreamElement: localVideoStream.renderElement }))) : undefined, showLabel: !(shouldFloatLocalVideo && isNarrow), displayName: isNarrow ? '' : strings.localVideoLabel, initialsName: localParticipant.displayName, styles: localVideoTileStylesThemed, onRenderPlaceholder: onRenderAvatar, isMuted: localParticipant.isMuted, showMuteIndicator: showMuteIndicator })));
5633
+ 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: localParticipant.displayName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: !(shouldFloatLocalVideo && isNarrow), showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles })));
5598
5634
  }, [
5599
- localParticipant,
5600
5635
  isNarrow,
5636
+ localParticipant,
5637
+ localVideoCameraCycleButtonProps,
5638
+ localVideoViewOptions,
5601
5639
  onCreateLocalStreamView,
5640
+ onDisposeLocalStreamView,
5641
+ onRenderAvatar,
5602
5642
  onRenderLocalVideoTile,
5603
- theme.effects.roundedCorner4,
5604
- styles === null || styles === void 0 ? void 0 : styles.localVideo,
5605
- strings.localVideoMovementLabel,
5606
- strings.localVideoLabel,
5607
- LocalCameraCycleButton,
5643
+ shouldFloatLocalVideo,
5644
+ showCameraSwitcherInLocalPreview,
5608
5645
  showMuteIndicator,
5609
- localVideoViewOptions,
5610
- onRenderAvatar,
5611
- shouldFloatLocalVideo
5646
+ strings.localVideoCameraSwitcherLabel,
5647
+ strings.localVideoLabel,
5648
+ strings.localVideoMovementLabel,
5649
+ strings.localVideoSelectedDescription,
5650
+ styles === null || styles === void 0 ? void 0 : styles.localVideo,
5651
+ theme.effects.roundedCorner4
5612
5652
  ]);
5613
5653
  const defaultOnRenderVideoTile = React.useCallback((participant, isVideoParticipant) => {
5614
5654
  const remoteVideoStream = participant.videoStream;
@@ -16307,7 +16347,7 @@ const CallWithChatScreen = (props) => {
16307
16347
  setActivePane('none');
16308
16348
  }, [setActivePane]);
16309
16349
  /** Constant setting of id for the parent stack of the composite */
16310
- const compositeParentDivId = 'callWithChatCompositeParentDiv-internal';
16350
+ const compositeParentDivId = reactHooks.useId('callWithChatCompositeParentDiv-internal');
16311
16351
  const toggleChat = React.useCallback(() => {
16312
16352
  if (activePane === 'chat') {
16313
16353
  setActivePane('none');