@firecms/core 3.0.0-canary.271 → 3.0.0-canary.273
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/index.es.js +20 -22
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +20 -22
- package/dist/index.umd.js.map +1 -1
- package/dist/types/entities.d.ts +5 -1
- package/package.json +5 -5
- package/src/components/HomePage/DefaultHomePage.tsx +0 -1
- package/src/components/HomePage/HomePageDnD.tsx +1 -0
- package/src/components/HomePage/RenameGroupDialog.tsx +9 -3
- package/src/components/common/useColumnsIds.tsx +1 -8
- package/src/types/entities.ts +7 -1
package/dist/types/entities.d.ts
CHANGED
|
@@ -42,7 +42,11 @@ export declare class EntityReference {
|
|
|
42
42
|
* to the root of the database).
|
|
43
43
|
*/
|
|
44
44
|
readonly path: string;
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Optional database ID where the entity is stored (if multiple databases are used)
|
|
47
|
+
*/
|
|
48
|
+
readonly databaseId?: string;
|
|
49
|
+
constructor(id: string, path: string, databaseId?: string);
|
|
46
50
|
get pathWithId(): string;
|
|
47
51
|
isEntityReference(): boolean;
|
|
48
52
|
}
|
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.
|
|
4
|
+
"version": "3.0.0-canary.273",
|
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@dnd-kit/core": "^6.3.1",
|
|
54
54
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
55
55
|
"@dnd-kit/sortable": "^10.0.0",
|
|
56
|
-
"@firecms/editor": "^3.0.0-canary.
|
|
57
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
58
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
56
|
+
"@firecms/editor": "^3.0.0-canary.273",
|
|
57
|
+
"@firecms/formex": "^3.0.0-canary.273",
|
|
58
|
+
"@firecms/ui": "^3.0.0-canary.273",
|
|
59
59
|
"@radix-ui/react-portal": "^1.1.9",
|
|
60
60
|
"clsx": "^2.1.1",
|
|
61
61
|
"date-fns": "^3.6.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"dist",
|
|
109
109
|
"src"
|
|
110
110
|
],
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "047306118e65e5187d7fc21a36652336b0092a00",
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, TextField } from "@firecms/ui";
|
|
3
3
|
|
|
4
4
|
interface RenameGroupDialogProps {
|
|
@@ -9,7 +9,13 @@ interface RenameGroupDialogProps {
|
|
|
9
9
|
onRename: (newName: string) => void;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function RenameGroupDialog({
|
|
12
|
+
export function RenameGroupDialog({
|
|
13
|
+
open,
|
|
14
|
+
initialName,
|
|
15
|
+
existingGroupNames,
|
|
16
|
+
onClose,
|
|
17
|
+
onRename
|
|
18
|
+
}: RenameGroupDialogProps) {
|
|
13
19
|
const [name, setName] = useState(initialName);
|
|
14
20
|
const [error, setError] = useState<string | null>(null);
|
|
15
21
|
const inputRef = useRef<HTMLInputElement | HTMLTextAreaElement | null>(null); // Create a ref for the input
|
|
@@ -86,7 +92,7 @@ export function RenameGroupDialog({ open, initialName, existingGroupNames, onClo
|
|
|
86
92
|
if (!open) return null;
|
|
87
93
|
|
|
88
94
|
return (
|
|
89
|
-
<Dialog open={open}
|
|
95
|
+
<Dialog open={open}>
|
|
90
96
|
<DialogTitle>Rename Group</DialogTitle>
|
|
91
97
|
<DialogContent>
|
|
92
98
|
<TextField
|
|
@@ -8,14 +8,7 @@ export const COLLECTION_GROUP_PARENT_ID = "collectionGroupParent";
|
|
|
8
8
|
export function useColumnIds<M extends Record<string, any>>(collection: ResolvedEntityCollection<M>, includeSubcollections: boolean): PropertyColumnConfig[] {
|
|
9
9
|
return useMemo(() => {
|
|
10
10
|
if (collection.propertiesOrder) {
|
|
11
|
-
|
|
12
|
-
if (collection.collectionGroup) {
|
|
13
|
-
propertyColumnConfigs.push({
|
|
14
|
-
key: COLLECTION_GROUP_PARENT_ID,
|
|
15
|
-
disabled: true
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return propertyColumnConfigs;
|
|
11
|
+
return hideAndExpandKeys(collection, collection.propertiesOrder);
|
|
19
12
|
}
|
|
20
13
|
return getDefaultColumnKeys(collection, includeSubcollections);
|
|
21
14
|
}, [collection, includeSubcollections]);
|
package/src/types/entities.ts
CHANGED
|
@@ -50,9 +50,15 @@ export class EntityReference {
|
|
|
50
50
|
*/
|
|
51
51
|
readonly path: string;
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Optional database ID where the entity is stored (if multiple databases are used)
|
|
55
|
+
*/
|
|
56
|
+
readonly databaseId?: string;
|
|
57
|
+
|
|
58
|
+
constructor(id: string, path: string, databaseId?: string) {
|
|
54
59
|
this.id = id;
|
|
55
60
|
this.path = path;
|
|
61
|
+
this.databaseId = databaseId;
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
get pathWithId() {
|