@firecms/core 3.0.0-canary.155 → 3.0.0-canary.157

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.155",
4
+ "version": "3.0.0-canary.157",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -50,9 +50,9 @@
50
50
  "./package.json": "./package.json"
51
51
  },
52
52
  "dependencies": {
53
- "@firecms/editor": "^3.0.0-canary.155",
54
- "@firecms/formex": "^3.0.0-canary.155",
55
- "@firecms/ui": "^3.0.0-canary.155",
53
+ "@firecms/editor": "^3.0.0-canary.157",
54
+ "@firecms/formex": "^3.0.0-canary.157",
55
+ "@firecms/ui": "^3.0.0-canary.157",
56
56
  "@hello-pangea/dnd": "^17.0.0",
57
57
  "@radix-ui/react-portal": "^1.1.2",
58
58
  "clsx": "^2.1.1",
@@ -62,7 +62,7 @@
62
62
  "markdown-it": "^14.1.0",
63
63
  "notistack": "^3.0.1",
64
64
  "object-hash": "^3.0.0",
65
- "react-dropzone": "^14.2.10",
65
+ "react-dropzone": "^14.3.5",
66
66
  "react-fast-compare": "^3.2.2",
67
67
  "react-image-file-resizer": "^0.4.8",
68
68
  "react-transition-group": "^4.4.5",
@@ -74,39 +74,39 @@
74
74
  "firebase": "^10.5.2",
75
75
  "react": "^18.3.1",
76
76
  "react-dom": "^18.3.1",
77
- "react-router": "^6.25.1",
78
- "react-router-dom": "^6.25.1"
77
+ "react-router": "^6.28.0",
78
+ "react-router-dom": "^6.28.0"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@jest/globals": "^29.7.0",
82
82
  "@testing-library/react": "^16.0.1",
83
83
  "@testing-library/user-event": "^14.5.2",
84
84
  "@types/jest": "^29.5.14",
85
- "@types/node": "^20.16.11",
85
+ "@types/node": "^20.17.9",
86
86
  "@types/object-hash": "^3.0.6",
87
- "@types/react": "^18.3.12",
87
+ "@types/react": "^18.3.11",
88
88
  "@types/react-dom": "^18.3.1",
89
89
  "@types/react-measure": "^2.0.12",
90
- "@vitejs/plugin-react": "^4.3.3",
90
+ "@vitejs/plugin-react": "^4.3.4",
91
91
  "babel-plugin-react-compiler": "beta",
92
92
  "cross-env": "^7.0.3",
93
93
  "eslint-plugin-react-compiler": "beta",
94
94
  "firebase": "^10.14.1",
95
95
  "jest": "^29.7.0",
96
96
  "npm-run-all": "^4.1.5",
97
- "react-router": "^6.27.0",
98
- "react-router-dom": "^6.27.0",
97
+ "react-router": "^6.28.0",
98
+ "react-router-dom": "^6.28.0",
99
99
  "ts-jest": "^29.2.5",
100
100
  "ts-node": "^10.9.2",
101
101
  "tsd": "^0.31.2",
102
- "typescript": "^5.6.3",
103
- "vite": "^5.4.10"
102
+ "typescript": "^5.7.2",
103
+ "vite": "^5.4.11"
104
104
  },
105
105
  "files": [
106
106
  "dist",
107
107
  "src"
108
108
  ],
109
- "gitHead": "c9b71679d709242ff3a47ec56a0ecf980ec76564",
109
+ "gitHead": "5ffd61dd148d006a07ce6045495a1cf6616e6801",
110
110
  "publishConfig": {
111
111
  "access": "public"
112
112
  },
@@ -176,12 +176,14 @@ export const EntityCollectionTable = function EntityCollectionTable<M extends Re
176
176
  throw new Error("When using additional fields you need to provide a Builder or a value");
177
177
  }
178
178
 
179
- const child = Builder
179
+ const child: React.ReactNode = Builder
180
180
  ? <Builder entity={entity} context={context}/>
181
- : <>{additionalField.value?.({
182
- entity,
183
- context
184
- })}</>;
181
+ : <>
182
+ {additionalField.value?.({
183
+ entity,
184
+ context
185
+ })?.toString()}
186
+ </>;
185
187
 
186
188
  return (
187
189
  <EntityTableCell
@@ -96,9 +96,9 @@ export interface EntityEditViewProps<M extends Record<string, any>> {
96
96
  * side panel.
97
97
  */
98
98
  export function EntityEditView<M extends Record<string, any>, USER extends User>({
99
- entityId,
100
- ...props
101
- }: EntityEditViewProps<M>) {
99
+ entityId,
100
+ ...props
101
+ }: EntityEditViewProps<M>) {
102
102
  const {
103
103
  entity,
104
104
  dataLoading,
@@ -778,10 +778,12 @@ export function EntityEditViewInner<M extends Record<string, any>>({
778
778
 
779
779
  const child = Builder
780
780
  ? <Builder entity={entity} context={context}/>
781
- : <>{additionalField.value?.({
782
- entity,
783
- context
784
- })}</>;
781
+ : <>
782
+ {additionalField.value?.({
783
+ entity,
784
+ context
785
+ })?.toString()}
786
+ </>;
785
787
  return (
786
788
  <div>
787
789
  <LabelWithIconAndTooltip
@@ -110,7 +110,7 @@ export function KeyValuePreview({ value }: { value: any }) {
110
110
  return <div
111
111
  className="flex flex-col gap-1 w-full">
112
112
  {
113
- Object.entries(value).map(([key, childValue]) => (
113
+ Object.entries(value).map(([key, childValue]: [string, any]) => (
114
114
  <div
115
115
  key={`map_preview_table_${key}}`}
116
116
  className={cls(defaultBorderMixin, "last:border-b-0 border-b")}>
@@ -127,9 +127,9 @@ export function KeyValuePreview({ value }: { value: any }) {
127
127
  </div>
128
128
  <div
129
129
  className="flex-grow max-w-[75%]">
130
- {typeof childValue !== "object" && <Typography>
130
+ {childValue && ("toString" in childValue) && <Typography>
131
131
  <ErrorBoundary>
132
- {childValue && childValue.toString()}
132
+ {childValue.toString()}
133
133
  </ErrorBoundary>
134
134
  </Typography>}
135
135
  </div>