@mattisvensson/strapi-plugin-webatlas 0.13.0 → 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 (184) hide show
  1. package/dist/admin/{ContentBox-D4PGQ8eh.js → ContentBox-CHwpYMiB.js} +1 -1
  2. package/dist/admin/{ContentBox-KyQN2KGV.mjs → ContentBox-CYnyB_5a.mjs} +1 -1
  3. package/dist/admin/{RoutePicker-CgndSXoF.mjs → RoutePicker-43YnYCpH.mjs} +1 -1
  4. package/dist/admin/{RoutePicker-CwoMMhf_.js → RoutePicker-D9zf-VdN.js} +1 -1
  5. package/dist/admin/{de-Cl0vM1wA.js → de-DolV3m7M.js} +64 -1
  6. package/dist/admin/{de-DWs5ckOd.mjs → de-Dt3jjL3h.mjs} +64 -1
  7. package/dist/admin/{en-CyhISGZi.mjs → en-CCRmKJEV.mjs} +63 -0
  8. package/dist/admin/{en-DSmtmPYk.js → en-jWdO5RMZ.js} +63 -0
  9. package/dist/admin/{index-uOC1Clyv.js → index-7iO5UsYI.js} +2 -2
  10. package/dist/admin/{index-Bv5Ri-ri.mjs → index-B2k8Pikg.mjs} +2 -2
  11. package/dist/admin/{index-Ctm4TBT5.mjs → index-CK4JyItR.mjs} +63 -8
  12. package/dist/admin/{index-BKhrfzjO.mjs → index-CMuhLgfi.mjs} +16 -11
  13. package/dist/admin/{index-BxGPKxr_.js → index-Ciem6YTr.js} +2 -2
  14. package/dist/admin/{index-FvaXwOH0.mjs → index-DGYmrx3f.mjs} +2 -2
  15. package/dist/admin/index-Ddnt9W-v.mjs +1025 -0
  16. package/dist/admin/{index-JBUU7dE6.js → index-DfG_hSMk.js} +60 -5
  17. package/dist/admin/{index-DTrsl_uN.js → index-DmOWQK6g.js} +12 -7
  18. package/dist/admin/index-dB79zyxi.js +1025 -0
  19. package/dist/admin/index.js +1 -1
  20. package/dist/admin/index.mjs +1 -1
  21. package/dist/admin/src/components/CMEditViewAside/NewPathInfo.d.ts +5 -0
  22. package/dist/admin/src/components/CMEditViewAside/OverrideCheckbox.d.ts +7 -0
  23. package/dist/admin/src/components/CMEditViewAside/Panel.d.ts +5 -0
  24. package/dist/admin/src/components/CMEditViewAside/PathInput.d.ts +12 -0
  25. package/dist/admin/src/components/CMEditViewAside/RouteStructure.d.ts +3 -0
  26. package/dist/admin/src/components/CMEditViewAside/UidPathDisplay.d.ts +4 -0
  27. package/dist/admin/src/components/CMEditViewAside/index.d.ts +3 -0
  28. package/dist/admin/src/components/Initializer.d.ts +5 -0
  29. package/dist/admin/src/components/PathInfo.d.ts +8 -0
  30. package/dist/admin/src/components/PluginIcon.d.ts +3 -0
  31. package/dist/admin/src/components/Tooltip.d.ts +3 -0
  32. package/dist/admin/src/components/UI/Center.d.ts +4 -0
  33. package/dist/admin/src/components/UI/EmptyBox.d.ts +5 -0
  34. package/dist/admin/src/components/UI/FullLoader.d.ts +3 -0
  35. package/dist/admin/src/components/UI/WarningBox.d.ts +4 -0
  36. package/dist/admin/src/components/UI/index.d.ts +5 -0
  37. package/dist/admin/src/components/customFields/RoutePicker.d.ts +25 -0
  38. package/dist/admin/src/components/modals/Delete.d.ts +7 -0
  39. package/dist/admin/src/components/modals/DiscardChanges.d.ts +3 -0
  40. package/dist/admin/src/components/modals/NavCreate.d.ts +1 -0
  41. package/dist/admin/src/components/modals/NavEdit.d.ts +7 -0
  42. package/dist/admin/src/components/modals/NavModal.d.ts +16 -0
  43. package/dist/admin/src/components/modals/NavOverview.d.ts +10 -0
  44. package/dist/admin/src/components/modals/SaveConfirm.d.ts +8 -0
  45. package/dist/admin/src/components/modals/externalItem/index.d.ts +15 -0
  46. package/dist/admin/src/components/modals/index.d.ts +14 -0
  47. package/dist/admin/src/components/modals/internalItem/EntrySelection.d.ts +17 -0
  48. package/dist/admin/src/components/modals/internalItem/ItemDetails.d.ts +13 -0
  49. package/dist/admin/src/components/modals/internalItem/MultiItemReview.d.ts +23 -0
  50. package/dist/admin/src/components/modals/internalItem/internalItemCreate.d.ts +2 -0
  51. package/dist/admin/src/components/modals/internalItem/internalItemEdit.d.ts +2 -0
  52. package/dist/admin/src/components/modals/useModalSharedLogic.d.ts +2 -0
  53. package/dist/admin/src/components/modals/withModalSharedLogic.d.ts +3 -0
  54. package/dist/admin/src/components/modals/wrapperItem/index.d.ts +15 -0
  55. package/dist/admin/src/contexts/index.d.ts +17 -0
  56. package/dist/admin/src/hooks/index.d.ts +7 -0
  57. package/dist/admin/src/hooks/useAllContentTypes.d.ts +7 -0
  58. package/dist/admin/src/hooks/useAllEntities.d.ts +7 -0
  59. package/dist/admin/src/hooks/useApi.d.ts +23 -0
  60. package/dist/admin/src/hooks/useEntrySearch.d.ts +13 -0
  61. package/dist/admin/src/hooks/useErrorMessage.d.ts +8 -0
  62. package/dist/admin/src/hooks/usePluginConfig.d.ts +9 -0
  63. package/dist/admin/src/pages/Navigation/Page.d.ts +2 -0
  64. package/dist/admin/src/pages/Navigation/PageWrapper.d.ts +8 -0
  65. package/dist/admin/src/pages/Navigation/RouteItem.d.ts +2 -0
  66. package/dist/admin/src/pages/Navigation/RouteItemBadge.d.ts +4 -0
  67. package/dist/admin/src/pages/Navigation/RouteItemIcon.d.ts +5 -0
  68. package/dist/admin/src/pages/Navigation/RouteItemMenu.d.ts +12 -0
  69. package/dist/admin/src/pages/Navigation/RouteItemStatus.d.ts +5 -0
  70. package/dist/admin/src/pages/Navigation/SortableRouteItem.d.ts +2 -0
  71. package/dist/admin/src/pages/Navigation/UnsavedChangesBlocker.d.ts +8 -0
  72. package/dist/admin/src/pages/Navigation/index.d.ts +2 -0
  73. package/dist/admin/src/pages/Navigation/useCollapsedItems.d.ts +13 -0
  74. package/dist/admin/src/pages/Paths/HealthSummary.d.ts +8 -0
  75. package/dist/admin/src/pages/Paths/IssueBadges.d.ts +4 -0
  76. package/dist/admin/src/pages/Paths/PageWrapper.d.ts +5 -0
  77. package/dist/admin/src/pages/Paths/PathActionsMenu.d.ts +7 -0
  78. package/dist/admin/src/pages/Paths/PathFilters.d.ts +14 -0
  79. package/dist/admin/src/pages/Paths/PathTable.d.ts +18 -0
  80. package/dist/admin/src/pages/Paths/SearchInput.d.ts +5 -0
  81. package/dist/admin/src/pages/Paths/TableHeader.d.ts +6 -0
  82. package/dist/admin/src/pages/Paths/TableRow.d.ts +9 -0
  83. package/dist/admin/src/pages/Paths/compareBy.d.ts +3 -0
  84. package/dist/admin/src/pages/Paths/hasPathDeviation.d.ts +2 -0
  85. package/dist/admin/src/pages/Paths/healthMessages.d.ts +11 -0
  86. package/dist/admin/src/pages/Paths/index.d.ts +2 -0
  87. package/dist/admin/src/pages/Settings/ContentBox.d.ts +4 -0
  88. package/dist/admin/src/pages/Settings/General/ContentTypeAccordion.d.ts +9 -0
  89. package/dist/admin/src/pages/Settings/General/index.d.ts +2 -0
  90. package/dist/admin/src/pages/Settings/Navigation/index.d.ts +2 -0
  91. package/dist/admin/src/pages/Settings/PageWrapper.d.ts +7 -0
  92. package/dist/admin/src/pages/Settings/SettingTitle.d.ts +3 -0
  93. package/dist/admin/src/pages/Settings/index.d.ts +4 -0
  94. package/dist/admin/src/permissions.d.ts +51 -0
  95. package/dist/admin/src/types/index.d.ts +4 -0
  96. package/dist/admin/src/types/modal.d.ts +60 -0
  97. package/dist/admin/src/types/navigation.d.ts +24 -0
  98. package/dist/admin/src/types/panel.d.ts +50 -0
  99. package/dist/admin/src/types/route.d.ts +3 -0
  100. package/dist/admin/src/utils/buildBreadcrumbString.d.ts +16 -0
  101. package/dist/admin/src/utils/createTempNavItemObject.d.ts +22 -0
  102. package/dist/admin/src/utils/debounce.d.ts +1 -0
  103. package/dist/admin/src/utils/dnd.d.ts +13 -0
  104. package/dist/admin/src/utils/duplicateCheck.d.ts +19 -0
  105. package/dist/admin/src/utils/findParentNavItem.d.ts +13 -0
  106. package/dist/admin/src/utils/getRouteSourceFields.d.ts +2 -0
  107. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  108. package/dist/admin/src/utils/index.d.ts +11 -0
  109. package/dist/admin/src/utils/isAbortError.d.ts +5 -0
  110. package/dist/admin/src/utils/navTree.d.ts +39 -0
  111. package/dist/admin/src/utils/syncNavItemPaths.d.ts +12 -0
  112. package/dist/admin/src/utils/typeChecks.d.ts +3 -0
  113. package/dist/server/index.js +270 -2
  114. package/dist/server/index.mjs +270 -2
  115. package/dist/server/src/bootstrap/documentMiddleware.d.ts +18 -0
  116. package/dist/server/src/bootstrap/index.d.ts +5 -0
  117. package/dist/server/src/bootstrap/permissions.d.ts +2 -0
  118. package/dist/server/src/bootstrap/syncConfig.d.ts +3 -0
  119. package/dist/server/src/bootstrap/webatlasMiddleware.d.ts +2 -0
  120. package/dist/server/src/bootstrap.d.ts +5 -0
  121. package/dist/server/src/config/index.d.ts +8 -0
  122. package/dist/server/src/content-types/index.d.ts +208 -0
  123. package/dist/server/src/content-types/navigation/index.d.ts +56 -0
  124. package/dist/server/src/content-types/navigation/schema.d.ts +54 -0
  125. package/dist/server/src/content-types/navitem/index.d.ts +51 -0
  126. package/dist/server/src/content-types/navitem/schema.d.ts +49 -0
  127. package/dist/server/src/content-types/route/index.d.ts +101 -0
  128. package/dist/server/src/content-types/route/schema.d.ts +99 -0
  129. package/dist/server/src/controllers/admin.d.ts +19 -0
  130. package/dist/server/src/controllers/client.d.ts +8 -0
  131. package/dist/server/src/controllers/index.d.ts +27 -0
  132. package/dist/server/src/destroy.d.ts +5 -0
  133. package/dist/server/src/index.d.ts +15 -5
  134. package/dist/server/src/middlewares/addWebatlasField.d.ts +10 -0
  135. package/dist/server/src/middlewares/enrichRoutePicker.d.ts +10 -0
  136. package/dist/server/src/middlewares/index.d.ts +9 -0
  137. package/dist/server/src/migrations/001-canonical-path.d.ts +7 -0
  138. package/dist/server/src/migrations/002-webatlas-json-field.d.ts +7 -0
  139. package/dist/server/src/migrations/003-route-source-field.d.ts +7 -0
  140. package/dist/server/src/migrations/004-navigation-max-depth.d.ts +7 -0
  141. package/dist/server/src/migrations/index.d.ts +3 -0
  142. package/dist/server/src/policies/has-permissions.d.ts +2 -0
  143. package/dist/server/src/policies/index.d.ts +4 -0
  144. package/dist/server/src/register.d.ts +5 -0
  145. package/dist/server/src/routes/admin.d.ts +17 -0
  146. package/dist/server/src/routes/client.d.ts +12 -0
  147. package/dist/server/src/routes/index.d.ts +30 -0
  148. package/dist/server/src/services/admin.d.ts +33 -0
  149. package/dist/server/src/services/client.d.ts +48 -0
  150. package/dist/server/src/services/health.d.ts +5 -0
  151. package/dist/server/src/services/index.d.ts +83 -0
  152. package/dist/server/src/utils/addWebatlasBreadcrumb.d.ts +14 -0
  153. package/dist/server/src/utils/assertDescendantPathsAllowed.d.ts +19 -0
  154. package/dist/server/src/utils/assertPathAllowed.d.ts +2 -0
  155. package/dist/server/src/utils/buildCanonicalPath.d.ts +1 -0
  156. package/dist/server/src/utils/buildNavigationPath.d.ts +5 -0
  157. package/dist/server/src/utils/buildStructuredNavigation.d.ts +12 -0
  158. package/dist/server/src/utils/cascadePathUpdates.d.ts +6 -0
  159. package/dist/server/src/utils/cleanRootKeys.d.ts +1 -0
  160. package/dist/server/src/utils/duplicateCheck.d.ts +1 -0
  161. package/dist/server/src/utils/enrichRoutePickerFields.d.ts +7 -0
  162. package/dist/server/src/utils/enrichWebatlasData.d.ts +6 -0
  163. package/dist/server/src/utils/extractRouteAndItems.d.ts +32 -0
  164. package/dist/server/src/utils/getDocumentStatuses.d.ts +12 -0
  165. package/dist/server/src/utils/getNonInternalRouteIds.d.ts +1 -0
  166. package/dist/server/src/utils/getPublishedDocumentIds.d.ts +11 -0
  167. package/dist/server/src/utils/getRouteAncestors.d.ts +1 -0
  168. package/dist/server/src/utils/getRouteDescendants.d.ts +1 -0
  169. package/dist/server/src/utils/health/checks.d.ts +48 -0
  170. package/dist/server/src/utils/index.d.ts +29 -0
  171. package/dist/server/src/utils/isBlacklistedPath.d.ts +1 -0
  172. package/dist/server/src/utils/navItemHandler.d.ts +5 -0
  173. package/dist/server/src/utils/navigationItemStructure.d.ts +27 -0
  174. package/dist/server/src/utils/normalizeRouteBlacklist.d.ts +5 -0
  175. package/dist/server/src/utils/pluginHelpers.d.ts +4 -0
  176. package/dist/server/src/utils/populateDeep.d.ts +4 -0
  177. package/dist/server/src/utils/reduceDepthOfOrphanedItems.d.ts +2 -0
  178. package/dist/server/src/utils/removeUnpublishedNavItems.d.ts +7 -0
  179. package/dist/server/src/utils/removeWaFields.d.ts +1 -0
  180. package/dist/server/src/utils/routeHandler.d.ts +5 -0
  181. package/dist/server/src/utils/validateRouteDependencies.d.ts +4 -0
  182. package/package.json +5 -5
  183. package/dist/admin/index-D2O7sLKs.mjs +0 -249
  184. package/dist/admin/index-jOCO4_-k.js +0 -249
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-DTrsl_uN.js");
3
+ const index = require("./index-DmOWQK6g.js");
4
4
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { j } from "./index-BKhrfzjO.mjs";
1
+ import { j } from "./index-CMuhLgfi.mjs";
2
2
  export {
3
3
  j as default
4
4
  };
