@comet/brevo-admin 1.0.0 → 1.0.1-canary-20240125091018

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.
@@ -0,0 +1,6 @@
1
+ import { ContentScopeInterface } from "@comet/cms-admin";
2
+ import * as React from "react";
3
+ export declare function BrevoContactsGrid({ scope }: {
4
+ scope: ContentScopeInterface;
5
+ }): React.ReactElement;
6
+ //# sourceMappingURL=BrevoContactsGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrevoContactsGrid.d.ts","sourceRoot":"","sources":["../../src/brevoContacts/BrevoContactsGrid.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkE/B,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,qBAAqB,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAsHjG"}
@@ -0,0 +1,63 @@
1
+ import * as Types from '../graphql.generated';
2
+ export declare const namedOperations: {
3
+ Query: {
4
+ BrevoContactsGrid: string;
5
+ };
6
+ Mutation: {
7
+ DeleteBrevoContact: string;
8
+ UpdateBrevoContact: string;
9
+ };
10
+ Fragment: {
11
+ BrevoContactsList: string;
12
+ };
13
+ };
14
+ export type GQLBrevoContactsListFragment = {
15
+ __typename?: 'BrevoContact';
16
+ id: number;
17
+ createdAt: string;
18
+ modifiedAt: string;
19
+ email: string;
20
+ emailBlacklisted: boolean;
21
+ smsBlacklisted: boolean;
22
+ };
23
+ export type GQLBrevoContactsGridQueryVariables = Types.Exact<{
24
+ offset?: Types.InputMaybe<Types.Scalars['Int']>;
25
+ limit?: Types.InputMaybe<Types.Scalars['Int']>;
26
+ email?: Types.InputMaybe<Types.Scalars['String']>;
27
+ scope: Types.GQLEmailCampaignContentScopeInput;
28
+ }>;
29
+ export type GQLBrevoContactsGridQuery = {
30
+ __typename?: 'Query';
31
+ brevoContacts: {
32
+ __typename?: 'PaginatedBrevoContacts';
33
+ totalCount: number;
34
+ nodes: Array<{
35
+ __typename?: 'BrevoContact';
36
+ id: number;
37
+ createdAt: string;
38
+ modifiedAt: string;
39
+ email: string;
40
+ emailBlacklisted: boolean;
41
+ smsBlacklisted: boolean;
42
+ }>;
43
+ };
44
+ };
45
+ export type GQLDeleteBrevoContactMutationVariables = Types.Exact<{
46
+ id: Types.Scalars['Int'];
47
+ }>;
48
+ export type GQLDeleteBrevoContactMutation = {
49
+ __typename?: 'Mutation';
50
+ deleteBrevoContact: boolean;
51
+ };
52
+ export type GQLUpdateBrevoContactMutationVariables = Types.Exact<{
53
+ id: Types.Scalars['Int'];
54
+ input: Types.GQLBrevoContactUpdateInput;
55
+ }>;
56
+ export type GQLUpdateBrevoContactMutation = {
57
+ __typename?: 'Mutation';
58
+ updateBrevoContact: {
59
+ __typename?: 'BrevoContact';
60
+ id: number;
61
+ };
62
+ };
63
+ //# sourceMappingURL=BrevoContactsGrid.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrevoContactsGrid.generated.d.ts","sourceRoot":"","sources":["../../src/brevoContacts/BrevoContactsGrid.generated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAE9C,eAAO,MAAM,eAAe;;;;;;;;;;;CAW3B,CAAA;AACD,MAAM,MAAM,4BAA4B,GAAG;IAAE,UAAU,CAAC,EAAE,cAAc,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjM,MAAM,MAAM,kCAAkC,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3D,MAAM,CAAC,EAAE,KAAK,C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;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,kBAAkB,EAAE;QAAE,UAAU,CAAC,EAAE,cAAc,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.namedOperations = void 0;
7
+ var namedOperations = exports.namedOperations = {
8
+ Query: {
9
+ BrevoContactsGrid: 'BrevoContactsGrid'
10
+ },
11
+ Mutation: {
12
+ DeleteBrevoContact: 'DeleteBrevoContact',
13
+ UpdateBrevoContact: 'UpdateBrevoContact'
14
+ },
15
+ Fragment: {
16
+ BrevoContactsList: 'BrevoContactsList'
17
+ }
18
+ };
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+
3
+ 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.BrevoContactsGrid = BrevoContactsGrid;
8
+ var _client = require("@apollo/client");
9
+ var _admin = require("@comet/admin");
10
+ var _adminIcons = require("@comet/admin-icons");
11
+ var _xDataGrid = require("@mui/x-data-grid");
12
+ var React = _interopRequireWildcard(require("react"));
13
+ var _reactIntl = require("react-intl");
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
17
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
19
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
20
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
21
+ 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; }
22
+ 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; }
23
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
25
+ 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); }
26
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
27
+ var brevoContactsFragment = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment BrevoContactsList on BrevoContact {\n id\n createdAt\n modifiedAt\n email\n emailBlacklisted\n smsBlacklisted\n }\n"])));
28
+ var brevoContactsQuery = (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query BrevoContactsGrid($offset: Int, $limit: Int, $email: String, $scope: EmailCampaignContentScopeInput!) {\n brevoContacts(offset: $offset, limit: $limit, email: $email, scope: $scope) {\n nodes {\n ...BrevoContactsList\n }\n totalCount\n }\n }\n ", "\n"])), brevoContactsFragment);
29
+ var deleteBrevoContactMutation = (0, _client.gql)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n mutation DeleteBrevoContact($id: Int!) {\n deleteBrevoContact(id: $id)\n }\n"])));
30
+ var updateBrevoContactMutation = (0, _client.gql)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation UpdateBrevoContact($id: Int!, $input: BrevoContactUpdateInput!) {\n updateBrevoContact(id: $id, input: $input) {\n id\n }\n }\n"])));
31
+ function BrevoContactsGridToolbar(_ref) {
32
+ var intl = _ref.intl;
33
+ return /*#__PURE__*/React.createElement(_admin.Toolbar, null, /*#__PURE__*/React.createElement(_admin.ToolbarTitleItem, null, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, {
34
+ id: "cometBrevoModule.brevoContact.title",
35
+ defaultMessage: "Contacts"
36
+ })), /*#__PURE__*/React.createElement(_admin.ToolbarItem, null, /*#__PURE__*/React.createElement(_xDataGrid.GridToolbarQuickFilter, {
37
+ placeholder: intl.formatMessage({
38
+ id: "cometBrevoModule.brevoContact.searchEmail",
39
+ defaultMessage: "Search email address"
40
+ })
41
+ })), /*#__PURE__*/React.createElement(_admin.ToolbarFillSpace, null));
42
+ }
43
+ function BrevoContactsGrid(_ref2) {
44
+ var _dataGridProps$filter, _dataGridProps$filter2, _data$brevoContacts$n;
45
+ var scope = _ref2.scope;
46
+ var client = (0, _client.useApolloClient)();
47
+ var intl = (0, _reactIntl.useIntl)();
48
+ var dataGridProps = _objectSpread(_objectSpread({}, (0, _admin.useDataGridRemote)()), (0, _admin.usePersistentColumnState)("BrevoContactsGrid"));
49
+ var columns = [{
50
+ field: "createdAt",
51
+ headerName: intl.formatMessage({
52
+ id: "cometBrevoModule.brevoContact.subscribedAt",
53
+ defaultMessage: "Subscribed At"
54
+ }),
55
+ filterable: false,
56
+ sortable: false,
57
+ width: 150,
58
+ renderCell: function renderCell(_ref3) {
59
+ var row = _ref3.row;
60
+ return intl.formatDate(new Date(row.createdAt));
61
+ }
62
+ }, {
63
+ field: "modifiedAt",
64
+ headerName: intl.formatMessage({
65
+ id: "cometBrevoModule.brevoContact.modifiedAt",
66
+ defaultMessage: "Modified At"
67
+ }),
68
+ filterable: false,
69
+ sortable: false,
70
+ width: 150,
71
+ renderCell: function renderCell(_ref4) {
72
+ var row = _ref4.row;
73
+ return intl.formatDate(new Date(row.modifiedAt));
74
+ }
75
+ }, {
76
+ field: "email",
77
+ headerName: intl.formatMessage({
78
+ id: "cometBrevoModule.brevoContact.email",
79
+ defaultMessage: "Email"
80
+ }),
81
+ filterable: false,
82
+ sortable: false,
83
+ width: 150,
84
+ flex: 1
85
+ }, {
86
+ field: "emailBlacklisted",
87
+ headerName: intl.formatMessage({
88
+ id: "cometBrevoModule.brevoContact.emailBlocked",
89
+ defaultMessage: "Email blocked"
90
+ }),
91
+ type: "boolean",
92
+ filterable: false,
93
+ sortable: false,
94
+ width: 150
95
+ },
96
+ // TODO: add configurable contact attributes
97
+ {
98
+ field: "actions",
99
+ headerName: "",
100
+ sortable: false,
101
+ filterable: false,
102
+ type: "actions",
103
+ renderCell: function renderCell(params) {
104
+ return /*#__PURE__*/React.createElement(_admin.RowActionsMenu, null, /*#__PURE__*/React.createElement(_admin.RowActionsMenu, null, /*#__PURE__*/React.createElement(_admin.RowActionsItem, {
105
+ onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
106
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
107
+ while (1) switch (_context.prev = _context.next) {
108
+ case 0:
109
+ _context.next = 2;
110
+ return client.mutate({
111
+ mutation: updateBrevoContactMutation,
112
+ variables: {
113
+ id: params.row.id,
114
+ input: {
115
+ blocked: !params.row.emailBlacklisted
116
+ }
117
+ },
118
+ refetchQueries: [brevoContactsQuery]
119
+ });
120
+ case 2:
121
+ case "end":
122
+ return _context.stop();
123
+ }
124
+ }, _callee);
125
+ })),
126
+ icon: params.row.emailBlacklisted ? /*#__PURE__*/React.createElement(_adminIcons.Check, null) : /*#__PURE__*/React.createElement(_adminIcons.Block, null)
127
+ }, params.row.emailBlacklisted ? /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, {
128
+ id: "cometBrevoModule.brevoContact.actions.unblock",
129
+ defaultMessage: "Unblock"
130
+ }) : /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, {
131
+ id: "cometBrevoModule.brevoContact.actions.block",
132
+ defaultMessage: "Block"
133
+ })), /*#__PURE__*/React.createElement(_admin.RowActionsItem, {
134
+ onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
135
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
136
+ while (1) switch (_context2.prev = _context2.next) {
137
+ case 0:
138
+ _context2.next = 2;
139
+ return client.mutate({
140
+ mutation: deleteBrevoContactMutation,
141
+ variables: {
142
+ id: params.row.id
143
+ },
144
+ refetchQueries: [brevoContactsQuery]
145
+ });
146
+ case 2:
147
+ case "end":
148
+ return _context2.stop();
149
+ }
150
+ }, _callee2);
151
+ })),
152
+ icon: /*#__PURE__*/React.createElement(_adminIcons.Delete, null)
153
+ }, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _admin.messages["delete"]))));
154
+ }
155
+ }];
156
+ var _useQuery = (0, _client.useQuery)(brevoContactsQuery, {
157
+ variables: {
158
+ offset: dataGridProps.page * dataGridProps.pageSize,
159
+ limit: dataGridProps.pageSize,
160
+ email: (_dataGridProps$filter = dataGridProps.filterModel) !== null && _dataGridProps$filter !== void 0 && _dataGridProps$filter.quickFilterValues ? (_dataGridProps$filter2 = dataGridProps.filterModel) === null || _dataGridProps$filter2 === void 0 ? void 0 : _dataGridProps$filter2.quickFilterValues[0] : undefined,
161
+ scope: scope
162
+ }
163
+ }),
164
+ data = _useQuery.data,
165
+ loading = _useQuery.loading,
166
+ error = _useQuery.error;
167
+ var rowCount = (0, _admin.useBufferedRowCount)(data === null || data === void 0 ? void 0 : data.brevoContacts.totalCount);
168
+ if (error) throw error;
169
+ var rows = (_data$brevoContacts$n = data === null || data === void 0 ? void 0 : data.brevoContacts.nodes) !== null && _data$brevoContacts$n !== void 0 ? _data$brevoContacts$n : [];
170
+ return /*#__PURE__*/React.createElement(_admin.MainContent, {
171
+ fullHeight: true
172
+ }, /*#__PURE__*/React.createElement(_xDataGrid.DataGrid, _extends({}, dataGridProps, {
173
+ disableSelectionOnClick: true,
174
+ rows: rows,
175
+ rowCount: rowCount,
176
+ columns: columns,
177
+ loading: loading,
178
+ components: {
179
+ Toolbar: BrevoContactsGridToolbar
180
+ },
181
+ componentsProps: {
182
+ toolbar: {
183
+ intl: intl
184
+ }
185
+ }
186
+ })));
187
+ }
@@ -1,3 +1,7 @@
1
1
  /// <reference types="react" />
