@burdenoff/microfe-headshotmarketing 2026.1013.1 → 2026.1029.2

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 (72) hide show
  1. package/dist/generated/global-types.d.ts +5145 -1627
  2. package/dist/generated/global-types.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.d.ts +512 -248
  4. package/dist/generated/wspace-operations.d.ts.map +1 -1
  5. package/dist/generated/wspace-operations.js +349 -292
  6. package/dist/generated/wspace-operations.js.map +1 -1
  7. package/dist/generated/wspace-types.d.ts +21251 -468
  8. package/dist/generated/wspace-types.d.ts.map +1 -1
  9. package/dist/generated/wspace-types.js +20 -20
  10. package/dist/generated/wspace-types.js.map +1 -1
  11. package/dist/headshotmarketing/components/PageLayout.d.ts +5 -0
  12. package/dist/headshotmarketing/components/PageLayout.d.ts.map +1 -1
  13. package/dist/headshotmarketing/components/PageLayout.js +12 -6
  14. package/dist/headshotmarketing/components/PageLayout.js.map +1 -1
  15. package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
  16. package/dist/headshotmarketing/components/StatusBadge.js +3 -0
  17. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  18. package/dist/headshotmarketing/pages/automation/AutomationPage.d.ts.map +1 -1
  19. package/dist/headshotmarketing/pages/automation/AutomationPage.js +172 -167
  20. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  21. package/dist/headshotmarketing/pages/automation/TriggersPage.d.ts.map +1 -1
  22. package/dist/headshotmarketing/pages/automation/TriggersPage.js +127 -143
  23. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  24. package/dist/headshotmarketing/pages/automation/WorkflowActions.d.ts +16 -16
  25. package/dist/headshotmarketing/pages/automation/WorkflowActions.d.ts.map +1 -1
  26. package/dist/headshotmarketing/pages/automation/WorkflowActions.js +104 -221
  27. package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -1
  28. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.d.ts +16 -0
  29. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.d.ts.map +1 -1
  30. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +470 -549
  31. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  32. package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.d.ts +2 -0
  33. package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.d.ts.map +1 -1
  34. package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js +19 -19
  35. package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js.map +1 -1
  36. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.d.ts.map +1 -1
  37. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +341 -164
  38. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -1
  39. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.d.ts +13 -0
  40. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.d.ts.map +1 -0
  41. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +294 -0
  42. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -0
  43. package/dist/headshotmarketing/pages/automation/WorkflowsPage.d.ts +2 -0
  44. package/dist/headshotmarketing/pages/automation/WorkflowsPage.d.ts.map +1 -1
  45. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +198 -220
  46. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/automation/useAutomationData.d.ts +24 -0
  48. package/dist/headshotmarketing/pages/automation/useAutomationData.d.ts.map +1 -0
  49. package/dist/headshotmarketing/pages/automation/useAutomationData.js +77 -0
  50. package/dist/headshotmarketing/pages/automation/useAutomationData.js.map +1 -0
  51. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.d.ts +73 -16
  52. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.d.ts.map +1 -1
  53. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +220 -80
  54. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -1
  55. package/dist/headshotmarketing/pages/automation/workflowCompiler.d.ts +51 -0
  56. package/dist/headshotmarketing/pages/automation/workflowCompiler.d.ts.map +1 -0
  57. package/dist/headshotmarketing/pages/automation/workflowCompiler.js +453 -0
  58. package/dist/headshotmarketing/pages/automation/workflowCompiler.js.map +1 -0
  59. package/dist/headshotmarketing/pages/social-media/PostsPage.d.ts.map +1 -1
  60. package/dist/headshotmarketing/pages/social-media/PostsPage.js +267 -194
  61. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  62. package/dist/headshotmarketing/types/index.d.ts +6 -0
  63. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  64. package/dist/headshotmarketing/utils/automationMapper.d.ts +50 -29
  65. package/dist/headshotmarketing/utils/automationMapper.d.ts.map +1 -1
  66. package/dist/headshotmarketing/utils/automationMapper.js +55 -99
  67. package/dist/headshotmarketing/utils/automationMapper.js.map +1 -1
  68. package/dist/headshotmarketing/utils/socialMapper.d.ts +8 -0
  69. package/dist/headshotmarketing/utils/socialMapper.d.ts.map +1 -1
  70. package/dist/headshotmarketing/utils/socialMapper.js +27 -15
  71. package/dist/headshotmarketing/utils/socialMapper.js.map +1 -1
  72. package/package.json +1 -1
