@product7/feedback-sdk 1.3.8 → 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.
Files changed (39) hide show
  1. package/dist/feedback-sdk.js +2824 -2371
  2. package/dist/feedback-sdk.js.map +1 -1
  3. package/dist/feedback-sdk.min.js +1 -1
  4. package/dist/feedback-sdk.min.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/api/services/MessengerService.js +5 -5
  7. package/src/core/APIService.js +33 -14
  8. package/src/index.js +1 -1
  9. package/src/styles/base.js +1 -1
  10. package/src/styles/changelog.js +58 -40
  11. package/src/styles/components.js +19 -2
  12. package/src/styles/design-tokens.js +4 -4
  13. package/src/styles/feedback.js +3 -8
  14. package/src/styles/messenger-components.js +473 -0
  15. package/src/styles/messenger-core.js +37 -268
  16. package/src/styles/messenger-features.js +89 -267
  17. package/src/styles/messenger-views.js +391 -325
  18. package/src/styles/messenger.js +17 -558
  19. package/src/styles/styles.js +21 -24
  20. package/src/styles/{surveys.js → survey.js} +55 -20
  21. package/src/widgets/BaseWidget.js +1 -1
  22. package/src/widgets/ButtonWidget.js +1 -1
  23. package/src/widgets/ChangelogWidget.js +1 -1
  24. package/src/widgets/InlineWidget.js +1 -1
  25. package/src/widgets/MessengerWidget.js +15 -9
  26. package/src/widgets/SurveyWidget.js +1 -1
  27. package/src/widgets/TabWidget.js +1 -1
  28. package/src/widgets/messenger/MessengerState.js +5 -2
  29. package/src/widgets/messenger/components/MessengerLauncher.js +22 -18
  30. package/src/widgets/messenger/components/MessengerPanel.js +1 -1
  31. package/src/widgets/messenger/components/NavigationTabs.js +36 -15
  32. package/src/widgets/messenger/views/ChangelogView.js +8 -32
  33. package/src/widgets/messenger/views/ChatView.js +96 -60
  34. package/src/widgets/messenger/views/ConversationsView.js +67 -45
  35. package/src/widgets/messenger/views/HelpView.js +22 -32
  36. package/src/widgets/messenger/views/HomeView.js +58 -40
  37. package/src/widgets/messenger/views/PreChatFormView.js +12 -5
  38. package/src/styles/messenger-help.js +0 -298
  39. package/src/styles/messenger-themes.js +0 -500
@@ -14,6 +14,10 @@ export const surveyStyles = `
14
14
  animation: fadeIn var(--transition-slow);
15
15
  }
16
16
 
17
+ /* ========================================
18
+ SURVEY CARD
19
+ ======================================== */
20
+
17
21
  .feedback-survey {
18
22
  position: fixed;
19
23
  z-index: var(--z-modal);
@@ -56,16 +60,15 @@ export const surveyStyles = `
56
60
  right: var(--spacing-3);
57
61
  background: none;
58
62
  border: none;
59
- font-size: 20px;
60
63
  cursor: pointer;
61
64
  color: var(--color-neutral-500);
62
- line-height: 1;
65
+ padding: 0;
63
66
  width: 28px;
64
67
  height: 28px;
65
68
  display: flex;
66
69
  align-items: center;
67
70
  justify-content: center;
68
- border-radius: var(--radius-sm);
71
+ border-radius: var(--radius-md);
69
72
  transition: all var(--transition-base);
70
73
  }
71
74
 
@@ -77,7 +80,7 @@ export const surveyStyles = `
77
80
  .feedback-survey-title {
78
81
  margin: 0 0 var(--spacing-2) 0;
79
82
  font-size: var(--font-size-xl);
80
- font-weight: var(--font-weight-semibold);
83
+ font-weight: var(--font-weight-bold);
81
84
  padding-right: var(--spacing-6);
82
85
  color: var(--color-text-primary);
83
86
  }
@@ -93,6 +96,10 @@ export const surveyStyles = `
93
96
  margin-bottom: var(--spacing-4);
94
97
  }
95
98
 
