@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/dist/index.es.js
CHANGED
|
@@ -135,7 +135,7 @@ function CollectionDetailsForm({
|
|
|
135
135
|
error: showErrors && Boolean(errors.name)
|
|
136
136
|
}
|
|
137
137
|
),
|
|
138
|
-
/* @__PURE__ */ jsx(FieldCaption, { error: touched.name && Boolean(errors.name), children: touched.name && Boolean(errors.name) ? errors.name : "Name of
|
|
138
|
+
/* @__PURE__ */ jsx(FieldCaption, { error: touched.name && Boolean(errors.name), children: touched.name && Boolean(errors.name) ? errors.name : "Name of this collection, usually a plural name (e.g. Products)" })
|
|
139
139
|
] }),
|
|
140
140
|
/* @__PURE__ */ jsxs("div", { className: cls("col-span-12 ", isSubcollection ? "" : "sm:col-span-8"), children: [
|
|
141
141
|
/* @__PURE__ */ jsx(
|
|
@@ -2438,60 +2438,64 @@ function DateTimePropertyField({ disabled }) {
|
|
|
2438
2438
|
const autoValueValue = getIn(values, autoValuePath);
|
|
2439
2439
|
const autoValueError = getIn(touched, autoValuePath) && getIn(errors, autoValuePath);
|
|
2440
2440
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2441
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col col-span-12", children: [
|
|
2442
|
-
/* @__PURE__ */ jsxs(
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2441
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col col-span-12 gap-2", children: [
|
|
2442
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2443
|
+
/* @__PURE__ */ jsxs(
|
|
2444
|
+
Select,
|
|
2445
|
+
{
|
|
2446
|
+
name: modePath,
|
|
2447
|
+
value: modeValue ?? "date",
|
|
2448
|
+
error: Boolean(modeError),
|
|
2449
|
+
onValueChange: (v) => setFieldValue(modePath, v),
|
|
2450
|
+
label: "Mode",
|
|
2451
|
+
renderValue: (v) => {
|
|
2452
|
+
switch (v) {
|
|
2453
|
+
case "date_time":
|
|
2454
|
+
return "Date/Time";
|
|
2455
|
+
case "date":
|
|
2456
|
+
return "Date";
|
|
2457
|
+
default:
|
|
2458
|
+
return "";
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
disabled,
|
|
2462
|
+
children: [
|
|
2463
|
+
/* @__PURE__ */ jsx(SelectItem, { value: "date_time", children: " Date/Time " }),
|
|
2464
|
+
/* @__PURE__ */ jsx(SelectItem, { value: "date", children: " Date " })
|
|
2465
|
+
]
|
|
2466
|
+
}
|
|
2467
|
+
),
|
|
2468
|
+
/* @__PURE__ */ jsx(FieldCaption, { error: Boolean(modeError), children: modeError })
|
|
2469
|
+
] }),
|
|
2470
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2471
|
+
/* @__PURE__ */ jsxs(
|
|
2472
|
+
Select,
|
|
2473
|
+
{
|
|
2474
|
+
name: autoValuePath,
|
|
2475
|
+
disabled,
|
|
2476
|
+
value: autoValueValue ?? "",
|
|
2477
|
+
onValueChange: (v) => setFieldValue(autoValuePath, v === "none" ? null : v),
|
|
2478
|
+
renderValue: (v) => {
|
|
2479
|
+
switch (v) {
|
|
2480
|
+
case "on_create":
|
|
2481
|
+
return "On create";
|
|
2482
|
+
case "on_update":
|
|
2483
|
+
return "On any update";
|
|
2484
|
+
default:
|
|
2485
|
+
return "None";
|
|
2486
|
+
}
|
|
2487
|
+
},
|
|
2488
|
+
error: Boolean(autoValueError),
|
|
2489
|
+
label: "Automatic value",
|
|
2490
|
+
children: [
|
|
2491
|
+
/* @__PURE__ */ jsx(SelectItem, { value: "none", children: " None " }),
|
|
2492
|
+
/* @__PURE__ */ jsx(SelectItem, { value: "on_create", children: " On create " }),
|
|
2493
|
+
/* @__PURE__ */ jsx(SelectItem, { value: "on_update", children: " On any update " })
|
|
2494
|
+
]
|
|
2495
|
+
}
|
|
2496
|
+
),
|
|
2497
|
+
/* @__PURE__ */ jsx(FieldCaption, { error: Boolean(autoValueError), children: autoValueError ?? "Update this field automatically when creating or updating the entity" })
|
|
2498
|
+
] })
|
|
2495
2499
|
] }),
|
|
2496
2500
|
/* @__PURE__ */ jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsx(ValidationPanel, { children: /* @__PURE__ */ jsx(GeneralPropertyValidation, { disabled }) }) })
|
|
2497
2501
|
] });
|
|
@@ -4827,11 +4831,6 @@ const pagesCollectionTemplate = {
|
|
|
4827
4831
|
name: "Is Published",
|
|
4828
4832
|
columnWidth: 100,
|
|
4829
4833
|
description: "Should this page be live on the site?"
|
|
4830
|
-
},
|
|
4831
|
-
author_uid: {
|
|
4832
|
-
dataType: "reference",
|
|
4833
|
-
name: "Author",
|
|
4834
|
-
path: "users"
|
|
4835
4834
|
}
|
|
4836
4835
|
}
|
|
4837
4836
|
};
|