@azure/communication-react 1.5.1-alpha-202302100014 → 1.5.1-alpha-202302132135

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 (30) hide show
  1. package/dist/dist-cjs/communication-react/index.js +67 -58
  2. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  3. package/dist/dist-esm/acs-ui-common/src/identifier.js +3 -1
  4. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  7. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +5 -2
  8. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +1 -1
  10. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +8 -14
  12. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +1 -1
  14. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +1 -1
  16. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/theming/icons.js +6 -6
  18. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  19. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +3 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +2 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +2 -0
  24. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +34 -26
  25. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +2 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -4
  29. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  30. package/package.json +9 -9
@@ -143,7 +143,9 @@ const toFlatCommunicationIdentifier = (identifier) => {
143
143
  * @public
144
144
  */
145
145
  const fromFlatCommunicationIdentifier = (id) => {
146
- return communicationCommon.createIdentifierFromRawId(id);
146
+ // if the id passed is a phone number we need to build the rawId to pass in
147
+ const rawId = id.indexOf('+') === 0 ? '4:' + id.slice(1) : id;
148
+ return communicationCommon.createIdentifierFromRawId(rawId);
147
149
  };
148
150
  /**
149
151
  * Returns a CommunicationIdentifier.
@@ -159,7 +161,7 @@ const _toCommunicationIdentifier = (id) => {
159
161
  // Copyright (c) Microsoft Corporation.
160
162
  // Licensed under the MIT license.
161
163
  // GENERATED FILE. DO NOT EDIT MANUALLY.
162
- var telemetryVersion = '1.5.1-alpha-202302100014';
164
+ var telemetryVersion = '1.5.1-alpha-202302132135';
163
165
 
164
166
  // Copyright (c) Microsoft Corporation.
165
167
  /**
@@ -395,7 +397,7 @@ const _isInCall = (callStatus) => !!callStatus && !['None', 'Disconnected', 'Con
395
397
  *
396
398
  * @internal
397
399
  */
398
- const _isInLobbyOrConnecting = (callStatus) => !!callStatus && ['Connecting', 'Ringing', 'InLobby'].includes(callStatus);
400
+ const _isInLobbyOrConnecting = (callStatus) => !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);
399
401
  /**
400
402
  * Check if the device manager local video is on when not part of a call
401
403
  * i.e. do unparented views exist.
@@ -719,8 +721,11 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
719
721
  if (!participant || !participant.videoStreams) {
720
722
  return;
721
723
  }
722
- const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');
723
- const screenShareStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'ScreenSharing');
724
+ // Find the first available stream, if there is none, then get the first stream
725
+ const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video' && i.isAvailable) ||
726
+ Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');
727
+ const screenShareStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) ||
728
+ Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'ScreenSharing');
724
729
  let createViewResult = undefined;
725
730
  if (remoteVideoStream && remoteVideoStream.isAvailable && !remoteVideoStream.view) {
726
731
  createViewResult = yield callClient.createView(call.id, participant.identifier, remoteVideoStream, options);
@@ -5069,7 +5074,7 @@ const SitePermissionMic20Filled = () => {
5069
5074
  const theme = useTheme();
5070
5075
  return (React__default['default'].createElement(react.Stack, { horizontalAlign: 'center', styles: sitePermissionIconBackgroundStyle(theme) },
5071
5076
  React__default['default'].createElement("div", { className: react.mergeStyles(scaledIconStyles(theme)) },
5072
- React__default['default'].createElement(reactIcons.MicOn20Filled, null))));
5077
+ React__default['default'].createElement(reactIcons.Mic20Filled, null))));
5073
5078
  };
5074
5079
  /* @conditional-compile-remove(call-readiness) */
