@firecms/core 3.0.0-beta.1 → 3.0.0-beta.2-pre.2
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/ArrayContainer.d.ts +1 -3
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +1 -2
- package/dist/components/EntityCollectionTable/{SimpleEntityCollectionTable.d.ts → SimpleTable.d.ts} +7 -26
- package/dist/components/EntityCollectionTable/index.d.ts +1 -1
- package/dist/components/EntityCollectionTable/useDataSourceEntityCollectionTableController.d.ts +1 -1
- package/dist/components/{FieldConfigBadge.d.ts → PropertyConfigBadge.d.ts} +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/core/Scaffold.d.ts +5 -2
- package/dist/form/components/CustomIdField.d.ts +2 -1
- package/dist/index.es.js +4269 -4446
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/types/datasource.d.ts +3 -3
- package/dist/types/entity_callbacks.d.ts +1 -1
- package/dist/util/strings.d.ts +1 -1
- package/package.json +16 -16
- package/src/components/ArrayContainer.tsx +31 -67
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +78 -262
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -2
- package/src/components/EntityCollectionTable/{SimpleEntityCollectionTable.tsx → SimpleTable.tsx} +36 -73
- package/src/components/EntityCollectionTable/index.tsx +1 -1
- package/src/components/EntityCollectionTable/useDataSourceEntityCollectionTableController.tsx +1 -1
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +9 -8
- package/src/components/EntityPreview.tsx +0 -1
- package/src/components/LabelWithIcon.tsx +1 -1
- package/src/components/{FieldConfigBadge.tsx → PropertyConfigBadge.tsx} +1 -1
- package/src/components/ReferenceSelectionInner.tsx +0 -1
- package/src/components/index.tsx +1 -1
- package/src/core/NavigationRoutes.tsx +0 -1
- package/src/core/Scaffold.tsx +11 -8
- package/src/form/EntityForm.tsx +12 -2
- package/src/form/components/CustomIdField.tsx +16 -4
- package/src/form/components/ErrorFocus.tsx +1 -1
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -2
- package/src/form/field_bindings/MarkdownFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +1 -2
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +1 -2
- package/src/hooks/useLargeLayout.tsx +10 -7
- package/src/internal/useBuildDataSource.ts +9 -9
- package/src/preview/PropertyPreviewProps.tsx +1 -1
- package/src/types/datasource.ts +3 -3
- package/src/types/entity_callbacks.ts +2 -1
- package/src/util/strings.ts +2 -1
|
@@ -28,10 +28,8 @@ type ArrayContainerItemProps = {
|
|
|
28
28
|
isDragging: boolean;
|
|
29
29
|
};
|
|
30
30
|
export declare function ArrayContainerItem({ provided, index, internalId, size, disabled, buildEntry, remove, copy, isDragging }: ArrayContainerItemProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export declare function ArrayItemOptions({ direction, disabled, remove, index, provided, copy,
|
|
31
|
+
export declare function ArrayItemOptions({ direction, disabled, remove, index, provided, copy, }: {
|
|
32
32
|
direction?: "row" | "column";
|
|
33
|
-
contentOverflow: boolean;
|
|
34
|
-
measuring: boolean;
|
|
35
33
|
disabled: boolean;
|
|
36
34
|
remove: (index: number) => void;
|
|
37
35
|
index: number;
|
|
@@ -12,7 +12,6 @@ export type OnColumnResizeParams = {
|
|
|
12
12
|
* @group Collection components
|
|
13
13
|
*/
|
|
14
14
|
export type EntityCollectionTableProps<M extends Record<string, any>, UserType extends User = User> = {
|
|
15
|
-
debugKey?: string;
|
|
16
15
|
/**
|
|
17
16
|
* Display these entities as selected
|
|
18
17
|
*/
|
|
@@ -76,7 +75,7 @@ export type EntityCollectionTableProps<M extends Record<string, any>, UserType e
|
|
|
76
75
|
displayedColumnIds: PropertyColumnConfig[];
|
|
77
76
|
forceFilter?: FilterValues<Extract<keyof M, string>>;
|
|
78
77
|
textSearchEnabled?: boolean;
|
|
79
|
-
inlineEditing?: boolean
|
|
78
|
+
inlineEditing?: boolean;
|
|
80
79
|
additionalFields?: AdditionalFieldDelegate<M, UserType>[];
|
|
81
80
|
defaultSize?: CollectionSize;
|
|
82
81
|
properties: ResolvedProperties<M>;
|
package/dist/components/EntityCollectionTable/{SimpleEntityCollectionTable.d.ts → SimpleTable.d.ts}
RENAMED
|
@@ -3,15 +3,7 @@ import { CollectionSize, Entity, EntityTableController, FilterValues } from "../
|
|
|
3
3
|
import { CellRendererParams, VirtualTableColumn } from "../VirtualTable";
|
|
4
4
|
import { OnCellValueChange } from "./types";
|
|
5
5
|
import { OnColumnResizeParams } from "./EntityCollectionTableProps";
|
|
6
|
-
export type
|
|
7
|
-
/**
|
|
8
|
-
* List of entities that will be displayed as selected;
|
|
9
|
-
*/
|
|
10
|
-
highlightedEntities?: Entity<M>[];
|
|
11
|
-
/**
|
|
12
|
-
* Override the title in the toolbar
|
|
13
|
-
*/
|
|
14
|
-
title?: React.ReactNode;
|
|
6
|
+
export type SimpleTableProps<M extends Record<string, any>> = {
|
|
15
7
|
/**
|
|
16
8
|
* Callback when a cell value changes.
|
|
17
9
|
*/
|
|
@@ -37,24 +29,10 @@ export type SimpleEntityCollectionTableProps<M extends Record<string, any>> = {
|
|
|
37
29
|
* Callback when a column is resized
|
|
38
30
|
*/
|
|
39
31
|
onColumnResize?(params: OnColumnResizeParams): void;
|
|
40
|
-
/**
|
|
41
|
-
* Callback when the selected size of the table is changed
|
|
42
|
-
*/
|
|
43
|
-
onSizeChanged?(size: CollectionSize): void;
|
|
44
32
|
/**
|
|
45
33
|
* Should apply a different style to a row when hovering
|
|
46
34
|
*/
|
|
47
35
|
hoverRow?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Additional component that renders actions such as buttons in the
|
|
50
|
-
* collection toolbar, displayed on the left side
|
|
51
|
-
*/
|
|
52
|
-
actionsStart?: React.ReactNode;
|
|
53
|
-
/**
|
|
54
|
-
* Additional component that renders actions such as buttons in the
|
|
55
|
-
* collection toolbar, displayed on the right side
|
|
56
|
-
*/
|
|
57
|
-
actions?: React.ReactNode;
|
|
58
36
|
/**
|
|
59
37
|
* Controller holding the logic for the table
|
|
60
38
|
* {@link useDataSourceEntityCollectionTableController}
|
|
@@ -64,9 +42,12 @@ export type SimpleEntityCollectionTableProps<M extends Record<string, any>> = {
|
|
|
64
42
|
filterable?: boolean;
|
|
65
43
|
sortable?: boolean;
|
|
66
44
|
inlineEditing?: boolean;
|
|
67
|
-
textSearchEnabled?: boolean;
|
|
68
|
-
emptyComponent?: React.ReactNode;
|
|
69
45
|
forceFilter?: FilterValues<keyof M extends string ? keyof M : never>;
|
|
46
|
+
highlightedRow?: (data: Entity<M>) => boolean;
|
|
47
|
+
size?: CollectionSize;
|
|
48
|
+
emptyComponent?: React.ReactNode;
|
|
49
|
+
endAdornment?: React.ReactNode;
|
|
50
|
+
AddColumnComponent?: React.ComponentType;
|
|
70
51
|
};
|
|
71
52
|
/**
|
|
72
53
|
* This component is in charge of rendering a collection table with a high
|
|
@@ -92,4 +73,4 @@ export type SimpleEntityCollectionTableProps<M extends Record<string, any>> = {
|
|
|
92
73
|
* @see VirtualTable
|
|
93
74
|
* @group Components
|
|
94
75
|
*/
|
|
95
|
-
export declare const
|
|
76
|
+
export declare const SimpleTable: React.NamedExoticComponent<SimpleTableProps<any>>;
|
|
@@ -2,7 +2,7 @@ export { EntityCollectionTable } from "./EntityCollectionTable";
|
|
|
2
2
|
export type { EntityCollectionTableProps, OnColumnResizeParams } from "./EntityCollectionTableProps";
|
|
3
3
|
export type { UniqueFieldValidator, OnCellValueChange, OnCellValueChangeParams } from "./types";
|
|
4
4
|
export * from "./PropertyTableCell";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./SimpleTable";
|
|
6
6
|
export * from "./EntityCollectionRowActions";
|
|
7
7
|
export * from "./useDataSourceEntityCollectionTableController";
|
|
8
8
|
export * from "./column_utils";
|
package/dist/components/EntityCollectionTable/useDataSourceEntityCollectionTableController.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Entity, EntityCollection,
|
|
1
|
+
import { Entity, EntityCollection, EntityTableController, FilterValues, User } from "../../types";
|
|
2
2
|
export type DataSourceEntityCollectionTableControllerProps<M extends Record<string, any> = any> = {
|
|
3
3
|
/**
|
|
4
4
|
* Full path where the data of this table is located
|
|
@@ -7,7 +7,7 @@ export { ReferenceSelectionInner } from "./ReferenceSelectionInner";
|
|
|
7
7
|
export { CircularProgressCenter } from "./CircularProgressCenter";
|
|
8
8
|
export * from "./HomePage";
|
|
9
9
|
export * from "./EntityCollectionView/EntityCollectionView";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./PropertyConfigBadge";
|
|
11
11
|
export * from "./EntityCollectionTable";
|
|
12
12
|
export * from "./NotFoundPage";
|
|
13
13
|
export * from "./VirtualTable";
|
package/dist/core/Scaffold.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = obj
|
|
|
14
14
|
* Logo to be displayed in the drawer of the CMS
|
|
15
15
|
*/
|
|
16
16
|
logo?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to include the drawer in the scaffold
|
|
19
|
+
*/
|
|
17
20
|
includeDrawer?: boolean;
|
|
18
21
|
/**
|
|
19
22
|
* In case you need to override the view that gets rendered as a drawer
|
|
@@ -32,11 +35,11 @@ export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = obj
|
|
|
32
35
|
* A component that gets rendered on the upper side of the main toolbar.
|
|
33
36
|
* `toolbarExtraWidget` has no effect if this is set.
|
|
34
37
|
*/
|
|
35
|
-
|
|
38
|
+
FireCMSAppBar?: React.ComponentType<FireCMSAppBarProps<ExtraAppbarProps>>;
|
|
36
39
|
/**
|
|
37
40
|
* Additional props passed to the custom AppBar
|
|
38
41
|
*/
|
|
39
|
-
|
|
42
|
+
fireCMSAppBarProps?: Partial<FireCMSAppBarProps> & ExtraAppbarProps;
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
45
|
* This view acts as a scaffold for FireCMS.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Entity, EntityStatus, EnumValues } from "../../types";
|
|
2
|
-
export declare function CustomIdField<M extends Record<string, any>>({ customId, entityId, status, onChange, error, entity }: {
|
|
2
|
+
export declare function CustomIdField<M extends Record<string, any>>({ customId, entityId, status, onChange, error, entity, loading }: {
|
|
3
3
|
customId?: boolean | EnumValues | "optional";
|
|
4
4
|
entityId?: string;
|
|
5
5
|
status: EntityStatus;
|
|
6
6
|
onChange: (id?: string) => void;
|
|
7
7
|
error: boolean;
|
|
8
8
|
entity: Entity<M> | undefined;
|
|
9
|
+
loading: boolean;
|
|
9
10
|
}): import("react/jsx-runtime").JSX.Element;
|