@firecms/core 3.0.0-canary.103 → 3.0.0-canary.105

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
@@ -2885,6 +2885,9 @@
2885
2885
  function getEntityPreviewKeys(targetCollection, fields, previewProperties, limit = 3) {
2886
2886
  const allProperties = Object.keys(targetCollection.properties);
2887
2887
  let listProperties = previewProperties?.filter((p) => allProperties.includes(p));
2888
+ if (!listProperties && targetCollection.previewProperties) {
2889
+ listProperties = targetCollection.previewProperties?.filter((p) => allProperties.includes(p));
2890
+ }
2888
2891
  if (listProperties && listProperties.length > 0) {
2889
2892
  return listProperties;
2890
2893
  } else {
@@ -7236,12 +7239,14 @@
7236
7239
  internalValue && !multiselect && buildSingleReferenceField(),
7237
7240
  internalValue && multiselect && buildMultipleReferenceField(),
7238
7241
  valueNotSet && /* @__PURE__ */ jsxRuntime.jsxs(
7239
- ui.Button,
7242
+ EntityPreviewContainer,
7240
7243
  {
7244
+ className: ui.cls(
7245
+ "p-4 text-sm font-medium flex items-center gap-4 uppercase",
7246
+ disabled ? "text-slate-500" : "cursor-pointer text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800"
7247
+ ),
7241
7248
  onClick: handleOpen,
7242
- size: "small",
7243
- variant: "outlined",
7244
- color: "primary",
7249
+ size: "medium",
7245
7250
  children: [
7246
7251
  "Edit ",
7247
7252
  title
@@ -11000,13 +11005,10 @@
11000
11005
  textSearchInitialised,
11001
11006
  onTextSearchClick,
11002
11007
  textSearchEnabled
11003
- } = (
11004
- // eslint-disable-next-line react-hooks/rules-of-hooks
11005
- useTableSearchHelper({
11006
- collection,
11007
- fullPath
11008
- })
11009
- );
11008
+ } = useTableSearchHelper({
11009
+ collection,
11010
+ fullPath
11011
+ });
11010
11012
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full", children: [
11011
11013
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow", children: entitiesDisplayedFirst && /* @__PURE__ */ jsxRuntime.jsx(
11012
11014
  EntityCollectionTable,
@@ -14779,6 +14781,7 @@
14779
14781
  showError,
14780
14782
  isSubmitting,
14781
14783
  disabled,
14784
+ minimalistView,
14782
14785
  touched,
14783
14786
  autoFocus,
14784
14787
  property,
@@ -14819,7 +14822,7 @@
14819
14822
  referenceDialogController.open();
14820
14823
  }, [referenceDialogController]);
14821
14824
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14822
- /* @__PURE__ */ jsxRuntime.jsx(
14825
+ !minimalistView && /* @__PURE__ */ jsxRuntime.jsx(
14823
14826
  LabelWithIcon,
14824
14827
  {
14825
14828
  icon: getIconForProperty(property, "small"),
@@ -14849,15 +14852,17 @@
14849
14852
  }
14850
14853
  ),
14851
14854
  !value && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "justify-center text-left", children: /* @__PURE__ */ jsxRuntime.jsxs(
14852
- ui.Button,
14855
+ EntityPreviewContainer,
14853
14856
  {
14854
- variant: "outlined",
14855
- color: "primary",
14856
- disabled: disabled || isSubmitting,
14857
+ className: ui.cls(
14858
+ "p-6 text-sm font-medium flex items-center gap-6",
14859
+ disabled || isSubmitting ? "text-slate-500" : "cursor-pointer text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800"
14860
+ ),
14857
14861
  onClick: onEntryClick,
14862
+ size: "medium",
14858
14863
  children: [
14859
- "Edit ",
14860
- property.name
14864
+ /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {}),
14865
+ `Edit ${property.name}`.toUpperCase()
14861
14866
  ]
14862
14867
  }
14863
14868
  ) })