@captchafox/react 1.9.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/dist/index.cjs +13 -2
- package/dist/index.js +13 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -109,6 +109,12 @@ function loadCaptchaScript() {
|
|
|
109
109
|
return withRetry(() => loadScript(props));
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
+
var setVersion = (name) => {
|
|
113
|
+
window._tsdk = {
|
|
114
|
+
n: name,
|
|
115
|
+
v: "1.11.0"
|
|
116
|
+
};
|
|
117
|
+
};
|
|
112
118
|
var isApiReady = () => typeof (window == null ? void 0 : window.captchafox) !== "undefined";
|
|
113
119
|
|
|
114
120
|
// src/CaptchaFox.tsx
|
|
@@ -127,7 +133,9 @@ var CaptchaFox = (0, import_react.forwardRef)(
|
|
|
127
133
|
onVerify,
|
|
128
134
|
onLoad,
|
|
129
135
|
onFail,
|
|
130
|
-
onClose
|
|
136
|
+
onClose,
|
|
137
|
+
onChallengeChange,
|
|
138
|
+
onChallengeOpen
|
|
131
139
|
}, ref) => {
|
|
132
140
|
const [containerRef, setContainerRef] = (0, import_react.useState)();
|
|
133
141
|
const [widgetId, setWidgetId] = (0, import_react.useState)();
|
|
@@ -187,6 +195,7 @@ var CaptchaFox = (0, import_react.forwardRef)(
|
|
|
187
195
|
}
|
|
188
196
|
}, [widgetId]);
|
|
189
197
|
(0, import_react.useEffect)(() => {
|
|
198
|
+
setVersion("rj");
|
|
190
199
|
return () => {
|
|
191
200
|
clearEvents();
|
|
192
201
|
};
|
|
@@ -252,7 +261,9 @@ var CaptchaFox = (0, import_react.forwardRef)(
|
|
|
252
261
|
onError,
|
|
253
262
|
onFail,
|
|
254
263
|
onClose,
|
|
255
|
-
onVerify
|
|
264
|
+
onVerify,
|
|
265
|
+
onChallengeChange,
|
|
266
|
+
onChallengeOpen
|
|
256
267
|
});
|
|
257
268
|
if (!newWidgetId) {
|
|
258
269
|
return;
|
package/dist/index.js
CHANGED
|
@@ -71,6 +71,12 @@ function loadCaptchaScript() {
|
|
|
71
71
|
return withRetry(() => loadScript(props));
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
+
var setVersion = (name) => {
|
|
75
|
+
window._tsdk = {
|
|
76
|
+
n: name,
|
|
77
|
+
v: "1.11.0"
|
|
78
|
+
};
|
|
79
|
+
};
|
|
74
80
|
var isApiReady = () => typeof (window == null ? void 0 : window.captchafox) !== "undefined";
|
|
75
81
|
|
|
76
82
|
// src/CaptchaFox.tsx
|
|
@@ -89,7 +95,9 @@ var CaptchaFox = forwardRef(
|
|
|
89
95
|
onVerify,
|
|
90
96
|
onLoad,
|
|
91
97
|
onFail,
|
|
92
|
-
onClose
|
|
98
|
+
onClose,
|
|
99
|
+
onChallengeChange,
|
|
100
|
+
onChallengeOpen
|
|
93
101
|
}, ref) => {
|
|
94
102
|
const [containerRef, setContainerRef] = useState();
|
|
95
103
|
const [widgetId, setWidgetId] = useState();
|
|
@@ -149,6 +157,7 @@ var CaptchaFox = forwardRef(
|
|
|
149
157
|
}
|
|
150
158
|
}, [widgetId]);
|
|
151
159
|
useEffect(() => {
|
|
160
|
+
setVersion("rj");
|
|
152
161
|
return () => {
|
|
153
162
|
clearEvents();
|
|
154
163
|
};
|
|
@@ -214,7 +223,9 @@ var CaptchaFox = forwardRef(
|
|
|
214
223
|
onError,
|
|
215
224
|
onFail,
|
|
216
225
|
onClose,
|
|
217
|
-
onVerify
|
|
226
|
+
onVerify,
|
|
227
|
+
onChallengeChange,
|
|
228
|
+
onChallengeOpen
|
|
218
229
|
});
|
|
219
230
|
if (!newWidgetId) {
|
|
220
231
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@captchafox/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": ">=16.8.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@captchafox/types": "^1.
|
|
38
|
+
"@captchafox/types": "^1.4.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@captchafox/tsconfig": "*",
|