@everymatrix/pam-login 1.86.12 → 1.86.20
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/{pam-login-340b7d1e.js → pam-login-11c9e0d7.js} +38 -13
- package/dist/cjs/pam-login_2.cjs.entry.js +1 -1
- package/dist/collection/components/pam-login/pam-login.js +15 -13
- package/dist/collection/utils/utils.js +23 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/{pam-login-6481de59.js → pam-login-f075f8e5.js} +38 -13
- package/dist/esm/pam-login_2.entry.js +1 -1
- package/dist/pam-login/index.esm.js +1 -1
- package/dist/pam-login/{pam-login-6481de59.js → pam-login-f075f8e5.js} +110 -110
- package/dist/pam-login/pam-login_2.entry.js +1 -1
- package/dist/types/utils/utils.d.ts +7 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -717,6 +717,30 @@ const translate$1 = (key, customLang, values) => {
|
|
|
717
717
|
return translation;
|
|
718
718
|
};
|
|
719
719
|
|
|
720
|
+
const getDeviceInformation = () => {
|
|
721
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
722
|
+
const ua = navigator.userAgent;
|
|
723
|
+
const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
724
|
+
const isSmallScreen = window.matchMedia('(max-width: 768px)').matches;
|
|
725
|
+
const deviceType = isTouchDevice
|
|
726
|
+
? (isSmallScreen ? 'mobile' : 'tablet')
|
|
727
|
+
: 'desktop';
|
|
728
|
+
const os = /Windows NT/.test(ua) ? 'Windows' :
|
|
729
|
+
/Mac OS X/.test(ua) ? 'macOS' :
|
|
730
|
+
/Android/.test(ua) ? 'Android' :
|
|
731
|
+
/iPhone|iPad|iPod/.test(ua) ? 'iOS' :
|
|
732
|
+
/Linux/.test(ua) ? 'Linux' : '';
|
|
733
|
+
const osVersion = ((_a = ua.match(/Windows NT ([\d.]+)/)) === null || _a === void 0 ? void 0 : _a[1]) ||
|
|
734
|
+
((_c = (_b = ua.match(/Mac OS X ([\d_]+)/)) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.replace(/_/g, '.')) ||
|
|
735
|
+
((_d = ua.match(/Android ([\d.]+)/)) === null || _d === void 0 ? void 0 : _d[1]) ||
|
|
736
|
+
((_f = (_e = ua.match(/OS ([\d_]+)/)) === null || _e === void 0 ? void 0 : _e[1]) === null || _f === void 0 ? void 0 : _f.replace(/_/g, '.')) || '';
|
|
737
|
+
const [browser, browserVersion] = /Edg\//.test(ua) ? ['Edge', ((_g = ua.match(/Edg\/([\d.]+)/)) === null || _g === void 0 ? void 0 : _g[1]) || ''] :
|
|
738
|
+
/Chrome\//.test(ua) ? ['Chrome', ((_h = ua.match(/Chrome\/([\d.]+)/)) === null || _h === void 0 ? void 0 : _h[1]) || ''] :
|
|
739
|
+
/Firefox\//.test(ua) ? ['Firefox', ((_j = ua.match(/Firefox\/([\d.]+)/)) === null || _j === void 0 ? void 0 : _j[1]) || ''] :
|
|
740
|
+
/Safari\//.test(ua) ? ['Safari', ((_k = ua.match(/Version\/([\d.]+)/)) === null || _k === void 0 ? void 0 : _k[1]) || ''] : ['', ''];
|
|
741
|
+
return { deviceType, os, osVersion, browser, browserVersion };
|
|
742
|
+
};
|
|
743
|
+
|
|
720
744
|
/**
|
|
721
745
|
* @license
|
|
722
746
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -22308,7 +22332,7 @@ const PamLogin = class {
|
|
|
22308
22332
|
* Get login token from password-management service
|
|
22309
22333
|
*/
|
|
22310
22334
|
this.getLoginToken = () => {
|
|
22311
|
-
const url = new URL('api/
|
|
22335
|
+
const url = new URL('/api/pam/v2/players/auth/password/verify', this.endpoint);
|
|
22312
22336
|
const headers = {
|
|
22313
22337
|
'Content-Type': 'application/json'
|
|
22314
22338
|
};
|
|
@@ -22317,7 +22341,8 @@ const PamLogin = class {
|
|
|
22317
22341
|
}
|
|
22318
22342
|
const body = {
|
|
22319
22343
|
contact: this.contactValue,
|
|
22320
|
-
password: this.passwordValue
|
|
22344
|
+
password: this.passwordValue,
|
|
22345
|
+
deviceInformation: getDeviceInformation()
|
|
22321
22346
|
};
|
|
22322
22347
|
const options = {
|
|
22323
22348
|
method: 'POST',
|
|
@@ -22608,7 +22633,7 @@ const PamLogin = class {
|
|
|
22608
22633
|
* @returns A Promise that resolves once the configuration is fetched and set.
|
|
22609
22634
|
*/
|
|
22610
22635
|
getLoginConfig() {
|
|
22611
|
-
const url = new URL('/api/
|
|
22636
|
+
const url = new URL('/api/pam/v2/players/auth/password/config', this.endpoint);
|
|
22612
22637
|
return new Promise((resolve, reject) => {
|
|
22613
22638
|
fetch(url.href)
|
|
22614
22639
|
.then((res) => {
|
|
@@ -22722,21 +22747,21 @@ const PamLogin = class {
|
|
|
22722
22747
|
* Render function
|
|
22723
22748
|
*/
|
|
22724
22749
|
render() {
|
|
22725
|
-
const visibilityIcon = index.h("span", { key: '
|
|
22750
|
+
const visibilityIcon = index.h("span", { key: 'bc4f37b766f01cbb1a2850b5365fc3f9deccbff5', class: "InputIcon" }, this.isPasswordVisible
|
|
22726
22751
|
? index.h("svg", { onClick: () => this.togglePassword(), class: "TogglePasswordVisibility", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.844", height: "12.887", viewBox: "0 0 18.844 12.887" }, index.h("g", { transform: "translate(-110.856 -23.242)" }, index.h("circle", { class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), index.h("g", { transform: "translate(117.499 27.37)" }, index.h("path", { class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), index.h("path", { class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), index.h("g", { transform: "translate(110.856 24.899)" }, index.h("path", { class: "PasswordVisibilityIcon", d: "M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z", transform: "translate(-110.856 -33.157)" }), index.h("path", { class: "PasswordVisibilityIcon", d: "M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z", transform: "translate(-130.743 -29.617)" })), index.h("rect", { class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" })))
|
|
22727
22752
|
: index.h("svg", { onClick: () => this.togglePassword(), class: "TogglePasswordVisibility PasswordVisible", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.843", height: "10.5", viewBox: "0 0 18.843 10.5" }, index.h("g", { transform: "translate(-14.185 -27.832)" }, index.h("path", { class: "PasswordVisibilityIcon", d: "M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z", transform: "translate(0)" }), index.h("circle", { class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
|
|
22728
|
-
const loginForm = (index.h("div", { key: '
|
|
22753
|
+
const loginForm = (index.h("div", { key: '499004fc20af9725080c7718b3c29736f7febf30', class: "FormBox" }, index.h("div", { key: '14eed0c08e13e4b25ccccab51d8fa45634e67210', class: "FormValue", onKeyDown: this.handleSubmit }, this.loginByPhoneNumber === 'true'
|
|
22729
22754
|
? index.h("div", { class: (this.isContactValid && !this.apiErrorMessage) ? 'InputBox' : 'InputBox InputInvalidBox' }, index.h("div", { class: "PhoneInputBox" }, index.h("div", { class: "PrefixBox" }, index.h("vaadin-combo-box", { items: this.phoneCodes, value: this.phoneCodeValue, onChange: this.handleInputChangePartial('prefix') }), index.h("label", { class: (this.phoneCodeValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate$1('userPrefix', this.lang))), index.h("div", { class: "PhoneBox" }, index.h("input", { type: "text", placeholder: '', value: this.contactValue, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), index.h("label", { class: (this.contactValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate$1('userPhone', this.lang)))), !this.isContactValid &&
|
|
22730
22755
|
index.h("p", { class: "CredentialsError" }, translate$1('userPhoneError', this.lang)))
|
|
22731
22756
|
: index.h("div", { class: this.isContactValid ? 'InputBox' : 'InputBox InputInvalidBox' }, index.h("input", { type: "text", placeholder: '', value: this.contactValue, onInput: this.handleInputChangePartial('user'), autocapitalize: "none", required: true }), index.h("label", { class: (this.contactValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate$1('userEmail', this.lang)), !this.isContactValid &&
|
|
22732
|
-
index.h("p", { class: "CredentialsError" }, translate$1('userEmailError', this.lang))), index.h("div", { key: '
|
|
22733
|
-
index.h("p", { key: '
|
|
22734
|
-
index.h("div", { key: '
|
|
22735
|
-
index.h("slot", { key: '
|
|
22736
|
-
index.h("slot", { key: '
|
|
22737
|
-
index.h("p", { key: '
|
|
22738
|
-
const skeleton = (index.h("div", { key: '
|
|
22739
|
-
return (index.h("section", { key: '
|
|
22757
|
+
index.h("p", { class: "CredentialsError" }, translate$1('userEmailError', this.lang))), index.h("div", { key: 'ce16fe11a12292317a68a967fe7539fea6ebc5c6', class: this.isPasswordValid ? 'InputBox' : 'InputBox InputInvalidBox' }, visibilityIcon, index.h("input", { key: '663823ebab5711a5441ccde0f2337cc43f105b82', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.passwordValue, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), index.h("label", { key: '6d2f2ca82162161149f5c8f31a95da9248995e86', class: (this.passwordValue ? 'FieldFilledIn' : '') + ' ' + (this.isPasswordValid ? '' : 'FieldInvalid') }, translate$1('password', this.lang)), this.isPasswordValid ||
|
|
22758
|
+
index.h("p", { key: 'cd4ae3c08eb821c15f7b8f2d905eb3efbe01f126', class: "CredentialsError" }, translate$1('userPasswordError', this.lang))), this.passwordReset == 'true' &&
|
|
22759
|
+
index.h("div", { key: 'f533de8ea216ff532aed3467456057e402f48135', class: "ForgotPassword" }, index.h("button", { key: '01d9245dffd5b77531dad7edc6e23c7ebe81a33f', onClick: this.resetPassword }, translate$1('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
|
|
22760
|
+
index.h("slot", { key: 'adfaf4df5f8fecb28a447297cb458a7160c3683e', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
|
|
22761
|
+
index.h("slot", { key: '88ade9e7b049a1c79ddc174bf8030d42af02de61', name: "google" }), index.h("button", { key: 'e252177c7ee29890de9d3786d88e277642b6c53b', disabled: this.isSubmitDisabled(), class: "SubmitCredentials", onClick: this.handleLogin }, translate$1('login', this.lang)), this.apiErrorMessage &&
|
|
22762
|
+
index.h("p", { key: '41211b8531f0981183920fea4a929a019e2e9a5c', class: "CredentialsError" }, this.apiErrorMessage))));
|
|
22763
|
+
const skeleton = (index.h("div", { key: 'b196e18e7f3bd9c1a2ad5c7e656950cbad6169e2', class: "LoadingSkeleton" }, index.h("form", { key: '4b20b07b5d5f75a27edba1a2a58f428d14c224b4', class: "Form" }, index.h("section", { key: 'e9693d077413bbaba63bf0099ade2bdad45220e9', class: "FieldsSection" }, index.h("div", { key: 'c1f43ada02950ee0e77aad32998e9965499ea6ca', class: "FieldContainer" }, index.h("div", { key: '0a12202e333abd9a329a4f3240472079067e617d', class: "FieldTitle" }, index.h("ui-skeleton", { key: 'd7ace8e2a823d2aa825e8d51fc0292faf471bc2d', structure: "title", width: "auto", height: "20px" })), index.h("ui-skeleton", { key: '75949006b49514482a05a907aea7b1b1032a9694', structure: "rectangle", width: "auto", height: "35px" })), index.h("div", { key: '4d4d1e332b3184a44f3a7edca8a1d67a549cf903', class: "FieldContainer" }, index.h("div", { key: '7c94821464d7fb01ce4fa0a5fcf937d0f5bad5d6', class: "FieldTitle" }, index.h("ui-skeleton", { key: 'c3e44caf47b84e830f9baa39ed455198a0ecefae', structure: "title", width: "auto", height: "20px" })), index.h("ui-skeleton", { key: '08e063c237b9fc8613ce993edd8206b887725ffc', structure: "rectangle", width: "auto", height: "35px" }))), index.h("section", { key: '522b7f10d8acc1ffc15632b13b405a5954c5f8b6', class: "ButtonsSection" }, index.h("div", { key: '21c219a0e03d6383cada154b7b509d68bc8b3b45', class: "Button" }, index.h("ui-skeleton", { key: 'cf6b5a9b39aabf387603a2d996ca62a57ab4775e', structure: "rectangle", width: "auto", height: "50px" }))))));
|
|
22764
|
+
return (index.h("section", { key: 'cdf856b9dac4ffe1b0549e540aa0acdff32829d9', ref: el => this.stylingContainer = el }, this.isLoading ? skeleton : loginForm));
|
|
22740
22765
|
}
|
|
22741
22766
|
static get watchers() { return {
|
|
22742
22767
|
"translationUrl": ["handleNewTranslations"],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const pamLogin = require('./pam-login-
|
|
5
|
+
const pamLogin = require('./pam-login-11c9e0d7.js');
|
|
6
6
|
const index = require('./index-c5001c3e.js');
|
|
7
7
|
|
|
8
8
|
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{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)}.SkeletonCircle{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%}.SkeletonText{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)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{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)}.SkeletonImage{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)}.SkeletonLogo{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)}}";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
3
3
|
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
4
|
+
import { getDeviceInformation } from "../../utils/utils";
|
|
4
5
|
import "@vaadin/combo-box";
|
|
5
6
|
import "../../../../../ui-skeleton/dist/types/index";
|
|
6
7
|
export class PamLogin {
|
|
@@ -31,7 +32,7 @@ export class PamLogin {
|
|
|
31
32
|
* Get login token from password-management service
|
|
32
33
|
*/
|
|
33
34
|
this.getLoginToken = () => {
|
|
34
|
-
const url = new URL('api/
|
|
35
|
+
const url = new URL('/api/pam/v2/players/auth/password/verify', this.endpoint);
|
|
35
36
|
const headers = {
|
|
36
37
|
'Content-Type': 'application/json'
|
|
37
38
|
};
|
|
@@ -40,7 +41,8 @@ export class PamLogin {
|
|
|
40
41
|
}
|
|
41
42
|
const body = {
|
|
42
43
|
contact: this.contactValue,
|
|
43
|
-
password: this.passwordValue
|
|
44
|
+
password: this.passwordValue,
|
|
45
|
+
deviceInformation: getDeviceInformation()
|
|
44
46
|
};
|
|
45
47
|
const options = {
|
|
46
48
|
method: 'POST',
|
|
@@ -331,7 +333,7 @@ export class PamLogin {
|
|
|
331
333
|
* @returns A Promise that resolves once the configuration is fetched and set.
|
|
332
334
|
*/
|
|
333
335
|
getLoginConfig() {
|
|
334
|
-
const url = new URL('/api/
|
|
336
|
+
const url = new URL('/api/pam/v2/players/auth/password/config', this.endpoint);
|
|
335
337
|
return new Promise((resolve, reject) => {
|
|
336
338
|
fetch(url.href)
|
|
337
339
|
.then((res) => {
|
|
@@ -445,21 +447,21 @@ export class PamLogin {
|
|
|
445
447
|
* Render function
|
|
446
448
|
*/
|
|
447
449
|
render() {
|
|
448
|
-
const visibilityIcon = h("span", { key: '
|
|
450
|
+
const visibilityIcon = h("span", { key: 'bc4f37b766f01cbb1a2850b5365fc3f9deccbff5', class: "InputIcon" }, this.isPasswordVisible
|
|
449
451
|
? h("svg", { onClick: () => this.togglePassword(), class: "TogglePasswordVisibility", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.844", height: "12.887", viewBox: "0 0 18.844 12.887" }, h("g", { transform: "translate(-110.856 -23.242)" }, h("circle", { class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { transform: "translate(117.499 27.37)" }, h("path", { class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), h("path", { class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), h("g", { transform: "translate(110.856 24.899)" }, h("path", { class: "PasswordVisibilityIcon", d: "M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z", transform: "translate(-110.856 -33.157)" }), h("path", { class: "PasswordVisibilityIcon", d: "M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z", transform: "translate(-130.743 -29.617)" })), h("rect", { class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" })))
|
|
450
452
|
: h("svg", { onClick: () => this.togglePassword(), class: "TogglePasswordVisibility PasswordVisible", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.843", height: "10.5", viewBox: "0 0 18.843 10.5" }, h("g", { transform: "translate(-14.185 -27.832)" }, h("path", { class: "PasswordVisibilityIcon", d: "M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z", transform: "translate(0)" }), h("circle", { class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
|
|
451
|
-
const loginForm = (h("div", { key: '
|
|
453
|
+
const loginForm = (h("div", { key: '499004fc20af9725080c7718b3c29736f7febf30', class: "FormBox" }, h("div", { key: '14eed0c08e13e4b25ccccab51d8fa45634e67210', class: "FormValue", onKeyDown: this.handleSubmit }, this.loginByPhoneNumber === 'true'
|
|
452
454
|
? h("div", { class: (this.isContactValid && !this.apiErrorMessage) ? 'InputBox' : 'InputBox InputInvalidBox' }, h("div", { class: "PhoneInputBox" }, h("div", { class: "PrefixBox" }, h("vaadin-combo-box", { items: this.phoneCodes, value: this.phoneCodeValue, onChange: this.handleInputChangePartial('prefix') }), h("label", { class: (this.phoneCodeValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate('userPrefix', this.lang))), h("div", { class: "PhoneBox" }, h("input", { type: "text", placeholder: '', value: this.contactValue, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), h("label", { class: (this.contactValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate('userPhone', this.lang)))), !this.isContactValid &&
|
|
453
455
|
h("p", { class: "CredentialsError" }, translate('userPhoneError', this.lang)))
|
|
454
456
|
: h("div", { class: this.isContactValid ? 'InputBox' : 'InputBox InputInvalidBox' }, h("input", { type: "text", placeholder: '', value: this.contactValue, onInput: this.handleInputChangePartial('user'), autocapitalize: "none", required: true }), h("label", { class: (this.contactValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate('userEmail', this.lang)), !this.isContactValid &&
|
|
455
|
-
h("p", { class: "CredentialsError" }, translate('userEmailError', this.lang))), h("div", { key: '
|
|
456
|
-
h("p", { key: '
|
|
457
|
-
h("div", { key: '
|
|
458
|
-
h("slot", { key: '
|
|
459
|
-
h("slot", { key: '
|
|
460
|
-
h("p", { key: '
|
|
461
|
-
const skeleton = (h("div", { key: '
|
|
462
|
-
return (h("section", { key: '
|
|
457
|
+
h("p", { class: "CredentialsError" }, translate('userEmailError', this.lang))), h("div", { key: 'ce16fe11a12292317a68a967fe7539fea6ebc5c6', class: this.isPasswordValid ? 'InputBox' : 'InputBox InputInvalidBox' }, visibilityIcon, h("input", { key: '663823ebab5711a5441ccde0f2337cc43f105b82', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.passwordValue, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: '6d2f2ca82162161149f5c8f31a95da9248995e86', class: (this.passwordValue ? 'FieldFilledIn' : '') + ' ' + (this.isPasswordValid ? '' : 'FieldInvalid') }, translate('password', this.lang)), this.isPasswordValid ||
|
|
458
|
+
h("p", { key: 'cd4ae3c08eb821c15f7b8f2d905eb3efbe01f126', class: "CredentialsError" }, translate('userPasswordError', this.lang))), this.passwordReset == 'true' &&
|
|
459
|
+
h("div", { key: 'f533de8ea216ff532aed3467456057e402f48135', class: "ForgotPassword" }, h("button", { key: '01d9245dffd5b77531dad7edc6e23c7ebe81a33f', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
|
|
460
|
+
h("slot", { key: 'adfaf4df5f8fecb28a447297cb458a7160c3683e', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
|
|
461
|
+
h("slot", { key: '88ade9e7b049a1c79ddc174bf8030d42af02de61', name: "google" }), h("button", { key: 'e252177c7ee29890de9d3786d88e277642b6c53b', disabled: this.isSubmitDisabled(), class: "SubmitCredentials", onClick: this.handleLogin }, translate('login', this.lang)), this.apiErrorMessage &&
|
|
462
|
+
h("p", { key: '41211b8531f0981183920fea4a929a019e2e9a5c', class: "CredentialsError" }, this.apiErrorMessage))));
|
|
463
|
+
const skeleton = (h("div", { key: 'b196e18e7f3bd9c1a2ad5c7e656950cbad6169e2', class: "LoadingSkeleton" }, h("form", { key: '4b20b07b5d5f75a27edba1a2a58f428d14c224b4', class: "Form" }, h("section", { key: 'e9693d077413bbaba63bf0099ade2bdad45220e9', class: "FieldsSection" }, h("div", { key: 'c1f43ada02950ee0e77aad32998e9965499ea6ca', class: "FieldContainer" }, h("div", { key: '0a12202e333abd9a329a4f3240472079067e617d', class: "FieldTitle" }, h("ui-skeleton", { key: 'd7ace8e2a823d2aa825e8d51fc0292faf471bc2d', structure: "title", width: "auto", height: "20px" })), h("ui-skeleton", { key: '75949006b49514482a05a907aea7b1b1032a9694', structure: "rectangle", width: "auto", height: "35px" })), h("div", { key: '4d4d1e332b3184a44f3a7edca8a1d67a549cf903', class: "FieldContainer" }, h("div", { key: '7c94821464d7fb01ce4fa0a5fcf937d0f5bad5d6', class: "FieldTitle" }, h("ui-skeleton", { key: 'c3e44caf47b84e830f9baa39ed455198a0ecefae', structure: "title", width: "auto", height: "20px" })), h("ui-skeleton", { key: '08e063c237b9fc8613ce993edd8206b887725ffc', structure: "rectangle", width: "auto", height: "35px" }))), h("section", { key: '522b7f10d8acc1ffc15632b13b405a5954c5f8b6', class: "ButtonsSection" }, h("div", { key: '21c219a0e03d6383cada154b7b509d68bc8b3b45', class: "Button" }, h("ui-skeleton", { key: 'cf6b5a9b39aabf387603a2d996ca62a57ab4775e', structure: "rectangle", width: "auto", height: "50px" }))))));
|
|
464
|
+
return (h("section", { key: 'cdf856b9dac4ffe1b0549e540aa0acdff32829d9', ref: el => this.stylingContainer = el }, this.isLoading ? skeleton : loginForm));
|
|
463
465
|
}
|
|
464
466
|
static get is() { return "pam-login"; }
|
|
465
467
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const getDeviceInformation = () => {
|
|
2
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3
|
+
const ua = navigator.userAgent;
|
|
4
|
+
const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
5
|
+
const isSmallScreen = window.matchMedia('(max-width: 768px)').matches;
|
|
6
|
+
const deviceType = isTouchDevice
|
|
7
|
+
? (isSmallScreen ? 'mobile' : 'tablet')
|
|
8
|
+
: 'desktop';
|
|
9
|
+
const os = /Windows NT/.test(ua) ? 'Windows' :
|
|
10
|
+
/Mac OS X/.test(ua) ? 'macOS' :
|
|
11
|
+
/Android/.test(ua) ? 'Android' :
|
|
12
|
+
/iPhone|iPad|iPod/.test(ua) ? 'iOS' :
|
|
13
|
+
/Linux/.test(ua) ? 'Linux' : '';
|
|
14
|
+
const osVersion = ((_a = ua.match(/Windows NT ([\d.]+)/)) === null || _a === void 0 ? void 0 : _a[1]) ||
|
|
15
|
+
((_c = (_b = ua.match(/Mac OS X ([\d_]+)/)) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.replace(/_/g, '.')) ||
|
|
16
|
+
((_d = ua.match(/Android ([\d.]+)/)) === null || _d === void 0 ? void 0 : _d[1]) ||
|
|
17
|
+
((_f = (_e = ua.match(/OS ([\d_]+)/)) === null || _e === void 0 ? void 0 : _e[1]) === null || _f === void 0 ? void 0 : _f.replace(/_/g, '.')) || '';
|
|
18
|
+
const [browser, browserVersion] = /Edg\//.test(ua) ? ['Edge', ((_g = ua.match(/Edg\/([\d.]+)/)) === null || _g === void 0 ? void 0 : _g[1]) || ''] :
|
|
19
|
+
/Chrome\//.test(ua) ? ['Chrome', ((_h = ua.match(/Chrome\/([\d.]+)/)) === null || _h === void 0 ? void 0 : _h[1]) || ''] :
|
|
20
|
+
/Firefox\//.test(ua) ? ['Firefox', ((_j = ua.match(/Firefox\/([\d.]+)/)) === null || _j === void 0 ? void 0 : _j[1]) || ''] :
|
|
21
|
+
/Safari\//.test(ua) ? ['Safari', ((_k = ua.match(/Version\/([\d.]+)/)) === null || _k === void 0 ? void 0 : _k[1]) || ''] : ['', ''];
|
|
22
|
+
return { deviceType, os, osVersion, browser, browserVersion };
|
|
23
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as PamLogin } from './pam-login-
|
|
1
|
+
export { P as PamLogin } from './pam-login-f075f8e5.js';
|
|
2
2
|
import './index-a126c540.js';
|
|
@@ -715,6 +715,30 @@ const translate$1 = (key, customLang, values) => {
|
|
|
715
715
|
return translation;
|
|
716
716
|
};
|
|
717
717
|
|
|
718
|
+
const getDeviceInformation = () => {
|
|
719
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
720
|
+
const ua = navigator.userAgent;
|
|
721
|
+
const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
722
|
+
const isSmallScreen = window.matchMedia('(max-width: 768px)').matches;
|
|
723
|
+
const deviceType = isTouchDevice
|
|
724
|
+
? (isSmallScreen ? 'mobile' : 'tablet')
|
|
725
|
+
: 'desktop';
|
|
726
|
+
const os = /Windows NT/.test(ua) ? 'Windows' :
|
|
727
|
+
/Mac OS X/.test(ua) ? 'macOS' :
|
|
728
|
+
/Android/.test(ua) ? 'Android' :
|
|
729
|
+
/iPhone|iPad|iPod/.test(ua) ? 'iOS' :
|
|
730
|
+
/Linux/.test(ua) ? 'Linux' : '';
|
|
731
|
+
const osVersion = ((_a = ua.match(/Windows NT ([\d.]+)/)) === null || _a === void 0 ? void 0 : _a[1]) ||
|
|
732
|
+
((_c = (_b = ua.match(/Mac OS X ([\d_]+)/)) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.replace(/_/g, '.')) ||
|
|
733
|
+
((_d = ua.match(/Android ([\d.]+)/)) === null || _d === void 0 ? void 0 : _d[1]) ||
|
|
734
|
+
((_f = (_e = ua.match(/OS ([\d_]+)/)) === null || _e === void 0 ? void 0 : _e[1]) === null || _f === void 0 ? void 0 : _f.replace(/_/g, '.')) || '';
|
|
735
|
+
const [browser, browserVersion] = /Edg\//.test(ua) ? ['Edge', ((_g = ua.match(/Edg\/([\d.]+)/)) === null || _g === void 0 ? void 0 : _g[1]) || ''] :
|
|
736
|
+
/Chrome\//.test(ua) ? ['Chrome', ((_h = ua.match(/Chrome\/([\d.]+)/)) === null || _h === void 0 ? void 0 : _h[1]) || ''] :
|
|
737
|
+
/Firefox\//.test(ua) ? ['Firefox', ((_j = ua.match(/Firefox\/([\d.]+)/)) === null || _j === void 0 ? void 0 : _j[1]) || ''] :
|
|
738
|
+
/Safari\//.test(ua) ? ['Safari', ((_k = ua.match(/Version\/([\d.]+)/)) === null || _k === void 0 ? void 0 : _k[1]) || ''] : ['', ''];
|
|
739
|
+
return { deviceType, os, osVersion, browser, browserVersion };
|
|
740
|
+
};
|
|
741
|
+
|
|
718
742
|
/**
|
|
719
743
|
* @license
|
|
720
744
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -22306,7 +22330,7 @@ const PamLogin = class {
|
|
|
22306
22330
|
* Get login token from password-management service
|
|
22307
22331
|
*/
|
|
22308
22332
|
this.getLoginToken = () => {
|
|
22309
|
-
const url = new URL('api/
|
|
22333
|
+
const url = new URL('/api/pam/v2/players/auth/password/verify', this.endpoint);
|
|
22310
22334
|
const headers = {
|
|
22311
22335
|
'Content-Type': 'application/json'
|
|
22312
22336
|
};
|
|
@@ -22315,7 +22339,8 @@ const PamLogin = class {
|
|
|
22315
22339
|
}
|
|
22316
22340
|
const body = {
|
|
22317
22341
|
contact: this.contactValue,
|
|
22318
|
-
password: this.passwordValue
|
|
22342
|
+
password: this.passwordValue,
|
|
22343
|
+
deviceInformation: getDeviceInformation()
|
|
22319
22344
|
};
|
|
22320
22345
|
const options = {
|
|
22321
22346
|
method: 'POST',
|
|
@@ -22606,7 +22631,7 @@ const PamLogin = class {
|
|
|
22606
22631
|
* @returns A Promise that resolves once the configuration is fetched and set.
|
|
22607
22632
|
*/
|
|
22608
22633
|
getLoginConfig() {
|
|
22609
|
-
const url = new URL('/api/
|
|
22634
|
+
const url = new URL('/api/pam/v2/players/auth/password/config', this.endpoint);
|
|
22610
22635
|
return new Promise((resolve, reject) => {
|
|
22611
22636
|
fetch(url.href)
|
|
22612
22637
|
.then((res) => {
|
|
@@ -22720,21 +22745,21 @@ const PamLogin = class {
|
|
|
22720
22745
|
* Render function
|
|
22721
22746
|
*/
|
|
22722
22747
|
render() {
|
|
22723
|
-
const visibilityIcon = h$2("span", { key: '
|
|
22748
|
+
const visibilityIcon = h$2("span", { key: 'bc4f37b766f01cbb1a2850b5365fc3f9deccbff5', class: "InputIcon" }, this.isPasswordVisible
|
|
22724
22749
|
? h$2("svg", { onClick: () => this.togglePassword(), class: "TogglePasswordVisibility", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.844", height: "12.887", viewBox: "0 0 18.844 12.887" }, h$2("g", { transform: "translate(-110.856 -23.242)" }, h$2("circle", { class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h$2("g", { transform: "translate(117.499 27.37)" }, h$2("path", { class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), h$2("path", { class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), h$2("g", { transform: "translate(110.856 24.899)" }, h$2("path", { class: "PasswordVisibilityIcon", d: "M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z", transform: "translate(-110.856 -33.157)" }), h$2("path", { class: "PasswordVisibilityIcon", d: "M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z", transform: "translate(-130.743 -29.617)" })), h$2("rect", { class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" })))
|
|
22725
22750
|
: h$2("svg", { onClick: () => this.togglePassword(), class: "TogglePasswordVisibility PasswordVisible", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.843", height: "10.5", viewBox: "0 0 18.843 10.5" }, h$2("g", { transform: "translate(-14.185 -27.832)" }, h$2("path", { class: "PasswordVisibilityIcon", d: "M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z", transform: "translate(0)" }), h$2("circle", { class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
|
|
22726
|
-
const loginForm = (h$2("div", { key: '
|
|
22751
|
+
const loginForm = (h$2("div", { key: '499004fc20af9725080c7718b3c29736f7febf30', class: "FormBox" }, h$2("div", { key: '14eed0c08e13e4b25ccccab51d8fa45634e67210', class: "FormValue", onKeyDown: this.handleSubmit }, this.loginByPhoneNumber === 'true'
|
|
22727
22752
|
? h$2("div", { class: (this.isContactValid && !this.apiErrorMessage) ? 'InputBox' : 'InputBox InputInvalidBox' }, h$2("div", { class: "PhoneInputBox" }, h$2("div", { class: "PrefixBox" }, h$2("vaadin-combo-box", { items: this.phoneCodes, value: this.phoneCodeValue, onChange: this.handleInputChangePartial('prefix') }), h$2("label", { class: (this.phoneCodeValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate$1('userPrefix', this.lang))), h$2("div", { class: "PhoneBox" }, h$2("input", { type: "text", placeholder: '', value: this.contactValue, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), h$2("label", { class: (this.contactValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate$1('userPhone', this.lang)))), !this.isContactValid &&
|
|
22728
22753
|
h$2("p", { class: "CredentialsError" }, translate$1('userPhoneError', this.lang)))
|
|
22729
22754
|
: h$2("div", { class: this.isContactValid ? 'InputBox' : 'InputBox InputInvalidBox' }, h$2("input", { type: "text", placeholder: '', value: this.contactValue, onInput: this.handleInputChangePartial('user'), autocapitalize: "none", required: true }), h$2("label", { class: (this.contactValue ? 'FieldFilledIn' : '') + ' ' + (this.isContactValid ? '' : 'FieldInvalid') }, translate$1('userEmail', this.lang)), !this.isContactValid &&
|
|
22730
|
-
h$2("p", { class: "CredentialsError" }, translate$1('userEmailError', this.lang))), h$2("div", { key: '
|
|
22731
|
-
h$2("p", { key: '
|
|
22732
|
-
h$2("div", { key: '
|
|
22733
|
-
h$2("slot", { key: '
|
|
22734
|
-
h$2("slot", { key: '
|
|
22735
|
-
h$2("p", { key: '
|
|
22736
|
-
const skeleton = (h$2("div", { key: '
|
|
22737
|
-
return (h$2("section", { key: '
|
|
22755
|
+
h$2("p", { class: "CredentialsError" }, translate$1('userEmailError', this.lang))), h$2("div", { key: 'ce16fe11a12292317a68a967fe7539fea6ebc5c6', class: this.isPasswordValid ? 'InputBox' : 'InputBox InputInvalidBox' }, visibilityIcon, h$2("input", { key: '663823ebab5711a5441ccde0f2337cc43f105b82', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.passwordValue, onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h$2("label", { key: '6d2f2ca82162161149f5c8f31a95da9248995e86', class: (this.passwordValue ? 'FieldFilledIn' : '') + ' ' + (this.isPasswordValid ? '' : 'FieldInvalid') }, translate$1('password', this.lang)), this.isPasswordValid ||
|
|
22756
|
+
h$2("p", { key: 'cd4ae3c08eb821c15f7b8f2d905eb3efbe01f126', class: "CredentialsError" }, translate$1('userPasswordError', this.lang))), this.passwordReset == 'true' &&
|
|
22757
|
+
h$2("div", { key: 'f533de8ea216ff532aed3467456057e402f48135', class: "ForgotPassword" }, h$2("button", { key: '01d9245dffd5b77531dad7edc6e23c7ebe81a33f', onClick: this.resetPassword }, translate$1('forgotPassword', this.lang))), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
|
|
22758
|
+
h$2("slot", { key: 'adfaf4df5f8fecb28a447297cb458a7160c3683e', name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
|
|
22759
|
+
h$2("slot", { key: '88ade9e7b049a1c79ddc174bf8030d42af02de61', name: "google" }), h$2("button", { key: 'e252177c7ee29890de9d3786d88e277642b6c53b', disabled: this.isSubmitDisabled(), class: "SubmitCredentials", onClick: this.handleLogin }, translate$1('login', this.lang)), this.apiErrorMessage &&
|
|
22760
|
+
h$2("p", { key: '41211b8531f0981183920fea4a929a019e2e9a5c', class: "CredentialsError" }, this.apiErrorMessage))));
|
|
22761
|
+
const skeleton = (h$2("div", { key: 'b196e18e7f3bd9c1a2ad5c7e656950cbad6169e2', class: "LoadingSkeleton" }, h$2("form", { key: '4b20b07b5d5f75a27edba1a2a58f428d14c224b4', class: "Form" }, h$2("section", { key: 'e9693d077413bbaba63bf0099ade2bdad45220e9', class: "FieldsSection" }, h$2("div", { key: 'c1f43ada02950ee0e77aad32998e9965499ea6ca', class: "FieldContainer" }, h$2("div", { key: '0a12202e333abd9a329a4f3240472079067e617d', class: "FieldTitle" }, h$2("ui-skeleton", { key: 'd7ace8e2a823d2aa825e8d51fc0292faf471bc2d', structure: "title", width: "auto", height: "20px" })), h$2("ui-skeleton", { key: '75949006b49514482a05a907aea7b1b1032a9694', structure: "rectangle", width: "auto", height: "35px" })), h$2("div", { key: '4d4d1e332b3184a44f3a7edca8a1d67a549cf903', class: "FieldContainer" }, h$2("div", { key: '7c94821464d7fb01ce4fa0a5fcf937d0f5bad5d6', class: "FieldTitle" }, h$2("ui-skeleton", { key: 'c3e44caf47b84e830f9baa39ed455198a0ecefae', structure: "title", width: "auto", height: "20px" })), h$2("ui-skeleton", { key: '08e063c237b9fc8613ce993edd8206b887725ffc', structure: "rectangle", width: "auto", height: "35px" }))), h$2("section", { key: '522b7f10d8acc1ffc15632b13b405a5954c5f8b6', class: "ButtonsSection" }, h$2("div", { key: '21c219a0e03d6383cada154b7b509d68bc8b3b45', class: "Button" }, h$2("ui-skeleton", { key: 'cf6b5a9b39aabf387603a2d996ca62a57ab4775e', structure: "rectangle", width: "auto", height: "50px" }))))));
|
|
22762
|
+
return (h$2("section", { key: 'cdf856b9dac4ffe1b0549e540aa0acdff32829d9', ref: el => this.stylingContainer = el }, this.isLoading ? skeleton : loginForm));
|
|
22738
22763
|
}
|
|
22739
22764
|
static get watchers() { return {
|
|
22740
22765
|
"translationUrl": ["handleNewTranslations"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as pam_login } from './pam-login-
|
|
1
|
+
export { P as pam_login } from './pam-login-f075f8e5.js';
|
|
2
2
|
import { r as registerInstance, h, H as Host } from './index-a126c540.js';
|
|
3
3
|
|
|
4
4
|
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{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)}.SkeletonCircle{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%}.SkeletonText{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)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{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)}.SkeletonImage{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)}.SkeletonLogo{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)}}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PamLogin}from"./pam-login-
|
|
1
|
+
export{P as PamLogin}from"./pam-login-f075f8e5.js";import"./index-a126c540.js";
|