@comet/brevo-admin 2.0.0-canary-20240806082635 → 2.0.0-canary-20240806135744

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"TargetGroupForm.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkC,MAAM,gBAAgB,CAAC;AAoB9E,OAAO,EAAE,qBAAqB,EAA+E,MAAM,kBAAkB,CAAC;AAGtI,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,IAAI,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAapG,MAAM,WAAW,8BAA8B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,UAAU,SAAS;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,qBAAqB,CAAC;IAC7B,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IACxD,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,8BAA8B,KAAK,8BAA8B,CAAC;CAC7F;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,YAAY,CAgJ7H"}
1
+ {"version":3,"file":"TargetGroupForm.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkC,MAAM,gBAAgB,CAAC;AAoB9E,OAAO,EAAE,qBAAqB,EAA+E,MAAM,kBAAkB,CAAC;AAGtI,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,IAAI,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAcpG,MAAM,WAAW,8BAA8B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,UAAU,SAAS;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,qBAAqB,CAAC;IAC7B,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IACxD,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,8BAA8B,KAAK,8BAA8B,CAAC;CAC7F;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,YAAY,CAiK7H"}
@@ -1 +1 @@
1
- {"version":3,"file":"TargetGroupForm.gql.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupForm.gql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAO,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,oBAAoB,4BAA6B,YAAY,iBAWzE,CAAC;AAEF,eAAO,MAAM,mCAAmC,cAM/C,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA6B,YAAY,iBAS9E,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA6B,YAAY,iBAS9E,CAAC"}
1
+ {"version":3,"file":"TargetGroupForm.gql.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupForm.gql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAO,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,oBAAoB,4BAA6B,YAAY,iBAYzE,CAAC;AAEF,eAAO,MAAM,mCAAmC,cAM/C,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA6B,YAAY,iBAS9E,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA6B,YAAY,iBAS9E,CAAC"}
@@ -19,6 +19,7 @@ export type GQLTargetGroupFormQuery = {
19
19
  id: string;
20
20
  title: string;
21
21
  updatedAt: any;
22
+ brevoId: number;
22
23
  assignedContactsTargetGroupBrevoId: number | null;
23
24
  };
