@comet/brevo-admin 8.17.1 → 9.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/lib/blocks/NewsletterImageBlock.d.ts +7 -3
  2. package/lib/blocks/NewsletterImageBlock.d.ts.map +1 -1
  3. package/lib/blocks/NewsletterImageBlock.js +8 -14
  4. package/lib/blocks.generated.js +1 -5
  5. package/lib/brevoConfiguration/BrevoConfigForm.generated.js +1 -5
  6. package/lib/brevoConfiguration/BrevoConfigForm.gql.d.ts +7 -7
  7. package/lib/brevoConfiguration/BrevoConfigForm.gql.d.ts.map +1 -1
  8. package/lib/brevoConfiguration/BrevoConfigForm.gql.generated.js +1 -7
  9. package/lib/brevoConfiguration/BrevoConfigForm.gql.js +8 -14
  10. package/lib/brevoConfiguration/BrevoConfigForm.js +53 -59
  11. package/lib/brevoConfiguration/BrevoConfigPage.d.ts +1 -0
  12. package/lib/brevoConfiguration/BrevoConfigPage.d.ts.map +1 -1
  13. package/lib/brevoConfiguration/BrevoConfigPage.js +8 -14
  14. package/lib/brevoContacts/BrevoContactsGrid.generated.js +1 -7
  15. package/lib/brevoContacts/BrevoContactsGrid.js +45 -51
  16. package/lib/brevoContacts/BrevoContactsPage.d.ts +1 -1
  17. package/lib/brevoContacts/BrevoContactsPage.d.ts.map +1 -1
  18. package/lib/brevoContacts/BrevoContactsPage.js +24 -29
  19. package/lib/brevoContacts/form/BrevoContactForm.generated.js +1 -7
  20. package/lib/brevoContacts/form/BrevoContactForm.gql.generated.js +1 -7
  21. package/lib/brevoContacts/form/BrevoContactForm.gql.js +7 -13
  22. package/lib/brevoContacts/form/BrevoContactForm.js +58 -64
  23. package/lib/brevoTestContacts/BrevoTestContactsGrid.generated.js +1 -7
  24. package/lib/brevoTestContacts/BrevoTestContactsGrid.js +40 -46
  25. package/lib/brevoTestContacts/BrevoTestContactsPage.d.ts +1 -1
  26. package/lib/brevoTestContacts/BrevoTestContactsPage.d.ts.map +1 -1
  27. package/lib/brevoTestContacts/BrevoTestContactsPage.js +24 -29
  28. package/lib/brevoTestContacts/form/BrevoTestContactForm.generated.js +1 -7
  29. package/lib/brevoTestContacts/form/BrevoTestContactForm.gql.generated.js +1 -7
  30. package/lib/brevoTestContacts/form/BrevoTestContactForm.gql.js +7 -13
  31. package/lib/brevoTestContacts/form/BrevoTestContactForm.js +42 -48
  32. package/lib/common/BrevoConfigProvider.js +9 -15
  33. package/lib/common/contactImport/useContactImportFromCsv.gql.d.ts +1 -1
  34. package/lib/common/contactImport/useContactImportFromCsv.gql.d.ts.map +1 -1
  35. package/lib/common/contactImport/useContactImportFromCsv.gql.generated.js +1 -7
  36. package/lib/common/contactImport/useContactImportFromCsv.gql.js +2 -8
  37. package/lib/common/contactImport/useContactImportFromCsv.js +80 -87
  38. package/lib/configVerification/ConfigVerification.d.ts +1 -1
  39. package/lib/configVerification/ConfigVerification.d.ts.map +1 -1
  40. package/lib/configVerification/ConfigVerification.gql.d.ts +1 -1
  41. package/lib/configVerification/ConfigVerification.gql.d.ts.map +1 -1
  42. package/lib/configVerification/ConfigVerification.gql.generated.js +1 -7
  43. package/lib/configVerification/ConfigVerification.gql.js +2 -8
  44. package/lib/configVerification/ConfigVerification.js +12 -18
  45. package/lib/emailCampaigns/EmailCampaignsGrid.generated.js +1 -7
  46. package/lib/emailCampaigns/EmailCampaignsGrid.js +47 -53
  47. package/lib/emailCampaigns/EmailCampaignsPage.d.ts +1 -0
  48. package/lib/emailCampaigns/EmailCampaignsPage.d.ts.map +1 -1
  49. package/lib/emailCampaigns/EmailCampaignsPage.js +29 -35
  50. package/lib/emailCampaigns/SendingStateColumn.js +24 -30
  51. package/lib/emailCampaigns/form/ConfigFields.js +11 -17
  52. package/lib/emailCampaigns/form/EmailCampaignForm.gql.d.ts +5 -5
  53. package/lib/emailCampaigns/form/EmailCampaignForm.gql.d.ts.map +1 -1
  54. package/lib/emailCampaigns/form/EmailCampaignForm.gql.generated.js +1 -7
  55. package/lib/emailCampaigns/form/EmailCampaignForm.gql.js +6 -12
  56. package/lib/emailCampaigns/form/EmailCampaignForm.js +65 -71
  57. package/lib/emailCampaigns/form/SendEmailCampaignNowDialog.js +16 -21
  58. package/lib/emailCampaigns/form/SendManagerFields.gql.d.ts +2 -2
  59. package/lib/emailCampaigns/form/SendManagerFields.gql.d.ts.map +1 -1
  60. package/lib/emailCampaigns/form/SendManagerFields.gql.generated.js +1 -7
  61. package/lib/emailCampaigns/form/SendManagerFields.gql.js +4 -10
  62. package/lib/emailCampaigns/form/SendManagerFields.js +37 -43
  63. package/lib/emailCampaigns/form/SendManagerWrapper.gql.d.ts +1 -1
  64. package/lib/emailCampaigns/form/SendManagerWrapper.gql.d.ts.map +1 -1
  65. package/lib/emailCampaigns/form/SendManagerWrapper.gql.generated.js +1 -7
  66. package/lib/emailCampaigns/form/SendManagerWrapper.gql.js +2 -8
  67. package/lib/emailCampaigns/form/SendManagerWrapper.js +13 -19
  68. package/lib/emailCampaigns/form/TestEmailCampaignForm.generated.js +1 -7
  69. package/lib/emailCampaigns/form/TestEmailCampaignForm.gql.d.ts +1 -1
  70. package/lib/emailCampaigns/form/TestEmailCampaignForm.gql.d.ts.map +1 -1
  71. package/lib/emailCampaigns/form/TestEmailCampaignForm.gql.generated.js +1 -7
  72. package/lib/emailCampaigns/form/TestEmailCampaignForm.gql.js +2 -8
  73. package/lib/emailCampaigns/form/TestEmailCampaignForm.js +33 -39
  74. package/lib/emailCampaigns/statistics/EmailCampaignStatistics.gql.d.ts +1 -1
  75. package/lib/emailCampaigns/statistics/EmailCampaignStatistics.gql.d.ts.map +1 -1
  76. package/lib/emailCampaigns/statistics/EmailCampaignStatistics.gql.generated.js +1 -7
  77. package/lib/emailCampaigns/statistics/EmailCampaignStatistics.gql.js +2 -8
  78. package/lib/emailCampaigns/statistics/EmailCampaignStatistics.js +40 -46
  79. package/lib/emailCampaigns/statistics/PercentageCard.js +29 -35
  80. package/lib/emailCampaigns/view/EmailCampaignView.gql.d.ts +1 -1
  81. package/lib/emailCampaigns/view/EmailCampaignView.gql.d.ts.map +1 -1
  82. package/lib/emailCampaigns/view/EmailCampaignView.gql.generated.js +1 -7
  83. package/lib/emailCampaigns/view/EmailCampaignView.gql.js +2 -8
  84. package/lib/emailCampaigns/view/EmailCampaignView.js +31 -37
  85. package/lib/graphql.generated.js +1 -5
  86. package/lib/index.js +7 -60
  87. package/lib/targetGroups/TargetGroupDialog.gql.d.ts +1 -1
  88. package/lib/targetGroups/TargetGroupDialog.gql.d.ts.map +1 -1
  89. package/lib/targetGroups/TargetGroupDialog.gql.generated.js +1 -7
  90. package/lib/targetGroups/TargetGroupDialog.gql.js +2 -8
  91. package/lib/targetGroups/TargetGroupDialog.js +13 -19
  92. package/lib/targetGroups/TargetGroupForm.gql.generated.js +1 -7
  93. package/lib/targetGroups/TargetGroupForm.gql.js +8 -14
  94. package/lib/targetGroups/TargetGroupForm.js +49 -61
  95. package/lib/targetGroups/TargetGroupsGrid.generated.js +1 -7
  96. package/lib/targetGroups/TargetGroupsGrid.js +41 -48
  97. package/lib/targetGroups/TargetGroupsPage.d.ts +1 -1
  98. package/lib/targetGroups/TargetGroupsPage.d.ts.map +1 -1
  99. package/lib/targetGroups/TargetGroupsPage.js +21 -27
  100. package/lib/targetGroups/addContacts/AddContactsGridSelect.gql.d.ts +4 -4
  101. package/lib/targetGroups/addContacts/AddContactsGridSelect.gql.d.ts.map +1 -1
  102. package/lib/targetGroups/addContacts/AddContactsGridSelect.gql.generated.js +1 -7
  103. package/lib/targetGroups/addContacts/AddContactsGridSelect.gql.js +6 -12
  104. package/lib/targetGroups/addContacts/AddContactsGridSelect.js +64 -70
  105. package/lib/targetGroups/allAssignedContacts/AllAssignedContactsGrid.gql.d.ts +1 -1
  106. package/lib/targetGroups/allAssignedContacts/AllAssignedContactsGrid.gql.d.ts.map +1 -1
  107. package/lib/targetGroups/allAssignedContacts/AllAssignedContactsGrid.gql.generated.js +1 -7
  108. package/lib/targetGroups/allAssignedContacts/AllAssignedContactsGrid.gql.js +3 -9
  109. package/lib/targetGroups/allAssignedContacts/AllAssignedContactsGrid.js +17 -23
  110. package/package.json +20 -15
