@stokr/components-library 3.1.0 → 3.2.0
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/analytics/index.js +1 -3
- package/dist/components/Checklist/ChecklistCard.js +1 -2
- package/dist/components/Checklist/ChecklistCard.styles.js +39 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +1 -3
- package/dist/components/FAQ/FAQ.js +1 -3
- package/dist/components/Form/Form.js +1 -3
- package/dist/components/RefreshButton/RefreshButton.js +3 -5
- package/dist/components/SectionTitle/SectionTitle.styles.js +1 -2
- package/dist/index.js +34 -71
- package/package.json +1 -3
- package/dist/api/fetchData.js +0 -27
- package/dist/api/fetchDataPublic.js +0 -19
- package/dist/components/Newsletter/Newsletter.js +0 -120
- package/dist/components/Newsletter/Newsletter.styles.js +0 -186
- package/dist/components/ToDoList/ToDoList.js +0 -167
- package/dist/components/ToDoList/ToDoList.styles.js +0 -122
- package/dist/components/ToDoList/ToDoListTask.js +0 -89
- package/dist/components/ToDoList/ToDoListTask.styles.js +0 -119
- package/dist/components/taxId/complete.js +0 -45
- package/dist/components/taxId/flow.js +0 -63
- package/dist/components/taxId/register-taxid.js +0 -189
- package/dist/context/Checkbox/CheckboxContext.js +0 -151
- package/dist/model/axios.js +0 -10
- package/dist/model/axiosPublic.js +0 -9
- package/dist/routing/RouterWrapper.js +0 -17
- package/dist/routing/navigate-app.js +0 -24
- package/dist/runtime-config.js +0 -35
- package/dist/utils/app-urls-analytics-backoffice.js +0 -30
- package/dist/utils/app-urls.js +0 -10
- package/dist/utils/check-todo-status.js +0 -10
- package/dist/utils/checklistGenerator.js +0 -196
- package/dist/utils/delete-redirect-cookie-and-navigate.js +0 -12
- package/dist/utils/get-cookie-domain.js +0 -21
- package/dist/utils/redirect-url.js +0 -5
- package/dist/utils/set-redirect-cookie.js +0 -16
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import styled, { css } from "styled-components";
|
|
2
|
-
import rwd, { rwdMax } from "../../styles/rwd.js";
|
|
3
|
-
import { RED_BASE_HEX, BASE_MARGIN, MAX_WIDTH, GRAY_BASE_HEX, WHITE_HEX } from "../../constants/style.js";
|
|
4
|
-
import stdin_default from "../Button/Button.styles.js";
|
|
5
|
-
const withMarginsCss = css`
|
|
6
|
-
padding-left: ${BASE_MARGIN * 2}px;
|
|
7
|
-
padding-right: ${BASE_MARGIN * 2}px;
|
|
8
|
-
|
|
9
|
-
${rwdMax.Medium`
|
|
10
|
-
padding: 0 ${BASE_MARGIN * 2}px;
|
|
11
|
-
`}
|
|
12
|
-
${rwdMax.Mobile`
|
|
13
|
-
padding: 0 ${BASE_MARGIN * 2}px;
|
|
14
|
-
`}
|
|
15
|
-
`;
|
|
16
|
-
const Container = styled.div.withConfig({
|
|
17
|
-
shouldForwardProp: (props) => !["compact", "isMobile", "noPaddingHorizontal"].includes(props)
|
|
18
|
-
})`
|
|
19
|
-
${({ compact }) => !compact && withMarginsCss};
|
|
20
|
-
padding: ${({ isMobile }) => isMobile && "52px 32px 56px !important"};
|
|
21
|
-
padding: ${({ noPaddingHorizontal }) => noPaddingHorizontal && "52px 0px 56px !important"};
|
|
22
|
-
`;
|
|
23
|
-
const LayoutWrapper = styled.div.withConfig({
|
|
24
|
-
shouldForwardProp: (props) => !["notFullHeight", "minimal", "noBorder"].includes(props)
|
|
25
|
-
})`
|
|
26
|
-
display: flex;
|
|
27
|
-
min-height: ${({ notFullHeight }) => notFullHeight ? "unset" : "100vh"};
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
position: relative;
|
|
30
|
-
max-width: ${MAX_WIDTH}px;
|
|
31
|
-
margin-left: auto;
|
|
32
|
-
margin-right: auto;
|
|
33
|
-
width: 100%;
|
|
34
|
-
|
|
35
|
-
${rwd.Large`
|
|
36
|
-
border-right: 1px solid ${GRAY_BASE_HEX};
|
|
37
|
-
border-left: 1px solid ${GRAY_BASE_HEX};
|
|
38
|
-
`}
|
|
39
|
-
|
|
40
|
-
${({ minimal }) => minimal && css`
|
|
41
|
-
min-height: 0;
|
|
42
|
-
`}
|
|
43
|
-
${({ noBorder }) => noBorder && css`
|
|
44
|
-
border: none !important;
|
|
45
|
-
`}
|
|
46
|
-
`;
|
|
47
|
-
const Subscribe = styled.div`
|
|
48
|
-
padding: 72px 65px 68px;
|
|
49
|
-
background-color: ${RED_BASE_HEX};
|
|
50
|
-
|
|
51
|
-
${rwdMax.MLarge`
|
|
52
|
-
padding: 68px ${BASE_MARGIN * 2}px;
|
|
53
|
-
`}
|
|
54
|
-
`;
|
|
55
|
-
const SubscribeTitle = styled.h3`
|
|
56
|
-
color: white;
|
|
57
|
-
font-family: 'Open Sans', 'Helvetica', 'Helvetica Neue', sans-serif;
|
|
58
|
-
font-size: 22px;
|
|
59
|
-
font-weight: 800;
|
|
60
|
-
font-style: normal;
|
|
61
|
-
font-stretch: normal;
|
|
62
|
-
line-height: 1.27;
|
|
63
|
-
letter-spacing: 0.8px;
|
|
64
|
-
margin: 0 0 60px;
|
|
65
|
-
`;
|
|
66
|
-
const SubscribeInputBox = styled.div`
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
flex: 1 0 auto;
|
|
70
|
-
position: relative;
|
|
71
|
-
`;
|
|
72
|
-
const SubscribeInput = styled.input`
|
|
73
|
-
text-transform: initial;
|
|
74
|
-
letter-spacing: 2.1px;
|
|
75
|
-
font-size: 11px;
|
|
76
|
-
white-space: nowrap;
|
|
77
|
-
line-height: 2.18;
|
|
78
|
-
color: white;
|
|
79
|
-
font-weight: 400;
|
|
80
|
-
flex: 1 0 auto;
|
|
81
|
-
margin-right: 56px;
|
|
82
|
-
padding: 8px 0;
|
|
83
|
-
background: transparent;
|
|
84
|
-
border: none;
|
|
85
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
86
|
-
outline: none;
|
|
87
|
-
|
|
88
|
-
/* Override browser autofill styles */
|
|
89
|
-
&:-webkit-autofill,
|
|
90
|
-
&:-webkit-autofill:hover,
|
|
91
|
-
&:-webkit-autofill:focus,
|
|
92
|
-
&:-webkit-autofill:active {
|
|
93
|
-
-webkit-text-fill-color: white !important;
|
|
94
|
-
-webkit-box-shadow: 0 0 0 30px ${RED_BASE_HEX} inset !important;
|
|
95
|
-
transition: background-color 5000s ease-in-out 0s;
|
|
96
|
-
caret-color: white !important;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
${rwdMax.MLarge`
|
|
100
|
-
margin-right: 0;
|
|
101
|
-
display: block;
|
|
102
|
-
width: 100%;
|
|
103
|
-
margin-bottom: 36px;
|
|
104
|
-
`}
|
|
105
|
-
|
|
106
|
-
&::-webkit-input-placeholder {
|
|
107
|
-
color: white;
|
|
108
|
-
text-transform: uppercase;
|
|
109
|
-
}
|
|
110
|
-
&::-moz-placeholder {
|
|
111
|
-
color: white;
|
|
112
|
-
text-transform: uppercase;
|
|
113
|
-
}
|
|
114
|
-
&::placeholder {
|
|
115
|
-
color: white;
|
|
116
|
-
text-transform: uppercase;
|
|
117
|
-
}
|
|
118
|
-
`;
|
|
119
|
-
const SubscribeInputError = styled.p`
|
|
120
|
-
color: white;
|
|
121
|
-
font-size: 9px;
|
|
122
|
-
font-weight: 400;
|
|
123
|
-
letter-spacing: 1.8px;
|
|
124
|
-
margin: 9px 0;
|
|
125
|
-
position: absolute;
|
|
126
|
-
text-transform: uppercase;
|
|
127
|
-
top: 39px;
|
|
128
|
-
`;
|
|
129
|
-
const SubscribeSubmit = styled(stdin_default).withConfig({
|
|
130
|
-
shouldForwardProp: (props) => !["submitSuccess"].includes(props)
|
|
131
|
-
})`
|
|
132
|
-
padding-left: 40px;
|
|
133
|
-
padding-right: 40px;
|
|
134
|
-
background: ${RED_BASE_HEX};
|
|
135
|
-
font-size: 11px;
|
|
136
|
-
display: flex;
|
|
137
|
-
justify-content: center;
|
|
138
|
-
width: 136px; /* Fixed value so both states keep same width */
|
|
139
|
-
|
|
140
|
-
${rwdMax.MLarge`
|
|
141
|
-
margin: 0 auto 0;
|
|
142
|
-
display: block;
|
|
143
|
-
padding-left: 48px;
|
|
144
|
-
padding-right: 48px;
|
|
145
|
-
width: unset;
|
|
146
|
-
`}
|
|
147
|
-
|
|
148
|
-
&&&& {
|
|
149
|
-
border-color: white;
|
|
150
|
-
color: white;
|
|
151
|
-
|
|
152
|
-
&:hover {
|
|
153
|
-
background: ${WHITE_HEX};
|
|
154
|
-
color: ${RED_BASE_HEX};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&:active,
|
|
158
|
-
&:focus {
|
|
159
|
-
background: ${RED_BASE_HEX};
|
|
160
|
-
color: ${WHITE_HEX};
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
${({ submitSuccess }) => submitSuccess && `
|
|
165
|
-
background: ${WHITE_HEX} !important;
|
|
166
|
-
color: ${RED_BASE_HEX} !important;
|
|
167
|
-
pointer-events: none;
|
|
168
|
-
`}
|
|
169
|
-
`;
|
|
170
|
-
const SubscribeForm = styled.form`
|
|
171
|
-
display: flex;
|
|
172
|
-
|
|
173
|
-
${rwdMax.MLarge` display: block;
|
|
174
|
-
`}
|
|
175
|
-
`;
|
|
176
|
-
export {
|
|
177
|
-
Container,
|
|
178
|
-
LayoutWrapper,
|
|
179
|
-
Subscribe,
|
|
180
|
-
SubscribeForm,
|
|
181
|
-
SubscribeInput,
|
|
182
|
-
SubscribeInputBox,
|
|
183
|
-
SubscribeInputError,
|
|
184
|
-
SubscribeSubmit,
|
|
185
|
-
SubscribeTitle
|
|
186
|
-
};
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { iconsMap, TooltipIcon } from "../Icon/Icon.style.js";
|
|
5
|
-
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
6
|
-
import { Container, TitleContainer, PendingCounter, Title, Subtitle } from "./ToDoList.styles.js";
|
|
7
|
-
import stdin_default from "./ToDoListTask.js";
|
|
8
|
-
import { Icon } from "./ToDoListTask.styles.js";
|
|
9
|
-
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
10
|
-
const ToDoTaskState = {
|
|
11
|
-
REJECTED: "rejected",
|
|
12
|
-
DENIED: "rejected",
|
|
13
|
-
DRAFT: "draft",
|
|
14
|
-
IN_PROGRESS: "in_progress",
|
|
15
|
-
APPROVED: "approved",
|
|
16
|
-
SKIPPED: "skipped",
|
|
17
|
-
REAPPLY: "reapply",
|
|
18
|
-
NOT_AVAILABLE: "not_available"
|
|
19
|
-
};
|
|
20
|
-
const ToDoTaskMessage = {
|
|
21
|
-
[ToDoTaskState.REJECTED]: "Rejected. Please re-apply.",
|
|
22
|
-
[ToDoTaskState.DENIED]: "Rejected. Please re-apply.",
|
|
23
|
-
[ToDoTaskState.DRAFT]: "Draft",
|
|
24
|
-
[ToDoTaskState.IN_PROGRESS]: "In progress",
|
|
25
|
-
[ToDoTaskState.APPROVED]: "Verified",
|
|
26
|
-
[ToDoTaskState.SKIPPED]: "Skipped"
|
|
27
|
-
};
|
|
28
|
-
const ToDoModal = {
|
|
29
|
-
TAX_ID: "taxid"
|
|
30
|
-
};
|
|
31
|
-
const ToDoTaskIcons = {
|
|
32
|
-
[ToDoTaskState.REJECTED]: iconsMap.warning,
|
|
33
|
-
[ToDoTaskState.DENIED]: iconsMap.warning,
|
|
34
|
-
[ToDoTaskState.DRAFT]: iconsMap.edit,
|
|
35
|
-
[ToDoTaskState.IN_PROGRESS]: iconsMap.inProgress,
|
|
36
|
-
[ToDoTaskState.APPROVED]: iconsMap.check,
|
|
37
|
-
[ToDoTaskState.SKIPPED]: iconsMap.arrowRight,
|
|
38
|
-
[ToDoTaskState.NOT_AVAILABLE]: iconsMap.arrowRight
|
|
39
|
-
};
|
|
40
|
-
const ToDoList = ({
|
|
41
|
-
mandatoryTasks = [],
|
|
42
|
-
walletsTasks = [],
|
|
43
|
-
optionalTasks = [],
|
|
44
|
-
mandatoryTasksCount,
|
|
45
|
-
walletsTasksCount,
|
|
46
|
-
pendingTasksCount,
|
|
47
|
-
additionalTasks,
|
|
48
|
-
redirectCookie,
|
|
49
|
-
...props
|
|
50
|
-
}) => {
|
|
51
|
-
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
52
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsxs(TitleContainer, { children: [
|
|
53
|
-
pendingTasksCount !== 0 ? /* @__PURE__ */ jsx(PendingCounter, { children: pendingTasksCount }) : /* @__PURE__ */ jsx(
|
|
54
|
-
Icon,
|
|
55
|
-
{
|
|
56
|
-
state: "approved",
|
|
57
|
-
checklist: true
|
|
58
|
-
}
|
|
59
|
-
),
|
|
60
|
-
/* @__PURE__ */ jsx(Title, { children: "Checklist" })
|
|
61
|
-
] }) }),
|
|
62
|
-
mandatoryTasks.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsxs(TitleContainer, { marginBottom: "10px", children: [
|
|
64
|
-
mandatoryTasksCount !== 0 ? /* @__PURE__ */ jsx(PendingCounter, { children: mandatoryTasksCount }) : /* @__PURE__ */ jsx(
|
|
65
|
-
Icon,
|
|
66
|
-
{
|
|
67
|
-
state: "approved",
|
|
68
|
-
checklist: true
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
/* @__PURE__ */ jsx(Subtitle, { children: "Mandatory" })
|
|
72
|
-
] }) }),
|
|
73
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingHorizontal: true, children: mandatoryTasks.map((task) => /* @__PURE__ */ jsx(
|
|
74
|
-
stdin_default,
|
|
75
|
-
{
|
|
76
|
-
title: task.title,
|
|
77
|
-
message: task.message || ToDoTaskMessage[task.state],
|
|
78
|
-
state: task.state,
|
|
79
|
-
icon: ToDoTaskIcons[task.state],
|
|
80
|
-
link: task.link,
|
|
81
|
-
tooltip: task.tooltip,
|
|
82
|
-
redirectCookie,
|
|
83
|
-
...props
|
|
84
|
-
},
|
|
85
|
-
task.title
|
|
86
|
-
)) })
|
|
87
|
-
] }),
|
|
88
|
-
walletsTasks.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
89
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsxs(TitleContainer, { marginBottom: "10px", children: [
|
|
90
|
-
walletsTasksCount !== 0 ? /* @__PURE__ */ jsx(PendingCounter, { children: walletsTasksCount }) : /* @__PURE__ */ jsx(
|
|
91
|
-
Icon,
|
|
92
|
-
{
|
|
93
|
-
state: "approved",
|
|
94
|
-
checklist: true
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
/* @__PURE__ */ jsx(Subtitle, { children: "Register Wallets" }),
|
|
98
|
-
/* @__PURE__ */ jsx(
|
|
99
|
-
Tooltip,
|
|
100
|
-
{
|
|
101
|
-
placement: "right",
|
|
102
|
-
content: "Before you invest you must have registered the wallet that can hold your purchased securities. Click below and register it to proceed with your investment.",
|
|
103
|
-
children: /* @__PURE__ */ jsx(TooltipIcon, { onClick: (e) => e.preventDefault(), style: { fontSize: 16 } })
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
] }) }),
|
|
107
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingHorizontal: true, children: walletsTasks.map((task) => /* @__PURE__ */ jsx(
|
|
108
|
-
stdin_default,
|
|
109
|
-
{
|
|
110
|
-
title: task.title,
|
|
111
|
-
message: task.message || ToDoTaskMessage[task.state],
|
|
112
|
-
state: task.state,
|
|
113
|
-
icon: ToDoTaskIcons[task.state],
|
|
114
|
-
link: task.link,
|
|
115
|
-
disabled: task.disabled,
|
|
116
|
-
tooltip: task.tooltip,
|
|
117
|
-
openModal: task.openModal,
|
|
118
|
-
redirectCookie,
|
|
119
|
-
...props
|
|
120
|
-
},
|
|
121
|
-
task.title
|
|
122
|
-
)) })
|
|
123
|
-
] }),
|
|
124
|
-
optionalTasks.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
125
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(TitleContainer, { marginBottom: "10px", children: /* @__PURE__ */ jsx(Subtitle, { marginLeft: "32px", children: "Optional" }) }) }),
|
|
126
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingHorizontal: true, children: optionalTasks.map((task) => /* @__PURE__ */ jsx(
|
|
127
|
-
stdin_default,
|
|
128
|
-
{
|
|
129
|
-
title: task.title,
|
|
130
|
-
message: task.message || ToDoTaskMessage[task.state],
|
|
131
|
-
state: task.state,
|
|
132
|
-
icon: ToDoTaskIcons[task.state],
|
|
133
|
-
link: task.link,
|
|
134
|
-
tooltip: task.tooltip,
|
|
135
|
-
redirectCookie,
|
|
136
|
-
openModal: task.openModal,
|
|
137
|
-
...props
|
|
138
|
-
},
|
|
139
|
-
task.title
|
|
140
|
-
)) })
|
|
141
|
-
] }),
|
|
142
|
-
additionalTasks && additionalTasks
|
|
143
|
-
] });
|
|
144
|
-
};
|
|
145
|
-
const taskListPropType = PropTypes.arrayOf(
|
|
146
|
-
PropTypes.shape({
|
|
147
|
-
title: PropTypes.string.isRequired,
|
|
148
|
-
// message: PropTypes.string.isRequired,
|
|
149
|
-
state: PropTypes.oneOf([...Object.values(ToDoTaskState)]).isRequired,
|
|
150
|
-
link: PropTypes.any,
|
|
151
|
-
tooltip: PropTypes.string
|
|
152
|
-
})
|
|
153
|
-
);
|
|
154
|
-
ToDoList.propTypes = {
|
|
155
|
-
mandatoryTasks: taskListPropType,
|
|
156
|
-
optionalTasks: taskListPropType,
|
|
157
|
-
successText: PropTypes.string,
|
|
158
|
-
additionalTasks: PropTypes.node,
|
|
159
|
-
mandatoryTasksCount: PropTypes.number,
|
|
160
|
-
walletsTasksCount: PropTypes.number
|
|
161
|
-
};
|
|
162
|
-
export {
|
|
163
|
-
ToDoList,
|
|
164
|
-
ToDoModal,
|
|
165
|
-
ToDoTaskMessage,
|
|
166
|
-
ToDoTaskState
|
|
167
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import styled, { css } from "styled-components";
|
|
2
|
-
import rwd from "../../styles/rwd.js";
|
|
3
|
-
import { colors } from "../../styles/colors.js";
|
|
4
|
-
const Container = styled.div`
|
|
5
|
-
display: inline-block;
|
|
6
|
-
`;
|
|
7
|
-
const TitleContainer = styled.div.withConfig({
|
|
8
|
-
shouldForwardProp: (props) => !["marginBottom"].includes(props)
|
|
9
|
-
})`
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
|
|
13
|
-
${({ marginBottom }) => marginBottom && css`
|
|
14
|
-
margin-bottom: ${marginBottom};
|
|
15
|
-
`}
|
|
16
|
-
`;
|
|
17
|
-
const Title = styled.div`
|
|
18
|
-
font-size: 22px;
|
|
19
|
-
font-weight: 800;
|
|
20
|
-
line-height: 28px;
|
|
21
|
-
letter-spacing: 0.8px;
|
|
22
|
-
text-transform: uppercase;
|
|
23
|
-
`;
|
|
24
|
-
const Subtitle = styled.div.withConfig({
|
|
25
|
-
shouldForwardProp: (props) => !["centerVertically", "marginLeft"].includes(props)
|
|
26
|
-
})`
|
|
27
|
-
font-size: 11px;
|
|
28
|
-
line-height: 24px;
|
|
29
|
-
letter-spacing: 2.06px;
|
|
30
|
-
text-transform: uppercase;
|
|
31
|
-
// margin-bottom: 10px;
|
|
32
|
-
|
|
33
|
-
${({ centerVertically }) => centerVertically && css`
|
|
34
|
-
margin-bottom: 0;
|
|
35
|
-
`}
|
|
36
|
-
|
|
37
|
-
${({ marginLeft }) => marginLeft && css`
|
|
38
|
-
margin-left: ${marginLeft};
|
|
39
|
-
`}
|
|
40
|
-
`;
|
|
41
|
-
const PendingCounter = styled.span`
|
|
42
|
-
width: 16px;
|
|
43
|
-
height: 16px;
|
|
44
|
-
margin-left: 3px;
|
|
45
|
-
margin-right: 13px;
|
|
46
|
-
color: ${colors.white};
|
|
47
|
-
background: ${colors.orangishRed};
|
|
48
|
-
border-radius: 50%;
|
|
49
|
-
font-size: 9px;
|
|
50
|
-
font-weight: 600;
|
|
51
|
-
text-align: center;
|
|
52
|
-
line-height: 16px;
|
|
53
|
-
padding-left: 1px;
|
|
54
|
-
`;
|
|
55
|
-
styled.div`
|
|
56
|
-
padding: 28px 0;
|
|
57
|
-
`;
|
|
58
|
-
styled.div`
|
|
59
|
-
font-size: 11px;
|
|
60
|
-
font-weight: bold;
|
|
61
|
-
line-height: 20px;
|
|
62
|
-
letter-spacing: 1.8px;
|
|
63
|
-
text-transform: uppercase;
|
|
64
|
-
padding-bottom: 14px;
|
|
65
|
-
margin-bottom: 16px;
|
|
66
|
-
text-align: left;
|
|
67
|
-
border-bottom: 1px solid ${colors.lightGrey};
|
|
68
|
-
`;
|
|
69
|
-
styled.div`
|
|
70
|
-
${rwd.Medium`
|
|
71
|
-
margin-top: auto;
|
|
72
|
-
`}
|
|
73
|
-
`;
|
|
74
|
-
styled.div`
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
align-items: center;
|
|
78
|
-
|
|
79
|
-
${rwd.Medium`
|
|
80
|
-
flex-direction: row;
|
|
81
|
-
`}
|
|
82
|
-
`;
|
|
83
|
-
styled.div`
|
|
84
|
-
width: 102px;
|
|
85
|
-
height: 102px;
|
|
86
|
-
display: flex;
|
|
87
|
-
border: 1px dashed ${colors.blue};
|
|
88
|
-
border-radius: 50%;
|
|
89
|
-
flex-shrink: 0;
|
|
90
|
-
margin-bottom: 16px;
|
|
91
|
-
|
|
92
|
-
${rwd.Medium`
|
|
93
|
-
margin-right: 26px;
|
|
94
|
-
margin-bottom: 0;
|
|
95
|
-
`}
|
|
96
|
-
`;
|
|
97
|
-
styled.i.withConfig({
|
|
98
|
-
shouldForwardProp: (props) => !["green"].includes(props)
|
|
99
|
-
}).attrs({
|
|
100
|
-
className: "ion ion-md-checkmark"
|
|
101
|
-
})`
|
|
102
|
-
width: 40px;
|
|
103
|
-
height: 40px;
|
|
104
|
-
display: flex;
|
|
105
|
-
align-items: center;
|
|
106
|
-
justify-content: center;
|
|
107
|
-
background: ${colors.blue};
|
|
108
|
-
color: ${colors.white};
|
|
109
|
-
font-size: 18px;
|
|
110
|
-
padding: 12px;
|
|
111
|
-
border-radius: 50%;
|
|
112
|
-
margin: auto;
|
|
113
|
-
${(props) => props.green && `
|
|
114
|
-
background-color: ${colors.freshGreen};`}
|
|
115
|
-
`;
|
|
116
|
-
export {
|
|
117
|
-
Container,
|
|
118
|
-
PendingCounter,
|
|
119
|
-
Subtitle,
|
|
120
|
-
Title,
|
|
121
|
-
TitleContainer
|
|
122
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import React__default from "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
5
|
-
import { Container, IconContainer, Icon, Content, TitleContainer, Title, State } from "./ToDoListTask.styles.js";
|
|
6
|
-
import { TooltipIcon } from "../Icon/Icon.style.js";
|
|
7
|
-
import setRedirectCookie from "../../utils/set-redirect-cookie.js";
|
|
8
|
-
import { ToDoModal } from "./ToDoList.js";
|
|
9
|
-
import stdin_default$1 from "../taxId/flow.js";
|
|
10
|
-
const ToDoTask = ({
|
|
11
|
-
title,
|
|
12
|
-
message,
|
|
13
|
-
state,
|
|
14
|
-
icon,
|
|
15
|
-
link = void 0,
|
|
16
|
-
tooltip = "",
|
|
17
|
-
// notificationCount,
|
|
18
|
-
disabled,
|
|
19
|
-
openModal,
|
|
20
|
-
redirectCookie = false,
|
|
21
|
-
onTaxIdComplete,
|
|
22
|
-
/** @deprecated Passed through to RegisterTaxIdFlow's tax-id form when openModal is TAX_ID. */
|
|
23
|
-
user,
|
|
24
|
-
/** @deprecated Passed through to RegisterTaxIdFlow's tax-id form when openModal is TAX_ID. */
|
|
25
|
-
updateUser
|
|
26
|
-
}) => {
|
|
27
|
-
const [modalOpen, setmodalOpen] = React__default.useState(false);
|
|
28
|
-
const handleOpenModal = () => {
|
|
29
|
-
if (openModal) {
|
|
30
|
-
setmodalOpen(true);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34
|
-
link || openModal ? /* @__PURE__ */ jsx(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
onClick: () => {
|
|
38
|
-
if (redirectCookie) {
|
|
39
|
-
const pathToRedirect = window.location.pathname === "/" ? "checklist" : "";
|
|
40
|
-
setRedirectCookie(pathToRedirect);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
children: /* @__PURE__ */ jsx("a", { href: link, children: /* @__PURE__ */ jsxs(Container, { disabled, link: openModal, onClick: handleOpenModal, children: [
|
|
44
|
-
/* @__PURE__ */ jsx(IconContainer, { children: /* @__PURE__ */ jsx(Icon, { icon, state }) }),
|
|
45
|
-
/* @__PURE__ */ jsxs(Content, { children: [
|
|
46
|
-
/* @__PURE__ */ jsxs(TitleContainer, { children: [
|
|
47
|
-
/* @__PURE__ */ jsx(Title, { link: link || openModal, state, children: title }),
|
|
48
|
-
tooltip && /* @__PURE__ */ jsx(Tooltip, { placement: "right", content: tooltip, children: /* @__PURE__ */ jsx(TooltipIcon, { onClick: (e) => e.preventDefault() }) })
|
|
49
|
-
] }),
|
|
50
|
-
message ? /* @__PURE__ */ jsx(State, { children: message }) : ""
|
|
51
|
-
] })
|
|
52
|
-
] }) })
|
|
53
|
-
}
|
|
54
|
-
) : /* @__PURE__ */ jsxs(Container, { disabled, children: [
|
|
55
|
-
/* @__PURE__ */ jsx(IconContainer, { children: /* @__PURE__ */ jsx(Icon, { icon, state }) }),
|
|
56
|
-
/* @__PURE__ */ jsxs(Content, { children: [
|
|
57
|
-
/* @__PURE__ */ jsxs(TitleContainer, { children: [
|
|
58
|
-
/* @__PURE__ */ jsx(Title, { state, children: title }),
|
|
59
|
-
tooltip && /* @__PURE__ */ jsx(Tooltip, { placement: "right", content: tooltip, children: /* @__PURE__ */ jsx(TooltipIcon, { onClick: (e) => e.preventDefault() }) })
|
|
60
|
-
] }),
|
|
61
|
-
message ? /* @__PURE__ */ jsx(State, { children: message }) : ""
|
|
62
|
-
] })
|
|
63
|
-
] }),
|
|
64
|
-
modalOpen && openModal === ToDoModal.TAX_ID && /* @__PURE__ */ jsx(
|
|
65
|
-
stdin_default$1,
|
|
66
|
-
{
|
|
67
|
-
showFlow: modalOpen,
|
|
68
|
-
setShowFlow: setmodalOpen,
|
|
69
|
-
onComplete: onTaxIdComplete,
|
|
70
|
-
user,
|
|
71
|
-
updateUser
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
] });
|
|
75
|
-
};
|
|
76
|
-
ToDoTask.propTypes = {
|
|
77
|
-
title: PropTypes.string.isRequired,
|
|
78
|
-
message: PropTypes.string.isRequired,
|
|
79
|
-
state: PropTypes.string.isRequired,
|
|
80
|
-
icon: PropTypes.string.isRequired,
|
|
81
|
-
link: PropTypes.any,
|
|
82
|
-
tooltip: PropTypes.string
|
|
83
|
-
// notificationCount: PropTypes.string,
|
|
84
|
-
};
|
|
85
|
-
var stdin_default = ToDoTask;
|
|
86
|
-
export {
|
|
87
|
-
ToDoTask,
|
|
88
|
-
stdin_default as default
|
|
89
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { Icon as Icon$1 } from "../Icon/Icon.style.js";
|
|
3
|
-
import { ToDoTaskState } from "./ToDoList.js";
|
|
4
|
-
import { colors } from "../../styles/colors.js";
|
|
5
|
-
const Container = styled.div.withConfig({
|
|
6
|
-
shouldForwardProp: (props) => !["disabled", "link"].includes(props)
|
|
7
|
-
})`
|
|
8
|
-
display: flex;
|
|
9
|
-
height: 56px;
|
|
10
|
-
align-items: center;
|
|
11
|
-
|
|
12
|
-
${(props) => props.disabled && `
|
|
13
|
-
opacity:0.5;
|
|
14
|
-
cursor: context-menu;
|
|
15
|
-
`}
|
|
16
|
-
${(props) => props.link && `
|
|
17
|
-
cursor:pointer;
|
|
18
|
-
`}
|
|
19
|
-
`;
|
|
20
|
-
const Content = styled.div`
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
`;
|
|
24
|
-
const TitleContainer = styled.div`
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
`;
|
|
28
|
-
const Title = styled.div.withConfig({
|
|
29
|
-
shouldForwardProp: (props) => !["state", "link"].includes(props)
|
|
30
|
-
})`
|
|
31
|
-
font-size: 16px;
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
line-height: 24px;
|
|
34
|
-
letter-spacing: 0.6px;
|
|
35
|
-
text-align: left;
|
|
36
|
-
|
|
37
|
-
${(props) => (props.state === ToDoTaskState.IN_PROGRESS || props.state === ToDoTaskState.APPROVED || props.state === ToDoTaskState.NOT_AVAILABLE) && `
|
|
38
|
-
opacity: 0.3;
|
|
39
|
-
`}
|
|
40
|
-
|
|
41
|
-
${(props) => props.link && `
|
|
42
|
-
opacity: 1;
|
|
43
|
-
`}
|
|
44
|
-
`;
|
|
45
|
-
styled.div`
|
|
46
|
-
position: relative;
|
|
47
|
-
right: -5px;
|
|
48
|
-
width: 16px;
|
|
49
|
-
height: 16px;
|
|
50
|
-
color: #ffffff;
|
|
51
|
-
font-size: 11px;
|
|
52
|
-
font-weight: 700;
|
|
53
|
-
line-height: 16px;
|
|
54
|
-
text-align: center;
|
|
55
|
-
background-color: #ee220d;
|
|
56
|
-
border-radius: 50%;
|
|
57
|
-
padding-left: 0;
|
|
58
|
-
`;
|
|
59
|
-
const State = styled.p`
|
|
60
|
-
margin-top: 3px;
|
|
61
|
-
font-size: 11px;
|
|
62
|
-
line-height: 16px;
|
|
63
|
-
letter-spacing: 0.4px;
|
|
64
|
-
font-weight: 300;
|
|
65
|
-
text-align: left;
|
|
66
|
-
opacity: 0.6;
|
|
67
|
-
`;
|
|
68
|
-
const IconContainer = styled.div`
|
|
69
|
-
flex-shrink: 0;
|
|
70
|
-
width: 23px;
|
|
71
|
-
text-align: center;
|
|
72
|
-
/* margin: auto 0 auto auto; */
|
|
73
|
-
|
|
74
|
-
margin-right: 10px;
|
|
75
|
-
position: relative;
|
|
76
|
-
top: -10px;
|
|
77
|
-
`;
|
|
78
|
-
styled.div`
|
|
79
|
-
max-width: 240px;
|
|
80
|
-
text-align: left;
|
|
81
|
-
`;
|
|
82
|
-
const Icon = styled(Icon$1).withConfig({
|
|
83
|
-
shouldForwardProp: (props) => !["state"].includes(props)
|
|
84
|
-
})`
|
|
85
|
-
font-size: 20px;
|
|
86
|
-
width: 18px;
|
|
87
|
-
text-align: center;
|
|
88
|
-
|
|
89
|
-
${(props) => props.state === ToDoTaskState.APPROVED && `
|
|
90
|
-
font-size: 13px;
|
|
91
|
-
color: ${colors.freshGreen};
|
|
92
|
-
`}
|
|
93
|
-
|
|
94
|
-
${(props) => props.state === ToDoTaskState.REJECTED && `
|
|
95
|
-
color: ${colors.orangishRed};
|
|
96
|
-
`}
|
|
97
|
-
|
|
98
|
-
${(props) => props.state === ToDoTaskState.IN_PROGRESS && `
|
|
99
|
-
opacity: 0.3;
|
|
100
|
-
`}
|
|
101
|
-
|
|
102
|
-
${(props) => props.state === ToDoTaskState.SKIPPED && `
|
|
103
|
-
font-size: 13px;
|
|
104
|
-
`}
|
|
105
|
-
|
|
106
|
-
${(props) => props.state === ToDoTaskState.NOT_AVAILABLE && `
|
|
107
|
-
font-size: 13px;
|
|
108
|
-
opacity: 0.3;
|
|
109
|
-
`}
|
|
110
|
-
`;
|
|
111
|
-
export {
|
|
112
|
-
Container,
|
|
113
|
-
Content,
|
|
114
|
-
Icon,
|
|
115
|
-
IconContainer,
|
|
116
|
-
State,
|
|
117
|
-
Title,
|
|
118
|
-
TitleContainer
|
|
119
|
-
};
|