@firecms/core 3.0.0-beta.2-pre.2 → 3.0.0-beta.2-pre.3
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.
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +0 -3
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -8
- package/dist/components/EntityCollectionTable/index.d.ts +2 -4
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +1 -1
- package/dist/components/{ReferenceSelectionInner.d.ts → ReferenceTable/ReferenceSelectionTable.d.ts} +2 -2
- package/dist/components/{EntityCollectionTable/SimpleTable.d.ts → SelectableTable/SelectableTable.d.ts} +3 -4
- package/dist/components/SelectableTable/SelectableTableContext.d.ts +4 -0
- package/dist/components/common/index.d.ts +5 -0
- package/dist/components/{EntityCollectionTable → common}/types.d.ts +7 -0
- package/dist/components/common/useTableSearchHelper.d.ts +12 -0
- package/dist/components/index.d.ts +5 -2
- package/dist/form/components/index.d.ts +0 -1
- package/dist/hooks/useSnackbarController.d.ts +1 -0
- package/dist/index.es.js +3705 -3683
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/components/ArrayContainer.tsx +10 -3
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +16 -22
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -5
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +2 -2
- package/src/components/EntityCollectionTable/column_utils.tsx +1 -1
- package/src/components/EntityCollectionTable/index.tsx +1 -9
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +2 -1
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +19 -40
- package/src/components/{ReferenceSelectionInner.tsx → ReferenceTable/ReferenceSelectionTable.tsx} +31 -15
- package/src/components/{EntityCollectionTable/SimpleTable.tsx → SelectableTable/SelectableTable.tsx} +8 -9
- package/src/components/SelectableTable/SelectableTableContext.tsx +6 -0
- package/src/components/common/index.ts +5 -0
- package/src/components/{EntityCollectionTable → common}/types.tsx +5 -0
- package/src/components/common/useTableSearchHelper.ts +47 -0
- package/src/components/index.tsx +6 -2
- package/src/core/EntitySidePanel.tsx +7 -5
- package/src/form/EntityForm.tsx +1 -1
- package/src/form/components/index.tsx +0 -1
- package/src/hooks/useFireCMSContext.tsx +51 -3
- package/src/hooks/useReferenceDialog.tsx +2 -2
- package/src/hooks/useSnackbarController.tsx +1 -2
- package/dist/form/components/SwitchControl.d.ts +0 -8
- package/src/form/components/SwitchControl.tsx +0 -39
- /package/dist/components/{EntityCollectionTable → SelectableTable}/filters/BooleanFilterField.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → SelectableTable}/filters/DateTimeFilterField.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → SelectableTable}/filters/ReferenceFilterField.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → SelectableTable}/filters/StringNumberFilterField.d.ts +0 -0
- /package/dist/components/{EntityCollectionView → common}/useColumnsIds.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → common}/useDataSourceEntityCollectionTableController.d.ts +0 -0
- /package/dist/components/{EntityCollectionTable → common}/useDebouncedData.d.ts +0 -0
- /package/src/components/{EntityCollectionTable → SelectableTable}/filters/BooleanFilterField.tsx +0 -0
- /package/src/components/{EntityCollectionTable → SelectableTable}/filters/DateTimeFilterField.tsx +0 -0
- /package/src/components/{EntityCollectionTable → SelectableTable}/filters/ReferenceFilterField.tsx +0 -0
- /package/src/components/{EntityCollectionTable → SelectableTable}/filters/StringNumberFilterField.tsx +0 -0
- /package/src/components/{EntityCollectionView → common}/useColumnsIds.tsx +0 -0
- /package/src/components/{EntityCollectionTable → common}/useDataSourceEntityCollectionTableController.tsx +0 -0
- /package/src/components/{EntityCollectionTable → common}/useDebouncedData.ts +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { EntityCollectionTableController } from "./types";
|
|
3
2
|
import { EntityCollectionTableProps } from "./EntityCollectionTableProps";
|
|
4
|
-
export declare const EntityCollectionTableContext: React.Context<EntityCollectionTableController<any>>;
|
|
5
|
-
export declare const useEntityCollectionTableController: () => EntityCollectionTableController<any>;
|
|
6
3
|
/**
|
|
7
4
|
* This component is in charge of rendering a collection table with a high
|
|
8
5
|
* degree of customization.
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AdditionalFieldDelegate, CollectionSize, Entity, EntityTableController, FilterValues, ResolvedProperties, ResolvedProperty, SelectionController, User } from "../../types";
|
|
3
|
-
import { OnCellValueChange, UniqueFieldValidator } from "
|
|
4
|
-
/**
|
|
5
|
-
* @group Collection components
|
|
6
|
-
*/
|
|
7
|
-
export type OnColumnResizeParams = {
|
|
8
|
-
width: number;
|
|
9
|
-
key: string;
|
|
10
|
-
};
|
|
3
|
+
import { OnCellValueChange, OnColumnResizeParams, UniqueFieldValidator } from "../common/types";
|
|
11
4
|
/**
|
|
12
5
|
* @group Collection components
|
|
13
6
|
*/
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { EntityCollectionTable } from "./EntityCollectionTable";
|
|
2
|
-
export type { EntityCollectionTableProps,
|
|
3
|
-
export type { UniqueFieldValidator, OnCellValueChange, OnCellValueChangeParams } from "./types";
|
|
2
|
+
export type { EntityCollectionTableProps, } from "./EntityCollectionTableProps";
|
|
4
3
|
export * from "./PropertyTableCell";
|
|
5
|
-
export * from "./SimpleTable";
|
|
6
4
|
export * from "./EntityCollectionRowActions";
|
|
7
|
-
export * from "
|
|
5
|
+
export * from "../common/useDataSourceEntityCollectionTableController";
|
|
8
6
|
export * from "./column_utils";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity, EntityCollection } from "../../../../types";
|
|
2
2
|
import { CustomFieldValidator } from "../../../../form/validation";
|
|
3
|
-
import { OnCellValueChangeParams } from "
|
|
3
|
+
import { OnCellValueChangeParams } from "../../../common";
|
|
4
4
|
interface PopupFormFieldProps<M extends Record<string, any>> {
|
|
5
5
|
entity?: Entity<M>;
|
|
6
6
|
customFieldValidator?: CustomFieldValidator;
|
package/dist/components/{ReferenceSelectionInner.d.ts → ReferenceTable/ReferenceSelectionTable.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Entity, EntityCollection, FilterValues } from "
|
|
2
|
+
import { Entity, EntityCollection, FilterValues } from "../../types";
|
|
3
3
|
/**
|
|
4
4
|
* @group Components
|
|
5
5
|
*/
|
|
@@ -55,4 +55,4 @@ export interface ReferenceSelectionInnerProps<M extends Record<string, any>> {
|
|
|
55
55
|
* You probably want to open this dialog as a side view using {@link useReferenceDialog}
|
|
56
56
|
* @group Components
|
|
57
57
|
*/
|
|
58
|
-
export declare function
|
|
58
|
+
export declare function ReferenceSelectionTable<M extends Record<string, any>>({ onSingleEntitySelected, onMultipleEntitiesSelected, multiselect, collection, path: pathInput, selectedEntityIds: selectedEntityIdsProp, description, forceFilter, maxSelection, }: ReferenceSelectionInnerProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
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 } from "
|
|
5
|
-
|
|
6
|
-
export type SimpleTableProps<M extends Record<string, any>> = {
|
|
4
|
+
import { OnCellValueChange, OnColumnResizeParams } from "../common/types";
|
|
5
|
+
export type SelectableTableProps<M extends Record<string, any>> = {
|
|
7
6
|
/**
|
|
8
7
|
* Callback when a cell value changes.
|
|
9
8
|
*/
|
|
@@ -73,4 +72,4 @@ export type SimpleTableProps<M extends Record<string, any>> = {
|
|
|
73
72
|
* @see VirtualTable
|
|
74
73
|
* @group Components
|
|
75
74
|
*/
|
|
76
|
-
export declare const
|
|
75
|
+
export declare const SelectableTable: React.NamedExoticComponent<SelectableTableProps<any>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { EntityCollectionTableController } from "../common/types";
|
|
3
|
+
export declare const SelectableTableContext: React.Context<EntityCollectionTableController<any>>;
|
|
4
|
+
export declare const useSelectableTableController: () => EntityCollectionTableController<any>;
|
|
@@ -51,3 +51,10 @@ export type UniqueFieldValidator = (props: {
|
|
|
51
51
|
* @group Collection components
|
|
52
52
|
*/
|
|
53
53
|
export type OnCellValueChange<T, M extends Record<string, any>> = (params: OnCellValueChangeParams<T, M>) => Promise<void> | void;
|
|
54
|
+
/**
|
|
55
|
+
* @group Collection components
|
|
56
|
+
*/
|
|
57
|
+
export type OnColumnResizeParams = {
|
|
58
|
+
width: number;
|
|
59
|
+
key: string;
|
|
60
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EntityCollection } from "../../types";
|
|
2
|
+
export interface UseTableSearchHelperParams<M extends Record<string, any>> {
|
|
3
|
+
collection: EntityCollection<M>;
|
|
4
|
+
fullPath: string;
|
|
5
|
+
parentCollectionIds?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function useTableSearchHelper<M extends Record<string, any>>({ collection, fullPath, parentCollectionIds }: UseTableSearchHelperParams<M>): {
|
|
8
|
+
textSearchLoading: boolean;
|
|
9
|
+
textSearchInitialised: boolean;
|
|
10
|
+
onTextSearchClick: (() => void) | undefined;
|
|
11
|
+
textSearchEnabled: boolean;
|
|
12
|
+
};
|
|
@@ -2,11 +2,14 @@ export type { ErrorViewProps } from "./ErrorView";
|
|
|
2
2
|
export { ErrorView } from "./ErrorView";
|
|
3
3
|
export type { EntityPreviewProps } from "./EntityPreview";
|
|
4
4
|
export { EntityPreview } from "./EntityPreview";
|
|
5
|
-
export type { ReferenceSelectionInnerProps } from "./
|
|
6
|
-
export {
|
|
5
|
+
export type { ReferenceSelectionInnerProps } from "./ReferenceTable/ReferenceSelectionTable";
|
|
6
|
+
export { ReferenceSelectionTable } from "./ReferenceTable/ReferenceSelectionTable";
|
|
7
7
|
export { CircularProgressCenter } from "./CircularProgressCenter";
|
|
8
|
+
export * from "./common";
|
|
8
9
|
export * from "./HomePage";
|
|
10
|
+
export * from "./SelectableTable/SelectableTable";
|
|
9
11
|
export * from "./EntityCollectionView/EntityCollectionView";
|
|
12
|
+
export * from "./EntityCollectionView/EntityCollectionViewActions";
|
|
10
13
|
export * from "./PropertyConfigBadge";
|
|
11
14
|
export * from "./EntityCollectionTable";
|
|
12
15
|
export * from "./NotFoundPage";
|