@bigbinary/neeto-thank-you-frontend 1.1.3 → 1.1.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/dist/index.cjs.js CHANGED
@@ -24,6 +24,7 @@ var Input = require('@bigbinary/neetoui/formik/Input');
24
24
  var Switch = require('@bigbinary/neetoui/formik/Switch');
25
25
  var reactI18next = require('react-i18next');
26
26
  var neetoImageUploaderFrontend = require('@bigbinary/neeto-image-uploader-frontend');
27
+ var jsxRuntime = require('react/jsx-runtime');
27
28
  var Button = require('@bigbinary/neetoui/Button');
28
29
  var Typography = require('@bigbinary/neetoui/Typography');
29
30
  var Modal = require('@bigbinary/neetoui/Modal');
@@ -52,8 +53,8 @@ function _interopNamespace(e) {
52
53
  return Object.freeze(n);
53
54
  }
54
55
 
55
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
56
56
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
57
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
57
58
  var Scrollable__default = /*#__PURE__*/_interopDefaultLegacy(Scrollable);
58
59
  var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
59
60
  var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
@@ -275,13 +276,12 @@ var Image = function Image() {
275
276
  setFieldValue("imageUrl", image.url);
276
277
  setFieldValue("imageSignedId", image.signedId);
277
278
  };
278
- return /*#__PURE__*/React__default["default"].createElement(neetoImageUploaderFrontend.ImageUploader, {
279
+ return /*#__PURE__*/jsxRuntime.jsx(neetoImageUploaderFrontend.ImageUploader, {
279
280
  className: "h-60",
280
- key: values.imageUrl,
281
281
  src: values.imageUrl,
282
282
  uploadConfig: IMAGE_UPLOADER_CONFIG,
283
283
  onUploadComplete: handleImageChange
284
- });
284
+ }, values.imageUrl);
285
285
  };
286
286
 
287
287
  var ResubmissionWarningModal = function ResubmissionWarningModal(_ref) {
@@ -290,26 +290,33 @@ var ResubmissionWarningModal = function ResubmissionWarningModal(_ref) {
290
290
  uniqueSubmissionLink = _ref.uniqueSubmissionLink;
291
291
  var _useTranslation = reactI18next.useTranslation(),
292
292
  t = _useTranslation.t;
293
- return /*#__PURE__*/React__default["default"].createElement(Modal__default["default"], {
293
+ return /*#__PURE__*/jsxRuntime.jsxs(Modal__default["default"], {
294
294
  isOpen: isOpen,
295
295
  onClose: function onClose() {
296
296
  return setIsOpen(false);
297
- }
298
- }, /*#__PURE__*/React__default["default"].createElement(Modal__default["default"].Header, null, /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
299
- style: "h3",
300
- weight: "semibold"
301
- }, t("neetoThankYou.common.alert"), "!")), /*#__PURE__*/React__default["default"].createElement(Modal__default["default"].Body, null, t("neetoThankYou.thankYou.resubmissionWarning")), /*#__PURE__*/React__default["default"].createElement(Modal__default["default"].Footer, {
302
- className: "space-x-2"
303
- }, /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
304
- label: t("neetoThankYou.thankYou.uniqueSubmissionLinkText"),
305
- to: uniqueSubmissionLink
306
- }), /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
307
- label: t("neetoThankYou.common.ok"),
308
- style: "text",
309
- onClick: function onClick() {
310
- return setIsOpen(false);
311
- }
312
- })));
297
+ },
298
+ children: [/*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Header, {
299
+ children: /*#__PURE__*/jsxRuntime.jsxs(Typography__default["default"], {
300
+ style: "h3",
301
+ weight: "semibold",
302
+ children: [t("neetoThankYou.common.alert"), "!"]
303
+ })
304
+ }), /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"].Body, {
305
+ children: t("neetoThankYou.thankYou.resubmissionWarning")
306
+ }), /*#__PURE__*/jsxRuntime.jsxs(Modal__default["default"].Footer, {
307
+ className: "space-x-2",
308
+ children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
309
+ label: t("neetoThankYou.thankYou.uniqueSubmissionLinkText"),
310
+ to: uniqueSubmissionLink
311
+ }), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
312
+ label: t("neetoThankYou.common.ok"),
313
+ style: "text",
314
+ onClick: function onClick() {
315
+ return setIsOpen(false);
316
+ }
317
+ })]
318
+ })]
319
+ });
313
320
  };
314
321
 
