infinity-forge 3.5.6 → 3.5.7
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/infinity-forge.css +0 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js +4 -4
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js.map +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/styles.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/styles.js.map +1 -1
- package/dist/ui/components/form/handler/form-handler/index.js +8 -33
- package/dist/ui/components/form/handler/form-handler/index.js.map +1 -1
- package/dist/ui/components/form/handler/form-handler/use-handle-errors.d.ts +8 -0
- package/dist/ui/components/form/handler/form-handler/use-handle-errors.js +59 -0
- package/dist/ui/components/form/handler/form-handler/use-handle-errors.js.map +1 -0
- package/dist/ui/components/form/handler/interfaces.d.ts +7 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/integrations/google/index.d.ts +1 -0
- package/dist/ui/integrations/google/index.js +18 -0
- package/dist/ui/integrations/google/index.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.d.ts +35 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.js +102 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.d.ts +6 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.js +78 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.d.ts +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.js +92 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/index.d.ts +4 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/index.js +21 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/index.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.d.ts +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.js +8 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/utils.d.ts +52 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/utils.js +147 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/utils.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.d.ts +6 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.js +28 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/index.d.ts +4 -0
- package/dist/ui/integrations/google/recaptcha-v3/index.js +80 -0
- package/dist/ui/integrations/google/recaptcha-v3/index.js.map +1 -0
- package/dist/ui/integrations/index.d.ts +1 -0
- package/dist/ui/integrations/index.js +18 -0
- package/dist/ui/integrations/index.js.map +1 -0
- package/dist/ui/integrations/message-provider/index.d.ts +0 -0
- package/dist/ui/integrations/message-provider/index.js +1 -0
- package/dist/ui/integrations/message-provider/index.js.map +1 -0
- package/dist/ui/integrations/message-provider/send-message.d.ts +1 -0
- package/dist/ui/integrations/message-provider/send-message.js +54 -0
- package/dist/ui/integrations/message-provider/send-message.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.GoogleReCaptcha = void 0;
|
|
40
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
var react_1 = require("react");
|
|
42
|
+
var use_google_recaptcha_1 = require("./use-google-recaptcha.js");
|
|
43
|
+
var utils_1 = require("./utils.js");
|
|
44
|
+
function GoogleReCaptcha(_a) {
|
|
45
|
+
var _this = this;
|
|
46
|
+
var action = _a.action, onVerify = _a.onVerify, refreshReCaptcha = _a.refreshReCaptcha;
|
|
47
|
+
var googleRecaptchaContextValue = (0, use_google_recaptcha_1.useGoogleReCaptcha)();
|
|
48
|
+
(0, react_1.useEffect)(function () {
|
|
49
|
+
var executeRecaptcha = googleRecaptchaContextValue.executeRecaptcha;
|
|
50
|
+
if (!executeRecaptcha) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
var handleExecuteRecaptcha = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
54
|
+
var token;
|
|
55
|
+
return __generator(this, function (_a) {
|
|
56
|
+
switch (_a.label) {
|
|
57
|
+
case 0: return [4 /*yield*/, executeRecaptcha(action)];
|
|
58
|
+
case 1:
|
|
59
|
+
token = _a.sent();
|
|
60
|
+
if (!onVerify) {
|
|
61
|
+
(0, utils_1.logWarningMessage)('Please define an onVerify function');
|
|
62
|
+
return [2 /*return*/];
|
|
63
|
+
}
|
|
64
|
+
onVerify(token);
|
|
65
|
+
return [2 /*return*/];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}); };
|
|
69
|
+
handleExecuteRecaptcha();
|
|
70
|
+
}, [action, onVerify, refreshReCaptcha, googleRecaptchaContextValue]);
|
|
71
|
+
var container = googleRecaptchaContextValue.container;
|
|
72
|
+
if (typeof container === 'string') {
|
|
73
|
+
return (0, jsx_runtime_1.jsx)("div", { id: container });
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
exports.GoogleReCaptcha = GoogleReCaptcha;
|
|
78
|
+
//# sourceMappingURL=google-recaptcha.js.map
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-recaptcha.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyC;AACzC,+DAA4D;AAC5D,iCAA4C;AAQ5C,SAAgB,eAAe,CAAC,EAIR;IAJxB,iBAoCC;QAnCC,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,gBAAgB,sBAAA;IAEhB,IAAM,2BAA2B,GAAG,IAAA,yCAAkB,GAAE,CAAC;IAEzD,IAAA,iBAAS,EAAC;QACA,IAAA,gBAAgB,GAAK,2BAA2B,iBAAhC,CAAiC;QAEzD,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,OAAO;QACT,CAAC;QAED,IAAM,sBAAsB,GAAG;;;;4BACf,qBAAM,gBAAgB,CAAC,MAAM,CAAC,EAAA;;wBAAtC,KAAK,GAAG,SAA8B;wBAE5C,IAAI,CAAC,QAAQ,EAAE,CAAC;4BACd,IAAA,yBAAiB,EAAC,oCAAoC,CAAC,CAAC;4BAExD,sBAAO;wBACT,CAAC;wBAED,QAAQ,CAAC,KAAK,CAAC,CAAC;;;;aACjB,CAAC;QAEF,sBAAsB,EAAE,CAAC;IAC3B,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,2BAA2B,CAAC,CAAC,CAAC;IAE9D,IAAA,SAAS,GAAK,2BAA2B,UAAhC,CAAiC;IAElD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,gCAAK,EAAE,EAAE,SAAS,GAAI,CAAC;IAChC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApCD,0CAoCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function hoistNonReactStatics(targetComponent: any, sourceComponent: any, excludelist?: any): any;
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Copyright 2015, Yahoo! Inc.
|
|
5
|
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|
6
|
+
*/
|
|
7
|
+
var react_is_1 = require("react-is");
|
|
8
|
+
var REACT_STATICS = {
|
|
9
|
+
childContextTypes: true,
|
|
10
|
+
contextType: true,
|
|
11
|
+
contextTypes: true,
|
|
12
|
+
defaultProps: true,
|
|
13
|
+
displayName: true,
|
|
14
|
+
getDefaultProps: true,
|
|
15
|
+
getDerivedStateFromError: true,
|
|
16
|
+
getDerivedStateFromProps: true,
|
|
17
|
+
mixins: true,
|
|
18
|
+
propTypes: true,
|
|
19
|
+
type: true
|
|
20
|
+
};
|
|
21
|
+
var KNOWN_STATICS = {
|
|
22
|
+
name: true,
|
|
23
|
+
length: true,
|
|
24
|
+
prototype: true,
|
|
25
|
+
caller: true,
|
|
26
|
+
callee: true,
|
|
27
|
+
arguments: true,
|
|
28
|
+
arity: true
|
|
29
|
+
};
|
|
30
|
+
var FORWARD_REF_STATICS = {
|
|
31
|
+
'$$typeof': true,
|
|
32
|
+
render: true,
|
|
33
|
+
defaultProps: true,
|
|
34
|
+
displayName: true,
|
|
35
|
+
propTypes: true
|
|
36
|
+
};
|
|
37
|
+
var MEMO_STATICS = {
|
|
38
|
+
'$$typeof': true,
|
|
39
|
+
compare: true,
|
|
40
|
+
defaultProps: true,
|
|
41
|
+
displayName: true,
|
|
42
|
+
propTypes: true,
|
|
43
|
+
type: true,
|
|
44
|
+
};
|
|
45
|
+
var TYPE_STATICS = {};
|
|
46
|
+
TYPE_STATICS[react_is_1.ForwardRef] = FORWARD_REF_STATICS;
|
|
47
|
+
TYPE_STATICS[react_is_1.Memo] = MEMO_STATICS;
|
|
48
|
+
function getStatics(component) {
|
|
49
|
+
if ((0, react_is_1.isMemo)(component)) {
|
|
50
|
+
return MEMO_STATICS;
|
|
51
|
+
}
|
|
52
|
+
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
|
53
|
+
}
|
|
54
|
+
var defineProperty = Object.defineProperty;
|
|
55
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
56
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
57
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
58
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
59
|
+
var objectPrototype = Object.prototype;
|
|
60
|
+
function hoistNonReactStatics(targetComponent, sourceComponent, excludelist) {
|
|
61
|
+
if (typeof sourceComponent !== 'string') {
|
|
62
|
+
if (objectPrototype) {
|
|
63
|
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
64
|
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
65
|
+
hoistNonReactStatics(targetComponent, inheritedComponent, excludelist);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
var keys = getOwnPropertyNames(sourceComponent);
|
|
69
|
+
if (getOwnPropertySymbols) {
|
|
70
|
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
71
|
+
}
|
|
72
|
+
var targetStatics = getStatics(targetComponent);
|
|
73
|
+
var sourceStatics = getStatics(sourceComponent);
|
|
74
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
75
|
+
var key = keys[i];
|
|
76
|
+
if (!KNOWN_STATICS[key] &&
|
|
77
|
+
!(excludelist && excludelist[key]) &&
|
|
78
|
+
!(sourceStatics && sourceStatics[key]) &&
|
|
79
|
+
!(targetStatics && targetStatics[key])) {
|
|
80
|
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
81
|
+
try { // Avoid failures from read-only properties
|
|
82
|
+
defineProperty(targetComponent, key, descriptor);
|
|
83
|
+
}
|
|
84
|
+
catch (e) { }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return targetComponent;
|
|
89
|
+
}
|
|
90
|
+
exports.default = hoistNonReactStatics;
|
|
91
|
+
;
|
|
92
|
+
//# sourceMappingURL=hoist-non-react-statics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hoist-non-react-statics.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.ts"],"names":[],"mappings":";;AAAA;;;GAGG;AACH,qCAAoD;AAEpD,IAAM,aAAa,GAAG;IAClB,iBAAiB,EAAE,IAAI;IACvB,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,eAAe,EAAE,IAAI;IACrB,wBAAwB,E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e,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;gBACrD,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;YAClB,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC;AAnCD,uCAmCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./google-recaptcha-provider.js"), exports);
|
|
18
|
+
__exportStar(require("./google-recaptcha.js"), exports);
|
|
19
|
+
__exportStar(require("./with-google-recaptcha.js"), exports);
|
|
20
|
+
__exportStar(require("./use-google-recaptcha.js"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,qDAAmC;AACnC,0DAAwC;AACxC,yDAAuC"}
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGoogleReCaptcha: () => import("./google-recaptcha-provider.js").IGoogleReCaptchaConsumerProps;
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGoogleReCaptcha = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var google_recaptcha_provider_1 = require("./google-recaptcha-provider.js");
|
|
6
|
+
var useGoogleReCaptcha = function () { return (0, react_1.useContext)(google_recaptcha_provider_1.GoogleReCaptchaContext); };
|
|
7
|
+
exports.useGoogleReCaptcha = useGoogleReCaptcha;
|
|
8
|
+
//# sourceMappingURL=use-google-recaptcha.js.map
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-google-recaptcha.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.tsx"],"names":[],"mappings":";;;AAAA,+BAAmC;AACnC,yEAAqE;AAE9D,IAAM,kBAAkB,GAAG,cAAM,OAAA,IAAA,kBAAU,EAAC,kDAAsB,CAAC,EAAlC,CAAkC,CAAC;AAA9D,QAAA,kBAAkB,sBAA4C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
interface IInjectGoogleReCaptchaScriptParams {
|
|
2
|
+
render: string;
|
|
3
|
+
onLoadCallbackName: string;
|
|
4
|
+
useRecaptchaNet: boolean;
|
|
5
|
+
useEnterprise: boolean;
|
|
6
|
+
onLoad: () => void;
|
|
7
|
+
onError: () => void;
|
|
8
|
+
language?: string;
|
|
9
|
+
scriptProps?: {
|
|
10
|
+
nonce?: string;
|
|
11
|
+
defer?: boolean;
|
|
12
|
+
async?: boolean;
|
|
13
|
+
appendTo?: 'head' | 'body';
|
|
14
|
+
id?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Function to check if script has already been injected
|
|
19
|
+
*
|
|
20
|
+
* @param scriptId
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare const isScriptInjected: (scriptId: string) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Function to clean node of badge element
|
|
26
|
+
*
|
|
27
|
+
* @param container
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
export declare const cleanBadge: (container?: HTMLElement | string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Function to clean google recaptcha script
|
|
33
|
+
*
|
|
34
|
+
* @param scriptId
|
|
35
|
+
* @param container
|
|
36
|
+
*/
|
|
37
|
+
export declare const cleanGoogleRecaptcha: (scriptId: string, container?: HTMLElement | string) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Function to inject the google recaptcha script
|
|
40
|
+
*
|
|
41
|
+
* @param param0
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
export declare const injectGoogleReCaptchaScript: ({ render, onLoadCallbackName, language, onLoad, useRecaptchaNet, useEnterprise, scriptProps: { nonce, defer, async, id, appendTo } }: IInjectGoogleReCaptchaScriptParams) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Function to log warning message if it's not in production mode
|
|
47
|
+
*
|
|
48
|
+
* @param message String
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
export declare const logWarningMessage: (message: string) => void;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logWarningMessage = exports.injectGoogleReCaptchaScript = exports.cleanGoogleRecaptcha = exports.cleanBadge = exports.isScriptInjected = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Function to generate the src for the script tag
|
|
6
|
+
*
|
|
7
|
+
* @param param0
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
var generateGoogleRecaptchaSrc = function (_a) {
|
|
11
|
+
var useRecaptchaNet = _a.useRecaptchaNet, useEnterprise = _a.useEnterprise;
|
|
12
|
+
var hostName = useRecaptchaNet ? 'recaptcha.net' : 'google.com';
|
|
13
|
+
var script = useEnterprise ? 'enterprise.js' : 'api.js';
|
|
14
|
+
return "https://www.".concat(hostName, "/recaptcha/").concat(script);
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Function to clean the recaptcha_[language] script injected by the recaptcha.js
|
|
18
|
+
*/
|
|
19
|
+
var cleanGstaticRecaptchaScript = function () {
|
|
20
|
+
var script = document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]');
|
|
21
|
+
if (script) {
|
|
22
|
+
script.remove();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Function to check if script has already been injected
|
|
27
|
+
*
|
|
28
|
+
* @param scriptId
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
var isScriptInjected = function (scriptId) {
|
|
32
|
+
return !!document.querySelector("#".concat(scriptId));
|
|
33
|
+
};
|
|
34
|
+
exports.isScriptInjected = isScriptInjected;
|
|
35
|
+
/**
|
|
36
|
+
* Function to remove default badge
|
|
37
|
+
*
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
var removeDefaultBadge = function () {
|
|
41
|
+
var nodeBadge = document.querySelector('.grecaptcha-badge');
|
|
42
|
+
if (nodeBadge && nodeBadge.parentNode) {
|
|
43
|
+
document.body.removeChild(nodeBadge.parentNode);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Function to clear custom badge
|
|
48
|
+
*
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
var cleanCustomBadge = function (customBadge) {
|
|
52
|
+
if (!customBadge) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
while (customBadge.lastChild) {
|
|
56
|
+
customBadge.lastChild.remove();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Function to clean node of badge element
|
|
61
|
+
*
|
|
62
|
+
* @param container
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
var cleanBadge = function (container) {
|
|
66
|
+
if (!container) {
|
|
67
|
+
removeDefaultBadge();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
var customBadge = typeof container === 'string' ? document.getElementById(container) : container;
|
|
71
|
+
cleanCustomBadge(customBadge);
|
|
72
|
+
};
|
|
73
|
+
exports.cleanBadge = cleanBadge;
|
|
74
|
+
/**
|
|
75
|
+
* Function to clean google recaptcha script
|
|
76
|
+
*
|
|
77
|
+
* @param scriptId
|
|
78
|
+
* @param container
|
|
79
|
+
*/
|
|
80
|
+
var cleanGoogleRecaptcha = function (scriptId, container) {
|
|
81
|
+
// remove badge
|
|
82
|
+
(0, exports.cleanBadge)(container);
|
|
83
|
+
// remove old config from window
|
|
84
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
85
|
+
window.___grecaptcha_cfg = undefined;
|
|
86
|
+
// remove script
|
|
87
|
+
var script = document.querySelector("#".concat(scriptId));
|
|
88
|
+
if (script) {
|
|
89
|
+
script.remove();
|
|
90
|
+
}
|
|
91
|
+
cleanGstaticRecaptchaScript();
|
|
92
|
+
};
|
|
93
|
+
exports.cleanGoogleRecaptcha = cleanGoogleRecaptcha;
|
|
94
|
+
/**
|
|
95
|
+
* Function to inject the google recaptcha script
|
|
96
|
+
*
|
|
97
|
+
* @param param0
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
var injectGoogleReCaptchaScript = function (_a) {
|
|
101
|
+
var render = _a.render, onLoadCallbackName = _a.onLoadCallbackName, language = _a.language, onLoad = _a.onLoad, useRecaptchaNet = _a.useRecaptchaNet, useEnterprise = _a.useEnterprise, _b = _a.scriptProps, _c = _b === void 0 ? {} : _b, _d = _c.nonce, nonce = _d === void 0 ? '' : _d, _e = _c.defer, defer = _e === void 0 ? false : _e, _f = _c.async, async = _f === void 0 ? false : _f, _g = _c.id, id = _g === void 0 ? '' : _g, appendTo = _c.appendTo;
|
|
102
|
+
var scriptId = id || 'google-recaptcha-v3';
|
|
103
|
+
// Script has already been injected, just call onLoad and does othing else
|
|
104
|
+
if ((0, exports.isScriptInjected)(scriptId)) {
|
|
105
|
+
onLoad();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Generate the js script
|
|
110
|
+
*/
|
|
111
|
+
var googleRecaptchaSrc = generateGoogleRecaptchaSrc({
|
|
112
|
+
useEnterprise: useEnterprise,
|
|
113
|
+
useRecaptchaNet: useRecaptchaNet
|
|
114
|
+
});
|
|
115
|
+
var js = document.createElement('script');
|
|
116
|
+
js.id = scriptId;
|
|
117
|
+
js.src = "".concat(googleRecaptchaSrc, "?render=").concat(render).concat(render === 'explicit' ? "&onload=".concat(onLoadCallbackName) : '').concat(language ? "&hl=".concat(language) : '');
|
|
118
|
+
if (!!nonce) {
|
|
119
|
+
js.nonce = nonce;
|
|
120
|
+
}
|
|
121
|
+
js.defer = !!defer;
|
|
122
|
+
js.async = !!async;
|
|
123
|
+
js.onload = onLoad;
|
|
124
|
+
/**
|
|
125
|
+
* Append it to the body // head
|
|
126
|
+
*/
|
|
127
|
+
var elementToInjectScript = appendTo === 'body'
|
|
128
|
+
? document.body
|
|
129
|
+
: document.getElementsByTagName('head')[0];
|
|
130
|
+
elementToInjectScript.appendChild(js);
|
|
131
|
+
};
|
|
132
|
+
exports.injectGoogleReCaptchaScript = injectGoogleReCaptchaScript;
|
|
133
|
+
/**
|
|
134
|
+
* Function to log warning message if it's not in production mode
|
|
135
|
+
*
|
|
136
|
+
* @param message String
|
|
137
|
+
* @returns
|
|
138
|
+
*/
|
|
139
|
+
var logWarningMessage = function (message) {
|
|
140
|
+
var isDevelopmentMode = typeof process !== 'undefined' && !!process.env && process.env.NODE_ENV !== 'production';
|
|
141
|
+
if (isDevelopmentMode) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
console.warn(message);
|
|
145
|
+
};
|
|
146
|
+
exports.logWarningMessage = logWarningMessage;
|
|
147
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/utils.ts"],"names":[],"mappings":";;;AAiBA;;;;;GAKG;AACH,IAAM,0BAA0B,GAAG,UAAC,EAMnC;QALC,eAAe,qBAAA,EACf,aAAa,mBAAA;IAKb,IAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC;IAClE,IAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE1D,OAAO,sBAAe,QAAQ,wBAAc,MAAM,CAAE,CAAC;AACvD,CAAC,CAAC;AAEF;;GAEG;AACH,IAAM,2BAA2B,GAAG;IAClC,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CACnC,2DAA2D,CAC5D,CAAC;IAEF,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF;;;;;GAKG;AACI,IAAM,gBAAgB,GAAG,UAAC,QAAgB;IAC/C,OAAA,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAI,QAAQ,CAAE,CAAC;AAAxC,CAAwC,CAAC;AAD9B,QAAA,gBAAgB,oBACc;AAE3C;;;;GAIG;AACH,IAAM,kBAAkB,GAAG;IACzB,IAAM,SAAS,GAAG,QAAQ,CAAC,aA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,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAM,qBAAqB,GACzB,QAAQ,KAAK,MAAM;QACjB,CAAC,CAAC,QAAQ,CAAC,IAAI;QACf,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/C,qBAAqB,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AACxC,CAAC,CAAC;AAxDW,QAAA,2BAA2B,+BAwDtC;AAEF;;;;;GAKG;AACI,IAAM,iBAAiB,GAAG,UAAC,OAAe;IAC/C,IAAM,iBAAiB,GACrB,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;IAE3F,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO;IACT,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACxB,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B"}
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { IGoogleReCaptchaConsumerProps } from './google-recaptcha-provider.js';
|
|
3
|
+
export interface IWithGoogleReCaptchaProps {
|
|
4
|
+
googleReCaptchaProps: IGoogleReCaptchaConsumerProps;
|
|
5
|
+
}
|
|
6
|
+
export declare const withGoogleReCaptcha: <OwnProps>(Component: ComponentType<OwnProps & Partial<IWithGoogleReCaptchaProps>>) => ComponentType<OwnProps & Partial<IWithGoogleReCaptchaProps>>;
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.withGoogleReCaptcha = void 0;
|
|
18
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
var google_recaptcha_provider_1 = require("./google-recaptcha-provider.js");
|
|
20
|
+
var hoist_non_react_statics_1 = __importDefault(require("./hoist-non-react-statics.js"));
|
|
21
|
+
var withGoogleReCaptcha = function (Component) {
|
|
22
|
+
var WithGoogleReCaptchaComponent = function (props) { return ((0, jsx_runtime_1.jsx)(google_recaptcha_provider_1.GoogleReCaptchaConsumer, { children: function (googleReCaptchaValues) { return ((0, jsx_runtime_1.jsx)(Component, __assign({}, props, { googleReCaptchaProps: googleReCaptchaValues }))); } })); };
|
|
23
|
+
WithGoogleReCaptchaComponent.displayName = "withGoogleReCaptcha(".concat(Component.displayName || Component.name || 'Component', ")");
|
|
24
|
+
(0, hoist_non_react_statics_1.default)(WithGoogleReCaptchaComponent, Component);
|
|
25
|
+
return WithGoogleReCaptchaComponent;
|
|
26
|
+
};
|
|
27
|
+
exports.withGoogleReCaptcha = withGoogleReCaptcha;
|
|
28
|
+
//# sourceMappingURL=with-google-recaptcha.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-google-recaptcha.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,yEAGqC;AACrC,sFAA6D;AAMtD,IAAM,mBAAmB,GAAG,UACjC,SAAuE;IAEvE,IAAM,4BAA4B,GAAG,UACnC,KAAoD,IACjD,OAAA,CACH,uBAAC,mDAAuB,cACrB,UAAA,qBAAqB,IAAI,OAAA,CACxB,uBAAC,SAAS,eAAK,KAAK,IAAE,oBAAoB,EAAE,qBAAqB,IAAI,CACtE,EAFyB,CAEzB,GACuB,CAC3B,EANI,CAMJ,CAAC;IAEF,4BAA4B,CAAC,WAAW,GAAG,8BACzC,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,MACrD,CAAC;IAEJ,IAAA,iCAAoB,EAAC,4BAA4B,EAAE,SAAS,CAAC,CAAC;IAE9D,OAAO,4BAA4B,CAAC;AACtC,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.RecaptchaV3 = void 0;
|
|
40
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
var react_1 = require("react");
|
|
42
|
+
var google_recaptcha_v3_lib_1 = require("./google-recaptcha-v3-lib/index.js");
|
|
43
|
+
function RecaptchaV3(_a) {
|
|
44
|
+
var reCaptchaKey = _a.reCaptchaKey, onVerify = _a.onVerify;
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(google_recaptcha_v3_lib_1.GoogleReCaptchaProvider, { reCaptchaKey: reCaptchaKey, language: 'pt-BR', scriptProps: {
|
|
46
|
+
async: false,
|
|
47
|
+
defer: false,
|
|
48
|
+
appendTo: 'head',
|
|
49
|
+
nonce: undefined,
|
|
50
|
+
}, container: {
|
|
51
|
+
element: 'recaptcha-v3',
|
|
52
|
+
parameters: {},
|
|
53
|
+
}, children: (0, jsx_runtime_1.jsx)(RecaptchaV3Component, { onVerify: onVerify }) }));
|
|
54
|
+
}
|
|
55
|
+
exports.RecaptchaV3 = RecaptchaV3;
|
|
56
|
+
function RecaptchaV3Component(_a) {
|
|
57
|
+
var _this = this;
|
|
58
|
+
var onVerify = _a.onVerify;
|
|
59
|
+
var executeRecaptcha = (0, google_recaptcha_v3_lib_1.useGoogleReCaptcha)().executeRecaptcha;
|
|
60
|
+
(0, react_1.useEffect)(function () {
|
|
61
|
+
var verifyCallback = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
62
|
+
var token;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
switch (_a.label) {
|
|
65
|
+
case 0:
|
|
66
|
+
if (!executeRecaptcha) return [3 /*break*/, 2];
|
|
67
|
+
return [4 /*yield*/, executeRecaptcha()];
|
|
68
|
+
case 1:
|
|
69
|
+
token = _a.sent();
|
|
70
|
+
onVerify(token);
|
|
71
|
+
_a.label = 2;
|
|
72
|
+
case 2: return [2 /*return*/];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}); };
|
|
76
|
+
verifyCallback();
|
|
77
|
+
}, [executeRecaptcha, onVerify]);
|
|
78
|
+
return (0, jsx_runtime_1.jsx)("div", { id: 'recaptcha-v3' });
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/integrations/google/recaptcha-v3/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,qEAAuF;AAEvF,SAAgB,WAAW,CAAC,EAAwF;QAAtF,YAAY,kBAAA,EAAE,QAAQ,cAAA;IAClD,OAAO,CACL,uBAAC,iDAAuB,IACtB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAC,OAAO,EAChB,WAAW,EAAE;YACX,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,SAAS;SACjB,EACD,SAAS,EAAE;YACT,OAAO,EAAE,cAAc;YACvB,UAAU,EAAE,EAAE;SACf,YAED,uBAAC,oBAAoB,IAAC,QAAQ,EAAE,QAAQ,GAAI,GACpB,CAC3B,CAAA;AACH,CAAC;AAnBD,kCAmBC;AAED,SAAS,oBAAoB,CAAC,EAAY;IAA1C,iBAeC;QAf+B,QAAQ,cAAA;IAC9B,IAAA,gBAAgB,GAAK,IAAA,4CAAkB,GAAE,iBAAzB,CAAyB;IAEjD,IAAA,iBAAS,EAAC;QACR,IAAM,cAAc,GAAG;;;;;6BACjB,gBAAgB,EAAhB,wBAAgB;wBACJ,qBAAM,gBAAgB,EAAE,EAAA;;wBAAhC,KAAK,GAAG,SAAwB;wBAEtC,QAAQ,CAAC,KAAK,CAAC,CAAA;;;;;aAElB,CAAA;QACD,cAAc,EAAE,CAAA;IAClB,CAAC,EAAE,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC,CAAA;IAEhC,OAAO,gCAAK,EAAE,EAAC,cAAc,GAAO,CAAA;AACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./google/index.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./google/index.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/integrations/message-provider/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SendMessage(data: any): Promise<void>;
|