strapi-plugin-comments 2.1.2 → 2.1.5

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.
Files changed (402) hide show
  1. package/README.md +4 -1
  2. package/{build/admin → admin}/src/components/ActionButton/styles.d.ts +0 -0
  3. package/{build/admin → admin}/src/components/ActionButton/styles.js +0 -0
  4. package/{build/admin → admin}/src/components/Avatar/index.d.ts +0 -0
  5. package/{build/admin → admin}/src/components/Avatar/index.js +0 -0
  6. package/{build/admin → admin}/src/components/ConfirmationDialog/index.d.ts +0 -0
  7. package/{build/admin → admin}/src/components/ConfirmationDialog/index.js +0 -0
  8. package/{build/admin → admin}/src/components/DiscussionStatus/index.d.ts +0 -0
  9. package/{build/admin → admin}/src/components/DiscussionStatus/index.js +0 -0
  10. package/{build/admin → admin}/src/components/DiscussionThread/index.d.ts +0 -0
  11. package/{build/admin → admin}/src/components/DiscussionThread/index.js +0 -0
  12. package/{build/admin → admin}/src/components/DiscussionThreadItem/index.d.ts +0 -0
  13. package/{build/admin → admin}/src/components/DiscussionThreadItem/index.js +0 -0
  14. package/{build/admin → admin}/src/components/DiscussionThreadItem/styles.d.ts +0 -0
  15. package/{build/admin → admin}/src/components/DiscussionThreadItem/styles.js +0 -0
  16. package/{build/admin → admin}/src/components/DiscussionThreadItemActions/index.d.ts +0 -0
  17. package/{build/admin → admin}/src/components/DiscussionThreadItemActions/index.js +0 -0
  18. package/{build/admin → admin}/src/components/DiscussionThreadItemActions/styles.d.ts +0 -0
  19. package/{build/admin → admin}/src/components/DiscussionThreadItemActions/styles.js +0 -0
  20. package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +0 -0
  21. package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/index.js +0 -0
  22. package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +0 -0
  23. package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/styles.js +0 -0
  24. package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/index.d.ts +0 -0
  25. package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/index.js +4 -3
  26. package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/styles.d.ts +0 -0
  27. package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/styles.js +0 -0
  28. package/{build/admin → admin}/src/components/DiscussionThreadItemReviewAction/index.d.ts +0 -0
  29. package/{build/admin → admin}/src/components/DiscussionThreadItemReviewAction/index.js +0 -0
  30. package/{build/admin → admin}/src/components/FormSwitch/index.d.ts +0 -0
  31. package/{build/admin → admin}/src/components/FormSwitch/index.js +0 -0
  32. package/{build/admin → admin}/src/components/FormSwitch/styles.d.ts +0 -0
  33. package/{build/admin → admin}/src/components/FormSwitch/styles.js +0 -0
  34. package/{build/admin → admin}/src/components/IconButton/styles.d.ts +0 -0
  35. package/{build/admin → admin}/src/components/IconButton/styles.js +0 -0
  36. package/{build/admin → admin}/src/components/Initializer/index.d.ts +0 -0
  37. package/{build/admin → admin}/src/components/Initializer/index.js +0 -0
  38. package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/index.d.ts +0 -0
  39. package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/index.js +0 -0
  40. package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/styles.d.ts +0 -0
  41. package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/styles.js +0 -0
  42. package/{build/admin → admin}/src/components/Nav/index.d.ts +0 -0
  43. package/{build/admin → admin}/src/components/Nav/index.js +0 -0
  44. package/{build/admin → admin}/src/components/PluginIcon/index.d.ts +0 -0
  45. package/{build/admin → admin}/src/components/PluginIcon/index.js +0 -0
  46. package/{build/admin → admin}/src/components/ReportsReviewModal/index.d.ts +0 -0
  47. package/{build/admin → admin}/src/components/ReportsReviewModal/index.js +0 -0
  48. package/{build/admin → admin}/src/components/ReportsReviewTable/index.d.ts +0 -0
  49. package/{build/admin → admin}/src/components/ReportsReviewTable/index.js +0 -0
  50. package/{build/admin → admin}/src/components/StatusBadge/index.d.ts +0 -0
  51. package/{build/admin → admin}/src/components/StatusBadge/index.js +0 -0
  52. package/{build/admin → admin}/src/components/StatusBadge/styles.d.ts +0 -0
  53. package/{build/admin → admin}/src/components/StatusBadge/styles.js +0 -0
  54. package/{build/admin → admin}/src/components/TableFilters/index.d.ts +0 -0
  55. package/{build/admin → admin}/src/components/TableFilters/index.js +0 -0
  56. package/{build/admin → admin}/src/components/TablePagination/index.d.ts +0 -0
  57. package/{build/admin → admin}/src/components/TablePagination/index.js +0 -0
  58. package/{build/admin → admin}/src/components/icons/comments.d.ts +0 -0
  59. package/{build/admin → admin}/src/components/icons/comments.js +0 -0
  60. package/{build/admin → admin}/src/components/icons/index.d.ts +0 -0
  61. package/{build/admin → admin}/src/components/icons/index.js +0 -0
  62. package/{build/admin → admin}/src/components/icons/lock.d.ts +0 -0
  63. package/{build/admin → admin}/src/components/icons/lock.js +0 -0
  64. package/{build/admin → admin}/src/components/icons/review.d.ts +0 -0
  65. package/{build/admin → admin}/src/components/icons/review.js +0 -0
  66. package/{build/admin → admin}/src/components/icons/unlock.d.ts +0 -0
  67. package/{build/admin → admin}/src/components/icons/unlock.js +0 -0
  68. package/{build/admin → admin}/src/hooks/useConfig.d.ts +0 -0
  69. package/{build/admin → admin}/src/hooks/useConfig.js +0 -0
  70. package/{build/admin → admin}/src/index.d.ts +0 -0
  71. package/{build/admin → admin}/src/index.js +0 -0
  72. package/{build/admin → admin}/src/pages/App/index.d.ts +0 -0
  73. package/{build/admin → admin}/src/pages/App/index.js +0 -0
  74. package/{build/admin → admin}/src/pages/App/reducer/actions.d.ts +0 -0
  75. package/{build/admin → admin}/src/pages/App/reducer/actions.js +0 -0
  76. package/{build/admin → admin}/src/pages/App/reducer/constants.d.ts +0 -0
  77. package/{build/admin → admin}/src/pages/App/reducer/constants.js +0 -0
  78. package/{build/admin → admin}/src/pages/App/reducer/index.d.ts +0 -0
  79. package/{build/admin → admin}/src/pages/App/reducer/index.js +0 -0
  80. package/{build/admin → admin}/src/pages/App/reducer/init.d.ts +0 -0
  81. package/{build/admin → admin}/src/pages/App/reducer/init.js +0 -0
  82. package/{build/admin → admin}/src/pages/App/reducer/selectors.d.ts +0 -0
  83. package/{build/admin → admin}/src/pages/App/reducer/selectors.js +0 -0
  84. package/{build/admin → admin}/src/pages/App/utils/api.d.ts +0 -0
  85. package/{build/admin → admin}/src/pages/App/utils/api.js +0 -0
  86. package/{build/admin → admin}/src/pages/ComingSoonPage/index.d.ts +0 -0
  87. package/{build/admin → admin}/src/pages/ComingSoonPage/index.js +0 -0
  88. package/{build/admin → admin}/src/pages/Details/components/DetailsEntity/index.d.ts +0 -0
  89. package/{build/admin → admin}/src/pages/Details/components/DetailsEntity/index.js +0 -0
  90. package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/index.d.ts +0 -0
  91. package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/index.js +0 -0
  92. package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/styles.d.ts +0 -0
  93. package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/styles.js +0 -0
  94. package/{build/admin → admin}/src/pages/Details/index.d.ts +0 -0
  95. package/{build/admin → admin}/src/pages/Details/index.js +0 -0
  96. package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/index.d.ts +0 -0
  97. package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/index.js +2 -2
  98. package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +0 -0
  99. package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/styles.js +0 -0
  100. package/{build/admin → admin}/src/pages/Discover/index.d.ts +0 -0
  101. package/{build/admin → admin}/src/pages/Discover/index.js +0 -0
  102. package/{build/admin → admin}/src/pages/Discover/utils/api.d.ts +0 -0
  103. package/{build/admin → admin}/src/pages/Discover/utils/api.js +0 -0
  104. package/{build/admin → admin}/src/pages/Discover/utils/filtersSchema.d.ts +0 -0
  105. package/{build/admin → admin}/src/pages/Discover/utils/filtersSchema.js +0 -0
  106. package/{build/admin → admin}/src/pages/Settings/components/RestartAlert/styles.d.ts +0 -0
  107. package/{build/admin → admin}/src/pages/Settings/components/RestartAlert/styles.js +0 -0
  108. package/{build/admin → admin}/src/pages/Settings/index.d.ts +0 -0
  109. package/{build/admin → admin}/src/pages/Settings/index.js +0 -0
  110. package/{build/admin → admin}/src/pages/Settings/utils/api.d.ts +0 -0
  111. package/{build/admin → admin}/src/pages/Settings/utils/api.js +0 -0
  112. package/{build/admin → admin}/src/pages/utils/api.d.ts +0 -0
  113. package/{build/admin → admin}/src/pages/utils/api.js +0 -0
  114. package/{build/admin → admin}/src/permissions.d.ts +0 -0
  115. package/{build/admin → admin}/src/permissions.js +0 -0
  116. package/{build/admin → admin}/src/pluginId.d.ts +0 -0
  117. package/{build/admin → admin}/src/pluginId.js +0 -0
  118. package/{build/admin → admin}/src/reducers.d.ts +0 -0
  119. package/{build/admin → admin}/src/reducers.js +0 -0
  120. package/admin/src/translations/en.json +2 -1
  121. package/admin/src/translations/fr.json +2 -1
  122. package/admin/src/translations/pt-BR.json +2 -1
  123. package/{build/admin → admin}/src/utils/axiosInstance.d.ts +0 -0
  124. package/{build/admin → admin}/src/utils/axiosInstance.js +0 -0
  125. package/{build/admin → admin}/src/utils/constants.d.ts +0 -0
  126. package/{build/admin → admin}/src/utils/constants.js +0 -0
  127. package/{build/admin → admin}/src/utils/getApiUrl.d.ts +0 -0
  128. package/{build/admin → admin}/src/utils/getApiUrl.js +0 -0
  129. package/{build/admin → admin}/src/utils/getMessage.d.ts +0 -0
  130. package/{build/admin → admin}/src/utils/getMessage.js +0 -0
  131. package/{build/admin → admin}/src/utils/getRelatedGroups.d.ts +0 -0
  132. package/{build/admin → admin}/src/utils/getRelatedGroups.js +0 -0
  133. package/{build/admin → admin}/src/utils/getUrl.d.ts +0 -0
  134. package/{build/admin → admin}/src/utils/getUrl.js +0 -0
  135. package/{build/admin → admin}/src/utils/handleAPIError.d.ts +0 -0
  136. package/{build/admin → admin}/src/utils/handleAPIError.js +0 -0
  137. package/{build/admin → admin}/src/utils/index.d.ts +0 -0
  138. package/{build/admin → admin}/src/utils/index.js +0 -0
  139. package/{build/admin → admin}/src/utils/parseRegExp.d.ts +0 -0
  140. package/{build/admin → admin}/src/utils/parseRegExp.js +0 -0
  141. package/{build/admin → admin}/src/utils/renderEntryTitle.d.ts +0 -0
  142. package/{build/admin → admin}/src/utils/renderEntryTitle.js +0 -0
  143. package/{build/admin → admin}/src/utils/renderInitials.d.ts +0 -0
  144. package/{build/admin → admin}/src/utils/renderInitials.js +0 -0
  145. package/{build/admin → admin}/src/utils/resolveCommentStatus.d.ts +0 -0
  146. package/{build/admin → admin}/src/utils/resolveCommentStatus.js +0 -0
  147. package/{build/admin → admin}/src/utils/resolveCommentStatusColor.d.ts +0 -0
  148. package/{build/admin → admin}/src/utils/resolveCommentStatusColor.js +0 -0
  149. package/{build/content-types → content-types}/comment.d.ts +0 -0
  150. package/{build/content-types → content-types}/comment.js +0 -0
  151. package/{build/content-types → content-types}/index.d.ts +0 -0
  152. package/{build/content-types → content-types}/index.js +0 -0
  153. package/{build/content-types → content-types}/report.d.ts +0 -0
  154. package/{build/content-types → content-types}/report.js +0 -0
  155. package/package.json +7 -36
  156. package/{build/permissions.d.ts → permissions.d.ts} +0 -0
  157. package/{build/permissions.js → permissions.js} +0 -0
  158. package/{build/server → server}/bootstrap.d.ts +0 -0
  159. package/{build/server → server}/bootstrap.js +0 -0
  160. package/{build/server → server}/config/index.d.ts +0 -0
  161. package/{build/server → server}/config/index.js +0 -0
  162. package/{build/server → server}/controllers/admin.d.ts +0 -0
  163. package/{build/server → server}/controllers/admin.js +0 -0
  164. package/{build/server → server}/controllers/client.d.ts +0 -0
  165. package/{build/server → server}/controllers/client.js +0 -0
  166. package/{build/server → server}/controllers/index.d.ts +0 -0
  167. package/{build/server → server}/controllers/index.js +0 -0
  168. package/{build/server → server}/controllers/utils/functions.d.ts +0 -0
  169. package/{build/server → server}/controllers/utils/functions.js +0 -0
  170. package/{build/server → server}/controllers/utils/parsers.d.ts +0 -0
  171. package/{build/server → server}/controllers/utils/parsers.js +0 -0
  172. package/{build/server → server}/destroy.d.ts +0 -0
  173. package/{build/server → server}/destroy.js +0 -0
  174. package/{build/server → server}/graphql/index.d.ts +0 -0
  175. package/{build/server → server}/graphql/index.js +0 -0
  176. package/{build/server → server}/graphql/mutations/createAbuseReport.d.ts +0 -0
  177. package/{build/server → server}/graphql/mutations/createAbuseReport.js +0 -0
  178. package/{build/server → server}/graphql/mutations/createComment.d.ts +0 -0
  179. package/{build/server → server}/graphql/mutations/createComment.js +0 -0
  180. package/{build/server → server}/graphql/mutations/index.d.ts +0 -0
  181. package/{build/server → server}/graphql/mutations/index.js +0 -0
  182. package/{build/server → server}/graphql/mutations/removeComment.d.ts +0 -0
  183. package/{build/server → server}/graphql/mutations/removeComment.js +0 -0
  184. package/{build/server → server}/graphql/mutations/updateComment.d.ts +0 -0
  185. package/{build/server → server}/graphql/mutations/updateComment.js +0 -0
  186. package/{build/server → server}/graphql/queries/findAllFlat.d.ts +0 -0
  187. package/{build/server → server}/graphql/queries/findAllFlat.js +0 -0
  188. package/{build/server → server}/graphql/queries/findAllInHierarchy.d.ts +0 -0
  189. package/{build/server → server}/graphql/queries/findAllInHierarchy.js +0 -0
  190. package/{build/server → server}/graphql/queries/index.d.ts +0 -0
  191. package/{build/server → server}/graphql/queries/index.js +0 -0
  192. package/{build/server → server}/graphql/resolvers-config.d.ts +0 -0
  193. package/{build/server → server}/graphql/resolvers-config.js +0 -0
  194. package/{build/server → server}/graphql/types/comment-author.d.ts +0 -0
  195. package/{build/server → server}/graphql/types/comment-author.js +0 -0
  196. package/{build/server → server}/graphql/types/comment-nested.d.ts +0 -0
  197. package/{build/server → server}/graphql/types/comment-nested.js +0 -0
  198. package/{build/server → server}/graphql/types/comment.d.ts +0 -0
  199. package/{build/server → server}/graphql/types/comment.js +0 -0
  200. package/{build/server → server}/graphql/types/create-comment-author.d.ts +0 -0
  201. package/{build/server → server}/graphql/types/create-comment-author.js +0 -0
  202. package/{build/server → server}/graphql/types/create-comment.d.ts +0 -0
  203. package/{build/server → server}/graphql/types/create-comment.js +0 -0
  204. package/{build/server → server}/graphql/types/create-report.d.ts +0 -0
  205. package/{build/server → server}/graphql/types/create-report.js +0 -0
  206. package/{build/server → server}/graphql/types/id.d.ts +0 -0
  207. package/{build/server → server}/graphql/types/id.js +0 -0
  208. package/{build/server → server}/graphql/types/identify-comment-author.d.ts +0 -0
  209. package/{build/server → server}/graphql/types/identify-comment-author.js +0 -0
  210. package/{build/server → server}/graphql/types/index.d.ts +0 -0
  211. package/{build/server → server}/graphql/types/index.js +0 -0
  212. package/{build/server → server}/graphql/types/remove-comment.d.ts +0 -0
  213. package/{build/server → server}/graphql/types/remove-comment.js +0 -0
  214. package/{build/server → server}/graphql/types/report-reason.d.ts +0 -0
  215. package/{build/server → server}/graphql/types/report-reason.js +0 -0
  216. package/{build/server → server}/graphql/types/report.d.ts +0 -0
  217. package/{build/server → server}/graphql/types/report.js +0 -0
  218. package/{build/server → server}/graphql/types/response-find-all.d.ts +0 -0
  219. package/{build/server → server}/graphql/types/response-find-all.js +0 -0
  220. package/{build/server → server}/graphql/types/response-meta.d.ts +0 -0
  221. package/{build/server → server}/graphql/types/response-meta.js +0 -0
  222. package/{build/server → server}/graphql/types/response-pagination.d.ts +0 -0
  223. package/{build/server → server}/graphql/types/response-pagination.js +0 -0
  224. package/{build/server → server}/graphql/types/update-comment.d.ts +0 -0
  225. package/{build/server → server}/graphql/types/update-comment.js +0 -0
  226. package/{build/server → server}/index.d.ts +0 -0
  227. package/{build/server → server}/index.js +0 -0
  228. package/{build/server → server}/register.d.ts +0 -0
  229. package/{build/server → server}/register.js +0 -0
  230. package/{build/server → server}/routes/admin.d.ts +0 -0
  231. package/{build/server → server}/routes/admin.js +0 -0
  232. package/{build/server → server}/routes/client.d.ts +0 -0
  233. package/{build/server → server}/routes/client.js +0 -0
  234. package/{build/server → server}/routes/index.d.ts +0 -0
  235. package/{build/server → server}/routes/index.js +0 -0
  236. package/{build/server → server}/services/admin.d.ts +0 -0
  237. package/{build/server → server}/services/admin.js +0 -0
  238. package/{build/server → server}/services/client.d.ts +0 -0
  239. package/{build/server → server}/services/client.js +0 -0
  240. package/{build/server → server}/services/common.d.ts +0 -0
  241. package/{build/server → server}/services/common.js +0 -0
  242. package/{build/server → server}/services/graphql.d.ts +0 -0
  243. package/{build/server → server}/services/graphql.js +0 -0
  244. package/{build/server → server}/services/index.d.ts +0 -0
  245. package/{build/server → server}/services/index.js +0 -0
  246. package/{build/server → server}/services/utils/functions.d.ts +0 -0
  247. package/{build/server → server}/services/utils/functions.js +0 -0
  248. package/{build/server → server}/utils/constants.d.ts +0 -0
  249. package/{build/server → server}/utils/constants.js +0 -0
  250. package/{build/server → server}/utils/error.d.ts +0 -0
  251. package/{build/server → server}/utils/error.js +0 -0
  252. package/{build/server → server}/utils/functions.d.ts +0 -0
  253. package/{build/server → server}/utils/functions.js +0 -0
  254. package/{build/strapi-admin.d.ts → strapi-admin.d.ts} +0 -0
  255. package/{build/strapi-admin.js → strapi-admin.js} +0 -0
  256. package/{build/strapi-server.d.ts → strapi-server.d.ts} +0 -0
  257. package/{build/strapi-server.js → strapi-server.js} +0 -0
  258. package/{build/tsconfig.tsbuildinfo → tsconfig.tsbuildinfo} +1 -1
  259. package/{build/types → types}/contentTypes.d.ts +0 -0
  260. package/{build/types → types}/contentTypes.js +0 -0
  261. package/.husky/pre-commit +0 -4
  262. package/LICENSE.md +0 -7
  263. package/admin/src/components/ActionButton/styles.ts +0 -11
  264. package/admin/src/components/Avatar/index.tsx +0 -31
  265. package/admin/src/components/ConfirmationDialog/index.tsx +0 -88
  266. package/admin/src/components/DiscussionStatus/index.tsx +0 -36
  267. package/admin/src/components/DiscussionThread/index.tsx +0 -97
  268. package/admin/src/components/DiscussionThreadItem/index.tsx +0 -71
  269. package/admin/src/components/DiscussionThreadItem/styles.ts +0 -15
  270. package/admin/src/components/DiscussionThreadItemActions/index.tsx +0 -365
  271. package/admin/src/components/DiscussionThreadItemActions/styles.ts +0 -9
  272. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.tsx +0 -99
  273. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.ts +0 -8
  274. package/admin/src/components/DiscussionThreadItemFooter/index.tsx +0 -62
  275. package/admin/src/components/DiscussionThreadItemFooter/styles.ts +0 -15
  276. package/admin/src/components/DiscussionThreadItemReviewAction/index.tsx +0 -180
  277. package/admin/src/components/FormSwitch/index.tsx +0 -35
  278. package/admin/src/components/FormSwitch/styles.ts +0 -10
  279. package/admin/src/components/IconButton/styles.ts +0 -19
  280. package/admin/src/components/Initializer/index.tsx +0 -28
  281. package/admin/src/components/LoadingIndicatorOverlay/index.tsx +0 -19
  282. package/admin/src/components/LoadingIndicatorOverlay/styles.ts +0 -21
  283. package/admin/src/components/Nav/index.tsx +0 -61
  284. package/admin/src/components/PluginIcon/index.tsx +0 -14
  285. package/admin/src/components/ReportsReviewModal/index.tsx +0 -71
  286. package/admin/src/components/ReportsReviewTable/index.tsx +0 -233
  287. package/admin/src/components/StatusBadge/index.tsx +0 -21
  288. package/admin/src/components/StatusBadge/styles.ts +0 -19
  289. package/admin/src/components/TableFilters/index.tsx +0 -58
  290. package/admin/src/components/TablePagination/index.tsx +0 -37
  291. package/admin/src/components/icons/comments.tsx +0 -15
  292. package/admin/src/components/icons/index.ts +0 -6
  293. package/admin/src/components/icons/lock.tsx +0 -27
  294. package/admin/src/components/icons/review.tsx +0 -25
  295. package/admin/src/components/icons/unlock.tsx +0 -25
  296. package/admin/src/hooks/useConfig.ts +0 -58
  297. package/admin/src/index.ts +0 -98
  298. package/admin/src/pages/App/index.tsx +0 -67
  299. package/admin/src/pages/App/reducer/actions.ts +0 -10
  300. package/admin/src/pages/App/reducer/constants.ts +0 -4
  301. package/admin/src/pages/App/reducer/index.ts +0 -28
  302. package/admin/src/pages/App/reducer/init.ts +0 -9
  303. package/admin/src/pages/App/reducer/selectors.ts +0 -32
  304. package/admin/src/pages/App/utils/api.ts +0 -14
  305. package/admin/src/pages/ComingSoonPage/index.tsx +0 -31
  306. package/admin/src/pages/Details/components/DetailsEntity/index.tsx +0 -106
  307. package/admin/src/pages/Details/components/DetailsFilters/index.tsx +0 -43
  308. package/admin/src/pages/Details/components/DetailsFilters/styles.ts +0 -9
  309. package/admin/src/pages/Details/index.tsx +0 -169
  310. package/admin/src/pages/Discover/components/DiscoverTableRow/index.tsx +0 -252
  311. package/admin/src/pages/Discover/components/DiscoverTableRow/styles.ts +0 -9
  312. package/admin/src/pages/Discover/index.tsx +0 -230
  313. package/admin/src/pages/Discover/utils/api.ts +0 -22
  314. package/admin/src/pages/Discover/utils/filtersSchema.ts +0 -9
  315. package/admin/src/pages/Settings/components/RestartAlert/styles.ts +0 -10
  316. package/admin/src/pages/Settings/index.tsx +0 -602
  317. package/admin/src/pages/Settings/utils/api.ts +0 -71
  318. package/admin/src/pages/utils/api.ts +0 -70
  319. package/admin/src/permissions.ts +0 -30
  320. package/admin/src/pluginId.ts +0 -3
  321. package/admin/src/reducers.ts +0 -8
  322. package/admin/src/utils/axiosInstance.ts +0 -38
  323. package/admin/src/utils/constants.ts +0 -25
  324. package/admin/src/utils/getApiUrl.ts +0 -5
  325. package/admin/src/utils/getMessage.ts +0 -29
  326. package/admin/src/utils/getRelatedGroups.ts +0 -6
  327. package/admin/src/utils/getUrl.ts +0 -5
  328. package/admin/src/utils/handleAPIError.ts +0 -21
  329. package/admin/src/utils/index.ts +0 -11
  330. package/admin/src/utils/parseRegExp.ts +0 -9
  331. package/admin/src/utils/renderEntryTitle.ts +0 -16
  332. package/admin/src/utils/renderInitials.ts +0 -10
  333. package/admin/src/utils/resolveCommentStatus.ts +0 -37
  334. package/admin/src/utils/resolveCommentStatusColor.ts +0 -22
  335. package/build/admin/src/translations/en.json +0 -132
  336. package/build/admin/src/translations/fr.json +0 -132
  337. package/build/admin/src/translations/pt-BR.json +0 -132
  338. package/build/package.json +0 -94
  339. package/content-types/comment.ts +0 -93
  340. package/content-types/index.ts +0 -11
  341. package/content-types/report.ts +0 -50
  342. package/jest.config.ts +0 -22
  343. package/permissions.ts +0 -17
  344. package/server/bootstrap.ts +0 -66
  345. package/server/config/index.ts +0 -19
  346. package/server/controllers/admin.ts +0 -194
  347. package/server/controllers/client.ts +0 -220
  348. package/server/controllers/index.ts +0 -13
  349. package/server/controllers/utils/functions.ts +0 -27
  350. package/server/controllers/utils/parsers.ts +0 -59
  351. package/server/destroy.ts +0 -3
  352. package/server/graphql/index.ts +0 -27
  353. package/server/graphql/mutations/createAbuseReport.ts +0 -38
  354. package/server/graphql/mutations/createComment.ts +0 -41
  355. package/server/graphql/mutations/index.ts +0 -26
  356. package/server/graphql/mutations/removeComment.ts +0 -41
  357. package/server/graphql/mutations/updateComment.ts +0 -40
  358. package/server/graphql/queries/findAllFlat.ts +0 -58
  359. package/server/graphql/queries/findAllInHierarchy.ts +0 -47
  360. package/server/graphql/queries/index.ts +0 -22
  361. package/server/graphql/resolvers-config.ts +0 -13
  362. package/server/graphql/types/comment-author.ts +0 -12
  363. package/server/graphql/types/comment-nested.ts +0 -19
  364. package/server/graphql/types/comment.ts +0 -18
  365. package/server/graphql/types/create-comment-author.ts +0 -12
  366. package/server/graphql/types/create-comment.ts +0 -12
  367. package/server/graphql/types/create-report.ts +0 -12
  368. package/server/graphql/types/id.ts +0 -28
  369. package/server/graphql/types/identify-comment-author.ts +0 -9
  370. package/server/graphql/types/index.ts +0 -38
  371. package/server/graphql/types/remove-comment.ts +0 -11
  372. package/server/graphql/types/report-reason.ts +0 -12
  373. package/server/graphql/types/report.ts +0 -14
  374. package/server/graphql/types/response-find-all.ts +0 -10
  375. package/server/graphql/types/response-meta.ts +0 -9
  376. package/server/graphql/types/response-pagination.ts +0 -14
  377. package/server/graphql/types/update-comment.ts +0 -12
  378. package/server/index.ts +0 -20
  379. package/server/register.ts +0 -3
  380. package/server/routes/admin.ts +0 -118
  381. package/server/routes/client.ts +0 -95
  382. package/server/routes/index.ts +0 -25
  383. package/server/services/admin.ts +0 -406
  384. package/server/services/client.ts +0 -394
  385. package/server/services/common.ts +0 -501
  386. package/server/services/graphql.ts +0 -219
  387. package/server/services/index.ts +0 -13
  388. package/server/services/utils/functions.ts +0 -150
  389. package/server/utils/constants.ts +0 -23
  390. package/server/utils/error.ts +0 -44
  391. package/server/utils/functions.ts +0 -55
  392. package/strapi-admin.ts +0 -5
  393. package/strapi-server.ts +0 -77
  394. package/tsconfig.json +0 -38
  395. package/types/common.d.ts +0 -1
  396. package/types/config.d.ts +0 -35
  397. package/types/constants.d.ts +0 -3
  398. package/types/contentTypes.ts +0 -56
  399. package/types/controllers.d.ts +0 -125
  400. package/types/graphql.d.ts +0 -24
  401. package/types/index.d.ts +0 -7
  402. package/types/services.d.ts +0 -166