5075
5080
  const SitePermissionCamera20Filled = () => {
@@ -5130,7 +5135,7 @@ const DEFAULT_COMPONENT_ICONS = {
5130
5135
  ControlButtonCameraOn: React__default['default'].createElement(reactIcons.Video20Filled, null),
5131
5136
  ControlButtonEndCall: React__default['default'].createElement(reactIcons.CallEnd20Filled, null),
5132
5137
  ControlButtonMicOff: React__default['default'].createElement(reactIcons.MicOff20Filled, null),
5133
- ControlButtonMicOn: React__default['default'].createElement(reactIcons.MicOn20Filled, null),
5138
+ ControlButtonMicOn: React__default['default'].createElement(reactIcons.Mic20Filled, null),
5134
5139
  ControlButtonOptions: React__default['default'].createElement(reactIcons.Settings20Filled, null),
5135
5140
  ControlButtonParticipants: React__default['default'].createElement(reactIcons.People20Filled, null),
5136
5141
  /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
@@ -5150,7 +5155,7 @@ const DEFAULT_COMPONENT_ICONS = {
5150
5155
  ErrorBarCallMacOsMicrophoneAccessDenied: React__default['default'].createElement(reactIcons.MicProhibited16Filled, null),
5151
5156
  ErrorBarCallMicrophoneAccessDenied: React__default['default'].createElement(reactIcons.MicProhibited16Filled, null),
5152
5157
  ErrorBarCallMicrophoneMutedBySystem: React__default['default'].createElement(reactIcons.MicOff16Filled, null),
5153
- ErrorBarCallMicrophoneUnmutedBySystem: React__default['default'].createElement(reactIcons.MicOn16Filled, null),
5158
+ ErrorBarCallMicrophoneUnmutedBySystem: React__default['default'].createElement(reactIcons.Mic16Filled, null),
5154
5159
  ErrorBarCallNetworkQualityLow: React__default['default'].createElement(WifiWarning16Filled, null),
5155
5160
  ErrorBarCallNoMicrophoneFound: React__default['default'].createElement(reactIcons.MicProhibited16Filled, null),
5156
5161
  ErrorBarCallNoSpeakerFound: React__default['default'].createElement(reactIcons.SpeakerMute16Filled, null),
@@ -5164,10 +5169,10 @@ const DEFAULT_COMPONENT_ICONS = {
5164
5169
  MessageFailed: React__default['default'].createElement(reactIcons.ErrorCircle16Regular, null),
5165
5170
  MessageRemove: React__default['default'].createElement(reactIcons.Delete20Regular, null),
5166
5171
  MessageResend: React__default['default'].createElement(reactIcons.ArrowClockwise16Regular, null),
5167
- MessageSeen: React__default['default'].createElement(reactIcons.EyeShow16Regular, null),
5172
+ MessageSeen: React__default['default'].createElement(reactIcons.Eye16Regular, null),
5168
5173
  MessageSending: React__default['default'].createElement(reactIcons.Circle16Regular, null),
5169
5174
  OptionsCamera: React__default['default'].createElement(reactIcons.Video20Regular, null),
5170
- OptionsMic: React__default['default'].createElement(reactIcons.MicOn20Regular, null),
5175
+ OptionsMic: React__default['default'].createElement(reactIcons.Mic20Regular, null),
5171
5176
  OptionsSpeaker: React__default['default'].createElement(reactIcons.Speaker220Regular, null),
5172
5177
  ParticipantItemMicOff: React__default['default'].createElement(reactIcons.MicOff16Regular, null),
5173
5178
  ParticipantItemOptions: React__default['default'].createElement(React__default['default'].Fragment, null),
@@ -9054,7 +9059,7 @@ react.mergeStyles({ position: 'relative', width: '100%', height: '100%' });
9054
9059
  /**
9055
9060
  * Small floating modal width and height in rem for small screen
9056
9061
  */
9057
- const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
9062
+ const SMALL_FLOATING_MODAL_SIZE_PX = { width: 58, height: 104 };
9058
9063
  /**
9059
9064
  * Large floating modal width and height in rem for large screen
9060
9065
  * Aspect ratio: 16:9
@@ -9153,7 +9158,7 @@ const horizontalGalleryStyle = (isNarrow) => {
9153
9158
  * Small horizontal gallery tile size in rem
9154
9159
  * @private
9155
9160
  */
9156
- const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 5.5, width: 5.5 };
9161
+ const SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM = { height: 6.5, width: 6.5 };
9157
9162
  /**
9158
9163
  * Large horizontal gallery tile size in rem
9159
9164
  * @private
@@ -12535,21 +12540,15 @@ const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted
12535
12540
  const rawVideoStreamsArray = Object.values(videoStreams);
12536
12541
  let videoStream = undefined;
12537
12542
  let screenShareStream = undefined;
12538
- if (rawVideoStreamsArray[0]) {
12539
- if (rawVideoStreamsArray[0].mediaStreamType === 'Video') {
12540
- videoStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[0]);
12541
- }
12542
- else {
12543
- screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[0]);
12544
- }
12543
+ const sdkRemoteVideoStream = Object.values(rawVideoStreamsArray).find((i) => i.mediaStreamType === 'Video' && i.isAvailable) ||
12544
+ Object.values(rawVideoStreamsArray).find((i) => i.mediaStreamType === 'Video');
12545
+ const sdkScreenShareStream = Object.values(rawVideoStreamsArray).find((i) => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) ||
12546
+ Object.values(rawVideoStreamsArray).find((i) => i.mediaStreamType === 'ScreenSharing');
12547
+ if (sdkRemoteVideoStream) {
12548
+ videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);
12545
12549
  }
12546
- if (rawVideoStreamsArray[1]) {
12547
- if (rawVideoStreamsArray[1].mediaStreamType === 'ScreenSharing') {
12548
- screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[1]);
12549
- }
12550
- else {
12551
- videoStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[1]);
12552
- }
12550
+ if (sdkScreenShareStream) {
12551
+ screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);
12553
12552
  }
12554
12553
  return {
12555
12554
  userId,
@@ -14851,17 +14850,17 @@ const COMPOSITE_ONLY_ICONS = {
14851
14850
  LobbyScreenConnectingToCall: React__default['default'].createElement(CoffeeIcon, null),
14852
14851
  LobbyScreenWaitingToBeAdmitted: React__default['default'].createElement(CoffeeIcon, null),
14853
14852
  LocalDeviceSettingsCamera: React__default['default'].createElement(reactIcons.Video20Filled, null),
14854
- LocalDeviceSettingsMic: React__default['default'].createElement(reactIcons.MicOn20Filled, null),
14853
+ LocalDeviceSettingsMic: React__default['default'].createElement(reactIcons.Mic20Filled, null),
14855
14854
  LocalDeviceSettingsSpeaker: React__default['default'].createElement(reactIcons.Speaker220Filled, null),
14856
14855
  LocalPreviewPlaceholder: React__default['default'].createElement(reactIcons.VideoOff20Filled, null),
14857
14856
  LocalCameraSwitch: React__default['default'].createElement(reactIcons.CameraSwitch24Regular, null),
14858
14857
  ControlBarChatButtonActive: React__default['default'].createElement(reactIcons.Chat20Filled, null),
14859
14858
  ControlBarChatButtonInactive: React__default['default'].createElement(reactIcons.Chat20Regular, null),
14860
14859
  ControlBarPeopleButton: React__default['default'].createElement(reactIcons.People20Regular, null),
14861
- MoreDrawerMicrophones: React__default['default'].createElement(reactIcons.MicOn20Regular, null),
14860
+ MoreDrawerMicrophones: React__default['default'].createElement(reactIcons.Mic20Regular, null),
14862
14861
  MoreDrawerPeople: React__default['default'].createElement(reactIcons.People20Regular, null),
14863
14862
  MoreDrawerSpeakers: React__default['default'].createElement(reactIcons.Speaker220Regular, null),
14864
- MoreDrawerSelectedMicrophone: React__default['default'].createElement(reactIcons.MicOn20Filled, null),
14863
+ MoreDrawerSelectedMicrophone: React__default['default'].createElement(reactIcons.Mic20Filled, null),
14865
14864
  MoreDrawerSelectedSpeaker: React__default['default'].createElement(reactIcons.Speaker220Filled, null),
14866
14865
  Muted: React__default['default'].createElement(reactIcons.MicOff20Filled, null),
14867
14866
  NetworkReconnectIcon: React__default['default'].createElement(reactIcons.CallMissed20Filled, null),
@@ -21851,12 +21850,13 @@ const generateCustomCallWithChatDrawerButtons = (onFetchCustomButtonProps, displ
21851
21850
  response[key] = (React__default['default'].createElement(React__default['default'].Fragment, null, allButtonProps
21852
21851
  .filter((buttonProps) => buttonProps.placement === key)
21853
21852
  .map((buttonProps, i) => {
21854
- var _a;
21853
+ var _a, _b;
21855
21854
  return ({
21856
21855
  disabled: buttonProps.disabled,
21857
21856
  id: buttonProps.id,
21858
21857
  iconProps: { iconName: buttonProps.iconName },
21859
21858
  itemKey: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`,
21859
+ key: (_b = buttonProps.key) !== null && _b !== void 0 ? _b : `${buttonProps.placement}_${i}`,
21860
21860
  onItemClick: buttonProps.onItemClick,
21861
21861
  text: buttonProps.text
21862
21862
  });
@@ -21878,6 +21878,7 @@ const onFetchCustomButtonPropsTrampoline = (options) => {
21878
21878
  * @private
21879
21879
  */
21880
21880
  const DesktopMoreButton = (props) => {
21881
+ var _a;
21881
21882
  /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
21882
21883
  const localeStrings = useLocale();
21883
21884
  /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
@@ -21887,41 +21888,46 @@ const DesktopMoreButton = (props) => {
21887
21888
  label: localeStrings.strings.call.moreButtonCallingLabel,
21888
21889
  tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
21889
21890
  }), [localeStrings]);
21890
- const moreButtonContextualMenuItems = () => {
21891
- const items = [];
21892
- /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
21893
- items.push({
21894
- key: 'holdButtonKey',
21895
- text: localeStrings.component.strings.holdButton.tooltipOffContent,
21891
+ const moreButtonContextualMenuItems = [];
21892
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
21893
+ moreButtonContextualMenuItems.push({
21894
+ key: 'holdButtonKey',
21895
+ text: localeStrings.component.strings.holdButton.tooltipOffContent,
21896
+ onClick: () => {
21897
+ holdButtonProps.onToggleHold();
21898
+ },
21899
+ iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },
21900
+ itemProps: {
21901
+ styles: buttonFlyoutIncreasedSizeStyles
21902
+ },
21903
+ disabled: props.disableButtonsForHoldScreen
21904
+ });
21905
+ /*@conditional-compile-remove(PSTN-calls) */
21906
+ if (props.onClickShowDialpad) {
21907
+ moreButtonContextualMenuItems.push({
21908
+ key: 'showDialpadKey',
21909
+ text: localeStrings.strings.callWithChat.openDtmfDialpadLabel,
21896
21910
  onClick: () => {
21897
- holdButtonProps.onToggleHold();
21911
+ props.onClickShowDialpad && props.onClickShowDialpad();
21898
21912
  },
21899
- iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },
21913
+ iconProps: { iconName: 'Dialpad', styles: { root: { lineHeight: 0 } } },
21900
21914
  itemProps: {
21901
21915
  styles: buttonFlyoutIncreasedSizeStyles
21902
21916
  },
21903
21917
  disabled: props.disableButtonsForHoldScreen
21904
21918
  });
21905
- /*@conditional-compile-remove(PSTN-calls) */
21906
- if (props.onClickShowDialpad) {
21907
- items.push({
21908
- key: 'showDialpadKey',
21909
- text: localeStrings.strings.callWithChat.openDtmfDialpadLabel,
21910
- onClick: () => {
21911
- props.onClickShowDialpad && props.onClickShowDialpad();
21912
- },
21913
- iconProps: { iconName: 'Dialpad', styles: { root: { lineHeight: 0 } } },
21914
- itemProps: {
21915
- styles: buttonFlyoutIncreasedSizeStyles
21916
- },
21917
- disabled: props.disableButtonsForHoldScreen
21918
- });
21919
- }
21920
- return items;
21921
- };
21919
+ }
21920
+ /* @conditional-compile-remove(control-bar-button-injection) */
21921
+ const customDrawerButtons = React.useMemo(() => generateCustomCallWithChatDrawerButtons(onFetchCustomButtonPropsTrampoline(typeof props.callControls === 'object' ? props.callControls : undefined), typeof props.callControls === 'object' ? props.callControls.displayType : undefined), [props.callControls]);
21922
+ /* @conditional-compile-remove(control-bar-button-injection) */
21923
+ (_a = customDrawerButtons['overflow']) === null || _a === void 0 ? void 0 : _a.props.children.forEach((element) => {
21924
+ moreButtonContextualMenuItems.push(Object.assign({ itemProps: {
21925
+ styles: buttonFlyoutIncreasedSizeStyles
21926
+ } }, element));
21927
+ });
21922
21928
  return (React__default['default'].createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "call-with-chat-composite-more-button",
21923
21929
  /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
21924
- strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() } })));
21930
+ strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems } })));
21925
21931
  };
21926
21932
 
21927
21933
  // Copyright (c) Microsoft Corporation.
@@ -22045,7 +22051,9 @@ const CallWithChatControlBar = (props) => {
22045
22051
  props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
22046
22052
  /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
22047
22053
  /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) &&
22048
- !props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad })),
22054
+ !props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad,
22055
+ /* @conditional-compile-remove(control-bar-button-injection) */
22056
+ callControls: props.callControls })),
22049
22057
  React__default['default'].createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles })))))),
22050
22058
  !props.mobileView && (React__default['default'].createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
22051
22059
  /* @conditional-compile-remove(control-bar-button-injection) */
@@ -22146,7 +22154,8 @@ const callCompositeContainerStyles = {
22146
22154
  root: {
22147
22155
  // Start a new stacking context so that any `position:absolute` elements
22148
22156
  // inside the call composite do not compete with its siblings.
22149
- position: 'relative'
22157
+ position: 'relative',
22158
+ width: '100%'
22150
22159
  }
22151
22160
  };
22152
22161
  /** @private */