315
322
  var Customize = function Customize(_ref) {
@@ -345,37 +352,44 @@ var Customize = function Customize(_ref) {
345
352
  var handleResubmitLinkChange = function handleResubmitLinkChange(event) {
346
353
  uniqueSubmissionEnabled ? setIsUniqueSubmissionWarningModalOpen(true) : setFieldValue("showResubmitLink", event.target.checked);
347
354
  };
348
- return /*#__PURE__*/React__default["default"].createElement("div", {
349
- className: "flex flex-col gap-4"
350
- }, hasImageUploader && /*#__PURE__*/React__default["default"].createElement("div", {
351
- className: "flex flex-col gap-2"
352
- }, /*#__PURE__*/React__default["default"].createElement(Label__default["default"], null, t("neetoThankYou.thankYou.imageLabel")), /*#__PURE__*/React__default["default"].createElement(Image, null)), /*#__PURE__*/React__default["default"].createElement("div", {
353
- className: "flex flex-col gap-2"
354
- }, /*#__PURE__*/React__default["default"].createElement(neetoEditor.FormikEditor, {
355
- required: true,
356
- "data-cy": "thank-you-message-editor",
357
- label: t("neetoThankYou.thankYou.messageLabel"),
358
- name: "message",
359
- ref: editorRef
360
- })), !disableSocialShare && /*#__PURE__*/React__default["default"].createElement(Switch__default["default"], {
361
- label: t("neetoThankYou.thankYou.socialShareIcons"),
362
- name: "socialSharingEnabled"
363
- }), !disableSubmitAnotherResponse && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Switch__default["default"], {
364
- label: t("neetoThankYou.thankYou.showResubmitLink"),
365
- name: "showResubmitLink",
366
- className: classNames__default["default"]({
367
- "neeto-ui-switch--disabled": uniqueSubmissionEnabled
368
- }),
369
- onChange: handleResubmitLinkChange
370
- }), values.showResubmitLink && /*#__PURE__*/React__default["default"].createElement(Input__default["default"], {
371
- required: true,
372
- label: t("neetoThankYou.thankYou.resubmitLinkText"),
373
- name: "resubmitLinkText"
374
- })), /*#__PURE__*/React__default["default"].createElement(ResubmissionWarningModal, {
375
- uniqueSubmissionLink: uniqueSubmissionLink,
376
- isOpen: isUniqueSubmissionWarningModalOpen,
377
- setIsOpen: setIsUniqueSubmissionWarningModalOpen
378
- }));
355
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
356
+ className: "flex flex-col gap-4",
357
+ children: [hasImageUploader && /*#__PURE__*/jsxRuntime.jsxs("div", {
358
+ className: "flex flex-col gap-2",
359
+ children: [/*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
360
+ children: t("neetoThankYou.thankYou.imageLabel")
361
+ }), /*#__PURE__*/jsxRuntime.jsx(Image, {})]
362
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
363
+ className: "flex flex-col gap-2",
364
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoEditor.FormikEditor, {
365
+ required: true,
366
+ "data-cy": "thank-you-message-editor",
367
+ label: t("neetoThankYou.thankYou.messageLabel"),
368
+ name: "message",
369
+ ref: editorRef
370
+ })
371
+ }), !disableSocialShare && /*#__PURE__*/jsxRuntime.jsx(Switch__default["default"], {
372
+ label: t("neetoThankYou.thankYou.socialShareIcons"),
373
+ name: "socialSharingEnabled"
374
+ }), !disableSubmitAnotherResponse && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
375
+ children: [/*#__PURE__*/jsxRuntime.jsx(Switch__default["default"], {
376
+ label: t("neetoThankYou.thankYou.showResubmitLink"),
377
+ name: "showResubmitLink",
378
+ className: classNames__default["default"]({
379
+ "neeto-ui-switch--disabled": uniqueSubmissionEnabled
380
+ }),
381
+ onChange: handleResubmitLinkChange
382
+ }), values.showResubmitLink && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
383
+ required: true,
384
+ label: t("neetoThankYou.thankYou.resubmitLinkText"),
385
+ name: "resubmitLinkText"
386
+ })]
387
+ }), /*#__PURE__*/jsxRuntime.jsx(ResubmissionWarningModal, {
388
+ uniqueSubmissionLink: uniqueSubmissionLink,
389
+ isOpen: isUniqueSubmissionWarningModalOpen,
390
+ setIsOpen: setIsUniqueSubmissionWarningModalOpen
391
+ })]
392
+ });
379
393
  };
380
394
 
