From 241ac04fbddfb99a8c0f766792f3440333c1cd18 Mon Sep 17 00:00:00 2001
From: Rajaneesh
Date: Wed, 27 Nov 2024 17:08:25 +0530
Subject: [PATCH] Fixe prettier issue
---
.../__stories__/notice-choice.stories.ts | 4 +-
.../components/notice-choice/notice-choice.ts | 272 +++++++++---------
.../src/components/notice-choice/services.ts | 2 -
.../src/components/notice-choice/utils.ts | 4 +-
4 files changed, 144 insertions(+), 138 deletions(-)
diff --git a/packages/web-components/src/components/notice-choice/__stories__/notice-choice.stories.ts b/packages/web-components/src/components/notice-choice/__stories__/notice-choice.stories.ts
index 22296dd0846..2f756cace19 100644
--- a/packages/web-components/src/components/notice-choice/__stories__/notice-choice.stories.ts
+++ b/packages/web-components/src/components/notice-choice/__stories__/notice-choice.stories.ts
@@ -118,8 +118,6 @@ const props = () => {
};
};
-
-
export const Default = (args) => {
const {
language,
@@ -133,7 +131,7 @@ export const Default = (args) => {
hiddenPhone,
ncTeleDetail,
ncEmailDetail,
- combineEmailPhone
+ combineEmailPhone,
} = args?.NoticeChoice ?? {};
return html`
${!this.hideErrorMessage && this.preventFormSubmission
- ? html`${mandatoryCheckbox.error}`
- : ''}
+ : ''}
@@ -487,7 +483,6 @@ class NoticeChoice extends StableSelectorMixin(LitElement) {
}
checkBoxTemplate(checkbox, checked, hiddenBox) {
-
this._onChange(`${hiddenBox.id}_VALUE`, `NC_HIDDEN_${hiddenBox.value}`);
return html`
{
-
newValues[id] = !!checked;
this.values = newValues;
@@ -643,10 +638,10 @@ class NoticeChoice extends StableSelectorMixin(LitElement) {
this.emailPrechecked && !checked
? 'CU'
: !this.emailPrechecked && checked
- ? 'UC'
- : this.emailPrechecked && checked
- ? 'CC'
- : 'UU';
+ ? 'UC'
+ : this.emailPrechecked && checked
+ ? 'CC'
+ : 'UU';
break;
case 'PHONE':
@@ -654,48 +649,45 @@ class NoticeChoice extends StableSelectorMixin(LitElement) {
this.telephonePrechecked && checked
? 'CC'
: this.telephonePrechecked && !checked
- ? 'CU'
- : !this.telephonePrechecked && checked
- ? 'UC'
- : 'UU';
+ ? 'CU'
+ : !this.telephonePrechecked && checked
+ ? 'UC'
+ : 'UU';
break;
}
this.values[id]['punsStatus'] = statusPrechecked;
this._onChange(hiddenFieldName, hiddenFieldStatus);
- this._onChange(`${hiddenFieldName}_VALUE`, `NC_HIDDEN_${hiddenFieldStatus}`);
- console.log("Test ME")
- })
-
-
+ this._onChange(
+ `${hiddenFieldName}_VALUE`,
+ `NC_HIDDEN_${hiddenFieldStatus}`
+ );
+ console.log('Test ME');
+ });
}
renderCheckbox(preText, checked) {
- const checkboxId = "EMAIL_PHONE_CHECKBOX";
+ const checkboxId = 'EMAIL_PHONE_CHECKBOX';
return html`
`;
}
@@ -903,8 +914,7 @@ class NoticeChoice extends StableSelectorMixin(LitElement) {
PHONE_UC: 'PHONE_UC',
PHONE_UU: 'PHONE_UU',
EMAIL_NOTICE_ONLY: 'EMAIL_NOTICE_ONLY',
- PHONE_NOTICE_ONLY: 'PHONE_NOTICE_ONLY'
-
+ PHONE_NOTICE_ONLY: 'PHONE_NOTICE_ONLY',
};
if (Object.prototype.hasOwnProperty.call(pwsFieldsMap, field)) {
diff --git a/packages/web-components/src/components/notice-choice/services.ts b/packages/web-components/src/components/notice-choice/services.ts
index c5b30ee9a9b..a3a5dbea204 100644
--- a/packages/web-components/src/components/notice-choice/services.ts
+++ b/packages/web-components/src/components/notice-choice/services.ts
@@ -6,7 +6,6 @@
*/
export function loadContent(locale: string, onSuccess: any, onError: any) {
-
const script = document.createElement('script');
script.async = false;
script.charset = 'utf-8';
@@ -15,7 +14,6 @@ export function loadContent(locale: string, onSuccess: any, onError: any) {
script.onload = () => {
try {
if (onSuccess) {
-
onSuccess(window.NoticeChoice.Content);
}
} catch (e) {
diff --git a/packages/web-components/src/components/notice-choice/utils.ts b/packages/web-components/src/components/notice-choice/utils.ts
index 581966d4b9e..c69520ee687 100644
--- a/packages/web-components/src/components/notice-choice/utils.ts
+++ b/packages/web-components/src/components/notice-choice/utils.ts
@@ -49,8 +49,8 @@ export function pwsValueMap(value) {
PHONE_CC: 'CC',
PHONE_UC: 'UC',
PHONE_UU: 'UU',
- EMAIL_NOTICE_ONLY:'NOTICE_ONLY',
- PHONE_NOTICE_ONLY:'NOTICE_ONLY'
+ EMAIL_NOTICE_ONLY: 'NOTICE_ONLY',
+ PHONE_NOTICE_ONLY: 'NOTICE_ONLY',
}[value] || null
);
}