@product7/product7-js 0.5.5 → 0.5.7

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 (40) hide show
  1. package/README.md +10 -10
  2. package/dist/README.md +10 -10
  3. package/dist/product7-js.js +7261 -7100
  4. package/dist/product7-js.js.map +1 -1
  5. package/dist/product7-js.min.js +1 -1
  6. package/dist/product7-js.min.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/api/services/{WebChatService.js → LiveChatService.js} +14 -14
  9. package/src/core/APIService.js +15 -15
  10. package/src/core/Product7.js +9 -4
  11. package/src/core/WebSocketService.js +1 -1
  12. package/src/docs/api.md +8 -8
  13. package/src/docs/example.md +9 -9
  14. package/src/docs/framework-integrations.md +3 -3
  15. package/src/index.js +38 -37
  16. package/src/styles/base.js +8 -8
  17. package/src/styles/{web-chat-components.js → liveChat-components.js} +114 -114
  18. package/src/styles/{web-chat-core.js → liveChat-core.js} +96 -31
  19. package/src/styles/{web-chat-features.js → liveChat-features.js} +20 -20
  20. package/src/styles/{web-chat-views.js → liveChat-views.js} +137 -137
  21. package/src/styles/liveChat.js +17 -0
  22. package/src/styles/{webChatCustomStyles.js → liveChatCustomStyles.js} +16 -16
  23. package/src/styles/styles.js +3 -3
  24. package/src/widgets/BaseWidget.js +2 -2
  25. package/src/widgets/ChangelogWidget.js +3 -3
  26. package/src/widgets/{WebChatWidget.js → LiveChatWidget.js} +169 -165
  27. package/src/widgets/SurveyWidget.js +7 -7
  28. package/src/widgets/WidgetFactory.js +2 -2
  29. package/src/widgets/{web-chat/WebChatState.js → liveChat/LiveChatState.js} +1 -1
  30. package/src/widgets/{web-chat/components/WebChatLauncher.js → liveChat/components/LiveChatLauncher.js} +16 -16
  31. package/src/widgets/{web-chat/components/WebChatPanel.js → liveChat/components/LiveChatPanel.js} +41 -10
  32. package/src/widgets/{web-chat → liveChat}/components/NavigationTabs.js +16 -16
  33. package/src/widgets/{web-chat → liveChat}/views/ChangelogView.js +17 -17
  34. package/src/widgets/{web-chat → liveChat}/views/ChatView.js +153 -95
  35. package/src/widgets/{web-chat → liveChat}/views/ConversationsView.js +24 -24
  36. package/src/widgets/{web-chat → liveChat}/views/HelpView.js +32 -32
  37. package/src/widgets/{web-chat → liveChat}/views/HomeView.js +52 -52
  38. package/src/widgets/{web-chat → liveChat}/views/PreChatFormView.js +15 -18
  39. package/types/index.d.ts +8 -9
  40. package/src/styles/web-chat.js +0 -17
@@ -1,4 +1,4 @@
1
- import { BaseWidget } from './BaseWidget.js';
1
+ import { BaseWidget } from './BaseWidget.js';
2
2
 