381
395
  var ENVIRONMENTS = {
@@ -405,24 +419,27 @@ var BrandingInfo = function BrandingInfo(_ref) {
405
419
  var _brandingInfo$additio;
406
420
  var brandingInfo = _ref.brandingInfo,
407
421
  appName = _ref.appName;
408
- return /*#__PURE__*/React__default["default"].createElement("div", {
409
- className: "neeto-thank-you-configuration__branding-wrap"
410
- }, /*#__PURE__*/React__default["default"].createElement("div", {
411
- className: "neeto-thank-you-configuration__nav"
412
- }, /*#__PURE__*/React__default["default"].createElement("div", {
413
- className: "neeto-thank-you-configuration__nav-footer"
414
- }, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
415
- i18nKey: brandingInfo.displayText,
416
- components: _objectSpread$1({
417
- signUpLink: /*#__PURE__*/React__default["default"].createElement("a", {
418
- className: "neeto-thank-you-configuration__link",
419
- href: buildSignUpUrl(appName),
420
- rel: "noreferrer",
421
- target: "_blank"
422
- }),
423
- span: /*#__PURE__*/React__default["default"].createElement("span", null)
424
- }, (_brandingInfo$additio = brandingInfo.additionalComponents) !== null && _brandingInfo$additio !== void 0 ? _brandingInfo$additio : {})
425
- }))));
422
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
423
+ className: "neeto-thank-you-configuration__branding-wrap",
424
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
425
+ className: "neeto-thank-you-configuration__nav",
426
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
427
+ className: "neeto-thank-you-configuration__nav-footer",
428
+ children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
429
+ i18nKey: brandingInfo.displayText,
430
+ components: _objectSpread$1({
431
+ signUpLink: /*#__PURE__*/jsxRuntime.jsx("a", {
432
+ className: "neeto-thank-you-configuration__link",
433
+ href: buildSignUpUrl(appName),
434
+ rel: "noreferrer",
435
+ target: "_blank"
436
+ }),
437
+ span: /*#__PURE__*/jsxRuntime.jsx("span", {})
438
+ }, (_brandingInfo$additio = brandingInfo.additionalComponents) !== null && _brandingInfo$additio !== void 0 ? _brandingInfo$additio : {})
439
+ })
440
+ })
441
+ })
442
+ });
426
443
  };
427
444
 
428
445
  var _ellipse, _ellipse2, _ellipse3;
@@ -457,24 +474,28 @@ var SocialShare = function SocialShare(_ref) {
457
474
  publicLinkId = _ref.publicLinkId;
458
475
  var _useTranslation = reactI18next.useTranslation(),
459
476
  t = _useTranslation.t;
460
- return /*#__PURE__*/React__default["default"].createElement("div", {
461
- className: "neeto-thank-you-configuration__social-share"
462
- }, /*#__PURE__*/React__default["default"].createElement("h3", {
463
- className: "neeto-thank-you-configuration__social-share-title"
464
- }, t("neetoThankYou.thankYou.socialShareHeading")), /*#__PURE__*/React__default["default"].createElement("div", {
465
- className: "neeto-thank-you-configuration-social-follow"
466
- }, socialHandles === null || socialHandles === void 0 ? void 0 : socialHandles.map(function (data, idx) {
467
- var Icon = data.icon,
468
- generateShareUrl = data.generateShareUrl;
469
- return /*#__PURE__*/React__default["default"].createElement("div", {
470
- className: "neeto-thank-you-configuration-social-follow__item",
471
- key: idx
472
- }, /*#__PURE__*/React__default["default"].createElement("a", {
473
- href: generateShareUrl(publicLinkId),
474
- rel: "noreferrer",
475
- target: "_blank"
476
- }, /*#__PURE__*/React__default["default"].createElement(Icon, null)));
477
- })));
477
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
478
+ className: "neeto-thank-you-configuration__social-share",
479
+ children: [/*#__PURE__*/jsxRuntime.jsx("h3", {
480
+ className: "neeto-thank-you-configuration__social-share-title",
481
+ children: t("neetoThankYou.thankYou.socialShareHeading")
482
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
483
+ className: "neeto-thank-you-configuration-social-follow",
484
+ children: socialHandles === null || socialHandles === void 0 ? void 0 : socialHandles.map(function (data, idx) {
485
+ var Icon = data.icon,
486
+ generateShareUrl = data.generateShareUrl;
487
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
488
+ className: "neeto-thank-you-configuration-social-follow__item",
489
+ children: /*#__PURE__*/jsxRuntime.jsx("a", {
490
+ href: generateShareUrl(publicLinkId),
491
+ rel: "noreferrer",
492
+ target: "_blank",
493
+ children: /*#__PURE__*/jsxRuntime.jsx(Icon, {})
494
+ })
495
+ }, idx);
496
+ })
497
+ })]
498
+ });
478
499
  };
479
500
 
480
501
  var MemoizedEditorContent = /*#__PURE__*/React__default["default"].memo(neetoEditor.EditorContent);
