@socotra/ec-react-components 0.0.0-alpha.0 → 0.0.0-alpha.2

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
@@ -2,37 +2,30 @@ import { AccountConfigRecord } from '@socotra/ec-react-schemas';
2
2
  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
- import { default as default_2 } from '@rjsf/core';
6
- import { ElementConfig } from '@socotra/ec-react-schemas';
7
- import { ElementResponse } from '@socotra/ec-react-schemas';
8
- import { FormProps } from '@rjsf/core';
9
- import { ForwardRefExoticComponent } from 'react';
10
- import { ProductConfig } from '@socotra/ec-react-schemas';
11
- import { QuoteRequest } from '@socotra/ec-react-schemas';
12
- import { QuoteResponse } from '@socotra/ec-react-schemas';
13
- import { RefAttributes } from 'react';
14
- import { RJSFSchema } from '@rjsf/utils';
15
- import { UiSchema } from '@rjsf/utils';
5
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
16
6
 
17
7
  /**
18
8
  * 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/
19
9
  */
20
- export declare const AccountForm: ForwardRefExoticComponent<Omit<Props, "ref"> & RefAttributes<AccountFormRef>>;
21
-
22
- declare type AccountFormRef = default_2<TODO, RJSFSchema, TODO>;
10
+ export declare const AccountForm: {
11
+ ({ accountsModel, accountType, dataTypes, handleSubmit, hideSubmitButton, account, id, }: Props): JSX_2.Element;
12
+ displayName: string;
13
+ };
23
14
 
24
15
  /**
25
16
  * ElementForm is a form for updating a quote's element. It accepts a resolved data model, element locator, custom data types, and a quote object to build on.
26
17
  */
27
- export declare const ElementForm: ForwardRefExoticComponent<Omit<Props_3, "ref"> & RefAttributes<ElementFormRef>>;
28
-
29
- declare type ElementFormRef = default_2<TODO, RJSFSchema, TODO>;
18
+ export declare const ElementForm: () => JSX_2.Element;
30
19
 
31
20
  declare type Props = {
32
21
  /**
33
22
  * The resolved data model for accounts retrieved from the data model response
34
23
  */
35
24
  accountsModel: AccountConfigRecord;
25
+ /**
26
+ * The account type to use for the form
27
+ */
28
+ accountType: keyof AccountConfigRecord;
36
29
  /**
37
30
  * The custom data types for the configuration that may be referenced by the accountsModel
38
31
  */
@@ -41,10 +34,6 @@ declare type Props = {
41
34
  * The function to call when the form is submitted. It will create an AccountCreateRequest or AccountUpdateRequest based on the form data
42
35
  */
43
36
  handleSubmit: (data: AccountRequest) => void;
44
- /**
45
- * The custom UI schema for the form. Reference: https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/uiSchema/
46
- */
47
- uiSchema?: UiSchema;
48
37
  /**
49
38
  * The account object to put the form in update mode
50
39
  */
@@ -57,87 +46,11 @@ declare type Props = {
57
46
  * ID for the form wrapper
58
47
  * */
59
48
  id?: string;
60
- } & Partial<FormProps>;
61
-
62
- declare type Props_2 = {
63
- /**
64
- * The resolved data model for products retrieved from the data model response
65
- */
66
- productModel: ProductConfig;
67
- /**
68
- * The custom data types for the configuration that may be referenced by the productModel
69
- */
70
- dataTypes: DataTypeConfigRecord;
71
- /**
72
- * The function to call when the form is submitted. It will create an QuoteUpdateRequest.
73
- */
74
- handleSubmit: (data: QuoteRequest) => void;
75
- /**
76
- * The custom UI schema for the form. Reference: https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/uiSchema/
77
- */
78
- uiSchema?: UiSchema;
79
- /**
80
- * The quote object to build on
81
- */
82
- quote: QuoteResponse;
83
- /**
84
- * Hides the submit button
85
- */
86
- hideSubmitButton?: boolean;
87
- /**
88
- * Removes the default fields like Start and End time, delinquency plan name, etc.
89
- */
90
- hideDefaultFields?: boolean;
91
- /**
92
- * Removes the configured fields
93
- */
94
- hideConfiguredFields?: boolean;
95
- /**
96
- * ID for the form wrapper
97
- * */
98
- id?: string;
99
- } & Partial<FormProps>;
100
-
101
- declare type Props_3 = {
102
- /**
103
- * The resolved quote element to render. Find this by using the `retrieveElementFromQuoteByLocator` utility function.
104
- */
105
- element: ElementResponse;
106
- /**
107
- * The data model for the element you want to render. Find this by using the `retrieveDataModelFromElement` utility function.
108
- */
109
- elementModel: ElementConfig;
110
- /**
111
- * The custom data types for the configuration that may be referenced by the element model
112
- */
113
- dataTypes: DataTypeConfigRecord;
114
- /**
115
- * The locator for the quote element
116
- * */
117
- locator: string;
118
- /**
119
- * The function to call when the form is submitted. It will create a QuoteRequest.
120
- */
121
- handleSubmit: (data: QuoteRequest) => void;
122
- /**
123
- * The custom UI schema for the form. Reference: https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/uiSchema/
124
- */
125
- uiSchema?: UiSchema;
126
- /**
127
- * Hides the submit button
128
- */
129
- hideSubmitButton?: boolean;
130
- /**
131
- * ID for the form wrapper. Useful to submitting the form with a button outside the form.
132
- * */
133
- id?: string;
134
- } & Partial<FormProps>;
49
+ };
135
50
 
136
51
  /**
137
52
  * QuoteForm is a form for updating a quote. It accepts a resolved data model, custom data types, and a quote object to build on.
138
53
  */
139
- export declare const QuoteForm: ForwardRefExoticComponent<Omit<Props_2, "ref"> & RefAttributes<QuoteFormRef>>;
140
-
141
- declare type QuoteFormRef = default_2<TODO, RJSFSchema, TODO>;
54
+ export declare const QuoteForm: () => JSX_2.Element;
142
55
 
143
56
  export { }