@bigbinary/neeto-thank-you-frontend 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.cjs.js +362 -293
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +362 -293
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/types.d.ts +29 -8
package/dist/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { hyphenate, noop } from '@bigbinary/neeto-cist';
|
|
4
4
|
import Scrollable from '@bigbinary/neeto-molecules/Scrollable';
|
|
5
5
|
import { t as t$1 } from 'i18next';
|
|
6
|
-
import { isEditorEmpty, FormikEditor, EditorContent } from '@bigbinary/neeto-editor';
|
|
7
|
-
import * as yup from 'yup';
|
|
8
6
|
import classNames from 'classnames';
|
|
9
7
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
10
8
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
@@ -12,21 +10,24 @@ import BlockNavigation from '@bigbinary/neetoui/formik/BlockNavigation';
|
|
|
12
10
|
import NeetoUIForm from '@bigbinary/neetoui/formik/Form';
|
|
13
11
|
import Radio from '@bigbinary/neetoui/formik/Radio';
|
|
14
12
|
import { isEmpty } from 'ramda';
|
|
15
|
-
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
13
|
+
import { useMutationWithInvalidation, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
16
14
|
import { useQuery } from 'react-query';
|
|
17
15
|
import axios from 'axios';
|
|
18
16
|
import { useFormikContext } from 'formik';
|
|
17
|
+
import { FormikEditor, EditorContent, isEditorEmpty } from '@bigbinary/neeto-editor';
|
|
19
18
|
import Label$1 from '@bigbinary/neetoui/Label';
|
|
20
19
|
import Input from '@bigbinary/neetoui/formik/Input';
|
|
21
20
|
import Switch from '@bigbinary/neetoui/formik/Switch';
|
|
22
21
|
import { useTranslation, Trans } from 'react-i18next';
|
|
23
22
|
import { ImageUploader } from '@bigbinary/neeto-image-uploader-frontend';
|
|
23
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
24
24
|
import Button from '@bigbinary/neetoui/Button';
|
|
25
25
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
26
26
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
27
27
|
import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
28
28
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
29
29
|
import { Link } from '@bigbinary/neeto-icons';
|
|
30
|
+
import * as yup from 'yup';
|
|
30
31
|
import NeetoUIHeader from '@bigbinary/neeto-molecules/Header';
|
|
31
32
|
|
|
32
33
|
var FORM_OPTIONS = {
|
|
@@ -45,25 +46,6 @@ var DEFAULT_IMAGE_PROPERTIES = {
|
|
|
45
46
|
imageSignedId: null,
|
|
46
47
|
imageUrl: ""
|
|
47
48
|
};
|
|
48
|
-
var VALIDATION_SCHEMA = yup.object().shape({
|
|
49
|
-
kind: yup.string().required(),
|
|
50
|
-
message: yup.string().test("message", t$1("neetoThankYou.thankYou.validations.messageRequired"), function (value) {
|
|
51
|
-
return !isEditorEmpty(value);
|
|
52
|
-
}),
|
|
53
|
-
socialSharingEnabled: yup.bool(),
|
|
54
|
-
showResubmitLink: yup.bool(),
|
|
55
|
-
resubmitLinkText: yup.string().when("showResubmitLink", {
|
|
56
|
-
is: true,
|
|
57
|
-
then: yup.string().required(t$1("neetoThankYou.thankYou.validations.resubmitLinkTextIsRequired"))
|
|
58
|
-
}),
|
|
59
|
-
redirectUrl: yup.string().when("kind", {
|
|
60
|
-
is: FORM_OPTIONS.externalLink.kind,
|
|
61
|
-
then: yup.string().url(t$1("neetoThankYou.thankYou.validations.invalidLink")).required(t$1("neetoThankYou.thankYou.validations.invalidLink")).when("kind", {
|
|
62
|
-
is: FORM_OPTIONS.customize.kind,
|
|
63
|
-
then: yup.string()
|
|
64
|
-
})
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
49
|
var EXTERNAL_URL_PREFIX = "https://";
|
|
68
50
|
var THANK_YOU_TEXT_ALIGNMENTS = {
|
|
69
51
|
left: "left",
|
|
@@ -139,8 +121,8 @@ var QUERY_KEYS = {
|
|
|
139
121
|
THANK_YOU_PAGE: "thank-you-page"
|
|
140
122
|
};
|
|
141
123
|
|
|
142
|
-
function ownKeys$
|
|
143
|
-
function _objectSpread$
|
|
124
|
+
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; }
|
|
125
|
+
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), !0).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; }
|
|
144
126
|
var useShowThankYouConfiguration = function useShowThankYouConfiguration(_ref) {
|
|
145
127
|
var entityId = _ref.entityId;
|
|
146
128
|
return useQuery([QUERY_KEYS.THANK_YOU_CONFIGURATION, entityId], function () {
|
|
@@ -155,7 +137,7 @@ var useUpdateThankYouConfiguration = function useUpdateThankYouConfiguration(opt
|
|
|
155
137
|
entityId: entityId,
|
|
156
138
|
payload: payload
|
|
157
139
|
});
|
|
158
|
-
}, _objectSpread$
|
|
140
|
+
}, _objectSpread$3({
|
|
159
141
|
keysToInvalidate: [QUERY_KEYS.THANK_YOU_CONFIGURATION]
|
|
160
142
|
}, options));
|
|
161
143
|
};
|
|
@@ -233,43 +215,50 @@ var Image = function Image() {
|
|
|
233
215
|
setFieldValue("imageUrl", image.url);
|
|
234
216
|
setFieldValue("imageSignedId", image.signedId);
|
|
235
217
|
};
|
|
236
|
-
return /*#__PURE__*/
|
|
218
|
+
return /*#__PURE__*/jsx(ImageUploader, {
|
|
237
219
|
className: "h-60",
|
|
238
|
-
key: values.imageUrl,
|
|
239
220
|
src: values.imageUrl,
|
|
240
221
|
uploadConfig: IMAGE_UPLOADER_CONFIG,
|
|
241
222
|
onUploadComplete: handleImageChange
|
|
242
|
-
});
|
|
223
|
+
}, values.imageUrl);
|
|
243
224
|
};
|
|
244
225
|
|
|
245
|
-
var ResubmissionWarningModal = function
|
|
246
|
-
var
|
|
226
|
+
var ResubmissionWarningModal = withT(function (_ref) {
|
|
227
|
+
var t = _ref.t,
|
|
228
|
+
isOpen = _ref.isOpen,
|
|
247
229
|
setIsOpen = _ref.setIsOpen,
|
|
248
230
|
uniqueSubmissionLink = _ref.uniqueSubmissionLink;
|
|
249
|
-
|
|
250
|
-
t = _useTranslation.t;
|
|
251
|
-
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
231
|
+
return /*#__PURE__*/jsxs(Modal, {
|
|
252
232
|
isOpen: isOpen,
|
|
253
233
|
onClose: function onClose() {
|
|
254
234
|
return setIsOpen(false);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
235
|
+
},
|
|
236
|
+
children: [/*#__PURE__*/jsx(Modal.Header, {
|
|
237
|
+
children: /*#__PURE__*/jsxs(Typography, {
|
|
238
|
+
style: "h3",
|
|
239
|
+
weight: "semibold",
|
|
240
|
+
children: [t("neetoThankYou.common.alert"), "!"]
|
|
241
|
+
})
|
|
242
|
+
}), /*#__PURE__*/jsx(Modal.Body, {
|
|
243
|
+
children: t("neetoThankYou.thankYou.resubmissionWarning")
|
|
244
|
+
}), /*#__PURE__*/jsxs(Modal.Footer, {
|
|
245
|
+
className: "space-x-2",
|
|
246
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
247
|
+
label: t("neetoThankYou.common.ok"),
|
|
248
|
+
style: "tertiary",
|
|
249
|
+
onClick: function onClick() {
|
|
250
|
+
return setIsOpen(false);
|
|
251
|
+
}
|
|
252
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
253
|
+
label: t("neetoThankYou.thankYou.uniqueSubmissionLinkText"),
|
|
254
|
+
to: uniqueSubmissionLink
|
|
255
|
+
})]
|
|
256
|
+
})]
|
|
257
|
+
});
|
|
258
|
+
});
|
|
272
259
|
|
|
260
|
+
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; }
|
|
261
|
+
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; }
|
|
273
262
|
var Customize = function Customize(_ref) {
|
|
274
263
|
var editorRef = _ref.editorRef,
|
|
275
264
|
uniqueSubmissionEnabled = _ref.uniqueSubmissionEnabled,
|
|
@@ -277,7 +266,8 @@ var Customize = function Customize(_ref) {
|
|
|
277
266
|
uniqueSubmissionLink = _ref.uniqueSubmissionLink,
|
|
278
267
|
entityId = _ref.entityId,
|
|
279
268
|
disableSocialShare = _ref.disableSocialShare,
|
|
280
|
-
disableSubmitAnotherResponse = _ref.disableSubmitAnotherResponse
|
|
269
|
+
disableSubmitAnotherResponse = _ref.disableSubmitAnotherResponse,
|
|
270
|
+
editorProps = _ref.editorProps;
|
|
281
271
|
var _useState = useState(false),
|
|
282
272
|
_useState2 = _slicedToArray(_useState, 2),
|
|
283
273
|
isUniqueSubmissionWarningModalOpen = _useState2[0],
|
|
@@ -303,37 +293,44 @@ var Customize = function Customize(_ref) {
|
|
|
303
293
|
var handleResubmitLinkChange = function handleResubmitLinkChange(event) {
|
|
304
294
|
uniqueSubmissionEnabled ? setIsUniqueSubmissionWarningModalOpen(true) : setFieldValue("showResubmitLink", event.target.checked);
|
|
305
295
|
};
|
|
306
|
-
return /*#__PURE__*/
|
|
307
|
-
className: "flex flex-col gap-4"
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
296
|
+
return /*#__PURE__*/jsxs("div", {
|
|
297
|
+
className: "flex flex-col gap-4",
|
|
298
|
+
children: [hasImageUploader && /*#__PURE__*/jsxs("div", {
|
|
299
|
+
className: "flex flex-col gap-2",
|
|
300
|
+
children: [/*#__PURE__*/jsx(Label$1, {
|
|
301
|
+
children: t("neetoThankYou.thankYou.imageLabel")
|
|
302
|
+
}), /*#__PURE__*/jsx(Image, {})]
|
|
303
|
+
}), /*#__PURE__*/jsx("div", {
|
|
304
|
+
className: "flex flex-col gap-2",
|
|
305
|
+
children: /*#__PURE__*/jsx(FormikEditor, _objectSpread$2({
|
|
306
|
+
required: true,
|
|
307
|
+
"data-cy": "thank-you-message-editor",
|
|
308
|
+
label: t("neetoThankYou.thankYou.messageLabel"),
|
|
309
|
+
name: "message",
|
|
310
|
+
ref: editorRef
|
|
311
|
+
}, editorProps))
|
|
312
|
+
}), !disableSocialShare && /*#__PURE__*/jsx(Switch, {
|
|
313
|
+
label: t("neetoThankYou.thankYou.socialShareIcons"),
|
|
314
|
+
name: "socialSharingEnabled"
|
|
315
|
+
}), !disableSubmitAnotherResponse && /*#__PURE__*/jsxs(Fragment, {
|
|
316
|
+
children: [/*#__PURE__*/jsx(Switch, {
|
|
317
|
+
label: t("neetoThankYou.thankYou.showResubmitLink"),
|
|
318
|
+
name: "showResubmitLink",
|
|
319
|
+
className: classNames({
|
|
320
|
+
"neeto-ui-switch--disabled": uniqueSubmissionEnabled
|
|
321
|
+
}),
|
|
322
|
+
onChange: handleResubmitLinkChange
|
|
323
|
+
}), values.showResubmitLink && /*#__PURE__*/jsx(Input, {
|
|
324
|
+
required: true,
|
|
325
|
+
label: t("neetoThankYou.thankYou.resubmitLinkText"),
|
|
326
|
+
name: "resubmitLinkText"
|
|
327
|
+
})]
|
|
328
|
+
}), /*#__PURE__*/jsx(ResubmissionWarningModal, {
|
|
329
|
+
uniqueSubmissionLink: uniqueSubmissionLink,
|
|
330
|
+
isOpen: isUniqueSubmissionWarningModalOpen,
|
|
331
|
+
setIsOpen: setIsUniqueSubmissionWarningModalOpen
|
|
332
|
+
})]
|
|
333
|
+
});
|
|
337
334
|
};
|
|
338
335
|
|
|
339
336
|
var ENVIRONMENTS = {
|
|
@@ -363,24 +360,27 @@ var BrandingInfo = function BrandingInfo(_ref) {
|
|
|
363
360
|
var _brandingInfo$additio;
|
|
364
361
|
var brandingInfo = _ref.brandingInfo,
|
|
365
362
|
appName = _ref.appName;
|
|
366
|
-
return /*#__PURE__*/
|
|
367
|
-
className: "neeto-thank-you-configuration__branding-wrap"
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
363
|
+
return /*#__PURE__*/jsx("div", {
|
|
364
|
+
className: "neeto-thank-you-configuration__branding-wrap",
|
|
365
|
+
children: /*#__PURE__*/jsx("div", {
|
|
366
|
+
className: "neeto-thank-you-configuration__nav",
|
|
367
|
+
children: /*#__PURE__*/jsx("div", {
|
|
368
|
+
className: "neeto-thank-you-configuration__nav-footer",
|
|
369
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
370
|
+
i18nKey: brandingInfo.displayText,
|
|
371
|
+
components: _objectSpread$1({
|
|
372
|
+
signUpLink: /*#__PURE__*/jsx("a", {
|
|
373
|
+
className: "neeto-thank-you-configuration__link",
|
|
374
|
+
href: buildSignUpUrl(appName),
|
|
375
|
+
rel: "noreferrer",
|
|
376
|
+
target: "_blank"
|
|
377
|
+
}),
|
|
378
|
+
span: /*#__PURE__*/jsx("span", {})
|
|
379
|
+
}, (_brandingInfo$additio = brandingInfo.additionalComponents) !== null && _brandingInfo$additio !== void 0 ? _brandingInfo$additio : {})
|
|
380
|
+
})
|
|
381
|
+
})
|
|
382
|
+
})
|
|
383
|
+
});
|
|
384
384
|
};
|
|
385
385
|
|
|
386
386
|
var _ellipse, _ellipse2, _ellipse3;
|
|
@@ -415,24 +415,28 @@ var SocialShare = function SocialShare(_ref) {
|
|
|
415
415
|
publicLinkId = _ref.publicLinkId;
|
|
416
416
|
var _useTranslation = useTranslation(),
|
|
417
417
|
t = _useTranslation.t;
|
|
418
|
-
return /*#__PURE__*/
|
|
419
|
-
className: "neeto-thank-you-configuration__social-share"
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
418
|
+
return /*#__PURE__*/jsxs("div", {
|
|
419
|
+
className: "neeto-thank-you-configuration__social-share",
|
|
420
|
+
children: [/*#__PURE__*/jsx("h3", {
|
|
421
|
+
className: "neeto-thank-you-configuration__social-share-title",
|
|
422
|
+
children: t("neetoThankYou.thankYou.socialShareHeading")
|
|
423
|
+
}), /*#__PURE__*/jsx("div", {
|
|
424
|
+
className: "neeto-thank-you-configuration-social-follow",
|
|
425
|
+
children: socialHandles === null || socialHandles === void 0 ? void 0 : socialHandles.map(function (data, idx) {
|
|
426
|
+
var Icon = data.icon,
|
|
427
|
+
generateShareUrl = data.generateShareUrl;
|
|
428
|
+
return /*#__PURE__*/jsx("div", {
|
|
429
|
+
className: "neeto-thank-you-configuration-social-follow__item",
|
|
430
|
+
children: /*#__PURE__*/jsx("a", {
|
|
431
|
+
href: generateShareUrl(publicLinkId),
|
|
432
|
+
rel: "noreferrer",
|
|
433
|
+
target: "_blank",
|
|
434
|
+
children: /*#__PURE__*/jsx(Icon, {})
|
|
435
|
+
})
|
|
436
|
+
}, idx);
|
|
437
|
+
})
|
|
438
|
+
})]
|
|
439
|
+
});
|
|
436
440
|
};
|
|
437
441
|
|
|
438
442
|
var MemoizedEditorContent = /*#__PURE__*/React__default.memo(EditorContent);
|
|
@@ -449,59 +453,69 @@ var Preview = function Preview(_ref) {
|
|
|
449
453
|
values = _useFormikContext.values;
|
|
450
454
|
var _useTranslation = useTranslation(),
|
|
451
455
|
t = _useTranslation.t;
|
|
452
|
-
return /*#__PURE__*/
|
|
453
|
-
className: "flex flex-col"
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
"neeto-thank-you-configuration-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
456
|
+
return /*#__PURE__*/jsxs("div", {
|
|
457
|
+
className: "flex flex-col",
|
|
458
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
459
|
+
className: "mb-3 block md:hidden",
|
|
460
|
+
lineHeight: "normal",
|
|
461
|
+
style: "h3",
|
|
462
|
+
weight: "semibold",
|
|
463
|
+
children: t("neetoThankYou.thankYou.preview")
|
|
464
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
465
|
+
className: classNames("neeto-thank-you-configuration-preview", {
|
|
466
|
+
"neeto-thank-you-configuration-alignment--left": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.left,
|
|
467
|
+
"neeto-thank-you-configuration-alignment--center": thankYouTextAlignment === THANK_YOU_TEXT_ALIGNMENTS.center,
|
|
468
|
+
"pointer-events-none": !isPublished
|
|
469
|
+
}),
|
|
470
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
471
|
+
className: "neeto-thank-you-configuration-preview__browser-header",
|
|
472
|
+
children: /*#__PURE__*/jsx(SvgBrowserControls, {})
|
|
473
|
+
}), /*#__PURE__*/jsx("div", {
|
|
474
|
+
className: "neeto-thank-you-configuration",
|
|
475
|
+
children: /*#__PURE__*/jsx("main", {
|
|
476
|
+
className: "neeto-thank-you-configuration__main",
|
|
477
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
478
|
+
className: "neeto-thank-you-configuration__box",
|
|
479
|
+
children: [!isEmpty(values === null || values === void 0 ? void 0 : values.imageUrl) && /*#__PURE__*/jsx("div", {
|
|
480
|
+
className: "neeto-thank-you-configuration__img",
|
|
481
|
+
children: /*#__PURE__*/jsx("img", {
|
|
482
|
+
alt: "",
|
|
483
|
+
src: values.imageUrl
|
|
484
|
+
})
|
|
485
|
+
}), (values === null || values === void 0 ? void 0 : values.message) && /*#__PURE__*/jsx("div", {
|
|
486
|
+
className: "neeto-thank-you-configuration__description",
|
|
487
|
+
children: /*#__PURE__*/jsx(MemoizedEditorContent, {
|
|
488
|
+
content: values.message,
|
|
489
|
+
"data-cy": "preview-editor-content"
|
|
490
|
+
})
|
|
491
|
+
}), (values === null || values === void 0 ? void 0 : values.showResubmitLink) && /*#__PURE__*/jsx("a", {
|
|
492
|
+
className: "neeto-thank-you-configuration__resubmit",
|
|
493
|
+
href: resubmitLink,
|
|
494
|
+
children: (_values$resubmitLinkT = values === null || values === void 0 ? void 0 : values.resubmitLinkText) !== null && _values$resubmitLinkT !== void 0 ? _values$resubmitLinkT : t("neetoThankYou.thankYou.resubmit")
|
|
495
|
+
}), (values === null || values === void 0 ? void 0 : values.socialSharingEnabled) && /*#__PURE__*/jsx(SocialShare, {
|
|
496
|
+
publicLinkId: publicLinkId,
|
|
497
|
+
socialHandles: socialHandles
|
|
498
|
+
})]
|
|
499
|
+
})
|
|
500
|
+
})
|
|
501
|
+
}), (values === null || values === void 0 ? void 0 : values.brandingEnabled) && /*#__PURE__*/jsx(BrandingInfo, {
|
|
502
|
+
appName: appName,
|
|
503
|
+
brandingInfo: brandingInfo
|
|
504
|
+
})]
|
|
505
|
+
})]
|
|
506
|
+
});
|
|
493
507
|
};
|
|
494
508
|
|
|
495
509
|
var ExternalLink = function ExternalLink() {
|
|
496
510
|
var _useTranslation = useTranslation(),
|
|
497
511
|
t = _useTranslation.t;
|
|
498
|
-
return /*#__PURE__*/
|
|
512
|
+
return /*#__PURE__*/jsx(Input, {
|
|
499
513
|
autoFocus: true,
|
|
500
514
|
required: true,
|
|
501
515
|
label: t("neetoThankYou.thankYou.link"),
|
|
502
516
|
name: "redirectUrl",
|
|
503
517
|
placeholder: EXTERNAL_URL_PREFIX,
|
|
504
|
-
prefix: /*#__PURE__*/
|
|
518
|
+
prefix: /*#__PURE__*/jsx(Link, {})
|
|
505
519
|
});
|
|
506
520
|
};
|
|
507
521
|
|
|
@@ -509,15 +523,40 @@ var Label = function Label(_ref) {
|
|
|
509
523
|
var label = _ref.label,
|
|
510
524
|
description = _ref.description,
|
|
511
525
|
kind = _ref.kind;
|
|
512
|
-
return /*#__PURE__*/
|
|
526
|
+
return /*#__PURE__*/jsxs(Typography, {
|
|
513
527
|
className: "neeto-ui-text-gray-700",
|
|
514
528
|
"data-cy": "neeto-thank-you-configuration-".concat(hyphenate(kind), "-label"),
|
|
515
529
|
style: "body2",
|
|
516
|
-
weight: "semibold"
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
530
|
+
weight: "semibold",
|
|
531
|
+
children: [label, /*#__PURE__*/jsx("span", {
|
|
532
|
+
className: "block text-xs font-normal leading-snug",
|
|
533
|
+
"data-cy": "neeto-thank-you-configuration-".concat(hyphenate(kind), "-description"),
|
|
534
|
+
children: description
|
|
535
|
+
})]
|
|
536
|
+
});
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
var buildValidationSchema = function buildValidationSchema() {
|
|
540
|
+
var allowEmptyCustomMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
541
|
+
return yup.object().shape({
|
|
542
|
+
kind: yup.string().required(),
|
|
543
|
+
message: yup.string().test("message", t$1("neetoThankYou.thankYou.validations.messageRequired"), function (value) {
|
|
544
|
+
return allowEmptyCustomMessage || !isEditorEmpty(value);
|
|
545
|
+
}),
|
|
546
|
+
socialSharingEnabled: yup.bool(),
|
|
547
|
+
showResubmitLink: yup.bool(),
|
|
548
|
+
resubmitLinkText: yup.string().when("showResubmitLink", {
|
|
549
|
+
is: true,
|
|
550
|
+
then: yup.string().required(t$1("neetoThankYou.thankYou.validations.resubmitLinkTextIsRequired"))
|
|
551
|
+
}),
|
|
552
|
+
redirectUrl: yup.string().when("kind", {
|
|
553
|
+
is: FORM_OPTIONS.externalLink.kind,
|
|
554
|
+
then: yup.string().url(t$1("neetoThankYou.thankYou.validations.invalidLink")).required(t$1("neetoThankYou.thankYou.validations.invalidLink")).when("kind", {
|
|
555
|
+
is: FORM_OPTIONS.customize.kind,
|
|
556
|
+
then: yup.string()
|
|
557
|
+
})
|
|
558
|
+
})
|
|
559
|
+
});
|
|
521
560
|
};
|
|
522
561
|
|
|
523
562
|
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; }
|
|
@@ -538,7 +577,10 @@ var Form = function Form(_ref) {
|
|
|
538
577
|
appName = _ref.appName,
|
|
539
578
|
blockNavigation = _ref.blockNavigation,
|
|
540
579
|
onConfigUpdateSuccess = _ref.onConfigUpdateSuccess,
|
|
541
|
-
brandingInfo = _ref.brandingInfo
|
|
580
|
+
brandingInfo = _ref.brandingInfo,
|
|
581
|
+
editorProps = _ref.editorProps,
|
|
582
|
+
CustomPreview = _ref.preview,
|
|
583
|
+
allowEmptyCustomMessage = _ref.allowEmptyCustomMessage;
|
|
542
584
|
var _useShowThankYouConfi = useShowThankYouConfiguration({
|
|
543
585
|
entityId: entityId
|
|
544
586
|
}),
|
|
@@ -553,19 +595,20 @@ var Form = function Form(_ref) {
|
|
|
553
595
|
editor: {}
|
|
554
596
|
});
|
|
555
597
|
if (isLoading) {
|
|
556
|
-
return /*#__PURE__*/
|
|
557
|
-
className: "flex h-full w-full items-center justify-center"
|
|
558
|
-
|
|
598
|
+
return /*#__PURE__*/jsx("div", {
|
|
599
|
+
className: "flex h-full w-full items-center justify-center",
|
|
600
|
+
children: /*#__PURE__*/jsx(PageLoader, {})
|
|
601
|
+
});
|
|
559
602
|
}
|
|
560
603
|
var resetEditor = function resetEditor() {
|
|
561
604
|
var _editorRef$current$ed;
|
|
562
605
|
return (_editorRef$current$ed = editorRef.current.editor) === null || _editorRef$current$ed === void 0 ? void 0 : _editorRef$current$ed.commands.setContent(thankYouConfiguration.message);
|
|
563
606
|
};
|
|
564
|
-
return /*#__PURE__*/
|
|
607
|
+
return /*#__PURE__*/jsx(NeetoUIForm, {
|
|
565
608
|
formikProps: {
|
|
566
609
|
enableReinitialize: true,
|
|
567
610
|
initialValues: _objectSpread(_objectSpread({}, DEFAULT_IMAGE_PROPERTIES), thankYouConfiguration),
|
|
568
|
-
validationSchema:
|
|
611
|
+
validationSchema: buildValidationSchema(allowEmptyCustomMessage),
|
|
569
612
|
onSubmit: function onSubmit(values) {
|
|
570
613
|
return updateThankYouConfiguration({
|
|
571
614
|
entityId: entityId,
|
|
@@ -581,60 +624,67 @@ var Form = function Form(_ref) {
|
|
|
581
624
|
}
|
|
582
625
|
});
|
|
583
626
|
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
627
|
+
},
|
|
628
|
+
children: function children(_ref2) {
|
|
629
|
+
var values = _ref2.values;
|
|
630
|
+
return /*#__PURE__*/jsxs("div", {
|
|
631
|
+
className: "grid grid-cols-1 gap-10 pb-6 md:grid-cols-2 md:gap-6",
|
|
632
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
633
|
+
className: "flex flex-col",
|
|
634
|
+
children: [blockNavigation && /*#__PURE__*/jsx(BlockNavigation, {}), !disableRadioSelection && /*#__PURE__*/jsx("div", {
|
|
635
|
+
className: "mb-6 w-full",
|
|
636
|
+
children: /*#__PURE__*/jsx(Radio, {
|
|
637
|
+
containerClassName: "grid grid-cols-1 sm:grid-cols-2 gap-6 items-stretch w-full",
|
|
638
|
+
name: "kind",
|
|
639
|
+
children: Object.values(FORM_OPTIONS).map(function (option) {
|
|
640
|
+
return /*#__PURE__*/jsx(Radio.Item, {
|
|
641
|
+
label: /*#__PURE__*/jsx(Label, _objectSpread({}, option)),
|
|
642
|
+
name: "kind",
|
|
643
|
+
value: option.kind,
|
|
644
|
+
className: classNames("neeto-thank-you-configuration-radio__item", {
|
|
645
|
+
active: values.kind === option.kind
|
|
646
|
+
})
|
|
647
|
+
}, option.kind);
|
|
648
|
+
})
|
|
649
|
+
})
|
|
650
|
+
}), values.kind === FORM_OPTIONS.customize.kind ? /*#__PURE__*/jsx(Customize, {
|
|
651
|
+
disableSubmitAnotherResponse: disableSubmitAnotherResponse,
|
|
652
|
+
editorProps: editorProps,
|
|
653
|
+
editorRef: editorRef,
|
|
654
|
+
entityId: entityId,
|
|
655
|
+
hasImageUploader: hasImageUploader,
|
|
656
|
+
uniqueSubmissionEnabled: uniqueSubmissionEnabled,
|
|
657
|
+
uniqueSubmissionLink: uniqueSubmissionLink,
|
|
658
|
+
disableSocialShare: isEmpty(socialHandles)
|
|
659
|
+
}) : /*#__PURE__*/jsx(ExternalLink, {}), /*#__PURE__*/jsx(ActionBlock, {
|
|
660
|
+
className: "mt-6",
|
|
661
|
+
isSubmitting: isUpdatingForm,
|
|
662
|
+
cancelButtonProps: _objectSpread({
|
|
663
|
+
"data-cy": "neeto-thank-you-configuration-cancel-button"
|
|
664
|
+
}, redirectToOnCancel ? {
|
|
665
|
+
to: redirectToOnCancel,
|
|
666
|
+
onClick: noop
|
|
667
|
+
} : {
|
|
668
|
+
type: "reset",
|
|
669
|
+
onClick: resetEditor
|
|
670
|
+
}),
|
|
671
|
+
submitButtonProps: {
|
|
672
|
+
"data-cy": "neeto-thank-you-configuration-save-button"
|
|
673
|
+
}
|
|
674
|
+
})]
|
|
675
|
+
}), values.kind === FORM_OPTIONS.customize.kind && (CustomPreview ? /*#__PURE__*/jsx(CustomPreview, {
|
|
676
|
+
values: values
|
|
677
|
+
}) : /*#__PURE__*/jsx(Preview, {
|
|
678
|
+
appName: appName,
|
|
679
|
+
brandingInfo: brandingInfo,
|
|
680
|
+
isPublished: isPublished,
|
|
681
|
+
publicLinkId: publicLinkId,
|
|
682
|
+
resubmitLink: resubmitLink,
|
|
683
|
+
socialHandles: socialHandles,
|
|
684
|
+
thankYouTextAlignment: thankYouTextAlignment
|
|
685
|
+
}))]
|
|
605
686
|
});
|
|
606
|
-
}
|
|
607
|
-
disableSubmitAnotherResponse: disableSubmitAnotherResponse,
|
|
608
|
-
editorRef: editorRef,
|
|
609
|
-
entityId: entityId,
|
|
610
|
-
hasImageUploader: hasImageUploader,
|
|
611
|
-
uniqueSubmissionEnabled: uniqueSubmissionEnabled,
|
|
612
|
-
uniqueSubmissionLink: uniqueSubmissionLink,
|
|
613
|
-
disableSocialShare: isEmpty(socialHandles)
|
|
614
|
-
}) : /*#__PURE__*/React__default.createElement(ExternalLink, null), /*#__PURE__*/React__default.createElement(ActionBlock, {
|
|
615
|
-
className: "mt-6",
|
|
616
|
-
isSubmitting: isUpdatingForm,
|
|
617
|
-
cancelButtonProps: _objectSpread({
|
|
618
|
-
"data-cy": "neeto-thank-you-configuration-cancel-button"
|
|
619
|
-
}, redirectToOnCancel ? {
|
|
620
|
-
to: redirectToOnCancel,
|
|
621
|
-
onClick: noop
|
|
622
|
-
} : {
|
|
623
|
-
type: "reset",
|
|
624
|
-
onClick: resetEditor
|
|
625
|
-
}),
|
|
626
|
-
submitButtonProps: {
|
|
627
|
-
"data-cy": "neeto-thank-you-configuration-save-button"
|
|
628
|
-
}
|
|
629
|
-
})), values.kind === FORM_OPTIONS.customize.kind && /*#__PURE__*/React__default.createElement(Preview, {
|
|
630
|
-
appName: appName,
|
|
631
|
-
brandingInfo: brandingInfo,
|
|
632
|
-
isPublished: isPublished,
|
|
633
|
-
publicLinkId: publicLinkId,
|
|
634
|
-
resubmitLink: resubmitLink,
|
|
635
|
-
socialHandles: socialHandles,
|
|
636
|
-
thankYouTextAlignment: thankYouTextAlignment
|
|
637
|
-
}));
|
|
687
|
+
}
|
|
638
688
|
});
|
|
639
689
|
};
|
|
640
690
|
|
|
@@ -642,13 +692,14 @@ var Header = function Header(_ref) {
|
|
|
642
692
|
var breadcrumbs = _ref.breadcrumbs;
|
|
643
693
|
var _useTranslation = useTranslation(),
|
|
644
694
|
t = _useTranslation.t;
|
|
645
|
-
return /*#__PURE__*/
|
|
646
|
-
className: "w-full px-6"
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
695
|
+
return /*#__PURE__*/jsx("div", {
|
|
696
|
+
className: "w-full px-6",
|
|
697
|
+
children: /*#__PURE__*/jsx(NeetoUIHeader, {
|
|
698
|
+
breadcrumbs: breadcrumbs,
|
|
699
|
+
size: "small",
|
|
700
|
+
title: t("neetoThankYou.common.thankYou")
|
|
701
|
+
})
|
|
702
|
+
});
|
|
652
703
|
};
|
|
653
704
|
|
|
654
705
|
var ConfigureThankYou = function ConfigureThankYou(_ref) {
|
|
@@ -678,32 +729,43 @@ var ConfigureThankYou = function ConfigureThankYou(_ref) {
|
|
|
678
729
|
blockNavigation = _ref$blockNavigation === void 0 ? false : _ref$blockNavigation,
|
|
679
730
|
_ref$onConfigUpdateSu = _ref.onConfigUpdateSuccess,
|
|
680
731
|
onConfigUpdateSuccess = _ref$onConfigUpdateSu === void 0 ? noop : _ref$onConfigUpdateSu,
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
732
|
+
brandingInfo = _ref.brandingInfo,
|
|
733
|
+
_ref$editorProps = _ref.editorProps,
|
|
734
|
+
editorProps = _ref$editorProps === void 0 ? {} : _ref$editorProps,
|
|
735
|
+
preview = _ref.preview,
|
|
736
|
+
_ref$allowEmptyCustom = _ref.allowEmptyCustomMessage,
|
|
737
|
+
allowEmptyCustomMessage = _ref$allowEmptyCustom === void 0 ? false : _ref$allowEmptyCustom;
|
|
738
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
739
|
+
children: [customHeader || /*#__PURE__*/jsx(Header, {
|
|
740
|
+
breadcrumbs: breadcrumbs
|
|
741
|
+
}), /*#__PURE__*/jsx(Scrollable, {
|
|
742
|
+
className: "w-full p-6 pt-0",
|
|
743
|
+
children: /*#__PURE__*/jsx("div", {
|
|
744
|
+
className: "mx-auto h-full max-w-7xl",
|
|
745
|
+
children: /*#__PURE__*/jsx(Form, {
|
|
746
|
+
allowEmptyCustomMessage: allowEmptyCustomMessage,
|
|
747
|
+
appName: appName,
|
|
748
|
+
blockNavigation: blockNavigation,
|
|
749
|
+
brandingInfo: brandingInfo,
|
|
750
|
+
disableRadioSelection: disableRadioSelection,
|
|
751
|
+
disableSubmitAnotherResponse: disableSubmitAnotherResponse,
|
|
752
|
+
editorProps: editorProps,
|
|
753
|
+
entityId: entityId,
|
|
754
|
+
hasImageUploader: hasImageUploader,
|
|
755
|
+
isPublished: isPublished,
|
|
756
|
+
onConfigUpdateSuccess: onConfigUpdateSuccess,
|
|
757
|
+
preview: preview,
|
|
758
|
+
publicLinkId: publicLinkId,
|
|
759
|
+
redirectToOnCancel: redirectToOnCancel,
|
|
760
|
+
resubmitLink: resubmitLink,
|
|
761
|
+
socialHandles: socialHandles,
|
|
762
|
+
thankYouTextAlignment: thankYouTextAlignment,
|
|
763
|
+
uniqueSubmissionEnabled: uniqueSubmissionEnabled,
|
|
764
|
+
uniqueSubmissionLink: uniqueSubmissionLink
|
|
765
|
+
})
|
|
766
|
+
})
|
|
767
|
+
})]
|
|
768
|
+
});
|
|
707
769
|
};
|
|
708
770
|
|
|
709
771
|
var baseUrl = "".concat(THANK_YOU_ENGINE_BASE_URL, "/thank_you_page");
|
|
@@ -737,9 +799,10 @@ var buildDraftUrl = function buildDraftUrl(url) {
|
|
|
737
799
|
};
|
|
738
800
|
|
|
739
801
|
var DefaultPageLoader = function DefaultPageLoader() {
|
|
740
|
-
return /*#__PURE__*/
|
|
741
|
-
className: "neeto-thank-you-configuration"
|
|
742
|
-
|
|
802
|
+
return /*#__PURE__*/jsx("div", {
|
|
803
|
+
className: "neeto-thank-you-configuration",
|
|
804
|
+
children: /*#__PURE__*/jsx(PageLoader, {})
|
|
805
|
+
});
|
|
743
806
|
};
|
|
744
807
|
var ShowThankYou = function ShowThankYou(_ref) {
|
|
745
808
|
var _thankYouConfiguratio;
|
|
@@ -751,8 +814,7 @@ var ShowThankYou = function ShowThankYou(_ref) {
|
|
|
751
814
|
publicLinkId = _ref.publicLinkId,
|
|
752
815
|
appName = _ref.appName,
|
|
753
816
|
CustomPageLoader = _ref.customPageLoader,
|
|
754
|
-
|
|
755
|
-
brandingInfo = _ref$brandingInfo === void 0 ? {} : _ref$brandingInfo;
|
|
817
|
+
brandingInfo = _ref.brandingInfo;
|
|
756
818
|
var _useTranslation = useTranslation(),
|
|
757
819
|
t = _useTranslation.t;
|
|
758
820
|
var _useShowThankYouPage = useShowThankYouPage({
|
|
@@ -764,35 +826,42 @@ var ShowThankYou = function ShowThankYou(_ref) {
|
|
|
764
826
|
isLoading = _useShowThankYouPage.isLoading;
|
|
765
827
|
var PageLoader = CustomPageLoader || DefaultPageLoader;
|
|
766
828
|
if (isLoading && isThankYouPageLoading) {
|
|
767
|
-
return /*#__PURE__*/
|
|
829
|
+
return /*#__PURE__*/jsx(PageLoader, {});
|
|
768
830
|
}
|
|
769
|
-
return /*#__PURE__*/
|
|
770
|
-
className: "neeto-thank-you-configuration"
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
831
|
+
return /*#__PURE__*/jsxs("div", {
|
|
832
|
+
className: "neeto-thank-you-configuration",
|
|
833
|
+
children: [/*#__PURE__*/jsx("main", {
|
|
834
|
+
className: "neeto-thank-you-configuration__main",
|
|
835
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
836
|
+
className: "neeto-thank-you-configuration__box",
|
|
837
|
+
children: [!isEmpty(thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.imageUrl) && /*#__PURE__*/jsx("div", {
|
|
838
|
+
className: "neeto-thank-you-configuration__img",
|
|
839
|
+
children: /*#__PURE__*/jsx("img", {
|
|
840
|
+
alt: "",
|
|
841
|
+
src: thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.imageUrl
|
|
842
|
+
})
|
|
843
|
+
}), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.message) && /*#__PURE__*/jsx("div", {
|
|
844
|
+
className: "neeto-thank-you-configuration__description",
|
|
845
|
+
children: /*#__PURE__*/jsx(EditorContent, {
|
|
846
|
+
content: thankYouConfiguration.message
|
|
847
|
+
})
|
|
848
|
+
}), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.showResubmitLink) && /*#__PURE__*/jsx("a", {
|
|
849
|
+
className: "neeto-thank-you-configuration__resubmit",
|
|
850
|
+
href: isDraftPreview ? buildDraftUrl(resubmitLink) : resubmitLink,
|
|
851
|
+
children: (_thankYouConfiguratio = thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.resubmitLinkText) !== null && _thankYouConfiguratio !== void 0 ? _thankYouConfiguratio : t("neetoThankYou.common.resubmit")
|
|
852
|
+
}), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.socialSharingEnabled) && /*#__PURE__*/jsx(SocialShare, {
|
|
853
|
+
publicLinkId: publicLinkId,
|
|
854
|
+
socialHandles: socialHandles
|
|
855
|
+
}), isDraftPreview && /*#__PURE__*/jsx(Typography, {
|
|
856
|
+
style: "body3",
|
|
857
|
+
children: t("neetoThankYou.thankYou.draftVersionForm")
|
|
858
|
+
})]
|
|
859
|
+
})
|
|
860
|
+
}), (thankYouConfiguration === null || thankYouConfiguration === void 0 ? void 0 : thankYouConfiguration.brandingEnabled) && /*#__PURE__*/jsx(BrandingInfo, {
|
|
861
|
+
appName: appName,
|
|
862
|
+
brandingInfo: brandingInfo
|
|
863
|
+
})]
|
|
864
|
+
});
|
|
796
865
|
};
|
|
797
866
|
|
|
798
867
|
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}}
|