@azure/communication-react 1.4.2-alpha-202211230015.0 → 1.4.2-alpha-202211260013.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 (52) hide show
  1. package/dist/communication-react.d.ts +158 -23
  2. package/dist/dist-cjs/communication-react/index.js +288 -126
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +12 -9
  7. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +10 -0
  9. package/dist/dist-esm/react-components/src/components/ErrorBar.js +5 -2
  10. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/MessageThread.js +7 -11
  12. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +4 -0
  14. package/dist/dist-esm/react-components/src/components/VideoTile.js +25 -2
  15. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +12 -10
  17. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +61 -37
  18. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
  20. package/dist/dist-esm/react-components/src/components/utils.js +5 -1
  21. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +2 -2
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +39 -7
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +125 -37
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +115 -27
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapterProvider.d.ts +3 -3
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapterProvider.js.map +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/DiagnosticsForwarder.d.ts +2 -2
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/DiagnosticsForwarder.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +15 -0
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +23 -0
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -0
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +3 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +2 -0
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +2 -2
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.d.ts +2 -2
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +3 -1
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +2 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +3 -1
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +3 -1
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +3 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  52. package/package.json +8 -8
@@ -524,11 +524,33 @@ export declare interface BrowserPermissionDeniedStyles extends BaseCustomStyles
524
524
  }
525
525
 
526
526
  /**
527
- * {@link CallComposite} Adapter interface.
527
+ * An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.
528
528
  *
529
529
  * @public
530
530
  */
