@selfcommunity/react-ui 0.11.0-alpha.3 → 0.11.0-alpha.31

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 (88) hide show
  1. package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.d.ts +5 -0
  2. package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +3 -3
  3. package/lib/cjs/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
  4. package/lib/cjs/components/Composer/Layer/CategoryLayer/CategoryLayer.js +4 -1
  5. package/lib/cjs/components/ComposerIconButton/ComposerIconButton.js +10 -2
  6. package/lib/cjs/components/CreateEventButton/CreateEventButton.d.ts +1 -1
  7. package/lib/cjs/components/CreateEventButton/CreateEventButton.js +1 -1
  8. package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +11 -9
  9. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +21 -12
  10. package/lib/cjs/components/Editor/plugins/ToolbarPlugin.js +1 -1
  11. package/lib/cjs/components/EventForm/EventForm.js +7 -5
  12. package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +2 -2
  13. package/lib/cjs/components/EventMembersWidget/EventMembersWidget.js +11 -11
  14. package/lib/cjs/components/EventMembersWidget/TabContentComponent.js +9 -9
  15. package/lib/cjs/components/EventMembersWidget/types.d.ts +4 -5
  16. package/lib/cjs/components/EventMembersWidget/types.js +7 -7
  17. package/lib/cjs/components/EventParticipantsButton/EventParticipantsButton.js +4 -4
  18. package/lib/cjs/components/Events/Events.d.ts +6 -0
  19. package/lib/cjs/components/Events/Events.js +2 -2
  20. package/lib/cjs/components/FeedObject/Activities/Activities.js +1 -1
  21. package/lib/cjs/components/GroupInvitedWidget/GroupInvitedWidget.js +1 -1
  22. package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.js +1 -1
  23. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +65 -6
  24. package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.js +8 -3
  25. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +8 -6
  26. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +3 -1
  27. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +2 -1
  28. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +2 -2
  29. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.d.ts +9 -0
  30. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +106 -0
  31. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/NoParticipants.d.ts +4 -0
  32. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/NoParticipants.js +37 -0
  33. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +1 -0
  34. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +2 -2
  35. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +3 -2
  36. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +45 -2
  37. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +60 -5
  38. package/lib/cjs/constants/LiveStream.d.ts +1 -0
  39. package/lib/cjs/constants/LiveStream.js +2 -1
  40. package/lib/cjs/shared/AutoPlayer/index.js +1 -1
  41. package/lib/cjs/shared/UpScalingTierBadge/index.js +9 -0
  42. package/lib/cjs/utils/contribution.js +1 -2
  43. package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.d.ts +5 -0
  44. package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +3 -3
  45. package/lib/esm/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
  46. package/lib/esm/components/Composer/Layer/CategoryLayer/CategoryLayer.js +4 -1
  47. package/lib/esm/components/ComposerIconButton/ComposerIconButton.js +11 -3
  48. package/lib/esm/components/CreateEventButton/CreateEventButton.d.ts +1 -1
  49. package/lib/esm/components/CreateEventButton/CreateEventButton.js +1 -1
  50. package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +11 -9
  51. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +23 -14
  52. package/lib/esm/components/Editor/plugins/ToolbarPlugin.js +1 -1
  53. package/lib/esm/components/EventForm/EventForm.js +8 -6
  54. package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +2 -2
  55. package/lib/esm/components/EventMembersWidget/EventMembersWidget.js +12 -12
  56. package/lib/esm/components/EventMembersWidget/TabContentComponent.js +10 -10
  57. package/lib/esm/components/EventMembersWidget/types.d.ts +4 -5
  58. package/lib/esm/components/EventMembersWidget/types.js +6 -6
  59. package/lib/esm/components/EventParticipantsButton/EventParticipantsButton.js +4 -4
  60. package/lib/esm/components/Events/Events.d.ts +6 -0
  61. package/lib/esm/components/Events/Events.js +2 -2
  62. package/lib/esm/components/FeedObject/Activities/Activities.js +1 -1
  63. package/lib/esm/components/GroupInvitedWidget/GroupInvitedWidget.js +1 -1
  64. package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.js +1 -1
  65. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +67 -8
  66. package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.js +8 -3
  67. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +8 -6
  68. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +3 -1
  69. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +2 -1
  70. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +2 -2
  71. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.d.ts +9 -0
  72. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +103 -0
  73. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/NoParticipants.d.ts +4 -0
  74. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/NoParticipants.js +34 -0
  75. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +1 -0
  76. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +2 -2
  77. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +3 -2
  78. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +45 -2
  79. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +64 -9
  80. package/lib/esm/constants/LiveStream.d.ts +1 -0
  81. package/lib/esm/constants/LiveStream.js +1 -0
  82. package/lib/esm/shared/AutoPlayer/index.js +1 -1
  83. package/lib/esm/shared/UpScalingTierBadge/index.js +9 -0
  84. package/lib/esm/utils/contribution.js +1 -2
  85. package/lib/umd/{653.js → 212.js} +2 -2
  86. package/lib/umd/react-ui.js +1 -1
  87. package/package.json +8 -7
  88. /package/lib/umd/{653.js.LICENSE.txt → 212.js.LICENSE.txt} +0 -0
