strapi-plugin-comments 2.0.10 → 2.1.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/README.md +204 -124
- package/admin/src/components/ActionButton/styles.d.ts +2 -0
- package/admin/src/components/ActionButton/styles.js +13 -8
- package/admin/src/components/Avatar/index.d.ts +12 -0
- package/admin/src/components/Avatar/index.js +26 -0
- package/admin/src/components/ConfirmationDialog/index.d.ts +26 -0
- package/admin/src/components/ConfirmationDialog/index.js +36 -55
- package/admin/src/components/DiscussionStatus/index.d.ts +9 -0
- package/admin/src/components/DiscussionStatus/index.js +22 -31
- package/admin/src/components/DiscussionThread/index.d.ts +16 -0
- package/admin/src/components/DiscussionThread/index.js +39 -56
- package/admin/src/components/DiscussionThreadItem/index.d.ts +9 -0
- package/admin/src/components/DiscussionThreadItem/index.js +28 -52
- package/admin/src/components/DiscussionThreadItem/styles.d.ts +4 -0
- package/admin/src/components/DiscussionThreadItem/styles.js +16 -11
- package/admin/src/components/DiscussionThreadItemActions/index.d.ts +19 -0
- package/admin/src/components/DiscussionThreadItemActions/index.js +121 -158
- package/admin/src/components/DiscussionThreadItemActions/styles.d.ts +2 -0
- package/admin/src/components/DiscussionThreadItemActions/styles.js +13 -7
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +17 -0
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.js +38 -48
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +2 -0
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.js +12 -6
- package/admin/src/components/DiscussionThreadItemFooter/index.d.ts +16 -0
- package/admin/src/components/DiscussionThreadItemFooter/index.js +34 -42
- package/admin/src/components/DiscussionThreadItemFooter/styles.d.ts +3 -0
- package/admin/src/components/DiscussionThreadItemFooter/styles.js +17 -12
- package/admin/src/components/DiscussionThreadItemReviewAction/index.d.ts +30 -0
- package/admin/src/components/DiscussionThreadItemReviewAction/index.js +77 -91
- package/admin/src/components/FormSwitch/index.d.ts +7 -0
- package/admin/src/components/FormSwitch/index.js +15 -18
- package/admin/src/components/FormSwitch/styles.d.ts +2 -0
- package/admin/src/components/FormSwitch/styles.js +14 -8
- package/admin/src/components/IconButton/styles.d.ts +2 -0
- package/admin/src/components/IconButton/styles.js +16 -9
- package/admin/src/components/Initializer/index.d.ts +5 -0
- package/admin/src/components/Initializer/index.js +12 -24
- package/admin/src/components/LoadingIndicatorOverlay/index.d.ts +3 -0
- package/admin/src/components/LoadingIndicatorOverlay/index.js +12 -15
- package/admin/src/components/LoadingIndicatorOverlay/styles.d.ts +3 -0
- package/admin/src/components/LoadingIndicatorOverlay/styles.js +22 -17
- package/admin/src/components/Nav/index.d.ts +7 -0
- package/admin/src/components/Nav/index.js +25 -48
- package/admin/src/components/PluginIcon/index.d.ts +3 -0
- package/admin/src/components/PluginIcon/index.js +10 -12
- package/admin/src/components/ReportsReviewModal/index.d.ts +21 -0
- package/admin/src/components/ReportsReviewModal/index.js +31 -46
- package/admin/src/components/ReportsReviewTable/index.d.ts +21 -0
- package/admin/src/components/ReportsReviewTable/index.js +120 -140
- package/admin/src/components/StatusBadge/index.d.ts +7 -0
- package/admin/src/components/StatusBadge/index.js +12 -17
- package/admin/src/components/StatusBadge/styles.d.ts +2 -0
- package/admin/src/components/StatusBadge/styles.js +19 -13
- package/admin/src/components/TableFilters/index.d.ts +10 -0
- package/admin/src/components/TableFilters/index.js +52 -49
- package/admin/src/components/TablePagination/index.d.ts +17 -0
- package/admin/src/components/TablePagination/index.js +27 -29
- package/admin/src/components/icons/comments.d.ts +6 -0
- package/admin/src/components/icons/comments.js +11 -8
- package/admin/src/components/icons/index.d.ts +6 -0
- package/admin/src/components/icons/index.js +15 -6
- package/admin/src/components/icons/lock.d.ts +7 -0
- package/admin/src/components/icons/lock.js +11 -21
- package/admin/src/components/icons/review.d.ts +7 -0
- package/admin/src/components/icons/review.js +11 -17
- package/admin/src/components/icons/unlock.d.ts +7 -0
- package/admin/src/components/icons/unlock.js +11 -19
- package/admin/src/hooks/useConfig.d.ts +8 -0
- package/admin/src/hooks/useConfig.js +40 -45
- package/admin/src/index.d.ts +7 -0
- package/admin/src/index.js +98 -92
- package/admin/src/pages/App/index.d.ts +4 -0
- package/admin/src/pages/App/index.js +43 -67
- package/admin/src/pages/App/reducer/actions.d.ts +8 -0
- package/admin/src/pages/App/reducer/actions.js +11 -7
- package/admin/src/pages/App/reducer/constants.d.ts +4 -0
- package/admin/src/pages/App/reducer/constants.js +7 -4
- package/admin/src/pages/App/reducer/index.d.ts +9 -0
- package/admin/src/pages/App/reducer/index.js +24 -22
- package/admin/src/pages/App/reducer/init.d.ts +3 -0
- package/admin/src/pages/App/reducer/init.js +6 -4
- package/admin/src/pages/App/reducer/selectors.d.ts +6 -0
- package/admin/src/pages/App/reducer/selectors.js +17 -34
- package/admin/src/pages/App/utils/api.d.ts +2 -0
- package/admin/src/pages/App/utils/api.js +14 -11
- package/admin/src/pages/ComingSoonPage/index.d.ts +3 -0
- package/admin/src/pages/ComingSoonPage/index.js +42 -24
- package/admin/src/pages/Details/components/DetailsEntity/index.d.ts +18 -0
- package/admin/src/pages/Details/components/DetailsEntity/index.js +49 -77
- package/admin/src/pages/Details/components/DetailsFilters/index.d.ts +12 -0
- package/admin/src/pages/Details/components/DetailsFilters/index.js +19 -26
- package/admin/src/pages/Details/components/DetailsFilters/styles.d.ts +2 -0
- package/admin/src/pages/Details/components/DetailsFilters/styles.js +14 -8
- package/admin/src/pages/Details/index.d.ts +4 -0
- package/admin/src/pages/Details/index.js +94 -133
- package/admin/src/pages/Discover/components/DiscoverTableRow/index.d.ts +20 -0
- package/admin/src/pages/Discover/components/DiscoverTableRow/index.js +128 -139
- package/admin/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +2 -0
- package/admin/src/pages/Discover/components/DiscoverTableRow/styles.js +14 -8
- package/admin/src/pages/Discover/index.d.ts +4 -0
- package/admin/src/pages/Discover/index.js +129 -170
- package/admin/src/pages/Discover/utils/api.d.ts +2 -0
- package/admin/src/pages/Discover/utils/api.js +15 -13
- package/admin/src/pages/Discover/utils/filtersSchema.d.ts +11 -0
- package/admin/src/pages/Discover/utils/filtersSchema.js +8 -6
- package/admin/src/pages/Settings/components/RestartAlert/styles.d.ts +2 -0
- package/admin/src/pages/Settings/components/RestartAlert/styles.js +14 -8
- package/admin/src/pages/Settings/index.d.ts +3 -0
- package/admin/src/pages/Settings/index.js +225 -391
- package/admin/src/pages/Settings/utils/api.d.ts +7 -0
- package/admin/src/pages/Settings/utils/api.js +60 -55
- package/admin/src/pages/utils/api.d.ts +12 -0
- package/admin/src/pages/utils/api.js +58 -53
- package/admin/src/permissions.d.ts +28 -0
- package/admin/src/permissions.js +31 -17
- package/admin/src/pluginId.d.ts +2 -0
- package/admin/src/pluginId.js +29 -5
- package/admin/src/reducers.d.ts +7 -0
- package/admin/src/reducers.js +10 -6
- package/admin/src/translations/en.json +131 -131
- package/admin/src/translations/fr.json +132 -1
- package/admin/src/translations/pt-BR.json +130 -130
- package/admin/src/utils/axiosInstance.d.ts +3 -0
- package/admin/src/utils/axiosInstance.js +21 -27
- package/admin/src/utils/constants.d.ts +25 -0
- package/admin/src/utils/constants.js +23 -22
- package/admin/src/utils/getApiUrl.d.ts +3 -0
- package/admin/src/utils/getApiUrl.js +6 -5
- package/admin/src/utils/getMessage.d.ts +4 -0
- package/admin/src/utils/getMessage.js +15 -15
- package/admin/src/utils/getRelatedGroups.d.ts +4 -0
- package/admin/src/utils/getRelatedGroups.js +5 -3
- package/admin/src/utils/getUrl.d.ts +3 -0
- package/admin/src/utils/getUrl.js +6 -5
- package/admin/src/utils/handleAPIError.d.ts +4 -0
- package/admin/src/utils/handleAPIError.js +12 -11
- package/admin/src/utils/index.d.ts +12 -0
- package/admin/src/utils/index.js +29 -11
- package/admin/src/utils/parseRegExp.d.ts +6 -0
- package/admin/src/utils/parseRegExp.js +6 -5
- package/admin/src/utils/renderEntryTitle.d.ts +4 -0
- package/admin/src/utils/renderEntryTitle.js +11 -12
- package/admin/src/utils/renderInitials.d.ts +3 -0
- package/admin/src/utils/renderInitials.js +10 -5
- package/admin/src/utils/resolveCommentStatus.d.ts +4 -0
- package/admin/src/utils/resolveCommentStatus.js +17 -21
- package/admin/src/utils/resolveCommentStatusColor.d.ts +4 -0
- package/admin/src/utils/resolveCommentStatusColor.js +19 -19
- package/content-types/comment.d.ts +91 -0
- package/content-types/comment.js +87 -88
- package/content-types/index.d.ts +143 -0
- package/content-types/index.js +15 -10
- package/content-types/report.d.ts +48 -0
- package/content-types/report.js +44 -49
- package/package.json +24 -19
- package/permissions.d.ts +18 -0
- package/permissions.js +12 -13
- package/server/bootstrap.d.ts +4 -0
- package/server/bootstrap.js +56 -62
- package/server/config/index.d.ts +4 -0
- package/server/config/index.js +17 -15
- package/server/controllers/admin.d.ts +4 -0
- package/server/controllers/admin.js +134 -167
- package/server/controllers/client.d.ts +4 -0
- package/server/controllers/client.js +120 -112
- package/server/controllers/index.d.ts +6 -0
- package/server/controllers/index.js +12 -8
- package/server/controllers/utils/functions.d.ts +7 -0
- package/server/controllers/utils/functions.js +22 -17
- package/server/controllers/utils/parsers.d.ts +10 -0
- package/server/controllers/utils/parsers.js +47 -19
- package/server/destroy.d.ts +3 -0
- package/server/destroy.js +3 -4
- package/server/graphql/index.d.ts +4 -0
- package/server/graphql/index.js +27 -25
- package/server/graphql/mutations/createAbuseReport.d.ts +11 -0
- package/server/graphql/mutations/createAbuseReport.js +22 -24
- package/server/graphql/mutations/createComment.d.ts +14 -0
- package/server/graphql/mutations/createComment.js +22 -24
- package/server/graphql/mutations/index.d.ts +4 -0
- package/server/graphql/mutations/index.js +24 -19
- package/server/graphql/mutations/removeComment.d.ts +11 -0
- package/server/graphql/mutations/removeComment.js +22 -24
- package/server/graphql/mutations/updateComment.d.ts +11 -0
- package/server/graphql/mutations/updateComment.js +22 -24
- package/server/graphql/queries/findAllFlat.d.ts +19 -0
- package/server/graphql/queries/findAllFlat.js +36 -34
- package/server/graphql/queries/findAllInHierarchy.d.ts +17 -0
- package/server/graphql/queries/findAllInHierarchy.js +30 -30
- package/server/graphql/queries/index.d.ts +4 -0
- package/server/graphql/queries/index.js +20 -17
- package/server/graphql/resolvers-config.d.ts +23 -0
- package/server/graphql/resolvers-config.js +11 -11
- package/server/graphql/types/comment-author.d.ts +4 -0
- package/server/graphql/types/comment-author.js +10 -8
- package/server/graphql/types/comment-nested.d.ts +4 -0
- package/server/graphql/types/comment-nested.js +17 -15
- package/server/graphql/types/comment.d.ts +4 -0
- package/server/graphql/types/comment.js +16 -14
- package/server/graphql/types/create-comment-author.d.ts +4 -0
- package/server/graphql/types/create-comment-author.js +10 -8
- package/server/graphql/types/create-comment.d.ts +4 -0
- package/server/graphql/types/create-comment.js +10 -8
- package/server/graphql/types/create-report.d.ts +4 -0
- package/server/graphql/types/create-report.js +10 -8
- package/server/graphql/types/id.d.ts +4 -0
- package/server/graphql/types/id.js +24 -23
- package/server/graphql/types/identify-comment-author.d.ts +4 -0
- package/server/graphql/types/identify-comment-author.js +7 -5
- package/server/graphql/types/index.d.ts +4 -0
- package/server/graphql/types/index.js +36 -17
- package/server/graphql/types/remove-comment.d.ts +4 -0
- package/server/graphql/types/remove-comment.js +9 -7
- package/server/graphql/types/report-reason.d.ts +4 -0
- package/server/graphql/types/report-reason.js +10 -8
- package/server/graphql/types/report.d.ts +4 -0
- package/server/graphql/types/report.js +12 -10
- package/server/graphql/types/response-find-all.d.ts +4 -0
- package/server/graphql/types/response-find-all.js +8 -6
- package/server/graphql/types/response-meta.d.ts +4 -0
- package/server/graphql/types/response-meta.js +7 -5
- package/server/graphql/types/response-pagination.d.ts +4 -0
- package/server/graphql/types/response-pagination.js +12 -10
- package/server/graphql/types/update-comment.d.ts +4 -0
- package/server/graphql/types/update-comment.js +10 -8
- package/server/index.d.ts +26 -0
- package/server/index.js +24 -21
- package/server/register.d.ts +3 -0
- package/server/register.js +3 -4
- package/server/routes/admin.d.ts +4 -0
- package/server/routes/admin.js +103 -109
- package/server/routes/client.d.ts +4 -0
- package/server/routes/client.js +84 -46
- package/server/routes/index.d.ts +11 -0
- package/server/routes/index.js +18 -14
- package/server/services/admin.d.ts +5 -0
- package/server/services/admin.js +134 -161
- package/server/services/client.d.ts +5 -0
- package/server/services/client.js +164 -168
- package/server/services/common.d.ts +5 -0
- package/server/services/common.js +192 -202
- package/server/services/graphql.d.ts +5 -0
- package/server/services/graphql.js +117 -182
- package/server/services/index.d.ts +8 -0
- package/server/services/index.js +15 -12
- package/server/services/utils/functions.d.ts +13 -0
- package/server/services/utils/functions.js +105 -109
- package/server/utils/constants.d.ts +9 -0
- package/server/utils/constants.js +19 -23
- package/server/utils/error.d.ts +19 -0
- package/server/utils/error.js +23 -18
- package/server/utils/functions.d.ts +6 -0
- package/server/utils/functions.js +35 -18
- package/strapi-admin.d.ts +3 -0
- package/strapi-admin.js +8 -3
- package/strapi-server.d.ts +177 -0
- package/strapi-server.js +43 -46
- package/tsconfig.tsbuildinfo +1 -0
- package/types/contentTypes.d.ts +48 -0
- package/types/contentTypes.js +3 -0
- package/.husky/pre-commit +0 -4
- package/LICENSE.md +0 -7
- package/__mocks__/initSetup.js +0 -108
- package/jest.config.js +0 -7
- package/server/controllers/utils/__tests__/functions.test.js +0 -43
- package/server/controllers/utils/__tests__/parsers.test.js +0 -94
- package/server/services/__tests__/common.test.js +0 -399
- package/server/services/utils/__tests__/functions.test.js +0 -53
- package/server/utils/__tests__/functions.test.js +0 -17
|
@@ -1,132 +1,132 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
2
|
+
"plugin.name": "Comentários",
|
|
3
|
+
"plugin.section": "plugin de comentários",
|
|
4
|
+
"plugin.section.item": "Configurações",
|
|
5
|
+
"common.button.back": "Voltar",
|
|
6
|
+
"nav.header.moderation": "Moderação",
|
|
7
|
+
"nav.header.settings": "Configurações",
|
|
8
|
+
"nav.item.updates": "Updates",
|
|
9
|
+
"nav.item.discover": "Descobrir",
|
|
10
|
+
"nav.item.reports": "Reports",
|
|
11
|
+
"nav.item.settings": "Configurações",
|
|
12
|
+
"page.common.item.status.OPEN": "Abrir",
|
|
13
|
+
"page.common.item.status.PENDING": "Pendente",
|
|
14
|
+
"page.common.item.status.BLOCKED": "Bloqueado",
|
|
15
|
+
"page.common.item.status.APPROVED": "Aprovado",
|
|
16
|
+
"page.common.item.status.TO_REVIEW": "Para revisar ({count, number})",
|
|
17
|
+
"page.common.item.status.REJECTED": "Rejeitado",
|
|
18
|
+
"page.common.item.status.REMOVED": "Removido pelo autor",
|
|
19
|
+
"page.updates.header": "Atualizações recentes",
|
|
20
|
+
"page.discover.header": "Descubra tópicos",
|
|
21
|
+
"page.discover.header.count": "entries found",
|
|
22
|
+
"page.discover.table.header.id": "ID",
|
|
23
|
+
"page.discover.table.header.author": "Autor",
|
|
24
|
+
"page.discover.table.header.message": "Messagem",
|
|
25
|
+
"page.discover.table.header.thread": "Thread of",
|
|
26
|
+
"page.discover.table.header.entry": "Entry",
|
|
27
|
+
"page.discover.table.header.lastUpdate": "Ultima atualização",
|
|
28
|
+
"page.discover.table.header.status": "Status",
|
|
29
|
+
"page.discover.table.header.actions": "Actions",
|
|
30
|
+
"page.discover.table.cell.thread": "Comentário #{id}",
|
|
31
|
+
"page.discover.table.action.display": "Display",
|
|
32
|
+
"page.discover.table.action.reports": "Reports",
|
|
33
|
+
"page.discover.table.empty": "Você ainda não tem comentários.",
|
|
34
|
+
"page.discover.table.empty.search": "Nenhum comentário corresponde à pesquisa.",
|
|
35
|
+
"page.discover.table.filters": "Filtrando",
|
|
36
|
+
"page.discover.table.reports.review": "Review reports",
|
|
37
|
+
"page.details.header": "Painel de discussão",
|
|
38
|
+
"page.details.header.description": "Pesquise e gerencie a discussão relacionada à entidade",
|
|
39
|
+
"page.details.panel.discussion": "Discussão",
|
|
40
|
+
"page.details.panel.discussion.nav.drilldown": "Pesquisa detalhada",
|
|
41
|
+
"page.details.panel.discussion.nav.back": "Ir para o topo",
|
|
42
|
+
"page.details.panel.discussion.warnings.reports.description": "Abrir reports",
|
|
43
|
+
"page.details.panel.discussion.warnings.reports.review": "Review",
|
|
44
|
+
"page.details.panel.discussion.warnings.reports.dialog.list": "Reports",
|
|
45
|
+
"page.details.panel.discussion.warnings.reports.dialog.header": "Moderation: Review open reports",
|
|
46
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason": "Razão",
|
|
47
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason.BAD_LANGUAGE": "Linguagem imprópria",
|
|
48
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason.DISCRIMINATION": "Discrimination",
|
|
49
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason.OTHER": "Outros",
|
|
50
|
+
"page.details.panel.discussion.warnings.reports.dialog.content": "Conteúdo",
|
|
51
|
+
"page.details.panel.discussion.warnings.reports.dialog.createdAt": "Issue date",
|
|
52
|
+
"page.details.panel.discussion.warnings.reports.dialog.status": "Status",
|
|
53
|
+
"page.details.panel.discussion.warnings.reports.dialog.status.OPEN": "Aberto",
|
|
54
|
+
"page.details.panel.discussion.warnings.reports.dialog.status.RESOLVED": "Resolvido",
|
|
55
|
+
"page.details.panel.discussion.warnings.reports.dialog.actions": "Ações",
|
|
56
|
+
"page.details.panel.discussion.warnings.reports.dialog.actions.resolve": "Resolver",
|
|
57
|
+
"page.details.panel.discussion.warnings.reports.dialog.confirmation.success": "Open report has been resolved",
|
|
58
|
+
"page.details.panel.discussion.status.blocked": "Bloqueado",
|
|
59
|
+
"page.details.panel.entity": "Entity details",
|
|
60
|
+
"page.details.panel.status": "Discussion is",
|
|
61
|
+
"page.details.panel.status.open": "Open",
|
|
62
|
+
"page.details.panel.status.blocked": "Bloqueado",
|
|
63
|
+
"page.details.panel.status.pending": "Pendente",
|
|
64
|
+
"page.details.panel.loading": "Fetching entity...",
|
|
65
|
+
"page.details.actions.comment.block": "Bloquear comentário",
|
|
66
|
+
"page.details.actions.comment.block.confirmation.header": "Moderação: Bloquear comentário",
|
|
67
|
+
"page.details.actions.comment.block.confirmation.description": "Deseja mesmo bloquear este comentário?",
|
|
68
|
+
"page.details.actions.comment.block.confirmation.button.confirm": "Sim, bloqueie",
|
|
69
|
+
"page.details.actions.comment.block.confirmation.success": "O comentário foi bloqueado",
|
|
70
|
+
"page.details.actions.comment.unblock": "Desbloquear comentário",
|
|
71
|
+
"page.details.actions.comment.unblock.confirmation.success": "O comentário foi desbloqueado",
|
|
72
|
+
"page.details.actions.comment.reports.review": "Análise",
|
|
73
|
+
"page.details.actions.thread.block": "Bloquear thread",
|
|
74
|
+
"page.details.actions.thread.block.confirmation.header": "Moderação: Bloquear thread",
|
|
75
|
+
"page.details.actions.thread.block.confirmation.description": "Você realmente quer bloquear todo o thread? Nenhuma outra discussão será permitida.",
|
|
76
|
+
"page.details.actions.thread.block.confirmation.button.confirm": "Sim, bloqueie",
|
|
77
|
+
"page.details.actions.thread.block.confirmation.success": "A thread foi bloqueada",
|
|
78
|
+
"page.details.actions.thread.unblock": "Desbloquear thread",
|
|
79
|
+
"page.details.actions.thread.unblock.confirmation.success": "A Thread foi desbloqueado",
|
|
80
|
+
"page.details.actions.comment.approve.confirmation.success": "O comentário foi aprovado",
|
|
81
|
+
"page.details.actions.comment.reject.confirmation.success": "O comentário foi rejeitado",
|
|
82
|
+
"page.details.filters.label": "View",
|
|
83
|
+
"page.details.filters.removed.visibility": "Mostrar comentários removidos",
|
|
84
|
+
"page.coming.soon": "Aguarde o que está por vir...",
|
|
85
|
+
"page.settings": "Configurações",
|
|
86
|
+
"page.settings.header.title": "Comentários",
|
|
87
|
+
"page.settings.header.description": "Configure seus recursos de moderação de comentários",
|
|
88
|
+
"page.settings.actions.submit": "Salvar",
|
|
89
|
+
"page.settings.actions.restore": "Restaurar configurações originais",
|
|
90
|
+
"page.settings.actions.restart": "Restart Strapi",
|
|
91
|
+
"page.settings.section.general": "Configurações gerais",
|
|
92
|
+
"page.settings.section.additional": "Configurações adicionais",
|
|
93
|
+
"page.settings.section.restore": "Restaurar configurações originais",
|
|
94
|
+
"page.settings.section.restore.subtitle": "Descartando todas as configurações aplicadas e voltando para as configurações padrão do plugin. Use razoável.",
|
|
95
|
+
"page.settings.form.enabledCollections.label": "Ativar comentários apenas para",
|
|
96
|
+
"page.settings.form.enabledCollections.placeholder": "Selecione uma ou mais collection",
|
|
97
|
+
"page.settings.form.enabledCollections.hint": "Se nenhum for selecionado, todos os tipos de conteúdo serão habilitados",
|
|
98
|
+
"page.settings.form.contentTypesSettings.label": "Tipos de conteúdo",
|
|
99
|
+
"page.settings.form.contentTypesSettings.tooltip": "Configuração personalizada por tipo de conteúdo",
|
|
100
|
+
"page.settings.form.moderatorRoles.label": "Envie notificações importantes para",
|
|
101
|
+
"page.settings.form.moderatorRoles.placeholder": "Selecione um ou mais Roles",
|
|
102
|
+
"page.settings.form.moderatorRoles.hint": "Roles que serão notificadas pelo plugin sobre ações significativas a serem executadas",
|
|
103
|
+
"page.settings.form.badWords.label": "Filtragem de palavrões",
|
|
104
|
+
"page.settings.form.badWords.hint": "Se ativado, todas as postagens/atualizações de comentários serão verificadas em relação a palavras impróprias",
|
|
105
|
+
"page.settings.form.gqlAuth.label": "GraphQL queries authorization",
|
|
106
|
+
"page.settings.form.gqlAuth.hint": "Se ativado, as queries e mutations da API GraphQL podem ser acionadas apenas por usuários autenticados do Strapi. Caso contrário, a API permanece aberta.",
|
|
107
|
+
"page.settings.form.approvalFlow.label": "Fluxo de aprovação",
|
|
108
|
+
"page.settings.form.approvalFlow.hint": "Os comentários associados ao tipo de conteúdo \"{name}\" passarão pelo fluxo de aprovação manual",
|
|
109
|
+
"page.settings.form.entryLabel.label": "Campos de título",
|
|
110
|
+
"page.settings.form.entryLabel.placeholder": "Selecione pelo menos um ou deixe em branco para aplicar os padrões",
|
|
111
|
+
"page.settings.form.entryLabel.hint": "Se deixado em branco, a renderização do título terá os seguintes campos ordenados: \"Title\", \"Subject\" & \"Name\"",
|
|
112
|
+
"page.settings.actions.restore.confirmation.header": "Restaurar a configuração padrão",
|
|
113
|
+
"page.settings.actions.restore.confirmation.description": "Você está prestes a restaurar a configuração do plug-in para seus valores padrão. Pode ter um impacto destrutivo no conteúdo já coletado. Você realmente quer continuar?",
|
|
114
|
+
"page.settings.actions.restore.confirmation.button.confirm": "Sim, quero restaurar",
|
|
115
|
+
"page.settings.actions.restart.alert.title": "Strapi requer reinicialização",
|
|
116
|
+
"page.settings.actions.restart.alert.description": "Você fez uma alteração de configuração que exige que seu aplicativo Strapi seja reiniciado para ter efeito no schema do GraphQL. Faça isso manualmente ou usando o trigger abaixo.",
|
|
117
|
+
"page.settings.actions.restart.alert.close": "Descartar",
|
|
118
|
+
"page.settings.notification.fetch.error": "Falha ao buscar a configuração. Tentando novamente...",
|
|
119
|
+
"page.settings.notification.submit.success": "A configuração foi salva com sucesso",
|
|
120
|
+
"page.settings.notification.submit.error": "Falha ao salvar a configuração. Tente novamente.",
|
|
121
|
+
"page.settings.notification.restore.success": "A configuração foi restaurada com sucesso",
|
|
122
|
+
"page.settings.notification.restore.error": "Falha ao restaurar a configuração. Tente novamente.",
|
|
123
|
+
"page.settings.notification.restart.success": "O aplicativo foi reiniciado com sucesso",
|
|
124
|
+
"page.settings.notification.restart.error": "Falha ao reiniciar seu aplicativo. Tente fazer manualmente.",
|
|
125
|
+
"page.settings.loading": "Buscando configuração...",
|
|
126
|
+
"compontents.confirmation.dialog.header": "Confirmação",
|
|
127
|
+
"compontents.confirmation.dialog.description": "Você realmente deseja realizar esta ação?",
|
|
128
|
+
"compontents.confirmation.dialog.button.confirm": "Sim eu quero",
|
|
129
|
+
"compontents.confirmation.dialog.button.cancel": "Cancelar",
|
|
130
|
+
"compontents.toogle.enabled": "Habilitado",
|
|
131
|
+
"compontents.toogle.disabled": "Desabilitado"
|
|
132
132
|
}
|
|
@@ -1,35 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const axios_1 = __importDefault(require("axios"));
|
|
7
|
+
const helper_plugin_1 = require("@strapi/helper-plugin");
|
|
8
|
+
const instance = axios_1.default.create({
|
|
9
|
+
baseURL: process.env.STRAPI_ADMIN_BACKEND_URL,
|
|
6
10
|
});
|
|
7
|
-
|
|
8
|
-
instance.interceptors.request.use(
|
|
9
|
-
async config => {
|
|
11
|
+
instance.interceptors.request.use(async (config) => {
|
|
10
12
|
config.headers = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
Authorization: `Bearer ${helper_plugin_1.auth.getToken()}`,
|
|
14
|
+
Accept: "application/json",
|
|
15
|
+
"Content-Type": "application/json",
|
|
14
16
|
};
|
|
15
|
-
|
|
16
17
|
return config;
|
|
17
|
-
|
|
18
|
-
error => {
|
|
18
|
+
}, (error) => {
|
|
19
19
|
Promise.reject(error);
|
|
20
|
-
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
instance.interceptors.response.use(
|
|
24
|
-
response => response,
|
|
25
|
-
error => {
|
|
20
|
+
});
|
|
21
|
+
instance.interceptors.response.use((response) => response, (error) => {
|
|
26
22
|
if (error.response?.status === 401) {
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
helper_plugin_1.auth.clearAppStorage();
|
|
24
|
+
window.location.reload();
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
throw error;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export default instance;
|
|
27
|
+
});
|
|
28
|
+
exports.default = instance;
|
|
29
|
+
//# sourceMappingURL=axiosInstance.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const APPROVAL_STATUS: {
|
|
2
|
+
PENDING: string;
|
|
3
|
+
APPROVED: string;
|
|
4
|
+
REJECTED: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const REPORT_STATUS: {
|
|
7
|
+
RESOLVED: string;
|
|
8
|
+
OPEN: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const REPORT_REASON: {
|
|
11
|
+
BAD_LANGUAGE: string;
|
|
12
|
+
DISCRIMINATION: string;
|
|
13
|
+
OTHER: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const COMMENT_STATUS: {
|
|
16
|
+
PENDING: string;
|
|
17
|
+
APPROVED: string;
|
|
18
|
+
REJECTED: string;
|
|
19
|
+
UNKNOWN: string;
|
|
20
|
+
BLOCKED: string;
|
|
21
|
+
OPEN: string;
|
|
22
|
+
REMOVED: string;
|
|
23
|
+
TO_REVIEW: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMENT_STATUS = exports.REPORT_REASON = exports.REPORT_STATUS = exports.APPROVAL_STATUS = void 0;
|
|
4
|
+
exports.APPROVAL_STATUS = {
|
|
5
|
+
PENDING: "PENDING",
|
|
6
|
+
APPROVED: "APPROVED",
|
|
7
|
+
REJECTED: "REJECTED",
|
|
5
8
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'OPEN': 'OPEN',
|
|
9
|
+
exports.REPORT_STATUS = {
|
|
10
|
+
RESOLVED: "RESOLVED",
|
|
11
|
+
OPEN: "OPEN",
|
|
10
12
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'OTHER': 'OTHER',
|
|
13
|
+
exports.REPORT_REASON = {
|
|
14
|
+
BAD_LANGUAGE: "BAD_LANGUAGE",
|
|
15
|
+
DISCRIMINATION: "DISCRIMINATION",
|
|
16
|
+
OTHER: "OTHER",
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
exports.COMMENT_STATUS = {
|
|
19
|
+
UNKNOWN: "UNKNOWN",
|
|
20
|
+
BLOCKED: "BLOCKED",
|
|
21
|
+
OPEN: "OPEN",
|
|
22
|
+
REMOVED: "REMOVED",
|
|
23
|
+
TO_REVIEW: "TO_REVIEW",
|
|
24
|
+
...exports.APPROVAL_STATUS,
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pluginId_1 = require("../pluginId");
|
|
4
|
+
const getApiURL = (endPoint) => `/${pluginId_1.pluginId}/${endPoint}`;
|
|
5
|
+
exports.default = getApiURL;
|
|
6
|
+
//# sourceMappingURL=getApiUrl.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (isString(input)) {
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const react_intl_1 = require("react-intl");
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const pluginId_1 = require("../pluginId");
|
|
6
|
+
const getMessage = (input, defaultMessage = "", inPluginScope = true) => {
|
|
7
|
+
const { formatMessage } = (0, react_intl_1.useIntl)();
|
|
8
|
+
let formattedId = "";
|
|
9
|
+
if ((0, lodash_1.isString)(input)) {
|
|
11
10
|
formattedId = input;
|
|
12
|
-
}
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
13
|
formattedId = input?.id;
|
|
14
14
|
}
|
|
15
15
|
return formatMessage({
|
|
16
|
-
id: `${inPluginScope ? pluginId :
|
|
16
|
+
id: `${inPluginScope ? pluginId_1.pluginId : "app.components"}.${formattedId}`,
|
|
17
17
|
defaultMessage,
|
|
18
|
-
}, input?.props || undefined)
|
|
18
|
+
}, input?.props || undefined);
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
exports.default = getMessage;
|
|
21
|
+
//# sourceMappingURL=getMessage.js.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getRelatedGroups = (related, config) => related.split(config.regex.relatedUid).filter((s) => s && s.length > 0);
|
|
4
|
+
exports.default = getRelatedGroups;
|
|
5
|
+
//# sourceMappingURL=getRelatedGroups.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pluginId_1 = require("../pluginId");
|
|
4
|
+
const getUrl = (path = "") => `/plugins/${pluginId_1.pluginId}/${path}`;
|
|
5
|
+
exports.default = getUrl;
|
|
6
|
+
//# sourceMappingURL=getUrl.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pluginId_1 = require("../pluginId");
|
|
4
|
+
const handleAPIError = (err = null, toggleNotification = null, message = "app.components.notification.error") => {
|
|
4
5
|
toggleNotification({
|
|
5
|
-
type:
|
|
6
|
-
message: `${pluginId}.${message}`,
|
|
6
|
+
type: "warning",
|
|
7
|
+
message: `${pluginId_1.pluginId}.${message}`,
|
|
7
8
|
});
|
|
8
|
-
|
|
9
9
|
if (err) {
|
|
10
10
|
throw err;
|
|
11
|
-
} else {
|
|
12
|
-
throw new Error('error');
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
else {
|
|
13
|
+
throw new Error("error");
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.default = handleAPIError;
|
|
17
|
+
//# sourceMappingURL=handleAPIError.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as axiosInstance } from "./axiosInstance";
|
|
2
|
+
export { default as getApiURL } from "./getApiUrl";
|
|
3
|
+
export { default as getUrl } from "./getUrl";
|
|
4
|
+
export { default as getMessage } from "./getMessage";
|
|
5
|
+
export { default as handleAPIError } from "./handleAPIError";
|
|
6
|
+
export { default as getRelatedGroups } from "./getRelatedGroups";
|
|
7
|
+
export { default as renderEntryTitle } from "./renderEntryTitle";
|
|
8
|
+
export { default as renderInitials } from "./renderInitials";
|
|
9
|
+
export { default as resolveCommentStatus } from "./resolveCommentStatus";
|
|
10
|
+
export { default as resolveCommentStatusColor } from "./resolveCommentStatusColor";
|
|
11
|
+
export { default as parseRegExp } from "./parseRegExp";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
package/admin/src/utils/index.js
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseRegExp = exports.resolveCommentStatusColor = exports.resolveCommentStatus = exports.renderInitials = exports.renderEntryTitle = exports.getRelatedGroups = exports.handleAPIError = exports.getMessage = exports.getUrl = exports.getApiURL = exports.axiosInstance = void 0;
|
|
7
|
+
var axiosInstance_1 = require("./axiosInstance");
|
|
8
|
+
Object.defineProperty(exports, "axiosInstance", { enumerable: true, get: function () { return __importDefault(axiosInstance_1).default; } });
|
|
9
|
+
var getApiUrl_1 = require("./getApiUrl");
|
|
10
|
+
Object.defineProperty(exports, "getApiURL", { enumerable: true, get: function () { return __importDefault(getApiUrl_1).default; } });
|
|
11
|
+
var getUrl_1 = require("./getUrl");
|
|
12
|
+
Object.defineProperty(exports, "getUrl", { enumerable: true, get: function () { return __importDefault(getUrl_1).default; } });
|
|
13
|
+
var getMessage_1 = require("./getMessage");
|
|
14
|
+
Object.defineProperty(exports, "getMessage", { enumerable: true, get: function () { return __importDefault(getMessage_1).default; } });
|
|
15
|
+
var handleAPIError_1 = require("./handleAPIError");
|
|
16
|
+
Object.defineProperty(exports, "handleAPIError", { enumerable: true, get: function () { return __importDefault(handleAPIError_1).default; } });
|
|
17
|
+
var getRelatedGroups_1 = require("./getRelatedGroups");
|
|
18
|
+
Object.defineProperty(exports, "getRelatedGroups", { enumerable: true, get: function () { return __importDefault(getRelatedGroups_1).default; } });
|
|
19
|
+
var renderEntryTitle_1 = require("./renderEntryTitle");
|
|
20
|
+
Object.defineProperty(exports, "renderEntryTitle", { enumerable: true, get: function () { return __importDefault(renderEntryTitle_1).default; } });
|
|
21
|
+
var renderInitials_1 = require("./renderInitials");
|
|
22
|
+
Object.defineProperty(exports, "renderInitials", { enumerable: true, get: function () { return __importDefault(renderInitials_1).default; } });
|
|
23
|
+
var resolveCommentStatus_1 = require("./resolveCommentStatus");
|
|
24
|
+
Object.defineProperty(exports, "resolveCommentStatus", { enumerable: true, get: function () { return __importDefault(resolveCommentStatus_1).default; } });
|
|
25
|
+
var resolveCommentStatusColor_1 = require("./resolveCommentStatusColor");
|
|
26
|
+
Object.defineProperty(exports, "resolveCommentStatusColor", { enumerable: true, get: function () { return __importDefault(resolveCommentStatusColor_1).default; } });
|
|
27
|
+
var parseRegExp_1 = require("./parseRegExp");
|
|
28
|
+
Object.defineProperty(exports, "parseRegExp", { enumerable: true, get: function () { return __importDefault(parseRegExp_1).default; } });
|
|
29
|
+
//# sourceMappingURL=index.js.map
|