@bigbinary/neeto-thank-you-frontend 3.0.0 → 3.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 (55) hide show
  1. package/README.md +22 -0
  2. package/app/javascript/src/translations/ar.json +1 -1
  3. package/app/javascript/src/translations/bg.json +1 -1
  4. package/app/javascript/src/translations/ca.json +1 -1
  5. package/app/javascript/src/translations/cs.json +1 -1
  6. package/app/javascript/src/translations/da.json +1 -1
  7. package/app/javascript/src/translations/de.json +1 -1
  8. package/app/javascript/src/translations/es-MX.json +1 -1
  9. package/app/javascript/src/translations/es.json +1 -1
  10. package/app/javascript/src/translations/et.json +1 -1
  11. package/app/javascript/src/translations/fi.json +1 -1
  12. package/app/javascript/src/translations/fil.json +1 -1
  13. package/app/javascript/src/translations/fr.json +1 -1
  14. package/app/javascript/src/translations/hi.json +1 -1
  15. package/app/javascript/src/translations/hr.json +1 -1
  16. package/app/javascript/src/translations/id.json +1 -1
  17. package/app/javascript/src/translations/it.json +1 -1
  18. package/app/javascript/src/translations/ja.json +1 -1
  19. package/app/javascript/src/translations/ko.json +1 -1
  20. package/app/javascript/src/translations/nl.json +1 -1
  21. package/app/javascript/src/translations/pl.json +1 -1
  22. package/app/javascript/src/translations/pt-BR.json +1 -1
  23. package/app/javascript/src/translations/pt.json +1 -1
  24. package/app/javascript/src/translations/ro.json +1 -1
  25. package/app/javascript/src/translations/ru.json +1 -1
  26. package/app/javascript/src/translations/sk.json +1 -1
  27. package/app/javascript/src/translations/sl.json +1 -1
  28. package/app/javascript/src/translations/sv.json +1 -1
  29. package/app/javascript/src/translations/th.json +1 -1
  30. package/app/javascript/src/translations/tr.json +1 -1
  31. package/app/javascript/src/translations/uk.json +1 -1
  32. package/app/javascript/src/translations/vi.json +1 -1
  33. package/app/javascript/src/translations/zh-CN.json +1 -1
  34. package/app/javascript/src/translations/zh-TW.json +1 -1
  35. package/dist/ConfigureThankYou.js +49 -22
  36. package/dist/ConfigureThankYou.js.map +1 -1
  37. package/dist/ShowThankYou.js +57 -30
  38. package/dist/ShowThankYou.js.map +1 -1
  39. package/dist/SocialShare-DRpEs_-B.js +97 -0
  40. package/dist/SocialShare-DRpEs_-B.js.map +1 -0
  41. package/dist/cjs/ConfigureThankYou.js +48 -21
  42. package/dist/cjs/ConfigureThankYou.js.map +1 -1
  43. package/dist/cjs/ShowThankYou.js +57 -30
  44. package/dist/cjs/ShowThankYou.js.map +1 -1
  45. package/dist/cjs/SocialShare-DRVbUnBv.js +105 -0
  46. package/dist/cjs/SocialShare-DRVbUnBv.js.map +1 -0
  47. package/dist/cjs/index.js +2 -2
  48. package/dist/index.js +2 -2
  49. package/package.json +12 -12
  50. package/types/ConfigureThankYou.d.ts +5 -1
  51. package/types/ShowThankYou.d.ts +4 -0
  52. package/dist/SocialShare-SyR23dOh.js +0 -62
  53. package/dist/SocialShare-SyR23dOh.js.map +0 -1
  54. package/dist/cjs/SocialShare-BtTtwb5-.js +0 -69
  55. package/dist/cjs/SocialShare-BtTtwb5-.js.map +0 -1
@@ -1,22 +1,24 @@
1
1
  'use strict';
2
2
 
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
3
4
  var classNames = require('classnames');
4
5
  var NeetoUIPageLoader = require('@bigbinary/neeto-molecules/PageLoader');
5
6
  var BrandingInfo = require('./BrandingInfo-quX3BPdQ.js');
6
- var SocialShare = require('./SocialShare-BtTtwb5-.js');
7
+ var SocialShare = require('./SocialShare-DRVbUnBv.js');
7
8
  var constants = require('./constants.js');
8
9
  var useThankYouPageApi = require('./useThankYouPageApi-DeHETkcA.js');
9
- var DOMPurify = require('dompurify');
10
- var reactI18next = require('react-i18next');
10
+ var react = require('react');
11
11
  var neetoCist = require('@bigbinary/neeto-cist');
12
+ var EditorContent = require('@bigbinary/neeto-editor/EditorContent');
13
+ var reactI18next = require('react-i18next');
14
+ var DOMPurify = require('dompurify');
12
15
  var jsxRuntime = require('react/jsx-runtime');
13
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
14
16
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
15
- var react = require('react');
16
17
  var ramda = require('ramda');
17
18
  require('@bigbinary/neeto-molecules/MadeWith');
18
- require('i18next');
19
19
  require('@bigbinary/neeto-commons-frontend/initializers');
20
+ require('i18next');
21
+ require('@bigbinary/neeto-commons-frontend/react-utils');
20
22
  require('@tanstack/react-query');
21
23
  require('axios');
22
24
  require('./index-Bp2NY-mY.js');
@@ -57,7 +59,9 @@ var substituteVariables = function substituteVariables() {
57
59
  });
58
60
  };
59
61
 
60
- var sanitize$1 = DOMPurify.sanitize;
62
+ 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; }
63
+ 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), !0).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; }
64
+ var MemoizedEditorContent$1 = /*#__PURE__*/react.memo(EditorContent);
61
65
  var CustomMessage = function CustomMessage(_ref) {
62
66
  var _thankYouConfiguratio;
63
67
  var isDraftPreview = _ref.isDraftPreview,
@@ -65,17 +69,20 @@ var CustomMessage = function CustomMessage(_ref) {
65
69
  resubmitLink = _ref.resubmitLink,
66
70
  socialHandles = _ref.socialHandles,
67
71
  thankYouConfiguration = _ref.thankYouConfiguration,
68
- editorProps = _ref.editorProps;
72
+ editorProps = _ref.editorProps,
73
+ appName = _ref.appName,
74
+ _ref$ctaProps = _ref.ctaProps,
75
+ ctaProps = _ref$ctaProps === void 0 ? {} : _ref$ctaProps;
69
76
  var _useTranslation = reactI18next.useTranslation(),
70
77
  t = _useTranslation.t;
71
78
  var message = substituteVariables(thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.message, editorProps.variables);
72
79
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
73
80
  children: [(thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.message) && /*#__PURE__*/jsxRuntime.jsx("div", {
74
- className: "neeto-thank-you-configuration__description",
75
- dangerouslySetInnerHTML: {
76
- __html: sanitize$1(message)
77
- },
78
- "data-cy": "thank-you-page-message"
81
+ className: "neeto-thank-you-configuration__description neeto-ui-text-gray-800",
82
+ children: /*#__PURE__*/jsxRuntime.jsx(MemoizedEditorContent$1, _objectSpread$2({
83
+ content: message,
84
+ "data-cy": "thank-you-page-message"
85
+ }, editorProps))
79
86
  }), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.showResubmitLink) && /*#__PURE__*/jsxRuntime.jsx("a", {
80
87
  className: "neeto-thank-you-configuration__resubmit",
81
88
  "data-cy": "thank-you-page-resubmit-link",
@@ -87,19 +94,24 @@ var CustomMessage = function CustomMessage(_ref) {
87
94
  }), isDraftPreview && /*#__PURE__*/jsxRuntime.jsx("p", {
88
95
  className: "neeto-thank-you-configuration__draft-preview-message",
89
96
  children: t("neetoThankYou.thankYou.draftVersionForm")
90
- })]
97
+ }), neetoCist.isPresent(ctaProps) && /*#__PURE__*/jsxRuntime.jsx(SocialShare.CallToAction, _objectSpread$2({}, _objectSpread$2({
98
+ appName: appName
99
+ }, ctaProps)))]
91
100
  });
92
101
  };
93
102
 
94
- 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; }
95
- 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; }
96
- var sanitize = DOMPurify.sanitize;
103
+ 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; }
104
+ 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; }
105
+ var MemoizedEditorContent = /*#__PURE__*/react.memo(EditorContent);
97
106
  var ExternalLink = function ExternalLink(_ref) {
98
107
  var _ref$thankYouConfigur = _ref.thankYouConfiguration,
99
108
  thankYouConfiguration = _ref$thankYouConfigur === void 0 ? {} : _ref$thankYouConfigur,
100
109
  editorProps = _ref.editorProps,
101
110
  enableTopLevelRedirect = _ref.enableTopLevelRedirect,
102
- eventDetails = _ref.eventDetails;
111
+ eventDetails = _ref.eventDetails,
112
+ appName = _ref.appName,
113
+ _ref$ctaProps = _ref.ctaProps,
114
+ ctaProps = _ref$ctaProps === void 0 ? {} : _ref$ctaProps;
103
115
  var _useState = react.useState(SocialShare.REDIRECT_DELAY),
104
116
  _useState2 = _slicedToArray(_useState, 2),
105
117
  countdown = _useState2[0],
@@ -157,17 +169,17 @@ var ExternalLink = function ExternalLink(_ref) {
157
169
  }, [countdown, redirectUrl, passEventDetailsToRedirectUrl, enableTopLevelRedirect]);
