@mattisvensson/strapi-plugin-webatlas 0.11.8 → 0.12.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.
Files changed (31) hide show
  1. package/README.md +6 -2
  2. package/dist/admin/{FullLoader-Btjb2W2p.mjs → FullLoader-BTZzPY8g.mjs} +11 -1
  3. package/dist/admin/{FullLoader-Da2n70bJ.js → FullLoader-C4hXFaLP.js} +10 -0
  4. package/dist/admin/{RoutePicker-CFqZfjDu.mjs → RoutePicker-h2yWGB6S.mjs} +1 -1
  5. package/dist/admin/{RoutePicker-BEmAG6aK.js → RoutePicker-mEHRtXQ9.js} +1 -1
  6. package/dist/admin/{SettingTitle-DRvX07-B.js → SettingTitle-CBcBCh1h.js} +1 -1
  7. package/dist/admin/{SettingTitle-D_X8W1mC.mjs → SettingTitle-DTXdYICP.mjs} +1 -1
  8. package/dist/admin/WarningBox-CMQuE_Ov.mjs +42 -0
  9. package/dist/admin/WarningBox-DsBtzhs3.js +41 -0
  10. package/dist/admin/{de-B5pRvs13.mjs → de-BFjenpyN.mjs} +16 -1
  11. package/dist/admin/{de-CqU1FU8C.js → de-DhwCZE_m.js} +16 -1
  12. package/dist/admin/{en-C7I90FwV.js → en-C-rPCNd2.js} +16 -1
  13. package/dist/admin/{en-BE-zzIv8.mjs → en-CGCh9ld_.mjs} +16 -1
  14. package/dist/admin/{index-lZ3-1icm.js → index-BYytQZfK.js} +169 -131
  15. package/dist/admin/{index-_8exe5fa.js → index-BZBUZWp1.js} +13 -8
  16. package/dist/admin/{index-CSknqklZ.js → index-Bn_SWdWd.js} +178 -85
  17. package/dist/admin/{index-ClG-B5Tr.js → index-CaFjiS4j.js} +21 -13
  18. package/dist/admin/{index-DZkauelU.mjs → index-Ckaev6xU.mjs} +170 -132
  19. package/dist/admin/{index-B9kmIJ1Y.mjs → index-Do9dOMP-.mjs} +180 -87
  20. package/dist/admin/{index-HCnLKUJN.mjs → index-DuwTQMlZ.mjs} +21 -13
  21. package/dist/admin/index-GZ_b2eve.js +480 -0
  22. package/dist/admin/index-aSdHc104.mjs +480 -0
  23. package/dist/admin/{index-CYF5Yipx.mjs → index-l4-tTCw9.mjs} +13 -8
  24. package/dist/admin/index.js +1 -1
  25. package/dist/admin/index.mjs +2 -2
  26. package/dist/server/index.js +485 -496
  27. package/dist/server/index.mjs +498 -509
  28. package/dist/server/src/index.d.ts +48 -5
  29. package/package.json +1 -1
  30. package/dist/admin/index-CTbP2yjO.js +0 -243
  31. package/dist/admin/index-uD-voTpW.mjs +0 -243
