@everymatrix/general-registration 1.22.9 → 1.23.1

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 (24) hide show
  1. package/dist/cjs/checkbox-group-input_13.cjs.entry.js +11605 -12103
  2. package/dist/collection/components/general-registration/general-registration.css +17 -12
  3. package/dist/collection/components/general-registration/general-registration.js +20 -2
  4. package/dist/collection/utils/locale.utils.js +18 -2
  5. package/dist/components/active-mixin.js +6 -6
  6. package/dist/components/checkbox-group-input2.js +307 -260
  7. package/dist/components/date-input2.js +2206 -3449
  8. package/dist/components/field-mixin.js +2512 -2226
  9. package/dist/components/general-registration.js +38 -6
  10. package/dist/components/input-field-shared-styles.js +211 -308
  11. package/dist/components/password-input2.js +72 -119
  12. package/dist/components/pattern-mixin.js +85 -0
  13. package/dist/components/vaadin-button.js +73 -102
  14. package/dist/components/vaadin-combo-box.js +808 -991
  15. package/dist/components/virtual-keyboard-controller.js +1768 -1111
  16. package/dist/esm/checkbox-group-input_13.entry.js +11605 -12103
  17. package/dist/general-registration/general-registration.esm.js +1 -1
  18. package/dist/general-registration/p-4bb24795.entry.js +3582 -0
  19. package/dist/types/components/general-registration/general-registration.d.ts +1 -0
  20. package/dist/types/utils/locale.utils.d.ts +1 -0
  21. package/package.json +1 -1
  22. package/dist/general-registration/p-36c5c74f.entry.js +0 -3647
  23. /package/dist/types/Users/{adrian.pripon/Documents/Work → sebastian.strulea/Documents/work}/widgets-stencil/packages/general-registration/.stencil/packages/general-input/src/utils/types.d.ts +0 -0
  24. /package/dist/types/Users/{adrian.pripon/Documents/Work → sebastian.strulea/Documents/work}/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +0 -0
@@ -24,7 +24,8 @@ const TRANSLATIONS = {
24
24
  "GmErr_Unauthorized": 'Something went wrong... Please try again.',
25
25
  "GmErr_NotFound": 'Something went wrong... Please try again.',
26
26
  "GmErr_UnexpectedException": 'Something went wrong... Please try again.',
27
- "generalError": "Something went wrong... Please try again."
27
+ "generalError": "Something went wrong... Please try again.",
28
+ "successMessage": "Register successful"
28
29
  },
29
30
  "hu": {
30
31
  "nextButton": 'Következő',
@@ -37,7 +38,22 @@ const TRANSLATIONS = {
37
38
  "GmErr_Unauthorized": 'Valami hiba történt... Kérjük, próbálja újra.',
38
39
  "GmErr_NotFound": 'Valami hiba történt... Kérjük, próbálja újra.',
39
40
  "GmErr_UnexpectedException": 'Valami hiba történt... Kérjük, próbálja újra.',
40
- "generalError": "Valami hiba történt... Próbáld újra."
41
+ "generalError": "Valami hiba történt... Próbáld újra.",
42
+ "successMessage": "Sikeres regisztráció"
43
+ },
44
+ "hr": {
45
+ "nextButton": 'Next',
46
+ "backButton": 'Back',
47
+ "doneButton": 'Done',
48
+ "GmErr_BadRequest_Duplicate_User": 'A user with this information already exists.',
49
+ "GmErr_Forbidden_UserAccount_NavExcluded": 'User is NAV Excluded. Registration was denied.',
50
+ "GmErr_BadRequest_ModelValidationFailed": 'Something went wrong... Please try again.',
51
+ "GmErr_BadInternalConfigs": 'Something went wrong... Please try again.',
52
+ "GmErr_Unauthorized": 'Something went wrong... Please try again.',
53
+ "GmErr_NotFound": 'Something went wrong... Please try again.',
54
+ "GmErr_UnexpectedException": 'Something went wrong... Please try again.',
55
+ "generalError": "Something went wrong... Please try again.",
56
+ "successMessage": "Register successful"
41
57
  }
42
58
  };
43
59
  const getTranslations = (url) => {
@@ -67,7 +83,7 @@ const translate = (key, customLang, values) => {
67
83
  return translation;
68
84
  };
69
85
 
70
- const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: #cc0000b3;\n font-size: 13px;\n font-family: \"ubuntu\";\n}\n.registration__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.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
86
+ const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));\n font-size: 13px;\n font-family: \"ubuntu\";\n}\n.registration__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.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border-radius: 5px;\n background: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: 1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emfe-w-color-gray-100, #E6E6E6);\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n cursor: not-allowed;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
71
87
 
72
88
  const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
73
89
  constructor() {
@@ -141,6 +157,9 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
141
157
  this.autofilled = true;
142
158
  }
143
159
  }
160
+ addBtag() {
161
+ this.addBtagValue();
162
+ }
144
163
  checkInputsValidityHandler(event) {
145
164
  // Set isValid state of the input in the list.
146
165
  this.listOfInputValidity.find(input => input.name == event.detail.name).isValid = event.detail.valid;
@@ -381,6 +400,10 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
381
400
  this.errorMessage = translate(`${this.errorCode}`, this.language) || translate(`generalError`, this.language);
382
401
  }
383
402
  window.postMessage({ type: 'registrationFailed', errorMessage: error === null || error === void 0 ? void 0 : error.thirdPartyResponse.message }, window.location.href);
403
+ window.postMessage({ type: 'WidgetNotification', data: {
404
+ type: 'error',
405
+ message: this.errorMessage
406
+ } }, window.location.href);
384
407
  });
385
408
  }
386
409
  return res.json();
@@ -389,6 +412,10 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
389
412
  this.isLoading = false;
390
413
  if (!this.registerErrors) {
391
414
  window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId }, window.location.href);
415
+ window.postMessage({ type: 'WidgetNotification', data: {
416
+ type: 'success',
417
+ message: translate('successMessage', this.language)
418
+ } }, window.location.href);
392
419
  }
393
420
  })
394
421
  .catch((err) => {
@@ -413,8 +440,6 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
413
440
  return [inputElement];
414
441
  }
415
442
  });
416
- if (this.btag)
417
- this.addBtagValue();
418
443
  this.listOfInputValidity = this.listOfInputs.reduce((acc, field) => {
419
444
  var _a;
420
445
  // If the field is a togglecheckbox, add its subfields
@@ -460,6 +485,8 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
460
485
  }
461
486
  return acc;
462
487
  }, []);
488
+ if (this.btag)
489
+ this.addBtagValue();
463
490
  // Set the list of actions
464
491
  this.listOfActions = config.content.actions.map(action => action);
465
492
  this.registrationID = config.content.registrationID;
@@ -509,6 +536,10 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
509
536
  if (btagField) {
510
537
  btagField.defaultValue = this.btag;
511
538
  }
539
+ const btagValue = this.listOfInputValues.find(input => input.name.toLowerCase() === 'btag');
540
+ if (btagValue) {
541
+ btagValue.value = this.btag;
542
+ }
512
543
  }
513
544
  addTranslation(field) {
514
545
  if (TRANSLATIONS[this.language][field.name]) {
@@ -565,7 +596,8 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
565
596
  get host() { return this; }
566
597
  static get watchers() { return {
567
598
  "registrationStep": ["sendStep"],
568
- "forms": ["setFormValidity"]
599
+ "forms": ["setFormValidity"],
600
+ "btag": ["addBtag"]
569
601
  }; }
570
602
  static get style() { return generalRegistrationCss; }
571
603
  }, [1, "general-registration", {