@firecms/core 3.0.0-canary.179 → 3.0.0-canary.180
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 +121 -113
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +121 -113
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/core/EntityEditView.tsx +0 -1
- package/src/core/EntitySidePanel.tsx +7 -9
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -0
- package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
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.180",
|
|
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.
|
|
54
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
55
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
53
|
+
"@firecms/editor": "^3.0.0-canary.180",
|
|
54
|
+
"@firecms/formex": "^3.0.0-canary.180",
|
|
55
|
+
"@firecms/ui": "^3.0.0-canary.180",
|
|
56
56
|
"@hello-pangea/dnd": "^17.0.0",
|
|
57
57
|
"@radix-ui/react-portal": "^1.1.3",
|
|
58
58
|
"clsx": "^2.1.1",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"dist",
|
|
105
105
|
"src"
|
|
106
106
|
],
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "bf93825b26a5eb5a74ae137a935d4c0747135806",
|
|
108
108
|
"publishConfig": {
|
|
109
109
|
"access": "public"
|
|
110
110
|
},
|
|
@@ -332,7 +332,6 @@ export function EntityEditViewInner<M extends Record<string, any>>({
|
|
|
332
332
|
}, [authController, usedEntity, status]);
|
|
333
333
|
|
|
334
334
|
const readOnly = !canEdit;
|
|
335
|
-
console.log("readOnly", readOnly);
|
|
336
335
|
|
|
337
336
|
const onPreSaveHookError = useCallback((e: Error) => {
|
|
338
337
|
setSaving(false);
|
|
@@ -62,20 +62,18 @@ export function EntitySidePanel(props: EntitySidePanelProps) {
|
|
|
62
62
|
}, [navigationController, props.path]);
|
|
63
63
|
|
|
64
64
|
const collection = useMemo(() => {
|
|
65
|
-
if (
|
|
66
|
-
|
|
65
|
+
if (props.collection) {
|
|
66
|
+
return props.collection;
|
|
67
|
+
}
|
|
67
68
|
|
|
68
69
|
const registryCollection = navigationController.getCollection(props.path);
|
|
69
70
|
if (registryCollection) {
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
if (!usedCollection) {
|
|
73
|
-
console.error("ERROR: No collection found in path `", props.path, "`. Entity id: ", props.entityId);
|
|
74
|
-
throw Error("ERROR: No collection found in path `" + props.path + "`. Make sure you have defined a collection for this path in the root navigation.");
|
|
71
|
+
return registryCollection;
|
|
75
72
|
}
|
|
76
73
|
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
console.error("ERROR: No collection found in path `", props.path, "`. Entity id: ", props.entityId);
|
|
75
|
+
throw Error("ERROR: No collection found in path `" + props.path + "`. Make sure you have defined a collection for this path in the root navigation.");
|
|
76
|
+
}, [navigationController, props.collection]);
|
|
79
77
|
|
|
80
78
|
useEffect(() => {
|
|
81
79
|
function beforeunload(e: any) {
|
|
@@ -5,7 +5,7 @@ import { ErrorBoundary } from "../../components";
|
|
|
5
5
|
import { getIconForProperty, isHidden, isReadOnly, pick } from "../../util";
|
|
6
6
|
import { FieldHelperText, LabelWithIconAndTooltip } from "../components";
|
|
7
7
|
import { PropertyFieldBinding } from "../PropertyFieldBinding";
|
|
8
|
-
import { ExpandablePanel, InputLabel, Select, SelectItem } from "@firecms/ui";
|
|
8
|
+
import { cls, ExpandablePanel, InputLabel, Select, SelectItem } from "@firecms/ui";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Field that renders the children property fields
|
|
@@ -52,7 +52,7 @@ export function MapFieldBinding({
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
const mapFormView = <>
|
|
55
|
-
<div className="py-1 flex flex-col space-y-2">
|
|
55
|
+
<div className={cls("py-1 flex flex-col space-y-2", minimalistView && property.widthPercentage !== undefined ? "mt-8" : undefined)}>
|
|
56
56
|
{Object.entries(mapProperties)
|
|
57
57
|
.filter(([_, property]) => !isHidden(property))
|
|
58
58
|
.map(([entryKey, childProperty], index) => {
|