@socotra/ec-react-components 2.5.1-next.7 → 2.5.1-next.8
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 +81 -3
- package/dist/index.es.js +13052 -11647
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +37 -37
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,16 @@ import { ElementConfig } from '@socotra/ec-react-schemas';
|
|
|
8
8
|
import { ElementRequest } from '@socotra/ec-react-schemas';
|
|
9
9
|
import { ElementResponse } from '@socotra/ec-react-schemas';
|
|
10
10
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
|
+
import { ModifyChangeInstructionCreateRequest } from '@socotra/ec-react-schemas';
|
|
12
|
+
import { ModifyChangeInstructionResponse } from '@socotra/ec-react-schemas';
|
|
13
|
+
import { ParamsChangeInstructionCreateRequest } from '@socotra/ec-react-schemas';
|
|
14
|
+
import { ParamsChangeInstructionResponse } from '@socotra/ec-react-schemas';
|
|
11
15
|
import { PolicyResponse } from '@socotra/ec-react-schemas';
|
|
16
|
+
import { ProductConfig } from '@socotra/ec-react-schemas';
|
|
12
17
|
import { QuoteRequest } from '@socotra/ec-react-schemas';
|
|
13
18
|
import { QuoteResponse } from '@socotra/ec-react-schemas';
|
|
14
19
|
import { SegmentResponse } from '@socotra/ec-react-schemas';
|
|
20
|
+
import { TransactionSnapshotResponse } from '@socotra/ec-react-schemas';
|
|
15
21
|
|
|
16
22
|
/**
|
|
17
23
|
* AccountForm is a form for creating or updating an account. It required a resolved data model, custom data types, and an optional account object to put the form in update mode.
|
|
@@ -151,9 +157,6 @@ declare type Props_2 = {
|
|
|
151
157
|
* Hides the submit button
|
|
152
158
|
*/
|
|
153
159
|
hideSubmitButton?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* The text to display on the submit button
|
|
156
|
-
*/
|
|
157
160
|
/**
|
|
158
161
|
* Whether to validate the form on submit
|
|
159
162
|
*/
|
|
@@ -244,6 +247,73 @@ declare type Props_4 = {
|
|
|
244
247
|
title?: string;
|
|
245
248
|
};
|
|
246
249
|
|
|
250
|
+
declare type Props_5 = {
|
|
251
|
+
/**
|
|
252
|
+
* The transaction snapshot object
|
|
253
|
+
*/
|
|
254
|
+
transactionSnapshot: TransactionSnapshotResponse;
|
|
255
|
+
/**
|
|
256
|
+
* The params change instruction for the transaction, usually created when the transaction is first created
|
|
257
|
+
*/
|
|
258
|
+
paramsChangeInstruction: ParamsChangeInstructionResponse;
|
|
259
|
+
/**
|
|
260
|
+
* The product model for the transaction, taken from the tenant data model and product name
|
|
261
|
+
*/
|
|
262
|
+
productModel: ProductConfig;
|
|
263
|
+
/**
|
|
264
|
+
* The coverage terms for the transaction, taken from the tenant data model
|
|
265
|
+
*/
|
|
266
|
+
coverageTerms: CoverageTermsConfigRecord;
|
|
267
|
+
/**
|
|
268
|
+
* The custom data types for the configuration that may be referenced by the elementModel
|
|
269
|
+
*/
|
|
270
|
+
dataTypes: DataTypeConfigRecord;
|
|
271
|
+
/**
|
|
272
|
+
* The function to call when the form is submitted. It will create an array of ParamsChangeInstructionCreateRequest and ModifyChangeInstructionCreateRequest from the form data.
|
|
273
|
+
*/
|
|
274
|
+
handleSubmit: (data: [
|
|
275
|
+
ParamsChangeInstructionCreateRequest,
|
|
276
|
+
ModifyChangeInstructionCreateRequest
|
|
277
|
+
]) => void;
|
|
278
|
+
/**
|
|
279
|
+
* The modify change instruction for the transaction, taken from the transaction stack of the transaction. For the form, use the last in the stack.
|
|
280
|
+
*/
|
|
281
|
+
modifyChangeInstruction?: ModifyChangeInstructionResponse;
|
|
282
|
+
/**
|
|
283
|
+
* The title of the form, if unused the title will default to 'Transaction' or the product model display name
|
|
284
|
+
*/
|
|
285
|
+
title?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Disables the form
|
|
288
|
+
*/
|
|
289
|
+
disabled?: boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Set to true when the form is submitting to set fields to readonly and disable the submit button
|
|
292
|
+
*/
|
|
293
|
+
isSubmitting?: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Prevents the form from resetting when disabled
|
|
296
|
+
* default is true
|
|
297
|
+
*/
|
|
298
|
+
preventFormResetOnDisabled?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Whether to validate the form on submit
|
|
301
|
+
*/
|
|
302
|
+
validateOnSubmit?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Hides the submit button
|
|
305
|
+
*/
|
|
306
|
+
hideSubmitButton?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* The text to display on the submit button
|
|
309
|
+
*/
|
|
310
|
+
submitButtonText?: string;
|
|
311
|
+
/**
|
|
312
|
+
* ID for the form wrapper
|
|
313
|
+
* */
|
|
314
|
+
id?: string;
|
|
315
|
+
};
|
|
316
|
+
|
|
247
317
|
/**
|
|
248
318
|
* QuoteForm is a form for updating a quote. It required a product data model, custom data types, and quote object to render the form.
|
|
249
319
|
*/
|
|
@@ -252,4 +322,12 @@ export declare const QuoteForm: {
|
|
|
252
322
|
displayName: string;
|
|
253
323
|
};
|
|
254
324
|
|
|
325
|
+
/**
|
|
326
|
+
* TransactionForm is a form for updating a transaction on an issued policy. It requires a transactionSnapshot, paramsChangeInstruction (created when the transaction is created), and some other configuration settings from the tenant data model.
|
|
327
|
+
*/
|
|
328
|
+
export declare const TransactionForm: {
|
|
329
|
+
({ transactionSnapshot, title, handleSubmit, paramsChangeInstruction, modifyChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, coverageTerms, }: Props_5): JSX_2.Element;
|
|
330
|
+
displayName: string;
|
|
331
|
+
};
|
|
332
|
+
|
|
255
333
|
export { }
|