@product7/feedback-sdk 1.3.9 → 1.4.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/feedback-sdk.js +108 -121
- 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/core/APIService.js +4 -0
- package/src/styles/feedback.js +1 -1
- package/src/styles/survey.js +1 -1
- package/src/widgets/MessengerWidget.js +102 -119
package/dist/feedback-sdk.js
CHANGED
|
@@ -1282,6 +1282,10 @@
|
|
|
1282
1282
|
return this.help.searchHelpArticles(query, options);
|
|
1283
1283
|
}
|
|
1284
1284
|
|
|
1285
|
+
async getChangelogs(options) {
|
|
1286
|
+
return this.changelog.getChangelogs(options);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1285
1289
|
_loadStoredSession() {
|
|
1286
1290
|
if (typeof localStorage === 'undefined') return false;
|
|
1287
1291
|
|
|
@@ -6070,26 +6074,25 @@
|
|
|
6070
6074
|
}
|
|
6071
6075
|
}
|
|
6072
6076
|
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
}
|
|
6077
|
+
async _fetchHelpArticles() {
|
|
6078
|
+
try {
|
|
6079
|
+
const response = await this.apiService.getHelpCollections();
|
|
6080
|
+
if (response.success && response.data) {
|
|
6081
|
+
const collections = response.data.collections || response.data;
|
|
6082
|
+
return collections.map((collection) => ({
|
|
6083
|
+
id: collection.id,
|
|
6084
|
+
title: collection.title,
|
|
6085
|
+
description: collection.description || '',
|
|
6086
|
+
articleCount: collection.article_count || 0,
|
|
6087
|
+
url: collection.url_slug ? `/help/${collection.url_slug}` : null,
|
|
6088
|
+
}));
|
|
6089
|
+
}
|
|
6090
|
+
return [];
|
|
6091
|
+
} catch (error) {
|
|
6092
|
+
console.error('[MessengerWidget] Failed to fetch help articles:', error);
|
|
6093
|
+
return [];
|
|
6094
|
+
}
|
|
6095
|
+
}
|
|
6093
6096
|
|
|
6094
6097
|
async fetchMessages(conversationId) {
|
|
6095
6098
|
try {
|
|
@@ -6214,105 +6217,89 @@
|
|
|
6214
6217
|
}
|
|
6215
6218
|
}
|
|
6216
6219
|
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
const mappedItems = changelogs.map((item) => ({
|
|
6301
|
-
id: item.id,
|
|
6302
|
-
title: item.title,
|
|
6303
|
-
description: item.excerpt || item.description || '',
|
|
6304
|
-
tags: item.labels ? item.labels.map((label) => label.name) : [],
|
|
6305
|
-
coverImage: item.cover_image || null,
|
|
6306
|
-
coverText: null,
|
|
6307
|
-
publishedAt: item.published_at,
|
|
6308
|
-
url: item.slug ? `/changelog/${item.slug}` : '#',
|
|
6309
|
-
}));
|
|
6310
|
-
|
|
6311
|
-
return {
|
|
6312
|
-
homeItems: mappedItems.slice(0, 3),
|
|
6313
|
-
changelogItems: mappedItems,
|
|
6314
|
-
};
|
|
6315
|
-
}
|
|
6220
|
+
async _fetchChangelog() {
|
|
6221
|
+
if (this.apiService?.mock) {
|
|
6222
|
+
return {
|
|
6223
|
+
homeItems: [
|
|
6224
|
+
{
|
|
6225
|
+
id: 'changelog_5',
|
|
6226
|
+
title: 'New integrations available',
|
|
6227
|
+
description: 'Connect with more tools you love and streamline your workflow.',
|
|
6228
|
+
tags: ['Integration'],
|
|
6229
|
+
coverImage: 'https://images.unsplash.com/photo-1674027444485-cec3da58eef4?w=500&auto=format&fit=crop&q=60',
|
|
6230
|
+
publishedAt: new Date(Date.now() - 14 * 24 * 60 * 60 * 1000).toISOString(),
|
|
6231
|
+
url: '#',
|
|
6232
|
+
},
|
|
6233
|
+
{
|
|
6234
|
+
id: 'changelog_2',
|
|
6235
|
+
title: 'A new era of Insights has arrived',
|
|
6236
|
+
description: 'We announced Fin Insights, a groundbreaking, AI-powered product that gives you complete visibility into every customer conversation.',
|
|
6237
|
+
tags: ['New feature', 'AI'],
|
|
6238
|
+
coverImage: 'https://images.unsplash.com/photo-1666875753105-c63a6f3bdc86?w=500&auto=format&fit=crop&q=60',
|
|
6239
|
+
publishedAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString(),
|
|
6240
|
+
url: '#',
|
|
6241
|
+
},
|
|
6242
|
+
{
|
|
6243
|
+
id: 'changelog_1',
|
|
6244
|
+
title: 'The 2025 Customer Service Transformation Report',
|
|
6245
|
+
description: 'Learn how AI has transformed customer service from the ground up—rewriting its economics and reshaping expectations.',
|
|
6246
|
+
tags: ['Report'],
|
|
6247
|
+
coverImage: 'https://images.unsplash.com/photo-1762330467475-a565d04e1808?w=500&auto=format&fit=crop&q=60',
|
|
6248
|
+
publishedAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(),
|
|
6249
|
+
url: '#',
|
|
6250
|
+
},
|
|
6251
|
+
],
|
|
6252
|
+
changelogItems: [
|
|
6253
|
+
{
|
|
6254
|
+
id: 'changelog_4',
|
|
6255
|
+
title: 'Enhanced conversation analytics',
|
|
6256
|
+
description: 'Get deeper insights into your customer conversations with our new analytics dashboard.',
|
|
6257
|
+
tags: ['Analytics'],
|
|
6258
|
+
coverImage: 'https://images.unsplash.com/photo-1523961131990-5ea7c61b2107?w=500&auto=format&fit=crop&q=60',
|
|
6259
|
+
publishedAt: new Date(Date.now() - 10 * 24 * 60 * 60 * 1000).toISOString(),
|
|
6260
|
+
url: '#',
|
|
6261
|
+
},
|
|
6262
|
+
{
|
|
6263
|
+
id: 'changelog_3',
|
|
6264
|
+
title: 'Escalation guidance for complex issues',
|
|
6265
|
+
description: 'New AI-powered escalation guidance helps your team handle complex customer issues more effectively.',
|
|
6266
|
+
tags: ['New feature', 'AI'],
|
|
6267
|
+
coverImage: 'https://images.unsplash.com/photo-1764773516703-b246ac2ad5ef?w=500&auto=format&fit=crop&q=60',
|
|
6268
|
+
publishedAt: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(),
|
|
6269
|
+
url: '#',
|
|
6270
|
+
},
|
|
6271
|
+
],
|
|
6272
|
+
};
|
|
6273
|
+
}
|
|
6274
|
+
|
|
6275
|
+
try {
|
|
6276
|
+
const response = await this.apiService.getChangelogs({ limit: 20 });
|
|
6277
|
+
|
|
6278
|
+
if (response.success && response.data) {
|
|
6279
|
+
const changelogs = Array.isArray(response.data) ? response.data : [];
|
|
6280
|
+
|
|
6281
|
+
const mappedItems = changelogs.map((item) => ({
|
|
6282
|
+
id: item.id,
|
|
6283
|
+
title: item.title,
|
|
6284
|
+
description: item.excerpt || item.description || '',
|
|
6285
|
+
tags: item.labels ? item.labels.map((label) => label.name) : [],
|
|
6286
|
+
coverImage: item.cover_image || null,
|
|
6287
|
+
publishedAt: item.published_at,
|
|
6288
|
+
url: item.slug ? `/changelog/${item.slug}` : null,
|
|
6289
|
+
}));
|
|
6290
|
+
|
|
6291
|
+
return {
|
|
6292
|
+
homeItems: mappedItems.slice(0, 3),
|
|
6293
|
+
changelogItems: mappedItems,
|
|
6294
|
+
};
|
|
6295
|
+
}
|
|
6296
|
+
|
|
6297
|
+
return { homeItems: [], changelogItems: [] };
|
|
6298
|
+
} catch (error) {
|
|
6299
|
+
console.error('[MessengerWidget] Failed to fetch changelog:', error);
|
|
6300
|
+
return { homeItems: [], changelogItems: [] };
|
|
6301
|
+
}
|
|
6302
|
+
}
|
|
6316
6303
|
|
|
6317
6304
|
async onMount() {
|
|
6318
6305
|
this.loadInitialData();
|
|
@@ -8806,6 +8793,7 @@
|
|
|
8806
8793
|
transform: translateX(calc(100% + 24px));
|
|
8807
8794
|
transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
8808
8795
|
font-family: inherit;
|
|
8796
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
|
|
8809
8797
|
}
|
|
8810
8798
|
|
|
8811
8799
|
.feedback-panel.open {
|
|
@@ -8818,7 +8806,6 @@
|
|
|
8818
8806
|
display: flex;
|
|
8819
8807
|
flex-direction: column;
|
|
8820
8808
|
border-radius: var(--radius-2xl);
|
|
8821
|
-
box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
|
|
8822
8809
|
}
|
|
8823
8810
|
|
|
8824
8811
|
.feedback-panel-header {
|
|
@@ -10460,7 +10447,7 @@
|
|
|
10460
10447
|
z-index: var(--z-modal);
|
|
10461
10448
|
background: var(--color-white);
|
|
10462
10449
|
border-radius: var(--radius-2xl);
|
|
10463
|
-
box-shadow:
|
|
10450
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
|
|
10464
10451
|
padding: var(--spacing-6);
|
|
10465
10452
|
min-width: 320px;
|
|
10466
10453
|
max-width: 400px;
|