@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.
Files changed (97) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/activity.js +2 -2
  3. package/dist/aging.js +2 -2
  4. package/dist/approval.js +2 -2
  5. package/dist/attachments.js +2 -2
  6. package/dist/audit.js +2 -2
  7. package/dist/{chunk-2H3DAON4.js → chunk-2HIQCBZT.js} +2 -2
  8. package/dist/{chunk-4OAXKS34.js → chunk-33O2OHL6.js} +2 -2
  9. package/dist/{chunk-OUWAGY5G.js → chunk-4F5QLWKQ.js} +4 -4
  10. package/dist/{chunk-5MYAIV42.js → chunk-5ELWBE73.js} +13 -3
  11. package/dist/{chunk-5MYAIV42.js.map → chunk-5ELWBE73.js.map} +1 -1
  12. package/dist/{chunk-3WGVKVPL.js → chunk-64OXR7M2.js} +2 -2
  13. package/dist/{chunk-O7PLFRE7.js → chunk-A2QYZDOI.js} +2 -2
  14. package/dist/{chunk-5Z6LU5LH.js → chunk-AK5V6MNR.js} +2 -2
  15. package/dist/{chunk-HWGE4OOL.js → chunk-DT3HAYKU.js} +3 -3
  16. package/dist/{chunk-AGNXTHJA.js → chunk-FWZPV7NF.js} +2 -2
  17. package/dist/{chunk-I4YPEKDY.js → chunk-GGK3KTR6.js} +2 -2
  18. package/dist/{chunk-LJAY7P3Q.js → chunk-GH6FRLYM.js} +2 -2
  19. package/dist/{chunk-ROCF6IEK.js → chunk-GSDFDZPH.js} +2 -2
  20. package/dist/{chunk-6BK7VPNH.js → chunk-HCJY7UL5.js} +3 -3
  21. package/dist/{chunk-CUKV2KU3.js → chunk-HTILL5EQ.js} +2 -2
  22. package/dist/{chunk-QUMUL4OH.js → chunk-I5SGNZIS.js} +2 -2
  23. package/dist/{chunk-U5T5SUPP.js → chunk-J3LLJEU2.js} +9 -1
  24. package/dist/{chunk-U5T5SUPP.js.map → chunk-J3LLJEU2.js.map} +1 -1
  25. package/dist/{chunk-N77E7ZP7.js → chunk-LR4X7GTZ.js} +2 -2
  26. package/dist/{chunk-MV3NCGG4.js → chunk-LVKCG5WR.js} +3 -3
  27. package/dist/{chunk-BMSGD3FU.js → chunk-PG6CC27E.js} +2 -2
  28. package/dist/{chunk-XXMOQEIG.js → chunk-PL2ZRRTV.js} +2 -2
  29. package/dist/{chunk-JQFQM2K3.js → chunk-PLYGQ63I.js} +2 -2
  30. package/dist/{chunk-4ONDQS7Q.js → chunk-SBWIM62T.js} +2 -2
  31. package/dist/{chunk-EGSWMJ7L.js → chunk-SPA45TN5.js} +2 -2
  32. package/dist/{chunk-DJPVY5F2.js → chunk-TYL4PAUC.js} +2 -2
  33. package/dist/{chunk-V37IQ36D.js → chunk-UFGTZK2J.js} +2 -2
  34. package/dist/{chunk-JIYWHAO3.js → chunk-VMDKFRLL.js} +2 -2
  35. package/dist/{chunk-NY6TSOQO.js → chunk-XSBPSQMB.js} +2 -2
  36. package/dist/{chunk-T3M424SP.js → chunk-YGHY2MVR.js} +3 -3
  37. package/dist/{chunk-FP52SC7S.js → chunk-YUPCBRRP.js} +2 -2
  38. package/dist/{chunk-3PAJMQ5H.js → chunk-ZFWPR3SQ.js} +3 -3
  39. package/dist/client-request.js +2 -2
  40. package/dist/close.js +2 -2
  41. package/dist/document-signoff.js +2 -2
  42. package/dist/expense.js +2 -2
  43. package/dist/findings.js +2 -2
  44. package/dist/fixed-assets.js +3 -3
  45. package/dist/funnel.js +2 -2
  46. package/dist/fx.js +3 -3
  47. package/dist/index.js +30 -30
  48. package/dist/invoice.js +2 -2
  49. package/dist/ledger.js +3 -3
  50. package/dist/locale/index.js +2 -2
  51. package/dist/messages.js +2 -2
  52. package/dist/money.js +2 -2
  53. package/dist/msg.d.ts +8 -0
  54. package/dist/msg.js +1 -1
  55. package/dist/payment-batch.js +2 -2
  56. package/dist/period-lock.js +3 -3
  57. package/dist/period.js +2 -2
  58. package/dist/permissions.js +2 -2
  59. package/dist/pipeline.js +2 -2
  60. package/dist/reconciliation.js +2 -2
  61. package/dist/recurring.js +2 -2
  62. package/dist/server.d.ts +8 -2
  63. package/dist/server.js +17 -17
  64. package/dist/server.js.map +1 -1
  65. package/dist/supplier-invoice.js +2 -2
  66. package/dist/table.js +2 -2
  67. package/dist/vat-return.js +3 -3
  68. package/dist/voucher.js +6 -6
  69. package/package.json +1 -1
  70. /package/dist/{chunk-2H3DAON4.js.map → chunk-2HIQCBZT.js.map} +0 -0
  71. /package/dist/{chunk-4OAXKS34.js.map → chunk-33O2OHL6.js.map} +0 -0
  72. /package/dist/{chunk-OUWAGY5G.js.map → chunk-4F5QLWKQ.js.map} +0 -0
  73. /package/dist/{chunk-3WGVKVPL.js.map → chunk-64OXR7M2.js.map} +0 -0
  74. /package/dist/{chunk-O7PLFRE7.js.map → chunk-A2QYZDOI.js.map} +0 -0
  75. /package/dist/{chunk-5Z6LU5LH.js.map → chunk-AK5V6MNR.js.map} +0 -0
  76. /package/dist/{chunk-HWGE4OOL.js.map → chunk-DT3HAYKU.js.map} +0 -0
  77. /package/dist/{chunk-AGNXTHJA.js.map → chunk-FWZPV7NF.js.map} +0 -0
  78. /package/dist/{chunk-I4YPEKDY.js.map → chunk-GGK3KTR6.js.map} +0 -0
  79. /package/dist/{chunk-LJAY7P3Q.js.map → chunk-GH6FRLYM.js.map} +0 -0
  80. /package/dist/{chunk-ROCF6IEK.js.map → chunk-GSDFDZPH.js.map} +0 -0
  81. /package/dist/{chunk-6BK7VPNH.js.map → chunk-HCJY7UL5.js.map} +0 -0
  82. /package/dist/{chunk-CUKV2KU3.js.map → chunk-HTILL5EQ.js.map} +0 -0
  83. /package/dist/{chunk-QUMUL4OH.js.map → chunk-I5SGNZIS.js.map} +0 -0
  84. /package/dist/{chunk-N77E7ZP7.js.map → chunk-LR4X7GTZ.js.map} +0 -0
  85. /package/dist/{chunk-MV3NCGG4.js.map → chunk-LVKCG5WR.js.map} +0 -0
  86. /package/dist/{chunk-BMSGD3FU.js.map → chunk-PG6CC27E.js.map} +0 -0
  87. /package/dist/{chunk-XXMOQEIG.js.map → chunk-PL2ZRRTV.js.map} +0 -0
  88. /package/dist/{chunk-JQFQM2K3.js.map → chunk-PLYGQ63I.js.map} +0 -0
  89. /package/dist/{chunk-4ONDQS7Q.js.map → chunk-SBWIM62T.js.map} +0 -0
  90. /package/dist/{chunk-EGSWMJ7L.js.map → chunk-SPA45TN5.js.map} +0 -0
  91. /package/dist/{chunk-DJPVY5F2.js.map → chunk-TYL4PAUC.js.map} +0 -0
  92. /package/dist/{chunk-V37IQ36D.js.map → chunk-UFGTZK2J.js.map} +0 -0
  93. /package/dist/{chunk-JIYWHAO3.js.map → chunk-VMDKFRLL.js.map} +0 -0
  94. /package/dist/{chunk-NY6TSOQO.js.map → chunk-XSBPSQMB.js.map} +0 -0
  95. /package/dist/{chunk-T3M424SP.js.map → chunk-YGHY2MVR.js.map} +0 -0
  96. /package/dist/{chunk-FP52SC7S.js.map → chunk-YUPCBRRP.js.map} +0 -0
  97. /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
