@mattisvensson/strapi-plugin-webatlas 0.12.2 → 0.14.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 (192) hide show
  1. package/README.md +46 -1
  2. package/dist/admin/{SettingTitle-DXGCUfum.js → ContentBox-CHwpYMiB.js} +1 -5
  3. package/dist/admin/{SettingTitle-C1_2epDJ.mjs → ContentBox-CYnyB_5a.mjs} +2 -6
  4. package/dist/admin/{RoutePicker-C6LpgVMi.mjs → RoutePicker-43YnYCpH.mjs} +1 -1
  5. package/dist/admin/{RoutePicker-DvzQH2CX.js → RoutePicker-D9zf-VdN.js} +1 -1
  6. package/dist/admin/WarningBox-AyYq0Onj.mjs +18 -0
  7. package/dist/admin/{WarningBox-BHlYlKQ8.js → WarningBox-FF1yYDXP.js} +0 -24
  8. package/dist/admin/{de-BWUGdpM0.js → de-DolV3m7M.js} +115 -5
  9. package/dist/admin/{de-Dnk_hvMW.mjs → de-Dt3jjL3h.mjs} +115 -5
  10. package/dist/admin/{en-D5EqZSGy.mjs → en-CCRmKJEV.mjs} +114 -4
  11. package/dist/admin/{en-DOk8P6X5.js → en-jWdO5RMZ.js} +114 -4
  12. package/dist/admin/index-7iO5UsYI.js +174 -0
  13. package/dist/admin/{index-DuSnxRbO.mjs → index-B2k8Pikg.mjs} +44 -12
  14. package/dist/admin/index-CK4JyItR.mjs +5363 -0
  15. package/dist/admin/{index-CVrufPeL.mjs → index-CMuhLgfi.mjs} +74 -30
  16. package/dist/admin/{index-D7zg69uM.js → index-Ciem6YTr.js} +50 -18
  17. package/dist/admin/index-DGYmrx3f.mjs +174 -0
  18. package/dist/admin/index-Ddnt9W-v.mjs +1025 -0
  19. package/dist/admin/index-DfG_hSMk.js +5363 -0
  20. package/dist/admin/{index-DHNPW0YT.js → index-DmOWQK6g.js} +70 -26
  21. package/dist/admin/index-dB79zyxi.js +1025 -0
  22. package/dist/admin/index.js +1 -1
  23. package/dist/admin/index.mjs +1 -1
  24. package/dist/admin/src/components/CMEditViewAside/NewPathInfo.d.ts +5 -0
  25. package/dist/admin/src/components/CMEditViewAside/OverrideCheckbox.d.ts +7 -0
  26. package/dist/admin/src/components/CMEditViewAside/Panel.d.ts +5 -0
  27. package/dist/admin/src/components/CMEditViewAside/PathInput.d.ts +12 -0
  28. package/dist/admin/src/components/CMEditViewAside/RouteStructure.d.ts +3 -0
  29. package/dist/admin/src/components/CMEditViewAside/UidPathDisplay.d.ts +4 -0
  30. package/dist/admin/src/components/CMEditViewAside/index.d.ts +3 -0
  31. package/dist/admin/src/components/Initializer.d.ts +5 -0
  32. package/dist/admin/src/components/PathInfo.d.ts +8 -0
  33. package/dist/admin/src/components/PluginIcon.d.ts +3 -0
  34. package/dist/admin/src/components/Tooltip.d.ts +3 -0
  35. package/dist/admin/src/components/UI/Center.d.ts +4 -0
  36. package/dist/admin/src/components/UI/EmptyBox.d.ts +5 -0
  37. package/dist/admin/src/components/UI/FullLoader.d.ts +3 -0
  38. package/dist/admin/src/components/UI/WarningBox.d.ts +4 -0
  39. package/dist/admin/src/components/UI/index.d.ts +5 -0
  40. package/dist/admin/src/components/customFields/RoutePicker.d.ts +25 -0
  41. package/dist/admin/src/components/modals/Delete.d.ts +7 -0
  42. package/dist/admin/src/components/modals/DiscardChanges.d.ts +3 -0
  43. package/dist/admin/src/components/modals/NavCreate.d.ts +1 -0
  44. package/dist/admin/src/components/modals/NavEdit.d.ts +7 -0
  45. package/dist/admin/src/components/modals/NavModal.d.ts +16 -0
  46. package/dist/admin/src/components/modals/NavOverview.d.ts +10 -0
  47. package/dist/admin/src/components/modals/SaveConfirm.d.ts +8 -0
  48. package/dist/admin/src/components/modals/externalItem/index.d.ts +15 -0
  49. package/dist/admin/src/components/modals/index.d.ts +14 -0
  50. package/dist/admin/src/components/modals/internalItem/EntrySelection.d.ts +17 -0
  51. package/dist/admin/src/components/modals/internalItem/ItemDetails.d.ts +13 -0
  52. package/dist/admin/src/components/modals/internalItem/MultiItemReview.d.ts +23 -0
  53. package/dist/admin/src/components/modals/internalItem/internalItemCreate.d.ts +2 -0
  54. package/dist/admin/src/components/modals/internalItem/internalItemEdit.d.ts +2 -0
  55. package/dist/admin/src/components/modals/useModalSharedLogic.d.ts +2 -0
  56. package/dist/admin/src/components/modals/withModalSharedLogic.d.ts +3 -0
  57. package/dist/admin/src/components/modals/wrapperItem/index.d.ts +15 -0
  58. package/dist/admin/src/contexts/index.d.ts +17 -0
  59. package/dist/admin/src/hooks/index.d.ts +7 -0
  60. package/dist/admin/src/hooks/useAllContentTypes.d.ts +7 -0
  61. package/dist/admin/src/hooks/useAllEntities.d.ts +7 -0
  62. package/dist/admin/src/hooks/useApi.d.ts +23 -0
  63. package/dist/admin/src/hooks/useEntrySearch.d.ts +13 -0
  64. package/dist/admin/src/hooks/useErrorMessage.d.ts +8 -0
  65. package/dist/admin/src/hooks/usePluginConfig.d.ts +9 -0
  66. package/dist/admin/src/pages/Navigation/Page.d.ts +2 -0
  67. package/dist/admin/src/pages/Navigation/PageWrapper.d.ts +8 -0
  68. package/dist/admin/src/pages/Navigation/RouteItem.d.ts +2 -0
  69. package/dist/admin/src/pages/Navigation/RouteItemBadge.d.ts +4 -0
  70. package/dist/admin/src/pages/Navigation/RouteItemIcon.d.ts +5 -0
  71. package/dist/admin/src/pages/Navigation/RouteItemMenu.d.ts +12 -0
  72. package/dist/admin/src/pages/Navigation/RouteItemStatus.d.ts +5 -0
  73. package/dist/admin/src/pages/Navigation/SortableRouteItem.d.ts +2 -0
  74. package/dist/admin/src/pages/Navigation/UnsavedChangesBlocker.d.ts +8 -0
  75. package/dist/admin/src/pages/Navigation/index.d.ts +2 -0
  76. package/dist/admin/src/pages/Navigation/useCollapsedItems.d.ts +13 -0
  77. package/dist/admin/src/pages/Paths/HealthSummary.d.ts +8 -0
  78. package/dist/admin/src/pages/Paths/IssueBadges.d.ts +4 -0
  79. package/dist/admin/src/pages/Paths/PageWrapper.d.ts +5 -0
  80. package/dist/admin/src/pages/Paths/PathActionsMenu.d.ts +7 -0
  81. package/dist/admin/src/pages/Paths/PathFilters.d.ts +14 -0
  82. package/dist/admin/src/pages/Paths/PathTable.d.ts +18 -0
  83. package/dist/admin/src/pages/Paths/SearchInput.d.ts +5 -0
  84. package/dist/admin/src/pages/Paths/TableHeader.d.ts +6 -0
  85. package/dist/admin/src/pages/Paths/TableRow.d.ts +9 -0
  86. package/dist/admin/src/pages/Paths/compareBy.d.ts +3 -0
  87. package/dist/admin/src/pages/Paths/hasPathDeviation.d.ts +2 -0
  88. package/dist/admin/src/pages/Paths/healthMessages.d.ts +11 -0
  89. package/dist/admin/src/pages/Paths/index.d.ts +2 -0
  90. package/dist/admin/src/pages/Settings/ContentBox.d.ts +4 -0
  91. package/dist/admin/src/pages/Settings/General/ContentTypeAccordion.d.ts +9 -0
  92. package/dist/admin/src/pages/Settings/General/index.d.ts +2 -0
  93. package/dist/admin/src/pages/Settings/Navigation/index.d.ts +2 -0
  94. package/dist/admin/src/pages/Settings/PageWrapper.d.ts +7 -0
  95. package/dist/admin/src/pages/Settings/SettingTitle.d.ts +3 -0
  96. package/dist/admin/src/pages/Settings/index.d.ts +4 -0
  97. package/dist/admin/src/permissions.d.ts +51 -0
  98. package/dist/admin/src/types/index.d.ts +4 -0
  99. package/dist/admin/src/types/modal.d.ts +60 -0
  100. package/dist/admin/src/types/navigation.d.ts +24 -0
  101. package/dist/admin/src/types/panel.d.ts +50 -0
  102. package/dist/admin/src/types/route.d.ts +3 -0
  103. package/dist/admin/src/utils/buildBreadcrumbString.d.ts +16 -0
  104. package/dist/admin/src/utils/createTempNavItemObject.d.ts +22 -0
  105. package/dist/admin/src/utils/debounce.d.ts +1 -0
  106. package/dist/admin/src/utils/dnd.d.ts +13 -0
  107. package/dist/admin/src/utils/duplicateCheck.d.ts +19 -0
  108. package/dist/admin/src/utils/findParentNavItem.d.ts +13 -0
  109. package/dist/admin/src/utils/getRouteSourceFields.d.ts +2 -0
  110. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  111. package/dist/admin/src/utils/index.d.ts +11 -0
  112. package/dist/admin/src/utils/isAbortError.d.ts +5 -0
  113. package/dist/admin/src/utils/navTree.d.ts +39 -0
  114. package/dist/admin/src/utils/syncNavItemPaths.d.ts +12 -0
  115. package/dist/admin/src/utils/typeChecks.d.ts +3 -0
  116. package/dist/server/index.js +584 -53
  117. package/dist/server/index.mjs +585 -54
  118. package/dist/server/src/bootstrap/documentMiddleware.d.ts +18 -0
  119. package/dist/server/src/bootstrap/index.d.ts +5 -0
  120. package/dist/server/src/bootstrap/permissions.d.ts +2 -0
  121. package/dist/server/src/bootstrap/syncConfig.d.ts +3 -0
  122. package/dist/server/src/bootstrap/webatlasMiddleware.d.ts +2 -0
  123. package/dist/server/src/bootstrap.d.ts +5 -0
  124. package/dist/server/src/config/index.d.ts +8 -0
  125. package/dist/server/src/content-types/index.d.ts +208 -0
  126. package/dist/server/src/content-types/navigation/index.d.ts +56 -0
  127. package/dist/server/src/content-types/navigation/schema.d.ts +54 -0
  128. package/dist/server/src/content-types/navitem/index.d.ts +51 -0
  129. package/dist/server/src/content-types/navitem/schema.d.ts +49 -0
  130. package/dist/server/src/content-types/route/index.d.ts +101 -0
  131. package/dist/server/src/content-types/route/schema.d.ts +99 -0
  132. package/dist/server/src/controllers/admin.d.ts +19 -0
  133. package/dist/server/src/controllers/client.d.ts +8 -0
  134. package/dist/server/src/controllers/index.d.ts +27 -0
  135. package/dist/server/src/destroy.d.ts +5 -0
  136. package/dist/server/src/index.d.ts +31 -8
  137. package/dist/server/src/middlewares/addWebatlasField.d.ts +10 -0
  138. package/dist/server/src/middlewares/enrichRoutePicker.d.ts +10 -0
  139. package/dist/server/src/middlewares/index.d.ts +9 -0
  140. package/dist/server/src/migrations/001-canonical-path.d.ts +7 -0
  141. package/dist/server/src/migrations/002-webatlas-json-field.d.ts +7 -0
  142. package/dist/server/src/migrations/003-route-source-field.d.ts +7 -0
  143. package/dist/server/src/migrations/004-navigation-max-depth.d.ts +7 -0
  144. package/dist/server/src/migrations/index.d.ts +3 -0
  145. package/dist/server/src/policies/has-permissions.d.ts +2 -0
  146. package/dist/server/src/policies/index.d.ts +4 -0
  147. package/dist/server/src/register.d.ts +5 -0
  148. package/dist/server/src/routes/admin.d.ts +17 -0
  149. package/dist/server/src/routes/client.d.ts +12 -0
  150. package/dist/server/src/routes/index.d.ts +30 -0
  151. package/dist/server/src/services/admin.d.ts +33 -0
  152. package/dist/server/src/services/client.d.ts +48 -0
  153. package/dist/server/src/services/health.d.ts +5 -0
  154. package/dist/server/src/services/index.d.ts +83 -0
  155. package/dist/server/src/utils/addWebatlasBreadcrumb.d.ts +14 -0
  156. package/dist/server/src/utils/assertDescendantPathsAllowed.d.ts +19 -0
  157. package/dist/server/src/utils/assertPathAllowed.d.ts +2 -0
  158. package/dist/server/src/utils/buildCanonicalPath.d.ts +1 -0
  159. package/dist/server/src/utils/buildNavigationPath.d.ts +5 -0
  160. package/dist/server/src/utils/buildStructuredNavigation.d.ts +12 -0
  161. package/dist/server/src/utils/cascadePathUpdates.d.ts +6 -0
  162. package/dist/server/src/utils/cleanRootKeys.d.ts +1 -0
  163. package/dist/server/src/utils/duplicateCheck.d.ts +1 -0
  164. package/dist/server/src/utils/enrichRoutePickerFields.d.ts +7 -0
  165. package/dist/server/src/utils/enrichWebatlasData.d.ts +6 -0
  166. package/dist/server/src/utils/extractRouteAndItems.d.ts +32 -0
  167. package/dist/server/src/utils/getDocumentStatuses.d.ts +12 -0
  168. package/dist/server/src/utils/getNonInternalRouteIds.d.ts +1 -0
  169. package/dist/server/src/utils/getPublishedDocumentIds.d.ts +11 -0
  170. package/dist/server/src/utils/getRouteAncestors.d.ts +1 -0
  171. package/dist/server/src/utils/getRouteDescendants.d.ts +1 -0
  172. package/dist/server/src/utils/health/checks.d.ts +48 -0
  173. package/dist/server/src/utils/index.d.ts +29 -0
  174. package/dist/server/src/utils/isBlacklistedPath.d.ts +1 -0
  175. package/dist/server/src/utils/navItemHandler.d.ts +5 -0
  176. package/dist/server/src/utils/navigationItemStructure.d.ts +27 -0
  177. package/dist/server/src/utils/normalizeRouteBlacklist.d.ts +5 -0
  178. package/dist/server/src/utils/pluginHelpers.d.ts +4 -0
  179. package/dist/server/src/utils/populateDeep.d.ts +4 -0
  180. package/dist/server/src/utils/reduceDepthOfOrphanedItems.d.ts +2 -0
  181. package/dist/server/src/utils/removeUnpublishedNavItems.d.ts +7 -0
  182. package/dist/server/src/utils/removeWaFields.d.ts +1 -0
  183. package/dist/server/src/utils/routeHandler.d.ts +5 -0
  184. package/dist/server/src/utils/validateRouteDependencies.d.ts +4 -0
  185. package/package.json +5 -5
  186. package/dist/admin/WarningBox-CfIVF0O-.mjs +0 -42
  187. package/dist/admin/index-DC-2-FsX.mjs +0 -9622
  188. package/dist/admin/index-Dp_eCRFS.js +0 -249
  189. package/dist/admin/index-Dx4gvFWK.mjs +0 -147
  190. package/dist/admin/index-FuvoHpAT.js +0 -147
  191. package/dist/admin/index-RmZ3LQPu.js +0 -9622
  192. package/dist/admin/index-Y4uwBSjP.mjs +0 -249