24
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TargetGroupForm.gql.generated.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupForm.gql.generated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAE9C,eAAO,MAAM,eAAe;;;;;;;;;CAS3B,CAAA;AACD,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC,KAAK,CAAC;IACzD,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB,CAAC,CAAC;AAGH,MAAM,MAAM,uBAAuB,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE;QAAE,UAAU,CAAC,EAAE,aAAa,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,GAAG,CAAC;QAAC,kCAAkC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CAAE,CAAC;AAE1M,MAAM,MAAM,+CAA+C,GAAG,KAAK,CAAC,KAAK,CAAC;IACxE,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB,CAAC,CAAC;AAGH,MAAM,MAAM,sCAAsC,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE;QAAE,UAAU,CAAC,EAAE,aAAa,CAAC;QAAC,SAAS,EAAE,GAAG,CAAA;KAAE,CA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,CAAC,CAAC;CAC7D,CAAC,CAAC;AAGH,MAAM,MAAM,4BAA4B,GAAG;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,iBAAiB,EAAE;QAAE,UAAU,CAAC,EAAE,aAAa,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,GAAG,CAAA;KAAE,CAAA;CAAE,CAAC"}
@@ -8,7 +8,7 @@ var _client = require("@apollo/client");
8
8
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
9
9
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
10
10
  var targetGroupFormQuery = exports.targetGroupFormQuery = function targetGroupFormQuery(targetGroupFormFragment) {
11
- return (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query TargetGroupForm($id: ID!) {\n targetGroup(id: $id) {\n id\n title\n updatedAt\n assignedContactsTargetGroupBrevoId\n ...TargetGroupForm\n }\n }\n ", "\n"])), targetGroupFormFragment);
11
+ return (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query TargetGroupForm($id: ID!) {\n targetGroup(id: $id) {\n id\n title\n updatedAt\n brevoId\n assignedContactsTargetGroupBrevoId\n ...TargetGroupForm\n }\n }\n ", "\n"])), targetGroupFormFragment);
12
12
  };
13
13
  var targetGroupFormCheckForChangesQuery = exports.targetGroupFormCheckForChangesQuery = (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query TargetGroupFormCheckForChanges($id: ID!) {\n targetGroup(id: $id) {\n updatedAt\n }\n }\n"])));
14
14
  var createTargetGroupMutation = exports.createTargetGroupMutation = function createTargetGroupMutation(targetGroupFormFragment) {
@@ -20,6 +20,7 @@ var _react = _interopRequireDefault(require("react"));
20
20
  var _reactIntl = require("react-intl");
21
21
  var _TargetGroupFormGql = require("./TargetGroupForm.gql.generated");
22
22
  var _AddContactsGridSelect = require("./addContacts/AddContactsGridSelect");
23
+ var _AllAssignedContactsGrid = require("./allAssignedContacts/AllAssignedContactsGrid");
23
24
  var _TargetGroupForm = require("./TargetGroupForm.gql");
24
25
  var _templateObject;
25
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -188,7 +189,7 @@ function TargetGroupForm(_ref) {
188
189
  mode: mode,
189
190
  initialValues: initialValues
190
191
  }, function (_ref3) {
191
- var _data$targetGroup$ass;
192
+ var _data$targetGroup$ass, _data$targetGroup$bre;
192
193
  var values = _ref3.values;
193
194
  return /*#__PURE__*/_react["default"].createElement(_cmsAdmin.EditPageLayout, null, saveConflict.dialogs, /*#__PURE__*/_react["default"].createElement(_admin.Toolbar, null, /*#__PURE__*/_react["default"].createElement(_admin.ToolbarItem, null, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
194
195
  onClick: stackApi === null || stackApi === void 0 ? void 0 : stackApi.goBack
@@ -216,7 +217,7 @@ function TargetGroupForm(_ref) {
216
217
  defaultMessage: "Contacts will get assigned automatically to this target group depending on their attributes"
217
218
  }),
218
219
  initiallyExpanded: true
219
- }, additionalFormFields), id && /*#__PURE__*/_react["default"].createElement(_admin.FieldSet, {
220
+ }, additionalFormFields), id && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_admin.FieldSet, {
220
221
  title: /*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage, {
221
222
  id: "cometBrevoModule.targetGroup.manuallyAddContacts",
222
223
  defaultMessage: "Manually add contacts"
@@ -227,6 +228,17 @@ function TargetGroupForm(_ref) {
227
228
  assignedContactsTargetGroupBrevoId: (_data$targetGroup$ass = data === null || data === void 0 ? void 0 : data.targetGroup.assignedContactsTargetGroupBrevoId) !== null && _data$targetGroup$ass !== void 0 ? _data$targetGroup$ass : undefined,
228
229
  id: id,
229
230
  scope: scope
230
- }))));
231
+ })), /*#__PURE__*/_react["default"].createElement(_admin.FieldSet, {
232
+ title: /*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage, {
233
+ id: "cometBrevoModule.targetGroup.allAssignedContacts",
234
+ defaultMessage: "All assigned contacts"
235
+ }),
236
+ disablePadding: true,
237
+ initiallyExpanded: false
238
+ }, /*#__PURE__*/_react["default"].createElement(_AllAssignedContactsGrid.AllAssignedContactsGrid, {
239
+ brevoId: (_data$targetGroup$bre = data === null || data === void 0 ? void 0 : data.targetGroup.brevoId) !== null && _data$targetGroup$bre !== void 0 ? _data$targetGroup$bre : undefined,
240
+ id: id,
241
+ scope: scope
242
+ })))));
231
243
  });
232
244
  }
@@ -1,5 +1,5 @@
1
1
  export declare const manuallyAssignedBrevoContactsGridQuery: import("@apollo/client").DocumentNode;
2
- export declare const allBrevoContactsQuery: import("@apollo/client").DocumentNode;
2
+ export declare const brevoContactsQuery: import("@apollo/client").DocumentNode;
3
3
  export declare const addBrevoContactsToTargetGroupMutation: import("@apollo/client").DocumentNode;
4
4
  export declare const removeBrevoContactFromTargetGroupMutation: import("@apollo/client").DocumentNode;
5
5
  //# sourceMappingURL=AddContactsGridSelect.gql.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddContactsGridSelect.gql.d.ts","sourceRoot":"","sources":["../../../src/targetGroups/addContacts/AddContactsGridSelect.gql.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,sCAAsC,uCAUlD,CAAC;AAEF,eAAO,MAAM,qBAAqB,uCAUjC,CAAC;AAEF,eAAO,MAAM,qCAAqC,uCAIjD,CAAC;AAEF,eAAO,MAAM,yCAAyC,uCAIrD,CAAC"}
1
+ {"version":3,"file":"AddContactsGridSelect.gql.d.ts","sourceRoot":"","sources":["../../../src/targetGroups/addContacts/AddContactsGridSelect.gql.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,sCAAsC,uCAUlD,CAAC;AAEF,eAAO,MAAM,kBAAkB,uCAU9B,CAAC;AAEF,eAAO,MAAM,qCAAqC,uCAIjD,CAAC;AAEF,eAAO,MAAM,yCAAyC,uCAIrD,CAAC"}
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.removeBrevoContactFromTargetGroupMutation = exports.manuallyAssignedBrevoContactsGridQuery = exports.allBrevoContactsQuery = exports.addBrevoContactsToTargetGroupMutation = void 0;
6
+ exports.removeBrevoContactFromTargetGroupMutation = exports.manuallyAssignedBrevoContactsGridQuery = exports.brevoContactsQuery = exports.addBrevoContactsToTargetGroupMutation = void 0;
7
7
  var _client = require("@apollo/client");
8
8
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
9
9
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
10
10
  var targetGroupBrevoContactsFragment = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment TargetGroupBrevoContactsList on BrevoContact {\n id\n createdAt\n modifiedAt\n email\n emailBlacklisted\n smsBlacklisted\n }\n"])));
11
11
  var manuallyAssignedBrevoContactsGridQuery = exports.manuallyAssignedBrevoContactsGridQuery = (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query ManuallyAssignedBrevoContactsGrid($offset: Int, $limit: Int, $email: String, $targetGroupId: ID!) {\n manuallyAssignedBrevoContacts(offset: $offset, limit: $limit, email: $email, targetGroupId: $targetGroupId) {\n nodes {\n ...TargetGroupBrevoContactsList\n }\n totalCount\n }\n }\n ", "\n"])), targetGroupBrevoContactsFragment);
12
- var allBrevoContactsQuery = exports.allBrevoContactsQuery = (0, _client.gql)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n query AllBrevoContactsGrid($offset: Int, $limit: Int, $email: String, $scope: EmailCampaignContentScopeInput!) {\n brevoContacts(offset: $offset, limit: $limit, email: $email, scope: $scope) {\n nodes {\n ...TargetGroupBrevoContactsList\n }\n totalCount\n }\n }\n ", "\n"])), targetGroupBrevoContactsFragment);
12
+ var brevoContactsQuery = exports.brevoContactsQuery = (0, _client.gql)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n query AllBrevoContactsGrid($offset: Int, $limit: Int, $email: String, $scope: EmailCampaignContentScopeInput!) {\n brevoContacts(offset: $offset, limit: $limit, email: $email, scope: $scope) {\n nodes {\n ...TargetGroupBrevoContactsList\n }\n totalCount\n }\n }\n ", "\n"])), targetGroupBrevoContactsFragment);
13
13
  var addBrevoContactsToTargetGroupMutation = exports.addBrevoContactsToTargetGroupMutation = (0, _client.gql)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation AddBrevoContactsToTargetGroup($id: ID!, $input: AddBrevoContactsInput!) {\n addBrevoContactsToTargetGroup(id: $id, input: $input)\n }\n"])));
14
14
  var removeBrevoContactFromTargetGroupMutation = exports.removeBrevoContactFromTargetGroupMutation = (0, _client.gql)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n mutation RemoveBrevoContactFromTargetGroup($id: ID!, $input: RemoveBrevoContactInput!) {\n removeBrevoContactFromTargetGroup(id: $id, input: $input)\n }\n"])));
@@ -39,7 +39,7 @@ var AssignedContactsGridToolbar = function AssignedContactsGridToolbar(_ref) {
39
39
  var intl = (0, _reactIntl.useIntl)();
40
40
  return /*#__PURE__*/React.createElement(_admin.Toolbar, null, /*#__PURE__*/React.createElement(_admin.ToolbarTitleItem, null, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, {
41
41
  id: "cometBrevoModule.targetGroup.assignedContacts.title",
42
- defaultMessage: "Assigned contacts"
42
+ defaultMessage: "Manually assigned contacts"
43
43
  })), /*#__PURE__*/React.createElement(_admin.ToolbarItem, null, /*#__PURE__*/React.createElement(_xDataGrid.GridToolbarQuickFilter, {
44
44
  placeholder: intl.formatMessage({
45
45
  id: "cometBrevoModule.targetGroup.assignedContacts.searchEmail",
@@ -117,7 +117,7 @@ function AddContactsGridSelect(_ref3) {
117
117
  }
118
118
  });
119
119
  };
120
- var _useQuery = (0, _client.useQuery)(_AddContactsGridSelect.allBrevoContactsQuery, {
120
+ var _useQuery = (0, _client.useQuery)(_AddContactsGridSelect.brevoContactsQuery, {
121
121
  variables: {
122
122
  offset: dataGridAssignableContactsProps.page * dataGridAssignableContactsProps.pageSize,
123
123
  limit: dataGridAssignableContactsProps.pageSize,
@@ -0,0 +1,10 @@
1
+ import { ContentScopeInterface } from "@comet/cms-admin";
2
+ import * as React from "react";
3
+ interface AllAssignedContactsGridProps {
4
+ scope: ContentScopeInterface;
5
+ id: string;
6
+ brevoId?: number;
7
+ }
8
+ export declare function AllAssignedContactsGrid({ id, scope, brevoId }: AllAssignedContactsGridProps): React.ReactElement;
9
+ export {};
10
+ //# sourceMappingURL=AllAssignedContactsGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllAssignedContactsGrid.d.ts","sourceRoot":"","sources":["../../../src/targetGroups/allAssignedContacts/AllAssignedContactsGrid.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA+B/B,UAAU,4BAA4B;IAClC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,4BAA4B,GAAG,KAAK,CAAC,YAAY,CA4EhH"}
@@ -0,0 +1,2 @@
1
+ export declare const allAssignedBrevoContactsGridQuery: import("@apollo/client").DocumentNode;
2
+ //# sourceMappingURL=AllAssignedContactsGrid.gql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllAssignedContactsGrid.gql.d.ts","sourceRoot":"","sources":["../../../src/targetGroups/allAssignedContacts/AllAssignedContactsGrid.gql.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,iCAAiC,uCAU7C,CAAC"}
@@ -0,0 +1,42 @@
1
+ import * as Types from '../../graphql.generated';
2
+ export declare const namedOperations: {
3
+ Query: {
4
+ BrevoContacts: string;
5
+ };
6
+ Fragment: {
7
+ TargetGroupBrevoContactsList: string;
8
+ };
9
+ };
10
+ export type GQLTargetGroupBrevoContactsListFragment = {
11
+ __typename?: 'BrevoContact';
12
+ id: number;
13
+ createdAt: string;
14
+ modifiedAt: string;
15
+ email: string;
16
+ emailBlacklisted: boolean;
17
+ smsBlacklisted: boolean;
18
+ };
19
+ export type GQLBrevoContactsQueryVariables = Types.Exact<{
20
+ offset?: Types.InputMaybe<Types.Scalars['Int']>;
21
+ limit?: Types.InputMaybe<Types.Scalars['Int']>;
22
+ email?: Types.InputMaybe<Types.Scalars['String']>;
23
+ targetGroupId: Types.Scalars['ID'];
24
+ scope: Types.GQLEmailCampaignContentScopeInput;
25
+ }>;
26
+ export type GQLBrevoContactsQuery = {
27
+ __typename?: 'Query';
28
+ brevoContacts: {
29
+ __typename?: 'PaginatedBrevoContacts';
30
+ totalCount: number;
31
+ nodes: Array<{
32
+ __typename?: 'BrevoContact';
33
+ id: number;
34
+ createdAt: string;
35
+ modifiedAt: string;
36
+ email: string;
37
+ emailBlacklisted: boolean;
38
+ smsBlacklisted: boolean;
39
+ }>;
40
+ };
41
+ };
42
+ //# sourceMappingURL=AllAssignedContactsGrid.gql.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllAssignedContactsGrid.gql.generated.d.ts","sourceRoot":"","sources":["../../../src/targetGroups/allAssignedContacts/AllAssignedContactsGrid.gql.generated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,yBAAyB,CAAC;AAEjD,eAAO,MAAM,eAAe;;;;;;;CAO3B,CAAA;AACD,MAAM,MAAM,uCAAuC,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;AAE5M,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC,KAAK,CAAC;IACvD,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,KAAK,EAAE,KAAK,CAAC,iCAAiC,CAAC;CAChD,CAAC,CAAC;AAGH,MAAM,MAAM,qBAAqB,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE;QAAE,UAAU,CAAC,EAAE,wBAAwB,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;YAAE,UAAU,CAAC,EAAE,cAAc,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,gBAAgB,EAAE,OAAO,CAAC;YAAC,cAAc,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE,CAAA;CAAE,CAAC"}
@@ -0,0 +1,14 @@
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
+ BrevoContacts: 'BrevoContacts'
10
+ },
11
+ Fragment: {
12
+ TargetGroupBrevoContactsList: 'TargetGroupBrevoContactsList'
13
+ }
14
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.allAssignedBrevoContactsGridQuery = void 0;
7
+ var _client = require("@apollo/client");
8
+ var _templateObject, _templateObject2;
9
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
10
+ var targetGroupBrevoContactsFragment = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fragment TargetGroupBrevoContactsList on BrevoContact {\n id\n createdAt\n modifiedAt\n email\n emailBlacklisted\n smsBlacklisted\n }\n"])));
11
+ var allAssignedBrevoContactsGridQuery = exports.allAssignedBrevoContactsGridQuery = (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query BrevoContacts($offset: Int, $limit: Int, $email: String, $targetGroupId: ID!, $scope: EmailCampaignContentScopeInput!) {\n brevoContacts(offset: $offset, limit: $limit, email: $email, targetGroupId: $targetGroupId, scope: $scope) {\n nodes {\n ...TargetGroupBrevoContactsList\n }\n totalCount\n }\n }\n ", "\n"])), targetGroupBrevoContactsFragment);
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AllAssignedContactsGrid = AllAssignedContactsGrid;
7
+ var _client = require("@apollo/client");
8
+ var _admin = require("@comet/admin");
9
+ var _xDataGrid = require("@mui/x-data-grid");
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _reactIntl = require("react-intl");
12
+ var _AllAssignedContactsGrid = require("./AllAssignedContactsGrid.gql");
13
+ 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); }
14
+ 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; }
15
+ 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); }
16
+ 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); }
17
+ 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; }
18
+ 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; }
19
+ 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; }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
21
+ 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); }
22
+ var AssignedContactsGridToolbar = function AssignedContactsGridToolbar(_ref) {
23
+ var onOpenDialog = _ref.onOpenDialog;
24
+ var intl = (0, _reactIntl.useIntl)();
25
+ return /*#__PURE__*/React.createElement(_admin.Toolbar, null, /*#__PURE__*/React.createElement(_admin.ToolbarTitleItem, null, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, {
26
+ id: "cometBrevoModule.targetGroup.assignedContacts.title",
27
+ defaultMessage: "All assigned contacts"
28
+ })), /*#__PURE__*/React.createElement(_admin.ToolbarItem, null, /*#__PURE__*/React.createElement(_xDataGrid.GridToolbarQuickFilter, {
29
+ placeholder: intl.formatMessage({
30
+ id: "cometBrevoModule.targetGroup.assignedContacts.searchEmail",
31
+ defaultMessage: "Search email address"
32
+ })
33
+ })), /*#__PURE__*/React.createElement(_admin.ToolbarFillSpace, null));
34
+ };
35
+ function AllAssignedContactsGrid(_ref2) {
36
+ var _dataGridAllAssignedC, _dataGridAllAssignedC2, _allAssignedContactsD;
37
+ var id = _ref2.id,
38
+ scope = _ref2.scope,
39
+ brevoId = _ref2.brevoId;
40
+ var intl = (0, _reactIntl.useIntl)();
41
+ var dataGridAllAssignedContactsProps = _objectSpread(_objectSpread({}, (0, _admin.useDataGridRemote)()), (0, _admin.usePersistentColumnState)("TargetGroupAssignedBrevoContactsGrid"));
42
+ var _useQuery = (0, _client.useQuery)(_AllAssignedContactsGrid.allAssignedBrevoContactsGridQuery, {
43
+ variables: {
44
+ offset: dataGridAllAssignedContactsProps.page * dataGridAllAssignedContactsProps.pageSize,
45
+ limit: dataGridAllAssignedContactsProps.pageSize,
46
+ email: (_dataGridAllAssignedC = dataGridAllAssignedContactsProps.filterModel) !== null && _dataGridAllAssignedC !== void 0 && _dataGridAllAssignedC.quickFilterValues ? (_dataGridAllAssignedC2 = dataGridAllAssignedContactsProps.filterModel) === null || _dataGridAllAssignedC2 === void 0 ? void 0 : _dataGridAllAssignedC2.quickFilterValues[0] : undefined,
47
+ targetGroupId: id,
48
+ scope: scope
49
+ },
50
+ skip: !brevoId
51
+ }),
52
+ allAssignedContactsData = _useQuery.data,
53
+ assignedContactsLoading = _useQuery.loading,
54
+ allAssignedContactsError = _useQuery.error;
55
+ var allAssignedContactsColumns = [{
56
+ field: "createdAt",
57
+ headerName: intl.formatMessage({
58
+ id: "cometBrevoModule.brevoContact.subscribedAt",
59
+ defaultMessage: "Subscribed At"
60
+ }),
61
+ filterable: false,
62
+ sortable: false,
63
+ width: 150,
64
+ renderCell: function renderCell(_ref3) {
65
+ var row = _ref3.row;
66
+ return intl.formatDate(new Date(row.createdAt));
67
+ }
68
+ }, {
69
+ field: "modifiedAt",
70
+ headerName: intl.formatMessage({
71
+ id: "cometBrevoModule.brevoContact.modifiedAt",
72
+ defaultMessage: "Modified At"
73
+ }),
74
+ filterable: false,
75
+ sortable: false,
76
+ width: 150,
77
+ renderCell: function renderCell(_ref4) {
78
+ var row = _ref4.row;
79
+ return intl.formatDate(new Date(row.modifiedAt));
80
+ }
81
+ }, {
82
+ field: "email",
83
+ headerName: intl.formatMessage({
84
+ id: "cometBrevoModule.brevoContact.email",
85
+ defaultMessage: "Email"
86
+ }),
87
+ filterable: false,
88
+ sortable: false,
89
+ width: 150,
90
+ flex: 1
91
+ }, {
92
+ field: "emailBlacklisted",
93
+ headerName: intl.formatMessage({
94
+ id: "cometBrevoModule.brevoContact.emailBlocked",
95
+ defaultMessage: "Email blocked"
96
+ }),
97
+ type: "boolean",
98
+ filterable: false,
99
+ sortable: false,
100
+ width: 150
101
+ }];
102
+ var allAssignedContactsRowCount = (0, _admin.useBufferedRowCount)(allAssignedContactsData === null || allAssignedContactsData === void 0 ? void 0 : allAssignedContactsData.brevoContacts.totalCount);
103
+ if (allAssignedContactsError) throw allAssignedContactsError;
104
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_xDataGrid.DataGrid, _extends({}, dataGridAllAssignedContactsProps, {
105
+ disableSelectionOnClick: true,
106
+ rows: (_allAssignedContactsD = allAssignedContactsData === null || allAssignedContactsData === void 0 ? void 0 : allAssignedContactsData.brevoContacts.nodes) !== null && _allAssignedContactsD !== void 0 ? _allAssignedContactsD : [],
107
+ rowCount: allAssignedContactsRowCount,
108
+ columns: allAssignedContactsColumns,
109
+ autoHeight: true,
110
+ loading: assignedContactsLoading,
111
+ components: {
112
+ Toolbar: AssignedContactsGridToolbar
113
+ }
114
+ })));
115
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/brevo-admin",
3
- "version": "2.0.0-canary-20240806082635",
3
+ "version": "2.0.0-canary-20240806135744",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/vivid-planet/comet-brevo-module/",