@burdenoff/microfe-headshotmarketing 2026.924.3 → 2026.925.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 (55) hide show
  1. package/dist/generated/wspace-operations.d.ts +269 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +246 -121
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +83988 -38349
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/generated/wspace-types.js +6 -4
  8. package/dist/generated/wspace-types.js.map +1 -1
  9. package/dist/headshotmarketing/components/ConfirmDeleteDialog.d.ts +20 -0
  10. package/dist/headshotmarketing/components/ConfirmDeleteDialog.d.ts.map +1 -0
  11. package/dist/headshotmarketing/components/ConfirmDeleteDialog.js +40 -0
  12. package/dist/headshotmarketing/components/ConfirmDeleteDialog.js.map +1 -0
  13. package/dist/headshotmarketing/components/index.d.ts +1 -0
  14. package/dist/headshotmarketing/components/index.d.ts.map +1 -1
  15. package/dist/headshotmarketing/components/index.js +1 -0
  16. package/dist/headshotmarketing/pages/crm/PipelineActions.d.ts +13 -0
  17. package/dist/headshotmarketing/pages/crm/PipelineActions.d.ts.map +1 -0
  18. package/dist/headshotmarketing/pages/crm/PipelineActions.js +44 -0
  19. package/dist/headshotmarketing/pages/crm/PipelineActions.js.map +1 -0
  20. package/dist/headshotmarketing/pages/crm/PipelinePage.d.ts.map +1 -1
  21. package/dist/headshotmarketing/pages/crm/PipelinePage.js +141 -83
  22. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  23. package/dist/headshotmarketing/pages/influencers/InfluencerActions.d.ts +13 -0
  24. package/dist/headshotmarketing/pages/influencers/InfluencerActions.d.ts.map +1 -0
  25. package/dist/headshotmarketing/pages/influencers/InfluencerActions.js +44 -0
  26. package/dist/headshotmarketing/pages/influencers/InfluencerActions.js.map +1 -0
  27. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.d.ts.map +1 -1
  28. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +107 -91
  29. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  30. package/dist/headshotmarketing/pages/social-media/AccountsPage.d.ts.map +1 -1
  31. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +201 -167
  32. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/social-media/socialConnect.d.ts +73 -0
  34. package/dist/headshotmarketing/pages/social-media/socialConnect.d.ts.map +1 -0
  35. package/dist/headshotmarketing/pages/social-media/socialConnect.js +67 -0
  36. package/dist/headshotmarketing/pages/social-media/socialConnect.js.map +1 -0
  37. package/dist/headshotmarketing/pages/social-media/useSocialConnect.d.ts +22 -0
  38. package/dist/headshotmarketing/pages/social-media/useSocialConnect.d.ts.map +1 -0
  39. package/dist/headshotmarketing/pages/social-media/useSocialConnect.js +90 -0
  40. package/dist/headshotmarketing/pages/social-media/useSocialConnect.js.map +1 -0
  41. package/dist/headshotmarketing/types/index.d.ts +4 -0
  42. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  43. package/dist/headshotmarketing/utils/deleteFeedback.d.ts +22 -0
  44. package/dist/headshotmarketing/utils/deleteFeedback.d.ts.map +1 -0
  45. package/dist/headshotmarketing/utils/deleteFeedback.js +19 -0
  46. package/dist/headshotmarketing/utils/deleteFeedback.js.map +1 -0
  47. package/dist/headshotmarketing/utils/oauthPopup.d.ts +58 -0
  48. package/dist/headshotmarketing/utils/oauthPopup.d.ts.map +1 -0
  49. package/dist/headshotmarketing/utils/oauthPopup.js +68 -0
  50. package/dist/headshotmarketing/utils/oauthPopup.js.map +1 -0
  51. package/dist/headshotmarketing/utils/socialMapper.d.ts +2 -0
  52. package/dist/headshotmarketing/utils/socialMapper.d.ts.map +1 -1
  53. package/dist/headshotmarketing/utils/socialMapper.js +3 -1
  54. package/dist/headshotmarketing/utils/socialMapper.js.map +1 -1
  55. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ import { FC } from 'react';
