@firecms/core 3.0.0-canary.202 → 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.
@@ -38,8 +38,9 @@ export type EntityFormProps<M extends Record<string, any>> = {
38
38
  */
39
39
  showEntityPath?: boolean;
40
40
  EntityFormActionsComponent?: React.FC<EntityFormActionsProps>;
41
+ children?: React.ReactNode;
41
42
  };
42
- export declare function EntityForm<M extends Record<string, any>>({ path, entityId: entityIdProp, collection, onValuesModified, onIdChange, onSaved, entity, initialDirtyValues, onFormContextReady, forceActionsAtTheBottom, initialStatus, className, onStatusChange, onEntityChange, openEntityMode, formex: formexProp, EntityFormActionsComponent, showDefaultActions, showEntityPath }: EntityFormProps<M>): import("react/jsx-runtime").JSX.Element;
43
+ export declare function EntityForm<M extends Record<string, any>>({ path, entityId: entityIdProp, collection, onValuesModified, onIdChange, onSaved, entity, initialDirtyValues, onFormContextReady, forceActionsAtTheBottom, initialStatus, className, onStatusChange, onEntityChange, openEntityMode, formex: formexProp, EntityFormActionsComponent, showDefaultActions, showEntityPath, children }: EntityFormProps<M>): import("react/jsx-runtime").JSX.Element;
43
44
  export declare function yupToFormErrors(yupError: ValidationError): Record<string, any>;
44
45
  export declare function FormLayoutInner({ id, formContext, children, className, forceActionsAtTheBottom, pluginActions, EntityFormActionsComponent, showDefaultActions, }: {
45
46
  id?: string;
package/dist/index.es.js CHANGED
@@ -15723,7 +15723,7 @@ function ArrayContainerItem(t0) {
15723
15723
  const t1 = provided.innerRef;
15724
15724
  const t2 = provided.draggableProps;
15725
15725
  const t3 = provided.draggableProps.style;
15726
- const t4 = `${!isDragging ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 dark:hover:bg-opacity-20" : ""} rounded-md opacity-100`;
15726
+ const t4 = `relative ${!isDragging ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 dark:hover:bg-opacity-20" : ""} rounded-md opacity-100`;
15727
15727
  let t5;
15728
15728
  if ($[0] !== internalId || $[1] !== updateItemCustomProps) {
15729
15729
  t5 = (props) => updateItemCustomProps(internalId, props);
@@ -16298,7 +16298,8 @@ function EntityForm({
16298
16298
  formex: formexProp,
16299
16299
  EntityFormActionsComponent = EntityFormActions,
16300
16300
  showDefaultActions = true,
16301
- showEntityPath = true
16301
+ showEntityPath = true,
16302
+ children
16302
16303
  }) {
16303
16304
  if (collection.customId && collection.formAutoSave) {
16304
16305
  console.warn(`The collection ${collection.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);
@@ -16650,7 +16651,7 @@ function EntityForm({
16650
16651
  }).filter(Boolean) });
16651
16652
  const formRef = useRef(null);
16652
16653
  const formView = /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
16653
- /* @__PURE__ */ jsxs("div", { className: "w-full py-2 flex flex-col items-start mt-4 lg:mt-8 mb-8", children: [
16654
+ /* @__PURE__ */ jsxs("div", { className: "w-full py-2 flex flex-col items-start my-4 lg:my-6", children: [
16654
16655
  /* @__PURE__ */ jsx(Typography, { className: "py-4 flex-grow line-clamp-1 " + (collection.hideIdFromForm ? "mb-2" : "mb-0"), variant: "h4", children: title ?? collection.singularName ?? collection.name }),
16655
16656
  showEntityPath && /* @__PURE__ */ jsx(Alert, { color: "base", className: "w-full", size: "small", children: /* @__PURE__ */ jsxs("code", { className: "text-xs select-all text-text-secondary dark:text-text-secondary-dark", children: [
16656
16657
  entity?.path ?? path,
@@ -16658,6 +16659,7 @@ function EntityForm({
16658
16659
  entityId
16659
16660
  ] }) })
16660
16661
  ] }),
16662
+ children,
16661
16663
  !collection.hideIdFromForm && /* @__PURE__ */ jsx(CustomIdField, { customId: collection.customId, entityId, status, onChange: setEntityId, error: entityIdError, loading: customIdLoading, entity }),
16662
16664
  entityId && formContext && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "mt-12 flex flex-col gap-8", ref: formRef, children: [
16663
16665
  formFields(),
@@ -18803,7 +18805,7 @@ function MapFieldBinding(t0) {
18803
18805
  });
18804
18806
  }
18805
18807
  };
18806
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...fieldBindingProps }) }) }, `map-${propertyKey}-${index}`);
18808
+ return /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...fieldBindingProps }) }) }, `map-${propertyKey}-${index}`);
18807
18809
  };
18808
18810
  $[14] = autoFocus;
18809
18811
  $[15] = context;