99
+ /* ========================================
100
+ NPS
101
+ ======================================== */
102
+
96
103
  .feedback-survey-nps {
97
104
  display: flex;
98
105
  justify-content: space-between;
@@ -103,10 +110,11 @@ export const surveyStyles = `
103
110
  width: 28px;
104
111
  height: 36px;
105
112
  border: 1px solid var(--color-border);
106
- border-radius: var(--radius-sm);
113
+ border-radius: var(--radius-md);
107
114
  background: var(--color-surface);
108
115
  cursor: pointer;
109
116
  font-size: var(--font-size-sm);
117
+ font-weight: var(--font-weight-medium);
110
118
  color: var(--color-text-primary);
111
119
  transition: all var(--transition-fast);
112
120
  font-family: inherit;
@@ -123,6 +131,10 @@ export const surveyStyles = `
123
131
  color: var(--color-white);
124
132
  }
125
133
 
134
+ /* ========================================
135
+ CSAT
136
+ ======================================== */
137
+
126
138
  .feedback-survey-csat {
127
139
  display: flex;
128
140
  justify-content: center;
@@ -146,6 +158,10 @@ export const surveyStyles = `
146
158
  transform: scale(1.2);
147
159
  }
148
160
 
161
+ /* ========================================
162
+ CES
163
+ ======================================== */
164
+
149
165
  .feedback-survey-ces {
150
166
  display: flex;
151
167
  justify-content: space-between;
@@ -160,6 +176,7 @@ export const surveyStyles = `
160
176
  background: var(--color-surface);
161
177
  cursor: pointer;
162
178
  font-size: var(--font-size-xs);
179
+ font-weight: var(--font-weight-medium);
163
180
  color: var(--color-text-primary);
164
181
  transition: all var(--transition-fast);
165
182
  font-family: inherit;
@@ -182,9 +199,13 @@ export const surveyStyles = `
182
199
  justify-content: space-between;
183
200
  margin-top: var(--spacing-2);
184
201
  font-size: var(--font-size-xs);
185
- color: var(--color-text-secondary);
202
+ color: var(--color-text-tertiary);
186
203
  }
187
204
 
205
+ /* ========================================
206
+ FREQUENCY
207
+ ======================================== */
208
+
188
209
  .feedback-survey-frequency {
189
210
  display: flex;
190
211
  gap: var(--spacing-2);
@@ -192,12 +213,13 @@ export const surveyStyles = `
192
213
 
193
214
  .feedback-survey-freq-btn {
194
215
  flex: 1;
195
- padding: 10px;
216
+ padding: var(--spacing-3);
196
217
  border: 1px solid var(--color-border);
197
218
  border-radius: var(--radius-md);
198
219
  background: var(--color-surface);
199
220
  cursor: pointer;
200
221
  font-size: var(--font-size-sm);
222
+ font-weight: var(--font-weight-medium);
201
223
  color: var(--color-text-primary);
202
224
  transition: all var(--transition-fast);
203
225
  font-family: inherit;
@@ -214,13 +236,17 @@ export const surveyStyles = `
214
236
  color: var(--color-white);
215
237
  }
216
238
 
239
+ /* ========================================
240
+ FORM INPUTS
241
+ ======================================== */
242
+
217
243
  .feedback-survey-feedback {
218
244
  margin-top: var(--spacing-4);
219
245
  }
220
246
 
221
247
  .feedback-survey-textarea {
222
248
  width: 100%;
223
- padding: var(--spacing-3) 14px;
249
+ padding: var(--spacing-3);
224
250
  border: 1px solid var(--color-border);
225
251
  border-radius: var(--radius-md);
226
252
  font-size: var(--font-size-base);
@@ -230,7 +256,7 @@ export const surveyStyles = `
230
256
  color: var(--color-text-primary);
231
257
  font-family: inherit;
232
258
  box-sizing: border-box;
233
- transition: all var(--transition-base);
259
+ transition: border-color var(--transition-base);
234
260
  outline: none;
235
261
  }
236
262
 
@@ -245,7 +271,7 @@ export const surveyStyles = `
245
271
 
246
272
  .feedback-survey-select {
247
273
  width: 100%;
248
- padding: 10px 14px;
274
+ padding: var(--spacing-3);
249
275
  border: 1px solid var(--color-border);
250
276
  border-radius: var(--radius-md);
251
277
  font-size: var(--font-size-base);
@@ -253,7 +279,7 @@ export const surveyStyles = `
253
279
  color: var(--color-text-primary);
254
280
  font-family: inherit;
255
281
  cursor: pointer;
256
- transition: all var(--transition-base);
282
+ transition: border-color var(--transition-base);
257
283
  outline: none;
258
284
  }
