@blotoutio/providers-auto-form-fill-sdk 0.46.0 → 0.47.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/index.cjs.js CHANGED
@@ -83,10 +83,10 @@ const extractFields = (formSelector) => {
83
83
  };
84
84
  const updateFormFields = (formSelector, keys, cachedKvData) => {
85
85
  try {
86
- formSelector = formSelector.trim();
87
- const formElement = document.querySelector(formSelector);
88
- const formattedSelector = `AUTO_FILL_${formSelector}`;
89
- if (!formSelector ||
86
+ const formSelectorValue = formSelector.trim();
87
+ const formElement = document.querySelector(formSelectorValue);
88
+ const formattedSelector = `AUTO_FILL_${formSelectorValue}`;
89
+ if (!formSelectorValue ||
90
90
  !formElement ||
91
91
  !(formattedSelector in { ...keys, ...cachedKvData })) {
92
92
  return false;
@@ -125,12 +125,13 @@ const getFormattedSelectorName = (selector) => {
125
125
  };
126
126
 
127
127
  const sendAutoFillCountToWorker = (successCount, getEdgeData, sendEdgeData) => {
128
- if (successCount) {
128
+ let successCountValue = successCount;
129
+ if (successCountValue) {
129
130
  getEdgeData([formFillCountKey], (keys) => {
130
131
  if (!isNaN(parseInt(keys[formFillCountKey]))) {
131
- successCount = successCount + parseInt(keys[formFillCountKey]);
132
+ successCountValue = successCountValue + parseInt(keys[formFillCountKey]);
132
133
  }
133
- sendEdgeData({ [formFillCountKey]: successCount.toString() }, {}, { method: 'beacon' });
134
+ sendEdgeData({ [formFillCountKey]: successCountValue.toString() }, {}, { method: 'beacon' });
134
135
  });
135
136
  }
136
137
  };
package/index.js CHANGED
@@ -84,10 +84,10 @@ var ProvidersAutoFormFillSdk = (function () {
84
84
  };
85
85
  const updateFormFields = (formSelector, keys, cachedKvData) => {
86
86
  try {
87
- formSelector = formSelector.trim();
88
- const formElement = document.querySelector(formSelector);
89
- const formattedSelector = `AUTO_FILL_${formSelector}`;
90
- if (!formSelector ||
87
+ const formSelectorValue = formSelector.trim();
88
+ const formElement = document.querySelector(formSelectorValue);
89
+ const formattedSelector = `AUTO_FILL_${formSelectorValue}`;
90
+ if (!formSelectorValue ||
91
91
  !formElement ||
92
92
  !(formattedSelector in { ...keys, ...cachedKvData })) {
93
93
  return false;
@@ -126,12 +126,13 @@ var ProvidersAutoFormFillSdk = (function () {
126
126
  };
127
127
 
128
128
  const sendAutoFillCountToWorker = (successCount, getEdgeData, sendEdgeData) => {
129
- if (successCount) {
129
+ let successCountValue = successCount;
130
+ if (successCountValue) {
130
131
  getEdgeData([formFillCountKey], (keys) => {
131
132
  if (!isNaN(parseInt(keys[formFillCountKey]))) {
132
- successCount = successCount + parseInt(keys[formFillCountKey]);
133
+ successCountValue = successCountValue + parseInt(keys[formFillCountKey]);
133
134
  }
134
- sendEdgeData({ [formFillCountKey]: successCount.toString() }, {}, { method: 'beacon' });
135
+ sendEdgeData({ [formFillCountKey]: successCountValue.toString() }, {}, { method: 'beacon' });
135
136
  });
136
137
  }
137
138
  };
package/index.mjs CHANGED
@@ -81,10 +81,10 @@ const extractFields = (formSelector) => {
81
81
  };
82
82
  const updateFormFields = (formSelector, keys, cachedKvData) => {
83
83
  try {
84
- formSelector = formSelector.trim();
85
- const formElement = document.querySelector(formSelector);
86
- const formattedSelector = `AUTO_FILL_${formSelector}`;
87
- if (!formSelector ||
84
+ const formSelectorValue = formSelector.trim();
85
+ const formElement = document.querySelector(formSelectorValue);
86
+ const formattedSelector = `AUTO_FILL_${formSelectorValue}`;
87
+ if (!formSelectorValue ||
88
88
  !formElement ||
89
89
  !(formattedSelector in { ...keys, ...cachedKvData })) {
90
90
  return false;
@@ -123,12 +123,13 @@ const getFormattedSelectorName = (selector) => {
123
123
  };
124
124
 
125
125
  const sendAutoFillCountToWorker = (successCount, getEdgeData, sendEdgeData) => {
126
- if (successCount) {
126
+ let successCountValue = successCount;
127
+ if (successCountValue) {
127
128
  getEdgeData([formFillCountKey], (keys) => {
128
129
  if (!isNaN(parseInt(keys[formFillCountKey]))) {
129
- successCount = successCount + parseInt(keys[formFillCountKey]);
130
+ successCountValue = successCountValue + parseInt(keys[formFillCountKey]);
130
131
  }
131
- sendEdgeData({ [formFillCountKey]: successCount.toString() }, {}, { method: 'beacon' });
132
+ sendEdgeData({ [formFillCountKey]: successCountValue.toString() }, {}, { method: 'beacon' });
132
133
  });
133
134
  }
134
135
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-auto-form-fill-sdk",
3
- "version": "0.46.0",
3
+ "version": "0.47.0",
4
4
  "description": "Auto Form Fill Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",