@firecms/core 3.0.0-canary.56 → 3.0.0-canary.58

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.
Files changed (42) hide show
  1. package/dist/components/FireCMSAppBar.d.ts +1 -1
  2. package/dist/core/Scaffold.d.ts +2 -3
  3. package/dist/index.es.js +1 -1
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/index.umd.js +5 -5
  6. package/dist/index.umd.js.map +1 -1
  7. package/package.json +4 -4
  8. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +2 -2
  9. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -2
  10. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +2 -2
  11. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +2 -2
  12. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +3 -3
  13. package/src/components/EntityCollectionView/EntityCollectionView.tsx +2 -2
  14. package/src/components/EntityPreview.tsx +3 -3
  15. package/src/components/EntityView.tsx +3 -3
  16. package/src/components/FireCMSAppBar.tsx +4 -4
  17. package/src/components/HomePage/NavigationCard.tsx +2 -2
  18. package/src/components/HomePage/SmallNavigationCard.tsx +2 -2
  19. package/src/components/ReferenceWidget.tsx +2 -2
  20. package/src/components/VirtualTable/VirtualTable.tsx +2 -2
  21. package/src/components/VirtualTable/VirtualTableHeader.tsx +4 -4
  22. package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +2 -2
  23. package/src/components/VirtualTable/VirtualTableRow.tsx +2 -2
  24. package/src/core/Drawer.tsx +2 -2
  25. package/src/core/DrawerNavigationItem.tsx +3 -3
  26. package/src/core/EntityEditView.tsx +3 -3
  27. package/src/core/Scaffold.tsx +6 -7
  28. package/src/form/EntityForm.tsx +2 -2
  29. package/src/form/components/StorageItemPreview.tsx +2 -2
  30. package/src/form/components/StorageUploadProgress.tsx +2 -2
  31. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +2 -2
  32. package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
  33. package/src/form/field_bindings/KeyValueFieldBinding.tsx +4 -4
  34. package/src/form/field_bindings/MarkdownFieldBinding.tsx +2 -2
  35. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +2 -2
  36. package/src/form/field_bindings/SelectFieldBinding.tsx +2 -2
  37. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +4 -4
  38. package/src/preview/components/BooleanPreview.tsx +2 -2
  39. package/src/preview/property_previews/ArrayOneOfPreview.tsx +2 -2
  40. package/src/preview/property_previews/ArrayPropertyPreview.tsx +2 -2
  41. package/src/preview/property_previews/MapPropertyPreview.tsx +5 -5
  42. package/src/preview/property_previews/StringPropertyPreview.tsx +2 -2
@@ -8,7 +8,7 @@ import {
8
8
  ArrowDropDownIcon,
9
9
  BooleanSwitchWithLabel,
10
10
  Button,
11
- cn,
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={cn(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
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={cn(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
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={cn(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
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
- cn,
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={cn(fieldBackgroundMixin,
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 { cn, paperMixin } from "@firecms/ui";
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={cn(paperMixin, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar")}>
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, cn, IconButton, Select, SelectItem } from "@firecms/ui";
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={cn("w-full")}
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
- cn,
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={cn(
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={cn("flex items-center p-1 no-scrollbar",
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={cn(focusedMixin, "rounded-md")}
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, cn } from "@firecms/ui";
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={cn("text-text-secondary dark:text-text-secondary-dark", size === "tiny" ? "text-sm" : "")}>{property.name}</span>}
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 { cn, defaultBorderMixin } from "@firecms/ui";
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={cn(defaultBorderMixin, "m-1 border-b last:border-b-0")}>
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 { cn, defaultBorderMixin } from "@firecms/ui";
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={cn(defaultBorderMixin, "m-1 border-b last:border-b-0")}>
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 { cn, defaultBorderMixin, Typography } from "@firecms/ui";
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={cn(defaultBorderMixin, "last:border-b-0 border-b")}>
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={cn(defaultBorderMixin, "border-l pl-4 ml-2 my-2")}>
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={cn(defaultBorderMixin, "last:border-b-0 border-b")}>
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={cn(defaultBorderMixin, "border-l pl-4")}>
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, cn, getColorSchemeForSeed } from "@firecms/ui";
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={cn("overflow-x-scroll", size === "tiny" ? "text-sm" : "")}>
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>