@@ -3,6 +3,11 @@ import { FC, ReactNode } from 'react';
3
3
  interface PageLayoutProps {
4
4
  title: string;
5
5
  description?: string;
6
+ /**
7
+ * Replaces the default title block (e.g. a breadcrumb with an inline-
8
+ * editable name). `title` is still rendered as a screen-reader heading.
9
+ */
10
+ header?: ReactNode;
6
11
  actions?: ReactNode;
7
12
  children: ReactNode;
8
13
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.d.ts","sourceRoot":"","sources":["../../../src/headshotmarketing/components/PageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAqB1C,CAAC"}
1
+ {"version":3,"file":"PageLayout.d.ts","sourceRoot":"","sources":["../../../src/headshotmarketing/components/PageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA6B1C,CAAC"}
@@ -1,21 +1,27 @@
1
1
  import { cn as e } from "../utils/helpers.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/headshotmarketing/components/PageLayout.tsx
4
- var r = ({ title: r, description: i, actions: a, children: o, className: s }) => /* @__PURE__ */ n("div", {
5
- className: e("space-y-6", s),
4
+ var r = ({ title: r, description: i, header: a, actions: o, children: s, className: c }) => /* @__PURE__ */ n("div", {
5
+ className: e("space-y-6", c),
6
6
  children: [/* @__PURE__ */ n("div", {
7
7
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
8
- children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("h1", {
8
+ children: [a ? /* @__PURE__ */ n("div", {
9
+ className: "min-w-0 flex-1",
10
+ children: [/* @__PURE__ */ t("h1", {
11
+ className: "sr-only",
12
+ children: r
13
+ }), a]
14
+ }) : /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("h1", {
9
15
  className: "text-2xl font-bold tracking-tight text-text-primary",
10
16
  children: r
11
17
  }), i && /* @__PURE__ */ t("p", {
12
18
  className: "text-sm text-text-secondary mt-1",
13
19
  children: i
14
- })] }), a && /* @__PURE__ */ t("div", {
20
+ })] }), o && /* @__PURE__ */ t("div", {
15
21
  className: "flex items-center gap-2",
16
- children: a
22
+ children: o
17
23
  })]
18
- }), o]
24
+ }), s]
19
25
  });
20
26
  //#endregion
21
27
  export { r as PageLayout };
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/headshotmarketing/components/PageLayout.tsx"],"sourcesContent":["import type { FC, ReactNode } from \"react\";\nimport { cn } from \"../utils/helpers\";\n\ninterface PageLayoutProps {\n title: string;\n description?: string;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n actions,\n children,\n className,\n}) => (\n <div className={cn(\"space-y-6\", className)}>\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold tracking-tight text-text-primary\">\n {title}\n </h1>\n {description && (\n <p className=\"text-sm text-text-secondary mt-1\">{description}</p>\n )}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n {children}\n </div>\n);\n"],"mappings":";;;AAWA,IAAa,KAAmC,EAC9C,UACA,gBACA,YACA,aACA,mBAEA,kBAAC,OAAD;CAAK,WAAW,EAAG,aAAa,EAAU;WAA1C,CACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aACX;GACE,CAAA,EACJ,KACC,kBAAC,KAAD;GAAG,WAAU;aAAoC;GAAgB,CAAA,CAE/D,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;GAAK,WAAU;aAA2B;GAAc,CAAA,CAChE;KACL,EACG"}
1
+ {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/headshotmarketing/components/PageLayout.tsx"],"sourcesContent":["import type { FC, ReactNode } from \"react\";\nimport { cn } from \"../utils/helpers\";\n\ninterface PageLayoutProps {\n title: string;\n description?: string;\n /**\n * Replaces the default title block (e.g. a breadcrumb with an inline-\n * editable name). `title` is still rendered as a screen-reader heading.\n */\n header?: ReactNode;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n header,\n actions,\n children,\n className,\n}) => (\n <div className={cn(\"space-y-6\", className)}>\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n {header ? (\n <div className=\"min-w-0 flex-1\">\n <h1 className=\"sr-only\">{title}</h1>\n {header}\n </div>\n ) : (\n <div>\n <h1 className=\"text-2xl font-bold tracking-tight text-text-primary\">\n {title}\n </h1>\n {description && (\n <p className=\"text-sm text-text-secondary mt-1\">{description}</p>\n )}\n </div>\n )}\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n {children}\n </div>\n);\n"],"mappings":";;;AAgBA,IAAa,KAAmC,EAC9C,UACA,gBACA,WACA,YACA,aACA,mBAEA,kBAAC,OAAD;CAAK,WAAW,EAAG,aAAa,EAAU;WAA1C,CACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACG,IACC,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,MAAD;IAAI,WAAU;cAAW;IAAW,CAAA,EACnC,EACG;OAEN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aACX;GACE,CAAA,EACJ,KACC,kBAAC,KAAD;GAAG,WAAU;aAAoC;GAAgB,CAAA,CAE/D,EAAA,CAAA,EAEP,KAAW,kBAAC,OAAD;GAAK,WAAU;aAA2B;GAAc,CAAA,CAChE;KACL,EACG"}
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../src/headshotmarketing/components/StatusBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAoDhC,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAU5C,CAAC"}
1
+ {"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../src/headshotmarketing/components/StatusBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAwDhC,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAU5C,CAAC"}
@@ -13,6 +13,9 @@ var n = "bg-status-success-bg text-status-success-text border-status-success-bor
13
13
  new: a,
14
14
  pending: o,
15
15
  running: s,
16
+ waiting: r,
17
+ success: n,
18
+ skipped: o,
16
19
  contacted: r,
17
20
  qualified: n,
