@bigbinary/neeto-thank-you-frontend 2.0.2 → 2.1.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.
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 +453 -375
  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 +453 -376
  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 +8 -7
  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 +8 -7
  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 +11 -11
  51. package/dist/BrandingInfo-da0b773a.js +0 -32
  52. package/dist/BrandingInfo-da0b773a.js.map +0 -1
  53. package/dist/SocialShare-cb0490d1.js +0 -45
  54. package/dist/SocialShare-cb0490d1.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-621b3b13.js +0 -53
  58. package/dist/cjs/SocialShare-621b3b13.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,8 +1,9 @@
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
2
  import Scrollable from '@bigbinary/neeto-molecules/Scrollable';
5
- import { n, T as THANK_YOU_TEXT_ALIGNMENTS, S as SocialShare } from './SocialShare-cb0490d1.js';
3
+ import { n, T as THANK_YOU_TEXT_ALIGNMENTS, S as SocialShare } from './SocialShare-4ece80cd.js';
4
+ import { u as useShowThankYouConfiguration, _ as _defineProperty, a as useUpdateThankYouConfiguration } from './useThankYouConfigurationApi-5b45610e.js';
5
+ import * as React from 'react';
6
+ import { useState, useEffect, memo, useRef } from 'react';
6
7
  import classNames from 'classnames';
7
8
  import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
8
9
  import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
@@ -10,7 +11,6 @@ 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';
29
30
  import { isEditorEmpty } from '@bigbinary/neeto-editor/utils';
30
31
  import * as yup from 'yup';
31
32
  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;
74
98
  }
75
99
 
