@capxul/sdk-react 2.3.2 → 2.5.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/README.md +21 -0
- package/dist/{controllers-VwUPB619.mjs → controllers-BJ_uFXT3.mjs} +28 -2
- package/dist/index.d.mts +473 -20
- package/dist/index.mjs +1267 -24
- package/dist/testing/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -35,6 +35,19 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
35
35
|
- Rich-data hooks such as `useCapxulProfile`, `useCapxulOrgs`, members, roles,
|
|
36
36
|
treasury, and money hooks remain TanStack Query projections. Personal
|
|
37
37
|
holdings and activity reads start only after the Account is claimed.
|
|
38
|
+
- `CapxulActivity` is the compound activity component. One root owns fetching,
|
|
39
|
+
paging, filtering, searching, the summary numbers, row meaning, memo saving
|
|
40
|
+
and CSV building, and draws nothing. The `.Summary`, `.Filters`, `.Search`,
|
|
41
|
+
`.Rows`, `.LoadMore`, `.Detail` and `.Export` region parts each hand the
|
|
42
|
+
screen one finished slice, so the same component serves a ten-row dashboard
|
|
43
|
+
card and a full transactions page. Paging is infinite scroll through a
|
|
44
|
+
sentinel ref; `.Export` pages at the backend maximum and stops at 5,000 rows
|
|
45
|
+
rather than draining a ledger. Detail state and reads stay scoped to the root
|
|
46
|
+
actor.
|
|
47
|
+
- `capxulKeys` is the public query-key catalog. An application invalidates SDK
|
|
48
|
+
lanes with it instead of keeping a parallel key namespace.
|
|
49
|
+
- `useCapxulHoldings` takes an optional `actor`, and its cache entry is keyed by
|
|
50
|
+
that actor.
|
|
38
51
|
- `CapxulSendMoney` is the compound send component. One root owns the send
|
|
39
52
|
behaviour and draws nothing. The `.Asset`, `.Amount`, `.Recipient`, and
|
|
40
53
|
`.Actions` region parts each hand the screen one finished slice. The engine
|
|
@@ -48,6 +61,14 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
48
61
|
actor paths ship: a personal actor reads the account book, and an
|
|
49
62
|
organization actor reads the organization book. The `managePeople` capability
|
|
50
63
|
gate stays in the app, on `CapxulOrgMember.Can`.
|
|
64
|
+
- `CapxulPayroll` and `CapxulPayrollRun` are the two payroll compound
|
|
65
|
+
components. `CapxulPayroll` owns the payroll page's reads through its
|
|
66
|
+
`.Summary` and `.Groups` region parts; `CapxulPayrollRun` owns the run
|
|
67
|
+
composer through `.Recipients`, `.Amounts`, `.Asset`, `.Summary`, and
|
|
68
|
+
`.Actions`. A screen places any subset — the pay-now sheet places all five
|
|
69
|
+
run parts, the group sheet places two. `.Actions.blockedReason` names the
|
|
70
|
+
first false fact as a `CapxulPayrollRunBlockedReason` code, never a
|
|
71
|
+
sentence. Both engine hooks stay module-scoped.
|
|
51
72
|
|
|
52
73
|
The packed npm package exposes `@capxul/sdk-react` and
|
|
53
74
|
`@capxul/sdk-react/testing`. The workspace-only `@capxul/sdk-react/headless`
|
|
@@ -103,13 +103,39 @@ const capxulKeys = {
|
|
|
103
103
|
scope,
|
|
104
104
|
includeHidden ? "all" : "visible"
|
|
105
105
|
],
|
|
106
|
+
payrollRuns: (orgId) => [
|
|
107
|
+
"capxul",
|
|
108
|
+
"org",
|
|
109
|
+
orgId ?? "pending",
|
|
110
|
+
"payroll",
|
|
111
|
+
"runs"
|
|
112
|
+
],
|
|
113
|
+
payrollGroups: (orgId) => [
|
|
114
|
+
"capxul",
|
|
115
|
+
"org",
|
|
116
|
+
orgId ?? "pending",
|
|
117
|
+
"payroll",
|
|
118
|
+
"groups"
|
|
119
|
+
],
|
|
106
120
|
activity: ["capxul", "activity"],
|
|
107
|
-
activityDetail: (reference) => [
|
|
121
|
+
activityDetail: (reference, actor = void 0) => [
|
|
108
122
|
"capxul",
|
|
109
123
|
"activity",
|
|
124
|
+
actor ?? "self",
|
|
110
125
|
reference ?? "pending"
|
|
111
126
|
],
|
|
112
|
-
|
|
127
|
+
activitySummary: (actor, window) => [
|
|
128
|
+
"capxul",
|
|
129
|
+
"activity",
|
|
130
|
+
"summary",
|
|
131
|
+
actor ?? "self",
|
|
132
|
+
window ?? "all"
|
|
133
|
+
],
|
|
134
|
+
holdings: (actor) => [
|
|
135
|
+
"capxul",
|
|
136
|
+
"holdings",
|
|
137
|
+
actor ?? "self"
|
|
138
|
+
],
|
|
113
139
|
payments: ["capxul", "payments"],
|
|
114
140
|
payment: (paymentId) => [
|
|
115
141
|
"capxul",
|