@socotra/ec-react-components 2.8.0-next.4 → 2.8.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 CHANGED
@@ -4,6 +4,7 @@ import { AccountResponse } from '@socotra/ec-react-schemas';
4
4
  import { ConstraintEvaluationResponse } from '@socotra/ec-react-schemas';
5
5
  import { CoverageTermsConfigRecord } from '@socotra/ec-react-schemas';
6
6
  import { CreditDistributionRequest } from '@socotra/ec-react-schemas';
7
+ import { CreditDistributionReverseRequest } from '@socotra/ec-react-schemas';
7
8
  import { CurrencyType } from '@socotra/ec-react-schemas';
8
9
  import { DataModel } from '@socotra/ec-react-schemas';
9
10
  import { DataTypeConfigRecord } from '@socotra/ec-react-schemas';
@@ -23,6 +24,7 @@ import { ProductConfig } from '@socotra/ec-react-schemas';
23
24
  import { QuoteDependencyMapResponse } from '@socotra/ec-react-schemas';
24
25
  import { QuoteRequest } from '@socotra/ec-react-schemas';
25
26
  import { QuoteResponse } from '@socotra/ec-react-schemas';
27
+ import { ReversalTypeConfigRecord } from '@socotra/ec-react-schemas';
26
28
  import { SegmentResponse } from '@socotra/ec-react-schemas';
27
29
  import { TransactionMethodEnum } from '@socotra/ec-react-schemas';
28
30
  import { TransactionSnapshotResponse } from '@socotra/ec-react-schemas';
@@ -39,7 +41,7 @@ export declare const AccountForm: {
39
41
  * `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.
40
42
  */
41
43
  export declare const DraftTransactionForm: {
42
- ({ transactionSnapshot, handleSubmit, paramsChangeInstruction, modifyChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, coverageTerms, titles, }: Props_8): JSX_2.Element;
44
+ ({ transactionSnapshot, handleSubmit, paramsChangeInstruction, modifyChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, coverageTerms, titles, }: Props_9): JSX_2.Element;
43
45
  displayName: string;
44
46
  };
45
47
 
@@ -75,7 +77,7 @@ declare type GetPaymentFormDefaultFieldsProps = {
75
77
  * `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.
76
78
  */
77
79
  export declare const InitializedTransactionForm: {
78
- ({ elementResponse, handleSubmit, paramsChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, coverageTerms, titles, getEvaluatedConstraints, dependencyMap, }: Props_7): JSX_2.Element;
80
+ ({ elementResponse, handleSubmit, paramsChangeInstruction, preventFormResetOnDisabled, disabled, hideSubmitButton, validateOnSubmit, isSubmitting, submitButtonText, id, dataTypes, productModel, coverageTerms, titles, getEvaluatedConstraints, dependencyMap, }: Props_8): JSX_2.Element;
79
81
  displayName: string;
80
82
  };
81
83
 
@@ -517,6 +519,57 @@ declare type Props_6 = {
517
519
  };
518
520
 
519
521
  declare type Props_7 = {
522
+ /**
523
+ * Amount to reverse
524
+ */
525
+ amount: number;
526
+ /**
527
+ * The currency of the invoice
528
+ */
529
+ currency: CurrencyType;
530
+ /**
531
+ * The reversal types retrieved from data model
532
+ */
533
+ reversalTypes: ReversalTypeConfigRecord;
534
+ /**
535
+ * The function to call when the form is submitted. It will create an CreditDistributionReverseRequest from the form data.
536
+ */
537
+ handleSubmit: (data: CreditDistributionReverseRequest) => void;
538
+ /**
539
+ * Set to true when the form is submitting to set fields to readonly and disable the submit button
540
+ */
541
+ isSubmitting?: boolean;
542
+ /**
543
+ * Disables the form
544
+ */
545
+ disabled?: boolean;
546
+ /**
547
+ * Hides the submit button
548
+ */
549
+ hideSubmitButton?: boolean;
550
+ /**
551
+ * Whether to validate the form on submit
552
+ */
553
+ validateOnSubmit?: boolean;
554
+ /**
555
+ * The text to display on the submit button
556
+ */
557
+ submitButtonText?: string;
558
+ /**
559
+ * ID for the form wrapper
560
+ * */
561
+ id?: string;
562
+ /**
563
+ * Titles
564
+ */
565
+ titles?: {
566
+ formTitle?: string;
567
+ reversalType?: string;
568
+ amountToReverse?: string;
569
+ };
570
+ };
571
+
572
+ declare type Props_8 = {
520
573
  /**
521
574
  * The transaction snapshot object
522
575
  */
@@ -621,7 +674,7 @@ declare type Props_7 = {
621
674
  };
622
675
  };
623
676
 
624
- declare type Props_8 = {
677
+ declare type Props_9 = {
625
678
  /**
626
679
  * The transaction snapshot object
627
680
  */
@@ -699,4 +752,12 @@ export declare const QuoteForm: {
699
752
  displayName: string;
700
753
  };
701
754
 
755
+ /**
756
+ * Apply a payment to an existing invoice form
757
+ */
758
+ export declare const ReversePaymentForm: {
759
+ ({ amount, reversalTypes, currency, validateOnSubmit, hideSubmitButton, submitButtonText, handleSubmit, isSubmitting, disabled, id, titles, }: Props_7): JSX_2.Element;
760
+ displayName: string;
761
+ };
762
+
702
763
  export { }