strapi-plugin-comments 3.1.4 → 3.2.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.
@@ -20,7 +20,7 @@ const e = {
20
20
  "page.common.item.status.RESOLVED": "Resolved",
21
21
  "page.common.item.status.TO_REVIEW": "To review ({count, number})",
22
22
  "page.common.item.status.REJECTED": "Rejected",
23
- "page.common.item.status.REMOVED": "Removed by author",
23
+ "page.common.item.status.REMOVED": "Removed",
24
24
  "page.common.item.status.setFilter": "Set status...",
25
25
  "page.updates.header": "Recent updates",
26
26
  "page.discover.header": "Discover threads",
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={"plugin.name":"Comments","plugin.section":"Comments plugin","plugin.section.item":"Configuration","common.button.back":"Go back","common.more":"More","common.search":"Search","nav.header.moderation":"Moderation","nav.header.settings":"Settings","nav.item.updates":"Updates","nav.item.discover":"Discover","nav.item.reports":"Reports","nav.item.settings":"Settings","page.auth.noAccess":"No access","page.auth.not.allowed":"Oops! It seems like You do not have access to this page...","page.common.item.status.OPEN":"Open","page.common.item.status.PENDING":"Pending","page.common.item.status.BLOCKED":"Blocked","page.common.item.status.APPROVED":"Approved","page.common.item.status.RESOLVED":"Resolved","page.common.item.status.TO_REVIEW":"To review ({count, number})","page.common.item.status.REJECTED":"Rejected","page.common.item.status.REMOVED":"Removed","page.common.item.status.setFilter":"Set status...","page.updates.header":"Recent updates","page.discover.header":"Discover threads","page.discover.header.count":"{count} entries found","page.discover.table.header.id":"ID","page.discover.table.header.author":"Author","page.discover.table.header.author.email":"E-mail not provided","page.discover.table.header.message":"Message","page.discover.table.header.thread":"Thread of","page.discover.table.header.entry":"Entry","page.discover.table.header.lastUpdate":"Last update","page.discover.table.header.status":"Status","page.discover.table.header.actions":"Actions","page.discover.table.cell.thread":"Comment #{id}","page.discover.table.action.display":"Display","page.discover.table.action.reports":"Reports","page.discover.table.empty":"You don't have any comments yet.","page.discover.table.empty.search":"No comments match the search.","page.discover.table.filters":"Filtering","page.discover.table.reports.review":"Review reports","page.reports.header":"Resolve reports","page.reports.table.empty":"You don't have any reports yet.","page.reports.table.empty.search":"No reports match the search.","page.reports.table.header.id":"ID","page.reports.table.header.reason":"Reason","page.reports.table.header.content":"Content","page.reports.table.header.status":"Status","page.reports.table.header.issueDate":"Issue date","page.reports.table.header.relatedComment":"Related comment","page.reports.table.header.actions":"Actions","page.reports.table.cell.action.resolve":"resolved","page.reports.table.cell.action.block":"Block","page.details.header":"Discussion panel","page.details.header.description":"Drilldown and manage discussion related to the entity","page.details.header.description.empty":"This entry has been deleted","page.details.panel.discussion":"Discussion","page.details.panel.discussion.nav.drilldown":"Drilldown","page.details.panel.discussion.nav.back":"Go top","page.details.panel.discussion.warnings.reports.description":"open reports","page.details.panel.discussion.warnings.reports.review":"Review","page.details.panel.discussion.warnings.reports.dialog.list":"Reports","page.details.panel.discussion.warnings.reports.dialog.header":"Moderation: Review open reports","page.details.panel.discussion.warnings.reports.dialog.selectAll":"Select all entries","page.details.panel.discussion.warnings.reports.dialog.select":"Select entity","page.details.panel.discussion.warnings.reports.dialog.reason":"Reason","page.details.panel.discussion.warnings.reports.dialog.reason.BAD_LANGUAGE":"Bad language","page.details.panel.discussion.warnings.reports.dialog.reason.DISCRIMINATION":"Discrimination","page.details.panel.discussion.warnings.reports.dialog.reason.OTHER":"Other","page.details.panel.discussion.warnings.reports.dialog.content":"Content","page.details.panel.discussion.warnings.reports.dialog.createdAt":"Issue date","page.details.panel.discussion.warnings.reports.dialog.status":"Status","page.details.panel.discussion.warnings.reports.dialog.status.OPEN":"Open","page.details.panel.discussion.warnings.reports.dialog.status.RESOLVED":"Resolved","page.details.panel.discussion.warnings.reports.dialog.actions":"Actions","page.details.panel.discussion.warnings.reports.dialog.actions.resolve":"Resolve","page.details.panel.discussion.warnings.reports.dialog.actions.resolve.selected":"Resolve reports ({count})","page.details.panel.discussion.warnings.reports.dialog.confirmation.success":"Open report has been resolved","page.details.panel.discussion.warnings.reports.selected.dialog.confirmation.success":"Open reports has been resolved","page.details.panel.discussion.warnings.comments.header":"Moderation: Review reported comment","page.details.panel.discussion.status.blocked":"Blocked","page.details.panel.discussion.reply":"Reply","page.details.panel.discussion.reopen":"Re-open","page.details.panel.discussion.send":"Send Moderator response","page.details.actions.comment.post.confirmation":"Comment has been posted","page.details.actions.comment.update.confirmation":"Comment has been updated","page.details.panel.entity":"Entity details","page.details.panel.status":"Discussion is","page.details.panel.status.open":"Open","page.details.panel.status.blocked":"Blocked","page.details.panel.status.pending":"Pending","page.details.panel.loading":"Fetching entity...","page.details.actions.comment.block":"Block comment","page.details.actions.comment.block.confirmation.header":"Moderation: Block comment","page.details.actions.comment.block.confirmation.description":"Do you really want to block this comment?","page.details.actions.comment.block.confirmation.button.confirm":"Yes, block it","page.details.actions.comment.block.confirmation.success":"Comment has been blocked","page.details.actions.comment.unblock":"Unblock comment","page.details.actions.comment.unblock.confirmation.success":"Comment has been unblocked","page.details.actions.comment.delete":"Delete comment","page.details.actions.comment.delete.confirmation.success":"Comment has been deleted","page.details.actions.comment.reports.review":"Review","page.details.actions.comment.reports.approve":"Approve","page.details.actions.comment.reports.reject":"Reject","page.details.actions.thread.block":"Block thread","page.details.actions.thread.block.confirmation.header":"Moderation: Block thread","page.details.actions.thread.block.confirmation.description":"Do you really want to block whole thread? No further discussions are going to be allowed.","page.details.actions.thread.block.confirmation.button.confirm":"Yes, block it","page.details.actions.thread.block.confirmation.success":"Thread has been blocked","page.details.actions.thread.unblock":"Unblock thread","page.details.actions.thread.unblock.confirmation.success":"Thread has been unblocked","page.details.actions.thread.modal.start.thread":"Start thread","page.details.actions.thread.modal.update.comment":"Update comment","page.details.actions.comment.approve.confirmation.success":"Comment has been approved","page.details.actions.comment.reject.confirmation.success":"Comment has been rejected","page.details.filters.label":"View","page.details.filters.removed.visibility":"Show removed comments","page.coming.soon":"Wait for what is coming soon...","page.settings":"Settings","page.settings.header.title":"Comments","page.settings.header.description":"Configure your comments moderation capabilities","page.settings.actions.submit":"Save","page.settings.actions.restore":"Restore default settings","page.settings.actions.restart":"Restart Strapi","page.settings.section.general":"General configuration","page.settings.section.additional":"Additional configuration","page.settings.section.client":"Client portal configuration","page.settings.section.restore":"Restore default settings","page.settings.section.restore.subtitle":"Discarding all of applied settings and getting back to plugin default ones. Use reasonable.","page.settings.form.enabledCollections.label":"Enable comments only for","page.settings.form.enabledCollections.placeholder":"Select one or more collection","page.settings.form.enabledCollections.hint":"If none is selected, all the content types are enabled","page.settings.form.contentTypesSettings.label":"Content types","page.settings.form.contentTypesSettings.tooltip":"Custom configuration per content type","page.settings.form.moderatorRoles.label":"Send significant notifications to","page.settings.form.moderatorRoles.placeholder":"Select one or more roles","page.settings.form.moderatorRoles.hint":"Roles which are going to be notified by the plugin about significant actions to perform","page.settings.form.badWords.label":"Bad words filtering","page.settings.form.badWords.hint":"If enabled, every post / update of comment is going to be checked against bad wording","page.settings.form.gqlAuth.label":"GraphQL queries authorization","page.settings.form.gqlAuth.hint":"If enabled, GraphQL API queries & mutations can be triggered only by Authenticated Strapi users. Otherwise API remains open.","page.settings.form.approvalFlow.label":"Approval flow","page.settings.form.approvalFlow.hint":'Comments associated with content type "{name}" are going to be taken through manual approval flow',"page.settings.form.entryLabel.label":"Title fields","page.settings.form.entryLabel.placeholder":"Select at least one or leave empty to apply defaults","page.settings.form.entryLabel.hint":'If left empty title rendering is going to take following ordered fields: "Title", "Subject" & "Name"',"page.settings.form.client.url.label":"Portal URL","page.settings.form.client.url.hint":"URL where your client portal is available","page.settings.form.client.email.label":"Communication e-mail","page.settings.form.client.email.hint":"E-mail address used for mailings, communication with users on behalf of portal team","page.settings.actions.restore.confirmation.header":"Restore default configuration","page.settings.actions.restore.confirmation.description":"You're about to restore plugin configuration to it default values. It might have destructive impact on already collected content. Do you really want to proceed?","page.settings.actions.restore.confirmation.button.confirm":"Yes, I want to restore","page.settings.actions.restart.alert.title":"Strapi requires restart","page.settings.actions.restart.alert.description":"You've made a configuration changes which requires your Strapi application to be restarted to take an effect in GraphQL schema. Do it manually or by using below trigger.","page.settings.actions.restart.alert.close":"Discard","page.settings.notification.fetch.error":"Failed to fetch configuration. Retrying...","page.settings.notification.submit.success":"Configuration has been saved successfully","page.settings.notification.submit.error":"Failed to save configuration. Try again.","page.settings.notification.restore.success":"Configuration has been restored successfully","page.settings.notification.restore.error":"Failed to restore configuration. Try again.","page.settings.notification.restart.success":"Application has been restarted successfully","page.settings.notification.restart.error":"Failed to restart your application. Try to do it manually.","page.settings.loading":"Fetching configuration...","page.settings.form.author.blockedProps.label":"Blocked author details","page.settings.form.author.blockedProps.hint":"Specified properties will be filtered out from author's details (comma-separated)","components.confirmation.dialog.header":"Confirmation","components.confirmation.dialog.description":"Do you really want to perform this action?","components.confirmation.dialog.button.confirm":"Yes, I do","components.confirmation.dialog.button.cancel":"Cancel","components.toogle.enabled":"Enabled","components.toogle.disabled":"Disabled","components.author.unknown":"Author removed","components.reason.unknown":"Reason not provided","components.content.unknown":"Content not provided","components.notAccessPage.back":"Back to homepage","customField.comments.label":"Comments","customField.comments.description":"Specify comments query params","customField.comments.input.commentsNumber.label":"Number of comments","customField.comments.input.renderType.label":"Render comments as","customField.comments.input.renderType.option.tree.label":"Tree","customField.comments.input.renderType.option.flat.label":"Flat list","customField.comments.input.sortByDate.label":"Sort by creation date","customField.comments.input.sortByDate.option.asc.label":"Ascending","customField.comments.input.sortByDate.option.desc.label":"Descending","customField.comments.input.filterBy.label":"Filter by","customField.comments.input.filterBy.option.dateCreated.label":"Creation date","customField.comments.input.filterBy.option.dateCreated.label.details.label":"Specify date","customField.comments.input.filterBy.option.approvalStatus.label":"Approval Status","customField.comments.input.filterBy.option.approvalStatus.label.details.label":"Specify status","customField.comments.input.filterBy.option.approvalStatus.option.pending.label":"Pending","customField.comments.input.filterBy.option.approvalStatus.option.approved.label":"Approved","customField.comments.input.filterBy.option.approvalStatus.option.rejected.label":"Rejected","customField.comments.input.populate.label":"Populate","customField.comments.input.populate.author.label":"Populate author field","customField.comments.input.populate.avatar.label":"Populate avatar field","wysiwyg.bold":"Bold","wysiwyg.italic":"Italic","wysiwyg.underline":"Underline","wysiwyg.strikethrough":"Strikethrough","wysiwyg.bulletList":"Bullet list","wysiwyg.numberList":"Number list","wysiwyg.code":"Code","wysiwyg.link":"Link","wysiwyg.quote":"Quote","success.approveItem":"Comment has been approved","success.rejectItem":"Comment has been rejected"};exports.default=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@strapi/design-system"),y=require("@strapi/icons"),h=require("@strapi/strapi/admin"),g=require("@tanstack/react-query"),s=require("./index-CaQhYHpU.js"),x=require("react"),N=require("styled-components"),W=o=>o&&o.__esModule?o:{default:o},_=W(N),w=({children:o,condition:a})=>a?e.jsx(e.Fragment,{children:o}):null,U=(o={})=>{const a=s.useAPI(),j=g.useMutation({mutationFn:a.settings.update,onSuccess:o.updateSettingsMutationSuccess,onError:o.updateSettingsMutationError}),d=g.useMutation({mutationFn:a.settings.restore,onSuccess:o.restoreSettingsMutationSuccess,onError:o.restoreSettingsMutationError}),b=g.useMutation({mutationFn:a.settings.restart,onSuccess:o.restartStrapiMutationSuccess,onError:o.restartStrapiMutationError}),u=g.useQuery({queryKey:a.config.getKey(),queryFn:a.config.query}),p=g.useQuery({queryKey:a.contentTypeBuilder.all.getKey(),queryFn:a.contentTypeBuilder.all.query}),m=g.useQuery({queryKey:a.roles.getKey(),queryFn:a.roles.query});return x.useMemo(()=>({config:u,collectionTypes:p,roles:m,restoreSettingsMutation:d,updateSettingsMutation:j,restartStrapiMutation:b}),[u,m,p,d,j,b])},M={background:"neutral0",hasRadius:!0,shadow:"filterShadow",padding:6,width:"100%"},V=_.default(t.Alert)(()=>({"[role]":{flexDirection:"column"}})),$=()=>{const o=x.useRef(null),{toggleNotification:a}=h.useNotification(),[j,d]=x.useState(!1),{isLoadingForPermissions:b,canSettingsChange:u}=s.usePermissions(),p=g.useQueryClient(),m=s.useAPI(),{config:l,collectionTypes:C,roles:F,restoreSettingsMutation:T,updateSettingsMutation:R,restartStrapiMutation:A}=U({restoreSettingsMutationSuccess:()=>{p.invalidateQueries({queryKey:m.config.getKey(),exact:!1}),d(!0),a({message:s.getMessage("page.settings.actions.restore.success"),type:"success"})},restartStrapiMutationSuccess:()=>{d(!1)},updateSettingsMutationSuccess:()=>{p.invalidateQueries({queryKey:m.config.getKey(),exact:!1}),d(!0)}}),P=x.useCallback(()=>{o.current?.requestSubmit()},[]),k=x.useCallback(n=>{R.mutate({...n,blockedAuthorProps:n.blockedAuthorProps.split(",").map(r=>r.trim())})},[R]);if(l.status!=="success"||C.status!=="success"||F.status!=="success"||b)return s.getMessage("page.settings.loading");const S=C.data.filter(n=>n.uid.includes("api::")),G=l.data.enabledCollections.filter(n=>S.some(r=>r.uid===n)),v=s.lodashExports.isNil(l.data.badWords)?!0:l.data?.badWords,B=!!l.data.gql?.auth,E=l.data.moderatorRoles.filter(n=>F.data.filter(r=>r.code===n)),H=l.data.client?.url,K=l.data.client?.contactEmail,Q=l.data.blockedAuthorProps??[],O=()=>d(!1);return e.jsxs(e.Fragment,{children:[e.jsx(h.Page.Title,{children:"Comments - settings"}),e.jsxs(h.Page.Main,{children:[e.jsx(h.Layouts.Header,{title:s.getMessage("page.settings.header.title"),subtitle:s.getMessage("page.settings.header.description"),as:"h2",primaryAction:e.jsx(w,{condition:u,children:e.jsx(t.Button,{type:"submit",startIcon:e.jsx(y.Check,{}),onClick:P,children:s.getMessage("page.settings.actions.submit")})})}),e.jsxs(h.Layouts.Content,{children:[j&&e.jsx(t.Box,{marginBottom:4,children:e.jsx(V,{closeLabel:s.getMessage("page.settings.actions.restart.alert.cancel"),title:s.getMessage("page.settings.actions.restart.alert.title"),onClose:O,action:e.jsx(t.Box,{children:e.jsx(t.Button,{onClick:A.mutate,startIcon:e.jsx(y.Play,{}),children:s.getMessage("page.settings.actions.restart")})}),children:e.jsx(t.Box,{marginTop:4,children:s.getMessage("page.settings.actions.restart.alert.description")})})}),e.jsx(h.Form,{method:"POST",width:"auto",height:"auto",ref:o,onSubmit:k,initialValues:{enabledCollections:G,moderatorRoles:E,badWords:v,clientEmail:K,clientUrl:H,gqlAuthEnabled:B,approvalFlow:l.data.approvalFlow,entryLabel:l.data.entryLabel,blockedAuthorProps:Q.join(", ")},children:({values:n,onChange:r})=>e.jsxs(t.Flex,{gap:4,direction:"column",children:[e.jsxs(t.Box,{...M,children:[e.jsx(t.Typography,{variant:"delta",as:"h2",children:s.getMessage("page.settings.section.general")}),e.jsxs(t.Grid.Root,{gap:4,marginTop:4,width:"100%",children:[e.jsx(t.Grid.Item,{xs:12,children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.enabledCollections.hint"),children:[e.jsx(t.Field.Label,{htmlFor:"enabledCollections",children:s.getMessage("page.settings.form.enabledCollections.label")}),e.jsx(t.MultiSelect,{withTags:!0,name:"enabledCollections",value:n.enabledCollections,onChange:i=>{r("enabledCollections",i)},children:S.map(i=>e.jsx(t.MultiSelectOption,{value:i.uid,children:i.schema.displayName},i.uid))}),e.jsx(t.Field.Hint,{})]})}),n.enabledCollections.length>0&&e.jsx(t.Grid.Item,{children:e.jsxs(t.Grid.Root,{gap:4,width:"100%",children:[e.jsx(t.Grid.Item,{children:e.jsx(t.Typography,{children:s.getMessage("page.settings.form.contentTypesSettings.label")})}),e.jsx(t.Grid.Item,{children:e.jsx(t.Accordion.Root,{style:{width:"100%"},children:s.lodashExports.orderBy(n.enabledCollections).map(i=>{const I=S.find(f=>f.uid===i);if(I){const{schema:{displayName:f,attributes:q}}=I,L=Object.keys(q).filter(c=>q[c].type==="string");return e.jsxs(t.Accordion.Item,{value:i,children:[e.jsx(t.Accordion.Header,{children:e.jsx(t.Accordion.Trigger,{children:e.jsx(t.Typography,{variant:"epsilon",as:"h3",children:f})})}),e.jsx(t.Accordion.Content,{children:e.jsxs(t.Grid.Root,{padding:6,gap:4,children:[e.jsx(t.Grid.Item,{children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage({id:"page.settings.form.approvalFlow.hint",props:{name:f}}),children:[e.jsx(t.Field.Label,{children:s.getMessage("page.settings.form.approvalFlow.label")}),e.jsx(t.Switch,{visibleLabels:!0,onLabel:s.getMessage("components.toogle.enabled"),offLabel:s.getMessage("components.toogle.disabled"),checked:n.approvalFlow.includes(i),onCheckedChange:c=>{r("approvalFlow",c?[...n.approvalFlow,i]:n.approvalFlow.filter(D=>D!==i))}}),e.jsx(t.Field.Hint,{})]})}),e.jsx(w,{condition:L.length>0,children:e.jsx(t.Grid.Item,{children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.entryLabel.hint"),children:[e.jsx(t.Field.Label,{children:s.getMessage("page.settings.form.entryLabel.label")}),e.jsx(t.MultiSelect,{withTags:!0,placeholder:s.getMessage("page.settings.form.entryLabel.placeholder"),name:"enabledCollections",value:n.entryLabel[i]??[],onChange:c=>{r("entryLabel",{...n.entryLabel,[i]:c})},children:L.map(c=>e.jsx(t.MultiSelectOption,{value:c,children:c},c))}),e.jsx(t.Field.Hint,{})]})})})]})})]},i)}return null})})})]})})]})]}),e.jsxs(t.Box,{...M,children:[e.jsx(t.Typography,{variant:"delta",as:"h2",children:s.getMessage("page.settings.section.additional")}),e.jsxs(t.Grid.Root,{gap:4,marginTop:4,width:"100%",children:[e.jsx(t.Grid.Item,{col:4,xs:12,alignItems:"start",children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.enabledCollections.hint"),children:[e.jsx(t.Field.Label,{htmlFor:"enabledCollections",children:s.getMessage("page.settings.form.enabledCollections.label")}),e.jsx(t.Toggle,{name:"badWords",checked:n.badWords,onChange:r,onLabel:s.getMessage("components.toogle.enabled"),offLabel:s.getMessage("components.toogle.disabled"),width:"100%"}),e.jsx(t.Field.Hint,{})]})}),e.jsx(t.Grid.Item,{col:4,xs:12,alignItems:"start",children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.author.blockedProps.hint"),children:[e.jsx(t.Field.Label,{htmlFor:"enabledCollections",children:s.getMessage("page.settings.form.author.blockedProps.label")}),e.jsx(t.Field.Input,{name:"blockedAuthorProps",value:n.blockedAuthorProps,onChange:r}),e.jsx(t.Field.Hint,{})]})}),e.jsx(t.Grid.Item,{col:4,xs:12,alignItems:"start",children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.gqlAuth.hint"),children:[e.jsx(t.Field.Label,{children:s.getMessage("page.settings.form.gqlAuth.label")}),e.jsx(t.Toggle,{name:"gqlAuthEnabled",checked:n.gqlAuthEnabled,onChange:r,onLabel:s.getMessage("components.toogle.enabled"),offLabel:s.getMessage("components.toogle.disabled"),width:"100%"}),e.jsx(t.Field.Hint,{})]})})]})]}),e.jsxs(t.Box,{...M,children:[e.jsx(t.Typography,{variant:"delta",as:"h2",children:s.getMessage("page.settings.section.client")}),e.jsxs(t.Grid.Root,{gap:4,marginTop:4,width:"100%",children:[e.jsx(t.Grid.Item,{col:4,xs:12,alignItems:"start",children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.client.url.hint"),children:[e.jsx(t.Field.Label,{children:s.getMessage("page.settings.form.client.url.label")}),e.jsx(t.Field.Input,{name:"clientUrl",onChange:r}),e.jsx(t.Field.Hint,{})]})}),e.jsx(t.Grid.Item,{col:4,xs:12,alignItems:"start",children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.client.email.hint"),children:[e.jsx(t.Field.Label,{children:s.getMessage("page.settings.form.client.email.label")}),e.jsx(t.Field.Input,{name:"clientEmail",onChange:r}),e.jsx(t.Field.Hint,{})]})}),e.jsx(t.Grid.Item,{col:4,xs:12,alignItems:"start",children:e.jsxs(t.Field.Root,{width:"100%",hint:s.getMessage("page.settings.form.moderatorRoles.hint"),children:[e.jsx(t.Field.Label,{children:s.getMessage("page.settings.form.moderatorRoles.label")}),e.jsx(t.MultiSelect,{withTags:!0,placeholder:s.getMessage("page.settings.form.moderatorRoles.placeholder"),name:"enabledCollections",value:n.moderatorRoles,onChange:i=>{r("moderatorRoles",i)},children:F.data.map(i=>e.jsx(t.MultiSelectOption,{value:i.code,children:i.name},i.code))}),e.jsx(t.Field.Hint,{})]})})]})]}),e.jsx(w,{condition:u,children:e.jsx(t.Box,{...M,children:e.jsxs(t.Flex,{gap:4,direction:"column",alignItems:"flex-start",children:[e.jsxs(t.Flex,{gap:2,direction:"column",alignItems:"flex-start",children:[e.jsx(t.Typography,{variant:"delta",as:"h2",children:s.getMessage("page.settings.section.restore")}),e.jsx(t.Typography,{variant:"pi",as:"h4",children:s.getMessage("page.settings.section.restore.subtitle")})]}),e.jsx(s.ConfirmationDialog,{Trigger:({onClick:i})=>e.jsx(t.Button,{variant:"danger-light",startIcon:e.jsx(y.ArrowClockwise,{}),onClick:i,children:s.getMessage("page.settings.actions.restore")}),onConfirm:T.mutate,title:s.getMessage("page.settings.actions.restore.confirmation.header"),labelConfirm:s.getMessage("page.settings.actions.restore.confirmation.button.confirm"),iconConfirm:e.jsx(y.ArrowClockwise,{}),children:s.getMessage("page.settings.actions.restore.confirmation.description")})]})})})]})})]})]})]})},z=()=>e.jsx(s.CommonProviders,{children:e.jsx($,{})});exports.default=z;
@@ -0,0 +1,5 @@
1
+ "use strict";require("react");const g=require("@strapi/design-system");require("@strapi/icons");const p=require("styled-components"),o=require("react/jsx-runtime"),c=(e,r="")=>Object.keys(e).reduce((i,n)=>{const l=r.length?`${r}.`:"";return typeof e[n]=="object"&&e[n]!==null&&!Array.isArray(e[n])?Object.assign(i,c(e[n],l+n)):i[l+n]=e[n],i},{}),u=(e,r)=>{if(!r)throw new TypeError("pluginId can't be empty");return Object.keys(e).reduce((i,n)=>(i[`${r}.${n}`]=e[n],i),{})};p.styled(g.Flex)`
2
+ &>* {
3
+ width: 100%;
4
+ }
5
+ `;const h="strapi-plugin-comments",v={displayName:"Comments"},f=576,q=({width:e=24,height:r=24})=>o.jsx("svg",{viewBox:`0 0 ${e} ${r}`,xmlns:"http://www.w3.org/2000/svg",height:`${r}px`,children:o.jsx("g",{style:{transform:`scale(${e/f})`},fill:"currentColor",children:o.jsx("path",{d:"M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z"})})}),P=o.jsx(q,{}),$=()=>P,t={render:e=>`plugin::comments.${e}`,comments:{read:"comments-read",moderate:"comments-moderate"},reports:{read:"reports-read",review:"reports-review"},settings:{read:"settings-read",change:"settings-change"}},a={access:[{action:t.render(t.comments.read),subject:null},{action:t.render(t.reports.read),subject:null},{action:t.render(t.settings.read),subject:null}],moderate:[{action:t.render(t.comments.moderate),subject:null}],reports:[{action:t.render(t.reports.read),subject:null}],reportsReview:[{action:t.render(t.reports.review),subject:null}],settings:[{action:t.render(t.settings.read),subject:null}],settingsChange:[{action:t.render(t.settings.change),subject:null}]},s=h.replace(/^strapi-plugin-/i,""),d={en:()=>Promise.resolve().then(()=>require("./en-nurIIakL.js")),fr:()=>Promise.resolve().then(()=>require("./fr-JAoXWyAN.js")),"pt-BR":()=>Promise.resolve().then(()=>require("./pt-BR-BXuFBSgm.js")),tr:()=>Promise.resolve().then(()=>require("./tr-B2Tw9kcB.js")),ru:()=>Promise.resolve().then(()=>require("./ru-B7jFc-n7.js")),"zh-Hans":()=>Promise.resolve().then(()=>require("./zh-Hans-Cp3JcN8q.js")),pl:()=>Promise.resolve().then(()=>require("./pl-DUaDM2d3.js"))},{displayName:m}=v,b={register(e){e.addMenuLink({to:`/plugins/${s}`,badgeContent:1,icon:$,intlLabel:{id:`${s}.plugin.name`,defaultMessage:m},Component:()=>Promise.resolve().then(()=>require("./index-DV3FvCxv.js")),permissions:a.access}),e.createSettingSection({id:s,intlLabel:{id:`${s}.plugin.section`,defaultMessage:`${m} plugin`}},[{intlLabel:{id:`${s}.plugin.section.item`,defaultMessage:"Configuration"},id:"comments",to:`/settings/${s}`,Component:()=>Promise.resolve().then(()=>require("./index-5LPolIUr.js")),permissions:a.settings}])},registerTrads:async function({locales:e=[]}){return Promise.all(e.map(async r=>r in d?d[r]().then(({default:n})=>({data:u(c(n),s),locale:r})):{data:u(c({}),s),locale:r}))}};exports.index=b;exports.pluginId=s;exports.pluginPermissions=a;
@@ -1,50 +1,51 @@
1
1
  import { jsx as e, Fragment as O, jsxs as i } from "react/jsx-runtime";
