@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,4 +1,8 @@
1
- export declare const NewsletterImageBlock: import("@comet/cms-admin/lib/blocks/helpers/composeBlocks/composeBlocks").CompositeBlockInterface<{
2
- image: import("@comet/cms-admin").BlockInterface<import("@comet/cms-admin/lib/blocks.generated").PixelImageBlockData, import("@comet/cms-admin/lib/blocks/PixelImageBlock").ImageBlockState, import("@comet/cms-admin/lib/blocks.generated").PixelImageBlockInput, import("@comet/cms-admin/lib/blocks.generated").PixelImageBlockData & import("@comet/cms-admin").BlockPreviewStateInterface>;
3
- }>;
1
+ import { type BlockInterface, type BlockState, PixelImageBlock } from "@comet/cms-admin";
2
+ import type { NewsletterImageBlockData, NewsletterImageBlockInput } from "../blocks.generated";
3
+ type NewsletterImageBlockState = {
4
+ image: BlockState<typeof PixelImageBlock>;
5
+ };
6
+ export declare const NewsletterImageBlock: BlockInterface<NewsletterImageBlockData, NewsletterImageBlockState, NewsletterImageBlockInput>;
7
+ export {};
4
8
  //# sourceMappingURL=NewsletterImageBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NewsletterImageBlock.d.ts","sourceRoot":"","sources":["../../src/blocks/NewsletterImageBlock.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;EAU/B,CAAC"}
