react-feedback-surveys 1.6.1 → 1.7.0

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/dist/index.js CHANGED
@@ -9,7 +9,7 @@ function s(...e) {
9
9
  };
10
10
  return e.forEach(n), t.join(" ");
11
11
  }
12
- var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) => /* @__PURE__ */ t("div", {
12
+ var c = { base: "_base_d5qlz_1" }, l = ({ className: e, children: n, ...r }) => /* @__PURE__ */ t("div", {
13
13
  className: s(c.base, e),
14
14
  ...r,
15
15
  children: n
@@ -36,71 +36,133 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
36
36
  })]
37
37
  })
38
38
  }), f = {
39
- choices: "_choices_f81xp_1",
40
- choice: "_choice_f81xp_1",
41
- label: "_label_f81xp_12",
42
- sr: "_sr_f81xp_21",
43
- checkbox: "_checkbox_f81xp_33",
44
- check: "_check_f81xp_33",
45
- input: "_input_f81xp_70",
46
- textarea: "_textarea_f81xp_75",
47
- invalid: "_invalid_f81xp_98",
48
- submit: "_submit_f81xp_103",
49
- success: "_success_f81xp_135"
50
- }, p = ({ buttonLabel: a = "Submit", responseType: s, choiceOptions: c, onSubmit: l }) => {
51
- let u = i(), [d, p] = o(""), [m, h] = o([]), [g, _] = o(!1), v = r((e) => {
39
+ sr: "_sr_clg7k_1",
40
+ subtext: "_subtext_clg7k_13",
41
+ input: "_input_clg7k_18",
42
+ invalid: "_invalid_clg7k_35",
43
+ submit: "_submit_clg7k_42",
44
+ skip: "_skip_clg7k_74"
45
+ }, p = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, m = ({ subtext: e, buttonSendLabel: a = "Send", buttonSkipLabel: s = "Skip", onSubmit: c }) => {
46
+ let l = i(), [u, d] = o(""), [m, h] = o(!1), g = r((e) => {
52
47
  e.stopPropagation();
53
- }, []), y = r((e) => {
54
- p(e.currentTarget.value), g && _(!1);
55
- }, [g]), b = r((e) => {
56
- let { value: t, checked: n } = e.currentTarget;
57
- h((e) => n ? [...e, t] : e.filter((e) => e !== t));
58
- }, []), x = r((e) => {
48
+ }, []), _ = r((e) => {
49
+ d(e.currentTarget.value), m && h(!1);
50
+ }, [m]), v = r((e) => {
59
51
  e.preventDefault();
60
- let t = d.trim();
61
- if (s === "choices") {
62
- l?.([...m, t].filter(Boolean));
52
+ let t = u.trim();
53
+ if (!t || !p.test(t)) {
54
+ h(!0);
63
55
  return;
64
56
  }
65
- if (s === "text" && !t) {
66
- _(!0);
57
+ c?.(t);
58
+ }, [u, c]), y = r(() => {
59
+ c?.(void 0);
60
+ }, [c]), b = `${l}-contact-input`;
61
+ return /* @__PURE__ */ n("form", {
62
+ "aria-label": "Contact form",
63
+ className: f.base,
64
+ noValidate: !0,
65
+ onSubmit: v,
66
+ children: [
67
+ /* @__PURE__ */ t("label", {
68
+ htmlFor: b,
69
+ className: f.sr,
70
+ children: "Email address"
71
+ }),
72
+ !!e && /* @__PURE__ */ t("div", {
73
+ className: f.subtext,
74
+ children: e
75
+ }),
76
+ /* @__PURE__ */ t("input", {
77
+ "aria-label": "Email address",
78
+ "aria-invalid": m,
79
+ className: `${f.input} ${m ? f.invalid : ""}`,
80
+ id: b,
81
+ maxLength: 254,
82
+ name: "email",
83
+ placeholder: "your@email.com",
84
+ type: "email",
85
+ value: u,
86
+ onChange: _,
87
+ onKeyDown: g
88
+ }),
89
+ /* @__PURE__ */ t("button", {
90
+ className: f.submit,
91
+ type: "submit",
92
+ children: a
93
+ }),
94
+ /* @__PURE__ */ t("button", {
95
+ className: f.skip,
96
+ type: "button",
97
+ onClick: y,
98
+ children: s
99
+ })
100
+ ]
101
+ });
102
+ }, h = {
103
+ choices: "_choices_nhux3_1",
104
+ choice: "_choice_nhux3_1",
105
+ label: "_label_nhux3_12",
106
+ sr: "_sr_nhux3_21",
107
+ checkbox: "_checkbox_nhux3_33",
108
+ check: "_check_nhux3_33",
109
+ input: "_input_nhux3_74",
110
+ textarea: "_textarea_nhux3_79",
111
+ submit: "_submit_nhux3_104",
112
+ skip: "_skip_nhux3_136",
113
+ success: "_success_nhux3_166"
114
+ }, g = ({ buttonSendLabel: a = "Submit", buttonSkipLabel: s = "Skip", responseType: c, choiceOptions: l, onSubmit: u }) => {
115
+ let d = i(), [f, p] = o(""), [m, g] = o([]), _ = r((e) => {
116
+ e.stopPropagation();
117
+ }, []), v = r((e) => {
118
+ p(e.currentTarget.value);
119
+ }, []), y = r((e) => {
120
+ let { value: t, checked: n } = e.currentTarget;
121
+ g((e) => n ? [...e, t] : e.filter((e) => e !== t));
122
+ }, []), b = r((e) => {
123
+ e.preventDefault();
124
+ let t = f.trim();
125
+ if (c === "choices") {
126
+ u?.([...m, t].filter(Boolean));
67
127
  return;
68
128
  }
69
- l?.(d.trim());
129
+ u?.(f.trim());
70
130
  }, [
71
- d,
72
- s,
131
+ f,
132
+ c,
73
133
  m,
74
- l
75
- ]);
76
- if (!s) return null;
77
- let S = `${u}-feedback-textarea`, C = `${u}-feedback-input`, w = `${u}-feedback-choices`;
134
+ u
135
+ ]), x = r(() => {
136
+ u?.(void 0);
137
+ }, [u]);
138
+ if (!c) return null;
139
+ let S = `${d}-feedback-textarea`, C = `${d}-feedback-input`, w = `${d}-feedback-choices`;
78
140
  return /* @__PURE__ */ n("form", {
79
141
  "aria-label": "Feedback form",
80
- className: f.base,
142
+ className: h.base,
81
143
  noValidate: !0,
82
- onSubmit: x,
144
+ onSubmit: b,
83
145
  children: [
84
- s === "choices" && /* @__PURE__ */ t("div", {
85
- className: f.choices,
146
+ c === "choices" && /* @__PURE__ */ t("div", {
147
+ className: h.choices,
86
148
  id: w,
87
- children: c?.map((e) => /* @__PURE__ */ t("div", {
88
- className: f.choice,
149
+ children: l?.map((e) => /* @__PURE__ */ t("div", {
150
+ className: h.choice,
89
151
  children: /* @__PURE__ */ n("label", {
90
- className: f.label,
152
+ className: h.label,
91
153
  children: [
92
154
  /* @__PURE__ */ t("input", {
93
155
  "aria-label": e,
94
- className: f.checkbox,
156
+ className: h.checkbox,
95
157
  checked: m.includes(e),
96
158
  name: "feedback",
97
159
  type: "checkbox",
98
160
  value: e,
99
- onChange: b,
100
- onKeyDown: v
161
+ onChange: y,
162
+ onKeyDown: _
101
163
  }),
102
164
  /* @__PURE__ */ t("span", {
103
- className: f.check,
165
+ className: h.check,
104
166
  "aria-hidden": "true"
105
167
  }),
106
168
  e
@@ -108,46 +170,50 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
108
170
  })
109
171
  }, e))
110
172
  }),
111
- s === "choices" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("label", {
173
+ c === "choices" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("label", {
112
174
  htmlFor: C,
113
- className: f.sr,
175
+ className: h.sr,
114
176
  children: "Additional feedback"
115
177
  }), /* @__PURE__ */ t("input", {
116
178
  "aria-label": "Additional feedback",
117
179
  "aria-describedby": w,
118
- className: f.input,
180
+ className: h.input,
119
181
  id: C,
120
182
  maxLength: 1e3,
121
183
  name: "feedback",
122
184
  placeholder: "Other",
123
- value: d,
124
- onChange: y
185
+ value: f,
186
+ onChange: v
125
187
  })] }),
126
- s === "text" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("label", {
188
+ c === "text" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("label", {
127
189
  htmlFor: S,
128
- className: f.sr,
190
+ className: h.sr,
129
191
  children: "Your feedback"
130
192
  }), /* @__PURE__ */ t("textarea", {
131
193
  "aria-label": "Your feedback",
132
- "aria-required": "true",
133
- "aria-invalid": g,
134
- className: `${f.textarea} ${g ? f.invalid : ""}`,
194
+ className: h.textarea,
135
195
  id: S,
136
196
  maxLength: 1e3,
137
197
  name: "feedback",
138
198
  rows: 4,
139
- value: d,
140
- onChange: y,
141
- onKeyDown: v
199
+ value: f,
200
+ onChange: v,
201
+ onKeyDown: _
142
202
  })] }),
143
203
  /* @__PURE__ */ t("button", {
144
- className: f.submit,
204
+ className: h.submit,
145
205
  type: "submit",
146
206
  children: a
207
+ }),
208
+ /* @__PURE__ */ t("button", {
209
+ className: h.skip,
210
+ type: "button",
211
+ onClick: x,
212
+ children: s
147
213
  })
148
214
  ]
149
215
  });
150
- }, m = (e) => /* @__PURE__ */ n("svg", {
216
+ }, _ = (e) => /* @__PURE__ */ n("svg", {
151
217
  xmlns: "http://www.w3.org/2000/svg",
152
218
  viewBox: "0 0 512 512",
153
219
  ...e,
@@ -185,133 +251,188 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
185
251
  d: "M434.8 62.8a10.9 10.9 0 1 1-21.7 0 10.9 10.9 0 0 1 21.7 0zm-388.5-51a10.9 10.9 0 1 0 0 21.9 10.9 10.9 0 0 0 0-21.8zM217 154c1.2-2.5 2.8-5.2 4.4-8.1 8.1-14.8 19.3-35 20-58.6.8-28.3-14-54-43.9-76.4a11.7 11.7 0 1 0-14 18.8c23.7 17.8 35 36.4 34.4 57-.5 17.8-9.7 34.5-17 47.8-1.8 3.1-3.4 6-4.8 8.8a11.7 11.7 0 0 0 21 10.7z"
186
252
  })
187
253
  ]
188
- }), h = {
254
+ }), v = {
189
255
  base: "_base_1ilpx_1",
190
256
  icon: "_icon_1ilpx_6"
191
- }, g = () => /* @__PURE__ */ t("div", {
192
- className: h.base,
193
- children: /* @__PURE__ */ t(m, {
257
+ }, y = () => /* @__PURE__ */ t("div", {
258
+ className: v.base,
259
+ children: /* @__PURE__ */ t(_, {
194
260
  "aria-hidden": "true",
195
- className: h.icon,
261
+ className: v.icon,
196
262
  width: 84,
197
263
  height: 84
198
264
  })
199
- }), _ = {
265
+ }), b = {
200
266
  base: "_base_1xpqq_1",
201
267
  head: "_head_1xpqq_7",
202
268
  title: "_title_1xpqq_14"
203
- }, v = ({ children: e, className: r, classNames: a, dir: o, question: c, textQuestion: l, textButtonLabel: u, responseType: d, choiceOptions: f, thankYouMessage: m, screen: h, onFeedback: v }) => {
204
- let y = i();
269
+ }, x = ({ children: e, className: r, classNames: a, dir: o, question: c, textQuestion: l, textButtonSendLabel: u, textButtonSkipLabel: d, responseType: f, choiceOptions: p, thankYouMessage: h, contactQuestion: _, contactSubtext: v, contactButtonSendLabel: x, contactButtonSkipLabel: S, screen: C, onFeedback: w, onContact: T }) => {
270
+ let E = i();
205
271
  return /* @__PURE__ */ n("div", {
206
- className: s(_.base, r, a?.base, a?.[h]),
272
+ className: s(b.base, r, a?.base, a?.[C]),
207
273
  dir: o,
208
274
  children: [
209
275
  /* @__PURE__ */ t("div", {
210
- className: s(_.head, a?.head),
276
+ className: s(b.head, a?.head),
211
277
  children: /* @__PURE__ */ n("div", {
212
278
  "aria-level": 2,
213
- id: y,
214
- className: s(_.title, a?.title),
279
+ id: E,
280
+ className: s(b.title, a?.title),
215
281
  role: "heading",
216
282
  children: [
217
- h === "rating" && c,
218
- h === "feedback" && l,
219
- h === "success" && m
283
+ C === "rating" && c,
284
+ C === "feedback" && l,
285
+ C === "contact" && _,
286
+ C === "success" && h
220
287
  ]
221
288
  })
222
289
  }),
223
- h === "rating" && /* @__PURE__ */ t("div", {
290
+ C === "rating" && /* @__PURE__ */ t("div", {
224
291
  "aria-label": "Rating selection",
225
- "aria-labelledby": y,
226
- className: s(_.body, a?.body),
292
+ "aria-labelledby": E,
293
+ className: s(b.body, a?.body),
227
294
  role: "region",
228
295
  children: e
229
296
  }),
230
- h === "feedback" && /* @__PURE__ */ t("div", {
297
+ C === "feedback" && /* @__PURE__ */ t("div", {
231
298
  "aria-label": "Feedback form",
232
- "aria-labelledby": y,
233
- className: s(_.body, a?.body),
299
+ "aria-labelledby": E,
300
+ className: s(b.body, a?.body),
301
+ role: "region",
302
+ children: /* @__PURE__ */ t(g, {
303
+ buttonSendLabel: u,
304
+ buttonSkipLabel: d,
305
+ choiceOptions: p,
306
+ responseType: f,
307
+ onSubmit: w
308
+ })
309
+ }),
310
+ C === "contact" && /* @__PURE__ */ t("div", {
311
+ "aria-label": "Contact form",
312
+ "aria-labelledby": E,
313
+ className: s(b.body, a?.body),
234
314
  role: "region",
235
- children: /* @__PURE__ */ t(p, {
236
- buttonLabel: u,
237
- choiceOptions: f,
238
- responseType: d,
239
- onSubmit: v
315
+ children: /* @__PURE__ */ t(m, {
316
+ buttonSendLabel: x,
317
+ buttonSkipLabel: S,
318
+ subtext: v,
319
+ onSubmit: T
240
320
  })
241
321
  }),
242
- h === "success" && /* @__PURE__ */ t("div", {
322
+ C === "success" && /* @__PURE__ */ t("div", {
243
323
  "aria-atomic": "true",
244
324
  "aria-live": "polite",
245
- "aria-label": m,
246
- "aria-labelledby": y,
247
- className: s(_.body, a?.body),
325
+ "aria-label": h,
326
+ "aria-labelledby": E,
327
+ className: s(b.body, a?.body),
248
328
  tabIndex: -1,
249
329
  role: "status",
250
- children: /* @__PURE__ */ t(g, {})
330
+ children: /* @__PURE__ */ t(y, {})
251
331
  })
252
332
  ]
253
333
  });
254
- }, y = ({ responseType: e, onScoreSubmit: t, onFeedbackSubmit: n }) => {
255
- let [i, s] = o(), [c, l] = o(null), [u, d] = o(!1), [f, p] = o(!1);
334
+ }, S = ({ responseType: e, collectContact: t, userId: n, onScoreSubmit: i, onFeedbackSubmit: s, onContactSubmit: c }) => {
335
+ let [l, u] = o(), [d, f] = o(), [p, m] = o(null), [h, g] = o(!1), [_, v] = o(!1), [y, b] = o(!1), x = !!t && !n, S = a(() => _ ? "success" : h ? "contact" : typeof l == "number" ? "feedback" : "rating", [
336
+ l,
337
+ h,
338
+ _
339
+ ]), C = r(() => {
340
+ x ? g(!0) : v(!0);
341
+ }, [x]);
256
342
  return {
257
- error: c,
258
- value: i,
259
- screen: a(() => u ? "success" : typeof i == "number" ? "feedback" : "rating", [i, u]),
260
- isLoading: f,
261
- isSuccess: u,
262
- onScoreChange: r(async (n) => {
263
- if (s(n), l(null), t) {
264
- p(!0);
343
+ error: p,
344
+ value: l,
345
+ screen: S,
346
+ isLoading: y,
347
+ isSuccess: _,
348
+ onScoreChange: r(async (t) => {
349
+ if (u(t), m(null), i) {
350
+ b(!0);
265
351
  try {
266
- await t({ value: n }), d(!e);
352
+ await i({ value: t }), e || C();
267
353
  } catch (e) {
268
- l(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to submit"));
354
+ m(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to submit"));
269
355
  } finally {
270
- p(!1);
356
+ b(!1);
271
357
  }
272
- } else d(!e);
273
- }, [e, t]),
358
+ } else e || C();
359
+ }, [
360
+ e,
361
+ i,
362
+ C
363
+ ]),
274
364
  onFeedbackChange: r(async (e) => {
275
- if (!e?.length) return;
276
- l(null);
365
+ if (!e?.length) {
366
+ C();
367
+ return;
368
+ }
369
+ m(null);
277
370
  let t = Array.isArray(e) ? e.join(";\n") : e;
278
- if (n) {
279
- p(!0);
371
+ if (f(t), s) {
372
+ b(!0);
280
373
  try {
281
- await n({
282
- value: i,
374
+ await s({
375
+ value: l,
283
376
  text: t
284
- }), d(!0);
377
+ }), C();
378
+ } catch (e) {
379
+ m(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to submit"));
380
+ } finally {
381
+ b(!1);
382
+ }
383
+ } else C();
384
+ }, [
385
+ l,
386
+ s,
387
+ C
388
+ ]),
389
+ onContactChange: r(async (e) => {
390
+ if (m(null), !e) {
391
+ v(!0);
392
+ return;
393
+ }
394
+ if (c) {
395
+ b(!0);
396
+ try {
397
+ await c({
398
+ value: l,
399
+ text: d,
400
+ email: e
401
+ }), v(!0);
285
402
  } catch (e) {
286
- l(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to submit"));
403
+ m(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to submit"));
287
404
  } finally {
288
- p(!1);
405
+ b(!1);
289
406
  }
290
- } else d(!0);
291
- }, [i, n])
407
+ } else v(!0);
408
+ }, [
409
+ l,
410
+ d,
411
+ c
412
+ ])
292
413
  };
293
- }, b = {
294
- base: "_base_1e603_1",
295
- label: "_label_1e603_6",
296
- between: "_between_1e603_14",
297
- center: "_center_1e603_28",
298
- text: "_text_1e603_40"
299
- }, x = ({ className: e, classNames: r, minLabel: i, maxLabel: a, placement: o = "between" }) => /* @__PURE__ */ n("div", {
300
- className: s(b.base, b[o], r?.base, e),
414
+ }, C = {
415
+ base: "_base_nswpf_1",
416
+ label: "_label_nswpf_6",
417
+ between: "_between_nswpf_15",
418
+ center: "_center_nswpf_29",
419
+ text: "_text_nswpf_41"
420
+ }, w = ({ className: e, classNames: r, minLabel: i, maxLabel: a, placement: o = "between" }) => /* @__PURE__ */ n("div", {
421
+ className: s(C.base, C[o], r?.base, e),
301
422
  children: [/* @__PURE__ */ t("div", {
302
- className: s(b.label, r?.label),
423
+ className: s(C.label, r?.label),
303
424
  children: /* @__PURE__ */ t("span", {
304
- className: b.text,
425
+ className: C.text,
305
426
  children: i
306
427
  })
307
428
  }), /* @__PURE__ */ t("div", {
308
- className: s(b.label, r?.label),
429
+ className: s(C.label, r?.label),
309
430
  children: /* @__PURE__ */ t("span", {
310
- className: b.text,
431
+ className: C.text,
311
432
  children: a
312
433
  })
313
434
  })]
314
- }), S = (e) => /* @__PURE__ */ n("svg", {
435
+ }), T = (e) => /* @__PURE__ */ n("svg", {
315
436
  xmlns: "http://www.w3.org/2000/svg",
316
437
  width: 40,
317
438
  height: 40,
@@ -493,7 +614,7 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
493
614
  })
494
615
  ] })
495
616
  ]
496
- }), C = (e) => /* @__PURE__ */ n("svg", {
617
+ }), E = (e) => /* @__PURE__ */ n("svg", {
497
618
  xmlns: "http://www.w3.org/2000/svg",
498
619
  width: 40,
499
620
  height: 40,
@@ -675,47 +796,47 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
675
796
  })
676
797
  ] })
677
798
  ]
678
- }), w = {
799
+ }), D = {
679
800
  list: "_list_grany_1",
680
801
  icon: "_icon_grany_7",
681
802
  button: "_button_grany_12"
682
- }, ee = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
803
+ }, O = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
683
804
  let c = [[
684
- S,
805
+ T,
685
806
  0,
686
807
  i ?? "Dissatisfied"
687
808
  ], [
688
- C,
809
+ E,
689
810
  1,
690
811
  a ?? "Satisfied"
691
812
  ]], l = r((e) => {
692
813
  o(Number(e.currentTarget.value));
693
814
  }, [o]);
694
815
  return /* @__PURE__ */ n("div", {
695
- className: s(w.base, e?.base),
816
+ className: s(D.base, e?.base),
696
817
  children: [/* @__PURE__ */ t("div", {
697
- className: s(w.list, e?.list),
818
+ className: s(D.list, e?.list),
698
819
  children: c.map(([n, r, i]) => /* @__PURE__ */ t("button", {
699
820
  "aria-label": i,
700
- className: s(w.button, e?.button),
821
+ className: s(D.button, e?.button),
701
822
  type: "button",
702
823
  value: r,
703
824
  onClick: l,
704
825
  children: /* @__PURE__ */ t(n, {
705
826
  "aria-hidden": "true",
706
- className: s(w.icon, e?.icon),
827
+ className: s(D.icon, e?.icon),
707
828
  width: 32,
708
829
  height: 32
709
830
  })
710
831
  }, r))
711
- }), !!i && !!a && /* @__PURE__ */ t(x, {
712
- className: s(w.labels, e?.labels),
832
+ }), !!i && !!a && /* @__PURE__ */ t(w, {
833
+ className: s(D.labels, e?.labels),
713
834
  minLabel: i,
714
835
  maxLabel: a,
715
836
  placement: "center"
716
837
  })]
717
838
  });
718
- }, T = (e) => /* @__PURE__ */ n("svg", {
839
+ }, k = (e) => /* @__PURE__ */ n("svg", {
719
840
  xmlns: "http://www.w3.org/2000/svg",
720
841
  width: 40,
721
842
  height: 40,
@@ -1497,7 +1618,7 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
1497
1618
  })
1498
1619
  ] })
