@rebasepro/types 0.0.1-canary.0 → 0.0.1-canary.0e2f892

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 (104) hide show
  1. package/README.md +1 -1
  2. package/dist/controllers/analytics_controller.d.ts +2 -2
  3. package/dist/controllers/auth.d.ts +52 -6
  4. package/dist/controllers/client.d.ts +170 -0
  5. package/dist/controllers/collection_registry.d.ts +45 -0
  6. package/dist/controllers/customization_controller.d.ts +11 -1
  7. package/dist/controllers/data.d.ts +168 -0
  8. package/dist/controllers/data_driver.d.ts +160 -0
  9. package/dist/controllers/database_admin.d.ts +11 -0
  10. package/dist/controllers/effective_role.d.ts +4 -0
  11. package/dist/controllers/email.d.ts +34 -0
  12. package/dist/controllers/index.d.ts +12 -5
  13. package/dist/controllers/local_config_persistence.d.ts +4 -4
  14. package/dist/controllers/navigation.d.ts +12 -61
  15. package/dist/controllers/registry.d.ts +54 -0
  16. package/dist/controllers/side_entity_controller.d.ts +7 -7
  17. package/dist/controllers/storage.d.ts +24 -26
  18. package/dist/index.d.ts +0 -1
  19. package/dist/index.es.js +119 -14
  20. package/dist/index.es.js.map +1 -1
  21. package/dist/index.umd.js +118 -13
  22. package/dist/index.umd.js.map +1 -1
  23. package/dist/rebase_context.d.ts +40 -26
  24. package/dist/types/backend.d.ts +300 -18
  25. package/dist/types/builders.d.ts +15 -0
  26. package/dist/types/chips.d.ts +1 -1
  27. package/dist/types/collections.d.ts +324 -355
  28. package/dist/types/cron.d.ts +102 -0
  29. package/dist/types/data_source.d.ts +64 -0
  30. package/dist/types/entities.d.ts +29 -24
  31. package/dist/types/entity_actions.d.ts +12 -12
  32. package/dist/types/entity_callbacks.d.ts +12 -12
  33. package/dist/types/entity_link_builder.d.ts +1 -1
  34. package/dist/types/entity_overrides.d.ts +7 -2
  35. package/dist/types/entity_views.d.ts +61 -0
  36. package/dist/types/export_import.d.ts +3 -3
  37. package/dist/types/index.d.ts +9 -5
  38. package/dist/types/plugins.d.ts +228 -225
  39. package/dist/types/properties.d.ts +135 -62
  40. package/dist/types/property_config.d.ts +13 -11
  41. package/dist/types/relations.d.ts +1 -1
  42. package/dist/types/slots.d.ts +252 -0
  43. package/dist/types/translations.d.ts +870 -0
  44. package/dist/types/user_management_delegate.d.ts +43 -0
  45. package/dist/types/websockets.d.ts +45 -0
  46. package/dist/users/user.d.ts +4 -0
  47. package/package.json +99 -131
  48. package/src/controllers/analytics_controller.tsx +2 -2
  49. package/src/controllers/auth.tsx +55 -6
  50. package/src/controllers/client.ts +133 -0
  51. package/src/controllers/collection_registry.ts +57 -0
  52. package/src/controllers/customization_controller.tsx +12 -1
  53. package/src/controllers/data.ts +191 -0
  54. package/src/controllers/{datasource.ts → data_driver.ts} +50 -61
  55. package/src/controllers/database_admin.ts +22 -0
  56. package/src/controllers/effective_role.ts +4 -0
  57. package/src/controllers/email.ts +36 -0
  58. package/src/controllers/index.ts +15 -5
  59. package/src/controllers/local_config_persistence.tsx +4 -4
  60. package/src/controllers/navigation.ts +13 -76
  61. package/src/controllers/registry.ts +65 -0
  62. package/src/controllers/side_entity_controller.tsx +7 -7
  63. package/src/controllers/storage.ts +25 -28
  64. package/src/index.ts +0 -1
  65. package/src/rebase_context.tsx +41 -39
  66. package/src/types/backend.ts +359 -24
  67. package/src/types/builders.ts +17 -0
  68. package/src/types/chips.ts +15 -40
  69. package/src/types/collections.ts +375 -383
  70. package/src/types/cron.ts +149 -0
  71. package/src/types/data_source.ts +145 -0
  72. package/src/types/entities.ts +40 -33
  73. package/src/types/entity_actions.tsx +11 -11
  74. package/src/types/entity_callbacks.ts +12 -12
  75. package/src/types/entity_link_builder.ts +1 -1
  76. package/src/types/entity_overrides.tsx +7 -2
  77. package/src/types/entity_views.tsx +77 -0
  78. package/src/types/export_import.ts +3 -3
  79. package/src/types/index.ts +10 -5
  80. package/src/types/plugins.tsx +280 -261
  81. package/src/types/properties.ts +163 -61
  82. package/src/types/property_config.tsx +11 -11
  83. package/src/types/relations.ts +1 -1
  84. package/src/types/slots.tsx +297 -0
  85. package/src/types/translations.ts +977 -0
  86. package/src/types/user_management_delegate.ts +50 -7
  87. package/src/types/websockets.ts +48 -0
  88. package/src/users/roles.ts +0 -1
  89. package/src/users/user.ts +5 -0
  90. package/dist/components/EntityFormActionsProps.d.ts +0 -17
  91. package/dist/components/EntityFormProps.d.ts +0 -46
  92. package/dist/components/PropertyPreviewProps.d.ts +0 -50
  93. package/dist/components/formex.d.ts +0 -40
  94. package/dist/components/index.d.ts +0 -3
  95. package/dist/controllers/datasource.d.ts +0 -179
  96. package/dist/types/fields.d.ts +0 -221
  97. package/dist/types/rebase.d.ts +0 -180
  98. package/src/components/EntityFormActionsProps.tsx +0 -18
  99. package/src/components/EntityFormProps.tsx +0 -52
  100. package/src/components/PropertyPreviewProps.tsx +0 -61
  101. package/src/components/formex.tsx +0 -46
  102. package/src/components/index.ts +0 -3
  103. package/src/types/fields.tsx +0 -298
  104. package/src/types/rebase.tsx +0 -211
