@fullsession.io/fs-feedback-widget 1.6.0 → 1.7.0

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.
@@ -1,305 +1,382 @@
1
-
2
- <script>
3
- import Icons from "../Icons/reactionIcons.svelte";
4
- import "../widgetPages/reactionpage.css"
5
- export let feedbackData;
6
- $: widgetComponent = 1;
7
- let reactionNames = ["hate","dislike","neutral","like","love"];
8
- let changingReactionNames = reactionNames;
9
- let reactionType = "";
10
- let comment=""
11
- let email =""
12
- let reactionName = "test";
13
- let reactionState = true;
14
- $:pointerMargin = 10;
15
- $:hateDisplay = 'none'
16
- $:dislikeDisplay = 'none'
17
- $:neutralDisplay = 'none'
18
- $:likeDisplay = 'none'
19
- $:loveDisplay = 'none';
20
- $:buttonColor = feedbackData.wgAccentColor;
21
- $: document.documentElement.style.setProperty('--pointerMargin', pointerMargin + '%')
22
- $: document.documentElement.style.setProperty('--hateDisplay', hateDisplay)
23
- $: document.documentElement.style.setProperty('--dislikeDisplay', dislikeDisplay)
24
- $: document.documentElement.style.setProperty('--neutralDisplay', neutralDisplay)
25
- $: document.documentElement.style.setProperty('--likeDisplay', likeDisplay)
26
- $: document.documentElement.style.setProperty('--loveDisplay', loveDisplay)
27
- $: document.documentElement.style.setProperty('--buttonColor', buttonColor)
28
-
29
-
30
-
31
- let count = 0;
32
- $: buttonState = false;
33
- let checkTextAreaInterval;
34
- let checkEmailAreaInterval;
35
-
36
- export let closeHandler = (email,comment,reactionType) => {};
37
- export let closeHandlerBeforeFinishing = (email,comment,reactionType) => {};
38
-
39
-
40
- // const commentButtonDisable = () =>{
41
-
42
- // let source = document.querySelector(".fsTextArea");
43
-
44
- // source.addEventListener('propertychange', commentHandler);
45
-
46
-
47
- // }
48
- const commentHandler = () => {
49
- let input = document.querySelector(".fsTextArea");
50
-
51
- if (input.value=== "") {
52
- buttonState = false; //button remains disabled
53
- } else {
54
- buttonState = true; //button is enabled
55
- }
56
- comment = "";
57
- comment = input.value;
58
- }
59
-
60
- // const EmailButtonDisable = () =>{
61
-
62
- // let source = document.querySelector("#fsEmailTextArea");
63
-
64
- // source.addEventListener('propertychange', emailHandler);
65
-
66
-
67
- // }
68
-
69
- const emailHandler = ()=> {
70
- let input = document.querySelector("#fsEmailTextArea");
71
-
72
- if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(input.value)) || input.value ==="") {
73
- buttonState = false; //button remains disabled
74
- } else {
75
- buttonState = true; //button is enabled
76
- email = "";
77
- email = document.getElementById("fsEmailTextArea").value;
78
- }
79
-
80
-
81
-
82
- }
83
-
84
-
85
- const changeStyle = (prevState) =>{
86
-
87
- if(prevState == "hate"){
88
- hateDisplay = "none"
89
- } else if(prevState == "dislike"){
90
- dislikeDisplay = "none"
91
- } else if(prevState == "neutral"){
92
- neutralDisplay = "none"
93
- } else if(prevState == "like"){
94
- likeDisplay = "none"
95
- } else if(prevState == "love"){
96
- loveDisplay = "none"
97
- }
98
- }
99
-
100
-
101
- const openComment = (state,rating,name) => {
102
- let prevName = reactionName
103
- reactionName = name
104
-
105
- widgetComponent = state;
106
- reactionType = String(rating);
107
- changingReactionNames = ["unSelectedHate","unSelectedDislike","unSelectedNeutral","unSelectedLike","unSelectedLove"];
108
- closeHandlerBeforeFinishing(email,comment,reactionType)
109
- if(count >0){
110
- changeStyle(prevName)
111
- }
112
- // changeStyle(prevName,reactionName)
113
- count++;
114
- if(rating == 1){
115
-
116
- pointerMargin = 11
117
- hateDisplay = "block"
118
- changingReactionNames[0] = reactionNames[0]
119
- reactionState = !reactionState;
120
- } else if(rating == 2){
121
- changingReactionNames[1] = reactionNames[1]
122
- pointerMargin = 30;
123
- dislikeDisplay = "block"
124
- reactionState = !reactionState;
125
- } else if(rating == 3){
126
- changingReactionNames[2] = reactionNames[2]
127
- pointerMargin = 49
128
- neutralDisplay = "block"
129
- reactionState = !reactionState;
130
- } else if(rating == 4){
131
- changingReactionNames[3] = reactionNames[3]
132
- pointerMargin = 68
133
- likeDisplay = "block"
134
- reactionState = !reactionState;
135
- } else if(rating == 5){
136
- changingReactionNames[4] = reactionNames[4]
137
- pointerMargin = 87
138
- loveDisplay = "block"
139
- reactionState = !reactionState;
140
- }
141
- };
142
-
143
- const openEmailCont = (state) =>{
144
- clearInterval(checkTextAreaInterval);
145
- document.querySelector(".fsTextArea").value="";
146
- buttonState = false
147
- widgetComponent = state;
148
-
149
- }
150
-
151
- const endEmailInterval =()=> {
152
- clearInterval(checkEmailAreaInterval);
153
- document.querySelector("#fsEmailTextArea").value="";
154
-
155
- }
156
-
157
- </script>
158
-
159
-
160
-
161
- {#if widgetComponent === 1}
162
- <div class="fsReactionsContainer">
163
- <div id="fsTxt">{feedbackData.wgQuestion}</div>
164
- <div class="fsIcons">
165
- <div class="fsIconTextCont" on:click={() =>openComment(2,1,"hate")}>
166
- <div class="fsReactionIcon">
167
- <Icons bind:name={changingReactionNames[0]}/>
168
- </div>
169
-
170
- <p class="fsReactionText">Hate</p>
171
- </div>
172
-
173
- <div class="fsIconTextCont" on:click={() =>openComment(2,2,"dislike")}>
174
- <div class="fsReactionIcon">
175
- <Icons bind:name={changingReactionNames[1]} />
176
- </div>
177
-
178
- <p class="fsReactionText">Dislike</p>
179
- </div>
180
- <div class="fsIconTextCont" on:click={() =>openComment(2,3,"neutral")}>
181
- <div class="fsReactionIcon">
182
- <Icons bind:name={changingReactionNames[2]} />
183
- </div>
184
-
185
- <p class="fsReactionText">Neutral</p>
186
- </div>
187
- <div class="fsIconTextCont" on:click={() =>openComment(2,4,"like")}>
188
- <div class="fsReactionIcon">
189
- <Icons bind:name={changingReactionNames[3]} />
190
- </div>
191
- <p class="fsReactionText">Like</p>
192
- </div>
193
- <div class="fsIconTextCont" on:click={() =>openComment(2,5,"love")}>
194
- <div class="fsReactionIcon">
195
- <Icons bind:name={changingReactionNames[4]} />
196
- </div>
197
- <p class="fsReactionText" >Love</p>
198
- </div>
199
- </div>
200
- <p id ="test"></p>
201
- </div>
202
-
203
-
204
- {:else if widgetComponent === 2}
205
- <div class="fsCommentContainer">
206
- <div class="fsIcons-second">
207
- <div class="fsIconTextCont" on:click={() =>openComment(2,1,"hate")}>
208
- <div class="fsReactionIcon">
209
- {#if reactionState}
210
- <Icons bind:name={changingReactionNames[0]}/>
211
- {:else if reactionState==false}
212
- <Icons bind:name={changingReactionNames[0]}/>
213
- {/if}
214
- </div>
215
-
216
- <p class="fsReactionText" id="fsHateDiv">Hate</p>
217
- </div>
218
-
219
- <div class="fsIconTextCont" on:click={() =>openComment(2,2,"dislike")}>
220
- <div class="fsReactionIcon">
221
- {#if reactionState}
222
- <Icons bind:name={changingReactionNames[1]}/>
223
- {:else if reactionState==false}
224
- <Icons bind:name={changingReactionNames[1]}/>
225
- {/if}
226
- </div>
227
-
228
- <p class="fsReactionText" id="fsDislikeDiv">Dislike</p>
229
- </div>
230
- <div class="fsIconTextCont" on:click={() =>openComment(2,3,"neutral")}>
231
- <div class="fsReactionIcon">
232
- {#if reactionState}
233
- <Icons bind:name={changingReactionNames[2]}/>
234
- {:else if reactionState==false}
235
- <Icons bind:name={changingReactionNames[2]}/>
236
- {/if}
237
- </div>
238
-
239
- <p class="fsReactionText" id="fsNeutralDiv">Neutral</p>
240
- </div>
241
- <div class="fsIconTextCont" on:click={() =>openComment(2,4,"like")}>
242
- <div class="fsReactionIcon">
243
- {#if reactionState}
244
- <Icons bind:name={changingReactionNames[3]}/>
245
- {:else if reactionState==false}
246
- <Icons bind:name={changingReactionNames[3]}/>
247
- {/if}
248
- </div>
249
- <p class="fsReactionText" id="fsLikeDiv">Like</p>
250
- </div>
251
- <div class="fsIconTextCont">
252
- <div class="fsReactionIcon" on:click={() =>openComment(2,5,"love")}>
253
- {#if reactionState}
254
- <Icons bind:name={changingReactionNames[4]}/>
255
- {:else if reactionState==false}
256
- <Icons bind:name={changingReactionNames[4]}/>
257
- {/if}
258
- </div>
259
- <p class="fsReactionText" id="fsLoveDiv">Love</p>
260
- </div>
261
- </div>
262
-
263
- <div class="fsTextAreaCont" >
264
- <div class="fsPointerDiv" id="fsPointer" ></div>
265
- <textarea class="fsTextArea" placeholder="Tell us your experience..." on:keyup={() => commentHandler()}></textarea>
266
- </div>
267
-
268
- <div class="fsFooter">
269
- {#if buttonState == false}
270
- <button class="fsCommentButtonContDisable" disabled>
271
- <p class="fsCommentButtonTxtDisable">Send</p>
272
- </button>
273
- {:else if buttonState == true}
274
- <button class="fsSendButtonContCommentComp" on:click={() => openEmailCont(3)} >
275
- <p class="fsSendButtonCommentComponent">Send</p>
276
- </button>
277
- {/if}
278
- </div>
279
- </div>
280
- {:else if widgetComponent === 3}
281
- <div class="fsEmailContainer">
282
- <div id="fsEmailText">
283
- {feedbackData.wgEmailReqMsg}
284
- </div>
285
- <div id="fsEmailInputCont">
286
- <input type="text" id="fsEmailTextArea" placeholder="email@domain.com" on:keyup={() => emailHandler()}>
287
- </div>
288
- <div class="fsEmailFooter">
289
- <p id="fsSkipText" on:click={() => closeHandler(email,comment,reactionType)}><u>Skip</u></p>
290
- {#if buttonState == false}
291
- <fs-button class="fsCommentButtonContDisable" >
292
- <p class="fsCommentButtonTxtDisable">Send</p>
293
- </fs-button>
294
- {:else if buttonState == true}
295
- <fs-button class="fsSendButtonContCommentComp" on:click={() => closeHandler(email,comment,reactionType)} on:click={()=>endEmailInterval() }>
296
- <p class="fsSendButtonCommentComponent" >Send</p>
297
- </fs-button>
298
- {/if}
299
-
300
- </div>
301
- </div>
302
- {/if}
303
-
304
-
305
-
1
+ <script>
2
+ import Icons from "../Icons/reactionIcons.svelte";
3
+ import "../widgetPages/reactionpage.css";
4
+ export let feedbackData;
5
+ export let wgType;
6
+ $: widgetComponent = 1;
7
+ let reactionNames = ["hate", "dislike", "neutral", "like", "love"];
8
+ let changingReactionNames = reactionNames;
9
+ let reactionType = "";
10
+ let comment = "";
11
+ let email = "";
12
+ let questionAnswer = "";
13
+ let reactionName = "test";
14
+ let reactionState = true;
15
+ $: pointerMargin = 10;
16
+ $: hateDisplay = "none";
17
+ $: dislikeDisplay = "none";
18
+ $: neutralDisplay = "none";
19
+ $: likeDisplay = "none";
20
+ $: loveDisplay = "none";
21
+ $: buttonColor = feedbackData.wgAccentColor;
22
+ $: widgetQuestion = feedbackData.wgQuestion;
23
+ $: widgetEmailReqMsg = feedbackData.wgEmailReqMsg;
24
+ $: widgetPlaceholder = feedbackData.wgFeedbackPlaceholder;
25
+ $: document.documentElement.style.setProperty(
26
+ "--pointerMargin",
27
+ pointerMargin + "%"
28
+ );
29
+ $: document.documentElement.style.setProperty("--hateDisplay", hateDisplay);
30
+ $: document.documentElement.style.setProperty(
31
+ "--dislikeDisplay",
32
+ dislikeDisplay
33
+ );
34
+ $: document.documentElement.style.setProperty(
35
+ "--neutralDisplay",
36
+ neutralDisplay
37
+ );
38
+ $: document.documentElement.style.setProperty("--likeDisplay", likeDisplay);
39
+ $: document.documentElement.style.setProperty("--loveDisplay", loveDisplay);
40
+ $: document.documentElement.style.setProperty("--buttonColor", buttonColor);
41
+
42
+ let count = 0;
43
+ $: buttonState = false;
44
+ let checkTextAreaInterval;
45
+ let checkEmailAreaInterval;
46
+
47
+ export let closeHandler = (
48
+ email,
49
+ comment,
50
+ reactionType,
51
+ questionAnswer
52
+ ) => {};
53
+ export let closeHandlerBeforeFinishing = (email, comment, reactionType) => {};
54
+
55
+ // const commentButtonDisable = () =>{
56
+
57
+ // let source = document.querySelector(".fsTextArea");
58
+
59
+ // source.addEventListener('propertychange', commentHandler);
60
+
61
+ // }
62
+ const commentHandler = () => {
63
+ let input = document.querySelector(".fsTextArea");
64
+
65
+ if (input.value === "") {
66
+ buttonState = false; //button remains disabled
67
+ } else {
68
+ buttonState = true; //button is enabled
69
+ }
70
+ comment = "";
71
+ comment = input.value;
72
+ };
73
+
74
+ // const EmailButtonDisable = () =>{
75
+
76
+ // let source = document.querySelector("#fsEmailTextArea");
77
+
78
+ // source.addEventListener('propertychange', emailHandler);
79
+
80
+ // }
81
+
82
+ const emailHandler = () => {
83
+ let input = document.querySelector("#fsEmailTextArea");
84
+
85
+ if (
86
+ !/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(input.value) ||
87
+ input.value === ""
88
+ ) {
89
+ buttonState = false; //button remains disabled
90
+ } else {
91
+ buttonState = true; //button is enabled
92
+ email = "";
93
+ email = document.getElementById("fsEmailTextArea").value;
94
+ }
95
+ };
96
+
97
+ const changeStyle = (prevState) => {
98
+ if (prevState == "hate") {
99
+ hateDisplay = "none";
100
+ } else if (prevState == "dislike") {
101
+ dislikeDisplay = "none";
102
+ } else if (prevState == "neutral") {
103
+ neutralDisplay = "none";
104
+ } else if (prevState == "like") {
105
+ likeDisplay = "none";
106
+ } else if (prevState == "love") {
107
+ loveDisplay = "none";
108
+ }
109
+ };
110
+
111
+ const openComment = (state, rating, name) => {
112
+ let prevName = reactionName;
113
+ reactionName = name;
114
+
115
+ widgetComponent = state;
116
+ reactionType = String(rating);
117
+ changingReactionNames = [
118
+ "unSelectedHate",
119
+ "unSelectedDislike",
120
+ "unSelectedNeutral",
121
+ "unSelectedLike",
122
+ "unSelectedLove",
123
+ ];
124
+ closeHandlerBeforeFinishing(email, comment, reactionType);
125
+ if (count > 0) {
126
+ changeStyle(prevName);
127
+ }
128
+ // changeStyle(prevName,reactionName)
129
+ count++;
130
+ if (rating == 1) {
131
+ pointerMargin = 11;
132
+ hateDisplay = "block";
133
+ changingReactionNames[0] = reactionNames[0];
134
+ reactionState = !reactionState;
135
+ } else if (rating == 2) {
136
+ changingReactionNames[1] = reactionNames[1];
137
+ pointerMargin = 30;
138
+ dislikeDisplay = "block";
139
+ reactionState = !reactionState;
140
+ } else if (rating == 3) {
141
+ changingReactionNames[2] = reactionNames[2];
142
+ pointerMargin = 49;
143
+ neutralDisplay = "block";
144
+ reactionState = !reactionState;
145
+ } else if (rating == 4) {
146
+ changingReactionNames[3] = reactionNames[3];
147
+ pointerMargin = 68;
148
+ likeDisplay = "block";
149
+ reactionState = !reactionState;
150
+ } else if (rating == 5) {
151
+ changingReactionNames[4] = reactionNames[4];
152
+ pointerMargin = 87;
153
+ loveDisplay = "block";
154
+ reactionState = !reactionState;
155
+ }
156
+ };
157
+
158
+ const questionHandler = (state, question) => {
159
+ let input = document.querySelector(".fsAnswerTextArea");
160
+
161
+ if (input.value === "") {
162
+ buttonState = false;
163
+ } else {
164
+ buttonState = true;
165
+ }
166
+ questionAnswer = "";
167
+ questionAnswer = input.value;
168
+ };
169
+
170
+ const openEmailCont = (state) => {
171
+ clearInterval(checkTextAreaInterval);
172
+ document.querySelector(".fsTextArea").value = "";
173
+ buttonState = false;
174
+ widgetComponent = state;
175
+ };
176
+
177
+ const openEmailView = (state) => {
178
+ clearInterval(checkTextAreaInterval);
179
+ document.querySelector(".fsAnswerTextArea").value = "";
180
+ buttonState = false;
181
+ widgetComponent = state;
182
+ };
183
+
184
+ const endEmailInterval = () => {
185
+ clearInterval(checkEmailAreaInterval);
186
+ document.querySelector("#fsEmailTextArea").value = "";
187
+ };
188
+ </script>
189
+
190
+ {#if widgetComponent === 1}
191
+ <div id="fsTxt">{widgetQuestion}</div>
192
+ {#if wgType === 0}
193
+ <div class="fsReactionsContainer">
194
+ <div class="fsIcons">
195
+ <div class="fsIconTextCont" on:click={() => openComment(2, 1, "hate")}>
196
+ <div class="fsReactionIcon">
197
+ <Icons bind:name={changingReactionNames[0]} />
198
+ </div>
199
+
200
+ <p class="fsReactionText">Hate</p>
201
+ </div>
202
+
203
+ <div
204
+ class="fsIconTextCont"
205
+ on:click={() => openComment(2, 2, "dislike")}
206
+ >
207
+ <div class="fsReactionIcon">
208
+ <Icons bind:name={changingReactionNames[1]} />
209
+ </div>
210
+
211
+ <p class="fsReactionText">Dislike</p>
212
+ </div>
213
+ <div
214
+ class="fsIconTextCont"
215
+ on:click={() => openComment(2, 3, "neutral")}
216
+ >
217
+ <div class="fsReactionIcon">
218
+ <Icons bind:name={changingReactionNames[2]} />
219
+ </div>
220
+
221
+ <p class="fsReactionText">Neutral</p>
222
+ </div>
223
+ <div class="fsIconTextCont" on:click={() => openComment(2, 4, "like")}>
224
+ <div class="fsReactionIcon">
225
+ <Icons bind:name={changingReactionNames[3]} />
226
+ </div>
227
+ <p class="fsReactionText">Like</p>
228
+ </div>
229
+ <div class="fsIconTextCont" on:click={() => openComment(2, 5, "love")}>
230
+ <div class="fsReactionIcon">
231
+ <Icons bind:name={changingReactionNames[4]} />
232
+ </div>
233
+ <p class="fsReactionText">Love</p>
234
+ </div>
235
+ </div>
236
+ </div>
237
+ {:else if wgType === 1}
238
+ <div class="fsQuestionContainer">
239
+ <div class="fsTextAreaCont-qa-view">
240
+ <textarea
241
+ class="fsAnswerTextArea"
242
+ placeholder="Answer Here..."
243
+ on:keyup={() => questionHandler()}
244
+ />
245
+ </div>
246
+ <div class="fsFooter">
247
+ {#if buttonState == false}
248
+ <button class="fsCommentButtonContDisable" disabled>
249
+ <p class="fsCommentButtonTxtDisable">Send</p>
250
+ </button>
251
+ {:else if buttonState == true}
252
+ <button
253
+ class="fsSendButtonContCommentComp"
254
+ on:click={() => openEmailView(3)}
255
+ >
256
+ <p class="fsSendButtonCommentComponent">Send</p>
257
+ </button>
258
+ {/if}
259
+ </div>
260
+ </div>
261
+ {/if}
262
+ {:else if widgetComponent === 2 && wgType !== 1}
263
+ <div class="fsCommentContainer">
264
+ <div class="fsIcons-second">
265
+ <div class="fsIconTextCont" on:click={() => openComment(2, 1, "hate")}>
266
+ <div class="fsReactionIcon">
267
+ {#if reactionState}
268
+ <Icons bind:name={changingReactionNames[0]} />
269
+ {:else if reactionState == false}
270
+ <Icons bind:name={changingReactionNames[0]} />
271
+ {/if}
272
+ </div>
273
+
274
+ <p class="fsReactionText" id="fsHateDiv">Hate</p>
275
+ </div>
276
+
277
+ <div class="fsIconTextCont" on:click={() => openComment(2, 2, "dislike")}>
278
+ <div class="fsReactionIcon">
279
+ {#if reactionState}
280
+ <Icons bind:name={changingReactionNames[1]} />
281
+ {:else if reactionState == false}
282
+ <Icons bind:name={changingReactionNames[1]} />
283
+ {/if}
284
+ </div>
285
+
286
+ <p class="fsReactionText" id="fsDislikeDiv">Dislike</p>
287
+ </div>
288
+ <div class="fsIconTextCont" on:click={() => openComment(2, 3, "neutral")}>
289
+ <div class="fsReactionIcon">
290
+ {#if reactionState}
291
+ <Icons bind:name={changingReactionNames[2]} />
292
+ {:else if reactionState == false}
293
+ <Icons bind:name={changingReactionNames[2]} />
294
+ {/if}
295
+ </div>
296
+
297
+ <p class="fsReactionText" id="fsNeutralDiv">Neutral</p>
298
+ </div>
299
+ <div class="fsIconTextCont" on:click={() => openComment(2, 4, "like")}>
300
+ <div class="fsReactionIcon">
301
+ {#if reactionState}
302
+ <Icons bind:name={changingReactionNames[3]} />
303
+ {:else if reactionState == false}
304
+ <Icons bind:name={changingReactionNames[3]} />
305
+ {/if}
306
+ </div>
307
+ <p class="fsReactionText" id="fsLikeDiv">Like</p>
308
+ </div>
309
+ <div class="fsIconTextCont">
310
+ <div class="fsReactionIcon" on:click={() => openComment(2, 5, "love")}>
311
+ {#if reactionState}
312
+ <Icons bind:name={changingReactionNames[4]} />
313
+ {:else if reactionState == false}
314
+ <Icons bind:name={changingReactionNames[4]} />
315
+ {/if}
316
+ </div>
317
+ <p class="fsReactionText" id="fsLoveDiv">Love</p>
318
+ </div>
319
+ </div>
320
+
321
+ <div class={wgType === 0 ? "fsTextAreaCont" : "fsTextAreaCont-qa-view"}>
322
+ <div class="fsPointerDiv" id="fsPointer" />
323
+ <textarea
324
+ class="fsTextArea"
325
+ placeholder={widgetPlaceholder}
326
+ on:keyup={() => commentHandler()}
327
+ />
328
+ </div>
329
+
330
+ <div class="fsFooter">
331
+ {#if buttonState == false}
332
+ <button class="fsCommentButtonContDisable" disabled>
333
+ <p class="fsCommentButtonTxtDisable">Send</p>
334
+ </button>
335
+ {:else if buttonState == true}
336
+ <button
337
+ class="fsSendButtonContCommentComp"
338
+ on:click={() => openEmailCont(3)}
339
+ >
340
+ <p class="fsSendButtonCommentComponent">Send</p>
341
+ </button>
342
+ {/if}
343
+ </div>
344
+ </div>
345
+ {:else if widgetComponent === 3}
346
+ <div class="fsEmailContainer">
347
+ <div id="fsEmailText">
348
+ {widgetEmailReqMsg}
349
+ </div>
350
+ <div id="fsEmailInputCont">
351
+ <input
352
+ type="text"
353
+ id="fsEmailTextArea"
354
+ placeholder="email@domain.com"
355
+ on:keyup={() => emailHandler()}
356
+ />
357
+ </div>
358
+ <div class="fsEmailFooter">
359
+ <p
360
+ id="fsSkipText"
361
+ on:click={() =>
362
+ closeHandler(email, comment, reactionType, questionAnswer)}
363
+ >
364
+ <u>Skip</u>
365
+ </p>
366
+ {#if buttonState == false}
367
+ <button class="fsCommentButtonContDisable" disabled>
368
+ <p class="fsCommentButtonTxtDisable">Send</p>
369
+ </button>
370
+ {:else if buttonState == true}
371
+ <button
372
+ class="fsSendButtonContCommentComp"
373
+ on:click={() =>
374
+ closeHandler(email, comment, reactionType, questionAnswer)}
375
+ on:click={() => endEmailInterval()}
376
+ >
377
+ <p class="fsSendButtonCommentComponent">Send</p>
378
+ </button>
379
+ {/if}
380
+ </div>
381
+ </div>
382
+ {/if}