@@ -1,19 +1,27 @@
1
1
  import { __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import * as React from 'react';
4
4
  import { isEqualTrackRef, isTrackReference, isWeb, log } from '@livekit/components-core';
5
5
  import { RoomEvent, Track } from 'livekit-client';
6
- import { CarouselLayout, Chat, ConnectionStateToast, GridLayout, LayoutContextProvider, RoomAudioRenderer, useCreateLayoutContext, useParticipants, usePinnedTracks, useTracks } from '@livekit/components-react';
6
+ import { CarouselLayout, Chat, ConnectionStateToast, GridLayout, LayoutContextProvider, RoomAudioRenderer, useCreateLayoutContext, useLocalParticipant, useParticipants, usePinnedTracks, useTracks } from '@livekit/components-react';
7
7
  import { ParticipantTile } from './ParticipantTile';
8
8
  import { ControlBar } from './ControlBar';
9
- import { useEffect } from 'react';
9
+ import { useEffect, useMemo } from 'react';
10
10
  import { useLivestreamCheck } from './useLiveStreamCheck';
11
11
  import { FocusLayout, FocusLayoutContainer, FocusLayoutContainerNoParticipants } from './FocusLayout';
12
12
  import { useSCUser } from '@selfcommunity/react-core';
13
13
  import classNames from 'classnames';
14
14
  import { styled } from '@mui/material/styles';
15
- import { Box } from '@mui/material';
15
+ import { Box, IconButton } from '@mui/material';
16
16
  import { useThemeProps } from '@mui/system';
17
+ import NoParticipants from './NoParticipants';
18
+ import LiveStreamSettingsMenu from './LiveStreamSettingsMenu';
19
+ import { BackgroundBlur } from '@livekit/track-processors';
20
+ import { isClientSideRendering } from '@selfcommunity/utils';
21
+ import { CHOICE_VIDEO_BLUR_EFFECT } from '../../../constants/LiveStream';
22
+ import Icon from '@mui/material/Icon';
23
+ import { useSnackbar } from 'notistack';
24
+ import { FormattedMessage } from 'react-intl';
17
25
  const PREFIX = 'SCVideoConference';
18
26
  const classes = {
19
27
  root: `${PREFIX}-root`
@@ -34,7 +42,7 @@ const Root = styled(Box, {
34
42
  *
35
43
  */
36
44
  export function VideoConference(inProps) {
37
- var _a, _b;
45
+ var _a, _b, _c;
38
46
  // PROPS
39
47
  const props = useThemeProps({
40
48
  props: inProps,
@@ -51,15 +59,35 @@ export function VideoConference(inProps) {
51
59
  const lastAutoFocusedScreenShareTrack = React.useRef(null);
52
60
  // HOOKS
53
61
  const scUserContext = useSCUser();
62
+ const [blurEnabled, setBlurEnabled] = React.useState(isClientSideRendering() ? ((_a = window === null || window === void 0 ? void 0 : window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(CHOICE_VIDEO_BLUR_EFFECT)) === 'true' : false);
63
+ const [processorPending, setProcessorPending] = React.useState(false);
54
64
  const tracks = useTracks([
55
65
  { source: Track.Source.Camera, withPlaceholder: true },
56
66
  { source: Track.Source.ScreenShare, withPlaceholder: false }
57
67
  ], { updateOnlyOn: [RoomEvent.ActiveSpeakersChanged], onlySubscribed: false });
68
+ const tracksNoParticipants = useMemo(() => tracks.filter((t) => t.participant.name === scUserContext.user.username || t.participant.name === speakerFocused.username || t.source === 'screen_share'), [tracks, scUserContext.user]);
69
+ const handleBlur = React.useCallback((event) => {
70
+ var _a, _b;
71
+ if (event.target) {
72
+ if ('checked' in event.target) {
73
+ setBlurEnabled((_a = event.target) === null || _a === void 0 ? void 0 : _a.checked);
74
+ }
75
+ else {
76
+ setBlurEnabled((enabled) => !enabled);
77
+ }
78
+ }
79
+ else {
80
+ setBlurEnabled((enabled) => !enabled);
81
+ }
82
+ (_b = window === null || window === void 0 ? void 0 : window.localStorage) === null || _b === void 0 ? void 0 : _b.setItem(CHOICE_VIDEO_BLUR_EFFECT, (!blurEnabled).toString());
83
+ }, [setBlurEnabled, blurEnabled]);
58
84
  const participants = useParticipants();
59
85
  const layoutContext = useCreateLayoutContext();
60
86
  const screenShareTracks = tracks.filter(isTrackReference).filter((track) => track.publication.source === Track.Source.ScreenShare);
61
- const focusTrack = (_a = usePinnedTracks(layoutContext)) === null || _a === void 0 ? void 0 : _a[0];
87
+ const focusTrack = (_b = usePinnedTracks(layoutContext)) === null || _b === void 0 ? void 0 : _b[0];
62
88
  const carouselTracks = tracks.filter((track) => !isEqualTrackRef(track, focusTrack));
89
+ const { cameraTrack } = useLocalParticipant();
90
+ const { enqueueSnackbar } = useSnackbar();
63
91
  useLivestreamCheck();
64
92
  /**
65
93
  * widgetUpdate
@@ -115,7 +143,7 @@ export function VideoConference(inProps) {
115
143
  }
116
144
  }, [
117
145
  screenShareTracks.map((ref) => `${ref.publication.trackSid}_${ref.publication.isSubscribed}`).join(),
118
- (_b = focusTrack === null || focusTrack === void 0 ? void 0 : focusTrack.publication) === null || _b === void 0 ? void 0 : _b.trackSid,
146
+ (_c = focusTrack === null || focusTrack === void 0 ? void 0 : focusTrack.publication) === null || _c === void 0 ? void 0 : _c.trackSid,
119
147
  tracks,
120
148
  participants,
121
149
  speakerFocused
@@ -138,10 +166,37 @@ export function VideoConference(inProps) {
138
166
  }
139
167
  }
140
168
  }, [tracks, participants, speakerFocused]);
141
- return (_jsxs(Root, Object.assign({ className: classNames(className, classes.root, 'lk-video-conference') }, rest, { children: [isWeb() && (_jsxs(LayoutContextProvider, Object.assign({ value: layoutContext, onPinChange: handleFocusStateChange, onWidgetChange: widgetUpdate }, { children: [_jsxs("div", Object.assign({ className: "lk-video-conference-inner" }, { children: [!focusTrack ? (_jsx("div", Object.assign({ className: "lk-grid-layout-wrapper" }, { children: _jsx(GridLayout, Object.assign({ tracks: tracks }, { children: _jsx(ParticipantTile, {}) })) }))) : (_jsx("div", Object.assign({ className: "lk-focus-layout-wrapper" }, { children: hideParticipantsList ? (_jsx(FocusLayoutContainerNoParticipants, { children: focusTrack && _jsx(FocusLayout, { trackRef: focusTrack }) })) : (_jsxs(FocusLayoutContainer, { children: [_jsx(CarouselLayout, Object.assign({ tracks: carouselTracks }, { children: _jsx(ParticipantTile, {}) })), focusTrack && _jsx(FocusLayout, { trackRef: focusTrack })] })) }))), _jsx(ControlBar, { controls: Object.assign({
169
+ useEffect(() => {
170
+ var _a;
171
+ const localCamTrack = cameraTrack === null || cameraTrack === void 0 ? void 0 : cameraTrack.track;
172
+ if (localCamTrack) {
173
+ setProcessorPending(true);
174
+ try {
175
+ if (blurEnabled && !localCamTrack.getProcessor()) {
176
+ localCamTrack.setProcessor(BackgroundBlur(20));
177
+ }
178
+ else if (!blurEnabled) {
179
+ localCamTrack.stopProcessor();
180
+ }
181
+ }
182
+ catch (e) {
183
+ console.log(e);
184
+ setBlurEnabled(false);
185
+ (_a = window === null || window === void 0 ? void 0 : window.localStorage) === null || _a === void 0 ? void 0 : _a.setItem(CHOICE_VIDEO_BLUR_EFFECT, false.toString());
186
+ enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.liveStreamRoom.errorApplyVideoEffect", defaultMessage: "ui.contributionActionMenu.errorApplyVideoEffect" }), {
187
+ variant: 'warning',
188
+ autoHideDuration: 3000
189
+ });
190
+ }
191
+ finally {
192
+ setProcessorPending(false);
193
+ }
194
+ }
195
+ }, [blurEnabled, cameraTrack]);
196
+ return (_jsxs(Root, Object.assign({ className: classNames(className, classes.root, 'lk-video-conference') }, rest, { children: [isWeb() && (_jsxs(LayoutContextProvider, Object.assign({ value: layoutContext, onPinChange: handleFocusStateChange, onWidgetChange: widgetUpdate }, { children: [_jsxs("div", Object.assign({ className: "lk-video-conference-inner" }, { children: [!focusTrack ? (_jsx("div", Object.assign({ className: "lk-grid-layout-wrapper" }, { children: _jsx(GridLayout, Object.assign({ tracks: hideParticipantsList ? tracksNoParticipants : tracks }, { children: _jsx(ParticipantTile, {}) })) }))) : (_jsx("div", Object.assign({ className: "lk-focus-layout-wrapper" }, { children: hideParticipantsList ? (_jsx(FocusLayoutContainerNoParticipants, { children: focusTrack && _jsx(FocusLayout, { trackRef: focusTrack }) })) : (_jsxs(FocusLayoutContainer, { children: [carouselTracks.length ? (_jsx(CarouselLayout, Object.assign({ tracks: carouselTracks }, { children: _jsx(ParticipantTile, {}) }))) : (_jsx(NoParticipants, {})), focusTrack && _jsx(FocusLayout, { trackRef: focusTrack })] })) }))), _jsx(ControlBar, { controls: Object.assign({
142
197
  chat: !disableChat,
143
198
  microphone: !disableMicrophone,
144
199
  camera: !disableCamera,
145
200
  screenShare: !disableShareScreen
146
- }, { settings: !!SettingsComponent }) })] })), !disableChat && (_jsx(Chat, { style: { display: widgetState.showChat ? 'grid' : 'none' }, messageFormatter: chatMessageFormatter, messageEncoder: chatMessageEncoder, messageDecoder: chatMessageDecoder })), SettingsComponent && (_jsx("div", Object.assign({ className: "lk-settings-menu-modal", style: { display: widgetState.showSettings ? 'block' : 'none' } }, { children: _jsx(SettingsComponent, {}) })))] }))), _jsx(RoomAudioRenderer, {}), _jsx(ConnectionStateToast, {})] })));
201
+ }, { settings: true }) })] })), !disableChat && (_jsx(Chat, { style: { display: widgetState.showChat ? 'grid' : 'none' }, messageFormatter: chatMessageFormatter, messageEncoder: chatMessageEncoder, messageDecoder: chatMessageDecoder })), _jsxs("div", Object.assign({ className: "lk-settings-menu-modal", style: { display: widgetState.showSettings ? 'block' : 'none' } }, { children: [_jsx(IconButton, Object.assign({ className: "lk-settings-menu-modal-icon-close", onClick: () => { var _a, _b; return (_b = layoutContext === null || layoutContext === void 0 ? void 0 : (_a = layoutContext.widget).dispatch) === null || _b === void 0 ? void 0 : _b.call(_a, { msg: 'toggle_settings' }); } }, { children: _jsx(Icon, { children: "close" }) })), SettingsComponent ? (_jsx(SettingsComponent, {})) : (_jsx(_Fragment, { children: _jsx(LiveStreamSettingsMenu, { onlyContentMenu: true, actionBlurDisabled: !cameraTrack && !disableCamera, blurEnabled: blurEnabled, handleBlur: handleBlur }) }))] }))] }))), _jsx(RoomAudioRenderer, {}), _jsx(ConnectionStateToast, {})] })));
147
202
  }
@@ -1,3 +1,4 @@
1
1
  export declare const LIVE_STREAM_TITLE_MAX_LENGTH = 100;
2
2
  export declare const LIVE_STREAM_SLUG_MAX_LENGTH = 50;
3
3
  export declare const LIVE_STREAM_DESCRIPTION_MAX_LENGTH = 500;
4
+ export declare const CHOICE_VIDEO_BLUR_EFFECT = "lk-video-blur";
@@ -1,3 +1,4 @@
1
1
  export const LIVE_STREAM_TITLE_MAX_LENGTH = 100;
2
2
  export const LIVE_STREAM_SLUG_MAX_LENGTH = 50;
3
3
  export const LIVE_STREAM_DESCRIPTION_MAX_LENGTH = 500;
4
+ export const CHOICE_VIDEO_BLUR_EFFECT = 'lk-video-blur';
@@ -20,7 +20,7 @@ export default function AutoPlayer(props) {
20
20
  const [played, setPlayed] = useState(0);
21
21
  useEffect(() => {
22
22
  if (played >= 10 && played <= 11) {
23
- onVideoWatch();
23
+ onVideoWatch === null || onVideoWatch === void 0 ? void 0 : onVideoWatch();
24
24
  }
25
25
  }, [played]);
26
26
  /**
@@ -3,6 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { styled } from '@mui/material/styles';
4
4
  import { useThemeProps } from '@mui/system';
5
5
  import { FormattedMessage } from 'react-intl';
6
+ import { SCPreferences, useSCPreferences } from '@selfcommunity/react-core';
6
7
  import { Chip, Tooltip } from '@mui/material';
7
8
  import { useMemo } from 'react';
8
9
  import { SCCommunitySubscriptionTier } from '@selfcommunity/types';
@@ -28,6 +29,11 @@ export default function UpScalingTierBadge(inProps) {
28
29
  name: PREFIX
29
30
  });
30
31
  const { className, desiredTier = SCCommunitySubscriptionTier.GO } = props, rest = __rest(props, ["className", "desiredTier"]);
32
+ const { preferences } = useSCPreferences();
33
+ const isEnterpriseTier = useMemo(() => preferences &&
34
+ SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
35
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
36
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === SCCommunitySubscriptionTier.ENTERPRISE, [preferences]);
31
37
  const tooltipMsg = useMemo(() => {
32
38
  let _msg = _jsx(FormattedMessage, { id: "ui.upScalingTierBadge.goFeature", defaultMessage: "ui.upScalingTierBadge.goFeature" });
33
39
  switch (desiredTier) {
@@ -56,5 +62,8 @@ export default function UpScalingTierBadge(inProps) {
56
62
  }
57
63
  return _label;
58
64
  }, [desiredTier]);
65
+ if (desiredTier === SCCommunitySubscriptionTier.ENTERPRISE && isEnterpriseTier) {
66
+ return null;
67
+ }
59
68
  return (_jsx(Root, Object.assign({ classes: { root: classNames(className, classes.root) }, title: tooltipMsg, placement: "top" }, rest, { children: _jsx(Badge, { color: "secondary", size: "small", label: badgeLabel, className: classes.badge }) })));
60
69
  }
@@ -51,8 +51,7 @@ export function getContributionSnippet(obj) {
51
51
  * @param handleUrl Func that handle urls
52
52
  */
53
53
  export function getContributionHtml(html, handleUrl) {
54
- const _html = html.replace(/<p\b[^>]*>(.*?)<\/p>/g, (match, content) => content);
55
- return _html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
54
+ return html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
56
55
  return `<a href='${handleUrl(SCRoutes.USER_PROFILE_ROUTE_NAME, { id, username })}'>@${username}</a>`;
57
56
  });
58
57
  }