18
21
  unqualified: i,
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/headshotmarketing/components/StatusBadge.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { cn } from \"../utils/helpers\";\n\nconst SUCCESS =\n \"bg-status-success-bg text-status-success-text border-status-success-border\";\nconst WARNING =\n \"bg-status-warning-bg text-status-warning-text border-status-warning-border\";\nconst ERROR =\n \"bg-status-error-bg text-status-error-text border-status-error-border\";\nconst INFO =\n \"bg-status-info-bg text-status-info-text border-status-info-border\";\nconst NEUTRAL = \"bg-bg-sunken text-text-secondary border-border-subtle\";\nconst ACCENT =\n \"bg-[var(--color-accent-soft)] text-action-primary-bg border-border-seam\";\n\nconst statusStyles: Record<string, string> = {\n active: SUCCESS,\n paused: WARNING,\n completed: INFO,\n draft: NEUTRAL,\n scheduled: ACCENT,\n published: SUCCESS,\n failed: ERROR,\n archived: NEUTRAL,\n new: INFO,\n // AI tool execution lifecycle\n pending: NEUTRAL,\n running: ACCENT,\n contacted: WARNING,\n qualified: SUCCESS,\n unqualified: ERROR,\n converted: SUCCESS,\n lost: ERROR,\n // deal stages\n prospecting: INFO,\n qualification: WARNING,\n proposal: ACCENT,\n negotiation: ACCENT,\n closed_won: SUCCESS,\n closed_lost: ERROR,\n // event lifecycle + registration statuses\n registration_open: SUCCESS,\n registration_closed: WARNING,\n in_progress: ACCENT,\n cancelled: ERROR,\n registered: INFO,\n confirmed: SUCCESS,\n waitlisted: WARNING,\n checked_in: SUCCESS,\n no_show: ERROR,\n};\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => (\n <span\n className={cn(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize\",\n statusStyles[status] || NEUTRAL,\n className,\n )}\n >\n {status.replace(/_/g, \" \")}\n </span>\n);\n"],"mappings":";;;AAGA,IAAM,IACJ,8EACI,IACJ,8EACI,IACJ,wEACI,IACJ,qEACI,IAAU,yDACV,IACJ,2EAEI,IAAuC;CAC3C,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,OAAO;CACP,WAAW;CACX,WAAW;CACX,QAAQ;CACR,UAAU;CACV,KAAK;CAEL,SAAS;CACT,SAAS;CACT,WAAW;CACX,WAAW;CACX,aAAa;CACb,WAAW;CACX,MAAM;CAEN,aAAa;CACb,eAAe;CACf,UAAU;CACV,aAAa;CACb,YAAY;CACZ,aAAa;CAEb,mBAAmB;CACnB,qBAAqB;CACrB,aAAa;CACb,WAAW;CACX,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,YAAY;CACZ,SAAS;CACV,EAOY,KAAqC,EAAE,WAAQ,mBAC1D,kBAAC,QAAD;CACE,WAAW,EACT,6FACA,EAAa,MAAW,GACxB,EACD;WAEA,EAAO,QAAQ,MAAM,IAAI;CACrB,CAAA"}
1
+ {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/headshotmarketing/components/StatusBadge.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { cn } from \"../utils/helpers\";\n\nconst SUCCESS =\n \"bg-status-success-bg text-status-success-text border-status-success-border\";\nconst WARNING =\n \"bg-status-warning-bg text-status-warning-text border-status-warning-border\";\nconst ERROR =\n \"bg-status-error-bg text-status-error-text border-status-error-border\";\nconst INFO =\n \"bg-status-info-bg text-status-info-text border-status-info-border\";\nconst NEUTRAL = \"bg-bg-sunken text-text-secondary border-border-subtle\";\nconst ACCENT =\n \"bg-[var(--color-accent-soft)] text-action-primary-bg border-border-seam\";\n\nconst statusStyles: Record<string, string> = {\n active: SUCCESS,\n paused: WARNING,\n completed: INFO,\n draft: NEUTRAL,\n scheduled: ACCENT,\n published: SUCCESS,\n failed: ERROR,\n archived: NEUTRAL,\n new: INFO,\n // AI tool execution lifecycle\n pending: NEUTRAL,\n running: ACCENT,\n // automation run + step log lifecycle\n waiting: WARNING,\n success: SUCCESS,\n skipped: NEUTRAL,\n contacted: WARNING,\n qualified: SUCCESS,\n unqualified: ERROR,\n converted: SUCCESS,\n lost: ERROR,\n // deal stages\n prospecting: INFO,\n qualification: WARNING,\n proposal: ACCENT,\n negotiation: ACCENT,\n closed_won: SUCCESS,\n closed_lost: ERROR,\n // event lifecycle + registration statuses\n registration_open: SUCCESS,\n registration_closed: WARNING,\n in_progress: ACCENT,\n cancelled: ERROR,\n registered: INFO,\n confirmed: SUCCESS,\n waitlisted: WARNING,\n checked_in: SUCCESS,\n no_show: ERROR,\n};\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => (\n <span\n className={cn(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize\",\n statusStyles[status] || NEUTRAL,\n className,\n )}\n >\n {status.replace(/_/g, \" \")}\n </span>\n);\n"],"mappings":";;;AAGA,IAAM,IACJ,8EACI,IACJ,8EACI,IACJ,wEACI,IACJ,qEACI,IAAU,yDACV,IACJ,2EAEI,IAAuC;CAC3C,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,OAAO;CACP,WAAW;CACX,WAAW;CACX,QAAQ;CACR,UAAU;CACV,KAAK;CAEL,SAAS;CACT,SAAS;CAET,SAAS;CACT,SAAS;CACT,SAAS;CACT,WAAW;CACX,WAAW;CACX,aAAa;CACb,WAAW;CACX,MAAM;CAEN,aAAa;CACb,eAAe;CACf,UAAU;CACV,aAAa;CACb,YAAY;CACZ,aAAa;CAEb,mBAAmB;CACnB,qBAAqB;CACrB,aAAa;CACb,WAAW;CACX,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,YAAY;CACZ,SAAS;CACV,EAOY,KAAqC,EAAE,WAAQ,mBAC1D,kBAAC,QAAD;CACE,WAAW,EACT,6FACA,EAAa,MAAW,GACxB,EACD;WAEA,EAAO,QAAQ,MAAM,IAAI;CACrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AutomationPage.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/automation/AutomationPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAsC9D,eAAO,MAAM,cAAc,EAAE,EAuY5B,CAAC"}
1
+ {"version":3,"file":"AutomationPage.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/automation/AutomationPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAqD9D,eAAO,MAAM,cAAc,EAAE,EA4X5B,CAAC"}
@@ -1,119 +1,119 @@
1
- import { useCreateHeadshotmarketingWorkflowMutation as e } from "../../../generated/wspace-operations.js";
1
+ import { useCreateHeadshotmarketingAutomationWorkflowMutation as e } from "../../../generated/wspace-operations.js";
2
2
  import { useHeadshotMarketing as t } from "../../context/HeadshotMarketingContext.js";
