@bigbinary/neeto-email-notifications-frontend 2.2.13 → 2.2.15

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.
@@ -1,17 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
- var classNames = require('classnames');
4
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
+ var react = require('react');
5
6
  var neetoCist = require('@bigbinary/neeto-cist');
6
- var Breadcrumbs = require('@bigbinary/neeto-molecules/Breadcrumbs');
7
7
  var EmailForm = require('@bigbinary/neeto-molecules/EmailForm');
8
- var HelpPopover = require('@bigbinary/neeto-molecules/HelpPopover');
9
- var MobilePreviewHeader = require('@bigbinary/neeto-molecules/MobilePreviewHeader');
10
8
  var Spinner = require('@bigbinary/neetoui/Spinner');
11
- var Tooltip = require('@bigbinary/neetoui/Tooltip');
12
- var Typography = require('@bigbinary/neetoui/Typography');
13
- var BlockNavigation = require('@bigbinary/neetoui/formik/BlockNavigation');
14
- var Switch = require('@bigbinary/neetoui/formik/Switch');
15
9
  var ramda = require('ramda');
16
10
  var reactI18next = require('react-i18next');
17
11
  var reactQuery = require('@tanstack/react-query');
@@ -19,7 +13,6 @@ var constants = require('@bigbinary/neeto-commons-frontend/constants');
19
13
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
20
14
  var axios = require('axios');
21
15
  var yup = require('yup');
22
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
23
16
  var jsxRuntime = require('react/jsx-runtime');
24
17
 
25
18
  function _interopNamespaceDefault(e) {
@@ -41,19 +34,24 @@ function _interopNamespaceDefault(e) {
41
34
 
42
35
  var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
43
36
 
44
- var EMAIL_NOTIFICATIONS_URL = "neeto_email_notifications/email_notification";
37
+ var EMAIL_NOTIFICATIONS_BASE_URL = "neeto_email_notifications/email_notification";
38
+ var RESET_EMAIL_NOTIFICATIONS_TO_DEFAULT_URL = "".concat(EMAIL_NOTIFICATIONS_BASE_URL, "/reset_to_default");
45
39
 
46
40
  var fetch = function fetch(params) {
47
- return axios.get(EMAIL_NOTIFICATIONS_URL, {
41
+ return axios.get(EMAIL_NOTIFICATIONS_BASE_URL, {
48
42
  params: params
49
43
  });
50
44
  };
51
45
  var update = function update(payload) {
52
- return axios.put(EMAIL_NOTIFICATIONS_URL, payload);
46
+ return axios.put(EMAIL_NOTIFICATIONS_BASE_URL, payload);
47
+ };
48
+ var resetToDefault = function resetToDefault(params) {
49
+ return axios.post(RESET_EMAIL_NOTIFICATIONS_TO_DEFAULT_URL, params);
53
50
  };
54
51
  var emailNotificationsApi = {
55
52
  fetch: fetch,
56
- update: update
53
+ update: update,
54
+ resetToDefault: resetToDefault
57
55
  };
58
56
 
59
57
  var QUERY_KEYS = {
@@ -81,13 +79,29 @@ var useUpdateEmailNotification = function useUpdateEmailNotification() {
81
79
  }]
82
80
  });
83
81
  };
82
+ var useResetEmailNotificationToDefault = function useResetEmailNotificationToDefault() {
83
+ return reactUtils.useMutationWithInvalidation(emailNotificationsApi.resetToDefault, {
84
+ keysToInvalidate: [function (_, _ref2) {
85
+ var notificationHolderId = _ref2.notificationHolderId,
86
+ customFields = _ref2.customFields;
87
+ return [QUERY_KEYS.NEETO_EMAIL_NOTIFICATIONS, notificationHolderId, customFields];
88
+ }]
89
+ });
90
+ };
84
91
 
85
92
  var FORM_VALIDATION_SCHEMA = {
86
93
  isEnabled: yup__namespace["boolean"]()
87
94
  };
95
+ var DEFAULT_FIELDS_VISIBILITY = {
96
+ showSendToField: true,
97
+ showReplyToField: false,
98
+ showSendToAsRadio: false,
99
+ showBccField: false,
100
+ showCcField: false
101
+ };
88
102
 
89
- var _excluded = ["notifyEmails", "notifyCcEmails", "notifyBccEmails", "replyToId", "customFields"],
90
- _excluded2 = ["id", "isEnabled", "sendTo", "sendToCc", "sendToBcc", "showCopyEmails", "replyTo", "message", "subject", "sendFrom", "disabledByUser", "sendToId"];
103
+ var _excluded$1 = ["notifyEmails", "notifyCcEmails", "notifyBccEmails", "replyToId", "customFields"],
104
+ _excluded2 = ["id", "isEnabled", "sendTo", "sendToCc", "sendToBcc", "showCopyEmails", "replyTo", "message", "subject", "sendFrom", "sendToId"];
91
105
  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; }
92
106
  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; }
