@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.
- package/dist/generated/global-types.d.ts +5145 -1627
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +512 -248
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +349 -292
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +21251 -468
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +20 -20
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/PageLayout.d.ts +5 -0
- package/dist/headshotmarketing/components/PageLayout.d.ts.map +1 -1
- package/dist/headshotmarketing/components/PageLayout.js +12 -6
- package/dist/headshotmarketing/components/PageLayout.js.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js +3 -0
- package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/AutomationPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/AutomationPage.js +172 -167
- package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/TriggersPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/TriggersPage.js +127 -143
- package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowActions.d.ts +16 -16
- package/dist/headshotmarketing/pages/automation/WorkflowActions.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowActions.js +104 -221
- package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.d.ts +16 -0
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +470 -549
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.d.ts +2 -0
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js +19 -19
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +341 -164
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.d.ts +13 -0
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +294 -0
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.d.ts +2 -0
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +198 -220
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/useAutomationData.d.ts +24 -0
- package/dist/headshotmarketing/pages/automation/useAutomationData.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/automation/useAutomationData.js +77 -0
- package/dist/headshotmarketing/pages/automation/useAutomationData.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.d.ts +73 -16
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +220 -80
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/workflowCompiler.d.ts +51 -0
- package/dist/headshotmarketing/pages/automation/workflowCompiler.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/automation/workflowCompiler.js +453 -0
- package/dist/headshotmarketing/pages/automation/workflowCompiler.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/PostsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +267 -194
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/types/index.d.ts +6 -0
- package/dist/headshotmarketing/types/index.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/automationMapper.d.ts +50 -29
- package/dist/headshotmarketing/utils/automationMapper.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/automationMapper.js +55 -99
- package/dist/headshotmarketing/utils/automationMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/socialMapper.d.ts +8 -0
- package/dist/headshotmarketing/utils/socialMapper.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/socialMapper.js +27 -15
- package/dist/headshotmarketing/utils/socialMapper.js.map +1 -1
- 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,
|
|
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,
|
|
5
|
-
className: e("space-y-6",
|
|
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", {
|
|
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
|
-
})] }),
|
|
20
|
+
})] }), o && /* @__PURE__ */ t("div", {
|
|
15
21
|
className: "flex items-center gap-2",
|
|
16
|
-
children:
|
|
22
|
+
children: o
|
|
17
23
|
})]
|
|
18
|
-
}),
|
|
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
|
|
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;
|
|
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"}
|
|
@@ -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
|
|
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 {
|
|
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
|
|
4
|
-
import { PageLayout as
|
|
5
|
-
import { StatCard as
|
|
6
|
-
import { DataTable as
|
|
7
|
-
import { StatusBadge as
|
|
8
|
-
import { EmptyState as
|
|
9
|
-
import { QueryStateBoundary as
|
|
10
|
-
import { Pagination as
|
|
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 {
|
|
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 {
|
|
16
|
-
import { estimateTimeSavedMinutes as
|
|
17
|
-
import { WorkflowRowControls as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
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(), {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
51
|
+
J(e instanceof Error ? e.message : "Failed to use template.");
|
|
53
52
|
} finally {
|
|
54
|
-
|
|
53
|
+
K(null);
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ O(a, {
|
|
58
57
|
title: "Automation",
|
|
59
58
|
description: "Automate your marketing workflows",
|
|
60
59
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
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__ */
|
|
70
|
-
onClick: () => j(M
|
|
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: "
|
|
76
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
90
|
+
/* @__PURE__ */ D(o, {
|
|
92
91
|
title: "Active Workflows",
|
|
93
|
-
value:
|
|
94
|
-
icon: /* @__PURE__ */
|
|
92
|
+
value: se,
|
|
93
|
+
icon: /* @__PURE__ */ D(E, { className: "h-4 w-4" })
|
|
95
94
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
title: "
|
|
98
|
-
value:
|
|
99
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
100
|
+
/* @__PURE__ */ D(o, {
|
|
102
101
|
title: "Success Rate",
|
|
103
|
-
value:
|
|
104
|
-
icon: /* @__PURE__ */
|
|
102
|
+
value: F.total.successRate === null ? "—" : i(F.total.successRate),
|
|
103
|
+
icon: /* @__PURE__ */ D(x, { className: "h-4 w-4" })
|
|
105
104
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ D(o, {
|
|
107
106
|
title: "Time Saved",
|
|
108
107
|
value: le,
|
|
109
|
-
icon: /* @__PURE__ */
|
|
108
|
+
icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" })
|
|
110
109
|
})
|
|
111
110
|
]
|
|
112
111
|
}) }),
|
|
113
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ D("div", {
|
|
114
113
|
className: "border-b border-border-subtle",
|
|
115
|
-
children: /* @__PURE__ */
|
|
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: "
|
|
124
|
+
label: "Runs"
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
key: "templates",
|
|
128
128
|
label: "Templates"
|
|
129
129
|
}
|
|
130
|
-
].map((e) => /* @__PURE__ */
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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__ */
|
|
142
|
-
loading:
|
|
143
|
-
error:
|
|
144
|
-
onRetry:
|
|
145
|
-
hasData:
|
|
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
|
-
|
|
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__ */
|
|
152
|
-
onClick: () => j(M
|
|
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__ */
|
|
157
|
+
children: [/* @__PURE__ */ D(T, { className: "h-4 w-4" }), "Build a workflow"]
|
|
155
158
|
})
|
|
156
|
-
}) : /* @__PURE__ */
|
|
159
|
+
}) : /* @__PURE__ */ O("div", {
|
|
157
160
|
className: "space-y-4",
|
|
158
|
-
children: [ue.map((e) =>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
className: "
|
|
162
|
-
children:
|
|
163
|
-
className: "flex-
|
|
164
|
-
children: [
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
className: "
|
|
169
|
-
children:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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:
|
|
212
|
+
disabled: L,
|
|
199
213
|
hideWhenSinglePage: !0
|
|
200
214
|
})]
|
|
201
215
|
})),
|
|
202
|
-
|
|
216
|
+
H === "logs" && /* @__PURE__ */ D("div", {
|
|
203
217
|
className: "overflow-x-auto",
|
|
204
|
-
children: /* @__PURE__ */
|
|
205
|
-
data:
|
|
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__ */
|
|
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: "
|
|
218
|
-
header: "
|
|
219
|
-
render: (e) => /* @__PURE__ */
|
|
220
|
-
className: "text-sm",
|
|
221
|
-
children: e.
|
|
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__ */
|
|
241
|
+
render: (e) => /* @__PURE__ */ D(c, { status: e.status })
|
|
236
242
|
},
|
|
237
243
|
{
|
|
238
244
|
key: "message",
|
|
239
|
-
header: "
|
|
240
|
-
render: (e) => /* @__PURE__ */
|
|
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: "
|
|
247
|
-
header: "
|
|
252
|
+
key: "startedAt",
|
|
253
|
+
header: "Started",
|
|
248
254
|
sortable: !0,
|
|
249
|
-
render: (e) => /* @__PURE__ */
|
|
255
|
+
render: (e) => /* @__PURE__ */ D("span", {
|
|
250
256
|
className: "text-xs text-text-secondary",
|
|
251
|
-
children:
|
|
257
|
+
children: ee(e.startedAt, "relative")
|
|
252
258
|
})
|
|
253
259
|
}
|
|
254
260
|
],
|
|
255
261
|
searchable: !0,
|
|
256
|
-
searchPlaceholder: "Search
|
|
262
|
+
searchPlaceholder: "Search runs..."
|
|
257
263
|
})
|
|
258
264
|
}),
|
|
259
|
-
|
|
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__ */
|
|
269
|
+
}) : /* @__PURE__ */ D("div", {
|
|
264
270
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
265
|
-
children:
|
|
266
|
-
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4
|
|
267
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
275
|
+
children: /* @__PURE__ */ O("div", {
|
|
270
276
|
className: "min-w-0",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
282
|
+
children: [
|
|
283
|
+
f(e),
|
|
284
|
+
" · ",
|
|
285
|
+
p(e.steps),
|
|
286
|
+
" ",
|
|
287
|
+
"steps"
|
|
288
|
+
]
|
|
277
289
|
})]
|
|
278
|
-
})
|
|
279
|
-
|
|
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__ */
|
|
293
|
+
children: [/* @__PURE__ */ O("span", {
|
|
285
294
|
className: "text-xs text-text-secondary",
|
|
286
|
-
children: [
|
|
287
|
-
|
|
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
|
|
294
|
-
disabled:
|
|
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:
|
|
301
|
+
children: G === e.id ? "Creating…" : "Use as template"
|
|
297
302
|
})]
|
|
298
303
|
})]
|
|
299
304
|
}, e.id))
|