@socotra/ec-react-components 2.24.1-next.2 → 2.24.1-next.3
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 +90 -0
- package/dist/index.es.js +17945 -17686
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +67 -67
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ import { ElementResponse } from '@socotra/ec-react-schemas';
|
|
|
18
18
|
import { EvaluateConstraintsRequest } from '@socotra/ec-react-schemas';
|
|
19
19
|
import { EvaluateConstraintsResponse } from '@socotra/ec-react-schemas';
|
|
20
20
|
import { FieldConfigRecord } from '@socotra/ec-react-schemas';
|
|
21
|
+
import { FnolCreateRequest } from '@socotra/ec-react-schemas';
|
|
22
|
+
import { FnolPatchRequest } from '@socotra/ec-react-schemas';
|
|
23
|
+
import { FnolResponse } from '@socotra/ec-react-schemas';
|
|
21
24
|
import { ForwardRefExoticComponent } from 'react';
|
|
22
25
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
23
26
|
import { ModifyChangeInstructionCreateRequest } from '@socotra/ec-react-schemas';
|
|
@@ -118,6 +121,21 @@ declare type BaseProps = {
|
|
|
118
121
|
getEvaluatedConstraints?: (request: AccountEvaluateConstraintsRequest) => Promise<EvaluateConstraintsResponse | undefined>;
|
|
119
122
|
};
|
|
120
123
|
|
|
124
|
+
declare interface CreateProps extends Props_12 {
|
|
125
|
+
/**
|
|
126
|
+
* The fnol object to update
|
|
127
|
+
*/
|
|
128
|
+
fnol?: undefined;
|
|
129
|
+
/**
|
|
130
|
+
* The default values to set in the form
|
|
131
|
+
*/
|
|
132
|
+
defaultValues?: Partial<FnolCreateRequest>;
|
|
133
|
+
/**
|
|
134
|
+
* The function to call when the form is submitted. It will create an PaymentRequest from the form data.
|
|
135
|
+
*/
|
|
136
|
+
handleSubmit: (data: FnolCreateRequest) => void;
|
|
137
|
+
}
|
|
138
|
+
|
|
121
139
|
/**
|
|
122
140
|
* DataPropertyForm is a form to render data based on data property schema and data model with edit and submission capabilities.
|
|
123
141
|
*/
|
|
@@ -150,6 +168,14 @@ export declare const ExistingPaymentForm: {
|
|
|
150
168
|
displayName: string;
|
|
151
169
|
};
|
|
152
170
|
|
|
171
|
+
/**
|
|
172
|
+
* FnolForm is a form to render data based on fnol schema.
|
|
173
|
+
*/
|
|
174
|
+
export declare const FnolForm: {
|
|
175
|
+
({ dataModel, id, titles, fnol, defaultValues, handleSubmit, isSubmitting, disabled, hideSubmitButton, validateOnSubmit, submitButtonText, readonly, styles, }: CreateProps | PatchProps): JSX_2.Element;
|
|
176
|
+
displayName: string;
|
|
177
|
+
};
|
|
178
|
+
|
|
153
179
|
declare type GetDisbursementFormDefaultFieldsProps = {
|
|
154
180
|
disbursements: DisbursementRefRecord;
|
|
155
181
|
accountBalance: number;
|
|
@@ -200,6 +226,21 @@ export declare const NewPaymentForm: {
|
|
|
200
226
|
displayName: string;
|
|
201
227
|
};
|
|
202
228
|
|
|
229
|
+
declare interface PatchProps extends Props_12 {
|
|
230
|
+
/**
|
|
231
|
+
* The fnol object to update
|
|
232
|
+
*/
|
|
233
|
+
fnol: Partial<FnolResponse>;
|
|
234
|
+
/**
|
|
235
|
+
* The default values to set in the form
|
|
236
|
+
*/
|
|
237
|
+
defaultValues?: never;
|
|
238
|
+
/**
|
|
239
|
+
* The function to call when the form is submitted. It will create an PaymentRequest from the form data.
|
|
240
|
+
*/
|
|
241
|
+
handleSubmit: (data: FnolPatchRequest) => void;
|
|
242
|
+
}
|
|
243
|
+
|
|
203
244
|
/**
|
|
204
245
|
* PolicyForm is a form for updating a policy. It required a product data model, custom data types, and policy object to render the form.
|
|
205
246
|
*/
|
|
@@ -347,6 +388,55 @@ declare type Props_11 = {
|
|
|
347
388
|
scope?: Array<'P' | 'Q' | 'QQ'>;
|
|
348
389
|
};
|
|
349
390
|
|
|
391
|
+
declare interface Props_12 {
|
|
392
|
+
/**
|
|
393
|
+
* The resolved data model retrieved from data model response
|
|
394
|
+
*/
|
|
395
|
+
dataModel: DataModel;
|
|
396
|
+
/**
|
|
397
|
+
* Set to true when the form is submitting to set fields to readonly and disable the submit button
|
|
398
|
+
*/
|
|
399
|
+
isSubmitting?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* Disables the form
|
|
402
|
+
*/
|
|
403
|
+
disabled?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Hides the submit button
|
|
406
|
+
*/
|
|
407
|
+
hideSubmitButton?: boolean;
|
|
408
|
+
/**
|
|
409
|
+
* Whether to validate the form on submit
|
|
410
|
+
*/
|
|
411
|
+
validateOnSubmit?: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* The text to display on the submit button
|
|
414
|
+
*/
|
|
415
|
+
submitButtonText?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Readonly mode for the form
|
|
418
|
+
*/
|
|
419
|
+
readonly?: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* ID for the form wrapper
|
|
422
|
+
*/
|
|
423
|
+
id?: string;
|
|
424
|
+
/**
|
|
425
|
+
* Titles for the form and boolean labels
|
|
426
|
+
*/
|
|
427
|
+
titles?: {
|
|
428
|
+
type?: string;
|
|
429
|
+
incidentTime?: string;
|
|
430
|
+
truthyLabel?: string;
|
|
431
|
+
falsyLabel?: string;
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Custom form styling
|
|
435
|
+
* See https://github.com/eclipsesource/jsonforms/blob/master/packages/vanilla-renderers/Styles.md
|
|
436
|
+
*/
|
|
437
|
+
styles?: StyleDefinition[];
|
|
438
|
+
}
|
|
439
|
+
|
|
350
440
|
declare type Props_2 = {
|
|
351
441
|
/**
|
|
352
442
|
* The quote object
|