@@ -11,8 +11,8 @@ import {
11
11
  rescheduleTask,
12
12
  scheduleTask,
13
13
  timeline
14
- } from "./chunk-XXMOQEIG.js";
15
- import "./chunk-U5T5SUPP.js";
14
+ } from "./chunk-PL2ZRRTV.js";
15
+ import "./chunk-J3LLJEU2.js";
16
16
  export {
17
17
  ACTIVITY_KINDS,
18
18
  LOGGED_KINDS,
package/dist/aging.js CHANGED
@@ -5,8 +5,8 @@ import {
5
5
  daysOverdue,
6
6
  overdueParties,
7
7
  partyItems
8
- } from "./chunk-3WGVKVPL.js";
9
- import "./chunk-U5T5SUPP.js";
8
+ } from "./chunk-64OXR7M2.js";
9
+ import "./chunk-J3LLJEU2.js";
10
10
  export {
11
11
  DEFAULT_AGING_LIMITS,
12
12
  ageItems,
package/dist/approval.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  assertApproved,
4
4
  decide,
5
5
  requiredLevels
6
- } from "./chunk-2H3DAON4.js";
7
- import "./chunk-U5T5SUPP.js";
6
+ } from "./chunk-2HIQCBZT.js";
7
+ import "./chunk-J3LLJEU2.js";
8
8
  export {
9
9
  approvalState,
10
10
  assertApproved,
@@ -9,8 +9,8 @@ import {
9
9
  removeAttachment,
10
10
  setAttachmentKind,
11
11
  validateAttachmentFile
12
- } from "./chunk-N77E7ZP7.js";
13
- import "./chunk-U5T5SUPP.js";
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
@@ -17,8 +17,8 @@ import {
17
17
  summarizeSample,
18
18
  withdrawSignOff,
19
19
  workpaperIssues
20
- } from "./chunk-CUKV2KU3.js";
21
- import "./chunk-U5T5SUPP.js";
20
+ } from "./chunk-HTILL5EQ.js";
21
+ import "./chunk-J3LLJEU2.js";
22
22
  export {
23
23
  EMPTY_WORKPAPER,
24
24
  SAMPLE_METHODS,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BookiError,
3
3
  msg
4
- } from "./chunk-U5T5SUPP.js";
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-2H3DAON4.js.map
132
+ //# sourceMappingURL=chunk-2HIQCBZT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BookiError
3
- } from "./chunk-U5T5SUPP.js";
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-4OAXKS34.js.map
388
+ //# sourceMappingURL=chunk-33O2OHL6.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  assertPostingAllowed
3
- } from "./chunk-T3M424SP.js";
3
+ } from "./chunk-YGHY2MVR.js";
4
4
  import {
5
5
  assertForeignAmount,
6
6
  convertMinor
7
- } from "./chunk-HWGE4OOL.js";
7
+ } from "./chunk-DT3HAYKU.js";
8
8
  import {
9
9
  BookiError,
10
10
  msg
11
- } from "./chunk-U5T5SUPP.js";
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-OUWAGY5G.js.map
423
+ //# sourceMappingURL=chunk-4F5QLWKQ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  PLACEHOLDER,
4
4
  isBookiError,
5
5
  render
6
- } from "./chunk-U5T5SUPP.js";
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-5MYAIV42.js.map
763
+ //# sourceMappingURL=chunk-5ELWBE73.js.map