@socotra/ec-react-components 2.26.1-next.6 → 2.26.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 CHANGED
@@ -22,7 +22,7 @@ import { FnolCreateRequest } from '@socotra/ec-react-schemas';
22
22
  import { FnolPatchRequest } from '@socotra/ec-react-schemas';
23
23
  import { FnolResponse } from '@socotra/ec-react-schemas';
24
24
  import { ForwardRefExoticComponent } from 'react';
25
- import { JSX as JSX_2 } from 'react/jsx-runtime';
25
+ import { JSX } from 'react/jsx-runtime';
26
26
  import { ModifyChangeInstructionCreateRequest } from '@socotra/ec-react-schemas';
27
27
  import { ModifyChangeInstructionResponse } from '@socotra/ec-react-schemas';
28
28
  import { ParamsChangeInstructionCreateRequest } from '@socotra/ec-react-schemas';
@@ -44,10 +44,11 @@ import { TransactionSnapshotResponse } from '@socotra/ec-react-schemas';
44
44
  * 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.
45
45
  */
46
46
  export declare const AccountForm: {
47
- ({ dataModel, accountType, disabled, handleSubmit, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, hideAdvancedFields, validateOnSubmit, account, submitButtonText, id, titles, styles, dependencyMap, getEvaluatedConstraints, }: Props & {
47
+ ({ dataModel, accountType, disabled, handleSubmit, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, hideAdvancedFields, validateOnSubmit, account, submitButtonText, id, titles, styles, dependencyMap, getEvaluatedConstraints, enableEvaluatedConstraints, }: Props & {
48
48
  dependencyMap?: DependencyMapResponse;
49
49
  getEvaluatedConstraints?: (request: AccountEvaluateConstraintsRequest) => Promise<EvaluateConstraintsResponse | undefined>;
50
- }): JSX_2.Element;
50
+ enableEvaluatedConstraints?: boolean;
51
+ }): JSX.Element;
51
52
  displayName: string;
52
53
  };
53
54
 