2
+
3
+ export interface ConfirmDeleteDialogProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ /** Dialog heading, e.g. "Delete pipeline". */
7
+ title: string;
8
+ /** Body copy describing exactly what will be removed. */
9
+ message: string;
10
+ /** True while the delete mutation is in flight. */
11
+ deleting: boolean;
12
+ /** Backend/validation error to surface, or null. */
13
+ error: string | null;
14
+ /** Invoked when the user confirms the deletion. */
15
+ onConfirm: () => void;
16
+ /** Label for the confirm button. Defaults to "Delete". */
17
+ confirmLabel?: string;
18
+ }
19
+ export declare const ConfirmDeleteDialog: FC<ConfirmDeleteDialogProps>;
20
+ //# sourceMappingURL=ConfirmDeleteDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDeleteDialog.d.ts","sourceRoot":"","sources":["../../../src/headshotmarketing/components/ConfirmDeleteDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,mDAAmD;IACnD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAkD5D,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Modal as e } from "./Modal.js";
2
+ import { AlertTriangle as t, Trash2 as n } from "lucide-react";
3
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ //#region src/headshotmarketing/components/ConfirmDeleteDialog.tsx
5
+ var o = ({ open: o, onClose: s, title: c, message: l, deleting: u, error: d, onConfirm: f, confirmLabel: p = "Delete" }) => /* @__PURE__ */ a(e, {
6
+ open: o,
7
+ onClose: s,
8
+ title: c,
9
+ size: "sm",
10
+ footer: /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("button", {
11
+ type: "button",
12
+ onClick: s,
13
+ disabled: u,
14
+ className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
15
+ children: "Cancel"
16
+ }), /* @__PURE__ */ a("button", {
17
+ type: "button",
18
+ onClick: f,
19
+ disabled: u,
20
+ className: "inline-flex items-center gap-2 rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-status-error-text/90 disabled:opacity-60",
21
+ children: [/* @__PURE__ */ i(n, { className: "h-4 w-4" }), u ? "Deleting…" : p]
22
+ })] }),
23
+ children: [/* @__PURE__ */ a("div", {
24
+ className: "flex items-start gap-3",
25
+ children: [/* @__PURE__ */ i(t, {
26
+ className: "mt-0.5 h-5 w-5 flex-shrink-0 text-status-error-text",
27
+ "aria-hidden": "true"
28
+ }), /* @__PURE__ */ i("p", {
29
+ className: "text-sm text-text-secondary",
30
+ children: l
31
+ })]
32
+ }), d ? /* @__PURE__ */ i("div", {
33
+ className: "mt-3 rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
34
+ children: d
35
+ }) : null]
36
+ });
37
+ //#endregion
38
+ export { o as ConfirmDeleteDialog };
39
+
40
+ //# sourceMappingURL=ConfirmDeleteDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDeleteDialog.js","names":[],"sources":["../../../src/headshotmarketing/components/ConfirmDeleteDialog.tsx"],"sourcesContent":["/**\n * ConfirmDeleteDialog\n *\n * Shared destructive-action confirmation built on the local <Modal>. Callers\n * own the delete mutation; this component only renders the confirm/cancel UI,\n * the busy state and any error surfaced back from the backend (e.g. a pipeline\n * that still has deals, or an influencer with active campaigns).\n *\n * @module headshotmarketing/components\n */\n\nimport { type FC } from \"react\";\nimport { AlertTriangle, Trash2 } from \"lucide-react\";\nimport { Modal } from \"./Modal\";\n\nexport interface ConfirmDeleteDialogProps {\n open: boolean;\n onClose: () => void;\n /** Dialog heading, e.g. \"Delete pipeline\". */\n title: string;\n /** Body copy describing exactly what will be removed. */\n message: string;\n /** True while the delete mutation is in flight. */\n deleting: boolean;\n /** Backend/validation error to surface, or null. */\n error: string | null;\n /** Invoked when the user confirms the deletion. */\n onConfirm: () => void;\n /** Label for the confirm button. Defaults to \"Delete\". */\n confirmLabel?: string;\n}\n\nexport const ConfirmDeleteDialog: FC<ConfirmDeleteDialogProps> = ({\n open,\n onClose,\n title,\n message,\n deleting,\n error,\n onConfirm,\n confirmLabel = \"Delete\",\n}) => (\n <Modal\n open={open}\n onClose={onClose}\n title={title}\n size=\"sm\"\n footer={\n <>\n <button\n type=\"button\"\n onClick={onClose}\n disabled={deleting}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={onConfirm}\n disabled={deleting}\n className=\"inline-flex items-center gap-2 rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-status-error-text/90 disabled:opacity-60\"\n >\n <Trash2 className=\"h-4 w-4\" />\n {deleting ? \"Deleting…\" : confirmLabel}\n </button>\n </>\n }\n >\n <div className=\"flex items-start gap-3\">\n <AlertTriangle\n className=\"mt-0.5 h-5 w-5 flex-shrink-0 text-status-error-text\"\n aria-hidden=\"true\"\n />\n <p className=\"text-sm text-text-secondary\">{message}</p>\n </div>\n {error ? (\n <div className=\"mt-3 rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text\">\n {error}\n </div>\n ) : null}\n </Modal>\n);\n"],"mappings":";;;;AAgCA,IAAa,KAAqD,EAChE,SACA,YACA,UACA,YACA,aACA,UACA,cACA,kBAAe,eAEf,kBAAC,GAAD;CACQ;CACG;CACF;CACP,MAAK;CACL,QACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,UAAD;EACE,MAAK;EACL,SAAS;EACT,UAAU;EACV,WAAU;YACX;EAEQ,CAAA,EACT,kBAAC,UAAD;EACE,MAAK;EACL,SAAS;EACT,UAAU;EACV,WAAU;YAJZ,CAME,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA,EAC7B,IAAW,cAAc,EACnB;IACR,EAAA,CAAA;WAxBP,CA2BE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GACE,WAAU;GACV,eAAY;GACZ,CAAA,EACF,kBAAC,KAAD;GAAG,WAAU;aAA+B;GAAY,CAAA,CACpD;KACL,IACC,kBAAC,OAAD;EAAK,WAAU;YACZ;EACG,CAAA,GACJ,KACE"}
@@ -7,6 +7,7 @@ export { ChartCard } from './ChartCard';
7
7
  export { FilterBar } from './FilterBar';
