@everymatrix/general-registration 1.10.19 → 1.10.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.
Files changed (40) hide show
  1. package/dist/cjs/{checkbox-input_11.cjs.entry.js → checkbox-group-input_12.cjs.entry.js} +18994 -12733
  2. package/dist/cjs/general-registration.cjs.js +2 -2
  3. package/dist/cjs/{index-5b4544e8.js → index-dfef7446.js} +41 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +1 -0
  6. package/dist/collection/components/general-registration/general-registration.js +85 -26
  7. package/dist/collection/utils/locale.utils.js +13 -3
  8. package/dist/components/active-mixin.js +975 -0
  9. package/dist/components/checkbox-group-input.js +6 -0
  10. package/dist/components/checkbox-group-input2.js +1121 -0
  11. package/dist/components/date-input2.js +5064 -4
  12. package/dist/components/email-input2.js +2 -1
  13. package/dist/components/field-mixin.js +12712 -0
  14. package/dist/components/general-input2.js +20 -11
  15. package/dist/components/general-registration.js +101 -27
  16. package/dist/components/input-field-shared-styles.js +403 -13065
  17. package/dist/components/number-input2.js +2 -1
  18. package/dist/components/password-input2.js +51 -11
  19. package/dist/components/pattern-mixin.js +2 -1
  20. package/dist/components/select-input2.js +5 -4
  21. package/dist/components/tel-input2.js +7 -1
  22. package/dist/components/text-input2.js +15 -3
  23. package/dist/components/tooltipIcon.js +9 -5
  24. package/dist/components/vaadin-button.js +3 -974
  25. package/dist/components/vaadin-combo-box.js +12 -27
  26. package/dist/components/virtual-keyboard-controller.js +3 -38
  27. package/dist/esm/{checkbox-input_11.entry.js → checkbox-group-input_12.entry.js} +18994 -12734
  28. package/dist/esm/general-registration.js +2 -2
  29. package/dist/esm/{index-5b8d16cc.js → index-fdb6785f.js} +41 -1
  30. package/dist/esm/loader.js +2 -2
  31. package/dist/general-registration/general-registration.esm.js +1 -1
  32. package/dist/general-registration/p-64b59a7b.js +1 -0
  33. package/dist/general-registration/p-cb8af7e3.entry.js +3582 -0
  34. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/general-registration/.stencil/packages/general-input/src/utils/types.d.ts +22 -5
  35. package/dist/types/components/general-registration/general-registration.d.ts +7 -3
  36. package/dist/types/components.d.ts +10 -2
  37. package/dist/types/utils/locale.utils.d.ts +8 -0
  38. package/package.json +4 -2
  39. package/dist/general-registration/p-0f29dba0.entry.js +0 -3274
  40. package/dist/general-registration/p-cba9c0b1.js +0 -1
@@ -1,5 +1,6 @@
1
- import { i, r as registerStyles, a as inputFieldShared, T as ThemableMixin, f as DirMixin, P as PolymerElement, h as html, G as microTask, M as idlePeriod, N as animationFrame, O as flush, D as Debouncer, Q as enqueueDebouncer, e as timeOut, R as generateUniqueId, C as ControllerMixin, K as KeyboardMixin, U as InputMixin, H as DisabledMixin, z as isElementFocused, j as InputControlMixin, k as InputController, L as LabelledInputController, n as TooltipController, o as inputFieldShared$1, p as ElementMixin } from './input-field-shared-styles.js';
2
- import { o as overlay, e as menuOverlayCore, P as PositionMixin, O as Overlay, f as isSafari, V as VirtualKeyboardController, g as isTouch } from './virtual-keyboard-controller.js';
1
+ import { i, r as registerStyles, T as ThemableMixin, A as DirMixin, P as PolymerElement, h as html, n as microTask, O as idlePeriod, Q as animationFrame, R as flush, y as Debouncer, U as enqueueDebouncer, z as timeOut, W as generateUniqueId, C as ControllerMixin, K as KeyboardMixin, I as InputMixin, a as DisabledMixin, b as isElementFocused, e as InputController, f as LabelledInputController, g as TooltipController, E as ElementMixin } from './field-mixin.js';
2
+ import { o as overlay, d as menuOverlayCore, P as PositionMixin, O as Overlay, V as VirtualKeyboardController } from './virtual-keyboard-controller.js';
3
+ import { i as inputFieldShared, e as isSafari, f as isTouch, c as InputControlMixin, d as inputFieldShared$1 } from './input-field-shared-styles.js';
3
4
  import { P as PatternMixin } from './pattern-mixin.js';