259
285
 
@@ -264,7 +290,7 @@ export const surveyStyles = `
264
290
 
265
291
  .feedback-survey-input {
266
292
  width: 100%;
267
- padding: 10px 14px;
293
+ padding: var(--spacing-3);
268
294
  border: 1px solid var(--color-border);
269
295
  border-radius: var(--radius-md);
270
296
  font-size: var(--font-size-base);
@@ -272,7 +298,7 @@ export const surveyStyles = `
272
298
  color: var(--color-text-primary);
273
299
  font-family: inherit;
274
300
  box-sizing: border-box;
275
- transition: all var(--transition-base);
301
+ transition: border-color var(--transition-base);
276
302
  outline: none;
277
303
  }
278
304
 
@@ -285,16 +311,20 @@ export const surveyStyles = `
285
311
  box-shadow: 0 0 0 3px var(--color-primary-light);
286
312
  }
287
313
 
314
+ /* ========================================
315
+ SUBMIT & FEEDBACK
316
+ ======================================== */
317
+
288
318
  .feedback-survey-submit {
289
319
  width: 100%;
290
320
  margin-top: var(--spacing-3);
291
321
  padding: var(--spacing-3);
292
322
  background: var(--color-primary);
293
323
  color: var(--color-white);
294
- border: none;
324
+ border: 1px solid var(--color-primary);
295
325
  border-radius: var(--radius-md);
296
326
  font-size: var(--font-size-base);
297
- font-weight: var(--font-weight-medium);
327
+ font-weight: var(--font-weight-semibold);
298
328
  cursor: pointer;
299
329
  font-family: inherit;
300
330
  transition: all var(--transition-base);
@@ -302,6 +332,7 @@ export const surveyStyles = `
302
332
 
303
333
  .feedback-survey-submit:hover {
304
334
  background: var(--color-primary-hover);
335
+ border-color: var(--color-primary-hover);
305
336
  }
306
337
 
307
338
  .feedback-survey-error {
@@ -317,7 +348,7 @@ export const surveyStyles = `
317
348
  right: var(--spacing-6);
318
349
  background: var(--color-success);
319
350
  color: var(--color-white);
320
- padding: var(--spacing-4) var(--spacing-6);
351
+ padding: var(--spacing-3) var(--spacing-5);
321
352
  border-radius: var(--radius-xl);
322
353
  font-size: var(--font-size-base);
323
354
  font-weight: var(--font-weight-medium);
@@ -332,23 +363,27 @@ export const surveyStyles = `
332
363
  gap: var(--spacing-2);
333
364
  }
334
365
 
366
+ /* ========================================
367
+ RESPONSIVE
368
+ ======================================== */
369
+
335
370
  @media (max-width: 768px) {
336
371
  .feedback-survey {
337
372
  min-width: 300px;
338
373
  }
339
-
374
+
340
375
  .feedback-survey-bottom {
341
376
  padding: var(--spacing-5);
342
377
  }
343
-
378
+
344
379
  .feedback-survey-nps-btn {
345
380
  width: 24px;
346
381
  height: 32px;
347
382
  font-size: var(--font-size-xs);
348
383
  }
349
-
384
+
350
385
  .feedback-survey-csat-btn {
351
386
  font-size: 32px;
352
387
  }
353
388
  }
354
- `;
389
+ `;
@@ -510,4 +510,4 @@ export class BaseWidget {
510
510
  closeModal() {
511
511
  this.closePanel();
512
512
  }
513
- }
513
+ }
@@ -98,4 +98,4 @@ export class ButtonWidget extends BaseWidget {
98
98
  );
99
99
  }
100
100
  }
101
- }
101
+ }
@@ -570,4 +570,4 @@ export class ChangelogWidget extends BaseWidget {
570
570
  this.closeSidebar();
571
571
  super.destroy();
572
572
  }