8
8
  export { LoadingSkeleton } from './LoadingSkeleton';
9
9
  export { Modal } from './Modal';
10
+ export { ConfirmDeleteDialog, type ConfirmDeleteDialogProps, } from './ConfirmDeleteDialog';
10
11
  export { ErrorBoundary } from './ErrorBoundary';
11
12
  export { Toast, ToastContainer } from './Toast';
12
13
  export { QueryStateBoundary, type QueryStateBoundaryProps, } from './QueryStateBoundary';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/headshotmarketing/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/headshotmarketing/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,oBAAoB,CAAC"}
@@ -7,6 +7,7 @@ import "./ChartCard.js";
7
7
  import "./FilterBar.js";
8
8
  import "./LoadingSkeleton.js";
9
9
  import "./Modal.js";
10
+ import "./ConfirmDeleteDialog.js";
10
11
  import "./ErrorBoundary.js";
11
12
  import "./Toast.js";
12
13
  import "./QueryStateBoundary.js";
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+
3
+ export interface PipelineSummary {
4
+ id: string;
5
+ name: string;
6
+ }
7
+ export declare const PipelineActionsMenu: FC<{
8
+ pipeline: PipelineSummary;
9
+ /** Number of deals still referencing this pipeline. */
10
+ dealCount: number;
11
+ onDeleted: () => void | Promise<unknown>;
12
+ }>;
13
+ //# sourceMappingURL=PipelineActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PipelineActions.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/crm/PipelineActions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAS1C,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC;IACnC,QAAQ,EAAE,eAAe,CAAC;IAC1B,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C,CA+CA,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { useDeleteHeadshotmarketingPipelineMutation as e } from "../../../generated/wspace-operations.js";
2
+ import { ConfirmDeleteDialog as t } from "../../components/ConfirmDeleteDialog.js";
3
+ import { ActionMenu as n } from "../../components/ActionMenu.js";
4
+ import "../../components/index.js";
5
+ import { extractErrorMessage as r, pipelineDeleteMessage as i } from "../../utils/deleteFeedback.js";
6
+ import { useState as a } from "react";
7
+ import { Trash2 as o } from "lucide-react";
8
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ //#region src/headshotmarketing/pages/crm/PipelineActions.tsx
10
+ var u = ({ pipeline: u, dealCount: d, onDeleted: f }) => {
11
+ let [p, m] = a(!1), [h, g] = a(null), [_, { loading: v }] = e(), y = async () => {
12
+ g(null);
13
+ try {
14
+ await _({ variables: { id: u.id } }), m(!1), await f();
15
+ } catch (e) {
16
+ g(r(e, "Failed to delete pipeline."));
17
+ }
18
+ };
19
+ return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(n, {
20
+ id: `pipeline-actions-${u.id}`,
21
+ buttonLabel: `Actions for ${u.name}`,
22
+ items: [{
23
+ key: "delete",
24
+ label: "Delete",
25
+ danger: !0,
26
+ icon: /* @__PURE__ */ c(o, { className: "h-4 w-4" }),
27
+ onClick: () => {
28
+ g(null), m(!0);
29
+ }
30
+ }]
31
+ }), /* @__PURE__ */ c(t, {
32
+ open: p,
33
+ onClose: () => m(!1),
34
+ title: "Delete pipeline",
35
+ message: i(u.name, d),
36
+ deleting: v,
37
+ error: h,
38
+ onConfirm: () => void y()
39
+ })] });
40
+ };
41
+ //#endregion
42
+ export { u as PipelineActionsMenu };
43
+
44
+ //# sourceMappingURL=PipelineActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PipelineActions.js","names":[],"sources":["../../../../src/headshotmarketing/pages/crm/PipelineActions.tsx"],"sourcesContent":["/**\n * Pipeline row action menu\n *\n * Kebab menu (Delete) for a sales pipeline, wired to the real\n * `deleteHeadshotmarketingPipeline` mutation. Delete asks for confirmation\n * first and, when the pipeline still has deals, warns that the backend may\n * reject the delete. On success `onDeleted()` (the page's bootstrap refetch) is\n * called so the pipeline disappears from lists and deal-form dropdowns.\n *\n * @module headshotmarketing/pages/crm\n */\n\nimport { useState, type FC } from \"react\";\nimport { Trash2 } from \"lucide-react\";\nimport { useDeleteHeadshotmarketingPipelineMutation } from \"../../../generated/wspace-operations\";\nimport { ActionMenu, ConfirmDeleteDialog } from \"../../components\";\nimport {\n extractErrorMessage,\n pipelineDeleteMessage,\n} from \"../../utils/deleteFeedback\";\n\nexport interface PipelineSummary {\n id: string;\n name: string;\n}\n\nexport const PipelineActionsMenu: FC<{\n pipeline: PipelineSummary;\n /** Number of deals still referencing this pipeline. */\n dealCount: number;\n onDeleted: () => void | Promise<unknown>;\n}> = ({ pipeline, dealCount, onDeleted }) => {\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [deletePipeline, { loading: deleting }] =\n useDeleteHeadshotmarketingPipelineMutation();\n\n const handleDelete = async (): Promise<void> => {\n setError(null);\n try {\n await deletePipeline({ variables: { id: pipeline.id } });\n setDeleteOpen(false);\n await onDeleted();\n } catch (err) {\n setError(extractErrorMessage(err, \"Failed to delete pipeline.\"));\n }\n };\n\n return (\n <>\n <ActionMenu\n id={`pipeline-actions-${pipeline.id}`}\n buttonLabel={`Actions for ${pipeline.name}`}\n items={[\n {\n key: \"delete\",\n label: \"Delete\",\n danger: true,\n icon: <Trash2 className=\"h-4 w-4\" />,\n onClick: () => {\n setError(null);\n setDeleteOpen(true);\n },\n },\n ]}\n />\n\n <ConfirmDeleteDialog\n open={deleteOpen}\n onClose={() => setDeleteOpen(false)}\n title=\"Delete pipeline\"\n message={pipelineDeleteMessage(pipeline.name, dealCount)}\n deleting={deleting}\n error={error}\n onConfirm={() => void handleDelete()}\n />\n </>\n );\n};\n"],"mappings":";;;;;;;;;AA0BA,IAAa,KAKP,EAAE,aAAU,cAAW,mBAAgB;CAC3C,IAAM,CAAC,GAAY,KAAiB,EAAS,GAAM,EAC7C,CAAC,GAAO,KAAY,EAAwB,KAAK,EACjD,CAAC,GAAgB,EAAE,SAAS,OAChC,GAA4C,EAExC,IAAe,YAA2B;AAC9C,IAAS,KAAK;AACd,MAAI;AAGF,GAFA,MAAM,EAAe,EAAE,WAAW,EAAE,IAAI,EAAS,IAAI,EAAE,CAAC,EACxD,EAAc,GAAM,EACpB,MAAM,GAAW;WACV,GAAK;AACZ,KAAS,EAAoB,GAAK,6BAA6B,CAAC;;;AAIpE,QACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,IAAI,oBAAoB,EAAS;EACjC,aAAa,eAAe,EAAS;EACrC,OAAO,CACL;GACE,KAAK;GACL,OAAO;GACP,QAAQ;GACR,MAAM,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA;GACpC,eAAe;AAEb,IADA,EAAS,KAAK,EACd,EAAc,GAAK;;GAEtB,CACF;EACD,CAAA,EAEF,kBAAC,GAAD;EACE,MAAM;EACN,eAAe,EAAc,GAAM;EACnC,OAAM;EACN,SAAS,EAAsB,EAAS,MAAM,EAAU;EAC9C;EACH;EACP,iBAAiB,KAAK,GAAc;EACpC,CAAA,CACD,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PipelinePage.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/crm/PipelinePage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA2D1C,eAAO,MAAM,YAAY,EAAE,EAqO1B,CAAC"}
1
+ {"version":3,"file":"PipelinePage.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/crm/PipelinePage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAgEnD,eAAO,MAAM,YAAY,EAAE,EAsS1B,CAAC"}
@@ -9,12 +9,13 @@ import { toContactModel as c, toDealModel as l } from "../../utils/crmMapper.js"
9
9
  import { CrmSubNav as u } from "./CrmSubNav.js";
