@azure/communication-react 1.9.0-alpha-202310230329 → 1.9.0-alpha-202310250012

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.
@@ -102,7 +102,6 @@ import { TeamsMeetingLinkLocator } from '@azure/communication-calling';
102
102
  import { Theme } from '@fluentui/react';
103
103
  import { TransferRequestedEventArgs } from '@azure/communication-calling';
104
104
  import { TypingIndicatorReceivedEvent } from '@azure/communication-chat';
105
- import { UnknownIdentifier } from '@azure/communication-common';
106
105
  import { UnknownIdentifierKind } from '@azure/communication-common';
107
106
  import { VideoDeviceInfo } from '@azure/communication-calling';
108
107
  import { VideoEffectName } from '@azure/communication-calling';
@@ -4545,7 +4544,7 @@ export declare interface CommonCallingHandlers {
4545
4544
  onRemoveParticipant(userId: string): Promise<void>;
4546
4545
  onRemoveParticipant(participant: CommunicationIdentifier): Promise<void>;
4547
4546
  askDevicePermission: (constrain: PermissionConstraints) => Promise<void>;
4548
- onStartCall: (participants: (CommunicationUserIdentifier | PhoneNumberIdentifier | UnknownIdentifier)[], options?: StartCallOptions) => void;
4547
+ onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => void;
4549
4548
  onRemoveVideoBackgroundEffects: () => Promise<void>;
4550
4549
  onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise<void>;
4551
4550
  onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
@@ -177,7 +177,7 @@ const _isValidIdentifier = (identifier) => {
177
177
  // Copyright (c) Microsoft Corporation.
178
178
  // Licensed under the MIT License.
179
179
  // GENERATED FILE. DO NOT EDIT MANUALLY.
180
- var telemetryVersion = '1.9.0-alpha-202310230329';
180
+ var telemetryVersion = '1.9.0-alpha-202310250012';
181
181
 
182
182
  // Copyright (c) Microsoft Corporation.
183
183
  /**
@@ -9751,9 +9751,10 @@ const _FileDownloadCards = (props) => {
9751
9751
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9752
9752
  return isFileSharingAttachment(attachment);
9753
9753
  })
9754
- .map((file) => (React__default["default"].createElement(_FileCard, { fileName: file.name, key: file.name, fileExtension: file.extension, actionIcon: showSpinner ? (React__default["default"].createElement(react.Spinner, { size: react.SpinnerSize.medium, "aria-live": 'polite', role: 'status' })) : /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9755
- isShowDownloadIcon(file) ? (React__default["default"].createElement(react.IconButton, { className: iconButtonClassName, ariaLabel: downloadFileButtonString() },
9756
- React__default["default"].createElement(DownloadIconTrampoline, null))) : undefined, actionHandler: () => fileDownloadHandler(userId, file) }))))));
9754
+ .map((file) => (React__default["default"].createElement(react.TooltipHost, { content: downloadFileButtonString(), key: file.name },
9755
+ React__default["default"].createElement(_FileCard, { fileName: file.name, key: file.name, fileExtension: file.extension, actionIcon: showSpinner ? (React__default["default"].createElement(react.Spinner, { size: react.SpinnerSize.medium, "aria-live": 'polite', role: 'status' })) : /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9756
+ isShowDownloadIcon(file) ? (React__default["default"].createElement(react.IconButton, { className: iconButtonClassName, ariaLabel: downloadFileButtonString() },
9757
+ React__default["default"].createElement(DownloadIconTrampoline, null))) : undefined, actionHandler: () => fileDownloadHandler(userId, file) })))))));
9757
9758
  };
9758
9759
  /**
9759
9760
  * @private
@@ -26317,7 +26318,11 @@ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticip
26317
26318
  const hasRemoveParticipantsPermissionTrampoline = (adapter) => {
26318
26319
  var _a;
26319
26320
  /* @conditional-compile-remove(rooms) */
26320
- return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Presenter';
26321
+ const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
26322
+ /* @conditional-compile-remove(rooms) */
26323
+ const canRemove = role === 'Presenter' || role === 'Unknown' || role === undefined;
26324
+ /* @conditional-compile-remove(rooms) */
26325
+ return canRemove;
26321
26326
  };
26322
26327
 
26323
26328
  // Copyright (c) Microsoft Corporation.
@@ -30452,22 +30457,16 @@ class AzureCommunicationCallAdapter {
30452
30457
  throw new Error('You are already in the call.');
30453
30458
  }
30454
30459
  const idsToAdd = participants.map((participant) => {
30455
- const backendId = _toCommunicationIdentifier(participant);
30456
- if (communicationCommon.isPhoneNumberIdentifier(backendId)) {
30460
+ let backendId = participant;
30461
+ if (typeof participant === 'string') {
30462
+ backendId = _toCommunicationIdentifier(participant);
30463
+ }
30464
+ if (backendId.phoneNumber) {
30457
30465
  if ((options === null || options === void 0 ? void 0 : options.alternateCallerId) === undefined) {
30458
30466
  throw new Error('Unable to start call, PSTN user present with no alternateCallerId.');
30459
30467
  }
30460
30468
  return backendId;
30461
30469
  }
30462
- else if (communicationCommon.isCommunicationUserIdentifier(backendId)) {
30463
- return backendId;
30464
- }
30465
- else if (communicationCommon.isMicrosoftTeamsAppIdentifier(backendId)) {
30466
- return backendId;
30467
- }
30468
- else if (communicationCommon.isMicrosoftTeamsUserIdentifier(backendId)) {
30469
- return backendId;
30470
- }
30471
30470
  return backendId;
30472
30471
  });
30473
30472
  const call = this.handlers.onStartCall(idsToAdd, options);