@booki-aui/react 0.0.0-stage → 0.2.0
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/CHANGELOG.md +122 -0
- package/LICENSE +21 -0
- package/README.md +16 -2
- package/dist/access.d.ts +43 -0
- package/dist/access.js +15 -0
- package/dist/access.js.map +1 -0
- package/dist/account-picker.d.ts +40 -0
- package/dist/account-picker.js +25 -0
- package/dist/account-picker.js.map +1 -0
- package/dist/accounting-period-select.d.ts +34 -0
- package/dist/accounting-period-select.js +23 -0
- package/dist/accounting-period-select.js.map +1 -0
- package/dist/activity-timeline.d.ts +37 -0
- package/dist/activity-timeline.js +19 -0
- package/dist/activity-timeline.js.map +1 -0
- package/dist/aged-balances.d.ts +62 -0
- package/dist/aged-balances.js +31 -0
- package/dist/aged-balances.js.map +1 -0
- package/dist/agent-cursor.d.ts +34 -0
- package/dist/agent-cursor.js +14 -0
- package/dist/agent-cursor.js.map +1 -0
- package/dist/agent-presence.d.ts +110 -0
- package/dist/agent-presence.js +15 -0
- package/dist/agent-presence.js.map +1 -0
- package/dist/aging-chart.d.ts +41 -0
- package/dist/aging-chart.js +19 -0
- package/dist/aging-chart.js.map +1 -0
- package/dist/amount-field.d.ts +46 -0
- package/dist/amount-field.js +19 -0
- package/dist/amount-field.js.map +1 -0
- package/dist/amount-input.d.ts +18 -0
- package/dist/amount-input.js +12 -0
- package/dist/amount-input.js.map +1 -0
- package/dist/approval-chain.d.ts +36 -0
- package/dist/approval-chain.js +22 -0
- package/dist/approval-chain.js.map +1 -0
- package/dist/approval-gate.d.ts +19 -0
- package/dist/approval-gate.js +10 -0
- package/dist/approval-gate.js.map +1 -0
- package/dist/attestation-status.d.ts +31 -0
- package/dist/attestation-status.js +22 -0
- package/dist/attestation-status.js.map +1 -0
- package/dist/audit-findings.d.ts +40 -0
- package/dist/audit-findings.js +28 -0
- package/dist/audit-findings.js.map +1 -0
- package/dist/audit-trail.d.ts +22 -0
- package/dist/audit-trail.js +10 -0
- package/dist/audit-trail.js.map +1 -0
- package/dist/audit-workpaper.d.ts +56 -0
- package/dist/audit-workpaper.js +35 -0
- package/dist/audit-workpaper.js.map +1 -0
- package/dist/bank-account-input.d.ts +36 -0
- package/dist/bank-account-input.js +22 -0
- package/dist/bank-account-input.js.map +1 -0
- package/dist/bank-reconciliation.d.ts +38 -0
- package/dist/bank-reconciliation.js +20 -0
- package/dist/bank-reconciliation.js.map +1 -0
- package/dist/bar-chart.d.ts +38 -0
- package/dist/bar-chart.js +19 -0
- package/dist/bar-chart.js.map +1 -0
- package/dist/booki-agent.d.ts +153 -0
- package/dist/booki-agent.js +27 -0
- package/dist/booki-agent.js.map +1 -0
- package/dist/cashflow-waterfall.d.ts +36 -0
- package/dist/cashflow-waterfall.js +17 -0
- package/dist/cashflow-waterfall.js.map +1 -0
- package/dist/change-details-CWpEgc80.d.ts +14 -0
- package/dist/chunk-2HM7YSBC.js +92 -0
- package/dist/chunk-2HM7YSBC.js.map +1 -0
- package/dist/chunk-35QKOOAI.js +27 -0
- package/dist/chunk-35QKOOAI.js.map +1 -0
- package/dist/chunk-37GDU76M.js +86 -0
- package/dist/chunk-37GDU76M.js.map +1 -0
- package/dist/chunk-4EVVT6ME.js +136 -0
- package/dist/chunk-4EVVT6ME.js.map +1 -0
- package/dist/chunk-4GQUOBOG.js +132 -0
- package/dist/chunk-4GQUOBOG.js.map +1 -0
- package/dist/chunk-4KWEZTO5.js +86 -0
- package/dist/chunk-4KWEZTO5.js.map +1 -0
- package/dist/chunk-4WC76FUE.js +242 -0
- package/dist/chunk-4WC76FUE.js.map +1 -0
- package/dist/chunk-62G3T2AA.js +230 -0
- package/dist/chunk-62G3T2AA.js.map +1 -0
- package/dist/chunk-663UXACN.js +334 -0
- package/dist/chunk-663UXACN.js.map +1 -0
- package/dist/chunk-6CVPNV7N.js +106 -0
- package/dist/chunk-6CVPNV7N.js.map +1 -0
- package/dist/chunk-6HWFMC7V.js +140 -0
- package/dist/chunk-6HWFMC7V.js.map +1 -0
- package/dist/chunk-7MYFKLPB.js +301 -0
- package/dist/chunk-7MYFKLPB.js.map +1 -0
- package/dist/chunk-7YTOVA5F.js +312 -0
- package/dist/chunk-7YTOVA5F.js.map +1 -0
- package/dist/chunk-AIGQPM4Y.js +311 -0
- package/dist/chunk-AIGQPM4Y.js.map +1 -0
- package/dist/chunk-AKC6N4QO.js +414 -0
- package/dist/chunk-AKC6N4QO.js.map +1 -0
- package/dist/chunk-BZIOOU4I.js +421 -0
- package/dist/chunk-BZIOOU4I.js.map +1 -0
- package/dist/chunk-CDTDN4LY.js +212 -0
- package/dist/chunk-CDTDN4LY.js.map +1 -0
- package/dist/chunk-EDWQSKY7.js +161 -0
- package/dist/chunk-EDWQSKY7.js.map +1 -0
- package/dist/chunk-EKIWL37F.js +488 -0
- package/dist/chunk-EKIWL37F.js.map +1 -0
- package/dist/chunk-F3C77WLR.js +116 -0
- package/dist/chunk-F3C77WLR.js.map +1 -0
- package/dist/chunk-FBV7BFEQ.js +84 -0
- package/dist/chunk-FBV7BFEQ.js.map +1 -0
- package/dist/chunk-GVP2N3K6.js +89 -0
- package/dist/chunk-GVP2N3K6.js.map +1 -0
- package/dist/chunk-HKYEHBQT.js +19 -0
- package/dist/chunk-HKYEHBQT.js.map +1 -0
- package/dist/chunk-HQYIFZZT.js +169 -0
- package/dist/chunk-HQYIFZZT.js.map +1 -0
- package/dist/chunk-HT6HGOLM.js +151 -0
- package/dist/chunk-HT6HGOLM.js.map +1 -0
- package/dist/chunk-ISPUO3AQ.js +244 -0
- package/dist/chunk-ISPUO3AQ.js.map +1 -0
- package/dist/chunk-JPUVGWLO.js +207 -0
- package/dist/chunk-JPUVGWLO.js.map +1 -0
- package/dist/chunk-JWFGUI7A.js +73 -0
- package/dist/chunk-JWFGUI7A.js.map +1 -0
- package/dist/chunk-K72VT6RJ.js +57 -0
- package/dist/chunk-K72VT6RJ.js.map +1 -0
- package/dist/chunk-KLDUGI7L.js +150 -0
- package/dist/chunk-KLDUGI7L.js.map +1 -0
- package/dist/chunk-M2WLQIFE.js +40 -0
- package/dist/chunk-M2WLQIFE.js.map +1 -0
- package/dist/chunk-M3MCIKF2.js +143 -0
- package/dist/chunk-M3MCIKF2.js.map +1 -0
- package/dist/chunk-MBLQSZHE.js +77 -0
- package/dist/chunk-MBLQSZHE.js.map +1 -0
- package/dist/chunk-N7GIVDUU.js +191 -0
- package/dist/chunk-N7GIVDUU.js.map +1 -0
- package/dist/chunk-NMHTPP6I.js +62 -0
- package/dist/chunk-NMHTPP6I.js.map +1 -0
- package/dist/chunk-NNP6GNEW.js +65 -0
- package/dist/chunk-NNP6GNEW.js.map +1 -0
- package/dist/chunk-OTD7VUEC.js +35 -0
- package/dist/chunk-OTD7VUEC.js.map +1 -0
- package/dist/chunk-OXHKA3UZ.js +30 -0
- package/dist/chunk-OXHKA3UZ.js.map +1 -0
- package/dist/chunk-OYERLEER.js +21 -0
- package/dist/chunk-OYERLEER.js.map +1 -0
- package/dist/chunk-PFY3VJ2T.js +231 -0
- package/dist/chunk-PFY3VJ2T.js.map +1 -0
- package/dist/chunk-PUMSFFEU.js +228 -0
- package/dist/chunk-PUMSFFEU.js.map +1 -0
- package/dist/chunk-QE7KUQOI.js +84 -0
- package/dist/chunk-QE7KUQOI.js.map +1 -0
- package/dist/chunk-QGT7VI6I.js +35 -0
- package/dist/chunk-QGT7VI6I.js.map +1 -0
- package/dist/chunk-QGYS5HS3.js +214 -0
- package/dist/chunk-QGYS5HS3.js.map +1 -0
- package/dist/chunk-QPSBRSBH.js +167 -0
- package/dist/chunk-QPSBRSBH.js.map +1 -0
- package/dist/chunk-ROXGVKR2.js +59 -0
- package/dist/chunk-ROXGVKR2.js.map +1 -0
- package/dist/chunk-RPONJDFZ.js +310 -0
- package/dist/chunk-RPONJDFZ.js.map +1 -0
- package/dist/chunk-RTCKV4H2.js +65 -0
- package/dist/chunk-RTCKV4H2.js.map +1 -0
- package/dist/chunk-SHZFZRHV.js +259 -0
- package/dist/chunk-SHZFZRHV.js.map +1 -0
- package/dist/chunk-SOXPKIQK.js +91 -0
- package/dist/chunk-SOXPKIQK.js.map +1 -0
- package/dist/chunk-SR2HEE4U.js +76 -0
- package/dist/chunk-SR2HEE4U.js.map +1 -0
- package/dist/chunk-SX3U6DRW.js +462 -0
- package/dist/chunk-SX3U6DRW.js.map +1 -0
- package/dist/chunk-T4U2CT35.js +175 -0
- package/dist/chunk-T4U2CT35.js.map +1 -0
- package/dist/chunk-TSX6BD72.js +251 -0
- package/dist/chunk-TSX6BD72.js.map +1 -0
- package/dist/chunk-U6PR3V2Q.js +123 -0
- package/dist/chunk-U6PR3V2Q.js.map +1 -0
- package/dist/chunk-U7NPK4WO.js +135 -0
- package/dist/chunk-U7NPK4WO.js.map +1 -0
- package/dist/chunk-W6TKXS75.js +55 -0
- package/dist/chunk-W6TKXS75.js.map +1 -0
- package/dist/chunk-WDME4U42.js +14 -0
- package/dist/chunk-WDME4U42.js.map +1 -0
- package/dist/chunk-WS2YJSNS.js +62 -0
- package/dist/chunk-WS2YJSNS.js.map +1 -0
- package/dist/chunk-Y5EYY6WJ.js +174 -0
- package/dist/chunk-Y5EYY6WJ.js.map +1 -0
- package/dist/chunk-YBMO3W5O.js +191 -0
- package/dist/chunk-YBMO3W5O.js.map +1 -0
- package/dist/chunk-YOOWFGCU.js +90 -0
- package/dist/chunk-YOOWFGCU.js.map +1 -0
- package/dist/chunk-ZKNVWQDU.js +230 -0
- package/dist/chunk-ZKNVWQDU.js.map +1 -0
- package/dist/chunk-ZYLWSGWQ.js +29 -0
- package/dist/chunk-ZYLWSGWQ.js.map +1 -0
- package/dist/chunk-ZYPW7GCI.js +82 -0
- package/dist/chunk-ZYPW7GCI.js.map +1 -0
- package/dist/client-requests.d.ts +40 -0
- package/dist/client-requests.js +25 -0
- package/dist/client-requests.js.map +1 -0
- package/dist/close-checklist.d.ts +34 -0
- package/dist/close-checklist.js +22 -0
- package/dist/close-checklist.js.map +1 -0
- package/dist/confirm-dialog.d.ts +43 -0
- package/dist/confirm-dialog.js +10 -0
- package/dist/confirm-dialog.js.map +1 -0
- package/dist/country-toggle.d.ts +16 -0
- package/dist/country-toggle.js +10 -0
- package/dist/country-toggle.js.map +1 -0
- package/dist/currency-select.d.ts +32 -0
- package/dist/currency-select.js +23 -0
- package/dist/currency-select.js.map +1 -0
- package/dist/data-table.d.ts +77 -0
- package/dist/data-table.js +30 -0
- package/dist/data-table.js.map +1 -0
- package/dist/deal-pipeline.d.ts +46 -0
- package/dist/deal-pipeline.js +25 -0
- package/dist/deal-pipeline.js.map +1 -0
- package/dist/document-signoff.d.ts +45 -0
- package/dist/document-signoff.js +21 -0
- package/dist/document-signoff.js.map +1 -0
- package/dist/evidence-list.d.ts +35 -0
- package/dist/evidence-list.js +21 -0
- package/dist/evidence-list.js.map +1 -0
- package/dist/exception-banner.d.ts +15 -0
- package/dist/exception-banner.js +10 -0
- package/dist/exception-banner.js.map +1 -0
- package/dist/expense-claim.d.ts +43 -0
- package/dist/expense-claim.js +31 -0
- package/dist/expense-claim.js.map +1 -0
- package/dist/financial-date-field.d.ts +27 -0
- package/dist/financial-date-field.js +17 -0
- package/dist/financial-date-field.js.map +1 -0
- package/dist/fixed-asset-register.d.ts +59 -0
- package/dist/fixed-asset-register.js +31 -0
- package/dist/fixed-asset-register.js.map +1 -0
- package/dist/forecast-chart.d.ts +38 -0
- package/dist/forecast-chart.js +19 -0
- package/dist/forecast-chart.js.map +1 -0
- package/dist/form-props-Ct7zeZBH.d.ts +25 -0
- package/dist/funnel-chart.d.ts +27 -0
- package/dist/funnel-chart.js +17 -0
- package/dist/funnel-chart.js.map +1 -0
- package/dist/iban-input.d.ts +27 -0
- package/dist/iban-input.js +16 -0
- package/dist/iban-input.js.map +1 -0
- package/dist/index.d.ts +644 -0
- package/dist/index.js +1082 -0
- package/dist/index.js.map +1 -0
- package/dist/invoice-editor.d.ts +38 -0
- package/dist/invoice-editor.js +26 -0
- package/dist/invoice-editor.js.map +1 -0
- package/dist/invoice-number-input.d.ts +25 -0
- package/dist/invoice-number-input.js +17 -0
- package/dist/invoice-number-input.js.map +1 -0
- package/dist/kpi-stat.d.ts +34 -0
- package/dist/kpi-stat.js +15 -0
- package/dist/kpi-stat.js.map +1 -0
- package/dist/ledger-table.d.ts +85 -0
- package/dist/ledger-table.js +41 -0
- package/dist/ledger-table.js.map +1 -0
- package/dist/locale.d.ts +22 -0
- package/dist/locale.js +13 -0
- package/dist/locale.js.map +1 -0
- package/dist/money-amount.d.ts +15 -0
- package/dist/money-amount.js +10 -0
- package/dist/money-amount.js.map +1 -0
- package/dist/organization-number-input.d.ts +25 -0
- package/dist/organization-number-input.js +17 -0
- package/dist/organization-number-input.js.map +1 -0
- package/dist/payment-batch.d.ts +58 -0
- package/dist/payment-batch.js +31 -0
- package/dist/payment-batch.js.map +1 -0
- package/dist/payment-confirm.d.ts +19 -0
- package/dist/payment-confirm.js +11 -0
- package/dist/payment-confirm.js.map +1 -0
- package/dist/payment-reference-input.d.ts +27 -0
- package/dist/payment-reference-input.js +17 -0
- package/dist/payment-reference-input.js.map +1 -0
- package/dist/period-lock.d.ts +28 -0
- package/dist/period-lock.js +18 -0
- package/dist/period-lock.js.map +1 -0
- package/dist/recurring-revenue.d.ts +37 -0
- package/dist/recurring-revenue.js +18 -0
- package/dist/recurring-revenue.js.map +1 -0
- package/dist/sca-prompt.d.ts +16 -0
- package/dist/sca-prompt.js +10 -0
- package/dist/sca-prompt.js.map +1 -0
- package/dist/sheet-stack.d.ts +34 -0
- package/dist/sheet-stack.js +20 -0
- package/dist/sheet-stack.js.map +1 -0
- package/dist/stage-duration.d.ts +33 -0
- package/dist/stage-duration.js +16 -0
- package/dist/stage-duration.js.map +1 -0
- package/dist/supplier-invoice-inbox.d.ts +66 -0
- package/dist/supplier-invoice-inbox.js +38 -0
- package/dist/supplier-invoice-inbox.js.map +1 -0
- package/dist/tax-code-select.d.ts +33 -0
- package/dist/tax-code-select.js +23 -0
- package/dist/tax-code-select.js.map +1 -0
- package/dist/text-link.d.ts +33 -0
- package/dist/text-link.js +13 -0
- package/dist/text-link.js.map +1 -0
- package/dist/toasts.d.ts +53 -0
- package/dist/toasts.js +17 -0
- package/dist/toasts.js.map +1 -0
- package/dist/trend-chart.d.ts +43 -0
- package/dist/trend-chart.js +19 -0
- package/dist/trend-chart.js.map +1 -0
- package/dist/vat-return.d.ts +54 -0
- package/dist/vat-return.js +23 -0
- package/dist/vat-return.js.map +1 -0
- package/dist/voucher-composer.d.ts +69 -0
- package/dist/voucher-composer.js +15 -0
- package/dist/voucher-composer.js.map +1 -0
- package/dist/voucher-lines.d.ts +11 -0
- package/dist/voucher-lines.js +10 -0
- package/dist/voucher-lines.js.map +1 -0
- package/docs/llms.txt +214 -0
- package/package.json +308 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Parts } from '@ui-sdk/react/primitive';
|
|
3
|
+
import { ChartRange } from '@booki-aui/primitives/chart-math';
|
|
4
|
+
export { ChartRange, PeriodValue } from '@booki-aui/primitives/chart-math';
|
|
5
|
+
import { TrendSeries, Details, trendChart } from '@booki-aui/primitives/trend-chart';
|
|
6
|
+
export { TrendDrilled, TrendSeries, TrendSeriesSnapshot, trendChart } from '@booki-aui/primitives/trend-chart';
|
|
7
|
+
|
|
8
|
+
declare const TAGS: {
|
|
9
|
+
readonly root: "div";
|
|
10
|
+
readonly range: "button";
|
|
11
|
+
readonly point: "button";
|
|
12
|
+
};
|
|
13
|
+
declare const parts: Parts<typeof trendChart, typeof TAGS>;
|
|
14
|
+
declare const TrendChartRoot: (typeof parts)["Root"];
|
|
15
|
+
declare const TrendChartRange: (typeof parts)["Range"];
|
|
16
|
+
declare const TrendChartPoint: (typeof parts)["Point"];
|
|
17
|
+
type TrendChartProps = {
|
|
18
|
+
series: TrendSeries[];
|
|
19
|
+
/** Defaults to the locale profile's currency. */
|
|
20
|
+
currency?: string;
|
|
21
|
+
range?: ChartRange;
|
|
22
|
+
/** Defaults to `12m`. */
|
|
23
|
+
defaultRange?: ChartRange;
|
|
24
|
+
onRangeChange?: (range: ChartRange, details: Details) => void;
|
|
25
|
+
drill?: string | null;
|
|
26
|
+
defaultDrill?: string | null;
|
|
27
|
+
/** A month was drilled into, by a person's click or an agent's `drill`. */
|
|
28
|
+
onDrill?: (period: string, details: Details) => void;
|
|
29
|
+
/** Most points per series an agent's snapshot carries. Defaults to 36. */
|
|
30
|
+
snapshotPoints?: number;
|
|
31
|
+
/** Heading and accessible name. */
|
|
32
|
+
title?: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
"aria-label"?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Composed trend chart: range buttons, a line per series on one axis with
|
|
38
|
+
* direct end labels, a legend for two or more series, a tooltip on hover or
|
|
39
|
+
* focus, and the same figures as a table.
|
|
40
|
+
*/
|
|
41
|
+
declare function TrendChart({ series, currency, range, defaultRange, onRangeChange, drill, defaultDrill, onDrill, snapshotPoints, title, className, "aria-label": ariaLabel, }: TrendChartProps): react.JSX.Element;
|
|
42
|
+
|
|
43
|
+
export { TrendChart, TrendChartPoint, type TrendChartProps, TrendChartRange, TrendChartRoot };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
TrendChart,
|
|
4
|
+
TrendChartPoint,
|
|
5
|
+
TrendChartRange,
|
|
6
|
+
TrendChartRoot,
|
|
7
|
+
trendChart
|
|
8
|
+
} from "./chunk-663UXACN.js";
|
|
9
|
+
import "./chunk-WDME4U42.js";
|
|
10
|
+
import "./chunk-GVP2N3K6.js";
|
|
11
|
+
import "./chunk-HKYEHBQT.js";
|
|
12
|
+
export {
|
|
13
|
+
TrendChart,
|
|
14
|
+
TrendChartPoint,
|
|
15
|
+
TrendChartRange,
|
|
16
|
+
TrendChartRoot,
|
|
17
|
+
trendChart
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=trend-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { B as BookiChangeDetails } from './change-details-CWpEgc80.js';
|
|
3
|
+
import { VatReturnSchema, VatTransaction, VatReturnFiling } from '@booki-aui/core/vat-return';
|
|
4
|
+
export { VatReturnFiling, VatReturnSchema, VatReturnStatus, VatTransaction } from '@booki-aui/core/vat-return';
|
|
5
|
+
import { Parts } from '@ui-sdk/react/primitive';
|
|
6
|
+
import { VatReturnSubmission, vatReturn } from '@booki-aui/primitives/vat-return';
|
|
7
|
+
export { VatBoxSummary, VatReturnSubmission, vatReturn } from '@booki-aui/primitives/vat-return';
|
|
8
|
+
|
|
9
|
+
declare const TAGS: {
|
|
10
|
+
readonly root: "div";
|
|
11
|
+
readonly box: "button";
|
|
12
|
+
readonly back: "button";
|
|
13
|
+
readonly ready: "button";
|
|
14
|
+
readonly submit: "button";
|
|
15
|
+
};
|
|
16
|
+
declare const parts: Parts<typeof vatReturn, typeof TAGS>;
|
|
17
|
+
declare const VatReturnRoot: (typeof parts)["Root"];
|
|
18
|
+
declare const VatReturnBoxButton: (typeof parts)["Box"];
|
|
19
|
+
declare const VatReturnBack: (typeof parts)["Back"];
|
|
20
|
+
declare const VatReturnReady: (typeof parts)["Ready"];
|
|
21
|
+
declare const VatReturnSubmit: (typeof parts)["Submit"];
|
|
22
|
+
type VatReturnProps = {
|
|
23
|
+
/** The boxes of the return. Supply your own; the exported examples are for demos. */
|
|
24
|
+
schema: VatReturnSchema;
|
|
25
|
+
transactions: VatTransaction[];
|
|
26
|
+
/** A period code: `2026`, `2026-03` or `2026-T2`. */
|
|
27
|
+
period: string;
|
|
28
|
+
/** Id of the person at the keyboard. */
|
|
29
|
+
actor?: string;
|
|
30
|
+
/** When true, whoever marked the return ready cannot also submit it. */
|
|
31
|
+
requireSecondPerson?: boolean;
|
|
32
|
+
filing?: VatReturnFiling;
|
|
33
|
+
defaultFiling?: VatReturnFiling;
|
|
34
|
+
onFilingChange?: (filing: VatReturnFiling, details: BookiChangeDetails) => void;
|
|
35
|
+
box?: string | null;
|
|
36
|
+
defaultBox?: string | null;
|
|
37
|
+
onBoxChange?: (box: string | null, details: BookiChangeDetails) => void;
|
|
38
|
+
/** Most rows an agent's snapshot carries. Defaults to 50. */
|
|
39
|
+
snapshotRows?: number;
|
|
40
|
+
/** A person submitted the return: file it. The library only changes the status. */
|
|
41
|
+
onSubmit?: (submission: VatReturnSubmission) => void;
|
|
42
|
+
/** Show a person's name for an id. */
|
|
43
|
+
nameOf?: (id: string) => string;
|
|
44
|
+
className?: string;
|
|
45
|
+
"aria-label"?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Composed return: status and the amount to pay, each box with its amount,
|
|
49
|
+
* the vouchers behind a box, what blocks the return, and the two buttons a
|
|
50
|
+
* person presses.
|
|
51
|
+
*/
|
|
52
|
+
declare function VatReturn({ schema, transactions, period, actor, requireSecondPerson, filing, defaultFiling, onFilingChange, box, defaultBox, onBoxChange, snapshotRows, onSubmit, nameOf, className, "aria-label": ariaLabel, }: VatReturnProps): react.JSX.Element;
|
|
53
|
+
|
|
54
|
+
export { VatReturn, VatReturnBack, VatReturnBoxButton, type VatReturnProps, VatReturnReady, VatReturnRoot, VatReturnSubmit };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
VatReturn,
|
|
4
|
+
VatReturnBack,
|
|
5
|
+
VatReturnBoxButton,
|
|
6
|
+
VatReturnReady,
|
|
7
|
+
VatReturnRoot,
|
|
8
|
+
VatReturnSubmit,
|
|
9
|
+
vatReturn
|
|
10
|
+
} from "./chunk-CDTDN4LY.js";
|
|
11
|
+
import "./chunk-K72VT6RJ.js";
|
|
12
|
+
import "./chunk-GVP2N3K6.js";
|
|
13
|
+
import "./chunk-HKYEHBQT.js";
|
|
14
|
+
export {
|
|
15
|
+
VatReturn,
|
|
16
|
+
VatReturnBack,
|
|
17
|
+
VatReturnBoxButton,
|
|
18
|
+
VatReturnReady,
|
|
19
|
+
VatReturnRoot,
|
|
20
|
+
VatReturnSubmit,
|
|
21
|
+
vatReturn
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=vat-return.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TaxCode } from '@booki-aui/core/locale';
|
|
4
|
+
import { VoucherLine, AccountOption, DimensionOption, DimensionDefinition } from '@booki-aui/core/voucher';
|
|
5
|
+
export { AccountOption, DimensionOption, VoucherLine } from '@booki-aui/core/voucher';
|
|
6
|
+
import { PeriodState } from '@booki-aui/core/period-lock';
|
|
7
|
+
import { Parts } from '@ui-sdk/react/primitive';
|
|
8
|
+
import { voucherComposer } from '@booki-aui/primitives/voucher-composer';
|
|
9
|
+
export { RowError as VoucherRowError, voucherComposer } from '@booki-aui/primitives/voucher-composer';
|
|
10
|
+
|
|
11
|
+
declare const TAGS: {
|
|
12
|
+
readonly root: "div";
|
|
13
|
+
readonly accountSelect: "select";
|
|
14
|
+
readonly accountInput: "input";
|
|
15
|
+
readonly nameInput: "input";
|
|
16
|
+
readonly vat: "select";
|
|
17
|
+
readonly department: "select";
|
|
18
|
+
readonly project: "select";
|
|
19
|
+
readonly dimension: "select";
|
|
20
|
+
readonly debit: "input";
|
|
21
|
+
readonly credit: "input";
|
|
22
|
+
readonly remove: "button";
|
|
23
|
+
readonly newAccountSelect: "select";
|
|
24
|
+
readonly newAccountInput: "input";
|
|
25
|
+
readonly add: "button";
|
|
26
|
+
};
|
|
27
|
+
declare const parts: Parts<typeof voucherComposer, typeof TAGS>;
|
|
28
|
+
declare const VoucherComposerRoot: (typeof parts)["Root"];
|
|
29
|
+
type VoucherComposerProps = {
|
|
30
|
+
lines?: VoucherLine[];
|
|
31
|
+
defaultLines?: VoucherLine[];
|
|
32
|
+
/**
|
|
33
|
+
* Optional closed chart of accounts. When given, `addLine` / `setAccount`
|
|
34
|
+
* reject account numbers not in it and take the name from the chart.
|
|
35
|
+
*/
|
|
36
|
+
accounts?: AccountOption[];
|
|
37
|
+
/** VAT codes lines may carry. Defaults to the locale profile's codes. */
|
|
38
|
+
taxCodes?: TaxCode[];
|
|
39
|
+
/** Closed list of departments. */
|
|
40
|
+
departments?: DimensionOption[];
|
|
41
|
+
/** Closed list of projects. */
|
|
42
|
+
projects?: DimensionOption[];
|
|
43
|
+
/** Further dimensions and their closed lists. Agents set them with `setDimension`. */
|
|
44
|
+
dimensions?: DimensionDefinition[];
|
|
45
|
+
/** Closed periods; with `postingDate`, a voucher dated in one is not postable. */
|
|
46
|
+
periods?: PeriodState[];
|
|
47
|
+
postingDate?: string;
|
|
48
|
+
mayAdjustClosed?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Let a person edit the lines: account, VAT code, department, project,
|
|
51
|
+
* debit and credit per line, plus add and remove. Every edit runs the same
|
|
52
|
+
* action an agent calls, so the same rules apply; a refused edit leaves the
|
|
53
|
+
* line as it was and shows why next to the row. Off by default (a read-only
|
|
54
|
+
* table).
|
|
55
|
+
*/
|
|
56
|
+
editable?: boolean;
|
|
57
|
+
onLinesChange?: (lines: VoucherLine[], details?: {
|
|
58
|
+
reason: string;
|
|
59
|
+
source?: string;
|
|
60
|
+
}) => void;
|
|
61
|
+
className?: string;
|
|
62
|
+
"aria-label"?: string;
|
|
63
|
+
/** Optional status strip under the table */
|
|
64
|
+
showStatus?: boolean;
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
};
|
|
67
|
+
declare function VoucherComposer({ lines, defaultLines, accounts, taxCodes, departments, projects, dimensions, periods, postingDate, mayAdjustClosed, editable, onLinesChange, className, "aria-label": ariaLabel, showStatus, children, }: VoucherComposerProps): react.JSX.Element;
|
|
68
|
+
|
|
69
|
+
export { VoucherComposer, type VoucherComposerProps, VoucherComposerRoot };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
VoucherComposer,
|
|
4
|
+
VoucherComposerRoot,
|
|
5
|
+
voucherComposer
|
|
6
|
+
} from "./chunk-4WC76FUE.js";
|
|
7
|
+
import "./chunk-ROXGVKR2.js";
|
|
8
|
+
import "./chunk-GVP2N3K6.js";
|
|
9
|
+
import "./chunk-HKYEHBQT.js";
|
|
10
|
+
export {
|
|
11
|
+
VoucherComposer,
|
|
12
|
+
VoucherComposerRoot,
|
|
13
|
+
voucherComposer
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=voucher-composer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { VoucherLine } from '@booki-aui/core/voucher';
|
|
3
|
+
export { VoucherLine } from '@booki-aui/core/voucher';
|
|
4
|
+
|
|
5
|
+
type VoucherLinesProps = {
|
|
6
|
+
lines: VoucherLine[];
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function VoucherLines({ lines, className }: VoucherLinesProps): react.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { VoucherLines, type VoucherLinesProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/docs/llms.txt
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Booki for agents
|
|
2
|
+
|
|
3
|
+
Booki is agent-first UI for accounting and auditing: controls an agent operates by name, under your rules. This catalog names the React package; the same controls, options and actions exist in `@booki-aui/web` (custom elements, `<booki-amount-field>`), `@booki-aui/vue`, `@booki-aui/svelte` and `@booki-aui/solid` (parts such as `AmountField.Root`), all generated from `@booki-aui/primitives`.
|
|
4
|
+
Agents should operate controls via `createBookiAgent` / `createAgent` — not DOM clicking.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pnpm add @booki-aui/core @booki-aui/react @booki-aui/styles
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { BookiLocaleProvider } from "@booki-aui/react/locale"
|
|
14
|
+
import "@booki-aui/styles"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Agent bridge (finance-tuned)
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
createBookiAgent,
|
|
22
|
+
attachAudit,
|
|
23
|
+
proposeChanges,
|
|
24
|
+
createBookiHistory,
|
|
25
|
+
registerTools,
|
|
26
|
+
} from "@booki-aui/react"
|
|
27
|
+
|
|
28
|
+
const agent = createBookiAgent({
|
|
29
|
+
agentId: "bookkeeper",
|
|
30
|
+
ruleVersion: "posting-1",
|
|
31
|
+
allow: async (step) => {
|
|
32
|
+
if (step.confirm) return window.confirm(step.confirm)
|
|
33
|
+
return true
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
attachAudit(agent, (event) => auditLog.push(event), {
|
|
38
|
+
agentId: "bookkeeper",
|
|
39
|
+
ruleVersion: "posting-1",
|
|
40
|
+
})
|
|
41
|
+
const history = createBookiHistory(agent, { by: () => "person:" + signedInId() })
|
|
42
|
+
registerTools(agent, { allow: "bridge", prefix: "acme" }) // WebMCP: acme_snapshot, acme_act, acme_query
|
|
43
|
+
|
|
44
|
+
agent.snapshot()
|
|
45
|
+
await agent.query({ kind: "amount-field" })
|
|
46
|
+
await agent.act({
|
|
47
|
+
steps: [
|
|
48
|
+
{ ref: "Amount excl. tax", action: "setMinor", args: [312500] },
|
|
49
|
+
{ ref: "MVA", action: "setTaxCode", args: ["MVA25"] },
|
|
50
|
+
{ ref: "Account", action: "setAccount", args: ["3000"] },
|
|
51
|
+
{ ref: "Voucher lines", action: "assertBalance", args: [] },
|
|
52
|
+
],
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// Amounts stage on key "minor" (integer minor units) → setMinor; `before`
|
|
56
|
+
// is read from the snapshot's `minor`, so revert restores the old amount.
|
|
57
|
+
const staged = await proposeChanges(agent, [
|
|
58
|
+
{ ref: "Amount excl. tax", key: "minor", value: 312500 },
|
|
59
|
+
])
|
|
60
|
+
await staged.revert()
|
|
61
|
+
await history.undoSource("agent")
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`registerTools` with `allow: "bridge"` lets the bridge's own `allow` decide each step once, answers in the agent's `language`, and with `audit` records a control's own refusals too; `prefix` names the tools. A function `allow` there is a second gate after the bridge's: give the same dialog to both and the person is asked twice. A press on a button that is a person's decision (signing off, releasing, sending) is refused with "This is a person's decision …" and an `agent.person-only` audit row, also when the control itself takes no `press`. `attachAudit` writes a list or record change per record and field (`D-2: stageId="quote" (was "lead")`), with the step in front when one `act` ran one step.
|
|
65
|
+
|
|
66
|
+
Prefer domain actions (`setMinor`, `setTaxCode`, `setAccount`, `setKontonummer`, `setOrganizationNumber`, `setIban`, `setDate`, `setPeriod`, `assertBalance`) over raw `setValue` strings.
|
|
67
|
+
|
|
68
|
+
Amounts are always integer minor units, for reading and writing: the AmountField snapshot's `value` / `minor` is what `setMinor` takes (12500 = 125.00). AmountField has no agent `setValue`, and `setMinor` rejects decimals, text such as "125.00", unsafe integers and amounts outside `minMinor` (default 0) / `maxMinor`. Voucher amounts follow the same rule: non-negative integer minor units, and a line has a debit or a credit, not both.
|
|
69
|
+
|
|
70
|
+
History: AmountField reports changes on key `minor`, VoucherComposer on `lines`, OrganizationNumberInput on `digits`. `createBookiHistory` records these by default, so `undoSource("agent")` / `seek` restore them through `setMinor` / `setLines` / `setDigits`. With a history of your own, pass `keys: BOOKI_HISTORY_KEYS`. Secret fields (bank account, IBAN, KID) are recorded as redacted and are reported as not restored, by design. An undo is the person's: `attachAudit` records it under `by` (default `"person"`), and `isHistoryRestoring()` is true while the values go back, because they report `source: "agent"` (ui-sdk restores through the bridge).
|
|
71
|
+
|
|
72
|
+
## Trying WebMCP in Chrome
|
|
73
|
+
|
|
74
|
+
Chrome with WebMCP for testing (`chrome://flags/#enable-webmcp-testing` or `--enable-features=WebMCPTesting`) gives the page `document.modelContext`: `getTools()` lists the registered tools with their hints, `executeTool(tool, input)` calls one with an input object, and the agent receives the result as JSON text. Checked in Chrome 158 against `registerTools`.
|
|
75
|
+
|
|
76
|
+
## Irreversible actions
|
|
77
|
+
|
|
78
|
+
Controls that move or post money carry `data-agent-confirm`. Without `allow`, those steps fail with "Needs a person".
|
|
79
|
+
Credentials / bank / KID use `data-agent-secret` (values show as `[redacted]`). A US memo or invoice reference is shown, unless the app sets `secretReference` on PaymentReferenceInput or PaymentBatch.
|
|
80
|
+
|
|
81
|
+
## useBookiField (a field the product already has)
|
|
82
|
+
|
|
83
|
+
`useBookiField(options, render)` from `@booki-aui/react` gives an existing input or select the agent's action and Booki's rules, without replacing it. Three kinds only:
|
|
84
|
+
|
|
85
|
+
| kind | value | action | snapshot keys |
|
|
86
|
+
| --- | --- | --- | --- |
|
|
87
|
+
| `amount` | integer minor units (`12500` = 125.00 NOK) | `setMinor` | `minor`, `currency`, `refusal` |
|
|
88
|
+
| `code` | a value from the closed `options` list | `setCode` | `code`, `items`, `itemsHint`, `refusal` |
|
|
89
|
+
| `date` | ISO `YYYY-MM-DD`, or `""` | `setDate` | `date`, `refusal` |
|
|
90
|
+
|
|
91
|
+
A refusal is a sentence the agent can act on: it names the unit, the options that exist, or the `YYYY-MM-DD` form, in English and Norwegian. A code field's `personOnly` lists values only a person may choose (a deal's won and lost stages): an agent's `setCode` to one is refused, a person's change with its DOM event goes through, and the snapshot shows the list. Other kinds need `definePrimitive`. See `docs/own-controls.md`.
|
|
92
|
+
|
|
93
|
+
## Catalog
|
|
94
|
+
|
|
95
|
+
### FIN `definePrimitive` (operate these)
|
|
96
|
+
|
|
97
|
+
| Component | Entry | Agent actions / snapshot |
|
|
98
|
+
| --- | --- | --- |
|
|
99
|
+
| AmountField | `@booki-aui/react/amount-field` | `setMinor`, `clear` — `value` / `minor` = integer minor units; `minMinor` (default 0) / `maxMinor` |
|
|
100
|
+
| VoucherComposer | `@booki-aui/react/voucher-composer` | `addLine({ account, debitMinor, vatCode })` (also `accountName`, `creditMinor`, `department`, `project`; or positional `account, name?, debit?, credit?, { vatCode?, department?, project? }?`; the snapshot's `lineFormat` shows the form, and an unknown field is refused), `setDebit`, `setCredit`, `setAccount`, `setVatCode`, `setDepartment`, `setProject`, `setDimension(lineId, key, code)` for any dimension in `dimensions`, `setForeign(lineId, "USD", 42000, 10500000)` to book a line in another currency (420,00 USD at 10,5: the amount in minor units, the rate in millionths; also `setForeign(lineId, { currency, amountMinor, rateScaled })`, and `setForeign(lineId)` with nothing more clears it), `setLines`, `removeLine`, `clear`, `assertBalance`, `assertPostable` — snapshot has `lines`, `postable`, `postings`, `lineFormat` and `foreignFormat`; `assertPostable` names what blocks posting. Closed lists via `accounts`, `taxCodes`, `departments`, `projects`; an account may set `vatCodes`, `defaultVatCode`, `requiresDepartment`, `requiresProject`. `editable` gives a person the same edits (account, VAT code, department, project, debit, credit, add, remove) through these actions; a refused edit leaves the line as it was and shows the message on that row. Read-only by default |
|
|
101
|
+
| BankReconciliation | `@booki-aui/react/bank-reconciliation` | `suggestMatch(bankLineIds, postIds)`, `withdrawMatch(matchId)`, `setMatches(matches)` (a new or changed match becomes a suggestion; a status other than `suggested` on it is refused, and a match a person decided stays as it is), `assertReconciled` — snapshot has `unmatchedBankLines`, `unmatchedPosts`, `matches`, `reconciled`. A match must sum to the same amount on both sides. Approving or rejecting a suggestion is a person's button, not an agent action. Rule-based suggestions: `suggestMatches` from `@booki-aui/core/reconciliation` |
|
|
102
|
+
| ApprovalChain | `@booki-aui/react/approval-chain` | `assertApproved` only — snapshot has `request`, `status`, `currentLevel`, `mayDecide`, `locked`. Approve, reject and escalate are a person's buttons (pass `actor`): the requester cannot approve, a limit must cover the amount, each level needs a different person, a substitute acts `onBehalfOf`. Rules: `@booki-aui/core/approval` |
|
|
103
|
+
| PeriodLock | `@booki-aui/react/period-lock` | `assertPostingAllowed(date, mayAdjustClosed?)` — snapshot has `periods` (`open` is unlisted, `soft-closed`, `hard-closed`). Closing, locking and reopening are a person's buttons; a hard-closed period never reopens. Rules: `@booki-aui/core/period-lock` |
|
|
104
|
+
| CloseChecklist | `@booki-aui/react/close-checklist` | `completeTask(id)`, `assertReadyToClose` — snapshot has `tasks`, `ready`, `awaitingSignOff`, `readyToClose`. A task waits for its `dependsOn`. An agent's work is recorded as `doneBy: "agent"`; signing off and reopening are a person's buttons, and nobody signs off their own task. Rules: `@booki-aui/core/close` |
|
|
105
|
+
| InvoiceEditor | `@booki-aui/react/invoice-editor` | `addLine({ description, quantity, unitPriceMinor, taxRate })` (also `quantityMilli`, `taxRateBp`, `taxCategory`, `discountPercent`/`discountBp`; or positional `description, quantityMilli, unitPriceMinor, taxCategory?, taxRateBp?, discountBp?`; the snapshot's `lineFormat` shows the form), `setLine(lineId, patch)`, `removeLine(lineId)`, `setCustomerTaxId`, `setInvoice`, `assertFinalizable` — snapshot has `invoice`, `totals`, `issues`, `finalizable`. Quantity is in thousandths, rates and discounts in basis points, tax categories `S Z E AE K`. Totals are computed, never set. Finalizing is a person's button; a finalized invoice refuses every edit and is corrected with a credit note (`draftCreditNote` in `@booki-aui/core/invoice`) |
|
|
106
|
+
| PaymentBatch | `@booki-aui/react/payment-batch` | `removePayment(id)`, `assertReleasable`; the payment list like a DataTable: `setSort(column, "asc"\|"desc")`, `clearSort`, `setSearch(text)`, `setFilter(column, text)`, `clearFilters`, `setPage(n)` (1-based), `setPageSize(n)` over the columns `creditorName`, `reference`, `amountMinor` (filter by creditor with `setFilter("creditorName", "Acme")`) — snapshot has `payments` (every payment, no account numbers), `totalMinor` (the whole batch), `issues` (duplicates), `approvals`, `releasable`, `query`, `view` (`total`, `matching`, `page`, `pageCount`), `rows` (the page as records) and `totals` (`amountMinor` over every match). The account number is no column: no search, sort or filter reaches it, and the CSV masks it. Approving and releasing are a person's buttons (pass `actor`): two different people, never the preparer, and any change to the batch drops the approvals. Rules: `@booki-aui/core/payment-batch` |
|
|
107
|
+
| SupplierInvoiceInbox | `@booki-aui/react/supplier-invoice-inbox` | `correctField(invoiceId, field, value)`, `confirmField(invoiceId, field)`, `proposeCoding(invoiceId, account, vatCode?, dimensions?)`, `proposeRejection(invoiceId, reason)` (fills the person's reason; rejecting stays theirs), `approveUnderRule(invoiceId)` (only when the ERP set the `rule` option and it returns true; recorded as `rule:<ruleName>`), `assertApprovable(invoiceId)`; the invoice list like a DataTable: `setSort(column, "asc"\|"desc")`, `clearSort`, `setSearch(text)`, `setFilter(column, text)`, `clearFilters`, `setPage(n)` (1-based), `setPageSize(n)` over the columns `supplierName`, `invoiceNumber`, `dueDate`, `grossMinor`, `currency`, `status` (`setFilter("status", "coded")`) — snapshot has `inbox` (every invoice, each with `needsReview`, `duplicateOf`, `issues`, `approvable`), `approvable`, `query`, `view` (`total`, `matching`, `page`, `pageCount`), `rows` (the page as records) and `totals` (`grossMinor` per currency over every match). Net + tax must equal gross; supplier + invoice number is unique; a field under the confidence threshold must be confirmed or corrected. The payment reference and bank account are never in the snapshot. Approve and reject are a person's buttons. Rules: `@booki-aui/core/supplier-invoice` |
|
|
108
|
+
| EvidenceList | `@booki-aui/react/evidence-list` | `linkAttachment(attachmentId, kind?)`, `setKind(attachmentId, kind)`, `assertEvidenced` — snapshot has `attachments`, `available`, `missing`, `evidenced`. Pass `requires` (kinds the entry needs) and `pool` (unlinked files). Same hash twice is refused; removing is a person's button and refused when `locked`. The host supplies metadata and hashes; nothing is uploaded. Rules: `@booki-aui/core/attachments` |
|
|
109
|
+
| ExpenseClaim | `@booki-aui/react/expense-claim` | `addLine(line)`, `setLine(lineId, patch)`, `removeLine(lineId)`, `assertSubmittable` — snapshot has `claim`, `amounts`, `totalMinor`, `exceptions`, `issues`, `submittable`, `approvable`, `lineFormat`. An unknown field is refused, listing the fields a line takes. Line kinds `expense`, `mileage` (`distanceKm: 12.5` or `distanceMeters`), `per-diem` (`days`, `rate`); mileage and per-diem amounts come from `policy` and cannot be set. Submit, approve, reject and accepting a policy exception are a person's; the claimant cannot accept or approve their own. Rules: `@booki-aui/core/expense` |
|
|
110
|
+
| LedgerTable | `@booki-aui/react/ledger-table` | `setRange(from, to)`, `openAccount(account)`, `showVoucher(idOrNumber)`, `back` (one step: voucher → account → trial balance), `explainVariance(account, periodA, periodB)`; the view on screen like a DataTable: `setSort(column, "asc"\|"desc")`, `clearSort`, `setSearch(text)`, `setFilter(column, text)`, `clearFilters`, `setPage(n)` (1-based), `setPageSize(n)`. Columns: trial balance `account`, `accountName`, `openingMinor`, `debitMinor`, `creditMinor`, `closingMinor`; account `date`, `voucherNumber`, `description`, `debitMinor`, `creditMinor`, `balanceMinor`; voucher `account`, `accountName`, `description`, `debitMinor`, `creditMinor`. Opening an account or voucher starts its query fresh; `back` returns to the query left, on the page holding the account — snapshot has `view` (`trial-balance`, `account`, `voucher`), `account`, `voucher`, `voucherSummary` (lines, balance, `document`), `from`, `to`, `query`, `table` (`total`, `matching`, `page`, `pageCount`), `rows` (the page, capped by `snapshotRows`, default 50, with `total` and `truncated`: fewer rows than match), `totals` (over every match), `balanced`. Pass `documents` (voucher id → file) and `onOpenDocument` to open the voucher's attachment. Read-only. Rules: `@booki-aui/core/ledger` |
|
|
111
|
+
| AgedBalances | `@booki-aui/react/aged-balances` | `setAsOf(date)`, `openParty(partyId)`, `back`, `overdue(minDays)`; the list on screen (parties, or a party's items) like a DataTable: `setSort(column, "asc"\|"desc")`, `clearSort`, `setSearch(text)`, `setFilter(column, text)`, `clearFilters`, `setPage(n)` (1-based), `setPageSize(n)`. `setFilter("bucket", "61-90")` keeps the parties (or items) with an amount in that age column; party columns are `partyName`, one per bucket id, `totalMinor`; item columns `documentNumber`, `dueDate`, `daysOverdue`, `bucket`, `amountMinor` — snapshot has `kind`, `asOf`, `buckets`, `rows` (the page of parties, capped, with `total` and `truncated`), `totals` (over every matching party), `partyId`, `party` (with `matchingMinor`), `query`, `view` (`total`, `matching`, `page`, `pageCount`). Read-only. Rules: `@booki-aui/core/aging` |
|
|
112
|
+
| VatReturn | `@booki-aui/react/vat-return` | `openBox(boxId)`, `back`, `assertReady` — snapshot has `period`, `status`, `boxes`, `payableMinor`, `direction`, `unmapped`, `issues`, `ready`. You supply the `schema` (boxes and the VAT codes that feed them); the two shipped schemas are examples, not a filing format. A VAT code no box takes blocks readiness. Marking ready and submitting are a person's; nothing is filed by the library. Rules: `@booki-aui/core/vat-return` |
|
|
113
|
+
| AuditWorkpaper | `@booki-aui/react/audit-workpaper` | `drawSample(method, { size?, tolerableMinor?, seed })`, `setResult(itemId, result, misstatementMinor?)`, `setTickMark(itemId, symbol)`, `setEvidence(itemId, attachmentId)`, `setNote(itemId, text)`, `assertReadyForSignOff` — snapshot has `workpaper`, `materiality`, `tickMarks`, `population`, `summary`, `issues`, `readyForSignOff`. Sampling is reproducible from its seed. A person can draw the sample from the form (method, size, seed) until a result is recorded. An agent's results are marked `by: "agent"`. The conclusion and both sign-offs are a person's; the reviewer is a different person. Rules: `@booki-aui/core/audit` |
|
|
114
|
+
| AuditFindings | `@booki-aui/react/audit-findings` | `draftFinding({ title, category, basis, description?, amountMinor?, currency? })` (returns `{ id }`), `editFinding(id, { title?, code?, description?, category?, amountMinor?, currency? })`, `linkSource(id, sourceId)`, `setBasis(id, basis)`, `assertConfirmable(id)` (throws with the warnings as one sentence) — snapshot has `register` (every finding, redacted), `issues` (warnings per finding), `evidence` (ids a finding may cite, when the host passes `evidence`), `findingFormat`. Categories `misstatement`, `control-deficiency`, `compliance`, `other`; basis `documented` (evidence on file), `reported` (a party said so), `hypothesis`. Warnings (documented without sources, a hypothesis, an amount without currency) never block. A confidential finding reads `"[confidential]"` with its counts only, in the snapshot and in `agent.subscribe`, and an agent cannot change it. Confirming, withdrawing (a reason of at least 20 characters) and reopening are a person's buttons; the log only grows. Rules: `@booki-aui/core/findings` |
|
|
115
|
+
| ConfirmDialog | `@booki-aui/react/confirm-dialog` | No agent actions. The question (`title`, `description`, what is decided as children) is readable; Cancel is free; the answer and an optional `confirmWord` sit inside `data-agent-confirm`, so a press on the answer needs a person whatever the agent's role. `onConfirm` may return a Promise: the dialog stays open, the button is pending, a rejection's message shows in the dialog. `tone="danger"` for what cannot be undone |
|
|
116
|
+
| BookiToasts | `@booki-aui/react/toasts` | Receipts in a Notifications region (`BookiToasts`, `toast`, `createToaster`). `useAgentToasts(agent, { toaster?, history?, duration? })` gives a receipt for every change the agent makes, in words ("Agent set Amount to 1,250.00"), marked as the agent's, with Undo (puts the page back to just before it); redacted changes have no Undo |
|
|
117
|
+
| DocumentSignoff | `@booki-aui/react/document-signoff` | `assertSignable()` (throws with what stops a signature now: unsaved, saving, a version conflict or no content; open points do not stop it unless `blockOpenPoints` is set) — snapshot has `levels` (performed, reviewed, approved: `mark` is `unsigned`, `signed`, `changed-after` or `basis-changed`, with who signed which `version` and the open points they signed with), `version`, `openPoints`, `obstacles`, `signable`, `blockOpenPoints`. Default: open points go with the signature, and the record shows what the signer knew. With `blockOpenPoints`, `obstacles` says "still has N open point(s)", `signable` is false and the sign buttons are hidden until every point is closed. Signing and withdrawing (a reason of at least 20 characters; later levels go with it) are a person's buttons. Review needs another person than the one who performed. A later edit marks a signature, never withdraws it. Rules: `@booki-aui/core/document-signoff` |
|
|
118
|
+
| SheetStack | `@booki-aui/react/sheet-stack` | `back(key)` (closes every sheet above it; the error lists what is open), `close()` (the top sheet; the page stays) — snapshot has `open` (each sheet's `key`, `title`, `top`, `covered`), `top`, `docked`. The app opens sheets; only the top one takes input. Layout: `layoutSheets`, `layoutStack`, `planDock` in `@booki-aui/core/sheet-stack` |
|
|
119
|
+
| ClientRequests | `@booki-aui/react/client-requests` | `draftRequest({ title, recipientName, recipientEmail, recipientRole?, area?, dueDate? })` (returns `{ id }`), `editRequest(id, { title?, area?, dueDate?, recipientName?, recipientEmail?, recipientRole? })` (draft only), `recordAnswer(id, text)` (an answer that came in), `assertAnswered(id)` — snapshot has `tracker` (every request; the recipient's name and role, never the email), `overdue` (ids past `dueDate` against `today`), `issues`, `requestFormat`. Statuses `draft`, `sent`, `answered`, `accepted`, `rejected` (sent back, waits for the client again). Sending, reminding, and accepting or rejecting an answer (with a reason) are a person's buttons. Rules: `@booki-aui/core/client-request` |
|
|
120
|
+
| DealPipeline | `@booki-aui/react/deal-pipeline` | `moveDeal(dealId, stageId)` (open stages only), `setValue(dealId, { valueMinor, currency, valueStatus, valueSource })` (statuses `known`, `estimate`, `unknown`; known and estimated need `valueSource`; a new amount or currency without a status becomes `unknown` and drops the old source; an unknown field is refused), `setExpectedClose(dealId, "YYYY-MM-DD")` (`""` clears), `setOwner(dealId, idOrName)` from `owners` — snapshot has `deals`, `stages`, `owners`, `summary` (per stage: `count` and `totals` per currency: `knownMinor`, `estimateMinor`, `weightedMinor`, `unverified`, `missing`), `forecast` (the open deals' totals; currencies are never added together), `issues` (no value, an unverified amount, past its expected close, stale in a stage), `dealFormat`. Marking a deal won or lost (lost needs a reason) and reopening it are a person's buttons. Rules: `@booki-aui/core/pipeline`; server: `guardCloseDeal` |
|
|
121
|
+
| ActivityTimeline | `@booki-aui/react/activity-timeline` | `logActivity({ kind, subject, body?, at?, evidence? })` (kinds `call`, `email`, `meeting`, `note`; `at` is ISO or YYYY-MM-DD and defaults to now; a future time is refused: that is a task), `scheduleTask({ subject, dueDate, body?, assigneeId? })` (`assigneeId` from `people`, by id or name), `completeTask(id)`, `rescheduleTask(id, dueDate)` — each returns or records ids (`A-n`, `T-n`) and the agent as `by` — snapshot has `timeline` (newest first), `openTasks`, `nextTask`, `overdue`, `lastTouch` (the last call, email or meeting), `issues` (a call or meeting with no `evidence`, an overdue task), `people`, `activityFormat`. Logging an email records it; sending is not this control's. Removing an entry is a person's button. Rules: `@booki-aui/core/activity` |
|
|
122
|
+
| FunnelChart | `@booki-aui/react/funnel-chart` | `drill(stepId)` — snapshot has `steps` (each `count`, `stepConversionPct` from the step before, `overallConversionPct` from the first, `dropOff`, optional `valueMinor`), `biggestDropId` (the largest share lost), `issues` (a step that rises, which a funnel never should). Pass counts of records that ever reached each step; `reachedCounts(histories, order)` in `@booki-aui/core/funnel` builds them from stage histories. Read-only |
|
|
123
|
+
| ForecastChart | `@booki-aui/react/forecast-chart` | `setGrouping("month" \| "quarter")`, `drill(period)` (2026-11 or 2026-Q4) — snapshot has `periods` (each `wonMinor` by close date, `committedMinor` for known open values, `bestCaseMinor` for estimates, `weightedMinor` by stage probability, `count`), `totals`, `undated` (open deals with no expected close, left out), `unverified` (open deals with no amount or one without a source, left out), `overdue`, `otherCurrency`. Lost deals and values without a source are left out. Takes the same `deals` and `stages` as DealPipeline. Rules: `forecastByPeriod` in `@booki-aui/core/pipeline` |
|
|
124
|
+
| RecurringRevenue | `@booki-aui/react/recurring-revenue` | `setView("mrr" \| "arr")`, `drill(movement)` (`new`, `expansion`, `contraction`, `churn`) — snapshot has `openingMinor`, `closingMinor`, `netMinor`, `movements` (each `amountMinor` and its `customers`), `reconciles` (always true: opening plus the movements is closing), `issues` (agreements in other currencies, never added). From `agreements` (`customerId`, `currency`, `start`, `end?`, and either `mrrMinor` or `amountMinor` with `interval` month, quarter or year) between `from` and `to`. ARR is summed exactly; MRR is each figure / 12 rounded, and `roundingMinor` says what rounding moved (a yearly 1 000.00 is 83.33 a month). Rules: `@booki-aui/core/recurring` (`mrrOn`, `recurringBridge`, `mrrSeries` for a TrendChart) |
|
|
125
|
+
| StageDurationChart | `@booki-aui/react/stage-duration` | `drill(stageId)` — snapshot has `rows` (per open stage `medianDays`, `longestDays`, `targetDays`, `current` deal ids, `overTarget` deal ids), `overTarget`, `slowestId`. From `stays` (`dealId`, `stageId`, `enteredAt`, `leftAt?`) and optional `targets` in days. Rules: `timeInStage` in `@booki-aui/core/pipeline` |
|
|
126
|
+
| FixedAssetRegister | `@booki-aui/react/fixed-asset-register` | `setPeriod(periodCode)`, `openAsset(assetId)`, `back`, `proposeRun(periodCode)`, `assertRunnable(periodCode)` — snapshot has `period`, `rows`, `schedule`, `proposal`, `runs`, `runnable`. Straight-line and declining balance, summing exactly to cost less residual. Confirming a run and disposing are a person's; a period is never depreciated twice. Rules: `@booki-aui/core/fixed-assets` |
|
|
127
|
+
| DataTable | `@booki-aui/react/data-table` | `setSort(column, "asc"\|"desc")`, `clearSort`, `setSearch(text)`, `setFilter(column, text)`, `clearFilters`, `setPage(n)`, `setPageSize(n)`, `showColumns(ids)`, `hideColumns(ids)`, `selectRows(ids)`, `clearSelection` — snapshot has `query`, `view` (`total`, `matching`, `page`, `pageCount`), `columns`, `rows` (the current page as records, capped), `totals` (over every match), `selected`, `loading`, `loadError`. Columns are data (`id`, `header`, `kind`, `value`, optional `cell`); the same definitions drive the screen, the agent and the CSV. View logic: `@booki-aui/core/table` (`tableView`, `toCsv`) |
|
|
128
|
+
| Server guards | `@booki-aui/core/server` | Not a control: the same rules for your API. `guardPostVoucher`, `guardDecideApproval`, `guardApproved`, `guardReleasePayments`, `guardClosePeriod`, `guardFinalizeInvoice`, `guardSubmitVatReturn`, `guardConfirmFinding`, `guardSignDocument`, `guardCloseDeal`, `guard(context, permission, rule)` → `Verdict` (`ok`, `actor` like `agent:bookkeeper`, or `status` 401/403/409/422, `code`, `message`, `issues`); `toHttp(verdict)`. `guardSignDocument` takes `blockOpenPoints` too and refuses an agent at every level. Context: `actor` from your sign-in with `kind: "person" \| "agent"`, `roles`, `entity`, `deeds`, `locale`. `PERSON_ONLY` decisions are refused for agents whatever their roles |
|
|
129
|
+
| AgentCursor | `@booki-aui/react/agent-cursor` | Not an agent target: the agent's visible pointer. `createAgentCursor({ travel, press, linger })` → `cursor.wrap(allow)` goes into `createBookiAgent({ allow })` and `registerTools`; before each step it glides to the control, rings it and presses, then your `allow` decides. Render `<AgentCursor cursor={cursor} />` once. `setEnabled(false)` for full speed; follows reduced motion; `aria-hidden` (AgentPresence announces). Without React: `createAgentCursor` from `@booki-aui/primitives/agent-cursor` and `<booki-agent-cursor>` from `@booki-aui/web` (set its `cursor` property) |
|
|
130
|
+
| KpiStat | `@booki-aui/react/kpi-stat` | no actions — snapshot has `valueMinor`, `previousMinor`, `deltaMinor`, `deltaPct`, `direction`, `favourable` (from `good: "up"\|"down"`), `sparkline`. Read-only figure |
|
|
131
|
+
| TrendChart | `@booki-aui/react/trend-chart` | `setRange(range)`, `drill(period)` — snapshot has `range`, `from`, `to`, `periodCount`, `series` (each period as minor units), `drilled`. Series are `{ id, name, points: { period, valueMinor }[] }` |
|
|
132
|
+
| BarChart | `@booki-aui/react/bar-chart` | `setLimit(n)`, `drill(id)` — snapshot has `rows` (largest first, the rest folded into "Other"), `totalMinor`, `count`, `otherCount`, `drilled` |
|
|
133
|
+
| AgingChart | `@booki-aui/react/aging-chart` | `drill(bucket)` — snapshot has `asOf`, `buckets` (not due, 1–30, 31–60, 61–90, 90+), `totalMinor`, `overdueMinor`, `overdueSharePct`, `topOverdue`. Rules: `@booki-aui/core/aging` |
|
|
134
|
+
| CashflowWaterfall | `@booki-aui/react/cashflow-waterfall` | `drill(stepId)` — snapshot has opening, every step, closing, and whether they add up (`issues`). Steps are `{ id, label, amountMinor }` |
|
|
135
|
+
| BankAccountInput | `@booki-aui/react/bank-account-input` | `setKontonummer` / `setRouting` / `setAccount` / `clear` — `isValid`, secret |
|
|
136
|
+
| PaymentReferenceInput | `@booki-aui/react/payment-reference-input` | `setReference`, `generateKid`, `clear` — `isValid`; a KID is always secret, a memo only with `secretReference` |
|
|
137
|
+
| TaxCodeSelect | `@booki-aui/react/tax-code-select` | `setTaxCode`, `clear` — closed `items`, snapshot `percent` |
|
|
138
|
+
| AccountPicker | `@booki-aui/react/account-picker` | `setAccount`, `clear` — closed chart; over 30 accounts `items` is empty, `more` is the count and `itemsHint` says how to `query({ within, text })`; `from: 50` reads the next 50 |
|
|
139
|
+
| CurrencySelect | `@booki-aui/react/currency-select` | `setCurrency`, `clear` — closed NOK/USD |
|
|
140
|
+
| OrganizationNumberInput | `@booki-aui/react/organization-number-input` | `setOrganizationNumber`, `clear` — orgnr mod11 / EIN |
|
|
141
|
+
| IbanInput | `@booki-aui/react/iban-input` | `setIban`, `clear` — `isValid`, secret; NO → kontonummer |
|
|
142
|
+
| FinancialDateField | `@booki-aui/react/financial-date-field` | `setDate`, `setDaysFromToday` (due), `clear` — ISO |
|
|
143
|
+
| AccountingPeriodSelect | `@booki-aui/react/accounting-period-select` | `setPeriod`, `clear` — closed year/month/VAT term |
|
|
144
|
+
| InvoiceNumberInput | `@booki-aui/react/invoice-number-input` | `setInvoiceNumber`, `clear` |
|
|
145
|
+
| AttestationStatus | `@booki-aui/react/attestation-status` | `setStatus`; approve/reject/escalate via confirm-gated press |
|
|
146
|
+
|
|
147
|
+
Form props: AmountField, the selects, the bank / reference / organization / IBAN / invoice inputs and FinancialDateField take `name`, `id`, `disabled`, `readOnly`, `required`. `name` submits the canonical value with a native `<form>` (integer minor units, digits, ISO date, or the code; US bank accounts submit `${name}.routingNumber` and `${name}.accountNumber`). A `disabled` or `readOnly` control is listed in the snapshot with `disabled: true` and no actions, and a step on it fails with "… takes no <action> now. It takes: nothing." Ask the person instead of retrying.
|
|
148
|
+
|
|
149
|
+
### Display / human-gated (not domain primitives)
|
|
150
|
+
|
|
151
|
+
| Component | Notes |
|
|
152
|
+
| --- | --- |
|
|
153
|
+
| AmountInput | Compat wrapper → AmountField |
|
|
154
|
+
| MoneyAmount | Display only |
|
|
155
|
+
| TextLink | Display only. `icon="docs" \| "github"` or your own element; `asChild` gives a router link the look. `DocsIcon`, `GitHubIcon` |
|
|
156
|
+
| VoucherLines | Read-only table (prefer VoucherComposer) |
|
|
157
|
+
| AuditTrail | Presentational; feed via `attachAudit` |
|
|
158
|
+
| ApprovalGate | `data-agent-confirm` — person must approve |
|
|
159
|
+
| PaymentConfirm | Typed APPROVE + confirm |
|
|
160
|
+
| ScaPrompt | BankID/Passkey mock + confirm |
|
|
161
|
+
| ExceptionBanner | Escalation; Review/Dismiss are confirm-gated |
|
|
162
|
+
| CountryToggle | Switches BookiLocale (not in snapshot kinds) |
|
|
163
|
+
| createBookiAgent | Bridge: `allow` may answer `{ allow, by }`, `audit(row)` gets refused and confirmed steps; person-only steps never pass. + `attachAudit` + `proposeChanges` + `createBookiHistory` |
|
|
164
|
+
|
|
165
|
+
## Sales reports from what exists
|
|
166
|
+
|
|
167
|
+
- **Win rate:** a two-step `FunnelChart`, deals closed then deals won: the last step's `overallConversionPct` is the win rate, and the snapshot says so in percent with one decimal.
|
|
168
|
+
- **Leaderboard:** `BarChart` with one item per owner and their won `valueMinor`; `setLimit(5)` folds the rest into "Other".
|
|
169
|
+
- **No stage history kept?** Give `reachedCounts` each open or won record's current stage and the stages before it (lost records left out), and give `StageDurationChart` one stay per record from when it entered its current stage. Say on the screen that both are approximations.
|
|
170
|
+
- **MRR over time:** `mrrSeries(agreements, "2026-01", "2026-12", "NOK")` from `@booki-aui/core/recurring` into `TrendChart`.
|
|
171
|
+
|
|
172
|
+
## Money rules
|
|
173
|
+
|
|
174
|
+
- Source of truth: `{ minor: number, currency }` from `@booki-aui/core/money`
|
|
175
|
+
- Prefer `buildBalancedSalesVoucher` from `@booki-aui/core/voucher` for auto-compose
|
|
176
|
+
- Never store floats as canonical amounts
|
|
177
|
+
- Decimal text from a database (`"1234.50"`): `minorFromDecimal(text, currency)` and `decimalFromMinor(minor, currency)`, exact; extra decimals are refused, not rounded
|
|
178
|
+
- Prefer `actor: agent:…` in AuditTrail when `subscribe` reports `source: "agent"`
|
|
179
|
+
|
|
180
|
+
## In an existing app
|
|
181
|
+
|
|
182
|
+
`@booki-aui/react` files are client modules (`"use client"`). `@booki-aui/styles` scopes its base rules to Booki's components (your own control opts in with `data-booki`), ships `layered.css` and `shadcn.css`, and `@booki-aui/core/server` has `advise` (rule findings as warnings), `minReason`, `scope` and `actorRecord`. See `docs/drop-in.md`.
|
|
183
|
+
|
|
184
|
+
## Docs
|
|
185
|
+
|
|
186
|
+
https://github.com/Walgermo/booki (README, skills/booki/SKILL.md)
|
|
187
|
+
https://github.com/Walgermo/booki/blob/main/spec/agent-contract.md (the draft Agent Contract for Accounting UIs; one implementation so far)
|
|
188
|
+
|
|
189
|
+
## Voucher rules beyond the line
|
|
190
|
+
|
|
191
|
+
`VoucherComposer` takes `dimensions` (further closed lists; accounts can list `requiredDimensions`) and `periods` + `postingDate`: a voucher dated in a closed period is not postable, and `assertPostable` says which period.
|
|
192
|
+
|
|
193
|
+
## A state key named `error`
|
|
194
|
+
|
|
195
|
+
The bridge reads a primitive's `error` state key as "the last action failed". Name a message for the person something else (Booki uses `refusal`).
|
|
196
|
+
|
|
197
|
+
Refusals and issues stay English in state and in `act` errors, which is what an agent reads. The screen shows them in the person's language through `localize(text, "nb" | "en")` from `@booki-aui/core/messages`; core throws `BookiError` with a `code` and `params`.
|
|
198
|
+
|
|
199
|
+
## Countries, currencies and roles
|
|
200
|
+
|
|
201
|
+
- **Countries:** profiles for `NO`, `US`, `SE`, `DK`, `GB`, `DE`. The last four are starters with English labels. Any other: `defineProfile(base, overrides)` from `@booki-aui/core/locale`, passed as `<BookiLocaleProvider profiles={{ FI }}>`.
|
|
202
|
+
- **Currencies:** `@booki-aui/core/fx` has `convertMinor`, `findRate`, `revalue`. Rates are whole millionths (`11.5` is `11500000`). A voucher line with `foreign` is not postable unless its base amount is exactly the converted amount.
|
|
203
|
+
- **Roles:** wrap the app in `<BookiAccessProvider actor={{ id, roles }} entity={...}>`. Every workflow control (approval, payment, close, period, invoice, supplier invoice, expense, evidence, VAT return, fixed assets, audit workpaper, audit findings, client requests, deal pipeline, activity timeline) then takes the actor from it and refuses a person's button their role does not allow, naming the role it takes. Permissions: `voucher.post`, `invoice.finalize`, `supplier-invoice.approve`, `expense.approve`, `evidence.remove`, `approval.decide`, `payment.approve`, `payment.release`, `reconciliation.approve`, `period.close`, `period.adjust-closed`, `close.sign-off`, `vat.prepare`, `vat.submit`, `asset.run-depreciation`, `asset.dispose`, `audit.prepare`, `audit.sign-off`, `audit.review`, `audit.conclude`, `audit.eqcr`, `audit.freeze`, `finding.raise`, `finding.confirm`, `finding.withdraw`, `request.draft`, `request.send`, `request.decide`, `deal.close`, `activity.remove`. Roles per engagement: `actor.scopes` by id, and `scope` in the check. `@booki-aui/core/permissions` has `can`, `assertCan`, `STANDARD_ROLES`, `STANDARD_DUTY_RULES`. The server must still check.
|
|
204
|
+
|
|
205
|
+
## Checking a step: `expect`
|
|
206
|
+
|
|
207
|
+
`{ ref, action: "expect", args: [value] }` checks a field's `value` and changes nothing (minor units on `AmountField`, the number on `AccountPicker`, the code on `TaxCodeSelect`). A check that doesn't hold stops the call, so put it before the press that saves. It asks `allow` nothing, and `actAndRecord` writes no audit row for it. Record components (`DataTable`, `LedgerTable`, `DealPipeline`) have no single value: read them from the snapshot.
|
|
208
|
+
|
|
209
|
+
A `set` step that leaves the value as it was fails (`didn't take: it is still …`), and one that lands on another value says what it is now. A controlled field must pass the change on, or an agent can't set it. With `language: "nb"` these come back in Norwegian, as the rest of the bridge's sentences do.
|
|
210
|
+
|
|
211
|
+
## Two more bridge behaviours
|
|
212
|
+
|
|
213
|
+
- `data-agent-secret` on any part redacts every key of that component's snapshot. Keep a secret out of `controlled` instead, and mark only a plain element that shows it.
|
|
214
|
+
- A component whose inputs are all `disabled` offers an agent no actions. For a closed row use `aria-readonly` and ignore typing, not `disabled`.
|