3
3
  export class SurveyWidget extends BaseWidget {
4
4
  constructor(options) {
@@ -153,7 +153,7 @@ export class SurveyWidget extends BaseWidget {
153
153
  }`;
154
154
 
155
155
  this.surveyElement.innerHTML = `
156
- <button class="feedback-survey-close"><iconify-icon icon="ph:x-duotone" width="16" height="16"></iconify-icon></button>
156
+ <button class="feedback-survey-close"><iconify-icon icon="ph:x" width="16" height="16"></iconify-icon></button>
157
157
  ${showTitle ? `<h3 class="feedback-survey-title">${config.title}</h3>` : ''}
158
158
  ${showDescription ? `<p class="feedback-survey-description">${config.description}</p>` : ''}
159
159
  ${isMultiPage && this.surveyOptions.pages.length > 1 ? `<div class="feedback-survey-progress"><div class="feedback-survey-progress-track"><div class="feedback-survey-progress-fill" style="width:${progressPercent}%"></div></div></div>` : ''}
@@ -493,7 +493,7 @@ export class SurveyWidget extends BaseWidget {
493
493
  typeof currentRating === 'number' && currentRating >= score
494
494
  ? ' filled'
495
495
  : '';
496
- return `<button class="feedback-survey-page-rating-btn feedback-survey-star-btn${filled}" data-page-id="${pageId}" data-score="${score}"><iconify-icon icon="ph:star-duotone" width="32" height="32" style="pointer-events:none;"></iconify-icon></button>`;
496
+ return `<button class="feedback-survey-page-rating-btn feedback-survey-star-btn${filled}" data-page-id="${pageId}" data-score="${score}"><iconify-icon icon="ph:star" width="32" height="32" style="pointer-events:none;"></iconify-icon></button>`;
497
497
  }).join('')}
498
498
  </div>
499
499
  ${labels}