158
170
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
159
171
  children: [redirectMessage && /*#__PURE__*/jsxRuntime.jsx("div", {
160
- className: "neeto-thank-you-configuration__description",
161
- dangerouslySetInnerHTML: {
162
- __html: sanitize(message)
163
- },
164
- "data-cy": "thank-you-page-message"
172
+ className: "neeto-thank-you-configuration__description mt-6",
173
+ children: /*#__PURE__*/jsxRuntime.jsx(MemoizedEditorContent, _objectSpread$1({
174
+ content: message,
175
+ "data-cy": "thank-you-page-message"
176
+ }, editorProps))
165
177
  }), isUnableToRedirect && /*#__PURE__*/jsxRuntime.jsx("p", {
166
178
  className: "neeto-thank-you-configuration__redirect-failure-message",
167
179
  children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
168
180
  i18nKey: "neetoThankYou.thankYou.redirectFailureMessage",
169
181
  components: {
170
- Link: /*#__PURE__*/jsxRuntime.jsx("a", _objectSpread({
182
+ Link: /*#__PURE__*/jsxRuntime.jsx("a", _objectSpread$1({
171
183
  href: getSafeURL(buildRedirectUrlWithParams())
172
184
  }, redirectFailureAnchorProps))
173
185
  }
@@ -177,10 +189,14 @@ var ExternalLink = function ExternalLink(_ref) {
177
189
  children: t("neetoThankYou.thankYou.redirectingInSecondsMessage", {
178
190
  seconds: countdown
179
191
  })
180
- })]
192
+ }), neetoCist.isPresent(ctaProps) && /*#__PURE__*/jsxRuntime.jsx(SocialShare.CallToAction, _objectSpread$1({}, _objectSpread$1({
193
+ appName: appName
194
+ }, ctaProps)))]
181
195
  });
182
196
  };
183
197
 
