@progress/kendo-react-form 7.2.4-develop.3 → 7.3.0-develop.1
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/Field.js +8 -0
- package/Field.mjs +71 -0
- package/FieldArray.js +8 -0
- package/FieldArray.mjs +74 -0
- package/FieldWrapper.js +8 -0
- package/FieldWrapper.mjs +24 -0
- package/Form.js +8 -0
- package/Form.mjs +247 -0
- package/FormContext.js +8 -0
- package/FormContext.mjs +13 -0
- package/FormElement.js +8 -0
- package/FormElement.mjs +42 -0
- package/dist/cdn/js/kendo-react-form.js +8 -5
- package/index.d.mts +724 -5
- package/index.d.ts +724 -22
- package/index.js +8 -5
- package/index.mjs +21 -412
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +2 -2
- package/Field.d.ts +0 -14
- package/FieldArray.d.ts +0 -11
- package/FieldWrapper.d.ts +0 -32
- package/Form.d.ts +0 -272
- package/FormContext.d.ts +0 -54
- package/FormElement.d.ts +0 -56
- package/interfaces/FieldArrayProps.d.ts +0 -32
- package/interfaces/FieldArrayRenderProps.d.ts +0 -93
- package/interfaces/FieldProps.d.ts +0 -43
- package/interfaces/FieldRenderProps.d.ts +0 -10
- package/interfaces/FieldValidator.d.ts +0 -18
- package/interfaces/FormProps.d.ts +0 -56
- package/interfaces/FormRenderProps.d.ts +0 -78
- package/interfaces/FormSubmitClickEvent.d.ts +0 -27
- package/interfaces/FormValidator.d.ts +0 -14
- package/interfaces/KeyValue.d.ts +0 -10
- package/package-metadata.d.ts +0 -9
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { KeyValue } from './KeyValue';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the props that are passed to the `render` option component of the Form.
|
|
8
|
-
*/
|
|
9
|
-
export interface FormRenderProps {
|
|
10
|
-
/**
|
|
11
|
-
* A callback for submitting the Form.
|
|
12
|
-
* Can be passed to the `onClick` property of the **Submit** button.
|
|
13
|
-
*/
|
|
14
|
-
onSubmit: (event: React.SyntheticEvent<any>) => void;
|
|
15
|
-
/**
|
|
16
|
-
* A callback for emiting changes to a specific field without using the Field component
|
|
17
|
-
* ([see example]({% slug common_scenarios_form %}#toc-changing-the-field-value)).
|
|
18
|
-
*
|
|
19
|
-
* > Use `onChange` only if you cannot achieve the desired behavior through the Field component.
|
|
20
|
-
*/
|
|
21
|
-
onChange: (name: string, options: {
|
|
22
|
-
value: any;
|
|
23
|
-
}) => void;
|
|
24
|
-
/**
|
|
25
|
-
* A callback for resetting the Form.
|
|
26
|
-
*/
|
|
27
|
-
onFormReset: () => void;
|
|
28
|
-
/**
|
|
29
|
-
* The key-value pair containing the current errors by field path, combined from both field and form level validators.
|
|
30
|
-
*/
|
|
31
|
-
errors: KeyValue<string>;
|
|
32
|
-
/**
|
|
33
|
-
* Indicates if the Form is valid.
|
|
34
|
-
* If any field is invalid, `valid` is set to `false`.
|
|
35
|
-
*/
|
|
36
|
-
valid: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Indicates if the Form is touched.
|
|
39
|
-
* If any field is touched, `touched` is set to `true`.
|
|
40
|
-
* The touched state of field is set to `true` when the `onBlur`
|
|
41
|
-
* callback of the Field component is called or when the user tries to submit the form.
|
|
42
|
-
*/
|
|
43
|
-
touched: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Indicates if the Form is visited.
|
|
46
|
-
* If any field is visited, `visited` is set to `true`.
|
|
47
|
-
* The visited state of field is set to `true` when the `onFocus`
|
|
48
|
-
* callback of the Field component is called or when the user tries to submit the form.
|
|
49
|
-
*/
|
|
50
|
-
visited: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Indicates if the Form is modified.
|
|
53
|
-
* If any field is modified, `modified` is set to `true`.
|
|
54
|
-
* The modified state of field is set to `true` when the `onChange`
|
|
55
|
-
* callback of the Field component is called for first time.
|
|
56
|
-
*/
|
|
57
|
-
modified: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Indicates if the Form is successfuly submitted.
|
|
60
|
-
* Useful for detecting if user is leaving the form before saving changes.
|
|
61
|
-
*/
|
|
62
|
-
submitted: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Indicates if the Form is ready to be submitted.
|
|
65
|
-
* * If `allowSubmit` is set to `true` and the Form is valid, the user will be able to submit the form.
|
|
66
|
-
* * If `allowSubmit` is set to `true` and the Form is not valid, the user will be able to set the `touched` and `visited` state of all fields to `true`.
|
|
67
|
-
* `touched` and `visited` state to true.
|
|
68
|
-
*
|
|
69
|
-
* Useful for toggling the disabled state of the **Submit** button.
|
|
70
|
-
*/
|
|
71
|
-
allowSubmit: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* A callback for getting the value of a field without using the Field component
|
|
74
|
-
* ([see example]({% slug common_scenarios_form %}#toc-reading-the-field-state)).
|
|
75
|
-
* Useful for creating and modifying the UI based on the field values.
|
|
76
|
-
*/
|
|
77
|
-
valueGetter: (name: string) => any;
|
|
78
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* The FormSubmitClick event.
|
|
7
|
-
*/
|
|
8
|
-
export interface FormSubmitClickEvent {
|
|
9
|
-
/**
|
|
10
|
-
* Contains the current values of the form.
|
|
11
|
-
*/
|
|
12
|
-
values: {
|
|
13
|
-
[name: string]: any;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* The native event.
|
|
17
|
-
*/
|
|
18
|
-
event?: React.SyntheticEvent<any>;
|
|
19
|
-
/**
|
|
20
|
-
* Represents the validity state of the form.
|
|
21
|
-
*/
|
|
22
|
-
isValid: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Represents the modified state of the form.
|
|
25
|
-
*/
|
|
26
|
-
isModified: boolean;
|
|
27
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { KeyValue } from './KeyValue';
|
|
6
|
-
/**
|
|
7
|
-
* The validator function for the Form component.
|
|
8
|
-
*
|
|
9
|
-
* * values - The current values of the form.
|
|
10
|
-
* * valueGetter - Function which can be used to get field value. Supports field paths.
|
|
11
|
-
*
|
|
12
|
-
* Returns key-value pair with errors if such are present. The key is the field path, where the value is the error message.
|
|
13
|
-
*/
|
|
14
|
-
export type FormValidatorType = (values: any, valueGetter: (name: string) => any) => KeyValue<string> | undefined;
|
package/interfaces/KeyValue.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export interface KeyValue<ValueType> {
|
|
9
|
-
[name: string]: ValueType;
|
|
10
|
-
}
|
package/package-metadata.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PackageMetadata } from '@progress/kendo-licensing';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export declare const packageMetadata: PackageMetadata;
|