react-native-roster 0.1.0 → 0.2.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 +102 -2
- package/dist/src/components/primitives/portal.d.ts +12 -0
- package/dist/src/components/primitives/portal.d.ts.map +1 -0
- package/dist/src/components/primitives/portal.js +41 -0
- package/dist/src/components/primitives/portal.js.map +1 -0
- package/dist/src/components/roster/body-layout.d.ts +1 -1
- package/dist/src/components/roster/body-layout.d.ts.map +1 -1
- package/dist/src/components/roster/body-layout.js +7 -1
- package/dist/src/components/roster/body-layout.js.map +1 -1
- package/dist/src/components/roster/index.d.ts +2 -1
- package/dist/src/components/roster/index.d.ts.map +1 -1
- package/dist/src/components/roster/index.js +26 -3
- package/dist/src/components/roster/index.js.map +1 -1
- package/dist/src/components/roster/lanes/lane.d.ts.map +1 -1
- package/dist/src/components/roster/lanes/lane.js +2 -1
- package/dist/src/components/roster/lanes/lane.js.map +1 -1
- package/dist/src/components/roster/parts/lane-list.d.ts.map +1 -1
- package/dist/src/components/roster/parts/lane-list.js +2 -1
- package/dist/src/components/roster/parts/lane-list.js.map +1 -1
- package/dist/src/components/roster/roster.types.d.ts +29 -1
- package/dist/src/components/roster/roster.types.d.ts.map +1 -1
- package/dist/src/components/roster/selection/selection-layout.d.ts +4 -0
- package/dist/src/components/roster/selection/selection-layout.d.ts.map +1 -0
- package/dist/src/components/roster/selection/selection-layout.js +82 -0
- package/dist/src/components/roster/selection/selection-layout.js.map +1 -0
- package/dist/src/components/roster/selection/selection-layout.types.d.ts +25 -0
- package/dist/src/components/roster/selection/selection-layout.types.d.ts.map +1 -0
- package/dist/src/components/roster/selection/selection-layout.types.js +3 -0
- package/dist/src/components/roster/selection/selection-layout.types.js.map +1 -0
- package/dist/src/components/roster/selection/selection-layout.web.d.ts +4 -0
- package/dist/src/components/roster/selection/selection-layout.web.d.ts.map +1 -0
- package/dist/src/components/roster/selection/selection-layout.web.js +52 -0
- package/dist/src/components/roster/selection/selection-layout.web.js.map +1 -0
- package/dist/src/components/roster/use-roster-press.d.ts +6 -0
- package/dist/src/components/roster/use-roster-press.d.ts.map +1 -0
- package/dist/src/components/roster/use-roster-press.js +61 -0
- package/dist/src/components/roster/use-roster-press.js.map +1 -0
- package/dist/src/components/roster/use-roster.d.ts.map +1 -1
- package/dist/src/components/roster/use-roster.js +40 -30
- package/dist/src/components/roster/use-roster.js.map +1 -1
- package/dist/src/components/schedule/days/parts/column.d.ts.map +1 -1
- package/dist/src/components/schedule/days/parts/column.js +2 -1
- package/dist/src/components/schedule/days/parts/column.js.map +1 -1
- package/dist/src/core/index.d.ts +1 -0
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/core/index.js +3 -1
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/core/source.d.ts +4 -0
- package/dist/src/core/source.d.ts.map +1 -0
- package/dist/src/core/source.js +9 -0
- package/dist/src/core/source.js.map +1 -0
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/nativewind/index.d.ts +4 -1
- package/dist/src/nativewind/index.d.ts.map +1 -1
- package/llms.txt +67 -2
- package/package.json +10 -4
- package/src/components/primitives/README.md +13 -2
- package/src/components/primitives/portal.tsx +48 -0
- package/src/components/roster/README.md +48 -2
- package/src/components/roster/body-layout.tsx +7 -1
- package/src/components/roster/index.tsx +62 -17
- package/src/components/roster/lanes/lane.tsx +2 -4
- package/src/components/roster/parts/lane-list.tsx +3 -1
- package/src/components/roster/roster.types.ts +30 -1
- package/src/components/roster/selection/selection-layout.tsx +90 -0
- package/src/components/roster/selection/selection-layout.types.ts +20 -0
- package/src/components/roster/selection/selection-layout.web.tsx +88 -0
- package/src/components/roster/use-roster-press.ts +74 -0
- package/src/components/roster/use-roster.ts +57 -44
- package/src/components/schedule/days/parts/column.tsx +2 -4
- package/src/core/README.md +4 -0
- package/src/core/index.ts +1 -0
- package/src/core/source.ts +9 -0
- package/src/index.ts +4 -0
package/README.md
CHANGED
|
@@ -167,12 +167,13 @@ and "Availability may be incomplete"; both are localizable props.
|
|
|
167
167
|
|
|
168
168
|
| Import | Shipped surface |
|
|
169
169
|
| --- | --- |
|
|
170
|
-
| `react-native-roster` | `Roster`, `Schedule`, `
|
|
170
|
+
| `react-native-roster` | `Roster`, `Schedule`, hooks, slot components, `RosterSelectionPopover`, `PortalHost`, `Portal`, and all core exports. |
|
|
171
171
|
| `react-native-roster/core` | Types, `layoutLane`, `coverageFor`, `flagFor`, axis helpers, comparators, and counters. Standard JavaScript and `Intl` only. |
|
|
172
172
|
| `react-native-roster/rrule` | `expandRuleSet`, `envelopeFor`, types, and expansion counters and caches. Uses pinned `rrule-temporal` and `@js-temporal/polyfill`. |
|
|
173
173
|
| `react-native-roster/nativewind` | Registers `Roster` and `Schedule` with NativeWind so their `className` props resolve; re-exports the registered components. |
|
|
174
174
|
|
|
175
|
-
Root and core never import recurrence dependencies.
|
|
175
|
+
Root and core never import recurrence dependencies. Public entry aliases retain the
|
|
176
|
+
implementation function identities while keeping CommonJS export overhead within the size gates. Metro selects TypeScript
|
|
176
177
|
source through the `react-native` export condition; other bundlers select
|
|
177
178
|
emitted CommonJS with declarations in `dist/src`. The emit is CommonJS, so
|
|
178
179
|
importing one function from the root costs the whole root bundle; import from
|
|
@@ -216,6 +217,8 @@ or press behavior. Pass `null` to a node slot to suppress its default.
|
|
|
216
217
|
| `laneLabelComponent` | `lane`, `flag`, `complete`, `viewTimezone`, localized labels | `RosterLaneLabel`: label, differing IANA zone badge, and notices. |
|
|
217
218
|
| `headerCellComponent` | `HeaderCellInput` (`tick`) | `RosterHeaderCell`: tick label. |
|
|
218
219
|
| `intervalComponent` | `rect`, `layer`, `lane`, `highlighted` | `RosterInterval`: positioned colored rect, with final inset bounds. |
|
|
220
|
+
| `intervalDetailComponent` | `rect`, `layer`, `lane`, `highlighted`, absolute `start` and `end`, `viewTimezone` | Absent by default; enables selection and fills its details. |
|
|
221
|
+
| `selectionLayout` | `SelectionLayoutProps`: nodes, targetBounds, open, dismissal, host, and shared scroll | `RosterSelectionPopover`: native portal or Radix web popover; replace at runtime. |
|
|
219
222
|
| `gapComponent` | `rect`, `layer`, `lane` | `RosterGap`: no visible content; the row supplies pressable bounds. |
|
|
220
223
|
| `gridComponent` | `ticks`, `contentWidth` | `RosterGrid`: one hairline per tick behind every lane. |
|
|
221
224
|
| `headerComponent` | `ticks`, `projection`, `scroll`, `contentWidth`, `headerCellComponent` | `RosterHeader`: frozen header following horizontal offset. |
|
|
@@ -249,6 +252,103 @@ holding the corner and ticks), `laneLabelColumnStyle`, and `bodyStyle`.
|
|
|
249
252
|
`laneLabelWidth` sizes the corner and label column, default 180. Each style
|
|
250
253
|
prop has a `className` twin; see [NativeWind](#nativewind).
|
|
251
254
|
|
|
255
|
+
### Selection
|
|
256
|
+
|
|
257
|
+
Add `intervalDetailComponent` to enable pressed-interval details. The press still
|
|
258
|
+
fires `onIntervalPress`; without the component, presses retain no selection.
|
|
259
|
+
`useRoster` owns `selection` and `dismissSelection`.
|
|
260
|
+
Pressing the selected interval again dismisses it; pressing another interval
|
|
261
|
+
switches selection. Cell and gap presses dismiss selection while still firing
|
|
262
|
+
`onCellPress` and `onGapPress`. These rules live in the hook and apply on native
|
|
263
|
+
and web; web outside press and Escape still dismiss.
|
|
264
|
+
Removing the selected lane, layer, or interval bounds clears selection. The private
|
|
265
|
+
reconcileSelection helper matches source identity sets and chooses nearest bounds with
|
|
266
|
+
a total difference of at most 1 ms for projection roundoff.
|
|
267
|
+
|
|
268
|
+
Native has no intercepting dismissal overlay; body presses reach the hook, and the detail
|
|
269
|
+
card captures its own presses. Web excludes the body wrapper from Radix outside
|
|
270
|
+
dismissal, leaving body presses to the hook while preserving true outside presses and Escape.
|
|
271
|
+
The hook toggles the selected interval closed, switches to another interval, and dismisses
|
|
272
|
+
on cell or gap presses while preserving their callbacks. The body restores horizontal
|
|
273
|
+
and vertical offsets from shared values on remount when selectionLayout changes.
|
|
274
|
+
A mount effect calls the horizontal ScrollView ref's scrollTo without animation;
|
|
275
|
+
native also retains contentOffset. LegendList restores initialScrollOffset through
|
|
276
|
+
its own web mount effect and native initial offset.
|
|
277
|
+
|
|
278
|
+
Current data and geometry replace old references, including after resizing or sorting. Reconciliation matches the layer id and
|
|
279
|
+
order-insensitive source identities, then chooses the nearest absolute bounds. The sum
|
|
280
|
+
of bound differences must be at most 1 ms. Stored bounds remain the display values.
|
|
281
|
+
|
|
282
|
+
`selectable?: boolean` belongs only to the hook input, `RosterInput`, and defaults to false.
|
|
283
|
+
It is excluded from `RosterProps`. Hook consumers
|
|
284
|
+
pass `selectable: true` to `useRoster` to retain selection. `intervalDetailComponent`,
|
|
285
|
+
`selectionLayout`, and `portalHost` live on `RosterProps` because the chassis mounts
|
|
286
|
+
the content and layout. The chassis enables selection with
|
|
287
|
+
`selectable: Boolean(intervalDetailComponent)`. Custom chassis mount their layout
|
|
288
|
+
with the returned selection, dismissal, and scroll inputs.
|
|
289
|
+
|
|
290
|
+
```tsx
|
|
291
|
+
import { Text, View } from 'react-native';
|
|
292
|
+
import { Roster } from 'react-native-roster';
|
|
293
|
+
import type { IntervalDetailInput, Lane } from 'react-native-roster';
|
|
294
|
+
|
|
295
|
+
function IntervalDetails({ lane, layer, rect, start, end, viewTimezone }: IntervalDetailInput) {
|
|
296
|
+
const format = new Intl.DateTimeFormat('en-US', { timeZone: viewTimezone, timeStyle: 'short' });
|
|
297
|
+
return <View style={{ padding: 16, backgroundColor: 'white' }}>
|
|
298
|
+
<Text>{lane.label}: {layer.label ?? layer.id}</Text>
|
|
299
|
+
<Text>{format.format(start)} to {format.format(end)}</Text>
|
|
300
|
+
{rect.sources.map((source) =>
|
|
301
|
+
<Text key={JSON.stringify([source.kind, source.id])}>
|
|
302
|
+
{source.label ?? source.id}
|
|
303
|
+
</Text>)}
|
|
304
|
+
</View>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export function SelectionExample({ lanes }: { lanes: Lane[] }) {
|
|
308
|
+
return <Roster lanes={lanes}
|
|
309
|
+
windowSpec={{ span: 'day', anchorDate: '2024-01-01', timezone: 'UTC' }}
|
|
310
|
+
style={{ height: 480, flex: undefined }}
|
|
311
|
+
intervalDetailComponent={IntervalDetails} />;
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Web consumers install `bun add @radix-ui/react-popover`. It is an optional peer
|
|
316
|
+
for native and core-only consumers, and required by the web root entry. Consumers
|
|
317
|
+
resolving the library from source with a web bundler (Vite, Storybook, or Metro web)
|
|
318
|
+
must install it even without enabling selection because `selection-layout.web.tsx`
|
|
319
|
+
is in the module graph. Native and core-only consumers do not need it.
|
|
320
|
+
`RosterSelectionPopover` selects native or web through platform resolution.
|
|
321
|
+
Native mounts a local `PortalHost` and registers `Portal` content; web uses Radix
|
|
322
|
+
for portal placement, outside press, Escape, and collisions. The layout returns focus
|
|
323
|
+
to the previously focused element only after Escape.
|
|
324
|
+
The overlay tracks both scroll offsets with Reanimated shared values, without
|
|
325
|
+
React scroll state. Native clamps details horizontally to the measured viewport,
|
|
326
|
+
flips above when that fits, and uses the top edge when neither vertical placement
|
|
327
|
+
fits. The default native popover waits for viewport measurement and scrolls oversized
|
|
328
|
+
content on both axes within a maximum size of the viewport minus 8 px on each axis.
|
|
329
|
+
Consumers wanting a different presentation supply `selectionLayout`.
|
|
330
|
+
Native also dismisses on hardware back.
|
|
331
|
+
|
|
332
|
+
`selectionLayout?: ComponentType<SelectionLayoutProps>` is the layout strategy
|
|
333
|
+
naming exception to the `Component` suffix. The chassis mounts it with `anchorZone`
|
|
334
|
+
(the body), `contentZone` (details or null), `targetBounds` (body-content bounds), `open`,
|
|
335
|
+
`onDismiss`, `portalHost`, and `scroll`. The target bounds include the lane offset and
|
|
336
|
+
interval inset. Layout scroll inputs are limited to `x`, `y`, `headerStyle`, and
|
|
337
|
+
`labelStyle`. Render each node once. A consumer inspector
|
|
338
|
+
can arrange the nodes in columns and call `onDismiss` from its close button.
|
|
339
|
+
The [interval-detail gallery route](./demo/app/gallery/interval-detail.tsx)
|
|
340
|
+
switches presentations at runtime.
|
|
341
|
+
|
|
342
|
+
`portalHost` overrides the native destination name, whose default uses a unique
|
|
343
|
+
per-roster `useId`. Give separate rosters separate override names. The default
|
|
344
|
+
layout owns its host; do not also mount that name at an ancestor. Custom layouts
|
|
345
|
+
can instead target their own ancestor host, using the exported `PortalHost` and
|
|
346
|
+
`Portal`. A store-based portal does not preserve context from the registration
|
|
347
|
+
site; place required providers above the host or re-provide them in the content.
|
|
348
|
+
Selection never enters the lane list's body content key.
|
|
349
|
+
|
|
350
|
+
Schedule does not yet support selection; it is a later change.
|
|
351
|
+
|
|
252
352
|
### Consumer data in slot components
|
|
253
353
|
|
|
254
354
|
For consumer data beyond a slot's Input, mount a React context provider above
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Mount once at the destination for a named native portal. */
|
|
3
|
+
export declare function PortalHost({ name }: {
|
|
4
|
+
name: string;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element[];
|
|
6
|
+
/** Register content at a named native host; caller context does not cross the store. */
|
|
7
|
+
export declare function Portal({ hostName, name, children, }: {
|
|
8
|
+
hostName: string;
|
|
9
|
+
name: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): null;
|
|
12
|
+
//# sourceMappingURL=portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/portal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAmC,MAAM,OAAO,CAAC;AAgBlF,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,6CAOpD;AAED,wFAAwF;AACxF,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB,QAYA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PortalHost = PortalHost;
|
|
4
|
+
exports.Portal = Portal;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const hosts = new Map();
|
|
8
|
+
const listeners = new Set();
|
|
9
|
+
const empty = new Map();
|
|
10
|
+
function subscribe(listener) {
|
|
11
|
+
listeners.add(listener);
|
|
12
|
+
return () => listeners.delete(listener);
|
|
13
|
+
}
|
|
14
|
+
function publish(hostName, nodes) {
|
|
15
|
+
if (nodes.size)
|
|
16
|
+
hosts.set(hostName, nodes);
|
|
17
|
+
else
|
|
18
|
+
hosts.delete(hostName);
|
|
19
|
+
for (const listener of listeners)
|
|
20
|
+
listener();
|
|
21
|
+
}
|
|
22
|
+
/** Mount once at the destination for a named native portal. */
|
|
23
|
+
function PortalHost({ name }) {
|
|
24
|
+
const nodes = (0, react_1.useSyncExternalStore)(subscribe, () => hosts.get(name) ?? empty, () => empty);
|
|
25
|
+
return Array.from(nodes, ([key, node]) => (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: node }, key));
|
|
26
|
+
}
|
|
27
|
+
/** Register content at a named native host; caller context does not cross the store. */
|
|
28
|
+
function Portal({ hostName, name, children, }) {
|
|
29
|
+
(0, react_1.useEffect)(() => {
|
|
30
|
+
const nodes = new Map(hosts.get(hostName));
|
|
31
|
+
nodes.set(name, children);
|
|
32
|
+
publish(hostName, nodes);
|
|
33
|
+
return () => {
|
|
34
|
+
const nodes = new Map(hosts.get(hostName));
|
|
35
|
+
nodes.delete(name);
|
|
36
|
+
publish(hostName, nodes);
|
|
37
|
+
};
|
|
38
|
+
}, [hostName, name, children]);
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.js","sourceRoot":"","sources":["../../../../src/components/primitives/portal.tsx"],"names":[],"mappings":";;;;;AAAA,iCAAkF;AAElF,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkC,CAAC;AACxD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;AACxC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;AAE3C,SAAS,SAAS,CAAC,QAAoB;IACrC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AACD,SAAS,OAAO,CAAC,QAAgB,EAAE,KAA6B;IAC9D,IAAI,KAAK,CAAC,IAAI;QAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;;QACtC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC5B,KAAK,MAAM,QAAQ,IAAI,SAAS;QAAE,QAAQ,EAAE,CAAC;AAC/C,CAAC;AAED,+DAA+D;AAC/D,oBAA2B,EAAE,IAAI,EAAoB;IACnD,MAAM,KAAK,GAAG,IAAA,4BAAoB,EAChC,SAAS,EACT,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,EAC9B,GAAG,EAAE,CAAC,KAAK,CACZ,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,uBAAC,gBAAQ,cAAY,IAAI,IAAV,GAAG,CAAmB,CAAC,CAAC;AACnF,CAAC;AAED,wFAAwF;AACxF,gBAAuB,EACrB,QAAQ,EACR,IAAI,EACJ,QAAQ,GAKT;IACC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC1B,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACzB,OAAO,GAAG,EAAE;YACV,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC3C,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC/B,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import type { BodyInput } from './roster.types';
|
|
3
3
|
export declare function RosterBodyLayout({ scroll, contentWidth, viewport, gridZone, listZone, }: Pick<BodyInput, 'scroll' | 'contentWidth' | 'viewport'> & {
|
|
4
4
|
/** Noninteractive grid behind the lane list. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/body-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"body-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/body-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,GAAG,UAAU,CAAC,GAAG;IAC3D,gDAAgD;IAChD,QAAQ,EAAE,SAAS,CAAC;IACpB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAsBA"}
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RosterBodyLayout = RosterBodyLayout;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
5
6
|
const react_native_1 = require("react-native");
|
|
6
7
|
function RosterBodyLayout({ scroll, contentWidth, viewport, gridZone, listZone, }) {
|
|
7
|
-
|
|
8
|
+
const [contentOffset] = (0, react_1.useState)(() => ({ x: scroll.x.get(), y: 0 }));
|
|
9
|
+
const bodyRef = scroll.bodyRef;
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
bodyRef.current?.scrollTo({ x: contentOffset.x, animated: false });
|
|
12
|
+
}, [bodyRef, contentOffset]);
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { testID: "roster-horizontal-scroll", ref: scroll.bodyRef, contentOffset: contentOffset, horizontal: true, onScroll: scroll.onBodyScroll, scrollEventThrottle: 16, style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { width: contentWidth, height: viewport.height }, children: [gridZone, listZone] }) }));
|
|
8
14
|
}
|
|
9
15
|
//# sourceMappingURL=body-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body-layout.js","sourceRoot":"","sources":["../../../../src/components/roster/body-layout.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"body-layout.js","sourceRoot":"","sources":["../../../../src/components/roster/body-layout.tsx"],"names":[],"mappings":";;;;AAAA,iCAA4D;AAC5D,+CAAgD;AAGhD,0BAAiC,EAC/B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,GAMT;IACC,MAAM,CAAC,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IACrE,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;IAC7B,OAAO,CACL,uBAAC,yBAAU,IACT,MAAM,EAAC,0BAA0B,EACjC,GAAG,EAAE,MAAM,CAAC,OAAO,EACnB,aAAa,EAAE,aAAa,EAC5B,UAAU,QACV,QAAQ,EAAE,MAAM,CAAC,YAAY,EAC7B,mBAAmB,EAAE,EAAE,EACvB,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAElB,wBAAC,mBAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,aAC1D,QAAQ,EACR,QAAQ,IACJ,GACI,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import type { RosterProps } from './roster.types';
|
|
2
|
-
export declare function Roster(props: RosterProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<
|
|
3
|
+
export declare function Roster(props: RosterProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAa9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAQlD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+TAmIxC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Roster = Roster;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const core_1 = require("../../core");
|
|
5
7
|
const gap_1 = require("../layers/parts/gap");
|
|
6
8
|
const interval_1 = require("../layers/parts/interval");
|
|
7
9
|
const lane_label_1 = require("./lanes/parts/lane-label");
|
|
@@ -13,16 +15,32 @@ const grid_1 = require("./parts/grid");
|
|
|
13
15
|
const header_1 = require("./parts/header");
|
|
14
16
|
const header_cell_1 = require("./parts/header-cell");
|
|
15
17
|
const lane_label_column_1 = require("./parts/lane-label-column");
|
|
18
|
+
const selection_layout_1 = require("./selection/selection-layout");
|
|
16
19
|
const use_roster_1 = require("./use-roster");
|
|
17
20
|
const defaultEmptyZone = (0, jsx_runtime_1.jsx)(empty_1.RosterEmpty, {});
|
|
18
21
|
const defaultCornerZone = (0, jsx_runtime_1.jsx)(corner_1.RosterCorner, {});
|
|
19
22
|
function Roster(props) {
|
|
20
|
-
const { status, orderedLanes, laneState, window, geometryFor, projection, scroll, press, ticks, contentWidth, viewport, onLayout, } = (0, use_roster_1.useRoster)(props);
|
|
21
|
-
const { emptyZone = defaultEmptyZone, cornerZone = defaultCornerZone, headerComponent: HeaderComponent = header_1.RosterHeader, laneLabelColumnComponent: LaneLabelColumnComponent = lane_label_column_1.RosterLaneLabelColumn, bodyComponent: BodyComponent = body_1.RosterBody, headerCellComponent = header_cell_1.RosterHeaderCell, laneLabelComponent = lane_label_1.RosterLaneLabel, intervalComponent = interval_1.RosterInterval, gapComponent = gap_1.RosterGap, gridComponent = grid_1.RosterGrid, incompleteLabel = 'Availability may be incomplete', neverSetLabel = 'No availability set', } = props;
|
|
23
|
+
const { selection, dismissSelection, status, orderedLanes, laneState, window, geometryFor, projection, scroll, press, ticks, contentWidth, viewport, onLayout, } = (0, use_roster_1.useRoster)({ ...props, selectable: Boolean(props.intervalDetailComponent) });
|
|
24
|
+
const { intervalDetailComponent: IntervalDetailComponent, selectionLayout: SelectionLayout = selection_layout_1.RosterSelectionPopover, emptyZone = defaultEmptyZone, cornerZone = defaultCornerZone, headerComponent: HeaderComponent = header_1.RosterHeader, laneLabelColumnComponent: LaneLabelColumnComponent = lane_label_column_1.RosterLaneLabelColumn, bodyComponent: BodyComponent = body_1.RosterBody, headerCellComponent = header_cell_1.RosterHeaderCell, laneLabelComponent = lane_label_1.RosterLaneLabel, intervalComponent = interval_1.RosterInterval, gapComponent = gap_1.RosterGap, gridComponent = grid_1.RosterGrid, incompleteLabel = 'Availability may be incomplete', neverSetLabel = 'No availability set', } = props;
|
|
25
|
+
const hostId = (0, react_1.useId)();
|
|
22
26
|
if (status === 'empty')
|
|
23
27
|
return emptyZone;
|
|
24
28
|
if (window.start === window.end)
|
|
25
29
|
return null;
|
|
30
|
+
let targetBounds = null;
|
|
31
|
+
if (selection) {
|
|
32
|
+
targetBounds = {
|
|
33
|
+
x: selection.rect.x,
|
|
34
|
+
y: orderedLanes.findIndex((lane) => lane.id === selection.lane.id) * projection.rowHeight +
|
|
35
|
+
selection.rect.y,
|
|
36
|
+
width: selection.rect.width,
|
|
37
|
+
height: selection.rect.height,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
let contentZone = null;
|
|
41
|
+
if (selection && IntervalDetailComponent) {
|
|
42
|
+
contentZone = ((0, jsx_runtime_1.jsx)(IntervalDetailComponent, { ...selection, viewTimezone: projection.viewTimezone, highlighted: (0, core_1.hasSource)(selection.rect.sources, props.highlightSource) }));
|
|
43
|
+
}
|
|
26
44
|
return ((0, jsx_runtime_1.jsx)(layout_1.RosterLayout, { style: props.style, headerStyle: props.headerStyle, laneLabelColumnStyle: props.laneLabelColumnStyle, bodyStyle: props.bodyStyle, laneLabelWidth: props.laneLabelWidth, onLayout: onLayout, cornerZone: cornerZone, headerZone: (0, jsx_runtime_1.jsx)(HeaderComponent, { ticks: ticks, projection: projection, scroll: scroll, contentWidth: contentWidth, headerCellComponent: headerCellComponent }), laneLabelColumnZone: (0, jsx_runtime_1.jsx)(LaneLabelColumnComponent, { labels: orderedLanes.map((lane) => {
|
|
27
45
|
const state = laneState.get(lane.id) ?? {
|
|
28
46
|
flag: 'none',
|
|
@@ -35,6 +53,11 @@ function Roster(props) {
|
|
|
35
53
|
incompleteLabel,
|
|
36
54
|
neverSetLabel,
|
|
37
55
|
};
|
|
38
|
-
}), projection: projection, scroll: scroll, laneLabelComponent: laneLabelComponent }), bodyZone: (0, jsx_runtime_1.jsx)(
|
|
56
|
+
}), projection: projection, scroll: scroll, laneLabelComponent: laneLabelComponent }), bodyZone: (0, jsx_runtime_1.jsx)(SelectionLayout, { portalHost: props.portalHost ?? `roster-${hostId}`, open: selection !== null, onDismiss: dismissSelection, scroll: {
|
|
57
|
+
x: scroll.x,
|
|
58
|
+
y: scroll.y,
|
|
59
|
+
headerStyle: scroll.headerStyle,
|
|
60
|
+
labelStyle: scroll.labelStyle,
|
|
61
|
+
}, targetBounds: targetBounds, contentZone: contentZone, anchorZone: (0, jsx_runtime_1.jsx)(BodyComponent, { lanes: orderedLanes, window: window, geometryFor: geometryFor, projection: projection, scroll: scroll, press: press, ticks: ticks, contentWidth: contentWidth, viewport: viewport, intervalComponent: intervalComponent, gapComponent: gapComponent, gridComponent: gridComponent, highlightSource: props.highlightSource, onIntervalHover: props.onIntervalHover, incompleteLabel: incompleteLabel }) }) }));
|
|
39
62
|
}
|
|
40
63
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":";;;;AAAA,6CAAgD;AAChD,uDAA0D;AAC1D,yDAA2D;AAC3D,qCAAwC;AACxC,uCAA0C;AAC1C,2CAA8C;AAC9C,yCAA4C;AAC5C,uCAA0C;AAC1C,2CAA8C;AAC9C,qDAAuD;AACvD,iEAAkE;AAElE,6CAAyC;AAEzC,MAAM,gBAAgB,GAAG,uBAAC,mBAAW,KAAG,CAAC;AACzC,MAAM,iBAAiB,GAAG,uBAAC,qBAAY,KAAG,CAAC;AAE3C,gBAAuB,KAAkB;IACvC,MAAM,EACJ,MAAM,EACN,YAAY,EACZ,SAAS,EACT,MAAM,EACN,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,GACT,GAAG,IAAA,sBAAS,EAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAA8C;AAC9C,qCAAuC;AACvC,6CAAgD;AAChD,uDAA0D;AAC1D,yDAA2D;AAC3D,qCAAwC;AACxC,uCAA0C;AAC1C,2CAA8C;AAC9C,yCAA4C;AAC5C,uCAA0C;AAC1C,2CAA8C;AAC9C,qDAAuD;AACvD,iEAAkE;AAElE,mEAAsE;AAEtE,6CAAyC;AAEzC,MAAM,gBAAgB,GAAG,uBAAC,mBAAW,KAAG,CAAC;AACzC,MAAM,iBAAiB,GAAG,uBAAC,qBAAY,KAA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AY;oBACrC,eAAe;oBACf,aAAa;iBACd,CAAC;YACJ,CAAC,CAAC,EACF,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,kBAAkB,GACtC,EAEJ,QAAQ,EACN,uBAAC,eAAe,IACd,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,UAAU,MAAM,EAAE,EAClD,IAAI,EAAE,SAAS,KAAK,IAAI,EACxB,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE;gBACN,CAAC,EAAE,MAAM,CAAC,CAAC;gBACX,CAAC,EAAE,MAAM,CAAC,CAAC;gBACX,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,EACD,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,UAAU,EACR,uBAAC,aAAa,IACZ,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,eAAe,EAAE,eAAe,GAChC,GAEJ,GAEJ,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lane.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/lanes/lane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"lane.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/lanes/lane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,SAAS,EACP,OAAO,GACP,mBAAmB,GACnB,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,CACpB,GAAG;IACF,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,eAAe,EACf,eAAe,EACf,eAAkD,GACnD,EAAE,YAAY,2CAuDd"}
|
|
@@ -4,6 +4,7 @@ exports.LaneRow = LaneRow;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
+
const core_1 = require("../../../core");
|
|
7
8
|
const press_point_1 = require("../../primitives/press-point");
|
|
8
9
|
const interval_hover_1 = require("./interval-hover");
|
|
9
10
|
const incomplete_1 = require("./parts/incomplete");
|
|
@@ -14,7 +15,7 @@ function LaneRow({ lane, geometry, width, rowHeight, press, intervalComponent: I
|
|
|
14
15
|
press(lane, point.x, point.y);
|
|
15
16
|
}, style: { width, height: rowHeight }, children: [(0, jsx_runtime_1.jsx)(incomplete_1.RosterIncomplete, { lane: lane, geometry: geometry, width: width, label: incompleteLabel }), layers.map((layer) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [geometry.rects
|
|
16
17
|
.filter((rect) => rect.layerId === layer.id)
|
|
17
|
-
.map((rect) => ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(IntervalComponent, { rect: rect, layer: layer, lane: lane, highlighted:
|
|
18
|
+
.map((rect) => ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(IntervalComponent, { rect: rect, layer: layer, lane: lane, highlighted: (0, core_1.hasSource)(rect.sources, highlightSource) }) }, `interval-${rect.x}:${rect.width}`))), geometry.gapRects
|
|
18
19
|
.filter((rect) => rect.layerId === layer.id)
|
|
19
20
|
.map((rect) => ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityLabel: `${lane.label}: removed time`, onPress: (input) => {
|
|
20
21
|
input.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lane.js","sourceRoot":"","sources":["../../../../../src/components/roster/lanes/lane.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiC;AACjC,+CAAyC;AAEzC,8DAA0D;AAE1D,qDAAsD;AACtD,mDAAsD;AAiBtD,iBAAwB,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,eAAe,EACf,eAAe,EACf,eAAe,GAAG,gCAAgC,GACrC;IACb,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,OAAO,CACL,wBAAC,wBAAS,OACJ,IAAA,mCAAkB,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,EAC3D,MAAM,EAAE,eAAe,IAAI,CAAC,EAAE,EAAE,EAChC,kBAAkB,EAAE,IAAI,CAAC,KAAK,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,MAAM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AAC,EAAE,CAAC;yBAC3C,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACb,uBAAC,wBAAS,IAER,kBAAkB,EAAE,GAAG,IAAI,CAAC,KAAK,gBAAgB,EACjD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;4BACjB,KAAK,CAAC,eAAe,EAAE,CAAC;4BACxB,MAAM,KAAK,GAAG,IAAA,wBAAU,EAAC,KAAK,CAAC,CAAC;4BAChC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;wBAClD,CAAC,EACD,KAAK,EAAE;4BACL,QAAQ,EAAE,UAAU;4BACpB,IAAI,EAAE,IAAI,CAAC,CAAC;4BACZ,GAAG,EAAE,IAAI,CAAC,CAAC;4BACX,KAAK,EAAE,IAAI,CAAC,KAAK;4BACjB,MAAM,EAAE,IAAI,CAAC,MAAM;4BACnB,MAAM,EAAE,IAAI,CAAC,CAAC;yBACf,YAED,uBAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,IAhBjD,OAAO,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAiBxB,CACb,CAAC,KAnCS,KAAK,CAAC,EAAE,CAoCZ,CACZ,CAAC,IACQ,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lane-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"lane-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,wBAAwB,EAAY,MAAM,OAAO,CAAC;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,GACZ,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,eAAe,CAAC,GAAG;IAC9C,+FAA+F;IAC/F,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC,2CAmDA"}
|
|
@@ -7,7 +7,8 @@ const react_1 = require("react");
|
|
|
7
7
|
const lane_1 = require("../lanes/lane");
|
|
8
8
|
const body_content_key_1 = require("../utils/body-content-key");
|
|
9
9
|
function RosterLaneList({ lanes, geometryFor, projection, scroll, press, contentWidth, viewport, window, intervalComponent, gapComponent, highlightSource, onIntervalHover, incompleteLabel, onRowRender, }) {
|
|
10
|
-
|
|
10
|
+
const [initialScrollOffset] = (0, react_1.useState)(() => scroll.y.get());
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(list_1.LegendList, { testID: "roster-vertical-scroll", initialScrollOffset: initialScrollOffset, data: lanes, extraData: (0, body_content_key_1.bodyContentKey)({
|
|
11
12
|
window,
|
|
12
13
|
projection,
|
|
13
14
|
highlightSource,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lane-list.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-list.tsx"],"names":[],"mappings":";;;;AAAA,0CAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"lane-list.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-list.tsx"],"names":[],"mappings":";;;;AAAA,0CAA6C;AAC7C,iCAA0E;AAC1E,wCAAwC;AAExC,gEAA2D;AAE3D,wBAA+B,EAC7B,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,E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E,eAAe,EAChC,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;YACF,IAAI,WAAW;gBACb,OAAO,CACL,uBAAC,gBAAQ,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,WAAW,YACzC,GAAG,GACK,CACZ,CAAC;YACJ,OAAO,GAAG,CAAC;QACb,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,13 @@ import type { LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent, Scroll
|
|
|
3
3
|
import type { SharedValue } from 'react-native-reanimated';
|
|
4
4
|
import type { Coverage, Lane, LaneComparator, LaneFlag, LaneGeometry, Projection, Rect, Source, Window, WindowSpec } from '../../core';
|
|
5
5
|
import type { GapInput, IntervalInput } from '../layers/layers.types';
|
|
6
|
+
import type { SelectionLayoutProps } from './selection/selection-layout.types';
|
|
7
|
+
/** A selected interval: the rect input plus its absolute bounds and the view zone for formatting. */
|
|
8
|
+
export type IntervalDetailInput = IntervalInput & {
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
viewTimezone: string;
|
|
12
|
+
};
|
|
6
13
|
export type RosterProjection = Extract<Projection, {
|
|
7
14
|
orientation: 'horizontal';
|
|
8
15
|
}>;
|
|
@@ -23,6 +30,8 @@ export type RosterScroll = {
|
|
|
23
30
|
labelStyle: StyleProp<ViewStyle>;
|
|
24
31
|
};
|
|
25
32
|
export type RosterInput = {
|
|
33
|
+
/** Retain interval selection on press, default false. Lives on RosterInput for hook consumers. */
|
|
34
|
+
selectable?: boolean;
|
|
26
35
|
lanes: Lane[];
|
|
27
36
|
windowSpec: WindowSpec;
|
|
28
37
|
minuteStep?: number;
|
|
@@ -40,6 +49,10 @@ export type RosterInput = {
|
|
|
40
49
|
pxPerMinute?: number;
|
|
41
50
|
};
|
|
42
51
|
export type RosterModel = {
|
|
52
|
+
/** Current interval with fresh lane, layer, and rect references and its absolute bounds, or null. */
|
|
53
|
+
selection: Omit<IntervalDetailInput, 'highlighted' | 'viewTimezone'> | null;
|
|
54
|
+
/** Close the selected interval details. */
|
|
55
|
+
dismissSelection: () => void;
|
|
43
56
|
window: Window;
|
|
44
57
|
projection: RosterProjection;
|
|
45
58
|
orderedLanes: Lane[];
|
|
@@ -118,7 +131,22 @@ export type RosterStyleProps = {
|
|
|
118
131
|
/** Width of the corner and lane label column, default 180. */
|
|
119
132
|
laneLabelWidth?: number;
|
|
120
133
|
};
|
|
121
|
-
export type RosterProps = RosterInput & RosterStyleProps & {
|
|
134
|
+
export type RosterProps = Omit<RosterInput, 'selectable'> & RosterStyleProps & {
|
|
135
|
+
/**
|
|
136
|
+
* Selected interval content; absent means interval presses retain no selection.
|
|
137
|
+
* Lives on RosterProps because the chassis mounts content and enables useRoster selection.
|
|
138
|
+
*/
|
|
139
|
+
intervalDetailComponent?: ComponentType<IntervalDetailInput>;
|
|
140
|
+
/**
|
|
141
|
+
* Presentation strategy for the body and selected details; defaults to RosterSelectionPopover.
|
|
142
|
+
* Lives on RosterProps because only the chassis mounts the layout, not useRoster.
|
|
143
|
+
*/
|
|
144
|
+
selectionLayout?: ComponentType<SelectionLayoutProps>;
|
|
145
|
+
/**
|
|
146
|
+
* Native portal host name; defaults to a unique useId name for this roster.
|
|
147
|
+
* Lives on RosterProps because only the chassis mounts the layout, not useRoster.
|
|
148
|
+
*/
|
|
149
|
+
portalHost?: string;
|
|
122
150
|
incompleteLabel?: string;
|
|
123
151
|
neverSetLabel?: string;
|
|
124
152
|
/** Label, differing lane zone, effective flag, and completeness notice. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roster.types.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/roster.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,EACV,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EACV,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,MAAM,EACN,MAAM,EACN,UAAU,EACX,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"roster.types.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/roster.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,EACV,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EACV,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,MAAM,EACN,MAAM,EACN,UAAU,EACX,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,qGAAqG;AACrG,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,WAAW,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;AAClF,MAAM,MAAM,UA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AC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACjD,sEAAsE;IACtE,YAAY,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACvC,2EAA2E;IAC3E,aAAa,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACzC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,yEAAyE;IACzE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC7C,qFAAqF;IACrF,wBAAwB,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3D,kGAAkG;IAClG,aAAa,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SelectionLayoutProps } from './selection-layout.types';
|
|
2
|
+
/** Native selection presentation with a local portal destination and shared scroll translation. */
|
|
3
|
+
export declare function RosterSelectionPopover({ anchorZone, contentZone, targetBounds, open, onDismiss, portalHost, scroll, }: SelectionLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=selection-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-layout.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/selection/selection-layout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIrE,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,UAAU,EACV,MAAM,GACP,EAAE,oBAAoB,2CAwEtB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.RosterSelectionPopover = RosterSelectionPopover;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = require("react");
|
|
39
|
+
const react_native_1 = require("react-native");
|
|
40
|
+
const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
41
|
+
const portal_1 = require("../../primitives/portal");
|
|
42
|
+
const overlay = { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 };
|
|
43
|
+
/** Native selection presentation with a local portal destination and shared scroll translation. */
|
|
44
|
+
function RosterSelectionPopover({ anchorZone, contentZone, targetBounds, open, onDismiss, portalHost, scroll, }) {
|
|
45
|
+
const name = (0, react_1.useId)();
|
|
46
|
+
const [viewport, setViewport] = (0, react_1.useState)({ width: 0, height: 0 });
|
|
47
|
+
const [content, setContent] = (0, react_1.useState)({ width: 0, height: 0 });
|
|
48
|
+
const maxWidth = Math.max(0, viewport.width - 8);
|
|
49
|
+
const maxHeight = Math.max(0, viewport.height - 8);
|
|
50
|
+
const size = { maxWidth, maxHeight, flexShrink: 1 };
|
|
51
|
+
const { x, y } = scroll;
|
|
52
|
+
const position = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
53
|
+
const below = targetBounds ? targetBounds.y + targetBounds.height + 4 - y.get() : 0;
|
|
54
|
+
const above = targetBounds ? targetBounds.y - content.height - 4 - y.get() : 0;
|
|
55
|
+
const maxTop = Math.max(0, viewport.height - content.height);
|
|
56
|
+
return {
|
|
57
|
+
left: Math.max(0, Math.min((targetBounds?.x ?? 0) - x.get(), viewport.width - content.width)),
|
|
58
|
+
top: below >= 0 && below <= maxTop ? below : above >= 0 && above <= maxTop ? above : 0,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
(0, react_1.useEffect)(() => {
|
|
62
|
+
if (!open)
|
|
63
|
+
return;
|
|
64
|
+
const subscription = react_native_1.BackHandler.addEventListener('hardwareBackPress', () => {
|
|
65
|
+
onDismiss();
|
|
66
|
+
return true;
|
|
67
|
+
});
|
|
68
|
+
return () => subscription.remove();
|
|
69
|
+
}, [open, onDismiss]);
|
|
70
|
+
let detailZone = null;
|
|
71
|
+
if (open && targetBounds && maxWidth > 0 && maxHeight > 0) {
|
|
72
|
+
detailZone = ((0, jsx_runtime_1.jsx)(portal_1.Portal, { hostName: portalHost, name: name, children: (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: [{ position: 'absolute', maxWidth, maxHeight }, position], children: (0, jsx_runtime_1.jsx)(react_native_1.View, { accessibilityRole: "summary", onStartShouldSetResponder: () => true, style: size, onLayout: ({ nativeEvent }) => setContent({
|
|
73
|
+
width: nativeEvent.layout.width,
|
|
74
|
+
height: nativeEvent.layout.height,
|
|
75
|
+
}), children: (0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { style: size, nestedScrollEnabled: true, children: (0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { horizontal: true, style: { maxWidth, flexGrow: 0, flexShrink: 0 }, nestedScrollEnabled: true, children: contentZone }) }) }) }) }));
|
|
76
|
+
}
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flex: 1, minHeight: 0 }, onLayout: ({ nativeEvent }) => setViewport({
|
|
78
|
+
width: nativeEvent.layout.width,
|
|
79
|
+
height: nativeEvent.layout.height,
|
|
80
|
+
}), children: [anchorZone, (0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "box-none", style: overlay, children: (0, jsx_runtime_1.jsx)(portal_1.PortalHost, { name: portalHost }) }), detailZone] }));
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=selection-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-layout.js","sourceRoot":"","sources":["../../../../../src/components/roster/selection/selection-layout.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmE;AACnE,+CAA6D;AAC7D,mFAAqE;AACrE,oDAA6D;AAG7D,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAC;AAExF,mGAAmG;AACnG,gCAAuC,EACrC,UAAU,EACV,WAAW,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AI,EACrC,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAC5B,UAAU,CAAC;wBACT,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK;wBAC/B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM;qBAClC,CAAC,YAGJ,uBAAC,yBAAU,IAAC,KAAK,EAAE,IAAI,EAAE,mBAAmB,kBAC1C,uBAAC,yBAAU,IACT,UAAU,QACV,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAC/C,mBAAmB,kBAElB,WAAW,GACD,GACF,GACR,GACO,GACT,CACV,CAAC;IACJ,CAAC;IACD,OAAO,CACL,wBAAC,mBAAI,IACH,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAChC,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAC5B,WAAW,CAAC;YACV,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK;YAC/B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM;SAClC,CAAC,aAGH,UAAU,EACX,uBAAC,mBAAI,IAAC,aAAa,EAAC,UAAU,EAAC,KAAK,EAAE,OAAO,YAC3C,uBAAC,mBAAU,IAAC,IAAI,EAAE,UAAU,GAAI,GAC3B,EACN,UAAU,IACN,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { RosterScroll } from '../roster.types';
|
|
3
|
+
/** Presentation-only contract shared by native, web, and consumer strategies. */
|
|
4
|
+
export type SelectionLayoutProps = {
|
|
5
|
+
/** Mounted body node, rendered once beneath or beside the details. */
|
|
6
|
+
anchorZone: ReactNode;
|
|
7
|
+
/** Mounted detail node, or null when closed. */
|
|
8
|
+
contentZone: ReactNode;
|
|
9
|
+
/** Interval bounds in body-content coordinates, before scroll translation. */
|
|
10
|
+
targetBounds: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
} | null;
|
|
16
|
+
/** Whether the detail presentation is open. */
|
|
17
|
+
open: boolean;
|
|
18
|
+
/** Report outside press, hardware back, Escape, or a presentation close action. */
|
|
19
|
+
onDismiss: () => void;
|
|
20
|
+
/** Unique native destination name owned by this selection layout. */
|
|
21
|
+
portalHost: string;
|
|
22
|
+
/** Shared offsets follow body scrolling without updating React state. */
|
|
23
|
+
scroll: Pick<RosterScroll, 'x' | 'y' | 'headerStyle' | 'labelStyle'>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=selection-layout.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-layout.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/selection/selection-layout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,iFAAiF;AACjF,MAAM,MAAM,oBAAoB,GAAG;IACjC,sEAAsE;IACtE,UAAU,EAAE,SAAS,CAAC;IACtB,gDAAgD;IAChD,WAAW,EAAE,SAAS,CAAC;IACvB,8EAA8E;IAC9E,YAAY,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7E,+CAA+C;IAC/C,IAAI,EAAE,OAAO,CAAC;IACd,mFAAmF;IACnF,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,GAAG,GAAG,GAAG,GAAG,aAAa,GAAG,YAAY,CAAC,CAAC;CACtE,CAAC"}
|