@@ -0,0 +1,480 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const designSystem = require("@strapi/design-system");
6
+ const admin = require("@strapi/strapi/admin");
7
+ const index = require("./index-BYytQZfK.js");
8
+ const WarningBox = require("./WarningBox-DsBtzhs3.js");
9
+ const FullLoader = require("./FullLoader-C4hXFaLP.js");
10
+ const reactIntl = require("react-intl");
11
+ require("@strapi/icons/symbols");
12
+ const icons = require("@strapi/icons");
13
+ const SettingTitle = require("./SettingTitle-CBcBCh1h.js");
14
+ function getRouteSourceFields(contentType) {
15
+ if (!contentType?.attributes) return [];
16
+ return Object.entries(contentType.attributes).filter(
17
+ ([key, attribute]) => attribute.type === "string" && key !== "documentId"
18
+ );
19
+ }
20
+ function ContentTypeAccordion({
21
+ contentType,
22
+ contentTypeSettings,
23
+ dispatch,
24
+ allGroupedEntities,
25
+ entitiesLoading
26
+ }) {
27
+ const { formatMessage } = reactIntl.useIntl();
28
+ const [selectedContentType, setSelectedContentType] = React.useState(null);
29
+ React.useEffect(() => {
30
+ if (entitiesLoading || !contentType || selectedContentType || !contentTypeSettings?.defaultParentRoute)
31
+ return;
32
+ const groupedEntity = allGroupedEntities.find(
33
+ (group) => group.entities.some((entity) => entity.documentId === contentTypeSettings.defaultParentRoute)
34
+ );
35
+ if (!groupedEntity) {
36
+ dispatch({
37
+ type: "SET_DEFAULT_PARENT_ROUTE",
38
+ payload: { ctUid: contentType.uid, parentRoute: null }
39
+ });
40
+ return;
41
+ }
42
+ setSelectedContentType(groupedEntity);
43
+ dispatch({
44
+ type: "SET_DEFAULT_PARENT_ROUTE",
45
+ payload: { ctUid: contentType.uid, parentRoute: contentTypeSettings.defaultParentRoute }
46
+ });
47
+ }, [contentTypeSettings?.defaultParentRoute, allGroupedEntities, contentType, entitiesLoading]);
48
+ const defaultParentRoute = selectedContentType?.entities.find(
49
+ (entity) => entity.documentId === contentTypeSettings.defaultParentRoute
50
+ );
51
+ const filteredAttributes = getRouteSourceFields(contentType);
52
+ if (!contentType) return null;
53
+ return /* @__PURE__ */ jsxRuntime.jsx(
54
+ designSystem.Box,
55
+ {
56
+ borderColor: !contentTypeSettings.routeSourceField ? "danger500" : void 0,
57
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: contentType.uid, children: [
58
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Trigger, { children: contentType?.info.displayName }) }),
59
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Content, { children: [
60
+ filteredAttributes.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 3, children: /* @__PURE__ */ jsxRuntime.jsx(
61
+ WarningBox.WarningBox,
62
+ {
63
+ title: formatMessage({
64
+ id: index.getTranslation("settings.page.generate.warning.title"),
65
+ defaultMessage: "No route source field available"
66
+ }),
67
+ description: formatMessage({
68
+ id: index.getTranslation("settings.page.generate.warning.description"),
69
+ defaultMessage: "Please add a string field to the content type in order to use this content type with Webatlas."
70
+ })
71
+ }
72
+ ) }),
73
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 3, children: [
74
+ /* @__PURE__ */ jsxRuntime.jsxs(
75
+ designSystem.Field.Root,
76
+ {
77
+ name: "selectedContentTypes",
78
+ error: filteredAttributes.length > 0 && !contentTypeSettings.routeSourceField && formatMessage({
79
+ id: index.getTranslation("settings.page.generate.error"),
80
+ defaultMessage: "Please select a default field"
81
+ }),
82
+ required: true,
83
+ children: [
84
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Label, { children: [
85
+ formatMessage({
86
+ id: index.getTranslation("settings.page.generate"),
87
+ defaultMessage: "Generate paths from"
88
+ }),
89
+ /* @__PURE__ */ jsxRuntime.jsx(
90
+ index.Tooltip,
91
+ {
92
+ description: formatMessage({
93
+ id: index.getTranslation("settings.page.generate.hint"),
94
+ defaultMessage: 'The selected field from the content type will be used to generate the path. Use a field that is unique and descriptive, such as a "title" or "name".'
95
+ })
96
+ }
97
+ )
98
+ ] }),
99
+ /* @__PURE__ */ jsxRuntime.jsx(
100
+ designSystem.SingleSelect,
101
+ {
102
+ name: `defaultField-${contentType.uid}`,
103
+ onClear: () => dispatch({
104
+ type: "SET_DEFAULT_FIELD",
105
+ payload: { ctUid: contentType.uid, field: "" }
106
+ }),
107
+ value: contentTypeSettings?.routeSourceField || "",
108
+ onChange: (value) => dispatch({
109
+ type: "SET_DEFAULT_FIELD",
110
+ payload: { ctUid: contentType.uid, field: String(value) }
111
+ }),
112
+ disabled: filteredAttributes.length === 0,
113
+ children: filteredAttributes.map(([key], index2) => {
114
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: key, children: key }, index2);
115
+ })
116
+ }
117
+ ),
118
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
119
+ ]
120
+ }
121
+ ),
122
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Grid.Root, { gap: 4, marginTop: 4, children: [
123
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, s: 12, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { width: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "defaultParentRouteContentType", children: [
124
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Label, { children: [
125
+ formatMessage({
126
+ id: index.getTranslation("settings.page.defaultParentRoute"),
127
+ defaultMessage: "Default parent route"
128
+ }),
129
+ /* @__PURE__ */ jsxRuntime.jsx(
130
+ index.Tooltip,
131
+ {
132
+ description: formatMessage({
133
+ id: index.getTranslation("settings.page.defaultParentRoute.hint"),
134
+ defaultMessage: "Select a default parent route for the content type. When creating a new entry, the default parent route will be pre-selected."
135
+ })
136
+ }
137
+ )
138
+ ] }),
139
+ /* @__PURE__ */ jsxRuntime.jsx(
140
+ designSystem.SingleSelect,
141
+ {
142
+ name: `defaultParentRoute-${contentType.uid}`,
143
+ onClear: () => {
144
+ setSelectedContentType(null);
145
+ dispatch({
146
+ type: "SET_DEFAULT_PARENT_ROUTE",
147
+ payload: { ctUid: contentType.uid, parentRoute: null }
148
+ });
149
+ },
150
+ value: selectedContentType?.contentType.uid || "",
151
+ onChange: (value) => {
152
+ const [filteredContentType] = allGroupedEntities.filter(
153
+ (group) => group.contentType.uid === value
154
+ );
155
+ if (filteredContentType) {
156
+ setSelectedContentType(filteredContentType);
157
+ dispatch({
158
+ type: "SET_DEFAULT_PARENT_ROUTE",
159
+ payload: { ctUid: contentType.uid, parentRoute: null }
160
+ });
161
+ }
162
+ },
163
+ placeholder: formatMessage({
164
+ id: index.getTranslation(
165
+ "settings.page.defaultParentRoute.contentType.placeholder"
166
+ ),
167
+ defaultMessage: "Select a content type"
168
+ }),
169
+ children: allGroupedEntities.map((groupedEntity) => {
170
+ return /* @__PURE__ */ jsxRuntime.jsx(
171
+ designSystem.SingleSelectOption,
172
+ {
173
+ value: groupedEntity.contentType.uid,
174
+ children: groupedEntity.contentType.label
175
+ },
176
+ groupedEntity.contentType.uid
177
+ );
178
+ })
179
+ }
180
+ ),
181
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
182
+ ] }) }) }),
183
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, s: 12, alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { width: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "defaultParentRouteEntity", children: [
184
+ /* @__PURE__ */ jsxRuntime.jsx(
185
+ designSystem.SingleSelect,
186
+ {
187
+ name: `defaultParentRoute-${contentType.uid}`,
188
+ onClear: () => dispatch({
189
+ type: "SET_DEFAULT_PARENT_ROUTE",
190
+ payload: { ctUid: contentType.uid, parentRoute: null }
191
+ }),
192
+ placeholder: formatMessage({
193
+ id: index.getTranslation("settings.page.defaultParentRoute.entity.placeholder"),
194
+ defaultMessage: "Select an entity"
195
+ }),
196
+ value: defaultParentRoute?.documentId || "",
197
+ onChange: (value) => dispatch({
198
+ type: "SET_DEFAULT_PARENT_ROUTE",
199
+ payload: { ctUid: contentType.uid, parentRoute: String(value) }
200
+ }),
201
+ disabled: !selectedContentType || selectedContentType.entities.length === 0 || !selectedContentType.contentType.routeSourceField,
202
+ children: selectedContentType?.entities.map((entity) => {
203
+ if (!selectedContentType.contentType.routeSourceField) return null;
204
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: entity.documentId, children: entity[selectedContentType.contentType.routeSourceField] }, entity.documentId);
205
+ })
206
+ }
207
+ ),
208
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
209
+ ] }) }) })
210
+ ] })
211
+ ] })
212
+ ] })
213
+ ] }, contentType.uid)
214
+ },
215
+ contentType.uid
216
+ );
217
+ }
218
+ function reducer(newConfig, action) {
219
+ let updatedContentTypes;
220
+ switch (action.type) {
221
+ case "SET_DEFAULT_FIELD":
222
+ if (!newConfig) return null;
223
+ updatedContentTypes = newConfig?.selectedContentTypes.map(
224
+ (ct) => ct.uid === action.payload.ctUid ? { ...ct, routeSourceField: action.payload.field } : ct
225
+ );
226
+ return { ...newConfig, selectedContentTypes: updatedContentTypes || [] };
227
+ case "SET_DEFAULT_PARENT_ROUTE":
228
+ if (!newConfig) return null;
229
+ updatedContentTypes = newConfig?.selectedContentTypes.map(
230
+ (ct) => ct.uid === action.payload.ctUid ? { ...ct, defaultParentRoute: action.payload.parentRoute } : ct
231
+ );
232
+ return { ...newConfig, selectedContentTypes: updatedContentTypes || [] };
233
+ case "SET_ROUTE_BLACKLIST":
234
+ if (!newConfig) return null;
235
+ return { ...newConfig, routeBlacklist: action.payload.blacklist };
236
+ case "SET_CONFIG":
237
+ return action.payload;
238
+ default:
239
+ throw new Error();
240
+ }
241
+ }
242
+ const Settings = () => {
243
+ const { config: fetchedConfig, setConfig, loading, fetchError } = index.usePluginConfig();
244
+ const [config, dispatch] = React.useReducer(reducer, fetchedConfig);
245
+ const { contentTypes: allContentTypesData, error: contentTypesError } = index.useAllContentTypes();
246
+ const allContentTypes = allContentTypesData?.filter(
247
+ (ct) => ct.pluginOptions?.webatlas?.enabled === true
248
+ );
249
+ const { toggleNotification } = admin.useNotification();
250
+ const getErrorMessage = FullLoader.useErrorMessage();
251
+ const { formatMessage } = reactIntl.useIntl();
252
+ const [isSaving, setIsSaving] = React.useState(false);
253
+ const [blacklistInput, setBlacklistInput] = React.useState("");
254
+ const initialConfig = React.useRef(fetchedConfig);
255
+ const { entities, loading: entitiesLoading, error: entitiesError } = WarningBox.useAllEntities();
256
+ const selectableEntities = React.useMemo(
257
+ () => entities.filter(
258
+ (groupedEntity) => config?.selectedContentTypes.some(
259
+ (ct) => ct.uid === groupedEntity.contentType.uid && ct.routeSourceField
260
+ )
261
+ ),
262
+ [entities, config?.selectedContentTypes]
263
+ );
264
+ const hasMissingRouteSourceField = config?.selectedContentTypes.some(
265
+ (ct) => !ct.routeSourceField && getRouteSourceFields(allContentTypes?.find((item) => item.uid === ct.uid)).length > 0
266
+ ) ?? false;
267
+ React.useEffect(() => {
268
+ initialConfig.current = fetchedConfig;
269
+ if (fetchedConfig) {
270
+ dispatch({ type: "SET_CONFIG", payload: fetchedConfig });
271
+ setBlacklistInput(fetchedConfig.routeBlacklist?.join(", ") || "");
272
+ }
273
+ }, [fetchedConfig]);
274
+ React.useEffect(() => {
275
+ const error = contentTypesError ?? entitiesError;
276
+ if (!error) return;
277
+ toggleNotification({
278
+ type: "danger",
279
+ message: getErrorMessage(
280
+ error,
281
+ formatMessage({
282
+ id: index.getTranslation("notification.settings.fetchFailed"),
283
+ defaultMessage: "Failed to load content types"
284
+ })
285
+ )
286
+ });
287
+ }, [contentTypesError, entitiesError, toggleNotification, getErrorMessage, formatMessage]);
288
+ React.useEffect(() => {
289
+ if (fetchError) {
290
+ toggleNotification({
291
+ type: "danger",
292
+ message: getErrorMessage(
293
+ fetchError,
294
+ formatMessage({
295
+ id: index.getTranslation("notification.error"),
296
+ defaultMessage: "An error occurred"
297
+ })
298
+ )
299
+ });
300
+ }
301
+ }, [fetchError, toggleNotification, getErrorMessage, formatMessage]);
302
+ async function save() {
303
+ if (!config || hasMissingRouteSourceField) return;
304
+ setIsSaving(true);
305
+ try {
306
+ await setConfig({
307
+ selectedContentTypes: config.selectedContentTypes,
308
+ routeBlacklist: config.routeBlacklist
309
+ });
310
+ initialConfig.current = config;
311
+ toggleNotification({
312
+ type: "success",
313
+ message: formatMessage({
314
+ id: index.getTranslation("notification.settings.saved"),
315
+ defaultMessage: "Settings saved successfully"
316
+ })
317
+ });
318
+ setIsSaving(false);
319
+ } catch (err) {
320
+ setIsSaving(false);
321
+ toggleNotification({
322
+ type: "danger",
323
+ message: getErrorMessage(
324
+ err,
325
+ formatMessage({
326
+ id: index.getTranslation("notification.error"),
327
+ defaultMessage: "An error occurred"
328
+ })
329
+ )
330
+ });
331
+ console.error(err);
332
+ }
333
+ }
334
+ if (loading) {
335
+ return /* @__PURE__ */ jsxRuntime.jsx(
336
+ SettingTitle.PageWrapper,
337
+ {
338
+ isSaving,
339
+ subtitle: formatMessage({
340
+ id: index.getTranslation("loading"),
341
+ defaultMessage: "Loading..."
342
+ }),
343
+ disabledCondition: true,
344
+ children: /* @__PURE__ */ jsxRuntime.jsx(FullLoader.FullLoader, { height: 200 })
345
+ }
346
+ );
347
+ }
348
+ return /* @__PURE__ */ jsxRuntime.jsx(admin.Page.Protect, { permissions: index.pluginPermissions["settings.general"], children: /* @__PURE__ */ jsxRuntime.jsxs(
349
+ SettingTitle.PageWrapper,
350
+ {
351
+ save,
352
+ isSaving,
353
+ subtitle: formatMessage({
354
+ id: index.getTranslation("settings.page.general.subtitle"),
355
+ defaultMessage: "Configure general settings"
356
+ }),
357
+ disabledCondition: JSON.stringify(config) === JSON.stringify(initialConfig.current) || hasMissingRouteSourceField,
358
+ children: [
359
+ /* @__PURE__ */ jsxRuntime.jsxs(
360
+ SettingTitle.ContentBox,
361
+ {
362
+ title: formatMessage({
363
+ id: index.getTranslation("settings.page.general.contentTypes"),
364
+ defaultMessage: "Content Types"
365
+ }),
366
+ children: [
367
+ config?.selectedContentTypes && config.selectedContentTypes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "selectedContentTypesAccordion", children: [
368
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: /* @__PURE__ */ jsxRuntime.jsx(SettingTitle.SettingTitle, { children: formatMessage({
369
+ id: index.getTranslation("settings.page.contentTypeSettings"),
370
+ defaultMessage: "Content Type settings"
371
+ }) }) }),
372
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { children: config.selectedContentTypes?.map((contentTypeSettings) => {
373
+ const ct = allContentTypes?.find(
374
+ (item) => item.uid === contentTypeSettings.uid
375
+ );
376
+ return /* @__PURE__ */ jsxRuntime.jsx(
377
+ ContentTypeAccordion,
378
+ {
379
+ contentType: ct,
380
+ contentTypeSettings,
381
+ dispatch,
382
+ allGroupedEntities: selectableEntities,
383
+ entitiesLoading
384
+ },
385
+ contentTypeSettings.uid
386
+ );
387
+ }) })
388
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { children: [
389
+ formatMessage({
390
+ id: index.getTranslation("settings.page.general.noContentTypesEnabled"),
391
+ defaultMessage: "No content types are enabled for Webatlas. Please enable at least one content type to use this plugin."
392
+ }),
393
+ /* @__PURE__ */ jsxRuntime.jsx(
394
+ designSystem.Link,
395
+ {
396
+ href: "https://github.com/mattisvensson/strapi-plugin-webatlas?tab=readme-ov-file#-configuration",
397
+ isExternal: true,
398
+ style: { marginLeft: 4 },
399
+ children: formatMessage({
400
+ id: index.getTranslation("settings.page.general.noContentTypesEnabled.moreInfo"),
401
+ defaultMessage: "More info"
402
+ })
403
+ }
404
+ )
405
+ ] }),
406
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(
407
+ designSystem.Field.Root,
408
+ {
409
+ name: "routeBlacklist",
410
+ hint: formatMessage({
411
+ id: index.getTranslation("settings.page.blacklist.hint"),
412
+ defaultMessage: 'Enter a comma-separated list of URL segments that should be blocked from being used in generated paths. For example, if you enter "admin, login", then any generated path that starts with "/admin" or "/login" will be blocked, while paths like "/admin-guide" stay allowed. The blacklist only applies to routes that are created or updated after saving — it does not affect existing routes.'
413
+ }),
414
+ children: [
415
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: /* @__PURE__ */ jsxRuntime.jsx(SettingTitle.SettingTitle, { children: formatMessage({
416
+ id: index.getTranslation("settings.page.blacklist.label"),
417
+ defaultMessage: "URL Blacklist"
418
+ }) }) }),
419
+ /* @__PURE__ */ jsxRuntime.jsx(
420
+ designSystem.Field.Input,
421
+ {
422
+ type: "text",
423
+ placeholder: formatMessage({
424
+ id: index.getTranslation("settings.page.blacklist.placeholder"),
425
+ defaultMessage: "Enter comma-separated URL segments to block"
426
+ }),
427
+ value: blacklistInput,
428
+ onChange: (e) => setBlacklistInput(e.target.value),
429
+ onBlur: () => {
430
+ const blacklist = blacklistInput.split(",").map((s) => s.trim().toLowerCase().replace(/^\/+/, "").replace(/\/+$/, "")).filter(Boolean);
431
+ dispatch({ type: "SET_ROUTE_BLACKLIST", payload: { blacklist } });
432
+ setBlacklistInput(blacklist.join(", "));
433
+ }
434
+ }
435
+ ),
436
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
437
+ ]
438
+ }
439
+ ) })
440
+ ]
441
+ }
442
+ ),
443
+ /* @__PURE__ */ jsxRuntime.jsx(
444
+ SettingTitle.ContentBox,
445
+ {
446
+ title: formatMessage({
447
+ id: index.getTranslation("settings.page.general.details"),
448
+ defaultMessage: "Details"
449
+ }),
450
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "selectedContentTypesAccordion", children: [
451
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: /* @__PURE__ */ jsxRuntime.jsxs(SettingTitle.SettingTitle, { children: [
452
+ index.PLUGIN_NAME,
453
+ " ",
454
+ formatMessage({
455
+ id: index.getTranslation("version"),
456
+ defaultMessage: "Version"
457
+ })
458
+ ] }) }),
459
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { children: [
460
+ "v",
461
+ index.PLUGIN_VERSION,
462
+ /* @__PURE__ */ jsxRuntime.jsx(
463
+ designSystem.Link,
464
+ {
465
+ href: `https://github.com/mattisvensson/strapi-plugin-webatlas/releases/tag/v${index.PLUGIN_VERSION}`,
466
+ target: "_blank",
467
+ rel: "noopener noreferrer",
468
+ style: { marginLeft: 4 },
469
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLink, {})
470
+ }
471
+ )
472
+ ] })
473
+ ] })
474
+ }
475
+ )
476
+ ]
477
+ }
478
+ ) });
479
+ };
480
+ exports.default = Settings;