@firecms/core 3.0.0-beta.5 → 3.0.0-beta.6

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 (67) hide show
  1. package/dist/components/ClearFilterSortButton.d.ts +5 -0
  2. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +11 -11
  3. package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -1
  4. package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -4
  5. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +11 -1
  6. package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +11 -0
  7. package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
  8. package/dist/components/common/types.d.ts +1 -1
  9. package/dist/form/components/ErrorFocus.d.ts +1 -1
  10. package/dist/hooks/useValidateAuthenticator.d.ts +2 -6
  11. package/dist/index.es.js +3516 -3381
  12. package/dist/index.es.js.map +1 -1
  13. package/dist/index.umd.js +5 -5
  14. package/dist/index.umd.js.map +1 -1
  15. package/dist/internal/useBuildDataSource.d.ts +1 -16
  16. package/dist/types/collections.d.ts +5 -1
  17. package/dist/types/datasource.d.ts +2 -5
  18. package/dist/types/entities.d.ts +5 -1
  19. package/dist/types/index.d.ts +0 -1
  20. package/dist/types/navigation.d.ts +1 -1
  21. package/dist/types/plugins.d.ts +3 -1
  22. package/dist/types/properties.d.ts +2 -2
  23. package/dist/util/entities.d.ts +1 -1
  24. package/dist/util/navigation_utils.d.ts +2 -2
  25. package/dist/util/resolutions.d.ts +5 -5
  26. package/package.json +22 -19
  27. package/src/components/ClearFilterSortButton.tsx +41 -0
  28. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +10 -11
  29. package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
  30. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +16 -19
  31. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +27 -32
  32. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +11 -6
  33. package/src/components/EntityCollectionView/EntityCollectionView.tsx +28 -5
  34. package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +68 -0
  35. package/src/components/EntityView.tsx +1 -1
  36. package/src/components/HomePage/DefaultHomePage.tsx +1 -1
  37. package/src/components/SelectableTable/SelectableTable.tsx +1 -1
  38. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +2 -3
  39. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +22 -7
  40. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +24 -5
  41. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +35 -15
  42. package/src/components/VirtualTable/VirtualTable.tsx +28 -20
  43. package/src/components/common/types.tsx +1 -1
  44. package/src/core/FireCMS.tsx +1 -2
  45. package/src/core/field_configs.tsx +1 -2
  46. package/src/hooks/data/save.ts +1 -0
  47. package/src/hooks/useBuildLocalConfigurationPersistence.tsx +9 -10
  48. package/src/hooks/useBuildModeController.tsx +11 -5
  49. package/src/hooks/useBuildNavigationController.tsx +76 -19
  50. package/src/hooks/useProjectLog.tsx +3 -3
  51. package/src/hooks/useValidateAuthenticator.tsx +2 -22
  52. package/src/internal/useBuildDataSource.ts +42 -47
  53. package/src/internal/useBuildSideEntityController.tsx +16 -13
  54. package/src/preview/PropertyPreview.tsx +2 -12
  55. package/src/types/collections.ts +5 -1
  56. package/src/types/datasource.ts +7 -4
  57. package/src/types/entities.ts +9 -1
  58. package/src/types/index.ts +0 -1
  59. package/src/types/navigation.ts +1 -1
  60. package/src/types/plugins.tsx +4 -3
  61. package/src/types/properties.ts +5 -4
  62. package/src/util/entities.ts +1 -1
  63. package/src/util/navigation_utils.ts +6 -6
  64. package/dist/internal/useLocaleConfig.d.ts +0 -1
  65. package/dist/types/appcheck.d.ts +0 -26
  66. package/src/internal/useLocaleConfig.tsx +0 -18
  67. package/src/types/appcheck.ts +0 -29