1499
1620
  ]
1500
- }), E = (e) => /* @__PURE__ */ n("svg", {
1621
+ }), A = (e) => /* @__PURE__ */ n("svg", {
1501
1622
  xmlns: "http://www.w3.org/2000/svg",
1502
1623
  width: 40,
1503
1624
  height: 40,
@@ -2275,87 +2396,98 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
2275
2396
  })
2276
2397
  ] })
2277
2398
  ]
2278
- }), D = {
2399
+ }), j = {
2279
2400
  list: "_list_1yzyr_1",
2280
2401
  icon: "_icon_1yzyr_7",
2281
2402
  button: "_button_1yzyr_12"
2282
- }, O = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
2403
+ }, M = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
2283
2404
  let c = [[
2284
- T,
2405
+ k,
2285
2406
  0,
2286
2407
  i ?? "Thumbs down"
2287
2408
  ], [
2288
- E,
2409
+ A,
2289
2410
  1,
2290
2411
  a ?? "Thumbs up"
2291
2412
  ]], l = r((e) => {
2292
2413
  o(Number(e.currentTarget.value));
2293
2414
  }, [o]);
2294
2415
  return /* @__PURE__ */ n("div", {
2295
- className: s(D.base, e?.base),
2416
+ className: s(j.base, e?.base),
2296
2417
  children: [/* @__PURE__ */ t("div", {
2297
- className: s(D.list, e?.list),
2418
+ className: s(j.list, e?.list),
2298
2419
  children: c.map(([n, r, i]) => /* @__PURE__ */ t("button", {
2299
2420
  "aria-label": i,
2300
- className: s(D.button, e?.button),
2421
+ className: s(j.button, e?.button),
2301
2422
  type: "button",
2302
2423
  value: r,
2303
2424
  onClick: l,
2304
2425
  children: /* @__PURE__ */ t(n, {
2305
2426
  "aria-hidden": "true",
2306
- className: s(D.icon, e?.icon),
2427
+ className: s(j.icon, e?.icon),
2307
2428
  width: 32,
2308
2429
  height: 32
2309
2430
  })
2310
2431
  }, r))
2311
- }), !!i && !!a && /* @__PURE__ */ t(x, {
2312
- className: s(D.labels, e?.labels),
2432
+ }), !!i && !!a && /* @__PURE__ */ t(w, {
2433
+ className: s(j.labels, e?.labels),
2313
2434
  minLabel: i,
2314
2435
  maxLabel: a,
2315
2436
  placement: "center"
2316
2437
  })]
2317
2438
  });
