@product7/feedback-sdk 1.7.7 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@product7/feedback-sdk",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
4
4
  "description": "JavaScript SDK for integrating Product7 feedback widgets into any website",
5
5
  "main": "dist/feedback-sdk.js",
6
6
  "module": "src/index.js",
@@ -410,10 +410,12 @@ export class FeedbackSDK {
410
410
  return 'nps';
411
411
  }
412
412
 
413
+ const lowLabel = (ratingConfig.low_label || '').toLowerCase();
413
414
  if (
414
- surveyType === 'emoji' ||
415
+ surveyType === 'ces' ||
415
416
  title.includes('effort') ||
416
- title.includes('easy')
417
+ title.includes('easy') ||
418
+ lowLabel.includes('difficult')
417
419
  ) {
418
420
  return 'ces';
419
421
  }
@@ -251,11 +251,11 @@ export class SurveyWidget extends BaseWidget {
251
251
  title: this.surveyOptions.title || '',
252
252
  description: cesPrompt,
253
253
  html: `
254
- <div class="feedback-survey-ces">
254
+ <div class="feedback-survey-ces-list">
255
255
  ${['Very Difficult', 'Difficult', 'Neutral', 'Easy', 'Very Easy']
256
256
  .map(
257
257
  (label, i) => `
258
- <button class="feedback-survey-ces-btn" data-score="${i + 1}">${label}</button>
258
+ <button class="feedback-survey-ces-btn feedback-survey-ces-list-btn" data-score="${i + 1}">${label}</button>
259
259
  `
260
260
  )
261
261
  .join('')}