@aurodesignsystem-dev/auro-formkit 0.0.0-pr1052.9 → 0.0.0-pr1059.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.
@@ -1065,8 +1065,8 @@ export function auroMenuLoadingExample() {
1065
1065
 
1066
1066
  }
1067
1067
 
1068
- combobox.addEventListener("input", (e) => {
1069
- if (e.target.value && e.target.value !== e.target.optionSelected?.textContent) {
1068
+ combobox.addEventListener("inputValue", (e) => {
1069
+ if (e.target.inputValue && e.target.value !== e.target.inputValue) {
1070
1070
  load();
1071
1071
  }
1072
1072
  });
@@ -166,8 +166,8 @@ function auroMenuLoadingExample() {
166
166
 
167
167
  };
168
168
 
169
- combobox.addEventListener("input", (e) => {
170
- if (e.target.value && e.target.value !== e.target.optionSelected?.textContent) {
169
+ combobox.addEventListener("inputValue", (e) => {
170
+ if (e.target.inputValue && e.target.value !== e.target.inputValue) {
171
171
  load();
172
172
  }
173
173
  });
@@ -16654,7 +16654,7 @@ class AuroCombobox extends AuroElement$1 {
16654
16654
  if (this.availableOptions.length === 0) {
16655
16655
  if (this.noMatchOption) {
16656
16656
  this.noMatchOption.removeAttribute('hidden');
16657
- } else {
16657
+ } else if (!this.menu.loading || this.isHiddenWhileLoading) {
16658
16658
  this.hideBib();
16659
16659
  }
16660
16660
  } else if (this.noMatchOption) {
@@ -16774,7 +16774,6 @@ class AuroCombobox extends AuroElement$1 {
16774
16774
  this.dropdown.hide();
16775
16775
  return;
16776
16776
  }
16777
-
16778
16777
  if (!this.dropdown.isPopoverVisible && this.input.value && this.input.value.length > 0) {
16779
16778
  if (this.menu.getAttribute('loading') || (this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
16780
16779
  if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
@@ -16987,10 +16986,6 @@ class AuroCombobox extends AuroElement$1 {
16987
16986
  this.validate();
16988
16987
  }
16989
16988
  });
16990
-
16991
- this.input.addEventListener('input', () => {
16992
- this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16993
- });
16994
16989
  }
16995
16990
 
16996
16991
  /**
@@ -17050,9 +17045,13 @@ class AuroCombobox extends AuroElement$1 {
17050
17045
  }
17051
17046
 
17052
17047
  // Force dropdown bib to hide if input value has no matching suggestions
17053
- if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
17048
+ if (this.menu.loading) {
17049
+ this.showBib();
17050
+ } else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
17054
17051
  this.hideBib();
17055
17052
  }
17053
+
17054
+ this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
17056
17055
  }
17057
17056
 
17058
17057
  /**
@@ -17226,7 +17225,7 @@ class AuroCombobox extends AuroElement$1 {
17226
17225
  if (this.value) {
17227
17226
  // If the value got set programmatically make sure we hide the bib
17228
17227
  // when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
17229
- if (!this.contains(document.activeElement) && !this.bibtemplate.contains(document.activeElement)) {
17228
+ if (!this.componentHasFocus) {
17230
17229
  this.hideBib();
17231
17230
  }
17232
17231
  } else {
@@ -17251,7 +17250,8 @@ class AuroCombobox extends AuroElement$1 {
17251
17250
  }
17252
17251
 
17253
17252
  if (changedProperties.has('availableOptions')) {
17254
- if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
17253
+ // eslint-disable-next-line no-extra-parens
17254
+ if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
17255
17255
  this.showBib();
17256
17256
  } else {
17257
17257
  this.hideBib();
@@ -17805,6 +17805,11 @@ class AuroMenu extends AuroElement$1 {
17805
17805
 
17806
17806
  // Process all other UI updates
17807
17807
  this.updateItemsState(changedProperties);
17808
+
17809
+ if (changedProperties.has('optionSelected')) {
17810
+ console.warn('updated: optionSelected', this.optionSelected);
17811
+ this.notifySelectionChange();
17812
+ }
17808
17813
  }
17809
17814
 
17810
17815
  /**
@@ -16502,7 +16502,7 @@ class AuroCombobox extends AuroElement$1 {
16502
16502
  if (this.availableOptions.length === 0) {
16503
16503
  if (this.noMatchOption) {
16504
16504
  this.noMatchOption.removeAttribute('hidden');
16505
- } else {
16505
+ } else if (!this.menu.loading || this.isHiddenWhileLoading) {
16506
16506
  this.hideBib();
16507
16507
  }
16508
16508
  } else if (this.noMatchOption) {
@@ -16622,7 +16622,6 @@ class AuroCombobox extends AuroElement$1 {
16622
16622
  this.dropdown.hide();
16623
16623
  return;
16624
16624
  }
16625
-
16626
16625
  if (!this.dropdown.isPopoverVisible && this.input.value && this.input.value.length > 0) {
16627
16626
  if (this.menu.getAttribute('loading') || (this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
16628
16627
  if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
@@ -16835,10 +16834,6 @@ class AuroCombobox extends AuroElement$1 {
16835
16834
  this.validate();
16836
16835
  }
16837
16836
  });
16838
-
16839
- this.input.addEventListener('input', () => {
16840
- this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16841
- });
16842
16837
  }
16843
16838
 
16844
16839
  /**
@@ -16898,9 +16893,13 @@ class AuroCombobox extends AuroElement$1 {
16898
16893
  }
16899
16894
 
16900
16895
  // Force dropdown bib to hide if input value has no matching suggestions
16901
- if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16896
+ if (this.menu.loading) {
16897
+ this.showBib();
16898
+ } else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16902
16899
  this.hideBib();
16903
16900
  }
16901
+
16902
+ this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16904
16903
  }
16905
16904
 
16906
16905
  /**
@@ -17074,7 +17073,7 @@ class AuroCombobox extends AuroElement$1 {
17074
17073
  if (this.value) {
17075
17074
  // If the value got set programmatically make sure we hide the bib
17076
17075
  // when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
17077
- if (!this.contains(document.activeElement) && !this.bibtemplate.contains(document.activeElement)) {
17076
+ if (!this.componentHasFocus) {
17078
17077
  this.hideBib();
17079
17078
  }
17080
17079
  } else {
@@ -17099,7 +17098,8 @@ class AuroCombobox extends AuroElement$1 {
17099
17098
  }
17100
17099
 
17101
17100
  if (changedProperties.has('availableOptions')) {
17102
- if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
17101
+ // eslint-disable-next-line no-extra-parens
17102
+ if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
17103
17103
  this.showBib();
17104
17104
  } else {
17105
17105
  this.hideBib();
@@ -17653,6 +17653,11 @@ class AuroMenu extends AuroElement$1 {
17653
17653
 
17654
17654
  // Process all other UI updates
17655
17655
  this.updateItemsState(changedProperties);
17656
+
17657
+ if (changedProperties.has('optionSelected')) {
17658
+ console.warn('updated: optionSelected', this.optionSelected);
17659
+ this.notifySelectionChange();
17660
+ }
17656
17661
  }
17657
17662
 
17658
17663
  /**
@@ -16420,7 +16420,7 @@ class AuroCombobox extends AuroElement {
16420
16420
  if (this.availableOptions.length === 0) {
16421
16421
  if (this.noMatchOption) {
16422
16422
  this.noMatchOption.removeAttribute('hidden');
16423
- } else {
16423
+ } else if (!this.menu.loading || this.isHiddenWhileLoading) {
16424
16424
  this.hideBib();
16425
16425
  }
16426
16426
  } else if (this.noMatchOption) {
@@ -16540,7 +16540,6 @@ class AuroCombobox extends AuroElement {
16540
16540
  this.dropdown.hide();
16541
16541
  return;
16542
16542
  }
16543
-
16544
16543
  if (!this.dropdown.isPopoverVisible && this.input.value && this.input.value.length > 0) {
16545
16544
  if (this.menu.getAttribute('loading') || (this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
16546
16545
  if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
@@ -16753,10 +16752,6 @@ class AuroCombobox extends AuroElement {
16753
16752
  this.validate();
16754
16753
  }
16755
16754
  });
16756
-
16757
- this.input.addEventListener('input', () => {
16758
- this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16759
- });
16760
16755
  }
16761
16756
 
16762
16757
  /**
@@ -16816,9 +16811,13 @@ class AuroCombobox extends AuroElement {
16816
16811
  }
16817
16812
 
16818
16813
  // Force dropdown bib to hide if input value has no matching suggestions
16819
- if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16814
+ if (this.menu.loading) {
16815
+ this.showBib();
16816
+ } else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16820
16817
  this.hideBib();
16821
16818
  }
16819
+
16820
+ this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16822
16821
  }
16823
16822
 
16824
16823
  /**
@@ -16992,7 +16991,7 @@ class AuroCombobox extends AuroElement {
16992
16991
  if (this.value) {
16993
16992
  // If the value got set programmatically make sure we hide the bib
16994
16993
  // when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
16995
- if (!this.contains(document.activeElement) && !this.bibtemplate.contains(document.activeElement)) {
16994
+ if (!this.componentHasFocus) {
16996
16995
  this.hideBib();
16997
16996
  }
16998
16997
  } else {
@@ -17017,7 +17016,8 @@ class AuroCombobox extends AuroElement {
17017
17016
  }
17018
17017
 
17019
17018
  if (changedProperties.has('availableOptions')) {
17020
- if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
17019
+ // eslint-disable-next-line no-extra-parens
17020
+ if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
17021
17021
  this.showBib();
17022
17022
  } else {
17023
17023
  this.hideBib();
@@ -16420,7 +16420,7 @@ class AuroCombobox extends AuroElement {
16420
16420
  if (this.availableOptions.length === 0) {
16421
16421
  if (this.noMatchOption) {
16422
16422
  this.noMatchOption.removeAttribute('hidden');
16423
- } else {
16423
+ } else if (!this.menu.loading || this.isHiddenWhileLoading) {
16424
16424
  this.hideBib();
16425
16425
  }
16426
16426
  } else if (this.noMatchOption) {
@@ -16540,7 +16540,6 @@ class AuroCombobox extends AuroElement {
16540
16540
  this.dropdown.hide();
16541
16541
  return;
16542
16542
  }
16543
-
16544
16543
  if (!this.dropdown.isPopoverVisible && this.input.value && this.input.value.length > 0) {
16545
16544
  if (this.menu.getAttribute('loading') || (this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
16546
16545
  if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
@@ -16753,10 +16752,6 @@ class AuroCombobox extends AuroElement {
16753
16752
  this.validate();
16754
16753
  }
16755
16754
  });
16756
-
16757
- this.input.addEventListener('input', () => {
16758
- this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16759
- });
16760
16755
  }
16761
16756
 
16762
16757
  /**
@@ -16816,9 +16811,13 @@ class AuroCombobox extends AuroElement {
16816
16811
  }
16817
16812
 
16818
16813
  // Force dropdown bib to hide if input value has no matching suggestions
16819
- if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16814
+ if (this.menu.loading) {
16815
+ this.showBib();
16816
+ } else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16820
16817
  this.hideBib();
16821
16818
  }
16819
+
16820
+ this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16822
16821
  }
16823
16822
 
16824
16823
  /**
@@ -16992,7 +16991,7 @@ class AuroCombobox extends AuroElement {
16992
16991
  if (this.value) {
16993
16992
  // If the value got set programmatically make sure we hide the bib
16994
16993
  // when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
16995
- if (!this.contains(document.activeElement) && !this.bibtemplate.contains(document.activeElement)) {
16994
+ if (!this.componentHasFocus) {
16996
16995
  this.hideBib();
16997
16996
  }
16998
16997
  } else {
@@ -17017,7 +17016,8 @@ class AuroCombobox extends AuroElement {
17017
17016
  }
17018
17017
 
17019
17018
  if (changedProperties.has('availableOptions')) {
17020
- if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
17019
+ // eslint-disable-next-line no-extra-parens
17020
+ if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
17021
17021
  this.showBib();
17022
17022
  } else {
17023
17023
  this.hideBib();
@@ -592,6 +592,11 @@ class AuroMenu extends AuroElement$1 {
592
592
 
593
593
  // Process all other UI updates
594
594
  this.updateItemsState(changedProperties);
595
+
596
+ if (changedProperties.has('optionSelected')) {
597
+ console.warn('updated: optionSelected', this.optionSelected);
598
+ this.notifySelectionChange();
599
+ }
595
600
  }
596
601
 
597
602
  /**
@@ -552,6 +552,11 @@ class AuroMenu extends AuroElement$1 {
552
552
 
553
553
  // Process all other UI updates
554
554
  this.updateItemsState(changedProperties);
555
+
556
+ if (changedProperties.has('optionSelected')) {
557
+ console.warn('updated: optionSelected', this.optionSelected);
558
+ this.notifySelectionChange();
559
+ }
555
560
  }
556
561
 
557
562
  /**
@@ -559,6 +559,11 @@ class AuroMenu extends AuroElement$1 {
559
559
 
560
560
  // Process all other UI updates
561
561
  this.updateItemsState(changedProperties);
562
+
563
+ if (changedProperties.has('optionSelected')) {
564
+ console.warn('updated: optionSelected', this.optionSelected);
565
+ this.notifySelectionChange();
566
+ }
562
567
  }
563
568
 
564
569
  /**
@@ -518,6 +518,11 @@ class AuroMenu extends AuroElement$1 {
518
518
 
519
519
  // Process all other UI updates
520
520
  this.updateItemsState(changedProperties);
521
+
522
+ if (changedProperties.has('optionSelected')) {
523
+ console.warn('updated: optionSelected', this.optionSelected);
524
+ this.notifySelectionChange();
525
+ }
521
526
  }
522
527
 
523
528
  /**
@@ -9406,6 +9406,11 @@ class AuroMenu extends AuroElement$4 {
9406
9406
 
9407
9407
  // Process all other UI updates
9408
9408
  this.updateItemsState(changedProperties);
9409
+
9410
+ if (changedProperties.has('optionSelected')) {
9411
+ console.warn('updated: optionSelected', this.optionSelected);
9412
+ this.notifySelectionChange();
9413
+ }
9409
9414
  }
9410
9415
 
9411
9416
  /**
@@ -9314,6 +9314,11 @@ class AuroMenu extends AuroElement$4 {
9314
9314
 
9315
9315
  // Process all other UI updates
9316
9316
  this.updateItemsState(changedProperties);
9317
+
9318
+ if (changedProperties.has('optionSelected')) {
9319
+ console.warn('updated: optionSelected', this.optionSelected);
9320
+ this.notifySelectionChange();
9321
+ }
9317
9322
  }
9318
9323
 
9319
9324
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr1052.9",
3
+ "version": "0.0.0-pr1059.1",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {