@firecms/core 3.0.0-beta.12 → 3.0.0-beta.14

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 (120) hide show
  1. package/dist/app/Scaffold.d.ts +4 -0
  2. package/dist/components/ArrayContainer.d.ts +13 -11
  3. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +4 -0
  4. package/dist/components/EntityJsonPreview.d.ts +3 -0
  5. package/dist/components/EntityPreview.d.ts +4 -2
  6. package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
  7. package/dist/components/VirtualTable/VirtualTableProps.d.ts +0 -4
  8. package/dist/components/index.d.ts +1 -0
  9. package/dist/core/DefaultAppBar.d.ts +8 -2
  10. package/dist/core/EntityEditView.d.ts +8 -1
  11. package/dist/core/FireCMS.d.ts +2 -2
  12. package/dist/form/EntityForm.d.ts +5 -1
  13. package/dist/form/PropertyFieldBinding.d.ts +1 -1
  14. package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
  15. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -9
  16. package/dist/hooks/data/save.d.ts +1 -1
  17. package/dist/hooks/useBuildNavigationController.d.ts +2 -9
  18. package/dist/index.es.js +9251 -8721
  19. package/dist/index.es.js.map +1 -1
  20. package/dist/index.umd.js +16686 -16160
  21. package/dist/index.umd.js.map +1 -1
  22. package/dist/internal/useBuildDataSource.d.ts +3 -2
  23. package/dist/internal/useBuildSideEntityController.d.ts +3 -3
  24. package/dist/types/collections.d.ts +26 -2
  25. package/dist/types/fields.d.ts +4 -1
  26. package/dist/types/firecms.d.ts +3 -2
  27. package/dist/types/navigation.d.ts +9 -0
  28. package/dist/types/plugins.d.ts +13 -0
  29. package/dist/types/properties.d.ts +22 -1
  30. package/dist/types/side_entity_controller.d.ts +4 -0
  31. package/dist/util/callbacks.d.ts +2 -0
  32. package/dist/util/createFormexStub.d.ts +2 -0
  33. package/dist/util/index.d.ts +1 -0
  34. package/dist/util/navigation_utils.d.ts +2 -1
  35. package/dist/util/objects.d.ts +1 -1
  36. package/dist/util/property_utils.d.ts +2 -2
  37. package/dist/util/references.d.ts +2 -2
  38. package/dist/util/resolutions.d.ts +11 -6
  39. package/package.json +9 -6
  40. package/src/app/Scaffold.tsx +13 -3
  41. package/src/components/ArrayContainer.tsx +414 -282
  42. package/src/components/ClearFilterSortButton.tsx +1 -1
  43. package/src/components/ConfirmationDialog.tsx +9 -9
  44. package/src/components/DeleteEntityDialog.tsx +4 -2
  45. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +8 -6
  46. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +1 -1
  47. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +1 -1
  48. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +13 -2
  49. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +58 -29
  50. package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.tsx +9 -9
  51. package/src/components/EntityCollectionView/EntityCollectionView.tsx +26 -6
  52. package/src/components/EntityJsonPreview.tsx +66 -0
  53. package/src/components/EntityPreview.tsx +27 -16
  54. package/src/components/EntityView.tsx +4 -1
  55. package/src/components/ErrorView.tsx +1 -1
  56. package/src/components/HomePage/DefaultHomePage.tsx +2 -1
  57. package/src/components/HomePage/NavigationCardBinding.tsx +3 -1
  58. package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +3 -1
  59. package/src/components/SelectableTable/SelectableTable.tsx +140 -143
  60. package/src/components/VirtualTable/VirtualTable.tsx +37 -31
  61. package/src/components/VirtualTable/VirtualTableProps.tsx +0 -5
  62. package/src/components/VirtualTable/fields/VirtualTableInput.tsx +0 -1
  63. package/src/components/common/default_entity_actions.tsx +15 -4
  64. package/src/components/index.tsx +2 -0
  65. package/src/core/DefaultAppBar.tsx +17 -5
  66. package/src/core/EntityEditView.tsx +135 -47
  67. package/src/core/EntitySidePanel.tsx +15 -20
  68. package/src/core/FireCMS.tsx +19 -12
  69. package/src/form/EntityForm.tsx +32 -24
  70. package/src/form/PropertyFieldBinding.tsx +8 -6
  71. package/src/form/components/CustomIdField.tsx +3 -1
  72. package/src/form/components/LabelWithIcon.tsx +1 -1
  73. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +4 -1
  74. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +4 -2
  75. package/src/form/field_bindings/BlockFieldBinding.tsx +1 -1
  76. package/src/form/field_bindings/KeyValueFieldBinding.tsx +1 -1
  77. package/src/form/field_bindings/MapFieldBinding.tsx +5 -4
  78. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +6 -2
  79. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +3 -3
  80. package/src/form/field_bindings/RepeatFieldBinding.tsx +9 -2
  81. package/src/form/field_bindings/SelectFieldBinding.tsx +3 -2
  82. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +227 -156
  83. package/src/hooks/data/save.ts +24 -35
  84. package/src/hooks/useBuildNavigationController.tsx +42 -17
  85. package/src/hooks/useFireCMSContext.tsx +0 -30
  86. package/src/internal/useBuildDataSource.ts +9 -5
  87. package/src/internal/useBuildSideEntityController.tsx +26 -20
  88. package/src/preview/PropertyPreview.tsx +4 -2
  89. package/src/preview/components/ImagePreview.tsx +2 -2
  90. package/src/preview/components/ReferencePreview.tsx +1 -1
  91. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +5 -4
  92. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +4 -3
  93. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +4 -2
  94. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +4 -3
  95. package/src/preview/property_previews/ArrayOneOfPreview.tsx +4 -2
  96. package/src/preview/property_previews/ArrayPropertyPreview.tsx +4 -2
  97. package/src/preview/property_previews/MapPropertyPreview.tsx +1 -1
  98. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +1 -1
  99. package/src/preview/property_previews/StringPropertyPreview.tsx +1 -1
  100. package/src/routes/FireCMSRoute.tsx +15 -4
  101. package/src/types/collections.ts +31 -2
  102. package/src/types/fields.tsx +5 -1
  103. package/src/types/firecms.tsx +3 -3
  104. package/src/types/navigation.ts +11 -0
  105. package/src/types/plugins.tsx +17 -0
  106. package/src/types/properties.ts +27 -1
  107. package/src/types/side_entity_controller.tsx +5 -0
  108. package/src/util/callbacks.ts +119 -0
  109. package/src/util/createFormexStub.tsx +62 -0
  110. package/src/util/index.ts +1 -0
  111. package/src/util/join_collections.ts +3 -1
  112. package/src/util/navigation_from_path.ts +5 -1
  113. package/src/util/navigation_utils.ts +84 -20
  114. package/src/util/objects.ts +54 -17
  115. package/src/util/property_utils.tsx +7 -3
  116. package/src/util/references.ts +8 -6
  117. package/src/util/resolutions.ts +17 -9
  118. package/src/util/useStorageUploadController.tsx +21 -2
  119. package/dist/components/EntityCollectionTable/internal/popup_field/ElementResizeListener.d.ts +0 -5
  120. package/src/components/EntityCollectionTable/internal/popup_field/ElementResizeListener.tsx +0 -59
