@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 +19 -18
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +18 -17
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +10 -9
- package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +1 -5
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +15 -11
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,
|
|
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
|
-
|
|
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: "
|
|
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
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
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
|
-
|
|
14851
|
+
EntityPreviewContainer,
|
|
14853
14852
|
{
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
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
|
-
|
|
14860
|
-
property.name
|
|
14860
|
+
/* @__PURE__ */ jsx(EmptyValue, {}),
|
|
14861
|
+
`Edit ${property.name}`.toUpperCase()
|
|
14861
14862
|
]
|
|
14862
14863
|
}
|
|
14863
14864
|
) })
|