@everymatrix/pam-forgot-password 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/checkbox-group-input_14.cjs.entry.js +12780 -0
  3. package/dist/cjs/index-92e25484.js +1322 -0
  4. package/dist/cjs/index.cjs.js +10 -0
  5. package/dist/cjs/loader.cjs.js +15 -0
  6. package/dist/cjs/pam-forgot-password-71bc2709.js +603 -0
  7. package/dist/cjs/pam-forgot-password.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +36 -0
  9. package/dist/collection/components/pam-forgot-password/index.js +1 -0
  10. package/dist/collection/components/pam-forgot-password/pam-forgot-password.css +152 -0
  11. package/dist/collection/components/pam-forgot-password/pam-forgot-password.js +461 -0
  12. package/dist/collection/components/pam-forgot-password/pam-forgot-password.stories.js +42 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/collection/utils/locale.utils.js +210 -0
  15. package/dist/collection/utils/types.js +1 -0
  16. package/dist/collection/utils/utils.js +20 -0
  17. package/dist/esm/app-globals-0f993ce5.js +3 -0
  18. package/dist/esm/checkbox-group-input_14.entry.js +12763 -0
  19. package/dist/esm/index-6f00d158.js +1293 -0
  20. package/dist/esm/index.js +2 -0
  21. package/dist/esm/loader.js +11 -0
  22. package/dist/esm/pam-forgot-password-0f76562c.js +601 -0
  23. package/dist/esm/pam-forgot-password.js +20 -0
  24. package/dist/index.cjs.js +1 -0
  25. package/dist/index.js +1 -0
  26. package/dist/pam-forgot-password/index.esm.js +1 -0
  27. package/dist/pam-forgot-password/p-587a67ef.entry.js +5614 -0
  28. package/dist/pam-forgot-password/p-e1255160.js +1 -0
  29. package/dist/pam-forgot-password/p-f10ac9f7.js +1 -0
  30. package/dist/pam-forgot-password/p-f5cf4939.js +2 -0
  31. package/dist/pam-forgot-password/pam-forgot-password.esm.js +1 -0
  32. package/dist/stencil.config.dev.js +17 -0
  33. package/dist/stencil.config.js +18 -0
  34. package/dist/storybook/main.js +47 -0
  35. package/dist/storybook/preview.js +9 -0
  36. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  37. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/stencil.config.d.ts +2 -0
  38. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/stencil.config.dev.d.ts +2 -0
  39. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/storybook/main.d.ts +3 -0
  40. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/storybook/preview.d.ts +70 -0
  41. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/index.d.ts +3 -0
  42. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  43. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  44. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  45. package/dist/types/components/pam-forgot-password/index.d.ts +1 -0
  46. package/dist/types/components/pam-forgot-password/pam-forgot-password.d.ts +144 -0
  47. package/dist/types/components/pam-forgot-password/pam-forgot-password.stories.d.ts +5 -0
  48. package/dist/types/components.d.ts +79 -0
  49. package/dist/types/index.d.ts +1 -0
  50. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  51. package/dist/types/utils/locale.utils.d.ts +2 -0
  52. package/dist/types/utils/types.d.ts +45 -0
  53. package/dist/types/utils/utils.d.ts +2 -0
  54. package/loader/cdn.js +1 -0
  55. package/loader/index.cjs.js +1 -0
  56. package/loader/index.d.ts +24 -0
  57. package/loader/index.es2017.js +1 -0
  58. package/loader/index.js +2 -0
  59. package/loader/package.json +11 -0
  60. package/package.json +26 -0