198
+ 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; }
199
+ 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; }
184
200
  var DefaultPageLoader = function DefaultPageLoader() {
185
201
  return /*#__PURE__*/jsxRuntime.jsx("div", {
186
202
  className: "neeto-thank-you-configuration",
@@ -205,7 +221,9 @@ var ShowThankYou = function ShowThankYou(_ref) {
205
221
  _ref$enableTopLevelRe = _ref.enableTopLevelRedirect,
206
222
  enableTopLevelRedirect = _ref$enableTopLevelRe === void 0 ? true : _ref$enableTopLevelRe,
207
223
  _ref$eventDetails = _ref.eventDetails,
208
- eventDetails = _ref$eventDetails === void 0 ? {} : _ref$eventDetails;
224
+ eventDetails = _ref$eventDetails === void 0 ? {} : _ref$eventDetails,
225
+ _ref$ctaProps = _ref.ctaProps,
226
+ ctaProps = _ref$ctaProps === void 0 ? {} : _ref$ctaProps;
209
227
  var _useShowThankYouPage = useThankYouPageApi.useShowThankYouPage({
210
228
  entityId: entityId,
211
229
  resourceId: resourceId
@@ -215,6 +233,7 @@ var ShowThankYou = function ShowThankYou(_ref) {
215
233
  thankYouConfiguration = _useShowThankYouPage$2.thankYouConfiguration,
216
234
  isFetching = _useShowThankYouPage.isFetching;
217
235
  var PageLoader = CustomPageLoader || DefaultPageLoader;
236
+ var isCtaVisible = !constants.IS_PRO_ORGANIZATION && (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.brandingEnabled);
218
237
  if (isFetching && isThankYouPageLoading) {
219
238
  return /*#__PURE__*/jsxRuntime.jsx(PageLoader, {});
220
239
  }
@@ -226,21 +245,29 @@ var ShowThankYou = function ShowThankYou(_ref) {
226
245
  "neeto-thank-you-configuration-alignment--center": thankYouTextAlignment === SocialShare.THANK_YOU_TEXT_ALIGNMENTS.center
227
246
  }),
228
247
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
229
- className: "neeto-thank-you-configuration__box",
230
248
  "data-cy": "thank-you-page-content",
231
- children: (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.kind) === SocialShare.FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsxRuntime.jsx(CustomMessage, {
249
+ className: classNames("neeto-thank-you-configuration__box", {
250
+ "neeto-thank-you-configuration__box--is-cta-visible": isCtaVisible
251
+ }),
252
+ children: (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.kind) === SocialShare.FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsxRuntime.jsx(CustomMessage, _objectSpread({}, _objectSpread({
253
+ appName: appName,
232
254
  editorProps: editorProps,
233
255
  isDraftPreview: isDraftPreview,
234
256
  publicLinkId: publicLinkId,
235
257
  resubmitLink: resubmitLink,
236
258
  socialHandles: socialHandles,
237
259
  thankYouConfiguration: thankYouConfiguration
238
- }) : /*#__PURE__*/jsxRuntime.jsx(ExternalLink, {
260
+ }, isCtaVisible && {
261
+ ctaProps: ctaProps
262
+ }))) : /*#__PURE__*/jsxRuntime.jsx(ExternalLink, _objectSpread({}, _objectSpread({
263
+ appName: appName,
239
264
  editorProps: editorProps,
240
265
  enableTopLevelRedirect: enableTopLevelRedirect,
241
266
  eventDetails: eventDetails,
242
267
  thankYouConfiguration: thankYouConfiguration
243
- })
268
+ }, isCtaVisible && {
269
+ ctaProps: ctaProps
270
+ })))
244
271
  })
245
272
  }), !constants.IS_PRO_ORGANIZATION && (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.brandingEnabled) && /*#__PURE__*/jsxRuntime.jsx(BrandingInfo.BrandingInfo, {
246
273
  appIcon: appIcon,
@@ -1 +1 @@
1
- {"version":3,"file":"ShowThankYou.js","sources":["../../app/javascript/src/components/ShowThankYou/utils.js","../../app/javascript/src/components/ShowThankYou/CustomMessage.jsx","../../app/javascript/src/components/ShowThankYou/ExternalLink.jsx","../../app/javascript/src/components/ShowThankYou/index.jsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { findBy } from \"neetocist\";\n\nimport { VARIABLE_SPAN_REGEX } from \"components/constants\";\n\nexport const buildDraftUrl = url => `${url}?draftPreview=true`;\n\nexport const getSafeURL = url => {\n try {\n const parsed = new URL(url);\n if (parsed.protocol !== \"https:\" && parsed.protocol !== \"http:\") {\n return undefined;\n }\n\n return DOMPurify.sanitize(url);\n } catch {\n return undefined;\n }\n};\n\nexport const substituteVariables = (highlightedContent = \"\", variables = []) =>\n highlightedContent.replace(VARIABLE_SPAN_REGEX, (matchedSpan, dataLabel) => {\n const dataLabelSplitted = dataLabel.split(\".\");\n\n if (dataLabelSplitted.length > 1) {\n const category = findBy({ category: dataLabelSplitted[0] }, variables);\n const variable = findBy(\n { key: dataLabelSplitted[1] },\n category?.variables || []\n );\n\n return variable?.value ? variable.value : matchedSpan;\n }\n\n const variable = findBy({ key: dataLabelSplitted[0] }, variables);\n\n return variable?.value ? variable.value : matchedSpan;\n });\n","import DOMPurify from \"dompurify\";\nimport { useTranslation } from \"react-i18next\";\n\nimport SocialShare from \"components/ConfigureThankYou/Customize/SocialShare\";\n\nimport { buildDraftUrl, substituteVariables } from \"./utils\";\n\nconst sanitize = DOMPurify.sanitize;\n\nconst CustomMessage = ({\n isDraftPreview,\n publicLinkId,\n resubmitLink,\n socialHandles,\n thankYouConfiguration,\n editorProps,\n}) => {\n const { t } = useTranslation();\n\n const message = substituteVariables(\n thankYouConfiguration?.message,\n editorProps.variables\n );\n\n return (\n <>\n {thankYouConfiguration?.message && (\n <div\n className=\"neeto-thank-you-configuration__description\"\n dangerouslySetInnerHTML={{ __html: sanitize(message) }}\n data-cy=\"thank-you-page-message\"\n />\n )}\n {thankYouConfiguration?.showResubmitLink && (\n <a\n className=\"neeto-thank-you-configuration__resubmit\"\n data-cy=\"thank-you-page-resubmit-link\"\n href={isDraftPreview ? buildDraftUrl(resubmitLink) : resubmitLink}\n >\n {thankYouConfiguration?.resubmitLinkText ??\n t(\"neetoThankYou.common.resubmit\")}\n </a>\n )}\n {thankYouConfiguration?.socialSharingEnabled && (\n <SocialShare {...{ publicLinkId, socialHandles }} />\n )}\n {isDraftPreview && (\n <p className=\"neeto-thank-you-configuration__draft-preview-message\">\n {t(\"neetoThankYou.thankYou.draftVersionForm\")}\n </p>\n )}\n </>\n );\n};\n\nexport default CustomMessage;\n","import { useEffect, useState } from \"react\";\n\nimport DOMPurify from \"dompurify\";\nimport { isPresent, filterNonNull } from \"neetocist\";\nimport { dec, toPairs } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { REDIRECT_DELAY } from \"components/commons/constants\";\n\nimport { getSafeURL, substituteVariables } from \"./utils\";\n\nconst sanitize = DOMPurify.sanitize;\n\nconst ExternalLink = ({\n thankYouConfiguration = {},\n editorProps,\n enableTopLevelRedirect,\n eventDetails,\n}) => {\n const [countdown, setCountdown] = useState(REDIRECT_DELAY);\n const [isUnableToRedirect, setIsUnableToRedirect] = useState(false);\n\n const { t } = useTranslation();\n\n const {\n redirectUrl = \"\",\n redirectMessage = \"\",\n passEventDetailsToRedirectUrl = false,\n } = thankYouConfiguration;\n const message = substituteVariables(redirectMessage, editorProps.variables);\n const redirectFailureAnchorProps = enableTopLevelRedirect\n ? { target: \"_top\", rel: \"noreferrer\" }\n : {};\n\n const buildRedirectUrlWithParams = () => {\n try {\n const redirectUrlWithParams = new URL(redirectUrl);\n\n if (passEventDetailsToRedirectUrl && isPresent(eventDetails)) {\n toPairs(filterNonNull(eventDetails)).forEach(([key, value]) => {\n redirectUrlWithParams.searchParams.set(key, value);\n });\n }\n\n return redirectUrlWithParams.toString();\n } catch {\n return redirectUrl;\n }\n };\n\n useEffect(() => {\n if (countdown === 0) {\n try {\n const redirectUrlWithParams = buildRedirectUrlWithParams();\n const redirectTarget = enableTopLevelRedirect\n ? window.top.location\n : window.location;\n\n redirectTarget.href = getSafeURL(redirectUrlWithParams);\n } catch {\n setIsUnableToRedirect(true);\n }\n\n return undefined;\n }\n\n const timer = setInterval(() => {\n setCountdown(dec);\n }, 1000);\n\n return () => clearInterval(timer);\n }, [\n countdown,\n redirectUrl,\n passEventDetailsToRedirectUrl,\n enableTopLevelRedirect,\n ]);\n\n return (\n <>\n {redirectMessage && (\n <div\n className=\"neeto-thank-you-configuration__description\"\n dangerouslySetInnerHTML={{ __html: sanitize(message) }}\n data-cy=\"thank-you-page-message\"\n />\n )}\n {isUnableToRedirect && (\n <p className=\"neeto-thank-you-configuration__redirect-failure-message\">\n <Trans\n i18nKey=\"neetoThankYou.thankYou.redirectFailureMessage\"\n components={{\n Link: (\n <a\n href={getSafeURL(buildRedirectUrlWithParams())}\n {...redirectFailureAnchorProps}\n />\n ),\n }}\n />\n </p>\n )}\n {!isUnableToRedirect && countdown > 0 && (\n <p className=\"neeto-thank-you-configuration__redirect-message\">\n {t(\"neetoThankYou.thankYou.redirectingInSecondsMessage\", {\n seconds: countdown,\n })}\n </p>\n )}\n </>\n );\n};\n\nexport default ExternalLink;\n","import classNames from \"classnames\";\nimport NeetoUIPageLoader from \"neetomolecules/PageLoader\";\n\nimport BrandingInfo from \"components/commons/BrandingInfo\";\nimport {\n FORM_OPTIONS,\n THANK_YOU_TEXT_ALIGNMENTS,\n} from \"components/commons/constants\";\nimport { IS_PRO_ORGANIZATION } from \"components/constants\";\nimport { useShowThankYouPage } from \"hooks/reactQuery/useThankYouPageApi\";\n// eslint-disable-next-line import/extensions\nimport \"stylesheets/layout/_thank-you.scss\";\n\nimport CustomMessage from \"./CustomMessage\";\nimport ExternalLink from \"./ExternalLink\";\n\nconst DefaultPageLoader = () => (\n <div className=\"neeto-thank-you-configuration\">\n <NeetoUIPageLoader />\n </div>\n);\n\nconst ShowThankYou = ({\n entityId,\n isDraftPreview,\n resubmitLink,\n socialHandles,\n isThankYouPageLoading,\n publicLinkId,\n resourceId,\n appName,\n appIcon,\n customPageLoader: CustomPageLoader,\n thankYouTextAlignment = THANK_YOU_TEXT_ALIGNMENTS.center,\n editorProps = {},\n enableTopLevelRedirect = true,\n eventDetails = {},\n}) => {\n const { data: { thankYouConfiguration } = {}, isFetching } =\n useShowThankYouPage({ entityId, resourceId });\n\n const PageLoader = CustomPageLoader || DefaultPageLoader;\n\n if (isFetching && isThankYouPageLoading) {\n return <PageLoader />;\n }\n\n return (\n <div className=\"neeto-thank-you-configuration\">\n <main\n className={classNames(\"neeto-thank-you-configuration__main\", {\n \"neeto-thank-you-configuration-alignment--left\":\n thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.left,\n \"neeto-thank-you-configuration-alignment--center\":\n thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.center,\n })}\n >\n <div\n className=\"neeto-thank-you-configuration__box\"\n data-cy=\"thank-you-page-content\"\n >\n {thankYouConfiguration?.kind === FORM_OPTIONS.customize.kind ? (\n <CustomMessage\n {...{\n editorProps,\n isDraftPreview,\n publicLinkId,\n resubmitLink,\n socialHandles,\n thankYouConfiguration,\n }}\n />\n ) : (\n <ExternalLink\n {...{\n editorProps,\n enableTopLevelRedirect,\n eventDetails,\n thankYouConfiguration,\n }}\n />\n )}\n </div>\n </main>\n {!IS_PRO_ORGANIZATION && thankYouConfiguration?.brandingEnabled && (\n <BrandingInfo {...{ appIcon, appName }} />\n )}\n </div>\n );\n};\n\nexport default ShowThankYou;\n"],"names":["buildDraftUrl","url","concat","getSafeURL","parsed","URL","protocol","undefined","DOMPurify","sanitize","_unused","substituteVariables","highlightedContent","arguments","length","variables","replace","VARIABLE_SPAN_REGEX","matchedSpan","dataLabel","dataLabelSplitted","split","category","findBy","variable","key","value","CustomMessage","_ref","_thankYouConfiguratio","isDraftPreview","publicLinkId","resubmitLink","socialHandles","thankYouConfiguration","editorProps","_useTranslation","useTranslation","t","message","_jsxs","_Fragment","children","_jsx","className","dangerouslySetInnerHTML","__html","showResubmitLink","href","resubmitLinkText","socialSharingEnabled","SocialShare","ExternalLink","_ref$thankYouConfigur","enableTopLevelRedirect","eventDetails","_useState","useState","REDIRECT_DELAY","_useState2","_slicedToArray","countdown","setCountdown","_useState3","_useState4","isUnableToRedirect","setIsUnableToRedirect","redirectUrl","_thankYouConfiguratio2","redirectMessage","_thankYouConfiguratio3","passEventDetailsToRedirectUrl","redirectFailureAnchorProps","target","rel","buildRedirectUrlWithParams","redirectUrlWithParams","isPresent","toPairs","filterNonNull","forEach","_ref2","_ref3","searchParams","set","toString","useEffect","redirectTarget","window","top","location","_unused2","timer","setInterval","dec","clearInterval","Trans","i18nKey","components","Link","_objectSpread","seconds","DefaultPageLoader","NeetoUIPageLoader","ShowThankYou","entityId","isThankYouPageLoading","resourceId","appName","appIcon","CustomPageLoader","customPageLoader","_ref$thankYouTextAlig","thankYouTextAlignment","THANK_YOU_TEXT_ALIGNMENTS","center","_ref$editorProps","_ref$enableTopLevelRe","_ref$eventDetails","_useShowThankYouPage","useShowThankYouPage","_useShowThankYouPage$","data","_useShowThankYouPage$2","isFetching","PageLoader","classNames","left","kind","FORM_OPTIONS","customize","IS_PRO_ORGANIZATION","brandingEnabled","BrandingInfo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAGC,GAAG,EAAA;EAAA,OAAAC,EAAAA,CAAAA,MAAA,CAAOD,GAAG,EAAA,oBAAA,CAAA;AAAA,CAAoB;AAEvD,IAAME,UAAU,GAAG,SAAbA,UAAUA,CAAGF,GAAG,EAAI;EAC/B,IAAI;AACF,IAAA,IAAMG,MAAM,GAAG,IAAIC,GAAG,CAACJ,GAAG,CAAC;IAC3B,IAAIG,MAAM,CAACE,QAAQ,KAAK,QAAQ,IAAIF,MAAM,CAACE,QAAQ,KAAK,OAAO,EAAE;AAC/D,MAAA,OAAOC,SAAS;AAClB;AAEA,IAAA,OAAOC,SAAS,CAACC,QAAQ,CAACR,GAAG,CAAC;GAC/B,CAAC,OAAAS,OAAA,EAAM;AACN,IAAA,OAAOH,SAAS;AA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AACiG,6BAAmB,KAAIjG,qBAAqB,KAAA,IAAA,IAArBA,qBAAqB,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAArBA,qBAAqB,CAAEkG,eAAe,CAC7DzF,iBAAAA,cAAA,CAAC0F,yBAAY,EAAA;AAAOxB,MAAAA,OAAO,EAAPA,OAAO;AAAED,MAAAA,OAAO,EAAPA;AAAO,KAAK,CAC1C;AAAA,GACE,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"ShowThankYou.js","sources":["../../app/javascript/src/components/ShowThankYou/utils.js","../../app/javascript/src/components/ShowThankYou/CustomMessage.jsx","../../app/javascript/src/components/ShowThankYou/ExternalLink.jsx","../../app/javascript/src/components/ShowThankYou/index.jsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { findBy } from \"neetocist\";\n\nimport { VARIABLE_SPAN_REGEX } from \"components/constants\";\n\nexport const buildDraftUrl = url => `${url}?draftPreview=true`;\n\nexport const getSafeURL = url => {\n try {\n const parsed = new URL(url);\n if (parsed.protocol !== \"https:\" && parsed.protocol !== \"http:\") {\n return undefined;\n }\n\n return DOMPurify.sanitize(url);\n } catch {\n return undefined;\n }\n};\n\nexport const substituteVariables = (highlightedContent = \"\", variables = []) =>\n highlightedContent.replace(VARIABLE_SPAN_REGEX, (matchedSpan, dataLabel) => {\n const dataLabelSplitted = dataLabel.split(\".\");\n\n if (dataLabelSplitted.length > 1) {\n const category = findBy({ category: dataLabelSplitted[0] }, variables);\n const variable = findBy(\n { key: dataLabelSplitted[1] },\n category?.variables || []\n );\n\n return variable?.value ? variable.value : matchedSpan;\n }\n\n const variable = findBy({ key: dataLabelSplitted[0] }, variables);\n\n return variable?.value ? variable.value : matchedSpan;\n });\n","import { memo } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { EditorContent } from \"neetoeditor\";\nimport { useTranslation } from \"react-i18next\";\n\nimport CallToAction from \"components/commons/CallToAction\";\nimport SocialShare from \"components/ConfigureThankYou/Customize/SocialShare\";\n\nimport { buildDraftUrl, substituteVariables } from \"./utils\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst CustomMessage = ({\n isDraftPreview,\n publicLinkId,\n resubmitLink,\n socialHandles,\n thankYouConfiguration,\n editorProps,\n appName,\n ctaProps = {},\n}) => {\n const { t } = useTranslation();\n\n const message = substituteVariables(\n thankYouConfiguration?.message,\n editorProps.variables\n );\n\n return (\n <>\n {thankYouConfiguration?.message && (\n <div className=\"neeto-thank-you-configuration__description neeto-ui-text-gray-800\">\n <MemoizedEditorContent\n content={message}\n data-cy=\"thank-you-page-message\"\n {...editorProps}\n />\n </div>\n )}\n {thankYouConfiguration?.showResubmitLink && (\n <a\n className=\"neeto-thank-you-configuration__resubmit\"\n data-cy=\"thank-you-page-resubmit-link\"\n href={isDraftPreview ? buildDraftUrl(resubmitLink) : resubmitLink}\n >\n {thankYouConfiguration?.resubmitLinkText ??\n t(\"neetoThankYou.common.resubmit\")}\n </a>\n )}\n {thankYouConfiguration?.socialSharingEnabled && (\n <SocialShare {...{ publicLinkId, socialHandles }} />\n )}\n {isDraftPreview && (\n <p className=\"neeto-thank-you-configuration__draft-preview-message\">\n {t(\"neetoThankYou.thankYou.draftVersionForm\")}\n </p>\n )}\n {isPresent(ctaProps) && <CallToAction {...{ appName, ...ctaProps }} />}\n </>\n );\n};\n\nexport default CustomMessage;\n","import { useEffect, useState, memo } from \"react\";\n\nimport { isPresent, filterNonNull } from \"neetocist\";\nimport { EditorContent } from \"neetoeditor\";\nimport { dec, toPairs } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport CallToAction from \"components/commons/CallToAction\";\nimport { REDIRECT_DELAY } from \"components/commons/constants\";\n\nimport { getSafeURL, substituteVariables } from \"./utils\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst ExternalLink = ({\n thankYouConfiguration = {},\n editorProps,\n enableTopLevelRedirect,\n eventDetails,\n appName,\n ctaProps = {},\n}) => {\n const [countdown, setCountdown] = useState(REDIRECT_DELAY);\n const [isUnableToRedirect, setIsUnableToRedirect] = useState(false);\n\n const { t } = useTranslation();\n\n const {\n redirectUrl = \"\",\n redirectMessage = \"\",\n passEventDetailsToRedirectUrl = false,\n } = thankYouConfiguration;\n const message = substituteVariables(redirectMessage, editorProps.variables);\n const redirectFailureAnchorProps = enableTopLevelRedirect\n ? { target: \"_top\", rel: \"noreferrer\" }\n : {};\n\n const buildRedirectUrlWithParams = () => {\n try {\n const redirectUrlWithParams = new URL(redirectUrl);\n\n if (passEventDetailsToRedirectUrl && isPresent(eventDetails)) {\n toPairs(filterNonNull(eventDetails)).forEach(([key, value]) => {\n redirectUrlWithParams.searchParams.set(key, value);\n });\n }\n\n return redirectUrlWithParams.toString();\n } catch {\n return redirectUrl;\n }\n };\n\n useEffect(() => {\n if (countdown === 0) {\n try {\n const redirectUrlWithParams = buildRedirectUrlWithParams();\n const redirectTarget = enableTopLevelRedirect\n ? window.top.location\n : window.location;\n\n redirectTarget.href = getSafeURL(redirectUrlWithParams);\n } catch {\n setIsUnableToRedirect(true);\n }\n\n return undefined;\n }\n\n const timer = setInterval(() => {\n setCountdown(dec);\n }, 1000);\n\n return () => clearInterval(timer);\n }, [\n countdown,\n redirectUrl,\n passEventDetailsToRedirectUrl,\n enableTopLevelRedirect,\n ]);\n\n return (\n <>\n {redirectMessage && (\n <div className=\"neeto-thank-you-configuration__description mt-6\">\n <MemoizedEditorContent\n content={message}\n data-cy=\"thank-you-page-message\"\n {...editorProps}\n />\n </div>\n )}\n {isUnableToRedirect && (\n <p className=\"neeto-thank-you-configuration__redirect-failure-message\">\n <Trans\n i18nKey=\"neetoThankYou.thankYou.redirectFailureMessage\"\n components={{\n Link: (\n <a\n href={getSafeURL(buildRedirectUrlWithParams())}\n {...redirectFailureAnchorProps}\n />\n ),\n }}\n />\n </p>\n )}\n {!isUnableToRedirect && countdown > 0 && (\n <p className=\"neeto-thank-you-configuration__redirect-message\">\n {t(\"neetoThankYou.thankYou.redirectingInSecondsMessage\", {\n seconds: countdown,\n })}\n </p>\n )}\n {isPresent(ctaProps) && <CallToAction {...{ appName, ...ctaProps }} />}\n </>\n );\n};\n\nexport default ExternalLink;\n","import classNames from \"classnames\";\nimport NeetoUIPageLoader from \"neetomolecules/PageLoader\";\n\nimport BrandingInfo from \"components/commons/BrandingInfo\";\nimport {\n FORM_OPTIONS,\n THANK_YOU_TEXT_ALIGNMENTS,\n} from \"components/commons/constants\";\nimport { IS_PRO_ORGANIZATION } from \"components/constants\";\nimport { useShowThankYouPage } from \"hooks/reactQuery/useThankYouPageApi\";\n// eslint-disable-next-line import/extensions\nimport \"stylesheets/layout/_thank-you.scss\";\n\nimport CustomMessage from \"./CustomMessage\";\nimport ExternalLink from \"./ExternalLink\";\n\nconst DefaultPageLoader = () => (\n <div className=\"neeto-thank-you-configuration\">\n <NeetoUIPageLoader />\n </div>\n);\n\nconst ShowThankYou = ({\n entityId,\n isDraftPreview,\n resubmitLink,\n socialHandles,\n isThankYouPageLoading,\n publicLinkId,\n resourceId,\n appName,\n appIcon,\n customPageLoader: CustomPageLoader,\n thankYouTextAlignment = THANK_YOU_TEXT_ALIGNMENTS.center,\n editorProps = {},\n enableTopLevelRedirect = true,\n eventDetails = {},\n ctaProps = {},\n}) => {\n const { data: { thankYouConfiguration } = {}, isFetching } =\n useShowThankYouPage({ entityId, resourceId });\n\n const PageLoader = CustomPageLoader || DefaultPageLoader;\n\n const isCtaVisible =\n !IS_PRO_ORGANIZATION && thankYouConfiguration?.brandingEnabled;\n\n if (isFetching && isThankYouPageLoading) {\n return <PageLoader />;\n }\n\n return (\n <div className=\"neeto-thank-you-configuration\">\n <main\n className={classNames(\"neeto-thank-you-configuration__main\", {\n \"neeto-thank-you-configuration-alignment--left\":\n thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.left,\n \"neeto-thank-you-configuration-alignment--center\":\n thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.center,\n })}\n >\n <div\n data-cy=\"thank-you-page-content\"\n className={classNames(\"neeto-thank-you-configuration__box\", {\n \"neeto-thank-you-configuration__box--is-cta-visible\": isCtaVisible,\n })}\n >\n {thankYouConfiguration?.kind === FORM_OPTIONS.customize.kind ? (\n <CustomMessage\n {...{\n appName,\n editorProps,\n isDraftPreview,\n publicLinkId,\n resubmitLink,\n socialHandles,\n thankYouConfiguration,\n ...(isCtaVisible && { ctaProps }),\n }}\n />\n ) : (\n <ExternalLink\n {...{\n appName,\n editorProps,\n enableTopLevelRedirect,\n eventDetails,\n thankYouConfiguration,\n ...(isCtaVisible && { ctaProps }),\n }}\n />\n )}\n </div>\n </main>\n {!IS_PRO_ORGANIZATION && thankYouConfiguration?.brandingEnabled && (\n <BrandingInfo {...{ appIcon, appName }} />\n )}\n </div>\n );\n};\n\nexport default ShowThankYou;\n"],"names":["buildDraftUrl","url","concat","getSafeURL","parsed","URL","protocol","undefined","DOMPurify","sanitize","_unused","substituteVariables","highlightedContent","arguments","length","variables","replace","VARIABLE_SPAN_REGEX","matchedSpan","dataLabel","dataLabelSplitted","split","category","findBy","variable","key","value","MemoizedEditorContent","memo","EditorContent","CustomMessage","_ref","_thankYouConfiguratio","isDraftPreview","publicLinkId","resubmitLink","socialHandles","thankYouConfiguration","editorProps","appName","_ref$ctaProps","ctaProps","_useTranslation","useTranslation","t","message","_jsxs","_Fragment","children","_jsx","className","_objectSpread","content","showResubmitLink","href","resubmitLinkText","socialSharingEnabled","SocialShare","isPresent","CallToAction","ExternalLink","_ref$thankYouConfigur","enableTopLevelRedirect","eventDetails","_useState","useState","REDIRECT_DELAY","_useState2","_slicedToArray","countdown","setCountdown","_useState3","_useState4","isUnableToRedirect","setIsUnableToRedirect","redirectUrl","_thankYouConfiguratio2","redirectMessage","_thankYouConfiguratio3","passEventDetailsToRedirectUrl","redirectFailureAnchorProps","target","rel","buildRedirectUrlWithParams","redirectUrlWithParams","toPairs","filterNonNull","forEach","_ref2","_ref3","searchParams","set","toString","useEffect","redirectTarget","window","top","location","_unused2","timer","setInterval","dec","clearInterval","Trans","i18nKey","components","Link","seconds","DefaultPageLoader","NeetoUIPageLoader","ShowThankYou","entityId","isThankYouPageLoading","resourceId","appIcon","CustomPageLoader","customPageLoader","_ref$thankYouTextAlig","thankYouTextAlignment","THANK_YOU_TEXT_ALIGNMENTS","center","_ref$editorProps","_ref$enableTopLevelRe","_ref$eventDetails","_useShowThankYouPage","useShowThankYouPage","_useShowThankYouPage$","data","_useShowThankYouPage$2","isFetching","PageLoader","isCtaVisible","IS_PRO_ORGANIZATION","brandingEnabled","classNames","left","kind","FORM_OPTIONS","customize","BrandingInfo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAGC,GAAG,EAAA;EAAA,OAAAC,EAAAA,CAAAA,MAAA,CAAOD,GAAG,EAAA,oBAAA,CAAA;AAAA,CAAoB;AAEvD,IAAME,UAAU,GAAG,SAAbA,UAAUA,CAAGF,GAAG,EAAI;EAC/B,IAAI;AACF,IAAA,IAAMG,MAAM,GAAG,IAAIC,GAAG,CAACJ,GAAG,CAAC;IAC3B,IAAIG,MAAM,CAACE,QAAQ,KAAK,QAAQ,IAAIF,MAAM,CAACE,QAAQ,KAAK,OAAO,EAAE;AAC/D,MAAA,OAAOC,SAAS;AAClB;AAEA,IAAA,OAAOC,SAAS,CAACC,QAAQ,CAACR,GAAG,CAAC;GAC/B,CAAC,OAAAS,OAAA,EAAM;AACN,IAAA,OAAOH,SAAS;AAClB;AACF,CAAC;AAEM,IAAMI,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAA;AAAA,EAAA,IAAIC,kBAAkB,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAN,SAAA,GAAAM,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAAA,EAAA,IAAEE,SAAS,GAAAF,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,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EgG,eAAe,CAC7DpF,iBAAAA,cAAA,CAAC0F,yBAAY,EAAA;AAAOzB,MAAAA,OAAO,EAAPA,OAAO;AAAE3E,MAAAA,OAAO,EAAPA;AAAO,KAAK,CAC1C;AAAA,GACE,CAAC;AAEV;;;;"}
@@ -0,0 +1,105 @@
1
+ 'use strict';
2
+
3
+ var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
4
+ var i18next = require('i18next');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
7
+
8
+ var THANK_YOU_KINDS = {
9
+ CUSTOM_MESSAGE: "custom_message",
10
+ REDIRECT_TO_URL: "redirect_to_url"
11
+ };
12
+ var FORM_OPTIONS = {
13
+ customize: {
14
+ label: i18next.t("neetoThankYou.thankYou.customize"),
15
+ description: i18next.t("neetoThankYou.thankYou.customizeDescription"),
16
+ kind: THANK_YOU_KINDS.CUSTOM_MESSAGE
17
+ },
18
+ externalLink: {
19
+ label: i18next.t("neetoThankYou.thankYou.externalLink"),
20
+ description: i18next.t("neetoThankYou.thankYou.externalLinkDescription"),
21
+ kind: THANK_YOU_KINDS.REDIRECT_TO_URL
22
+ }
23
+ };
24
+ var THANK_YOU_TEXT_ALIGNMENTS = {
25
+ left: "left",
26
+ center: "center"
27
+ };
28
+ var REDIRECT_DELAY = 5;
29
+ var NEETO = "Neeto";
30
+ var NEETO_BASE_URL = "https://www.neeto.com";
31
+ var UTM_SOURCE = "utm_source=cta";
32
+ var UTM_CAMPAIGN_PARAM = "utm_campaign";
33
+
34
+ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
35
+
36
+ var css = ".neeto-thank-you-configuration-preview__wrapper{display:flex;flex-direction:column}.neeto-thank-you-configuration{height:100dvh;position:relative;width:100%}.neeto-thank-you-configuration__main{height:100%;overflow-y:auto}.neeto-thank-you-configuration__box{container-name:thank-you-configuration-box;container-type:inline-size;margin:3.5rem auto;max-width:51.25rem;padding:3.5rem .9375rem;position:relative;text-align:center;width:100%}.neeto-thank-you-configuration__redirect-message{font-size:.75rem;opacity:.75}.neeto-thank-you-configuration__redirect-failure-message a[href]{color:#2d36d4!important}.neeto-thank-you-configuration__default-img-wrap{font-size:2.5rem;text-align:center}.neeto-thank-you-configuration-alignment--left .neeto-thank-you-configuration__box{align-items:flex-start;text-align:left}.neeto-thank-you-configuration__title{font-size:2rem;line-height:1.25;margin:.67em 0}.neeto-thank-you-configuration__description{font-size:1rem;line-height:1.5;margin:0 0 2rem}.neeto-thank-you-configuration__description a[href]{color:#2d36d4}.neeto-thank-you-configuration__social-share{margin-top:2rem}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow{align-items:center;display:inline-flex;flex-wrap:wrap;gap:1rem;justify-content:center}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow__item{font-size:1.5rem;width:-moz-fit-content;width:fit-content}.neeto-thank-you-configuration__social-share-title{font-size:1.25rem;font-weight:500;line-height:1.2;margin:.8rem 0}.neeto-thank-you-configuration__resubmit{border-bottom:1px solid;font-weight:600}.neeto-thank-you-configuration__box--is-cta-visible{padding-bottom:.9375rem}.neeto-thank-you-configuration__cta{align-items:center;background-color:#f6f7f8;border:1px solid rgba(2,94,112,.2);border-radius:.5rem;display:flex;flex-wrap:wrap;gap:.5rem;justify-content:space-between;margin-top:4rem;padding:1.25rem}@container thank-you-configuration-box (width < 780px){.neeto-thank-you-configuration__cta{gap:1rem;justify-content:center!important}}.neeto-thank-you-configuration__cta .neeto-thank-you-configuration__cta-message{color:#344054!important;font-size:1rem;font-weight:400;line-height:1.5}.neeto-thank-you-configuration__cta-button{align-items:center;background-color:#008068!important;border-radius:.25rem;color:#fff!important;cursor:pointer;display:flex;font-size:1rem!important;font-weight:500;height:2.5rem;justify-content:center;line-height:1.2;opacity:1!important;padding:.25rem 1rem;text-decoration:none!important;transition:all .3s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.neeto-thank-you-configuration__cta-button:focus,.neeto-thank-you-configuration__cta-button:focus-visible,.neeto-thank-you-configuration__cta-button:hover{background-color:#007a64!important}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview{height:100%;min-height:500px}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration{flex-grow:1;height:100%;max-height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration .neeto-thank-you-configuration__main{height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__branding-wrapper{position:absolute}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__box{pointer-events:none}.neeto-thank-you-configuration__branding-wrapper{bottom:.75rem;left:.75rem;position:fixed}.neeto-thank-you-configuration__draft-preview-message{font-size:.75rem;line-height:1.5}";
37
+ n(css,{});
38
+
39
+ var generateUtmParams = function generateUtmParams() {
40
+ var _globalProps$organiza;
41
+ var subdomain = (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain;
42
+ return "".concat(UTM_SOURCE).concat(subdomain ? "&".concat(UTM_CAMPAIGN_PARAM, "=").concat(subdomain) : "");
43
+ };
44
+ var generateProductPageUrl = function generateProductPageUrl(appName) {
45
+ var name = appName || initializers.globalProps.appName || NEETO;
46
+ var utmParams = generateUtmParams();
47
+ return "".concat(NEETO_BASE_URL, "/").concat(name.toLowerCase(), "?").concat(utmParams);
48
+ };
49
+
50
+ var CallToAction = function CallToAction(_ref) {
51
+ var appName = _ref.appName,
52
+ message = _ref.message,
53
+ buttonLabel = _ref.buttonLabel;
54
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
55
+ className: "neeto-thank-you-configuration__cta",
56
+ children: [/*#__PURE__*/jsxRuntime.jsx("p", {
57
+ className: "neeto-thank-you-configuration__cta-message",
58
+ children: message
59
+ }), /*#__PURE__*/jsxRuntime.jsx("a", {
60
+ className: "neeto-thank-you-configuration__cta-button",
61
+ "data-cy": "neeto-thank-you-configuration-cta-button",
62
+ href: generateProductPageUrl(appName),
63
+ rel: "noopener noreferrer",
64
+ target: "_blank",
65
+ children: buttonLabel
66
+ })]
67
+ });
68
+ };
69
+
70
+ var SocialShare = reactUtils.withT(function (_ref) {
71
+ var t = _ref.t,
72
+ socialHandles = _ref.socialHandles,
73
+ publicLinkId = _ref.publicLinkId;
74
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
75
+ className: "neeto-thank-you-configuration__social-share",
76
+ children: [/*#__PURE__*/jsxRuntime.jsx("h4", {
77
+ className: "neeto-thank-you-configuration__social-share-title",
78
+ children: t("neetoThankYou.thankYou.socialShareHeading")
79
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
80
+ className: "neeto-thank-you-configuration-social-follow",
81
+ children: socialHandles === null || socialHandles === void 0 ? void 0 : socialHandles.map(function (data, idx) {
82
+ var Icon = data.icon,
83
+ generateShareUrl = data.generateShareUrl;
84
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
85
+ className: "neeto-thank-you-configuration-social-follow__item",
86
+ children: /*#__PURE__*/jsxRuntime.jsx("a", {
87
+ href: generateShareUrl(publicLinkId),
88
+ rel: "noreferrer",
89
+ target: "_blank",
90
+ children: /*#__PURE__*/jsxRuntime.jsx(Icon, {})
91
+ })
92
+ }, idx);
93
+ })
94
+ })]
95
+ });
96
+ });
97
+
98
+ exports.CallToAction = CallToAction;
99
+ exports.FORM_OPTIONS = FORM_OPTIONS;
100
+ exports.REDIRECT_DELAY = REDIRECT_DELAY;
101
+ exports.SocialShare = SocialShare;
102
+ exports.THANK_YOU_KINDS = THANK_YOU_KINDS;
103
+ exports.THANK_YOU_TEXT_ALIGNMENTS = THANK_YOU_TEXT_ALIGNMENTS;
104
+ exports.n = n;
105
+ //# sourceMappingURL=SocialShare-DRVbUnBv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SocialShare-DRVbUnBv.js","sources":["../../app/javascript/src/components/commons/constants.js","../../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../../app/javascript/src/components/commons/utils.js","../../app/javascript/src/components/commons/CallToAction.jsx","../../app/javascript/src/components/ConfigureThankYou/Customize/SocialShare.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nexport const THANK_YOU_KINDS = {\n CUSTOM_MESSAGE: \"custom_message\",\n REDIRECT_TO_URL: \"redirect_to_url\",\n};\n\nexport const FORM_OPTIONS = {\n customize: {\n label: t(\"neetoThankYou.thankYou.customize\"),\n description: t(\"neetoThankYou.thankYou.customizeDescription\"),\n kind: THANK_YOU_KINDS.CUSTOM_MESSAGE,\n },\n externalLink: {\n label: t(\"neetoThankYou.thankYou.externalLink\"),\n description: t(\"neetoThankYou.thankYou.externalLinkDescription\"),\n kind: THANK_YOU_KINDS.REDIRECT_TO_URL,\n },\n};\n\nexport const THANK_YOU_TEXT_ALIGNMENTS = {\n left: \"left\",\n center: \"center\",\n};\n\nexport const REDIRECT_DELAY = 5;\n\nexport const NEETO = \"Neeto\";\nexport const NEETO_BASE_URL = \"https://www.neeto.com\";\nexport const UTM_SOURCE = \"utm_source=cta\";\nexport const UTM_CAMPAIGN_PARAM = \"utm_campaign\";\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { globalProps } from \"neetocommons/initializers\";\n\nimport {\n UTM_SOURCE,\n UTM_CAMPAIGN_PARAM,\n NEETO,\n NEETO_BASE_URL,\n} from \"./constants\";\n\nexport const generateUtmParams = () => {\n const subdomain = globalProps.organization?.subdomain;\n\n return `${UTM_SOURCE}${subdomain ? `&${UTM_CAMPAIGN_PARAM}=${subdomain}` : \"\"}`;\n};\n\nexport const generateProductPageUrl = appName => {\n const name = appName || globalProps.appName || NEETO;\n const utmParams = generateUtmParams();\n\n return `${NEETO_BASE_URL}/${name.toLowerCase()}?${utmParams}`;\n};\n","import { generateProductPageUrl } from \"./utils\";\n\nconst CallToAction = ({ appName, message, buttonLabel }) => (\n <div className=\"neeto-thank-you-configuration__cta\">\n <p className=\"neeto-thank-you-configuration__cta-message\">{message}</p>\n <a\n className=\"neeto-thank-you-configuration__cta-button\"\n data-cy=\"neeto-thank-you-configuration-cta-button\"\n href={generateProductPageUrl(appName)}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n {buttonLabel}\n </a>\n </div>\n);\n\nexport default CallToAction;\n","import { withT } from \"neetocommons/react-utils\";\n\nconst SocialShare = withT(({ t, socialHandles, publicLinkId }) => (\n <div className=\"neeto-thank-you-configuration__social-share\">\n <h4 className=\"neeto-thank-you-configuration__social-share-title\">\n {t(\"neetoThankYou.thankYou.socialShareHeading\")}\n </h4>\n <div className=\"neeto-thank-you-configuration-social-follow\">\n {socialHandles?.map((data, idx) => {\n const { icon: Icon, generateShareUrl } = data;\n\n return (\n <div\n className=\"neeto-thank-you-configuration-social-follow__item\"\n key={idx}\n >\n <a\n href={generateShareUrl(publicLinkId)}\n rel=\"noreferrer\"\n target=\"_blank\"\n >\n <Icon />\n </a>\n </div>\n );\n })}\n </div>\n </div>\n));\n\nexport default SocialShare;\n"],"names":["THANK_YOU_KINDS","CUSTOM_MESSAGE","REDIRECT_TO_URL","FORM_OPTIONS","customize","label","t","description","kind","externalLink","THANK_YOU_TEXT_ALIGNMENTS","left","center","REDIRECT_DELAY","NEETO","NEETO_BASE_URL","UTM_SOURCE","UTM_CAMPAIGN_PARAM","generateUtmParams","_globalProps$organiza","subdomain","globalProps","organization","concat","generateProductPageUrl","appName","name","utmParams","toLowerCase","CallToAction","_ref","message","buttonLabel","_jsxs","className","children","_jsx","href","rel","target","SocialShare","withT","socialHandles","publicLinkId","map","data","idx","Icon","icon","generateShareUrl"],"mappings":";;;;;;;AAEO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,eAAe,EAAE;AACnB;AAEO,IAAMC,YAAY,GAAG;AAC1BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,KAAK,EAAEC,SAAC,CAAC,kCAAkC,CAAC;AAC5CC,IAAAA,WAAW,EAAED,SAAC,CAAC,6CAA6C,CAAC;IAC7DE,IAAI,EAAER,eAAe,CAACC;GACvB;AACDQ,EAAAA,YAAY,EAAE;AACZJ,IAAAA,KAAK,EAAEC,SAAC,CAAC,qCAAqC,CAAC;AAC/CC,IAAAA,WAAW,EAAED,SAAC,CAAC,gDAAgD,CAAC;IAChEE,IAAI,EAAER,eAAe,CAACE;AACxB;AACF;AAEO,IAAMQ,yBAAyB,GAAG;AACvCC,EAAAA,IAAI,EAAE,MA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AZa,YAAY;AAAA,EAAA,oBACzDV,eAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,6CAA6C;AAAAC,IAAAA,QAAA,gBAC1DC,cAAA,CAAA,IAAA,EAAA;AAAIF,MAAAA,SAAS,EAAC,mDAAmD;MAAAC,QAAA,EAC9D7B,CAAC,CAAC,2CAA2C;KAC5C,CAAC,eACL8B,cAAA,CAAA,KAAA,EAAA;AAAKF,MAAAA,SAAS,EAAC,6CAA6C;AAAAC,MAAAA,QAAA,EACzDO,aAAa,KAAbA,IAAAA,IAAAA,aAAa,KAAbA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,aAAa,CAAEE,GAAG,CAAC,UAACC,IAAI,EAAEC,GAAG,EAAK;AACjC,QAAA,IAAcC,IAAI,GAAuBF,IAAI,CAArCG,IAAI;UAAQC,gBAAgB,GAAKJ,IAAI,CAAzBI,gBAAgB;AAEpC,QAAA,oBACEb,cAAA,CAAA,KAAA,EAAA;AACEF,UAAAA,SAAS,EAAC,mDAAmD;AAAAC,UAAAA,QAAA,eAG7DC,cAAA,CAAA,GAAA,EAAA;AACEC,YAAAA,IAAI,EAAEY,gBAAgB,CAACN,YAAY,CAAE;AACrCL,YAAAA,GAAG,EAAC,YAAY;AAChBC,YAAAA,MAAM,EAAC,QAAQ;AAAAJ,YAAAA,QAAA,eAEfC,cAAA,CAACW,IAAI,EAAE,EAAA;WACN;AAAC,SAAA,EARCD,GASF,CAAC;OAET;AAAC,KACC,CAAC;AAAA,GACH,CAAC;AAAA,CACP;;;;;;;;;;","x_google_ignoreList":[1]}
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ var ConfigureThankYou = require('./ConfigureThankYou.js');
4
4
  var ShowThankYou = require('./ShowThankYou.js');
