@selfcommunity/react-ui 0.10.2-alpha.15 → 0.10.2-alpha.17

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.
@@ -15,8 +15,8 @@ const classes = {
15
15
  const Root = (0, styles_1.styled)(CreateEventButton_1.default, {
16
16
  name: PREFIX,
17
17
  slot: 'Root',
18
- overridesResolver: (props, styles) => styles.root
19
- })(({ theme }) => ({}));
18
+ overridesResolver: (_props, styles) => styles.root
19
+ })(() => ({}));
20
20
  /**
21
21
  *> API documentation for the Community-JS Create Event Button component. Learn about the available props and the CSS API.
22
22
  *
@@ -51,22 +51,22 @@ const classes = {
51
51
  const Root = (0, styles_1.styled)(Widget_1.default, {
52
52
  name: constants_1.PREFIX,
53
53
  slot: 'Root',
54
- overridesResolver: (props, styles) => styles.root
54
+ overridesResolver: (_props, styles) => styles.root
55
55
  })(() => ({}));
56
56
  const DetailRoot = (0, styles_1.styled)(material_1.Box, {
57
57
  name: constants_1.PREFIX,
58
58
  slot: 'DetailRoot',
59
- overridesResolver: (props, styles) => styles.detailRoot
59
+ overridesResolver: (_props, styles) => styles.detailRoot
60
60
  })(() => ({}));
61
61
  const PreviewRoot = (0, styles_1.styled)(material_1.Box, {
62
62
  name: constants_1.PREFIX,
63
63
  slot: 'PreviewRoot',
64
- overridesResolver: (props, styles) => styles.previewRoot
64
+ overridesResolver: (_props, styles) => styles.previewRoot
65
65
  })(() => ({}));
66
66
  const SnippetRoot = (0, styles_1.styled)(BaseItem_1.default, {
67
67
  name: constants_1.PREFIX,
68
68
  slot: 'SnippetRoot',
69
- overridesResolver: (props, styles) => styles.snippetRoot
69
+ overridesResolver: (_props, styles) => styles.snippetRoot
70
70
  })(() => ({}));
71
71
  /**
72
72
  * > API documentation for the Community-JS Event component. Learn about the available props and the CSS API.
@@ -40,13 +40,13 @@ const classes = {
40
40
  const Root = (0, styles_1.styled)(material_1.Button, {
41
41
  name: PREFIX,
42
42
  slot: 'Root',
43
- overridesResolver: (props, styles) => styles.root
44
- })(({ theme }) => ({}));
43
+ overridesResolver: (_props, styles) => styles.root
44
+ })(() => ({}));
45
45
  const DialogRoot = (0, styles_1.styled)(BaseDialog_1.default, {
46
46
  name: PREFIX,
47
47
  slot: 'Root',
48
- overridesResolver: (props, styles) => styles.dialogRoot
49
- })(({ theme }) => ({}));
48
+ overridesResolver: (_props, styles) => styles.dialogRoot
49
+ })(() => ({}));
50
50
  /**
51
51
  *> API documentation for the Community-JS Event Invite Button component. Learn about the available props and the CSS API.
52
52
  *
@@ -196,7 +196,7 @@ function EventInviteButton(inProps) {
196
196
  });
197
197
  };
198
198
  // Autocomplete Handlers
199
- const handleInputChange = (event, value, reason) => {
199
+ const handleInputChange = (_event, value, reason) => {
200
200
  switch (reason) {
201
201
  case 'input':
202
202
  setValue(value);
@@ -67,10 +67,10 @@ function CommentNotification(props) {
67
67
  }), { onClick: notificationObject.comment.author.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.comment.author.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.comment.author.username, variant: "circular", src: notificationObject.comment.author.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.comment.author.deleted && {
68
68
  to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.comment.author)
69
69
  }), { onClick: notificationObject.comment.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.comment.author.username })), ' ', notificationObject.type === types_1.SCNotificationTypologyType.NESTED_COMMENT
70
- ? intl.formatMessage(messages.comment, {
70
+ ? intl.formatMessage(messages.nestedComment, {
71
71
  b: (...chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
72
72
  })
73
- : intl.formatMessage(messages.nestedComment, {
73
+ : intl.formatMessage(messages.comment, {
74
74
  b: (...chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
75
75
  })] }), secondary: (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(notificationObject.comment)) }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.contributionText }, { children: (0, contribution_1.getContributionSnippet)(notificationObject.comment) })) })), (template === types_2.SCNotificationObjectTemplateType.DETAIL || template === types_2.SCNotificationObjectTemplateType.SNIPPET) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(Bullet_1.default, { className: classes.bullet }), (0, jsx_runtime_1.jsx)(VoteButton_1.default, { className: classes.voteButton, variant: "text", size: "small", contributionId: notificationObject.comment.id, contributionType: types_1.SCContributionType.COMMENT, contribution: notificationObject.comment, onVote: handleVote })] })))] }), footer: template === types_2.SCNotificationObjectTemplateType.TOAST && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary", component: 'div' }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(notificationObject.comment)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }) })) }))] }))) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
76
76
  }
@@ -13,8 +13,8 @@ const classes = {
13
13
  const Root = styled(CreateEventButton, {
14
14
  name: PREFIX,
15
15
  slot: 'Root',
16
- overridesResolver: (props, styles) => styles.root
17
- })(({ theme }) => ({}));
16
+ overridesResolver: (_props, styles) => styles.root
17
+ })(() => ({}));
18
18
  /**
19
19
  *> API documentation for the Community-JS Create Event Button component. Learn about the available props and the CSS API.
20
20
  *
@@ -49,22 +49,22 @@ const classes = {
49
49
  const Root = styled(Widget, {
50
50
  name: PREFIX,
51
51
  slot: 'Root',
52
- overridesResolver: (props, styles) => styles.root
52
+ overridesResolver: (_props, styles) => styles.root
53
53
  })(() => ({}));
54
54
  const DetailRoot = styled(Box, {
55
55
  name: PREFIX,
56
56
  slot: 'DetailRoot',
57
- overridesResolver: (props, styles) => styles.detailRoot
57
+ overridesResolver: (_props, styles) => styles.detailRoot
58
58
  })(() => ({}));
59
59
  const PreviewRoot = styled(Box, {
60
60
  name: PREFIX,
61
61
  slot: 'PreviewRoot',
62
- overridesResolver: (props, styles) => styles.previewRoot
62
+ overridesResolver: (_props, styles) => styles.previewRoot
63
63
  })(() => ({}));
64
64
  const SnippetRoot = styled(BaseItem, {
65
65
  name: PREFIX,
66
66
  slot: 'SnippetRoot',
67
- overridesResolver: (props, styles) => styles.snippetRoot
67
+ overridesResolver: (_props, styles) => styles.snippetRoot
68
68
  })(() => ({}));
69
69
  /**
70
70
  * > API documentation for the Community-JS Event component. Learn about the available props and the CSS API.
@@ -38,13 +38,13 @@ const classes = {
38
38
  const Root = styled(Button, {
39
39
  name: PREFIX,
40
40
  slot: 'Root',
41
- overridesResolver: (props, styles) => styles.root
42
- })(({ theme }) => ({}));
41
+ overridesResolver: (_props, styles) => styles.root
42
+ })(() => ({}));
43
43
  const DialogRoot = styled(BaseDialog, {
44
44
  name: PREFIX,
45
45
  slot: 'Root',
46
- overridesResolver: (props, styles) => styles.dialogRoot
47
- })(({ theme }) => ({}));
46
+ overridesResolver: (_props, styles) => styles.dialogRoot
47
+ })(() => ({}));
48
48
  /**
49
49
  *> API documentation for the Community-JS Event Invite Button component. Learn about the available props and the CSS API.
50
50
  *
@@ -194,7 +194,7 @@ export default function EventInviteButton(inProps) {
194
194
  });
195
195
  };
196
196
  // Autocomplete Handlers
197
- const handleInputChange = (event, value, reason) => {
197
+ const handleInputChange = (_event, value, reason) => {
198
198
  switch (reason) {
199
199
  case 'input':
200
200
  setValue(value);
@@ -65,10 +65,10 @@ export default function CommentNotification(props) {
65
65
  }), { onClick: notificationObject.comment.author.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.comment.author.community_badge, smaller: true }, { children: _jsx(Avatar, { alt: notificationObject.comment.author.username, variant: "circular", src: notificationObject.comment.author.avatar, classes: { root: classes.avatar } }) })) })), primary: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!notificationObject.comment.author.deleted && {
66
66
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.comment.author)
67
67
  }), { onClick: notificationObject.comment.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.comment.author.username })), ' ', notificationObject.type === SCNotificationTypologyType.NESTED_COMMENT
68
- ? intl.formatMessage(messages.comment, {
68
+ ? intl.formatMessage(messages.nestedComment, {
69
69
  b: (...chunks) => _jsx("strong", { children: chunks })
70
70
  })
71
- : intl.formatMessage(messages.nestedComment, {
71
+ : intl.formatMessage(messages.comment, {
72
72
  b: (...chunks) => _jsx("strong", { children: chunks })
73
73
  })] }), secondary: _jsxs(React.Fragment, { children: [_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.COMMENT_ROUTE_NAME, getRouteData(notificationObject.comment)) }, { children: _jsx(Typography, Object.assign({ variant: "body2", className: classes.contributionText }, { children: getContributionSnippet(notificationObject.comment) })) })), (template === SCNotificationObjectTemplateType.DETAIL || template === SCNotificationObjectTemplateType.SNIPPET) && (_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(Bullet, { className: classes.bullet }), _jsx(VoteButton, { className: classes.voteButton, variant: "text", size: "small", contributionId: notificationObject.comment.id, contributionType: SCContributionType.COMMENT, contribution: notificationObject.comment, onVote: handleVote })] })))] }), footer: template === SCNotificationObjectTemplateType.TOAST && (_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at }), _jsx(Typography, Object.assign({ color: "primary", component: 'div' }, { children: _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.COMMENT_ROUTE_NAME, getRouteData(notificationObject.comment)) }, { children: _jsx(FormattedMessage, { id: "ui.userToastNotifications.viewContribution", defaultMessage: 'ui.userToastNotifications.viewContribution' }) })) }))] }))) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
74
74
  }