@everymatrix/player-lugas-limit 1.72.1 → 1.72.2

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.
@@ -1,72 +1,38 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/locale.utils";
3
3
  import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
4
- /**
5
- * PlayerLugasLimit Component
6
- * Handles UI and logic for setting deposit limits for a user in a specific flow.
7
- */
8
4
  export class PlayerLugasLimit {
9
5
  constructor() {
10
- /** Array of predefined limit amounts */
6
+ // Internal variables
11
7
  this.predefinedAmounts = [];
12
- /** Displayed currency */
13
8
  this.displayedCurrency = '';
14
- /**
15
- * Submits the new monthly deposit limit set by the player.
16
- * @param amount - User-defined amount
17
- * @param keepLimit - Whether to keep the current limit
18
- * @param isInitialLimit - Whether the limit is being set initially
19
- */
20
- this.submitMonthlyDepositLimit = async (amount, keepLimit = false, isInitialLimit = false) => {
21
- if (keepLimit && !this.isUseExistingLimitOptionActive) {
22
- return;
23
- }
24
- this.isSubmitted = true;
25
- this.errorMessageOnSubmit = '';
26
- const url = new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`);
27
- const roleLimitAmount = isInitialLimit ? this.newAmount : 0;
28
- const requestBody = {
29
- amount,
30
- keepLimit,
31
- roleLimitAmount
32
- };
33
- const requestOptions = {
34
- method: 'POST',
35
- headers: {
36
- 'X-SessionId': this.session,
37
- 'X-Session-Type': 'others',
38
- 'Content-Type': 'application/json',
39
- 'Authorization': `Bearer ${this.session}`
40
- },
41
- body: JSON.stringify(requestBody)
42
- };
43
- try {
44
- const response = await fetch(url.href, requestOptions);
45
- if (!response.ok) {
46
- const error = await response.json();
47
- throw error;
48
- }
49
- this.closeLugasModal.emit();
50
- }
51
- catch (error) {
52
- this.handleSubmissionError(error, keepLimit);
53
- }
54
- finally {
55
- this.isSubmitted = false;
9
+ this.handleClick = (input) => {
10
+ switch (input) {
11
+ case 'UploadDocuments':
12
+ this.uploadDocuments.emit();
13
+ window.postMessage({ type: 'uploadDocuments' }, window.location.href);
14
+ break;
15
+ case 'Close':
16
+ this.closePopup.emit();
17
+ window.postMessage({ type: 'closePopup' }, window.location.href);
18
+ break;
56
19
  }
57
20
  };
58
21
  this.userId = '';
59
22
  this.session = '';
60
23
  this.endpoint = '';
61
24
  this.currency = 'EUR';
25
+ this.flow = '';
62
26
  this.amount = '';
63
27
  this.lang = undefined;
64
28
  this.clientStyling = '';
65
29
  this.clientStylingUrl = '';
66
30
  this.mbSource = undefined;
67
31
  this.translationUrl = '';
32
+ this.hasValidation = true;
33
+ this.kycStep = undefined;
68
34
  this.isLoading = false;
69
- this.showCustomAmount = false;
35
+ this.regularDepositLimitAmount = '';
70
36
  this.isSubmitted = false;
71
37
  this.isUseExistingLimitOptionActive = true;
72
38
  this.selectedPredefinedAmount = undefined;
@@ -74,13 +40,15 @@ export class PlayerLugasLimit {
74
40
  this.errorMessageOnSubmit = '';
75
41
  this.errorMessageOnInput = '';
76
42
  this.hasLugasError = false;
43
+ this.showCustomAmount = false;
77
44
  this.newAmount = '';
78
45
  }
79
- /**
80
- * Watch for changes in the translation URL and fetch new translations
81
- */
46
+ // Watchers
82
47
  handleNewTranslations() {
83
- getTranslations(this.translationUrl);
48
+ this.isLoading = true;
49
+ getTranslations(this.translationUrl).then(() => {
50
+ this.isLoading = false;
51
+ });
84
52
  }
85
53
  handleClientStylingChange(newValue, oldValue) {
86
54
  if (newValue != oldValue) {
@@ -93,65 +61,84 @@ export class PlayerLugasLimit {
93
61
  setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
94
62
  }
95
63
  }
96
- /**
97
- * Lifecycle method that fetches translations when the component is loaded.
98
- */
64
+ // Lifecycle methods
99
65
  async componentWillLoad() {
100
66
  if (this.translationUrl.length > 2) {
101
67
  await getTranslations(this.translationUrl);
102
68
  }
103
- await this.getMonthlyDepositLimitConfig();
69
+ await this.fetchDepositLimitConfig();
104
70
  this.displayedCurrency = this.currency === 'EUR' ? '€' : this.currency;
105
71
  }
106
72
  componentDidLoad() {
107
- if (this.stylingContainer) {
108
- if (window.emMessageBus != undefined) {
109
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
110
- }
111
- else {
112
- if (this.clientStyling)
113
- setClientStyling(this.stylingContainer, this.clientStyling);
114
- if (this.clientStylingUrl)
115
- setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
116
- }
73
+ if (!this.stylingContainer)
74
+ return;
75
+ if (window.emMessageBus != undefined) {
76
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
77
+ }
78
+ else {
79
+ if (this.clientStyling)
80
+ setClientStyling(this.stylingContainer, this.clientStyling);
81
+ if (this.clientStylingUrl)
82
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
117
83
  }
118
84
  }
119
85
  disconnectedCallback() {
120
86
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
121
87
  }
122
- /**
123
- * Fetches the monthly deposit limit configuration from the API.
124
- *
125
- * @returns Promise - Promise that resolves when the configuration is fetched
126
- */
127
- async getMonthlyDepositLimitConfig() {
128
- const url = new URL(`${this.endpoint}api/v1/gm/legislation/config/month-deposit-limit`);
88
+ async fetchDepositLimitConfig() {
129
89
  this.isLoading = true;
130
- return new Promise((resolve) => {
131
- fetch(url.href)
132
- .then((res) => {
133
- if (res.status >= 300) {
134
- throw new Error('There was an error while fetching the configuration');
135
- }
136
- return res.json();
137
- })
138
- .then((data) => {
139
- this.predefinedAmounts = data.preDefinedOptions;
140
- this.minAmount = data.minAmount;
141
- this.maxAmount = data.maxAmount;
142
- resolve(true);
143
- }).catch((err) => {
144
- this.errorMessageOnInitialization = translate('error', this.lang);
145
- console.log(err);
146
- })
147
- .finally(() => this.isLoading = false);
148
- });
90
+ try {
91
+ const url = new URL('/api/v1/gm/legislation/config/month-deposit-limit/', this.endpoint);
92
+ const response = await fetch(url.href);
93
+ if (!response.ok)
94
+ throw new Error('Failed to load config');
95
+ const data = await response.json();
96
+ this.predefinedAmounts = data.preDefinedOptions;
97
+ this.minAmount = data.minAmount;
98
+ this.maxAmount = data.maxAmount;
99
+ }
100
+ catch (error) {
101
+ this.errorMessageOnInitialization = translate('error', this.lang);
102
+ console.error(error);
103
+ }
104
+ finally {
105
+ this.isLoading = false;
106
+ }
107
+ }
108
+ async postPlayerSituation(userAmount, keepLimit = false, initialNewLimit = false) {
109
+ if (keepLimit && !this.isUseExistingLimitOptionActive)
110
+ return;
111
+ this.isSubmitted = true;
112
+ this.errorMessageOnSubmit = '';
113
+ const url = new URL(`v2/player/${this.userId}/limit/lugas/`, this.endpoint);
114
+ const roleLimitAmount = initialNewLimit ? this.amount : 0;
115
+ const body = Object.assign({ softMigration: this.flow === '1', keepLimit,
116
+ roleLimitAmount }, (userAmount && { amount: userAmount }));
117
+ const options = {
118
+ method: 'POST',
119
+ headers: {
120
+ 'X-SessionId': this.session,
121
+ 'Content-Type': 'application/json',
122
+ 'Authorization': `Bearer ${this.session}`
123
+ },
124
+ body: JSON.stringify(body)
125
+ };
126
+ try {
127
+ const response = await fetch(url.href, options);
128
+ if (!response.ok)
129
+ throw new Error(`HTTP ${response.status}`);
130
+ const data = await response.json();
131
+ this.kycStep = data.popup;
132
+ this.hasValidation = false;
133
+ this.regularDepositLimitAmount = data.regulatorDepositLimitAmount || '';
134
+ }
135
+ catch (error) {
136
+ this.handleSubmissionError(error, keepLimit);
137
+ }
138
+ finally {
139
+ this.isSubmitted = false;
140
+ }
149
141
  }
150
- /**
151
- * Handles errors during the submission of the monthly deposit limit.
152
- * @param error - Error response from the server
153
- * @param keepLimit - Whether the user opted to keep the current limit
154
- */
155
142
  handleSubmissionError(error, keepLimit) {
156
143
  var _a, _b;
157
144
  this.errorMessageOnSubmit = translate('LugasNotSet', this.lang);
@@ -171,23 +158,34 @@ export class PlayerLugasLimit {
171
158
  console.error('Unexpected Error:', error);
172
159
  }
173
160
  }
174
- /**
175
- * Handles form submission.
176
- * @param event - The form submission event
177
- */
161
+ handleAmountClick(amount) {
162
+ this.showCustomAmount = false;
163
+ this.errorMessageOnInput = '';
164
+ this.selectedPredefinedAmount = amount;
165
+ switch (amount) {
166
+ case 'Other':
167
+ this.newAmount = '';
168
+ this.showCustomAmount = true;
169
+ break;
170
+ case 'Max':
171
+ this.newAmount = this.maxAmount.toString();
172
+ this.showCustomAmount = true;
173
+ break;
174
+ default:
175
+ this.newAmount = amount;
176
+ this.postPlayerSituation(this.newAmount, false, true);
177
+ break;
178
+ }
179
+ }
178
180
  handleSubmit(event) {
179
181
  event.preventDefault();
180
- if (!this.errorMessageOnInput) {
181
- this.submitMonthlyDepositLimit(this.newAmount, false, true);
182
+ if (this.errorMessageOnInput) {
183
+ return;
182
184
  }
185
+ this.postPlayerSituation(this.newAmount, false, true);
183
186
  }
184
- /**
185
- * Handles input changes.
186
- * @param event - The input change event
187
- */
188
- handleInputChange(event) {
187
+ handleValidatorInputChange(event) {
189
188
  this.newAmount = event.target.value;
190
- // Perform validation checks
191
189
  this.isValidNumber = !isNaN(Number(this.newAmount));
192
190
  this.isWithinRange = (Number(this.newAmount) >= this.minAmount) && (Number(this.newAmount) <= this.maxAmount);
193
191
  if (!this.isWithinRange || !this.isValidNumber) {
@@ -202,68 +200,50 @@ export class PlayerLugasLimit {
202
200
  event.target.value = this.newAmount;
203
201
  }
204
202
  }
205
- /**
206
- * Handles predefined amount clicks.
207
- * @param amount - The predefined amount to set
208
- */
209
- handleAmountClick(amount) {
210
- this.showCustomAmount = false;
211
- this.errorMessageOnInput = '';
212
- this.selectedPredefinedAmount = amount;
213
- switch (amount) {
214
- case 'Other':
215
- this.newAmount = '';
216
- this.showCustomAmount = true;
217
- break;
218
- case 'Max':
219
- this.newAmount = this.maxAmount.toString();
220
- this.showCustomAmount = true;
221
- break;
203
+ renderKYC(step) {
204
+ switch (step) {
205
+ case 0:
206
+ this.handleClick('Close');
207
+ return;
208
+ case 1:
209
+ return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycSure', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc1', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.newAmount, false) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.postPlayerSituation(this.amount, true) }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } }))))));
210
+ case 2:
211
+ return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.regularDepositLimitAmount } }) }), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('UploadDocuments') }, translate('UploadDocuments', this.lang, { values: { currency: this.currency } }))))));
222
212
  default:
223
- this.newAmount = amount;
224
- this.submitMonthlyDepositLimit(this.newAmount, false, true);
225
- break;
213
+ return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc3', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "SecondButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } }))))));
226
214
  }
227
215
  }
228
- /**
229
- * Navigates to the privacy policy page.
230
- */
216
+ renderPredefinedButtons() {
217
+ return this.predefinedAmounts.map((currentAmount) => (h("button", { class: this.selectedPredefinedAmount === currentAmount ? 'Active' : '', onClick: () => this.handleAmountClick(currentAmount), disabled: this.hasLugasError }, currentAmount)));
218
+ }
219
+ ;
231
220
  goToPrivacyPolicy() {
232
221
  window.postMessage({ type: 'GoToPrivacyPolicy' });
233
222
  }
234
223
  ;
235
- /**
236
- * Renders the validator.
237
- */
238
224
  renderValidator() {
239
- const renderPredefinedButtons = () => {
240
- return this.predefinedAmounts.map((currentAmount) => (h("button", { class: this.selectedPredefinedAmount === currentAmount ? 'Active' : '', onClick: () => this.handleAmountClick(currentAmount), disabled: this.hasLugasError }, currentAmount)));
241
- };
242
225
  return (h("div", { class: "ValidatorContainer" }, this.errorMessageOnSubmit && (h("div", { class: "ErrorContainer" }, !this.hasLugasError && (h("span", { class: "DismissError", onClick: () => this.errorMessageOnSubmit = '' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", viewBox: "0 0 9 9", fill: "none" }, h("path", { d: "M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z", fill: "#111111" })))), h("p", { class: "ErrorParagraph" }, h("span", { class: "ErrorIcon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", viewBox: "0 0 9 9" }, h("path", { d: "M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z" }))), h("div", { innerHTML: this.errorMessageOnSubmit })))), h("div", { class: "Paragraphs" }, h("p", null, translate('LugasInfoBox', this.lang))), h("div", { class: "LimitAmountWrapper" }, this.isSubmitted
243
226
  && h("slot", { name: 'spinner' })
244
- && h("div", { class: "LoadingWrapper" }, h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))), h("p", { class: "ChooseLimitLabel" }, translate('ChooseLimit', this.lang)), h("div", { class: "PredefinedAmounts" }, h("button", { class: this.selectedPredefinedAmount === 'Other' ? 'Active' : '', onClick: () => this.handleAmountClick('Other') }, translate('ButtonCustomValue', this.lang)), renderPredefinedButtons(), h("button", { class: this.selectedPredefinedAmount === 'Max' ? 'Active' : '', onClick: () => this.handleAmountClick('Max') }, translate('ButtonMax', this.lang))), this.showCustomAmount && (h("form", { onSubmit: (event) => this.handleSubmit(event) }, this.showCustomAmount &&
245
- h("div", null, h("input", { class: `CustomAmountInput ${this.errorMessageOnInput ? 'InvalidInput' : ''}`, type: "number", value: this.selectedPredefinedAmount === 'Max' ? this.maxAmount : null, step: 0.01, placeholder: "0.00", disabled: this.hasLugasError || this.selectedPredefinedAmount === 'Max', onInput: (event) => this.handleInputChange(event) }), this.errorMessageOnInput && h("p", { class: "InvalidParagraph" }, this.errorMessageOnInput)), this.selectedPredefinedAmount &&
227
+ && h("div", { class: "LoadingWrapper" }, h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))), h("p", { class: "ChooseLimitLabel" }, translate('ChooseLimit', this.lang)), h("div", { class: "PredefinedAmounts" }, h("button", { class: this.selectedPredefinedAmount === 'Other' ? 'Active' : '', onClick: () => this.handleAmountClick('Other') }, translate('ButtonCustomValue', this.lang)), this.renderPredefinedButtons(), h("button", { class: this.selectedPredefinedAmount === 'Max' ? 'Active' : '', onClick: () => this.handleAmountClick('Max') }, translate('ButtonMax', this.lang))), this.showCustomAmount && (h("form", { onSubmit: (event) => this.handleSubmit(event) }, this.showCustomAmount &&
228
+ h("div", null, h("input", { class: `CustomAmountInput ${this.errorMessageOnInput ? 'InvalidInput' : ''}`, type: "number", value: this.selectedPredefinedAmount === 'Max' ? this.maxAmount : null, step: 0.01, placeholder: "0.00", disabled: this.hasLugasError || this.selectedPredefinedAmount === 'Max', onInput: (event) => this.handleValidatorInputChange(event) }), this.errorMessageOnInput && h("p", { class: "InvalidParagraph" }, this.errorMessageOnInput)), this.selectedPredefinedAmount &&
246
229
  h("button", { class: "PrimaryButton SetLimitBtn", type: "submit", disabled: this.hasLugasError || this.isSubmitted || !Boolean(this.newAmount) || Boolean(this.errorMessageOnInput) }, translate('LugasSetLimitDialogButtonSetLimit', this.lang, {
247
230
  values: {
248
231
  currency: this.displayedCurrency,
249
232
  amount: Number.parseFloat(this.newAmount || '0').toFixed(2)
250
233
  }
251
- }))))), h("div", { class: "ModalFooter" }, h("hr", null), h("div", { class: "Paragraphs" }, h("p", { class: "ExistingLimit" }, translate('LugasSetLimitDialogExistingLimit.text', this.lang), h("span", { class: this.isUseExistingLimitOptionActive ? 'Link' : 'Link Inactive', onClick: () => this.submitMonthlyDepositLimit(this.amount, true) }, translate('LugasSetLimitDialogExistingLimit.link', this.lang))), h("p", { class: "PrivacyNote" }, translate('LugasSetLimitDialogPrivacyNote.text', this.lang), h("span", { class: "Link", onClick: this.goToPrivacyPolicy }, translate('LugasSetLimitDialogPrivacyNote.link', this.lang)))))));
234
+ })))))));
252
235
  }
253
- /**
254
- * Renders the component.
255
- */
256
236
  render() {
237
+ const kycConfirmation = this.renderKYC(this.kycStep);
238
+ const validationContainer = this.renderValidator();
257
239
  if (this.isLoading) {
258
240
  return (h("div", null, h("p", null, translate('loading', this.lang, { values: { currency: this.currency } }))));
259
241
  }
260
- else if (this.errorMessageOnInitialization) {
242
+ if (this.errorMessageOnInitialization) {
261
243
  return (h("div", null, h("p", null, this.errorMessageOnInitialization)));
262
244
  }
263
- else {
264
- const validationContainer = this.renderValidator();
265
- return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "Container" }, h("div", { class: "ModalHeader" }, h("h2", null, translate('LugasSetLimitDialogTitle', this.lang))), h("div", { class: "ModalBody" }, validationContainer))));
266
- }
245
+ return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "Container" }, h("div", { class: "ModalHeader" }, h("h2", null, translate('LugasSetLimitDialogTitle', this.lang))), h("div", { class: "ModalBody" }, this.hasValidation ? validationContainer : kycConfirmation, this.hasValidation &&
246
+ h("div", { class: "ModalFooter" }, h("hr", null), h("div", { class: "Paragraphs" }, h("p", { class: "ExistingLimit" }, translate('LugasSetLimitDialogExistingLimit.text', this.lang), h("span", { class: this.isUseExistingLimitOptionActive ? 'Link' : 'Link Inactive', onClick: () => this.postPlayerSituation(this.amount, true) }, translate('LugasSetLimitDialogExistingLimit.link', this.lang))), h("p", { class: "PrivacyNote" }, translate('LugasSetLimitDialogPrivacyNote.text', this.lang), h("span", { class: "Link", onClick: this.goToPrivacyPolicy }, translate('LugasSetLimitDialogPrivacyNote.link', this.lang)))))))));
267
247
  }
268
248
  static get is() { return "player-lugas-limit"; }
269
249
  static get encapsulation() { return "shadow"; }
@@ -291,10 +271,10 @@ export class PlayerLugasLimit {
291
271
  "optional": false,
292
272
  "docs": {
293
273
  "tags": [],
294
- "text": "User identifier"
274
+ "text": ""
295
275
  },
296
276
  "attribute": "user-id",
297
- "reflect": false,
277
+ "reflect": true,
298
278
  "defaultValue": "''"
299
279
  },
300
280
  "session": {
@@ -309,10 +289,10 @@ export class PlayerLugasLimit {
309
289
  "optional": false,
310
290
  "docs": {
311
291
  "tags": [],
312
- "text": "Session ID for the user"
292
+ "text": ""
313
293
  },
314
294
  "attribute": "session",
315
- "reflect": false,
295
+ "reflect": true,
316
296
  "defaultValue": "''"
317
297
  },
318
298
  "endpoint": {
@@ -327,10 +307,10 @@ export class PlayerLugasLimit {
327
307
  "optional": false,
328
308
  "docs": {
329
309
  "tags": [],
330
- "text": "Endpoint URL for the API"
310
+ "text": ""
331
311
  },
332
312
  "attribute": "endpoint",
333
- "reflect": false,
313
+ "reflect": true,
334
314
  "defaultValue": "''"
335
315
  },
336
316
  "currency": {
@@ -345,12 +325,30 @@ export class PlayerLugasLimit {
345
325
  "optional": false,
346
326
  "docs": {
347
327
  "tags": [],
348
- "text": "Currency of the player"
328
+ "text": ""
349
329
  },
350
330
  "attribute": "currency",
351
- "reflect": false,
331
+ "reflect": true,
352
332
  "defaultValue": "'EUR'"
353
333
  },
334
+ "flow": {
335
+ "type": "string",
336
+ "mutable": false,
337
+ "complexType": {
338
+ "original": "string",
339
+ "resolved": "string",
340
+ "references": {}
341
+ },
342
+ "required": false,
343
+ "optional": false,
344
+ "docs": {
345
+ "tags": [],
346
+ "text": ""
347
+ },
348
+ "attribute": "flow",
349
+ "reflect": true,
350
+ "defaultValue": "''"
351
+ },
354
352
  "amount": {
355
353
  "type": "string",
356
354
  "mutable": false,
@@ -363,10 +361,10 @@ export class PlayerLugasLimit {
363
361
  "optional": false,
364
362
  "docs": {
365
363
  "tags": [],
366
- "text": "The amount"
364
+ "text": ""
367
365
  },
368
366
  "attribute": "amount",
369
- "reflect": false,
367
+ "reflect": true,
370
368
  "defaultValue": "''"
371
369
  },
372
370
  "lang": {
@@ -381,10 +379,10 @@ export class PlayerLugasLimit {
381
379
  "optional": false,
382
380
  "docs": {
383
381
  "tags": [],
384
- "text": "Language for translations"
382
+ "text": ""
385
383
  },
386
384
  "attribute": "lang",
387
- "reflect": false
385
+ "reflect": true
388
386
  },
389
387
  "clientStyling": {
390
388
  "type": "string",
@@ -398,10 +396,10 @@ export class PlayerLugasLimit {
398
396
  "optional": false,
399
397
  "docs": {
400
398
  "tags": [],
401
- "text": "Custom client styling as inline CSS"
399
+ "text": ""
402
400
  },
403
401
  "attribute": "client-styling",
404
- "reflect": false,
402
+ "reflect": true,
405
403
  "defaultValue": "''"
406
404
  },
407
405
  "clientStylingUrl": {
@@ -416,10 +414,10 @@ export class PlayerLugasLimit {
416
414
  "optional": false,
417
415
  "docs": {
418
416
  "tags": [],
419
- "text": "URL for fetching client-specific styling"
417
+ "text": ""
420
418
  },
421
419
  "attribute": "client-styling-url",
422
- "reflect": false,
420
+ "reflect": true,
423
421
  "defaultValue": "''"
424
422
  },
425
423
  "mbSource": {
@@ -434,10 +432,10 @@ export class PlayerLugasLimit {
434
432
  "optional": false,
435
433
  "docs": {
436
434
  "tags": [],
437
- "text": "Client custom styling via streamStyling"
435
+ "text": ""
438
436
  },
439
437
  "attribute": "mb-source",
440
- "reflect": false
438
+ "reflect": true
441
439
  },
442
440
  "translationUrl": {
443
441
  "type": "string",
@@ -451,18 +449,20 @@ export class PlayerLugasLimit {
451
449
  "optional": false,
452
450
  "docs": {
453
451
  "tags": [],
454
- "text": "URL for fetching translation strings"
452
+ "text": ""
455
453
  },
456
454
  "attribute": "translation-url",
457
- "reflect": false,
455
+ "reflect": true,
458
456
  "defaultValue": "''"
459
457
  }
460
458
  };
461
459
  }
462
460
  static get states() {
463
461
  return {
462
+ "hasValidation": {},
463
+ "kycStep": {},
464
464
  "isLoading": {},
465
- "showCustomAmount": {},
465
+ "regularDepositLimitAmount": {},
466
466
  "isSubmitted": {},
467
467
  "isUseExistingLimitOptionActive": {},
468
468
  "selectedPredefinedAmount": {},
@@ -470,23 +470,39 @@ export class PlayerLugasLimit {
470
470
  "errorMessageOnSubmit": {},
471
471
  "errorMessageOnInput": {},
472
472
  "hasLugasError": {},
473
+ "showCustomAmount": {},
473
474
  "newAmount": {}
474
475
  };
475
476
  }
476
477
  static get events() {
477
478
  return [{
478
- "method": "closeLugasModal",
479
- "name": "closeLugasModal",
479
+ "method": "uploadDocuments",
480
+ "name": "uploadDocuments",
481
+ "bubbles": true,
482
+ "cancelable": true,
483
+ "composed": true,
484
+ "docs": {
485
+ "tags": [],
486
+ "text": ""
487
+ },
488
+ "complexType": {
489
+ "original": "any",
490
+ "resolved": "any",
491
+ "references": {}
492
+ }
493
+ }, {
494
+ "method": "closePopup",
495
+ "name": "closePopup",
480
496
  "bubbles": true,
481
497
  "cancelable": true,
482
498
  "composed": true,
483
499
  "docs": {
484
500
  "tags": [],
485
- "text": "Event to emit for closing the popup"
501
+ "text": ""
486
502
  },
487
503
  "complexType": {
488
- "original": "object",
489
- "resolved": "object",
504
+ "original": "any",
505
+ "resolved": "any",
490
506
  "references": {}
491
507
  }
492
508
  }];
@@ -19,12 +19,20 @@ let TRANSLATIONS = {
19
19
  LugasNotSet: 'No deposit limit set. Please enter a new limit.',
20
20
  loading: 'Loading, please wait ...',
21
21
  error: 'It was an error while trying to fetch the data',
22
- LugasF1002Error: 'We were unable to set your cross-provider deposit limit at LUGAS due to a technical error. Please <a href="https://here-will-be-the-support-link/">contact our support team</a> and provide error code F1002. We\'ll be happy to assist you in resolving this issue.'
22
+ kyc1: 'All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.',
23
+ kyc2: 'We were able to set your monthly deposit limit to <b>{amount} {currency}</b>. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.',
24
+ kyc3: 'We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.',
25
+ kycThanks: 'Thank you!',
26
+ kycSure: 'Are you sure?',
27
+ setNewLimit: 'SET NEW LIMIT',
28
+ keepExistingLimit: 'KEEP EXISTING LIMIT',
29
+ Close: 'CLOSE',
30
+ UploadDocuments: 'UPLOAD DOCUMENTS',
23
31
  },
24
32
  de: {
25
33
  LugasSetLimitDialogTitle: 'Monatliches zentrales Einzahlungslimit',
26
34
  LugasInfoBox: 'Das zentrale Limit ist Ihr monatliches Einzahlungslimit für alle lizenzierten Websites in Deutschland. Beachten Sie, dass sich Ihr Limit und der verbleibende Betrag ändern können, wenn Sie auf anderen Websites Einzahlungen vornehmen oder Ihr Limit anpassen.',
27
- ChooseLimit: 'Limit wählen',
35
+ ChooseLimit: 'Choose Limit',
28
36
  ButtonCustomValue: 'Eigener',
29
37
  ButtonMax: 'Max',
30
38
  LugasSetLimitDialogButtonSetLimit: 'LIMIT SETZEN {amount} {currency}',
@@ -38,9 +46,17 @@ let TRANSLATIONS = {
38
46
  link: 'klicken Sie hier',
39
47
  },
40
48
  LugasNotSet: 'Kein Einzahlungslimit festgelegt. Bitte geben Sie ein neues Limit ein.',
41
- loading: 'Laden, bitte warten ...',
42
- error: 'Beim Versuch, die Daten abzurufen, ist ein Fehler aufgetreten',
43
- LugasF1002Error: 'Ihr anbieterübergreifendes Einzahlungslimit konnte aufgrund eines technischen Fehlers nicht in der LUGAS-Datenbank festgelegt werden. Bitte <a href="https://here-will-be-the-support-link/">wenden Sie sich an unseren Kundenservice</a> unter Angabe des Fehlercodes F1002. Wir helfen Ihnen dann gerne weiter.'
49
+ loading: "Lade, bitte warten ...",
50
+ error: "Beim Laden der Daten ist ein Fehler aufgetreten.",
51
+ kyc1: "Alle Änderungen des Einzahlungslimits müssen gemäß den gesetzlichen Anforderungen an LUGAS gemeldet werden. Bitte beachten Sie, dass eine Senkung des Limits sofort wirksam wird, während eine Erhöhung spätestens nach 8 Tagen in Kraft tritt.",
52
+ kyc2: "Wir konnten Ihr monatliches Einzahlungslimit auf <b>{amount} {currency}</b> festlegen. Für das gewählte Limit benötigen wir Nachweise über Ihre wirtschaftliche Leistungsfähigkeit. Bitte laden Sie Ihre letzte Gehaltsabrechnung sowie einen aktuellen Kontoauszug, einschließlich Kontostand, hoch, der den Zahlungseingang bestätigt.",
53
+ kyc3: "Wir haben Ihr gewünschtes Limit an LUGAS übermittelt. Bitte beachten Sie, dass das Limit spätestens nach 8 Tagen in Kraft tritt.",
54
+ kycThanks: "Vielen Dank!",
55
+ kycSure: "Sind Sie sicher?",
56
+ setNewLimit: "NEUES LIMIT FESTLEGEN",
57
+ keepExistingLimit: "AKTUELLES LIMIT BEIBEHALTEN",
58
+ Close: "SCHLIESSEN",
59
+ UploadDocuments: "DOKUMENTE HOCHLADEN"
44
60
  },
45
61
  };
46
62
  export const getTranslations = (url) => {