@aiquants/daily-report 0.20.1 → 0.21.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 +229 -8
- package/dist/client.d.mts +192 -35
- package/dist/client.d.ts +192 -35
- package/dist/client.js +5 -5
- package/dist/client.mjs +5 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/{sse-schema-ChSFm-4q.d.mts → sse-schema-DCxpdETM.d.mts} +131 -131
- package/dist/{sse-schema-BdUGThiz.d.ts → sse-schema-DoQw8_om.d.ts} +131 -131
- package/package.json +3 -3
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from "react";
|
|
2
2
|
import { RefObject, ReactNode, Context } from "react";
|
|
3
|
-
import { ScrollBarThumbOverlayRenderProps, ScrollPaneInertiaOptions, ScrollBarTapCircleOptions } from "@aiquants/virtualscroll";
|
|
3
|
+
import { ScrollBarThumbOverlayRenderProps, VirtualScrollLocale, VirtualScrollLabels, ScrollPaneInertiaOptions, ScrollBarTapCircleOptions } from "@aiquants/virtualscroll";
|
|
4
4
|
import { D as DailyReportAttachmentSummary, a as DailyReportItem, b as DailyReportDetail, c as DailyReportUser } from "./types-CqgYQgbH.js";
|
|
5
|
-
import { U as UIComment, D as DailyReportSseMessage } from "./sse-schema-
|
|
5
|
+
import { U as UIComment, D as DailyReportSseMessage } from "./sse-schema-DoQw8_om.js";
|
|
6
6
|
import { ShouldRevalidateFunction } from "react-router";
|
|
7
7
|
import "zod";
|
|
8
8
|
declare const BusinessDayThumbOverlay: ({ orientation, thumbCenter, label, isDragging, isTapScrollActive, isWheelScrollActive }: ScrollBarThumbOverlayRenderProps & {
|
|
@@ -78,35 +78,192 @@ type DailyReportListProps = {
|
|
|
78
78
|
scrollOffsetRef?: RefObject<number>;
|
|
79
79
|
};
|
|
80
80
|
declare const DailyReportList: ({ dailyReportItems, autoMarkRead, selectedReportHubId, onSelectItem, userId, scrollOffsetRef }: DailyReportListProps) => react.JSX.Element;
|
|
81
|
+
type DailyReportLocale = VirtualScrollLocale;
|
|
82
|
+
type DailyReportOperation = "create" | "update" | "publish" | "delete" | "addComment" | "deleteComment" | "toggleStar" | "toggleRead";
|
|
83
|
+
type DailyReportLabels = VirtualScrollLabels & {
|
|
84
|
+
readonly id: string;
|
|
85
|
+
readonly businessDate: string;
|
|
86
|
+
readonly author: string;
|
|
87
|
+
readonly visitTime: string;
|
|
88
|
+
readonly createdAt: string;
|
|
89
|
+
readonly updatedAt: string;
|
|
90
|
+
readonly updatedBy: string;
|
|
91
|
+
readonly category: string;
|
|
92
|
+
readonly categoryInfo: string;
|
|
93
|
+
readonly creationCategory: string;
|
|
94
|
+
readonly customer: string;
|
|
95
|
+
readonly subject: string;
|
|
96
|
+
readonly content: string;
|
|
97
|
+
readonly interviewers: string;
|
|
98
|
+
readonly comments: string;
|
|
99
|
+
readonly attachments: string;
|
|
100
|
+
readonly attachmentMissing: string;
|
|
101
|
+
readonly attachmentDownload: string;
|
|
102
|
+
readonly tabArticle: string;
|
|
103
|
+
readonly tabRelations: string;
|
|
104
|
+
readonly relationsEmpty: string;
|
|
105
|
+
readonly title: string;
|
|
106
|
+
readonly tabList: string;
|
|
107
|
+
readonly tabTree: string;
|
|
108
|
+
readonly tabDetailList: string;
|
|
109
|
+
readonly treeComingSoon: string;
|
|
110
|
+
readonly totalCountLoading: string;
|
|
111
|
+
readonly createReport: string;
|
|
112
|
+
readonly createReportTitle: string;
|
|
113
|
+
readonly devControls: string;
|
|
114
|
+
readonly devSseToggle: string;
|
|
115
|
+
readonly devReload: string;
|
|
116
|
+
readonly devClearCache: string;
|
|
117
|
+
readonly autoRead: string;
|
|
118
|
+
readonly autoReadTitle: string;
|
|
119
|
+
readonly loadErrorBadge: string;
|
|
120
|
+
readonly loadError: string;
|
|
121
|
+
readonly reload: string;
|
|
122
|
+
readonly loadingIds: string;
|
|
123
|
+
readonly streamFailed: string;
|
|
124
|
+
readonly streamRetry: string;
|
|
125
|
+
readonly streamRevalidating: string;
|
|
126
|
+
readonly listEmpty: string;
|
|
127
|
+
readonly selectPrompt: string;
|
|
128
|
+
readonly loading: string;
|
|
129
|
+
readonly reportNotFound: string;
|
|
130
|
+
readonly contentEmpty: string;
|
|
131
|
+
readonly contentEmptyPreview: string;
|
|
132
|
+
readonly confirmDelete: string;
|
|
133
|
+
readonly deleteFailed: string;
|
|
134
|
+
readonly starAdd: string;
|
|
135
|
+
readonly starRemove: string;
|
|
136
|
+
readonly markRead: string;
|
|
137
|
+
readonly markUnread: string;
|
|
138
|
+
readonly deleteReport: string;
|
|
139
|
+
readonly resizeHandle: string;
|
|
140
|
+
readonly overlayBackdrop: string;
|
|
141
|
+
readonly overlayDialog: string;
|
|
142
|
+
readonly close: string;
|
|
143
|
+
readonly formTitle: string;
|
|
144
|
+
readonly formTitlePlaceholder: string;
|
|
145
|
+
readonly formContent: string;
|
|
146
|
+
readonly formContentPlaceholder: string;
|
|
147
|
+
readonly formCancel: string;
|
|
148
|
+
readonly formSave: string;
|
|
149
|
+
readonly formPublish: string;
|
|
150
|
+
readonly commentPlaceholder: string;
|
|
151
|
+
readonly commentSend: string;
|
|
152
|
+
readonly commentDelete: string;
|
|
153
|
+
readonly commentDeleteConfirm: string;
|
|
154
|
+
readonly unknownUser: string;
|
|
155
|
+
readonly sourceInternal: string;
|
|
156
|
+
readonly totalCount: (count: number) => string;
|
|
157
|
+
readonly debounce: (milliseconds: number) => string;
|
|
158
|
+
readonly streamProgressCount: (loaded: number) => string;
|
|
159
|
+
readonly streamProgressRatio: (loaded: number, total: number, percent: number) => string;
|
|
160
|
+
readonly streamRetrying: (loaded: number) => string;
|
|
161
|
+
readonly reportLoadFailed: (reportHubId: number) => string;
|
|
162
|
+
readonly reportSummaryLoadFailed: (reportHubId: number) => string;
|
|
163
|
+
readonly interviewerWithAffiliation: (name: string, affiliation: string) => string;
|
|
164
|
+
readonly operationFailed: (operation: DailyReportOperation) => string;
|
|
165
|
+
};
|
|
166
|
+
type DailyReportLabelOverrides = {
|
|
167
|
+
readonly [K in keyof DailyReportLabels]?: DailyReportLabels[K];
|
|
168
|
+
};
|
|
169
|
+
declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
170
|
+
"scrollUp",
|
|
171
|
+
"scrollDown",
|
|
172
|
+
"scrollLeft",
|
|
173
|
+
"scrollRight",
|
|
174
|
+
"scrollToTop",
|
|
175
|
+
"scrollToBottom",
|
|
176
|
+
"noItems",
|
|
177
|
+
"id",
|
|
178
|
+
"businessDate",
|
|
179
|
+
"author",
|
|
180
|
+
"visitTime",
|
|
181
|
+
"createdAt",
|
|
182
|
+
"updatedAt",
|
|
183
|
+
"updatedBy",
|
|
184
|
+
"category",
|
|
185
|
+
"categoryInfo",
|
|
186
|
+
"creationCategory",
|
|
187
|
+
"customer",
|
|
188
|
+
"subject",
|
|
189
|
+
"content",
|
|
190
|
+
"interviewers",
|
|
191
|
+
"comments",
|
|
192
|
+
"attachments",
|
|
193
|
+
"attachmentMissing",
|
|
194
|
+
"attachmentDownload",
|
|
195
|
+
"tabArticle",
|
|
196
|
+
"tabRelations",
|
|
197
|
+
"relationsEmpty",
|
|
198
|
+
"title",
|
|
199
|
+
"tabList",
|
|
200
|
+
"tabTree",
|
|
201
|
+
"tabDetailList",
|
|
202
|
+
"treeComingSoon",
|
|
203
|
+
"totalCountLoading",
|
|
204
|
+
"createReport",
|
|
205
|
+
"createReportTitle",
|
|
206
|
+
"devControls",
|
|
207
|
+
"devSseToggle",
|
|
208
|
+
"devReload",
|
|
209
|
+
"devClearCache",
|
|
210
|
+
"autoRead",
|
|
211
|
+
"autoReadTitle",
|
|
212
|
+
"loadErrorBadge",
|
|
213
|
+
"loadError",
|
|
214
|
+
"reload",
|
|
215
|
+
"loadingIds",
|
|
216
|
+
"streamFailed",
|
|
217
|
+
"streamRetry",
|
|
218
|
+
"streamRevalidating",
|
|
219
|
+
"listEmpty",
|
|
220
|
+
"selectPrompt",
|
|
221
|
+
"loading",
|
|
222
|
+
"reportNotFound",
|
|
223
|
+
"contentEmpty",
|
|
224
|
+
"contentEmptyPreview",
|
|
225
|
+
"confirmDelete",
|
|
226
|
+
"deleteFailed",
|
|
227
|
+
"starAdd",
|
|
228
|
+
"starRemove",
|
|
229
|
+
"markRead",
|
|
230
|
+
"markUnread",
|
|
231
|
+
"deleteReport",
|
|
232
|
+
"resizeHandle",
|
|
233
|
+
"overlayBackdrop",
|
|
234
|
+
"overlayDialog",
|
|
235
|
+
"close",
|
|
236
|
+
"formTitle",
|
|
237
|
+
"formTitlePlaceholder",
|
|
238
|
+
"formContent",
|
|
239
|
+
"formContentPlaceholder",
|
|
240
|
+
"formCancel",
|
|
241
|
+
"formSave",
|
|
242
|
+
"formPublish",
|
|
243
|
+
"commentPlaceholder",
|
|
244
|
+
"commentSend",
|
|
245
|
+
"commentDelete",
|
|
246
|
+
"commentDeleteConfirm",
|
|
247
|
+
"unknownUser",
|
|
248
|
+
"sourceInternal",
|
|
249
|
+
"totalCount",
|
|
250
|
+
"debounce",
|
|
251
|
+
"streamProgressCount",
|
|
252
|
+
"streamProgressRatio",
|
|
253
|
+
"streamRetrying",
|
|
254
|
+
"reportLoadFailed",
|
|
255
|
+
"reportSummaryLoadFailed",
|
|
256
|
+
"interviewerWithAffiliation",
|
|
257
|
+
"operationFailed"
|
|
258
|
+
];
|
|
259
|
+
declare const DAILY_REPORT_LABEL_CATALOGS: Readonly<Record<DailyReportLocale, DailyReportLabels>>;
|
|
260
|
+
declare const resolveDailyReportLabels: (locale: DailyReportLocale | undefined, overrides: DailyReportLabelOverrides | undefined) => DailyReportLabels;
|
|
81
261
|
type DailyReportHeaderProps = {
|
|
82
262
|
title: string;
|
|
83
263
|
annotation?: ReactNode;
|
|
84
264
|
};
|
|
85
|
-
type DailyReportFieldLabels = {
|
|
86
|
-
id: string;
|
|
87
|
-
businessDate: string;
|
|
88
|
-
author: string;
|
|
89
|
-
visitTime: string;
|
|
90
|
-
createdAt: string;
|
|
91
|
-
updatedAt: string;
|
|
92
|
-
updatedBy: string;
|
|
93
|
-
category: string;
|
|
94
|
-
categoryInfo: string;
|
|
95
|
-
creationCategory: string;
|
|
96
|
-
customer: string;
|
|
97
|
-
subject: string;
|
|
98
|
-
content: string;
|
|
99
|
-
interviewers: string;
|
|
100
|
-
comments: string;
|
|
101
|
-
attachments: string;
|
|
102
|
-
attachmentMissing: string;
|
|
103
|
-
attachmentDownload: string;
|
|
104
|
-
tabArticle: string;
|
|
105
|
-
tabRelations: string;
|
|
106
|
-
relationsEmpty: string;
|
|
107
|
-
};
|
|
108
265
|
type DailyReportErrorInfo = {
|
|
109
|
-
operation:
|
|
266
|
+
operation: DailyReportOperation;
|
|
110
267
|
message: string;
|
|
111
268
|
cause?: unknown;
|
|
112
269
|
};
|
|
@@ -116,22 +273,22 @@ type SourceTypeConfig = {
|
|
|
116
273
|
allowComment?: boolean;
|
|
117
274
|
};
|
|
118
275
|
type DailyReportClientConfig = {
|
|
119
|
-
title: string;
|
|
120
276
|
apiBasePath: string;
|
|
121
277
|
ssePath: string;
|
|
122
278
|
draftLabelName: string;
|
|
123
|
-
|
|
124
|
-
|
|
279
|
+
locale: DailyReportLocale;
|
|
280
|
+
labels: DailyReportLabels;
|
|
281
|
+
sourceTypeConfigs: Record<string, SourceTypeConfig>;
|
|
125
282
|
renderHeader: (props: DailyReportHeaderProps) => ReactNode;
|
|
126
283
|
showDevControls: boolean;
|
|
127
284
|
onError?: (info: DailyReportErrorInfo) => void;
|
|
128
285
|
};
|
|
129
|
-
type DailyReportClientConfigInput = Partial<Omit<DailyReportClientConfig, "
|
|
130
|
-
|
|
131
|
-
|
|
286
|
+
type DailyReportClientConfigInput = Partial<Omit<DailyReportClientConfig, "locale" | "labels">> & {
|
|
287
|
+
locale?: DailyReportLocale;
|
|
288
|
+
labels?: DailyReportLabelOverrides;
|
|
132
289
|
};
|
|
133
|
-
|
|
134
|
-
declare const defaultDailyReportClientConfig:
|
|
290
|
+
type DailyReportClientConfigDefaults = Readonly<Pick<DailyReportClientConfig, "apiBasePath" | "ssePath" | "draftLabelName" | "renderHeader" | "showDevControls">>;
|
|
291
|
+
declare const defaultDailyReportClientConfig: DailyReportClientConfigDefaults;
|
|
135
292
|
declare const DailyReportConfigProvider: ({ config, children }: {
|
|
136
293
|
config?: DailyReportClientConfigInput;
|
|
137
294
|
children: ReactNode;
|
|
@@ -400,4 +557,4 @@ declare const CONTENT_DRAG_POINTER_INPUTS: readonly [
|
|
|
400
557
|
"pen",
|
|
401
558
|
"touch"
|
|
402
559
|
];
|
|
403
|
-
export { BusinessDayThumbOverlay, CONTENT_DRAG_POINTER_INPUTS, DAILY_REPORT_FETCH_DEBOUNCE_MS, DEFAULT_ITEM_HEIGHT, type DailyReportActionContextType, DailyReportActionProvider, DailyReportAttachmentIndicator, DailyReportAttachmentList, DailyReportCache, type DailyReportClientConfig, type DailyReportClientConfigInput, DailyReportCommentForm, DailyReportCommentList, DailyReportConfigProvider, DailyReportDetailList, type DailyReportDetailListScrollRestore, type DailyReportDetailResource, DailyReportEditForm, type DailyReportErrorInfo, DailyReportErrorProvider, type
|
|
560
|
+
export { BusinessDayThumbOverlay, CONTENT_DRAG_POINTER_INPUTS, DAILY_REPORT_FETCH_DEBOUNCE_MS, DAILY_REPORT_LABEL_CATALOGS, DAILY_REPORT_LABEL_KEYS, DEFAULT_ITEM_HEIGHT, type DailyReportActionContextType, DailyReportActionProvider, DailyReportAttachmentIndicator, DailyReportAttachmentList, DailyReportCache, type DailyReportClientConfig, type DailyReportClientConfigDefaults, type DailyReportClientConfigInput, DailyReportCommentForm, DailyReportCommentList, DailyReportConfigProvider, DailyReportDetailList, type DailyReportDetailListScrollRestore, type DailyReportDetailResource, DailyReportEditForm, type DailyReportErrorInfo, DailyReportErrorProvider, type DailyReportHeaderProps, DailyReportIdsStreamClient, type DailyReportIdsStreamClientOptions, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, DailyReportList, DailyReportLoadError, DailyReportLoading, type DailyReportLocale, type DailyReportOperation, DailyReportPage, type DailyReportPageProps, DailyReportPostedComment, DailyReportResolvedContent, EMPTY_DETAIL, EMPTY_ITEM, FAST_SCROLL_INERTIA_OPTIONS, FAST_SCROLL_WHEEL_MULTIPLIER, ITEM_CONTAINER_HEIGHT, ITEM_VERTICAL_PADDING, MAX_PREVIEW_LINES, PREFETCH_LOOKAHEAD, PREFETCH_MAX_DATES, SCROLL_BAR_WIDTH, SSE_INITIAL_CONNECT_DEFER_MS, type SourceTypeConfig, TAP_SCROLL_CIRCLE_OPTIONS, UnreadIndicator, VIRTUAL_SCROLL_OVERSCAN_COUNT, WHEEL_RESET_TIMEOUT_MS, acquireMutationLock, applyBroadcastReportUpdate, applyDailyReportServerUpdates, bootstrapDailyReportIdsStreamSession, clearDailyReportCache, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, deleteDailyReportCache, ensureDailyReportIdsStreamSession, getCachedReport, getDailyReportIdsStreamSessionUserKey, primeDailyReportIdsStreamSession, refreshDailyReportIdsStream, registerRecentDeletion, releaseMutationLock, reloadDocument, removeDailyReportIdsStreamItem, resetDailyReportIdsStreamSessionForTesting, resolveDailyReportLabels, resolveSourceTypeConfig, retryDailyReportIdsStream, subscribeCacheReady, updateDailyReportCache, upsertDailyReportIdsStreamItem, useAnimatedNumber, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportErrorSurface, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection, useDynamicViewportHeight, writeCache };
|