10
10
  import { DealActionsMenu as d } from "./CrmActions.js";
11
11
  import { CreatePipelineModal as f } from "./CreatePipelineModal.js";
12
- import { useState as p } from "react";
13
- import { Calendar as m, DollarSign as h, GitBranch as g, Plus as _, User as v } from "lucide-react";
14
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
15
- import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
12
+ import { PipelineActionsMenu as p } from "./PipelineActions.js";
13
+ import { useMemo as m, useState as h } from "react";
14
+ import { Calendar as g, DollarSign as _, GitBranch as v, Plus as y, User as b } from "lucide-react";
15
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
16
+ import { EmphasisPanel as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
16
17
  //#region src/headshotmarketing/pages/crm/PipelinePage.tsx
17
- var w = [
18
+ var E = [
18
19
  {
19
20
  stage: "prospecting",
20
21
  label: "Prospecting",
@@ -51,89 +52,93 @@ var w = [
51
52
  color: "bg-status-error-text",
52
53
  bgColor: "bg-status-error-bg"
53
54
  }
54
- ], T = () => {
55
- let { navigate: T, basePath: E } = e(), { data: D, loading: O, error: k, refetch: A } = s(), [j, M] = p(!1), N = (D?.headshotmarketingContacts.items ?? []).map((e) => c(e)), P = Object.fromEntries(N.map((e) => [e.id, e])), F = (D?.headshotmarketingDeals.items ?? []).map((e) => l(e, P)), I = F.reduce((e, t) => e + t.value, 0), L = F.filter((e) => !["closed_won", "closed_lost"].includes(e.stage)).reduce((e, t) => e + t.value, 0), R = F.filter((e) => e.stage === "closed_won").reduce((e, t) => e + t.value, 0);
56
- return /* @__PURE__ */ x(i, {
55
+ ], D = () => {
56
+ let { navigate: D, basePath: O } = e(), { data: k, loading: A, error: j, refetch: M } = s(), [N, P] = h(!1), F = (k?.headshotmarketingContacts.items ?? []).map((e) => c(e)), I = Object.fromEntries(F.map((e) => [e.id, e])), L = (k?.headshotmarketingDeals.items ?? []).map((e) => l(e, I)), R = k?.headshotmarketingPipelines.items ?? [], z = m(() => {
57
+ let e = {};
58
+ for (let t of k?.headshotmarketingDeals.items ?? []) t.pipelineId && (e[t.pipelineId] = (e[t.pipelineId] ?? 0) + 1);
59
+ return e;
60
+ }, [k?.headshotmarketingDeals.items]), B = L.reduce((e, t) => e + t.value, 0), V = L.filter((e) => !["closed_won", "closed_lost"].includes(e.stage)).reduce((e, t) => e + t.value, 0), H = L.filter((e) => e.stage === "closed_won").reduce((e, t) => e + t.value, 0);
61
+ return /* @__PURE__ */ C(i, {
57
62
  title: "Deal Pipeline",
58
63
  description: "Visualize and manage your sales pipeline",
59
- actions: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("button", {
60
- onClick: () => M(!0),
64
+ actions: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("button", {
65
+ onClick: () => P(!0),
61
66
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
62
- children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "New pipeline"]
63
- }), /* @__PURE__ */ x("button", {
64
- onClick: () => T(E + "/crm/pipeline/new"),
67
+ children: [/* @__PURE__ */ S(v, { className: "h-4 w-4" }), "New pipeline"]
68
+ }), /* @__PURE__ */ C("button", {
69
+ onClick: () => D(O + "/crm/pipeline/new"),
65
70
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
66
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Add Deal"]
71
+ children: [/* @__PURE__ */ S(y, { className: "h-4 w-4" }), "Add Deal"]
67
72
  })] }),
68
73
  children: [
69
- /* @__PURE__ */ b(C, { children: "Every deal in flight, grouped by stage. Watch open versus won value update in real time, open a deal's menu to edit or close it, and spot where opportunities are getting stuck so you can move them forward." }),
70
- /* @__PURE__ */ b(u, {
74
+ /* @__PURE__ */ S(T, { children: "Every deal in flight, grouped by stage. Watch open versus won value update in real time, open a deal's menu to edit or close it, and spot where opportunities are getting stuck so you can move them forward." }),
75
+ /* @__PURE__ */ S(u, {
71
76
  active: "pipeline",
72
- basePath: E,
73
- navigate: T
77
+ basePath: O,
78
+ navigate: D
74
79
  }),
75
- /* @__PURE__ */ x(o, {
76
- loading: O,
77
- error: k,
78
- onRetry: A,
79
- hasData: !!D,
80
+ /* @__PURE__ */ C(o, {
81
+ loading: A,
82
+ error: j,
83
+ onRetry: M,
84
+ hasData: !!k,
80
85
  children: [
81
- /* @__PURE__ */ b(S, { children: /* @__PURE__ */ x("div", {
86
+ /* @__PURE__ */ S(w, { children: /* @__PURE__ */ C("div", {
82
87
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
83
88
  children: [
84
- /* @__PURE__ */ x("div", {
89
+ /* @__PURE__ */ C("div", {
85
90
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
86
91
  children: [
87
- /* @__PURE__ */ b("p", {
92
+ /* @__PURE__ */ S("p", {
88
93
  className: "text-sm text-text-secondary",
89
94
  children: "Total Pipeline"
90
95
  }),
91
- /* @__PURE__ */ b("p", {
96
+ /* @__PURE__ */ S("p", {
92
97
  className: "text-2xl font-bold text-text-primary mt-1",
93
- children: n(I)
98
+ children: n(B)
94
99
  }),
95
- /* @__PURE__ */ x("p", {
100
+ /* @__PURE__ */ C("p", {
96
101
  className: "text-xs text-text-secondary mt-1",
97
- children: [F.length, " deals"]
102
+ children: [L.length, " deals"]
98
103
  })
99
104
  ]
100
105
  }),
101
- /* @__PURE__ */ x("div", {
106
+ /* @__PURE__ */ C("div", {
102
107
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
103
108
  children: [
104
- /* @__PURE__ */ b("p", {
109
+ /* @__PURE__ */ S("p", {
105
110
  className: "text-sm text-text-secondary",
106
111
  children: "Open Pipeline"
107
112
  }),
108
- /* @__PURE__ */ b("p", {
113
+ /* @__PURE__ */ S("p", {
109
114
  className: "text-2xl font-bold text-text-primary mt-1",
110
- children: n(L)
115
+ children: n(V)
111
116
  }),
112
- /* @__PURE__ */ x("p", {
117
+ /* @__PURE__ */ C("p", {
113
118
  className: "text-xs text-text-secondary mt-1",
114
119
  children: [
115
- F.filter((e) => !["closed_won", "closed_lost"].includes(e.stage)).length,
120
+ L.filter((e) => !["closed_won", "closed_lost"].includes(e.stage)).length,
116
121
  " ",
117
122
  "deals"
118
123
  ]
119
124
  })
120
125
  ]
121
126
  }),
122
- /* @__PURE__ */ x("div", {
127
+ /* @__PURE__ */ C("div", {
123
128
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
124
129
  children: [
125
- /* @__PURE__ */ b("p", {
130
+ /* @__PURE__ */ S("p", {
126
131
  className: "text-sm text-text-secondary",
127
132
  children: "Won This Period"
128
133
  }),
129
- /* @__PURE__ */ b("p", {
134
+ /* @__PURE__ */ S("p", {
130
135
  className: "text-2xl font-bold text-status-success-text mt-1",
131
- children: n(R)
136
+ children: n(H)
132
137
  }),
133
- /* @__PURE__ */ x("p", {
138
+ /* @__PURE__ */ C("p", {
134
139
  className: "text-xs text-text-secondary mt-1",
135
140
  children: [
136
- F.filter((e) => e.stage === "closed_won").length,
141
+ L.filter((e) => e.stage === "closed_won").length,
137
142
  " ",
138
143
  "deals"
139
144
  ]
@@ -142,97 +147,97 @@ var w = [
142
147
  })
143
148
  ]
144
149
  }) }),
145
- F.length === 0 && /* @__PURE__ */ b(a, {
150
+ L.length === 0 && /* @__PURE__ */ S(a, {
146
151
  illustration: "empty-generic",
147
152
  title: "No deals yet",
148
153
  description: "Add your first deal to start tracking opportunities through your pipeline.",
149
- action: /* @__PURE__ */ x("button", {
150
- onClick: () => T(E + "/crm/pipeline/new"),
154
+ action: /* @__PURE__ */ C("button", {
155
+ onClick: () => D(O + "/crm/pipeline/new"),
151
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",
152
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Add Deal"]
157
+ children: [/* @__PURE__ */ S(y, { className: "h-4 w-4" }), "Add Deal"]
153
158
  })
154
159
  }),
155
- /* @__PURE__ */ b("div", {
160
+ /* @__PURE__ */ S("div", {
156
161
  className: "overflow-x-auto",
157
- children: /* @__PURE__ */ b("div", {
162
+ children: /* @__PURE__ */ S("div", {
158
163
  className: "flex gap-4 min-w-[1100px] pb-4",
159
- children: w.map((e) => {
160
- let i = F.filter((t) => t.stage === e.stage), a = i.reduce((e, t) => e + t.value, 0);
161
- return /* @__PURE__ */ b("div", {
164
+ children: E.map((e) => {
165
+ let i = L.filter((t) => t.stage === e.stage), a = i.reduce((e, t) => e + t.value, 0);
166
+ return /* @__PURE__ */ S("div", {
162
167
  className: "flex-1 min-w-[200px]",
163
- children: /* @__PURE__ */ x("div", {
168
+ children: /* @__PURE__ */ C("div", {
164
169
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop overflow-hidden",
165
- children: [/* @__PURE__ */ x("div", {
170
+ children: [/* @__PURE__ */ C("div", {
166
171
  className: "p-3 border-b border-border-subtle",
167
- children: [/* @__PURE__ */ x("div", {
172
+ children: [/* @__PURE__ */ C("div", {
168
173
  className: "flex items-center gap-2",
169
174
  children: [
170
- /* @__PURE__ */ b("div", { className: t("h-3 w-3 rounded-full", e.color) }),
171
- /* @__PURE__ */ b("h4", {
175
+ /* @__PURE__ */ S("div", { className: t("h-3 w-3 rounded-full", e.color) }),
176
+ /* @__PURE__ */ S("h4", {
172
177
  className: "text-sm font-semibold text-text-primary",
173
178
  children: e.label
174
179
  }),
175
- /* @__PURE__ */ b("span", {
180
+ /* @__PURE__ */ S("span", {
176
181
  className: "ml-auto text-xs text-text-secondary bg-bg-sunken rounded-full px-2 py-0.5",
177
182
  children: i.length
178
183
  })
179
184
  ]
180
- }), /* @__PURE__ */ b("p", {
185
+ }), /* @__PURE__ */ S("p", {
181
186
  className: "text-xs text-text-secondary mt-1",
182
187
  children: n(a)
183
188
  })]
184
- }), /* @__PURE__ */ b("div", {
189
+ }), /* @__PURE__ */ S("div", {
185
190
  className: "p-2 space-y-2 min-h-[200px] max-h-[500px] overflow-y-auto",
186
- children: i.length === 0 ? /* @__PURE__ */ b("div", {
191
+ children: i.length === 0 ? /* @__PURE__ */ S("div", {
187
192
  className: "py-8 text-center text-xs text-text-secondary",
188
193
  children: "No deals"
189
- }) : i.map((e) => /* @__PURE__ */ x("div", {
194
+ }) : i.map((e) => /* @__PURE__ */ C("div", {
190
195
  className: "rounded-md border border-border-seam bg-gloss-card p-3 transition-shadow hover:shadow-pop",
191
196
  children: [
192
- /* @__PURE__ */ x("div", {
197
+ /* @__PURE__ */ C("div", {
193
198
  className: "flex items-start justify-between gap-1",
194
- children: [/* @__PURE__ */ b("p", {
199
+ children: [/* @__PURE__ */ S("p", {
195
200
  className: "text-sm font-medium text-text-primary leading-tight",
196
201
  children: e.name
197
- }), /* @__PURE__ */ b(d, {
202
+ }), /* @__PURE__ */ S(d, {
198
203
  deal: e,
199
- onChanged: A
204
+ onChanged: M
200
205
  })]
201
206
  }),
202
- /* @__PURE__ */ x("div", {
207
+ /* @__PURE__ */ C("div", {
203
208
  className: "mt-2 space-y-1.5",
204
209
  children: [
205
- /* @__PURE__ */ x("div", {
210
+ /* @__PURE__ */ C("div", {
206
211
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
207
- children: [/* @__PURE__ */ b(h, { className: "h-3 w-3" }), /* @__PURE__ */ b("span", {
212
+ children: [/* @__PURE__ */ S(_, { className: "h-3 w-3" }), /* @__PURE__ */ S("span", {
208
213
  className: "font-semibold text-text-primary",
209
214
  children: n(e.value)
210
215
  })]
211
216
  }),
212
- /* @__PURE__ */ x("div", {
217
+ /* @__PURE__ */ C("div", {
213
218
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
214
- children: [/* @__PURE__ */ b(v, { className: "h-3 w-3" }), /* @__PURE__ */ b("span", { children: e.contactName })]
219
+ children: [/* @__PURE__ */ S(b, { className: "h-3 w-3" }), /* @__PURE__ */ S("span", { children: e.contactName })]
215
220
  }),
216
- /* @__PURE__ */ x("div", {
221
+ /* @__PURE__ */ C("div", {
217
222
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
218
- children: [/* @__PURE__ */ b(m, { className: "h-3 w-3" }), /* @__PURE__ */ b("span", { children: r(e.expectedCloseDate) })]
223
+ children: [/* @__PURE__ */ S(g, { className: "h-3 w-3" }), /* @__PURE__ */ S("span", { children: r(e.expectedCloseDate) })]
219
224
  })
220
225
  ]
221
226
  }),
222
- e.probability > 0 && e.probability < 100 && /* @__PURE__ */ x("div", {
227
+ e.probability > 0 && e.probability < 100 && /* @__PURE__ */ C("div", {
223
228
  className: "mt-2 pt-2 border-t border-border-subtle",
224
- children: [/* @__PURE__ */ x("div", {
229
+ children: [/* @__PURE__ */ C("div", {
225
230
  className: "flex items-center justify-between text-xs",
226
- children: [/* @__PURE__ */ b("span", {
231
+ children: [/* @__PURE__ */ S("span", {
227
232
  className: "text-text-secondary",
228
233
  children: "Probability"
229
- }), /* @__PURE__ */ x("span", {
234
+ }), /* @__PURE__ */ C("span", {
230
235
  className: "font-medium text-text-primary",
231
236
  children: [e.probability, "%"]
232
237
  })]
233
- }), /* @__PURE__ */ b("div", {
238
+ }), /* @__PURE__ */ S("div", {
234
239
  className: "w-full h-1.5 rounded-full bg-bg-sunken mt-1 overflow-hidden",
235
- children: /* @__PURE__ */ b("div", {
240
+ children: /* @__PURE__ */ S("div", {
236
241
  className: "h-full rounded-full bg-action-primary-bg",
237
242
  style: { width: `${e.probability}%` }
238
243
  })
@@ -245,18 +250,71 @@ var w = [
245
250
  }, e.stage);
246
251
  })
247
252
  })
253
+ }),
254
+ R.length > 0 && /* @__PURE__ */ C("div", {
255
+ className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop",
256
+ children: [/* @__PURE__ */ C("div", {
257
+ className: "border-b border-border-subtle p-4",
258
+ children: [/* @__PURE__ */ S("h3", {
259
+ className: "text-sm font-semibold text-text-primary",
260
+ children: "Manage pipelines"
261
+ }), /* @__PURE__ */ S("p", {
262
+ className: "mt-0.5 text-xs text-text-secondary",
263
+ children: "Remove pipelines you no longer use. Pipelines with open deals may need those deals moved first."
264
+ })]
265
+ }), /* @__PURE__ */ S("ul", {
266
+ className: "divide-y divide-border-subtle",
267
+ children: R.map((e) => {
268
+ let t = z[e.id] ?? 0;
269
+ return /* @__PURE__ */ C("li", {
270
+ className: "flex items-center justify-between gap-3 p-4",
271
+ children: [/* @__PURE__ */ C("div", {
272
+ className: "min-w-0",
273
+ children: [/* @__PURE__ */ C("div", {
274
+ className: "flex items-center gap-2",
275
+ children: [/* @__PURE__ */ S("p", {
276
+ className: "truncate text-sm font-medium text-text-primary",
277
+ children: e.name
278
+ }), e.isDefault && /* @__PURE__ */ S("span", {
279
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] font-medium text-text-secondary",
280
+ children: "Default"
281
+ })]
282
+ }), /* @__PURE__ */ C("p", {
283
+ className: "mt-0.5 text-xs text-text-secondary",
284
+ children: [
285
+ e.stages.length,
286
+ " stage",
287
+ e.stages.length === 1 ? "" : "s",
288
+ " · ",
289
+ t,
290
+ " ",
291
+ "deal",
292
+ t === 1 ? "" : "s"
293
+ ]
294
+ })]
295
+ }), /* @__PURE__ */ S(p, {
296
+ pipeline: {
297
+ id: e.id,
298
+ name: e.name
299
+ },
300
+ dealCount: t,
301
+ onDeleted: M
302
+ })]
303
+ }, e.id);
304
+ })
305
+ })]
248
306
  })
249
307
  ]
250
308
  }),
251
- /* @__PURE__ */ b(f, {
252
- open: j,
253
- onClose: () => M(!1),
254
- onCreated: () => A()
309
+ /* @__PURE__ */ S(f, {
310
+ open: N,
311
+ onClose: () => P(!1),
312
+ onCreated: () => M()
255
313
  })
256
314
  ]
257
315
  });
258
316
  };
259
317
  //#endregion
260
- export { T as PipelinePage };
318
+ export { D as PipelinePage };
261
319
 
262
320
  //# sourceMappingURL=PipelinePage.js.map