@@ -491,59 +512,69 @@ var Preview = function Preview(_ref) {
491
512
  values = _useFormikContext.values;
492
513
  var _useTranslation = reactI18next.useTranslation(),
493
514
  t = _useTranslation.t;
494
- return /*#__PURE__*/React__default["default"].createElement("div", {
495
- className: "flex flex-col"
496
- }, /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
497
- className: "mb-3 block md:hidden",
498
- lineHeight: "normal",
499
- style: "h3",
500
- weight: "semibold"
501
- }, t("neetoThankYou.thankYou.preview")), /*#__PURE__*/React__default["default"].createElement("div", {
502
- className: classNames__default["default"]("neeto-thank-you-configuration-preview", {
503
- "neeto-thank-you-configuration-alignment--left": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.left,
504
- "neeto-thank-you-configuration-alignment--center": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.center,
505
- "pointer-events-none": !isPublished
506
- })
507
- }, /*#__PURE__*/React__default["default"].createElement("div", {
508
- className: "neeto-thank-you-configuration-preview__browser-header"
509
- }, /*#__PURE__*/React__default["default"].createElement(SvgBrowserControls, null)), /*#__PURE__*/React__default["default"].createElement("div", {
510
- className: "neeto-thank-you-configuration"
511
- }, /*#__PURE__*/React__default["default"].createElement("main", {
512
- className: "neeto-thank-you-configuration__main"
513
- }, /*#__PURE__*/React__default["default"].createElement("div", {
514
- className: "neeto-thank-you-configuration__box"
515
- }, !ramda.isEmpty(values === null || values === void 0 ? void 0 : values.imageUrl) && /*#__PURE__*/React__default["default"].createElement("div", {
516
- className: "neeto-thank-you-configuration__img"
517
- }, /*#__PURE__*/React__default["default"].createElement("img", {
518
- alt: "",
519
- src: values.imageUrl
520
- })), (values === null || values === void 0 ? void 0 : values.message) && /*#__PURE__*/React__default["default"].createElement("div", {
521
- className: "neeto-thank-you-configuration__description"
522
- }, /*#__PURE__*/React__default["default"].createElement(MemoizedEditorContent, {
523
- content: values.message,
524
- "data-cy": "preview-editor-content"
525
- })), (values === null || values === void 0 ? void 0 : values.showResubmitLink) && /*#__PURE__*/React__default["default"].createElement("a", {
526
- className: "neeto-thank-you-configuration__resubmit",
527
- href: resubmitLink
528
- }, (_values$resubmitLinkT = values === null || values === void 0 ? void 0 : values.resubmitLinkText) !== null && _values$resubmitLinkT !== void 0 ? _values$resubmitLinkT : t("neetoThankYou.thankYou.resubmit")), (values === null || values === void 0 ? void 0 : values.socialSharingEnabled) && /*#__PURE__*/React__default["default"].createElement(SocialShare, {
529
- publicLinkId: publicLinkId,
530
- socialHandles: socialHandles
531
- })))), (values === null || values === void 0 ? void 0 : values.brandingEnabled) && neetoCist.isPresent(brandingInfo) && /*#__PURE__*/React__default["default"].createElement(BrandingInfo, {
532
- appName: appName,
533
- brandingInfo: brandingInfo
534
- })));
515
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
516
+ className: "flex flex-col",
517
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
518
+ className: "mb-3 block md:hidden",
519
+ lineHeight: "normal",
520
+ style: "h3",
521
+ weight: "semibold",
522
+ children: t("neetoThankYou.thankYou.preview")
523
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
524
+ className: classNames__default["default"]("neeto-thank-you-configuration-preview", {
525
+ "neeto-thank-you-configuration-alignment--left": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.left,
526
+ "neeto-thank-you-configuration-alignment--center": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.center,
527
+ "pointer-events-none": !isPublished
528
+ }),
529
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
530
+ className: "neeto-thank-you-configuration-preview__browser-header",
531
+ children: /*#__PURE__*/jsxRuntime.jsx(SvgBrowserControls, {})
532
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
533
+ className: "neeto-thank-you-configuration",
534
+ children: /*#__PURE__*/jsxRuntime.jsx("main", {
535
+ className: "neeto-thank-you-configuration__main",
536
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
537
+ className: "neeto-thank-you-configuration__box",
538
+ children: [!ramda.isEmpty(values === null || values === void 0 ? void 0 : values.imageUrl) && /*#__PURE__*/jsxRuntime.jsx("div", {
539
+ className: "neeto-thank-you-configuration__img",
540
+ children: /*#__PURE__*/jsxRuntime.jsx("img", {
541
+ alt: "",
542
+ src: values.imageUrl
543
+ })
544
+ }), (values === null || values === void 0 ? void 0 : values.message) && /*#__PURE__*/jsxRuntime.jsx("div", {
545
+ className: "neeto-thank-you-configuration__description",
546
+ children: /*#__PURE__*/jsxRuntime.jsx(MemoizedEditorContent, {
547
+ content: values.message,
548
+ "data-cy": "preview-editor-content"
549
+ })
550
+ }), (values === null || values === void 0 ? void 0 : values.showResubmitLink) && /*#__PURE__*/jsxRuntime.jsx("a", {
551
+ className: "neeto-thank-you-configuration__resubmit",
552
+ href: resubmitLink,
553
+ children: (_values$resubmitLinkT = values === null || values === void 0 ? void 0 : values.resubmitLinkText) !== null && _values$resubmitLinkT !== void 0 ? _values$resubmitLinkT : t("neetoThankYou.thankYou.resubmit")
554
+ }), (values === null || values === void 0 ? void 0 : values.socialSharingEnabled) && /*#__PURE__*/jsxRuntime.jsx(SocialShare, {
555
+ publicLinkId: publicLinkId,
556
+ socialHandles: socialHandles
557
+ })]
558
+ })
559
+ })
560
+ }), (values === null || values === void 0 ? void 0 : values.brandingEnabled) && /*#__PURE__*/jsxRuntime.jsx(BrandingInfo, {
561
+ appName: appName,
562
+ brandingInfo: brandingInfo
563
+ })]
564
+ })]
565
+ });
535
566
  };