@@ -7,12 +7,90 @@ const en = {
7
7
  "webatlas.navigation.page.newItemButton": "New Item",
8
8
  "webatlas.navigation.page.selectNavigation": "Select Navigation",
9
9
  "webatlas.navigation.page.navItem.addChildren": "Add children",
10
- "webatlas.navigation.page.navItem.viewEntity": "View entity",
10
+ "webatlas.navigation.page.navItem.viewEntity": "Open entry",
11
+ "webatlas.navigation.page.search.placeholder": "Search by title or path",
12
+ "webatlas.navigation.page.search.clear": "Clear search",
13
+ "webatlas.navigation.page.search.noResults": "No items found",
14
+ "webatlas.navigation.page.search.dragDisabled": "Drag and drop is disabled while searching.",
15
+ "webatlas.navigation.page.collapseAll": "Collapse all",
16
+ "webatlas.navigation.page.expandAll": "Expand all",
17
+ "webatlas.navigation.page.navItem.collapse": "Collapse",
18
+ "webatlas.navigation.page.navItem.expand": "Expand",
19
+ "webatlas.navigation.page.navItem.movedChildren": "+{count} {count, plural, one {child} other {children}}",
20
+ "webatlas.navigation.page.navItem.insertBelow": "Add item below",
21
+ "webatlas.navigation.page.discardChanges": "Discard changes",
22
+ "webatlas.navigation.page.emptyItems": "Your navigation is empty...",
23
+ "webatlas.navigation.page.itemCount": "{count, plural, one {# item} other {# items}}",
24
+ "webatlas.navigation.page.navItem.actions": "Item actions",
25
+ "webatlas.navigation.page.navItem.undoDelete": "Undo delete",
26
+ "webatlas.navigation.page.navItem.resetEdits": "Reset edits",
27
+ "webatlas.navigation.page.navItem.draftHint": "Only shown in the frontend once the page is published.",
28
+ "webatlas.navigation.page.navItem.modifiedHint": "The latest changes of the page are not published yet.",
11
29
  "webatlas.paths.page.title": "Paths",
12
30
  "webatlas.paths.page.subtitle": "Overview of all existing paths",
31
+ "webatlas.paths.page.total": "{count, plural, one {# path} other {# paths}} total",
32
+ "webatlas.paths.page.matches": "{count, plural, one {# match} other {# matches}}",
13
33
  "webatlas.paths.page.emptyPaths": "No paths found",
34
+ "webatlas.paths.page.emptyFiltered": "No paths match the current search or filters",
35
+ "webatlas.paths.page.clearSearch": "Clear search",
36
+ "webatlas.paths.page.action.openLink": "Open link",
37
+ "webatlas.paths.page.action.copyPath": "Copy path",
38
+ "webatlas.paths.page.action.showInNavigation": "Show in navigation",
39
+ "webatlas.paths.page.actions": "Path actions",
40
+ "webatlas.paths.page.action.showInNamedNavigation": 'Show in navigation "{name}"',
14
41
  "webatlas.paths.page.column.type": "Type",
42
+ "webatlas.paths.page.column.contentType": "Content Type",
43
+ "webatlas.paths.page.canonicalPathHint": "Canonical Path: {path}",
44
+ "webatlas.paths.page.deviation": "Differs",
45
+ "webatlas.paths.page.deviation.description": "The path differs from the content structure, due to the position in the navigation or a manual override",
15
46
  "webatlas.paths.page.searchPlaceholder": "Search paths",
47
+ "webatlas.paths.page.filter.contentType": "Content Type",
48
+ "webatlas.paths.page.filter.type": "Type",
49
+ "webatlas.paths.page.filter.deviation.true": "Differs",
50
+ "webatlas.paths.page.filter.deviation.false": "Matches",
51
+ "webatlas.paths.page.filter.deviation.placeholder": "Deviation",
52
+ "webatlas.paths.page.filter.navigation.true": "In navigation",
53
+ "webatlas.paths.page.filter.navigation.false": "Not in navigation",
54
+ "webatlas.paths.page.filter.navigation.placeholder": "Navigation",
55
+ "webatlas.paths.page.filter.clear": "Clear filter",
56
+ "webatlas.paths.page.filter.reset": "Reset filters",
57
+ "webatlas.paths.page.health.check.pathConflict": "Path conflict",
58
+ "webatlas.paths.page.health.check.pathConflict.description": "Several entries use the same path. The frontend then delivers any one of them.",
59
+ "webatlas.paths.page.health.check.orphanedRoute": "Orphaned",
60
+ "webatlas.paths.page.health.check.orphanedRoute.description": "The linked entry or content type no longer exists or is disabled in the plugin settings.",
61
+ "webatlas.paths.page.health.check.blacklistedPath": "Blocked path",
62
+ "webatlas.paths.page.health.check.blacklistedPath.description": "The path is blocked by the route blacklist. It only applies to new paths, existing ones stay reachable.",
63
+ "webatlas.paths.page.health.check.invalidExternalUrl": "Invalid URL",
64
+ "webatlas.paths.page.health.check.invalidExternalUrl.description": "The external link is no valid URL (http, https, mailto or tel).",
65
+ "webatlas.paths.page.health.check.unpublishedInNavigation": "Unpublished",
66
+ "webatlas.paths.page.health.check.unpublishedInNavigation.description": "The entry is not published, so it is missing in the navigation of the frontend.",
67
+ "webatlas.paths.page.health.check.tooDeepItem": "Too deep",
68
+ "webatlas.paths.page.health.check.tooDeepItem.description": "The navigation item is deeper than the maximum depth of its navigation allows.",
69
+ "webatlas.paths.page.health.check.notInNavigation": "Not in navigation",
70
+ "webatlas.paths.page.health.check.notInNavigation.description": "The page is not linked in any navigation.",
71
+ "webatlas.paths.page.health.check.emptyWrapper": "Empty wrapper",
72
+ "webatlas.paths.page.health.check.emptyWrapper.description": "The wrapper has no children and shows as an empty item in the navigation.",
73
+ "webatlas.paths.page.health.issue.pathConflict": '"{value}" is also used by: {routes}',
74
+ "webatlas.paths.page.health.issue.orphanedRoute.missingContentType": "The content type no longer exists",
75
+ "webatlas.paths.page.health.issue.orphanedRoute.disabledContentType": "The content type is not enabled in the plugin settings",
76
+ "webatlas.paths.page.health.issue.orphanedRoute.missingDocument": "The linked entry no longer exists",
77
+ "webatlas.paths.page.health.issue.blacklistedPath": '"{value}" is blocked by the route blacklist',
78
+ "webatlas.paths.page.health.issue.invalidExternalUrl": '"{value}" is no valid URL',
79
+ "webatlas.paths.page.health.issue.unpublishedInNavigation": 'Not published, but used in the navigation "{navigation}"',
80
+ "webatlas.paths.page.health.issue.tooDeepItem": 'On level {depth} in "{navigation}", {maxDepth, plural, one {# level is} other {# levels are}} allowed',
81
+ "webatlas.paths.page.health.issue.emptyWrapper": 'Without children in the navigation "{navigation}"',
82
+ "webatlas.paths.page.health.summary.error": "{count, plural, one {# error} other {# errors}}",
83
+ "webatlas.paths.page.health.summary.warning": "{count, plural, one {# warning} other {# warnings}}",
84
+ "webatlas.paths.page.health.summary.info": "{count, plural, one {# hint} other {# hints}}",
85
+ "webatlas.paths.page.health.loading": "Checking paths …",
86
+ "webatlas.paths.page.health.unavailable": "The paths could not be checked",
87
+ "webatlas.paths.page.health.noIssues": "No issues found",
88
+ "webatlas.paths.page.health.showDetails": "Show details",
89
+ "webatlas.paths.page.health.hideDetails": "Hide details",
90
+ "webatlas.paths.page.health.recheck": "Check again",
91
+ "webatlas.paths.page.health.affected": "{count, plural, one {# path} other {# paths}}",
92
+ "webatlas.paths.page.health.showPaths": "Show paths",
93
+ "webatlas.paths.page.health.hidePaths": "Show all paths",
16
94
  "webatlas.settings.page.general.subtitle": "Configure general settings",
17
95
  "webatlas.settings.page.general.webatlasVersion": "Webatlas Version",
18
96
  "webatlas.settings.page.general.contentTypes": "Content Types",
@@ -34,7 +112,13 @@ const en = {
34
112
  "webatlas.settings.page.defaultParentRoute.entity.placeholder": "Select an entity",
35
113
  "webatlas.settings.page.navigation.subtitle": "Configure navigation settings",
36
114
  "webatlas.settings.page.navigation.navigation": "Navigation",
37
- "webatlas.settings.page.navigation.maxNavDepth.label": "Max depth of navigation tree",
115
+ "webatlas.settings.page.navigation.maxDepth.title": "Maximum depth",
116
+ "webatlas.settings.page.navigation.maxDepth.description": "Sets how many levels a navigation may have. It cannot be lower than the deepest existing level.",
117
+ "webatlas.settings.page.navigation.maxDepth.levels": "Maximum levels",
118
+ "webatlas.settings.page.navigation.maxDepth.deepest": "Current deepest level",
119
+ "webatlas.settings.page.navigation.maxDepth.invalid": "At least 1",
120
+ "webatlas.settings.page.navigation.maxDepth.tooLow": "At least {count}, the navigation already has items on level {count}",
121
+ "webatlas.settings.page.navigation.maxDepth.empty": "There are no navigations yet.",
38
122
  "webatlas.modal.navOverview.confirmText": "New navigation",
39
123
  "webatlas.modal.navOverview.closeText": "Cancel",
40
124
  "webatlas.modal.navOverview.titleText": "Navigation overview",
@@ -49,9 +133,12 @@ const en = {
49
133
  "webatlas.modal.delete.cancelText": "No, keep",
50
134
  "webatlas.modal.delete.confirmText": "Yes, delete",
51
135
  "webatlas.modal.delete.message.start": "You are about to delete the following",
52
- "webatlas.modal.delete.message.navItem": "navigation item",
53
136
  "webatlas.modal.delete.message.navigation": "navigation",
54
137
  "webatlas.modal.delete.message.end": "This can not be undone. Are you sure?",
138
+ "webatlas.modal.saveConfirm.title": "Save changes?",
139
+ "webatlas.modal.saveConfirm.deletedItems": "{count, plural, one {# item is} other {# items are}} deleted when saving:",
140
+ "webatlas.modal.saveConfirm.orphanedChildren": "Children of deleted items are kept and move up one level.",
141
+ "webatlas.modal.saveConfirm.confirm": "Save and delete",
55
142
  "webatlas.modal.nameField.label": "Name",
56
143
  "webatlas.modal.activeField.label": "Active",
57
144
  "webatlas.modal.activeField.onLabel": "Yes",
@@ -83,6 +170,26 @@ const en = {
83
170
  "webatlas.modal.item.canonicalPathMismatch": "Warning: Canonical Path does not match navigation path",
84
171
  "webatlas.modal.item.routeAlreadyUsed": 'Warning: This path is already used in the navigation "{navigationName}"',
85
172
  "webatlas.modal.item.routeAlreadyUsed.info": "Changing the path for this item will also update the path in the existing item.",
173
+ "webatlas.modal.entrySelection.search": "Search entries",
174
+ "webatlas.modal.entrySelection.error": "The entries could not be loaded.",
175
+ "webatlas.modal.entrySelection.empty": "No entries found",
176
+ "webatlas.modal.entrySelection.loadMore": "Load more",
177
+ "webatlas.modal.entrySelection.selectedCount": "{count} selected",
178
+ "webatlas.modal.entrySelection.clear": "Clear selection",
179
+ "webatlas.modal.entrySelection.usedHere": "Already in this navigation",
180
+ "webatlas.modal.entrySelection.usedIn": 'In "{navigationName}"',
181
+ "webatlas.modal.entrySelection.next": "Next ({count})",
182
+ "webatlas.modal.entrySelection.noRoute": "No route",
183
+ "webatlas.modal.multiItem.status": "Status",
184
+ "webatlas.modal.multiItem.status.ok": "OK",
185
+ "webatlas.modal.multiItem.status.replaced": "Path was taken, replaced",
186
+ "webatlas.modal.multiItem.status.blacklisted": "Path is blocked",
187
+ "webatlas.modal.multiItem.status.duplicate": "Path is selected twice",
188
+ "webatlas.modal.multiItem.status.noRoute": "Entry has no route",
189
+ "webatlas.modal.multiItem.status.error": "Check failed",
190
+ "webatlas.modal.multiItem.remove": "Remove from selection",
191
+ "webatlas.modal.multiItem.confirm": "Add {count, plural, one {# item} other {# items}}",
192
+ "webatlas.modal.discardChanges.message": "All unsaved changes of this navigation will be discarded. This can not be undone.",
86
193
  "webatlas.components.pathInfo.checking": "Checking if path is available...",
87
194
  "webatlas.components.pathInfo.available": "Path is available",
88
195
  "webatlas.components.pathInfo.notAvailable": "Path is not available. Replaced with",
@@ -111,6 +218,7 @@ const en = {
111
218
  "webatlas.delete": "Delete",
112
219
  "webatlas.edit": "Edit",
113
220
  "webatlas.add": "Add",
221
+ "webatlas.back": "Back",
114
222
  "webatlas.cancel": "Cancel",
115
223
  "webatlas.save": "Save",
116
224
  "webatlas.select": "Select",
@@ -119,7 +227,6 @@ const en = {
119
227
  "webatlas.draft": "Draft",
120
228
  "webatlas.modified": "Modified",
121
229
  "webatlas.deleted": "Deleted",
122
- "webatlas.restore.metadata": "Restore Metadata",
123
230
  "webatlas.loading": "Loading...",
124
231
  "webatlas.version": "Version",
125
232
  "webatlas.contentType": "Content Type",
@@ -128,6 +235,9 @@ const en = {
128
235
  "webatlas.notification.settings.saved": "Settings saved successfully",
129
236
  "webatlas.notification.settings.fetchFailed": "Failed to load content types",
130
237
  "webatlas.notification.paths.fetchFailed": "Failed to fetch paths",
238
+ "webatlas.notification.paths.healthFailed": "The paths could not be checked",
239
+ "webatlas.notification.paths.pathCopied": "Path copied",
240
+ "webatlas.notification.paths.pathCopyFailed": "Path could not be copied",
131
241
  "webatlas.notification.navigation.saveNavigationFailed": "Error updating navigation item",
132
242
  "webatlas.notification.navigation.navigationSaved": "Navigation updated successfully",
133
243
  "webatlas.notification.navigation.fetchFailed": "Failed to fetch navigations",
@@ -9,12 +9,90 @@ const en = {
9
9
  "webatlas.navigation.page.newItemButton": "New Item",
10
10
  "webatlas.navigation.page.selectNavigation": "Select Navigation",
11
11
  "webatlas.navigation.page.navItem.addChildren": "Add children",
12
- "webatlas.navigation.page.navItem.viewEntity": "View entity",
12
+ "webatlas.navigation.page.navItem.viewEntity": "Open entry",
13
+ "webatlas.navigation.page.search.placeholder": "Search by title or path",
14
+ "webatlas.navigation.page.search.clear": "Clear search",
15
+ "webatlas.navigation.page.search.noResults": "No items found",
16
+ "webatlas.navigation.page.search.dragDisabled": "Drag and drop is disabled while searching.",
17
+ "webatlas.navigation.page.collapseAll": "Collapse all",
18
+ "webatlas.navigation.page.expandAll": "Expand all",
19
+ "webatlas.navigation.page.navItem.collapse": "Collapse",
20
+ "webatlas.navigation.page.navItem.expand": "Expand",
21
+ "webatlas.navigation.page.navItem.movedChildren": "+{count} {count, plural, one {child} other {children}}",
22
+ "webatlas.navigation.page.navItem.insertBelow": "Add item below",
23
+ "webatlas.navigation.page.discardChanges": "Discard changes",
24
+ "webatlas.navigation.page.emptyItems": "Your navigation is empty...",
25
+ "webatlas.navigation.page.itemCount": "{count, plural, one {# item} other {# items}}",
26
+ "webatlas.navigation.page.navItem.actions": "Item actions",
27
+ "webatlas.navigation.page.navItem.undoDelete": "Undo delete",
28
+ "webatlas.navigation.page.navItem.resetEdits": "Reset edits",
29
+ "webatlas.navigation.page.navItem.draftHint": "Only shown in the frontend once the page is published.",
30
+ "webatlas.navigation.page.navItem.modifiedHint": "The latest changes of the page are not published yet.",
13
31
  "webatlas.paths.page.title": "Paths",
14
32
  "webatlas.paths.page.subtitle": "Overview of all existing paths",
33
+ "webatlas.paths.page.total": "{count, plural, one {# path} other {# paths}} total",
34
+ "webatlas.paths.page.matches": "{count, plural, one {# match} other {# matches}}",
15
35
  "webatlas.paths.page.emptyPaths": "No paths found",
36
+ "webatlas.paths.page.emptyFiltered": "No paths match the current search or filters",
37
+ "webatlas.paths.page.clearSearch": "Clear search",
38
+ "webatlas.paths.page.action.openLink": "Open link",
39
+ "webatlas.paths.page.action.copyPath": "Copy path",
40
+ "webatlas.paths.page.action.showInNavigation": "Show in navigation",
41
+ "webatlas.paths.page.actions": "Path actions",
42
+ "webatlas.paths.page.action.showInNamedNavigation": 'Show in navigation "{name}"',
16
43
  "webatlas.paths.page.column.type": "Type",
44
+ "webatlas.paths.page.column.contentType": "Content Type",
45
+ "webatlas.paths.page.canonicalPathHint": "Canonical Path: {path}",
46
+ "webatlas.paths.page.deviation": "Differs",
47
+ "webatlas.paths.page.deviation.description": "The path differs from the content structure, due to the position in the navigation or a manual override",
17
48
  "webatlas.paths.page.searchPlaceholder": "Search paths",
49
+ "webatlas.paths.page.filter.contentType": "Content Type",
50
+ "webatlas.paths.page.filter.type": "Type",
51
+ "webatlas.paths.page.filter.deviation.true": "Differs",
52
+ "webatlas.paths.page.filter.deviation.false": "Matches",
53
+ "webatlas.paths.page.filter.deviation.placeholder": "Deviation",
54
+ "webatlas.paths.page.filter.navigation.true": "In navigation",
55
+ "webatlas.paths.page.filter.navigation.false": "Not in navigation",
56
+ "webatlas.paths.page.filter.navigation.placeholder": "Navigation",
57
+ "webatlas.paths.page.filter.clear": "Clear filter",
58
+ "webatlas.paths.page.filter.reset": "Reset filters",
59
+ "webatlas.paths.page.health.check.pathConflict": "Path conflict",
60
+ "webatlas.paths.page.health.check.pathConflict.description": "Several entries use the same path. The frontend then delivers any one of them.",
61
+ "webatlas.paths.page.health.check.orphanedRoute": "Orphaned",
62
+ "webatlas.paths.page.health.check.orphanedRoute.description": "The linked entry or content type no longer exists or is disabled in the plugin settings.",
63
+ "webatlas.paths.page.health.check.blacklistedPath": "Blocked path",
64
+ "webatlas.paths.page.health.check.blacklistedPath.description": "The path is blocked by the route blacklist. It only applies to new paths, existing ones stay reachable.",
65
+ "webatlas.paths.page.health.check.invalidExternalUrl": "Invalid URL",
66
+ "webatlas.paths.page.health.check.invalidExternalUrl.description": "The external link is no valid URL (http, https, mailto or tel).",
67
+ "webatlas.paths.page.health.check.unpublishedInNavigation": "Unpublished",
68
+ "webatlas.paths.page.health.check.unpublishedInNavigation.description": "The entry is not published, so it is missing in the navigation of the frontend.",
69
+ "webatlas.paths.page.health.check.tooDeepItem": "Too deep",
70
+ "webatlas.paths.page.health.check.tooDeepItem.description": "The navigation item is deeper than the maximum depth of its navigation allows.",
71
+ "webatlas.paths.page.health.check.notInNavigation": "Not in navigation",
72
+ "webatlas.paths.page.health.check.notInNavigation.description": "The page is not linked in any navigation.",
73
+ "webatlas.paths.page.health.check.emptyWrapper": "Empty wrapper",
74
+ "webatlas.paths.page.health.check.emptyWrapper.description": "The wrapper has no children and shows as an empty item in the navigation.",
75
+ "webatlas.paths.page.health.issue.pathConflict": '"{value}" is also used by: {routes}',
76
+ "webatlas.paths.page.health.issue.orphanedRoute.missingContentType": "The content type no longer exists",
77
+ "webatlas.paths.page.health.issue.orphanedRoute.disabledContentType": "The content type is not enabled in the plugin settings",
78
+ "webatlas.paths.page.health.issue.orphanedRoute.missingDocument": "The linked entry no longer exists",
79
+ "webatlas.paths.page.health.issue.blacklistedPath": '"{value}" is blocked by the route blacklist',
80
+ "webatlas.paths.page.health.issue.invalidExternalUrl": '"{value}" is no valid URL',
81
+ "webatlas.paths.page.health.issue.unpublishedInNavigation": 'Not published, but used in the navigation "{navigation}"',
82
+ "webatlas.paths.page.health.issue.tooDeepItem": 'On level {depth} in "{navigation}", {maxDepth, plural, one {# level is} other {# levels are}} allowed',
83
+ "webatlas.paths.page.health.issue.emptyWrapper": 'Without children in the navigation "{navigation}"',
84
+ "webatlas.paths.page.health.summary.error": "{count, plural, one {# error} other {# errors}}",
85
+ "webatlas.paths.page.health.summary.warning": "{count, plural, one {# warning} other {# warnings}}",
86
+ "webatlas.paths.page.health.summary.info": "{count, plural, one {# hint} other {# hints}}",
87
+ "webatlas.paths.page.health.loading": "Checking paths …",
88
+ "webatlas.paths.page.health.unavailable": "The paths could not be checked",
89
+ "webatlas.paths.page.health.noIssues": "No issues found",
90
+ "webatlas.paths.page.health.showDetails": "Show details",
91
+ "webatlas.paths.page.health.hideDetails": "Hide details",
92
+ "webatlas.paths.page.health.recheck": "Check again",
93
+ "webatlas.paths.page.health.affected": "{count, plural, one {# path} other {# paths}}",
94
+ "webatlas.paths.page.health.showPaths": "Show paths",
95
+ "webatlas.paths.page.health.hidePaths": "Show all paths",
18
96
  "webatlas.settings.page.general.subtitle": "Configure general settings",
19
97
  "webatlas.settings.page.general.webatlasVersion": "Webatlas Version",
20
98
  "webatlas.settings.page.general.contentTypes": "Content Types",
@@ -36,7 +114,13 @@ const en = {
36
114
  "webatlas.settings.page.defaultParentRoute.entity.placeholder": "Select an entity",
37
115
  "webatlas.settings.page.navigation.subtitle": "Configure navigation settings",
38
116
  "webatlas.settings.page.navigation.navigation": "Navigation",
39
- "webatlas.settings.page.navigation.maxNavDepth.label": "Max depth of navigation tree",
117
+ "webatlas.settings.page.navigation.maxDepth.title": "Maximum depth",
118
+ "webatlas.settings.page.navigation.maxDepth.description": "Sets how many levels a navigation may have. It cannot be lower than the deepest existing level.",
119
+ "webatlas.settings.page.navigation.maxDepth.levels": "Maximum levels",
120
+ "webatlas.settings.page.navigation.maxDepth.deepest": "Current deepest level",
121
+ "webatlas.settings.page.navigation.maxDepth.invalid": "At least 1",
122
+ "webatlas.settings.page.navigation.maxDepth.tooLow": "At least {count}, the navigation already has items on level {count}",
123
+ "webatlas.settings.page.navigation.maxDepth.empty": "There are no navigations yet.",
40
124
  "webatlas.modal.navOverview.confirmText": "New navigation",
41
125
  "webatlas.modal.navOverview.closeText": "Cancel",
42
126
  "webatlas.modal.navOverview.titleText": "Navigation overview",
@@ -51,9 +135,12 @@ const en = {
51
135
  "webatlas.modal.delete.cancelText": "No, keep",
52
136
  "webatlas.modal.delete.confirmText": "Yes, delete",
53
137
  "webatlas.modal.delete.message.start": "You are about to delete the following",
54
- "webatlas.modal.delete.message.navItem": "navigation item",
55
138
  "webatlas.modal.delete.message.navigation": "navigation",
56
139
  "webatlas.modal.delete.message.end": "This can not be undone. Are you sure?",
140
+ "webatlas.modal.saveConfirm.title": "Save changes?",
141
+ "webatlas.modal.saveConfirm.deletedItems": "{count, plural, one {# item is} other {# items are}} deleted when saving:",
142
+ "webatlas.modal.saveConfirm.orphanedChildren": "Children of deleted items are kept and move up one level.",
143
+ "webatlas.modal.saveConfirm.confirm": "Save and delete",
57
144
  "webatlas.modal.nameField.label": "Name",
58
145
  "webatlas.modal.activeField.label": "Active",
59
146
  "webatlas.modal.activeField.onLabel": "Yes",
@@ -85,6 +172,26 @@ const en = {
85
172
  "webatlas.modal.item.canonicalPathMismatch": "Warning: Canonical Path does not match navigation path",
86
173
  "webatlas.modal.item.routeAlreadyUsed": 'Warning: This path is already used in the navigation "{navigationName}"',
87
174
  "webatlas.modal.item.routeAlreadyUsed.info": "Changing the path for this item will also update the path in the existing item.",
175
+ "webatlas.modal.entrySelection.search": "Search entries",
176
+ "webatlas.modal.entrySelection.error": "The entries could not be loaded.",
177
+ "webatlas.modal.entrySelection.empty": "No entries found",
178
+ "webatlas.modal.entrySelection.loadMore": "Load more",
179
+ "webatlas.modal.entrySelection.selectedCount": "{count} selected",
180
+ "webatlas.modal.entrySelection.clear": "Clear selection",
181
+ "webatlas.modal.entrySelection.usedHere": "Already in this navigation",
182
+ "webatlas.modal.entrySelection.usedIn": 'In "{navigationName}"',
183
+ "webatlas.modal.entrySelection.next": "Next ({count})",
184
+ "webatlas.modal.entrySelection.noRoute": "No route",
185
+ "webatlas.modal.multiItem.status": "Status",
186
+ "webatlas.modal.multiItem.status.ok": "OK",
187
+ "webatlas.modal.multiItem.status.replaced": "Path was taken, replaced",
188
+ "webatlas.modal.multiItem.status.blacklisted": "Path is blocked",
189
+ "webatlas.modal.multiItem.status.duplicate": "Path is selected twice",
190
+ "webatlas.modal.multiItem.status.noRoute": "Entry has no route",
191
+ "webatlas.modal.multiItem.status.error": "Check failed",
192
+ "webatlas.modal.multiItem.remove": "Remove from selection",
193
+ "webatlas.modal.multiItem.confirm": "Add {count, plural, one {# item} other {# items}}",
194
+ "webatlas.modal.discardChanges.message": "All unsaved changes of this navigation will be discarded. This can not be undone.",
88
195
  "webatlas.components.pathInfo.checking": "Checking if path is available...",
89
196
  "webatlas.components.pathInfo.available": "Path is available",
90
197
  "webatlas.components.pathInfo.notAvailable": "Path is not available. Replaced with",
@@ -113,6 +220,7 @@ const en = {
113
220
  "webatlas.delete": "Delete",
114
221
  "webatlas.edit": "Edit",
115
222
  "webatlas.add": "Add",
223
+ "webatlas.back": "Back",
116
224
  "webatlas.cancel": "Cancel",
117
225
  "webatlas.save": "Save",
118
226
  "webatlas.select": "Select",
@@ -121,7 +229,6 @@ const en = {
121
229
  "webatlas.draft": "Draft",
122
230
  "webatlas.modified": "Modified",
123
231
  "webatlas.deleted": "Deleted",
124
- "webatlas.restore.metadata": "Restore Metadata",
125
232
  "webatlas.loading": "Loading...",
126
233
  "webatlas.version": "Version",
127
234
  "webatlas.contentType": "Content Type",
@@ -130,6 +237,9 @@ const en = {
130
237
  "webatlas.notification.settings.saved": "Settings saved successfully",
131
238
  "webatlas.notification.settings.fetchFailed": "Failed to load content types",
132
239
  "webatlas.notification.paths.fetchFailed": "Failed to fetch paths",
240
+ "webatlas.notification.paths.healthFailed": "The paths could not be checked",
241
+ "webatlas.notification.paths.pathCopied": "Path copied",
242
+ "webatlas.notification.paths.pathCopyFailed": "Path could not be copied",
133
243
  "webatlas.notification.navigation.saveNavigationFailed": "Error updating navigation item",
134
244
  "webatlas.notification.navigation.navigationSaved": "Navigation updated successfully",
135
245
  "webatlas.notification.navigation.fetchFailed": "Failed to fetch navigations",
@@ -0,0 +1,174 @@
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-DmOWQK6g.js");
8
+ const FullLoader = require("./FullLoader-C4hXFaLP.js");
9
+ const reactIntl = require("react-intl");
10
+ require("@strapi/icons/symbols");
11
+ require("@strapi/icons");
12
+ const ContentBox = require("./ContentBox-CHwpYMiB.js");
13
+ const toLevels = (maxDepth) => String(maxDepth + 1);
14
+ const Settings = () => {
15
+ const { getNavigationDepths, updateNavigationDepths } = index.useApi();
16
+ const { toggleNotification } = admin.useNotification();
17
+ const getErrorMessage = FullLoader.useErrorMessage();
18
+ const { formatMessage } = reactIntl.useIntl();
19
+ const [depths, setDepths] = React.useState([]);
20
+ const [levels, setLevels] = React.useState({});
21
+ const [loading, setLoading] = React.useState(true);
22
+ const [isSaving, setIsSaving] = React.useState(false);
23
+ const {
24
+ isLoading: isLoadingPermissions,
25
+ allowedActions: { canUpdate }
26
+ } = admin.useRBAC(index.pluginPermissions["settings.navigation.update"]);
27
+ const applyDepths = (nextDepths) => {
28
+ setDepths(nextDepths);
29
+ setLevels(
30
+ Object.fromEntries(nextDepths.map((depth) => [depth.documentId, toLevels(depth.maxDepth)]))
31
+ );
32
+ };
33
+ const showError = (error) => toggleNotification({
34
+ type: "danger",
35
+ message: getErrorMessage(
36
+ error,
37
+ formatMessage({
38
+ id: index.getTranslation("notification.error"),
39
+ defaultMessage: "An error occurred"
40
+ })
41
+ )
42
+ });
43
+ React.useEffect(() => {
44
+ getNavigationDepths().then(applyDepths).catch((error) => {
45
+ if (index.isAbortError(error)) return;
46
+ console.error(error);
47
+ showError(error);
48
+ }).finally(() => setLoading(false));
49
+ }, []);
50
+ const errors = React.useMemo(() => {
51
+ const result = {};
52
+ depths.forEach(({ documentId, deepestDepth }) => {
53
+ const value = Number(levels[documentId]);
54
+ const minLevels = Math.max(1, deepestDepth + 1);
55
+ if (!Number.isInteger(value) || value < 1) {
56
+ result[documentId] = formatMessage({
57
+ id: index.getTranslation("settings.page.navigation.maxDepth.invalid"),
58
+ defaultMessage: "At least 1"
59
+ });
60
+ } else if (value < minLevels) {
61
+ result[documentId] = formatMessage(
62
+ {
63
+ id: index.getTranslation("settings.page.navigation.maxDepth.tooLow"),
64
+ defaultMessage: "At least {count}, the navigation already has items on level {count}"
65
+ },
66
+ { count: minLevels }
67
+ );
68
+ }
69
+ });
70
+ return result;
71
+ }, [depths, levels, formatMessage]);
72
+ const changedDepths = depths.filter(({ documentId, maxDepth }) => levels[documentId] !== toLevels(maxDepth)).map(({ documentId }) => ({ documentId, maxDepth: Number(levels[documentId]) - 1 }));
73
+ async function save() {
74
+ setIsSaving(true);
75
+ try {
76
+ applyDepths(await updateNavigationDepths(changedDepths));
77
+ toggleNotification({
78
+ type: "success",
79
+ message: formatMessage({
80
+ id: index.getTranslation("notification.settings.saved"),
81
+ defaultMessage: "Settings saved successfully"
82
+ })
83
+ });
84
+ } catch (error) {
85
+ console.error(error);
86
+ showError(error);
87
+ } finally {
88
+ setIsSaving(false);
89
+ }
90
+ }
91
+ if (loading || isLoadingPermissions) {
92
+ return /* @__PURE__ */ jsxRuntime.jsx(
93
+ ContentBox.PageWrapper,
94
+ {
95
+ isSaving,
96
+ subtitle: formatMessage({
97
+ id: index.getTranslation("loading"),
98
+ defaultMessage: "Loading..."
99
+ }),
100
+ disabledCondition: true,
101
+ children: /* @__PURE__ */ jsxRuntime.jsx(FullLoader.FullLoader, { height: 200 })
102
+ }
103
+ );
104
+ }
105
+ return /* @__PURE__ */ jsxRuntime.jsx(admin.Page.Protect, { permissions: index.pluginPermissions["settings.navigation.read"], children: /* @__PURE__ */ jsxRuntime.jsx(
106
+ ContentBox.PageWrapper,
107
+ {
108
+ save: canUpdate ? save : void 0,
109
+ isSaving,
110
+ subtitle: formatMessage({
111
+ id: index.getTranslation("settings.page.navigation.subtitle"),
112
+ defaultMessage: "Configure navigation settings"
113
+ }),
114
+ disabledCondition: changedDepths.length === 0 || Object.keys(errors).length > 0,
115
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
116
+ ContentBox.ContentBox,
117
+ {
118
+ title: formatMessage({
119
+ id: index.getTranslation("settings.page.navigation.maxDepth.title"),
120
+ defaultMessage: "Maximum depth"
121
+ }),
122
+ children: [
123
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", tag: "p", children: formatMessage({
124
+ id: index.getTranslation("settings.page.navigation.maxDepth.description"),
125
+ defaultMessage: "Sets how many levels a navigation may have. It cannot be lower than the deepest existing level."
126
+ }) }),
127
+ depths.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", tag: "p", children: formatMessage({
128
+ id: index.getTranslation("settings.page.navigation.maxDepth.empty"),
129
+ defaultMessage: "There are no navigations yet."
130
+ }) }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.RawTable, { colCount: 3, rowCount: depths.length + 1, style: { width: "100%" }, children: [
131
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
132
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
133
+ id: index.getTranslation("settings.page.navigation.navigation"),
134
+ defaultMessage: "Navigation"
135
+ }) }) }),
136
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
137
+ id: index.getTranslation("settings.page.navigation.maxDepth.levels"),
138
+ defaultMessage: "Maximum levels"
139
+ }) }) }),
140
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
141
+ id: index.getTranslation("settings.page.navigation.maxDepth.deepest"),
142
+ defaultMessage: "Current deepest level"
143
+ }) }) })
144
+ ] }) }),
145
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tbody, { children: depths.map(({ documentId, name, deepestDepth }) => /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
146
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: name }) }),
147
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { error: errors[documentId], children: [
148
+ /* @__PURE__ */ jsxRuntime.jsx(
149
+ designSystem.Field.Input,
150
+ {
151
+ type: "number",
152
+ min: 1,
153
+ step: 1,
154
+ "aria-label": formatMessage({
155
+ id: index.getTranslation("settings.page.navigation.maxDepth.levels"),
156
+ defaultMessage: "Maximum levels"
157
+ }),
158
+ value: levels[documentId] ?? "",
159
+ disabled: !canUpdate,
160
+ onChange: (e) => setLevels((current) => ({ ...current, [documentId]: e.target.value }))
161
+ }
162
+ ),
163
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
164
+ ] }) }),
165
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", children: deepestDepth < 0 ? "–" : deepestDepth + 1 }) })
166
+ ] }, documentId)) })
167
+ ] })
168
+ ]
169
+ }
170
+ )
171
+ }
172
+ ) });
173
+ };
174
+ exports.default = Settings;