2
- import { l as N, e as F, f as re, B as p, a5 as ae, F as q, T as m, $ as a, o as n, a6 as T, a7 as x, a8 as f, a9 as se, aa as Q, ab as W, ac as le } from "./index-Czrxso6a.mjs";
3
- import { useTracking as ce, useNotification as de, Page as j, Layouts as D, Form as ge } from "@strapi/strapi/admin";
4
- import { useMutation as A, useQuery as P, useQueryClient as he, QueryClient as pe } from "@tanstack/react-query";
5
- import { useMemo as me, useRef as ue, useState as be, useCallback as $ } from "react";
2
+ import { Button as F, Box as p, Flex as q, Typography as m, Grid as s, Field as n, MultiSelect as x, MultiSelectOption as A, Accordion as y, Switch as oe, Toggle as B, Alert as re } from "@strapi/design-system";
3
+ import { Check as se, Play as le, ArrowClockwise as N } from "@strapi/icons";
4
+ import { useNotification as ae, Page as W, Layouts as j, Form as ce } from "@strapi/strapi/admin";
5
+ import { useMutation as T, useQuery as P, useQueryClient as de } from "@tanstack/react-query";
6
+ import { u as U, f as ge, a as he, g as t, l as D, e as pe } from "./index-D1CAoT0G.mjs";
7
+ import { useMemo as me, useRef as ue, useState as be, useCallback as Q } from "react";
6
8
  import fe from "styled-components";