5
5
  var useThankYouConfigurationApi = require('./useThankYouConfigurationApi-CIRMlHep.js');
6
6
  var useThankYouPageApi = require('./useThankYouPageApi-DeHETkcA.js');
7
- var SocialShare = require('./SocialShare-BtTtwb5-.js');
7
+ var SocialShare = require('./SocialShare-DRVbUnBv.js');
8
8
  require('@bigbinary/neeto-cist');
9
9
  require('@babel/runtime/helpers/defineProperty');
10
10
  require('@babel/runtime/helpers/slicedToArray');
@@ -49,7 +49,7 @@ require('@bigbinary/neeto-commons-frontend/utils');
49
49
  require('./index-Bp2NY-mY.js');
50
50
  require('./query.js');
51
51
 
52
- var css = ":root{--neeto-thank-you-editor-content-color:0,0,0;--neeto-thank-you-background-color:255,255,255;--neeto-thank-you-background-image-position:center;--neeto-thank-you-gray-100:248,249,249;--neeto-thank-you-gray-800:31,31,31}.neeto-thank-you-configuration,.neeto-thank-you-configuration-preview__wrapper{display:flex;flex-direction:column}.neeto-thank-you-configuration{height:100vh;overflow-y:hidden;position:relative}.neeto-thank-you-configuration__nav{display:flex;justify-content:center;padding:.25rem;width:100%}.neeto-thank-you-configuration__link{align-items:center;color:inherit;display:flex;font-weight:600;gap:.25rem;text-decoration:none}.neeto-thank-you-configuration__link:hover{opacity:.8}.neeto-thank-you-configuration__link span{border-bottom:1px solid}.neeto-thank-you-configuration__link svg{height:1rem;width:auto}.neeto-thank-you-configuration__main{align-items:center;display:flex;height:100vh;justify-content:center;overflow-y:auto}.neeto-thank-you-configuration__box{margin:auto;max-width:100%;padding:3.5rem .9375rem;position:relative;text-align:center;width:51.25rem}.neeto-thank-you-configuration__redirect-message{bottom:.375rem;font-size:.75rem;left:0;opacity:.75;position:absolute;right:0}.neeto-thank-you-configuration__redirect-failure-message a[href]{color:#2d36d4!important}.neeto-thank-you-configuration__default-img-wrap{font-size:2.5rem;text-align:center}.neeto-thank-you-configuration-alignment--left .neeto-thank-you-configuration__box{align-items:flex-start;text-align:left}.neeto-thank-you-configuration__title{font-size:2rem;line-height:1.25;margin:.67em 0}.neeto-thank-you-configuration__description{font-size:1rem;line-height:1.5;margin:0 0 2rem}.neeto-thank-you-configuration__description a[href]{color:#2d36d4}.neeto-thank-you-configuration__social-share{margin-top:2rem}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow{align-items:center;display:inline-flex;flex-wrap:wrap;gap:1rem;justify-content:center}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow__item{font-size:1.5rem;width:-moz-fit-content;width:fit-content}.neeto-thank-you-configuration__social-share-title{font-size:.8rem;font-weight:400;line-height:1.2;margin:.8rem 0}.neeto-thank-you-configuration__resubmit{border-bottom:1px solid;font-weight:600}.neeto-thank-you-configuration__nav-footer{align-items:center;display:flex;font-size:.875rem;gap:.5rem;justify-content:center}.neeto-thank-you-configuration__payment-pending{align-items:center;display:flex;flex-direction:column;height:100vh;justify-content:center;width:100%}.neeto-thank-you-configuration__payment-pending-body{align-items:center;color:\"#2f3941\";display:flex;flex-direction:column;gap:1rem;justify-content:center}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview{height:100%;min-height:500px}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration{flex-grow:1;height:100%;max-height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration .neeto-thank-you-configuration__main{height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__branding-wrapper{position:absolute}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__box{pointer-events:none}.neeto-thank-you-configuration__branding-wrapper{bottom:.75rem;left:.75rem;position:fixed}.neeto-thank-you-configuration__draft-preview-message{font-size:.75rem;line-height:1.5}.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:.75rem 1rem}.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:flex-start!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item .neeto-ui-radio{margin-top:.1875rem}.neeto-thank-you-configuration-radio__item.active{border:1.5px solid rgb(var(--neeto-ui-primary-800))}";
52
+ var css = ":root{--neeto-thank-you-editor-content-color:0,0,0;--neeto-thank-you-background-color:255,255,255;--neeto-thank-you-background-image-position:center;--neeto-thank-you-gray-100:248,249,249;--neeto-thank-you-gray-800:31,31,31}.neeto-thank-you-configuration-preview__wrapper{display:flex;flex-direction:column}.neeto-thank-you-configuration{height:100dvh;position:relative;width:100%}.neeto-thank-you-configuration__main{height:100%;overflow-y:auto}.neeto-thank-you-configuration__box{container-name:thank-you-configuration-box;container-type:inline-size;margin:3.5rem auto;max-width:51.25rem;padding:3.5rem .9375rem;position:relative;text-align:center;width:100%}.neeto-thank-you-configuration__redirect-message{font-size:.75rem;opacity:.75}.neeto-thank-you-configuration__redirect-failure-message a[href]{color:#2d36d4!important}.neeto-thank-you-configuration__default-img-wrap{font-size:2.5rem;text-align:center}.neeto-thank-you-configuration-alignment--left .neeto-thank-you-configuration__box{align-items:flex-start;text-align:left}.neeto-thank-you-configuration__title{font-size:2rem;line-height:1.25;margin:.67em 0}.neeto-thank-you-configuration__description{font-size:1rem;line-height:1.5;margin:0 0 2rem}.neeto-thank-you-configuration__description a[href]{color:#2d36d4}.neeto-thank-you-configuration__social-share{margin-top:2rem}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow{align-items:center;display:inline-flex;flex-wrap:wrap;gap:1rem;justify-content:center}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow__item{font-size:1.5rem;width:-moz-fit-content;width:fit-content}.neeto-thank-you-configuration__social-share-title{font-size:1.25rem;font-weight:500;line-height:1.2;margin:.8rem 0}.neeto-thank-you-configuration__resubmit{border-bottom:1px solid;font-weight:600}.neeto-thank-you-configuration__box--is-cta-visible{padding-bottom:.9375rem}.neeto-thank-you-configuration__cta{align-items:center;background-color:#f6f7f8;border:1px solid rgba(2,94,112,.2);border-radius:.5rem;display:flex;flex-wrap:wrap;gap:.5rem;justify-content:space-between;margin-top:4rem;padding:1.25rem}@container thank-you-configuration-box (width < 780px){.neeto-thank-you-configuration__cta{gap:1rem;justify-content:center!important}}.neeto-thank-you-configuration__cta .neeto-thank-you-configuration__cta-message{color:#344054!important;font-size:1rem;font-weight:400;line-height:1.5}.neeto-thank-you-configuration__cta-button{align-items:center;background-color:#008068!important;border-radius:.25rem;color:#fff!important;cursor:pointer;display:flex;font-size:1rem!important;font-weight:500;height:2.5rem;justify-content:center;line-height:1.2;opacity:1!important;padding:.25rem 1rem;text-decoration:none!important;transition:all .3s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.neeto-thank-you-configuration__cta-button:focus,.neeto-thank-you-configuration__cta-button:focus-visible,.neeto-thank-you-configuration__cta-button:hover{background-color:#007a64!important}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview{height:100%;min-height:500px}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration{flex-grow:1;height:100%;max-height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration .neeto-thank-you-configuration__main{height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__branding-wrapper{position:absolute}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__box{pointer-events:none}.neeto-thank-you-configuration__branding-wrapper{bottom:.75rem;left:.75rem;position:fixed}.neeto-thank-you-configuration__draft-preview-message{font-size:.75rem;line-height:1.5}.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:.75rem 1rem}.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:flex-start!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item .neeto-ui-radio{margin-top:.1875rem}.neeto-thank-you-configuration-radio__item.active{border:1.5px solid rgb(var(--neeto-ui-primary-800))}";
53
53
  SocialShare.n(css,{});
