@basiq/connect-auth 0.1.72 → 0.1.75
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/.eslintignore +1 -0
- package/dist/60fda426a98e8c5b0470d694e2c66520.otf +1 -0
- package/dist/d4bd6e2e30a9c41422cecb85a045da71.otf +1 -0
- package/dist/main.js +1 -1
- package/package.json +98 -98
- package/.eslintrc.json +0 -48
- package/.prettierrc +0 -12
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/src/App.d.ts +0 -3
- package/src/App.js +0 -141
- package/src/App.test.d.ts +0 -1
- package/src/App.test.js +0 -13
- package/src/App.test.tsx +0 -9
- package/src/App.tsx +0 -80
- package/src/actions/actions.d.ts +0 -22
- package/src/actions/actions.js +0 -140
- package/src/actions/actions.ts +0 -71
- package/src/components/modals/LoadingModal.d.ts +0 -8
- package/src/components/modals/LoadingModal.js +0 -20
- package/src/components/modals/LoadingModal.tsx +0 -28
- package/src/components/modals/index.d.ts +0 -1
- package/src/components/modals/index.js +0 -8
- package/src/components/modals/index.ts +0 -1
- package/src/components/pages/AuthScreen.d.ts +0 -9
- package/src/components/pages/AuthScreen.js +0 -148
- package/src/components/pages/AuthScreen.tsx +0 -94
- package/src/components/pages/NotFound.d.ts +0 -6
- package/src/components/pages/NotFound.js +0 -27
- package/src/components/pages/NotFound.tsx +0 -44
- package/src/components/pages/Page.d.ts +0 -18
- package/src/components/pages/Page.js +0 -24
- package/src/components/pages/Page.tsx +0 -46
- package/src/components/pages/StartScreen.d.ts +0 -9
- package/src/components/pages/StartScreen.js +0 -127
- package/src/components/pages/StartScreen.tsx +0 -77
- package/src/components/pages/index.d.ts +0 -4
- package/src/components/pages/index.js +0 -14
- package/src/components/pages/index.ts +0 -4
- package/src/components/ui/Button.d.ts +0 -10
- package/src/components/ui/Button.js +0 -17
- package/src/components/ui/Button.tsx +0 -24
- package/src/components/ui/Modal.d.ts +0 -9
- package/src/components/ui/Modal.js +0 -17
- package/src/components/ui/Modal.tsx +0 -29
- package/src/components/ui/icon.d.ts +0 -7
- package/src/components/ui/icon.js +0 -13
- package/src/components/ui/icon.tsx +0 -18
- package/src/components/ui/index.d.ts +0 -1
- package/src/components/ui/index.js +0 -8
- package/src/components/ui/index.ts +0 -1
- package/src/fonts/Mark-W1G-Bold.otf +0 -0
- package/src/fonts/Mark-W1G-Book.otf +0 -0
- package/src/fonts.d.ts +0 -1
- package/src/helpers/constants.d.ts +0 -1
- package/src/helpers/constants.js +0 -5
- package/src/helpers/constants.ts +0 -3
- package/src/helpers/hookUtils.d.ts +0 -2
- package/src/helpers/hookUtils.js +0 -10
- package/src/helpers/hookUtils.ts +0 -8
- package/src/helpers/index.d.ts +0 -3
- package/src/helpers/index.js +0 -19
- package/src/helpers/index.ts +0 -3
- package/src/helpers/utils.d.ts +0 -3
- package/src/helpers/utils.js +0 -15
- package/src/helpers/utils.ts +0 -12
- package/src/images/back.svg +0 -8
- package/src/images/error.svg +0 -10
- package/src/images/loading_indicator.svg +0 -14
- package/src/index.d.ts +0 -6
- package/src/index.js +0 -23
- package/src/index.tsx +0 -19
- package/src/locales/en/translation.json +0 -28
- package/src/locales/i18n.d.ts +0 -35
- package/src/locales/i18n.js +0 -28
- package/src/locales/i18n.ts +0 -27
- package/src/logo.svg +0 -1
- package/src/react-app-env.d.ts +0 -1
- package/src/react-i18next.d.ts +0 -9
- package/src/reportWebVitals.d.ts +0 -3
- package/src/reportWebVitals.js +0 -38
- package/src/reportWebVitals.ts +0 -15
- package/src/setupTests.d.ts +0 -1
- package/src/setupTests.js +0 -7
- package/src/setupTests.ts +0 -5
- package/src/styled.d.ts +0 -6
- package/src/styledComponents/base.d.ts +0 -4
- package/src/styledComponents/base.js +0 -32
- package/src/styledComponents/base.ts +0 -73
- package/src/styledComponents/breakpoints.d.ts +0 -15
- package/src/styledComponents/breakpoints.js +0 -35
- package/src/styledComponents/breakpoints.ts +0 -32
- package/src/styledComponents/index.d.ts +0 -4
- package/src/styledComponents/index.js +0 -20
- package/src/styledComponents/index.ts +0 -4
- package/src/styledComponents/pages/auth.d.ts +0 -10
- package/src/styledComponents/pages/auth.js +0 -29
- package/src/styledComponents/pages/auth.ts +0 -49
- package/src/styledComponents/pages/basic.d.ts +0 -23
- package/src/styledComponents/pages/basic.js +0 -75
- package/src/styledComponents/pages/basic.ts +0 -126
- package/src/styledComponents/pages/index.d.ts +0 -4
- package/src/styledComponents/pages/index.js +0 -20
- package/src/styledComponents/pages/index.ts +0 -4
- package/src/styledComponents/pages/notFound.d.ts +0 -9
- package/src/styledComponents/pages/notFound.js +0 -37
- package/src/styledComponents/pages/notFound.ts +0 -70
- package/src/styledComponents/pages/start.d.ts +0 -1
- package/src/styledComponents/pages/start.js +0 -13
- package/src/styledComponents/pages/start.ts +0 -6
- package/src/styledComponents/styles.d.ts +0 -2
- package/src/styledComponents/styles.js +0 -14
- package/src/styledComponents/styles.ts +0 -25
- package/src/styledComponents/theme.d.ts +0 -45
- package/src/styledComponents/theme.js +0 -47
- package/src/styledComponents/theme.ts +0 -58
- package/src/styledComponents/ui/basic.d.ts +0 -10
- package/src/styledComponents/ui/basic.js +0 -71
- package/src/styledComponents/ui/basic.ts +0 -96
- package/src/styledComponents/ui/button.d.ts +0 -9
- package/src/styledComponents/ui/button.js +0 -65
- package/src/styledComponents/ui/button.ts +0 -112
- package/src/styledComponents/ui/index.d.ts +0 -3
- package/src/styledComponents/ui/index.js +0 -19
- package/src/styledComponents/ui/index.ts +0 -3
- package/src/styledComponents/ui/modals.d.ts +0 -7
- package/src/styledComponents/ui/modals.js +0 -26
- package/src/styledComponents/ui/modals.ts +0 -48
- package/webpack.config.js +0 -66
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Button } from '../ui';
|
|
4
|
-
import { PageControlsSection, PageMainContainer, PageShadow, PageShadowWrapper, PageStyled, PageSubtitle } from '../../styledComponents';
|
|
5
|
-
import { ButtonType } from '../ui/Button';
|
|
6
|
-
|
|
7
|
-
interface IProps {
|
|
8
|
-
buttons?: IButton[];
|
|
9
|
-
children: ReactElement;
|
|
10
|
-
title?: string | ReactElement;
|
|
11
|
-
subTitle?: string;
|
|
12
|
-
shadow: boolean;
|
|
13
|
-
onBack?: () => void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface IButton {
|
|
17
|
-
label: string;
|
|
18
|
-
onClick: () => void;
|
|
19
|
-
buttonType?: ButtonType;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function Page(props: IProps) {
|
|
24
|
-
const { buttons, children, title, subTitle, shadow, onBack } = props;
|
|
25
|
-
|
|
26
|
-
const { t } = useTranslation();
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<PageStyled buttonCount={buttons?.length}>
|
|
30
|
-
{onBack && <Button onClick={onBack} label={t('back')} buttonType="back" />}
|
|
31
|
-
{title && <h3>{title}</h3>}
|
|
32
|
-
{subTitle && <PageSubtitle>{subTitle}</PageSubtitle>}
|
|
33
|
-
<PageMainContainer>{children}</PageMainContainer>
|
|
34
|
-
<PageControlsSection notEmpty={(buttons?.length ?? 0) > 0}>
|
|
35
|
-
<PageShadowWrapper>
|
|
36
|
-
{shadow && <PageShadow />}
|
|
37
|
-
{buttons?.map((b, index) => (
|
|
38
|
-
<Button key={index} onClick={b.onClick} label={b.label} buttonType={b.buttonType} disabled={b.disabled} />
|
|
39
|
-
))}
|
|
40
|
-
</PageShadowWrapper>
|
|
41
|
-
</PageControlsSection>
|
|
42
|
-
</PageStyled>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default Page;
|
|
@@ -1,127 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (_) try {
|
|
41
|
-
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;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
-
};
|
|
64
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
var react_1 = __importStar(require("react"));
|
|
66
|
-
var react_i18next_1 = require("react-i18next");
|
|
67
|
-
var Page_1 = __importDefault(require("./Page"));
|
|
68
|
-
var styledComponents_1 = require("../../styledComponents");
|
|
69
|
-
var actions_1 = require("../../actions/actions");
|
|
70
|
-
var modals_1 = require("../modals");
|
|
71
|
-
function StartScreen(props) {
|
|
72
|
-
var _this = this;
|
|
73
|
-
var onContinue = props.onContinue, appName = props.appName, shadow = props.shadow, authId = props.authId;
|
|
74
|
-
var _a = (0, react_1.useState)(false), loading = _a[0], setLoading = _a[1];
|
|
75
|
-
var t = (0, react_i18next_1.useTranslation)().t;
|
|
76
|
-
var handleContinue = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
77
|
-
var response;
|
|
78
|
-
var _a;
|
|
79
|
-
return __generator(this, function (_b) {
|
|
80
|
-
switch (_b.label) {
|
|
81
|
-
case 0:
|
|
82
|
-
setLoading(true);
|
|
83
|
-
return [4 /*yield*/, (0, actions_1.authUser)(authId)];
|
|
84
|
-
case 1:
|
|
85
|
-
response = _b.sent();
|
|
86
|
-
if (((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.status) === 'code-sent') {
|
|
87
|
-
setLoading(false);
|
|
88
|
-
onContinue();
|
|
89
|
-
}
|
|
90
|
-
return [2 /*return*/];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}); };
|
|
94
|
-
var buttons = [
|
|
95
|
-
{
|
|
96
|
-
label: t('continue'),
|
|
97
|
-
onClick: function () { return handleContinue(); }
|
|
98
|
-
}
|
|
99
|
-
];
|
|
100
|
-
return (react_1.default.createElement(Page_1.default, { title: appName ? (react_1.default.createElement(react_i18next_1.Trans, { t: t, i18nKey: "use_basiq_to_connect_your_accounts", values: { name: appName }, components: { bold: react_1.default.createElement("strong", null) } })) : (react_1.default.createElement(react_i18next_1.Trans, { t: t, i18nKey: "we_use_basiq_to_connect_your_accounts", components: { bold: react_1.default.createElement("strong", null) } })), shadow: shadow, buttons: buttons },
|
|
101
|
-
react_1.default.createElement(styledComponents_1.InnerContainer, null,
|
|
102
|
-
react_1.default.createElement(styledComponents_1.Spacer, null),
|
|
103
|
-
react_1.default.createElement(styledComponents_1.H4Styled, null, t('to_do_this_we_will_ask_you_to')),
|
|
104
|
-
react_1.default.createElement("ul", null,
|
|
105
|
-
react_1.default.createElement("li", null,
|
|
106
|
-
react_1.default.createElement(react_i18next_1.Trans, { t: t, i18nKey: "verify_your_mobile_number_bold", components: { bold: react_1.default.createElement("strong", null) } })),
|
|
107
|
-
react_1.default.createElement("li", null,
|
|
108
|
-
react_1.default.createElement(react_i18next_1.Trans, { t: t, i18nKey: "consent_to_share_your_data_with_us", components: { bold: react_1.default.createElement("strong", null) } })),
|
|
109
|
-
react_1.default.createElement("li", null,
|
|
110
|
-
react_1.default.createElement(react_i18next_1.Trans, { t: t, i18nKey: "share_your_financial_data", components: { bold: react_1.default.createElement("strong", null) } }))),
|
|
111
|
-
react_1.default.createElement(styledComponents_1.H4Styled, null, t('things_you_should_know')),
|
|
112
|
-
react_1.default.createElement("ul", null,
|
|
113
|
-
react_1.default.createElement("li", null, t('we_dont_share_your_data_without_your_consent')),
|
|
114
|
-
react_1.default.createElement("li", null, t('you_can_easily_stop_sharing_your_data_at_any_time')),
|
|
115
|
-
react_1.default.createElement("li", null, t('you_can_choose_to_delete_shared_data_when_we_no_longer_need_it'))),
|
|
116
|
-
react_1.default.createElement(styledComponents_1.Spacer, null),
|
|
117
|
-
react_1.default.createElement("span", null,
|
|
118
|
-
t('by_proceeding_you_agree_to_the'),
|
|
119
|
-
' ',
|
|
120
|
-
react_1.default.createElement("a", { href: "https://docs.basiq.io/en/articles/415750-basiq-terms-of-service" }, t('terms_of_service')),
|
|
121
|
-
" ",
|
|
122
|
-
t('and'),
|
|
123
|
-
' ',
|
|
124
|
-
react_1.default.createElement("a", { href: "https://docs.basiq.io/en/articles/382581-basiq-privacy-policy" }, t('privacy_notice'))),
|
|
125
|
-
react_1.default.createElement(modals_1.LoadingModal, { isOpen: loading }))));
|
|
126
|
-
}
|
|
127
|
-
exports.default = StartScreen;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Trans, useTranslation } from 'react-i18next';
|
|
3
|
-
import Page, { IButton } from './Page';
|
|
4
|
-
import { H4Styled, Spacer, InnerContainer } from '../../styledComponents';
|
|
5
|
-
import { authUser } from '../../actions/actions';
|
|
6
|
-
import { LoadingModal } from '../modals';
|
|
7
|
-
|
|
8
|
-
interface IProps {
|
|
9
|
-
onContinue: () => void;
|
|
10
|
-
shadow: boolean;
|
|
11
|
-
appName: string;
|
|
12
|
-
authId: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function StartScreen(props: IProps) {
|
|
16
|
-
const { onContinue, appName, shadow, authId } = props;
|
|
17
|
-
const [loading, setLoading] = useState(false);
|
|
18
|
-
const { t } = useTranslation();
|
|
19
|
-
const handleContinue = async () => {
|
|
20
|
-
setLoading(true);
|
|
21
|
-
const response = await authUser(authId);
|
|
22
|
-
if (response?.data?.status === 'code-sent') {
|
|
23
|
-
setLoading(false);
|
|
24
|
-
onContinue();
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const buttons: IButton[] = [
|
|
28
|
-
{
|
|
29
|
-
label: t('continue'),
|
|
30
|
-
onClick: () => handleContinue()
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
return (
|
|
34
|
-
<Page
|
|
35
|
-
title={
|
|
36
|
-
appName ? (
|
|
37
|
-
<Trans t={t} i18nKey="use_basiq_to_connect_your_accounts" values={{ name: appName }} components={{ bold: <strong /> }} />
|
|
38
|
-
) : (
|
|
39
|
-
<Trans t={t} i18nKey="we_use_basiq_to_connect_your_accounts" components={{ bold: <strong /> }} />
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
shadow={shadow}
|
|
43
|
-
buttons={buttons}
|
|
44
|
-
>
|
|
45
|
-
<InnerContainer>
|
|
46
|
-
<Spacer />
|
|
47
|
-
<H4Styled>{t('to_do_this_we_will_ask_you_to')}</H4Styled>
|
|
48
|
-
<ul>
|
|
49
|
-
<li>
|
|
50
|
-
<Trans t={t} i18nKey="verify_your_mobile_number_bold" components={{ bold: <strong /> }} />
|
|
51
|
-
</li>
|
|
52
|
-
<li>
|
|
53
|
-
<Trans t={t} i18nKey="consent_to_share_your_data_with_us" components={{ bold: <strong /> }} />
|
|
54
|
-
</li>
|
|
55
|
-
<li>
|
|
56
|
-
<Trans t={t} i18nKey="share_your_financial_data" components={{ bold: <strong /> }} />
|
|
57
|
-
</li>
|
|
58
|
-
</ul>
|
|
59
|
-
<H4Styled>{t('things_you_should_know')}</H4Styled>
|
|
60
|
-
<ul>
|
|
61
|
-
<li>{t('we_dont_share_your_data_without_your_consent')}</li>
|
|
62
|
-
<li>{t('you_can_easily_stop_sharing_your_data_at_any_time')}</li>
|
|
63
|
-
<li>{t('you_can_choose_to_delete_shared_data_when_we_no_longer_need_it')}</li>
|
|
64
|
-
</ul>
|
|
65
|
-
<Spacer />
|
|
66
|
-
<span>
|
|
67
|
-
{t('by_proceeding_you_agree_to_the')}{' '}
|
|
68
|
-
<a href="https://docs.basiq.io/en/articles/415750-basiq-terms-of-service">{t('terms_of_service')}</a> {t('and')}{' '}
|
|
69
|
-
<a href="https://docs.basiq.io/en/articles/382581-basiq-privacy-policy">{t('privacy_notice')}</a>
|
|
70
|
-
</span>
|
|
71
|
-
<LoadingModal isOpen={loading} />
|
|
72
|
-
</InnerContainer>
|
|
73
|
-
</Page>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export default StartScreen;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AuthScreen = exports.StartScreen = exports.NotFound = exports.Page = void 0;
|
|
7
|
-
var Page_1 = require("./Page");
|
|
8
|
-
Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return __importDefault(Page_1).default; } });
|
|
9
|
-
var NotFound_1 = require("./NotFound");
|
|
10
|
-
Object.defineProperty(exports, "NotFound", { enumerable: true, get: function () { return __importDefault(NotFound_1).default; } });
|
|
11
|
-
var StartScreen_1 = require("./StartScreen");
|
|
12
|
-
Object.defineProperty(exports, "StartScreen", { enumerable: true, get: function () { return __importDefault(StartScreen_1).default; } });
|
|
13
|
-
var AuthScreen_1 = require("./AuthScreen");
|
|
14
|
-
Object.defineProperty(exports, "AuthScreen", { enumerable: true, get: function () { return __importDefault(AuthScreen_1).default; } });
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare type ButtonType = 'secondary' | 'tiny' | 'link' | 'back';
|
|
3
|
-
interface Props {
|
|
4
|
-
onClick: () => void;
|
|
5
|
-
label: string;
|
|
6
|
-
buttonType?: ButtonType;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare function Button(props: Props): JSX.Element;
|
|
10
|
-
export default Button;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var styledComponents_1 = require("../../styledComponents");
|
|
8
|
-
var back_svg_1 = __importDefault(require("../../images/back.svg"));
|
|
9
|
-
function Button(props) {
|
|
10
|
-
var onClick = props.onClick, label = props.label, buttonType = props.buttonType, disabled = props.disabled;
|
|
11
|
-
return (react_1.default.createElement(styledComponents_1.ButtonStyled, { buttonType: buttonType, disabled: disabled || false, onClick: onClick },
|
|
12
|
-
buttonType === 'back' && react_1.default.createElement("img", { src: back_svg_1.default, alt: "" }),
|
|
13
|
-
react_1.default.createElement(styledComponents_1.ButtonLabel, null,
|
|
14
|
-
" ",
|
|
15
|
-
label || '')));
|
|
16
|
-
}
|
|
17
|
-
exports.default = Button;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ButtonLabel, ButtonStyled } from '../../styledComponents';
|
|
3
|
-
import back from '../../images/back.svg';
|
|
4
|
-
|
|
5
|
-
export type ButtonType = 'secondary' | 'tiny' | 'link' | 'back';
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
onClick: () => void;
|
|
9
|
-
label: string;
|
|
10
|
-
buttonType?: ButtonType;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function Button(props: Props) {
|
|
15
|
-
const { onClick, label, buttonType, disabled } = props;
|
|
16
|
-
return (
|
|
17
|
-
<ButtonStyled buttonType={buttonType} disabled={disabled || false} onClick={onClick}>
|
|
18
|
-
{buttonType === 'back' && <img src={back} alt="" />}
|
|
19
|
-
<ButtonLabel> {label || ''}</ButtonLabel>
|
|
20
|
-
</ButtonStyled>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Button;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var styledComponents_1 = require("../../styledComponents");
|
|
8
|
-
function Modal(props) {
|
|
9
|
-
var children = props.children, onClose = props.onClose, isOpen = props.isOpen, disableTransparency = props.disableTransparency;
|
|
10
|
-
var handleOutsideClick = function (e) {
|
|
11
|
-
if (onClose && e.target.id === 'ui-modal') {
|
|
12
|
-
onClose();
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
return (react_1.default.createElement(react_1.default.Fragment, null, isOpen ? (react_1.default.createElement(styledComponents_1.ModalStyled, { id: "ui-modal", disableTransparency: disableTransparency, onClick: handleOutsideClick }, children)) : null));
|
|
16
|
-
}
|
|
17
|
-
exports.default = Modal;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement, SyntheticEvent } from 'react';
|
|
2
|
-
import { ModalStyled } from '../../styledComponents';
|
|
3
|
-
|
|
4
|
-
interface IProps {
|
|
5
|
-
children: ReactElement;
|
|
6
|
-
onClose?: () => void;
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
disableTransparency: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function Modal(props: IProps) {
|
|
12
|
-
const { children, onClose, isOpen, disableTransparency } = props;
|
|
13
|
-
const handleOutsideClick = (e: SyntheticEvent<HTMLElement>) => {
|
|
14
|
-
if (onClose && (e.target as HTMLElement).id === 'ui-modal') {
|
|
15
|
-
onClose();
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
return (
|
|
19
|
-
<>
|
|
20
|
-
{isOpen ? (
|
|
21
|
-
<ModalStyled id="ui-modal" disableTransparency={disableTransparency} onClick={handleOutsideClick}>
|
|
22
|
-
{children}
|
|
23
|
-
</ModalStyled>
|
|
24
|
-
) : null}
|
|
25
|
-
</>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default Modal;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var styledComponents_1 = require("../../styledComponents");
|
|
8
|
-
function Icon(props) {
|
|
9
|
-
var rotating = props.rotating, img = props.img;
|
|
10
|
-
return (react_1.default.createElement(styledComponents_1.IconWrapper, { rotating: rotating },
|
|
11
|
-
react_1.default.createElement("img", { src: img, alt: "" })));
|
|
12
|
-
}
|
|
13
|
-
exports.default = Icon;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconWrapper } from '../../styledComponents';
|
|
3
|
-
|
|
4
|
-
interface IProps {
|
|
5
|
-
rotating: boolean;
|
|
6
|
-
img: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function Icon(props: IProps) {
|
|
10
|
-
const { rotating, img } = props;
|
|
11
|
-
return (
|
|
12
|
-
<IconWrapper rotating={rotating}>
|
|
13
|
-
<img src={img} alt="" />
|
|
14
|
-
</IconWrapper>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default Icon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Button = void 0;
|
|
7
|
-
var Button_1 = require("./Button");
|
|
8
|
-
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
Binary file
|
|
Binary file
|
package/src/fonts.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module '*.otf';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DASHBOARD_API_URL = "https://p4c8zn20r9.execute-api.ap-southeast-2.amazonaws.com/Production_v1/";
|
package/src/helpers/constants.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DASHBOARD_API_URL = void 0;
|
|
4
|
-
// export const DASHBOARD_API_URL = 'https://c9joivz12f.execute-api.ap-southeast-2.amazonaws.com/Development/';
|
|
5
|
-
exports.DASHBOARD_API_URL = 'https://p4c8zn20r9.execute-api.ap-southeast-2.amazonaws.com/Production_v1/';
|
package/src/helpers/constants.ts
DELETED
package/src/helpers/hookUtils.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFocus = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var useFocus = function () {
|
|
6
|
-
var htmlElRef = (0, react_1.useRef)(null);
|
|
7
|
-
var setFocus = function () { return htmlElRef.current && htmlElRef.current.focus(); };
|
|
8
|
-
return [htmlElRef, setFocus];
|
|
9
|
-
};
|
|
10
|
-
exports.useFocus = useFocus;
|
package/src/helpers/hookUtils.ts
DELETED
package/src/helpers/index.d.ts
DELETED
package/src/helpers/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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("./hookUtils"), exports);
|
|
18
|
-
__exportStar(require("./utils"), exports);
|
|
19
|
-
__exportStar(require("./constants"), exports);
|
package/src/helpers/index.ts
DELETED
package/src/helpers/utils.d.ts
DELETED
package/src/helpers/utils.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hexToRGBa = exports.detectScrollToBottom = void 0;
|
|
4
|
-
function detectScrollToBottom(event) {
|
|
5
|
-
var _a = event.currentTarget, scrollHeight = _a.scrollHeight, scrollTop = _a.scrollTop, clientHeight = _a.clientHeight;
|
|
6
|
-
return scrollHeight - scrollTop > clientHeight;
|
|
7
|
-
}
|
|
8
|
-
exports.detectScrollToBottom = detectScrollToBottom;
|
|
9
|
-
var hexToRGBa = function (hex, opacity) {
|
|
10
|
-
var _a;
|
|
11
|
-
var hexToRGBA = (_a = hex.match(/[A-Za-z0-9]{2}/g)) === null || _a === void 0 ? void 0 : _a.map(function (v) { return parseInt(v, 16); });
|
|
12
|
-
var opp = opacity > 1 && opacity < 0 ? 1 : opacity;
|
|
13
|
-
return "rgba(".concat(hexToRGBA === null || hexToRGBA === void 0 ? void 0 : hexToRGBA.concat(opp).join(), ")");
|
|
14
|
-
};
|
|
15
|
-
exports.hexToRGBa = hexToRGBa;
|
package/src/helpers/utils.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
|
-
|
|
3
|
-
export function detectScrollToBottom(event: SyntheticEvent<HTMLDivElement>) {
|
|
4
|
-
const { scrollHeight, scrollTop, clientHeight } = event.currentTarget;
|
|
5
|
-
return scrollHeight - scrollTop > clientHeight;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const hexToRGBa = (hex: string, opacity: number) => {
|
|
9
|
-
const hexToRGBA = hex.match(/[A-Za-z0-9]{2}/g)?.map((v) => parseInt(v, 16));
|
|
10
|
-
const opp = opacity > 1 && opacity < 0 ? 1 : opacity;
|
|
11
|
-
return `rgba(${hexToRGBA?.concat(opp).join()})`;
|
|
12
|
-
};
|
package/src/images/back.svg
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<!-- Generated by IcoMoon.io -->
|
|
2
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
|
|
3
|
-
<title></title>
|
|
4
|
-
<g id="icomoon-ignore">
|
|
5
|
-
</g>
|
|
6
|
-
<path fill="#000" d="M682.667 469.333h-241.493l53.333-55.893c7.287-7.645 11.77-18.019 11.77-29.44 0-23.584-19.119-42.703-42.703-42.703-12.164 0-23.139 5.085-30.917 13.246l-0.016 0.017-122.027 128c-1.338 1.628-2.607 3.44-3.731 5.347l-0.109 0.199c-1.886 2.326-3.467 5.004-4.62 7.899l-0.073 0.207c-1.426 3.52-2.347 7.596-2.557 11.859l-0.003 0.088-0.853 3.84c0.073 5.873 1.322 11.435 3.52 16.489l-0.107-0.275c2.2 5.299 5.227 9.831 8.968 13.662l127.992 127.992c7.733 7.795 18.45 12.621 30.293 12.621s22.56-4.826 30.291-12.618l0.003-0.003c7.795-7.733 12.621-18.45 12.621-30.293s-4.826-22.56-12.618-30.291l-0.003-0.003-55.467-54.613h238.507c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667v0z"></path>
|
|
7
|
-
<path fill="#000" d="M512 85.333c-235.641 0-426.667 191.025-426.667 426.667s191.025 426.667 426.667 426.667c235.641 0 426.667-191.025 426.667-426.667v0c0-235.641-191.025-426.667-426.667-426.667v0zM512 853.333c-188.513 0-341.333-152.82-341.333-341.333s152.82-341.333 341.333-341.333c188.513 0 341.333 152.82 341.333 341.333v0c0 188.513-152.82 341.333-341.333 341.333v0z"></path>
|
|
8
|
-
</svg>
|
package/src/images/error.svg
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<!-- Generated by IcoMoon.io -->
|
|
2
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
|
|
3
|
-
<title></title>
|
|
4
|
-
<g id="icomoon-ignore">
|
|
5
|
-
</g>
|
|
6
|
-
<path fill="#fabe34" d="M512 0c282.77 0 512 229.23 512 512s-229.23 512-512 512c-282.77 0-512-229.23-512-512s229.23-512 512-512z"></path>
|
|
7
|
-
<path fill="#fff" d="M336.968 320.978c-33.427 33.427-49.307 89.357-49.307 183.024 0 93.669 15.88 149.598 49.307 183.026 33.429 33.429 89.357 49.309 183.026 49.309s149.597-15.88 183.026-49.309c33.427-33.427 49.307-89.357 49.307-183.026 0-93.667-15.88-149.597-49.307-183.024-33.429-33.429-89.357-49.309-183.026-49.309s-149.597 15.88-183.026 49.309zM307.978 291.986c45.586-45.586 116.074-61.317 212.016-61.317s166.43 15.731 212.016 61.317c45.586 45.586 61.317 116.074 61.317 212.016 0 95.944-15.731 166.432-61.317 212.018s-116.074 61.317-212.016 61.317c-95.942 0-166.43-15.731-212.016-61.317-45.587-45.586-61.317-116.074-61.317-212.018 0-95.942 15.73-166.43 61.317-212.016z"></path>
|
|
8
|
-
<path fill="#fff" d="M519.992 377.037c11.322 0 20.501 9.178 20.501 20.499v106.464c0 11.322-9.179 20.499-20.501 20.499s-20.499-9.178-20.499-20.499v-106.464c0-11.322 9.178-20.499 20.499-20.499z"></path>
|
|
9
|
-
<path fill="#fff" d="M499.379 599.667c0-11.323 9.178-20.501 20.499-20.501h0.246c11.322 0 20.501 9.178 20.501 20.501s-9.179 20.499-20.501 20.499h-0.246c-11.322 0-20.499-9.178-20.499-20.499z"></path>
|
|
10
|
-
</svg>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<!-- Generated by IcoMoon.io -->
|
|
2
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
|
|
3
|
-
<title></title>
|
|
4
|
-
<g id="icomoon-ignore">
|
|
5
|
-
</g>
|
|
6
|
-
<path d="M511.992 163.041c8.157 0 14.769 6.612 14.769 14.769v204.227c0 8.157-6.613 14.769-14.769 14.769s-14.769-6.613-14.769-14.769v-204.227c0-8.157 6.613-14.769 14.769-14.769z"></path>
|
|
7
|
-
<path d="M511.998 627.192c8.157 0 14.769 6.613 14.769 14.769v204.227c0 8.157-6.613 14.769-14.769 14.769s-14.769-6.613-14.769-14.769v-204.227c0-8.157 6.613-14.769 14.769-14.769z"></path>
|
|
8
|
-
<path d="M860.952 512c0 8.157-6.613 14.769-14.769 14.769h-204.227c-8.159 0-14.769-6.613-14.769-14.769s6.611-14.769 14.769-14.769h204.227c8.157 0 14.769 6.613 14.769 14.769z"></path>
|
|
9
|
-
<path d="M396.8 512c0 8.157-6.613 14.769-14.769 14.769h-204.227c-8.157 0-14.769-6.613-14.769-14.769s6.612-14.769 14.769-14.769h204.227c8.157 0 14.769 6.613 14.769 14.769z"></path>
|
|
10
|
-
<path d="M758.754 265.251c5.766 5.768 5.766 15.12 0 20.886l-144.412 144.412c-5.768 5.768-15.118 5.768-20.886 0s-5.768-15.12 0-20.888l144.41-144.41c5.768-5.768 15.12-5.768 20.888 0z"></path>
|
|
11
|
-
<path d="M430.545 593.455c5.768 5.768 5.768 15.12 0 20.888l-144.412 144.41c-5.766 5.768-15.118 5.768-20.886 0s-5.768-15.12 0-20.888l144.41-144.41c5.768-5.768 15.12-5.768 20.888 0z"></path>
|
|
12
|
-
<path d="M758.752 758.752c-5.768 5.768-15.12 5.768-20.888 0l-144.41-144.41c-5.768-5.768-5.768-15.12 0-20.888s15.12-5.768 20.888 0l144.41 144.41c5.768 5.768 5.768 15.12 0 20.888z"></path>
|
|
13
|
-
<path d="M430.543 430.549c-5.768 5.768-15.12 5.768-20.888 0l-144.41-144.412c-5.768-5.768-5.768-15.118 0-20.886s15.118-5.768 20.886 0l144.412 144.41c5.768 5.768 5.768 15.12 0 20.888z"></path>
|
|
14
|
-
</svg>
|