7
- import { u as U, e as ye, a as Se, g as t, d as we } from "./index-Ctf22X_6.mjs";
8
- const v = ({
9
- children: d,
10
- condition: l
11
- }) => l ? /* @__PURE__ */ e(O, { children: d }) : null, Re = (d = {}) => {
12
- const l = U(), y = A({
13
- mutationFn: l.settings.update,
14
- onSuccess: d.updateSettingsMutationSuccess,
15
- onError: d.updateSettingsMutationError
16
- }), S = A({
17
- mutationFn: l.settings.restore,
18
- onSuccess: d.restoreSettingsMutationSuccess,
19
- onError: d.restoreSettingsMutationError
20
- }), h = A({
21
- mutationFn: l.settings.restart,
22
- onSuccess: d.restartStrapiMutationSuccess,
23
- onError: d.restartStrapiMutationError
24
- }), w = P({
25
- queryKey: l.config.getKey(),
26
- queryFn: l.config.query
9
+ const M = ({
10
+ children: c,
11
+ condition: a
12
+ }) => a ? /* @__PURE__ */ e(O, { children: c }) : null, ye = (c = {}) => {
13
+ const a = U(), S = T({
14
+ mutationFn: a.settings.update,
15
+ onSuccess: c.updateSettingsMutationSuccess,
16
+ onError: c.updateSettingsMutationError
17
+ }), h = T({
18
+ mutationFn: a.settings.restore,
19
+ onSuccess: c.restoreSettingsMutationSuccess,
20
+ onError: c.restoreSettingsMutationError
21
+ }), w = T({
22
+ mutationFn: a.settings.restart,
23
+ onSuccess: c.restartStrapiMutationSuccess,
24
+ onError: c.restartStrapiMutationError
27
25
  }), u = P({
28
- queryKey: l.contentTypeBuilder.all.getKey(),
29
- queryFn: l.contentTypeBuilder.all.query
26
+ queryKey: a.config.getKey(),
27
+ queryFn: a.config.query
30
28
  }), b = P({
31
- queryKey: l.roles.getKey(),
32
- queryFn: l.roles.query
29
+ queryKey: a.contentTypeBuilder.all.getKey(),
30
+ queryFn: a.contentTypeBuilder.all.query
31
+ }), f = P({
32
+ queryKey: a.roles.getKey(),
33
+ queryFn: a.roles.query
33
34
  });
34
35
  return me(() => ({
35
- config: w,
36
- collectionTypes: u,
37
- roles: b,
38
- restoreSettingsMutation: S,
39
- updateSettingsMutation: y,
40
- restartStrapiMutation: h
36
+ config: u,
37
+ collectionTypes: b,
38
+ roles: f,
39
+ restoreSettingsMutation: h,
40
+ updateSettingsMutation: S,
41
+ restartStrapiMutation: w
41
42
  }), [
42
- w,
43
- b,
44
43
  u,
44
+ f,
45
+ b,
46
+ h,
45
47
  S,
46
- y,
47
- h
48
+ w
48
49
  ]);
49
50
  }, I = {
50
51
  background: "neutral0",
@@ -52,24 +53,24 @@ const v = ({
52
53
  shadow: "filterShadow",
53
54
  padding: 6,
54
55
  width: "100%"
55
- }, Ie = fe(le)(() => ({
56
+ }, Se = fe(re)(() => ({
56
57
  "[role]": {
57
58
  flexDirection: "column"
58
59
  }
59
- })), Ce = () => {
60
- const { trackUsage: d } = ce(), l = ue(null), { toggleNotification: y } = de(), [S, h] = be(!1), { isLoadingForPermissions: w, canSettingsChange: u } = Se(), b = he(), M = U(), {
61
- config: c,
60
+ })), we = () => {
61
+ const c = ue(null), { toggleNotification: a } = ae(), [S, h] = be(!1), { isLoadingForPermissions: w, canSettingsChange: u } = he(), b = de(), f = U(), {
62
+ config: d,
62
63
  collectionTypes: k,
63
- roles: C,
64
+ roles: R,
64
65
  restoreSettingsMutation: G,
65
- updateSettingsMutation: E,
66
+ updateSettingsMutation: v,
66
67
  restartStrapiMutation: V
67
- } = Re({
68
+ } = ye({
68
69
  restoreSettingsMutationSuccess: () => {
69
70
  b.invalidateQueries({
70
- queryKey: M.config.getKey(),
71
+ queryKey: f.config.getKey(),
71
72
  exact: !1
72
- }), h(!0), y({
73
+ }), h(!0), a({
73
74
  message: t("page.settings.actions.restore.success"),
74
75
  type: "success"
75
76
  });
@@ -79,111 +80,111 @@ const v = ({
79
80
  },
80
81
  updateSettingsMutationSuccess: () => {
81
82
  b.invalidateQueries({
82
- queryKey: M.config.getKey(),
83
+ queryKey: f.config.getKey(),
83
84
  exact: !1
84
85
  }), h(!0);
85
86
  }
86
- }), z = $(() => {
87
- l.current?.requestSubmit();
88
- }, []), J = $((r) => {
89
- E.mutate({
87
+ }), z = Q(() => {
88
+ c.current?.requestSubmit();
89
+ }, []), J = Q((r) => {
90
+ v.mutate({
90
91
  ...r,
91
- blockedAuthorProps: r.blockedAuthorProps.split(",").map((s) => s.trim())
92
+ blockedAuthorProps: r.blockedAuthorProps.split(",").map((l) => l.trim())
92
93
  });
93
- }, [E]);
94
- if (c.status !== "success" || k.status !== "success" || C.status !== "success" || w)
94
+ }, [v]);
95
+ if (d.status !== "success" || k.status !== "success" || R.status !== "success" || w)
95
96
  return t("page.settings.loading");
96
- const L = k.data.filter((r) => r.uid.includes("api::")), X = c.data.enabledCollections.filter((r) => L.some((s) => s.uid === r)), Y = N.isNil(c.data.badWords) ? !0 : c.data?.badWords, Z = !!c.data.gql?.auth, _ = c.data.moderatorRoles.filter((r) => C.data.filter((s) => s.code === r)), ee = c.data.client?.url, te = c.data.client?.contactEmail, ne = c.data.blockedAuthorProps ?? [], ie = () => h(!1);
97
+ const L = k.data.filter((r) => r.uid.includes("api::")), X = d.data.enabledCollections.filter((r) => L.some((l) => l.uid === r)), Y = D.isNil(d.data.badWords) ? !0 : d.data?.badWords, Z = !!d.data.gql?.auth, _ = d.data.moderatorRoles.filter((r) => R.data.filter((l) => l.code === r)), $ = d.data.client?.url, ee = d.data.client?.contactEmail, te = d.data.blockedAuthorProps ?? [], ne = () => h(!1);
97
98
  return /* @__PURE__ */ i(O, { children: [
98
- /* @__PURE__ */ e(j.Title, { children: "Comments - settings" }),
99
- /* @__PURE__ */ i(j.Main, { children: [
99
+ /* @__PURE__ */ e(W.Title, { children: "Comments - settings" }),
100
+ /* @__PURE__ */ i(W.Main, { children: [
100
101
  /* @__PURE__ */ e(
101
- D.Header,
102
+ j.Header,
102
103
  {
103
104
  title: t("page.settings.header.title"),
104
105
  subtitle: t("page.settings.header.description"),
105
106
  as: "h2",
106
- primaryAction: /* @__PURE__ */ e(v, { condition: u, children: /* @__PURE__ */ e(F, { type: "submit", startIcon: /* @__PURE__ */ e(re, {}), onClick: z, children: t("page.settings.actions.submit") }) })
107
+ primaryAction: /* @__PURE__ */ e(M, { condition: u, children: /* @__PURE__ */ e(F, { type: "submit", startIcon: /* @__PURE__ */ e(se, {}), onClick: z, children: t("page.settings.actions.submit") }) })
107
108
  }
108
109
  ),
109
- /* @__PURE__ */ i(D.Content, { children: [
110
+ /* @__PURE__ */ i(j.Content, { children: [
110
111
  S && /* @__PURE__ */ e(p, { marginBottom: 4, children: /* @__PURE__ */ e(
111
- Ie,
112
+ Se,
112
113
  {
113
114
  closeLabel: t("page.settings.actions.restart.alert.cancel"),
114
115
  title: t("page.settings.actions.restart.alert.title"),
115
- onClose: ie,
116
- action: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(F, { onClick: V.mutate, startIcon: /* @__PURE__ */ e(ae, {}), children: t("page.settings.actions.restart") }) }),
116
+ onClose: ne,
117
+ action: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(F, { onClick: V.mutate, startIcon: /* @__PURE__ */ e(le, {}), children: t("page.settings.actions.restart") }) }),
117
118
  children: /* @__PURE__ */ e(p, { marginTop: 4, children: t("page.settings.actions.restart.alert.description") })
118
119
  }
119
120
  ) }),
120
121
  /* @__PURE__ */ e(
121
- ge,
122
+ ce,
122
123
  {
123
124
  method: "POST",
124
125
  width: "auto",
125
126
  height: "auto",
126
- ref: l,
127
+ ref: c,
127
128
  onSubmit: J,
128
129
  initialValues: {
129
130
  enabledCollections: X,
130
131
  moderatorRoles: _,
131
132
  badWords: Y,
132
- clientEmail: te,
133
- clientUrl: ee,
133
+ clientEmail: ee,
134
+ clientUrl: $,
134
135
  gqlAuthEnabled: Z,
135
- approvalFlow: c.data.approvalFlow,
136
- entryLabel: c.data.entryLabel,
137
- blockedAuthorProps: ne.join(", ")
136
+ approvalFlow: d.data.approvalFlow,
137
+ entryLabel: d.data.entryLabel,
138
+ blockedAuthorProps: te.join(", ")
138
139
  },
139
- children: ({ values: r, onChange: s }) => /* @__PURE__ */ i(q, { gap: 4, direction: "column", children: [
140
+ children: ({ values: r, onChange: l }) => /* @__PURE__ */ i(q, { gap: 4, direction: "column", children: [
140
141
  /* @__PURE__ */ i(p, { ...I, children: [
141
142
  /* @__PURE__ */ e(m, { variant: "delta", as: "h2", children: t("page.settings.section.general") }),
142
- /* @__PURE__ */ i(a.Root, { gap: 4, marginTop: 4, width: "100%", children: [
143
- /* @__PURE__ */ e(a.Item, { xs: 12, children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.enabledCollections.hint"), children: [
143
+ /* @__PURE__ */ i(s.Root, { gap: 4, marginTop: 4, width: "100%", children: [
144
+ /* @__PURE__ */ e(s.Item, { xs: 12, children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.enabledCollections.hint"), children: [
144
145
  /* @__PURE__ */ e(n.Label, { htmlFor: "enabledCollections", children: t("page.settings.form.enabledCollections.label") }),
145
146
  /* @__PURE__ */ e(
146
- T,
147
+ x,
147
148
  {
148
149
  withTags: !0,
149
150
  name: "enabledCollections",
150
151
  value: r.enabledCollections,
151
152
  onChange: (o) => {
152
- s("enabledCollections", o);
153
+ l("enabledCollections", o);
153
154
  },
154
- children: L.map((o) => /* @__PURE__ */ e(x, { value: o.uid, children: o.schema.displayName }, o.uid))
155
+ children: L.map((o) => /* @__PURE__ */ e(A, { value: o.uid, children: o.schema.displayName }, o.uid))
155
156
  }
156
157
  ),
157
158
  /* @__PURE__ */ e(n.Hint, {})
158
159
  ] }) }),
159
- r.enabledCollections.length > 0 && /* @__PURE__ */ e(a.Item, { children: /* @__PURE__ */ i(a.Root, { gap: 4, width: "100%", children: [
160
- /* @__PURE__ */ e(a.Item, { children: /* @__PURE__ */ e(m, { children: t("page.settings.form.contentTypesSettings.label") }) }),
161
- /* @__PURE__ */ e(a.Item, { children: /* @__PURE__ */ e(f.Root, { style: { width: "100%" }, children: N.orderBy(r.enabledCollections).map((o) => {
162
- const H = L.find((R) => R.uid === o);
163
- if (H) {
164
- const { schema: { displayName: R, attributes: K } } = H, B = Object.keys(K).filter((g) => K[g].type === "string");
165
- return /* @__PURE__ */ i(f.Item, { value: o, children: [
166
- /* @__PURE__ */ e(f.Header, { children: /* @__PURE__ */ e(f.Trigger, { children: /* @__PURE__ */ e(m, { variant: "epsilon", as: "h3", children: R }) }) }),
167
- /* @__PURE__ */ e(f.Content, { children: /* @__PURE__ */ i(a.Root, { padding: 6, gap: 4, children: [
168
- /* @__PURE__ */ e(a.Item, { children: /* @__PURE__ */ i(
160
+ r.enabledCollections.length > 0 && /* @__PURE__ */ e(s.Item, { children: /* @__PURE__ */ i(s.Root, { gap: 4, width: "100%", children: [
161
+ /* @__PURE__ */ e(s.Item, { children: /* @__PURE__ */ e(m, { children: t("page.settings.form.contentTypesSettings.label") }) }),
162
+ /* @__PURE__ */ e(s.Item, { children: /* @__PURE__ */ e(y.Root, { style: { width: "100%" }, children: D.orderBy(r.enabledCollections).map((o) => {
163
+ const E = L.find((C) => C.uid === o);
164
+ if (E) {
165
+ const { schema: { displayName: C, attributes: H } } = E, K = Object.keys(H).filter((g) => H[g].type === "string");
166
+ return /* @__PURE__ */ i(y.Item, { value: o, children: [
167
+ /* @__PURE__ */ e(y.Header, { children: /* @__PURE__ */ e(y.Trigger, { children: /* @__PURE__ */ e(m, { variant: "epsilon", as: "h3", children: C }) }) }),
168
+ /* @__PURE__ */ e(y.Content, { children: /* @__PURE__ */ i(s.Root, { padding: 6, gap: 4, children: [
169
+ /* @__PURE__ */ e(s.Item, { children: /* @__PURE__ */ i(
169
170
  n.Root,
170
171
  {
171
172
  width: "100%",
172
173
  hint: t({
173
174
  id: "page.settings.form.approvalFlow.hint",
174
- props: { name: R }
175
+ props: { name: C }
175
176
  }),
176
177
  children: [
177
178
  /* @__PURE__ */ e(n.Label, { children: t("page.settings.form.approvalFlow.label") }),
178
179
  /* @__PURE__ */ e(
179
- se,
180
+ oe,
180
181
  {
181
182
  visibleLabels: !0,
182
183
  onLabel: t("components.toogle.enabled"),
183
184
  offLabel: t("components.toogle.disabled"),
184
185
  checked: r.approvalFlow.includes(o),
185
186
  onCheckedChange: (g) => {
186
- s("approvalFlow", g ? [...r.approvalFlow, o] : r.approvalFlow.filter((oe) => oe !== o));
187
+ l("approvalFlow", g ? [...r.approvalFlow, o] : r.approvalFlow.filter((ie) => ie !== o));
187
188
  }
188
189
  }
189
190
  ),
@@ -191,7 +192,7 @@ const v = ({
191
192
  ]
192
193
  }
193
194
  ) }),
194
- /* @__PURE__ */ e(v, { condition: B.length > 0, children: /* @__PURE__ */ e(a.Item, { children: /* @__PURE__ */ i(
195
+ /* @__PURE__ */ e(M, { condition: K.length > 0, children: /* @__PURE__ */ e(s.Item, { children: /* @__PURE__ */ i(
195
196
  n.Root,
196
197
  {
197
198
  width: "100%",
@@ -199,16 +200,16 @@ const v = ({
199
200
  children: [
200
201
  /* @__PURE__ */ e(n.Label, { children: t("page.settings.form.entryLabel.label") }),
201
202
  /* @__PURE__ */ e(
202
- T,
203
+ x,
203
204
  {
204
205
  withTags: !0,
205
206
  placeholder: t("page.settings.form.entryLabel.placeholder"),
206
207
  name: "enabledCollections",
207
208
  value: r.entryLabel[o] ?? [],
208
209
  onChange: (g) => {
209
- s("entryLabel", { ...r.entryLabel, [o]: g });
210
+ l("entryLabel", { ...r.entryLabel, [o]: g });
210
211
  },
211
- children: B.map((g) => /* @__PURE__ */ e(x, { value: g, children: g }, g))
212
+ children: K.map((g) => /* @__PURE__ */ e(A, { value: g, children: g }, g))
212
213
  }
213
214
  ),
214
215
  /* @__PURE__ */ e(n.Hint, {})
@@ -225,15 +226,15 @@ const v = ({
225
226
  ] }),
226
227
  /* @__PURE__ */ i(p, { ...I, children: [
227
228
  /* @__PURE__ */ e(m, { variant: "delta", as: "h2", children: t("page.settings.section.additional") }),
228
- /* @__PURE__ */ i(a.Root, { gap: 4, marginTop: 4, width: "100%", children: [
229
- /* @__PURE__ */ e(a.Item, { xs: 4, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.enabledCollections.hint"), children: [
229
+ /* @__PURE__ */ i(s.Root, { gap: 4, marginTop: 4, width: "100%", children: [
230
+ /* @__PURE__ */ e(s.Item, { col: 4, xs: 12, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.enabledCollections.hint"), children: [
230
231
  /* @__PURE__ */ e(n.Label, { htmlFor: "enabledCollections", children: t("page.settings.form.enabledCollections.label") }),
231
232
  /* @__PURE__ */ e(
232
- Q,
233
+ B,
233
234
  {
234
235
  name: "badWords",
235
236
  checked: r.badWords,
236
- onChange: s,
237
+ onChange: l,
237
238
  onLabel: t("components.toogle.enabled"),
238
239
  offLabel: t("components.toogle.disabled"),
239
240
  width: "100%"
@@ -241,19 +242,19 @@ const v = ({
241
242
  ),
242
243
  /* @__PURE__ */ e(n.Hint, {})
243
244
  ] }) }),
244
- /* @__PURE__ */ e(a.Item, { xs: 4, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.author.blockedProps.hint"), children: [
245
+ /* @__PURE__ */ e(s.Item, { col: 4, xs: 12, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.author.blockedProps.hint"), children: [
245
246
  /* @__PURE__ */ e(n.Label, { htmlFor: "enabledCollections", children: t("page.settings.form.author.blockedProps.label") }),
246
- /* @__PURE__ */ e(n.Input, { name: "blockedAuthorProps", value: r.blockedAuthorProps, onChange: s }),
247
+ /* @__PURE__ */ e(n.Input, { name: "blockedAuthorProps", value: r.blockedAuthorProps, onChange: l }),
247
248
  /* @__PURE__ */ e(n.Hint, {})
248
249
  ] }) }),
249
- /* @__PURE__ */ e(a.Item, { xs: 4, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.gqlAuth.hint"), children: [
250
+ /* @__PURE__ */ e(s.Item, { col: 4, xs: 12, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.gqlAuth.hint"), children: [
250
251
  /* @__PURE__ */ e(n.Label, { children: t("page.settings.form.gqlAuth.label") }),
251
252
  /* @__PURE__ */ e(
252
- Q,
253
+ B,
253
254
  {
254
255
  name: "gqlAuthEnabled",
255
256
  checked: r.gqlAuthEnabled,
256
- onChange: s,
257
+ onChange: l,
257
258
  onLabel: t("components.toogle.enabled"),
258
259
  offLabel: t("components.toogle.disabled"),
259
260
  width: "100%"
@@ -265,18 +266,18 @@ const v = ({
265
266
  ] }),
266
267
  /* @__PURE__ */ i(p, { ...I, children: [
267
268
  /* @__PURE__ */ e(m, { variant: "delta", as: "h2", children: t("page.settings.section.client") }),
268
- /* @__PURE__ */ i(a.Root, { gap: 4, marginTop: 4, width: "100%", children: [
269
- /* @__PURE__ */ e(a.Item, { xs: 4, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.client.url.hint"), children: [
269
+ /* @__PURE__ */ i(s.Root, { gap: 4, marginTop: 4, width: "100%", children: [
270
+ /* @__PURE__ */ e(s.Item, { col: 4, xs: 12, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.client.url.hint"), children: [
270
271
  /* @__PURE__ */ e(n.Label, { children: t("page.settings.form.client.url.label") }),
271
- /* @__PURE__ */ e(n.Input, { name: "clientUrl", onChange: s }),
272
+ /* @__PURE__ */ e(n.Input, { name: "clientUrl", onChange: l }),
272
273
  /* @__PURE__ */ e(n.Hint, {})
273
274
  ] }) }),
274
- /* @__PURE__ */ e(a.Item, { xs: 4, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.client.email.hint"), children: [
275
+ /* @__PURE__ */ e(s.Item, { col: 4, xs: 12, alignItems: "start", children: /* @__PURE__ */ i(n.Root, { width: "100%", hint: t("page.settings.form.client.email.hint"), children: [
275
276
  /* @__PURE__ */ e(n.Label, { children: t("page.settings.form.client.email.label") }),
276
- /* @__PURE__ */ e(n.Input, { name: "clientEmail", onChange: s }),
277
+ /* @__PURE__ */ e(n.Input, { name: "clientEmail", onChange: l }),
277
278
  /* @__PURE__ */ e(n.Hint, {})
278
279
  ] }) }),
279
- /* @__PURE__ */ e(a.Item, { xs: 4, alignItems: "start", children: /* @__PURE__ */ i(
280
+ /* @__PURE__ */ e(s.Item, { col: 4, xs: 12, alignItems: "start", children: /* @__PURE__ */ i(
280
281
  n.Root,
281
282
  {
282
283
  width: "100%",
@@ -284,16 +285,16 @@ const v = ({
284
285
  children: [
285
286
  /* @__PURE__ */ e(n.Label, { children: t("page.settings.form.moderatorRoles.label") }),
286
287
  /* @__PURE__ */ e(
287
- T,
288
+ x,
288
289
  {
289
290
  withTags: !0,
290
291
  placeholder: t("page.settings.form.moderatorRoles.placeholder"),
291
292
  name: "enabledCollections",
292
293
  value: r.moderatorRoles,
293
294
  onChange: (o) => {
294
- s("moderatorRoles", o);
295
+ l("moderatorRoles", o);
295
296
  },
296
- children: C.data.map((o) => /* @__PURE__ */ e(x, { value: o.code, children: o.name }, o.code))
297
+ children: R.data.map((o) => /* @__PURE__ */ e(A, { value: o.code, children: o.name }, o.code))
297
298
  }
298
299
  ),
299
300
  /* @__PURE__ */ e(n.Hint, {})
@@ -302,19 +303,19 @@ const v = ({
302
303
  ) })
303
304
  ] })
304
305
  ] }),
305
- /* @__PURE__ */ e(v, { condition: u, children: /* @__PURE__ */ e(p, { ...I, children: /* @__PURE__ */ i(q, { gap: 4, direction: "column", alignItems: "flex-start", children: [
306
+ /* @__PURE__ */ e(M, { condition: u, children: /* @__PURE__ */ e(p, { ...I, children: /* @__PURE__ */ i(q, { gap: 4, direction: "column", alignItems: "flex-start", children: [
306
307
  /* @__PURE__ */ i(q, { gap: 2, direction: "column", alignItems: "flex-start", children: [
307
308
  /* @__PURE__ */ e(m, { variant: "delta", as: "h2", children: t("page.settings.section.restore") }),
308
309
  /* @__PURE__ */ e(m, { variant: "pi", as: "h4", children: t("page.settings.section.restore.subtitle") })
309
310
  ] }),
310
311
  /* @__PURE__ */ e(
311
- we,
312
+ pe,
312
313
  {
313
314
  Trigger: ({ onClick: o }) => /* @__PURE__ */ e(
314
315
  F,
315
316
  {
316
317
  variant: "danger-light",
317
- startIcon: /* @__PURE__ */ e(W, {}),
318
+ startIcon: /* @__PURE__ */ e(N, {}),
318
319
  onClick: o,
319
320
  children: t("page.settings.actions.restore")
320
321
  }
@@ -322,7 +323,7 @@ const v = ({
322
323
  onConfirm: G.mutate,
323
324
  title: t("page.settings.actions.restore.confirmation.header"),
324
325
  labelConfirm: t("page.settings.actions.restore.confirmation.button.confirm"),
325
- iconConfirm: /* @__PURE__ */ e(W, {}),
326
+ iconConfirm: /* @__PURE__ */ e(N, {}),
326
327
  children: t("page.settings.actions.restore.confirmation.description")
327
328
  }
328
329
  )
@@ -333,9 +334,7 @@ const v = ({
333
334
  ] })
334
335
  ] })
335
336
  ] });
336
- };
337
- new pe();
338
- const ve = () => /* @__PURE__ */ e(ye, { children: /* @__PURE__ */ e(Ce, {}) });
337
+ }, Te = () => /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(we, {}) });
339
338
  export {
340
- ve as default
339
+ Te as default
341
340
  };