54
54
 
55
55
  exports.ConfigureThankYou = ConfigureThankYou;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ export { default as ConfigureThankYou } from './ConfigureThankYou.js';
2
2
  export { default as ShowThankYou } from './ShowThankYou.js';
3
3
  export { a as useCreateThankYouConfiguration, d as useDeleteThankYouConfiguration, u as useFetchThankYouConfigurations, b as useShowThankYouConfiguration, c as useUpdateThankYouConfiguration } from './useThankYouConfigurationApi-hprxzGah.js';
4
4
  export { u as useShowThankYouPage } from './useThankYouPageApi-Qu4dKbsj.js';
5
- import { n } from './SocialShare-SyR23dOh.js';
5
+ import { n } from './SocialShare-DRpEs_-B.js';
6
6
  import '@bigbinary/neeto-cist';
7
7
  import '@babel/runtime/helpers/defineProperty';
8
8
  import '@babel/runtime/helpers/slicedToArray';
@@ -47,6 +47,6 @@ import '@bigbinary/neeto-commons-frontend/utils';
47
47
  import './index-CJXBMIZP.js';
48
48
  import './query.js';
49
49
 
50
- var css = ":root{--neeto-thank-you-editor-content-color:0,0,0;--neeto-thank-you-background-color:255,255,255;--neeto-thank-you-background-image-position:center;--neeto-thank-you-gray-100:248,249,249;--neeto-thank-you-gray-800:31,31,31}.neeto-thank-you-configuration,.neeto-thank-you-configuration-preview__wrapper{display:flex;flex-direction:column}.neeto-thank-you-configuration{height:100vh;overflow-y:hidden;position:relative}.neeto-thank-you-configuration__nav{display:flex;justify-content:center;padding:.25rem;width:100%}.neeto-thank-you-configuration__link{align-items:center;color:inherit;display:flex;font-weight:600;gap:.25rem;text-decoration:none}.neeto-thank-you-configuration__link:hover{opacity:.8}.neeto-thank-you-configuration__link span{border-bottom:1px solid}.neeto-thank-you-configuration__link svg{height:1rem;width:auto}.neeto-thank-you-configuration__main{align-items:center;display:flex;height:100vh;justify-content:center;overflow-y:auto}.neeto-thank-you-configuration__box{margin:auto;max-width:100%;padding:3.5rem .9375rem;position:relative;text-align:center;width:51.25rem}.neeto-thank-you-configuration__redirect-message{bottom:.375rem;font-size:.75rem;left:0;opacity:.75;position:absolute;right:0}.neeto-thank-you-configuration__redirect-failure-message a[href]{color:#2d36d4!important}.neeto-thank-you-configuration__default-img-wrap{font-size:2.5rem;text-align:center}.neeto-thank-you-configuration-alignment--left .neeto-thank-you-configuration__box{align-items:flex-start;text-align:left}.neeto-thank-you-configuration__title{font-size:2rem;line-height:1.25;margin:.67em 0}.neeto-thank-you-configuration__description{font-size:1rem;line-height:1.5;margin:0 0 2rem}.neeto-thank-you-configuration__description a[href]{color:#2d36d4}.neeto-thank-you-configuration__social-share{margin-top:2rem}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow{align-items:center;display:inline-flex;flex-wrap:wrap;gap:1rem;justify-content:center}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow__item{font-size:1.5rem;width:-moz-fit-content;width:fit-content}.neeto-thank-you-configuration__social-share-title{font-size:.8rem;font-weight:400;line-height:1.2;margin:.8rem 0}.neeto-thank-you-configuration__resubmit{border-bottom:1px solid;font-weight:600}.neeto-thank-you-configuration__nav-footer{align-items:center;display:flex;font-size:.875rem;gap:.5rem;justify-content:center}.neeto-thank-you-configuration__payment-pending{align-items:center;display:flex;flex-direction:column;height:100vh;justify-content:center;width:100%}.neeto-thank-you-configuration__payment-pending-body{align-items:center;color:\"#2f3941\";display:flex;flex-direction:column;gap:1rem;justify-content:center}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview{height:100%;min-height:500px}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration{flex-grow:1;height:100%;max-height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration .neeto-thank-you-configuration__main{height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__branding-wrapper{position:absolute}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__box{pointer-events:none}.neeto-thank-you-configuration__branding-wrapper{bottom:.75rem;left:.75rem;position:fixed}.neeto-thank-you-configuration__draft-preview-message{font-size:.75rem;line-height:1.5}.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:.75rem 1rem}.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:flex-start!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item .neeto-ui-radio{margin-top:.1875rem}.neeto-thank-you-configuration-radio__item.active{border:1.5px solid rgb(var(--neeto-ui-primary-800))}";
50
+ var css = ":root{--neeto-thank-you-editor-content-color:0,0,0;--neeto-thank-you-background-color:255,255,255;--neeto-thank-you-background-image-position:center;--neeto-thank-you-gray-100:248,249,249;--neeto-thank-you-gray-800:31,31,31}.neeto-thank-you-configuration-preview__wrapper{display:flex;flex-direction:column}.neeto-thank-you-configuration{height:100dvh;position:relative;width:100%}.neeto-thank-you-configuration__main{height:100%;overflow-y:auto}.neeto-thank-you-configuration__box{container-name:thank-you-configuration-box;container-type:inline-size;margin:3.5rem auto;max-width:51.25rem;padding:3.5rem .9375rem;position:relative;text-align:center;width:100%}.neeto-thank-you-configuration__redirect-message{font-size:.75rem;opacity:.75}.neeto-thank-you-configuration__redirect-failure-message a[href]{color:#2d36d4!important}.neeto-thank-you-configuration__default-img-wrap{font-size:2.5rem;text-align:center}.neeto-thank-you-configuration-alignment--left .neeto-thank-you-configuration__box{align-items:flex-start;text-align:left}.neeto-thank-you-configuration__title{font-size:2rem;line-height:1.25;margin:.67em 0}.neeto-thank-you-configuration__description{font-size:1rem;line-height:1.5;margin:0 0 2rem}.neeto-thank-you-configuration__description a[href]{color:#2d36d4}.neeto-thank-you-configuration__social-share{margin-top:2rem}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow{align-items:center;display:inline-flex;flex-wrap:wrap;gap:1rem;justify-content:center}.neeto-thank-you-configuration__social-share .neeto-thank-you-configuration-social-follow__item{font-size:1.5rem;width:-moz-fit-content;width:fit-content}.neeto-thank-you-configuration__social-share-title{font-size:1.25rem;font-weight:500;line-height:1.2;margin:.8rem 0}.neeto-thank-you-configuration__resubmit{border-bottom:1px solid;font-weight:600}.neeto-thank-you-configuration__box--is-cta-visible{padding-bottom:.9375rem}.neeto-thank-you-configuration__cta{align-items:center;background-color:#f6f7f8;border:1px solid rgba(2,94,112,.2);border-radius:.5rem;display:flex;flex-wrap:wrap;gap:.5rem;justify-content:space-between;margin-top:4rem;padding:1.25rem}@container thank-you-configuration-box (width < 780px){.neeto-thank-you-configuration__cta{gap:1rem;justify-content:center!important}}.neeto-thank-you-configuration__cta .neeto-thank-you-configuration__cta-message{color:#344054!important;font-size:1rem;font-weight:400;line-height:1.5}.neeto-thank-you-configuration__cta-button{align-items:center;background-color:#008068!important;border-radius:.25rem;color:#fff!important;cursor:pointer;display:flex;font-size:1rem!important;font-weight:500;height:2.5rem;justify-content:center;line-height:1.2;opacity:1!important;padding:.25rem 1rem;text-decoration:none!important;transition:all .3s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.neeto-thank-you-configuration__cta-button:focus,.neeto-thank-you-configuration__cta-button:focus-visible,.neeto-thank-you-configuration__cta-button:hover{background-color:#007a64!important}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview{height:100%;min-height:500px}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration{flex-grow:1;height:100%;max-height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration .neeto-thank-you-configuration__main{height:100%}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__branding-wrapper{position:absolute}.neeto-thankyou-nano__right-panel .neeto-molecules-browser-preview .neeto-thank-you-configuration__box{pointer-events:none}.neeto-thank-you-configuration__branding-wrapper{bottom:.75rem;left:.75rem;position:fixed}.neeto-thank-you-configuration__draft-preview-message{font-size:.75rem;line-height:1.5}.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:.75rem 1rem}.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:flex-start!important}.neeto-thank-you-configuration-radio__item.neeto-ui-radio__item .neeto-ui-radio{margin-top:.1875rem}.neeto-thank-you-configuration-radio__item.active{border:1.5px solid rgb(var(--neeto-ui-primary-800))}";
51
51
  n(css,{});
