strapi-plugin-comments 2.2.1 → 2.2.3

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 (67) hide show
  1. package/README.md +1 -1
  2. package/admin/src/components/ActionButton/styles.d.ts +1 -1
  3. package/admin/src/components/AdminAvatar/index.d.ts +4 -0
  4. package/admin/src/components/AdminAvatar/index.js +17 -0
  5. package/admin/src/components/AdminAvatar/styles.d.ts +3 -0
  6. package/admin/src/components/AdminAvatar/styles.js +17 -0
  7. package/admin/src/components/Avatar/index.d.ts +8 -11
  8. package/admin/src/components/Avatar/index.js +7 -8
  9. package/admin/src/components/DiscussionThreadItem/styles.d.ts +3 -3
  10. package/admin/src/components/DiscussionThreadItemActions/styles.d.ts +1 -1
  11. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +1 -1
  12. package/admin/src/components/DiscussionThreadItemFooter/styles.d.ts +2 -2
  13. package/admin/src/components/FormSwitch/styles.d.ts +1 -1
  14. package/admin/src/components/Hint/index.d.ts +1 -1
  15. package/admin/src/components/IconButton/styles.d.ts +1 -1
  16. package/admin/src/components/LoadingIndicatorOverlay/styles.d.ts +2 -2
  17. package/admin/src/components/ModeratorResponse/index.d.ts +1 -1
  18. package/admin/src/components/ModeratorResponse/styles.d.ts +1 -1
  19. package/admin/src/components/ModeratorResponseModal/ModeratorResponseModal.d.ts +1 -1
  20. package/admin/src/components/PreviewWysiwyg/Wrapper.d.ts +1 -1
  21. package/admin/src/components/PreviewWysiwyg/index.d.ts +1 -1
  22. package/admin/src/components/StatusBadge/styles.d.ts +1 -1
  23. package/admin/src/components/Wysiwyg/Editor.d.ts +1 -1
  24. package/admin/src/components/Wysiwyg/EditorLayout.d.ts +2 -2
  25. package/admin/src/components/Wysiwyg/EditorStylesContainer.d.ts +1 -1
  26. package/admin/src/components/Wysiwyg/WysiwygFooter.d.ts +1 -1
  27. package/admin/src/components/Wysiwyg/WysiwygNav.d.ts +1 -1
  28. package/admin/src/components/Wysiwyg/WysiwygStyles.d.ts +7 -7
  29. package/admin/src/components/Wysiwyg/index.d.ts +1 -1
  30. package/admin/src/components/icons/strapiIcons.d.ts +1 -0
  31. package/admin/src/components/icons/strapiIcons.js +2 -1
  32. package/admin/src/custom-fields/comments/components/input/consts.d.ts +3 -0
  33. package/admin/src/custom-fields/comments/components/input/consts.js +9 -0
  34. package/admin/src/custom-fields/comments/components/input/input.js +2 -6
  35. package/admin/src/custom-fields/comments/components/input/types.d.ts +2 -2
  36. package/admin/src/custom-fields/comments/components/input/utils.js +8 -1
  37. package/admin/src/index.js +2 -1
  38. package/admin/src/pages/Details/components/DetailsFilters/styles.d.ts +1 -1
  39. package/admin/src/pages/Discover/components/DiscoverTableRow/index.js +12 -11
  40. package/admin/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +1 -1
  41. package/admin/src/pages/Discover/utils/filtersSchema.d.ts +17 -2
  42. package/admin/src/pages/Discover/utils/filtersSchema.js +28 -0
  43. package/admin/src/pages/Reports/components/ReportsTableRow/styles.d.ts +1 -1
  44. package/admin/src/pages/Reports/utils/filtersSchema.d.ts +17 -2
  45. package/admin/src/pages/Reports/utils/filtersSchema.js +21 -0
  46. package/admin/src/pages/Settings/components/RestartAlert/styles.d.ts +1 -1
  47. package/admin/src/utils/getRelatedGroups.d.ts +1 -1
  48. package/admin/src/utils/resolveCommentStatus.d.ts +1 -1
  49. package/content-types/comment.d.ts +4 -0
  50. package/content-types/comment.js +4 -0
  51. package/content-types/index.d.ts +4 -0
  52. package/package.json +6 -4
  53. package/server/controllers/index.d.ts +1 -1
  54. package/server/controllers/utils/functions.d.ts +1 -1
  55. package/server/graphql/mutations/createComment.d.ts +1 -1
  56. package/server/graphql/queries/findAllFlat.d.ts +1 -1
  57. package/server/graphql/queries/findAllInHierarchy.d.ts +1 -1
  58. package/server/routes/index.d.ts +2 -2
  59. package/server/services/admin.js +33 -14
  60. package/server/services/client.js +4 -1
  61. package/server/services/utils/functions.d.ts +2 -1
  62. package/server/services/utils/functions.js +9 -1
  63. package/server/utils/error.d.ts +1 -1
  64. package/strapi-server.d.ts +4 -0
  65. package/tsconfig.tsbuildinfo +1 -1
  66. package/types/contentTypes.d.ts +10 -9
  67. package/types/utils.d.ts +2 -2
