@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
|
@@ -13,6 +13,7 @@ var _EmailCampaignsGrid = require("./EmailCampaignsGrid");
|
|
|
13
13
|
var _EmailCampaignForm = require("./form/EmailCampaignForm");
|
|
14
14
|
var _EmailCampaignStatistics = require("./statistics/EmailCampaignStatistics");
|
|
15
15
|
var _EmailCampaignView = require("./view/EmailCampaignView");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
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); }
|
|
17
18
|
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; }
|
|
18
19
|
function createEmailCampaignsPage(_ref) {
|
|
@@ -26,51 +27,63 @@ function createEmailCampaignsPage(_ref) {
|
|
|
26
27
|
acc[scopePart] = completeScope[scopePart];
|
|
27
28
|
return acc;
|
|
28
29
|
}, {});
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Stack, {
|
|
30
31
|
topLevelTitle: intl.formatMessage({
|
|
31
32
|
id: "cometBrevoModule.emailCampaigns.emailCampaigns",
|
|
32
33
|
defaultMessage: "Email campaigns"
|
|
34
|
+
}),
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.StackSwitch, {
|
|
36
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.StackPage, {
|
|
37
|
+
name: "grid",
|
|
38
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackToolbar, {
|
|
39
|
+
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_cmsAdmin.ContentScopeIndicator, {
|
|
40
|
+
scope: scope
|
|
41
|
+
})
|
|
42
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmailCampaignsGrid.EmailCampaignsGrid, {
|
|
43
|
+
scope: scope,
|
|
44
|
+
EmailCampaignContentBlock: EmailCampaignContentBlock
|
|
45
|
+
})]
|
|
46
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPage, {
|
|
47
|
+
name: "statistics",
|
|
48
|
+
children: function children(selectedId) {
|
|
49
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmailCampaignStatistics.EmailCampaignStatistics, {
|
|
50
|
+
id: selectedId
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPage, {
|
|
54
|
+
name: "view",
|
|
55
|
+
children: function children(selectedId) {
|
|
56
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmailCampaignView.EmailCampaignView, {
|
|
57
|
+
id: selectedId,
|
|
58
|
+
EmailCampaignContentBlock: EmailCampaignContentBlock
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPage, {
|
|
62
|
+
name: "edit",
|
|
63
|
+
title: intl.formatMessage({
|
|
64
|
+
id: "cometBrevoModule.emailCampaigns.editEmailCampaign",
|
|
65
|
+
defaultMessage: "Edit email campaign"
|
|
66
|
+
}),
|
|
67
|
+
children: function children(selectedId) {
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmailCampaignForm.EmailCampaignForm, {
|
|
69
|
+
id: selectedId,
|
|
70
|
+
EmailCampaignContentBlock: EmailCampaignContentBlock,
|
|
71
|
+
scope: scope
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPage, {
|
|
75
|
+
name: "add",
|
|
76
|
+
title: intl.formatMessage({
|
|
77
|
+
id: "cometBrevoModule.emailCampaigns.addEmailCampaign",
|
|
78
|
+
defaultMessage: "Add email campaign"
|
|
79
|
+
}),
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmailCampaignForm.EmailCampaignForm, {
|
|
81
|
+
EmailCampaignContentBlock: EmailCampaignContentBlock,
|
|
82
|
+
scope: scope
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
33
85
|
})
|
|
34
|
-
}
|
|
35
|
-
name: "grid"
|
|
36
|
-
}, /*#__PURE__*/React.createElement(_EmailCampaignsGrid.EmailCampaignsGrid, {
|
|
37
|
-
scope: scope,
|
|
38
|
-
EmailCampaignContentBlock: EmailCampaignContentBlock
|
|
39
|
-
})), /*#__PURE__*/React.createElement(_admin.StackPage, {
|
|
40
|
-
name: "statistics"
|
|
41
|
-
}, function (selectedId) {
|
|
42
|
-
return /*#__PURE__*/React.createElement(_EmailCampaignStatistics.EmailCampaignStatistics, {
|
|
43
|
-
id: selectedId
|
|
44
|
-
});
|
|
45
|
-
}), /*#__PURE__*/React.createElement(_admin.StackPage, {
|
|
46
|
-
name: "view"
|
|
47
|
-
}, function (selectedId) {
|
|
48
|
-
return /*#__PURE__*/React.createElement(_EmailCampaignView.EmailCampaignView, {
|
|
49
|
-
id: selectedId,
|
|
50
|
-
EmailCampaignContentBlock: EmailCampaignContentBlock
|
|
51
|
-
});
|
|
52
|
-
}), /*#__PURE__*/React.createElement(_admin.StackPage, {
|
|
53
|
-
name: "edit",
|
|
54
|
-
title: intl.formatMessage({
|
|
55
|
-
id: "cometBrevoModule.emailCampaigns.editEmailCampaign",
|
|
56
|
-
defaultMessage: "Edit email campaign"
|
|
57
|
-
})
|
|
58
|
-
}, function (selectedId) {
|
|
59
|
-
return /*#__PURE__*/React.createElement(_EmailCampaignForm.EmailCampaignForm, {
|
|
60
|
-
id: selectedId,
|
|
61
|
-
EmailCampaignContentBlock: EmailCampaignContentBlock,
|
|
62
|
-
scope: scope
|
|
63
|
-
});
|
|
64
|
-
}), /*#__PURE__*/React.createElement(_admin.StackPage, {
|
|
65
|
-
name: "add",
|
|
66
|
-
title: intl.formatMessage({
|
|
67
|
-
id: "cometBrevoModule.emailCampaigns.addEmailCampaign",
|
|
68
|
-
defaultMessage: "Add email campaign"
|
|
69
|
-
})
|
|
70
|
-
}, /*#__PURE__*/React.createElement(_EmailCampaignForm.EmailCampaignForm, {
|
|
71
|
-
EmailCampaignContentBlock: EmailCampaignContentBlock,
|
|
72
|
-
scope: scope
|
|
73
|
-
}))));
|
|
86
|
+
});
|
|
74
87
|
}
|
|
75
88
|
return EmailCampaignsPage;
|
|
76
89
|
}
|
|
@@ -9,43 +9,55 @@ var _material = require("@mui/material");
|
|
|
9
9
|
var _styles = require("@mui/material/styles");
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactIntl = require("react-intl");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
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); }
|
|
13
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; }
|
|
14
15
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
15
16
|
var SendingStateColumn = exports.SendingStateColumn = function SendingStateColumn(_ref) {
|
|
16
17
|
var sendingState = _ref.sendingState;
|
|
17
18
|
var intl = (0, _reactIntl.useIntl)();
|
|
18
|
-
return /*#__PURE__*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, {
|
|
20
|
+
children: [sendingState === "SENT" && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
21
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DeliveredIndicator, {
|
|
22
|
+
title: intl.formatMessage({
|
|
23
|
+
id: "cometBrevoModule.emailCampaigns.sendingState.sent",
|
|
24
|
+
defaultMessage: "Sent"
|
|
25
|
+
})
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
27
|
+
variant: "body2",
|
|
28
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
29
|
+
id: "cometBrevoModule.emailCampaigns.sendingState.sent",
|
|
30
|
+
defaultMessage: "Sent"
|
|
31
|
+
})
|
|
32
|
+
})]
|
|
33
|
+
}), sendingState === "SCHEDULED" && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ScheduledIndicator, {
|
|
35
|
+
title: intl.formatMessage({
|
|
36
|
+
id: "cometBrevoModule.emailCampaigns.sendingState.scheduled",
|
|
37
|
+
defaultMessage: "Scheduled"
|
|
38
|
+
})
|
|
39
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
40
|
+
variant: "body2",
|
|
41
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
42
|
+
id: "cometBrevoModule.emailCampaigns.sendingState.scheduled",
|
|
43
|
+
defaultMessage: "Scheduled"
|
|
44
|
+
})
|
|
45
|
+
})]
|
|
46
|
+
}), sendingState === "DRAFT" && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DraftIndicator, {
|
|
48
|
+
title: intl.formatMessage({
|
|
49
|
+
id: "cometBrevoModule.emailCampaigns.draft",
|
|
50
|
+
defaultMessage: "Draft"
|
|
51
|
+
})
|
|
52
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
53
|
+
variant: "body2",
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
55
|
+
id: "cometBrevoModule.emailCampaigns.sendingState.draft",
|
|
56
|
+
defaultMessage: "Draft"
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
49
61
|
};
|
|
50
62
|
var Root = /*#__PURE__*/(0, _styles.styled)("div", process.env.NODE_ENV === "production" ? {
|
|
51
63
|
target: "e1docm514"
|
|
@@ -8,26 +8,29 @@ exports.ConfigFields = void 0;
|
|
|
8
8
|
var _admin = require("@comet/admin");
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
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); }
|
|
12
13
|
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; }
|
|
13
14
|
var ConfigFields = exports.ConfigFields = function ConfigFields() {
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
16
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
|
|
17
|
+
required: true,
|
|
18
|
+
fullWidth: true,
|
|
19
|
+
name: "title",
|
|
20
|
+
component: _admin.FinalFormInput,
|
|
21
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
22
|
+
id: "cometBrevoModule.emailCampaigns.title",
|
|
23
|
+
defaultMessage: "Title"
|
|
24
|
+
})
|
|
25
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
|
|
26
|
+
required: true,
|
|
27
|
+
fullWidth: true,
|
|
28
|
+
name: "subject",
|
|
29
|
+
component: _admin.FinalFormInput,
|
|
30
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
31
|
+
id: "cometBrevoModule.emailCampaigns.subject",
|
|
32
|
+
defaultMessage: "Subject"
|
|
33
|
+
})
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
33
36
|
};
|
|
@@ -6,6 +6,6 @@ interface FormProps {
|
|
|
6
6
|
EmailCampaignContentBlock: BlockInterface;
|
|
7
7
|
scope: ContentScopeInterface;
|
|
8
8
|
}
|
|
9
|
-
export declare function EmailCampaignForm({ id, EmailCampaignContentBlock, scope }: FormProps): React.
|
|
9
|
+
export declare function EmailCampaignForm({ id, EmailCampaignContentBlock, scope }: FormProps): React.JSX.Element | null;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=EmailCampaignForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailCampaignForm.d.ts","sourceRoot":"","sources":["../../../src/emailCampaigns/form/EmailCampaignForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAGH,cAAc,EAKjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"EmailCampaignForm.d.ts","sourceRoot":"","sources":["../../../src/emailCampaigns/form/EmailCampaignForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAGH,cAAc,EAKjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,qBAAqB,EAQxB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAkB,MAAM,OAAO,CAAC;AAoBvC,UAAU,SAAS;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yBAAyB,EAAE,cAAc,CAAC;IAC1C,KAAK,EAAE,qBAAqB,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,yBAAyB,EAAE,KAAK,EAAE,EAAE,SAAS,4BAsPpF"}
|
|
@@ -19,6 +19,7 @@ var _ConfigFields = require("./ConfigFields");
|
|
|
19
19
|
var _EmailCampaignForm = require("./EmailCampaignForm.gql");
|
|
20
20
|
var _SendManagerFields = require("./SendManagerFields");
|
|
21
21
|
var _TestEmailCampaignForm = require("./TestEmailCampaignForm");
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
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); }
|
|
23
24
|
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; }
|
|
24
25
|
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); }
|
|
@@ -308,11 +309,11 @@ function EmailCampaignForm(_ref) {
|
|
|
308
309
|
return _saveEmailCampaign.apply(this, arguments);
|
|
309
310
|
}
|
|
310
311
|
if (!state) {
|
|
311
|
-
return
|
|
312
|
+
return null;
|
|
312
313
|
}
|
|
313
314
|
if (error) throw error;
|
|
314
315
|
if (loading) {
|
|
315
|
-
return /*#__PURE__*/
|
|
316
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Loading, {
|
|
316
317
|
behavior: "fillPageHeight"
|
|
317
318
|
});
|
|
318
319
|
}
|
|
@@ -327,76 +328,103 @@ function EmailCampaignForm(_ref) {
|
|
|
327
328
|
};
|
|
328
329
|
var isScheduledDateInPast = state.scheduledAt != undefined && (0, _dateFns.isBefore)(new Date(state.scheduledAt), new Date());
|
|
329
330
|
var isSchedulingDisabled = state.sendingState === "SENT" || mode === "add" || state.targetGroups.length === 0 || isScheduledDateInPast;
|
|
330
|
-
return /*#__PURE__*/
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
331
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
332
|
+
children: [saveConflict.dialogs, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.Toolbar, {
|
|
333
|
+
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_cmsAdmin.ContentScopeIndicator, {
|
|
334
|
+
scope: scope
|
|
335
|
+
}),
|
|
336
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarItem, {
|
|
337
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
338
|
+
onClick: stackApi === null || stackApi === void 0 ? void 0 : stackApi.goBack,
|
|
339
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.ArrowLeft, {})
|
|
340
|
+
})
|
|
341
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarTitleItem, {
|
|
342
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
343
|
+
id: "cometBrevoModule.emailCampaigns.EmailCampaign",
|
|
344
|
+
defaultMessage: "Email Campaign"
|
|
345
|
+
})
|
|
346
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarFillSpace, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarActions, {
|
|
347
|
+
children: saveButton
|
|
348
|
+
})]
|
|
349
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.MainContent, {
|
|
350
|
+
disablePaddingBottom: true,
|
|
351
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_cmsAdmin.BlockPreviewWithTabs, {
|
|
352
|
+
previewUrl: previewUrl,
|
|
353
|
+
previewState: previewState,
|
|
354
|
+
previewApi: previewApi,
|
|
355
|
+
children: [{
|
|
356
|
+
key: "config",
|
|
357
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocksAdmin.AdminTabLabel, {
|
|
358
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
359
|
+
id: "cometBrevoModule.emailCampaigns.config",
|
|
360
|
+
defaultMessage: "Config"
|
|
361
|
+
})
|
|
362
|
+
}),
|
|
363
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocksAdmin.BlocksFinalForm, {
|
|
364
|
+
onSubmit: function onSubmit(values) {
|
|
365
|
+
return setState(_objectSpread(_objectSpread({}, state), values));
|
|
366
|
+
},
|
|
367
|
+
initialValues: {
|
|
368
|
+
title: state.title,
|
|
369
|
+
subject: state.subject
|
|
370
|
+
},
|
|
371
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigFields.ConfigFields, {})
|
|
372
|
+
})
|
|
373
|
+
}, {
|
|
374
|
+
key: "blocks",
|
|
375
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocksAdmin.AdminTabLabel, {
|
|
376
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
377
|
+
id: "cometBrevoModule.emailCampaigns.blocks",
|
|
378
|
+
defaultMessage: "Blocks"
|
|
379
|
+
})
|
|
380
|
+
}),
|
|
381
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocksAdmin.BlocksFinalForm, {
|
|
382
|
+
onSubmit: function onSubmit(values) {
|
|
383
|
+
return setState(_objectSpread(_objectSpread({}, state), values));
|
|
384
|
+
},
|
|
385
|
+
initialValues: {
|
|
386
|
+
content: state === null || state === void 0 ? void 0 : state.content
|
|
387
|
+
},
|
|
388
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocksAdmin.AdminComponentRoot, {
|
|
389
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Field, {
|
|
390
|
+
name: "content",
|
|
391
|
+
fullWidth: true,
|
|
392
|
+
required: true,
|
|
393
|
+
component: FinalFormEmailCampaignContentBlock
|
|
394
|
+
})
|
|
395
|
+
})
|
|
396
|
+
})
|
|
397
|
+
}, {
|
|
398
|
+
key: "send-manager",
|
|
399
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocksAdmin.AdminTabLabel, {
|
|
400
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
401
|
+
id: "cometBrevoModule.emailCampaigns.sendManager",
|
|
402
|
+
defaultMessage: "Send manager"
|
|
403
|
+
})
|
|
404
|
+
}),
|
|
405
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_blocksAdmin.BlocksFinalForm, {
|
|
406
|
+
onSubmit: function onSubmit(values) {
|
|
407
|
+
return setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
408
|
+
scheduledAt: values.scheduledAt,
|
|
409
|
+
targetGroups: values.targetGroups
|
|
410
|
+
}));
|
|
411
|
+
},
|
|
412
|
+
initialValues: {
|
|
413
|
+
targetGroups: state.targetGroups,
|
|
414
|
+
scheduledAt: state.scheduledAt
|
|
415
|
+
},
|
|
416
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SendManagerFields.SendManagerFields, {
|
|
417
|
+
scope: scope,
|
|
418
|
+
isSchedulingDisabled: isSchedulingDisabled,
|
|
419
|
+
isSendable: !hasChanges && state.targetGroups != undefined,
|
|
420
|
+
id: id
|
|
421
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TestEmailCampaignForm.TestEmailCampaignForm, {
|
|
422
|
+
id: id,
|
|
423
|
+
isSendable: !hasChanges && state.targetGroups != undefined
|
|
424
|
+
})]
|
|
425
|
+
})
|
|
426
|
+
}]
|
|
427
|
+
})
|
|
428
|
+
})]
|
|
429
|
+
});
|
|
402
430
|
}
|
|
@@ -8,26 +8,35 @@ var _admin = require("@comet/admin");
|
|
|
8
8
|
var _material = require("@mui/material");
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
13
|
var SendEmailCampaignNowDialog = exports.SendEmailCampaignNowDialog = function SendEmailCampaignNowDialog(_ref) {
|
|
13
14
|
var dialogOpen = _ref.dialogOpen,
|
|
14
15
|
handleNoClick = _ref.handleNoClick,
|
|
15
16
|
handleYesClick = _ref.handleYesClick;
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Dialog, {
|
|
17
18
|
open: dialogOpen,
|
|
18
|
-
onClose: handleNoClick
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
onClose: handleNoClick,
|
|
20
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogTitle, {
|
|
21
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
22
|
+
id: "cometBrevoModule.emailCampaigns.sendNow.dialog.title",
|
|
23
|
+
defaultMessage: "Send email campaign now?"
|
|
24
|
+
})
|
|
25
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogContent, {
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
27
|
+
id: "cometBrevoModule.emailCampaigns.sendNow.dialog.contentText",
|
|
28
|
+
defaultMessage: "Are you sure you want to send the email campaign now?"
|
|
29
|
+
})
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, {
|
|
31
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.CancelButton, {
|
|
32
|
+
onClick: handleNoClick
|
|
33
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.SaveButton, {
|
|
34
|
+
onClick: handleYesClick,
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
36
|
+
id: "cometBrevoModule.emailCampaigns.sendNow.dialog.sendText",
|
|
37
|
+
defaultMessage: "Send now"
|
|
38
|
+
})
|
|
39
|
+
})]
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
33
42
|
};
|