@burdenoff/microfe-headshotmarketing 2026.1107.2 → 2026.1107.3

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.
@@ -1,25 +1,32 @@
1
- import { useHeadshotmarketingCreateSavedReportMutation as e, useHeadshotmarketingDeleteSavedReportMutation as t, useHeadshotmarketingSavedReportQuery as n, useHeadshotmarketingSavedReportsQuery as r, useHeadshotmarketingUpdateSavedReportMutation as i } from "../../../generated/wspace-operations.js";
2
- import { useHeadshotMarketing as a } from "../../context/HeadshotMarketingContext.js";
3
- import { cn as o, exportRowsToCsv as s } from "../../utils/helpers.js";
4
- import { PageLayout as c } from "../../components/PageLayout.js";
5
- import { Modal as l } from "../../components/Modal.js";
6
- import { ConfirmDeleteDialog as u } from "../../components/ConfirmDeleteDialog.js";
7
- import { ToastContainer as d } from "../../components/Toast.js";
8
- import { QueryStateBoundary as ee } from "../../components/QueryStateBoundary.js";
1
+ import { useHeadshotmarketingCreateSavedReportMutation as e, useHeadshotmarketingDeleteSavedReportMutation as t, useHeadshotmarketingDeleteSavedReportScheduleMutation as n, useHeadshotmarketingSavedReportQuery as r, useHeadshotmarketingSavedReportsQuery as i, useHeadshotmarketingSendSavedReportNowMutation as a, useHeadshotmarketingSetSavedReportScheduleMutation as o, useHeadshotmarketingUpdateSavedReportMutation as s } from "../../../generated/wspace-operations.js";
2
+ import { useHeadshotMarketing as c } from "../../context/HeadshotMarketingContext.js";
3
+ import { cn as l, exportRowsToCsv as u } from "../../utils/helpers.js";
4
+ import { PageLayout as ee } from "../../components/PageLayout.js";
5
+ import { Modal as d } from "../../components/Modal.js";
6
+ import { ConfirmDeleteDialog as te } from "../../components/ConfirmDeleteDialog.js";
7
+ import { ToastContainer as ne } from "../../components/Toast.js";
8
+ import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
9
9
  import "../../components/index.js";
10
- import { analyticsCsvRows as te, dateRangeLabel as f, formatWindow as ne, resolveDateWindow as re } from "./analyticsView.js";
11
- import { AnalyticsSourceNotice as ie, DateRangeControl as p, ReportWidgetView as ae, WIDGET_META as m } from "./analyticsWidgets.js";
12
- import { useAnalyticsData as oe } from "./useAnalyticsData.js";
13
- import { useToast as se } from "../../hooks/useToast.js";
14
- import { EXECUTIVE_SUMMARY as h, WIDGET_ORDER as g, draftFrom as _, reportShareUrl as ce, toReportInput as le, toggleWidget as ue, validateDraft as de } from "./reportDraft.js";
15
- import { useMemo as fe, useState as v } from "react";
16
- import { ArrowUpRight as pe, BarChart3 as y, DollarSign as b, Download as me, FileDown as he, FileText as ge, Pencil as _e, Plus as x, Share2 as S, Target as C, Trash2 as ve, TrendingUp as w, Users as T } from "lucide-react";
17
- import { useSearchParams as ye } from "react-router";
18
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
19
- import { EmphasisPanel as k, GradientText as be, PagePurpose as xe } from "@burdenoff/fe-libs/ui";
10
+ import { analyticsCsvRows as ie, dateRangeLabel as f, formatWindow as ae, resolveDateWindow as oe } from "./analyticsView.js";
11
+ import { AnalyticsSourceNotice as se, DateRangeControl as p, ReportWidgetView as ce, WIDGET_META as m } from "./analyticsWidgets.js";
12
+ import { useAnalyticsData as le } from "./useAnalyticsData.js";
13
+ import { useToast as ue } from "../../hooks/useToast.js";
14
+ import { EXECUTIVE_SUMMARY as h, WIDGET_ORDER as de, draftFrom as g, reportShareUrl as fe, toReportInput as pe, toggleWidget as me, validateDraft as he } from "./reportDraft.js";
15
+ import { browserTimezone as ge, cadenceBadge as _e, deliveryStatusLabel as ve, deliveryStatusTone as ye, describeSchedule as be, formatInstant as xe, scheduleDraftFrom as Se, toScheduleInput as Ce, validateScheduleDraft as we } from "./reportSchedule.js";
16
+ import { ReportScheduleDialog as Te } from "./ReportScheduleDialog.js";
17
+ import { useMemo as Ee, useState as _ } from "react";
18
+ import { ArrowUpRight as De, BarChart3 as v, CalendarClock as y, DollarSign as b, Download as Oe, FileDown as ke, FileText as Ae, Pencil as je, Plus as Me, Share2 as Ne, Target as x, Trash2 as Pe, TrendingUp as S, Users as C } from "lucide-react";
19
+ import { useSearchParams as Fe } from "react-router";
20
+ import { Fragment as Ie, jsx as w, jsxs as T } from "react/jsx-runtime";
21
+ import { EmphasisPanel as E, GradientText as Le, PagePurpose as Re } from "@burdenoff/fe-libs/ui";
20
22
  //#region src/headshotmarketing/pages/analytics/ReportsPage.tsx
