@startsimpli/integrations 0.2.142 → 0.2.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startsimpli/integrations",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.143",
|
|
4
4
|
"description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://startsimpli.com",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"react-native": ">=0.74.0",
|
|
51
51
|
"@startsimpli/ui-native": ">=0.1.12",
|
|
52
52
|
"react-native-safe-area-context": ">=4.0.0",
|
|
53
|
-
"@startsimpli/
|
|
53
|
+
"@startsimpli/auth": "^0.4.50",
|
|
54
54
|
"@startsimpli/utils": "^0.4.17",
|
|
55
|
-
"@startsimpli/
|
|
55
|
+
"@startsimpli/ui": "^0.4.171"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"react": {
|
|
@@ -661,3 +661,21 @@ describe('TrackerPage — done fold and blocked reason', () => {
|
|
|
661
661
|
expect(await screen.findByText(/Waiting on DNS/)).toBeInTheDocument();
|
|
662
662
|
});
|
|
663
663
|
});
|
|
664
|
+
|
|
665
|
+
describe('TrackerPage — filtering', () => {
|
|
666
|
+
it('narrows the list by title, owner or project as you type, and says when nothing matches', async () => {
|
|
667
|
+
render(<TrackerPage api={makeApi()} scope={SCOPE} now={NOW} projectNames={{}} />);
|
|
668
|
+
await screen.findByText('Chase the inventor for comments on 2148');
|
|
669
|
+
const box = screen.getByRole('searchbox', { name: /filter to-dos/i });
|
|
670
|
+
await userEvent.type(box, 'equity');
|
|
671
|
+
expect(screen.getByText('Send the equity sheet to Harry Holcomb')).toBeInTheDocument();
|
|
672
|
+
expect(screen.queryByText('Chase the inventor for comments on 2148')).toBeNull();
|
|
673
|
+
await userEvent.clear(box);
|
|
674
|
+
await userEvent.type(box, 'rae');
|
|
675
|
+
expect(screen.getByText('Chase the inventor for comments on 2148')).toBeInTheDocument();
|
|
676
|
+
await userEvent.clear(box);
|
|
677
|
+
await userEvent.type(box, 'zzzz');
|
|
678
|
+
expect(screen.getByText(/no to-dos match/i)).toBeInTheDocument();
|
|
679
|
+
expect(screen.queryByText(/nothing is owed/i)).toBeNull();
|
|
680
|
+
});
|
|
681
|
+
});
|
|
@@ -314,13 +314,22 @@ export function TrackerPage({
|
|
|
314
314
|
// `sweepEpoch` re-arms the poll after the button starts a new one.
|
|
315
315
|
}, [canQueue, pollMs, maxAutoResumes, scope.orgId, sweepEpoch]);
|
|
316
316
|
|
|
317
|
+
const [filterText, setFilterText] = React.useState('');
|
|
318
|
+
/** Client-side narrowing over the loaded page: title, owner, subject or project name. */
|
|
319
|
+
const matches = React.useCallback((r: Commitment) => {
|
|
320
|
+
const q = filterText.trim().toLowerCase();
|
|
321
|
+
if (!q) return true;
|
|
322
|
+
const project = r.focusId ? projectNames[r.focusId] ?? '' : '';
|
|
323
|
+
return [r.title, r.ownerName, r.subject, project, r.detail].some((v) => (v ?? '').toLowerCase().includes(q));
|
|
324
|
+
}, [filterText, projectNames]);
|
|
325
|
+
const filtering = filterText.trim().length > 0;
|
|
317
326
|
const groups = React.useMemo(
|
|
318
|
-
() => groupTracker(rows, { now: clock, timeZone }),
|
|
319
|
-
[rows, clock, timeZone],
|
|
327
|
+
() => groupTracker(rows.filter(matches), { now: clock, timeZone }),
|
|
328
|
+
[rows, matches, clock, timeZone],
|
|
320
329
|
);
|
|
321
330
|
const doneGroups = React.useMemo(
|
|
322
|
-
() => (doneRows ? groupTracker(doneRows, { now: clock, timeZone }).done : []),
|
|
323
|
-
[doneRows, clock, timeZone],
|
|
331
|
+
() => (doneRows ? groupTracker(doneRows.filter(matches), { now: clock, timeZone }).done : []),
|
|
332
|
+
[doneRows, matches, clock, timeZone],
|
|
324
333
|
);
|
|
325
334
|
|
|
326
335
|
/** One write, then the list is re-read: the server is the source of what is owed. */
|
|
@@ -401,6 +410,14 @@ export function TrackerPage({
|
|
|
401
410
|
<button type="submit" className={cn.secondaryButton} disabled={adding || !draftTitle.trim()}>Add</button>
|
|
402
411
|
</form>
|
|
403
412
|
) : null}
|
|
413
|
+
{rows.length > 0 ? (
|
|
414
|
+
<input
|
|
415
|
+
type="search" className={`${cn.input} w-full`} value={filterText}
|
|
416
|
+
onChange={(e) => setFilterText(e.target.value)}
|
|
417
|
+
placeholder="Filter to-dos by title, owner or project…" aria-label="Filter to-dos"
|
|
418
|
+
/>
|
|
419
|
+
) : null}
|
|
420
|
+
{filtering && owed === 0 && rows.length > 0 ? <p className={cn.muted}>No to-dos match “{filterText.trim()}”.</p> : null}
|
|
404
421
|
<div className="flex flex-wrap items-center gap-3">
|
|
405
422
|
<p className={cn.muted} data-testid="tracker-summary">
|
|
406
423
|
{loading ? 'Loading…' : `${owed} owed · ${c.today} today · ${c.inProgress} in progress`}
|
|
@@ -468,7 +485,7 @@ export function TrackerPage({
|
|
|
468
485
|
{sweep ? <SweepPanel sweep={sweep} now={clock} classNames={cn} onOpenDocument={onOpenDocument} /> : null}
|
|
469
486
|
{run ? <RunSummary result={run} classNames={cn} onOpenDocument={onOpenDocument} /> : null}
|
|
470
487
|
|
|
471
|
-
{!loading && owed === 0 && c.stale === 0 ? (
|
|
488
|
+
{!loading && owed === 0 && c.stale === 0 && !filtering ? (
|
|
472
489
|
<p className={cn.muted}>
|
|
473
490
|
{workspaceHasAny === false
|
|
474
491
|
? 'Nothing has been pulled out of your meetings yet. Connect a source, then run “Pull from meetings”.'
|