@product7/product7-js 0.5.0 → 0.5.1
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
package/src/core/Product7.js
CHANGED
|
@@ -456,6 +456,7 @@ export class Product7 {
|
|
|
456
456
|
page.multipleChoiceConfig || page.multiple_choice_config || null,
|
|
457
457
|
linkConfig: page.linkConfig || page.link_config || null,
|
|
458
458
|
afterThisPage: page.afterThisPage || page.after_this_page || null,
|
|
459
|
+
thankYouConfig: page.thankYouConfig || page.thank_you_config || null,
|
|
459
460
|
}))
|
|
460
461
|
.sort((a, b) => a.position - b.position);
|
|
461
462
|
}
|
package/src/styles/survey.js
CHANGED
|
@@ -508,6 +508,12 @@ export const surveyStyles = `
|
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
.feedback-survey-page-choice-btn.selected::after {
|
|
511
|
+
content: '✓';
|
|
512
|
+
color: #ffffff;
|
|
513
|
+
font-size: 11px;
|
|
514
|
+
font-weight: 700;
|
|
515
|
+
line-height: 18px;
|
|
516
|
+
text-align: center;
|
|
511
517
|
border-color: var(--color-primary);
|
|
512
518
|
background-color: var(--color-primary);
|
|
513
519
|
}
|
|
@@ -1221,7 +1221,17 @@ export class SurveyWidget extends BaseWidget {
|
|
|
1221
1221
|
_showThankYouScreen(onAfterClose) {
|
|
1222
1222
|
if (!this.surveyElement) return;
|
|
1223
1223
|
|
|
1224
|
-
const
|
|
1224
|
+
const pages = this.surveyOptions.pages || [];
|
|
1225
|
+
const currentPage =
|
|
1226
|
+
pages[this.surveyState.currentPageIndex] ||
|
|
1227
|
+
pages[pages.length - 1] ||
|
|
1228
|
+
null;
|
|
1229
|
+
const pageConfig = currentPage?.thankYouConfig || null;
|
|
1230
|
+
const surveyConfig = this.surveyOptions.thankYouConfig || null;
|
|
1231
|
+
const config =
|
|
1232
|
+
(pageConfig?.title ? pageConfig : null) ||
|
|
1233
|
+
(surveyConfig?.title ? surveyConfig : null) ||
|
|
1234
|
+
{};
|
|
1225
1235
|
const title = config.title || 'Thanks for your feedback!';
|
|
1226
1236
|
const buttonText = config.button_text || null;
|
|
1227
1237
|
const buttonUrl = config.button_url || '#';
|