@@ -1,17 +1,11 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.updateBrevoContactMutation = exports.createBrevoTestContactMutation = exports.brevoContactFormQuery = exports.brevoContactFormCheckForChangesQuery = void 0;
7
- var _client = require("@apollo/client");
8
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
9
2
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
10
- var brevoContactFormQuery = exports.brevoContactFormQuery = function brevoContactFormQuery(brevoTestContactFormFragment) {
11
- return (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query BrevoContactForm($id: Int!, $scope: EmailCampaignContentScopeInput!) {\n brevoContact(id: $id, scope: $scope) {\n id\n modifiedAt\n ...BrevoTestContactForm\n }\n }\n ", "\n"])), brevoTestContactFormFragment);
3
+ import { gql } from "@apollo/client";
4
+ export var brevoContactFormQuery = function brevoContactFormQuery(brevoTestContactFormFragment) {
5
+ return gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query BrevoContactForm($id: Int!, $scope: EmailCampaignContentScopeInput!) {\n brevoContact(id: $id, scope: $scope) {\n id\n modifiedAt\n ...BrevoTestContactForm\n }\n }\n ", "\n"])), brevoTestContactFormFragment);
12
6
  };
13
- var brevoContactFormCheckForChangesQuery = exports.brevoContactFormCheckForChangesQuery = (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query BrevoContactFormCheckForChanges($id: Int!, $scope: EmailCampaignContentScopeInput!) {\n brevoContact(id: $id, scope: $scope) {\n modifiedAt\n }\n }\n"])));
14
- var createBrevoTestContactMutation = exports.createBrevoTestContactMutation = (0, _client.gql)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n mutation CreateBrevoTestContact($scope: EmailCampaignContentScopeInput!, $input: BrevoTestContactInput!) {\n createBrevoTestContact(scope: $scope, input: $input)\n }\n"])));
15
- var updateBrevoContactMutation = exports.updateBrevoContactMutation = function updateBrevoContactMutation(brevoTestContactFormFragment) {
16
- return (0, _client.gql)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation UpdateBrevoContact($id: Int!, $input: BrevoContactUpdateInput!, $scope: EmailCampaignContentScopeInput!) {\n updateBrevoContact(id: $id, input: $input, scope: $scope) {\n id\n modifiedAt\n ...BrevoTestContactForm\n }\n }\n ", "\n"])), brevoTestContactFormFragment);
7
+ export var brevoContactFormCheckForChangesQuery = gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query BrevoContactFormCheckForChanges($id: Int!, $scope: EmailCampaignContentScopeInput!) {\n brevoContact(id: $id, scope: $scope) {\n modifiedAt\n }\n }\n"])));
8
+ export var createBrevoTestContactMutation = gql(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n mutation CreateBrevoTestContact($scope: EmailCampaignContentScopeInput!, $input: BrevoTestContactInput!) {\n createBrevoTestContact(scope: $scope, input: $input)\n }\n"])));
9
+ export var updateBrevoContactMutation = function updateBrevoContactMutation(brevoTestContactFormFragment) {
10
+ return gql(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation UpdateBrevoContact($id: Int!, $input: BrevoContactUpdateInput!, $scope: EmailCampaignContentScopeInput!) {\n updateBrevoContact(id: $id, input: $input, scope: $scope) {\n id\n modifiedAt\n ...BrevoTestContactForm\n }\n }\n ", "\n"])), brevoTestContactFormFragment);
17
11
  };
@@ -1,20 +1,4 @@
1
- "use strict";
2
-
3
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.BrevoTestContactForm = BrevoTestContactForm;
8
- var _client = require("@apollo/client");
9
- var _admin = require("@comet/admin");
10
- var _adminIcons = require("@comet/admin-icons");
11
- var _cmsAdmin = require("@comet/cms-admin");
12
- var _material = require("@mui/material");
13
- var _system = require("@mui/system");
14
- var _react = require("react");
15
- var _reactIntl = require("react-intl");
16
- var _BrevoTestContactForm = require("./BrevoTestContactForm.gql");
17
- var _jsxRuntime = require("react/jsx-runtime");
18
2
  var _excluded = ["email"];
19
3
  var _templateObject;
20
4
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
@@ -29,19 +13,29 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
29
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
30
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
31
15
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
32
- function BrevoTestContactForm(_ref) {
16
+ import { gql, useApolloClient, useQuery } from "@apollo/client";
17
+ import { Alert, FillSpace, FinalForm, FinalFormSaveButton, FormSection, Loading, MainContent, TextField, Toolbar, ToolbarActions, ToolbarItem, ToolbarTitleItem, useFormApiRef, useStackApi } from "@comet/admin";
18
+ import { ArrowLeft } from "@comet/admin-icons";
19
+ import { resolveHasSaveConflict, useFormSaveConflict } from "@comet/cms-admin";
20
+ import { Card, IconButton } from "@mui/material";
21
+ import { Box } from "@mui/system";
22
+ import { useMemo } from "react";
23
+ import { FormattedMessage } from "react-intl";
24
+ import { brevoContactFormCheckForChangesQuery, brevoContactFormQuery, createBrevoTestContactMutation, updateBrevoContactMutation } from "./BrevoTestContactForm.gql";
25
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
26
+ export function BrevoTestContactForm(_ref) {
33
27
  var _additionalAttributes;
34
28
  var id = _ref.id,
35
29
  scope = _ref.scope,
36
30
  input2State = _ref.input2State,
37
31
  additionalFormFields = _ref.additionalFormFields,
38
32
  additionalAttributesFragment = _ref.additionalAttributesFragment;
39
- var stackApi = (0, _admin.useStackApi)();
40
- var client = (0, _client.useApolloClient)();
33
+ var stackApi = useStackApi();
34
+ var client = useApolloClient();
41
35
  var mode = id ? "edit" : "add";
42
- var formApiRef = (0, _admin.useFormApiRef)();
43
- var brevoTestContactFormFragment = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment BrevoTestContactForm on BrevoContact {\n email\n createdAt\n emailBlacklisted\n smsBlacklisted\n ", "\n }\n ", "\n"])), additionalAttributesFragment ? "...".concat(additionalAttributesFragment === null || additionalAttributesFragment === void 0 ? void 0 : additionalAttributesFragment.name) : "", (_additionalAttributes = additionalAttributesFragment === null || additionalAttributesFragment === void 0 ? void 0 : additionalAttributesFragment.fragment) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : "");
44
- var _useQuery = (0, _client.useQuery)((0, _BrevoTestContactForm.brevoContactFormQuery)(brevoTestContactFormFragment), id ? {
36
+ var formApiRef = useFormApiRef();
37
+ var brevoTestContactFormFragment = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment BrevoTestContactForm on BrevoContact {\n email\n createdAt\n emailBlacklisted\n smsBlacklisted\n ", "\n }\n ", "\n"])), additionalAttributesFragment ? "...".concat(additionalAttributesFragment === null || additionalAttributesFragment === void 0 ? void 0 : additionalAttributesFragment.name) : "", (_additionalAttributes = additionalAttributesFragment === null || additionalAttributesFragment === void 0 ? void 0 : additionalAttributesFragment.fragment) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : "");
38
+ var _useQuery = useQuery(brevoContactFormQuery(brevoTestContactFormFragment), id ? {
45
39
  variables: {
46
40
  id: id,
47
41
  scope: scope
@@ -53,7 +47,7 @@ function BrevoTestContactForm(_ref) {
53
47
  error = _useQuery.error,
54
48
  loading = _useQuery.loading,
55
49
  refetch = _useQuery.refetch;
56
- var initialValues = (0, _react.useMemo)(function () {
50
+ var initialValues = useMemo(function () {
57
51
  var _data$brevoContact;
58
52
  var baseInitialValues = {
59
53
  email: ""
@@ -65,7 +59,7 @@ function BrevoTestContactForm(_ref) {
65
59
  email: data.brevoContact.email
66
60
  }) : baseInitialValues;
67
61
  }, [data === null || data === void 0 ? void 0 : data.brevoContact, input2State]);
68
- var saveConflict = (0, _cmsAdmin.useFormSaveConflict)({
62
+ var saveConflict = useFormSaveConflict({
69
63
  checkConflict: function () {
70
64
  var _checkConflict = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
71
65
  var _data$brevoContact2;
@@ -81,7 +75,7 @@ function BrevoTestContactForm(_ref) {
81
75
  case 1:
82
76
  _context.n = 2;
83
77
  return client.query({
84
- query: _BrevoTestContactForm.brevoContactFormCheckForChangesQuery,
78
+ query: brevoContactFormCheckForChangesQuery,
85
79
  variables: {
86
80
  id: id,
87
81
  scope: scope
@@ -91,7 +85,7 @@ function BrevoTestContactForm(_ref) {
91
85
  case 2:
92
86
  _yield$client$query = _context.v;
93
87
  updatedData = _yield$client$query.data;
94
- return _context.a(2, (0, _cmsAdmin.resolveHasSaveConflict)(data === null || data === void 0 || (_data$brevoContact2 = data.brevoContact) === null || _data$brevoContact2 === void 0 ? void 0 : _data$brevoContact2.modifiedAt, updatedData.brevoContact.modifiedAt));
88
+ return _context.a(2, resolveHasSaveConflict(data === null || data === void 0 || (_data$brevoContact2 = data.brevoContact) === null || _data$brevoContact2 === void 0 ? void 0 : _data$brevoContact2.modifiedAt, updatedData.brevoContact.modifiedAt));
95
89
  }
96
90
  }, _callee);
97
91
  }));
@@ -150,7 +144,7 @@ function BrevoTestContactForm(_ref) {
150
144
  email = output.email, rest = _objectWithoutProperties(output, _excluded);
151
145
  _context3.n = 4;
152
146
  return client.mutate({
153
- mutation: (0, _BrevoTestContactForm.updateBrevoContactMutation)(brevoTestContactFormFragment),
147
+ mutation: updateBrevoContactMutation(brevoTestContactFormFragment),
154
148
  variables: {
155
149
  id: id,
156
150
  input: rest,
@@ -163,7 +157,7 @@ function BrevoTestContactForm(_ref) {
163
157
  case 5:
164
158
  _context3.n = 6;
165
159
  return client.mutate({
166
- mutation: _BrevoTestContactForm.createBrevoTestContactMutation,
160
+ mutation: createBrevoTestContactMutation,
167
161
  variables: {
168
162
  scope: scope,
169
163
  input: output
@@ -205,59 +199,59 @@ function BrevoTestContactForm(_ref) {
205
199
  }();
206
200
  if (error) throw error;
207
201
  if (loading) {
208
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Loading, {
202
+ return /*#__PURE__*/_jsx(Loading, {
209
203
  behavior: "fillPageHeight"
210
204
  });
211
205
  }
212
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FinalForm, {
206
+ return /*#__PURE__*/_jsx(FinalForm, {
213
207
  apiRef: formApiRef,
214
208
  onSubmit: handleSubmit,
215
209
  mode: mode,
216
210
  initialValues: initialValues,
217
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
218
- children: [saveConflict.dialogs, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.Toolbar, {
219
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarItem, {
220
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
211
+ children: /*#__PURE__*/_jsxs(_Fragment, {
212
+ children: [saveConflict.dialogs, /*#__PURE__*/_jsxs(Toolbar, {
213
+ children: [/*#__PURE__*/_jsx(ToolbarItem, {
214
+ children: /*#__PURE__*/_jsx(IconButton, {
221
215
  onClick: stackApi === null || stackApi === void 0 ? void 0 : stackApi.goBack,
222
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.ArrowLeft, {})
216
+ children: /*#__PURE__*/_jsx(ArrowLeft, {})
223
217
  })
224
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarTitleItem, {
225
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
218
+ }), /*#__PURE__*/_jsx(ToolbarTitleItem, {
219
+ children: /*#__PURE__*/_jsx(FormattedMessage, {
226
220
  id: "cometBrevoModule.brevoTestContacts.brevoTestContact",
227
221
  defaultMessage: "Test contact"
228
222
  })
229
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FillSpace, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarActions, {
230
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FinalFormSaveButton, {
223
+ }), /*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(ToolbarActions, {
224
+ children: /*#__PURE__*/_jsx(FinalFormSaveButton, {
231
225
  hasConflict: saveConflict.hasConflict
232
226
  })
233
227
  })]
234
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.MainContent, {
235
- children: [mode === "edit" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_system.Box, {
228
+ }), /*#__PURE__*/_jsxs(MainContent, {
229
+ children: [mode === "edit" && /*#__PURE__*/_jsx(Box, {
236
230
  sx: {
237
231
  marginBottom: 4
238
232
  },
239
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Alert, {
233
+ children: /*#__PURE__*/_jsx(Alert, {
240
234
  severity: "warning",
241
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
235
+ children: /*#__PURE__*/_jsx(FormattedMessage, {
242
236
  id: "cometBrevoModule.brevoContact.contactEditAlert",
243
237
  defaultMessage: "Editing a contact will affect all scopes and the target groups within those scopes."
244
238
  })
245
239
  })
246
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.TextField, {
240
+ }), /*#__PURE__*/_jsx(TextField, {
247
241
  required: true,
248
242
  fullWidth: true,
249
243
  name: "email",
250
- label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
244
+ label: /*#__PURE__*/_jsx(FormattedMessage, {
251
245
  id: "cometBrevoModule.brevoTestContact.email",
252
246
  defaultMessage: "Email"
253
247
  }),
254
248
  disabled: mode === "edit"
255
- }), additionalFormFields && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Card, {
249
+ }), additionalFormFields && /*#__PURE__*/_jsx(Card, {
256
250
  sx: {
257
251
  padding: 4
258
252
  },
259
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FormSection, {
260
- title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
253
+ children: /*#__PURE__*/_jsx(FormSection, {
254
+ title: /*#__PURE__*/_jsx(FormattedMessage, {
261
255
  id: "cometBrevoModule.brevoTestContact.attributes",
262
256
  defaultMessage: "Attributes"
263
257
  }),
@@ -1,32 +1,26 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useBrevoConfig = exports.BrevoConfigProvider = void 0;
7
- var _cmsAdmin = require("@comet/cms-admin");
8
- var _react = require("react");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
2
  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; }
12
3
  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; }
13
4
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
- var BrevoConfigContext = /*#__PURE__*/(0, _react.createContext)(undefined);
17
- var BrevoConfigProvider = exports.BrevoConfigProvider = function BrevoConfigProvider(_ref) {
7
+ import { useContentScope } from "@comet/cms-admin";
8
+ import { createContext, useContext } from "react";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ var BrevoConfigContext = /*#__PURE__*/createContext(undefined);
11
+ export var BrevoConfigProvider = function BrevoConfigProvider(_ref) {
18
12
  var children = _ref.children,
19
13
  value = _ref.value;
20
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(BrevoConfigContext.Provider, {
14
+ return /*#__PURE__*/_jsx(BrevoConfigContext.Provider, {
21
15
  value: value,
22
16
  children: children
23
17
  });
24
18
  };
25
- var useBrevoConfig = exports.useBrevoConfig = function useBrevoConfig() {
19
+ export var useBrevoConfig = function useBrevoConfig() {
26
20
  var _context$allowAddingC;
27
- var _useContentScope = (0, _cmsAdmin.useContentScope)(),
21
+ var _useContentScope = useContentScope(),
28
22
  scope = _useContentScope.scope;
29
- var context = (0, _react.useContext)(BrevoConfigContext);
23
+ var context = useContext(BrevoConfigContext);
30
24
  if (context === undefined) {
31
25
  throw new Error("useBrevoConfig must be used within a BrevoConfigProvider");
32
26
  }
@@ -1,2 +1,2 @@
1
- export declare const startBrevoContactImportMutation: import("@apollo/client").DocumentNode;
1
+ export declare const startBrevoContactImportMutation: import("graphql").DocumentNode;
2
2
  //# sourceMappingURL=useContactImportFromCsv.gql.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useContactImportFromCsv.gql.d.ts","sourceRoot":"","sources":["../../../src/common/contactImport/useContactImportFromCsv.gql.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B,uCAY3C,CAAC"}
1
+ {"version":3,"file":"useContactImportFromCsv.gql.d.ts","sourceRoot":"","sources":["../../../src/common/contactImport/useContactImportFromCsv.gql.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B,gCAY3C,CAAC"}
@@ -1,10 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.namedOperations = void 0;
7
- var namedOperations = exports.namedOperations = {
1
+ export var namedOperations = {
8
2
  Mutation: {
9
3
  StartBrevoContactImport: 'StartBrevoContactImport'
10
4
  }
@@ -1,10 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.startBrevoContactImportMutation = void 0;
7
- var _client = require("@apollo/client");
8
1
  var _templateObject;
9
2
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
10
- var startBrevoContactImportMutation = exports.startBrevoContactImportMutation = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n mutation StartBrevoContactImport($scope: EmailCampaignContentScopeInput!, $fileId: ID!, $sendDoubleOptIn: Boolean!, $targetGroupIds: [ID!]) {\n startBrevoContactImport(scope: $scope, fileId: $fileId, sendDoubleOptIn: $sendDoubleOptIn, targetGroupIds: $targetGroupIds) {\n created\n updated\n failed\n blacklisted\n failedColumns\n blacklistedColumns\n errorMessage\n }\n }\n"])));
3
+ import { gql } from "@apollo/client";
4
+ export var startBrevoContactImportMutation = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n mutation StartBrevoContactImport($scope: EmailCampaignContentScopeInput!, $fileId: ID!, $sendDoubleOptIn: Boolean!, $targetGroupIds: [ID!]) {\n startBrevoContactImport(scope: $scope, fileId: $fileId, sendDoubleOptIn: $sendDoubleOptIn, targetGroupIds: $targetGroupIds) {\n created\n updated\n failed\n blacklisted\n failedColumns\n blacklistedColumns\n errorMessage\n }\n }\n"])));