@firecms/core 3.0.0-alpha.35 → 3.0.0-alpha.37

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 (48) hide show
  1. package/dist/core/FireCMS.d.ts +0 -1
  2. package/dist/form/form_field_configs.d.ts +1 -1
  3. package/dist/hooks/useBuildDataSource.d.ts +2 -4
  4. package/dist/index.es.js +5884 -5825
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/index.umd.js +14 -14
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/types/firecms.d.ts +1 -1
  9. package/dist/types/firecms_context.d.ts +1 -1
  10. package/dist/types/plugins.d.ts +1 -0
  11. package/dist/util/builders.d.ts +64 -0
  12. package/dist/util/index.d.ts +1 -0
  13. package/dist/util/objects.d.ts +1 -0
  14. package/package.json +138 -138
  15. package/src/components/EntityCollectionTable/internal/DeleteEntityDialog.tsx +1 -1
  16. package/src/components/EntityCollectionTable/internal/PropertyTableCell.tsx +2 -1
  17. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -1
  18. package/src/components/EntityCollectionView/EntityCollectionView.tsx +5 -4
  19. package/src/components/EntityPreview.tsx +1 -1
  20. package/src/components/ErrorView.tsx +1 -0
  21. package/src/components/FireCMSAppBar.tsx +0 -1
  22. package/src/components/HomePage/DefaultHomePage.tsx +10 -0
  23. package/src/components/ReferenceSelectionInner.tsx +2 -2
  24. package/src/core/FireCMS.tsx +6 -5
  25. package/src/form/EntityForm.tsx +3 -3
  26. package/src/form/PropertyFieldBinding.tsx +4 -4
  27. package/src/form/components/ReferenceWidget.tsx +1 -1
  28. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
  29. package/src/form/field_bindings/ReferenceFieldBinding.tsx +2 -2
  30. package/src/form/form_field_configs.tsx +2 -2
  31. package/src/hooks/data/save.ts +3 -3
  32. package/src/hooks/useBuildDataSource.ts +3 -5
  33. package/src/preview/PropertyPreview.tsx +1 -1
  34. package/src/preview/components/ReferencePreview.tsx +2 -2
  35. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
  36. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +1 -1
  37. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +1 -1
  38. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +1 -1
  39. package/src/preview/property_previews/ArrayOneOfPreview.tsx +1 -1
  40. package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
  41. package/src/types/firecms.tsx +1 -1
  42. package/src/types/firecms_context.tsx +2 -1
  43. package/src/types/plugins.tsx +1 -0
  44. package/src/ui/Select.tsx +5 -9
  45. package/src/util/builders.ts +138 -0
  46. package/src/util/index.ts +1 -0
  47. package/src/util/objects.ts +23 -0
  48. package/src/util/resolutions.ts +6 -3
