@fullsession.io/fs-feedback-widget 1.7.2 → 1.7.3

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