@azure/communication-react 1.18.0-alpha-202406260014 → 1.18.0-alpha-202406270014
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.
- package/dist/communication-react.d.ts +76 -75
 - package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-_hqOwT_h.js → ChatMessageComponentAsRichTextEditBox-wvY5Rvxk.js} +2 -2
 - package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-_hqOwT_h.js.map → ChatMessageComponentAsRichTextEditBox-wvY5Rvxk.js.map} +1 -1
 - package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D-KYGmZ9.js → RichTextSendBoxWrapper-Cm6AVfYa.js} +2 -2
 - package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D-KYGmZ9.js.map → RichTextSendBoxWrapper-Cm6AVfYa.js.map} +1 -1
 - package/dist/dist-cjs/communication-react/{index-DCf8u3Nr.js → index-CQFUKJFW.js} +25 -52
 - package/dist/dist-cjs/communication-react/index-CQFUKJFW.js.map +1 -0
 - package/dist/dist-cjs/communication-react/index.js +3 -3
 - package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
 - package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
 - package/dist/dist-esm/calling-component-bindings/src/{errorNotificationsSelector.d.ts → errorNotificationStackSelector.d.ts} +3 -3
 - package/dist/dist-esm/calling-component-bindings/src/{errorNotificationsSelector.js → errorNotificationStackSelector.js} +2 -2
 - package/dist/dist-esm/calling-component-bindings/src/errorNotificationStackSelector.js.map +1 -0
 - package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -2
 - package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
 - package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
 - package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
 - package/dist/dist-esm/communication-react/src/index.js +1 -1
 - package/dist/dist-esm/communication-react/src/index.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/{NotificationBar.d.ts → Notification.d.ts} +8 -8
 - package/dist/dist-esm/react-components/src/components/{NotificationBar.js → Notification.js} +5 -5
 - package/dist/dist-esm/react-components/src/components/Notification.js.map +1 -0
 - package/dist/dist-esm/react-components/src/components/{Notifications.d.ts → NotificationStack.d.ts} +42 -42
 - package/dist/dist-esm/react-components/src/components/{Notifications.js → NotificationStack.js} +7 -7
 - package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -0
 - package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
 - package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/index.d.ts +2 -2
 - package/dist/dist-esm/react-components/src/components/index.js +2 -2
 - package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/{NotificationBar.styles.d.ts → Notification.styles.d.ts} +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/{NotificationBar.styles.js → Notification.styles.js} +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/Notification.styles.js.map +1 -0
 - package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
 - package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
 - package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +3 -3
 - package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
 - package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +2 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BadNetworkQualityNotificationBar.js +2 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BadNetworkQualityNotificationBar.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +2 -3
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +2 -3
 - package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +2 -40
 - package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
 - package/package.json +2 -2
 - package/dist/dist-cjs/communication-react/index-DCf8u3Nr.js.map +0 -1
 - package/dist/dist-esm/calling-component-bindings/src/errorNotificationsSelector.js.map +0 -1
 - package/dist/dist-esm/react-components/src/components/NotificationBar.js.map +0 -1
 - package/dist/dist-esm/react-components/src/components/Notifications.js.map +0 -1
 - package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.js.map +0 -1
 
| 
         @@ -1,15 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import React from 'react';
         
     | 
| 
       2 
2 
     | 
    
         
             
            import { ActiveErrorMessage } from "../../../../react-components/src";
         
     | 
| 
       3 
3 
     | 
    
         
             
            import { ActiveVideoEffect } from '../CallComposite/components/SidePane/useVideoEffectsPane';
         
     | 
| 
       4 
     | 
    
         
            -
            import { ActiveNotification } from "../../../../react-components/src";
         
     | 
| 
       5 
4 
     | 
    
         
             
            /**
         
     | 
| 
       6 
5 
     | 
    
         
             
             * Pane that is used to show video effects button
         
     | 
| 
       7 
6 
     | 
    
         
             
             * @private
         
     | 
| 
       8 
7 
     | 
    
         
             
             */
         
     | 
| 
       9 