@@ -79,7 +79,7 @@ export type FireCMSProps<UserType extends User, EC extends EntityCollection> = {
79
79
  * You can use the key to reference the custom field in
80
80
  * the `propertyConfig` prop of a property in a collection.
81
81
  */
82
- fields?: Record<string, PropertyConfig>;
82
+ propertyConfigs?: Record<string, PropertyConfig>;
83
83
  /**
84
84
  * List of additional custom views for entities.
85
85
  * You can use the key to reference the custom view in
@@ -90,7 +90,7 @@ export type FireCMSContext<UserType extends User = User, AuthControllerType exte
90
90
  * You can use the key to reference the custom field in
91
91
  * the `propertyConfig` prop of a property in a collection.
92
92
  */
93
- fields: Record<string, PropertyConfig>;
93
+ propertyConfigs: Record<string, PropertyConfig>;
94
94
  /**
95
95
  * List of additional custom views for entities.
96
96
  * You can use the key to reference the custom view in
@@ -62,6 +62,7 @@ export type FireCMSPlugin<PROPS = any, FORM_PROPS = any, EC extends EntityCollec
62
62
  };
63
63
  homePage?: {
64
64
  additionalChildrenStart?: React.ReactNode;
65
+ additionalChildrenEnd?: React.ReactNode;
65
66
  /**
66
67
  * Use this component to add custom actions to the navigation card
67
68
  * in the home page.
@@ -0,0 +1,64 @@
1
+ import { AdditionalFieldDelegate, ArrayProperty, BooleanProperty, CMSType, DateProperty, EntityCallbacks, EntityCollection, EnumValueConfig, EnumValues, GeopointProperty, MapProperty, NumberProperty, PropertiesOrBuilders, PropertyBuilder, PropertyConfig, PropertyOrBuilder, ReferenceProperty, StringProperty, User } from "../types";
2
+ /**
3
+ * Identity function we use to defeat the type system of Typescript and build
4
+ * collection views with all its properties
5
+ * @param collection
6
+ * @group Builder
7
+ */
8
+ export declare function buildCollection<M extends Record<string, any> = any, UserType extends User = User>(collection: EntityCollection<M, UserType>): EntityCollection<M, UserType>;
9
+ /**
10
+ * Identity function we use to defeat the type system of Typescript and preserve
11
+ * the property keys.
12
+ * @param property
13
+ * @group Builder
14
+ */
15
+ export declare function buildProperty<T extends CMSType = CMSType, P extends PropertyOrBuilder<T> = PropertyOrBuilder<T>, M extends Record<string, any> = Record<string, any>>(property: P): P extends StringProperty ? StringProperty : P extends NumberProperty ? NumberProperty : P extends BooleanProperty ? BooleanProperty : P extends DateProperty ? DateProperty : P extends GeopointProperty ? GeopointProperty : P extends ReferenceProperty ? ReferenceProperty : P extends ArrayProperty ? ArrayProperty : P extends MapProperty ? MapProperty : P extends PropertyBuilder<T, M> ? PropertyBuilder<T, M> : never;
16
+ /**
17
+ * Identity function we use to defeat the type system of Typescript and preserve
18
+ * the properties keys.
19
+ * @param properties
20
+ * @group Builder
21
+ */
22
+ export declare function buildProperties<M extends Record<string, any>>(properties: PropertiesOrBuilders<M>): PropertiesOrBuilders<M>;
23
+ /**
24
+ * Identity function we use to defeat the type system of Typescript and preserve
25
+ * the properties keys.
26
+ * @param propertiesOrBuilder
27
+ * @group Builder
28
+ */
29
+ export declare function buildPropertiesOrBuilder<M extends Record<string, any>>(propertiesOrBuilder: PropertiesOrBuilders<M>): PropertiesOrBuilders<M>;
30
+ /**
31
+ * Identity function we use to defeat the type system of Typescript and preserve
32
+ * the properties keys.
33
+ * @param enumValues
34
+ * @group Builder
35
+ */
36
+ export declare function buildEnumValues(enumValues: EnumValues): EnumValues;
37
+ /**
38
+ * Identity function we use to defeat the type system of Typescript and preserve
39
+ * the properties keys.
40
+ * @param enumValueConfig
41
+ * @group Builder
42
+ */
43
+ export declare function buildEnumValueConfig(enumValueConfig: EnumValueConfig): EnumValueConfig;
44
+ /**
45
+ * Identity function we use to defeat the type system of Typescript and preserve
46
+ * the properties keys.
47
+ * @param callbacks
48
+ * @group Builder
49
+ */
50
+ export declare function buildEntityCallbacks<M extends Record<string, any> = any>(callbacks: EntityCallbacks<M>): EntityCallbacks<M>;
51
+ /**
52
+ * Identity function we use to defeat the type system of Typescript and build
53
+ * additional field delegates views with all its properties
54
+ * @param additionalFieldDelegate
55
+ * @group Builder
56
+ */
57
+ export declare function buildAdditionalFieldDelegate<M extends Record<string, any>, UserType extends User = User>(additionalFieldDelegate: AdditionalFieldDelegate<M, UserType>): AdditionalFieldDelegate<M, UserType>;
58
+ /**
59
+ * Identity function we use to defeat the type system of Typescript and build
60
+ * additional field delegates views with all its properties
61
+ * @param propertyConfig
62
+ * @group Builder
63
+ */
64
+ export declare function buildFieldConfig<T extends CMSType = CMSType>(propertyConfig: PropertyConfig<T>): PropertyConfig<T>;
@@ -19,3 +19,4 @@ export * from "./debounce";
19
19
  export * from "./flatten_object";
20
20
  export * from "./make_properties_editable";
21
21
  export * from "./join_collections";
22
+ export * from "./builders";
@@ -7,3 +7,4 @@ export declare function removeFunctions(o: object | undefined): any;
7
7
  export declare function getHashValue<T>(v: T): any;
8
8
  export declare function removeUndefined(value: any, removeEmptyStrings?: boolean): any;
9
9
  export declare function isEmptyObject(obj: object): boolean;
10
+ export declare function removePropsIfExisting(source: any, comparison: any): any;
package/package.json CHANGED
@@ -1,141 +1,141 @@
1
1
  {
2
- "name": "@firecms/core",
3
- "version": "3.0.0-alpha.35",
4
- "type": "module",
5
- "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
- "funding": {
7
- "url": "https://github.com/sponsors/firecmsco"
8
- },
9
- "author": "FireCMS",
10
- "license": "MIT",
11
- "repository": "git@github.com:FireCMSco/firecms.git",
12
- "main": "./dist/index.umd.js",
13
- "module": "./dist/index.es.js",
14
- "types": "./dist/index.d.ts",
15
- "source": "src/index.ts",
16
- "engines": {
17
- "node": ">=14"
18
- },
19
- "exports": {
20
- ".": {
21
- "import": "./dist/index.es.js",
22
- "require": "./dist/index.umd.js",
23
- "types": "./dist/index.d.ts"
2
+ "name": "@firecms/core",
3
+ "version": "3.0.0-alpha.37",
4
+ "description": "Awesome Firebase/Firestore-based headless open-source CMS",
5
+ "funding": {
6
+ "url": "https://github.com/sponsors/firecmsco"
24
7
  },
25
- "./package.json": "./package.json"
26
- },
27
- "keywords": [
28
- "firebase",
29
- "cms",
30
- "admin",
31
- "admin panel",
32
- "firebase panel",
33
- "firestore",
34
- "headless",
35
- "headless cms",
36
- "content manager"
37
- ],
38
- "scripts": {
39
- "watch": "vite build --watch",
40
- "build": "vite build && tsc --emitDeclarationOnly",
41
- "prepublishOnly": "run-s build",
42
- "createTag": "PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags",
43
- "test:lint": "eslint \"src/**\" --quiet",
44
- "test": "jest",
45
- "clean": "rm -rf dist && find ./src -name '*.js' -type f | xargs rm -f",
46
- "generateIcons": "ts-node --esm src/icons/generateIcons.ts"
47
- },
48
- "dependencies": {
49
- "@date-io/date-fns": "^2.17.0",
50
- "@fontsource/ibm-plex-mono": "^5.0.8",
51
- "@fontsource/roboto": "^5.0.8",
52
- "@hello-pangea/dnd": "^16.3.0",
53
- "@material-design-icons/font": "^0.14.13",
54
- "@radix-ui/react-checkbox": "^1.0.4",
55
- "@radix-ui/react-collapsible": "^1.0.3",
56
- "@radix-ui/react-dialog": "^1.0.5",
57
- "@radix-ui/react-dropdown-menu": "^2.0.6",
58
- "@radix-ui/react-popover": "^1.0.7",
59
- "@radix-ui/react-portal": "^1.0.4",
60
- "@radix-ui/react-scroll-area": "^1.0.5",
61
- "@radix-ui/react-select": "^1.2.2",
62
- "@radix-ui/react-switch": "^1.0.3",
63
- "@radix-ui/react-tabs": "^1.0.4",
64
- "@radix-ui/react-tooltip": "^1.0.7",
65
- "cmdk": "^0.2.0",
66
- "date-fns": "^2.30.0",
67
- "formik": "^2.4.5",
68
- "history": "^5.3.0",
69
- "js-search": "^2.0.1",
70
- "markdown-it": "^13.0.2",
71
- "notistack": "^3.0.1",
72
- "object-hash": "^3.0.0",
73
- "react-datepicker": "^4.21.0",
74
- "react-dropzone": "^14.2.3",
75
- "react-fast-compare": "^3.2.2",
76
- "react-image-file-resizer": "^0.4.8",
77
- "react-markdown-editor-lite": "^1.3.4",
78
- "react-transition-group": "^4.4.5",
79
- "react-use-measure": "^2.1.1",
80
- "react-window": "^1.8.9",
81
- "tailwind-merge": "^1.14.0",
82
- "typeface-rubik": "^1.1.13",
83
- "yup": "^0.32.11"
84
- },
85
- "peerDependencies": {
86
- "algoliasearch": "^4.13.0",
87
- "firebase": "^10.4.0",
88
- "react": "^18.2.0",
89
- "react-dom": "^18.2.0",
90
- "react-router": "^6.2.0",
91
- "react-router-dom": "^6.2.0"
92
- },
93
- "eslintConfig": {
94
- "extends": [
95
- "react-app",
96
- "react-app/jest"
97
- ]
98
- },
99
- "devDependencies": {
100
- "@jest/globals": "^29.7.0",
101
- "@testing-library/jest-dom": "^5.17.0",
102
- "@testing-library/react": "^14.0.0",
103
- "@testing-library/user-event": "^14.5.1",
104
- "@types/jest": "^29.5.6",
105
- "@types/node": "^20.8.9",
106
- "@types/object-hash": "^3.0.5",
107
- "@types/react": "^18.2.33",
108
- "@types/react-dom": "^18.2.14",
109
- "@types/react-measure": "^2.0.10",
110
- "@typescript-eslint/eslint-plugin": "^5.62.0",
111
- "@typescript-eslint/parser": "^5.62.0",
112
- "@vitejs/plugin-react": "^4.1.0",
113
- "algoliasearch": "^4.20.0",
114
- "cross-env": "^7.0.3",
115
- "eslint": "^8.52.0",
116
- "eslint-config-standard": "^17.1.0",
117
- "eslint-plugin-import": "^2.29.0",
118
- "eslint-plugin-n": "^15.7.0",
119
- "eslint-plugin-promise": "^6.1.1",
120
- "eslint-plugin-react": "^7.33.2",
121
- "eslint-plugin-react-hooks": "^4.6.0",
122
- "firebase": "^10.5.2",
123
- "jest": "^29.7.0",
124
- "npm-run-all": "^4.1.5",
125
- "react-router": "^6.17.0",
126
- "react-router-dom": "^6.17.0",
127
- "ts-jest": "^29.1.1",
128
- "ts-node": "^10.9.1",
129
- "tsd": "^0.28.1",
130
- "typescript": "^5.3.0",
131
- "vite": "^4.5.0"
132
- },
133
- "files": [
134
- "dist",
135
- "src"
136
- ],
137
- "gitHead": "f0f3ef616f13176166c193f98b8198f7fa53a1d2",
138
- "publishConfig": {
139
- "access": "public"
140
- }
8
+ "author": "FireCMS",
9
+ "license": "MIT",
10
+ "repository": "git@github.com:FireCMSco/firecms.git",
11
+ "main": "./dist/index.umd.js",
12
+ "module": "./dist/index.es.js",
13
+ "types": "./dist/index.d.ts",
14
+ "source": "src/index.ts",
15
+ "engines": {
16
+ "node": ">=14"
17
+ },
18
+ "exports": {
19
+ ".": {
20
+ "import": "./dist/index.es.js",
21
+ "require": "./dist/index.umd.js",
22
+ "types": "./dist/index.d.ts"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "keywords": [
27
+ "firebase",
28
+ "cms",
29
+ "admin",
30
+ "admin panel",
31
+ "firebase panel",
32
+ "firestore",
33
+ "headless",
34
+ "headless cms",
35
+ "content manager"
36
+ ],
37
+ "scripts": {
38
+ "watch": "vite build --watch",
39
+ "build": "vite build && tsc --emitDeclarationOnly",
40
+ "prepublishOnly": "run-s build",
41
+ "createTag": "PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags",
42
+ "test:lint": "eslint \"src/**\" --quiet",
43
+ "test": "jest",
44
+ "clean": "rm -rf dist && find ./src -name '*.js' -type f | xargs rm -f",
45
+ "generateIcons": "ts-node --esm src/icons/generateIcons.ts"
46
+ },
47
+ "dependencies": {
48
+ "@date-io/date-fns": "^2.17.0",
49
+ "@fontsource/ibm-plex-mono": "^5.0.8",
50
+ "@fontsource/roboto": "^5.0.8",
51
+ "@hello-pangea/dnd": "^16.3.0",
52
+ "@material-design-icons/font": "^0.14.13",
53
+ "@radix-ui/react-checkbox": "^1.0.4",
54
+ "@radix-ui/react-collapsible": "^1.0.3",
55
+ "@radix-ui/react-dialog": "^1.0.5",
56
+ "@radix-ui/react-dropdown-menu": "^2.0.6",
57
+ "@radix-ui/react-popover": "^1.0.7",
58
+ "@radix-ui/react-portal": "^1.0.4",
59
+ "@radix-ui/react-scroll-area": "^1.0.5",
60
+ "@radix-ui/react-select": "^1.2.2",
61
+ "@radix-ui/react-switch": "^1.0.3",
62
+ "@radix-ui/react-tabs": "^1.0.4",
63
+ "@radix-ui/react-tooltip": "^1.0.7",
64
+ "cmdk": "^0.2.0",
65
+ "date-fns": "^2.30.0",
66
+ "formik": "^2.4.5",
67
+ "history": "^5.3.0",
68
+ "js-search": "^2.0.1",
69
+ "markdown-it": "^13.0.2",
70
+ "notistack": "^3.0.1",
71
+ "object-hash": "^3.0.0",
72
+ "react-datepicker": "^4.21.0",
73
+ "react-dropzone": "^14.2.3",
74
+ "react-fast-compare": "^3.2.2",
75
+ "react-image-file-resizer": "^0.4.8",
76
+ "react-markdown-editor-lite": "^1.3.4",
77
+ "react-remove-scroll": "^2.5.6",
78
+ "react-transition-group": "^4.4.5",
79
+ "react-use-measure": "^2.1.1",
80
+ "react-window": "^1.8.9",
81
+ "tailwind-merge": "^1.14.0",
82
+ "typeface-rubik": "^1.1.13",
83
+ "yup": "^0.32.11"
84
+ },
85
+ "peerDependencies": {
86
+ "algoliasearch": "^4.13.0",
87
+ "firebase": "^10.5.2",
88
+ "react": "^18.2.0",
89
+ "react-dom": "^18.2.0",
90
+ "react-router": "^6.2.0",
91
+ "react-router-dom": "^6.2.0"
92
+ },
93
+ "eslintConfig": {
94
+ "extends": [
95
+ "react-app",
96
+ "react-app/jest"
97
+ ]
98
+ },
99
+ "devDependencies": {
100
+ "@jest/globals": "^29.7.0",
101
+ "@testing-library/jest-dom": "^5.17.0",
102
+ "@testing-library/react": "^14.0.0",
103
+ "@testing-library/user-event": "^14.5.1",
104
+ "@types/jest": "^29.5.6",
105
+ "@types/node": "^20.8.9",
106
+ "@types/object-hash": "^3.0.5",
107
+ "@types/react": "^18.2.33",
108
+ "@types/react-dom": "^18.2.14",
109
+ "@types/react-measure": "^2.0.10",
110
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
111
+ "@typescript-eslint/parser": "^5.62.0",
112
+ "@vitejs/plugin-react": "^4.1.0",
113
+ "algoliasearch": "^4.20.0",
114
+ "cross-env": "^7.0.3",
115
+ "eslint": "^8.52.0",
116
+ "eslint-config-standard": "^17.1.0",
117
+ "eslint-plugin-import": "^2.29.0",
118
+ "eslint-plugin-n": "^15.7.0",
119
+ "eslint-plugin-promise": "^6.1.1",
120
+ "eslint-plugin-react": "^7.33.2",
121
+ "eslint-plugin-react-hooks": "^4.6.0",
122
+ "firebase": "^10.5.2",
123
+ "jest": "^29.7.0",
124
+ "npm-run-all": "^4.1.5",
125
+ "react-router": "^6.17.0",
126
+ "react-router-dom": "^6.17.0",
127
+ "ts-jest": "^29.1.1",
128
+ "ts-node": "^10.9.1",
129
+ "tsd": "^0.28.1",
130
+ "typescript": "^5.3.0",
131
+ "vite": "^4.5.0"
132
+ },
133
+ "files": [
134
+ "dist",
135
+ "src"
136
+ ],
137
+ "gitHead": "bfe341a3a8e3d2b33d4dc3f48fabc350eccace1b",
138
+ "publishConfig": {
139
+ "access": "public"
140
+ }
141
141
  }
@@ -51,7 +51,7 @@ export function DeleteEntityDialog<M extends Record<string, any>>({
51
51
  const resolvedCollection = useMemo(() => resolveCollection<M>({
52
52
  collection,
53
53
  path,
54
- fields: context.fields
54
+ fields: context.propertyConfigs
55
55
  }), [collection, path]);
56
56
 
57
57
  const handleCancel = useCallback(() => {
@@ -160,7 +160,7 @@ export const PropertyTableCell = React.memo<PropertyTableCellProps<any, any>>(
160
160
  .catch((e) => {
161
161
  setError(e);
162
162
  });
163
- }, [internalValue, validation]);
163
+ }, [internalValue, validation, propertyKey, property, entity]);
164
164
 
165
165
  const updateValue = (newValue: any | null) => {
166
166
 
@@ -454,6 +454,7 @@ function areEqual(prevProps: PropertyTableCellProps<any, any>, nextProps: Proper
454
454
  prevProps.width === nextProps.width &&
455
455
  equal(prevProps.property, nextProps.property) &&
456
456
  equal(prevProps.value, nextProps.value) &&
457
+ equal(prevProps.entity.id, nextProps.entity.id) &&
457
458
  equal(prevProps.entity.values, nextProps.entity.values)
458
459
  ;
459
460
  }
@@ -100,7 +100,7 @@ export function PopupFormFieldInternal<M extends Record<string, any>>({
100
100
  path,
101
101
  values: internalValue,
102
102
  entityId,
103
- fields: fireCMSContext.fields
103
+ fields: fireCMSContext.propertyConfigs
104
104
  })
105
105
  : undefined;
106
106
 
@@ -52,7 +52,7 @@ import { Button, cn, IconButton, Markdown, Popover, TextField, Tooltip, Typograp
52
52
  import { Skeleton } from "../../ui/Skeleton";
53
53
  import { setIn } from "formik";
54
54
  import { getSubcollectionColumnId } from "../EntityCollectionTable/internal/common";
55
- import { KeyboardTabIcon, SearchIcon } from "../../icons";
55
+ import { AddIcon, KeyboardTabIcon, SearchIcon } from "../../icons";
56
56
  import { useColumnIds } from "./useColumnsIds";
57
57
  import { PopupFormField } from "../EntityCollectionTable/internal/popup_field/PopupFormField";
58
58
  import { GetPropertyForProps } from "../EntityCollectionTable/EntityCollectionTableProps";
@@ -321,7 +321,7 @@ export const EntityCollectionView = React.memo(
321
321
  const resolvedCollection = useMemo(() => resolveCollection<M>({
322
322
  collection,
323
323
  path: fullPath,
324
- fields: context.fields
324
+ fields: context.propertyConfigs
325
325
  }), [collection, fullPath]);
326
326
 
327
327
  const getPropertyFor = useCallback(({
@@ -344,9 +344,9 @@ export const EntityCollectionView = React.memo(
344
344
  propertyValue,
345
345
  values: entity.values,
346
346
  entityId: entity.id,
347
- fields: context.fields
347
+ fields: context.propertyConfigs
348
348
  });
349
- }, [collection.properties, context.fields, fullPath, resolvedCollection.properties]);
349
+ }, [collection.properties, context.propertyConfigs, fullPath, resolvedCollection.properties]);
350
350
 
351
351
  const displayedColumnIds = useColumnIds(resolvedCollection, true);
352
352
 
@@ -584,6 +584,7 @@ export const EntityCollectionView = React.memo(
584
584
  onClick={onNewClick}
585
585
  className="mt-4"
586
586
  >
587
+ <AddIcon/>
587
588
  Create your first entity
588
589
  </Button>
589
590
  </div>
@@ -32,7 +32,7 @@ export function EntityPreview<M extends Record<string, any>>(
32
32
  path,
33
33
  entityId: entity.id,
34
34
  values: entity.values,
35
- fields: context.fields
35
+ fields: context.propertyConfigs
36
36
  }), [collection, path, entity]);
37
37
 
38
38
  const appConfig: FireCMSContext | undefined = useFireCMSContext();
@@ -27,6 +27,7 @@ export function ErrorView({
27
27
  tooltip
28
28
  }: ErrorViewProps): React.ReactElement {
29
29
  const component = error instanceof Error ? error.message : error;
30
+ console.log("ErrorView", error)
30
31
 
31
32
  const body = (
32
33
  <div
@@ -50,7 +50,6 @@ export const FireCMSAppBar = function FireCMSAppBar({
50
50
  style,
51
51
  user: userProp
52
52
  }: FireCMSAppBarProps) {
53
-
54
53
  const navigation = useNavigationContext();
55
54
 
56
55
  const authController = useAuthController();
@@ -77,6 +77,7 @@ export function DefaultHomePage({
77
77
  }
78
78
 
79
79
  let additionalPluginChildrenStart: React.ReactNode | undefined;
80
+ let additionalPluginChildrenEnd: React.ReactNode | undefined;
80
81
  let additionalPluginSections: React.ReactNode | undefined;
81
82
  if (context.plugins) {
82
83
  const sectionProps: PluginGenericProps = {
@@ -101,6 +102,13 @@ export function DefaultHomePage({
101
102
  return <div key={`plugin_children_start_${i}`}>{plugin.homePage!.additionalChildrenStart}</div>;
102
103
  })}
103
104
  </div>;
105
+
106
+ additionalPluginChildrenEnd = <div className={"flex flex-col gap-2"}>
107
+ {context.plugins.filter(plugin => plugin.homePage?.additionalChildrenEnd)
108
+ .map((plugin, i) => {
109
+ return <div key={`plugin_children_start_${i}`}>{plugin.homePage!.additionalChildrenEnd}</div>;
110
+ })}
111
+ </div>;
104
112
  }
105
113
 
106
114
  return (
@@ -178,6 +186,8 @@ export function DefaultHomePage({
178
186
 
179
187
  {additionalPluginSections}
180
188
 
189
+ {additionalPluginChildrenEnd}
190
+
181
191
  {additionalChildrenEnd}
182
192
 
183
193
  </Container>
@@ -251,8 +251,8 @@ export function ReferenceSelectionInner<M extends Record<string, any>>(
251
251
  collection: collection,
252
252
  path: fullPath,
253
253
  values: {},
254
- fields: context.fields
255
- }), [collection, context.fields, fullPath]);
254
+ fields: context.propertyConfigs
255
+ }), [collection, context.propertyConfigs, fullPath]);
256
256
 
257
257
  // eslint-disable-next-line react-hooks/rules-of-hooks
258
258
  const displayedColumnIds = useColumnIds(resolvedCollection, false);
@@ -30,7 +30,6 @@ const DEFAULT_COLLECTION_PATH = "/c";
30
30
  * internal contexts and hooks.
31
31
  *
32
32
  * You only need to use this component if you are building a custom app.
33
- * In most cases you can just use the {@link FirebaseCMSApp} component.
34
33
  *
35
34
  * @constructor
36
35
  * @group Core
@@ -53,7 +52,7 @@ export function FireCMS<UserType extends User, EC extends EntityCollection>(prop
53
52
  baseCollectionPath = DEFAULT_COLLECTION_PATH,
54
53
  plugins,
55
54
  onAnalyticsEvent,
56
- fields,
55
+ propertyConfigs,
57
56
  entityViews,
58
57
  components
59
58
  } = props;
@@ -74,7 +73,9 @@ export function FireCMS<UserType extends User, EC extends EntityCollection>(prop
74
73
  const sideDialogsController = useBuildSideDialogsController();
75
74
  const sideEntityController = useBuildSideEntityController(navigation, sideDialogsController);
76
75
 
77
- const loading = authController.initialLoading || navigation.loading || (plugins?.some(p => p.loading) ?? false);
76
+ const pluginsLoading = plugins?.some(p => p.loading) ?? false;
77
+
78
+ const loading = authController.initialLoading || navigation.loading || pluginsLoading;
78
79
 
79
80
  const context: Partial<FireCMSContext> = useMemo(() => ({
80
81
  entityLinkBuilder,
@@ -83,9 +84,9 @@ export function FireCMS<UserType extends User, EC extends EntityCollection>(prop
83
84
  plugins,
84
85
  onAnalyticsEvent,
85
86
  entityViews: entityViews ?? [],
86
- fields: fields ?? {},
87
+ propertyConfigs: propertyConfigs ?? {},
87
88
  components
88
- }), [dateTimeFormat, locale, plugins, entityViews, fields, components]);
89
+ }), [dateTimeFormat, locale, plugins, entityViews, propertyConfigs, components]);
89
90
 
90
91
  if (navigation.navigationLoadingError) {
91
92
  return (
@@ -157,7 +157,7 @@ function EntityFormInternal<M extends Record<string, any>>({
157
157
  collection: inputCollection,
158
158
  path,
159
159
  values: entity?.values,
160
- fields: context.fields
160
+ fields: context.propertyConfigs
161
161
  }), [entity?.values, path]);
162
162
 
163
163
  const mustSetCustomId: boolean = (status === "new" || status === "copy") &&
@@ -220,7 +220,7 @@ function EntityFormInternal<M extends Record<string, any>>({
220
220
  entityId,
221
221
  values: internalValues,
222
222
  previousValues: initialValues,
223
- fields: context.fields
223
+ fields: context.propertyConfigs
224
224
  });
225
225
 
226
226
  const onIdUpdate = collection.callbacks?.onIdUpdate;
@@ -373,7 +373,7 @@ function EntityFormInternal<M extends Record<string, any>>({
373
373
  collection: resolveCollection({
374
374
  collection,
375
375
  path,
376
- fields: context.fields
376
+ fields: context.propertyConfigs
377
377
  }),
378
378
  entityId,
379
379
  path,