@@ -1,132 +0,0 @@
1
- {
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
- }
@@ -1,94 +0,0 @@
1
- {
2
- "name": "strapi-plugin-comments",
3
- "version": "2.1.1",
4
- "description": "Strapi - Comments plugin",
5
- "strapi": {
6
- "name": "comments",
7
- "displayName": "Comments",
8
- "description": "Powerful Strapi based comments moderation tool for you and your users",
9
- "kind": "plugin"
10
- },
11
- "scripts": {
12
- "prepare": "husky install",
13
- "publish:latest": "cd build && npm publish --tag latest",
14
- "prepublish:latest": "npm run clean && npm run build && node build/setup-package.js",
15
- "build": "tsc && yarn copy-translations",
16
- "build:dev": "yarn run build && cp ./package.json ./build",
17
- "copy-translations": "copyfiles admin/src/translations/*.json build/",
18
- "clean": "rm -rf build",
19
- "develop": "nodemon --exec \"yarn build:dev\"",
20
- "test:unit": "jest --verbose --coverage",
21
- "lint": "prettier --check .",
22
- "format": "prettier --write ."
23
- },
24
- "repository": {
25
- "type": "git",
26
- "url": "https://github.com/VirtusLab-Open-Source/strapi-plugin-comments"
27
- },
28
- "dependencies": {
29
- "bad-words": "^3.0.4"
30
- },
31
- "devDependencies": {
32
- "@types/bad-words": "^3.0.1",
33
- "@types/jest": "^27.4.1",
34
- "codecov": "^3.7.2",
35
- "copyfiles": "^2.4.1",
36
- "husky": "7.0.4",
37
- "jest": "^27.5.1",
38
- "jest-cli": "^27.5.1",
39
- "jest-styled-components": "^7.0.8",
40
- "koa": "2.13.3",
41
- "nodemon": "^2.0.15",
42
- "prettier": "^2.6.0",
43
- "rimraf": "^3.0.2",
44
- "ts-jest": "^27.1.3",
45
- "ts-node": "^10.7.0",
46
- "strapi-typed": "^1.0.9",
47
- "typescript": "^4.6.3"
48
- },
49
- "peerDependencies": {
50
- "@strapi/strapi": "4.x",
51
- "@strapi/utils": "4.x",
52
- "@strapi/plugin-graphql": "4.x"
53
- },
54
- "nodemonConfig": {
55
- "ignore": [
56
- "./build/**/*",
57
- "./__mocks__/*",
58
- "./**/__tests__/*"
59
- ],
60
- "ext": "js,json,ts"
61
- },
62
- "husky": {
63
- "hooks": {
64
- "pre-commit": "yarn format && yarn test:unit"
65
- }
66
- },
67
- "author": {
68
- "name": "VirtusLab",
69
- "email": "strapi@virtuslab.com",
70
- "url": "https://virtuslab.com"
71
- },
72
- "maintainers": [
73
- {
74
- "name": "VirtusLab // Mateusz Ziarko",
75
- "email": "mziarko@virtuslab.com",
76
- "url": "https://virtuslab.com"
77
- },
78
- {
79
- "name": "VirtusLab // Maksymilian Pamuła",
80
- "email": "mpamula@virtuslab.com",
81
- "url": "https://virtuslab.com"
82
- }
83
- ],
84
- "engines": {
85
- "node": ">=14.x.x <=17.x.x",
86
- "npm": ">=7.x.x"
87
- },
88
- "keywords": [
89
- "strapi",
90
- "plugin",
91
- "comments"
92
- ],
93
- "license": "MIT"
94
- }
@@ -1,93 +0,0 @@
1
- /**
2
- * Comments Collection Type
3
- */
4
-
5
- export default {
6
- info: {
7
- tableName: "plugin-comments-comments",
8
- singularName: "comment",
9
- pluralName: "comments",
10
- displayName: "Comment",
11
- description: "Comment content type",
12
- kind: "collectionType",
13
- },
14
- options: {
15
- draftAndPublish: false,
16
- },
17
- pluginOptions: {
18
- "content-manager": {
19
- visible: false,
20
- },
21
- "content-type-builder": {
22
- visible: false,
23
- },
24
- },
25
- attributes: {
26
- content: {
27
- type: "text",
28
- configurable: false,
29
- required: true,
30
- },
31
- blocked: {
32
- type: "boolean",
33
- default: false,
34
- configurable: false,
35
- },
36
- blockedThread: {
37
- type: "boolean",
38
- default: false,
39
- configurable: false,
40
- },
41
- blockReason: {
42
- type: "string",
43
- configurable: false,
44
- },
45
- authorUser: {
46
- type: "relation",
47
- relation: "oneToOne",
48
- target: "plugin::users-permissions.user",
49
- configurable: false,
50
- },
51
- authorId: {
52
- type: "string",
53
- configurable: false,
54
- },
55
- authorName: {
56
- type: "string",
57
- configurable: false,
58
- },
59
- authorEmail: {
60
- type: "email",
61
- configurable: false,
62
- },
63
- authorAvatar: {
64
- type: "string",
65
- configurable: false,
66
- },
67
- removed: {
68
- type: "boolean",
69
- configurable: false,
70
- },
71
- approvalStatus: {
72
- type: "string",
73
- configurable: false,
74
- },
75
- related: {
76
- type: "string",
77
- configurable: false,
78
- },
79
- reports: {
80
- type: "relation",
81
- relation: "oneToMany",
82
- target: "plugin::comments.comment-report",
83
- mappedBy: "related",
84
- configurable: false,
85
- },
86
- threadOf: {
87
- type: "relation",
88
- relation: "oneToOne",
89
- target: "plugin::comments.comment",
90
- configurable: false,
91
- },
92
- },
93
- };
@@ -1,11 +0,0 @@
1
- import CommentCT from "./comment";
2
- import ReportCT from "./report";
3
-
4
- export default {
5
- comment: {
6
- schema: CommentCT,
7
- },
8
- "comment-report": {
9
- schema: ReportCT,
10
- },
11
- };
@@ -1,50 +0,0 @@
1
- /**
2
- * Comments Collection Type
3
- */
4
-
5
- export default {
6
- info: {
7
- tableName: "plugin-comments-reports",
8
- singularName: "comment-report",
9
- pluralName: "comment-reports",
10
- displayName: "Reports",
11
- description: "Reports content type",
12
- kind: "collectionType",
13
- },
14
- options: {
15
- draftAndPublish: false,
16
- },
17
- pluginOptions: {
18
- "content-manager": {
19
- visible: false,
20
- },
21
- "content-type-builder": {
22
- visible: false,
23
- },
24
- },
25
- attributes: {
26
- content: {
27
- type: "text",
28
- configurable: false,
29
- },
30
- reason: {
31
- type: "enumeration",
32
- enum: ["BAD_LANGUAGE", "DISCRIMINATION", "OTHER"],
33
- default: "OTHER",
34
- configurable: false,
35
- required: true,
36
- },
37
- resolved: {
38
- type: "boolean",
39
- default: false,
40
- configurable: false,
41
- },
42
- related: {
43
- type: "relation",
44
- relation: "manyToOne",
45
- target: "plugin::comments.comment",
46
- inversedBy: "reports",
47
- configurable: false,
48
- },
49
- },
50
- };
package/jest.config.ts DELETED
@@ -1,22 +0,0 @@
1
- import type { Config } from "@jest/types";
2
- import { defaults as tsjPreset } from "ts-jest/presets";
3
-
4
- const config: Config.InitialOptions = {
5
- name: "Unit test",
6
- testMatch: ["**/__tests__/?(*.)+(spec|test).ts"],
7
- transform: {
8
- ...tsjPreset.transform,
9
- },
10
- preset: "ts-jest",
11
- coverageDirectory: "./coverage/",
12
- collectCoverage: true,
13
- globals: {
14
- "ts-jest": {
15
- diagnostics: {
16
- warnOnly: true,
17
- },
18
- },
19
- },
20
- };
21
-
22
- export default config;
package/permissions.ts DELETED
@@ -1,17 +0,0 @@
1
- import { ToBeFixed } from "./types/common";
2
-
3
- export default {
4
- render: (uid: ToBeFixed) => `plugin::comments.${uid}`,
5
- comments: {
6
- read: "read",
7
- moderate: "moderate",
8
- },
9
- reports: {
10
- read: "reports.read",
11
- action: "reports.action",
12
- },
13
- settings: {
14
- read: "settings.read",
15
- change: "settings.change",
16
- },
17
- };
@@ -1,66 +0,0 @@
1
- import { isEmpty } from "lodash";
2
- import { StrapiContext } from "strapi-typed";
3
- import { CommentsPluginConfig, IServiceCommon } from "../types";
4
- import permissions from "./../permissions";
5
- import { getPluginService } from "./utils/functions";
6
-
7
- export = async ({ strapi }: StrapiContext) => {
8
- // Provide GQL support
9
- if (strapi.plugin("graphql")) {
10
- const config: CommentsPluginConfig = await getPluginService<IServiceCommon>(
11
- "common"
12
- ).getConfig();
13
- const { enabledCollections } = config;
14
- if (!isEmpty(enabledCollections)) {
15
- await require("./graphql")({ strapi, config });
16
- }
17
- }
18
-
19
- // Check if the plugin users-permissions is installed because the navigation needs it
20
- if (Object.keys(strapi.plugins).indexOf("users-permissions") === -1) {
21
- throw new Error(
22
- "In order to make the comments plugin work the users-permissions plugin is required"
23
- );
24
- }
25
- // Add permissions
26
- const actions = [
27
- {
28
- section: "plugins",
29
- displayName: "Comments: Read",
30
- uid: permissions.comments.read,
31
- pluginName: "comments",
32
- },
33
- {
34
- section: "plugins",
35
- displayName: "Comments: Moderate",
36
- uid: permissions.comments.moderate,
37
- pluginName: "comments",
38
- },
39
- {
40
- section: "plugins",
41
- displayName: "Reports: Read",
42
- uid: permissions.reports.read,
43
- pluginName: "comments",
44
- },
45
- {
46
- section: "plugins",
47
- displayName: "Reports: Moderate",
48
- uid: permissions.reports.action,
49
- pluginName: "comments",
50
- },
51
- {
52
- section: "plugins",
53
- displayName: "Settings: Read",
54
- uid: permissions.settings.read,
55
- pluginName: "comments",
56
- },
57
- {
58
- section: "plugins",
59
- displayName: "Settings: Change",
60
- uid: permissions.settings.change,
61
- pluginName: "comments",
62
- },
63
- ];
64
-
65
- await strapi.admin.services.permission.actionProvider.registerMany(actions);
66
- };
@@ -1,19 +0,0 @@
1
- import { StrapiConfig } from "../../types";
2
-
3
- const config: StrapiConfig = {
4
- default: {
5
- enabledCollections: [],
6
- moderatorRoles: [],
7
- approvalFlow: [],
8
- entryLabel: {
9
- "*": ["Title", "title", "Name", "name", "Subject", "subject"],
10
- },
11
- reportReasons: {
12
- BAD_LANGUAGE: "BAD_LANGUAGE",
13
- DISCRIMINATION: "DISCRIMINATION",
14
- OTHER: "OTHER",
15
- },
16
- },
17
- };
18
-
19
- export default config;