536
567
 
537
568
  var ExternalLink = function ExternalLink() {
538
569
  var _useTranslation = reactI18next.useTranslation(),
539
570
  t = _useTranslation.t;
540
- return /*#__PURE__*/React__default["default"].createElement(Input__default["default"], {
571
+ return /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
541
572
  autoFocus: true,
542
573
  required: true,
543
574
  label: t("neetoThankYou.thankYou.link"),
544
575
  name: "redirectUrl",
545
576
  placeholder: EXTERNAL_URL_PREFIX,
546
- prefix: /*#__PURE__*/React__default["default"].createElement(neetoIcons.Link, null)
577
+ prefix: /*#__PURE__*/jsxRuntime.jsx(neetoIcons.Link, {})
547
578
  });
548
579
  };
549
580
 
@@ -551,15 +582,17 @@ var Label = function Label(_ref) {
551
582
  var label = _ref.label,
552
583
  description = _ref.description,
553
584
  kind = _ref.kind;
554
- return /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
585
+ return /*#__PURE__*/jsxRuntime.jsxs(Typography__default["default"], {
555
586
  className: "neeto-ui-text-gray-700",
556
587
  "data-cy": "neeto-thank-you-configuration-".concat(neetoCist.hyphenate(kind), "-label"),
557
588
  style: "body2",
558
- weight: "semibold"
559
- }, label, /*#__PURE__*/React__default["default"].createElement("span", {
560
- className: "block text-xs font-normal leading-snug",
561
- "data-cy": "neeto-thank-you-configuration-".concat(neetoCist.hyphenate(kind), "-description")
562
- }, description));
589
+ weight: "semibold",
590
+ children: [label, /*#__PURE__*/jsxRuntime.jsx("span", {
591
+ className: "block text-xs font-normal leading-snug",
592
+ "data-cy": "neeto-thank-you-configuration-".concat(neetoCist.hyphenate(kind), "-description"),
593
+ children: description
594
+ })]
595
+ });
563
596
  };
564
597
 
565
598
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -595,15 +628,16 @@ var Form = function Form(_ref) {
595
628
  editor: {}
596
629
  });
597
630
  if (isLoading) {
598
- return /*#__PURE__*/React__default["default"].createElement("div", {
599
- className: "flex h-full w-full items-center justify-center"
600
- }, /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null));
631
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
632
+ className: "flex h-full w-full items-center justify-center",
633
+ children: /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {})
634
+ });
601
635
  }
602
636
  var resetEditor = function resetEditor() {
603
637
  var _editorRef$current$ed;
604
638
  return (_editorRef$current$ed = editorRef.current.editor) === null || _editorRef$current$ed === void 0 ? void 0 : _editorRef$current$ed.commands.setContent(thankYouConfiguration.message);
605
639
  };
