@fullsession.io/fs-feedback-widget 1.14.0 → 1.15.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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/App.svelte +8 -0
- package/src/widgetPages/reactionPage.svelte +12 -0
- package/src/widgetPages/reactionpage.css +13 -10
package/package.json
CHANGED
package/src/App.svelte
CHANGED
|
@@ -220,6 +220,14 @@
|
|
|
220
220
|
setTimeout(function () {
|
|
221
221
|
buttonVisible = !buttonVisible;
|
|
222
222
|
}, 350);
|
|
223
|
+
|
|
224
|
+
let doneEvent = new CustomEvent("fbEventDone", {
|
|
225
|
+
bubbles: false,
|
|
226
|
+
detail: {
|
|
227
|
+
id: widgetId,
|
|
228
|
+
},
|
|
229
|
+
});
|
|
230
|
+
window.dispatchEvent(doneEvent);
|
|
223
231
|
};
|
|
224
232
|
|
|
225
233
|
const openWidget = () => {
|
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
let buttonState = false;
|
|
60
60
|
let emailError = "";
|
|
61
61
|
let checkTextAreaInterval;
|
|
62
|
+
let commentCharCount = 0;
|
|
63
|
+
let questionCharCount = 0;
|
|
62
64
|
|
|
63
65
|
export let closeHandler = (
|
|
64
66
|
email,
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
}
|
|
79
81
|
comment = "";
|
|
80
82
|
comment = input.value;
|
|
83
|
+
commentCharCount = input.value.length;
|
|
81
84
|
};
|
|
82
85
|
|
|
83
86
|
// Ultra-fast email handler - just updates value, no validation during typing
|
|
@@ -184,12 +187,14 @@
|
|
|
184
187
|
}
|
|
185
188
|
questionAnswer = "";
|
|
186
189
|
questionAnswer = input.value;
|
|
190
|
+
questionCharCount = input.value.length;
|
|
187
191
|
};
|
|
188
192
|
|
|
189
193
|
const openEmailCont = (state) => {
|
|
190
194
|
clearInterval(checkTextAreaInterval);
|
|
191
195
|
document.querySelector(".fsTextArea").value = "";
|
|
192
196
|
buttonState = false;
|
|
197
|
+
commentCharCount = 0;
|
|
193
198
|
if (widgetEmailComponentActivation) {
|
|
194
199
|
widgetComponent = state;
|
|
195
200
|
} else {
|
|
@@ -201,6 +206,7 @@
|
|
|
201
206
|
clearInterval(checkTextAreaInterval);
|
|
202
207
|
document.querySelector(".fsAnswerTextArea").value = "";
|
|
203
208
|
buttonState = false;
|
|
209
|
+
questionCharCount = 0;
|
|
204
210
|
if (widgetEmailComponentActivation) {
|
|
205
211
|
widgetComponent = state;
|
|
206
212
|
} else {
|
|
@@ -269,8 +275,10 @@
|
|
|
269
275
|
<textarea
|
|
270
276
|
class="fsAnswerTextArea"
|
|
271
277
|
placeholder="Answer Here..."
|
|
278
|
+
maxlength="300"
|
|
272
279
|
on:keyup={() => questionHandler()}
|
|
273
280
|
/>
|
|
281
|
+
<div class="fsCharCounter">{questionCharCount}/300</div>
|
|
274
282
|
</div>
|
|
275
283
|
<div class="fsFooter">
|
|
276
284
|
{#if buttonState == false}
|
|
@@ -367,8 +375,10 @@
|
|
|
367
375
|
<textarea
|
|
368
376
|
class="fsTextArea"
|
|
369
377
|
placeholder={widgetPlaceholder}
|
|
378
|
+
maxlength="300"
|
|
370
379
|
on:keyup={() => commentHandler()}
|
|
371
380
|
/>
|
|
381
|
+
<div class="fsCharCounter">{commentCharCount}/300</div>
|
|
372
382
|
</div>
|
|
373
383
|
|
|
374
384
|
<div class="fsFooter">
|
|
@@ -392,8 +402,10 @@
|
|
|
392
402
|
<textarea
|
|
393
403
|
class="fsTextArea"
|
|
394
404
|
placeholder="Answer Here..."
|
|
405
|
+
maxlength="300"
|
|
395
406
|
on:keyup={() => commentHandler()}
|
|
396
407
|
/>
|
|
408
|
+
<div class="fsCharCounter">{commentCharCount}/300</div>
|
|
397
409
|
</div>
|
|
398
410
|
|
|
399
411
|
<div class="fsFooter">
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
margin-top: 25px;
|
|
115
115
|
font-family: "Montserrat", sans-serif;
|
|
116
116
|
box-sizing: border-box;
|
|
117
|
+
position: relative;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
.fsTextAreaCont-qa-view {
|
|
@@ -124,6 +125,18 @@
|
|
|
124
125
|
margin-top: 10px;
|
|
125
126
|
font-family: "Montserrat", sans-serif;
|
|
126
127
|
box-sizing: border-box;
|
|
128
|
+
position: relative;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.fsCharCounter {
|
|
132
|
+
position: absolute;
|
|
133
|
+
bottom: 8px;
|
|
134
|
+
right: 12px;
|
|
135
|
+
font-family: "Montserrat", sans-serif;
|
|
136
|
+
font-size: 11px;
|
|
137
|
+
color: #6d6d6d;
|
|
138
|
+
pointer-events: none;
|
|
139
|
+
user-select: none;
|
|
127
140
|
}
|
|
128
141
|
|
|
129
142
|
.fsTextArea,
|
|
@@ -342,7 +355,6 @@
|
|
|
342
355
|
display: flex;
|
|
343
356
|
justify-content: space-between;
|
|
344
357
|
flex-wrap: wrap;
|
|
345
|
-
gap: 2px;
|
|
346
358
|
}
|
|
347
359
|
|
|
348
360
|
.fsHighNps {
|
|
@@ -365,7 +377,6 @@
|
|
|
365
377
|
font-family: "Montserrat", sans-serif;
|
|
366
378
|
font-size: 13px;
|
|
367
379
|
font-weight: 600;
|
|
368
|
-
padding: 5px 10px;
|
|
369
380
|
border-radius: 3px;
|
|
370
381
|
border: 0.36px solid #cbd4e6;
|
|
371
382
|
cursor: pointer;
|
|
@@ -478,10 +489,6 @@
|
|
|
478
489
|
font-size: 12px;
|
|
479
490
|
}
|
|
480
491
|
|
|
481
|
-
.fsNpsNumber {
|
|
482
|
-
padding: 4px 8px;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
492
|
.fsNpsText {
|
|
486
493
|
font-size: 9px;
|
|
487
494
|
}
|
|
@@ -594,10 +601,6 @@
|
|
|
594
601
|
margin-top: 5%;
|
|
595
602
|
}
|
|
596
603
|
|
|
597
|
-
.fsNpsNumber {
|
|
598
|
-
padding: 3px 6px;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
604
|
.fsNpsText {
|
|
602
605
|
font-size: 8px;
|
|
603
606
|
}
|