@booki-aui/core 0.2.0 → 0.3.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 +20 -0
- package/dist/activity.js +2 -2
- package/dist/aging.js +2 -2
- package/dist/approval.js +2 -2
- package/dist/attachments.js +2 -2
- package/dist/audit.js +2 -2
- package/dist/{chunk-2H3DAON4.js → chunk-2HIQCBZT.js} +2 -2
- package/dist/{chunk-4OAXKS34.js → chunk-33O2OHL6.js} +2 -2
- package/dist/{chunk-OUWAGY5G.js → chunk-4F5QLWKQ.js} +4 -4
- package/dist/{chunk-5MYAIV42.js → chunk-5ELWBE73.js} +13 -3
- package/dist/{chunk-5MYAIV42.js.map → chunk-5ELWBE73.js.map} +1 -1
- package/dist/{chunk-3WGVKVPL.js → chunk-64OXR7M2.js} +2 -2
- package/dist/{chunk-O7PLFRE7.js → chunk-A2QYZDOI.js} +2 -2
- package/dist/{chunk-5Z6LU5LH.js → chunk-AK5V6MNR.js} +2 -2
- package/dist/{chunk-HWGE4OOL.js → chunk-DT3HAYKU.js} +3 -3
- package/dist/{chunk-AGNXTHJA.js → chunk-FWZPV7NF.js} +2 -2
- package/dist/{chunk-I4YPEKDY.js → chunk-GGK3KTR6.js} +2 -2
- package/dist/{chunk-LJAY7P3Q.js → chunk-GH6FRLYM.js} +2 -2
- package/dist/{chunk-ROCF6IEK.js → chunk-GSDFDZPH.js} +2 -2
- package/dist/{chunk-6BK7VPNH.js → chunk-HCJY7UL5.js} +3 -3
- package/dist/{chunk-CUKV2KU3.js → chunk-HTILL5EQ.js} +2 -2
- package/dist/{chunk-QUMUL4OH.js → chunk-I5SGNZIS.js} +2 -2
- package/dist/{chunk-U5T5SUPP.js → chunk-J3LLJEU2.js} +9 -1
- package/dist/{chunk-U5T5SUPP.js.map → chunk-J3LLJEU2.js.map} +1 -1
- package/dist/{chunk-N77E7ZP7.js → chunk-LR4X7GTZ.js} +2 -2
- package/dist/{chunk-MV3NCGG4.js → chunk-LVKCG5WR.js} +3 -3
- package/dist/{chunk-BMSGD3FU.js → chunk-PG6CC27E.js} +2 -2
- package/dist/{chunk-XXMOQEIG.js → chunk-PL2ZRRTV.js} +2 -2
- package/dist/{chunk-JQFQM2K3.js → chunk-PLYGQ63I.js} +2 -2
- package/dist/{chunk-4ONDQS7Q.js → chunk-SBWIM62T.js} +2 -2
- package/dist/{chunk-EGSWMJ7L.js → chunk-SPA45TN5.js} +2 -2
- package/dist/{chunk-DJPVY5F2.js → chunk-TYL4PAUC.js} +2 -2
- package/dist/{chunk-V37IQ36D.js → chunk-UFGTZK2J.js} +2 -2
- package/dist/{chunk-JIYWHAO3.js → chunk-VMDKFRLL.js} +2 -2
- package/dist/{chunk-NY6TSOQO.js → chunk-XSBPSQMB.js} +2 -2
- package/dist/{chunk-T3M424SP.js → chunk-YGHY2MVR.js} +3 -3
- package/dist/{chunk-FP52SC7S.js → chunk-YUPCBRRP.js} +2 -2
- package/dist/{chunk-3PAJMQ5H.js → chunk-ZFWPR3SQ.js} +3 -3
- package/dist/client-request.js +2 -2
- package/dist/close.js +2 -2
- package/dist/document-signoff.js +2 -2
- package/dist/expense.js +2 -2
- package/dist/findings.js +2 -2
- package/dist/fixed-assets.js +3 -3
- package/dist/funnel.js +2 -2
- package/dist/fx.js +3 -3
- package/dist/index.js +30 -30
- package/dist/invoice.js +2 -2
- package/dist/ledger.js +3 -3
- package/dist/locale/index.js +2 -2
- package/dist/messages.js +2 -2
- package/dist/money.js +2 -2
- package/dist/msg.d.ts +8 -0
- package/dist/msg.js +1 -1
- package/dist/payment-batch.js +2 -2
- package/dist/period-lock.js +3 -3
- package/dist/period.js +2 -2
- package/dist/permissions.js +2 -2
- package/dist/pipeline.js +2 -2
- package/dist/reconciliation.js +2 -2
- package/dist/recurring.js +2 -2
- package/dist/server.d.ts +8 -2
- package/dist/server.js +17 -17
- package/dist/server.js.map +1 -1
- package/dist/supplier-invoice.js +2 -2
- package/dist/table.js +2 -2
- package/dist/vat-return.js +3 -3
- package/dist/voucher.js +6 -6
- package/package.json +1 -1
- /package/dist/{chunk-2H3DAON4.js.map → chunk-2HIQCBZT.js.map} +0 -0
- /package/dist/{chunk-4OAXKS34.js.map → chunk-33O2OHL6.js.map} +0 -0
- /package/dist/{chunk-OUWAGY5G.js.map → chunk-4F5QLWKQ.js.map} +0 -0
- /package/dist/{chunk-3WGVKVPL.js.map → chunk-64OXR7M2.js.map} +0 -0
- /package/dist/{chunk-O7PLFRE7.js.map → chunk-A2QYZDOI.js.map} +0 -0
- /package/dist/{chunk-5Z6LU5LH.js.map → chunk-AK5V6MNR.js.map} +0 -0
- /package/dist/{chunk-HWGE4OOL.js.map → chunk-DT3HAYKU.js.map} +0 -0
- /package/dist/{chunk-AGNXTHJA.js.map → chunk-FWZPV7NF.js.map} +0 -0
- /package/dist/{chunk-I4YPEKDY.js.map → chunk-GGK3KTR6.js.map} +0 -0
- /package/dist/{chunk-LJAY7P3Q.js.map → chunk-GH6FRLYM.js.map} +0 -0
- /package/dist/{chunk-ROCF6IEK.js.map → chunk-GSDFDZPH.js.map} +0 -0
- /package/dist/{chunk-6BK7VPNH.js.map → chunk-HCJY7UL5.js.map} +0 -0
- /package/dist/{chunk-CUKV2KU3.js.map → chunk-HTILL5EQ.js.map} +0 -0
- /package/dist/{chunk-QUMUL4OH.js.map → chunk-I5SGNZIS.js.map} +0 -0
- /package/dist/{chunk-N77E7ZP7.js.map → chunk-LR4X7GTZ.js.map} +0 -0
- /package/dist/{chunk-MV3NCGG4.js.map → chunk-LVKCG5WR.js.map} +0 -0
- /package/dist/{chunk-BMSGD3FU.js.map → chunk-PG6CC27E.js.map} +0 -0
- /package/dist/{chunk-XXMOQEIG.js.map → chunk-PL2ZRRTV.js.map} +0 -0
- /package/dist/{chunk-JQFQM2K3.js.map → chunk-PLYGQ63I.js.map} +0 -0
- /package/dist/{chunk-4ONDQS7Q.js.map → chunk-SBWIM62T.js.map} +0 -0
- /package/dist/{chunk-EGSWMJ7L.js.map → chunk-SPA45TN5.js.map} +0 -0
- /package/dist/{chunk-DJPVY5F2.js.map → chunk-TYL4PAUC.js.map} +0 -0
- /package/dist/{chunk-V37IQ36D.js.map → chunk-UFGTZK2J.js.map} +0 -0
- /package/dist/{chunk-JIYWHAO3.js.map → chunk-VMDKFRLL.js.map} +0 -0
- /package/dist/{chunk-NY6TSOQO.js.map → chunk-XSBPSQMB.js.map} +0 -0
- /package/dist/{chunk-T3M424SP.js.map → chunk-YGHY2MVR.js.map} +0 -0
- /package/dist/{chunk-FP52SC7S.js.map → chunk-YUPCBRRP.js.map} +0 -0
- /package/dist/{chunk-3PAJMQ5H.js.map → chunk-ZFWPR3SQ.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @booki/core
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#120](https://github.com/Walgermo/booki/pull/120) [`6a7055c`](https://github.com/Walgermo/booki/commit/6a7055c05fad4d0dacda520afc5fe5823750fa4c) Thanks [@Walgermo](https://github.com/Walgermo)! - Breaking while Booki is 0.x, so this is a minor.
|
|
8
|
+
|
|
9
|
+
`AmountField` and the other form controls now put `aria-invalid`, `aria-describedby` and `aria-errormessage` on the visible input instead of the wrapper, so a screen reader announces an error on the field. If you set `aria-describedby` on one of them and relied on it reaching the wrapper, move it to a wrapper of your own. On the US bank field the account-number input now takes `aria-invalid` too.
|
|
10
|
+
|
|
11
|
+
With `allowEmpty`, `AmountField` now calls `onValueChange(null)` at runtime when the field is emptied (clearing it, or deleting its text). A handler that does arithmetic on the value or calls `money()` on it must handle `null`. `onEmpty` still fires, after `onValueChange`. In types, `onValueChange` is `(minor: number | null, details?) => void` whenever `allowEmpty` is `true` or a `boolean` variable, so a handler typed `(minor: number)` there no longer type-checks: accept `number | null`. With `allowEmpty` left out or `false` the handler still gets a `number`. `<AmountField>` infers this from its own props. The exported `AmountFieldProps` defaults to `boolean`, so a wrapper `function MyAmount(props: AmountFieldProps)` accepts `allowEmpty` and a `number | null` handler; write `AmountFieldProps<false>` to keep a wrapper on a `number` handler. The props are now listed in the catalog and the skill.
|
|
12
|
+
|
|
13
|
+
`useBookiField` takes `group: false` for a field that already has its own labelled group (a `fieldset` with a `legend`): the root loses `role="group"`, so the group is not announced twice. It also has a new `account` kind (`setAccount`): digits of a length range, or a closed `chart` whose unknown numbers are refused with the nearest accounts, in English and Norwegian. An empty number is refused with "an account number is needed" with or without a chart. The check applies to a whole number, so a render that a person types into keeps a draft and calls `change` on blur (see `docs/own-controls.md`).
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#116](https://github.com/Walgermo/booki/pull/116) [`1c95020`](https://github.com/Walgermo/booki/commit/1c95020e1ea0a99556ea58b79e0a590711fdb621) Thanks [@Walgermo](https://github.com/Walgermo)! - With `createBookiAgent({ language: "nb" })` a declined confirm now comes back in Norwegian also when the app's confirm text is a question or several sentences ("Bokføre bilag 12. Dette kan ikke angres: vil du fortsette?"); the confirm text of a refusal is read as page text. `toHttp(verdict).body` is typed (`HttpBody<T>`: the value on success, `{ ok: false, code, message, issues? }` on a refusal) instead of `unknown`, so it can be mapped to your own error shape. A person-only refusal no longer lists the refused agent's own roles under "ask someone with one of these roles".
|
|
18
|
+
|
|
19
|
+
## 0.2.1
|
|
20
|
+
|
|
21
|
+
No changes in this release.
|
|
22
|
+
|
|
3
23
|
## 0.2.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/activity.js
CHANGED
package/dist/aging.js
CHANGED
package/dist/approval.js
CHANGED
package/dist/attachments.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
removeAttachment,
|
|
10
10
|
setAttachmentKind,
|
|
11
11
|
validateAttachmentFile
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-LR4X7GTZ.js";
|
|
13
|
+
import "./chunk-J3LLJEU2.js";
|
|
14
14
|
export {
|
|
15
15
|
ATTACHMENT_KINDS,
|
|
16
16
|
assertEvidenced,
|
package/dist/audit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BookiError,
|
|
3
3
|
msg
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-J3LLJEU2.js";
|
|
5
5
|
|
|
6
6
|
// src/approval.ts
|
|
7
7
|
function checkChain(chain) {
|
|
@@ -129,4 +129,4 @@ export {
|
|
|
129
129
|
decide,
|
|
130
130
|
assertApproved
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-2HIQCBZT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BookiError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J3LLJEU2.js";
|
|
4
4
|
|
|
5
5
|
// src/locale/profiles.ts
|
|
6
6
|
var NO_PROFILE = {
|
|
@@ -385,4 +385,4 @@ export {
|
|
|
385
385
|
BOOKI_PROFILES,
|
|
386
386
|
getBookiProfile
|
|
387
387
|
};
|
|
388
|
-
//# sourceMappingURL=chunk-
|
|
388
|
+
//# sourceMappingURL=chunk-33O2OHL6.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertPostingAllowed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YGHY2MVR.js";
|
|
4
4
|
import {
|
|
5
5
|
assertForeignAmount,
|
|
6
6
|
convertMinor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DT3HAYKU.js";
|
|
8
8
|
import {
|
|
9
9
|
BookiError,
|
|
10
10
|
msg
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-J3LLJEU2.js";
|
|
12
12
|
import {
|
|
13
13
|
LISTED_WHOLE,
|
|
14
14
|
closest
|
|
@@ -420,4 +420,4 @@ export {
|
|
|
420
420
|
buildBalancedSalesVoucher,
|
|
421
421
|
vatPostings
|
|
422
422
|
};
|
|
423
|
-
//# sourceMappingURL=chunk-
|
|
423
|
+
//# sourceMappingURL=chunk-4F5QLWKQ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PLACEHOLDER,
|
|
4
4
|
isBookiError,
|
|
5
5
|
render
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J3LLJEU2.js";
|
|
7
7
|
|
|
8
8
|
// src/messages-nb.ts
|
|
9
9
|
var NB = {
|
|
@@ -456,6 +456,14 @@ var NB = {
|
|
|
456
456
|
"field.person-only-code": '"{item}" er et valg en person m\xE5 ta her. Be dem velge det selv.',
|
|
457
457
|
"field.unknown-code": 'Ingen valg "{value}". Valgene, som verdi (etikett): {items}.',
|
|
458
458
|
"field.unknown-code-more": 'Ingen valg "{value}" blant de {count}. N\xE6rmest: {items}. query({ within, text }) finner en p\xE5 kode eller helt ord.',
|
|
459
|
+
"field.account-not-digits": 'Kontonummeret "{value}" har mer enn sifre. Send bare sifre, uten bokstaver eller skilletegn.',
|
|
460
|
+
"field.account-empty": "Her trengs et kontonummer: {min} til {max} sifre.",
|
|
461
|
+
"field.account-empty-chart": "Her trengs et kontonummer: velg \xE9n av de {count} kontoene i kontoplanen.",
|
|
462
|
+
"field.account-not-text": 'setAccount tar kontonummeret som sifre, som "4711". Fikk {got}.',
|
|
463
|
+
"field.account-range": "minLength {min} er st\xF8rre enn maxLength {max}, s\xE5 ingen kontonummer passer.",
|
|
464
|
+
"field.account-length": 'Kontonummeret "{value}" m\xE5 v\xE6re {min} til {max} sifre.',
|
|
465
|
+
"field.unknown-account": 'Ingen konto "{value}" i kontoplanen. Kontoene, som nummer (navn): {items}.',
|
|
466
|
+
"field.unknown-account-more": 'Ingen konto "{value}" i kontoplanen p\xE5 {count}. N\xE6rmest: {items}. query({ within, text }) finner en p\xE5 nummer eller helt ord.',
|
|
459
467
|
"amount.not-minor": "Bel\xF8pet m\xE5 v\xE6re et sikkert heltall i minste enhet (f.eks. 12500 = 125,00 {currency}), fikk {value}.",
|
|
460
468
|
"amount.below-min": "Bel\xF8pet {minor} (minste enhet) er under minMinor {min}.",
|
|
461
469
|
"amount.above-max": "Bel\xF8pet {minor} (minste enhet) er over maxMinor {max}.",
|
|
@@ -652,7 +660,9 @@ var SENTENCE_PARAMS = /* @__PURE__ */ new Set([
|
|
|
652
660
|
"message",
|
|
653
661
|
"labels",
|
|
654
662
|
"buttons",
|
|
655
|
-
"closed"
|
|
663
|
+
"closed",
|
|
664
|
+
// An app's `data-agent-confirm` text: a question, or two sentences.
|
|
665
|
+
"confirm"
|
|
656
666
|
]);
|
|
657
667
|
var WITHIN_SENTENCE = `(?:(?![.!?:;]\\s+["'(A-Z\xC6\xD8\xC5])[\\s\\S])*?`;
|
|
658
668
|
function escapeRegex(text) {
|
|
@@ -750,4 +760,4 @@ export {
|
|
|
750
760
|
msgIn,
|
|
751
761
|
localize
|
|
752
762
|
};
|
|
753
|
-
//# sourceMappingURL=chunk-
|
|
763
|
+
//# sourceMappingURL=chunk-5ELWBE73.js.map
|