@@ -13,6 +13,10 @@ export interface ScaffoldProps {
13
13
  * Note that this has no effect if you are using a custom AppBar or Drawer.
14
14
  */
15
15
  logo?: string;
16
+ /**
17
+ * If true, the main content will be padded in large layouts. Defaults to true.
18
+ */
19
+ padding?: boolean;
16
20
  className?: string;
17
21
  style?: React.CSSProperties;
18
22
  }
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { DraggableProvided } from "@hello-pangea/dnd";
3
2
  export type ArrayEntryParams = {
4
3
  index: number;
5
4
  internalId: number;
@@ -17,18 +16,18 @@ export interface ArrayContainerProps<T> {
17
16
  size?: "small" | "medium";
18
17
  onInternalIdAdded?: (id: number) => void;
19
18
  includeAddButton?: boolean;
19
+ canAddElements?: boolean;
20
+ sortable?: boolean;
20
21
  newDefaultEntry: T;
21
22
  onValueChange: (value: T[]) => void;
22
23
  className?: string;
23
24
  min?: number;
24
25
  max?: number;
25
26
  }
26
- /**
27
- * @group Form custom fields
28
- */
29
- export declare function ArrayContainer<T>({ droppableId, addLabel, value, disabled, buildEntry, size, onInternalIdAdded, includeAddButton, newDefaultEntry, onValueChange, className, min, max }: ArrayContainerProps<T>): import("react/jsx-runtime").JSX.Element;
30
27
  type ArrayContainerItemProps = {
31
- provided: DraggableProvided;
28
+ nodeRef: (node: HTMLElement | null) => void;
29
+ style: React.CSSProperties;
30
+ dragHandleProps: any;
32
31
  index: number;
33
32
  internalId: number;
34
33
  size?: "small" | "medium";
@@ -37,21 +36,24 @@ type ArrayContainerItemProps = {
37
36
  remove: (index: number) => void;
38
37
  copy: (index: number) => void;
39
38
  addInIndex?: (index: number) => void;
40
- includeAddButton?: boolean;
39
+ canAddElements?: boolean;
40
+ sortable: boolean;
41
41
  isDragging: boolean;
42
42
  storedProps?: object;
43
43
  updateItemCustomProps: (internalId: number, props: object) => void;
44
44
  };
45
- export declare function ArrayContainerItem({ provided, index, internalId, size, disabled, buildEntry, remove, addInIndex, includeAddButton, copy, isDragging, storedProps, updateItemCustomProps }: ArrayContainerItemProps): import("react/jsx-runtime").JSX.Element;
46
- export declare function ArrayItemOptions({ direction, disabled, remove, index, provided, copy, includeAddButton, addInIndex }: {
45
+ export declare function ArrayContainerItem({ nodeRef, style, dragHandleProps, index, internalId, size, disabled, buildEntry, remove, copy, addInIndex, canAddElements, sortable, isDragging, storedProps, updateItemCustomProps }: ArrayContainerItemProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function ArrayItemOptions({ dragHandleProps, direction, disabled, remove, index, copy, canAddElements, sortable, addInIndex, }: {
47
+ dragHandleProps: any;
47
48
  direction?: "row" | "column";
48
49
  disabled: boolean;
49
50
  remove: (index: number) => void;
50
51
  index: number;
51
- provided: any;
52
52
  copy: (index: number) => void;
53
- includeAddButton?: boolean;
53
+ sortable: boolean;
54
+ canAddElements?: boolean;
54
55
  addInIndex?: (index: number) => void;
55
56
  }): import("react/jsx-runtime").JSX.Element;
57
+ export declare function ArrayContainer<T>({ droppableId, addLabel, value, disabled, buildEntry, size, onInternalIdAdded, includeAddButton: deprecatedIncludeAddButton, canAddElements: canAddElementsProp, sortable, newDefaultEntry, onValueChange, className, min, max }: ArrayContainerProps<T>): import("react/jsx-runtime").JSX.Element;
56
58
  export declare function getRandomId(): number;
57
59
  export {};
@@ -9,6 +9,10 @@ export type EntityCollectionViewProps<M extends Record<string, any>> = {
9
9
  * It defaults to the collection path if not provided.
10
10
  */
11
11
  fullPath?: string;
12
+ /**
13
+ * Full path using navigation ids.
14
+ */
15
+ fullIdPath?: string;
12
16
  /**
13
17
  * If this is a subcollection, specify the parent collection ids.
14
18
  */
@@ -0,0 +1,3 @@
1
+ export declare function EntityJsonPreview({ values }: {
2
+ values: object;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -6,18 +6,20 @@ export type EntityPreviewProps = {
6
6
  actions?: React.ReactNode;
7
7
  collection?: EntityCollection;
8
8
  hover?: boolean;
9
- previewProperties?: string[];
9
+ previewKeys?: string[];
10
10
  disabled?: boolean;
11
11
  entity: Entity<any>;
12
12
  includeId?: boolean;
13
+ includeTitle?: boolean;
13
14
  includeEntityLink?: boolean;
15
+ includeImage?: boolean;
14
16
  onClick?: (e: React.SyntheticEvent) => void;
15
17
  };
16
18
  /**
17
19
  * This view is used to display a preview of an entity.
18
20
  * It is used by default in reference fields and whenever a reference is displayed.
19
21
  */
20
- export declare function EntityPreview({ actions, disabled, hover, collection: collectionProp, previewProperties, onClick, size, includeId, includeEntityLink, entity }: EntityPreviewProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function EntityPreview({ actions, disabled, hover, collection: collectionProp, previewKeys, onClick, size, includeId, includeTitle, includeEntityLink, includeImage, entity, }: EntityPreviewProps): import("react/jsx-runtime").JSX.Element;
21
23
  export type EntityPreviewContainerProps = {
22
24
  children: React.ReactNode;
23
25
  hover?: boolean;
@@ -82,4 +82,4 @@ export type SelectableTableProps<M extends Record<string, any>> = {
82
82
  * @see VirtualTable
83
83
  * @group Components
84
84
  */
85
- export declare const SelectableTable: React.NamedExoticComponent<SelectableTableProps<any>>;
85
+ export declare const SelectableTable: <M extends Record<string, any>>({ onValueChange, cellRenderer, onEntityClick, onColumnResize, hoverRow, size, inlineEditing, tableController: { data, dataLoading, noMoreToLoad, dataLoadingError, filterValues, setFilterValues, sortBy, setSortBy, itemCount, setItemCount, pageSize, paginationEnabled, checkFilterCombination, setPopupCell }, filterable, onScroll, initialScroll, emptyComponent, columns, forceFilter, highlightedRow, endAdornment, AddColumnComponent }: SelectableTableProps<M>) => import("react/jsx-runtime").JSX.Element;
@@ -132,10 +132,6 @@ export interface VirtualTableProps<T extends Record<string, any>> {
132
132
  * Initial scroll position
133
133
  */
134
134
  initialScroll?: number;
135
- /**
136
- * Debug mode
137
- */
138
- debug?: boolean;
139
135
  }
140
136
  export type CellRendererParams<T = any> = {
141
137
  column: VirtualTableColumn;
@@ -25,3 +25,4 @@ export * from "./ArrayContainer";
25
25
  export * from "./ReferenceWidget";
26
26
  export * from "./SearchIconsView";
27
27
  export * from "./FieldCaption";
28
+ export * from "./EntityPreview";
@@ -1,11 +1,17 @@
1
1
  import React from "react";
2
2
  import { User } from "../types";
3
3
  export type DefaultAppBarProps<ADDITIONAL_PROPS = object> = {
4
+ /**
5
+ * The content of the app bar, usually a title or logo. This includes a link to the home page.
6
+ */
4
7
  title?: React.ReactNode;
5
8
  /**
6
- * A component that gets rendered on the upper side of the main toolbar
9
+ * A component that gets rendered on the upper side to the end of the main toolbar
7
10
  */
8
11
  endAdornment?: React.ReactNode;
12
+ /**
13
+ * A component that gets rendered on the upper side to the start of the main toolbar
14
+ */
9
15
  startAdornment?: React.ReactNode;
10
16
  dropDownActions?: React.ReactNode;
11
17
  includeModeToggle?: boolean;
@@ -20,4 +26,4 @@ export type DefaultAppBarProps<ADDITIONAL_PROPS = object> = {
20
26
  *
21
27
 
22
28
  */
23
- export declare const DefaultAppBar: ({ title, endAdornment, startAdornment, dropDownActions, includeModeToggle, className, style, user: userProp }: DefaultAppBarProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const DefaultAppBar: ({ title, endAdornment, startAdornment, dropDownActions, includeModeToggle, className, style, user: userProp, logo: logoProp, }: DefaultAppBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
2
  import { Entity, EntityCollection, EntityStatus, User } from "../types";
3
3
  import { EntityFormProps } from "../form";
4
+ export declare const MAIN_TAB_VALUE = "__main_##Q$SC^#S6";
5
+ export declare const JSON_TAB_VALUE = "__json";
4
6
  export type OnUpdateParams = {
5
7
  entity: Entity<any>;
6
8
  status: EntityStatus;
@@ -17,6 +19,10 @@ export type OnTabChangeParams<M extends Record<string, any>> = {
17
19
  };
18
20
  export interface EntityEditViewProps<M extends Record<string, any>> {
19
21
  path: string;
22
+ /**
23
+ * The navigation path to the entity.
24
+ */
25
+ fullIdPath?: string;
20
26
  collection: EntityCollection<M>;
21
27
  entityId?: string;
22
28
  databaseId?: string;
@@ -35,10 +41,11 @@ export interface EntityEditViewProps<M extends Record<string, any>> {
35
41
  * an entity is opened.
36
42
  */
37
43
  export declare function EntityEditView<M extends Record<string, any>, USER extends User>({ entityId, ...props }: EntityEditViewProps<M>): import("react/jsx-runtime").JSX.Element;
38
- export declare function EntityEditViewInner<M extends Record<string, any>>({ path, entityId, selectedTab: selectedTabProp, collection, parentCollectionIds, onValuesModified, onSaved, onTabChange, entity, cachedDirtyValues, dataLoading, layout, barActions, status, setStatus, formProps, }: EntityEditViewProps<M> & {
44
+ export declare function EntityEditViewInner<M extends Record<string, any>>({ path, fullIdPath, entityId, selectedTab: selectedTabProp, collection, parentCollectionIds, onValuesModified, onSaved, onTabChange, entity, cachedDirtyValues, dataLoading, layout, barActions, status, setStatus, formProps, canEdit }: EntityEditViewProps<M> & {
39
45
  entity?: Entity<M>;
40
46
  cachedDirtyValues?: Partial<M>;
41
47
  dataLoading: boolean;
42
48
  status: EntityStatus;
43
49
  setStatus: (status: EntityStatus) => void;
50
+ canEdit?: boolean;
44
51
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { EntityCollection, FireCMSProps, User } from "../types";
1
+ import { FireCMSProps, User } from "../types";
2
2
  /**
3
3
  * If you are using independent components of the CMS
4
4
  * you need to wrap them with this main component, so the internal hooks work.
@@ -11,4 +11,4 @@ import { EntityCollection, FireCMSProps, User } from "../types";
11
11
 
12
12
  * @group Core
13
13
  */
14
- export declare function FireCMS<USER extends User, EC extends EntityCollection>(props: FireCMSProps<USER, EC>): import("react/jsx-runtime").JSX.Element;
14
+ export declare function FireCMS<USER extends User>(props: FireCMSProps<USER>): import("react/jsx-runtime").JSX.Element;
@@ -29,6 +29,10 @@ export type EntityFormProps<M extends Record<string, any>> = {
29
29
  onEntityChange?: (entity: Entity<M>) => void;
30
30
  formex?: FormexController<M>;
31
31
  openEntityMode?: "side_panel" | "full_screen";
32
+ /**
33
+ * If true, the form will be disabled and no actions will be available
34
+ */
35
+ disabled?: boolean;
32
36
  /**
33
37
  * Include the copy and delete actions in the form
34
38
  */
@@ -41,5 +45,5 @@ export type EntityFormProps<M extends Record<string, any>> = {
41
45
  Builder?: React.ComponentType<EntityCustomViewParams<M>>;
42
46
  children?: React.ReactNode;
43
47
  };
44
- export declare function EntityForm<M extends Record<string, any>>({ path, entityId: entityIdProp, collection, onValuesModified, onIdChange, onSaved, entity, initialDirtyValues, onFormContextReady, forceActionsAtTheBottom, initialStatus, className, onStatusChange, onEntityChange, openEntityMode, formex: formexProp, Builder, EntityFormActionsComponent, showDefaultActions, showEntityPath, children }: EntityFormProps<M>): import("react/jsx-runtime").JSX.Element;
48
+ export declare function EntityForm<M extends Record<string, any>>({ path, entityId: entityIdProp, collection, onValuesModified, onIdChange, onSaved, entity, initialDirtyValues, onFormContextReady, forceActionsAtTheBottom, initialStatus, className, onStatusChange, onEntityChange, openEntityMode, formex: formexProp, disabled: disabledProp, Builder, EntityFormActionsComponent, showDefaultActions, showEntityPath, children }: EntityFormProps<M>): import("react/jsx-runtime").JSX.Element;
45
49
  export declare function yupToFormErrors(yupError: ValidationError): Record<string, any>;
@@ -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> = any>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled: disabledProp, partOfArray, minimalistView, autoFocus, index, size, onPropertyChange }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
29
+ declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = any>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled: disabledProp, partOfArray, minimalistView, autoFocus, index, size, onPropertyChange, }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
30
30
  export {};
@@ -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, minimalistView: minimalistViewProp, includeDescription, autoFocus, context, onPropertyChange }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MapFieldBinding({ propertyKey, value, showError, error, disabled, property, partOfArray, minimalistView: minimalistViewProp, includeDescription, autoFocus, context, onPropertyChange }: FieldProps<Record<string, any>>): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,6 @@
1
1
  import { FieldProps, ResolvedArrayProperty, ResolvedStringProperty, StorageConfig } from "../../types";
2
2
  import { StorageFieldItem } from "../../util/useStorageUploadController";
3
3
  type StorageUploadFieldProps = FieldProps<string | string[]>;
4
- /**
5
- * Field that allows to upload files to Google Cloud Storage.
6
- *
7
- * This is one of the internal components that get mapped natively inside forms
8
- * and tables to the specified properties.
9
- * @group Form fields
10
- */
11
4
  export declare function StorageUploadFieldBinding({ propertyKey, value, setValue, error, showError, autoFocus, minimalistView, property, includeDescription, context, isSubmitting, }: StorageUploadFieldProps): import("react/jsx-runtime").JSX.Element;
12
5
  export interface StorageUploadProps {
13
6
  value: StorageFieldItem[];
@@ -19,9 +12,10 @@ export interface StorageUploadProps {
19
12
  autoFocus: boolean;
20
13
  disabled: boolean;
21
14
  storage: StorageConfig;
22
- onFilesAdded: (acceptedFiles: File[]) => void;
15
+ onFilesAdded: (acceptedFiles: File[]) => Promise<void>;
23
16
  storagePathBuilder: (file: File) => string;
24
17
  onFileUploadComplete: (uploadedPath: string, entry: StorageFieldItem, fileMetadata?: any) => Promise<void>;
25
18
  }
26
- export declare function StorageUpload({ property, name, value, setInternalValue, onChange, multipleFilesSupported, onFileUploadComplete, disabled, onFilesAdded, autoFocus, storage, storagePathBuilder, }: StorageUploadProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function StorageUpload({ property, name, value, // This is internalValue from useStorageUploadController
20
+ setInternalValue, onChange, multipleFilesSupported, onFileUploadComplete, disabled, onFilesAdded, autoFocus, storage, storagePathBuilder, }: StorageUploadProps): import("react/jsx-runtime").JSX.Element;
27
21
  export {};
@@ -37,5 +37,5 @@ export type SaveEntityWithCallbacksProps<M extends Record<string, any>> = SaveEn
37
37
  export declare function saveEntityWithCallbacks<M extends Record<string, any>, USER extends User>({ collection, path, entityId, values, previousValues, status, dataSource, context, onSaveSuccess, onSaveFailure, onPreSaveHookError, onSaveSuccessHookError }: SaveEntityWithCallbacksProps<M> & {
38
38
  collection: EntityCollection<M, USER>;
39
39
  dataSource: DataSource;
40
- context: FireCMSContext<USER>;
40
+ context: FireCMSContext;
41
41
  }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { AuthController, CMSView, CMSViewsBuilder, DataSourceDelegate, EntityCollection, EntityCollectionsBuilder, NavigationController, PermissionsBuilder, User, UserConfigurationPersistence } from "../types";
1
+ import { AuthController, CMSView, CMSViewsBuilder, DataSourceDelegate, EntityCollection, EntityCollectionsBuilder, FireCMSPlugin, NavigationController, PermissionsBuilder, User, UserConfigurationPersistence } from "../types";
2
2
  export type BuildNavigationContextProps<EC extends EntityCollection, USER extends User> = {
3
3
  basePath?: string;
4
4
  baseCollectionPath?: string;
@@ -10,14 +10,7 @@ export type BuildNavigationContextProps<EC extends EntityCollection, USER extend
10
10
  viewsOrder?: string[];
11
11
  userConfigPersistence?: UserConfigurationPersistence;
12
12
  dataSourceDelegate: DataSourceDelegate;
13
- /**
14
- * Use this method to inject collections to the CMS.
15
- * You receive the current collections as a parameter, and you can return
16
- * a new list of collections.
17
- * @see {@link joinCollectionLists}
18
- * @param collections
19
- */
20
- injectCollections?: (collections: EntityCollection[]) => EntityCollection[];
13
+ plugins?: FireCMSPlugin[];
21
14
  /**
22
15
  * If true, the navigation logic will not be updated until this flag is false
23
16
  */