@@ -1211,7 +1211,7 @@ export class SurveyWidget extends BaseWidget {
1211
1211
 
1212
1212
  const error = document.createElement('div');
1213
1213
  error.className = 'feedback-survey-error';
1214
- error.innerHTML = `<iconify-icon icon="ph:warning-duotone" width="15" height="15"></iconify-icon><span>${message}</span>`;
1214
+ error.innerHTML = `<iconify-icon icon="ph:warning" width="15" height="15"></iconify-icon><span>${message}</span>`;
1215
1215
 
1216
1216
  this.surveyElement.prepend(error);
1217
1217
 
@@ -1247,16 +1247,16 @@ export class SurveyWidget extends BaseWidget {
1247
1247
  }
1248
1248
 
1249
1249
  this.surveyElement.innerHTML = `
1250
- <button class="feedback-survey-close"><iconify-icon icon="ph:x-duotone" width="16" height="16"></iconify-icon></button>
1250
+ <button class="feedback-survey-close"><iconify-icon icon="ph:x" width="16" height="16"></iconify-icon></button>
1251
1251
  <div class="feedback-survey-thankyou">
1252
- <iconify-icon icon="ph:check-circle-duotone" width="48" height="48" class="feedback-survey-thankyou-icon"></iconify-icon>
1252
+ <iconify-icon icon="ph:check-circle" width="48" height="48" class="feedback-survey-thankyou-icon"></iconify-icon>
1253
1253
  <h3 class="feedback-survey-thankyou-title">${title}</h3>
1254
1254
  ${
1255
1255
  buttonText
1256
1256
  ? `
1257
1257
  <a class="feedback-survey-thankyou-btn" href="${buttonUrl}" target="_blank" rel="noopener noreferrer">
1258
1258
  ${buttonText}
1259
- <iconify-icon icon="ph:arrow-square-out-duotone" width="15" height="15" style="pointer-events:none;"></iconify-icon>
1259
+ <iconify-icon icon="ph:arrow-square-out" width="15" height="15" style="pointer-events:none;"></iconify-icon>
1260
1260
  </a>`
1261
1261
  : ''
1262
1262
  }
@@ -2,9 +2,9 @@
2
2
  import { ButtonWidget } from './ButtonWidget.js';
3
3
  import { ChangelogWidget } from './ChangelogWidget.js';
4
4
  import { InlineWidget } from './InlineWidget.js';
5
+ import { LiveChatWidget } from './LiveChatWidget.js';
5
6
  import { SurveyWidget } from './SurveyWidget.js';
6
7
  import { TabWidget } from './TabWidget.js';
7
- import { WebChatWidget } from './WebChatWidget.js';
8
8
 
9
9
  export class WidgetFactory {
10
10
  static widgets = new Map([
@@ -12,7 +12,7 @@ export class WidgetFactory {
12
12
  ['tab', TabWidget],
13
13
  ['inline', InlineWidget],
14
14
  ['survey', SurveyWidget],
15
- ['webChat', WebChatWidget],
15
+ ['liveChat', LiveChatWidget],
16
16
  ['changelog', ChangelogWidget],
17
17
  ]);
18
18
 
@@ -1,4 +1,4 @@
1
- export class WebChatState {
1
+ export class LiveChatState {
2
2
  constructor(options = {}) {
3
3
  this.currentView = 'home';
4
4
  this.isOpen = false;
@@ -1,4 +1,4 @@
1
- export class WebChatLauncher {
1
+ export class LiveChatLauncher {
2
2
  constructor(state, options = {}) {
3
3
  this.state = state;
4
4
  this.options = {
@@ -12,7 +12,7 @@
12
12
 
13
13
  render() {
14
14
  this.element = document.createElement('div');
15
- this.element.className = `web-chat-launcher web-chat-launcher-${this.options.position}`;
15
+ this.element.className = `liveChat-launcher liveChat-launcher-${this.options.position}`;
16
16
 
17
17
  this._updateContent();
18
18
  this._attachEvents();
@@ -32,22 +32,22 @@
32
32
  _updateContent() {
33
33
  const badgeHtml =
34
34
  this.state.unreadCount > 0
35
- ? `<span class="web-chat-launcher-badge">${this.state.unreadCount > 9 ? '9+' : this.state.unreadCount}</span>`
35
+ ? `<span class="liveChat-launcher-badge">${this.state.unreadCount > 9 ? '9+' : this.state.unreadCount}</span>`
36
36
  : '';
37
37
 
38
38
  this.element.innerHTML = `
39
- <button class="web-chat-launcher-btn" aria-label="Open web chat">
40
- <span class="web-chat-launcher-icon web-chat-launcher-icon-chat">
41
- <iconify-icon icon="ph:chats-circle-duotone" width="24" height="24"></iconify-icon>
39
+ <button class="liveChat-launcher-btn" aria-label="Open live chat">
40
+ <span class="liveChat-launcher-icon liveChat-launcher-icon-chat">
41
+ <iconify-icon icon="ph:chats-circle" width="24" height="24"></iconify-icon>
42
42
  </span>
43
- <span class="web-chat-launcher-icon web-chat-launcher-icon-close" style="display: none;">
43
+ <span class="liveChat-launcher-icon liveChat-launcher-icon-close" style="display: none;">
44
44
  <iconify-icon icon="ph:caret-down-bold" width="22" height="22"></iconify-icon>
45
45
  </span>
46
46
  ${badgeHtml}
47
47
  </button>
48
48
  `;
49
49
 
50
- const btn = this.element.querySelector('.web-chat-launcher-btn');
50
+ const btn = this.element.querySelector('.liveChat-launcher-btn');
51
51
  if (btn && this.options.primaryColor) {
52
52
  btn.style.setProperty(
53
53
  'background',
@@ -59,32 +59,32 @@
59
59
 
60
60
  _attachEvents() {
61
61
  this.element
62
- .querySelector('.web-chat-launcher-btn')
62
+ .querySelector('.liveChat-launcher-btn')
63
63
  .addEventListener('click', () => {
64
64
  this.state.setOpen(!this.state.isOpen);
65
65
  });
66
66
  }
67
67
 
68
68
  _updateIcon() {
69
- const chatIcon = this.element.querySelector('.web-chat-launcher-icon-chat');
69
+ const chatIcon = this.element.querySelector('.liveChat-launcher-icon-chat');
70
70
  const closeIcon = this.element.querySelector(
71
- '.web-chat-launcher-icon-close'
71
+ '.liveChat-launcher-icon-close'
72
72
  );
73
73
 
74
74
  if (this.state.isOpen) {
75
75
  chatIcon.style.display = 'none';
76
76
  closeIcon.style.display = 'flex';
77
- this.element.classList.add('web-chat-launcher-open');
77
+ this.element.classList.add('liveChat-launcher-open');
78
78
  } else {
79
79
  chatIcon.style.display = 'flex';
80
80
  closeIcon.style.display = 'none';
81
- this.element.classList.remove('web-chat-launcher-open');
81
+ this.element.classList.remove('liveChat-launcher-open');
82
82
  }
83
83
  }
84
84
 
85
85
  _updateBadge() {
86
86
  const existingBadge = this.element.querySelector(
87
- '.web-chat-launcher-badge'
87
+ '.liveChat-launcher-badge'
88
88
  );
89
89
  if (existingBadge) {
90
90
  existingBadge.remove();
@@ -92,10 +92,10 @@
92
92
 
93
93
  if (this.state.unreadCount > 0 && !this.state.isOpen) {
94
94
  const badge = document.createElement('span');
95
- badge.className = 'web-chat-launcher-badge';
95
+ badge.className = 'liveChat-launcher-badge';
96
96
  badge.textContent =
97
97
  this.state.unreadCount > 9 ? '9+' : this.state.unreadCount;
98
- this.element.querySelector('.web-chat-launcher-btn').appendChild(badge);
98
+ this.element.querySelector('.liveChat-launcher-btn').appendChild(badge);
99
99
  }
100
100
  }
101
101
 
@@ -1,6 +1,6 @@
1
1
  import { NavigationTabs } from './NavigationTabs.js';
2
2
 
3
- export class WebChatPanel {
3
+ export class LiveChatPanel {
4
4
  constructor(state, options = {}) {
5
5
  this.state = state;
6
6
  this.options = {
@@ -12,6 +12,7 @@ export class WebChatPanel {
12
12
  this.currentViewComponent = null;
13
13
  this.viewRegistry = {};
14
14
  this._unsubscribe = null;
15
+ this._expanded = false;
15
16
  }
16
17
 
17
18
  registerView(name, ViewClass) {
@@ -20,17 +21,20 @@ export class WebChatPanel {
20
21
 
21
22
  render() {
22
23
  this.element = document.createElement('div');
23
- this.element.className = `web-chat-panel web-chat-panel-${this.options.position}`;
24
+ this.element.className = `liveChat-panel liveChat-panel-${this.options.position}`;
24
25
 
25
26
  this.element.innerHTML = `
26
- <div class="web-chat-panel-content">
27
- <div class="web-chat-panel-views"></div>
28
- <div class="web-chat-panel-nav"></div>
27
+ <div class="liveChat-panel-content">
28
+ <div class="liveChat-panel-views"></div>
29
+ <div class="liveChat-panel-nav"></div>
29
30
  </div>
30
31
  `;
31
32
 
33
+ this.options.onToggleExpand = () => this._toggleExpand();
34
+ this.options.isExpanded = () => this._expanded;
35
+
32
36
  this.navigationTabs = new NavigationTabs(this.state, this.options);
33
- const navContainer = this.element.querySelector('.web-chat-panel-nav');
37
+ const navContainer = this.element.querySelector('.liveChat-panel-nav');
34
38
  navContainer.appendChild(this.navigationTabs.render());
35
39
 
36
40
  this._renderCurrentView();
@@ -44,9 +48,30 @@ export class WebChatPanel {
44
48
  return this.element;
45
49
  }
46
50
 
51
+ _toggleExpand() {
52
+ this._expanded = !this._expanded;
53
+ this.element.classList.toggle('liveChat-panel-expanded', this._expanded);
54
+
55
+ const menuIcon = this.element.querySelector(
56
+ '.liveChat-expand-window-btn iconify-icon'
57
+ );
58
+ const menuLabel = this.element.querySelector(
59
+ '.liveChat-expand-window-btn span'
60
+ );
61
+ if (menuIcon)
62
+ menuIcon.setAttribute(
63
+ 'icon',
64
+ this._expanded ? 'ph:arrows-in' : 'ph:arrows-out'
65
+ );
66
+ if (menuLabel)
67
+ menuLabel.textContent = this._expanded
68
+ ? 'Collapse window'
69
+ : 'Expand window';
70
+ }
71
+
47
72
  _renderCurrentView() {
48
- const viewsContainer = this.element.querySelector('.web-chat-panel-views');
49
- const navContainer = this.element.querySelector('.web-chat-panel-nav');
73
+ const viewsContainer = this.element.querySelector('.liveChat-panel-views');
74
+ const navContainer = this.element.querySelector('.liveChat-panel-nav');
50
75
 
51
76
  if (this.currentViewComponent && this.currentViewComponent.destroy) {
52
77
  this.currentViewComponent.destroy();
@@ -54,12 +79,18 @@ export class WebChatPanel {
54
79
 
55
80
  viewsContainer.innerHTML = '';
56
81
 
82
+ // Collapse expanded state when leaving chat view
83
+ if (this.state.currentView !== 'chat' && this._expanded) {
84
+ this._expanded = false;
85
+ this.element.classList.remove('liveChat-panel-expanded');
86
+ }
87
+
57
88
  const ViewClass = this.viewRegistry[this.state.currentView];
58
89
  if (ViewClass) {
59
90
  this.currentViewComponent = new ViewClass(this.state, this.options);
60
91
  viewsContainer.appendChild(this.currentViewComponent.render());
61
92
  } else {
62
- viewsContainer.innerHTML = `<div class="web-chat-empty-state">
93
+ viewsContainer.innerHTML = `<div class="liveChat-empty-state">
63
94
  <p>View not found: ${this.state.currentView}</p>
64
95
  </div>`;
65
96
  }
