@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,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
AuditWorkpaper,
|
|
4
|
+
AuditWorkpaperCell,
|
|
5
|
+
AuditWorkpaperConclusion,
|
|
6
|
+
AuditWorkpaperDraw,
|
|
7
|
+
AuditWorkpaperMethod,
|
|
8
|
+
AuditWorkpaperPrepare,
|
|
9
|
+
AuditWorkpaperResult,
|
|
10
|
+
AuditWorkpaperReview,
|
|
11
|
+
AuditWorkpaperRoot,
|
|
12
|
+
AuditWorkpaperSampler,
|
|
13
|
+
AuditWorkpaperTick,
|
|
14
|
+
AuditWorkpaperWithdraw,
|
|
15
|
+
auditWorkpaper
|
|
16
|
+
} from "./chunk-BZIOOU4I.js";
|
|
17
|
+
import "./chunk-K72VT6RJ.js";
|
|
18
|
+
import "./chunk-GVP2N3K6.js";
|
|
19
|
+
import "./chunk-HKYEHBQT.js";
|
|
20
|
+
export {
|
|
21
|
+
AuditWorkpaper,
|
|
22
|
+
AuditWorkpaperCell,
|
|
23
|
+
AuditWorkpaperConclusion,
|
|
24
|
+
AuditWorkpaperDraw,
|
|
25
|
+
AuditWorkpaperMethod,
|
|
26
|
+
AuditWorkpaperPrepare,
|
|
27
|
+
AuditWorkpaperResult,
|
|
28
|
+
AuditWorkpaperReview,
|
|
29
|
+
AuditWorkpaperRoot,
|
|
30
|
+
AuditWorkpaperSampler,
|
|
31
|
+
AuditWorkpaperTick,
|
|
32
|
+
AuditWorkpaperWithdraw,
|
|
33
|
+
auditWorkpaper
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=audit-workpaper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { Parts } from '@ui-sdk/react/primitive';
|
|
4
|
+
import { B as BookiFormProps } from './form-props-Ct7zeZBH.js';
|
|
5
|
+
import { bankAccount, BankAccountValue } from '@booki-aui/primitives/bank-account-input';
|
|
6
|
+
export { BankAccountValue, bankAccount } from '@booki-aui/primitives/bank-account-input';
|
|
7
|
+
|
|
8
|
+
declare const TAGS: {
|
|
9
|
+
readonly root: "div";
|
|
10
|
+
readonly kontonummer: "input";
|
|
11
|
+
readonly routing: "input";
|
|
12
|
+
readonly account: "input";
|
|
13
|
+
};
|
|
14
|
+
declare const parts: Parts<typeof bankAccount, typeof TAGS>;
|
|
15
|
+
declare const BankAccountRoot: (typeof parts)["Root"];
|
|
16
|
+
declare const BankAccountKontonummer: (typeof parts)["Kontonummer"];
|
|
17
|
+
declare const BankAccountRouting: (typeof parts)["Routing"];
|
|
18
|
+
declare const BankAccountAccount: (typeof parts)["Account"];
|
|
19
|
+
type BankAccountInputProps = {
|
|
20
|
+
/** For profiles whose bank account is an IBAN. */
|
|
21
|
+
iban?: string;
|
|
22
|
+
kontonummer?: string;
|
|
23
|
+
routingNumber?: string;
|
|
24
|
+
accountNumber?: string;
|
|
25
|
+
onValueChange?: (value: BankAccountValue) => void;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
} & Omit<BookiFormProps, "required"> & Omit<ComponentProps<"div">, "onChange" | "defaultValue" | "children" | "id">;
|
|
29
|
+
/**
|
|
30
|
+
* Form fields: `name` submits the 11 kontonummer digits in Norway. In the US
|
|
31
|
+
* it submits `${name}.routingNumber` and `${name}.accountNumber`; `id` goes to
|
|
32
|
+
* the routing input and `${id}-account` to the account input.
|
|
33
|
+
*/
|
|
34
|
+
declare function BankAccountInput({ iban, kontonummer, routingNumber, accountNumber, onValueChange, required, name, id, disabled, readOnly, className, ...props }: BankAccountInputProps): react.JSX.Element;
|
|
35
|
+
|
|
36
|
+
export { BankAccountAccount, BankAccountInput, type BankAccountInputProps, BankAccountKontonummer, BankAccountRoot, BankAccountRouting };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
BankAccountAccount,
|
|
4
|
+
BankAccountInput,
|
|
5
|
+
BankAccountKontonummer,
|
|
6
|
+
BankAccountRoot,
|
|
7
|
+
BankAccountRouting,
|
|
8
|
+
bankAccount
|
|
9
|
+
} from "./chunk-KLDUGI7L.js";
|
|
10
|
+
import "./chunk-RTCKV4H2.js";
|
|
11
|
+
import "./chunk-OYERLEER.js";
|
|
12
|
+
import "./chunk-GVP2N3K6.js";
|
|
13
|
+
import "./chunk-HKYEHBQT.js";
|
|
14
|
+
export {
|
|
15
|
+
BankAccountAccount,
|
|
16
|
+
BankAccountInput,
|
|
17
|
+
BankAccountKontonummer,
|
|
18
|
+
BankAccountRoot,
|
|
19
|
+
BankAccountRouting,
|
|
20
|
+
bankAccount
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=bank-account-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { B as BookiChangeDetails } from './change-details-CWpEgc80.js';
|
|
4
|
+
import { BankLine, OpenPost, ReconciliationMatch } from '@booki-aui/core/reconciliation';
|
|
5
|
+
export { BankLine, OpenPost, ReconciliationMatch } from '@booki-aui/core/reconciliation';
|
|
6
|
+
import { Parts } from '@ui-sdk/react/primitive';
|
|
7
|
+
import { bankReconciliation } from '@booki-aui/primitives/bank-reconciliation';
|
|
8
|
+
export { bankReconciliation } from '@booki-aui/primitives/bank-reconciliation';
|
|
9
|
+
|
|
10
|
+
declare const TAGS: {
|
|
11
|
+
readonly root: "div";
|
|
12
|
+
readonly match: "button";
|
|
13
|
+
readonly approve: "button";
|
|
14
|
+
readonly reject: "button";
|
|
15
|
+
};
|
|
16
|
+
declare const parts: Parts<typeof bankReconciliation, typeof TAGS>;
|
|
17
|
+
declare const BankReconciliationRoot: (typeof parts)["Root"];
|
|
18
|
+
declare const BankReconciliationMatch: (typeof parts)["Match"];
|
|
19
|
+
declare const BankReconciliationApprove: (typeof parts)["Approve"];
|
|
20
|
+
declare const BankReconciliationReject: (typeof parts)["Reject"];
|
|
21
|
+
type BankReconciliationProps = {
|
|
22
|
+
bankLines: BankLine[];
|
|
23
|
+
openPosts: OpenPost[];
|
|
24
|
+
matches?: ReconciliationMatch[];
|
|
25
|
+
defaultMatches?: ReconciliationMatch[];
|
|
26
|
+
onMatchesChange?: (matches: ReconciliationMatch[], details: BookiChangeDetails) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
"aria-label"?: string;
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Composed reconciliation: two tables of what is still unmatched, a bar to
|
|
33
|
+
* match the selected rows, the suggestions waiting for a person, and a status
|
|
34
|
+
* line. Use the Root and button parts for your own layout.
|
|
35
|
+
*/
|
|
36
|
+
declare function BankReconciliation({ bankLines, openPosts, matches, defaultMatches, onMatchesChange, className, "aria-label": ariaLabel, children, }: BankReconciliationProps): react.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { BankReconciliation, BankReconciliationApprove, BankReconciliationMatch, type BankReconciliationProps, BankReconciliationReject, BankReconciliationRoot };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
BankReconciliation,
|
|
4
|
+
BankReconciliationApprove,
|
|
5
|
+
BankReconciliationMatch,
|
|
6
|
+
BankReconciliationReject,
|
|
7
|
+
BankReconciliationRoot,
|
|
8
|
+
bankReconciliation
|
|
9
|
+
} from "./chunk-HT6HGOLM.js";
|
|
10
|
+
import "./chunk-GVP2N3K6.js";
|
|
11
|
+
import "./chunk-HKYEHBQT.js";
|
|
12
|
+
export {
|
|
13
|
+
BankReconciliation,
|
|
14
|
+
BankReconciliationApprove,
|
|
15
|
+
BankReconciliationMatch,
|
|
16
|
+
BankReconciliationReject,
|
|
17
|
+
BankReconciliationRoot,
|
|
18
|
+
bankReconciliation
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=bank-reconciliation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Parts } from '@ui-sdk/react/primitive';
|
|
3
|
+
import { BarItem, Details, barChart } from '@booki-aui/primitives/bar-chart';
|
|
4
|
+
export { BarItem, BarRow, barChart } from '@booki-aui/primitives/bar-chart';
|
|
5
|
+
|
|
6
|
+
declare const TAGS: {
|
|
7
|
+
readonly root: "div";
|
|
8
|
+
readonly bar: "button";
|
|
9
|
+
readonly more: "button";
|
|
10
|
+
};
|
|
11
|
+
declare const parts: Parts<typeof barChart, typeof TAGS>;
|
|
12
|
+
declare const BarChartRoot: (typeof parts)["Root"];
|
|
13
|
+
declare const BarChartBar: (typeof parts)["Bar"];
|
|
14
|
+
declare const BarChartMore: (typeof parts)["More"];
|
|
15
|
+
type BarChartProps = {
|
|
16
|
+
items: BarItem[];
|
|
17
|
+
/** Defaults to the locale profile's currency. */
|
|
18
|
+
currency?: string;
|
|
19
|
+
limit?: number | null;
|
|
20
|
+
/** Bars shown before the rest fold into "Other". Defaults to all. */
|
|
21
|
+
defaultLimit?: number | null;
|
|
22
|
+
onLimitChange?: (limit: number | null, details: Details) => void;
|
|
23
|
+
drill?: string | null;
|
|
24
|
+
defaultDrill?: string | null;
|
|
25
|
+
/** A category was drilled into, by a person's click or an agent's `drill`. */
|
|
26
|
+
onDrill?: (id: string, details: Details) => void;
|
|
27
|
+
title?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Composed bar chart: one row per category, largest first, the name and
|
|
33
|
+
* amount above a thin bar, "Other" for the rest when a limit is set, a
|
|
34
|
+
* tooltip on hover or focus and the same figures as a table.
|
|
35
|
+
*/
|
|
36
|
+
declare function BarChart({ items, currency, limit, defaultLimit, onLimitChange, drill, defaultDrill, onDrill, title, className, "aria-label": ariaLabel, }: BarChartProps): react.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { BarChart, BarChartBar, BarChartMore, type BarChartProps, BarChartRoot };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
BarChart,
|
|
4
|
+
BarChartBar,
|
|
5
|
+
BarChartMore,
|
|
6
|
+
BarChartRoot,
|
|
7
|
+
barChart
|
|
8
|
+
} from "./chunk-ZKNVWQDU.js";
|
|
9
|
+
import "./chunk-WDME4U42.js";
|
|
10
|
+
import "./chunk-GVP2N3K6.js";
|
|
11
|
+
import "./chunk-HKYEHBQT.js";
|
|
12
|
+
export {
|
|
13
|
+
BarChart,
|
|
14
|
+
BarChartBar,
|
|
15
|
+
BarChartMore,
|
|
16
|
+
BarChartRoot,
|
|
17
|
+
barChart
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=bar-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import * as _ui_sdk_core_history from '@ui-sdk/core/history';
|
|
2
|
+
import { createHistory as createHistory$1, stageChanges } from '@ui-sdk/react/history';
|
|
3
|
+
export { describeEntry, stageChanges } from '@ui-sdk/react/history';
|
|
4
|
+
import { createAgent } from '@ui-sdk/react/agent';
|
|
5
|
+
import { AgentPolicyOptions } from '@booki-aui/primitives/agent-policy';
|
|
6
|
+
export { AgentDecision } from '@booki-aui/primitives/agent-policy';
|
|
7
|
+
import { MessageLanguage } from '@booki-aui/core/msg';
|
|
8
|
+
import { AuditEvent } from './audit-trail.js';
|
|
9
|
+
import 'react';
|
|
10
|
+
|
|
11
|
+
type AgentBridge = ReturnType<typeof createAgent>;
|
|
12
|
+
/**
|
|
13
|
+
* True while a Booki history (`createBookiHistory`, `createHistory`) is putting
|
|
14
|
+
* values back for an undo or a seek. Those changes report `source: "agent"`,
|
|
15
|
+
* because ui-sdk restores through the bridge; check this in your own change
|
|
16
|
+
* callback to record them as the person's undo, not the agent's work.
|
|
17
|
+
*/
|
|
18
|
+
declare function isHistoryRestoring(): boolean;
|
|
19
|
+
type CreateBookiAgentOptions = AgentPolicyOptions & {
|
|
20
|
+
/** How long a step waits for `allow`, in ms. Default five minutes. */
|
|
21
|
+
timeout?: number;
|
|
22
|
+
/**
|
|
23
|
+
* The language of Booki's refusals in `act` results. Default `"en"`. With
|
|
24
|
+
* `"nb"` a refusal from a Booki control comes back in Norwegian, and so do the
|
|
25
|
+
* bridge's own ("Needs a person: …", "No component … on the page", "The person
|
|
26
|
+
* said no to …"), and so does a step's own sentence (`Pressed "…".`); a sentence the
|
|
27
|
+
* catalogue does not know stays as written. History
|
|
28
|
+
* (`createBookiHistory`) and WebMCP tools (`registerTools`) work with such an
|
|
29
|
+
* agent; what they answer themselves is in ui-sdk's words.
|
|
30
|
+
*/
|
|
31
|
+
language?: MessageLanguage;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Finance-tuned agent bridge: irreversible `data-agent-confirm` steps need an
|
|
35
|
+
* explicit `allow` answer (no silent approve), and a person's decision
|
|
36
|
+
* (approve, sign, send, release) is refused whatever `allow` says. With
|
|
37
|
+
* `audit`, every refused step and every confirmed one is recorded, with who
|
|
38
|
+
* decided when `allow` answers `{ allow, by }`. Same snapshot/act/query/subscribe
|
|
39
|
+
* surface as `createAgent`.
|
|
40
|
+
*/
|
|
41
|
+
declare function createBookiAgent(options?: CreateBookiAgentOptions): AgentBridge;
|
|
42
|
+
type RegisterToolsOptions = Omit<AgentPolicyOptions, "allow"> & {
|
|
43
|
+
/**
|
|
44
|
+
* Decides each step the browser's agent takes. `"bridge"`: the agent's own
|
|
45
|
+
* `allow` (from `createBookiAgent`) decides, once, and Booki registers the
|
|
46
|
+
* tools itself, so they answer in the agent's language and, with `audit`, a
|
|
47
|
+
* control's own refusals are recorded. A function: a second gate after the
|
|
48
|
+
* bridge's, through ui-sdk's registration. Give the same dialog to both and
|
|
49
|
+
* the person is asked twice.
|
|
50
|
+
*/
|
|
51
|
+
allow: NonNullable<AgentPolicyOptions["allow"]> | "bridge";
|
|
52
|
+
/** Prefix for the tool names, like `"acme"` for `acme_snapshot`, `acme_act`, `acme_query`. Needs `allow: "bridge"`. */
|
|
53
|
+
prefix?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Registers the agent's tools with the browser's own agent (WebMCP): `snapshot`,
|
|
57
|
+
* `act` and `query`. A person's decision is refused whatever `allow` says. The
|
|
58
|
+
* browser's agent acts in the person's session: keep this off until your
|
|
59
|
+
* server can tell it from the person.
|
|
60
|
+
*/
|
|
61
|
+
declare function registerTools(agent: AgentBridge, options: RegisterToolsOptions): () => void;
|
|
62
|
+
type AttachAuditPush = (event: Omit<AuditEvent, "id" | "at">) => void;
|
|
63
|
+
type AttachAuditOptions = {
|
|
64
|
+
agentId?: string;
|
|
65
|
+
ruleVersion?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Subscribe to bridge changes and push audit rows when `source === "agent"`.
|
|
69
|
+
* Returns the unsubscribe function.
|
|
70
|
+
*/
|
|
71
|
+
declare function attachAudit(agent: AgentBridge, push: AttachAuditPush, agentIdOrOptions?: string | AttachAuditOptions): () => void;
|
|
72
|
+
/**
|
|
73
|
+
* Stage preview changes for a propose → allow → commit loop.
|
|
74
|
+
* Thin alias over UI SDK `stageChanges` (async).
|
|
75
|
+
*/
|
|
76
|
+
declare function proposeChanges(agent: AgentBridge, changes: Parameters<typeof stageChanges>[1]): Promise<{
|
|
77
|
+
applied: readonly {
|
|
78
|
+
ref: string;
|
|
79
|
+
key: string;
|
|
80
|
+
before: unknown;
|
|
81
|
+
value: unknown;
|
|
82
|
+
}[];
|
|
83
|
+
revert(): Promise<{
|
|
84
|
+
ref: string;
|
|
85
|
+
key: string;
|
|
86
|
+
before: unknown;
|
|
87
|
+
value: unknown;
|
|
88
|
+
}[]>;
|
|
89
|
+
}>;
|
|
90
|
+
/**
|
|
91
|
+
* State keys Booki primitives report changes on, each restorable through its
|
|
92
|
+
* `set<Key>` agent action: `minor` (AmountField → setMinor), `lines`
|
|
93
|
+
* (VoucherComposer → setLines), `digits` (OrganizationNumberInput →
|
|
94
|
+
* setDigits), plus ui-sdk's defaults. Secret fields (bank account, IBAN) are
|
|
95
|
+
* recorded as redacted and can't be restored by design.
|
|
96
|
+
*/
|
|
97
|
+
declare const BOOKI_HISTORY_KEYS: string[];
|
|
98
|
+
type BookiHistoryOptions = NonNullable<Parameters<typeof createHistory$1>[1]> & {
|
|
99
|
+
/**
|
|
100
|
+
* Who an undo or a seek is for, in `attachAudit` rows: the person's actor id,
|
|
101
|
+
* like `"person:kari"`, or a function that returns the one signed in at the
|
|
102
|
+
* moment of the undo. Default `"person"`.
|
|
103
|
+
*/
|
|
104
|
+
by?: string | (() => string | undefined);
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* History bound to a finance agent (undo agent work, describe entries).
|
|
108
|
+
* Records Booki's keys by default (see `BOOKI_HISTORY_KEYS`); pass `keys` to
|
|
109
|
+
* replace the list.
|
|
110
|
+
*/
|
|
111
|
+
declare function createBookiHistory(agent: AgentBridge, options?: BookiHistoryOptions): {
|
|
112
|
+
seek: (to: number) => Promise<{
|
|
113
|
+
ref: string;
|
|
114
|
+
key: string;
|
|
115
|
+
value: unknown;
|
|
116
|
+
}[]>;
|
|
117
|
+
undoSource: (source: string) => Promise<{
|
|
118
|
+
ref: string;
|
|
119
|
+
key: string;
|
|
120
|
+
value: unknown;
|
|
121
|
+
}[]>;
|
|
122
|
+
entries: () => readonly _ui_sdk_core_history.HistoryEntry[];
|
|
123
|
+
position: () => number;
|
|
124
|
+
subscribe(listener: () => void): () => boolean;
|
|
125
|
+
clear(): void;
|
|
126
|
+
destroy(): void;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* ui-sdk's `createHistory`, for any agent `createBookiAgent` made, also one with
|
|
130
|
+
* a `language`: undo and redo run through the bridge itself, so their own
|
|
131
|
+
* results are in ui-sdk's words. While `seek` or `undoSource` puts values
|
|
132
|
+
* back, `attachAudit` records the changes under `by` (the person), not the
|
|
133
|
+
* agent, and `isHistoryRestoring()` is true.
|
|
134
|
+
*/
|
|
135
|
+
declare function createHistory(agent: AgentBridge, options?: BookiHistoryOptions): {
|
|
136
|
+
seek: (to: number) => Promise<{
|
|
137
|
+
ref: string;
|
|
138
|
+
key: string;
|
|
139
|
+
value: unknown;
|
|
140
|
+
}[]>;
|
|
141
|
+
undoSource: (source: string) => Promise<{
|
|
142
|
+
ref: string;
|
|
143
|
+
key: string;
|
|
144
|
+
value: unknown;
|
|
145
|
+
}[]>;
|
|
146
|
+
entries: () => readonly _ui_sdk_core_history.HistoryEntry[];
|
|
147
|
+
position: () => number;
|
|
148
|
+
subscribe(listener: () => void): () => boolean;
|
|
149
|
+
clear(): void;
|
|
150
|
+
destroy(): void;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export { type AgentBridge, type AttachAuditOptions, type AttachAuditPush, BOOKI_HISTORY_KEYS, type BookiHistoryOptions, type CreateBookiAgentOptions, type RegisterToolsOptions, attachAudit, createBookiAgent, createBookiHistory, createHistory, isHistoryRestoring, proposeChanges, registerTools };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
BOOKI_HISTORY_KEYS,
|
|
4
|
+
attachAudit,
|
|
5
|
+
createBookiAgent,
|
|
6
|
+
createBookiHistory,
|
|
7
|
+
createHistory,
|
|
8
|
+
describeEntry,
|
|
9
|
+
isHistoryRestoring,
|
|
10
|
+
proposeChanges,
|
|
11
|
+
registerTools,
|
|
12
|
+
stageChanges
|
|
13
|
+
} from "./chunk-SHZFZRHV.js";
|
|
14
|
+
import "./chunk-HKYEHBQT.js";
|
|
15
|
+
export {
|
|
16
|
+
BOOKI_HISTORY_KEYS,
|
|
17
|
+
attachAudit,
|
|
18
|
+
createBookiAgent,
|
|
19
|
+
createBookiHistory,
|
|
20
|
+
createHistory,
|
|
21
|
+
describeEntry,
|
|
22
|
+
isHistoryRestoring,
|
|
23
|
+
proposeChanges,
|
|
24
|
+
registerTools,
|
|
25
|
+
stageChanges
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=booki-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Parts } from '@ui-sdk/react/primitive';
|
|
3
|
+
export { WaterfallStep } from '@booki-aui/primitives/chart-math';
|
|
4
|
+
import { CashflowStep, Details, cashflowWaterfall } from '@booki-aui/primitives/cashflow-waterfall';
|
|
5
|
+
export { CashflowStep, cashflowWaterfall } from '@booki-aui/primitives/cashflow-waterfall';
|
|
6
|
+
|
|
7
|
+
declare const TAGS: {
|
|
8
|
+
readonly root: "div";
|
|
9
|
+
readonly step: "button";
|
|
10
|
+
};
|
|
11
|
+
declare const parts: Parts<typeof cashflowWaterfall, typeof TAGS>;
|
|
12
|
+
declare const CashflowWaterfallRoot: (typeof parts)["Root"];
|
|
13
|
+
declare const CashflowWaterfallStep: (typeof parts)["Step"];
|
|
14
|
+
type CashflowWaterfallProps = {
|
|
15
|
+
openingMinor: number;
|
|
16
|
+
/** The closing balance as booked; checked against opening plus the steps. */
|
|
17
|
+
closingMinor?: number;
|
|
18
|
+
steps: CashflowStep[];
|
|
19
|
+
/** Defaults to the locale profile's currency. */
|
|
20
|
+
currency?: string;
|
|
21
|
+
drill?: string | null;
|
|
22
|
+
defaultDrill?: string | null;
|
|
23
|
+
/** A step was drilled into, by a person's click or an agent's `drill`. */
|
|
24
|
+
onDrill?: (id: string, details: Details) => void;
|
|
25
|
+
title?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
"aria-label"?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Composed waterfall: the opening balance, one floating bar per movement
|
|
31
|
+
* (cash in in the success colour, cash out in the danger colour), the
|
|
32
|
+
* closing balance, a line saying whether it reconciles, a tooltip and a table.
|
|
33
|
+
*/
|
|
34
|
+
declare function CashflowWaterfall({ openingMinor, closingMinor, steps, currency, drill, defaultDrill, onDrill, title, className, "aria-label": ariaLabel, }: CashflowWaterfallProps): react.JSX.Element;
|
|
35
|
+
|
|
36
|
+
export { CashflowWaterfall, type CashflowWaterfallProps, CashflowWaterfallRoot, CashflowWaterfallStep };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
CashflowWaterfall,
|
|
4
|
+
CashflowWaterfallRoot,
|
|
5
|
+
CashflowWaterfallStep,
|
|
6
|
+
cashflowWaterfall
|
|
7
|
+
} from "./chunk-7MYFKLPB.js";
|
|
8
|
+
import "./chunk-WDME4U42.js";
|
|
9
|
+
import "./chunk-GVP2N3K6.js";
|
|
10
|
+
import "./chunk-HKYEHBQT.js";
|
|
11
|
+
export {
|
|
12
|
+
CashflowWaterfall,
|
|
13
|
+
CashflowWaterfallRoot,
|
|
14
|
+
CashflowWaterfallStep,
|
|
15
|
+
cashflowWaterfall
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=cashflow-waterfall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a control's `on…Change` gets after the new value: why it changed and
|
|
3
|
+
* from where. `source === "agent"` is the agent's change, and anything else a
|
|
4
|
+
* person's: send the write with that credential. Read it from the change, not
|
|
5
|
+
* from whether an agent call is running: a person can click while the agent's
|
|
6
|
+
* step waits for an answer.
|
|
7
|
+
*/
|
|
8
|
+
type BookiChangeDetails = {
|
|
9
|
+
reason: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
cancel?: () => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type { BookiChangeDetails as B };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
MoneyAmount
|
|
4
|
+
} from "./chunk-OXHKA3UZ.js";
|
|
5
|
+
import {
|
|
6
|
+
useBookiLocaleOptional
|
|
7
|
+
} from "./chunk-GVP2N3K6.js";
|
|
8
|
+
|
|
9
|
+
// src/payment-confirm.tsx
|
|
10
|
+
import { formatMoney, fromMajor } from "@booki-aui/core/money";
|
|
11
|
+
import { Button } from "@ui-sdk/react/button";
|
|
12
|
+
import { Input } from "@ui-sdk/react/input";
|
|
13
|
+
import { useState } from "react";
|
|
14
|
+
import { personOnly } from "@booki-aui/primitives/person-only";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function PaymentConfirm({
|
|
17
|
+
payee,
|
|
18
|
+
amount,
|
|
19
|
+
bankAccount,
|
|
20
|
+
paymentReference,
|
|
21
|
+
message,
|
|
22
|
+
feeMajor = 0,
|
|
23
|
+
confirmWord = "APPROVE",
|
|
24
|
+
onConfirm,
|
|
25
|
+
onCancel,
|
|
26
|
+
className
|
|
27
|
+
}) {
|
|
28
|
+
const { profile } = useBookiLocaleOptional();
|
|
29
|
+
const [typed, setTyped] = useState("");
|
|
30
|
+
const m = typeof amount === "number" ? fromMajor(amount, profile.currency) : amount;
|
|
31
|
+
const canConfirm = typed.trim().toUpperCase() === confirmWord.toUpperCase();
|
|
32
|
+
return /* @__PURE__ */ jsxs("section", { "data-slot": "payment-confirm", className, children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
34
|
+
/* @__PURE__ */ jsx("p", { "data-slot": "payment-confirm-label", children: profile.copy.amount }),
|
|
35
|
+
/* @__PURE__ */ jsx(MoneyAmount, { value: m, size: "lg" })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ jsxs("dl", { "data-slot": "payment-confirm-details", children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
39
|
+
/* @__PURE__ */ jsx("dt", { children: profile.copy.payee }),
|
|
40
|
+
/* @__PURE__ */ jsx("dd", { children: payee })
|
|
41
|
+
] }),
|
|
42
|
+
bankAccount ? /* @__PURE__ */ jsxs("div", { children: [
|
|
43
|
+
/* @__PURE__ */ jsx("dt", { children: profile.copy.bankAccount }),
|
|
44
|
+
/* @__PURE__ */ jsx("dd", { children: bankAccount })
|
|
45
|
+
] }) : null,
|
|
46
|
+
paymentReference ? /* @__PURE__ */ jsxs("div", { children: [
|
|
47
|
+
/* @__PURE__ */ jsx("dt", { children: profile.copy.paymentReference }),
|
|
48
|
+
/* @__PURE__ */ jsx("dd", { children: paymentReference })
|
|
49
|
+
] }) : null,
|
|
50
|
+
message ? /* @__PURE__ */ jsxs("div", { children: [
|
|
51
|
+
/* @__PURE__ */ jsx("dt", { children: profile.copy.memo }),
|
|
52
|
+
/* @__PURE__ */ jsx("dd", { children: message })
|
|
53
|
+
] }) : null,
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
55
|
+
/* @__PURE__ */ jsx("dt", { children: profile.copy.fee }),
|
|
56
|
+
/* @__PURE__ */ jsx("dd", { children: formatMoney(fromMajor(feeMajor, profile.currency), {
|
|
57
|
+
locale: profile.locale
|
|
58
|
+
}) })
|
|
59
|
+
] })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ jsxs("label", { "data-slot": "payment-confirm-type", "data-agent-confirm": personOnly("Confirm this payment with a person"), children: [
|
|
62
|
+
/* @__PURE__ */ jsx("span", { children: profile.copy.typeToConfirm.replace("APPROVE", confirmWord) }),
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
Input,
|
|
65
|
+
{
|
|
66
|
+
value: typed,
|
|
67
|
+
autoComplete: "off",
|
|
68
|
+
onValueChange: (v) => setTyped(v),
|
|
69
|
+
"aria-label": profile.copy.typeToConfirm
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { "data-slot": "payment-confirm-actions", children: [
|
|
74
|
+
onCancel ? /* @__PURE__ */ jsx(Button, { "data-variant": "secondary", type: "button", onClick: onCancel, children: profile.copy.cancel }) : null,
|
|
75
|
+
onConfirm ? /* @__PURE__ */ jsx(
|
|
76
|
+
Button,
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
disabled: !canConfirm,
|
|
80
|
+
"data-agent-confirm": personOnly("Confirm this payment with a person"),
|
|
81
|
+
onClick: () => onConfirm(),
|
|
82
|
+
children: profile.copy.confirmPayment
|
|
83
|
+
}
|
|
84
|
+
) : null
|
|
85
|
+
] })
|
|
86
|
+
] });
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
PaymentConfirm
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=chunk-2HM7YSBC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/payment-confirm.tsx"],"sourcesContent":["import { formatMoney, fromMajor, type Money } from \"@booki-aui/core/money\";\nimport { Button } from \"@ui-sdk/react/button\";\nimport { Input } from \"@ui-sdk/react/input\";\nimport { useState } from \"react\";\nimport { MoneyAmount } from \"./money-amount.js\";\nimport { useBookiLocaleOptional } from \"./locale.js\";\nimport { personOnly } from \"@booki-aui/primitives/person-only\";\n\nexport type PaymentConfirmProps = {\n payee: string;\n /** Major units or Money */\n amount: number | Money;\n bankAccount?: string;\n paymentReference?: string;\n message?: string;\n feeMajor?: number;\n confirmWord?: string;\n onConfirm?: () => void | Promise<void>;\n onCancel?: () => void;\n className?: string;\n};\n\nfunction PaymentConfirm({\n payee,\n amount,\n bankAccount,\n paymentReference,\n message,\n feeMajor = 0,\n confirmWord = \"APPROVE\",\n onConfirm,\n onCancel,\n className,\n}: PaymentConfirmProps) {\n const { profile } = useBookiLocaleOptional();\n const [typed, setTyped] = useState(\"\");\n const m = typeof amount === \"number\" ? fromMajor(amount, profile.currency) : amount;\n const canConfirm = typed.trim().toUpperCase() === confirmWord.toUpperCase();\n\n return (\n <section data-slot=\"payment-confirm\" className={className}>\n <div>\n <p data-slot=\"payment-confirm-label\">{profile.copy.amount}</p>\n <MoneyAmount value={m} size=\"lg\" />\n </div>\n <dl data-slot=\"payment-confirm-details\">\n <div>\n <dt>{profile.copy.payee}</dt>\n <dd>{payee}</dd>\n </div>\n {bankAccount ? (\n <div>\n <dt>{profile.copy.bankAccount}</dt>\n <dd>{bankAccount}</dd>\n </div>\n ) : null}\n {paymentReference ? (\n <div>\n <dt>{profile.copy.paymentReference}</dt>\n <dd>{paymentReference}</dd>\n </div>\n ) : null}\n {message ? (\n <div>\n <dt>{profile.copy.memo}</dt>\n <dd>{message}</dd>\n </div>\n ) : null}\n <div>\n <dt>{profile.copy.fee}</dt>\n <dd>\n {formatMoney(fromMajor(feeMajor, profile.currency), {\n locale: profile.locale,\n })}\n </dd>\n </div>\n </dl>\n\n {/* The typed word is the person's confirmation: an agent may not type it either. */}\n <label data-slot=\"payment-confirm-type\" data-agent-confirm={personOnly(\"Confirm this payment with a person\")}>\n <span>{profile.copy.typeToConfirm.replace(\"APPROVE\", confirmWord)}</span>\n <Input\n value={typed}\n autoComplete=\"off\"\n onValueChange={(v: string) => setTyped(v)}\n aria-label={profile.copy.typeToConfirm}\n />\n </label>\n\n <div data-slot=\"payment-confirm-actions\">\n {onCancel ? (\n <Button data-variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {profile.copy.cancel}\n </Button>\n ) : null}\n {onConfirm ? (\n <Button\n type=\"button\"\n disabled={!canConfirm}\n data-agent-confirm={personOnly(\"Confirm this payment with a person\")}\n onClick={() => onConfirm()}\n >\n {profile.copy.confirmPayment}\n </Button>\n ) : null}\n </div>\n </section>\n );\n}\n\nexport { PaymentConfirm };\n"],"mappings":";;;;;;;;;AAAA,SAAS,aAAa,iBAA6B;AACnD,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,gBAAgB;AAGzB,SAAS,kBAAkB;AAmCrB,SACE,KADF;AAnBN,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,EAAE,QAAQ,IAAI,uBAAuB;AAC3C,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AACrC,QAAM,IAAI,OAAO,WAAW,WAAW,UAAU,QAAQ,QAAQ,QAAQ,IAAI;AAC7E,QAAM,aAAa,MAAM,KAAK,EAAE,YAAY,MAAM,YAAY,YAAY;AAE1E,SACE,qBAAC,aAAQ,aAAU,mBAAkB,WACnC;AAAA,yBAAC,SACC;AAAA,0BAAC,OAAE,aAAU,yBAAyB,kBAAQ,KAAK,QAAO;AAAA,MAC1D,oBAAC,eAAY,OAAO,GAAG,MAAK,MAAK;AAAA,OACnC;AAAA,IACA,qBAAC,QAAG,aAAU,2BACZ;AAAA,2BAAC,SACC;AAAA,4BAAC,QAAI,kBAAQ,KAAK,OAAM;AAAA,QACxB,oBAAC,QAAI,iBAAM;AAAA,SACb;AAAA,MACC,cACC,qBAAC,SACC;AAAA,4BAAC,QAAI,kBAAQ,KAAK,aAAY;AAAA,QAC9B,oBAAC,QAAI,uBAAY;AAAA,SACnB,IACE;AAAA,MACH,mBACC,qBAAC,SACC;AAAA,4BAAC,QAAI,kBAAQ,KAAK,kBAAiB;AAAA,QACnC,oBAAC,QAAI,4BAAiB;AAAA,SACxB,IACE;AAAA,MACH,UACC,qBAAC,SACC;AAAA,4BAAC,QAAI,kBAAQ,KAAK,MAAK;AAAA,QACvB,oBAAC,QAAI,mBAAQ;AAAA,SACf,IACE;AAAA,MACJ,qBAAC,SACC;AAAA,4BAAC,QAAI,kBAAQ,KAAK,KAAI;AAAA,QACtB,oBAAC,QACE,sBAAY,UAAU,UAAU,QAAQ,QAAQ,GAAG;AAAA,UAClD,QAAQ,QAAQ;AAAA,QAClB,CAAC,GACH;AAAA,SACF;AAAA,OACF;AAAA,IAGA,qBAAC,WAAM,aAAU,wBAAuB,sBAAoB,WAAW,oCAAoC,GACzG;AAAA,0BAAC,UAAM,kBAAQ,KAAK,cAAc,QAAQ,WAAW,WAAW,GAAE;AAAA,MAClE;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,UACP,cAAa;AAAA,UACb,eAAe,CAAC,MAAc,SAAS,CAAC;AAAA,UACxC,cAAY,QAAQ,KAAK;AAAA;AAAA,MAC3B;AAAA,OACF;AAAA,IAEA,qBAAC,SAAI,aAAU,2BACZ;AAAA,iBACC,oBAAC,UAAO,gBAAa,aAAY,MAAK,UAAS,SAAS,UACrD,kBAAQ,KAAK,QAChB,IACE;AAAA,MACH,YACC;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,CAAC;AAAA,UACX,sBAAoB,WAAW,oCAAoC;AAAA,UACnE,SAAS,MAAM,UAAU;AAAA,UAExB,kBAAQ,KAAK;AAAA;AAAA,MAChB,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
AmountField
|
|
4
|
+
} from "./chunk-MBLQSZHE.js";
|
|
5
|
+
|
|
6
|
+
// src/amount-input.tsx
|
|
7
|
+
import { money } from "@booki-aui/core/money";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function AmountInput({ onValueChange, currency, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
AmountField,
|
|
12
|
+
{
|
|
13
|
+
currency,
|
|
14
|
+
...props,
|
|
15
|
+
onValueChange: (minor) => {
|
|
16
|
+
if (!onValueChange) return;
|
|
17
|
+
const code = currency ?? "NOK";
|
|
18
|
+
onValueChange(minor, money(minor, code));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
AmountInput
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=chunk-35QKOOAI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/amount-input.tsx"],"sourcesContent":["import { money, type Money } from \"@booki-aui/core/money\";\nimport { AmountField, type AmountFieldProps } from \"./amount-field.js\";\n\nexport type AmountInputProps = Omit<AmountFieldProps, \"onValueChange\"> & {\n /** @deprecated Prefer AmountField + onValueChange(minor). Kept for apps that need Money. */\n onValueChange?: (minor: number | null, money: Money | null) => void;\n};\n\n/**\n * Compatibility wrapper around AmountField (definePrimitive).\n * New code should import AmountField for agent `setMinor` / snapshot `value`.\n */\nfunction AmountInput({ onValueChange, currency, ...props }: AmountInputProps) {\n return (\n <AmountField\n currency={currency}\n {...props}\n onValueChange={(minor) => {\n if (!onValueChange) return;\n const code = currency ?? \"NOK\";\n onValueChange(minor, money(minor, code));\n }}\n />\n );\n}\n\nexport { AmountInput };\n"],"mappings":";;;;;;AAAA,SAAS,aAAyB;AAc9B;AAFJ,SAAS,YAAY,EAAE,eAAe,UAAU,GAAG,MAAM,GAAqB;AAC5E,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACC,GAAG;AAAA,MACJ,eAAe,CAAC,UAAU;AACxB,YAAI,CAAC,cAAe;AACpB,cAAM,OAAO,YAAY;AACzB,sBAAc,OAAO,MAAM,OAAO,IAAI,CAAC;AAAA,MACzC;AAAA;AAAA,EACF;AAEJ;","names":[]}
|