606
- return /*#__PURE__*/React__default["default"].createElement(NeetoUIForm__default["default"], {
640
+ return /*#__PURE__*/jsxRuntime.jsx(NeetoUIForm__default["default"], {
607
641
  formikProps: {
608
642
  enableReinitialize: true,
609
643
  initialValues: _objectSpread(_objectSpread({}, DEFAULT_IMAGE_PROPERTIES), thankYouConfiguration),
@@ -623,60 +657,64 @@ var Form = function Form(_ref) {
623
657
  }
624
658
  });
625
659
  }
626
- }
627
- }, function (_ref2) {
628
- var values = _ref2.values;
629
- return /*#__PURE__*/React__default["default"].createElement("div", {
630
- className: "grid grid-cols-1 gap-10 pb-6 md:grid-cols-2 md:gap-6"
631
- }, /*#__PURE__*/React__default["default"].createElement("div", {
632
- className: "flex flex-col"
633
- }, blockNavigation && /*#__PURE__*/React__default["default"].createElement(BlockNavigation__default["default"], null), !disableRadioSelection && /*#__PURE__*/React__default["default"].createElement("div", {
634
- className: "mb-6 w-full"
635
- }, /*#__PURE__*/React__default["default"].createElement(Radio__default["default"], {
636
- containerClassName: "grid grid-cols-1 sm:grid-cols-2 gap-6 items-stretch w-full",
637
- name: "kind"
638
- }, Object.values(FORM_OPTIONS).map(function (option) {
639
- return /*#__PURE__*/React__default["default"].createElement(Radio__default["default"].Item, {
640
- key: option.kind,
641
- label: /*#__PURE__*/React__default["default"].createElement(Label, option),
642
- name: "kind",
643
- value: option.kind,
644
- className: classNames__default["default"]("neeto-thank-you-configuration-radio__item", {
645
- active: values.kind === option.kind
646
- })
660
+ },
661
+ children: function children(_ref2) {
662
+ var values = _ref2.values;
663
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
664
+ className: "grid grid-cols-1 gap-10 pb-6 md:grid-cols-2 md:gap-6",
665
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
666
+ className: "flex flex-col",
667
+ children: [blockNavigation && /*#__PURE__*/jsxRuntime.jsx(BlockNavigation__default["default"], {}), !disableRadioSelection && /*#__PURE__*/jsxRuntime.jsx("div", {
668
+ className: "mb-6 w-full",
669
+ children: /*#__PURE__*/jsxRuntime.jsx(Radio__default["default"], {
670
+ containerClassName: "grid grid-cols-1 sm:grid-cols-2 gap-6 items-stretch w-full",
671
+ name: "kind",
672
+ children: Object.values(FORM_OPTIONS).map(function (option) {
673
+ return /*#__PURE__*/jsxRuntime.jsx(Radio__default["default"].Item, {
674
+ label: /*#__PURE__*/jsxRuntime.jsx(Label, _objectSpread({}, option)),
675
+ name: "kind",
676
+ value: option.kind,
677
+ className: classNames__default["default"]("neeto-thank-you-configuration-radio__item", {
678
+ active: values.kind === option.kind
679
+ })
680
+ }, option.kind);
681
+ })
682
+ })
683
+ }), values.kind === FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsxRuntime.jsx(Customize, {
684
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
685
+ editorRef: editorRef,
686
+ entityId: entityId,
687
+ hasImageUploader: hasImageUploader,
688
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
689
+ uniqueSubmissionLink: uniqueSubmissionLink,
690
+ disableSocialShare: ramda.isEmpty(socialHandles)
691
+ }) : /*#__PURE__*/jsxRuntime.jsx(ExternalLink, {}), /*#__PURE__*/jsxRuntime.jsx(ActionBlock__default["default"], {
692
+ className: "mt-6",
693
+ isSubmitting: isUpdatingForm,
694
+ cancelButtonProps: _objectSpread({
695
+ "data-cy": "neeto-thank-you-configuration-cancel-button"
696
+ }, redirectToOnCancel ? {
697
+ to: redirectToOnCancel,
698
+ onClick: neetoCist.noop
699
+ } : {
700
+ type: "reset",
701
+ onClick: resetEditor
702
+ }),
703
+ submitButtonProps: {
704
+ "data-cy": "neeto-thank-you-configuration-save-button"
705
+ }
706
+ })]
707
+ }), values.kind === FORM_OPTIONS.customize.kind && /*#__PURE__*/jsxRuntime.jsx(Preview, {
708
+ appName: appName,
709
+ brandingInfo: brandingInfo,
710
+ isPublished: isPublished,
711
+ publicLinkId: publicLinkId,
712
+ resubmitLink: resubmitLink,
713
+ socialHandles: socialHandles,
714
+ thankYouTextAlignment: thankYouTextAlignment
715
+ })]
647
716
  });
648
- }))), values.kind === FORM_OPTIONS.customize.kind ? /*#__PURE__*/React__default["default"].createElement(Customize, {
649
- disableSubmitAnotherResponse: disableSubmitAnotherResponse,
650
- editorRef: editorRef,
651
- entityId: entityId,
652
- hasImageUploader: hasImageUploader,
653
- uniqueSubmissionEnabled: uniqueSubmissionEnabled,
654
- uniqueSubmissionLink: uniqueSubmissionLink,
655
- disableSocialShare: ramda.isEmpty(socialHandles)
656
- }) : /*#__PURE__*/React__default["default"].createElement(ExternalLink, null), /*#__PURE__*/React__default["default"].createElement(ActionBlock__default["default"], {
657
- className: "mt-6",
658
- isSubmitting: isUpdatingForm,
659
- cancelButtonProps: _objectSpread({
660
- "data-cy": "neeto-thank-you-configuration-cancel-button"
661
- }, redirectToOnCancel ? {
662
- to: redirectToOnCancel,
663
- onClick: neetoCist.noop
664
- } : {
665
- type: "reset",
666
- onClick: resetEditor
667
- }),
668
- submitButtonProps: {
669
- "data-cy": "neeto-thank-you-configuration-save-button"
670
- }
671
- })), values.kind === FORM_OPTIONS.customize.kind && /*#__PURE__*/React__default["default"].createElement(Preview, {
672
- appName: appName,
673
- brandingInfo: brandingInfo,
674
- isPublished: isPublished,
675
- publicLinkId: publicLinkId,
676
- resubmitLink: resubmitLink,
677
- socialHandles: socialHandles,
678
- thankYouTextAlignment: thankYouTextAlignment
679
- }));
717
+ }
680
718
  });
681
719
  };
682
720
 