@@ -1,6 +1,6 @@
1
1
  import { OnlyStrings, StrapiUser, StringMap } from "strapi-typed";
2
- export declare type Id = number | string;
3
- export declare type Comment<TAuthor = CommentAuthor> = {
2
+ export type Id = number | string;
3
+ export type Comment<TAuthor = CommentAuthor> = {
4
4
  id: Id;
5
5
  content: string;
6
6
  author?: TAuthor;
@@ -15,31 +15,32 @@ export declare type Comment<TAuthor = CommentAuthor> = {
15
15
  approvalStatus?: CommentApprovalStatus | null;
16
16
  firstThreadItemId?: Id;
17
17
  threadFirstItemId?: Id;
18
+ isAdminComment?: boolean;
18
19
  } & CommentAuthorPartial;
19
- export declare type CommentModelKeys = OnlyStrings<keyof Comment>;
20
- declare type CommentApprovalStatus = "PENDING" | "APPROVED" | "REJECTED";
21
- export declare type CommentAuthor = {
20
+ export type CommentModelKeys = OnlyStrings<keyof Comment>;
21
+ type CommentApprovalStatus = "PENDING" | "APPROVED" | "REJECTED";
22
+ export type CommentAuthor = {
22
23
  id: Id;
23
24
  name?: string;
24
25
  email?: string;
25
26
  avatar?: string | object;
26
27
  };
27
- export declare type CommentAuthorPartial = {
28
+ export type CommentAuthorPartial = {
28
29
  authorId?: Id;
29
30
  authorName?: string;
30
31
  authorEmail?: string;
31
32
  authorAvatar?: string;
32
33
  authorUser?: StrapiUser;
33
34
  };
34
- export declare type CommentAuthorResolved<TExtension = StringMap<unknown>> = CommentAuthor & TExtension;
35
- export declare type CommentReport = {
35
+ export type CommentAuthorResolved<TExtension = StringMap<unknown>> = CommentAuthor & TExtension;
36
+ export type CommentReport = {
36
37
  id: Id;
37
38
  related: Comment | Id;
38
39
  reason: any;
39
40
  content: string;
40
41
  resolved: boolean;
41
42
  };
42
- export declare type RelatedEntity = {
43
+ export type RelatedEntity = {
43
44
  id: Id;
44
45
  uid: string;
45
46
  requireCommentsApproval?: boolean;
package/types/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Comment } from "./contentTypes";
2
2
  export declare function assertComment(value: any): asserts value is Comment;
3
- export declare type Effect<T> = (value: T) => void;
4
- export declare type VoidEffect = Effect<void>;
3
+ export type Effect<T> = (value: T) => void;
4
+ export type VoidEffect = Effect<void>;
5
5
  //# sourceMappingURL=utils.d.ts.map