76
- const IMAGE_SIZE_LIMIT = 1; // MB
77
- const IMAGE_UPLOADER_CONFIG = {
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);
107
+ }
108
+
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,110 @@ 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 = function ExternalLink() {
348
+ var _useTranslation = useTranslation(),
349
+ t = _useTranslation.t;
350
+ return /*#__PURE__*/jsx(Input, {
289
351
  autoFocus: true,
290
352
  required: true,
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 Label = function Label(_ref) {
361
+ var label = _ref.label,
362
+ description = _ref.description,
363
+ kind = _ref.kind;
364
+ return /*#__PURE__*/jsxs(Typography, {
305
365
  className: "neeto-ui-text-gray-700",
306
- "data-cy": `neeto-thank-you-configuration-${hyphenate(kind)}-label`,
366
+ "data-cy": "neeto-thank-you-configuration-".concat(hyphenate(kind), "-label"),
307
367
  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));
368
+ weight: "semibold",
369
+ children: [label, /*#__PURE__*/jsx("span", {
370
+ className: "block text-xs font-normal leading-snug",
371
+ "data-cy": "neeto-thank-you-configuration-".concat(hyphenate(kind), "-description"),
372
+ children: description
373
+ })]
374
+ });
313
375
  };
314
376
 
315
- const buildValidationSchema = function () {
316
- let allowEmptyCustomMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
377
+ var buildValidationSchema = function buildValidationSchema() {
378
+ var allowEmptyCustomMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
317
379
  return yup.object().shape({
318
380
  kind: yup.string().required(),
319
- message: yup.string().test("message", t("neetoThankYou.thankYou.validations.messageRequired"), value => allowEmptyCustomMessage || !isEditorEmpty(value)),
381
+ message: yup.string().test("message", t("neetoThankYou.thankYou.validations.messageRequired"), function (value) {
382
+ return allowEmptyCustomMessage || !isEditorEmpty(value);
383
+ }),
320
384
  socialSharingEnabled: yup.bool(),
321
385
  showResubmitLink: yup.bool(),
322
386
  resubmitLinkText: yup.string().when("showResubmitLink", {
@@ -333,199 +397,213 @@ const buildValidationSchema = function () {
333
397
  });
334
398
  };
335
399
 
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({
400
+ 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; }
401
+ 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; }
402
+ var Form = function Form(_ref) {
403
+ var socialHandles = _ref.socialHandles,
404
+ entityId = _ref.entityId,
405
+ publicLinkId = _ref.publicLinkId,
406
+ hasImageUploader = _ref.hasImageUploader,
407
+ uniqueSubmissionEnabled = _ref.uniqueSubmissionEnabled,
408
+ uniqueSubmissionLink = _ref.uniqueSubmissionLink,
409
+ redirectToOnCancel = _ref.redirectToOnCancel,
410
+ thankYouTextAlignment = _ref.thankYouTextAlignment,
411
+ resubmitLink = _ref.resubmitLink,
412
+ isPublished = _ref.isPublished,
413
+ disableSubmitAnotherResponse = _ref.disableSubmitAnotherResponse,
414
+ disableRadioSelection = _ref.disableRadioSelection,
415
+ appName = _ref.appName,
416
+ blockNavigation = _ref.blockNavigation,
417
+ onConfigUpdateSuccess = _ref.onConfigUpdateSuccess,
418
+ brandingInfo = _ref.brandingInfo,
419
+ editorProps = _ref.editorProps,
420
+ CustomPreview = _ref.preview,
421
+ allowEmptyCustomMessage = _ref.allowEmptyCustomMessage;
422
+ var _useShowThankYouConfi = useShowThankYouConfiguration({
423
+ entityId: entityId
424
+ }),
425
+ _useShowThankYouConfi2 = _useShowThankYouConfi.data,
426
+ _useShowThankYouConfi3 = _useShowThankYouConfi2 === void 0 ? {} : _useShowThankYouConfi2,
427
+ thankYouConfiguration = _useShowThankYouConfi3.thankYouConfiguration,
428
+ isLoading = _useShowThankYouConfi.isLoading;
429
+ var _useUpdateThankYouCon = useUpdateThankYouConfiguration(),
430
+ updateThankYouConfiguration = _useUpdateThankYouCon.mutate,
431
+ isUpdatingForm = _useUpdateThankYouCon.isPending;
432
+ var editorRef = useRef({
371
433
  editor: {}
372
434
  });
373
435
  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));
436
+ return /*#__PURE__*/jsx("div", {
437
+ className: "flex h-full w-full items-center justify-center",
438
+ children: /*#__PURE__*/jsx(PageLoader, {})
439
+ });
377
440
  }
378
- const resetEditor = () => editorRef.current.editor?.commands.setContent(thankYouConfiguration.message);
379
- return /*#__PURE__*/React__default.createElement(NeetoUIForm, {
441
+ var resetEditor = function resetEditor() {
442
+ var _editorRef$current$ed;
443
+ return (_editorRef$current$ed = editorRef.current.editor) === null || _editorRef$current$ed === void 0 ? void 0 : _editorRef$current$ed.commands.setContent(thankYouConfiguration.message);
444
+ };
445
+ return /*#__PURE__*/jsx(NeetoUIForm, {
380
446
  formikProps: {
381
447
  enableReinitialize: true,
382
- initialValues: {
383
- ...DEFAULT_IMAGE_PROPERTIES,
384
- ...thankYouConfiguration
385
- },
448
+ initialValues: _objectSpread(_objectSpread({}, DEFAULT_IMAGE_PROPERTIES), thankYouConfiguration),
386
449
  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];
450
+ onSubmit: function onSubmit(values) {
451
+ return updateThankYouConfiguration({
452
+ entityId: entityId,
453
+ payload: _objectSpread(_objectSpread({}, values), {}, {
454
+ image: values.imageSignedId
455
+ })
456
+ }, {
457
+ onSuccess: function onSuccess() {
458
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
459
+ args[_key] = arguments[_key];
460
+ }
461
+ return onConfigUpdateSuccess(args, thankYouConfiguration);
397
462
  }
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"
463
+ });
447
464
  }
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
- })));
465
+ },
466
+ children: function children(_ref2) {
467
+ var values = _ref2.values;
468
+ return /*#__PURE__*/jsxs("div", {
469
+ className: "grid grid-cols-1 gap-10 pb-6 md:grid-cols-2 md:gap-6",
470
+ children: [/*#__PURE__*/jsxs("div", {
471
+ className: "flex flex-col",
472
+ children: [blockNavigation && /*#__PURE__*/jsx(BlockNavigation, {}), !disableRadioSelection && /*#__PURE__*/jsx("div", {
473
+ className: "mb-6 w-full",
474
+ children: /*#__PURE__*/jsx(Radio, {
475
+ containerClassName: "grid grid-cols-1 sm:grid-cols-2 gap-6 items-stretch w-full",
476
+ name: "kind",
477
+ children: Object.values(FORM_OPTIONS).map(function (option) {
478
+ return /*#__PURE__*/jsx(Radio.Item, {
479
+ label: /*#__PURE__*/jsx(Label, _objectSpread({}, option)),
480
+ name: "kind",
481
+ value: option.kind,
482
+ className: classNames("neeto-thank-you-configuration-radio__item", {
483
+ active: values.kind === option.kind
484
+ })
485
+ }, option.kind);
486
+ })
487
+ })
488
+ }), values.kind === FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsx(Customize, {
489
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
490
+ editorProps: editorProps,
491
+ editorRef: editorRef,
492
+ entityId: entityId,
493
+ hasImageUploader: hasImageUploader,
494
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
495
+ uniqueSubmissionLink: uniqueSubmissionLink,
496
+ disableSocialShare: isEmpty(socialHandles)
497
+ }) : /*#__PURE__*/jsx(ExternalLink, {}), /*#__PURE__*/jsx(ActionBlock, {
498
+ className: "mt-6",
499
+ isSubmitting: isUpdatingForm,
500
+ cancelButtonProps: _objectSpread({
501
+ "data-cy": "neeto-thank-you-configuration-cancel-button"
502
+ }, redirectToOnCancel ? {
503
+ to: redirectToOnCancel,
504
+ onClick: noop
505
+ } : {
506
+ type: "reset",
507
+ onClick: resetEditor
508
+ }),
509
+ submitButtonProps: {
510
+ "data-cy": "neeto-thank-you-configuration-save-button"
511
+ }
512
+ })]
513
+ }), values.kind === FORM_OPTIONS.customize.kind && (CustomPreview ? /*#__PURE__*/jsx(CustomPreview, {
514
+ values: values
515
+ }) : /*#__PURE__*/jsx(Preview, {
516
+ appName: appName,
517
+ brandingInfo: brandingInfo,
518
+ isPublished: isPublished,
519
+ publicLinkId: publicLinkId,
520
+ resubmitLink: resubmitLink,
521
+ socialHandles: socialHandles,
522
+ thankYouTextAlignment: thankYouTextAlignment
523
+ }))]
524
+ });
525
+ }
459
526
  });
