@selfcommunity/react-ui 0.7.50-alpha.1 → 0.7.51-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/assets/index.d.ts +2 -0
- package/lib/cjs/assets/index.js +7 -0
- package/lib/cjs/assets/logo.d.ts +2 -0
- package/lib/cjs/assets/logo.js +3 -0
- package/lib/cjs/components/Composer/Composer.js +9 -7
- package/lib/cjs/components/Feed/Feed.js +1 -1
- package/lib/cjs/components/PlatformWidget/PlatformWidget.d.ts +24 -2
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +247 -18
- package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/cjs/components/PlatformWidget/constants.js +5 -1
- package/lib/cjs/index.d.ts +6 -2
- package/lib/cjs/index.js +6 -1
- package/lib/cjs/shared/BaseDialog/BaseDialog.js +3 -2
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.js +4 -2
- package/lib/cjs/types/index.d.ts +2 -1
- package/lib/cjs/types/platformWidget.d.ts +15 -0
- package/lib/cjs/types/platformWidget.js +2 -0
- package/lib/esm/assets/index.d.ts +2 -0
- package/lib/esm/assets/index.js +3 -0
- package/lib/esm/assets/logo.d.ts +2 -0
- package/lib/esm/assets/logo.js +1 -0
- package/lib/esm/components/Composer/Composer.js +9 -7
- package/lib/esm/components/Feed/Feed.js +2 -2
- package/lib/esm/components/PlatformWidget/PlatformWidget.d.ts +24 -2
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +251 -22
- package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/esm/components/PlatformWidget/constants.js +4 -0
- package/lib/esm/index.d.ts +6 -2
- package/lib/esm/index.js +7 -1
- package/lib/esm/shared/BaseDialog/BaseDialog.js +3 -2
- package/lib/esm/shared/EmojiPicker/EmojiPicker.js +4 -2
- package/lib/esm/types/index.d.ts +2 -1
- package/lib/esm/types/platformWidget.d.ts +15 -0
- package/lib/esm/types/platformWidget.js +1 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAPCAYAAABjhcQWAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAnuSURBVGhDxVpPbBxXGf9m7eAiIWVDQeIQ0W1pEYJD1ofSS6WsJTizFki0RY13400vjtTNgWAkpGyESO0UKe6BcIjNrouQSQHZURGicMjmxNEbqS1Se/C0UAkFVdilxTu7M/P4fe+9mXlvZtYOwYmflNgz8/5+7/d+3+/7nh2KSrNWpImxGXKcavyOqEuBc4NevtaT7+YbLfwvjO/Gr+F7tPCLDs2ffoyocCr+IJzf0OK1t6w2840Knk/m9yPf3qKF5W70vbS+WaT/eDPC8Wth6JUFDSkUw54Qg64IBq/8o/6sm9dXsd0q+r53gcSwEoqBahcOuuQMN7zdj1bp3MZ2pp25xlDcpssrG3vWIb3udCXLViPqnG80qUBHVdNUnfnTNdjxkdxvci9qJaLxmWRYf5UWOi7sb7TD14Xli7l2zuwB2gfOZ6lQeDKu/+mJX1G//51kHnvsGNuq4JyIa+TZ7vtnyjQmvpXUoR1HPvCHQngT4CuOGOIiFtICAEeALwZNhc43vgmj/sno5xm0vW71qzbnwh7LUeOhPPHaW2U/GKwLGpQAOBKCwWf8pAE/t+7MzFiGLi5fqobktVG/qOqrNugnau+S6E8P5zbU4YrsMCY2k3kJlxZWHrXmqYy4dx0+zA+N/ytuJ8Q2La4cs20gAbQ1ss58o4tv0SHlA1lJ2ZCfbxrvpuShtduBLsQrGLuZsXV2D6ZQ92lg4Mdx3TFRAihXjXmM3rLAmbTtgqr8LiIvaZMx2M3BuqMS1hUA52ddfNCnLW8M/1F1uh4sAL+y9tfSwAkwaYAoBIAk83kw6pACAArvmdHU+3DQ+We9UefZP7xyueaLYVt993S7uJ5sF+A9fm771J+iuT8oEJ6freIUr1sWCMW0xYI/mF3CJr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KtDr9+U4EuL9HQyPrq1yLw372s52RpAplhewpYpCWBTeUODZc1ImPNpjoNAKAMWA3upm5r9AMgt8/N0h+SCFW1XoG1q+A0/9Z0w6yDH2aC+v5TKno84h4jm8v4aJl1bueA7aixdzCTuiN5La39Bhj2AdsNftTh809HvOsJ3Pzj17c5oYiD6zLV5jONXwoD/GkamaXpBGG4M5zpJTlHpOV6/Lj6uAnXuM9mwsmWL2G7GOgjt9upHsSnPx+4/fp9jjzg7wddg2nWytmT544Qb1v2ynJNMqWE9XPSe5BnIqscVMCcx9jX8ktwEFYY/pJde/TBunm6z377dRf3/AgUAlf0T+YSFAAAAAElFTkSuQmCC";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAPCAYAAABjhcQWAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAnuSURBVGhDxVpPbBxXGf9m7eAiIWVDQeIQ0W1pEYJD1ofSS6WsJTizFki0RY13400vjtTNgWAkpGyESO0UKe6BcIjNrouQSQHZURGicMjmxNEbqS1Se/C0UAkFVdilxTu7M/P4fe+9mXlvZtYOwYmflNgz8/5+7/d+3+/7nh2KSrNWpImxGXKcavyOqEuBc4NevtaT7+YbLfwvjO/Gr+F7tPCLDs2ffoyocCr+IJzf0OK1t6w2840Knk/m9yPf3qKF5W70vbS+WaT/eDPC8Wth6JUFDSkUw54Qg64IBq/8o/6sm9dXsd0q+r53gcSwEoqBahcOuuQMN7zdj1bp3MZ2pp25xlDcpssrG3vWIb3udCXLViPqnG80qUBHVdNUnfnTNdjxkdxvci9qJaLxmWRYf5UWOi7sb7TD14Xli7l2zuwB2gfOZ6lQeDKu/+mJX1G//51kHnvsGNuq4JyIa+TZ7vtnyjQmvpXUoR1HPvCHQngT4CuOGOIiFtICAEeALwZNhc43vg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q+Z92XfSLp8V+/20Q+TwcW++cBAdb6h/W5zrGVl3todyKV71O3Iak8IEB6K5h7vZKKgI1gIBOxmrm6bFZglOtMb76Z4DalTRQl5iV12ZUXnG0spAJTMUHoAk26sFKSD3u5brXXuIrMi/QPC4D7X4vxstSG3JsGTMFK/A4piDfvBoDc8Etrb3aQt5tJbjySmw3zJkSE3sU79TNyU4rty2UKhl2A7Wj2JoTb++pGBVrR98KKvBMeleO0NJ2x0TyQnbbJsZGRxLZ0WKqfPNDkifiUJY3HxBvtpx3ltasACHOS6XlXcfeShokmdlcacHRuKzld/aAsQ+dDACBP4rG1TeQEBzonqLRecic82IErrt2pP28FKMX2SyXhex20U6kcvjXRNyoazKtDr9+U4EuL9HQyPrq1yLw372s52RpAplhewpYpCWBTeUODZc1ImPNpjoNAKAMWA3upm5r9AMgt8/N0h+SCFW1XoG1q+A0/9Z0w6yDH2aC+v5TKno84h4jm8v4aJl1bueA7aixdzCTuiN5La39Bhj2AdsNftTh809HvOsJ3Pzj17c5oYiD6zLV5jONXwoD/GkamaXpBGG4M5zpJTlHpOV6/Lj6uAnXuM9mwsmWL2G7GOgjt9upHsSnPx+4/fp9jjzg7wddg2nWytmT544Qb1v2ynJNMqWE9XPSe5BnIqscVMCcx9jX8ktwEFYY/pJde/TBunm6z377dRf3/AgUAlf0T+YSFAAAAAElFTkSuQmCC';
|
|
@@ -134,7 +134,7 @@ function Composer(inProps) {
|
|
|
134
134
|
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
135
135
|
// HOOKS
|
|
136
136
|
const theme = (0, styles_1.useTheme)();
|
|
137
|
-
const fullScreen = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'), { noSsr:
|
|
137
|
+
const fullScreen = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'), { noSsr: (0, utils_1.isClientSideRendering)() });
|
|
138
138
|
// State variables
|
|
139
139
|
const [isSubmitting, setIsSubmitting] = (0, react_1.useState)(false);
|
|
140
140
|
const [layer, setLayer] = (0, react_1.useState)();
|
|
@@ -477,13 +477,15 @@ function Composer(inProps) {
|
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
else {
|
|
480
|
+
console.log('qui');
|
|
480
481
|
onClose && onClose(event);
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
482
|
+
console.log('qui2');
|
|
483
|
+
/*setLayer(null);
|
|
484
|
+
feedType && feedType === SCFeedTypologyType.CATEGORY
|
|
485
|
+
? dispatch({type: 'resetCategoryFeed'})
|
|
486
|
+
: feedType === SCFeedTypologyType.GROUP
|
|
487
|
+
? dispatch({type: 'resetGroupFeed'})
|
|
488
|
+
: dispatch({type: 'reset'}); */
|
|
487
489
|
}
|
|
488
490
|
}, [onClose, canSubmit, handleRemoveLayer]);
|
|
489
491
|
const handleClosePrompt = (0, react_1.useCallback)((event) => {
|
|
@@ -104,7 +104,7 @@ const Feed = (inProps, ref) => {
|
|
|
104
104
|
}, [scPreferences.preferences]);
|
|
105
105
|
// RENDER
|
|
106
106
|
const theme = (0, styles_1.useTheme)();
|
|
107
|
-
const oneColLayout = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'), { noSsr:
|
|
107
|
+
const oneColLayout = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'), { noSsr: (0, utils_1.isClientSideRendering)() });
|
|
108
108
|
const advEnabled = (0, react_1.useMemo)(() => preferences &&
|
|
109
109
|
preferences[react_core_1.SCPreferences.ADVERTISING_CUSTOM_ADV_ENABLED] &&
|
|
110
110
|
((preferences[react_core_1.SCPreferences.ADVERTISING_CUSTOM_ADV_ONLY_FOR_ANONYMOUS_USERS_ENABLED] && scUserContext.user === null) ||
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { PlatformWidgetActionType } from '../../types/platformWidget';
|
|
2
3
|
import { VirtualScrollerItemProps } from '../../types/virtualScroller';
|
|
3
4
|
export interface PlatformWidgetProps extends VirtualScrollerItemProps {
|
|
4
5
|
/**
|
|
@@ -19,11 +20,18 @@ export interface PlatformWidgetProps extends VirtualScrollerItemProps {
|
|
|
19
20
|
/**
|
|
20
21
|
* Actions to be inserted before
|
|
21
22
|
*/
|
|
22
|
-
startActions?:
|
|
23
|
+
startActions?: PlatformWidgetActionType[];
|
|
23
24
|
/**
|
|
24
25
|
* Actions to be inserted after
|
|
25
26
|
*/
|
|
26
|
-
endActions?:
|
|
27
|
+
endActions?: PlatformWidgetActionType[];
|
|
28
|
+
/**
|
|
29
|
+
* Hide actions
|
|
30
|
+
*/
|
|
31
|
+
hideHubAction?: boolean;
|
|
32
|
+
hideConsoleAction?: boolean;
|
|
33
|
+
hideModerationAction?: boolean;
|
|
34
|
+
hideContactUsAction?: boolean;
|
|
27
35
|
/**
|
|
28
36
|
* Other props
|
|
29
37
|
*/
|
|
@@ -53,6 +61,20 @@ export interface PlatformWidgetProps extends VirtualScrollerItemProps {
|
|
|
53
61
|
|---|---|---|
|
|
54
62
|
|root|.SCPlatformWidget-root|Styles applied to the root element.|
|
|
55
63
|
|title|.SCPlatformWidget-title|Styles applied to the title element.|
|
|
64
|
+
|actions|.SCPlatformWidget-actions|Styles applied to the actions container.|
|
|
65
|
+
|action|.SCPlatformWidget-action|Styles applied to the single action element.|
|
|
66
|
+
|actionHighlighted|.SCPlatformWidget-action-highlighted|Styles applied to the action highlighted.|
|
|
67
|
+
|tutorial|.SCPlatformWidget-tutorial|Styles applied to the tutorial element.|
|
|
68
|
+
|tutorialContent|.SCPlatformWidget-tutorial-content|Styles applied to the content of the tutorial element.|
|
|
69
|
+
|tutorialTitle|.SCPlatformWidget-tutorial-title|Styles applied to the title element of the tutorial.|
|
|
70
|
+
|tutorialTitleClose|.SCPlatformWidget-tutorial-title-close|Styles applied to the close button of the title in the tutorial.|
|
|
71
|
+
|tutorialDesc|.SCPlatformWidget-tutorial-desc|Styles applied to the tutorial description element.|
|
|
72
|
+
|tutorialOpen|.SCPlatformWidget-tutorial-open|Styles applied to the tutorial element when is active.|
|
|
73
|
+
|divider|.SCPlatformWidget-divider|Styles applied to the divider element in the tutorial container.|
|
|
74
|
+
|tutorialControls|.SCPlatformWidget-tutorial-controls|Styles applied to the tutorial bottom controls.|
|
|
75
|
+
|btnStep|.SCPlatformWidget-btn-step|Styles applied to the button next/previous/skip/close of the tutorial controls.|
|
|
76
|
+
|btnPreviousStep|.SCPlatformWidget-btn-previous-step|Styles applied to the button previous element of the tutorial controls.|
|
|
77
|
+
|btnNextStep|.SCPlatformWidget-btn-next-step|Styles applied to the button next element of the tutorial controls.|
|
|
56
78
|
|
|
57
79
|
*
|
|
58
80
|
* @param inProps
|
|
@@ -6,21 +6,122 @@ const styles_1 = require("@mui/material/styles");
|
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
8
8
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
|
-
const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
|
|
10
9
|
const react_intl_1 = require("react-intl");
|
|
11
10
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
11
|
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
13
12
|
const system_1 = require("@mui/system");
|
|
14
13
|
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
15
14
|
const constants_1 = require("./constants");
|
|
15
|
+
const assets_1 = require("../../assets");
|
|
16
|
+
const Grow_1 = tslib_1.__importDefault(require("@mui/material/Grow"));
|
|
16
17
|
const classes = {
|
|
17
18
|
root: `${constants_1.PREFIX}-root`,
|
|
18
|
-
title: `${constants_1.PREFIX}-title
|
|
19
|
+
title: `${constants_1.PREFIX}-title`,
|
|
20
|
+
content: `${constants_1.PREFIX}-content`,
|
|
21
|
+
actions: `${constants_1.PREFIX}-actions`,
|
|
22
|
+
action: `${constants_1.PREFIX}-action`,
|
|
23
|
+
actionHighlighted: `${constants_1.PREFIX}-action-highlighted`,
|
|
24
|
+
tutorial: `${constants_1.PREFIX}-tutorial`,
|
|
25
|
+
tutorialContent: `${constants_1.PREFIX}-tutorial-content`,
|
|
26
|
+
tutorialTitle: `${constants_1.PREFIX}-tutorial-title`,
|
|
27
|
+
tutorialTitleClose: `${constants_1.PREFIX}-tutorial-title-close`,
|
|
28
|
+
tutorialDesc: `${constants_1.PREFIX}-tutorial-desc`,
|
|
29
|
+
tutorialOpen: `${constants_1.PREFIX}-tutorial-open`,
|
|
30
|
+
divider: `${constants_1.PREFIX}-divider`,
|
|
31
|
+
tutorialControls: `${constants_1.PREFIX}-tutorial-controls`,
|
|
32
|
+
btnStep: `${constants_1.PREFIX}-btn-step`,
|
|
33
|
+
btnPreviousStep: `${constants_1.PREFIX}-btn-previous-step`,
|
|
34
|
+
btnNextStep: `${constants_1.PREFIX}-btn-next-step`
|
|
19
35
|
};
|
|
20
36
|
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
21
37
|
name: constants_1.PREFIX,
|
|
22
38
|
slot: 'Root'
|
|
23
|
-
})(() => ({
|
|
39
|
+
})(({ theme }) => ({
|
|
40
|
+
padding: '0px !important',
|
|
41
|
+
[`&.${classes.tutorialOpen}`]: {
|
|
42
|
+
position: 'relative',
|
|
43
|
+
zIndex: theme.zIndex.drawer + 2,
|
|
44
|
+
[`& .${classes.tutorial}`]: {
|
|
45
|
+
padding: 0
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
[`& .${classes.title}`]: {
|
|
49
|
+
display: 'flex',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
marginBottom: theme.spacing(1)
|
|
52
|
+
},
|
|
53
|
+
[`& .${classes.content}`]: {
|
|
54
|
+
padding: `${theme.spacing(2)} 0 0 0`,
|
|
55
|
+
backgroundColor: '#EFEFEF'
|
|
56
|
+
},
|
|
57
|
+
[`& .${classes.actions}`]: {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
paddingBottom: 0,
|
|
60
|
+
boxShadow: 'inset -1px -3px 7px -4px #CECECE',
|
|
61
|
+
'-webkit-overflow-scrolling': 'touch',
|
|
62
|
+
overflowX: 'auto',
|
|
63
|
+
overflowY: 'hidden',
|
|
64
|
+
scrollbarWidth: 'none' /* Firefox */,
|
|
65
|
+
'-ms-overflow-style': 'none' /* IE and Edge */,
|
|
66
|
+
'&::-webkit-scrollbar': {
|
|
67
|
+
display: 'none'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
[`& .${classes.action}`]: {
|
|
71
|
+
padding: `0px 2px ${theme.spacing(2)} 2px`,
|
|
72
|
+
display: 'flex',
|
|
73
|
+
flexGrow: 1,
|
|
74
|
+
justifyContent: 'center'
|
|
75
|
+
},
|
|
76
|
+
[`& .${classes.tutorialContent}`]: {
|
|
77
|
+
width: '100%'
|
|
78
|
+
},
|
|
79
|
+
[`& .${classes.divider}`]: {
|
|
80
|
+
paddingTop: theme.spacing()
|
|
81
|
+
},
|
|
82
|
+
[`& .${classes.tutorialTitle}`]: {
|
|
83
|
+
position: 'relative',
|
|
84
|
+
fontWeight: 700,
|
|
85
|
+
fontSize: 15,
|
|
86
|
+
padding: `${theme.spacing(3)} ${theme.spacing()} ${theme.spacing()} ${theme.spacing(3)}`
|
|
87
|
+
},
|
|
88
|
+
[`& .${classes.tutorialTitleClose}`]: {
|
|
89
|
+
position: 'absolute',
|
|
90
|
+
top: theme.spacing(3),
|
|
91
|
+
right: theme.spacing(3)
|
|
92
|
+
},
|
|
93
|
+
[`& .${classes.tutorialDesc}`]: {
|
|
94
|
+
fontSize: 14,
|
|
95
|
+
fontWeight: 200,
|
|
96
|
+
color: theme.palette.grey[700],
|
|
97
|
+
padding: `0px ${theme.spacing(3)} ${theme.spacing()} ${theme.spacing(3)}`
|
|
98
|
+
},
|
|
99
|
+
[`& .${classes.tutorialControls}`]: {
|
|
100
|
+
padding: theme.spacing(2)
|
|
101
|
+
},
|
|
102
|
+
[`& .${classes.actionHighlighted}`]: {
|
|
103
|
+
position: 'relative',
|
|
104
|
+
'&:before': {
|
|
105
|
+
content: '""',
|
|
106
|
+
display: 'block',
|
|
107
|
+
position: 'absolute',
|
|
108
|
+
bottom: -11,
|
|
109
|
+
width: 10,
|
|
110
|
+
height: 10,
|
|
111
|
+
transform: 'translateY(-50%) rotate(45deg)',
|
|
112
|
+
boxShadow: '0px -20px 20px 0px #CECECE',
|
|
113
|
+
zIndex: 0,
|
|
114
|
+
backgroundColor: theme.palette.common.white
|
|
115
|
+
},
|
|
116
|
+
'& .MuiButton-root': {
|
|
117
|
+
backgroundColor: theme.palette.primary.main,
|
|
118
|
+
color: theme.palette.common.white
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
[`& .${classes.btnStep}`]: {
|
|
122
|
+
borderRadius: 3
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
24
125
|
/**
|
|
25
126
|
* > API documentation for the Community-JS PlatformWidget component. Learn about the available props and the CSS API.
|
|
26
127
|
*
|
|
@@ -45,6 +146,20 @@ const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
|
45
146
|
|---|---|---|
|
|
46
147
|
|root|.SCPlatformWidget-root|Styles applied to the root element.|
|
|
47
148
|
|title|.SCPlatformWidget-title|Styles applied to the title element.|
|
|
149
|
+
|actions|.SCPlatformWidget-actions|Styles applied to the actions container.|
|
|
150
|
+
|action|.SCPlatformWidget-action|Styles applied to the single action element.|
|
|
151
|
+
|actionHighlighted|.SCPlatformWidget-action-highlighted|Styles applied to the action highlighted.|
|
|
152
|
+
|tutorial|.SCPlatformWidget-tutorial|Styles applied to the tutorial element.|
|
|
153
|
+
|tutorialContent|.SCPlatformWidget-tutorial-content|Styles applied to the content of the tutorial element.|
|
|
154
|
+
|tutorialTitle|.SCPlatformWidget-tutorial-title|Styles applied to the title element of the tutorial.|
|
|
155
|
+
|tutorialTitleClose|.SCPlatformWidget-tutorial-title-close|Styles applied to the close button of the title in the tutorial.|
|
|
156
|
+
|tutorialDesc|.SCPlatformWidget-tutorial-desc|Styles applied to the tutorial description element.|
|
|
157
|
+
|tutorialOpen|.SCPlatformWidget-tutorial-open|Styles applied to the tutorial element when is active.|
|
|
158
|
+
|divider|.SCPlatformWidget-divider|Styles applied to the divider element in the tutorial container.|
|
|
159
|
+
|tutorialControls|.SCPlatformWidget-tutorial-controls|Styles applied to the tutorial bottom controls.|
|
|
160
|
+
|btnStep|.SCPlatformWidget-btn-step|Styles applied to the button next/previous/skip/close of the tutorial controls.|
|
|
161
|
+
|btnPreviousStep|.SCPlatformWidget-btn-previous-step|Styles applied to the button previous element of the tutorial controls.|
|
|
162
|
+
|btnNextStep|.SCPlatformWidget-btn-next-step|Styles applied to the button next element of the tutorial controls.|
|
|
48
163
|
|
|
49
164
|
*
|
|
50
165
|
* @param inProps
|
|
@@ -56,14 +171,102 @@ function PlatformWidget(inProps) {
|
|
|
56
171
|
props: inProps,
|
|
57
172
|
name: constants_1.PREFIX
|
|
58
173
|
});
|
|
59
|
-
const { autoHide, className, title = null, startActions =
|
|
174
|
+
const { autoHide, className, title = null, startActions = [], endActions = [], hideConsoleAction = false, hideModerationAction = false, hideHubAction = false, hideContactUsAction = false, onHeightChange } = props, rest = tslib_1.__rest(props, ["autoHide", "className", "title", "startActions", "endActions", "hideConsoleAction", "hideModerationAction", "hideHubAction", "hideContactUsAction", "onHeightChange"]);
|
|
60
175
|
// CONTEXT
|
|
176
|
+
const scContext = (0, react_core_1.useSCContext)();
|
|
61
177
|
const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
|
|
62
|
-
|
|
178
|
+
// STATE
|
|
179
|
+
const [tutorialIndex, setTutorialIndex] = (0, react_1.useState)(0);
|
|
180
|
+
const [isTutorialOpen, setIsTutorialOpen] = (0, react_1.useState)(false);
|
|
63
181
|
// CONST
|
|
64
|
-
const language = scLocaleContext.locale;
|
|
65
182
|
const isAdmin = (0, react_1.useMemo)(() => react_core_1.UserUtils.isAdmin(scUserContext.user), [scUserContext.user]);
|
|
183
|
+
const isEditor = (0, react_1.useMemo)(() => react_core_1.UserUtils.isEditor(scUserContext.user), [scUserContext.user]);
|
|
66
184
|
const isModerator = (0, react_1.useMemo)(() => react_core_1.UserUtils.isModerator(scUserContext.user), [scUserContext.user]);
|
|
185
|
+
const isStage = scContext.settings.portal.includes('stage');
|
|
186
|
+
const actions = [
|
|
187
|
+
...startActions,
|
|
188
|
+
...((isAdmin || isEditor) && !hideConsoleAction
|
|
189
|
+
? [
|
|
190
|
+
{
|
|
191
|
+
render: (react_1.default.createElement(material_1.Button, { variant: "outlined", size: "small", onClick: () => fetchPlatform('') },
|
|
192
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.adm", defaultMessage: "ui.platformWidget.adm" }))),
|
|
193
|
+
title: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.adm", defaultMessage: "ui.platformWidget.adm" }),
|
|
194
|
+
content: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.adm.desc", defaultMessage: "ui.platformWidget.adm.desc" })
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
: []),
|
|
198
|
+
...((isAdmin || isModerator) && !hideModerationAction
|
|
199
|
+
? [
|
|
200
|
+
{
|
|
201
|
+
render: (react_1.default.createElement(material_1.Button, { variant: "outlined", size: "small", onClick: () => fetchPlatform('/moderation/flags/') },
|
|
202
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.mod", defaultMessage: "ui.platformWidget.mod" }))),
|
|
203
|
+
title: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.mod", defaultMessage: "ui.platformWidget.mod" }),
|
|
204
|
+
content: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.mod.desc", defaultMessage: "ui.platformWidget.mod.desc" })
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
: []),
|
|
208
|
+
...(isAdmin && !hideHubAction
|
|
209
|
+
? [
|
|
210
|
+
{
|
|
211
|
+
render: (react_1.default.createElement(material_1.Button, { variant: "outlined", size: "small", component: react_core_1.Link, to: isStage ? constants_1.HUB_STAGE : constants_1.HUB_PROD, target: "_blank" },
|
|
212
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.hub", defaultMessage: "ui.platformWidget.hub" }))),
|
|
213
|
+
title: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.hub", defaultMessage: "ui.platformWidget.hub" }),
|
|
214
|
+
content: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.hub.desc", defaultMessage: "ui.platformWidget.hub.desc" })
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
: []),
|
|
218
|
+
...(!hideContactUsAction
|
|
219
|
+
? [
|
|
220
|
+
{
|
|
221
|
+
render: (react_1.default.createElement(material_1.Button, { variant: "outlined", size: "small", component: react_core_1.Link, to: isStage ? constants_1.CONTACT_STAGE : constants_1.CONTACT_PROD, target: "_blank" },
|
|
222
|
+
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.contactUs", defaultMessage: "ui.platformWidget.contactUs" }))),
|
|
223
|
+
title: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.contactUs", defaultMessage: "ui.platformWidget.contactUs" }),
|
|
224
|
+
content: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.contactUs.desc", defaultMessage: "ui.platformWidget.contactUs.desc" })
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
: []),
|
|
228
|
+
...endActions
|
|
229
|
+
];
|
|
230
|
+
/**
|
|
231
|
+
* Handle open tutorial
|
|
232
|
+
*/
|
|
233
|
+
const handleOpenTutorial = (0, react_1.useCallback)(() => {
|
|
234
|
+
setTutorialIndex(0);
|
|
235
|
+
setIsTutorialOpen(true);
|
|
236
|
+
onHeightChange && onHeightChange();
|
|
237
|
+
}, [setTutorialIndex, setIsTutorialOpen, onHeightChange]);
|
|
238
|
+
/**
|
|
239
|
+
* Handle close tutorial
|
|
240
|
+
*/
|
|
241
|
+
const handleCloseTutorial = (0, react_1.useCallback)(() => {
|
|
242
|
+
setIsTutorialOpen(false);
|
|
243
|
+
setTutorialIndex(0);
|
|
244
|
+
onHeightChange && onHeightChange();
|
|
245
|
+
}, [setIsTutorialOpen, setTutorialIndex, onHeightChange]);
|
|
246
|
+
/**
|
|
247
|
+
* Handle next step tutorial
|
|
248
|
+
*/
|
|
249
|
+
const handlePrevious = (0, react_1.useCallback)(() => {
|
|
250
|
+
if (tutorialIndex > 0) {
|
|
251
|
+
setTutorialIndex((prev) => prev - 1);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
handleCloseTutorial();
|
|
255
|
+
}
|
|
256
|
+
onHeightChange && onHeightChange();
|
|
257
|
+
}, [tutorialIndex, setTutorialIndex, handleCloseTutorial, onHeightChange]);
|
|
258
|
+
/**
|
|
259
|
+
* Handle next step tutorial
|
|
260
|
+
*/
|
|
261
|
+
const handleNext = (0, react_1.useCallback)(() => {
|
|
262
|
+
if (tutorialIndex < actions.length - 1) {
|
|
263
|
+
setTutorialIndex((prev) => prev + 1);
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
handleCloseTutorial();
|
|
267
|
+
}
|
|
268
|
+
onHeightChange && onHeightChange();
|
|
269
|
+
}, [actions, tutorialIndex, setTutorialIndex, handleCloseTutorial, onHeightChange]);
|
|
67
270
|
/**
|
|
68
271
|
* Fetches platform url
|
|
69
272
|
*/
|
|
@@ -84,25 +287,51 @@ function PlatformWidget(inProps) {
|
|
|
84
287
|
console.log(error);
|
|
85
288
|
});
|
|
86
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* Render tutorial
|
|
292
|
+
*/
|
|
293
|
+
const tutorial = (react_1.default.createElement(material_1.Grid, { container: true, spacing: isAdmin ? 1 : 3, justifyContent: "center", className: classes.tutorial },
|
|
294
|
+
!isTutorialOpen && (react_1.default.createElement(material_1.Grid, { item: true, xs: "auto", alignItems: "center", justifyContent: "center" },
|
|
295
|
+
react_1.default.createElement(material_1.IconButton, { size: "medium", onClick: handleOpenTutorial },
|
|
296
|
+
react_1.default.createElement(material_1.Icon, null, "info")))),
|
|
297
|
+
react_1.default.createElement(material_1.Collapse, { in: isTutorialOpen, className: classes.tutorialContent }, isTutorialOpen && (react_1.default.createElement(material_1.Grid, { item: true, xs: "auto" },
|
|
298
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', className: classes.tutorialTitle, component: 'div' },
|
|
299
|
+
react_1.default.createElement(Grow_1.default, { in: true, timeout: 1000 },
|
|
300
|
+
react_1.default.createElement("span", null, actions[tutorialIndex].title)),
|
|
301
|
+
react_1.default.createElement(material_1.IconButton, { size: 'small', className: classes.tutorialTitleClose, onClick: handleCloseTutorial },
|
|
302
|
+
react_1.default.createElement(material_1.Icon, null, "close"))),
|
|
303
|
+
react_1.default.createElement(Grow_1.default, { in: true, timeout: 1200 },
|
|
304
|
+
react_1.default.createElement(material_1.Typography, { variant: 'body2', className: classes.tutorialDesc }, actions[tutorialIndex].content)),
|
|
305
|
+
react_1.default.createElement(material_1.Divider, { className: classes.divider }),
|
|
306
|
+
react_1.default.createElement(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2, className: classes.tutorialControls },
|
|
307
|
+
react_1.default.createElement(material_1.Button, { variant: "text", size: "small", onClick: handlePrevious, className: (0, classnames_1.default)(classes.btnStep, classes.btnPreviousStep) }, tutorialIndex === 0 ? (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.skip", defaultMessage: "ui.platformWidget.tutorial.skip" })) : (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.previous", defaultMessage: "ui.platformWidget.tutorial.previous" }))),
|
|
308
|
+
react_1.default.createElement(material_1.Typography, { component: 'div' },
|
|
309
|
+
tutorialIndex + 1,
|
|
310
|
+
"/",
|
|
311
|
+
actions.length),
|
|
312
|
+
react_1.default.createElement(material_1.Button, { variant: "contained", size: "small", color: "primary", onClick: handleNext, className: (0, classnames_1.default)(classes.btnStep, classes.btnNextStep) }, tutorialIndex === actions.length - 1 ? (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.close", defaultMessage: "ui.platformWidget.tutorial.close" })) : (react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.next", defaultMessage: "ui.platformWidget.tutorial.next" })))))))));
|
|
87
313
|
/**
|
|
88
314
|
* Renders platform card
|
|
89
315
|
*/
|
|
90
|
-
const
|
|
91
|
-
react_1.default.createElement(material_1.Grid, { item: true, xs: 12 }, title ? (title) : (react_1.default.createElement(material_1.
|
|
92
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.title", defaultMessage: "ui.platformWidget.title" }),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
react_1.default.createElement(
|
|
98
|
-
|
|
99
|
-
react_1.default.createElement(material_1.
|
|
100
|
-
endActions));
|
|
316
|
+
const content = (react_1.default.createElement(material_1.Grid, { container: true, spacing: isAdmin ? 1 : 3, justifyContent: "center", className: classes.content },
|
|
317
|
+
react_1.default.createElement(material_1.Grid, { item: true, xs: 12 }, title ? (title) : (react_1.default.createElement(material_1.Box, { className: classes.title },
|
|
318
|
+
react_1.default.createElement(material_1.Tooltip, { title: react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.platformWidget.title.tooltip", defaultMessage: "ui.platformWidget.title.tooltip" }) },
|
|
319
|
+
react_1.default.createElement("img", { src: assets_1.Logo, alt: "logo" }))))),
|
|
320
|
+
react_1.default.createElement(material_1.Grid, { item: true, xs: 12, className: classes.actions },
|
|
321
|
+
react_1.default.createElement(material_1.Grid, { item: true, xs: 1, className: classes.action }),
|
|
322
|
+
actions.map((a, i) => {
|
|
323
|
+
return (react_1.default.createElement(material_1.Grid, { item: true, xs: "auto", className: (0, classnames_1.default)(classes.action, { [classes.actionHighlighted]: tutorialIndex === i && isTutorialOpen }) }, a.render));
|
|
324
|
+
}),
|
|
325
|
+
react_1.default.createElement(material_1.Grid, { item: true, xs: 1, className: classes.action }))));
|
|
101
326
|
/**
|
|
102
327
|
* Renders root object (if not hidden by autoHide prop)
|
|
103
328
|
*/
|
|
104
329
|
if (!autoHide && ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.role)) {
|
|
105
|
-
return (react_1.default.createElement(
|
|
330
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
331
|
+
react_1.default.createElement(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className, { [classes.tutorialOpen]: isTutorialOpen }) }, rest),
|
|
332
|
+
content,
|
|
333
|
+
tutorial),
|
|
334
|
+
react_1.default.createElement(material_1.Backdrop, { sx: { color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }, open: isTutorialOpen, onClick: handleCloseTutorial })));
|
|
106
335
|
}
|
|
107
336
|
return react_1.default.createElement(HiddenPlaceholder_1.default, null);
|
|
108
337
|
}
|
|
@@ -1 +1,5 @@
|
|
|
1
1
|
export declare const PREFIX = "SCPlatformWidget";
|
|
2
|
+
export declare const HUB_STAGE = "https://hub.stage.quentrix.com/";
|
|
3
|
+
export declare const HUB_PROD = "https://hub.selfcommunity.com/";
|
|
4
|
+
export declare const CONTACT_STAGE = "https://hub.stage.quentrix.com/dashboard/account/contact-us";
|
|
5
|
+
export declare const CONTACT_PROD = "https://hub.selfcommunity.com/dashboard/account/contact-us";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PREFIX = void 0;
|
|
3
|
+
exports.CONTACT_PROD = exports.CONTACT_STAGE = exports.HUB_PROD = exports.HUB_STAGE = exports.PREFIX = void 0;
|
|
4
4
|
exports.PREFIX = 'SCPlatformWidget';
|
|
5
|
+
exports.HUB_STAGE = 'https://hub.stage.quentrix.com/';
|
|
6
|
+
exports.HUB_PROD = 'https://hub.selfcommunity.com/';
|
|
7
|
+
exports.CONTACT_STAGE = 'https://hub.stage.quentrix.com/dashboard/account/contact-us';
|
|
8
|
+
exports.CONTACT_PROD = 'https://hub.selfcommunity.com/dashboard/account/contact-us';
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ import AccountRecover, { AccountRecoverProps } from './components/AccountRecover
|
|
|
72
72
|
import AccountReset, { AccountResetProps } from './components/AccountReset';
|
|
73
73
|
import AccountVerify, { AccountVerifyProps } from './components/AccountVerify';
|
|
74
74
|
import AccountChangeMailValidation, { AccountChangeMailValidationProps } from './components/AccountChangeMailValidation';
|
|
75
|
-
import { SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCFeedWidgetType, SCMediaChunkType, SCMediaObjectType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, VirtualScrollerItemProps } from './types';
|
|
75
|
+
import { SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCFeedWidgetType, SCMediaChunkType, SCMediaObjectType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, VirtualScrollerItemProps, PlatformWidgetActionType } from './types';
|
|
76
76
|
import Widget, { WidgetProps } from './components/Widget';
|
|
77
77
|
import ConfirmDialog from './shared/ConfirmDialog/ConfirmDialog';
|
|
78
78
|
import LanguageSwitcher from './shared/LanguageSwitcher';
|
|
@@ -144,7 +144,11 @@ import { getUnseenNotification, getUnseenNotificationCounter } from './utils/fee
|
|
|
144
144
|
import * as MessageUploaderUtils from './utils/thumbnailCoverter';
|
|
145
145
|
import { getRelativeTime } from './utils/formatRelativeTime';
|
|
146
146
|
import FeedObjectMediaPreview, { FeedObjectMediaPreviewProps } from './components/FeedObjectMediaPreview';
|
|
147
|
+
/**
|
|
148
|
+
* Import Assets
|
|
149
|
+
*/
|
|
150
|
+
import { Logo } from './assets';
|
|
147
151
|
/**
|
|
148
152
|
* List all exports
|
|
149
153
|
*/
|
|
150
|
-
export { AccountDataPortability, AccountDataPortabilityProps, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDelete, AccountDeleteProps, AccountDeleteButton, AccountDeleteButtonProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AccountChangeMailValidation, AccountChangeMailValidationProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarProps, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, NavigationMenuIconButtonProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, Category, CategoryProps, CategorySkeleton, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, Categories, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, ChangePictureProps, ChangeCoverProps, Composer, ComposerProps, ComposerIconButton, ComposerIconButtonProps, Editor, EditorProps, EditorSkeleton, FriendshipUserButton, FriendshipButtonProps, Feed, FeedRef, FeedProps, FeedSidebarProps, FeedSkeleton, CategoryFollowButton, CategoryFollowButtonProps, FollowUserButton, FollowUserButtonProps, ConnectionUserButton, FeedObject, FeedObjectProps, FeedObjectSkeleton, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectProps, CommentObjectProps, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentObjectReplyProps, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, Notification, NotificationProps, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetProps, PlatformWidgetSkeleton, LocationAutocomplete, LocationAutocompleteProps, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectWidgetProps, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserActionIconButtonProps, UserCounters, UserCountersProps, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserInfoDialog, UserInfoDialogProps, UserInfo, UserInfoProps, UserInfoSkeleton, UserProfileBlocked, UserProfileBlockedProps, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditProps, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, UserSocialAssociationProps, SCUserSocialAssociations, VirtualScrollerItemProps, CustomAdv, CustomAdvProps, CustomAdvSkeleton, User, UserProps, UserSkeleton, PrivateMessageThread, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Widget, WidgetProps, SCFeedWidgetType, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCMediaObjectType, SCMediaChunkType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupMembersButton, GroupMembersButtonProps, CreateGroupButton, CreateGroupButtonProps, EditGroupButton, EditGroupButtonProps, GroupInviteButton, GroupInviteButtonProps, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, Group, GroupProps, GroupSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupsProps, GroupsSkeleton, GroupForm, GroupFormProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton, DefaultDrawerContent, DefaultDrawerContentProps, HiddenPlaceholder, UrlTextField, UsernameTextField, EmailTextField, PasswordTextField, PhoneTextField, MetadataField, InfiniteScroll, StickyBox, useStickyBox, StickyBoxProps, StickyBoxComponent, UseStickyBoxProps, TagChip, TagChipProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserAvatar, UserAvatarProps, Lightbox, CentralProgress, ConfirmDialog, LanguageSwitcher, MediaChunkUploader, MediaChunkUploaderProps, File, Link, Share, EditMediaProps, MEDIA_TYPE_EMBED, FACEBOOK_SHARE, X_SHARE, LINKEDIN_SHARE, DEFAULT_PRELOAD_OFFSET_VIEWPORT, MIN_PRELOAD_OFFSET_VIEWPORT, MAX_PRELOAD_OFFSET_VIEWPORT, ConsentSolution, ConsentSolutionProps, ConsentSolutionSkeleton, ConsentSolutionButton, ConsentSolutionButtonProps, LEGAL_POLICIES, DEFAULT_FIELDS, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_LIMIT, DEFAULT_WIDGETS_NUMBER, PollSuggestionWidget, PollSuggestionWidgetProps, Incubator, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorDetail, IncubatorDetailProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, ContributionUtils, bytesToSize, getUnseenNotification, getUnseenNotificationCounter, MessageUploaderUtils, getRelativeTime, Footer, FooterProps, FooterSkeleton, BaseItem, BaseItemProps, BaseDialog, BaseDialogProps, GroupSettingsIconButton, GroupSettingsIconButtonProps };
|
|
154
|
+
export { AccountDataPortability, AccountDataPortabilityProps, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDelete, AccountDeleteProps, AccountDeleteButton, AccountDeleteButtonProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AccountChangeMailValidation, AccountChangeMailValidationProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarProps, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, NavigationMenuIconButtonProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, Category, CategoryProps, CategorySkeleton, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, Categories, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, ChangePictureProps, ChangeCoverProps, Composer, ComposerProps, ComposerIconButton, ComposerIconButtonProps, Editor, EditorProps, EditorSkeleton, FriendshipUserButton, FriendshipButtonProps, Feed, FeedRef, FeedProps, FeedSidebarProps, FeedSkeleton, CategoryFollowButton, CategoryFollowButtonProps, FollowUserButton, FollowUserButtonProps, ConnectionUserButton, FeedObject, FeedObjectProps, FeedObjectSkeleton, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectProps, CommentObjectProps, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentObjectReplyProps, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, Notification, NotificationProps, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetProps, PlatformWidgetSkeleton, LocationAutocomplete, LocationAutocompleteProps, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectWidgetProps, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserActionIconButtonProps, UserCounters, UserCountersProps, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserInfoDialog, UserInfoDialogProps, UserInfo, UserInfoProps, UserInfoSkeleton, UserProfileBlocked, UserProfileBlockedProps, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditProps, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, UserSocialAssociationProps, SCUserSocialAssociations, VirtualScrollerItemProps, PlatformWidgetActionType, CustomAdv, CustomAdvProps, CustomAdvSkeleton, User, UserProps, UserSkeleton, PrivateMessageThread, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Widget, WidgetProps, SCFeedWidgetType, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCMediaObjectType, SCMediaChunkType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupMembersButton, GroupMembersButtonProps, CreateGroupButton, CreateGroupButtonProps, EditGroupButton, EditGroupButtonProps, GroupInviteButton, GroupInviteButtonProps, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, Group, GroupProps, GroupSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupsProps, GroupsSkeleton, GroupForm, GroupFormProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton, DefaultDrawerContent, DefaultDrawerContentProps, HiddenPlaceholder, UrlTextField, UsernameTextField, EmailTextField, PasswordTextField, PhoneTextField, MetadataField, InfiniteScroll, StickyBox, useStickyBox, StickyBoxProps, StickyBoxComponent, UseStickyBoxProps, TagChip, TagChipProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserAvatar, UserAvatarProps, Lightbox, CentralProgress, ConfirmDialog, LanguageSwitcher, MediaChunkUploader, MediaChunkUploaderProps, File, Link, Share, EditMediaProps, MEDIA_TYPE_EMBED, FACEBOOK_SHARE, X_SHARE, LINKEDIN_SHARE, DEFAULT_PRELOAD_OFFSET_VIEWPORT, MIN_PRELOAD_OFFSET_VIEWPORT, MAX_PRELOAD_OFFSET_VIEWPORT, ConsentSolution, ConsentSolutionProps, ConsentSolutionSkeleton, ConsentSolutionButton, ConsentSolutionButtonProps, LEGAL_POLICIES, DEFAULT_FIELDS, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_LIMIT, DEFAULT_WIDGETS_NUMBER, PollSuggestionWidget, PollSuggestionWidgetProps, Incubator, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorDetail, IncubatorDetailProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, ContributionUtils, bytesToSize, getUnseenNotification, getUnseenNotificationCounter, MessageUploaderUtils, getRelativeTime, Footer, FooterProps, FooterSkeleton, BaseItem, BaseItemProps, BaseDialog, BaseDialogProps, GroupSettingsIconButton, GroupSettingsIconButtonProps, Logo };
|
package/lib/cjs/index.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.GenericSkeleton = exports.FeedUpdatesWidgetSkeleton = exports.FeedUpdate
|
|
|
4
4
|
exports.UserConnectionsRequestsSentWidget = exports.UserConnectionsRequestsWidgetSkeleton = exports.UserConnectionsRequestsWidget = exports.UserConnectionsWidgetSkeleton = exports.UserConnectionsWidget = exports.UserFollowersWidgetSkeleton = exports.UserFollowersWidget = exports.UserFollowedUsersWidgetSkeleton = exports.UserFollowedUsersWidget = exports.UserProfileEditSectionAccount = exports.UserProfileEditSectionSettings = exports.UserProfileEditSectionPublicInfo = exports.UserProfileEditSkeleton = exports.UserProfileEdit = exports.SCUserProfileSettings = exports.SCUserProfileFields = exports.UserProfileBlocked = exports.UserInfoSkeleton = exports.UserInfo = exports.UserInfoDialog = exports.UserProfileHeaderSkeleton = exports.UserProfileHeader = exports.UserCounters = exports.UserActionIconButton = exports.RelatedFeedObjectsWidgetSkeleton = exports.RelatedFeedObjectsWidget = exports.CategoryTrendingPeopleWidgetSkeleton = exports.CategoryTrendingUsersWidget = exports.CategoryTrendingFeedWidgetSkeleton = exports.CategoryTrendingFeedWidget = exports.LoyaltyProgramWidgetSkeleton = exports.LoyaltyProgramWidget = exports.LocationAutocomplete = exports.PlatformWidgetSkeleton = exports.PlatformWidget = exports.UserSuggestionWidgetSkeleton = exports.UserSuggestionWidget = exports.NotificationSkeleton = exports.Notification = exports.InlineComposerWidgetSkeleton = exports.InlineComposerWidget = exports.ReplyComment = exports.CommentsFeedObjectSkeleton = exports.CommentsFeedObject = exports.CommentObjectReply = exports.CommentObjectSkeleton = exports.CommentsObjectSkeleton = exports.CommentsObject = exports.CommentObject = exports.AvatarGroupSkeleton = void 0;
|
|
5
5
|
exports.Groups = exports.GroupRequestsWidgetSkeleton = exports.GroupRequestsWidget = exports.GroupMembersWidgetSkeleton = exports.GroupMembersWidget = exports.GroupSubscribeButton = exports.GroupSkeleton = exports.Group = exports.GroupInfoWidgetSkeleton = exports.GroupInfoWidget = exports.GroupInviteButton = exports.EditGroupButton = exports.CreateGroupButton = exports.GroupMembersButton = exports.GroupHeaderSkeleton = exports.GroupHeader = exports.ChangeGroupPicture = exports.ChangeGroupCover = exports.SCBroadcastMessageTemplateType = exports.SCNotificationObjectTemplateType = exports.SCFeedObjectActivitiesType = exports.SCCommentsOrderBy = exports.SCFeedObjectTemplateType = exports.Widget = exports.SearchDialog = exports.SearchAutocomplete = exports.SnippetNotificationsSkeleton = exports.SnippetNotifications = exports.ToastNotificationsSkeleton = exports.ToastNotifications = exports.PrivateMessageSettingsIconButton = exports.PrivateMessageComponentSkeleton = exports.PrivateMessageComponent = exports.PrivateMessageSnippetsSkeleton = exports.PrivateMessageSnippets = exports.PrivateMessageEditorSkeleton = exports.PrivateMessageEditor = exports.PrivateMessageSnippetItemSkeleton = exports.PrivateMessageSnippetItem = exports.PrivateMessageThreadItemSkeleton = exports.PrivateMessageThreadItem = exports.PrivateMessageThreadSkeleton = exports.PrivateMessageThread = exports.UserSkeleton = exports.User = exports.CustomAdvSkeleton = exports.CustomAdv = exports.SCUserSocialAssociations = exports.UserSocialAssociation = exports.UserConnectionsRequestsSentWidgetSkeleton = void 0;
|
|
6
6
|
exports.IncubatorSuggestionWidget = exports.IncubatorDetail = exports.IncubatorListWidget = exports.IncubatorSubscribeButton = exports.Incubator = exports.PollSuggestionWidget = exports.DEFAULT_WIDGETS_NUMBER = exports.DEFAULT_PAGINATION_LIMIT = exports.DEFAULT_PAGINATION_OFFSET = exports.DEFAULT_PAGINATION_QUERY_PARAM_NAME = exports.DEFAULT_FIELDS = exports.LEGAL_POLICIES = exports.ConsentSolutionButton = exports.ConsentSolutionSkeleton = exports.ConsentSolution = exports.MAX_PRELOAD_OFFSET_VIEWPORT = exports.MIN_PRELOAD_OFFSET_VIEWPORT = exports.DEFAULT_PRELOAD_OFFSET_VIEWPORT = exports.LINKEDIN_SHARE = exports.X_SHARE = exports.FACEBOOK_SHARE = exports.MEDIA_TYPE_EMBED = exports.Share = exports.Link = exports.File = exports.MediaChunkUploader = exports.LanguageSwitcher = exports.ConfirmDialog = exports.CentralProgress = exports.Lightbox = exports.UserAvatar = exports.UserDeletedSnackBar = exports.TagChip = exports.useStickyBox = exports.StickyBox = exports.InfiniteScroll = exports.MetadataField = exports.PhoneTextField = exports.PasswordTextField = exports.EmailTextField = exports.UsernameTextField = exports.UrlTextField = exports.HiddenPlaceholder = exports.DefaultDrawerContent = exports.UserSubscribedGroupsWidgetSkeleton = exports.UserSubscribedGroupsWidget = exports.GroupInvitedWidgetSkeleton = exports.GroupInvitedWidget = exports.GroupForm = exports.GroupsSkeleton = void 0;
|
|
7
|
-
exports.GroupSettingsIconButton = exports.BaseDialog = exports.BaseItem = exports.FooterSkeleton = exports.Footer = exports.getRelativeTime = exports.MessageUploaderUtils = exports.getUnseenNotificationCounter = exports.getUnseenNotification = exports.bytesToSize = exports.ContributionUtils = void 0;
|
|
7
|
+
exports.Logo = exports.GroupSettingsIconButton = exports.BaseDialog = exports.BaseItem = exports.FooterSkeleton = exports.Footer = exports.getRelativeTime = exports.MessageUploaderUtils = exports.getUnseenNotificationCounter = exports.getUnseenNotification = exports.bytesToSize = exports.ContributionUtils = void 0;
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
9
|
/**
|
|
10
10
|
* Components
|
|
@@ -363,3 +363,8 @@ const formatRelativeTime_1 = require("./utils/formatRelativeTime");
|
|
|
363
363
|
Object.defineProperty(exports, "getRelativeTime", { enumerable: true, get: function () { return formatRelativeTime_1.getRelativeTime; } });
|
|
364
364
|
const FeedObjectMediaPreview_1 = tslib_1.__importDefault(require("./components/FeedObjectMediaPreview"));
|
|
365
365
|
exports.FeedObjectMediaPreview = FeedObjectMediaPreview_1.default;
|
|
366
|
+
/**
|
|
367
|
+
* Import Assets
|
|
368
|
+
*/
|
|
369
|
+
const assets_1 = require("./assets");
|
|
370
|
+
Object.defineProperty(exports, "Logo", { enumerable: true, get: function () { return assets_1.Logo; } });
|
|
@@ -12,6 +12,7 @@ const material_1 = require("@mui/material");
|
|
|
12
12
|
const DialogTitle_1 = tslib_1.__importDefault(require("@mui/material/DialogTitle"));
|
|
13
13
|
const IconButton_1 = tslib_1.__importDefault(require("@mui/material/IconButton"));
|
|
14
14
|
const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
|
|
15
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
15
16
|
const PREFIX = 'SCBaseDialog';
|
|
16
17
|
const classes = {
|
|
17
18
|
root: `${PREFIX}-root`,
|
|
@@ -24,7 +25,7 @@ const DialogTitleRoot = (0, styles_1.styled)(DialogTitle_1.default, {
|
|
|
24
25
|
})(({ theme }) => ({}));
|
|
25
26
|
const DialogTitle = ({ children = null, onClose = null }) => {
|
|
26
27
|
const theme = (0, material_1.useTheme)();
|
|
27
|
-
const isMobile = (0, useMediaQuery_1.default)(theme.breakpoints.down('md'), { noSsr:
|
|
28
|
+
const isMobile = (0, useMediaQuery_1.default)(theme.breakpoints.down('md'), { noSsr: (0, utils_1.isClientSideRendering)() });
|
|
28
29
|
return (react_1.default.createElement(DialogTitleRoot, { className: classes.titleRoot },
|
|
29
30
|
react_1.default.createElement("span", null, children),
|
|
30
31
|
onClose ? (react_1.default.createElement(IconButton_1.default, { "aria-label": "close", onClick: onClose },
|
|
@@ -38,7 +39,7 @@ const Root = (0, styles_1.styled)(Dialog_1.default, {
|
|
|
38
39
|
function BaseDialog(props) {
|
|
39
40
|
// OPTIONS
|
|
40
41
|
const theme = (0, material_1.useTheme)();
|
|
41
|
-
const isMobile = (0, useMediaQuery_1.default)(theme.breakpoints.down('md'), { noSsr:
|
|
42
|
+
const isMobile = (0, useMediaQuery_1.default)(theme.breakpoints.down('md'), { noSsr: (0, utils_1.isClientSideRendering)() });
|
|
42
43
|
const fullScreen = isMobile;
|
|
43
44
|
// PROPS
|
|
44
45
|
const { className = '', title = '', subtitle = null, DialogContentProps = { dividers: !isMobile }, open = false, onClose = null, actions = null, children, maxWidth = 'sm', scroll = 'body' } = props, rest = tslib_1.__rest(props, ["className", "title", "subtitle", "DialogContentProps", "open", "onClose", "actions", "children", "maxWidth", "scroll"]);
|
|
@@ -4,10 +4,12 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const styles_1 = require("@mui/material/styles");
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
|
+
const emoji_picker_react_1 = require("emoji-picker-react");
|
|
7
8
|
const system_1 = require("@mui/system");
|
|
8
9
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
9
11
|
let Picker;
|
|
10
|
-
|
|
12
|
+
(0, utils_1.isClientSideRendering)() &&
|
|
11
13
|
Promise.resolve().then(() => tslib_1.__importStar(require('emoji-picker-react'))).then((_module) => {
|
|
12
14
|
Picker = _module.default;
|
|
13
15
|
});
|
|
@@ -26,7 +28,7 @@ function EmojiPicker(inProps) {
|
|
|
26
28
|
props: inProps,
|
|
27
29
|
name: PREFIX
|
|
28
30
|
});
|
|
29
|
-
const { className = '', emojiStyle =
|
|
31
|
+
const { className = '', emojiStyle = emoji_picker_react_1.EmojiStyle.NATIVE } = props, rest = tslib_1.__rest(props, ["className", "emojiStyle"]);
|
|
30
32
|
return react_1.default.createElement(Root, { className: (0, classnames_1.default)(classes.root, className) }, Picker && react_1.default.createElement(Picker, Object.assign({ emojiStyle: emojiStyle }, rest)));
|
|
31
33
|
}
|
|
32
34
|
exports.default = EmojiPicker;
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ import { SCNotificationObjectTemplateType } from './notification';
|
|
|
6
6
|
import { SCBroadcastMessageTemplateType } from './broadcastMessage';
|
|
7
7
|
import { VirtualScrollerItemProps } from './virtualScroller';
|
|
8
8
|
import { SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations } from './user';
|
|
9
|
-
|
|
9
|
+
import { PlatformWidgetActionType } from './platformWidget';
|
|
10
|
+
export { SCFeedWidgetType, SCMediaObjectType, SCMediaChunkType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, VirtualScrollerItemProps, PlatformWidgetActionType };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PlatformWidgetActionType {
|
|
3
|
+
/**
|
|
4
|
+
* Render action to be inserted
|
|
5
|
+
*/
|
|
6
|
+
render: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Title for tutorial
|
|
9
|
+
*/
|
|
10
|
+
title: React.ReactNode | string;
|
|
11
|
+
/**
|
|
12
|
+
* Content for tutorial
|
|
13
|
+
*/
|
|
14
|
+
content: React.ReactNode | string;
|
|
15
|
+
}
|