@@ -684,13 +722,14 @@ var Header = function Header(_ref) {
684
722
  var breadcrumbs = _ref.breadcrumbs;
685
723
  var _useTranslation = reactI18next.useTranslation(),
686
724
  t = _useTranslation.t;
687
- return /*#__PURE__*/React__default["default"].createElement("div", {
688
- className: "w-full px-6"
689
- }, /*#__PURE__*/React__default["default"].createElement(NeetoUIHeader__default["default"], {
690
- breadcrumbs: breadcrumbs,
691
- size: "small",
692
- title: t("neetoThankYou.common.thankYou")
693
- }));
725
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
726
+ className: "w-full px-6",
727
+ children: /*#__PURE__*/jsxRuntime.jsx(NeetoUIHeader__default["default"], {
728
+ breadcrumbs: breadcrumbs,
729
+ size: "small",
730
+ title: t("neetoThankYou.common.thankYou")
731
+ })
732
+ });
694
733
  };
695
734
 
696
735
  var ConfigureThankYou = function ConfigureThankYou(_ref) {
@@ -720,32 +759,35 @@ var ConfigureThankYou = function ConfigureThankYou(_ref) {
720
759
  blockNavigation = _ref$blockNavigation === void 0 ? false : _ref$blockNavigation,
721
760
  _ref$onConfigUpdateSu = _ref.onConfigUpdateSuccess,
722
761
  onConfigUpdateSuccess = _ref$onConfigUpdateSu === void 0 ? neetoCist.noop : _ref$onConfigUpdateSu,
723
- _ref$brandingInfo = _ref.brandingInfo,
724
- brandingInfo = _ref$brandingInfo === void 0 ? {} : _ref$brandingInfo;
725
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, customHeader || /*#__PURE__*/React__default["default"].createElement(Header, {
726
- breadcrumbs: breadcrumbs
727
- }), /*#__PURE__*/React__default["default"].createElement(Scrollable__default["default"], {
728
- className: "w-full p-6 pt-0"
729
- }, /*#__PURE__*/React__default["default"].createElement("div", {
730
- className: "mx-auto h-full max-w-7xl"
731
- }, /*#__PURE__*/React__default["default"].createElement(Form, {
732
- appName: appName,
733
- blockNavigation: blockNavigation,
734
- brandingInfo: brandingInfo,
735
- disableRadioSelection: disableRadioSelection,
736
- disableSubmitAnotherResponse: disableSubmitAnotherResponse,
737
- entityId: entityId,
738
- hasImageUploader: hasImageUploader,
739
- isPublished: isPublished,
740
- onConfigUpdateSuccess: onConfigUpdateSuccess,
741
- publicLinkId: publicLinkId,
742
- redirectToOnCancel: redirectToOnCancel,
743
- resubmitLink: resubmitLink,
744
- socialHandles: socialHandles,
745
- thankYouTextAlignment: thankYouTextAlignment,
746
- uniqueSubmissionEnabled: uniqueSubmissionEnabled,
747
- uniqueSubmissionLink: uniqueSubmissionLink
748
- }))));
762
+ brandingInfo = _ref.brandingInfo;
763
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
764
+ children: [customHeader || /*#__PURE__*/jsxRuntime.jsx(Header, {
765
+ breadcrumbs: breadcrumbs
766
+ }), /*#__PURE__*/jsxRuntime.jsx(Scrollable__default["default"], {
767
+ className: "w-full p-6 pt-0",
768
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
769
+ className: "mx-auto h-full max-w-7xl",
770
+ children: /*#__PURE__*/jsxRuntime.jsx(Form, {
771
+ appName: appName,
772
+ blockNavigation: blockNavigation,
773
+ brandingInfo: brandingInfo,
774
+ disableRadioSelection: disableRadioSelection,
775
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
776
+ entityId: entityId,
777
+ hasImageUploader: hasImageUploader,
778
+ isPublished: isPublished,
779
+ onConfigUpdateSuccess: onConfigUpdateSuccess,
780
+ publicLinkId: publicLinkId,
781
+ redirectToOnCancel: redirectToOnCancel,
782
+ resubmitLink: resubmitLink,
783
+ socialHandles: socialHandles,
784
+ thankYouTextAlignment: thankYouTextAlignment,
785
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
786
+ uniqueSubmissionLink: uniqueSubmissionLink
787
+ })
788
+ })
789
+ })]
790
+ });
749
791
  };
750
792
 
751
793
  var baseUrl = "".concat(THANK_YOU_ENGINE_BASE_URL, "/thank_you_page");
@@ -779,9 +821,10 @@ var buildDraftUrl = function buildDraftUrl(url) {
779
821
  };
780
822
 
781
823
  var DefaultPageLoader = function DefaultPageLoader() {
782
- return /*#__PURE__*/React__default["default"].createElement("div", {
783
- className: "neeto-thank-you-configuration"
784
- }, /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null));
824
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
825
+ className: "neeto-thank-you-configuration",
826
+ children: /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {})
827
+ });
785
828
  };
