strapi-plugin-comments 3.0.5 → 3.0.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_chunks/en-CgUbWvmQ.js +1 -0
- package/dist/_chunks/{en-DZljqkLz.mjs → en-DCsHR-ue.mjs} +2 -2
- package/dist/_chunks/fr-BXfxIXq1.js +1 -0
- package/dist/_chunks/{fr-oAh2cU0E.mjs → fr-DC9DGoT1.mjs} +2 -2
- package/dist/_chunks/index-BgJ65O-2.js +44 -0
- package/dist/_chunks/index-BpDl_L4E.mjs +5715 -0
- package/dist/_chunks/index-CTrpEEVW.js +2153 -0
- package/dist/_chunks/{index-yhf78avJ.mjs → index-CVaM8WKt.mjs} +15372 -25173
- package/dist/_chunks/index-CYrQYscU.js +1 -0
- package/dist/_chunks/index-D9B514y5.mjs +38397 -0
- package/dist/_chunks/index-DbSxM8lO.js +600 -0
- package/dist/_chunks/index-wsRcN626.mjs +340 -0
- package/dist/_chunks/pl-Bl4yP3sZ.js +1 -0
- package/dist/_chunks/{pl-BUVUFx9r.mjs → pl-DZiVsGIg.mjs} +2 -2
- package/dist/_chunks/{pt-BR-Bchhsf7B.mjs → pt-BR-CW4ugNZj.mjs} +2 -2
- package/dist/_chunks/pt-BR-D9T5g0JT.js +1 -0
- package/dist/_chunks/{ru-BQ54P0xr.mjs → ru-CfKjYq3M.mjs} +2 -2
- package/dist/_chunks/ru-DIZ4pV4l.js +1 -0
- package/dist/_chunks/{tr-CkGcBRUv.mjs → tr-BQR2hK7S.mjs} +2 -2
- package/dist/_chunks/tr-Dl2hdLCx.js +1 -0
- package/dist/_chunks/zh-Hans-BZhnqfei.js +1 -0
- package/dist/_chunks/{zh-Hans-Buh0iPWA.mjs → zh-Hans-lNqOn5JS.mjs} +2 -2
- package/dist/admin/index.js +1 -4
- package/dist/admin/index.mjs +2 -2
- package/dist/server/index.js +92 -14968
- package/dist/server/index.mjs +8841 -11749
- package/dist/style.css +1 -84
- package/package.json +12 -12
- package/dist/_chunks/en-D1Rj1A_i.js +0 -195
- package/dist/_chunks/fr-DbxNAr65.js +0 -146
- package/dist/_chunks/index-BAXZ3d__.js +0 -51324
- package/dist/_chunks/index-BTWJ00Fw.js +0 -375
- package/dist/_chunks/index-CJVLjLWX.js +0 -8482
- package/dist/_chunks/index-CK1XCSqz.mjs +0 -373
- package/dist/_chunks/index-DUWJDJLu.mjs +0 -51309
- package/dist/_chunks/index-DidQUJKN.js +0 -51702
- package/dist/_chunks/index-PCqyAKE7.mjs +0 -8487
- package/dist/_chunks/pl-CuTgrHph.js +0 -195
- package/dist/_chunks/pt-BR-2Z9CtgSm.js +0 -145
- package/dist/_chunks/ru-gtnRlbuP.js +0 -195
- package/dist/_chunks/tr-Ucl3IKMX.js +0 -193
- package/dist/_chunks/zh-Hans-Dhk3gIYb.js +0 -195
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const index$2 = require("./index-BAXZ3d__.js");
|
|
5
|
-
const admin = require("@strapi/strapi/admin");
|
|
6
|
-
const reactQuery = require("@tanstack/react-query");
|
|
7
|
-
const index$1 = require("./index-CJVLjLWX.js");
|
|
8
|
-
const React = require("react");
|
|
9
|
-
const styled = require("styled-components");
|
|
10
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
11
|
-
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
12
|
-
const RenderIf = ({
|
|
13
|
-
children,
|
|
14
|
-
condition
|
|
15
|
-
}) => {
|
|
16
|
-
return condition ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }) : null;
|
|
17
|
-
};
|
|
18
|
-
const useSettingsAPI = (callbacksMutation = {}) => {
|
|
19
|
-
const api = index$1.useAPI();
|
|
20
|
-
const updateSettingsMutation = reactQuery.useMutation({
|
|
21
|
-
mutationFn: api.settings.update,
|
|
22
|
-
onSuccess: callbacksMutation.updateSettingsMutationSuccess,
|
|
23
|
-
onError: callbacksMutation.updateSettingsMutationError
|
|
24
|
-
});
|
|
25
|
-
const restoreSettingsMutation = reactQuery.useMutation({
|
|
26
|
-
mutationFn: api.settings.restore,
|
|
27
|
-
onSuccess: callbacksMutation.restoreSettingsMutationSuccess,
|
|
28
|
-
onError: callbacksMutation.restoreSettingsMutationError
|
|
29
|
-
});
|
|
30
|
-
const restartStrapiMutation = reactQuery.useMutation({
|
|
31
|
-
mutationFn: api.settings.restart,
|
|
32
|
-
onSuccess: callbacksMutation.restartStrapiMutationSuccess,
|
|
33
|
-
onError: callbacksMutation.restartStrapiMutationError
|
|
34
|
-
});
|
|
35
|
-
const config = reactQuery.useQuery({
|
|
36
|
-
queryKey: api.config.getKey(),
|
|
37
|
-
queryFn: api.config.query
|
|
38
|
-
});
|
|
39
|
-
const collectionTypes = reactQuery.useQuery({
|
|
40
|
-
queryKey: api.contentTypeBuilder.all.getKey(),
|
|
41
|
-
queryFn: api.contentTypeBuilder.all.query
|
|
42
|
-
});
|
|
43
|
-
const roles = reactQuery.useQuery({
|
|
44
|
-
queryKey: api.roles.getKey(),
|
|
45
|
-
queryFn: api.roles.query
|
|
46
|
-
});
|
|
47
|
-
return React.useMemo(() => ({
|
|
48
|
-
config,
|
|
49
|
-
collectionTypes,
|
|
50
|
-
roles,
|
|
51
|
-
restoreSettingsMutation,
|
|
52
|
-
updateSettingsMutation,
|
|
53
|
-
restartStrapiMutation
|
|
54
|
-
}), [
|
|
55
|
-
config,
|
|
56
|
-
roles,
|
|
57
|
-
collectionTypes,
|
|
58
|
-
restoreSettingsMutation,
|
|
59
|
-
updateSettingsMutation,
|
|
60
|
-
restartStrapiMutation
|
|
61
|
-
]);
|
|
62
|
-
};
|
|
63
|
-
const boxDefaultProps = {
|
|
64
|
-
background: "neutral0",
|
|
65
|
-
hasRadius: true,
|
|
66
|
-
shadow: "filterShadow",
|
|
67
|
-
padding: 6,
|
|
68
|
-
width: "100%"
|
|
69
|
-
};
|
|
70
|
-
const StyledAlert = styled__default.default(index$2.Alert)(() => ({
|
|
71
|
-
"[role]": {
|
|
72
|
-
flexDirection: "column"
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
75
|
-
const Settings = () => {
|
|
76
|
-
admin.useTracking();
|
|
77
|
-
const formRef = React.useRef(null);
|
|
78
|
-
const { toggleNotification } = admin.useNotification();
|
|
79
|
-
const [isRestartRequired, setIsRestartRequired] = React.useState(false);
|
|
80
|
-
const { isLoadingForPermissions, canSettingsChange } = index$1.usePermissions();
|
|
81
|
-
const queryClient2 = reactQuery.useQueryClient();
|
|
82
|
-
const api = index$1.useAPI();
|
|
83
|
-
const {
|
|
84
|
-
config,
|
|
85
|
-
collectionTypes,
|
|
86
|
-
roles,
|
|
87
|
-
restoreSettingsMutation,
|
|
88
|
-
updateSettingsMutation,
|
|
89
|
-
restartStrapiMutation
|
|
90
|
-
} = useSettingsAPI({
|
|
91
|
-
restoreSettingsMutationSuccess: () => {
|
|
92
|
-
queryClient2.invalidateQueries({
|
|
93
|
-
queryKey: api.config.getKey(),
|
|
94
|
-
exact: false
|
|
95
|
-
});
|
|
96
|
-
setIsRestartRequired(true);
|
|
97
|
-
toggleNotification({
|
|
98
|
-
message: index$1.getMessage("page.settings.actions.restore.success"),
|
|
99
|
-
type: "success"
|
|
100
|
-
});
|
|
101
|
-
},
|
|
102
|
-
restartStrapiMutationSuccess: () => {
|
|
103
|
-
setIsRestartRequired(false);
|
|
104
|
-
},
|
|
105
|
-
updateSettingsMutationSuccess: () => {
|
|
106
|
-
queryClient2.invalidateQueries({
|
|
107
|
-
queryKey: api.config.getKey(),
|
|
108
|
-
exact: false
|
|
109
|
-
});
|
|
110
|
-
setIsRestartRequired(true);
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
const onTriggerSubmit = React.useCallback(() => {
|
|
114
|
-
formRef.current?.requestSubmit();
|
|
115
|
-
}, []);
|
|
116
|
-
const onSubmit = React.useCallback((values) => {
|
|
117
|
-
updateSettingsMutation.mutate({
|
|
118
|
-
...values,
|
|
119
|
-
blockedAuthorProps: values.blockedAuthorProps.split(",").map((prop) => prop.trim())
|
|
120
|
-
});
|
|
121
|
-
}, [updateSettingsMutation]);
|
|
122
|
-
if (config.status !== "success" || collectionTypes.status !== "success" || roles.status !== "success" || isLoadingForPermissions) {
|
|
123
|
-
return index$1.getMessage("page.settings.loading");
|
|
124
|
-
}
|
|
125
|
-
const allCollections = collectionTypes.data.filter((ct) => ct.uid.includes("api::"));
|
|
126
|
-
const enabledCollections = config.data.enabledCollections.filter((uid) => allCollections.some((ct) => ct.uid === uid));
|
|
127
|
-
const badWords = index$1.lodashExports.isNil(config.data.badWords) ? true : config.data?.badWords;
|
|
128
|
-
const gqlAuthEnabled = Boolean(config.data.gql?.auth || null);
|
|
129
|
-
const moderatorRoles = config.data.moderatorRoles.filter((role) => roles.data.filter((r) => r.code === role));
|
|
130
|
-
const clientUrl = config.data.client?.url;
|
|
131
|
-
const clientEmail = config.data.client?.contactEmail;
|
|
132
|
-
const blockedAuthorProps = config.data.blockedAuthorProps ?? [];
|
|
133
|
-
const onDiscardRestart = () => setIsRestartRequired(false);
|
|
134
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
135
|
-
/* @__PURE__ */ jsxRuntime.jsx(admin.Page.Title, { children: "Comments - settings" }),
|
|
136
|
-
/* @__PURE__ */ jsxRuntime.jsxs(admin.Page.Main, { children: [
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
138
|
-
admin.Layouts.Header,
|
|
139
|
-
{
|
|
140
|
-
title: index$1.getMessage("page.settings.header.title"),
|
|
141
|
-
subtitle: index$1.getMessage("page.settings.header.description"),
|
|
142
|
-
as: "h2",
|
|
143
|
-
primaryAction: /* @__PURE__ */ jsxRuntime.jsx(RenderIf, { condition: canSettingsChange, children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Button, { type: "submit", startIcon: /* @__PURE__ */ jsxRuntime.jsx(index$2.ForwardRef$4x, {}), onClick: onTriggerSubmit, children: index$1.getMessage("page.settings.actions.submit") }) })
|
|
144
|
-
}
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */ jsxRuntime.jsxs(admin.Layouts.Content, { children: [
|
|
147
|
-
isRestartRequired && /* @__PURE__ */ jsxRuntime.jsx(index$2.Box, { marginBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
148
|
-
StyledAlert,
|
|
149
|
-
{
|
|
150
|
-
closeLabel: index$1.getMessage("page.settings.actions.restart.alert.cancel"),
|
|
151
|
-
title: index$1.getMessage("page.settings.actions.restart.alert.title"),
|
|
152
|
-
onClose: onDiscardRestart,
|
|
153
|
-
action: /* @__PURE__ */ jsxRuntime.jsx(index$2.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Button, { onClick: restartStrapiMutation.mutate, startIcon: /* @__PURE__ */ jsxRuntime.jsx(index$2.ForwardRef$1f, {}), children: index$1.getMessage("page.settings.actions.restart") }) }),
|
|
154
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Box, { marginTop: 4, children: index$1.getMessage("page.settings.actions.restart.alert.description") })
|
|
155
|
-
}
|
|
156
|
-
) }),
|
|
157
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
158
|
-
admin.Form,
|
|
159
|
-
{
|
|
160
|
-
method: "POST",
|
|
161
|
-
ref: formRef,
|
|
162
|
-
onSubmit,
|
|
163
|
-
initialValues: {
|
|
164
|
-
enabledCollections,
|
|
165
|
-
moderatorRoles,
|
|
166
|
-
badWords,
|
|
167
|
-
clientEmail,
|
|
168
|
-
clientUrl,
|
|
169
|
-
gqlAuthEnabled,
|
|
170
|
-
approvalFlow: config.data.approvalFlow,
|
|
171
|
-
entryLabel: config.data.entryLabel,
|
|
172
|
-
blockedAuthorProps: blockedAuthorProps.join(", ")
|
|
173
|
-
},
|
|
174
|
-
children: ({ values, onChange }) => /* @__PURE__ */ jsxRuntime.jsxs(index$2.Flex, { gap: 4, direction: "column", children: [
|
|
175
|
-
/* @__PURE__ */ jsxRuntime.jsxs(index$2.Box, { ...boxDefaultProps, children: [
|
|
176
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Typography, { variant: "delta", as: "h2", children: index$1.getMessage("page.settings.section.general") }),
|
|
177
|
-
/* @__PURE__ */ jsxRuntime.jsxs(index$2.Grid.Root, { gap: 4, marginTop: 4, width: "100%", children: [
|
|
178
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Field.Root, { width: "100%", hint: index$1.getMessage("page.settings.form.enabledCollections.hint"), children: [
|
|
179
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { htmlFor: "enabledCollections", children: index$1.getMessage("page.settings.form.enabledCollections.label") }),
|
|
180
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
181
|
-
index$2.MultiSelect,
|
|
182
|
-
{
|
|
183
|
-
withTags: true,
|
|
184
|
-
name: "enabledCollections",
|
|
185
|
-
value: values.enabledCollections,
|
|
186
|
-
onChange: (value) => {
|
|
187
|
-
onChange("enabledCollections", value);
|
|
188
|
-
},
|
|
189
|
-
children: allCollections.map((collection) => /* @__PURE__ */ jsxRuntime.jsx(index$2.MultiSelectOption, { value: collection.uid, children: collection.schema.displayName }, collection.uid))
|
|
190
|
-
}
|
|
191
|
-
),
|
|
192
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
193
|
-
] }) }),
|
|
194
|
-
values.enabledCollections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Grid.Root, { gap: 4, width: "100%", children: [
|
|
195
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Typography, { children: index$1.getMessage("page.settings.form.contentTypesSettings.label") }) }),
|
|
196
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Accordion.Root, { style: { width: "100%" }, children: index$1.lodashExports.orderBy(values.enabledCollections).map((uid) => {
|
|
197
|
-
const collection = allCollections.find((ct) => ct.uid === uid);
|
|
198
|
-
if (collection) {
|
|
199
|
-
const { schema: { displayName, attributes } } = collection;
|
|
200
|
-
const stringAttributes = Object.keys(attributes).filter((key) => attributes[key].type === "string");
|
|
201
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(index$2.Accordion.Item, { value: uid, children: [
|
|
202
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Accordion.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Typography, { variant: "epsilon", as: "h3", children: displayName }) }) }),
|
|
203
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Grid.Root, { padding: 6, gap: 4, children: [
|
|
204
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
205
|
-
index$2.Field.Root,
|
|
206
|
-
{
|
|
207
|
-
width: "100%",
|
|
208
|
-
hint: index$1.getMessage({
|
|
209
|
-
id: "page.settings.form.approvalFlow.hint",
|
|
210
|
-
props: { name: displayName }
|
|
211
|
-
}),
|
|
212
|
-
children: [
|
|
213
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { children: index$1.getMessage("page.settings.form.approvalFlow.label") }),
|
|
214
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
215
|
-
index$2.SwitchImpl,
|
|
216
|
-
{
|
|
217
|
-
visibleLabels: true,
|
|
218
|
-
onLabel: index$1.getMessage("components.toogle.enabled"),
|
|
219
|
-
offLabel: index$1.getMessage("components.toogle.disabled"),
|
|
220
|
-
checked: values.approvalFlow.includes(uid),
|
|
221
|
-
onCheckedChange: (checked) => {
|
|
222
|
-
onChange("approvalFlow", checked ? [...values.approvalFlow, uid] : values.approvalFlow.filter((c) => c !== uid));
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
),
|
|
226
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
) }),
|
|
230
|
-
/* @__PURE__ */ jsxRuntime.jsx(RenderIf, { condition: stringAttributes.length > 0, children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
231
|
-
index$2.Field.Root,
|
|
232
|
-
{
|
|
233
|
-
width: "100%",
|
|
234
|
-
hint: index$1.getMessage("page.settings.form.entryLabel.hint"),
|
|
235
|
-
children: [
|
|
236
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { children: index$1.getMessage("page.settings.form.entryLabel.label") }),
|
|
237
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
-
index$2.MultiSelect,
|
|
239
|
-
{
|
|
240
|
-
withTags: true,
|
|
241
|
-
placeholder: index$1.getMessage("page.settings.form.entryLabel.placeholder"),
|
|
242
|
-
name: "enabledCollections",
|
|
243
|
-
value: values.entryLabel[uid] ?? [],
|
|
244
|
-
onChange: (value) => {
|
|
245
|
-
onChange("entryLabel", { ...values.entryLabel, [uid]: value });
|
|
246
|
-
},
|
|
247
|
-
children: stringAttributes.map((attr) => /* @__PURE__ */ jsxRuntime.jsx(index$2.MultiSelectOption, { value: attr, children: attr }, attr))
|
|
248
|
-
}
|
|
249
|
-
),
|
|
250
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
251
|
-
]
|
|
252
|
-
}
|
|
253
|
-
) }) })
|
|
254
|
-
] }) })
|
|
255
|
-
] }, uid);
|
|
256
|
-
}
|
|
257
|
-
return null;
|
|
258
|
-
}) }) })
|
|
259
|
-
] }) })
|
|
260
|
-
] })
|
|
261
|
-
] }),
|
|
262
|
-
/* @__PURE__ */ jsxRuntime.jsxs(index$2.Box, { ...boxDefaultProps, children: [
|
|
263
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Typography, { variant: "delta", as: "h2", children: index$1.getMessage("page.settings.section.additional") }),
|
|
264
|
-
/* @__PURE__ */ jsxRuntime.jsxs(index$2.Grid.Root, { gap: 4, marginTop: 4, width: "100%", children: [
|
|
265
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { xs: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Field.Root, { width: "100%", hint: index$1.getMessage("page.settings.form.enabledCollections.hint"), children: [
|
|
266
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { htmlFor: "enabledCollections", children: index$1.getMessage("page.settings.form.enabledCollections.label") }),
|
|
267
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
-
index$2.Toggle,
|
|
269
|
-
{
|
|
270
|
-
name: "badWords",
|
|
271
|
-
checked: values.badWords,
|
|
272
|
-
onChange,
|
|
273
|
-
onLabel: index$1.getMessage("components.toogle.enabled"),
|
|
274
|
-
offLabel: index$1.getMessage("components.toogle.disabled"),
|
|
275
|
-
width: "100%"
|
|
276
|
-
}
|
|
277
|
-
),
|
|
278
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
279
|
-
] }) }),
|
|
280
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { xs: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Field.Root, { width: "100%", hint: index$1.getMessage("page.settings.form.author.blockedProps.hint"), children: [
|
|
281
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { htmlFor: "enabledCollections", children: index$1.getMessage("page.settings.form.author.blockedProps.label") }),
|
|
282
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Input, { name: "blockedProps", onChange }),
|
|
283
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
284
|
-
] }) }),
|
|
285
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { xs: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Field.Root, { width: "100%", hint: index$1.getMessage("page.settings.form.gqlAuth.hint"), children: [
|
|
286
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { children: index$1.getMessage("page.settings.form.gqlAuth.label") }),
|
|
287
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
288
|
-
index$2.Toggle,
|
|
289
|
-
{
|
|
290
|
-
name: "gqlAuthEnabled",
|
|
291
|
-
checked: values.gqlAuthEnabled,
|
|
292
|
-
onChange,
|
|
293
|
-
onLabel: index$1.getMessage("components.toogle.enabled"),
|
|
294
|
-
offLabel: index$1.getMessage("components.toogle.disabled"),
|
|
295
|
-
width: "100%"
|
|
296
|
-
}
|
|
297
|
-
),
|
|
298
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
299
|
-
] }) })
|
|
300
|
-
] })
|
|
301
|
-
] }),
|
|
302
|
-
/* @__PURE__ */ jsxRuntime.jsxs(index$2.Box, { ...boxDefaultProps, children: [
|
|
303
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Typography, { variant: "delta", as: "h2", children: index$1.getMessage("page.settings.section.client") }),
|
|
304
|
-
/* @__PURE__ */ jsxRuntime.jsxs(index$2.Grid.Root, { gap: 4, marginTop: 4, width: "100%", children: [
|
|
305
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { xs: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Field.Root, { width: "100%", hint: index$1.getMessage("page.settings.form.client.url.hint"), children: [
|
|
306
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { children: index$1.getMessage("page.settings.form.client.url.label") }),
|
|
307
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Input, { name: "clientUrl", onChange }),
|
|
308
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
309
|
-
] }) }),
|
|
310
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { xs: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Field.Root, { width: "100%", hint: index$1.getMessage("page.settings.form.client.email.hint"), children: [
|
|
311
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { children: index$1.getMessage("page.settings.form.client.email.label") }),
|
|
312
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Input, { name: "clientEmail", onChange }),
|
|
313
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
314
|
-
] }) }),
|
|
315
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Grid.Item, { xs: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
316
|
-
index$2.Field.Root,
|
|
317
|
-
{
|
|
318
|
-
width: "100%",
|
|
319
|
-
hint: index$1.getMessage("page.settings.form.moderatorRoles.hint"),
|
|
320
|
-
children: [
|
|
321
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Label, { children: index$1.getMessage("page.settings.form.moderatorRoles.label") }),
|
|
322
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
323
|
-
index$2.MultiSelect,
|
|
324
|
-
{
|
|
325
|
-
withTags: true,
|
|
326
|
-
placeholder: index$1.getMessage("page.settings.form.moderatorRoles.placeholder"),
|
|
327
|
-
name: "enabledCollections",
|
|
328
|
-
value: values.moderatorRoles,
|
|
329
|
-
onChange: (value) => {
|
|
330
|
-
onChange("moderatorRoles", value);
|
|
331
|
-
},
|
|
332
|
-
children: roles.data.map((role) => /* @__PURE__ */ jsxRuntime.jsx(index$2.MultiSelectOption, { value: role.code, children: role.name }, role.code))
|
|
333
|
-
}
|
|
334
|
-
),
|
|
335
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Field.Hint, {})
|
|
336
|
-
]
|
|
337
|
-
}
|
|
338
|
-
) })
|
|
339
|
-
] })
|
|
340
|
-
] }),
|
|
341
|
-
/* @__PURE__ */ jsxRuntime.jsx(RenderIf, { condition: canSettingsChange, children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Box, { ...boxDefaultProps, children: /* @__PURE__ */ jsxRuntime.jsxs(index$2.Flex, { gap: 4, direction: "column", alignItems: "flex-start", children: [
|
|
342
|
-
/* @__PURE__ */ jsxRuntime.jsxs(index$2.Flex, { gap: 2, direction: "column", alignItems: "flex-start", children: [
|
|
343
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Typography, { variant: "delta", as: "h2", children: index$1.getMessage("page.settings.section.restore") }),
|
|
344
|
-
/* @__PURE__ */ jsxRuntime.jsx(index$2.Typography, { variant: "pi", as: "h4", children: index$1.getMessage("page.settings.section.restore.subtitle") })
|
|
345
|
-
] }),
|
|
346
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
347
|
-
index$1.ConfirmationDialog,
|
|
348
|
-
{
|
|
349
|
-
Trigger: ({ onClick }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
350
|
-
index$2.Button,
|
|
351
|
-
{
|
|
352
|
-
variant: "danger-light",
|
|
353
|
-
startIcon: /* @__PURE__ */ jsxRuntime.jsx(index$2.ForwardRef$59, {}),
|
|
354
|
-
onClick,
|
|
355
|
-
children: index$1.getMessage("page.settings.actions.restore")
|
|
356
|
-
}
|
|
357
|
-
),
|
|
358
|
-
onConfirm: restoreSettingsMutation.mutate,
|
|
359
|
-
title: index$1.getMessage("page.settings.actions.restore.confirmation.header"),
|
|
360
|
-
labelConfirm: index$1.getMessage("page.settings.actions.restore.confirmation.button.confirm"),
|
|
361
|
-
iconConfirm: /* @__PURE__ */ jsxRuntime.jsx(index$2.ForwardRef$59, {}),
|
|
362
|
-
children: index$1.getMessage("page.settings.actions.restore.confirmation.description")
|
|
363
|
-
}
|
|
364
|
-
)
|
|
365
|
-
] }) }) })
|
|
366
|
-
] })
|
|
367
|
-
}
|
|
368
|
-
)
|
|
369
|
-
] })
|
|
370
|
-
] })
|
|
371
|
-
] });
|
|
372
|
-
};
|
|
373
|
-
new reactQuery.QueryClient();
|
|
374
|
-
const index = () => /* @__PURE__ */ jsxRuntime.jsx(index$1.CommonProviders, { children: /* @__PURE__ */ jsxRuntime.jsx(Settings, {}) });
|
|
375
|
-
exports.default = index;
|