@firecms/core 3.0.0-canary.124 → 3.0.0-canary.126

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.124",
4
+ "version": "3.0.0-canary.126",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -46,9 +46,9 @@
46
46
  "./package.json": "./package.json"
47
47
  },
48
48
  "dependencies": {
49
- "@firecms/editor": "^3.0.0-canary.124",
50
- "@firecms/formex": "^3.0.0-canary.124",
51
- "@firecms/ui": "^3.0.0-canary.124",
49
+ "@firecms/editor": "^3.0.0-canary.126",
50
+ "@firecms/formex": "^3.0.0-canary.126",
51
+ "@firecms/ui": "^3.0.0-canary.126",
52
52
  "@hello-pangea/dnd": "^16.6.0",
53
53
  "@radix-ui/react-portal": "^1.1.1",
54
54
  "clsx": "^2.1.1",
@@ -100,7 +100,7 @@
100
100
  "dist",
101
101
  "src"
102
102
  ],
103
- "gitHead": "b1ef1804b61ad99988128d9a79d4364dba7d9beb",
103
+ "gitHead": "122cb2b218a404444b4580e8f561f671c8b785a9",
104
104
  "publishConfig": {
105
105
  "access": "public"
106
106
  },
@@ -166,10 +166,9 @@ function DrawerWrapper(props: {
166
166
  <Tooltip title="Open menu"
167
167
  side="right"
168
168
  sideOffset={12}
169
- asChild={true}
170
- >
169
+ asChild={true}>
171
170
  <div
172
- className="fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20">
171
+ className="ml-2 fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20">
173
172
  <IconButton
174
173
  color="inherit"
175
174
  aria-label="Open menu"
@@ -211,7 +210,7 @@ function DrawerWrapper(props: {
211
210
  aria-label="Open drawer"
212
211
  onClick={() => props.setDrawerOpen(true)}
213
212
  size="large"
214
- className="absolute top-2 left-6"
213
+ className="absolute top-2 left-5"
215
214
  >
216
215
  <MenuIcon/>
217
216
  </IconButton>
@@ -67,7 +67,6 @@ export const TableReferenceFieldInternal = React.memo(
67
67
  }, [updateValue]);
68
68
 
69
69
  const onMultipleEntitiesSelected = useCallback((entities: Entity<any>[]) => {
70
- console.log("onMultipleEntitiesSelected", entities);
71
70
  updateValue(entities.map((e) => getReferenceFrom(e)));
72
71
  }, [updateValue]);
73
72
 
@@ -179,7 +179,7 @@ function StorageUpload({
179
179
  onDropRejected: (fileRejections, event) => {
180
180
  for (const fileRejection of fileRejections) {
181
181
  for (const error of fileRejection.errors) {
182
- console.log("Error uploading file: ", error);
182
+ console.error("Error uploading file: ", error);
183
183
  if (error.code === "file-too-large") {
184
184
  snackbarContext.open({
185
185
  type: "error",
@@ -45,7 +45,7 @@ import { EntityCollectionViewActions } from "./EntityCollectionViewActions";
45
45
  import {
46
46
  AddIcon,
47
47
  Button,
48
- cls,
48
+ cls, focusedDisabled,
49
49
  IconButton,
50
50
  KeyboardTabIcon,
51
51
  Markdown,
@@ -207,7 +207,6 @@ export const EntityCollectionView = React.memo(
207
207
  }, [tableController.setPopupCell]);
208
208
 
209
209
  const onEntityClick = useCallback((clickedEntity: Entity<M>) => {
210
- console.log("Entity clicked", clickedEntity)
211
210
  const collection = collectionRef.current;
212
211
  setHighlightedEntity(clickedEntity);
213
212
  analyticsController.onAnalyticsEvent?.("edit_entity_clicked", {
@@ -785,6 +784,9 @@ function EntityIdHeaderWidget({
785
784
  <Popover
786
785
  open={openPopup}
787
786
  onOpenChange={setOpenPopup}
787
+ sideOffset={0}
788
+ align={"start"}
789
+ alignOffset={-117}
788
790
  trigger={
789
791
  <IconButton size={"small"}>
790
792
  <SearchIcon size={"small"}/>
@@ -814,7 +816,7 @@ function EntityIdHeaderWidget({
814
816
  setSearchString(e.target.value);
815
817
  }}
816
818
  value={searchString}
817
- className={"flex-grow bg-transparent outline-none p-1"}/>
819
+ className={"flex-grow bg-transparent outline-none p-1 " + focusedDisabled}/>
818
820
  <Button variant={"outlined"}
819
821
  disabled={!(searchString.trim())}
820
822
  type={"submit"}
@@ -77,7 +77,7 @@ export function EntityPreview({
77
77
  return <EntityPreviewContainer onClick={disabled ? undefined : onClick}
78
78
  hover={disabled ? undefined : hover}
79
79
  size={size}>
80
- <div className={cls("flex w-10 h-10 mr-2 shrink-0 grow-0", size === "smallest" ? "my-0.5" : "m-2 self-start")}>
80
+ <div className={cls("flex w-10 h-10 mr-2 shrink-0", size === "smallest" ? "my-0.5" : "m-2 self-start")}>
81
81
  {imageProperty && <PropertyPreview property={imageProperty}
82
82
  propertyKey={imagePropertyKey as string}
83
83
  size={"smallest"}
@@ -86,7 +86,7 @@ export function EntityPreview({
86
86
  </div>
87
87
 
88
88
 
89
- <div className={"flex flex-col flex-grow w-full m-1"}>
89
+ <div className={"flex flex-col grow-1 w-full max-w-full m-1"}>
90
90
 
91
91
  {size !== "smallest" && includeId && (
92
92
  entity
@@ -205,7 +205,7 @@ export const EntityPreviewContainer = React.forwardRef<HTMLDivElement, EntityPre
205
205
  fullwidth ? "w-full" : "",
206
206
  "items-center",
207
207
  hover ? "hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800" : "",
208
- size === "smallest" ? "p-1" : "p-2",
208
+ size === "smallest" ? "p-1" : "px-2 py-1",
209
209
  "flex border rounded-lg",
210
210
  onClick ? "cursor-pointer" : "",
211
211
  defaultBorderMixin,
@@ -82,7 +82,6 @@ export function DefaultHomePage({
82
82
  setFilteredUrls(null);
83
83
  } else {
84
84
  const searchResult = fuse.current?.search(value);
85
- console.log("Search result", searchResult);
86
85
  if (searchResult) {
87
86
  setFilteredUrls(searchResult.map((e) => e.item.url));
88
87
  }
@@ -46,7 +46,6 @@ export function SearchIconsView({
46
46
  }, [query, updateSearchResults]);
47
47
 
48
48
  const icons = keys === null ? coolIconKeys : keys;
49
- console.log("Icons", icons);
50
49
 
51
50
  return (
52
51
  <>
@@ -93,7 +93,6 @@ export function StringNumberFilterField({
93
93
 
94
94
  const multiple = multipleSelectOperations.includes(operation);
95
95
 
96
- console.log("internalValue", { internalValue });
97
96
  return (
98
97
 
99
98
  <div className="flex w-[440px]">
@@ -93,7 +93,7 @@ export function DefaultDrawer({
93
93
  .map((view, index) =>
94
94
  <DrawerNavigationItem
95
95
  key={`navigation_${index}`}
96
- icon={<IconForView collectionOrView={view.collection ?? view.view}/>}
96
+ icon={<IconForView collectionOrView={view.collection ?? view.view} size={"small"}/>}
97
97
  tooltipsOpen={tooltipsOpen}
98
98
  adminMenuOpen={adminMenuOpen}
99
99
  drawerOpen={drawerOpen}
@@ -161,9 +161,9 @@ export function DrawerLogo({ logo }: {
161
161
  return <div
162
162
  style={{
163
163
  transition: "padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
164
- padding: drawerOpen ? "32px 144px 0px 24px" : "72px 16px 0px"
164
+ padding: drawerOpen ? "32px 144px 0px 24px" : "72px 12px 0px 12px"
165
165
  }}
166
- className={cls("cursor-pointer")}>
166
+ className={cls("cursor-pointer ml-4")}>
167
167
 
168
168
  <Tooltip title={"Home"}
169
169
  sideOffset={20}
@@ -34,7 +34,7 @@ export function DrawerNavigationItem({
34
34
  transition: drawerOpen ? "width 150ms ease-in" : undefined
35
35
  }}
36
36
  className={({ isActive }: any) => cls("rounded-lg truncate",
37
- "hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white",
37
+ "hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-slate-800 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white",
38
38
  "flex flex-row items-center mr-8",
39
39
  // "transition-all ease-in-out delay-100 duration-300",
40
40
  // drawerOpen ? "w-full" : "w-18",
@@ -299,7 +299,6 @@ export function EntityEditViewInner<M extends Record<string, any>>({
299
299
  onUpdate({ entity: updatedEntity });
300
300
 
301
301
  if (closeAfterSave) {
302
- console.log("Closing side dialog")
303
302
  sideDialogContext.setBlocked(false);
304
303
  sideDialogContext.close(true);
305
304
  onClose?.();
@@ -94,7 +94,6 @@ function SideDialogView({
94
94
  const handleDrawerCloseOk = () => {
95
95
  setBlocked(false);
96
96
  setDrawerCloseRequested(false);
97
- console.log("handleDrawerCloseOk");
98
97
  sideDialogsController.close();
99
98
  panel?.onClose?.();
100
99
  };
@@ -182,7 +182,7 @@ function FileDropComponent({
182
182
  onDropRejected: (fileRejections, event) => {
183
183
  for (const fileRejection of fileRejections) {
184
184
  for (const error of fileRejection.errors) {
185
- console.log("Error uploading file: ", error);
185
+ console.error("Error uploading file: ", error);
186
186
  if (error.code === "file-too-large") {
187
187
  snackbarContext.open({
188
188
  type: "error",