@firecms/core 3.0.0-alpha.44 → 3.0.0-alpha.46

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 (53) hide show
  1. package/dist/contexts/NavigationContext.d.ts +2 -2
  2. package/dist/core/NavigationRoutes.d.ts +1 -1
  3. package/dist/core/index.d.ts +1 -1
  4. package/dist/hooks/data/save.d.ts +2 -1
  5. package/dist/hooks/index.d.ts +1 -2
  6. package/dist/hooks/{useNavigationContext.d.ts → useNavigationController.d.ts} +2 -2
  7. package/dist/index.es.js +5444 -5440
  8. package/dist/index.es.js.map +1 -1
  9. package/dist/index.umd.js +13 -13
  10. package/dist/index.umd.js.map +1 -1
  11. package/dist/{hooks → internal}/useBuildDataSource.d.ts +3 -2
  12. package/dist/internal/useBuildNavigationController.d.ts +14 -0
  13. package/dist/internal/useBuildSideEntityController.d.ts +2 -2
  14. package/dist/types/datasource.d.ts +3 -3
  15. package/dist/types/firecms.d.ts +4 -4
  16. package/dist/types/firecms_context.d.ts +2 -2
  17. package/dist/types/navigation.d.ts +2 -2
  18. package/package.json +2 -2
  19. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +3 -3
  20. package/src/components/EntityCollectionTable/filters/ReferenceFilterField.tsx +3 -3
  21. package/src/components/EntityCollectionTable/useEntityCollectionTableController.tsx +2 -2
  22. package/src/components/EntityCollectionView/EntityCollectionView.tsx +4 -3
  23. package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +3 -3
  24. package/src/components/FireCMSAppBar.tsx +2 -2
  25. package/src/components/HomePage/DefaultHomePage.tsx +4 -4
  26. package/src/components/HomePage/FavouritesView.tsx +3 -3
  27. package/src/components/ReferenceSelectionInner.tsx +2 -2
  28. package/src/contexts/NavigationContext.tsx +2 -2
  29. package/src/core/Drawer.tsx +2 -2
  30. package/src/core/EntitySidePanel.tsx +4 -4
  31. package/src/core/FireCMS.tsx +29 -23
  32. package/src/core/NavigationRoutes.tsx +3 -3
  33. package/src/core/Scaffold.tsx +3 -3
  34. package/src/core/index.tsx +1 -1
  35. package/src/form/components/ReferenceWidget.tsx +4 -4
  36. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +3 -3
  37. package/src/form/field_bindings/ReferenceFieldBinding.tsx +3 -3
  38. package/src/hooks/data/save.ts +11 -1
  39. package/src/hooks/data/useCollectionFetch.tsx +3 -3
  40. package/src/hooks/data/useEntityFetch.tsx +3 -3
  41. package/src/hooks/index.tsx +1 -2
  42. package/src/hooks/useFireCMSContext.tsx +2 -2
  43. package/src/hooks/{useNavigationContext.tsx → useNavigationController.tsx} +3 -3
  44. package/src/hooks/useReferenceDialog.tsx +2 -2
  45. package/src/{hooks → internal}/useBuildDataSource.ts +34 -25
  46. package/src/internal/{useBuildNavigationContext.tsx → useBuildNavigationController.tsx} +22 -18
  47. package/src/internal/useBuildSideEntityController.tsx +3 -3
  48. package/src/preview/components/ReferencePreview.tsx +3 -3
  49. package/src/types/datasource.ts +3 -3
  50. package/src/types/firecms.tsx +4 -4
  51. package/src/types/firecms_context.tsx +2 -2
  52. package/src/types/navigation.ts +2 -2
  53. package/dist/internal/useBuildNavigationContext.d.ts +0 -14
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- import { NavigationContext } from "../types";
3
- export declare const NavigationContextInstance: React.Context<NavigationContext>;
2
+ import { NavigationController } from "../types";
3
+ export declare const NavigationContext: React.Context<NavigationController>;
@@ -12,7 +12,7 @@ export type NavigationRoutesProps = {
12
12
  /**
13
13
  * This component is in charge of rendering
14
14
  * all the related routes (entity collection root views, custom views
15
- * or the home route) related to a {@link NavigationContext}.
15
+ * or the home route) related to a {@link NavigationController}.
16
16
  * This component needs a parent {@link FireCMS}
17
17
  *
18
18
  * @constructor
@@ -1,4 +1,4 @@
1
- export { FireCMS } from "./FireCMS";
1
+ export * from "./FireCMS";
2
2
  export type { ScaffoldProps } from "./Scaffold";
3
3
  export { Scaffold } from "./Scaffold";
4
4
  export type { DrawerProps } from "./Drawer";
@@ -1,4 +1,4 @@
1
- import { DataSource, Entity, EntityCallbacks, FireCMSContext, SaveEntityProps, User } from "../../types";
1
+ import { DataSource, Entity, EntityCallbacks, EntityCollection, FireCMSContext, SaveEntityProps, User } from "../../types";
2
2
  /**
3
3
  * @group Hooks and utilities
4
4
  */
@@ -36,6 +36,7 @@ export type SaveEntityWithCallbacksProps<M extends Record<string, any>> = SaveEn
36
36
  * @group Hooks and utilities
37
37
  */
38
38
  export declare function saveEntityWithCallbacks<M extends Record<string, any>, UserType extends User>({ collection, path, entityId, values, previousValues, status, dataSource, context, onSaveSuccess, onSaveFailure, onPreSaveHookError, onSaveSuccessHookError }: SaveEntityWithCallbacksProps<M> & {
39
+ collection: EntityCollection<M>;
39
40
  dataSource: DataSource;
40
41
  context: FireCMSContext<UserType>;
41
42
  }): Promise<void>;
@@ -4,7 +4,7 @@ export * from "./data/useEntityFetch";
4
4
  export * from "./data/save";
5
5
  export * from "./data/delete";
6
6
  export * from "../form/useClearRestoreValue";
7
- export * from "./useNavigationContext";
7
+ export * from "./useNavigationController";
8
8
  export * from "./useResolvedNavigationFrom";
9
9
  export * from "./useStorageSource";
10
10
  export * from "./useAuthController";
@@ -18,4 +18,3 @@ export * from "./useBreadcrumbsContext";
18
18
  export * from "./useLargeLayout";
19
19
  export * from "./useReferenceDialog";
20
20
  export * from "./useBrowserTitleAndIcon";
21
- export * from "./useBuildDataSource";
@@ -1,4 +1,4 @@
1
- import { NavigationContext } from "../types";
1
+ import { NavigationController } from "../types";
2
2
  /**
3
3
  * Use this hook to get the navigation of the app.
4
4
  * This controller provides the resolved collections for the CMS as well
@@ -6,4 +6,4 @@ import { NavigationContext } from "../types";
6
6
  *
7
7
  * @group Hooks and utilities
8
8
  */
9
- export declare const useNavigationContext: () => NavigationContext;
9
+ export declare const useNavigationController: () => NavigationController;