3
- import { cn as n, formatDate as r, formatNumber as i, formatPercentage as a } from "../../utils/helpers.js";
4
- import { PageLayout as o } from "../../components/PageLayout.js";
5
- import { StatCard as s } from "../../components/StatCard.js";
6
- import { DataTable as c } from "../../components/DataTable.js";
7
- import { StatusBadge as l } from "../../components/StatusBadge.js";
8
- import { EmptyState as u } from "../../components/EmptyState.js";
9
- import { QueryStateBoundary as ee } from "../../components/QueryStateBoundary.js";
10
- import { Pagination as d } from "../../components/Pagination.js";
3
+ import { cn as n, formatDate as ee, formatNumber as r, formatPercentage as i } from "../../utils/helpers.js";
4
+ import { PageLayout as a } from "../../components/PageLayout.js";
5
+ import { StatCard as o } from "../../components/StatCard.js";
6
+ import { DataTable as s } from "../../components/DataTable.js";
7
+ import { StatusBadge as c } from "../../components/StatusBadge.js";
8
+ import { EmptyState as l } from "../../components/EmptyState.js";
9
+ import { QueryStateBoundary as te } from "../../components/QueryStateBoundary.js";
10
+ import { Pagination as u } from "../../components/Pagination.js";
11
11
  import "../../components/index.js";
12
- import { useHeadshotmarketingBootstrap as f } from "../../hooks/useHeadshotmarketingBootstrap.js";
13
- import { usePagination as p } from "../../hooks/usePagination.js";
12
+ import { usePagination as d } from "../../hooks/usePagination.js";
14
13
  import "../../hooks/index.js";
