@bigbinary/neeto-thank-you-frontend 2.0.4 → 2.1.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.
Files changed (66) hide show
  1. package/app/javascript/src/translations/en.json +1 -0
  2. package/dist/BrandingInfo-cb3c7c87.js +26 -0
  3. package/dist/BrandingInfo-cb3c7c87.js.map +1 -0
  4. package/dist/ConfigureThankYou.js +467 -379
  5. package/dist/ConfigureThankYou.js.map +1 -1
  6. package/dist/ShowThankYou.js +80 -69
  7. package/dist/ShowThankYou.js.map +1 -1
  8. package/dist/SocialShare-4ece80cd.js +44 -0
  9. package/dist/SocialShare-4ece80cd.js.map +1 -0
  10. package/dist/cjs/BrandingInfo-2f9123ba.js +28 -0
  11. package/dist/cjs/BrandingInfo-2f9123ba.js.map +1 -0
  12. package/dist/cjs/ConfigureThankYou.js +468 -381
  13. package/dist/cjs/ConfigureThankYou.js.map +1 -1
  14. package/dist/cjs/ShowThankYou.js +80 -70
  15. package/dist/cjs/ShowThankYou.js.map +1 -1
  16. package/dist/cjs/SocialShare-5ebb5ae3.js +48 -0
  17. package/dist/cjs/SocialShare-5ebb5ae3.js.map +1 -0
  18. package/dist/cjs/commons.js +24 -27
  19. package/dist/cjs/commons.js.map +1 -1
  20. package/dist/cjs/constants.js +3 -3
  21. package/dist/cjs/constants.js.map +1 -1
  22. package/dist/cjs/index.js +10 -9
  23. package/dist/cjs/index.js.map +1 -1
  24. package/dist/cjs/{query-95d5312e.js → query-63e48fba.js} +3 -3
  25. package/dist/cjs/{query-95d5312e.js.map → query-63e48fba.js.map} +1 -1
  26. package/dist/cjs/useShowThankYouConfiguration.js +2 -2
  27. package/dist/cjs/useShowThankYouPage.js +2 -2
  28. package/dist/cjs/useThankYouConfigurationApi-27b0ace0.js +101 -0
  29. package/dist/cjs/useThankYouConfigurationApi-27b0ace0.js.map +1 -0
  30. package/dist/cjs/useThankYouPageApi-8d0e4fbc.js +41 -0
  31. package/dist/cjs/useThankYouPageApi-8d0e4fbc.js.map +1 -0
  32. package/dist/cjs/utils.js +11 -5
  33. package/dist/cjs/utils.js.map +1 -1
  34. package/dist/commons.js +24 -23
  35. package/dist/commons.js.map +1 -1
  36. package/dist/constants.js +3 -3
  37. package/dist/constants.js.map +1 -1
  38. package/dist/index.js +10 -9
  39. package/dist/index.js.map +1 -1
  40. package/dist/{query-ab526f47.js → query-3e439d01.js} +3 -3
  41. package/dist/{query-ab526f47.js.map → query-3e439d01.js.map} +1 -1
  42. package/dist/useShowThankYouConfiguration.js +3 -3
  43. package/dist/useShowThankYouPage.js +3 -3
  44. package/dist/useThankYouConfigurationApi-5b45610e.js +93 -0
  45. package/dist/useThankYouConfigurationApi-5b45610e.js.map +1 -0
  46. package/dist/useThankYouPageApi-660012d0.js +35 -0
  47. package/dist/useThankYouPageApi-660012d0.js.map +1 -0
  48. package/dist/utils.js +11 -5
  49. package/dist/utils.js.map +1 -1
  50. package/package.json +14 -14
  51. package/dist/BrandingInfo-da0b773a.js +0 -32
  52. package/dist/BrandingInfo-da0b773a.js.map +0 -1
  53. package/dist/SocialShare-e7e5efc6.js +0 -45
  54. package/dist/SocialShare-e7e5efc6.js.map +0 -1
  55. package/dist/cjs/BrandingInfo-cdb9a379.js +0 -38
  56. package/dist/cjs/BrandingInfo-cdb9a379.js.map +0 -1
  57. package/dist/cjs/SocialShare-4607aba6.js +0 -53
  58. package/dist/cjs/SocialShare-4607aba6.js.map +0 -1
  59. package/dist/cjs/useThankYouConfigurationApi-302df56a.js +0 -58
  60. package/dist/cjs/useThankYouConfigurationApi-302df56a.js.map +0 -1
  61. package/dist/cjs/useThankYouPageApi-b6b47745.js +0 -43
  62. package/dist/cjs/useThankYouPageApi-b6b47745.js.map +0 -1
  63. package/dist/useThankYouConfigurationApi-ed20746a.js +0 -51
  64. package/dist/useThankYouConfigurationApi-ed20746a.js.map +0 -1
  65. package/dist/useThankYouPageApi-1ac56883.js +0 -37
  66. package/dist/useThankYouPageApi-1ac56883.js.map +0 -1
@@ -1,16 +1,16 @@
1
- import * as React from 'react';
2
- import React__default, { useState, useEffect, useRef } from 'react';
3
1
  import { hyphenate, noop } from '@bigbinary/neeto-cist';
4
- import Scrollable from '@bigbinary/neeto-molecules/Scrollable';
5
- import { n, T as THANK_YOU_TEXT_ALIGNMENTS, S as SocialShare } from './SocialShare-e7e5efc6.js';
2
+ import { n, T as THANK_YOU_TEXT_ALIGNMENTS, S as SocialShare } from './SocialShare-4ece80cd.js';
3
+ import { u as useShowThankYouConfiguration, _ as _defineProperty, a as useUpdateThankYouConfiguration } from './useThankYouConfigurationApi-5b45610e.js';
4
+ import * as React from 'react';
5
+ import { useState, useEffect, memo, useRef } from 'react';
6
6
  import classNames from 'classnames';
7
+ import MobilePreviewHeader from '@bigbinary/neeto-molecules/MobilePreviewHeader';
7
8
  import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
8
9
  import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
9
10
  import BlockNavigation from '@bigbinary/neetoui/formik/BlockNavigation';
10
11
  import NeetoUIForm from '@bigbinary/neetoui/formik/Form';
11
12
  import Radio from '@bigbinary/neetoui/formik/Radio';
12
13
  import { isEmpty } from 'ramda';
13
- import { u as useShowThankYouConfiguration, a as useUpdateThankYouConfiguration } from './useThankYouConfigurationApi-ed20746a.js';
14
14
  import { t } from 'i18next';
15
15
  import { useFormikContext } from 'formik';