@@ -0,0 +1,2 @@
1
+ export { P as PamForgotPassword } from './pam-forgot-password-0f76562c.js';
2
+ import './index-6f00d158.js';
@@ -0,0 +1,11 @@
1
+ import { b as bootstrapLazy } from './index-6f00d158.js';
2
+ export { s as setNonce } from './index-6f00d158.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ const defineCustomElements = async (win, options) => {
6
+ if (typeof window === 'undefined') return undefined;
7
+ await globalScripts();
8
+ return bootstrapLazy([["checkbox-group-input_14",[[1,"pam-forgot-password",{"endpoint":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"contactType":[32],"isBtnSubmitEnabled":[32],"skeletonLoading":[32],"hasError":[32],"isMobile":[32],"captchaData":[32],"errorMessage":[32]},[[0,"sendValidityState","sendValidityStateHandler"],[0,"sendInputValue","sendInputValueHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"],"dateFormat":[513,"date-format"],"translationUrl":[513,"translation-url"],"emitOnClick":[516,"emit-on-click"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"]}],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32],"showCheckboxes":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"selectedValues":["setValue"],"emitValue":["emitValueHandler"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"emitOnClick":[516,"emit-on-click"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"value":["valueChanged"],"emitValue":["emitValueHandler"]}],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"],[16,"validationChange","handleValidationChange"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}]]]], options);
9
+ };
10
+
11
+ export { defineCustomElements };
@@ -0,0 +1,601 @@
1
+ import { r as registerInstance, h } from './index-6f00d158.js';
2
+
3
+ const DEFAULT_LANGUAGE = 'en';
4
+ const TRANSLATIONS = {
5
+ en: {
6
+ "title": "Forgot Password",
7
+ "dropdownDisplayName": "Contact",
8
+ "telDisplayName": "Phone Number",
9
+ "telPlaceholder": "0000000000",
10
+ "emailDisplayName": "Email",
11
+ "emailPlaceholder": "Enter your email",
12
+ "usernameDisplayName": "Username",
13
+ "usernamePlaceholder": "Enter your username",
14
+ "firstNameDisplayName": "First Name",
15
+ "firstNamePlaceholder": "Enter your first name",
16
+ "dateOfBirthDisplayName": "Date of Birth",
17
+ "dateOfBirthPlaceholder": "1911-11-11",
18
+ "loading": "Loading ...",
19
+ "submitError": "Something went wrong. Please try again later",
20
+ "configError": "Something went wrong. Please try again later",
21
+ "successMsg": "If your account exists, a reset link is on its way",
22
+ "btnSubmit": "submit",
23
+ "sms": "sms",
24
+ "email": "email"
25
+ },
26
+ ro: {
27
+ "title": "Parolă uitată",
28
+ "dropdownDisplayName": "Contact",
29
+ "telDisplayName": "Număr de telefon",
30
+ "telPlaceholder": "0000000000",
31
+ "emailDisplayName": "Email",
32
+ "emailPlaceholder": "Introduceți emailul dvs.",
33
+ "usernameDisplayName": "Nume de utilizator",
34
+ "usernamePlaceholder": "Introduceți numele dvs. de utilizator",
35
+ "firstNameDisplayName": "Prenume",
36
+ "firstNamePlaceholder": "Introduceți prenumele dvs.",
37
+ "dateOfBirthDisplayName": "Data nașterii",
38
+ "dateOfBirthPlaceholder": "1911-11-11",
39
+ "loading": "Se încarcă ...",
40
+ "submitError": "Ceva nu a mers bine. Vă rugăm să încercați din nou mai târziu",
41
+ "configError": "Ceva nu a mers bine. Vă rugăm să încercați din nou mai târziu",
42
+ "successMsg": "Dacă contul dvs. există, un link de resetare este va fi trimis",
43
+ "btnSubmit": "Trimite",
44
+ "sms": "sms",
45
+ "email": "email"
46
+ },
47
+ fr: {
48
+ "title": "Mot de passe oublié",
49
+ "dropdownDisplayName": "Contact",
50
+ "telDisplayName": "Numéro de téléphone",
51
+ "telPlaceholder": "0000000000",
52
+ "emailDisplayName": "Email",
53
+ "emailPlaceholder": "Entrez votre email",
54
+ "usernameDisplayName": "Nom d'utilisateur",
55
+ "usernamePlaceholder": "Entrez votre nom d'utilisateur",
56
+ "firstNameDisplayName": "Prénom",
57
+ "firstNamePlaceholder": "Entrez votre prénom",
58
+ "dateOfBirthDisplayName": "Date de naissance",
59
+ "dateOfBirthPlaceholder": "1911-11-11",
60
+ "loading": "Chargement ...",
61
+ "submitError": "Un problème est survenu. Veuillez réessayer plus tard",
62
+ "configError": "Un problème est survenu. Veuillez réessayer plus tard",
63
+ "successMsg": "Si votre compte existe, un lien de réinitialisation est en route",
64
+ "btnSubmit": "soumettre",
65
+ "sms": "sms",
66
+ "email": "email"
67
+ },
68
+ hu: {
69
+ "title": "Elfelejtett jelszó",
70
+ "dropdownDisplayName": "Kapcsolat",
71
+ "telDisplayName": "Telefonszám",
72
+ "telPlaceholder": "0000000000",
73
+ "emailDisplayName": "Email",
74
+ "emailPlaceholder": "Adja meg az email címét",
75
+ "usernameDisplayName": "Felhasználónév",
76
+ "usernamePlaceholder": "Adja meg a felhasználónevét",
77
+ "firstNameDisplayName": "Keresztnév",
78
+ "firstNamePlaceholder": "Adja meg a keresztnevét",
79
+ "dateOfBirthDisplayName": "Születési dátum",
80
+ "dateOfBirthPlaceholder": "1911-11-11",
81
+ "loading": "Betöltés ...",
82
+ "submitError": "Valami hiba történt. Kérjük, próbálja meg később",
83
+ "configError": "Valami hiba történt. Kérjük, próbálja meg később",
84
+ "successMsg": "Ha létezik a fiókja, egy visszaállítási link úton van",
85
+ "btnSubmit": "Beküldés",
86
+ "sms": "sms",
87
+ "email": "email"
88
+ },
89
+ tr: {
90
+ "title": "Şifremi Unuttum",
91
+ "dropdownDisplayName": "İletişim",
92
+ "telDisplayName": "Telefon Numarası",
93
+ "telPlaceholder": "0000000000",
94
+ "emailDisplayName": "E-posta",
95
+ "emailPlaceholder": "E-postanızı girin",
96
+ "usernameDisplayName": "Kullanıcı Adı",
97
+ "usernamePlaceholder": "Kullanıcı adınızı girin",
98
+ "firstNameDisplayName": "İsim",
99
+ "firstNamePlaceholder": "İsminizi girin",
100
+ "dateOfBirthDisplayName": "Doğum Tarihi",
101
+ "dateOfBirthPlaceholder": "1911-11-11",
102
+ "loading": "Yükleniyor ...",
103
+ "submitError": "Bir şeyler ters gitti. Lütfen daha sonra tekrar deneyin",
104
+ "configError": "Bir şeyler ters gitti. Lütfen daha sonra tekrar deneyin",
105
+ "successMsg": "Hesabınız varsa, bir sıfırlama bağlantısı yolda",
106
+ "btnSubmit": "Gönder",
107
+ "sms": "sms",
108
+ "email": "e-posta"
109
+ },
110
+ el: {
111
+ "title": "Ξεχάσατε τον κωδικό;",
112
+ "dropdownDisplayName": "Επικοινωνία",
113
+ "telDisplayName": "Αριθμός τηλεφώνου",
114
+ "telPlaceholder": "0000000000",
115
+ "emailDisplayName": "Email",
116
+ "emailPlaceholder": "Εισάγετε το email σας",
117
+ "usernameDisplayName": "Όνομα χρήστη",
118
+ "usernamePlaceholder": "Εισάγετε το όνομα χρήστη σας",
119
+ "firstNameDisplayName": "Όνομα",
120
+ "firstNamePlaceholder": "Εισάγετε το όνομά σας",
121
+ "dateOfBirthDisplayName": "Ημερομηνία γέννησης",
122
+ "dateOfBirthPlaceholder": "1911-11-11",
123
+ "loading": "Φόρτωση ...",
124
+ "submitError": "Κάτι πήγε στραβά. Παρακαλούμε δοκιμάστε ξανά αργότερα",
125
+ "configError": "Κάτι πήγε στραβά. Παρακαλούμε δοκιμάστε ξανά αργότερα",
126
+ "successMsg": "Αν ο λογαριασμός σας υπάρχει, ένας σύνδεσμος επαναφοράς είναι καθ' οδόν",
127
+ "btnSubmit": "υποβάλλουν",
128
+ "sms": "sms",
129
+ "email": "email"
130
+ },
131
+ es: {
132
+ "title": "Olvidé mi contraseña",
133
+ "dropdownDisplayName": "Contacto",
134
+ "telDisplayName": "Número de teléfono",
135
+ "telPlaceholder": "0000000000",
136
+ "emailDisplayName": "Correo electrónico",
137
+ "emailPlaceholder": "Introduce tu correo electrónico",
138
+ "usernameDisplayName": "Nombre de usuario",
139
+ "usernamePlaceholder": "Introduce tu nombre de usuario",
140
+ "firstNameDisplayName": "Nombre",
141
+ "firstNamePlaceholder": "Introduce tu nombre",
142
+ "dateOfBirthDisplayName": "Fecha de nacimiento",
143
+ "dateOfBirthPlaceholder": "1911-11-11",
144
+ "loading": "Cargando ...",
145
+ "submitError": "Algo salió mal. Por favor, inténtalo de nuevo más tarde",
146
+ "configError": "Algo salió mal. Por favor, inténtalo de nuevo más tarde",
147
+ "successMsg": "Si tu cuenta existe, un enlace de restablecimiento está en camino",
148
+ "btnSubmit": "enviar",
149
+ "sms": "sms",
150
+ "email": "email"
151
+ },
152
+ pt: {
153
+ "title": "Esqueci a Senha",
154
+ "dropdownDisplayName": "Contato",
155
+ "telDisplayName": "Número de Telefone",
156
+ "telPlaceholder": "0000000000",
157
+ "emailDisplayName": "Email",
158
+ "emailPlaceholder": "Digite seu email",
159
+ "usernameDisplayName": "Nome de Usuário",
160
+ "usernamePlaceholder": "Digite seu nome de usuário",
161
+ "firstNameDisplayName": "Nome",
162
+ "firstNamePlaceholder": "Digite seu nome",
163
+ "dateOfBirthDisplayName": "Data de Nascimento",
164
+ "dateOfBirthPlaceholder": "1911-11-11",
165
+ "loading": "Carregando ...",
166
+ "submitError": "Algo deu errado. Por favor, tente novamente mais tarde",
167
+ "configError": "Algo deu errado. Por favor, tente novamente mais tarde",
168
+ "successMsg": "Se sua conta existir, um link de redefinição está a caminho",
169
+ "btnSubmit": "enviar",
170
+ "sms": "sms",
171
+ "email": "email"
172
+ },
173
+ hr: {
174
+ "title": "Zaboravljena lozinka",
175
+ "dropdownDisplayName": "Kontakt",
176
+ "telDisplayName": "Broj telefona",
177
+ "telPlaceholder": "0000000000",
178
+ "emailDisplayName": "E-mail",
179
+ "emailPlaceholder": "Unesite svoj e-mail",
180
+ "usernameDisplayName": "Korisničko ime",
181
+ "usernamePlaceholder": "Unesite svoje korisničko ime",
182
+ "firstNameDisplayName": "Ime",
183
+ "firstNamePlaceholder": "Unesite svoje ime",
184
+ "dateOfBirthDisplayName": "Datum rođenja",
185
+ "dateOfBirthPlaceholder": "1911-11-11",
186
+ "loading": "Učitavanje ...",
187
+ "submitError": "Nešto je pošlo po zlu. Molimo pokušajte ponovno kasnije",
188
+ "configError": "Nešto je pošlo po zlu. Molimo pokušajte ponovno kasnije",
189
+ "successMsg": "Ako vaš račun postoji, poveznica za poništavanje lozinke je na putu",
190
+ "btnSubmit": "pošalji",
191
+ "sms": "sms",
192
+ "email": "email"
193
+ },
194
+ };
195
+ const getTranslations = (url) => {
196
+ return new Promise((resolve) => {
197
+ fetch(url)
198
+ .then((res) => res.json())
199
+ .then((data) => {
200
+ Object.keys(data).forEach((item) => {
201
+ for (let key in data[item]) {
202
+ TRANSLATIONS[item][key] = data[item][key];
203
+ }
204
+ });
205
+ resolve(true);
206
+ });
207
+ });
208
+ };
209
+ const translate = (key, customLang) => {
210
+ const lang = customLang;
211
+ return TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
212
+ };
213
+
214
+ function checkDeviceType() {
215
+ const userAgent = navigator.userAgent.toLowerCase();
216
+ const width = screen.availWidth;
217
+ const height = screen.availHeight;
218
+ if (userAgent.includes('iphone')) {
219
+ return 'mobile';
220
+ }
221
+ if (userAgent.includes('android')) {
222
+ if (height > width && width < 800) {
223
+ return 'mobile';
224
+ }
225
+ if (width > height && height < 800) {
226
+ return 'tablet';
227
+ }
228
+ }
229
+ return 'desktop';
230
+ }
231
+
232
+ /**
233
+ * @name setClientStyling
234
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
235
+ * @param {HTMLElement} stylingContainer The reference element of the widget
236
+ * @param {string} clientStyling The style content
237
+ */
238
+ function setClientStyling(stylingContainer, clientStyling) {
239
+ if (stylingContainer) {
240
+ const sheet = document.createElement('style');
241
+ sheet.innerHTML = clientStyling;
242
+ stylingContainer.appendChild(sheet);
243
+ }
244
+ }
245
+
246
+ /**
247
+ * @name setClientStylingURL
248
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
249
+ * @param {HTMLElement} stylingContainer The reference element of the widget
250
+ * @param {string} clientStylingUrl The URL of the style content
251
+ */
252
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
253
+ const url = new URL(clientStylingUrl);
254
+
255
+ fetch(url.href)
256
+ .then((res) => res.text())
257
+ .then((data) => {
258
+ const cssFile = document.createElement('style');
259
+ cssFile.innerHTML = data;
260
+ if (stylingContainer) {
261
+ stylingContainer.appendChild(cssFile);
262
+ }
263
+ })
264
+ .catch((err) => {
265
+ console.error('There was an error while trying to load client styling from URL', err);
266
+ });
267
+ }
268
+
269
+ /**
270
+ * @name setStreamLibrary
271
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
272
+ * @param {HTMLElement} stylingContainer The highest element of the widget
273
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
274
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
275
+ */
276
+ function setStreamStyling(stylingContainer, domain, subscription) {
277
+ if (window.emMessageBus) {
278
+ const sheet = document.createElement('style');
279
+
280
+ window.emMessageBus.subscribe(domain, (data) => {
281
+ sheet.innerHTML = data;
282
+ if (stylingContainer) {
283
+ stylingContainer.appendChild(sheet);
284
+ }
285
+ });
286
+ }
287
+ }
288
+
289
+ const pamForgotPasswordCss = "::host {\n display: block;\n}\n\n.PlayerForgotPassword {\n font-family: inherit;\n width: 100%;\n height: 100%;\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 container-type: inline-size;\n}\n.PlayerForgotPassword .Error {\n font-size: var(--emw--font-size-x-small, 12px);\n color: var(--emw--color-error, #ed0909);\n}\n.PlayerForgotPassword .Loading {\n font-size: var(--emw--font-size-x-small, 12px);\n color: var(--emw--color-primary, #22B04E);\n}\n.PlayerForgotPassword .Title {\n background-color: transparent;\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emw--color-primary, #22B04E);\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PlayerForgotPassword .TitleMobile {\n font-size: var(--emw--font-size-x-large, 20px);\n color: var(--emw--color-primary, #22B04E);\n}\n.PlayerForgotPassword svg {\n fill: var(--emw--color-primary, #22B04E);\n}\n.PlayerForgotPassword .ButtonReturn {\n display: none;\n font-family: inherit;\n align-items: center;\n gap: 10px;\n}\n.PlayerForgotPassword .Form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.PlayerForgotPassword .Form .FieldsSection {\n display: flex;\n flex-direction: column;\n gap: 30px;\n}\n.PlayerForgotPassword .Form .ContactWrapper {\n display: flex;\n flex-direction: row;\n width: 100%;\n gap: 5px;\n}\n.PlayerForgotPassword .Form .ContactWrapper .Select {\n width: 25%;\n}\n.PlayerForgotPassword .Form .ContactWrapper .Contact {\n width: 100%;\n}\n.PlayerForgotPassword .Form .ContactWrapperMobile {\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 30px;\n}\n.PlayerForgotPassword .Form .ContactWrapperMobile .Select {\n width: 100%;\n}\n.PlayerForgotPassword .Form .ContactWrapperMobile .Contact {\n width: 100%;\n}\n.PlayerForgotPassword .Form .ButtonsSection {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.PlayerForgotPassword .Button {\n font-family: inherit;\n border-radius: var(--emw--button-border-radius, var(--emw--border-radius-large, 50px));\n background: var(--emw--button-background-color, var(--emw--color-primary, #22B04E));\n border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #22B04E));\n color: var(--emw--button-text-color, var(--emw--color-white, #FFFFFF));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-normal, 400);\n height: 50px;\n width: 100%;\n text-transform: uppercase;\n cursor: pointer;\n}\n.PlayerForgotPassword .Button:disabled {\n background: var(--emw--color-gray-100, #E6E6E6);\n border: var(--emw--button-border, 1px solid var(--emw--button-border-color, #828282));\n pointer-events: none;\n cursor: not-allowed;\n}\n.PlayerForgotPassword.skeleton .Form .ButtonReturn {\n width: 150px;\n height: 30px;\n margin-top: 15px;\n display: block;\n}\n.PlayerForgotPassword.skeleton .Form .FieldsSection {\n display: block;\n}\n.PlayerForgotPassword.skeleton .Form .FieldsSection .FieldContainer .FieldTitle {\n width: 100px;\n margin-top: 30px;\n margin-bottom: 15px;\n}\n.PlayerForgotPassword.skeleton .Form .ButtonsSection .Button {\n font-family: inherit;\n border-radius: 50px;\n background: transparent;\n border: none;\n overflow: hidden;\n}\n@container (max-width: 425px) {\n .PlayerForgotPassword .Form .ButtonReturn {\n display: inline-flex;\n }\n .PlayerForgotPassword .Form .Title {\n display: none;\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}";
290
+ const PamForgotPasswordStyle0 = pamForgotPasswordCss;
291
+
292
+ const PamForgotPassword = class {
293
+ constructor(hostRef) {
294
+ registerInstance(this, hostRef);
295
+ this.isContactValid = false;
296
+ this.validation = { mandatory: true, custom: [] };
297
+ /**
298
+ * Handles the submission of the forgot password request.
299
+ *
300
+ * @param e - The event object from the form submission.
301
+ */
302
+ this.submitRequest = (e) => {
303
+ e.preventDefault();
304
+ // Construct the request URL
305
+ const url = new URL('/api/v1/players/password-management/password/forgot/request', this.endpoint);
306
+ // Set up request headers
307
+ const headers = new Headers();
308
+ if (this.captchaData.isEnabled && this.captchaData.token) {
309
+ headers.append('X-Captcha-Response', this.captchaData.token);
310
+ }
311
+ headers.append('Content-Type', 'application/json');
312
+ // Create the request body
313
+ const requestBody = JSON.stringify({ contact: this.contact });
314
+ // Define request parameters
315
+ const requestParams = {
316
+ method: 'POST',
317
+ headers: headers,
318
+ body: requestBody,
319
+ };
320
+ // Send the request
321
+ fetch(url.href, requestParams)
322
+ .then((response) => response.json())
323
+ .then((data) => {
324
+ if (!data.errorCode) {
325
+ // Success: Notify the parent window
326
+ window.postMessage({ type: 'ForgotPasswordSuccess' });
327
+ window.postMessage({ type: 'WidgetNotification', data: { type: 'success', message: translate('successMsg', this.language) } }, window.location.href);
328
+ }
329
+ else {
330
+ // API responded with an error
331
+ this.sendErrorNotification(translate('submitError', this.language));
332
+ }
333
+ })
334
+ .catch(() => {
335
+ // Network or server error
336
+ this.sendErrorNotification(translate('submitError', this.language));
337
+ });
338
+ };
339
+ /**
340
+ * Toggles the player account menu visibility.
341
+ *
342
+ * Sends a post message to notify that the player account menu has been activated.
343
+ */
344
+ this.toggleScreen = () => {
345
+ window.postMessage({ type: 'PlayerAccountMenuActive', isMobile: this.isMobile }, window.location.href);
346
+ };
347
+ this.endpoint = undefined;
348
+ this.language = undefined;
349
+ this.clientStyling = undefined;
350
+ this.clientStylingUrl = undefined;
351
+ this.mbSource = undefined;
352
+ this.translationUrl = undefined;
353
+ this.contactType = '';
354
+ this.isBtnSubmitEnabled = false;
355
+ this.skeletonLoading = true;
356
+ this.hasError = false;
357
+ this.isMobile = checkDeviceType() === 'mobile' || checkDeviceType() === 'tablet';
358
+ this.captchaData = {
359
+ isEnabled: true,
360
+ token: '',
361
+ provider: '',
362
+ siteKey: ''
363
+ };
364
+ this.errorMessage = '';
365
+ }
366
+ /**
367
+ * Checks for input validity and set the flags accordingly.
368
+ */
369
+ sendValidityStateHandler(e) {
370
+ if (e.detail.name === 'contact') {
371
+ this.isContactValid = e.detail.valid;
372
+ return;
373
+ }
374
+ }
375
+ /**
376
+ * Handles the 'sendInputValue' event to update component state based on the input field name.
377
+ *
378
+ * This function listens for a custom event that carries input values and updates corresponding properties:
379
+ * - Updates `contactType` if the input name is 'dropdown'.
380
+ * - Parses and assigns `contact` if the input name is 'contact' (handles phone numbers separately).
381
+ *
382
+ * Also determines whether the submit button should be enabled based on the validity of the inputs.
383
+ *
384
+ * @param {CustomEvent<InputValueEvent>} e - The custom event containing input details.
385
+ */
386
+ sendInputValueHandler(e) {
387
+ switch (e.detail.name) {
388
+ case 'dropdown':
389
+ this.contactType = e.detail.value.toLowerCase();
390
+ break;
391
+ case 'contact':
392
+ this.contact = e.detail.value;
393
+ break;
394
+ }
395
+ this.updateSubmitButtonState();
396
+ }
397
+ /**
398
+ * Updates the state of the submit button based on form validation rules.
399
+ *
400
+ * The button is enabled only if:
401
+ * - The contact (email) input is valid.
402
+ * - CAPTCHA is either disabled or has a valid token.
403
+ */
404
+ updateSubmitButtonState() {
405
+ this.isBtnSubmitEnabled = this.isContactValid &&
406
+ !!this.contact &&
407
+ (!this.captchaData.isEnabled || !!this.captchaData.token);
408
+ }
409
+ /**
410
+ * Watch for changes in the client styling and apply the new styling
411
+ *
412
+ * @param newValue - new client styling
413
+ * @param oldValue - previous client styling
414
+ */
415
+ handleClientStylingChange(newValue, oldValue) {
416
+ if (newValue != oldValue) {
417
+ setClientStyling(this.stylingContainer, this.clientStyling);
418
+ }
419
+ }
420
+ /**
421
+ * Watch for changes in the client styling URL and fetch the new CSS
422
+ *
423
+ * @param newValue - new client styling URL
424
+ * @param oldValue - previous client styling URL
425
+ */
426
+ handleClientStylingUrlChange(newValue, oldValue) {
427
+ if (newValue != oldValue) {
428
+ if (this.clientStylingUrl)
429
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
430
+ }
431
+ }
432
+ /**
433
+ * Send error notification as a post message
434
+ */
435
+ sendErrorNotification(errorMessage) {
436
+ window.postMessage({ type: "HasError", error: errorMessage }, window.location.href);
437
+ window.postMessage({
438
+ type: 'WidgetNotification', data: {
439
+ type: 'error',
440
+ message: errorMessage
441
+ }
442
+ }, window.location.href);
443
+ }
444
+ /**
445
+ * Get the translations and get the configuration.
446
+ *
447
+ * Called once just after the component is first connected to the DOM.
448
+ */
449
+ async componentWillLoad() {
450
+ // Get translations
451
+ if (this.translationUrl) {
452
+ await getTranslations(this.translationUrl);
453
+ }
454
+ // Get widget config
455
+ this.getConfig().then(() => {
456
+ this.appendCaptchaScript();
457
+ }).catch((error) => {
458
+ console.error(error);
459
+ this.hasError = true;
460
+ this.errorMessage = translate('configError', this.language);
461
+ this.sendErrorNotification(this.errorMessage);
462
+ }).finally(() => {
463
+ this.skeletonLoading = false;
464
+ });
465
+ }
466
+ /**
467
+ * Set the styling for the widget once it's loaded.
468
+ *
469
+ * Called once just after the component is fully loaded and the first render() occurs.
470
+ */
471
+ componentDidLoad() {
472
+ if (this.stylingContainer) {
473
+ if (window.emMessageBus != undefined) {
474
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
475
+ }
476
+ else {
477
+ if (this.clientStyling)
478
+ setClientStyling(this.stylingContainer, this.clientStyling);
479
+ if (this.clientStylingUrl)
480
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
481
+ }
482
+ }
483
+ }
484
+ /**
485
+ * Fetches the forgot password configuration from the backend API.
486
+ *
487
+ * @returns A Promise that resolves once the configuration is fetched and set.
488
+ */
489
+ getConfig() {
490
+ const url = new URL('/api/v1/players/password-management/password/forgot/config', this.endpoint);
491
+ return new Promise((resolve, reject) => {
492
+ fetch(url.href)
493
+ .then((res) => {
494
+ if (!res.ok) {
495
+ throw new Error(`HTTP error! Status: ${res.status}`);
496
+ }
497
+ return res.json();
498
+ })
499
+ .then((res) => {
500
+ const { captcha } = res;
501
+ if (captcha && typeof captcha.provider === 'string') {
502
+ captcha.provider = captcha.provider.toLowerCase();
503
+ }
504
+ this.captchaData = Object.assign({}, captcha);
505
+ resolve();
506
+ })
507
+ .catch((error) => {
508
+ console.error('Error fetching login configuration:', error);
509
+ reject(error);
510
+ });
511
+ });
512
+ }
513
+ /**
514
+ * Dynamically loads the captcha script and renders it when ready.
515
+ *
516
+ * @param src - The URL of the CAPTCHA script to load.
517
+ * @param captcha - The CAPTCHA configuration.
518
+ */
519
+ appendCaptchaScript() {
520
+ const { isEnabled, provider } = this.captchaData;
521
+ if (!isEnabled) {
522
+ return;
523
+ }
524
+ const script = document.createElement('script');
525
+ if (provider === 'cloudflare') {
526
+ script.src = 'https://challenges.cloudflare.com/turnstile/v0/api.js';
527
+ }
528
+ else if (provider === 'google') {
529
+ script.src = 'https://www.google.com/recaptcha/api.js';
530
+ }
531
+ script.onload = this.handleCaptcha.bind(this);
532
+ document.head.appendChild(script);
533
+ }
534
+ /**
535
+ * Handles the integration of CAPTCHA based on the login configuration.
536
+ * Dynamically injects the necessary CAPTCHA script if enabled.
537
+ */
538
+ handleCaptcha() {
539
+ const { isEnabled, provider, siteKey } = this.captchaData;
540
+ if (!isEnabled) {
541
+ return;
542
+ }
543
+ if (!['cloudflare', 'google'].includes(provider)) {
544
+ return;
545
+ }
546
+ if (provider === 'cloudflare') {
547
+ window.turnstile.render('#turnstileContainer', {
548
+ sitekey: siteKey,
549
+ theme: 'light',
550
+ callback: this.captchaCallback.bind(this),
551
+ });
552
+ }
553
+ else if (provider === 'google') {
554
+ window.grecaptcha.ready(() => {
555
+ window.grecaptcha.render('googleContainer', {
556
+ sitekey: siteKey,
557
+ callback: this.captchaCallback.bind(this),
558
+ theme: 'light'
559
+ });
560
+ });
561
+ }
562
+ }
563
+ /**
564
+ * Common callback function for CAPTCHA response handling.
565
+ * @param token CAPTCHA response token.
566
+ */
567
+ captchaCallback(token) {
568
+ this.captchaData.token = token;
569
+ this.captchaData = Object.assign({}, this.captchaData); // Needed to tell Stencil something was changed
570
+ this.updateSubmitButtonState();
571
+ }
572
+ /**
573
+ * Lifecycle method: Clean up event listeners for styling.
574
+ * Called every time the component is disconnected from the DOM
575
+ */
576
+ disconnectedCallback() {
577
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
578
+ }
579
+ /**
580
+ * The render function.
581
+ */
582
+ render() {
583
+ if (this.skeletonLoading) {
584
+ return h("div", { class: "PlayerForgotPassword skeleton" }, h("form", { class: "Form" }, h("div", { class: "ButtonReturn" }, h("ui-skeleton", { structure: "text", width: "auto", height: "30px" })), h("section", { class: "FieldsSection" }, h("div", { class: "FieldContainer" }, h("div", { class: "FieldTitle" }, h("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), h("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" }))), h("section", { class: "ButtonsSection" }, h("div", { class: "Button" }, h("ui-skeleton", { structure: "rectangle", width: "auto", height: "50px" })))));
585
+ }
586
+ if (this.hasError) {
587
+ return h("div", { class: "PlayerForgotPassword", ref: el => this.stylingContainer = el }, h("h4", { class: "Error" }, translate('configError', this.language)));
588
+ }
589
+ return h("div", { class: "PlayerForgotPassword", ref: el => this.stylingContainer = el }, h("form", { action: ".", class: "Form" }, h("div", { class: "ButtonReturn", 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", { class: "TitleMobile" }, translate('title', this.language))), h("h2", { class: "Title" }, translate('title', this.language)), h("section", { class: "FieldsSection" }, h("div", { class: `ContactWrapper${this.isMobile ? 'Mobile' : ''}` }, h("general-input", { class: "Contact", language: this.language, "client-styling": this.clientStyling, "mb-source": this.mbSource, type: "email", name: "contact", displayName: translate('emailDisplayName'), emitValue: true, validation: this.validation, placeholder: translate('emailPlaceholder') })), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
590
+ h("slot", { name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
591
+ h("slot", { name: "google" })), h("section", { class: "ButtonsWrapper" }, h("button", { class: "Button", disabled: !this.isBtnSubmitEnabled, onClick: this.submitRequest }, translate('btnSubmit', this.language)))));
592
+ }
593
+ ;
594
+ static get watchers() { return {
595
+ "clientStyling": ["handleClientStylingChange"],
596
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
597
+ }; }
598
+ };
599
+ PamForgotPassword.style = PamForgotPasswordStyle0;
600
+
601
+ export { PamForgotPassword as P };