@azure/communication-react 1.3.3-alpha-202209100018.0 → 1.3.3-alpha-202209140018.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 (21) hide show
  1. package/dist/dist-cjs/communication-react/index.js +57 -39
  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/acs-ui-common/src/telemetryVersion.js.map +1 -1
  5. package/dist/dist-esm/react-components/src/components/CameraButton.js +1 -7
  6. package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
  7. package/dist/dist-esm/react-components/src/components/DevicesButton.js +1 -11
  8. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  9. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +1 -5
  10. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +3 -8
  12. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
  13. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +16 -3
  14. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +5 -5
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +18 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +17 -6
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  21. package/package.json +8 -8
@@ -1,9 +1,13 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { DevicesButton } from "../../../../../../react-components/src";
4
+ /* @conditional-compile-remove(rooms) */
5
+ import { _usePermissions } from "../../../../../../react-components/src";
4
6
  import React, { useMemo } from 'react';
5
7
  import { usePropsFor } from '../../hooks/usePropsFor';
6
8
  import { concatButtonBaseStyles, devicesButtonWithIncreasedTouchTargets } from '../../styles/Buttons.styles';
9
+ /* @conditional-compile-remove(rooms) */
10
+ import { useLocale } from '../../../localization';
7
11
  /** @private */
8
12
  export const Devices = (props) => {
9
13
  const devicesButtonProps = usePropsFor(DevicesButton);
@@ -11,10 +15,23 @@ export const Devices = (props) => {
11
15
  var _a;
12
16
  return concatButtonBaseStyles(props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {}, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
13
17
  }, [props.increaseFlyoutItemSize, props.styles]);
18
+ /* @conditional-compile-remove(rooms) */
19
+ const permissions = _usePermissions();
20
+ /* @conditional-compile-remove(rooms) */
21
+ const locale = useLocale();
14
22
  return (React.createElement(DevicesButton
15
23
  /* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
16
24
  , Object.assign({
17
25
  /* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
18
- persistMenu: true }, devicesButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled })));
26
+ persistMenu: true }, devicesButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
27
+ /* @conditional-compile-remove(rooms) */
28
+ strings: getLabelFromPermissions(permissions, locale) })));
29
+ };
30
+ /* @conditional-compile-remove(rooms) */
31
+ const getLabelFromPermissions = (permissions, locale) => {
32
+ if (!permissions.cameraButton && !permissions.microphoneButton) {
33
+ return { label: locale.component.strings.microphoneButton.speakerMenuTitle };
34
+ }
35
+ return undefined;
19
36
  };
20
37
  //# sourceMappingURL=Devices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Devices.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Devices.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA0B,aAAa,EAAE,+CAAmC;AACnF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,sCAAsC,EAAE,MAAM,6BAA6B,CAAC;AAE7G,eAAe;AACf,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAKvB,EAAe,EAAE;IAChB,MAAM,kBAAkB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE;;QACH,OAAA,sBAAsB,CACpB,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,EAAE,EAC1E,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CACnB,CAAA;KAAA,EACH,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAC7C,CAAC;IAEF,OAAO,CACL,oBAAC,aAAa;IACZ,8HAA8H;;QAA9H,8HAA8H;QAC9H,WAAW,EAAE,IAAI,IACb,kBAAkB,IACtB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,gBACH,kCAAkC,EAC7C,QAAQ,EAAE,KAAK,CAAC,QAAQ,IACxB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ControlBarButtonStyles, DevicesButton } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { CallControlDisplayType } from '../../types/CallControlOptions';\nimport { concatButtonBaseStyles, devicesButtonWithIncreasedTouchTargets } from '../../styles/Buttons.styles';\n\n/** @private */\nexport const Devices = (props: {\n displayType?: CallControlDisplayType;\n increaseFlyoutItemSize?: boolean;\n styles?: ControlBarButtonStyles;\n disabled?: boolean;\n}): JSX.Element => {\n const devicesButtonProps = usePropsFor(DevicesButton);\n const styles = useMemo(\n () =>\n concatButtonBaseStyles(\n props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {},\n props.styles ?? {}\n ),\n [props.increaseFlyoutItemSize, props.styles]\n );\n\n return (\n <DevicesButton\n /* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */\n persistMenu={true}\n {...devicesButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n data-ui-id=\"calling-composite-devices-button\"\n disabled={props.disabled}\n />\n );\n};\n\"../../../../../../react-components/src\""]}