16
16
  import FormikEditor from '@bigbinary/neeto-editor/FormikEditor';
@@ -19,28 +19,29 @@ import Input from '@bigbinary/neetoui/formik/Input';
19
19
  import Switch from '@bigbinary/neetoui/formik/Switch';
20
20
  import { useTranslation } from 'react-i18next';
21
21
  import { ImageUploader } from '@bigbinary/neeto-image-uploader-frontend';
22
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
22
23
  import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
23
24
  import Button from '@bigbinary/neetoui/Button';
24
25
  import Typography from '@bigbinary/neetoui/Typography';
25
26
  import Modal from '@bigbinary/neetoui/Modal';
26
27
  import EditorContent from '@bigbinary/neeto-editor/EditorContent';
27
- import { B as BrandingInfo } from './BrandingInfo-da0b773a.js';
28
+ import { B as BrandingInfo } from './BrandingInfo-cb3c7c87.js';
28
29
  import Link from '@bigbinary/neeto-icons/Link';
30
+ import NeetoUIHeader from '@bigbinary/neeto-molecules/Header';
29
31
  import { isEditorEmpty } from '@bigbinary/neeto-editor/utils';
30
32
  import * as yup from 'yup';
31
- import NeetoUIHeader from '@bigbinary/neeto-molecules/Header';
32
33
  import '@tanstack/react-query';
33
34
  import 'axios';
34
- import './query-ab526f47.js';
35
+ import './query-3e439d01.js';
35
36
  import './utils.js';
36
37
  import '@bigbinary/neeto-commons-frontend/utils';
37
38
  import './constants.js';
38
39
  import '@bigbinary/neeto-commons-frontend/initializers';
39
40
 
40
- var css = ".neeto-thank-you-configuration-radio__item{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));border:1px solid rgb(var(--neeto-ui-gray-300));border-radius:var(--neeto-ui-rounded);padding:12px 16px}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item:not(:last-child){margin-right:0!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item{align-items:start!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item .neeto-ui-radio{margin-top:3px}.neeto-thank-you-configuration-radio__item.active{background-color:rgb(var(--neeto-ui-primary-100));border:1.5px solid rgb(var(--neeto-ui-primary-800))}";
41
+ var css = ".neeto-thank-you-configuration-radio__item{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));border:1px solid rgb(var(--neeto-ui-gray-300));border-radius:var(--neeto-ui-rounded);padding:12px 16px}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item:not(:last-child){margin-right:0!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item{align-items:start!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item .neeto-ui-radio{margin-top:3px}.neeto-thank-you-configuration-radio__item.active{border:1.5px solid rgb(var(--neeto-ui-primary-800))}";
41
42
  n(css,{});
42
43
 
