@blotoutio/providers-auto-form-fill-sdk 0.20.0 → 0.22.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.
Files changed (2) hide show
  1. package/index.js +10 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -89,7 +89,7 @@ var ProvidersAutoFormFillSdk = (function () {
89
89
  const formattedSelector = `AUTO_FILL_${formSelector}`;
90
90
  if (!formSelector ||
91
91
  !formElement ||
92
- !(formattedSelector in Object.assign(Object.assign({}, keys), cachedKvData))) {
92
+ !(formattedSelector in { ...keys, ...cachedKvData })) {
93
93
  return false;
94
94
  }
95
95
  const isDataCached = Object.keys(cachedKvData).includes(formattedSelector);
@@ -150,7 +150,7 @@ var ProvidersAutoFormFillSdk = (function () {
150
150
  }
151
151
  // forms which are present in curr page
152
152
  const curFormSelectors = formSelectors.filter((item) => item && document.querySelector(item) != null);
153
- if (!curFormSelectors || !curFormSelectors.length) {
153
+ if (!curFormSelectors.length) {
154
154
  return;
155
155
  }
156
156
  const formattedSelectors = curFormSelectors.map((item) => getFormattedSelectorName(item));
@@ -169,7 +169,13 @@ var ProvidersAutoFormFillSdk = (function () {
169
169
  if (formattedSelector in keys && result === true) {
170
170
  const curSessionData = JSON.parse(sessionStorage.getItem(keyName) || '{}');
171
171
  const curKvData = (_a = curSessionData['kv']) !== null && _a !== void 0 ? _a : {};
172
- sessionStorage.setItem(keyName, JSON.stringify(Object.assign(Object.assign({}, curSessionData), { kv: Object.assign(Object.assign({}, curKvData), { [formattedSelector]: keys[formattedSelector].toString() }) })));
172
+ sessionStorage.setItem(keyName, JSON.stringify({
173
+ ...curSessionData,
174
+ kv: {
175
+ ...curKvData,
176
+ [formattedSelector]: keys[formattedSelector].toString(),
177
+ },
178
+ }));
173
179
  }
174
180
  });
175
181
  sendAutoFillCountToWorker(successCount, getEdgeData, sendEdgeData);
@@ -210,7 +216,7 @@ var ProvidersAutoFormFillSdk = (function () {
210
216
  window.edgetagProviders.push(data);
211
217
  }
212
218
  }
213
- catch (_a) {
219
+ catch {
214
220
  // No window
215
221
  }
216
222
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-auto-form-fill-sdk",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "description": "Auto Form Fill Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",