@socotra/ec-react-components 2.0.1-alpha.3 → 2.1.0-alpha.0
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/dist/index.d.ts +73 -3
- package/dist/index.es.js +13637 -11178
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +53 -68
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -5
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,15 @@ import { AccountRequest } from '@socotra/ec-react-schemas';
|
|
|
3
3
|
import { AccountResponse } from '@socotra/ec-react-schemas';
|
|
4
4
|
import { DataTypeConfigRecord } from '@socotra/ec-react-schemas';
|
|
5
5
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
6
|
+
import { ProductConfigRecord } from '@socotra/ec-react-schemas';
|
|
7
|
+
import { QuoteRequest } from '@socotra/ec-react-schemas';
|
|
8
|
+
import { QuoteResponse } from '@socotra/ec-react-schemas';
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* AccountForm is a form for creating or updating an account. It accepts a resolved data model, custom data types, and an optional account object to put the form in update mode. References: https://rjsf-team.github.io/react-jsonschema-form/docs/
|
|
9
12
|
*/
|
|
10
13
|
export declare const AccountForm: {
|
|
11
|
-
({ accountsModel, accountType, dataTypes, disabled, handleSubmit, hideSubmitButton, account, submitButtonText, id, }: Props): JSX_2.Element;
|
|
14
|
+
({ accountsModel, accountType, dataTypes, disabled, handleSubmit, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, account, submitButtonText, id, }: Props): JSX_2.Element;
|
|
12
15
|
displayName: string;
|
|
13
16
|
};
|
|
14
17
|
|
|
@@ -34,10 +37,19 @@ declare type Props = {
|
|
|
34
37
|
* The function to call when the form is submitted. It will create an AccountCreateRequest or AccountUpdateRequest based on the form data
|
|
35
38
|
*/
|
|
36
39
|
handleSubmit: (data: AccountRequest) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Set to true when the form is submitting to set fields to readonly and disable the submit button
|
|
42
|
+
*/
|
|
43
|
+
isSubmitting?: boolean;
|
|
37
44
|
/**
|
|
38
45
|
* Disables the form
|
|
39
46
|
*/
|
|
40
47
|
disabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Prevents the form from resetting when disabled
|
|
50
|
+
* default is false
|
|
51
|
+
*/
|
|
52
|
+
preventFormResetOnDisabled?: boolean;
|
|
41
53
|
/**
|
|
42
54
|
* The account object to put the form in update mode
|
|
43
55
|
*/
|
|
@@ -56,9 +68,67 @@ declare type Props = {
|
|
|
56
68
|
id?: string;
|
|
57
69
|
};
|
|
58
70
|
|
|
71
|
+
declare type Props_2 = {
|
|
72
|
+
/**
|
|
73
|
+
* The resolved data model for quotes retrieved from the data model response
|
|
74
|
+
*/
|
|
75
|
+
productsModel: ProductConfigRecord;
|
|
76
|
+
/**
|
|
77
|
+
* The quote type to use for the form
|
|
78
|
+
*/
|
|
79
|
+
productType: keyof ProductConfigRecord;
|
|
80
|
+
/**
|
|
81
|
+
* The custom data types for the configuration that may be referenced by the DataModel
|
|
82
|
+
*/
|
|
83
|
+
dataTypes: DataTypeConfigRecord;
|
|
84
|
+
/**
|
|
85
|
+
* The function to call when the form is submitted. It will create an QuoteUpdateRequest from the form data.
|
|
86
|
+
*/
|
|
87
|
+
handleSubmit: (data: QuoteRequest) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Set to true when the form is submitting to set fields to readonly and disable the submit button
|
|
90
|
+
*/
|
|
91
|
+
isSubmitting?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Disables the form
|
|
94
|
+
*/
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Prevents the form from resetting when disabled
|
|
98
|
+
* default is false
|
|
99
|
+
*/
|
|
100
|
+
preventFormResetOnDisabled?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* The quote object to put the form in update mode
|
|
103
|
+
*/
|
|
104
|
+
quote?: QuoteResponse;
|
|
105
|
+
/**
|
|
106
|
+
* Hides the submit button
|
|
107
|
+
*/
|
|
108
|
+
hideSubmitButton?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* The text to display on the submit button
|
|
111
|
+
*/
|
|
112
|
+
/**
|
|
113
|
+
* Whether to validate the form on submit
|
|
114
|
+
*/
|
|
115
|
+
validateOnSubmit?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* The text to display on the submit button
|
|
118
|
+
*/
|
|
119
|
+
submitButtonText?: string;
|
|
120
|
+
/**
|
|
121
|
+
* ID for the form wrapper
|
|
122
|
+
* */
|
|
123
|
+
id?: string;
|
|
124
|
+
};
|
|
125
|
+
|
|
59
126
|
/**
|
|
60
|
-
* QuoteForm is a form for updating
|
|
127
|
+
* QuoteForm is a form for creating or updating an quote. It accepts a resolved data model, custom data types, and an optional quote object to put the form in update mode. References: https://rjsf-team.github.io/react-jsonschema-form/docs/
|
|
61
128
|
*/
|
|
62
|
-
export declare const QuoteForm:
|
|
129
|
+
export declare const QuoteForm: {
|
|
130
|
+
({ productType, productsModel, dataTypes, disabled, handleSubmit, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, validateOnSubmit, quote, submitButtonText, id, }: Props_2): JSX_2.Element;
|
|
131
|
+
displayName: string;
|
|
132
|
+
};
|
|
63
133
|
|
|
64
134
|
export { }
|