2
- export declare const BrevoContactsPage: () => JSX.Element;
2
+ interface CreateContactsPageOptions {
3
+ scopeParts: string[];
4
+ }
5
+ declare function createBrevoContactsPage({ scopeParts }: CreateContactsPageOptions): () => JSX.Element;
6
+ export { createBrevoContactsPage };
3
7
  //# sourceMappingURL=BrevoContactsPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrevoContactsPage.d.ts","sourceRoot":"","sources":["../../src/brevoContacts/BrevoContactsPage.tsx"],"names":[],"mappings":";AAEA,eAAO,MAAM,iBAAiB,QAAO,WAOpC,CAAC"}
1
+ {"version":3,"file":"BrevoContactsPage.d.ts","sourceRoot":"","sources":["../../src/brevoContacts/BrevoContactsPage.tsx"],"names":[],"mappings":";AAKA,UAAU,yBAAyB;IAC/B,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,iBAAS,uBAAuB,CAAC,EAAE,UAAU,EAAE,EAAE,yBAAyB,SACxC,WAAW,CAY5C;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -4,10 +4,24 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.BrevoContactsPage = void 0;
7
+ exports.createBrevoContactsPage = createBrevoContactsPage;
8
+ var _cmsAdmin = require("@comet/cms-admin");
8
9
  var React = _interopRequireWildcard(require("react"));
10
+ var _BrevoContactsGrid = require("./BrevoContactsGrid");
9
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
10
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
11
- var BrevoContactsPage = exports.BrevoContactsPage = function BrevoContactsPage() {
12
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h1", null, "Brevo Contacts"));
13
- };
13
+ function createBrevoContactsPage(_ref) {
14
+ var scopeParts = _ref.scopeParts;
15
+ function BrevoContactsPage() {
16
+ var _useContentScope = (0, _cmsAdmin.useContentScope)(),
17
+ completeScope = _useContentScope.scope;
18
+ var scope = scopeParts.reduce(function (acc, scopePart) {
19
+ acc[scopePart] = completeScope[scopePart];
20
+ return acc;
21
+ }, {});
22
+ return /*#__PURE__*/React.createElement(_BrevoContactsGrid.BrevoContactsGrid, {
23
+ scope: scope
24
+ });
25
+ }
26
+ return BrevoContactsPage;
27
+ }
@@ -0,0 +1,100 @@
1
+ export type Maybe<T> = T | null;
2
+ export type InputMaybe<T> = Maybe<T>;
3
+ export type Exact<T extends {
4
+ [key: string]: unknown;
5
+ }> = {
6
+ [K in keyof T]: T[K];
7
+ };
8
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
9
+ [SubKey in K]?: Maybe<T[SubKey]>;
10
+ };
11
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
+ [SubKey in K]: Maybe<T[SubKey]>;
13
+ };
14
+ /** All built-in and custom scalars, mapped to their actual values */
15
+ export type Scalars = {
16
+ ID: string;
17
+ String: string;
18
+ Boolean: boolean;
19
+ Int: number;
20
+ Float: number;
21
+ };
22
+ export type GQLBrevoContact = {
23
+ __typename?: 'BrevoContact';
24
+ createdAt: Scalars['String'];
25
+ email: Scalars['String'];
26
+ emailBlacklisted: Scalars['Boolean'];
27
+ id: Scalars['Int'];
28
+ listIds: Array<Scalars['Int']>;
29
+ listUnsubscribed: Array<Scalars['Int']>;
30
+ modifiedAt: Scalars['String'];
31
+ smsBlacklisted: Scalars['Boolean'];
32
+ };
33
+ export type GQLBrevoContactUpdateInput = {
34
+ blocked: Scalars['Boolean'];
35
+ };
36
+ export type GQLDependency = {
37
+ __typename?: 'Dependency';
38
+ jsonPath: Scalars['String'];
39
+ rootColumnName: Scalars['String'];
40
+ rootGraphqlObjectType: Scalars['String'];
41
+ rootId: Scalars['String'];
42
+ targetGraphqlObjectType: Scalars['String'];
43
+ targetId: Scalars['String'];
44
+ visible: Scalars['Boolean'];
45
+ };
46
+ export type GQLEmailCampaignContentScopeInput = {
47
+ thisScopeHasNoFields____?: InputMaybe<Scalars['String']>;
48
+ };
49
+ export type GQLFocalPoint = 'CENTER' | 'NORTHEAST' | 'NORTHWEST' | 'SMART' | 'SOUTHEAST' | 'SOUTHWEST';
50
+ export type GQLImageCropArea = {
51
+ __typename?: 'ImageCropArea';
52
+ focalPoint: GQLFocalPoint;
53
+ height: Maybe<Scalars['Float']>;
54
+ width: Maybe<Scalars['Float']>;
55
+ x: Maybe<Scalars['Float']>;
56
+ y: Maybe<Scalars['Float']>;
57
+ };
58
+ export type GQLMutation = {
59
+ __typename?: 'Mutation';
60
+ deleteBrevoContact: Scalars['Boolean'];
61
+ subscribeBrevoContact: GQLSubscribeResponse;
62
+ updateBrevoContact: GQLBrevoContact;
63
+ };
64
+ export type GQLMutationdeleteBrevoContactArgs = {
65
+ id: Scalars['Int'];
66
+ };
67
+ export type GQLMutationsubscribeBrevoContactArgs = {
68
+ input: GQLSubscribeInput;
69
+ };
70
+ export type GQLMutationupdateBrevoContactArgs = {
71
+ id: Scalars['Int'];
72
+ input: GQLBrevoContactUpdateInput;
73
+ };
74
+ export type GQLPaginatedBrevoContacts = {
75
+ __typename?: 'PaginatedBrevoContacts';
76
+ nodes: Array<GQLBrevoContact>;
77
+ totalCount: Scalars['Int'];
78
+ };
79
+ export type GQLQuery = {
80
+ __typename?: 'Query';
81
+ brevoContact: GQLBrevoContact;
82
+ brevoContacts: GQLPaginatedBrevoContacts;
83
+ };
84
+ export type GQLQuerybrevoContactArgs = {
85
+ id: Scalars['Int'];
86
+ };
87
+ export type GQLQuerybrevoContactsArgs = {
88
+ email?: InputMaybe<Scalars['String']>;
89
+ limit?: Scalars['Int'];
90
+ offset?: Scalars['Int'];
91
+ scope: GQLEmailCampaignContentScopeInput;
92
+ targetGroupId?: InputMaybe<Scalars['ID']>;
93
+ };
94
+ export type GQLSubscribeInput = {
95
+ email: Scalars['String'];
96
+ redirectionUrl: Scalars['String'];
97
+ scope: GQLEmailCampaignContentScopeInput;
98
+ };
99
+ export type GQLSubscribeResponse = 'ERROR_CONTAINED_IN_ECG_RTR_LIST' | 'ERROR_UNKNOWN' | 'SUCCESSFUL';
100
+ //# sourceMappingURL=graphql.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.generated.d.ts","sourceRoot":"","sources":["../src/graphql.generated.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAChC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AACrC,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AACnF,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;KAAG,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;CAAE,CAAC;AACnG,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;KAAG,MAAM,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM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KAAK,CAAC,eAAe,CAAC,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,eAAe,CAAC;IAC9B,aAAa,EAAE,yBAAyB,CAAC;CAC1C,CAAC;AAGF,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACpB,CAAC;AAGF,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,KAAK,EAAE,iCAAiC,CAAC;IACzC,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,KAAK,EAAE,iCAAiC,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,iCAAiC,GACjC,eAAe,GACf,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { BrevoContactsPage } from "./brevoContacts/BrevoContactsPage";
1
+ export { createBrevoContactsPage } from "./brevoContacts/BrevoContactsPage";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC"}
package/lib/index.js CHANGED
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "BrevoContactsPage", {
6
+ Object.defineProperty(exports, "createBrevoContactsPage", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _BrevoContactsPage.BrevoContactsPage;
9
+ return _BrevoContactsPage.createBrevoContactsPage;
10
10
  }
11
11
  });
