@firecms/collection_editor 3.0.0-canary.124 → 3.0.0-canary.125

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 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 in this collection, usually a plural name (e.g. Products)" })
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
- Select,
2444
- {
2445
- name: modePath,
2446
- value: modeValue ?? "date",
2447
- error: Boolean(modeError),
2448
- onValueChange: (v) => setFieldValue(modePath, v),
2449
- label: "Mode",
2450
- renderValue: (v) => {
2451
- switch (v) {
2452
- case "date_time":
2453
- return "Date/Time";
2454
- case "date":
2455
- return "Date";
2456
- default:
2457
- return "";
2458
- }
2459
- },
2460
- disabled,
2461
- children: [
2462
- /* @__PURE__ */ jsx(SelectItem, { value: "date_time", children: " Date/Time " }),
2463
- /* @__PURE__ */ jsx(SelectItem, { value: "date", children: " Date " })
2464
- ]
2465
- }
2466
- ),
2467
- /* @__PURE__ */ jsx(FieldCaption, { error: Boolean(modeError), children: modeError }),
2468
- /* @__PURE__ */ jsxs(
2469
- Select,
2470
- {
2471
- name: autoValuePath,
2472
- disabled,
2473
- value: autoValueValue ?? "",
2474
- onValueChange: (v) => setFieldValue(autoValuePath, v === "none" ? null : v),
2475
- renderValue: (v) => {
2476
- switch (v) {
2477
- case "on_create":
2478
- return "On create";
2479
- case "on_update":
2480
- return "On any update";
2481
- default:
2482
- return "None";
2483
- }
2484
- },
2485
- error: Boolean(autoValueError),
2486
- label: "Automatic value",
2487
- children: [
2488
- /* @__PURE__ */ jsx(SelectItem, { value: "none", children: " None " }),
2489
- /* @__PURE__ */ jsx(SelectItem, { value: "on_create", children: " On create " }),
2490
- /* @__PURE__ */ jsx(SelectItem, { value: "on_update", children: " On any update " })
2491
- ]
2492
- }
2493
- ),
2494
- /* @__PURE__ */ jsx(FieldCaption, { error: Boolean(autoValueError), children: autoValueError ?? "Update this field automatically when creating or updating the entity" })
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
  };