2318
- }, k = {
2319
- base: "_base_113r0_1",
2320
- rating: "_rating_113r0_5",
2321
- feedback: "_feedback_113r0_6",
2322
- success: "_success_113r0_7"
2323
- }, A = ({ classNames: e, dir: r, scaleStyle: i, question: a, minLabel: o, maxLabel: c, textQuestion: l, textButtonLabel: u, responseType: d, choiceOptions: f, thankYouMessage: p, onScoreSubmit: m, onFeedbackSubmit: h }) => {
2324
- let { screen: g, onScoreChange: _, onFeedbackChange: b } = y({
2325
- responseType: d,
2326
- onScoreSubmit: m,
2327
- onFeedbackSubmit: h
2439
+ }, N = {
2440
+ base: "_base_1nccq_1",
2441
+ rating: "_rating_1nccq_5",
2442
+ feedback: "_feedback_1nccq_6",
2443
+ contact: "_contact_1nccq_7",
2444
+ success: "_success_1nccq_8"
2445
+ }, P = ({ classNames: e, dir: r, scaleStyle: i, question: a, minLabel: o, maxLabel: c, textQuestion: l, textButtonSendLabel: u, textButtonSkipLabel: d, responseType: f, choiceOptions: p, thankYouMessage: m, collectContact: h, userId: g, contactQuestion: _, contactSubtext: v, contactButtonSendLabel: y, contactButtonSkipLabel: b, onScoreSubmit: C, onFeedbackSubmit: w, onContactSubmit: T }) => {
2446
+ let { screen: E, onScoreChange: D, onFeedbackChange: k, onContactChange: A } = S({
2447
+ responseType: f,
2448
+ collectContact: h,
2449
+ userId: g,
2450
+ onScoreSubmit: C,
2451
+ onFeedbackSubmit: w,
2452
+ onContactSubmit: T
2328
2453
  });
2329
- return /* @__PURE__ */ n(v, {
2330
- className: k.base,
2454
+ return /* @__PURE__ */ n(x, {
2455
+ className: N.base,
2331
2456
  classNames: {
2332
2457
  ...e?.base,
2333
- rating: s(k.rating, e?.base?.rating),
2334
- feedback: s(k.feedback, e?.base?.feedback),
2335
- success: s(k.success, e?.base?.success)
2458
+ rating: s(N.rating, e?.base?.rating),
2459
+ feedback: s(N.feedback, e?.base?.feedback),
2460
+ contact: s(N.contact, e?.base?.contact),
2461
+ success: s(N.success, e?.base?.success)
2336
2462
  },
2337
2463
  dir: r,
2338
- screen: g,
2464
+ screen: E,
2339
2465
  question: a,
2340
2466
  textQuestion: l,
2341
- textButtonLabel: u,
2342
- responseType: d,
2343
- choiceOptions: f,
2344
- thankYouMessage: p,
2345
- onFeedback: b,
2346
- children: [i === "emoji" && /* @__PURE__ */ t(ee, {
2467
+ textButtonSendLabel: u,
2468
+ textButtonSkipLabel: d,
2469
+ responseType: f,
2470
+ choiceOptions: p,
2471
+ thankYouMessage: m,
2472
+ contactQuestion: _,
2473
+ contactSubtext: v,
2474
+ contactButtonSendLabel: y,
2475
+ contactButtonSkipLabel: b,
2476
+ onFeedback: k,
2477
+ onContact: A,
2478
+ children: [i === "emoji" && /* @__PURE__ */ t(O, {
2347
2479
  classNames: e?.scale,
2348
2480
  minLabel: o,
2349
2481
  maxLabel: c,
2350
- onChange: _
2351
- }), i === "thumbs" && /* @__PURE__ */ t(O, {
2482
+ onChange: D
2483
+ }), i === "thumbs" && /* @__PURE__ */ t(M, {
2352
2484
  classNames: e?.scale,
2353
2485
  minLabel: o,
2354
2486
  maxLabel: c,
2355
- onChange: _
2487
+ onChange: D
2356
2488
  })]
2357
2489
  });
2358
- }, j = (e) => /* @__PURE__ */ n("svg", {
2490
+ }, F = (e) => /* @__PURE__ */ n("svg", {
2359
2491
  xmlns: "http://www.w3.org/2000/svg",
2360
2492
  width: 40,
2361
2493
  height: 40,
@@ -2552,7 +2684,7 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
2552
2684
  })
2553
2685
  ] })
2554
2686
  ]
2555
- }), M = (e) => /* @__PURE__ */ n("svg", {
2687
+ }), I = (e) => /* @__PURE__ */ n("svg", {
2556
2688
  xmlns: "http://www.w3.org/2000/svg",
2557
2689
  width: 40,
2558
2690
  height: 40,
@@ -3006,7 +3138,7 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3006
3138
  })
3007
3139
  ] })
