@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@product7/product7-js",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "JavaScript SDK for integrating Product7 feedback widgets into any website",
5
5
  "main": "dist/product7-js.js",
6
6
  "module": "src/index.js",
@@ -30,9 +30,9 @@ export class FeedbackService {
30
30
  content: feedbackData.content,
31
31
  attachments: feedbackData.attachments || [],
32
32
  ...(contact?.contactId && {
33
- contact_id: contact.contactId,
33
+ contact_id: contact.contactId,
34
34
  contact_email: contact.contactEmail,
35
- contact_name: contact.contactName,
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: contact.contactId,
92
+ contact_id: contact.contactId,
93
93
  contact_email: contact.contactEmail,
94
- contact_name: contact.contactName,
94
+ contact_name: contact.contactName,
95
95
  }),
96
96
  };
97
97
 
@@ -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 !== false,
446
+ required: page.required === true,
445
447
  position: page.position ?? index,
446
448
  ratingConfig: page.ratingConfig || page.rating_config || null,
447
449
  multipleChoiceConfig: