Skip to content

Commit

Permalink
perf: remove all references of isValid attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjones243 committed Dec 17, 2024
1 parent 414d19e commit 355cf1d
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 128 deletions.
5 changes: 0 additions & 5 deletions components/checkbox/demo/api.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -458,14 +457,10 @@ class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down
5 changes: 0 additions & 5 deletions components/checkbox/demo/index.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -458,14 +457,10 @@ class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down
17 changes: 0 additions & 17 deletions components/combobox/demo/api.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ let AuroFormValidation$1 = class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -425,14 +424,10 @@ let AuroFormValidation$1 = class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -5278,7 +5273,6 @@ class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -5295,14 +5289,10 @@ class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -5392,7 +5382,6 @@ class AuroFormValidation {
* @attr {String} helpText - Deprecated, see `slot`.
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
* @attr {String} id - Sets the unique ID of the element.
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
* @attr {String} label - Deprecated, see `slot`.
* @attr {String} lang - defines the language of an element.
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
Expand Down Expand Up @@ -5437,8 +5426,6 @@ class BaseInput extends r {
constructor() {
super();

this.isValid = false;

this.icon = false;
this.disabled = false;
this.required = false;
Expand Down Expand Up @@ -5559,10 +5546,6 @@ class BaseInput extends r {
reflect: true
},
errorMessage: { type: String },
isValid: {
type: String,
reflect: true
},
validity: {
type: String,
reflect: true
Expand Down
17 changes: 0 additions & 17 deletions components/combobox/demo/index.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ let AuroFormValidation$1 = class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -329,14 +328,10 @@ let AuroFormValidation$1 = class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -5182,7 +5177,6 @@ class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -5199,14 +5193,10 @@ class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -5296,7 +5286,6 @@ class AuroFormValidation {
* @attr {String} helpText - Deprecated, see `slot`.
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
* @attr {String} id - Sets the unique ID of the element.
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
* @attr {String} label - Deprecated, see `slot`.
* @attr {String} lang - defines the language of an element.
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
Expand Down Expand Up @@ -5341,8 +5330,6 @@ class BaseInput extends r {
constructor() {
super();

this.isValid = false;

this.icon = false;
this.disabled = false;
this.required = false;
Expand Down Expand Up @@ -5463,10 +5450,6 @@ class BaseInput extends r {
reflect: true
},
errorMessage: { type: String },
isValid: {
type: String,
reflect: true
},
validity: {
type: String,
reflect: true
Expand Down
17 changes: 0 additions & 17 deletions components/datepicker/demo/api.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ let AuroFormValidation$1 = class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -518,14 +517,10 @@ let AuroFormValidation$1 = class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -15457,7 +15452,6 @@ class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -15474,14 +15468,10 @@ class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -15571,7 +15561,6 @@ class AuroFormValidation {
* @attr {String} helpText - Deprecated, see `slot`.
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
* @attr {String} id - Sets the unique ID of the element.
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
* @attr {String} label - Deprecated, see `slot`.
* @attr {String} lang - defines the language of an element.
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
Expand Down Expand Up @@ -15616,8 +15605,6 @@ class BaseInput extends r {
constructor() {
super();

this.isValid = false;

this.icon = false;
this.disabled = false;
this.required = false;
Expand Down Expand Up @@ -15738,10 +15725,6 @@ class BaseInput extends r {
reflect: true
},
errorMessage: { type: String },
isValid: {
type: String,
reflect: true
},
validity: {
type: String,
reflect: true
Expand Down
17 changes: 0 additions & 17 deletions components/datepicker/demo/index.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ let AuroFormValidation$1 = class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -266,14 +265,10 @@ let AuroFormValidation$1 = class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -15205,7 +15200,6 @@ class AuroFormValidation {
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand All @@ -15222,14 +15216,10 @@ class AuroFormValidation {

if (validationShouldRun || elem.hasAttribute('error')) {
if (elem.validity && elem.validity !== 'valid') {
elem.isValid = false;

// Use the validity message override if it is declared
if (elem.ValidityMessageOverride) {
elem.setCustomValidity = elem.ValidityMessageOverride;
}
} else {
elem.isValid = true;
}

this.getErrorMessage(elem);
Expand Down Expand Up @@ -15319,7 +15309,6 @@ class AuroFormValidation {
* @attr {String} helpText - Deprecated, see `slot`.
* @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
* @attr {String} id - Sets the unique ID of the element.
* @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
* @attr {String} label - Deprecated, see `slot`.
* @attr {String} lang - defines the language of an element.
* @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
Expand Down Expand Up @@ -15364,8 +15353,6 @@ class BaseInput extends r {
constructor() {
super();

this.isValid = false;

this.icon = false;
this.disabled = false;
this.required = false;
Expand Down Expand Up @@ -15486,10 +15473,6 @@ class BaseInput extends r {
reflect: true
},
errorMessage: { type: String },
isValid: {
type: String,
reflect: true
},
validity: {
type: String,
reflect: true
Expand Down
1 change: 0 additions & 1 deletion components/input/demo/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Generate unique names for dependency components.
| [helpText](#helpText) | `helpText` | `String` | | Deprecated, see `slot`. |
| [icon](#icon) | `icon` | `Boolean` | false | If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format. |
| [id](#id) | `id` | `String` | | Sets the unique ID of the element. |
| [isValid](#isValid) | `isValid` | `String` | false | (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer. |
| [label](#label) | `label` | `String` | "Input label is undefined" | Deprecated, see `slot`. |
| [lang](#lang) | `lang` | `String` | | defines the language of an element. |
| [max](#max) | `max` | `String` | "undefined" | The maximum value allowed. This only applies for inputs with a type of `number` and all date formats. |
Expand Down
Loading

0 comments on commit 355cf1d

Please sign in to comment.