@azure/communication-react 1.3.3-alpha-202210060021.0 → 1.3.3-alpha-202210070024.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 +168 -3
  2. package/dist/dist-cjs/communication-react/index.js +202 -185
  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/calling-component-bindings/src/handlers/createHandlers.d.ts +2 -0
  7. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +9 -1
  8. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +2 -1
  10. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +7 -0
  11. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  12. package/dist/dist-esm/communication-react/src/index.d.ts +3 -1
  13. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/BrowserPermissionDenied.d.ts +69 -0
  15. package/dist/dist-esm/react-components/src/components/BrowserPermissionDenied.js +35 -0
  16. package/dist/dist-esm/react-components/src/components/BrowserPermissionDenied.js.map +1 -0
  17. package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.d.ts +75 -0
  18. package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js +57 -0
  19. package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js.map +1 -0
  20. package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.d.ts +20 -2
  21. package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js +6 -2
  22. package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/DomainPermissions.d.ts +8 -0
  24. package/dist/dist-esm/react-components/src/components/DomainPermissions.js +4 -3
  25. package/dist/dist-esm/react-components/src/components/DomainPermissions.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/index.d.ts +5 -1
  27. package/dist/dist-esm/react-components/src/components/index.js +4 -0
  28. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +58 -0
  30. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +144 -0
  31. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +1 -0
  32. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.d.ts +5 -1
  33. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js +12 -1
  34. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +6 -0
  36. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +24 -2
  38. package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
  39. package/dist/dist-esm/react-components/src/theming/icons.js +12 -1
  40. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +2 -0
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js +1 -19
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +1 -1
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +2 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js +1 -20
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +11 -3
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +4 -0
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  51. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -0
  52. package/package.json +8 -8
@@ -52,6 +52,7 @@ import { IContextualMenuItemStyles } from '@fluentui/react';
52
52
  import { IContextualMenuStyles } from '@fluentui/react';
53
53
  import { IDropdownOption } from '@fluentui/react';
54
54
  import { IDropdownStyles } from '@fluentui/react';
55
+ import { ILinkStyles } from '@fluentui/react';
55
56
  import { IMessageBarProps } from '@fluentui/react';
56
57
  import { IncomingCall } from '@azure/communication-calling';
57
58
  import { IPersonaStyleProps } from '@fluentui/react';
@@ -355,6 +356,136 @@ export declare interface BaseCustomStyles {
355
356
  root?: IStyle;
356
357
  }
357
358
 