93
107
  var isValidEmail = function isValidEmail(email) {
@@ -114,7 +128,7 @@ var parseEmailNotificationData = function parseEmailNotificationData(data, sendT
114
128
  notifyBccEmails = data.notifyBccEmails,
115
129
  replyToId = data.replyToId,
116
130
  customFields = data.customFields,
117
- rest = _objectWithoutProperties(data, _excluded);
131
+ rest = _objectWithoutProperties(data, _excluded$1);
118
132
  var parsed = _objectSpread$1(_objectSpread$1({}, customFields), rest);
119
133
  parsed.sendTo = notifyEmails ? createEmailOptions(notifyEmails) : [];
120
134
  parsed.sendToCc = notifyCcEmails ? createEmailOptions(notifyCcEmails) : [];
@@ -124,7 +138,7 @@ var parseEmailNotificationData = function parseEmailNotificationData(data, sendT
124
138
  parsed.showCopyEmails = !!(notifyCcEmails !== null && notifyCcEmails !== void 0 && notifyCcEmails.length || notifyBccEmails !== null && notifyBccEmails !== void 0 && notifyBccEmails.length);
125
139
  return parsed;
126
140
  };
127
- var packEmailPayload = function packEmailPayload(values, isReplyToDropdownField) {
141
+ var packEmailPayload = function packEmailPayload(values, isReplyToDropdownField, isDisabledByUser) {
128
142
  values.id;
129
143
  var isEnabled = values.isEnabled,
130
144
  sendTo = values.sendTo,
@@ -135,7 +149,6 @@ var packEmailPayload = function packEmailPayload(values, isReplyToDropdownField)
135
149
  message = values.message,
136
150
  subject = values.subject,
137
151
  sendFrom = values.sendFrom,
138
- disabledByUser = values.disabledByUser,
139
152
  sendToId = values.sendToId,
140
153
  rest = _objectWithoutProperties(values, _excluded2);
141
154
  var payload = {
@@ -164,7 +177,7 @@ var packEmailPayload = function packEmailPayload(values, isReplyToDropdownField)
164
177
  payload.sendFrom = sendFrom;
165
178
  } else {
166
179
  payload.customFields = {
167
- disabledByUser: disabledByUser
180
+ disabledByUser: isDisabledByUser
168
181
  };
169
182
  }
170
183
  return payload;
@@ -173,6 +186,7 @@ var renderText = function renderText(text, fallbackTranslation) {
173
186
  return ramda.isEmpty(text) ? fallbackTranslation : text;
174
187
  };
175
188
 
189
+ var _excluded = ["validationSchema"];
176
190
  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; }
177
191
  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; }
178
192
  var NeetoEmailNotificationForm = function NeetoEmailNotificationForm(_ref) {
@@ -187,21 +201,24 @@ var NeetoEmailNotificationForm = function NeetoEmailNotificationForm(_ref) {
187
201
  emailFormikProps = _ref$emailFormikProps === void 0 ? {} : _ref$emailFormikProps,
188
202
  _ref$title = _ref.title,
189
203
  title = _ref$title === void 0 ? "" : _ref$title,
190
- _ref$subTitle = _ref.subTitle,
191
- subTitle = _ref$subTitle === void 0 ? "" : _ref$subTitle,
192
- _ref$disabled = _ref.disabled,
193
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
204
+ _ref$notificationTogg = _ref.notificationToggleLabel,
205
+ notificationToggleLabel = _ref$notificationTogg === void 0 ? "" : _ref$notificationTogg,
206
+ _ref$breadcrumbs = _ref.breadcrumbs,
207
+ breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
208
+ _ref$helpPopoverProps = _ref.helpPopoverProps,
209
+ helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
194
210
  _ref$tooltipProps = _ref.tooltipProps,
195
211
  tooltipProps = _ref$tooltipProps === void 0 ? {} : _ref$tooltipProps,
196
- _ref$onSuccess = _ref.onSuccess,
197
- onSuccess = _ref$onSuccess === void 0 ? neetoCist.noop : _ref$onSuccess,
212
+ _ref$disabled = _ref.disabled,
213
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
214
+ _ref$fieldsVisibility = _ref.fieldsVisibility,
215
+ fieldsVisibility = _ref$fieldsVisibility === void 0 ? {} : _ref$fieldsVisibility,
198
216
  _ref$blockNavigation = _ref.blockNavigation,
199
217
  blockNavigation = _ref$blockNavigation === void 0 ? false : _ref$blockNavigation,
200
- _ref$breadcrumbs = _ref.breadcrumbs,
201
- breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
202
- _children = _ref.children,
203
- _ref$helpPopoverProps = _ref.helpPopoverProps,
204
- helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps;
218
+ _ref$onSuccess = _ref.onSuccess,
219
+ onSuccess = _ref$onSuccess === void 0 ? neetoCist.noop : _ref$onSuccess,
220
+ children = _ref.children;
221
+ var editorRef = react.useRef();
205
222
  var _useTranslation = reactI18next.useTranslation(),
206
223
  t = _useTranslation.t;
207
224
  var _useFetchEmailNotific = useFetchEmailNotifications(emailNotificationParams),
@@ -211,113 +228,64 @@ var NeetoEmailNotificationForm = function NeetoEmailNotificationForm(_ref) {
211
228
  var _useUpdateEmailNotifi = useUpdateEmailNotification(),
212
229
  updateEmailNotification = _useUpdateEmailNotifi.mutate,
213
230
  isSubmitting = _useUpdateEmailNotifi.isPending;
231
+ var _useResetEmailNotific = useResetEmailNotificationToDefault(),
232
+ resetToDefault = _useResetEmailNotific.mutate,
233
+ isResetting = _useResetEmailNotific.isPending;
214
234
  var handleSubmit = function handleSubmit(values) {
215
235
  var _emailFormProps$reply;
236
+ var isDisabledByUser = data.isEnabled && !values.isEnabled;
216
237
  var isReplyToDropdownField = (emailFormProps === null || emailFormProps === void 0 || (_emailFormProps$reply = emailFormProps.replyToFieldProps) === null || _emailFormProps$reply === void 0 ? void 0 : _emailFormProps$reply.options) !== undefined;
217
- var body = ramda.mergeDeepLeft(packEmailPayload(values, isReplyToDropdownField), emailNotificationParams);
238
+ var body = ramda.mergeDeepLeft(packEmailPayload(values, isReplyToDropdownField, isDisabledByUser), emailNotificationParams);
218
239
  updateEmailNotification(body, {
219
240
  onSuccess: onSuccess
220
241
  });
221
242
  };
222
- var handleSwitchChange = function handleSwitchChange(_ref2) {
223
- var _event$target, _event$target2;
224
- var event = _ref2.event,
225
- values = _ref2.values,
226
- setFieldValue = _ref2.setFieldValue;
227
- if ((event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.checked) === true) {
228
- setFieldValue("isEnabled", true);
229
- } else if ((event === null || event === void 0 || (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.checked) === false) {
230
- if ((values === null || values === void 0 ? void 0 : values.isEnabled) === true) setFieldValue("disabledByUser", true);
231
- setFieldValue("isEnabled", false);
232
- }
233
- };
234
243
  if (isLoading || neetoCist.isNotPresent(data)) {
235
244
  return /*#__PURE__*/jsxRuntime.jsx("div", {
236
245
  className: "flex h-full w-full items-center justify-center",
237
246
  children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
238
247
  });
239
248
  }
249
+ var formattedTitle = renderText(title, t("neetoEmailNotifications.emailNotification.title"));
250
+ var formattedNotificationToggleLabel = renderText(notificationToggleLabel, t("neetoEmailNotifications.emailNotification.notificationToggleLabel"));
251
+ var customValidationSchema = emailFormikProps.validationSchema,
252
+ formikProps = _objectWithoutProperties(emailFormikProps, _excluded);
253
+ var handleResetToDefault = function handleResetToDefault() {
254
+ resetToDefault(emailNotificationParams, {
255
+ onSuccess: function onSuccess(_ref2) {
256
+ var _editorRef$current;
257
+ var emailNotification = _ref2.emailNotification;
258
+ return editorRef === null || editorRef === void 0 || (_editorRef$current = editorRef.current) === null || _editorRef$current === void 0 || (_editorRef$current = _editorRef$current.editor) === null || _editorRef$current === void 0 || (_editorRef$current = _editorRef$current.commands) === null || _editorRef$current === void 0 ? void 0 : _editorRef$current.setContent(emailNotification.message);
259
+ }
260
+ });
261
+ };
240
262
  return /*#__PURE__*/jsxRuntime.jsx("div", {
241
263
  className: "min-w-0 flex-grow overflow-y-auto",
242
- children: /*#__PURE__*/jsxRuntime.jsx(EmailForm.EmailFormProvider, _objectSpread(_objectSpread({
243
- showSendToField: true,
244
- formikProps: {
245
- validateOnBlur: true,
246
- validateOnChange: true
264
+ children: /*#__PURE__*/jsxRuntime.jsx(EmailForm, _objectSpread(_objectSpread({}, _objectSpread({
265
+ blockNavigation: blockNavigation,
266
+ emailPreviewProps: emailPreviewProps,
267
+ formikProps: formikProps,
268
+ tooltipProps: tooltipProps
269
+ }, ramda.mergeLeft(fieldsVisibility, DEFAULT_FIELDS_VISIBILITY))), {}, {
270
+ isLoading: isSubmitting || isResetting,
271
+ validationSchema: customValidationSchema || FORM_VALIDATION_SCHEMA,
272
+ emailFormProps: _objectSpread({
273
+ editorRef: editorRef,
274
+ handleResetToDefault: handleResetToDefault
275
+ }, emailFormProps),
276
+ headerProps: {
277
+ title: formattedTitle,
278
+ titleHelpPopoverProps: helpPopoverProps,
279
+ breadcrumbs: breadcrumbs
247
280
  },
248
- validationSchema: FORM_VALIDATION_SCHEMA,
249
- initialValues: parseEmailNotificationData(data, (emailFormProps === null || emailFormProps === void 0 || (_emailFormProps$sendT = emailFormProps.sendToFieldProps) === null || _emailFormProps$sendT === void 0 ? void 0 : _emailFormProps$sendT.options) || (emailFormProps === null || emailFormProps === void 0 ? void 0 : emailFormProps.sendToOptions)),
250
- onSubmit: handleSubmit
251
- }, emailFormikProps), {}, {
252
- children: function children(_ref3) {
253
- var values = _ref3.values,
254
- setFieldValue = _ref3.setFieldValue;
255
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
256
- className: "nf-email-notification-wrapper flex h-full flex-grow flex-col lg:flex-row",
257
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
258
- className: "flex w-full flex-col px-5 md:px-10 lg:h-full lg:w-1/2 lg:overflow-y-auto",
259
- children: [neetoCist.isNotEmpty(breadcrumbs) && /*#__PURE__*/jsxRuntime.jsx(Breadcrumbs, {
260
- breadcrumbs: breadcrumbs,
261
- className: "mb-6 pt-10"
262
- }), blockNavigation && /*#__PURE__*/jsxRuntime.jsx(BlockNavigation, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
263
- className: "flex items-center justify-between gap-6",
264
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
265
- className: "space-y-0.5",
266
- children: [/*#__PURE__*/jsxRuntime.jsx(Tooltip, _objectSpread(_objectSpread({
267
- disabled: !disabled,
268
- position: "top"
269
- }, tooltipProps), {}, {
270
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
271
- className: "flex items-center gap-2",
272
- children: [/*#__PURE__*/jsxRuntime.jsx(Switch, {
273
- disabled: disabled,
274
- "data-cy": "receive-email-notification-switch",
275
- name: "isEnabled",
276
- onChange: function onChange(event) {
277
- return handleSwitchChange({
278
- event: event,
279
- setFieldValue: setFieldValue,
280
- values: values
281
- });
282
- }
283
- }), /*#__PURE__*/jsxRuntime.jsx(Typography, {
284
- component: "span",
285
- "data-cy": "receive-email-notification-label",
286
- lineHeight: "normal",
287
- style: "h3",
288
- weight: "semibold",
289
- children: renderText(title, t("neetoEmailNotifications.emailNotification.title"))
290
- }), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, _objectSpread({}, helpPopoverProps))]
291
- })
292
- })), /*#__PURE__*/jsxRuntime.jsx(Typography, {
293
- lineHeight: "normal",
294
- style: "body2",
295
- children: renderText(subTitle, t("neetoEmailNotifications.emailNotification.subTitle"))
296
- })]
297
- })
298
- }), values.isEnabled && _children, /*#__PURE__*/jsxRuntime.jsx(EmailForm.EmailForm, _objectSpread({
299
- showSendToField: true,
300
- className: classNames({
301
- "pt-3 ": values.isEnabled
302
- }),
303
- isLoading: isSubmitting,
304
- showFields: values.isEnabled
305
- }, emailFormProps))]
306
- }), /*#__PURE__*/jsxRuntime.jsx(MobilePreviewHeader, {
307
- className: "lg:hidden"
308
- }), values.isEnabled && /*#__PURE__*/jsxRuntime.jsx("div", {
309
- className: "neeto-ui-bg-gray-100 w-full px-5 py-10 lg:w-1/2 lg:overflow-y-auto lg:px-10",
310
- children: /*#__PURE__*/jsxRuntime.jsx(EmailForm.EmailPreview, _objectSpread(_objectSpread({
311
- body: values.message,
312
- from: values.sendFrom,
313
- subject: values.subject,
314
- to: ramda.pluck("value", values.sendTo)
315
- }, emailPreviewProps), {}, {
316
- className: "neeto-ui-theme--light"
317
- }))
318
- })]
319
- });
320
- }
281
+ initialValues: parseEmailNotificationData(data, emailFormProps === null || emailFormProps === void 0 || (_emailFormProps$sendT = emailFormProps.sendToFieldProps) === null || _emailFormProps$sendT === void 0 ? void 0 : _emailFormProps$sendT.options),
282
+ switchProps: {
283
+ label: formattedNotificationToggleLabel,
284
+ disabled: disabled,
285
+ "data-cy": "receive-email-notification-switch"
286
+ },
287
+ onSubmit: handleSubmit,
288
+ children: children
321
289
  }))
322
290
  });
