@firecms/core 3.0.0-canary.178 → 3.0.0-canary.179

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
@@ -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, 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";
5
+ import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, IconButton, InfoIcon, Typography, cls, ContentCopyIcon, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, ErrorIcon, 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";
@@ -615,7 +615,7 @@ function FieldHelperText(t0) {
615
615
  return t6;
616
616
  }
617
617
  const LabelWithIcon = forwardRef((t0, ref) => {
618
- const $ = c(8);
618
+ const $ = c(11);
619
619
  const {
620
620
  icon,
621
621
  title,
@@ -623,33 +623,42 @@ const LabelWithIcon = forwardRef((t0, ref) => {
623
623
  className,
624
624
  required
625
625
  } = t0;
626
- const t1 = `inline-flex items-center my-0.5 ${small ? "gap-1" : "gap-2"} ${className ?? ""}`;
627
- const t2 = `text-start font-medium text-${small ? "base" : "sm"} origin-top-left transform ${small ? "translate-x-2 scale-75" : ""}`;
628
- const t3 = (title ?? "") + (required ? " *" : "");
629
- let t4;
630
- if ($[0] !== t2 || $[1] !== t3) {
631
- t4 = /* @__PURE__ */ jsx("span", { className: t2, children: t3 });
632
- $[0] = t2;
633
- $[1] = t3;
634
- $[2] = t4;
626
+ const t1 = small ? "gap-1" : "gap-2";
627
+ let t2;
628
+ if ($[0] !== className || $[1] !== t1) {
629
+ t2 = cls("inline-flex items-center my-0.5", t1, className);
630
+ $[0] = className;
631
+ $[1] = t1;
632
+ $[2] = t2;
635
633
  } else {
636
- t4 = $[2];
634
+ t2 = $[2];
637
635
  }
636
+ const t3 = `text-start font-medium text-${small ? "base" : "sm"} origin-top-left transform ${small ? "translate-x-2 scale-75" : ""}`;
637
+ const t4 = (title ?? "") + (required ? " *" : "");
638
638
  let t5;
639
- if ($[3] !== icon || $[4] !== ref || $[5] !== t1 || $[6] !== t4) {
640
- t5 = /* @__PURE__ */ jsxs("div", { ref, className: t1, children: [
639
+ if ($[3] !== t3 || $[4] !== t4) {
640
+ t5 = /* @__PURE__ */ jsx("span", { className: t3, children: t4 });
641
+ $[3] = t3;
642
+ $[4] = t4;
643
+ $[5] = t5;
644
+ } else {
645
+ t5 = $[5];
646
+ }
647
+ let t6;
648
+ if ($[6] !== icon || $[7] !== ref || $[8] !== t2 || $[9] !== t5) {
649
+ t6 = /* @__PURE__ */ jsxs("div", { ref, className: t2, children: [
641
650
  icon,
642
- t4
651
+ t5
643
652
  ] });
644
- $[3] = icon;
645
- $[4] = ref;
646
- $[5] = t1;
647
- $[6] = t4;
648
- $[7] = t5;
653
+ $[6] = icon;
654
+ $[7] = ref;
655
+ $[8] = t2;
656
+ $[9] = t5;
657
+ $[10] = t6;
649
658
  } else {
650
- t5 = $[7];
659
+ t6 = $[10];
651
660
  }
652
- return t5;
661
+ return t6;
653
662
  });
654
663
  LabelWithIcon.displayName = "LabelWithIcon";
655
664
  function PropertyIdCopyTooltip(t0) {
@@ -669,7 +678,7 @@ function PropertyIdCopyTooltip(t0) {
669
678
  }
670
679
  let t2;
671
680
  if ($[2] !== children || $[3] !== className || $[4] !== t1) {
672
- t2 = /* @__PURE__ */ jsx(Tooltip, { title: t1, delayDuration: 800, side: "top", asChild: false, align: "start", sideOffset: 8, className, children });
681
+ t2 = /* @__PURE__ */ jsx(Tooltip, { title: t1, delayDuration: 800, side: "top", align: "start", sideOffset: 8, className, children });
673
682
  $[2] = children;
674
683
  $[3] = className;
675
684
  $[4] = t1;
@@ -3376,6 +3385,7 @@ function mergeCollection(target, source, parentPaths = [], modifyCollection) {
3376
3385
  });
3377
3386
  if (modifiedCollection) resultCollection = modifiedCollection;
3378
3387
  }
3388
+ resultCollection["merged"] = true;
3379
3389
  return resultCollection;
3380
3390
  }
3381
3391
  function mergePropertyOrBuilder(target, source) {
@@ -8035,15 +8045,26 @@ const VirtualTableCell = React__default.memo(function VirtualTableCell2(props) {
8035
8045
  return equal(a.rowData, b.rowData) && equal(a.column, b.column) && equal(a.cellData, b.cellData) && equal(a.rowIndex, b.rowIndex) && equal(a.cellRenderer, b.cellRenderer) && equal(a.columnIndex, b.columnIndex);
8036
8046
  });
8037
8047
  function useDebounceCallback(callback, delay) {
8048
+ const $ = c(3);
8038
8049
  const timeoutRef = useRef(null);
8039
- const debouncedCallback = useCallback((...args) => {
8040
- if (timeoutRef.current !== null) {
8041
- clearTimeout(timeoutRef.current);
8042
- }
8043
- timeoutRef.current = window.setTimeout(() => {
8044
- callback?.(...args);
8045
- }, delay);
8046
- }, [callback, delay]);
8050
+ let t0;
8051
+ if ($[0] !== callback || $[1] !== delay) {
8052
+ t0 = (...t1) => {
8053
+ const args = t1;
8054
+ if (timeoutRef.current !== null) {
8055
+ clearTimeout(timeoutRef.current);
8056
+ }
8057
+ timeoutRef.current = window.setTimeout(() => {
8058
+ callback?.(...args);
8059
+ }, delay);
8060
+ };
8061
+ $[0] = callback;
8062
+ $[1] = delay;
8063
+ $[2] = t0;
8064
+ } else {
8065
+ t0 = $[2];
8066
+ }
8067
+ const debouncedCallback = t0;
8047
8068
  return debouncedCallback;
8048
8069
  }
8049
8070
  const VirtualListContext = createContext({});
@@ -9606,16 +9627,16 @@ function useTableSearchHelper(t0) {
9606
9627
  t12 = $[14];
9607
9628
  }
9608
9629
  const searchBlocked = t12;
9609
- let t22;
9630
+ let t2;
9610
9631
  if ($[15] !== customizationController.plugins || $[16] !== dataSource?.initTextSearch) {
9611
- t22 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$k);
9632
+ t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$k);
9612
9633
  $[15] = customizationController.plugins;
9613
9634
  $[16] = dataSource?.initTextSearch;
9614
- $[17] = t22;
9635
+ $[17] = t2;
9615
9636
  } else {
9616
- t22 = $[17];
9637
+ t2 = $[17];
9617
9638
  }
9618
- const addTextSearchClickListener = t22;
9639
+ const addTextSearchClickListener = t2;
9619
9640
  if (addTextSearchClickListener) {
9620
9641
  let t3;
9621
9642
  if ($[18] !== addTextSearchClickListener || $[19] !== collection || $[20] !== context || $[21] !== customizationController.plugins || $[22] !== dataSource || $[23] !== fullPath || $[24] !== parentCollectionIds || $[25] !== props || $[26] !== searchBlocked) {
@@ -9682,24 +9703,23 @@ function useTableSearchHelper(t0) {
9682
9703
  textSearchEnabled = $[6];
9683
9704
  onTextSearchClick = $[7];
9684
9705
  }
9685
- const t1 = textSearchEnabled;
9686
- let t2;
9687
- if ($[28] !== onTextSearchClick || $[29] !== t1 || $[30] !== textSearchInitialised || $[31] !== textSearchLoading) {
9688
- t2 = {
9706
+ let t1;
9707
+ if ($[28] !== onTextSearchClick || $[29] !== textSearchEnabled || $[30] !== textSearchInitialised || $[31] !== textSearchLoading) {
9708
+ t1 = {
9689
9709
  textSearchLoading,
9690
9710
  textSearchInitialised,
9691
9711
  onTextSearchClick,
9692
- textSearchEnabled: t1
9712
+ textSearchEnabled
9693
9713
  };
9694
9714
  $[28] = onTextSearchClick;
9695
- $[29] = t1;
9715
+ $[29] = textSearchEnabled;
9696
9716
  $[30] = textSearchInitialised;
9697
9717
  $[31] = textSearchLoading;
9698
- $[32] = t2;
9718
+ $[32] = t1;
9699
9719
  } else {
9700
- t2 = $[32];
9720
+ t1 = $[32];
9701
9721
  }
9702
- return t2;
9722
+ return t1;
9703
9723
  }
9704
9724
  function _temp$k(p_0) {
9705
9725
  return Boolean(p_0.collectionView?.onTextSearchClick);
@@ -11042,7 +11062,7 @@ function _temp$h(e_0) {
11042
11062
  return e_0.item.url;
11043
11063
  }
11044
11064
  function EntityCollectionViewActions(t0) {
11045
- const $ = c(39);
11065
+ const $ = c(41);
11046
11066
  const {
11047
11067
  collection,
11048
11068
  relativePath,
@@ -11115,16 +11135,16 @@ function EntityCollectionViewActions(t0) {
11115
11135
  }
11116
11136
  const button = t42;
11117
11137
  const t52 = multipleDeleteEnabled ? "Delete" : "You have selected at least one entity you cannot delete";
11118
- let t6;
11138
+ let t62;
11119
11139
  if ($[17] !== button || $[18] !== t52) {
11120
- t6 = /* @__PURE__ */ jsx(Tooltip, { title: t52, children: button });
11140
+ t62 = /* @__PURE__ */ jsx(Tooltip, { title: t52, children: button });
11121
11141
  $[17] = button;
11122
11142
  $[18] = t52;
11123
- $[19] = t6;
11143
+ $[19] = t62;
11124
11144
  } else {
11125
- t6 = $[19];
11145
+ t62 = $[19];
11126
11146
  }
11127
- multipleDeleteButton = t6;
11147
+ multipleDeleteButton = t62;
11128
11148
  }
11129
11149
  let t4;
11130
11150
  if ($[20] !== collection || $[21] !== collectionEntitiesCount || $[22] !== context || $[23] !== parentCollectionIds || $[24] !== path || $[25] !== relativePath || $[26] !== selectionController || $[27] !== tableController) {
@@ -11177,20 +11197,28 @@ function EntityCollectionViewActions(t0) {
11177
11197
  actions = $[32];
11178
11198
  }
11179
11199
  let t5;
11180
- if ($[35] !== actions || $[36] !== addButton || $[37] !== multipleDeleteButton) {
11181
- t5 = /* @__PURE__ */ jsxs(Fragment, { children: [
11182
- actions,
11200
+ if ($[35] !== actions) {
11201
+ t5 = /* @__PURE__ */ jsx(ErrorBoundary, { children: actions });
11202
+ $[35] = actions;
11203
+ $[36] = t5;
11204
+ } else {
11205
+ t5 = $[36];
11206
+ }
11207
+ let t6;
11208
+ if ($[37] !== addButton || $[38] !== multipleDeleteButton || $[39] !== t5) {
11209
+ t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
11210
+ t5,
11183
11211
  multipleDeleteButton,
11184
11212
  addButton
11185
11213
  ] });
11186
- $[35] = actions;
11187
- $[36] = addButton;
11188
- $[37] = multipleDeleteButton;
11189
- $[38] = t5;
11214
+ $[37] = addButton;
11215
+ $[38] = multipleDeleteButton;
11216
+ $[39] = t5;
11217
+ $[40] = t6;
11190
11218
  } else {
11191
- t5 = $[38];
11219
+ t6 = $[40];
11192
11220
  }
11193
- return t5;
11221
+ return t6;
11194
11222
  }
11195
11223
  function useDraggable({
11196
11224
  containerRef,
@@ -11531,7 +11559,7 @@ function FormLayout(t0) {
11531
11559
  } = t0;
11532
11560
  let t1;
11533
11561
  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);
11562
+ t1 = cls("relative flex flex-row max-w-4xl lg:max-w-3xl xl:max-w-4xl 2xl:max-w-6xl w-full h-fit", className);
11535
11563
  $[0] = className;
11536
11564
  $[1] = t1;
11537
11565
  } else {
@@ -11597,7 +11625,6 @@ function EntityEditViewInner({
11597
11625
  if (collection.customId && collection.formAutoSave) {
11598
11626
  console.warn(`The collection ${collection.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);
11599
11627
  }
11600
- const actionsAtTheBottom = !largeLayout || layout === "side_panel";
11601
11628
  const [saving, setSaving] = useState(false);
11602
11629
  const [valuesToBeSaved, setValuesToBeSaved] = useState(void 0);
11603
11630
  useDebouncedCallback(valuesToBeSaved, () => {
@@ -11660,19 +11687,19 @@ function EntityEditViewInner({
11660
11687
  const autoSave = collection.formAutoSave && !collection.customId;
11661
11688
  const hasAdditionalViews = customViewsCount > 0 || subcollectionsCount > 0;
11662
11689
  const [usedEntity, setUsedEntity] = useState(entity);
11663
- const [readOnly, setReadOnly] = useState(void 0);
11664
11690
  const baseDataSourceValuesRef = useRef(cachedDirtyValues ?? getDataSourceEntityValues(initialResolvedCollection, status, usedEntity));
11665
11691
  useEffect(() => {
11666
11692
  if (entity) setUsedEntity(entity);
11667
11693
  }, [entity]);
11668
- useEffect(() => {
11669
- if (status === "new") {
11670
- setReadOnly(false);
11694
+ const canEdit = useMemo(() => {
11695
+ if (status === "new" || status === "copy") {
11696
+ return true;
11671
11697
  } else {
11672
- const editEnabled = usedEntity ? canEditEntity(collection, authController, path, usedEntity ?? null) : false;
11673
- if (usedEntity) setReadOnly(!editEnabled);
11698
+ return usedEntity ? canEditEntity(collection, authController, path, usedEntity ?? null) : false;
11674
11699
  }
11675
11700
  }, [authController, usedEntity, status]);
11701
+ const readOnly = !canEdit;
11702
+ console.log("readOnly", readOnly);
11676
11703
  const onPreSaveHookError = useCallback((e) => {
11677
11704
  setSaving(false);
11678
11705
  snackbarController.open({
@@ -11864,7 +11891,8 @@ function EntityEditViewInner({
11864
11891
  };
11865
11892
  const resolvedEntityViews = customViews ? customViews.map((e_4) => resolveEntityView(e_4, customizationController.entityViews)).filter(Boolean) : [];
11866
11893
  const selectedEntityView = resolvedEntityViews.find((e_5) => e_5.key === selectedTab);
11867
- const shouldShowEntityActions = selectedTab === MAIN_TAB_VALUE || selectedEntityView?.includeActions;
11894
+ const shouldShowEntityActions = !readOnly && (selectedTab === MAIN_TAB_VALUE || selectedEntityView?.includeActions);
11895
+ const actionsAtTheBottom = !largeLayout || layout === "side_panel" || shouldShowEntityActions === "bottom";
11868
11896
  const secondaryForms = customViews && resolvedEntityViews.filter((e_6) => e_6.includeActions).map((customView, colIndex) => {
11869
11897
  if (!customView) return null;
11870
11898
  const Builder = customView.Builder;
@@ -11872,7 +11900,7 @@ function EntityEditViewInner({
11872
11900
  console.error("customView.Builder is not defined");
11873
11901
  return null;
11874
11902
  }
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}`);
11903
+ return /* @__PURE__ */ jsx(FormLayout, { className: selectedTab !== customView.key ? "hidden" : "", formex, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Builder, { collection, entity: usedEntity, modifiedValues: formex.values ?? usedEntity?.values, formContext }) }) }, `custom_view_${customView.key}`);
11876
11904
  }).filter(Boolean);
11877
11905
  const customViewsView = customViews && resolvedEntityViews.filter((e_7) => !e_7.includeActions).map((customView_0, colIndex_0) => {
11878
11906
  if (!customView_0) return null;
@@ -11881,16 +11909,16 @@ function EntityEditViewInner({
11881
11909
  console.error("customView.Builder is not defined");
11882
11910
  return null;
11883
11911
  }
11884
- return /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "relative flex-grow w-full h-full overflow-auto", {
11912
+ return /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "relative flex-1 w-full h-full overflow-auto", {
11885
11913
  "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}`);
11914
+ }), role: "tabpanel", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Builder_0, { collection, entity: usedEntity, modifiedValues: formex.values ?? usedEntity?.values, formContext }) }) }, `custom_view_${customView_0.key}`);
11887
11915
  }).filter(Boolean);
11888
11916
  const globalLoading = dataLoading && !usedEntity || (!usedEntity || readOnly === void 0) && (status === "existing" || status === "copy");
11889
11917
  const subCollectionsViews = subcollections && subcollections.map((subcollection, colIndex_1) => {
11890
11918
  const subcollectionId = subcollection.id ?? subcollection.path;
11891
11919
  const fullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
11892
11920
  if (selectedTab !== subcollectionId) return null;
11893
- return /* @__PURE__ */ jsxs("div", { className: "relative flex-grow h-full overflow-auto w-full", role: "tabpanel", children: [
11921
+ return /* @__PURE__ */ jsxs("div", { className: "relative flex-1 h-full overflow-auto w-full", role: "tabpanel", children: [
11894
11922
  globalLoading || saving && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
11895
11923
  !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" }) }))
11896
11924
  ] }, `subcol_${subcollectionId}`);
@@ -12005,15 +12033,18 @@ function EntityEditViewInner({
12005
12033
  });
12006
12034
  }
12007
12035
  }, [formex.isSubmitting, autoSave, underlyingChanges, entity, formex.values, formex.touched, formex.setFieldValue]);
12008
- const formFields = /* @__PURE__ */ jsx(Fragment, { children: getFormFieldKeys(resolvedCollection).map((key_1) => {
12009
- const property_0 = resolvedCollection.properties[key_1];
12036
+ const formFieldKeys = getFormFieldKeys(resolvedCollection);
12037
+ formFieldKeys.map((key_1) => resolvedCollection.properties[key_1]);
12038
+ const formFields = /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-x-4 w-full space-y-8", children: formFieldKeys.map((key_2) => {
12039
+ const property_0 = resolvedCollection.properties[key_2];
12010
12040
  if (property_0) {
12011
- const underlyingValueHasChanged = !!underlyingChanges && Object.keys(underlyingChanges).includes(key_1) && formex.touched[key_1];
12041
+ const underlyingValueHasChanged = !!underlyingChanges && Object.keys(underlyingChanges).includes(key_2) && formex.touched[key_2];
12012
12042
  const disabled = !autoSave && formex.isSubmitting || isReadOnly(property_0) || Boolean(property_0.disabled);
12013
12043
  const hidden = isHidden(property_0);
12014
12044
  if (hidden) return null;
12045
+ const widthPercentage = property_0.widthPercentage ?? 100;
12015
12046
  const cmsFormFieldProps = {
12016
- propertyKey: key_1,
12047
+ propertyKey: key_2,
12017
12048
  disabled,
12018
12049
  property: property_0,
12019
12050
  includeDescription: property_0.description || property_0.longDescription,
@@ -12023,24 +12054,26 @@ function EntityEditViewInner({
12023
12054
  minimalistView: false,
12024
12055
  autoFocus: false
12025
12056
  };
12026
- return /* @__PURE__ */ jsx("div", { id: `form_field_${key_1}`, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...cmsFormFieldProps }) }) }, `field_${resolvedCollection.name}_${key_1}`);
12057
+ return /* @__PURE__ */ jsx("div", { id: `form_field_${key_2}`, className: "relative", style: {
12058
+ width: widthPercentage === 100 ? "100%" : `calc(${widthPercentage}% - 8px)`
12059
+ }, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...cmsFormFieldProps }) }) }, `field_${resolvedCollection.name}_${key_2}`);
12027
12060
  }
12028
- const additionalField = resolvedCollection.additionalFields?.find((f) => f.key === key_1);
12061
+ const additionalField = resolvedCollection.additionalFields?.find((f) => f.key === key_2);
12029
12062
  if (additionalField && entity) {
12030
12063
  const Builder_1 = additionalField.Builder;
12031
12064
  if (!Builder_1 && !additionalField.value) {
12032
12065
  throw new Error("When using additional fields you need to provide a Builder or a value");
12033
12066
  }
12034
- const child = Builder_1 ? /* @__PURE__ */ jsx(Builder_1, { entity, context }) : /* @__PURE__ */ jsx(Fragment, { children: additionalField.value?.({
12067
+ const child = Builder_1 ? /* @__PURE__ */ jsx(Builder_1, { entity, context }) : /* @__PURE__ */ jsx("div", { className: "w-full", children: additionalField.value?.({
12035
12068
  entity,
12036
12069
  context
12037
12070
  })?.toString() });
12038
- return /* @__PURE__ */ jsxs("div", { children: [
12039
- /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey: key_1, icon: /* @__PURE__ */ jsx(NotesIcon, { size: "small" }), title: additionalField.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
12040
- /* @__PURE__ */ jsx("div", { className: cls(paperMixin, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"), children: /* @__PURE__ */ jsx(ErrorBoundary, { children: child }) })
12041
- ] }, `additional_${key_1}`);
12071
+ return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
12072
+ /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey: key_2, icon: /* @__PURE__ */ jsx(NotesIcon, { size: "small" }), title: additionalField.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
12073
+ /* @__PURE__ */ jsx("div", { className: cls(paperMixin, "w-full min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"), children: /* @__PURE__ */ jsx(ErrorBoundary, { children: child }) })
12074
+ ] }, `additional_${key_2}`);
12042
12075
  }
12043
- console.warn(`Property ${key_1} not found in collection ${resolvedCollection.name} in properties or additional fields. Skipping.`);
12076
+ console.warn(`Property ${key_2} not found in collection ${resolvedCollection.name} in properties or additional fields. Skipping.`);
12044
12077
  return null;
12045
12078
  }).filter(Boolean) });
12046
12079
  const disabled_0 = formex.isSubmitting || !modified && status === "existing";
@@ -12082,7 +12115,7 @@ function EntityEditViewInner({
12082
12115
  /* @__PURE__ */ jsxs("div", { className: "w-full py-2 flex flex-col items-start mt-4 lg:mt-8 mb-8", children: [
12083
12116
  /* @__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 }),
12084
12117
  /* @__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: [
12085
- path,
12118
+ entity?.path ?? path,
12086
12119
  "/",
12087
12120
  entityId
12088
12121
  ] }) })
@@ -12093,9 +12126,9 @@ function EntityEditViewInner({
12093
12126
  /* @__PURE__ */ jsx(ErrorFocus, { containerRef: formRef })
12094
12127
  ] }) }),
12095
12128
  actionsAtTheBottom && /* @__PURE__ */ jsx("div", { className: "h-16" })
12096
- ] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
12129
+ ] }) }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
12097
12130
  /* @__PURE__ */ jsx(Typography, { className: "mt-16 mb-8 mx-8", variant: "h4", children: collection.singularName ?? collection.name }),
12098
- /* @__PURE__ */ jsx(EntityView, { className: "px-12", entity: usedEntity, path, collection })
12131
+ /* @__PURE__ */ jsx(EntityView, { className: "px-8", entity: usedEntity, path, collection })
12099
12132
  ] });
