@carlonicora/nextjs-jsonapi 6.9.0 → 6.10.0

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.
Files changed (44) hide show
  1. package/dist/{BlockNoteEditor-WN73IHXR.mjs → BlockNoteEditor-GK3DRTOP.mjs} +49 -15
  2. package/dist/BlockNoteEditor-GK3DRTOP.mjs.map +1 -0
  3. package/dist/{BlockNoteEditor-XXH3VBZ7.js → BlockNoteEditor-YOKJOVV3.js} +64 -30
  4. package/dist/BlockNoteEditor-YOKJOVV3.js.map +1 -0
  5. package/dist/billing/index.js +379 -379
  6. package/dist/billing/index.mjs +1 -1
  7. package/dist/{chunk-ZCM4JLM7.js → chunk-4UFMLTL2.js} +73 -71
  8. package/dist/chunk-4UFMLTL2.js.map +1 -0
  9. package/dist/{chunk-Q4XLE3QO.mjs → chunk-THZAK7S3.mjs} +9 -7
  10. package/dist/{chunk-Q4XLE3QO.mjs.map → chunk-THZAK7S3.mjs.map} +1 -1
  11. package/dist/client/index.js +2 -2
  12. package/dist/client/index.mjs +1 -1
  13. package/dist/components/index.d.mts +12 -5
  14. package/dist/components/index.d.ts +12 -5
  15. package/dist/components/index.js +2 -2
  16. package/dist/components/index.mjs +1 -1
  17. package/dist/contexts/index.js +2 -2
  18. package/dist/contexts/index.mjs +1 -1
  19. package/dist/email-automations/index.js +58 -58
  20. package/dist/email-automations/index.mjs +1 -1
  21. package/dist/features/analytics/index.js +87 -87
  22. package/dist/features/analytics/index.mjs +1 -1
  23. package/dist/features/blog/index.js +93 -93
  24. package/dist/features/blog/index.mjs +1 -1
  25. package/dist/features/help/index.js +31 -31
  26. package/dist/features/help/index.mjs +1 -1
  27. package/dist/features/tokenusage/index.js +77 -77
  28. package/dist/features/tokenusage/index.mjs +1 -1
  29. package/package.json +1 -1
  30. package/src/components/editors/BlockNoteEditor.tsx +69 -14
  31. package/src/components/editors/__tests__/BlockNoteEditor.ai.spec.tsx +295 -0
  32. package/src/features/assistant/components/containers/AssistantPageContainer.tsx +20 -9
  33. package/src/features/assistant/components/containers/__tests__/AssistantPageContainer.spec.tsx +116 -0
  34. package/src/features/assistant/components/parts/AssistantThread.tsx +2 -1
  35. package/src/features/assistant-message/components/MessageItem.tsx +1 -1
  36. package/src/features/assistant-message/components/MessageList.tsx +1 -1
  37. package/src/features/assistant-message/components/parts/MessageSourcesContainer.tsx +1 -1
  38. package/src/features/assistant-message/components/parts/MessageSourcesPanel.tsx +1 -1
  39. package/src/features/assistant-message/components/parts/__tests__/MessageSourcesPanel.spec.tsx +17 -1
  40. package/src/features/assistant-message/components/parts/__tests__/SuggestedQuestionsTab.spec.tsx +22 -0
  41. package/src/features/assistant-message/components/parts/tabs/SuggestedQuestionsTab.tsx +5 -3
  42. package/dist/BlockNoteEditor-WN73IHXR.mjs.map +0 -1
  43. package/dist/BlockNoteEditor-XXH3VBZ7.js.map +0 -1
  44. package/dist/chunk-ZCM4JLM7.js.map +0 -1
@@ -31,7 +31,7 @@
31
31
 
32
32
 
33
33
 
34
- var _chunkZCM4JLM7js = require('../chunk-ZCM4JLM7.js');
34
+ var _chunk4UFMLTL2js = require('../chunk-4UFMLTL2.js');
35
35
  require('../chunk-KRQRJA4J.js');
