@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.
- package/dist/contexts/NavigationContext.d.ts +2 -2
- package/dist/core/NavigationRoutes.d.ts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/hooks/data/save.d.ts +2 -1
- package/dist/hooks/index.d.ts +1 -2
- package/dist/hooks/{useNavigationContext.d.ts → useNavigationController.d.ts} +2 -2
- package/dist/index.es.js +5444 -5440
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +13 -13
- package/dist/index.umd.js.map +1 -1
- package/dist/{hooks → internal}/useBuildDataSource.d.ts +3 -2
- package/dist/internal/useBuildNavigationController.d.ts +14 -0
- package/dist/internal/useBuildSideEntityController.d.ts +2 -2
- package/dist/types/datasource.d.ts +3 -3
- package/dist/types/firecms.d.ts +4 -4
- package/dist/types/firecms_context.d.ts +2 -2
- package/dist/types/navigation.d.ts +2 -2
- package/package.json +2 -2
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +3 -3
- package/src/components/EntityCollectionTable/filters/ReferenceFilterField.tsx +3 -3
- package/src/components/EntityCollectionTable/useEntityCollectionTableController.tsx +2 -2
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +4 -3
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +3 -3
- package/src/components/FireCMSAppBar.tsx +2 -2
- package/src/components/HomePage/DefaultHomePage.tsx +4 -4
- package/src/components/HomePage/FavouritesView.tsx +3 -3
- package/src/components/ReferenceSelectionInner.tsx +2 -2
- package/src/contexts/NavigationContext.tsx +2 -2
- package/src/core/Drawer.tsx +2 -2
- package/src/core/EntitySidePanel.tsx +4 -4
- package/src/core/FireCMS.tsx +29 -23
- package/src/core/NavigationRoutes.tsx +3 -3
- package/src/core/Scaffold.tsx +3 -3
- package/src/core/index.tsx +1 -1
- package/src/form/components/ReferenceWidget.tsx +4 -4
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +3 -3
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +3 -3
- package/src/hooks/data/save.ts +11 -1
- package/src/hooks/data/useCollectionFetch.tsx +3 -3
- package/src/hooks/data/useEntityFetch.tsx +3 -3
- package/src/hooks/index.tsx +1 -2
- package/src/hooks/useFireCMSContext.tsx +2 -2
- package/src/hooks/{useNavigationContext.tsx → useNavigationController.tsx} +3 -3
- package/src/hooks/useReferenceDialog.tsx +2 -2
- package/src/{hooks → internal}/useBuildDataSource.ts +34 -25
- package/src/internal/{useBuildNavigationContext.tsx → useBuildNavigationController.tsx} +22 -18
- package/src/internal/useBuildSideEntityController.tsx +3 -3
- package/src/preview/components/ReferencePreview.tsx +3 -3
- package/src/types/datasource.ts +3 -3
- package/src/types/firecms.tsx +4 -4
- package/src/types/firecms_context.tsx +2 -2
- package/src/types/navigation.ts +2 -2
- package/dist/internal/useBuildNavigationContext.d.ts +0 -14
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
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
|
|
15
|
+
* or the home route) related to a {@link NavigationController}.
|
|
16
16
|
* This component needs a parent {@link FireCMS}
|
|
17
17
|
*
|
|
18
18
|
* @constructor
|
package/dist/core/index.d.ts
CHANGED
|
@@ -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>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -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 "./
|
|
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 {
|
|
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
|
|
9
|
+
export declare const useNavigationController: () => NavigationController;
|