strapi-plugin-comments 2.3.2 → 3.0.0-beta.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.
- package/LICENSE.md +7 -0
- package/README.md +21 -19
- package/dist/_chunks/en-D1Rj1A_i.js +195 -0
- package/{admin/src/translations/en.json → dist/_chunks/en-DZljqkLz.mjs} +17 -14
- package/dist/_chunks/fr-DbxNAr65.js +146 -0
- package/{admin/src/translations/fr.json → dist/_chunks/fr-oAh2cU0E.mjs} +15 -11
- package/dist/_chunks/index-B6Q4U8YQ.js +51665 -0
- package/dist/_chunks/index-BQERo8pN.mjs +8340 -0
- package/dist/_chunks/index-BVj8EXjI.js +8356 -0
- package/dist/_chunks/index-Bpbf7RON.mjs +51643 -0
- package/dist/_chunks/index-CTjupB9v.js +375 -0
- package/dist/_chunks/index-fAgatqD0.js +50888 -0
- package/dist/_chunks/index-fSb-gYwg.mjs +373 -0
- package/dist/_chunks/index-h-TB6Qu2.mjs +50873 -0
- package/{admin/src/translations/pl.json → dist/_chunks/pl-BUVUFx9r.mjs} +14 -11
- package/dist/_chunks/pl-CuTgrHph.js +195 -0
- package/dist/_chunks/pt-BR-2Z9CtgSm.js +145 -0
- package/{admin/src/translations/pt-BR.json → dist/_chunks/pt-BR-Bchhsf7B.mjs} +14 -11
- package/{admin/src/translations/ru.json → dist/_chunks/ru-BQ54P0xr.mjs} +17 -14
- package/dist/_chunks/ru-gtnRlbuP.js +195 -0
- package/{admin/src/translations/tr.json → dist/_chunks/tr-CkGcBRUv.mjs} +14 -11
- package/dist/_chunks/tr-Ucl3IKMX.js +193 -0
- package/{admin/src/translations/zh-Hans.json → dist/_chunks/zh-Hans-Buh0iPWA.mjs} +17 -14
- package/dist/_chunks/zh-Hans-Dhk3gIYb.js +195 -0
- package/dist/admin/index.js +4 -0
- package/dist/admin/index.mjs +5 -0
- package/dist/admin/src/api/client.d.ts +413 -0
- package/dist/admin/src/api/index.d.ts +1 -0
- package/dist/admin/src/api/schemas.d.ts +3463 -0
- package/dist/admin/src/components/ActionButton/index.d.ts +4 -0
- package/dist/admin/src/components/ApproveFlow/index.d.ts +7 -0
- package/dist/admin/src/components/CommentReportStatusBadge/index.d.ts +4 -0
- package/dist/admin/src/components/CommentRow/index.d.ts +7 -0
- package/dist/admin/src/components/CommentStatusBadge/index.d.ts +7 -0
- package/dist/admin/src/components/ConfirmationDialog/index.d.ts +14 -0
- package/dist/admin/src/components/DiscussionThreadItem/DiscussionThreadItemActions.d.ts +3 -0
- package/dist/admin/src/components/DiscussionThreadItem/DiscussionThreadItemFooter.d.ts +4 -0
- package/dist/admin/src/components/DiscussionThreadItem/index.d.ts +6 -0
- package/dist/admin/src/components/DiscussionThreadItem/props.d.ts +12 -0
- package/dist/admin/src/components/IconButtonGroup/index.d.ts +5 -0
- package/dist/admin/src/components/LoadingIndicatorOverlay/index.d.ts +1 -0
- package/dist/admin/src/components/ModeratorResponseModal/index.d.ts +9 -0
- package/dist/admin/src/components/PluginIcon/index.d.ts +7 -0
- package/dist/admin/src/components/RenderIf/index.d.ts +7 -0
- package/dist/admin/src/components/ReportReasonBadge/index.d.ts +3 -0
- package/dist/admin/src/components/ReportStatusBadge/index.d.ts +5 -0
- package/dist/admin/src/components/ReportsTableRow/BlockMenu.d.ts +8 -0
- package/dist/admin/src/components/ReportsTableRow/CommentReviewModal.d.ts +7 -0
- package/dist/admin/src/components/ReportsTableRow/ReportsActions.d.ts +7 -0
- package/dist/admin/src/components/ReportsTableRow/index.d.ts +9 -0
- package/dist/admin/src/components/ReviewFlow/ReportReviewTable.d.ts +13 -0
- package/dist/admin/src/components/ReviewFlow/index.d.ts +7 -0
- package/dist/admin/src/components/SideNav/index.d.ts +1 -0
- package/dist/admin/src/components/StatusBadge/index.d.ts +3 -0
- package/dist/admin/src/components/UserAvatar/AdminAvatar.d.ts +2 -0
- package/dist/admin/src/components/UserAvatar/index.d.ts +8 -0
- package/{admin → dist/admin}/src/components/Wysiwyg/Editor.d.ts +2 -14
- package/dist/admin/src/components/Wysiwyg/EditorLayout.d.ts +12 -0
- package/{admin → dist/admin}/src/components/Wysiwyg/PreviewWysiwyg.d.ts +1 -2
- package/dist/admin/src/components/Wysiwyg/WysiwygFooter.d.ts +6 -0
- package/{admin → dist/admin}/src/components/Wysiwyg/WysiwygNav.d.ts +4 -3
- package/dist/admin/src/components/Wysiwyg/WysiwygStyles.d.ts +5 -0
- package/dist/admin/src/components/Wysiwyg/index.d.ts +13 -0
- package/{admin → dist/admin}/src/components/Wysiwyg/utils/continueList.d.ts +1 -4
- package/{admin → dist/admin}/src/components/Wysiwyg/utils/mdRenderer.d.ts +0 -1
- package/dist/admin/src/components/Wysiwyg/utils/urls.d.ts +2 -0
- package/{admin → dist/admin}/src/components/Wysiwyg/utils/utils.d.ts +0 -1
- package/{admin → dist/admin}/src/components/icons/comments.d.ts +1 -2
- package/dist/admin/src/components/icons/index.d.ts +2 -0
- package/dist/admin/src/components/icons/lock.d.ts +8 -0
- package/dist/admin/src/components/icons/review.d.ts +7 -0
- package/dist/admin/src/components/icons/strapiIcons.d.ts +1 -0
- package/dist/admin/src/components/icons/unlock.d.ts +8 -0
- package/dist/admin/src/contexts/UserContext.d.ts +23 -0
- package/dist/admin/src/hooks/useAPI.d.ts +430 -0
- package/dist/admin/src/hooks/useCommentMutations.d.ts +72 -0
- package/dist/admin/src/hooks/useCommentsAll.d.ts +59 -0
- package/dist/admin/src/hooks/useConfig.d.ts +28 -0
- package/dist/admin/src/hooks/useElementOnScreen.d.ts +2 -0
- package/dist/admin/src/hooks/usePermissions.d.ts +9 -0
- package/dist/admin/src/hooks/useReports.d.ts +60 -0
- package/dist/admin/src/hooks/useResizeObserver.d.ts +2 -0
- package/dist/admin/src/hooks/useUserContext.d.ts +21 -0
- package/dist/admin/src/index.d.ts +10 -0
- package/dist/admin/src/pages/App/index.d.ts +2 -0
- package/dist/admin/src/pages/Details/DetailsEntry.d.ts +11 -0
- package/dist/admin/src/pages/Details/DiscussionThread.d.ts +11 -0
- package/dist/admin/src/pages/Details/ModeratorResponse.d.ts +7 -0
- package/dist/admin/src/pages/Details/index.d.ts +5 -0
- package/dist/admin/src/pages/Discover/index.d.ts +5 -0
- package/dist/admin/src/pages/Reports/index.d.ts +5 -0
- package/dist/admin/src/pages/Settings/hooks/useSettingsAPI.d.ts +70 -0
- package/dist/admin/src/pages/Settings/index.d.ts +2 -0
- package/{admin → dist/admin}/src/permissions.d.ts +0 -1
- package/{admin → dist/admin}/src/pluginId.d.ts +0 -1
- package/dist/admin/src/providers/CommonProviders/index.d.ts +4 -0
- package/dist/admin/src/store/settings.store.d.ts +7 -0
- package/dist/admin/src/translations/en.d.ts +194 -0
- package/dist/admin/src/translations/fr.d.ts +143 -0
- package/dist/admin/src/translations/index.d.ts +11 -0
- package/dist/admin/src/translations/pl.d.ts +193 -0
- package/dist/admin/src/translations/pt-BR.d.ts +143 -0
- package/dist/admin/src/translations/ru.d.ts +193 -0
- package/dist/admin/src/translations/tr.d.ts +191 -0
- package/dist/admin/src/translations/zh-Hans.d.ts +193 -0
- package/dist/admin/src/types/index.d.ts +5 -0
- package/dist/admin/src/utils/constants.d.ts +28 -0
- package/{admin → dist/admin}/src/utils/errors.d.ts +0 -1
- package/{admin → dist/admin}/src/utils/functions.d.ts +0 -1
- package/{admin → dist/admin}/src/utils/getApiUrl.d.ts +0 -1
- package/dist/admin/src/utils/getMessage.d.ts +2 -0
- package/{admin → dist/admin}/src/utils/getRelatedGroups.d.ts +0 -1
- package/{admin → dist/admin}/src/utils/getUrl.d.ts +0 -1
- package/dist/admin/src/utils/handleAPIError.d.ts +2 -0
- package/{admin → dist/admin}/src/utils/index.d.ts +0 -2
- package/{admin → dist/admin}/src/utils/parseRegExp.d.ts +0 -1
- package/dist/admin/src/utils/renderEntryTitle.d.ts +2 -0
- package/{admin → dist/admin}/src/utils/renderInitials.d.ts +0 -1
- package/dist/admin/src/utils/resolveCommentStatus.d.ts +7 -0
- package/dist/admin/src/utils/resolveCommentStatusColor.d.ts +3 -0
- package/dist/admin/src/utils/resolveReportStatus.d.ts +4 -0
- package/dist/admin/src/utils/resolveReportStatusColor.d.ts +3 -0
- package/dist/assets/configuration.png +0 -0
- package/dist/assets/logo.png +0 -0
- package/dist/assets/marketplace.png +0 -0
- package/dist/assets/preview.png +0 -0
- package/dist/server/index.js +8121 -0
- package/dist/server/index.mjs +8122 -0
- package/dist/server/src/@types-v5/controllers.d.ts +17 -0
- package/dist/server/src/@types-v5/index.d.ts +5 -0
- package/dist/server/src/@types-v5/repositories.d.ts +28 -0
- package/dist/server/src/@types-v5/routes.d.ts +18 -0
- package/{types/contentTypes.d.ts → dist/server/src/@types-v5/utils.d.ts} +23 -6
- package/dist/server/src/bootstrap.d.ts +3 -0
- package/dist/server/src/config/index.d.ts +101 -0
- package/dist/server/src/const/REGEX.d.ts +19 -0
- package/dist/server/src/const/REPORT_REASON.d.ts +5 -0
- package/dist/server/src/const/index.d.ts +3 -0
- package/dist/server/src/content-types/comments/index.d.ts +98 -0
- package/{content-types/comment.d.ts → dist/server/src/content-types/comments/schema.d.ts} +3 -1
- package/{content-types → dist/server/src/content-types}/index.d.ts +14 -8
- package/dist/server/src/content-types/report/index.d.ts +50 -0
- package/{content-types/report.d.ts → dist/server/src/content-types/report/schema.d.ts} +4 -3
- package/dist/server/src/controllers/admin.controller.d.ts +964 -0
- package/dist/server/src/controllers/client.controller.d.ts +839 -0
- package/dist/server/src/controllers/index.d.ts +2641 -0
- package/dist/server/src/controllers/settings.controller.d.ts +123 -0
- package/dist/server/src/controllers/utils/parsers.d.ts +1 -0
- package/dist/server/src/index.d.ts +9448 -0
- package/{permissions.d.ts → dist/server/src/permissions.d.ts} +2 -4
- package/{server → dist/server/src}/register/custom-fields/comments.d.ts +0 -1
- package/dist/server/src/register/custom-fields/index.d.ts +2 -0
- package/{server → dist/server/src}/register/index.d.ts +1 -2
- package/dist/server/src/repositories/comment.repository.d.ts +13 -0
- package/dist/server/src/repositories/index.d.ts +5 -0
- package/dist/server/src/repositories/report.comment.repository.d.ts +41 -0
- package/dist/server/src/repositories/store.repository.d.ts +106 -0
- package/dist/server/src/repositories/utils.d.ts +11 -0
- package/dist/server/src/routes/admin.routes.d.ts +3 -0
- package/dist/server/src/routes/client.routes.d.ts +3 -0
- package/dist/server/src/routes/index.d.ts +11 -0
- package/dist/server/src/services/admin/admin.service.d.ts +2570 -0
- package/dist/server/src/services/admin/utils.d.ts +72 -0
- package/dist/server/src/services/client.service.d.ts +2056 -0
- package/dist/server/src/services/common.service.d.ts +523 -0
- package/dist/server/src/services/index.d.ts +6606 -0
- package/dist/server/src/services/settings.service.d.ts +93 -0
- package/dist/server/src/services/utils/functions.d.ts +12 -0
- package/dist/server/src/utils/Either.d.ts +16 -0
- package/dist/server/src/utils/PluginError.d.ts +11 -0
- package/dist/server/src/utils/constants.d.ts +25 -0
- package/{server → dist/server/src}/utils/error.d.ts +0 -1
- package/dist/server/src/utils/getConfig.d.ts +3 -0
- package/dist/server/src/utils/getPluginService.d.ts +3 -0
- package/dist/server/src/utils/throwError.d.ts +3 -0
- package/dist/server/src/utils/tryCatch.d.ts +1 -0
- package/{server → dist/server/src}/utils/types.d.ts +3 -5
- package/dist/server/src/validators/api/controllers/admin.controller.validator.d.ts +119 -0
- package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +586 -0
- package/dist/server/src/validators/api/controllers/index.d.ts +3 -0
- package/dist/server/src/validators/api/controllers/settings.controller.validator.d.ts +18 -0
- package/dist/server/src/validators/api/index.d.ts +1 -0
- package/dist/server/src/validators/repositories/comment.schema.d.ts +62 -0
- package/dist/server/src/validators/repositories/comment.validator.d.ts +2944 -0
- package/dist/server/src/validators/repositories/index.d.ts +2 -0
- package/dist/server/src/validators/repositories/reports.validator.d.ts +1045 -0
- package/dist/server/src/validators/repositories/utils.d.ts +20 -0
- package/dist/server/src/validators/utils.d.ts +776 -0
- package/dist/style.css +84 -0
- package/package.json +81 -18
- package/admin/src/components/ActionButton/styles.d.ts +0 -2
- package/admin/src/components/ActionButton/styles.js +0 -15
- package/admin/src/components/AdminAvatar/index.d.ts +0 -4
- package/admin/src/components/AdminAvatar/index.js +0 -17
- package/admin/src/components/AdminAvatar/styles.d.ts +0 -3
- package/admin/src/components/AdminAvatar/styles.js +0 -25
- package/admin/src/components/Avatar/index.d.ts +0 -10
- package/admin/src/components/Avatar/index.js +0 -22
- package/admin/src/components/CommentReviewModal/index.d.ts +0 -10
- package/admin/src/components/CommentReviewModal/index.js +0 -19
- package/admin/src/components/ConfirmationDialog/index.d.ts +0 -27
- package/admin/src/components/ConfirmationDialog/index.js +0 -37
- package/admin/src/components/DiscussionStatus/index.d.ts +0 -9
- package/admin/src/components/DiscussionStatus/index.js +0 -24
- package/admin/src/components/DiscussionThread/index.d.ts +0 -21
- package/admin/src/components/DiscussionThread/index.js +0 -45
- package/admin/src/components/DiscussionThreadItem/index.d.ts +0 -3
- package/admin/src/components/DiscussionThreadItem/index.js +0 -51
- package/admin/src/components/DiscussionThreadItem/styles.d.ts +0 -5
- package/admin/src/components/DiscussionThreadItem/styles.js +0 -31
- package/admin/src/components/DiscussionThreadItemActions/index.d.ts +0 -22
- package/admin/src/components/DiscussionThreadItemActions/index.js +0 -222
- package/admin/src/components/DiscussionThreadItemActions/styles.d.ts +0 -2
- package/admin/src/components/DiscussionThreadItemActions/styles.js +0 -13
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +0 -19
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.js +0 -67
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +0 -2
- package/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.js +0 -12
- package/admin/src/components/DiscussionThreadItemFooter/index.d.ts +0 -23
- package/admin/src/components/DiscussionThreadItemFooter/index.js +0 -40
- package/admin/src/components/DiscussionThreadItemFooter/styles.d.ts +0 -3
- package/admin/src/components/DiscussionThreadItemFooter/styles.js +0 -18
- package/admin/src/components/DiscussionThreadItemReviewAction/index.d.ts +0 -25
- package/admin/src/components/DiscussionThreadItemReviewAction/index.js +0 -174
- package/admin/src/components/FormSwitch/index.d.ts +0 -7
- package/admin/src/components/FormSwitch/index.js +0 -15
- package/admin/src/components/FormSwitch/styles.d.ts +0 -2
- package/admin/src/components/FormSwitch/styles.js +0 -14
- package/admin/src/components/Hint/index.d.ts +0 -14
- package/admin/src/components/Hint/index.js +0 -22
- package/admin/src/components/IconButton/styles.d.ts +0 -2
- package/admin/src/components/IconButton/styles.js +0 -21
- package/admin/src/components/Initializer/index.d.ts +0 -5
- package/admin/src/components/Initializer/index.js +0 -14
- package/admin/src/components/LoadingIndicatorOverlay/index.d.ts +0 -3
- package/admin/src/components/LoadingIndicatorOverlay/index.js +0 -12
- package/admin/src/components/LoadingIndicatorOverlay/styles.d.ts +0 -3
- package/admin/src/components/LoadingIndicatorOverlay/styles.js +0 -25
- package/admin/src/components/ModeratorResponse/index.d.ts +0 -8
- package/admin/src/components/ModeratorResponse/index.js +0 -106
- package/admin/src/components/ModeratorResponse/styles.d.ts +0 -2
- package/admin/src/components/ModeratorResponse/styles.js +0 -12
- package/admin/src/components/ModeratorResponseModal/ModeratorResponseModal.d.ts +0 -11
- package/admin/src/components/ModeratorResponseModal/ModeratorResponseModal.js +0 -95
- package/admin/src/components/Nav/index.d.ts +0 -7
- package/admin/src/components/Nav/index.js +0 -23
- package/admin/src/components/PluginIcon/index.d.ts +0 -3
- package/admin/src/components/PluginIcon/index.js +0 -6
- package/admin/src/components/PreviewWysiwyg/Wrapper.d.ts +0 -3
- package/admin/src/components/PreviewWysiwyg/Wrapper.js +0 -162
- package/admin/src/components/PreviewWysiwyg/index.d.ts +0 -7
- package/admin/src/components/PreviewWysiwyg/index.js +0 -39
- package/admin/src/components/PreviewWysiwyg/utils/mdRenderer.d.ts +0 -3
- package/admin/src/components/PreviewWysiwyg/utils/mdRenderer.js +0 -88
- package/admin/src/components/PreviewWysiwyg/utils/satinizeHtml.d.ts +0 -20
- package/admin/src/components/PreviewWysiwyg/utils/satinizeHtml.js +0 -18
- package/admin/src/components/ReportsActions/components/BlockMenu/index.d.ts +0 -15
- package/admin/src/components/ReportsActions/components/BlockMenu/index.js +0 -51
- package/admin/src/components/ReportsActions/index.d.ts +0 -11
- package/admin/src/components/ReportsActions/index.js +0 -31
- package/admin/src/components/ReportsReviewModal/index.d.ts +0 -26
- package/admin/src/components/ReportsReviewModal/index.js +0 -33
- package/admin/src/components/ReportsReviewTable/index.d.ts +0 -15
- package/admin/src/components/ReportsReviewTable/index.js +0 -141
- package/admin/src/components/StatusBadge/index.d.ts +0 -7
- package/admin/src/components/StatusBadge/index.js +0 -12
- package/admin/src/components/StatusBadge/styles.d.ts +0 -2
- package/admin/src/components/StatusBadge/styles.js +0 -23
- package/admin/src/components/TableFilters/index.d.ts +0 -19
- package/admin/src/components/TableFilters/index.js +0 -56
- package/admin/src/components/TablePagination/index.d.ts +0 -23
- package/admin/src/components/TablePagination/index.js +0 -33
- package/admin/src/components/Wysiwyg/Editor.js +0 -439
- package/admin/src/components/Wysiwyg/EditorLayout.d.ts +0 -13
- package/admin/src/components/Wysiwyg/EditorLayout.js +0 -85
- package/admin/src/components/Wysiwyg/Field.d.ts +0 -15
- package/admin/src/components/Wysiwyg/Field.js +0 -135
- package/admin/src/components/Wysiwyg/PreviewWysiwyg.js +0 -191
- package/admin/src/components/Wysiwyg/WysiwygFooter.d.ts +0 -8
- package/admin/src/components/Wysiwyg/WysiwygFooter.js +0 -44
- package/admin/src/components/Wysiwyg/WysiwygNav.js +0 -114
- package/admin/src/components/Wysiwyg/WysiwygStyles.d.ts +0 -7
- package/admin/src/components/Wysiwyg/WysiwygStyles.js +0 -54
- package/admin/src/components/Wysiwyg/utils/continueList.js +0 -83
- package/admin/src/components/Wysiwyg/utils/mdRenderer.js +0 -63
- package/admin/src/components/Wysiwyg/utils/utils.js +0 -250
- package/admin/src/components/icons/comments.js +0 -12
- package/admin/src/components/icons/index.d.ts +0 -3
- package/admin/src/components/icons/index.js +0 -29
- package/admin/src/components/icons/lock.d.ts +0 -7
- package/admin/src/components/icons/lock.js +0 -12
- package/admin/src/components/icons/review.d.ts +0 -7
- package/admin/src/components/icons/review.js +0 -12
- package/admin/src/components/icons/strapiIcons.d.ts +0 -26
- package/admin/src/components/icons/strapiIcons.js +0 -38
- package/admin/src/components/icons/unlock.d.ts +0 -7
- package/admin/src/components/icons/unlock.js +0 -12
- package/admin/src/custom-fields/comments/components/icon.d.ts +0 -2
- package/admin/src/custom-fields/comments/components/icon.js +0 -14
- package/admin/src/custom-fields/comments/components/index.d.ts +0 -3
- package/admin/src/custom-fields/comments/components/index.js +0 -19
- package/admin/src/custom-fields/comments/components/input/consts.d.ts +0 -3
- package/admin/src/custom-fields/comments/components/input/consts.js +0 -9
- package/admin/src/custom-fields/comments/components/input/index.d.ts +0 -3
- package/admin/src/custom-fields/comments/components/input/index.js +0 -5
- package/admin/src/custom-fields/comments/components/input/input.d.ts +0 -4
- package/admin/src/custom-fields/comments/components/input/input.js +0 -98
- package/admin/src/custom-fields/comments/components/input/types.d.ts +0 -10
- package/admin/src/custom-fields/comments/components/input/types.js +0 -3
- package/admin/src/custom-fields/comments/components/input/utils.d.ts +0 -26
- package/admin/src/custom-fields/comments/components/input/utils.js +0 -141
- package/admin/src/custom-fields/comments/index.d.ts +0 -3
- package/admin/src/custom-fields/comments/index.js +0 -53
- package/admin/src/custom-fields/index.d.ts +0 -3
- package/admin/src/custom-fields/index.js +0 -13
- package/admin/src/hooks/useConfig.d.ts +0 -8
- package/admin/src/hooks/useConfig.js +0 -41
- package/admin/src/hooks/useReportsActionsHandlers.d.ts +0 -19
- package/admin/src/hooks/useReportsActionsHandlers.js +0 -70
- package/admin/src/index.d.ts +0 -15
- package/admin/src/index.js +0 -97
- package/admin/src/pages/App/index.d.ts +0 -15
- package/admin/src/pages/App/index.js +0 -47
- package/admin/src/pages/App/reducer/actions.d.ts +0 -8
- package/admin/src/pages/App/reducer/actions.js +0 -12
- package/admin/src/pages/App/reducer/constants.d.ts +0 -4
- package/admin/src/pages/App/reducer/constants.js +0 -7
- package/admin/src/pages/App/reducer/index.d.ts +0 -9
- package/admin/src/pages/App/reducer/index.js +0 -28
- package/admin/src/pages/App/reducer/init.d.ts +0 -3
- package/admin/src/pages/App/reducer/init.js +0 -9
- package/admin/src/pages/App/reducer/selectors.d.ts +0 -10
- package/admin/src/pages/App/reducer/selectors.js +0 -18
- package/admin/src/pages/App/utils/api.d.ts +0 -2
- package/admin/src/pages/App/utils/api.js +0 -15
- package/admin/src/pages/ComingSoonPage/index.d.ts +0 -4
- package/admin/src/pages/ComingSoonPage/index.js +0 -43
- package/admin/src/pages/Details/components/DetailsEntity/index.d.ts +0 -19
- package/admin/src/pages/Details/components/DetailsEntity/index.js +0 -56
- package/admin/src/pages/Details/components/DetailsFilters/index.d.ts +0 -13
- package/admin/src/pages/Details/components/DetailsFilters/index.js +0 -28
- package/admin/src/pages/Details/components/DetailsFilters/styles.d.ts +0 -2
- package/admin/src/pages/Details/components/DetailsFilters/styles.js +0 -14
- package/admin/src/pages/Details/index.d.ts +0 -11
- package/admin/src/pages/Details/index.js +0 -100
- package/admin/src/pages/Discover/components/DiscoverTableRow/index.d.ts +0 -25
- package/admin/src/pages/Discover/components/DiscoverTableRow/index.js +0 -125
- package/admin/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +0 -2
- package/admin/src/pages/Discover/components/DiscoverTableRow/styles.js +0 -14
- package/admin/src/pages/Discover/index.d.ts +0 -11
- package/admin/src/pages/Discover/index.js +0 -132
- package/admin/src/pages/Discover/utils/api.d.ts +0 -2
- package/admin/src/pages/Discover/utils/api.js +0 -16
- package/admin/src/pages/Discover/utils/filtersSchema.d.ts +0 -26
- package/admin/src/pages/Discover/utils/filtersSchema.js +0 -39
- package/admin/src/pages/NoAccessPage/index.d.ts +0 -3
- package/admin/src/pages/NoAccessPage/index.js +0 -31
- package/admin/src/pages/Reports/components/ReportsTableRow/index.d.ts +0 -15
- package/admin/src/pages/Reports/components/ReportsTableRow/index.js +0 -91
- package/admin/src/pages/Reports/components/ReportsTableRow/styles.d.ts +0 -2
- package/admin/src/pages/Reports/components/ReportsTableRow/styles.js +0 -14
- package/admin/src/pages/Reports/index.d.ts +0 -11
- package/admin/src/pages/Reports/index.js +0 -196
- package/admin/src/pages/Reports/utils/api.d.ts +0 -2
- package/admin/src/pages/Reports/utils/api.js +0 -16
- package/admin/src/pages/Reports/utils/filtersSchema.d.ts +0 -26
- package/admin/src/pages/Reports/utils/filtersSchema.js +0 -32
- package/admin/src/pages/Settings/components/RestartAlert/styles.d.ts +0 -2
- package/admin/src/pages/Settings/components/RestartAlert/styles.js +0 -14
- package/admin/src/pages/Settings/index.d.ts +0 -3
- package/admin/src/pages/Settings/index.js +0 -244
- package/admin/src/pages/Settings/utils/api.d.ts +0 -7
- package/admin/src/pages/Settings/utils/api.js +0 -65
- package/admin/src/pages/utils/api.d.ts +0 -23
- package/admin/src/pages/utils/api.js +0 -85
- package/admin/src/permissions.js +0 -32
- package/admin/src/pluginId.js +0 -29
- package/admin/src/reducers.d.ts +0 -7
- package/admin/src/reducers.js +0 -12
- package/admin/src/translations/index.d.ts +0 -8
- package/admin/src/translations/index.js +0 -23
- package/admin/src/utils/axiosInstance.d.ts +0 -3
- package/admin/src/utils/axiosInstance.js +0 -29
- package/admin/src/utils/constants.d.ts +0 -29
- package/admin/src/utils/constants.js +0 -28
- package/admin/src/utils/errors.js +0 -10
- package/admin/src/utils/functions.js +0 -10
- package/admin/src/utils/getApiUrl.js +0 -6
- package/admin/src/utils/getMessage.d.ts +0 -4
- package/admin/src/utils/getMessage.js +0 -20
- package/admin/src/utils/getRelatedGroups.js +0 -5
- package/admin/src/utils/getUrl.js +0 -6
- package/admin/src/utils/handleAPIError.d.ts +0 -4
- package/admin/src/utils/handleAPIError.js +0 -17
- package/admin/src/utils/index.js +0 -40
- package/admin/src/utils/parseRegExp.js +0 -11
- package/admin/src/utils/renderEntryTitle.d.ts +0 -4
- package/admin/src/utils/renderEntryTitle.js +0 -13
- package/admin/src/utils/renderInitials.js +0 -11
- package/admin/src/utils/resolveCommentStatus.d.ts +0 -10
- package/admin/src/utils/resolveCommentStatus.js +0 -26
- package/admin/src/utils/resolveCommentStatusColor.d.ts +0 -4
- package/admin/src/utils/resolveCommentStatusColor.js +0 -22
- package/admin/src/utils/resolveReportStatus.d.ts +0 -4
- package/admin/src/utils/resolveReportStatus.js +0 -23
- package/admin/src/utils/resolveReportStatusColor.d.ts +0 -4
- package/admin/src/utils/resolveReportStatusColor.js +0 -17
- package/content-types/comment.js +0 -96
- package/content-types/index.js +0 -23
- package/content-types/report.js +0 -49
- package/permissions.js +0 -18
- package/server/bootstrap.d.ts +0 -4
- package/server/bootstrap.js +0 -59
- package/server/config/index.d.ts +0 -4
- package/server/config/index.js +0 -20
- package/server/controllers/admin.d.ts +0 -4
- package/server/controllers/admin.js +0 -212
- package/server/controllers/client.d.ts +0 -4
- package/server/controllers/client.js +0 -143
- package/server/controllers/index.d.ts +0 -6
- package/server/controllers/index.js +0 -13
- package/server/controllers/utils/functions.d.ts +0 -7
- package/server/controllers/utils/functions.js +0 -24
- package/server/controllers/utils/parsers.d.ts +0 -11
- package/server/controllers/utils/parsers.js +0 -72
- package/server/destroy.d.ts +0 -3
- package/server/destroy.js +0 -4
- package/server/graphql/index.d.ts +0 -4
- package/server/graphql/index.js +0 -27
- package/server/graphql/mutations/createAbuseReport.d.ts +0 -11
- package/server/graphql/mutations/createAbuseReport.js +0 -23
- package/server/graphql/mutations/createComment.d.ts +0 -14
- package/server/graphql/mutations/createComment.js +0 -23
- package/server/graphql/mutations/index.d.ts +0 -4
- package/server/graphql/mutations/index.js +0 -26
- package/server/graphql/mutations/removeComment.d.ts +0 -11
- package/server/graphql/mutations/removeComment.js +0 -23
- package/server/graphql/mutations/updateComment.d.ts +0 -11
- package/server/graphql/mutations/updateComment.js +0 -23
- package/server/graphql/queries/findAllFlat.d.ts +0 -19
- package/server/graphql/queries/findAllFlat.js +0 -37
- package/server/graphql/queries/findAllInHierarchy.d.ts +0 -18
- package/server/graphql/queries/findAllInHierarchy.js +0 -33
- package/server/graphql/queries/findAllPerAuthor.d.ts +0 -21
- package/server/graphql/queries/findAllPerAuthor.js +0 -40
- package/server/graphql/queries/index.d.ts +0 -4
- package/server/graphql/queries/index.js +0 -24
- package/server/graphql/resolvers-config.d.ts +0 -23
- package/server/graphql/resolvers-config.js +0 -13
- package/server/graphql/types/comment-author-type.d.ts +0 -4
- package/server/graphql/types/comment-author-type.js +0 -8
- package/server/graphql/types/comment-author.d.ts +0 -4
- package/server/graphql/types/comment-author.js +0 -11
- package/server/graphql/types/comment-nested.d.ts +0 -4
- package/server/graphql/types/comment-nested.js +0 -18
- package/server/graphql/types/comment.d.ts +0 -4
- package/server/graphql/types/comment.js +0 -17
- package/server/graphql/types/create-comment-author.d.ts +0 -4
- package/server/graphql/types/create-comment-author.js +0 -11
- package/server/graphql/types/create-comment.d.ts +0 -4
- package/server/graphql/types/create-comment.js +0 -11
- package/server/graphql/types/create-report.d.ts +0 -4
- package/server/graphql/types/create-report.js +0 -11
- package/server/graphql/types/id.d.ts +0 -4
- package/server/graphql/types/id.js +0 -25
- package/server/graphql/types/identify-comment-author.d.ts +0 -4
- package/server/graphql/types/identify-comment-author.js +0 -8
- package/server/graphql/types/index.d.ts +0 -4
- package/server/graphql/types/index.js +0 -42
- package/server/graphql/types/remove-comment.d.ts +0 -4
- package/server/graphql/types/remove-comment.js +0 -10
- package/server/graphql/types/report-reason.d.ts +0 -4
- package/server/graphql/types/report-reason.js +0 -12
- package/server/graphql/types/report.d.ts +0 -4
- package/server/graphql/types/report.js +0 -13
- package/server/graphql/types/response-find-all-per-author.d.ts +0 -4
- package/server/graphql/types/response-find-all-per-author.js +0 -9
- package/server/graphql/types/response-find-all.d.ts +0 -4
- package/server/graphql/types/response-find-all.js +0 -9
- package/server/graphql/types/response-meta.d.ts +0 -4
- package/server/graphql/types/response-meta.js +0 -8
- package/server/graphql/types/response-pagination.d.ts +0 -4
- package/server/graphql/types/response-pagination.js +0 -13
- package/server/graphql/types/update-comment.d.ts +0 -4
- package/server/graphql/types/update-comment.js +0 -11
- package/server/index.d.ts +0 -26
- package/server/index.js +0 -25
- package/server/register/custom-fields/comments.js +0 -9
- package/server/register/custom-fields/index.d.ts +0 -3
- package/server/register/custom-fields/index.js +0 -14
- package/server/register/index.js +0 -8
- package/server/routes/admin.d.ts +0 -4
- package/server/routes/admin.js +0 -182
- package/server/routes/client.d.ts +0 -4
- package/server/routes/client.js +0 -118
- package/server/routes/index.d.ts +0 -11
- package/server/routes/index.js +0 -19
- package/server/services/admin.d.ts +0 -5
- package/server/services/admin.js +0 -506
- package/server/services/client.d.ts +0 -5
- package/server/services/client.js +0 -321
- package/server/services/common.d.ts +0 -5
- package/server/services/common.js +0 -296
- package/server/services/graphql.d.ts +0 -5
- package/server/services/graphql.js +0 -150
- package/server/services/index.d.ts +0 -8
- package/server/services/index.js +0 -16
- package/server/services/utils/functions.d.ts +0 -14
- package/server/services/utils/functions.js +0 -118
- package/server/services/utils/parsers.d.ts +0 -6
- package/server/services/utils/parsers.js +0 -63
- package/server/utils/constants.d.ts +0 -15
- package/server/utils/constants.js +0 -47
- package/server/utils/error.js +0 -29
- package/server/utils/functions.d.ts +0 -10
- package/server/utils/functions.js +0 -53
- package/server/utils/types.js +0 -3
- package/strapi-admin.d.ts +0 -3
- package/strapi-admin.js +0 -8
- package/strapi-server.d.ts +0 -186
- package/strapi-server.js +0 -46
- package/tsconfig.tsbuildinfo +0 -1
- package/types/contentTypes.js +0 -3
- package/types/utils.d.ts +0 -5
- package/types/utils.js +0 -9
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const Stack_1 = require("@strapi/design-system/Stack");
|
|
8
|
-
const Typography_1 = require("@strapi/design-system/Typography");
|
|
9
|
-
const styles_1 = require("./styles");
|
|
10
|
-
const FormSwitch = ({ label, hint, ...props }) => (react_1.default.createElement(Stack_1.Stack, { size: 1 },
|
|
11
|
-
label && (react_1.default.createElement(Typography_1.Typography, { variant: "pi", as: "label", fontWeight: "bold", textColor: "neutral800" }, label)),
|
|
12
|
-
react_1.default.createElement(styles_1.StyledSwitch, { label: label, ...props }),
|
|
13
|
-
hint && (react_1.default.createElement(Typography_1.Typography, { variant: "pi", as: "label", textColor: "neutral600" }, hint))));
|
|
14
|
-
exports.default = FormSwitch;
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.StyledSwitch = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const Switch_1 = require("@strapi/design-system/Switch");
|
|
9
|
-
exports.StyledSwitch = (0, styled_components_1.default)(Switch_1.Switch) `
|
|
10
|
-
& > div > span {
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type HintProps = {
|
|
3
|
-
description: {
|
|
4
|
-
id: string;
|
|
5
|
-
defaultMessage: string;
|
|
6
|
-
values: {};
|
|
7
|
-
} | undefined;
|
|
8
|
-
error: string | undefined;
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const Hint: React.FC<HintProps>;
|
|
13
|
-
export default Hint;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Hint = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const react_intl_1 = require("react-intl");
|
|
9
|
-
const Typography_1 = require("@strapi/design-system/Typography");
|
|
10
|
-
const Hint = ({ id, error, name, description }) => {
|
|
11
|
-
const { formatMessage } = (0, react_intl_1.useIntl)();
|
|
12
|
-
const hint = description
|
|
13
|
-
? formatMessage({ id: description.id, defaultMessage: description.defaultMessage }, { ...description.values })
|
|
14
|
-
: '';
|
|
15
|
-
if (!hint || error) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
return (react_1.default.createElement(Typography_1.Typography, { as: "p", variant: "pi", id: `${id || name}-hint`, textColor: "neutral600" }, hint));
|
|
19
|
-
};
|
|
20
|
-
exports.Hint = Hint;
|
|
21
|
-
exports.default = exports.Hint;
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.IconButtonGroupStyled = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const IconButton_1 = require("@strapi/design-system/IconButton");
|
|
9
|
-
exports.IconButtonGroupStyled = (0, styled_components_1.default)(IconButton_1.IconButtonGroup) `
|
|
10
|
-
${({ isSingle }) => isSingle &&
|
|
11
|
-
`
|
|
12
|
-
span:first-child button {
|
|
13
|
-
border-radius: 4px;
|
|
14
|
-
}
|
|
15
|
-
`}
|
|
16
|
-
${({ withMargin }) => withMargin &&
|
|
17
|
-
`
|
|
18
|
-
margin-left: .5rem;
|
|
19
|
-
`}
|
|
20
|
-
`;
|
|
21
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const pluginId_1 = require("../../pluginId");
|
|
5
|
-
const Initializer = ({ setPlugin }) => {
|
|
6
|
-
const ref = (0, react_1.useRef)();
|
|
7
|
-
ref.current = setPlugin;
|
|
8
|
-
(0, react_1.useEffect)(() => {
|
|
9
|
-
ref.current(pluginId_1.pluginId);
|
|
10
|
-
}, []);
|
|
11
|
-
return null;
|
|
12
|
-
};
|
|
13
|
-
exports.default = Initializer;
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const helper_plugin_1 = require("@strapi/helper-plugin");
|
|
8
|
-
const styles_1 = require("./styles");
|
|
9
|
-
const LoadingIndicatorOverlay = () => (react_1.default.createElement(styles_1.LoadingIndicatorOverlayWrapper, null,
|
|
10
|
-
react_1.default.createElement(helper_plugin_1.LoadingIndicatorPage, null)));
|
|
11
|
-
exports.default = LoadingIndicatorOverlay;
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const LoadingIndicatorOverlayWrapper: import("styled-components").StyledComponent<any, any, any, any>;
|
|
2
|
-
export declare const LoadingIndicatorContainer: import("styled-components").StyledComponent<(props: any) => any, any, {}, never>;
|
|
3
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.LoadingIndicatorContainer = exports.LoadingIndicatorOverlayWrapper = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const Box_1 = require("@strapi/design-system/Box");
|
|
9
|
-
exports.LoadingIndicatorOverlayWrapper = (0, styled_components_1.default)(Box_1.Box) `
|
|
10
|
-
height: 100% !important;
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 0;
|
|
13
|
-
left: 0;
|
|
14
|
-
width: 100%;
|
|
15
|
-
background: rgba(255, 255, 255, 0.7);
|
|
16
|
-
z-index: 1;
|
|
17
|
-
|
|
18
|
-
& > div {
|
|
19
|
-
height: 100% !important;
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
exports.LoadingIndicatorContainer = (0, styled_components_1.default)((props) => props.as) `
|
|
23
|
-
position: relative;
|
|
24
|
-
`;
|
|
25
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Comment } from "../../../../types/contentTypes";
|
|
3
|
-
type ModeratorResponseProps = {
|
|
4
|
-
rootThread: Comment;
|
|
5
|
-
};
|
|
6
|
-
declare const ModeratorResponse: React.FC<ModeratorResponseProps>;
|
|
7
|
-
export default ModeratorResponse;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const react_query_1 = require("react-query");
|
|
28
|
-
const api_1 = require("../../pages/utils/api");
|
|
29
|
-
const styles_1 = require("./styles");
|
|
30
|
-
const api_2 = require("../../pages/utils/api");
|
|
31
|
-
const Box_1 = require("@strapi/design-system/Box");
|
|
32
|
-
const Typography_1 = require("@strapi/design-system/Typography");
|
|
33
|
-
const Flex_1 = require("@strapi/design-system/Flex");
|
|
34
|
-
const Button_1 = require("@strapi/design-system/Button");
|
|
35
|
-
const Divider_1 = require("@strapi/design-system/Divider");
|
|
36
|
-
const utils_1 = require("../../utils");
|
|
37
|
-
const Field_1 = require("../Wysiwyg/Field");
|
|
38
|
-
const helper_plugin_1 = require("@strapi/helper-plugin");
|
|
39
|
-
const pluginId_1 = require("../../pluginId");
|
|
40
|
-
const ModeratorResponse = ({ rootThread, }) => {
|
|
41
|
-
const { id: threadId, blockedThread } = rootThread;
|
|
42
|
-
const [commentField, setCommentField] = (0, react_1.useState)("");
|
|
43
|
-
const [isFieldEmpty, setIsFieldEmpty] = (0, react_1.useState)(true);
|
|
44
|
-
const handleCommentChange = (e) => {
|
|
45
|
-
setCommentField(e.target.value);
|
|
46
|
-
};
|
|
47
|
-
const user = helper_plugin_1.auth.get("userInfo");
|
|
48
|
-
(0, react_1.useEffect)(() => {
|
|
49
|
-
setIsFieldEmpty(!commentField);
|
|
50
|
-
}, [commentField]);
|
|
51
|
-
const toggleNotification = (0, helper_plugin_1.useNotification)();
|
|
52
|
-
const queryClient = (0, react_query_1.useQueryClient)();
|
|
53
|
-
const { lockApp, unlockApp } = (0, helper_plugin_1.useOverlayBlocker)();
|
|
54
|
-
const onSuccess = (message, stateAction = (_func) => { }) => async () => {
|
|
55
|
-
await queryClient.invalidateQueries("get-details-data");
|
|
56
|
-
toggleNotification({
|
|
57
|
-
type: "success",
|
|
58
|
-
message: `${pluginId_1.pluginId}.${message}`,
|
|
59
|
-
});
|
|
60
|
-
stateAction(false);
|
|
61
|
-
setCommentField('');
|
|
62
|
-
unlockApp && unlockApp();
|
|
63
|
-
};
|
|
64
|
-
const onError = (err) => {
|
|
65
|
-
(0, utils_1.handleAPIError)(err, toggleNotification);
|
|
66
|
-
};
|
|
67
|
-
const unblockItemThreadMutation = (0, react_query_1.useMutation)(api_1.unblockItemThread);
|
|
68
|
-
const postCommentMutation = (0, react_query_1.useMutation)(api_2.postComment, {
|
|
69
|
-
onSuccess: onSuccess("page.details.actions.comment.post.confirmation"),
|
|
70
|
-
onError,
|
|
71
|
-
});
|
|
72
|
-
const handleSave = async () => {
|
|
73
|
-
lockApp && lockApp();
|
|
74
|
-
await postCommentMutation.mutate({
|
|
75
|
-
threadId,
|
|
76
|
-
body: commentField,
|
|
77
|
-
author: user,
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
const handleReopen = async () => {
|
|
81
|
-
lockApp && lockApp();
|
|
82
|
-
await unblockItemThreadMutation.mutate(threadId);
|
|
83
|
-
await postCommentMutation.mutate({
|
|
84
|
-
threadId,
|
|
85
|
-
body: commentField,
|
|
86
|
-
author: user,
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
const intlLabel = {
|
|
90
|
-
id: "",
|
|
91
|
-
defaultMessage: "",
|
|
92
|
-
values: {},
|
|
93
|
-
};
|
|
94
|
-
return (react_1.default.createElement(styles_1.ModeratorResponseStyled, null,
|
|
95
|
-
react_1.default.createElement(Divider_1.Divider, null),
|
|
96
|
-
react_1.default.createElement(Box_1.Box, { hasRadius: true, padding: 4 },
|
|
97
|
-
react_1.default.createElement(Box_1.Box, null,
|
|
98
|
-
react_1.default.createElement(Typography_1.Typography, { variant: "delta", textColor: "neutral800", id: "moderator-reply" }, (0, utils_1.getMessage)("page.details.panel.discussion.reply", "Reply"))),
|
|
99
|
-
react_1.default.createElement(Box_1.Box, { paddingTop: 2, paddingBottom: 4 },
|
|
100
|
-
react_1.default.createElement(Field_1.Wysiwyg, { name: "", type: "wysiwyg", value: commentField, onChange: handleCommentChange, intlLabel: intlLabel })),
|
|
101
|
-
react_1.default.createElement(Flex_1.Flex, { direction: "row", justifyContent: "flex-end", gap: 2 },
|
|
102
|
-
blockedThread && (react_1.default.createElement(Button_1.Button, { variant: "secondary", onClick: handleReopen, disabled: isFieldEmpty }, (0, utils_1.getMessage)("page.details.panel.discussion.reopen", "Re-open"))),
|
|
103
|
-
react_1.default.createElement(Button_1.Button, { variant: "primary", onClick: handleSave, disabled: isFieldEmpty }, (0, utils_1.getMessage)("page.details.panel.discussion.send", "Send"))))));
|
|
104
|
-
};
|
|
105
|
-
exports.default = ModeratorResponse;
|
|
106
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ModeratorResponseStyled = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const Stack_1 = require("@strapi/design-system/Stack");
|
|
9
|
-
exports.ModeratorResponseStyled = (0, styled_components_1.default)(Stack_1.Stack) `
|
|
10
|
-
width: 100%;
|
|
11
|
-
`;
|
|
12
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Id } from "strapi-typed";
|
|
3
|
-
type ModeratorResponseModalProps = {
|
|
4
|
-
content: string;
|
|
5
|
-
id: Id;
|
|
6
|
-
title: string;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
};
|
|
9
|
-
declare const ModeratorResponseModal: React.FC<ModeratorResponseModalProps>;
|
|
10
|
-
export default ModeratorResponseModal;
|
|
11
|
-
//# sourceMappingURL=ModeratorResponseModal.d.ts.map
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const react_query_1 = require("react-query");
|
|
28
|
-
const api_1 = require("../../pages/utils/api");
|
|
29
|
-
const ModalLayout_1 = require("@strapi/design-system/ModalLayout");
|
|
30
|
-
const Typography_1 = require("@strapi/design-system/Typography");
|
|
31
|
-
const Button_1 = require("@strapi/design-system/Button");
|
|
32
|
-
const utils_1 = require("../../utils");
|
|
33
|
-
const Field_1 = require("../Wysiwyg/Field");
|
|
34
|
-
const helper_plugin_1 = require("@strapi/helper-plugin");
|
|
35
|
-
const pluginId_1 = require("../../pluginId");
|
|
36
|
-
const ModeratorResponseModal = ({ content, id, title, onClose, }) => {
|
|
37
|
-
const [commentField, setCommentField] = (0, react_1.useState)(content);
|
|
38
|
-
const handleCommentChange = (e) => {
|
|
39
|
-
setCommentField(e.target.value);
|
|
40
|
-
};
|
|
41
|
-
const user = helper_plugin_1.auth.get("userInfo");
|
|
42
|
-
const handleClose = onClose;
|
|
43
|
-
const toggleNotification = (0, helper_plugin_1.useNotification)();
|
|
44
|
-
const queryClient = (0, react_query_1.useQueryClient)();
|
|
45
|
-
const { lockApp, unlockApp } = (0, helper_plugin_1.useOverlayBlocker)();
|
|
46
|
-
const onSuccess = (message, stateAction = (_func) => { }) => async () => {
|
|
47
|
-
await queryClient.invalidateQueries("get-details-data");
|
|
48
|
-
onClose();
|
|
49
|
-
toggleNotification({
|
|
50
|
-
type: "success",
|
|
51
|
-
message: `${pluginId_1.pluginId}.${message}`,
|
|
52
|
-
});
|
|
53
|
-
stateAction(false);
|
|
54
|
-
unlockApp && unlockApp();
|
|
55
|
-
};
|
|
56
|
-
const onError = (err) => {
|
|
57
|
-
(0, utils_1.handleAPIError)(err, toggleNotification);
|
|
58
|
-
};
|
|
59
|
-
const postCommentMutation = (0, react_query_1.useMutation)(api_1.postComment, {
|
|
60
|
-
onSuccess: onSuccess("page.details.actions.comment.post.confirmation"),
|
|
61
|
-
onError,
|
|
62
|
-
});
|
|
63
|
-
const updateCommentMutation = (0, react_query_1.useMutation)(api_1.updateComment, {
|
|
64
|
-
onSuccess: onSuccess("page.details.actions.comment.update.confirmation"),
|
|
65
|
-
onError,
|
|
66
|
-
});
|
|
67
|
-
const handlePostComment = async () => {
|
|
68
|
-
lockApp && lockApp();
|
|
69
|
-
await postCommentMutation.mutate({
|
|
70
|
-
threadId: id,
|
|
71
|
-
body: commentField,
|
|
72
|
-
author: user,
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
const handleUpdateComment = async () => {
|
|
76
|
-
lockApp && lockApp();
|
|
77
|
-
await updateCommentMutation.mutate({
|
|
78
|
-
id,
|
|
79
|
-
body: commentField,
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
const intlLabel = {
|
|
83
|
-
id: "",
|
|
84
|
-
defaultMessage: "",
|
|
85
|
-
values: {},
|
|
86
|
-
};
|
|
87
|
-
return (react_1.default.createElement(ModalLayout_1.ModalLayout, { onClose: handleClose, labelledBy: title },
|
|
88
|
-
react_1.default.createElement(ModalLayout_1.ModalHeader, null,
|
|
89
|
-
react_1.default.createElement(Typography_1.Typography, { fontWeight: "bold", textColor: "neutral800", as: "h2", id: "title" }, title)),
|
|
90
|
-
react_1.default.createElement(ModalLayout_1.ModalBody, null,
|
|
91
|
-
react_1.default.createElement(Field_1.Wysiwyg, { name: "", value: commentField, onChange: handleCommentChange, intlLabel: intlLabel })),
|
|
92
|
-
react_1.default.createElement(ModalLayout_1.ModalFooter, { startActions: react_1.default.createElement(Button_1.Button, { onClick: handleClose, variant: "tertiary" }, (0, utils_1.getMessage)("compontents.confirmation.dialog.button.cancel")), endActions: content.length ? (react_1.default.createElement(Button_1.Button, { onClick: handleUpdateComment }, (0, utils_1.getMessage)("page.details.actions.thread.modal.update.comment"))) : (react_1.default.createElement(Button_1.Button, { onClick: handlePostComment }, (0, utils_1.getMessage)("page.details.actions.thread.modal.start.thread"))) })));
|
|
93
|
-
};
|
|
94
|
-
exports.default = ModeratorResponseModal;
|
|
95
|
-
//# sourceMappingURL=ModeratorResponseModal.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const SubNav_1 = require("@strapi/design-system/SubNav");
|
|
8
|
-
const icons_1 = require("../icons");
|
|
9
|
-
const getMessage_1 = __importDefault(require("../../utils/getMessage"));
|
|
10
|
-
const getUrl_1 = __importDefault(require("../../utils/getUrl"));
|
|
11
|
-
const Nav = ({ visible = false, hasNewComments, hasNewReports }) => {
|
|
12
|
-
if (!visible) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
return (react_1.default.createElement(SubNav_1.SubNav, { ariaLabel: 'Comments sub nav' },
|
|
16
|
-
react_1.default.createElement(SubNav_1.SubNavHeader, { label: (0, getMessage_1.default)('plugin.name') }),
|
|
17
|
-
react_1.default.createElement(SubNav_1.SubNavSections, null,
|
|
18
|
-
react_1.default.createElement(SubNav_1.SubNavSection, { label: (0, getMessage_1.default)('nav.header.moderation') },
|
|
19
|
-
react_1.default.createElement(SubNav_1.SubNavLink, { to: (0, getUrl_1.default)('discover'), icon: icons_1.discuss }, (0, getMessage_1.default)('nav.item.discover')),
|
|
20
|
-
react_1.default.createElement(SubNav_1.SubNavLink, { to: (0, getUrl_1.default)('reports'), withBullet: hasNewReports, icon: icons_1.thumbDown }, (0, getMessage_1.default)('nav.item.reports'))))));
|
|
21
|
-
};
|
|
22
|
-
exports.default = Nav;
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
7
|
-
const Wrapper = styled_components_1.default.div `
|
|
8
|
-
position: absolute;
|
|
9
|
-
top: 0;
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
overflow: auto;
|
|
13
|
-
padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
|
|
14
|
-
font-size: ${14 / 16}rem;
|
|
15
|
-
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
16
|
-
z-index: 2;
|
|
17
|
-
cursor: not-allowed;
|
|
18
|
-
color: ${({ theme }) => theme.colors.neutral800};
|
|
19
|
-
|
|
20
|
-
h1,
|
|
21
|
-
h2,
|
|
22
|
-
h3,
|
|
23
|
-
h4,
|
|
24
|
-
h5,
|
|
25
|
-
h6 {
|
|
26
|
-
margin-block-start: 10px;
|
|
27
|
-
margin-block-end: 10px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
p {
|
|
31
|
-
margin-bottom: 10px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
h1 {
|
|
35
|
-
font-size: ${36 / 16}rem;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
h2 {
|
|
40
|
-
font-size: ${30 / 16}rem;
|
|
41
|
-
font-weight: 500;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
h3 {
|
|
45
|
-
font-size: ${24 / 16}rem;
|
|
46
|
-
font-weight: 500;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
h4 {
|
|
50
|
-
font-size: ${20 / 16}rem;
|
|
51
|
-
font-weight: 500;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
strong {
|
|
55
|
-
font-weight: 800;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
em {
|
|
59
|
-
font-style: italic;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
blockquote {
|
|
63
|
-
margin-top: 41px;
|
|
64
|
-
margin-bottom: 34px;
|
|
65
|
-
font-size: ${14 / 16}rem;
|
|
66
|
-
font-weight: 400;
|
|
67
|
-
border-left: 5px solid #eee;
|
|
68
|
-
font-style: italic;
|
|
69
|
-
padding: 10px 20px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
img {
|
|
73
|
-
max-width: 100%;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
table {
|
|
77
|
-
font-size: 13px;
|
|
78
|
-
thead {
|
|
79
|
-
background: rgb(243, 243, 243);
|
|
80
|
-
tr {
|
|
81
|
-
height: 43px;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
tr {
|
|
85
|
-
border: 1px solid #c6cbd1;
|
|
86
|
-
}
|
|
87
|
-
th,
|
|
88
|
-
td {
|
|
89
|
-
padding: 0 25px;
|
|
90
|
-
border: 1px solid #c6cbd1;
|
|
91
|
-
border-bottom: 0;
|
|
92
|
-
border-top: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
tbody {
|
|
96
|
-
tr {
|
|
97
|
-
height: 54px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
pre,
|
|
103
|
-
code {
|
|
104
|
-
font-size: 13px;
|
|
105
|
-
border-radius: 3px;
|
|
106
|
-
background-color: #002b36;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* Inline code */
|
|
110
|
-
p,
|
|
111
|
-
pre,
|
|
112
|
-
td {
|
|
113
|
-
> code {
|
|
114
|
-
color: #839496;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.warning {
|
|
119
|
-
background-color: #faa684;
|
|
120
|
-
padding: 30px;
|
|
121
|
-
border-radius: 3px;
|
|
122
|
-
}
|
|
123
|
-
.tip {
|
|
124
|
-
padding: 30px;
|
|
125
|
-
border-radius: 3px;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.footnote-ref,
|
|
129
|
-
.footnote-backref {
|
|
130
|
-
color: #007bff;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
ol {
|
|
134
|
-
list-style-type: decimal;
|
|
135
|
-
margin-block-start: ${({ theme }) => theme.spaces[4]};
|
|
136
|
-
margin-block-end: ${({ theme }) => theme.spaces[4]};
|
|
137
|
-
margin-inline-start: 0px;
|
|
138
|
-
margin-inline-end: 0px;
|
|
139
|
-
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
140
|
-
ol,
|
|
141
|
-
ul {
|
|
142
|
-
margin-block-start: 0px;
|
|
143
|
-
margin-block-end: 0px;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
ul {
|
|
148
|
-
list-style-type: disc;
|
|
149
|
-
margin-block-start: ${({ theme }) => theme.spaces[4]};
|
|
150
|
-
margin-block-end: ${({ theme }) => theme.spaces[4]};
|
|
151
|
-
margin-inline-start: 0px;
|
|
152
|
-
margin-inline-end: 0px;
|
|
153
|
-
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
154
|
-
ul,
|
|
155
|
-
ol {
|
|
156
|
-
margin-block-start: 0px;
|
|
157
|
-
margin-block-end: 0px;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
`;
|
|
161
|
-
exports.default = Wrapper;
|
|
162
|
-
//# sourceMappingURL=Wrapper.js.map
|