@firecms/core 3.0.0-alpha.20 → 3.0.0-alpha.24
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/TextareaAutosize.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/core/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +7 -1
- package/dist/core/components/EntityCollectionTable/fields/TableReferenceField.d.ts +4 -2
- package/dist/core/components/EntityCollectionTable/useEntityCollectionTableController.d.ts +1 -1
- package/dist/core/components/VirtualTable/VirtualTableHeader.d.ts +1 -0
- package/dist/core/components/VirtualTable/VirtualTableHeaderRow.d.ts +1 -1
- package/dist/core/components/VirtualTable/VirtualTableProps.d.ts +12 -0
- package/dist/core/components/VirtualTable/types.d.ts +2 -0
- package/dist/core/form_field_configs.d.ts +1 -1
- package/dist/core/util/index.d.ts +1 -0
- package/dist/core/util/make_properties_editable.d.ts +3 -0
- package/dist/core/util/property_utils.d.ts +2 -1
- package/dist/index.es.js +8605 -8489
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +105 -105
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collections.d.ts +1 -0
- package/dist/types/firecms.d.ts +14 -5
- package/dist/types/firecms_context.d.ts +8 -0
- package/dist/types/plugins.d.ts +22 -0
- package/package.json +137 -136
- package/src/components/BooleanSwitch.tsx +1 -1
- package/src/components/BooleanSwitchWithLabel.tsx +2 -2
- package/src/components/CircularProgress.tsx +1 -1
- package/src/components/Select.tsx +0 -12
- package/src/components/TextField.tsx +5 -6
- package/src/components/TextareaAutosize.tsx +8 -4
- package/src/components/index.tsx +2 -0
- package/src/core/FireCMS.tsx +5 -3
- package/src/core/components/EntityCollectionTable/EntityCollectionTable.tsx +11 -3
- package/src/core/components/EntityCollectionTable/EntityCollectionTableProps.tsx +11 -1
- package/src/core/components/EntityCollectionTable/fields/TableReferenceField.tsx +25 -12
- package/src/core/components/EntityCollectionTable/internal/PropertyTableCell.tsx +4 -2
- package/src/core/components/EntityCollectionTable/useEntityCollectionTableController.tsx +1 -1
- package/src/core/components/EntityCollectionView/EntityCollectionView.tsx +55 -3
- package/src/core/components/VirtualTable/VirtualTable.tsx +19 -7
- package/src/core/components/VirtualTable/VirtualTableHeader.tsx +26 -24
- package/src/core/components/VirtualTable/VirtualTableHeaderRow.tsx +7 -2
- package/src/core/components/VirtualTable/VirtualTableProps.tsx +14 -0
- package/src/core/components/VirtualTable/VirtualTableRow.tsx +1 -1
- package/src/core/components/VirtualTable/types.tsx +2 -0
- package/src/core/util/index.ts +1 -0
- package/src/core/util/make_properties_editable.ts +28 -0
- package/src/core/util/property_utils.tsx +6 -1
- package/src/form/components/LabelWithIcon.tsx +2 -3
- package/src/form/field_bindings/TextFieldBinding.tsx +1 -2
- package/src/preview/components/ReferencePreview.tsx +23 -3
- package/src/types/collections.ts +2 -0
- package/src/types/firecms.tsx +18 -6
- package/src/types/firecms_context.tsx +9 -0
- package/src/types/plugins.tsx +24 -1
package/src/types/plugins.tsx
CHANGED
|
@@ -3,7 +3,6 @@ import React, { PropsWithChildren } from "react";
|
|
|
3
3
|
import { FireCMSContext } from "./firecms_context";
|
|
4
4
|
import { CollectionActionsProps, EntityCollection } from "./collections";
|
|
5
5
|
import { User } from "./user";
|
|
6
|
-
import { FieldConfigId } from "./field_config";
|
|
7
6
|
import { FieldProps, FormContext } from "./fields";
|
|
8
7
|
import { CMSType, Property } from "./properties";
|
|
9
8
|
import { EntityStatus } from "./entities";
|
|
@@ -105,6 +104,30 @@ export type FireCMSPlugin<PROPS = any, FORM_PROPS = any> = {
|
|
|
105
104
|
|
|
106
105
|
}
|
|
107
106
|
|
|
107
|
+
collectionView?: {
|
|
108
|
+
/**
|
|
109
|
+
* Use this method to inject widgets to the entity collections header
|
|
110
|
+
* @param props
|
|
111
|
+
*/
|
|
112
|
+
HeaderAction?: React.ComponentType<{
|
|
113
|
+
property: ResolvedProperty,
|
|
114
|
+
propertyKey: string,
|
|
115
|
+
onHover: boolean,
|
|
116
|
+
fullPath: string,
|
|
117
|
+
parentPathSegments: string[],
|
|
118
|
+
}>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* If you add this callback to your plugin, an add button will be added to the collection table.
|
|
122
|
+
* TODO: Only the first plugin that defines this callback will be used, at the moment.
|
|
123
|
+
*/
|
|
124
|
+
AddColumnComponent?: React.ComponentType<{
|
|
125
|
+
fullPath: string,
|
|
126
|
+
parentPathSegments: string[],
|
|
127
|
+
collection: EntityCollection;
|
|
128
|
+
}>;
|
|
129
|
+
}
|
|
130
|
+
|
|
108
131
|
}
|
|
109
132
|
|
|
110
133
|
/**
|