52
52
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-thank-you-frontend",
3
- "version": "3.0.0",
3
+ "version": "3.1.1",
4
4
  "description": "A repo acts as the source of truth for the new nano's structure, configs, data etc.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/bigbinary/neeto-thank-you-nano",
@@ -58,14 +58,14 @@
58
58
  "@babel/preset-typescript": "7.26.0",
59
59
  "@babel/runtime": "7.26.10",
60
60
  "@bigbinary/babel-preset-neeto": "^1.0.3",
61
- "@bigbinary/eslint-plugin-neeto": "1.7.6",
61
+ "@bigbinary/eslint-plugin-neeto": "1.8.0",
62
62
  "@bigbinary/neeto-cist": "1.0.17",
63
- "@bigbinary/neeto-commons-frontend": "4.13.75",
64
- "@bigbinary/neeto-editor": "1.47.55",
63
+ "@bigbinary/neeto-commons-frontend": "4.13.85",
64
+ "@bigbinary/neeto-editor": "1.47.70",
65
65
  "@bigbinary/neeto-filters-frontend": "4.3.24",
66
- "@bigbinary/neeto-icons": "1.20.60",
67
- "@bigbinary/neeto-molecules": "4.0.74",
68
- "@bigbinary/neetoui": "8.3.37",
66
+ "@bigbinary/neeto-icons": "1.20.64",
67
+ "@bigbinary/neeto-molecules": "4.0.96",
68
+ "@bigbinary/neetoui": "8.3.45",
69
69
  "@emotion/is-prop-valid": "1.2.0",
