@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.
Files changed (35) hide show
  1. package/README.md +2 -3
  2. package/dist/form/EntityForm.d.ts +2 -0
  3. package/dist/hooks/index.d.ts +1 -0
  4. package/dist/{internal → hooks}/useBuildNavigationController.d.ts +11 -4
  5. package/dist/index.es.js +3172 -3162
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/index.umd.js +5 -5
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/types/fields.d.ts +0 -1
  10. package/dist/types/firecms.d.ts +6 -25
  11. package/dist/types/navigation.d.ts +2 -2
  12. package/dist/types/plugins.d.ts +0 -8
  13. package/package.json +7 -7
  14. package/src/components/ArrayContainer.tsx +1 -1
  15. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +131 -135
  16. package/src/components/EntityCollectionView/EntityCollectionView.tsx +1 -1
  17. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +0 -1
  18. package/src/components/VirtualTable/VirtualTableHeader.tsx +10 -4
  19. package/src/core/FireCMS.tsx +1 -16
  20. package/src/core/NavigationRoutes.tsx +10 -8
  21. package/src/form/EntityForm.tsx +237 -196
  22. package/src/form/PropertyFieldBinding.tsx +7 -7
  23. package/src/form/components/CustomIdField.tsx +35 -34
  24. package/src/form/components/ErrorFocus.tsx +3 -3
  25. package/src/form/field_bindings/BlockFieldBinding.tsx +13 -12
  26. package/src/hooks/index.tsx +1 -0
  27. package/src/{internal → hooks}/useBuildNavigationController.tsx +23 -17
  28. package/src/internal/useBuildSideEntityController.tsx +1 -1
  29. package/src/types/fields.tsx +1 -1
  30. package/src/types/firecms.tsx +7 -28
  31. package/src/types/navigation.ts +2 -2
  32. package/src/types/plugins.tsx +0 -9
  33. package/src/util/resolutions.ts +1 -1
  34. package/dist/form/components/SubmitListener.d.ts +0 -1
  35. 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
- - Firebase SDK 9
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 {};
@@ -18,3 +18,4 @@ export * from "./useLargeLayout";
18
18
  export * from "./useReferenceDialog";
19
19
  export * from "./useBrowserTitleAndIcon";
20
20
  export * from "./useCustomizationController";
21
+ export * from "./useBuildNavigationController";
@@ -1,4 +1,4 @@
1
- import { AuthController, CMSView, CMSViewsBuilder, DataSourceDelegate, EntityCollection, EntityCollectionsBuilder, FireCMSPlugin, NavigationController, User, UserConfigurationPersistence } from "../types";
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
- plugins?: FireCMSPlugin[];
10
- dataSource: DataSourceDelegate;
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, plugins, dataSource }: BuildNavigationContextProps<EC, UserType>): NavigationController;
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 {};