@firecms/core 3.0.0-canary.57 → 3.0.0-canary.59
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/components/VirtualTable/VirtualTableProps.d.ts +4 -0
- package/dist/index.es.js +1037 -1035
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +2 -2
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -2
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +3 -3
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +2 -2
- package/src/components/EntityPreview.tsx +3 -3
- package/src/components/EntityView.tsx +3 -3
- package/src/components/FireCMSAppBar.tsx +3 -3
- package/src/components/HomePage/NavigationCard.tsx +2 -2
- package/src/components/HomePage/SmallNavigationCard.tsx +2 -2
- package/src/components/ReferenceWidget.tsx +2 -2
- package/src/components/VirtualTable/VirtualTable.tsx +5 -3
- package/src/components/VirtualTable/VirtualTableHeader.tsx +4 -4
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +2 -2
- package/src/components/VirtualTable/VirtualTableProps.tsx +5 -0
- package/src/components/VirtualTable/VirtualTableRow.tsx +2 -2
- package/src/core/Drawer.tsx +2 -2
- package/src/core/DrawerNavigationItem.tsx +3 -3
- package/src/core/EntityEditView.tsx +3 -3
- package/src/core/Scaffold.tsx +4 -4
- package/src/form/EntityForm.tsx +2 -2
- package/src/form/components/StorageItemPreview.tsx +2 -2
- package/src/form/components/StorageUploadProgress.tsx +2 -2
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +2 -2
- package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +4 -4
- package/src/form/field_bindings/MarkdownFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +2 -2
- package/src/form/field_bindings/SelectFieldBinding.tsx +2 -2
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +4 -4
- package/src/preview/components/BooleanPreview.tsx +2 -2
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +2 -2
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +2 -2
- package/src/preview/property_previews/MapPropertyPreview.tsx +5 -5
- package/src/preview/property_previews/StringPropertyPreview.tsx +2 -2
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ArrowDropDownIcon,
|
|
9
9
|
BooleanSwitchWithLabel,
|
|
10
10
|
Button,
|
|
11
|
-
|
|
11
|
+
cls,
|
|
12
12
|
DateTimeField,
|
|
13
13
|
defaultBorderMixin,
|
|
14
14
|
ExpandablePanel,
|
|
@@ -316,7 +316,7 @@ function MapKeyValueRow<T extends Record<string, any>>({
|
|
|
316
316
|
}}/>;
|
|
317
317
|
} else if (dataType === "array") {
|
|
318
318
|
return <div
|
|
319
|
-
className={
|
|
319
|
+
className={cls(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
|
|
320
320
|
<ArrayContainer value={entryValue}
|
|
321
321
|
newDefaultEntry={""}
|
|
322
322
|
droppableId={rowId.toString()}
|
|
@@ -349,7 +349,7 @@ function MapKeyValueRow<T extends Record<string, any>>({
|
|
|
349
349
|
</div>;
|
|
350
350
|
} else if (dataType === "map") {
|
|
351
351
|
return <div
|
|
352
|
-
className={
|
|
352
|
+
className={cls(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
|
|
353
353
|
<MapEditView value={entryValue}
|
|
354
354
|
fieldName={fieldKey}
|
|
355
355
|
setValue={(updatedValue) => {
|
|
@@ -482,7 +482,7 @@ function ArrayKeyValueRow<T>({
|
|
|
482
482
|
Arrays of arrays are not supported.
|
|
483
483
|
</Typography>;
|
|
484
484
|
} else if (dataType === "map") {
|
|
485
|
-
return <div className={
|
|
485
|
+
return <div className={cls(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
|
|
486
486
|
<MapEditView value={entryValue}
|
|
487
487
|
setValue={(updatedValue) => {
|
|
488
488
|
setValue(updatedValue);
|
|
@@ -8,7 +8,7 @@ import { FieldHelperText, LabelWithIcon } from "../components";
|
|
|
8
8
|
import { FieldProps } from "../../types";
|
|
9
9
|
import { getIconForProperty } from "../../util";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
cls,
|
|
12
12
|
fieldBackgroundDisabledMixin,
|
|
13
13
|
fieldBackgroundHoverMixin,
|
|
14
14
|
fieldBackgroundMixin,
|
|
@@ -81,7 +81,7 @@ export function MarkdownFieldBinding({
|
|
|
81
81
|
</Typography>}
|
|
82
82
|
|
|
83
83
|
<MdEditor value={internalValue ?? ""}
|
|
84
|
-
className={
|
|
84
|
+
className={cls(fieldBackgroundMixin,
|
|
85
85
|
disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
|
|
86
86
|
"text-base")}
|
|
87
87
|
readOnly={disabled}
|
|
@@ -6,7 +6,7 @@ import { PropertyPreview } from "../../preview";
|
|
|
6
6
|
import { FieldHelperText, LabelWithIcon } from "../components";
|
|
7
7
|
import { ErrorBoundary } from "../../components";
|
|
8
8
|
import { getIconForProperty } from "../../util";
|
|
9
|
-
import {
|
|
9
|
+
import { cls, paperMixin } from "@firecms/ui";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
@@ -47,7 +47,7 @@ export function ReadOnlyFieldBinding({
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
<div
|
|
50
|
-
className={
|
|
50
|
+
className={cls(paperMixin, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar")}>
|
|
51
51
|
|
|
52
52
|
<ErrorBoundary>
|
|
53
53
|
<PropertyPreview propertyKey={propertyKey}
|
|
@@ -4,7 +4,7 @@ import { EnumType, FieldProps } from "../../types";
|
|
|
4
4
|
import { FieldHelperText, LabelWithIcon } from "../components";
|
|
5
5
|
import { EnumValuesChip } from "../../preview";
|
|
6
6
|
import { getIconForProperty } from "../../util";
|
|
7
|
-
import { ClearIcon,
|
|
7
|
+
import { ClearIcon, cls, IconButton, Select, SelectItem } from "@firecms/ui";
|
|
8
8
|
import { useClearRestoreValue } from "../useClearRestoreValue";
|
|
9
9
|
|
|
10
10
|
type SelectProps<T extends EnumType> = FieldProps<T>;
|
|
@@ -51,7 +51,7 @@ export function SelectFieldBinding<T extends EnumType>({
|
|
|
51
51
|
value={value !== undefined && value != null ? value.toString() : ""}
|
|
52
52
|
disabled={disabled}
|
|
53
53
|
position="item-aligned"
|
|
54
|
-
inputClassName={
|
|
54
|
+
inputClassName={cls("w-full")}
|
|
55
55
|
label={<LabelWithIcon icon={getIconForProperty(property, "small")}
|
|
56
56
|
required={property.validation?.required}
|
|
57
57
|
title={property.name}
|
|
@@ -20,7 +20,7 @@ import { StorageFieldItem, useStorageUploadController } from "../../util/useStor
|
|
|
20
20
|
import { StorageUploadProgress } from "../components/StorageUploadProgress";
|
|
21
21
|
import { StorageItemPreview } from "../components/StorageItemPreview";
|
|
22
22
|
import {
|
|
23
|
-
|
|
23
|
+
cls,
|
|
24
24
|
fieldBackgroundDisabledMixin,
|
|
25
25
|
fieldBackgroundHoverMixin,
|
|
26
26
|
fieldBackgroundMixin,
|
|
@@ -203,7 +203,7 @@ function FileDropComponent({
|
|
|
203
203
|
return (
|
|
204
204
|
<div
|
|
205
205
|
{...getRootProps()}
|
|
206
|
-
className={
|
|
206
|
+
className={cls(
|
|
207
207
|
fieldBackgroundMixin,
|
|
208
208
|
disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
|
|
209
209
|
dropZoneClasses,
|
|
@@ -220,7 +220,7 @@ function FileDropComponent({
|
|
|
220
220
|
<div
|
|
221
221
|
{...droppableProvided.droppableProps}
|
|
222
222
|
ref={droppableProvided.innerRef}
|
|
223
|
-
className={
|
|
223
|
+
className={cls("flex items-center p-1 no-scrollbar",
|
|
224
224
|
multipleFilesSupported && internalValue.length ? "overflow-auto" : "",
|
|
225
225
|
multipleFilesSupported && internalValue.length ? "min-h-[180px]" : "min-h-[250px]"
|
|
226
226
|
)}
|
|
@@ -268,7 +268,7 @@ function FileDropComponent({
|
|
|
268
268
|
ref={provided.innerRef}
|
|
269
269
|
{...provided.draggableProps}
|
|
270
270
|
{...provided.dragHandleProps}
|
|
271
|
-
className={
|
|
271
|
+
className={cls(focusedMixin, "rounded-md")}
|
|
272
272
|
style={{
|
|
273
273
|
...provided.draggableProps.style
|
|
274
274
|
}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Checkbox,
|
|
2
|
+
import { Checkbox, cls } from "@firecms/ui";
|
|
3
3
|
import { PreviewSize } from "../PropertyPreviewProps";
|
|
4
4
|
import { Property } from "../../types";
|
|
5
5
|
|
|
@@ -21,6 +21,6 @@ export function BooleanPreview({
|
|
|
21
21
|
size={size}
|
|
22
22
|
color={"secondary"}/>
|
|
23
23
|
{property.name && <span
|
|
24
|
-
className={
|
|
24
|
+
className={cls("text-text-secondary dark:text-text-secondary-dark", size === "tiny" ? "text-sm" : "")}>{property.name}</span>}
|
|
25
25
|
</div>;
|
|
26
26
|
}
|
|
@@ -4,7 +4,7 @@ import { ResolvedProperty } from "../../types";
|
|
|
4
4
|
import { useCustomizationController } from "../../hooks";
|
|
5
5
|
import { PreviewSize, PropertyPreviewProps } from "../PropertyPreviewProps";
|
|
6
6
|
import { PropertyPreview } from "../PropertyPreview";
|
|
7
|
-
import {
|
|
7
|
+
import { cls, defaultBorderMixin } from "@firecms/ui";
|
|
8
8
|
import { DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE } from "../../util/common";
|
|
9
9
|
import { ErrorBoundary } from "../../components";
|
|
10
10
|
|
|
@@ -49,7 +49,7 @@ export function ArrayOneOfPreview({
|
|
|
49
49
|
values.map((value, index) =>
|
|
50
50
|
<React.Fragment
|
|
51
51
|
key={"preview_array_" + value + "_" + index}>
|
|
52
|
-
<div className={
|
|
52
|
+
<div className={cls(defaultBorderMixin, "m-1 border-b last:border-b-0")}>
|
|
53
53
|
<ErrorBoundary>
|
|
54
54
|
{value && <PropertyPreview
|
|
55
55
|
propertyKey={propertyKey}
|
|
@@ -5,7 +5,7 @@ import { ResolvedProperty } from "../../types";
|
|
|
5
5
|
import { useCustomizationController } from "../../hooks";
|
|
6
6
|
import { PreviewSize, PropertyPreviewProps } from "../PropertyPreviewProps";
|
|
7
7
|
import { PropertyPreview } from "../PropertyPreview";
|
|
8
|
-
import {
|
|
8
|
+
import { cls, defaultBorderMixin } from "@firecms/ui";
|
|
9
9
|
import { ErrorBoundary } from "../../components";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -48,7 +48,7 @@ export function ArrayPropertyPreview({
|
|
|
48
48
|
return of
|
|
49
49
|
? <React.Fragment
|
|
50
50
|
key={"preview_array_" + index}>
|
|
51
|
-
<div className={
|
|
51
|
+
<div className={cls(defaultBorderMixin, "m-1 border-b last:border-b-0")}>
|
|
52
52
|
<ErrorBoundary>
|
|
53
53
|
<PropertyPreview
|
|
54
54
|
propertyKey={propertyKey}
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { ResolvedMapProperty } from "../../types";
|
|
4
4
|
import { PropertyPreviewProps } from "../PropertyPreviewProps";
|
|
5
5
|
import { PropertyPreview } from "../PropertyPreview";
|
|
6
|
-
import {
|
|
6
|
+
import { cls, defaultBorderMixin, Typography } from "@firecms/ui";
|
|
7
7
|
import { ErrorBoundary } from "../../components";
|
|
8
8
|
import { EmptyValue } from "../components/EmptyValue";
|
|
9
9
|
|
|
@@ -61,7 +61,7 @@ export function MapPropertyPreview<T extends Record<string, any> = Record<string
|
|
|
61
61
|
return (
|
|
62
62
|
<div
|
|
63
63
|
key={`map_preview_table_${key}}`}
|
|
64
|
-
className={
|
|
64
|
+
className={cls(defaultBorderMixin, "last:border-b-0 border-b")}>
|
|
65
65
|
<div
|
|
66
66
|
className={"flex flex-row pt-0.5 pb-0.5 gap-2"}>
|
|
67
67
|
<div
|
|
@@ -87,7 +87,7 @@ export function MapPropertyPreview<T extends Record<string, any> = Record<string
|
|
|
87
87
|
</div>
|
|
88
88
|
|
|
89
89
|
{(childProperty.dataType === "map" || childProperty === "array") &&
|
|
90
|
-
<div className={
|
|
90
|
+
<div className={cls(defaultBorderMixin, "border-l pl-4 ml-2 my-2")}>
|
|
91
91
|
<PropertyPreview
|
|
92
92
|
propertyKey={key}
|
|
93
93
|
value={(value)[key]}
|
|
@@ -113,7 +113,7 @@ export function KeyValuePreview({ value }: { value: any }) {
|
|
|
113
113
|
Object.entries(value).map(([key, childValue]) => (
|
|
114
114
|
<div
|
|
115
115
|
key={`map_preview_table_${key}}`}
|
|
116
|
-
className={
|
|
116
|
+
className={cls(defaultBorderMixin, "last:border-b-0 border-b")}>
|
|
117
117
|
<div
|
|
118
118
|
className={"flex flex-row pt-0.5 pb-0.5 gap-2"}>
|
|
119
119
|
<div
|
|
@@ -135,7 +135,7 @@ export function KeyValuePreview({ value }: { value: any }) {
|
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
137
137
|
{typeof childValue === "object" &&
|
|
138
|
-
<div className={
|
|
138
|
+
<div className={cls(defaultBorderMixin, "border-l pl-4")}>
|
|
139
139
|
<KeyValuePreview value={childValue}/>
|
|
140
140
|
</div>
|
|
141
141
|
}
|
|
@@ -6,7 +6,7 @@ import { PreviewType } from "../../types";
|
|
|
6
6
|
import { UrlComponentPreview } from "../components/UrlComponentPreview";
|
|
7
7
|
import { PropertyPreviewProps } from "../PropertyPreviewProps";
|
|
8
8
|
import { ErrorBoundary } from "../../components";
|
|
9
|
-
import { Chip,
|
|
9
|
+
import { Chip, cls, getColorSchemeForSeed } from "@firecms/ui";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @group Preview components
|
|
@@ -45,7 +45,7 @@ export function StringPropertyPreview({
|
|
|
45
45
|
if (!value) return <></>;
|
|
46
46
|
const lines = value.split("\n");
|
|
47
47
|
return value && value.includes("\n")
|
|
48
|
-
? <div className={
|
|
48
|
+
? <div className={cls("overflow-x-scroll", size === "tiny" ? "text-sm" : "")}>
|
|
49
49
|
{lines.map((str, index) =>
|
|
50
50
|
<React.Fragment key={`string_preview_${index}`}>
|
|
51
51
|
<span>{str}</span>
|