4
5
 
5
6
  /**
@@ -1582,6 +1583,11 @@ class IronListAdapter {
1582
1583
  toggleScrollListener() {}
1583
1584
 
1584
1585
  _scrollHandler() {
1586
+ // The scroll target is hidden.
1587
+ if (this.scrollTarget.offsetHeight === 0) {
1588
+ return;
1589
+ }
1590
+
1585
1591
  this._adjustVirtualIndexOffset(this._scrollTop - (this.__previousScrollTop || 0));
1586
1592
  const delta = this.scrollTarget.scrollTop - this._scrollPosition;
1587
1593
 
@@ -3243,7 +3249,9 @@ const ComboBoxMixin = (subclass) =>
3243
3249
  // For touch devices, we don't want to popup virtual keyboard
3244
3250
  // unless input element is explicitly focused by the user.
3245
3251
  if (!this._isInputFocused() && !isTouch) {
3246
- this.focus();
3252
+ if (this.inputElement) {
3253
+ this.inputElement.focus();
3254
+ }
3247
3255
  }
3248
3256
 
3249
3257
  this.$.overlay.restoreFocusOnClose = true;
@@ -3570,14 +3578,6 @@ const ComboBoxMixin = (subclass) =>
3570
3578
 
3571
3579
  /** @private */
3572
3580
  _onOpened() {
3573
- // Defer scroll position adjustment to improve performance.
3574
- requestAnimationFrame(() => {
3575
- this._scrollIntoView(this._focusedIndex);
3576
-
3577
- // Set attribute after the items are rendered when overlay is opened for the first time.
3578
- this._updateActiveDescendant(this._focusedIndex);
3579
- });
3580
-
3581
3581
  // _detectAndDispatchChange() should not consider value changes done before opening
3582
3582
  this._lastCommittedValue = this.value;
3583
3583
  }
@@ -3598,6 +3598,7 @@ const ComboBoxMixin = (subclass) =>
3598
3598
  }
3599
3599
  // Make sure input field is updated in case value doesn't change (i.e. FOO -> foo)
3600
3600
  this._inputElementValue = this._getItemLabel(this.selectedItem);
3601
+ this._focusedIndex = -1;
3601
3602
  } else if (this._inputElementValue === '' || this._inputElementValue === undefined) {
3602
3603
  this.selectedItem = null;
3603
3604
 
@@ -3765,10 +3766,6 @@ const ComboBoxMixin = (subclass) =>
3765
3766
  this._toggleHasValue(true);
3766
3767
  this._inputElementValue = this._getItemLabel(selectedItem);
3767
3768
  }
3768
-
3769
- if (this.filteredItems) {
3770
- this._focusedIndex = this.filteredItems.indexOf(selectedItem);
3771
- }
3772
3769
  }
3773
3770
 
