@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.
Files changed (52) hide show
  1. package/dist/components/TextareaAutosize.d.ts +2 -0
  2. package/dist/components/index.d.ts +2 -0
  3. package/dist/core/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +7 -1
  4. package/dist/core/components/EntityCollectionTable/fields/TableReferenceField.d.ts +4 -2
  5. package/dist/core/components/EntityCollectionTable/useEntityCollectionTableController.d.ts +1 -1
  6. package/dist/core/components/VirtualTable/VirtualTableHeader.d.ts +1 -0
  7. package/dist/core/components/VirtualTable/VirtualTableHeaderRow.d.ts +1 -1
  8. package/dist/core/components/VirtualTable/VirtualTableProps.d.ts +12 -0
  9. package/dist/core/components/VirtualTable/types.d.ts +2 -0
  10. package/dist/core/form_field_configs.d.ts +1 -1
  11. package/dist/core/util/index.d.ts +1 -0
  12. package/dist/core/util/make_properties_editable.d.ts +3 -0
  13. package/dist/core/util/property_utils.d.ts +2 -1
  14. package/dist/index.es.js +8605 -8489
  15. package/dist/index.es.js.map +1 -1
  16. package/dist/index.umd.js +105 -105
  17. package/dist/index.umd.js.map +1 -1
  18. package/dist/types/collections.d.ts +1 -0
  19. package/dist/types/firecms.d.ts +14 -5
  20. package/dist/types/firecms_context.d.ts +8 -0
  21. package/dist/types/plugins.d.ts +22 -0
  22. package/package.json +137 -136
  23. package/src/components/BooleanSwitch.tsx +1 -1
  24. package/src/components/BooleanSwitchWithLabel.tsx +2 -2
  25. package/src/components/CircularProgress.tsx +1 -1
  26. package/src/components/Select.tsx +0 -12
  27. package/src/components/TextField.tsx +5 -6
  28. package/src/components/TextareaAutosize.tsx +8 -4
  29. package/src/components/index.tsx +2 -0
  30. package/src/core/FireCMS.tsx +5 -3
  31. package/src/core/components/EntityCollectionTable/EntityCollectionTable.tsx +11 -3
  32. package/src/core/components/EntityCollectionTable/EntityCollectionTableProps.tsx +11 -1
  33. package/src/core/components/EntityCollectionTable/fields/TableReferenceField.tsx +25 -12
  34. package/src/core/components/EntityCollectionTable/internal/PropertyTableCell.tsx +4 -2
  35. package/src/core/components/EntityCollectionTable/useEntityCollectionTableController.tsx +1 -1
  36. package/src/core/components/EntityCollectionView/EntityCollectionView.tsx +55 -3
  37. package/src/core/components/VirtualTable/VirtualTable.tsx +19 -7
  38. package/src/core/components/VirtualTable/VirtualTableHeader.tsx +26 -24
  39. package/src/core/components/VirtualTable/VirtualTableHeaderRow.tsx +7 -2
  40. package/src/core/components/VirtualTable/VirtualTableProps.tsx +14 -0
  41. package/src/core/components/VirtualTable/VirtualTableRow.tsx +1 -1
  42. package/src/core/components/VirtualTable/types.tsx +2 -0
  43. package/src/core/util/index.ts +1 -0
  44. package/src/core/util/make_properties_editable.ts +28 -0
  45. package/src/core/util/property_utils.tsx +6 -1
  46. package/src/form/components/LabelWithIcon.tsx +2 -3
  47. package/src/form/field_bindings/TextFieldBinding.tsx +1 -2
  48. package/src/preview/components/ReferencePreview.tsx +23 -3
  49. package/src/types/collections.ts +2 -0
  50. package/src/types/firecms.tsx +18 -6
  51. package/src/types/firecms_context.tsx +9 -0
  52. package/src/types/plugins.tsx +24 -1
@@ -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
  /**