786
829
  var ShowThankYou = function ShowThankYou(_ref) {
787
830
  var _thankYouConfiguratio;
@@ -793,8 +836,7 @@ var ShowThankYou = function ShowThankYou(_ref) {
793
836
  publicLinkId = _ref.publicLinkId,
794
837
  appName = _ref.appName,
795
838
  CustomPageLoader = _ref.customPageLoader,
796
- _ref$brandingInfo = _ref.brandingInfo,
797
- brandingInfo = _ref$brandingInfo === void 0 ? {} : _ref$brandingInfo;
839
+ brandingInfo = _ref.brandingInfo;
798
840
  var _useTranslation = reactI18next.useTranslation(),
799
841
  t = _useTranslation.t;
800
842
  var _useShowThankYouPage = useShowThankYouPage({
@@ -806,35 +848,42 @@ var ShowThankYou = function ShowThankYou(_ref) {
806
848
  isLoading = _useShowThankYouPage.isLoading;
807
849
  var PageLoader = CustomPageLoader || DefaultPageLoader;
808
850
  if (isLoading && isThankYouPageLoading) {
809
- return /*#__PURE__*/React__default["default"].createElement(PageLoader, null);
851
+ return /*#__PURE__*/jsxRuntime.jsx(PageLoader, {});
810
852
  }
811
- return /*#__PURE__*/React__default["default"].createElement("div", {
812
- className: "neeto-thank-you-configuration"
813
- }, /*#__PURE__*/React__default["default"].createElement("main", {
814
- className: "neeto-thank-you-configuration__main"
815
- }, /*#__PURE__*/React__default["default"].createElement("div", {
816
- className: "neeto-thank-you-configuration__box"
817
- }, !ramda.isEmpty(thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.imageUrl) && /*#__PURE__*/React__default["default"].createElement("div", {
818
- className: "neeto-thank-you-configuration__img"
819
- }, /*#__PURE__*/React__default["default"].createElement("img", {
820
- alt: "",
821
- src: thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.imageUrl
822
- })), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.message) && /*#__PURE__*/React__default["default"].createElement("div", {
823
- className: "neeto-thank-you-configuration__description"
824
- }, /*#__PURE__*/React__default["default"].createElement(neetoEditor.EditorContent, {
825
- content: thankYouConfiguration.message
826
- })), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.showResubmitLink) && /*#__PURE__*/React__default["default"].createElement("a", {
827
- className: "neeto-thank-you-configuration__resubmit",
828
- href: isDraftPreview ? buildDraftUrl(resubmitLink) : resubmitLink
829
- }, (_thankYouConfiguratio = thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.resubmitLinkText) !== null && _thankYouConfiguratio !== void 0 ? _thankYouConfiguratio : t("neetoThankYou.common.resubmit")), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.socialSharingEnabled) && /*#__PURE__*/React__default["default"].createElement(SocialShare, {
830
- publicLinkId: publicLinkId,
831
- socialHandles: socialHandles
832
- }), isDraftPreview && /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
833
- style: "body3"
834
- }, t("neetoThankYou.thankYou.draftVersionForm")))), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.brandingEnabled) && neetoCist.isPresent(brandingInfo) && /*#__PURE__*/React__default["default"].createElement(BrandingInfo, {
835
- appName: appName,
836
- brandingInfo: brandingInfo
837
- }));
853
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
854
+ className: "neeto-thank-you-configuration",
855
+ children: [/*#__PURE__*/jsxRuntime.jsx("main", {
856
+ className: "neeto-thank-you-configuration__main",
857
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
858
+ className: "neeto-thank-you-configuration__box",
859
+ children: [!ramda.isEmpty(thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.imageUrl) && /*#__PURE__*/jsxRuntime.jsx("div", {
860
+ className: "neeto-thank-you-configuration__img",
861
+ children: /*#__PURE__*/jsxRuntime.jsx("img", {
862
+ alt: "",
863
+ src: thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.imageUrl
864
+ })
865
+ }), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.message) && /*#__PURE__*/jsxRuntime.jsx("div", {
866
+ className: "neeto-thank-you-configuration__description",
867
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoEditor.EditorContent, {
868
+ content: thankYouConfiguration.message
869
+ })
870
+ }), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.showResubmitLink) && /*#__PURE__*/jsxRuntime.jsx("a", {
871
+ className: "neeto-thank-you-configuration__resubmit",
872
+ href: isDraftPreview ? buildDraftUrl(resubmitLink) : resubmitLink,
873
+ children: (_thankYouConfiguratio = thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.resubmitLinkText) !== null && _thankYouConfiguratio !== void 0 ? _thankYouConfiguratio : t("neetoThankYou.common.resubmit")
874
+ }), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.socialSharingEnabled) && /*#__PURE__*/jsxRuntime.jsx(SocialShare, {
875
+ publicLinkId: publicLinkId,
876
+ socialHandles: socialHandles
877
+ }), isDraftPreview && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
878
+ style: "body3",
879
+ children: t("neetoThankYou.thankYou.draftVersionForm")
880
+ })]
881
+ })
882
+ }), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.brandingEnabled) && /*#__PURE__*/jsxRuntime.jsx(BrandingInfo, {
883
+ appName: appName,
884
+ brandingInfo: brandingInfo
885
+ })]
886
+ });
838
887
  };
839
888
 
840
889
  var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}