531
- export declare interface CallAdapter extends AdapterState<CallAdapterState>, Disposable, CallAdapterCallManagement, CallAdapterDeviceManagement, CallAdapterSubscribers {
531
+ export declare interface CallAdapter extends CommonCallAdapter {
532
+ /**
533
+ * Join the call with microphone initially on/off.
534
+ *
535
+ * @param microphoneOn - Whether microphone is initially enabled
536
+ *
537
+ * @public
538
+ */
539
+ joinCall(microphoneOn?: boolean): Call | undefined;
540
+ /**
541
+ * Start the call.
542
+ *
543
+ * @param participants - An array of participant ids to join
544
+ *
545
+ * @public
546
+ */
547
+ startCall(participants: string[], options?: StartCallOptions): Call | undefined;
548
+ /**
549
+ * Start the call.
550
+ * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
551
+ * @beta
552
+ */
553
+ startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;
532
554
  }
533
555
 
534
556
  /**
@@ -541,11 +563,11 @@ export declare type CallAdapterCallEndedEvent = {
541
563
  };
542
564
 
543
565
  /**
544
- * Functionality for managing the current call.
545
- *
566
+ * Functionality for managing the current call or start a new call
567
+ * @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly
546
568
  * @public
547
569
  */
548
- export declare interface CallAdapterCallManagement {
570
+ export declare interface CallAdapterCallManagement extends CallAdapterCallOperations {
549
571
  /**
550
572
  * Join the call with microphone initially on/off.
551
573
  *
@@ -554,6 +576,28 @@ export declare interface CallAdapterCallManagement {
554
576
  * @public
555
577
  */
556
578
  joinCall(microphoneOn?: boolean): Call | undefined;
579
+ /**
580
+ * Start the call.
581
+ *
582
+ * @param participants - An array of participant ids to join
583
+ *
584
+ * @public
585
+ */
586
+ startCall(participants: string[], options?: StartCallOptions): Call | undefined;
587
+ /**
588
+ * Start the call.
589
+ * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
590
+ * @beta
591
+ */
592
+ startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;
593
+ }
594
+
595
+ /**
596
+ * Functionality for managing the current call.
597
+ *
598
+ * @public
599
+ */
600
+ export declare interface CallAdapterCallOperations {
557
601
  /**
558
602
  * Leave the call
559
603
  *
@@ -590,20 +634,6 @@ export declare interface CallAdapterCallManagement {
590
634
  * @public
591
635
  */
592
636
  unmute(): Promise<void>;
593
- /**
594
- * Start the call.
595
- *
596
- * @param participants - An array of participant ids to join
597
- *
598
- * @public
599
- */
600
- startCall(participants: string[], options?: StartCallOptions): Call | undefined;
601
- /**
602
- * Start the call.
603
- * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
604
- * @beta
605
- */
606
- startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;
607
637
  /**
608
638
  * Start sharing the screen during a call.
609
639
  *
@@ -682,7 +712,7 @@ export declare interface CallAdapterCallManagement {
682
712
  }
683
713
 
684
714
  /**
685
- * {@link CallAdapter} state inferred from Azure Communication Services backend.
715
+ * {@link CommonCallAdapter} state inferred from Azure Communication Services backend.
686
716
  *
687
717
  * @public
688
718
  */
@@ -814,7 +844,7 @@ export declare type CallAdapterOptionalFeatures = {
814
844
  };
815
845
 
816
846
  /**
817
- * {@link CallAdapter} state.
847
+ * {@link CommonCallAdapter} state.
818
848
  *
819
849
  * @public
820
850
  */
@@ -939,7 +969,7 @@ export declare interface CallAdapterSubscribers {
939
969
  }
940
970
 
941
971
  /**
942
- * {@link CallAdapter} state for pure UI purposes.
972
+ * {@link CommonCallAdapter} state for pure UI purposes.
943
973
  *
944
974
  * @public
945
975
  */
@@ -1246,7 +1276,7 @@ export declare interface CallCompositeProps extends BaseCompositeProps<CallCompo
1246
1276
  * An adapter provides logic and data to the composite.
1247
1277
  * Composite can also be controlled using the adapter.
1248
1278
  */
1249
- adapter: CallAdapter;
1279
+ adapter: CommonCallAdapter;
1250
1280
  /**
1251
1281
  * Optimizes the composite form factor for either desktop or mobile.
1252
1282
  * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.
@@ -3440,6 +3470,36 @@ export declare type ClientState = CallClientState & ChatClientState;
3440
3470
  */
3441
3471
  export declare type Common<A, B> = Pick<A, CommonProperties<A, B>>;
3442
3472
 
3473
+ /**
3474
+ * {@link CallComposite} Adapter interface.
3475
+ *
3476
+ * @public
3477
+ */
3478
+ export declare interface CommonCallAdapter extends AdapterState<CallAdapterState>, Disposable, CallAdapterCallOperations, CallAdapterDeviceManagement, CallAdapterSubscribers {
3479
+ /**
3480
+ * Join the call with microphone initially on/off.
3481
+ *
3482
+ * @param microphoneOn - Whether microphone is initially enabled
3483
+ *
3484
+ * @public
3485
+ */
3486
+ joinCall(microphoneOn?: boolean): void;
3487
+ /**
3488
+ * Start the call.
3489
+ *
3490
+ * @param participants - An array of participant ids to join
3491
+ *
3492
+ * @public
3493
+ */
3494
+ startCall(participants: string[], options?: StartCallOptions): void;
3495
+ /**
3496
+ * Start the call.
3497
+ * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
3498
+ * @beta
3499
+ */
3500
+ startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): void;
3501
+ }
3502
+
3443
3503
  /**
3444
3504
  * Object containing all the handlers required for calling components.
3445
3505
  *
@@ -4070,6 +4130,21 @@ export declare const createAzureCommunicationChatAdapter: ({ endpoint: endpointU
4070
4130
  */
4071
4131
  export declare const createAzureCommunicationChatAdapterFromClient: (chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient) => Promise<ChatAdapter>;
4072
4132
 
4133
+ /**
4134
+ * @beta
4135
+ */
4136
+ export declare const createAzureCommunicationTeamsCallAdapter: ({ userId, credential, locator, alternateCallerId }: AzureCommunicationCallAdapterArgs) => Promise<TeamsCallAdapter>;
4137
+
4138
+ /**
4139
+ * Create a {@link TeamsCallAdapter} using the provided {@link StatefulCallClient}.
4140
+ *
4141
+ * Useful if you want to keep a reference to {@link StatefulCallClient}.
4142
+ * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.
4143
+ *
4144
+ * @beta
4145
+ */
4146
+ export declare const createAzureCommunicationTeamsCallAdapterFromClient: (callClient: StatefulCallClient, callAgent: TeamsCallAgent, locator: CallAdapterLocator) => Promise<TeamsCallAdapter>;
4147
+
4073
4148
  /**
4074
4149
  * Create the default implementation of {@link CallingHandlers} for teams call.
4075
4150
  *
@@ -5041,6 +5116,16 @@ export declare interface ErrorBarProps extends IMessageBarProps {
5041
5116
  * Currently active errors.
5042
5117
  */
5043
5118
  activeErrorMessages: ActiveErrorMessage[];
5119
+ /**
5120
+ * If set, errors with {@link ActiveErrorMessage.timestamp} older than the time this component is mounted
5121
+ * are not shown.
5122
+ *
5123
+ * This is useful when using the {@link ErrorBar} with a stateful client that handles more than one call
5124
+ * or chat thread. Set this prop to ignore errors from previous call or chat.
5125
+ *
5126
+ * @defaultValue false
5127
+ */
5128
+ ignorePremountErrors?: boolean;
5044
5129
  }
5045
5130
 
5046
5131
  /**
@@ -7488,6 +7573,36 @@ export declare interface SystemMessageCommon extends MessageCommon {
7488
7573
  iconName: string;
7489
7574
  }
7490
7575
 
7576
+ /**
7577
+ * An Adapter interface specific for Teams identity which extends {@link CommonCallAdapter}.
7578
+ *
7579
+ * @beta
7580
+ */
7581
+ export declare interface TeamsCallAdapter extends CommonCallAdapter {
7582
+ /**
7583
+ * Join the call with microphone initially on/off.
7584
+ *
7585
+ * @param microphoneOn - Whether microphone is initially enabled
7586
+ *
7587
+ * @beta
7588
+ */
7589
+ joinCall(microphoneOn?: boolean): TeamsCall | undefined;
7590
+ /**
7591
+ * Start the call.
7592
+ *
7593
+ * @param participants - An array of participant ids to join
7594
+ *
7595
+ * @beta
7596
+ */
7597
+ startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;
7598
+ /**
7599
+ * Start the call.
7600
+ * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
7601
+ * @beta
7602
+ */
7603
+ startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): TeamsCall | undefined;
7604
+ }
7605
+
7491
7606
  /**
7492
7607
  * Object containing all the teams call handlers required for calling components.
7493
7608
  *
@@ -7768,6 +7883,22 @@ export declare const useAzureCommunicationCallWithChatAdapter: (args: Partial<Az
7768
7883
  */
