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.
Files changed (269) hide show
  1. package/README.md +204 -124
  2. package/admin/src/components/ActionButton/styles.d.ts +2 -0
  3. package/admin/src/components/ActionButton/styles.js +13 -8
  4. package/admin/src/components/Avatar/index.d.ts +12 -0
  5. package/admin/src/components/Avatar/index.js +26 -0
  6. package/admin/src/components/ConfirmationDialog/index.d.ts +26 -0
  7. package/admin/src/components/ConfirmationDialog/index.js +36 -55
  8. package/admin/src/components/DiscussionStatus/index.d.ts +9 -0
  9. package/admin/src/components/DiscussionStatus/index.js +22 -31
  10. package/admin/src/components/DiscussionThread/index.d.ts +16 -0
  11. package/admin/src/components/DiscussionThread/index.js +39 -56
  12. package/admin/src/components/DiscussionThreadItem/index.d.ts +9 -0
  13. package/admin/src/components/DiscussionThreadItem/index.js +28 -52
  14. package/admin/src/components/DiscussionThreadItem/styles.d.ts +4 -0
  15. package/admin/src/components/DiscussionThreadItem/styles.js +16 -11
  16. package/admin/src/components/DiscussionThreadItemActions/index.d.ts +19 -0
  17. package/admin/src/components/DiscussionThreadItemActions/index.js +121 -158
  18. package/admin/src/components/DiscussionThreadItemActions/styles.d.ts +2 -0
  19. package/admin/src/components/DiscussionThreadItemActions/styles.js +13 -7
  20. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +17 -0
  21. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.js +38 -48
  22. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +2 -0
  23. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.js +12 -6
  24. package/admin/src/components/DiscussionThreadItemFooter/index.d.ts +16 -0
  25. package/admin/src/components/DiscussionThreadItemFooter/index.js +34 -42
  26. package/admin/src/components/DiscussionThreadItemFooter/styles.d.ts +3 -0
  27. package/admin/src/components/DiscussionThreadItemFooter/styles.js +17 -12
  28. package/admin/src/components/DiscussionThreadItemReviewAction/index.d.ts +30 -0
  29. package/admin/src/components/DiscussionThreadItemReviewAction/index.js +77 -91
  30. package/admin/src/components/FormSwitch/index.d.ts +7 -0
  31. package/admin/src/components/FormSwitch/index.js +15 -18
  32. package/admin/src/components/FormSwitch/styles.d.ts +2 -0
  33. package/admin/src/components/FormSwitch/styles.js +14 -8
  34. package/admin/src/components/IconButton/styles.d.ts +2 -0
  35. package/admin/src/components/IconButton/styles.js +16 -9
  36. package/admin/src/components/Initializer/index.d.ts +5 -0
  37. package/admin/src/components/Initializer/index.js +12 -24
  38. package/admin/src/components/LoadingIndicatorOverlay/index.d.ts +3 -0
  39. package/admin/src/components/LoadingIndicatorOverlay/index.js +12 -15
  40. package/admin/src/components/LoadingIndicatorOverlay/styles.d.ts +3 -0
  41. package/admin/src/components/LoadingIndicatorOverlay/styles.js +22 -17
  42. package/admin/src/components/Nav/index.d.ts +7 -0
  43. package/admin/src/components/Nav/index.js +25 -48
  44. package/admin/src/components/PluginIcon/index.d.ts +3 -0
  45. package/admin/src/components/PluginIcon/index.js +10 -12
  46. package/admin/src/components/ReportsReviewModal/index.d.ts +21 -0
  47. package/admin/src/components/ReportsReviewModal/index.js +31 -46
  48. package/admin/src/components/ReportsReviewTable/index.d.ts +21 -0
  49. package/admin/src/components/ReportsReviewTable/index.js +120 -140
  50. package/admin/src/components/StatusBadge/index.d.ts +7 -0
  51. package/admin/src/components/StatusBadge/index.js +12 -17
  52. package/admin/src/components/StatusBadge/styles.d.ts +2 -0
  53. package/admin/src/components/StatusBadge/styles.js +19 -13
  54. package/admin/src/components/TableFilters/index.d.ts +10 -0
  55. package/admin/src/components/TableFilters/index.js +52 -49
  56. package/admin/src/components/TablePagination/index.d.ts +17 -0
  57. package/admin/src/components/TablePagination/index.js +27 -29
  58. package/admin/src/components/icons/comments.d.ts +6 -0
  59. package/admin/src/components/icons/comments.js +11 -8
  60. package/admin/src/components/icons/index.d.ts +6 -0
  61. package/admin/src/components/icons/index.js +15 -6
  62. package/admin/src/components/icons/lock.d.ts +7 -0
  63. package/admin/src/components/icons/lock.js +11 -21
  64. package/admin/src/components/icons/review.d.ts +7 -0
  65. package/admin/src/components/icons/review.js +11 -17
  66. package/admin/src/components/icons/unlock.d.ts +7 -0
  67. package/admin/src/components/icons/unlock.js +11 -19
  68. package/admin/src/hooks/useConfig.d.ts +8 -0
  69. package/admin/src/hooks/useConfig.js +40 -45
  70. package/admin/src/index.d.ts +7 -0
  71. package/admin/src/index.js +98 -92
  72. package/admin/src/pages/App/index.d.ts +4 -0
  73. package/admin/src/pages/App/index.js +43 -67
  74. package/admin/src/pages/App/reducer/actions.d.ts +8 -0
  75. package/admin/src/pages/App/reducer/actions.js +11 -7
  76. package/admin/src/pages/App/reducer/constants.d.ts +4 -0
  77. package/admin/src/pages/App/reducer/constants.js +7 -4
  78. package/admin/src/pages/App/reducer/index.d.ts +9 -0
  79. package/admin/src/pages/App/reducer/index.js +24 -22
  80. package/admin/src/pages/App/reducer/init.d.ts +3 -0
  81. package/admin/src/pages/App/reducer/init.js +6 -4
  82. package/admin/src/pages/App/reducer/selectors.d.ts +6 -0
  83. package/admin/src/pages/App/reducer/selectors.js +17 -34
  84. package/admin/src/pages/App/utils/api.d.ts +2 -0
  85. package/admin/src/pages/App/utils/api.js +14 -11
  86. package/admin/src/pages/ComingSoonPage/index.d.ts +3 -0
  87. package/admin/src/pages/ComingSoonPage/index.js +42 -24
  88. package/admin/src/pages/Details/components/DetailsEntity/index.d.ts +18 -0
  89. package/admin/src/pages/Details/components/DetailsEntity/index.js +49 -77
  90. package/admin/src/pages/Details/components/DetailsFilters/index.d.ts +12 -0
  91. package/admin/src/pages/Details/components/DetailsFilters/index.js +19 -26
  92. package/admin/src/pages/Details/components/DetailsFilters/styles.d.ts +2 -0
  93. package/admin/src/pages/Details/components/DetailsFilters/styles.js +14 -8
  94. package/admin/src/pages/Details/index.d.ts +4 -0
  95. package/admin/src/pages/Details/index.js +94 -133
  96. package/admin/src/pages/Discover/components/DiscoverTableRow/index.d.ts +20 -0
  97. package/admin/src/pages/Discover/components/DiscoverTableRow/index.js +128 -139
  98. package/admin/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +2 -0
  99. package/admin/src/pages/Discover/components/DiscoverTableRow/styles.js +14 -8
  100. package/admin/src/pages/Discover/index.d.ts +4 -0
  101. package/admin/src/pages/Discover/index.js +129 -170
  102. package/admin/src/pages/Discover/utils/api.d.ts +2 -0
  103. package/admin/src/pages/Discover/utils/api.js +15 -13
  104. package/admin/src/pages/Discover/utils/filtersSchema.d.ts +11 -0
  105. package/admin/src/pages/Discover/utils/filtersSchema.js +8 -6
  106. package/admin/src/pages/Settings/components/RestartAlert/styles.d.ts +2 -0
  107. package/admin/src/pages/Settings/components/RestartAlert/styles.js +14 -8
  108. package/admin/src/pages/Settings/index.d.ts +3 -0
  109. package/admin/src/pages/Settings/index.js +225 -391
  110. package/admin/src/pages/Settings/utils/api.d.ts +7 -0
  111. package/admin/src/pages/Settings/utils/api.js +60 -55
  112. package/admin/src/pages/utils/api.d.ts +12 -0
  113. package/admin/src/pages/utils/api.js +58 -53
  114. package/admin/src/permissions.d.ts +28 -0
  115. package/admin/src/permissions.js +31 -17
  116. package/admin/src/pluginId.d.ts +2 -0
  117. package/admin/src/pluginId.js +29 -5
  118. package/admin/src/reducers.d.ts +7 -0
  119. package/admin/src/reducers.js +10 -6
  120. package/admin/src/translations/en.json +131 -131
  121. package/admin/src/translations/fr.json +132 -1
  122. package/admin/src/translations/pt-BR.json +130 -130
  123. package/admin/src/utils/axiosInstance.d.ts +3 -0
  124. package/admin/src/utils/axiosInstance.js +21 -27
  125. package/admin/src/utils/constants.d.ts +25 -0
  126. package/admin/src/utils/constants.js +23 -22
  127. package/admin/src/utils/getApiUrl.d.ts +3 -0
  128. package/admin/src/utils/getApiUrl.js +6 -5
  129. package/admin/src/utils/getMessage.d.ts +4 -0
  130. package/admin/src/utils/getMessage.js +15 -15
  131. package/admin/src/utils/getRelatedGroups.d.ts +4 -0
  132. package/admin/src/utils/getRelatedGroups.js +5 -3
  133. package/admin/src/utils/getUrl.d.ts +3 -0
  134. package/admin/src/utils/getUrl.js +6 -5
  135. package/admin/src/utils/handleAPIError.d.ts +4 -0
  136. package/admin/src/utils/handleAPIError.js +12 -11
  137. package/admin/src/utils/index.d.ts +12 -0
  138. package/admin/src/utils/index.js +29 -11
  139. package/admin/src/utils/parseRegExp.d.ts +6 -0
  140. package/admin/src/utils/parseRegExp.js +6 -5
  141. package/admin/src/utils/renderEntryTitle.d.ts +4 -0
  142. package/admin/src/utils/renderEntryTitle.js +11 -12
  143. package/admin/src/utils/renderInitials.d.ts +3 -0
  144. package/admin/src/utils/renderInitials.js +10 -5
  145. package/admin/src/utils/resolveCommentStatus.d.ts +4 -0
  146. package/admin/src/utils/resolveCommentStatus.js +17 -21
  147. package/admin/src/utils/resolveCommentStatusColor.d.ts +4 -0
  148. package/admin/src/utils/resolveCommentStatusColor.js +19 -19
  149. package/content-types/comment.d.ts +91 -0
  150. package/content-types/comment.js +87 -88
  151. package/content-types/index.d.ts +143 -0
  152. package/content-types/index.js +15 -10
  153. package/content-types/report.d.ts +48 -0
  154. package/content-types/report.js +44 -49
  155. package/package.json +24 -19
  156. package/permissions.d.ts +18 -0
  157. package/permissions.js +12 -13
  158. package/server/bootstrap.d.ts +4 -0
  159. package/server/bootstrap.js +56 -62
  160. package/server/config/index.d.ts +4 -0
  161. package/server/config/index.js +17 -15
  162. package/server/controllers/admin.d.ts +4 -0
  163. package/server/controllers/admin.js +134 -167
  164. package/server/controllers/client.d.ts +4 -0
  165. package/server/controllers/client.js +120 -112
  166. package/server/controllers/index.d.ts +6 -0
  167. package/server/controllers/index.js +12 -8
  168. package/server/controllers/utils/functions.d.ts +7 -0
  169. package/server/controllers/utils/functions.js +22 -17
  170. package/server/controllers/utils/parsers.d.ts +10 -0
  171. package/server/controllers/utils/parsers.js +47 -19
  172. package/server/destroy.d.ts +3 -0
  173. package/server/destroy.js +3 -4
  174. package/server/graphql/index.d.ts +4 -0
  175. package/server/graphql/index.js +27 -25
  176. package/server/graphql/mutations/createAbuseReport.d.ts +11 -0
  177. package/server/graphql/mutations/createAbuseReport.js +22 -24
  178. package/server/graphql/mutations/createComment.d.ts +14 -0
  179. package/server/graphql/mutations/createComment.js +22 -24
  180. package/server/graphql/mutations/index.d.ts +4 -0
  181. package/server/graphql/mutations/index.js +24 -19
  182. package/server/graphql/mutations/removeComment.d.ts +11 -0
  183. package/server/graphql/mutations/removeComment.js +22 -24
  184. package/server/graphql/mutations/updateComment.d.ts +11 -0
  185. package/server/graphql/mutations/updateComment.js +22 -24
  186. package/server/graphql/queries/findAllFlat.d.ts +19 -0
  187. package/server/graphql/queries/findAllFlat.js +36 -34
  188. package/server/graphql/queries/findAllInHierarchy.d.ts +17 -0
  189. package/server/graphql/queries/findAllInHierarchy.js +30 -30
  190. package/server/graphql/queries/index.d.ts +4 -0
  191. package/server/graphql/queries/index.js +20 -17
  192. package/server/graphql/resolvers-config.d.ts +23 -0
  193. package/server/graphql/resolvers-config.js +11 -11
  194. package/server/graphql/types/comment-author.d.ts +4 -0
  195. package/server/graphql/types/comment-author.js +10 -8
  196. package/server/graphql/types/comment-nested.d.ts +4 -0
  197. package/server/graphql/types/comment-nested.js +17 -15
  198. package/server/graphql/types/comment.d.ts +4 -0
  199. package/server/graphql/types/comment.js +16 -14
  200. package/server/graphql/types/create-comment-author.d.ts +4 -0
  201. package/server/graphql/types/create-comment-author.js +10 -8
  202. package/server/graphql/types/create-comment.d.ts +4 -0
  203. package/server/graphql/types/create-comment.js +10 -8
  204. package/server/graphql/types/create-report.d.ts +4 -0
  205. package/server/graphql/types/create-report.js +10 -8
  206. package/server/graphql/types/id.d.ts +4 -0
  207. package/server/graphql/types/id.js +24 -23
  208. package/server/graphql/types/identify-comment-author.d.ts +4 -0
  209. package/server/graphql/types/identify-comment-author.js +7 -5
  210. package/server/graphql/types/index.d.ts +4 -0
  211. package/server/graphql/types/index.js +36 -17
  212. package/server/graphql/types/remove-comment.d.ts +4 -0
  213. package/server/graphql/types/remove-comment.js +9 -7
  214. package/server/graphql/types/report-reason.d.ts +4 -0
  215. package/server/graphql/types/report-reason.js +10 -8
  216. package/server/graphql/types/report.d.ts +4 -0
  217. package/server/graphql/types/report.js +12 -10
  218. package/server/graphql/types/response-find-all.d.ts +4 -0
  219. package/server/graphql/types/response-find-all.js +8 -6
  220. package/server/graphql/types/response-meta.d.ts +4 -0
  221. package/server/graphql/types/response-meta.js +7 -5
  222. package/server/graphql/types/response-pagination.d.ts +4 -0
  223. package/server/graphql/types/response-pagination.js +12 -10
  224. package/server/graphql/types/update-comment.d.ts +4 -0
  225. package/server/graphql/types/update-comment.js +10 -8
  226. package/server/index.d.ts +26 -0
  227. package/server/index.js +24 -21
  228. package/server/register.d.ts +3 -0
  229. package/server/register.js +3 -4
  230. package/server/routes/admin.d.ts +4 -0
  231. package/server/routes/admin.js +103 -109
  232. package/server/routes/client.d.ts +4 -0
  233. package/server/routes/client.js +84 -46
  234. package/server/routes/index.d.ts +11 -0
  235. package/server/routes/index.js +18 -14
  236. package/server/services/admin.d.ts +5 -0
  237. package/server/services/admin.js +134 -161
  238. package/server/services/client.d.ts +5 -0
  239. package/server/services/client.js +164 -168
  240. package/server/services/common.d.ts +5 -0
  241. package/server/services/common.js +192 -202
  242. package/server/services/graphql.d.ts +5 -0
  243. package/server/services/graphql.js +117 -182
  244. package/server/services/index.d.ts +8 -0
  245. package/server/services/index.js +15 -12
  246. package/server/services/utils/functions.d.ts +13 -0
  247. package/server/services/utils/functions.js +105 -109
  248. package/server/utils/constants.d.ts +9 -0
  249. package/server/utils/constants.js +19 -23
  250. package/server/utils/error.d.ts +19 -0
  251. package/server/utils/error.js +23 -18
  252. package/server/utils/functions.d.ts +6 -0
  253. package/server/utils/functions.js +35 -18
  254. package/strapi-admin.d.ts +3 -0
  255. package/strapi-admin.js +8 -3
  256. package/strapi-server.d.ts +177 -0
  257. package/strapi-server.js +43 -46
  258. package/tsconfig.tsbuildinfo +1 -0
  259. package/types/contentTypes.d.ts +48 -0
  260. package/types/contentTypes.js +3 -0
  261. package/.husky/pre-commit +0 -4
  262. package/LICENSE.md +0 -7
  263. package/__mocks__/initSetup.js +0 -108
  264. package/jest.config.js +0 -7
  265. package/server/controllers/utils/__tests__/functions.test.js +0 -43
  266. package/server/controllers/utils/__tests__/parsers.test.js +0 -94
  267. package/server/services/__tests__/common.test.js +0 -399
  268. package/server/services/utils/__tests__/functions.test.js +0 -53
  269. package/server/utils/__tests__/functions.test.js +0 -17
