From 5b1406ef0db8a25ce5652c2ebc57f9638c1c5c5a Mon Sep 17 00:00:00 2001 From: Damien Pellier Date: Fri, 11 Oct 2024 10:50:45 +0200 Subject: [PATCH] fix(formElements): set all Method public --- .../input/src/components/ods-input/ods-input.tsx | 16 ++++++++-------- .../src/components/ods-password/ods-password.tsx | 14 +++++++------- .../src/components/ods-quantity/ods-quantity.tsx | 14 +++++++------- .../src/components/ods-textarea/ods-textarea.tsx | 12 ++++++------ .../components/ods-timepicker/ods-timepicker.tsx | 14 +++++++------- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/ods/src/components/input/src/components/ods-input/ods-input.tsx b/packages/ods/src/components/input/src/components/ods-input/ods-input.tsx index 01ecbcfa53..09efccc4c4 100644 --- a/packages/ods/src/components/input/src/components/ods-input/ods-input.tsx +++ b/packages/ods/src/components/input/src/components/ods-input/ods-input.tsx @@ -69,12 +69,12 @@ export class OdsInput { } @Method() - async checkValidity(): Promise { + public async checkValidity(): Promise { return this.internals.checkValidity(); } @Method() - async clear(): Promise { + public async clear(): Promise { this.odsClear.emit(); this.value = null; this.inputEl?.focus(); @@ -85,23 +85,23 @@ export class OdsInput { } @Method() - async getValidationMessage(): Promise { + public async getValidationMessage(): Promise { return this.internals.validationMessage; } @Method() - async getValidity(): Promise { + public async getValidity(): Promise { return this.internals.validity; } @Method() - async reportValidity(): Promise { + public async reportValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.reportValidity(); } @Method() - async reset(): Promise { + public async reset(): Promise { this.odsReset.emit(); this.value = this.defaultValue ?? null; @@ -111,13 +111,13 @@ export class OdsInput { } @Method() - async toggleMask(): Promise { + public async toggleMask(): Promise { this.isMasked = !this.isMasked; this.odsToggleMask.emit(); } @Method() - async willValidate(): Promise { + public async willValidate(): Promise { return this.internals.willValidate; } diff --git a/packages/ods/src/components/password/src/components/ods-password/ods-password.tsx b/packages/ods/src/components/password/src/components/ods-password/ods-password.tsx index 721ebd0ead..715dcd1ff2 100644 --- a/packages/ods/src/components/password/src/components/ods-password/ods-password.tsx +++ b/packages/ods/src/components/password/src/components/ods-password/ods-password.tsx @@ -54,13 +54,13 @@ export class OdsPassword { } @Method() - async checkValidity(): Promise { + public async checkValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals?.checkValidity(); } @Method() - async clear(): Promise { + public async clear(): Promise { await this.odsInput?.clear(); // Element internal validityState is not yet updated, so we set the flag @@ -69,17 +69,17 @@ export class OdsPassword { } @Method() - async getValidationMessage(): Promise { + public async getValidationMessage(): Promise { return this.internals.validationMessage; } @Method() - async getValidity(): Promise { + public async getValidity(): Promise { return this.internals.validity; } @Method() - async reportValidity(): Promise { + public async reportValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.reportValidity(); } @@ -90,7 +90,7 @@ export class OdsPassword { } @Method() - async reset(): Promise { + public async reset(): Promise { await this.odsInput?.reset(); // Element internal validityState is not yet updated, so we set the flag @@ -99,7 +99,7 @@ export class OdsPassword { } @Method() - async willValidate(): Promise { + public async willValidate(): Promise { return this.internals.willValidate; } diff --git a/packages/ods/src/components/quantity/src/components/ods-quantity/ods-quantity.tsx b/packages/ods/src/components/quantity/src/components/ods-quantity/ods-quantity.tsx index 0621587d5c..82fb3d3734 100644 --- a/packages/ods/src/components/quantity/src/components/ods-quantity/ods-quantity.tsx +++ b/packages/ods/src/components/quantity/src/components/ods-quantity/ods-quantity.tsx @@ -54,13 +54,13 @@ export class OdsQuantity { } @Method() - async checkValidity(): Promise { + public async checkValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.checkValidity(); } @Method() - async clear(): Promise { + public async clear(): Promise { await this.odsInput?.clear(); // Element internal validityState is not yet updated, so we set the flag @@ -69,23 +69,23 @@ export class OdsQuantity { } @Method() - async getValidationMessage(): Promise { + public async getValidationMessage(): Promise { return this.internals.validationMessage; } @Method() - async getValidity(): Promise { + public async getValidity(): Promise { return this.internals.validity; } @Method() - async reportValidity(): Promise { + public async reportValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.reportValidity(); } @Method() - async reset(): Promise { + public async reset(): Promise { await this.odsInput?.reset(); // Element internal validityState is not yet updated, so we set the flag @@ -94,7 +94,7 @@ export class OdsQuantity { } @Method() - async willValidate(): Promise { + public async willValidate(): Promise { return this.internals.willValidate; } diff --git a/packages/ods/src/components/textarea/src/components/ods-textarea/ods-textarea.tsx b/packages/ods/src/components/textarea/src/components/ods-textarea/ods-textarea.tsx index c50881e639..e5badab38f 100644 --- a/packages/ods/src/components/textarea/src/components/ods-textarea/ods-textarea.tsx +++ b/packages/ods/src/components/textarea/src/components/ods-textarea/ods-textarea.tsx @@ -54,7 +54,7 @@ export class OdsTextarea { } @Method() - async checkValidity(): Promise { + public async checkValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.checkValidity(); } @@ -71,23 +71,23 @@ export class OdsTextarea { } @Method() - async getValidationMessage(): Promise { + public async getValidationMessage(): Promise { return this.internals.validationMessage; } @Method() - async getValidity(): Promise { + public async getValidity(): Promise { return this.internals.validity; } @Method() - async reportValidity(): Promise { + public async reportValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.reportValidity(); } @Method() - async reset(): Promise { + public async reset(): Promise { this.odsReset.emit(); this.value = this.defaultValue ?? null; @@ -97,7 +97,7 @@ export class OdsTextarea { } @Method() - async willValidate(): Promise { + public async willValidate(): Promise { return this.internals.willValidate; } diff --git a/packages/ods/src/components/timepicker/src/components/ods-timepicker/ods-timepicker.tsx b/packages/ods/src/components/timepicker/src/components/ods-timepicker/ods-timepicker.tsx index 8c07def193..4dad77e90c 100644 --- a/packages/ods/src/components/timepicker/src/components/ods-timepicker/ods-timepicker.tsx +++ b/packages/ods/src/components/timepicker/src/components/ods-timepicker/ods-timepicker.tsx @@ -63,13 +63,13 @@ export class OdsTimepicker { } @Method() - async checkValidity(): Promise { + public async checkValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.checkValidity(); } @Method() - async clear(): Promise { + public async clear(): Promise { await this.odsInput?.clear(); await this.odsSelect?.clear(); this.odsClear.emit(); @@ -80,23 +80,23 @@ export class OdsTimepicker { } @Method() - async getValidationMessage(): Promise { + public async getValidationMessage(): Promise { return this.internals.validationMessage; } @Method() - async getValidity(): Promise { + public async getValidity(): Promise { return this.internals.validity; } @Method() - async reportValidity(): Promise { + public async reportValidity(): Promise { this.isInvalid = !this.internals.validity.valid; return this.internals.reportValidity(); } @Method() - async reset(): Promise { + public async reset(): Promise { await this.odsInput?.reset(); await this.odsSelect?.reset(); this.odsReset.emit(); @@ -107,7 +107,7 @@ export class OdsTimepicker { } @Method() - async willValidate(): Promise { + public async willValidate(): Promise { return this.internals.willValidate; }