@prosopo/procaptcha-react 0.1.10 → 0.1.14
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/components/CaptchaComponent.d.ts +2 -2
- package/dist/components/CaptchaComponent.d.ts.map +1 -1
- package/dist/components/CaptchaComponent.js +15 -28
- package/dist/components/CaptchaComponent.js.map +1 -1
- package/dist/components/CaptchaWidget.d.ts +1 -1
- package/dist/components/CaptchaWidget.d.ts.map +1 -1
- package/dist/components/CaptchaWidget.js +4 -3
- package/dist/components/CaptchaWidget.js.map +1 -1
- package/dist/components/ExtensionAccountSelect.d.ts +1 -1
- package/dist/components/ExtensionAccountSelect.d.ts.map +1 -1
- package/dist/components/ExtensionAccountSelect.js +2 -19
- package/dist/components/ExtensionAccountSelect.js.map +1 -1
- package/dist/components/Procaptcha.d.ts +2 -3
- package/dist/components/Procaptcha.d.ts.map +1 -1
- package/dist/components/Procaptcha.js +24 -6
- package/dist/components/Procaptcha.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/theme.d.ts +1 -1
- package/dist/components/theme.js +1 -1
- package/dist/components/theme.js.map +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/index.js.map +1 -1
- package/package.json +47 -44
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -36
- package/.prettierrc.js +0 -7
- package/LICENSE +0 -201
- package/tsconfig.json +0 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetCaptchaResponse } from '@prosopo/
|
|
1
|
+
import { GetCaptchaResponse } from '@prosopo/api';
|
|
2
2
|
export interface CaptchaComponentProps {
|
|
3
3
|
challenge: GetCaptchaResponse;
|
|
4
4
|
index: number;
|
|
@@ -8,6 +8,6 @@ export interface CaptchaComponentProps {
|
|
|
8
8
|
onClick: (hash: string) => void;
|
|
9
9
|
onNext: () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const CaptchaComponent: (props: CaptchaComponentProps) => JSX.Element;
|
|
11
|
+
export declare const CaptchaComponent: (props: CaptchaComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default CaptchaComponent;
|
|
13
13
|
//# sourceMappingURL=CaptchaComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaComponent.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaptchaComponent.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaComponent.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAUjD,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,kBAAkB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,EAAE,EAAE,CAAA;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,4CAgI5D,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
// This file is part of procaptcha-react <https://github.com/prosopo/procaptcha-react>.
|
|
4
|
-
//
|
|
5
|
-
// procaptcha-react is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// procaptcha-react is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU General Public License
|
|
16
|
-
// along with procaptcha-react. If not, see <http://www.gnu.org/licenses/>.
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from '@prosopo/common';
|
|
17
3
|
import Box from '@mui/material/Box';
|
|
18
4
|
import Button from '@mui/material/Button';
|
|
19
|
-
import
|
|
20
|
-
import { CaptchaWidget } from './CaptchaWidget';
|
|
21
|
-
import { useTranslation } from '@prosopo/i18n';
|
|
22
|
-
import { addDataAttr } from '../util';
|
|
5
|
+
import CaptchaWidget from './CaptchaWidget';
|
|
23
6
|
import ThemeProvider from '@mui/material/styles/ThemeProvider';
|
|
7
|
+
import Typography from '@mui/material/Typography';
|
|
8
|
+
import addDataAttr from '../util';
|
|
24
9
|
import theme from './theme';
|
|
25
10
|
export const CaptchaComponent = (props) => {
|
|
26
11
|
const { t } = useTranslation();
|
|
27
|
-
// console.log('CaptchaComponent', props)
|
|
28
12
|
const { challenge, index, solutions, onSubmit, onCancel, onClick, onNext } = props;
|
|
29
13
|
const captcha = challenge.captchas[index];
|
|
30
14
|
const solution = solutions[index];
|
|
@@ -50,17 +34,20 @@ export const CaptchaComponent = (props) => {
|
|
|
50
34
|
flexDirection: 'column',
|
|
51
35
|
// the min width of the popup before scroll bars appear
|
|
52
36
|
minWidth: '300px',
|
|
53
|
-
}, children: [
|
|
37
|
+
}, children: [_jsxs(Box, { px: 2, py: 3, sx: {
|
|
54
38
|
// center the header
|
|
55
39
|
display: 'flex',
|
|
56
40
|
alignItems: 'center',
|
|
57
41
|
width: '100%',
|
|
58
|
-
}, bgcolor: theme.palette.primary.main, children:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
}, bgcolor: theme.palette.primary.main, children: [_jsxs(Typography, { sx: {
|
|
43
|
+
color: '#ffffff',
|
|
44
|
+
fontWeight: 700,
|
|
45
|
+
}, children: [t('WIDGET.SELECT_ALL'), ': '] }), _jsx(Typography, { px: 1, sx: {
|
|
46
|
+
color: '#ffffff',
|
|
47
|
+
fontWeight: 700,
|
|
48
|
+
textTransform: 'uppercase',
|
|
49
|
+
fontSize: theme.typography.h6.fontSize,
|
|
50
|
+
}, children: `${props.challenge.captchas[props.index].captcha.target}` })] }), _jsx(Box, { ...addDataAttr({ dev: { cy: 'captcha-' + props.index } }), children: _jsx(CaptchaWidget, { challenge: captcha, solution: solution, onClick: onClick }) }), _jsx(Box, { px: 2, py: 1, sx: {
|
|
64
51
|
display: 'flex',
|
|
65
52
|
alignItems: 'center',
|
|
66
53
|
justifyContent: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaComponent.js","sourceRoot":"","sources":["../../src/components/CaptchaComponent.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaptchaComponent.js","sourceRoot":"","sources":["../../src/components/CaptchaComponent.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,MAAM,MAAM,sBAAsB,CAAA;AACzC,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,aAAa,MAAM,oCAAoC,CAAA;AAC9D,OAAO,UAAU,MAAM,0BAA0B,CAAA;AACjD,OAAO,WAAW,MAAM,SAAS,CAAA;AACjC,OAAO,KAAK,MAAM,SAAS,CAAA;AAY3B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAC7D,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,MAAM,EAAE,SAAS,EAAE,KAAK,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N,MAAC,GAAG,IACA,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,CAAC,EACL,EAAE,EAAE;gCACA,OAAO,EAAE,MAAM;gCACf,UAAU,EAAE,QAAQ;gCACpB,cAAc,EAAE,eAAe;6BAClC,aAED,KAAC,MAAM,IAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAC,MAAM,YACpC,CAAC,CAAC,eAAe,CAAC,GACd,EACT,KAAC,MAAM,IACH,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAClE,OAAO,EAAC,WAAW,KACf,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,CAAC,YAE9C,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,GACzE,IACP,IACJ,GACJ,GACJ,GACM,CACnB,CAAA;AACL,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -4,6 +4,6 @@ export interface CaptchaWidgetProps {
|
|
|
4
4
|
solution: string[];
|
|
5
5
|
onClick: (hash: string) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const CaptchaWidget: (props: CaptchaWidgetProps) => JSX.Element;
|
|
7
|
+
export declare const CaptchaWidget: (props: CaptchaWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default CaptchaWidget;
|
|
9
9
|
//# sourceMappingURL=CaptchaWidget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"CaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAM5D,MAAM,WAAW,kBAAkB;IAC/B,SAAS,EAAE,sBAAsB,CAAA;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AASD,eAAO,MAAM,aAAa,UAAW,kBAAkB,4CA4GtD,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@mui/material';
|
|
3
|
+
import Box from '@mui/material/Box';
|
|
2
4
|
import CheckIcon from '@mui/icons-material/Check';
|
|
3
|
-
import
|
|
4
|
-
import useTheme from '@mui/styles/useTheme';
|
|
5
|
+
import Fade from '@mui/material/Fade';
|
|
5
6
|
const getHash = (item) => {
|
|
6
7
|
if (!item.hash) {
|
|
7
8
|
throw new Error('item.hash is undefined');
|
|
@@ -9,7 +10,7 @@ const getHash = (item) => {
|
|
|
9
10
|
return item.hash;
|
|
10
11
|
};
|
|
11
12
|
export const CaptchaWidget = (props) => {
|
|
12
|
-
//
|
|
13
|
+
// env
|
|
13
14
|
const { challenge, solution, onClick } = props;
|
|
14
15
|
const items = challenge.captcha.items;
|
|
15
16
|
const theme = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaWidget.js","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaptchaWidget.js","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAS,QAAQ,EAAE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AAS,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,EAC3C,EAAE,EAAE;gDACA,4EAA4E;gDAC5E,OAAO,EAAE,OAAO;gDAChB,8BAA8B;gDAC9B,KAAK,EAAE,KAAK;gDACZ,MAAM,EAAE,KAAK;6CAChB,GACH,GACA,GACJ,GACH,IACL,IAlED,KAAK,CAmER,CACT,CAAA;YACL,CAAC,CAAC,GACA,GACP,CACN,CAAA;AACL,CAAC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -2,6 +2,6 @@ export declare const ExtensionAccountSelect: ({ value, dappName, onChange, }: {
|
|
|
2
2
|
value?: string | undefined;
|
|
3
3
|
dappName: string;
|
|
4
4
|
onChange: (value: string) => void;
|
|
5
|
-
}) => JSX.Element;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default ExtensionAccountSelect;
|
|
7
7
|
//# sourceMappingURL=ExtensionAccountSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionAccountSelect.d.ts","sourceRoot":"","sources":["../../src/components/ExtensionAccountSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExtensionAccountSelect.d.ts","sourceRoot":"","sources":["../../src/components/ExtensionAccountSelect.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,sBAAsB;;cAMrB,MAAM;sBACE,MAAM,KAAK,IAAI;6CAqCpC,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// Copyright (C) 2021-2022 Prosopo (UK) Ltd.
|
|
3
|
-
// This file is part of procaptcha-react <https://github.com/prosopo/procaptcha-react>.
|
|
4
|
-
//
|
|
5
|
-
// procaptcha-react is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// procaptcha-react is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU General Public License
|
|
16
|
-
// along with procaptcha-react. If not, see <http://www.gnu.org/licenses/>.
|
|
17
2
|
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useTranslation } from '@prosopo/common';
|
|
4
|
+
import { web3AccountsSubscribe, web3Enable } from '@polkadot/extension-dapp';
|
|
18
5
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
19
6
|
import TextField from '@mui/material/TextField';
|
|
20
|
-
import { useTranslation } from '@prosopo/i18n';
|
|
21
|
-
import { web3AccountsSubscribe, web3Enable } from '@polkadot/extension-dapp';
|
|
22
7
|
export const ExtensionAccountSelect = ({ value, dappName, onChange, }) => {
|
|
23
8
|
const { t } = useTranslation();
|
|
24
9
|
const [accounts, setAccounts] = useState([]);
|
|
25
10
|
useEffect(() => {
|
|
26
11
|
const prom = web3Enable(dappName).then(() => {
|
|
27
|
-
console.log('subscribe');
|
|
28
12
|
return web3AccountsSubscribe(setAccounts);
|
|
29
13
|
});
|
|
30
14
|
return () => {
|
|
31
|
-
console.log('unsubscribe');
|
|
32
15
|
prom.then((unsub) => unsub());
|
|
33
16
|
};
|
|
34
17
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionAccountSelect.js","sourceRoot":"","sources":["../../src/components/ExtensionAccountSelect.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ExtensionAccountSelect.js","sourceRoot":"","sources":["../../src/components/ExtensionAccountSelect.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,C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,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAA;gBACvC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;aAC1B;iBAAM;gBACH,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;gBACjC,QAAQ,CAAC,EAAE,CAAC,CAAA;aACf;QACL,CAAC,EACD,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAClB,cAAc,EAAE,CAAC,MAA+B,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,OAAO,EAAE,EAC7F,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,uBAAuB,CAAC,GAAI,GACrF,CACL,CAAA;AACL,CAAC,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ProcaptchaCallbacks } from '@prosopo/procaptcha';
|
|
2
|
-
import { ProcaptchaConfigOptional } from '@prosopo/procaptcha';
|
|
1
|
+
import { ProcaptchaCallbacks, ProcaptchaConfigOptional } from '@prosopo/procaptcha';
|
|
3
2
|
/**
|
|
4
3
|
* The props for the Procaptcha component.
|
|
5
4
|
*/
|
|
@@ -7,5 +6,5 @@ export interface ProcaptchaProps {
|
|
|
7
6
|
config: ProcaptchaConfigOptional;
|
|
8
7
|
callbacks?: Partial<ProcaptchaCallbacks>;
|
|
9
8
|
}
|
|
10
|
-
export declare const Procaptcha: (props: ProcaptchaProps) => JSX.Element;
|
|
9
|
+
export declare const Procaptcha: (props: ProcaptchaProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
//# sourceMappingURL=Procaptcha.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,mBAAmB,EACnB,wBAAwB,EAK3B,MAAM,qBAAqB,CAAA;AAS5B;;GAEG;AACH,MAAM,WAAW,eAAe;IAE5B,MAAM,EAAE,wBAAwB,CAAA;IAEhC,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAC3C;AAqFD,eAAO,MAAM,UAAU,UAAW,eAAe,4CA2GhD,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { Manager, } from '@prosopo/procaptcha';
|
|
3
|
+
import { Alert, Backdrop, CircularProgress } from '@mui/material';
|
|
4
|
+
import { useRef, useState } from 'react';
|
|
3
5
|
import Box from '@mui/material/Box';
|
|
6
|
+
import CaptchaComponent from './CaptchaComponent';
|
|
4
7
|
import Checkbox from '@mui/material/Checkbox';
|
|
5
|
-
import { useRef, useState } from 'react';
|
|
6
8
|
import Link from '@mui/material/Link';
|
|
7
|
-
import
|
|
8
|
-
import { Alert, Backdrop, CircularProgress } from '@mui/material';
|
|
9
|
-
import CaptchaComponent from './CaptchaComponent';
|
|
9
|
+
import Typography from '@mui/material/Typography';
|
|
10
10
|
/**
|
|
11
11
|
* Wrap a ref to be the same format as useState.
|
|
12
12
|
* @param defaultValue the default value if the state is not already initialised
|
|
@@ -32,7 +32,10 @@ const useProcaptcha = () => {
|
|
|
32
32
|
const [challenge, setChallenge] = useState(undefined);
|
|
33
33
|
const [loading, setLoading] = useState(false);
|
|
34
34
|
const [account, setAccount] = useState(undefined);
|
|
35
|
+
const [dappAccount, setDappAccount] = useState(undefined);
|
|
35
36
|
const [submission, setSubmission] = useRefAsState(undefined);
|
|
37
|
+
const [timeout, setTimeout] = useRefAsState(undefined);
|
|
38
|
+
const [blockNumber, setBlockNumber] = useRefAsState(undefined);
|
|
36
39
|
const map = {
|
|
37
40
|
isHuman: setIsHuman,
|
|
38
41
|
index: setIndex,
|
|
@@ -42,7 +45,10 @@ const useProcaptcha = () => {
|
|
|
42
45
|
challenge: setChallenge,
|
|
43
46
|
loading: setLoading,
|
|
44
47
|
account: setAccount,
|
|
48
|
+
dappAccount: setDappAccount,
|
|
45
49
|
submission: setSubmission,
|
|
50
|
+
timeout: setTimeout,
|
|
51
|
+
blockNumber: setBlockNumber,
|
|
46
52
|
// don't provide method for updating config, should remain constant
|
|
47
53
|
};
|
|
48
54
|
return [
|
|
@@ -56,7 +62,10 @@ const useProcaptcha = () => {
|
|
|
56
62
|
challenge,
|
|
57
63
|
loading,
|
|
58
64
|
account,
|
|
65
|
+
dappAccount,
|
|
59
66
|
submission,
|
|
67
|
+
timeout,
|
|
68
|
+
blockNumber,
|
|
60
69
|
},
|
|
61
70
|
// and method to update the state
|
|
62
71
|
(nextState) => {
|
|
@@ -76,11 +85,20 @@ const useProcaptcha = () => {
|
|
|
76
85
|
];
|
|
77
86
|
};
|
|
78
87
|
export const Procaptcha = (props) => {
|
|
88
|
+
console.log('config', props.config);
|
|
79
89
|
const config = props.config;
|
|
80
90
|
const callbacks = props.callbacks || {};
|
|
81
91
|
const [state, updateState] = useProcaptcha();
|
|
92
|
+
console.log('state', state);
|
|
82
93
|
const manager = Manager(config, state, updateState, callbacks);
|
|
83
|
-
return (_jsxs(Box, { sx: { maxWidth: '100%', maxHeight: '100%', overflowX: 'auto' }, children: [_jsx(Backdrop, { open: state.showModal, sx: { zIndex: (theme) => theme.zIndex.drawer + 1 }, children: state.challenge ? (_jsx(CaptchaComponent, { challenge: state.challenge, index: state.index, solutions: state.solutions, onSubmit: manager.submit, onCancel: manager.cancel, onClick: manager.select, onNext: manager.nextRound })) : (_jsx(Alert, { children: "No challenge set." })) }), _jsx(Box, { p: 1, sx: { maxWidth: '600px', minWidth: '200px' }, children: _jsxs(Box, { p: 1, border: 1, borderColor: "grey.300", borderRadius: 2, sx: {
|
|
94
|
+
return (_jsxs(Box, { sx: { maxWidth: '100%', maxHeight: '100%', overflowX: 'auto' }, children: [_jsx(Backdrop, { open: state.showModal, sx: { zIndex: (theme) => theme.zIndex.drawer + 1 }, children: state.challenge ? (_jsx(CaptchaComponent, { challenge: state.challenge, index: state.index, solutions: state.solutions, onSubmit: manager.submit, onCancel: manager.cancel, onClick: manager.select, onNext: manager.nextRound })) : (_jsx(Alert, { children: "No challenge set." })) }), _jsx(Box, { p: 1, sx: { maxWidth: '600px', minWidth: '200px' }, "data-cy": 'button-human', children: _jsxs(Box, { p: 1, border: 1, borderColor: "grey.300", borderRadius: 2, sx: {
|
|
95
|
+
display: 'flex',
|
|
96
|
+
justifyContent: 'space-between',
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
flexWrap: 'wrap',
|
|
99
|
+
color: 'black',
|
|
100
|
+
backgroundColor: 'white',
|
|
101
|
+
}, children: [_jsx(Box, { sx: { display: 'flex', flexDirection: 'column' }, children: _jsxs(Box, { sx: {
|
|
84
102
|
display: 'flex',
|
|
85
103
|
justifyContent: 'flex-start',
|
|
86
104
|
alignItems: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Procaptcha.js","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Procaptcha.js","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGH,OAAO,GAOV,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,QAAQ,MAAM,wBAAwB,CAAA;AAC7C,OAAO,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5C,YAED,KAAC,GAAG,IAAC,EAAE,EAAE,KAAK,YACV,KAAC,gBAAgB,IAAC,IAAI,EAAE,MAAM,EAAE,aAAa,SAAG,GAC9C,GACJ,IACJ,EACN,KAAC,GAAG,IAAC,CAAC,EAAE,CAAC,YACL,KAAC,UAAU,+BAA0B,GACnC,IACJ,GAIJ,EACN,KAAC,GAAG,IAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,YAClE,KAAC,IAAI,IAAC,IAAI,EAAC,oBAAoB,EAAC,MAAM,EAAC,QAAQ,YAC3C,KAAC,GAAG,cACA,cACI,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,EAC/D,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GACtC,GACL,GACH,GACL,IACJ,GACJ,IACJ,CACT,CAAA;AACL,CAAC,CAAA;AAED,MAAM,IAAI,GACN,wjHAAwjH,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAeA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAeA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAC5E,cAAc,cAAc,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (C) 2021-
|
|
1
|
+
// Copyright (C) 2021-2023 Prosopo (UK) Ltd.
|
|
2
2
|
// This file is part of procaptcha-react <https://github.com/prosopo/procaptcha-react>.
|
|
3
3
|
//
|
|
4
4
|
// procaptcha-react is free software: you can redistribute it and/or modify
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
// along with procaptcha-react. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
export * from './CaptchaWidget';
|
|
17
17
|
export * from './CaptchaComponent';
|
|
18
|
-
export
|
|
18
|
+
export { default as ExtensionAccountSelect } from './ExtensionAccountSelect';
|
|
19
19
|
export * from './Procaptcha';
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,uFAAuF;AACvF,EAAE;AACF,2EAA2E;AAC3E,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,4EAA4E;AAC5E,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,uFAAuF;AACvF,EAAE;AACF,2EAA2E;AAC3E,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,4EAA4E;AAC5E,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAC5E,cAAc,cAAc,CAAA"}
|
package/dist/components/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,eAAe,WAAW,CAAC;IACvB,OAAO,EAAE;QACL,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,MAAM;SACvB;KACJ;CACJ,CAAC,CAAA"}
|
package/dist/util/index.d.ts
CHANGED
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,OAAO,EACP,GAAG,GACN,EAAE;IACC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACnC,GAAG,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAClC,MAKA"}
|
package/dist/util/index.js
CHANGED
|
@@ -6,7 +6,7 @@ function renameKeysForDataAttr(data = {}) {
|
|
|
6
6
|
*
|
|
7
7
|
* dev - only in development mode
|
|
8
8
|
*/
|
|
9
|
-
export function addDataAttr({ general, dev, }) {
|
|
9
|
+
export default function addDataAttr({ general, dev, }) {
|
|
10
10
|
return {
|
|
11
11
|
...renameKeysForDataAttr(general),
|
|
12
12
|
...(process.env.NODE_ENV === 'development' ? renameKeysForDataAttr(dev) : {}),
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,SAAS,qBAAqB,CAAC,OAAkC,EAAE;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AACpG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,SAAS,qBAAqB,CAAC,OAAkC,EAAE;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AACpG,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,OAAO,EACP,GAAG,GAIN;IACG,OAAO;QACH,GAAG,qBAAqB,CAAC,OAAO,CAAC;QACjC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAChF,CAAA;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,46 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
2
|
+
"name": "@prosopo/procaptcha-react",
|
|
3
|
+
"version": "0.1.14",
|
|
4
|
+
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"source": "./src/index.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"clean": "tsc --build --clean",
|
|
12
|
+
"build": "tsc --build --verbose",
|
|
13
|
+
"lint": "npx eslint .",
|
|
14
|
+
"lint:fix": "npx eslint . --fix"
|
|
15
|
+
},
|
|
16
|
+
"browserslist": [
|
|
17
|
+
"> 0.5%, last 2 versions, not dead"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@emotion/react": "^11.10.4",
|
|
21
|
+
"@emotion/styled": "^11.10.4",
|
|
22
|
+
"@mui/icons-material": "^5.11.16",
|
|
23
|
+
"@mui/material": "^5.13.3",
|
|
24
|
+
"@polkadot/extension-dapp": "0.46.5",
|
|
25
|
+
"@polkadot/extension-inject": "0.46.5",
|
|
26
|
+
"@polkadot/types": "10.9.1",
|
|
27
|
+
"@prosopo/common": "^0.1.14",
|
|
28
|
+
"@prosopo/procaptcha": "^0.1.14",
|
|
29
|
+
"i18next": "^22.5.0",
|
|
30
|
+
"react": "^18.2.0",
|
|
31
|
+
"react-dom": "^18.2.0",
|
|
32
|
+
"zod": "^3.17.9"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"typescript": "^4.9.4"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/prosopo/captcha.git"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/prosopo/captcha/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/prosopo/captcha#readme",
|
|
45
|
+
"description": "",
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"registry": "https://registry.npmjs.org"
|
|
48
|
+
}
|
|
46
49
|
}
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
es2021: true,
|
|
5
|
-
},
|
|
6
|
-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'],
|
|
7
|
-
parser: '@typescript-eslint/parser',
|
|
8
|
-
parserOptions: {
|
|
9
|
-
ecmaVersion: 'latest',
|
|
10
|
-
sourceType: 'module',
|
|
11
|
-
},
|
|
12
|
-
plugins: ['unused-imports', '@typescript-eslint', 'prettier'],
|
|
13
|
-
rules: {
|
|
14
|
-
'no-unused-vars': 'off',
|
|
15
|
-
'unused-imports/no-unused-imports': 'error',
|
|
16
|
-
'unused-imports/no-unused-vars': [
|
|
17
|
-
'warn',
|
|
18
|
-
{
|
|
19
|
-
vars: 'all',
|
|
20
|
-
varsIgnorePattern: '^_',
|
|
21
|
-
args: 'after-used',
|
|
22
|
-
argsIgnorePattern: '^_',
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
//"indent": ["error", 4],
|
|
26
|
-
//"indent": "off",
|
|
27
|
-
'sort-imports': [
|
|
28
|
-
'error',
|
|
29
|
-
{
|
|
30
|
-
ignoreDeclarationSort: true,
|
|
31
|
-
allowSeparatedGroups: false,
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
'prettier/prettier': ['error'],
|
|
35
|
-
},
|
|
36
|
-
}
|
package/.prettierrc.js
DELETED
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2022 PROSOPO LIMITED
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
package/tsconfig.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.build.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": "./src",
|
|
5
|
-
"outDir": "./dist",
|
|
6
|
-
"module": "esnext",
|
|
7
|
-
"target": "esnext",
|
|
8
|
-
"lib": [
|
|
9
|
-
"es6",
|
|
10
|
-
"dom"
|
|
11
|
-
],
|
|
12
|
-
"jsx": "react-jsx"
|
|
13
|
-
},
|
|
14
|
-
"include": [
|
|
15
|
-
"src"
|
|
16
|
-
]
|
|
17
|
-
}
|