15
- import { toAutomationLogModel as m, toWorkflowDefinitionInput as te, toWorkflowModel as ne, toWorkflowTemplateModel as h } from "../../utils/automationMapper.js";
16
- import { estimateTimeSavedMinutes as g, formatTimeSaved as _ } from "../../utils/automationStats.js";
17
- import { WorkflowRowControls as v } from "./WorkflowActions.js";
18
- import { useEffect as y, useMemo as b, useState as x } from "react";
19
- import { CheckCircle2 as S, Clock as C, GitBranch as w, Play as T, Plus as E, Zap as D } from "lucide-react";
20
- import { jsx as O, jsxs as k } from "react/jsx-runtime";
21
- import { EmphasisPanel as re, NextSteps as ie, PagePurpose as A } from "@burdenoff/fe-libs/ui";
14
+ import { describeTrigger as f, visibleStepCount as p, workflowBadgeStatus as m } from "../../utils/automationMapper.js";
15
+ import { estimateTimeSavedMinutes as h, formatTimeSaved as ne } from "../../utils/automationStats.js";
16
+ import { WorkflowRowControls as re, WorkflowStatusToggle as ie, builderPathFor as g } from "./WorkflowActions.js";
17
+ import { useAutomationData as _ } from "./useAutomationData.js";
18
+ import { useEffect as v, useMemo as y, useState as b } from "react";
19
+ import { CheckCircle2 as x, Clock as S, GitBranch as C, Play as w, Plus as T, Zap as E } from "lucide-react";
20
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
21
+ import { EmphasisPanel as ae, NextSteps as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
22
22
  //#region src/headshotmarketing/pages/automation/AutomationPage.tsx
23
23
  var j = () => {
24
- let { navigate: j, basePath: M } = t(), { data: N, loading: P, error: F, refetch: I } = f(), [L, R] = x("workflows"), [z] = e(), [B, V] = x(null), [H, U] = x(null), W = b(() => N?.headshotmarketingWorkflows.items ?? [], [N?.headshotmarketingWorkflows.items]), G = b(() => {
25
- let e = /* @__PURE__ */ new Map();
26
- for (let t of W) e.set(t.id, t);
27
- return e;
28
- }, [W]), K = b(() => W.map((e) => ne(e)), [W]), q = b(() => Object.fromEntries(K.map((e) => [e.id, e.name])), [K]), J = b(() => (N?.headshotmarketingWorkflowExecutions.items ?? []).map((e) => m(e, q)), [N?.headshotmarketingWorkflowExecutions.items, q]), Y = b(() => K.map((e) => h(e)), [K]), ae = K.filter((e) => e.status === "active").length, oe = K.reduce((e, t) => e + t.enrolledCount, 0), se = K.filter((e) => e.enrolledCount > 0).length > 0 ? K.reduce((e, t) => e + t.conversionRate, 0) / K.filter((e) => e.enrolledCount > 0).length : 0, ce = J.filter((e) => e.status === "success").length, le = _(g(ce)), X = p({ initialPageSize: 8 }), { page: Z, pageSize: Q, setTotal: $ } = X;
29
- y(() => {
30
- $(K.length);
31
- }, [K.length, $]);
32
- let ue = b(() => K.slice((Z - 1) * Q, (Z - 1) * Q + Q), [
33
- K,
24
+ let { navigate: j, basePath: M } = t(), { workflows: N, runs: P, stats: F, runsCapped: I, loading: L, error: R, refetch: z, upsertWorkflow: B, removeWorkflow: V } = _(), [H, U] = b("workflows"), [W] = e(), [G, K] = b(null), [q, J] = b(null), Y = y(() => new Map(N.map((e) => [e.id, e.name])), [N]), oe = y(() => P.map((e) => ({
25
+ id: e.id,
26
+ workflowName: Y.get(e.workflowId) ?? "Deleted workflow",
27
+ subject: `${e.subjectType.toLowerCase()} ${e.subjectId.slice(0, 8)}`,
28
+ status: e.status.toLowerCase(),
29
+ message: e.errorMessage ?? (e.status === "COMPLETED" ? "Completed" : `At step ${e.currentStepIndex + 1}`),
30
+ startedAt: e.startedAt
31
+ })), [P, Y]), se = N.filter((e) => e.status === "ACTIVE").length, ce = I ? "+" : "", le = ne(h(F.total.completed)), X = d({ initialPageSize: 8 }), { page: Z, pageSize: Q, setTotal: $ } = X;
32
+ v(() => {
33
+ $(N.length);
34
+ }, [N.length, $]);
35
+ let ue = y(() => N.slice((Z - 1) * Q, (Z - 1) * Q + Q), [
36
+ N,
34
37
  Z,
35
38
  Q
36
39
  ]), de = async (e) => {
37
- let t = G.get(e);
38
- if (!t) return;
39
- U(null), V(e);
40
- let n = te({
41
- name: `${t.name} (Copy)`,
42
- description: t.description ?? null,
43
- triggerType: t.triggerType,
44
- triggerConfig: t.triggerConfig ?? void 0,
45
- steps: t.steps,
46
- variables: t.variables ?? void 0,
47
- tags: t.tags
48
- });
40
+ J(null), K(e.id);
49
41
  try {
50
- await z({ variables: { input: n } }), await I(), j(M + "/automation/workflows");
42
+ let t = (await W({ variables: { input: {
43
+ name: `${e.name} (Copy)`,
44
+ description: e.description ?? null,
45
+ triggerType: e.triggerType,
46
+ triggerConfig: e.triggerConfig ?? {},
47
+ steps: e.steps
48
+ } } })).data?.createHeadshotmarketingAutomationWorkflow;
49
+ t && j(g(M, t.id));
51
50
  } catch (e) {
52
- U(e instanceof Error ? e.message : "Failed to use template.");
51
+ J(e instanceof Error ? e.message : "Failed to use template.");
53
52
  } finally {
54
- V(null);
53
+ K(null);
55
54
  }
56
55
  };
57
- return /* @__PURE__ */ k(o, {
56
+ return /* @__PURE__ */ O(a, {
58
57
  title: "Automation",
59
58
  description: "Automate your marketing workflows",
60
59
  children: [
61
- /* @__PURE__ */ O(A, { children: "Put repetitive marketing on autopilot. Build workflows that react to events — a new lead, a form submission, a date — and automatically send emails, update records or notify your team. Track every run and reuse proven templates so your funnel keeps working while you don't." }),
62
- /* @__PURE__ */ O(ie, {
60
+ /* @__PURE__ */ D(A, { children: "Put repetitive marketing on autopilot. Build workflows that react to CRM events — a new lead, a new contact, a lead score reaching a threshold — and automatically send emails, notify your team, tag or update records and call webhooks. Track every run and reuse proven workflows." }),
61
+ /* @__PURE__ */ D(k, {
63
62
  storageKey: "headshotmarketing-automation-overview",
64
63
  steps: [
65
64
  {
66
65
  id: "build",
67
66
  label: "Build a workflow",
68
67
  description: "Chain a trigger to a sequence of automated actions.",
69
- icon: /* @__PURE__ */ O(E, { className: "h-4 w-4" }),
70
- onClick: () => j(M + "/automation/workflows/builder")
68
+ icon: /* @__PURE__ */ D(T, { className: "h-4 w-4" }),
69
+ onClick: () => j(g(M))
71
70
  },
72
71
  {
73
72
  id: "workflows",
74
73
  label: "Manage workflows",
75
- description: "Enable, pause and review your existing automations.",
76
- icon: /* @__PURE__ */ O(D, { className: "h-4 w-4" }),
74
+ description: "Switch automations on or off and review their runs.",
75
+ icon: /* @__PURE__ */ D(E, { className: "h-4 w-4" }),
77
76
  onClick: () => j(M + "/automation/workflows")
78
77
  },
79
78
  {
80
79
  id: "triggers",
81
80
  label: "Explore triggers",
82
81
  description: "See what events can kick off an automation.",
83
- icon: /* @__PURE__ */ O(w, { className: "h-4 w-4" }),
82
+ icon: /* @__PURE__ */ D(C, { className: "h-4 w-4" }),
84
83
  onClick: () => j(M + "/automation/triggers")
85
84
  }
86
85
  ]
87
86
  }),
88
- /* @__PURE__ */ O(re, { children: /* @__PURE__ */ k("div", {
87
+ /* @__PURE__ */ D(ae, { children: /* @__PURE__ */ O("div", {
89
88
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
90
89
  children: [
91
- /* @__PURE__ */ O(s, {
90
+ /* @__PURE__ */ D(o, {
92
91
  title: "Active Workflows",
93
- value: ae,
94
- icon: /* @__PURE__ */ O(D, { className: "h-4 w-4" })
92
+ value: se,
93
+ icon: /* @__PURE__ */ D(E, { className: "h-4 w-4" })
95
94
  }),
96
- /* @__PURE__ */ O(s, {
97
- title: "Total Runs",
98
- value: i(oe),
99
- icon: /* @__PURE__ */ O(T, { className: "h-4 w-4" })
95
+ /* @__PURE__ */ D(o, {
96
+ title: "Runs This Month",
97
+ value: `${r(F.total.runsThisMonth)}${ce}`,
98
+ icon: /* @__PURE__ */ D(w, { className: "h-4 w-4" })
100
99
  }),
101
- /* @__PURE__ */ O(s, {
100
+ /* @__PURE__ */ D(o, {
102
101
  title: "Success Rate",
103
- value: a(se),
104
- icon: /* @__PURE__ */ O(S, { className: "h-4 w-4" })
102
+ value: F.total.successRate === null ? "—" : i(F.total.successRate),
103
+ icon: /* @__PURE__ */ D(x, { className: "h-4 w-4" })
105
104
  }),
106
- /* @__PURE__ */ O(s, {
105
+ /* @__PURE__ */ D(o, {
107
106
  title: "Time Saved",
108
107
  value: le,
109
- icon: /* @__PURE__ */ O(C, { className: "h-4 w-4" })
108
+ icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" })
110
109
  })
111
110
  ]
112
111
  }) }),
113
- /* @__PURE__ */ O("div", {
112
+ /* @__PURE__ */ D("div", {
114
113
  className: "border-b border-border-subtle",
115
- children: /* @__PURE__ */ O("div", {
114
+ children: /* @__PURE__ */ D("div", {
116
115
  className: "flex flex-nowrap gap-6 overflow-x-auto",
116
+ role: "tablist",
117
117
  children: [
118
118
  {
119
119
  key: "workflows",
@@ -121,179 +121,184 @@ var j = () => {
121
121
  },
122
122
  {
123
123
  key: "logs",
124
- label: "Logs"
124
+ label: "Runs"
125
125
  },
126
126
  {
127
127
  key: "templates",
128
128
  label: "Templates"
129
129
  }
130
- ].map((e) => /* @__PURE__ */ O("button", {
131
- onClick: () => R(e.key),
132
- className: n("whitespace-nowrap pb-3 text-sm font-medium transition-colors border-b-2", L === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
130
+ ].map((e) => /* @__PURE__ */ D("button", {
131
+ role: "tab",
132
+ "aria-selected": H === e.key,
133
+ onClick: () => U(e.key),
134
+ className: n("whitespace-nowrap pb-3 text-sm font-medium transition-colors border-b-2", H === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
133
135
  children: e.label
134
136
  }, e.key))
135
137
  })
136
138
  }),
137
- H && /* @__PURE__ */ O("div", {
138
- className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
139
- children: H
139
+ q && /* @__PURE__ */ D("div", {
140
+ role: "alert",
141
+ className: "rounded-lg border border-status-error-border bg-status-error-bg px-4 py-3 text-sm text-status-error-text",
142
+ children: q
140
143
  }),
141
- /* @__PURE__ */ k(ee, {
142
- loading: P,
143
- error: F,
144
- onRetry: I,
145
- hasData: !!N,
144
+ /* @__PURE__ */ O(te, {
145
+ loading: L,
146
+ error: R ?? void 0,
147
+ onRetry: () => void z(),
148
+ hasData: N.length > 0,
146
149
  children: [
147
- L === "workflows" && (K.length === 0 ? /* @__PURE__ */ O(u, {
150
+ H === "workflows" && (N.length === 0 ? /* @__PURE__ */ D(l, {
148
151
  illustration: "empty-generic",
149
152
  title: "No workflows yet",
150
153
  description: "Create your first automation to start saving time on repetitive marketing tasks.",
151
- action: /* @__PURE__ */ k("button", {
152
- onClick: () => j(M + "/automation/workflows/builder"),
154
+ action: /* @__PURE__ */ O("button", {
155
+ onClick: () => j(g(M)),
153
156
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
154
- children: [/* @__PURE__ */ O(E, { className: "h-4 w-4" }), "Build a workflow"]
157
+ children: [/* @__PURE__ */ D(T, { className: "h-4 w-4" }), "Build a workflow"]
155
158
  })
156
- }) : /* @__PURE__ */ k("div", {
159
+ }) : /* @__PURE__ */ O("div", {
157
160
  className: "space-y-4",
158
- children: [ue.map((e) => /* @__PURE__ */ O("div", {
159
- className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 hover:bg-bg-sunken/50 transition-colors",
160
- children: /* @__PURE__ */ k("div", {
161
- className: "flex items-start justify-between gap-3",
162
- children: [/* @__PURE__ */ k("div", {
163
- className: "flex-1 min-w-0",
164
- children: [
165
- /* @__PURE__ */ k("div", {
166
- className: "flex flex-wrap items-center gap-3",
167
- children: [/* @__PURE__ */ O("h4", {
168
- className: "text-sm font-semibold text-text-primary",
169
- children: e.name
170
- }), /* @__PURE__ */ O(l, { status: e.status })]
171
- }),
172
- /* @__PURE__ */ O("p", {
173
- className: "text-xs text-text-secondary mt-1",
174
- children: e.description
175
- }),
176
- /* @__PURE__ */ k("div", {
177
- className: "flex flex-wrap items-center gap-4 mt-3 text-xs text-text-secondary",
178
- children: [
179
- /* @__PURE__ */ k("span", { children: ["Trigger: ", e.trigger.description] }),
180
- /* @__PURE__ */ k("span", { children: [e.actions.length, " actions"] }),
181
- /* @__PURE__ */ k("span", { children: [i(e.enrolledCount), " enrolled"] }),
182
- /* @__PURE__ */ k("span", { children: [a(e.conversionRate), " conversion"] })
183
- ]
184
- })
185
- ]
186
- }), /* @__PURE__ */ O(v, {
187
- workflow: e,
188
- raw: G.get(e.id),
189
- onChanged: () => void I()
190
- })]
191
- })
192
- }, e.id)), /* @__PURE__ */ O(d, {
161
+ children: [ue.map((e) => {
162
+ let t = F.byWorkflow.get(e.id);
163
+ return /* @__PURE__ */ D("div", {
164
+ className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
165
+ children: /* @__PURE__ */ O("div", {
166
+ className: "flex items-start justify-between gap-3",
167
+ children: [/* @__PURE__ */ O("div", {
168
+ className: "flex-1 min-w-0",
169
+ children: [
170
+ /* @__PURE__ */ O("div", {
171
+ className: "flex flex-wrap items-center gap-3",
172
+ children: [/* @__PURE__ */ D("h4", {
173
+ className: "text-sm font-semibold text-text-primary",
174
+ children: e.name
175
+ }), /* @__PURE__ */ D(c, { status: m(e.status) })]
176
+ }),
177
+ e.description && /* @__PURE__ */ D("p", {
178
+ className: "text-xs text-text-secondary mt-1",
179
+ children: e.description
180
+ }),
181
+ /* @__PURE__ */ O("div", {
182
+ className: "flex flex-wrap items-center gap-4 mt-3 text-xs text-text-secondary",
183
+ children: [
184
+ /* @__PURE__ */ O("span", { children: ["Trigger: ", f(e)] }),
185
+ /* @__PURE__ */ O("span", { children: [p(e.steps), " steps"] }),
186
+ /* @__PURE__ */ O("span", { children: [r(e.totalRuns), " runs"] }),
187
+ /* @__PURE__ */ D("span", { children: t?.successRate == null ? "No finished runs this month" : `${i(t.successRate)} success this month` })
188
+ ]
189
+ })
190
+ ]
191
+ }), /* @__PURE__ */ O("div", {
192
+ className: "flex items-center gap-2",
193
+ children: [/* @__PURE__ */ D(ie, {
194
+ workflow: e,
195
+ onWorkflowChanged: B,
196
+ onError: J
197
+ }), /* @__PURE__ */ D(re, {
198
+ workflow: e,
199
+ onWorkflowChanged: B,
200
+ onWorkflowRemoved: V,
201
+ onRunsChanged: () => void z()
202
+ })]
203
+ })]
204
+ })
205
+ }, e.id);
206
+ }), /* @__PURE__ */ D(u, {
193
207
  page: X.page,
194
208
  pageSize: X.pageSize,
195
209
  total: X.total,
196
210
  onPageChange: X.setPage,
197
211
  onPageSizeChange: X.setPageSize,
198
- disabled: P,
212
+ disabled: L,
199
213
  hideWhenSinglePage: !0
200
214
  })]
201
215
  })),
202
- L === "logs" && /* @__PURE__ */ O("div", {
216
+ H === "logs" && /* @__PURE__ */ D("div", {
203
217
  className: "overflow-x-auto",
204
- children: /* @__PURE__ */ O(c, {
205
- data: J,
218
+ children: /* @__PURE__ */ D(s, {
219
+ data: oe,
206
220
  columns: [
207
221
  {
208
222
  key: "workflowName",
209
223
  header: "Workflow",
210
224
  sortable: !0,
211
- render: (e) => /* @__PURE__ */ O("span", {
225
+ render: (e) => /* @__PURE__ */ D("span", {
212
226
  className: "font-medium text-text-primary",
213
227
  children: e.workflowName
214
228
  })
215
229
  },
216
230
  {
217
- key: "contactEmail",
218
- header: "Contact",
219
- render: (e) => /* @__PURE__ */ O("span", {
220
- className: "text-sm",
221
- children: e.contactEmail
222
- })
223
- },
224
- {
225
- key: "action",
226
- header: "Action",
227
- render: (e) => /* @__PURE__ */ O("span", {
228
- className: "text-sm text-text-secondary",
229
- children: e.action
231
+ key: "subject",
232
+ header: "Subject",
233
+ render: (e) => /* @__PURE__ */ D("span", {
234
+ className: "text-sm capitalize text-text-secondary",
235
+ children: e.subject
230
236
  })
231
237
  },
232
238
  {
233
239
  key: "status",
234
240
  header: "Status",
235
- render: (e) => /* @__PURE__ */ O(l, { status: e.status })
241
+ render: (e) => /* @__PURE__ */ D(c, { status: e.status })
236
242
  },
237
243
  {
238
244
  key: "message",
239
- header: "Message",
240
- render: (e) => /* @__PURE__ */ O("span", {
245
+ header: "Detail",
246
+ render: (e) => /* @__PURE__ */ D("span", {
241
247
  className: "text-xs text-text-secondary",
242
248
  children: e.message
243
249
  })
244
250
  },
245
251
  {
246
- key: "executedAt",
247
- header: "Executed",
252
+ key: "startedAt",
253
+ header: "Started",
248
254
  sortable: !0,
249
- render: (e) => /* @__PURE__ */ O("span", {
255
+ render: (e) => /* @__PURE__ */ D("span", {
250
256
  className: "text-xs text-text-secondary",
251
- children: r(e.executedAt, "relative")
257
+ children: ee(e.startedAt, "relative")
252
258
  })
253
259
  }
254
260
  ],
255
261
  searchable: !0,
256
- searchPlaceholder: "Search logs..."
262
+ searchPlaceholder: "Search runs..."
257
263
  })
258
264
  }),
259
- L === "templates" && (Y.length === 0 ? /* @__PURE__ */ O(u, {
265
+ H === "templates" && (N.length === 0 ? /* @__PURE__ */ D(l, {
260
266
  illustration: "empty-generic",
261
267
  title: "No templates yet",
262
268
  description: "Templates appear here once you create workflows you can reuse."
263
- }) : /* @__PURE__ */ O("div", {
269
+ }) : /* @__PURE__ */ D("div", {
264
270
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
265
- children: Y.map((e) => /* @__PURE__ */ k("div", {
266
- className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 hover:bg-bg-sunken/50 transition-colors",
267
- children: [/* @__PURE__ */ k("div", {
271
+ children: N.map((e) => /* @__PURE__ */ O("div", {
272
+ className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
273
+ children: [/* @__PURE__ */ D("div", {
268
274
  className: "flex items-start justify-between gap-2",
269
- children: [/* @__PURE__ */ k("div", {
275
+ children: /* @__PURE__ */ O("div", {
270
276
  className: "min-w-0",
271
- children: [/* @__PURE__ */ O("h4", {
277
+ children: [/* @__PURE__ */ D("h4", {
272
278
  className: "text-sm font-semibold text-text-primary",
273
279
  children: e.name
274
280
  }), /* @__PURE__ */ O("p", {
275
281
  className: "text-xs text-text-secondary mt-1",
276
- children: e.description
282
+ children: [
283
+ f(e),
284
+ " · ",
285
+ p(e.steps),
286
+ " ",
287
+ "steps"
288
+ ]
277
289
  })]
278
- }), /* @__PURE__ */ O("span", {
279
- className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] font-medium text-text-secondary whitespace-nowrap",
280
- children: e.category
281
- })]
282
- }), /* @__PURE__ */ k("div", {
290
+ })
291
+ }), /* @__PURE__ */ O("div", {
283
292
  className: "flex items-center justify-between mt-3 pt-3 border-t border-border-subtle",
284
- children: [/* @__PURE__ */ k("span", {
293
+ children: [/* @__PURE__ */ O("span", {
285
294
  className: "text-xs text-text-secondary",
286
- children: [
287
- "Popularity: ",
288
- e.popularity,
289
- "%"
290
- ]
291
- }), /* @__PURE__ */ O("button", {
295
+ children: [r(e.totalRuns), " runs"]
296
+ }), /* @__PURE__ */ D("button", {
292
297
  type: "button",
293
- onClick: () => void de(e.id),
294
- disabled: B === e.id,
298
+ onClick: () => void de(e),
299
+ disabled: G === e.id,
295
300
  className: "text-xs font-medium text-primary hover:underline disabled:opacity-50",
296
- children: B === e.id ? "Creating…" : "Use Template"
301
+ children: G === e.id ? "Creating…" : "Use as template"
297
302
  })]
298
303
  })]
299
304
  }, e.id))