@12-apps/payments-frontend 3.18.0 → 3.18.1
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/package.json +1 -1
- package/src/ledger/query.ts +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@12-apps/payments-frontend",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Browser half of the vendor-agnostic payments platform: plug-and-play MUI components for the per-provider settings page (credential form from each provider's schema, masked hints, verify/enable) and the checkout page (PIX QR + polling, card tokenization, hosted-checkout redirect), plus the headless hooks and fetch clients they build on. Talks only to the host's payments HTTP surface — never to a provider directly. Microfrontend-ready: no app coupling, host injects theme and auth.",
|
package/src/ledger/query.ts
CHANGED
|
@@ -55,11 +55,22 @@ export function ledgerSearchTerm(params: URLSearchParams): string {
|
|
|
55
55
|
return params.get('q') ?? '';
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* A grid query mapped back onto the params a ledger URL owns.
|
|
60
|
+
*
|
|
61
|
+
* `dir` accepts `null` as well as absent, because that is what a real grid
|
|
62
|
+
* produces: a column can be in the sort list with no direction chosen yet, and
|
|
63
|
+
* a data-grid library spells that `null` rather than by leaving the key out.
|
|
64
|
+
* The runtime always treated the two the same — an unsorted column contributes
|
|
65
|
+
* no `sort` param — so this is the TYPE catching up with the behaviour rather
|
|
66
|
+
* than a change to it. Typed the other way, every adopter writes the same
|
|
67
|
+
* `?? undefined` mapping at the call site, which is exactly the boilerplate
|
|
68
|
+
* this module exists to delete.
|
|
69
|
+
*/
|
|
59
70
|
export function ledgerParams(query: {
|
|
60
71
|
search: string;
|
|
61
72
|
page: number;
|
|
62
|
-
sortBy: readonly { id: string; dir?: 'asc' | 'desc' }[];
|
|
73
|
+
sortBy: readonly { id: string; dir?: 'asc' | 'desc' | null }[];
|
|
63
74
|
}): Record<string, string | undefined> {
|
|
64
75
|
const sort = query.sortBy[0];
|
|
65
76
|
return {
|