@firecms/core 3.0.0-canary.201 → 3.0.0-canary.203

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.umd.js CHANGED
@@ -214,7 +214,11 @@
214
214
  if (targetIsObject && isObject(source)) {
215
215
  Object.keys(source).forEach((key) => {
216
216
  const sourceElement = source[key];
217
- if (isObject(sourceElement)) {
217
+ if (sourceElement instanceof Date) {
218
+ Object.assign(output, {
219
+ [key]: new Date(sourceElement.getTime())
220
+ });
221
+ } else if (isObject(sourceElement)) {
218
222
  if (!(key in target)) Object.assign(output, {
219
223
  [key]: sourceElement
220
224
  });
@@ -15721,7 +15725,7 @@
15721
15725
  const t1 = provided.innerRef;
15722
15726
  const t2 = provided.draggableProps;
15723
15727
  const t3 = provided.draggableProps.style;
15724
- const t4 = `${!isDragging ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 dark:hover:bg-opacity-20" : ""} rounded-md opacity-100`;
15728
+ const t4 = `relative ${!isDragging ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 dark:hover:bg-opacity-20" : ""} rounded-md opacity-100`;
15725
15729
  let t5;
15726
15730
  if ($[0] !== internalId || $[1] !== updateItemCustomProps) {
15727
15731
  t5 = (props) => updateItemCustomProps(internalId, props);
@@ -16296,7 +16300,8 @@
16296
16300
  formex: formexProp,
16297
16301
  EntityFormActionsComponent = EntityFormActions,
16298
16302
  showDefaultActions = true,
16299
- showEntityPath = true
16303
+ showEntityPath = true,
16304
+ children
16300
16305
  }) {
16301
16306
  if (collection.customId && collection.formAutoSave) {
16302
16307
  console.warn(`The collection ${collection.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);
@@ -16648,7 +16653,7 @@
16648
16653
  }).filter(Boolean) });
16649
16654
  const formRef = React.useRef(null);
16650
16655
  const formView = /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16651
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full py-2 flex flex-col items-start mt-4 lg:mt-8 mb-8", children: [
16656
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full py-2 flex flex-col items-start my-4 lg:my-6", children: [
16652
16657
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { className: "py-4 flex-grow line-clamp-1 " + (collection.hideIdFromForm ? "mb-2" : "mb-0"), variant: "h4", children: title ?? collection.singularName ?? collection.name }),
16653
16658
  showEntityPath && /* @__PURE__ */ jsxRuntime.jsx(ui.Alert, { color: "base", className: "w-full", size: "small", children: /* @__PURE__ */ jsxRuntime.jsxs("code", { className: "text-xs select-all text-text-secondary dark:text-text-secondary-dark", children: [
16654
16659
  entity?.path ?? path,
@@ -16656,6 +16661,7 @@
16656
16661
  entityId
16657
16662
  ] }) })
16658
16663
  ] }),
16664
+ children,
16659
16665
  !collection.hideIdFromForm && /* @__PURE__ */ jsxRuntime.jsx(CustomIdField, { customId: collection.customId, entityId, status, onChange: setEntityId, error: entityIdError, loading: customIdLoading, entity }),
16660
16666
  entityId && formContext && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-12 flex flex-col gap-8", ref: formRef, children: [
16661
16667
  formFields(),
@@ -16680,7 +16686,8 @@
16680
16686
  if (!collection.alwaysApplyDefaultValues) {
16681
16687
  return entity.values ?? getDefaultValuesFor(properties);
16682
16688
  } else {
16683
- return mergeDeep(getDefaultValuesFor(properties), entity.values ?? {});
16689
+ const defaultValues = getDefaultValuesFor(properties);
16690
+ return mergeDeep(defaultValues, entity.values ?? {});
16684
16691
  }
16685
16692
  } else if (status === "new") {
16686
16693
  return getDefaultValuesFor(properties);
@@ -18800,7 +18807,7 @@
18800
18807
  });
18801
18808
  }
18802
18809
  };
18803
- return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(PropertyFieldBinding, { ...fieldBindingProps }) }) }, `map-${propertyKey}-${index}`);
18810
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(PropertyFieldBinding, { ...fieldBindingProps }) }) }, `map-${propertyKey}-${index}`);
18804
18811
  };
18805
18812
  $[14] = autoFocus;
18806
18813
  $[15] = context;