@firecms/core 3.0.0-canary.50 → 3.0.0-canary.52

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/{EntityCollectionTable/internal → common}/default_entity_actions.d.ts +1 -1
  2. package/dist/components/common/index.d.ts +1 -0
  3. package/dist/core/Drawer.d.ts +5 -12
  4. package/dist/core/DrawerNavigationItem.d.ts +9 -0
  5. package/dist/core/Scaffold.d.ts +6 -9
  6. package/dist/core/index.d.ts +3 -4
  7. package/dist/hooks/index.d.ts +1 -0
  8. package/dist/index.es.js +3102 -3129
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/index.umd.js +5 -5
  11. package/dist/index.umd.js.map +1 -1
  12. package/dist/types/navigation.d.ts +2 -2
  13. package/dist/util/icon_synonyms.d.ts +0 -93
  14. package/dist/util/resolutions.d.ts +8 -4
  15. package/package.json +4 -4
  16. package/src/components/EntityCollectionView/EntityCollectionView.tsx +3 -7
  17. package/src/components/EntityView.tsx +1 -1
  18. package/src/components/PropertyIdCopyTooltipContent.tsx +2 -3
  19. package/src/components/ReferenceWidget.tsx +1 -1
  20. package/src/components/{EntityCollectionTable/internal → common}/default_entity_actions.tsx +2 -2
  21. package/src/components/common/index.ts +1 -0
  22. package/src/components/common/types.tsx +1 -1
  23. package/src/components/common/useColumnsIds.tsx +10 -2
  24. package/src/core/Drawer.tsx +14 -66
  25. package/src/core/DrawerNavigationItem.tsx +62 -0
  26. package/src/core/EntitySidePanel.tsx +1 -1
  27. package/src/core/FireCMS.tsx +3 -4
  28. package/src/core/Scaffold.tsx +75 -61
  29. package/src/core/index.tsx +3 -4
  30. package/src/form/EntityForm.tsx +2 -2
  31. package/src/form/field_bindings/SelectFieldBinding.tsx +4 -1
  32. package/src/hooks/index.tsx +1 -0
  33. package/src/hooks/useBuildNavigationController.tsx +0 -1
  34. package/src/hooks/useResolvedNavigationFrom.tsx +1 -1
  35. package/src/internal/useBuildSideEntityController.tsx +3 -2
  36. package/src/preview/components/EnumValuesChip.tsx +1 -1
  37. package/src/preview/property_previews/NumberPropertyPreview.tsx +1 -0
  38. package/src/types/navigation.ts +1 -2
  39. package/src/types/storage.ts +1 -1
  40. package/src/util/enums.ts +1 -1
  41. package/src/util/icon_synonyms.ts +2 -95
  42. package/src/util/resolutions.ts +26 -7
  43. package/dist/internal/useBuildCustomizationController.d.ts +0 -2
  44. package/src/internal/useBuildCustomizationController.tsx +0 -5
@@ -1,4 +1,4 @@
1
- import { EntityAction } from "../../../types";
1
+ import { EntityAction } from "../../types";
2
2
  export declare const editEntityAction: EntityAction;
3
3
  export declare const copyEntityAction: EntityAction;
4
4
  export declare const archiveEntityAction: EntityAction;
@@ -3,3 +3,4 @@ export * from "./useDebouncedData";
3
3
  export * from "./useColumnsIds";
4
4
  export * from "./useDataSourceEntityCollectionTableController";
5
5
  export * from "./useTableSearchHelper";
6
+ export * from "./default_entity_actions";
@@ -1,23 +1,16 @@
1
- import React from "react";
2
1
  /**
3
2
  * Props used in case you need to override the default drawer
4
3
  * @group Core
5
4
  */
