@marktiderman/genesis-ui-native 3.3.0 → 3.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 +24 -0
- package/dist/{chunk-VZ3PQLZ4.js → chunk-ABVSSJNT.js} +3 -3
- package/dist/{chunk-VZ3PQLZ4.js.map → chunk-ABVSSJNT.js.map} +1 -1
- package/dist/{chunk-ZHVQTMNV.js → chunk-ONH2PCGH.js} +7 -4
- package/dist/chunk-ONH2PCGH.js.map +1 -0
- package/dist/data/index.d.ts +104 -7
- package/dist/data/index.js +407 -79
- package/dist/data/index.js.map +1 -1
- package/dist/{inbox-page-DZUR-PJ1.d.ts → inbox-page-BEarNEIP.d.ts} +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/layouts/index.d.ts +2 -2
- package/dist/layouts/index.js +2 -2
- package/package.json +3 -3
- package/src/data/NativeResourceFormField.tsx +12 -3
- package/src/data/resource-view/NativeLinkPicker.tsx +191 -0
- package/src/data/resource-view/NativeRecordView.tsx +15 -5
- package/src/data/resource-view/NativeResourceFormSheet.tsx +25 -1
- package/src/data/resource-view/NativeResourceView.tsx +296 -50
- package/src/data/resource-view/__tests__/native-link-picker.test.tsx +201 -0
- package/src/data/resource-view/__tests__/native-record-view.test.tsx +11 -0
- package/src/data/resource-view/__tests__/native-resource-view-delete.test.tsx +171 -0
- package/src/data/resource-view/__tests__/native-resource-view.test.tsx +226 -2
- package/src/data/resource-view/__tests__/native-tel-field.test.tsx +79 -0
- package/src/data/resource-view/index.ts +8 -1
- package/src/data/resource-view/mapping.ts +60 -7
- package/src/data/resource-view/messages.ts +25 -0
- package/src/data/resource-view/use-native-resource-view.ts +62 -13
- package/src/layouts/__tests__/screen-container.test.tsx +51 -2
- package/src/layouts/screen-container.tsx +20 -1
- package/dist/chunk-ZHVQTMNV.js.map +0 -1
|
@@ -65,6 +65,22 @@ export interface NativeResourceViewMessages {
|
|
|
65
65
|
clear: string;
|
|
66
66
|
loading: string;
|
|
67
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* A link's picker in the form sheet. Optional, so a catalogue written before it still fits; the
|
|
70
|
+
* English is used for what's missing.
|
|
71
|
+
*/
|
|
72
|
+
link?: {
|
|
73
|
+
/** The picker with nothing chosen. */
|
|
74
|
+
placeholder?: string;
|
|
75
|
+
search?: string;
|
|
76
|
+
/** The choice that empties an optional link. */
|
|
77
|
+
none?: string;
|
|
78
|
+
noResults?: string;
|
|
79
|
+
loadMore?: string;
|
|
80
|
+
loadFailed?: string;
|
|
81
|
+
/** A row whose name is empty (never its raw id). */
|
|
82
|
+
untitled?: string;
|
|
83
|
+
};
|
|
68
84
|
refusal: {
|
|
69
85
|
/** `{noun}`. A delete failed with no message of its own. */
|
|
70
86
|
deleteFailed: string;
|
|
@@ -115,6 +131,15 @@ export const defaultNativeResourceViewMessages: NativeResourceViewMessages = {
|
|
|
115
131
|
clear: "Clear {label}",
|
|
116
132
|
loading: "Loading",
|
|
117
133
|
},
|
|
134
|
+
link: {
|
|
135
|
+
placeholder: "Choose…",
|
|
136
|
+
search: "Search",
|
|
137
|
+
none: "None",
|
|
138
|
+
noResults: "No matches",
|
|
139
|
+
loadMore: "Show more",
|
|
140
|
+
loadFailed: "Couldn't load the choices.",
|
|
141
|
+
untitled: "Untitled",
|
|
142
|
+
},
|
|
118
143
|
refusal: {
|
|
119
144
|
deleteFailed: "This {noun} couldn't be deleted. Try again.",
|
|
120
145
|
dismiss: "Dismiss",
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// share its cache patching, rollback and refusal handling), and the view's rows, sections, swipe
|
|
4
4
|
// actions and form fields resolved once.
|
|
5
5
|
|
|
6
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
-
import type
|
|
6
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { encodeRecordKey, type BaseRecord, type DataRow, type FilterParam } from "@marktiderman/genesis-core";
|
|
8
8
|
import { useCapabilities, useInfiniteResource, useResource, useViewer } from "@marktiderman/genesis-core/hooks";
|
|
9
|
-
import type
|
|
9
|
+
import { filterParams as toFilters, type Allowed } from "@marktiderman/genesis-core/resource-view";
|
|
10
10
|
import { useNativeResourceViewMessages } from "./display";
|
|
11
11
|
import {
|
|
12
12
|
allowed,
|
|
@@ -28,6 +28,15 @@ import {
|
|
|
28
28
|
import { fill } from "./messages";
|
|
29
29
|
|
|
30
30
|
type Row = Record<string, unknown>;
|
|
31
|
+
|
|
32
|
+
/** A row's key from the view's key fields (its id when they can't encode it): the list keys rows by it. */
|
|
33
|
+
export const recordKey = (view: AnyResourceView<Row>, row: Row) => {
|
|
34
|
+
try {
|
|
35
|
+
return String(encodeRecordKey(view.contract, row as DataRow));
|
|
36
|
+
} catch {
|
|
37
|
+
return String((row as DataRow).id);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
31
40
|
type Filter = Readonly<Record<string, string | number | boolean | null | readonly (string | number)[]>>;
|
|
32
41
|
|
|
33
42
|
/** How long typing waits before the search goes to the server. */
|
|
@@ -82,6 +91,11 @@ export interface UseNativeResourceViewReturn<T extends Row = Row> {
|
|
|
82
91
|
loadPrevious: () => void;
|
|
83
92
|
loadingPrevious: boolean;
|
|
84
93
|
hasPrevious: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* How many rows sit above `rows[0]`: the rows `maxPages` dropped from the front, 0 at the top.
|
|
96
|
+
* A grid cuts its lines from here, so dropping or loading back a page never regroups them.
|
|
97
|
+
*/
|
|
98
|
+
rowOffset: number;
|
|
85
99
|
/** What the search box shows (the server sees it 300 ms after the last keystroke). */
|
|
86
100
|
search: string;
|
|
87
101
|
setSearch: (text: string) => void;
|
|
@@ -108,13 +122,7 @@ export interface UseNativeResourceViewReturn<T extends Row = Row> {
|
|
|
108
122
|
}
|
|
109
123
|
|
|
110
124
|
function filterParams(filter: Filter | undefined): FilterParam[] {
|
|
111
|
-
return
|
|
112
|
-
value === null
|
|
113
|
-
? { field, operator: "is_null" }
|
|
114
|
-
: Array.isArray(value)
|
|
115
|
-
? { field, operator: "in", value: [...(value as readonly (string | number)[])] }
|
|
116
|
-
: { field, operator: "eq", value: value as string | number | boolean },
|
|
117
|
-
);
|
|
125
|
+
return toFilters(filter);
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
/** The values a create takes from the screen: every non-null equality filter, the screen's over the tab's. */
|
|
@@ -128,6 +136,18 @@ export function screenValues(...filters: (Filter | undefined)[]): Record<string,
|
|
|
128
136
|
return out;
|
|
129
137
|
}
|
|
130
138
|
|
|
139
|
+
/** The list (`in`) filters a screen holds fields to, the screen's over the tab's. */
|
|
140
|
+
export function screenLists(...filters: (Filter | undefined)[]): Record<string, (string | number)[]> {
|
|
141
|
+
const out: Record<string, (string | number)[]> = {};
|
|
142
|
+
for (const filter of filters) {
|
|
143
|
+
for (const [field, value] of Object.entries(filter ?? {})) {
|
|
144
|
+
if (Array.isArray(value)) out[field] = [...(value as readonly (string | number)[])];
|
|
145
|
+
else delete out[field];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return out;
|
|
149
|
+
}
|
|
150
|
+
|
|
131
151
|
/** Pages kept loaded by default (cursor paging). */
|
|
132
152
|
export const DEFAULT_MAX_PAGES = 10;
|
|
133
153
|
|
|
@@ -172,6 +192,9 @@ export function useNativeResourceView<T extends Row = Row>(
|
|
|
172
192
|
// By value, so an inline `filter={{ client_id }}` doesn't rebuild the form every render.
|
|
173
193
|
const createKey = JSON.stringify(screenValues(tabFilter, filter));
|
|
174
194
|
const createDefaults = useMemo(() => JSON.parse(createKey) as Record<string, string | number | boolean>, [createKey]);
|
|
195
|
+
// A link the filter holds to a list (`in`) picks only among the list's rows (as on the web).
|
|
196
|
+
const listKey = JSON.stringify(screenLists(tabFilter, filter));
|
|
197
|
+
const within = useMemo(() => JSON.parse(listKey) as Record<string, (string | number)[]>, [listKey]);
|
|
175
198
|
const sorts = useMemo(() => serverSorts(view), [view]);
|
|
176
199
|
const searchFields = useMemo(
|
|
177
200
|
() => searchOption ?? (view.labelField ? [view.labelField] : undefined),
|
|
@@ -219,8 +242,10 @@ export function useNativeResourceView<T extends Row = Row>(
|
|
|
219
242
|
// saved, so an input for it would be overridden without a word (the web hides them too).
|
|
220
243
|
const formFields = useCallback(
|
|
221
244
|
(mode: "create" | "edit") =>
|
|
222
|
-
mode === "create"
|
|
223
|
-
|
|
245
|
+
mode === "create"
|
|
246
|
+
? formFieldsFor(view, "create", { within }).filter((f) => !(f.key in createDefaults))
|
|
247
|
+
: formFieldsFor(view, "edit", { pinned: Object.keys(createDefaults), within }),
|
|
248
|
+
[view, createDefaults, within],
|
|
224
249
|
);
|
|
225
250
|
const editable = useMemo(() => formFieldsFor(view, "edit").some((f) => !f.readOnly), [view]);
|
|
226
251
|
// Guards read the viewer (ViewerScope's id, scope and roles): a change asks them again.
|
|
@@ -281,6 +306,29 @@ export function useNativeResourceView<T extends Row = Row>(
|
|
|
281
306
|
|
|
282
307
|
const sections = useMemo(() => sectionsFor(view, pages.rows, messages), [view, pages.rows, messages]);
|
|
283
308
|
|
|
309
|
+
// The rows above the loaded window, followed across reads by the first row: still loaded lower
|
|
310
|
+
// down means pages came back in front; the new first row lower down in the last read means
|
|
311
|
+
// pages were dropped. At the top (no previous page) it's 0, whatever happened. Compared with
|
|
312
|
+
// the last committed read: the snapshot is written after commit, so a render React throws away
|
|
313
|
+
// never moves it.
|
|
314
|
+
const loaded = useRef<{ keys: string[]; offset: number }>({ keys: [], offset: 0 });
|
|
315
|
+
const hasPrevious = pages.hasPreviousPage;
|
|
316
|
+
const snapshot = useMemo(() => {
|
|
317
|
+
const keys = pages.rows.map((row) => recordKey(view as AnyResourceView<Row>, row as Row));
|
|
318
|
+
const last = loaded.current;
|
|
319
|
+
let offset = 0;
|
|
320
|
+
if (hasPrevious && keys.length > 0 && last.keys.length > 0) {
|
|
321
|
+
const back = keys.indexOf(last.keys[0]!);
|
|
322
|
+
const dropped = last.keys.indexOf(keys[0]!);
|
|
323
|
+
offset = back >= 0 ? last.offset - back : dropped >= 0 ? last.offset + dropped : last.offset;
|
|
324
|
+
}
|
|
325
|
+
return { keys, offset: Math.max(0, offset) };
|
|
326
|
+
}, [view, pages.rows, hasPrevious]);
|
|
327
|
+
useLayoutEffect(() => {
|
|
328
|
+
loaded.current = snapshot;
|
|
329
|
+
}, [snapshot]);
|
|
330
|
+
const rowOffset = snapshot.offset;
|
|
331
|
+
|
|
284
332
|
const { query } = pages;
|
|
285
333
|
const [refreshing, setRefreshing] = useState(false);
|
|
286
334
|
const refresh = useCallback(async () => {
|
|
@@ -311,7 +359,8 @@ export function useNativeResourceView<T extends Row = Row>(
|
|
|
311
359
|
hasMore: pages.hasNextPage,
|
|
312
360
|
loadPrevious: pages.fetchPreviousPage,
|
|
313
361
|
loadingPrevious: query.isFetchingPreviousPage,
|
|
314
|
-
hasPrevious
|
|
362
|
+
hasPrevious,
|
|
363
|
+
rowOffset,
|
|
315
364
|
search,
|
|
316
365
|
setSearch,
|
|
317
366
|
refusal,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @feat:native-layouts
|
|
2
|
-
import { render, screen } from "@testing-library/react";
|
|
3
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
4
|
import {
|
|
5
5
|
ScreenContainer,
|
|
6
6
|
composeHeaderOptions,
|
|
@@ -35,6 +35,55 @@ describe("ScreenContainer", () => {
|
|
|
35
35
|
expect(screen.queryByTestId("screen-scroll")).toBeNull();
|
|
36
36
|
expect(screen.getByTestId("screen-body")).toBeTruthy();
|
|
37
37
|
});
|
|
38
|
+
|
|
39
|
+
it("has no pull to refresh unless onRefresh is passed", () => {
|
|
40
|
+
render(
|
|
41
|
+
<ScreenContainer testID="screen" scroll>
|
|
42
|
+
<span>Hello</span>
|
|
43
|
+
</ScreenContainer>,
|
|
44
|
+
);
|
|
45
|
+
expect(screen.queryByTestId("screen-refresh")).toBeNull();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("pulls to refresh with onRefresh, and shows the spinner while refreshing", () => {
|
|
49
|
+
const onRefresh = vi.fn();
|
|
50
|
+
const { rerender } = render(
|
|
51
|
+
<ScreenContainer testID="screen" scroll onRefresh={onRefresh}>
|
|
52
|
+
<span>Hello</span>
|
|
53
|
+
</ScreenContainer>,
|
|
54
|
+
);
|
|
55
|
+
const control = screen.getByTestId("screen-refresh");
|
|
56
|
+
expect(control.dataset.refreshing).toBe("false");
|
|
57
|
+
fireEvent.click(control);
|
|
58
|
+
expect(onRefresh).toHaveBeenCalledTimes(1);
|
|
59
|
+
rerender(
|
|
60
|
+
<ScreenContainer testID="screen" scroll onRefresh={onRefresh} refreshing>
|
|
61
|
+
<span>Hello</span>
|
|
62
|
+
</ScreenContainer>,
|
|
63
|
+
);
|
|
64
|
+
expect(screen.getByTestId("screen-refresh").dataset.refreshing).toBe("true");
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("makes the body scroll for onRefresh, since pulling needs a scroll view", () => {
|
|
68
|
+
render(
|
|
69
|
+
<ScreenContainer testID="screen" onRefresh={() => {}}>
|
|
70
|
+
<span>Hello</span>
|
|
71
|
+
</ScreenContainer>,
|
|
72
|
+
);
|
|
73
|
+
expect(screen.getByTestId("screen-scroll")).toBeTruthy();
|
|
74
|
+
expect(screen.queryByTestId("screen-body")).toBeNull();
|
|
75
|
+
expect(screen.getByTestId("screen-refresh")).toBeTruthy();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("shows the loading state over a refreshable body", () => {
|
|
79
|
+
render(
|
|
80
|
+
<ScreenContainer testID="screen" onRefresh={() => {}} loading>
|
|
81
|
+
<span>Hello</span>
|
|
82
|
+
</ScreenContainer>,
|
|
83
|
+
);
|
|
84
|
+
expect(screen.getByTestId("screen-loading")).toBeTruthy();
|
|
85
|
+
expect(screen.queryByTestId("screen-refresh")).toBeNull();
|
|
86
|
+
});
|
|
38
87
|
});
|
|
39
88
|
|
|
40
89
|
describe("composeHeaderOptions", () => {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* - Scroll vs static body
|
|
8
8
|
* - Tokens-aware background (`bg-background`)
|
|
9
9
|
* - A loading state (`loading`): a centred `NativeLoadingState` in place of the body
|
|
10
|
+
* - Pull to refresh (`onRefresh` + `refreshing`): a theme-tinted `NativeRefreshControl`
|
|
10
11
|
*
|
|
11
12
|
* Header customization is delegated: pass `headerLeft`, `headerRight`,
|
|
12
13
|
* `large`, `scrollEdgeBehavior`, `safeAreaEdges`, plus any direct
|
|
@@ -33,6 +34,7 @@ import { SafeAreaView } from "react-native-safe-area-context";
|
|
|
33
34
|
import { cn } from "../utils";
|
|
34
35
|
import { useThemeMode } from "../hooks/use-theme-mode";
|
|
35
36
|
import { NativeLoadingState } from "../components/loading-state";
|
|
37
|
+
import { NativeRefreshControl } from "../components/refresh-control";
|
|
36
38
|
|
|
37
39
|
export type SafeAreaEdge = "top" | "bottom" | "left" | "right";
|
|
38
40
|
|
|
@@ -75,6 +77,16 @@ export interface ScreenContainerProps {
|
|
|
75
77
|
loading?: boolean;
|
|
76
78
|
/** Text under the spinner while `loading`, and what screen readers announce: pass translated text. */
|
|
77
79
|
loadingLabel?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Pull to refresh: a theme-tinted `NativeRefreshControl` on the body, as InboxPage and
|
|
82
|
+
* NotificationsPage have. Pulling needs a scroll view, so passing it makes the body scroll
|
|
83
|
+
* (as `scroll`). Off unless passed. Never with a list child (FlatList, SectionList,
|
|
84
|
+
* NativeResourceView, InboxPage): a list inside a ScrollView loses virtualization, and those
|
|
85
|
+
* lists have their own pull to refresh.
|
|
86
|
+
*/
|
|
87
|
+
onRefresh?: () => void | Promise<void>;
|
|
88
|
+
/** The refresh spinner shows while `true`: pass your query's refetching state. Default `false`. */
|
|
89
|
+
refreshing?: boolean;
|
|
78
90
|
/** Style on the root, e.g. a theme-role background color. */
|
|
79
91
|
style?: ViewStyle;
|
|
80
92
|
/** testID on the root container. */
|
|
@@ -183,6 +195,8 @@ export function ScreenContainer({
|
|
|
183
195
|
keyboardShouldPersistTaps = "handled",
|
|
184
196
|
loading = false,
|
|
185
197
|
loadingLabel,
|
|
198
|
+
onRefresh,
|
|
199
|
+
refreshing = false,
|
|
186
200
|
style,
|
|
187
201
|
testID,
|
|
188
202
|
}: ScreenContainerProps) {
|
|
@@ -194,9 +208,14 @@ export function ScreenContainer({
|
|
|
194
208
|
<View testID={testID ? `${testID}-body` : undefined} className={cn("flex-1", contentClassName)}>
|
|
195
209
|
<NativeLoadingState fullScreen={false} label={loadingLabel} testID={`${testID ?? "screen-container"}-loading`} />
|
|
196
210
|
</View>
|
|
197
|
-
) : scroll ? (
|
|
211
|
+
) : scroll || onRefresh ? (
|
|
198
212
|
<ScrollView
|
|
199
213
|
testID={testID ? `${testID}-scroll` : undefined}
|
|
214
|
+
refreshControl={
|
|
215
|
+
onRefresh ? (
|
|
216
|
+
<NativeRefreshControl testID={`${testID ?? "screen-container"}-refresh`} refreshing={refreshing} onRefresh={() => void onRefresh()} />
|
|
217
|
+
) : undefined
|
|
218
|
+
}
|
|
200
219
|
keyboardShouldPersistTaps={keyboardShouldPersistTaps}
|
|
201
220
|
contentInsetAdjustmentBehavior="automatic"
|
|
202
221
|
contentContainerClassName={cn("flex-grow", contentClassName)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/layouts/screen-container.tsx","../src/layouts/nav-bar.tsx","../src/layouts/inbox-page.tsx"],"names":["jsx","jsxs","View","SafeAreaView","ScrollView","Fragment","Pressable"],"mappings":";;;;;;;;;;AAsHO,SAAS,qBACd,KAAA,EACyB;AACzB,EAAA,MAAM;AAAA,IACJ,WAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAA;AAAA,IACA,kBAAA;AAAA,IACA;AAAA,GACF,GAAI,KAAA;AAEJ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AAA,EAAA,EAAa,OAAA,EAAS,QAAA,EAAU,MAAA,EAAQ,CAAA,EAAG,MAAM,CAAA,OAAA,CAAA,EAC/C,uBACH,CAAA,GACE;AAAA;AAAA,GAER;AAEJ","file":"chunk-ZHVQTMNV.js","sourcesContent":["/**\n * ScreenContainer — Layer-2 page primitive.\n *\n * Wires the chrome every layout needs without imposing layout structure:\n * - Safe-area edges (configurable via `safeAreaEdges`)\n * - StatusBar style (light / dark / auto)\n * - Scroll vs static body\n * - Tokens-aware background (`bg-background`)\n * - A loading state (`loading`): a centred `NativeLoadingState` in place of the body\n *\n * Header customization is delegated: pass `headerLeft`, `headerRight`,\n * `large`, `scrollEdgeBehavior`, `safeAreaEdges`, plus any direct\n * `headerOptions` passthrough to `<Stack.Screen options={...} />`. We\n * **do not** render the navigation header ourselves — Expo Router /\n * React Navigation render the platform-native header. Consumer either:\n *\n * (a) Wraps the screen in `<ScreenContainer>` and ALSO declares\n * `<Stack.Screen options={headerOptionsFromProps(props)} />` at the\n * top of the screen (we export a helper `composeHeaderOptions` for\n * this), OR\n * (b) Imports `<NavBarTitle>` / `<NavBarSearchBar>` / `<NavBarSaveButton>`\n * sub-primitives and threads them through `headerLeft` / `headerRight`\n * options manually.\n *\n * The Layer-3/4 layouts (SettingsPage, etc.) compose ScreenContainer + a\n * helper that wires Stack.Screen so consumers get the 3-line ergonomics.\n *\n * @stability Beta\n */\nimport type { ReactNode } from \"react\";\nimport { ScrollView, StatusBar, View, type ViewStyle } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { cn } from \"../utils\";\nimport { useThemeMode } from \"../hooks/use-theme-mode\";\nimport { NativeLoadingState } from \"../components/loading-state\";\n\nexport type SafeAreaEdge = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nexport type ScrollEdgeBehavior = \"match\" | \"transparent\" | \"opaque\";\n\nexport interface ScreenContainerProps {\n /** Screen body. Pass any node tree. */\n children: ReactNode;\n /** When `true`, the body is wrapped in a vertical ScrollView. Default `false`. */\n scroll?: boolean;\n /**\n * SafeAreaView edges. Defaults to `[\"left\", \"right\"]` — top/bottom are\n * normally handled by the navigation header / tab bar.\n */\n safeAreaEdges?: SafeAreaEdge[];\n /**\n * StatusBar appearance. `\"auto\"` follows the resolved theme mode.\n */\n statusBar?: \"light\" | \"dark\" | \"auto\" | \"hidden\";\n /**\n * Force light or dark theme on this screen regardless of OS preference.\n * Default `\"system\"` (follow OS).\n */\n themeMode?: \"light\" | \"dark\" | \"system\";\n /** Override root container className. */\n className?: string;\n /** Override inner content container className (the ScrollView's contentContainerClassName when scroll=true). */\n contentClassName?: string;\n /**\n * `keyboardShouldPersistTaps` for the inner ScrollView. Default `\"handled\"`.\n * Only used when `scroll` is true.\n */\n keyboardShouldPersistTaps?: \"always\" | \"never\" | \"handled\";\n /**\n * When `true`, a centred `NativeLoadingState` (theme-tinted spinner,\n * announced as loading) replaces the body, inside the same safe area and\n * background. Use it for redirect and first-load screens: the body is\n * unmounted while it's on, so a form underneath loses its state. Default `false`.\n */\n loading?: boolean;\n /** Text under the spinner while `loading`, and what screen readers announce: pass translated text. */\n loadingLabel?: string;\n /** Style on the root, e.g. a theme-role background color. */\n style?: ViewStyle;\n /** testID on the root container. */\n testID?: string;\n}\n\n/**\n * Layer-3 named-prop slots that layouts can accept and forward to\n * `composeHeaderOptions()` for `<Stack.Screen options={...}>`.\n */\nexport interface ScreenHeaderProps {\n /** Custom header title. Falls back to `<Stack.Screen name>` mapping. */\n headerTitle?: string;\n /** Custom node rendered on the left of the nav bar. */\n headerLeft?: () => ReactNode;\n /** Custom node rendered on the right of the nav bar. */\n headerRight?: () => ReactNode;\n /** When true, iOS uses large-title mode + scroll-edge appearance. */\n large?: boolean;\n /** iOS scroll-edge behavior. `\"match\"` collapses, `\"transparent\"` always transparent, `\"opaque\"` always opaque. */\n scrollEdgeBehavior?: ScrollEdgeBehavior;\n /** Direct passthrough merged INTO the resolved options object. Wins over named props. */\n headerOptions?: Record<string, unknown>;\n}\n\n/**\n * Compose a `<Stack.Screen options={...}>` object from Layer-3 named\n * props + a direct `headerOptions` passthrough. Layouts call this and\n * pass the result to `<Stack.Screen>` so the host's expo-router stack\n * renders a platform-native large title / scroll-edge appearance.\n *\n * Usage (in a layout primitive):\n *\n * const opts = composeHeaderOptions({\n * headerTitle: \"Settings\",\n * large: true,\n * scrollEdgeBehavior: \"match\",\n * headerOptions: rest.headerOptions,\n * });\n * return <><Stack.Screen options={opts} /><ScreenContainer>...</ScreenContainer></>;\n */\nexport function composeHeaderOptions(\n props: ScreenHeaderProps,\n): Record<string, unknown> {\n const {\n headerTitle,\n headerLeft,\n headerRight,\n large,\n scrollEdgeBehavior,\n headerOptions,\n } = props;\n\n const opts: Record<string, unknown> = {};\n if (headerTitle !== undefined) opts.title = headerTitle;\n if (headerLeft) opts.headerLeft = headerLeft;\n if (headerRight) opts.headerRight = headerRight;\n if (large) {\n // iOS large-title mode. Android falls back to standard.\n opts.headerLargeTitle = true;\n if (scrollEdgeBehavior === \"transparent\") {\n opts.headerTransparent = true;\n } else if (scrollEdgeBehavior === \"opaque\") {\n opts.headerLargeTitleShadowVisible = true;\n }\n }\n // Direct passthrough wins.\n if (headerOptions) {\n Object.assign(opts, headerOptions);\n }\n return opts;\n}\n\nconst DEFAULT_EDGES: SafeAreaEdge[] = [\"left\", \"right\"];\n\n// A see-through Android status bar. React Native 0.88 dropped both props from StatusBar's types\n// (Android is always edge to edge there, so they do nothing); earlier versions still need them.\n// Spread untyped so the screen compiles against either.\nconst TRANSLUCENT_ANDROID_BAR: Record<string, unknown> = { translucent: true, backgroundColor: \"transparent\" };\n\n/**\n * Resolve the StatusBar bar style from the user's `statusBar` setting +\n * the resolved theme mode. `\"auto\"` follows theme; explicit overrides\n * win; anything else falls back to `\"default\"`.\n */\nfunction resolveBarStyle(\n statusBar: \"light\" | \"dark\" | \"auto\" | \"hidden\",\n resolvedMode: \"light\" | \"dark\",\n): \"default\" | \"light-content\" | \"dark-content\" {\n if (statusBar === \"auto\") {\n return resolvedMode === \"dark\" ? \"light-content\" : \"dark-content\";\n }\n if (statusBar === \"light\") return \"light-content\";\n if (statusBar === \"dark\") return \"dark-content\";\n return \"default\";\n}\n\nexport function ScreenContainer({\n children,\n scroll = false,\n safeAreaEdges = DEFAULT_EDGES,\n statusBar = \"auto\",\n themeMode = \"system\",\n className,\n contentClassName,\n keyboardShouldPersistTaps = \"handled\",\n loading = false,\n loadingLabel,\n style,\n testID,\n}: ScreenContainerProps) {\n const osMode = useThemeMode();\n const resolvedMode = themeMode === \"system\" ? osMode : themeMode;\n const barStyle = resolveBarStyle(statusBar, resolvedMode);\n\n const body = loading ? (\n <View testID={testID ? `${testID}-body` : undefined} className={cn(\"flex-1\", contentClassName)}>\n <NativeLoadingState fullScreen={false} label={loadingLabel} testID={`${testID ?? \"screen-container\"}-loading`} />\n </View>\n ) : scroll ? (\n <ScrollView\n testID={testID ? `${testID}-scroll` : undefined}\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n contentInsetAdjustmentBehavior=\"automatic\"\n contentContainerClassName={cn(\"flex-grow\", contentClassName)}\n >\n {children}\n </ScrollView>\n ) : (\n <View\n testID={testID ? `${testID}-body` : undefined}\n className={cn(\"flex-1\", contentClassName)}\n >\n {children}\n </View>\n );\n\n return (\n <SafeAreaView\n testID={testID ?? \"screen-container\"}\n edges={safeAreaEdges}\n className={cn(\"flex-1 bg-background\", className)}\n style={style}\n >\n {statusBar !== \"hidden\" ? (\n <StatusBar\n barStyle={\n barStyle as\n | \"default\"\n | \"light-content\"\n | \"dark-content\"\n }\n {...TRANSLUCENT_ANDROID_BAR}\n />\n ) : (\n <StatusBar hidden />\n )}\n {body}\n </SafeAreaView>\n );\n}\n","/**\n * Nav-bar sub-primitives — escape hatches for `<Stack.Screen>` `headerLeft`,\n * `headerRight`, and custom title view.\n *\n * Use these when the named-prop slots on a layout aren't enough — e.g.,\n * a screen needs a save button on the right that's wired to dirty-state,\n * or a search bar replaces the title on a results screen.\n *\n * Pass directly into `headerLeft={() => <NavBarSearchBar ... />}` or\n * compose into a custom `headerTitle={() => <NavBarTitle ... />}` slot.\n *\n * @stability Beta\n */\nimport { Pressable, Text, TextInput, View } from \"react-native\";\nimport { nativeColors } from \"@marktiderman/genesis-design-system/tokens/native\";\nimport { cn } from \"../utils\";\n\n// ---------------------------------------------------------------------------\n// NavBarSaveButton\n// ---------------------------------------------------------------------------\n\nexport interface NavBarSaveButtonProps {\n /** Press handler. Disabled when not provided OR when `disabled`/`loading`. */\n onPress?: () => void;\n /** Visible label. Default `\"Save\"`. */\n label?: string;\n /** When true, the button is muted and not pressable. Use this for clean / pristine forms. */\n disabled?: boolean;\n /** When true, label switches to a busy indicator and presses are blocked. */\n loading?: boolean;\n /** When true, render label in destructive tone. */\n destructive?: boolean;\n className?: string;\n testID?: string;\n}\n\nexport function NavBarSaveButton({\n onPress,\n label = \"Save\",\n disabled,\n loading,\n destructive,\n className,\n testID,\n}: NavBarSaveButtonProps) {\n const isDisabled = !!disabled || !!loading || !onPress;\n return (\n <Pressable\n testID={testID ?? \"nav-bar-save-button\"}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n accessibilityState={{ disabled: isDisabled, busy: !!loading }}\n onPress={isDisabled ? undefined : onPress}\n disabled={isDisabled}\n className={cn(\"min-h-[44px] justify-center px-3\", className)}\n hitSlop={8}\n >\n <Text\n className={cn(\n \"text-base font-semibold\",\n destructive ? \"text-destructive\" : \"text-primary\",\n isDisabled && \"opacity-40\"\n )}\n >\n {loading ? \"…\" : label}\n </Text>\n </Pressable>\n );\n}\n\n// ---------------------------------------------------------------------------\n// NavBarTitle\n// ---------------------------------------------------------------------------\n\nexport interface NavBarTitleProps {\n /** Title text. */\n title: string;\n /** Optional smaller subtitle line under the title. */\n subtitle?: string;\n /** Optional press handler — turns the title row into a tap target (e.g., reveal a picker). */\n onPress?: () => void;\n className?: string;\n testID?: string;\n}\n\nexport function NavBarTitle({\n title,\n subtitle,\n onPress,\n className,\n testID,\n}: NavBarTitleProps) {\n const inner = (\n <View className={cn(\"items-center justify-center\", className)}>\n <Text\n testID={testID ? `${testID}-title` : undefined}\n className=\"text-base font-semibold text-foreground\"\n numberOfLines={1}\n >\n {title}\n </Text>\n {subtitle ? (\n <Text\n testID={testID ? `${testID}-subtitle` : undefined}\n className=\"text-xs text-muted-foreground\"\n numberOfLines={1}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n );\n\n if (onPress) {\n return (\n <Pressable\n testID={testID ?? \"nav-bar-title\"}\n accessibilityRole=\"button\"\n accessibilityLabel={subtitle ? `${title}, ${subtitle}` : title}\n onPress={onPress}\n hitSlop={8}\n >\n {inner}\n </Pressable>\n );\n }\n\n return (\n <View testID={testID ?? \"nav-bar-title\"} accessibilityRole=\"header\">\n {inner}\n </View>\n );\n}\n\n// ---------------------------------------------------------------------------\n// NavBarSearchBar\n// ---------------------------------------------------------------------------\n\nexport interface NavBarSearchBarProps {\n value: string;\n onChangeText: (next: string) => void;\n placeholder?: string;\n /** Called when the user submits the search (return key). */\n onSubmit?: () => void;\n /** Render a clear (X) button when value is non-empty. Default true. */\n clearable?: boolean;\n className?: string;\n testID?: string;\n}\n\n/**\n * Inline search input meant to occupy the title slot on a search results\n * screen. For a sticky search-below-the-header pattern, prefer the\n * standalone <NativeSearchBar> primitive.\n */\nexport function NavBarSearchBar({\n value,\n onChangeText,\n placeholder = \"Search\",\n onSubmit,\n clearable = true,\n className,\n testID,\n}: NavBarSearchBarProps) {\n return (\n <View\n testID={testID ?? \"nav-bar-search\"}\n className={cn(\n \"min-h-[36px] flex-row items-center rounded-full bg-muted px-3\",\n className\n )}\n >\n <TextInput\n testID={testID ? `${testID}-input` : undefined}\n accessibilityLabel={placeholder}\n value={value}\n onChangeText={onChangeText}\n onSubmitEditing={onSubmit}\n placeholder={placeholder}\n placeholderTextColor={nativeColors.neutral[400]}\n returnKeyType=\"search\"\n autoCorrect={false}\n autoCapitalize=\"none\"\n clearButtonMode={clearable ? \"while-editing\" : \"never\"}\n className=\"flex-1 text-base text-foreground\"\n />\n {clearable && value.length > 0 ? (\n <Pressable\n testID={testID ? `${testID}-clear` : undefined}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Clear search\"\n onPress={() => onChangeText(\"\")}\n hitSlop={8}\n className=\"ml-2 px-1\"\n >\n <Text className=\"text-base text-muted-foreground\">×</Text>\n </Pressable>\n ) : null}\n </View>\n );\n}\n","/**\n * InboxPage — a list of conversations or tickets: unread state, a time, a\n * preview line, swipe actions, pull to refresh, paging and an empty state.\n *\n * Generic: the rows are whatever the app has (support reports, direct\n * messages, an idea board). Data and actions come in as props; the layout\n * draws them the platform's way. On iOS it is the Settings app's inset\n * grouped style, like `SettingsPage`: the page is `groupedBackground`, the\n * rows one rounded group on `surface` with hairline separators that start at\n * the text. On Android rows are full width.\n *\n * Swipe actions: each row's `swipeActions` are always reachable without a\n * gesture library, as VoiceOver / TalkBack custom actions and on long press\n * (a menu). For the swipe itself, fill the `swipeable` slot with your\n * gesture-handler wrapper (`ReanimatedSwipeable` from\n * react-native-gesture-handler, an optional peer); it receives the actions\n * and the row.\n *\n * Rows: `avatar` puts a picture of who it is between the unread dot and the\n * text (an unread count shows at the end of the row, as in Mail); `leading`\n * replaces the dot.\n *\n * Slots: `row`, `swipeable`, `header` (above the group), `footer` (below it,\n * the paging spinner by default) and `empty`. `slots` swaps a part for your\n * component (same props), `slotProps` feeds the default more props, `null`\n * drops it.\n *\n * Header: `getInboxPageStackOptions()` for `<Stack.Screen options>`.\n *\n * @stability Beta\n */\nimport { Fragment, useState, type ReactNode } from \"react\";\nimport { renderSlot, type SlotPropsFor, type Slots } from \"@marktiderman/genesis-core/slots\";\nimport { Alert, FlatList, Platform, Pressable, ScrollView, StyleSheet, View } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { useThemeRoles } from \"../hooks/use-theme-roles\";\nimport { NativeEmptyState } from \"../components/empty-state\";\nimport { NativeText } from \"../components/text\";\nimport { NativeButton } from \"../components/button\";\nimport { NativeBadge } from \"../components/badge\";\nimport { NativeRefreshControl } from \"../components/refresh-control\";\nimport { NativeLoadingState } from \"../components/loading-state\";\nimport { composeHeaderOptions, type ScreenHeaderProps } from \"./screen-container\";\n\n/** An action on a row: swipe, long press, or an accessibility action. */\nexport interface InboxSwipeAction {\n id: string;\n label: string;\n onPress: () => void;\n /** Destructive tone (delete, leave). */\n destructive?: boolean;\n}\n\nexport interface InboxItem {\n /** Stable id for keying. */\n id: string;\n title: string;\n /** The latest message or a summary, at most two lines. */\n preview?: string;\n /** When it last changed. Shown as a short time or date. */\n timestamp?: string | Date;\n /** Something new the person hasn't read: a dot, and the title in bold. */\n unread?: boolean;\n /** How many unread messages; shown as a count instead of the dot when above 0. */\n unreadCount?: number;\n /** A short status shown under the preview (\"In progress\", \"12 votes\"). */\n meta?: string;\n /** Replaces the unread dot (an icon). For a picture of who it is, use `avatar`, which keeps the dot. */\n leading?: ReactNode;\n /**\n * A picture of who or what it is (a `NativeAvatar`, about 40pt), between the\n * unread dot and the text. The separator then starts at the text. It is hidden\n * from screen readers; when it shows someone `title` doesn't name, say who in\n * `avatarLabel`.\n */\n avatar?: ReactNode;\n /** Who the avatar shows, read before the title, when `title` doesn't name them. */\n avatarLabel?: string;\n /** Shown at the end of the row (a vote button, a badge). Replaces the chevron. */\n trailing?: ReactNode;\n /** Opens the conversation. Rows with `onPress` show a chevron unless `trailing` is set. */\n onPress?: () => void;\n swipeActions?: InboxSwipeAction[];\n /** testID override. Default `<page testID>-row-<id>`. */\n testID?: string;\n}\n\n/** The parts `slots` and `slotProps` reach, with the props each receives. */\nexport type InboxPageSlotMap = {\n row: InboxItem & { testID: string; isFirst: boolean; isLast: boolean; timeLabel: string | null };\n swipeable: { actions: InboxSwipeAction[]; testID: string; children?: ReactNode };\n header: { testID: string };\n footer: { loadingMore: boolean; testID: string };\n empty: { title: string; body: string; actionLabel?: string; onAction?: () => void; testID: string };\n};\n\nexport interface InboxPageProps extends ScreenHeaderProps {\n /** Newest first, as they should show. Empty → the empty state. */\n items: InboxItem[];\n refreshing?: boolean;\n onRefresh?: () => void | Promise<void>;\n /** Called near the end of the list, to load the next page. */\n onEndReached?: () => void;\n /** A next page is loading: the default footer shows a spinner. */\n loadingMore?: boolean;\n /** Above the group (a filter, a call to action). Prefer `slots.header` for a component. */\n header?: ReactNode;\n /** An optional title over the group, in the Settings header style. */\n sectionTitle?: string;\n emptyTitle?: string;\n emptyBody?: string;\n /** The first page is loading: a spinner instead of the empty state. */\n loading?: boolean;\n /** The read failed: the empty slot shows `errorTitle` / `errorBody` instead (and pull to refresh retries). */\n error?: boolean;\n errorTitle?: string;\n errorBody?: string;\n /** A button in the empty state (\"Send feedback\"). */\n emptyActionLabel?: string;\n onEmptyAction?: () => void;\n /** How a row's time reads. Default: the time today, \"Yesterday\", the weekday this week, else the date. */\n formatTime?: (date: Date, now: Date) => string;\n /** The clock, for tests. */\n now?: () => Date;\n slots?: Slots<InboxPageSlotMap>;\n slotProps?: SlotPropsFor<InboxPageSlotMap>;\n /** testID on the root. Default `\"inbox-page\"`. */\n testID?: string;\n}\n\n/** `<Stack.Screen options>` for an InboxPage: a large title that collapses on scroll. */\nexport function getInboxPageStackOptions(props: ScreenHeaderProps & { headerTitle?: string }): Record<string, unknown> {\n return composeHeaderOptions({\n headerTitle: props.headerTitle ?? \"Inbox\",\n large: props.large ?? true,\n scrollEdgeBehavior: props.scrollEdgeBehavior ?? \"match\",\n headerLeft: props.headerLeft,\n headerRight: props.headerRight,\n headerOptions: props.headerOptions,\n });\n}\n\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/** The default row time: `9:41`, `Yesterday`, `Monday`, then a short date. */\nexport function formatInboxTime(date: Date, now: Date): string {\n const start = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();\n const days = Math.round((start(now) - start(date)) / DAY_MS);\n if (days <= 0) return date.toLocaleTimeString(undefined, { hour: \"numeric\", minute: \"2-digit\" });\n if (days === 1) return \"Yesterday\";\n if (days < 7) return date.toLocaleDateString(undefined, { weekday: \"long\" });\n return date.toLocaleDateString(undefined, { day: \"numeric\", month: \"short\", year: date.getFullYear() === now.getFullYear() ? undefined : \"numeric\" });\n}\n\n/** The row's leading padding, the unread dot's column, an avatar's default size and its gap to the text. */\nconst ROW_PADDING = 16;\nconst LEADING_WIDTH = 18;\nconst DEFAULT_AVATAR = 40;\nconst AVATAR_GAP = 12;\n\n/** UIKit's inset grouped margin on a phone, in points (as SettingsPage). */\nconst IOS_GROUP_MARGIN = 16;\n\nfunction iosGroupRadius(): number {\n return Number.parseFloat(String(Platform.Version)) >= 26 ? 26 : 10;\n}\n\nexport function InboxPage({\n items,\n refreshing,\n onRefresh,\n onEndReached,\n loadingMore = false,\n header,\n sectionTitle,\n emptyTitle,\n emptyBody,\n emptyActionLabel,\n onEmptyAction,\n loading = false,\n error = false,\n errorTitle,\n errorBody,\n formatTime = formatInboxTime,\n now = () => new Date(),\n slots = {},\n slotProps = {},\n testID = \"inbox-page\",\n}: InboxPageProps) {\n const colors = useThemeRoles();\n const clock = now();\n const rows: InboxPageSlotMap[\"row\"][] = items.map((item, index) => ({\n ...item,\n testID: item.testID ?? `${testID}-row-${item.id}`,\n isFirst: index === 0,\n isLast: index === items.length - 1,\n timeLabel: item.timestamp ? formatTime(typeof item.timestamp === \"string\" ? new Date(item.timestamp) : item.timestamp, clock) : null,\n }));\n\n const headerNode = (\n <View>\n {header ?? renderSlot(EmptyPart, slots.header, { testID: `${testID}-header` }, slotProps.header)}\n {sectionTitle ? <SectionTitle title={sectionTitle} testID={`${testID}-section-title`} /> : null}\n </View>\n );\n\n const refreshControl = onRefresh ? <NativeRefreshControl testID={`${testID}-refresh`} refreshing={!!refreshing} onRefresh={() => void onRefresh()} /> : undefined;\n\n if (items.length === 0) {\n // A scroll view, not a plain view: under a large-title (or translucent) header only a\n // scroll view's automatic content inset moves the content below the header, and pull to\n // refresh needs one too.\n return (\n <SafeAreaView testID={testID} edges={[\"left\", \"right\", \"bottom\"]} style={{ flex: 1, backgroundColor: colors.groupedBackground }}>\n <ScrollView\n testID={`${testID}-empty-scroll`}\n contentInsetAdjustmentBehavior=\"automatic\"\n keyboardShouldPersistTaps=\"handled\"\n contentContainerStyle={{ flexGrow: 1, paddingTop: 8, paddingBottom: 32 }}\n refreshControl={refreshControl}\n >\n {headerNode}\n {loading ? (\n <NativeLoadingState fullScreen={false} testID={`${testID}-loading`} />\n ) : (\n renderSlot(\n DefaultEmpty,\n slots.empty,\n error\n ? {\n title: errorTitle ?? \"Couldn't load this\",\n body: errorBody ?? \"Check your connection, then pull to refresh.\",\n actionLabel: onRefresh ? \"Try again\" : undefined,\n onAction: onRefresh ? () => void onRefresh() : undefined,\n testID: `${testID}-error`,\n }\n : {\n title: emptyTitle ?? \"Nothing here yet\",\n body: emptyBody ?? \"When there's something new, it shows up here.\",\n actionLabel: emptyActionLabel,\n onAction: onEmptyAction,\n testID: `${testID}-empty`,\n },\n slotProps.empty,\n )\n )}\n </ScrollView>\n </SafeAreaView>\n );\n }\n\n return (\n <SafeAreaView testID={testID} edges={[\"left\", \"right\", \"bottom\"]} style={{ flex: 1, backgroundColor: colors.groupedBackground }}>\n <FlatList\n testID={`${testID}-list`}\n data={rows}\n keyExtractor={(row) => row.id}\n contentInsetAdjustmentBehavior=\"automatic\"\n // The header can hold a text field (the idea board's \"Suggest\"): its button's first tap\n // must press it, not only close the keyboard.\n keyboardShouldPersistTaps=\"handled\"\n ListHeaderComponent={headerNode}\n ListFooterComponent={renderSlot(DefaultFooter, slots.footer, { loadingMore, testID: `${testID}-footer` }, slotProps.footer)}\n contentContainerStyle={{ paddingTop: 8, paddingBottom: 32 }}\n onEndReached={onEndReached}\n onEndReachedThreshold={0.5}\n refreshControl={refreshControl}\n renderItem={({ item: row }) => {\n const content = renderSlot(DefaultRow, slots.row, row, slotProps.row);\n const actions = row.swipeActions ?? [];\n return (\n <Fragment>\n {actions.length && slots.swipeable !== null\n ? renderSlot(PassThroughSwipeable, slots.swipeable, { actions, testID: `${row.testID}-swipe`, children: content }, slotProps.swipeable)\n : content}\n </Fragment>\n );\n }}\n />\n </SafeAreaView>\n );\n}\n\nfunction EmptyPart(_props: InboxPageSlotMap[\"header\"]) {\n return null;\n}\n\n/** The default `swipeable`: no gesture, just the row (its actions are on long press and in the accessibility actions). */\nfunction PassThroughSwipeable({ children }: InboxPageSlotMap[\"swipeable\"]) {\n return <>{children}</>;\n}\n\nfunction SectionTitle({ title, testID }: { title: string; testID: string }) {\n const colors = useThemeRoles();\n const ios = Platform.OS === \"ios\";\n return (\n <NativeText\n testID={testID}\n accessibilityRole=\"header\"\n className={ios ? \"px-4 pb-1.5 pt-2\" : \"px-4 pb-2 pt-4 text-primary\"}\n style={\n ios\n ? { marginHorizontal: IOS_GROUP_MARGIN, color: colors.secondaryLabel, fontSize: 13, lineHeight: 18, textTransform: \"uppercase\" }\n : { fontSize: 14, lineHeight: 20, fontWeight: \"500\" }\n }\n >\n {title}\n </NativeText>\n );\n}\n\n/** Opens a row's actions as a menu (long press). */\nexport function showInboxActions(title: string, actions: InboxSwipeAction[], cancelLabel = \"Cancel\"): void {\n Alert.alert(title, undefined, [\n ...actions.map((a) => ({ text: a.label, style: a.destructive ? (\"destructive\" as const) : (\"default\" as const), onPress: a.onPress })),\n { text: cancelLabel, style: \"cancel\" as const },\n ]);\n}\n\nfunction DefaultRow(row: InboxPageSlotMap[\"row\"]) {\n const colors = useThemeRoles();\n const ios = Platform.OS === \"ios\";\n const [pressed, setPressed] = useState(false);\n const actions = row.swipeActions ?? [];\n const radius = iosGroupRadius();\n const unreadLabel = row.unreadCount && row.unreadCount > 0 ? `${row.unreadCount} unread` : row.unread ? \"Unread\" : null;\n const label = [unreadLabel, row.avatar ? row.avatarLabel : null, row.title, row.timeLabel, row.preview, row.meta].filter(Boolean).join(\", \");\n // The separator starts at the text: the row's padding, the dot's column, and the avatar when there is one.\n const [avatarWidth, setAvatarWidth] = useState(0);\n const separatorInset = ROW_PADDING + LEADING_WIDTH + (row.avatar ? (avatarWidth || DEFAULT_AVATAR) + AVATAR_GAP : 0);\n return (\n <View\n testID={`${row.testID}-cell`}\n style={[\n { backgroundColor: colors.surface },\n ios\n ? {\n marginHorizontal: IOS_GROUP_MARGIN,\n borderTopLeftRadius: row.isFirst ? radius : 0,\n borderTopRightRadius: row.isFirst ? radius : 0,\n borderBottomLeftRadius: row.isLast ? radius : 0,\n borderBottomRightRadius: row.isLast ? radius : 0,\n overflow: \"hidden\",\n }\n : null,\n ]}\n >\n <Pressable\n testID={row.testID}\n accessibilityRole={row.onPress ? \"button\" : undefined}\n accessibilityLabel={label}\n accessibilityActions={actions.map((a) => ({ name: a.id, label: a.label }))}\n onAccessibilityAction={(event) => actions.find((a) => a.id === event.nativeEvent.actionName)?.onPress()}\n onPress={row.onPress}\n onLongPress={actions.length ? () => showInboxActions(row.title, actions) : undefined}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n style={{ flexDirection: \"row\", alignItems: \"center\", paddingHorizontal: ROW_PADDING, paddingVertical: 11, minHeight: 60, backgroundColor: pressed && row.onPress ? colors.fill : undefined }}\n >\n <View style={{ width: LEADING_WIDTH, alignItems: \"flex-start\" }}>\n {row.leading ?? (row.unreadCount && row.unreadCount > 0 ? null : <UnreadDot unread={!!row.unread} testID={`${row.testID}-unread`} color={colors.tint} />)}\n </View>\n {row.avatar ? (\n <View\n testID={`${row.testID}-avatar`}\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n onLayout={(e) => setAvatarWidth(Math.round(e.nativeEvent.layout.width))}\n style={{ marginRight: AVATAR_GAP }}\n >\n {row.avatar}\n </View>\n ) : null}\n <View style={{ flex: 1, minWidth: 0 }}>\n <View style={{ flexDirection: \"row\", alignItems: \"baseline\" }}>\n <NativeText\n numberOfLines={1}\n style={{ flex: 1, color: colors.label, fontSize: 17, lineHeight: 22, fontWeight: row.unread || (row.unreadCount ?? 0) > 0 ? \"600\" : \"400\" }}\n >\n {row.title}\n </NativeText>\n {row.timeLabel ? (\n <NativeText testID={`${row.testID}-time`} style={{ marginLeft: 8, color: colors.secondaryLabel, fontSize: 15, lineHeight: 20 }}>\n {row.timeLabel}\n </NativeText>\n ) : null}\n </View>\n {row.preview ? (\n <NativeText numberOfLines={2} style={{ marginTop: 2, color: colors.secondaryLabel, fontSize: 15, lineHeight: 20 }}>\n {row.preview}\n </NativeText>\n ) : null}\n {row.meta ? (\n <NativeText testID={`${row.testID}-meta`} style={{ marginTop: 4, color: colors.tertiaryLabel, fontSize: 13, lineHeight: 18 }}>\n {row.meta}\n </NativeText>\n ) : null}\n </View>\n {row.unreadCount && row.unreadCount > 0 ? (\n <View style={{ marginLeft: 8 }}>\n <NativeBadge testID={`${row.testID}-count`}>{String(row.unreadCount)}</NativeBadge>\n </View>\n ) : null}\n {row.trailing ? <View style={{ marginLeft: 8 }}>{row.trailing}</View> : row.onPress ? <Chevron color={colors.tertiaryLabel} /> : null}\n </Pressable>\n {row.isLast ? null : (\n <View accessibilityElementsHidden importantForAccessibility=\"no-hide-descendants\" style={{ flexDirection: \"row\", height: StyleSheet.hairlineWidth }}>\n <View testID={`${row.testID}-separator-inset`} style={{ width: separatorInset }} />\n <View testID={`${row.testID}-separator-line`} style={{ flex: 1, backgroundColor: colors.separator }} />\n </View>\n )}\n </View>\n );\n}\n\nfunction Chevron({ color }: { color: unknown }) {\n return (\n <NativeText accessibilityElementsHidden importantForAccessibility=\"no\" style={{ marginLeft: 8, color: color as string, fontSize: 20, lineHeight: 22 }}>\n ›\n </NativeText>\n );\n}\n\nfunction UnreadDot({ unread, testID, color }: { unread: boolean; testID: string; color: unknown }) {\n if (!unread) return <View testID={testID} style={{ width: 10, height: 10 }} />;\n return <View testID={testID} style={{ width: 10, height: 10, borderRadius: 5, backgroundColor: color as string }} />;\n}\n\nfunction DefaultFooter({ loadingMore, testID }: InboxPageSlotMap[\"footer\"]) {\n if (!loadingMore) return null;\n return (\n <NativeLoadingState fullScreen={false} size=\"small\" accessibilityLabel=\"Loading more\" className=\"py-4\" testID={testID} />\n );\n}\n\nfunction DefaultEmpty({ title, body, actionLabel, onAction, testID }: InboxPageSlotMap[\"empty\"]) {\n return (\n <NativeEmptyState\n variant=\"first-run\"\n title={title}\n body={body}\n testID={testID}\n primaryAction={\n actionLabel && onAction ? (\n <NativeButton onPress={onAction} testID={`${testID}-action`}>\n {actionLabel}\n </NativeButton>\n ) : undefined\n }\n />\n );\n}\n"]}
|