70
70
  "@faker-js/faker": "8.2.0",
71
71
  "@honeybadger-io/js": "6.10.1",
@@ -173,12 +173,12 @@
173
173
  "peerDependencies": {
174
174
  "@babel/runtime": "7.26.10",
175
175
  "@bigbinary/neeto-cist": "1.0.17",
176
- "@bigbinary/neeto-commons-frontend": "4.13.75",
177
- "@bigbinary/neeto-editor": "1.47.55",
176
+ "@bigbinary/neeto-commons-frontend": "4.13.85",
177
+ "@bigbinary/neeto-editor": "1.47.70",
178
178
  "@bigbinary/neeto-filters-frontend": "4.3.24",
179
- "@bigbinary/neeto-icons": "1.20.60",
180
- "@bigbinary/neeto-molecules": "4.0.74",
181
- "@bigbinary/neetoui": "8.3.37",
179
+ "@bigbinary/neeto-icons": "1.20.64",
180
+ "@bigbinary/neeto-molecules": "4.0.96",
181
+ "@bigbinary/neetoui": "8.3.45",
182
182
  "@honeybadger-io/js": "6.10.1",
183
183
  "@honeybadger-io/react": "6.1.25",
184
184
  "@tailwindcss/container-queries": "^0.1.1",
@@ -39,9 +39,13 @@ interface ConfigureThankYouProps {
39
39
  preview?: ReactElement;
40
40
  allowEmptyCustomMessage?: boolean;
41
41
  isPassEventDetailsEnabled?: boolean;
42
- passEventDetailsHelpDocUrl?: string,
42
+ passEventDetailsHelpDocUrl?: string;
43
43
  helpPopoverProps?: HelpPopoverProps;
44
44
  eventDetailsSwitchLabel?: string;
45
+ ctaProps?: {
46
+ message?: string;
47
+ buttonLabel?: string;
48
+ };
45
49
  }
46
50
 
47
51
  const ConfigureThankYou: React.FC<ConfigureThankYouProps>;
@@ -20,6 +20,10 @@ interface ShowThankYouProps {
20
20
  customPageLoader?: React.ReactNode | (() => React.ReactNode);
21
21
  enableTopLevelRedirect?: boolean;
22
22
  eventDetails: Record<string, any>;
23
+ ctaProps?: {
24
+ message?: string;
25
+ buttonLabel?: string;
26
+ };
23
27
  }
24
28
  const ShowThankYou: React.FC<ShowThankYouProps>;
25
29