infinity-forge 3.5.6 → 3.5.9
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/system/presentation/context/auth/context.js +1 -8
- package/dist/system/presentation/context/auth/context.js.map +1 -1
- 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 +5 -5
- package/dist/ui/components/form/handler/form-handler/index.js.map +1 -1
- 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
|
@@ -139,11 +139,9 @@ function AuthAdminProvider(props) {
|
|
|
139
139
|
}
|
|
140
140
|
function signIn(payload) {
|
|
141
141
|
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
-
var err_1;
|
|
143
142
|
return __generator(this, function (_a) {
|
|
144
143
|
switch (_a.label) {
|
|
145
144
|
case 0:
|
|
146
|
-
_a.trys.push([0, 3, , 4]);
|
|
147
145
|
system_1.container.get(system_1.InfraTypes.storage).set('token', { value: null });
|
|
148
146
|
return [4 /*yield*/, system_1.container.get(system_1.Types.RemoteAuthAdmin).auth(payload)];
|
|
149
147
|
case 1:
|
|
@@ -151,12 +149,7 @@ function AuthAdminProvider(props) {
|
|
|
151
149
|
return [4 /*yield*/, loadUser()];
|
|
152
150
|
case 2:
|
|
153
151
|
_a.sent();
|
|
154
|
-
return [
|
|
155
|
-
case 3:
|
|
156
|
-
err_1 = _a.sent();
|
|
157
|
-
console.log(err_1);
|
|
158
|
-
return [3 /*break*/, 4];
|
|
159
|
-
case 4: return [2 /*return*/];
|
|
152
|
+
return [2 /*return*/];
|
|
160
153
|
}
|
|
161
154
|
});
|
|
162
155
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../src/system/presentation/context/auth/context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA2D;AAE3D,sCAAuC;AAEvC,mCASiB;AACjB,2BAAqC;AAIrC,IAAM,WAAW,GAAG,IAAA,qBAAa,EAAC,EAA+C,CAAC,CAAA;AAElF,SAAS,iBAAiB,CAAC,KAA6B;;IAChD,IAAA,KAAoB,IAAA,gBAAQ,EAAC,KAAK,CAAC,KAAK,CAAC,EAAxC,KAAK,QAAA,EAAE,QAAQ,QAAyB,CAAA;IACzC,IAAA,KAA0B,IAAA,gBAAQ,EAAC,EAAE,CAAC,EAArC,QAAQ,QAAA,EAAE,WAAW,QAAgB,CA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,IAAI,CAAC,0CAAE,IAAI,CAAC,CAAA;wBACjD,CAAC;6BAAM,CAAC;4BACN,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gCAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;4BAClB,CAAC;wBACH,CAAC;;;;;KACF;IAED,OAAO,CACL,uBAAC,WAAW,CAAC,QAAQ,IACnB,KAAK,EACH;YACE,IAAI,EAAE,MAAA,KAAK,CAAC,QAAQ,CAAC,0CAAE,IAAI;YAC3B,QAAQ,UAAA;YACR,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,QAAA;YACN,OAAO,SAAA;YACP,QAAQ,UAAA;YACR,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;SACvB,YAGtB,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,GACZ,CACxB,CAAA;AACH,CAAC;AAWQ,8CAAiB;AAT1B,SAAS,YAAY;IACnB,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,WAAW,CAAC,CAAA;IAEvC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;IACtE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAE2B,oCAAY"}
|
|
@@ -135,13 +135,13 @@ function FiltersForm(_a) {
|
|
|
135
135
|
return __generator(this, function (_a) {
|
|
136
136
|
if (configs.disableRoutingUpdateFilters) {
|
|
137
137
|
params = filters.reduce(function (reducer, filter) {
|
|
138
|
-
var _a;
|
|
138
|
+
var _a, _b;
|
|
139
139
|
if (!data[filter.name]) {
|
|
140
|
-
return reducer;
|
|
140
|
+
return __assign(__assign({}, reducer), (_a = {}, _a[filter.name] = "", _a));
|
|
141
141
|
}
|
|
142
142
|
var value = data[filter.name];
|
|
143
143
|
var verifiedValue = value instanceof Date ? (0, moment_1.default)(value).toString() : value;
|
|
144
|
-
return __assign(__assign({}, reducer), (
|
|
144
|
+
return __assign(__assign({}, reducer), (_b = {}, _b[filter.name] = verifiedValue, _b));
|
|
145
145
|
}, {});
|
|
146
146
|
(0, ui_1.updateRoute)({
|
|
147
147
|
params: params,
|
|
@@ -150,7 +150,7 @@ function FiltersForm(_a) {
|
|
|
150
150
|
}
|
|
151
151
|
return [2 /*return*/];
|
|
152
152
|
});
|
|
153
|
-
}); }, button: configs.disableRoutingUpdateFilters ? { text: '
|
|
153
|
+
}); }, button: configs.disableRoutingUpdateFilters ? { text: '', svg: "LupaIcon" } : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: 'filters', children: [filters === null || filters === void 0 ? void 0 : filters.map(function (filter) {
|
|
154
154
|
var Element = Inputs[filter.InputComponent];
|
|
155
155
|
if (!Element) {
|
|
156
156
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAuC;AAEvC,mCAA8C;AAC9C,2BAUa;AAIb,2DAA8C;AAE9C,0CAA6B;AAC7B,kDAA2B;AAE3B,SAAgB,OAAO,CAAI,KAAqB;;IAC9C,IAAM,aAAa,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAC,aAAa,KAAI,EAAE,CAAA;IACxD,IAAM,UAAU,GAAG,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,0CAAE,OAAO,KAAI,EAAE,CAAA;IAE1D,IAAM,OAAO,mCAAO,UAAU,SAAK,aAAa,OAAC,CAAA;IAEjD,IAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAA;IAC1B,IAAM,YAAY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2BAA2B,EAAE,CAAC;oBAClC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,UAAC,OAAO,EAAE,MAAM;;wBAC5C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;4BACvB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAuC;AAEvC,mCAA8C;AAC9C,2BAUa;AAIb,2DAA8C;AAE9C,0CAA6B;AAC7B,kDAA2B;AAE3B,SAAgB,OAAO,CAAI,KAAqB;;IAC9C,IAAM,aAAa,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAC,aAAa,KAAI,EAAE,CAAA;IACxD,IAAM,UAAU,GAAG,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,0CAAE,OAAO,KAAI,EAAE,CAAA;IAE1D,IAAM,OAAO,mCAAO,UAAU,SAAK,aAAa,OAAC,CAAA;IAEjD,IAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAA;IAC1B,IAAM,YAAY,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,OAAO,CAAA;IAC3C,IAAM,oBAAoB,GAAG,IAAA,uBAAkB,EAAC,YAAY,CAAC,CAAA;IAE7D,IAAM,kBAAkB,GAAG,CAAA,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,OAAO,KAAI,KAAK,CAAC,OAAO,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,OAAO,CAAC,CAAA;IAExG,IAAM,WAAW,GACf,kBAAkB;SAClB,oBAAoB,aAApB,oBAAoB,uBAApB,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AClG,IACG,GACM,CACf,CAAA;AACH,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Filters = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.Filters = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n --inputHeight: 42px;\n --borderRadius: 5px;\n\n display: flex;\n align-items: center;\n gap: 15px;\n position: relative;\n z-index: 99;\n color: ", ";\n\n .filters-accordion {\n display: none !important;\n width: 100%;\n\n > div {\n box-shadow: unset;\n padding: 0;\n background-color: transparent;\n\n > button {\n margin-left: auto;\n height: 40px;\n width: 40px;\n\n border: 1px solid currentColor;\n border-radius: 5px;\n\n color: #fff;\n background: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n\n .actions {\n display: flex;\n }\n\n svg {\n fill: currentColor;\n width: 15px;\n height: auto;\n }\n\n &:hover {\n transition: all 0.1s;\n background: #fff;\n color: #000000;\n border: 1px solid currentColor;\n }\n }\n\n .content {\n width: 100%;\n\n .filters {\n width: 100%;\n grid-template-columns: repeat(1, 1fr);\n\n > div {\n width: 100%;\n }\n\n > div:last-child {\n .input-wrapper {\n width: 100%;\n display: flex;\n }\n }\n }\n }\n }\n }\n\n form {\n
|
|
12
|
+
exports.Filters = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n --inputHeight: 42px;\n --borderRadius: 5px;\n\n display: flex;\n align-items: center;\n gap: 15px;\n position: relative;\n z-index: 99;\n color: ", ";\n width: 100% !important;\n\n form {\n width: 100%;\n\n > div {\n display: flex;\n align-items: flex-end;\n border: 1px solid #00000038;\n padding: 15px;\n width: 100%;\n border-radius: 5px;\n justify-content: space-between;\n }\n\n .form-button {\n button {\n height: 35px;\n width: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n height: 15px;\n width: auto;\n fill: #fff;\n }\n }\n }\n }\n }\n\n .filters-accordion {\n display: none !important;\n width: 100%;\n\n > div {\n box-shadow: unset;\n padding: 0;\n background-color: transparent;\n\n > button {\n margin-left: auto;\n height: 40px;\n width: 40px;\n\n border: 1px solid currentColor;\n border-radius: 5px;\n\n color: #fff;\n background: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n\n .actions {\n display: flex;\n }\n\n svg {\n fill: currentColor;\n width: 15px;\n height: auto;\n }\n\n &:hover {\n transition: all 0.1s;\n background: #fff;\n color: #000000;\n border: 1px solid currentColor;\n }\n }\n\n .content {\n width: 100%;\n\n .filters {\n width: 100%;\n grid-template-columns: repeat(1, 1fr);\n\n > div {\n width: 100%;\n }\n\n > div:last-child {\n .input-wrapper {\n width: 100%;\n display: flex;\n }\n }\n }\n }\n }\n }\n\n form {\n .filters {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(", ", 1fr);\n row-gap: 0;\n gap: 10px;\n\n * {\n margin-bottom: 0;\n }\n\n > div {\n display: flex;\n align-items: flex-end;\n }\n }\n }\n\n @media only screen and (max-width: 1685px) {\n grid-template-columns: repeat(2, 1fr);\n }\n\n @media only screen and (max-width: 768px) {\n > form {\n display: none;\n }\n\n .filters-accordion {\n display: flex !important;\n }\n }\n"], ["\n --inputHeight: 42px;\n --borderRadius: 5px;\n\n display: flex;\n align-items: center;\n gap: 15px;\n position: relative;\n z-index: 99;\n color: ", ";\n width: 100% !important;\n\n form {\n width: 100%;\n\n > div {\n display: flex;\n align-items: flex-end;\n border: 1px solid #00000038;\n padding: 15px;\n width: 100%;\n border-radius: 5px;\n justify-content: space-between;\n }\n\n .form-button {\n button {\n height: 35px;\n width: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n height: 15px;\n width: auto;\n fill: #fff;\n }\n }\n }\n }\n }\n\n .filters-accordion {\n display: none !important;\n width: 100%;\n\n > div {\n box-shadow: unset;\n padding: 0;\n background-color: transparent;\n\n > button {\n margin-left: auto;\n height: 40px;\n width: 40px;\n\n border: 1px solid currentColor;\n border-radius: 5px;\n\n color: #fff;\n background: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n\n .actions {\n display: flex;\n }\n\n svg {\n fill: currentColor;\n width: 15px;\n height: auto;\n }\n\n &:hover {\n transition: all 0.1s;\n background: #fff;\n color: #000000;\n border: 1px solid currentColor;\n }\n }\n\n .content {\n width: 100%;\n\n .filters {\n width: 100%;\n grid-template-columns: repeat(1, 1fr);\n\n > div {\n width: 100%;\n }\n\n > div:last-child {\n .input-wrapper {\n width: 100%;\n display: flex;\n }\n }\n }\n }\n }\n }\n\n form {\n .filters {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(", ", 1fr);\n row-gap: 0;\n gap: 10px;\n\n * {\n margin-bottom: 0;\n }\n\n > div {\n display: flex;\n align-items: flex-end;\n }\n }\n }\n\n @media only screen and (max-width: 1685px) {\n grid-template-columns: repeat(2, 1fr);\n }\n\n @media only screen and (max-width: 768px) {\n > form {\n display: none;\n }\n\n .filters-accordion {\n display: flex !important;\n }\n }\n"])), function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; }, function (_a) {
|
|
13
13
|
var $gridColumns = _a.$gridColumns;
|
|
14
14
|
return $gridColumns;
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,OAAO,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,OAAO,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,ssFAA0B,8JASnD,EAAgC,qmCA0DrB,EAAgC,m7BAoDhB,EAAkC,ucA4BvE,KA1IU,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EA0DrB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EAoDhB,UAAC,EAAgB;QAAd,YAAY,kBAAA;IAAO,OAAA,YAAY;AAAZ,CAAY,EA4BvE"}
|
|
@@ -86,7 +86,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
86
86
|
var react_1 = require("react");
|
|
87
87
|
var yup = __importStar(require("yup"));
|
|
88
88
|
var lodash_1 = __importDefault(require("lodash"));
|
|
89
|
-
var react_google_recaptcha_1 = __importDefault(require("react-google-recaptcha"));
|
|
90
89
|
var formik_1 = require("formik");
|
|
91
90
|
var ui_1 = require("../../../../../ui/index.js");
|
|
92
91
|
var system_1 = require("../../../../../system/index.js");
|
|
@@ -96,7 +95,7 @@ var custom_submit_1 = require("../custom-submit/index.js");
|
|
|
96
95
|
var S = __importStar(require("../styles.js"));
|
|
97
96
|
function FormElement(_a) {
|
|
98
97
|
var i18n = _a.i18n, button = _a.button, schema = _a.schema, children = _a.children, onFinish = _a.onFinish, onSucess = _a.onSucess, recaptcha = _a.recaptcha, debugMode = _a.debugMode, fileFields = _a.fileFields, autoComplete = _a.autoComplete, customSubmit = _a.customSubmit, onChangeForm = _a.onChangeForm, customAction = _a.customAction, decimalFields = _a.decimalFields, defaultSchemas = _a.defaultSchemas, isStickyButtons = _a.isStickyButtons, _b = _a.cleanFieldsOnSubmit, cleanFieldsOnSubmit = _b === void 0 ? true : _b, _c = _a.disableEnterKeySubmitForm, disableEnterKeySubmitForm = _c === void 0 ? false : _c;
|
|
99
|
-
var _d = (0, react_1.useState)(
|
|
98
|
+
var _d = (0, react_1.useState)(''), recaptchaToken = _d[0], setRecaptchaToken = _d[1];
|
|
100
99
|
var _e = (0, react_1.useState)({ state: '', message: '' }), stateForm = _e[0], setStateForm = _e[1];
|
|
101
100
|
var sendFiles = (0, use_send_file_1.useSendFile)({ fileFields: fileFields, debugMode: debugMode });
|
|
102
101
|
var validateSchemas = (0, use_schemas_1.useSchemas)({ schema: schema, defaultSchemas: defaultSchemas, i18n: i18n });
|
|
@@ -112,8 +111,8 @@ function FormElement(_a) {
|
|
|
112
111
|
if (debugMode) {
|
|
113
112
|
console.log('values', values);
|
|
114
113
|
}
|
|
115
|
-
if (recaptcha && !
|
|
116
|
-
|
|
114
|
+
if (recaptcha && !recaptchaToken) {
|
|
115
|
+
throw new system_1.BadRequestError({ code: '400', message: 'Erro ao validar o recaptcha' });
|
|
117
116
|
}
|
|
118
117
|
setErrors({});
|
|
119
118
|
setStateForm({ state: 'loading', message: '' });
|
|
@@ -238,7 +237,8 @@ function FormElement(_a) {
|
|
|
238
237
|
(0, react_1.useEffect)(function () {
|
|
239
238
|
onChangeForm && onChangeForm.callbackResult(values);
|
|
240
239
|
}, __spreadArray([values], ((onChangeForm === null || onChangeForm === void 0 ? void 0 : onChangeForm.additionalDependencies) || []), true));
|
|
241
|
-
|
|
240
|
+
var recaptchaKey = typeof recaptcha === 'string' ? recaptcha : process.env.recaptcha;
|
|
241
|
+
return ((0, jsx_runtime_1.jsx)(formik_1.Form, { autoComplete: autoComplete, children: (0, jsx_runtime_1.jsxs)(S.FormHandler, { onKeyDown: handleKeyDown, children: [stateForm.state === 'error' && (0, jsx_runtime_1.jsx)("span", { className: 'error-form', children: stateForm.message }), (0, jsx_runtime_1.jsx)("div", { className: 'conntent_form_infinity_forge', children: children }), (0, jsx_runtime_1.jsxs)("div", { className: "form-button ".concat(isStickyButtons ? 'sticky' : ''), children: [process.env.recaptcha && recaptcha && ((0, jsx_runtime_1.jsx)(ui_1.RecaptchaV3, { reCaptchaKey: recaptchaKey, onVerify: setRecaptchaToken })), customAction && (0, jsx_runtime_1.jsx)(customAction.Component, __assign({}, (customAction.props || {}), { setFieldValue: setFieldValue })), button && ((0, jsx_runtime_1.jsx)(ui_1.Button, __assign({}, button, { disabled: recaptchaKey ? !!recaptchaToken : false, type: 'button', onClick: function () { return handleSubmit(); }, loading: stateForm.state === 'loading' }))), customSubmit &&
|
|
242
242
|
customSubmit.length > 0 &&
|
|
243
243
|
customSubmit.map(function (custom, index) { return ((0, jsx_runtime_1.jsx)(custom_submit_1.CustomSubmitButton, __assign({}, custom, { stateForm: stateForm, onSubmit: handleSubmit }), index)); })] })] }) }));
|
|
244
244
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/handler/form-handler/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA2C;AAE3C,uCAA0B;AAC1B,kDAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/handler/form-handler/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA2C;AAE3C,uCAA0B;AAC1B,kDAA2B;AAC3B,iCAA+C;AAE/C,2BAA0C;AAC1C,mCAA0E;AAE1E,6CAA0C;AAC1C,iDAA6C;AAC7C,kDAAyE;AAIzE,2CAA8B;AAE9B,SAAwB,WAAW,CAAC,EAmBrB;QAlBb,IAAI,UAAA,EACJ,MAAM,YAAA,EACN,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,SAAS,eAAA,EACT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index.js';
|
|
5
5
|
import { ICustomSubmitProps } from './custom-submit/index.js';
|
|
6
6
|
import { IDefaultSchemas } from './form-handler/generate-schemas.js';
|
|
7
|
+
export type StateFormFormHandler = {
|
|
8
|
+
state: string;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
7
11
|
export interface IFormHandler {
|
|
8
12
|
ref?: any;
|
|
9
13
|
recaptcha?: boolean;
|
|
10
14
|
decimalFields?: string[];
|
|
15
|
+
messageProvider?: {
|
|
16
|
+
messageProviderKey?: string;
|
|
17
|
+
};
|
|
11
18
|
onFinish?: (data: any, initialValues: any) => void;
|
|
12
19
|
fileFields?: {
|
|
13
20
|
ref: string;
|
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./hooks/index.js"), exports);
|
|
|
19
19
|
__exportStar(require("./utils/index.js"), exports);
|
|
20
20
|
__exportStar(require("./contexts/index.js"), exports);
|
|
21
21
|
__exportStar(require("./components/index.js"), exports);
|
|
22
|
+
__exportStar(require("./integrations/index.js"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,0CAAuB;AACvB,0CAAuB;AACvB,6CAA0B;AAC1B,+CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,0CAAuB;AACvB,0CAAuB;AACvB,6CAA0B;AAC1B,+CAA4B;AAC5B,iDAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./recaptcha-v3/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("./recaptcha-v3/index.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/integrations/google/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface IGoogleReCaptchaProviderProps {
|
|
3
|
+
reCaptchaKey: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
useRecaptchaNet?: boolean;
|
|
6
|
+
useEnterprise?: boolean;
|
|
7
|
+
scriptProps?: {
|
|
8
|
+
nonce?: string;
|
|
9
|
+
defer?: boolean;
|
|
10
|
+
async?: boolean;
|
|
11
|
+
appendTo?: 'head' | 'body';
|
|
12
|
+
id?: string;
|
|
13
|
+
onLoadCallbackName?: string;
|
|
14
|
+
};
|
|
15
|
+
container?: {
|
|
16
|
+
element?: string | HTMLElement;
|
|
17
|
+
parameters: {
|
|
18
|
+
badge?: 'inline' | 'bottomleft' | 'bottomright';
|
|
19
|
+
theme?: 'dark' | 'light';
|
|
20
|
+
tabindex?: number;
|
|
21
|
+
callback?: () => void;
|
|
22
|
+
expiredCallback?: () => void;
|
|
23
|
+
errorCallback?: () => void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export interface IGoogleReCaptchaConsumerProps {
|
|
29
|
+
executeRecaptcha?: (action?: string) => Promise<string>;
|
|
30
|
+
container?: string | HTMLElement;
|
|
31
|
+
}
|
|
32
|
+
declare const GoogleReCaptchaContext: React.Context<IGoogleReCaptchaConsumerProps>;
|
|
33
|
+
declare const GoogleReCaptchaConsumer: React.Consumer<IGoogleReCaptchaConsumerProps>;
|
|
34
|
+
export declare function GoogleReCaptchaProvider({ reCaptchaKey, useEnterprise, useRecaptchaNet, scriptProps, language, container, children }: IGoogleReCaptchaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export { GoogleReCaptchaConsumer, GoogleReCaptchaContext };
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.GoogleReCaptchaContext = exports.GoogleReCaptchaConsumer = exports.GoogleReCaptchaProvider = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var react_1 = require("react");
|
|
17
|
+
var utils_1 = require("./utils.js");
|
|
18
|
+
var GoogleRecaptchaError;
|
|
19
|
+
(function (GoogleRecaptchaError) {
|
|
20
|
+
GoogleRecaptchaError["SCRIPT_NOT_AVAILABLE"] = "Recaptcha script is not available";
|
|
21
|
+
})(GoogleRecaptchaError || (GoogleRecaptchaError = {}));
|
|
22
|
+
var GoogleReCaptchaContext = (0, react_1.createContext)({
|
|
23
|
+
executeRecaptcha: function () {
|
|
24
|
+
// This default context function is not supposed to be called
|
|
25
|
+
throw Error('GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
exports.GoogleReCaptchaContext = GoogleReCaptchaContext;
|
|
29
|
+
var GoogleReCaptchaConsumer = GoogleReCaptchaContext.Consumer;
|
|
30
|
+
exports.GoogleReCaptchaConsumer = GoogleReCaptchaConsumer;
|
|
31
|
+
function GoogleReCaptchaProvider(_a) {
|
|
32
|
+
var reCaptchaKey = _a.reCaptchaKey, _b = _a.useEnterprise, useEnterprise = _b === void 0 ? false : _b, _c = _a.useRecaptchaNet, useRecaptchaNet = _c === void 0 ? false : _c, scriptProps = _a.scriptProps, language = _a.language, container = _a.container, children = _a.children;
|
|
33
|
+
var _d = (0, react_1.useState)(null), greCaptchaInstance = _d[0], setGreCaptchaInstance = _d[1];
|
|
34
|
+
var clientId = (0, react_1.useRef)(reCaptchaKey);
|
|
35
|
+
var scriptPropsJson = JSON.stringify(scriptProps);
|
|
36
|
+
var parametersJson = JSON.stringify(container === null || container === void 0 ? void 0 : container.parameters);
|
|
37
|
+
(0, react_1.useEffect)(function () {
|
|
38
|
+
if (!reCaptchaKey) {
|
|
39
|
+
(0, utils_1.logWarningMessage)('<GoogleReCaptchaProvider /> recaptcha key not provided');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
var scriptId = (scriptProps === null || scriptProps === void 0 ? void 0 : scriptProps.id) || 'google-recaptcha-v3';
|
|
43
|
+
var onLoadCallbackName = (scriptProps === null || scriptProps === void 0 ? void 0 : scriptProps.onLoadCallbackName) || 'onRecaptchaLoadCallback';
|
|
44
|
+
window[onLoadCallbackName] = function () {
|
|
45
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
46
|
+
var grecaptcha = useEnterprise
|
|
47
|
+
? window.grecaptcha.enterprise
|
|
48
|
+
: window.grecaptcha;
|
|
49
|
+
var params = __assign({ badge: 'inline', size: 'invisible', sitekey: reCaptchaKey }, ((container === null || container === void 0 ? void 0 : container.parameters) || {}));
|
|
50
|
+
clientId.current = grecaptcha.render(container === null || container === void 0 ? void 0 : container.element, params);
|
|
51
|
+
};
|
|
52
|
+
var onLoad = function () {
|
|
53
|
+
if (!window || !window.grecaptcha) {
|
|
54
|
+
(0, utils_1.logWarningMessage)("<GoogleRecaptchaProvider /> ".concat(GoogleRecaptchaError.SCRIPT_NOT_AVAILABLE));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
var grecaptcha = useEnterprise
|
|
58
|
+
? window.grecaptcha.enterprise
|
|
59
|
+
: window.grecaptcha;
|
|
60
|
+
grecaptcha.ready(function () {
|
|
61
|
+
setGreCaptchaInstance(grecaptcha);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var onError = function () {
|
|
65
|
+
(0, utils_1.logWarningMessage)('Error loading google recaptcha script');
|
|
66
|
+
};
|
|
67
|
+
(0, utils_1.injectGoogleReCaptchaScript)({
|
|
68
|
+
render: (container === null || container === void 0 ? void 0 : container.element) ? 'explicit' : reCaptchaKey,
|
|
69
|
+
onLoadCallbackName: onLoadCallbackName,
|
|
70
|
+
useEnterprise: useEnterprise,
|
|
71
|
+
useRecaptchaNet: useRecaptchaNet,
|
|
72
|
+
scriptProps: scriptProps,
|
|
73
|
+
language: language,
|
|
74
|
+
onLoad: onLoad,
|
|
75
|
+
onError: onError
|
|
76
|
+
});
|
|
77
|
+
return function () {
|
|
78
|
+
(0, utils_1.cleanGoogleRecaptcha)(scriptId, container === null || container === void 0 ? void 0 : container.element);
|
|
79
|
+
};
|
|
80
|
+
}, [
|
|
81
|
+
useEnterprise,
|
|
82
|
+
useRecaptchaNet,
|
|
83
|
+
scriptPropsJson,
|
|
84
|
+
parametersJson,
|
|
85
|
+
language,
|
|
86
|
+
reCaptchaKey,
|
|
87
|
+
container === null || container === void 0 ? void 0 : container.element,
|
|
88
|
+
]);
|
|
89
|
+
var executeRecaptcha = (0, react_1.useCallback)(function (action) {
|
|
90
|
+
if (!greCaptchaInstance || !greCaptchaInstance.execute) {
|
|
91
|
+
throw new Error('<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded');
|
|
92
|
+
}
|
|
93
|
+
return greCaptchaInstance.execute(clientId.current, { action: action });
|
|
94
|
+
}, [greCaptchaInstance, clientId]);
|
|
95
|
+
var googleReCaptchaContextValue = (0, react_1.useMemo)(function () { return ({
|
|
96
|
+
executeRecaptcha: greCaptchaInstance ? executeRecaptcha : undefined,
|
|
97
|
+
container: container === null || container === void 0 ? void 0 : container.element,
|
|
98
|
+
}); }, [executeRecaptcha, greCaptchaInstance, container === null || container === void 0 ? void 0 : container.element]);
|
|
99
|
+
return ((0, jsx_runtime_1.jsx)(GoogleReCaptchaContext.Provider, { value: googleReCaptchaContextValue, children: children }));
|
|
100
|
+
}
|
|
101
|
+
exports.GoogleReCaptchaProvider = GoogleReCaptchaProvider;
|
|
102
|
+
//# sourceMappingURL=google-recaptcha-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-recaptcha-provider.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAQe;AACf,iCAIiB;AAEjB,IAAK,oBAEJ;AAFD,WAAK,oBAAoB;IACvB,kFAA0D,CAAA;AAC5D,CAAC,EAFI,oBAAoB,KAApB,oBAAoB,QAExB;AAkCD,IAAM,sBAAsB,GAAG,IAAA,qBAAa,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AE,OAAO,CAAC,CAAC;QACrD,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,aAAa;QACb,eAAe;QACf,eAAe;QACf,cAAc;QACd,QAAQ;QACR,YAAY;QACZ,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO;KACnB,CAAC,CAAC;IAEH,IAAM,gBAAgB,GAAG,IAAA,mBAAW,EAClC,UAAC,MAAe;QACd,IAAI,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;QACJ,CAAC;QAED,OAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAClE,CAAC,EACD,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAC/B,CAAC;IAEF,IAAM,2BAA2B,GAAG,IAAA,eAAO,EACzC,cAAM,OAAA,CAAC;QACL,gBAAgB,EAAE,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;QACnE,SAAS,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO;KAC9B,CAAC,EAHI,CAGJ,EACF,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAC,CAC3D,CAAC;IAEF,OAAO,CACL,uBAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,2BAA2B,YAChE,QAAQ,GACuB,CACnC,CAAC;AACJ,CAAC;AApHD,0DAoHC"}
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface IGoogleRecaptchaProps {
|
|
2
|
+
onVerify: (token: string) => void | Promise<void>;
|
|
3
|
+
action?: string;
|
|
4
|
+
refreshReCaptcha?: boolean | string | number | null;
|
|
5
|
+
}
|
|
6
|
+
export declare function GoogleReCaptcha({ action, onVerify, refreshReCaptcha, }: IGoogleRecaptchaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;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cAAc,CAAC,eAAe,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,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AAC,MAAM,GAAG,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>;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.SendMessage = void 0;
|
|
40
|
+
var sites_1 = require("../../../sites/index.js");
|
|
41
|
+
function SendMessage(data) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0: return [4 /*yield*/, (0, sites_1.api)({ method: 'post', url: 'https://messageprovider.codiehost.com.br/SendDispatcher', body: data })];
|
|
46
|
+
case 1:
|
|
47
|
+
_a.sent();
|
|
48
|
+
return [2 /*return*/];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
exports.SendMessage = SendMessage;
|
|
54
|
+
//# sourceMappingURL=send-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../../../src/ui/integrations/message-provider/send-message.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA6B;AAE7B,SAAsB,WAAW,CAAC,IAAS;;;;wBACzC,qBAAM,IAAA,WAAG,EAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,yDAAyD,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAA;;oBAAzG,SAAyG,CAAA;;;;;CAC1G;AAFD,kCAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "infinity-forge",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.9",
|
|
4
4
|
"description": "codie Library",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"module": "./dist/index",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"react-dom": "18.3.1",
|
|
64
64
|
"react-ga": "^3.3.1",
|
|
65
65
|
"react-google-recaptcha": "^3.1.0",
|
|
66
|
+
"react-is": "^18.3.1",
|
|
66
67
|
"react-rte": "^0.16.5",
|
|
67
68
|
"react-select": "^5.8.0",
|
|
68
69
|
"react-share": "^5.1.0",
|