@everymatrix/player-account-controller 1.66.1 → 1.67.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/components/{PlayerAccountController-CKNGbCDA.js → PlayerAccountController-BiEmKUTq.js} +90 -90
- package/components/PlayerAccountController-DET7Ledm.cjs +1 -0
- package/components/{PlayerAccountController-B61GC4da.js → PlayerAccountController-Df3HJNfF.js} +83 -83
- package/components/{PlayerAccountSelfExclusion-eVbVBZeH.js → PlayerAccountSelfExclusion-Bme3jA4c.js} +1 -0
- package/components/{PlayerAccountSelfExclusion-tbEoY1fJ.cjs → PlayerAccountSelfExclusion-CDEu24ob.cjs} +131 -131
- package/components/{PlayerAccountSelfExclusion-Dkhb_rb2.js → PlayerAccountSelfExclusion-CcQBa7WB.js} +1 -0
- package/components/{PlayerAccountTimeout-CgPnhFC2.js → PlayerAccountTimeout-9R54hZUl.js} +1 -1
- package/components/{PlayerAccountTimeout-B7te1qrD.cjs → PlayerAccountTimeout-BG_yWya9.cjs} +1 -1
- package/components/{PlayerAccountTimeout-BF6i8Aq1.js → PlayerAccountTimeout-CpDdajvl.js} +1 -1
- package/components/{PlayerAccountTransactionsHistory-_Sm0nfWr.cjs → PlayerAccountTransactionsHistory-BzB7rnla.cjs} +265 -265
- package/components/{PlayerAccountTransactionsHistory-DtHWhYf2.js → PlayerAccountTransactionsHistory-CRucfQT9.js} +1932 -1867
- package/components/{PlayerAccountTransactionsHistory-sQOFDhsn.js → PlayerAccountTransactionsHistory-D5xVdr5D.js} +1648 -1633
- package/components/{PlayerBonusHistory-B7mav-9J.js → PlayerBonusHistory-BQAF4bSM.js} +1 -1
- package/components/{PlayerBonusHistory-CIDfTu9W.cjs → PlayerBonusHistory-BfctVq0u.cjs} +1 -1
- package/components/{PlayerBonusHistory-ClKYGr0v.js → PlayerBonusHistory-wRNMiwgX.js} +1 -1
- package/components/{PlayerGamingHistory-C00k3Mj3.js → PlayerGamingHistory-BhmBAAFp.js} +1 -1
- package/components/{PlayerGamingHistory-Cqze0dx8.cjs → PlayerGamingHistory-Du5updfI.cjs} +1 -1
- package/components/{PlayerGamingHistory-CWN1CL1Y.js → PlayerGamingHistory-lkyuXLIU.js} +1 -1
- package/es2015/player-account-controller.cjs +1 -1
- package/es2015/player-account-controller.js +1 -1
- package/esnext/player-account-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/{general-input-6HMiojaV.js → checkbox-group-input_14-BcBdDpf8.js} +7654 -3097
- package/stencil/{general-input-DGu8X142.js → checkbox-group-input_14-CJHYJs5Y.js} +7664 -3107
- package/stencil/checkbox-group-input_14-CNR6zkvw.cjs +5901 -0
- package/stencil/{index-9cd44522--OAp7ePk.js → index-13661b98-Bg3nkDqk.js} +88 -103
- package/stencil/index-13661b98-D16qyHKo.cjs +1 -0
- package/stencil/{index-9cd44522-C0ycW8_E.js → index-13661b98-DcT9swce.js} +84 -99
- package/stencil/pam-change-password-YhGkcb7G.js +25 -0
- package/stencil/{player-change-password-gm2-5cb5c6c1-Bi9IbxQV.js → pam-change-password-f4a1e7e7-CfVbvq6Y.js} +223 -74
- package/stencil/pam-change-password-f4a1e7e7-DtMPJ715.cjs +125 -0
- package/stencil/{player-change-password-gm2-5cb5c6c1-Bu5Dac83.js → pam-change-password-f4a1e7e7-e1XqJgP9.js} +223 -74
- package/stencil/pam-change-password-sLrzK4Qt.js +7 -0
- package/stencil/pam-change-password-uD3esedo.cjs +1 -0
- package/components/PlayerAccountController-B6D07zjj.cjs +0 -1
- package/stencil/checkbox-group-input_9-BVBeSmHl.js +0 -3895
- package/stencil/checkbox-group-input_9-CixpoaRc.cjs +0 -2
- package/stencil/checkbox-group-input_9-Ckf5IThK.js +0 -3895
- package/stencil/general-input-C54NeVAb.cjs +0 -5636
- package/stencil/index-9cd44522-CqgRbQOU.cjs +0 -1
- package/stencil/locale-CB060R77.cjs +0 -1
- package/stencil/locale-Cxpe53Ym.js +0 -153
- package/stencil/password-input_2-BWxS0D5h.js +0 -313
- package/stencil/password-input_2-Bz7EgS5w.cjs +0 -193
- package/stencil/password-input_2-KI96oR82.js +0 -313
- package/stencil/player-change-password-gm2-5cb5c6c1-B561Hszb.cjs +0 -1
- package/stencil/player-change-password-gm2-BRh6ZaCn.js +0 -25
- package/stencil/player-change-password-gm2-COxZYE4t.cjs +0 -1
- package/stencil/player-change-password-gm2-tu3usKOk.js +0 -7
- package/stencil/toggle-checkbox-input-BQz8G4GG.cjs +0 -1
- package/stencil/toggle-checkbox-input-Bhz93bXQ.js +0 -68
- package/stencil/toggle-checkbox-input-lRQooUAB.js +0 -68
- package/stencil/tooltipIcon-ee9760a8-BCCb4EU-.js +0 -4
- package/stencil/tooltipIcon-ee9760a8-Bd9l1O5C.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
const
|
|
1
|
+
import { r as p, h as e } from "./index-13661b98-Bg3nkDqk.js";
|
|
2
|
+
const w = "en", h = {
|
|
3
3
|
en: {
|
|
4
4
|
title: "Change Password",
|
|
5
5
|
btnSubmit: "Change Password",
|
|
@@ -112,152 +112,301 @@ const p = "en", h = {
|
|
|
112
112
|
"gm.pms.password_not_verified_unauthorized": "A megadott jelenlegi jelszó helytelen",
|
|
113
113
|
"gm.pms.password_policy_failed": "A jelszó nem egyezhet meg az utolsó {forbiddenLastPasswordsCount} jelszóval. A jelszó nem változtatható meg {minimumPasswordAgeLimitHours} {hours}-on belül az utolsó módosítás óta."
|
|
114
114
|
}
|
|
115
|
-
}, g = (
|
|
116
|
-
fetch(
|
|
117
|
-
Object.keys(a).forEach((
|
|
118
|
-
for (let
|
|
119
|
-
h[
|
|
120
|
-
}),
|
|
115
|
+
}, g = (s) => new Promise((t) => {
|
|
116
|
+
fetch(s).then((a) => a.json()).then((a) => {
|
|
117
|
+
Object.keys(a).forEach((n) => {
|
|
118
|
+
for (let i in a[n])
|
|
119
|
+
h[n][i] = a[n][i];
|
|
120
|
+
}), t(!0);
|
|
121
121
|
});
|
|
122
|
-
}),
|
|
123
|
-
const
|
|
124
|
-
let
|
|
122
|
+
}), r = (s, t, a) => {
|
|
123
|
+
const n = t;
|
|
124
|
+
let i = h[n !== void 0 ? n : w][s];
|
|
125
125
|
if (a !== void 0)
|
|
126
|
-
for (const [l,
|
|
126
|
+
for (const [l, o] of Object.entries(a.values)) {
|
|
127
127
|
const m = new RegExp(`{${l}}`, "g");
|
|
128
|
-
|
|
128
|
+
i = i.replace(m, o);
|
|
129
129
|
}
|
|
130
|
-
return
|
|
130
|
+
return i;
|
|
131
131
|
};
|
|
132
132
|
function d() {
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
133
|
+
const s = navigator.userAgent.toLowerCase(), t = screen.availWidth, a = screen.availHeight;
|
|
134
|
+
if (s.includes("iphone"))
|
|
135
135
|
return "mobile";
|
|
136
|
-
if (
|
|
137
|
-
if (a >
|
|
136
|
+
if (s.includes("android")) {
|
|
137
|
+
if (a > t && t < 800)
|
|
138
138
|
return "mobile";
|
|
139
|
-
if (
|
|
139
|
+
if (t > a && a < 800)
|
|
140
140
|
return "tablet";
|
|
141
141
|
}
|
|
142
142
|
return "desktop";
|
|
143
143
|
}
|
|
144
|
-
function c(
|
|
145
|
-
if (
|
|
144
|
+
function c(s, t) {
|
|
145
|
+
if (s) {
|
|
146
146
|
const a = document.createElement("style");
|
|
147
|
-
a.innerHTML =
|
|
147
|
+
a.innerHTML = t, s.appendChild(a);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
function u(
|
|
151
|
-
const a = new URL(
|
|
152
|
-
fetch(a.href).then((
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
}).catch((
|
|
156
|
-
console.error("There was an error while trying to load client styling from URL",
|
|
150
|
+
function u(s, t) {
|
|
151
|
+
const a = new URL(t);
|
|
152
|
+
fetch(a.href).then((n) => n.text()).then((n) => {
|
|
153
|
+
const i = document.createElement("style");
|
|
154
|
+
i.innerHTML = n, s && s.appendChild(i);
|
|
155
|
+
}).catch((n) => {
|
|
156
|
+
console.error("There was an error while trying to load client styling from URL", n);
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function P(s, t, a) {
|
|
160
160
|
if (window.emMessageBus) {
|
|
161
|
-
const
|
|
162
|
-
window.emMessageBus.subscribe(
|
|
163
|
-
|
|
161
|
+
const n = document.createElement("style");
|
|
162
|
+
window.emMessageBus.subscribe(t, (i) => {
|
|
163
|
+
n.innerHTML = i, s && s.appendChild(n);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
const f = `:host {
|
|
168
|
+
display: block;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.PlayerChangePassword {
|
|
172
|
+
font-family: inherit;
|
|
173
|
+
width: 100%;
|
|
174
|
+
height: 100%;
|
|
175
|
+
container-type: inline-size;
|
|
176
|
+
opacity: 1;
|
|
177
|
+
animation-name: fadeIn;
|
|
178
|
+
animation-iteration-count: 1;
|
|
179
|
+
animation-timing-function: ease-in;
|
|
180
|
+
animation-duration: 0.3s;
|
|
181
|
+
container-type: inline-size;
|
|
182
|
+
}
|
|
183
|
+
.PlayerChangePassword .Wrapper {
|
|
184
|
+
display: flex;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
align-items: center;
|
|
187
|
+
}
|
|
188
|
+
.PlayerChangePassword .Title {
|
|
189
|
+
background-color: transparent;
|
|
190
|
+
font-size: var(--emw--font-size-x-large, 26px);
|
|
191
|
+
color: var(--emw--color-primary, #22B04E);
|
|
192
|
+
font-weight: var(--emw--font-weight-semibold, 500);
|
|
193
|
+
}
|
|
194
|
+
.PlayerChangePassword .TitleMobile {
|
|
195
|
+
font-size: var(--emw--font-size-x-large, 20px);
|
|
196
|
+
color: var(--emw--color-primary, #22B04E);
|
|
197
|
+
}
|
|
198
|
+
.PlayerChangePassword svg {
|
|
199
|
+
fill: var(--emw--color-primary, #22B04E);
|
|
200
|
+
}
|
|
201
|
+
.PlayerChangePassword .ButtonReturn {
|
|
202
|
+
display: none;
|
|
203
|
+
font-family: inherit;
|
|
204
|
+
align-items: center;
|
|
205
|
+
gap: 10px;
|
|
206
|
+
}
|
|
207
|
+
.PlayerChangePassword .Form {
|
|
208
|
+
display: grid;
|
|
209
|
+
grid-template-columns: repeat(1, 1fr);
|
|
210
|
+
gap: 40px;
|
|
211
|
+
justify-items: stretch;
|
|
212
|
+
align-content: flex-start;
|
|
213
|
+
overflow: auto;
|
|
214
|
+
width: 100%;
|
|
215
|
+
height: 100%;
|
|
216
|
+
}
|
|
217
|
+
.PlayerChangePassword .Form .FieldsSection {
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
gap: 30px;
|
|
221
|
+
}
|
|
222
|
+
.PlayerChangePassword .Form .ButtonsSection {
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
justify-content: space-around;
|
|
226
|
+
align-items: center;
|
|
227
|
+
position: relative;
|
|
228
|
+
}
|
|
229
|
+
.PlayerChangePassword .Button {
|
|
230
|
+
font-family: inherit;
|
|
231
|
+
border-radius: var(--emw--button-border-radius, var(--emw--border-radius-large, 50px));
|
|
232
|
+
background: var(--emw--button-background-color, var(--emw--color-primary, #22B04E));
|
|
233
|
+
border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #22B04E));
|
|
234
|
+
color: var(--emw--button-text-color, var(--emw--color-white, #FFFFFF));
|
|
235
|
+
font-size: var(--emw--font-size-large, 20px);
|
|
236
|
+
font-weight: var(--emw--font-weight-normal, 400);
|
|
237
|
+
height: 50px;
|
|
238
|
+
width: 100%;
|
|
239
|
+
text-transform: uppercase;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
}
|
|
242
|
+
.PlayerChangePassword .Button:disabled {
|
|
243
|
+
background: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
244
|
+
border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #828282));
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
cursor: not-allowed;
|
|
247
|
+
}
|
|
248
|
+
.PlayerChangePassword.skeleton .Form .ButtonReturn {
|
|
249
|
+
width: 150px;
|
|
250
|
+
height: 30px;
|
|
251
|
+
margin-top: 15px;
|
|
252
|
+
display: block;
|
|
253
|
+
}
|
|
254
|
+
.PlayerChangePassword.skeleton .Form .FieldsSection {
|
|
255
|
+
display: block;
|
|
256
|
+
}
|
|
257
|
+
.PlayerChangePassword.skeleton .Form .FieldsSection .FieldContainer .FieldTitle {
|
|
258
|
+
width: 100px;
|
|
259
|
+
margin-top: 30px;
|
|
260
|
+
margin-bottom: 15px;
|
|
261
|
+
}
|
|
262
|
+
.PlayerChangePassword.skeleton .Form .ButtonsSection .Button {
|
|
263
|
+
font-family: inherit;
|
|
264
|
+
border-radius: 50px;
|
|
265
|
+
background: transparent;
|
|
266
|
+
border: none;
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
}
|
|
269
|
+
@container (max-width: 425px) {
|
|
270
|
+
.PlayerChangePassword .Form .ButtonReturn {
|
|
271
|
+
display: inline-flex;
|
|
272
|
+
}
|
|
273
|
+
.PlayerChangePassword .Form .Title {
|
|
274
|
+
display: none;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@keyframes fadeIn {
|
|
279
|
+
0% {
|
|
280
|
+
opacity: 0.01;
|
|
281
|
+
}
|
|
282
|
+
1% {
|
|
283
|
+
opacity: 0;
|
|
284
|
+
}
|
|
285
|
+
50% {
|
|
286
|
+
opacity: 0;
|
|
287
|
+
}
|
|
288
|
+
100% {
|
|
289
|
+
opacity: 1;
|
|
290
|
+
}
|
|
291
|
+
}`, y = f, b = class {
|
|
292
|
+
constructor(s) {
|
|
293
|
+
p(this, s), this.currentPasswordValue = "", this.newPasswordValue = "", this.confirmPasswordValue = "", this.isCurrentPasswordValid = !1, this.isNewPasswordValid = !1, this.isConfirmPasswordValid = !1, this.errorMsg = "", this.currentPasswordValidationSchema = { mandatory: !0, custom: [] }, this.newPasswordValidationSchema = { mandatory: !0, custom: [] }, this.confirmPasswordValidationSchema = { mandatory: !0, custom: [] }, this.initValidationSchemas = () => {
|
|
294
|
+
this.confirmPasswordValidationSchema = {
|
|
295
|
+
mandatory: !0,
|
|
296
|
+
maxLength: this.policy.maximumPasswordLength,
|
|
297
|
+
minLength: this.policy.minimumPasswordLength,
|
|
298
|
+
custom: [
|
|
299
|
+
this.policy.customValidationRules.find((t) => t.rule === "duplicate-input")
|
|
300
|
+
]
|
|
301
|
+
}, this.newPasswordValidationSchema = {
|
|
302
|
+
mandatory: !0,
|
|
303
|
+
maxLength: this.policy.maximumPasswordLength,
|
|
304
|
+
minLength: this.policy.minimumPasswordLength,
|
|
305
|
+
custom: this.policy.customValidationRules
|
|
306
|
+
}, this.currentPasswordValidationSchema = {
|
|
307
|
+
mandatory: !0,
|
|
308
|
+
maxLength: this.policy.maximumPasswordLength,
|
|
309
|
+
minLength: this.policy.minimumPasswordLength,
|
|
310
|
+
custom: this.policy.customValidationRules
|
|
311
|
+
};
|
|
312
|
+
}, this.setErrorMsg = (t) => {
|
|
313
|
+
switch (t) {
|
|
173
314
|
case "gm.pms.password_policy_failed":
|
|
174
315
|
const a = {
|
|
175
316
|
forbiddenLastPasswordsCount: this.policy.forbiddenLastPasswordsCount,
|
|
176
317
|
minimumPasswordAgeLimitHours: this.policy.minimumPasswordAgeLimitHours,
|
|
177
318
|
hours: this.policy.minimumPasswordAgeLimitHours > 1 ? "hours" : "hour"
|
|
178
319
|
};
|
|
179
|
-
this.errorMsg =
|
|
320
|
+
this.errorMsg = r(t, this.language, { values: a });
|
|
180
321
|
break;
|
|
181
322
|
case "gm.pms.password_not_verified_unauthorized":
|
|
182
|
-
this.errorMsg =
|
|
323
|
+
this.errorMsg = r(t, this.language);
|
|
183
324
|
break;
|
|
184
325
|
default:
|
|
185
|
-
this.errorMsg =
|
|
326
|
+
this.errorMsg = r("errorMsgGeneric", this.language);
|
|
186
327
|
}
|
|
187
328
|
}, this.toggleScreen = () => {
|
|
188
329
|
window.postMessage({ type: "PlayerAccountMenuActive", isMobile: this.isMobile }, window.location.href);
|
|
189
330
|
}, this.getPolicy = () => {
|
|
190
|
-
const
|
|
191
|
-
a.append("Accept", "text/plain");
|
|
192
|
-
const
|
|
331
|
+
const t = new URL("/api/v1/players/password-management/password", this.endpoint), a = new Headers();
|
|
332
|
+
a.append("Accept", "text/plain"), a.append("Content-Type", "application/json-patch+json");
|
|
333
|
+
const n = {
|
|
193
334
|
method: "GET",
|
|
194
335
|
headers: a
|
|
195
336
|
};
|
|
196
|
-
fetch(
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
337
|
+
fetch(t.href, n).then((i) => i.status === 200 && i.json()).then((i) => {
|
|
338
|
+
this.policy = i, this.policy.customValidationRules.forEach((l) => {
|
|
339
|
+
l.rule = l.rule.toLowerCase(), l.rule === "duplicateinput" && (l.rule = "duplicate-input");
|
|
340
|
+
}), this.initValidationSchemas();
|
|
341
|
+
}).catch((i) => {
|
|
342
|
+
console.error(`${r("errorMsgGeneric", this.language)}:`, i), window.postMessage({ type: "WidgetNotification", data: { type: "error", message: r("errorMsgGeneric", this.language) } }, window.location.href);
|
|
343
|
+
}).finally(() => {
|
|
344
|
+
this.isSkeletonLoading = !1;
|
|
345
|
+
});
|
|
346
|
+
}, this.submitNewPassword = (t) => {
|
|
347
|
+
if (t.preventDefault(), this.isBtnSubmitEnabled) {
|
|
348
|
+
const a = new URL("/api/v1/players/password-management/password", this.endpoint), n = new Headers();
|
|
349
|
+
n.append("accept", "text/plain"), n.append("Content-Type", "application/json-patch+json");
|
|
350
|
+
const i = JSON.stringify({
|
|
202
351
|
token: this.forgotMode === "true" ? this.token : this.session,
|
|
203
352
|
oldPassword: this.currentPasswordValue,
|
|
204
353
|
newPassword: this.confirmPasswordValue
|
|
205
354
|
}), l = {
|
|
206
355
|
method: "PUT",
|
|
207
|
-
headers:
|
|
208
|
-
body:
|
|
356
|
+
headers: n,
|
|
357
|
+
body: i
|
|
209
358
|
};
|
|
210
|
-
fetch(a.href, l).then((
|
|
211
|
-
|
|
212
|
-
}).catch((
|
|
359
|
+
fetch(a.href, l).then((o) => o.json()).then((o) => {
|
|
360
|
+
o.errorCode === null && o.message === "pms.password.update.success" ? (window.postMessage({ type: "PasswordChangedSuccessfully" }), window.postMessage({ type: "WidgetNotification", data: { type: "success", message: r("successMsg", this.language) } }, window.location.href)) : (this.setErrorMsg(o.message), window.postMessage({ type: "WidgetNotification", data: { type: "error", message: this.errorMsg } }, window.location.href));
|
|
361
|
+
}).catch((o) => console.error(o));
|
|
213
362
|
}
|
|
214
|
-
}, this.language = "en", this.endpoint = "", this.session = "", this.token = "", this.forgotMode = "", this.clientStyling = "", this.clientStylingUrl = "", this.mbSource = void 0, this.translationUrl = "", this.isBtnSubmitEnabled = !1, this.isMobile = d() === "mobile" || d() === "tablet";
|
|
363
|
+
}, this.language = "en", this.endpoint = "", this.session = "", this.token = "", this.forgotMode = "", this.clientStyling = "", this.clientStylingUrl = "", this.mbSource = void 0, this.translationUrl = "", this.isBtnSubmitEnabled = !1, this.isSkeletonLoading = !0, this.isMobile = d() === "mobile" || d() === "tablet";
|
|
215
364
|
}
|
|
216
|
-
handleClientStylingChange(
|
|
217
|
-
|
|
365
|
+
handleClientStylingChange(s, t) {
|
|
366
|
+
s != t && c(this.stylingContainer, this.clientStyling);
|
|
218
367
|
}
|
|
219
|
-
handleClientStylingUrlChange(
|
|
220
|
-
|
|
368
|
+
handleClientStylingUrlChange(s, t) {
|
|
369
|
+
s != t && this.clientStylingUrl && u(this.stylingContainer, this.clientStylingUrl);
|
|
221
370
|
}
|
|
222
|
-
sendValidityStateHandler(
|
|
223
|
-
switch (this.isBtnSubmitEnabled = !1,
|
|
371
|
+
sendValidityStateHandler(s) {
|
|
372
|
+
switch (this.isBtnSubmitEnabled = !1, s.detail.name) {
|
|
224
373
|
case "password":
|
|
225
|
-
this.isCurrentPasswordValid =
|
|
374
|
+
this.isCurrentPasswordValid = s.detail.valid;
|
|
226
375
|
break;
|
|
227
376
|
case "newPassword":
|
|
228
|
-
this.isNewPasswordValid =
|
|
377
|
+
this.isNewPasswordValid = s.detail.valid;
|
|
229
378
|
break;
|
|
230
379
|
case "newPasswordDuplicate":
|
|
231
|
-
this.isConfirmPasswordValid =
|
|
380
|
+
this.isConfirmPasswordValid = s.detail.valid;
|
|
232
381
|
break;
|
|
233
382
|
}
|
|
234
383
|
(this.forgotMode === "true" || this.isCurrentPasswordValid) && this.isNewPasswordValid && this.isConfirmPasswordValid && (this.isBtnSubmitEnabled = !0);
|
|
235
384
|
}
|
|
236
|
-
sendInputValueHandler(
|
|
237
|
-
switch (
|
|
385
|
+
sendInputValueHandler(s) {
|
|
386
|
+
switch (s.detail.name) {
|
|
238
387
|
case "password":
|
|
239
|
-
this.currentPasswordValue =
|
|
388
|
+
this.currentPasswordValue = s.detail.value;
|
|
240
389
|
break;
|
|
241
390
|
case "newPassword":
|
|
242
|
-
this.newPasswordValue =
|
|
391
|
+
this.newPasswordValue = s.detail.value;
|
|
243
392
|
break;
|
|
244
393
|
case "newPasswordDuplicate":
|
|
245
|
-
this.confirmPasswordValue =
|
|
394
|
+
this.confirmPasswordValue = s.detail.value;
|
|
246
395
|
break;
|
|
247
396
|
}
|
|
248
397
|
}
|
|
249
398
|
componentWillLoad() {
|
|
250
|
-
if (this.getPolicy(), this.
|
|
399
|
+
if (this.getPolicy(), this.translationUrl)
|
|
251
400
|
return g(this.translationUrl);
|
|
252
401
|
}
|
|
253
402
|
componentDidLoad() {
|
|
254
|
-
this.stylingContainer && (window.emMessageBus != null ?
|
|
403
|
+
this.stylingContainer && (window.emMessageBus != null ? P(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && c(this.stylingContainer, this.clientStyling), this.clientStylingUrl && u(this.stylingContainer, this.clientStylingUrl)));
|
|
255
404
|
}
|
|
256
405
|
disconnectedCallback() {
|
|
257
406
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
258
407
|
}
|
|
259
408
|
render() {
|
|
260
|
-
return
|
|
409
|
+
return this.isSkeletonLoading ? e("div", { class: "PlayerChangePassword skeleton" }, e("form", { class: "Form" }, e("div", { class: "ButtonReturn" }, e("ui-skeleton", { structure: "text", width: "auto", height: "30px" })), e("section", { class: "FieldsSection" }, e("div", { class: "FieldContainer" }, e("div", { class: "FieldTitle" }, e("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), e("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" })), e("div", { class: "FieldContainer" }, e("div", { class: "FieldTitle" }, e("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), e("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" })), e("div", { class: "FieldContainer" }, e("div", { class: "FieldTitle" }, e("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), e("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" }))), e("section", { class: "ButtonsSection" }, e("div", { class: "Button" }, e("ui-skeleton", { structure: "rectangle", width: "auto", height: "50px" }))))) : e("div", { class: "PlayerChangePassword", ref: (s) => this.stylingContainer = s }, e("form", { class: "Form" }, e("div", { class: "ButtonReturn", onClick: this.toggleScreen }, e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, e("g", { transform: "translate(-20 -158)" }, e("g", { transform: "translate(20 158)" }, e("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), e("h2", { class: "TitleMobile" }, r("title", this.language))), e("h2", { class: "Title" }, r("title", this.language)), e("section", { class: "FieldsSection" }, this.forgotMode === "false" && e("general-input", { type: "password", action: "input", name: "password", language: this.language, "display-name": r("passwordDisplayText", this.language), placeholder: r("passwordPlaceholderText", this.language), validation: this.currentPasswordValidationSchema, clientStyling: this.clientStyling, "mb-source": this.mbSource, "hide-password-complexity": !0 }), e("general-input", { type: "password", action: "input", name: "newPassword", language: this.language, "display-name": r("newPasswordDisplayText", this.language), placeholder: r("newPasswordPlaceholderText", this.language), validation: this.newPasswordValidationSchema, clientStyling: this.clientStyling, "mb-source": this.mbSource }), e("general-input", { type: "password", action: "input", name: "newPasswordDuplicate", language: this.language, "display-name": r("confirmPasswordDisplayText", this.language), placeholder: r("confirmPasswordPlaceholderText", this.language), validation: this.confirmPasswordValidationSchema, "is-duplicate-input": !0, clientStyling: this.clientStyling, "mb-source": this.mbSource })), e("section", { class: "ButtonsSection" }, e("button", { class: "Button", disabled: !this.isBtnSubmitEnabled, onClick: this.submitNewPassword }, r("btnSubmit", this.language)))));
|
|
261
410
|
}
|
|
262
411
|
static get watchers() {
|
|
263
412
|
return {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";const e=require("./index-13661b98-D16qyHKo.cjs"),w="en",h={en:{title:"Change Password",btnSubmit:"Change Password",passwordPlaceholderText:"Please enter your password",newPasswordPlaceholderText:"Please enter your new password",confirmPasswordPlaceholderText:"Please confirm your new password",passwordDisplayText:"Current Password",newPasswordDisplayText:"New Password",confirmPasswordDisplayText:"Confirm Password",successMsg:"Password changed successfully",errorMsgGeneric:"There was an error when attempting to change your password","gm.pms.password_not_verified_unauthorized":"The current password you have entered is incorrect","gm.pms.password_policy_failed":"Password cannot be the same as any of the {forbiddenLastPasswordsCount} previous passwords. Password cannot be changed sooner than {minimumPasswordAgeLimitHours} {hours} after the last change."},fr:{title:"Changer le mot de passe",btnSubmit:"Changer le mot de passe",passwordPlaceholderText:"Veuillez entrer votre mot de passe",newPasswordPlaceholderText:"Veuillez entrer votre nouveau mot de passe",confirmPasswordPlaceholderText:"Veuillez confirmer votre nouveau mot de passe",passwordDisplayText:"Mot de passe actuel",newPasswordDisplayText:"Nouveau mot de passe",confirmPasswordDisplayText:"Confirmer le mot de passe",successMsg:"Mot de passe changé avec succès",errorMsgGeneric:"Une erreur est survenue lors de la tentative de changement de mot de passe","gm.pms.password_not_verified_unauthorized":"Le mot de passe actuel que vous avez entré est incorrect","gm.pms.password_policy_failed":"Le mot de passe ne peut pas être identique à l'un des {forbiddenLastPasswordsCount} derniers mots de passe. Le mot de passe ne peut pas être changé avant {minimumPasswordAgeLimitHours} {hours} après le dernier changement."},ro:{title:"Schimbă Parola",btnSubmit:"Schimbă Parola",passwordPlaceholderText:"Vă rugăm să introduceți parola",newPasswordPlaceholderText:"Vă rugăm să introduceți noua parolă",confirmPasswordPlaceholderText:"Vă rugăm să confirmați noua parolă",passwordDisplayText:"Parolă Curentă",newPasswordDisplayText:"Parolă Nouă",confirmPasswordDisplayText:"Confirmă Parola",successMsg:"Parola a fost schimbată cu succes",errorMsgGeneric:"A apărut o eroare la încercarea de schimbare a parolei","gm.pms.password_not_verified_unauthorized":"Parola curentă introdusă este incorectă","gm.pms.password_policy_failed":"Parola nu poate fi aceeași cu oricare dintre ultimele {forbiddenLastPasswordsCount} parole. Parola nu poate fi schimbată mai devreme de {minimumPasswordAgeLimitHours} {hours} după ultima schimbare."},es:{title:"Cambiar Contraseña",btnSubmit:"Cambiar Contraseña",passwordPlaceholderText:"Por favor, introduce tu contraseña",newPasswordPlaceholderText:"Por favor, introduce tu nueva contraseña",confirmPasswordPlaceholderText:"Por favor, confirma tu nueva contraseña",passwordDisplayText:"Contraseña Actual",newPasswordDisplayText:"Nueva Contraseña",confirmPasswordDisplayText:"Confirmar Contraseña",successMsg:"Contraseña cambiada con éxito",errorMsgGeneric:"Hubo un error al intentar cambiar tu contraseña","gm.pms.password_not_verified_unauthorized":"La contraseña actual que has introducido es incorrecta","gm.pms.password_policy_failed":"La contraseña no puede ser la misma que cualquiera de las {forbiddenLastPasswordsCount} contraseñas anteriores. La contraseña no se puede cambiar antes de {minimumPasswordAgeLimitHours} {hours} después del último cambio."},pt:{title:"Alterar Senha",btnSubmit:"Alterar Senha",passwordPlaceholderText:"Por favor, insira sua senha",newPasswordPlaceholderText:"Por favor, insira sua nova senha",confirmPasswordPlaceholderText:"Por favor, confirme sua nova senha",passwordDisplayText:"Senha Atual",newPasswordDisplayText:"Nova Senha",confirmPasswordDisplayText:"Confirmar Senha",successMsg:"Senha alterada com sucesso",errorMsgGeneric:"Ocorreu um erro ao tentar alterar sua senha","gm.pms.password_not_verified_unauthorized":"A senha atual que você inseriu está incorreta","gm.pms.password_policy_failed":"A senha não pode ser a mesma que qualquer uma das últimas {forbiddenLastPasswordsCount} senhas. A senha não pode ser alterada antes de {minimumPasswordAgeLimitHours} {hours} após a última alteração."},hr:{title:"Promijeni lozinku",btnSubmit:"Promijeni lozinku",passwordPlaceholderText:"Unesite svoju lozinku",newPasswordPlaceholderText:"Unesite novu lozinku",confirmPasswordPlaceholderText:"Potvrdite novu lozinku",passwordDisplayText:"Trenutna lozinka",newPasswordDisplayText:"Nova lozinka",confirmPasswordDisplayText:"Potvrdite lozinku",successMsg:"Lozinka je uspješno promijenjena",errorMsgGeneric:"Došlo je do pogreške prilikom pokušaja promjene lozinke","gm.pms.password_not_verified_unauthorized":"Unesena trenutna lozinka nije ispravna","gm.pms.password_policy_failed":"Lozinka ne može biti ista kao bilo koja od posljednjih {forbiddenLastPasswordsCount} lozinki. Lozinka se ne može promijeniti prije nego što prođe {minimumPasswordAgeLimitHours} {hours} od posljednje promjene."},tr:{title:"Şifreyi Değiştir",btnSubmit:"Şifreyi Değiştir",passwordPlaceholderText:"Lütfen şifrenizi girin",newPasswordPlaceholderText:"Lütfen yeni şifrenizi girin",confirmPasswordPlaceholderText:"Lütfen yeni şifrenizi onaylayın",passwordDisplayText:"Mevcut Şifre",newPasswordDisplayText:"Yeni Şifre",confirmPasswordDisplayText:"Şifreyi Onaylayın",successMsg:"Şifre başarıyla değiştirildi",errorMsgGeneric:"Şifrenizi değiştirirken bir hata oluştu","gm.pms.password_not_verified_unauthorized":"Girdiğiniz mevcut şifre yanlış","gm.pms.password_policy_failed":"Şifre, son {forbiddenLastPasswordsCount} şifreden herhangi biriyle aynı olamaz. Şifre, son değişiklikten sonra {minimumPasswordAgeLimitHours} {hours} içinde değiştirilemez."},hu:{title:"Jelszó megváltoztatása",btnSubmit:"Jelszó megváltoztatása",passwordPlaceholderText:"Kérjük, adja meg a jelszavát",newPasswordPlaceholderText:"Kérjük, adja meg az új jelszavát",confirmPasswordPlaceholderText:"Kérjük, erősítse meg az új jelszavát",passwordDisplayText:"Jelenlegi jelszó",newPasswordDisplayText:"Új jelszó",confirmPasswordDisplayText:"Jelszó megerősítése",successMsg:"A jelszó sikeresen megváltozott",errorMsgGeneric:"Hiba történt a jelszó megváltoztatásakor","gm.pms.password_not_verified_unauthorized":"A megadott jelenlegi jelszó helytelen","gm.pms.password_policy_failed":"A jelszó nem egyezhet meg az utolsó {forbiddenLastPasswordsCount} jelszóval. A jelszó nem változtatható meg {minimumPasswordAgeLimitHours} {hours}-on belül az utolsó módosítás óta."}},g=s=>new Promise(t=>{fetch(s).then(a=>a.json()).then(a=>{Object.keys(a).forEach(n=>{for(let i in a[n])h[n][i]=a[n][i]}),t(!0)})}),r=(s,t,a)=>{const n=t;let i=h[n!==void 0?n:w][s];if(a!==void 0)for(const[l,o]of Object.entries(a.values)){const p=new RegExp(`{${l}}`,"g");i=i.replace(p,o)}return i};function d(){const s=navigator.userAgent.toLowerCase(),t=screen.availWidth,a=screen.availHeight;if(s.includes("iphone"))return"mobile";if(s.includes("android")){if(a>t&&t<800)return"mobile";if(t>a&&a<800)return"tablet"}return"desktop"}function c(s,t){if(s){const a=document.createElement("style");a.innerHTML=t,s.appendChild(a)}}function u(s,t){const a=new URL(t);fetch(a.href).then(n=>n.text()).then(n=>{const i=document.createElement("style");i.innerHTML=n,s&&s.appendChild(i)}).catch(n=>{console.error("There was an error while trying to load client styling from URL",n)})}function P(s,t,a){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,i=>{n.innerHTML=i,s&&s.appendChild(n)})}}const f=`:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.PlayerChangePassword {
|
|
6
|
+
font-family: inherit;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
container-type: inline-size;
|
|
10
|
+
opacity: 1;
|
|
11
|
+
animation-name: fadeIn;
|
|
12
|
+
animation-iteration-count: 1;
|
|
13
|
+
animation-timing-function: ease-in;
|
|
14
|
+
animation-duration: 0.3s;
|
|
15
|
+
container-type: inline-size;
|
|
16
|
+
}
|
|
17
|
+
.PlayerChangePassword .Wrapper {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
.PlayerChangePassword .Title {
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
font-size: var(--emw--font-size-x-large, 26px);
|
|
25
|
+
color: var(--emw--color-primary, #22B04E);
|
|
26
|
+
font-weight: var(--emw--font-weight-semibold, 500);
|
|
27
|
+
}
|
|
28
|
+
.PlayerChangePassword .TitleMobile {
|
|
29
|
+
font-size: var(--emw--font-size-x-large, 20px);
|
|
30
|
+
color: var(--emw--color-primary, #22B04E);
|
|
31
|
+
}
|
|
32
|
+
.PlayerChangePassword svg {
|
|
33
|
+
fill: var(--emw--color-primary, #22B04E);
|
|
34
|
+
}
|
|
35
|
+
.PlayerChangePassword .ButtonReturn {
|
|
36
|
+
display: none;
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 10px;
|
|
40
|
+
}
|
|
41
|
+
.PlayerChangePassword .Form {
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: repeat(1, 1fr);
|
|
44
|
+
gap: 40px;
|
|
45
|
+
justify-items: stretch;
|
|
46
|
+
align-content: flex-start;
|
|
47
|
+
overflow: auto;
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
}
|
|
51
|
+
.PlayerChangePassword .Form .FieldsSection {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: 30px;
|
|
55
|
+
}
|
|
56
|
+
.PlayerChangePassword .Form .ButtonsSection {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
justify-content: space-around;
|
|
60
|
+
align-items: center;
|
|
61
|
+
position: relative;
|
|
62
|
+
}
|
|
63
|
+
.PlayerChangePassword .Button {
|
|
64
|
+
font-family: inherit;
|
|
65
|
+
border-radius: var(--emw--button-border-radius, var(--emw--border-radius-large, 50px));
|
|
66
|
+
background: var(--emw--button-background-color, var(--emw--color-primary, #22B04E));
|
|
67
|
+
border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #22B04E));
|
|
68
|
+
color: var(--emw--button-text-color, var(--emw--color-white, #FFFFFF));
|
|
69
|
+
font-size: var(--emw--font-size-large, 20px);
|
|
70
|
+
font-weight: var(--emw--font-weight-normal, 400);
|
|
71
|
+
height: 50px;
|
|
72
|
+
width: 100%;
|
|
73
|
+
text-transform: uppercase;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
.PlayerChangePassword .Button:disabled {
|
|
77
|
+
background: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
78
|
+
border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #828282));
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
.PlayerChangePassword.skeleton .Form .ButtonReturn {
|
|
83
|
+
width: 150px;
|
|
84
|
+
height: 30px;
|
|
85
|
+
margin-top: 15px;
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
.PlayerChangePassword.skeleton .Form .FieldsSection {
|
|
89
|
+
display: block;
|
|
90
|
+
}
|
|
91
|
+
.PlayerChangePassword.skeleton .Form .FieldsSection .FieldContainer .FieldTitle {
|
|
92
|
+
width: 100px;
|
|
93
|
+
margin-top: 30px;
|
|
94
|
+
margin-bottom: 15px;
|
|
95
|
+
}
|
|
96
|
+
.PlayerChangePassword.skeleton .Form .ButtonsSection .Button {
|
|
97
|
+
font-family: inherit;
|
|
98
|
+
border-radius: 50px;
|
|
99
|
+
background: transparent;
|
|
100
|
+
border: none;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
}
|
|
103
|
+
@container (max-width: 425px) {
|
|
104
|
+
.PlayerChangePassword .Form .ButtonReturn {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
}
|
|
107
|
+
.PlayerChangePassword .Form .Title {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@keyframes fadeIn {
|
|
113
|
+
0% {
|
|
114
|
+
opacity: 0.01;
|
|
115
|
+
}
|
|
116
|
+
1% {
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
50% {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
}
|
|
122
|
+
100% {
|
|
123
|
+
opacity: 1;
|
|
124
|
+
}
|
|
125
|
+
}`,y=f,m=class{constructor(s){e.registerInstance(this,s),this.currentPasswordValue="",this.newPasswordValue="",this.confirmPasswordValue="",this.isCurrentPasswordValid=!1,this.isNewPasswordValid=!1,this.isConfirmPasswordValid=!1,this.errorMsg="",this.currentPasswordValidationSchema={mandatory:!0,custom:[]},this.newPasswordValidationSchema={mandatory:!0,custom:[]},this.confirmPasswordValidationSchema={mandatory:!0,custom:[]},this.initValidationSchemas=()=>{this.confirmPasswordValidationSchema={mandatory:!0,maxLength:this.policy.maximumPasswordLength,minLength:this.policy.minimumPasswordLength,custom:[this.policy.customValidationRules.find(t=>t.rule==="duplicate-input")]},this.newPasswordValidationSchema={mandatory:!0,maxLength:this.policy.maximumPasswordLength,minLength:this.policy.minimumPasswordLength,custom:this.policy.customValidationRules},this.currentPasswordValidationSchema={mandatory:!0,maxLength:this.policy.maximumPasswordLength,minLength:this.policy.minimumPasswordLength,custom:this.policy.customValidationRules}},this.setErrorMsg=t=>{switch(t){case"gm.pms.password_policy_failed":const a={forbiddenLastPasswordsCount:this.policy.forbiddenLastPasswordsCount,minimumPasswordAgeLimitHours:this.policy.minimumPasswordAgeLimitHours,hours:this.policy.minimumPasswordAgeLimitHours>1?"hours":"hour"};this.errorMsg=r(t,this.language,{values:a});break;case"gm.pms.password_not_verified_unauthorized":this.errorMsg=r(t,this.language);break;default:this.errorMsg=r("errorMsgGeneric",this.language)}},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.getPolicy=()=>{const t=new URL("/api/v1/players/password-management/password",this.endpoint),a=new Headers;a.append("Accept","text/plain"),a.append("Content-Type","application/json-patch+json");const n={method:"GET",headers:a};fetch(t.href,n).then(i=>i.status===200&&i.json()).then(i=>{this.policy=i,this.policy.customValidationRules.forEach(l=>{l.rule=l.rule.toLowerCase(),l.rule==="duplicateinput"&&(l.rule="duplicate-input")}),this.initValidationSchemas()}).catch(i=>{console.error(`${r("errorMsgGeneric",this.language)}:`,i),window.postMessage({type:"WidgetNotification",data:{type:"error",message:r("errorMsgGeneric",this.language)}},window.location.href)}).finally(()=>{this.isSkeletonLoading=!1})},this.submitNewPassword=t=>{if(t.preventDefault(),this.isBtnSubmitEnabled){const a=new URL("/api/v1/players/password-management/password",this.endpoint),n=new Headers;n.append("accept","text/plain"),n.append("Content-Type","application/json-patch+json");const i=JSON.stringify({token:this.forgotMode==="true"?this.token:this.session,oldPassword:this.currentPasswordValue,newPassword:this.confirmPasswordValue}),l={method:"PUT",headers:n,body:i};fetch(a.href,l).then(o=>o.json()).then(o=>{o.errorCode===null&&o.message==="pms.password.update.success"?(window.postMessage({type:"PasswordChangedSuccessfully"}),window.postMessage({type:"WidgetNotification",data:{type:"success",message:r("successMsg",this.language)}},window.location.href)):(this.setErrorMsg(o.message),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMsg}},window.location.href))}).catch(o=>console.error(o))}},this.language="en",this.endpoint="",this.session="",this.token="",this.forgotMode="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.isBtnSubmitEnabled=!1,this.isSkeletonLoading=!0,this.isMobile=d()==="mobile"||d()==="tablet"}handleClientStylingChange(s,t){s!=t&&c(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(s,t){s!=t&&this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)}sendValidityStateHandler(s){switch(this.isBtnSubmitEnabled=!1,s.detail.name){case"password":this.isCurrentPasswordValid=s.detail.valid;break;case"newPassword":this.isNewPasswordValid=s.detail.valid;break;case"newPasswordDuplicate":this.isConfirmPasswordValid=s.detail.valid;break}(this.forgotMode==="true"||this.isCurrentPasswordValid)&&this.isNewPasswordValid&&this.isConfirmPasswordValid&&(this.isBtnSubmitEnabled=!0)}sendInputValueHandler(s){switch(s.detail.name){case"password":this.currentPasswordValue=s.detail.value;break;case"newPassword":this.newPasswordValue=s.detail.value;break;case"newPasswordDuplicate":this.confirmPasswordValue=s.detail.value;break}}componentWillLoad(){if(this.getPolicy(),this.translationUrl)return g(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?P(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&c(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return this.isSkeletonLoading?e.h("div",{class:"PlayerChangePassword skeleton"},e.h("form",{class:"Form"},e.h("div",{class:"ButtonReturn"},e.h("ui-skeleton",{structure:"text",width:"auto",height:"30px"})),e.h("section",{class:"FieldsSection"},e.h("div",{class:"FieldContainer"},e.h("div",{class:"FieldTitle"},e.h("ui-skeleton",{structure:"title",width:"auto",height:"10px"})),e.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"35px"})),e.h("div",{class:"FieldContainer"},e.h("div",{class:"FieldTitle"},e.h("ui-skeleton",{structure:"title",width:"auto",height:"10px"})),e.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"35px"})),e.h("div",{class:"FieldContainer"},e.h("div",{class:"FieldTitle"},e.h("ui-skeleton",{structure:"title",width:"auto",height:"10px"})),e.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"35px"}))),e.h("section",{class:"ButtonsSection"},e.h("div",{class:"Button"},e.h("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"}))))):e.h("div",{class:"PlayerChangePassword",ref:s=>this.stylingContainer=s},e.h("form",{class:"Form"},e.h("div",{class:"ButtonReturn",onClick:this.toggleScreen},e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},e.h("g",{transform:"translate(-20 -158)"},e.h("g",{transform:"translate(20 158)"},e.h("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),e.h("h2",{class:"TitleMobile"},r("title",this.language))),e.h("h2",{class:"Title"},r("title",this.language)),e.h("section",{class:"FieldsSection"},this.forgotMode==="false"&&e.h("general-input",{type:"password",action:"input",name:"password",language:this.language,"display-name":r("passwordDisplayText",this.language),placeholder:r("passwordPlaceholderText",this.language),validation:this.currentPasswordValidationSchema,clientStyling:this.clientStyling,"mb-source":this.mbSource,"hide-password-complexity":!0}),e.h("general-input",{type:"password",action:"input",name:"newPassword",language:this.language,"display-name":r("newPasswordDisplayText",this.language),placeholder:r("newPasswordPlaceholderText",this.language),validation:this.newPasswordValidationSchema,clientStyling:this.clientStyling,"mb-source":this.mbSource}),e.h("general-input",{type:"password",action:"input",name:"newPasswordDuplicate",language:this.language,"display-name":r("confirmPasswordDisplayText",this.language),placeholder:r("confirmPasswordPlaceholderText",this.language),validation:this.confirmPasswordValidationSchema,"is-duplicate-input":!0,clientStyling:this.clientStyling,"mb-source":this.mbSource})),e.h("section",{class:"ButtonsSection"},e.h("button",{class:"Button",disabled:!this.isBtnSubmitEnabled,onClick:this.submitNewPassword},r("btnSubmit",this.language)))))}static get watchers(){return{clientStyling:["handleClientStylingChange","handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};m.style=y;exports.PamChangePassword=m;
|