@firecms/core 3.0.0-beta.6 → 3.0.0-beta.7
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 +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +4 -2
- package/dist/components/EntityCollectionTable/PropertyTableCell.d.ts +1 -0
- package/dist/components/EntityCollectionTable/column_utils.d.ts +1 -2
- package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +2 -0
- package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +2 -2
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +1 -1
- package/dist/components/EntityPreview.d.ts +3 -2
- package/dist/components/FireCMSAppBar.d.ts +4 -2
- package/dist/components/ReferenceWidget.d.ts +3 -1
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +1 -6
- package/dist/components/VirtualTable/types.d.ts +3 -3
- package/dist/components/{EntityCollectionTable/internal → common}/default_entity_actions.d.ts +1 -1
- package/dist/components/common/index.d.ts +1 -0
- package/dist/components/common/table_height.d.ts +5 -0
- package/dist/components/common/types.d.ts +3 -5
- package/dist/components/common/useDataSourceEntityCollectionTableController.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/core/Drawer.d.ts +5 -12
- package/dist/core/DrawerNavigationItem.d.ts +9 -0
- package/dist/core/NavigationRoutes.d.ts +1 -1
- package/dist/core/Scaffold.d.ts +8 -12
- package/dist/core/index.d.ts +3 -4
- package/dist/hooks/data/save.d.ts +1 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.es.js +9950 -9912
- 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/preview/components/ReferencePreview.d.ts +2 -1
- package/dist/types/collections.d.ts +8 -1
- package/dist/types/entity_actions.d.ts +14 -0
- package/dist/types/navigation.d.ts +2 -2
- package/dist/types/properties.d.ts +8 -0
- package/dist/util/icon_synonyms.d.ts +1 -97
- package/dist/util/objects.d.ts +1 -1
- package/dist/util/resolutions.d.ts +8 -8
- package/package.json +139 -122
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +2 -2
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +9 -7
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +9 -5
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +22 -15
- package/src/components/EntityCollectionTable/column_utils.tsx +3 -3
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +9 -1
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +5 -6
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +2 -4
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +19 -20
- package/src/components/EntityPreview.tsx +9 -7
- package/src/components/EntityView.tsx +4 -4
- package/src/components/FireCMSAppBar.tsx +32 -15
- package/src/components/HomePage/NavigationCard.tsx +2 -2
- package/src/components/HomePage/SmallNavigationCard.tsx +5 -5
- package/src/components/PropertyIdCopyTooltipContent.tsx +2 -3
- package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +1 -0
- package/src/components/ReferenceWidget.tsx +21 -11
- package/src/components/SearchIconsView.tsx +5 -5
- package/src/components/SelectableTable/SelectableTable.tsx +4 -2
- package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +4 -1
- package/src/components/VirtualTable/VirtualTable.tsx +10 -11
- package/src/components/VirtualTable/VirtualTableHeader.tsx +4 -4
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +2 -2
- package/src/components/VirtualTable/VirtualTableProps.tsx +1 -6
- package/src/components/VirtualTable/VirtualTableRow.tsx +4 -5
- package/src/components/VirtualTable/types.tsx +2 -3
- package/src/components/{EntityCollectionTable/internal → common}/default_entity_actions.tsx +2 -2
- package/src/components/common/index.ts +1 -0
- package/src/components/{VirtualTable/common.tsx → common/table_height.tsx} +5 -2
- package/src/components/common/types.tsx +3 -5
- package/src/components/common/useColumnsIds.tsx +10 -2
- package/src/components/common/useDataSourceEntityCollectionTableController.tsx +11 -0
- package/src/components/index.tsx +1 -0
- package/src/core/Drawer.tsx +16 -68
- package/src/core/DrawerNavigationItem.tsx +62 -0
- package/src/core/EntityEditView.tsx +7 -8
- package/src/core/EntitySidePanel.tsx +1 -1
- package/src/core/FireCMS.tsx +36 -40
- package/src/core/NavigationRoutes.tsx +3 -4
- package/src/core/Scaffold.tsx +80 -66
- package/src/core/field_configs.tsx +1 -1
- package/src/core/index.tsx +3 -4
- package/src/form/EntityForm.tsx +29 -21
- package/src/form/PropertyFieldBinding.tsx +0 -2
- package/src/form/components/StorageItemPreview.tsx +2 -2
- package/src/form/components/StorageUploadProgress.tsx +3 -3
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +4 -2
- package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +4 -4
- package/src/form/field_bindings/MarkdownFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +15 -13
- package/src/form/field_bindings/SelectFieldBinding.tsx +3 -3
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +4 -4
- package/src/hooks/data/save.ts +2 -1
- package/src/hooks/index.tsx +1 -0
- package/src/hooks/useBuildLocalConfigurationPersistence.tsx +2 -3
- package/src/hooks/useBuildNavigationController.tsx +1 -2
- package/src/hooks/useResolvedNavigationFrom.tsx +1 -1
- package/src/hooks/useValidateAuthenticator.tsx +15 -15
- package/src/internal/useBuildSideEntityController.tsx +72 -11
- package/src/preview/PropertyPreview.tsx +2 -2
- package/src/preview/components/BooleanPreview.tsx +2 -2
- package/src/preview/components/EnumValuesChip.tsx +1 -1
- package/src/preview/components/ReferencePreview.tsx +21 -22
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +0 -1
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +2 -1
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +0 -1
- package/src/preview/property_previews/ArrayOfStringsPreview.tsx +0 -1
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +2 -3
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +2 -3
- package/src/preview/property_previews/MapPropertyPreview.tsx +5 -5
- package/src/preview/property_previews/StringPropertyPreview.tsx +2 -2
- package/src/types/collections.ts +14 -2
- package/src/types/entity_actions.tsx +16 -3
- package/src/types/navigation.ts +1 -2
- package/src/types/properties.ts +10 -0
- package/src/types/storage.ts +1 -1
- package/src/util/enums.ts +1 -1
- package/src/util/icon_list.ts +2 -2
- package/src/util/icon_synonyms.ts +3 -99
- package/src/util/objects.ts +8 -21
- package/src/util/resolutions.ts +32 -31
- package/dist/components/VirtualTable/common.d.ts +0 -2
- package/dist/core/SideEntityView.d.ts +0 -7
- package/dist/internal/useBuildCustomizationController.d.ts +0 -2
- package/src/core/SideEntityView.tsx +0 -38
- package/src/internal/useBuildCustomizationController.tsx +0 -5
|
@@ -24,4 +24,4 @@ import { EntityCollectionTableProps } from "./EntityCollectionTableProps";
|
|
|
24
24
|
* @see VirtualTable
|
|
25
25
|
* @group Components
|
|
26
26
|
*/
|
|
27
|
-
export declare const EntityCollectionTable: <M extends Record<string, any>, UserType extends User>({ forceFilter, actionsStart, actions, title, tableRowActionsBuilder, uniqueFieldValidator, getPropertyFor, onValueChange, selectionController, highlightedEntities, onEntityClick, onColumnResize, onSizeChanged, textSearchEnabled, hoverRow, inlineEditing, additionalFields, displayedColumnIds, defaultSize, properties, tableController, filterable, sortable, endAdornment, AddColumnComponent, AdditionalHeaderWidget, additionalIDHeaderWidget, emptyComponent, getIdColumnWidth, onTextSearchClick, textSearchLoading }: EntityCollectionTableProps<M>) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const EntityCollectionTable: <M extends Record<string, any>, UserType extends User>({ className, style, forceFilter, actionsStart, actions, title, tableRowActionsBuilder, uniqueFieldValidator, getPropertyFor, onValueChange, selectionController, highlightedEntities, onEntityClick, onColumnResize, onSizeChanged, textSearchEnabled, hoverRow, inlineEditing, additionalFields, displayedColumnIds, defaultSize, properties, tableController, filterable, sortable, endAdornment, AddColumnComponent, AdditionalHeaderWidget, additionalIDHeaderWidget, emptyComponent, getIdColumnWidth, onTextSearchClick, textSearchLoading, enablePopupIcon }: EntityCollectionTableProps<M>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,8 @@ import { OnCellValueChange, OnColumnResizeParams, UniqueFieldValidator } from ".
|
|
|
5
5
|
* @group Collection components
|
|
6
6
|
*/
|
|
7
7
|
export type EntityCollectionTableProps<M extends Record<string, any>, UserType extends User = User> = {
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
8
10
|
/**
|
|
9
11
|
* Display these entities as selected
|
|
10
12
|
*/
|
|
@@ -87,13 +89,13 @@ export type EntityCollectionTableProps<M extends Record<string, any>, UserType e
|
|
|
87
89
|
getIdColumnWidth?: () => number;
|
|
88
90
|
onTextSearchClick?: () => void;
|
|
89
91
|
textSearchLoading?: boolean;
|
|
92
|
+
enablePopupIcon: boolean;
|
|
90
93
|
};
|
|
91
94
|
export type GetPropertyForProps<M extends Record<string, any>> = {
|
|
92
95
|
propertyKey: string;
|
|
93
|
-
propertyValue: any;
|
|
94
96
|
entity: Entity<M>;
|
|
95
97
|
};
|
|
96
98
|
export type PropertyColumnConfig = {
|
|
97
99
|
key: string;
|
|
98
|
-
disabled
|
|
100
|
+
disabled?: boolean;
|
|
99
101
|
};
|
|
@@ -6,11 +6,10 @@ export interface PropertiesToColumnsParams<M extends Record<string, any>> {
|
|
|
6
6
|
properties: ResolvedProperties<M>;
|
|
7
7
|
sortable?: boolean;
|
|
8
8
|
forceFilter?: FilterValues<keyof M extends string ? keyof M : never>;
|
|
9
|
-
disabledFilter?: boolean;
|
|
10
9
|
AdditionalHeaderWidget?: React.ComponentType<{
|
|
11
10
|
property: ResolvedProperty;
|
|
12
11
|
propertyKey: string;
|
|
13
12
|
onHover: boolean;
|
|
14
13
|
}>;
|
|
15
14
|
}
|
|
16
|
-
export declare function propertiesToColumns<M extends Record<string, any>>({ properties, sortable, forceFilter,
|
|
15
|
+
export declare function propertiesToColumns<M extends Record<string, any>>({ properties, sortable, forceFilter, AdditionalHeaderWidget }: PropertiesToColumnsParams<M>): VirtualTableColumn[];
|
|
@@ -11,6 +11,8 @@ type TableReferenceFieldProps = {
|
|
|
11
11
|
title?: string;
|
|
12
12
|
path: string;
|
|
13
13
|
forceFilter?: FilterValues<string>;
|
|
14
|
+
includeId?: boolean;
|
|
15
|
+
includeEntityLink?: boolean;
|
|
14
16
|
};
|
|
15
17
|
export declare function TableReferenceField(props: TableReferenceFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export declare const TableReferenceFieldSuccess: React.NamedExoticComponent<TableReferenceFieldProps & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { TableSize } from "../../common/table_height";
|
|
3
3
|
interface EntityTableCellProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
actions?: React.ReactNode;
|
|
@@ -12,7 +12,7 @@ interface EntityTableCellProps {
|
|
|
12
12
|
error?: Error;
|
|
13
13
|
allowScroll?: boolean;
|
|
14
14
|
align: "right" | "left" | "center";
|
|
15
|
-
size:
|
|
15
|
+
size: TableSize;
|
|
16
16
|
disabledTooltip?: string;
|
|
17
17
|
width: number;
|
|
18
18
|
showExpandIcon?: boolean;
|
|
@@ -16,7 +16,7 @@ interface PopupFormFieldProps<M extends Record<string, any>> {
|
|
|
16
16
|
* Callback when the value of a cell has been edited
|
|
17
17
|
* @param params
|
|
18
18
|
*/
|
|
19
|
-
onCellValueChange?: (params: OnCellValueChangeParams<any,
|
|
19
|
+
onCellValueChange?: (params: OnCellValueChangeParams<any, any>) => Promise<void> | void;
|
|
20
20
|
}
|
|
21
21
|
export declare function PopupFormField<M extends Record<string, any>>(props: PopupFormFieldProps<M>): import("react/jsx-runtime").JSX.Element | null;
|
|
22
22
|
export declare function PopupFormFieldInternal<M extends Record<string, any>>({ tableKey, entity: entityProp, customFieldValidator, propertyKey, collection: inputCollection, path, cellRect, open, onClose, onCellValueChange, container }: PopupFormFieldProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,14 +9,15 @@ export type EntityPreviewProps = {
|
|
|
9
9
|
previewProperties?: string[];
|
|
10
10
|
disabled: undefined | boolean;
|
|
11
11
|
entity: Entity<any>;
|
|
12
|
-
|
|
12
|
+
includeId?: boolean;
|
|
13
|
+
includeEntityLink?: boolean;
|
|
13
14
|
onClick?: (e: React.SyntheticEvent) => void;
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
17
|
* This view is used to display a preview of an entity.
|
|
17
18
|
* It is used by default in reference fields and whenever a reference is displayed.
|
|
18
19
|
*/
|
|
19
|
-
export declare function EntityPreview({ actions, disabled, hover, collection: collectionProp, previewProperties, onClick, size,
|
|
20
|
+
export declare function EntityPreview({ actions, disabled, hover, collection: collectionProp, previewProperties, onClick, size, includeId, includeEntityLink, entity }: EntityPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export type EntityPreviewContainerProps = {
|
|
21
22
|
children: React.ReactNode;
|
|
22
23
|
hover?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { User } from "../types";
|
|
3
3
|
export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
|
|
4
|
-
title
|
|
4
|
+
title?: React.ReactNode;
|
|
5
5
|
/**
|
|
6
6
|
* A component that gets rendered on the upper side of the main toolbar
|
|
7
7
|
*/
|
|
@@ -9,9 +9,11 @@ export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
|
|
|
9
9
|
startAdornment?: React.ReactNode;
|
|
10
10
|
dropDownActions?: React.ReactNode;
|
|
11
11
|
includeDrawer?: boolean;
|
|
12
|
+
includeModeToggle?: boolean;
|
|
12
13
|
drawerOpen: boolean;
|
|
13
14
|
className?: string;
|
|
14
15
|
style?: React.CSSProperties;
|
|
16
|
+
logo?: string;
|
|
15
17
|
user?: User;
|
|
16
18
|
} & ADDITIONAL_PROPS;
|
|
17
19
|
/**
|
|
@@ -23,4 +25,4 @@ export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
|
|
|
23
25
|
* @param drawerOpen
|
|
24
26
|
* @constructor
|
|
25
27
|
*/
|
|
26
|
-
export declare const FireCMSAppBar: ({ title, endAdornment, startAdornment, drawerOpen, dropDownActions, includeDrawer, className, style, user: userProp }: FireCMSAppBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const FireCMSAppBar: ({ title, endAdornment, startAdornment, drawerOpen, dropDownActions, includeDrawer, includeModeToggle, className, style, logo, user: userProp }: FireCMSAppBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,8 +21,10 @@ export type ReferenceWidgetProps<M extends Record<string, any>> = {
|
|
|
21
21
|
forceFilter?: FilterValues<string>;
|
|
22
22
|
size: PreviewSize;
|
|
23
23
|
className?: string;
|
|
24
|
+
includeId?: boolean;
|
|
25
|
+
includeEntityLink?: boolean;
|
|
24
26
|
};
|
|
25
27
|
/**
|
|
26
28
|
* This field allows selecting reference/s.
|
|
27
29
|
*/
|
|
28
|
-
export declare function ReferenceWidget<M extends Record<string, any>>({ name, multiselect, path, disabled, value, onReferenceSelected, onMultipleReferenceSelected, previewProperties, forceFilter, size, className }: ReferenceWidgetProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function ReferenceWidget<M extends Record<string, any>>({ name, multiselect, path, disabled, value, onReferenceSelected, onMultipleReferenceSelected, previewProperties, forceFilter, size, className, includeId, includeEntityLink }: ReferenceWidgetProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,9 +6,10 @@ interface ReferenceFilterFieldProps {
|
|
|
6
6
|
isArray?: boolean;
|
|
7
7
|
path?: string;
|
|
8
8
|
title?: string;
|
|
9
|
+
includeId?: boolean;
|
|
9
10
|
previewProperties?: string[];
|
|
10
11
|
hidden: boolean;
|
|
11
12
|
setHidden: (hidden: boolean) => void;
|
|
12
13
|
}
|
|
13
|
-
export declare function ReferenceFilterField({ name, value, setValue, isArray, path, title, previewProperties, setHidden }: ReferenceFilterFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function ReferenceFilterField({ name, value, setValue, isArray, path, title, includeId, previewProperties, setHidden }: ReferenceFilterFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -56,7 +56,7 @@ export interface VirtualTableProps<T extends Record<string, any>> {
|
|
|
56
56
|
/**
|
|
57
57
|
* Size of the table
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
rowHeight?: number;
|
|
60
60
|
/**
|
|
61
61
|
* In case this table should have some filters set by default
|
|
62
62
|
*/
|
|
@@ -190,11 +190,6 @@ export type OnVirtualTableColumnResizeParams = {
|
|
|
190
190
|
key: string;
|
|
191
191
|
column: VirtualTableColumn;
|
|
192
192
|
};
|
|
193
|
-
/**
|
|
194
|
-
* @see Table
|
|
195
|
-
* @group Components
|
|
196
|
-
*/
|
|
197
|
-
export type VirtualTableSize = "xs" | "s" | "m" | "l" | "xl";
|
|
198
193
|
/**
|
|
199
194
|
* @see Table
|
|
200
195
|
* @group Components
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CellRendererParams, OnRowClickParams, OnVirtualTableColumnResizeParams, VirtualTableColumn, VirtualTableFilterValues,
|
|
2
|
+
import { CellRendererParams, OnRowClickParams, OnVirtualTableColumnResizeParams, VirtualTableColumn, VirtualTableFilterValues, VirtualTableWhereFilterOp } from "./VirtualTableProps";
|
|
3
3
|
import { FilterFormFieldProps } from "./VirtualTableHeader";
|
|
4
4
|
export type VirtualTableRowProps<T> = {
|
|
5
5
|
style: any;
|
|
6
|
-
|
|
6
|
+
rowHeight: number;
|
|
7
7
|
rowData: T;
|
|
8
8
|
rowIndex: number;
|
|
9
9
|
onRowClick?: (props: OnRowClickParams<any>) => void;
|
|
@@ -14,7 +14,7 @@ export type VirtualTableRowProps<T> = {
|
|
|
14
14
|
};
|
|
15
15
|
export type VirtualTableContextProps<T extends any> = {
|
|
16
16
|
data?: T[];
|
|
17
|
-
|
|
17
|
+
rowHeight?: number;
|
|
18
18
|
columns: VirtualTableColumn[];
|
|
19
19
|
cellRenderer: React.ComponentType<CellRendererParams<T>>;
|
|
20
20
|
currentSort: "asc" | "desc" | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionSize,
|
|
1
|
+
import { CollectionSize, ResolvedProperty, SelectedCellProps } from "../../types";
|
|
2
2
|
export type EntityCollectionTableController<M extends Record<string, any>> = {
|
|
3
3
|
/**
|
|
4
4
|
* This cell is displayed as selected
|
|
@@ -28,14 +28,12 @@ export type EntityCollectionTableController<M extends Record<string, any>> = {
|
|
|
28
28
|
* Props passed in a callback when the content of a cell in a table has been edited
|
|
29
29
|
* @group Collection components
|
|
30
30
|
*/
|
|
31
|
-
export interface OnCellValueChangeParams<T = any,
|
|
31
|
+
export interface OnCellValueChangeParams<T = any, D = any> {
|
|
32
32
|
value: T;
|
|
33
33
|
propertyKey: string;
|
|
34
|
-
|
|
34
|
+
data?: D;
|
|
35
35
|
onValueUpdated: () => void;
|
|
36
36
|
setError: (e: Error | undefined) => void;
|
|
37
|
-
fullPath: string;
|
|
38
|
-
context: FireCMSContext;
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
39
|
* @group Collection components
|
|
@@ -14,6 +14,9 @@ export type DataSourceEntityCollectionTableControllerProps<M extends Record<stri
|
|
|
14
14
|
*/
|
|
15
15
|
entitiesDisplayedFirst?: Entity<M>[];
|
|
16
16
|
lastDeleteTimestamp?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Force filter to be applied to the table.
|
|
19
|
+
*/
|
|
17
20
|
forceFilter?: FilterValues<string>;
|
|
18
21
|
};
|
|
19
22
|
/**
|
|
@@ -8,6 +8,7 @@ export { CircularProgressCenter } from "./CircularProgressCenter";
|
|
|
8
8
|
export * from "./common";
|
|
9
9
|
export * from "./HomePage";
|
|
10
10
|
export * from "./SelectableTable/SelectableTable";
|
|
11
|
+
export * from "./SelectableTable/SelectableTableContext";
|
|
11
12
|
export * from "./EntityCollectionView/EntityCollectionView";
|
|
12
13
|
export * from "./EntityCollectionView/EntityCollectionViewActions";
|
|
13
14
|
export * from "./EntityCollectionView/useSelectionController";
|
package/dist/core/Drawer.d.ts
CHANGED
|
@@ -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
|
|
5
|
+
export type DrawerProps = {
|
|
7
6
|
hovered: boolean;
|
|
8
7
|
drawerOpen: boolean;
|
|
9
|
-
|
|
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(
|
|
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;
|
package/dist/core/Scaffold.d.ts
CHANGED
|
@@ -2,14 +2,15 @@ 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<
|
|
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
|
*/
|
|
12
|
-
name
|
|
13
|
+
name?: React.ReactNode;
|
|
13
14
|
/**
|
|
14
15
|
* Logo to be displayed in the drawer of the CMS
|
|
15
16
|
*/
|
|
@@ -19,21 +20,16 @@ export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = obj
|
|
|
19
20
|
*/
|
|
20
21
|
includeDrawer?: boolean;
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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
|
-
|
|
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
|
*/
|
|
33
30
|
autoOpenDrawer?: boolean;
|
|
34
31
|
/**
|
|
35
|
-
*
|
|
36
|
-
* `toolbarExtraWidget` has no effect if this is set.
|
|
32
|
+
* The AppBar component to be used in the scaffold.
|
|
37
33
|
*/
|
|
38
34
|
FireCMSAppBar?: React.ComponentType<FireCMSAppBarProps<ExtraAppbarProps>>;
|
|
39
35
|
/**
|
|
@@ -52,4 +48,4 @@ export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = obj
|
|
|
52
48
|
* @constructor
|
|
53
49
|
* @group Core
|
|
54
50
|
*/
|
|
55
|
-
export declare const Scaffold: React.NamedExoticComponent<React.PropsWithChildren<ScaffoldProps<object
|
|
51
|
+
export declare const Scaffold: React.NamedExoticComponent<React.PropsWithChildren<ScaffoldProps<object>>>;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export * from "./FireCMS";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
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";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { DataSource, Entity,
|
|
1
|
+
import { DataSource, Entity, EntityCollection, FireCMSContext, SaveEntityProps, User } from "../../types";
|
|
2
2
|
/**
|
|
3
3
|
* @group Hooks and utilities
|
|
4
4
|
*/
|
|
5
5
|
export type SaveEntityWithCallbacksProps<M extends Record<string, any>> = SaveEntityProps<M> & {
|
|
6
|
-
callbacks?: EntityCallbacks<M>;
|
|
7
6
|
onSaveSuccess?: (updatedEntity: Entity<M>) => void;
|
|
8
7
|
onSaveFailure?: (e: Error) => void;
|
|
9
8
|
onPreSaveHookError?: (e: Error) => void;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -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";
|