@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/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.124",
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.124",
11
- "@firecms/data_import": "^3.0.0-canary.124",
12
- "@firecms/data_import_export": "^3.0.0-canary.124",
13
- "@firecms/formex": "^3.0.0-canary.124",
14
- "@firecms/schema_inference": "^3.0.0-canary.124",
15
- "@firecms/ui": "^3.0.0-canary.124",
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": "b1ef1804b61ad99988128d9a79d4364dba7d9beb"
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 in this collection, usually a plural name (e.g. Products)"}
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
- <Select name={modePath}
31
- value={modeValue ?? "date"}
32
- error={Boolean(modeError)}
33
- onValueChange={(v) => setFieldValue(modePath, v)}
34
- label={"Mode"}
35
- renderValue={(v) => {
36
- switch (v) {
37
- case "date_time":
38
- return "Date/Time";
39
- case "date":
40
- return "Date";
41
- default:
42
- return "";
43
- }
44
- }}
45
- disabled={disabled}>
46
- <SelectItem value={"date_time"}> Date/Time </SelectItem>
47
- <SelectItem value={"date"}> Date </SelectItem>
48
- </Select>
49
- <FieldCaption error={Boolean(modeError)}>
50
- {modeError}
51
- </FieldCaption>
52
-
53
- <Select name={autoValuePath}
54
- disabled={disabled}
55
- value={autoValueValue ?? ""}
56
- onValueChange={(v) => setFieldValue(autoValuePath, v === "none" ? null : v)}
57
- renderValue={(v) => {
58
- switch (v) {
59
- case "on_create":
60
- return "On create";
61
- case "on_update":
62
- return "On any update";
63
- default:
64
- return "None";
65
- }
66
- }}
67
- error={Boolean(autoValueError)}
68
- label={"Automatic value"}>
69
- <SelectItem value={"none"}> None </SelectItem>
70
- <SelectItem value={"on_create"}> On create </SelectItem>
71
- <SelectItem value={"on_update"}> On any update </SelectItem>
72
- </Select>
73
- <FieldCaption error={Boolean(autoValueError)}>
74
- {autoValueError ?? "Update this field automatically when creating or updating the entity"}
75
- </FieldCaption>
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
  };