8 
     | 
    
         
             
            /** @beta */
         
     | 
| 
       10 
9 
     | 
    
         
             
            export declare const VideoEffectsPaneContent: (props: {
         
     | 
| 
       11 
     | 
    
         
            -
                activeVideoEffectError?: ActiveErrorMessage 
     | 
| 
       12 
     | 
    
         
            -
                onDismissError: (error: ActiveErrorMessage 
     | 
| 
      
 10 
     | 
    
         
            +
                activeVideoEffectError?: ActiveErrorMessage;
         
     | 
| 
      
 11 
     | 
    
         
            +
                onDismissError: (error: ActiveErrorMessage) => void;
         
     | 
| 
       13 
12 
     | 
    
         
             
                activeVideoEffectChange: (effect: ActiveVideoEffect) => void;
         
     | 
| 
       14 
13 
     | 
    
         
             
                updateFocusHandle: React.RefObject<{
         
     | 
| 
       15 
14 
     | 
    
         
             
                    focus: () => void;
         
     | 
| 
         @@ -10,8 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge 
     | 
|
| 
       10 
10 
     | 
    
         
             
                });
         
     | 
| 
       11 
11 
     | 
    
         
             
            };
         
     | 
| 
       12 
12 
     | 
    
         
             
            import React from 'react';
         
     | 
| 
       13 
     | 
    
         
            -
            /* @conditional-compile-remove(notifications) */
         
     | 
| 
       14 
     | 
    
         
            -
            import { useState } from 'react';
         
     | 
| 
       15 
13 
     | 
    
         
             
            import { useCallback, useMemo } from 'react';
         
     | 
| 
       16 
14 
     | 
    
         
             
            import { MessageBar, MessageBarType, Stack, mergeStyles } from '@fluentui/react';
         
     | 
| 
       17 
15 
     | 
    
         
             
            import { useLocale } from '../localization';
         
     | 
| 
         @@ -20,8 +18,6 @@ import { activeVideoBackgroundEffectSelector } from '../CallComposite/selectors/ 
     | 
|
| 
       20 
18 
     | 
    
         
             
            import { useSelector } from '../CallComposite/hooks/useSelector';
         
     | 
| 
       21 
19 
     | 
    
         
             
            import { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';
         
     | 
| 
       22 
20 
     | 
    
         
             
            import { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';
         
     | 
| 
       23 
     | 
    
         
            -
            /* @conditional-compile-remove(notifications) */
         
     | 
| 
       24 
     | 
    
         
            -
            import { NotificationBar } from "../../../../react-components/src";
         
     | 
| 
       25 
21 
     | 
    
         
             
            /**
         
     | 
| 
       26 
22 
     | 
    
         
             
             * Pane that is used to show video effects button
         
     | 
| 
       27 
23 
     | 
    
         
             
             * @private
         
     | 
| 
         @@ -121,47 +117,13 @@ export const VideoEffectsPaneContent = (props) => { 
     | 
|
| 
       121 
117 
     | 
    
         
             
                return VideoEffectsPaneTrampoline(onDismissError, props.updateFocusHandle, activeVideoEffectError, selectableVideoEffects, onEffectChange);
         
     | 
| 
       122 
118 
     | 
    
         
             
            };
         
     | 
| 
       123 
119 
     | 
    
         
             
            const VideoEffectsPaneTrampoline = (onDismissError, updateFocusHandle, activeVideoEffectError, selectableVideoEffects, onEffectChange) => {
         
     | 
| 
       124 
     | 
    
         
            -
                var _a, _b;
         
     | 
| 
       125 
120 
     | 
    
         
             
                const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);
         
     | 
| 
       126 
121 
     | 
    
         
             
                const isCameraOn = useSelector(localVideoSelector).isAvailable;
         
     | 
| 
       127 
122 
     | 
    
         
             
                const showWarning = !isCameraOn && selectedEffect !== 'none';
         
     | 
| 
       128 
123 
     | 
    
         
             
                const locale = useLocale();
         
     | 
| 
       129 
     | 
    
         
            -
                /* @conditional-compile-remove(notifications) */
         
     | 
| 
       130 
     | 
    
         
            -
                const videoEffectErrorStrings = {
         
     | 
| 
       131 
     | 
    
         
            -
                    title: (_a = locale.strings.call.unableToStartVideoEffect) !== null && _a !== void 0 ? _a : '',
         
     | 
| 
       132 
     | 
    
         
            -
                    closeButtonAriaLabel: locale.strings.call.close
         
     | 
| 
       133 
     | 
    
         
            -
                };
         
     | 
| 
       134 
     | 
    
         
            -
                /* @conditional-compile-remove(notifications) */
         
     | 
| 
       135 
     | 
    
         
            -
                const warningStrings = {
         
     | 
| 
       136 
     | 
    
         
            -
                    title: (_b = locale.strings.call.cameraOffBackgroundEffectWarningText) !== null && _b !== void 0 ? _b : '',
         
     | 
| 
       137 
     | 
    
         
            -
                    closeButtonAriaLabel: locale.strings.call.close
         
     | 
| 
       138 
     | 
    
         
            -
                };
         
     | 
| 
       139 
     | 
    
         
            -
                /* @conditional-compile-remove(notifications) */
         
     | 
| 
       140 
     | 
    
         
            -
                const [errorNotificationDismissed, setErrorNotificationDismissed] = useState(false);
         
     | 
| 
       141 
     | 
    
         
            -
                /* @conditional-compile-remove(notifications) */
         
     | 
| 
       142 
     | 
    
         
            -
                const [warningNotificationDismissed, setWarningNotificationDismissed] = useState(false);
         
     | 
| 
       143 
     | 
    
         
            -
                const videoEffectErrorTrampoline = () => {
         
     | 
| 
       144 
     | 
    
         
            -
                    /* @conditional-compile-remove(notifications) */
         
     | 
| 
       145 
     | 
    
         
            -
                    return (React.createElement(React.Fragment, null,
         
     | 
| 
       146 
     | 
    
         
            -
                        activeVideoEffectError && isCameraOn && !errorNotificationDismissed && (React.createElement(NotificationBar, { onDismiss: () => {
         
     | 
| 
       147 
     | 
    
         
            -
                                if (activeVideoEffectError) {
         
     | 
| 
       148 
     | 
    
         
            -
                                    onDismissError(activeVideoEffectError);
         
     | 
| 
       149 
     | 
    
         
            -
                                }
         
     | 
| 
       150 
     | 
    
         
            -
                                setErrorNotificationDismissed(true);
         
     | 
| 
       151 
     | 
    
         
            -
                            }, notificationBarStrings: videoEffectErrorStrings })),
         
     | 
| 
       152 
     | 
    
         
            -
                        showWarning && !warningNotificationDismissed && (React.createElement(NotificationBar, { onDismiss: () => {
         
     | 
| 
       153 
     | 
    
         
            -
                                setWarningNotificationDismissed(true);
         
     | 
| 
       154 
     | 
    
         
            -
                            }, notificationBarStrings: warningStrings }))));
         
     | 
| 
       155 
     | 
    
         
            -
                    return (React.createElement(React.Fragment, null,
         
     | 
| 
       156 
     | 
    
         
            -
                        activeVideoEffectError && isCameraOn && (React.createElement(MessageBar, { messageBarType: MessageBarType.error, onDismiss: () => {
         
     | 
| 
       157 
     | 
    
         
            -
                                if (activeVideoEffectError) {
         
     | 
| 
       158 
     | 
    
         
            -
                                    onDismissError(activeVideoEffectError);
         
     | 
| 
       159 
     | 
    
         
            -
                                }
         
     | 
| 
       160 
     | 
    
         
            -
                            } }, locale.strings.call.unableToStartVideoEffect)),
         
     | 
| 
       161 
     | 
    
         
            -
                        showWarning && (React.createElement(MessageBar, { messageBarType: MessageBarType.warning }, locale.strings.call.cameraOffBackgroundEffectWarningText))));
         
     | 
| 
       162 
     | 
    
         
            -
                };
         
     | 
| 
       163 
124 
     | 
    
         
             
                return (React.createElement(Stack, { tokens: { childrenGap: '0.75rem' }, className: mergeStyles({ paddingLeft: '0.5rem' }) },
         
     | 
| 
       164 
     | 
    
         
            -
                     
     | 
| 
      
 125 
     | 
    
         
            +
                    activeVideoEffectError && isCameraOn && (React.createElement(MessageBar, { messageBarType: MessageBarType.error, onDismiss: () => onDismissError(activeVideoEffectError) }, locale.strings.call.unableToStartVideoEffect)),
         
     | 
| 
      
 126 
     | 
    
         
            +
                    showWarning && (React.createElement(MessageBar, { messageBarType: MessageBarType.warning }, locale.strings.call.cameraOffBackgroundEffectWarningText)),
         
     | 
| 
       165 
127 
     | 
    
         
             
                    React.createElement(_VideoBackgroundEffectsPicker, { label: locale.strings.call.videoEffectsPaneBackgroundSelectionTitle, styles: backgroundPickerStyles, options: selectableVideoEffects !== null && selectableVideoEffects !== void 0 ? selectableVideoEffects : [], onChange: onEffectChange, selectedEffectKey: selectedEffect, componentRef: updateFocusHandle })));
         
     | 
| 
       166 
128 
     | 
    
         
             
                return React.createElement(React.Fragment, null);
         
     | 
| 
       167 
129 
     | 
    
         
             
            };
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"VideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/VideoEffectsPane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,gDAAgD;AAChD,OAAO,EAAE,QAAQ,EAAE,MAA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["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n\n/* @conditional-compile-remove(notifications) */\nimport { useState } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport { MessageBar, MessageBarType, Stack, mergeStyles } from '@fluentui/react';\n\nimport { useLocale } from '../localization';\nimport { ActiveErrorMessage, _VideoEffectsItemProps } from '@internal/react-components';\n\nimport { _VideoBackgroundEffectsPicker } from '@internal/react-components';\n\nimport {\n  VideoBackgroundImage,\n  VideoBackgroundBlurEffect,\n  VideoBackgroundNoEffect,\n  VideoBackgroundReplacementEffect\n} from '../CallComposite';\n\nimport { activeVideoBackgroundEffectSelector } from '../CallComposite/selectors/activeVideoBackgroundEffectSelector';\n\nimport { useSelector } from '../CallComposite/hooks/useSelector';\n\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\n\nimport { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';\nimport { ActiveVideoEffect } from '../CallComposite/components/SidePane/useVideoEffectsPane';\n/* @conditional-compile-remove(notifications) */\nimport { ActiveNotification, NotificationBar, NotificationBarStrings } from '@internal/react-components';\n\n/**\n * Pane that is used to show video effects button\n * @private\n */\n/** @beta */\nexport const VideoEffectsPaneContent = (props: {\n  activeVideoEffectError?: ActiveErrorMessage | /* @conditional-compile-remove(notifications) */ ActiveNotification;\n  onDismissError: (\n    error: ActiveErrorMessage | /* @conditional-compile-remove(notifications) */ ActiveNotification\n  ) => void;\n  activeVideoEffectChange: (effect: ActiveVideoEffect) => void;\n  updateFocusHandle: React.RefObject<{\n    focus: () => void;\n  }>;\n}): JSX.Element => {\n  const { onDismissError, activeVideoEffectError, activeVideoEffectChange } = props;\n\n  const locale = useLocale();\n\n  const adapter = useAdapter();\n\n  const strings = locale.strings.call;\n\n  const activeVideoEffects = useSelector(localVideoSelector).activeVideoEffects?.activeEffects;\n\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  const onEffectChange = useCallback(\n    async (effectKey: string) => {\n      if (effectKey === 'blur') {\n        const blurEffect: VideoBackgroundBlurEffect = {\n          effectName: effectKey\n        };\n        activeVideoEffectChange({\n          type: 'blur',\n          timestamp: new Date(Date.now())\n        });\n        await adapter.startVideoBackgroundEffect(blurEffect);\n        adapter.updateSelectedVideoBackgroundEffect(blurEffect);\n      } else if (effectKey === 'none') {\n        const noneEffect: VideoBackgroundNoEffect = {\n          effectName: effectKey\n        };\n        await adapter.stopVideoBackgroundEffects();\n        adapter.updateSelectedVideoBackgroundEffect(noneEffect);\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            key: effectKey,\n            backgroundImageUrl: backgroundImg.backgroundProps.url\n          };\n          activeVideoEffectChange({\n            type: 'replacement',\n            timestamp: new Date(Date.now())\n          });\n          await adapter.startVideoBackgroundEffect(replaceEffect);\n          adapter.updateSelectedVideoBackgroundEffect(replaceEffect);\n        }\n      }\n    },\n    [adapter, activeVideoEffectChange, selectableVideoEffects]\n  );\n\n  if (activeVideoEffectError && activeVideoEffects && activeVideoEffects.length === 0) {\n    const noneEffect: VideoBackgroundNoEffect = {\n      effectName: 'none'\n    };\n    adapter.updateSelectedVideoBackgroundEffect(noneEffect);\n  }\n\n  return VideoEffectsPaneTrampoline(\n    onDismissError,\n    props.updateFocusHandle,\n    activeVideoEffectError,\n    selectableVideoEffects,\n    onEffectChange\n  );\n};\n\nconst VideoEffectsPaneTrampoline = (\n  onDismissError: (\n    error: ActiveErrorMessage | /* @conditional-compile-remove(notifications) */ ActiveNotification\n  ) => void,\n  updateFocusHandle: React.RefObject<{\n    focus: () => void;\n  }>,\n  activeVideoEffectError?: ActiveErrorMessage | /* @conditional-compile-remove(notifications) */ ActiveNotification,\n  selectableVideoEffects?: _VideoEffectsItemProps[],\n  onEffectChange?: (effectKey: string) => Promise<void>\n): JSX.Element => {\n  const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);\n\n  const isCameraOn = useSelector(localVideoSelector).isAvailable;\n\n  const showWarning = !isCameraOn && selectedEffect !== 'none';\n\n  const locale = useLocale();\n  /* @conditional-compile-remove(notifications) */\n  const videoEffectErrorStrings: NotificationBarStrings = {\n    title: locale.strings.call.unableToStartVideoEffect ?? '',\n    closeButtonAriaLabel: locale.strings.call.close\n  };\n  /* @conditional-compile-remove(notifications) */\n  const warningStrings: NotificationBarStrings = {\n    title: locale.strings.call.cameraOffBackgroundEffectWarningText ?? '',\n    closeButtonAriaLabel: locale.strings.call.close\n  };\n\n  /* @conditional-compile-remove(notifications) */\n  const [errorNotificationDismissed, setErrorNotificationDismissed] = useState(false);\n  /* @conditional-compile-remove(notifications) */\n  const [warningNotificationDismissed, setWarningNotificationDismissed] = useState(false);\n\n  const videoEffectErrorTrampoline = (): JSX.Element => {\n    /* @conditional-compile-remove(notifications) */\n    return (\n      <>\n        {activeVideoEffectError && isCameraOn && !errorNotificationDismissed && (\n          <NotificationBar\n            onDismiss={() => {\n              if (activeVideoEffectError) {\n                onDismissError(activeVideoEffectError);\n              }\n              setErrorNotificationDismissed(true);\n            }}\n            notificationBarStrings={videoEffectErrorStrings}\n          />\n        )}\n        {showWarning && !warningNotificationDismissed && (\n          <NotificationBar\n            onDismiss={() => {\n              setWarningNotificationDismissed(true);\n            }}\n            notificationBarStrings={warningStrings}\n          />\n        )}\n      </>\n    );\n\n    return (\n      <>\n        {activeVideoEffectError && isCameraOn && (\n          <MessageBar\n            messageBarType={MessageBarType.error}\n            onDismiss={() => {\n              if (activeVideoEffectError) {\n                onDismissError(activeVideoEffectError);\n              }\n            }}\n          >\n            {locale.strings.call.unableToStartVideoEffect}\n          </MessageBar>\n        )}\n        {showWarning && (\n          <MessageBar messageBarType={MessageBarType.warning}>\n            {locale.strings.call.cameraOffBackgroundEffectWarningText}\n          </MessageBar>\n        )}\n      </>\n    );\n  };\n\n  return (\n    <Stack tokens={{ childrenGap: '0.75rem' }} className={mergeStyles({ paddingLeft: '0.5rem' })}>\n      {videoEffectErrorTrampoline()}\n      <_VideoBackgroundEffectsPicker\n        label={locale.strings.call.videoEffectsPaneBackgroundSelectionTitle}\n        styles={backgroundPickerStyles}\n        options={selectableVideoEffects ?? []}\n        onChange={onEffectChange}\n        selectedEffectKey={selectedEffect}\n        componentRef={updateFocusHandle}\n      />\n    </Stack>\n  );\n  return <></>;\n};\n\nconst backgroundPickerStyles = {\n  label: {\n    fontSize: '0.75rem',\n    lineHeight: '0.5rem',\n    fontWeight: '400'\n  }\n};\n"]}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"VideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/VideoEffectsPane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAA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K,MAAM,CAAC;IAE7D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;QACzF,sBAAsB,IAAI,UAAU,IAAI,CACvC,oBAAC,UAAU,IAAC,cAAc,EAAE,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,sBAAsB,CAAC,IACtG,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,EACjC,YAAY,EAAE,iBAAiB,GAC/B,CACI,CACT,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC;AAEF,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.\n\nimport React from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport { MessageBar, MessageBarType, Stack, mergeStyles } from '@fluentui/react';\n\nimport { useLocale } from '../localization';\nimport { ActiveErrorMessage, _VideoEffectsItemProps } from '@internal/react-components';\n\nimport { _VideoBackgroundEffectsPicker } from '@internal/react-components';\n\nimport {\n  VideoBackgroundImage,\n  VideoBackgroundBlurEffect,\n  VideoBackgroundNoEffect,\n  VideoBackgroundReplacementEffect\n} from '../CallComposite';\n\nimport { activeVideoBackgroundEffectSelector } from '../CallComposite/selectors/activeVideoBackgroundEffectSelector';\n\nimport { useSelector } from '../CallComposite/hooks/useSelector';\n\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\n\nimport { localVideoSelector } from '../CallComposite/selectors/localVideoStreamSelector';\nimport { ActiveVideoEffect } from '../CallComposite/components/SidePane/useVideoEffectsPane';\n\n/**\n * Pane that is used to show video effects button\n * @private\n */\n/** @beta */\nexport const VideoEffectsPaneContent = (props: {\n  activeVideoEffectError?: ActiveErrorMessage;\n  onDismissError: (error: ActiveErrorMessage) => void;\n  activeVideoEffectChange: (effect: ActiveVideoEffect) => void;\n  updateFocusHandle: React.RefObject<{\n    focus: () => void;\n  }>;\n}): JSX.Element => {\n  const { onDismissError, activeVideoEffectError, activeVideoEffectChange } = props;\n\n  const locale = useLocale();\n\n  const adapter = useAdapter();\n\n  const strings = locale.strings.call;\n\n  const activeVideoEffects = useSelector(localVideoSelector).activeVideoEffects?.activeEffects;\n\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  const onEffectChange = useCallback(\n    async (effectKey: string) => {\n      if (effectKey === 'blur') {\n        const blurEffect: VideoBackgroundBlurEffect = {\n          effectName: effectKey\n        };\n        activeVideoEffectChange({\n          type: 'blur',\n          timestamp: new Date(Date.now())\n        });\n        await adapter.startVideoBackgroundEffect(blurEffect);\n        adapter.updateSelectedVideoBackgroundEffect(blurEffect);\n      } else if (effectKey === 'none') {\n        const noneEffect: VideoBackgroundNoEffect = {\n          effectName: effectKey\n        };\n        await adapter.stopVideoBackgroundEffects();\n        adapter.updateSelectedVideoBackgroundEffect(noneEffect);\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            key: effectKey,\n            backgroundImageUrl: backgroundImg.backgroundProps.url\n          };\n          activeVideoEffectChange({\n            type: 'replacement',\n            timestamp: new Date(Date.now())\n          });\n          await adapter.startVideoBackgroundEffect(replaceEffect);\n          adapter.updateSelectedVideoBackgroundEffect(replaceEffect);\n        }\n      }\n    },\n    [adapter, activeVideoEffectChange, selectableVideoEffects]\n  );\n\n  if (activeVideoEffectError && activeVideoEffects && activeVideoEffects.length === 0) {\n    const noneEffect: VideoBackgroundNoEffect = {\n      effectName: 'none'\n    };\n    adapter.updateSelectedVideoBackgroundEffect(noneEffect);\n  }\n\n  return VideoEffectsPaneTrampoline(\n    onDismissError,\n    props.updateFocusHandle,\n    activeVideoEffectError,\n    selectableVideoEffects,\n    onEffectChange\n  );\n};\n\nconst VideoEffectsPaneTrampoline = (\n  onDismissError: (error: ActiveErrorMessage) => void,\n  updateFocusHandle: React.RefObject<{\n    focus: () => void;\n  }>,\n  activeVideoEffectError?: ActiveErrorMessage,\n  selectableVideoEffects?: _VideoEffectsItemProps[],\n  onEffectChange?: (effectKey: string) => Promise<void>\n): JSX.Element => {\n  const selectedEffect = useSelector(activeVideoBackgroundEffectSelector);\n\n  const isCameraOn = useSelector(localVideoSelector).isAvailable;\n\n  const showWarning = !isCameraOn && selectedEffect !== 'none';\n\n  const locale = useLocale();\n\n  return (\n    <Stack tokens={{ childrenGap: '0.75rem' }} className={mergeStyles({ paddingLeft: '0.5rem' })}>\n      {activeVideoEffectError && isCameraOn && (\n        <MessageBar messageBarType={MessageBarType.error} onDismiss={() => onDismissError(activeVideoEffectError)}>\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        componentRef={updateFocusHandle}\n      />\n    </Stack>\n  );\n  return <></>;\n};\n\nconst backgroundPickerStyles = {\n  label: {\n    fontSize: '0.75rem',\n    lineHeight: '0.5rem',\n    fontWeight: '400'\n  }\n};\n"]}
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@azure/communication-react",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "1.18.0-alpha- 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "1.18.0-alpha-202406270014",
         
     | 
| 
       4 
4 
     | 
    
         
             
              "sideEffects": false,
         
     | 
| 
       5 
5 
     | 
    
         
             
              "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
         
     | 
| 
       6 
6 
     | 
    
         
             
              "keywords": [
         
     | 
| 
         @@ -57,7 +57,7 @@ 
     | 
|
| 
       57 
57 
     | 
    
         
             
              "peerDependencies": {
         
     | 
| 
       58 
58 
     | 
    
         
             
                "@azure/communication-calling": "1.26.1-beta.1",
         
     | 
| 
       59 
59 
     | 
    
         
             
                "@azure/communication-calling-effects": "1.0.1",
         
     | 
| 
       60 
     | 
    
         
            -
                "@azure/communication-chat": "1.6.0-beta. 
     | 
| 
      
 60 
     | 
    
         
            +
                "@azure/communication-chat": "1.6.0-beta.3",
         
     | 
| 
       61 
61 
     | 
    
         
             
                "@types/react": ">=16.8.0 <19.0.0",
         
     | 
| 
       62 
62 
     | 
    
         
             
                "@types/react-dom": ">=16.8.0 <19.0.0",
         
     | 
| 
       63 
63 
     | 
    
         
             
                "react": ">=16.8.0 <19.0.0",
         
     |