@firecms/core 3.0.0-canary.261 → 3.0.0-canary.264

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -429,7 +429,7 @@
429
429
  if (property.autoValue) return true;
430
430
  }
431
431
  if (property.dataType === "reference") {
432
- return !property.path;
432
+ return !property.path && !property.Field;
433
433
  }
434
434
  return false;
435
435
  }
@@ -5808,7 +5808,7 @@
5808
5808
  collection: collectionProp,
5809
5809
  previewKeys,
5810
5810
  onClick,
5811
- size,
5811
+ size = "medium",
5812
5812
  includeId = true,
5813
5813
  includeTitle = true,
5814
5814
  includeEntityLink = true,
@@ -5877,18 +5877,18 @@
5877
5877
  let hover;
5878
5878
  let onClick;
5879
5879
  let props;
5880
- let size;
5881
5880
  let style;
5882
5881
  let t1;
5882
+ let t2;
5883
5883
  if ($[0] !== t0) {
5884
5884
  ({
5885
5885
  children,
5886
5886
  hover,
5887
5887
  onClick,
5888
- size,
5888
+ size: t1,
5889
5889
  style,
5890
5890
  className,
5891
- fullwidth: t1,
5891
+ fullwidth: t2,
5892
5892
  ...props
5893
5893
  } = t0);
5894
5894
  $[0] = t0;
@@ -5897,74 +5897,75 @@
5897
5897
  $[3] = hover;
5898
5898
  $[4] = onClick;
5899
5899
  $[5] = props;
5900
- $[6] = size;
5901
- $[7] = style;
5902
- $[8] = t1;
5900
+ $[6] = style;
5901
+ $[7] = t1;
5902
+ $[8] = t2;
5903
5903
  } else {
5904
5904
  children = $[1];
5905
5905
  className = $[2];
5906
5906
  hover = $[3];
5907
5907
  onClick = $[4];
5908
5908
  props = $[5];
5909
- size = $[6];
5910
- style = $[7];
5911
- t1 = $[8];
5909
+ style = $[6];
5910
+ t1 = $[7];
5911
+ t2 = $[8];
5912
5912
  }
5913
- const fullwidth = t1 === void 0 ? true : t1;
5914
- let t2;
5913
+ const size = t1 === void 0 ? "medium" : t1;
5914
+ const fullwidth = t2 === void 0 ? true : t2;
5915
+ let t3;
5915
5916
  if ($[9] !== style) {
5916
- t2 = {
5917
+ t3 = {
5917
5918
  ...style,
5918
5919
  tabindex: 0
5919
5920
  };
5920
5921
  $[9] = style;
5921
- $[10] = t2;
5922
+ $[10] = t3;
5922
5923
  } else {
5923
- t2 = $[10];
5924
+ t3 = $[10];
5924
5925
  }
5925
- const t3 = fullwidth ? "w-full" : "";
5926
- const t4 = hover ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 group-hover:bg-surface-accent-50 dark:group-hover:bg-surface-800" : "";
5927
- const t5 = size === "small" ? "p-1" : "px-2 py-1";
5928
- const t6 = onClick ? "cursor-pointer" : "";
5929
- let t7;
5930
- if ($[11] !== className || $[12] !== t3 || $[13] !== t4 || $[14] !== t5 || $[15] !== t6) {
5931
- t7 = ui.cls("bg-white dark:bg-surface-900", "min-h-[42px]", t3, "items-center", t4, t5, "flex border rounded-lg", t6, ui.defaultBorderMixin, className);
5926
+ const t4 = fullwidth ? "w-full" : "";
5927
+ const t5 = hover ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 group-hover:bg-surface-accent-50 dark:group-hover:bg-surface-800" : "";
5928
+ const t6 = size === "small" ? "p-1" : "px-2 py-1";
5929
+ const t7 = onClick ? "cursor-pointer" : "";
5930
+ let t8;
5931
+ if ($[11] !== className || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
5932
+ t8 = ui.cls("bg-white dark:bg-surface-900", "min-h-[42px]", t4, "items-center", t5, t6, "flex border rounded-lg", t7, ui.defaultBorderMixin, className);
5932
5933
  $[11] = className;
5933
- $[12] = t3;
5934
- $[13] = t4;
5935
- $[14] = t5;
5936
- $[15] = t6;
5937
- $[16] = t7;
5934
+ $[12] = t4;
5935
+ $[13] = t5;
5936
+ $[14] = t6;
5937
+ $[15] = t7;
5938
+ $[16] = t8;
5938
5939
  } else {
5939
- t7 = $[16];
5940
+ t8 = $[16];
5940
5941
  }
5941
- let t8;
5942
+ let t9;
5942
5943
  if ($[17] !== onClick) {
5943
- t8 = (event) => {
5944
+ t9 = (event) => {
5944
5945
  if (onClick) {
5945
5946
  event.preventDefault();
5946
5947
  onClick(event);
5947
5948
  }
5948
5949
  };
5949
5950
  $[17] = onClick;
5950
- $[18] = t8;
5951
+ $[18] = t9;
5951
5952
  } else {
5952
- t8 = $[18];
5953
+ t9 = $[18];
5953
5954
  }
5954
- let t9;
5955
- if ($[19] !== children || $[20] !== props || $[21] !== ref || $[22] !== t2 || $[23] !== t7 || $[24] !== t8) {
5956
- t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref, style: t2, className: t7, onClick: t8, ...props, children });
5955
+ let t10;
5956
+ if ($[19] !== children || $[20] !== props || $[21] !== ref || $[22] !== t3 || $[23] !== t8 || $[24] !== t9) {
5957
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref, style: t3, className: t8, onClick: t9, ...props, children });
5957
5958
  $[19] = children;
5958
5959
  $[20] = props;
5959
5960
  $[21] = ref;
5960
- $[22] = t2;
5961
- $[23] = t7;
5962
- $[24] = t8;
5963
- $[25] = t9;
5961
+ $[22] = t3;
5962
+ $[23] = t8;
5963
+ $[24] = t9;
5964
+ $[25] = t10;
5964
5965
  } else {
5965
- t9 = $[25];
5966
+ t10 = $[25];
5966
5967
  }
