@burdenoff/microfe-movethewheels 2026.1102.2 → 2026.1107.1

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.
@@ -0,0 +1 @@
1
+ export default function ReportsPage(): import('react').JSX.Element;
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Reports — client side of wspace-movethewheels-svc's saved reports
3
+ * (BOFF-3989).
4
+ *
5
+ * The service owns validation, scheduling and generation; this module holds
6
+ * the GraphQL documents, the form model and the display helpers for report
7
+ * runs. Kept free of React so the contract can be unit-tested against the
8
+ * subgraph schema.
9
+ */
10
+ export type MtwReportType = 'OPERATIONS' | 'FINANCE' | 'FLEET' | 'CUSTOMERS' | 'INVENTORY';
11
+ export type MtwReportFrequency = 'NONE' | 'DAILY' | 'WEEKLY' | 'MONTHLY';
12
+ export type MtwReportFormat = 'CSV' | 'JSON';
13
+ export type MtwReportCell = string | number | boolean | null;
14
+ export interface MtwReportColumn {
15
+ key: string;
16
+ label: string;
17
+ kind: 'TEXT' | 'NUMBER' | 'CURRENCY' | 'DATE' | 'BOOLEAN' | string;
18
+ }
19
+ export interface MtwReportMetric {
20
+ key: string;
21
+ label: string;
22
+ value: number | null;
23
+ kind: 'NUMBER' | 'CURRENCY' | 'PERCENT' | 'DISTANCE' | 'WEIGHT' | string;
24
+ currency: string | null;
25
+ }
26
+ export interface MtwReportRunSummary {
27
+ id: string;
28
+ reportId: string;
29
+ reportType: MtwReportType;
30
+ trigger: 'MANUAL' | 'SCHEDULED' | string;
31
+ status: 'RUNNING' | 'COMPLETED' | 'FAILED' | string;
32
+ periodStart: string;
33
+ periodEnd: string;
34
+ rowCount: number;
35
+ truncated: boolean;
36
+ error: string | null;
37
+ durationMs: number | null;
38
+ startedAt: string;
39
+ finishedAt: string | null;
40
+ }
41
+ export interface MtwReportRunDetail extends MtwReportRunSummary {
42
+ metrics: MtwReportMetric[];
43
+ columns: MtwReportColumn[];
44
+ rows: Record<string, MtwReportCell>[];
45
+ }
46
+ export interface MtwReport {
47
+ id: string;
48
+ name: string;
49
+ description: string | null;
50
+ type: MtwReportType;
51
+ periodDays: number;
52
+ frequency: MtwReportFrequency;
53
+ runHour: number;
54
+ runWeekday: number;
55
+ runMonthDay: number;
56
+ timezone: string;
57
+ isActive: boolean;
58
+ nextRunAt: string | null;
59
+ lastGeneratedAt: string | null;
60
+ lastRunStatus: string | null;
61
+ lastError: string | null;
62
+ updatedAt: string;
63
+ latestRun: MtwReportRunSummary | null;
64
+ }
65
+ export interface MtwReportExport {
66
+ filename: string;
67
+ contentType: string;
68
+ content: string;
69
+ rowCount: number;
70
+ truncated: boolean;
71
+ }
72
+ /** What the create/edit form sends; the service fills in the rest. */
73
+ export interface MtwReportInput {
74
+ name: string;
75
+ type: MtwReportType;
76
+ description: string;
77
+ periodDays: number;
78
+ frequency: MtwReportFrequency;
79
+ runHour: number;
80
+ runWeekday: number;
81
+ runMonthDay: number;
82
+ timezone: string;
83
+ isActive: boolean;
84
+ }
85
+ /** Mirrors the service limits. */
86
+ export declare const NAME_MAX = 120;
87
+ export declare const DESCRIPTION_MAX = 1000;
88
+ export declare const PERIOD_DAYS_MIN = 1;
89
+ export declare const PERIOD_DAYS_MAX = 366;
90
+ /** Rows shown in the in-page preview; the download holds every stored row. */
91
+ export declare const PREVIEW_ROWS = 50;
92
+ export declare const REPORT_TYPE_OPTIONS: ReadonlyArray<{
93
+ value: MtwReportType;
94
+ label: string;
95
+ description: string;
96
+ }>;
97
+ export declare const FREQUENCY_OPTIONS: ReadonlyArray<{
98
+ value: MtwReportFrequency;
99
+ label: string;
100
+ }>;
101
+ export declare const WEEKDAY_LABELS: readonly ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
102
+ export declare const MTW_REPORTS_QUERY = "\n query MtwReports($pagination: PaginationInput) {\n mtwReports(pagination: $pagination) {\n \n id\n name\n description\n type\n periodDays\n frequency\n runHour\n runWeekday\n runMonthDay\n timezone\n isActive\n nextRunAt\n lastGeneratedAt\n lastRunStatus\n lastError\n updatedAt\n latestRun {\n \n id\n reportId\n reportType\n trigger\n status\n periodStart\n periodEnd\n rowCount\n truncated\n error\n durationMs\n startedAt\n finishedAt\n\n }\n\n }\n }\n";
103
+ export declare const MTW_REPORT_RUNS_QUERY = "\n query MtwReportRuns($reportId: ID!, $pagination: PaginationInput) {\n mtwReportRuns(reportId: $reportId, pagination: $pagination) {\n \n id\n reportId\n reportType\n trigger\n status\n periodStart\n periodEnd\n rowCount\n truncated\n error\n durationMs\n startedAt\n finishedAt\n\n }\n }\n";
104
+ export declare const MTW_REPORT_RUN_QUERY = "\n query MtwReportRun($id: ID!, $rows: PaginationInput) {\n mtwReportRun(id: $id) {\n \n id\n reportId\n reportType\n trigger\n status\n periodStart\n periodEnd\n rowCount\n truncated\n error\n durationMs\n startedAt\n finishedAt\n\n metrics {\n key\n label\n value\n kind\n currency\n }\n columns {\n key\n label\n kind\n }\n rows(pagination: $rows)\n }\n }\n";
105
+ export declare const MTW_REPORT_RUN_EXPORT_QUERY = "\n query MtwReportRunExport($runId: ID!, $format: MtwReportFormat!) {\n mtwReportRunExport(runId: $runId, format: $format) {\n filename\n contentType\n content\n rowCount\n truncated\n }\n }\n";
106
+ export declare const CREATE_MTW_REPORT_MUTATION = "\n mutation CreateMtwReport($input: MtwCreateReportInput!) {\n createMtwReport(input: $input) {\n \n id\n name\n description\n type\n periodDays\n frequency\n runHour\n runWeekday\n runMonthDay\n timezone\n isActive\n nextRunAt\n lastGeneratedAt\n lastRunStatus\n lastError\n updatedAt\n latestRun {\n \n id\n reportId\n reportType\n trigger\n status\n periodStart\n periodEnd\n rowCount\n truncated\n error\n durationMs\n startedAt\n finishedAt\n\n }\n\n }\n }\n";
107
+ export declare const UPDATE_MTW_REPORT_MUTATION = "\n mutation UpdateMtwReport($id: ID!, $input: MtwUpdateReportInput!) {\n updateMtwReport(id: $id, input: $input) {\n \n id\n name\n description\n type\n periodDays\n frequency\n runHour\n runWeekday\n runMonthDay\n timezone\n isActive\n nextRunAt\n lastGeneratedAt\n lastRunStatus\n lastError\n updatedAt\n latestRun {\n \n id\n reportId\n reportType\n trigger\n status\n periodStart\n periodEnd\n rowCount\n truncated\n error\n durationMs\n startedAt\n finishedAt\n\n }\n\n }\n }\n";
108
+ export declare const DELETE_MTW_REPORT_MUTATION = "\n mutation DeleteMtwReport($id: ID!) {\n deleteMtwReport(id: $id)\n }\n";
109
+ export declare const GENERATE_MTW_REPORT_MUTATION = "\n mutation GenerateMtwReport($id: ID!) {\n generateMtwReport(id: $id) {\n \n id\n reportId\n reportType\n trigger\n status\n periodStart\n periodEnd\n rowCount\n truncated\n error\n durationMs\n startedAt\n finishedAt\n\n }\n }\n";
110
+ /** The form's starting point for a new report. */
111
+ export declare function newReportInput(timezone: string): MtwReportInput;
112
+ export declare function reportToInput(report: MtwReport): MtwReportInput;
113
+ /** The look-back window that matches a frequency: the gap between two runs. */
114
+ export declare function suggestedPeriodDays(frequency: MtwReportFrequency): number;
115
+ /** The first problem with the form, or null when the service would accept it. */
116
+ export declare function reportInputError(input: MtwReportInput): string | null;
117
+ /** The input sent to createMtwReport / updateMtwReport. */
118
+ export declare function toServiceInput(input: MtwReportInput): Record<string, unknown>;
119
+ export declare function reportTypeLabel(type: string): string;
120
+ /** "Every Monday at 06:00 (Asia/Kolkata)", "Paused", or "On demand". */
121
+ export declare function scheduleSummary(report: Pick<MtwReport, 'frequency' | 'runHour' | 'runWeekday' | 'runMonthDay' | 'timezone' | 'isActive'>): string;
122
+ export interface MetricFormatters {
123
+ currency: (amount: number, currency?: string) => string;
124
+ distance: (km: number) => string;
125
+ weight: (kg: number) => string;
126
+ }
127
+ /** Display value for one headline metric, in the workspace's units. */
128
+ export declare function formatMetric(metric: MtwReportMetric, format: MetricFormatters): string;
129
+ /** A metric's label with its currency, so per-currency figures stay apart. */
130
+ export declare function metricLabel(metric: MtwReportMetric): string;
131
+ /** Display value for one detail cell. */
132
+ export declare function formatCell(value: MtwReportCell | undefined, column: MtwReportColumn, formatDate: (value: string) => string): string;
@@ -0,0 +1,26 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/file-chart-column-increasing.js
3
+ var t = e("FileChartColumnIncreasing", [
4
+ ["path", {
5
+ d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
6
+ key: "1rqfz7"
7
+ }],
8
+ ["path", {
9
+ d: "M14 2v4a2 2 0 0 0 2 2h4",
10
+ key: "tnqrlb"
11
+ }],
12
+ ["path", {
13
+ d: "M8 18v-2",
14
+ key: "qcmpov"
15
+ }],
16
+ ["path", {
17
+ d: "M12 18v-4",
18
+ key: "q1q25u"
19
+ }],
20
+ ["path", {
21
+ d: "M16 18v-6",
22
+ key: "15y0np"
23
+ }]
24
+ ]);
25
+ //#endregion
26
+ export { t as FileChartColumnIncreasing };