7769
7884
  export declare const useAzureCommunicationChatAdapter: (args: Partial<AzureCommunicationChatAdapterArgs>, afterCreate?: ((adapter: ChatAdapter) => Promise<ChatAdapter>) | undefined, beforeDispose?: ((adapter: ChatAdapter) => Promise<void>) | undefined) => ChatAdapter | undefined;
7770
7885
 
7886
+ /**
7887
+ * A custom React hook to simplify the creation of {@link TeamsCallAdapter}.
7888
+ *
7889
+ * Similar to {@link createTeamsAzureCommunicationCallAdapter}, but takes care of asynchronous
7890
+ * creation of the adapter internally.
7891
+ *
7892
+ * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments
7893
+ * as they are created. The adapter is only created when all arguments are defined.
7894
+ *
7895
+ * Note that you must memoize the arguments to avoid recreating adapter on each render.
7896
+ * See storybook for typical usage examples.
7897
+ *
7898
+ * @beta
7899
+ */
7900
+ export declare const useAzureCommunicationTeamsCallAdapter: (args: Partial<AzureCommunicationCallAdapterArgs>, afterCreate?: ((adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>) | undefined, beforeDispose?: ((adapter: TeamsCallAdapter) => Promise<void>) | undefined) => TeamsCallAdapter | undefined;
7901
+
7771
7902
  /**
7772
7903
  * Hook to obtain {@link @azure/communication-calling#Call} from the provider.
7773
7904
  *
@@ -8212,6 +8343,10 @@ export declare interface VideoTileProps {
8212
8343
  */
8213
8344
  participantState?: ParticipantState;
8214
8345
  strings?: VideoTileStrings;
8346
+ /**
8347
+ * Callback triggered by video tile on touch and hold.
8348
+ */
8349
+ onLongTouch?: () => void;
8215
8350
  }
8216
8351
 
8217
8352
  /**