@firecms/core 3.0.0-beta.7 → 3.0.0-beta.9

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 (216) hide show
  1. package/dist/app/AppBar.d.ts +12 -0
  2. package/dist/app/Drawer.d.ts +17 -0
  3. package/dist/app/Scaffold.d.ts +30 -0
  4. package/dist/app/index.d.ts +4 -0
  5. package/dist/app/useApp.d.ts +16 -0
  6. package/dist/components/ArrayContainer.d.ts +2 -1
  7. package/dist/components/CircularProgressCenter.d.ts +1 -1
  8. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +0 -1
  9. package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +1 -1
  10. package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +1 -1
  11. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +1 -1
  12. package/dist/components/EntityPreview.d.ts +1 -1
  13. package/dist/components/ErrorView.d.ts +1 -1
  14. package/dist/components/HomePage/DefaultHomePage.d.ts +1 -1
  15. package/dist/components/HomePage/NavigationCardBinding.d.ts +1 -1
  16. package/dist/components/PropertyIdCopyTooltip.d.ts +8 -0
  17. package/dist/components/VirtualTable/VirtualTableProps.d.ts +14 -6
  18. package/dist/components/common/useColumnsIds.d.ts +2 -1
  19. package/dist/components/index.d.ts +2 -1
  20. package/dist/{components/FireCMSAppBar.d.ts → core/DefaultAppBar.d.ts} +3 -8
  21. package/dist/core/DefaultDrawer.d.ts +19 -0
  22. package/dist/core/DrawerNavigationItem.d.ts +2 -1
  23. package/dist/core/EntityEditView.d.ts +18 -4
  24. package/dist/core/FireCMS.d.ts +1 -1
  25. package/dist/core/NavigationRoutes.d.ts +2 -2
  26. package/dist/core/index.d.ts +2 -2
  27. package/dist/form/PropertyFieldBinding.d.ts +1 -1
  28. package/dist/form/components/FieldHelperText.d.ts +3 -3
  29. package/dist/form/components/FormikArrayContainer.d.ts +2 -1
  30. package/dist/form/components/LabelWithIcon.d.ts +1 -1
  31. package/dist/form/components/LabelWithIconAndTooltip.d.ts +15 -0
  32. package/dist/form/components/StorageItemPreview.d.ts +4 -4
  33. package/dist/form/components/index.d.ts +1 -0
  34. package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +1 -1
  35. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +1 -1
  36. package/dist/form/field_bindings/BlockFieldBinding.d.ts +1 -1
  37. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +1 -1
  38. package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
  39. package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +11 -0
  40. package/dist/form/field_bindings/{MultiSelectBinding.d.ts → MultiSelectFieldBinding.d.ts} +1 -1
  41. package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +1 -1
  42. package/dist/form/field_bindings/RepeatFieldBinding.d.ts +1 -1
  43. package/dist/form/field_bindings/SelectFieldBinding.d.ts +1 -1
  44. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -5
  45. package/dist/form/field_bindings/TextFieldBinding.d.ts +1 -1
  46. package/dist/form/index.d.ts +3 -5
  47. package/dist/form/useClearRestoreValue.d.ts +2 -2
  48. package/dist/hooks/useProjectLog.d.ts +2 -2
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.es.js +14434 -11300
  51. package/dist/index.es.js.map +1 -1
  52. package/dist/index.umd.js +19987 -587
  53. package/dist/index.umd.js.map +1 -1
  54. package/dist/preview/PropertyPreviewProps.d.ts +6 -1
  55. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  56. package/dist/preview/components/ReferencePreview.d.ts +1 -1
  57. package/dist/preview/components/StorageThumbnail.d.ts +2 -1
  58. package/dist/preview/components/UrlComponentPreview.d.ts +2 -1
  59. package/dist/types/auth.d.ts +2 -2
  60. package/dist/types/collections.d.ts +26 -3
  61. package/dist/types/datasource.d.ts +53 -30
  62. package/dist/types/entities.d.ts +1 -0
  63. package/dist/types/entity_overrides.d.ts +2 -2
  64. package/dist/types/fields.d.ts +47 -41
  65. package/dist/types/navigation.d.ts +1 -0
  66. package/dist/types/plugins.d.ts +11 -3
  67. package/dist/types/properties.d.ts +25 -20
  68. package/dist/types/side_dialogs_controller.d.ts +10 -0
  69. package/dist/types/storage.d.ts +75 -0
  70. package/dist/util/entities.d.ts +1 -1
  71. package/dist/util/icon_list.d.ts +5 -1
  72. package/dist/util/icons.d.ts +3 -2
  73. package/dist/util/index.d.ts +1 -0
  74. package/dist/util/plurals.d.ts +0 -2
  75. package/dist/util/property_utils.d.ts +1 -1
  76. package/dist/util/resolutions.d.ts +15 -1
  77. package/dist/util/storage.d.ts +23 -2
  78. package/dist/util/useStorageUploadController.d.ts +3 -3
  79. package/package.json +18 -29
  80. package/src/app/AppBar.tsx +18 -0
  81. package/src/app/Drawer.tsx +25 -0
  82. package/src/{core → app}/Scaffold.tsx +71 -122
  83. package/src/app/index.ts +4 -0
  84. package/src/app/useApp.tsx +32 -0
  85. package/src/components/ArrayContainer.tsx +15 -10
  86. package/src/components/CircularProgressCenter.tsx +1 -1
  87. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +11 -18
  88. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -2
  89. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +4 -2
  90. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +21 -14
  91. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +12 -4
  92. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +17 -19
  93. package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +19 -7
  94. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +5 -6
  95. package/src/components/EntityCollectionView/EntityCollectionView.tsx +33 -29
  96. package/src/components/EntityCollectionView/useSelectionController.tsx +19 -7
  97. package/src/components/EntityPreview.tsx +30 -31
  98. package/src/components/ErrorView.tsx +1 -1
  99. package/src/components/HomePage/DefaultHomePage.tsx +24 -18
  100. package/src/components/HomePage/NavigationCardBinding.tsx +1 -1
  101. package/src/components/HomePage/SmallNavigationCard.tsx +1 -2
  102. package/src/components/PropertyIdCopyTooltip.tsx +48 -0
  103. package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +7 -6
  104. package/src/components/SearchIconsView.tsx +5 -2
  105. package/src/components/SelectableTable/SelectableTable.tsx +2 -4
  106. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +1 -1
  107. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +54 -7
  108. package/src/components/VirtualTable/VirtualTable.tsx +36 -10
  109. package/src/components/VirtualTable/VirtualTableCell.tsx +1 -9
  110. package/src/components/VirtualTable/VirtualTableProps.tsx +17 -8
  111. package/src/components/VirtualTable/fields/VirtualTableDateField.tsx +3 -3
  112. package/src/components/VirtualTable/fields/VirtualTableInput.tsx +2 -1
  113. package/src/components/VirtualTable/fields/VirtualTableNumberInput.tsx +2 -1
  114. package/src/components/VirtualTable/fields/VirtualTableSelect.tsx +14 -28
  115. package/src/components/common/useColumnsIds.tsx +13 -0
  116. package/src/components/common/useDataSourceEntityCollectionTableController.tsx +12 -12
  117. package/src/components/common/useTableSearchHelper.ts +53 -12
  118. package/src/components/index.tsx +2 -1
  119. package/src/contexts/DialogsProvider.tsx +2 -2
  120. package/src/{components/FireCMSAppBar.tsx → core/DefaultAppBar.tsx} +28 -30
  121. package/src/core/DefaultDrawer.tsx +183 -0
  122. package/src/core/DrawerNavigationItem.tsx +31 -27
  123. package/src/core/EntityEditView.tsx +712 -145
  124. package/src/core/EntitySidePanel.tsx +0 -1
  125. package/src/core/FireCMS.tsx +2 -2
  126. package/src/core/NavigationRoutes.tsx +4 -4
  127. package/src/core/SideDialogs.tsx +1 -0
  128. package/src/core/field_configs.tsx +5 -5
  129. package/src/core/index.tsx +2 -2
  130. package/src/form/PropertyFieldBinding.tsx +53 -19
  131. package/src/form/components/CustomIdField.tsx +4 -2
  132. package/src/form/components/FieldHelperText.tsx +4 -4
  133. package/src/form/components/FormikArrayContainer.tsx +4 -1
  134. package/src/form/components/LabelWithIcon.tsx +27 -19
  135. package/src/form/components/LabelWithIconAndTooltip.tsx +28 -0
  136. package/src/form/components/StorageItemPreview.tsx +20 -10
  137. package/src/form/components/StorageUploadProgress.tsx +0 -1
  138. package/src/form/components/index.tsx +1 -0
  139. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +26 -15
  140. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +28 -25
  141. package/src/form/field_bindings/BlockFieldBinding.tsx +13 -11
  142. package/src/form/field_bindings/DateTimeFieldBinding.tsx +17 -14
  143. package/src/form/field_bindings/KeyValueFieldBinding.tsx +48 -42
  144. package/src/form/field_bindings/MapFieldBinding.tsx +17 -17
  145. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +150 -0
  146. package/src/form/field_bindings/{MultiSelectBinding.tsx → MultiSelectFieldBinding.tsx} +25 -20
  147. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +9 -14
  148. package/src/form/field_bindings/ReferenceFieldBinding.tsx +27 -18
  149. package/src/form/field_bindings/RepeatFieldBinding.tsx +32 -19
  150. package/src/form/field_bindings/SelectFieldBinding.tsx +17 -10
  151. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +33 -43
  152. package/src/form/field_bindings/SwitchFieldBinding.tsx +9 -5
  153. package/src/form/field_bindings/TextFieldBinding.tsx +26 -23
  154. package/src/form/index.tsx +4 -9
  155. package/src/form/useClearRestoreValue.tsx +2 -2
  156. package/src/form/validation.ts +1 -17
  157. package/src/hooks/data/delete.ts +2 -1
  158. package/src/hooks/data/save.ts +5 -2
  159. package/src/hooks/data/useDataSource.tsx +11 -3
  160. package/src/hooks/useBuildNavigationController.tsx +10 -3
  161. package/src/hooks/useProjectLog.tsx +18 -7
  162. package/src/index.ts +1 -0
  163. package/src/internal/useBuildDataSource.ts +69 -74
  164. package/src/internal/useBuildSideDialogsController.tsx +1 -0
  165. package/src/internal/useBuildSideEntityController.tsx +17 -4
  166. package/src/internal/useUnsavedChangesDialog.tsx +3 -1
  167. package/src/preview/PropertyPreview.tsx +7 -4
  168. package/src/preview/PropertyPreviewProps.tsx +7 -1
  169. package/src/preview/components/BooleanPreview.tsx +1 -1
  170. package/src/preview/components/EnumValuesChip.tsx +1 -1
  171. package/src/preview/components/ImagePreview.tsx +24 -34
  172. package/src/preview/components/ReferencePreview.tsx +2 -12
  173. package/src/preview/components/StorageThumbnail.tsx +5 -1
  174. package/src/preview/components/UrlComponentPreview.tsx +44 -11
  175. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
  176. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +1 -1
  177. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +1 -1
  178. package/src/preview/property_previews/ArrayOneOfPreview.tsx +2 -2
  179. package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
  180. package/src/preview/property_previews/MapPropertyPreview.tsx +1 -1
  181. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +2 -2
  182. package/src/preview/property_previews/StringPropertyPreview.tsx +2 -2
  183. package/src/preview/util.ts +2 -2
  184. package/src/types/auth.tsx +2 -2
  185. package/src/types/collections.ts +29 -4
  186. package/src/types/customization_controller.tsx +0 -1
  187. package/src/types/datasource.ts +62 -43
  188. package/src/types/entities.ts +2 -0
  189. package/src/types/entity_overrides.tsx +2 -2
  190. package/src/types/fields.tsx +51 -45
  191. package/src/types/navigation.ts +1 -0
  192. package/src/types/plugins.tsx +12 -3
  193. package/src/types/properties.ts +25 -19
  194. package/src/types/side_dialogs_controller.tsx +13 -0
  195. package/src/types/storage.ts +82 -0
  196. package/src/util/entities.ts +5 -4
  197. package/src/util/icon_list.ts +14 -9
  198. package/src/util/icons.tsx +8 -2
  199. package/src/util/index.ts +1 -0
  200. package/src/util/objects.ts +17 -7
  201. package/src/util/permissions.ts +1 -0
  202. package/src/util/plurals.ts +0 -2
  203. package/src/util/property_utils.tsx +1 -1
  204. package/src/util/references.ts +3 -0
  205. package/src/util/resolutions.ts +43 -11
  206. package/src/util/storage.ts +79 -21
  207. package/src/util/useStorageUploadController.tsx +33 -7
  208. package/dist/components/PropertyIdCopyTooltipContent.d.ts +0 -3
  209. package/dist/core/Drawer.d.ts +0 -16
  210. package/dist/core/Scaffold.d.ts +0 -51
  211. package/dist/form/EntityForm.d.ts +0 -77
  212. package/dist/form/field_bindings/MarkdownFieldBinding.d.ts +0 -9
  213. package/src/components/PropertyIdCopyTooltipContent.tsx +0 -27
  214. package/src/core/Drawer.tsx +0 -139
  215. package/src/form/EntityForm.tsx +0 -736
  216. package/src/form/field_bindings/MarkdownFieldBinding.tsx +0 -695
