skyflow-js 1.10.0 → 1.11.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/CHANGELOG.md CHANGED
@@ -2,11 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.11.0] - 2022-01-25
6
+
7
+ ### Added
8
+ - `replaceText` option for `RevealElement`
5
9
 
6
10
  ## [1.10.0] - 2022-01-25
7
11
 
8
12
  ### Added
9
13
  - `formatRegex` option for `RevealElement`
14
+
10
15
  ## [1.9.1] - 2022-01-11
11
16
 
12
17
  ### Fixed
package/README.md CHANGED
@@ -872,14 +872,9 @@ const revealElement = {
872
872
  altText: "string" //optional, string that is shown before reveal, will show token if altText is not provided
873
873
  }
874
874
 
875
- const revealElementOptions = {
876
- formatRegex: RegExp //optional, regex to specify the format on the value that has been revealed
877
- }
878
875
  ```
879
876
  `Note`:
880
877
  - `token` is optional only if it is being used in invokeConnection()
881
- - If revealElement has a formatRegex option and on invoking container.reveal() method, it will first reveal the token and then apply the formatRegex match, and then render it in UI
882
- - If there are multiple matches found with the given formatRegex option, then always the first match is applied to the revealed value
883
878
 
884
879
  The `inputStyles`, `labelStyles` and `errorTextStyles` parameters accepts a styles object as described in the [previous section](#step-2-create-a-collect-element) for collecting data but only a single variant is available i.e. base.
885
880
 
@@ -917,7 +912,7 @@ errorTextStyles: {
917
912
  Once you've defined a Skyflow Element, you can use the `create(element)` method of the container to create the Element as shown below:
918
913
 
919
914
  ```javascript
920
- const element = container.create(revealElement, revealElementOptions)
915
+ const element = container.create(revealElement)
921
916
  ```
922
917
 
923
918
  ### Step 3: Mount Elements to the DOM
@@ -1248,8 +1243,8 @@ Please ensure that the paths configured in the responseXML are present in the ac
1248
1243
 
1249
1244
  // step 1
1250
1245
  const skyflowClient = skyflow.init({
1251
- vaultID: '<vault_ID>', // optional, required only when a revealElement has formatRegex option set
1252
- vaultURL: '<vault_URL>', // optional, required only when a revealElement has formatRegex option set
1246
+ vaultID: '<vault_ID>', // optional
1247
+ vaultURL: '<vault_URL>', // optional
1253
1248
  getBearerToken: '<helperFunc>'
1254
1249
  });
1255
1250
 
@@ -1271,8 +1266,6 @@ expiryMonthElement.mount("#expirationMonth")
1271
1266
 
1272
1267
  const expiryYearElement = revealContainer.create({
1273
1268
  token: "<expiry_year_token>"
1274
- }, {
1275
- formatRegex: /^..$/ // only last 2 characters are sent for invoking connection
1276
1269
  })
1277
1270
  expiryYearElement.mount("#expirationYear")
1278
1271
 
@@ -1388,6 +1381,4 @@ Sample Response on failure:
1388
1381
  1. For uniquely identifiable tag, we can give the elementID within a skyflow tag directly corresponding to the actual value.
1389
1382
  Please refer to the CVV tag in the above example. Here, we wish to strip the actual value present within the CVV tag.
1390
1383
  2. For arrays, since we have multiple tags with the same name, we will need to provide identifiers to uniquely identify the required tag.
1391
- Please refer to HeaderItem tag. Here, we have provided NodeId within the Name tag which acts as an identifier and we wish to strip the actual value present in the Value tag.
1392
- - In requestXML, if revealElement has a formatRegex option, it will first reveal the token and then apply the formatRegex match, and then sent it to invokeConnections/invokeSoapConnections
1393
- - In responseXML, if revealElement has a formatRegex option, then value is revealed in the UI according to the match found with respect to the given formatRegex
1384
+ Please refer to HeaderItem tag. Here, we have provided NodeId within the Name tag which acts as an identifier and we wish to strip the actual value present in the Value tag.