@@ -140,7 +141,7 @@ declare interface CreateProps extends Props_12 {
140
141
  * DataPropertyForm is a form to render data based on data property schema and data model with edit and submission capabilities.
141
142
  */
142
143
  export declare const DataPropertyForm: {
143
- ({ data, dataModel, id, titles, dataPropertySchema, handleSubmit, isSubmitting, disabled, hideSubmitButton, validateOnSubmit, submitButtonText, readonly, styles, scope, }: Props_11): JSX_2.Element;
144
+ ({ data, dataModel, id, titles, dataPropertySchema, handleSubmit, isSubmitting, disabled, hideSubmitButton, validateOnSubmit, submitButtonText, readonly, styles, scope, }: Props_11): JSX.Element;
144
145
  displayName: string;
145
146
  };
146
147
 
@@ -148,15 +149,16 @@ export declare const DataPropertyForm: {
148
149
  * `DraftTransactionForm` is a form for updating a transaction on an issued policy. It requires a transaction in a `draft` state, a `transactionSnapshot`, `paramsChangeInstruction` (created when the transaction is created), and data types / product model / coverage terms from the tenant data model.
149
150
  */
150
151
  export declare const DraftTransactionForm: {
151
- ({ transactionSnapshot, handleSubmit, paramsChangeInstruction, modifyChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, coverageTerms: coverageTermsDataModel, titles, styles, }: Props_9): JSX_2.Element;
152
+ ({ transactionSnapshot, handleSubmit, paramsChangeInstruction, modifyChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, coverageTerms: coverageTermsDataModel, titles, styles, }: Props_9): JSX.Element;
152
153
  displayName: string;
153
154
  };
154
155
 
155
156
  /**
156
- * ElementForm is a form for creating or updating an element of a Quote. It required the element's data model, custom data types, and an element response object.
157
+ * ElementForm is a form for creating or updating an element of a Quote, or show an element of a policy.
158
+ * It required the element's data model, custom data types, and an element response object.
157
159
  */
158
160
  export declare const ElementForm: {
159
- ({ elementModel, dataTypes, disabled, handleSubmit, dataModel, timezone, coverageTerms: coverageTermsDataModel, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, element, validateOnSubmit, hideAllFields, hideCoverageTerms, submitButtonText, id, titles, getEvaluatedConstraints, dependencyMap, quote, styles, }: Props_3): JSX_2.Element;
161
+ ({ elementModel, dataTypes, disabled, handleSubmit, dataModel, timezone, coverageTerms: coverageTermsDataModel, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, element, validateOnSubmit, hideAllFields, hideCoverageTerms, submitButtonText, id, titles, getEvaluatedConstraints, dependencyMap, quote, styles, enableEvaluatedConstraints, }: Props_3): JSX.Element;
160
162
  displayName: string;
161
163
  };
162
164
 
@@ -164,7 +166,7 @@ export declare const ElementForm: {
164
166
  * Apply a payment to an existing invoice form
165
167
  */
166
168
  export declare const ExistingPaymentForm: {
167
- ({ accountLocator, invoiceLocator, balance, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, id, titles, invoiceBalance, styles, }: Props_6): JSX_2.Element;
169
+ ({ accountLocator, invoiceLocator, balance, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, id, titles, invoiceBalance, styles, }: Props_6): JSX.Element;
168
170
  displayName: string;
169
171
  };
170
172
 
@@ -172,7 +174,7 @@ export declare const ExistingPaymentForm: {
172
174
  * FnolForm is a form to render data based on fnol schema.
173
175
  */
174
176
  export declare const FnolForm: {
175
- ({ dataModel, id, titles, fnol, defaultValues, handleSubmit, isSubmitting, disabled, hideSubmitButton, validateOnSubmit, submitButtonText, readonly, styles, }: CreateProps | PatchProps): JSX_2.Element;
177
+ ({ dataModel, id, titles, fnol, defaultValues, handleSubmit, isSubmitting, disabled, hideSubmitButton, validateOnSubmit, submitButtonText, readonly, styles, }: CreateProps | PatchProps): JSX.Element;
176
178
  displayName: string;
177
179
  };
178
180
 
@@ -242,7 +244,7 @@ declare type GetPaymentFormDefaultFieldsProps = {
242
244
  * `InitializedTransactionForm` is a form for updating a transaction on an issued policy. It requires a transaction in an `initialized` state, the current `segment`, and data types / product model / coverage terms from the tenant data model.
243
245
  */
244
246
  export declare const InitializedTransactionForm: {
245
- ({ policy, elementResponse, handleSubmit, paramsChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, timezone, coverageTerms: coverageTermsDataModel, titles, getEvaluatedConstraints, dependencyMap, styles, staticDataFieldsOptions, }: Props_8): JSX_2.Element;
247
+ ({ policy, elementResponse, handleSubmit, paramsChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, timezone, coverageTerms: coverageTermsDataModel, titles, getEvaluatedConstraints, dependencyMap, enableEvaluatedConstraints, styles, staticDataFieldsOptions, }: Props_8): JSX.Element;
246
248
  displayName: string;
247
249
  };
248
250
 
@@ -250,7 +252,7 @@ export declare const InitializedTransactionForm: {
250
252
  * DisbursementForm is a form for creating a disbursement.
251
253
  */
252
254
  export declare const NewDisbursementForm: {
253
- ({ accountLocator, accountBalance, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, dataModel, id, titles, styles, }: Props_10): JSX_2.Element;
255
+ ({ accountLocator, accountBalance, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, dataModel, id, titles, styles, }: Props_10): JSX.Element;
254
256
  displayName: string;
255
257
  };
256
258
 
@@ -258,7 +260,7 @@ export declare const NewDisbursementForm: {
258
260
  * PaymentForm is a form for making a payment.
259
261
  */
260
262
  export declare const NewPaymentForm: {
261
- ({ accountLocator, invoiceLocator, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, dataModel, id, titles, invoiceBalance, styles, }: Props_5): JSX_2.Element;
263
+ ({ accountLocator, invoiceLocator, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, dataModel, id, titles, invoiceBalance, styles, }: Props_5): JSX.Element;
262
264
  displayName: string;
263
265
  };
264
266
 
@@ -281,7 +283,7 @@ declare interface PatchProps extends Props_12 {
281
283
  * PolicyForm is a form for updating a policy. It required a product data model, custom data types, and policy object to render the form.
282
284
  */
283
285
  export declare const PolicyForm: {
284
- ({ policy, segment, dataModel, hideAllFields, id, titles, styles, staticDataFieldsOptions, }: Props_4): JSX_2.Element;
286
+ ({ policy, segment, dataModel, hideAllFields, id, titles, styles, staticDataFieldsOptions, }: Props_4): JSX.Element;
285
287
  displayName: string;
286
288
  };
287
289
 
@@ -586,6 +588,10 @@ declare type Props_2 = {
586
588
  advancedFields?: boolean;
587
589
  staticDataFields?: boolean;
588
590
  };
591
+ /**
592
+ * Whether to enable evaluated constraints
593
+ */
594
+ enableEvaluatedConstraints?: boolean;
589
595
  };
590
596
 
591
597
  declare type Props_3 = {
@@ -711,6 +717,10 @@ declare type Props_3 = {
711
717
  * Whether to hide the coverage terms fields
712
718
  */
713
719
  hideCoverageTerms?: boolean;
720
+ /**
721
+ * Whether to enable evaluated constraints
722
+ */
723
+ enableEvaluatedConstraints?: boolean;
714
724
  };
715
725
 
716
726
  declare type Props_4 = {
@@ -1086,6 +1096,10 @@ declare type Props_8 = {
1086
1096
  hidden?: boolean;
1087
1097
  defaultOpen?: boolean;
1088
1098
  };
1099
+ /**
1100
+ * Whether to enable evaluated constraints
1101
+ */
1102
+ enableEvaluatedConstraints?: boolean;
1089
1103
  };
1090
1104
 
1091
1105
  declare type Props_9 = {
@@ -1179,7 +1193,7 @@ export declare type QuoteFormRef = {
1179
1193
  * Apply a payment to an existing invoice form
1180
1194
  */
1181
1195
  export declare const ReversePaymentForm: {
1182
- ({ amount, reversalTypes, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, id, titles, styles, }: Props_7): JSX_2.Element;
1196
+ ({ amount, reversalTypes, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, id, titles, styles, }: Props_7): JSX.Element;
1183
1197
  displayName: string;
1184
1198
  };
1185
1199