@@ -88,7 +119,7 @@ export class WebChatPanel {
88
119
  }
89
120
 
90
121
  setHeader(headerContent) {
91
- const header = this.element.querySelector('.web-chat-panel-header');
122
+ const header = this.element.querySelector('.liveChat-panel-header');
92
123
  if (header) {
93
124
  header.innerHTML = headerContent;
94
125
  }
@@ -8,7 +8,7 @@
8
8
 
9
9
  render() {
10
10
  this.element = document.createElement('div');
11
- this.element.className = 'web-chat-panel-nav';
11
+ this.element.className = 'liveChat-panel-nav';
12
12
 
13
13
  this._updateContent();
14
14
  this._attachEvents();
@@ -24,24 +24,24 @@
24
24
 
25
25
  _getTabs() {
26
26
  const tabs = [
27
- { id: 'home', label: 'Home', icon: 'ph:house-simple-duotone' },
27
+ { id: 'home', label: 'Home', icon: 'ph:house-simple' },
28
28
  {
29
29
  id: 'messages',
30
30
  label: 'Messages',
31
- icon: 'ph:chats-duotone',
31
+ icon: 'ph:chats',
32
32
  badge: this.state.unreadCount,
33
33
  },
34
34
  ];
35
35
 
36
36
  if (this.state.enableHelp) {
37
- tabs.push({ id: 'help', label: 'Help', icon: 'ph:books-duotone' });
37
+ tabs.push({ id: 'help', label: 'Help', icon: 'ph:books' });
38
38
  }
39
39
 
40
40
  if (this.state.enableChangelog) {
41
41
  tabs.push({
42
42
  id: 'changelog',
43
43
  label: 'Updates',
44
- icon: 'ph:megaphone-duotone',
44
+ icon: 'ph:megaphone',
45
45
  });
46
46
  }
47
47
 
@@ -55,15 +55,15 @@
55
55
  const isActive = this.state.currentView === tab.id;
56
56
  const badgeHtml =
57
57
  tab.badge && tab.badge > 0
58
- ? `<span class="web-chat-nav-badge">${tab.badge > 9 ? '9+' : tab.badge}</span>`
58
+ ? `<span class="liveChat-nav-badge">${tab.badge > 9 ? '9+' : tab.badge}</span>`
59
59
  : '';
60
60
 
61
61
  return `
62
- <button class="web-chat-nav-tab ${isActive ? 'active' : ''}" data-tab="${tab.id}">
63
- <span class="web-chat-nav-icon">
62
+ <button class="liveChat-nav-tab ${isActive ? 'active' : ''}" data-tab="${tab.id}">
63
+ <span class="liveChat-nav-icon">
64
64
  <iconify-icon icon="${tab.icon}" width="22" height="22"></iconify-icon>
65
65
  </span>
66
- <span class="web-chat-nav-label">${tab.label}</span>
66
+ <span class="liveChat-nav-label">${tab.label}</span>
67
67
  ${badgeHtml}
68
68
  </button>
69
69
  `;
@@ -71,11 +71,11 @@
71
71
  .join('');
72
72
 
73
73
  this.element.innerHTML = `
74
- <div class="web-chat-nav-tabs">
74
+ <div class="liveChat-nav-tabs">
75
75
  ${tabsHtml}
76
76
  </div>
77
- <div class="web-chat-nav-footer">
78
- <a href="https://product7.io" target="_blank" rel="noopener noreferrer" class="web-chat-powered-by">
77
+ <div class="liveChat-nav-footer">
78
+ <a href="https://product7.io" target="_blank" rel="noopener noreferrer" class="liveChat-powered-by">
79
79
  <svg width="12" height="14" viewBox="0 0 28 32" fill="none" xmlns="http://www.w3.org/2000/svg">
80
80
  <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"/>
81
81
  <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"/>
@@ -90,7 +90,7 @@
90
90
 
91
91
  _attachEvents() {
92
92
  this.element.addEventListener('click', (e) => {
93
- const tab = e.target.closest('.web-chat-nav-tab');
93
+ const tab = e.target.closest('.liveChat-nav-tab');
94
94
  if (tab) {
95
95
  const tabId = tab.dataset.tab;
96
96
  this.state.setView(tabId);
@@ -99,18 +99,18 @@
99
99
  }
100
100
 
101
101
  _updateActiveTab() {
102
- const tabs = this.element.querySelectorAll('.web-chat-nav-tab');
102
+ const tabs = this.element.querySelectorAll('.liveChat-nav-tab');
103
103
  tabs.forEach((tab) => {
104
104
  const isActive = tab.dataset.tab === this.state.currentView;
105
105
  tab.classList.toggle('active', isActive);
106
106
 
107
107
  if (tab.dataset.tab === 'messages') {
108
- const existingBadge = tab.querySelector('.web-chat-nav-badge');
108
+ const existingBadge = tab.querySelector('.liveChat-nav-badge');
109
109
  if (existingBadge) existingBadge.remove();
110
110
 
111
111
  if (this.state.unreadCount > 0) {
112
112
  const badge = document.createElement('span');
113
- badge.className = 'web-chat-nav-badge';
113
+ badge.className = 'liveChat-nav-badge';
114
114
  badge.textContent =
115
115
  this.state.unreadCount > 9 ? '9+' : this.state.unreadCount;
116
116
  tab.appendChild(badge);
@@ -11,7 +11,7 @@
11
11
 
12
12
  render() {
13
13
  this.element = document.createElement('div');
14
- this.element.className = 'web-chat-view web-chat-changelog-view';
14
+ this.element.className = 'liveChat-view liveChat-changelog-view';
15
15
 
16
16
  this._updateContent();
17
17
 
@@ -26,17 +26,17 @@
26
26
 
27
27
  _updateContent() {
28
28
  this.element.innerHTML = `
29
- <div class="web-chat-changelog-header">
30
- <div class="web-chat-changelog-header-top">
29
+ <div class="liveChat-changelog-header">
30
+ <div class="liveChat-changelog-header-top">
31
31
  <h2>Latest Updates</h2>
32
- <button class="sdk-close-btn web-chat-changelog-close-btn web-chat-mobile-close-btn" aria-label="Close">
32
+ <button class="sdk-close-btn liveChat-changelog-close-btn liveChat-mobile-close-btn" aria-label="Close">
33
33
  <iconify-icon icon="ph:x" width="18" height="18"></iconify-icon>
34
34
  </button>
35
35
  </div>
36
36
  </div>
37
37
 
38
- <div class="web-chat-changelog-body">
39
- <div class="web-chat-changelog-list"></div>
38
+ <div class="liveChat-changelog-body">
39
+ <div class="liveChat-changelog-list"></div>
40
40
  </div>
41
41
  `;
42
42
 
@@ -46,7 +46,7 @@
46
46
 
47
47
  _updateChangelogList() {
48
48
  const changelogContainer = this.element.querySelector(
49
- '.web-chat-changelog-list'
49
+ '.liveChat-changelog-list'
50
50
  );
51
51
  const changelogItems = this.state.changelogItems;
52
52
 
@@ -71,11 +71,11 @@
71
71
 
72
72
  _renderChangelogCard(item) {
73
73
  return `
74
- <div class="web-chat-changelog-card" data-changelog-id="${item.id}">
75
- ${item.coverImage ? `<div class="web-chat-changelog-thumb"><img src="${item.coverImage}" alt="${item.title}" onerror="this.parentElement.style.display='none';" /></div>` : ''}
76
- <div class="web-chat-changelog-content">
77
- <h3 class="web-chat-changelog-title">${item.title}</h3>
78
- ${item.description ? `<p class="web-chat-changelog-description">${this._stripHtml(item.description)}</p>` : ''}
74
+ <div class="liveChat-changelog-card" data-changelog-id="${item.id}">
75
+ ${item.coverImage ? `<div class="liveChat-changelog-thumb"><img src="${item.coverImage}" alt="${item.title}" onerror="this.parentElement.style.display='none';" /></div>` : ''}
76
+ <div class="liveChat-changelog-content">
77
+ <h3 class="liveChat-changelog-title">${item.title}</h3>
78
+ ${item.description ? `<p class="liveChat-changelog-description">${this._stripHtml(item.description)}</p>` : ''}
79
79
  </div>
80
80
  </div>
81
81
  `;
@@ -92,9 +92,9 @@
92
92
 
93
93
  _renderEmptyState() {
94
94
  return `
95
- <div class="web-chat-empty-state">
96
- <div class="web-chat-empty-state-icon">
97
- <iconify-icon icon="ph:megaphone-duotone" width="48" height="48"></iconify-icon>
95
+ <div class="liveChat-empty-state">
96
+ <div class="liveChat-empty-state-icon">
97
+ <iconify-icon icon="ph:megaphone" width="48" height="48"></iconify-icon>
98
98
  </div>
99
99
  <h3>No changelog yet</h3>
100
100
  <p>Check back later for updates</p>
@@ -120,7 +120,7 @@
120
120
 
121
121
  _attachEvents() {
122
122
  const mobileCloseBtn = this.element.querySelector(
123
- '.web-chat-changelog-close-btn'
123
+ '.liveChat-changelog-close-btn'
124
124
  );
125
125
  if (mobileCloseBtn) {
126
126
  mobileCloseBtn.addEventListener('click', () => {
@@ -133,7 +133,7 @@
133
133
 
134
134
  _attachChangelogEvents() {
135
135
  this.element
136
- .querySelectorAll('.web-chat-changelog-card')
136
+ .querySelectorAll('.liveChat-changelog-card')
137
137
  .forEach((card) => {
138
138
  card.addEventListener('click', () => {
139
139
  const changelogId = card.dataset.changelogId;