@@ -1,221 +0,0 @@
1
- import { InferPropertyType, Property } from "./properties";
2
- import { Entity } from "./entities";
3
- import { FormexController } from "../components/formex";
4
- import { EntityCollection } from "./collections";
5
- export type DefaultFieldConfig = "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "reference_as_string" | "reference" | "multi_references" | "relation" | "date_time" | "group" | "key_value" | "repeat" | "custom_array" | "block";
6
- /**
7
- * When building a custom field you need to create a React component that takes
8
- * this interface as props.
9
- *
10
- * @group Form custom fields
11
- */
12
- export interface FieldProps<P extends Property = Property, CustomProps = any, M extends Record<string, any> = any> {
13
- /**
14
- * Key of the property
15
- * E.g. "user.name" for a property with path "user.name"
16
- */
17
- propertyKey: string;
18
- /**
19
- * Current value of this field, inferred from the property type P
20
- */
21
- value: InferPropertyType<P>;
22
- /**
23
- * Set value of field directly
24
- */
25
- setValue: (value: InferPropertyType<P> | null, shouldValidate?: boolean) => void;
26
- /**
27
- * Set value of a different field directly
28
- * @param propertyKey
29
- * @param value
30
- * @param shouldValidate
31
- */
32
- setFieldValue: (propertyKey: string, value: unknown, shouldValidate?: boolean) => void;
33
- /**
34
- * Is the form currently submitting
35
- */
36
- isSubmitting?: boolean;
37
- /**
38
- * Should this field show the error indicator.
39
- * Note that there might be an error (like an empty field that should be
40
- * filled) but we don't want to show the error until the user has tried
41
- * saving.
42
- */
43
- showError?: boolean;
44
- /**
45
- * Is there an error in this field. The error field has the same shape as
46
- * the field, replacing values with a string containing the error.
47
- * It takes the value `null` if there is no error
48
- */
49
- error?: string;
50
- /**
51
- * Has this field been touched
52
- */
53
- touched?: boolean;
54
- /**
55
- * Property related to this field, now strongly typed to P
56
- */
57
- property: P;
58
- /**
59
- * Should this field include a description
60
- */
61
- includeDescription?: boolean;
62
- /**
63
- * Flag to indicate that the underlying value has been updated in the
64
- * datasource
65
- */
66
- underlyingValueHasChanged?: boolean;
67
- /**
68
- * Is this field part of an array
69
- */
70
- partOfArray?: boolean;
71
- /**
72
- * Is this field part of a block
73
- */
74
- partOfBlock?: boolean;
75
- /**
76
- * Display the child properties directly, without being wrapped in an
77
- * extendable panel. Note that this will also hide the title of this property.
78
- */
79
- minimalistView?: boolean;
80
- /**
81
- * Should this field autofocus on mount
82
- */
83
- autoFocus?: boolean;
84
- /**
85
- * Additional properties set by the developer
86
- */
87
- customProps: CustomProps;
88
- /**
89
- * Additional values related to the state of the form or the entity
90
- */
91
- context: FormContext<M>;
92
- /**
93
- * Flag to indicate if this field should be disabled
94
- */
95
- disabled?: boolean;
96
- /**
97
- * Size of the field
98
- */
99
- size?: "small" | "medium" | "large";
100
- /**
101
- * Some properties might change internal state (like expanding a panel).
102
- * This function should be called when the internal state changes.
103
- * This is used to preserve state in array containers.
104
- *
105
- * @param property
106
- */
107
- onPropertyChange?: (property: Partial<Property>) => void;
108
- }
109
- /**
110
- * Context passed to custom fields
111
- * @group Form custom fields
112
- */
113
- export interface FormContext<M extends Record<string, any> = any> {
114
- /**
115
- * Current values of the entity
116
- */
117
- values: M;
118
- /**
119
- * Update the value of a field
120
- * @param key
121
- * @param value
122
- * @param shouldValidate
123
- */
124
- setFieldValue: (key: string, value: unknown, shouldValidate?: boolean) => void;
125
- /**
126
- * Save the entity.
127
- */
128
- save: (values: M) => void;
129
- /**
130
- * Collection of the entity being modified
131
- */
132
- collection?: EntityCollection<M>;
133
- /**
134
- * Entity id, it can be undefined if it's a new entity
135
- */
136
- entityId?: string | number;
137
- /**
138
- * Path this entity is located at
139
- */
140
- path?: string;
141
- status: "new" | "existing" | "copy";
142
- entity?: Entity<M>;
143
- savingError?: Error;
144
- openEntityMode: "side_panel" | "full_screen";
145
- /**
146
- * This is the underlying formex controller that powers the form.
147
- * If you are in a red only mode, the formex controller is there, but you can't
148
- * operate with it
149
- */
150
- formex: FormexController<M>;
151
- disabled: boolean;
152
- }
153
- /**
154
- * In case you need to render a field bound to a Property inside your
155
- * custom field you can use {@link PropertyFieldBinding} with these props.
156
- * @group Form custom fields
157
- */
158
- export interface PropertyFieldBindingProps<M extends Record<string, any> = any> {
159
- /**
160
- * The key/path of the property, such as `age`. You can use nested and array
161
- * indexed such as `address.street` or `people[3]`
162
- */
163
- propertyKey: string;
164
- /**
165
- * The CMS property you are binding this field to
166
- */
167
- property: Property;
168
- /**
169
- * The context where this field is being rendered. You get a context as a
170
- * prop when creating a custom field.
171
- */
172
- context: FormContext<M>;
173
- /**
174
- * Should the description be included in this field
175
- */
176
- includeDescription?: boolean;
177
- /**
178
- * Has the value of this property been updated in the database while this
179
- * field is being edited
180
- */
181
- underlyingValueHasChanged?: boolean;
182
- /**
183
- * Is this field part of an array
184
- */
185
- partOfArray?: boolean;
186
- /**
187
- * Is this field part of a block
188
- */
189
- partOfBlock?: boolean;
190
- /**
191
- * Display the child properties directly, without being wrapped in an
192
- * extendable panel. Note that this will also hide the title of this property.
193
- */
194
- minimalistView?: boolean;
195
- /**
196
- * Should the field take focus when rendered. When opening the popup view
197
- * in table mode, it makes sense to put the focus on the only field rendered.
198
- */
199
- autoFocus?: boolean;
200
- /**
201
- * Should this field be disabled
202
- */
203
- disabled?: boolean;
204
- /**
205
- * Index of the field in the array.
206
- * Only used when the field is part of an array.
207
- */
208
- index?: number;
209
- /**
210
- * The size of the field
211
- */
212
- size?: "small" | "medium" | "large";
213
- /**
214
- * Some properties might change internal state (like expanding a panel).
215
- * This function should be called when the internal state changes.
216
- * This is used to preserve state in array containers.
217
- *
218
- * @param property
219
- */
220
- onPropertyChange?: (property: Partial<Property>) => void;
221
- }
@@ -1,180 +0,0 @@
1
- import React from "react";
2
- import { EntityCollection, EntityCustomView } from "./collections";
3
- import { PropertyConfig } from "./property_config";
4
- import { Locale } from "./locales";
5
- import { EntityLinkBuilder } from "./entity_link_builder";
6
- import { RebasePlugin } from "./plugins";
7
- import { EntityAction } from "./entity_actions";
8
- import { User } from "../users";
9
- import { AuthController, CMSAnalyticsEvent, CMSView, DataSource, StorageSource, UserConfigurationPersistence, CollectionRegistryController, CMSUrlController, NavigationStateController } from "../controllers";
10
- import { RebaseContext } from "../rebase_context";
11
- import { UserManagementDelegate } from "./user_management_delegate";
12
- /**
13
- * Controller to simulate different roles when dev mode is active.
14
- * @group Models
15
- */
16
- export interface EffectiveRoleController {
17
- effectiveRole: string | null;
18
- setEffectiveRole: (role: string | null) => void;
19
- }
20
- /**
21
- * Use this callback to build entity collections dynamically.
22
- * You can use the user to decide which collections to show.
23
- * You can also use the data source to fetch additional data to build the
24
- * collections.
25
- * Note: you can use any type of synchronous or asynchronous code here,
26
- * including fetching data from external sources, like using the Firestore
27
- * APIs directly, or a REST API.
28
- * @group Models
29
- */
30
- export type EntityCollectionsBuilder<EC extends EntityCollection = EntityCollection> = (params: {
31
- user: User | null;
32
- authController: AuthController;
33
- dataSource: DataSource;
34
- }) => EC[] | Promise<EC[]>;
35
- /**
36
- * Use this callback to build custom views dynamically.
37
- * You can use the user to decide which views to show.
38
- * You can also use the data source to fetch additional data to build the
39
- * views. Note: you can use any type of synchronous or asynchronous code here,
40
- * including fetching data from external sources, like using the Firestore
41
- * APIs directly, or a REST API.
42
- * @group Models
43
- */
44
- export type CMSViewsBuilder = (params: {
45
- user: User | null;
46
- authController: AuthController;
47
- dataSource: DataSource;
48
- }) => CMSView[] | Promise<CMSView[]>;
49
- /**
50
- * @group Models
51
- */
52
- export type RebaseProps<USER extends User> = {
53
- /**
54
- * Use this function to return the components you want to render under
55
- * Rebase
56
- * @param props
57
- */
58
- children: (props: {
59
- /**
60
- * Context of the app
61
- */
62
- context: RebaseContext;
63
- /**
64
- * Is one of the main processes, auth and navigation resolving, currently
65
- * loading. If you are building your custom implementation, you probably
66
- * want to show a loading indicator if this flag is `true`
67
- */
68
- loading: boolean;
69
- }) => React.ReactNode;
70
- /**
71
- * If you have a custom API key, you can use it here.
72
- */
73
- apiKey?: string;
74
- /**
75
- * Base URL for the backend API (e.g. "http://localhost:3001").
76
- * When provided, this is available via `useApiConfig()` to any hook
77
- * in the tree, reducing repetitive `apiUrl` threading.
78
- */
79
- apiUrl?: string;
80
- /**
81
- * Record of custom form fields to be used in the CMS.
82
- * You can use the key to reference the custom field in
83
- * the `propertyConfig` prop of a property in a collection.
84
- */
85
- propertyConfigs?: Record<string, PropertyConfig>;
86
- /**
87
- * This controller is in charge of resolving the collection and entity paths.
88
- */
89
- collectionRegistryController: CollectionRegistryController;
90
- /**
91
- * This controller is in charge of resolving the URL configurations map and building paths
92
- */
93
- cmsUrlController: CMSUrlController;
94
- /**
95
- * This controller is in charge of resolving the navigation views and state
96
- */
97
- navigationStateController: NavigationStateController;
98
- /**
99
- * List of additional custom views for entities.
100
- * You can use the key to reference the custom view in
101
- * the `entityViews` prop of a collection.
102
- *
103
- * You can also define an entity view from the UI.
104
- */
105
- entityViews?: EntityCustomView[];
106
- /**
107
- * List of actions that can be performed on entities.
108
- * These actions are displayed in the entity view and in the collection view.
109
- * You can later reuse these actions in the `entityActions` prop of a collection,
110
- * by specifying the `key` of the action.
111
- */
112
- entityActions?: EntityAction[];
113
- /**
114
- * Format of the dates in the CMS.
115
- * Defaults to 'MMMM dd, yyyy, HH:mm:ss'
116
- */
117
- dateTimeFormat?: string;
118
- /**
119
- * Locale of the CMS, currently only affecting dates
120
- */
121
- locale?: Locale;
122
- /**
123
- * Connector to your database
124
- */
125
- dataSource: DataSource;
126
- /**
127
- * Connector to your file upload/fetch implementation
128
- */
129
- storageSource: StorageSource;
130
- /**
131
- * Delegate for implementing your auth operations.
132
- */
133
- authController: AuthController<USER>;
134
- /**
135
- * Use this controller to access the configuration that is stored locally,
136
- * and not defined in code
137
- */
138
- userConfigPersistence?: UserConfigurationPersistence;
139
- /**
140
- * Use plugins to modify the behaviour of the CMS.
141
- * DEPRECATED: use the `plugins` prop in the `useBuildNavigationController` instead.
142
- * This prop will work as a fallback for the `plugins` prop in the `useBuildNavigationController`.
143
- * @deprecated
144
- */
145
- plugins?: RebasePlugin<any, any, any>[];
146
- /**
147
- * Callback used to get analytics events from the CMS
148
- */
149
- onAnalyticsEvent?: (event: CMSAnalyticsEvent, data?: object) => void;
150
- /**
151
- * Optional link builder you can add to generate a button in your entity forms.
152
- * The function must return a URL that gets opened when the button is clicked
153
- */
154
- entityLinkBuilder?: EntityLinkBuilder;
155
- /**
156
- * You can use this props to provide your own user management implementation.
157
- * Note that this will not affect the UI, but it will be used to show user information
158
- * in various places of the CMS, for example, to show who created or modified an entity,
159
- * or to assign ownership of an entity.
160
- *
161
- * You can also use this data to be retrieved in your custom properties,
162
- * for example, to show a list of users in a dropdown.
163
- *
164
- * If you are using the Rebase user management plugin, this
165
- * prop will be implemented automatically.
166
- */
167
- userManagement?: UserManagementDelegate;
168
- components?: {
169
- /**
170
- * Component to render when a reference is missing
171
- */
172
- missingReference?: React.ComponentType<{
173
- path: string;
174
- }>;
175
- };
176
- /**
177
- * Controller to simulate different roles when dev mode is active.
178
- */
179
- effectiveRoleController?: EffectiveRoleController;
180
- };
@@ -1,18 +0,0 @@
1
- import { Entity, EntityCollection, FormContext } from "../types";
2
- import { FormexController } from "./formex";
3
-
4
- export interface EntityFormActionsProps {
5
- path: string;
6
- collection: EntityCollection;
7
- entity?: Entity;
8
- layout: "bottom" | "side";
9
- savingError?: Error;
10
- formex: FormexController<any>;
11
- disabled: boolean;
12
- status: "new" | "existing" | "copy";
13
- pluginActions: React.ReactNode[];
14
- openEntityMode: "side_panel" | "full_screen";
15
- showDefaultActions?: boolean;
16
- navigateBack: () => void;
17
- formContext: FormContext
18
- }
@@ -1,52 +0,0 @@
1
- import { Entity, EntityCollection, EntityCustomViewParams, EntityStatus, FormContext } from "../types";
2
- import { FormexController } from "./formex";
3
- import { EntityFormActionsProps } from "./EntityFormActionsProps";
4
-
5
- export type EntityFormProps<M extends Record<string, any>> = {
6
- path: string;
7
- fullIdPath?: string;
8
- collection: EntityCollection<M>;
9
- entityId?: string | number;
10
- entity?: Entity<M>;
11
- databaseId?: string;
12
- onIdChange?: (id: string | number) => void;
13
- onValuesModified?: (modified: boolean, values: M) => void;
14
- onSaved?: (params: OnUpdateParams) => void;
15
- initialDirtyValues?: Partial<M>; // dirty cached entity in memory
16
- onFormContextReady?: (formContext: FormContext) => void;
17
- forceActionsAtTheBottom?: boolean;
18
- className?: string;
19
- initialStatus: EntityStatus;
20
- onStatusChange?: (status: EntityStatus) => void;
21
- onEntityChange?: (entity: Entity<M>) => void;
22
- formex?: FormexController<M>;
23
- openEntityMode?: "side_panel" | "full_screen";
24
- /**
25
- * If true, the form will be disabled and no actions will be available
26
- */
27
- disabled?: boolean;
28
- /**
29
- * Include the copy and delete actions in the form
30
- */
31
- showDefaultActions?: boolean;
32
-
33
- /**
34
- * Display the entity path in the form
35
- */
36
- showEntityPath?: boolean;
37
-
38
- EntityFormActionsComponent?: React.FC<EntityFormActionsProps>;
39
-
40
- Builder?: React.ComponentType<EntityCustomViewParams<M>>;
41
-
42
- children?: React.ReactNode;
43
- };
44
-
45
- export type OnUpdateParams = {
46
- entity: Entity<any>,
47
- status: EntityStatus,
48
- path: string,
49
- entityId?: string | number;
50
- selectedTab?: string;
51
- collection: EntityCollection<any>
52
- };
@@ -1,61 +0,0 @@
1
- import { InferPropertyType, Property } from "../types";
2
-
3
- /**
4
- * @group Preview components
5
- */
6
- export type PreviewSize = "small" | "medium" | "large";
7
-
8
- /**
9
- * @group Preview components
10
- */
11
- export interface PropertyPreviewProps<P extends Property, CustomProps = unknown> {
12
- /**
13
- * Name of the property
14
- */
15
- propertyKey?: string;
16
-
17
- /**
18
- * Current value of the property, inferred from the property schema P
19
- */
20
- value: InferPropertyType<P>;
21
-
22
- /**
23
- * Property this display is related to, now strongly typed to P
24
- */
25
- property: P;
26
-
27
- /**
28
- * Desired size of the preview, depending on the context.
29
- */
30
- size: PreviewSize;
31
-
32
- /**
33
- * Max height assigned to the preview, depending on the context.
34
- * It may be undefined if unlimited.
35
- */
36
- height?: number;
37
-
38
- /**
39
- * Max height width to the preview, depending on the context.
40
- * It may be undefined if unlimited.
41
- */
42
- width?: number;
43
-
44
- /**
45
- * Additional properties set by the developer
46
- */
47
- customProps?: CustomProps;
48
-
49
- /**
50
- * If the preview should be interactive or not.
51
- * This applies only to videos.
52
- */
53
- interactive?: boolean;
54
-
55
- /**
56
- * If true, image previews will fill their container completely.
57
- * Only applies to image type properties.
58
- */
59
- fill?: boolean;
60
-
61
- }
@@ -1,46 +0,0 @@
1
- import React, { FormEvent } from "react";
2
-
3
- // this is duplicated from the formex package
4
- export type FormexController<T extends object> = {
5
- values: T;
6
- initialValues: T;
7
- setValues: (values: T) => void;
8
- setFieldValue: (key: string, value: unknown, shouldValidate?: boolean) => void;
9
- touched: Record<string, boolean>;
10
- setFieldTouched: (key: string, touched: boolean, shouldValidate?: boolean) => void;
11
- setTouched: (touched: Record<string, boolean>) => void;
12
- dirty: boolean;
13
- setDirty: (dirty: boolean) => void;
14
- setSubmitCount: (submitCount: number) => void;
15
- errors: Record<string, string>;
16
- setFieldError: (key: string, error?: string) => void;
17
- handleChange: (event: React.SyntheticEvent) => void,
18
- handleBlur: (event: React.FocusEvent) => void,
19
- handleSubmit: (event?: FormEvent<HTMLFormElement>) => void;
20
- validate: () => void;
21
- resetForm: (props?: FormexResetProps<T>) => void;
22
- submitCount: number;
23
- isSubmitting: boolean;
24
- setSubmitting: (isSubmitting: boolean) => void;
25
- isValidating: boolean;
26
- /**
27
- * The version of the form. This is incremented every time the form is reset
28
- * or the form is submitted.
29
- */
30
- version: number;
31
-
32
- debugId?: string;
33
-
34
- undo: () => void;
35
- redo: () => void;
36
-
37
- canUndo: boolean;
38
- canRedo: boolean;
39
- }
40
-
41
- export type FormexResetProps<T extends object> = {
42
- values?: T;
43
- submitCount?: number;
44
- errors?: Record<string, string>;
45
- touched?: Record<string, boolean>;
46
- };
@@ -1,3 +0,0 @@
1
- export * from "./PropertyPreviewProps";
2
- export * from "./EntityFormProps";
3
- export * from "./EntityFormActionsProps";