@@ -0,0 +1,12 @@
1
+ import { DefaultAppBarProps } from "../core/DefaultAppBar";
2
+ /**
3
+ * This component renders the main app bar of FireCMS.
4
+ */
5
+ export declare function AppBar({ children, ...props }: {
6
+ children?: React.ReactNode;
7
+ className?: string;
8
+ style?: React.CSSProperties;
9
+ } & DefaultAppBarProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare namespace AppBar {
11
+ var componentType: string;
12
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This component is in charge of rendering the drawer.
3
+ * If you add this component under your {@link Scaffold}, it will be rendered
4
+ * as a drawer, and the open and close functionality will be handled automatically.
5
+ * If you want to customise the drawer, you can create your own component and pass it as a child.
6
+ * For custom drawers, you can use the {@link useApp} to open and close the drawer.
7
+ *
8
+
9
+ */
10
+ export declare function Drawer({ children, className, style }: {
11
+ children?: React.ReactNode;
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export declare namespace Drawer {
16
+ var componentType: string;
17
+ }
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ export declare const DRAWER_WIDTH = 280;
3
+ /**
4
+ * @group Core
5
+ */
6
+ export interface ScaffoldProps {
7
+ /**
8
+ * Open the drawer on hover
9
+ */
10
+ autoOpenDrawer?: boolean;
11
+ /**
12
+ * Logo to be displayed in the top bar and drawer.
13
+ * Note that this has no effect if you are using a custom AppBar or Drawer.
14
+ */
15
+ logo?: string;
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ }
19
+ /**
20
+ * This view acts as a scaffold for FireCMS.
21
+ *
22
+ * It is in charge of displaying the navigation drawer, top bar and main
23
+ * collection views.
24
+ * This component needs a parent {@link FireCMS}
25
+ *
26
+ * @param props
27
+
28
+ * @group Core
29
+ */
30
+ export declare const Scaffold: React.NamedExoticComponent<React.PropsWithChildren<ScaffoldProps>>;
@@ -0,0 +1,4 @@
1
+ export * from "./Drawer";
2
+ export * from "./AppBar";
3
+ export * from "./Scaffold";
4
+ export * from "./useApp";
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ /**
3
+ * This context represents the state of the app in terms of layout.
4
+ * @group Core
5
+ */
6
+ export type AppState = {
7
+ hasDrawer: boolean;
8
+ drawerHovered: boolean;
9
+ drawerOpen: boolean;
10
+ openDrawer: () => void;
11
+ closeDrawer: () => void;
12
+ autoOpenDrawer?: boolean;
13
+ logo?: string;
14
+ };
15
+ export declare const AppContext: React.Context<AppState>;
16
+ export declare function useApp(): AppState;
@@ -11,11 +11,12 @@ interface ArrayContainerProps<T> {
11
11
  includeAddButton?: boolean;
12
12
  newDefaultEntry: T;
13
13
  onValueChange: (value: T[]) => void;
14
+ className?: string;
14
15
  }
15
16
  /**
16
17
  * @group Form custom fields
17
18
  */
18
- export declare function ArrayContainer<T>({ droppableId, addLabel, value, disabled, buildEntry, size, onInternalIdAdded, includeAddButton, newDefaultEntry, onValueChange }: ArrayContainerProps<T>): import("react/jsx-runtime").JSX.Element;
19
+ export declare function ArrayContainer<T>({ droppableId, addLabel, value, disabled, buildEntry, size, onInternalIdAdded, includeAddButton, newDefaultEntry, onValueChange, className }: ArrayContainerProps<T>): import("react/jsx-runtime").JSX.Element;
19
20
  type ArrayContainerItemProps = {
20
21
  provided: DraggableProvided;
21
22
  index: number;
@@ -3,7 +3,7 @@ import { CircularProgressProps } from "@firecms/ui";
3
3
  *
4
4
  * @param text
5
5
  * @param props
6
- * @constructor
6
+
7
7
  * @ignore
8
8
  */
9
9
  export declare function CircularProgressCenter({ text, ...props }: CircularProgressProps & {
@@ -9,7 +9,6 @@ import { CollectionSize, Entity, EntityAction, EntityCollection, SelectionContro
9
9
  * @param size
10
10
  * @param toggleEntitySelection
11
11
  * @param hideId
12
- * @constructor
13
12
  *
14
13
  * @group Collection components
15
14
  */
@@ -15,7 +15,7 @@ type TableReferenceFieldProps = {
15
15
  includeEntityLink?: boolean;
16
16
  };
17
17
  export declare function TableReferenceField(props: TableReferenceFieldProps): import("react/jsx-runtime").JSX.Element;
18
- export declare const TableReferenceFieldSuccess: React.NamedExoticComponent<TableReferenceFieldProps & {
18
+ export declare const TableReferenceFieldInternal: React.NamedExoticComponent<TableReferenceFieldProps & {
19
19
  collection: EntityCollection;
20
20
  }>;
21
21
  export {};
@@ -2,7 +2,7 @@ import { Entity, EntityCollection } from "../../../../types";
2
2
  import { CustomFieldValidator } from "../../../../form/validation";
3
3
  import { OnCellValueChangeParams } from "../../../common";
4
4
  interface PopupFormFieldProps<M extends Record<string, any>> {
5
- entity?: Entity<M>;
5
+ entity: Entity<M>;
6
6
  customFieldValidator?: CustomFieldValidator;
7
7
  path: string;
8
8
  tableKey: string;
@@ -40,7 +40,7 @@ export type EntityCollectionViewProps<M extends Record<string, any>> = {
40
40
  *
41
41
  * @param fullPath
42
42
  * @param collection
43
- * @constructor
43
+
44
44
  * @group Components
45
45
  */
46
46
  export declare const EntityCollectionView: React.FunctionComponent<EntityCollectionViewProps<any>>;
@@ -27,4 +27,4 @@ export type EntityPreviewContainerProps = {
27
27
  style?: React.CSSProperties;
28
28
  onClick?: (e: React.SyntheticEvent) => void;
29
29
  };
30
- export declare const EntityPreviewContainer: React.FC<EntityPreviewContainerProps>;
30
+ export declare const EntityPreviewContainer: React.ForwardRefExoticComponent<EntityPreviewContainerProps & React.RefAttributes<HTMLDivElement>>;
@@ -13,7 +13,7 @@ export interface ErrorViewProps {
13
13
  * @param title
14
14
  * @param error
15
15
  * @param tooltip
16
- * @constructor
16
+
17
17
  * @group Components
18
18
  */
19
19
  export declare function ErrorView({ title, error, tooltip }: ErrorViewProps): React.ReactElement;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  /**
3
3
  * Default entry view for the CMS. This component renders navigation cards
4
4
  * for each collection defined in the navigation.
5
- * @constructor
5
+
6
6
  * @group Components
7
7
  */
8
8
  export declare function DefaultHomePage({ additionalActions, additionalChildrenStart, additionalChildrenEnd }: {
@@ -10,7 +10,7 @@ import { TopNavigationEntry } from "../../types";
10
10
  * @param name
11
11
  * @param description
12
12
  * @param onClick
13
- * @constructor
13
+
14
14
  */
15
15
  export declare function NavigationCardBinding({ path, collection, view, url, name, description, onClick, type }: TopNavigationEntry & {
16
16
  onClick?: () => void;
@@ -0,0 +1,8 @@
1
+ export declare function PropertyIdCopyTooltip({ propertyKey, className, children }: {
2
+ propertyKey: string;
3
+ className?: string;
4
+ children: React.ReactNode;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export declare function PropertyIdCopyTooltipContent({ propertyKey }: {
7
+ propertyKey: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -25,10 +25,6 @@ export interface VirtualTableProps<T extends Record<string, any>> {
25
25
  * The renderer receives props `{ cellData, columns, column, columnIndex, rowData, rowIndex, container, isScrolling }`
26
26
  */
27
27
  cellRenderer: React.ComponentType<CellRendererParams<T>>;
28
- /**
29
- * If enabled, content is loaded in batch
30
- */
31
- paginationEnabled?: boolean;
32
28
  /**
33
29
  * Set this callback if you want to support some combinations
34
30
  * of filter combinations only.
@@ -40,6 +36,10 @@ export interface VirtualTableProps<T extends Record<string, any>> {
40
36
  * A callback function when scrolling the table to near the end
41
37
  */
42
38
  onEndReached?: () => void;
39
+ /**
40
+ * Offset in pixels where the onEndReached callback is triggered
41
+ */
42
+ endOffset?: number;
43
43
  /**
44
44
  * When the pagination should be reset. E.g. the filters or sorting
45
45
  * has been reset.
@@ -106,6 +106,10 @@ export interface VirtualTableProps<T extends Record<string, any>> {
106
106
  * Class name applied to the table
107
107
  */
108
108
  className?: string;
109
+ /**
110
+ * Style applied to the table
111
+ */
112
+ style?: React.CSSProperties;
109
113
  /**
110
114
  * Component rendered at the end of the table, after scroll
111
115
  */
@@ -115,8 +119,12 @@ export interface VirtualTableProps<T extends Record<string, any>> {
115
119
  * @param column
116
120
  */
117
121
  AddColumnComponent?: React.ComponentType;
122
+ /**
123
+ * Debug mode
124
+ */
125
+ debug?: boolean;
118
126
  }
119
- export type CellRendererParams<T extends any = any> = {
127
+ export type CellRendererParams<T = any> = {
120
128
  column: VirtualTableColumn;
121
129
  columns: VirtualTableColumn[];
122
130
  columnIndex: number;
@@ -129,7 +137,7 @@ export type CellRendererParams<T extends any = any> = {
129
137
  * @see Table
130
138
  * @group Components
131
139
  */
132
- export interface VirtualTableColumn<CustomProps extends any = any> {
140
+ export interface VirtualTableColumn<CustomProps = any> {
133
141
  /**
134
142
  * Data key for the cell value, could be "a.b.c"
135
143
  */
@@ -1,4 +1,5 @@
1
- import { ResolvedEntityCollection, ResolvedProperty } from "../../types";
1
+ import { EntityCollection, ResolvedEntityCollection, ResolvedProperty } from "../../types";
2
2
  import { PropertyColumnConfig } from "../EntityCollectionTable/EntityCollectionTableProps";
3
3
  export declare function useColumnIds<M extends Record<string, any>>(collection: ResolvedEntityCollection<M>, includeSubcollections: boolean): PropertyColumnConfig[];
4
4
  export declare function getColumnKeysForProperty(property: ResolvedProperty, key: string, disabled?: boolean): PropertyColumnConfig[];
5
+ export declare function getFormFieldKeys(collection: EntityCollection): string[];
@@ -13,13 +13,14 @@ export * from "./EntityCollectionView/EntityCollectionView";
13
13
  export * from "./EntityCollectionView/EntityCollectionViewActions";
14
14
  export * from "./EntityCollectionView/useSelectionController";
15
15
  export * from "./PropertyConfigBadge";
16
+ export * from "./PropertyIdCopyTooltip";
16
17
  export * from "./EntityCollectionTable";
17
18
  export * from "./NotFoundPage";
18
19
  export * from "./VirtualTable";
19
20
  export * from "./ErrorBoundary";
20
21
  export * from "./DeleteConfirmationDialog";
21
22
  export * from "./FireCMSLogo";
22
- export * from "./FireCMSAppBar";
23
+ export * from "../core/DefaultAppBar";
23
24
  export * from "./ArrayContainer";
24
25
  export * from "./ReferenceWidget";
25
26
  export * from "./SearchIconsView";
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { User } from "../types";
3
- export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
3
+ export type DefaultAppBarProps<ADDITIONAL_PROPS = object> = {
4
4
  title?: React.ReactNode;
5
5
  /**
6
6
  * A component that gets rendered on the upper side of the main toolbar
@@ -8,9 +8,7 @@ export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
8
8
  endAdornment?: React.ReactNode;
9
9
  startAdornment?: React.ReactNode;
10
10
  dropDownActions?: React.ReactNode;
11
- includeDrawer?: boolean;
12
11
  includeModeToggle?: boolean;
13
- drawerOpen: boolean;
14
12
  className?: string;
15
13
  style?: React.CSSProperties;
16
14
  logo?: string;
@@ -20,9 +18,6 @@ export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
20
18
  * This component renders the main app bar of FireCMS.
21
19
  * You will likely not need to use this component directly.
22
20
  *
23
- * @param title
24
- * @param toolbarExtraWidget
25
- * @param drawerOpen
26
- * @constructor
21
+
27
22
  */
28
- export declare const FireCMSAppBar: ({ title, endAdornment, startAdornment, drawerOpen, dropDownActions, includeDrawer, includeModeToggle, className, style, logo, user: userProp }: FireCMSAppBarProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const DefaultAppBar: ({ title, endAdornment, startAdornment, dropDownActions, includeModeToggle, className, style, user: userProp }: DefaultAppBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ /**
3
+ * Default drawer used in the CMS
4
+ * @group Core
5
+ */
6
+ export declare function DefaultDrawer({ className, style, }: {
7
+ className?: string;
8
+ style?: React.CSSProperties;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ /**
11
+ * This is the logo displayed in the drawer
12
+ * It expands when the drawer is open.
13
+ *
14
+ * @param logo
15
+
16
+ */
17
+ export declare function DrawerLogo({ logo }: {
18
+ logo?: string;
19
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
- export declare function DrawerNavigationItem({ name, icon, drawerOpen, tooltipsOpen, url, onClick }: {
2
+ export declare function DrawerNavigationItem({ name, icon, drawerOpen, adminMenuOpen, tooltipsOpen, url, onClick }: {
3
3
  icon: React.ReactElement;
4
4
  name: string;
5
5
  tooltipsOpen: boolean;
6
6
  drawerOpen: boolean;
7
+ adminMenuOpen?: boolean;
7
8
  url: string;
8
9
  onClick?: () => void;
9
10
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import { Entity, EntityCollection, User } from "../types";
1
+ import { Entity, EntityCollection, EntityValues, ResolvedEntityCollection, User } from "../types";
2
+ import { ValidationError } from "yup";
2
3
  export interface EntityEditViewProps<M extends Record<string, any>> {
3
4
  path: string;
4
5
  collection: EntityCollection<M>;
@@ -6,7 +7,6 @@ export interface EntityEditViewProps<M extends Record<string, any>> {
6
7
  copy?: boolean;
7
8
  selectedSubPath?: string;
8
9
  parentCollectionIds: string[];
9
- formWidth?: number | string;
10
10
  onValuesAreModified: (modified: boolean) => void;
11
11
  onUpdate?: (params: {
12
12
  entity: Entity<any>;
@@ -17,6 +17,20 @@ export interface EntityEditViewProps<M extends Record<string, any>> {
17
17
  * This is the default view that is used as the content of a side panel when
18
18
  * an entity is opened.
19
19
  * You probably don't want to use this view directly since it is bound to the
20
- * side panel. Instead, you might want to use {@link EntityForm} or {@link EntityCollectionView}
20
+ * side panel.
21
21
  */
22
- export declare function EntityEditView<M extends Record<string, any>, UserType extends User>({ path, entityId, selectedSubPath, copy, collection, parentCollectionIds, onValuesAreModified, formWidth, onUpdate, onClose, }: EntityEditViewProps<M>): import("react/jsx-runtime").JSX.Element;
22
+ export declare function EntityEditView<M extends Record<string, any>, UserType extends User>({ entityId, ...props }: EntityEditViewProps<M>): import("react/jsx-runtime").JSX.Element;
23
+ export declare function EntityEditViewInner<M extends Record<string, any>>({ path, entityId: entityIdProp, selectedSubPath: selectedSubPathProp, copy, collection, parentCollectionIds, onValuesAreModified, onUpdate, onClose, entity, dataLoading }: EntityEditViewProps<M> & {
24
+ entity?: Entity<M>;
25
+ dataLoading: boolean;
26
+ }): import("react/jsx-runtime").JSX.Element;
27
+ export type EntityFormSaveParams<M extends Record<string, any>> = {
28
+ collection: ResolvedEntityCollection<M>;
29
+ path: string;
30
+ entityId: string | undefined;
31
+ values: EntityValues<M>;
32
+ previousValues?: EntityValues<M>;
33
+ closeAfterSave: boolean;
34
+ autoSave: boolean;
35
+ };
36
+ export declare function yupToFormErrors(yupError: ValidationError): Record<string, any>;
@@ -8,7 +8,7 @@ import { EntityCollection, FireCMSProps, User } from "../types";
8
8
  *
9
9
  * You only need to use this component if you are building a custom app.
10
10
  *
11
- * @constructor
11
+
12
12
  * @group Core
13
13
  */
14
14
  export declare function FireCMS<UserType extends User, EC extends EntityCollection>(props: FireCMSProps<UserType, EC>): import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,7 @@ export type NavigationRoutesProps = {
7
7
  * In case you need to override the home page
8
8
  */
9
9
  homePage?: React.ReactNode;
10
- customRoutes?: React.ReactNode[];
10
+ children?: React.ReactNode | React.ReactNode[];
11
11
  };
12
12
  /**
13
13
  * This component is in charge of rendering
@@ -15,7 +15,7 @@ export type NavigationRoutesProps = {
15
15
  * or the home route) related to a {@link NavigationController}.
16
16
  * This component needs a parent {@link FireCMS}
17
17
  *
18
- * @constructor
18
+
19
19
  * @group Components
20
20
  */
21
21
  export declare const NavigationRoutes: React.NamedExoticComponent<NavigationRoutesProps>;
@@ -1,6 +1,6 @@
1
1
  export * from "./FireCMS";
2
- export * from "./Scaffold";
3
- export * from "./Drawer";
2
+ export * from "../app/Scaffold";
3
+ export * from "./DefaultDrawer";
4
4
  export * from "./DrawerNavigationItem";
5
5
  export * from "./field_configs";
6
6
  export * from "./SideDialogs";
@@ -26,5 +26,5 @@ import { CMSType, PropertyFieldBindingProps } from "../types";
26
26
  * @group Form custom fields
27
27
  */
28
28
  export declare const PropertyFieldBinding: typeof PropertyFieldBindingInternal;
29
- declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = Record<string, any>>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled, tableMode, partOfArray, partOfBlock, autoFocus, }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
29
+ declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = Record<string, any>>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled, partOfArray, minimalistView, autoFocus, index, size }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
30
30
  export {};
@@ -1,12 +1,12 @@
1
- import { ResolvedProperty } from "../../types";
1
+ import { Property, ResolvedProperty } from "../../types";
2
2
  /**
3
3
  * Component in charge of rendering the description of a field
4
4
  * as well as the error message if any.
5
5
  */
6
6
  export declare function FieldHelperText({ error, showError, property, includeDescription, disabled }: {
7
7
  error?: string;
8
- showError: boolean;
9
- property: ResolvedProperty;
8
+ showError?: boolean;
9
+ property: ResolvedProperty | Property;
10
10
  includeDescription?: boolean;
11
11
  disabled?: boolean;
12
12
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -10,9 +10,10 @@ interface ArrayContainerProps<T> {
10
10
  includeAddButton?: boolean;
11
11
  newDefaultEntry?: T | null;
12
12
  setFieldValue: (field: string, value: any, shouldValidate?: boolean | undefined) => void;
13
+ className?: string;
13
14
  }
14
15
  /**
15
16
  * @group Form custom fields
16
17
  */
17
- export declare function FormikArrayContainer<T>({ name, addLabel, value, disabled, buildEntry, small, onInternalIdAdded, includeAddButton, newDefaultEntry, setFieldValue }: ArrayContainerProps<T>): import("react/jsx-runtime").JSX.Element;
18
+ export declare function FormikArrayContainer<T>({ name, addLabel, value, disabled, buildEntry, small, onInternalIdAdded, includeAddButton, newDefaultEntry, setFieldValue, className }: ArrayContainerProps<T>): import("react/jsx-runtime").JSX.Element;
18
19
  export {};
@@ -10,5 +10,5 @@ interface LabelWithIconProps {
10
10
  * Render the label of with an icon and the title of a property
11
11
  * @group Form custom fields
12
12
  */
13
- export declare function LabelWithIcon({ icon, title, small, className, required }: LabelWithIconProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare const LabelWithIcon: React.ForwardRefExoticComponent<LabelWithIconProps & React.RefAttributes<HTMLDivElement>>;
14
14
  export {};
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ interface LabelWithIconAndTooltip {
3
+ icon: React.ReactNode;
4
+ title?: string;
5
+ small?: boolean;
6
+ className?: string;
7
+ required?: boolean;
8
+ propertyKey: string;
9
+ }
10
+ /**
11
+ * Render the label of with an icon and the title of a property
12
+ * @group Form custom fields
13
+ */
14
+ export declare function LabelWithIconAndTooltip({ propertyKey, className, ...props }: LabelWithIconAndTooltip): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -1,14 +1,14 @@
1
- import { Entity, EntityCollection, ResolvedStringProperty } from "../../types";
1
+ import { ResolvedStringProperty } from "../../types";
2
2
  import { PreviewSize } from "../../preview";
3
3
  interface StorageItemPreviewProps {
4
4
  name: string;
5
5
  property: ResolvedStringProperty;
6
6
  value: string;
7
- entity: Entity<any>;
8
7
  onRemove: (value: string) => void;
9
8
  size: PreviewSize;
10
9
  disabled: boolean;
11
- collection: EntityCollection;
10
+ placeholder?: boolean;
11
+ className?: string;
12
12
  }
13
- export declare function StorageItemPreview({ name, property, value, entity, onRemove, disabled, size, collection }: StorageItemPreviewProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function StorageItemPreview({ name, property, value, onRemove, disabled, size, placeholder, className }: StorageItemPreviewProps): import("react/jsx-runtime").JSX.Element;
14
14
  export {};
@@ -1,3 +1,4 @@
1
1
  export * from "./FormikArrayContainer";
2
2
  export * from "./FieldHelperText";
3
3
  export * from "./LabelWithIcon";
4
+ export * from "./LabelWithIconAndTooltip";
@@ -6,4 +6,4 @@ import { FieldProps } from "../../types";
6
6
  * and tables to the specified properties.
7
7
  * @group Form fields
8
8
  */
9
- export declare function ArrayCustomShapedFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, tableMode, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T, any, any>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ArrayCustomShapedFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, minimalistView, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T, any, any>): import("react/jsx-runtime").JSX.Element;
@@ -7,5 +7,5 @@ type ArrayOfReferencesFieldProps = FieldProps<EntityReference[]>;
7
7
  * and tables to the specified properties.
8
8
  * @group Form fields
9
9
  */
10
- export declare function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, disabled, isSubmitting, tableMode, property, includeDescription, setValue, setFieldValue }: ArrayOfReferencesFieldProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, disabled, isSubmitting, minimalistView, property, includeDescription, setValue, setFieldValue }: ArrayOfReferencesFieldProps): import("react/jsx-runtime").JSX.Element;
11
11
  export {};
@@ -7,4 +7,4 @@ import { FieldProps } from "../../types";
7
7
  * and tables to the specified properties.
8
8
  * @group Form fields
9
9
  */
10
- export declare function BlockFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, tableMode, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function BlockFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, minimalistView, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -4,4 +4,4 @@ import { FieldProps } from "../../types";
4
4
  *
5
5
  * @group Form fields
6
6
  */
7
- export declare function KeyValueFieldBinding({ propertyKey, value, showError, error, disabled, property, setValue, tableMode, includeDescription, underlyingValueHasChanged, autoFocus, context }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function KeyValueFieldBinding({ propertyKey, value, showError, error, disabled, property, setValue, minimalistView, includeDescription, underlyingValueHasChanged, autoFocus, context }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
@@ -6,4 +6,4 @@ import { FieldProps } from "../../types";
6
6
  * and tables to the specified properties.
7
7
  * @group Form fields
8
8
  */
9
- export declare function MapFieldBinding({ propertyKey, value, showError, error, disabled, property, setValue, partOfBlock, tableMode, includeDescription, underlyingValueHasChanged, autoFocus, context }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MapFieldBinding({ propertyKey, value, showError, error, disabled, property, minimalistView, includeDescription, underlyingValueHasChanged, autoFocus, context }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { FieldProps } from "../../index";
2
+ import { FireCMSEditorProps } from "@firecms/editor";
3
+ interface MarkdownEditorFieldProps {
4
+ highlight?: {
5
+ from: number;
6
+ to: number;
7
+ };
8
+ editorProps?: Partial<FireCMSEditorProps>;
9
+ }
10
+ export declare function MarkdownEditorFieldBinding({ property, propertyKey, value, setValue, includeDescription, showError, error, minimalistView, isSubmitting, context, customProps, }: FieldProps<string, MarkdownEditorFieldProps>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -6,4 +6,4 @@ import { EnumType, FieldProps } from "../../types";
6
6
  * and tables to the specified properties.
7
7
  * @group Form fields
8
8
  */
9
- export declare function MultiSelectBinding({ propertyKey, value, setValue, error, showError, disabled, property, includeDescription, autoFocus }: FieldProps<EnumType[], any, any>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MultiSelectFieldBinding({ propertyKey, value, setValue, error, showError, disabled, property, includeDescription, size, autoFocus }: FieldProps<EnumType[], any, any>): import("react/jsx-runtime").JSX.Element;
@@ -7,4 +7,4 @@ import { FieldProps } from "../../types";
7
7
  * and tables to the specified properties.
8
8
  * @group Form fields
9
9
  */
10
- export declare function ReadOnlyFieldBinding({ propertyKey, value, error, showError, tableMode, property, includeDescription, context }: FieldProps<any>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ReadOnlyFieldBinding({ propertyKey, value, error, showError, minimalistView, property, includeDescription, context }: FieldProps<any>): import("react/jsx-runtime").JSX.Element;
@@ -7,4 +7,4 @@ import { FieldProps } from "../../types";
7
7
  * and tables to the specified properties.
8
8
  * @group Form fields
9
9
  */
10
- export declare function RepeatFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, tableMode, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function RepeatFieldBinding<T extends Array<any>>({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, minimalistView, property, includeDescription, underlyingValueHasChanged, context, disabled }: FieldProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -8,5 +8,5 @@ type SelectProps<T extends EnumType> = FieldProps<T>;
8
8
  * and tables to the specified properties.
9
9
  * @group Form fields
10
10
  */
11
- export declare function SelectFieldBinding<T extends EnumType>({ propertyKey, value, setValue, error, showError, disabled, autoFocus, touched, property, includeDescription }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function SelectFieldBinding<T extends EnumType>({ propertyKey, value, setValue, error, showError, disabled, autoFocus, touched, property, includeDescription, size }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,4 +1,4 @@
1
- import { Entity, EntityCollection, FieldProps, ResolvedArrayProperty, ResolvedStringProperty, StorageConfig } from "../../types";
1
+ import { FieldProps, ResolvedArrayProperty, ResolvedStringProperty, StorageConfig } from "../../types";
2
2
  import { StorageFieldItem } from "../../util/useStorageUploadController";
3
3
  type StorageUploadFieldProps = FieldProps<string | string[]>;
4
4
  /**
@@ -8,10 +8,9 @@ type StorageUploadFieldProps = FieldProps<string | string[]>;
8
8
  * and tables to the specified properties.
9
9
  * @group Form fields
10
10
  */
11
- export declare function StorageUploadFieldBinding({ propertyKey, value, setValue, error, showError, autoFocus, tableMode, property, includeDescription, context, isSubmitting, }: StorageUploadFieldProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function StorageUploadFieldBinding({ propertyKey, value, setValue, error, showError, autoFocus, minimalistView, property, includeDescription, context, isSubmitting, }: StorageUploadFieldProps): import("react/jsx-runtime").JSX.Element;
12
12
  export interface StorageUploadProps {
13
13
  value: StorageFieldItem[];
14
- collection: EntityCollection;
15
14
  setInternalValue: (v: StorageFieldItem[]) => void;
16
15
  name: string;
17
16
  property: ResolvedStringProperty | ResolvedArrayProperty<string[]>;
@@ -19,11 +18,10 @@ export interface StorageUploadProps {
19
18
  multipleFilesSupported: boolean;
20
19
  autoFocus: boolean;
21
20
  disabled: boolean;
22
- entity: Entity<any>;
23
21
  storage: StorageConfig;
24
22
  onFilesAdded: (acceptedFiles: File[]) => void;
25
23
  storagePathBuilder: (file: File) => string;
26
24
  onFileUploadComplete: (uploadedPath: string, entry: StorageFieldItem, fileMetadata?: any) => Promise<void>;
27
25
  }
28
- export declare function StorageUpload({ collection, property, name, value, setInternalValue, onChange, multipleFilesSupported, onFileUploadComplete, disabled, onFilesAdded, autoFocus, storage, entity, storagePathBuilder, }: StorageUploadProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare function StorageUpload({ property, name, value, setInternalValue, onChange, multipleFilesSupported, onFileUploadComplete, disabled, onFilesAdded, autoFocus, storage, storagePathBuilder, }: StorageUploadProps): import("react/jsx-runtime").JSX.Element;
29
27
  export {};