3774
3771
  /**
@@ -3847,18 +3844,6 @@ const ComboBoxMixin = (subclass) =>
3847
3844
  const focusedItemIndex = this.__getItemIndexByValue(filteredItems, this._getItemValue(focusedItem));
3848
3845
  if (focusedItemIndex > -1) {
3849
3846
  this._focusedIndex = focusedItemIndex;
3850
- } else {
3851
- this.__setInitialFocusedIndex();
3852
- }
3853
- }
3854
-
3855
- /** @private */
3856
- __setInitialFocusedIndex() {
3857
- const inputValue = this._inputElementValue;
3858
- if (inputValue === undefined || inputValue === this._getItemLabel(this.selectedItem)) {
3859
- // When the input element value is the same as the current value or not defined,
3860
- // set the focused index to the item that matches the value.
3861
- this._focusedIndex = this.__getItemIndexByLabel(this.filteredItems, this._getItemLabel(this.selectedItem));
3862
3847
  } else {
3863
3848
  // When the user filled in something that is different from the current value = filtering is enabled,
3864
3849
  // set the focused index to the item that matches the filter query.
@@ -1,4 +1,5 @@
1
- import { i, r as registerStyles, d as dedupingMixin, q as PropertyEffects, v as strictTemplatePolicy, w as wrap, x as legacyWarnings, y as getFocusableElements, z as isElementFocused, T as ThemableMixin, f as DirMixin, C as ControllerMixin, P as PolymerElement, h as html, A as FlattenedNodesObserver, B as getAncestorRootNodes } from './input-field-shared-styles.js';
1
+ import { i, r as registerStyles, d as dedupingMixin, B as PropertyEffects, G as strictTemplatePolicy, w as wrap, H as legacyWarnings, J as getFocusableElements, b as isElementFocused, T as ThemableMixin, A as DirMixin, C as ControllerMixin, P as PolymerElement, h as html, m as FlattenedNodesObserver, M as getAncestorRootNodes } from './field-mixin.js';
2
+ import { b as isIOS } from './input-field-shared-styles.js';
2
3
 
3
4
  /**
4
5
  * @license
@@ -991,42 +992,6 @@ function modelForElement(template, node) {
991
992
  return null;
992
993
  }
993
994
 
994
- /**
995
- * @license
996
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
997
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
998
- */
999
-
1000
- const testUserAgent = (regexp) => regexp.test(navigator.userAgent);
1001
-
1002
- const testPlatform = (regexp) => regexp.test(navigator.platform);
1003
-
1004
- const testVendor = (regexp) => regexp.test(navigator.vendor);
1005
-
1006
- testUserAgent(/Android/);
1007
-
1008
- testUserAgent(/Chrome/) && testVendor(/Google Inc/);
1009
-
1010
- const isFirefox = testUserAgent(/Firefox/);
1011
-
1012
- // IPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
1013
- const isIPad = testPlatform(/^iPad/) || (testPlatform(/^Mac/) && navigator.maxTouchPoints > 1);
1014
-
1015
- const isIPhone = testPlatform(/^iPhone/);
1016
-
1017
- const isIOS = isIPhone || isIPad;
1018
-
1019
- const isSafari = testUserAgent(/^((?!chrome|android).)*safari/i);
1020
-
1021
- const isTouch = (() => {
1022
- try {
1023
- document.createEvent('TouchEvent');
1024
- return true;
1025
- } catch (e) {
1026
- return false;
1027
- }
1028
- })();
1029
-
1030
995
  /**
1031
996
  * @license
1032
997
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
@@ -2690,4 +2655,4 @@ class VirtualKeyboardController {
2690
2655
  }
2691
2656
  }
2692
2657
 
2693
- export { Overlay as O, PositionMixin as P, VirtualKeyboardController as V, OptionalMutableData as a, modelForElement as b, afterNextRender as c, isIOS as d, menuOverlayCore as e, isSafari as f, isTouch as g, isFirefox as i, menuOverlay as m, overlay as o, templatize as t };
2658
+ export { Overlay as O, PositionMixin as P, VirtualKeyboardController as V, OptionalMutableData as a, modelForElement as b, afterNextRender as c, menuOverlayCore as d, menuOverlay as m, overlay as o, templatize as t };