@firecms/core 3.0.0-canary.174 → 3.0.0-canary.176

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.
@@ -26,5 +26,5 @@ import { CMSType, PropertyFieldBindingProps } from "../types";
26
26
  * @group Form custom fields
27
27
  */
28
28
  export declare const PropertyFieldBinding: typeof PropertyFieldBindingInternal;
29
- declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = Record<string, any>>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled: disabledProp, partOfArray, minimalistView, autoFocus, index, size, onPropertyChange }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
29
+ declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = any>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled: disabledProp, partOfArray, minimalistView, autoFocus, index, size, onPropertyChange }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
30
30
  export {};
@@ -6,4 +6,4 @@ import { FieldProps } from "../../types";
6
6
  * and tables to the specified properties.
7
7
  * @group Form fields
8
8
  */
9
- export declare function ArrayCustomShapedFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, minimalistView, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T, any, any>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ArrayCustomShapedFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, minimalistView: minimalistViewProp, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T, any, any>): import("react/jsx-runtime").JSX.Element;
@@ -7,5 +7,5 @@ type ArrayOfReferencesFieldProps = FieldProps<EntityReference[]>;
7
7
  * and tables to the specified properties.
8
8
  * @group Form fields
9
9
  */
10
- export declare function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, disabled, isSubmitting, minimalistView, property, includeDescription, setValue, setFieldValue }: ArrayOfReferencesFieldProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, disabled, isSubmitting, minimalistView: minimalistViewProp, property, includeDescription, setValue, setFieldValue }: ArrayOfReferencesFieldProps): import("react/jsx-runtime").JSX.Element;
11
11
  export {};
@@ -7,4 +7,4 @@ import { FieldProps } from "../../types";
7
7
  * and tables to the specified properties.
8
8
  * @group Form fields
9
9
  */
10
- export declare function BlockFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, minimalistView, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function BlockFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, minimalistView: minimalistViewProp, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -6,4 +6,4 @@ import { FieldProps } from "../../types";
6
6
  * and tables to the specified properties.
7
7
  * @group Form fields
8
8
  */
9
- export declare function MapFieldBinding({ propertyKey, value, showError, error, disabled, property, minimalistView, includeDescription, underlyingValueHasChanged, autoFocus, context, onPropertyChange }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MapFieldBinding({ propertyKey, value, showError, error, disabled, property, minimalistView: minimalistViewProp, includeDescription, underlyingValueHasChanged, autoFocus, context, onPropertyChange }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
@@ -7,4 +7,4 @@ import { FieldProps } from "../../types";
7
7
  * and tables to the specified properties.
8
8
  * @group Form fields
9
9
  */
10
- export declare function RepeatFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, minimalistView, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function RepeatFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, minimalistView: minimalistViewProp, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
package/dist/index.es.js CHANGED
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import * as React from "react";
4
4
  import React__default, { forwardRef, useState, useRef, useEffect, useContext, useCallback, useMemo, createRef, createContext, useLayoutEffect, useDeferredValue, createElement } from "react";
5
- import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, IconButton, InfoIcon, Typography, ContentCopyIcon, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, ErrorIcon, cls, defaultBorderMixin, OpenInNewIcon, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, Skeleton, paperMixin, EditIcon, KeyboardTabIcon, DoNotDisturbOnIcon, Menu, MoreVertIcon, MenuItem, Checkbox, Chip, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, CloseIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, DeleteIcon, AddIcon, ExpandablePanel, Markdown, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, StarIcon, Collapse, Container, NotesIcon, CheckIcon, Alert, Tab, Tabs, LoadingButton, FilterListOffIcon, SearchIcon, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, HandleIcon, RemoveIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, DescriptionIcon, fieldBackgroundMixin, fieldBackgroundHoverMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, MailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, Sheet, OpenInFullIcon, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
5
+ import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, IconButton, InfoIcon, Typography, ContentCopyIcon, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, ErrorIcon, cls, defaultBorderMixin, OpenInNewIcon, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, Skeleton, paperMixin, EditIcon, KeyboardTabIcon, DoNotDisturbOnIcon, Menu, MoreVertIcon, MenuItem, Checkbox, Chip, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, CloseIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, DeleteIcon, AddIcon, ExpandablePanel, Markdown, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, StarIcon, Collapse, Container, NotesIcon, Alert, Tab, Tabs, LoadingButton, CheckIcon, FilterListOffIcon, SearchIcon, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, HandleIcon, RemoveIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, DescriptionIcon, fieldBackgroundMixin, fieldBackgroundHoverMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, MailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, Sheet, OpenInFullIcon, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
6
6
  import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
7
7
  import hash from "object-hash";
8
8
  import { useFormex, setIn, getIn, useCreateFormex, Formex, Field } from "@firecms/formex";
@@ -11521,6 +11521,61 @@ function EntityEditView(t0) {
11521
11521
  }
11522
11522
  return t4;
11523
11523
  }
11524
+ function FormLayout(t0) {
11525
+ const $ = c(12);
11526
+ const {
11527
+ id,
11528
+ formex,
11529
+ children,
11530
+ className
11531
+ } = t0;
11532
+ let t1;
11533
+ if ($[0] !== className) {
11534
+ t1 = cls("relative flex flex-row max-w-4xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl w-full h-fit", className);
11535
+ $[0] = className;
11536
+ $[1] = t1;
11537
+ } else {
11538
+ t1 = $[1];
11539
+ }
11540
+ let t2;
11541
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
11542
+ t2 = cls("flex flex-col w-full pt-12 pb-16 px-4 sm:px-8 md:px-10");
11543
+ $[2] = t2;
11544
+ } else {
11545
+ t2 = $[2];
11546
+ }
11547
+ let t3;
11548
+ if ($[3] !== formex.dirty) {
11549
+ t3 = formex.dirty ? /* @__PURE__ */ jsx(Tooltip, { title: "Unsaved changes", className: "self-end sticky top-4 z-10", children: /* @__PURE__ */ jsx(Chip, { size: "small", colorScheme: "orangeDarker", children: /* @__PURE__ */ jsx(EditIcon, { size: "smallest" }) }) }) : /* @__PURE__ */ jsx(Tooltip, { title: "In sync with the database", className: "self-end sticky top-4 z-10", children: /* @__PURE__ */ jsx(Chip, { size: "small", children: /* @__PURE__ */ jsx(CheckIcon, { size: "smallest" }) }) });
11550
+ $[3] = formex.dirty;
11551
+ $[4] = t3;
11552
+ } else {
11553
+ t3 = $[4];
11554
+ }
11555
+ let t4;
11556
+ if ($[5] !== children || $[6] !== t3) {
11557
+ t4 = /* @__PURE__ */ jsxs("div", { className: t2, children: [
11558
+ t3,
11559
+ children
11560
+ ] });
11561
+ $[5] = children;
11562
+ $[6] = t3;
11563
+ $[7] = t4;
11564
+ } else {
11565
+ t4 = $[7];
11566
+ }
11567
+ let t5;
11568
+ if ($[8] !== id || $[9] !== t1 || $[10] !== t4) {
11569
+ t5 = /* @__PURE__ */ jsx("div", { role: "tabpanel", id, className: t1, children: t4 });
11570
+ $[8] = id;
11571
+ $[9] = t1;
11572
+ $[10] = t4;
11573
+ $[11] = t5;
11574
+ } else {
11575
+ t5 = $[11];
11576
+ }
11577
+ return t5;
11578
+ }
11524
11579
  function EntityEditViewInner({
11525
11580
  path,
11526
11581
  entityId: entityIdProp,
@@ -11809,25 +11864,33 @@ function EntityEditViewInner({
11809
11864
  };
11810
11865
  const resolvedEntityViews = customViews ? customViews.map((e_4) => resolveEntityView(e_4, customizationController.entityViews)).filter(Boolean) : [];
11811
11866
  const selectedEntityView = resolvedEntityViews.find((e_5) => e_5.key === selectedTab);
11812
- const shouldShowEntityActions = !autoSave && (selectedTab === MAIN_TAB_VALUE || selectedEntityView?.includeActions);
11813
- const customViewsView = customViews && resolvedEntityViews.map((customView, colIndex) => {
11867
+ const shouldShowEntityActions = selectedTab === MAIN_TAB_VALUE || selectedEntityView?.includeActions;
11868
+ const secondaryForms = customViews && resolvedEntityViews.filter((e_6) => e_6.includeActions).map((customView, colIndex) => {
11814
11869
  if (!customView) return null;
11815
11870
  const Builder = customView.Builder;
11816
11871
  if (!Builder) {
11817
11872
  console.error("customView.Builder is not defined");
11818
11873
  return null;
11819
11874
  }
11875
+ return /* @__PURE__ */ jsx(FormLayout, { className: selectedTab !== customView.key ? "hidden" : "", formex, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: formContext && /* @__PURE__ */ jsx(Builder, { collection, entity: usedEntity, modifiedValues: formex.values ?? usedEntity?.values, formContext }) }) }, `custom_view_${customView.key}`);
11876
+ }).filter(Boolean);
11877
+ const customViewsView = customViews && resolvedEntityViews.filter((e_7) => !e_7.includeActions).map((customView_0, colIndex_0) => {
11878
+ if (!customView_0) return null;
11879
+ const Builder_0 = customView_0.Builder;
11880
+ if (!Builder_0) {
11881
+ console.error("customView.Builder is not defined");
11882
+ return null;
11883
+ }
11820
11884
  return /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "relative flex-grow w-full h-full overflow-auto", {
11821
- "hidden": selectedTab !== customView.key
11822
- }), role: "tabpanel", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: formContext && /* @__PURE__ */ jsx(Builder, { collection, entity: usedEntity, modifiedValues: formex.values ?? usedEntity?.values, formContext }) }) }, `custom_view_${customView.key}`);
11885
+ "hidden": selectedTab !== customView_0.key
11886
+ }), role: "tabpanel", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: formContext && /* @__PURE__ */ jsx(Builder_0, { collection, entity: usedEntity, modifiedValues: formex.values ?? usedEntity?.values, formContext }) }) }, `custom_view_${customView_0.key}`);
11823
11887
  }).filter(Boolean);
