@firecms/core 3.0.0-canary.235 → 3.0.0-canary.239

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 (44) hide show
  1. package/dist/components/EntityPreview.d.ts +4 -2
  2. package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
  3. package/dist/components/index.d.ts +1 -0
  4. package/dist/hooks/useBuildNavigationController.d.ts +2 -9
  5. package/dist/index.es.js +271 -144
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/index.umd.js +271 -144
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/types/collections.d.ts +13 -0
  10. package/dist/types/plugins.d.ts +12 -0
  11. package/dist/types/side_entity_controller.d.ts +4 -0
  12. package/dist/util/callbacks.d.ts +2 -0
  13. package/dist/util/index.d.ts +1 -0
  14. package/package.json +5 -5
  15. package/src/components/ConfirmationDialog.tsx +9 -9
  16. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +1 -1
  17. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +1 -1
  18. package/src/components/EntityCollectionView/EntityCollectionView.tsx +2 -0
  19. package/src/components/EntityPreview.tsx +18 -14
  20. package/src/components/ErrorView.tsx +1 -1
  21. package/src/components/HomePage/DefaultHomePage.tsx +1 -1
  22. package/src/components/SelectableTable/SelectableTable.tsx +140 -143
  23. package/src/components/VirtualTable/VirtualTable.tsx +7 -4
  24. package/src/components/index.tsx +2 -0
  25. package/src/core/EntityEditView.tsx +24 -14
  26. package/src/core/EntitySidePanel.tsx +17 -10
  27. package/src/form/components/LabelWithIcon.tsx +1 -1
  28. package/src/form/field_bindings/KeyValueFieldBinding.tsx +0 -2
  29. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +1 -1
  30. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +1 -1
  31. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +1 -1
  32. package/src/form/field_bindings/ReferenceFieldBinding.tsx +1 -1
  33. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
  34. package/src/hooks/useBuildNavigationController.tsx +29 -16
  35. package/src/internal/useBuildSideEntityController.tsx +1 -1
  36. package/src/preview/components/ReferencePreview.tsx +1 -1
  37. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
  38. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +1 -1
  39. package/src/types/collections.ts +16 -0
  40. package/src/types/firecms.tsx +0 -1
  41. package/src/types/plugins.tsx +16 -0
  42. package/src/types/side_entity_controller.tsx +5 -5
  43. package/src/util/callbacks.ts +119 -0
  44. package/src/util/index.ts +1 -0
@@ -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;
@@ -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,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
  */