21
- var A = ["HeadshotmarketingSavedReports", "HeadshotmarketingSavedReport"], j = 100, M = "inline-flex min-h-[40px] items-center gap-2 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60";
22
- function Se(e) {
23
+ var D = ["HeadshotmarketingSavedReports", "HeadshotmarketingSavedReport"], O = [...D, "HeadshotmarketingSavedReportDeliveryRuns"], ze = {
24
+ success: "text-status-success-text",
25
+ warning: "text-status-warning-text",
26
+ error: "text-status-error-text",
27
+ neutral: "text-text-secondary"
28
+ }, k = 100, A = "inline-flex min-h-[40px] items-center gap-2 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60";
29
+ function Be(e) {
23
30
  return {
24
31
  name: e.name,
25
32
  description: e.description ?? null,
@@ -29,35 +36,35 @@ function Se(e) {
29
36
  customEndDate: e.customEndDate ?? null
30
37
  };
31
38
  }
32
- var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({ open: e, title: t, submitLabel: n, draft: r, onChange: i, errors: a, serverError: s, saving: c, onClose: u, onSubmit: d }) => /* @__PURE__ */ D(l, {
39
+ var j = (e) => e instanceof Error ? e.message : "Something went wrong.", Ve = ({ open: e, title: t, submitLabel: n, draft: r, onChange: i, errors: a, serverError: o, saving: s, onClose: c, onSubmit: u }) => /* @__PURE__ */ w(d, {
33
40
  open: e,
34
- onClose: u,
41
+ onClose: c,
35
42
  title: t,
36
43
  description: "Choose what the report shows and the period it covers.",
37
44
  size: "lg",
38
- footer: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("button", {
45
+ footer: /* @__PURE__ */ T(Ie, { children: [/* @__PURE__ */ w("button", {
39
46
  type: "button",
40
- onClick: u,
41
- disabled: c,
42
- className: M,
47
+ onClick: c,
48
+ disabled: s,
49
+ className: A,
43
50
  children: "Cancel"
44
- }), /* @__PURE__ */ D("button", {
51
+ }), /* @__PURE__ */ w("button", {
45
52
  type: "button",
46
- onClick: d,
47
- disabled: c,
53
+ onClick: u,
54
+ disabled: s,
48
55
  className: "inline-flex min-h-[40px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:cursor-not-allowed disabled:opacity-60",
49
- children: c ? "Saving…" : n
56
+ children: s ? "Saving…" : n
50
57
  })] }),
51
- children: /* @__PURE__ */ O("div", {
58
+ children: /* @__PURE__ */ T("div", {
52
59
  className: "space-y-5",
53
60
  children: [
54
- /* @__PURE__ */ O("div", { children: [
55
- /* @__PURE__ */ D("label", {
61
+ /* @__PURE__ */ T("div", { children: [
62
+ /* @__PURE__ */ w("label", {
56
63
  htmlFor: "hm-report-name",
57
64
  className: "mb-1 block text-sm font-medium text-text-primary",
58
65
  children: "Name"
59
66
  }),
60
- /* @__PURE__ */ D("input", {
67
+ /* @__PURE__ */ w("input", {
61
68
  id: "hm-report-name",
62
69
  value: r.name,
63
70
  onChange: (e) => i({
@@ -65,24 +72,24 @@ var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({
65
72
  name: e.target.value
66
73
  }),
67
74
  "aria-invalid": !!a.name,
68
- className: o("min-h-[44px] w-full rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary", a.name ? "border-status-error-border" : "border-border-seam"),
75
+ className: l("min-h-[44px] w-full rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary", a.name ? "border-status-error-border" : "border-border-seam"),
69
76
  placeholder: "e.g. Weekly Executive Summary"
70
77
  }),
71
- a.name && /* @__PURE__ */ D("p", {
78
+ a.name && /* @__PURE__ */ w("p", {
72
79
  className: "mt-1 text-xs text-status-error-text",
73
80
  children: a.name
74
81
  })
75
82
  ] }),
76
- /* @__PURE__ */ O("div", { children: [
77
- /* @__PURE__ */ O("label", {
83
+ /* @__PURE__ */ T("div", { children: [
84
+ /* @__PURE__ */ T("label", {
78
85
  htmlFor: "hm-report-description",
79
86
  className: "mb-1 block text-sm font-medium text-text-primary",
80
- children: ["Description ", /* @__PURE__ */ D("span", {
87
+ children: ["Description ", /* @__PURE__ */ w("span", {
81
88
  className: "text-text-secondary",
82
89
  children: "(optional)"
83
90
  })]
84
91
  }),
85
- /* @__PURE__ */ D("textarea", {
92
+ /* @__PURE__ */ w("textarea", {
86
93
  id: "hm-report-description",
87
94
  value: r.description,
88
95
  onChange: (e) => i({
@@ -91,19 +98,19 @@ var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({
91
98
  }),
92
99
  rows: 2,
93
100
  "aria-invalid": !!a.description,
94
- className: o("w-full rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary", a.description ? "border-status-error-border" : "border-border-seam")
101
+ className: l("w-full rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary", a.description ? "border-status-error-border" : "border-border-seam")
95
102
  }),
96
- a.description && /* @__PURE__ */ D("p", {
103
+ a.description && /* @__PURE__ */ w("p", {
97
104
  className: "mt-1 text-xs text-status-error-text",
98
105
  children: a.description
99
106
  })
100
107
  ] }),
101
- /* @__PURE__ */ O("div", { children: [
102
- /* @__PURE__ */ D("p", {
108
+ /* @__PURE__ */ T("div", { children: [
109
+ /* @__PURE__ */ w("p", {
103
110
  className: "mb-1 text-sm font-medium text-text-primary",
104
111
  children: "Period"
105
112
  }),
106
- /* @__PURE__ */ D(p, {
113
+ /* @__PURE__ */ w(p, {
107
114
  idPrefix: "hm-report-editor",
108
115
  value: {
109
116
  preset: r.dateRange,
@@ -118,36 +125,36 @@ var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({
118
125
  }),
119
126
  invalid: !!a.dateRange
120
127
  }),
121
- a.dateRange && /* @__PURE__ */ D("p", {
128
+ a.dateRange && /* @__PURE__ */ w("p", {
122
129
  className: "mt-1 text-xs text-status-error-text",
123
130
  children: a.dateRange
124
131
  })
125
132
  ] }),
126
- /* @__PURE__ */ O("fieldset", { children: [
127
- /* @__PURE__ */ D("legend", {
133
+ /* @__PURE__ */ T("fieldset", { children: [
134
+ /* @__PURE__ */ w("legend", {
128
135
  className: "mb-2 text-sm font-medium text-text-primary",
129
136
  children: "Widgets"
130
137
  }),
131
- /* @__PURE__ */ D("div", {
138
+ /* @__PURE__ */ w("div", {
132
139
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
133
- children: g.map((e) => {
140
+ children: de.map((e) => {
134
141
  let t = m[e], n = r.widgets.includes(e);
135
- return /* @__PURE__ */ O("label", {
136
- className: o("flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors", n ? "border-action-primary-bg bg-bg-sunken/40" : "border-border-seam hover:bg-bg-sunken/30"),
137
- children: [/* @__PURE__ */ D("input", {
142
+ return /* @__PURE__ */ T("label", {
143
+ className: l("flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors", n ? "border-action-primary-bg bg-bg-sunken/40" : "border-border-seam hover:bg-bg-sunken/30"),
144
+ children: [/* @__PURE__ */ w("input", {
138
145
  type: "checkbox",
139
146
  checked: n,
140
147
  onChange: () => i({
141
148
  ...r,
142
- widgets: ue(r.widgets, e)
149
+ widgets: me(r.widgets, e)
143
150
  }),
144
151
  className: "mt-0.5 h-4 w-4"
145
- }), /* @__PURE__ */ O("span", {
152
+ }), /* @__PURE__ */ T("span", {
146
153
  className: "min-w-0",
147
- children: [/* @__PURE__ */ O("span", {
154
+ children: [/* @__PURE__ */ T("span", {
148
155
  className: "flex items-center gap-1.5 text-sm font-medium text-text-primary",
149
156
  children: [t.icon, t.label]
150
- }), /* @__PURE__ */ D("span", {
157
+ }), /* @__PURE__ */ w("span", {
151
158
  className: "mt-0.5 block text-xs text-text-secondary",
152
159
  children: t.description
153
160
  })]
@@ -155,90 +162,99 @@ var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({
155
162
  }, e);
156
163
  })
157
164
  }),
158
- a.widgets && /* @__PURE__ */ D("p", {
165
+ a.widgets && /* @__PURE__ */ w("p", {
159
166
  className: "mt-1 text-xs text-status-error-text",
160
167
  children: a.widgets
161
168
  })
162
169
  ] }),
163
- s && /* @__PURE__ */ D("p", {
170
+ o && /* @__PURE__ */ w("p", {
164
171
  role: "alert",
165
172
  className: "rounded-lg border border-status-error-border px-4 py-3 text-sm text-status-error-text",
166
- children: s
173
+ children: o
167
174
  })
168
175
  ]
169
176
  })
170
- }), we = [
177
+ }), He = [
171
178
  {
172
179
  id: "campaigns",
173
180
  name: "Campaign performance",
174
181
  description: "Revenue, conversions and ROAS by campaign.",
175
- icon: /* @__PURE__ */ D(C, { className: "h-5 w-5" }),
182
+ icon: /* @__PURE__ */ w(x, { className: "h-5 w-5" }),
176
183
  segment: "/analytics/campaigns"
177
184
  },
178
185
  {
179
186
  id: "channels",
180
187
  name: "Channel analytics",
181
188
  description: "Revenue, ROAS and attribution by channel.",
182
- icon: /* @__PURE__ */ D(y, { className: "h-5 w-5" }),
189
+ icon: /* @__PURE__ */ w(v, { className: "h-5 w-5" }),
183
190
  segment: "/analytics"
184
191
  },
185
192
  {
186
193
  id: "ads",
187
194
  name: "Ad performance",
188
195
  description: "Paid spend, CPC and ROAS by platform.",
189
- icon: /* @__PURE__ */ D(w, { className: "h-5 w-5" }),
196
+ icon: /* @__PURE__ */ w(S, { className: "h-5 w-5" }),
190
197
  segment: "/analytics/ads"
191
198
  },
192
199
  {
193
200
  id: "social",
194
201
  name: "Social digest",
195
202
  description: "Reach, engagement and top posts by platform.",
196
- icon: /* @__PURE__ */ D(S, { className: "h-5 w-5" }),
203
+ icon: /* @__PURE__ */ w(Ne, { className: "h-5 w-5" }),
197
204
  segment: "/analytics/social"
198
205
  },
199
206
  {
200
207
  id: "attribution",
201
208
  name: "Attribution",
202
209
  description: "Which touches earned your won revenue.",
203
- icon: /* @__PURE__ */ D(T, { className: "h-5 w-5" }),
210
+ icon: /* @__PURE__ */ w(C, { className: "h-5 w-5" }),
204
211
  segment: "/analytics/attribution"
205
212
  },
206
213
  {
207
214
  id: "pipeline",
208
215
  name: "Lead pipeline",
209
216
  description: "Deals and value across your CRM pipeline.",
210
- icon: /* @__PURE__ */ D(b, { className: "h-5 w-5" }),
217
+ icon: /* @__PURE__ */ w(b, { className: "h-5 w-5" }),
211
218
  segment: "/crm/pipeline"
212
219
  }
213
- ], P = () => {
214
- let { navigate: l, basePath: p } = a(), [g, ue] = ye(), y = g.get("report"), { toasts: b, toast: C, dismiss: w } = se(), [T] = v(() => /* @__PURE__ */ new Date()), P = r({
215
- variables: { pagination: { limit: j } },
220
+ ], Ue = () => {
221
+ let { navigate: d, basePath: p, workspaceId: de, currentUser: me } = c(), [v, b] = Fe(), x = v.get("report"), { toasts: S, toast: C, dismiss: Ue } = ue(), [M] = _(() => /* @__PURE__ */ new Date()), N = i({
222
+ variables: { pagination: { limit: k } },
216
223
  fetchPolicy: "cache-and-network"
217
- }), [Te, F] = v(!1), I = P.data?.headshotmarketingSavedReports.items ?? [], L = P.data?.headshotmarketingSavedReports.total, Ee = P.data?.headshotmarketingSavedReports.hasMore ?? !1, R = I.find((e) => e.id === y) ?? null, De = !P.loading && P.data !== void 0, z = y !== null && R === null && De, B = n({
218
- variables: { id: y ?? "" },
219
- skip: !z,
224
+ }), [We, Ge] = _(!1), P = N.data?.headshotmarketingSavedReports.items ?? [], Ke = N.data?.headshotmarketingSavedReports.total, qe = N.data?.headshotmarketingSavedReports.hasMore ?? !1, F = P.find((e) => e.id === x) ?? null, Je = !N.loading && N.data !== void 0, I = x !== null && F === null && Je, L = r({
225
+ variables: { id: x ?? "" },
226
+ skip: !I,
220
227
  fetchPolicy: "cache-and-network"
221
- }), V = R ?? (z ? B.data?.headshotmarketingSavedReport ?? null : null), Oe = z && V === null && !B.loading && (B.data !== void 0 || B.error !== void 0), H = V ? Se(V) : h, U = fe(() => re(H.dateRange, T, H.customStartDate, H.customEndDate), [
222
- H.dateRange,
223
- H.customStartDate,
224
- H.customEndDate,
225
- T
226
- ]), W = U ? ne(U) : "—", G = oe(U, 10), [K, q] = v(null), [ke, J] = v(!1), [Ae, Y] = v(null), [je, X] = v(!1), [Me, Z] = v(null), [Ne, Pe] = e({
227
- refetchQueries: A,
228
+ }), R = F ?? (I ? L.data?.headshotmarketingSavedReport ?? null : null), Ye = I && R === null && !L.loading && (L.data !== void 0 || L.error !== void 0), z = R ? Be(R) : h, B = Ee(() => oe(z.dateRange, M, z.customStartDate, z.customEndDate), [
229
+ z.dateRange,
230
+ z.customStartDate,
231
+ z.customEndDate,
232
+ M
233
+ ]), V = B ? ae(B) : "—", H = le(B, 10), [U, W] = _(null), [Xe, Ze] = _(!1), [Qe, G] = _(null), [$e, K] = _(!1), [et, q] = _(null), [J, Y] = _(null), [tt, nt] = _(!1), [rt, X] = _(null), [it, at] = e({
234
+ refetchQueries: D,
235
+ awaitRefetchQueries: !0
236
+ }), [ot, st] = s({
237
+ refetchQueries: D,
238
+ awaitRefetchQueries: !0
239
+ }), [ct, lt] = t({
240
+ refetchQueries: D,
241
+ awaitRefetchQueries: !0
242
+ }), [ut, dt] = o({
243
+ refetchQueries: O,
228
244
  awaitRefetchQueries: !0
229
- }), [Fe, Ie] = i({
230
- refetchQueries: A,
245
+ }), [ft, pt] = n({
246
+ refetchQueries: O,
231
247
  awaitRefetchQueries: !0
232
- }), [Le, Re] = t({
233
- refetchQueries: A,
248
+ }), [mt, ht] = a({
249
+ refetchQueries: O,
234
250
  awaitRefetchQueries: !0
235
- }), ze = async () => {
236
- F(!0);
251
+ }), gt = async () => {
252
+ Ge(!0);
237
253
  try {
238
- await P.fetchMore({
254
+ await N.fetchMore({
239
255
  variables: { pagination: {
240
- limit: j,
241
- offset: I.length
256
+ limit: k,
257
+ offset: P.length
242
258
  } },
243
259
  updateQuery: (e, { fetchMoreResult: t }) => {
244
260
  let n = new Set(e.headshotmarketingSavedReports.items.map((e) => e.id));
@@ -254,58 +270,106 @@ var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({
254
270
  } catch (e) {
255
271
  C({
256
272
  title: "More reports could not be loaded",
257
- description: N(e),
273
+ description: j(e),
258
274
  variant: "error"
259
275
  });
260
276
  } finally {
261
- F(!1);
277
+ Ge(!1);
262
278
  }
263
- }, Q = (e) => {
264
- let t = new URLSearchParams(g);
265
- e ? t.set("report", e) : t.delete("report"), ue(t);
266
- }, $ = (e, t) => {
267
- J(!1), Y(null), q({
279
+ }, Z = (e) => {
280
+ let t = new URLSearchParams(v);
281
+ e ? t.set("report", e) : t.delete("report"), b(t);
282
+ }, Q = (e, t) => {
283
+ Ze(!1), G(null), W({
268
284
  reportId: e,
269
285
  draft: t
270
286
  });
271
- }, Be = K ? de(K.draft, T) : {}, Ve = async () => {
272
- if (!K || (J(!0), Object.keys(Be).length > 0)) return;
273
- Y(null);
274
- let e = le(K.draft);
287
+ }, _t = U ? he(U.draft, M) : {}, vt = async () => {
288
+ if (!U || (Ze(!0), Object.keys(_t).length > 0)) return;
289
+ G(null);
290
+ let e = pe(U.draft);
275
291
  try {
276
- if (K.reportId) await Fe({ variables: {
277
- id: K.reportId,
292
+ if (U.reportId) await ot({ variables: {
293
+ id: U.reportId,
278
294
  input: e
279
295
  } }), C({
280
296
  title: "Report updated",
281
297
  variant: "success"
282
298
  });
283
299
  else {
284
- let t = (await Ne({ variables: { input: e } })).data?.headshotmarketingCreateSavedReport.id;
300
+ let t = (await it({ variables: { input: e } })).data?.headshotmarketingCreateSavedReport.id;
285
301
  C({
286
302
  title: "Report saved",
287
303
  variant: "success"
288
- }), t && Q(t);
304
+ }), t && Z(t);
289
305
  }
290
- q(null);
306
+ W(null);
291
307
  } catch (e) {
292
- Y(N(e));
308
+ G(j(e));
293
309
  }
294
- }, He = async () => {
295
- if (V) {
296
- Z(null);
310
+ }, yt = async () => {
311
+ if (R) {
312
+ q(null);
297
313
  try {
298
- await Le({ variables: { id: V.id } }), X(!1), Q(null), C({
314
+ await ct({ variables: { id: R.id } }), K(!1), Z(null), C({
299
315
  title: "Report deleted",
300
316
  variant: "success"
301
317
  });
302
318
  } catch (e) {
303
- Z(N(e));
319
+ q(j(e));
320
+ }
321
+ }
322
+ }, $ = R?.schedule ?? null, bt = J ? we(J) : {}, xt = dt.loading ? "save" : pt.loading ? "remove" : ht.loading ? "send" : null, St = () => {
323
+ R && (nt(!1), X(null), Y(Se($, {
324
+ timezone: ge(),
325
+ recipientUserId: me?.id ?? null
326
+ })));
327
+ }, Ct = async () => {
328
+ if (!(!R || !J) && (nt(!0), !(Object.keys(bt).length > 0))) {
329
+ X(null);
330
+ try {
331
+ await ut({ variables: {
332
+ reportId: R.id,
333
+ input: Ce(J)
334
+ } }), Y(null), C({
335
+ title: J.enabled ? "Schedule saved" : "Schedule paused",
336
+ variant: "success"
337
+ });
338
+ } catch (e) {
339
+ X(j(e));
340
+ }
341
+ }
342
+ }, wt = async () => {
343
+ if (R) {
344
+ X(null);
345
+ try {
346
+ await ft({ variables: { reportId: R.id } }), Y(null), C({
347
+ title: "Schedule removed",
348
+ variant: "success"
349
+ });
350
+ } catch (e) {
351
+ X(j(e));
304
352
  }
305
353
  }
306
- }, Ue = async () => {
307
- if (!V) return;
308
- let e = ce(globalThis.location.href, V.id);
354
+ }, Tt = async () => {
355
+ if (R) {
356
+ X(null);
357
+ try {
358
+ let e = (await mt({ variables: { reportId: R.id } })).data?.headshotmarketingSendSavedReportNow;
359
+ if (!e) return;
360
+ let t = ye(e.status);
361
+ C({
362
+ title: `${ve(e.status)}: ${e.deliveredCount} of ${e.recipientCount} recipients`,
363
+ description: e.error ?? void 0,
364
+ variant: t === "success" ? "success" : t === "error" ? "error" : void 0
365
+ });
366
+ } catch (e) {
367
+ X(j(e));
368
+ }
369
+ }
370
+ }, Et = async () => {
371
+ if (!R) return;
372
+ let e = fe(globalThis.location.href, R.id);
309
373
  try {
310
374
  await navigator.clipboard.writeText(e), C({
311
375
  title: "Link copied",
@@ -318,71 +382,76 @@ var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({
318
382
  description: e
319
383
  });
320
384
  }
321
- }, We = () => {
322
- let { headers: e, rows: t } = te({
323
- title: H.name,
324
- windowLabel: W,
325
- view: G.view,
326
- attribution: G.attribution
385
+ }, Dt = () => {
386
+ let { headers: e, rows: t } = ie({
387
+ title: z.name,
388
+ windowLabel: V,
389
+ view: H.view,
390
+ attribution: H.attribution
327
391
  });
328
- s(H.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "report", e, t);
329
- }, Ge = () => {
392
+ u(z.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "report", e, t);
393
+ }, Ot = () => {
330
394
  let e = document.title;
331
- document.title = `${H.name} — ${W}`, globalThis.print(), document.title = e;
332
- }, Ke = Pe.loading || Ie.loading;
333
- return /* @__PURE__ */ O(c, {
395
+ document.title = `${z.name} — ${V}`, globalThis.print(), document.title = e;
396
+ }, kt = at.loading || st.loading;
397
+ return /* @__PURE__ */ T(ee, {
334
398
  title: "Reports",
335
399
  description: "Saved reports you can open, share and export",
336
- actions: /* @__PURE__ */ O("button", {
400
+ actions: /* @__PURE__ */ T("button", {
337
401
  type: "button",
338
- onClick: () => $(null, _(h, T, "New report")),
402
+ onClick: () => Q(null, g(h, M, "New report")),
339
403
  className: "inline-flex min-h-[44px] items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
340
- children: [/* @__PURE__ */ D(x, { className: "h-4 w-4" }), "New Report"]
404
+ children: [/* @__PURE__ */ w(Me, { className: "h-4 w-4" }), "New Report"]
341
405
  }),
342
406
  children: [
343
- /* @__PURE__ */ D(xe, { children: "Save the views your team reads every week. A report keeps its widgets and period — for example the last 30 days — and always shows the latest numbers for that period. Share a link with your workspace, export it to CSV or save it as a PDF." }),
344
- /* @__PURE__ */ O("div", {
407
+ /* @__PURE__ */ w(Re, { children: "Save the views your team reads every week. A report keeps its widgets and period — for example the last 30 days — and always shows the latest numbers for that period. Share a link with your workspace, export it to CSV or save it as a PDF." }),
408
+ /* @__PURE__ */ T("div", {
345
409
  className: "grid grid-cols-1 gap-6 lg:grid-cols-[300px_minmax(0,1fr)]",
346
- children: [/* @__PURE__ */ O("aside", {
410
+ children: [/* @__PURE__ */ T("aside", {
347
411
  "aria-label": "Reports",
348
412
  className: "h-fit rounded-lg border border-border-seam bg-gloss-card p-3 shadow-pop",
349
413
  children: [
350
- /* @__PURE__ */ D("h2", {
414
+ /* @__PURE__ */ w("h2", {
351
415
  className: "px-2 pb-2 pt-1 text-sm font-semibold text-text-secondary",
352
416
  children: "Reports"
353
417
  }),
354
- /* @__PURE__ */ O("ul", {
418
+ /* @__PURE__ */ T("ul", {
355
419
  className: "space-y-1",
356
- children: [/* @__PURE__ */ D("li", { children: /* @__PURE__ */ O("button", {
420
+ children: [/* @__PURE__ */ w("li", { children: /* @__PURE__ */ T("button", {
357
421
  type: "button",
358
- onClick: () => Q(null),
359
- "aria-current": V === null ? "true" : void 0,
360
- className: o("w-full rounded-md px-3 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", V === null ? "bg-bg-sunken" : "hover:bg-bg-sunken/50"),
361
- children: [/* @__PURE__ */ D("span", {
422
+ onClick: () => Z(null),
423
+ "aria-current": R === null ? "true" : void 0,
424
+ className: l("w-full rounded-md px-3 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", R === null ? "bg-bg-sunken" : "hover:bg-bg-sunken/50"),
425
+ children: [/* @__PURE__ */ w("span", {
362
426
  className: "block text-sm font-medium text-text-primary",
363
427
  children: h.name
364
- }), /* @__PURE__ */ O("span", {
428
+ }), /* @__PURE__ */ T("span", {
365
429
  className: "mt-1 inline-flex items-center gap-2 text-xs text-text-secondary",
366
- children: [/* @__PURE__ */ D("span", {
430
+ children: [/* @__PURE__ */ w("span", {
367
431
  className: "rounded bg-action-primary-bg px-1.5 py-0.5 text-action-primary-text",
368
432
  children: "Built-in"
369
433
  }), f(h.dateRange)]
370
434
  })]
371
- }) }), I.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ O("button", {
435
+ }) }), P.map((e) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ T("button", {
372
436
  type: "button",
373
- onClick: () => Q(e.id),
374
- "aria-current": V?.id === e.id ? "true" : void 0,
375
- className: o("w-full rounded-md px-3 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", V?.id === e.id ? "bg-bg-sunken" : "hover:bg-bg-sunken/50"),
376
- children: [/* @__PURE__ */ D("span", {
437
+ onClick: () => Z(e.id),
438
+ "aria-current": R?.id === e.id ? "true" : void 0,
439
+ className: l("w-full rounded-md px-3 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", R?.id === e.id ? "bg-bg-sunken" : "hover:bg-bg-sunken/50"),
440
+ children: [/* @__PURE__ */ w("span", {
377
441
  className: "block truncate text-sm font-medium text-text-primary",
378
442
  children: e.name
379
- }), /* @__PURE__ */ O("span", {
443
+ }), /* @__PURE__ */ T("span", {
380
444
  className: "mt-1 inline-flex flex-wrap items-center gap-2 text-xs text-text-secondary",
381
445
  children: [
382
- /* @__PURE__ */ D("span", {
446
+ /* @__PURE__ */ w("span", {
383
447
  className: "rounded border border-border-seam px-1.5 py-0.5",
384
448
  children: f(e.dateRange)
385
449
  }),
450
+ e.schedule && /* @__PURE__ */ T("span", {
451
+ className: "inline-flex items-center gap-1 rounded bg-bg-sunken px-1.5 py-0.5 text-text-primary",
452
+ title: be(e.schedule),
453
+ children: [/* @__PURE__ */ w(y, { className: "h-3 w-3" }), _e(e.schedule)]
454
+ }),
386
455
  "Updated",
387
456
  " ",
388
457
  new Date(e.updatedAt).toLocaleDateString("en-US", {
@@ -393,182 +462,226 @@ var N = (e) => e instanceof Error ? e.message : "Something went wrong.", Ce = ({
393
462
  })]
394
463
  }) }, e.id))]
395
464
  }),
396
- Ee && /* @__PURE__ */ O("button", {
465
+ qe && /* @__PURE__ */ T("button", {
397
466
  type: "button",
398
- onClick: () => void ze(),
399
- disabled: Te,
467
+ onClick: () => void gt(),
468
+ disabled: We,
400
469
  className: "mt-2 w-full rounded-md px-3 py-2 text-left text-xs font-medium text-text-secondary transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-50",
401
- children: ["Show more reports", L === void 0 ? "" : ` (${I.length} of ${L})`]
470
+ children: ["Show more reports", Ke === void 0 ? "" : ` (${P.length} of ${Ke})`]
402
471
  }),
403
- P.error && /* @__PURE__ */ O("p", {
472
+ N.error && /* @__PURE__ */ T("p", {
404
473
  className: "px-2 pt-2 text-xs text-status-error-text",
405
- children: ["Saved reports could not be loaded: ", P.error.message]
474
+ children: ["Saved reports could not be loaded: ", N.error.message]
406
475
  }),
407
- !P.error && P.data && I.length === 0 && /* @__PURE__ */ D("p", {
476
+ !N.error && N.data && P.length === 0 && /* @__PURE__ */ w("p", {
408
477
  className: "px-2 pt-2 text-xs text-text-secondary",
409
478
  children: "No saved reports yet. Use New Report, or save the Executive Summary as your own."
410
479
  })
411
480
  ]
412
- }), /* @__PURE__ */ O("section", {
481
+ }), /* @__PURE__ */ T("section", {
413
482
  "aria-label": "Report",
414
483
  className: "min-w-0 space-y-6",
415
484
  children: [
416
- Oe && /* @__PURE__ */ D("p", {
485
+ Ye && /* @__PURE__ */ w("p", {
417
486
  role: "status",
418
487
  className: "rounded-lg border border-border-seam px-4 py-3 text-sm text-text-secondary",
419
488
  children: "That report no longer exists or is not in this workspace. Showing the Executive Summary instead."
420
489
  }),
421
- /* @__PURE__ */ D(k, { children: /* @__PURE__ */ O("div", {
490
+ /* @__PURE__ */ w(E, { children: /* @__PURE__ */ T("div", {
422
491
  className: "flex flex-col gap-4 xl:flex-row xl:items-start xl:justify-between",
423
- children: [/* @__PURE__ */ O("div", {
492
+ children: [/* @__PURE__ */ T("div", {
424
493
  className: "min-w-0",
425
494
  children: [
426
- /* @__PURE__ */ D("h2", {
495
+ /* @__PURE__ */ w("h2", {
427
496
  className: "text-xl font-bold tracking-tight",
428
- children: /* @__PURE__ */ D(be, { children: H.name })
497
+ children: /* @__PURE__ */ w(Le, { children: z.name })
429
498
  }),
430
- /* @__PURE__ */ O("p", {
499
+ /* @__PURE__ */ T("p", {
431
500
  className: "mt-0.5 text-sm text-text-secondary",
432
- children: [f(H.dateRange), U ? ` · ${W}` : ""]
501
+ children: [f(z.dateRange), B ? ` · ${V}` : ""]
433
502
  }),
434
- H.description && /* @__PURE__ */ D("p", {
503
+ z.description && /* @__PURE__ */ w("p", {
435
504
  className: "mt-1 text-sm text-text-secondary",
436
- children: H.description
505
+ children: z.description
506
+ }),
507
+ $ && /* @__PURE__ */ T("p", {
508
+ className: "mt-1 inline-flex flex-wrap items-center gap-x-1.5 text-xs text-text-secondary",
509
+ "data-testid": "report-schedule-summary",
510
+ children: [
511
+ /* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }),
512
+ $.enabled ? `${be($)} · next ${xe($.nextRunAt)}` : "Delivery paused",
513
+ $.lastRunStatus && /* @__PURE__ */ T("span", { children: [
514
+ "· last delivery",
515
+ " ",
516
+ /* @__PURE__ */ w("span", {
517
+ className: ze[ye($.lastRunStatus)],
518
+ title: $.lastRunError ?? void 0,
519
+ children: ve($.lastRunStatus)
520
+ }),
521
+ " ",
522
+ xe($.lastRunAt)
523
+ ] })
524
+ ]
437
525
  })
438
526
  ]
439
- }), /* @__PURE__ */ O("div", {
527
+ }), /* @__PURE__ */ T("div", {
440
528
  className: "flex flex-wrap items-center gap-2",
441
529
  children: [
442
- V ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("button", {
443
- type: "button",
444
- onClick: () => $(V.id, _(H, T)),
445
- className: M,
446
- children: [/* @__PURE__ */ D(_e, { className: "h-4 w-4" }), "Edit"]
447
- }), /* @__PURE__ */ O("button", {
448
- type: "button",
449
- onClick: () => void Ue(),
450
- className: M,
451
- children: [/* @__PURE__ */ D(S, { className: "h-4 w-4" }), "Share"]
452
- })] }) : /* @__PURE__ */ O("button", {
530
+ R ? /* @__PURE__ */ T(Ie, { children: [
531
+ /* @__PURE__ */ T("button", {
532
+ type: "button",
533
+ onClick: () => Q(R.id, g(z, M)),
534
+ className: A,
535
+ children: [/* @__PURE__ */ w(je, { className: "h-4 w-4" }), "Edit"]
536
+ }),
537
+ /* @__PURE__ */ T("button", {
538
+ type: "button",
539
+ onClick: () => void Et(),
540
+ className: A,
541
+ children: [/* @__PURE__ */ w(Ne, { className: "h-4 w-4" }), "Share"]
542
+ }),
543
+ /* @__PURE__ */ T("button", {
544
+ type: "button",
545
+ onClick: St,
546
+ className: A,
547
+ children: [/* @__PURE__ */ w(y, { className: "h-4 w-4" }), "Schedule"]
548
+ })
549
+ ] }) : /* @__PURE__ */ T("button", {
453
550
  type: "button",
454
- onClick: () => $(null, _(h, T, `${h.name} (copy)`)),
455
- className: M,
456
- children: [/* @__PURE__ */ D(ge, { className: "h-4 w-4" }), "Save as report"]
551
+ onClick: () => Q(null, g(h, M, `${h.name} (copy)`)),
552
+ className: A,
553
+ children: [/* @__PURE__ */ w(Ae, { className: "h-4 w-4" }), "Save as report"]
457
554
  }),
458
- /* @__PURE__ */ O("button", {
555
+ /* @__PURE__ */ T("button", {
459
556
  type: "button",
460
- onClick: We,
461
- disabled: !G.hasData,
462
- className: M,
463
- children: [/* @__PURE__ */ D(me, { className: "h-4 w-4" }), "Export CSV"]
557
+ onClick: Dt,
558
+ disabled: !H.hasData,
559
+ className: A,
560
+ children: [/* @__PURE__ */ w(Oe, { className: "h-4 w-4" }), "Export CSV"]
464
561
  }),
465
- /* @__PURE__ */ O("button", {
562
+ /* @__PURE__ */ T("button", {
466
563
  type: "button",
467
- onClick: Ge,
468
- disabled: !G.hasData,
564
+ onClick: Ot,
565
+ disabled: !H.hasData,
469
566
  title: "Save this report as a PDF (opens your browser's print dialog)",
470
- className: M,
471
- children: [/* @__PURE__ */ D(he, { className: "h-4 w-4" }), "Export PDF"]
567
+ className: A,
568
+ children: [/* @__PURE__ */ w(ke, { className: "h-4 w-4" }), "Export PDF"]
472
569
  }),
473
- V && /* @__PURE__ */ D("button", {
570
+ R && /* @__PURE__ */ w("button", {
474
571
  type: "button",
475
572
  onClick: () => {
476
- Z(null), X(!0);
573
+ q(null), K(!0);
477
574
  },
478
575
  "aria-label": "Delete report",
479
- className: o(M, "text-status-error-text"),
480
- children: /* @__PURE__ */ D(ve, { className: "h-4 w-4" })
576
+ className: l(A, "text-status-error-text"),
577
+ children: /* @__PURE__ */ w(Pe, { className: "h-4 w-4" })
481
578
  })
482
579
  ]
483
580
  })]
484
581
  }) }),
485
- /* @__PURE__ */ O(ee, {
486
- loading: G.loading,
487
- error: G.error,
488
- onRetry: G.refetch,
489
- hasData: G.hasData,
490
- children: [/* @__PURE__ */ D(ie, {
491
- source: G.view.source,
492
- windowLabel: W
493
- }), /* @__PURE__ */ O("div", {
582
+ /* @__PURE__ */ T(re, {
583
+ loading: H.loading,
584
+ error: H.error,
585
+ onRetry: H.refetch,
586
+ hasData: H.hasData,
587
+ children: [/* @__PURE__ */ w(se, {
588
+ source: H.view.source,
589
+ windowLabel: V
590
+ }), /* @__PURE__ */ T("div", {
494
591
  className: "grid grid-cols-1 gap-6 xl:grid-cols-2",
495
- children: [H.widgets.map((e) => /* @__PURE__ */ D("div", {
496
- className: o(m[e].wide && "xl:col-span-2"),
497
- children: /* @__PURE__ */ D(ae, {
592
+ children: [z.widgets.map((e) => /* @__PURE__ */ w("div", {
593
+ className: l(m[e].wide && "xl:col-span-2"),
594
+ children: /* @__PURE__ */ w(ce, {
498
595
  widget: e,
499
- view: G.view,
500
- attribution: G.attribution,
501
- attributionLoading: G.attributionLoading,
502
- attributionError: G.attributionError,
503
- onOpenCampaign: (e) => l(p + "/campaigns/" + e)
596
+ view: H.view,
597
+ attribution: H.attribution,
598
+ attributionLoading: H.attributionLoading,
599
+ attributionError: H.attributionError,
600
+ onOpenCampaign: (e) => d(p + "/campaigns/" + e)
504
601
  })
505
- }, e)), /* @__PURE__ */ O("button", {
602
+ }, e)), /* @__PURE__ */ T("button", {
506
603
  type: "button",
507
- onClick: () => V ? $(V.id, _(H, T)) : $(null, _(h, T, `${h.name} (copy)`)),
604
+ onClick: () => R ? Q(R.id, g(z, M)) : Q(null, g(h, M, `${h.name} (copy)`)),
508
605
  className: "flex min-h-[160px] flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-border-seam text-sm font-medium text-text-secondary transition-colors hover:bg-bg-sunken/40 hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] print:hidden",
509
- children: [/* @__PURE__ */ D(x, { className: "h-6 w-6" }), "Add widget"]
606
+ children: [/* @__PURE__ */ w(Me, { className: "h-6 w-6" }), "Add widget"]
510
607
  })]
511
608
  })]
512
609
  })
513
610
  ]
514
611
  })]
515
612
  }),
516
- /* @__PURE__ */ O(k, { children: [/* @__PURE__ */ D("h3", {
613
+ /* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w("h3", {
517
614
  className: "mb-4 text-sm font-semibold text-text-primary",
518
615
  children: "Open a live view"
519
- }), /* @__PURE__ */ D("div", {
616
+ }), /* @__PURE__ */ w("div", {
520
617
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
521
- children: we.map((e) => /* @__PURE__ */ O("button", {
618
+ children: He.map((e) => /* @__PURE__ */ T("button", {
522
619
  type: "button",
523
- onClick: () => l(p + e.segment),
620
+ onClick: () => d(p + e.segment),
524
621
  className: "group flex items-start gap-3 rounded-lg border border-border-seam bg-gloss-card p-4 text-left shadow-pop transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
525
- children: [/* @__PURE__ */ D("span", {
622
+ children: [/* @__PURE__ */ w("span", {
526
623
  className: "text-text-secondary transition-colors group-hover:text-action-primary-bg",
527
624
  children: e.icon
528
- }), /* @__PURE__ */ O("div", {
625
+ }), /* @__PURE__ */ T("div", {
529
626
  className: "min-w-0 flex-1",
530
- children: [/* @__PURE__ */ O("p", {
627
+ children: [/* @__PURE__ */ T("p", {
531
628
  className: "flex items-center gap-1 text-sm font-medium text-text-primary",
532
- children: [e.name, /* @__PURE__ */ D(pe, { className: "h-3.5 w-3.5 shrink-0 text-text-secondary opacity-0 transition-opacity group-hover:opacity-100" })]
533
- }), /* @__PURE__ */ D("p", {
629
+ children: [e.name, /* @__PURE__ */ w(De, { className: "h-3.5 w-3.5 shrink-0 text-text-secondary opacity-0 transition-opacity group-hover:opacity-100" })]
630
+ }), /* @__PURE__ */ w("p", {
534
631
  className: "mt-0.5 text-xs text-text-secondary",
535
632
  children: e.description
536
633
  })]
537
634
  })]
538
635
  }, e.id))
539
636
  })] }),
540
- K && /* @__PURE__ */ D(Ce, {
637
+ U && /* @__PURE__ */ w(Ve, {
541
638
  open: !0,
542
- title: K.reportId ? "Edit report" : "New report",
543
- submitLabel: K.reportId ? "Save changes" : "Save report",
544
- draft: K.draft,
545
- onChange: (e) => q({
546
- ...K,
639
+ title: U.reportId ? "Edit report" : "New report",
640
+ submitLabel: U.reportId ? "Save changes" : "Save report",
641
+ draft: U.draft,
642
+ onChange: (e) => W({
643
+ ...U,
547
644
  draft: e
548
645
  }),
549
- errors: ke ? Be : {},
550
- serverError: Ae,
551
- saving: Ke,
552
- onClose: () => q(null),
553
- onSubmit: () => void Ve()
646
+ errors: Xe ? _t : {},
647
+ serverError: Qe,
648
+ saving: kt,
649
+ onClose: () => W(null),
650
+ onSubmit: () => void vt()
651
+ }),
652
+ R && J && /* @__PURE__ */ w(Te, {
653
+ open: !0,
654
+ reportId: R.id,
655
+ reportName: R.name,
656
+ workspaceId: de,
657
+ schedule: $,
658
+ draft: J,
659
+ onChange: Y,
660
+ errors: tt ? bt : {},
661
+ serverError: rt,
662
+ busy: xt,
663
+ onClose: () => Y(null),
664
+ onSave: () => void Ct(),
665
+ onRemove: () => void wt(),
666
+ onSendNow: () => void Tt()
554
667
  }),
555
- /* @__PURE__ */ D(u, {
556
- open: je,
557
- onClose: () => X(!1),
668
+ /* @__PURE__ */ w(te, {
669
+ open: $e,
670
+ onClose: () => K(!1),
558
671
  title: "Delete report",
559
- message: `Delete "${H.name}"? Everyone in the workspace loses this saved report. The underlying analytics are not affected.`,
560
- deleting: Re.loading,
561
- error: Me,
562
- onConfirm: () => void He()
672
+ message: `Delete "${z.name}"? Everyone in the workspace loses this saved report. The underlying analytics are not affected.`,
673
+ deleting: lt.loading,
674
+ error: et,
675
+ onConfirm: () => void yt()
563
676
  }),
564
- /* @__PURE__ */ D(d, { toasts: b.map((e) => ({
677
+ /* @__PURE__ */ w(ne, { toasts: S.map((e) => ({
565
678
  ...e,
566
- onDismiss: w
679
+ onDismiss: Ue
567
680
  })) })
568
681
  ]
569
682
  });
570
683
  };
571
684
  //#endregion
572
- export { P as ReportsPage };
685
+ export { Ue as ReportsPage };
573
686
 
574
687
  //# sourceMappingURL=ReportsPage.js.map