@fullsession.io/fs-feedback-widget 1.8.0 → 1.10.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 +11 -2
- package/src/Icons/reactionIcons.svelte +1 -1
- package/src/widgetPages/App.css +15 -6
- package/src/widgetPages/reactionPage.svelte +41 -1
- package/src/widgetPages/reactionpage.css +88 -25
package/package.json
CHANGED
package/src/App.svelte
CHANGED
|
@@ -157,13 +157,21 @@
|
|
|
157
157
|
reaction: Number(reactionType),
|
|
158
158
|
type: widgetType,
|
|
159
159
|
};
|
|
160
|
-
} else {
|
|
160
|
+
} else if (widgetType === 1) {
|
|
161
161
|
widgetResponse = {
|
|
162
162
|
id: widgetId,
|
|
163
163
|
email: email,
|
|
164
164
|
questionAnswer: questionAnswer,
|
|
165
165
|
type: widgetType,
|
|
166
166
|
};
|
|
167
|
+
} else if (widgetType === 2) {
|
|
168
|
+
widgetResponse = {
|
|
169
|
+
id: widgetId,
|
|
170
|
+
email: email,
|
|
171
|
+
reaction: Number(reactionType),
|
|
172
|
+
comment: comment,
|
|
173
|
+
type: widgetType,
|
|
174
|
+
};
|
|
167
175
|
}
|
|
168
176
|
|
|
169
177
|
let event = new CustomEvent("fbEvent", {
|
|
@@ -242,9 +250,10 @@
|
|
|
242
250
|
<div
|
|
243
251
|
class="fsCont"
|
|
244
252
|
class:fsContModal={widgetDisplayMode === 1}
|
|
253
|
+
class:fsContNps={widgetType === 2}
|
|
245
254
|
in:transition={transitionInParams}
|
|
246
255
|
>
|
|
247
|
-
<div class="fsCloseCont" on:click={closeWidget}>
|
|
256
|
+
<div class="fsCloseCont" class:fsNpsCloseCont={widgetType === 2} on:click={closeWidget}>
|
|
248
257
|
<p id="fsCloseIcon">X</p>
|
|
249
258
|
</div>
|
|
250
259
|
<ReactionPage
|
package/src/widgetPages/App.css
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap');
|
|
2
|
+
|
|
1
3
|
.fs-side {
|
|
2
4
|
width: 100%;
|
|
3
5
|
display: flex;
|
|
@@ -12,7 +14,7 @@
|
|
|
12
14
|
align-items: var(--wgPositionHorizintal);
|
|
13
15
|
padding: 0;
|
|
14
16
|
z-index: 100000;
|
|
15
|
-
font-family: '
|
|
17
|
+
font-family: 'Montserrat', sans-serif;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
.fs-feedback-modal {
|
|
@@ -23,7 +25,7 @@
|
|
|
23
25
|
height: 100%;
|
|
24
26
|
background-color: rgba(0, 0, 0, 0.5);
|
|
25
27
|
z-index: 100000;
|
|
26
|
-
font-family: '
|
|
28
|
+
font-family: 'Montserrat', sans-serif;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
.fs-thanks-txt {
|
|
@@ -36,7 +38,6 @@
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
fsContainerApp {
|
|
39
|
-
width: 776px;
|
|
40
41
|
height: 415px;
|
|
41
42
|
display: flex;
|
|
42
43
|
flex-direction: var(--wgPositionVertical);
|
|
@@ -49,14 +50,14 @@ fsContainerApp {
|
|
|
49
50
|
align-items: var(--wgPositionHorizintal);
|
|
50
51
|
padding: 0;
|
|
51
52
|
z-index: 100000;
|
|
52
|
-
font-family: '
|
|
53
|
+
font-family: 'Montserrat', sans-serif;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
.fsWidget {
|
|
56
57
|
pointer-events: auto;
|
|
57
58
|
background-color: var(--widgetColor);
|
|
58
59
|
width: 34px;
|
|
59
|
-
height:
|
|
60
|
+
height: 120px;
|
|
60
61
|
border-top-left-radius: var(--widgetLeftSideBorder);
|
|
61
62
|
border-bottom-left-radius: var(--widgetLeftSideBorder);
|
|
62
63
|
border-top-right-radius: var(--widgetRightSideBorder);
|
|
@@ -109,11 +110,15 @@ fsContainerApp {
|
|
|
109
110
|
margin: 0;
|
|
110
111
|
}
|
|
111
112
|
|
|
113
|
+
.fsContNps {
|
|
114
|
+
padding: 20px;
|
|
115
|
+
width: 400px !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
112
118
|
.fsThanksMessageCont {
|
|
113
119
|
display: flex;
|
|
114
120
|
flex-direction: column;
|
|
115
121
|
pointer-events: auto;
|
|
116
|
-
width: 320px;
|
|
117
122
|
height: auto;
|
|
118
123
|
background-color: rgb(255, 255, 255);
|
|
119
124
|
margin-right: var(--widgetMarginRight);
|
|
@@ -145,6 +150,10 @@ fsContainerApp {
|
|
|
145
150
|
cursor: pointer;
|
|
146
151
|
}
|
|
147
152
|
|
|
153
|
+
.fsNpsCloseCont {
|
|
154
|
+
margin: -35px 0 0 auto !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
148
157
|
|
|
149
158
|
|
|
150
159
|
|
|
@@ -156,6 +156,13 @@
|
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
+
const openEmailStep = (state, rating) => {
|
|
160
|
+
widgetComponent = state;
|
|
161
|
+
reactionType = String(rating);
|
|
162
|
+
|
|
163
|
+
closeHandlerBeforeFinishing(email, comment, reactionType);
|
|
164
|
+
};
|
|
165
|
+
|
|
159
166
|
const questionHandler = (state, question) => {
|
|
160
167
|
let input = document.querySelector(".fsAnswerTextArea");
|
|
161
168
|
|
|
@@ -259,8 +266,23 @@
|
|
|
259
266
|
{/if}
|
|
260
267
|
</div>
|
|
261
268
|
</div>
|
|
269
|
+
{:else if wgType === 2}
|
|
270
|
+
<div class="fsNpsContainer">
|
|
271
|
+
<div class="fsNpsNumbers">
|
|
272
|
+
{#each {length: 11} as _, i}
|
|
273
|
+
<div class={i > 8 ? "fsNpsNumber fsHighNps" : i > 6 ? "fsNpsNumber fsMediumNps" : "fsNpsNumber fsLowNps"}
|
|
274
|
+
on:click={() => openEmailStep(2, i)}>
|
|
275
|
+
<span>{i}</span>
|
|
276
|
+
</div>
|
|
277
|
+
{/each}
|
|
278
|
+
</div>
|
|
279
|
+
<div class="fsNpsFooter">
|
|
280
|
+
<div class="fsNpsText">not likely at all</div>
|
|
281
|
+
<div class="fsNpsText">extremely likely </div>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
262
284
|
{/if}
|
|
263
|
-
{:else if widgetComponent === 2 && wgType
|
|
285
|
+
{:else if widgetComponent === 2 && wgType === 0}
|
|
264
286
|
<div class="fsCommentContainer">
|
|
265
287
|
<div class="fsIcons-second">
|
|
266
288
|
<div class="fsIconTextCont" on:click={() => openComment(2, 1, "hate")}>
|
|
@@ -343,6 +365,24 @@
|
|
|
343
365
|
{/if}
|
|
344
366
|
</div>
|
|
345
367
|
</div>
|
|
368
|
+
{:else if widgetComponent === 2 && wgType === 2}
|
|
369
|
+
<div id="fsTxt">{widgetQuestion}</div>
|
|
370
|
+
<div class="fsTextAreaCont-qa-view">
|
|
371
|
+
<textarea
|
|
372
|
+
class="fsTextArea"
|
|
373
|
+
placeholder={widgetPlaceholder}
|
|
374
|
+
on:keyup={() => commentHandler()}
|
|
375
|
+
/>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
<div class="fsFooter">
|
|
379
|
+
<button
|
|
380
|
+
class="fsSendButtonContCommentComp"
|
|
381
|
+
on:click={() => openEmailCont(3)}
|
|
382
|
+
>
|
|
383
|
+
<p class="fsSendButtonCommentComponent">Next</p>
|
|
384
|
+
</button>
|
|
385
|
+
</div>
|
|
346
386
|
{:else if widgetComponent === 3}
|
|
347
387
|
<div class="fsEmailContainer">
|
|
348
388
|
<div id="fsEmailText">
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap');
|
|
2
|
+
|
|
1
3
|
.fsReactionsContainer {
|
|
2
4
|
pointer-events: auto;
|
|
3
5
|
display: flex;
|
|
4
6
|
flex-direction: column;
|
|
5
7
|
height: fit-content;
|
|
6
|
-
font-family: '
|
|
8
|
+
font-family: 'Montserrat', sans-serif;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
.fsIcons {
|
|
@@ -15,12 +17,17 @@
|
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
#fsTxt {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
color: #1513A0;
|
|
21
|
+
text-align: center;
|
|
22
|
+
font-family: 'Montserrat', sans-serif;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
line-height: 15px;
|
|
21
26
|
text-align: center;
|
|
22
|
-
|
|
27
|
+
align-self: center;
|
|
23
28
|
overflow: hidden;
|
|
29
|
+
width: 80% !important;
|
|
30
|
+
margin-top: 5px;
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
.fsIconTextCont {
|
|
@@ -29,13 +36,13 @@
|
|
|
29
36
|
flex-direction: column;
|
|
30
37
|
align-items: center;
|
|
31
38
|
height: 22px;
|
|
32
|
-
font-family: '
|
|
39
|
+
font-family: 'Montserrat', sans-serif;
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
.fsReactionText {
|
|
36
43
|
font-size: 12px;
|
|
37
44
|
display: none;
|
|
38
|
-
font-family: '
|
|
45
|
+
font-family: 'Montserrat', sans-serif;
|
|
39
46
|
margin-top: 0px;
|
|
40
47
|
}
|
|
41
48
|
|
|
@@ -50,7 +57,7 @@
|
|
|
50
57
|
.fsIconTextCont:hover {
|
|
51
58
|
pointer-events: auto;
|
|
52
59
|
cursor: pointer;
|
|
53
|
-
font-family: '
|
|
60
|
+
font-family: 'Montserrat', sans-serif;
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
.fsReactionIcon:hover+.fsReactionText {
|
|
@@ -64,7 +71,7 @@
|
|
|
64
71
|
display: flex;
|
|
65
72
|
flex-direction: column;
|
|
66
73
|
pointer-events: auto;
|
|
67
|
-
font-family: '
|
|
74
|
+
font-family: 'Montserrat', sans-serif;
|
|
68
75
|
height: auto;
|
|
69
76
|
padding-bottom: 10px;
|
|
70
77
|
}
|
|
@@ -75,7 +82,7 @@
|
|
|
75
82
|
height: 140px;
|
|
76
83
|
background-color: #eaeaeb;
|
|
77
84
|
margin-top: 17%;
|
|
78
|
-
font-family: '
|
|
85
|
+
font-family: 'Montserrat', sans-serif;
|
|
79
86
|
}
|
|
80
87
|
|
|
81
88
|
.fsTextAreaCont-qa-view {
|
|
@@ -84,7 +91,7 @@
|
|
|
84
91
|
height: 140px;
|
|
85
92
|
background-color: #eaeaeb;
|
|
86
93
|
margin-top: 10px;
|
|
87
|
-
font-family: '
|
|
94
|
+
font-family: 'Montserrat', sans-serif;
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
.fsTextArea, .fsAnswerTextArea {
|
|
@@ -96,7 +103,7 @@
|
|
|
96
103
|
outline: none;
|
|
97
104
|
margin-top: 4%;
|
|
98
105
|
resize: none;
|
|
99
|
-
font-family: '
|
|
106
|
+
font-family: 'Montserrat', sans-serif;
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
.fsTextarea:focus {
|
|
@@ -109,7 +116,7 @@
|
|
|
109
116
|
font-size: 12px;
|
|
110
117
|
text-align: center;
|
|
111
118
|
margin-top: 6px;
|
|
112
|
-
font-family: '
|
|
119
|
+
font-family: 'Montserrat', sans-serif;
|
|
113
120
|
|
|
114
121
|
}
|
|
115
122
|
|
|
@@ -124,7 +131,7 @@
|
|
|
124
131
|
margin-right: 11px;
|
|
125
132
|
cursor: pointer;
|
|
126
133
|
border: 0px;
|
|
127
|
-
font-family: '
|
|
134
|
+
font-family: 'Montserrat', sans-serif;
|
|
128
135
|
|
|
129
136
|
}
|
|
130
137
|
|
|
@@ -139,7 +146,7 @@
|
|
|
139
146
|
margin-right: 11px;
|
|
140
147
|
cursor: not-allowed;
|
|
141
148
|
border: 0px;
|
|
142
|
-
font-family: '
|
|
149
|
+
font-family: 'Montserrat', sans-serif;
|
|
143
150
|
|
|
144
151
|
}
|
|
145
152
|
|
|
@@ -149,7 +156,7 @@
|
|
|
149
156
|
font-size: 12px;
|
|
150
157
|
text-align: center;
|
|
151
158
|
margin-top: 6px;
|
|
152
|
-
font-family: '
|
|
159
|
+
font-family: 'Montserrat', sans-serif;
|
|
153
160
|
|
|
154
161
|
}
|
|
155
162
|
|
|
@@ -157,7 +164,7 @@
|
|
|
157
164
|
pointer-events: auto;
|
|
158
165
|
display: flex;
|
|
159
166
|
justify-content: flex-end;
|
|
160
|
-
font-family: '
|
|
167
|
+
font-family: 'Montserrat', sans-serif;
|
|
161
168
|
|
|
162
169
|
}
|
|
163
170
|
|
|
@@ -167,7 +174,7 @@
|
|
|
167
174
|
flex-direction: row;
|
|
168
175
|
justify-content: space-evenly;
|
|
169
176
|
margin-top: 6%;
|
|
170
|
-
font-family: '
|
|
177
|
+
font-family: 'Montserrat', sans-serif;
|
|
171
178
|
}
|
|
172
179
|
|
|
173
180
|
.fsPointerDiv {
|
|
@@ -205,7 +212,7 @@
|
|
|
205
212
|
display: flex;
|
|
206
213
|
flex-direction: column;
|
|
207
214
|
height: fit-content;
|
|
208
|
-
font-family: '
|
|
215
|
+
font-family: 'Montserrat', sans-serif;
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
#fsEmailInputCont {
|
|
@@ -218,7 +225,7 @@
|
|
|
218
225
|
/* align-items: center; */
|
|
219
226
|
justify-content: center;
|
|
220
227
|
margin-top: 10%;
|
|
221
|
-
font-family: '
|
|
228
|
+
font-family: 'Montserrat', sans-serif;
|
|
222
229
|
}
|
|
223
230
|
|
|
224
231
|
#fsEmailTextArea {
|
|
@@ -227,7 +234,7 @@
|
|
|
227
234
|
border: 0px;
|
|
228
235
|
background-color: #eaeaeb;
|
|
229
236
|
outline: none;
|
|
230
|
-
font-family: '
|
|
237
|
+
font-family: 'Montserrat', sans-serif;
|
|
231
238
|
}
|
|
232
239
|
|
|
233
240
|
#fsEmailText {
|
|
@@ -239,7 +246,7 @@
|
|
|
239
246
|
padding-top: 20px;
|
|
240
247
|
line-height: 1.29;
|
|
241
248
|
font-size: 17px;
|
|
242
|
-
font-family: '
|
|
249
|
+
font-family: 'Montserrat', sans-serif;
|
|
243
250
|
}
|
|
244
251
|
|
|
245
252
|
.fsEmailFooter {
|
|
@@ -247,7 +254,7 @@
|
|
|
247
254
|
display: flex;
|
|
248
255
|
justify-content: flex-end;
|
|
249
256
|
flex-direction: row;
|
|
250
|
-
font-family: '
|
|
257
|
+
font-family: 'Montserrat', sans-serif;
|
|
251
258
|
|
|
252
259
|
}
|
|
253
260
|
|
|
@@ -258,13 +265,69 @@
|
|
|
258
265
|
margin-top: 6%;
|
|
259
266
|
margin-right: 4%;
|
|
260
267
|
letter-spacing: normal;
|
|
261
|
-
font-family: '
|
|
268
|
+
font-family: 'Montserrat', sans-serif;
|
|
262
269
|
|
|
263
270
|
|
|
264
271
|
}
|
|
265
272
|
|
|
266
273
|
#fsSkipText:hover {
|
|
267
274
|
color: #666666;
|
|
268
|
-
font-family: '
|
|
275
|
+
font-family: 'Montserrat', sans-serif;
|
|
276
|
+
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.fsNpsContainer {
|
|
280
|
+
margin-top: 20px;
|
|
281
|
+
display: flex;
|
|
282
|
+
flex-direction: column;
|
|
283
|
+
gap: 10px;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.fsNpsNumbers {
|
|
287
|
+
display: flex;
|
|
288
|
+
justify-content: space-between;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.fsHighNps {
|
|
292
|
+
background: #50C099;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.fsLowNps {
|
|
296
|
+
background: #F9837C;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.fsMediumNps {
|
|
300
|
+
background: #FFC565;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.fsNpsNumber {
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
justify-content: center;
|
|
307
|
+
color: #FFF;
|
|
308
|
+
font-family: 'Montserrat', sans-serif;
|
|
309
|
+
font-size: 11px;
|
|
310
|
+
font-weight: 600;
|
|
311
|
+
padding: 5px 10px;
|
|
312
|
+
border-radius: 3px;
|
|
313
|
+
border: 0.36px solid #CBD4E6;
|
|
314
|
+
cursor: pointer;
|
|
315
|
+
transition: 0.4s ease;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.fsNpsNumber:hover {
|
|
319
|
+
opacity: 0.6;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.fsNpsFooter {
|
|
323
|
+
display: flex;
|
|
324
|
+
justify-content: space-between;
|
|
325
|
+
padding: 0 9px;
|
|
326
|
+
}
|
|
269
327
|
|
|
328
|
+
.fsNpsText {
|
|
329
|
+
color: var(--dark-grey, #6D6D6D);
|
|
330
|
+
font-family: 'Montserrat', sans-serif;
|
|
331
|
+
font-size: 10px;
|
|
332
|
+
font-weight: 500;
|
|
270
333
|
}
|