@burdenoff/microfe-movethewheels 2026.1026.1 → 2026.1026.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.
Files changed (46) hide show
  1. package/dist/MoveTheWheelsRoot.js +126 -159
  2. package/dist/MoveTheWheelsRoutes.js +16 -32
  3. package/dist/components/CustomerPicker.js +2 -2
  4. package/dist/hooks/index.js +0 -3
  5. package/dist/index.js +27 -30
  6. package/dist/movethewheels/hooks/index.d.ts +0 -3
  7. package/dist/pages/CreateOrderPage.js +1 -1
  8. package/package.json +1 -1
  9. package/src/movethewheels/MoveTheWheelsRoot.tsx +2 -46
  10. package/src/movethewheels/MoveTheWheelsRoutes.tsx +0 -16
  11. package/src/movethewheels/components/CustomerPicker.tsx +2 -2
  12. package/src/movethewheels/hooks/index.ts +0 -9
  13. package/src/movethewheels/pages/CreateOrderPage.tsx +1 -1
  14. package/dist/hooks/useImportExport.js +0 -27
  15. package/dist/hooks/useReports.js +0 -75
  16. package/dist/hooks/useSettings.js +0 -67
  17. package/dist/movethewheels/hooks/useImportExport.d.ts +0 -23
  18. package/dist/movethewheels/hooks/useReports.d.ts +0 -39
  19. package/dist/movethewheels/hooks/useSettings.d.ts +0 -17
  20. package/dist/movethewheels/pages/ImportExportPage.d.ts +0 -8
  21. package/dist/movethewheels/pages/MarketplacePage.d.ts +0 -12
  22. package/dist/movethewheels/pages/ReportsPage.d.ts +0 -8
  23. package/dist/movethewheels/pages/SettingsPage.d.ts +0 -8
  24. package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +0 -11
  25. package/dist/node_modules/lucide-react/dist/esm/icons/file-chart-column-increasing.js +0 -26
  26. package/dist/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js +0 -30
  27. package/dist/node_modules/lucide-react/dist/esm/icons/globe.js +0 -20
  28. package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +0 -13
  29. package/dist/node_modules/lucide-react/dist/esm/icons/shield.js +0 -8
  30. package/dist/node_modules/lucide-react/dist/esm/icons/store.js +0 -26
  31. package/dist/node_modules/lucide-react/dist/esm/icons/webhook.js +0 -18
  32. package/dist/pages/ImportExportPage.js +0 -245
  33. package/dist/pages/MarketplacePage.js +0 -23
  34. package/dist/pages/ReportsPage.js +0 -328
  35. package/dist/pages/SettingsPage.js +0 -404
  36. package/dist/utils/download.js +0 -22
  37. package/src/movethewheels/hooks/useImportExport.ts +0 -65
  38. package/src/movethewheels/hooks/useReports.ts +0 -154
  39. package/src/movethewheels/hooks/useSettings.ts +0 -124
  40. package/src/movethewheels/pages/ImportExportPage.tsx +0 -288
  41. package/src/movethewheels/pages/MarketplacePage.tsx +0 -36
  42. package/src/movethewheels/pages/ReportsPage.tsx +0 -379
  43. package/src/movethewheels/pages/SettingsPage.tsx +0 -548
  44. package/src/operations/wspace/movethewheels/fragments/core.withdrawn.graphql +0 -59
  45. package/src/operations/wspace/movethewheels/mutations/marketplace-reports.withdrawn.graphql +0 -93
  46. package/src/operations/wspace/movethewheels/queries/marketplace-reports.withdrawn.graphql +0 -58
