skyflow-js 1.30.1 → 1.30.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/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.30.1]
6
+ ### Added
7
+ - Add requiredAsterisk style and global styles.
8
+
9
+ ## [1.30.0] - 2023-08-01
10
+ ### Added
11
+ - Add numeric keyboard support.
12
+
13
+ ## [1.29.5] - 2023-07-26
14
+ ### Fixed
15
+ - fix conditions for element mount.
16
+
17
+ ## [1.29.4] - 2023-07-20
18
+ ### Fixed
19
+ - fix reveal elements iframe race condition.
20
+
21
+ ## [1.29.3] - 2023-07-07
22
+ ### Fixed
23
+ - patch fix for previous version.
24
+
25
+ ## [1.29.2] - 2023-07-07
26
+ ### Fixed
27
+ - fix iframe race condition between collect element and container.
28
+
5
29
  ## [1.29.1] - 2023-06-22
6
30
  ### Fixed
7
31
  - Patch fix for autofill and iframe loading issue
package/README.md CHANGED
@@ -13,7 +13,7 @@ Skyflow’s JavaScript SDK can be used to securely collect, tokenize, and reveal
13
13
  - [**Securely collecting data client-side**](#securely-collecting-data-client-side)
14
14
  - [**Securely collecting data client-side using Composable Elements**](#securely-collecting-data-client-side-using-composable-elements)
15
15
  - [**Securely revealing data client-side**](#securely-revealing-data-client-side)
16
- - [**Securely deleting data cleint-side**](#securely-deleting-data-client-side)
16
+ - [**Securely deleting data client-side**](#securely-deleting-data-client-side)
17
17
 
18
18
  ---
19
19
 
@@ -240,6 +240,7 @@ The `inputStyles` field accepts a style object which consists of CSS properties
240
240
  * `invalid`: applied when the Element has invalid input
241
241
  * `cardIcon`: applied to the card type icon in CARD_NUMBER Element
242
242
  * `copyIcon`: applied to copy icon in Elements when enableCopy option is true
243
+ * `global`: used for global styles like font-family.
243
244
 
244
245
  Styles are specified with [JSS](https://cssinjs.org/?v=v10.7.1).
245
246
 
@@ -254,6 +255,7 @@ inputStyles: {
254
255
  '&:hover': { // Hover styles.
255
256
  borderColor: 'green'
256
257
  },
258
+ fontFamily: '"Roboto", sans-serif'
257
259
  },
258
260
  complete: {
259
261
  color: '#4caf50',
@@ -272,9 +274,13 @@ inputStyles: {
272
274
  position: 'absolute',
273
275
  right: '8px',
274
276
  },
277
+ global: {
278
+ '@import': 'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
279
+ }
275
280
  },
276
281
  ```
277
- The states that are available for `labelStyles` are `base` and `focus`.
282
+ The states that are available for `labelStyles` are `base`, `focus`, `global` and `requiredAsterisk`.
283
+ * `requiredAsterisk`: styles applied for the Asterisk symbol in the label.
278
284
 
279
285
  An example of a labelStyles object:
280
286
 
@@ -283,14 +289,21 @@ labelStyles: {
283
289
  base: {
284
290
  fontSize: '12px',
285
291
  fontWeight: 'bold',
292
+ fontFamily: '"Roboto", sans-serif'
286
293
  },
287
294
  focus: {
288
295
  color: '#1d1d1d',
289
296
  },
297
+ global: {
298
+ '@import' :'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
299
+ },
300
+ requiredAsterisk:{
301
+ color: 'red'
302
+ }
290
303
  },
291
304
  ```
292
305
 
293
- The state that is available for `errorTextStyles` is only the `base` state, it shows up when there is some error in the collect element.
306
+ The state that is available for `errorTextStyles` are `base` and `global`, it shows up when there is some error in the collect element.
294
307
 
295
308
  An example of a errorTextStyles object:
296
309
 
@@ -298,7 +311,11 @@ An example of a errorTextStyles object:
298
311
  errorTextStyles: {
299
312
  base: {
300
313
  color: '#f44336',
314
+ fontFamily: '"Roboto", sans-serif'
301
315
  },
316
+ global: {
317
+ '@import': 'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
318
+ }
302
319
  },
303
320
  ```
304
321
 
@@ -1176,7 +1193,11 @@ const options = {
1176
1193
  errorTextStyles: { // Optional
1177
1194
  base: {
1178
1195
  color: 'red',
1196
+ fontFamily: '"Roboto", sans-serif'
1179
1197
  },
1198
+ global: {
1199
+ '@import': 'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
1200
+ }
1180
1201
  },
1181
1202
  };
1182
1203
  ```
@@ -1213,6 +1234,7 @@ The `inputStyles` field accepts an object of CSS properties to apply to the form
1213
1234
  * `invalid`: applied when the Element has invalid input
1214
1235
  * `cardIcon`: applied to the card type icon in CARD_NUMBER Element
1215
1236
  * `copyIcon`: applied to copy icon in Elements when enableCopy option is true
1237
+ * `global`: used for global styles like font-family.
1216
1238
 
1217
1239
  An example of an `inputStyles` object:
1218
1240
 
@@ -1223,6 +1245,7 @@ inputStyles: {
1223
1245
  padding: '10px 16px',
1224
1246
  borderRadius: '4px',
1225
1247
  color: '#1d1d1d',
1248
+ fontFamily: '"Roboto", sans-serif'
1226
1249
  },
1227
1250
  complete: {
1228
1251
  color: '#4caf50',
@@ -1241,9 +1264,13 @@ inputStyles: {
1241
1264
  position: 'absolute',
1242
1265
  right: '8px',
1243
1266
  },
1267
+ global: {
1268
+ '@import': 'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
1269
+ }
1244
1270
  }
1245
1271
  ```
1246
- The `labelStyles` field supports the `base` and `focus` states.
1272
+ The states that are available for `labelStyles` are `base`, `focus`, `global`.
1273
+ * requiredAsterisk: styles applied for the Asterisk symbol in the label.
1247
1274
 
1248
1275
  An example `labelStyles` object:
1249
1276
 
@@ -1251,24 +1278,18 @@ An example `labelStyles` object:
1251
1278
  labelStyles: {
1252
1279
  base: {
1253
1280
  fontSize: '12px',
1254
- fontWeight: 'bold'
1281
+ fontWeight: 'bold',
1282
+ fontFamily: '"Roboto", sans-serif'
1255
1283
  },
1256
1284
  focus: {
1257
1285
  color: '#1d1d1d'
1286
+ },
1287
+ global: {
1288
+ '@import' :'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
1258
1289
  }
1259
1290
  }
1260
1291
  ```
1261
- The `errorTextStyles` field only supports the `base` state, which appears when there is an error in the composable element.
1262
1292
 
1263
- An example `errorTextStyles` object:
1264
-
1265
- ```javascript
1266
- errorTextStyles: {
1267
- base: {
1268
- color: '#f44336'
1269
- }
1270
- }
1271
- ```
1272
1293
  The JS SDK supports the following composable elements:
1273
1294
 
1274
1295
  - `CARDHOLDER_NAME`
@@ -1945,7 +1966,7 @@ const revealElement = {
1945
1966
 
1946
1967
  Note: If you don't provide a redaction type, RedactionType.PLAIN_TEXT will apply by default.
1947
1968
 
1948
- 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 for reveal element, `inputStyles` accepts only `base` variant and `copyIcon` style object.
1969
+ 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 for reveal element, `inputStyles` accepts only `base` variant, `copyIcon` and `global` style objects.
1949
1970
 
1950
1971
  An example of a inputStyles object:
1951
1972
 
@@ -1959,6 +1980,9 @@ inputStyles: {
1959
1980
  right: '8px',
1960
1981
  top: 'calc(50% - 10px)',
1961
1982
  },
1983
+ global: {
1984
+ '@import' :'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
1985
+ }
1962
1986
  },
1963
1987
  ```
1964
1988
 
@@ -1970,6 +1994,9 @@ labelStyles: {
1970
1994
  fontSize: '12px',
1971
1995
  fontWeight: 'bold',
1972
1996
  },
1997
+ global: {
1998
+ '@import' :'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
1999
+ }
1973
2000
  },
1974
2001
  ```
1975
2002
 
@@ -1980,6 +2007,9 @@ errorTextStyles: {
1980
2007
  base: {
1981
2008
  color: '#f44336',
1982
2009
  },
2010
+ global: {
2011
+ '@import' :'url("https://fonts.googleapis.com/css2?family=Roboto&display=swap")',
2012
+ }
1983
2013
  },
1984
2014
  ```
1985
2015