@everymatrix/general-registration 1.0.69
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +39141 -0
- package/dist/cjs/general-registration.cjs.js +25 -0
- package/dist/cjs/index-f6c5854f.js +1331 -0
- package/dist/cjs/index.cjs.js +18 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/collection-manifest.json +30 -0
- package/dist/collection/components/general-registration/general-registration.css +121 -0
- package/dist/collection/components/general-registration/general-registration.js +781 -0
- package/dist/collection/components/general-registration/index.js +1 -0
- package/dist/collection/index.js +17 -0
- package/dist/collection/utils/locale.utils.js +108 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/checkbox-group-input_13.entry.js +39125 -0
- package/dist/esm/general-registration.js +20 -0
- package/dist/esm/index-8b4a4c93.js +1302 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/loader.js +11 -0
- package/dist/general-registration/general-registration.esm.js +1 -0
- package/dist/general-registration/index.esm.js +1 -0
- package/dist/general-registration/p-35ed5ec5.js +2 -0
- package/dist/general-registration/p-9dd69761.entry.js +5431 -0
- package/dist/general-registration/p-e1255160.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +17 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-input/src/utils/types.d.ts +87 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-registration/general-registration.d.ts +95 -0
- package/dist/types/components/general-registration/index.d.ts +1 -0
- package/dist/types/components.d.ts +127 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +18 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +29 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GeneralRegistration } from './general-registration';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function safeDecorator(fn) {
|
|
2
|
+
// eslint-disable-next-line func-names
|
|
3
|
+
return function (...args) {
|
|
4
|
+
try {
|
|
5
|
+
return fn.apply(this, args);
|
|
6
|
+
}
|
|
7
|
+
catch (error) {
|
|
8
|
+
if (error instanceof DOMException &&
|
|
9
|
+
error.message.includes('has already been used with this registry') || error.message.includes('Cannot define multiple custom elements with the same tag name')) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
customElements.define = safeDecorator(customElements.define);
|
|
17
|
+
export * from './components';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export const DEFAULT_LANGUAGE = 'en';
|
|
2
|
+
export const TRANSLATIONS = {
|
|
3
|
+
"en": {
|
|
4
|
+
"nextButton": 'Next',
|
|
5
|
+
"backButton": 'Back',
|
|
6
|
+
"doneButton": 'Done',
|
|
7
|
+
"GmErr_BadRequest_Duplicate_User": 'A user with this information already exists.',
|
|
8
|
+
"GmErr_BadRequest_PasswordContainsUsername": "The password cannot be the same as the username.",
|
|
9
|
+
"GmErr_BadRequest_PasswordContainsEmail": "The password cannot be the same as the email.",
|
|
10
|
+
"GmErr_BadRequest_Duplicate_PersonalId": "There is already a registration with the data you entered or you entered your data in an incorrect format.",
|
|
11
|
+
"GmErr_Forbidden_UserAccount_NavExcluded": 'User is NAV Excluded. Registration was denied.',
|
|
12
|
+
"GmErr_BadRequest_ModelValidationFailed": 'Something went wrong... Please try again.',
|
|
13
|
+
"GmErr_BadInternalConfigs": 'Something went wrong... Please try again.',
|
|
14
|
+
"GmErr_Unauthorized": 'Something went wrong... Please try again.',
|
|
15
|
+
"GmErr_NotFound": 'Something went wrong... Please try again.',
|
|
16
|
+
"GmErr_UnexpectedException": 'Something went wrong... Please try again.',
|
|
17
|
+
"generalError": "Something went wrong... Please try again.",
|
|
18
|
+
"successMessage": "Register successful"
|
|
19
|
+
},
|
|
20
|
+
"hu": {
|
|
21
|
+
"nextButton": 'Következő',
|
|
22
|
+
"backButton": 'Vissza',
|
|
23
|
+
"doneButton": 'Kész',
|
|
24
|
+
"GmErr_BadRequest_Duplicate_User": 'Már létezik felhasználó ezzel az információval.',
|
|
25
|
+
"GmErr_BadRequest_PasswordContainsUsername": "The password cannot be the same as the username.",
|
|
26
|
+
"GmErr_BadRequest_PasswordContainsEmail": "The password cannot be the same as the email.",
|
|
27
|
+
"GmErr_BadRequest_Duplicate_PersonalId": "There is already a registration with the data you entered or you entered your data in an incorrect format.",
|
|
28
|
+
"GmErr_Forbidden_UserAccount_NavExcluded": 'User is NAV Excluded. Registration was denied',
|
|
29
|
+
"GmErr_BadRequest_ModelValidationFailed": 'Valami hiba történt... Kérjük, próbálja újra.',
|
|
30
|
+
"GmErr_BadInternalConfigs": 'Valami hiba történt... Kérjük, próbálja újra.',
|
|
31
|
+
"GmErr_Unauthorized": 'Valami hiba történt... Kérjük, próbálja újra.',
|
|
32
|
+
"GmErr_NotFound": 'Valami hiba történt... Kérjük, próbálja újra.',
|
|
33
|
+
"GmErr_UnexpectedException": 'Valami hiba történt... Kérjük, próbálja újra.',
|
|
34
|
+
"generalError": "Valami hiba történt... Próbáld újra.",
|
|
35
|
+
"successMessage": "Sikeres regisztráció"
|
|
36
|
+
},
|
|
37
|
+
"hr": {
|
|
38
|
+
"nextButton": 'Sljedeće',
|
|
39
|
+
"backButton": 'Nazad',
|
|
40
|
+
"doneButton": 'Gotovo',
|
|
41
|
+
"GmErr_BadRequest_Duplicate_User": 'Korisnik s ovim podacima već postoji.',
|
|
42
|
+
"GmErr_BadRequest_PasswordContainsUsername": "The password cannot be the same as the username.",
|
|
43
|
+
"GmErr_BadRequest_PasswordContainsEmail": "The password cannot be the same as the email.",
|
|
44
|
+
"GmErr_BadRequest_Duplicate_PersonalId": "There is already a registration with the data you entered or you entered your data in an incorrect format.",
|
|
45
|
+
"GmErr_Forbidden_UserAccount_NavExcluded": 'Korisnik je NAV isključen. Registracija je odbijena.',
|
|
46
|
+
"GmErr_BadRequest_ModelValidationFailed": 'Nešto nije u redu... Molimo pokušajte ponovo',
|
|
47
|
+
"GmErr_BadInternalConfigs": 'Nešto nije u redu... Molimo pokušajte ponovo',
|
|
48
|
+
"GmErr_Unauthorized": 'Nešto nije u redu... Molimo pokušajte ponovo',
|
|
49
|
+
"GmErr_NotFound": 'Nešto nije u redu... Molimo pokušajte ponovo',
|
|
50
|
+
"GmErr_UnexpectedException": 'Nešto nije u redu... Molimo pokušajte ponovo',
|
|
51
|
+
"generalError": "Nešto nije u redu... Molimo pokušajte ponovo",
|
|
52
|
+
"successMessage": "Register successful"
|
|
53
|
+
},
|
|
54
|
+
'pt-br': {
|
|
55
|
+
"nextButton": 'Seguindo',
|
|
56
|
+
"backButton": 'Voltar',
|
|
57
|
+
"doneButton": 'Terminar',
|
|
58
|
+
"GmErr_BadRequest_Duplicate_User": 'Já existe um usuário com esta informação',
|
|
59
|
+
"GmErr_Forbidden_UserAccount_NavExcluded": 'O usuário está excluído NAV. O registro foi negado',
|
|
60
|
+
"GmErr_BadRequest_ModelValidationFailed": 'Alguma coisa deu errado. Por favor tente outra vez.',
|
|
61
|
+
"GmErr_BadInternalConfigs": 'Alguma coisa deu errado. Por favor tente outra vez',
|
|
62
|
+
"GmErr_Unauthorized": 'Alguma coisa deu errado. Por favor tente outra vez',
|
|
63
|
+
"GmErr_NotFound": 'Alguma coisa deu errado. Por favor tente outra vez',
|
|
64
|
+
"GmErr_UnexpectedException": 'Alguma coisa deu errado. Por favor tente outra vez',
|
|
65
|
+
"generalError": 'Alguma coisa deu errado. Por favor tente outra vez',
|
|
66
|
+
"successMessage": 'Registro bem-sucedido'
|
|
67
|
+
},
|
|
68
|
+
'es-mx': {
|
|
69
|
+
"nextButton": 'Siguiente',
|
|
70
|
+
"backButton": 'Atrás',
|
|
71
|
+
"doneButton": 'Terminar',
|
|
72
|
+
"GmErr_BadRequest_Duplicate_User": 'Un usuario con esta información ya existe',
|
|
73
|
+
"GmErr_Forbidden_UserAccount_NavExcluded": 'Usuario es Excluído NA. Registro fue negado',
|
|
74
|
+
"GmErr_BadRequest_ModelValidationFailed": 'Algo salió mal…por favor intente de nuevo.',
|
|
75
|
+
"GmErr_BadInternalConfigs": 'Algo salió mal... Por favor intente de nuevo',
|
|
76
|
+
"GmErr_Unauthorized": 'Algo salió mal... Por favor intente de nuevo',
|
|
77
|
+
"GmErr_NotFound": 'Algo salió mal... Por favor intente de nuevo',
|
|
78
|
+
"GmErr_UnexpectedException": 'Algo salió mal... Por favor intente de nuevo',
|
|
79
|
+
"generalError": 'Algo salió mal... Por favor intente de nuevo',
|
|
80
|
+
"successMessage": 'Registro exitoso'
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
export const getTranslations = (url) => {
|
|
84
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
85
|
+
return new Promise((resolve) => {
|
|
86
|
+
fetch(url)
|
|
87
|
+
.then((res) => res.json())
|
|
88
|
+
.then((data) => {
|
|
89
|
+
Object.keys(data).forEach((item) => {
|
|
90
|
+
for (let key in data[item]) {
|
|
91
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
resolve(true);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
export const translate = (key, customLang, values) => {
|
|
99
|
+
let lang = TRANSLATIONS[customLang] ? customLang : DEFAULT_LANGUAGE;
|
|
100
|
+
let translation = TRANSLATIONS[lang][key];
|
|
101
|
+
if (values !== undefined) {
|
|
102
|
+
for (const [key, value] of Object.entries(values.values)) {
|
|
103
|
+
const regex = new RegExp(`{${key}}`, 'g');
|
|
104
|
+
translation = translation.replace(regex, value);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return translation;
|
|
108
|
+
};
|