12
12
  var _BrevoContactsPage = require("./brevoContacts/BrevoContactsPage");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/brevo-admin",
3
- "version": "1.0.0",
3
+ "version": "1.0.1-canary-20240125091018",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/vivid-planet/comet-brevo-module/",
@@ -12,40 +12,85 @@
12
12
  "files": [
13
13
  "lib"
14
14
  ],
15
- "peerDependencies": {
16
- "react": "^17.0",
17
- "react-dom": "^17.0",
18
- "react-intl": "^5.24.6"
19
- },
20
15
  "dependencies": {},
21
16
  "devDependencies": {
17
+ "@apollo/client": "^3.2.5",
22
18
  "@babel/cli": "^7.17.6",
23
19
  "@babel/core": "^7.20.12",
20
+ "@comet/admin": "^5.3.0",
24
21
  "@comet/admin-babel-preset": "^5.3.0",
22
+ "@comet/admin-icons": "^5.3.0",
23
+ "@comet/cms-admin": "^5.3.0",
25
24
  "@comet/eslint-config": "^5.3.0",
25
+ "@emotion/react": "^11.9.3",
26
+ "@emotion/styled": "^11.9.3",
27
+ "@graphql-codegen/cli": "^2.0.0",
28
+ "@mui/icons-material": "^5.8.4",
29
+ "@mui/material": "^5.8.6",
30
+ "@mui/styles": "^5.8.6",
31
+ "@mui/system": "^5.8.6",
32
+ "@mui/x-data-grid": "^5.17.26",
26
33
  "@types/react": "^17.0",
27
34
  "@types/react-dom": "^17.0.0",
35
+ "axios": "^0.21.0",
36
+ "draft-js": "^0.11.0",
28
37
  "eslint": "^8.0.0",
38
+ "final-form": "^4.16.1",
39
+ "graphql": "^15.4.0",
40
+ "history": "^4.10.0",
29
41
  "prettier": "^2.0.0",
30
42
  "react": "^17.0",
43
+ "react-dnd": "^16.0.0",
44
+ "react-dnd-html5-backend": "^16.0.0",
31
45
  "react-dom": "^17.0",
46
+ "react-final-form": "^6.3.1",
32
47
  "react-intl": "^5.24.6",
48
+ "react-router": "^5.1.2",
49
+ "react-router-dom": "^5.1.2",
33
50
  "rimraf": "^3.0.2",
34
51
  "typescript": "^4.0.0"
35
52
  },
