@product7/feedback-sdk 1.7.2 → 1.7.5

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.2",
3
+ "version": "1.7.5",
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",
@@ -533,7 +533,9 @@ export const surveyStyles = `
533
533
  SUBMIT & FEEDBACK
534
534
  ======================================== */
535
535
 
536
- .feedback-survey-submit {
536
+ .feedback-survey-submit,
537
+ .feedback-survey-link-btn {
538
+ display: block;
537
539
  width: 100%;
538
540
  padding: var(--spacing-3);
539
541
  background: var(--color-primary);
@@ -544,12 +546,17 @@ export const surveyStyles = `
544
546
  font-weight: var(--font-weight-medium);
545
547
  cursor: pointer;
546
548
  font-family: inherit;
549
+ text-align: center;
550
+ text-decoration: none;
547
551
  transition: all var(--transition-base);
548
552
  }
549
553
 
550
- .feedback-survey-submit:hover {
554
+ .feedback-survey-submit:hover,
555
+ .feedback-survey-link-btn:hover {
551
556
  background: var(--color-primary-hover);
552
557
  border-color: var(--color-primary-hover);
558
+ color: var(--color-white);
559
+ text-decoration: none;
553
560
  }
554
561
 
555
562
  .feedback-survey-error {
@@ -106,6 +106,7 @@ export class SurveyWidget extends BaseWidget {
106
106
  this._closeSurvey(false);
107
107
 
108
108
  const config = this._getSurveyConfig();
109
+ if (!config) return;
109
110
  const isMultiPage = this._isMultiPageSurvey();
110
111
  const isLastPage = this._isLastPage();
111
112
  const showFeedbackInput = this._shouldShowFeedbackInput();
@@ -270,7 +271,7 @@ export class SurveyWidget extends BaseWidget {
270
271
  },
271
272
  };
272
273
 
273
- return configs[this.surveyOptions.surveyType] || configs.nps;
274
+ return configs[this.surveyOptions.surveyType] || null;
274
275
  }
275
276
 
276
277
  _getNPSScale() {
@@ -384,24 +385,16 @@ export class SurveyWidget extends BaseWidget {
384
385
  _getCurrentPageConfig() {
385
386
  const page = this._getCurrentPage();
386
387
  if (!page) {
387
- return this._getFallbackSurveyConfig();
388
+ return null;
388
389
  }
389
390
 
390
391
  return {
391
- title: page.title || this.surveyOptions.title || 'Quick Feedback',
392
- description: page.description || this.surveyOptions.description || '',
392
+ title: page.title || '',
393
+ description: page.description || '',
393
394
  html: this._renderSurveyPage(page),
394
395
  };
395
396
  }
396
397
 
397
- _getFallbackSurveyConfig() {
398
- return {
399
- title: this.surveyOptions.title || 'Quick Feedback',
400
- description: this.surveyOptions.description || '',
401
- html: this._renderCustomQuestions(),
402
- };
403
- }
404
-
405
398
  _renderSurveyPage(page) {
406
399
  switch (page.type) {
407
400
  case 'rating':
@@ -413,7 +406,7 @@ export class SurveyWidget extends BaseWidget {
413
406
  case 'link':
414
407
  return this._renderLinkPage(page);
415
408
  default:
416
- return this._renderTextPage(page);
409
+ return '';
417
410
  }
418
411
  }
419
412