@@ -1,328 +0,0 @@
1
- import { Calendar as e } from "../node_modules/lucide-react/dist/esm/icons/calendar.js";
2
- import { ChevronLeft as t } from "../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
3
- import { ChevronRight as n } from "../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
4
- import { Clock as r } from "../node_modules/lucide-react/dist/esm/icons/clock.js";
5
- import { Download as i } from "../node_modules/lucide-react/dist/esm/icons/download.js";
6
- import { FileChartColumnIncreasing as a } from "../node_modules/lucide-react/dist/esm/icons/file-chart-column-increasing.js";
7
- import { Filter as o } from "../node_modules/lucide-react/dist/esm/icons/filter.js";
8
- import { Plus as s } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
9
- import { useAnalytics as ee } from "../hooks/useAnalytics.js";
10
- import { useReports as c } from "../hooks/useReports.js";
11
- import { Badge as l, Button as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m, Select as te, SelectContent as ne, SelectItem as re, SelectTrigger as ie, SelectValue as ae, Skeleton as oe } from "../components/ui.js";
12
- import { PageLayout as h } from "../components/PageLayout.js";
13
- import { VolumeBar as g } from "../components/charts/VolumeBar.js";
14
- import "../components/charts/index.js";
15
- import { formatDate as _ } from "../utils/formatters.js";
16
- import { UpcomingDemandPanel as v } from "../components/UpcomingDemandPanel.js";
17
- import { useDemandForecast as y } from "../hooks/useDemandForecast.js";
18
- import { downloadFile as b, downloadJson as x, recordToCsv as se, slugifyForFilename as ce } from "../utils/download.js";
19
- import { useState as S } from "react";
20
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
21
- import { EmphasisPanel as T, IllustratedEmptyState as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
22
- //#region src/movethewheels/pages/ReportsPage.tsx
23
- var O = [
24
- {
25
- value: "operations",
26
- label: "Operations Summary"
27
- },
28
- {
29
- value: "finance",
30
- label: "Financial Report"
31
- },
32
- {
33
- value: "fleet",
34
- label: "Fleet Utilization"
35
- },
36
- {
37
- value: "customers",
38
- label: "Customer Analytics"
39
- },
40
- {
41
- value: "inventory",
42
- label: "Inventory Status"
43
- }
44
- ], k = 10;
45
- function A() {
46
- let [A, j] = S(0), { reports: M, hasMore: N, isLoading: P, error: F, refetch: I, createReport: L, generateReport: le } = c({
47
- limit: k,
48
- offset: A * k
49
- }), { analytics: R } = ee(), z = R.trends.dailyOrders.slice(-7), { laneForecast: B, customerForecast: V, laneVariance: H, customerVariance: U, isLoading: W, error: ue, refetch: de } = y(4, 8), [G, fe] = S("operations"), [pe, K] = S(null), [q, J] = S(!1), [Y, X] = S(null), Z = (e) => O.find((t) => t.value === e)?.label ?? e, Q = async (e) => {
50
- J(!0), X(null);
51
- let t = {
52
- name: `${Z(G)}${e ? " (Scheduled)" : ""}`,
53
- type: G,
54
- description: `${Z(G)} generated from live operational data`,
55
- ...e ? { schedule: e } : {}
56
- };
57
- try {
58
- await L(t), X({
59
- tone: "success",
60
- text: e ? "Scheduled report created." : "Report created."
61
- });
62
- } catch (e) {
63
- X({
64
- tone: "error",
65
- text: e instanceof Error ? e.message : "Could not create report."
66
- });
67
- } finally {
68
- J(!1);
69
- }
70
- }, me = async (e) => {
71
- K(e), X(null);
72
- try {
73
- let t = await le(e), n = `${ce(t.report.name)}-${t.generatedAt.slice(0, 10)}`, r = se(t.result ?? null);
74
- r ? b(`${n}.csv`, r, "text/csv") : x(`${n}.json`, t), X({
75
- tone: "success",
76
- text: "Report generated and downloaded."
77
- });
78
- } catch (e) {
79
- X({
80
- tone: "error",
81
- text: e instanceof Error ? e.message : "Could not generate report."
82
- });
83
- } finally {
84
- K(null);
85
- }
86
- }, $ = M.filter((e) => e.schedule);
87
- return /* @__PURE__ */ w(h, {
88
- title: "Reports",
89
- subtitle: "Generate and schedule reports",
90
- icon: /* @__PURE__ */ C(a, { size: 24 }),
91
- headerActions: /* @__PURE__ */ w("div", {
92
- className: "flex gap-2",
93
- children: [/* @__PURE__ */ w(te, {
94
- value: G,
95
- onValueChange: fe,
96
- children: [/* @__PURE__ */ C(ie, {
97
- className: "w-[190px]",
98
- children: /* @__PURE__ */ C(ae, {})
99
- }), /* @__PURE__ */ C(ne, { children: O.map((e) => /* @__PURE__ */ C(re, {
100
- value: e.value,
101
- children: e.label
102
- }, e.value)) })]
103
- }), /* @__PURE__ */ w(u, {
104
- onClick: () => void Q(),
105
- disabled: q,
106
- children: [/* @__PURE__ */ C(s, { size: 16 }), " Create Report"]
107
- })]
108
- }),
109
- children: [
110
- /* @__PURE__ */ C(D, {
111
- icon: /* @__PURE__ */ C(a, { size: 18 }),
112
- children: "Turn your operational data into shareable summaries. Generate one-off reports on orders, finance, fleet, customers or inventory, or schedule them to land in inboxes automatically — so stakeholders always have the latest numbers without logging in."
113
- }),
114
- Y && /* @__PURE__ */ C("div", {
115
- role: "status",
116
- className: `rounded-lg p-3 text-sm ${Y.tone === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
117
- children: Y.text
118
- }),
119
- /* @__PURE__ */ w("div", {
120
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
121
- children: [/* @__PURE__ */ w("div", {
122
- className: "lg:col-span-2 space-y-4",
123
- children: [
124
- /* @__PURE__ */ C("h3", {
125
- className: "font-semibold",
126
- children: "Available Reports"
127
- }),
128
- P ? /* @__PURE__ */ C("div", {
129
- className: "space-y-3",
130
- children: Array.from({ length: 3 }).map((e, t) => /* @__PURE__ */ C(oe, { className: "h-20 w-full rounded-lg" }, t))
131
- }) : F ? /* @__PURE__ */ C(d, {
132
- className: "border-status-error-border",
133
- children: /* @__PURE__ */ w(f, {
134
- className: "p-6 text-center space-y-3",
135
- children: [
136
- /* @__PURE__ */ C("p", {
137
- className: "text-status-error-text font-medium",
138
- children: "Couldn't load reports"
139
- }),
140
- /* @__PURE__ */ C("p", {
141
- className: "text-sm text-text-secondary",
142
- children: F.message
143
- }),
144
- /* @__PURE__ */ C(u, {
145
- variant: "outline",
146
- onClick: I,
147
- children: "Retry"
148
- })
149
- ]
150
- })
151
- }) : M.length === 0 ? /* @__PURE__ */ C(d, { children: /* @__PURE__ */ C(f, {
152
- className: "p-0",
153
- children: /* @__PURE__ */ C(E, {
154
- illustration: "empty-data",
155
- title: "No reports yet",
156
- description: "Create your first report to turn live operational data into a shareable summary.",
157
- action: /* @__PURE__ */ w(u, {
158
- onClick: () => void Q(),
159
- disabled: q,
160
- children: [/* @__PURE__ */ C(s, {
161
- size: 16,
162
- className: "mr-1.5"
163
- }), " Create Report"]
164
- })
165
- })
166
- }) }) : M.map((e) => /* @__PURE__ */ C(d, { children: /* @__PURE__ */ C(f, {
167
- className: "p-4",
168
- children: /* @__PURE__ */ w("div", {
169
- className: "flex items-center justify-between",
170
- children: [/* @__PURE__ */ w("div", {
171
- className: "flex items-center gap-3",
172
- children: [/* @__PURE__ */ C("div", {
173
- className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
174
- children: /* @__PURE__ */ C(a, {
175
- size: 20,
176
- className: "text-primary"
177
- })
178
- }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
179
- className: "font-medium",
180
- children: e.name
181
- }), /* @__PURE__ */ C("p", {
182
- className: "text-sm text-text-secondary",
183
- children: e.description ?? Z(e.type)
184
- })] })]
185
- }), /* @__PURE__ */ w("div", {
186
- className: "flex items-center gap-3",
187
- children: [/* @__PURE__ */ w("div", {
188
- className: "text-right",
189
- children: [/* @__PURE__ */ C(l, {
190
- variant: "outline",
191
- children: e.schedule ?? "On demand"
192
- }), e.lastGenerated && /* @__PURE__ */ w("p", {
193
- className: "text-xs text-text-secondary mt-1",
194
- children: ["Last: ", _(new Date(e.lastGenerated), "short")]
195
- })]
196
- }), /* @__PURE__ */ C(u, {
197
- variant: "outline",
198
- size: "sm",
199
- "aria-label": `Generate ${e.name}`,
200
- disabled: pe === e.id,
201
- onClick: () => void me(e.id),
202
- children: /* @__PURE__ */ C(i, { size: 14 })
203
- })]
204
- })]
205
- })
206
- }) }, e.id)),
207
- !P && !F && (M.length > 0 || A > 0) && /* @__PURE__ */ w("div", {
208
- className: "flex flex-wrap items-center justify-between gap-3 pt-1",
209
- children: [/* @__PURE__ */ w("span", {
210
- className: "text-sm text-text-secondary",
211
- children: [
212
- "Showing ",
213
- M.length === 0 ? 0 : A * k + 1,
214
- " to",
215
- " ",
216
- A * k + M.length
217
- ]
218
- }), /* @__PURE__ */ w("div", {
219
- className: "flex items-center gap-1",
220
- children: [
221
- /* @__PURE__ */ C(u, {
222
- variant: "outline",
223
- size: "icon",
224
- className: "h-8 w-8",
225
- "aria-label": "Previous page",
226
- onClick: () => j((e) => Math.max(0, e - 1)),
227
- disabled: A === 0,
228
- children: /* @__PURE__ */ C(t, { className: "h-4 w-4" })
229
- }),
230
- /* @__PURE__ */ w("span", {
231
- className: "px-3 text-sm",
232
- children: ["Page ", A + 1]
233
- }),
234
- /* @__PURE__ */ C(u, {
235
- variant: "outline",
236
- size: "icon",
237
- className: "h-8 w-8",
238
- "aria-label": "Next page",
239
- onClick: () => j((e) => e + 1),
240
- disabled: !N,
241
- children: /* @__PURE__ */ C(n, { className: "h-4 w-4" })
242
- })
243
- ]
244
- })]
245
- })
246
- ]
247
- }), /* @__PURE__ */ w("div", {
248
- className: "space-y-6",
249
- children: [
250
- /* @__PURE__ */ C(v, {
251
- laneForecast: B,
252
- customerForecast: V,
253
- laneVariance: H,
254
- customerVariance: U,
255
- isLoading: W,
256
- error: ue,
257
- onRetry: de
258
- }),
259
- /* @__PURE__ */ w(d, { children: [/* @__PURE__ */ C(p, { children: /* @__PURE__ */ C(m, {
260
- className: "text-base",
261
- children: "Data preview"
262
- }) }), /* @__PURE__ */ w(f, { children: [/* @__PURE__ */ C("p", {
263
- className: "mb-2 text-xs text-text-secondary",
264
- children: "Order volume · last 7 days"
265
- }), /* @__PURE__ */ C(g, {
266
- xKey: "date",
267
- height: 160,
268
- showLegend: !1,
269
- data: z,
270
- series: [{
271
- dataKey: "orders",
272
- name: "Orders"
273
- }],
274
- emptyMessage: "No order data to preview yet"
275
- })] })] }),
276
- /* @__PURE__ */ w(T, {
277
- className: "space-y-3",
278
- children: [
279
- /* @__PURE__ */ w("h2", {
280
- className: "flex items-center gap-2 text-base font-semibold text-text-primary",
281
- children: [/* @__PURE__ */ C(r, { size: 18 }), " Scheduled Reports"]
282
- }),
283
- $.length === 0 ? /* @__PURE__ */ C("p", {
284
- className: "text-sm text-text-secondary",
285
- children: "No scheduled reports yet. Schedule one to have it generated automatically."
286
- }) : $.map((e) => /* @__PURE__ */ w("div", {
287
- className: "p-3 border border-border-seam rounded-lg",
288
- children: [/* @__PURE__ */ C("p", {
289
- className: "font-medium",
290
- children: e.name
291
- }), /* @__PURE__ */ w("p", {
292
- className: "text-sm text-text-secondary",
293
- children: ["Schedule: ", e.schedule]
294
- })]
295
- }, e.id)),
296
- /* @__PURE__ */ C(u, {
297
- variant: "outline",
298
- className: "w-full",
299
- disabled: q,
300
- onClick: () => void Q("daily"),
301
- children: "Schedule New Report"
302
- })
303
- ]
304
- }),
305
- /* @__PURE__ */ w(d, { children: [/* @__PURE__ */ C(p, { children: /* @__PURE__ */ C(m, { children: "Quick Actions" }) }), /* @__PURE__ */ w(f, {
306
- className: "space-y-2",
307
- children: [/* @__PURE__ */ w(u, {
308
- variant: "outline",
309
- className: "w-full justify-start",
310
- disabled: q,
311
- onClick: () => void Q("weekly"),
312
- children: [/* @__PURE__ */ C(e, { size: 16 }), " Schedule Report"]
313
- }), /* @__PURE__ */ w(u, {
314
- variant: "outline",
315
- className: "w-full justify-start",
316
- disabled: q,
317
- onClick: () => void Q(),
318
- children: [/* @__PURE__ */ C(o, { size: 16 }), " Custom Report"]
319
- })]
320
- })] })
321
- ]
322
- })]
323
- })
324
- ]
325
- });
326
- }
327
- //#endregion
328
- export { A as default };