5967
- return t9;
5968
+ return t10;
5968
5969
  });
5969
5970
  EntityPreviewContainer.displayName = "EntityPreviewContainer";
5970
5971
  const ReferencePreview = function ReferencePreview2(props) {
@@ -5973,7 +5974,7 @@
5973
5974
  if (!(typeof reference === "object" && "isEntityReference" in reference && reference.isEntityReference())) {
5974
5975
  console.warn("Reference preview received value of type", typeof reference);
5975
5976
  const t02 = props.onClick;
5976
- const t1 = props.size;
5977
+ const t1 = props.size ?? "medium";
5977
5978
  let t2;
5978
5979
  if ($[0] !== reference) {
5979
5980
  t2 = JSON.stringify(reference);
@@ -5991,10 +5992,10 @@
5991
5992
  t3 = $[3];
5992
5993
  }
5993
5994
  let t4;
5994
- if ($[4] !== props.onClick || $[5] !== props.size || $[6] !== t3) {
5995
+ if ($[4] !== props.onClick || $[5] !== t1 || $[6] !== t3) {
5995
5996
  t4 = /* @__PURE__ */ jsxRuntime.jsx(EntityPreviewContainer, { onClick: t02, size: t1, children: t3 });
5996
5997
  $[4] = props.onClick;
5997
- $[5] = props.size;
5998
+ $[5] = t1;
5998
5999
  $[6] = t3;
5999
6000
  $[7] = t4;
6000
6001
  } else {
@@ -12672,10 +12673,9 @@
12672
12673
  fullPath
12673
12674
  });
12674
12675
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full", children: [
12675
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow", children: entitiesDisplayedFirst && /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionTable, { textSearchLoading, onTextSearchClick: textSearchInitialised ? void 0 : onTextSearchClick, textSearchEnabled, displayedColumnIds, onEntityClick, tableController, enablePopupIcon: false, tableRowActionsBuilder, openEntityMode: "side_panel", title: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "subtitle2", className: "flex flex-row gap-2", children: [
12676
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow", children: entitiesDisplayedFirst && /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionTable, { textSearchLoading, onTextSearchClick: textSearchInitialised ? void 0 : onTextSearchClick, textSearchEnabled, additionalFields: collection.additionalFields, displayedColumnIds, onEntityClick, tableController, enablePopupIcon: false, tableRowActionsBuilder, openEntityMode: "side_panel", title: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "subtitle2", className: "flex flex-row gap-2", children: [
12676
12677
  /* @__PURE__ */ jsxRuntime.jsx(IconForView, { size: "small", collectionOrView: collection, className: "text-surface-300 dark:text-surface-600" }),
12677
- collection.singularName ? `Select ${collection.singularName}` : `Select
12678
- from ${collection.name}`
12678
+ collection.singularName ? `Select ${collection.singularName}` : `Select from ${collection.name}`
12679
12679
  ] }), defaultSize: collection.defaultSize, properties: resolvedCollection.properties, forceFilter, inlineEditing: false, selectionController, actions: /* @__PURE__ */ jsxRuntime.jsx(ReferenceDialogActions, { collection, path: fullPath, onNewClick, onClear }) }) }),
12680
12680
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { translucent: false, children: [
12681
12681
  description && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", className: "flex-grow text-left", children: description }),