@@ -0,0 +1,5 @@
1
+ import { EntityTableController } from "../types";
2
+ export declare function ClearFilterSortButton({ tableController, enabled }: {
3
+ enabled: boolean;
4
+ tableController: EntityTableController;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -15,17 +15,17 @@ import { CollectionSize, Entity, EntityAction, EntityCollection, SelectionContro
15
15
  */
16
16
  export declare const EntityCollectionRowActions: ({ entity, collection, fullPath, width, frozen, isSelected, selectionEnabled, size, highlightEntity, onCollectionChange, unhighlightEntity, actions, hideId, selectionController, }: {
17
17
  entity: Entity<any>;
18
- collection?: EntityCollection<any, any> | undefined;
19
- fullPath?: string | undefined;
18
+ collection?: EntityCollection<any>;
19
+ fullPath?: string;
20
20
  width: number;
21
- frozen?: boolean | undefined;
21
+ frozen?: boolean;
22
22
  size: CollectionSize;
23
- isSelected?: boolean | undefined;
24
- selectionEnabled?: boolean | undefined;
25
- actions?: EntityAction[] | undefined;
26
- hideId?: boolean | undefined;
27
- onCollectionChange?: (() => void) | undefined;
28
- selectionController?: SelectionController | undefined;
29
- highlightEntity?: ((entity: Entity<any>) => void) | undefined;
30
- unhighlightEntity?: ((entity: Entity<any>) => void) | undefined;
23
+ isSelected?: boolean;
24
+ selectionEnabled?: boolean;
25
+ actions?: EntityAction[];
26
+ hideId?: boolean;
27
+ onCollectionChange?: () => void;
28
+ selectionController?: SelectionController;
29
+ highlightEntity?: (entity: Entity<any>) => void;
30
+ unhighlightEntity?: (entity: Entity<any>) => void;
31
31
  }) => import("react/jsx-runtime").JSX.Element;
@@ -65,7 +65,7 @@ export type EntityCollectionTableProps<M extends Record<string, any>, UserType e
65
65
  * {@link EntityTableController}
66
66
  */
67
67
  tableController: EntityTableController<M>;
68
- displayedColumnIds: PropertyColumnConfig[];
68
+ displayedColumnIds?: PropertyColumnConfig[];
69
69
  forceFilter?: FilterValues<Extract<keyof M, string>>;
70
70
  textSearchEnabled?: boolean;
71
71
  inlineEditing?: boolean;
@@ -2,17 +2,14 @@ import React from "react";
2
2
  import { CollectionSize } from "../../../types";
3
3
  interface CollectionTableToolbarProps {
4
4
  size: CollectionSize;
5
- filterIsSet: boolean;
6
5
  loading: boolean;
7
- forceFilter?: boolean;
8
6
  actionsStart?: React.ReactNode;
9
7
  actions?: React.ReactNode;
10
8
  title?: React.ReactNode;
11
9
  onTextSearchClick?: () => void;
12
10
  onTextSearch?: (searchString?: string) => void;
13
11
  onSizeChanged: (size: CollectionSize) => void;
14
- clearFilter?: () => void;
15
12
  textSearchLoading?: boolean;
16
13
  }
17
- export declare function CollectionTableToolbar(props: CollectionTableToolbarProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function CollectionTableToolbar({ actions, actionsStart, loading, onSizeChanged, onTextSearch, onTextSearchClick, size, textSearchLoading, title }: CollectionTableToolbarProps): import("react/jsx-runtime").JSX.Element;
18
15
  export {};
@@ -4,8 +4,18 @@ import { EntityCollection } from "../../types";
4
4
  * @group Components
5
5
  */
6
6
  export type EntityCollectionViewProps<M extends Record<string, any>> = {
7
- fullPath: string;
7
+ /**
8
+ * Complete path where this collection is located.
9
+ * It defaults to the collection path if not provided.
10
+ */
11
+ fullPath?: string;
12
+ /**
13
+ * If this is a subcollection, specify the parent collection ids.
14
+ */
8
15
  parentCollectionIds?: string[];
16
+ /**
17
+ * Whether this is a subcollection or not.
18
+ */
9
19
  isSubCollection?: boolean;
10
20
  className?: string;
11
21
  } & EntityCollection<M>;
@@ -0,0 +1,11 @@
1
+ import { EntityCollection, EntityTableController, SelectionController } from "../../types";
2
+ export type EntityCollectionViewStartActionsProps<M extends Record<string, any>> = {
3
+ collection: EntityCollection<M>;
4
+ path: string;
5
+ relativePath: string;
6
+ parentCollectionIds: string[];
7
+ selectionController: SelectionController<M>;
8
+ tableController: EntityTableController<M>;
9
+ collectionEntitiesCount: number;
10
+ };
11
+ export declare function EntityCollectionViewStartActions<M extends Record<string, any>>({ collection, relativePath, parentCollectionIds, path, selectionController, tableController, collectionEntitiesCount }: EntityCollectionViewStartActionsProps<M>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { CollectionSize, Entity, EntityTableController, FilterValues } from "../../types";
3
3
  import { CellRendererParams, VirtualTableColumn } from "../VirtualTable";
4
- import { OnCellValueChange, OnColumnResizeParams } from "../common/types";
4
+ import { OnCellValueChange, OnColumnResizeParams } from "../common";
5
5
  export type SelectableTableProps<M extends Record<string, any>> = {
6
6
  /**
7
7
  * Callback when a cell value changes.
@@ -33,7 +33,7 @@ export interface OnCellValueChangeParams<T = any, M extends Record<string, any>
33
33
  propertyKey: string;
34
34
  entity: Entity<M>;
35
35
  onValueUpdated: () => void;
36
- setError: (e: Error) => void;
36
+ setError: (e: Error | undefined) => void;
37
37
  fullPath: string;
38
38
  context: FireCMSContext;
39
39
  }
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  export declare const ErrorFocus: ({ containerRef }: {
3
- containerRef?: React.RefObject<HTMLDivElement> | undefined;
3
+ containerRef?: React.RefObject<HTMLDivElement>;
4
4
  }) => null;
@@ -1,20 +1,16 @@
1
- import { AppCheckTokenResult, AuthController, Authenticator, DataSourceDelegate, StorageSource, User } from "../index";
1
+ import { AuthController, Authenticator, DataSourceDelegate, StorageSource, User } from "../index";
2
2
  /**
3
3
  * This hook is used internally for validating an authenticator.
4
4
  *
5
5
  * @param authController
6
6
  * @param authentication
7
- * @param getAppCheckToken
8
- * @param appCheckForceRefresh
9
7
  * @param storageSource
10
8
  * @param dataSourceDelegate
11
9
  */
12
- export declare function useValidateAuthenticator<UserType extends User = User, Controller extends AuthController<UserType> = AuthController<UserType>>({ disabled, authController, authenticator, getAppCheckToken, appCheckForceRefresh, storageSource, dataSourceDelegate }: {
10
+ export declare function useValidateAuthenticator<UserType extends User = User, Controller extends AuthController<UserType> = AuthController<UserType>>({ disabled, authController, authenticator, storageSource, dataSourceDelegate }: {
13
11
  disabled?: boolean;
14
12
  authController: Controller;
15
13
  authenticator?: boolean | Authenticator<UserType, Controller>;
16
- getAppCheckToken?: (forceRefresh: boolean) => Promise<AppCheckTokenResult> | undefined;
17
- appCheckForceRefresh?: boolean;
18
14
  dataSourceDelegate: DataSourceDelegate;
19
15
  storageSource: StorageSource;
20
16
  }): {