36
36
  require('../chunk-G4JR3SFV.js');
37
37
 
@@ -124,7 +124,7 @@ function EmailAutomationEditorInternal({
124
124
  defaultValues: getDefaultValues()
125
125
  });
126
126
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
127
- _chunkZCM4JLM7js.EditorSheet,
127
+ _chunk4UFMLTL2js.EditorSheet,
128
128
  {
129
129
  form,
130
130
  entityType: t("emailAutomations.admin.title"),
@@ -154,9 +154,9 @@ function EmailAutomationEditorInternal({
154
154
  dialogOpen,
155
155
  onDialogOpenChange,
156
156
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
157
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.FormInput, { form, id: "name", name: t("emailAutomations.fields.name.label"), isRequired: true }),
157
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.FormInput, { form, id: "name", name: t("emailAutomations.fields.name.label"), isRequired: true }),
158
158
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
159
- _chunkZCM4JLM7js.FormSelect,
159
+ _chunk4UFMLTL2js.FormSelect,
160
160
  {
161
161
  form,
162
162
  id: "trigger",
@@ -167,7 +167,7 @@ function EmailAutomationEditorInternal({
167
167
  }
168
168
  ),
169
169
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
170
- _chunkZCM4JLM7js.FormSelect,
170
+ _chunk4UFMLTL2js.FormSelect,
171
171
  {
172
172
  form,
173
173
  id: "exitTrigger",
@@ -177,9 +177,9 @@ function EmailAutomationEditorInternal({
177
177
  allowEmpty: true
178
178
  }
179
179
  ),
180
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.FormInput, { form, id: "replyTo", name: t("emailAutomations.fields.replyTo.label") }),
180
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.FormInput, { form, id: "replyTo", name: t("emailAutomations.fields.replyTo.label") }),
181
181
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
182
- _chunkZCM4JLM7js.FormSwitch,
182
+ _chunk4UFMLTL2js.FormSwitch,
183
183
  {
184
184
  form,
185
185
  id: "isActive",
@@ -203,7 +203,7 @@ var EmailAutomationEditor_default = EmailAutomationEditor;
203
203
  function EmailAutomationsList({ fullWidth } = {}) {
204
204
  const t = _nextintl.useTranslations.call(void 0, );
205
205
  const [triggers, setTriggers] = _react.useState.call(void 0, []);
206
- const data = _chunkZCM4JLM7js.useDataListRetriever.call(void 0, {
206
+ const data = _chunk4UFMLTL2js.useDataListRetriever.call(void 0, {
207
207
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkSQTXJPREjs.EmailAutomationService.findMany(params), "retriever"),
208
208
  retrieverParams: {},
209
209
  module: _chunkSQTXJPREjs.Modules.EmailAutomation
@@ -224,7 +224,7 @@ function EmailAutomationsList({ fullWidth } = {}) {
224
224
  );
225
225
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationEditor_default, {}, "create-email-automation")];
226
226
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
227
- _chunkZCM4JLM7js.ContentListTable,
227
+ _chunk4UFMLTL2js.ContentListTable,
228
228
  {
229
229
  data,
230
230
  fields: [
@@ -241,7 +241,7 @@ function EmailAutomationsList({ fullWidth } = {}) {
241
241
  fullWidth,
242
242
  title: t("emailAutomations.admin.title"),
243
243
  context: { triggerLabels },
244
- emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.EmptyState, { icon: _lucidereact.MailIcon, title: t("emailAutomations.admin.empty") })
244
+ emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.EmptyState, { icon: _lucidereact.MailIcon, title: t("emailAutomations.admin.empty") })
245
245
  }
246
246
  );
247
247
  }
@@ -252,7 +252,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsList, "EmailAutomationsList
252
252
  function EmailAutomationsListContainer() {
253
253
  const t = _nextintl.useTranslations.call(void 0, );
254
254
  const breadcrumbs = [{ name: t("emailAutomations.admin.title") }];
255
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SharedProvider, { value: { breadcrumbs, title: { type: t("emailAutomations.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.RoundPageContainer, { module: _chunkSQTXJPREjs.Modules.EmailAutomation, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationsList, { fullWidth: true }) }) });
255
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SharedProvider, { value: { breadcrumbs, title: { type: t("emailAutomations.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.RoundPageContainer, { module: _chunkSQTXJPREjs.Modules.EmailAutomation, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationsList, { fullWidth: true }) }) });
256
256
  }
257
257
  _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsListContainer, "EmailAutomationsListContainer");
258
258
 
@@ -406,17 +406,17 @@ function EmailAutomationActiveSwitch() {
406
406
  });
407
407
  await reload();
408
408
  } catch (error) {
409
- _chunkZCM4JLM7js.errorToast.call(void 0, { title: t("common.errors.error"), error });
409
+ _chunk4UFMLTL2js.errorToast.call(void 0, { title: t("common.errors.error"), error });
410
410
  } finally {
411
411
  setSaving(false);
412
412
  }
413
413
  }, "toggle");
414
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZCM4JLM7js.Tooltip, { children: [
415
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZCM4JLM7js.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: "flex items-center gap-x-2" }), children: [
416
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.Switch, { checked: automation.isActive, onCheckedChange: (checked) => void toggle(checked), disabled: saving }),
414
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4UFMLTL2js.Tooltip, { children: [
415
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4UFMLTL2js.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: "flex items-center gap-x-2" }), children: [
416
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.Switch, { checked: automation.isActive, onCheckedChange: (checked) => void toggle(checked), disabled: saving }),
417
417
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs", children: t("emailAutomations.fields.isActive.label") })
418
418
  ] }),
419
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.TooltipContent, { className: "max-w-xs", children: t("emailAutomations.fields.isActive.help") })
419
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.TooltipContent, { className: "max-w-xs", children: t("emailAutomations.fields.isActive.help") })
420
420
  ] });
