@firecms/collection_editor 3.0.0-alpha.20 → 3.0.0-alpha.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 (71) hide show
  1. package/package.json +4 -4
  2. package/src/components/MissingReferenceWidget.tsx +32 -0
  3. package/src/components/collection_editor/CollectionPropertiesEditorForm.tsx +1 -11
  4. package/src/index.ts +2 -0
  5. package/src/useCollectionEditorController.tsx +1 -1
  6. package/dist/ConfigControllerProvider.d.ts +0 -36
  7. package/dist/components/EditorCollectionAction.d.ts +0 -2
  8. package/dist/components/HomePageEditorCollectionAction.d.ts +0 -2
  9. package/dist/components/NewCollectionCard.d.ts +0 -2
  10. package/dist/components/RootCollectionSuggestions.d.ts +0 -1
  11. package/dist/components/collection_editor/CollectionDetailsForm.d.ts +0 -9
  12. package/dist/components/collection_editor/CollectionEditorDialog.d.ts +0 -37
  13. package/dist/components/collection_editor/CollectionEditorWelcomeView.d.ts +0 -15
  14. package/dist/components/collection_editor/CollectionPropertiesEditorForm.d.ts +0 -19
  15. package/dist/components/collection_editor/CollectionYupValidation.d.ts +0 -11
  16. package/dist/components/collection_editor/EntityCustomViewsSelectDialog.d.ts +0 -4
  17. package/dist/components/collection_editor/EnumForm.d.ts +0 -13
  18. package/dist/components/collection_editor/PropertyEditView.d.ts +0 -39
  19. package/dist/components/collection_editor/PropertyFieldPreview.d.ts +0 -15
  20. package/dist/components/collection_editor/PropertySelectItem.d.ts +0 -8
  21. package/dist/components/collection_editor/PropertyTree.d.ts +0 -30
  22. package/dist/components/collection_editor/SelectIcons.d.ts +0 -6
  23. package/dist/components/collection_editor/SubcollectionsEditTab.d.ts +0 -12
  24. package/dist/components/collection_editor/UnsavedChangesDialog.d.ts +0 -9
  25. package/dist/components/collection_editor/import/CollectionEditorImportDataPreview.d.ts +0 -7
  26. package/dist/components/collection_editor/import/CollectionEditorImportMapping.d.ts +0 -6
  27. package/dist/components/collection_editor/import/clean_import_data.d.ts +0 -7
  28. package/dist/components/collection_editor/properties/BlockPropertyField.d.ts +0 -7
  29. package/dist/components/collection_editor/properties/BooleanPropertyField.d.ts +0 -3
  30. package/dist/components/collection_editor/properties/CommonPropertyFields.d.ts +0 -10
  31. package/dist/components/collection_editor/properties/DateTimePropertyField.d.ts +0 -3
  32. package/dist/components/collection_editor/properties/EnumPropertyField.d.ts +0 -8
  33. package/dist/components/collection_editor/properties/FieldHelperView.d.ts +0 -4
  34. package/dist/components/collection_editor/properties/KeyValuePropertyField.d.ts +0 -3
  35. package/dist/components/collection_editor/properties/MapPropertyField.d.ts +0 -7
  36. package/dist/components/collection_editor/properties/NumberPropertyField.d.ts +0 -3
  37. package/dist/components/collection_editor/properties/ReferencePropertyField.d.ts +0 -13
  38. package/dist/components/collection_editor/properties/RepeatPropertyField.d.ts +0 -9
  39. package/dist/components/collection_editor/properties/StoragePropertyField.d.ts +0 -5
  40. package/dist/components/collection_editor/properties/StringPropertyField.d.ts +0 -5
  41. package/dist/components/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +0 -3
  42. package/dist/components/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +0 -5
  43. package/dist/components/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +0 -4
  44. package/dist/components/collection_editor/properties/validation/NumberPropertyValidation.d.ts +0 -3
  45. package/dist/components/collection_editor/properties/validation/StringPropertyValidation.d.ts +0 -11
  46. package/dist/components/collection_editor/properties/validation/ValidationPanel.d.ts +0 -2
  47. package/dist/components/collection_editor/templates/blog_template.d.ts +0 -10
  48. package/dist/components/collection_editor/templates/products_template.d.ts +0 -12
  49. package/dist/components/collection_editor/templates/users_template.d.ts +0 -7
  50. package/dist/components/collection_editor/util.d.ts +0 -4
  51. package/dist/components/collection_editor/utils/supported_fields.d.ts +0 -3
  52. package/dist/components/collection_editor/utils/update_property_for_widget.d.ts +0 -2
  53. package/dist/components/collection_editor/utils/useTraceUpdate.d.ts +0 -1
  54. package/dist/index.d.ts +0 -9
  55. package/dist/index.es.js +0 -6579
  56. package/dist/index.es.js.map +0 -1
  57. package/dist/index.umd.js +0 -2
  58. package/dist/index.umd.js.map +0 -1
  59. package/dist/types/collection_editor_controller.d.ts +0 -25
  60. package/dist/types/collection_inference.d.ts +0 -2
  61. package/dist/types/config_controller.d.ts +0 -24
  62. package/dist/types/config_permissions.d.ts +0 -19
  63. package/dist/types/persisted_collection.d.ts +0 -5
  64. package/dist/useCollectionEditorController.d.ts +0 -6
  65. package/dist/useCollectionEditorPlugin.d.ts +0 -44
  66. package/dist/useCollectionsConfigController.d.ts +0 -6
  67. package/dist/utils/arrays.d.ts +0 -1
  68. package/dist/utils/entities.d.ts +0 -3
  69. package/dist/utils/icons.d.ts +0 -1
  70. package/dist/utils/join_collections.d.ts +0 -14
  71. package/dist/utils/synonyms.d.ts +0 -1951
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firecms/collection_editor",
3
- "version": "3.0.0-alpha.20",
3
+ "version": "3.0.0-alpha.21",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,8 +14,8 @@
14
14
  "./package.json": "./package.json"
