@firecms/core 3.0.0-canary.43 → 3.0.0-canary.44
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 +3 -1
- package/dist/components/EntityCollectionTable/PropertyTableCell.d.ts +1 -0
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +1 -1
- package/dist/components/FireCMSAppBar.d.ts +3 -2
- package/dist/components/common/types.d.ts +3 -5
- package/dist/core/NavigationRoutes.d.ts +1 -1
- package/dist/core/Scaffold.d.ts +1 -1
- package/dist/hooks/data/save.d.ts +1 -2
- package/dist/index.es.js +3829 -3813
- 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 +4 -4
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +6 -2
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +5 -3
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +17 -13
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +2 -4
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +6 -5
- package/src/components/FireCMSAppBar.tsx +23 -8
- package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +1 -0
- package/src/components/VirtualTable/VirtualTable.tsx +1 -1
- package/src/components/common/types.tsx +3 -5
- package/src/core/NavigationRoutes.tsx +3 -4
- package/src/core/Scaffold.tsx +5 -4
- package/src/hooks/data/save.ts +0 -1
|
@@ -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, 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,7 @@ 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;
|
|
8
9
|
/**
|
|
9
10
|
* Display these entities as selected
|
|
10
11
|
*/
|
|
@@ -87,6 +88,7 @@ export type EntityCollectionTableProps<M extends Record<string, any>, UserType e
|
|
|
87
88
|
getIdColumnWidth?: () => number;
|
|
88
89
|
onTextSearchClick?: () => void;
|
|
89
90
|
textSearchLoading?: boolean;
|
|
91
|
+
enablePopupIcon: boolean;
|
|
90
92
|
};
|
|
91
93
|
export type GetPropertyForProps<M extends Record<string, any>> = {
|
|
92
94
|
propertyKey: string;
|
|
@@ -95,5 +97,5 @@ export type GetPropertyForProps<M extends Record<string, any>> = {
|
|
|
95
97
|
};
|
|
96
98
|
export type PropertyColumnConfig = {
|
|
97
99
|
key: string;
|
|
98
|
-
disabled
|
|
100
|
+
disabled?: boolean;
|
|
99
101
|
};
|
|
@@ -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;
|
|
@@ -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
|
*/
|
|
@@ -12,6 +12,7 @@ export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
|
|
|
12
12
|
drawerOpen: boolean;
|
|
13
13
|
className?: string;
|
|
14
14
|
style?: React.CSSProperties;
|
|
15
|
+
logo?: string;
|
|
15
16
|
user?: User;
|
|
16
17
|
} & ADDITIONAL_PROPS;
|
|
17
18
|
/**
|
|
@@ -23,4 +24,4 @@ export type FireCMSAppBarProps<ADDITIONAL_PROPS = object> = {
|
|
|
23
24
|
* @param drawerOpen
|
|
24
25
|
* @constructor
|
|
25
26
|
*/
|
|
26
|
-
export declare const FireCMSAppBar: ({ title, endAdornment, startAdornment, drawerOpen, dropDownActions, includeDrawer, className, style, user: userProp }: FireCMSAppBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const FireCMSAppBar: ({ title, endAdornment, startAdornment, drawerOpen, dropDownActions, includeDrawer, className, style, logo, user: userProp }: FireCMSAppBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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
|
package/dist/core/Scaffold.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface ScaffoldProps<ExtraDrawerProps = object, ExtraAppbarProps = obj
|
|
|
9
9
|
/**
|
|
10
10
|
* Name of the app, displayed as the main title and in the tab title
|
|
11
11
|
*/
|
|
12
|
-
name:
|
|
12
|
+
name: React.ReactNode;
|
|
13
13
|
/**
|
|
14
14
|
* Logo to be displayed in the drawer of the CMS
|
|
15
15
|
*/
|
|
@@ -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;
|