@firecms/collection_editor 3.0.0-canary.2 → 3.0.0-canary.21

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 (28) hide show
  1. package/dist/index.es.js +390 -397
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.umd.js +2 -2
  4. package/dist/index.umd.js.map +1 -1
  5. package/dist/types/persisted_collection.d.ts +1 -1
  6. package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +1 -1
  7. package/dist/ui/collection_editor/utils/supported_fields.d.ts +2 -2
  8. package/package.json +18 -18
  9. package/src/ConfigControllerProvider.tsx +1 -1
  10. package/src/types/persisted_collection.ts +1 -1
  11. package/src/ui/MissingReferenceWidget.tsx +2 -1
  12. package/src/ui/NewCollectionButton.tsx +12 -10
  13. package/src/ui/collection_editor/CollectionDetailsForm.tsx +17 -18
  14. package/src/ui/collection_editor/CollectionEditorDialog.tsx +13 -9
  15. package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +1 -1
  16. package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +1 -1
  17. package/src/ui/collection_editor/EnumForm.tsx +3 -4
  18. package/src/ui/collection_editor/PropertyEditView.tsx +4 -4
  19. package/src/ui/collection_editor/import/CollectionEditorImportMapping.tsx +1 -1
  20. package/src/ui/collection_editor/properties/CommonPropertyFields.tsx +7 -8
  21. package/src/ui/collection_editor/properties/DateTimePropertyField.tsx +7 -8
  22. package/src/ui/collection_editor/properties/MapPropertyField.tsx +3 -4
  23. package/src/ui/collection_editor/properties/ReferencePropertyField.tsx +3 -4
  24. package/src/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +3 -4
  25. package/src/ui/collection_editor/utils/supported_fields.tsx +3 -3
  26. package/src/useCollectionEditorPlugin.tsx +2 -4
  27. package/dist/ui/collection_editor/properties/FieldHelperView.d.ts +0 -4
  28. package/src/ui/collection_editor/properties/FieldHelperView.tsx +0 -13
@@ -1,6 +1,6 @@
1
- import { DEFAULT_FIELD_CONFIGS, FieldConfigId, PropertyConfig } from "@firecms/core";
1
+ import { DEFAULT_FIELD_CONFIGS, PropertyConfigId, PropertyConfig } from "@firecms/core";
2
2
 
3
- export const supportedFieldsIds: FieldConfigId[] = [
3
+ export const supportedFieldsIds: PropertyConfigId[] = [
4
4
  "text_field",
5
5
  "multiline",
6
6
  "markdown",
@@ -24,6 +24,6 @@ export const supportedFieldsIds: FieldConfigId[] = [
24
24
  ];
25
25
 
26
26
  export const supportedFields: Record<string, PropertyConfig> = Object.entries(DEFAULT_FIELD_CONFIGS)
27
- .filter(([id]) => supportedFieldsIds.includes(id as FieldConfigId))
27
+ .filter(([id]) => supportedFieldsIds.includes(id as PropertyConfigId))
28
28
  .map(([id, config]) => ({ [id]: config }))
29
29
  .reduce((a, b) => ({ ...a, ...b }), {});
@@ -81,11 +81,8 @@ export function useCollectionEditorPlugin<EC extends PersistedCollection = Persi
81
81
  }: CollectionConfigControllerProps<EC, UserType>): FireCMSPlugin<any, any, PersistedCollection> {
82
82
 
83
83
  return {
84
- name: "Collection Editor",
84
+ key: "collection_editor",
85
85
  loading: collectionConfigController.loading,
86
- collections: {
87
- CollectionActions: EditorCollectionAction
88
- },
89
86
  provider: {
90
87
  Component: ConfigControllerProvider,
91
88
  props: {
@@ -108,6 +105,7 @@ export function useCollectionEditorPlugin<EC extends PersistedCollection = Persi
108
105
  AdditionalCards: introMode ? undefined : NewCollectionCard,
109
106
  },
110
107
  collectionView: {
108
+ CollectionActions: EditorCollectionAction,
111
109
  HeaderAction: CollectionViewHeaderAction,
112
110
  AddColumnComponent: PropertyAddColumnComponent
113
111
  }
@@ -1,4 +0,0 @@
1
- export declare function FieldHelperView({ error, children }: {
2
- error?: boolean;
3
- children?: React.ReactNode;
4
- }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,13 +0,0 @@
1
- import { Typography } from "@firecms/ui";
2
-
3
- export function FieldHelperView({
4
- error,
5
- children
6
- }: { error?: boolean, children?: React.ReactNode }) {
7
- if (!children) return null;
8
- return (
9
- <Typography variant={"caption"} color={error ? "error" : "secondary"} className={"ml-3.5 mt-0.5"}>
10
- {children}
11
- </Typography>
12
- );
13
- }