@bigbinary/neeto-thank-you-frontend 3.1.9 → 3.1.11

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 (97) hide show
  1. package/dist/.ready +1 -1
  2. package/dist/BrandingInfo-C-YUyKe_.js +17 -0
  3. package/dist/BrandingInfo-C-YUyKe_.js.map +1 -0
  4. package/dist/ConfigureThankYou.js +4 -5
  5. package/dist/ConfigureThankYou.js.map +1 -1
  6. package/dist/ShowThankYou.js +2 -1
  7. package/dist/ShowThankYou.js.map +1 -1
  8. package/dist/SocialShare-B0luKbFP.js +93 -0
  9. package/dist/SocialShare-B0luKbFP.js.map +1 -0
  10. package/dist/SocialShare-Djluum5G.js +93 -0
  11. package/dist/SocialShare-Djluum5G.js.map +1 -0
  12. package/dist/application-DJ9yVgd0.js +5 -0
  13. package/dist/application-DJ9yVgd0.js.map +1 -0
  14. package/dist/cjs/BrandingInfo-CxPUChPj.js +19 -0
  15. package/dist/cjs/BrandingInfo-CxPUChPj.js.map +1 -0
  16. package/dist/cjs/ConfigureThankYou.js +3 -4
  17. package/dist/cjs/ConfigureThankYou.js.map +1 -1
  18. package/dist/cjs/ShowThankYou.js +2 -1
  19. package/dist/cjs/ShowThankYou.js.map +1 -1
  20. package/dist/cjs/SocialShare-BFeAkgVT.js +100 -0
  21. package/dist/cjs/SocialShare-BFeAkgVT.js.map +1 -0
  22. package/dist/cjs/SocialShare-CVIbFf_m.js +100 -0
  23. package/dist/cjs/SocialShare-CVIbFf_m.js.map +1 -0
  24. package/dist/cjs/application-S-s0L8VC.js +7 -0
  25. package/dist/cjs/application-S-s0L8VC.js.map +1 -0
  26. package/dist/cjs/index.js +9 -7
  27. package/dist/{SocialShare-C4rOGmnp.js → cjs/thank-you-BAOIUbgZ.js} +3 -92
  28. package/dist/cjs/thank-you-BAOIUbgZ.js.map +1 -0
  29. package/dist/cjs/thank-you-BYHzj8zD.js +7 -0
  30. package/dist/cjs/thank-you-BYHzj8zD.js.map +1 -0
  31. package/dist/cjs/v2/ConfigureThankYou.js +698 -0
  32. package/dist/cjs/v2/ConfigureThankYou.js.map +1 -0
  33. package/dist/cjs/v2/ShowThankYou.js +281 -0
  34. package/dist/cjs/v2/ShowThankYou.js.map +1 -0
  35. package/dist/cjs/v2/commons.js +10 -0
  36. package/dist/cjs/v2/commons.js.map +1 -0
  37. package/dist/cjs/v2/constants.js +12 -0
  38. package/dist/cjs/v2/constants.js.map +1 -0
  39. package/dist/cjs/v2/index.js +58 -0
  40. package/dist/cjs/v2/index.js.map +1 -0
  41. package/dist/cjs/v2/query.js +8 -0
  42. package/dist/cjs/v2/query.js.map +1 -0
  43. package/dist/cjs/v2/useCreateThankYouConfiguration.js +16 -0
  44. package/dist/cjs/v2/useCreateThankYouConfiguration.js.map +1 -0
  45. package/dist/cjs/v2/useDeleteThankYouConfiguration.js +16 -0
  46. package/dist/cjs/v2/useDeleteThankYouConfiguration.js.map +1 -0
  47. package/dist/cjs/v2/useFetchThankYouConfigurations.js +16 -0
  48. package/dist/cjs/v2/useFetchThankYouConfigurations.js.map +1 -0
  49. package/dist/cjs/v2/useShowThankYouConfiguration.js +16 -0
  50. package/dist/cjs/v2/useShowThankYouConfiguration.js.map +1 -0
  51. package/dist/cjs/v2/useShowThankYouPage.js +12 -0
  52. package/dist/cjs/v2/useShowThankYouPage.js.map +1 -0
  53. package/dist/cjs/v2/useUpdateThankYouConfiguration.js +16 -0
  54. package/dist/cjs/v2/useUpdateThankYouConfiguration.js.map +1 -0
  55. package/dist/cjs/v2/utils.js +3 -0
  56. package/dist/cjs/v2/utils.js.map +1 -0
  57. package/dist/index.js +9 -9
  58. package/dist/thank-you-B9agG0DC.js +5 -0
  59. package/dist/thank-you-B9agG0DC.js.map +1 -0
  60. package/dist/{cjs/SocialShare-abuXAsLb.js → thank-you-CtNe3oCq.js} +2 -101
  61. package/dist/thank-you-CtNe3oCq.js.map +1 -0
  62. package/dist/useCreateThankYouConfiguration.js +1 -1
  63. package/dist/useDeleteThankYouConfiguration.js +1 -1
  64. package/dist/useFetchThankYouConfigurations.js +1 -1
  65. package/dist/useShowThankYouConfiguration.js +1 -1
  66. package/dist/{useThankYouConfigurationApi-DSQ3IBbq.js → useThankYouConfigurationApi-CCdlqC6e.js} +2 -2
  67. package/dist/{useThankYouConfigurationApi-DSQ3IBbq.js.map → useThankYouConfigurationApi-CCdlqC6e.js.map} +1 -1
  68. package/dist/useUpdateThankYouConfiguration.js +1 -1
  69. package/dist/v2/ConfigureThankYou.js +677 -0
  70. package/dist/v2/ConfigureThankYou.js.map +1 -0
  71. package/dist/v2/ShowThankYou.js +279 -0
  72. package/dist/v2/ShowThankYou.js.map +1 -0
  73. package/dist/v2/commons.js +4 -0
  74. package/dist/v2/commons.js.map +1 -0
  75. package/dist/v2/constants.js +9 -0
  76. package/dist/v2/constants.js.map +1 -0
  77. package/dist/v2/index.js +45 -0
  78. package/dist/v2/index.js.map +1 -0
  79. package/dist/v2/query.js +2 -0
  80. package/dist/v2/query.js.map +1 -0
  81. package/dist/v2/useCreateThankYouConfiguration.js +10 -0
  82. package/dist/v2/useCreateThankYouConfiguration.js.map +1 -0
  83. package/dist/v2/useDeleteThankYouConfiguration.js +10 -0
  84. package/dist/v2/useDeleteThankYouConfiguration.js.map +1 -0
  85. package/dist/v2/useFetchThankYouConfigurations.js +10 -0
  86. package/dist/v2/useFetchThankYouConfigurations.js.map +1 -0
  87. package/dist/v2/useShowThankYouConfiguration.js +10 -0
  88. package/dist/v2/useShowThankYouConfiguration.js.map +1 -0
  89. package/dist/v2/useShowThankYouPage.js +6 -0
  90. package/dist/v2/useShowThankYouPage.js.map +1 -0
  91. package/dist/v2/useUpdateThankYouConfiguration.js +10 -0
  92. package/dist/v2/useUpdateThankYouConfiguration.js.map +1 -0
  93. package/dist/v2/utils.js +2 -0
  94. package/dist/v2/utils.js.map +1 -0
  95. package/package.json +34 -24
  96. package/dist/SocialShare-C4rOGmnp.js.map +0 -1
  97. package/dist/cjs/SocialShare-abuXAsLb.js.map +0 -1