3008
3140
  ]
3009
- }), N = (e) => /* @__PURE__ */ n("svg", {
3141
+ }), L = (e) => /* @__PURE__ */ n("svg", {
3010
3142
  xmlns: "http://www.w3.org/2000/svg",
3011
3143
  width: 40,
3012
3144
  height: 40,
@@ -3203,78 +3335,78 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3203
3335
  })
3204
3336
  ] })
3205
3337
  ]
3206
- }), P = {
3338
+ }), R = {
3207
3339
  list: "_list_1vfe4_1",
3208
3340
  icon: "_icon_1vfe4_6",
3209
3341
  button: "_button_1vfe4_11"
3210
- }, F = [
3211
- [j, 1],
3212
- [S, 2],
3213
- [N, 3],
3214
- [C, 4],
3215
- [M, 5]
3216
- ], I = ({ minLabel: e, maxLabel: i, onChange: a, classNames: o }) => {
3342
+ }, z = [
3343
+ [F, 1],
3344
+ [T, 2],
3345
+ [L, 3],
3346
+ [E, 4],
3347
+ [I, 5]
3348
+ ], B = ({ minLabel: e, maxLabel: i, onChange: a, classNames: o }) => {
3217
3349
  let c = r((e) => {
3218
3350
  a(Number(e.currentTarget.value));
3219
3351
  }, [a]);
3220
3352
  return /* @__PURE__ */ n("div", {
3221
- className: s(P.base, o?.base),
3353
+ className: s(R.base, o?.base),
3222
3354
  children: [/* @__PURE__ */ t("div", {
3223
- className: s(P.list, o?.list),
3224
- children: F.map(([e, n]) => /* @__PURE__ */ t("button", {
3355
+ className: s(R.list, o?.list),
3356
+ children: z.map(([e, n]) => /* @__PURE__ */ t("button", {
3225
3357
  "aria-label": `Score ${n}`,
3226
- className: s(P.button, o?.button),
3358
+ className: s(R.button, o?.button),
3227
3359
  type: "button",
3228
3360
  value: n,
3229
3361
  onClick: c,
3230
3362
  children: /* @__PURE__ */ t(e, {
3231
3363
  "aria-hidden": "true",
3232
- className: s(P.icon, o?.icon),
3364
+ className: s(R.icon, o?.icon),
3233
3365
  width: 32,
3234
3366
  height: 32
3235
3367
  })
3236
3368
  }, n))
3237
- }), !!e && !!i && /* @__PURE__ */ t(x, {
3369
+ }), !!e && !!i && /* @__PURE__ */ t(w, {
3238
3370
  className: o?.labels,
3239
3371
  minLabel: e,
3240
3372
  maxLabel: i
3241
3373
  })]
3242
3374
  });
3243
- }, L = {
3375
+ }, V = {
3244
3376
  list: "_list_16sag_1",
3245
3377
  button: "_button_16sag_6"
3246
- }, R = [
3378
+ }, H = [
3247
3379
  1,
3248
3380
  2,
3249
3381
  3,
3250
3382
  4,
3251
3383
  5
3252
- ], z = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
3384
+ ], U = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
3253
3385
  let c = r((e) => {
3254
3386
  o(Number(e.currentTarget.value));
3255
3387
  }, [o]);
3256
3388
  return /* @__PURE__ */ n("div", {
3257
- className: s(L.base, e?.base),
3389
+ className: s(V.base, e?.base),
3258
3390
  children: [/* @__PURE__ */ t("div", {
3259
- className: s(L.list, e?.list),
3260
- children: R.map((n) => /* @__PURE__ */ t("button", {
3391
+ className: s(V.list, e?.list),
3392
+ children: H.map((n) => /* @__PURE__ */ t("button", {
3261
3393
  "aria-label": `Score ${n}`,
3262
- className: s(L.button, e?.button),
3394
+ className: s(V.button, e?.button),
3263
3395
  type: "button",
3264
3396
  value: n,
3265
3397
  onClick: c,
3266
3398
  children: /* @__PURE__ */ t("span", {
3267
- className: s(L.score, e?.score),
3399
+ className: s(V.score, e?.score),
3268
3400
  children: n
3269
3401
  })
3270
3402
  }, n))
3271
- }), !!i && !!a && /* @__PURE__ */ t(x, {
3403
+ }), !!i && !!a && /* @__PURE__ */ t(w, {
3272
3404
  className: e?.labels,
3273
3405
  minLabel: i,
3274
3406
  maxLabel: a
3275
3407
  })]
3276
3408
  });
3277
- }, B = (e) => /* @__PURE__ */ t("svg", {
3409
+ }, W = (e) => /* @__PURE__ */ t("svg", {
3278
3410
  xmlns: "http://www.w3.org/2000/svg",
3279
3411
  fill: "none",
3280
3412
  viewBox: "0 0 40 40",
@@ -3286,7 +3418,7 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3286
3418
  strokeLinejoin: "round",
3287
3419
  d: "M18.8 5.76c.39-.78.58-1.17.84-1.3.23-.1.5-.1.72 0 .26.13.45.52.84 1.3l3.64 7.38c.11.23.17.34.25.43a1 1 0 0 0 .26.2c.11.04.24.06.5.1l8.14 1.19c.86.12 1.3.19 1.5.4q.25.29.21.68c-.04.29-.35.59-.97 1.2l-5.9 5.74c-.18.18-.27.27-.33.37q-.08.15-.1.3c-.01.13 0 .25.05.5l1.4 8.12c.14.86.21 1.28.08 1.54a.8.8 0 0 1-.59.42c-.28.05-.66-.15-1.43-.55l-7.29-3.84a2 2 0 0 0-.46-.2 1 1 0 0 0-.32 0c-.12.02-.23.08-.46.2l-7.29 3.84c-.77.4-1.15.6-1.44.55a.8.8 0 0 1-.58-.42c-.13-.26-.06-.68.09-1.54l1.39-8.11c.04-.26.06-.38.05-.5a1 1 0 0 0-.1-.3c-.06-.11-.15-.2-.34-.38l-5.9-5.75c-.61-.6-.92-.9-.96-1.19a.8.8 0 0 1 .22-.68c.2-.21.63-.28 1.48-.4l8.16-1.2c.25-.03.38-.05.49-.1q.14-.06.26-.19c.08-.09.14-.2.25-.43z"
3288
3420
  })
3289
- }), V = (e) => /* @__PURE__ */ t("svg", {
3421
+ }), G = (e) => /* @__PURE__ */ t("svg", {
3290
3422
  xmlns: "http://www.w3.org/2000/svg",
3291
3423
  fill: "none",
3292
3424
  viewBox: "0 0 40 40",
@@ -3299,17 +3431,17 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3299
3431
  strokeWidth: 2,
3300
3432
  d: "M18.8 5.76c.39-.78.58-1.17.84-1.3.23-.1.5-.1.72 0 .26.13.45.52.84 1.3l3.64 7.38c.11.23.17.34.25.43a1 1 0 0 0 .26.2c.11.04.24.06.5.1l8.14 1.19c.86.12 1.3.19 1.5.4q.25.29.21.68c-.04.29-.35.59-.97 1.2l-5.9 5.74c-.18.18-.27.27-.33.37q-.08.15-.1.3c-.01.13 0 .25.05.5l1.4 8.12c.14.86.21 1.28.08 1.54a.8.8 0 0 1-.59.42c-.28.05-.66-.15-1.43-.55l-7.29-3.84a2 2 0 0 0-.46-.2 1 1 0 0 0-.32 0c-.12.02-.23.08-.46.2l-7.29 3.84c-.77.4-1.15.6-1.44.55a.8.8 0 0 1-.58-.42c-.13-.26-.06-.68.09-1.54l1.39-8.11c.04-.26.06-.38.05-.5a1 1 0 0 0-.1-.3c-.06-.11-.15-.2-.34-.38l-5.9-5.75c-.61-.6-.92-.9-.96-1.19a.8.8 0 0 1 .22-.68c.2-.21.63-.28 1.48-.4l8.16-1.2c.25-.03.38-.05.49-.1q.14-.06.26-.19c.08-.09.14-.2.25-.43z"
3301
3433
  })
3302
- }), H = {
3434
+ }), K = {
3303
3435
  list: "_list_1kpxu_1",
3304
3436
  icon: "_icon_1kpxu_6",
3305
3437
  button: "_button_1kpxu_11"
3306
- }, U = [
3438
+ }, ee = [
3307
3439
  1,
3308
3440
  2,
3309
3441
  3,
3310
3442
  4,
3311
3443
  5
3312
- ], W = ({ minLabel: e, maxLabel: i, onChange: a, classNames: c }) => {
3444
+ ], te = ({ minLabel: e, maxLabel: i, onChange: a, classNames: c }) => {
3313
3445
  let [l, u] = o(null), d = r((e) => {
3314
3446
  u(Number(e.currentTarget.value));
3315
3447
  }, []), f = r((e) => {
@@ -3320,88 +3452,99 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3320
3452
  a(Number(e.currentTarget.value));
3321
3453
  }, [a]);
3322
3454
  return /* @__PURE__ */ n("div", {
3323
- className: s(H.base, c?.base),
3455
+ className: s(K.base, c?.base),
3324
3456
  children: [/* @__PURE__ */ t("div", {
3325
- className: s(H.list, c?.list),
3457
+ className: s(K.list, c?.list),
3326
3458
  onBlur: p,
3327
3459
  onMouseLeave: p,
3328
- children: U.map((e) => /* @__PURE__ */ t("button", {
3460
+ children: ee.map((e) => /* @__PURE__ */ t("button", {
3329
3461
  "aria-label": `${e} ${e > 1 ? "stars" : "star"}`,
3330
- className: s(H.button, c?.button),
3462
+ className: s(K.button, c?.button),
3331
3463
  type: "button",
3332
3464
  value: e,
3333
3465
  onClick: m,
3334
3466
  onFocus: d,
3335
3467
  onMouseOver: f,
3336
- children: t(l !== null && e <= l ? V : B, {
3468
+ children: t(l !== null && e <= l ? G : W, {
3337
3469
  "aria-hidden": "true",
3338
- className: s(H.icon, c?.icon),
3470
+ className: s(K.icon, c?.icon),
3339
3471
  width: 40,
3340
3472
  height: 40
3341
3473
  })
3342
3474
  }, e))
3343
- }), !!e && !!i && /* @__PURE__ */ t(x, {
3475
+ }), !!e && !!i && /* @__PURE__ */ t(w, {
3344
3476
  className: c?.labels,
3345
3477
  minLabel: e,
3346
3478
  maxLabel: i
3347
3479
  })]
3348
3480
  });
3349
- }, G = {
3350
- base: "_base_m4qio_1",
3351
- rating: "_rating_m4qio_5",
3352
- feedback: "_feedback_m4qio_6",
3353
- success: "_success_m4qio_7"
3354
- }, K = ({ classNames: e, dir: r, scaleStyle: i, question: a, minLabel: o, maxLabel: c, textQuestion: l, textButtonLabel: u, responseType: d, choiceOptions: f, thankYouMessage: p, onScoreSubmit: m, onFeedbackSubmit: h }) => {
3355
- let { screen: g, onScoreChange: _, onFeedbackChange: b } = y({
3356
- responseType: d,
3357
- onScoreSubmit: m,
3358
- onFeedbackSubmit: h
3481
+ }, q = {
3482
+ base: "_base_sfbnw_1",
3483
+ rating: "_rating_sfbnw_5",
3484
+ feedback: "_feedback_sfbnw_6",
3485
+ contact: "_contact_sfbnw_7",
3486
+ success: "_success_sfbnw_8"
3487
+ }, ne = ({ classNames: e, dir: r, scaleStyle: i, question: a, minLabel: o, maxLabel: c, textQuestion: l, textButtonSendLabel: u, textButtonSkipLabel: d, responseType: f, choiceOptions: p, thankYouMessage: m, collectContact: h, userId: g, contactQuestion: _, contactSubtext: v, contactButtonSendLabel: y, contactButtonSkipLabel: b, onScoreSubmit: C, onFeedbackSubmit: w, onContactSubmit: T }) => {
3488
+ let { screen: E, onScoreChange: D, onFeedbackChange: O, onContactChange: k } = S({
3489
+ responseType: f,
3490
+ collectContact: h,
3491
+ userId: g,
3492
+ onScoreSubmit: C,
3493
+ onFeedbackSubmit: w,
3494
+ onContactSubmit: T
3359
3495
  });
3360
- return /* @__PURE__ */ n(v, {
3361
- className: G.base,
3496
+ return /* @__PURE__ */ n(x, {
3497
+ className: q.base,
3362
3498
  classNames: {
3363
3499
  ...e?.base,
3364
- rating: s(G.rating, e?.base?.rating),
3365
- feedback: s(G.feedback, e?.base?.feedback),
3366
- success: s(G.success, e?.base?.success)
3500
+ rating: s(q.rating, e?.base?.rating),
3501
+ feedback: s(q.feedback, e?.base?.feedback),
3502
+ contact: s(q.contact, e?.base?.contact),
3503
+ success: s(q.success, e?.base?.success)
3367
3504
  },
3368
3505
  dir: r,
3369
- screen: g,
3506
+ screen: E,
3370
3507
  question: a,
3371
3508
  textQuestion: l,
3372
- textButtonLabel: u,
3373
- responseType: d,
3374
- choiceOptions: f,
3375
- thankYouMessage: p,
3376
- onFeedback: b,
3509
+ textButtonSendLabel: u,
3510
+ textButtonSkipLabel: d,
3511
+ responseType: f,
3512
+ choiceOptions: p,
3513
+ thankYouMessage: m,
3514
+ contactQuestion: _,
3515
+ contactSubtext: v,
3516
+ contactButtonSendLabel: y,
3517
+ contactButtonSkipLabel: b,
3518
+ onFeedback: O,
3519
+ onContact: k,
3377
3520
  children: [
3378
- i === "emoji" && /* @__PURE__ */ t(I, {
3521
+ i === "emoji" && /* @__PURE__ */ t(B, {
3379
3522
  classNames: e?.scale,
3380
3523
  minLabel: o,
3381
3524
  maxLabel: c,
3382
- onChange: _
3525
+ onChange: D
3383
3526
  }),
3384
- i === "numbers" && /* @__PURE__ */ t(z, {
3527
+ i === "numbers" && /* @__PURE__ */ t(U, {
3385
3528
  classNames: e?.scale,
3386
3529
  minLabel: o,
3387
3530
  maxLabel: c,
3388
- onChange: _
3531
+ onChange: D
3389
3532
  }),
3390
- i === "stars" && /* @__PURE__ */ t(W, {
3533
+ i === "stars" && /* @__PURE__ */ t(te, {
3391
3534
  classNames: e?.scale,
3392
3535
  minLabel: o,
3393
3536
  maxLabel: c,
3394
- onChange: _
3537
+ onChange: D
3395
3538
  })
3396
3539
  ]
3397
3540
  });
3398
- }, q = {
3541
+ }, J = {
3399
3542
  list: "_list_whbas_1",
3400
3543
  button: "_button_whbas_13",
3401
3544
  score: "_score_whbas_52",
3402
3545
  label: "_label_whbas_55",
3403
3546
  labels: "_labels_whbas_75"
3404
- }, J = [
3547
+ }, Y = [
3405
3548
  1,
3406
3549
  2,
3407
3550
  3,
@@ -3409,74 +3552,85 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3409
3552
  5,
3410
3553
  6,
3411
3554
  7
3412
- ], Y = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
3555
+ ], re = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
3413
3556
  let c = r((e) => {
3414
3557
  o(Number(e.currentTarget.value));
3415
3558
  }, [o]);
3416
3559
  return /* @__PURE__ */ n("div", {
3417
- className: s(q.base, e?.base),
3560
+ className: s(J.base, e?.base),
3418
3561
  children: [/* @__PURE__ */ t("div", {
3419
- className: s(q.list, e?.list),
3420
- children: J.map((r) => /* @__PURE__ */ n("button", {
3562
+ className: s(J.list, e?.list),
3563
+ children: Y.map((r) => /* @__PURE__ */ n("button", {
3421
3564
  "aria-label": `Score ${r}`,
3422
- className: s(q.button, e?.button),
3565
+ className: s(J.button, e?.button),
3423
3566
  type: "button",
3424
3567
  value: r,
3425
3568
  onClick: c,
3426
3569
  children: [
3427
3570
  /* @__PURE__ */ t("span", {
3428
- className: s(q.score, e?.score),
3571
+ className: s(J.score, e?.score),
3429
3572
  children: r
3430
3573
  }),
3431
- r === J[0] && !!i && /* @__PURE__ */ t("span", {
3432
- className: q.label,
3574
+ r === Y[0] && !!i && /* @__PURE__ */ t("span", {
3575
+ className: J.label,
3433
3576
  children: ` - ${i}`
3434
3577
  }, "left"),
3435
- r === J[J.length - 1] && !!a && /* @__PURE__ */ t("span", {
3436
- className: q.label,
3578
+ r === Y[Y.length - 1] && !!a && /* @__PURE__ */ t("span", {
3579
+ className: J.label,
3437
3580
  children: ` - ${a}`
3438
3581
  }, "right")
3439
3582
  ]
3440
3583
  }, r))
3441
- }), !!i && !!a && /* @__PURE__ */ t(x, {
3442
- className: s(q.labels, e?.labels),
3584
+ }), !!i && !!a && /* @__PURE__ */ t(w, {
3585
+ className: s(J.labels, e?.labels),
3443
3586
  minLabel: i,
3444
3587
  maxLabel: a
3445
3588
  })]
3446
3589
  });
3447
3590
  }, X = {
3448
- base: "_base_12no3_1",
3449
- rating: "_rating_12no3_5",
3450
- feedback: "_feedback_12no3_19",
3451
- success: "_success_12no3_20"
3452
- }, te = ({ classNames: e, dir: n, scaleStyle: r, question: i, minLabel: a, maxLabel: o, textQuestion: c, textButtonLabel: l, responseType: u, choiceOptions: d, thankYouMessage: f, onScoreSubmit: p, onFeedbackSubmit: m }) => {
3453
- let { screen: h, onScoreChange: g, onFeedbackChange: _ } = y({
3454
- responseType: u,
3455
- onScoreSubmit: p,
3456
- onFeedbackSubmit: m
3591
+ base: "_base_tj93m_1",
3592
+ rating: "_rating_tj93m_5",
3593
+ feedback: "_feedback_tj93m_19",
3594
+ contact: "_contact_tj93m_20",
3595
+ success: "_success_tj93m_21"
3596
+ }, ie = ({ classNames: e, dir: n, scaleStyle: r, question: i, minLabel: a, maxLabel: o, textQuestion: c, textButtonSendLabel: l, textButtonSkipLabel: u, responseType: d, choiceOptions: f, thankYouMessage: p, collectContact: m, userId: h, contactQuestion: g, contactSubtext: _, contactButtonSendLabel: v, contactButtonSkipLabel: y, onScoreSubmit: b, onFeedbackSubmit: C, onContactSubmit: w }) => {
3597
+ let { screen: T, onScoreChange: E, onFeedbackChange: D, onContactChange: O } = S({
3598
+ responseType: d,
3599
+ collectContact: m,
3600
+ userId: h,
3601
+ onScoreSubmit: b,
3602
+ onFeedbackSubmit: C,
3603
+ onContactSubmit: w
3457
3604
  });
3458
- return /* @__PURE__ */ t(v, {
3605
+ return /* @__PURE__ */ t(x, {
3459
3606
  className: X.base,
3460
3607
  classNames: {
3461
3608
  ...e?.base,
3462
3609
  rating: s(X.rating, e?.base?.rating),
3463
3610
  feedback: s(X.feedback, e?.base?.feedback),
3611
+ contact: s(X.contact, e?.base?.contact),
3464
3612
  success: s(X.success, e?.base?.success)
3465
3613
  },
3466
3614
  dir: n,
3467
- screen: h,
3615
+ screen: T,
3468
3616
  question: i,
3469
3617
  textQuestion: c,
3470
- textButtonLabel: l,
3471
- responseType: u,
3472
- choiceOptions: d,
3473
- thankYouMessage: f,
3474
- onFeedback: _,
3475
- children: r === "numbers" && /* @__PURE__ */ t(Y, {
3618
+ textButtonSendLabel: l,
3619
+ textButtonSkipLabel: u,
3620
+ responseType: d,
3621
+ choiceOptions: f,
3622
+ thankYouMessage: p,
3623
+ contactQuestion: g,
3624
+ contactSubtext: _,
3625
+ contactButtonSendLabel: v,
3626
+ contactButtonSkipLabel: y,
3627
+ onFeedback: D,
3628
+ onContact: O,
3629
+ children: r === "numbers" && /* @__PURE__ */ t(re, {
3476
3630
  classNames: e?.scale,
3477
3631
  minLabel: a,
3478
3632
  maxLabel: o,
3479
- onChange: g
3633
+ onChange: E
3480
3634
  })
3481
3635
  });
3482
3636
  }, Z = {
@@ -3497,7 +3651,7 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3497
3651
  8,
3498
3652
  9,
3499
3653
  10
3500
- ], ne = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
3654
+ ], ae = ({ classNames: e, minLabel: i, maxLabel: a, onChange: o }) => {
3501
3655
  let c = r((e) => {
3502
3656
  o(Number(e.currentTarget.value));
3503
3657
  }, [o]);
@@ -3526,47 +3680,58 @@ var c = { base: "_base_d3jtv_1" }, l = ({ className: e, children: n, ...r }) =>
3526
3680
  }, "right")
3527
3681
  ]
3528
3682
  }, r))
3529
- }), !!i && !!a && /* @__PURE__ */ t(x, {
3683
+ }), !!i && !!a && /* @__PURE__ */ t(w, {
3530
3684
  className: s(Z.labels, e?.labels),
3531
3685
  minLabel: i,
3532
3686
  maxLabel: a
3533
3687
  })]
3534
3688
  });
3535
3689
  }, $ = {
3536
- base: "_base_1invl_1",
3537
- rating: "_rating_1invl_5",
3538
- feedback: "_feedback_1invl_19",
3539
- success: "_success_1invl_20"
3540
- }, re = ({ classNames: e, dir: n, scaleStyle: r, question: i, minLabel: a, maxLabel: o, textQuestion: c, textButtonLabel: l, responseType: u, choiceOptions: d, thankYouMessage: f, onScoreSubmit: p, onFeedbackSubmit: m }) => {
3541
- let { screen: h, onScoreChange: g, onFeedbackChange: _ } = y({
3542
- responseType: u,
3543
- onScoreSubmit: p,
3544
- onFeedbackSubmit: m
3690
+ base: "_base_kj5ew_1",
3691
+ rating: "_rating_kj5ew_5",
3692
+ feedback: "_feedback_kj5ew_19",
3693
+ contact: "_contact_kj5ew_20",
3694
+ success: "_success_kj5ew_21"
3695
+ }, oe = ({ classNames: e, dir: n, scaleStyle: r, question: i, minLabel: a, maxLabel: o, textQuestion: c, textButtonSendLabel: l, textButtonSkipLabel: u, responseType: d, choiceOptions: f, thankYouMessage: p, collectContact: m, userId: h, contactQuestion: g, contactSubtext: _, contactButtonSendLabel: v, contactButtonSkipLabel: y, onScoreSubmit: b, onFeedbackSubmit: C, onContactSubmit: w }) => {
3696
+ let { screen: T, onScoreChange: E, onFeedbackChange: D, onContactChange: O } = S({
3697
+ responseType: d,
3698
+ collectContact: m,
3699
+ userId: h,
3700
+ onScoreSubmit: b,
3701
+ onFeedbackSubmit: C,
3702
+ onContactSubmit: w
3545
3703
  });
3546
- return /* @__PURE__ */ t(v, {
3704
+ return /* @__PURE__ */ t(x, {
3547
3705
  className: $.base,
3548
3706
  classNames: {
3549
3707
  ...e?.base,
3550
3708
  rating: s($.rating, e?.base?.rating),
3551
3709
  feedback: s($.feedback, e?.base?.feedback),
3710
+ contact: s($.contact, e?.base?.contact),
3552
3711
  success: s($.success, e?.base?.success)
3553
3712
  },
3554
3713
  dir: n,
3555
- screen: h,
3714
+ screen: T,
3556
3715
  question: i,
3557
3716
  textQuestion: c,
3558
- textButtonLabel: l,
3559
- responseType: u,
3560
- choiceOptions: d,
3561
- thankYouMessage: f,
3562
- onFeedback: _,
3563
- children: r === "numbers" && /* @__PURE__ */ t(ne, {
3717
+ textButtonSendLabel: l,
3718
+ textButtonSkipLabel: u,
3719
+ responseType: d,
3720
+ choiceOptions: f,
3721
+ thankYouMessage: p,
3722
+ contactQuestion: g,
3723
+ contactSubtext: _,
3724
+ contactButtonSendLabel: v,
3725
+ contactButtonSkipLabel: y,
3726
+ onFeedback: D,
3727
+ onContact: O,
3728
+ children: r === "numbers" && /* @__PURE__ */ t(ae, {
3564
3729
  classNames: e?.scale,
3565
3730
  minLabel: a,
3566
3731
  maxLabel: o,
3567
- onChange: g
3732
+ onChange: E
3568
3733
  })
3569
3734
  });
3570
3735
  };
3571
3736
  //#endregion
3572
- export { te as CES7Survey, A as CSAT2Survey, K as CSAT5Survey, re as NPS10Survey, d as Popup, l as Surface };
3737
+ export { ie as CES7Survey, P as CSAT2Survey, ne as CSAT5Survey, oe as NPS10Survey, d as Popup, l as Surface };