12100
12133
  const subcollectionTabs = subcollections && subcollections.map((subcollection_0) => /* @__PURE__ */ jsx(Tab, { className: "text-sm min-w-[120px]", value: subcollection_0.id, children: subcollection_0.name }, `entity_detail_collection_tab_${subcollection_0.name}`));
12101
12134
  const customViewTabs = resolvedEntityViews.map((view) => /* @__PURE__ */ jsx(Tab, { className: "text-sm min-w-[120px]", value: view.key, children: view.name }, `entity_detail_collection_tab_${view.name}`));
@@ -12103,6 +12136,7 @@ function EntityEditViewInner({
12103
12136
  if (entityId && onIdChange) onIdChange(entityId);
12104
12137
  }, [entityId, onIdChange]);
12105
12138
  const shouldShowTopBar = Boolean(barActions) || hasAdditionalViews;
12139
+ const shouldIncludeForm = selectedTab === MAIN_TAB_VALUE || selectedEntityView?.includeActions;
12106
12140
  let result = /* @__PURE__ */ jsxs("div", { className: "relative flex flex-col h-full w-full bg-white dark:bg-surface-900", children: [
12107
12141
  shouldShowTopBar && /* @__PURE__ */ jsxs("div", { className: cls("h-14 flex overflow-visible overflow-x-scroll w-full no-scrollbar h-14 border-b pl-2 pr-2 pt-1 flex items-end bg-surface-50 dark:bg-surface-900", defaultBorderMixin), children: [
12108
12142
  barActions,
@@ -12122,7 +12156,7 @@ function EntityEditViewInner({
12122
12156
  values: getDataSourceEntityValues(initialResolvedCollection, status, entity)
12123
12157
  });
12124
12158
  return onDiscard();
12125
- }, noValidate: true, className: "flex-1 flex flex-row w-full overflow-y-auto justify-center", children: [
12159
+ }, noValidate: true, className: cls("flex-1 flex flex-row w-full overflow-y-auto justify-center", shouldIncludeForm ? "" : "hidden"), children: [
12126
12160
  /* @__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
12161
  secondaryForms,
12128
12162
  shouldShowEntityActions && dialogActions
@@ -12181,6 +12215,7 @@ function buildBottomActions({
12181
12215
  pluginActions,
12182
12216
  layout
12183
12217
  }) {
12218
+ const canClose = layout === "side_panel";
12184
12219
  return /* @__PURE__ */ jsxs(DialogActions, { position: "absolute", children: [
12185
12220
  savingError && /* @__PURE__ */ jsx("div", { className: "text-right", children: /* @__PURE__ */ jsx(Typography, { color: "error", children: savingError.message }) }),
12186
12221
  entity && formActions.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: formActions.map((action) => /* @__PURE__ */ jsx(IconButton, { color: "primary", onClick: (event) => {
@@ -12196,14 +12231,14 @@ function buildBottomActions({
12196
12231
  }, children: action.icon }, action.name)) }),
12197
12232
  pluginActions,
12198
12233
  /* @__PURE__ */ jsx(Button, { variant: "text", disabled: disabled || isSubmitting, type: "reset", children: status === "existing" ? "Discard" : "Clear" }),
12199
- /* @__PURE__ */ jsxs(Button, { variant: "text", color: "primary", type: "submit", disabled: disabled || isSubmitting, onClick: () => {
12234
+ /* @__PURE__ */ jsxs(Button, { variant: canClose ? "text" : "filled", color: "primary", type: "submit", disabled: disabled || isSubmitting, onClick: () => {
12200
12235
  setPendingClose?.(false);
12201
12236
  }, children: [
12202
12237
  status === "existing" && "Save",
12203
12238
  status === "copy" && "Create copy",
12204
12239
  status === "new" && "Create"
12205
12240
  ] }),
12206
- /* @__PURE__ */ jsxs(LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, disabled, onClick: () => {
12241
+ canClose && /* @__PURE__ */ jsxs(LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, disabled, onClick: () => {
12207
12242
  setPendingClose?.(true);
12208
12243
  }, children: [
12209
12244
  status === "existing" && "Save and close",
@@ -12225,7 +12260,7 @@ function buildSideActions({
12225
12260
  setPendingClose,
12226
12261
  pluginActions
12227
12262
  }) {
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: [
12263
+ return /* @__PURE__ */ jsxs("div", { className: cls("overflow-auto h-full flex flex-col gap-2 w-80 2xl:w-96 px-4 py-16 sticky top-0 border-l", defaultBorderMixin), children: [
12229
12264
  /* @__PURE__ */ jsxs(LoadingButton, { fullWidth: true, variant: "filled", color: "primary", type: "submit", size: "large", disabled: disabled || isSubmitting, onClick: () => {
12230
12265
  setPendingClose?.(false);
12231
12266
  }, children: [
@@ -14067,7 +14102,7 @@ function ReferenceWidget({
14067
14102
  ] });
14068
14103
  }
14069
14104
  const UPDATE_SEARCH_INDEX_WAIT_MS = 220;
14070
- if (iconSynonyms && process.env.NODE_ENV !== "production") {
14105
+ if (process.env.NODE_ENV !== "production") {
14071
14106
  Object.keys(iconSynonyms).forEach((icon) => {
14072
14107
  if (!iconKeys.includes(icon)) {
14073
14108
  console.warn(`The icon ${icon} no longer exists. Remove it from \`iconSynonyms\``);
@@ -14285,9 +14320,8 @@ function getParentReferencesFromPath(props) {
14285
14320
  const subpathCombination = subpathCombinations[i];
14286
14321
  const collection = collections && collections.find((entry) => entry.id === subpathCombination || entry.path === subpathCombination);
14287
14322
  if (collection) {
14288
- const path2 = collection.path;
14289
- const collectionPath = currentFullPath && currentFullPath.length > 0 ? currentFullPath + "/" + path2 : path2;
14290
- const restOfThePath = removeInitialAndTrailingSlashes(removeInitialAndTrailingSlashes(path2).replace(subpathCombination, ""));
14323
+ const collectionPath = currentFullPath && currentFullPath.length > 0 ? currentFullPath + "/" + collection.path : collection.path;
14324
+ const restOfThePath = removeInitialAndTrailingSlashes(removeInitialAndTrailingSlashes(path).replace(subpathCombination, ""));
14291
14325
  const nextSegments = restOfThePath.length > 0 ? restOfThePath.split("/") : [];
14292
14326
  if (nextSegments.length > 0) {
14293
14327
  const entityId = nextSegments[0];
@@ -16419,7 +16453,7 @@ function ArrayOneOfPreview(t0) {
16419
16453
  return t3;
16420
16454
  }
16421
16455
  function MapPropertyPreview(t0) {
16422
- const $ = c(12);
16456
+ const $ = c(15);
16423
16457
  const {
16424
16458
  value,
16425
16459
  property,
@@ -16444,53 +16478,50 @@ function MapPropertyPreview(t0) {
16444
16478
  return null;
16445
16479
  }
16446
16480
  let t1;
16447
- let t2;
16448
- let t3;
16449
- if ($[2] !== mapProperty.name || $[3] !== mapProperty.properties || $[4] !== size || $[5] !== value) {
16450
- t3 = Symbol.for("react.early_return_sentinel");
16451
- bb0: {
16452
- const mapPropertyKeys = Object.keys(mapProperty.properties);
16453
- if (size === "small") {
16454
- t3 = /* @__PURE__ */ jsx("div", { className: "w-full flex flex-col space-y-1 md:space-y-2", children: mapPropertyKeys.map((key, index) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key, value: value[key], property: mapProperty.properties[key], size }) }, "map_preview_" + mapProperty.name + key + index) }, `map_${key}`)) });
16455
- break bb0;
16456
- }
16457
- t1 = "flex flex-col gap-1 w-full";
16458
- t2 = mapPropertyKeys && mapPropertyKeys.map((key_0, index_0) => {
16459
- const childProperty = mapProperty.properties[key_0];
16460
- return /* @__PURE__ */ jsxs("div", { className: cls(defaultBorderMixin, "last:border-b-0 border-b"), children: [
16461
- /* @__PURE__ */ jsxs("div", { className: "flex flex-row pt-0.5 pb-0.5 gap-2", children: [
16462
- /* @__PURE__ */ jsx("div", { className: "min-w-[140px] w-[25%] py-1", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-mono break-words", color: "secondary", children: childProperty.name }) }),
16463
- /* @__PURE__ */ jsx("div", { className: "flex-grow max-w-[75%]", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: !(childProperty.dataType === "map" || childProperty === "array") && /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key_0, value: value[key_0], property: childProperty, size }) }) })
16464
- ] }),
16465
- (childProperty.dataType === "map" || childProperty === "array") && /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "border-l pl-4 ml-2 my-2"), children: /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key_0, value: value[key_0], property: childProperty, size }) })
16466
- ] }, `map_preview_table_${key_0}}`);
16467
- });
16468
- }
16469
- $[2] = mapProperty.name;
16470
- $[3] = mapProperty.properties;
16471
- $[4] = size;
16472
- $[5] = value;
16473
- $[6] = t1;
16474
- $[7] = t2;
16475
- $[8] = t3;
16481
+ if ($[2] !== mapProperty.properties) {
16482
+ t1 = Object.keys(mapProperty.properties);
16483
+ $[2] = mapProperty.properties;
16484
+ $[3] = t1;
16476
16485
  } else {
16477
- t1 = $[6];
16478
- t2 = $[7];
16479
- t3 = $[8];
16486
+ t1 = $[3];
16480
16487
  }
16481
- if (t3 !== Symbol.for("react.early_return_sentinel")) {
16482
- return t3;
16488
+ const mapPropertyKeys = t1;
16489
+ if (size === "small") {
16490
+ let t22;
16491
+ if ($[4] !== mapProperty.name || $[5] !== mapProperty.properties || $[6] !== mapPropertyKeys || $[7] !== size || $[8] !== value) {
16492
+ t22 = /* @__PURE__ */ jsx("div", { className: "w-full flex flex-col space-y-1 md:space-y-2", children: mapPropertyKeys.map((key, index) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key, value: value[key], property: mapProperty.properties[key], size }) }, "map_preview_" + mapProperty.name + key + index) }, `map_${key}`)) });
16493
+ $[4] = mapProperty.name;
16494
+ $[5] = mapProperty.properties;
16495
+ $[6] = mapPropertyKeys;
16496
+ $[7] = size;
16497
+ $[8] = value;
16498
+ $[9] = t22;
16499
+ } else {
16500
+ t22 = $[9];
16501
+ }
16502
+ return t22;
16483
16503
  }
16484
- let t4;
16485
- if ($[9] !== t1 || $[10] !== t2) {
16486
- t4 = /* @__PURE__ */ jsx("div", { className: t1, children: t2 });
16487
- $[9] = t1;
16488
- $[10] = t2;
16489
- $[11] = t4;
16504
+ let t2;
16505
+ if ($[10] !== mapProperty.properties || $[11] !== mapPropertyKeys || $[12] !== size || $[13] !== value) {
16506
+ t2 = /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1 w-full", children: mapPropertyKeys && mapPropertyKeys.map((key_0, index_0) => {
16507
+ const childProperty = mapProperty.properties[key_0];
16508
+ return /* @__PURE__ */ jsxs("div", { className: cls(defaultBorderMixin, "last:border-b-0 border-b"), children: [
16509
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-row pt-0.5 pb-0.5 gap-2", children: [
16510
+ /* @__PURE__ */ jsx("div", { className: "min-w-[140px] w-[25%] py-1", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-mono break-words", color: "secondary", children: childProperty.name }) }),
16511
+ /* @__PURE__ */ jsx("div", { className: "flex-grow max-w-[75%]", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: !(childProperty.dataType === "map" || childProperty === "array") && /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key_0, value: value[key_0], property: childProperty, size }) }) })
16512
+ ] }),
16513
+ (childProperty.dataType === "map" || childProperty === "array") && /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "border-l pl-4 ml-2 my-2"), children: /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key_0, value: value[key_0], property: childProperty, size }) })
16514
+ ] }, `map_preview_table_${key_0}}`);
16515
+ }) });
16516
+ $[10] = mapProperty.properties;
16517
+ $[11] = mapPropertyKeys;
16518
+ $[12] = size;
16519
+ $[13] = value;
16520
+ $[14] = t2;
16490
16521
  } else {
16491
- t4 = $[11];
16522
+ t2 = $[14];
16492
16523
  }
16493
- return t4;
16524
+ return t2;
16494
16525
  }
16495
16526
  function KeyValuePreview(t0) {
16496
16527
  const $ = c(5);
@@ -17127,7 +17158,7 @@ function SelectFieldBinding(t0) {
17127
17158
  const t10 = property.validation?.required;
17128
17159
  let t11;
17129
17160
  if ($[13] !== property.name || $[14] !== t10 || $[15] !== t9) {
17130
- t11 = /* @__PURE__ */ jsx(LabelWithIcon, { icon: t9, required: t10, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" });
17161
+ t11 = /* @__PURE__ */ jsx(LabelWithIcon, { icon: t9, required: t10, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5 my-0" });
17131
17162
  $[13] = property.name;
17132
17163
  $[14] = t10;
17133
17164
  $[15] = t9;
@@ -17258,7 +17289,7 @@ function MultiSelectFieldBinding({
17258
17289
  ] }, enumKey);
17259
17290
  }, [enumValues, setValue, value]);
17260
17291
  return /* @__PURE__ */ jsxs(Fragment, { children: [
17261
- /* @__PURE__ */ jsx(MultiSelect, { className: "w-full mt-2", size: size === "medium" ? "medium" : "small", value: validValue ? value.map((v_0) => v_0.toString()) : [], disabled, modalPopover: true, label: /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" }), onValueChange: (updatedValue) => {
17292
+ /* @__PURE__ */ jsx(MultiSelect, { className: "w-full mt-2", size: size === "medium" ? "medium" : "small", value: validValue ? value.map((v_0) => v_0.toString()) : [], disabled, modalPopover: true, label: /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" }), onValueChange: (updatedValue) => {
17262
17293
  let newValue;
17263
17294
  if (of && of?.dataType === "number") {
17264
17295
  newValue = updatedValue ? updatedValue.map((e_1) => parseFloat(e_1)) : [];
@@ -17328,7 +17359,7 @@ function ArrayOfReferencesFieldBinding({
17328
17359
  return /* @__PURE__ */ jsx(ReferencePreview, { disabled: !ofProperty.path, previewProperties: ofProperty.previewProperties, size: "medium", onClick: onEntryClick, hover: !disabled, reference: entryValue, includeId: ofProperty.includeId, includeEntityLink: ofProperty.includeEntityLink }, internalId);
17329
17360
  }, [ofProperty.path, ofProperty.previewProperties, value]);
17330
17361
  const title = /* @__PURE__ */ jsxs(Fragment, { children: [
17331
- /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "flex flex-grow text-text-secondary dark:text-text-secondary-dark" }),
17362
+ /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 flex flex-grow text-text-secondary dark:text-text-secondary-dark" }),
17332
17363
  Array.isArray(value) && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "px-4", children: [
17333
17364
  "(",
17334
17365
  value.length,
@@ -17527,7 +17558,7 @@ function StorageUploadFieldBinding(t0) {
17527
17558
  const resolvedProperty = t6;
17528
17559
  let t7;
17529
17560
  if ($[19] !== minimalistView || $[20] !== property || $[21] !== propertyKey) {
17530
- t7 = !minimalistView && /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" });
17561
+ t7 = !minimalistView && /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8text-text-secondary dark:text-text-secondary-dark ml-3.5" });
17531
17562
  $[19] = minimalistView;
17532
17563
  $[20] = property;
17533
17564
  $[21] = propertyKey;
@@ -17889,7 +17920,7 @@ function StorageUpload({
17889
17920
  } }) });
17890
17921
  }
17891
17922
  function TextFieldBinding(t0) {
17892
- const $ = c(51);
17923
+ const $ = c(52);
17893
17924
  const {
17894
17925
  propertyKey,
17895
17926
  value,
@@ -17970,26 +18001,26 @@ function TextFieldBinding(t0) {
17970
18001
  isMultiline = $[10];
17971
18002
  onChange = $[11];
17972
18003
  }
17973
- let t4;
18004
+ const t4 = property.widthPercentage !== void 0 ? "mt-8" : void 0;
18005
+ let t5;
17974
18006
  if ($[12] !== property) {
17975
- t4 = getIconForProperty(property, "small");
18007
+ t5 = getIconForProperty(property, "small");
17976
18008
  $[12] = property;
17977
- $[13] = t4;
18009
+ $[13] = t5;
17978
18010
  } else {
17979
- t4 = $[13];
18011
+ t5 = $[13];
17980
18012
  }
17981
- const t5 = property.validation?.required;
17982
- let t6;
17983
- if ($[14] !== property.name || $[15] !== t4 || $[16] !== t5) {
17984
- t6 = /* @__PURE__ */ jsx(LabelWithIcon, { icon: t4, required: t5, title: property.name });
18013
+ const t6 = property.validation?.required;
18014
+ let t7;
18015
+ if ($[14] !== property.name || $[15] !== t5 || $[16] !== t6) {
18016
+ t7 = /* @__PURE__ */ jsx(LabelWithIcon, { icon: t5, required: t6, title: property.name });
17985
18017
  $[14] = property.name;
17986
- $[15] = t4;
17987
- $[16] = t5;
17988
- $[17] = t6;
18018
+ $[15] = t5;
18019
+ $[16] = t6;
18020
+ $[17] = t7;
17989
18021
  } else {
17990
- t6 = $[17];
18022
+ t7 = $[17];
17991
18023
  }
17992
- const t7 = inputType;
17993
18024
  let t8;
17994
18025
  if ($[18] !== handleClearClick || $[19] !== property.clearable) {
17995
18026
  t8 = property.clearable && /* @__PURE__ */ jsx(IconButton, { onClick: handleClearClick, children: /* @__PURE__ */ jsx(CloseIcon, {}) });
@@ -18002,73 +18033,74 @@ function TextFieldBinding(t0) {
18002
18033
  const t9 = showError ? error : void 0;
18003
18034
  const t10 = error ? "text-red-500 dark:text-red-600" : "";
18004
18035
  let t11;
18005
- if ($[21] !== autoFocus || $[22] !== disabled || $[23] !== isMultiline || $[24] !== onChange || $[25] !== size || $[26] !== t10 || $[27] !== t6 || $[28] !== t7 || $[29] !== t8 || $[30] !== t9 || $[31] !== value) {
18006
- t11 = /* @__PURE__ */ jsx(TextField, { size, value, onChange, autoFocus, label: t6, type: t7, multiline: isMultiline, disabled, endAdornment: t8, error: t9, inputClassName: t10 });
18036
+ if ($[21] !== autoFocus || $[22] !== disabled || $[23] !== inputType || $[24] !== isMultiline || $[25] !== onChange || $[26] !== size || $[27] !== t10 || $[28] !== t4 || $[29] !== t7 || $[30] !== t8 || $[31] !== t9 || $[32] !== value) {
18037
+ t11 = /* @__PURE__ */ jsx(TextField, { size, value, onChange, autoFocus, className: t4, label: t7, type: inputType, multiline: isMultiline, disabled, endAdornment: t8, error: t9, inputClassName: t10 });
18007
18038
  $[21] = autoFocus;
18008
18039
  $[22] = disabled;
18009
- $[23] = isMultiline;
18010
- $[24] = onChange;
18011
- $[25] = size;
18012
- $[26] = t10;
18013
- $[27] = t6;
18014
- $[28] = t7;
18015
- $[29] = t8;
18016
- $[30] = t9;
18017
- $[31] = value;
18018
- $[32] = t11;
18040
+ $[23] = inputType;
18041
+ $[24] = isMultiline;
18042
+ $[25] = onChange;
18043
+ $[26] = size;
18044
+ $[27] = t10;
18045
+ $[28] = t4;
18046
+ $[29] = t7;
18047
+ $[30] = t8;
18048
+ $[31] = t9;
18049
+ $[32] = value;
18050
+ $[33] = t11;
18019
18051
  } else {
18020
- t11 = $[32];
18052
+ t11 = $[33];
18021
18053
  }
18022
18054
  let t12;
18023
- if ($[33] !== propertyKey || $[34] !== t11) {
18055
+ if ($[34] !== propertyKey || $[35] !== t11) {
18024
18056
  t12 = /* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: t11 });
18025
- $[33] = propertyKey;
18026
- $[34] = t11;
18027
- $[35] = t12;
18057
+ $[34] = propertyKey;
18058
+ $[35] = t11;
18059
+ $[36] = t12;
18028
18060
  } else {
18029
- t12 = $[35];
18061
+ t12 = $[36];
18030
18062
  }
18031
18063
  let t13;
18032
- if ($[36] !== disabled || $[37] !== error || $[38] !== includeDescription || $[39] !== property || $[40] !== showError) {
18064
+ if ($[37] !== disabled || $[38] !== error || $[39] !== includeDescription || $[40] !== property || $[41] !== showError) {
18033
18065
  t13 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error, disabled, property });
18034
- $[36] = disabled;
18035
- $[37] = error;
18036
- $[38] = includeDescription;
18037
- $[39] = property;
18038
- $[40] = showError;
18039
- $[41] = t13;
18066
+ $[37] = disabled;
18067
+ $[38] = error;
18068
+ $[39] = includeDescription;
18069
+ $[40] = property;
18070
+ $[41] = showError;
18071
+ $[42] = t13;
18040
18072
  } else {
18041
- t13 = $[41];
18073
+ t13 = $[42];
18042
18074
  }
18043
18075
  let t14;
18044
- if ($[42] !== property || $[43] !== size || $[44] !== url || $[45] !== value) {
18076
+ if ($[43] !== property || $[44] !== size || $[45] !== url || $[46] !== value) {
18045
18077
  t14 = url && /* @__PURE__ */ jsx(Collapse, { className: "mt-1 ml-1", in: Boolean(value), children: /* @__PURE__ */ jsx(PropertyPreview, { value, property, size }) });
18046
- $[42] = property;
18047
- $[43] = size;
18048
- $[44] = url;
18049
- $[45] = value;
18050
- $[46] = t14;
18078
+ $[43] = property;
18079
+ $[44] = size;
18080
+ $[45] = url;
18081
+ $[46] = value;
18082
+ $[47] = t14;
18051
18083
  } else {
18052
- t14 = $[46];
18084
+ t14 = $[47];
18053
18085
  }
18054
18086
  let t15;
18055
- if ($[47] !== t12 || $[48] !== t13 || $[49] !== t14) {
18087
+ if ($[48] !== t12 || $[49] !== t13 || $[50] !== t14) {
18056
18088
  t15 = /* @__PURE__ */ jsxs(Fragment, { children: [
18057
18089
  t12,
18058
18090
  t13,
18059
18091
  t14
18060
18092
  ] });
18061
- $[47] = t12;
18062
- $[48] = t13;
18063
- $[49] = t14;
18064
- $[50] = t15;
18093
+ $[48] = t12;
18094
+ $[49] = t13;
18095
+ $[50] = t14;
18096
+ $[51] = t15;
18065
18097
  } else {
18066
- t15 = $[50];
18098
+ t15 = $[51];
18067
18099
  }
18068
18100
  return t15;
18069
18101
  }
18070
18102
  const SwitchFieldBinding = function SwitchFieldBinding2(t0) {
18071
- const $ = c(32);
18103
+ const $ = c(33);
18072
18104
  const {
18073
18105
  propertyKey,
18074
18106
  value,
@@ -18105,73 +18137,75 @@ const SwitchFieldBinding = function SwitchFieldBinding2(t0) {
18105
18137
  } else {
18106
18138
  t3 = $[5];
18107
18139
  }
18108
- let t4;
18140
+ const t4 = property.widthPercentage !== void 0 ? "mt-8" : void 0;
18141
+ let t5;
18109
18142
  if ($[6] !== property) {
18110
- t4 = getIconForProperty(property, "small");
18143
+ t5 = getIconForProperty(property, "small");
18111
18144
  $[6] = property;
18112
- $[7] = t4;
18145
+ $[7] = t5;
18113
18146
  } else {
18114
- t4 = $[7];
18147
+ t5 = $[7];
18115
18148
  }
18116
- const t5 = property.validation?.required;
18117
- let t6;
18118
- if ($[8] !== property.name || $[9] !== t4 || $[10] !== t5) {
18119
- t6 = /* @__PURE__ */ jsx(LabelWithIcon, { icon: t4, required: t5, title: property.name });
18149
+ const t6 = property.validation?.required;
18150
+ let t7;
18151
+ if ($[8] !== property.name || $[9] !== t5 || $[10] !== t6) {
18152
+ t7 = /* @__PURE__ */ jsx(LabelWithIcon, { icon: t5, required: t6, title: property.name });
18120
18153
  $[8] = property.name;
18121
- $[9] = t4;
18122
- $[10] = t5;
18123
- $[11] = t6;
18154
+ $[9] = t5;
18155
+ $[10] = t6;
18156
+ $[11] = t7;
18124
18157
  } else {
18125
- t6 = $[11];
18158
+ t7 = $[11];
18126
18159
  }
18127
- let t7;
18128
- if ($[12] !== autoFocus || $[13] !== disabled || $[14] !== showError || $[15] !== size || $[16] !== t3 || $[17] !== t6 || $[18] !== value) {
18129
- t7 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { value, onValueChange: t3, error: showError, label: t6, disabled, autoFocus, size });
18160
+ let t8;
18161
+ if ($[12] !== autoFocus || $[13] !== disabled || $[14] !== showError || $[15] !== size || $[16] !== t3 || $[17] !== t4 || $[18] !== t7 || $[19] !== value) {
18162
+ t8 = /* @__PURE__ */ jsx(BooleanSwitchWithLabel, { value, onValueChange: t3, error: showError, className: t4, label: t7, disabled, autoFocus, size });
18130
18163
  $[12] = autoFocus;
18131
18164
  $[13] = disabled;
18132
18165
  $[14] = showError;
18133
18166
  $[15] = size;
18134
18167
  $[16] = t3;
18135
- $[17] = t6;
18136
- $[18] = value;
18137
- $[19] = t7;
18168
+ $[17] = t4;
18169
+ $[18] = t7;
18170
+ $[19] = value;
18171
+ $[20] = t8;
18138
18172
  } else {
18139
- t7 = $[19];
18173
+ t8 = $[20];
18140
18174
  }
18141
- let t8;
18142
- if ($[20] !== propertyKey || $[21] !== t7) {
18143
- t8 = /* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: t7 });
18144
- $[20] = propertyKey;
18145
- $[21] = t7;
18175
+ let t9;
18176
+ if ($[21] !== propertyKey || $[22] !== t8) {
18177
+ t9 = /* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: t8 });
18178
+ $[21] = propertyKey;
18146
18179
  $[22] = t8;
18180
+ $[23] = t9;
18147
18181
  } else {
18148
- t8 = $[22];
18182
+ t9 = $[23];
18149
18183
  }
18150
- let t9;
18151
- if ($[23] !== disabled || $[24] !== error || $[25] !== includeDescription || $[26] !== property || $[27] !== showError) {
18152
- t9 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error, disabled, property });
18153
- $[23] = disabled;
18154
- $[24] = error;
18155
- $[25] = includeDescription;
18156
- $[26] = property;
18157
- $[27] = showError;
18158
- $[28] = t9;
18184
+ let t10;
18185
+ if ($[24] !== disabled || $[25] !== error || $[26] !== includeDescription || $[27] !== property || $[28] !== showError) {
18186
+ t10 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error, disabled, property });
18187
+ $[24] = disabled;
18188
+ $[25] = error;
18189
+ $[26] = includeDescription;
18190
+ $[27] = property;
18191
+ $[28] = showError;
18192
+ $[29] = t10;
18159
18193
  } else {
18160
- t9 = $[28];
18194
+ t10 = $[29];
18161
18195
  }
18162
- let t10;
18163
- if ($[29] !== t8 || $[30] !== t9) {
18164
- t10 = /* @__PURE__ */ jsxs(Fragment, { children: [
18165
- t8,
18166
- t9
18196
+ let t11;
18197
+ if ($[30] !== t10 || $[31] !== t9) {
18198
+ t11 = /* @__PURE__ */ jsxs(Fragment, { children: [
18199
+ t9,
18200
+ t10
18167
18201
  ] });
18168
- $[29] = t8;
18169
- $[30] = t9;
18170
- $[31] = t10;
18202
+ $[30] = t10;
18203
+ $[31] = t9;
18204
+ $[32] = t11;
18171
18205
  } else {
18172
- t10 = $[31];
18206
+ t11 = $[32];
18173
18207
  }
18174
- return t10;
18208
+ return t11;
18175
18209
  };
18176
18210
  function DateTimeFieldBinding(t0) {
18177
18211
  const $ = c(33);
@@ -18301,7 +18335,7 @@ function ReadOnlyFieldBinding(t0) {
18301
18335
  }
18302
18336
  let t1;
18303
18337
  if ($[0] !== minimalistView || $[1] !== property || $[2] !== propertyKey) {
18304
- t1 = !minimalistView && /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" });
18338
+ t1 = !minimalistView && /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" });
18305
18339
  $[0] = minimalistView;
18306
18340
  $[1] = property;
18307
18341
  $[2] = propertyKey;
@@ -18311,7 +18345,7 @@ function ReadOnlyFieldBinding(t0) {
18311
18345
  }
18312
18346
  let t2;
18313
18347
  if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
18314
- t2 = cls(paperMixin, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar");
18348
+ t2 = cls(paperMixin, "w-full min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar");
18315
18349
  $[4] = t2;
18316
18350
  } else {
18317
18351
  t2 = $[4];
@@ -18423,7 +18457,7 @@ function ReferenceFieldBindingInternal({
18423
18457
  referenceDialogController.open();
18424
18458
  };
18425
18459
  return /* @__PURE__ */ jsxs(Fragment, { children: [
18426
- !minimalistView && /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
18460
+ !minimalistView && /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
18427
18461
  !collection && /* @__PURE__ */ jsx(ErrorView, { error: "The specified collection does not exist. Check console" }),
18428
18462
  collection && /* @__PURE__ */ jsxs(Fragment, { children: [
18429
18463
  value && /* @__PURE__ */ jsx(ReferencePreview, { disabled: !property.path, previewProperties: property.previewProperties, hover: !disabled, size, onClick: disabled || isSubmitting ? void 0 : onEntryClick, reference: value, includeEntityLink: property.includeEntityLink, includeId: property.includeId }),
@@ -18525,7 +18559,7 @@ function PropertyFieldBindingInternal(t0) {
18525
18559
  if (!Component) {
18526
18560
  console.warn(`No field component found for property ${propertyKey}`);
18527
18561
  console.warn("Property:", property);
18528
- return /* @__PURE__ */ jsx("div", { children: `Currently the field ${resolvedProperty.dataType} is not supported` });
18562
+ return /* @__PURE__ */ jsx("div", { className: "w-full", children: `Currently the field ${resolvedProperty.dataType} is not supported` });
18529
18563
  }
18530
18564
  const componentProps = {
18531
18565
  propertyKey,
@@ -18689,7 +18723,7 @@ function useWrappedComponent({
18689
18723
  return wrapperRef.current;
18690
18724
  }
18691
18725
  function MapFieldBinding(t0) {
18692
- const $ = c(48);
18726
+ const $ = c(40);
18693
18727
  const {
18694
18728
  propertyKey,
18695
18729
  value,
@@ -18715,15 +18749,7 @@ function MapFieldBinding(t0) {
18715
18749
  if (value) {
18716
18750
  let t12;
18717
18751
  if ($[0] !== property.properties || $[1] !== value) {
18718
- let t22;
18719
- if ($[3] !== property.properties) {
18720
- t22 = (key) => key in property.properties;
18721
- $[3] = property.properties;
18722
- $[4] = t22;
18723
- } else {
18724
- t22 = $[4];
18725
- }
18726
- t12 = pick(property.properties, ...Object.keys(value).filter(t22));
18752
+ t12 = pick(property.properties, ...Object.keys(value).filter((key) => key in property.properties));
18727
18753
  $[0] = property.properties;
18728
18754
  $[1] = value;
18729
18755
  $[2] = t12;
@@ -18733,11 +18759,11 @@ function MapFieldBinding(t0) {
18733
18759
  mapProperties = t12;
18734
18760
  } else {
18735
18761
  let t12;
18736
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
18762
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
18737
18763
  t12 = {};
18738
- $[5] = t12;
18764
+ $[3] = t12;
18739
18765
  } else {
18740
- t12 = $[5];
18766
+ t12 = $[3];
18741
18767
  }
18742
18768
  mapProperties = t12;
18743
18769
  }
@@ -18745,9 +18771,9 @@ function MapFieldBinding(t0) {
18745
18771
  mapProperties = property.properties;
18746
18772
  }
18747
18773
  let t1;
18748
- if ($[6] !== autoFocus || $[7] !== context || $[8] !== disabled || $[9] !== includeDescription || $[10] !== mapProperties || $[11] !== onPropertyChange || $[12] !== propertyKey || $[13] !== underlyingValueHasChanged) {
18774
+ if ($[4] !== autoFocus || $[5] !== context || $[6] !== disabled || $[7] !== includeDescription || $[8] !== mapProperties || $[9] !== onPropertyChange || $[10] !== propertyKey || $[11] !== underlyingValueHasChanged) {
18749
18775
  let t22;
18750
- if ($[15] !== autoFocus || $[16] !== context || $[17] !== disabled || $[18] !== includeDescription || $[19] !== onPropertyChange || $[20] !== propertyKey || $[21] !== underlyingValueHasChanged) {
18776
+ if ($[13] !== autoFocus || $[14] !== context || $[15] !== disabled || $[16] !== includeDescription || $[17] !== onPropertyChange || $[18] !== propertyKey || $[19] !== underlyingValueHasChanged) {
18751
18777
  t22 = (t32, index) => {
18752
18778
  const [entryKey, childProperty] = t32;
18753
18779
  const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.disabled);
@@ -18771,106 +18797,86 @@ function MapFieldBinding(t0) {
18771
18797
  };
18772
18798
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...fieldBindingProps }) }) }, `map-${propertyKey}-${index}`);
18773
18799
  };
18774
- $[15] = autoFocus;
18775
- $[16] = context;
18776
- $[17] = disabled;
18777
- $[18] = includeDescription;
18778
- $[19] = onPropertyChange;
18779
- $[20] = propertyKey;
18780
- $[21] = underlyingValueHasChanged;
18781
- $[22] = t22;
18800
+ $[13] = autoFocus;
18801
+ $[14] = context;
18802
+ $[15] = disabled;
18803
+ $[16] = includeDescription;
18804
+ $[17] = onPropertyChange;
18805
+ $[18] = propertyKey;
18806
+ $[19] = underlyingValueHasChanged;
18807
+ $[20] = t22;
18782
18808
  } else {
18783
- t22 = $[22];
18809
+ t22 = $[20];
18784
18810
  }
18785
18811
  t1 = Object.entries(mapProperties).filter(_temp$7).map(t22);
18786
- $[6] = autoFocus;
18787
- $[7] = context;
18788
- $[8] = disabled;
18789
- $[9] = includeDescription;
18790
- $[10] = mapProperties;
18791
- $[11] = onPropertyChange;
18792
- $[12] = propertyKey;
18793
- $[13] = underlyingValueHasChanged;
18794
- $[14] = t1;
18812
+ $[4] = autoFocus;
18813
+ $[5] = context;
18814
+ $[6] = disabled;
18815
+ $[7] = includeDescription;
18816
+ $[8] = mapProperties;
18817
+ $[9] = onPropertyChange;
18818
+ $[10] = propertyKey;
18819
+ $[11] = underlyingValueHasChanged;
18820
+ $[12] = t1;
18795
18821
  } else {
18796
- t1 = $[14];
18822
+ t1 = $[12];
18797
18823
  }
18798
18824
  let t2;
18799
- if ($[23] !== t1) {
18825
+ if ($[21] !== t1) {
18800
18826
  t2 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "py-1 flex flex-col space-y-2", children: t1 }) });
18801
- $[23] = t1;
18802
- $[24] = t2;
18827
+ $[21] = t1;
18828
+ $[22] = t2;
18803
18829
  } else {
18804
- t2 = $[24];
18830
+ t2 = $[22];
18805
18831
  }
18806
18832
  const mapFormView = t2;
18807
18833
  let t3;
18808
- if ($[25] !== property) {
18809
- t3 = getIconForProperty(property, "small");
18810
- $[25] = property;
18811
- $[26] = t3;
18812
- } else {
18813
- t3 = $[26];
18814
- }
18815
- const t4 = property.validation?.required;
18816
- let t5;
18817
- if ($[27] !== property.name || $[28] !== propertyKey || $[29] !== t3 || $[30] !== t4) {
18818
- t5 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t3, required: t4, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark" });
18819
- $[27] = property.name;
18820
- $[28] = propertyKey;
18821
- $[29] = t3;
18822
- $[30] = t4;
18823
- $[31] = t5;
18824
- } else {
18825
- t5 = $[31];
18826
- }
18827
- const title = t5;
18828
- let t6;
18829
- if ($[32] !== expanded || $[33] !== mapFormView || $[34] !== minimalistView || $[35] !== onPropertyChange || $[36] !== title) {
18830
- t6 = !minimalistView && /* @__PURE__ */ jsx(ExpandablePanel, { initiallyExpanded: expanded, onExpandedChange: (expanded_0) => {
18834
+ if ($[23] !== expanded || $[24] !== mapFormView || $[25] !== minimalistView || $[26] !== onPropertyChange || $[27] !== property || $[28] !== propertyKey) {
18835
+ t3 = !minimalistView && /* @__PURE__ */ jsx(ExpandablePanel, { initiallyExpanded: expanded, onExpandedChange: (expanded_0) => {
18831
18836
  onPropertyChange?.({
18832
18837
  expanded: expanded_0
18833
18838
  });
18834
- }, innerClassName: "px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-white dark:bg-surface-900", title, children: mapFormView });
18835
- $[32] = expanded;
18836
- $[33] = mapFormView;
18837
- $[34] = minimalistView;
18838
- $[35] = onPropertyChange;
18839
- $[36] = title;
18840
- $[37] = t6;
18839
+ }, className: property.widthPercentage !== void 0 ? "mt-8" : void 0, innerClassName: "px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-white dark:bg-surface-900", title: /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark" }), children: mapFormView });
18840
+ $[23] = expanded;
18841
+ $[24] = mapFormView;
18842
+ $[25] = minimalistView;
18843
+ $[26] = onPropertyChange;
18844
+ $[27] = property;
18845
+ $[28] = propertyKey;
18846
+ $[29] = t3;
18841
18847
  } else {
18842
- t6 = $[37];
18848
+ t3 = $[29];
18843
18849
  }
18844
- const t7 = minimalistView && mapFormView;
18845
- const t8 = showError ?? false;
18846
- const t9 = error ? typeof error === "string" ? error : "A property of this map has an error" : void 0;
18847
- let t10;
18848
- if ($[38] !== disabled || $[39] !== includeDescription || $[40] !== property || $[41] !== t8 || $[42] !== t9) {
18849
- t10 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError: t8, error: t9, disabled, property });
18850
- $[38] = disabled;
18851
- $[39] = includeDescription;
18852
- $[40] = property;
18853
- $[41] = t8;
18854
- $[42] = t9;
18855
- $[43] = t10;
18850
+ const t4 = minimalistView && mapFormView;
18851
+ const t5 = showError ?? false;
18852
+ const t6 = error ? typeof error === "string" ? error : "A property of this map has an error" : void 0;
18853
+ let t7;
18854
+ if ($[30] !== disabled || $[31] !== includeDescription || $[32] !== property || $[33] !== t5 || $[34] !== t6) {
18855
+ t7 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError: t5, error: t6, disabled, property });
18856
+ $[30] = disabled;
18857
+ $[31] = includeDescription;
18858
+ $[32] = property;
18859
+ $[33] = t5;
18860
+ $[34] = t6;
18861
+ $[35] = t7;
18856
18862
  } else {
18857
- t10 = $[43];
18863
+ t7 = $[35];
18858
18864
  }
18859
- let t11;
18860
- if ($[44] !== t10 || $[45] !== t6 || $[46] !== t7) {
18861
- t11 = /* @__PURE__ */ jsxs(ErrorBoundary, { children: [
18862
- t6,
18863
- t7,
18864
- t10
18865
+ let t8;
18866
+ if ($[36] !== t3 || $[37] !== t4 || $[38] !== t7) {
18867
+ t8 = /* @__PURE__ */ jsxs(ErrorBoundary, { children: [
18868
+ t3,
18869
+ t4,
18870
+ t7
18865
18871
  ] });
18866
- $[44] = t10;
18867
- $[45] = t6;
18868
- $[46] = t7;
18869
- $[47] = t11;
18872
+ $[36] = t3;
18873
+ $[37] = t4;
18874
+ $[38] = t7;
18875
+ $[39] = t8;
18870
18876
  } else {
18871
- t11 = $[47];
18877
+ t8 = $[39];
18872
18878
  }
18873
- return t11;
18879
+ return t8;
18874
18880
  }
18875
18881
  function _temp$7(t0) {
18876
18882
  const [, property_0] = t0;
@@ -19622,7 +19628,7 @@ function getDataType(value) {
19622
19628
  return void 0;
19623
19629
  }
19624
19630
  function RepeatFieldBinding(t0) {
19625
- const $ = c(69);
19631
+ const $ = c(70);
19626
19632
  let context;
19627
19633
  let disabled;
19628
19634
  let error;
@@ -19639,7 +19645,7 @@ function RepeatFieldBinding(t0) {
19639
19645
  let value;
19640
19646
  if ($[0] !== t0) {
19641
19647
  const {
19642
- propertyKey: t19,
19648
+ propertyKey: t110,
19643
19649
  value: t22,
19644
19650
  error: t32,
19645
19651
  showError: t42,
@@ -19653,7 +19659,7 @@ function RepeatFieldBinding(t0) {
19653
19659
  context: t112,
19654
19660
  disabled: t122
19655
19661
  } = t0;
19656
- propertyKey = t19;
19662
+ propertyKey = t110;
19657
19663
  value = t22;
19658
19664
  error = t32;
19659
19665
  showError = t42;
@@ -19784,9 +19790,10 @@ function RepeatFieldBinding(t0) {
19784
19790
  } else {
19785
19791
  t7 = $[32];
19786
19792
  }
19787
- let t8;
19788
- if ($[33] !== buildEntry || $[34] !== propertyKey || $[35] !== t3 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== value) {
19789
- t8 = /* @__PURE__ */ jsx(ArrayContainer, { droppableId: propertyKey, addLabel: t3, value, buildEntry, onInternalIdAdded: setLastAddedId, disabled: t4, includeAddButton: t5, newDefaultEntry: t6, onValueChange: t7 });
19793
+ const t8 = property.widthPercentage !== void 0 ? "mt-8" : void 0;
19794
+ let t9;
19795
+ if ($[33] !== buildEntry || $[34] !== propertyKey || $[35] !== t3 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== value) {
19796
+ t9 = /* @__PURE__ */ jsx(ArrayContainer, { droppableId: propertyKey, addLabel: t3, value, buildEntry, onInternalIdAdded: setLastAddedId, disabled: t4, includeAddButton: t5, newDefaultEntry: t6, onValueChange: t7, className: t8 });
19790
19797
  $[33] = buildEntry;
19791
19798
  $[34] = propertyKey;
19792
19799
  $[35] = t3;
@@ -19794,97 +19801,98 @@ function RepeatFieldBinding(t0) {
19794
19801
  $[37] = t5;
19795
19802
  $[38] = t6;
19796
19803
  $[39] = t7;
19797
- $[40] = value;
19798
- $[41] = t8;
19804
+ $[40] = t8;
19805
+ $[41] = value;
19806
+ $[42] = t9;
19799
19807
  } else {
19800
- t8 = $[41];
19808
+ t9 = $[42];
19801
19809
  }
19802
- const arrayContainer = t8;
19803
- let t9;
19804
- if ($[42] !== property) {
19805
- t9 = getIconForProperty(property, "small");
19806
- $[42] = property;
19807
- $[43] = t9;
19810
+ const arrayContainer = t9;
19811
+ let t10;
19812
+ if ($[43] !== property) {
19813
+ t10 = getIconForProperty(property, "small");
19814
+ $[43] = property;
19815
+ $[44] = t10;
19808
19816
  } else {
19809
- t9 = $[43];
19817
+ t10 = $[44];
19810
19818
  }
19811
- const t10 = property.validation?.required;
19812
- let t11;
19813
- if ($[44] !== property.name || $[45] !== propertyKey || $[46] !== t10 || $[47] !== t9) {
19814
- t11 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t9, required: t10, title: property.name, className: "flex flex-grow text-text-secondary dark:text-text-secondary-dark" });
19815
- $[44] = property.name;
19816
- $[45] = propertyKey;
19817
- $[46] = t10;
19818
- $[47] = t9;
19819
+ const t11 = property.validation?.required;
19820
+ let t12;
19821
+ if ($[45] !== property.name || $[46] !== propertyKey || $[47] !== t10 || $[48] !== t11) {
19822
+ t12 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t10, required: t11, title: property.name, className: "h-8 flex flex-grow text-text-secondary dark:text-text-secondary-dark" });
19823
+ $[45] = property.name;
19824
+ $[46] = propertyKey;
19825
+ $[47] = t10;
19819
19826
  $[48] = t11;
19827
+ $[49] = t12;
19820
19828
  } else {
19821
- t11 = $[48];
19829
+ t12 = $[49];
19822
19830
  }
19823
- let t12;
19824
- if ($[49] !== value) {
19825
- t12 = Array.isArray(value) && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "px-4", children: [
19831
+ let t13;
19832
+ if ($[50] !== value) {
19833
+ t13 = Array.isArray(value) && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "px-4", children: [
19826
19834
  "(",
19827
19835
  value.length,
19828
19836
  ")"
19829
19837
  ] });
19830
- $[49] = value;
19831
- $[50] = t12;
19838
+ $[50] = value;
19839
+ $[51] = t13;
19832
19840
  } else {
19833
- t12 = $[50];
19841
+ t13 = $[51];
19834
19842
  }
19835
- let t13;
19836
- if ($[51] !== t11 || $[52] !== t12) {
19837
- t13 = /* @__PURE__ */ jsxs(Fragment, { children: [
19838
- t11,
19839
- t12
19843
+ let t14;
19844
+ if ($[52] !== t12 || $[53] !== t13) {
19845
+ t14 = /* @__PURE__ */ jsxs(Fragment, { children: [
19846
+ t12,
19847
+ t13
19840
19848
  ] });
19841
- $[51] = t11;
19842
19849
  $[52] = t12;
19843
19850
  $[53] = t13;
19851
+ $[54] = t14;
19844
19852
  } else {
19845
- t13 = $[53];
19853
+ t14 = $[54];
19846
19854
  }
19847
- const title = t13;
19848
- let t14;
19849
- if ($[54] !== arrayContainer || $[55] !== expanded || $[56] !== minimalistView || $[57] !== title) {
19850
- t14 = !minimalistView && /* @__PURE__ */ jsx(ExpandablePanel, { initiallyExpanded: expanded, innerClassName: "px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2", title, children: arrayContainer });
19851
- $[54] = arrayContainer;
19852
- $[55] = expanded;
19853
- $[56] = minimalistView;
19854
- $[57] = title;
19855
- $[58] = t14;
19856
- } else {
19857
- t14 = $[58];
19858
- }
19859
- const t15 = minimalistView && arrayContainer;
19860
- const t16 = error ? typeof error === "string" ? error : "A property of this array/repeat has an error" : void 0;
19861
- let t17;
19862
- if ($[59] !== disabled || $[60] !== includeDescription || $[61] !== property || $[62] !== showError || $[63] !== t16) {
19863
- t17 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error: t16, disabled, property });
19864
- $[59] = disabled;
19865
- $[60] = includeDescription;
19866
- $[61] = property;
19867
- $[62] = showError;
19868
- $[63] = t16;
19855
+ const title = t14;
19856
+ let t15;
19857
+ if ($[55] !== arrayContainer || $[56] !== expanded || $[57] !== minimalistView || $[58] !== title) {
19858
+ t15 = !minimalistView && /* @__PURE__ */ jsx(ExpandablePanel, { initiallyExpanded: expanded, innerClassName: "px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2", title, children: arrayContainer });
19859
+ $[55] = arrayContainer;
19860
+ $[56] = expanded;
19861
+ $[57] = minimalistView;
19862
+ $[58] = title;
19863
+ $[59] = t15;
19864
+ } else {
19865
+ t15 = $[59];
19866
+ }
19867
+ const t16 = minimalistView && arrayContainer;
19868
+ const t17 = error ? typeof error === "string" ? error : "A property of this array/repeat has an error" : void 0;
19869
+ let t18;
19870
+ if ($[60] !== disabled || $[61] !== includeDescription || $[62] !== property || $[63] !== showError || $[64] !== t17) {
19871
+ t18 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error: t17, disabled, property });
19872
+ $[60] = disabled;
19873
+ $[61] = includeDescription;
19874
+ $[62] = property;
19875
+ $[63] = showError;
19869
19876
  $[64] = t17;
19877
+ $[65] = t18;
19870
19878
  } else {
19871
- t17 = $[64];
19879
+ t18 = $[65];
19872
19880
  }
19873
- let t18;
19874
- if ($[65] !== t14 || $[66] !== t15 || $[67] !== t17) {
19875
- t18 = /* @__PURE__ */ jsxs(Fragment, { children: [
19876
- t14,
19881
+ let t19;
19882
+ if ($[66] !== t15 || $[67] !== t16 || $[68] !== t18) {
19883
+ t19 = /* @__PURE__ */ jsxs(Fragment, { children: [
19877
19884
  t15,
19878
- t17
19885
+ t16,
19886
+ t18
19879
19887
  ] });
19880
- $[65] = t14;
19881
19888
  $[66] = t15;
19882
- $[67] = t17;
19889
+ $[67] = t16;
19883
19890
  $[68] = t18;
19891
+ $[69] = t19;
19884
19892
  } else {
19885
- t18 = $[68];
19893
+ t19 = $[69];
19886
19894
  }
19887
- return t18;
19895
+ return t19;
19888
19896
  }
19889
19897
  function BlockFieldBinding({
19890
19898
  propertyKey,
@@ -20280,7 +20288,7 @@ function MarkdownEditorFieldBinding(t0) {
20280
20288
  const t12 = property.validation?.required;
20281
20289
  let t13;
20282
20290
  if ($[37] !== property.name || $[38] !== propertyKey || $[39] !== t11 || $[40] !== t12) {
20283
- t13 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t11, required: t12, title: property.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" });
20291
+ t13 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t11, required: t12, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" });
20284
20292
  $[37] = property.name;
20285
20293
  $[38] = propertyKey;
20286
20294
  $[39] = t11;
@@ -20393,7 +20401,7 @@ function ArrayCustomShapedFieldBinding(t0) {
20393
20401
  const t3 = property.validation?.required;
20394
20402
  let t4;
20395
20403
  if ($[10] !== property.name || $[11] !== propertyKey || $[12] !== t2 || $[13] !== t3) {
20396
- t4 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t2, required: t3, title: property.name, className: "flex-grow text-text-secondary dark:text-text-secondary-dark" });
20404
+ t4 = /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey, icon: t2, required: t3, title: property.name, className: "h-8 flex-grow text-text-secondary dark:text-text-secondary-dark" });
20397
20405
  $[10] = property.name;
20398
20406
  $[11] = propertyKey;
20399
20407
  $[12] = t2;
@@ -22500,16 +22508,15 @@ function FireCMSInternal(t0) {
22500
22508
  } else {
22501
22509
  childrenResult = $[4];
22502
22510
  }
22503
- const t1 = childrenResult;
22504
- let t2;
22505
- if ($[5] !== t1) {
22506
- t2 = /* @__PURE__ */ jsx(Fragment, { children: t1 });
22507
- $[5] = t1;
22508
- $[6] = t2;
22511
+ let t1;
22512
+ if ($[5] !== childrenResult) {
22513
+ t1 = /* @__PURE__ */ jsx(Fragment, { children: childrenResult });
22514
+ $[5] = childrenResult;
22515
+ $[6] = t1;
22509
22516
  } else {
22510
- t2 = $[6];
22517
+ t1 = $[6];
22511
22518
  }
22512
- return t2;
22519
+ return t1;
22513
22520
  }
22514
22521
  function DrawerNavigationItem(t0) {
22515
22522
  const $ = c(24);