@azure/communication-react 1.5.1-alpha-202305260013 → 1.5.1-alpha-202305270013

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 (33) hide show
  1. package/dist/communication-react.d.ts +2 -2
  2. package/dist/dist-cjs/communication-react/index.js +168 -42
  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/DevicesButton.js +9 -0
  7. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +5 -0
  9. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
  10. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.d.ts +5 -0
  12. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js +23 -5
  13. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +127 -28
  15. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +2 -1
  17. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +2 -2
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +3 -3
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js +0 -1
  29. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  33. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"VideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/VideoEffectsPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,2DAA2D;AAC3D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,2DAA2D;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,2DAA2D;AAC3D,OAAO,EAAE,6BAA6B,EAAE,yCAAmC;AAQ3E,2DAA2D;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,gEAAgE,CAAC;AACrH,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,2DAA2D;AAC3D,OAAO,EAAE,UAAU,EAAE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ACT,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC;AAEF,2DAA2D;AAC3D,MAAM,sBAAsB,GAAG;IAC7B,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,KAAK;KAClB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { MessageBar, MessageBarType, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useLocale } from '../localization';\nimport { _VideoEffectsItemProps } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport { _VideoBackgroundEffectsPicker } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport {\n VideoBackgroundImage,\n VideoBackgroundBlurEffect,\n VideoBackgroundNoneEffect,\n VideoBackgroundReplacementEffect\n} from '../CallComposite';\n/* @conditional-compile-remove(video-background-effects) */\nimport { activeVideoBackgroundEffectSelector } from '../CallComposite/selectors/activeVideoBackgroundEffectSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useSelector } from '../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { AdapterError } from './adapters';\n/* @conditional-compile-remove(video-background-effects) */\nimport { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';\n\n/**\n * Pane that is used to show video effects button\n * @private\n */\n/** @beta */\nexport const VideoEffectsPaneContent = (props: {\n onDismissError: (error: AdapterError) => void;\n activeVideoEffectError: () => AdapterError | undefined;\n}): JSX.Element => {\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n /* @conditional-compile-remove(video-background-effects) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(video-background-effects) */\n const strings = locale.strings.call;\n /* @conditional-compile-remove(video-background-effects) */\n const selectableVideoEffects: _VideoEffectsItemProps[] = useMemo(() => {\n const videoEffects: _VideoEffectsItemProps[] = [\n {\n itemKey: 'none',\n iconProps: {\n iconName: 'RemoveVideoBackgroundEffect'\n },\n title: strings.removeBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.removeBackgroundTooltip\n }\n },\n {\n itemKey: 'blur',\n iconProps: {\n iconName: 'BlurVideoBackground'\n },\n title: strings.blurBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.blurBackgroundTooltip\n }\n }\n ];\n const videoEffectImages = adapter.getState().videoBackgroundImages;\n\n if (videoEffectImages) {\n videoEffectImages.forEach((img: VideoBackgroundImage) => {\n videoEffects.push({\n itemKey: img.key,\n backgroundProps: {\n url: img.url\n },\n tooltipProps: {\n content: img.tooltipText ?? ''\n }\n });\n });\n }\n return videoEffects;\n }, [strings, adapter]);\n\n /* @conditional-compile-remove(video-background-effects) */\n const onEffectChange = useCallback(\n async (effectKey: string) => {\n if (effectKey === 'blur') {\n const blurEffect: VideoBackgroundBlurEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(blurEffect);\n await adapter.blurVideoBackground();\n } else if (effectKey === 'none') {\n const noneEffect: VideoBackgroundNoneEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(noneEffect);\n await adapter.stopVideoBackgroundEffects();\n } else {\n const backgroundImg = selectableVideoEffects.find((effect) => {\n return effect.itemKey === effectKey;\n });\n if (backgroundImg && backgroundImg.backgroundProps) {\n const replaceEffect: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n effectKey,\n backgroundImageUrl: backgroundImg.backgroundProps.url\n };\n adapter.updateSelectedVideoBackgroundEffect(replaceEffect);\n await adapter.replaceVideoBackground({ backgroundImageUrl: backgroundImg.backgroundProps.url });\n }\n }\n },\n [adapter, selectableVideoEffects]\n );\n return VideoEffectsPaneTrampoline(\n props.onDismissError,\n props.activeVideoEffectError,\n /* @conditional-compile-remove(video-background-effects) */\n selectableVideoEffects,\n /* @conditional-compile-remove(video-background-effects) */\n onEffectChange\n );\n};\n\nconst VideoEffectsPaneTrampoline = (\n onDismissError: (error: AdapterError) => void,\n activeVideoEffectError?: () => AdapterError | undefined,\n selectableVideoEffects?: _VideoEffectsItemProps[],\n onEffectChange?: (effectKey: string) => Promise<void>\n): JSX.Element => {\n /* @conditional-compile-remove(video-background-effects) */\n const videoEffectError = activeVideoEffectError && activeVideoEffectError();\n /* @conditional-compile-remove(video-background-effects) */\n const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);\n /* @conditional-compile-remove(video-background-effects) */\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n /* @conditional-compile-remove(video-background-effects) */\n const showWarning = !isCameraOn && selectedEffect !== 'none';\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n\n /* @conditional-compile-remove(video-background-effects) */\n return (\n <Stack horizontalAlign=\"center\">\n {videoEffectError && (\n <MessageBar messageBarType={MessageBarType.error} onDismiss={() => onDismissError(videoEffectError)}>\n {locale.strings.call.unableToStartVideoEffect}\n </MessageBar>\n )}\n {showWarning && (\n <MessageBar messageBarType={MessageBarType.warning}>\n {locale.strings.call.cameraOffBackgroundEffectWarningText}\n </MessageBar>\n )}\n <_VideoBackgroundEffectsPicker\n label={locale.strings.call.videoEffectsPaneBackgroundSelectionTitle}\n styles={backgroundPickerStyles}\n options={selectableVideoEffects ?? []}\n onChange={onEffectChange}\n selectedEffectKey={selectedEffect}\n />\n </Stack>\n );\n return <></>;\n};\n\n/* @conditional-compile-remove(video-background-effects) */\nconst backgroundPickerStyles = {\n label: {\n fontSize: '0.75rem',\n lineHeight: '0.5rem',\n fontWeight: '400'\n }\n};\n\"../../../../react-components/src\""]}
