@firecms/core 3.0.0-canary.104 → 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.es.js CHANGED
@@ -4,7 +4,7 @@ import React__default, { useRef, useEffect, useContext, useCallback, useMemo, us
4
4
  import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
5
5
  import hash from "object-hash";
6
6
  import { useCreateFormex, Formex, setIn, Field, getIn, useFormex } from "@firecms/formex";
7
- import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, ErrorIcon, Typography, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, Markdown, TextareaAutosize, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, ErrorOutlineIcon, EditIcon, Button, RemoveCircleIcon, Menu, MoreVertIcon, MenuItem, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, AssignmentIcon, CenteredView, Label, TextField, ClearIcon, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogContent, DialogActions, FileCopyIcon, ArchiveIcon, DeleteIcon, AddIcon, ExpandablePanel, Card, ArrowForwardIcon, cardMixin, cardClickableMixin, focusedMixin, StarIcon, StarBorderIcon, Collapse, Container, FilterListOffIcon, SearchIcon, LoadingButton, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, fieldBackgroundHoverMixin, HandleIcon, RemoveIcon, debounce, InfoIcon, CloseIcon, fieldBackgroundMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, Paper, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, EmailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, NotesIcon, Tab, Tabs, Alert, Sheet, useLocaleConfig, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
7
+ import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, ErrorIcon, Typography, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, Markdown, TextareaAutosize, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, ErrorOutlineIcon, EditIcon, RemoveCircleIcon, Menu, MoreVertIcon, MenuItem, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, AssignmentIcon, CenteredView, Label, TextField, ClearIcon, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogContent, DialogActions, FileCopyIcon, ArchiveIcon, DeleteIcon, AddIcon, ExpandablePanel, Card, ArrowForwardIcon, cardMixin, cardClickableMixin, focusedMixin, StarIcon, StarBorderIcon, Collapse, Container, FilterListOffIcon, SearchIcon, LoadingButton, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, fieldBackgroundHoverMixin, HandleIcon, RemoveIcon, debounce, InfoIcon, CloseIcon, fieldBackgroundMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, Paper, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, EmailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, NotesIcon, Tab, Tabs, Alert, Sheet, useLocaleConfig, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
8
8
  import equal from "react-fast-compare";
9
9
  import { Link, useNavigate, useLocation, UNSAFE_NavigationContext, NavLink, Route, Routes } from "react-router-dom";
10
10
  import { format } from "date-fns";
@@ -7235,12 +7235,14 @@ const TableReferenceFieldSuccess = React__default.memo(
7235
7235
  internalValue && !multiselect && buildSingleReferenceField(),
7236
7236
  internalValue && multiselect && buildMultipleReferenceField(),
7237
7237
  valueNotSet && /* @__PURE__ */ jsxs(
7238
- Button,
7238
+ EntityPreviewContainer,
7239
7239
  {
7240
+ className: cls(
7241
+ "p-4 text-sm font-medium flex items-center gap-4 uppercase",
7242
+ 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"
7243
+ ),
7240
7244
  onClick: handleOpen,
7241
- size: "small",
7242
- variant: "outlined",
7243
- color: "primary",
7245
+ size: "medium",
7244
7246
  children: [
7245
7247
  "Edit ",
7246
7248
  title
@@ -10999,13 +11001,10 @@ function ReferenceSelectionTable({
10999
11001
  textSearchInitialised,
11000
11002
  onTextSearchClick,
11001
11003
  textSearchEnabled
11002
- } = (
11003
- // eslint-disable-next-line react-hooks/rules-of-hooks
11004
- useTableSearchHelper({
11005
- collection,
11006
- fullPath
11007
- })
11008
- );
11004
+ } = useTableSearchHelper({
11005
+ collection,
11006
+ fullPath
11007
+ });
11009
11008
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full", children: [
11010
11009
  /* @__PURE__ */ jsx("div", { className: "flex-grow", children: entitiesDisplayedFirst && /* @__PURE__ */ jsx(
11011
11010
  EntityCollectionTable,
@@ -14849,15 +14848,17 @@ function ReferenceFieldBindingInternal({
14849
14848
  }
14850
14849
  ),
14851
14850
  !value && /* @__PURE__ */ jsx("div", { className: "justify-center text-left", children: /* @__PURE__ */ jsxs(
14852
- Button,
14851
+ EntityPreviewContainer,
14853
14852
  {
14854
- variant: "outlined",
14855
- color: "primary",
14856
- disabled: disabled || isSubmitting,
14853
+ className: cls(
14854
+ "p-6 text-sm font-medium flex items-center gap-6",
14855
+ 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"
14856
+ ),
14857
14857
  onClick: onEntryClick,
14858
+ size: "medium",
14858
14859
  children: [
14859
- "Edit ",
14860
- property.name
14860
+ /* @__PURE__ */ jsx(EmptyValue, {}),
14861
+ `Edit ${property.name}`.toUpperCase()
14861
14862
  ]
14862
14863
  }
14863
14864
  ) })