11824
11888
  const globalLoading = dataLoading && !usedEntity || (!usedEntity || readOnly === void 0) && (status === "existing" || status === "copy");
11825
- const subCollectionsViews = subcollections && subcollections.map((subcollection, colIndex_0) => {
11889
+ const subCollectionsViews = subcollections && subcollections.map((subcollection, colIndex_1) => {
11826
11890
  const subcollectionId = subcollection.id ?? subcollection.path;
11827
11891
  const fullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
11828
- return /* @__PURE__ */ jsxs("div", { className: cls("relative flex-grow h-full overflow-auto w-full", {
11829
- "hidden": selectedTab !== subcollectionId
11830
- }), role: "tabpanel", children: [
11892
+ if (selectedTab !== subcollectionId) return null;
11893
+ return /* @__PURE__ */ jsxs("div", { className: "relative flex-grow h-full overflow-auto w-full", role: "tabpanel", children: [
11831
11894
  globalLoading || saving && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
11832
11895
  !globalLoading && (usedEntity && fullPath ? /* @__PURE__ */ jsx(EntityCollectionView, { fullPath, parentCollectionIds: [...parentCollectionIds, collection.id], isSubCollection: true, updateUrl: false, ...subcollection, openEntityMode: layout }) : /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full p-3", children: /* @__PURE__ */ jsx(Typography, { variant: "label", children: "You need to save your entity before adding additional collections" }) }))
11833
11896
  ] }, `subcol_${subcollectionId}`);
@@ -11888,9 +11951,9 @@ function EntityEditViewInner({
11888
11951
  context
11889
11952
  });
11890
11953
  setEntityId(updatedId);
11891
- } catch (e_6) {
11892
- onIdUpdateError?.(e_6);
11893
- console.error(e_6);
11954
+ } catch (e_8) {
11955
+ onIdUpdateError?.(e_8);
11956
+ console.error(e_8);
11894
11957
  }
11895
11958
  setCustomIdLoading(false);
11896
11959
  }
@@ -11964,11 +12027,11 @@ function EntityEditViewInner({
11964
12027
  }
11965
12028
  const additionalField = resolvedCollection.additionalFields?.find((f) => f.key === key_1);
11966
12029
  if (additionalField && entity) {
11967
- const Builder_0 = additionalField.Builder;
11968
- if (!Builder_0 && !additionalField.value) {
12030
+ const Builder_1 = additionalField.Builder;
12031
+ if (!Builder_1 && !additionalField.value) {
11969
12032
  throw new Error("When using additional fields you need to provide a Builder or a value");
11970
12033
  }
11971
- const child = Builder_0 ? /* @__PURE__ */ jsx(Builder_0, { entity, context }) : /* @__PURE__ */ jsx(Fragment, { children: additionalField.value?.({
12034
+ const child = Builder_1 ? /* @__PURE__ */ jsx(Builder_1, { entity, context }) : /* @__PURE__ */ jsx(Fragment, { children: additionalField.value?.({
11972
12035
  entity,
11973
12036
  context
11974
12037
  })?.toString() });
@@ -12015,8 +12078,7 @@ function EntityEditViewInner({
12015
12078
  pluginActions,
12016
12079
  layout
12017
12080
  });
12018
- const entityView = readOnly === void 0 ? /* @__PURE__ */ jsx(Fragment, {}) : !readOnly ? /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col w-full pt-12 pb-16 px-4 sm:px-8 md:px-10", children: [
12019
- formex.dirty ? /* @__PURE__ */ jsx(Tooltip, { title: "Unsaved changes", className: "self-end sticky top-4 z-10", children: /* @__PURE__ */ jsx(Chip, { size: "small", colorScheme: "orangeDarker", children: /* @__PURE__ */ jsx(EditIcon, { size: "smallest" }) }) }) : /* @__PURE__ */ jsx(Tooltip, { title: "In sync with the database", className: "self-end sticky top-4 z-10", children: /* @__PURE__ */ jsx(Chip, { size: "small", children: /* @__PURE__ */ jsx(CheckIcon, { size: "smallest" }) }) }),
12081
+ const entityView = readOnly === void 0 ? /* @__PURE__ */ jsx(Fragment, {}) : !readOnly ? /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
12020
12082
  /* @__PURE__ */ jsxs("div", { className: "w-full py-2 flex flex-col items-start mt-4 lg:mt-8 mb-8", children: [
12021
12083
  /* @__PURE__ */ jsx(Typography, { className: "mt-4 flex-grow line-clamp-1 " + inputCollection.hideIdFromForm ? "mb-2" : "mb-0", variant: "h4", children: title ?? inputCollection.singularName ?? inputCollection.name }),
12022
12084
  /* @__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: [
@@ -12026,13 +12088,11 @@ function EntityEditViewInner({
12026
12088
  ] }) })
12027
12089
  ] }),
12028
12090
  !collection.hideIdFromForm && /* @__PURE__ */ jsx(CustomIdField, { customId: inputCollection.customId, entityId, status, onChange: setEntityId, error: entityIdError, loading: customIdLoading, entity }),
12029
- entityId && formContext && /* @__PURE__ */ jsxs(Fragment, { children: [
12030
- /* @__PURE__ */ jsxs("div", { className: "mt-12 flex flex-col gap-8", ref: formRef, children: [
12031
- formFields,
12032
- /* @__PURE__ */ jsx(ErrorFocus, { containerRef: formRef })
12033
- ] }),
12034
- actionsAtTheBottom && /* @__PURE__ */ jsx("div", { className: "h-16" })
12035
- ] })
12091
+ entityId && formContext && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "mt-12 flex flex-col gap-8", ref: formRef, children: [
12092
+ formFields,
12093
+ /* @__PURE__ */ jsx(ErrorFocus, { containerRef: formRef })
12094
+ ] }) }),
12095
+ actionsAtTheBottom && /* @__PURE__ */ jsx("div", { className: "h-16" })
12036
12096
  ] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
12037
12097
  /* @__PURE__ */ jsx(Typography, { className: "mt-16 mb-8 mx-8", variant: "h4", children: collection.singularName ?? collection.name }),
12038
12098
  /* @__PURE__ */ jsx(EntityView, { className: "px-12", entity: usedEntity, path, collection })
@@ -12063,13 +12123,12 @@ function EntityEditViewInner({
12063
12123
  });
12064
12124
  return onDiscard();
12065
12125
  }, noValidate: true, className: "flex-1 flex flex-row w-full overflow-y-auto justify-center", children: [
12066
- /* @__PURE__ */ jsx("div", { role: "tabpanel", hidden: !mainViewVisible, id: `form_${path}`, className: cls("relative flex flex-row max-w-4xl lg:max-w-3xl xl:max-w-4xl 2xl:max-w-5xl w-full h-fit", {
12067
- "hidden": !mainViewVisible
12068
- }), children: globalLoading ? /* @__PURE__ */ jsx("div", { className: "w-full pt-12 pb-16 px-4 sm:px-8 md:px-10", children: /* @__PURE__ */ jsx(CircularProgressCenter, {}) }) : entityView }),
12069
- customViewsView,
12070
- subCollectionsViews,
12126
+ /* @__PURE__ */ jsx(FormLayout, { className: !mainViewVisible ? "hidden" : "", id: `form_${path}`, formex, children: globalLoading ? /* @__PURE__ */ jsx("div", { className: "w-full pt-12 pb-16 px-4 sm:px-8 md:px-10", children: /* @__PURE__ */ jsx(CircularProgressCenter, {}) }) : entityView }),
12127
+ secondaryForms,
12071
12128
  shouldShowEntityActions && dialogActions
12072
- ] })
12129
+ ] }),
12130
+ customViewsView,
12131
+ subCollectionsViews
12073
12132
  ] });
12074
12133
  if (plugins) {
12075
12134
  plugins.forEach((plugin_0) => {
@@ -12166,7 +12225,7 @@ function buildSideActions({
12166
12225
  setPendingClose,
12167
12226
  pluginActions
12168
12227
  }) {
12169
- return /* @__PURE__ */ jsxs("div", { className: cls("overflow-auto h-full flex flex-col gap-2 w-96 px-4 py-16 sticky top-0 border-l", defaultBorderMixin), children: [
12228
+ return /* @__PURE__ */ jsxs("div", { className: cls("overflow-auto h-full flex flex-col gap-2 w-80 xl:w-96 px-4 py-16 sticky top-0 border-l", defaultBorderMixin), children: [
12170
12229
  /* @__PURE__ */ jsxs(LoadingButton, { fullWidth: true, variant: "filled", color: "primary", type: "submit", size: "large", disabled: disabled || isSubmitting, onClick: () => {
12171
12230
  setPendingClose?.(false);
12172
12231
  }, children: [
@@ -17218,12 +17277,13 @@ function ArrayOfReferencesFieldBinding({
17218
17277
  showError,
17219
17278
  disabled,
17220
17279
  isSubmitting,
17221
- minimalistView,
17280
+ minimalistView: minimalistViewProp,
17222
17281
  property,
17223
17282
  includeDescription,
17224
17283
  setValue,
17225
17284
  setFieldValue
17226
17285
  }) {
17286
+ const minimalistView = minimalistViewProp || property.minimalistView;
17227
17287
  const ofProperty = property.of;
17228
17288
  if (ofProperty.dataType !== "reference") {
17229
17289
  throw Error("ArrayOfReferencesField expected a property containing references");
@@ -18637,7 +18697,7 @@ function MapFieldBinding(t0) {
18637
18697
  error,
18638
18698
  disabled,
18639
18699
  property,
18640
- minimalistView,
18700
+ minimalistView: minimalistViewProp,
18641
18701
  includeDescription,
18642
18702
  underlyingValueHasChanged,
18643
18703
  autoFocus,
@@ -18646,6 +18706,7 @@ function MapFieldBinding(t0) {
18646
18706
  } = t0;
18647
18707
  const pickOnlySomeKeys = property.pickOnlySomeKeys || false;
18648
18708
  const expanded = property.expanded === void 0 ? true : property.expanded;
18709
+ const minimalistView = minimalistViewProp || property.minimalistView;
18649
18710
  if (!property.properties) {
18650
18711
  throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${propertyKey}`);
18651
18712
  }
@@ -19577,21 +19638,34 @@ function RepeatFieldBinding(t0) {
19577
19638
  let underlyingValueHasChanged;
19578
19639
  let value;
19579
19640
  if ($[0] !== t0) {
19580
- ({
19581
- propertyKey,
19582
- value,
19583
- error,
19584
- showError,
19585
- isSubmitting,
19586
- setValue,
19587
- setFieldValue,
19588
- minimalistView,
19589
- property,
19590
- includeDescription,
19591
- underlyingValueHasChanged,
19592
- context,
19593
- disabled
19594
- } = t0);
19641
+ const {
19642
+ propertyKey: t19,
19643
+ value: t22,
19644
+ error: t32,
19645
+ showError: t42,
19646
+ isSubmitting: t52,
19647
+ setValue: t62,
19648
+ setFieldValue: t72,
19649
+ minimalistView: minimalistViewProp,
19650
+ property: t82,
19651
+ includeDescription: t92,
19652
+ underlyingValueHasChanged: t102,
19653
+ context: t112,
19654
+ disabled: t122
19655
+ } = t0;
19656
+ propertyKey = t19;
19657
+ value = t22;
19658
+ error = t32;
19659
+ showError = t42;
19660
+ isSubmitting = t52;
19661
+ setValue = t62;
19662
+ setFieldValue = t72;
19663
+ property = t82;
19664
+ includeDescription = t92;
19665
+ underlyingValueHasChanged = t102;
19666
+ context = t112;
19667
+ disabled = t122;
19668
+ minimalistView = minimalistViewProp || property.minimalistView;
19595
19669
  if (!property.of) {
19596
19670
  throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");
19597
19671
  }
@@ -19820,13 +19894,14 @@ function BlockFieldBinding({
19820
19894
  isSubmitting,
19821
19895
  setValue,
19822
19896
  setFieldValue,
19823
- minimalistView,
19897
+ minimalistView: minimalistViewProp,
19824
19898
  property,
19825
19899
  includeDescription,
19826
19900
  underlyingValueHasChanged,
19827
19901
  context,
19828
19902
  disabled
19829
19903
  }) {
19904
+ const minimalistView = minimalistViewProp || property.minimalistView;
19830
19905
  if (!property.oneOf) throw Error("ArrayOneOfField misconfiguration. Property `oneOf` not set");
19831
19906
  const expanded = property.expanded === void 0 ? true : property.expanded;
19832
19907
  useClearRestoreValue({
@@ -20264,13 +20339,14 @@ function ArrayCustomShapedFieldBinding(t0) {
20264
20339
  error,
20265
20340
  showError,
20266
20341
  setValue,
20267
- minimalistView,
20342
+ minimalistView: minimalistViewProp,
20268
20343
  property,
20269
20344
  includeDescription,
20270
20345
  underlyingValueHasChanged,
20271
20346
  context,
20272
20347
  disabled
20273
20348
  } = t0;
20349
+ const minimalistView = minimalistViewProp || property.minimalistView;
20274
20350
  let resolvedProperties = "resolvedProperties" in property ? property.resolvedProperties : void 0;
20275
20351
  if (!resolvedProperties) {
20276
20352
  let t12;
@@ -23023,10 +23099,10 @@ function EntityFullScreenRoute({
23023
23099
  }
23024
23100
  const lastCollectionEntry = navigationEntries.findLast((entry_1) => entry_1.type === "collection");
23025
23101
  if (isNew && !lastCollectionEntry) {
23026
- throw new Error("No collection found in the navigation");
23102
+ throw new Error("INTERNAL: No collection found in the navigation");
23027
23103
  }
23028
23104
  if (!isNew && !lastEntityEntry) {
23029
- throw new Error("No entity found in the navigation");
23105
+ return /* @__PURE__ */ jsx(NotFoundPage, {});
23030
23106
  }
23031
23107
  const collection = isNew ? lastCollectionEntry.collection : lastEntityEntry.parentCollection;
23032
23108
  const collectionPath = navigation.resolveIdsFrom(isNew ? lastCollectionEntry.path : lastEntityEntry.path);