421
421
  }
422
422
  _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationActiveSwitch, "EmailAutomationActiveSwitch");
@@ -449,7 +449,7 @@ function CanvasToolbar({ onTidy }) {
449
449
  const { zoomIn, zoomOut, fitView } = _react3.useReactFlow.call(void 0, );
450
450
  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: [
451
451
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
452
- _chunkZCM4JLM7js.Button,
452
+ _chunk4UFMLTL2js.Button,
453
453
  {
454
454
  type: "button",
455
455
  variant: "outline",
@@ -460,7 +460,7 @@ function CanvasToolbar({ onTidy }) {
460
460
  }
461
461
  ),
462
462
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
463
- _chunkZCM4JLM7js.Button,
463
+ _chunk4UFMLTL2js.Button,
464
464
  {
465
465
  type: "button",
466
466
  variant: "outline",
@@ -471,7 +471,7 @@ function CanvasToolbar({ onTidy }) {
471
471
  }
472
472
  ),
473
473
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
474
- _chunkZCM4JLM7js.Button,
474
+ _chunk4UFMLTL2js.Button,
475
475
  {
476
476
  type: "button",
477
477
  variant: "outline",
@@ -482,7 +482,7 @@ function CanvasToolbar({ onTidy }) {
482
482
  }
483
483
  ),
484
484
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
485
- _chunkZCM4JLM7js.Button,
485
+ _chunk4UFMLTL2js.Button,
486
486
  {
487
487
  type: "button",
488
488
  variant: "outline",
@@ -773,7 +773,7 @@ function EmailStepEditorInternal({
773
773
  defaultValues: getDefaultValues()
774
774
  });
775
775
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
776
- _chunkZCM4JLM7js.EditorSheet,
776
+ _chunk4UFMLTL2js.EditorSheet,
777
777
  {
778
778
  form,
779
779
  entityType: t("emailAutomations.step.title"),
@@ -805,9 +805,9 @@ function EmailStepEditorInternal({
805
805
  dialogOpen,
806
806
  onDialogOpenChange,
807
807
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
808
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.FormInput, { form, id: "subject", name: t("emailAutomations.step.fields.subject.label"), isRequired: true }),
808
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.FormInput, { form, id: "subject", name: t("emailAutomations.step.fields.subject.label"), isRequired: true }),
809
809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
810
- _chunkZCM4JLM7js.FormInput,
810
+ _chunk4UFMLTL2js.FormInput,
811
811
  {
812
812
  form,
813
813
  id: "delayHours",
@@ -817,7 +817,7 @@ function EmailStepEditorInternal({
817
817
  }
818
818
  ),
819
819
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
820
- _chunkZCM4JLM7js.FormTextarea,
820
+ _chunk4UFMLTL2js.FormTextarea,
821
821
  {
822
822
  form,
823
823
  id: "body",
@@ -996,7 +996,7 @@ function EmailAutomationCanvas() {
996
996
  try {
997
997
  await setNext(stepId, nextStepId);
998
998
  } catch (error) {
999
- _chunkZCM4JLM7js.errorToast.call(void 0, { title: t("emailAutomations.canvas.chainError"), error });
999
+ _chunk4UFMLTL2js.errorToast.call(void 0, { title: t("emailAutomations.canvas.chainError"), error });
1000
1000
  await reload();
1001
1001
  }
1002
1002
  },
@@ -1128,7 +1128,7 @@ function EmailAutomationCanvas() {
1128
1128
  try {
1129
1129
  await deleteStep(stepId);
1130
1130
  } catch (error) {
1131
- _chunkZCM4JLM7js.errorToast.call(void 0, { title: t("emailAutomations.canvas.deleteEmail"), error });
1131
+ _chunk4UFMLTL2js.errorToast.call(void 0, { title: t("emailAutomations.canvas.deleteEmail"), error });
1132
1132
  throw error;
1133
1133
  }
1134
1134
  }, [pendingDeleteStepId, deleteStep, t]);
@@ -1191,7 +1191,7 @@ function EmailAutomationCanvas() {
1191
1191
  }
1192
1192
  ),
1193
1193
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1194
- _chunkZCM4JLM7js.ConfirmDialog,
1194
+ _chunk4UFMLTL2js.ConfirmDialog,
1195
1195
  {
1196
1196
  open: pendingDeleteStepId !== null,
1197
1197
  onOpenChange: (open) => {
@@ -1206,20 +1206,20 @@ function EmailAutomationCanvas() {
1206
1206
  }
1207
1207
  ),
1208
1208
  paneMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1209
- _chunkZCM4JLM7js.ContextMenu,
1209
+ _chunk4UFMLTL2js.ContextMenu,
1210
1210
  {
1211
1211
  open: true,
1212
1212
  onOpenChange: (open) => {
1213
1213
  if (!open) setPaneMenu(null);
1214
1214
  },
1215
1215
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1216
- _chunkZCM4JLM7js.ContextMenuContent,
1216
+ _chunk4UFMLTL2js.ContextMenuContent,
1217
1217
  {
1218
1218
  anchor: pointAnchor(paneMenu.screenX, paneMenu.screenY),
1219
1219
  side: "bottom",
1220
1220
  align: "start",
1221
1221
  sideOffset: 4,
1222
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZCM4JLM7js.ContextMenuItem, { onClick: handleCreateStepFromPane, children: [
1222
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4UFMLTL2js.ContextMenuItem, { onClick: handleCreateStepFromPane, children: [
1223
1223
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PlusIcon, {}),
1224
1224
  t("emailAutomations.canvas.addEmail")
1225
1225
  ] })
@@ -1228,21 +1228,21 @@ function EmailAutomationCanvas() {
1228
1228
  }
1229
1229
  ),
1230
1230
  nodeMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1231
- _chunkZCM4JLM7js.ContextMenu,
1231
+ _chunk4UFMLTL2js.ContextMenu,
1232
1232
  {
1233
1233
  open: true,
1234
1234
  onOpenChange: (open) => {
1235
1235
  if (!open) setNodeMenu(null);
1236
1236
  },
1237
1237
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1238
- _chunkZCM4JLM7js.ContextMenuContent,
1238
+ _chunk4UFMLTL2js.ContextMenuContent,
1239
1239
  {
1240
1240
  anchor: pointAnchor(nodeMenu.screenX, nodeMenu.screenY),
1241
1241
  side: "bottom",
1242
1242
  align: "start",
1243
1243
  sideOffset: 4,
1244
1244
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1245
- _chunkZCM4JLM7js.ContextMenuItem,
1245
+ _chunk4UFMLTL2js.ContextMenuItem,
1246
1246
  {
1247
1247
  onClick: () => {
1248
1248
  const menu = nodeMenu;
@@ -1283,7 +1283,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, TriggerAutomationEditor, "TriggerAutomation
1283
1283
  // src/features/email-automation/components/canvas/EmailAutomationCanvasTab.tsx
1284
1284
 
1285
1285
  function EmailAutomationCanvasTab() {
1286
- const { open, setOpen } = _chunkZCM4JLM7js.useSidebar.call(void 0, );
1286
+ const { open, setOpen } = _chunk4UFMLTL2js.useSidebar.call(void 0, );
1287
1287
  _react.useEffect.call(void 0, () => {
1288
1288
  const prev = open;
1289
1289
  if (prev) setOpen(false);
@@ -1304,7 +1304,7 @@ function EmailAutomationRecipientsList() {
1304
1304
  const t = _nextintl.useTranslations.call(void 0, );
1305
1305
  const { automation } = useEmailAutomation();
1306
1306
  const [statusFilter, setStatusFilter] = _react.useState.call(void 0, "all");
1307
- const data = _chunkZCM4JLM7js.useDataListRetriever.call(void 0, {
1307
+ const data = _chunk4UFMLTL2js.useDataListRetriever.call(void 0, {
1308
1308
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkSQTXJPREjs.EmailAutomationService.findEnrollments(params), "retriever"),
1309
1309
  retrieverParams: { automationId: _optionalChain([automation, 'optionalAccess', _44 => _44.id]) },
1310
1310
  module: _chunkSQTXJPREjs.Modules.EmailAutomationEnrollment
@@ -1326,21 +1326,21 @@ function EmailAutomationRecipientsList() {
1326
1326
  [t]
1327
1327
  );
1328
1328
  const filters = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4", children: [
1329
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZCM4JLM7js.Select, { items: statusItems, value: statusFilter, onValueChange: handleStatusChange, children: [
1330
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectTrigger, { className: "w-40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectValue, {}) }),
1331
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZCM4JLM7js.SelectContent, { children: [
1332
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectItem, { value: "all", children: t("emailAutomations.recipients.status.all") }),
1333
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectItem, { value: "active", children: t("emailAutomations.recipients.status.active") }),
1334
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectItem, { value: "completed", children: t("emailAutomations.recipients.status.completed") }),
1335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectItem, { value: "unsubscribed", children: t("emailAutomations.recipients.status.unsubscribed") }),
1336
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectItem, { value: "exited", children: t("emailAutomations.recipients.status.exited") }),
1337
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SelectItem, { value: "failed", children: t("emailAutomations.recipients.status.failed") })
1329
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4UFMLTL2js.Select, { items: statusItems, value: statusFilter, onValueChange: handleStatusChange, children: [
1330
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectTrigger, { className: "w-40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectValue, {}) }),
1331
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4UFMLTL2js.SelectContent, { children: [
1332
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectItem, { value: "all", children: t("emailAutomations.recipients.status.all") }),
1333
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectItem, { value: "active", children: t("emailAutomations.recipients.status.active") }),
1334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectItem, { value: "completed", children: t("emailAutomations.recipients.status.completed") }),
1335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectItem, { value: "unsubscribed", children: t("emailAutomations.recipients.status.unsubscribed") }),
1336
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectItem, { value: "exited", children: t("emailAutomations.recipients.status.exited") }),
1337
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SelectItem, { value: "failed", children: t("emailAutomations.recipients.status.failed") })
1338
1338
  ] })
1339
1339
  ] }),
1340
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.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
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.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" : ""}` }) })
1341
1341
  ] });
1342
1342
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1343
- _chunkZCM4JLM7js.ContentListTable,
1343
+ _chunk4UFMLTL2js.ContentListTable,
1344
1344
  {
1345
1345
  data,
1346
1346
  fields: [
@@ -1368,7 +1368,7 @@ function EmailAutomationContainer({ automationId }) {
1368
1368
  _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationContainer, "EmailAutomationContainer");
1369
1369
  function EmailAutomationShell() {
1370
1370
  const t = _nextintl.useTranslations.call(void 0, );
1371
- const generateUrl = _chunkZCM4JLM7js.usePageUrlGenerator.call(void 0, );
1371
+ const generateUrl = _chunk4UFMLTL2js.usePageUrlGenerator.call(void 0, );
1372
1372
  const { automation, reload } = useEmailAutomation();
1373
1373
  if (!automation) return null;
1374
1374
  const breadcrumbs = [
@@ -1376,7 +1376,7 @@ function EmailAutomationShell() {
1376
1376
  { name: automation.name }
1377
1377
  ];
1378
1378
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1379
- _chunkZCM4JLM7js.SharedProvider,
1379
+ _chunk4UFMLTL2js.SharedProvider,
1380
1380
  {
1381
1381
  value: {
1382
1382
  breadcrumbs,
@@ -1390,7 +1390,7 @@ function EmailAutomationShell() {
1390
1390
  }
1391
1391
  },
1392
1392
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1393
- _chunkZCM4JLM7js.RoundPageContainer,
1393
+ _chunk4UFMLTL2js.RoundPageContainer,
1394
1394
  {
1395
1395
  module: _chunkSQTXJPREjs.Modules.EmailAutomation,
1396
1396
  id: automation.id,
@@ -1468,16 +1468,16 @@ function EmailUnsubscribe({ token, scope, source = "automation" }) {
1468
1468
  if (state === "error") {
1469
1469
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
1470
1470
  /* @__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" }) }),
1471
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.invalidTitle") }),
1471
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.invalidTitle") }),
1472
1472
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.invalidBody") })
1473
1473
  ] });
1474
1474
  }
1475
1475
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
1476
1476
  /* @__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" }) }),
1477
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.title") }),
1477
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.title") }),
1478
1478
  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: [
1479
1479
  /* @__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 }) }),
1480
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZCM4JLM7js.Button, { variant: "secondary", onClick: stopAll, disabled: isStoppingAll, children: [
1480
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4UFMLTL2js.Button, { variant: "secondary", onClick: stopAll, disabled: isStoppingAll, children: [
1481
1481
  isStoppingAll && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }),
1482
1482
  t("emailAutomations.unsubscribe.alsoStopAll")
1483
1483
  ] })
@@ -1492,7 +1492,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailUnsubscribe, "EmailUnsubscribe");
1492
1492
 
1493
1493
  var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
1494
1494
  const t = _nextintl.useTranslations.call(void 0, );
1495
- const generateUrl = _chunkZCM4JLM7js.usePageUrlGenerator.call(void 0, );
1495
+ const generateUrl = _chunk4UFMLTL2js.usePageUrlGenerator.call(void 0, );
1496
1496
  const triggerLabels = _nullishCoalesce(_optionalChain([params, 'access', _47 => _47.context, 'optionalAccess', _48 => _48.triggerLabels]), () => ( {}));
1497
1497
  const tableData = _react.useMemo.call(void 0, () => {
1498
1498
  return params.data.map((automation) => {
@@ -1521,7 +1521,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
1521
1521
  header: t("emailAutomations.list.columns.name"),
1522
1522
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1523
1523
  const automation = row.original.jsonApiData;
1524
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.Link, { href: generateUrl({ page: _chunkSQTXJPREjs.Modules.EmailAutomation, id: automation.id }), children: automation.name });
1524
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.Link, { href: generateUrl({ page: _chunkSQTXJPREjs.Modules.EmailAutomation, id: automation.id }), children: automation.name });
1525
1525
  }, "cell"),
1526
1526
  enableSorting: false,
1527
1527
  enableHiding: false
@@ -1544,7 +1544,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
1544
1544
  header: t("emailAutomations.list.columns.status"),
1545
1545
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1546
1546
  const automation = row.original.jsonApiData;
1547
- return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.Badge, { variant: "softGreen", children: t("emailAutomations.list.status.on") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZCM4JLM7js.Badge, { variant: "softGray", children: t("emailAutomations.list.status.off") });
1547
+ return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.Badge, { variant: "softGreen", children: t("emailAutomations.list.status.on") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4UFMLTL2js.Badge, { variant: "softGray", children: t("emailAutomations.list.status.off") });
1548
1548
  }, "cell"),
1549
1549
  enableSorting: false,
1550
1550
  enableHiding: false
@@ -1567,7 +1567,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
1567
1567
  }, [params.fields, fieldColumnMap, t, generateUrl]);
1568
1568
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
1569
1569
  }, "useEmailAutomationTableStructure");
1570
- _chunkZCM4JLM7js.registerTableGenerator.call(void 0, "email-automations", useEmailAutomationTableStructure);
1570
+ _chunk4UFMLTL2js.registerTableGenerator.call(void 0, "email-automations", useEmailAutomationTableStructure);
1571
1571
 
1572
1572
  // src/features/email-automation/hooks/useEmailAutomationEnrollmentTableStructure.tsx
1573
1573
 
@@ -1623,7 +1623,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
1623
1623
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1624
1624
  const enrollment = row.original.jsonApiData;
1625
1625
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1626
- _chunkZCM4JLM7js.Badge,
1626
+ _chunk4UFMLTL2js.Badge,
1627
1627
  {
1628
1628
  variant: _nullishCoalesce(STATUS_VARIANTS[enrollment.status], () => ( "softGray")),
1629
1629
  title: enrollment.status === "failed" ? enrollment.lastError : void 0,
@@ -1674,7 +1674,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
1674
1674
  }, [params.fields, fieldColumnMap, t, locale]);
1675
1675
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
1676
1676
  }, "useEmailAutomationEnrollmentTableStructure");
1677
- _chunkZCM4JLM7js.registerTableGenerator.call(void 0, "email-automation-enrollments", useEmailAutomationEnrollmentTableStructure);
1677
+ _chunk4UFMLTL2js.registerTableGenerator.call(void 0, "email-automation-enrollments", useEmailAutomationEnrollmentTableStructure);
1678
1678
 
1679
1679
 
1680
1680
 
@@ -31,7 +31,7 @@ import {
31
31
  useDataListRetriever,
32
32
  usePageUrlGenerator,
33
33
  useSidebar
34
- } from "../chunk-Q4XLE3QO.mjs";
34
+ } from "../chunk-THZAK7S3.mjs";
35
35
  import "../chunk-AWLTSKMM.mjs";
36
36
  import "../chunk-PW42LRSL.mjs";
37
37
  import {