@@ -1,10 +1,11 @@
1
-
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  const parseRegExp = (regexpString) => {
3
- const [value, flags] = regexpString.split('/').filter(_ => _.length > 0);
4
+ const [value, flags] = regexpString.split("/").filter((_) => _.length > 0);
4
5
  return {
5
6
  value,
6
7
  flags,
7
8
  };
8
- }
9
-
10
- export default parseRegExp;
9
+ };
10
+ exports.default = parseRegExp;
11
+ //# sourceMappingURL=parseRegExp.js.map
@@ -0,0 +1,4 @@
1
+ import { ToBeFixed } from "../../../types";
2
+ declare const renderEntryTitle: (entry: ToBeFixed, config?: ToBeFixed) => any;
3
+ export default renderEntryTitle;
4
+ //# sourceMappingURL=renderEntryTitle.d.ts.map
@@ -1,14 +1,13 @@
1
- import { first } from 'lodash';
2
-
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lodash_1 = require("lodash");
3
4
  const renderEntryTitle = (entry, config = {}) => {
4
5
  const { entryLabel } = config;
5
- const rule = entry.uid in entryLabel ? entryLabel[entry.uid] : entryLabel['*'];
6
- return first(
7
- Object.keys(entry)
8
- .filter(_ => (rule === _) || rule.includes(_))
9
- .map(_ => entry[_])
10
- .filter(_ => _)
11
- );
12
- };
13
-
14
- export default renderEntryTitle;
6
+ const rule = entry.uid in entryLabel ? entryLabel[entry.uid] : entryLabel["*"];
7
+ return (0, lodash_1.first)(Object.keys(entry)
8
+ .filter((_) => rule === _ || rule.includes(_))
9
+ .map((_) => entry[_])
10
+ .filter((_) => _));
11
+ };
12
+ exports.default = renderEntryTitle;
13
+ //# sourceMappingURL=renderEntryTitle.js.map
@@ -0,0 +1,3 @@
1
+ declare const renderInitials: (value?: string) => string;
2
+ export default renderInitials;
3
+ //# sourceMappingURL=renderInitials.d.ts.map
@@ -1,5 +1,10 @@
1
- import { first } from 'lodash';
2
-
3
- const renderInitials = (value = '') => value.split(' ').map(_ => first(_)).join('').toUpperCase();
4
-
5
- export default renderInitials;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lodash_1 = require("lodash");
4
+ const renderInitials = (value = "") => value
5
+ .split(" ")
6
+ .map((_) => (0, lodash_1.first)(_))
7
+ .join("")
8
+ .toUpperCase();
9
+ exports.default = renderInitials;
10
+ //# sourceMappingURL=renderInitials.js.map
@@ -0,0 +1,4 @@
1
+ import { ToBeFixed } from "../../../types";
2
+ declare const resolveCommentStatus: ({ removed, blocked, blockedThread, approvalStatus, reviewFlowEnabled, }: ToBeFixed) => any;
3
+ export default resolveCommentStatus;
4
+ //# sourceMappingURL=resolveCommentStatus.d.ts.map
@@ -1,30 +1,26 @@
1
- import { isNil } from 'lodash';
2
- import { COMMENT_STATUS } from './constants';
3
-
4
- const resolveCommentStatus = ({ removed, blocked, blockedThread, approvalStatus, reviewFlowEnabled }) => {
5
- const gotApprovalFlow = !isNil(approvalStatus);
6
-
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lodash_1 = require("lodash");
4
+ const constants_1 = require("./constants");
5
+ const resolveCommentStatus = ({ removed, blocked, blockedThread, approvalStatus, reviewFlowEnabled, }) => {
6
+ const gotApprovalFlow = !(0, lodash_1.isNil)(approvalStatus);
7
7
  if (removed) {
8
- return COMMENT_STATUS.REMOVED;
9
- }
10
-
8
+ return constants_1.COMMENT_STATUS.REMOVED;
9
+ }
11
10
  if (blocked || blockedThread) {
12
- return COMMENT_STATUS.BLOCKED;
13
- }
14
-
11
+ return constants_1.COMMENT_STATUS.BLOCKED;
12
+ }
15
13
  if (reviewFlowEnabled) {
16
- return COMMENT_STATUS.TO_REVIEW;
14
+ return constants_1.COMMENT_STATUS.TO_REVIEW;
17
15
  }
