@notabene/javascript-sdk
Advanced tools
Comparing version 1.17.1 to 1.18.0
@@ -80,2 +80,6 @@ var $4mxld$jsxpragmatic = require("jsx-pragmatic"); | ||
required: false | ||
}, | ||
fieldsProps: { | ||
type: 'object', | ||
required: false | ||
} | ||
@@ -222,2 +226,3 @@ }; | ||
beneficiaryDetails: this.config.beneficiaryDetails, | ||
fieldsProps: this.config.fieldsProps, | ||
onRequireAdditionalInformation: ()=>{ | ||
@@ -241,3 +246,3 @@ this.popup.updateProps({ | ||
}); | ||
builtWidget.event.on(($parcel$interopDefault($4mxld$zoid)).EVENT.RENDERED, (err)=>{ | ||
builtWidget.event.on(($parcel$interopDefault($4mxld$zoid)).EVENT.RENDERED, ()=>{ | ||
this.widgetRendered = true; | ||
@@ -308,2 +313,3 @@ this.cleanUpDestroyedComponents(); | ||
beneficiaryDetails: this.config.beneficiaryDetails, | ||
fieldsProps: this.config.fieldsProps, | ||
storeTransaction: (tx)=>{ | ||
@@ -333,3 +339,3 @@ this.setTransaction(tx); | ||
}); | ||
builtPopup.event.on(($parcel$interopDefault($4mxld$zoid)).EVENT.RENDERED, (err)=>{ | ||
builtPopup.event.on(($parcel$interopDefault($4mxld$zoid)).EVENT.RENDERED, ()=>{ | ||
this.popupRendered = true; | ||
@@ -336,0 +342,0 @@ this.cleanUpDestroyedComponents(); |
@@ -11,5 +11,5 @@ { | ||
"license": "MIT", | ||
"version": "1.17.1", | ||
"version": "1.18.0", | ||
"main": "dist/index.js", | ||
"packageManager": "yarn@3.2.1", | ||
"packageManager": "yarn@3.2.2", | ||
"browserslist": "> 0.5%, last 2 versions, not dead", | ||
@@ -16,0 +16,0 @@ "targets": { |
@@ -173,7 +173,33 @@ <div align="center"> | ||
**Beneficiary Details** | ||
**Fields Properties** | ||
Possible fields: | ||
- `counterparty` - Counterparty VASP or Wallet (destination or originator) | ||
- `geographicAddress` - Recipient Address | ||
**Field Options** | ||
- **forceDisplay** - Force a field that is not required by your jurisdiction to be displayed - defaults to **false** | ||
- **optional** - Bypass the jurisdiction rules validation for that specific field - defaults to **false** | ||
```js | ||
{ | ||
counterparty: { | ||
optional: true; // Allow customer to skip this field even if the jurisdiction requires it | ||
}, | ||
geographicAddress: { | ||
forceDisplay: true, // Always display geographic address field even if the jurisdiction does not require it | ||
optional: true; // Allow customer to skip this field even if the jurisdiction requires it | ||
}, | ||
} | ||
``` | ||
--- | ||
**_Beneficiary Details_** [DEPRECATED] | ||
You can require specific beneficiary fields that are not required by your jurisdiction. | ||
Field options: | ||
Possible fields: | ||
@@ -180,0 +206,0 @@ - `beneficiaryName` - Recipient Name |
// @ts-ignore | ||
import { dom, node } from 'jsx-pragmatic'; | ||
import { | ||
FieldsProps, | ||
NonCustodialDeclarationType, | ||
@@ -25,3 +26,4 @@ Theme, | ||
nonCustodialDeclarationType?: NonCustodialDeclarationType; | ||
beneficiaryDetails?: string[]; | ||
beneficiaryDetails?: string[]; // @deprecated beneficiaryDetails - do not delete yet | ||
fieldsProps?: FieldsProps; | ||
} | ||
@@ -171,2 +173,3 @@ | ||
beneficiaryDetails: this.config.beneficiaryDetails, | ||
fieldsProps: this.config.fieldsProps, | ||
onRequireAdditionalInformation: () => { | ||
@@ -191,3 +194,3 @@ this.popup.updateProps({ | ||
builtWidget.event.on(zoid.EVENT.RENDERED, (err: any) => { | ||
builtWidget.event.on(zoid.EVENT.RENDERED, () => { | ||
this.widgetRendered = true; | ||
@@ -262,2 +265,3 @@ this.cleanUpDestroyedComponents(); | ||
beneficiaryDetails: this.config.beneficiaryDetails, | ||
fieldsProps: this.config.fieldsProps, | ||
storeTransaction: (tx: Transaction) => { | ||
@@ -288,3 +292,3 @@ this.setTransaction(tx); | ||
builtPopup.event.on(zoid.EVENT.RENDERED, (err: any) => { | ||
builtPopup.event.on(zoid.EVENT.RENDERED, () => { | ||
this.popupRendered = true; | ||
@@ -291,0 +295,0 @@ this.cleanUpDestroyedComponents(); |
@@ -78,1 +78,12 @@ import { DateAndPlaceOfBirth, NationalIdentification } from 'ivms/types'; | ||
}; | ||
export type FieldProps = { | ||
forceDisplay?: boolean; // instead of beneficiaryDetails - defaults to false | ||
optional?: boolean; // bypass the jurisdiction rules validation - defaults to false | ||
}; | ||
export type FieldName = 'geographicAddress' | 'counterparty'; | ||
export type FieldsProps = { | ||
[name in FieldName]?: FieldProps; | ||
}; |
@@ -42,2 +42,6 @@ const generalProps = { | ||
}, | ||
fieldsProps: { | ||
type: 'object', | ||
required: false, | ||
}, | ||
}; | ||
@@ -44,0 +48,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
156710
1107
237