53
+ "peerDependencies": {
54
+ "@apollo/client": "^3.2.5",
55
+ "@comet/admin": "^5.3.0",
56
+ "@comet/admin-icons": "^5.3.0",
57
+ "@comet/cms-admin": "^5.3.0",
58
+ "@emotion/react": "^11.9.3",
59
+ "@emotion/styled": "^11.9.3",
60
+ "@mui/icons-material": "^5.8.4",
61
+ "@mui/material": "^5.8.6",
62
+ "@mui/styles": "^5.8.6",
63
+ "@mui/system": "^5.8.6",
64
+ "@mui/x-data-grid": "^5.17.26",
65
+ "axios": "^0.21.0",
66
+ "draft-js": "^0.11.0",
67
+ "final-form": "^4.16.1",
68
+ "graphql": "^15.4.0",
69
+ "history": "^4.10.0",
70
+ "react": "^17.0",
71
+ "react-dnd": "^16.0.0",
72
+ "react-dnd-html5-backend": "^16.0.0",
73
+ "react-dom": "^17.0",
74
+ "react-final-form": "^6.3.1",
75
+ "react-intl": "^5.24.6",
76
+ "react-router": "^5.1.2",
77
+ "react-router-dom": "^5.1.2"
78
+ },
36
79
  "publishConfig": {
37
80
  "access": "public",
38
81
  "registry": "https://registry.npmjs.org"
39
82
  },
40
83
  "scripts": {
41
- "build": "$npm_execpath run clean && run-p build:babel build:types",
84
+ "build": "$npm_execpath run clean && run-p generate-graphql-types && run-p build:babel build:types",
42
85
  "build:babel": "npx babel ./src -x \".ts,.tsx\" -d lib",
43
86
  "build:types": "tsc --project ./tsconfig.json --emitDeclarationOnly",
44
87
  "clean": "rimraf lib",
88
+ "generate-graphql-types": "graphql-codegen",
89
+ "generate-graphql-types:watch": "$npm_execpath generate-graphql-types --watch",
45
90
  "lint": "run-p lint:eslint lint:tsc",
46
91
  "lint:eslint": "eslint --max-warnings 0 src/ package.json",
47
92
  "lint:tsc": "tsc --noEmit",
48
- "start": "run-p start:babel start:types",
93
+ "start": "run-p generate-graphql-types && run-p start:babel start:types",
49
94
  "start:babel": "npx babel ./src -x \".ts,.tsx\" -d lib -w",
50
95
  "start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput"
51
96
  }