18
-
19
16
  if (gotApprovalFlow) {
20
17
  const status = approvalStatus.toUpperCase();
21
- if (Object.keys(COMMENT_STATUS).includes(status)) {
18
+ if (Object.keys(constants_1.COMMENT_STATUS).includes(status)) {
22
19
  return status;
23
20
  }
24
- return COMMENT_STATUS.UNKNOWN;
21
+ return constants_1.COMMENT_STATUS.UNKNOWN;
25
22
  }
26
-
27
- return COMMENT_STATUS.OPEN;
28
- }
29
-
30
- export default resolveCommentStatus;
23
+ return constants_1.COMMENT_STATUS.OPEN;
24
+ };
25
+ exports.default = resolveCommentStatus;
26
+ //# sourceMappingURL=resolveCommentStatus.js.map
@@ -0,0 +1,4 @@
1
+ import { ToBeFixed } from "../../../types";
2
+ declare const resolveCommentStatusColor: (status: ToBeFixed) => "warning" | "secondary" | "danger" | "success";
3
+ export default resolveCommentStatusColor;
4
+ //# sourceMappingURL=resolveCommentStatusColor.d.ts.map
@@ -1,22 +1,22 @@
1
- import { isNil } from 'lodash';
2
- import { COMMENT_STATUS } from './constants';
3
-
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const constants_1 = require("./constants");
4
4
  const resolveCommentStatusColor = (status) => {
5
- if (Object.keys(COMMENT_STATUS).includes(status)) {
5
+ if (Object.keys(constants_1.COMMENT_STATUS).includes(status)) {
6
6
  switch (status) {
7
- case COMMENT_STATUS.REMOVED:
8
- return 'secondary';
9
- case COMMENT_STATUS.TO_REVIEW:
10
- case COMMENT_STATUS.REJECTED:
11
- return 'warning';
12
- case COMMENT_STATUS.BLOCKED:
13
- return 'danger';
14
- case COMMENT_STATUS.OPEN:
15
- case COMMENT_STATUS.APPROVED:
16
- return 'success';
17
- };
7
+ case constants_1.COMMENT_STATUS.REMOVED:
8
+ return "secondary";
9
+ case constants_1.COMMENT_STATUS.TO_REVIEW:
10
+ case constants_1.COMMENT_STATUS.REJECTED:
11
+ return "warning";
12
+ case constants_1.COMMENT_STATUS.BLOCKED:
13
+ return "danger";
14
+ case constants_1.COMMENT_STATUS.OPEN:
15
+ case constants_1.COMMENT_STATUS.APPROVED:
16
+ return "success";
17
+ }
18
18
  }
19
- return 'secondary';
20
- }
21
-
22
- export default resolveCommentStatusColor;
19
+ return "secondary";
20
+ };
21
+ exports.default = resolveCommentStatusColor;
22
+ //# sourceMappingURL=resolveCommentStatusColor.js.map
@@ -0,0 +1,91 @@
1
+ declare const _default: {
2
+ info: {
3
+ tableName: string;
4
+ singularName: string;
5
+ pluralName: string;
6
+ displayName: string;
7
+ description: string;
8
+ kind: string;
9
+ };
10
+ options: {
11
+ draftAndPublish: boolean;
12
+ };
13
+ pluginOptions: {
14
+ "content-manager": {
15
+ visible: boolean;
16
+ };
17
+ "content-type-builder": {
18
+ visible: boolean;
19
+ };
20
+ };
21
+ attributes: {
22
+ content: {
23
+ type: string;
24
+ configurable: boolean;
25
+ required: boolean;
26
+ };
27
+ blocked: {
28
+ type: string;
29
+ default: boolean;
30
+ configurable: boolean;
31
+ };
32
+ blockedThread: {
33
+ type: string;
34
+ default: boolean;
35
+ configurable: boolean;
36
+ };
37
+ blockReason: {
38
+ type: string;
39
+ configurable: boolean;
40
+ };
41
+ authorUser: {
42
+ type: string;
43
+ relation: string;
44
+ target: string;
45
+ configurable: boolean;
46
+ };
47
+ authorId: {
48
+ type: string;
49
+ configurable: boolean;
50
+ };
51
+ authorName: {
52
+ type: string;
53
+ configurable: boolean;
54
+ };
55
+ authorEmail: {
56
+ type: string;
57
+ configurable: boolean;
58
+ };
59
+ authorAvatar: {
60
+ type: string;
61
+ configurable: boolean;
62
+ };
63
+ removed: {
64
+ type: string;
65
+ configurable: boolean;
66
+ };
67
+ approvalStatus: {
68
+ type: string;
69
+ configurable: boolean;
70
+ };
71
+ related: {
72
+ type: string;
73
+ configurable: boolean;
74
+ };
75
+ reports: {
76
+ type: string;
77
+ relation: string;
78
+ target: string;
79
+ mappedBy: string;
80
+ configurable: boolean;
81
+ };
82
+ threadOf: {
83
+ type: string;
84
+ relation: string;
85
+ target: string;
86
+ configurable: boolean;
87
+ };
88
+ };
89
+ };
90
+ export default _default;
91
+ //# sourceMappingURL=comment.d.ts.map
@@ -1,93 +1,92 @@
1
- /**
2
- * Comments Collection Type
3
- */
4
-
5
- module.exports = {
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
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ info: {
5
+ tableName: "plugin-comments-comments",
6
+ singularName: "comment",
7
+ pluralName: "comments",
8
+ displayName: "Comment",
9
+ description: "Comment content type",
10
+ kind: "collectionType",
20
11
  },
21
- 'content-type-builder': {
22
- visible: false
23
- }
24
- },
25
- attributes: {
26
- content: {
27
- type: 'text',
28
- configurable: false,
29
- required: true
12
+ options: {
13
+ draftAndPublish: false,
30
14
  },
31
- blocked: {
32
- type: 'boolean',
33
- default: false,
34
- configurable: false
15
+ pluginOptions: {
16
+ "content-manager": {
17
+ visible: false,
18
+ },
19
+ "content-type-builder": {
20
+ visible: false,
21
+ },
35
22
  },
36
- blockedThread: {
37
- type: 'boolean',
38
- default: false,
39
- configurable: false
23
+ attributes: {
24
+ content: {
25
+ type: "text",
26
+ configurable: false,
27
+ required: true,
28
+ },
29
+ blocked: {
30
+ type: "boolean",
31
+ default: false,
32
+ configurable: false,
33
+ },
34
+ blockedThread: {
35
+ type: "boolean",
36
+ default: false,
37
+ configurable: false,
38
+ },
39
+ blockReason: {
40
+ type: "string",
41
+ configurable: false,
42
+ },
43
+ authorUser: {
44
+ type: "relation",
45
+ relation: "oneToOne",
46
+ target: "plugin::users-permissions.user",
47
+ configurable: false,
48
+ },
49
+ authorId: {
50
+ type: "string",
51
+ configurable: false,
52
+ },
53
+ authorName: {
54
+ type: "string",
55
+ configurable: false,
56
+ },
57
+ authorEmail: {
58
+ type: "email",
59
+ configurable: false,
60
+ },
61
+ authorAvatar: {
62
+ type: "string",
63
+ configurable: false,
64
+ },
65
+ removed: {
66
+ type: "boolean",
67
+ configurable: false,
68
+ },
69
+ approvalStatus: {
70
+ type: "string",
71
+ configurable: false,
72
+ },
73
+ related: {
74
+ type: "string",
75
+ configurable: false,
76
+ },
77
+ reports: {
78
+ type: "relation",
79
+ relation: "oneToMany",
80
+ target: "plugin::comments.comment-report",
81
+ mappedBy: "related",
82
+ configurable: false,
83
+ },
84
+ threadOf: {
85
+ type: "relation",
86
+ relation: "oneToOne",
87
+ target: "plugin::comments.comment",
88
+ configurable: false,
89
+ },
40
90
  },
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
91
  };
92
+ //# sourceMappingURL=comment.js.map
@@ -0,0 +1,143 @@
1
+ declare const _default: {
2
+ comment: {
3
+ schema: {
4
+ info: {
5
+ tableName: string;
6
+ singularName: string;
7
+ pluralName: string;
8
+ displayName: string;
9
+ description: string;
10
+ kind: string;
11
+ };
12
+ options: {
13
+ draftAndPublish: boolean;
14
+ };
15
+ pluginOptions: {
16
+ "content-manager": {
17
+ visible: boolean;
18
+ };
19
+ "content-type-builder": {
20
+ visible: boolean;
21
+ };
22
+ };
23
+ attributes: {
24
+ content: {
25
+ type: string;
26
+ configurable: boolean;
27
+ required: boolean;
28
+ };
29
+ blocked: {
30
+ type: string;
31
+ default: boolean;
32
+ configurable: boolean;
33
+ };
34
+ blockedThread: {
35
+ type: string;
36
+ default: boolean;
37
+ configurable: boolean;
38
+ };
39
+ blockReason: {
40
+ type: string;
41
+ configurable: boolean;
42
+ };
43
+ authorUser: {
44
+ type: string;
45
+ relation: string;
46
+ target: string;
47
+ configurable: boolean;
48
+ };
49
+ authorId: {
50
+ type: string;
51
+ configurable: boolean;
52
+ };
53
+ authorName: {
54
+ type: string;
55
+ configurable: boolean;
56
+ };
57
+ authorEmail: {
58
+ type: string;
59
+ configurable: boolean;
60
+ };
61
+ authorAvatar: {
62
+ type: string;
63
+ configurable: boolean;
64
+ };
65
+ removed: {
66
+ type: string;
67
+ configurable: boolean;
68
+ };
69
+ approvalStatus: {
70
+ type: string;
71
+ configurable: boolean;
72
+ };
73
+ related: {
74
+ type: string;
75
+ configurable: boolean;
76
+ };
77
+ reports: {
78
+ type: string;
79
+ relation: string;
80
+ target: string;
81
+ mappedBy: string;
82
+ configurable: boolean;
83
+ };
84
+ threadOf: {
85
+ type: string;
86
+ relation: string;
87
+ target: string;
88
+ configurable: boolean;
89
+ };
90
+ };
91
+ };
92
+ };
93
+ "comment-report": {
94
+ schema: {
95
+ info: {
96
+ tableName: string;
97
+ singularName: string;
98
+ pluralName: string;
99
+ displayName: string;
100
+ description: string;
101
+ kind: string;
102
+ };
103
+ options: {
104
+ draftAndPublish: boolean;
105
+ };
106
+ pluginOptions: {
107
+ "content-manager": {
108
+ visible: boolean;
109
+ };
110
+ "content-type-builder": {
111
+ visible: boolean;
112
+ };
113
+ };
114
+ attributes: {
115
+ content: {
116
+ type: string;
117
+ configurable: boolean;
118
+ };
119
+ reason: {
120
+ type: string;
121
+ enum: string[];
122
+ default: string;
123
+ configurable: boolean;
124
+ required: boolean;
125
+ };
126
+ resolved: {
127
+ type: string;
128
+ default: boolean;
129
+ configurable: boolean;
130
+ };
131
+ related: {
132
+ type: string;
133
+ relation: string;
134
+ target: string;
135
+ inversedBy: string;
136
+ configurable: boolean;
137
+ };
138
+ };
139
+ };
140
+ };
141
+ };
142
+ export default _default;
143
+ //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1,16 @@
1
- const CommentCT = require('./comment');
2
- const ReportCT = require('./report');
3
-
4
- module.exports = {
5
- 'comment': {
6
- schema: CommentCT,
7
- },
8
- 'comment-report': {
9
- schema: ReportCT,
10
- },
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
4
  };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const comment_1 = __importDefault(require("./comment"));
7
+ const report_1 = __importDefault(require("./report"));
8
+ exports.default = {
9
+ comment: {
10
+ schema: comment_1.default,
11
+ },
12
+ "comment-report": {
13
+ schema: report_1.default,
14
+ },
15
+ };
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,48 @@
1
+ declare const _default: {
2
+ info: {
3
+ tableName: string;
4
+ singularName: string;
5
+ pluralName: string;
6
+ displayName: string;
7
+ description: string;
8
+ kind: string;
9
+ };
10
+ options: {
11
+ draftAndPublish: boolean;
12
+ };
13
+ pluginOptions: {
14
+ "content-manager": {
15
+ visible: boolean;
16
+ };
17
+ "content-type-builder": {
18
+ visible: boolean;
19
+ };
20
+ };
21
+ attributes: {
22
+ content: {
23
+ type: string;
24
+ configurable: boolean;
25
+ };
26
+ reason: {
27
+ type: string;
28
+ enum: string[];
29
+ default: string;
30
+ configurable: boolean;
31
+ required: boolean;
32
+ };
33
+ resolved: {
34
+ type: string;
35
+ default: boolean;
36
+ configurable: boolean;
37
+ };
38
+ related: {
39
+ type: string;
40
+ relation: string;
41
+ target: string;
42
+ inversedBy: string;
43
+ configurable: boolean;
44
+ };
45
+ };
46
+ };
47
+ export default _default;
48
+ //# sourceMappingURL=report.d.ts.map