1
+ {"version":3,"file":"VideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/VideoEffectsPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;A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,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC,IAChG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAClC,CACd;QACA,WAAW,IAAI,CACd,oBAAC,UAAU,IAAC,cAAc,EAAE,cAAc,CAAC,OAAO,IAC/C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAC9C,CACd;QACD,oBAAC,6BAA6B,IAC5B,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EACnE,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE,EACrC,QAAQ,EAAE,cAAc,EACxB,iBAAiB,EAAE,cAAc,GACjC,CACI,CACT,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC;AAEF,2DAA2D;AAC3D,MAAM,sBAAsB,GAAG;IAC7B,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,KAAK;KAClB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { MessageBar, MessageBarType, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useLocale } from '../localization';\nimport { _VideoEffectsItemProps } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport { _VideoBackgroundEffectsPicker } from '@internal/react-components';\n/* @conditional-compile-remove(video-background-effects) */\nimport {\n VideoBackgroundImage,\n VideoBackgroundBlurEffect,\n VideoBackgroundNoEffect,\n VideoBackgroundReplacementEffect\n} from '../CallComposite';\n/* @conditional-compile-remove(video-background-effects) */\nimport { activeVideoBackgroundEffectSelector } from '../CallComposite/selectors/activeVideoBackgroundEffectSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useSelector } from '../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { AdapterError } from './adapters';\n/* @conditional-compile-remove(video-background-effects) */\nimport { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';\n\n/**\n * Pane that is used to show video effects button\n * @private\n */\n/** @beta */\nexport const VideoEffectsPaneContent = (props: {\n onDismissError: (error: AdapterError) => void;\n activeVideoEffectError: () => AdapterError | undefined;\n}): JSX.Element => {\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n /* @conditional-compile-remove(video-background-effects) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(video-background-effects) */\n const strings = locale.strings.call;\n /* @conditional-compile-remove(video-background-effects) */\n const selectableVideoEffects: _VideoEffectsItemProps[] = useMemo(() => {\n const videoEffects: _VideoEffectsItemProps[] = [\n {\n itemKey: 'none',\n iconProps: {\n iconName: 'RemoveVideoBackgroundEffect'\n },\n title: strings.removeBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.removeBackgroundTooltip\n }\n },\n {\n itemKey: 'blur',\n iconProps: {\n iconName: 'BlurVideoBackground'\n },\n title: strings.blurBackgroundEffectButtonLabel,\n tooltipProps: {\n content: strings.blurBackgroundTooltip\n }\n }\n ];\n const videoEffectImages = adapter.getState().videoBackgroundImages;\n\n if (videoEffectImages) {\n videoEffectImages.forEach((img: VideoBackgroundImage) => {\n videoEffects.push({\n itemKey: img.key,\n backgroundProps: {\n url: img.url\n },\n tooltipProps: {\n content: img.tooltipText ?? ''\n }\n });\n });\n }\n return videoEffects;\n }, [strings, adapter]);\n\n /* @conditional-compile-remove(video-background-effects) */\n const onEffectChange = useCallback(\n async (effectKey: string) => {\n if (effectKey === 'blur') {\n const blurEffect: VideoBackgroundBlurEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(blurEffect);\n await adapter.blurVideoBackground();\n } else if (effectKey === 'none') {\n const noneEffect: VideoBackgroundNoEffect = {\n effectName: effectKey\n };\n adapter.updateSelectedVideoBackgroundEffect(noneEffect);\n await adapter.stopVideoBackgroundEffects();\n } else {\n const backgroundImg = selectableVideoEffects.find((effect) => {\n return effect.itemKey === effectKey;\n });\n if (backgroundImg && backgroundImg.backgroundProps) {\n const replaceEffect: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n effectKey,\n backgroundImageUrl: backgroundImg.backgroundProps.url\n };\n adapter.updateSelectedVideoBackgroundEffect(replaceEffect);\n await adapter.replaceVideoBackground({ backgroundImageUrl: backgroundImg.backgroundProps.url });\n }\n }\n },\n [adapter, selectableVideoEffects]\n );\n return VideoEffectsPaneTrampoline(\n props.onDismissError,\n props.activeVideoEffectError,\n /* @conditional-compile-remove(video-background-effects) */\n selectableVideoEffects,\n /* @conditional-compile-remove(video-background-effects) */\n onEffectChange\n );\n};\n\nconst VideoEffectsPaneTrampoline = (\n onDismissError: (error: AdapterError) => void,\n activeVideoEffectError?: () => AdapterError | undefined,\n selectableVideoEffects?: _VideoEffectsItemProps[],\n onEffectChange?: (effectKey: string) => Promise<void>\n): JSX.Element => {\n /* @conditional-compile-remove(video-background-effects) */\n const videoEffectError = activeVideoEffectError && activeVideoEffectError();\n /* @conditional-compile-remove(video-background-effects) */\n const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);\n /* @conditional-compile-remove(video-background-effects) */\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n /* @conditional-compile-remove(video-background-effects) */\n const showWarning = !isCameraOn && selectedEffect !== 'none';\n /* @conditional-compile-remove(video-background-effects) */\n const locale = useLocale();\n\n /* @conditional-compile-remove(video-background-effects) */\n return (\n <Stack horizontalAlign=\"center\">\n {videoEffectError && (\n <MessageBar messageBarType={MessageBarType.error} onDismiss={() => onDismissError(videoEffectError)}>\n {locale.strings.call.unableToStartVideoEffect}\n </MessageBar>\n )}\n {showWarning && (\n <MessageBar messageBarType={MessageBarType.warning}>\n {locale.strings.call.cameraOffBackgroundEffectWarningText}\n </MessageBar>\n )}\n <_VideoBackgroundEffectsPicker\n label={locale.strings.call.videoEffectsPaneBackgroundSelectionTitle}\n styles={backgroundPickerStyles}\n options={selectableVideoEffects ?? []}\n onChange={onEffectChange}\n selectedEffectKey={selectedEffect}\n />\n </Stack>\n );\n return <></>;\n};\n\n/* @conditional-compile-remove(video-background-effects) */\nconst backgroundPickerStyles = {\n label: {\n fontSize: '0.75rem',\n lineHeight: '0.5rem',\n fontWeight: '400'\n }\n};\n\"../../../../react-components/src\""]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.5.1-alpha-202305260013",
3
+ "version": "1.5.1-alpha-202305270013",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -93,13 +93,13 @@
93
93
  "@babel/cli": "~7.16.0",