1
+ {"version":3,"file":"NewsletterImageBlock.d.ts","sourceRoot":"","sources":["../../src/blocks/NewsletterImageBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,UAAU,EAAwB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG9H,OAAO,KAAK,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAE/F,KAAK,yBAAyB,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;CAAE,CAAC;AAE/E,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,wBAAwB,EAAE,yBAAyB,EAAE,yBAAyB,CAW1H,CAAC"}
@@ -1,23 +1,17 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.NewsletterImageBlock = void 0;
7
- var _cmsAdmin = require("@comet/cms-admin");
8
- var _reactIntl = require("react-intl");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- var NewsletterImageBlock = exports.NewsletterImageBlock = (0, _cmsAdmin.createCompositeBlock)({
1
+ import { BlockCategory, createCompositeBlock, PixelImageBlock } from "@comet/cms-admin";
2
+ import { FormattedMessage } from "react-intl";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export var NewsletterImageBlock = createCompositeBlock({
11
5
  name: "NewsletterImage",
12
- displayName: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
6
+ displayName: /*#__PURE__*/_jsx(FormattedMessage, {
13
7
  id: "brevo.blocks.newsletterImage.displayName",
14
8
  defaultMessage: "Newsletter Image"
15
9
  }),
16
- category: _cmsAdmin.BlockCategory.Media,
10
+ category: BlockCategory.Media,
17
11
  blocks: {
18
12
  image: {
19
- block: _cmsAdmin.PixelImageBlock,
20
- title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
13
+ block: PixelImageBlock,
14
+ title: /*#__PURE__*/_jsx(FormattedMessage, {
21
15
  id: "brevo.blocks.newsletterImage.image",
22
16
  defaultMessage: "Image"
23
17
  })
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ export {};
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ export {};
@@ -1,8 +1,8 @@
1
- export declare const brevoConfigFormFragment: import("@apollo/client").DocumentNode;
2
- export declare const brevoConfigFormQuery: import("@apollo/client").DocumentNode;
3
- export declare const brevoConfigFormCheckForChangesQuery: import("@apollo/client").DocumentNode;
4
- export declare const createBrevoConfigMutation: import("@apollo/client").DocumentNode;
5
- export declare const updateBrevoConfigMutation: import("@apollo/client").DocumentNode;
6
- export declare const sendersSelectQuery: import("@apollo/client").DocumentNode;
7
- export declare const doubleOptInTemplatesSelectQuery: import("@apollo/client").DocumentNode;
1
+ export declare const brevoConfigFormFragment: import("graphql").DocumentNode;
2
+ export declare const brevoConfigFormQuery: import("graphql").DocumentNode;
3
+ export declare const brevoConfigFormCheckForChangesQuery: import("graphql").DocumentNode;
4
+ export declare const createBrevoConfigMutation: import("graphql").DocumentNode;
5
+ export declare const updateBrevoConfigMutation: import("graphql").DocumentNode;
6
+ export declare const sendersSelectQuery: import("graphql").DocumentNode;
7
+ export declare const doubleOptInTemplatesSelectQuery: import("graphql").DocumentNode;
8
8
  //# sourceMappingURL=BrevoConfigForm.gql.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrevoConfigForm.gql.d.ts","sourceRoot":"","sources":["../../src/brevoConfiguration/BrevoConfigForm.gql.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,uCASnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,uCAShC,CAAC;AAEF,eAAO,MAAM,mCAAmC,uCAM/C,CAAC;AAEF,eAAO,MAAM,yBAAyB,uCASrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,uCASrC,CAAC;AAEF,eAAO,MAAM,kBAAkB,uCAQ9B,CAAC;AAEF,eAAO,MAAM,+BAA+B,uCAO3C,CAAC"}
1
+ {"version":3,"file":"BrevoConfigForm.gql.d.ts","sourceRoot":"","sources":["../../src/brevoConfiguration/BrevoConfigForm.gql.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,gCASnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,gCAShC,CAAC;AAEF,eAAO,MAAM,mCAAmC,gCAM/C,CAAC;AAEF,eAAO,MAAM,yBAAyB,gCASrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,gCASrC,CAAC;AAEF,eAAO,MAAM,kBAAkB,gCAQ9B,CAAC;AAEF,eAAO,MAAM,+BAA+B,gCAO3C,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
  Query: {
9
3
  BrevoConfigForm: 'BrevoConfigForm',
10
4
  BrevoConfigFormCheckForChanges: 'BrevoConfigFormCheckForChanges',
@@ -1,16 +1,10 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.updateBrevoConfigMutation = exports.sendersSelectQuery = exports.doubleOptInTemplatesSelectQuery = exports.createBrevoConfigMutation = exports.brevoConfigFormQuery = exports.brevoConfigFormFragment = exports.brevoConfigFormCheckForChangesQuery = void 0;
7
- var _client = require("@apollo/client");
8
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
9
2
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
10
- var brevoConfigFormFragment = exports.brevoConfigFormFragment = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment BrevoConfigForm on BrevoConfig {\n senderMail\n senderName\n doubleOptInTemplateId\n folderId\n allowedRedirectionUrl\n unsubscriptionPageId\n }\n"])));
11
- var brevoConfigFormQuery = exports.brevoConfigFormQuery = (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query BrevoConfigForm($scope: EmailCampaignContentScopeInput!) {\n brevoConfig(scope: $scope) {\n id\n updatedAt\n ...BrevoConfigForm\n }\n }\n ", "\n"])), brevoConfigFormFragment);
12
- var brevoConfigFormCheckForChangesQuery = exports.brevoConfigFormCheckForChangesQuery = (0, _client.gql)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n query BrevoConfigFormCheckForChanges($scope: EmailCampaignContentScopeInput!) {\n brevoConfig(scope: $scope) {\n updatedAt\n }\n }\n"])));
13
- var createBrevoConfigMutation = exports.createBrevoConfigMutation = (0, _client.gql)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation CreateBrevoConfig($scope: EmailCampaignContentScopeInput!, $input: BrevoConfigInput!) {\n createBrevoConfig(scope: $scope, input: $input) {\n id\n updatedAt\n ...BrevoConfigForm\n }\n }\n ", "\n"])), brevoConfigFormFragment);
14
- var updateBrevoConfigMutation = exports.updateBrevoConfigMutation = (0, _client.gql)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n mutation UpdateBrevoConfig($id: ID!, $input: BrevoConfigUpdateInput!, $lastUpdatedAt: DateTime) {\n updateBrevoConfig(id: $id, input: $input, lastUpdatedAt: $lastUpdatedAt) {\n id\n updatedAt\n ...BrevoConfigForm\n }\n }\n ", "\n"])), brevoConfigFormFragment);
15
- var sendersSelectQuery = exports.sendersSelectQuery = (0, _client.gql)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n query SendersSelect($scope: EmailCampaignContentScopeInput!) {\n brevoSenders(scope: $scope) {\n id\n name\n email\n }\n }\n"])));
16
- var doubleOptInTemplatesSelectQuery = exports.doubleOptInTemplatesSelectQuery = (0, _client.gql)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n query DoubleOptInTemplatesSelect($scope: EmailCampaignContentScopeInput!) {\n brevoDoubleOptInTemplates(scope: $scope) {\n id\n name\n }\n }\n"])));
3
+ import { gql } from "@apollo/client";
4
+ export var brevoConfigFormFragment = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment BrevoConfigForm on BrevoConfig {\n senderMail\n senderName\n doubleOptInTemplateId\n folderId\n allowedRedirectionUrl\n unsubscriptionPageId\n }\n"])));
5
+ export var brevoConfigFormQuery = gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query BrevoConfigForm($scope: EmailCampaignContentScopeInput!) {\n brevoConfig(scope: $scope) {\n id\n updatedAt\n ...BrevoConfigForm\n }\n }\n ", "\n"])), brevoConfigFormFragment);
6
+ export var brevoConfigFormCheckForChangesQuery = gql(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n query BrevoConfigFormCheckForChanges($scope: EmailCampaignContentScopeInput!) {\n brevoConfig(scope: $scope) {\n updatedAt\n }\n }\n"])));
7
+ export var createBrevoConfigMutation = gql(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation CreateBrevoConfig($scope: EmailCampaignContentScopeInput!, $input: BrevoConfigInput!) {\n createBrevoConfig(scope: $scope, input: $input) {\n id\n updatedAt\n ...BrevoConfigForm\n }\n }\n ", "\n"])), brevoConfigFormFragment);
8
+ export var updateBrevoConfigMutation = gql(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n mutation UpdateBrevoConfig($id: ID!, $input: BrevoConfigUpdateInput!, $lastUpdatedAt: DateTime) {\n updateBrevoConfig(id: $id, input: $input, lastUpdatedAt: $lastUpdatedAt) {\n id\n updatedAt\n ...BrevoConfigForm\n }\n }\n ", "\n"])), brevoConfigFormFragment);
9
+ export var sendersSelectQuery = gql(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n query SendersSelect($scope: EmailCampaignContentScopeInput!) {\n brevoSenders(scope: $scope) {\n id\n name\n email\n }\n }\n"])));
10
+ export var doubleOptInTemplatesSelectQuery = gql(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n query DoubleOptInTemplatesSelect($scope: EmailCampaignContentScopeInput!) {\n brevoDoubleOptInTemplates(scope: $scope) {\n id\n name\n }\n }\n"])));
@@ -1,40 +1,34 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BrevoConfigForm = BrevoConfigForm;
7
- var _client = require("@apollo/client");
8
- var _admin = require("@comet/admin");
9
- var _adminIcons = require("@comet/admin-icons");
10
- var _cmsAdmin = require("@comet/cms-admin");
11
- var _react = require("react");
12
- var _reactIntl = require("react-intl");
13
- var _BrevoConfigForm = require("./BrevoConfigForm.gql");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
1
  var _templateObject;
16
2
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
17
3
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
18
4
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
19
5
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
20
6
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
7
+ import { gql, useApolloClient, useQuery } from "@apollo/client";
8
+ import { Field, FillSpace, FinalForm, FinalFormAutocomplete, FinalFormSaveButton, Loading, MainContent, NumberField, TextField, Toolbar, ToolbarActions, ToolbarTitleItem, Tooltip, useFormApiRef, useStackSwitchApi } from "@comet/admin";
9
+ import { Info } from "@comet/admin-icons";
10
+ import { ContentScopeIndicator, resolveHasSaveConflict, useFormSaveConflict } from "@comet/cms-admin";
11
+ import { useMemo } from "react";
12
+ import { FormattedMessage } from "react-intl";
13
+ import { brevoConfigFormQuery, createBrevoConfigMutation, doubleOptInTemplatesSelectQuery, sendersSelectQuery, updateBrevoConfigMutation } from "./BrevoConfigForm.gql";
14
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
21
15
  function validateUrl(value) {
22
16
  var urlPattern = /^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(:\d{1,5})?(\/[^\s]*)?$/;
23
17
  if (!urlPattern.test(value)) {
24
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
18
+ return /*#__PURE__*/_jsx(FormattedMessage, {
25
19
  id: "cometBrevoModule.brevoConfig.allowedRedirectionUrl.validationError",
26
20
  defaultMessage: "Please enter a valid URL."
27
21
  });
28
22
  }
29
23
  return undefined;
30
24
  }
31
- function BrevoConfigForm(_ref) {
25
+ export function BrevoConfigForm(_ref) {
32
26
  var _data$brevoConfig, _sendersData$brevoSen, _sendersData$brevoSen2, _doubleOptInTemplates, _doubleOptInTemplates2, _data$brevoConfig8, _data$brevoConfig9, _data$brevoConfig0, _data$brevoConfig1, _data$brevoConfig10, _data$brevoConfig11, _ref3;
33
27
  var scope = _ref.scope;
34
- var client = (0, _client.useApolloClient)();
35
- var formApiRef = (0, _admin.useFormApiRef)();
36
- var stackSwitchApi = (0, _admin.useStackSwitchApi)();
37
- var _useQuery = (0, _client.useQuery)(_BrevoConfigForm.brevoConfigFormQuery, {
28
+ var client = useApolloClient();
29
+ var formApiRef = useFormApiRef();
30
+ var stackSwitchApi = useStackSwitchApi();
31
+ var _useQuery = useQuery(brevoConfigFormQuery, {
38
32
  variables: {
39
33
  scope: scope
40
34
  }
@@ -44,7 +38,7 @@ function BrevoConfigForm(_ref) {
44
38
  loading = _useQuery.loading,
45
39
  refetch = _useQuery.refetch;
46
40
  var mode = data !== null && data !== void 0 && (_data$brevoConfig = data.brevoConfig) !== null && _data$brevoConfig !== void 0 && _data$brevoConfig.id ? "edit" : "add";
47
- var _useQuery2 = (0, _client.useQuery)(_BrevoConfigForm.sendersSelectQuery, {
41
+ var _useQuery2 = useQuery(sendersSelectQuery, {
48
42
  variables: {
49
43
  scope: scope
50
44
  }
@@ -52,7 +46,7 @@ function BrevoConfigForm(_ref) {
52
46
  sendersData = _useQuery2.data,
53
47
  senderError = _useQuery2.error,
54
48
  senderLoading = _useQuery2.loading;
55
- var _useQuery3 = (0, _client.useQuery)(_BrevoConfigForm.doubleOptInTemplatesSelectQuery, {
49
+ var _useQuery3 = useQuery(doubleOptInTemplatesSelectQuery, {
56
50
  variables: {
57
51
  scope: scope
58
52
  }
@@ -72,7 +66,7 @@ function BrevoConfigForm(_ref) {
72
66
  label: "".concat(doubleOptInTemplate.id, ": ").concat(doubleOptInTemplate.name)
73
67
  };
74
68
  })) !== null && _doubleOptInTemplates !== void 0 ? _doubleOptInTemplates : [];
75
- var initialValues = (0, _react.useMemo)(function () {
69
+ var initialValues = useMemo(function () {
76
70
  var _sendersData$brevoSen3, _doubleOptInTemplates3, _data$brevoConfig$all, _data$brevoConfig5, _data$brevoConfig$fol, _data$brevoConfig6, _data$brevoConfig$uns, _data$brevoConfig7;
77
71
  var sender = sendersData === null || sendersData === void 0 || (_sendersData$brevoSen3 = sendersData.brevoSenders) === null || _sendersData$brevoSen3 === void 0 ? void 0 : _sendersData$brevoSen3.find(function (s) {
78
72
  var _data$brevoConfig2, _data$brevoConfig3;
@@ -96,7 +90,7 @@ function BrevoConfigForm(_ref) {
96
90
  unsubscriptionPageId: (_data$brevoConfig$uns = data === null || data === void 0 || (_data$brevoConfig7 = data.brevoConfig) === null || _data$brevoConfig7 === void 0 ? void 0 : _data$brevoConfig7.unsubscriptionPageId) !== null && _data$brevoConfig$uns !== void 0 ? _data$brevoConfig$uns : ""
97
91
  };
98
92
  }, [sendersData === null || sendersData === void 0 ? void 0 : sendersData.brevoSenders, doubleOptInTemplatesData === null || doubleOptInTemplatesData === void 0 ? void 0 : doubleOptInTemplatesData.brevoDoubleOptInTemplates, data === null || data === void 0 || (_data$brevoConfig8 = data.brevoConfig) === null || _data$brevoConfig8 === void 0 ? void 0 : _data$brevoConfig8.allowedRedirectionUrl, data === null || data === void 0 || (_data$brevoConfig9 = data.brevoConfig) === null || _data$brevoConfig9 === void 0 ? void 0 : _data$brevoConfig9.folderId, data === null || data === void 0 || (_data$brevoConfig0 = data.brevoConfig) === null || _data$brevoConfig0 === void 0 ? void 0 : _data$brevoConfig0.unsubscriptionPageId, data === null || data === void 0 || (_data$brevoConfig1 = data.brevoConfig) === null || _data$brevoConfig1 === void 0 ? void 0 : _data$brevoConfig1.senderMail, data === null || data === void 0 || (_data$brevoConfig10 = data.brevoConfig) === null || _data$brevoConfig10 === void 0 ? void 0 : _data$brevoConfig10.senderName, data === null || data === void 0 || (_data$brevoConfig11 = data.brevoConfig) === null || _data$brevoConfig11 === void 0 ? void 0 : _data$brevoConfig11.doubleOptInTemplateId]);
99
- var saveConflict = (0, _cmsAdmin.useFormSaveConflict)({
93
+ var saveConflict = useFormSaveConflict({
100
94
  checkConflict: function () {
101
95
  var _checkConflict = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
102
96
  var _data$brevoConfig12;
@@ -104,7 +98,7 @@ function BrevoConfigForm(_ref) {
104
98
  return _regenerator().w(function (_context) {
105
99
  while (1) switch (_context.n) {
106
100
  case 0:
107
- query = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query ($scope: EmailCampaignContentScopeInput!) {\n brevoConfig(scope: $scope) {\n updatedAt\n }\n }\n "])));
101
+ query = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query ($scope: EmailCampaignContentScopeInput!) {\n brevoConfig(scope: $scope) {\n updatedAt\n }\n }\n "])));
108
102
  _context.n = 1;
109
103
  return client.query({
110
104
  query: query,
@@ -116,7 +110,7 @@ function BrevoConfigForm(_ref) {
116
110
  case 1:
117
111
  _yield$client$query = _context.v;
118
112
  data = _yield$client$query.data;
119
- return _context.a(2, (0, _cmsAdmin.resolveHasSaveConflict)(data === null || data === void 0 || (_data$brevoConfig12 = data.brevoConfig) === null || _data$brevoConfig12 === void 0 ? void 0 : _data$brevoConfig12.updatedAt, data.updatedAt));
113
+ return _context.a(2, resolveHasSaveConflict(data === null || data === void 0 || (_data$brevoConfig12 = data.brevoConfig) === null || _data$brevoConfig12 === void 0 ? void 0 : _data$brevoConfig12.updatedAt, data.updatedAt));
120
114
  }
121
115
  }, _callee);
122
116
  }));
@@ -189,7 +183,7 @@ function BrevoConfigForm(_ref) {
189
183
  case 4:
190
184
  _context3.n = 5;
191
185
  return client.mutate({
192
- mutation: _BrevoConfigForm.updateBrevoConfigMutation,
186
+ mutation: updateBrevoConfigMutation,
193
187
  variables: {
194
188
  id: data === null || data === void 0 || (_data$brevoConfig14 = data.brevoConfig) === null || _data$brevoConfig14 === void 0 ? void 0 : _data$brevoConfig14.id,
195
189
  input: output,
@@ -202,7 +196,7 @@ function BrevoConfigForm(_ref) {
202
196
  case 6:
203
197
  _context3.n = 7;
204
198
  return client.mutate({
205
- mutation: _BrevoConfigForm.createBrevoConfigMutation,
199
+ mutation: createBrevoConfigMutation,
206
200
  variables: {
207
201
  scope: scope,
208
202
  input: output
@@ -230,43 +224,43 @@ function BrevoConfigForm(_ref) {
230
224
  }();
231
225
  if (error || senderError || doubleOptInTemplatesError) throw (_ref3 = error !== null && error !== void 0 ? error : senderError) !== null && _ref3 !== void 0 ? _ref3 : doubleOptInTemplatesError;
232
226
  if (loading || senderLoading || doubleOptInTemplatesLoading) {
233
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Loading, {
227
+ return /*#__PURE__*/_jsx(Loading, {
234
228
  behavior: "fillPageHeight"
235
229
  });
236
230
  }
237
231
  var validateUnsubscriptionPageId = function validateUnsubscriptionPageId(value) {
238
232
  var validUnsubscriptionPageId = /^[a-zA-Z0-9]{24}$/;
239
233
  if (!validUnsubscriptionPageId.test(value)) {
240
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
234
+ return /*#__PURE__*/_jsx(FormattedMessage, {
241
235
  id: "cometBrevoModule.brevoConfig.unsubscriptionPageId.validation",
242
236
  defaultMessage: "Must be a 24-digit alphanumeric ID"
243
237
  });
244
238
  }
245
239
  return undefined;
246
240
  };
247
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FinalForm, {
241
+ return /*#__PURE__*/_jsx(FinalForm, {
248
242
  apiRef: formApiRef,
249
243
  onSubmit: handleSubmit,
250
244
  mode: mode,
251
245
  initialValues: initialValues,
252
246
  children: function children(_ref4) {
253
247
  var values = _ref4.values;
254
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
255
- children: [saveConflict.dialogs, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.Toolbar, {
256
- scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_cmsAdmin.ContentScopeIndicator, {}),
257
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarTitleItem, {
258
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
248
+ return /*#__PURE__*/_jsxs(_Fragment, {
249
+ children: [saveConflict.dialogs, /*#__PURE__*/_jsxs(Toolbar, {
250
+ scopeIndicator: /*#__PURE__*/_jsx(ContentScopeIndicator, {}),
251
+ children: [/*#__PURE__*/_jsx(ToolbarTitleItem, {
252
+ children: /*#__PURE__*/_jsx(FormattedMessage, {
259
253
  id: "cometBrevoModule.brevoConfig.title",
260
254
  defaultMessage: "Brevo config"
261
255
  })
262
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FillSpace, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarActions, {
263
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FinalFormSaveButton, {
256
+ }), /*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(ToolbarActions, {
257
+ children: /*#__PURE__*/_jsx(FinalFormSaveButton, {
264
258
  hasConflict: saveConflict.hasConflict
265
259
  })
266
260
  })]
267
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.MainContent, {
268
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
269
- component: _admin.FinalFormAutocomplete,
261
+ }), /*#__PURE__*/_jsxs(MainContent, {
262
+ children: [/*#__PURE__*/_jsx(Field, {
263
+ component: FinalFormAutocomplete,
270
264
  getOptionLabel: function getOptionLabel(option) {
271
265
  return option.label;
272
266
  },
@@ -275,14 +269,14 @@ function BrevoConfigForm(_ref) {
275
269
  },
276
270
  options: senderOptions,
277
271
  name: "sender",
278
- label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
272
+ label: /*#__PURE__*/_jsx(FormattedMessage, {
279
273
  id: "cometBrevoModule.brevoConfig.sender",
280
274
  defaultMessage: "Sender"
281
275
  }),
282
276
  fullWidth: true,
283
277
  required: true
284
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
285
- component: _admin.FinalFormAutocomplete,
278
+ }), /*#__PURE__*/_jsx(Field, {
279
+ component: FinalFormAutocomplete,
286
280
  getOptionLabel: function getOptionLabel(option) {
287
281
  return option.label;
288
282
  },
@@ -291,57 +285,57 @@ function BrevoConfigForm(_ref) {
291
285
  },
292
286
  options: doubleOptInTemplateOptions,
293
287
  name: "doubleOptInTemplate",
294
- label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
288
+ label: /*#__PURE__*/_jsx(FormattedMessage, {
295
289
  id: "cometBrevoModule.brevoConfig.doubleOptInTemplate",
296
290
  defaultMessage: "Double Opt-in template id"
297
291
  }),
298
292
  fullWidth: true,
299
293
  required: true
300
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.NumberField, {
294
+ }), /*#__PURE__*/_jsx(NumberField, {
301
295
  name: "folderId",
302
296
  defaultValue: 1,
303
- label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
304
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
297
+ label: /*#__PURE__*/_jsxs(_Fragment, {
298
+ children: [/*#__PURE__*/_jsx(FormattedMessage, {
305
299
  id: "cometBrevoModule.brevoConfig.folderId",
306
300
  defaultMessage: "Folder ID"
307
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Tooltip, {
308
- title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
301
+ }), /*#__PURE__*/_jsx(Tooltip, {
302
+ title: /*#__PURE__*/_jsx(FormattedMessage, {
309
303
  id: "cometBrevoModule.brevoConfig.folderId.info",
310
304
  defaultMessage: "By default, the folder ID should be set to 1 unless you have specifically configured another folder in Brevo."
311
305
  }),
312
306
  sx: {
313
307
  marginLeft: "5px"
314
308
  },
315
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Info, {})
309
+ children: /*#__PURE__*/_jsx(Info, {})
316
310
  })]
317
311
  }),
318
312
  fullWidth: true,
319
313
  required: true
320
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.TextField, {
314
+ }), /*#__PURE__*/_jsx(TextField, {
321
315
  required: true,
322
316
  fullWidth: true,
323
317
  name: "allowedRedirectionUrl",
324
- label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
325
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
318
+ label: /*#__PURE__*/_jsxs(_Fragment, {
319
+ children: [/*#__PURE__*/_jsx(FormattedMessage, {
326
320
  id: "cometBrevoModule.brevoConfig.allowedRedirectionUrl",
327
321
  defaultMessage: "Allowed redirection URL"
328
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Tooltip, {
329
- title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
322
+ }), /*#__PURE__*/_jsx(Tooltip, {
323
+ title: /*#__PURE__*/_jsx(FormattedMessage, {
330
324
  id: "cometBrevoModule.brevoConfig.allowedRedirectionUrl.info",
331
325
  defaultMessage: "Defines the schema of a valid redirection URL that is set when creating or importing contacts."
332
326
  }),
333
327
  sx: {
334
328
  marginLeft: "5px"
335
329
  },
336
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Info, {})
330
+ children: /*#__PURE__*/_jsx(Info, {})
337
331
  })]
338
332
  }),
339
333
  validate: validateUrl
340
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.TextField, {
334
+ }), /*#__PURE__*/_jsx(TextField, {
341
335
  fullWidth: true,
342
336
  name: "unsubscriptionPageId",
343
337
  required: true,
344
- label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
338
+ label: /*#__PURE__*/_jsx(FormattedMessage, {
345
339
  id: "cometBrevoModule.brevoConfig.unsubscriptionPageId",
346
340
  defaultMessage: "Unsubscription Page ID"
347
341
  }),
@@ -1,2 +1,3 @@
1
+ import type { JSX } from "react";
1
2
  export declare function BrevoConfigPage(): JSX.Element;
2
3
  //# sourceMappingURL=BrevoConfigPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrevoConfigPage.d.ts","sourceRoot":"","sources":["../../src/brevoConfiguration/BrevoConfigPage.tsx"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,IAAI,GAAG,CAAC,OAAO,CAa7C"}
1
+ {"version":3,"file":"BrevoConfigPage.d.ts","sourceRoot":"","sources":["../../src/brevoConfiguration/BrevoConfigPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjC,wBAAgB,eAAe,IAAI,GAAG,CAAC,OAAO,CAa7C"}
@@ -1,23 +1,17 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BrevoConfigPage = BrevoConfigPage;
7
- var _cmsAdmin = require("@comet/cms-admin");
8
- var _BrevoConfigProvider = require("../common/BrevoConfigProvider");
9
- var _BrevoConfigForm = require("./BrevoConfigForm");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function BrevoConfigPage() {
12
- var _useBrevoConfig = (0, _BrevoConfigProvider.useBrevoConfig)(),
1
+ import { useContentScope } from "@comet/cms-admin";
2
+ import { useBrevoConfig } from "../common/BrevoConfigProvider";
3
+ import { BrevoConfigForm } from "./BrevoConfigForm";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ export function BrevoConfigPage() {
6
+ var _useBrevoConfig = useBrevoConfig(),
13
7
  scopeParts = _useBrevoConfig.scopeParts;
14
- var _useContentScope = (0, _cmsAdmin.useContentScope)(),
8
+ var _useContentScope = useContentScope(),
15
9
  completeScope = _useContentScope.scope;
16
10
  var scope = scopeParts.reduce(function (acc, scopePart) {
17
11
  acc[scopePart] = completeScope[scopePart];
18
12
  return acc;
19
13
  }, {});
20
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BrevoConfigForm.BrevoConfigForm, {
14
+ return /*#__PURE__*/_jsx(BrevoConfigForm, {
21
15
  scope: scope
22
16
  });
23
17
  }
@@ -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
  Query: {
9
3
  BrevoContactsGrid: 'BrevoContactsGrid'
10
4
  },