359
+ /**
360
+ * @beta
361
+ * Props for BrowserPermissionDeniedIOS component.
362
+ */
363
+ export declare interface BrowserPermissionDeniedIOSProps extends BrowserPermissionDeniedProps {
364
+ /**
365
+ * Localization strings for BrowserPermissionDeniedIOS component.
366
+ */
367
+ strings: BrowserPermissionDeniedIOSStrings;
368
+ /**
369
+ * Link to image source.
370
+ *
371
+ * Image is inserted into the top of the component.
372
+ */
373
+ imageSource?: string;
374
+ }
375
+
376
+ /**
377
+ * @beta
378
+ * Strings for BrowserPermissionDeniedIOS component
379
+ */
380
+ export declare interface BrowserPermissionDeniedIOSStrings extends BrowserPermissionDeniedStrings {
381
+ /**
382
+ * Image alt text
383
+ */
384
+ imageAltText: string;
385
+ /**
386
+ * Main text string.
387
+ */
388
+ primaryText: string;
389
+ /**
390
+ * Subtext string.
391
+ */
392
+ secondaryText: string;
393
+ /**
394
+ * Step 1 string
395
+ */
396
+ step1Text: string;
397
+ /**
398
+ * Step 1 digit string
399
+ */
400
+ step1DigitText: string;
401
+ /**
402
+ * Step 2 string
403
+ */
404
+ step2Text: string;
405
+ /**
406
+ * Step 2 digit string
407
+ */
408
+ step2DigitText: string;
409
+ /**
410
+ * Step 3 string
411
+ */
412
+ step3Text: string;
413
+ /**
414
+ * Step 3 digit string
415
+ */
416
+ step3DigitText: string;
417
+ /**
418
+ * Step 4 string
419
+ */
420
+ step4Text: string;
421
+ /**
422
+ * Step 4 digit string
423
+ */
424
+ step4DigitText: string;
425
+ }
426
+
427
+ /**
428
+ * @beta
429
+ * Props for BrowserPermissionDenied component.
430
+ */
431
+ export declare interface BrowserPermissionDeniedProps {
432
+ /**
433
+ * Action to be taken by the more help link. Possible to send to external page or show other modal.
434
+ */
435
+ onTroubleshootingClick: () => void;
436
+ /**
437
+ * Action to be taken by the try again primary button.
438
+ */
439
+ onTryAgainClick: () => void;
440
+ /**
441
+ * Localization strings for BrowserPermissionDenied component.
442
+ */
443
+ strings: BrowserPermissionDeniedStrings;
444
+ /**
445
+ * Allows users to pass in an object contains custom CSS styles.
446
+ * @Example
447
+ * ```
448
+ * <BrowserPermissionDenied styles={{ primaryButton: { root: {backgroundColor: 'blue' }}}} />
449
+ * ```
450
+ */
451
+ styles?: BrowserPermissionDeniedStyles;
452
+ }
453
+
454
+ /**
455
+ * @beta
456
+ * Strings for BrowserPermissionDenied component
457
+ */
458
+ export declare interface BrowserPermissionDeniedStrings {
459
+ /**
460
+ * Main button text string.
461
+ */
462
+ primaryButtonText: string;
463
+ /**
464
+ * Main text string.
465
+ */
466
+ primaryText: string;
467
+ /**
468
+ * Subtext string.
469
+ */
470
+ secondaryText: string;
471
+ /**
472
+ * More help link string.
473
+ */
474
+ linkText: string;
475
+ }
476
+
477
+ /**
478
+ * Fluent styles for {@link BrowserPermissionDenied}.
479
+ *
480
+ * @beta
481
+ */
482
+ export declare interface BrowserPermissionDeniedStyles extends BaseCustomStyles {
483
+ /** Styles for the primary button. */
484
+ primaryButton?: IButtonStyles;
485
+ /** Styles for the help troubleshooting link text. */
486
+ troubleshootingLink?: ILinkStyles;
487
+ }
488
+
358
489
  /**
359
490
  * {@link CallComposite} Adapter interface.
360
491
  *
@@ -1534,6 +1665,7 @@ export declare type CallingHandlers = {
1534
1665
  onDisposeRemoteStreamView: (userId: string) => Promise<void>;
1535
1666
  onDisposeLocalStreamView: () => Promise<void>;
1536
1667
  onSendDtmfTone: (dtmfTone: DtmfTone_2) => Promise<void>;
1668
+ askDevicePermission: (constrain: PermissionConstraints) => Promise<void>;
1537
1669
  };
1538
1670
 
1539
1671
  /**
@@ -3365,6 +3497,10 @@ export declare interface ComponentStrings {
3365
3497
  DomainPermissions: DomainPermissionsStrings;
3366
3498
  /** Strings for unsupported browser UI */
3367
3499
  UnsupportedBrowser: UnsupportedBrowserStrings;
3500
+ /** Strings for BrowserPemissionDenied */
3501
+ BrowserPermissionDenied: BrowserPermissionDeniedStrings;
3502
+ /** Strings for BrowserPemissionDeniedIOS */
3503
+ BrowserPermissionDeniedIOS: BrowserPermissionDeniedIOSStrings;
3368
3504
  }
3369
3505
 
3370
3506
  /**
@@ -4076,6 +4212,7 @@ export declare const DEFAULT_COMPONENT_ICONS: {
4076
4212
  DomainPermissionCamera: JSX.Element;
4077
4213
  DomainPermissionMic: JSX.Element;
4078
4214
  UnsupportedBrowserWarning: JSX.Element;
4215
+ BrowserPermissionDeniedError: JSX.Element;
4079
4216
  };
4080
4217
 
4081
4218
  /**
@@ -4168,6 +4305,7 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
4168
4305
  DomainPermissionCamera: JSX.Element;
4169
4306
  DomainPermissionMic: JSX.Element;
4170
4307
  UnsupportedBrowserWarning: JSX.Element;
4308
+ BrowserPermissionDeniedError: JSX.Element;
4171
4309
  };
4172
4310
 
4173
4311
  /**
@@ -4247,9 +4385,18 @@ export declare interface _DevicePermissionDropdownProps {
4247
4385
  */
4248
4386
  options?: IDropdownOption[];