94
94
  "@babel/core": "~7.16.0",
95
95
  "@fluentui/react-northstar": "0.61.0",
96
- "@internal/calling-component-bindings": "1.5.1-alpha-202305260013",
97
- "@internal/calling-stateful-client": "1.5.1-alpha-202305260013",
98
- "@internal/chat-component-bindings": "1.5.1-alpha-202305260013",
99
- "@internal/chat-stateful-client": "1.5.1-alpha-202305260013",
100
- "@internal/fake-backends": "1.5.1-alpha-202305260013",
101
- "@internal/react-components": "1.5.1-alpha-202305260013",
102
- "@internal/react-composites": "1.5.1-alpha-202305260013",
96
+ "@internal/calling-component-bindings": "1.5.1-alpha-202305270013",
97
+ "@internal/calling-stateful-client": "1.5.1-alpha-202305270013",
98
+ "@internal/chat-component-bindings": "1.5.1-alpha-202305270013",
99
+ "@internal/chat-stateful-client": "1.5.1-alpha-202305270013",
100
+ "@internal/fake-backends": "1.5.1-alpha-202305270013",
101
+ "@internal/react-components": "1.5.1-alpha-202305270013",
102
+ "@internal/react-composites": "1.5.1-alpha-202305270013",
103
103
  "@microsoft/api-documenter": "~7.12.11",
104
104
  "@microsoft/api-extractor": "~7.18.0",
105
105
  "@rollup/plugin-json": "~4.1.0",