strapi-plugin-comments 2.1.2 → 2.1.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/{build/admin → admin}/src/components/ActionButton/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/ActionButton/styles.js +0 -0
- package/{build/admin → admin}/src/components/Avatar/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/Avatar/index.js +0 -0
- package/{build/admin → admin}/src/components/ConfirmationDialog/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/ConfirmationDialog/index.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionStatus/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionStatus/index.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThread/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThread/index.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItem/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItem/index.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItem/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItem/styles.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemActions/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemActions/index.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemActions/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemActions/styles.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/index.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemApprovalFlowActions/styles.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/index.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemFooter/styles.js +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemReviewAction/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/DiscussionThreadItemReviewAction/index.js +0 -0
- package/{build/admin → admin}/src/components/FormSwitch/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/FormSwitch/index.js +0 -0
- package/{build/admin → admin}/src/components/FormSwitch/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/FormSwitch/styles.js +0 -0
- package/{build/admin → admin}/src/components/IconButton/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/IconButton/styles.js +0 -0
- package/{build/admin → admin}/src/components/Initializer/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/Initializer/index.js +0 -0
- package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/index.js +0 -0
- package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/LoadingIndicatorOverlay/styles.js +0 -0
- package/{build/admin → admin}/src/components/Nav/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/Nav/index.js +0 -0
- package/{build/admin → admin}/src/components/PluginIcon/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/PluginIcon/index.js +0 -0
- package/{build/admin → admin}/src/components/ReportsReviewModal/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/ReportsReviewModal/index.js +0 -0
- package/{build/admin → admin}/src/components/ReportsReviewTable/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/ReportsReviewTable/index.js +0 -0
- package/{build/admin → admin}/src/components/StatusBadge/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/StatusBadge/index.js +0 -0
- package/{build/admin → admin}/src/components/StatusBadge/styles.d.ts +0 -0
- package/{build/admin → admin}/src/components/StatusBadge/styles.js +0 -0
- package/{build/admin → admin}/src/components/TableFilters/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/TableFilters/index.js +0 -0
- package/{build/admin → admin}/src/components/TablePagination/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/TablePagination/index.js +0 -0
- package/{build/admin → admin}/src/components/icons/comments.d.ts +0 -0
- package/{build/admin → admin}/src/components/icons/comments.js +0 -0
- package/{build/admin → admin}/src/components/icons/index.d.ts +0 -0
- package/{build/admin → admin}/src/components/icons/index.js +0 -0
- package/{build/admin → admin}/src/components/icons/lock.d.ts +0 -0
- package/{build/admin → admin}/src/components/icons/lock.js +0 -0
- package/{build/admin → admin}/src/components/icons/review.d.ts +0 -0
- package/{build/admin → admin}/src/components/icons/review.js +0 -0
- package/{build/admin → admin}/src/components/icons/unlock.d.ts +0 -0
- package/{build/admin → admin}/src/components/icons/unlock.js +0 -0
- package/{build/admin → admin}/src/hooks/useConfig.d.ts +0 -0
- package/{build/admin → admin}/src/hooks/useConfig.js +0 -0
- package/{build/admin → admin}/src/index.d.ts +0 -0
- package/{build/admin → admin}/src/index.js +0 -0
- package/{build/admin → admin}/src/pages/App/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/App/index.js +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/actions.d.ts +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/actions.js +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/constants.d.ts +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/constants.js +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/index.js +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/init.d.ts +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/init.js +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/selectors.d.ts +0 -0
- package/{build/admin → admin}/src/pages/App/reducer/selectors.js +0 -0
- package/{build/admin → admin}/src/pages/App/utils/api.d.ts +0 -0
- package/{build/admin → admin}/src/pages/App/utils/api.js +0 -0
- package/{build/admin → admin}/src/pages/ComingSoonPage/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/ComingSoonPage/index.js +0 -0
- package/{build/admin → admin}/src/pages/Details/components/DetailsEntity/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Details/components/DetailsEntity/index.js +0 -0
- package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/index.js +0 -0
- package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/styles.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Details/components/DetailsFilters/styles.js +0 -0
- package/{build/admin → admin}/src/pages/Details/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Details/index.js +0 -0
- package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/index.js +0 -0
- package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Discover/components/DiscoverTableRow/styles.js +0 -0
- package/{build/admin → admin}/src/pages/Discover/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Discover/index.js +0 -0
- package/{build/admin → admin}/src/pages/Discover/utils/api.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Discover/utils/api.js +0 -0
- package/{build/admin → admin}/src/pages/Discover/utils/filtersSchema.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Discover/utils/filtersSchema.js +0 -0
- package/{build/admin → admin}/src/pages/Settings/components/RestartAlert/styles.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Settings/components/RestartAlert/styles.js +0 -0
- package/{build/admin → admin}/src/pages/Settings/index.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Settings/index.js +0 -0
- package/{build/admin → admin}/src/pages/Settings/utils/api.d.ts +0 -0
- package/{build/admin → admin}/src/pages/Settings/utils/api.js +0 -0
- package/{build/admin → admin}/src/pages/utils/api.d.ts +0 -0
- package/{build/admin → admin}/src/pages/utils/api.js +0 -0
- package/{build/admin → admin}/src/permissions.d.ts +0 -0
- package/{build/admin → admin}/src/permissions.js +0 -0
- package/{build/admin → admin}/src/pluginId.d.ts +0 -0
- package/{build/admin → admin}/src/pluginId.js +0 -0
- package/{build/admin → admin}/src/reducers.d.ts +0 -0
- package/{build/admin → admin}/src/reducers.js +0 -0
- package/{build/admin → admin}/src/utils/axiosInstance.d.ts +0 -0
- package/{build/admin → admin}/src/utils/axiosInstance.js +0 -0
- package/{build/admin → admin}/src/utils/constants.d.ts +0 -0
- package/{build/admin → admin}/src/utils/constants.js +0 -0
- package/{build/admin → admin}/src/utils/getApiUrl.d.ts +0 -0
- package/{build/admin → admin}/src/utils/getApiUrl.js +0 -0
- package/{build/admin → admin}/src/utils/getMessage.d.ts +0 -0
- package/{build/admin → admin}/src/utils/getMessage.js +0 -0
- package/{build/admin → admin}/src/utils/getRelatedGroups.d.ts +0 -0
- package/{build/admin → admin}/src/utils/getRelatedGroups.js +0 -0
- package/{build/admin → admin}/src/utils/getUrl.d.ts +0 -0
- package/{build/admin → admin}/src/utils/getUrl.js +0 -0
- package/{build/admin → admin}/src/utils/handleAPIError.d.ts +0 -0
- package/{build/admin → admin}/src/utils/handleAPIError.js +0 -0
- package/{build/admin → admin}/src/utils/index.d.ts +0 -0
- package/{build/admin → admin}/src/utils/index.js +0 -0
- package/{build/admin → admin}/src/utils/parseRegExp.d.ts +0 -0
- package/{build/admin → admin}/src/utils/parseRegExp.js +0 -0
- package/{build/admin → admin}/src/utils/renderEntryTitle.d.ts +0 -0
- package/{build/admin → admin}/src/utils/renderEntryTitle.js +0 -0
- package/{build/admin → admin}/src/utils/renderInitials.d.ts +0 -0
- package/{build/admin → admin}/src/utils/renderInitials.js +0 -0
- package/{build/admin → admin}/src/utils/resolveCommentStatus.d.ts +0 -0
- package/{build/admin → admin}/src/utils/resolveCommentStatus.js +0 -0
- package/{build/admin → admin}/src/utils/resolveCommentStatusColor.d.ts +0 -0
- package/{build/admin → admin}/src/utils/resolveCommentStatusColor.js +0 -0
- package/{build/content-types → content-types}/comment.d.ts +0 -0
- package/{build/content-types → content-types}/comment.js +0 -0
- package/{build/content-types → content-types}/index.d.ts +0 -0
- package/{build/content-types → content-types}/index.js +0 -0
- package/{build/content-types → content-types}/report.d.ts +0 -0
- package/{build/content-types → content-types}/report.js +0 -0
- package/package.json +4 -33
- package/{build/permissions.d.ts → permissions.d.ts} +0 -0
- package/{build/permissions.js → permissions.js} +0 -0
- package/{build/server → server}/bootstrap.d.ts +0 -0
- package/{build/server → server}/bootstrap.js +0 -0
- package/{build/server → server}/config/index.d.ts +0 -0
- package/{build/server → server}/config/index.js +0 -0
- package/{build/server → server}/controllers/admin.d.ts +0 -0
- package/{build/server → server}/controllers/admin.js +0 -0
- package/{build/server → server}/controllers/client.d.ts +0 -0
- package/{build/server → server}/controllers/client.js +0 -0
- package/{build/server → server}/controllers/index.d.ts +0 -0
- package/{build/server → server}/controllers/index.js +0 -0
- package/{build/server → server}/controllers/utils/functions.d.ts +0 -0
- package/{build/server → server}/controllers/utils/functions.js +0 -0
- package/{build/server → server}/controllers/utils/parsers.d.ts +0 -0
- package/{build/server → server}/controllers/utils/parsers.js +0 -0
- package/{build/server → server}/destroy.d.ts +0 -0
- package/{build/server → server}/destroy.js +0 -0
- package/{build/server → server}/graphql/index.d.ts +0 -0
- package/{build/server → server}/graphql/index.js +0 -0
- package/{build/server → server}/graphql/mutations/createAbuseReport.d.ts +0 -0
- package/{build/server → server}/graphql/mutations/createAbuseReport.js +0 -0
- package/{build/server → server}/graphql/mutations/createComment.d.ts +0 -0
- package/{build/server → server}/graphql/mutations/createComment.js +0 -0
- package/{build/server → server}/graphql/mutations/index.d.ts +0 -0
- package/{build/server → server}/graphql/mutations/index.js +0 -0
- package/{build/server → server}/graphql/mutations/removeComment.d.ts +0 -0
- package/{build/server → server}/graphql/mutations/removeComment.js +0 -0
- package/{build/server → server}/graphql/mutations/updateComment.d.ts +0 -0
- package/{build/server → server}/graphql/mutations/updateComment.js +0 -0
- package/{build/server → server}/graphql/queries/findAllFlat.d.ts +0 -0
- package/{build/server → server}/graphql/queries/findAllFlat.js +0 -0
- package/{build/server → server}/graphql/queries/findAllInHierarchy.d.ts +0 -0
- package/{build/server → server}/graphql/queries/findAllInHierarchy.js +0 -0
- package/{build/server → server}/graphql/queries/index.d.ts +0 -0
- package/{build/server → server}/graphql/queries/index.js +0 -0
- package/{build/server → server}/graphql/resolvers-config.d.ts +0 -0
- package/{build/server → server}/graphql/resolvers-config.js +0 -0
- package/{build/server → server}/graphql/types/comment-author.d.ts +0 -0
- package/{build/server → server}/graphql/types/comment-author.js +0 -0
- package/{build/server → server}/graphql/types/comment-nested.d.ts +0 -0
- package/{build/server → server}/graphql/types/comment-nested.js +0 -0
- package/{build/server → server}/graphql/types/comment.d.ts +0 -0
- package/{build/server → server}/graphql/types/comment.js +0 -0
- package/{build/server → server}/graphql/types/create-comment-author.d.ts +0 -0
- package/{build/server → server}/graphql/types/create-comment-author.js +0 -0
- package/{build/server → server}/graphql/types/create-comment.d.ts +0 -0
- package/{build/server → server}/graphql/types/create-comment.js +0 -0
- package/{build/server → server}/graphql/types/create-report.d.ts +0 -0
- package/{build/server → server}/graphql/types/create-report.js +0 -0
- package/{build/server → server}/graphql/types/id.d.ts +0 -0
- package/{build/server → server}/graphql/types/id.js +0 -0
- package/{build/server → server}/graphql/types/identify-comment-author.d.ts +0 -0
- package/{build/server → server}/graphql/types/identify-comment-author.js +0 -0
- package/{build/server → server}/graphql/types/index.d.ts +0 -0
- package/{build/server → server}/graphql/types/index.js +0 -0
- package/{build/server → server}/graphql/types/remove-comment.d.ts +0 -0
- package/{build/server → server}/graphql/types/remove-comment.js +0 -0
- package/{build/server → server}/graphql/types/report-reason.d.ts +0 -0
- package/{build/server → server}/graphql/types/report-reason.js +0 -0
- package/{build/server → server}/graphql/types/report.d.ts +0 -0
- package/{build/server → server}/graphql/types/report.js +0 -0
- package/{build/server → server}/graphql/types/response-find-all.d.ts +0 -0
- package/{build/server → server}/graphql/types/response-find-all.js +0 -0
- package/{build/server → server}/graphql/types/response-meta.d.ts +0 -0
- package/{build/server → server}/graphql/types/response-meta.js +0 -0
- package/{build/server → server}/graphql/types/response-pagination.d.ts +0 -0
- package/{build/server → server}/graphql/types/response-pagination.js +0 -0
- package/{build/server → server}/graphql/types/update-comment.d.ts +0 -0
- package/{build/server → server}/graphql/types/update-comment.js +0 -0
- package/{build/server → server}/index.d.ts +0 -0
- package/{build/server → server}/index.js +0 -0
- package/{build/server → server}/register.d.ts +0 -0
- package/{build/server → server}/register.js +0 -0
- package/{build/server → server}/routes/admin.d.ts +0 -0
- package/{build/server → server}/routes/admin.js +0 -0
- package/{build/server → server}/routes/client.d.ts +0 -0
- package/{build/server → server}/routes/client.js +0 -0
- package/{build/server → server}/routes/index.d.ts +0 -0
- package/{build/server → server}/routes/index.js +0 -0
- package/{build/server → server}/services/admin.d.ts +0 -0
- package/{build/server → server}/services/admin.js +0 -0
- package/{build/server → server}/services/client.d.ts +0 -0
- package/{build/server → server}/services/client.js +0 -0
- package/{build/server → server}/services/common.d.ts +0 -0
- package/{build/server → server}/services/common.js +0 -0
- package/{build/server → server}/services/graphql.d.ts +0 -0
- package/{build/server → server}/services/graphql.js +0 -0
- package/{build/server → server}/services/index.d.ts +0 -0
- package/{build/server → server}/services/index.js +0 -0
- package/{build/server → server}/services/utils/functions.d.ts +0 -0
- package/{build/server → server}/services/utils/functions.js +0 -0
- package/{build/server → server}/utils/constants.d.ts +0 -0
- package/{build/server → server}/utils/constants.js +0 -0
- package/{build/server → server}/utils/error.d.ts +0 -0
- package/{build/server → server}/utils/error.js +0 -0
- package/{build/server → server}/utils/functions.d.ts +0 -0
- package/{build/server → server}/utils/functions.js +0 -0
- package/{build/strapi-admin.d.ts → strapi-admin.d.ts} +0 -0
- package/{build/strapi-admin.js → strapi-admin.js} +0 -0
- package/{build/strapi-server.d.ts → strapi-server.d.ts} +0 -0
- package/{build/strapi-server.js → strapi-server.js} +0 -0
- package/{build/tsconfig.tsbuildinfo → tsconfig.tsbuildinfo} +1 -1
- package/{build/types → types}/contentTypes.d.ts +0 -0
- package/{build/types → types}/contentTypes.js +0 -0
- package/.husky/pre-commit +0 -4
- package/LICENSE.md +0 -7
- package/admin/src/components/ActionButton/styles.ts +0 -11
- package/admin/src/components/Avatar/index.tsx +0 -31
- package/admin/src/components/ConfirmationDialog/index.tsx +0 -88
- package/admin/src/components/DiscussionStatus/index.tsx +0 -36
- package/admin/src/components/DiscussionThread/index.tsx +0 -97
- package/admin/src/components/DiscussionThreadItem/index.tsx +0 -71
- package/admin/src/components/DiscussionThreadItem/styles.ts +0 -15
- package/admin/src/components/DiscussionThreadItemActions/index.tsx +0 -365
- package/admin/src/components/DiscussionThreadItemActions/styles.ts +0 -9
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.tsx +0 -99
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.ts +0 -8
- package/admin/src/components/DiscussionThreadItemFooter/index.tsx +0 -62
- package/admin/src/components/DiscussionThreadItemFooter/styles.ts +0 -15
- package/admin/src/components/DiscussionThreadItemReviewAction/index.tsx +0 -180
- package/admin/src/components/FormSwitch/index.tsx +0 -35
- package/admin/src/components/FormSwitch/styles.ts +0 -10
- package/admin/src/components/IconButton/styles.ts +0 -19
- package/admin/src/components/Initializer/index.tsx +0 -28
- package/admin/src/components/LoadingIndicatorOverlay/index.tsx +0 -19
- package/admin/src/components/LoadingIndicatorOverlay/styles.ts +0 -21
- package/admin/src/components/Nav/index.tsx +0 -61
- package/admin/src/components/PluginIcon/index.tsx +0 -14
- package/admin/src/components/ReportsReviewModal/index.tsx +0 -71
- package/admin/src/components/ReportsReviewTable/index.tsx +0 -233
- package/admin/src/components/StatusBadge/index.tsx +0 -21
- package/admin/src/components/StatusBadge/styles.ts +0 -19
- package/admin/src/components/TableFilters/index.tsx +0 -58
- package/admin/src/components/TablePagination/index.tsx +0 -37
- package/admin/src/components/icons/comments.tsx +0 -15
- package/admin/src/components/icons/index.ts +0 -6
- package/admin/src/components/icons/lock.tsx +0 -27
- package/admin/src/components/icons/review.tsx +0 -25
- package/admin/src/components/icons/unlock.tsx +0 -25
- package/admin/src/hooks/useConfig.ts +0 -58
- package/admin/src/index.ts +0 -98
- package/admin/src/pages/App/index.tsx +0 -67
- package/admin/src/pages/App/reducer/actions.ts +0 -10
- package/admin/src/pages/App/reducer/constants.ts +0 -4
- package/admin/src/pages/App/reducer/index.ts +0 -28
- package/admin/src/pages/App/reducer/init.ts +0 -9
- package/admin/src/pages/App/reducer/selectors.ts +0 -32
- package/admin/src/pages/App/utils/api.ts +0 -14
- package/admin/src/pages/ComingSoonPage/index.tsx +0 -31
- package/admin/src/pages/Details/components/DetailsEntity/index.tsx +0 -106
- package/admin/src/pages/Details/components/DetailsFilters/index.tsx +0 -43
- package/admin/src/pages/Details/components/DetailsFilters/styles.ts +0 -9
- package/admin/src/pages/Details/index.tsx +0 -169
- package/admin/src/pages/Discover/components/DiscoverTableRow/index.tsx +0 -252
- package/admin/src/pages/Discover/components/DiscoverTableRow/styles.ts +0 -9
- package/admin/src/pages/Discover/index.tsx +0 -230
- package/admin/src/pages/Discover/utils/api.ts +0 -22
- package/admin/src/pages/Discover/utils/filtersSchema.ts +0 -9
- package/admin/src/pages/Settings/components/RestartAlert/styles.ts +0 -10
- package/admin/src/pages/Settings/index.tsx +0 -602
- package/admin/src/pages/Settings/utils/api.ts +0 -71
- package/admin/src/pages/utils/api.ts +0 -70
- package/admin/src/permissions.ts +0 -30
- package/admin/src/pluginId.ts +0 -3
- package/admin/src/reducers.ts +0 -8
- package/admin/src/utils/axiosInstance.ts +0 -38
- package/admin/src/utils/constants.ts +0 -25
- package/admin/src/utils/getApiUrl.ts +0 -5
- package/admin/src/utils/getMessage.ts +0 -29
- package/admin/src/utils/getRelatedGroups.ts +0 -6
- package/admin/src/utils/getUrl.ts +0 -5
- package/admin/src/utils/handleAPIError.ts +0 -21
- package/admin/src/utils/index.ts +0 -11
- package/admin/src/utils/parseRegExp.ts +0 -9
- package/admin/src/utils/renderEntryTitle.ts +0 -16
- package/admin/src/utils/renderInitials.ts +0 -10
- package/admin/src/utils/resolveCommentStatus.ts +0 -37
- package/admin/src/utils/resolveCommentStatusColor.ts +0 -22
- package/build/admin/src/translations/en.json +0 -132
- package/build/admin/src/translations/fr.json +0 -132
- package/build/admin/src/translations/pt-BR.json +0 -132
- package/build/package.json +0 -94
- package/content-types/comment.ts +0 -93
- package/content-types/index.ts +0 -11
- package/content-types/report.ts +0 -50
- package/jest.config.ts +0 -22
- package/permissions.ts +0 -17
- package/server/bootstrap.ts +0 -66
- package/server/config/index.ts +0 -19
- package/server/controllers/admin.ts +0 -194
- package/server/controllers/client.ts +0 -220
- package/server/controllers/index.ts +0 -13
- package/server/controllers/utils/functions.ts +0 -27
- package/server/controllers/utils/parsers.ts +0 -59
- package/server/destroy.ts +0 -3
- package/server/graphql/index.ts +0 -27
- package/server/graphql/mutations/createAbuseReport.ts +0 -38
- package/server/graphql/mutations/createComment.ts +0 -41
- package/server/graphql/mutations/index.ts +0 -26
- package/server/graphql/mutations/removeComment.ts +0 -41
- package/server/graphql/mutations/updateComment.ts +0 -40
- package/server/graphql/queries/findAllFlat.ts +0 -58
- package/server/graphql/queries/findAllInHierarchy.ts +0 -47
- package/server/graphql/queries/index.ts +0 -22
- package/server/graphql/resolvers-config.ts +0 -13
- package/server/graphql/types/comment-author.ts +0 -12
- package/server/graphql/types/comment-nested.ts +0 -19
- package/server/graphql/types/comment.ts +0 -18
- package/server/graphql/types/create-comment-author.ts +0 -12
- package/server/graphql/types/create-comment.ts +0 -12
- package/server/graphql/types/create-report.ts +0 -12
- package/server/graphql/types/id.ts +0 -28
- package/server/graphql/types/identify-comment-author.ts +0 -9
- package/server/graphql/types/index.ts +0 -38
- package/server/graphql/types/remove-comment.ts +0 -11
- package/server/graphql/types/report-reason.ts +0 -12
- package/server/graphql/types/report.ts +0 -14
- package/server/graphql/types/response-find-all.ts +0 -10
- package/server/graphql/types/response-meta.ts +0 -9
- package/server/graphql/types/response-pagination.ts +0 -14
- package/server/graphql/types/update-comment.ts +0 -12
- package/server/index.ts +0 -20
- package/server/register.ts +0 -3
- package/server/routes/admin.ts +0 -118
- package/server/routes/client.ts +0 -95
- package/server/routes/index.ts +0 -25
- package/server/services/admin.ts +0 -406
- package/server/services/client.ts +0 -394
- package/server/services/common.ts +0 -501
- package/server/services/graphql.ts +0 -219
- package/server/services/index.ts +0 -13
- package/server/services/utils/functions.ts +0 -150
- package/server/utils/constants.ts +0 -23
- package/server/utils/error.ts +0 -44
- package/server/utils/functions.ts +0 -55
- package/strapi-admin.ts +0 -5
- package/strapi-server.ts +0 -77
- package/tsconfig.json +0 -38
- package/types/common.d.ts +0 -1
- package/types/config.d.ts +0 -35
- package/types/constants.d.ts +0 -3
- package/types/contentTypes.ts +0 -56
- package/types/controllers.d.ts +0 -125
- package/types/graphql.d.ts +0 -24
- package/types/index.d.ts +0 -7
- 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
|
-
}
|
package/build/package.json
DELETED
|
@@ -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
|
-
}
|
package/content-types/comment.ts
DELETED
|
@@ -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
|
-
};
|
package/content-types/index.ts
DELETED
package/content-types/report.ts
DELETED
|
@@ -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
|
-
};
|
package/server/bootstrap.ts
DELETED
|
@@ -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
|
-
};
|
package/server/config/index.ts
DELETED
|
@@ -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;
|