@everymatrix/pam-player-profile 0.11.0 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pam-player-profile-dc13914a.js → pam-player-profile-3185ce39.js} +50 -15
- package/dist/cjs/pam-player-profile.cjs.js +1 -1
- package/dist/cjs/pam-player-profile_2.cjs.entry.js +83 -75
- package/dist/collection/components/pam-player-profile/pam-player-profile.css +18 -0
- package/dist/collection/components/pam-player-profile/pam-player-profile.js +53 -15
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pam-player-profile-e280c440.js → pam-player-profile-2ba91a9a.js} +50 -15
- package/dist/esm/pam-player-profile.js +1 -1
- package/dist/esm/pam-player-profile_2.entry.js +83 -75
- package/dist/pam-player-profile/index.esm.js +1 -1
- package/dist/pam-player-profile/pam-player-profile-2ba91a9a.js +1 -0
- package/dist/pam-player-profile/pam-player-profile.esm.js +1 -1
- package/dist/pam-player-profile/pam-player-profile_2.entry.js +1 -1
- package/dist/types/components/pam-player-profile/pam-player-profile.d.ts +8 -0
- package/package.json +1 -1
- package/dist/pam-player-profile/pam-player-profile-e280c440.js +0 -1
|
@@ -275,7 +275,7 @@ var dayjs_min = {exports: {}};
|
|
|
275
275
|
|
|
276
276
|
const dayjs = dayjs_min.exports;
|
|
277
277
|
|
|
278
|
-
const pamPlayerProfileCss = ":host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.PamPlayerProfileWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamPlayerProfileWrapper .ReturnButton {\n display: none;\n}\n.PamPlayerProfileWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PamPlayerProfileWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PamPlayerProfileWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input:focus, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-within, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-visible, .PamPlayerProfileWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamPlayerProfileWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 50% 50%;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n height: 55px;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamPlayerProfileWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamPlayerProfileWrapper .HeaderText {\n display: none;\n }\n .PamPlayerProfileWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PamPlayerProfileWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PamPlayerProfileWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PamPlayerProfileWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PamPlayerProfileWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamPlayerProfileWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PamPlayerProfileWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PamPlayerProfileWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}";
|
|
278
|
+
const pamPlayerProfileCss = ":host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PamPlayerProfileWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamPlayerProfileWrapper .ReturnButton {\n display: none;\n}\n.PamPlayerProfileWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PamPlayerProfileWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PamPlayerProfileWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input:focus, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-within, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-visible, .PamPlayerProfileWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamPlayerProfileWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 50% 50%;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n height: 55px;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamPlayerProfileWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamPlayerProfileWrapper .HeaderText {\n display: none;\n }\n .PamPlayerProfileWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PamPlayerProfileWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PamPlayerProfileWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PamPlayerProfileWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PamPlayerProfileWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamPlayerProfileWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PamPlayerProfileWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PamPlayerProfileWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}";
|
|
279
279
|
const PamPlayerProfileStyle0 = pamPlayerProfileCss;
|
|
280
280
|
|
|
281
281
|
const PamPlayerProfile = class {
|
|
@@ -311,25 +311,53 @@ const PamPlayerProfile = class {
|
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
+
/**
|
|
315
|
+
* Promise for fetching the response and returning the response or the erorr message
|
|
316
|
+
* @param res - response from the API
|
|
317
|
+
*/
|
|
318
|
+
this.handleFetchResponse = async (res) => {
|
|
319
|
+
var _a;
|
|
320
|
+
if (res.status >= 300) {
|
|
321
|
+
this.isError = true;
|
|
322
|
+
let response = await res.json();
|
|
323
|
+
this.errorCode = (_a = response.thirdPartyResponse) === null || _a === void 0 ? void 0 : _a.errorCode;
|
|
324
|
+
this.errorMessage = this.errorCode ? translate(this.errorCode, this.lang) : translate('errorMessageFetch', this.lang);
|
|
325
|
+
window.postMessage({
|
|
326
|
+
type: 'WidgetNotification',
|
|
327
|
+
data: {
|
|
328
|
+
type: 'error',
|
|
329
|
+
message: this.errorMessage
|
|
330
|
+
}
|
|
331
|
+
}, window.location.href);
|
|
332
|
+
return Promise.reject(this.errorMessage);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
this.isError = false;
|
|
336
|
+
if (res.headers.get('content-type')) {
|
|
337
|
+
let response = await res.json();
|
|
338
|
+
return Promise.resolve(response);
|
|
339
|
+
}
|
|
340
|
+
return Promise.resolve();
|
|
341
|
+
}
|
|
342
|
+
};
|
|
314
343
|
this.getData = () => {
|
|
315
|
-
const url = new URL(
|
|
344
|
+
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`, this.endpoint);
|
|
316
345
|
const headers = new Headers();
|
|
317
346
|
headers.append('X-SessionID', this.session);
|
|
318
347
|
const options = {
|
|
319
348
|
method: 'GET',
|
|
320
349
|
headers: headers
|
|
321
350
|
};
|
|
322
|
-
return new Promise((resolve) => {
|
|
351
|
+
return new Promise((resolve, reject) => {
|
|
323
352
|
fetch(url.href, options)
|
|
324
|
-
.then(res =>
|
|
325
|
-
if (res.ok) {
|
|
326
|
-
return res.json();
|
|
327
|
-
}
|
|
328
|
-
this.sendErrorNotification('errorMessageFetch');
|
|
329
|
-
})
|
|
353
|
+
.then((res) => this.handleFetchResponse(res))
|
|
330
354
|
.then(res => {
|
|
331
355
|
this.data = res.player;
|
|
332
356
|
resolve();
|
|
357
|
+
})
|
|
358
|
+
.catch((error) => {
|
|
359
|
+
console.error(error);
|
|
360
|
+
reject(error);
|
|
333
361
|
});
|
|
334
362
|
});
|
|
335
363
|
};
|
|
@@ -372,7 +400,7 @@ const PamPlayerProfile = class {
|
|
|
372
400
|
this.updateData = (e) => {
|
|
373
401
|
if (e)
|
|
374
402
|
e.preventDefault();
|
|
375
|
-
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information
|
|
403
|
+
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`, this.endpoint);
|
|
376
404
|
const headers = new Headers();
|
|
377
405
|
headers.append('X-SessionId', this.session);
|
|
378
406
|
headers.append('Content-Type', 'application/problem+json; charset=utf-8');
|
|
@@ -384,12 +412,13 @@ const PamPlayerProfile = class {
|
|
|
384
412
|
body: JSON.stringify(this.data)
|
|
385
413
|
};
|
|
386
414
|
fetch(url, reqParams)
|
|
387
|
-
.then(res =>
|
|
388
|
-
|
|
389
|
-
return this.sendErrorNotification('errorMessageUpdate');
|
|
390
|
-
}
|
|
415
|
+
.then(res => this.handleFetchResponse(res))
|
|
416
|
+
.then(() => {
|
|
391
417
|
this.sendSuccessNotification();
|
|
392
418
|
this.getData().then(() => this.resetState());
|
|
419
|
+
})
|
|
420
|
+
.catch((error) => {
|
|
421
|
+
console.error(error);
|
|
393
422
|
});
|
|
394
423
|
};
|
|
395
424
|
this.updateSubmitButtonStatus = () => {
|
|
@@ -432,6 +461,9 @@ const PamPlayerProfile = class {
|
|
|
432
461
|
this.isSubmitButtonAvailable = false;
|
|
433
462
|
this.invalidFields = 0;
|
|
434
463
|
this.isMobile = isMobile(window.navigator.userAgent);
|
|
464
|
+
this.isError = false;
|
|
465
|
+
this.errorMessage = '';
|
|
466
|
+
this.errorCode = '';
|
|
435
467
|
}
|
|
436
468
|
handleStylingChange(newValue, oldValue) {
|
|
437
469
|
if (newValue !== oldValue)
|
|
@@ -492,7 +524,10 @@ const PamPlayerProfile = class {
|
|
|
492
524
|
this.isSubmitButtonAvailable = false;
|
|
493
525
|
}
|
|
494
526
|
render() {
|
|
495
|
-
|
|
527
|
+
if (!this.skeletonLoading && this.isError) {
|
|
528
|
+
return (h("div", { class: "errorContainer" }, h("p", { class: "errorMessage", innerHTML: this.errorMessage })));
|
|
529
|
+
}
|
|
530
|
+
return (h("div", { ref: el => this.stylingContainer = el }, this.skeletonLoading
|
|
496
531
|
? h("form", { class: "PamPlayerProfileWrapper skeleton" }, h("div", { class: "ReturnButton" }, h("ui-skeleton", { structure: "title", width: "auto", height: "30px" })), h("div", { class: "Section" }, h("section", { class: "SectionContent" }, [...Array(6).keys()].map(() => h("div", { class: "Field" }, h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "20px" }))), h("div", { class: "CompoundField" }, h("div", { class: "Field" }, h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "20px" })), h("div", { class: "Field" }, h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "20px" }))), h("div", { class: "Field" }, h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), h("ui-skeleton", { structure: "rectangle", width: "auto", height: "20px" })))), h("section", { class: "ButtonsArea" }, h("div", { class: "SaveButton" }, h("ui-skeleton", { structure: "rectangle", width: "auto", height: "50px" }))))
|
|
497
532
|
: h("form", { class: `PamPlayerProfileWrapper ${this.isMobile ? 'Mobile' : ''}` }, h("div", { class: "ReturnButton", onClick: this.toggleScreen }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, h("g", { transform: "translate(-20 -158)" }, h("g", { transform: "translate(20 158)" }, 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)" })))), h("h2", null, translate('title', this.lang))), h("h2", { class: "HeaderText" }, translate('title', this.lang)), h("div", { class: "Section" }, h("section", { class: "SectionContent" }, this.staticField(this.data.contacts.find(c => c.contatcType = 'Username').contactValue, 'username'), this.staticField(dayjs(this.data.personalInfo.birthDate).format(this.dobFormat), 'dateOfBirth'), this.staticField(this.data.personalInfo.firstName, 'firstName'), this.staticField(this.data.personalInfo.lastName, 'lastName'), this.editableField('playerInfo', 'SecurityQuestion', 'securityQuestion', 'securityQuestionError'), this.editableField('playerInfo', 'SecurityAnswer', 'securityAnswer', 'securityAnswerError'), h("div", { class: "CompoundField" }, this.staticField(this.data.personalInfo.title, 'playerTitle'), this.staticField(this.data.personalInfo.gender, 'gender')), this.staticField(this.data.communicationInfo.currency, 'currency'))), this.isStandAlone === 'true' &&
|
|
498
533
|
h("section", { class: "ButtonsArea" }, h("button", { class: `SaveButton ${this.isSubmitButtonAvailable ? '' : 'Disabled'}`, onClick: this.updateData }, translate('saveButton'))))));
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["pam-player-profile_2",[[1,"pam-player-profile",{"userId":[513,"user-id"],"session":[513],"endpoint":[513],"lang":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dobFormat":[513,"dob-format"],"isStandAlone":[513,"is-stand-alone"],"limitStylingAppends":[32],"skeletonLoading":[32],"isSubmitButtonAvailable":[32],"invalidFields":[32],"isMobile":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[
|
|
19
|
+
return bootstrapLazy([["pam-player-profile_2",[[1,"pam-player-profile",{"userId":[513,"user-id"],"session":[513],"endpoint":[513],"lang":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dobFormat":[513,"dob-format"],"isStandAlone":[513,"is-stand-alone"],"limitStylingAppends":[32],"skeletonLoading":[32],"isSubmitButtonAvailable":[32],"invalidFields":[32],"isMobile":[32],"isError":[32],"errorMessage":[32],"errorCode":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,32 +1,58 @@
|
|
|
1
|
-
export { P as pam_player_profile } from './pam-player-profile-
|
|
1
|
+
export { P as pam_player_profile } from './pam-player-profile-2ba91a9a.js';
|
|
2
2
|
import { r as registerInstance, h, H as Host } from './index-d953d051.js';
|
|
3
3
|
|
|
4
|
-
const uiSkeletonCss = ":host{display:block
|
|
4
|
+
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
|
|
5
5
|
const UiSkeletonStyle0 = uiSkeletonCss;
|
|
6
6
|
|
|
7
7
|
const UiSkeleton = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
registerInstance(this, hostRef);
|
|
10
|
+
this.stylingValue = {
|
|
11
|
+
width: this.handleStylingProps(this.width),
|
|
12
|
+
height: this.handleStylingProps(this.height),
|
|
13
|
+
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
14
|
+
marginBottom: this.handleStylingProps(this.marginBottom),
|
|
15
|
+
marginTop: this.handleStylingProps(this.marginTop),
|
|
16
|
+
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
17
|
+
marginRight: this.handleStylingProps(this.marginRight),
|
|
18
|
+
size: this.handleStylingProps(this.size)
|
|
19
|
+
};
|
|
10
20
|
this.structure = undefined;
|
|
11
|
-
this.width =
|
|
12
|
-
this.height =
|
|
13
|
-
this.borderRadius =
|
|
14
|
-
this.marginBottom =
|
|
15
|
-
this.marginTop =
|
|
16
|
-
this.marginLeft =
|
|
17
|
-
this.marginRight =
|
|
21
|
+
this.width = 'unset';
|
|
22
|
+
this.height = 'unset';
|
|
23
|
+
this.borderRadius = 'unset';
|
|
24
|
+
this.marginBottom = 'unset';
|
|
25
|
+
this.marginTop = 'unset';
|
|
26
|
+
this.marginLeft = 'unset';
|
|
27
|
+
this.marginRight = 'unset';
|
|
18
28
|
this.animation = true;
|
|
19
|
-
this.rows =
|
|
20
|
-
this.size =
|
|
21
|
-
this.color = undefined;
|
|
22
|
-
this.primaryColor = undefined;
|
|
23
|
-
this.secondaryColor = undefined;
|
|
29
|
+
this.rows = 0;
|
|
30
|
+
this.size = '100%';
|
|
24
31
|
}
|
|
25
32
|
handleStructureChange(newValue, oldValue) {
|
|
26
33
|
if (oldValue !== newValue) {
|
|
27
34
|
this.handleStructure(newValue);
|
|
28
35
|
}
|
|
29
36
|
}
|
|
37
|
+
handleStylingProps(value) {
|
|
38
|
+
switch (typeof value) {
|
|
39
|
+
case 'number':
|
|
40
|
+
return value === 0 ? 0 : `${value}px`;
|
|
41
|
+
case 'undefined':
|
|
42
|
+
return 'unset';
|
|
43
|
+
case 'string':
|
|
44
|
+
if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
|
|
45
|
+
value.endsWith('px') ||
|
|
46
|
+
value.endsWith('%')) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return 'unset';
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
return 'unset';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
30
56
|
handleStructure(structure) {
|
|
31
57
|
switch (structure) {
|
|
32
58
|
case 'logo':
|
|
@@ -46,22 +72,22 @@ const UiSkeleton = class {
|
|
|
46
72
|
}
|
|
47
73
|
}
|
|
48
74
|
renderLogo() {
|
|
49
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class:
|
|
75
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
|
|
50
76
|
}
|
|
51
77
|
renderImage() {
|
|
52
|
-
return
|
|
78
|
+
return h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
|
|
53
79
|
}
|
|
54
80
|
renderTitle() {
|
|
55
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class:
|
|
81
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
|
|
56
82
|
}
|
|
57
83
|
renderText() {
|
|
58
|
-
return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class:
|
|
84
|
+
return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'Text ' + (this.animation ? 'Skeleton' : '') })))));
|
|
59
85
|
}
|
|
60
86
|
renderRectangle() {
|
|
61
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class:
|
|
87
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
62
88
|
}
|
|
63
89
|
renderCircle() {
|
|
64
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class:
|
|
90
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
|
|
65
91
|
}
|
|
66
92
|
render() {
|
|
67
93
|
let styleBlock = '';
|
|
@@ -69,97 +95,79 @@ const UiSkeleton = class {
|
|
|
69
95
|
case 'logo':
|
|
70
96
|
styleBlock = `
|
|
71
97
|
:host {
|
|
72
|
-
--emw-skeleton-logo-width: ${this.width};
|
|
73
|
-
--emw-skeleton-logo-height: ${this.height};
|
|
74
|
-
--emw-skeleton-logo-border-radius: ${this.borderRadius}
|
|
75
|
-
--emw-skeleton-logo-margin-bottom: ${this.marginBottom}
|
|
76
|
-
--emw-skeleton-logo-margin-top: ${this.marginTop}
|
|
77
|
-
--emw-skeleton-logo-margin-left: ${this.marginLeft}
|
|
78
|
-
--emw-skeleton-logo-margin-right: ${this.marginRight}
|
|
79
|
-
--emw-skeleton-logo-background: ${this.color};
|
|
80
|
-
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
81
|
-
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
98
|
+
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
99
|
+
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
100
|
+
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
101
|
+
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
102
|
+
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
103
|
+
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
104
|
+
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
82
105
|
}
|
|
83
106
|
`;
|
|
84
107
|
break;
|
|
85
108
|
case 'image':
|
|
86
109
|
styleBlock = `
|
|
87
110
|
:host {
|
|
88
|
-
--emw-skeleton-image-width: ${this.width};
|
|
89
|
-
--emw-skeleton-image-height: ${this.height};
|
|
90
|
-
--emw-skeleton-image-border-radius: ${this.borderRadius}
|
|
91
|
-
--emw-skeleton-image-margin-bottom: ${this.marginBottom}
|
|
92
|
-
--emw-skeleton-image-margin-top: ${this.marginTop}
|
|
93
|
-
--emw-skeleton-image-margin-left: ${this.marginLeft}
|
|
94
|
-
--emw-skeleton-image-margin-right: ${this.marginRight}
|
|
95
|
-
--emw-skeleton-image-background: ${this.color};
|
|
96
|
-
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
97
|
-
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
111
|
+
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
112
|
+
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
113
|
+
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
114
|
+
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
115
|
+
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
116
|
+
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
117
|
+
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
98
118
|
}
|
|
99
119
|
`;
|
|
100
120
|
break;
|
|
101
121
|
case 'title':
|
|
102
122
|
styleBlock = `
|
|
103
123
|
:host {
|
|
104
|
-
--emw-skeleton-title-width: ${this.width};
|
|
105
|
-
--emw-skeleton-title-height: ${this.height};
|
|
106
|
-
--emw-skeleton-title-border-radius: ${this.borderRadius}
|
|
107
|
-
--emw-skeleton-title-margin-bottom: ${this.marginBottom}
|
|
108
|
-
--emw-skeleton-title-margin-top: ${this.marginTop}
|
|
109
|
-
--emw-skeleton-title-margin-left: ${this.marginLeft}
|
|
110
|
-
--emw-skeleton-title-margin-right: ${this.marginRight}
|
|
111
|
-
--emw-skeleton-title-background: ${this.color};
|
|
112
|
-
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
113
|
-
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
124
|
+
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
125
|
+
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
126
|
+
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
127
|
+
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
128
|
+
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
129
|
+
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
130
|
+
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
114
131
|
}
|
|
115
132
|
`;
|
|
116
133
|
break;
|
|
117
134
|
case 'text':
|
|
118
135
|
styleBlock = `
|
|
119
136
|
:host {
|
|
120
|
-
--emw-skeleton-text-width: ${this.width};
|
|
121
|
-
--emw-skeleton-text-height: ${this.height};
|
|
122
|
-
--emw-skeleton-text-border-radius: ${this.borderRadius}
|
|
123
|
-
--emw-skeleton-text-margin-bottom: ${this.marginBottom}
|
|
124
|
-
--emw-skeleton-text-margin-top: ${this.marginTop}
|
|
125
|
-
--emw-skeleton-text-margin-left: ${this.marginLeft}
|
|
126
|
-
--emw-skeleton-text-margin-right: ${this.marginRight}
|
|
127
|
-
--emw-skeleton-text-background: ${this.color};
|
|
128
|
-
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
129
|
-
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
137
|
+
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
138
|
+
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
139
|
+
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
140
|
+
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
141
|
+
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
142
|
+
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
143
|
+
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
130
144
|
}
|
|
131
145
|
`;
|
|
132
146
|
break;
|
|
133
147
|
case 'rectangle':
|
|
134
148
|
styleBlock = `
|
|
135
149
|
:host {
|
|
136
|
-
--emw-skeleton-rectangle-width: ${this.width};
|
|
137
|
-
--emw-skeleton-rectangle-height: ${this.height};
|
|
138
|
-
--emw-skeleton-rectangle-border-radius: ${this.borderRadius}
|
|
139
|
-
--emw-skeleton-rectangle-margin-bottom: ${this.marginBottom}
|
|
140
|
-
--emw-skeleton-rectangle-margin-top: ${this.marginTop}
|
|
141
|
-
--emw-skeleton-rectangle-margin-left: ${this.marginLeft}
|
|
142
|
-
--emw-skeleton-rectangle-margin-right: ${this.marginRight}
|
|
143
|
-
--emw-skeleton-rectangle-background: ${this.color};
|
|
144
|
-
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
145
|
-
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
150
|
+
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
151
|
+
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
152
|
+
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
153
|
+
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
154
|
+
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
155
|
+
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
156
|
+
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
146
157
|
}
|
|
147
158
|
`;
|
|
148
159
|
break;
|
|
149
160
|
case 'circle':
|
|
150
161
|
styleBlock = `
|
|
151
162
|
:host {
|
|
152
|
-
--emw-skeleton-circle-size: ${this.size};
|
|
153
|
-
--emw-skeleton-circle-background: ${this.color};
|
|
154
|
-
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
155
|
-
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
163
|
+
--emw-skeleton-circle-size: ${this.stylingValue.size};
|
|
156
164
|
}
|
|
157
165
|
`;
|
|
158
166
|
break;
|
|
159
167
|
default:
|
|
160
168
|
styleBlock = '';
|
|
161
169
|
}
|
|
162
|
-
return (h(Host, { key: '
|
|
170
|
+
return (h(Host, { key: 'e6b885bfd985ce7663d990756fe9101e25eb97f0' }, h("style", { key: '06ae24c7bb74f4dacfc12ae58085333f9dc89da5' }, styleBlock), this.handleStructure(this.structure)));
|
|
163
171
|
}
|
|
164
172
|
static get watchers() { return {
|
|
165
173
|
"structure": ["handleStructureChange"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PamPlayerProfile}from"./pam-player-profile-
|
|
1
|
+
export{P as PamPlayerProfile}from"./pam-player-profile-2ba91a9a.js";import"./index-d953d051.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as r}from"./index-d953d051.js";const t={en:{title:"Profile Info",username:"Username",firstName:"First Name",lastName:"Last Name",securityQuestion:"Security Question",securityAnswer:"Security Answer",playerTitle:"Title",gender:"Gender",dateOfBirth:"Date Of Birth",currency:"Currency",securityQuestionError:"Security question must be at least 1 character long and maximum 120 characters.",securityAnswerError:"Security answer must be at least 1 character long and maximum 120 characters.",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the profile information",errorMessageFetch:"An error has occured when attempting to fetch the profile information"},"zh-hk":{title:"個人資料",username:"用戶名",firstName:"名字",lastName:"姓氏",securityQuestion:"安全問題",securityAnswer:"安全答案",playerTitle:"稱號",gender:"性別",dateOfBirth:"出生日期",currency:"貨幣",securityQuestionError:"安全問題必須至少1個字符,最多120個字符。",securityAnswerError:"安全答案必須至少1個字符,最多120個字符。",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新個人資料信息時發生錯誤",errorMessageFetch:"在嘗試獲取個人資料時發生錯誤"},fr:{title:"Informations de profil",username:"Nom d'utilisateur",firstName:"Prénom",lastName:"Nom de famille",securityQuestion:"Question de sécurité",securityAnswer:"Réponse de sécurité",playerTitle:"Titre",gender:"Genre",dateOfBirth:"Date de naissance",currency:"Devise",securityQuestionError:"La question de sécurité doit comporter au moins 1 caractère et un maximum de 120 caractères.",securityAnswerError:"La réponse de sécurité doit comporter au moins 1 caractère et un maximum de 120 caractères.",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations de profil",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations de profil"},ro:{title:"Informații profil",username:"Nume de utilizator",firstName:"Prenume",lastName:"Nume de familie",securityQuestion:"Întrebare de securitate",securityAnswer:"Răspuns de securitate",playerTitle:"Titlu",gender:"Gen",dateOfBirth:"Data nașterii",currency:"Monedă",securityQuestionError:"Întrebarea de securitate trebuie să aibă cel puțin 1 caracter și maximum 120 de caractere.",securityAnswerError:"Răspunsul de securitate trebuie să aibă cel puțin 1 caracter și maximum 120 de caractere.",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile profilului",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile profilului"},tr:{title:"Profil Bilgileri",username:"Kullanıcı Adı",firstName:"Ad",lastName:"Soyad",securityQuestion:"Güvenlik Sorusu",securityAnswer:"Güvenlik Cevabı",playerTitle:"Başlık",gender:"Cinsiyet",dateOfBirth:"Doğum Tarihi",currency:"Para Birimi",securityQuestionError:"Güvenlik sorusu en az 1 karakter ve en fazla 120 karakter olmalıdır.",securityAnswerError:"Güvenlik cevabı en az 1 karakter ve en fazla 120 karakter olmalıdır.",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Profil bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Profil bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Información del perfil",username:"Nombre de usuario",firstName:"Nombre",lastName:"Apellido",securityQuestion:"Pregunta de seguridad",securityAnswer:"Respuesta de seguridad",playerTitle:"Título",gender:"Género",dateOfBirth:"Fecha de nacimiento",currency:"Moneda",securityQuestionError:"La pregunta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",securityAnswerError:"La respuesta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información del perfil",errorMessageFetch:"Se ha producido un error al intentar obtener la información del perfil"},pt:{title:"Informações do Perfil",username:"Nome de usuário",firstName:"Nome",lastName:"Sobrenome",securityQuestion:"Pergunta de segurança",securityAnswer:"Resposta de segurança",playerTitle:"Título",gender:"Gênero",dateOfBirth:"Data de nascimento",currency:"Moeda",securityQuestionError:"A pergunta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",securityAnswerError:"A resposta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do perfil",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do perfil"},hr:{title:"Informacije o profilu",username:"Korisničko ime",firstName:"Ime",lastName:"Prezime",securityQuestion:"Sigurnosno pitanje",securityAnswer:"Sigurnosni odgovor",playerTitle:"Naslov",gender:"Spol",dateOfBirth:"Datum rođenja",currency:"Valuta",securityQuestionError:"Sigurnosno pitanje mora imati najmanje 1 znak i najviše 120 znakova.",securityAnswerError:"Sigurnosni odgovor mora imati najmanje 1 znak i najviše 120 znakova.",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o profilu",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o profilu"},"pt-br":{title:"Informações do Perfil",username:"Nome de usuário",firstName:"Nome",lastName:"Sobrenome",securityQuestion:"Pergunta de segurança",securityAnswer:"Resposta de segurança",playerTitle:"Título",gender:"Gênero",dateOfBirth:"Data de nascimento",currency:"Moeda",securityQuestionError:"A pergunta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",securityAnswerError:"A resposta de segurança deve ter pelo menos 1 caractere e no máximo 120 caracteres.",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações do perfil",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações do perfil"},"es-mx":{title:"Información del perfil",username:"Nombre de usuario",firstName:"Nombre",lastName:"Apellido",securityQuestion:"Pregunta de seguridad",securityAnswer:"Respuesta de seguridad",playerTitle:"Título",gender:"Género",dateOfBirth:"Fecha de nacimiento",currency:"Moneda",securityQuestionError:"La pregunta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",securityAnswerError:"La respuesta de seguridad debe tener al menos 1 carácter y un máximo de 120 caracteres.",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información del perfil",errorMessageFetch:"Se ha producido un error al intentar obtener la información del perfil"}},n=(e,r,n)=>{let i=t[t[r]?r:"en"][e];if(void 0!==n)for(const[e,r]of Object.entries(n.values)){const t=new RegExp(`{${e}}`,"g");i=i.replace(t,r)}return i};function i(e,r){if(e){const t=document.createElement("style");t.innerHTML=r,e.appendChild(t)}}function a(e,r){const t=new URL(r);fetch(t.href).then((e=>e.text())).then((r=>{const t=document.createElement("style");t.innerHTML=r,e&&e.appendChild(t)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var o={exports:{}};o.exports=function(){var e=6e4,r=36e5,t="millisecond",n="second",i="minute",a="hour",o="day",s="week",l="month",u="quarter",c="year",d="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var r=["th","st","nd","rd"],t=e%100;return"["+e+(r[(t-20)%10]||r[t]||r[0])+"]"}},y=function(e,r,t){var n=String(e);return!n||n.length>=r?e:""+Array(r+1-n.length).join(t)+e},g={s:y,z:function(e){var r=-e.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),i=t%60;return(r<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function e(r,t){if(r.date()<t.date())return-e(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),i=r.clone().add(n,l),a=t-i<0,o=r.clone().add(n+(a?-1:1),l);return+(-(n+(t-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:c,w:s,d:o,D:d,h:a,m:i,s:n,ms:t,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",v={};v[w]=f;var P="$isDayjsObject",b=function(e){return e instanceof M||!(!e||!e[P])},x=function e(r,t,n){var i;if(!r)return w;if("string"==typeof r){var a=r.toLowerCase();v[a]&&(i=a),t&&(v[a]=t,i=a);var o=r.split("-");if(!i&&o.length>1)return e(o[0])}else{var s=r.name;v[s]=r,i=s}return!n&&i&&(w=i),i||!n&&w},S=function(e,r){if(b(e))return e.clone();var t="object"==typeof r?r:{};return t.date=e,t.args=arguments,new M(t)},k=g;k.l=x,k.i=b,k.w=function(e,r){return S(e,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var M=function(){function f(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[P]=!0}var y=f.prototype;return y.parse=function(e){this.$d=function(e){var r=e.date,t=e.utc;if(null===r)return new Date(NaN);if(k.u(r))return new Date;if(r instanceof Date)return new Date(r);if("string"==typeof r&&!/Z$/i.test(r)){var n=r.match(p);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return t?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(r)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===m)},y.isSame=function(e,r){var t=S(e);return this.startOf(r)<=t&&t<=this.endOf(r)},y.isAfter=function(e,r){return S(e)<this.startOf(r)},y.isBefore=function(e,r){return this.endOf(r)<S(e)},y.$g=function(e,r,t){return k.u(e)?this[r]:this.set(t,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,r){var t=this,u=!!k.u(r)||r,m=k.p(e),p=function(e,r){var n=k.w(t.$u?Date.UTC(t.$y,r,e):new Date(t.$y,r,e),t);return u?n:n.endOf(o)},h=function(e,r){return k.w(t.toDate()[e].apply(t.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(r)),t)},f=this.$W,y=this.$M,g=this.$D,w="set"+(this.$u?"UTC":"");switch(m){case c:return u?p(1,0):p(31,11);case l:return u?p(1,y):p(0,y+1);case s:var v=this.$locale().weekStart||0,P=(f<v?f+7:f)-v;return p(u?g-P:g+(6-P),y);case o:case d:return h(w+"Hours",0);case a:return h(w+"Minutes",1);case i:return h(w+"Seconds",2);case n:return h(w+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,r){var s,u=k.p(e),m="set"+(this.$u?"UTC":""),p=(s={},s[o]=m+"Date",s[d]=m+"Date",s[l]=m+"Month",s[c]=m+"FullYear",s[a]=m+"Hours",s[i]=m+"Minutes",s[n]=m+"Seconds",s[t]=m+"Milliseconds",s)[u],h=u===o?this.$D+(r-this.$W):r;if(u===l||u===c){var f=this.clone().set(d,1);f.$d[p](h),f.init(),this.$d=f.set(d,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},y.set=function(e,r){return this.clone().$set(e,r)},y.get=function(e){return this[k.p(e)]()},y.add=function(t,u){var d,m=this;t=Number(t);var p=k.p(u),h=function(e){var r=S(m);return k.w(r.date(r.date()+Math.round(e*t)),m)};if(p===l)return this.set(l,this.$M+t);if(p===c)return this.set(c,this.$y+t);if(p===o)return h(1);if(p===s)return h(7);var f=(d={},d[i]=e,d[a]=r,d[n]=1e3,d)[p]||1,y=this.$d.getTime()+t*f;return k.w(y,this)},y.subtract=function(e,r){return this.add(-1*e,r)},y.format=function(e){var r=this,t=this.$locale();if(!this.isValid())return t.invalidDate||m;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=k.z(this),a=this.$H,o=this.$m,s=this.$M,l=t.weekdays,u=t.months,c=function(e,t,i,a){return e&&(e[t]||e(r,n))||i[t].slice(0,a)},d=function(e){return k.s(a%12||12,e,"0")},p=t.meridiem||function(e,r,t){var n=e<12?"AM":"PM";return t?n.toLowerCase():n};return n.replace(h,(function(e,n){return n||function(e){switch(e){case"YY":return String(r.$y).slice(-2);case"YYYY":return k.s(r.$y,4,"0");case"M":return s+1;case"MM":return k.s(s+1,2,"0");case"MMM":return c(t.monthsShort,s,u,3);case"MMMM":return c(u,s);case"D":return r.$D;case"DD":return k.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return c(t.weekdaysMin,r.$W,l,2);case"ddd":return c(t.weekdaysShort,r.$W,l,3);case"dddd":return l[r.$W];case"H":return String(a);case"HH":return k.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(a,o,!0);case"A":return p(a,o,!1);case"m":return String(o);case"mm":return k.s(o,2,"0");case"s":return String(r.$s);case"ss":return k.s(r.$s,2,"0");case"SSS":return k.s(r.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(t,d,m){var p,h=this,f=k.p(d),y=S(t),g=(y.utcOffset()-this.utcOffset())*e,w=this-y,v=function(){return k.m(h,y)};switch(f){case c:p=v()/12;break;case l:p=v();break;case u:p=v()/3;break;case s:p=(w-g)/6048e5;break;case o:p=(w-g)/864e5;break;case a:p=w/r;break;case i:p=w/e;break;case n:p=w/1e3;break;default:p=w}return m?p:k.a(p)},y.daysInMonth=function(){return this.endOf(l).$D},y.$locale=function(){return v[this.$L]},y.locale=function(e,r){if(!e)return this.$L;var t=this.clone(),n=x(e,r,!0);return n&&(t.$L=n),t},y.clone=function(){return k.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},f}(),F=M.prototype;return S.prototype=F,[["$ms",t],["$s",n],["$m",i],["$H",a],["$W",o],["$M",l],["$y",c],["$D",d]].forEach((function(e){F[e[1]]=function(r){return this.$g(r,e[0],e[1])}})),S.extend=function(e,r){return e.$i||(e(r,M,S),e.$i=!0),S},S.locale=x,S.isDayjs=b,S.unix=function(e){return S(1e3*e)},S.en=v[w],S.Ls=v,S.p={},S}();const s=o.exports,l=class{constructor(t){var i;e(this,t),this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"PROFILE_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"PROFILE_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:n("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:n(e,this.lang)}},window.location.href)},this.sendData=()=>{delete this.data.contacts,window.postMessage({type:"PROFILE_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var r;switch(null===(r=e.data)||void 0===r?void 0:r.type){case"PROFILE_DATA":this.data=e.data.data,this.resetState(),this.skeletonLoading=!1;break;case"PROFILE_SEND_DATA":this.sendData()}},this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;let t=await e.json();return this.errorCode=null===(r=t.thirdPartyResponse)||void 0===r?void 0:r.errorCode,this.errorMessage=n(this.errorCode?this.errorCode:"errorMessageFetch",this.lang),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const t={method:"GET",headers:r};return new Promise(((r,n)=>{fetch(e.href,t).then((e=>this.handleFetchResponse(e))).then((e=>{this.data=e.player,r()})).catch((e=>{console.error(e),n(e)}))}))},this.buildFieldState=(e,r,t)=>Object.assign({isValid:e,initialValue:r,rule:t}),this.initData=()=>{const e={};["externalPlayerId","affiliateMarker","personalInfo","communicationInfo","signupInfo","statusInfo","securityInfo","geographicInfo","playerInfo","contacts"].forEach((r=>e[r]=this.data[r])),this.data=e},this.updateState=(e,r)=>t=>{this.data[e][r]=t.target.value;const n=this.fieldsState.data[r],i=t.target.value,a=n.rule(i);a&&!n.isValid?(n.isValid=!0,this.invalidFields-=1):!a&&n.isValid&&(n.isValid=!1,this.invalidFields+=1),this.fieldsState.hasChanged=i!==n.initialValue;const o=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==o&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const r=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),t=new Headers;t.append("X-SessionId",this.session),t.append("Content-Type","application/problem+json; charset=utf-8"),this.data.contacts&&delete this.data.contacts;const n={method:"PUT",headers:t,body:JSON.stringify(this.data)};fetch(r,n).then((e=>this.handleFetchResponse(e))).then((()=>{this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))})).catch((e=>{console.error(e)}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&this.fieldsState.hasChanged},this.editableField=(e,t,i,a)=>{const o=this.fieldsState.data[t],s=this.data[e][t];return o?r("div",{class:"Field "+(o.isValid?"":"Invalid")},r("label",null,n(i,this.lang)),r("input",{type:"text",value:s,onKeyUp:this.updateState(e,t)}),!o.isValid&&r("p",{class:"Error"},n(a,this.lang))):null},this.staticField=(e,t)=>e?r("div",{class:"Field Disabled"},r("label",null,n(t,this.lang)),r("input",{type:"text",value:e,readonly:!0})):null,this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.dobFormat="DD/MM/YYYY",this.isStandAlone="true",this.limitStylingAppends=!1,this.skeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((i=window.navigator.userAgent).toLowerCase().match(/android/i)||i.toLowerCase().match(/blackberry|bb/i)||i.toLowerCase().match(/iphone|ipad|ipod/i)||i.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.isError=!1,this.errorMessage="",this.errorCode=""}handleStylingChange(e,r){e!==r&&i(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&a(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.skeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?function(e,r){if(window.emMessageBus){const t=document.createElement("style");window.emMessageBus.subscribe(r,(r=>{t.innerHTML=r,e&&e.appendChild(t)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initEditableFieldsState(){var e,r;this.fieldsState.data={},this.fieldsState.hasChanged=!1,(null===(e=this.data.playerInfo)||void 0===e?void 0:e.SecurityQuestion)&&(this.fieldsState.data.SecurityQuestion=this.buildFieldState(!0,this.data.playerInfo.SecurityQuestion,(e=>e&&e.length<=120))),(null===(r=this.data.playerInfo)||void 0===r?void 0:r.SecurityAnswer)&&(this.fieldsState.data.SecurityAnswer=this.buildFieldState(!0,this.data.playerInfo.SecurityAnswer,(e=>e&&e.length<=120)))}resetState(){this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1}render(){return!this.skeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.skeletonLoading?r("form",{class:"PamPlayerProfileWrapper skeleton"},r("div",{class:"ReturnButton"},r("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),r("div",{class:"Section"},r("section",{class:"SectionContent"},[...Array(6).keys()].map((()=>r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})))),r("div",{class:"CompoundField"},r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"})),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px"}))),r("div",{class:"Field"},r("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),r("ui-skeleton",{structure:"rectangle",width:"auto",height:"20px"})))),r("section",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"})))):r("form",{class:"PamPlayerProfileWrapper "+(this.isMobile?"Mobile":"")},r("div",{class:"ReturnButton",onClick:this.toggleScreen},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},r("g",{transform:"translate(-20 -158)"},r("g",{transform:"translate(20 158)"},r("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)"})))),r("h2",null,n("title",this.lang))),r("h2",{class:"HeaderText"},n("title",this.lang)),r("div",{class:"Section"},r("section",{class:"SectionContent"},this.staticField(this.data.contacts.find((e=>e.contatcType="Username")).contactValue,"username"),this.staticField(s(this.data.personalInfo.birthDate).format(this.dobFormat),"dateOfBirth"),this.staticField(this.data.personalInfo.firstName,"firstName"),this.staticField(this.data.personalInfo.lastName,"lastName"),this.editableField("playerInfo","SecurityQuestion","securityQuestion","securityQuestionError"),this.editableField("playerInfo","SecurityAnswer","securityAnswer","securityAnswerError"),r("div",{class:"CompoundField"},this.staticField(this.data.personalInfo.title,"playerTitle"),this.staticField(this.data.personalInfo.gender,"gender")),this.staticField(this.data.communicationInfo.currency,"currency"))),"true"===this.isStandAlone&&r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},n("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};l.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.errorContainer {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PamPlayerProfileWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamPlayerProfileWrapper .ReturnButton {\n display: none;\n}\n.PamPlayerProfileWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PamPlayerProfileWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PamPlayerProfileWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input:focus, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-within, .PamPlayerProfileWrapper .Section .SectionContent .Field input :focus-visible, .PamPlayerProfileWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PamPlayerProfileWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PamPlayerProfileWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamPlayerProfileWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 50% 50%;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n height: 55px;\n overflow: hidden;\n}\n.PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamPlayerProfileWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamPlayerProfileWrapper .HeaderText {\n display: none;\n }\n .PamPlayerProfileWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PamPlayerProfileWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PamPlayerProfileWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PamPlayerProfileWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PamPlayerProfileWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamPlayerProfileWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PamPlayerProfileWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PamPlayerProfileWrapper .Section .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n }\n .PamPlayerProfileWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamPlayerProfileWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PamPlayerProfileWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PamPlayerProfileWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';export{l as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as i,b as n}from"./index-d953d051.js";export{s as setNonce}from"./index-d953d051.js";import{g as r}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,r={};return""!==n&&(r.resourcesUrl=new URL(".",n).href),i(r)})().then((async i=>(await r(),n([["pam-player-profile_2",[[1,"pam-player-profile",{userId:[513,"user-id"],session:[513],endpoint:[513],lang:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],dobFormat:[513,"dob-format"],isStandAlone:[513,"is-stand-alone"],limitStylingAppends:[32],skeletonLoading:[32],isSubmitButtonAvailable:[32],invalidFields:[32],isMobile:[32]},null,{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[
|
|
1
|
+
import{p as i,b as n}from"./index-d953d051.js";export{s as setNonce}from"./index-d953d051.js";import{g as r}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,r={};return""!==n&&(r.resourcesUrl=new URL(".",n).href),i(r)})().then((async i=>(await r(),n([["pam-player-profile_2",[[1,"pam-player-profile",{userId:[513,"user-id"],session:[513],endpoint:[513],lang:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],dobFormat:[513,"dob-format"],isStandAlone:[513,"is-stand-alone"],limitStylingAppends:[32],skeletonLoading:[32],isSubmitButtonAvailable:[32],invalidFields:[32],isMobile:[32],isError:[32],errorMessage:[32],errorCode:[32]},null,{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],i))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as pam_player_profile}from"./pam-player-profile-
|
|
1
|
+
export{P as pam_player_profile}from"./pam-player-profile-2ba91a9a.js";import{r as e,h as t,H as n}from"./index-d953d051.js";const i=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{i as ui_skeleton}
|
|
@@ -15,6 +15,9 @@ export declare class PamPlayerProfile {
|
|
|
15
15
|
isSubmitButtonAvailable: boolean;
|
|
16
16
|
invalidFields: number;
|
|
17
17
|
isMobile: boolean;
|
|
18
|
+
isError: boolean;
|
|
19
|
+
errorMessage: string;
|
|
20
|
+
errorCode: string;
|
|
18
21
|
private stylingContainer;
|
|
19
22
|
private stylingSubscription;
|
|
20
23
|
data: any;
|
|
@@ -30,6 +33,11 @@ export declare class PamPlayerProfile {
|
|
|
30
33
|
sendErrorNotification: (errorKey: string) => void;
|
|
31
34
|
sendData: () => void;
|
|
32
35
|
messageHandler: (message: MessageEvent) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Promise for fetching the response and returning the response or the erorr message
|
|
38
|
+
* @param res - response from the API
|
|
39
|
+
*/
|
|
40
|
+
handleFetchResponse: (res: Response) => Promise<any>;
|
|
33
41
|
getData: () => Promise<void>;
|
|
34
42
|
buildFieldState: (isValid: any, initialValue: any, rule: any) => any;
|
|
35
43
|
initData: () => void;
|