@aiquants/daily-report 0.48.0 → 0.49.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/CHANGELOG.md +36 -0
- package/README.md +45 -24
- package/dist/client.d.mts +11 -3
- package/dist/client.d.ts +11 -3
- package/dist/client.js +5 -5
- package/dist/client.mjs +5 -5
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/styles/daily-report.standalone.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@aiquants/daily-report` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.49.0 (2026-10-21)
|
|
6
|
+
|
|
7
|
+
### Breaking
|
|
8
|
+
|
|
9
|
+
- **`DailyReportPage` の `sessionEpoch` は必須**: ホストが失効の後に同じ利用者で確かめたセッションの数 (0 以上の安全な整数)。欠けると描画時に
|
|
10
|
+
`TypeError`、ほかの値は `RangeError`。失効で読み直すホストは定数 (`0` など) を渡せば、これまでと同じに動く。
|
|
11
|
+
- **`DailyReportErrorInfo` は `reason: "failed" | "refused"` を持ち、`operation` は `"liveUpdates"` も取る**: 403 (権限の断り) とライブ更新の
|
|
12
|
+
`forbidden` の終わりは `refused`、ほかは `failed`。`operation` を網羅して分けるホストは `"liveUpdates"` を足す。
|
|
13
|
+
- **検索・絞り込み・印のフックと置き場の options から `onSessionExpired` を外した**: `useDailyReportSearch`・`useDailyReportSearchFacets`・
|
|
14
|
+
`useShownSearchMarksStore`・`createDailyReportSearchSession`・`createDailyReportSearchMarksStore` は、セッションの終わりを API の基点の
|
|
15
|
+
セッションの門へ知らせる (下)。公開の `useDailyReportSseConnection` は `onSessionEnded` と `onRefused` を必須で受ける。
|
|
16
|
+
- **`DailyReportSearchFailure` に `refused` を足した** (403)。
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **セッションの終わりで読み直さずに止め、ホストが確かめたら続ける (WCAG 2.2.5 Re-authenticating)**: どの読み取り (ids の流れ・詳細・検索・
|
|
21
|
+
絞り込み・印) か書き込みが 401 で答えるか、SSE が `auth-required` で終わると、パッケージは API の基点ごとのセッションの門で通信を止め、
|
|
22
|
+
`config.onSessionExpired` を止めるたびに 1 回だけ呼ぶ (これまでは場所ごとに、1 回の失効で何度も呼びえた)。読み取りは中断し、SSE は閉じ、
|
|
23
|
+
ids の流れ・詳細・検索は新しい要求を出さず、書き込みは送らない (何も送らずに拒み、コメントの欄は下書きを残す)。下書き・開いた編集の形・
|
|
24
|
+
選択・検索・スクロールはメモリに残る。`sessionEpoch` が止めた時の値と違えば続ける: ids の流れは続きを読み (完走したことのある一覧は
|
|
25
|
+
読み直す)、SSE はカーソルから開き直し、待たせた詳細と絞り込みの候補を読み、検索と印を頼み直す。書き込みは送り直さない。続ける前に送った
|
|
26
|
+
要求の 401 は、その後のセッションを止めない。一度完走した一覧は、止めても本体を外さない (選択・検索・スクロールが残る)。
|
|
27
|
+
- **ラベル `operationRefused` (関数) と `liveUpdatesRefused`**: 断られた書き込みと、断られたライブ更新の知らせの文言。固有のキーは 116
|
|
28
|
+
(文字列 92 → 93・関数 22 → 23) になる。ログのチャンネル `SessionGate` (クライアントのチャンネルは 5 つ)。
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **書き込みの 401 がセッションの終わりを知らせなかった**: 8 つの書き込みは 401 で汎用の「操作に失敗」を出すだけだった。いまは門を止めて
|
|
33
|
+
`onSessionExpired` を 1 回呼び、パッケージの誤りの知らせは出さない (ホストの知らせが伝える)。
|
|
34
|
+
- **403 を失効として扱っていた**: ids の流れ・検索・絞り込み・印は 403 で `onSessionExpired` を呼び、詳細の置き場は 403 を失効の断りとして
|
|
35
|
+
扱っていた。403 は権限の断りで、サインインし直しても変わらない: 書き込みは `labels.operationRefused` の知らせ (`reason: "refused"`)、
|
|
36
|
+
検索と絞り込みは `refused`、詳細は断りを記録の誤りとして分け合い、印は付けず、ids の流れはやり直さずに `failed` で止まる。どれもホストの
|
|
37
|
+
再認証を求めない。
|
|
38
|
+
- **SSE の `forbidden` が記録だけだった**: ライブ更新が止まったことを読み手が知れるよう、断りとして知らせの口へ出す
|
|
39
|
+
(`operation: "liveUpdates"`, `reason: "refused"`, `labels.liveUpdatesRefused`)。
|
|
40
|
+
|
|
5
41
|
## 0.48.0 (2026-10-21)
|
|
6
42
|
|
|
7
43
|
### Added
|
package/README.md
CHANGED
|
@@ -660,11 +660,12 @@ its payload — with one strict parser each, after authentication and before any
|
|
|
660
660
|
| `[DailyReportSseReader]` | `info` | the shared SSE reader's Redis errors |
|
|
661
661
|
| `[DailyReportExternalSource]` | `info` | `transformJsonArray`'s malformed JSON columns of an external source |
|
|
662
662
|
|
|
663
|
-
The client has no host logger port: its
|
|
663
|
+
The client has no host logger port: its five channels of the same list write to the console from `info` — `[DailyReportActionProvider]` (the action
|
|
664
664
|
provider: a failed action, the queue of SSE messages about uncached reports, a cache reload), `[DailyReportDetailLoader]` (the detail loading: a
|
|
665
665
|
stale update of a report's cache, a failed prefetch of a business date, a failed refetch that left the shown report in place),
|
|
666
666
|
`[DailyReportIdsStream]` (the ids stream client: a revalidation that gave up, a rejected malformed line, which ends the attempt, a skipped line of
|
|
667
|
-
an unknown kind, a malformed stream anchor)
|
|
667
|
+
an unknown kind, a malformed stream anchor), `[DailyReportSseConnection]` (the SSE connection hook) and `[DailyReportSessionGate]` (the session
|
|
668
|
+
gate: a pause because the viewer's session ended, and the resume).
|
|
668
669
|
Every line, the server's and the client's, carries exactly one channel prefix: no message spells a `[DailyReport…]` prefix of its own.
|
|
669
670
|
|
|
670
671
|
A 500 is one line: its message (`500 endpoint=<name> elapsed=<ms>ms name=<error name> code=<code or N/A> message=<message>`,
|
|
@@ -1741,8 +1742,8 @@ unexpected error, a request that is not the package's client (another origin's p
|
|
|
1741
1742
|
|
|
1742
1743
|
| Server-side situation | Response | Client (`useDailyReportSseConnection`) |
|
|
1743
1744
|
| --- | --- | --- |
|
|
1744
|
-
| Not authenticated | 200, `retry: 86400000` → `event: auth-required` (`Set-Cookie` forwarded) | terminated;
|
|
1745
|
-
| Authenticated but no internal user | 200, `retry: 86400000` → `event: forbidden` | terminated; no navigation (a reload cannot fix it); visible through `sseStatus` |
|
|
1745
|
+
| Not authenticated | 200, `retry: 86400000` → `event: auth-required` (`Set-Cookie` forwarded) | terminated; pauses the package (`config.onSessionExpired()` once) and reconnects from its cursor when `sessionEpoch` changes |
|
|
1746
|
+
| Authenticated but no internal user | 200, `retry: 86400000` → `event: forbidden` | terminated; no navigation (a reload cannot fix it); reported as a refusal through the error surface (`operation: "liveUpdates"`, `reason: "refused"`, `labels.liveUpdatesRefused`) and visible through `sseStatus` |
|
|
1746
1747
|
| A request from another origin's page that the isolation refuses ([Request isolation](#request-isolation)) | 403 JSON before authentication (`Cache-Control: no-store`, the routes' security headers, no `Set-Cookie`), counted in the bounded refusal record | never met: the package's client connects from the page's own origin |
|
|
1747
1748
|
| A React Router single-fetch data request (`<path>.data`, `GET` or `HEAD`) | 404 JSON before authentication (`{"error":{"message":"Not Found"}}`, `Cache-Control: no-store`, the routes' security headers, no `Set-Cookie`), with no subscription or timer and no line in the refusal record ([Request isolation](#request-isolation)) | never sent by the client: `EventSource` requests the route itself |
|
|
1748
1749
|
| Unknown endpoint | 404 | treated as retryable; backoff up to 30 s |
|
|
@@ -2301,8 +2302,8 @@ The remainder does not go between a caption and its control: at q = 8 that gap w
|
|
|
2301
2302
|
Each request is sent `cache: "no-cache"`: the browser revalidates its previous answer with the ETag (`If-None-Match`) and, on a 304, hands over its
|
|
2302
2303
|
cached 200, so an unchanged answer's body is not sent again.
|
|
2303
2304
|
A failed first load shows only the status line and is retried at the next opening; a failed reload keeps the previous candidates and shows the
|
|
2304
|
-
failure in the status line. 401
|
|
2305
|
-
included, `failed`.
|
|
2305
|
+
failure in the status line. A 401 pauses the package at the session's end (see [Client wiring](#client-wiring)) and loads the candidates again
|
|
2306
|
+
when it resumes; a 403 shows `refused`, 404 `unavailable`, 429 `busy`, and anything else, a malformed answer included, `failed`.
|
|
2306
2307
|
The cells render once the candidates are loaded. The author and customer options are sorted with `Intl.Collator(config.locale)` (values the
|
|
2307
2308
|
collation ties are ordered by UTF-16 code units) and labelled with their value; the source-type options keep the server's order and are labelled
|
|
2308
2309
|
with their badge label from `sourceTypeConfigs` (the source type itself without one).
|
|
@@ -2426,13 +2427,13 @@ While an answer shows, the List cards, the side pane and the DetailList rows mar
|
|
|
2426
2427
|
A field is painted only when its marks were computed on the value drawn (the fingerprint): after a save or an SSE update the old ranges are not
|
|
2427
2428
|
painted and the field asks once for fresh marks. An answer whose `wordsDigest` differs from the shown answer's words is dropped; a quiet re-query of
|
|
2428
2429
|
the same search makes the marks stale and the mounted rows ask again;
|
|
2429
|
-
401 and 403
|
|
2430
|
+
a 401 pauses the package at the session's end (the marks are asked again when it resumes) and a 403 leaves the rows plain; a 429 whose `Retry-After` is at most 60 s (one window of the server's rate bucket) is asked again once, after
|
|
2430
2431
|
that delay, for the reports still subscribed then (one whose subscribers left meanwhile asks again when it is subscribed again), and a 429 without a
|
|
2431
2432
|
`Retry-After`, or with a longer one, sets no timer and leaves its reports plain for the answer's epoch (a delay of 2^31 ms or more would overflow
|
|
2432
2433
|
the timer and ask again at once);
|
|
2433
2434
|
any other failure of the request — a network failure, an abort, another status, a body that is not JSON — leaves those rows plain for as long as the
|
|
2434
2435
|
shown answer stays the same and reports nothing.
|
|
2435
|
-
Only the request's own failures are dropped: an error thrown by the host's `onSessionExpired
|
|
2436
|
+
Only the request's own failures are dropped: an error thrown by the session report (the host's `onSessionExpired`), by holding a 429's retry or by applying an answer and
|
|
2436
2437
|
notifying the rows rejects the batch, and the scheduler reports it with `reportError` (the window's `error` event, where a host's error monitoring
|
|
2437
2438
|
sees it) after it has freed the request's slot; a batch that rejects with its own abort's reason reports nothing.
|
|
2438
2439
|
Disposing the store — a new search, or React hiding the screen inside an `<Activity>` — aborts its requests, cancels its retry timers and gives
|
|
@@ -2487,13 +2488,15 @@ export const clientLoader = createDailyReportClientLoader() // Bootstraps the
|
|
|
2487
2488
|
|
|
2488
2489
|
export default function Route() {
|
|
2489
2490
|
const { user, userId } = useLoaderData<typeof clientLoader>()
|
|
2491
|
+
const { sessionEpoch, showSignInNotice } = useYourReauthentication(user) // Your notice, sign-in window and same-user check
|
|
2490
2492
|
return (
|
|
2491
2493
|
<YourAppLayout>
|
|
2492
2494
|
<DailyReportPage
|
|
2493
2495
|
user={user}
|
|
2494
2496
|
userId={userId}
|
|
2497
|
+
sessionEpoch={sessionEpoch} // Required: advance it when the same user has signed in again (the package resumes)
|
|
2495
2498
|
config={{
|
|
2496
|
-
onSessionExpired:
|
|
2499
|
+
onSessionExpired: showSignInNotice, // Required: called once each time the package pauses at a session end
|
|
2497
2500
|
renderHeader: ({ title, annotation }) => <YourHeader title={title} annotation={annotation} />,
|
|
2498
2501
|
showDevControls: import.meta.env.DEV, // Toggle SSE subscriptions, etc.
|
|
2499
2502
|
locale: "en", // UI chrome language: "en" (default) | "ja"
|
|
@@ -2519,10 +2522,20 @@ one definition of a draft (`draftLabelNames` in [DI ports](#di-ports)), so `conf
|
|
|
2519
2522
|
unknown key.
|
|
2520
2523
|
An optimistic report the viewer creates is a draft with no labels until the server's answer brings its labels (the draft label among them); an
|
|
2521
2524
|
optimistic publish clears `isDraft` at once and keeps the labels until the answer, and a failed publish restores `isDraft`.
|
|
2522
|
-
The package never navigates by itself
|
|
2523
|
-
the filters' candidates (`search-facets`)
|
|
2524
|
-
calls `onSessionExpired()`
|
|
2525
|
-
|
|
2525
|
+
The package never navigates or reloads by itself. When the viewer's session ends — the SSE stream ends with `auth-required`, or the ids stream, a
|
|
2526
|
+
detail read, a `search` request, the filters' candidates (`search-facets`), the marks (`search-marks`) or a write answers 401 — it **pauses** its
|
|
2527
|
+
network activity and calls `onSessionExpired()` once per pause: in-flight reads are aborted, the SSE connection closes, the ids stream, the detail
|
|
2528
|
+
reads and the search requests stop, no new request starts, and a write is not sent at all (it rejects without touching the server or the view; a
|
|
2529
|
+
comment field keeps its draft). Everything the page holds in memory stays: comment drafts, an open edit form, the selection, the search and the scroll.
|
|
2530
|
+
The package resumes when the page's required `sessionEpoch` prop (a safe integer >= 0; a missing one throws a `TypeError` at render and any other
|
|
2531
|
+
value a `RangeError`) differs from the value it paused at: the ids stream continues, the SSE reconnects from its cursor, held detail reads and the
|
|
2532
|
+
filters' candidates load again, and the search and the marks are asked again. Nothing is sent again on the viewer's behalf. A request sent before a
|
|
2533
|
+
resume whose 401 arrives after it does not pause the session that followed. A 403 is a refusal of the viewer, never a session end: a write answered 403
|
|
2534
|
+
is reported through the error surface with `reason: "refused"` and `labels.operationRefused(operation)`, the live updates ending with `forbidden`
|
|
2535
|
+
are reported the same way (`operation: "liveUpdates"`, `labels.liveUpdatesRefused`), a search or the filters show `refused`, a detail read keeps the
|
|
2536
|
+
refusal as the record's error, the marks stay plain, and the ids stream fails without retrying.
|
|
2537
|
+
A host that re-authenticates without a reload shows its own notice from `onSessionExpired`, lets the viewer sign in again (in another window, say), checks
|
|
2538
|
+
that the same user signed in, and then advances `sessionEpoch`; a host that reloads instead passes a constant and navigates from `onSessionExpired`.
|
|
2526
2539
|
`DailyReportConfigProvider` takes the same required `config`, and every component and hook of the package that reads the configuration needs it above:
|
|
2527
2540
|
outside it `useDailyReportConfig` throws at render (`[daily-report] useDailyReportConfig must be used within a DailyReportConfigProvider`); no default
|
|
2528
2541
|
configuration renders silently.
|
|
@@ -2554,16 +2567,18 @@ inside its TTL is not fetched. A refetch of a shown report that fails (the re-va
|
|
|
2554
2567
|
leaves the report in place with no error and only logs a warning on `[DailyReportDetailLoader]`, so the next new reader re-validates again. A settled
|
|
2555
2568
|
load error is not shared either: a reader that subscribes to a record holding an error — a row that mounts, an id that enters the input lead's band,
|
|
2556
2569
|
the side pane — asks again, and the answer replaces the error. Only a new subscription asks again or re-validates (a re-render or a second
|
|
2557
|
-
subscription of the same listener does not, so a row that keeps showing a failure or an expired report never loops), and a refusal of
|
|
2558
|
-
|
|
2559
|
-
|
|
2570
|
+
subscription of the same listener does not, so a row that keeps showing a failure or an expired report never loops), and a refusal of this read to
|
|
2571
|
+
the viewer (403, which signing in again does not change) is shared like an answer: it becomes the record's error even over a shown report, and no new
|
|
2572
|
+
reader asks again or re-validates. A session end (401) is not an error: the record keeps what it shows, the package pauses (see
|
|
2573
|
+
[Client wiring](#client-wiring)), no load starts while it is paused, and the held reports are asked again when it resumes.
|
|
2560
2574
|
The first load of a report that is not cached starts inside its first reader's subscription, with no task between the row's mount and its request,
|
|
2561
2575
|
so a held arrow key's stream of keydowns cannot postpone it until the key is released; only the refetch of an expired cached report waits 120 ms, to
|
|
2562
2576
|
absorb rows that only scroll past. Loads of reports of one business date share one request.
|
|
2563
2577
|
|
|
2564
2578
|
Mutation failures (save / publish / delete / comment) are surfaced through an error seam: inject `config.onError(info: DailyReportErrorInfo)` to route
|
|
2565
2579
|
them into your own toast/notification system, or omit it to use the package's built-in notice. Failures on a continuation that resolves after a
|
|
2566
|
-
no-reload user switch are suppressed
|
|
2580
|
+
no-reload user switch are suppressed, and so is a write answered 401 (the package pauses at the session's end and the host's notice speaks) or refused
|
|
2581
|
+
while the package is paused (nothing was sent). A write answered 403 is a refusal (`reason: "refused"`), which trying again does not change.
|
|
2567
2582
|
Deleting a report or a comment that the server no longer has (404) counts as done: the row or the comment stays removed and nothing is shown. Only the
|
|
2568
2583
|
deleting intents, `delete` and `deleteComment`, read a 404 so (their callbacks must say what a 404 means, `onGone`, and no other intent's callbacks
|
|
2569
2584
|
may, by type: `ActionCallbacks`); the 404 of any other intent rolls back and is reported.
|
|
@@ -3333,8 +3348,9 @@ the resize handle and the side pane lie outside the list.
|
|
|
3333
3348
|
The comment field is named by that heading (`aria-labelledby`; `labels.comments`), which renders whenever the form does, so the field has a name of
|
|
3334
3349
|
its own in the DetailList row, the side pane and the mobile overlay; its placeholder (`labels.commentPlaceholder`) stays a hint, not its name.
|
|
3335
3350
|
While a post is sent, the field keeps the draft, read-only, with the submit button disabled, and empties only when the post is accepted; a refused
|
|
3336
|
-
post (401, 403, a 5xx)
|
|
3337
|
-
|
|
3351
|
+
post (401, 403, a 5xx), and a post while the package is paused at a session end (never sent), leave the draft, its text and its caret untouched, so a
|
|
3352
|
+
viewer whose session ended sends it again after signing in again, on the same page (WCAG 2.2.5, with the host's re-authentication; see
|
|
3353
|
+
[Client wiring](#client-wiring)).
|
|
3338
3354
|
A report of a source that takes no comments and has none shows no empty section, and deleting the last comment of such a report removes the section,
|
|
3339
3355
|
so focus goes to the report's anchor above.
|
|
3340
3356
|
- **Mobile detail overlay** (List, single-column layout): the platform's modal dialog, a `<dialog data-daily-report-mobile-overlay>` (implicit
|
|
@@ -3859,8 +3875,10 @@ luminance by 0.026 in the light theme, and a `shadow-md` brings the ring down to
|
|
|
3859
3875
|
the scroll anchoring keeps the rows on screen in place. Not met at AA: 2.5.8 for the List's resize handle and the scroll bar beside it (**Side pane** above): larger hit areas for the handle and the
|
|
3860
3876
|
bar wait for the same layout pass as 2.5.5. Not claimed yet: 2.5.5 (44 px targets), 1.4.8 (a line measure and the List preview's
|
|
3861
3877
|
leading) and 3.3.5 (a help control for the search syntax), which need a layout pass, and 3.1.6 (readings of names), which needs readings from the
|
|
3862
|
-
host's directory. 2.2.5 is met
|
|
3863
|
-
|
|
3878
|
+
host's directory. 2.2.5 (Re-authenticating) is met with the host: at a session end the package pauses without reloading and keeps every draft, the
|
|
3879
|
+
open edit form, the selection, the search and the scroll in memory; the host lets the viewer sign in again without leaving the page and advances
|
|
3880
|
+
`sessionEpoch`, and the package resumes and sends nothing again by itself ([Client wiring](#client-wiring)). 2.2.6 (Timeouts) is the host's: the
|
|
3881
|
+
package keeps unsent work only in the open tab's memory until it is closed, and the host states how long a session lasts and what ends it. The floating tap-scroll circle hides while the view root carries `data-daily-report-keyboard-focus` (through the class both views pass in
|
|
3864
3882
|
`VirtualScroll`'s tap-scroll circle options).
|
|
3865
3883
|
- **Action buttons and icons**: the List card's star and read toggles, the star, read, edit and delete buttons of the DetailList header and the side
|
|
3866
3884
|
pane, and the trash button of the viewer's comments share one 24 px round target that never shrinks, with a 16 px SVG icon centred in it (4 px on
|
|
@@ -4212,7 +4230,7 @@ locale**: English (`"en"`, the default) and Japanese (`"ja"`). Pick the language
|
|
|
4212
4230
|
/>
|
|
4213
4231
|
```
|
|
4214
4232
|
|
|
4215
|
-
- **One surface for all wording.** The catalog covers the engine chrome keys of `@aiquants/virtualscroll` (every label key it exports) plus
|
|
4233
|
+
- **One surface for all wording.** The catalog covers the engine chrome keys of `@aiquants/virtualscroll` (every label key it exports) plus 116 own keys: field headings, the
|
|
4216
4234
|
page title (`title`, passed to `renderHeader` and used as the accessible name of both lists), the lists' keyboard help, the row states (read, read and updated since, and
|
|
4217
4235
|
starred, editing), the updated-since-read pill and the List card's position read to screen readers, tabs, buttons, placeholders, the `confirm()` text, stream badges, the search box, its filter row and the
|
|
4218
4236
|
search's match indicator, the status screen and the page's status region and the mutation-failure message with its repeat count. The engine part of
|
|
@@ -4271,13 +4289,16 @@ locale**: English (`"en"`, the default) and Japanese (`"ja"`). Pick the language
|
|
|
4271
4289
|
- **Not tied to `locale`**: `sourceTypeConfigs` (host data). Only the built-in default badge map used when `sourceTypeConfigs`
|
|
4272
4290
|
is omitted takes its `Internal` label from `labels.sourceInternal`.
|
|
4273
4291
|
- **Host notifications**: `config.onError` receives `DailyReportErrorInfo` with the stable
|
|
4274
|
-
`operation` key
|
|
4292
|
+
`operation` key (an operation, or `"liveUpdates"` when the server refused the viewer the live updates), the `reason` (`"refused"` for a 403 or the
|
|
4293
|
+
live updates' `forbidden` end, `"failed"` otherwise) and `message` = `labels.operationRefused(operation)`, `labels.liveUpdatesRefused` or
|
|
4294
|
+
`labels.operationFailed(operation)` in the chosen locale. A session end (401) is never reported here: the package pauses and calls
|
|
4295
|
+
`onSessionExpired` instead.
|
|
4275
4296
|
- **`locale` is the only language axis.** This package has no BCP 47 `formatLocale` option: digit
|
|
4276
4297
|
grouping follows `locale` (`en` → `"en-US"`, `ja` → `"ja-JP"`) and dates stay in ISO form. Packages
|
|
4277
4298
|
that do format dates (for example `@aiquants/period-slider`) name that separate axis `formatLocale`.
|
|
4278
4299
|
|
|
4279
4300
|
Exported API (`@aiquants/daily-report/client`): `DAILY_REPORT_LABEL_KEYS` (every key: the engine keys `@aiquants/virtualscroll` exports, in its order,
|
|
4280
|
-
first, then the
|
|
4301
|
+
first, then the 116 own keys), `DAILY_REPORT_LABEL_CATALOGS` (the frozen catalogs), `resolveDailyReportLabels(locale, labels)`
|
|
4281
4302
|
(the effective frozen labels — the catalog object itself when `labels` is `undefined`), the resolved
|
|
4282
4303
|
`locale` / `labels` on `useDailyReportConfig()`, and the types `DailyReportLocale` (= `VirtualScrollLocale`),
|
|
4283
4304
|
`DailyReportLabels`, `DailyReportLabelOverrides` and `DailyReportOperation`.
|
package/dist/client.d.mts
CHANGED
|
@@ -37,7 +37,7 @@ type DailyReportDetailListProps = {
|
|
|
37
37
|
scrollRestoreRef?: RefObject<DailyReportDetailListScrollRestore>;
|
|
38
38
|
};
|
|
39
39
|
declare const DailyReportDetailList: (props: DailyReportDetailListProps) => react.JSX.Element;
|
|
40
|
-
type DailyReportSearchFailure = "invalid" | "busy" | "unavailable" | "failed";
|
|
40
|
+
type DailyReportSearchFailure = "invalid" | "busy" | "unavailable" | "failed" | "refused";
|
|
41
41
|
type DailyReportLocale = VirtualScrollLocale;
|
|
42
42
|
type DailyReportOperation = Exclude<DailyReportActionIntent, "clearCache">;
|
|
43
43
|
type DailyReportLabels = VirtualScrollLabels & {
|
|
@@ -84,6 +84,7 @@ type DailyReportLabels = VirtualScrollLabels & {
|
|
|
84
84
|
readonly reload: string;
|
|
85
85
|
readonly loadingIds: string;
|
|
86
86
|
readonly streamFailed: string;
|
|
87
|
+
readonly liveUpdatesRefused: string;
|
|
87
88
|
readonly streamRetry: string;
|
|
88
89
|
readonly streamRevalidating: string;
|
|
89
90
|
readonly selectPrompt: string;
|
|
@@ -142,6 +143,7 @@ type DailyReportLabels = VirtualScrollLabels & {
|
|
|
142
143
|
readonly reportSummaryLoadFailed: (reportHubId: number) => string;
|
|
143
144
|
readonly interviewerWithAffiliation: (name: string, affiliation: string) => string;
|
|
144
145
|
readonly operationFailed: (operation: DailyReportOperation) => string;
|
|
146
|
+
readonly operationRefused: (operation: DailyReportOperation) => string;
|
|
145
147
|
readonly noticeRepeated: (count: number) => string;
|
|
146
148
|
readonly rowState: (state: {
|
|
147
149
|
readonly readState: DailyReportReadState;
|
|
@@ -217,6 +219,7 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
|
217
219
|
"reload",
|
|
218
220
|
"loadingIds",
|
|
219
221
|
"streamFailed",
|
|
222
|
+
"liveUpdatesRefused",
|
|
220
223
|
"streamRetry",
|
|
221
224
|
"streamRevalidating",
|
|
222
225
|
"selectPrompt",
|
|
@@ -275,6 +278,7 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
|
275
278
|
"reportSummaryLoadFailed",
|
|
276
279
|
"interviewerWithAffiliation",
|
|
277
280
|
"operationFailed",
|
|
281
|
+
"operationRefused",
|
|
278
282
|
"noticeRepeated",
|
|
279
283
|
"rowState",
|
|
280
284
|
"rowEditingState",
|
|
@@ -364,7 +368,8 @@ type DailyReportHeaderProps = {
|
|
|
364
368
|
annotation?: ReactNode;
|
|
365
369
|
};
|
|
366
370
|
type DailyReportErrorInfo = {
|
|
367
|
-
operation: DailyReportOperation;
|
|
371
|
+
operation: DailyReportOperation | "liveUpdates";
|
|
372
|
+
reason: "failed" | "refused";
|
|
368
373
|
message: string;
|
|
369
374
|
cause?: unknown;
|
|
370
375
|
};
|
|
@@ -413,6 +418,7 @@ type DailyReportPageProps = {
|
|
|
413
418
|
user?: DailyReportUser;
|
|
414
419
|
userId?: string | null;
|
|
415
420
|
config: DailyReportClientConfigInput;
|
|
421
|
+
sessionEpoch: number;
|
|
416
422
|
};
|
|
417
423
|
declare const DailyReportPage: ({ config, ...rest }: DailyReportPageProps) => react.JSX.Element;
|
|
418
424
|
type DailyReportResolvedContentProps = {
|
|
@@ -427,8 +433,10 @@ type UseDailyReportSseConnectionOptions = {
|
|
|
427
433
|
onMessage: (payload: Exclude<DailyReportSseMessage, {
|
|
428
434
|
type: "connected";
|
|
429
435
|
}>) => void;
|
|
436
|
+
onSessionEnded: () => void;
|
|
437
|
+
onRefused: () => void;
|
|
430
438
|
};
|
|
431
|
-
declare const useDailyReportSseConnection: ({ isSseEnabled, onMessage }: UseDailyReportSseConnectionOptions) => DailyReportSseConnectionStatus;
|
|
439
|
+
declare const useDailyReportSseConnection: ({ isSseEnabled, onMessage, onSessionEnded, onRefused }: UseDailyReportSseConnectionOptions) => DailyReportSseConnectionStatus;
|
|
432
440
|
type ReportBusinessDate = DailyReportDetail["date"];
|
|
433
441
|
type DailyReportActionFunctions = {
|
|
434
442
|
toggleSse: () => void;
|
package/dist/client.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ type DailyReportDetailListProps = {
|
|
|
37
37
|
scrollRestoreRef?: RefObject<DailyReportDetailListScrollRestore>;
|
|
38
38
|
};
|
|
39
39
|
declare const DailyReportDetailList: (props: DailyReportDetailListProps) => react.JSX.Element;
|
|
40
|
-
type DailyReportSearchFailure = "invalid" | "busy" | "unavailable" | "failed";
|
|
40
|
+
type DailyReportSearchFailure = "invalid" | "busy" | "unavailable" | "failed" | "refused";
|
|
41
41
|
type DailyReportLocale = VirtualScrollLocale;
|
|
42
42
|
type DailyReportOperation = Exclude<DailyReportActionIntent, "clearCache">;
|
|
43
43
|
type DailyReportLabels = VirtualScrollLabels & {
|
|
@@ -84,6 +84,7 @@ type DailyReportLabels = VirtualScrollLabels & {
|
|
|
84
84
|
readonly reload: string;
|
|
85
85
|
readonly loadingIds: string;
|
|
86
86
|
readonly streamFailed: string;
|
|
87
|
+
readonly liveUpdatesRefused: string;
|
|
87
88
|
readonly streamRetry: string;
|
|
88
89
|
readonly streamRevalidating: string;
|
|
89
90
|
readonly selectPrompt: string;
|
|
@@ -142,6 +143,7 @@ type DailyReportLabels = VirtualScrollLabels & {
|
|
|
142
143
|
readonly reportSummaryLoadFailed: (reportHubId: number) => string;
|
|
143
144
|
readonly interviewerWithAffiliation: (name: string, affiliation: string) => string;
|
|
144
145
|
readonly operationFailed: (operation: DailyReportOperation) => string;
|
|
146
|
+
readonly operationRefused: (operation: DailyReportOperation) => string;
|
|
145
147
|
readonly noticeRepeated: (count: number) => string;
|
|
146
148
|
readonly rowState: (state: {
|
|
147
149
|
readonly readState: DailyReportReadState;
|
|
@@ -217,6 +219,7 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
|
217
219
|
"reload",
|
|
218
220
|
"loadingIds",
|
|
219
221
|
"streamFailed",
|
|
222
|
+
"liveUpdatesRefused",
|
|
220
223
|
"streamRetry",
|
|
221
224
|
"streamRevalidating",
|
|
222
225
|
"selectPrompt",
|
|
@@ -275,6 +278,7 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
|
275
278
|
"reportSummaryLoadFailed",
|
|
276
279
|
"interviewerWithAffiliation",
|
|
277
280
|
"operationFailed",
|
|
281
|
+
"operationRefused",
|
|
278
282
|
"noticeRepeated",
|
|
279
283
|
"rowState",
|
|
280
284
|
"rowEditingState",
|
|
@@ -364,7 +368,8 @@ type DailyReportHeaderProps = {
|
|
|
364
368
|
annotation?: ReactNode;
|
|
365
369
|
};
|
|
366
370
|
type DailyReportErrorInfo = {
|
|
367
|
-
operation: DailyReportOperation;
|
|
371
|
+
operation: DailyReportOperation | "liveUpdates";
|
|
372
|
+
reason: "failed" | "refused";
|
|
368
373
|
message: string;
|
|
369
374
|
cause?: unknown;
|
|
370
375
|
};
|
|
@@ -413,6 +418,7 @@ type DailyReportPageProps = {
|
|
|
413
418
|
user?: DailyReportUser;
|
|
414
419
|
userId?: string | null;
|
|
415
420
|
config: DailyReportClientConfigInput;
|
|
421
|
+
sessionEpoch: number;
|
|
416
422
|
};
|
|
417
423
|
declare const DailyReportPage: ({ config, ...rest }: DailyReportPageProps) => react.JSX.Element;
|
|
418
424
|
type DailyReportResolvedContentProps = {
|
|
@@ -427,8 +433,10 @@ type UseDailyReportSseConnectionOptions = {
|
|
|
427
433
|
onMessage: (payload: Exclude<DailyReportSseMessage, {
|
|
428
434
|
type: "connected";
|
|
429
435
|
}>) => void;
|
|
436
|
+
onSessionEnded: () => void;
|
|
437
|
+
onRefused: () => void;
|
|
430
438
|
};
|
|
431
|
-
declare const useDailyReportSseConnection: ({ isSseEnabled, onMessage }: UseDailyReportSseConnectionOptions) => DailyReportSseConnectionStatus;
|
|
439
|
+
declare const useDailyReportSseConnection: ({ isSseEnabled, onMessage, onSessionEnded, onRefused }: UseDailyReportSseConnectionOptions) => DailyReportSseConnectionStatus;
|
|
432
440
|
type ReportBusinessDate = DailyReportDetail["date"];
|
|
433
441
|
type DailyReportActionFunctions = {
|
|
434
442
|
toggleSse: () => void;
|