@@ -0,0 +1,5 @@
1
+ declare function NewPathInfo({ hasSlug, routeSourceField, }: {
2
+ hasSlug: boolean;
3
+ routeSourceField?: string | null;
4
+ }): import("react").JSX.Element;
5
+ export default NewPathInfo;
@@ -0,0 +1,7 @@
1
+ type OverrideCheckboxProps = {
2
+ isOverride: boolean;
3
+ setIsOverride: (value: boolean) => void;
4
+ disabledCondition?: boolean;
5
+ };
6
+ declare function OverrideCheckbox({ isOverride, setIsOverride, disabledCondition }: OverrideCheckboxProps): import("react").JSX.Element;
7
+ export default OverrideCheckbox;
@@ -0,0 +1,5 @@
1
+ import { ConfigContentType } from '../../../../types';
2
+ declare const Panel: ({ config }: {
3
+ config: ConfigContentType;
4
+ }) => import("react").JSX.Element;
5
+ export default Panel;
@@ -0,0 +1,12 @@
1
+ import { ConfigContentType } from '../../../../types';
2
+ import { PanelAction, PanelPathState } from '../../types';
3
+ type PathInputProps = {
4
+ path: PanelPathState;
5
+ dispatchPath: React.Dispatch<PanelAction>;
6
+ isOverride: boolean;
7
+ config: ConfigContentType;
8
+ hasUserInteracted: React.MutableRefObject<boolean>;
9
+ disabled?: boolean;
10
+ };
11
+ declare function PathInput({ path, dispatchPath, isOverride, config, hasUserInteracted, disabled, }: PathInputProps): import("react").JSX.Element;
12
+ export default PathInput;
@@ -0,0 +1,3 @@
1
+ import { RouteStructureProps } from '../../types';
2
+ declare function RouteStructure({ routes, selectedParent, setSelectedParent, canonicalPath, prohibitedRouteIds, defaultParentRoute, isCreatingEntry, disabled, }: RouteStructureProps): import("react").JSX.Element;
3
+ export default RouteStructure;
@@ -0,0 +1,4 @@
1
+ declare function UidPathDisplay({ path }: {
2
+ path: string;
3
+ }): import("react").JSX.Element;
4
+ export default UidPathDisplay;
@@ -0,0 +1,3 @@
1
+ import { PanelComponent } from '@strapi/content-manager/strapi-admin';
2
+ declare const CMEditViewAside: PanelComponent;
3
+ export default CMEditViewAside;
@@ -0,0 +1,5 @@
1
+ type InitializerProps = {
2
+ setPlugin: (id: string) => void;
3
+ };
4
+ declare const Initializer: ({ setPlugin }: InitializerProps) => null;
5
+ export { Initializer };
@@ -0,0 +1,8 @@
1
+ import { ValidationState } from '../types';
2
+ interface PathProps {
3
+ validationState: ValidationState;
4
+ replacement: string | null;
5
+ isBlacklisted?: boolean;
6
+ }
7
+ export default function PathInfo({ validationState, replacement, isBlacklisted }: PathProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ declare const PathIcon: () => import("react").JSX.Element;
2
+ declare const NavigationIcon: () => import("react").JSX.Element;
3
+ export { PathIcon, NavigationIcon };
@@ -0,0 +1,3 @@
1
+ export default function Tooltip({ description }: {
2
+ description: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default function Center({ height, children, }: {
2
+ height?: number;
3
+ children: React.ReactNode;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ type EmptyNavProps = {
2
+ msg: string;
3
+ };
4
+ export default function EmptyBox({ msg }: EmptyNavProps): import("react").JSX.Element;
5
+ export {};
@@ -0,0 +1,3 @@
1
+ export default function FullLoader({ height }: {
2
+ height?: number;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default function WarningBox({ title, description, }: {
2
+ title: string;
3
+ description?: string;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as Center } from './Center';
2
+ import { default as EmptyBox } from './EmptyBox';
3
+ import { default as FullLoader } from './FullLoader';
4
+ import { default as WarningBox } from './WarningBox';
5
+ export { Center, EmptyBox, FullLoader, WarningBox };
@@ -0,0 +1,25 @@
1
+ interface InputProps {
2
+ attribute: {
3
+ type: string;
4
+ };
5
+ disabled?: boolean;
6
+ placeholder?: string;
7
+ label: string;
8
+ intlLabel: {
9
+ id: string;
10
+ defaultMessage: string;
11
+ };
12
+ name: string;
13
+ onChange: (event: {
14
+ target: {
15
+ name: string;
16
+ type: string;
17
+ value: string;
18
+ };
19
+ }) => void;
20
+ required?: boolean;
21
+ value?: string;
22
+ hint?: string;
23
+ }
24
+ declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
25
+ export default Input;
@@ -0,0 +1,7 @@
1
+ import { NestedNavigation } from '../../../../types';
2
+ type DeleteProps = {
3
+ item: NestedNavigation;
4
+ onDelete: (editedItem: NestedNavigation) => void;
5
+ };
6
+ export default function Delete({ item, onDelete }: DeleteProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export default function DiscardChanges({ onConfirm }: {
2
+ onConfirm: () => void;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function NavCreate(): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { NestedNavigation } from '../../../../types';
2
+ type NavEditProps = {
3
+ item: NestedNavigation;
4
+ onEdit: (editedNavigation: NestedNavigation) => void;
5
+ };
6
+ export default function NavEdit({ item, onEdit }: NavEditProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ export default function NavModal({ triggerText, triggerVariant, confirmText, closeText, titleText, loadingText, children, onConfirm, loading, modalToOpen, footer, currentModalType, currentModalMode, disabled, }: {
2
+ triggerText?: string;
3
+ triggerVariant?: 'default' | 'secondary';
4
+ confirmText: string;
5
+ closeText: string;
6
+ titleText: string;
7
+ loadingText?: string;
8
+ children: React.ReactNode;
9
+ onConfirm?: () => void;
10
+ loading?: boolean;
11
+ modalToOpen?: string;
12
+ footer?: React.ReactNode;
13
+ currentModalType?: 'ItemCreate' | 'WrapperCreate' | 'ExternalCreate' | null;
14
+ currentModalMode?: 'create' | 'edit';
15
+ disabled?: boolean;
16
+ }): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { NestedNavItem, NestedNavigation } from '../../../../types';
2
+ type NavOverviewProps = {
3
+ navigations: NestedNavigation[];
4
+ setActionItem: React.Dispatch<React.SetStateAction<NestedNavItem | NestedNavigation | undefined>>;
5
+ canCreate: boolean;
6
+ canUpdate: boolean;
7
+ canDelete: boolean;
8
+ };
9
+ export default function NavOverview({ navigations, setActionItem, canCreate, canUpdate, canDelete, }: NavOverviewProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { NestedNavItem } from '../../../../types';
2
+ type SaveConfirmProps = {
3
+ deletedItems: NestedNavItem[];
4
+ hasOrphanedChildren: boolean;
5
+ onConfirm: () => void;
6
+ };
7
+ export default function SaveConfirm({ deletedItems, hasOrphanedChildren, onConfirm, }: SaveConfirmProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,15 @@
1
+ import { NestedNavItem } from '../../../../../types';
2
+ import { default as React } from 'react';
3
+ type externalCreateProps = {
4
+ variant: 'ExternalCreate';
5
+ actionItemParentId?: string;
6
+ onCreate: (newItem: NestedNavItem) => void;
7
+ };
8
+ type externalEditProps = {
9
+ variant: 'ExternalEdit';
10
+ item: NestedNavItem;
11
+ onSave: (editedItem: NestedNavItem) => void;
12
+ };
13
+ type externalItemProps = externalCreateProps | externalEditProps;
14
+ export declare const ExternalItem: React.FC<externalItemProps>;
15
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as Delete } from './Delete';
2
+ import { default as NavCreate } from './NavCreate';
3
+ import { default as NavEdit } from './NavEdit';
4
+ import { default as NavOverview } from './NavOverview';
5
+ import { useModalSharedLogic } from './useModalSharedLogic';
6
+ import { withModalSharedLogic } from './withModalSharedLogic';
7
+ import { ExternalItem } from './externalItem';
8
+ import { ItemCreate } from './internalItem/internalItemCreate';
9
+ import { ItemEdit } from './internalItem/internalItemEdit';
10
+ import { WrapperItem } from './wrapperItem';
11
+ import { default as NavModal } from './NavModal';
12
+ import { default as SaveConfirm } from './SaveConfirm';
13
+ import { default as DiscardChanges } from './DiscardChanges';
14
+ export { Delete, NavCreate, NavEdit, NavOverview, useModalSharedLogic, withModalSharedLogic, ExternalItem, ItemCreate, ItemEdit, WrapperItem, NavModal, SaveConfirm, DiscardChanges, };
@@ -0,0 +1,17 @@
1
+ import { ConfigContentType, Entity } from '../../../../../types';
2
+ export type SelectedEntry = {
3
+ entry: Entity;
4
+ contentType: ConfigContentType;
5
+ };
6
+ export declare const getSelectionKey: (contentType: ConfigContentType, entry: Entity) => string;
7
+ export default function EntrySelection({ contentTypes, contentType, setContentType, query, setQuery, selectedEntries, onToggle, onClear, getUsage, }: {
8
+ contentTypes: ConfigContentType[];
9
+ contentType: ConfigContentType | undefined;
10
+ setContentType: (contentType: ConfigContentType) => void;
11
+ query: string;
12
+ setQuery: (query: string) => void;
13
+ selectedEntries: Map<string, SelectedEntry>;
14
+ onToggle: (selectedEntry: SelectedEntry) => void;
15
+ onClear: () => void;
16
+ getUsage: (entry: Entity) => string | null;
17
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { Route, NestedNavItem, NestedNavigation } from '../../../../../types';
2
+ import { ModalItem_VariantCreate } from '../../../types';
3
+ import { useModalSharedLogic } from '../useModalSharedLogic';
4
+ type ItemDetailsProps = Pick<ModalItem_VariantCreate & ReturnType<typeof useModalSharedLogic>, 'navItemState' | 'dispatchNavItemState' | 'path' | 'dispatchPath' | 'validationState' | 'isBlacklisted' | 'debouncedCheckUrl' | 'cancelUrlCheck' | 'debouncedCheckBlacklist'> & {
5
+ route: Route;
6
+ parentNavItem?: NestedNavItem | null;
7
+ navigationItems?: NestedNavItem[] | null;
8
+ navigations?: NestedNavigation[] | null;
9
+ item?: NestedNavItem;
10
+ modalVariant: 'create' | 'edit';
11
+ };
12
+ export default function ItemDetails({ navItemState, dispatchNavItemState, path, dispatchPath, validationState, isBlacklisted, parentNavItem, navigationItems, navigations, debouncedCheckUrl, cancelUrlCheck, debouncedCheckBlacklist, item, route, modalVariant, }: ItemDetailsProps): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,23 @@
1
+ import { ConfigContentType, Entity, NestedNavItem, Route } from '../../../../../types';
2
+ import { SelectedEntry } from './EntrySelection';
3
+ type RowStatus = 'loading' | 'checking' | 'ok' | 'replaced' | 'blacklisted' | 'duplicate' | 'noRoute' | 'error';
4
+ export type ReviewRow = {
5
+ key: string;
6
+ entry: Entity;
7
+ contentType: ConfigContentType;
8
+ route: Route | null;
9
+ title: string;
10
+ slug: string;
11
+ path: string;
12
+ status: RowStatus;
13
+ };
14
+ /**
15
+ * A row can be added when its path is checked and unique, also among the other selected entries.
16
+ */
17
+ export declare const isRowValid: (row: ReviewRow) => boolean;
18
+ export default function MultiItemReview({ selectedEntries, parentNavItem, onRowsChange, }: {
19
+ selectedEntries: SelectedEntry[];
20
+ parentNavItem: NestedNavItem | null;
21
+ onRowsChange: (rows: ReviewRow[]) => void;
22
+ }): import("react").JSX.Element;
23
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ModalItem_VariantCreate } from '../../../types';
2
+ export declare const ItemCreate: import('react').FC<ModalItem_VariantCreate>;
@@ -0,0 +1,2 @@
1
+ import { ModalItem_VariantEdit } from '../../../types';
2
+ export declare const ItemEdit: import('react').FC<ModalItem_VariantEdit>;
@@ -0,0 +1,2 @@
1
+ import { modalSharedLogic } from '../../types';
2
+ export declare function useModalSharedLogic(): modalSharedLogic;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { useModalSharedLogic } from './useModalSharedLogic';
3
+ export declare function withModalSharedLogic<T>(Component: React.FunctionComponent<T & ReturnType<typeof useModalSharedLogic>>): React.FC<T>;
@@ -0,0 +1,15 @@
1
+ import { NestedNavItem } from '../../../../../types';
2
+ import { default as React } from 'react';
3
+ type wrapperCreateProps = {
4
+ variant: 'WrapperCreate';
5
+ actionItemParentId?: string;
6
+ onCreate: (newItem: NestedNavItem) => void;
7
+ };
8
+ type wrapperEditProps = {
9
+ variant: 'WrapperEdit';
10
+ item: NestedNavItem;
11
+ onSave: (editedItem: NestedNavItem) => void;
12
+ };
13
+ type wrapperItemProps = wrapperCreateProps | wrapperEditProps;
14
+ export declare const WrapperItem: React.FC<wrapperItemProps>;
15
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { ConfigContentType, NestedNavigation } from '../../../types';
3
+ type ModalContextType = {
4
+ modalType: string;
5
+ setModalType: Dispatch<SetStateAction<string>>;
6
+ };
7
+ type SelectedNavigationContextType = {
8
+ selectedNavigation: NestedNavigation | undefined;
9
+ setSelectedNavigation: Dispatch<SetStateAction<NestedNavigation | undefined>>;
10
+ };
11
+ type ContentTypesContextType = {
12
+ contentTypes: ConfigContentType[];
13
+ };
14
+ export declare const ModalContext: import('react').Context<ModalContextType>;
15
+ export declare const SelectedNavigationContext: import('react').Context<SelectedNavigationContextType>;
16
+ export declare const ContentTypesContext: import('react').Context<ContentTypesContextType>;
17
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as useAllContentTypes } from './useAllContentTypes';
2
+ import { default as useAllEntities } from './useAllEntities';
3
+ import { default as useApi } from './useApi';
4
+ import { default as useErrorMessage } from './useErrorMessage';
5
+ import { default as usePluginConfig } from './usePluginConfig';
6
+ import { default as useEntrySearch } from './useEntrySearch';
7
+ export { useAllContentTypes, useAllEntities, useApi, useErrorMessage, usePluginConfig, useEntrySearch, };
@@ -0,0 +1,7 @@
1
+ import { ContentType } from '../../../types';
2
+ declare const useAllContentTypes: () => {
3
+ contentTypes: ContentType[];
4
+ loading: boolean;
5
+ error: unknown;
6
+ };
7
+ export default useAllContentTypes;
@@ -0,0 +1,7 @@
1
+ import { GroupedEntities } from '../../../types';
2
+ declare const useAllEntities: () => {
3
+ entities: GroupedEntities[];
4
+ loading: boolean;
5
+ error: unknown;
6
+ };
7
+ export default useAllEntities;
@@ -0,0 +1,23 @@
1
+ import { Route, GroupedEntities, StructuredNavigationVariant, NavigationInput, NestedNavItem, NavigationDepth, HealthReport } from '../../../types';
2
+ export default function useApi(): {
3
+ fetchAllContentTypes: () => Promise<any>;
4
+ fetchAllEntities: () => Promise<GroupedEntities[]>;
5
+ getRelatedRoute: (relatedDocumentId: string) => Promise<Route>;
6
+ getRoute: (documentId: string) => Promise<Route>;
7
+ getAllRoutes: () => Promise<Route[]>;
8
+ getHealthReport: () => Promise<HealthReport>;
9
+ getProhibitedRouteIds: (documentId?: string) => Promise<string[]>;
10
+ getNavigation: ({ documentId, variant, }?: {
11
+ documentId?: string;
12
+ variant?: StructuredNavigationVariant | "namesOnly";
13
+ }) => Promise<any>;
14
+ createNavigation: (body: NavigationInput) => Promise<any>;
15
+ deleteNavigation: (documentId: string) => Promise<any>;
16
+ updateNavigation: (documentId: string, body: NavigationInput) => Promise<any>;
17
+ updateNavigationItemStructure: (documentId: string, navigationItems: NestedNavItem[]) => Promise<any>;
18
+ getNavigationDepths: () => Promise<NavigationDepth[]>;
19
+ updateNavigationDepths: (depths: {
20
+ documentId: string;
21
+ maxDepth: number;
22
+ }[]) => Promise<NavigationDepth[]>;
23
+ };
@@ -0,0 +1,13 @@
1
+ import { ConfigContentType, Entity } from '../../../types';
2
+ /**
3
+ * Searches the entries of a content type page by page through the content manager, so content types
4
+ * with many entries never have to be loaded completely. Sorted by the route source field.
5
+ */
6
+ export default function useEntrySearch(contentType: ConfigContentType | undefined, query: string): {
7
+ entries: Entity[];
8
+ paths: Map<string, string | null>;
9
+ loading: boolean;
10
+ hasError: boolean;
11
+ hasMore: boolean;
12
+ loadMore: () => Promise<void>;
13
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns a helper that prefers the message the API sent (ApplicationError, ValidationError, ...)
3
+ * over the generic fallback, so users see why an action failed instead of
4
+ * "Request failed with status code 400". Non-API errors fall back to the passed message.
5
+ *
6
+ * The helper is memoized so it can be used as an effect dependency.
7
+ */
8
+ export default function useErrorMessage(): (error: unknown, fallback: string) => string;
@@ -0,0 +1,9 @@
1
+ import { PluginConfig } from '../../../types';
2
+ type UsePluginConfigResponse = {
3
+ config: PluginConfig | null;
4
+ loading: boolean;
5
+ fetchError: unknown;
6
+ setConfig: (body: Partial<PluginConfig>) => Promise<void>;
7
+ };
8
+ export default function usePluginConfig(): UsePluginConfigResponse;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const Navigation: () => import("react").JSX.Element;
2
+ export default Navigation;
@@ -0,0 +1,8 @@
1
+ import { NestedNavigation } from '../../../../types';
2
+ export default function PageWrapper({ navigations, loading, itemCount, actions, children, }: {
3
+ navigations: NestedNavigation[];
4
+ loading?: boolean;
5
+ itemCount?: number;
6
+ actions?: React.ReactNode;
7
+ children: React.ReactNode;
8
+ }): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { RouteItemProps } from '../../types';
2
+ export declare const RouteItem: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<RouteItemProps & import('react').RefAttributes<HTMLDivElement>>>;
@@ -0,0 +1,4 @@
1
+ import { NestedNavItem } from '../../../../types';
2
+ export default function RouteItemBadge({ item }: {
3
+ item: NestedNavItem;
4
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+ export default function RouteItemIcon({ type, color, }: {
3
+ type: 'internal' | 'external' | 'wrapper' | undefined;
4
+ color?: string;
5
+ }): ReactElement;
@@ -0,0 +1,12 @@
1
+ import { NestedNavItem } from '../../../../types';
2
+ export default function RouteItemMenu({ item, depth, maxDepth, readOnly, handleEdit, handleAddChildren, handleDelete, handleRestore, handleUndoDelete, }: {
3
+ item: NestedNavItem;
4
+ depth?: number;
5
+ maxDepth: number;
6
+ readOnly: boolean;
7
+ handleEdit: () => void;
8
+ handleAddChildren: () => void;
9
+ handleDelete: () => void;
10
+ handleRestore: () => void;
11
+ handleUndoDelete: () => void;
12
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import { NestedNavItem } from '../../../../types';
2
+ export default function RouteItemStatus({ item, isUpdated, }: {
3
+ item: NestedNavItem;
4
+ isUpdated?: boolean;
5
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { RouteItemProps } from '../../types';
2
+ export default function SortableRouteItem({ item, depth, setNavigationItems, ...props }: RouteItemProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Asks for confirmation before leaving the page with unsaved changes, like the forms of the content
3
+ * manager. Uses the translations of the Strapi admin, so the dialog matches the rest of the admin.
4
+ */
5
+ export default function UnsavedChangesBlocker({ when, skipRef, }: {
6
+ when: boolean;
7
+ skipRef: React.RefObject<boolean>;
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ declare const App: () => import("react").JSX.Element;
2
+ export default App;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Removes the remembered collapsed items of a navigation, e.g. when the navigation is deleted.
3
+ */
4
+ export declare function removeCollapsedItems(navigationDocumentId: string): void;
5
+ /**
6
+ * Collapsed items of a navigation, remembered per navigation in the localStorage of the browser.
7
+ */
8
+ export default function useCollapsedItems(navigationDocumentId: string | undefined): {
9
+ collapsedIds: Set<string>;
10
+ toggleCollapsed: (documentId: string) => void;
11
+ expand: (documentId: string) => void;
12
+ setCollapsedIds: (ids: Set<string>) => void;
13
+ };
@@ -0,0 +1,8 @@
1
+ import { HealthCheck, HealthReport } from '../../../../types';
2
+ export default function HealthSummary({ report, loading, activeCheck, handleSelectCheck, handleRecheck, }: {
3
+ report: HealthReport | null;
4
+ loading: boolean;
5
+ activeCheck: string | null;
6
+ handleSelectCheck: (check: HealthCheck | null) => void;
7
+ handleRecheck: () => void;
8
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { HealthIssue } from '../../../../types';
2
+ export default function IssueBadges({ issues }: {
3
+ issues: HealthIssue[];
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export default function PageWrapper({ children, total, matches, }: {
2
+ children: React.ReactNode;
3
+ total?: number;
4
+ matches?: number;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Route } from '../../../../types';
2
+ export default function PathActionsMenu({ route, isSingleType, canReadNavigation, canEdit, }: {
3
+ route: Route;
4
+ isSingleType: boolean;
5
+ canReadNavigation: boolean;
6
+ canEdit: boolean;
7
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import { RouteFilterKey } from '../../types';
2
+ export default function PathFilters({ contentTypeOptions, selectedContentTypes, type, deviation, navigation, handleFilterChange, handleResetFilters, hasActiveFilters, }: {
3
+ contentTypeOptions: {
4
+ uid: string;
5
+ label: string;
6
+ }[];
7
+ selectedContentTypes: string[];
8
+ type: string | null;
9
+ deviation: string | null;
10
+ navigation: string | null;
11
+ handleFilterChange: (key: RouteFilterKey, values: string[]) => void;
12
+ handleResetFilters: () => void;
13
+ hasActiveFilters: boolean;
14
+ }): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { HealthIssue, Route } from '../../../../types';
2
+ import { RouteSortKey } from '../../types';
3
+ declare function PathTable({ routes, sortKey, sortDirection, handleSort, singleTypeUids, contentTypeLabels, issuesByRoute, canReadNavigation, readableContentTypes, hasSearch, hasActiveFilters, handleClearSearch, handleResetFilters, }: {
4
+ routes: Route[];
5
+ sortKey: RouteSortKey;
6
+ sortDirection: 'asc' | 'desc';
7
+ handleSort: (key: RouteSortKey) => void;
8
+ singleTypeUids: Set<string>;
9
+ contentTypeLabels: Map<string, string>;
10
+ issuesByRoute: Map<string, HealthIssue[]>;
11
+ canReadNavigation: boolean;
12
+ readableContentTypes: Set<string>;
13
+ hasSearch: boolean;
14
+ hasActiveFilters: boolean;
15
+ handleClearSearch: () => void;
16
+ handleResetFilters: () => void;
17
+ }): import("react").JSX.Element;
18
+ export default PathTable;
@@ -0,0 +1,5 @@
1
+ declare function SearchInput({ searchQuery, handleSearchChange, }: {
2
+ searchQuery: string;
3
+ handleSearchChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
4
+ }): import("react").JSX.Element;
5
+ export default SearchInput;
@@ -0,0 +1,6 @@
1
+ import { RouteSortKey } from '../../types';
2
+ export default function TableHeader({ sortKey, sortDirection, handleSort, }: {
3
+ sortKey: RouteSortKey;
4
+ sortDirection: 'asc' | 'desc';
5
+ handleSort: (key: RouteSortKey) => void;
6
+ }): import("react").JSX.Element;