@firecms/core 3.0.0-beta.2-pre.3 → 3.0.0-beta.2-pre.5
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/README.md +2 -3
- package/dist/form/EntityForm.d.ts +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/{internal → hooks}/useBuildNavigationController.d.ts +11 -4
- package/dist/index.es.js +3172 -3162
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/types/fields.d.ts +0 -1
- package/dist/types/firecms.d.ts +6 -25
- package/dist/types/navigation.d.ts +2 -2
- package/dist/types/plugins.d.ts +0 -8
- package/package.json +7 -7
- package/src/components/ArrayContainer.tsx +1 -1
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +131 -135
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +1 -1
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +0 -1
- package/src/components/VirtualTable/VirtualTableHeader.tsx +10 -4
- package/src/core/FireCMS.tsx +1 -16
- package/src/core/NavigationRoutes.tsx +10 -8
- package/src/form/EntityForm.tsx +237 -196
- package/src/form/PropertyFieldBinding.tsx +7 -7
- package/src/form/components/CustomIdField.tsx +35 -34
- package/src/form/components/ErrorFocus.tsx +3 -3
- package/src/form/field_bindings/BlockFieldBinding.tsx +13 -12
- package/src/hooks/index.tsx +1 -0
- package/src/{internal → hooks}/useBuildNavigationController.tsx +23 -17
- package/src/internal/useBuildSideEntityController.tsx +1 -1
- package/src/types/fields.tsx +1 -1
- package/src/types/firecms.tsx +7 -28
- package/src/types/navigation.ts +2 -2
- package/src/types/plugins.tsx +0 -9
- package/src/util/resolutions.ts +1 -1
- package/dist/form/components/SubmitListener.d.ts +0 -1
- package/src/form/components/SubmitListener.tsx +0 -32
package/README.md
CHANGED
|
@@ -40,10 +40,9 @@ out-of-the-box experience for any project.
|
|
|
40
40
|
FireCMS is based on this great technologies:
|
|
41
41
|
|
|
42
42
|
- Typescript
|
|
43
|
-
-
|
|
43
|
+
- Tailwind CSS
|
|
44
|
+
- Firebase SDK 10
|
|
44
45
|
- React + React Router 6
|
|
45
|
-
- Material UI 5
|
|
46
|
-
- Formik + Yup
|
|
47
46
|
|
|
48
47
|
### Quickstart
|
|
49
48
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Entity, EntityCollection, EntityStatus, EntityValues, FormContext, ResolvedEntityCollection } from "../types";
|
|
2
|
+
import { ValidationError } from "yup";
|
|
2
3
|
/**
|
|
3
4
|
* @group Components
|
|
4
5
|
*/
|
|
@@ -72,4 +73,5 @@ export type EntityFormSaveParams<M extends Record<string, any>> = {
|
|
|
72
73
|
*/
|
|
73
74
|
export declare const EntityForm: typeof EntityFormInternal;
|
|
74
75
|
declare function EntityFormInternal<M extends Record<string, any>>({ status, path, collection: inputCollection, entity, onEntitySaveRequested, onDiscard, onModified, onValuesChanged, onIdChange, onFormContextChange, hideId, autoSave, onIdUpdateError }: EntityFormProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare function yupToFormErrors(yupError: ValidationError): Record<string, any>;
|
|
75
77
|
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthController, CMSView, CMSViewsBuilder, DataSourceDelegate, EntityCollection, EntityCollectionsBuilder,
|
|
1
|
+
import { AuthController, CMSView, CMSViewsBuilder, DataSourceDelegate, EntityCollection, EntityCollectionsBuilder, NavigationController, User, UserConfigurationPersistence } from "../types";
|
|
2
2
|
type BuildNavigationContextProps<EC extends EntityCollection, UserType extends User> = {
|
|
3
3
|
basePath?: string;
|
|
4
4
|
baseCollectionPath?: string;
|
|
@@ -6,9 +6,16 @@ type BuildNavigationContextProps<EC extends EntityCollection, UserType extends U
|
|
|
6
6
|
collections?: EC[] | EntityCollectionsBuilder<EC>;
|
|
7
7
|
views?: CMSView[] | CMSViewsBuilder;
|
|
8
8
|
userConfigPersistence?: UserConfigurationPersistence;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
dataSourceDelegate: DataSourceDelegate;
|
|
10
|
+
/**
|
|
11
|
+
* Use this method to inject collections to the CMS.
|
|
12
|
+
* You receive the current collections as a parameter, and you can return
|
|
13
|
+
* a new list of collections.
|
|
14
|
+
* @see {@link joinCollectionLists}
|
|
15
|
+
* @param collections
|
|
16
|
+
*/
|
|
17
|
+
injectCollections?: (collections: EntityCollection[]) => EntityCollection[];
|
|
11
18
|
};
|
|
12
|
-
export declare function useBuildNavigationController<EC extends EntityCollection, UserType extends User>({ basePath, baseCollectionPath, authController, collections: baseCollections, views: baseViews, userConfigPersistence,
|
|
19
|
+
export declare function useBuildNavigationController<EC extends EntityCollection, UserType extends User>({ basePath, baseCollectionPath, authController, collections: baseCollections, views: baseViews, userConfigPersistence, dataSourceDelegate, injectCollections }: BuildNavigationContextProps<EC, UserType>): NavigationController;
|
|
13
20
|
export declare function getSidePanelKey(path: string, entityId?: string): string;
|
|
14
21
|
export {};
|