kaafil-react-uikit 0.11.7 → 0.12.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 +45 -0
- package/dist/manager/index.cjs +31 -1
- package/dist/manager/index.cjs.map +1 -1
- package/dist/manager/index.js +31 -1
- package/dist/manager/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,51 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
and this package uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
While on `0.x` a minor bump may carry a breaking change; the entry will say so.
|
|
8
8
|
|
|
9
|
+
## [0.12.0] — 2026-09-18
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Peer floor moves to `kaafil-js@^0.8.0`**, which is why this is a minor and
|
|
14
|
+
not a patch: a consumer pinned to `0.7.x` can no longer install this version.
|
|
15
|
+
The previous floor move was shipped as a patch; that understated it, and this
|
|
16
|
+
entry says so rather than repeating it.
|
|
17
|
+
|
|
18
|
+
0.8.0 makes a drain pull the lanes it applied something on. That closes the
|
|
19
|
+
gap 0.11.8 documented under "Known": a write enqueued without an
|
|
20
|
+
`entity`/`optimistic` pairing reaches the server and leaves the local
|
|
21
|
+
snapshot untouched, so a snapshot-backed list stayed missing its own
|
|
22
|
+
successful write until the screen was reopened. The Recent expenses list on
|
|
23
|
+
the manager's Money tab was the case found in the field. Nothing in this
|
|
24
|
+
package changed for it — the fix is in the engine, and this floor is how a
|
|
25
|
+
consumer actually gets it.
|
|
26
|
+
|
|
27
|
+
## [0.11.8] — 2026-09-18
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **"Spend logged" read ₹0 with the money already spent.** `ManagerMoneySection`
|
|
32
|
+
summed the snapshot-backed `expenses[]` rows for that tile. `useExpenses`
|
|
33
|
+
deliberately enqueues its writes without an optimistic row — a fabricated
|
|
34
|
+
`ExpenseResponse` would have to guess `floatMovementId`, `receiptRequired`
|
|
35
|
+
and the negative-float guard, none of which a client can compute — so a
|
|
36
|
+
freshly logged expense is absent from that array until a pull brings it down,
|
|
37
|
+
and the tile showed zero until the manager reopened the app.
|
|
38
|
+
|
|
39
|
+
The tile now reads `totals.spendTotalMinor`, the server's own spend rollup,
|
|
40
|
+
which the hook already re-reads on every `sync.drained`. That is also simply
|
|
41
|
+
more correct than summing whichever rows this device happens to hold. The
|
|
42
|
+
local sum stays as the offline fallback, since `spendTotalMinor` is
|
|
43
|
+
documented as `undefined` until a read lands and must never be drawn as zero.
|
|
44
|
+
|
|
45
|
+
### Known
|
|
46
|
+
|
|
47
|
+
- The **Recent expenses list** on the same screen still fills only on the next
|
|
48
|
+
pull, for the same reason: no optimistic row, and `sync.drained` is emitted
|
|
49
|
+
without a pull following it. The tile above it is now correct either way.
|
|
50
|
+
Closing the gap properly means either fabricating a row with server-assigned
|
|
51
|
+
fields (rejected, above) or pulling after every drain, which is an engine-wide
|
|
52
|
+
change rather than a component one.
|
|
53
|
+
|
|
9
54
|
## [0.11.7] — 2026-09-18
|
|
10
55
|
|
|
11
56
|
### Fixed
|
package/dist/manager/index.cjs
CHANGED
|
@@ -6043,7 +6043,37 @@ function ReadyManagerMoneySection({
|
|
|
6043
6043
|
issuedMinor: floatRow.issuedMinor,
|
|
6044
6044
|
currency: floatRow.currency
|
|
6045
6045
|
} : void 0,
|
|
6046
|
-
spend:
|
|
6046
|
+
spend: (
|
|
6047
|
+
/*
|
|
6048
|
+
* THE SERVER'S OWN ROLLUP FIRST, the local sum only as a fallback.
|
|
6049
|
+
*
|
|
6050
|
+
* This summed `active` — the snapshot-backed rows — and nothing
|
|
6051
|
+
* else. `useExpenses` deliberately enqueues its writes WITHOUT an
|
|
6052
|
+
* optimistic row (its own DECISION comment: a fabricated
|
|
6053
|
+
* `ExpenseResponse` would have to guess `floatMovementId`,
|
|
6054
|
+
* `receiptRequired` and the negative-float guard, none of which a
|
|
6055
|
+
* client can compute). That decision is right, and its consequence
|
|
6056
|
+
* is that a freshly logged expense is absent from `expenses[]` until
|
|
6057
|
+
* a pull brings it down — so this tile read ₹0 with the money
|
|
6058
|
+
* already spent, on the one screen a manager checks it on.
|
|
6059
|
+
*
|
|
6060
|
+
* `totals.spendTotalMinor` is the server's own spend rollup and the
|
|
6061
|
+
* hook already re-reads it on every `sync.drained`, so it reflects
|
|
6062
|
+
* the write as soon as the queue reaches the server. Using it here
|
|
6063
|
+
* is also simply more correct than summing whichever rows this
|
|
6064
|
+
* device happens to hold.
|
|
6065
|
+
*
|
|
6066
|
+
* The local sum stays as the fallback rather than the primary. Its
|
|
6067
|
+
* own doc says `spendTotalMinor` is `undefined` until a read lands
|
|
6068
|
+
* and must never be drawn as zero — offline, where that read cannot
|
|
6069
|
+
* happen, a sum of the rows actually held is the honest answer, and
|
|
6070
|
+
* it is what offline-first means here.
|
|
6071
|
+
*/
|
|
6072
|
+
expensesReady !== void 0 ? {
|
|
6073
|
+
amountMinor: expensesReady.totals.spendTotalMinor ?? sumSpendMinor(active),
|
|
6074
|
+
currency
|
|
6075
|
+
} : void 0
|
|
6076
|
+
),
|
|
6047
6077
|
collect: collectionsReady !== void 0 ? {
|
|
6048
6078
|
amountMinor: balancesDueRows.reduce((sum, row) => sum + row.outstandingMinor, 0),
|
|
6049
6079
|
travellerCount: balancesDueRows.length,
|