@firecms/collection_editor 3.0.0-canary.124 → 3.0.0-canary.126
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 +59 -60
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +59 -60
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +1 -1
- package/src/ui/collection_editor/properties/DateTimePropertyField.tsx +50 -47
- package/src/ui/collection_editor/templates/pages_template.ts +0 -5
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/collection_editor",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.126",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"source": "src/index.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@firecms/data_export": "^3.0.0-canary.
|
|
11
|
-
"@firecms/data_import": "^3.0.0-canary.
|
|
12
|
-
"@firecms/data_import_export": "^3.0.0-canary.
|
|
13
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
14
|
-
"@firecms/schema_inference": "^3.0.0-canary.
|
|
15
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
10
|
+
"@firecms/data_export": "^3.0.0-canary.126",
|
|
11
|
+
"@firecms/data_import": "^3.0.0-canary.126",
|
|
12
|
+
"@firecms/data_import_export": "^3.0.0-canary.126",
|
|
13
|
+
"@firecms/formex": "^3.0.0-canary.126",
|
|
14
|
+
"@firecms/schema_inference": "^3.0.0-canary.126",
|
|
15
|
+
"@firecms/ui": "^3.0.0-canary.126",
|
|
16
16
|
"json5": "^2.2.3",
|
|
17
17
|
"prism-react-renderer": "^2.3.1"
|
|
18
18
|
},
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "122cb2b218a404444b4580e8f561f671c8b785a9"
|
|
71
71
|
}
|
|
@@ -156,7 +156,7 @@ export function CollectionDetailsForm({
|
|
|
156
156
|
required
|
|
157
157
|
error={showErrors && Boolean(errors.name)}/>
|
|
158
158
|
<FieldCaption error={touched.name && Boolean(errors.name)}>
|
|
159
|
-
{touched.name && Boolean(errors.name) ? errors.name : "Name of
|
|
159
|
+
{touched.name && Boolean(errors.name) ? errors.name : "Name of this collection, usually a plural name (e.g. Products)"}
|
|
160
160
|
</FieldCaption>
|
|
161
161
|
</div>
|
|
162
162
|
|
|
@@ -26,53 +26,56 @@ export function DateTimePropertyField({ disabled }: {
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<>
|
|
29
|
-
<div className={"flex flex-col col-span-12"}>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{modeError}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
29
|
+
<div className={"flex flex-col col-span-12 gap-2"}>
|
|
30
|
+
<div>
|
|
31
|
+
<Select name={modePath}
|
|
32
|
+
value={modeValue ?? "date"}
|
|
33
|
+
error={Boolean(modeError)}
|
|
34
|
+
onValueChange={(v) => setFieldValue(modePath, v)}
|
|
35
|
+
label={"Mode"}
|
|
36
|
+
renderValue={(v) => {
|
|
37
|
+
switch (v) {
|
|
38
|
+
case "date_time":
|
|
39
|
+
return "Date/Time";
|
|
40
|
+
case "date":
|
|
41
|
+
return "Date";
|
|
42
|
+
default:
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
}}
|
|
46
|
+
disabled={disabled}>
|
|
47
|
+
<SelectItem value={"date_time"}> Date/Time </SelectItem>
|
|
48
|
+
<SelectItem value={"date"}> Date </SelectItem>
|
|
49
|
+
</Select>
|
|
50
|
+
<FieldCaption error={Boolean(modeError)}>
|
|
51
|
+
{modeError}
|
|
52
|
+
</FieldCaption>
|
|
53
|
+
</div>
|
|
54
|
+
<div>
|
|
55
|
+
<Select name={autoValuePath}
|
|
56
|
+
disabled={disabled}
|
|
57
|
+
value={autoValueValue ?? ""}
|
|
58
|
+
onValueChange={(v) => setFieldValue(autoValuePath, v === "none" ? null : v)}
|
|
59
|
+
renderValue={(v) => {
|
|
60
|
+
switch (v) {
|
|
61
|
+
case "on_create":
|
|
62
|
+
return "On create";
|
|
63
|
+
case "on_update":
|
|
64
|
+
return "On any update";
|
|
65
|
+
default:
|
|
66
|
+
return "None";
|
|
67
|
+
}
|
|
68
|
+
}}
|
|
69
|
+
error={Boolean(autoValueError)}
|
|
70
|
+
label={"Automatic value"}>
|
|
71
|
+
<SelectItem value={"none"}> None </SelectItem>
|
|
72
|
+
<SelectItem value={"on_create"}> On create </SelectItem>
|
|
73
|
+
<SelectItem value={"on_update"}> On any update </SelectItem>
|
|
74
|
+
</Select>
|
|
75
|
+
<FieldCaption error={Boolean(autoValueError)}>
|
|
76
|
+
{autoValueError ?? "Update this field automatically when creating or updating the entity"}
|
|
77
|
+
</FieldCaption>
|
|
78
|
+
</div>
|
|
76
79
|
|
|
77
80
|
</div>
|
|
78
81
|
|
|
@@ -178,11 +178,6 @@ export const pagesCollectionTemplate: EntityCollection = {
|
|
|
178
178
|
name: "Is Published",
|
|
179
179
|
columnWidth: 100,
|
|
180
180
|
description: "Should this page be live on the site?"
|
|
181
|
-
},
|
|
182
|
-
author_uid: {
|
|
183
|
-
dataType: "reference",
|
|
184
|
-
name: "Author",
|
|
185
|
-
path: "users"
|
|
186
181
|
}
|
|
187
182
|
}
|
|
188
183
|
};
|