573
- }
573
+ }
@@ -145,4 +145,4 @@ export class InlineWidget extends BaseWidget {
145
145
  input.placeholder = placeholder;
146
146
  }
147
147
  }
148
- }
148
+ }
@@ -1,3 +1,4 @@
1
+ import { WebSocketService } from '../core/WebSocketService.js';
1
2
  import { BaseWidget } from './BaseWidget.js';
2
3
  import { MessengerState } from './messenger/MessengerState.js';
3
4
  import { MessengerLauncher } from './messenger/components/MessengerLauncher.js';
@@ -8,7 +9,6 @@ import { ConversationsView } from './messenger/views/ConversationsView.js';
8
9
  import { HelpView } from './messenger/views/HelpView.js';
9
10
  import { HomeView } from './messenger/views/HomeView.js';
10
11
  import { PreChatFormView } from './messenger/views/PreChatFormView.js';
11
- import { WebSocketService } from '../core/WebSocketService.js';
12
12
 
13
13
  export class MessengerWidget extends BaseWidget {
14
14
  constructor(options) {
@@ -198,7 +198,10 @@ export class MessengerWidget extends BaseWidget {
198
198
  });
199
199
 
200
200
  if (response.status) {
201
- console.log('[MessengerWidget] Contact identified:', response.data.contact_id);
201
+ console.log(
202
+ '[MessengerWidget] Contact identified:',
203
+ response.data.contact_id
204
+ );
202
205
  this.messengerState.setIdentified(true, {
203
206
  name: contactData.name,
204
207
  email: contactData.email,
@@ -350,7 +353,9 @@ export class MessengerWidget extends BaseWidget {
350
353
  data?.conversation_id || data?.id || data?.conversation?.id;
351
354
  if (!conversationId) return;
352
355
 
353
- this.messengerState.updateConversation(conversationId, { status: 'closed' });
356
+ this.messengerState.updateConversation(conversationId, {
357
+ status: 'closed',
358
+ });
354
359
  }
355
360
 
356
361
  async _updateUnreadCount() {
@@ -675,7 +680,8 @@ export class MessengerWidget extends BaseWidget {
675
680
  description:
676
681
  'Connect with more tools you love and streamline your workflow.',
677
682
  tags: ['Integration'],
678
- coverImage: 'https://feedback-sdk.product7.io/700x400__5_.png',
683
+ coverImage:
684
+ 'https://images.unsplash.com/photo-1674027444485-cec3da58eef4?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8YWl8ZW58MHx8MHx8fDA%3D',
679
685
  coverText: null,
680
686
  publishedAt: new Date(
681
687
  Date.now() - 14 * 24 * 60 * 60 * 1000
@@ -689,7 +695,7 @@ export class MessengerWidget extends BaseWidget {
689
695
  'We announced Fin Insights, a groundbreaking, AI-powered product that gives you complete visibility into every customer conversation.',
690
696
  tags: ['New feature', 'AI'],
691
697
  coverImage:
692
- 'https://feedback-sdk.product7.io/Intercom_Messenger__1_.jpg',
698
+ 'https://images.unsplash.com/photo-1666875753105-c63a6f3bdc86?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTJ8fGluc2lnaHRzfGVufDB8fDB8fHww',
693
699
  coverText: 'Watch our major product launch on-demand',
694
700
  publishedAt: new Date(
695
701
  Date.now() - 5 * 24 * 60 * 60 * 1000
@@ -703,7 +709,7 @@ export class MessengerWidget extends BaseWidget {
703
709
  'Learn how AI has transformed customer service from the ground up—rewriting its economics and reshaping expectations.',
704
710
  tags: ['Report'],
705
711
  coverImage:
706
- 'https://feedback-sdk.product7.io/Main_Report_Email_Header.png',
712
+ 'https://images.unsplash.com/photo-1762330467475-a565d04e1808?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8N3x8YWklMjBjdXN0b21lciUyMHNlcnZpY2V8ZW58MHx8MHx8fDA%3D',
707
713
  coverText: 'Customer service trends as we know them are dead.',
708
714
  publishedAt: new Date(
709
715
  Date.now() - 2 * 24 * 60 * 60 * 1000
@@ -719,7 +725,7 @@ export class MessengerWidget extends BaseWidget {
719
725
  'Get deeper insights into your customer conversations with our new analytics dashboard.',
720
726
  tags: ['Analytics'],
721
727
  coverImage:
722
- 'https://feedback-sdk.product7.io/cgangelog-Frame%202087334450.jpg',
728
+ 'https://images.unsplash.com/photo-1523961131990-5ea7c61b2107?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTJ8fGFuYWx5dGljc3xlbnwwfHwwfHx8MA%3D%3D',
723
729
  coverText: null,
724
730
  publishedAt: new Date(
725
731
  Date.now() - 10 * 24 * 60 * 60 * 1000
@@ -733,7 +739,7 @@ export class MessengerWidget extends BaseWidget {
733
739
  'New AI-powered escalation guidance helps your team handle complex customer issues more effectively.',
734
740
  tags: ['New feature', 'AI'],
735
741
  coverImage:
736
- 'https://feedback-sdk.product7.io/cgangelog-image-escalation-guidance-event@2x.png',
742
+ 'https://images.unsplash.com/photo-1764773516703-b246ac2ad5ef?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8Y29tcGxleCUyMGlzc3Vlc3xlbnwwfHwwfHx8MA%3D%3D',
737
743
  coverText: null,
738
744
  publishedAt: new Date(
739
745
  Date.now() - 7 * 24 * 60 * 60 * 1000
@@ -805,4 +811,4 @@ export class MessengerWidget extends BaseWidget {
805
811
  this.onDestroy();
806
812
  super.destroy();
807
813
  }
808
- }
814
+ }
@@ -508,4 +508,4 @@ export class SurveyWidget extends BaseWidget {
508
508
  this._closeSurvey();
509
509
  super.destroy();
510
510
  }
511
- }
511
+ }
@@ -42,4 +42,4 @@ export class TabWidget extends BaseWidget {
42
42
  );
43
43
  }
44
44
  }
45
- }
45
+ }
@@ -60,7 +60,10 @@ export class MessengerState {
60
60
  setActiveConversation(conversationId) {
61
61
  const previousConversationId = this.activeConversationId;
62
62
  this.activeConversationId = conversationId;
63
- this._notify('conversationChange', { conversationId, previousConversationId });
63
+ this._notify('conversationChange', {
64
+ conversationId,
65
+ previousConversationId,
66
+ });
64
67
  }
65
68
 
66
69
  setIdentified(isIdentified, userContext = null) {
@@ -192,4 +195,4 @@ export class MessengerState {
192
195
  this.helpSearchQuery = '';
193
196
  this._notify('reset', {});
194
197
  }
195
- }
198
+ }
@@ -36,24 +36,28 @@ export class MessengerLauncher {
36
36
  : '';
37
37
 
38
38
  this.element.innerHTML = `
39
- <button class="messenger-launcher-btn" aria-label="Open messenger">
40
- <span class="messenger-launcher-icon messenger-launcher-icon-chat">
41
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
42
- <path d="M144,140a12,12,0,1,1-12-12A12,12,0,0,1,144,140Zm44-12a12,12,0,1,0,12,12A12,12,0,0,0,188,128Zm51.34,83.47a16,16,0,0,1-19.87,19.87l-24.71-7.27A80,80,0,0,1,86.43,183.42a79,79,0,0,1-25.19-7.35l-24.71,7.27a16,16,0,0,1-19.87-19.87l7.27-24.71A80,80,0,1,1,169.58,72.59a80,80,0,0,1,62.49,114.17ZM81.3,166.3a79.94,79.94,0,0,1,70.38-93.87A64,64,0,0,0,39.55,134.19a8,8,0,0,1,.63,6L32,168l27.76-8.17a8,8,0,0,1,6,.63A63.45,63.45,0,0,0,81.3,166.3Zm135.15,15.89a64,64,0,1,0-26.26,26.26,8,8,0,0,1,6-.63L224,216l-8.17-27.76A8,8,0,0,1,216.45,182.19Z"></path>
43
- </svg>
44
- </span>
45
- <span class="messenger-launcher-icon messenger-launcher-icon-close" style="display: none;">
46
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
47
- <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
48
- </svg>
49
- </span>
50
- ${badgeHtml}
51
- </button>
52
- `;
39
+ <button class="messenger-launcher-btn" aria-label="Open messenger">
40
+ <span class="messenger-launcher-icon messenger-launcher-icon-chat">
41
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
42
+ <path d="M144,140a12,12,0,1,1-12-12A12,12,0,0,1,144,140Zm44-12a12,12,0,1,0,12,12A12,12,0,0,0,188,128Zm51.34,83.47a16,16,0,0,1-19.87,19.87l-24.71-7.27A80,80,0,0,1,86.43,183.42a79,79,0,0,1-25.19-7.35l-24.71,7.27a16,16,0,0,1-19.87-19.87l7.27-24.71A80,80,0,1,1,169.58,72.59a80,80,0,0,1,62.49,114.17ZM81.3,166.3a79.94,79.94,0,0,1,70.38-93.87A64,64,0,0,0,39.55,134.19a8,8,0,0,1,.63,6L32,168l27.76-8.17a8,8,0,0,1,6,.63A63.45,63.45,0,0,0,81.3,166.3Zm135.15,15.89a64,64,0,1,0-26.26,26.26,8,8,0,0,1,6-.63L224,216l-8.17-27.76A8,8,0,0,1,216.45,182.19Z"></path>
43
+ </svg>
44
+ </span>
45
+ <span class="messenger-launcher-icon messenger-launcher-icon-close" style="display: none;">
46
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
47
+ <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
48
+ </svg>
49
+ </span>
50
+ ${badgeHtml}
51
+ </button>
52
+ `;
53
53
 
54
- // Set custom primary color if provided
55
- if (this.options.primaryColor) {
56
- this.element.querySelector('.messenger-launcher-btn').style.setProperty('background', this.options.primaryColor);
54
+ const btn = this.element.querySelector('.messenger-launcher-btn');
55
+ if (btn && this.options.primaryColor) {
56
+ btn.style.setProperty(
57
+ 'background',
58
+ this.options.primaryColor,
59
+ 'important'
60
+ );
57
61
  }
58
62
  }
59
63
 
@@ -121,4 +125,4 @@ export class MessengerLauncher {
121
125
  this.element.parentNode.removeChild(this.element);
122
126
  }
123
127
  }
124
- }
128
+ }
@@ -105,4 +105,4 @@ export class MessengerPanel {
105
105
  this.element.parentNode.removeChild(this.element);
106
106
  }
107
107
  }
108
- }
108
+ }
@@ -8,7 +8,7 @@ export class NavigationTabs {
8
8
 
9
9
  render() {
10
10
  this.element = document.createElement('div');
11
- this.element.className = 'messenger-nav';
11
+ this.element.className = 'messenger-panel-nav';
12
12
 
13
13
  this._updateContent();
14
14
  this._attachEvents();
@@ -68,7 +68,22 @@ export class NavigationTabs {
68
68
  })
69
69
  .join('');
70
70
 
71
- this.element.innerHTML = tabsHtml;
71
+ this.element.innerHTML = `
72
+ <div class="messenger-nav-tabs">
73
+ ${tabsHtml}
74
+ </div>
75
+ <div class="messenger-nav-footer">
76
+ <a href="https://product7.io" target="_blank" rel="noopener noreferrer" class="messenger-powered-by">
77
+ <svg width="12" height="14" viewBox="0 0 28 32" fill="none" xmlns="http://www.w3.org/2000/svg">
78
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.0615 5.28044C8.5161 4.42949 3.30825 11.1456 5.89967 17.6588C6.9321 20.2538 9.06268 22.2644 11.8777 23.1968C16.2682 24.6507 18.4038 22.3222 19.0483 23.9691C19.4055 24.8894 18.7282 25.3209 17.988 25.4938C10.9146 27.15 5.15304 22.7566 3.5869 17.5531C1.52205 10.6941 5.98684 4.6667 11.3483 3.41065C17.8801 1.88094 24.0325 6.19355 24.3926 12.7175C24.7448 19.0921 18.6217 24.5978 11.927 22.2036C10.8789 21.8285 8.8419 20.6682 8.46823 19.858C8.06026 18.9727 8.80261 18.1725 9.68285 18.3576C10.2223 18.4726 10.3116 18.8706 11.3161 19.5372C14.4549 21.6213 19.1276 20.6132 21.2046 17.0972C23.991 12.3817 21.0481 6.05351 15.06 5.27758L15.0615 5.28044Z" fill="#21244A"/>
79
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.2492 2.19833C11.944 1.71463 8.88819 3.07214 6.91479 4.49682C2.27067 7.85488 0.76169 14.5038 3.49672 19.8731C4.08535 21.0096 4.84379 22.0497 5.7459 22.9576L7.16343 24.2515C7.67214 24.9131 7.27203 25.7176 6.64115 25.9269C5.13502 26.4271 2.0499 21.8172 1.42044 20.5383C0.0872204 17.8297 -0.312889 14.9047 0.242977 11.503C1.66908 2.77063 11.221 -2.51652 19.7197 1.21021C27.7548 4.73331 30.2733 15.4555 23.9351 22.0773C23.3107 22.7296 21.6352 24.4823 20.6278 23.8907C20.0076 23.5263 19.8933 22.6446 20.5192 22.1238C21.0301 21.6986 21.4759 21.435 21.9896 20.9734C23.6665 19.4688 25.2562 16.8752 25.3477 13.5636C25.4427 10.2055 24.1266 7.5848 22.3904 5.74859C20.6392 3.89665 18.6751 2.69919 15.2456 2.19691L15.2492 2.19833Z" fill="#F69F06"/>
80
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.48332 27.2217C7.93817 26.265 8.89987 25.3776 10.1352 25.8641C15.5653 27.9926 18.3081 25.5269 19.0255 27.0823C19.2655 27.6039 19.0448 28.1619 18.7354 28.3863C17.9895 28.9257 14.82 28.9343 13.9262 28.8714C12.9071 28.8053 11.897 28.6377 10.9111 28.3713C10.0888 28.1348 8.88057 27.9247 8.48189 27.2281L8.48332 27.2217Z" fill="#21244A"/>
81
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.8722 31.0607C15.7765 32.1381 14.579 32.0331 13.5766 31.9545C12.5742 31.8759 11.5203 31.8502 11.601 30.7013C11.6789 29.5882 12.8035 29.7532 13.8274 29.8332C14.4425 29.8811 15.9951 29.681 15.8722 31.0607Z" fill="#21244A"/>
82
+ </svg>
83
+ Powered by <strong>Product7</strong>
84
+ </a>
85
+ </div>
86
+ `;
72
87
  }
73
88
 
74
89
  _attachEvents() {
@@ -103,27 +118,33 @@ export class NavigationTabs {
103
118
  }
104
119
 
105
120
  _getHomeIcon() {
106
- return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
107
- <path d="M218.83,103.77l-80-75.48a1.14,1.14,0,0,1-.11-.11,16,16,0,0,0-21.53,0l-.11.11L37.17,103.77A16,16,0,0,0,32,115.55V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V160h32v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V115.55A16,16,0,0,0,218.83,103.77ZM208,208H160V160a16,16,0,0,0-16-16H112a16,16,0,0,0-16,16v48H48V115.55l.11-.1L128,40l79.9,75.43.11.1Z"></path>
108
- </svg>`;
121
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 256 256">
122
+ <path d="M40,216H216V120a8,8,0,0,0-2.34-5.66l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,40,120Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
123
+ </svg>`;
109
124
  }
110
125
 
111
126
  _getMessagesIcon() {
112
- return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
113
- <path d="M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78.69.69,0,0,0,.13-.11L82.5,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H82.5a16,16,0,0,0-10.3,3.75l-.12.11L40,224V64H216Z"></path>
114
- </svg>`;
127
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 256 256">
128
+ <circle cx="128" cy="128" r="12"/>
129
+ <circle cx="84" cy="128" r="12"/>
130
+ <circle cx="172" cy="128" r="12"/>
131
+ <path d="M79.93,211.11a96,96,0,1,0-35-35h0L32.42,213.46a8,8,0,0,0,10.12,10.12l37.39-12.47Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
132
+ </svg>`;
115
133
  }
116
134
 
117
135
  _getHelpIcon() {
118
- return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
119
- <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path>
120
- </svg>`;
136
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 256 256">
137
+ <circle cx="128" cy="128" r="96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
138
+ <circle cx="128" cy="180" r="12"/>
139
+ <path d="M128,144v-8a28,28,0,1,0-28-28" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
140
+ </svg>`;
121
141
  }
122
142
 
123
143
  _getChangelogIcon() {
124
- return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256">
125
- <path d="M228.54,86.66l-26.46,23.07A40,40,0,0,0,168,72.13L120.89,46.5a40,40,0,0,0-75.44-4l-22-19.2a8,8,0,0,0-10.5,12L35.44,54.77a40,40,0,0,0,50,61.07l47.1,25.64a40,40,0,0,0,75.41,4.07l26.46-23.07a8,8,0,0,0-10.5-12ZM56,96A24,24,0,1,1,77.25,82.75,24,24,0,0,1,56,96Zm144,64a24,24,0,1,1,24-24A24,24,0,0,1,200,160Z"></path>
126
- </svg>`;
144
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 256 256">
145
+ <path d="M160,80V200.67a8,8,0,0,0,3.56,6.65l11,7.33a8,8,0,0,0,12.2-4.72L200,160" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
146
+ <path d="M40,200a8,8,0,0,0,13.15,6.12C105.55,162.16,160,160,160,160h40a40,40,0,0,0,0-80H160S105.55,77.84,53.15,33.89A8,8,0,0,0,40,40Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
147
+ </svg>`;
127
148
  }
128
149
 
129
150
  destroy() {
@@ -134,4 +155,4 @@ export class NavigationTabs {
134
155
  this.element.parentNode.removeChild(this.element);
135
156
  }
136
157
  }
137
- }
158
+ }
@@ -22,30 +22,15 @@ export class ChangelogView {
22
22
  }
23
23
 
24
24
  _updateContent() {
25
- const avatarsHtml = this._renderTeamAvatars();
26
-
27
25
  this.element.innerHTML = `
28
- <div class="messenger-changelog-header">
29
- <h2>Changelog</h2>
30
- <button class="sdk-close-btn" aria-label="Close">
31
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 256 256">
32
- <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
33
- </svg>
34
- </button>
35
- </div>
26
+ <div class="messenger-changelog-header">
27
+ <h2>Latest Updates</h2>
28
+ </div>
36
29
 
37
- <div class="messenger-changelog-subheader">
38
- <span class="messenger-changelog-latest">Latest</span>
39
- <div class="messenger-changelog-team">
40
- <span>From ${this.state.teamName}</span>
41
- ${avatarsHtml}
42
- </div>
43
- </div>
44
-
45
- <div class="messenger-changelog-body">
46
- <div class="messenger-changelog-list"></div>
47
- </div>
48
- `;
30
+ <div class="messenger-changelog-body">
31
+ <div class="messenger-changelog-list"></div>
32
+ </div>
33
+ `;
49
34
 
50
35
  this._updateChangelogList();
51
36
  this._attachEvents();
@@ -96,9 +81,6 @@ export class ChangelogView {
96
81
  ${item.description ? `<p class="messenger-changelog-description">${this._truncateText(item.description, 100)}</p>` : ''}
97
82
  <div class="messenger-changelog-meta">
98
83
  <span class="messenger-changelog-date">${dateStr}</span>
99
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 256 256" class="messenger-changelog-arrow">
100
- <path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path>
101
- </svg>
102
84
  </div>
103
85
  </div>
104
86
  </div>
@@ -159,12 +141,6 @@ export class ChangelogView {
159
141
  }
160
142
 
161
143
  _attachEvents() {
162
- this.element
163
- .querySelector('.sdk-close-btn')
164
- .addEventListener('click', () => {
165
- this.state.setOpen(false);
166
- });
167
-
168
144
  this._attachChangelogEvents();
169
145
  }
170
146
 
@@ -194,4 +170,4 @@ export class ChangelogView {
194
170
  this.element.parentNode.removeChild(this.element);
195
171
  }
196
172
  }
197
- }
173
+ }