@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.umd.js
CHANGED
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
error: showErrors && Boolean(errors.name)
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: touched.name && Boolean(errors.name), children: touched.name && Boolean(errors.name) ? errors.name : "Name of
|
|
146
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.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)" })
|
|
147
147
|
] }),
|
|
148
148
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("col-span-12 ", isSubcollection ? "" : "sm:col-span-8"), children: [
|
|
149
149
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2446,60 +2446,64 @@
|
|
|
2446
2446
|
const autoValueValue = formex.getIn(values, autoValuePath);
|
|
2447
2447
|
const autoValueError = formex.getIn(touched, autoValuePath) && formex.getIn(errors, autoValuePath);
|
|
2448
2448
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2449
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col col-span-12", children: [
|
|
2450
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
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
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2449
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col col-span-12 gap-2", children: [
|
|
2450
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2451
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2452
|
+
ui.Select,
|
|
2453
|
+
{
|
|
2454
|
+
name: modePath,
|
|
2455
|
+
value: modeValue ?? "date",
|
|
2456
|
+
error: Boolean(modeError),
|
|
2457
|
+
onValueChange: (v) => setFieldValue(modePath, v),
|
|
2458
|
+
label: "Mode",
|
|
2459
|
+
renderValue: (v) => {
|
|
2460
|
+
switch (v) {
|
|
2461
|
+
case "date_time":
|
|
2462
|
+
return "Date/Time";
|
|
2463
|
+
case "date":
|
|
2464
|
+
return "Date";
|
|
2465
|
+
default:
|
|
2466
|
+
return "";
|
|
2467
|
+
}
|
|
2468
|
+
},
|
|
2469
|
+
disabled,
|
|
2470
|
+
children: [
|
|
2471
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "date_time", children: " Date/Time " }),
|
|
2472
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "date", children: " Date " })
|
|
2473
|
+
]
|
|
2474
|
+
}
|
|
2475
|
+
),
|
|
2476
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: Boolean(modeError), children: modeError })
|
|
2477
|
+
] }),
|
|
2478
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2479
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2480
|
+
ui.Select,
|
|
2481
|
+
{
|
|
2482
|
+
name: autoValuePath,
|
|
2483
|
+
disabled,
|
|
2484
|
+
value: autoValueValue ?? "",
|
|
2485
|
+
onValueChange: (v) => setFieldValue(autoValuePath, v === "none" ? null : v),
|
|
2486
|
+
renderValue: (v) => {
|
|
2487
|
+
switch (v) {
|
|
2488
|
+
case "on_create":
|
|
2489
|
+
return "On create";
|
|
2490
|
+
case "on_update":
|
|
2491
|
+
return "On any update";
|
|
2492
|
+
default:
|
|
2493
|
+
return "None";
|
|
2494
|
+
}
|
|
2495
|
+
},
|
|
2496
|
+
error: Boolean(autoValueError),
|
|
2497
|
+
label: "Automatic value",
|
|
2498
|
+
children: [
|
|
2499
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "none", children: " None " }),
|
|
2500
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "on_create", children: " On create " }),
|
|
2501
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "on_update", children: " On any update " })
|
|
2502
|
+
]
|
|
2503
|
+
}
|
|
2504
|
+
),
|
|
2505
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: Boolean(autoValueError), children: autoValueError ?? "Update this field automatically when creating or updating the entity" })
|
|
2506
|
+
] })
|
|
2503
2507
|
] }),
|
|
2504
2508
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ValidationPanel, { children: /* @__PURE__ */ jsxRuntime.jsx(GeneralPropertyValidation, { disabled }) }) })
|
|
2505
2509
|
] });
|
|
@@ -4835,11 +4839,6 @@
|
|
|
4835
4839
|
name: "Is Published",
|
|
4836
4840
|
columnWidth: 100,
|
|
4837
4841
|
description: "Should this page be live on the site?"
|
|
4838
|
-
},
|
|
4839
|
-
author_uid: {
|
|
4840
|
-
dataType: "reference",
|
|
4841
|
-
name: "Author",
|
|
4842
|
-
path: "users"
|
|
4843
4842
|
}
|
|
4844
4843
|
}
|
|
4845
4844
|
};
|