Skip to content

Commit

Permalink
fix(formElements): set all Method public
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Nov 28, 2024
1 parent 4dc2c35 commit 5b1406e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export class OdsInput {
}

@Method()
async checkValidity(): Promise<boolean> {
public async checkValidity(): Promise<boolean> {
return this.internals.checkValidity();
}

@Method()
async clear(): Promise<void> {
public async clear(): Promise<void> {
this.odsClear.emit();
this.value = null;
this.inputEl?.focus();
Expand All @@ -85,23 +85,23 @@ export class OdsInput {
}

@Method()
async getValidationMessage(): Promise<string> {
public async getValidationMessage(): Promise<string> {
return this.internals.validationMessage;
}

@Method()
async getValidity(): Promise<ValidityState> {
public async getValidity(): Promise<ValidityState> {
return this.internals.validity;
}

@Method()
async reportValidity(): Promise<boolean> {
public async reportValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.reportValidity();
}

@Method()
async reset(): Promise<void> {
public async reset(): Promise<void> {
this.odsReset.emit();
this.value = this.defaultValue ?? null;

Expand All @@ -111,13 +111,13 @@ export class OdsInput {
}

@Method()
async toggleMask(): Promise<void> {
public async toggleMask(): Promise<void> {
this.isMasked = !this.isMasked;
this.odsToggleMask.emit();
}

@Method()
async willValidate(): Promise<boolean> {
public async willValidate(): Promise<boolean> {
return this.internals.willValidate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export class OdsPassword {
}

@Method()
async checkValidity(): Promise<boolean> {
public async checkValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals?.checkValidity();
}

@Method()
async clear(): Promise<void> {
public async clear(): Promise<void> {
await this.odsInput?.clear();

// Element internal validityState is not yet updated, so we set the flag
Expand All @@ -69,17 +69,17 @@ export class OdsPassword {
}

@Method()
async getValidationMessage(): Promise<string> {
public async getValidationMessage(): Promise<string> {
return this.internals.validationMessage;
}

@Method()
async getValidity(): Promise<ValidityState> {
public async getValidity(): Promise<ValidityState> {
return this.internals.validity;
}

@Method()
async reportValidity(): Promise<boolean> {
public async reportValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.reportValidity();
}
Expand All @@ -90,7 +90,7 @@ export class OdsPassword {
}

@Method()
async reset(): Promise<void> {
public async reset(): Promise<void> {
await this.odsInput?.reset();

// Element internal validityState is not yet updated, so we set the flag
Expand All @@ -99,7 +99,7 @@ export class OdsPassword {
}

@Method()
async willValidate(): Promise<boolean> {
public async willValidate(): Promise<boolean> {
return this.internals.willValidate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export class OdsQuantity {
}

@Method()
async checkValidity(): Promise<boolean> {
public async checkValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.checkValidity();
}

@Method()
async clear(): Promise<void> {
public async clear(): Promise<void> {
await this.odsInput?.clear();

// Element internal validityState is not yet updated, so we set the flag
Expand All @@ -69,23 +69,23 @@ export class OdsQuantity {
}

@Method()
async getValidationMessage(): Promise<string> {
public async getValidationMessage(): Promise<string> {
return this.internals.validationMessage;
}

@Method()
async getValidity(): Promise<ValidityState | undefined> {
public async getValidity(): Promise<ValidityState | undefined> {
return this.internals.validity;
}

@Method()
async reportValidity(): Promise<boolean> {
public async reportValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.reportValidity();
}

@Method()
async reset(): Promise<void> {
public async reset(): Promise<void> {
await this.odsInput?.reset();

// Element internal validityState is not yet updated, so we set the flag
Expand All @@ -94,7 +94,7 @@ export class OdsQuantity {
}

@Method()
async willValidate(): Promise<boolean> {
public async willValidate(): Promise<boolean> {
return this.internals.willValidate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class OdsTextarea {
}

@Method()
async checkValidity(): Promise<boolean> {
public async checkValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.checkValidity();
}
Expand All @@ -71,23 +71,23 @@ export class OdsTextarea {
}

@Method()
async getValidationMessage(): Promise<string> {
public async getValidationMessage(): Promise<string> {
return this.internals.validationMessage;
}

@Method()
async getValidity(): Promise<ValidityState> {
public async getValidity(): Promise<ValidityState> {
return this.internals.validity;
}

@Method()
async reportValidity(): Promise<boolean> {
public async reportValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.reportValidity();
}

@Method()
async reset(): Promise<void> {
public async reset(): Promise<void> {
this.odsReset.emit();
this.value = this.defaultValue ?? null;

Expand All @@ -97,7 +97,7 @@ export class OdsTextarea {
}

@Method()
async willValidate(): Promise<boolean> {
public async willValidate(): Promise<boolean> {
return this.internals.willValidate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ export class OdsTimepicker {
}

@Method()
async checkValidity(): Promise<boolean> {
public async checkValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.checkValidity();
}

@Method()
async clear(): Promise<void> {
public async clear(): Promise<void> {
await this.odsInput?.clear();
await this.odsSelect?.clear();
this.odsClear.emit();
Expand All @@ -80,23 +80,23 @@ export class OdsTimepicker {
}

@Method()
async getValidationMessage(): Promise<string> {
public async getValidationMessage(): Promise<string> {
return this.internals.validationMessage;
}

@Method()
async getValidity(): Promise<ValidityState | undefined> {
public async getValidity(): Promise<ValidityState | undefined> {
return this.internals.validity;
}

@Method()
async reportValidity(): Promise<boolean> {
public async reportValidity(): Promise<boolean> {
this.isInvalid = !this.internals.validity.valid;
return this.internals.reportValidity();
}

@Method()
async reset(): Promise<void> {
public async reset(): Promise<void> {
await this.odsInput?.reset();
await this.odsSelect?.reset();
this.odsReset.emit();
Expand All @@ -107,7 +107,7 @@ export class OdsTimepicker {
}

@Method()
async willValidate(): Promise<boolean> {
public async willValidate(): Promise<boolean> {
return this.internals.willValidate;
}

Expand Down

0 comments on commit 5b1406e

Please sign in to comment.