@product7/feedback-sdk 1.7.2 → 1.7.4
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
|
@@ -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] ||
|
|
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
|
|
388
|
+
return null;
|
|
388
389
|
}
|
|
389
390
|
|
|
390
391
|
return {
|
|
391
|
-
title: page.title ||
|
|
392
|
-
description: page.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
|
|
409
|
+
return '';
|
|
417
410
|
}
|
|
418
411
|
}
|
|
419
412
|
|