@prosopo/procaptcha-bundle 0.2.1 → 0.2.4
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/cjs/index.cjs +62 -35
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -44
- package/dist/index.js.map +1 -1
- package/package.json +13 -9
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const types = require("@prosopo/types");
|
|
5
5
|
const common = require("@prosopo/common");
|
|
6
|
-
const procaptcha = require("@prosopo/procaptcha");
|
|
7
6
|
const procaptchaReact = require("@prosopo/procaptcha-react");
|
|
8
7
|
const util = require("@prosopo/util");
|
|
9
8
|
const client = require("react-dom/client");
|
|
@@ -42,7 +41,7 @@ function getConfig(siteKey) {
|
|
|
42
41
|
serverUrl: process.env.SERVER_URL || ""
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
|
|
44
|
+
const getParentForm = (element) => {
|
|
46
45
|
let parent = element.parentElement;
|
|
47
46
|
while (parent) {
|
|
48
47
|
if (parent.tagName === "FORM") {
|
|
@@ -51,43 +50,71 @@ function getParentForm(element) {
|
|
|
51
50
|
parent = parent.parentElement;
|
|
52
51
|
}
|
|
53
52
|
return null;
|
|
54
|
-
}
|
|
55
|
-
|
|
53
|
+
};
|
|
54
|
+
const getWindowCallback = (callbackName) => {
|
|
55
|
+
const fn = window[callbackName.replace("window.", "")];
|
|
56
|
+
if (typeof fn !== "function") {
|
|
57
|
+
throw new Error(`Callback ${callbackName} is not defined`);
|
|
58
|
+
}
|
|
59
|
+
return fn;
|
|
60
|
+
};
|
|
61
|
+
const handleOnHuman = (element, payload) => {
|
|
62
|
+
const form = getParentForm(element);
|
|
63
|
+
if (!form) {
|
|
64
|
+
console.error("Parent form not found for the element:", element);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const input = document.createElement("input");
|
|
68
|
+
input.type = "hidden";
|
|
69
|
+
input.name = types.ApiParams.procaptchaResponse;
|
|
70
|
+
input.value = JSON.stringify(payload);
|
|
71
|
+
form.appendChild(input);
|
|
72
|
+
};
|
|
73
|
+
const customThemeSet = /* @__PURE__ */ new Set(["light", "dark"]);
|
|
74
|
+
const validateTheme = (themeAttribute) => customThemeSet.has(themeAttribute) ? themeAttribute : "light";
|
|
75
|
+
const renderLogic = (elements, config, renderOptions) => {
|
|
76
|
+
elements.forEach((element) => {
|
|
77
|
+
const callbackName = (renderOptions == null ? void 0 : renderOptions.callback) || element.getAttribute("data-callback");
|
|
78
|
+
const chalExpiredCallbackName = (renderOptions == null ? void 0 : renderOptions["chalexpired-callback"]) || element.getAttribute("data-chalexpired-callback");
|
|
79
|
+
const errorCallback = (renderOptions == null ? void 0 : renderOptions["error-callback"]) || element.getAttribute("data-error-callback");
|
|
80
|
+
const callbacks = {
|
|
81
|
+
onHuman: (payload) => handleOnHuman(element, payload),
|
|
82
|
+
onChallengeExpired: () => {
|
|
83
|
+
console.log("Challenge expired");
|
|
84
|
+
},
|
|
85
|
+
onError: (error) => {
|
|
86
|
+
console.error(error);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
if (callbackName)
|
|
90
|
+
callbacks.onHuman = getWindowCallback(callbackName);
|
|
91
|
+
if (chalExpiredCallbackName)
|
|
92
|
+
callbacks.onChallengeExpired = getWindowCallback(chalExpiredCallbackName);
|
|
93
|
+
if (errorCallback)
|
|
94
|
+
callbacks.onError = getWindowCallback(errorCallback);
|
|
95
|
+
const themeAttribute = (renderOptions == null ? void 0 : renderOptions.theme) || element.getAttribute("data-theme") || "light";
|
|
96
|
+
config.theme = validateTheme(themeAttribute);
|
|
97
|
+
client.createRoot(element).render(/* @__PURE__ */ jsxRuntime.jsx(procaptchaReact.Procaptcha, { config, callbacks }));
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
const implicitRender = () => {
|
|
56
101
|
const elements = Array.from(document.getElementsByClassName("procaptcha"));
|
|
57
102
|
const siteKey = util.at(elements, 0).getAttribute("data-sitekey") || void 0;
|
|
58
103
|
const config = getConfig(siteKey);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
const customTheme = element.getAttribute(`data-custom-theme`);
|
|
71
|
-
if (customTheme) {
|
|
72
|
-
config["sx"] = JSON.parse(customTheme);
|
|
73
|
-
}
|
|
74
|
-
if (!callbacks["onHuman"]) {
|
|
75
|
-
callbacks["onHuman"] = function(payload) {
|
|
76
|
-
const form = getParentForm(element);
|
|
77
|
-
if (form) {
|
|
78
|
-
const input = document.createElement("input");
|
|
79
|
-
input.type = "hidden";
|
|
80
|
-
input.name = types.ApiParams.procaptchaResponse, input.value = JSON.stringify(payload);
|
|
81
|
-
form.appendChild(input);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
const root = client.createRoot(element);
|
|
86
|
-
root.render(/* @__PURE__ */ jsxRuntime.jsx(procaptchaReact.Procaptcha, { config, callbacks }));
|
|
104
|
+
renderLogic(elements, config);
|
|
105
|
+
};
|
|
106
|
+
const render = (elementId, renderOptions) => {
|
|
107
|
+
const siteKey = renderOptions.siteKey;
|
|
108
|
+
const config = getConfig(siteKey);
|
|
109
|
+
const element = document.getElementById(elementId);
|
|
110
|
+
if (!element) {
|
|
111
|
+
console.error("Element not found:", elementId);
|
|
112
|
+
return;
|
|
87
113
|
}
|
|
88
|
-
|
|
114
|
+
renderLogic([element], config, renderOptions);
|
|
115
|
+
};
|
|
89
116
|
function ready(fn) {
|
|
90
|
-
if (document && document.readyState
|
|
117
|
+
if (document && document.readyState !== "loading") {
|
|
91
118
|
console.log("document.readyState ready!");
|
|
92
119
|
fn();
|
|
93
120
|
} else {
|
|
@@ -95,6 +122,6 @@ function ready(fn) {
|
|
|
95
122
|
document.addEventListener("DOMContentLoaded", fn);
|
|
96
123
|
}
|
|
97
124
|
}
|
|
98
|
-
ready(
|
|
125
|
+
ready(implicitRender);
|
|
99
126
|
exports.default = ready;
|
|
100
127
|
exports.render = render;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface ProcaptchaRenderOptions {
|
|
2
|
+
siteKey: string;
|
|
3
|
+
theme?: 'light' | 'dark';
|
|
4
|
+
callback?: string;
|
|
5
|
+
'chalexpired-callback'?: string;
|
|
6
|
+
'error-callback'?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const render: (elementId: string, renderOptions: ProcaptchaRenderOptions) => void;
|
|
3
9
|
export default function ready(fn: () => void): void;
|
|
10
|
+
export {};
|
|
4
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAoBA,UAAU,uBAAuB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC5B;AA6HD,eAAO,MAAM,MAAM,cAAe,MAAM,iBAAiB,uBAAuB,SAW/E,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAQ3C"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
import { ApiParams, EnvironmentTypesSchema } from '@prosopo/types';
|
|
16
16
|
import { LogLevel } from '@prosopo/common';
|
|
17
|
-
import { ProcapchaEventNames } from '@prosopo/procaptcha';
|
|
18
17
|
import { Procaptcha } from '@prosopo/procaptcha-react';
|
|
19
18
|
import { at } from '@prosopo/util';
|
|
20
19
|
import { createRoot } from 'react-dom/client';
|
|
@@ -53,7 +52,7 @@ function getConfig(siteKey) {
|
|
|
53
52
|
serverUrl: process.env.SERVER_URL || '',
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
|
-
|
|
55
|
+
const getParentForm = (element) => {
|
|
57
56
|
let parent = element.parentElement;
|
|
58
57
|
while (parent) {
|
|
59
58
|
if (parent.tagName === 'FORM') {
|
|
@@ -62,59 +61,84 @@ function getParentForm(element) {
|
|
|
62
61
|
parent = parent.parentElement;
|
|
63
62
|
}
|
|
64
63
|
return null;
|
|
65
|
-
}
|
|
66
|
-
|
|
64
|
+
};
|
|
65
|
+
const getWindowCallback = (callbackName) => {
|
|
66
|
+
const fn = window[callbackName.replace('window.', '')];
|
|
67
|
+
if (typeof fn !== 'function') {
|
|
68
|
+
throw new Error(`Callback ${callbackName} is not defined`);
|
|
69
|
+
}
|
|
70
|
+
return fn;
|
|
71
|
+
};
|
|
72
|
+
const handleOnHuman = (element, payload) => {
|
|
73
|
+
const form = getParentForm(element);
|
|
74
|
+
if (!form) {
|
|
75
|
+
console.error('Parent form not found for the element:', element);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const input = document.createElement('input');
|
|
79
|
+
input.type = 'hidden';
|
|
80
|
+
input.name = ApiParams.procaptchaResponse;
|
|
81
|
+
input.value = JSON.stringify(payload);
|
|
82
|
+
form.appendChild(input);
|
|
83
|
+
};
|
|
84
|
+
const customThemeSet = new Set(['light', 'dark']);
|
|
85
|
+
const validateTheme = (themeAttribute) => customThemeSet.has(themeAttribute) ? themeAttribute : 'light';
|
|
86
|
+
const renderLogic = (elements, config, renderOptions) => {
|
|
87
|
+
elements.forEach((element) => {
|
|
88
|
+
const callbackName = renderOptions?.callback || element.getAttribute('data-callback');
|
|
89
|
+
const chalExpiredCallbackName = renderOptions?.['chalexpired-callback'] || element.getAttribute('data-chalexpired-callback');
|
|
90
|
+
const errorCallback = renderOptions?.['error-callback'] || element.getAttribute('data-error-callback');
|
|
91
|
+
// Setting up default callbacks object
|
|
92
|
+
const callbacks = {
|
|
93
|
+
onHuman: (payload) => handleOnHuman(element, payload),
|
|
94
|
+
onChallengeExpired: () => {
|
|
95
|
+
console.log('Challenge expired');
|
|
96
|
+
},
|
|
97
|
+
onError: (error) => {
|
|
98
|
+
console.error(error);
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
if (callbackName)
|
|
102
|
+
callbacks.onHuman = getWindowCallback(callbackName);
|
|
103
|
+
if (chalExpiredCallbackName)
|
|
104
|
+
callbacks.onChallengeExpired = getWindowCallback(chalExpiredCallbackName);
|
|
105
|
+
if (errorCallback)
|
|
106
|
+
callbacks.onError = getWindowCallback(errorCallback);
|
|
107
|
+
// Getting and setting the theme
|
|
108
|
+
const themeAttribute = renderOptions?.theme || element.getAttribute('data-theme') || 'light';
|
|
109
|
+
config.theme = validateTheme(themeAttribute);
|
|
110
|
+
createRoot(element).render(_jsx(Procaptcha, { config: config, callbacks: callbacks }));
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
// Implicit render for targeting all elements with class 'procaptcha'
|
|
114
|
+
const implicitRender = () => {
|
|
115
|
+
// Get elements with class 'procaptcha'
|
|
67
116
|
const elements = Array.from(document.getElementsByClassName('procaptcha'));
|
|
117
|
+
// Set siteKey from renderOptions or from the first element's data-sitekey attribute
|
|
68
118
|
const siteKey = at(elements, 0).getAttribute('data-sitekey') || undefined;
|
|
69
119
|
const config = getConfig(siteKey);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
// get the custom theme, if set
|
|
83
|
-
const customTheme = element.getAttribute(`data-custom-theme`);
|
|
84
|
-
if (customTheme) {
|
|
85
|
-
config['sx'] = JSON.parse(customTheme);
|
|
86
|
-
}
|
|
87
|
-
// set a default callback for onHuman, if not set
|
|
88
|
-
if (!callbacks['onHuman']) {
|
|
89
|
-
// append the prosopo payload to the containing form
|
|
90
|
-
callbacks['onHuman'] = function (payload) {
|
|
91
|
-
// get form
|
|
92
|
-
const form = getParentForm(element);
|
|
93
|
-
// add a listener to the onSubmit event of the form
|
|
94
|
-
if (form) {
|
|
95
|
-
// add the payload to the form
|
|
96
|
-
const input = document.createElement('input');
|
|
97
|
-
input.type = 'hidden';
|
|
98
|
-
(input.name = ApiParams.procaptchaResponse), (input.value = JSON.stringify(payload));
|
|
99
|
-
form.appendChild(input);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
const root = createRoot(element);
|
|
104
|
-
root.render(_jsx(Procaptcha, { config: config, callbacks: callbacks })); //wrap in fn and give user access to func
|
|
120
|
+
renderLogic(elements, config);
|
|
121
|
+
};
|
|
122
|
+
// Explicit render for targeting specific elements
|
|
123
|
+
export const render = (elementId, renderOptions) => {
|
|
124
|
+
const siteKey = renderOptions.siteKey;
|
|
125
|
+
const config = getConfig(siteKey);
|
|
126
|
+
const element = document.getElementById(elementId);
|
|
127
|
+
if (!element) {
|
|
128
|
+
console.error('Element not found:', elementId);
|
|
129
|
+
return;
|
|
105
130
|
}
|
|
106
|
-
|
|
107
|
-
|
|
131
|
+
renderLogic([element], config, renderOptions);
|
|
132
|
+
};
|
|
108
133
|
export default function ready(fn) {
|
|
109
|
-
if (document && document.readyState
|
|
134
|
+
if (document && document.readyState !== 'loading') {
|
|
110
135
|
console.log('document.readyState ready!');
|
|
111
136
|
fn();
|
|
112
137
|
}
|
|
113
138
|
else {
|
|
114
139
|
console.log('DOMContentLoaded listener!');
|
|
115
|
-
// note sure if this is the correct event listener
|
|
116
140
|
document.addEventListener('DOMContentLoaded', fn);
|
|
117
141
|
}
|
|
118
142
|
}
|
|
119
|
-
ready(
|
|
143
|
+
ready(implicitRender);
|
|
120
144
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,OAAO,EAAE,SAAS,EAAoB,sBAAsB,EAAoB,MAAM,gBAAgB,CAAA;AACtG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,OAAO,EAAE,SAAS,EAAoB,sBAAsB,EAAoB,MAAM,gBAAgB,CAAA;AACtG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAU7C,SAAS,SAAS,CAAC,OAAgB;IAC/B,IAAI,CAAC,OAAO,EAAE;QACV,OAAO,GAAG,OAA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AAC,CAAA;KACpD;AACL,CAAC;AAED,KAAK,CAAC,cAAc,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-bundle",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=16",
|
|
10
|
+
"npm": "8.9"
|
|
11
|
+
},
|
|
8
12
|
"exports": {
|
|
9
13
|
".": {
|
|
10
14
|
"import": "./dist/index.js",
|
|
@@ -31,11 +35,11 @@
|
|
|
31
35
|
"@emotion/styled": "^11.11.0",
|
|
32
36
|
"@mui/icons-material": "^5.14.3",
|
|
33
37
|
"@mui/material": "^5.14.5",
|
|
34
|
-
"@prosopo/common": "0.2.
|
|
35
|
-
"@prosopo/procaptcha": "0.2.
|
|
36
|
-
"@prosopo/procaptcha-react": "0.2.
|
|
37
|
-
"@prosopo/types": "0.2.
|
|
38
|
-
"@prosopo/util": "0.2.
|
|
38
|
+
"@prosopo/common": "0.2.4",
|
|
39
|
+
"@prosopo/procaptcha": "0.2.4",
|
|
40
|
+
"@prosopo/procaptcha-react": "0.2.4",
|
|
41
|
+
"@prosopo/types": "0.2.4",
|
|
42
|
+
"@prosopo/util": "0.2.4"
|
|
39
43
|
},
|
|
40
44
|
"repository": {
|
|
41
45
|
"type": "git",
|
|
@@ -51,11 +55,11 @@
|
|
|
51
55
|
},
|
|
52
56
|
"devDependencies": {
|
|
53
57
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
54
|
-
"@prosopo/config": "0.2.
|
|
58
|
+
"@prosopo/config": "0.2.4",
|
|
55
59
|
"@rollup/plugin-typescript": "^11.1.2",
|
|
56
60
|
"@vitejs/plugin-react": "^4.0.4",
|
|
57
|
-
"tslib": "
|
|
58
|
-
"typescript": "
|
|
61
|
+
"tslib": "2.6.2",
|
|
62
|
+
"typescript": "5.1.6",
|
|
59
63
|
"webpack-merge": "^5.9.0"
|
|
60
64
|
}
|
|
61
65
|
}
|