@product7/product7-js 0.4.2 → 0.4.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/README.md +4 -3
- package/dist/README.md +4 -3
- package/dist/product7-js.js +493 -728
- package/dist/product7-js.js.map +1 -1
- package/dist/product7-js.min.js +1 -1
- package/dist/product7-js.min.js.map +1 -1
- package/package.json +1 -1
- package/src/api/services/FeedbackService.js +2 -2
- package/src/api/services/SurveyService.js +2 -2
- package/src/core/Product7.js +3 -1
- package/src/styles/survey.js +182 -347
- package/src/widgets/MessengerWidget.js +9 -5
- package/src/widgets/SurveyWidget.js +149 -225
package/package.json
CHANGED
|
@@ -30,9 +30,9 @@ export class FeedbackService {
|
|
|
30
30
|
content: feedbackData.content,
|
|
31
31
|
attachments: feedbackData.attachments || [],
|
|
32
32
|
...(contact?.contactId && {
|
|
33
|
-
contact_id:
|
|
33
|
+
contact_id: contact.contactId,
|
|
34
34
|
contact_email: contact.contactEmail,
|
|
35
|
-
contact_name:
|
|
35
|
+
contact_name: contact.contactName,
|
|
36
36
|
}),
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -89,9 +89,9 @@ export class SurveyService {
|
|
|
89
89
|
}),
|
|
90
90
|
...(respondent.email && { email: respondent.email }),
|
|
91
91
|
...(contact?.contactId && {
|
|
92
|
-
contact_id:
|
|
92
|
+
contact_id: contact.contactId,
|
|
93
93
|
contact_email: contact.contactEmail,
|
|
94
|
-
contact_name:
|
|
94
|
+
contact_name: contact.contactName,
|
|
95
95
|
}),
|
|
96
96
|
};
|
|
97
97
|
|
package/src/core/Product7.js
CHANGED
|
@@ -282,6 +282,7 @@ export class Product7 {
|
|
|
282
282
|
showDescription: normalizedOptions.showDescription,
|
|
283
283
|
customQuestions: normalizedOptions.customQuestions,
|
|
284
284
|
pages: normalizedOptions.pages,
|
|
285
|
+
thankYouConfig: normalizedOptions.thankYouConfig,
|
|
285
286
|
respondentId: normalizedOptions.respondentId,
|
|
286
287
|
email: normalizedOptions.email,
|
|
287
288
|
onSubmit: normalizedOptions.onSubmit,
|
|
@@ -425,6 +426,7 @@ export class Product7 {
|
|
|
425
426
|
survey.custom_questions ||
|
|
426
427
|
survey.questions ||
|
|
427
428
|
[],
|
|
429
|
+
thankYouConfig: survey.thankYouConfig || survey.thank_you_config || null,
|
|
428
430
|
pages: this._normalizeSurveyPages(survey.pages || []),
|
|
429
431
|
};
|
|
430
432
|
}
|
|
@@ -441,7 +443,7 @@ export class Product7 {
|
|
|
441
443
|
title: page.title || '',
|
|
442
444
|
description: page.description || '',
|
|
443
445
|
placeholder: page.placeholder || '',
|
|
444
|
-
required: page.required
|
|
446
|
+
required: page.required === true,
|
|
445
447
|
position: page.position ?? index,
|
|
446
448
|
ratingConfig: page.ratingConfig || page.rating_config || null,
|
|
447
449
|
multipleChoiceConfig:
|