@product7/feedback-sdk 1.3.7 → 1.3.9
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/feedback-sdk.js +3006 -2817
- package/dist/feedback-sdk.js.map +1 -1
- package/dist/feedback-sdk.min.js +1 -1
- package/dist/feedback-sdk.min.js.map +1 -1
- package/package.json +1 -1
- package/src/api/services/MessengerService.js +8 -2
- package/src/core/APIService.js +33 -14
- package/src/index.js +1 -1
- package/src/styles/base.js +1 -1
- package/src/styles/changelog.js +58 -40
- package/src/styles/components.js +19 -2
- package/src/styles/design-tokens.js +4 -4
- package/src/styles/feedback.js +3 -8
- package/src/styles/messenger-components.js +473 -0
- package/src/styles/messenger-core.js +37 -268
- package/src/styles/messenger-features.js +89 -267
- package/src/styles/messenger-views.js +391 -325
- package/src/styles/messenger.js +17 -558
- package/src/styles/styles.js +21 -24
- package/src/styles/{surveys.js → survey.js} +55 -20
- package/src/widgets/BaseWidget.js +1 -1
- package/src/widgets/ButtonWidget.js +1 -1
- package/src/widgets/ChangelogWidget.js +1 -1
- package/src/widgets/InlineWidget.js +1 -1
- package/src/widgets/MessengerWidget.js +74 -84
- package/src/widgets/SurveyWidget.js +1 -1
- package/src/widgets/TabWidget.js +1 -1
- package/src/widgets/messenger/MessengerState.js +50 -119
- package/src/widgets/messenger/components/MessengerLauncher.js +22 -18
- package/src/widgets/messenger/components/MessengerPanel.js +1 -1
- package/src/widgets/messenger/components/NavigationTabs.js +36 -15
- package/src/widgets/messenger/views/ChangelogView.js +8 -32
- package/src/widgets/messenger/views/ChatView.js +83 -219
- package/src/widgets/messenger/views/ConversationsView.js +67 -45
- package/src/widgets/messenger/views/HelpView.js +22 -32
- package/src/widgets/messenger/views/HomeView.js +58 -40
- package/src/widgets/messenger/views/PreChatFormView.js +47 -51
- package/src/styles/messenger-help.js +0 -298
- package/src/styles/messenger-themes.js +0 -500
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
export const messengerFeaturesStyles = `
|
|
2
|
-
|
|
2
|
+
/* ========================================
|
|
3
|
+
ATTACHMENTS
|
|
4
|
+
======================================== */
|
|
3
5
|
.messenger-compose-attachments-preview {
|
|
4
6
|
display: none;
|
|
5
7
|
flex-wrap: wrap;
|
|
6
|
-
gap:
|
|
7
|
-
padding:
|
|
8
|
-
border-top: 1px solid
|
|
9
|
-
background:
|
|
8
|
+
gap: var(--spacing-2);
|
|
9
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
10
|
+
border-top: 1px solid var(--color-border);
|
|
11
|
+
background: var(--color-white);
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
.messenger-attachment-preview {
|
|
13
15
|
position: relative;
|
|
14
16
|
width: 56px;
|
|
15
17
|
height: 56px;
|
|
16
|
-
border-radius:
|
|
18
|
+
border-radius: var(--radius-lg);
|
|
17
19
|
overflow: hidden;
|
|
18
|
-
border: 1px solid
|
|
20
|
+
border: 1px solid var(--color-border);
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
.messenger-attachment-thumb {
|
|
@@ -29,8 +31,8 @@ export const messengerFeaturesStyles = `
|
|
|
29
31
|
display: flex;
|
|
30
32
|
align-items: center;
|
|
31
33
|
justify-content: center;
|
|
32
|
-
background:
|
|
33
|
-
color:
|
|
34
|
+
background: var(--color-neutral-100);
|
|
35
|
+
color: var(--color-text-secondary);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
.messenger-attachment-remove {
|
|
@@ -41,307 +43,127 @@ export const messengerFeaturesStyles = `
|
|
|
41
43
|
height: 18px;
|
|
42
44
|
background: rgba(0, 0, 0, 0.7);
|
|
43
45
|
border: none;
|
|
44
|
-
border-radius:
|
|
45
|
-
color: white;
|
|
46
|
-
font-size:
|
|
46
|
+
border-radius: var(--radius-full);
|
|
47
|
+
color: var(--color-white);
|
|
48
|
+
font-size: var(--font-size-xs);
|
|
47
49
|
line-height: 1;
|
|
48
50
|
cursor: pointer;
|
|
49
51
|
display: flex;
|
|
50
52
|
align-items: center;
|
|
51
53
|
justify-content: center;
|
|
52
54
|
padding: 0;
|
|
53
|
-
transition: background
|
|
55
|
+
transition: background var(--transition-base);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
.messenger-attachment-remove:hover {
|
|
57
|
-
background:
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.messenger-message-image {
|
|
62
|
-
max-width: 220px;
|
|
63
|
-
max-height: 200px;
|
|
64
|
-
width: auto;
|
|
65
|
-
height: auto;
|
|
66
|
-
border-radius: 8px;
|
|
67
|
-
margin-top: 4px;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
object-fit: contain;
|
|
70
|
-
display: block;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.messenger-message-file {
|
|
74
|
-
display: inline-flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
gap: 6px;
|
|
77
|
-
margin-top: 4px;
|
|
78
|
-
padding: 8px 12px;
|
|
79
|
-
border-radius: 8px;
|
|
80
|
-
background: #2c2c2e;
|
|
81
|
-
color: #60a5fa;
|
|
82
|
-
text-decoration: none;
|
|
83
|
-
font-size: 13px;
|
|
84
|
-
transition: background 0.15s ease;
|
|
85
|
-
max-width: 100%;
|
|
86
|
-
word-break: break-all;
|
|
87
|
-
cursor: pointer;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.messenger-message-file:hover {
|
|
91
|
-
background: #3c3c3e;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.messenger-file-download-icon {
|
|
95
|
-
margin-left: auto;
|
|
96
|
-
opacity: 0.5;
|
|
97
|
-
flex-shrink: 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.messenger-message-file:hover .messenger-file-download-icon {
|
|
101
|
-
opacity: 1;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.messenger-prechat-view {
|
|
105
|
-
background: transparent;
|
|
106
|
-
position: relative;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.messenger-prechat-overlay {
|
|
110
|
-
position: absolute;
|
|
111
|
-
top: 0;
|
|
112
|
-
left: 0;
|
|
113
|
-
right: 0;
|
|
114
|
-
bottom: 0;
|
|
115
|
-
background: rgba(0, 0, 0, 0.5);
|
|
116
|
-
backdrop-filter: blur(2px);
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: flex-end;
|
|
119
|
-
padding: 16px;
|
|
120
|
-
animation: messenger-fade-in 0.2s ease;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.messenger-prechat-card {
|
|
124
|
-
background: #1c1c1e;
|
|
125
|
-
border-radius: 16px;
|
|
126
|
-
padding: 20px;
|
|
127
|
-
width: 100%;
|
|
128
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
129
|
-
animation: messenger-slide-up 0.25s ease;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.messenger-prechat-card h4 {
|
|
133
|
-
margin: 0 0 14px;
|
|
134
|
-
font-size: 15px;
|
|
135
|
-
font-weight: 600;
|
|
136
|
-
color: white;
|
|
137
|
-
text-align: center;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.messenger-prechat-form {
|
|
141
|
-
display: flex;
|
|
142
|
-
flex-direction: column;
|
|
143
|
-
gap: 10px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.messenger-prechat-fields {
|
|
147
|
-
display: flex;
|
|
148
|
-
flex-direction: column;
|
|
149
|
-
gap: 8px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.messenger-prechat-input {
|
|
153
|
-
width: 100%;
|
|
154
|
-
padding: 11px 14px;
|
|
155
|
-
background: #2c2c2e;
|
|
156
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
157
|
-
border-radius: 10px;
|
|
158
|
-
color: white;
|
|
159
|
-
font-size: 14px;
|
|
160
|
-
font-family: inherit;
|
|
161
|
-
outline: none;
|
|
162
|
-
transition: border-color 0.2s ease;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.messenger-prechat-input:focus {
|
|
166
|
-
border-color: #007aff;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.messenger-prechat-input::placeholder {
|
|
170
|
-
color: rgba(255, 255, 255, 0.4);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.messenger-prechat-error {
|
|
174
|
-
font-size: 12px;
|
|
175
|
-
color: #ef4444;
|
|
176
|
-
display: none;
|
|
177
|
-
text-align: center;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.messenger-prechat-actions {
|
|
181
|
-
display: flex;
|
|
182
|
-
gap: 10px;
|
|
183
|
-
margin-top: 4px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.messenger-prechat-skip {
|
|
187
|
-
flex: 1;
|
|
188
|
-
padding: 11px 14px;
|
|
189
|
-
background: transparent;
|
|
190
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
191
|
-
border-radius: 20px;
|
|
192
|
-
color: rgba(255, 255, 255, 0.7);
|
|
193
|
-
font-size: 14px;
|
|
194
|
-
font-weight: 500;
|
|
195
|
-
cursor: pointer;
|
|
196
|
-
transition: all 0.2s ease;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.messenger-prechat-skip:hover {
|
|
200
|
-
background: rgba(255, 255, 255, 0.05);
|
|
201
|
-
border-color: rgba(255, 255, 255, 0.3);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.messenger-prechat-submit {
|
|
205
|
-
flex: 1;
|
|
206
|
-
display: flex;
|
|
207
|
-
align-items: center;
|
|
208
|
-
justify-content: center;
|
|
209
|
-
gap: 6px;
|
|
210
|
-
padding: 11px 14px;
|
|
211
|
-
background: #007aff;
|
|
212
|
-
border: none;
|
|
213
|
-
border-radius: 20px;
|
|
214
|
-
color: white;
|
|
215
|
-
font-size: 14px;
|
|
216
|
-
font-weight: 600;
|
|
217
|
-
cursor: pointer;
|
|
218
|
-
transition: all 0.2s ease;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.messenger-prechat-submit:hover:not(:disabled) {
|
|
222
|
-
background: #0066d6;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.messenger-prechat-submit:disabled {
|
|
226
|
-
background: #3c3c3e;
|
|
227
|
-
color: rgba(255, 255, 255, 0.4);
|
|
228
|
-
cursor: not-allowed;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.messenger-prechat-submit-loading {
|
|
232
|
-
display: inline-flex;
|
|
233
|
-
align-items: center;
|
|
234
|
-
animation: messenger-spin 1s linear infinite;
|
|
59
|
+
background: var(--color-error);
|
|
235
60
|
}
|
|
236
61
|
|
|
62
|
+
/* ========================================
|
|
63
|
+
EMAIL OVERLAY
|
|
64
|
+
======================================== */
|
|
237
65
|
.messenger-email-overlay {
|
|
238
66
|
position: absolute;
|
|
239
|
-
bottom:
|
|
67
|
+
bottom: 0;
|
|
240
68
|
left: 0;
|
|
241
69
|
right: 0;
|
|
242
70
|
top: 0;
|
|
243
|
-
display:
|
|
71
|
+
display: none;
|
|
244
72
|
align-items: flex-end;
|
|
245
73
|
z-index: 20;
|
|
246
|
-
background: rgba(0, 0, 0, 0.
|
|
74
|
+
background: rgba(0, 0, 0, 0.5);
|
|
247
75
|
pointer-events: auto;
|
|
248
76
|
}
|
|
249
77
|
|
|
250
78
|
.messenger-email-card {
|
|
251
79
|
width: 100%;
|
|
252
|
-
background: #ffffff;
|
|
253
|
-
border-radius: 0;
|
|
254
|
-
padding: 16px 16px 72px;
|
|
255
|
-
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
|
|
256
80
|
animation: messenger-slide-up 0.25s ease;
|
|
257
81
|
}
|
|
258
82
|
|
|
259
|
-
.messenger-email-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
color: #1d1d1f;
|
|
264
|
-
text-align: center;
|
|
83
|
+
.messenger-email-actions {
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: var(--spacing-2);
|
|
86
|
+
margin-top: var(--spacing-1);
|
|
265
87
|
}
|
|
266
88
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
89
|
+
/* ========================================
|
|
90
|
+
EMPTY STATE
|
|
91
|
+
======================================== */
|
|
92
|
+
.messenger-empty-state {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
height: 100%;
|
|
271
98
|
text-align: center;
|
|
99
|
+
padding: var(--spacing-10);
|
|
272
100
|
}
|
|
273
101
|
|
|
274
|
-
.messenger-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
padding: 8px 10px;
|
|
278
|
-
background: #f3f4f6;
|
|
279
|
-
border: 1px solid transparent;
|
|
280
|
-
border-radius: 8px;
|
|
281
|
-
color: #1d1d1f;
|
|
282
|
-
font-size: 12px;
|
|
283
|
-
font-family: inherit;
|
|
284
|
-
outline: none;
|
|
285
|
-
margin-bottom: 6px;
|
|
286
|
-
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.messenger-email-name:focus,
|
|
290
|
-
.messenger-email-input:focus {
|
|
291
|
-
border-color: #007aff;
|
|
292
|
-
box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.12);
|
|
293
|
-
background: #ffffff;
|
|
102
|
+
.messenger-empty-state-icon {
|
|
103
|
+
color: var(--color-neutral-300);
|
|
104
|
+
margin-bottom: var(--spacing-4);
|
|
294
105
|
}
|
|
295
106
|
|
|
296
|
-
.messenger-
|
|
297
|
-
|
|
298
|
-
|
|
107
|
+
.messenger-empty-state h3 {
|
|
108
|
+
margin: 0 0 var(--spacing-2);
|
|
109
|
+
font-size: var(--font-size-xl);
|
|
110
|
+
font-weight: var(--font-weight-semibold);
|
|
111
|
+
color: var(--color-text-primary);
|
|
299
112
|
}
|
|
300
113
|
|
|
301
|
-
.messenger-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
114
|
+
.messenger-empty-state p {
|
|
115
|
+
margin: 0;
|
|
116
|
+
font-size: var(--font-size-base);
|
|
117
|
+
color: var(--color-text-secondary);
|
|
305
118
|
}
|
|
306
119
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
font-size: 12px;
|
|
315
|
-
font-weight: 600;
|
|
316
|
-
cursor: pointer;
|
|
317
|
-
transition: all 0.2s ease;
|
|
120
|
+
/* ========================================
|
|
121
|
+
ANIMATIONS
|
|
122
|
+
======================================== */
|
|
123
|
+
@keyframes spin {
|
|
124
|
+
to {
|
|
125
|
+
transform: rotate(360deg);
|
|
126
|
+
}
|
|
318
127
|
}
|
|
319
128
|
|
|
320
|
-
|
|
321
|
-
|
|
129
|
+
@keyframes messenger-typing-bounce {
|
|
130
|
+
0%, 80%, 100% {
|
|
131
|
+
transform: scale(0);
|
|
132
|
+
}
|
|
133
|
+
40% {
|
|
134
|
+
transform: scale(1);
|
|
135
|
+
}
|
|
322
136
|
}
|
|
323
137
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
138
|
+
@keyframes messenger-slide-up {
|
|
139
|
+
from {
|
|
140
|
+
transform: translateY(100%);
|
|
141
|
+
opacity: 0;
|
|
142
|
+
}
|
|
143
|
+
to {
|
|
144
|
+
transform: translateY(0);
|
|
145
|
+
opacity: 1;
|
|
146
|
+
}
|
|
328
147
|
}
|
|
329
148
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
font-size: 12px;
|
|
338
|
-
font-weight: 500;
|
|
339
|
-
cursor: pointer;
|
|
340
|
-
transition: all 0.2s ease;
|
|
149
|
+
@keyframes messenger-fade-in {
|
|
150
|
+
from {
|
|
151
|
+
opacity: 0;
|
|
152
|
+
}
|
|
153
|
+
to {
|
|
154
|
+
opacity: 1;
|
|
155
|
+
}
|
|
341
156
|
}
|
|
342
157
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
158
|
+
/* ========================================
|
|
159
|
+
RESPONSIVE
|
|
160
|
+
======================================== */
|
|
161
|
+
@media (max-width: 480px) {
|
|
162
|
+
.messenger-prechat-overlay {
|
|
163
|
+
padding: var(--spacing-4);
|
|
164
|
+
}
|
|
165
|
+
.messenger-prechat-card {
|
|
166
|
+
max-width: 100%;
|
|
167
|
+
}
|
|
346
168
|
}
|
|
347
|
-
`;
|
|
169
|
+
`;
|