tg-core-components 6.3.11-9 → 6.3.11
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/es/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +383 -0
- package/es/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +193 -0
- package/es/widgets/ResponsibleGamingAccordion/PeriodItemHeader/index.js +33 -0
- package/es/widgets/ResponsibleGamingAccordion/index.js +644 -0
- package/es/widgets/ResponsibleGamingAccordionSignUp/AmountItemContent/index.js +116 -0
- package/es/widgets/ResponsibleGamingAccordionSignUp/AmountItemHeader/index.js +43 -0
- package/es/widgets/ResponsibleGamingAccordionSignUp/LimitStatus/index.js +44 -0
- package/es/widgets/ResponsibleGamingAccordionSignUp/index.js +222 -0
- package/es/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +99 -0
- package/es/widgets/ResponsibleGamingSingleSignUp/LimitStatus/index.js +28 -0
- package/es/widgets/ResponsibleGamingSingleSignUp/index.js +260 -0
- package/es/widgets/ResponsibleGamingWidget/Timespan.js +387 -0
- package/es/widgets/ResponsibleGamingWidget/helpers.js +39 -0
- package/es/widgets/ResponsibleGamingWidget/index.js +324 -0
- package/es/widgets/ResponsibleGamingWidget/messages.js +342 -0
- package/es/widgets/ResponsibleGamingWidget/normalize.js +242 -0
- package/es/widgets/ResponsibleGamingWidget/validate.js +75 -0
- package/es/widgets/Settings/index.js +54 -0
- package/es/widgets/SignIn/SignInForm.js +80 -0
- package/es/widgets/SignIn/index.js +80 -0
- package/es/widgets/SignUp/ActivationStep.js +166 -0
- package/es/widgets/SignUp/ConfirmContactInfoStep.js +250 -0
- package/es/widgets/SignUp/ContactInfoStep.js +368 -0
- package/es/widgets/SignUp/SetLimitsStep.js +255 -0
- package/es/widgets/SignUp/UserInfoStep.js +258 -0
- package/es/widgets/SignUp/index.js +324 -0
- package/es/widgets/SportsbookHistoryTable/index.js +300 -0
- package/es/widgets/SportsbookSettings/index.js +56 -0
- package/es/widgets/Subscriptions/index.js +193 -0
- package/es/widgets/TableWidget/Tables/bonusCode.js +92 -0
- package/es/widgets/TableWidget/Tables/bonusTable.js +249 -0
- package/es/widgets/TableWidget/Tables/index.js +71 -0
- package/es/widgets/TableWidget/index.js +125 -0
- package/es/widgets/Verify/Address.js +28 -0
- package/es/widgets/Verify/Passport.js +28 -0
- package/es/widgets/Verify/Payment.js +28 -0
- package/es/widgets/Verify/index.js +154 -0
- package/es/widgets/Verify/reasons.js +92 -0
- package/es/widgets/Verify/status.js +16 -0
- package/es/widgets/Verify/types.js +25 -0
- package/es/widgets/VerifyAccordionWidget/index.js +177 -0
- package/lib/components/AcceptUpdatedTaC/index.js +89 -0
- package/lib/components/Alert/index.js +145 -0
- package/lib/components/AutocompleteInput/index.js +118 -0
- package/lib/components/Button/index.js +86 -0
- package/lib/components/ButtonLoader.js +78 -0
- package/lib/components/Checklist/index.js +73 -0
- package/lib/components/Deposit/BonusCodeInput/index.js +110 -0
- package/lib/components/Deposit/CardInput/index.js +249 -0
- package/lib/components/Deposit/DelayVisibility/index.js +63 -0
- package/lib/components/Deposit/InputAdapter/index.js +54 -0
- package/lib/components/Deposit/Select/index.js +183 -0
- package/lib/components/Deposit/Single/index.js +126 -0
- package/lib/components/Deposit/TextInput/index.js +194 -0
- package/lib/components/Icon/index.js +34 -0
- package/lib/components/Image/index.js +172 -0
- package/lib/components/Input/BirthdateInput.js +195 -0
- package/lib/components/Input/Checkbox.js +65 -0
- package/lib/components/Input/Input.js +87 -0
- package/lib/components/Input/PasswordInput.js +101 -0
- package/lib/components/Input/PhoneNumberInput.js +136 -0
- package/lib/components/Input/index.js +50 -0
- package/lib/components/Input/input.test.js +89 -0
- package/lib/components/Input/old-input.test.js +107 -0
- package/lib/components/InternalMessagesInbox.js +315 -0
- package/lib/components/List/ListItem.js +64 -0
- package/lib/components/List/index.js +98 -0
- package/lib/components/Loader/index.js +51 -0
- package/lib/components/Money/index.js +74 -0
- package/lib/components/Notification.js +189 -0
- package/lib/components/Picture/index.js +88 -0
- package/lib/components/Radio/index.js +103 -0
- package/lib/components/Select/index.js +83 -0
- package/lib/components/Single/index.js +142 -0
- package/lib/components/Skeleton/index.js +31 -0
- package/lib/components/Textarea/index.js +184 -0
- package/lib/components/Translate/index.js +39 -0
- package/lib/components/Uploader/index.js +157 -0
- package/lib/components/common.js +363 -0
- package/lib/index.js +270 -0
- package/lib/lib/WithFetch.js +65 -0
- package/lib/lib/WithMultipleStep.js +61 -0
- package/lib/lib/WithValidation/index.js +132 -0
- package/lib/lib/WithValidation/rules/blacklistedCharacters.js +9 -0
- package/lib/lib/WithValidation/rules/date.js +22 -0
- package/lib/lib/WithValidation/rules/email.js +9 -0
- package/lib/lib/WithValidation/rules/hasMin.js +11 -0
- package/lib/lib/WithValidation/rules/hasMinLength.js +17 -0
- package/lib/lib/WithValidation/rules/match.js +12 -0
- package/lib/lib/WithValidation/rules/noSpecialCharacters.js +9 -0
- package/lib/lib/WithValidation/rules/number.js +9 -0
- package/lib/lib/WithValidation/rules/password.js +9 -0
- package/lib/lib/WithValidation/rules/phone.js +9 -0
- package/lib/lib/WithValidation/rules/required.js +11 -0
- package/lib/lib/WithValidation/rules/stringWithoutJapaneseCharacters.js +9 -0
- package/lib/lib/WithValidation/rules/stringWithoutNumbers.js +9 -0
- package/lib/lib/utils/historyMaps.js +40 -0
- package/lib/lib/utils/muchBetterParser.js +11 -0
- package/lib/lib/utils/selectUnit.js +69 -0
- package/lib/lib/utils/swishParser.js +10 -0
- package/lib/lib/utils/swishParser.test.js +29 -0
- package/lib/lib/utils/translate.js +32 -0
- package/lib/lib/withSwipeListeners.js +104 -0
- package/lib/misc/countryEmojiFlags.js +207 -0
- package/lib/styleguide/Wrapper.js +46 -0
- package/lib/styleguide/logo/index.js +21 -0
- package/lib/widgets/AccordionWidget/index.js +228 -0
- package/lib/widgets/AccountDetail/index.js +344 -0
- package/lib/widgets/ActivateWidget/index.js +393 -0
- package/lib/widgets/Balance/index.js +64 -0
- package/lib/widgets/Bonus/bonusCode.js +111 -0
- package/lib/widgets/Bonus/index.js +115 -0
- package/lib/widgets/Bonus/table.js +166 -0
- package/lib/widgets/BonusWidget/BonusCode.js +113 -0
- package/lib/widgets/BonusWidget/index.js +336 -0
- package/lib/widgets/BonusWidget/states.js +48 -0
- package/lib/widgets/BonusWidget/types.js +38 -0
- package/lib/widgets/Cashier/Deposit/BonusSelectorList/index.js +79 -0
- package/lib/widgets/Cashier/Deposit/DepositWidget/index.js +416 -0
- package/lib/widgets/Cashier/Deposit/PaymentForm/DynamicForm.js +75 -0
- package/lib/widgets/Cashier/Deposit/PaymentForm/InjectedIframeHTML.js +74 -0
- package/lib/widgets/Cashier/Deposit/PaymentForm/NewTab.js +44 -0
- package/lib/widgets/Cashier/Deposit/PaymentForm/PaymentResult.js +53 -0
- package/lib/widgets/Cashier/Deposit/PaymentForm/index.js +224 -0
- package/lib/widgets/Cashier/Payment/PaymentAccountForms/index.js +350 -0
- package/lib/widgets/Cashier/Payment/PaymentAccountParser.js +55 -0
- package/lib/widgets/Cashier/Payment/PaymentAmountSelector/index.js +89 -0
- package/lib/widgets/Cashier/Payment/PaymentMethodItem/index.js +247 -0
- package/lib/widgets/Cashier/Payment/PaymentMethodSelector/index.js +79 -0
- package/lib/widgets/Cashier/Payment/SelectedPaymentMethod/index.js +104 -0
- package/lib/widgets/Cashier/Payment/index.js +35 -0
- package/lib/widgets/Cashier/Withdraw/WithdrawWidget/index.js +314 -0
- package/lib/widgets/Cashier/hoc/FramedComponent/index.js +90 -0
- package/lib/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +96 -0
- package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +818 -0
- package/lib/widgets/CashierAccordion/Deposit/PaymentForm/DynamicForm.js +75 -0
- package/lib/widgets/CashierAccordion/Deposit/PaymentForm/InjectedIframeHTML.js +70 -0
- package/lib/widgets/CashierAccordion/Deposit/PaymentForm/NewTab.js +44 -0
- package/lib/widgets/CashierAccordion/Deposit/PaymentForm/PaymentResult.js +50 -0
- package/lib/widgets/CashierAccordion/Deposit/PaymentForm/index.js +167 -0
- package/lib/widgets/CashierAccordion/Payment/AccountSelection/index.js +115 -0
- package/lib/widgets/CashierAccordion/Payment/Button/index.js +35 -0
- package/lib/widgets/CashierAccordion/Payment/CashierResult/index.js +173 -0
- package/lib/widgets/CashierAccordion/Payment/MethodMinMax/index.js +69 -0
- package/lib/widgets/CashierAccordion/Payment/Notice/index.js +44 -0
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js +1113 -0
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +1084 -0
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +63 -0
- package/lib/widgets/CashierAccordion/Payment/PaymentAmountSelector/index.js +57 -0
- package/lib/widgets/CashierAccordion/Payment/PaymentMethodItem/index.js +236 -0
- package/lib/widgets/CashierAccordion/Payment/PaymentMethodSelector/index.js +117 -0
- package/lib/widgets/CashierAccordion/Payment/SelectedPaymentMethod/index.js +73 -0
- package/lib/widgets/CashierAccordion/Payment/index.js +87 -0
- package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +536 -0
- package/lib/widgets/CashierAccordion/hoc/FramedComponent/index.js +90 -0
- package/lib/widgets/CasinoHistoryTable/index.js +317 -0
- package/lib/widgets/ChangePassword/index.js +139 -0
- package/lib/widgets/ChangeUsername/index.js +95 -0
- package/lib/widgets/HistoryWidget/index.js +410 -0
- package/lib/widgets/HistoryWidget/message.js +160 -0
- package/lib/widgets/HistoryWidget/utils.js +40 -0
- package/lib/widgets/Pagination/index.js +217 -0
- package/lib/widgets/PaymentHistoryTable/index.js +310 -0
- package/lib/widgets/RequestResetPassword/index.js +132 -0
- package/lib/widgets/ResetPassword/index.js +143 -0
- package/lib/widgets/ResponsibleGaming/Amount.js +72 -0
- package/lib/widgets/ResponsibleGaming/LimitList/index.js +229 -0
- package/lib/widgets/ResponsibleGaming/Period.js +67 -0
- package/lib/widgets/ResponsibleGaming/index.js +167 -0
- package/lib/widgets/ResponsibleGamingAccordion/AmountItemContent/index.js +416 -0
- package/lib/widgets/ResponsibleGamingAccordion/AmountItemHeader/index.js +57 -0
- package/lib/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +410 -0
- package/lib/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +217 -0
- package/lib/widgets/ResponsibleGamingAccordion/PeriodItemHeader/index.js +53 -0
- package/lib/widgets/ResponsibleGamingAccordion/index.js +688 -0
- package/lib/widgets/ResponsibleGamingAccordionSignUp/AmountItemContent/index.js +139 -0
- package/lib/widgets/ResponsibleGamingAccordionSignUp/AmountItemHeader/index.js +57 -0
- package/lib/widgets/ResponsibleGamingAccordionSignUp/LimitStatus/index.js +61 -0
- package/lib/widgets/ResponsibleGamingAccordionSignUp/index.js +258 -0
- package/lib/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +112 -0
- package/lib/widgets/ResponsibleGamingSingleSignUp/LimitStatus/index.js +42 -0
- package/lib/widgets/ResponsibleGamingSingleSignUp/index.js +286 -0
- package/lib/widgets/ResponsibleGamingWidget/Timespan.js +418 -0
- package/lib/widgets/ResponsibleGamingWidget/helpers.js +50 -0
- package/lib/widgets/ResponsibleGamingWidget/index.js +367 -0
- package/lib/widgets/ResponsibleGamingWidget/messages.js +363 -0
- package/lib/widgets/ResponsibleGamingWidget/normalize.js +248 -0
- package/lib/widgets/ResponsibleGamingWidget/validate.js +85 -0
- package/lib/widgets/Settings/index.js +79 -0
- package/lib/widgets/SignIn/SignInForm.js +109 -0
- package/lib/widgets/SignIn/index.js +112 -0
- package/lib/widgets/SignUp/ActivationStep.js +199 -0
- package/lib/widgets/SignUp/ConfirmContactInfoStep.js +279 -0
- package/lib/widgets/SignUp/ContactInfoStep.js +407 -0
- package/lib/widgets/SignUp/SetLimitsStep.js +293 -0
- package/lib/widgets/SignUp/UserInfoStep.js +308 -0
- package/lib/widgets/SignUp/index.js +352 -0
- package/lib/widgets/SportsbookHistoryTable/index.js +315 -0
- package/lib/widgets/SportsbookSettings/index.js +78 -0
- package/lib/widgets/Subscriptions/index.js +215 -0
- package/lib/widgets/TableWidget/Tables/bonusCode.js +124 -0
- package/lib/widgets/TableWidget/Tables/bonusTable.js +264 -0
- package/lib/widgets/TableWidget/Tables/index.js +86 -0
- package/lib/widgets/TableWidget/index.js +139 -0
- package/lib/widgets/Verify/Address.js +38 -0
- package/lib/widgets/Verify/Passport.js +38 -0
- package/lib/widgets/Verify/Payment.js +38 -0
- package/lib/widgets/Verify/index.js +189 -0
- package/lib/widgets/Verify/reasons.js +106 -0
- package/lib/widgets/Verify/status.js +30 -0
- package/lib/widgets/Verify/types.js +39 -0
- package/lib/widgets/VerifyAccordionWidget/index.js +213 -0
- package/package.json +1 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormattedNumber } from 'react-intl';
|
|
3
|
+
import Money from '../../../components/Money';
|
|
4
|
+
import Button from '../../../components/Button';
|
|
5
|
+
import Translate from '../../../components/Translate';
|
|
6
|
+
|
|
7
|
+
var ActiveLimit = function ActiveLimit(_ref) {
|
|
8
|
+
var remainingAmount = _ref.remainingAmount,
|
|
9
|
+
amount = _ref.amount,
|
|
10
|
+
currency = _ref.currency,
|
|
11
|
+
type = _ref.type;
|
|
12
|
+
return React.createElement(
|
|
13
|
+
'div',
|
|
14
|
+
{ className: 'limit-info-container' },
|
|
15
|
+
amount && React.createElement(
|
|
16
|
+
'div',
|
|
17
|
+
{ className: 'active-limit-content' },
|
|
18
|
+
React.createElement(
|
|
19
|
+
'div',
|
|
20
|
+
{ className: 'limit-name' },
|
|
21
|
+
React.createElement(Translate, {
|
|
22
|
+
id: 'message.responsiblegaming.current-limit',
|
|
23
|
+
defaultMessage: 'Current limit'
|
|
24
|
+
})
|
|
25
|
+
),
|
|
26
|
+
!['LoginTime', 'RealityCheck', 'Session', 'ProductSession'].includes(type) && React.createElement(
|
|
27
|
+
'div',
|
|
28
|
+
{ className: 'active-limit-value' },
|
|
29
|
+
React.createElement(Money, { decimals: false, value: amount, currency: currency })
|
|
30
|
+
),
|
|
31
|
+
type === 'LoginTime' && React.createElement(
|
|
32
|
+
'div',
|
|
33
|
+
{ className: 'active-limit-value' },
|
|
34
|
+
Math.floor(amount / 60),
|
|
35
|
+
' ',
|
|
36
|
+
React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
|
|
37
|
+
),
|
|
38
|
+
['RealityCheck', 'Session', 'ProductSession'].includes(type) && React.createElement(
|
|
39
|
+
'div',
|
|
40
|
+
{ className: 'active-limit-value' },
|
|
41
|
+
amount,
|
|
42
|
+
' ',
|
|
43
|
+
React.createElement(Translate, { id: 'label.minutes', defaultMessage: 'min' })
|
|
44
|
+
)
|
|
45
|
+
),
|
|
46
|
+
remainingAmount !== null && type !== 'RealityCheck' && type !== 'Session' && React.createElement(
|
|
47
|
+
'div',
|
|
48
|
+
{ className: 'active-limit-content' },
|
|
49
|
+
React.createElement(
|
|
50
|
+
'div',
|
|
51
|
+
{ className: 'active-limit-name' },
|
|
52
|
+
React.createElement(Translate, {
|
|
53
|
+
id: 'message.responsiblegaming.remaining-limit',
|
|
54
|
+
defaultMessage: 'Remaining limit'
|
|
55
|
+
})
|
|
56
|
+
),
|
|
57
|
+
!['LoginTime', 'ProductSession'].includes(type) ? React.createElement(
|
|
58
|
+
'div',
|
|
59
|
+
{ className: 'active-limit-value' },
|
|
60
|
+
React.createElement(Money, {
|
|
61
|
+
decimals: false,
|
|
62
|
+
value: remainingAmount,
|
|
63
|
+
currency: currency
|
|
64
|
+
})
|
|
65
|
+
) : type === 'LoginTime' ? React.createElement(
|
|
66
|
+
'div',
|
|
67
|
+
{ className: 'active-limit-value' },
|
|
68
|
+
remainingAmount / 60,
|
|
69
|
+
' ',
|
|
70
|
+
React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
|
|
71
|
+
) : React.createElement(
|
|
72
|
+
'div',
|
|
73
|
+
{ className: 'active-limit-value' },
|
|
74
|
+
remainingAmount,
|
|
75
|
+
' ',
|
|
76
|
+
React.createElement(Translate, { id: 'label.minutes', defaultMessage: 'min' })
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var ExtraLimit = function ExtraLimit(_ref2) {
|
|
83
|
+
var amount = _ref2.amount,
|
|
84
|
+
currency = _ref2.currency,
|
|
85
|
+
handlePickLimit = _ref2.handlePickLimit,
|
|
86
|
+
id = _ref2.id;
|
|
87
|
+
return React.createElement(
|
|
88
|
+
'div',
|
|
89
|
+
{ className: 'limit-info-container' },
|
|
90
|
+
amount && React.createElement(
|
|
91
|
+
'div',
|
|
92
|
+
{ className: 'extra-limit-content' },
|
|
93
|
+
React.createElement(
|
|
94
|
+
'div',
|
|
95
|
+
{ className: 'limit-name' },
|
|
96
|
+
React.createElement(Translate, {
|
|
97
|
+
id: 'message.responsiblegaming.extra-limit',
|
|
98
|
+
defaultMessage: 'Limit'
|
|
99
|
+
})
|
|
100
|
+
),
|
|
101
|
+
React.createElement(
|
|
102
|
+
'div',
|
|
103
|
+
{ className: 'extra-limit-value' },
|
|
104
|
+
React.createElement(Money, { value: amount, currency: currency })
|
|
105
|
+
),
|
|
106
|
+
React.createElement(
|
|
107
|
+
Button,
|
|
108
|
+
{
|
|
109
|
+
type: 'button',
|
|
110
|
+
className: 'button tertiary tiny extra-limit-button',
|
|
111
|
+
onClick: function onClick() {
|
|
112
|
+
return handlePickLimit(id);
|
|
113
|
+
} },
|
|
114
|
+
React.createElement(Translate, { id: 'action.pick.limit', defaultMessage: 'Pick' })
|
|
115
|
+
)
|
|
116
|
+
)
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
var TransactionLimit = function TransactionLimit(_ref3) {
|
|
121
|
+
var amount = _ref3.amount,
|
|
122
|
+
currency = _ref3.currency,
|
|
123
|
+
handleCancel = _ref3.handleCancel,
|
|
124
|
+
id = _ref3.id;
|
|
125
|
+
return React.createElement(
|
|
126
|
+
'div',
|
|
127
|
+
{ className: 'transaction-limit-content' },
|
|
128
|
+
React.createElement(
|
|
129
|
+
'div',
|
|
130
|
+
{ className: 'limit-name' },
|
|
131
|
+
React.createElement(Translate, {
|
|
132
|
+
id: 'message.responsiblegaming.transaction-limit',
|
|
133
|
+
defaultMessage: 'Transaction limit',
|
|
134
|
+
tagName: 'p'
|
|
135
|
+
}),
|
|
136
|
+
': ',
|
|
137
|
+
React.createElement(Money, { decimals: false, value: amount, currency: currency })
|
|
138
|
+
),
|
|
139
|
+
React.createElement(
|
|
140
|
+
'div',
|
|
141
|
+
{ className: 'transaction-limit-value' },
|
|
142
|
+
React.createElement(
|
|
143
|
+
'a',
|
|
144
|
+
{
|
|
145
|
+
href: '#',
|
|
146
|
+
onClick: function onClick(e) {
|
|
147
|
+
e.preventDefault();
|
|
148
|
+
handleCancel(id);
|
|
149
|
+
} },
|
|
150
|
+
React.createElement(Translate, { id: 'action.delete.limit', defaultMessage: 'Delete' })
|
|
151
|
+
)
|
|
152
|
+
)
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var DeletedLimit = function DeletedLimit(_ref4) {
|
|
157
|
+
var amount = _ref4.amount,
|
|
158
|
+
currency = _ref4.currency,
|
|
159
|
+
date = _ref4.date,
|
|
160
|
+
timespan = _ref4.timespan,
|
|
161
|
+
type = _ref4.type,
|
|
162
|
+
jurisdiction = _ref4.jurisdiction;
|
|
163
|
+
return React.createElement(
|
|
164
|
+
'div',
|
|
165
|
+
{ className: 'pending-limit-info-container' },
|
|
166
|
+
React.createElement(
|
|
167
|
+
'div',
|
|
168
|
+
{ className: 'pending-limit-content' },
|
|
169
|
+
!['LoginTime', 'ProductSession'].includes(type) ? React.createElement(
|
|
170
|
+
'div',
|
|
171
|
+
null,
|
|
172
|
+
React.createElement(Translate, {
|
|
173
|
+
id: 'message.responsiblegaming.deleted-limit.' + timespan,
|
|
174
|
+
defaultMessage: 'This limit of {amount} {currency} will be deleted in {date}',
|
|
175
|
+
values: {
|
|
176
|
+
date: React.createElement(
|
|
177
|
+
'span',
|
|
178
|
+
null,
|
|
179
|
+
date
|
|
180
|
+
),
|
|
181
|
+
amount: React.createElement(FormattedNumber, { value: amount }),
|
|
182
|
+
currency: React.createElement(
|
|
183
|
+
'span',
|
|
184
|
+
null,
|
|
185
|
+
currency
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
) : React.createElement(
|
|
190
|
+
'div',
|
|
191
|
+
null,
|
|
192
|
+
React.createElement(Translate, {
|
|
193
|
+
id: 'message.responsiblegaming.deleted-period-limit',
|
|
194
|
+
defaultMessage: 'This limit of {amount} {hour} will be deleted in {date}',
|
|
195
|
+
values: {
|
|
196
|
+
date: React.createElement(
|
|
197
|
+
'span',
|
|
198
|
+
null,
|
|
199
|
+
date
|
|
200
|
+
),
|
|
201
|
+
amount: React.createElement(FormattedNumber, { value: amount }),
|
|
202
|
+
hour: React.createElement(
|
|
203
|
+
'span',
|
|
204
|
+
null,
|
|
205
|
+
type === 'LoginTime' ? 'h' : 'm'
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
})
|
|
209
|
+
)
|
|
210
|
+
)
|
|
211
|
+
);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
var ConfirmLimit = function ConfirmLimit(_ref5) {
|
|
215
|
+
var amount = _ref5.amount,
|
|
216
|
+
type = _ref5.type,
|
|
217
|
+
timespan = _ref5.timespan,
|
|
218
|
+
currency = _ref5.currency,
|
|
219
|
+
status = _ref5.status;
|
|
220
|
+
return React.createElement(
|
|
221
|
+
'div',
|
|
222
|
+
{ className: 'confirm-limit' },
|
|
223
|
+
type !== 'RealityCheck' && type !== 'Session' && React.createElement(
|
|
224
|
+
'div',
|
|
225
|
+
null,
|
|
226
|
+
status !== 'Canceled' ? React.createElement(Translate, {
|
|
227
|
+
id: 'message.responsiblegaming.confirm-limit.' + timespan,
|
|
228
|
+
defaultMessage: 'You have a limit of {amount} {currency} to confirm.',
|
|
229
|
+
tagName: 'div',
|
|
230
|
+
values: {
|
|
231
|
+
amount: React.createElement(FormattedNumber, { value: amount }),
|
|
232
|
+
currency: React.createElement(
|
|
233
|
+
'span',
|
|
234
|
+
null,
|
|
235
|
+
currency
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
}) : React.createElement(Translate, {
|
|
239
|
+
id: 'message.responsiblegaming.confirm-deleted-limit.' + timespan,
|
|
240
|
+
defaultMessage: 'Confirm that you want to remove your limit of {amount} {currency}',
|
|
241
|
+
tagName: 'div',
|
|
242
|
+
values: {
|
|
243
|
+
amount: React.createElement(FormattedNumber, { value: amount }),
|
|
244
|
+
currency: React.createElement(
|
|
245
|
+
'span',
|
|
246
|
+
null,
|
|
247
|
+
currency
|
|
248
|
+
)
|
|
249
|
+
}
|
|
250
|
+
})
|
|
251
|
+
),
|
|
252
|
+
(type === 'RealityCheck' || type === 'Session') && React.createElement(Translate, {
|
|
253
|
+
id: 'message.responsiblegaming.confirm-limit-minutes',
|
|
254
|
+
defaultMessage: 'Confirm Limit',
|
|
255
|
+
tagName: 'div',
|
|
256
|
+
values: {
|
|
257
|
+
amount: React.createElement(FormattedNumber, { value: amount })
|
|
258
|
+
}
|
|
259
|
+
})
|
|
260
|
+
);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
var PendingLimit = function PendingLimit(_ref6) {
|
|
264
|
+
var date = _ref6.date,
|
|
265
|
+
type = _ref6.type,
|
|
266
|
+
amount = _ref6.amount,
|
|
267
|
+
currency = _ref6.currency;
|
|
268
|
+
return React.createElement(
|
|
269
|
+
'div',
|
|
270
|
+
{ className: 'pending-limit-info-container' },
|
|
271
|
+
React.createElement(
|
|
272
|
+
'div',
|
|
273
|
+
{ className: 'pending-limit-content' },
|
|
274
|
+
React.createElement(
|
|
275
|
+
'div',
|
|
276
|
+
{ className: 'pending-limit-name' },
|
|
277
|
+
React.createElement(Translate, {
|
|
278
|
+
id: 'message.responsiblegaming.pending-limit-activation',
|
|
279
|
+
defaultMessage: 'Time until active'
|
|
280
|
+
})
|
|
281
|
+
),
|
|
282
|
+
React.createElement(
|
|
283
|
+
'div',
|
|
284
|
+
{ className: 'pending-limit-value' },
|
|
285
|
+
date
|
|
286
|
+
)
|
|
287
|
+
),
|
|
288
|
+
React.createElement(
|
|
289
|
+
'div',
|
|
290
|
+
{ className: 'pending-limit-content' },
|
|
291
|
+
React.createElement(
|
|
292
|
+
'div',
|
|
293
|
+
{ className: 'pending-limit-name' },
|
|
294
|
+
React.createElement(Translate, {
|
|
295
|
+
id: 'message.responsiblegaming.pending-limit',
|
|
296
|
+
defaultMessage: 'New limit'
|
|
297
|
+
})
|
|
298
|
+
),
|
|
299
|
+
React.createElement(
|
|
300
|
+
'div',
|
|
301
|
+
{ className: 'pending-limit-value' },
|
|
302
|
+
!['LoginTime', 'Session', 'ProductSession'].includes(type) && React.createElement(Money, { decimals: false, value: amount, currency: currency }),
|
|
303
|
+
['Session', 'ProductSession'].includes(type) && React.createElement(
|
|
304
|
+
'div',
|
|
305
|
+
null,
|
|
306
|
+
amount,
|
|
307
|
+
' ',
|
|
308
|
+
React.createElement(Translate, { id: 'label.minutes', defaultMessage: 'min' })
|
|
309
|
+
),
|
|
310
|
+
type === 'LoginTime' && React.createElement(
|
|
311
|
+
'div',
|
|
312
|
+
null,
|
|
313
|
+
Math.floor(amount / 60),
|
|
314
|
+
' ',
|
|
315
|
+
React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
|
|
316
|
+
)
|
|
317
|
+
)
|
|
318
|
+
)
|
|
319
|
+
);
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
var CooldownLimit = function CooldownLimit(_ref7) {
|
|
323
|
+
var date = _ref7.date,
|
|
324
|
+
type = _ref7.type,
|
|
325
|
+
amount = _ref7.amount,
|
|
326
|
+
currency = _ref7.currency;
|
|
327
|
+
return React.createElement(
|
|
328
|
+
'div',
|
|
329
|
+
{ className: 'cooldown-limit-info-container' },
|
|
330
|
+
React.createElement(
|
|
331
|
+
'div',
|
|
332
|
+
{ className: 'cooldown-limit-content' },
|
|
333
|
+
React.createElement(
|
|
334
|
+
'div',
|
|
335
|
+
{ className: 'cooldown-limit-name' },
|
|
336
|
+
React.createElement(Translate, {
|
|
337
|
+
id: 'message.responsiblegaming.cooldown-limit-confirmation',
|
|
338
|
+
defaultMessage: 'Time until confirmation'
|
|
339
|
+
})
|
|
340
|
+
),
|
|
341
|
+
React.createElement(
|
|
342
|
+
'div',
|
|
343
|
+
{ className: 'cooldown-limit-value' },
|
|
344
|
+
date
|
|
345
|
+
)
|
|
346
|
+
),
|
|
347
|
+
React.createElement(
|
|
348
|
+
'div',
|
|
349
|
+
{ className: 'cooldown-limit-content' },
|
|
350
|
+
React.createElement(
|
|
351
|
+
'div',
|
|
352
|
+
{ className: 'cooldown-limit-name' },
|
|
353
|
+
React.createElement(Translate, {
|
|
354
|
+
id: 'message.responsiblegaming.cooldown-limit',
|
|
355
|
+
defaultMessage: 'New limit'
|
|
356
|
+
})
|
|
357
|
+
),
|
|
358
|
+
React.createElement(
|
|
359
|
+
'div',
|
|
360
|
+
{ className: 'cooldown-limit-value' },
|
|
361
|
+
!['LoginTime', 'RealityCheck', 'Session'].includes(type) ? React.createElement(Money, { decimals: false, value: amount, currency: currency }) : React.createElement(
|
|
362
|
+
'div',
|
|
363
|
+
null,
|
|
364
|
+
type === 'RealityCheck' || type === 'Session' ? React.createElement(
|
|
365
|
+
Fragment,
|
|
366
|
+
null,
|
|
367
|
+
amount,
|
|
368
|
+
' ',
|
|
369
|
+
React.createElement(Translate, { id: 'label.minutes', defaultMessage: 'min' })
|
|
370
|
+
) : React.createElement(
|
|
371
|
+
Fragment,
|
|
372
|
+
null,
|
|
373
|
+
Math.floor(amount / 60),
|
|
374
|
+
' ',
|
|
375
|
+
React.createElement(Translate, { id: 'label.hours-short', defaultMessage: 'h' })
|
|
376
|
+
)
|
|
377
|
+
)
|
|
378
|
+
)
|
|
379
|
+
)
|
|
380
|
+
);
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export { ActiveLimit, ExtraLimit, ConfirmLimit, PendingLimit, DeletedLimit, TransactionLimit, CooldownLimit };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { injectIntl } from 'react-intl';
|
|
3
|
+
import Select from '../../../components/Select';
|
|
4
|
+
import { ConfirmLimit, ActiveLimit, CooldownLimit, PendingLimit, DeletedLimit } from '../LimitStatus';
|
|
5
|
+
import Button from '../../../components/Button';
|
|
6
|
+
import Translate from '../../../components/Translate';
|
|
7
|
+
import translate from '../../../lib/utils/translate';
|
|
8
|
+
|
|
9
|
+
var PeriodItemContent = function PeriodItemContent(_ref) {
|
|
10
|
+
var intl = _ref.intl,
|
|
11
|
+
errors = _ref.errors,
|
|
12
|
+
handlePeriodAmount = _ref.handlePeriodAmount,
|
|
13
|
+
activeLimit = _ref.activeLimit,
|
|
14
|
+
canceledLimit = _ref.canceledLimit,
|
|
15
|
+
confirmLimit = _ref.confirmLimit,
|
|
16
|
+
handleConfirm = _ref.handleConfirm,
|
|
17
|
+
handleDecline = _ref.handleDecline,
|
|
18
|
+
handleCancel = _ref.handleCancel,
|
|
19
|
+
displayLimit = _ref.displayLimit,
|
|
20
|
+
type = _ref.type,
|
|
21
|
+
_ref$config = _ref.config,
|
|
22
|
+
config = _ref$config === undefined ? [] : _ref$config,
|
|
23
|
+
title = _ref.title,
|
|
24
|
+
isLoading = _ref.isLoading,
|
|
25
|
+
pendingLimit = _ref.pendingLimit,
|
|
26
|
+
cooldownLimit = _ref.cooldownLimit,
|
|
27
|
+
timeUntilNewLimit = _ref.timeUntilNewLimit,
|
|
28
|
+
timeUntilConfirm = _ref.timeUntilConfirm,
|
|
29
|
+
timeUntilDelete = _ref.timeUntilDelete,
|
|
30
|
+
timespan = _ref.timespan,
|
|
31
|
+
currency = _ref.currency;
|
|
32
|
+
|
|
33
|
+
var types = config.map(function (c) {
|
|
34
|
+
return {
|
|
35
|
+
label: translate({ id: c.label }, intl),
|
|
36
|
+
value: c.value
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return React.createElement(
|
|
41
|
+
Fragment,
|
|
42
|
+
null,
|
|
43
|
+
React.createElement(
|
|
44
|
+
'div',
|
|
45
|
+
{ className: 'limit-container' },
|
|
46
|
+
displayLimit && (type === 'RealityCheck' || type === 'Session') && React.createElement(
|
|
47
|
+
'div',
|
|
48
|
+
{ className: 'limit-info-container period' },
|
|
49
|
+
React.createElement(ActiveLimit, { type: type, amount: displayLimit.Amount })
|
|
50
|
+
),
|
|
51
|
+
!displayLimit && type && type !== 'Block' && type !== 'SelfExclude' && React.createElement(
|
|
52
|
+
'div',
|
|
53
|
+
{ className: 'limit-info-container period' },
|
|
54
|
+
React.createElement(Translate, {
|
|
55
|
+
id: 'message.responsiblegaming.no-limit-set',
|
|
56
|
+
defaultMessage: 'No limits yet',
|
|
57
|
+
values: {
|
|
58
|
+
title: React.createElement(Translate, { id: title })
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
),
|
|
62
|
+
React.createElement(Select, {
|
|
63
|
+
className: 'layout-item period',
|
|
64
|
+
options: types,
|
|
65
|
+
onChange: handlePeriodAmount,
|
|
66
|
+
value: displayLimit ? displayLimit.Amount : null,
|
|
67
|
+
name: 'Amount',
|
|
68
|
+
disabled: confirmLimit || cooldownLimit || pendingLimit,
|
|
69
|
+
status: errors.Amount && 'failure',
|
|
70
|
+
statusText: errors.Amount && translate({ id: errors.Amount }, intl)
|
|
71
|
+
}),
|
|
72
|
+
confirmLimit && React.createElement(
|
|
73
|
+
'div',
|
|
74
|
+
null,
|
|
75
|
+
React.createElement(ConfirmLimit, {
|
|
76
|
+
amount: confirmLimit.Amount,
|
|
77
|
+
timespan: confirmLimit.Timespan,
|
|
78
|
+
type: type
|
|
79
|
+
}),
|
|
80
|
+
React.createElement(
|
|
81
|
+
Button,
|
|
82
|
+
{
|
|
83
|
+
className: 'button primary wide',
|
|
84
|
+
type: 'button',
|
|
85
|
+
onClick: function onClick() {
|
|
86
|
+
return handleConfirm(confirmLimit.Id);
|
|
87
|
+
} },
|
|
88
|
+
translate({
|
|
89
|
+
id: 'action.button.confirm-limit',
|
|
90
|
+
defaultMessage: 'Confirm limit'
|
|
91
|
+
}, intl)
|
|
92
|
+
),
|
|
93
|
+
React.createElement(
|
|
94
|
+
Button,
|
|
95
|
+
{
|
|
96
|
+
className: 'button tertiary wide',
|
|
97
|
+
type: 'button',
|
|
98
|
+
onClick: function onClick() {
|
|
99
|
+
return handleDecline(confirmLimit.Id);
|
|
100
|
+
} },
|
|
101
|
+
translate({
|
|
102
|
+
id: 'action.button.decline-limit',
|
|
103
|
+
defaultMessage: 'Decline limit'
|
|
104
|
+
}, intl)
|
|
105
|
+
)
|
|
106
|
+
),
|
|
107
|
+
!confirmLimit && !cooldownLimit && !pendingLimit && React.createElement(
|
|
108
|
+
Fragment,
|
|
109
|
+
null,
|
|
110
|
+
React.createElement(
|
|
111
|
+
Button,
|
|
112
|
+
{
|
|
113
|
+
className: 'button primary wide',
|
|
114
|
+
type: 'submit',
|
|
115
|
+
disabled: isLoading,
|
|
116
|
+
isLoading: isLoading },
|
|
117
|
+
translate({
|
|
118
|
+
id: 'action.button.submit',
|
|
119
|
+
defaultMessage: 'Submit'
|
|
120
|
+
}, intl)
|
|
121
|
+
),
|
|
122
|
+
activeLimit && handleCancel && React.createElement(
|
|
123
|
+
Button,
|
|
124
|
+
{
|
|
125
|
+
type: 'button',
|
|
126
|
+
className: 'button tertiary wide',
|
|
127
|
+
onClick: function onClick() {
|
|
128
|
+
return handleCancel(activeLimit.Id);
|
|
129
|
+
} },
|
|
130
|
+
translate({
|
|
131
|
+
id: 'action.button.delete-limit',
|
|
132
|
+
defaultMessage: 'Delete limit'
|
|
133
|
+
}, intl)
|
|
134
|
+
)
|
|
135
|
+
)
|
|
136
|
+
),
|
|
137
|
+
pendingLimit && timespan === pendingLimit.Timespan && !confirmLimit && React.createElement(
|
|
138
|
+
'div',
|
|
139
|
+
{ className: 'pending-container' },
|
|
140
|
+
React.createElement(PendingLimit, {
|
|
141
|
+
date: timeUntilNewLimit,
|
|
142
|
+
amount: pendingLimit.Amount || '',
|
|
143
|
+
type: type,
|
|
144
|
+
currency: currency
|
|
145
|
+
}),
|
|
146
|
+
React.createElement(
|
|
147
|
+
Button,
|
|
148
|
+
{
|
|
149
|
+
className: 'button tertiary wide',
|
|
150
|
+
type: 'submit',
|
|
151
|
+
disabled: isLoading,
|
|
152
|
+
isLoading: isLoading },
|
|
153
|
+
translate({
|
|
154
|
+
id: 'action.button.undo-limit',
|
|
155
|
+
defaultMessage: 'Reset incoming limit'
|
|
156
|
+
}, intl)
|
|
157
|
+
)
|
|
158
|
+
),
|
|
159
|
+
cooldownLimit && !confirmLimit && React.createElement(
|
|
160
|
+
'div',
|
|
161
|
+
{ className: 'pending-container' },
|
|
162
|
+
cooldownLimit && React.createElement(CooldownLimit, {
|
|
163
|
+
date: timeUntilConfirm,
|
|
164
|
+
amount: cooldownLimit.Amount || '',
|
|
165
|
+
type: type
|
|
166
|
+
}),
|
|
167
|
+
React.createElement(
|
|
168
|
+
Button,
|
|
169
|
+
{
|
|
170
|
+
className: 'button tertiary wide',
|
|
171
|
+
type: 'submit',
|
|
172
|
+
disabled: isLoading,
|
|
173
|
+
isLoading: isLoading },
|
|
174
|
+
translate({
|
|
175
|
+
id: 'action.button.undo-limit',
|
|
176
|
+
defaultMessage: 'Reset incoming limit'
|
|
177
|
+
}, intl)
|
|
178
|
+
)
|
|
179
|
+
),
|
|
180
|
+
canceledLimit && !activeLimit && !confirmLimit && !cooldownLimit && timeUntilDelete.props.value > 0 && React.createElement(
|
|
181
|
+
'div',
|
|
182
|
+
{ className: 'pending-container' },
|
|
183
|
+
React.createElement(DeletedLimit, {
|
|
184
|
+
amount: canceledLimit.Amount || '',
|
|
185
|
+
currency: React.createElement(Translate, { id: 'label.minutes', defaultMessage: 'Minutes' }),
|
|
186
|
+
date: timeUntilDelete,
|
|
187
|
+
timespan: canceledLimit.Timespan
|
|
188
|
+
})
|
|
189
|
+
)
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export default injectIntl(PeriodItemContent);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import Icon from '../../../components/Icon';
|
|
3
|
+
import { injectIntl } from 'react-intl';
|
|
4
|
+
import marked from 'marked';
|
|
5
|
+
import translate from '../../../lib/utils/translate';
|
|
6
|
+
|
|
7
|
+
var PeriodItemHeader = function PeriodItemHeader(_ref) {
|
|
8
|
+
var title = _ref.title,
|
|
9
|
+
onClick = _ref.onClick,
|
|
10
|
+
displayLimit = _ref.displayLimit,
|
|
11
|
+
intl = _ref.intl;
|
|
12
|
+
return React.createElement(
|
|
13
|
+
'div',
|
|
14
|
+
{ className: 'responsiblegaming-item-header', onClick: onClick },
|
|
15
|
+
React.createElement(
|
|
16
|
+
'div',
|
|
17
|
+
{ className: 'title-text' },
|
|
18
|
+
title,
|
|
19
|
+
displayLimit && React.createElement(
|
|
20
|
+
'span',
|
|
21
|
+
{ className: 'info-amount' },
|
|
22
|
+
displayLimit.Amount,
|
|
23
|
+
' ',
|
|
24
|
+
translate({
|
|
25
|
+
id: 'label.minutes',
|
|
26
|
+
defaultMessage: 'Minutes'
|
|
27
|
+
}, intl)
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default injectIntl(PeriodItemHeader);
|