1
+ {"version":3,"file":"Devices.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Devices.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA0B,aAAa,EAAE,+CAAmC;AACnF,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAsC,+CAAmC;AACjG,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,sCAAsC,EAAE,MAAM,6BAA6B,CAAC;AAC7G,wCAAwC;AACxC,OAAO,EAAmB,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEnE,eAAe;AACf,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAKvB,EAAe,EAAE;IAChB,MAAM,kBAAkB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE;;QACH,OAAA,sBAAsB,CACpB,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,EAAE,EAC1E,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CACnB,CAAA;KAAA,EACH,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAC7C,CAAC;IAEF,wCAAwC;IACxC,MAAM,WAAW,GAAG,eAAe,EAAE,CAAC;IACtC,wCAAwC;IACxC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,oBAAC,aAAa;IACZ,8HAA8H;;QAA9H,8HAA8H;QAC9H,WAAW,EAAE,IAAI,IACb,kBAAkB,IACtB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,gBACH,kCAAkC,EAC7C,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,wCAAwC;QACxC,OAAO,EAAE,uBAAuB,CAAC,WAAW,EAAE,MAAM,CAAC,IACrD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,wCAAwC;AACxC,MAAM,uBAAuB,GAAG,CAC9B,WAAyB,EACzB,MAAuB,EACoB,EAAE;IAC7C,IAAI,CAAC,WAAW,CAAC,YAAY,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE;QAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;KAC9E;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ControlBarButtonStyles, DevicesButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions, _Permissions, DevicesButtonStrings } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { CallControlDisplayType } from '../../types/CallControlOptions';\nimport { concatButtonBaseStyles, devicesButtonWithIncreasedTouchTargets } from '../../styles/Buttons.styles';\n/* @conditional-compile-remove(rooms) */\nimport { CompositeLocale, useLocale } from '../../../localization';\n\n/** @private */\nexport const Devices = (props: {\n displayType?: CallControlDisplayType;\n increaseFlyoutItemSize?: boolean;\n styles?: ControlBarButtonStyles;\n disabled?: boolean;\n}): JSX.Element => {\n const devicesButtonProps = usePropsFor(DevicesButton);\n const styles = useMemo(\n () =>\n concatButtonBaseStyles(\n props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {},\n props.styles ?? {}\n ),\n [props.increaseFlyoutItemSize, props.styles]\n );\n\n /* @conditional-compile-remove(rooms) */\n const permissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n const locale = useLocale();\n\n return (\n <DevicesButton\n /* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */\n persistMenu={true}\n {...devicesButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n data-ui-id=\"calling-composite-devices-button\"\n disabled={props.disabled}\n /* @conditional-compile-remove(rooms) */\n strings={getLabelFromPermissions(permissions, locale)}\n />\n );\n};\n\n/* @conditional-compile-remove(rooms) */\nconst getLabelFromPermissions = (\n permissions: _Permissions,\n locale: CompositeLocale\n): Partial<DevicesButtonStrings> | undefined => {\n if (!permissions.cameraButton && !permissions.microphoneButton) {\n return { label: locale.component.strings.microphoneButton.speakerMenuTitle };\n }\n return undefined;\n};\n\"../../../../../../react-components/src\""]}
@@ -42,21 +42,32 @@ export const ConfigurationPage = (props) => {
42
42
  const locale = useLocale();
43
43
  const title = (React.createElement(Stack.Item, { className: mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop }, locale.strings.call.configurationPageTitle));
44
44
  const callDescription = locale.strings.call.configurationPageCallDetails && (React.createElement(Stack.Item, { className: mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop }, locale.strings.call.configurationPageCallDetails));
45
+ let mobileWithPreview = mobileView;
46
+ /* @conditional-compile-remove(rooms) */
47
+ mobileWithPreview = mobileWithPreview && rolePermissions.cameraButton;
45
48
  return (React.createElement(Stack, { className: mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop },
46
49
  React.createElement(Stack, { styles: bannerNotificationStyles },
47
50
  React.createElement(ErrorBar, Object.assign({}, errorBarProps))),
48
- React.createElement(Stack, { grow: true, horizontal: !mobileView, horizontalAlign: mobileView ? 'stretch' : 'center', verticalAlign: "center", tokens: mobileView ? configurationStackTokensMobile : configurationStackTokensDesktop },
49
- mobileView && (React.createElement(Stack.Item, null,
51
+ React.createElement(Stack, { grow: true, horizontal: !mobileWithPreview, horizontalAlign: mobileWithPreview ? 'stretch' : 'center', verticalAlign: "center", tokens: mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop },
52
+ mobileWithPreview && (React.createElement(Stack.Item, null,
50
53
  title,
51
54
  callDescription)),
52
- React.createElement(LocalPreview, { mobileView: mobileView, showDevicesButton: mobileView }),
55
+ localPreviewTrampoline(mobileWithPreview,
56
+ /* @conditional-compile-remove(rooms) */ !rolePermissions.cameraButton),
53
57
  React.createElement(Stack, { className: mobileView ? undefined : selectionContainerStyle },
54
- !mobileView && (React.createElement(React.Fragment, null,
58
+ !mobileWithPreview && (React.createElement(React.Fragment, null,
55
59
  React.createElement(Stack.Item, { styles: callDetailsContainerStylesDesktop },
56
60
  title,
57
61
  callDescription),
58
62
  React.createElement(LocalDeviceSettings, Object.assign({}, options, localDeviceSettingsHandlers, { cameraPermissionGranted: cameraPermissionGranted, microphonePermissionGranted: microphonePermissionGranted })))),
59
- React.createElement(Stack, { styles: mobileView ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop },
60
- React.createElement(StartCallButton, { className: mobileView ? startCallButtonStyleMobile : undefined, onClick: startCallHandler, disabled: disableStartCallButton }))))));
63
+ React.createElement(Stack, { styles: mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop },
64
+ React.createElement(StartCallButton, { className: mobileWithPreview ? startCallButtonStyleMobile : undefined, onClick: startCallHandler, disabled: disableStartCallButton }))))));
65
+ };
66
+ const localPreviewTrampoline = (mobileView, doNotShow) => {
67
+ /* @conditional-compile-remove(rooms) */
68
+ if (doNotShow) {
69
+ return undefined;
70
+ }
71
+ return React.createElement(LocalPreview, { mobileView: mobileView, showDevicesButton: mobileView });
61
72
  };
62
73
  //# sourceMappingURL=ConfigurationPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,4CAAmC;AACrE,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,sDAA6C;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EAC9B,kCAAkC,EAClC,iCAAiC,EACjC,uBAAuB,EACvB,oCAAoC,EACpC,mCAAmC,EACnC,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE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,oBAAC,KAAK,IAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,oCAAoC;oBACpG,oBAAC,eAAe,IACd,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,SAAS,EAC9D,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,sBAAsB,GAChC,CACI,CACF,CACF,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { DevicesButton, ErrorBar } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Stack } from '@fluentui/react';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyleDesktop,\n configurationContainerStyleMobile,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile,\n callDetailsContainerStylesDesktop\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const { startCallHandler, mobileView } = props;\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n if (!rolePermissions.microphoneButton) {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n const locale = useLocale();\n const title = (\n <Stack.Item className={mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop}>\n {locale.strings.call.configurationPageTitle}\n </Stack.Item>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n return (\n <Stack className={mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop}>\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n <Stack\n grow\n horizontal={!mobileView}\n horizontalAlign={mobileView ? 'stretch' : 'center'}\n verticalAlign=\"center\"\n tokens={mobileView ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n {mobileView && (\n <Stack.Item>\n {title}\n {callDescription}\n </Stack.Item>\n )}\n <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />\n <Stack className={mobileView ? undefined : selectionContainerStyle}>\n {!mobileView && (\n <>\n <Stack.Item styles={callDetailsContainerStylesDesktop}>\n {title}\n {callDescription}\n </Stack.Item>\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGranted}\n microphonePermissionGranted={microphonePermissionGranted}\n />\n </>\n )}\n <Stack styles={mobileView ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}>\n <StartCallButton\n className={mobileView ? startCallButtonStyleMobile : undefined}\n onClick={startCallHandler}\n disabled={disableStartCallButton}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n );\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
1
+ {"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,4CAAmC;AACrE,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAgB,4CAAmC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,sDAA6C;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EAC9B,kCAAkC,EAClC,iCAAiC,EACjC,uBAAuB,EACvB,oCAAoC,EACpC,mCAAmC,EACnC,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,oCAAoC,CAA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,KAAK;wBACL,eAAe,CACL;oBACb,oBAAC,mBAAmB,oBACd,OAAO,EACP,2BAA2B,IAC/B,uBAAuB,EAAE,uBAAuB,EAChD,2BAA2B,EAAE,2BAA2B,IACxD,CACD,CACJ;gBACD,oBAAC,KAAK,IACJ,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,oCAAoC;oBAEtG,oBAAC,eAAe,IACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,SAAS,EACrE,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,sBAAsB,GAChC,CACI,CACF,CACF,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,UAAmB,EAAE,SAAmB,EAA2B,EAAE;IACnG,wCAAwC;IACxC,IAAI,SAAS,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,oBAAC,YAAY,IAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,GAAI,CAAC;AACjF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { DevicesButton, ErrorBar } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions, _Permissions } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Stack } from '@fluentui/react';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyleDesktop,\n configurationContainerStyleMobile,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile,\n callDetailsContainerStylesDesktop\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const { startCallHandler, mobileView } = props;\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n if (!rolePermissions.microphoneButton) {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n const locale = useLocale();\n const title = (\n <Stack.Item className={mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop}>\n {locale.strings.call.configurationPageTitle}\n </Stack.Item>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n let mobileWithPreview = mobileView;\n /* @conditional-compile-remove(rooms) */\n mobileWithPreview = mobileWithPreview && rolePermissions.cameraButton;\n\n return (\n <Stack className={mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop}>\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n <Stack\n grow\n horizontal={!mobileWithPreview}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'center'}\n verticalAlign=\"center\"\n tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n {mobileWithPreview && (\n <Stack.Item>\n {title}\n {callDescription}\n </Stack.Item>\n )}\n {localPreviewTrampoline(\n mobileWithPreview,\n /* @conditional-compile-remove(rooms) */ !rolePermissions.cameraButton\n )}\n <Stack className={mobileView ? undefined : selectionContainerStyle}>\n {!mobileWithPreview && (\n <>\n <Stack.Item styles={callDetailsContainerStylesDesktop}>\n {title}\n {callDescription}\n </Stack.Item>\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGranted}\n microphonePermissionGranted={microphonePermissionGranted}\n />\n </>\n )}\n <Stack\n styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}\n >\n <StartCallButton\n className={mobileWithPreview ? startCallButtonStyleMobile : undefined}\n onClick={startCallHandler}\n disabled={disableStartCallButton}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n );\n};\n\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n /* @conditional-compile-remove(rooms) */\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.3.3-alpha-202209100018.0",
3
+ "version": "1.3.3-alpha-202209140018.0",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -86,13 +86,13 @@
86
86
  "@azure/core-auth": "1.3.2",
87
87
  "@babel/cli": "~7.16.0",
88
88
  "@babel/core": "~7.16.0",
89
- "@internal/calling-component-bindings": "1.3.3-alpha-202209100018.0",
90
- "@internal/calling-stateful-client": "1.3.3-alpha-202209100018.0",
91
- "@internal/chat-component-bindings": "1.3.3-alpha-202209100018.0",
92
- "@internal/chat-stateful-client": "1.3.3-alpha-202209100018.0",
93
- "@internal/fake-backends": "1.3.3-alpha-202209100018.0",
94
- "@internal/react-components": "1.3.3-alpha-202209100018.0",
95
- "@internal/react-composites": "1.3.3-alpha-202209100018.0",
89
+ "@internal/calling-component-bindings": "1.3.3-alpha-202209140018.0",
90
+ "@internal/calling-stateful-client": "1.3.3-alpha-202209140018.0",
91
+ "@internal/chat-component-bindings": "1.3.3-alpha-202209140018.0",
92
+ "@internal/chat-stateful-client": "1.3.3-alpha-202209140018.0",
93
+ "@internal/fake-backends": "1.3.3-alpha-202209140018.0",
94
+ "@internal/react-components": "1.3.3-alpha-202209140018.0",
95
+ "@internal/react-composites": "1.3.3-alpha-202209140018.0",
96
96
  "@microsoft/api-documenter": "~7.12.11",
97
97
  "@microsoft/api-extractor": "~7.18.0",
98
98
  "@rollup/plugin-json": "~4.1.0",