460
527
  };
461
528
 
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, {
472
- breadcrumbs: breadcrumbs,
473
- size: "small",
474
- title: t("neetoThankYou.common.thankYou")
475
- }));
529
+ var Header = function Header(_ref) {
530
+ var breadcrumbs = _ref.breadcrumbs;
531
+ var _useTranslation = useTranslation(),
532
+ t = _useTranslation.t;
533
+ return /*#__PURE__*/jsx("div", {
534
+ className: "w-full px-6",
535
+ children: /*#__PURE__*/jsx(NeetoUIHeader, {
536
+ breadcrumbs: breadcrumbs,
537
+ size: "small",
538
+ title: t("neetoThankYou.common.thankYou")
539
+ })
540
+ });
476
541
  };
477
542
 
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
- }))));
543
+ var ConfigureThankYou = function ConfigureThankYou(_ref) {
544
+ var breadcrumbs = _ref.breadcrumbs,
545
+ isPublished = _ref.isPublished,
546
+ entityId = _ref.entityId,
547
+ publicLinkId = _ref.publicLinkId,
548
+ resubmitLink = _ref.resubmitLink,
549
+ redirectToOnCancel = _ref.redirectToOnCancel,
550
+ _ref$socialHandles = _ref.socialHandles,
551
+ socialHandles = _ref$socialHandles === void 0 ? [] : _ref$socialHandles,
552
+ _ref$uniqueSubmission = _ref.uniqueSubmissionLink,
553
+ uniqueSubmissionLink = _ref$uniqueSubmission === void 0 ? "" : _ref$uniqueSubmission,
554
+ _ref$uniqueSubmission2 = _ref.uniqueSubmissionEnabled,
555
+ uniqueSubmissionEnabled = _ref$uniqueSubmission2 === void 0 ? false : _ref$uniqueSubmission2,
556
+ _ref$hasImageUploader = _ref.hasImageUploader,
557
+ hasImageUploader = _ref$hasImageUploader === void 0 ? false : _ref$hasImageUploader,
558
+ _ref$disableSubmitAno = _ref.disableSubmitAnotherResponse,
559
+ disableSubmitAnotherResponse = _ref$disableSubmitAno === void 0 ? false : _ref$disableSubmitAno,
560
+ _ref$disableRadioSele = _ref.disableRadioSelection,
561
+ disableRadioSelection = _ref$disableRadioSele === void 0 ? false : _ref$disableRadioSele,
562
+ _ref$thankYouTextAlig = _ref.thankYouTextAlignment,
563
+ thankYouTextAlignment = _ref$thankYouTextAlig === void 0 ? THANK_YOU_TEXT_ALIGNMENTS.center : _ref$thankYouTextAlig,
564
+ customHeader = _ref.customHeader,
565
+ appName = _ref.appName,
566
+ _ref$blockNavigation = _ref.blockNavigation,
567
+ blockNavigation = _ref$blockNavigation === void 0 ? false : _ref$blockNavigation,
568
+ _ref$onConfigUpdateSu = _ref.onConfigUpdateSuccess,
569
+ onConfigUpdateSuccess = _ref$onConfigUpdateSu === void 0 ? noop : _ref$onConfigUpdateSu,
570
+ brandingInfo = _ref.brandingInfo,
571
+ _ref$editorProps = _ref.editorProps,
572
+ editorProps = _ref$editorProps === void 0 ? {} : _ref$editorProps,
573
+ preview = _ref.preview,
574
+ _ref$allowEmptyCustom = _ref.allowEmptyCustomMessage,
575
+ allowEmptyCustomMessage = _ref$allowEmptyCustom === void 0 ? false : _ref$allowEmptyCustom;
576
+ return /*#__PURE__*/jsxs(Fragment, {
577
+ children: [customHeader || /*#__PURE__*/jsx(Header, {
578
+ breadcrumbs: breadcrumbs
579
+ }), /*#__PURE__*/jsx(Scrollable, {
580
+ className: "w-full p-6 pt-0",
581
+ children: /*#__PURE__*/jsx("div", {
582
+ className: "mx-auto h-full max-w-7xl",
583
+ children: /*#__PURE__*/jsx(Form, {
584
+ allowEmptyCustomMessage: allowEmptyCustomMessage,
585
+ appName: appName,
586
+ blockNavigation: blockNavigation,
587
+ brandingInfo: brandingInfo,
588
+ disableRadioSelection: disableRadioSelection,
589
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
590
+ editorProps: editorProps,
591
+ entityId: entityId,
592
+ hasImageUploader: hasImageUploader,
593
+ isPublished: isPublished,
594
+ onConfigUpdateSuccess: onConfigUpdateSuccess,
595
+ preview: preview,
596
+ publicLinkId: publicLinkId,
597
+ redirectToOnCancel: redirectToOnCancel,
598
+ resubmitLink: resubmitLink,
599
+ socialHandles: socialHandles,
600
+ thankYouTextAlignment: thankYouTextAlignment,
601
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
602
+ uniqueSubmissionLink: uniqueSubmissionLink
603
+ })
604
+ })
605
+ })]
606
+ });
529
607
  };
530
608
 
531
609
  export { ConfigureThankYou as default };