@carlonicora/nextjs-jsonapi 5.7.0 → 5.7.1
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/dist/{BlockNoteEditor-ZHXXFWUJ.js → BlockNoteEditor-ARUXU5AV.js} +9 -9
- package/dist/{BlockNoteEditor-ZHXXFWUJ.js.map → BlockNoteEditor-ARUXU5AV.js.map} +1 -1
- package/dist/{BlockNoteEditor-R3WXUFHX.mjs → BlockNoteEditor-MNNISNVN.mjs} +2 -2
- package/dist/billing/index.js +381 -380
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +3 -2
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-CFB6FHIY.mjs → chunk-2FNSDBJG.mjs} +9 -6
- package/dist/chunk-2FNSDBJG.mjs.map +1 -0
- package/dist/{chunk-ZCOPOO7T.js → chunk-2WK35GO2.js} +10 -7
- package/dist/chunk-2WK35GO2.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +58 -58
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +87 -87
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +74 -74
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/features/billing/stripe-coupon/components/containers/CouponContainer.tsx +2 -2
- package/src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx +1 -11
- package/src/features/billing/stripe-coupon/utils/__tests__/coupon-page-module.spec.ts +32 -0
- package/src/features/billing/stripe-coupon/utils/coupon-page-module.ts +13 -0
- package/dist/chunk-CFB6FHIY.mjs.map +0 -1
- package/dist/chunk-ZCOPOO7T.js.map +0 -1
- /package/dist/{BlockNoteEditor-R3WXUFHX.mjs.map → BlockNoteEditor-MNNISNVN.mjs.map} +0 -0
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk2WK35GO2js = require('../chunk-2WK35GO2.js');
|
|
35
35
|
require('../chunk-XOSC3FFP.js');
|
|
36
36
|
require('../chunk-G4JR3SFV.js');
|
|
37
37
|
|
|
@@ -123,7 +123,7 @@ function EmailAutomationEditorInternal({
|
|
|
123
123
|
defaultValues: getDefaultValues()
|
|
124
124
|
});
|
|
125
125
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
126
|
-
|
|
126
|
+
_chunk2WK35GO2js.EditorSheet,
|
|
127
127
|
{
|
|
128
128
|
form,
|
|
129
129
|
entityType: t("emailAutomations.admin.title"),
|
|
@@ -153,9 +153,9 @@ function EmailAutomationEditorInternal({
|
|
|
153
153
|
dialogOpen,
|
|
154
154
|
onDialogOpenChange,
|
|
155
155
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
156
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
156
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.FormInput, { form, id: "name", name: t("emailAutomations.fields.name.label"), isRequired: true }),
|
|
157
157
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
158
|
-
|
|
158
|
+
_chunk2WK35GO2js.FormSelect,
|
|
159
159
|
{
|
|
160
160
|
form,
|
|
161
161
|
id: "trigger",
|
|
@@ -166,7 +166,7 @@ function EmailAutomationEditorInternal({
|
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
168
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
169
|
-
|
|
169
|
+
_chunk2WK35GO2js.FormSelect,
|
|
170
170
|
{
|
|
171
171
|
form,
|
|
172
172
|
id: "exitTrigger",
|
|
@@ -176,9 +176,9 @@ function EmailAutomationEditorInternal({
|
|
|
176
176
|
allowEmpty: true
|
|
177
177
|
}
|
|
178
178
|
),
|
|
179
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
179
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.FormInput, { form, id: "replyTo", name: t("emailAutomations.fields.replyTo.label") }),
|
|
180
180
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
181
|
-
|
|
181
|
+
_chunk2WK35GO2js.FormSwitch,
|
|
182
182
|
{
|
|
183
183
|
form,
|
|
184
184
|
id: "isActive",
|
|
@@ -202,7 +202,7 @@ var EmailAutomationEditor_default = EmailAutomationEditor;
|
|
|
202
202
|
function EmailAutomationsList({ fullWidth } = {}) {
|
|
203
203
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
204
204
|
const [triggers, setTriggers] = _react.useState.call(void 0, []);
|
|
205
|
-
const data =
|
|
205
|
+
const data = _chunk2WK35GO2js.useDataListRetriever.call(void 0, {
|
|
206
206
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5TH2DSAHjs.EmailAutomationService.findMany(params), "retriever"),
|
|
207
207
|
retrieverParams: {},
|
|
208
208
|
module: _chunk5TH2DSAHjs.Modules.EmailAutomation
|
|
@@ -223,7 +223,7 @@ function EmailAutomationsList({ fullWidth } = {}) {
|
|
|
223
223
|
);
|
|
224
224
|
const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationEditor_default, {}, "create-email-automation")];
|
|
225
225
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
226
|
-
|
|
226
|
+
_chunk2WK35GO2js.ContentListTable,
|
|
227
227
|
{
|
|
228
228
|
data,
|
|
229
229
|
fields: [
|
|
@@ -240,7 +240,7 @@ function EmailAutomationsList({ fullWidth } = {}) {
|
|
|
240
240
|
fullWidth,
|
|
241
241
|
title: t("emailAutomations.admin.title"),
|
|
242
242
|
context: { triggerLabels },
|
|
243
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
243
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.EmptyState, { icon: _lucidereact.MailIcon, title: t("emailAutomations.admin.empty") })
|
|
244
244
|
}
|
|
245
245
|
);
|
|
246
246
|
}
|
|
@@ -251,7 +251,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsList, "EmailAutomationsList
|
|
|
251
251
|
function EmailAutomationsListContainer() {
|
|
252
252
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
253
253
|
const breadcrumbs = [{ name: t("emailAutomations.admin.title") }];
|
|
254
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
254
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SharedProvider, { value: { breadcrumbs, title: { type: t("emailAutomations.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.RoundPageContainer, { module: _chunk5TH2DSAHjs.Modules.EmailAutomation, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationsList, { fullWidth: true }) }) });
|
|
255
255
|
}
|
|
256
256
|
_chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsListContainer, "EmailAutomationsListContainer");
|
|
257
257
|
|
|
@@ -405,17 +405,17 @@ function EmailAutomationActiveSwitch() {
|
|
|
405
405
|
});
|
|
406
406
|
await reload();
|
|
407
407
|
} catch (error) {
|
|
408
|
-
|
|
408
|
+
_chunk2WK35GO2js.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
409
409
|
} finally {
|
|
410
410
|
setSaving(false);
|
|
411
411
|
}
|
|
412
412
|
}, "toggle");
|
|
413
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
414
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
415
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
413
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Tooltip, { children: [
|
|
414
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: "flex items-center gap-x-2" }), children: [
|
|
415
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Switch, { checked: automation.isActive, onCheckedChange: (checked) => void toggle(checked), disabled: saving }),
|
|
416
416
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs", children: t("emailAutomations.fields.isActive.label") })
|
|
417
417
|
] }),
|
|
418
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
418
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TooltipContent, { className: "max-w-xs", children: t("emailAutomations.fields.isActive.help") })
|
|
419
419
|
] });
|
|
420
420
|
}
|
|
421
421
|
_chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationActiveSwitch, "EmailAutomationActiveSwitch");
|
|
@@ -448,7 +448,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
448
448
|
const { zoomIn, zoomOut, fitView } = _react3.useReactFlow.call(void 0, );
|
|
449
449
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-help": "canvas.toolbar", className: "absolute end-2 top-2 z-10 flex flex-col gap-1 max-md:top-14", children: [
|
|
450
450
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
451
|
-
|
|
451
|
+
_chunk2WK35GO2js.Button,
|
|
452
452
|
{
|
|
453
453
|
type: "button",
|
|
454
454
|
variant: "outline",
|
|
@@ -459,7 +459,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
459
459
|
}
|
|
460
460
|
),
|
|
461
461
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
462
|
-
|
|
462
|
+
_chunk2WK35GO2js.Button,
|
|
463
463
|
{
|
|
464
464
|
type: "button",
|
|
465
465
|
variant: "outline",
|
|
@@ -470,7 +470,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
470
470
|
}
|
|
471
471
|
),
|
|
472
472
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
473
|
-
|
|
473
|
+
_chunk2WK35GO2js.Button,
|
|
474
474
|
{
|
|
475
475
|
type: "button",
|
|
476
476
|
variant: "outline",
|
|
@@ -481,7 +481,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
481
481
|
}
|
|
482
482
|
),
|
|
483
483
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
484
|
-
|
|
484
|
+
_chunk2WK35GO2js.Button,
|
|
485
485
|
{
|
|
486
486
|
type: "button",
|
|
487
487
|
variant: "outline",
|
|
@@ -772,7 +772,7 @@ function EmailStepEditorInternal({
|
|
|
772
772
|
defaultValues: getDefaultValues()
|
|
773
773
|
});
|
|
774
774
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
775
|
-
|
|
775
|
+
_chunk2WK35GO2js.EditorSheet,
|
|
776
776
|
{
|
|
777
777
|
form,
|
|
778
778
|
entityType: t("emailAutomations.step.title"),
|
|
@@ -804,9 +804,9 @@ function EmailStepEditorInternal({
|
|
|
804
804
|
dialogOpen,
|
|
805
805
|
onDialogOpenChange,
|
|
806
806
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
807
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
807
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.FormInput, { form, id: "subject", name: t("emailAutomations.step.fields.subject.label"), isRequired: true }),
|
|
808
808
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
809
|
-
|
|
809
|
+
_chunk2WK35GO2js.FormInput,
|
|
810
810
|
{
|
|
811
811
|
form,
|
|
812
812
|
id: "delayHours",
|
|
@@ -816,7 +816,7 @@ function EmailStepEditorInternal({
|
|
|
816
816
|
}
|
|
817
817
|
),
|
|
818
818
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
819
|
-
|
|
819
|
+
_chunk2WK35GO2js.FormTextarea,
|
|
820
820
|
{
|
|
821
821
|
form,
|
|
822
822
|
id: "body",
|
|
@@ -995,7 +995,7 @@ function EmailAutomationCanvas() {
|
|
|
995
995
|
try {
|
|
996
996
|
await setNext(stepId, nextStepId);
|
|
997
997
|
} catch (error) {
|
|
998
|
-
|
|
998
|
+
_chunk2WK35GO2js.errorToast.call(void 0, { title: t("emailAutomations.canvas.chainError"), error });
|
|
999
999
|
await reload();
|
|
1000
1000
|
}
|
|
1001
1001
|
},
|
|
@@ -1127,7 +1127,7 @@ function EmailAutomationCanvas() {
|
|
|
1127
1127
|
try {
|
|
1128
1128
|
await deleteStep(stepId);
|
|
1129
1129
|
} catch (error) {
|
|
1130
|
-
|
|
1130
|
+
_chunk2WK35GO2js.errorToast.call(void 0, { title: t("emailAutomations.canvas.deleteEmail"), error });
|
|
1131
1131
|
throw error;
|
|
1132
1132
|
}
|
|
1133
1133
|
}, [pendingDeleteStepId, deleteStep, t]);
|
|
@@ -1190,7 +1190,7 @@ function EmailAutomationCanvas() {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
),
|
|
1192
1192
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1193
|
-
|
|
1193
|
+
_chunk2WK35GO2js.ConfirmDialog,
|
|
1194
1194
|
{
|
|
1195
1195
|
open: pendingDeleteStepId !== null,
|
|
1196
1196
|
onOpenChange: (open) => {
|
|
@@ -1205,20 +1205,20 @@ function EmailAutomationCanvas() {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
),
|
|
1207
1207
|
paneMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1208
|
-
|
|
1208
|
+
_chunk2WK35GO2js.ContextMenu,
|
|
1209
1209
|
{
|
|
1210
1210
|
open: true,
|
|
1211
1211
|
onOpenChange: (open) => {
|
|
1212
1212
|
if (!open) setPaneMenu(null);
|
|
1213
1213
|
},
|
|
1214
1214
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1215
|
-
|
|
1215
|
+
_chunk2WK35GO2js.ContextMenuContent,
|
|
1216
1216
|
{
|
|
1217
1217
|
anchor: pointAnchor(paneMenu.screenX, paneMenu.screenY),
|
|
1218
1218
|
side: "bottom",
|
|
1219
1219
|
align: "start",
|
|
1220
1220
|
sideOffset: 4,
|
|
1221
|
-
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1221
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.ContextMenuItem, { onClick: handleCreateStepFromPane, children: [
|
|
1222
1222
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PlusIcon, {}),
|
|
1223
1223
|
t("emailAutomations.canvas.addEmail")
|
|
1224
1224
|
] })
|
|
@@ -1227,21 +1227,21 @@ function EmailAutomationCanvas() {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
),
|
|
1229
1229
|
nodeMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1230
|
-
|
|
1230
|
+
_chunk2WK35GO2js.ContextMenu,
|
|
1231
1231
|
{
|
|
1232
1232
|
open: true,
|
|
1233
1233
|
onOpenChange: (open) => {
|
|
1234
1234
|
if (!open) setNodeMenu(null);
|
|
1235
1235
|
},
|
|
1236
1236
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1237
|
-
|
|
1237
|
+
_chunk2WK35GO2js.ContextMenuContent,
|
|
1238
1238
|
{
|
|
1239
1239
|
anchor: pointAnchor(nodeMenu.screenX, nodeMenu.screenY),
|
|
1240
1240
|
side: "bottom",
|
|
1241
1241
|
align: "start",
|
|
1242
1242
|
sideOffset: 4,
|
|
1243
1243
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1244
|
-
|
|
1244
|
+
_chunk2WK35GO2js.ContextMenuItem,
|
|
1245
1245
|
{
|
|
1246
1246
|
onClick: () => {
|
|
1247
1247
|
const menu = nodeMenu;
|
|
@@ -1282,7 +1282,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, TriggerAutomationEditor, "TriggerAutomation
|
|
|
1282
1282
|
// src/features/email-automation/components/canvas/EmailAutomationCanvasTab.tsx
|
|
1283
1283
|
|
|
1284
1284
|
function EmailAutomationCanvasTab() {
|
|
1285
|
-
const { open, setOpen } =
|
|
1285
|
+
const { open, setOpen } = _chunk2WK35GO2js.useSidebar.call(void 0, );
|
|
1286
1286
|
_react.useEffect.call(void 0, () => {
|
|
1287
1287
|
const prev = open;
|
|
1288
1288
|
if (prev) setOpen(false);
|
|
@@ -1303,7 +1303,7 @@ function EmailAutomationRecipientsList() {
|
|
|
1303
1303
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1304
1304
|
const { automation } = useEmailAutomation();
|
|
1305
1305
|
const [statusFilter, setStatusFilter] = _react.useState.call(void 0, "all");
|
|
1306
|
-
const data =
|
|
1306
|
+
const data = _chunk2WK35GO2js.useDataListRetriever.call(void 0, {
|
|
1307
1307
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5TH2DSAHjs.EmailAutomationService.findEnrollments(params), "retriever"),
|
|
1308
1308
|
retrieverParams: { automationId: _optionalChain([automation, 'optionalAccess', _44 => _44.id]) },
|
|
1309
1309
|
module: _chunk5TH2DSAHjs.Modules.EmailAutomationEnrollment
|
|
@@ -1325,21 +1325,21 @@ function EmailAutomationRecipientsList() {
|
|
|
1325
1325
|
[t]
|
|
1326
1326
|
);
|
|
1327
1327
|
const filters = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4", children: [
|
|
1328
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1329
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1330
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1331
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1332
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1333
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1334
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1335
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1336
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1328
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Select, { items: statusItems, value: statusFilter, onValueChange: handleStatusChange, children: [
|
|
1329
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectTrigger, { className: "w-40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectValue, {}) }),
|
|
1330
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.SelectContent, { children: [
|
|
1331
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectItem, { value: "all", children: t("emailAutomations.recipients.status.all") }),
|
|
1332
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectItem, { value: "active", children: t("emailAutomations.recipients.status.active") }),
|
|
1333
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectItem, { value: "completed", children: t("emailAutomations.recipients.status.completed") }),
|
|
1334
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectItem, { value: "unsubscribed", children: t("emailAutomations.recipients.status.unsubscribed") }),
|
|
1335
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectItem, { value: "exited", children: t("emailAutomations.recipients.status.exited") }),
|
|
1336
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SelectItem, { value: "failed", children: t("emailAutomations.recipients.status.failed") })
|
|
1337
1337
|
] })
|
|
1338
1338
|
] }),
|
|
1339
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1339
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Button, { variant: "outline", size: "icon", onClick: () => void data.refresh(), disabled: !data.isLoaded, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: `h-4 w-4 ${!data.isLoaded ? "animate-spin" : ""}` }) })
|
|
1340
1340
|
] });
|
|
1341
1341
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1342
|
-
|
|
1342
|
+
_chunk2WK35GO2js.ContentListTable,
|
|
1343
1343
|
{
|
|
1344
1344
|
data,
|
|
1345
1345
|
fields: [
|
|
@@ -1367,7 +1367,7 @@ function EmailAutomationContainer({ automationId }) {
|
|
|
1367
1367
|
_chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationContainer, "EmailAutomationContainer");
|
|
1368
1368
|
function EmailAutomationShell() {
|
|
1369
1369
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1370
|
-
const generateUrl =
|
|
1370
|
+
const generateUrl = _chunk2WK35GO2js.usePageUrlGenerator.call(void 0, );
|
|
1371
1371
|
const { automation, reload } = useEmailAutomation();
|
|
1372
1372
|
if (!automation) return null;
|
|
1373
1373
|
const breadcrumbs = [
|
|
@@ -1375,7 +1375,7 @@ function EmailAutomationShell() {
|
|
|
1375
1375
|
{ name: automation.name }
|
|
1376
1376
|
];
|
|
1377
1377
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1378
|
-
|
|
1378
|
+
_chunk2WK35GO2js.SharedProvider,
|
|
1379
1379
|
{
|
|
1380
1380
|
value: {
|
|
1381
1381
|
breadcrumbs,
|
|
@@ -1389,7 +1389,7 @@ function EmailAutomationShell() {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
},
|
|
1391
1391
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1392
|
-
|
|
1392
|
+
_chunk2WK35GO2js.RoundPageContainer,
|
|
1393
1393
|
{
|
|
1394
1394
|
module: _chunk5TH2DSAHjs.Modules.EmailAutomation,
|
|
1395
1395
|
id: automation.id,
|
|
@@ -1461,16 +1461,16 @@ function EmailUnsubscribe({ token, scope }) {
|
|
|
1461
1461
|
if (state === "error") {
|
|
1462
1462
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
|
|
1463
1463
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-destructive/10 rounded-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.XCircle, { className: "text-destructive h-12 w-12" }) }),
|
|
1464
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1464
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.invalidTitle") }),
|
|
1465
1465
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.invalidBody") })
|
|
1466
1466
|
] });
|
|
1467
1467
|
}
|
|
1468
1468
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
|
|
1469
1469
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary/10 rounded-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckCircle, { className: "text-primary h-12 w-12" }) }),
|
|
1470
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1470
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.title") }),
|
|
1471
1471
|
stoppedScope === "all" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.stoppedAll") }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1472
1472
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.stoppedAutomation", { name: automationName }) }),
|
|
1473
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1473
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Button, { variant: "secondary", onClick: stopAll, disabled: isStoppingAll, children: [
|
|
1474
1474
|
isStoppingAll && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
1475
1475
|
t("emailAutomations.unsubscribe.alsoStopAll")
|
|
1476
1476
|
] })
|
|
@@ -1485,7 +1485,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailUnsubscribe, "EmailUnsubscribe");
|
|
|
1485
1485
|
|
|
1486
1486
|
var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
1487
1487
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1488
|
-
const generateUrl =
|
|
1488
|
+
const generateUrl = _chunk2WK35GO2js.usePageUrlGenerator.call(void 0, );
|
|
1489
1489
|
const triggerLabels = _nullishCoalesce(_optionalChain([params, 'access', _47 => _47.context, 'optionalAccess', _48 => _48.triggerLabels]), () => ( {}));
|
|
1490
1490
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
1491
1491
|
return params.data.map((automation) => {
|
|
@@ -1514,7 +1514,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
|
|
|
1514
1514
|
header: t("emailAutomations.list.columns.name"),
|
|
1515
1515
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
1516
1516
|
const automation = row.original.jsonApiData;
|
|
1517
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1517
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Link, { href: generateUrl({ page: _chunk5TH2DSAHjs.Modules.EmailAutomation, id: automation.id }), children: automation.name });
|
|
1518
1518
|
}, "cell"),
|
|
1519
1519
|
enableSorting: false,
|
|
1520
1520
|
enableHiding: false
|
|
@@ -1537,7 +1537,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
|
|
|
1537
1537
|
header: t("emailAutomations.list.columns.status"),
|
|
1538
1538
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
1539
1539
|
const automation = row.original.jsonApiData;
|
|
1540
|
-
return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1540
|
+
return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Badge, { variant: "softGreen", children: t("emailAutomations.list.status.on") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Badge, { variant: "softGray", children: t("emailAutomations.list.status.off") });
|
|
1541
1541
|
}, "cell"),
|
|
1542
1542
|
enableSorting: false,
|
|
1543
1543
|
enableHiding: false
|
|
@@ -1560,7 +1560,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
|
|
|
1560
1560
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
1561
1561
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
1562
1562
|
}, "useEmailAutomationTableStructure");
|
|
1563
|
-
|
|
1563
|
+
_chunk2WK35GO2js.registerTableGenerator.call(void 0, "email-automations", useEmailAutomationTableStructure);
|
|
1564
1564
|
|
|
1565
1565
|
// src/features/email-automation/hooks/useEmailAutomationEnrollmentTableStructure.tsx
|
|
1566
1566
|
|
|
@@ -1616,7 +1616,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
|
|
|
1616
1616
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
1617
1617
|
const enrollment = row.original.jsonApiData;
|
|
1618
1618
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1619
|
-
|
|
1619
|
+
_chunk2WK35GO2js.Badge,
|
|
1620
1620
|
{
|
|
1621
1621
|
variant: _nullishCoalesce(STATUS_VARIANTS[enrollment.status], () => ( "softGray")),
|
|
1622
1622
|
title: enrollment.status === "failed" ? enrollment.lastError : void 0,
|
|
@@ -1667,7 +1667,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
|
|
|
1667
1667
|
}, [params.fields, fieldColumnMap, t, locale]);
|
|
1668
1668
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
1669
1669
|
}, "useEmailAutomationEnrollmentTableStructure");
|
|
1670
|
-
|
|
1670
|
+
_chunk2WK35GO2js.registerTableGenerator.call(void 0, "email-automation-enrollments", useEmailAutomationEnrollmentTableStructure);
|
|
1671
1671
|
|
|
1672
1672
|
|
|
1673
1673
|
|