@jpmorgan-payments/embedded-finance-components 0.5.59 → 0.5.60
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/README.md +14 -0
- package/dist/esm/ef-components.js +19732 -17712
- package/dist/index.d.ts +5 -1
- package/dist/umd/ef-components.js +117 -117
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -229,6 +229,20 @@ By default VS Code will not trigger completions when editing "string" content, f
|
|
|
229
229
|
2. Export it in `./src/index.tsx`
|
|
230
230
|
3. Also add it to `./src/vanilla/componentRegistry.ts`
|
|
231
231
|
|
|
232
|
+
### Onboarding fieldMap.ts configuration
|
|
233
|
+
|
|
234
|
+
This configuration file is a mapping utility that connects form fields to API fields. It is designed to handle server errors and create request bodies for API interactions. The configuration is structured as a partyFieldMap object, which defines the mapping rules for various fields related to both organizations and individuals.
|
|
235
|
+
|
|
236
|
+
#### Key Components
|
|
237
|
+
|
|
238
|
+
- **Field Mapping**: Each form field is mapped to a corresponding API field using a path. This path indicates where the data should be placed in the API request or where it can be found in the API response.
|
|
239
|
+
|
|
240
|
+
- **Base Rules**: Each field has a baseRule that defines its default properties, such as visibility and required status. These rules determine whether a field is visible in the form and whether it is mandatory.
|
|
241
|
+
|
|
242
|
+
- **Conditional Rules**: Some fields have conditionalRules that modify the base rules based on specific conditions, such as the product type or jurisdiction. These rules allow for dynamic adjustments to field properties.
|
|
243
|
+
|
|
244
|
+
- **Transformation Functions**: Fields that require data transformation between the form and the API use fromResponseFn and toRequestFn functions. These functions handle the conversion of data formats, such as phone numbers.
|
|
245
|
+
|
|
232
246
|
## npm scripts
|
|
233
247
|
|
|
234
248
|
## Build and dev scripts
|