43
- const FORM_OPTIONS = {
44
+ var FORM_OPTIONS = {
44
45
  customize: {
45
46
  label: t("neetoThankYou.thankYou.customize"),
46
47
  description: t("neetoThankYou.thankYou.customizeDescription"),
@@ -52,38 +53,77 @@ const FORM_OPTIONS = {
52
53
  kind: "redirect_to_url"
53
54
  }
54
55
  };
55
- const DEFAULT_IMAGE_PROPERTIES = {
56
+ var DEFAULT_IMAGE_PROPERTIES = {
56
57
  imageSignedId: null,
57
58
  imageUrl: ""
58
59
  };
59
- const EXTERNAL_URL_PREFIX = "https://";
60
+ var EXTERNAL_URL_PREFIX = "https://";
60
61
 
61
- function _extends$1() {
62
- _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
63
- for (var i = 1; i < arguments.length; i++) {
64
- var source = arguments[i];
65
- for (var key in source) {
66
- if (Object.prototype.hasOwnProperty.call(source, key)) {
67
- target[key] = source[key];
68
- }
62
+ function _arrayWithHoles(arr) {
63
+ if (Array.isArray(arr)) return arr;
64
+ }
65
+
66
+ function _iterableToArrayLimit(r, l) {
67
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
68
+ if (null != t) {
69
+ var e,
70
+ n,
71
+ i,
72
+ u,
73
+ a = [],
74
+ f = !0,
75
+ o = !1;
76
+ try {
77
+ if (i = (t = t.call(r)).next, 0 === l) {
78
+ if (Object(t) !== t) return;
79
+ f = !1;
80
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
81
+ } catch (r) {
82
+ o = !0, n = r;
83
+ } finally {
84
+ try {
85
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
86
+ } finally {
87
+ if (o) throw n;
69
88
  }
70
89
  }
71
- return target;
72
- };
73
- return _extends$1.apply(this, arguments);
90
+ return a;
91
+ }
92
+ }
93
+
94
+ function _arrayLikeToArray(arr, len) {
95
+ if (len == null || len > arr.length) len = arr.length;
96
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
97
+ return arr2;
98
+ }
99
+
100
+ function _unsupportedIterableToArray(o, minLen) {
101
+ if (!o) return;
102
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
103
+ var n = Object.prototype.toString.call(o).slice(8, -1);
104
+ if (n === "Object" && o.constructor) n = o.constructor.name;
105
+ if (n === "Map" || n === "Set") return Array.from(o);
106
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
74
107
  }
75
108
 
76
- const IMAGE_SIZE_LIMIT = 1; // MB
77
- const IMAGE_UPLOADER_CONFIG = {
109
+ function _nonIterableRest() {
110
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
111
+ }
112
+
113
+ function _slicedToArray(arr, i) {
114
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
115
+ }
116
+
117
+ var IMAGE_SIZE_LIMIT = 1; // MB
118
+ var IMAGE_UPLOADER_CONFIG = {
78
119
  maxImageSize: IMAGE_SIZE_LIMIT
79
120
  };
80
121
 
81
- const Image = () => {
82
- const {
83
- setFieldValue,
84
- values
85
- } = useFormikContext();
86
- const handleImageChange = image => {
122
+ var Image = function Image() {
123
+ var _useFormikContext = useFormikContext(),
124
+ setFieldValue = _useFormikContext.setFieldValue,
125
+ values = _useFormikContext.values;
126
+ var handleImageChange = function handleImageChange(image) {
87
127
  if (isEmpty(image.signedId)) {
88
128
  setFieldValue("imageUrl", "");
89
129
  setFieldValue("imageSignedId", null);
@@ -92,106 +132,122 @@ const Image = () => {
92
132
  setFieldValue("imageUrl", image.url);
93
133
  setFieldValue("imageSignedId", image.signedId);
94
134
  };
95
- return /*#__PURE__*/React__default.createElement(ImageUploader, {
135
+ return /*#__PURE__*/jsx(ImageUploader, {
96
136
  className: "h-60",
97
- key: values.imageUrl,
98
137
  src: values.imageUrl,
99
138
  uploadConfig: IMAGE_UPLOADER_CONFIG,
100
139
  onUploadComplete: handleImageChange
101
- });
140
+ }, values.imageUrl);
102
141
  };
103
142
 
104
- const ResubmissionWarningModal = withT(_ref => {
105
- let {
106
- t,
107
- isOpen,
108
- setIsOpen,
109
- uniqueSubmissionLink
110
- } = _ref;
111
- return /*#__PURE__*/React__default.createElement(Modal, {
112
- isOpen,
113
- onClose: () => setIsOpen(false)
114
- }, /*#__PURE__*/React__default.createElement(Modal.Header, null, /*#__PURE__*/React__default.createElement(Typography, {
115
- style: "h3",
116
- weight: "semibold"
117
- }, t("neetoThankYou.common.alert"), "!")), /*#__PURE__*/React__default.createElement(Modal.Body, null, t("neetoThankYou.thankYou.resubmissionWarning")), /*#__PURE__*/React__default.createElement(Modal.Footer, {
118
- className: "space-x-2"
119
- }, /*#__PURE__*/React__default.createElement(Button, {
120
- label: t("neetoThankYou.common.ok"),
121
- style: "tertiary",
122
- onClick: () => setIsOpen(false)
123
- }), /*#__PURE__*/React__default.createElement(Button, {
124
- label: t("neetoThankYou.thankYou.uniqueSubmissionLinkText"),
125
- to: uniqueSubmissionLink
126
- })));
143
+ var ResubmissionWarningModal = withT(function (_ref) {
144
+ var t = _ref.t,
145
+ isOpen = _ref.isOpen,
146
+ setIsOpen = _ref.setIsOpen,
147
+ uniqueSubmissionLink = _ref.uniqueSubmissionLink;
148
+ return /*#__PURE__*/jsxs(Modal, {
149
+ isOpen: isOpen,
150
+ onClose: function onClose() {
151
+ return setIsOpen(false);
152
+ },
153
+ children: [/*#__PURE__*/jsx(Modal.Header, {
154
+ children: /*#__PURE__*/jsxs(Typography, {
155
+ style: "h3",
156
+ weight: "semibold",
157
+ children: [t("neetoThankYou.common.alert"), "!"]
158
+ })
159
+ }), /*#__PURE__*/jsx(Modal.Body, {
160
+ children: t("neetoThankYou.thankYou.resubmissionWarning")
161
+ }), /*#__PURE__*/jsxs(Modal.Footer, {
162
+ className: "space-x-2",
163
+ children: [/*#__PURE__*/jsx(Button, {
164
+ label: t("neetoThankYou.common.ok"),
165
+ style: "tertiary",
166
+ onClick: function onClick() {
167
+ return setIsOpen(false);
168
+ }
169
+ }), /*#__PURE__*/jsx(Button, {
170
+ label: t("neetoThankYou.thankYou.uniqueSubmissionLinkText"),
171
+ to: uniqueSubmissionLink
172
+ })]
173
+ })]
174
+ });
127
175
  });
128
176
 
129
- const Customize = _ref => {
130
- let {
131
- editorRef,
132
- uniqueSubmissionEnabled,
133
- hasImageUploader,
134
- uniqueSubmissionLink,
135
- entityId,
136
- disableSocialShare,
137
- disableSubmitAnotherResponse,
138
- editorProps
139
- } = _ref;
140
- const [isUniqueSubmissionWarningModalOpen, setIsUniqueSubmissionWarningModalOpen] = useState(false);
141
- const {
142
- t
143
- } = useTranslation();
144
- const {
145
- values,
146
- setFieldValue
147
- } = useFormikContext();
148
- const {
149
- data: {
150
- thankYouConfiguration
151
- } = {},
152
- isFetching
153
- } = useShowThankYouConfiguration({
154
- entityId
155
- });
156
- useEffect(() => {
177
+ function ownKeys$1(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; }
178
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
179
+ var Customize = function Customize(_ref) {
180
+ var editorRef = _ref.editorRef,
181
+ uniqueSubmissionEnabled = _ref.uniqueSubmissionEnabled,
182
+ hasImageUploader = _ref.hasImageUploader,
183
+ uniqueSubmissionLink = _ref.uniqueSubmissionLink,
184
+ entityId = _ref.entityId,
185
+ disableSocialShare = _ref.disableSocialShare,
186
+ disableSubmitAnotherResponse = _ref.disableSubmitAnotherResponse,
187
+ editorProps = _ref.editorProps;
188
+ var _useState = useState(false),
189
+ _useState2 = _slicedToArray(_useState, 2),
190
+ isUniqueSubmissionWarningModalOpen = _useState2[0],
191
+ setIsUniqueSubmissionWarningModalOpen = _useState2[1];
192
+ var _useTranslation = useTranslation(),
193
+ t = _useTranslation.t;
194
+ var _useFormikContext = useFormikContext(),
195
+ values = _useFormikContext.values,
196
+ setFieldValue = _useFormikContext.setFieldValue;
197
+ var _useShowThankYouConfi = useShowThankYouConfiguration({
198
+ entityId: entityId
199
+ }),
200
+ _useShowThankYouConfi2 = _useShowThankYouConfi.data,
201
+ _useShowThankYouConfi3 = _useShowThankYouConfi2 === void 0 ? {} : _useShowThankYouConfi2,
202
+ thankYouConfiguration = _useShowThankYouConfi3.thankYouConfiguration,
203
+ isFetching = _useShowThankYouConfi.isFetching;
204
+ useEffect(function () {
205
+ var _editorRef$current$ed;
157
206
  if (isFetching) return;
158
207
  setFieldValue("message", thankYouConfiguration.message);
159
- editorRef.current.editor?.commands.setContent(thankYouConfiguration.message);
208
+ (_editorRef$current$ed = editorRef.current.editor) === null || _editorRef$current$ed === void 0 || _editorRef$current$ed.commands.setContent(thankYouConfiguration.message);
160
209
  }, [isFetching]);
161
- const handleResubmitLinkChange = event => {
210
+ var handleResubmitLinkChange = function handleResubmitLinkChange(event) {
162
211
  uniqueSubmissionEnabled ? setIsUniqueSubmissionWarningModalOpen(true) : setFieldValue("showResubmitLink", event.target.checked);
163
212
  };
164
- return /*#__PURE__*/React__default.createElement("div", {
165
- className: "flex flex-col gap-4"
166
- }, hasImageUploader && /*#__PURE__*/React__default.createElement("div", {
167
- className: "flex flex-col gap-2"
168
- }, /*#__PURE__*/React__default.createElement(Label$1, null, t("neetoThankYou.thankYou.imageLabel")), /*#__PURE__*/React__default.createElement(Image, null)), /*#__PURE__*/React__default.createElement("div", {
169
- className: "flex flex-col gap-2"
170
- }, /*#__PURE__*/React__default.createElement(FormikEditor, _extends$1({
171
- required: true,
172
- "data-cy": "thank-you-message-editor",
173
- label: t("neetoThankYou.thankYou.messageLabel"),
174
- name: "message",
175
- ref: editorRef
176
- }, editorProps))), !disableSocialShare && /*#__PURE__*/React__default.createElement(Switch, {
177
- label: t("neetoThankYou.thankYou.socialShareIcons"),
178
- name: "socialSharingEnabled"
179
- }), !disableSubmitAnotherResponse && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Switch, {
180
- label: t("neetoThankYou.thankYou.showResubmitLink"),
181
- name: "showResubmitLink",
182
- className: classNames({
183
- "neeto-ui-switch--disabled": uniqueSubmissionEnabled
184
- }),
185
- onChange: handleResubmitLinkChange
186
- }), values.showResubmitLink && /*#__PURE__*/React__default.createElement(Input, {
187
- required: true,
188
- label: t("neetoThankYou.thankYou.resubmitLinkText"),
189
- name: "resubmitLinkText"
190
- })), /*#__PURE__*/React__default.createElement(ResubmissionWarningModal, {
191
- uniqueSubmissionLink,
192
- isOpen: isUniqueSubmissionWarningModalOpen,
193
- setIsOpen: setIsUniqueSubmissionWarningModalOpen
194
- }));
213
+ return /*#__PURE__*/jsxs("div", {
214
+ className: "flex flex-col gap-4",
215
+ children: [hasImageUploader && /*#__PURE__*/jsxs("div", {
216
+ className: "flex flex-col gap-2",
217
+ children: [/*#__PURE__*/jsx(Label$1, {
218
+ children: t("neetoThankYou.thankYou.imageLabel")
219
+ }), /*#__PURE__*/jsx(Image, {})]
220
+ }), /*#__PURE__*/jsx("div", {
221
+ className: "flex flex-col gap-2",
222
+ children: /*#__PURE__*/jsx(FormikEditor, _objectSpread$1({
223
+ required: true,
224
+ "data-cy": "thank-you-message-editor",
225
+ label: t("neetoThankYou.thankYou.messageLabel"),
226
+ name: "message",
227
+ ref: editorRef
228
+ }, editorProps))
229
+ }), !disableSocialShare && /*#__PURE__*/jsx(Switch, {
230
+ label: t("neetoThankYou.thankYou.socialShareIcons"),
231
+ name: "socialSharingEnabled"
232
+ }), !disableSubmitAnotherResponse && /*#__PURE__*/jsxs(Fragment, {
233
+ children: [/*#__PURE__*/jsx(Switch, {
234
+ label: t("neetoThankYou.thankYou.showResubmitLink"),
235
+ name: "showResubmitLink",
236
+ className: classNames({
237
+ "neeto-ui-switch--disabled": uniqueSubmissionEnabled
238
+ }),
239
+ onChange: handleResubmitLinkChange
240
+ }), values.showResubmitLink && /*#__PURE__*/jsx(Input, {
241
+ required: true,
242
+ label: t("neetoThankYou.thankYou.resubmitLinkText"),
243
+ name: "resubmitLinkText"
244
+ })]
245
+ }), /*#__PURE__*/jsx(ResubmissionWarningModal, {
246
+ uniqueSubmissionLink: uniqueSubmissionLink,
247
+ isOpen: isUniqueSubmissionWarningModalOpen,
248
+ setIsOpen: setIsUniqueSubmissionWarningModalOpen
249
+ })]
250
+ });
195
251
  };
196
252
 
197
253
  var _ellipse, _ellipse2, _ellipse3;
@@ -221,102 +277,123 @@ const SvgBrowserControls = props => /*#__PURE__*/React.createElement("svg", _ext
221
277
  ry: 5.859
222
278
  })));
223
279
 
224
- const MemoizedEditorContent = /*#__PURE__*/React__default.memo(EditorContent);
225
- const Preview = _ref => {
226
- let {
227
- socialHandles,
228
- thankYouTextAlignment,
229
- resubmitLink,
230
- publicLinkId,
231
- isPublished,
232
- appName,
233
- brandingInfo
234
- } = _ref;
235
- const {
236
- values
237
- } = useFormikContext();
238
- const {
239
- t
240
- } = useTranslation();
241
- return /*#__PURE__*/React__default.createElement("div", {
242
- className: "flex flex-col"
243
- }, /*#__PURE__*/React__default.createElement(Typography, {
244
- className: "mb-3 block md:hidden",
245
- lineHeight: "normal",
246
- style: "h3",
247
- weight: "semibold"
248
- }, t("neetoThankYou.thankYou.preview")), /*#__PURE__*/React__default.createElement("div", {
249
- className: classNames("neeto-thank-you-configuration-preview", {
250
- "neeto-thank-you-configuration-alignment--left": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.left,
251
- "neeto-thank-you-configuration-alignment--center": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.center,
252
- "pointer-events-none": !isPublished
253
- })
254
- }, /*#__PURE__*/React__default.createElement("div", {
255
- className: "neeto-thank-you-configuration-preview__browser-header"
256
- }, /*#__PURE__*/React__default.createElement(SvgBrowserControls, null)), /*#__PURE__*/React__default.createElement("div", {
257
- className: "neeto-thank-you-configuration"
258
- }, /*#__PURE__*/React__default.createElement("main", {
259
- className: "neeto-thank-you-configuration__main"
260
- }, /*#__PURE__*/React__default.createElement("div", {
261
- className: "neeto-thank-you-configuration__box"
262
- }, !isEmpty(values?.imageUrl) && /*#__PURE__*/React__default.createElement("div", {
263
- className: "neeto-thank-you-configuration__img"
264
- }, /*#__PURE__*/React__default.createElement("img", {
265
- alt: "",
266
- src: values.imageUrl
267
- })), values?.message && /*#__PURE__*/React__default.createElement("div", {
268
- className: "neeto-thank-you-configuration__description"
269
- }, /*#__PURE__*/React__default.createElement(MemoizedEditorContent, {
270
- content: values.message,
271
- "data-cy": "preview-editor-content"
272
- })), values?.showResubmitLink && /*#__PURE__*/React__default.createElement("a", {
273
- className: "neeto-thank-you-configuration__resubmit",
274
- href: resubmitLink
275
- }, values?.resubmitLinkText ?? t("neetoThankYou.thankYou.resubmit")), values?.socialSharingEnabled && /*#__PURE__*/React__default.createElement(SocialShare, {
276
- publicLinkId,
277
- socialHandles
278
- })))), values?.brandingEnabled && /*#__PURE__*/React__default.createElement(BrandingInfo, {
279
- appName,
280
- brandingInfo
281
- })));
280
+ var MemoizedEditorContent = /*#__PURE__*/memo(EditorContent);
281
+ var Preview = function Preview(_ref) {
282
+ var _values$resubmitLinkT;
283
+ var socialHandles = _ref.socialHandles,
284
+ thankYouTextAlignment = _ref.thankYouTextAlignment,
285
+ resubmitLink = _ref.resubmitLink,
286
+ publicLinkId = _ref.publicLinkId,
287
+ isPublished = _ref.isPublished,
288
+ appName = _ref.appName,
289
+ brandingInfo = _ref.brandingInfo;
290
+ var _useFormikContext = useFormikContext(),
291
+ values = _useFormikContext.values;
292
+ var _useTranslation = useTranslation(),
293
+ t = _useTranslation.t;
294
+ return /*#__PURE__*/jsxs("div", {
295
+ className: "flex flex-col",
296
+ children: [/*#__PURE__*/jsx(Typography, {
297
+ className: "mb-3 block md:hidden",
298
+ lineHeight: "normal",
299
+ style: "h3",
300
+ weight: "semibold",
301
+ children: t("neetoThankYou.thankYou.preview")
302
+ }), /*#__PURE__*/jsxs("div", {
303
+ className: classNames("neeto-thank-you-configuration-preview pointer-events-none", {
304
+ "neeto-thank-you-configuration-alignment--left": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.left,
305
+ "neeto-thank-you-configuration-alignment--center": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.center,
306
+ "pointer-events-none": !isPublished
307
+ }),
308
+ children: [/*#__PURE__*/jsx("div", {
309
+ className: "neeto-thank-you-configuration-preview__browser-header",
310
+ children: /*#__PURE__*/jsx(SvgBrowserControls, {})
311
+ }), /*#__PURE__*/jsx("div", {
312
+ className: "neeto-thank-you-configuration",
313
+ children: /*#__PURE__*/jsx("main", {
314
+ className: "neeto-thank-you-configuration__main",
315
+ children: /*#__PURE__*/jsxs("div", {
316
+ className: "neeto-thank-you-configuration__box",
317
+ children: [!isEmpty(values === null || values === void 0 ? void 0 : values.imageUrl) && /*#__PURE__*/jsx("div", {
318
+ className: "neeto-thank-you-configuration__img",
319
+ children: /*#__PURE__*/jsx("img", {
320
+ alt: "",
321
+ src: values.imageUrl
322
+ })
323
+ }), (values === null || values === void 0 ? void 0 : values.message) && /*#__PURE__*/jsx("div", {
324
+ className: "neeto-thank-you-configuration__description",
325
+ children: /*#__PURE__*/jsx(MemoizedEditorContent, {
326
+ content: values.message,
327
+ "data-cy": "preview-editor-content"
328
+ })
329
+ }), (values === null || values === void 0 ? void 0 : values.showResubmitLink) && /*#__PURE__*/jsx("a", {
330
+ className: "neeto-thank-you-configuration__resubmit",
331
+ href: resubmitLink,
332
+ children: (_values$resubmitLinkT = values === null || values === void 0 ? void 0 : values.resubmitLinkText) !== null && _values$resubmitLinkT !== void 0 ? _values$resubmitLinkT : t("neetoThankYou.thankYou.resubmit")
333
+ }), (values === null || values === void 0 ? void 0 : values.socialSharingEnabled) && /*#__PURE__*/jsx(SocialShare, {
334
+ publicLinkId: publicLinkId,
335
+ socialHandles: socialHandles
336
+ })]
337
+ })
338
+ })
339
+ }), (values === null || values === void 0 ? void 0 : values.brandingEnabled) && /*#__PURE__*/jsx(BrandingInfo, {
340
+ appName: appName,
341
+ brandingInfo: brandingInfo
342
+ })]
343
+ })]
344
+ });
282
345
  };
283
346
 
284
- const ExternalLink = () => {
285
- const {
286
- t
287
- } = useTranslation();
288
- return /*#__PURE__*/React__default.createElement(Input, {
347
+ var ExternalLink = withT(function (_ref) {
348
+ var t = _ref.t;
349
+ return /*#__PURE__*/jsx(Input, {
289
350
  autoFocus: true,
290
351
  required: true,
352
+ className: "flex-grow-0",
291
353
  label: t("neetoThankYou.thankYou.link"),
292
354
  name: "redirectUrl",
293
355
  placeholder: EXTERNAL_URL_PREFIX,
294
- prefix: /*#__PURE__*/React__default.createElement(Link, null)
356
+ prefix: /*#__PURE__*/jsx(Link, {})
295
357
  });
296
- };
358
+ });
297
359
 
298
- const Label = _ref => {
299
- let {
300
- label,
301
- description,
302
- kind
303
- } = _ref;
304
- return /*#__PURE__*/React__default.createElement(Typography, {
360
+ var Header = withT(function (_ref) {
361
+ var t = _ref.t,
362
+ breadcrumbs = _ref.breadcrumbs;
363
+ return /*#__PURE__*/jsx("div", {
364
+ className: "w-full",
365
+ children: /*#__PURE__*/jsx(NeetoUIHeader, {
366
+ breadcrumbs: breadcrumbs,
367
+ size: "small",
368
+ title: t("neetoThankYou.common.thankYou")
369
+ })
370
+ });
371
+ });
372
+
373
+ var Label = function Label(_ref) {
374
+ var label = _ref.label,
375
+ description = _ref.description,
376
+ kind = _ref.kind;
377
+ return /*#__PURE__*/jsxs(Typography, {
305
378
  className: "neeto-ui-text-gray-700",
306
- "data-cy": `neeto-thank-you-configuration-${hyphenate(kind)}-label`,
379
+ "data-cy": "neeto-thank-you-configuration-".concat(hyphenate(kind), "-label"),
307
380
  style: "body2",
308
- weight: "semibold"
309
- }, label, /*#__PURE__*/React__default.createElement("span", {
310
- className: "block text-xs font-normal leading-snug",
311
- "data-cy": `neeto-thank-you-configuration-${hyphenate(kind)}-description`
312
- }, description));
381
+ weight: "semibold",
382
+ children: [label, /*#__PURE__*/jsx("span", {
383
+ className: "block text-xs font-normal leading-snug",
384
+ "data-cy": "neeto-thank-you-configuration-".concat(hyphenate(kind), "-description"),
385
+ children: description
386
+ })]
387
+ });
313
388
  };
314
389
 
315
- const buildValidationSchema = function () {
316
- let allowEmptyCustomMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
390
+ var buildValidationSchema = function buildValidationSchema() {
391
+ var allowEmptyCustomMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
317
392
  return yup.object().shape({
318
393
  kind: yup.string().required(),
319
- message: yup.string().test("message", t("neetoThankYou.thankYou.validations.messageRequired"), value => allowEmptyCustomMessage || !isEditorEmpty(value)),
394
+ message: yup.string().test("message", t("neetoThankYou.thankYou.validations.messageRequired"), function (value) {
395
+ return allowEmptyCustomMessage || !isEditorEmpty(value);
396
+ }),
320
397
  socialSharingEnabled: yup.bool(),
321
398
  showResubmitLink: yup.bool(),
322
399
  resubmitLinkText: yup.string().when("showResubmitLink", {
@@ -333,199 +410,210 @@ const buildValidationSchema = function () {
333
410
  });
334
411
  };
335
412
 
336
- const Form = _ref => {
337
- let {
338
- socialHandles,
339
- entityId,
340
- publicLinkId,
341
- hasImageUploader,
342
- uniqueSubmissionEnabled,
343
- uniqueSubmissionLink,
344
- redirectToOnCancel,
345
- thankYouTextAlignment,
346
- resubmitLink,
347
- isPublished,
348
- disableSubmitAnotherResponse,
349
- disableRadioSelection,
350
- appName,
351
- blockNavigation,
352
- onConfigUpdateSuccess,
353
- brandingInfo,
354
- editorProps,
355
- preview: CustomPreview,
356
- allowEmptyCustomMessage
357
- } = _ref;
358
- const {
359
- data: {
360
- thankYouConfiguration
361
- } = {},
362
- isLoading
363
- } = useShowThankYouConfiguration({
364
- entityId
365
- });
366
- const {
367
- mutate: updateThankYouConfiguration,
368
- isPending: isUpdatingForm
369
- } = useUpdateThankYouConfiguration();
370
- const editorRef = useRef({
413
+ 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; }
414
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
415
+ var Form = function Form(_ref) {
416
+ var socialHandles = _ref.socialHandles,
417
+ entityId = _ref.entityId,
418
+ publicLinkId = _ref.publicLinkId,
419
+ hasImageUploader = _ref.hasImageUploader,
420
+ uniqueSubmissionEnabled = _ref.uniqueSubmissionEnabled,
421
+ uniqueSubmissionLink = _ref.uniqueSubmissionLink,
422
+ redirectToOnCancel = _ref.redirectToOnCancel,
423
+ thankYouTextAlignment = _ref.thankYouTextAlignment,
424
+ resubmitLink = _ref.resubmitLink,
425
+ isPublished = _ref.isPublished,
426
+ disableSubmitAnotherResponse = _ref.disableSubmitAnotherResponse,
427
+ disableRadioSelection = _ref.disableRadioSelection,
428
+ appName = _ref.appName,
429
+ blockNavigation = _ref.blockNavigation,
430
+ onConfigUpdateSuccess = _ref.onConfigUpdateSuccess,
431
+ brandingInfo = _ref.brandingInfo,
432
+ editorProps = _ref.editorProps,
433
+ CustomPreview = _ref.preview,
434
+ allowEmptyCustomMessage = _ref.allowEmptyCustomMessage,
435
+ customHeader = _ref.customHeader,
436
+ breadcrumbs = _ref.breadcrumbs;
437
+ var _useShowThankYouConfi = useShowThankYouConfiguration({
438
+ entityId: entityId
439
+ }),
440
+ _useShowThankYouConfi2 = _useShowThankYouConfi.data,
441
+ _useShowThankYouConfi3 = _useShowThankYouConfi2 === void 0 ? {} : _useShowThankYouConfi2,
442
+ thankYouConfiguration = _useShowThankYouConfi3.thankYouConfiguration,
443
+ isLoading = _useShowThankYouConfi.isLoading;
444
+ var _useUpdateThankYouCon = useUpdateThankYouConfiguration(),
445
+ updateThankYouConfiguration = _useUpdateThankYouCon.mutate,
446
+ isUpdatingForm = _useUpdateThankYouCon.isPending;
447
+ var editorRef = useRef({
371
448
  editor: {}
372
449
  });
373
450
  if (isLoading) {
374
- return /*#__PURE__*/React__default.createElement("div", {
375
- className: "flex h-full w-full items-center justify-center"
376
- }, /*#__PURE__*/React__default.createElement(PageLoader, null));
451
+ return /*#__PURE__*/jsx("div", {
452
+ className: "flex h-full w-full items-center justify-center",
453
+ children: /*#__PURE__*/jsx(PageLoader, {})
454
+ });
377
455
  }
378
- const resetEditor = () => editorRef.current.editor?.commands.setContent(thankYouConfiguration.message);
379
- return /*#__PURE__*/React__default.createElement(NeetoUIForm, {
456
+ var resetEditor = function resetEditor() {
457
+ var _editorRef$current$ed;
458
+ return (_editorRef$current$ed = editorRef.current.editor) === null || _editorRef$current$ed === void 0 ? void 0 : _editorRef$current$ed.commands.setContent(thankYouConfiguration.message);
459
+ };
460
+ return /*#__PURE__*/jsx(NeetoUIForm, {
461
+ className: "h-full w-full",
380
462
  formikProps: {
381
463
  enableReinitialize: true,
382
- initialValues: {
383
- ...DEFAULT_IMAGE_PROPERTIES,
384
- ...thankYouConfiguration
385
- },
464
+ initialValues: _objectSpread(_objectSpread({}, DEFAULT_IMAGE_PROPERTIES), thankYouConfiguration),
386
465
  validationSchema: buildValidationSchema(allowEmptyCustomMessage),
387
- onSubmit: values => updateThankYouConfiguration({
388
- entityId,
389
- payload: {
390
- ...values,
391
- image: values.imageSignedId
392
- }
393
- }, {
394
- onSuccess: function () {
395
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
396
- args[_key] = arguments[_key];
466
+ onSubmit: function onSubmit(values) {
467
+ return updateThankYouConfiguration({
468
+ entityId: entityId,
469
+ payload: _objectSpread(_objectSpread({}, values), {}, {
470
+ image: values.imageSignedId
471
+ })
472
+ }, {
473
+ onSuccess: function onSuccess() {
474
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
475
+ args[_key] = arguments[_key];
476
+ }
477
+ return onConfigUpdateSuccess(args, thankYouConfiguration);
397
478
  }
398
- return onConfigUpdateSuccess(args, thankYouConfiguration);
399
- }
400
- })
401
- }
402
- }, _ref2 => {
403
- let {
404
- values
405
- } = _ref2;
406
- return /*#__PURE__*/React__default.createElement("div", {
407
- className: "grid grid-cols-1 gap-10 pb-6 md:grid-cols-2 md:gap-6"
408
- }, /*#__PURE__*/React__default.createElement("div", {
409
- className: "flex flex-col"
410
- }, blockNavigation && /*#__PURE__*/React__default.createElement(BlockNavigation, null), !disableRadioSelection && /*#__PURE__*/React__default.createElement("div", {
411
- className: "mb-6 w-full"
412
- }, /*#__PURE__*/React__default.createElement(Radio, {
413
- containerClassName: "grid grid-cols-1 sm:grid-cols-2 gap-6 items-stretch w-full",
414
- name: "kind"
415
- }, Object.values(FORM_OPTIONS).map(option => /*#__PURE__*/React__default.createElement(Radio.Item, {
416
- key: option.kind,
417
- label: /*#__PURE__*/React__default.createElement(Label, option),
418
- name: "kind",
419
- value: option.kind,
420
- className: classNames("neeto-thank-you-configuration-radio__item", {
421
- active: values.kind === option.kind
422
- })
423
- })))), values.kind === FORM_OPTIONS.customize.kind ? /*#__PURE__*/React__default.createElement(Customize, {
424
- disableSubmitAnotherResponse,
425
- editorProps,
426
- editorRef,
427
- entityId,
428
- hasImageUploader,
429
- uniqueSubmissionEnabled,
430
- uniqueSubmissionLink,
431
- disableSocialShare: isEmpty(socialHandles)
432
- }) : /*#__PURE__*/React__default.createElement(ExternalLink, null), /*#__PURE__*/React__default.createElement(ActionBlock, {
433
- className: "mt-6",
434
- isSubmitting: isUpdatingForm,
435
- cancelButtonProps: {
436
- "data-cy": "neeto-thank-you-configuration-cancel-button",
437
- ...(redirectToOnCancel ? {
438
- to: redirectToOnCancel,
439
- onClick: noop
440
- } : {
441
- type: "reset",
442
- onClick: resetEditor
443
- })
444
- },
445
- submitButtonProps: {
446
- "data-cy": "neeto-thank-you-configuration-save-button"
479
+ });
447
480
  }
448
- })), values.kind === FORM_OPTIONS.customize.kind && (CustomPreview ? /*#__PURE__*/React__default.createElement(CustomPreview, {
449
- values
450
- }) : /*#__PURE__*/React__default.createElement(Preview, {
451
- appName,
452
- brandingInfo,
453
- isPublished,
454
- publicLinkId,
455
- resubmitLink,
456
- socialHandles,
457
- thankYouTextAlignment
458
- })));
481
+ },
482
+ children: function children(_ref2) {
483
+ var values = _ref2.values;
484
+ return /*#__PURE__*/jsxs("div", {
485
+ className: "flex h-full flex-col overflow-y-auto lg:flex-row",
486
+ children: [/*#__PURE__*/jsxs("div", {
487
+ className: "flex w-full flex-col px-6 lg:h-full lg:w-1/2 lg:overflow-y-auto",
488
+ children: [customHeader || /*#__PURE__*/jsx(Header, {
489
+ breadcrumbs: breadcrumbs
490
+ }), blockNavigation && /*#__PURE__*/jsx(BlockNavigation, {}), !disableRadioSelection && /*#__PURE__*/jsx("div", {
491
+ className: "mb-6 w-full",
492
+ children: /*#__PURE__*/jsx(Radio, {
493
+ containerClassName: "grid grid-cols-1 sm:grid-cols-2 gap-6 items-stretch w-full",
494
+ name: "kind",
495
+ children: Object.values(FORM_OPTIONS).map(function (option) {
496
+ return /*#__PURE__*/jsx(Radio.Item, {
497
+ label: /*#__PURE__*/jsx(Label, _objectSpread({}, option)),
498
+ name: "kind",
499
+ value: option.kind,
500
+ className: classNames("neeto-thank-you-configuration-radio__item", {
501
+ active: values.kind === option.kind
502
+ })
503
+ }, option.kind);
504
+ })
505
+ })
506
+ }), values.kind === FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsx(Customize, {
507
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
508
+ editorProps: editorProps,
509
+ editorRef: editorRef,
510
+ entityId: entityId,
511
+ hasImageUploader: hasImageUploader,
512
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
513
+ uniqueSubmissionLink: uniqueSubmissionLink,
514
+ disableSocialShare: isEmpty(socialHandles)
515
+ }) : /*#__PURE__*/jsx(ExternalLink, {}), /*#__PURE__*/jsx(ActionBlock, {
516
+ className: "neeto-ui-bg-white sticky bottom-0 py-5",
517
+ isSubmitting: isUpdatingForm,
518
+ cancelButtonProps: _objectSpread({
519
+ "data-cy": "neeto-thank-you-configuration-cancel-button"
520
+ }, redirectToOnCancel ? {
521
+ to: redirectToOnCancel,
522
+ onClick: noop
523
+ } : {
524
+ type: "reset",
525
+ onClick: resetEditor
526
+ }),
527
+ submitButtonProps: {
528
+ "data-cy": "neeto-thank-you-configuration-save-button"
529
+ }
530
+ })]
531
+ }), values.kind === FORM_OPTIONS.customize.kind && (CustomPreview ? /*#__PURE__*/jsxs(Fragment, {
532
+ children: [/*#__PURE__*/jsx(MobilePreviewHeader, {
533
+ className: "block lg:hidden"
534
+ }), /*#__PURE__*/jsx("div", {
535
+ className: "neeto-ui-bg-gray-100 w-full px-6 py-10 lg:h-full lg:w-1/2 lg:overflow-y-auto",
536
+ children: /*#__PURE__*/jsx(CustomPreview, {
537
+ values: values
538
+ })
539
+ })]
540
+ }) : /*#__PURE__*/jsxs(Fragment, {
541
+ children: [/*#__PURE__*/jsx(MobilePreviewHeader, {
542
+ className: "block lg:hidden"
543
+ }), /*#__PURE__*/jsx("div", {
544
+ className: "neeto-ui-bg-gray-100 w-full px-6 py-10 lg:h-full lg:w-1/2 lg:overflow-y-auto",
545
+ children: /*#__PURE__*/jsx(Preview, {
546
+ appName: appName,
547
+ brandingInfo: brandingInfo,
548
+ isPublished: isPublished,
549
+ publicLinkId: publicLinkId,
550
+ resubmitLink: resubmitLink,
551
+ socialHandles: socialHandles,
552
+ thankYouTextAlignment: thankYouTextAlignment
553
+ })
554
+ })]
555
+ }))]
556
+ });
557
+ }
459
558
  });
460
559
  };
461
560
 
462
- const Header = _ref => {
463
- let {
464
- breadcrumbs
465
- } = _ref;
466
- const {
467
- t
468
- } = useTranslation();
469
- return /*#__PURE__*/React__default.createElement("div", {
470
- className: "w-full px-6"
471
- }, /*#__PURE__*/React__default.createElement(NeetoUIHeader, {
561
+ var ConfigureThankYou = function ConfigureThankYou(_ref) {
562
+ var breadcrumbs = _ref.breadcrumbs,
563
+ isPublished = _ref.isPublished,
564
+ entityId = _ref.entityId,
565
+ publicLinkId = _ref.publicLinkId,
566
+ resubmitLink = _ref.resubmitLink,
567
+ redirectToOnCancel = _ref.redirectToOnCancel,
568
+ _ref$socialHandles = _ref.socialHandles,
569
+ socialHandles = _ref$socialHandles === void 0 ? [] : _ref$socialHandles,
570
+ _ref$uniqueSubmission = _ref.uniqueSubmissionLink,
571
+ uniqueSubmissionLink = _ref$uniqueSubmission === void 0 ? "" : _ref$uniqueSubmission,
572
+ _ref$uniqueSubmission2 = _ref.uniqueSubmissionEnabled,
573
+ uniqueSubmissionEnabled = _ref$uniqueSubmission2 === void 0 ? false : _ref$uniqueSubmission2,
574
+ _ref$hasImageUploader = _ref.hasImageUploader,
575
+ hasImageUploader = _ref$hasImageUploader === void 0 ? false : _ref$hasImageUploader,
576
+ _ref$disableSubmitAno = _ref.disableSubmitAnotherResponse,
577
+ disableSubmitAnotherResponse = _ref$disableSubmitAno === void 0 ? false : _ref$disableSubmitAno,
578
+ _ref$disableRadioSele = _ref.disableRadioSelection,
579
+ disableRadioSelection = _ref$disableRadioSele === void 0 ? false : _ref$disableRadioSele,
580
+ _ref$thankYouTextAlig = _ref.thankYouTextAlignment,
581
+ thankYouTextAlignment = _ref$thankYouTextAlig === void 0 ? THANK_YOU_TEXT_ALIGNMENTS.center : _ref$thankYouTextAlig,
582
+ customHeader = _ref.customHeader,
583
+ appName = _ref.appName,
584
+ _ref$blockNavigation = _ref.blockNavigation,
585
+ blockNavigation = _ref$blockNavigation === void 0 ? false : _ref$blockNavigation,
586
+ _ref$onConfigUpdateSu = _ref.onConfigUpdateSuccess,
587
+ onConfigUpdateSuccess = _ref$onConfigUpdateSu === void 0 ? noop : _ref$onConfigUpdateSu,
588
+ brandingInfo = _ref.brandingInfo,
589
+ _ref$editorProps = _ref.editorProps,
590
+ editorProps = _ref$editorProps === void 0 ? {} : _ref$editorProps,
591
+ preview = _ref.preview,
592
+ _ref$allowEmptyCustom = _ref.allowEmptyCustomMessage,
593
+ allowEmptyCustomMessage = _ref$allowEmptyCustom === void 0 ? false : _ref$allowEmptyCustom;
594
+ return /*#__PURE__*/jsx(Form, {
595
+ allowEmptyCustomMessage: allowEmptyCustomMessage,
596
+ appName: appName,
597
+ blockNavigation: blockNavigation,
598
+ brandingInfo: brandingInfo,
472
599
  breadcrumbs: breadcrumbs,
473
- size: "small",
474
- title: t("neetoThankYou.common.thankYou")
475
- }));
476
- };
477
-
478
- const ConfigureThankYou = _ref => {
479
- let {
480
- breadcrumbs,
481
- isPublished,
482
- entityId,
483
- publicLinkId,
484
- resubmitLink,
485
- redirectToOnCancel,
486
- socialHandles = [],
487
- uniqueSubmissionLink = "",
488
- uniqueSubmissionEnabled = false,
489
- hasImageUploader = false,
490
- disableSubmitAnotherResponse = false,
491
- disableRadioSelection = false,
492
- thankYouTextAlignment = THANK_YOU_TEXT_ALIGNMENTS.center,
493
- customHeader,
494
- appName,
495
- blockNavigation = false,
496
- onConfigUpdateSuccess = noop,
497
- brandingInfo,
498
- editorProps = {},
499
- preview,
500
- allowEmptyCustomMessage = false
501
- } = _ref;
502
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, customHeader || /*#__PURE__*/React__default.createElement(Header, {
503
- breadcrumbs
504
- }), /*#__PURE__*/React__default.createElement(Scrollable, {
505
- className: "w-full p-6 pt-0"
506
- }, /*#__PURE__*/React__default.createElement("div", {
507
- className: "mx-auto h-full max-w-7xl"
508
- }, /*#__PURE__*/React__default.createElement(Form, {
509
- allowEmptyCustomMessage,
510
- appName,
511
- blockNavigation,
512
- brandingInfo,
513
- disableRadioSelection,
514
- disableSubmitAnotherResponse,
515
- editorProps,
516
- entityId,
517
- hasImageUploader,
518
- isPublished,
519
- onConfigUpdateSuccess,
520
- preview,
521
- publicLinkId,
522
- redirectToOnCancel,
523
- resubmitLink,
524
- socialHandles,
525
- thankYouTextAlignment,
526
- uniqueSubmissionEnabled,
527
- uniqueSubmissionLink
528
- }))));
600
+ customHeader: customHeader,
601
+ disableRadioSelection: disableRadioSelection,
602
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
603
+ editorProps: editorProps,
604
+ entityId: entityId,
605
+ hasImageUploader: hasImageUploader,
606
+ isPublished: isPublished,
607
+ onConfigUpdateSuccess: onConfigUpdateSuccess,
608
+ preview: preview,
609
+ publicLinkId: publicLinkId,
610
+ redirectToOnCancel: redirectToOnCancel,
611
+ resubmitLink: resubmitLink,
612
+ socialHandles: socialHandles,
613
+ thankYouTextAlignment: thankYouTextAlignment,
614
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
615
+ uniqueSubmissionLink: uniqueSubmissionLink
616
+ });
529
617
  };
530
618
 
531
619
  export { ConfigureThankYou as default };