@@ -0,0 +1,698 @@
1
+ 'use strict';
2
+
3
+ var neetoCist = require('@bigbinary/neeto-cist');
4
+ require('../thank-you-BYHzj8zD.js');
5
+ require('../thank-you-BAOIUbgZ.js');
6
+ var SocialShare = require('../SocialShare-BFeAkgVT.js');
7
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
8
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
9
+ var react = require('react');
10
+ var neetoAtoms = require('@bigbinary/neeto-atoms');
11
+ var formik$1 = require('@bigbinary/neeto-atoms/formik');
12
+ var classNames = require('classnames');
13
+ var MobilePreviewHeader = require('@bigbinary/neeto-molecules/v2/MobilePreviewHeader');
14
+ var ramda = require('ramda');
15
+ var useThankYouConfigurationApi = require('../useThankYouConfigurationApi-Bx8hQqrm.js');
16
+ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
17
+ var formik = require('formik');
18
+ var FormikEditor = require('@bigbinary/neeto-editor/v2/FormikEditor');
19
+ var reactI18next = require('react-i18next');
20
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
21
+ var jsxRuntime = require('react/jsx-runtime');
22
+ var BrowserPreview = require('@bigbinary/neeto-molecules/v2/BrowserPreview');
23
+ var BrandingInfo = require('../BrandingInfo-CxPUChPj.js');
24
+ var v2_constants = require('./constants.js');
25
+ var EditorContent = require('@bigbinary/neeto-editor/v2/EditorContent');
26
+ var Link = require('@bigbinary/neeto-icons/Link');
27
+ var HelpPopover = require('@bigbinary/neeto-molecules/v2/HelpPopover');
28
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
29
+ var NeetoUIHeader = require('@bigbinary/neeto-molecules/v2/Header');
30
+ var i18next = require('i18next');
31
+ var utils = require('@bigbinary/neeto-editor/v2/utils');
32
+ var yup = require('yup');
33
+ require('@bigbinary/neeto-commons-frontend/v2/initializers');
34
+ require('@tanstack/react-query');
35
+ require('@bigbinary/neeto-commons-frontend/react-utils');
36
+ require('axios');
37
+ require('@bigbinary/neeto-commons-frontend/utils');
38
+ require('../index-Bp2NY-mY.js');
39
+ require('../query.js');
40
+ require('@bigbinary/neeto-molecules/v2/MadeWith');
41
+
42
+ function _interopNamespaceDefault(e) {
43
+ var n = Object.create(null);
44
+ if (e) {
45
+ Object.keys(e).forEach(function (k) {
46
+ if (k !== 'default') {
47
+ var d = Object.getOwnPropertyDescriptor(e, k);
48
+ Object.defineProperty(n, k, d.get ? d : {
49
+ enumerable: true,
50
+ get: function () { return e[k]; }
51
+ });
52
+ }
53
+ });
54
+ }
55
+ n.default = e;
56
+ return Object.freeze(n);
57
+ }
58
+
59
+ var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
60
+
61
+ var ResubmissionWarningModal = reactUtils.withT(function (_ref) {
62
+ var t = _ref.t,
63
+ isOpen = _ref.isOpen,
64
+ setIsOpen = _ref.setIsOpen,
65
+ uniqueSubmissionLink = _ref.uniqueSubmissionLink;
66
+ return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Dialog, {
67
+ isOpen: isOpen,
68
+ onClose: function onClose() {
69
+ return setIsOpen(false);
70
+ },
71
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Dialog.Header, {
72
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Dialog.Title, {
73
+ children: /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Typography, {
74
+ variant: "h3",
75
+ weight: "semibold",
76
+ children: [t("neetoThankYou.common.alert"), "!"]
77
+ })
78
+ })
79
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Dialog.Body, {
80
+ children: t("neetoThankYou.thankYou.resubmissionWarning")
81
+ }), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Dialog.Footer, {
82
+ className: "space-x-2",
83
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
84
+ label: t("neetoThankYou.common.ok"),
85
+ variant: "outline",
86
+ onClick: function onClick() {
87
+ return setIsOpen(false);
88
+ }
89
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
90
+ label: t("neetoThankYou.thankYou.uniqueSubmissionLinkText"),
91
+ to: uniqueSubmissionLink
92
+ })]
93
+ })]
94
+ });
95
+ });
96
+
97
+ var EXTERNAL_URL_PREFIX = "https://";
98
+ var DEFAULT_EDITOR_ADDONS = ["emoji"];
99
+
100
+ function ownKeys$6(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; }
101
+ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
102
+ var Customize = function Customize(_ref) {
103
+ var editorRef = _ref.editorRef,
104
+ editorProps = _ref.editorProps,
105
+ customMessage = _ref.customMessage,
106
+ hasImageUploader = _ref.hasImageUploader,
107
+ disableSocialShare = _ref.disableSocialShare,
108
+ disableSubmitAnotherResponse = _ref.disableSubmitAnotherResponse,
109
+ uniqueSubmissionEnabled = _ref.uniqueSubmissionEnabled,
110
+ uniqueSubmissionLink = _ref.uniqueSubmissionLink,
111
+ isUniqueSubmissionWarningModalOpen = _ref.isUniqueSubmissionWarningModalOpen,
112
+ setIsUniqueSubmissionWarningModalOpen = _ref.setIsUniqueSubmissionWarningModalOpen;
113
+ var _useTranslation = reactI18next.useTranslation(),
114
+ t = _useTranslation.t;
115
+ var _useFormikContext = formik.useFormikContext(),
116
+ values = _useFormikContext.values,
117
+ setFieldValue = _useFormikContext.setFieldValue;
118
+ var editorAddons = [].concat(_toConsumableArray(DEFAULT_EDITOR_ADDONS), _toConsumableArray(hasImageUploader ? ["image-upload"] : []));
119
+ react.useEffect(function () {
120
+ var _editorRef$current$ed;
121
+ setFieldValue("message", customMessage);
122
+ (_editorRef$current$ed = editorRef.current.editor) === null || _editorRef$current$ed === void 0 || _editorRef$current$ed.commands.setContent(customMessage);
123
+ }, [customMessage]);
124
+ var handleResubmitLinkChange = function handleResubmitLinkChange(checked) {
125
+ if (!uniqueSubmissionEnabled) return;
126
+
127
+ // atoms' formik Switch commits the new value before invoking this
128
+ // callback, so revert it to keep v1's behaviour of leaving the toggle
129
+ // untouched while the resubmission warning is shown.
130
+ setFieldValue("showResubmitLink", !checked);
131
+ setIsUniqueSubmissionWarningModalOpen(true);
132
+ };
133
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
134
+ className: "flex flex-col gap-4",
135
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
136
+ className: "flex flex-col gap-2",
137
+ children: /*#__PURE__*/jsxRuntime.jsx(FormikEditor, _objectSpread$6({
138
+ required: true,
139
+ addons: editorAddons,
140
+ "data-testid": "thank-you-message-editor",
141
+ label: t("neetoThankYou.thankYou.messageLabel"),
142
+ name: "message",
143
+ ref: editorRef
144
+ }, editorProps))
145
+ }), !disableSocialShare && /*#__PURE__*/jsxRuntime.jsx(formik$1.Switch, {
146
+ label: t("neetoThankYou.thankYou.socialShareIcons"),
147
+ name: "socialSharingEnabled"
148
+ }), !disableSubmitAnotherResponse && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
149
+ children: [/*#__PURE__*/jsxRuntime.jsx(formik$1.Switch, {
150
+ label: t("neetoThankYou.thankYou.showResubmitLink"),
151
+ name: "showResubmitLink",
152
+ onCheckedChange: handleResubmitLinkChange
153
+ }), values.showResubmitLink && /*#__PURE__*/jsxRuntime.jsx(formik$1.Input, {
154
+ required: true,
155
+ label: t("neetoThankYou.thankYou.resubmitLinkText"),
156
+ name: "resubmitLinkText"
157
+ })]
158
+ }), /*#__PURE__*/jsxRuntime.jsx(ResubmissionWarningModal, {
159
+ uniqueSubmissionLink: uniqueSubmissionLink,
160
+ isOpen: isUniqueSubmissionWarningModalOpen,
161
+ setIsOpen: setIsUniqueSubmissionWarningModalOpen
162
+ })]
163
+ });
164
+ };
165
+
166
+ function ownKeys$5(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; }
167
+ function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
168
+ var MemoizedEditorContent$1 = /*#__PURE__*/react.memo(EditorContent);
169
+ var CustomMessage = function CustomMessage(_ref) {
170
+ var _values$resubmitLinkT;
171
+ var resubmitLink = _ref.resubmitLink,
172
+ publicLinkId = _ref.publicLinkId,
173
+ socialHandles = _ref.socialHandles,
174
+ editorProps = _ref.editorProps,
175
+ appName = _ref.appName,
176
+ _ref$ctaProps = _ref.ctaProps,
177
+ ctaProps = _ref$ctaProps === void 0 ? {} : _ref$ctaProps;
178
+ var _useTranslation = reactI18next.useTranslation(),
179
+ t = _useTranslation.t;
180
+ var _useFormikContext = formik.useFormikContext(),
181
+ values = _useFormikContext.values;
182
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
183
+ children: [(values === null || values === void 0 ? void 0 : values.message) && /*#__PURE__*/jsxRuntime.jsx("div", {
184
+ className: "neeto-thank-you-configuration__description text-foreground",
185
+ children: /*#__PURE__*/jsxRuntime.jsx(MemoizedEditorContent$1, _objectSpread$5({
186
+ content: values.message,
187
+ "data-testid": "preview-editor-content"
188
+ }, editorProps))
189
+ }), (values === null || values === void 0 ? void 0 : values.showResubmitLink) && /*#__PURE__*/jsxRuntime.jsx("a", {
190
+ className: "neeto-thank-you-configuration__resubmit",
191
+ "data-testid": "preview-resubmit-link",
192
+ href: resubmitLink,
193
+ children: (_values$resubmitLinkT = values === null || values === void 0 ? void 0 : values.resubmitLinkText) !== null && _values$resubmitLinkT !== void 0 ? _values$resubmitLinkT : t("neetoThankYou.thankYou.resubmit")
194
+ }), (values === null || values === void 0 ? void 0 : values.socialSharingEnabled) && /*#__PURE__*/jsxRuntime.jsx(SocialShare.SocialShare, {
195
+ publicLinkId: publicLinkId,
196
+ socialHandles: socialHandles
197
+ }), neetoCist.isPresent(ctaProps) && /*#__PURE__*/jsxRuntime.jsx(SocialShare.CallToAction, _objectSpread$5({}, _objectSpread$5({
198
+ appName: appName
199
+ }, ctaProps)))]
200
+ });
201
+ };
202
+
203
+ function ownKeys$4(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; }
204
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
205
+ var MemoizedEditorContent = /*#__PURE__*/react.memo(EditorContent);
206
+ var RedirectMessage = function RedirectMessage(_ref) {
207
+ var editorProps = _ref.editorProps,
208
+ appName = _ref.appName,
209
+ _ref$ctaProps = _ref.ctaProps,
210
+ ctaProps = _ref$ctaProps === void 0 ? {} : _ref$ctaProps;
211
+ var _useTranslation = reactI18next.useTranslation(),
212
+ t = _useTranslation.t;
213
+ var _useFormikContext = formik.useFormikContext(),
214
+ values = _useFormikContext.values;
215
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
216
+ children: [(values === null || values === void 0 ? void 0 : values.redirectMessage) && /*#__PURE__*/jsxRuntime.jsx("div", {
217
+ className: "neeto-thank-you-configuration__description mt-6",
218
+ children: /*#__PURE__*/jsxRuntime.jsx(MemoizedEditorContent, _objectSpread$4({
219
+ content: values.redirectMessage,
220
+ "data-testid": "preview-editor-content"
221
+ }, editorProps))
222
+ }), /*#__PURE__*/jsxRuntime.jsx("p", {
223
+ className: "neeto-thank-you-configuration__redirect-message text-foreground",
224
+ children: t("neetoThankYou.thankYou.redirectingInSecondsMessage", {
225
+ seconds: SocialShare.REDIRECT_DELAY
226
+ })
227
+ }), neetoCist.isPresent(ctaProps) && /*#__PURE__*/jsxRuntime.jsx(SocialShare.CallToAction, _objectSpread$4({}, _objectSpread$4({
228
+ appName: appName
229
+ }, ctaProps)))]
230
+ });
231
+ };
232
+
233
+ function ownKeys$3(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; }
234
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
235
+ var Preview = function Preview(_ref) {
236
+ var socialHandles = _ref.socialHandles,
237
+ thankYouTextAlignment = _ref.thankYouTextAlignment,
238
+ resubmitLink = _ref.resubmitLink,
239
+ publicLinkId = _ref.publicLinkId,
240
+ appName = _ref.appName,
241
+ appIcon = _ref.appIcon,
242
+ ctaProps = _ref.ctaProps,
243
+ editorProps = _ref.editorProps;
244
+ var _useTranslation = reactI18next.useTranslation(),
245
+ t = _useTranslation.t;
246
+ var _useFormikContext = formik.useFormikContext(),
247
+ values = _useFormikContext.values;
248
+ var isCtaVisible = !v2_constants.IS_PRO_ORGANIZATION && (values === null || values === void 0 ? void 0 : values.brandingEnabled);
249
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
250
+ className: "neeto-thank-you-configuration-preview__wrapper",
251
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
252
+ className: "mb-3 block leading-normal md:hidden",
253
+ variant: "h3",
254
+ weight: "semibold",
255
+ children: t("neetoThankYou.thankYou.preview")
256
+ }), /*#__PURE__*/jsxRuntime.jsxs(BrowserPreview, {
257
+ className: classNames({
258
+ "neeto-thank-you-configuration-alignment--left": thankYouTextAlignment === SocialShare.THANK_YOU_TEXT_ALIGNMENTS.left,
259
+ "neeto-thank-you-configuration-alignment--center": thankYouTextAlignment === SocialShare.THANK_YOU_TEXT_ALIGNMENTS.center
260
+ }),
261
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
262
+ className: "neeto-thank-you-configuration",
263
+ children: /*#__PURE__*/jsxRuntime.jsx("main", {
264
+ className: "neeto-thank-you-configuration__main",
265
+ "data-testid": "neeto-thankyou-preview-main",
266
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
267
+ className: classNames("neeto-thank-you-configuration__box", {
268
+ "neeto-thank-you-configuration__box--is-cta-visible": isCtaVisible
269
+ }),
270
+ children: values.kind === SocialShare.FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsxRuntime.jsx(CustomMessage, _objectSpread$3({}, _objectSpread$3({
271
+ appName: appName,
272
+ editorProps: editorProps,
273
+ publicLinkId: publicLinkId,
274
+ resubmitLink: resubmitLink,
275
+ socialHandles: socialHandles
276
+ }, isCtaVisible && {
277
+ ctaProps: ctaProps
278
+ }))) : /*#__PURE__*/jsxRuntime.jsx(RedirectMessage, _objectSpread$3({}, _objectSpread$3({
279
+ appName: appName,
280
+ editorProps: editorProps
281
+ }, isCtaVisible && {
282
+ ctaProps: ctaProps
283
+ })))
284
+ })
285
+ })
286
+ }), !v2_constants.IS_PRO_ORGANIZATION && (values === null || values === void 0 ? void 0 : values.brandingEnabled) && /*#__PURE__*/jsxRuntime.jsx(BrandingInfo.BrandingInfo, {
287
+ appIcon: appIcon,
288
+ appName: appName
289
+ })]
290
+ })]
291
+ });
292
+ };
293
+
294
+ var _excluded = ["name", "title", "className"];
295
+ function ownKeys$2(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; }
296
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
297
+ var SwitchBlock = function SwitchBlock(_ref) {
298
+ var name = _ref.name,
299
+ title = _ref.title,
300
+ _ref$className = _ref.className,
301
+ className = _ref$className === void 0 ? "" : _ref$className,
302
+ otherProps = _objectWithoutProperties(_ref, _excluded);
303
+ return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
304
+ className: classNames("flex items-center justify-start gap-2", className),
305
+ "data-testid": "neeto-thank-you-nano-".concat(neetoCist.hyphenate(title && name), "-toggle-label"),
306
+ children: /*#__PURE__*/jsxRuntime.jsx(formik$1.Switch, _objectSpread$2(_objectSpread$2({}, _objectSpread$2(_objectSpread$2({}, otherProps), {}, {
307
+ name: name
308
+ })), {}, {
309
+ "data-testid": "neeto-thank-you-nano-".concat(neetoCist.hyphenate(title && name), "-switch"),
310
+ label: title
311
+ }))
312
+ });
313
+ };
314
+
315
+ 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; }
316
+ 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), true).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; }
317
+ var ExternalLink = function ExternalLink(_ref) {
318
+ var editorProps = _ref.editorProps,
319
+ isPassEventDetailsEnabled = _ref.isPassEventDetailsEnabled,
320
+ eventDetailsSwitchLabel = _ref.eventDetailsSwitchLabel,
321
+ passEventDetailsHelpDocUrl = _ref.passEventDetailsHelpDocUrl;
322
+ var _useTranslation = reactI18next.useTranslation(),
323
+ t = _useTranslation.t;
324
+ var passEventDetailsSwitchLabel = neetoCist.isNotEmpty(eventDetailsSwitchLabel) ? eventDetailsSwitchLabel : t("neetoThankYou.thankYou.passEventDetails");
325
+ var _useFormikContext = formik.useFormikContext(),
326
+ showRedirectMessage = _useFormikContext.values.showRedirectMessage;
327
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
328
+ className: "flex flex-col gap-4",
329
+ children: [/*#__PURE__*/jsxRuntime.jsx(formik$1.Input, {
330
+ autoFocus: true,
331
+ required: true,
332
+ className: "grow-0",
333
+ label: t("neetoThankYou.thankYou.link"),
334
+ name: "redirectUrl",
335
+ placeholder: EXTERNAL_URL_PREFIX,
336
+ prefix: /*#__PURE__*/jsxRuntime.jsx(Link, {})
337
+ }), isPassEventDetailsEnabled && /*#__PURE__*/jsxRuntime.jsxs("div", {
338
+ className: "flex space-x-2",
339
+ children: [/*#__PURE__*/jsxRuntime.jsx(formik$1.Switch, {
340
+ label: passEventDetailsSwitchLabel,
341
+ name: "passEventDetailsToRedirectUrl"
342
+ }), passEventDetailsHelpDocUrl && /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
343
+ className: "shrink-0",
344
+ helpLinkProps: {
345
+ href: passEventDetailsHelpDocUrl
346
+ },
347
+ title: passEventDetailsSwitchLabel
348
+ })]
349
+ }), /*#__PURE__*/jsxRuntime.jsx(SwitchBlock, {
350
+ name: "showRedirectMessage",
351
+ title: t("neetoThankYou.thankYou.showMessageWhileRedirecting")
352
+ }), showRedirectMessage && /*#__PURE__*/jsxRuntime.jsx("div", {
353
+ className: "flex flex-col gap-2",
354
+ children: /*#__PURE__*/jsxRuntime.jsx(FormikEditor, _objectSpread$1({
355
+ required: true,
356
+ addons: DEFAULT_EDITOR_ADDONS,
357
+ "data-testid": "neeto-thank-you-redirect-message-editor",
358
+ label: t("neetoThankYou.thankYou.messageLabel"),
359
+ name: "redirectMessage"
360
+ }, editorProps))
361
+ })]
362
+ });
363
+ };
364
+
365
+ var Header = reactUtils.withT(function (_ref) {
366
+ var t = _ref.t,
367
+ breadcrumbs = _ref.breadcrumbs,
368
+ helpPopoverProps = _ref.helpPopoverProps;
369
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
370
+ className: "w-full",
371
+ children: /*#__PURE__*/jsxRuntime.jsx(NeetoUIHeader, {
372
+ breadcrumbs: breadcrumbs,
373
+ size: "small",
374
+ title: t("neetoThankYou.common.thankYouPage"),
375
+ titleHelpPopoverProps: helpPopoverProps
376
+ })
377
+ });
378
+ });
379
+
380
+ var Label = function Label(_ref) {
381
+ var label = _ref.label,
382
+ description = _ref.description,
383
+ kind = _ref.kind;
384
+ return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Typography, {
385
+ "data-testid": "neeto-thank-you-configuration-".concat(neetoCist.hyphenate(kind), "-label"),
386
+ variant: "body2",
387
+ weight: "semibold",
388
+ children: [label, /*#__PURE__*/jsxRuntime.jsx("span", {
389
+ className: "block text-xs font-normal leading-snug",
390
+ "data-testid": "neeto-thank-you-configuration-".concat(neetoCist.hyphenate(kind), "-description"),
391
+ children: description
392
+ })]
393
+ });
394
+ };
395
+
396
+ var buildValidationSchema = function buildValidationSchema() {
397
+ var allowEmptyCustomMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
398
+ return yup__namespace.object().shape({
399
+ kind: yup__namespace.string().required(),
400
+ message: yup__namespace.string().when("kind", {
401
+ is: SocialShare.FORM_OPTIONS.customize.kind,
402
+ then: yup__namespace.string().test("message", i18next.t("neetoThankYou.thankYou.validations.messageRequired"), function (value) {
403
+ return allowEmptyCustomMessage || !utils.isEditorEmpty(value);
404
+ })
405
+ }),
406
+ socialSharingEnabled: yup__namespace.bool(),
407
+ showResubmitLink: yup__namespace.bool(),
408
+ resubmitLinkText: yup__namespace.string().when("showResubmitLink", {
409
+ is: true,
410
+ then: yup__namespace.string().required(i18next.t("neetoThankYou.thankYou.validations.resubmitLinkTextIsRequired"))
411
+ }),
412
+ redirectUrl: yup__namespace.string().when("kind", {
413
+ is: SocialShare.FORM_OPTIONS.externalLink.kind,
414
+ then: yup__namespace.string().url(i18next.t("neetoThankYou.thankYou.validations.invalidLink")).required(i18next.t("neetoThankYou.thankYou.validations.invalidLink")).when("kind", {
415
+ is: SocialShare.FORM_OPTIONS.customize.kind,
416
+ then: yup__namespace.string()
417
+ })
418
+ }),
419
+ redirectMessage: yup__namespace.string().when(["kind", "showRedirectMessage"], {
420
+ is: function is(kind, showRedirectMessage) {
421
+ return kind === SocialShare.FORM_OPTIONS.externalLink.kind && showRedirectMessage;
422
+ },
423
+ then: yup__namespace.string().test("redirectMessage", i18next.t("neetoThankYou.thankYou.validations.redirectMessageRequired"), function (value) {
424
+ return !utils.isEditorEmpty(value);
425
+ })
426
+ })
427
+ });
428
+ };
429
+
430
+ 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; }
431
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).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; }
432
+ var Form = function Form(_ref) {
433
+ var id = _ref.id,
434
+ socialHandles = _ref.socialHandles,
435
+ entityId = _ref.entityId,
436
+ publicLinkId = _ref.publicLinkId,
437
+ hasImageUploader = _ref.hasImageUploader,
438
+ uniqueSubmissionEnabled = _ref.uniqueSubmissionEnabled,
439
+ uniqueSubmissionLink = _ref.uniqueSubmissionLink,
440
+ redirectToOnCancel = _ref.redirectToOnCancel,
441
+ thankYouTextAlignment = _ref.thankYouTextAlignment,
442
+ resubmitLink = _ref.resubmitLink,
443
+ isPublished = _ref.isPublished,
444
+ disableSubmitAnotherResponse = _ref.disableSubmitAnotherResponse,
445
+ disableRadioSelection = _ref.disableRadioSelection,
446
+ appName = _ref.appName,
447
+ appIcon = _ref.appIcon,
448
+ blockNavigation = _ref.blockNavigation,
449
+ onConfigUpdateSuccess = _ref.onConfigUpdateSuccess,
450
+ editorProps = _ref.editorProps,
451
+ CustomPreview = _ref.preview,
452
+ allowEmptyCustomMessage = _ref.allowEmptyCustomMessage,
453
+ isPassEventDetailsEnabled = _ref.isPassEventDetailsEnabled,
454
+ passEventDetailsHelpDocUrl = _ref.passEventDetailsHelpDocUrl,
455
+ customHeader = _ref.customHeader,
456
+ breadcrumbs = _ref.breadcrumbs,
457
+ eventDetailsSwitchLabel = _ref.eventDetailsSwitchLabel,
458
+ helpPopoverProps = _ref.helpPopoverProps,
459
+ ctaProps = _ref.ctaProps;
460
+ var _useState = react.useState(false),
461
+ _useState2 = _slicedToArray(_useState, 2),
462
+ isUniqueSubmissionWarningModalOpen = _useState2[0],
463
+ setIsUniqueSubmissionWarningModalOpen = _useState2[1];
464
+ var _useFetchThankYouConf = useThankYouConfigurationApi.useFetchThankYouConfigurations(entityId),
465
+ _useFetchThankYouConf2 = _useFetchThankYouConf.data,
466
+ _useFetchThankYouConf3 = _useFetchThankYouConf2 === void 0 ? {} : _useFetchThankYouConf2,
467
+ _useFetchThankYouConf4 = _useFetchThankYouConf3.defaultMessage,
468
+ defaultMessage = _useFetchThankYouConf4 === void 0 ? "" : _useFetchThankYouConf4,
469
+ _useFetchThankYouConf5 = _useFetchThankYouConf3.primaryConfigurationId,
470
+ primaryConfigurationId = _useFetchThankYouConf5 === void 0 ? "" : _useFetchThankYouConf5,
471
+ isLoadingConfigurations = _useFetchThankYouConf.isLoading;
472
+ var configurationId = id !== null && id !== void 0 ? id : primaryConfigurationId;
473
+ var _useShowThankYouConfi = useThankYouConfigurationApi.useShowThankYouConfiguration({
474
+ entityId: entityId,
475
+ id: configurationId,
476
+ enabled: neetoCist.isPresent(configurationId)
477
+ }),
478
+ _useShowThankYouConfi2 = _useShowThankYouConfi.data,
479
+ _useShowThankYouConfi3 = _useShowThankYouConfi2 === void 0 ? {} : _useShowThankYouConfi2,
480
+ thankYouConfiguration = _useShowThankYouConfi3.thankYouConfiguration,
481
+ isLoadingConfiguration = _useShowThankYouConfi.isLoading;
482
+ var _useUpdateThankYouCon = useThankYouConfigurationApi.useUpdateThankYouConfiguration(configurationId),
483
+ updateThankYouConfiguration = _useUpdateThankYouCon.mutate,
484
+ isUpdatingForm = _useUpdateThankYouCon.isPending;
485
+ var editorRef = react.useRef({
486
+ editor: {}
487
+ });
488
+ var shouldBlockNavigation = blockNavigation && !isUpdatingForm && !isUniqueSubmissionWarningModalOpen;
489
+ var handleSubmit = function handleSubmit(values) {
490
+ var showResubmitLink = values.showResubmitLink,
491
+ kind = values.kind;
492
+ if (uniqueSubmissionEnabled && kind === SocialShare.THANK_YOU_KINDS.CUSTOM_MESSAGE && showResubmitLink) {
493
+ setIsUniqueSubmissionWarningModalOpen(true);
494
+ return;
495
+ }
496
+ updateThankYouConfiguration({
497
+ entityId: entityId,
498
+ payload: values
499
+ }, {
500
+ onSuccess: function onSuccess() {
501
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
502
+ args[_key] = arguments[_key];
503
+ }
504
+ return onConfigUpdateSuccess(args, thankYouConfiguration);
505
+ }
506
+ });
507
+ };
508
+ var customMessage = allowEmptyCustomMessage ? thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.message : (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.message) || defaultMessage;
509
+ var resetEditor = function resetEditor() {
510
+ var _editorRef$current$ed;
511
+ return (_editorRef$current$ed = editorRef.current.editor) === null || _editorRef$current$ed === void 0 ? void 0 : _editorRef$current$ed.commands.setContent(customMessage);
512
+ };
513
+ var shouldShowPreview = function shouldShowPreview(_ref2) {
514
+ var kind = _ref2.kind,
515
+ showRedirectMessage = _ref2.showRedirectMessage;
516
+ return kind === SocialShare.FORM_OPTIONS.customize.kind || showRedirectMessage;
517
+ };
518
+ if (isLoadingConfigurations || isLoadingConfiguration) {
519
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
520
+ className: "flex h-full w-full items-center justify-center",
521
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {})
522
+ });
523
+ }
524
+ return /*#__PURE__*/jsxRuntime.jsx(formik$1.Form, {
525
+ className: "h-full w-full",
526
+ formikProps: {
527
+ enableReinitialize: true,
528
+ initialValues: thankYouConfiguration || {},
529
+ validationSchema: buildValidationSchema(allowEmptyCustomMessage),
530
+ onSubmit: handleSubmit
531
+ },
532
+ children: function children(_ref3) {
533
+ var values = _ref3.values;
534
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
535
+ className: "neeto-thankyou-nano-wrapper flex h-full flex-col overflow-y-auto lg:flex-row",
536
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
537
+ className: "neeto-thankyou-nano__left-panel flex w-full flex-col px-5 md:px-10 lg:h-full lg:w-1/2 lg:overflow-y-auto",
538
+ "data-testid": "neeto-thankyou-left-panel",
539
+ children: [customHeader || /*#__PURE__*/jsxRuntime.jsx(Header, {
540
+ breadcrumbs: breadcrumbs,
541
+ helpPopoverProps: helpPopoverProps
542
+ }), shouldBlockNavigation && /*#__PURE__*/jsxRuntime.jsx(formik$1.BlockNavigation, {}), !disableRadioSelection && /*#__PURE__*/jsxRuntime.jsx("div", {
543
+ className: "mb-6 w-full",
544
+ children: /*#__PURE__*/jsxRuntime.jsx(formik$1.RadioGroup, {
545
+ className: "w-full grid-cols-1 items-stretch sm:grid-cols-2",
546
+ name: "kind",
547
+ orientation: "vertical",
548
+ children: Object.values(SocialShare.FORM_OPTIONS).map(function (option) {
549
+ return /*#__PURE__*/jsxRuntime.jsx(formik$1.RadioGroup.Item, {
550
+ label: /*#__PURE__*/jsxRuntime.jsx(Label, _objectSpread({}, option)),
551
+ value: option.kind,
552
+ className: classNames("neeto-thank-you-configuration-radio__item", {
553
+ active: values.kind === option.kind
554
+ })
555
+ }, option.kind);
556
+ })
557
+ })
558
+ }), values.kind === SocialShare.FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsxRuntime.jsx(Customize, {
559
+ customMessage: customMessage,
560
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
561
+ editorProps: editorProps,
562
+ editorRef: editorRef,
563
+ hasImageUploader: hasImageUploader,
564
+ isUniqueSubmissionWarningModalOpen: isUniqueSubmissionWarningModalOpen,
565
+ setIsUniqueSubmissionWarningModalOpen: setIsUniqueSubmissionWarningModalOpen,
566
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
567
+ uniqueSubmissionLink: uniqueSubmissionLink,
568
+ disableSocialShare: ramda.isEmpty(socialHandles)
569
+ }) : /*#__PURE__*/jsxRuntime.jsx(ExternalLink, {
570
+ editorProps: editorProps,
571
+ eventDetailsSwitchLabel: eventDetailsSwitchLabel,
572
+ isPassEventDetailsEnabled: isPassEventDetailsEnabled,
573
+ passEventDetailsHelpDocUrl: passEventDetailsHelpDocUrl
574
+ }), /*#__PURE__*/jsxRuntime.jsx(formik$1.ActionBlock, {
575
+ className: "bg-background sticky bottom-0 py-5",
576
+ isSubmitting: isUpdatingForm,
577
+ cancelButtonProps: _objectSpread({
578
+ "data-testid": "neeto-thank-you-configuration-cancel-button"
579
+ }, redirectToOnCancel ? {
580
+ to: redirectToOnCancel,
581
+ onClick: neetoCist.noop
582
+ } : {
583
+ type: "reset",
584
+ onClick: resetEditor
585
+ }),
586
+ submitButtonProps: {
587
+ "data-testid": "neeto-thank-you-configuration-save-button"
588
+ }
589
+ })]
590
+ }), shouldShowPreview(values) && (CustomPreview ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
591
+ children: [/*#__PURE__*/jsxRuntime.jsx(MobilePreviewHeader, {
592
+ className: "block lg:hidden"
593
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
594
+ className: "bg-muted neeto-thankyou-nano__right-panel w-full px-6 py-10 lg:h-full lg:w-1/2 lg:overflow-y-auto",
595
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomPreview, {
596
+ values: values
597
+ })
598
+ })]
599
+ }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
600
+ children: [/*#__PURE__*/jsxRuntime.jsx(MobilePreviewHeader, {
601
+ className: "block lg:hidden"
602
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
603
+ className: "bg-muted neeto-thankyou-nano__right-panel w-full px-6 py-10 lg:h-full lg:w-1/2 lg:overflow-y-auto",
604
+ children: /*#__PURE__*/jsxRuntime.jsx(Preview, {
605
+ appIcon: appIcon,
606
+ appName: appName,
607
+ ctaProps: ctaProps,
608
+ editorProps: editorProps,
609
+ isPublished: isPublished,
610
+ publicLinkId: publicLinkId,
611
+ resubmitLink: resubmitLink,
612
+ socialHandles: socialHandles,
613
+ thankYouTextAlignment: thankYouTextAlignment
614
+ })
615
+ })]
616
+ }))]
617
+ });
618
+ }
619
+ });
620
+ };
621
+
622
+ var ConfigureThankYou = function ConfigureThankYou(_ref) {
623
+ var id = _ref.id,
624
+ breadcrumbs = _ref.breadcrumbs,
625
+ isPublished = _ref.isPublished,
626
+ entityId = _ref.entityId,
627
+ publicLinkId = _ref.publicLinkId,
628
+ resubmitLink = _ref.resubmitLink,
629
+ redirectToOnCancel = _ref.redirectToOnCancel,
630
+ _ref$socialHandles = _ref.socialHandles,
631
+ socialHandles = _ref$socialHandles === void 0 ? [] : _ref$socialHandles,
632
+ _ref$uniqueSubmission = _ref.uniqueSubmissionLink,
633
+ uniqueSubmissionLink = _ref$uniqueSubmission === void 0 ? "" : _ref$uniqueSubmission,
634
+ _ref$uniqueSubmission2 = _ref.uniqueSubmissionEnabled,
635
+ uniqueSubmissionEnabled = _ref$uniqueSubmission2 === void 0 ? false : _ref$uniqueSubmission2,
636
+ _ref$hasImageUploader = _ref.hasImageUploader,
637
+ hasImageUploader = _ref$hasImageUploader === void 0 ? false : _ref$hasImageUploader,
638
+ _ref$disableSubmitAno = _ref.disableSubmitAnotherResponse,
639
+ disableSubmitAnotherResponse = _ref$disableSubmitAno === void 0 ? false : _ref$disableSubmitAno,
640
+ _ref$disableRadioSele = _ref.disableRadioSelection,
641
+ disableRadioSelection = _ref$disableRadioSele === void 0 ? false : _ref$disableRadioSele,
642
+ _ref$thankYouTextAlig = _ref.thankYouTextAlignment,
643
+ thankYouTextAlignment = _ref$thankYouTextAlig === void 0 ? SocialShare.THANK_YOU_TEXT_ALIGNMENTS.center : _ref$thankYouTextAlig,
644
+ customHeader = _ref.customHeader,
645
+ appName = _ref.appName,
646
+ appIcon = _ref.appIcon,
647
+ _ref$blockNavigation = _ref.blockNavigation,
648
+ blockNavigation = _ref$blockNavigation === void 0 ? false : _ref$blockNavigation,
649
+ _ref$onConfigUpdateSu = _ref.onConfigUpdateSuccess,
650
+ onConfigUpdateSuccess = _ref$onConfigUpdateSu === void 0 ? neetoCist.noop : _ref$onConfigUpdateSu,
651
+ _ref$editorProps = _ref.editorProps,
652
+ editorProps = _ref$editorProps === void 0 ? {} : _ref$editorProps,
653
+ preview = _ref.preview,
654
+ _ref$allowEmptyCustom = _ref.allowEmptyCustomMessage,
655
+ allowEmptyCustomMessage = _ref$allowEmptyCustom === void 0 ? false : _ref$allowEmptyCustom,
656
+ _ref$isPassEventDetai = _ref.isPassEventDetailsEnabled,
657
+ isPassEventDetailsEnabled = _ref$isPassEventDetai === void 0 ? false : _ref$isPassEventDetai,
658
+ _ref$passEventDetails = _ref.passEventDetailsHelpDocUrl,
659
+ passEventDetailsHelpDocUrl = _ref$passEventDetails === void 0 ? null : _ref$passEventDetails,
660
+ _ref$eventDetailsSwit = _ref.eventDetailsSwitchLabel,
661
+ eventDetailsSwitchLabel = _ref$eventDetailsSwit === void 0 ? "" : _ref$eventDetailsSwit,
662
+ _ref$helpPopoverProps = _ref.helpPopoverProps,
663
+ helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
664
+ _ref$ctaProps = _ref.ctaProps,
665
+ ctaProps = _ref$ctaProps === void 0 ? {} : _ref$ctaProps;
666
+ return /*#__PURE__*/jsxRuntime.jsx(Form, {
667
+ allowEmptyCustomMessage: allowEmptyCustomMessage,
668
+ appIcon: appIcon,
669
+ appName: appName,
670
+ blockNavigation: blockNavigation,
671
+ breadcrumbs: breadcrumbs,
672
+ ctaProps: ctaProps,
673
+ customHeader: customHeader,
674
+ disableRadioSelection: disableRadioSelection,
675
+ disableSubmitAnotherResponse: disableSubmitAnotherResponse,
676
+ editorProps: editorProps,
677
+ entityId: entityId,
678
+ eventDetailsSwitchLabel: eventDetailsSwitchLabel,
679
+ hasImageUploader: hasImageUploader,
680
+ helpPopoverProps: helpPopoverProps,
681
+ id: id,
682
+ isPassEventDetailsEnabled: isPassEventDetailsEnabled,
683
+ isPublished: isPublished,
684
+ onConfigUpdateSuccess: onConfigUpdateSuccess,
685
+ passEventDetailsHelpDocUrl: passEventDetailsHelpDocUrl,
686
+ preview: preview,
687
+ publicLinkId: publicLinkId,
688
+ redirectToOnCancel: redirectToOnCancel,
689
+ resubmitLink: resubmitLink,
690
+ socialHandles: socialHandles,
691
+ thankYouTextAlignment: thankYouTextAlignment,
692
+ uniqueSubmissionEnabled: uniqueSubmissionEnabled,
693
+ uniqueSubmissionLink: uniqueSubmissionLink
694
+ });
695
+ };
696
+
697
+ module.exports = ConfigureThankYou;
698
+ //# sourceMappingURL=ConfigureThankYou.js.map