@everymatrix/pam-player-profile 0.10.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -55
- 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 -55
- 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
package/dist/cjs/index.cjs.js
CHANGED
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["pam-player-profile_2.cjs",[[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":[
|
|
11
|
+
return index.bootstrapLazy([["pam-player-profile_2.cjs",[[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],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -277,7 +277,7 @@ var dayjs_min = {exports: {}};
|
|
|
277
277
|
|
|
278
278
|
const dayjs = dayjs_min.exports;
|
|
279
279
|
|
|
280
|
-
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}";
|
|
280
|
+
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}";
|
|
281
281
|
const PamPlayerProfileStyle0 = pamPlayerProfileCss;
|
|
282
282
|
|
|
283
283
|
const PamPlayerProfile = class {
|
|
@@ -313,25 +313,53 @@ const PamPlayerProfile = class {
|
|
|
313
313
|
break;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
+
/**
|
|
317
|
+
* Promise for fetching the response and returning the response or the erorr message
|
|
318
|
+
* @param res - response from the API
|
|
319
|
+
*/
|
|
320
|
+
this.handleFetchResponse = async (res) => {
|
|
321
|
+
var _a;
|
|
322
|
+
if (res.status >= 300) {
|
|
323
|
+
this.isError = true;
|
|
324
|
+
let response = await res.json();
|
|
325
|
+
this.errorCode = (_a = response.thirdPartyResponse) === null || _a === void 0 ? void 0 : _a.errorCode;
|
|
326
|
+
this.errorMessage = this.errorCode ? translate(this.errorCode, this.lang) : translate('errorMessageFetch', this.lang);
|
|
327
|
+
window.postMessage({
|
|
328
|
+
type: 'WidgetNotification',
|
|
329
|
+
data: {
|
|
330
|
+
type: 'error',
|
|
331
|
+
message: this.errorMessage
|
|
332
|
+
}
|
|
333
|
+
}, window.location.href);
|
|
334
|
+
return Promise.reject(this.errorMessage);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
this.isError = false;
|
|
338
|
+
if (res.headers.get('content-type')) {
|
|
339
|
+
let response = await res.json();
|
|
340
|
+
return Promise.resolve(response);
|
|
341
|
+
}
|
|
342
|
+
return Promise.resolve();
|
|
343
|
+
}
|
|
344
|
+
};
|
|
316
345
|
this.getData = () => {
|
|
317
|
-
const url = new URL(
|
|
346
|
+
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`, this.endpoint);
|
|
318
347
|
const headers = new Headers();
|
|
319
348
|
headers.append('X-SessionID', this.session);
|
|
320
349
|
const options = {
|
|
321
350
|
method: 'GET',
|
|
322
351
|
headers: headers
|
|
323
352
|
};
|
|
324
|
-
return new Promise((resolve) => {
|
|
353
|
+
return new Promise((resolve, reject) => {
|
|
325
354
|
fetch(url.href, options)
|
|
326
|
-
.then(res =>
|
|
327
|
-
if (res.ok) {
|
|
328
|
-
return res.json();
|
|
329
|
-
}
|
|
330
|
-
this.sendErrorNotification('errorMessageFetch');
|
|
331
|
-
})
|
|
355
|
+
.then((res) => this.handleFetchResponse(res))
|
|
332
356
|
.then(res => {
|
|
333
357
|
this.data = res.player;
|
|
334
358
|
resolve();
|
|
359
|
+
})
|
|
360
|
+
.catch((error) => {
|
|
361
|
+
console.error(error);
|
|
362
|
+
reject(error);
|
|
335
363
|
});
|
|
336
364
|
});
|
|
337
365
|
};
|
|
@@ -374,7 +402,7 @@ const PamPlayerProfile = class {
|
|
|
374
402
|
this.updateData = (e) => {
|
|
375
403
|
if (e)
|
|
376
404
|
e.preventDefault();
|
|
377
|
-
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information
|
|
405
|
+
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`, this.endpoint);
|
|
378
406
|
const headers = new Headers();
|
|
379
407
|
headers.append('X-SessionId', this.session);
|
|
380
408
|
headers.append('Content-Type', 'application/problem+json; charset=utf-8');
|
|
@@ -386,12 +414,13 @@ const PamPlayerProfile = class {
|
|
|
386
414
|
body: JSON.stringify(this.data)
|
|
387
415
|
};
|
|
388
416
|
fetch(url, reqParams)
|
|
389
|
-
.then(res =>
|
|
390
|
-
|
|
391
|
-
return this.sendErrorNotification('errorMessageUpdate');
|
|
392
|
-
}
|
|
417
|
+
.then(res => this.handleFetchResponse(res))
|
|
418
|
+
.then(() => {
|
|
393
419
|
this.sendSuccessNotification();
|
|
394
420
|
this.getData().then(() => this.resetState());
|
|
421
|
+
})
|
|
422
|
+
.catch((error) => {
|
|
423
|
+
console.error(error);
|
|
395
424
|
});
|
|
396
425
|
};
|
|
397
426
|
this.updateSubmitButtonStatus = () => {
|
|
@@ -434,6 +463,9 @@ const PamPlayerProfile = class {
|
|
|
434
463
|
this.isSubmitButtonAvailable = false;
|
|
435
464
|
this.invalidFields = 0;
|
|
436
465
|
this.isMobile = isMobile(window.navigator.userAgent);
|
|
466
|
+
this.isError = false;
|
|
467
|
+
this.errorMessage = '';
|
|
468
|
+
this.errorCode = '';
|
|
437
469
|
}
|
|
438
470
|
handleStylingChange(newValue, oldValue) {
|
|
439
471
|
if (newValue !== oldValue)
|
|
@@ -494,7 +526,10 @@ const PamPlayerProfile = class {
|
|
|
494
526
|
this.isSubmitButtonAvailable = false;
|
|
495
527
|
}
|
|
496
528
|
render() {
|
|
497
|
-
|
|
529
|
+
if (!this.skeletonLoading && this.isError) {
|
|
530
|
+
return (index.h("div", { class: "errorContainer" }, index.h("p", { class: "errorMessage", innerHTML: this.errorMessage })));
|
|
531
|
+
}
|
|
532
|
+
return (index.h("div", { ref: el => this.stylingContainer = el }, this.skeletonLoading
|
|
498
533
|
? index.h("form", { class: "PamPlayerProfileWrapper skeleton" }, index.h("div", { class: "ReturnButton" }, index.h("ui-skeleton", { structure: "title", width: "auto", height: "30px" })), index.h("div", { class: "Section" }, index.h("section", { class: "SectionContent" }, [...Array(6).keys()].map(() => index.h("div", { class: "Field" }, index.h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "20px" }))), index.h("div", { class: "CompoundField" }, index.h("div", { class: "Field" }, index.h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "20px" })), index.h("div", { class: "Field" }, index.h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "20px" }))), index.h("div", { class: "Field" }, index.h("ui-skeleton", { structure: "text", width: "auto", "margin-bottom": "10px", height: "10px" }), index.h("ui-skeleton", { structure: "rectangle", width: "auto", height: "20px" })))), index.h("section", { class: "ButtonsArea" }, index.h("div", { class: "SaveButton" }, index.h("ui-skeleton", { structure: "rectangle", width: "auto", height: "50px" }))))
|
|
499
534
|
: index.h("form", { class: `PamPlayerProfileWrapper ${this.isMobile ? 'Mobile' : ''}` }, index.h("div", { class: "ReturnButton", onClick: this.toggleScreen }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, index.h("g", { transform: "translate(-20 -158)" }, index.h("g", { transform: "translate(20 158)" }, index.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)" })))), index.h("h2", null, translate('title', this.lang))), index.h("h2", { class: "HeaderText" }, translate('title', this.lang)), index.h("div", { class: "Section" }, index.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'), index.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' &&
|
|
500
535
|
index.h("section", { class: "ButtonsArea" }, index.h("button", { class: `SaveButton ${this.isSubmitButtonAvailable ? '' : 'Disabled'}`, onClick: this.updateData }, translate('saveButton'))))));
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["pam-player-profile_2.cjs",[[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":[
|
|
22
|
+
return index.bootstrapLazy([["pam-player-profile_2.cjs",[[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],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const pamPlayerProfile = require('./pam-player-profile-
|
|
5
|
+
const pamPlayerProfile = require('./pam-player-profile-3185ce39.js');
|
|
6
6
|
const index = require('./index-4130c9d2.js');
|
|
7
7
|
|
|
8
8
|
const uiSkeletonCss = ":host{display:block;--emw-skeleton-rectangle-background:#c2c2c2;--emw-skeleton-circle-background:#c2c2c2;--emw-skeleton-text-background:#c2c2c2;--emw-skeleton-title-background:#c2c2c2;--emw-skeleton-image-background:#c2c2c2;--emw-skeleton-logo-background:#c2c2c2;--emw-skeleton-primary-color:#e0e0e0;--emw-skeleton-secondary-color:#f0f0f0}.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, 2px)}.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, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.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, 5px);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, inherit)}.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, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";
|
|
@@ -11,26 +11,54 @@ const UiSkeletonStyle0 = uiSkeletonCss;
|
|
|
11
11
|
const UiSkeleton = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
|
+
this.stylingValue = {
|
|
15
|
+
width: this.handleStylingProps(this.width),
|
|
16
|
+
height: this.handleStylingProps(this.height),
|
|
17
|
+
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
18
|
+
marginBottom: this.handleStylingProps(this.marginBottom),
|
|
19
|
+
marginTop: this.handleStylingProps(this.marginTop),
|
|
20
|
+
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
21
|
+
marginRight: this.handleStylingProps(this.marginRight)
|
|
22
|
+
};
|
|
14
23
|
this.structure = undefined;
|
|
15
|
-
this.width =
|
|
16
|
-
this.height =
|
|
17
|
-
this.borderRadius =
|
|
18
|
-
this.marginBottom =
|
|
19
|
-
this.marginTop =
|
|
20
|
-
this.marginLeft =
|
|
21
|
-
this.marginRight =
|
|
24
|
+
this.width = 'unset';
|
|
25
|
+
this.height = 'unset';
|
|
26
|
+
this.borderRadius = 'unset';
|
|
27
|
+
this.marginBottom = 'unset';
|
|
28
|
+
this.marginTop = 'unset';
|
|
29
|
+
this.marginLeft = 'unset';
|
|
30
|
+
this.marginRight = 'unset';
|
|
22
31
|
this.animation = true;
|
|
23
|
-
this.rows =
|
|
24
|
-
this.size =
|
|
25
|
-
this.color =
|
|
26
|
-
this.primaryColor =
|
|
27
|
-
this.secondaryColor =
|
|
32
|
+
this.rows = 0;
|
|
33
|
+
this.size = '100%';
|
|
34
|
+
this.color = '#c2c2c2';
|
|
35
|
+
this.primaryColor = '#c2c2c2';
|
|
36
|
+
this.secondaryColor = '#ffffff';
|
|
28
37
|
}
|
|
29
38
|
handleStructureChange(newValue, oldValue) {
|
|
30
39
|
if (oldValue !== newValue) {
|
|
31
40
|
this.handleStructure(newValue);
|
|
32
41
|
}
|
|
33
42
|
}
|
|
43
|
+
handleStylingProps(value) {
|
|
44
|
+
switch (typeof value) {
|
|
45
|
+
case 'number':
|
|
46
|
+
return value === 0 ? 0 : `${value}px`;
|
|
47
|
+
case 'undefined':
|
|
48
|
+
return 'unset';
|
|
49
|
+
case 'string':
|
|
50
|
+
if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
|
|
51
|
+
value.endsWith('px') ||
|
|
52
|
+
value.endsWith('%')) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return 'unset';
|
|
57
|
+
}
|
|
58
|
+
default:
|
|
59
|
+
return 'unset';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
34
62
|
handleStructure(structure) {
|
|
35
63
|
switch (structure) {
|
|
36
64
|
case 'logo':
|
|
@@ -50,22 +78,22 @@ const UiSkeleton = class {
|
|
|
50
78
|
}
|
|
51
79
|
}
|
|
52
80
|
renderLogo() {
|
|
53
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class:
|
|
81
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
|
|
54
82
|
}
|
|
55
83
|
renderImage() {
|
|
56
|
-
return
|
|
84
|
+
return index.h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
|
|
57
85
|
}
|
|
58
86
|
renderTitle() {
|
|
59
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class:
|
|
87
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
|
|
60
88
|
}
|
|
61
89
|
renderText() {
|
|
62
|
-
return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class:
|
|
90
|
+
return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: 'Text ' + (this.animation ? 'Skeleton' : '') })))));
|
|
63
91
|
}
|
|
64
92
|
renderRectangle() {
|
|
65
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class:
|
|
93
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
66
94
|
}
|
|
67
95
|
renderCircle() {
|
|
68
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class:
|
|
96
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
|
|
69
97
|
}
|
|
70
98
|
render() {
|
|
71
99
|
let styleBlock = '';
|
|
@@ -73,13 +101,13 @@ const UiSkeleton = class {
|
|
|
73
101
|
case 'logo':
|
|
74
102
|
styleBlock = `
|
|
75
103
|
:host {
|
|
76
|
-
--emw-skeleton-logo-width: ${this.width};
|
|
77
|
-
--emw-skeleton-logo-height: ${this.height};
|
|
78
|
-
--emw-skeleton-logo-border-radius: ${this.borderRadius}
|
|
79
|
-
--emw-skeleton-logo-margin-bottom: ${this.marginBottom}
|
|
80
|
-
--emw-skeleton-logo-margin-top: ${this.marginTop}
|
|
81
|
-
--emw-skeleton-logo-margin-left: ${this.marginLeft}
|
|
82
|
-
--emw-skeleton-logo-margin-right: ${this.marginRight}
|
|
104
|
+
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
105
|
+
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
106
|
+
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
107
|
+
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
108
|
+
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
109
|
+
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
110
|
+
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
83
111
|
--emw-skeleton-logo-background: ${this.color};
|
|
84
112
|
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
85
113
|
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
@@ -89,13 +117,13 @@ const UiSkeleton = class {
|
|
|
89
117
|
case 'image':
|
|
90
118
|
styleBlock = `
|
|
91
119
|
:host {
|
|
92
|
-
--emw-skeleton-image-width: ${this.width};
|
|
93
|
-
--emw-skeleton-image-height: ${this.height};
|
|
94
|
-
--emw-skeleton-image-border-radius: ${this.borderRadius}
|
|
95
|
-
--emw-skeleton-image-margin-bottom: ${this.marginBottom}
|
|
96
|
-
--emw-skeleton-image-margin-top: ${this.marginTop}
|
|
97
|
-
--emw-skeleton-image-margin-left: ${this.marginLeft}
|
|
98
|
-
--emw-skeleton-image-margin-right: ${this.marginRight}
|
|
120
|
+
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
121
|
+
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
122
|
+
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
123
|
+
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
124
|
+
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
125
|
+
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
126
|
+
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
99
127
|
--emw-skeleton-image-background: ${this.color};
|
|
100
128
|
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
101
129
|
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
@@ -105,13 +133,13 @@ const UiSkeleton = class {
|
|
|
105
133
|
case 'title':
|
|
106
134
|
styleBlock = `
|
|
107
135
|
:host {
|
|
108
|
-
--emw-skeleton-title-width: ${this.width};
|
|
109
|
-
--emw-skeleton-title-height: ${this.height};
|
|
110
|
-
--emw-skeleton-title-border-radius: ${this.borderRadius}
|
|
111
|
-
--emw-skeleton-title-margin-bottom: ${this.marginBottom}
|
|
112
|
-
--emw-skeleton-title-margin-top: ${this.marginTop}
|
|
113
|
-
--emw-skeleton-title-margin-left: ${this.marginLeft}
|
|
114
|
-
--emw-skeleton-title-margin-right: ${this.marginRight}
|
|
136
|
+
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
137
|
+
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
138
|
+
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
139
|
+
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
140
|
+
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
141
|
+
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
142
|
+
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
115
143
|
--emw-skeleton-title-background: ${this.color};
|
|
116
144
|
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
117
145
|
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
@@ -121,13 +149,13 @@ const UiSkeleton = class {
|
|
|
121
149
|
case 'text':
|
|
122
150
|
styleBlock = `
|
|
123
151
|
:host {
|
|
124
|
-
--emw-skeleton-text-width: ${this.width};
|
|
125
|
-
--emw-skeleton-text-height: ${this.height};
|
|
126
|
-
--emw-skeleton-text-border-radius: ${this.borderRadius}
|
|
127
|
-
--emw-skeleton-text-margin-bottom: ${this.marginBottom}
|
|
128
|
-
--emw-skeleton-text-margin-top: ${this.marginTop}
|
|
129
|
-
--emw-skeleton-text-margin-left: ${this.marginLeft}
|
|
130
|
-
--emw-skeleton-text-margin-right: ${this.marginRight}
|
|
152
|
+
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
153
|
+
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
154
|
+
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
155
|
+
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
156
|
+
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
157
|
+
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
158
|
+
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
131
159
|
--emw-skeleton-text-background: ${this.color};
|
|
132
160
|
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
133
161
|
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
@@ -137,13 +165,13 @@ const UiSkeleton = class {
|
|
|
137
165
|
case 'rectangle':
|
|
138
166
|
styleBlock = `
|
|
139
167
|
:host {
|
|
140
|
-
--emw-skeleton-rectangle-width: ${this.width};
|
|
141
|
-
--emw-skeleton-rectangle-height: ${this.height};
|
|
142
|
-
--emw-skeleton-rectangle-border-radius: ${this.borderRadius}
|
|
143
|
-
--emw-skeleton-rectangle-margin-bottom: ${this.marginBottom}
|
|
144
|
-
--emw-skeleton-rectangle-margin-top: ${this.marginTop}
|
|
145
|
-
--emw-skeleton-rectangle-margin-left: ${this.marginLeft}
|
|
146
|
-
--emw-skeleton-rectangle-margin-right: ${this.marginRight}
|
|
168
|
+
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
169
|
+
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
170
|
+
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
171
|
+
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
172
|
+
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
173
|
+
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
174
|
+
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
147
175
|
--emw-skeleton-rectangle-background: ${this.color};
|
|
148
176
|
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
149
177
|
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
@@ -163,7 +191,7 @@ const UiSkeleton = class {
|
|
|
163
191
|
default:
|
|
164
192
|
styleBlock = '';
|
|
165
193
|
}
|
|
166
|
-
return (index.h(index.Host, { key: '
|
|
194
|
+
return (index.h(index.Host, { key: '5c185b76c438d20d4ad88bc48d94ff5628410bb7' }, index.h("style", { key: 'de95e60a5955d5b2af83710423fe40329c187f7e' }, styleBlock), this.handleStructure(this.structure)));
|
|
167
195
|
}
|
|
168
196
|
static get watchers() { return {
|
|
169
197
|
"structure": ["handleStructureChange"]
|
|
@@ -10,6 +10,24 @@ input, select, option {
|
|
|
10
10
|
font-family: inherit;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.errorContainer {
|
|
14
|
+
font-family: "Roboto";
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-family: sans-serif;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 24px;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
.errorContainer .errorMessage {
|
|
24
|
+
color: var(--emw--color-error, var(--emw--color-red, #ed0909));
|
|
25
|
+
font-size: var(--emw-font-size-small, 13px);
|
|
26
|
+
display: block;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
text-align: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
13
31
|
.PamPlayerProfileWrapper {
|
|
14
32
|
color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));
|
|
15
33
|
background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));
|
|
@@ -36,25 +36,53 @@ export class PamPlayerProfile {
|
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Promise for fetching the response and returning the response or the erorr message
|
|
41
|
+
* @param res - response from the API
|
|
42
|
+
*/
|
|
43
|
+
this.handleFetchResponse = async (res) => {
|
|
44
|
+
var _a;
|
|
45
|
+
if (res.status >= 300) {
|
|
46
|
+
this.isError = true;
|
|
47
|
+
let response = await res.json();
|
|
48
|
+
this.errorCode = (_a = response.thirdPartyResponse) === null || _a === void 0 ? void 0 : _a.errorCode;
|
|
49
|
+
this.errorMessage = this.errorCode ? translate(this.errorCode, this.lang) : translate('errorMessageFetch', this.lang);
|
|
50
|
+
window.postMessage({
|
|
51
|
+
type: 'WidgetNotification',
|
|
52
|
+
data: {
|
|
53
|
+
type: 'error',
|
|
54
|
+
message: this.errorMessage
|
|
55
|
+
}
|
|
56
|
+
}, window.location.href);
|
|
57
|
+
return Promise.reject(this.errorMessage);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.isError = false;
|
|
61
|
+
if (res.headers.get('content-type')) {
|
|
62
|
+
let response = await res.json();
|
|
63
|
+
return Promise.resolve(response);
|
|
64
|
+
}
|
|
65
|
+
return Promise.resolve();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
39
68
|
this.getData = () => {
|
|
40
|
-
const url = new URL(
|
|
69
|
+
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`, this.endpoint);
|
|
41
70
|
const headers = new Headers();
|
|
42
71
|
headers.append('X-SessionID', this.session);
|
|
43
72
|
const options = {
|
|
44
73
|
method: 'GET',
|
|
45
74
|
headers: headers
|
|
46
75
|
};
|
|
47
|
-
return new Promise((resolve) => {
|
|
76
|
+
return new Promise((resolve, reject) => {
|
|
48
77
|
fetch(url.href, options)
|
|
49
|
-
.then(res =>
|
|
50
|
-
if (res.ok) {
|
|
51
|
-
return res.json();
|
|
52
|
-
}
|
|
53
|
-
this.sendErrorNotification('errorMessageFetch');
|
|
54
|
-
})
|
|
78
|
+
.then((res) => this.handleFetchResponse(res))
|
|
55
79
|
.then(res => {
|
|
56
80
|
this.data = res.player;
|
|
57
81
|
resolve();
|
|
82
|
+
})
|
|
83
|
+
.catch((error) => {
|
|
84
|
+
console.error(error);
|
|
85
|
+
reject(error);
|
|
58
86
|
});
|
|
59
87
|
});
|
|
60
88
|
};
|
|
@@ -97,7 +125,7 @@ export class PamPlayerProfile {
|
|
|
97
125
|
this.updateData = (e) => {
|
|
98
126
|
if (e)
|
|
99
127
|
e.preventDefault();
|
|
100
|
-
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information
|
|
128
|
+
const url = new URL(`/api/v1/players/${this.userId}/player-identifiable-information/`, this.endpoint);
|
|
101
129
|
const headers = new Headers();
|
|
102
130
|
headers.append('X-SessionId', this.session);
|
|
103
131
|
headers.append('Content-Type', 'application/problem+json; charset=utf-8');
|
|
@@ -109,12 +137,13 @@ export class PamPlayerProfile {
|
|
|
109
137
|
body: JSON.stringify(this.data)
|
|
110
138
|
};
|
|
111
139
|
fetch(url, reqParams)
|
|
112
|
-
.then(res =>
|
|
113
|
-
|
|
114
|
-
return this.sendErrorNotification('errorMessageUpdate');
|
|
115
|
-
}
|
|
140
|
+
.then(res => this.handleFetchResponse(res))
|
|
141
|
+
.then(() => {
|
|
116
142
|
this.sendSuccessNotification();
|
|
117
143
|
this.getData().then(() => this.resetState());
|
|
144
|
+
})
|
|
145
|
+
.catch((error) => {
|
|
146
|
+
console.error(error);
|
|
118
147
|
});
|
|
119
148
|
};
|
|
120
149
|
this.updateSubmitButtonStatus = () => {
|
|
@@ -157,6 +186,9 @@ export class PamPlayerProfile {
|
|
|
157
186
|
this.isSubmitButtonAvailable = false;
|
|
158
187
|
this.invalidFields = 0;
|
|
159
188
|
this.isMobile = isMobile(window.navigator.userAgent);
|
|
189
|
+
this.isError = false;
|
|
190
|
+
this.errorMessage = '';
|
|
191
|
+
this.errorCode = '';
|
|
160
192
|
}
|
|
161
193
|
handleStylingChange(newValue, oldValue) {
|
|
162
194
|
if (newValue !== oldValue)
|
|
@@ -217,7 +249,10 @@ export class PamPlayerProfile {
|
|
|
217
249
|
this.isSubmitButtonAvailable = false;
|
|
218
250
|
}
|
|
219
251
|
render() {
|
|
220
|
-
|
|
252
|
+
if (!this.skeletonLoading && this.isError) {
|
|
253
|
+
return (h("div", { class: "errorContainer" }, h("p", { class: "errorMessage", innerHTML: this.errorMessage })));
|
|
254
|
+
}
|
|
255
|
+
return (h("div", { ref: el => this.stylingContainer = el }, this.skeletonLoading
|
|
221
256
|
? 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" }))))
|
|
222
257
|
: 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' &&
|
|
223
258
|
h("section", { class: "ButtonsArea" }, h("button", { class: `SaveButton ${this.isSubmitButtonAvailable ? '' : 'Disabled'}`, onClick: this.updateData }, translate('saveButton'))))));
|
|
@@ -417,7 +452,10 @@ export class PamPlayerProfile {
|
|
|
417
452
|
"skeletonLoading": {},
|
|
418
453
|
"isSubmitButtonAvailable": {},
|
|
419
454
|
"invalidFields": {},
|
|
420
|
-
"isMobile": {}
|
|
455
|
+
"isMobile": {},
|
|
456
|
+
"isError": {},
|
|
457
|
+
"errorMessage": {},
|
|
458
|
+
"errorCode": {}
|
|
421
459
|
};
|
|
422
460
|
}
|
|
423
461
|
static get watchers() {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as PamPlayerProfile } from './pam-player-profile-
|
|
1
|
+
export { P as PamPlayerProfile } from './pam-player-profile-2ba91a9a.js';
|
|
2
2
|
import './index-d953d051.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
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":[
|
|
8
|
+
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],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|