4249
4387
  /**
4250
- * Function that gets triggered when action button is clicked
4388
+ * Ask for permissions of devices.
4389
+ *
4390
+ * @remarks
4391
+ * Browser permission window will pop up if permissions are not granted yet
4392
+ *
4393
+ * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }
4251
4394
  */
4252
- onClickActionButton?: () => Promise<void>;
4395
+ askDevicePermission?(constrain: _PermissionConstraints): Promise<void>;
4396
+ /**
4397
+ * Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }
4398
+ */
4399
+ constrain?: _PermissionConstraints;
4253
4400
  /**
4254
4401
  * Strings for devicepermissiondropdown
4255
4402
  */
@@ -4559,6 +4706,10 @@ export declare interface DomainPermissionsProps {
4559
4706
  * Action to be taken by the more help link. Possible to send to external page or show other modal.
4560
4707
  */
4561
4708
  onTroubleshootingClick: () => void;
4709
+ /**
4710
+ * Action to be taken by the Allow Access button.
4711
+ */
4712
+ onAllowAccessClick?: () => void;
4562
4713
  /**
4563
4714
  * Localization strings for DomainPermissions component.
4564
4715
  */
@@ -4582,6 +4733,10 @@ export declare interface DomainPermissionsStrings {
4582
4733
  * More help link string.
4583
4734
  */
4584
4735
  linkText: string;
4736
+ /**
4737
+ * Primary button text string.
4738
+ */
4739
+ primaryButtonText: string;
4585
4740
  }
4586
4741
 
4587
4742
  /**
@@ -5046,7 +5201,7 @@ export declare const fromFlatCommunicationIdentifier: (id: string) => Communicat
5046
5201
  *
5047
5202
  * @public
5048
5203
  */
5049
- export declare type GetCallingSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<Component, typeof VideoGallery> extends true ? VideoGallerySelector : AreEqual<Component, typeof DevicesButton> extends true ? DevicesButtonSelector : AreEqual<Component, typeof MicrophoneButton> extends true ? MicrophoneButtonSelector : AreEqual<Component, typeof CameraButton> extends true ? CameraButtonSelector : AreEqual<Component, typeof ScreenShareButton> extends true ? ScreenShareButtonSelector : AreEqual<Component, typeof ParticipantList> extends true ? ParticipantListSelector : AreEqual<Component, typeof ParticipantsButton> extends true ? ParticipantsButtonSelector : AreEqual<Component, typeof EndCallButton> extends true ? EmptySelector : AreEqual<Component, typeof ErrorBar> extends true ? CallErrorBarSelector : AreEqual<Component, typeof Dialpad> extends true ? EmptySelector : AreEqual<Component, typeof HoldButton> extends true ? HoldButtonSelector : undefined;
5204
+ export declare type GetCallingSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<Component, typeof VideoGallery> extends true ? VideoGallerySelector : AreEqual<Component, typeof DevicesButton> extends true ? DevicesButtonSelector : AreEqual<Component, typeof MicrophoneButton> extends true ? MicrophoneButtonSelector : AreEqual<Component, typeof CameraButton> extends true ? CameraButtonSelector : AreEqual<Component, typeof ScreenShareButton> extends true ? ScreenShareButtonSelector : AreEqual<Component, typeof ParticipantList> extends true ? ParticipantListSelector : AreEqual<Component, typeof ParticipantsButton> extends true ? ParticipantsButtonSelector : AreEqual<Component, typeof EndCallButton> extends true ? EmptySelector : AreEqual<Component, typeof ErrorBar> extends true ? CallErrorBarSelector : AreEqual<Component, typeof Dialpad> extends true ? EmptySelector : AreEqual<Component, typeof HoldButton> extends true ? HoldButtonSelector : AreEqual<Component, typeof _DevicePermissionDropdown> extends true ? EmptySelector : undefined;
5050
5205
 
5051
5206
  /**
5052
5207
  * Get the selector for a specified component.
@@ -6460,6 +6615,16 @@ export declare type ParticipantsRemovedListener = (event: {
6460
6615
  */
6461
6616
  export declare type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
6462
6617
 
6618
+ /**
6619
+ * Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }
6620
+ *
6621
+ * @internal
6622
+ */
6623
+ export declare type _PermissionConstraints = {
6624
+ audio: boolean;
6625
+ video: boolean;
6626
+ };
6627
+
6463
6628
  /**
6464
6629
  * An array of key value pairs that stores each sender's display name and last read message
6465
6630
  *