15
15
  },
16
16
  "dependencies": {
17
- "@firecms/data_import": "^3.0.0-alpha.20",
18
- "@firecms/schema_inference": "^3.0.0-alpha.20"
17
+ "@firecms/data_import": "^3.0.0-alpha.21",
18
+ "@firecms/schema_inference": "^3.0.0-alpha.21"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": "^18.2.0",
@@ -75,5 +75,5 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "7b74c47b5ea9f490bd0ba3d2b479108484a19411"
78
+ "gitHead": "4a18047fa8fd4ddaa157ec2d415fcab89cf34d65"
79
79
  }
@@ -0,0 +1,32 @@
1
+ import { Button, ErrorView, unslugify } from "@firecms/core";
2
+ import { useCollectionEditorController } from "../useCollectionEditorController";
3
+
4
+ export function MissingReferenceWidget({ path: pathProp }: {
5
+ path: string
6
+ }) {
7
+ const path = getLastSegment(pathProp);
8
+ const parentPathSegments = getParentPathSegments(pathProp);
9
+ const collectionEditor = useCollectionEditorController();
10
+ return <div className={"p-1 flex flex-col items-center"}>
11
+ <ErrorView error={"No collection for path: " + path}/>
12
+ <Button className={"mx-2"} variant={"outlined"} size={"small"}
13
+ onClick={() => {
14
+ collectionEditor.createCollection({
15
+ initialValues: { path, name: unslugify(path) },
16
+ parentPathSegments
17
+ });
18
+ }}>
19
+ Create
20
+ </Button>
21
+ </div>;
22
+ }
23
+
24
+ function getParentPathSegments(path: string): string[] {
25
+ const segments = path.split("/");
26
+ return segments.filter((segment, index) => index % 2 === 0 && index !== segments.length - 1);
27
+ }
28
+
29
+ function getLastSegment(path: string): string {
30
+ const segments = path.split("/");
31
+ return segments[segments.length - 1];
32
+ }
@@ -13,6 +13,7 @@ import {
13
13
  ErrorBoundary,
14
14
  FieldConfig,
15
15
  isPropertyBuilder,
16
+ makePropertiesEditable,
16
17
  Paper,
17
18
  Properties,
18
19
  Property,
@@ -105,7 +106,6 @@ export function CollectionPropertiesEditorForm({
105
106
 
106
107
  if (newCollection)
107
108
  makePropertiesEditable(newCollection.properties as Properties);
108
- console.log("newCollection", newCollection);
109
109
 
110
110
  if (!newCollection) {
111
111
  snackbarController.open({
@@ -455,13 +455,3 @@ export function CollectionPropertiesEditorForm({
455
455
  </>
456
456
  );
457
457
  }
458
-
459
- function makePropertiesEditable(properties: Properties) {
460
- Object.keys(properties).forEach((key) => {
461
- const property = properties[key];
462
- property.editable = true;
463
- if (property.dataType === "map" && property.properties) {
464
- makePropertiesEditable(property.properties as Properties);
465
- }
466
- });
467
- }
package/src/index.ts CHANGED
@@ -29,3 +29,5 @@ export type {
29
29
  export type {
30
30
  CollectionInference
31
31
  } from "./types/collection_inference";
32
+
33
+ export { MissingReferenceWidget } from "./components/MissingReferenceWidget";
@@ -1,4 +1,4 @@
1
- import React, { useContext } from "react";
1
+ import { useContext } from "react";
2
2
  import { CollectionEditorController } from "./types/collection_editor_controller";
3
3
  import { CollectionEditorContext } from "./ConfigControllerProvider";
4
4
 
@@ -1,36 +0,0 @@
1
- import React from "react";
2
- import { CollectionsConfigController } from "./types/config_controller";
3
- import { User } from "@firecms/core";
4
- import { CollectionEditorController } from "./types/collection_editor_controller";
5
- import { CollectionEditorPermissionsBuilder } from "./types/config_permissions";
6
- import { CollectionInference } from "./types/collection_inference";
7
- export declare const ConfigControllerContext: React.Context<CollectionsConfigController>;
8
- export declare const CollectionEditorContext: React.Context<CollectionEditorController>;
9
- export interface ConfigControllerProviderProps {
10
- /**
11
- * Controller for managing the collections' config.
12
- */
13
- collectionConfigController: CollectionsConfigController;
14
- /**
15
- * Callback used to infer the schema from the data.
16
- */
17
- collectionInference?: CollectionInference;
18
- /**
19
- * Use this builder to define the permissions for the configuration per user.
20
- */
21
- configPermissions?: CollectionEditorPermissionsBuilder;
22
- /**
23
- * Groups that cannot be used to create new collections.
24
- */
25
- reservedGroups?: string[];
26
- extraView?: {
27
- View: React.ComponentType<{
28
- path: string;
29
- }>;
30
- icon: React.ReactNode;
31
- };
32
- pathSuggestions?: (path?: string) => Promise<string[]>;
33
- getUser: (uid: string) => User | null;
34
- getData?: (path: string) => Promise<object[]>;
35
- }
36
- export declare const ConfigControllerProvider: React.NamedExoticComponent<React.PropsWithChildren<ConfigControllerProviderProps>>;
@@ -1,2 +0,0 @@
1
- import { CollectionActionsProps } from "@firecms/core";
2
- export declare function EditorCollectionAction({ path: fullPath, parentPathSegments, collection, tableController }: CollectionActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { PluginHomePageActionsProps } from "@firecms/core";
2
- export declare function HomePageEditorCollectionAction({ path, collection }: PluginHomePageActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { PluginHomePageAdditionalCardsProps } from "@firecms/core";
2
- export declare function NewCollectionCard({ group, context }: PluginHomePageAdditionalCardsProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function RootCollectionSuggestions(): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { EntityCollection } from "@firecms/core";
2
- export declare function CollectionDetailsForm({ isNewCollection, reservedGroups, existingPaths, existingAliases, groups, parentCollection }: {
3
- isNewCollection: boolean;
4
- reservedGroups?: string[];
5
- existingPaths?: string[];
6
- existingAliases?: string[];
7
- groups: string[] | null;
8
- parentCollection?: EntityCollection;
9
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,37 +0,0 @@
1
- import * as React from "react";
2
- import { CMSType, EntityCollection, User } from "@firecms/core";
3
- import { CollectionsConfigController } from "../../types/config_controller";
4
- import { CollectionInference } from "../../types/collection_inference";
5
- export interface CollectionEditorDialogProps {
6
- open: boolean;
7
- isNewCollection: boolean;
8
- initialValues?: {
9
- group?: string;
10
- path?: string;
11
- name?: string;
12
- };
13
- editedCollectionPath?: string;
14
- fullPath?: string;
15
- parentPathSegments?: string[];
16
- handleClose: (collection?: EntityCollection) => void;
17
- configController: CollectionsConfigController;
18
- reservedGroups?: string[];
19
- collectionInference?: CollectionInference;
20
- extraView?: {
21
- View: React.ComponentType<{
22
- path: string;
23
- }>;
24
- icon: React.ReactNode;
25
- };
26
- pathSuggestions?: (path?: string) => Promise<string[]>;
27
- getUser: (uid: string) => User | null;
28
- getData?: (path: string) => Promise<object[]>;
29
- parentCollection?: EntityCollection;
30
- }
31
- export declare function CollectionEditorDialog(props: CollectionEditorDialogProps): import("react/jsx-runtime").JSX.Element;
32
- export declare function CollectionEditorDialogInternal<M extends {
33
- [Key: string]: CMSType;
34
- }>({ isNewCollection, initialValues: initialValuesProp, configController, editedCollectionPath, parentPathSegments, fullPath, collectionInference, handleClose, reservedGroups, extraView, handleCancel, setFormDirty, pathSuggestions, getUser, parentCollection, getData }: CollectionEditorDialogProps & {
35
- handleCancel: () => void;
36
- setFormDirty: (dirty: boolean) => void;
37
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import { EntityCollection } from "@firecms/core";
3
- export declare function CollectionEditorWelcomeView({ path, pathSuggestions, parentCollection, onContinue, collections }: {
4
- path: string;
5
- pathSuggestions?: (path: string) => Promise<string[]>;
6
- parentCollection?: EntityCollection;
7
- onContinue: (importData?: object[]) => void;
8
- collections?: EntityCollection[];
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export declare function TemplateButton({ title, subtitle, icon, onClick }: {
11
- title: string;
12
- icon: React.ReactNode;
13
- subtitle: string;
14
- onClick?: () => void;
15
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- import { FormikErrors } from "formik";
3
- import { EntityCollection, FieldConfig, User } from "@firecms/core";
4
- import { PersistedCollection } from "../../types/persisted_collection";
5
- type CollectionEditorFormProps = {
6
- showErrors: boolean;
7
- isNewCollection: boolean;
8
- propertyErrorsRef?: React.MutableRefObject<any>;
9
- onPropertyError: (propertyKey: string, namespace: string | undefined, error?: FormikErrors<any>) => void;
10
- setDirty?: (dirty: boolean) => void;
11
- reservedGroups?: string[];
12
- extraIcon: React.ReactNode;
13
- getUser: (uid: string) => User | null;
14
- getData?: () => Promise<object[]>;
15
- doCollectionInference: (collection: PersistedCollection<any, string>) => Promise<EntityCollection | null> | undefined;
16
- customFields: Record<string, FieldConfig>;
17
- };
18
- export declare function CollectionPropertiesEditorForm({ showErrors, isNewCollection, propertyErrorsRef, onPropertyError, setDirty, reservedGroups, extraIcon, getUser, getData, doCollectionInference, customFields }: CollectionEditorFormProps): import("react/jsx-runtime").JSX.Element;
19
- export {};
@@ -1,11 +0,0 @@
1
- import * as Yup from "yup";
2
- export declare const YupSchema: Yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
- name: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
- path: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
5
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
6
- name: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
7
- path: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
9
- name: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
10
- path: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
- }>>>;
@@ -1,4 +0,0 @@
1
- export declare function EntityCustomViewsSelectDialog({ open, onClose }: {
2
- open: boolean;
3
- onClose: (selectedViewKey?: string) => void;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- import { EnumValueConfig } from "@firecms/core";
3
- type EnumFormProps = {
4
- enumValues: EnumValueConfig[];
5
- onValuesChanged?: (enumValues: EnumValueConfig[]) => void;
6
- onError?: (error: boolean) => void;
7
- updateIds: boolean;
8
- disabled: boolean;
9
- allowDataInference?: boolean;
10
- getData?: () => Promise<string[]>;
11
- };
12
- export declare const EnumForm: React.NamedExoticComponent<EnumFormProps>;
13
- export {};
@@ -1,39 +0,0 @@
1
- import React from "react";
2
- import { FormikErrors, FormikProps } from "formik";
3
- import { FieldConfig, Property } from "@firecms/core";
4
- export type PropertyWithId = Property & {
5
- id?: string;
6
- };
7
- export type OnPropertyChangedParams = {
8
- id?: string;
9
- property: Property;
10
- namespace?: string;
11
- previousId?: string;
12
- };
13
- export type PropertyFormProps = {
14
- includeIdAndName?: boolean;
15
- existing: boolean;
16
- autoUpdateId?: boolean;
17
- autoOpenTypeSelect: boolean;
18
- inArray: boolean;
19
- propertyKey?: string;
20
- propertyNamespace?: string;
21
- property?: Property;
22
- onPropertyChanged?: (params: OnPropertyChangedParams) => void;
23
- onPropertyChangedImmediate?: boolean;
24
- onDelete?: (id?: string, namespace?: string) => void;
25
- onError?: (id: string, namespace?: string, error?: FormikErrors<any>) => void;
26
- initialErrors?: FormikErrors<any>;
27
- forceShowErrors?: boolean;
28
- existingPropertyKeys?: string[];
29
- allowDataInference: boolean;
30
- getData?: () => Promise<object[]>;
31
- getHelpers?: (formikProps: FormikProps<PropertyWithId>) => void;
32
- customFields: Record<string, FieldConfig>;
33
- };
34
- export declare const PropertyForm: React.NamedExoticComponent<PropertyFormProps>;
35
- export declare function PropertyFormDialog({ open, onCancel, onOkClicked, onPropertyChanged, getData, ...formProps }: PropertyFormProps & {
36
- open?: boolean;
37
- onOkClicked?: () => void;
38
- onCancel?: () => void;
39
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { Property, PropertyOrBuilder } from "@firecms/core";
2
- export declare function PropertyFieldPreview({ property, onClick, hasError, includeName, includeEditButton, selected }: {
3
- property: Property;
4
- hasError?: boolean;
5
- selected?: boolean;
6
- includeName?: boolean;
7
- includeEditButton?: boolean;
8
- onClick?: () => void;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export declare function NonEditablePropertyPreview({ name, selected, onClick, property }: {
11
- name: string;
12
- selected: boolean;
13
- onClick?: () => void;
14
- property?: PropertyOrBuilder;
15
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { FieldConfig } from "@firecms/core";
2
- export interface PropertySelectItemProps {
3
- value: string;
4
- optionDisabled: boolean;
5
- fieldConfig: FieldConfig;
6
- existing: boolean;
7
- }
8
- export declare function PropertySelectItem({ value, optionDisabled, fieldConfig, existing }: PropertySelectItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,30 +0,0 @@
1
- import { AdditionalFieldDelegate, CMSType, PropertiesOrBuilders, PropertyOrBuilder } from "@firecms/core";
2
- import { DraggableProvided } from "@hello-pangea/dnd";
3
- export declare function PropertyTree<M extends {
4
- [Key: string]: CMSType;
5
- }>({ namespace, selectedPropertyKey, onPropertyClick, properties, propertiesOrder: propertiesOrderProp, additionalFields, errors, onPropertyMove, onPropertyRemove, className, inferredPropertyKeys }: {
6
- namespace?: string;
7
- selectedPropertyKey?: string;
8
- onPropertyClick?: (propertyKey: string, namespace?: string) => void;
9
- properties: PropertiesOrBuilders<M>;
10
- propertiesOrder?: string[];
11
- additionalFields?: AdditionalFieldDelegate<M>[];
12
- errors: Record<string, any>;
13
- onPropertyMove?: (propertiesOrder: string[], namespace?: string) => void;
14
- onPropertyRemove?: (propertyKey: string, namespace?: string) => void;
15
- className?: string;
16
- inferredPropertyKeys?: string[];
17
- }): import("react/jsx-runtime").JSX.Element;
18
- export declare function PropertyTreeEntry({ propertyKey, namespace, propertyOrBuilder, additionalField, provided, selectedPropertyKey, errors, onPropertyClick, onPropertyMove, onPropertyRemove, inferredPropertyKeys }: {
19
- propertyKey: string;
20
- namespace?: string;
21
- propertyOrBuilder: PropertyOrBuilder;
22
- additionalField?: AdditionalFieldDelegate<any>;
23
- selectedPropertyKey?: string;
24
- provided: DraggableProvided;
25
- errors: Record<string, any>;
26
- onPropertyClick?: (propertyKey: string, namespace?: string) => void;
27
- onPropertyMove?: (propertiesOrder: string[], namespace?: string) => void;
28
- onPropertyRemove?: (propertyKey: string, namespace?: string) => void;
29
- inferredPropertyKeys?: string[];
30
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- interface SearchIconsProps {
2
- selectedIcon?: string;
3
- onIconSelected: (icon: string) => void;
4
- }
5
- export declare function SearchIcons({ selectedIcon, onIconSelected }: SearchIconsProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,12 +0,0 @@
1
- import { EntityCollection, User } from "@firecms/core";
2
- import { CollectionsConfigController } from "../../types/config_controller";
3
- import { PersistedCollection } from "../../types/persisted_collection";
4
- import { CollectionInference } from "../../types/collection_inference";
5
- export declare function SubcollectionsEditTab({ collection, parentCollection, configController, collectionInference, getUser, parentPathSegments }: {
6
- collection: PersistedCollection;
7
- parentCollection?: EntityCollection;
8
- configController: CollectionsConfigController;
9
- collectionInference?: CollectionInference;
10
- getUser: (uid: string) => User | null;
11
- parentPathSegments?: string[];
12
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- export interface UnsavedChangesDialogProps {
3
- open: boolean;
4
- body?: React.ReactNode;
5
- title?: string;
6
- handleOk: () => void;
7
- handleCancel: () => void;
8
- }
9
- export declare function UnsavedChangesDialog({ open, handleOk, handleCancel, body, title }: UnsavedChangesDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { ImportConfig } from "@firecms/data_import";
2
- import { Properties } from "@firecms/core";
3
- export declare function CollectionEditorImportDataPreview({ importConfig, properties, propertiesOrder }: {
4
- importConfig: ImportConfig;
5
- properties: Properties;
6
- propertiesOrder: string[];
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { ImportConfig } from "@firecms/data_import";
2
- import { FieldConfig } from "@firecms/core";
3
- export declare function CollectionEditorImportMapping({ importConfig, customFields }: {
4
- importConfig: ImportConfig;
5
- customFields: Record<string, FieldConfig>;
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { Properties } from "@firecms/core";
2
- import { ImportConfig } from "@firecms/data_import";
3
- export declare function cleanPropertiesFromImport(properties: Properties, parentSlug?: string): {
4
- headersMapping: ImportConfig["headersMapping"];
5
- properties: Properties;
6
- idColumn?: ImportConfig["idColumn"];
7
- };
@@ -1,7 +0,0 @@
1
- import { FieldConfig } from "@firecms/core";
2
- export declare function BlockPropertyField({ disabled, getData, allowDataInference, customFields }: {
3
- disabled: boolean;
4
- getData?: () => Promise<object[]>;
5
- allowDataInference: boolean;
6
- customFields: Record<string, FieldConfig>;
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare function BooleanPropertyField({ disabled }: {
2
- disabled: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- type CommonPropertyFieldsProps = {
3
- showErrors: boolean;
4
- disabledId: boolean;
5
- existingPropertyKeys?: string[];
6
- disabled: boolean;
7
- isNewProperty: boolean;
8
- };
9
- export declare const CommonPropertyFields: React.ForwardRefExoticComponent<CommonPropertyFieldsProps & React.RefAttributes<HTMLDivElement>>;
10
- export {};
@@ -1,3 +0,0 @@
1
- export declare function DateTimePropertyField({ disabled }: {
2
- disabled: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- export declare function EnumPropertyField({ multiselect, updateIds, disabled, showErrors, allowDataInference, getData }: {
2
- multiselect: boolean;
3
- updateIds: boolean;
4
- disabled: boolean;
5
- showErrors: boolean;
6
- allowDataInference?: boolean;
7
- getData?: () => Promise<object[]>;
8
- }): import("react/jsx-runtime").JSX.Element;
@@ -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,3 +0,0 @@
1
- export declare function KeyValuePropertyField({ disabled }: {
2
- disabled: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { FieldConfig } from "@firecms/core";
2
- export declare function MapPropertyField({ disabled, getData, allowDataInference, customFields }: {
3
- disabled: boolean;
4
- getData?: () => Promise<object[]>;
5
- allowDataInference: boolean;
6
- customFields: Record<string, FieldConfig>;
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare function NumberPropertyField({ disabled }: {
2
- disabled: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- export declare function ReferencePropertyField({ existing, multiple, disabled, showErrors }: {
2
- existing: boolean;
3
- multiple: boolean;
4
- disabled: boolean;
5
- showErrors: boolean;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- export declare function CollectionsSelect({ disabled, pathPath, value, handleChange, error, ...props }: {
8
- disabled: boolean;
9
- pathPath: string;
10
- value?: string;
11
- handleChange: (event: any) => void;
12
- error?: string;
13
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { FieldConfig } from "@firecms/core";
2
- export declare function RepeatPropertyField({ showErrors, existing, disabled, getData, allowDataInference, customFields }: {
3
- showErrors: boolean;
4
- existing: boolean;
5
- disabled: boolean;
6
- getData?: () => Promise<object[]>;
7
- allowDataInference: boolean;
8
- customFields: Record<string, FieldConfig>;
9
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- export declare function StoragePropertyField({ multiple, existing, disabled }: {
2
- multiple: boolean;
3
- existing: boolean;
4
- disabled: boolean;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- export declare function StringPropertyField({ widgetId, disabled, showErrors }: {
2
- widgetId: "text_field" | "multiline" | "markdown" | "url" | "email";
3
- disabled: boolean;
4
- showErrors: boolean;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare function AdvancedPropertyValidation({ disabled }: {
2
- disabled: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- export declare function ArrayPropertyValidation({ max, min, disabled }: {
2
- min?: boolean;
3
- max?: boolean;
4
- disabled: boolean;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function GeneralPropertyValidation({ disabled }: {
2
- required?: boolean;
3
- disabled: boolean;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare function NumberPropertyValidation({ disabled }: {
2
- disabled: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- export declare function StringPropertyValidation({ length, lowercase, matches, max, min, trim, uppercase, disabled, showErrors }: {
2
- length?: boolean;
3
- min?: boolean;
4
- max?: boolean;
5
- trim?: boolean;
6
- matches?: boolean;
7
- lowercase?: boolean;
8
- uppercase?: boolean;
9
- disabled: boolean;
10
- showErrors: boolean;
11
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { PropsWithChildren } from "react";
2
- export declare function ValidationPanel({ children }: PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- export declare const blogCollectionTemplate: import("@firecms/core").EntityCollection<{
2
- name: string;
3
- header_image: string;
4
- content: any[];
5
- created_on: unknown;
6
- status: unknown;
7
- publish_date: unknown;
8
- reviewed: unknown;
9
- tags: unknown;
10
- }, string, import("@firecms/core").User>;
@@ -1,12 +0,0 @@
1
- export declare const productsCollectionTemplate: import("@firecms/core").EntityCollection<{
2
- name: unknown;
3
- brand: unknown;
4
- description: unknown;
5
- main_image: unknown;
6
- available: unknown;
7
- price: unknown;
8
- images: unknown;
9
- related_products: unknown;
10
- metadata: unknown;
11
- added_on: unknown;
12
- }, string, import("@firecms/core").User>;
@@ -1,7 +0,0 @@
1
- export declare const usersCollectionTemplate: import("@firecms/core").EntityCollection<{
2
- displayName: unknown;
3
- email: unknown;
4
- emailVerified: unknown;
5
- phone: unknown;
6
- photoURL: unknown;
7
- }, string, import("@firecms/core").User>;
@@ -1,4 +0,0 @@
1
- export declare function idToPropertiesPath(id: string): string;
2
- export declare function namespaceToPropertiesPath(namespace?: string): string;
3
- export declare function namespaceToPropertiesOrderPath(namespace?: string): string;
4
- export declare function getFullId(propertyKey: string, propertyNamespace?: string): string;
@@ -1,3 +0,0 @@
1
- import { FieldConfigId } from "@firecms/core";
2
- export declare const supportedFieldsIds: FieldConfigId[];
3
- export declare const supportedFields: [string, import("@firecms/core").FieldConfig<any>][];