@azure/communication-react 1.17.0-alpha-202405170014 → 1.17.0-alpha-202405220013

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 (105) hide show
  1. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BLFNaheX.js → ChatMessageComponentAsRichTextEditBox-CDsn-zU7.js} +22 -17
  2. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CDsn-zU7.js.map +1 -0
  3. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BhTpuspw.js → RichTextSendBoxWrapper-Dm4S2bpT.js} +6 -8
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BhTpuspw.js.map → RichTextSendBoxWrapper-Dm4S2bpT.js.map} +1 -1
  5. package/dist/dist-cjs/communication-react/{index-C9I6Mcil.js → index-DO36MBbq.js} +907 -480
  6. package/dist/dist-cjs/communication-react/index-DO36MBbq.js.map +1 -0
  7. package/dist/dist-cjs/communication-react/index.js +5 -7
  8. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +17 -10
  12. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +1 -1
  14. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js +1 -3
  16. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  18. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +9 -0
  20. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +29 -0
  21. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +1 -0
  22. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +1 -1
  23. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +15 -20
  24. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +12 -0
  26. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +23 -0
  27. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +1 -0
  28. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +15 -0
  29. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +39 -0
  30. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +1 -0
  31. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +24 -0
  32. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +66 -0
  33. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +1 -0
  34. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +20 -0
  35. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +46 -0
  36. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +1 -0
  37. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +29 -0
  38. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +71 -0
  39. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +1 -0
  40. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +7 -10
  41. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +170 -91
  42. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  43. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -1
  44. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +29 -12
  45. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +12 -46
  47. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +19 -0
  49. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +209 -0
  50. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +1 -0
  51. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +7 -0
  52. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +49 -0
  53. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +1 -0
  54. package/dist/dist-esm/react-components/src/components/RichTextEditor/{Buttons → Toolbar}/Table/RichTextInsertTablePane.d.ts +2 -2
  55. package/dist/dist-esm/react-components/src/components/RichTextEditor/{Buttons → Toolbar}/Table/RichTextInsertTablePane.js +3 -3
  56. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +1 -0
  57. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +6 -0
  58. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +13 -0
  59. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +1 -0
  60. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +1 -1
  61. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +5 -7
  63. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
  64. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +5 -3
  66. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +2 -8
  67. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +3 -1
  69. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  70. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +3 -3
  71. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +4 -5
  72. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  73. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +37 -0
  74. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +60 -0
  75. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -0
  76. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +11 -0
  77. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +95 -0
  78. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +1 -1
  79. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
  80. package/dist/dist-esm/react-components/src/components/utils.js +1 -3
  81. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +7 -4
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
  84. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +4 -1
  85. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -3
  86. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  87. package/package.json +6 -8
  88. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BLFNaheX.js.map +0 -1
  89. package/dist/dist-cjs/communication-react/index-C9I6Mcil.js.map +0 -1
  90. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.d.ts +0 -7
  91. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js +0 -86
  92. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js.map +0 -1
  93. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.d.ts +0 -7
  94. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js +0 -55
  95. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +0 -1
  96. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.js.map +0 -1
  97. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.d.ts +0 -8
  98. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js +0 -66
  99. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js.map +0 -1
  100. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.d.ts +0 -9
  101. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js +0 -56
  102. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js.map +0 -1
  103. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.d.ts +0 -15
  104. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.js +0 -39
  105. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.js.map +0 -1
@@ -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,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,6BAA6B,EAAE,yCAAmC;AAS3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,gEAAgE,CAAC;AAErH,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAGzF;;;GAGG;AACH,YAAY;AACZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAIvC,EAAe,EAAE;;IAChB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AC,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,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}): JSX.Element => {\n const {\n onDismissError,\n activeVideoEffectError,\n\n activeVideoEffectChange\n } = 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 return VideoEffectsPaneTrampoline(\n onDismissError,\n activeVideoEffectError,\n\n selectableVideoEffects,\n\n onEffectChange\n );\n};\n\nconst VideoEffectsPaneTrampoline = (\n onDismissError: (error: ActiveErrorMessage) => void,\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 />\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,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,6BAA6B,EAAE,yCAAmC;AAS3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,gEAAgE,CAAC;AAErH,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAGzF;;;GAGG;AACH,YAAY;AACZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAOvC,EAAe,EAAE;;IAChB,MAAM,EACJ,cAAc,EACd,sBAAsB,EAEtB,uBAAuB,EACxB,GAAG,KAAK,CAAC;IAEV,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;IAEpC,MAAM,kBAAkB,GAAG,MAAA,WAAW,CAAC,kBAAkB,CAAC,CAAC,kBAAkB,0CAAE,aAAa,CAAC;IAE7F,MAAM,sBAAsB,GAA6B,OAAO,CAAC,GAAG,EAAE;QACpE,MAAM,YAAY,GAA6B;YAC7C;gBACE,OAAO,EAAE,MAAM;gBACf,SAAS,EAAE;oBACT,QAAQ,EAAE,6BAA6B;iBACxC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AAE;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 {\n onDismissError,\n activeVideoEffectError,\n\n activeVideoEffectChange\n } = 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.17.0-alpha-202405170014",
3
+ "version": "1.17.0-alpha-202405220013",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -44,13 +44,11 @@
44
44
  "react-linkify": "^1.0.0-alpha",
45
45
  "react-use-draggable-scroll": "^0.4.7",
46
46
  "reselect": "^4.0.0",
47
- "roosterjs-editor-api": "^8.62.0",
48
- "roosterjs-editor-core": "^8.62.0",
49
- "roosterjs-editor-dom": "^8.62.0",
50
- "roosterjs-editor-plugins": "^8.62.0",
51
- "roosterjs-editor-types-compatible": "^8.62.0",
52
- "roosterjs-editor-types": "^8.62.0",
53
- "roosterjs-react": "^8.56.0",
47
+ "roosterjs-content-model-api": "^9.3.0",
48
+ "roosterjs-content-model-core": "^9.3.0",
49
+ "roosterjs-content-model-dom": "^9.3.0",
50
+ "roosterjs-content-model-plugins": "^9.3.0",
51
+ "roosterjs-content-model-types": "^9.3.0",
54
52
  "textarea-caret-ts": "^4.1.1",
55
53
  "use-debounce": "^10.0.0",
56
54
  "uuid": "^9.0.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-BLFNaheX.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useMemo, useState } from 'react';\n/* @conditional-compile-remove(attachment-upload) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(attachment-upload) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(attachment-upload) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const { onCancel, onSubmit, strings, message } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = getMessageState(\n textValue,\n /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata ?? []\n );\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = (newValue?: string): void => {\n setTextValue(newValue ?? '');\n };\n\n const textTooLongMessage =\n messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(attachment-upload) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n // it's very important to pass an empty attachment here\n // so when user remvoes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n submitEnabled &&\n onSubmit(textValue, /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata);\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata,\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n onSubmit,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n submitEnabled,\n textValue\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors textTooLongMessage={textTooLongMessage} systemMessage={message.failureReason} />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={setText}\n editorComponentRef={editTextFieldRef}\n initialContent={message.content}\n content={textValue}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(attachment-upload) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","useCallback","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","useMemo","doesMessageContainMultipleAttachments","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAqDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;IACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,IAAA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAS,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;;AAE1E,IAAA,MAAM,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,GAAGC,gBAAU,CAC7DC,+BAAyB,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