@carlonicora/nextjs-jsonapi 6.14.0 → 6.14.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-QIVV2OB4.mjs → BlockNoteEditor-I3J6YYXK.mjs} +2 -2
- package/dist/{BlockNoteEditor-CUNH4LSQ.js → BlockNoteEditor-UIAX72XW.js} +9 -9
- package/dist/{BlockNoteEditor-CUNH4LSQ.js.map → BlockNoteEditor-UIAX72XW.js.map} +1 -1
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-GSRTVIIK.js → chunk-RT7XFGIN.js} +222 -218
- package/dist/chunk-RT7XFGIN.js.map +1 -0
- package/dist/{chunk-YKNULEHB.mjs → chunk-RYY7USSW.mjs} +9 -5
- package/dist/chunk-RYY7USSW.mjs.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 +96 -96
- 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 +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/hooks/__tests__/usePageTracker.spec.tsx +61 -0
- package/src/hooks/usePageTracker.ts +17 -7
- package/dist/chunk-GSRTVIIK.js.map +0 -1
- package/dist/chunk-YKNULEHB.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-QIVV2OB4.mjs.map → BlockNoteEditor-I3J6YYXK.mjs.map} +0 -0
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkRT7XFGINjs = require('../chunk-RT7XFGIN.js');
|
|
35
35
|
require('../chunk-3EPNHTMH.js');
|
|
36
36
|
require('../chunk-DJXSCARG.js');
|
|
37
37
|
require('../chunk-G4JR3SFV.js');
|
|
@@ -129,7 +129,7 @@ function EmailAutomationEditorInternal({
|
|
|
129
129
|
defaultValues: getDefaultValues()
|
|
130
130
|
});
|
|
131
131
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
132
|
-
|
|
132
|
+
_chunkRT7XFGINjs.EditorSheet,
|
|
133
133
|
{
|
|
134
134
|
form,
|
|
135
135
|
entityType: t("emailAutomations.admin.title"),
|
|
@@ -159,9 +159,9 @@ function EmailAutomationEditorInternal({
|
|
|
159
159
|
dialogOpen,
|
|
160
160
|
onDialogOpenChange,
|
|
161
161
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
162
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
162
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.FormInput, { form, id: "name", name: t("emailAutomations.fields.name.label"), isRequired: true }),
|
|
163
163
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
164
|
-
|
|
164
|
+
_chunkRT7XFGINjs.FormSelect,
|
|
165
165
|
{
|
|
166
166
|
form,
|
|
167
167
|
id: "trigger",
|
|
@@ -172,7 +172,7 @@ function EmailAutomationEditorInternal({
|
|
|
172
172
|
}
|
|
173
173
|
),
|
|
174
174
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
175
|
-
|
|
175
|
+
_chunkRT7XFGINjs.FormSelect,
|
|
176
176
|
{
|
|
177
177
|
form,
|
|
178
178
|
id: "exitTrigger",
|
|
@@ -182,9 +182,9 @@ function EmailAutomationEditorInternal({
|
|
|
182
182
|
allowEmpty: true
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
185
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.FormInput, { form, id: "replyTo", name: t("emailAutomations.fields.replyTo.label") }),
|
|
186
186
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
187
|
-
|
|
187
|
+
_chunkRT7XFGINjs.FormSwitch,
|
|
188
188
|
{
|
|
189
189
|
form,
|
|
190
190
|
id: "isActive",
|
|
@@ -208,7 +208,7 @@ var EmailAutomationEditor_default = EmailAutomationEditor;
|
|
|
208
208
|
function EmailAutomationsList({ fullWidth } = {}) {
|
|
209
209
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
210
210
|
const [triggers, setTriggers] = _react.useState.call(void 0, []);
|
|
211
|
-
const data =
|
|
211
|
+
const data = _chunkRT7XFGINjs.useDataListRetriever.call(void 0, {
|
|
212
212
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPMESKNKLjs.EmailAutomationService.findMany(params), "retriever"),
|
|
213
213
|
retrieverParams: {},
|
|
214
214
|
module: _chunk4XLDBOSEjs.Modules.EmailAutomation
|
|
@@ -229,7 +229,7 @@ function EmailAutomationsList({ fullWidth } = {}) {
|
|
|
229
229
|
);
|
|
230
230
|
const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationEditor_default, {}, "create-email-automation")];
|
|
231
231
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
232
|
-
|
|
232
|
+
_chunkRT7XFGINjs.ContentListTable,
|
|
233
233
|
{
|
|
234
234
|
data,
|
|
235
235
|
fields: [
|
|
@@ -246,7 +246,7 @@ function EmailAutomationsList({ fullWidth } = {}) {
|
|
|
246
246
|
fullWidth,
|
|
247
247
|
title: t("emailAutomations.admin.title"),
|
|
248
248
|
context: { triggerLabels },
|
|
249
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
249
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.EmptyState, { icon: _lucidereact.MailIcon, title: t("emailAutomations.admin.empty") })
|
|
250
250
|
}
|
|
251
251
|
);
|
|
252
252
|
}
|
|
@@ -257,7 +257,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsList, "EmailAutomationsList
|
|
|
257
257
|
function EmailAutomationsListContainer() {
|
|
258
258
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
259
259
|
const breadcrumbs = [{ name: t("emailAutomations.admin.title") }];
|
|
260
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
260
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SharedProvider, { value: { breadcrumbs, title: { type: t("emailAutomations.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.RoundPageContainer, { module: _chunk4XLDBOSEjs.Modules.EmailAutomation, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationsList, { fullWidth: true }) }) });
|
|
261
261
|
}
|
|
262
262
|
_chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsListContainer, "EmailAutomationsListContainer");
|
|
263
263
|
|
|
@@ -411,17 +411,17 @@ function EmailAutomationActiveSwitch() {
|
|
|
411
411
|
});
|
|
412
412
|
await reload();
|
|
413
413
|
} catch (error) {
|
|
414
|
-
|
|
414
|
+
_chunkRT7XFGINjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
415
415
|
} finally {
|
|
416
416
|
setSaving(false);
|
|
417
417
|
}
|
|
418
418
|
}, "toggle");
|
|
419
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
420
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
421
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
419
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.Tooltip, { children: [
|
|
420
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: "flex items-center gap-x-2" }), children: [
|
|
421
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Switch, { checked: automation.isActive, onCheckedChange: (checked) => void toggle(checked), disabled: saving }),
|
|
422
422
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs", children: t("emailAutomations.fields.isActive.label") })
|
|
423
423
|
] }),
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.TooltipContent, { className: "max-w-xs", children: t("emailAutomations.fields.isActive.help") })
|
|
425
425
|
] });
|
|
426
426
|
}
|
|
427
427
|
_chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationActiveSwitch, "EmailAutomationActiveSwitch");
|
|
@@ -454,7 +454,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
454
454
|
const { zoomIn, zoomOut, fitView } = _react3.useReactFlow.call(void 0, );
|
|
455
455
|
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: [
|
|
456
456
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
457
|
-
|
|
457
|
+
_chunkRT7XFGINjs.Button,
|
|
458
458
|
{
|
|
459
459
|
type: "button",
|
|
460
460
|
variant: "outline",
|
|
@@ -465,7 +465,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
465
465
|
}
|
|
466
466
|
),
|
|
467
467
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
468
|
-
|
|
468
|
+
_chunkRT7XFGINjs.Button,
|
|
469
469
|
{
|
|
470
470
|
type: "button",
|
|
471
471
|
variant: "outline",
|
|
@@ -476,7 +476,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
476
476
|
}
|
|
477
477
|
),
|
|
478
478
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
479
|
-
|
|
479
|
+
_chunkRT7XFGINjs.Button,
|
|
480
480
|
{
|
|
481
481
|
type: "button",
|
|
482
482
|
variant: "outline",
|
|
@@ -487,7 +487,7 @@ function CanvasToolbar({ onTidy }) {
|
|
|
487
487
|
}
|
|
488
488
|
),
|
|
489
489
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
490
|
-
|
|
490
|
+
_chunkRT7XFGINjs.Button,
|
|
491
491
|
{
|
|
492
492
|
type: "button",
|
|
493
493
|
variant: "outline",
|
|
@@ -778,7 +778,7 @@ function EmailStepEditorInternal({
|
|
|
778
778
|
defaultValues: getDefaultValues()
|
|
779
779
|
});
|
|
780
780
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
781
|
-
|
|
781
|
+
_chunkRT7XFGINjs.EditorSheet,
|
|
782
782
|
{
|
|
783
783
|
form,
|
|
784
784
|
entityType: t("emailAutomations.step.title"),
|
|
@@ -810,9 +810,9 @@ function EmailStepEditorInternal({
|
|
|
810
810
|
dialogOpen,
|
|
811
811
|
onDialogOpenChange,
|
|
812
812
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
813
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
813
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.FormInput, { form, id: "subject", name: t("emailAutomations.step.fields.subject.label"), isRequired: true }),
|
|
814
814
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
815
|
-
|
|
815
|
+
_chunkRT7XFGINjs.FormInput,
|
|
816
816
|
{
|
|
817
817
|
form,
|
|
818
818
|
id: "delayHours",
|
|
@@ -822,7 +822,7 @@ function EmailStepEditorInternal({
|
|
|
822
822
|
}
|
|
823
823
|
),
|
|
824
824
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
825
|
-
|
|
825
|
+
_chunkRT7XFGINjs.FormTextarea,
|
|
826
826
|
{
|
|
827
827
|
form,
|
|
828
828
|
id: "body",
|
|
@@ -1001,7 +1001,7 @@ function EmailAutomationCanvas() {
|
|
|
1001
1001
|
try {
|
|
1002
1002
|
await setNext(stepId, nextStepId);
|
|
1003
1003
|
} catch (error) {
|
|
1004
|
-
|
|
1004
|
+
_chunkRT7XFGINjs.errorToast.call(void 0, { title: t("emailAutomations.canvas.chainError"), error });
|
|
1005
1005
|
await reload();
|
|
1006
1006
|
}
|
|
1007
1007
|
},
|
|
@@ -1133,7 +1133,7 @@ function EmailAutomationCanvas() {
|
|
|
1133
1133
|
try {
|
|
1134
1134
|
await deleteStep(stepId);
|
|
1135
1135
|
} catch (error) {
|
|
1136
|
-
|
|
1136
|
+
_chunkRT7XFGINjs.errorToast.call(void 0, { title: t("emailAutomations.canvas.deleteEmail"), error });
|
|
1137
1137
|
throw error;
|
|
1138
1138
|
}
|
|
1139
1139
|
}, [pendingDeleteStepId, deleteStep, t]);
|
|
@@ -1196,7 +1196,7 @@ function EmailAutomationCanvas() {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
),
|
|
1198
1198
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1199
|
-
|
|
1199
|
+
_chunkRT7XFGINjs.ConfirmDialog,
|
|
1200
1200
|
{
|
|
1201
1201
|
open: pendingDeleteStepId !== null,
|
|
1202
1202
|
onOpenChange: (open) => {
|
|
@@ -1211,20 +1211,20 @@ function EmailAutomationCanvas() {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
),
|
|
1213
1213
|
paneMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1214
|
-
|
|
1214
|
+
_chunkRT7XFGINjs.ContextMenu,
|
|
1215
1215
|
{
|
|
1216
1216
|
open: true,
|
|
1217
1217
|
onOpenChange: (open) => {
|
|
1218
1218
|
if (!open) setPaneMenu(null);
|
|
1219
1219
|
},
|
|
1220
1220
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1221
|
-
|
|
1221
|
+
_chunkRT7XFGINjs.ContextMenuContent,
|
|
1222
1222
|
{
|
|
1223
1223
|
anchor: pointAnchor(paneMenu.screenX, paneMenu.screenY),
|
|
1224
1224
|
side: "bottom",
|
|
1225
1225
|
align: "start",
|
|
1226
1226
|
sideOffset: 4,
|
|
1227
|
-
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1227
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.ContextMenuItem, { onClick: handleCreateStepFromPane, children: [
|
|
1228
1228
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PlusIcon, {}),
|
|
1229
1229
|
t("emailAutomations.canvas.addEmail")
|
|
1230
1230
|
] })
|
|
@@ -1233,21 +1233,21 @@ function EmailAutomationCanvas() {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
),
|
|
1235
1235
|
nodeMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1236
|
-
|
|
1236
|
+
_chunkRT7XFGINjs.ContextMenu,
|
|
1237
1237
|
{
|
|
1238
1238
|
open: true,
|
|
1239
1239
|
onOpenChange: (open) => {
|
|
1240
1240
|
if (!open) setNodeMenu(null);
|
|
1241
1241
|
},
|
|
1242
1242
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1243
|
-
|
|
1243
|
+
_chunkRT7XFGINjs.ContextMenuContent,
|
|
1244
1244
|
{
|
|
1245
1245
|
anchor: pointAnchor(nodeMenu.screenX, nodeMenu.screenY),
|
|
1246
1246
|
side: "bottom",
|
|
1247
1247
|
align: "start",
|
|
1248
1248
|
sideOffset: 4,
|
|
1249
1249
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1250
|
-
|
|
1250
|
+
_chunkRT7XFGINjs.ContextMenuItem,
|
|
1251
1251
|
{
|
|
1252
1252
|
onClick: () => {
|
|
1253
1253
|
const menu = nodeMenu;
|
|
@@ -1288,7 +1288,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, TriggerAutomationEditor, "TriggerAutomation
|
|
|
1288
1288
|
// src/features/email-automation/components/canvas/EmailAutomationCanvasTab.tsx
|
|
1289
1289
|
|
|
1290
1290
|
function EmailAutomationCanvasTab() {
|
|
1291
|
-
const { open, setOpen } =
|
|
1291
|
+
const { open, setOpen } = _chunkRT7XFGINjs.useSidebar.call(void 0, );
|
|
1292
1292
|
_react.useEffect.call(void 0, () => {
|
|
1293
1293
|
const prev = open;
|
|
1294
1294
|
if (prev) setOpen(false);
|
|
@@ -1309,7 +1309,7 @@ function EmailAutomationRecipientsList() {
|
|
|
1309
1309
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1310
1310
|
const { automation } = useEmailAutomation();
|
|
1311
1311
|
const [statusFilter, setStatusFilter] = _react.useState.call(void 0, "all");
|
|
1312
|
-
const data =
|
|
1312
|
+
const data = _chunkRT7XFGINjs.useDataListRetriever.call(void 0, {
|
|
1313
1313
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPMESKNKLjs.EmailAutomationService.findEnrollments(params), "retriever"),
|
|
1314
1314
|
retrieverParams: { automationId: _optionalChain([automation, 'optionalAccess', _44 => _44.id]) },
|
|
1315
1315
|
module: _chunk4XLDBOSEjs.Modules.EmailAutomationEnrollment
|
|
@@ -1331,21 +1331,21 @@ function EmailAutomationRecipientsList() {
|
|
|
1331
1331
|
[t]
|
|
1332
1332
|
);
|
|
1333
1333
|
const filters = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4", children: [
|
|
1334
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1335
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1336
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1337
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1338
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1339
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1340
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1341
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1342
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1334
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.Select, { items: statusItems, value: statusFilter, onValueChange: handleStatusChange, children: [
|
|
1335
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectTrigger, { className: "w-40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectValue, {}) }),
|
|
1336
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.SelectContent, { children: [
|
|
1337
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "all", children: t("emailAutomations.recipients.status.all") }),
|
|
1338
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "active", children: t("emailAutomations.recipients.status.active") }),
|
|
1339
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "completed", children: t("emailAutomations.recipients.status.completed") }),
|
|
1340
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "unsubscribed", children: t("emailAutomations.recipients.status.unsubscribed") }),
|
|
1341
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "exited", children: t("emailAutomations.recipients.status.exited") }),
|
|
1342
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "failed", children: t("emailAutomations.recipients.status.failed") })
|
|
1343
1343
|
] })
|
|
1344
1344
|
] }),
|
|
1345
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1345
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.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" : ""}` }) })
|
|
1346
1346
|
] });
|
|
1347
1347
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1348
|
-
|
|
1348
|
+
_chunkRT7XFGINjs.ContentListTable,
|
|
1349
1349
|
{
|
|
1350
1350
|
data,
|
|
1351
1351
|
fields: [
|
|
@@ -1373,7 +1373,7 @@ function EmailAutomationContainer({ automationId }) {
|
|
|
1373
1373
|
_chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationContainer, "EmailAutomationContainer");
|
|
1374
1374
|
function EmailAutomationShell() {
|
|
1375
1375
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1376
|
-
const generateUrl =
|
|
1376
|
+
const generateUrl = _chunkRT7XFGINjs.usePageUrlGenerator.call(void 0, );
|
|
1377
1377
|
const { automation, reload } = useEmailAutomation();
|
|
1378
1378
|
if (!automation) return null;
|
|
1379
1379
|
const breadcrumbs = [
|
|
@@ -1381,7 +1381,7 @@ function EmailAutomationShell() {
|
|
|
1381
1381
|
{ name: automation.name }
|
|
1382
1382
|
];
|
|
1383
1383
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1384
|
-
|
|
1384
|
+
_chunkRT7XFGINjs.SharedProvider,
|
|
1385
1385
|
{
|
|
1386
1386
|
value: {
|
|
1387
1387
|
breadcrumbs,
|
|
@@ -1395,7 +1395,7 @@ function EmailAutomationShell() {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
},
|
|
1397
1397
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1398
|
-
|
|
1398
|
+
_chunkRT7XFGINjs.RoundPageContainer,
|
|
1399
1399
|
{
|
|
1400
1400
|
module: _chunk4XLDBOSEjs.Modules.EmailAutomation,
|
|
1401
1401
|
id: automation.id,
|
|
@@ -1473,16 +1473,16 @@ function EmailUnsubscribe({ token, scope, source = "automation" }) {
|
|
|
1473
1473
|
if (state === "error") {
|
|
1474
1474
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
|
|
1475
1475
|
/* @__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" }) }),
|
|
1476
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1476
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.invalidTitle") }),
|
|
1477
1477
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.invalidBody") })
|
|
1478
1478
|
] });
|
|
1479
1479
|
}
|
|
1480
1480
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
|
|
1481
1481
|
/* @__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" }) }),
|
|
1482
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1482
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.title") }),
|
|
1483
1483
|
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: [
|
|
1484
1484
|
/* @__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 }) }),
|
|
1485
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1485
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.Button, { variant: "secondary", onClick: stopAll, disabled: isStoppingAll, children: [
|
|
1486
1486
|
isStoppingAll && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
1487
1487
|
t("emailAutomations.unsubscribe.alsoStopAll")
|
|
1488
1488
|
] })
|
|
@@ -1497,7 +1497,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailUnsubscribe, "EmailUnsubscribe");
|
|
|
1497
1497
|
|
|
1498
1498
|
var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
1499
1499
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1500
|
-
const generateUrl =
|
|
1500
|
+
const generateUrl = _chunkRT7XFGINjs.usePageUrlGenerator.call(void 0, );
|
|
1501
1501
|
const triggerLabels = _nullishCoalesce(_optionalChain([params, 'access', _47 => _47.context, 'optionalAccess', _48 => _48.triggerLabels]), () => ( {}));
|
|
1502
1502
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
1503
1503
|
return params.data.map((automation) => {
|
|
@@ -1526,7 +1526,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
|
|
|
1526
1526
|
header: t("emailAutomations.list.columns.name"),
|
|
1527
1527
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
1528
1528
|
const automation = row.original.jsonApiData;
|
|
1529
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1529
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Link, { href: generateUrl({ page: _chunk4XLDBOSEjs.Modules.EmailAutomation, id: automation.id }), children: automation.name });
|
|
1530
1530
|
}, "cell"),
|
|
1531
1531
|
enableSorting: false,
|
|
1532
1532
|
enableHiding: false
|
|
@@ -1549,7 +1549,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
|
|
|
1549
1549
|
header: t("emailAutomations.list.columns.status"),
|
|
1550
1550
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
1551
1551
|
const automation = row.original.jsonApiData;
|
|
1552
|
-
return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1552
|
+
return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Badge, { variant: "softGreen", children: t("emailAutomations.list.status.on") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Badge, { variant: "softGray", children: t("emailAutomations.list.status.off") });
|
|
1553
1553
|
}, "cell"),
|
|
1554
1554
|
enableSorting: false,
|
|
1555
1555
|
enableHiding: false
|
|
@@ -1572,7 +1572,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
|
|
|
1572
1572
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
1573
1573
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
1574
1574
|
}, "useEmailAutomationTableStructure");
|
|
1575
|
-
|
|
1575
|
+
_chunkRT7XFGINjs.registerTableGenerator.call(void 0, "email-automations", useEmailAutomationTableStructure);
|
|
1576
1576
|
|
|
1577
1577
|
// src/features/email-automation/hooks/useEmailAutomationEnrollmentTableStructure.tsx
|
|
1578
1578
|
|
|
@@ -1628,7 +1628,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
|
|
|
1628
1628
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
1629
1629
|
const enrollment = row.original.jsonApiData;
|
|
1630
1630
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
|
-
|
|
1631
|
+
_chunkRT7XFGINjs.Badge,
|
|
1632
1632
|
{
|
|
1633
1633
|
variant: _nullishCoalesce(STATUS_VARIANTS[enrollment.status], () => ( "softGray")),
|
|
1634
1634
|
title: enrollment.status === "failed" ? enrollment.lastError : void 0,
|
|
@@ -1679,7 +1679,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
|
|
|
1679
1679
|
}, [params.fields, fieldColumnMap, t, locale]);
|
|
1680
1680
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
1681
1681
|
}, "useEmailAutomationEnrollmentTableStructure");
|
|
1682
|
-
|
|
1682
|
+
_chunkRT7XFGINjs.registerTableGenerator.call(void 0, "email-automation-enrollments", useEmailAutomationEnrollmentTableStructure);
|
|
1683
1683
|
|
|
1684
1684
|
|
|
1685
1685
|
|