@firecms/core 3.0.0-canary.78 → 3.0.0-canary.79

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.78",
4
+ "version": "3.0.0-canary.79",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -46,8 +46,8 @@
46
46
  "./package.json": "./package.json"
47
47
  },
48
48
  "dependencies": {
49
- "@firecms/formex": "^3.0.0-canary.78",
50
- "@firecms/ui": "^3.0.0-canary.78",
49
+ "@firecms/formex": "^3.0.0-canary.79",
50
+ "@firecms/ui": "^3.0.0-canary.79",
51
51
  "@fontsource/jetbrains-mono": "^5.0.20",
52
52
  "@hello-pangea/dnd": "^16.6.0",
53
53
  "@radix-ui/react-portal": "^1.1.1",
@@ -102,7 +102,7 @@
102
102
  "dist",
103
103
  "src"
104
104
  ],
105
- "gitHead": "ae1d73091cbbf9b0091e667e71fa981ab142b513",
105
+ "gitHead": "1007170266579ae963305dff219dfd57c5e97bc7",
106
106
  "publishConfig": {
107
107
  "access": "public"
108
108
  },
@@ -1,7 +1,7 @@
1
1
  import React, { MouseEvent, useCallback } from "react";
2
2
 
3
3
  import { CollectionSize, Entity, EntityAction, EntityCollection, SelectionController } from "../../types";
4
- import { Checkbox, cls, IconButton, Menu, MenuItem, MoreVertIcon, Skeleton, Tooltip, Typography } from "@firecms/ui";
4
+ import { Checkbox, cls, IconButton, Menu, MenuItem, MoreVertIcon, Skeleton, Tooltip } from "@firecms/ui";
5
5
  import { useFireCMSContext, useLargeLayout } from "../../hooks";
6
6
 
7
7
  /**
@@ -149,16 +149,14 @@ export const EntityCollectionRowActions = function EntityCollectionRowActions({
149
149
  </div>}
150
150
 
151
151
  {!hideId && size !== "xs" && (
152
- <div className="w-[138px] text-center overflow-hidden truncate">
152
+ <div
153
+ className="w-[138px] text-center overflow-hidden truncate font-mono text-xs text-text-secondary dark:text-text-secondary-dark max-w-full text-ellipsis px-2"
154
+ onClick={(event) => {
155
+ event.stopPropagation();
156
+ }}>
153
157
 
154
158
  {entity
155
- ? <Typography
156
- onClick={(event) => {
157
- event.stopPropagation();
158
- }}
159
- className={"font-mono select-all"}
160
- variant={"caption"}
161
- color={"secondary"}> {entity.id} </Typography>
159
+ ? entity.id
162
160
  : <Skeleton/>
163
161
  }
164
162
  </div>
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties, useMemo, useState } from "react";
1
+ import React, { CSSProperties, useMemo } from "react";
2
2
 
3
3
  import { getThumbnailMeasure } from "../util";
4
4
  import { PreviewSize } from "../PropertyPreviewProps";
@@ -57,42 +57,38 @@ export function ImagePreview({
57
57
  style={imageStyle}/>
58
58
 
59
59
 
60
- {navigator && <Tooltip title="Copy url to clipboard">
61
- <div
62
- className="rounded-full absolute bottom-[-4px] right-8 invisible group-hover:visible">
63
- <IconButton
64
- variant={"filled"}
65
- size={"small"}
66
- onClick={(e) => {
67
- e.stopPropagation();
68
- e.preventDefault();
69
- return navigator.clipboard.writeText(url);
70
- }}>
71
- <ContentCopyIcon className={"text-gray-700 dark:text-gray-300"}
72
- size={"small"}/>
73
- </IconButton>
74
- </div>
60
+ <div className={"flex flex-row gap-2 absolute bottom-[-4px] right-[-4px] invisible group-hover:visible"}>
61
+ {navigator && <Tooltip title="Copy url to clipboard" side={"bottom"}>
62
+ <IconButton
63
+ variant={"filled"}
64
+ size={"small"}
65
+ onClick={(e) => {
66
+ e.stopPropagation();
67
+ e.preventDefault();
68
+ return navigator.clipboard.writeText(url);
69
+ }}>
70
+ <ContentCopyIcon className={"text-gray-700 dark:text-gray-300"}
71
+ size={"small"}/>
72
+ </IconButton>
75
73
  </Tooltip>}
76
74
 
77
- <Tooltip title="Open image in new tab">
75
+ <Tooltip title="Open image in new tab" side={"bottom"}>
78
76
  <IconButton
77
+ className="invisible group-hover:visible"
79
78
  variant={"filled"}
80
79
  component={"a" as React.ElementType}
81
- style={{
82
- position: "absolute",
83
- bottom: -4,
84
- right: -4
85
- }}
86
80
  href={url}
87
81
  rel="noopener noreferrer"
88
82
  target="_blank"
89
83
  size={"small"}
90
84
  onClick={(e: any) => e.stopPropagation()}
91
85
  >
92
- <OpenInNewIcon className={"text-gray-700 dark:text-gray-300 invisible group-hover:visible"}
86
+ <OpenInNewIcon className={"text-gray-700 dark:text-gray-300"}
93
87
  size={"small"}/>
94
88
  </IconButton>
95
89
  </Tooltip>
90
+ </div>
91
+
96
92
  </div>
97
93
  );
98
94
  }
@@ -41,7 +41,8 @@ function areEqual(prevProps: ReferencePreviewProps, nextProps: ReferencePreviewP
41
41
  prevProps.hover === nextProps.hover &&
42
42
  prevProps.reference?.id === nextProps.reference?.id &&
43
43
  prevProps.reference?.path === nextProps.reference?.path &&
44
- prevProps.includeEntityLink === nextProps.includeEntityLink
44
+ prevProps.includeEntityLink === nextProps.includeEntityLink &&
45
+ prevProps.onClick === nextProps.onClick
45
46
  ;
46
47
  }
47
48