@comet/brevo-admin 3.0.0-canary-20241025073241 → 3.0.0-canary-20241105083652
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.
- package/lib/brevoContacts/BrevoContactsGrid.d.ts +1 -1
- package/lib/brevoContacts/BrevoContactsGrid.d.ts.map +1 -1
- package/lib/brevoContacts/BrevoContactsGrid.js +118 -97
- package/lib/brevoContacts/BrevoContactsPage.d.ts +1 -1
- package/lib/brevoContacts/BrevoContactsPage.d.ts.map +1 -1
- package/lib/brevoContacts/BrevoContactsPage.js +44 -33
- package/lib/brevoContacts/form/BrevoContactForm.d.ts.map +1 -1
- package/lib/brevoContacts/form/BrevoContactForm.js +73 -51
- package/lib/common/BrevoConfigProvider.js +5 -3
- package/lib/common/contactImport/useContactImportFromCsv.js +86 -64
- package/lib/emailCampaigns/EmailCampaignsGrid.d.ts.map +1 -1
- package/lib/emailCampaigns/EmailCampaignsGrid.js +106 -91
- package/lib/emailCampaigns/EmailCampaignsPage.d.ts.map +1 -1
- package/lib/emailCampaigns/EmailCampaignsPage.js +54 -41
- package/lib/emailCampaigns/SendingStateColumn.js +43 -31
- package/lib/emailCampaigns/form/ConfigFields.js +22 -19
- package/lib/emailCampaigns/form/EmailCampaignForm.d.ts +1 -1
- package/lib/emailCampaigns/form/EmailCampaignForm.d.ts.map +1 -1
- package/lib/emailCampaigns/form/EmailCampaignForm.js +102 -74
- package/lib/emailCampaigns/form/SendEmailCampaignNowDialog.js +25 -16
- package/lib/emailCampaigns/form/SendManagerFields.js +103 -92
- package/lib/emailCampaigns/form/TestEmailCampaignForm.js +70 -59
- package/lib/emailCampaigns/statistics/EmailCampaignStatistics.js +106 -88
- package/lib/emailCampaigns/statistics/PercentageCard.js +50 -28
- package/lib/emailCampaigns/view/EmailCampaignView.d.ts +1 -1
- package/lib/emailCampaigns/view/EmailCampaignView.d.ts.map +1 -1
- package/lib/emailCampaigns/view/EmailCampaignView.js +28 -16
- package/lib/graphql.generated.d.ts +6 -7
- package/lib/graphql.generated.d.ts.map +1 -1
- package/lib/targetGroups/TargetGroupDialog.js +15 -13
- package/lib/targetGroups/TargetGroupForm.d.ts.map +1 -1
- package/lib/targetGroups/TargetGroupForm.js +78 -55
- package/lib/targetGroups/TargetGroupsGrid.d.ts.map +1 -1
- package/lib/targetGroups/TargetGroupsGrid.js +105 -90
- package/lib/targetGroups/TargetGroupsPage.d.ts.map +1 -1
- package/lib/targetGroups/TargetGroupsPage.js +31 -21
- package/lib/targetGroups/addContacts/AddContactsGridSelect.d.ts.map +1 -1
- package/lib/targetGroups/addContacts/AddContactsGridSelect.js +152 -120
- package/lib/targetGroups/allAssignedContacts/AllAssignedContactsGrid.d.ts.map +1 -1
- package/lib/targetGroups/allAssignedContacts/AllAssignedContactsGrid.js +17 -11
- package/lib/temp/CrudMoreActionsMenu.js +133 -111
- package/package.json +14 -17
|
@@ -22,6 +22,7 @@ var _TargetGroupFormGql = require("./TargetGroupForm.gql.generated");
|
|
|
22
22
|
var _AddContactsGridSelect = require("./addContacts/AddContactsGridSelect");
|
|
23
23
|
var _AllAssignedContactsGrid = require("./allAssignedContacts/AllAssignedContactsGrid");
|
|
24
24
|
var _TargetGroupForm = require("./TargetGroupForm.gql");
|
|
25
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
var _templateObject;
|
|
26
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
28
|
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; }
|
|
@@ -146,66 +147,88 @@ function TargetGroupForm(_ref) {
|
|
|
146
147
|
}();
|
|
147
148
|
if (error) throw error;
|
|
148
149
|
if (loading) {
|
|
149
|
-
return /*#__PURE__*/
|
|
150
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Loading, {
|
|
150
151
|
behavior: "fillPageHeight"
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
|
-
return /*#__PURE__*/
|
|
154
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FinalForm, {
|
|
154
155
|
apiRef: formApiRef,
|
|
155
156
|
onSubmit: handleSubmit,
|
|
156
157
|
mode: mode,
|
|
157
|
-
initialValues: initialValues
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
158
|
+
initialValues: initialValues,
|
|
159
|
+
children: function children(_ref3) {
|
|
160
|
+
var _data$targetGroup$ass, _data$targetGroup$bre;
|
|
161
|
+
var values = _ref3.values;
|
|
162
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
163
|
+
children: [saveConflict.dialogs, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.Toolbar, {
|
|
164
|
+
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_cmsAdmin.ContentScopeIndicator, {
|
|
165
|
+
scope: scope
|
|
166
|
+
}),
|
|
167
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarItem, {
|
|
168
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
169
|
+
onClick: stackApi === null || stackApi === void 0 ? void 0 : stackApi.goBack,
|
|
170
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.ArrowLeft, {})
|
|
171
|
+
})
|
|
172
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarTitleItem, {
|
|
173
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
174
|
+
id: "cometBrevoModule.targetGroups.TargetGroup",
|
|
175
|
+
defaultMessage: "Target group"
|
|
176
|
+
})
|
|
177
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarFillSpace, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarActions, {
|
|
178
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FinalFormSaveButton, {
|
|
179
|
+
hasConflict: saveConflict.hasConflict
|
|
180
|
+
})
|
|
181
|
+
})]
|
|
182
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.MainContent, {
|
|
183
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
|
|
184
|
+
required: true,
|
|
185
|
+
fullWidth: true,
|
|
186
|
+
name: "title",
|
|
187
|
+
component: _admin.FinalFormInput,
|
|
188
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
189
|
+
id: "cometBrevoModule.targetGroup.title",
|
|
190
|
+
defaultMessage: "Title"
|
|
191
|
+
})
|
|
192
|
+
}), additionalFormFields && /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FieldSet, {
|
|
193
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
194
|
+
id: "cometBrevoModule.targetGroup.filters",
|
|
195
|
+
defaultMessage: "Filters"
|
|
196
|
+
}),
|
|
197
|
+
supportText: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
198
|
+
id: "cometBrevoModule.targetGroup.filters.explainText",
|
|
199
|
+
defaultMessage: "Contacts will get assigned automatically to this target group depending on their attributes"
|
|
200
|
+
}),
|
|
201
|
+
initiallyExpanded: true,
|
|
202
|
+
children: additionalFormFields
|
|
203
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
204
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FieldSet, {
|
|
205
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
206
|
+
id: "cometBrevoModule.targetGroup.manuallyAddContacts",
|
|
207
|
+
defaultMessage: "Manually add contacts"
|
|
208
|
+
}),
|
|
209
|
+
initiallyExpanded: true,
|
|
210
|
+
disablePadding: true,
|
|
211
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AddContactsGridSelect.AddContactsGridSelect, {
|
|
212
|
+
assignedContactsTargetGroupBrevoId: (_data$targetGroup$ass = data === null || data === void 0 ? void 0 : data.targetGroup.assignedContactsTargetGroupBrevoId) !== null && _data$targetGroup$ass !== void 0 ? _data$targetGroup$ass : undefined,
|
|
213
|
+
id: id,
|
|
214
|
+
scope: scope
|
|
215
|
+
})
|
|
216
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FieldSet, {
|
|
217
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
218
|
+
id: "cometBrevoModule.targetGroup.allAssignedContacts",
|
|
219
|
+
defaultMessage: "All assigned contacts"
|
|
220
|
+
}),
|
|
221
|
+
disablePadding: true,
|
|
222
|
+
initiallyExpanded: false,
|
|
223
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AllAssignedContactsGrid.AllAssignedContactsGrid, {
|
|
224
|
+
brevoId: (_data$targetGroup$bre = data === null || data === void 0 ? void 0 : data.targetGroup.brevoId) !== null && _data$targetGroup$bre !== void 0 ? _data$targetGroup$bre : undefined,
|
|
225
|
+
id: id,
|
|
226
|
+
scope: scope
|
|
227
|
+
})
|
|
228
|
+
})]
|
|
229
|
+
})]
|
|
230
|
+
})]
|
|
231
|
+
});
|
|
232
|
+
}
|
|
210
233
|
});
|
|
211
234
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TargetGroupsGrid.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupsGrid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TargetGroupsGrid.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupsGrid.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAwDtE,wBAAgB,gBAAgB,CAAC,EAC7B,KAAK,EACL,wBAAwB,GAC3B,EAAE;IACC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,wBAAwB,CAAC,EAAE;QACvB,4BAA4B,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,YAAY,CAAA;SAAE,CAAC;QACvE,YAAY,EAAE;YAAE,WAAW,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACzG,CAAC;CACL,GAAG,KAAK,CAAC,YAAY,CAiMrB"}
|
|
@@ -14,11 +14,11 @@ var _fileSaver = _interopRequireDefault(require("file-saver"));
|
|
|
14
14
|
var React = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
16
|
var _TargetGroupDialog = require("./TargetGroupDialog");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
18
19
|
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); }
|
|
19
20
|
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; }
|
|
20
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
-
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); }
|
|
22
22
|
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; }
|
|
23
23
|
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); } }
|
|
24
24
|
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); }); }; }
|
|
@@ -51,17 +51,26 @@ function TargetGroupsGrid(_ref) {
|
|
|
51
51
|
EditDialog = _useEditDialog2[0],
|
|
52
52
|
editDialogApi = _useEditDialog2[2];
|
|
53
53
|
function TargetGroupsGridToolbar() {
|
|
54
|
-
return /*#__PURE__*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.DataGridToolbar, {
|
|
55
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarAutomaticTitleItem, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarItem, {
|
|
56
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridToolbarQuickFilter, {})
|
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarItem, {
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.GridFilterButton, {})
|
|
59
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarFillSpace, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarActions, {
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
61
|
+
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Add, {}),
|
|
62
|
+
variant: "contained",
|
|
63
|
+
color: "primary",
|
|
64
|
+
onClick: function onClick() {
|
|
65
|
+
editDialogApi.openAddDialog();
|
|
66
|
+
},
|
|
67
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
68
|
+
id: "cometBrevoModule.targetGroup.newTargetGroup",
|
|
69
|
+
defaultMessage: "New target group"
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
65
74
|
}
|
|
66
75
|
var targetGroupContactsQuery = (0, _client.gql)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n query TargetGroupContacts($targetGroupId: ID!, $offset: Int, $limit: Int, $scope: EmailCampaignContentScopeInput!) {\n brevoContacts(targetGroupId: $targetGroupId, offset: $offset, limit: $limit, scope: $scope) { \n nodes {\n ...TargetGroupContactItem\n ", "\n }\n totalCount\n }\n }\n ", "\n ", "\n "])), exportTargetGroupOptions !== null && exportTargetGroupOptions !== void 0 && exportTargetGroupOptions.additionalAttributesFragment ? "...".concat((_exportTargetGroupOpt = exportTargetGroupOptions.additionalAttributesFragment) === null || _exportTargetGroupOpt === void 0 ? void 0 : _exportTargetGroupOpt.name) : "", targetGroupContactItemFragment, (_exportTargetGroupOpt2 = exportTargetGroupOptions === null || exportTargetGroupOptions === void 0 || (_exportTargetGroupOpt3 = exportTargetGroupOptions.additionalAttributesFragment) === null || _exportTargetGroupOpt3 === void 0 ? void 0 : _exportTargetGroupOpt3.fragment) !== null && _exportTargetGroupOpt2 !== void 0 ? _exportTargetGroupOpt2 : "");
|
|
67
76
|
var convertToCsv = function convertToCsv(data) {
|
|
@@ -178,71 +187,75 @@ function TargetGroupsGrid(_ref) {
|
|
|
178
187
|
renderCell: function renderCell(_ref3) {
|
|
179
188
|
var row = _ref3.row;
|
|
180
189
|
if (row.isMainList) return;
|
|
181
|
-
return /*#__PURE__*/
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
190
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
191
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
192
|
+
component: _admin.StackLink,
|
|
193
|
+
pageName: "edit",
|
|
194
|
+
payload: row.id,
|
|
195
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Edit, {
|
|
196
|
+
color: "primary"
|
|
197
|
+
})
|
|
198
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
199
|
+
onClick: function onClick() {
|
|
200
|
+
return downloadTargetGroupContactsExportFile({
|
|
201
|
+
id: row.id,
|
|
202
|
+
title: row.title
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Download, {
|
|
206
|
+
color: "primary"
|
|
207
|
+
})
|
|
208
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.CrudContextMenu, {
|
|
209
|
+
copyData: function copyData() {
|
|
210
|
+
return {
|
|
211
|
+
title: row.title
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
onPaste: ( /*#__PURE__*/function () {
|
|
215
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref4) {
|
|
216
|
+
var input;
|
|
217
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
218
|
+
while (1) switch (_context.prev = _context.next) {
|
|
219
|
+
case 0:
|
|
220
|
+
input = _ref4.input;
|
|
221
|
+
_context.next = 3;
|
|
222
|
+
return client.mutate({
|
|
223
|
+
mutation: createTargetGroupMutation,
|
|
224
|
+
variables: {
|
|
225
|
+
scope: scope,
|
|
226
|
+
input: input
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
case 3:
|
|
230
|
+
case "end":
|
|
231
|
+
return _context.stop();
|
|
232
|
+
}
|
|
233
|
+
}, _callee);
|
|
234
|
+
}));
|
|
235
|
+
return function (_x2) {
|
|
236
|
+
return _ref5.apply(this, arguments);
|
|
237
|
+
};
|
|
238
|
+
}()),
|
|
239
|
+
onDelete: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
240
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
241
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
207
242
|
case 0:
|
|
208
|
-
|
|
209
|
-
_context.next = 3;
|
|
243
|
+
_context2.next = 2;
|
|
210
244
|
return client.mutate({
|
|
211
|
-
mutation:
|
|
245
|
+
mutation: deleteTargetGroupMutation,
|
|
212
246
|
variables: {
|
|
213
|
-
|
|
214
|
-
input: input
|
|
247
|
+
id: row.id
|
|
215
248
|
}
|
|
216
249
|
});
|
|
217
|
-
case
|
|
250
|
+
case 2:
|
|
218
251
|
case "end":
|
|
219
|
-
return
|
|
252
|
+
return _context2.stop();
|
|
220
253
|
}
|
|
221
|
-
},
|
|
222
|
-
}))
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}()),
|
|
227
|
-
onDelete: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
228
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
229
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
230
|
-
case 0:
|
|
231
|
-
_context2.next = 2;
|
|
232
|
-
return client.mutate({
|
|
233
|
-
mutation: deleteTargetGroupMutation,
|
|
234
|
-
variables: {
|
|
235
|
-
id: row.id
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
case 2:
|
|
239
|
-
case "end":
|
|
240
|
-
return _context2.stop();
|
|
241
|
-
}
|
|
242
|
-
}, _callee2);
|
|
243
|
-
})),
|
|
244
|
-
refetchQueries: [targetGroupsQuery]
|
|
245
|
-
}));
|
|
254
|
+
}, _callee2);
|
|
255
|
+
})),
|
|
256
|
+
refetchQueries: [targetGroupsQuery]
|
|
257
|
+
})]
|
|
258
|
+
});
|
|
246
259
|
}
|
|
247
260
|
}];
|
|
248
261
|
var _muiGridFilterToGql = (0, _admin.muiGridFilterToGql)(columns, dataGridProps.filterModel),
|
|
@@ -264,25 +277,27 @@ function TargetGroupsGrid(_ref) {
|
|
|
264
277
|
var rowCount = (0, _admin.useBufferedRowCount)(data === null || data === void 0 ? void 0 : data.targetGroups.totalCount);
|
|
265
278
|
if (error) throw error;
|
|
266
279
|
var rows = (_data$targetGroups$no = data === null || data === void 0 ? void 0 : data.targetGroups.nodes) !== null && _data$targetGroups$no !== void 0 ? _data$targetGroups$no : [];
|
|
267
|
-
return /*#__PURE__*/
|
|
268
|
-
fullHeight: true
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
})), /*#__PURE__*/React.createElement(EditDialog, {
|
|
279
|
-
disableCloseAfterSave: true,
|
|
280
|
-
componentsProps: {
|
|
281
|
-
dialog: {
|
|
282
|
-
maxWidth: "sm"
|
|
280
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.MainContent, {
|
|
281
|
+
fullHeight: true,
|
|
282
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.DataGrid, _objectSpread(_objectSpread({}, dataGridProps), {}, {
|
|
283
|
+
disableSelectionOnClick: true,
|
|
284
|
+
rows: rows,
|
|
285
|
+
rowCount: rowCount,
|
|
286
|
+
columns: columns,
|
|
287
|
+
loading: loading,
|
|
288
|
+
components: {
|
|
289
|
+
Toolbar: TargetGroupsGridToolbar
|
|
283
290
|
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
291
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(EditDialog, {
|
|
292
|
+
disableCloseAfterSave: true,
|
|
293
|
+
componentsProps: {
|
|
294
|
+
dialog: {
|
|
295
|
+
maxWidth: "sm"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TargetGroupDialog.TargetGroupDialog, {
|
|
299
|
+
scope: scope
|
|
300
|
+
})
|
|
301
|
+
})]
|
|
302
|
+
});
|
|
288
303
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TargetGroupsPage.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupsPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,8BAA8B,EAAmB,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAoB,MAAM,oBAAoB,CAAC;AAEvF,UAAU,yBAAyB;IAC/B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,wBAAwB,CAAC,EAAE;QACvB,4BAA4B,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,YAAY,CAAA;SAAE,CAAC;QACvE,YAAY,EAAE;YAAE,WAAW,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACzG,CAAC;IACF,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;IAC1F,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,8BAA8B,CAAC;CAC/F;AAED,wBAAgB,sBAAsB,CAAC,EACnC,UAAU,EACV,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,wBAAwB,GAC3B,EAAE,yBAAyB,SACK,WAAW,
|
|
1
|
+
{"version":3,"file":"TargetGroupsPage.d.ts","sourceRoot":"","sources":["../../src/targetGroups/TargetGroupsPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,8BAA8B,EAAmB,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAoB,MAAM,oBAAoB,CAAC;AAEvF,UAAU,yBAAyB;IAC/B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,wBAAwB,CAAC,EAAE;QACvB,4BAA4B,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,YAAY,CAAA;SAAE,CAAC;QACvE,YAAY,EAAE;YAAE,WAAW,EAAE,CAAC,GAAG,EAAE,+BAA+B,KAAK,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACzG,CAAC;IACF,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;IAC1F,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,8BAA8B,CAAC;CAC/F;AAED,wBAAgB,sBAAsB,CAAC,EACnC,UAAU,EACV,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,wBAAwB,GAC3B,EAAE,yBAAyB,SACK,WAAW,CAoC3C"}
|
|
@@ -11,6 +11,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _reactIntl = require("react-intl");
|
|
12
12
|
var _TargetGroupForm = require("./TargetGroupForm");
|
|
13
13
|
var _TargetGroupsGrid = require("./TargetGroupsGrid");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
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); }
|
|
15
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; }
|
|
16
17
|
function createTargetGroupsPage(_ref) {
|
|
@@ -27,31 +28,40 @@ function createTargetGroupsPage(_ref) {
|
|
|
27
28
|
acc[scopePart] = completeScope[scopePart];
|
|
28
29
|
return acc;
|
|
29
30
|
}, {});
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Stack, {
|
|
31
32
|
topLevelTitle: intl.formatMessage({
|
|
32
33
|
id: "cometBrevoModule.targetGroups.targetGroups",
|
|
33
34
|
defaultMessage: "Target groups"
|
|
35
|
+
}),
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.StackSwitch, {
|
|
37
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.StackPage, {
|
|
38
|
+
name: "grid",
|
|
39
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Toolbar, {
|
|
40
|
+
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_cmsAdmin.ContentScopeIndicator, {
|
|
41
|
+
scope: scope
|
|
42
|
+
})
|
|
43
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TargetGroupsGrid.TargetGroupsGrid, {
|
|
44
|
+
scope: scope,
|
|
45
|
+
exportTargetGroupOptions: exportTargetGroupOptions
|
|
46
|
+
})]
|
|
47
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPage, {
|
|
48
|
+
name: "edit",
|
|
49
|
+
title: intl.formatMessage({
|
|
50
|
+
id: "cometBrevoModule.targetGroups.editTargetGroup",
|
|
51
|
+
defaultMessage: "Edit target group"
|
|
52
|
+
}),
|
|
53
|
+
children: function children(selectedId) {
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TargetGroupForm.TargetGroupForm, {
|
|
55
|
+
id: selectedId,
|
|
56
|
+
scope: scope,
|
|
57
|
+
additionalFormFields: additionalFormFields,
|
|
58
|
+
nodeFragment: nodeFragment,
|
|
59
|
+
input2State: input2State
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
})]
|
|
34
63
|
})
|
|
35
|
-
}
|
|
36
|
-
name: "grid"
|
|
37
|
-
}, /*#__PURE__*/React.createElement(_TargetGroupsGrid.TargetGroupsGrid, {
|
|
38
|
-
scope: scope,
|
|
39
|
-
exportTargetGroupOptions: exportTargetGroupOptions
|
|
40
|
-
})), /*#__PURE__*/React.createElement(_admin.StackPage, {
|
|
41
|
-
name: "edit",
|
|
42
|
-
title: intl.formatMessage({
|
|
43
|
-
id: "cometBrevoModule.targetGroups.editTargetGroup",
|
|
44
|
-
defaultMessage: "Edit target group"
|
|
45
|
-
})
|
|
46
|
-
}, function (selectedId) {
|
|
47
|
-
return /*#__PURE__*/React.createElement(_TargetGroupForm.TargetGroupForm, {
|
|
48
|
-
id: selectedId,
|
|
49
|
-
scope: scope,
|
|
50
|
-
additionalFormFields: additionalFormFields,
|
|
51
|
-
nodeFragment: nodeFragment,
|
|
52
|
-
input2State: input2State
|
|
53
|
-
});
|
|
54
|
-
})));
|
|
64
|
+
});
|
|
55
65
|
}
|
|
56
66
|
return TargetGroupsPage;
|
|
57
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddContactsGridSelect.d.ts","sourceRoot":"","sources":["../../../src/targetGroups/addContacts/AddContactsGridSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddContactsGridSelect.d.ts","sourceRoot":"","sources":["../../../src/targetGroups/addContacts/AddContactsGridSelect.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkH/B,UAAU,0BAA0B;IAChC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC,CAAC,EAAE,MAAM,CAAC;CAC/C;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,kCAAkC,EAAE,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,CA8LvI"}
|