323
291
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NeetoEmailNotificationForm.js","sources":["../../app/javascript/src/constants/index.js","../../app/javascript/src/apis/email_notifications.js","../../app/javascript/src/constants/query.js","../../app/javascript/src/hooks/reactQuery/emailNotificationApi.js","../../app/javascript/src/components/EmailNotificationForm/constants.js","../../app/javascript/src/components/EmailNotificationForm/utils.js","../../app/javascript/src/components/EmailNotificationForm/index.jsx"],"sourcesContent":["export const EMAIL_NOTIFICATIONS_URL =\n \"neeto_email_notifications/email_notification\";\n","import axios from \"axios\";\n\nimport { EMAIL_NOTIFICATIONS_URL } from \"src/constants\";\n\nconst fetch = params => axios.get(EMAIL_NOTIFICATIONS_URL, { params });\n\nconst update = payload => axios.put(EMAIL_NOTIFICATIONS_URL, payload);\n\nconst emailNotificationsApi = { fetch, update };\n\nexport default emailNotificationsApi;\n","export const QUERY_KEYS = {\n NEETO_EMAIL_NOTIFICATIONS: \"neeto-email-notifications\",\n};\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isNotEmpty } from \"neetocist\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\nimport { prop } from \"ramda\";\n\nimport emailNotificationsApi from \"src/apis/email_notifications\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchEmailNotifications = params =>\n useQuery({\n queryKey: [\n QUERY_KEYS.NEETO_EMAIL_NOTIFICATIONS,\n params[\"notificationHolderId\"],\n params[\"customFields\"],\n ],\n queryFn: () => emailNotificationsApi.fetch(params),\n staleTime: DEFAULT_STALE_TIME,\n select: prop(\"emailNotification\"),\n enabled: isNotEmpty(params),\n });\n\nexport const useUpdateEmailNotification = () =>\n useMutationWithInvalidation(params => emailNotificationsApi.update(params), {\n keysToInvalidate: [\n (_, { notificationHolderId }) => [\n QUERY_KEYS.NEETO_EMAIL_NOTIFICATIONS,\n notificationHolderId,\n ],\n ],\n });\n","import * as yup from \"yup\";\n\nexport const FORM_VALIDATION_SCHEMA = { isEnabled: yup.boolean() };\n","import { isNotEmpty } from \"neetocist\";\nimport { isEmpty, mergeLeft, prop } from \"ramda\";\nimport { string } from \"yup\";\n\nconst isValidEmail = email => string().email().isValidSync(email);\n\nconst createEmailOptions = (emails = []) =>\n emails.map(email => ({\n label: email,\n value: email,\n valid: isValidEmail(email),\n }));\n\nexport const parseEmailsOptions = (emailOptions = []) =>\n emailOptions.map(prop(\"label\"));\n\nexport const parseEmailNotificationData = (data, sendToOptions) => {\n const {\n notifyEmails,\n notifyCcEmails,\n notifyBccEmails,\n replyToId,\n customFields,\n ...rest\n } = data;\n\n const parsed = { ...customFields, ...rest };\n parsed.sendTo = notifyEmails ? createEmailOptions(notifyEmails) : [];\n parsed.sendToCc = notifyCcEmails ? createEmailOptions(notifyCcEmails) : [];\n parsed.sendToBcc = notifyCcEmails ? createEmailOptions(notifyBccEmails) : [];\n parsed.replyTo = replyToId || customFields[\"replyTo\"];\n parsed.sendToId = customFields[\"sendToId\"] || sendToOptions?.[0]?.value || \"\";\n parsed.showCopyEmails = !!(notifyCcEmails?.length || notifyBccEmails?.length);\n\n return parsed;\n};\n\nexport const packEmailPayload = (values, isReplyToDropdownField) => {\n const {\n // eslint-disable-next-line no-unused-vars\n id: _,\n isEnabled,\n sendTo,\n sendToCc,\n sendToBcc,\n showCopyEmails,\n replyTo,\n message,\n subject,\n sendFrom,\n disabledByUser,\n sendToId,\n ...rest\n } = values;\n let payload = { isEnabled };\n\n if (isEnabled) {\n payload = { ...payload };\n payload.notifyEmails = parseEmailsOptions(sendTo);\n payload.notifyBccEmails = showCopyEmails\n ? parseEmailsOptions(sendToBcc)\n : [];\n\n payload.notifyCcEmails = showCopyEmails ? parseEmailsOptions(sendToCc) : [];\n if (isReplyToDropdownField) {\n payload.replyToId = replyTo;\n } else {\n rest.replyTo = replyTo;\n }\n payload.message = message;\n payload.subject = subject;\n payload.customFields = { ...rest, disabledByUser: false };\n\n if (isNotEmpty(sendToId)) {\n payload.customFields = mergeLeft(payload.customFields, { sendToId });\n }\n payload.sendFrom = sendFrom;\n } else {\n payload.customFields = { disabledByUser };\n }\n\n return payload;\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import classNames from \"classnames\";\nimport { isNotPresent, noop, isNotEmpty } from \"neetocist\";\nimport Breadcrumbs from \"neetomolecules/Breadcrumbs\";\nimport {\n EmailFormProvider,\n EmailForm,\n EmailPreview,\n} from \"neetomolecules/EmailForm\";\nimport HelpPopover from \"neetomolecules/HelpPopover\";\nimport MobilePreviewHeader from \"neetomolecules/MobilePreviewHeader\";\nimport { Spinner, Tooltip, Typography } from \"neetoui\";\nimport { BlockNavigation, Switch } from \"neetoui/formik\";\nimport { mergeDeepLeft, pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n useFetchEmailNotifications,\n useUpdateEmailNotification,\n} from \"src/hooks/reactQuery/emailNotificationApi\";\n\nimport { FORM_VALIDATION_SCHEMA } from \"./constants\";\nimport {\n packEmailPayload,\n parseEmailNotificationData,\n renderText,\n} from \"./utils\";\n\nconst NeetoEmailNotificationForm = ({\n emailNotificationParams = {},\n emailPreviewProps = {},\n emailFormProps = {},\n emailFormikProps = {},\n title = \"\",\n subTitle = \"\",\n disabled = false,\n tooltipProps = {},\n onSuccess = noop,\n blockNavigation = false,\n breadcrumbs = [],\n children,\n helpPopoverProps = {},\n}) => {\n const { t } = useTranslation();\n\n const { data = {}, isLoading } = useFetchEmailNotifications(\n emailNotificationParams\n );\n\n const { mutate: updateEmailNotification, isPending: isSubmitting } =\n useUpdateEmailNotification();\n\n const handleSubmit = values => {\n const isReplyToDropdownField =\n emailFormProps?.replyToFieldProps?.options !== undefined;\n\n const body = mergeDeepLeft(\n packEmailPayload(values, isReplyToDropdownField),\n emailNotificationParams\n );\n updateEmailNotification(body, { onSuccess });\n };\n\n const handleSwitchChange = ({ event, values, setFieldValue }) => {\n if (event?.target?.checked === true) {\n setFieldValue(\"isEnabled\", true);\n } else if (event?.target?.checked === false) {\n if (values?.isEnabled === true) setFieldValue(\"disabledByUser\", true);\n setFieldValue(\"isEnabled\", false);\n }\n };\n\n if (isLoading || isNotPresent(data)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"min-w-0 flex-grow overflow-y-auto\">\n <EmailFormProvider\n showSendToField\n formikProps={{ validateOnBlur: true, validateOnChange: true }}\n validationSchema={FORM_VALIDATION_SCHEMA}\n initialValues={parseEmailNotificationData(\n data,\n emailFormProps?.sendToFieldProps?.options ||\n emailFormProps?.sendToOptions\n )}\n onSubmit={handleSubmit}\n {...emailFormikProps}\n >\n {({ values, setFieldValue }) => (\n <div className=\"nf-email-notification-wrapper flex h-full flex-grow flex-col lg:flex-row\">\n <div className=\"flex w-full flex-col px-5 md:px-10 lg:h-full lg:w-1/2 lg:overflow-y-auto\">\n {isNotEmpty(breadcrumbs) && (\n <Breadcrumbs {...{ breadcrumbs }} className=\"mb-6 pt-10\" />\n )}\n {blockNavigation && <BlockNavigation />}\n <div className=\"flex items-center justify-between gap-6\">\n <div className=\"space-y-0.5\">\n <Tooltip\n disabled={!disabled}\n position=\"top\"\n {...tooltipProps}\n >\n <div className=\"flex items-center gap-2\">\n <Switch\n {...{ disabled }}\n data-cy=\"receive-email-notification-switch\"\n name=\"isEnabled\"\n onChange={event =>\n handleSwitchChange({ event, setFieldValue, values })\n }\n />\n <Typography\n component=\"span\"\n data-cy=\"receive-email-notification-label\"\n lineHeight=\"normal\"\n style=\"h3\"\n weight=\"semibold\"\n >\n {renderText(\n title,\n t(\"neetoEmailNotifications.emailNotification.title\")\n )}\n </Typography>\n <HelpPopover {...helpPopoverProps} />\n </div>\n </Tooltip>\n <Typography lineHeight=\"normal\" style=\"body2\">\n {renderText(\n subTitle,\n t(\"neetoEmailNotifications.emailNotification.subTitle\")\n )}\n </Typography>\n </div>\n </div>\n {values.isEnabled && children}\n <EmailForm\n showSendToField\n className={classNames({ \"pt-3 \": values.isEnabled })}\n isLoading={isSubmitting}\n showFields={values.isEnabled}\n {...emailFormProps}\n />\n </div>\n <MobilePreviewHeader className=\"lg:hidden\" />\n {values.isEnabled && (\n <div className=\"neeto-ui-bg-gray-100 w-full px-5 py-10 lg:w-1/2 lg:overflow-y-auto lg:px-10\">\n <EmailPreview\n body={values.message}\n from={values.sendFrom}\n subject={values.subject}\n to={pluck(\"value\", values.sendTo)}\n {...emailPreviewProps}\n className=\"neeto-ui-theme--light\"\n />\n </div>\n )}\n </div>\n )}\n </EmailFormProvider>\n </div>\n );\n};\nexport default NeetoEmailNotificationForm;\n"],"names":["EMAIL_NOTIFICATIONS_URL","fetch","params","axios","get","update","payload","put","emailNotificationsApi","QUERY_KEYS","NEETO_EMAIL_NOTIFICATIONS","useFetchEmailNotifications","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","select","prop","enabled","isNotEmpty","useUpdateEmailNotification","useMutationWithInvalidation","keysToInvalidate","_","_ref","notificationHolderId","FORM_VALIDATION_SCHEMA","isEnabled","yup","isValidEmail","email","string","isValidSync","createEmailOptions","emails","arguments","length","undefined","map","label","value","valid","parseEmailsOptions","emailOptions","parseEmailNotificationData","data","sendToOptions","_sendToOptions$","notifyEmails","notifyCcEmails","notifyBccEmails","replyToId","customFields","rest","_objectWithoutProperties","_excluded","parsed","_objectSpread","sendTo","sendToCc","sendToBcc","replyTo","sendToId","showCopyEmails","packEmailPayload","values","isReplyToDropdownField","id","message","subject","sendFrom","disabledByUser","_excluded2","mergeLeft","renderText","text","fallbackTranslation","isEmpty","NeetoEmailNotificationForm","_emailFormProps$sendT","_ref$emailNotificatio","emailNotificationParams","_ref$emailPreviewProp","emailPreviewProps","_ref$emailFormProps","emailFormProps","_ref$emailFormikProps","emailFormikProps","_ref$title","title","_ref$subTitle","subTitle","_ref$disabled","disabled","_ref$tooltipProps","tooltipProps","_ref$onSuccess","onSuccess","noop","_ref$blockNavigation","blockNavigation","_ref$breadcrumbs","breadcrumbs","children","_ref$helpPopoverProps","helpPopoverProps","_useTranslation","useTranslation","t","_useFetchEmailNotific","_useFetchEmailNotific2","isLoading","_useUpdateEmailNotifi","updateEmailNotification","mutate","isSubmitting","isPending","handleSubmit","_emailFormProps$reply","replyToFieldProps","options","body","mergeDeepLeft","handleSwitchChange","_ref2","_event$target","_event$target2","event","setFieldValue","target","checked","isNotPresent","_jsx","className","Spinner","EmailFormProvider","showSendToField","formikProps","validateOnBlur","validateOnChange","validationSchema","initialValues","sendToFieldProps","onSubmit","_ref3","_jsxs","Breadcrumbs","BlockNavigation","Tooltip","position","Switch","name","onChange","Typography","component","lineHeight","style","weight","HelpPopover","EmailForm","classNames","showFields","MobilePreviewHeader","EmailPreview","from","to","pluck"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,uBAAuB,GAClC,8CAA8C;;ACGhD,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAGC,MAAM,EAAA;AAAA,EAAA,OAAIC,KAAK,CAACC,GAAG,CAACJ,uBAAuB,EAAE;AAAEE,IAAAA,MAAM,EAANA;AAAO,GAAC,CAAC;AAAA,CAAA;AAEtE,IAAMG,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAAIH,KAAK,CAACI,GAAG,CAACP,uBAAuB,EAAEM,OAAO,CAAC;AAAA,CAAA;AAErE,IAAME,qBAAqB,GAAG;AAAEP,EAAAA,KAAK,EAALA,KAAK;AAAEI,EAAAA,MAAM,EAANA;AAAO,CAAC;;ACRxC,IAAMI,UAAU,GAAG;AACxBC,EAAAA,yBAAyB,EAAE;AAC7B,CAAC;;ACOM,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAAGT,MAAM,EAAA;AAAA,EAAA,OAC9CU,mBAAQ,CAAC;AACPC,IAAAA,QAAQ,EAAE,CACRJ,UAAU,CAACC,yBAAyB,EACpCR,MAAM,CAAC,sBAAsB,CAAC,EAC9BA,MAAM,CAAC,cAAc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AA,EAAA,EAAA,EAAA;AACrBkD,cAAAA,SAAS,EAAC;aACX,CAAA;AAAC,WACC,CACN;AAAA,SACE,CAAC;AAAA;KAES,CAAA;AAAC,GACjB,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"NeetoEmailNotificationForm.js","sources":["../../app/javascript/src/constants/index.js","../../app/javascript/src/apis/email_notifications.js","../../app/javascript/src/constants/query.js","../../app/javascript/src/hooks/reactQuery/emailNotificationApi.js","../../app/javascript/src/components/EmailNotificationForm/constants.js","../../app/javascript/src/components/EmailNotificationForm/utils.js","../../app/javascript/src/components/EmailNotificationForm/index.jsx"],"sourcesContent":["export const EMAIL_NOTIFICATIONS_BASE_URL =\n \"neeto_email_notifications/email_notification\";\n\nexport const RESET_EMAIL_NOTIFICATIONS_TO_DEFAULT_URL = `${EMAIL_NOTIFICATIONS_BASE_URL}/reset_to_default`;\n","import axios from \"axios\";\n\nimport {\n RESET_EMAIL_NOTIFICATIONS_TO_DEFAULT_URL,\n EMAIL_NOTIFICATIONS_BASE_URL,\n} from \"src/constants\";\n\nconst fetch = params => axios.get(EMAIL_NOTIFICATIONS_BASE_URL, { params });\n\nconst update = payload => axios.put(EMAIL_NOTIFICATIONS_BASE_URL, payload);\n\nconst resetToDefault = params =>\n axios.post(RESET_EMAIL_NOTIFICATIONS_TO_DEFAULT_URL, params);\n\nconst emailNotificationsApi = { fetch, update, resetToDefault };\n\nexport default emailNotificationsApi;\n","export const QUERY_KEYS = {\n NEETO_EMAIL_NOTIFICATIONS: \"neeto-email-notifications\",\n};\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isNotEmpty } from \"neetocist\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\nimport { prop } from \"ramda\";\n\nimport emailNotificationsApi from \"src/apis/email_notifications\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useFetchEmailNotifications = params =>\n useQuery({\n queryKey: [\n QUERY_KEYS.NEETO_EMAIL_NOTIFICATIONS,\n params[\"notificationHolderId\"],\n params[\"customFields\"],\n ],\n queryFn: () => emailNotificationsApi.fetch(params),\n staleTime: DEFAULT_STALE_TIME,\n select: prop(\"emailNotification\"),\n enabled: isNotEmpty(params),\n });\n\nexport const useUpdateEmailNotification = () =>\n useMutationWithInvalidation(params => emailNotificationsApi.update(params), {\n keysToInvalidate: [\n (_, { notificationHolderId }) => [\n QUERY_KEYS.NEETO_EMAIL_NOTIFICATIONS,\n notificationHolderId,\n ],\n ],\n });\n\nexport const useResetEmailNotificationToDefault = () =>\n useMutationWithInvalidation(emailNotificationsApi.resetToDefault, {\n keysToInvalidate: [\n (_, { notificationHolderId, customFields }) => [\n QUERY_KEYS.NEETO_EMAIL_NOTIFICATIONS,\n notificationHolderId,\n customFields,\n ],\n ],\n });\n","import * as yup from \"yup\";\n\nexport const FORM_VALIDATION_SCHEMA = { isEnabled: yup.boolean() };\n\nexport const DEFAULT_FIELDS_VISIBILITY = {\n showSendToField: true,\n showReplyToField: false,\n showSendToAsRadio: false,\n showBccField: false,\n showCcField: false,\n};\n","import { isNotEmpty } from \"neetocist\";\nimport { isEmpty, mergeLeft, prop } from \"ramda\";\nimport { string } from \"yup\";\n\nconst isValidEmail = email => string().email().isValidSync(email);\n\nconst createEmailOptions = (emails = []) =>\n emails.map(email => ({\n label: email,\n value: email,\n valid: isValidEmail(email),\n }));\n\nexport const parseEmailsOptions = (emailOptions = []) =>\n emailOptions.map(prop(\"label\"));\n\nexport const parseEmailNotificationData = (data, sendToOptions) => {\n const {\n notifyEmails,\n notifyCcEmails,\n notifyBccEmails,\n replyToId,\n customFields,\n ...rest\n } = data;\n\n const parsed = { ...customFields, ...rest };\n parsed.sendTo = notifyEmails ? createEmailOptions(notifyEmails) : [];\n parsed.sendToCc = notifyCcEmails ? createEmailOptions(notifyCcEmails) : [];\n parsed.sendToBcc = notifyCcEmails ? createEmailOptions(notifyBccEmails) : [];\n parsed.replyTo = replyToId || customFields[\"replyTo\"];\n parsed.sendToId = customFields[\"sendToId\"] || sendToOptions?.[0]?.value || \"\";\n parsed.showCopyEmails = !!(notifyCcEmails?.length || notifyBccEmails?.length);\n\n return parsed;\n};\n\nexport const packEmailPayload = (\n values,\n isReplyToDropdownField,\n isDisabledByUser\n) => {\n const {\n // eslint-disable-next-line no-unused-vars\n id: _,\n isEnabled,\n sendTo,\n sendToCc,\n sendToBcc,\n showCopyEmails,\n replyTo,\n message,\n subject,\n sendFrom,\n sendToId,\n ...rest\n } = values;\n let payload = { isEnabled };\n\n if (isEnabled) {\n payload = { ...payload };\n payload.notifyEmails = parseEmailsOptions(sendTo);\n payload.notifyBccEmails = showCopyEmails\n ? parseEmailsOptions(sendToBcc)\n : [];\n\n payload.notifyCcEmails = showCopyEmails ? parseEmailsOptions(sendToCc) : [];\n if (isReplyToDropdownField) {\n payload.replyToId = replyTo;\n } else {\n rest.replyTo = replyTo;\n }\n payload.message = message;\n payload.subject = subject;\n payload.customFields = { ...rest, disabledByUser: false };\n\n if (isNotEmpty(sendToId)) {\n payload.customFields = mergeLeft(payload.customFields, { sendToId });\n }\n payload.sendFrom = sendFrom;\n } else {\n payload.customFields = { disabledByUser: isDisabledByUser };\n }\n\n return payload;\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import { useRef } from \"react\";\n\nimport { isNotPresent, noop } from \"neetocist\";\nimport EmailForm from \"neetomolecules/EmailForm\";\nimport { Spinner } from \"neetoui\";\nimport { mergeDeepLeft, mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n useFetchEmailNotifications,\n useUpdateEmailNotification,\n useResetEmailNotificationToDefault,\n} from \"src/hooks/reactQuery/emailNotificationApi\";\n\nimport { DEFAULT_FIELDS_VISIBILITY, FORM_VALIDATION_SCHEMA } from \"./constants\";\nimport {\n packEmailPayload,\n parseEmailNotificationData,\n renderText,\n} from \"./utils\";\n\nconst NeetoEmailNotificationForm = ({\n emailNotificationParams = {},\n emailPreviewProps = {},\n emailFormProps = {},\n emailFormikProps = {},\n title = \"\",\n notificationToggleLabel = \"\",\n breadcrumbs = [],\n helpPopoverProps = {},\n tooltipProps = {},\n disabled = false,\n fieldsVisibility = {},\n blockNavigation = false,\n onSuccess = noop,\n children,\n}) => {\n const editorRef = useRef();\n\n const { t } = useTranslation();\n\n const { data = {}, isLoading } = useFetchEmailNotifications(\n emailNotificationParams\n );\n\n const { mutate: updateEmailNotification, isPending: isSubmitting } =\n useUpdateEmailNotification();\n\n const { mutate: resetToDefault, isPending: isResetting } =\n useResetEmailNotificationToDefault();\n\n const handleSubmit = values => {\n const isDisabledByUser = data.isEnabled && !values.isEnabled;\n const isReplyToDropdownField =\n emailFormProps?.replyToFieldProps?.options !== undefined;\n\n const body = mergeDeepLeft(\n packEmailPayload(values, isReplyToDropdownField, isDisabledByUser),\n emailNotificationParams\n );\n updateEmailNotification(body, { onSuccess });\n };\n\n if (isLoading || isNotPresent(data)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n const formattedTitle = renderText(\n title,\n t(\"neetoEmailNotifications.emailNotification.title\")\n );\n\n const formattedNotificationToggleLabel = renderText(\n notificationToggleLabel,\n t(\"neetoEmailNotifications.emailNotification.notificationToggleLabel\")\n );\n\n const { validationSchema: customValidationSchema, ...formikProps } =\n emailFormikProps;\n\n const handleResetToDefault = () => {\n resetToDefault(emailNotificationParams, {\n onSuccess: ({ emailNotification }) =>\n editorRef?.current?.editor?.commands?.setContent(\n emailNotification.message\n ),\n });\n };\n\n return (\n <div className=\"min-w-0 flex-grow overflow-y-auto\">\n <EmailForm\n {...{\n blockNavigation,\n emailPreviewProps,\n formikProps,\n tooltipProps,\n ...mergeLeft(fieldsVisibility, DEFAULT_FIELDS_VISIBILITY),\n }}\n isLoading={isSubmitting || isResetting}\n validationSchema={customValidationSchema || FORM_VALIDATION_SCHEMA}\n emailFormProps={{\n editorRef,\n handleResetToDefault,\n ...emailFormProps,\n }}\n headerProps={{\n title: formattedTitle,\n titleHelpPopoverProps: helpPopoverProps,\n breadcrumbs,\n }}\n initialValues={parseEmailNotificationData(\n data,\n emailFormProps?.sendToFieldProps?.options\n )}\n switchProps={{\n label: formattedNotificationToggleLabel,\n disabled,\n \"data-cy\": \"receive-email-notification-switch\",\n }}\n onSubmit={handleSubmit}\n >\n {children}\n </EmailForm>\n </div>\n );\n};\n\nexport default NeetoEmailNotificationForm;\n"],"names":["EMAIL_NOTIFICATIONS_BASE_URL","RESET_EMAIL_NOTIFICATIONS_TO_DEFAULT_URL","concat","fetch","params","axios","get","update","payload","put","resetToDefault","post","emailNotificationsApi","QUERY_KEYS","NEETO_EMAIL_NOTIFICATIONS","useFetchEmailNotifications","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","select","prop","enabled","isNotEmpty","useUpdateEmailNotification","useMutationWithInvalidation","keysToInvalidate","_","_ref","notificationHolderId","useResetEmailNotificationToDefault","_ref2","customFields","FORM_VALIDATION_SCHEMA","isEnabled","yup","DEFAULT_FIELDS_VISIBILITY","showSendToField","showReplyToField","showSendToAsRadio","showBccField","showCcField","isValidEmail","email","string","isValidSync","createEmailOptions","emails","arguments","length","undefined","map","label","value","valid","parseEmailsOptions","emailOptions","parseEmailNotificationData","data","sendToOptions","_sendToOptions$","notifyEmails","notifyCcEmails","notifyBccEmails","replyToId","rest","_objectWithoutProperties","_excluded","parsed","_objectSpread","sendTo","sendToCc","sendToBcc","replyTo","sendToId","showCopyEmails","packEmailPayload","values","isReplyToDropdownField","isDisabledByUser","id","message","subject","sendFrom","_excluded2","disabledByUser","mergeLeft","renderText","text","fallbackTranslation","isEmpty","NeetoEmailNotificationForm","_emailFormProps$sendT","_ref$emailNotificatio","emailNotificationParams","_ref$emailPreviewProp","emailPreviewProps","_ref$emailFormProps","emailFormProps","_ref$emailFormikProps","emailFormikProps","_ref$title","title","_ref$notificationTogg","notificationToggleLabel","_ref$breadcrumbs","breadcrumbs","_ref$helpPopoverProps","helpPopoverProps","_ref$tooltipProps","tooltipProps","_ref$disabled","disabled","_ref$fieldsVisibility","fieldsVisibility","_ref$blockNavigation","blockNavigation","_ref$onSuccess","onSuccess","noop","children","editorRef","useRef","_useTranslation","useTranslation","t","_useFetchEmailNotific","_useFetchEmailNotific2","isLoading","_useUpdateEmailNotifi","updateEmailNotification","mutate","isSubmitting","isPending","_useResetEmailNotific","isResetting","handleSubmit","_emailFormProps$reply","replyToFieldProps","options","body","mergeDeepLeft","isNotPresent","_jsx","className","Spinner","formattedTitle","formattedNotificationToggleLabel","customValidationSchema","validationSchema","formikProps","handleResetToDefault","_editorRef$current","emailNotification","current","editor","commands","setContent","EmailForm","headerProps","titleHelpPopoverProps","initialValues","sendToFieldProps","switchProps","onSubmit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,4BAA4B,GACvC,8CAA8C;AAEzC,IAAMC,wCAAwC,GAAA,EAAA,CAAAC,MAAA,CAAMF,4BAA4B,EAAmB,mBAAA,CAAA;;ACI1G,IAAMG,KAAK,GAAG,SAARA,KAAKA,CAAGC,MAAM,EAAA;AAAA,EAAA,OAAIC,KAAK,CAACC,GAAG,CAACN,4BAA4B,EAAE;AAAEI,IAAAA,MAAM,EAANA;AAAO,GAAC,CAAC;AAAA,CAAA;AAE3E,IAAMG,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAAIH,KAAK,CAACI,GAAG,CAACT,4BAA4B,EAAEQ,OAAO,CAAC;AAAA,CAAA;AAE1E,IAAME,cAAc,GAAG,SAAjBA,cAAcA,CAAGN,MAAM,EAAA;AAAA,EAAA,OAC3BC,KAAK,CAACM,IAAI,CAACV,wCAAwC,EAAEG,MAAM,CAAC;AAAA,CAAA;AAE9D,IAAMQ,qBAAqB,GAAG;AAAET,EAAAA,KAAK,EAALA,KAAK;AAAEI,EAAAA,MAAM,EAANA,MAAM;AAAEG,EAAAA,cAAc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ARA,QAAQ;AACR,QAAA,SAAS,EAAE;OACX;AACFoD,MAAAA,QAAQ,EAAE5B,YAAa;AAAAhB,MAAAA,QAAA,EAEtBA;KACQ,CAAA;AAAC,GACT,CAAC;AAEV;;;;"}
package/dist/cjs/index.js CHANGED
@@ -2,17 +2,11 @@
2
2
 
3
3
  var NeetoEmailNotificationForm = require('./NeetoEmailNotificationForm.js');
4
4
  require('@babel/runtime/helpers/defineProperty');
5
- require('classnames');
5
+ require('@babel/runtime/helpers/objectWithoutProperties');
6
+ require('react');
6
7
  require('@bigbinary/neeto-cist');
7
- require('@bigbinary/neeto-molecules/Breadcrumbs');
8
8
  require('@bigbinary/neeto-molecules/EmailForm');
9
- require('@bigbinary/neeto-molecules/HelpPopover');
10
- require('@bigbinary/neeto-molecules/MobilePreviewHeader');
11
9
  require('@bigbinary/neetoui/Spinner');
12
- require('@bigbinary/neetoui/Tooltip');
13
- require('@bigbinary/neetoui/Typography');
14
- require('@bigbinary/neetoui/formik/BlockNavigation');
15
- require('@bigbinary/neetoui/formik/Switch');
16
10
  require('ramda');
17
11
  require('react-i18next');
18
12
  require('@tanstack/react-query');
@@ -20,7 +14,6 @@ require('@bigbinary/neeto-commons-frontend/constants');
20
14
  require('@bigbinary/neeto-commons-frontend/react-utils');
21
15
  require('axios');
22
16
  require('yup');
23
- require('@babel/runtime/helpers/objectWithoutProperties');
24
17
  require('react/jsx-runtime');
25
18
 
26
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -1,16 +1,10 @@
1
1
  export { default as NeetoEmailNotificationForm } from './NeetoEmailNotificationForm.js';
2
2
  import '@babel/runtime/helpers/defineProperty';
3
- import 'classnames';
3
+ import '@babel/runtime/helpers/objectWithoutProperties';
4
+ import 'react';
4
5
  import '@bigbinary/neeto-cist';
5
- import '@bigbinary/neeto-molecules/Breadcrumbs';
6
6
  import '@bigbinary/neeto-molecules/EmailForm';
7
- import '@bigbinary/neeto-molecules/HelpPopover';
8
- import '@bigbinary/neeto-molecules/MobilePreviewHeader';
9
7
  import '@bigbinary/neetoui/Spinner';
10
- import '@bigbinary/neetoui/Tooltip';
11
- import '@bigbinary/neetoui/Typography';
12
- import '@bigbinary/neetoui/formik/BlockNavigation';
13
- import '@bigbinary/neetoui/formik/Switch';
14
8
  import 'ramda';
15
9
  import 'react-i18next';
16
10
  import '@tanstack/react-query';
@@ -18,6 +12,5 @@ import '@bigbinary/neeto-commons-frontend/constants';
18
12
  import '@bigbinary/neeto-commons-frontend/react-utils';
19
13
  import 'axios';
20
14
  import 'yup';
21
- import '@babel/runtime/helpers/objectWithoutProperties';
22
15
  import 'react/jsx-runtime';
23
16
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-email-notifications-frontend",
3
- "version": "2.2.13",
3
+ "version": "2.2.15",
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-email-notifications-nano",
@@ -61,14 +61,14 @@
61
61
  "@babel/preset-typescript": "7.26.0",
62
62
  "@babel/runtime": "7.26.10",
63
63
  "@bigbinary/babel-preset-neeto": "^1.0.3",
64
- "@bigbinary/eslint-plugin-neeto": "1.6.3",
64
+ "@bigbinary/eslint-plugin-neeto": "1.7.0",
65
65
  "@bigbinary/neeto-cist": "1.0.17",
66
- "@bigbinary/neeto-commons-frontend": "4.13.43",
67
- "@bigbinary/neeto-editor": "1.47.16",
68
- "@bigbinary/neeto-filters-frontend": "4.3.21",
69
- "@bigbinary/neeto-icons": "1.20.49",
70
- "@bigbinary/neeto-molecules": "3.16.63",
71
- "@bigbinary/neetoui": "8.3.9",
66
+ "@bigbinary/neeto-commons-frontend": "4.13.47",
67
+ "@bigbinary/neeto-editor": "1.47.21",
68
+ "@bigbinary/neeto-filters-frontend": "4.3.23",
69
+ "@bigbinary/neeto-icons": "1.20.53",
70
+ "@bigbinary/neeto-molecules": "3.16.87",
71
+ "@bigbinary/neetoui": "8.3.14",
72
72
  "@emotion/is-prop-valid": "1.2.0",
73
73
  "@faker-js/faker": "8.2.0",
74
74
  "@honeybadger-io/js": "6.10.1",
@@ -177,12 +177,12 @@
177
177
  "peerDependencies": {
178
178
  "@babel/runtime": "7.26.10",
179
179
  "@bigbinary/neeto-cist": "1.0.17",
180
- "@bigbinary/neeto-commons-frontend": "4.13.43",
181
- "@bigbinary/neeto-editor": "1.47.16",
182
- "@bigbinary/neeto-filters-frontend": "4.3.21",
183
- "@bigbinary/neeto-icons": "1.20.49",
184
- "@bigbinary/neeto-molecules": "3.16.63",
185
- "@bigbinary/neetoui": "8.3.9",
180
+ "@bigbinary/neeto-commons-frontend": "4.13.47",
181
+ "@bigbinary/neeto-editor": "1.47.21",
182
+ "@bigbinary/neeto-filters-frontend": "4.3.23",
183
+ "@bigbinary/neeto-icons": "1.20.53",
184
+ "@bigbinary/neeto-molecules": "3.16.87",
185
+ "@bigbinary/neetoui": "8.3.14",
186
186
  "@honeybadger-io/js": "6.10.1",
187
187
  "@honeybadger-io/react": "6.1.25",
188
188
  "@tailwindcss/container-queries": "^0.1.1",
@@ -232,5 +232,6 @@
232
232
  "npm": ">=9",
233
233
  "yarn": ">=1.22"
234
234
  },
235
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
235
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
236
+ "dependencies": {}
236
237
  }