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.
- package/README.md +1 -1
- package/admin/src/components/ActionButton/styles.d.ts +1 -1
- package/admin/src/components/AdminAvatar/index.d.ts +4 -0
- package/admin/src/components/AdminAvatar/index.js +17 -0
- package/admin/src/components/AdminAvatar/styles.d.ts +3 -0
- package/admin/src/components/AdminAvatar/styles.js +17 -0
- package/admin/src/components/Avatar/index.d.ts +8 -11
- package/admin/src/components/Avatar/index.js +7 -8
- package/admin/src/components/DiscussionThreadItem/styles.d.ts +3 -3
- package/admin/src/components/DiscussionThreadItemActions/styles.d.ts +1 -1
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +1 -1
- package/admin/src/components/DiscussionThreadItemFooter/styles.d.ts +2 -2
- package/admin/src/components/FormSwitch/styles.d.ts +1 -1
- package/admin/src/components/Hint/index.d.ts +1 -1
- package/admin/src/components/IconButton/styles.d.ts +1 -1
- package/admin/src/components/LoadingIndicatorOverlay/styles.d.ts +2 -2
- package/admin/src/components/ModeratorResponse/index.d.ts +1 -1
- package/admin/src/components/ModeratorResponse/styles.d.ts +1 -1
- package/admin/src/components/ModeratorResponseModal/ModeratorResponseModal.d.ts +1 -1
- package/admin/src/components/PreviewWysiwyg/Wrapper.d.ts +1 -1
- package/admin/src/components/PreviewWysiwyg/index.d.ts +1 -1
- package/admin/src/components/StatusBadge/styles.d.ts +1 -1
- package/admin/src/components/Wysiwyg/Editor.d.ts +1 -1
- package/admin/src/components/Wysiwyg/EditorLayout.d.ts +2 -2
- package/admin/src/components/Wysiwyg/EditorStylesContainer.d.ts +1 -1
- package/admin/src/components/Wysiwyg/WysiwygFooter.d.ts +1 -1
- package/admin/src/components/Wysiwyg/WysiwygNav.d.ts +1 -1
- package/admin/src/components/Wysiwyg/WysiwygStyles.d.ts +7 -7
- package/admin/src/components/Wysiwyg/index.d.ts +1 -1
- package/admin/src/components/icons/strapiIcons.d.ts +1 -0
- package/admin/src/components/icons/strapiIcons.js +2 -1
- package/admin/src/custom-fields/comments/components/input/consts.d.ts +3 -0
- package/admin/src/custom-fields/comments/components/input/consts.js +9 -0
- package/admin/src/custom-fields/comments/components/input/input.js +2 -6
- package/admin/src/custom-fields/comments/components/input/types.d.ts +2 -2
- package/admin/src/custom-fields/comments/components/input/utils.js +8 -1
- package/admin/src/index.js +2 -1
- package/admin/src/pages/Details/components/DetailsFilters/styles.d.ts +1 -1
- package/admin/src/pages/Discover/components/DiscoverTableRow/index.js +12 -11
- package/admin/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +1 -1
- package/admin/src/pages/Discover/utils/filtersSchema.d.ts +17 -2
- package/admin/src/pages/Discover/utils/filtersSchema.js +28 -0
- package/admin/src/pages/Reports/components/ReportsTableRow/styles.d.ts +1 -1
- package/admin/src/pages/Reports/utils/filtersSchema.d.ts +17 -2
- package/admin/src/pages/Reports/utils/filtersSchema.js +21 -0
- package/admin/src/pages/Settings/components/RestartAlert/styles.d.ts +1 -1
- package/admin/src/utils/getRelatedGroups.d.ts +1 -1
- package/admin/src/utils/resolveCommentStatus.d.ts +1 -1
- package/content-types/comment.d.ts +4 -0
- package/content-types/comment.js +4 -0
- package/content-types/index.d.ts +4 -0
- package/package.json +6 -4
- package/server/controllers/index.d.ts +1 -1
- package/server/controllers/utils/functions.d.ts +1 -1
- package/server/graphql/mutations/createComment.d.ts +1 -1
- package/server/graphql/queries/findAllFlat.d.ts +1 -1
- package/server/graphql/queries/findAllInHierarchy.d.ts +1 -1
- package/server/routes/index.d.ts +2 -2
- package/server/services/admin.js +33 -14
- package/server/services/client.js +4 -1
- package/server/services/utils/functions.d.ts +2 -1
- package/server/services/utils/functions.js +9 -1
- package/server/utils/error.d.ts +1 -1
- package/strapi-server.d.ts +4 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/types/contentTypes.d.ts +10 -9
- package/types/utils.d.ts +2 -2
package/types/contentTypes.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnlyStrings, StrapiUser, StringMap } from "strapi-typed";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
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
|
|
20
|
-
|
|
21
|
-
export
|
|
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
|
|
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
|
|
35
|
-
export
|
|
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
|
|
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
|
|
4
|
-
export
|
|
3
|
+
export type Effect<T> = (value: T) => void;
|
|
4
|
+
export type VoidEffect = Effect<void>;
|
|
5
5
|
//# sourceMappingURL=utils.d.ts.map
|