@firecms/collection_editor 3.0.0-alpha.43 → 3.0.0-alpha.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firecms/collection_editor",
3
- "version": "3.0.0-alpha.43",
3
+ "version": "3.0.0-alpha.45",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,8 +14,8 @@
14
14
  "./package.json": "./package.json"
15
15
  },
16
16
  "dependencies": {
17
- "@firecms/data_import_export": "^3.0.0-alpha.43",
18
- "@firecms/schema_inference": "^3.0.0-alpha.43",
17
+ "@firecms/data_import_export": "^3.0.0-alpha.45",
18
+ "@firecms/schema_inference": "^3.0.0-alpha.45",
19
19
  "json5": "^2.2.3",
20
20
  "prism-react-renderer": "^2.3.0"
21
21
  },
@@ -78,5 +78,5 @@
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  },
81
- "gitHead": "12aab079f7690479c08ab2fef230b81c9236e226"
81
+ "gitHead": "8a8223081bd7f76d655564ca995dca085f22d727"
82
82
  }
@@ -6,7 +6,7 @@ import {
6
6
  EntityCollection,
7
7
  Property,
8
8
  useFireCMSContext,
9
- useNavigationContext,
9
+ useNavigationController,
10
10
  User,
11
11
  useSnackbarController
12
12
  } from "@firecms/core";
@@ -70,7 +70,7 @@ export const ConfigControllerProvider = React.memo(
70
70
  getData
71
71
  }: PropsWithChildren<ConfigControllerProviderProps>) {
72
72
 
73
- const navigation = useNavigationContext();
73
+ const navigation = useNavigationController();
74
74
  const navigate = useNavigate();
75
75
  const snackbarController = useSnackbarController();
76
76
  const { propertyConfigs } = useFireCMSContext();
@@ -9,7 +9,7 @@ import {
9
9
  SettingsIcon,
10
10
  Tooltip,
11
11
  useAuthController,
12
- useNavigationContext,
12
+ useNavigationController,
13
13
  useSnackbarController
14
14
  } from "@firecms/core";
15
15
 
@@ -25,7 +25,7 @@ export function EditorCollectionAction({
25
25
  }: CollectionActionsProps) {
26
26
 
27
27
  const authController = useAuthController();
28
- const navigationController = useNavigationContext();
28
+ const navigationController = useNavigationController();
29
29
  const collectionEditorController = useCollectionEditorController();
30
30
  const configController = useCollectionsConfigController();
31
31
  const snackbarController = useSnackbarController();
@@ -1,11 +1,11 @@
1
- import { AddIcon, Chip, Collapse, Typography, unslugify, useAuthController, useNavigationContext } from "@firecms/core";
1
+ import { AddIcon, Chip, Collapse, Typography, unslugify, useAuthController, useNavigationController } from "@firecms/core";
2
2
  import { useCollectionEditorController } from "../useCollectionEditorController";
3
3
  import React from "react";
4
4
 
5
5
  export function RootCollectionSuggestions() {
6
6
 
7
7
  const authController = useAuthController();
8
- const navigationContext = useNavigationContext();
8
+ const navigationController = useNavigationController();
9
9
 
10
10
  const collectionEditorController = useCollectionEditorController();
11
11
  const canCreateCollections = collectionEditorController.configPermissions
@@ -16,7 +16,7 @@ export function RootCollectionSuggestions() {
16
16
 
17
17
  const rootPathSuggestions = collectionEditorController.rootPathSuggestions ?? [];
18
18
 
19
- const showSuggestions = rootPathSuggestions.length > 3 || (navigationContext.collections.length === 0 && rootPathSuggestions.length > 0);
19
+ const showSuggestions = rootPathSuggestions.length > 3 || (navigationController.collections.length === 0 && rootPathSuggestions.length > 0);
20
20
  return <Collapse
21
21
  in={showSuggestions}>
22
22
 
@@ -30,7 +30,7 @@ import {
30
30
  TopNavigationResult,
31
31
  useAuthController,
32
32
  useFireCMSContext,
33
- useNavigationContext,
33
+ useNavigationController,
34
34
  User,
35
35
  useSnackbarController
36
36
  } from "@firecms/core";
@@ -158,7 +158,7 @@ export function CollectionEditorDialogInternal<M extends {
158
158
  ) {
159
159
 
160
160
  const { propertyConfigs } = useFireCMSContext();
161
- const navigation = useNavigationContext();
161
+ const navigation = useNavigationController();
162
162
  const {
163
163
  topLevelNavigation,
164
164
  collections
@@ -10,7 +10,7 @@ import {
10
10
  SelectItem,
11
11
  StringProperty,
12
12
  Typography,
13
- useNavigationContext
13
+ useNavigationController
14
14
  } from "@firecms/core";
15
15
  import { FieldHelperView } from "./FieldHelperView";
16
16
 
@@ -30,7 +30,7 @@ export function ReferencePropertyField({
30
30
  setFieldValue
31
31
  } = useFormikContext<StringProperty | NumberProperty>();
32
32
 
33
- const navigation = useNavigationContext();
33
+ const navigation = useNavigationController();
34
34
 
35
35
  if (!navigation)
36
36
  return <div className={"col-span-12"}>
@@ -88,7 +88,7 @@ export function CollectionsSelect({
88
88
 
89
89
  console.log("error", error)
90
90
 
91
- const navigation = useNavigationContext();
91
+ const navigation = useNavigationController();
92
92
 
93
93
  if (!navigation)
94
94
  return <div className={"col-span-12"}>