@selfcommunity/react-ui 0.1.2-alpha.3 → 0.1.2-alpha.4
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/components/Notification/ContributionFollow/ContributionFollow.js +9 -4
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +1 -7
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +9 -4
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +1 -7
- package/lib/esm/react-ui/src/components/Notification/ContributionFollow/ContributionFollow.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/Notification/PrivateMessage/PrivateMessage.d.ts.map +1 -1
- package/lib/umd/react-ui.js +2 -2
- package/lib/umd/react-ui.js.map +1 -1
- package/package.json +6 -6
|
@@ -126,20 +126,25 @@ function ContributionFollowNotification(inProps) {
|
|
|
126
126
|
}
|
|
127
127
|
})),
|
|
128
128
|
primary: /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
129
|
-
component: "
|
|
129
|
+
component: "span",
|
|
130
130
|
color: "inherit",
|
|
131
131
|
className: classes.followText
|
|
132
132
|
}, /*#__PURE__*/_react.default.createElement(_reactCore.Link, {
|
|
133
133
|
to: scRoutingContext.url(_reactCore.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user),
|
|
134
134
|
className: classes.username
|
|
135
135
|
}, notificationObject.user.username), ' ', intl.formatMessage(messages.contributionFollow, {
|
|
136
|
-
username: notificationObject.user.username,
|
|
137
136
|
b: (...chunks) => /*#__PURE__*/_react.default.createElement("strong", null, chunks)
|
|
138
137
|
})),
|
|
139
|
-
secondary: template === _types.SCNotificationObjectTemplateType.
|
|
138
|
+
secondary: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, template === _types.SCNotificationObjectTemplateType.SNIPPET && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ":", ' ', /*#__PURE__*/_react.default.createElement(_reactCore.Link, {
|
|
139
|
+
to: scRoutingContext.url(_reactCore.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, _contribution.getRouteData)(notificationObject[contributionType]))
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
141
|
+
variant: "body2",
|
|
142
|
+
gutterBottom: true,
|
|
143
|
+
className: classes.contributionText
|
|
144
|
+
}, (0, _contribution.getContributionSnippet)(notificationObject[contributionType])))), template === _types.SCNotificationObjectTemplateType.DETAIL && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_DateTimeAgo.default, {
|
|
140
145
|
date: notificationObject.active_at,
|
|
141
146
|
className: classes.activeAt
|
|
142
|
-
}),
|
|
147
|
+
}))),
|
|
143
148
|
footer: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, template === _types.SCNotificationObjectTemplateType.TOAST && /*#__PURE__*/_react.default.createElement(_material.Stack, {
|
|
144
149
|
direction: "row",
|
|
145
150
|
justifyContent: "space-between",
|
|
@@ -9,8 +9,6 @@ var _styles = require("@mui/material/styles");
|
|
|
9
9
|
|
|
10
10
|
var _material = require("@mui/material");
|
|
11
11
|
|
|
12
|
-
var _Icon = _interopRequireDefault(require("@mui/material/Icon"));
|
|
13
|
-
|
|
14
12
|
var _reactCore = require("@selfcommunity/react-core");
|
|
15
13
|
|
|
16
14
|
var _reactIntl = require("react-intl");
|
|
@@ -45,7 +43,6 @@ const classes = {
|
|
|
45
43
|
avatar: `${PREFIX}-avatar`,
|
|
46
44
|
actions: `${PREFIX}-actions`,
|
|
47
45
|
replyButton: `${PREFIX}-reply-button`,
|
|
48
|
-
replyButtonIcon: `${PREFIX}-reply-button-icon`,
|
|
49
46
|
activeAt: `${PREFIX}-active-at`,
|
|
50
47
|
messageLabel: `${PREFIX}-message-label`,
|
|
51
48
|
username: `${PREFIX}-username`,
|
|
@@ -226,10 +223,7 @@ function PrivateMessageNotification(inProps) {
|
|
|
226
223
|
root: classes.replyButton
|
|
227
224
|
},
|
|
228
225
|
component: _reactCore.Link,
|
|
229
|
-
to: scRoutingContext.url(_reactCore.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message)
|
|
230
|
-
endIcon: /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
231
|
-
className: classes.replyButtonIcon
|
|
232
|
-
}, "reply")
|
|
226
|
+
to: scRoutingContext.url(_reactCore.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message)
|
|
233
227
|
}, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, {
|
|
234
228
|
id: "ui.notification.privateMessage.btnReplyLabel",
|
|
235
229
|
defaultMessage: "ui.notification.privateMessage.btnReplyLabel"
|
|
@@ -126,20 +126,25 @@ function ContributionFollowNotification(inProps) {
|
|
|
126
126
|
}
|
|
127
127
|
})),
|
|
128
128
|
primary: /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
129
|
-
component: "
|
|
129
|
+
component: "span",
|
|
130
130
|
color: "inherit",
|
|
131
131
|
className: classes.followText
|
|
132
132
|
}, /*#__PURE__*/_react.default.createElement(_reactCore.Link, {
|
|
133
133
|
to: scRoutingContext.url(_reactCore.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user),
|
|
134
134
|
className: classes.username
|
|
135
135
|
}, notificationObject.user.username), ' ', intl.formatMessage(messages.contributionFollow, {
|
|
136
|
-
username: notificationObject.user.username,
|
|
137
136
|
b: (...chunks) => /*#__PURE__*/_react.default.createElement("strong", null, chunks)
|
|
138
137
|
})),
|
|
139
|
-
secondary: template === _types.SCNotificationObjectTemplateType.
|
|
138
|
+
secondary: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, template === _types.SCNotificationObjectTemplateType.SNIPPET && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ":", ' ', /*#__PURE__*/_react.default.createElement(_reactCore.Link, {
|
|
139
|
+
to: scRoutingContext.url(_reactCore.SCRoutes[`${notificationObject[contributionType]['type'].toUpperCase()}_ROUTE_NAME`], (0, _contribution.getRouteData)(notificationObject[contributionType]))
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
141
|
+
variant: "body2",
|
|
142
|
+
gutterBottom: true,
|
|
143
|
+
className: classes.contributionText
|
|
144
|
+
}, (0, _contribution.getContributionSnippet)(notificationObject[contributionType])))), template === _types.SCNotificationObjectTemplateType.DETAIL && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_DateTimeAgo.default, {
|
|
140
145
|
date: notificationObject.active_at,
|
|
141
146
|
className: classes.activeAt
|
|
142
|
-
}),
|
|
147
|
+
}))),
|
|
143
148
|
footer: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, template === _types.SCNotificationObjectTemplateType.TOAST && /*#__PURE__*/_react.default.createElement(_material.Stack, {
|
|
144
149
|
direction: "row",
|
|
145
150
|
justifyContent: "space-between",
|
|
@@ -9,8 +9,6 @@ var _styles = require("@mui/material/styles");
|
|
|
9
9
|
|
|
10
10
|
var _material = require("@mui/material");
|
|
11
11
|
|
|
12
|
-
var _Icon = _interopRequireDefault(require("@mui/material/Icon"));
|
|
13
|
-
|
|
14
12
|
var _reactCore = require("@selfcommunity/react-core");
|
|
15
13
|
|
|
16
14
|
var _reactIntl = require("react-intl");
|
|
@@ -45,7 +43,6 @@ const classes = {
|
|
|
45
43
|
avatar: `${PREFIX}-avatar`,
|
|
46
44
|
actions: `${PREFIX}-actions`,
|
|
47
45
|
replyButton: `${PREFIX}-reply-button`,
|
|
48
|
-
replyButtonIcon: `${PREFIX}-reply-button-icon`,
|
|
49
46
|
activeAt: `${PREFIX}-active-at`,
|
|
50
47
|
messageLabel: `${PREFIX}-message-label`,
|
|
51
48
|
username: `${PREFIX}-username`,
|
|
@@ -226,10 +223,7 @@ function PrivateMessageNotification(inProps) {
|
|
|
226
223
|
root: classes.replyButton
|
|
227
224
|
},
|
|
228
225
|
component: _reactCore.Link,
|
|
229
|
-
to: scRoutingContext.url(_reactCore.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message)
|
|
230
|
-
endIcon: /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
231
|
-
className: classes.replyButtonIcon
|
|
232
|
-
}, "reply")
|
|
226
|
+
to: scRoutingContext.url(_reactCore.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message)
|
|
233
227
|
}, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, {
|
|
234
228
|
id: "ui.notification.privateMessage.btnReplyLabel",
|
|
235
229
|
defaultMessage: "ui.notification.privateMessage.btnReplyLabel"
|
package/lib/esm/react-ui/src/components/Notification/ContributionFollow/ContributionFollow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContributionFollow.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAC;AAK9D,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAmDhE,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,EAAE,wBAAwB,CAAC;IAE7C;;;OAGG;IACH,QAAQ,CAAC,EAAE,gCAAgC,CAAC;IAE5C;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"ContributionFollow.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Notification/ContributionFollow/ContributionFollow.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAC;AAK9D,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAmDhE,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,EAAE,wBAAwB,CAAC;IAE7C;;;OAGG;IACH,QAAQ,CAAC,EAAE,gCAAgC,CAAC;IAE5C;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CA2FpG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Notification/PrivateMessage/PrivateMessage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrivateMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Notification/PrivateMessage/PrivateMessage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,gCAAgC,EAAC,MAAM,sBAAsB,CAAC;AAItE,OAAO,EAAC,gCAAgC,EAAC,MAAM,gBAAgB,CAAC;AAoFhE,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,EAAE,gCAAgC,CAAC;IAErD;;;OAGG;IACH,QAAQ,CAAC,EAAE,gCAAgC,CAAC;IAE5C;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,OAAO,EAAE,+BAA+B,GAAG,GAAG,CAAC,OAAO,CAyIxG"}
|