@firecms/core 3.0.0-rc.3 → 3.0.0-rc.4
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/form/PropertyFieldBinding.d.ts +1 -1
- package/dist/index.es.js +20 -21
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +20 -21
- package/dist/index.umd.js.map +1 -1
- package/dist/types/fields.d.ts +8 -0
- package/package.json +5 -5
- package/src/components/SelectableTable/SelectableTable.tsx +0 -12
- package/src/form/EntityForm.tsx +1 -1
- package/src/form/PropertyFieldBinding.tsx +4 -4
- package/src/form/field_bindings/BlockFieldBinding.tsx +1 -0
- package/src/types/fields.tsx +10 -0
package/dist/types/fields.d.ts
CHANGED
|
@@ -67,6 +67,10 @@ export interface FieldProps<T extends CMSType = any, CustomProps = any, M extend
|
|
|
67
67
|
* Is this field part of an array
|
|
68
68
|
*/
|
|
69
69
|
partOfArray?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Is this field part of a block
|
|
72
|
+
*/
|
|
73
|
+
partOfBlock?: boolean;
|
|
70
74
|
/**
|
|
71
75
|
* Display the child properties directly, without being wrapped in an
|
|
72
76
|
* extendable panel. Note that this will also hide the title of this property.
|
|
@@ -178,6 +182,10 @@ export interface PropertyFieldBindingProps<T extends CMSType, M extends Record<s
|
|
|
178
182
|
* Is this field part of an array
|
|
179
183
|
*/
|
|
180
184
|
partOfArray?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Is this field part of a block
|
|
187
|
+
*/
|
|
188
|
+
partOfBlock?: boolean;
|
|
181
189
|
/**
|
|
182
190
|
* Display the child properties directly, without being wrapped in an
|
|
183
191
|
* extendable panel. Note that this will also hide the title of this property.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-rc.
|
|
4
|
+
"version": "3.0.0-rc.4",
|
|
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-rc.
|
|
57
|
-
"@firecms/formex": "^3.0.0-rc.
|
|
58
|
-
"@firecms/ui": "^3.0.0-rc.
|
|
56
|
+
"@firecms/editor": "^3.0.0-rc.4",
|
|
57
|
+
"@firecms/formex": "^3.0.0-rc.4",
|
|
58
|
+
"@firecms/ui": "^3.0.0-rc.4",
|
|
59
59
|
"@radix-ui/react-portal": "^1.1.9",
|
|
60
60
|
"clsx": "^2.1.1",
|
|
61
61
|
"compressorjs": "^1.2.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"dist",
|
|
109
109
|
"src"
|
|
110
110
|
],
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "5fab14c8d1fff7dd606512b5d9b3f1842e601f8c",
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
@@ -327,15 +327,3 @@ function createFilterField({
|
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
function filterableProperty(property: ResolvedProperty, partOfArray = false): boolean {
|
|
331
|
-
if (partOfArray) {
|
|
332
|
-
return ["string", "number", "date", "reference"].includes(property.dataType);
|
|
333
|
-
}
|
|
334
|
-
if (property.dataType === "array") {
|
|
335
|
-
if (property.of)
|
|
336
|
-
return filterableProperty(property.of, true);
|
|
337
|
-
else
|
|
338
|
-
return false;
|
|
339
|
-
}
|
|
340
|
-
return ["string", "number", "boolean", "date", "reference", "array"].includes(property.dataType);
|
|
341
|
-
}
|
package/src/form/EntityForm.tsx
CHANGED
|
@@ -857,7 +857,7 @@ export function EntityForm<M extends Record<string, any>>({
|
|
|
857
857
|
/>}
|
|
858
858
|
|
|
859
859
|
{formex.dirty
|
|
860
|
-
? <Tooltip title={"
|
|
860
|
+
? <Tooltip title={"This form has been modified"}>
|
|
861
861
|
<Chip size={"small"} className={"py-1"} colorScheme={"orangeDarker"}>
|
|
862
862
|
<EditIcon size={"smallest"}/>
|
|
863
863
|
</Chip>
|
|
@@ -83,6 +83,7 @@ function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Rec
|
|
|
83
83
|
underlyingValueHasChanged,
|
|
84
84
|
disabled: disabledProp,
|
|
85
85
|
partOfArray,
|
|
86
|
+
partOfBlock,
|
|
86
87
|
minimalistView,
|
|
87
88
|
autoFocus,
|
|
88
89
|
index,
|
|
@@ -93,10 +94,6 @@ function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Rec
|
|
|
93
94
|
const authController = useAuthController();
|
|
94
95
|
const customizationController = useCustomizationController();
|
|
95
96
|
|
|
96
|
-
if(propertyKey === "created_by"){
|
|
97
|
-
console.log("Rendering field for created_by", {propertyKey, property, context});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
97
|
return (
|
|
101
98
|
<Field
|
|
102
99
|
key={propertyKey}
|
|
@@ -168,6 +165,7 @@ function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Rec
|
|
|
168
165
|
context,
|
|
169
166
|
disabled,
|
|
170
167
|
partOfArray,
|
|
168
|
+
partOfBlock,
|
|
171
169
|
minimalistView,
|
|
172
170
|
autoFocus,
|
|
173
171
|
size,
|
|
@@ -199,6 +197,7 @@ function FieldInternal<T extends CMSType, CustomProps, M extends Record<string,
|
|
|
199
197
|
includeDescription,
|
|
200
198
|
underlyingValueHasChanged,
|
|
201
199
|
partOfArray,
|
|
200
|
+
partOfBlock,
|
|
202
201
|
minimalistView,
|
|
203
202
|
autoFocus,
|
|
204
203
|
context,
|
|
@@ -261,6 +260,7 @@ function FieldInternal<T extends CMSType, CustomProps, M extends Record<string,
|
|
|
261
260
|
disabled: disabled ?? false,
|
|
262
261
|
underlyingValueHasChanged: underlyingValueHasChanged ?? false,
|
|
263
262
|
partOfArray: partOfArray ?? false,
|
|
263
|
+
partOfBlock: partOfBlock ?? false,
|
|
264
264
|
minimalistView: minimalistView ?? false,
|
|
265
265
|
autoFocus: autoFocus ?? false,
|
|
266
266
|
customProps: customFieldProps,
|
package/src/types/fields.tsx
CHANGED
|
@@ -81,6 +81,11 @@ export interface FieldProps<T extends CMSType = any, CustomProps = any, M extend
|
|
|
81
81
|
*/
|
|
82
82
|
partOfArray?: boolean;
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Is this field part of a block
|
|
86
|
+
*/
|
|
87
|
+
partOfBlock?: boolean;
|
|
88
|
+
|
|
84
89
|
/**
|
|
85
90
|
* Display the child properties directly, without being wrapped in an
|
|
86
91
|
* extendable panel. Note that this will also hide the title of this property.
|
|
@@ -220,6 +225,11 @@ export interface PropertyFieldBindingProps<T extends CMSType, M extends Record<s
|
|
|
220
225
|
*/
|
|
221
226
|
partOfArray?: boolean;
|
|
222
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Is this field part of a block
|
|
230
|
+
*/
|
|
231
|
+
partOfBlock?: boolean;
|
|
232
|
+
|
|
223
233
|
/**
|
|
224
234
|
* Display the child properties directly, without being wrapped in an
|
|
225
235
|
* extendable panel. Note that this will also hide the title of this property.
|