6
- export type DrawerProps<T = {}> = T & {
5
+ export type DrawerProps = {
7
6
  hovered: boolean;
8
7
  drawerOpen: boolean;
9
- closeDrawer: () => any;
8
+ openDrawer: () => void;
9
+ closeDrawer: () => void;
10
+ autoOpenDrawer?: boolean;
10
11
  };
11
12
  /**
12
13
  * Default drawer used in the CMS
13
14
  * @group Core
14
15
  */
15
- export declare function Drawer({ hovered, drawerOpen, closeDrawer }: DrawerProps): import("react/jsx-runtime").JSX.Element;
16
- export declare function DrawerNavigationItem({ name, icon, drawerOpen, tooltipsOpen, url, onClick }: {
17
- icon: React.ReactElement;
18
- name: string;
19
- tooltipsOpen: boolean;
20
- drawerOpen: boolean;
21
- url: string;
22
- onClick?: () => void;
23
- }): import("react/jsx-runtime").JSX.Element;
16
+ export declare function Drawer(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export declare function DrawerNavigationItem({ name, icon, drawerOpen, tooltipsOpen, url, onClick }: {
3
+ icon: React.ReactElement;
4
+ name: string;
5
+ tooltipsOpen: boolean;
6
+ drawerOpen: boolean;
7
+ url: string;
8
+ onClick?: () => void;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -2,10 +2,11 @@ import React from "react";
2
2
  import { DrawerProps } from "./Drawer";
3
3
  import { FireCMSAppBarProps } from "../components";
4
4
  export declare const DRAWER_WIDTH = 280;
5
+ export declare function useDrawer(): DrawerProps;
5
6
  /**
6
7
  * @group Core
7
8
  */
8
- export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = object> {
9
+ export interface ScaffoldProps<ExtraAppbarProps = object> {
9
10
  /**
10
11
  * Name of the app, displayed as the main title and in the tab title
11
12
  */
@@ -19,14 +20,10 @@ export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = obj
19
20
  */
20
21
  includeDrawer?: boolean;
21
22
  /**
22
- * In case you need to override the view that gets rendered as a drawer
23
- * @see DefaultDrawer
23
+ * You can define a custom drawer to be displayed in the scaffold.
24
+ * Use the hook `useDrawer` to access the context values.
24
25
  */
25
- Drawer?: React.ComponentType<DrawerProps<ExtraDrawerProps>>;
26
- /**
27
- * Additional props passed to the custom Drawer
28
- */
29
- drawerProps?: Partial<DrawerProps> & ExtraDrawerProps;
26
+ drawer?: React.ReactNode;
30
27
  /**
31
28
  * Open the drawer on hover
32
29
  */
@@ -52,4 +49,4 @@ export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = obj
52
49
  * @constructor
53
50
  * @group Core
54
51
  */
55
- export declare const Scaffold: React.NamedExoticComponent<React.PropsWithChildren<ScaffoldProps<object, object>>>;
52
+ export declare const Scaffold: React.NamedExoticComponent<React.PropsWithChildren<ScaffoldProps<object>>>;
@@ -1,8 +1,7 @@
1
1
  export * from "./FireCMS";
2
- export type { ScaffoldProps } from "./Scaffold";
3
- export { Scaffold } from "./Scaffold";
4
- export type { DrawerProps } from "./Drawer";
5
- export { Drawer, DrawerNavigationItem } from "./Drawer";
2
+ export * from "./Scaffold";
3
+ export * from "./Drawer";
4
+ export * from "./DrawerNavigationItem";
6
5
  export * from "./field_configs";
7
6
  export * from "./SideDialogs";
8
7
  export * from "./NavigationRoutes";
@@ -7,6 +7,7 @@ export * from "./useNavigationController";
7
7
  export * from "./useResolvedNavigationFrom";
8
8
  export * from "./useStorageSource";
9
9
  export * from "./useAuthController";
10
+ export * from "./useDialogsController";
10
11
  export * from "./useSideDialogsController";
11
12
  export * from "./useSideEntityController";
12
13
  export * from "./useFireCMSContext";