strapi-plugin-comments 3.1.3 → 3.2.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/dist/_chunks/{en-Cbt6CXo1.mjs → en-Y06L5Ws_.mjs} +4 -2
- package/dist/_chunks/en-nurIIakL.js +1 -0
- package/dist/_chunks/{fr-CztE_B7U.mjs → fr-Cv2agoba.mjs} +3 -1
- package/dist/_chunks/{fr-C4_v32Lz.js → fr-JAoXWyAN.js} +1 -1
- package/dist/_chunks/index-5LPolIUr.js +1 -0
- package/dist/_chunks/index-BHaPiDDi.js +5 -0
- package/dist/_chunks/{index-Cd0Ba7aa.mjs → index-Bu69cWq9.mjs} +119 -120
- package/dist/_chunks/index-CaQhYHpU.js +44 -0
- package/dist/_chunks/index-D1CAoT0G.mjs +5704 -0
- package/dist/_chunks/index-DCg7dWuW.mjs +119 -0
- package/dist/_chunks/{index-DLzwPdb9.js → index-DV3FvCxv.js} +44 -44
- package/dist/_chunks/{index-DNqB_KDi.mjs → index-rxGUTZN1.mjs} +7100 -7039
- package/dist/_chunks/{pl-D2JXVqZi.js → pl-DUaDM2d3.js} +1 -1
- package/dist/_chunks/{pl-DBv6tBP6.mjs → pl-a5516Yys.mjs} +3 -1
- package/dist/_chunks/{pt-BR-CCBBpLDV.js → pt-BR-BXuFBSgm.js} +1 -1
- package/dist/_chunks/{pt-BR-VqNYQ17j.mjs → pt-BR-DwEywOda.mjs} +3 -1
- package/dist/_chunks/{ru-DHi8VpMQ.mjs → ru-72L1_BWN.mjs} +3 -1
- package/dist/_chunks/{ru-DUiPYaBn.js → ru-B7jFc-n7.js} +1 -1
- package/dist/_chunks/{tr-D_0EQ9aV.js → tr-B2Tw9kcB.js} +1 -1
- package/dist/_chunks/{tr-ZRzw4I-8.mjs → tr-Ca93Ai2h.mjs} +3 -1
- package/dist/_chunks/{zh-Hans-D1xXhhCe.js → zh-Hans-Cp3JcN8q.js} +1 -1
- package/dist/_chunks/{zh-Hans-Bz2wrwoC.mjs → zh-Hans-DXLzMysj.mjs} +3 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +4 -2
- package/dist/admin/src/components/SortableTh/index.d.ts +3 -2
- package/dist/admin/src/components/StatusBadge/index.d.ts +5 -1
- package/dist/admin/src/pages/Discover/index.d.ts +1 -5
- package/dist/admin/src/translations/en.d.ts +2 -0
- package/dist/admin/src/translations/fr.d.ts +2 -0
- package/dist/admin/src/translations/pl.d.ts +2 -0
- package/dist/admin/src/translations/pt-BR.d.ts +2 -0
- package/dist/admin/src/translations/ru.d.ts +2 -0
- package/dist/admin/src/translations/tr.d.ts +2 -0
- package/dist/admin/src/translations/zh-Hans.d.ts +2 -0
- package/dist/server/index.js +65 -59
- package/dist/server/index.mjs +1822 -1750
- package/package.json +9 -7
- package/dist/_chunks/en-DalOPLjA.js +0 -1
- package/dist/_chunks/index-BL18_3Ha.js +0 -2228
- package/dist/_chunks/index-BUf3iTvC.mjs +0 -38818
- package/dist/_chunks/index-BmKmka7n.js +0 -18
- package/dist/_chunks/index-CN6R_-01.js +0 -1
- package/dist/_chunks/index-EseY88Mr.mjs +0 -2010
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { Flex as u } from "@strapi/design-system";
|
|
3
|
+
import "@strapi/icons";
|
|
4
|
+
import { styled as g } from "styled-components";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
const a = (e, n = "") => Object.keys(e).reduce((i, r) => {
|
|
7
|
+
const c = n.length ? `${n}.` : "";
|
|
8
|
+
return typeof e[r] == "object" && e[r] !== null && !Array.isArray(e[r]) ? Object.assign(i, a(e[r], c + r)) : i[c + r] = e[r], i;
|
|
9
|
+
}, {}), m = (e, n) => {
|
|
10
|
+
if (!n)
|
|
11
|
+
throw new TypeError("pluginId can't be empty");
|
|
12
|
+
return Object.keys(e).reduce((i, r) => (i[`${n}.${r}`] = e[r], i), {});
|
|
13
|
+
};
|
|
14
|
+
g(u)`
|
|
15
|
+
&>* {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
const f = "strapi-plugin-comments", $ = {
|
|
20
|
+
displayName: "Comments"
|
|
21
|
+
}, b = 576, h = ({ width: e = 24, height: n = 24 }) => /* @__PURE__ */ o("svg", { viewBox: `0 0 ${e} ${n}`, xmlns: "http://www.w3.org/2000/svg", height: `${n}px`, children: /* @__PURE__ */ o("g", { style: { transform: `scale(${e / b})` }, fill: "currentColor", children: /* @__PURE__ */ o("path", { d: "M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z" }) }) }), w = /* @__PURE__ */ o(h, {}), j = () => w, t = {
|
|
22
|
+
render: (e) => `plugin::comments.${e}`,
|
|
23
|
+
comments: {
|
|
24
|
+
read: "comments-read",
|
|
25
|
+
moderate: "comments-moderate"
|
|
26
|
+
},
|
|
27
|
+
reports: {
|
|
28
|
+
read: "reports-read",
|
|
29
|
+
review: "reports-review"
|
|
30
|
+
},
|
|
31
|
+
settings: {
|
|
32
|
+
read: "settings-read",
|
|
33
|
+
change: "settings-change"
|
|
34
|
+
}
|
|
35
|
+
}, l = {
|
|
36
|
+
access: [
|
|
37
|
+
{ action: t.render(t.comments.read), subject: null },
|
|
38
|
+
{ action: t.render(t.reports.read), subject: null },
|
|
39
|
+
// { action: 'plugin::comments.discover.read', subject: null },
|
|
40
|
+
{ action: t.render(t.settings.read), subject: null }
|
|
41
|
+
],
|
|
42
|
+
// discover: [{ action: 'plugin::comments.discover.read', subject: null }],
|
|
43
|
+
moderate: [
|
|
44
|
+
{
|
|
45
|
+
action: t.render(t.comments.moderate),
|
|
46
|
+
subject: null
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
reports: [
|
|
50
|
+
{ action: t.render(t.reports.read), subject: null }
|
|
51
|
+
],
|
|
52
|
+
reportsReview: [
|
|
53
|
+
{ action: t.render(t.reports.review), subject: null }
|
|
54
|
+
],
|
|
55
|
+
settings: [
|
|
56
|
+
{ action: t.render(t.settings.read), subject: null }
|
|
57
|
+
],
|
|
58
|
+
settingsChange: [
|
|
59
|
+
{ action: t.render(t.settings.change), subject: null }
|
|
60
|
+
]
|
|
61
|
+
}, s = f.replace(/^strapi-plugin-/i, ""), p = {
|
|
62
|
+
en: () => import("./en-Y06L5Ws_.mjs"),
|
|
63
|
+
fr: () => import("./fr-Cv2agoba.mjs"),
|
|
64
|
+
"pt-BR": () => import("./pt-BR-DwEywOda.mjs"),
|
|
65
|
+
tr: () => import("./tr-Ca93Ai2h.mjs"),
|
|
66
|
+
ru: () => import("./ru-72L1_BWN.mjs"),
|
|
67
|
+
"zh-Hans": () => import("./zh-Hans-DXLzMysj.mjs"),
|
|
68
|
+
pl: () => import("./pl-a5516Yys.mjs")
|
|
69
|
+
}, { displayName: d } = $, M = {
|
|
70
|
+
register(e) {
|
|
71
|
+
e.addMenuLink({
|
|
72
|
+
to: `/plugins/${s}`,
|
|
73
|
+
badgeContent: 1,
|
|
74
|
+
icon: j,
|
|
75
|
+
intlLabel: {
|
|
76
|
+
id: `${s}.plugin.name`,
|
|
77
|
+
defaultMessage: d
|
|
78
|
+
},
|
|
79
|
+
Component: () => import("./index-rxGUTZN1.mjs"),
|
|
80
|
+
permissions: l.access
|
|
81
|
+
}), e.createSettingSection(
|
|
82
|
+
{
|
|
83
|
+
id: s,
|
|
84
|
+
intlLabel: {
|
|
85
|
+
id: `${s}.plugin.section`,
|
|
86
|
+
defaultMessage: `${d} plugin`
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
[
|
|
90
|
+
{
|
|
91
|
+
intlLabel: {
|
|
92
|
+
id: `${s}.plugin.section.item`,
|
|
93
|
+
defaultMessage: "Configuration"
|
|
94
|
+
},
|
|
95
|
+
id: "comments",
|
|
96
|
+
to: `/settings/${s}`,
|
|
97
|
+
Component: () => import("./index-Bu69cWq9.mjs"),
|
|
98
|
+
permissions: l.settings
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
registerTrads: async function({ locales: e = [] }) {
|
|
104
|
+
return Promise.all(
|
|
105
|
+
e.map(async (n) => n in p ? p[n]().then(({ default: r }) => ({
|
|
106
|
+
data: m(a(r), s),
|
|
107
|
+
locale: n
|
|
108
|
+
})) : {
|
|
109
|
+
data: m(a({}), s),
|
|
110
|
+
locale: n
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
export {
|
|
116
|
+
l as a,
|
|
117
|
+
M as i,
|
|
118
|
+
s as p
|
|
119
|
+
};
|