@aurodesignsystem-dev/auro-formkit 0.0.0-pr784.0 → 0.0.0-pr785.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.
- package/components/checkbox/demo/api.min.js +5 -16
- package/components/checkbox/demo/index.min.js +5 -16
- package/components/checkbox/dist/index.js +5 -16
- package/components/checkbox/dist/registered.js +5 -16
- package/components/combobox/demo/api.md +0 -1
- package/components/combobox/demo/api.min.js +29 -61
- package/components/combobox/demo/index.min.js +29 -61
- package/components/combobox/dist/auro-combobox.d.ts +0 -5
- package/components/combobox/dist/index.js +29 -61
- package/components/combobox/dist/registered.js +29 -61
- package/components/counter/demo/api.min.js +19 -24
- package/components/counter/demo/index.min.js +19 -24
- package/components/counter/dist/index.js +19 -24
- package/components/counter/dist/registered.js +19 -24
- package/components/datepicker/demo/api.md +1 -2
- package/components/datepicker/demo/api.min.js +87 -61
- package/components/datepicker/demo/index.min.js +87 -61
- package/components/datepicker/dist/auro-datepicker.d.ts +18 -6
- package/components/datepicker/dist/index.js +87 -61
- package/components/datepicker/dist/registered.js +87 -61
- package/components/dropdown/demo/api.md +7 -6
- package/components/dropdown/demo/api.min.js +14 -8
- package/components/dropdown/demo/index.min.js +14 -8
- package/components/dropdown/dist/auro-dropdown.d.ts +1 -0
- package/components/dropdown/dist/index.js +14 -8
- package/components/dropdown/dist/registered.js +14 -8
- package/components/input/demo/api.md +1 -2
- package/components/input/demo/api.min.js +7 -25
- package/components/input/demo/index.min.js +7 -25
- package/components/input/dist/base-input.d.ts +1 -5
- package/components/input/dist/index.js +7 -25
- package/components/input/dist/registered.js +7 -25
- package/components/radio/demo/api.min.js +5 -16
- package/components/radio/demo/index.min.js +5 -16
- package/components/radio/dist/index.js +5 -16
- package/components/radio/dist/registered.js +5 -16
- package/components/select/demo/api.min.js +19 -24
- package/components/select/demo/index.min.js +19 -24
- package/components/select/dist/index.js +19 -24
- package/components/select/dist/registered.js +19 -24
- package/package.json +2 -2
|
@@ -1042,24 +1042,13 @@ class AuroFormValidation {
|
|
|
1042
1042
|
this.getInputElements(elem);
|
|
1043
1043
|
this.getAuroInputs(elem);
|
|
1044
1044
|
|
|
1045
|
-
//
|
|
1045
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
1046
1046
|
let validationShouldRun =
|
|
1047
|
-
|
|
1048
|
-
// If the validation was forced
|
|
1049
1047
|
force ||
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
// State-based checks
|
|
1055
|
-
(
|
|
1056
|
-
// Element is not currently focused
|
|
1057
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
1058
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
1059
|
-
|
|
1060
|
-
// And element has been touched or is untouched but has a value
|
|
1061
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
1062
|
-
);
|
|
1048
|
+
(!elem.contains(document.activeElement) &&
|
|
1049
|
+
(elem.touched ||
|
|
1050
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
1051
|
+
elem.validateOnInput;
|
|
1063
1052
|
|
|
1064
1053
|
if (elem.hasAttribute('error')) {
|
|
1065
1054
|
elem.validity = 'customError';
|
|
@@ -1034,24 +1034,13 @@ class AuroFormValidation {
|
|
|
1034
1034
|
this.getInputElements(elem);
|
|
1035
1035
|
this.getAuroInputs(elem);
|
|
1036
1036
|
|
|
1037
|
-
//
|
|
1037
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
1038
1038
|
let validationShouldRun =
|
|
1039
|
-
|
|
1040
|
-
// If the validation was forced
|
|
1041
1039
|
force ||
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
// State-based checks
|
|
1047
|
-
(
|
|
1048
|
-
// Element is not currently focused
|
|
1049
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
1050
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
1051
|
-
|
|
1052
|
-
// And element has been touched or is untouched but has a value
|
|
1053
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
1054
|
-
);
|
|
1040
|
+
(!elem.contains(document.activeElement) &&
|
|
1041
|
+
(elem.touched ||
|
|
1042
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
1043
|
+
elem.validateOnInput;
|
|
1055
1044
|
|
|
1056
1045
|
if (elem.hasAttribute('error')) {
|
|
1057
1046
|
elem.validity = 'customError';
|
|
@@ -987,24 +987,13 @@ class AuroFormValidation {
|
|
|
987
987
|
this.getInputElements(elem);
|
|
988
988
|
this.getAuroInputs(elem);
|
|
989
989
|
|
|
990
|
-
//
|
|
990
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
991
991
|
let validationShouldRun =
|
|
992
|
-
|
|
993
|
-
// If the validation was forced
|
|
994
992
|
force ||
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
// State-based checks
|
|
1000
|
-
(
|
|
1001
|
-
// Element is not currently focused
|
|
1002
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
1003
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
1004
|
-
|
|
1005
|
-
// And element has been touched or is untouched but has a value
|
|
1006
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
1007
|
-
);
|
|
993
|
+
(!elem.contains(document.activeElement) &&
|
|
994
|
+
(elem.touched ||
|
|
995
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
996
|
+
elem.validateOnInput;
|
|
1008
997
|
|
|
1009
998
|
if (elem.hasAttribute('error')) {
|
|
1010
999
|
elem.validity = 'customError';
|
|
@@ -987,24 +987,13 @@ class AuroFormValidation {
|
|
|
987
987
|
this.getInputElements(elem);
|
|
988
988
|
this.getAuroInputs(elem);
|
|
989
989
|
|
|
990
|
-
//
|
|
990
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
991
991
|
let validationShouldRun =
|
|
992
|
-
|
|
993
|
-
// If the validation was forced
|
|
994
992
|
force ||
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
// State-based checks
|
|
1000
|
-
(
|
|
1001
|
-
// Element is not currently focused
|
|
1002
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
1003
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
1004
|
-
|
|
1005
|
-
// And element has been touched or is untouched but has a value
|
|
1006
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
1007
|
-
);
|
|
993
|
+
(!elem.contains(document.activeElement) &&
|
|
994
|
+
(elem.touched ||
|
|
995
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
996
|
+
elem.validateOnInput;
|
|
1008
997
|
|
|
1009
998
|
if (elem.hasAttribute('error')) {
|
|
1010
999
|
elem.validity = 'customError';
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
|
|
40
40
|
| Method | Type | Description |
|
|
41
41
|
|------------|----------------------------------------|--------------------------------------------------|
|
|
42
|
-
| [clear](#clear) | `(): void` | Clears the current value of the combobox. |
|
|
43
42
|
| [focus](#focus) | `(): void` | Focuses the combobox trigger input. |
|
|
44
43
|
| [isValid](#isValid) | `(): boolean` | Checks if the element is valid. |
|
|
45
44
|
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
@@ -954,24 +954,13 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
954
954
|
this.getInputElements(elem);
|
|
955
955
|
this.getAuroInputs(elem);
|
|
956
956
|
|
|
957
|
-
//
|
|
957
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
958
958
|
let validationShouldRun =
|
|
959
|
-
|
|
960
|
-
// If the validation was forced
|
|
961
959
|
force ||
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
// State-based checks
|
|
967
|
-
(
|
|
968
|
-
// Element is not currently focused
|
|
969
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
970
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
971
|
-
|
|
972
|
-
// And element has been touched or is untouched but has a value
|
|
973
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
974
|
-
);
|
|
960
|
+
(!elem.contains(document.activeElement) &&
|
|
961
|
+
(elem.touched ||
|
|
962
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
963
|
+
elem.validateOnInput;
|
|
975
964
|
|
|
976
965
|
if (elem.hasAttribute('error')) {
|
|
977
966
|
elem.validity = 'customError';
|
|
@@ -2799,7 +2788,7 @@ class AuroFloatingUI {
|
|
|
2799
2788
|
*/
|
|
2800
2789
|
mirrorSize() {
|
|
2801
2790
|
// mirror the boxsize from bibSizer
|
|
2802
|
-
if (this.element.bibSizer) {
|
|
2791
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2803
2792
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2804
2793
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2805
2794
|
if (sizerStyle.width !== '0px') {
|
|
@@ -3011,7 +3000,7 @@ class AuroFloatingUI {
|
|
|
3011
3000
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
3012
3001
|
return;
|
|
3013
3002
|
}
|
|
3014
|
-
|
|
3003
|
+
|
|
3015
3004
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
3016
3005
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
3017
3006
|
return;
|
|
@@ -3199,7 +3188,7 @@ class AuroFloatingUI {
|
|
|
3199
3188
|
|
|
3200
3189
|
event.preventDefault();
|
|
3201
3190
|
this.handleClick();
|
|
3202
|
-
}
|
|
3191
|
+
}
|
|
3203
3192
|
break;
|
|
3204
3193
|
case 'mouseenter':
|
|
3205
3194
|
if (this.element.hoverToggle) {
|
|
@@ -4596,6 +4585,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4596
4585
|
|
|
4597
4586
|
this.parentBorder = false;
|
|
4598
4587
|
|
|
4588
|
+
/** @private */
|
|
4589
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4590
|
+
|
|
4599
4591
|
this.privateDefaults();
|
|
4600
4592
|
}
|
|
4601
4593
|
|
|
@@ -5029,12 +5021,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5029
5021
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
5030
5022
|
this.handleTriggerContentSlotChange();
|
|
5031
5023
|
}
|
|
5024
|
+
}
|
|
5032
5025
|
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5026
|
+
handleDropdownToggle(event) {
|
|
5027
|
+
this.updateFocusTrap();
|
|
5028
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
5029
|
+
const eventType = event.detail.eventType || "unknown";
|
|
5030
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5031
|
+
this.trigger.focus();
|
|
5038
5032
|
}
|
|
5039
5033
|
}
|
|
5040
5034
|
|
|
@@ -5042,6 +5036,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5042
5036
|
|
|
5043
5037
|
// Configure the floater to, this will generate the ID for the bib
|
|
5044
5038
|
this.floater.configure(this, 'auroDropdown');
|
|
5039
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
5045
5040
|
|
|
5046
5041
|
/**
|
|
5047
5042
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -10201,24 +10196,13 @@ class AuroFormValidation {
|
|
|
10201
10196
|
this.getInputElements(elem);
|
|
10202
10197
|
this.getAuroInputs(elem);
|
|
10203
10198
|
|
|
10204
|
-
//
|
|
10199
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
10205
10200
|
let validationShouldRun =
|
|
10206
|
-
|
|
10207
|
-
// If the validation was forced
|
|
10208
10201
|
force ||
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
// State-based checks
|
|
10214
|
-
(
|
|
10215
|
-
// Element is not currently focused
|
|
10216
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
10217
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
10218
|
-
|
|
10219
|
-
// And element has been touched or is untouched but has a value
|
|
10220
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
10221
|
-
);
|
|
10202
|
+
(!elem.contains(document.activeElement) &&
|
|
10203
|
+
(elem.touched ||
|
|
10204
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
10205
|
+
elem.validateOnInput;
|
|
10222
10206
|
|
|
10223
10207
|
if (elem.hasAttribute('error')) {
|
|
10224
10208
|
elem.validity = 'customError';
|
|
@@ -11169,9 +11153,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
11169
11153
|
this.inputElement.value = "";
|
|
11170
11154
|
this.value = "";
|
|
11171
11155
|
this.labelElement.classList.remove('inputElement-label--sticky');
|
|
11172
|
-
this.notifyValueChanged();
|
|
11173
11156
|
this.focus();
|
|
11174
11157
|
this.validation.validate(this);
|
|
11158
|
+
this.notifyValueChanged();
|
|
11175
11159
|
}
|
|
11176
11160
|
|
|
11177
11161
|
/**
|
|
@@ -11266,20 +11250,13 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
11266
11250
|
}
|
|
11267
11251
|
|
|
11268
11252
|
/**
|
|
11269
|
-
* Resets component to initial state
|
|
11253
|
+
* Resets component to initial state.
|
|
11270
11254
|
* @returns {void}
|
|
11271
11255
|
*/
|
|
11272
11256
|
reset() {
|
|
11273
11257
|
this.validation.reset(this);
|
|
11274
11258
|
}
|
|
11275
11259
|
|
|
11276
|
-
/**
|
|
11277
|
-
* Clears the input value
|
|
11278
|
-
*/
|
|
11279
|
-
clear() {
|
|
11280
|
-
this.value = undefined;
|
|
11281
|
-
}
|
|
11282
|
-
|
|
11283
11260
|
/**
|
|
11284
11261
|
* Sets configuration data used elsewhere based on the `type` attribute.
|
|
11285
11262
|
* @private
|
|
@@ -16623,7 +16600,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16623
16600
|
});
|
|
16624
16601
|
|
|
16625
16602
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
16626
|
-
this.
|
|
16603
|
+
this.reset();
|
|
16627
16604
|
});
|
|
16628
16605
|
}
|
|
16629
16606
|
|
|
@@ -16643,7 +16620,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16643
16620
|
});
|
|
16644
16621
|
|
|
16645
16622
|
/**
|
|
16646
|
-
* Validate every time we remove focus from the
|
|
16623
|
+
* Validate every time we remove focus from the datepicker.
|
|
16647
16624
|
*/
|
|
16648
16625
|
this.addEventListener('focusout', () => {
|
|
16649
16626
|
if (document.activeElement !== this) {
|
|
@@ -16848,16 +16825,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16848
16825
|
*/
|
|
16849
16826
|
reset() {
|
|
16850
16827
|
this.input.reset();
|
|
16851
|
-
this.menu.value = undefined;
|
|
16852
16828
|
this.validation.reset(this);
|
|
16853
|
-
}
|
|
16854
|
-
|
|
16855
|
-
/**
|
|
16856
|
-
* Clears the current value of the combobox.
|
|
16857
|
-
* @returns {void}
|
|
16858
|
-
*/
|
|
16859
|
-
clear() {
|
|
16860
|
-
this.input.clear();
|
|
16861
16829
|
this.menu.value = undefined;
|
|
16862
16830
|
}
|
|
16863
16831
|
|
|
@@ -16883,7 +16851,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16883
16851
|
this.hideBib();
|
|
16884
16852
|
}
|
|
16885
16853
|
} else {
|
|
16886
|
-
this.
|
|
16854
|
+
this.reset();
|
|
16887
16855
|
}
|
|
16888
16856
|
}
|
|
16889
16857
|
|
|
@@ -812,24 +812,13 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
812
812
|
this.getInputElements(elem);
|
|
813
813
|
this.getAuroInputs(elem);
|
|
814
814
|
|
|
815
|
-
//
|
|
815
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
816
816
|
let validationShouldRun =
|
|
817
|
-
|
|
818
|
-
// If the validation was forced
|
|
819
817
|
force ||
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
// State-based checks
|
|
825
|
-
(
|
|
826
|
-
// Element is not currently focused
|
|
827
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
828
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
829
|
-
|
|
830
|
-
// And element has been touched or is untouched but has a value
|
|
831
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
832
|
-
);
|
|
818
|
+
(!elem.contains(document.activeElement) &&
|
|
819
|
+
(elem.touched ||
|
|
820
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
821
|
+
elem.validateOnInput;
|
|
833
822
|
|
|
834
823
|
if (elem.hasAttribute('error')) {
|
|
835
824
|
elem.validity = 'customError';
|
|
@@ -2657,7 +2646,7 @@ class AuroFloatingUI {
|
|
|
2657
2646
|
*/
|
|
2658
2647
|
mirrorSize() {
|
|
2659
2648
|
// mirror the boxsize from bibSizer
|
|
2660
|
-
if (this.element.bibSizer) {
|
|
2649
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2661
2650
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2662
2651
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2663
2652
|
if (sizerStyle.width !== '0px') {
|
|
@@ -2869,7 +2858,7 @@ class AuroFloatingUI {
|
|
|
2869
2858
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2870
2859
|
return;
|
|
2871
2860
|
}
|
|
2872
|
-
|
|
2861
|
+
|
|
2873
2862
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
2874
2863
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2875
2864
|
return;
|
|
@@ -3057,7 +3046,7 @@ class AuroFloatingUI {
|
|
|
3057
3046
|
|
|
3058
3047
|
event.preventDefault();
|
|
3059
3048
|
this.handleClick();
|
|
3060
|
-
}
|
|
3049
|
+
}
|
|
3061
3050
|
break;
|
|
3062
3051
|
case 'mouseenter':
|
|
3063
3052
|
if (this.element.hoverToggle) {
|
|
@@ -4454,6 +4443,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4454
4443
|
|
|
4455
4444
|
this.parentBorder = false;
|
|
4456
4445
|
|
|
4446
|
+
/** @private */
|
|
4447
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4448
|
+
|
|
4457
4449
|
this.privateDefaults();
|
|
4458
4450
|
}
|
|
4459
4451
|
|
|
@@ -4887,12 +4879,14 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4887
4879
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4888
4880
|
this.handleTriggerContentSlotChange();
|
|
4889
4881
|
}
|
|
4882
|
+
}
|
|
4890
4883
|
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4884
|
+
handleDropdownToggle(event) {
|
|
4885
|
+
this.updateFocusTrap();
|
|
4886
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4887
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4888
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4889
|
+
this.trigger.focus();
|
|
4896
4890
|
}
|
|
4897
4891
|
}
|
|
4898
4892
|
|
|
@@ -4900,6 +4894,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4900
4894
|
|
|
4901
4895
|
// Configure the floater to, this will generate the ID for the bib
|
|
4902
4896
|
this.floater.configure(this, 'auroDropdown');
|
|
4897
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4903
4898
|
|
|
4904
4899
|
/**
|
|
4905
4900
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -10059,24 +10054,13 @@ class AuroFormValidation {
|
|
|
10059
10054
|
this.getInputElements(elem);
|
|
10060
10055
|
this.getAuroInputs(elem);
|
|
10061
10056
|
|
|
10062
|
-
//
|
|
10057
|
+
// Validate only if noValidate is not true and the input does not have focus
|
|
10063
10058
|
let validationShouldRun =
|
|
10064
|
-
|
|
10065
|
-
// If the validation was forced
|
|
10066
10059
|
force ||
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
// State-based checks
|
|
10072
|
-
(
|
|
10073
|
-
// Element is not currently focused
|
|
10074
|
-
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
10075
|
-
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
10076
|
-
|
|
10077
|
-
// And element has been touched or is untouched but has a value
|
|
10078
|
-
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
10079
|
-
);
|
|
10060
|
+
(!elem.contains(document.activeElement) &&
|
|
10061
|
+
(elem.touched ||
|
|
10062
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
10063
|
+
elem.validateOnInput;
|
|
10080
10064
|
|
|
10081
10065
|
if (elem.hasAttribute('error')) {
|
|
10082
10066
|
elem.validity = 'customError';
|
|
@@ -11027,9 +11011,9 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
11027
11011
|
this.inputElement.value = "";
|
|
11028
11012
|
this.value = "";
|
|
11029
11013
|
this.labelElement.classList.remove('inputElement-label--sticky');
|
|
11030
|
-
this.notifyValueChanged();
|
|
11031
11014
|
this.focus();
|
|
11032
11015
|
this.validation.validate(this);
|
|
11016
|
+
this.notifyValueChanged();
|
|
11033
11017
|
}
|
|
11034
11018
|
|
|
11035
11019
|
/**
|
|
@@ -11124,20 +11108,13 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
11124
11108
|
}
|
|
11125
11109
|
|
|
11126
11110
|
/**
|
|
11127
|
-
* Resets component to initial state
|
|
11111
|
+
* Resets component to initial state.
|
|
11128
11112
|
* @returns {void}
|
|
11129
11113
|
*/
|
|
11130
11114
|
reset() {
|
|
11131
11115
|
this.validation.reset(this);
|
|
11132
11116
|
}
|
|
11133
11117
|
|
|
11134
|
-
/**
|
|
11135
|
-
* Clears the input value
|
|
11136
|
-
*/
|
|
11137
|
-
clear() {
|
|
11138
|
-
this.value = undefined;
|
|
11139
|
-
}
|
|
11140
|
-
|
|
11141
11118
|
/**
|
|
11142
11119
|
* Sets configuration data used elsewhere based on the `type` attribute.
|
|
11143
11120
|
* @private
|
|
@@ -16481,7 +16458,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16481
16458
|
});
|
|
16482
16459
|
|
|
16483
16460
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
16484
|
-
this.
|
|
16461
|
+
this.reset();
|
|
16485
16462
|
});
|
|
16486
16463
|
}
|
|
16487
16464
|
|
|
@@ -16501,7 +16478,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16501
16478
|
});
|
|
16502
16479
|
|
|
16503
16480
|
/**
|
|
16504
|
-
* Validate every time we remove focus from the
|
|
16481
|
+
* Validate every time we remove focus from the datepicker.
|
|
16505
16482
|
*/
|
|
16506
16483
|
this.addEventListener('focusout', () => {
|
|
16507
16484
|
if (document.activeElement !== this) {
|
|
@@ -16706,16 +16683,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16706
16683
|
*/
|
|
16707
16684
|
reset() {
|
|
16708
16685
|
this.input.reset();
|
|
16709
|
-
this.menu.value = undefined;
|
|
16710
16686
|
this.validation.reset(this);
|
|
16711
|
-
}
|
|
16712
|
-
|
|
16713
|
-
/**
|
|
16714
|
-
* Clears the current value of the combobox.
|
|
16715
|
-
* @returns {void}
|
|
16716
|
-
*/
|
|
16717
|
-
clear() {
|
|
16718
|
-
this.input.clear();
|
|
16719
16687
|
this.menu.value = undefined;
|
|
16720
16688
|
}
|
|
16721
16689
|
|
|
@@ -16741,7 +16709,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16741
16709
|
this.hideBib();
|
|
16742
16710
|
}
|
|
16743
16711
|
} else {
|
|
16744
|
-
this.
|
|
16712
|
+
this.reset();
|
|
16745
16713
|
}
|
|
16746
16714
|
}
|
|
16747
16715
|
|
|
@@ -390,11 +390,6 @@ export class AuroCombobox extends AuroElement {
|
|
|
390
390
|
* @returns {void}
|
|
391
391
|
*/
|
|
392
392
|
reset(): void;
|
|
393
|
-
/**
|
|
394
|
-
* Clears the current value of the combobox.
|
|
395
|
-
* @returns {void}
|
|
396
|
-
*/
|
|
397
|
-
clear(): void;
|
|
398
393
|
/**
|
|
399
394
|
* Validates value.
|
|
400
395
|
* @param {boolean} [force=false] - Whether to force validation.
|