@burdenoff/microfe-assethandler 2026.1111.1 → 2026.1111.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assethandler/components/FinanceRegisterExportDialog.d.ts +6 -0
- package/dist/assethandler/components/FinanceRegisterExportDialog.js +189 -0
- package/dist/assethandler/components/FinanceRegisterExportDialog.js.map +1 -0
- package/dist/assethandler/pages/FinanceFinanceHubPage.js +146 -208
- package/dist/assethandler/pages/FinanceFinanceHubPage.js.map +1 -1
- package/dist/assethandler/utils/financeExport.d.ts +32 -0
- package/dist/assethandler/utils/financeExport.js +85 -0
- package/dist/assethandler/utils/financeExport.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +144 -0
- package/dist/generated/wspace-operations.js +301 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FinanceRegister } from '../utils/financeExport';
|
|
2
|
+
export declare function FinanceRegisterExportDialog({ open, onOpenChange, register, }: {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
register: FinanceRegister;
|
|
6
|
+
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { AssetHandlerExportBudgetsDocument as e, AssetHandlerExportInvoicesDocument as t, AssetHandlerExportTransactionsDocument as n } from "../../generated/wspace-operations.js";
|
|
2
|
+
import { useAssetHandler as r } from "../providers/AssetHandlerProvider.js";
|
|
3
|
+
import { downloadCsv as i } from "../utils/csv.js";
|
|
4
|
+
import { FinanceExportError as a, exportFinanceRegister as o } from "../utils/financeExport.js";
|
|
5
|
+
import { notify as s } from "../utils/toast.js";
|
|
6
|
+
import { useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
7
|
+
import { useApolloClient as f } from "@apollo/client/react";
|
|
8
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
|
+
import { Button as h, ResponsiveDialog as g, ResponsiveDialogContent as _, ResponsiveDialogDescription as v, ResponsiveDialogFooter as y, ResponsiveDialogHeader as b, ResponsiveDialogTitle as x } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
// src/assethandler/components/FinanceRegisterExportDialog.tsx
|
|
11
|
+
function S({ open: S, onOpenChange: C, register: w }) {
|
|
12
|
+
let T = f(), { workspaceId: E, tenantId: D, currentUser: O, authToken: k, workspaceToken: A } = r(), j = O?.id, M = l(() => ({
|
|
13
|
+
workspaceId: E,
|
|
14
|
+
tenantId: D,
|
|
15
|
+
actorId: j,
|
|
16
|
+
authToken: k,
|
|
17
|
+
workspaceToken: A,
|
|
18
|
+
register: w,
|
|
19
|
+
client: T,
|
|
20
|
+
open: S
|
|
21
|
+
}), [
|
|
22
|
+
E,
|
|
23
|
+
D,
|
|
24
|
+
j,
|
|
25
|
+
k,
|
|
26
|
+
A,
|
|
27
|
+
w,
|
|
28
|
+
T,
|
|
29
|
+
S
|
|
30
|
+
]), N = u(M), P = u(null), [F, I] = d(null), L = F?.scope === M && F.running, R = F?.scope === M ? F.count : 0, z = F?.scope === M ? F.failure : null, B = (e) => I((t) => t?.scope === M ? {
|
|
31
|
+
...t,
|
|
32
|
+
running: e
|
|
33
|
+
} : t), V = (e) => I((t) => t?.scope === M ? {
|
|
34
|
+
...t,
|
|
35
|
+
count: e
|
|
36
|
+
} : t), H = (e) => I((t) => t?.scope === M ? {
|
|
37
|
+
...t,
|
|
38
|
+
failure: e
|
|
39
|
+
} : t), U = () => {
|
|
40
|
+
P.current?.abort(), P.current = null, B(!1);
|
|
41
|
+
};
|
|
42
|
+
c(() => (N.current = M, () => {
|
|
43
|
+
P.current?.abort(), P.current = null;
|
|
44
|
+
}), [M, S]);
|
|
45
|
+
let W = async () => {
|
|
46
|
+
if (!S || P.current) return;
|
|
47
|
+
let r = new AbortController();
|
|
48
|
+
P.current = r;
|
|
49
|
+
let c = N.current, l = () => P.current === r && c === N.current;
|
|
50
|
+
I({
|
|
51
|
+
scope: c,
|
|
52
|
+
running: !0,
|
|
53
|
+
count: 0,
|
|
54
|
+
failure: null
|
|
55
|
+
});
|
|
56
|
+
let u = setTimeout(() => r.abort(), 12e4);
|
|
57
|
+
try {
|
|
58
|
+
let c = await o({
|
|
59
|
+
register: w,
|
|
60
|
+
workspaceId: E ?? "",
|
|
61
|
+
signal: r.signal,
|
|
62
|
+
isCurrentScope: l,
|
|
63
|
+
onProgress: (e) => {
|
|
64
|
+
l() && V(e);
|
|
65
|
+
},
|
|
66
|
+
download: i,
|
|
67
|
+
fetchPage: async (r, i) => {
|
|
68
|
+
let o = {
|
|
69
|
+
fetchOptions: { signal: i },
|
|
70
|
+
queryDeduplication: !1
|
|
71
|
+
}, s = { pagination: r };
|
|
72
|
+
if (w === "budgets") {
|
|
73
|
+
let t = await T.query({
|
|
74
|
+
query: e,
|
|
75
|
+
variables: s,
|
|
76
|
+
context: o,
|
|
77
|
+
fetchPolicy: "no-cache",
|
|
78
|
+
errorPolicy: "none"
|
|
79
|
+
});
|
|
80
|
+
if (t.error || !t.data?.budgets) throw new a("page");
|
|
81
|
+
return t.data.budgets.map((e) => ({
|
|
82
|
+
id: e.id,
|
|
83
|
+
workspaceId: e.workspaceId,
|
|
84
|
+
cells: [
|
|
85
|
+
e.name,
|
|
86
|
+
e.department,
|
|
87
|
+
e.category,
|
|
88
|
+
e.period,
|
|
89
|
+
e.allocated,
|
|
90
|
+
e.spent,
|
|
91
|
+
e.remaining,
|
|
92
|
+
e.status.toLowerCase()
|
|
93
|
+
]
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
if (w === "invoices") {
|
|
97
|
+
let e = await T.query({
|
|
98
|
+
query: t,
|
|
99
|
+
variables: s,
|
|
100
|
+
context: o,
|
|
101
|
+
fetchPolicy: "no-cache",
|
|
102
|
+
errorPolicy: "none"
|
|
103
|
+
});
|
|
104
|
+
if (e.error || !e.data?.invoices) throw new a("page");
|
|
105
|
+
return e.data.invoices.map((e) => ({
|
|
106
|
+
id: e.id,
|
|
107
|
+
workspaceId: e.workspaceId,
|
|
108
|
+
cells: [
|
|
109
|
+
e.number,
|
|
110
|
+
e.vendor,
|
|
111
|
+
e.amount,
|
|
112
|
+
e.currency,
|
|
113
|
+
e.issueDate,
|
|
114
|
+
e.dueDate,
|
|
115
|
+
e.status.toLowerCase()
|
|
116
|
+
]
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
let c = await T.query({
|
|
120
|
+
query: n,
|
|
121
|
+
variables: s,
|
|
122
|
+
context: o,
|
|
123
|
+
fetchPolicy: "no-cache",
|
|
124
|
+
errorPolicy: "none"
|
|
125
|
+
});
|
|
126
|
+
if (c.error || !c.data?.transactions) throw new a("page");
|
|
127
|
+
return c.data.transactions.map((e) => ({
|
|
128
|
+
id: e.id,
|
|
129
|
+
workspaceId: e.workspaceId,
|
|
130
|
+
cells: [
|
|
131
|
+
e.id,
|
|
132
|
+
e.type.toLowerCase(),
|
|
133
|
+
e.description,
|
|
134
|
+
e.department,
|
|
135
|
+
e.amount,
|
|
136
|
+
e.currency,
|
|
137
|
+
e.status.toLowerCase(),
|
|
138
|
+
e.occurredAt
|
|
139
|
+
]
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
if (!l()) return;
|
|
144
|
+
c === 0 ? s.warning("Nothing to export", `There are no ${w} to export.`) : s.success("Register exported", `${c} ${w} exported to CSV.`), C(!1);
|
|
145
|
+
} catch (e) {
|
|
146
|
+
if (!l()) return;
|
|
147
|
+
H(e instanceof a && e.reason === "capacity" ? "This register exceeds the browser limit of 10,000 records or 10 MiB. No file was downloaded. Use workspace Exports for a larger export with the permissions required there." : r.signal.aborted ? "Export timed out. No partial file was downloaded. Try again or use workspace Exports." : "The complete register could not be read. No partial file was downloaded. Check your access and connection, then try again.");
|
|
148
|
+
} finally {
|
|
149
|
+
clearTimeout(u), P.current === r && (P.current = null, B(!1));
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
return /* @__PURE__ */ p(g, {
|
|
153
|
+
open: S,
|
|
154
|
+
onOpenChange: (e) => {
|
|
155
|
+
e || U(), C(e);
|
|
156
|
+
},
|
|
157
|
+
children: /* @__PURE__ */ m(_, { children: [
|
|
158
|
+
/* @__PURE__ */ m(b, { children: [/* @__PURE__ */ m(x, { children: [
|
|
159
|
+
"Export entire ",
|
|
160
|
+
w,
|
|
161
|
+
" register"
|
|
162
|
+
] }), /* @__PURE__ */ p(v, { children: "Export all records in this workspace, not just the visible page. List search and status/type filters do not limit this export. Pages are read sequentially; canceling or changing workspace discards the export without downloading a partial file." })] }),
|
|
163
|
+
/* @__PURE__ */ p("p", {
|
|
164
|
+
role: "status",
|
|
165
|
+
"aria-live": "polite",
|
|
166
|
+
children: L ? `Collecting ${R} records…` : "Ready to read the complete register."
|
|
167
|
+
}),
|
|
168
|
+
z && /* @__PURE__ */ p("p", {
|
|
169
|
+
role: "alert",
|
|
170
|
+
className: "text-status-error-text",
|
|
171
|
+
children: z
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ m(y, { children: [/* @__PURE__ */ p(h, {
|
|
174
|
+
variant: "outline",
|
|
175
|
+
onClick: () => {
|
|
176
|
+
U(), C(!1);
|
|
177
|
+
},
|
|
178
|
+
children: "Cancel"
|
|
179
|
+
}), /* @__PURE__ */ p(h, {
|
|
180
|
+
disabled: L || !E,
|
|
181
|
+
onClick: () => void W(),
|
|
182
|
+
children: L ? "Exporting…" : "Download CSV"
|
|
183
|
+
})] })
|
|
184
|
+
] })
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
export { S as FinanceRegisterExportDialog };
|
|
188
|
+
|
|
189
|
+
//# sourceMappingURL=FinanceRegisterExportDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FinanceRegisterExportDialog.js","names":["FinanceRegisterExportDialog","client","useApolloClient","useAssetHandler","actorId","currentUser","scope","useMemo","workspaceId","tenantId","authToken","workspaceToken","register","open","current","useRef","active","progress","setProgress","useState","running","count","failure","setRunning","previous","value","setCount","setFailure","cancel","start","controller","startedScope","isCurrentScope","deadline","exported","exportFinanceRegister","downloadCsv","context","variables","result","AssetHandlerExportBudgetsDocument","FinanceExportError","row","AssetHandlerExportInvoicesDocument","AssetHandlerExportTransactionsDocument","notify","onOpenChange","error","ResponsiveDialog","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","ResponsiveDialogDescription","ResponsiveDialogFooter","Button"],"sources":["../../../src/assethandler/components/FinanceRegisterExportDialog.tsx"],"sourcesContent":["import { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useApolloClient } from '@apollo/client/react';\nimport {\n Button,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n} from '@burdenoff/fe-libs/ui';\nimport {\n AssetHandlerExportBudgetsDocument,\n AssetHandlerExportInvoicesDocument,\n AssetHandlerExportTransactionsDocument,\n type AssetHandlerExportBudgetsQuery,\n type AssetHandlerExportInvoicesQuery,\n type AssetHandlerExportTransactionsQuery,\n} from '../../generated/wspace-operations';\nimport { useAssetHandler } from '../providers/AssetHandlerProvider';\nimport { downloadCsv } from '../utils/csv';\nimport {\n exportFinanceRegister,\n FinanceExportError,\n type FinanceRegister,\n} from '../utils/financeExport';\nimport { notify } from '../utils/toast';\n\nexport function FinanceRegisterExportDialog({\n open,\n onOpenChange,\n register,\n}: {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n register: FinanceRegister;\n}) {\n const client = useApolloClient();\n const { workspaceId, tenantId, currentUser, authToken, workspaceToken } = useAssetHandler();\n const actorId = currentUser?.id;\n const scope = useMemo(\n () => ({ workspaceId, tenantId, actorId, authToken, workspaceToken, register, client, open }),\n [workspaceId, tenantId, actorId, authToken, workspaceToken, register, client, open]\n );\n const current = useRef(scope);\n const active = useRef<AbortController | null>(null);\n const [progress, setProgress] = useState<{\n scope: typeof scope;\n running: boolean;\n count: number;\n failure: string | null;\n } | null>(null);\n const running = progress?.scope === scope && progress.running;\n const count = progress?.scope === scope ? progress.count : 0;\n const failure = progress?.scope === scope ? progress.failure : null;\n const setRunning = (value: boolean) =>\n setProgress((previous) =>\n previous?.scope === scope ? { ...previous, running: value } : previous\n );\n const setCount = (value: number) =>\n setProgress((previous) =>\n previous?.scope === scope ? { ...previous, count: value } : previous\n );\n const setFailure = (value: string) =>\n setProgress((previous) =>\n previous?.scope === scope ? { ...previous, failure: value } : previous\n );\n\n const cancel = () => {\n active.current?.abort();\n active.current = null;\n setRunning(false);\n };\n useLayoutEffect(() => {\n // Changing actor, workspace, tenant, credentials, client or tab invalidates\n // every in-flight result before it can reach the download callback.\n current.current = scope;\n return () => {\n active.current?.abort();\n active.current = null;\n };\n }, [scope, open]);\n\n const start = async () => {\n if (!open || active.current) return;\n const controller = new AbortController();\n active.current = controller;\n const startedScope = current.current;\n const isCurrentScope = () => active.current === controller && startedScope === current.current;\n setProgress({ scope: startedScope, running: true, count: 0, failure: null });\n // A whole-operation deadline also bounds a server that never settles.\n const deadline = setTimeout(() => controller.abort(), 120_000);\n try {\n const exported = await exportFinanceRegister({\n register,\n workspaceId: workspaceId ?? '',\n signal: controller.signal,\n isCurrentScope,\n onProgress: (value) => {\n if (isCurrentScope()) setCount(value);\n },\n download: downloadCsv,\n fetchPage: async (pagination, signal) => {\n // A replacement run must not reuse an aborted query or another scope's\n // identical operation through Apollo's in-flight deduplication.\n const context = { fetchOptions: { signal }, queryDeduplication: false };\n const variables = { pagination };\n if (register === 'budgets') {\n const result = await client.query<AssetHandlerExportBudgetsQuery>({\n query: AssetHandlerExportBudgetsDocument,\n variables,\n context,\n fetchPolicy: 'no-cache',\n errorPolicy: 'none',\n });\n if (result.error || !result.data?.budgets) throw new FinanceExportError('page');\n return result.data.budgets.map((row) => ({\n id: row.id,\n workspaceId: row.workspaceId,\n cells: [\n row.name,\n row.department,\n row.category,\n row.period,\n row.allocated,\n row.spent,\n row.remaining,\n row.status.toLowerCase(),\n ],\n }));\n }\n if (register === 'invoices') {\n const result = await client.query<AssetHandlerExportInvoicesQuery>({\n query: AssetHandlerExportInvoicesDocument,\n variables,\n context,\n fetchPolicy: 'no-cache',\n errorPolicy: 'none',\n });\n if (result.error || !result.data?.invoices) throw new FinanceExportError('page');\n return result.data.invoices.map((row) => ({\n id: row.id,\n workspaceId: row.workspaceId,\n cells: [\n row.number,\n row.vendor,\n row.amount,\n row.currency,\n row.issueDate,\n row.dueDate,\n row.status.toLowerCase(),\n ],\n }));\n }\n const result = await client.query<AssetHandlerExportTransactionsQuery>({\n query: AssetHandlerExportTransactionsDocument,\n variables,\n context,\n fetchPolicy: 'no-cache',\n errorPolicy: 'none',\n });\n if (result.error || !result.data?.transactions) throw new FinanceExportError('page');\n return result.data.transactions.map((row) => ({\n id: row.id,\n workspaceId: row.workspaceId,\n cells: [\n row.id,\n row.type.toLowerCase(),\n row.description,\n row.department,\n row.amount,\n row.currency,\n row.status.toLowerCase(),\n row.occurredAt,\n ],\n }));\n },\n });\n if (!isCurrentScope()) return;\n if (exported === 0)\n notify.warning('Nothing to export', `There are no ${register} to export.`);\n else notify.success('Register exported', `${exported} ${register} exported to CSV.`);\n onOpenChange(false);\n } catch (error) {\n if (!isCurrentScope()) return;\n setFailure(\n error instanceof FinanceExportError && error.reason === 'capacity'\n ? 'This register exceeds the browser limit of 10,000 records or 10 MiB. No file was downloaded. Use workspace Exports for a larger export with the permissions required there.'\n : controller.signal.aborted\n ? 'Export timed out. No partial file was downloaded. Try again or use workspace Exports.'\n : 'The complete register could not be read. No partial file was downloaded. Check your access and connection, then try again.'\n );\n } finally {\n clearTimeout(deadline);\n if (active.current === controller) {\n active.current = null;\n setRunning(false);\n }\n }\n };\n\n return (\n <ResponsiveDialog\n open={open}\n onOpenChange={(value) => {\n if (!value) cancel();\n onOpenChange(value);\n }}\n >\n <ResponsiveDialogContent>\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>Export entire {register} register</ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n Export all records in this workspace, not just the visible page. List search and\n status/type filters do not limit this export. Pages are read sequentially; canceling or\n changing workspace discards the export without downloading a partial file.\n </ResponsiveDialogDescription>\n </ResponsiveDialogHeader>\n <p role=\"status\" aria-live=\"polite\">\n {running ? `Collecting ${count} records…` : 'Ready to read the complete register.'}\n </p>\n {failure && (\n <p role=\"alert\" className=\"text-status-error-text\">\n {failure}\n </p>\n )}\n <ResponsiveDialogFooter>\n <Button\n variant=\"outline\"\n onClick={() => {\n cancel();\n onOpenChange(false);\n }}\n >\n Cancel\n </Button>\n <Button disabled={running || !workspaceId} onClick={() => void start()}>\n {running ? 'Exporting…' : 'Download CSV'}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgBA,EAA4B,EAC1C,SACA,iBACA,eAKC;CACD,IAAMC,IAASC,EAAgB,GACzB,EAAE,gBAAa,aAAU,gBAAa,cAAW,sBAAmBC,EAAgB,GACpFC,IAAUC,GAAa,IACvBC,IAAQC,SACL;EAAE;EAAa;EAAU;EAAS;EAAW;EAAgB;EAAU;EAAQ;CAAK,IAC3F;EAACC;EAAaC;EAAUL;EAASM;EAAWC;EAAgBC;EAAUX;EAAQY;CAAI,CACpF,GACMC,IAAUC,EAAOT,CAAK,GACtBU,IAASD,EAA+B,IAAI,GAC5C,CAACE,GAAUC,KAAeC,EAKtB,IAAI,GACRC,IAAUH,GAAU,UAAUX,KAASW,EAAS,SAChDI,IAAQJ,GAAU,UAAUX,IAAQW,EAAS,QAAQ,GACrDK,IAAUL,GAAU,UAAUX,IAAQW,EAAS,UAAU,MACzDM,KAAc,MAClBL,GAAa,MACXM,GAAU,UAAUlB,IAAQ;EAAE,GAAGkB;EAAU,SAASC;CAAM,IAAID,CAChE,GACIE,KAAY,MAChBR,GAAa,MACXM,GAAU,UAAUlB,I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