@haneinfo/frontend-instances 0.6.0 → 0.8.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.
Files changed (103) hide show
  1. package/README.md +141 -26
  2. package/agent-guide.md +12 -0
  3. package/dist/attachments-client.d.ts +7 -2
  4. package/dist/attachments-client.d.ts.map +1 -1
  5. package/dist/attachments-client.js +47 -11
  6. package/dist/attachments-client.js.map +1 -1
  7. package/dist/client.d.ts +12 -75
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +12 -463
  10. package/dist/client.js.map +1 -1
  11. package/dist/contracts.d.ts +167 -5
  12. package/dist/contracts.d.ts.map +1 -1
  13. package/dist/contracts.js +5 -98
  14. package/dist/contracts.js.map +1 -1
  15. package/dist/dashboard.d.ts +43 -0
  16. package/dist/dashboard.d.ts.map +1 -0
  17. package/dist/dashboard.js +72 -0
  18. package/dist/dashboard.js.map +1 -0
  19. package/dist/detail-client.d.ts +59 -0
  20. package/dist/detail-client.d.ts.map +1 -0
  21. package/dist/detail-client.js +253 -0
  22. package/dist/detail-client.js.map +1 -0
  23. package/dist/documents-client.d.ts +2 -1
  24. package/dist/documents-client.d.ts.map +1 -1
  25. package/dist/documents-client.js +13 -9
  26. package/dist/documents-client.js.map +1 -1
  27. package/dist/draft-client.d.ts +27 -3
  28. package/dist/draft-client.d.ts.map +1 -1
  29. package/dist/draft-client.js +107 -54
  30. package/dist/draft-client.js.map +1 -1
  31. package/dist/draft-session.d.ts +1 -0
  32. package/dist/draft-session.d.ts.map +1 -1
  33. package/dist/draft-session.js +2 -1
  34. package/dist/draft-session.js.map +1 -1
  35. package/dist/field-errors.d.ts +4 -0
  36. package/dist/field-errors.d.ts.map +1 -0
  37. package/dist/field-errors.js +25 -0
  38. package/dist/field-errors.js.map +1 -0
  39. package/dist/filter-editor.d.ts +18 -0
  40. package/dist/filter-editor.d.ts.map +1 -0
  41. package/dist/filter-editor.js +145 -0
  42. package/dist/filter-editor.js.map +1 -0
  43. package/dist/format.d.ts +152 -0
  44. package/dist/format.d.ts.map +1 -0
  45. package/dist/format.js +402 -0
  46. package/dist/format.js.map +1 -0
  47. package/dist/import-client.d.ts +31 -0
  48. package/dist/import-client.d.ts.map +1 -0
  49. package/dist/import-client.js +179 -0
  50. package/dist/import-client.js.map +1 -0
  51. package/dist/instance-management-client.d.ts +23 -6
  52. package/dist/instance-management-client.d.ts.map +1 -1
  53. package/dist/instance-management-client.js +96 -70
  54. package/dist/instance-management-client.js.map +1 -1
  55. package/dist/labels.d.ts +10 -0
  56. package/dist/labels.d.ts.map +1 -0
  57. package/dist/labels.js +42 -0
  58. package/dist/labels.js.map +1 -0
  59. package/dist/list-client.d.ts +39 -0
  60. package/dist/list-client.d.ts.map +1 -0
  61. package/dist/list-client.js +403 -0
  62. package/dist/list-client.js.map +1 -0
  63. package/dist/list-query.d.ts +41 -0
  64. package/dist/list-query.d.ts.map +1 -0
  65. package/dist/list-query.js +171 -0
  66. package/dist/list-query.js.map +1 -0
  67. package/dist/management-client.d.ts +6 -2
  68. package/dist/management-client.d.ts.map +1 -1
  69. package/dist/management-client.js +113 -84
  70. package/dist/management-client.js.map +1 -1
  71. package/dist/messages.d.ts +4 -4
  72. package/dist/messages.d.ts.map +1 -1
  73. package/dist/messages.js +23 -5
  74. package/dist/messages.js.map +1 -1
  75. package/dist/process-client.d.ts +27 -0
  76. package/dist/process-client.d.ts.map +1 -0
  77. package/dist/process-client.js +129 -0
  78. package/dist/process-client.js.map +1 -0
  79. package/dist/process-messages.d.ts +73 -0
  80. package/dist/process-messages.d.ts.map +1 -0
  81. package/dist/process-messages.js +154 -0
  82. package/dist/process-messages.js.map +1 -0
  83. package/dist/server.d.ts +34 -1
  84. package/dist/server.d.ts.map +1 -1
  85. package/dist/server.js +302 -50
  86. package/dist/server.js.map +1 -1
  87. package/dist/tasks-client.d.ts +38 -0
  88. package/dist/tasks-client.d.ts.map +1 -0
  89. package/dist/tasks-client.js +127 -0
  90. package/dist/tasks-client.js.map +1 -0
  91. package/dist/timeline.d.ts +24 -0
  92. package/dist/timeline.d.ts.map +1 -0
  93. package/dist/timeline.js +189 -0
  94. package/dist/timeline.js.map +1 -0
  95. package/dist/ui-messages.d.ts +284 -0
  96. package/dist/ui-messages.d.ts.map +1 -0
  97. package/dist/ui-messages.js +372 -0
  98. package/dist/ui-messages.js.map +1 -0
  99. package/dist/ui.d.ts +101 -0
  100. package/dist/ui.d.ts.map +1 -0
  101. package/dist/ui.js +169 -0
  102. package/dist/ui.js.map +1 -0
  103. package/package.json +4 -2
package/README.md CHANGED
@@ -36,10 +36,10 @@ HTTP-only types and `labelKeys`. The server entry also exports the contracts, `d
36
36
 
37
37
  Lists support PREDICATE/GROUP AND/OR, all eight operators, inclusive date ranges, up to eight
38
38
  sort keys, selected columns and offset/limit pagination (1–500). IN uses one literal per line.
39
- Datetime-local controls are explicitly UTC. Exports use the last applied query, not unapplied
40
- editor changes. Saved views default to private; sharing controls depend only on `canShare`.
39
+ Datetime-local controls are in the display time zone (see below). Exports use the last applied
40
+ query, not unapplied drawer changes. Saved views default to private; sharing controls depend only on `canShare`.
41
41
 
42
- Details use pinned subject Form labels and the merged timeline; mentions come only from the
42
+ Details use pinned subject Form labels and the structured timeline; mentions come only from the
43
43
  instance-specific mentionable API. Following comes from the timeline or mutation response.
44
44
  Comments are append-only plain text and AI comments have a visible attribution.
45
45
 
@@ -66,7 +66,8 @@ authorization and validation; the UI does not recreate RBAC. 401/403/404 display
66
66
  messages without raw API details. All user content is rendered as text nodes, including errors,
67
67
  field values, names, and timeline details. No HTML or Markdown rendering is used.
68
68
 
69
- No instance creation, submission, approval, rejection or transition controls are included.
69
+ No submission, approval, rejection or transition controls are included. With `showCreate` the
70
+ list and dashboard offer "New record" (an empty draft; the backend decides whether it is allowed).
70
71
 
71
72
  ## Submitter display
72
73
 
@@ -79,7 +80,7 @@ List `$submitterId` cells and the detail submitter field display `submitterName
79
80
  mounts it at `/dashboard/delegations` and supplies an authenticated Server Action calling
80
81
  `performInstanceRequest`. Administrative controls depend on the successful admin list API;
81
82
  only DELEGATION_NOT_FOUND is treated as a denial. Other failures render an error.
82
- The UTC datetime inputs require an explicit end; backend rules remain authoritative.
83
+ The datetime inputs (in the display time zone) require an explicit end; backend rules remain authoritative.
83
84
 
84
85
  Pass `showAccess: true` to `renderInstanceDetailPage` to load the access list. `InstanceAccessPanel`
85
86
  is exported from the client entry for other hosts. It renders USER/ROLE, READ/WRITE, sources,
@@ -142,27 +143,141 @@ over `filename`; unsafe/malformed names use a bounded template-code/format fallb
142
143
  can retain up to the backend's default 10 MiB output limit plus browser-managed copies; Next does
143
144
  not buffer the response. DOCUMENT history renders translated template code/version/format/actor
144
145
  as text. No preview, attachment persistence or workflow transition controls are added.
146
+
147
+ ## Instance management (draft 202610-6e7f)
148
+
149
+ Pass `showManagement: true` to `renderInstanceDetailPage` to add three things to the detail page:
150
+ the tag panel, the lifecycle actions and, for a draft the reader may edit, the draft editor.
151
+ `renderDeletedInstancesPage` renders the deleted-drafts page (restore, remaining retention days);
152
+ the list page links to it at `${basePath}/deleted`. Merge the complete English/zh-TW catalogs in
153
+ `validation/equipment-loan/management-panel/app/frontend/messages/` into the host's `instances`.
154
+
155
+ What each control offers comes from the server, never from the client: `canAdd` on the tag list,
156
+ `canRemove` per tag, and `canArchive`, `canUnarchive`, `canDelete`, `canEdit` on the instance read.
157
+ Tags use `GET /tags/suggest` for a keyboard-operable combobox and are plain text everywhere. The list
158
+ page adds a tag filter (all or any) and an archive selector (`EXCLUDE`, `INCLUDE`, `ONLY`) that are
159
+ saved with views; when the backend answers `TAGS_NOT_AVAILABLE` the tag controls disappear.
160
+
161
+ The draft editor edits top-level text, textarea, number, date, datetime, radio, select, checkbox and
162
+ switch fields and subform rows from the pinned Form. User pickers, formulas and number-assigned fields
163
+ remain read only. Required fields are hinted until a submission fails validation. Edits autosave through
164
+ `PATCH /state-machine-instances/:id/data/fields` with the current `baseRevision`: one serialized
165
+ queue, at least two seconds between requests, only changed fields, `changedByOthers` fields refreshed
166
+ unless being edited, and a leave-page prompt plus a same-origin keepalive write
167
+ (`draftKeepaliveUrl`, a host route that forwards the same JSON). A `VERSION_CONFLICT` opens a dialog
168
+ that shows the current value and your value per field and resends the fields you keep with the new
169
+ revision; `RATE_LIMITED` waits for `retryAfterSeconds`. Enable `showProcess` for the workflow controls
170
+ described below; their revision always comes from the last acknowledged draft save.
171
+
172
+ ## Quality overhaul (draft 202610-a8d3, phase two)
173
+
174
+ Implemented against the draft; the decision remains draft.
175
+
176
+ ### New page options and entry points
177
+
178
+ Every page renderer accepts `locale` (`zh-TW` or `en`) and `timeZone`. With `locale`, backend
179
+ requests carry `Accept-Language` so field, option, state and transition labels arrive in that
180
+ language (`withLocale(apiFetch, locale)` does the same for other calls); pass the same locale as
181
+ `performInstanceRequest(apiFetch, request, { locale })` in the App's Server Action. `timeZone`
182
+ defaults to the `DISPLAY_TIME_ZONE` environment variable, then `Asia/Taipei`; the server passes
183
+ it to the client components, so server-rendered and hydrated text are identical.
184
+
185
+ `renderInstanceListPage` and `renderInstanceDetailPage` also accept `personField` (the Form key
186
+ of the person a record is about; default: the first text field) and the list `showCreate`.
187
+ `renderInstanceDashboardPage({ machineCode, personField, showCreate, links })` renders my open
188
+ records by state (report `$state` counts with a `$leadTime` count to exclude finished records),
189
+ the five most recently created records and quick actions; without the reports mechanism it
190
+ degrades to recent records and quick actions, and it welcomes people without any records.
191
+ `DashboardSkeleton`, `ListSkeleton` and `DetailSkeleton` (with a `label` for screen readers) are
192
+ loading placeholders for the App's `loading.tsx` or a `Suspense` fallback. All existing options
193
+ keep working.
194
+
195
+ ### Rendering
196
+
197
+ `formatFieldValue(field, value, { locale, timeZone })` (with `formatFieldText`) returns a display
198
+ descriptor for every Form field type: text (multi-line kept, long text collapsible), numbers by
199
+ locale, calendar dates without zone conversion, date-times in the display zone, select/radio
200
+ option labels (unknown values shown and marked), checkbox options, yes/no switches, subforms as
201
+ tables of typed cells, user names, calculated (formula) values, `—` for empty values with a
202
+ screen-reader text, and `invalid` instead of JSON for malformed data. Dates and times are built
203
+ from numeric fields with fixed separators and a fixed zone-name table, never from ICU patterns.
204
+ `<time dateTime>` elements show the full date and time on hover and keyboard focus; relative times
205
+ ("3 minutes ago") only appear in the activity feed and only after hydration.
206
+
207
+ State badges show `stateLabel` with a dot and soft background for `stateTone`. The host must
208
+ define the tone tokens (light and dark) and map them for Tailwind, e.g.:
209
+
210
+ ```css
211
+ @theme inline {
212
+ --color-tone-success: var(--tone-success);
213
+ --color-tone-success-soft: var(--tone-success-soft);
214
+ /* … warning, info, danger */
215
+ }
216
+ :root { --tone-success: oklch(0.448 0.119 151.328); --tone-success-soft: oklch(0.962 0.044 156.743); }
217
+ .dark { --tone-success: oklch(0.871 0.15 154.449); --tone-success-soft: oklch(0.266 0.065 152.934); }
218
+ ```
219
+
220
+ Without them badges keep their text and neutral borders. Hosts should also honour
221
+ `prefers-reduced-motion` globally; components use `motion-safe:` for their own animation.
222
+
223
+ The activity feed turns every structured timeline kind (START, TRANSITION, CHOICE, NUMBER,
224
+ NOTIFICATION_FAILURE, COMMENT, ACCESS, ATTACHMENT, TAG, REFERENCE, SPACE, DOCUMENT, LIFECYCLE)
225
+ into a translated sentence, grouped by day in the display zone and sorted by time. People appear
226
+ by display name (unknown people as "Unknown person"), the system as "System", comment mentions as
227
+ `@Name`; deprecated `actorId`/`details` are never rendered.
228
+
229
+ ### Screens
230
+
231
+ - Detail: header (number, or record name and creation date; state badge; archived; person,
232
+ submitter, created, last updated), an action area (`data-slot="instance-actions"`) with
233
+ follow and a "More actions" lifecycle menu, the content card in Form order (two columns on wide
234
+ screens, subforms full width) or the draft editor in its place, and tabs (activity with the
235
+ comment form, attachments, documents, access and tags) with counts. Narrow screens stack summary,
236
+ content, actions and tabs.
237
+ - List: exact-match search over filterable text fields (no contains operator exists), state chips,
238
+ a saved-view menu with "Save current view", a filter drawer, removable applied-filter chips with
239
+ "Clear all", default columns (number, person, state, created, tags with +N), sortable sticky
240
+ headers, whole-row links, cards under 768 px, skeleton rows while loading, "no records" and "no
241
+ matching records" states, pagination with rows per page, and a More menu (import, CSV/Excel
242
+ export, deleted drafts). The applied query is kept in the URL.
243
+ - Deleted drafts, delegations, import, attachments, documents, tags and access use the same
244
+ headings, dates, empty, loading and error states. Granting access moved into a dialog.
245
+
246
+ `ListClient` and `DetailClient` take new props (see their exported prop types). `LifecyclePanel` is
247
+ deprecated in favor of `LifecycleMenu`. Client components link with `next/link`;
248
+ `LinkComponent` is used for server-rendered links (back links, dashboard). `lucide-react` is a peer dependency.
249
+
250
+ ### Translations
251
+
252
+ New label keys are listed in `src/ui-messages.ts`. `defaultLabels(locale)` returns complete
253
+ English and Traditional Chinese (Taiwan) catalogs; page renderers resolve the host's `t` through
254
+ `resolveLabels`, which uses the default for keys the host does not translate. Hosts should still
255
+ ship every key: the complete catalogs used by the equipment-loan App are in
256
+ `validation/equipment-loan/frontend-quality-ui/app/frontend/messages/` (regenerate with
257
+ `catalogs.mjs`).
258
+ ## Workflow operations and personal tasks (draft 202610-d1f4)
145
259
 
146
- ## Instance management (draft 202610-6e7f)
147
-
148
- Pass `showManagement: true` to `renderInstanceDetailPage` to add three things to the detail page:
149
- the tag panel, the lifecycle actions and, for a draft the reader may edit, the draft editor.
150
- `renderDeletedInstancesPage` renders the deleted-drafts page (restore, remaining retention days);
151
- the list page links to it at `${basePath}/deleted`. Merge the complete English/zh-TW catalogs in
152
- `validation/equipment-loan/management-panel/app/frontend/messages/` into the host's `instances`.
260
+ Enable showProcess on renderInstanceDetailPage alongside showManagement. The existing action
261
+ slot renders only server-provided transitions, with a primary button, additional-action menu
262
+ and state-label confirmation dialog. Pending or failed draft saves disable transitions with
263
+ an accessible explanation. Requests carry the last saved expectedRevision. Revision conflicts
264
+ reuse the field-choice dialog; bounded INVALID_DATA fieldErrors map to controls, including
265
+ subform columns. Unknown codes use generic translated text. Subform rows can be edited, added
266
+ and removed, with the entire array saved as one field. A failed CHOICE shows recovery guidance
267
+ and the server-authorized retry button. Successful operations refresh state, revision, tasks
268
+ and timeline and announce the result. Input is blocked during the mutation.
153
269
 
154
- What each control offers comes from the server, never from the client: `canAdd` on the tag list,
155
- `canRemove` per tag, and `canArchive`, `canUnarchive`, `canDelete`, `canEdit` on the instance read.
156
- Tags use `GET /tags/suggest` for a keyboard-operable combobox and are plain text everywhere. The list
157
- page adds a tag filter (all or any) and an archive selector (`EXCLUDE`, `INCLUDE`, `ONLY`) that are
158
- saved with views; when the backend answers `TAGS_NOT_AVAILABLE` the tag controls disappear.
270
+ Mount renderMyTasksPage with the usual authenticated action, API, translation, locale and
271
+ basePath options (basePath points to instance details). It defaults to OPEN, supports ALL,
272
+ and paginates the returned authorized task snapshot in groups of 20. Task responses are
273
+ available in expanded rows and the detail pending-items section, always with confirmation.
274
+ Enable showTasks and optional tasksPath on renderInstanceDashboardPage for the first five tasks.
275
+ Use TaskCountBadge from the client entry inside the task navigation link, with the action
276
+ and tasksCountLabel translation. Key it by the current pathname to refresh on navigation.
277
+ Responses emit haneinfo:tasks-changed; there is no push subscription or periodic count polling.
278
+ Counts above 99 display 99+ while the accessible name preserves the actual number.
159
279
 
160
- The draft editor edits top-level text, textarea, number, date, datetime, radio, select, checkbox and
161
- switch fields from the pinned Form. Subforms, user pickers, formulas and number-assigned fields are
162
- read only. Required fields are only hinted ("required when submitting"). Edits autosave through
163
- `PATCH /state-machine-instances/:id/data/fields` with the current `baseRevision`: one serialized
164
- queue, at least two seconds between requests, only changed fields, `changedByOthers` fields refreshed
165
- unless being edited, and a leave-page prompt plus a same-origin keepalive write
166
- (`draftKeepaliveUrl`, a host route that forwards the same JSON). A `VERSION_CONFLICT` opens a dialog
167
- that shows the current value and your value per field and resends the fields you keep with the new
168
- revision; `RATE_LIMITED` waits for `retryAfterSeconds`. No submit or transition control is offered.
280
+ All writes remain authenticated same-origin Server Actions. Regenerate both catalogs using
281
+ validation/equipment-loan/process-operations/catalogs.mjs after building this package.
282
+ The reversible process-operations overlay includes the App mounts, disposable services,
283
+ production HTTP integration tests, browser workflows, screenshots, axe and byte-exact restore.
package/agent-guide.md CHANGED
@@ -74,3 +74,15 @@ proxy, unchanged response headers/status, streaming and cancellation. Only match
74
74
  file MIME types become Blobs. Translate exact known JSON codes, never raw backend prose. Keep
75
75
  one generation pending across all formats/templates, release object URLs, abort on unmount and
76
76
  refresh the enclosing timeline after success. Names, codes and document history are text nodes.
77
+
78
+ ## Quality overhaul (draft 202610-a8d3, phase two)
79
+
80
+ Render every stored value through `formatFieldValue`/`formatFieldText` and every timeline entry
81
+ through the activity feed; never print raw values, JSON, internal ids or UTC strings. Keep dates
82
+ deterministic (`format.ts` composes them from numeric fields) and pass the same `locale` and
83
+ `timeZone` to the server renderer and client components. Colors come only from host tokens
84
+ (`--tone-*` for state tones); add both English and zh-TW defaults to `src/ui-messages.ts` for new
85
+ text and regenerate the App catalogs with `validation/equipment-loan/frontend-quality-ui/catalogs.mjs`.
86
+ Keep 44 px touch targets on narrow screens (`touch` class), visible focus and the empty, loading
87
+ and error states. The browser acceptance (screenshots at three viewports in both themes and axe)
88
+ is in `validation/equipment-loan/frontend-quality-ui/`.
@@ -1,14 +1,19 @@
1
1
  import type { AttachmentList, InstanceAction, Labels } from './contracts.js';
2
2
  export declare function attachmentSize(bytes: number): string;
3
+ /** A short, readable file type (PDF, Word, PNG) instead of a MIME type. */
4
+ export declare function fileTypeLabel(contentType: string, fileName: string): string;
3
5
  /** Advisory only: every selected file is still submitted for authoritative validation. */
4
- export declare function attachmentPrecheck(file: File, limits: AttachmentList['limits'], index: number): ("TAG_LIMIT_EXCEEDED" | "TAG_INVALID" | "TAGS_NOT_AVAILABLE" | "INSTANCE_NOT_ARCHIVABLE" | "INSTANCE_NOT_DELETABLE" | "FIELD_NOT_EDITABLE" | "FIELD_UNKNOWN" | "STATE_FROZEN" | "VERSION_CONFLICT" | "RATE_LIMITED" | "INVALID_DATA" | "TEMPLATE_NOT_AVAILABLE" | "TEMPLATE_INVALID" | "SUBJECT_UNAVAILABLE" | "DOCUMENT_TOO_LARGE" | "DOCUMENT_BUSY" | "DOCUMENT_TIMEOUT" | "DOCUMENT_ABORTED" | "DOCUMENT_FAILED" | "ATTACHMENT_TOO_LARGE" | "ATTACHMENT_TYPE_NOT_ALLOWED" | "ATTACHMENT_TYPE_MISMATCH" | "ATTACHMENT_LIMIT_EXCEEDED" | "ATTACHMENT_NAME_INVALID" | "ATTACHMENT_NOT_FOUND" | "ATTACHMENT_MULTIPART_INVALID" | "ATTACHMENT_UPLOAD_ABORTED" | "INVALID_INPUT" | "FORBIDDEN" | "INSTANCE_NOT_FOUND" | "MACHINE_NOT_FOUND" | "VIEW_NOT_FOUND" | "JOB_NOT_FOUND" | "UNDECLARED_QUERY_FIELD" | "INVALID_QUERY" | "INVALID_VIEW" | "INVALID_VIEW_SHARING" | "PREFLIGHT_REJECTED" | "PREFLIGHT_REQUIRED" | "DUPLICATE_KEY_EXISTING" | "DUPLICATE_KEY_IN_FILE" | "DUPLICATE_ROW" | "INVALID_DUPLICATE_KEY" | "DUPLICATE_MAPPING" | "INVALID_FIELD_MAPPING" | "MISSING_COLUMN" | "MISSING_FIELD" | "FORBIDDEN_COLUMN" | "REQUIRED" | "TYPE_MISMATCH" | "INVALID_CELL" | "INVALID_ENCODING" | "INVALID_FILE" | "INVALID_HEADERS" | "FILE_TOO_LARGE" | "EXPORT_FILE_TOO_LARGE" | "EXPORT_LIMIT_EXCEEDED" | "EXPORT_NOT_AVAILABLE" | "IMPORT_REPORT_NOT_AVAILABLE" | "DEFINITION_CHANGED" | "DEFINITION_NOT_FOUND" | "SUBJECT_REQUIRED" | "INVALID_COMMENT" | "INVALID_MENTION" | "MENTION_NOT_ALLOWED" | "IDENTITY_SEARCH_UNAVAILABLE" | "DELEGATE_INVALID" | "DELEGATOR_INVALID" | "DELEGATION_PERIOD_INVALID" | "DELEGATION_DURATION_EXCEEDED" | "DELEGATION_OVERLAP" | "DELEGATION_CYCLE" | "DELEGATION_NOT_FOUND" | "ACCESS_NOT_MANAGEABLE" | "ACCESS_LIMIT_EXCEEDED" | "ACCESS_PRINCIPAL_INVALID" | "requestFailed" | "unauthorized" | "forbidden" | "notFound" | "invalidInput")[];
6
+ export declare function attachmentPrecheck(file: File, limits: AttachmentList['limits'], index: number): ("refresh" | "processTitle" | "processConfirm" | "processConsequence" | "processFinalConsequence" | "waitingFor" | "processRoute" | "processWorking" | "processDone" | "processSaveFirst" | "processSaveFailed" | "processValidation" | "processPartialErrors" | "processWaiting" | "processReload" | "routingTitle" | "routingHint" | "routingWho" | "retryRouting" | "routingState" | "tasksTitle" | "tasksHint" | "tasksPending" | "tasksPendingHint" | "tasksEmpty" | "tasksEmptyHint" | "tasksAllEmpty" | "tasksAllEmptyHint" | "tasksInstanceEmpty" | "tasksInstanceEmptyHint" | "tasksOpen" | "tasksAll" | "taskOPEN" | "taskRESPONDED" | "taskCLOSED" | "taskCANCELLED" | "taskAssignee" | "taskDue" | "taskNoDue" | "taskExpand" | "taskCollapse" | "taskComment" | "taskConfirm" | "taskConsequence" | "taskDone" | "taskReadOnly" | "taskViewRecord" | "tasksViewAll" | "tasksCountLabel" | "fieldInvalid" | "PATTERN_MISMATCH" | "OPTION_NOT_ALLOWED" | "OUT_OF_RANGE" | "ROW_COUNT" | "FORMULA_ERROR" | "FORMULA_CYCLE" | "FORMULA_FIELD_INPUT" | "UNKNOWN_FIELD_VALUE" | "addRow" | "removeRow" | "itemRow" | "ASSIGNEE_UNRESOLVED" | "ROUTING_NOT_FAILED" | "TASK_NOT_OPEN" | "TASK_NOT_FOUND" | "DELEGATION_ENDED" | "TRANSITION_NOT_AVAILABLE" | "TRANSITION_GUARD_FALSE" | "TAG_LIMIT_EXCEEDED" | "TAG_INVALID" | "TAGS_NOT_AVAILABLE" | "INSTANCE_NOT_ARCHIVABLE" | "INSTANCE_NOT_DELETABLE" | "FIELD_NOT_EDITABLE" | "FIELD_UNKNOWN" | "STATE_FROZEN" | "VERSION_CONFLICT" | "RATE_LIMITED" | "INVALID_DATA" | "TEMPLATE_NOT_AVAILABLE" | "TEMPLATE_INVALID" | "SUBJECT_UNAVAILABLE" | "DOCUMENT_TOO_LARGE" | "DOCUMENT_BUSY" | "DOCUMENT_TIMEOUT" | "DOCUMENT_ABORTED" | "DOCUMENT_FAILED" | "ATTACHMENT_TOO_LARGE" | "ATTACHMENT_TYPE_NOT_ALLOWED" | "ATTACHMENT_TYPE_MISMATCH" | "ATTACHMENT_LIMIT_EXCEEDED" | "ATTACHMENT_NAME_INVALID" | "ATTACHMENT_NOT_FOUND" | "ATTACHMENT_MULTIPART_INVALID" | "ATTACHMENT_UPLOAD_ABORTED" | "INVALID_INPUT" | "FORBIDDEN" | "INSTANCE_NOT_FOUND" | "MACHINE_NOT_FOUND" | "VIEW_NOT_FOUND" | "JOB_NOT_FOUND" | "UNDECLARED_QUERY_FIELD" | "INVALID_QUERY" | "INVALID_VIEW" | "INVALID_VIEW_SHARING" | "PREFLIGHT_REJECTED" | "PREFLIGHT_REQUIRED" | "DUPLICATE_KEY_EXISTING" | "DUPLICATE_KEY_IN_FILE" | "DUPLICATE_ROW" | "INVALID_DUPLICATE_KEY" | "DUPLICATE_MAPPING" | "INVALID_FIELD_MAPPING" | "MISSING_COLUMN" | "MISSING_FIELD" | "FORBIDDEN_COLUMN" | "REQUIRED" | "TYPE_MISMATCH" | "INVALID_CELL" | "INVALID_ENCODING" | "INVALID_FILE" | "INVALID_HEADERS" | "FILE_TOO_LARGE" | "EXPORT_FILE_TOO_LARGE" | "EXPORT_LIMIT_EXCEEDED" | "EXPORT_NOT_AVAILABLE" | "IMPORT_REPORT_NOT_AVAILABLE" | "DEFINITION_CHANGED" | "DEFINITION_NOT_FOUND" | "SUBJECT_REQUIRED" | "INVALID_COMMENT" | "INVALID_MENTION" | "MENTION_NOT_ALLOWED" | "IDENTITY_SEARCH_UNAVAILABLE" | "DELEGATE_INVALID" | "DELEGATOR_INVALID" | "DELEGATION_PERIOD_INVALID" | "DELEGATION_DURATION_EXCEEDED" | "DELEGATION_OVERLAP" | "DELEGATION_CYCLE" | "DELEGATION_NOT_FOUND" | "ACCESS_NOT_MANAGEABLE" | "ACCESS_LIMIT_EXCEEDED" | "ACCESS_PRINCIPAL_INVALID" | "unauthorized" | "forbidden" | "notFound" | "invalidInput" | "requestFailed")[];
5
7
  /** Uploads are XHR multipart to an App-owned streaming route, never a Server Action. */
6
- export declare function AttachmentsPanel({ id, basePath, initial, labels: t, action, onChanged, }: {
8
+ export declare function AttachmentsPanel({ id, basePath, initial, labels: t, action, onChanged, locale, timeZone, onCount, }: {
7
9
  id: string;
8
10
  basePath: string;
9
11
  initial?: AttachmentList;
10
12
  labels: Labels;
11
13
  action: InstanceAction;
12
14
  onChanged?: () => Promise<void>;
15
+ locale?: string;
16
+ timeZone?: string;
17
+ onCount?: (count: number) => void;
13
18
  }): import("react").JSX.Element;
14
19
  //# sourceMappingURL=attachments-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachments-client.d.ts","sourceRoot":"","sources":["../src/attachments-client.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAe,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1F,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,UAI3C;AACD,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,kyDAS7F;AASD,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,EAC/B,EAAE,EACF,QAAQ,EACR,OAAO,EACP,MAAM,EAAE,CAAC,EACT,MAAM,EACN,SAAS,GACV,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC,+BAgSA"}
1
+ {"version":3,"file":"attachments-client.d.ts","sourceRoot":"","sources":["../src/attachments-client.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAe,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAK1F,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,UAI3C;AAcD,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAOlE;AACD,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,8/FAS7F;AASD,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,EAC/B,EAAE,EACF,QAAQ,EACR,OAAO,EACP,MAAM,EAAE,CAAC,EACT,MAAM,EACN,SAAS,EACT,MAAgB,EAChB,QAAwB,EACxB,OAAO,GACR,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,+BA0VA"}
@@ -1,14 +1,40 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { Button } from '@haneinfo/frontend-shell';
3
+ import { Button, cn } from '@haneinfo/frontend-shell';
4
+ import { Download, FileText, Paperclip, RotateCw, Upload } from 'lucide-react';
4
5
  import { useEffect, useId, useRef, useState } from 'react';
5
6
  import { call, ErrorMessage, RequestFailure, useTask } from './action-client.js';
7
+ import { formatDateTime } from './format.js';
6
8
  import { errorKey } from './messages.js';
9
+ import { DateTimeText, EmptyState, ErrorState, Skeleton, StateBadge, touch } from './ui.js';
7
10
  export function attachmentSize(bytes) {
8
11
  const unit = bytes >= 1048576 ? 'MiB' : bytes >= 1024 ? 'KiB' : 'B';
9
12
  const divisor = unit === 'MiB' ? 1048576 : unit === 'KiB' ? 1024 : 1;
10
13
  return `${Number((bytes / divisor).toFixed(1))} ${unit}`;
11
14
  }
15
+ const FILE_TYPES = {
16
+ 'application/pdf': 'PDF',
17
+ 'image/png': 'PNG',
18
+ 'image/jpeg': 'JPEG',
19
+ 'image/gif': 'GIF',
20
+ 'image/webp': 'WebP',
21
+ 'text/plain': 'TXT',
22
+ 'text/csv': 'CSV',
23
+ 'application/zip': 'ZIP',
24
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'Word',
25
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'Excel',
26
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'PowerPoint',
27
+ };
28
+ /** A short, readable file type (PDF, Word, PNG) instead of a MIME type. */
29
+ export function fileTypeLabel(contentType, fileName) {
30
+ const known = FILE_TYPES[contentType.split(';')[0].trim().toLowerCase()];
31
+ if (known)
32
+ return known;
33
+ const extension = fileName.includes('.') ? fileName.split('.').pop() : undefined;
34
+ return extension && extension.length <= 6
35
+ ? extension.toUpperCase()
36
+ : (contentType.split('/').pop()?.toUpperCase() ?? '—');
37
+ }
12
38
  /** Advisory only: every selected file is still submitted for authoritative validation. */
13
39
  export function attachmentPrecheck(file, limits, index) {
14
40
  if (!limits)
@@ -24,7 +50,7 @@ export function attachmentPrecheck(file, limits, index) {
24
50
  return hints;
25
51
  }
26
52
  /** Uploads are XHR multipart to an App-owned streaming route, never a Server Action. */
27
- export function AttachmentsPanel({ id, basePath, initial, labels: t, action, onChanged, }) {
53
+ export function AttachmentsPanel({ id, basePath, initial, labels: t, action, onChanged, locale = 'zh-TW', timeZone = 'Asia/Taipei', onCount, }) {
28
54
  const [list, setList] = useState(initial);
29
55
  const [loading, setLoading] = useState(!initial);
30
56
  const [loadError, setLoadError] = useState();
@@ -40,8 +66,10 @@ export function AttachmentsPanel({ id, basePath, initial, labels: t, action, onC
40
66
  setLoadError(undefined);
41
67
  try {
42
68
  const next = await call(action, { kind: 'attachments', id });
43
- if (active.current)
69
+ if (active.current) {
44
70
  setList(next);
71
+ onCount?.(next.items.length);
72
+ }
45
73
  }
46
74
  catch (error) {
47
75
  if (active.current) {
@@ -136,11 +164,19 @@ export function AttachmentsPanel({ id, basePath, initial, labels: t, action, onC
136
164
  await onChanged?.();
137
165
  });
138
166
  }
139
- return (_jsxs("section", { "aria-labelledby": heading, "aria-busy": task.pending || loading, className: "flex min-w-0 flex-col gap-3 rounded-lg border bg-card p-4 text-card-foreground", children: [_jsx("h2", { id: heading, className: "font-semibold", children: t.attachmentsTitle }), (loading || task.pending) && _jsx("p", { role: "status", children: t.loading }), _jsx(ErrorMessage, { error: loadError ?? task.error, labels: t }), _jsx(Button, { type: "button", variant: "outline", disabled: task.pending || loading, onClick: () => void refresh(), children: t.attachmentRefresh }), list && (_jsxs(_Fragment, { children: [!list.items.length && _jsx("p", { children: t.empty }), _jsx("ul", { className: "flex min-w-0 flex-col gap-3", children: list.items.map((item) => (_jsxs("li", { className: "min-w-0 rounded-md border p-3 [overflow-wrap:anywhere]", "data-attachment-id": item.id, children: [_jsxs("dl", { className: "grid min-w-0 gap-2 sm:grid-cols-2", children: [_jsxs("div", { children: [_jsx("dt", { children: t.attachmentName }), _jsx("dd", { children: item.fileName })] }), _jsxs("div", { children: [_jsx("dt", { children: t.attachmentSize }), _jsx("dd", { children: attachmentSize(item.size) })] }), _jsxs("div", { children: [_jsx("dt", { children: t.attachmentType }), _jsx("dd", { children: item.detectedContentType })] }), _jsxs("div", { children: [_jsx("dt", { children: t.attachmentStatus }), _jsx("dd", { children: item.status === 'READY'
140
- ? t.attachmentReady
141
- : item.status === 'PENDING_SCAN'
142
- ? t.attachmentPending
143
- : t.attachmentRejected })] }), _jsxs("div", { children: [_jsx("dt", { children: t.uploadedBy }), _jsx("dd", { children: item.uploadedByName ?? item.uploadedBy })] }), _jsxs("div", { children: [_jsx("dt", { children: t.createdAt }), _jsx("dd", { children: _jsx("time", { dateTime: item.createdAt, children: item.createdAt }) })] })] }), _jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [item.status === 'READY' && (_jsx("a", { className: "underline", href: `${route}/${encodeURIComponent(item.id)}/content`, children: t.attachmentDownload })), item.canDelete && (_jsx(Button, { type: "button", variant: "outline", disabled: task.pending, onClick: () => setConfirm(item.id), children: t.deleteAttachment }))] }), confirm === item.id && item.canDelete && (_jsxs("fieldset", { "aria-label": t.confirmDeleteAttachment, className: "mt-3 flex flex-wrap items-center gap-2", children: [_jsx("p", { children: t.confirmDeleteAttachment }), _jsx(Button, { type: "button", disabled: task.pending, onClick: () => void task.run(async () => {
167
+ const when = (value) => {
168
+ const text = formatDateTime(value, { locale, timeZone });
169
+ return text ? (_jsx(DateTimeText, { iso: new Date(value).toISOString(), text: text, full: formatDateTime(value, { locale, timeZone, full: true }) ?? text })) : null;
170
+ };
171
+ return (_jsxs("section", { "aria-labelledby": heading, "aria-busy": task.pending || loading, className: "flex min-w-0 flex-col gap-3 rounded-xl bg-card p-4 text-card-foreground ring-1 ring-foreground/10", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("h2", { id: heading, className: "flex items-center gap-2 font-heading font-medium text-base", children: [_jsx(Paperclip, { "aria-hidden": "true", className: "size-4 text-muted-foreground" }), t.attachmentsTitle] }), _jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: touch, disabled: task.pending || loading, onClick: () => void refresh(), children: [_jsx(RotateCw, { "aria-hidden": "true", "data-icon": "inline-start" }), t.attachmentRefresh] })] }), _jsx("p", { role: "status", "aria-live": "polite", className: "sr-only", children: loading || task.pending ? t.loading : '' }), loading && !list && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Skeleton, { className: "h-14 w-full" }), _jsx(Skeleton, { className: "h-14 w-full" })] })), loadError && _jsx(ErrorState, { title: t.attachmentsLoadFailed, description: t[loadError.key] }), _jsx(ErrorMessage, { error: task.error, labels: t }), list && (_jsxs(_Fragment, { children: [!list.items.length ? (_jsx(EmptyState, { icon: _jsx(Paperclip, {}), title: t.attachmentsEmpty, description: list.canUpload ? t.attachmentsEmptyHint : undefined })) : (_jsx("ul", { className: "flex min-w-0 flex-col divide-y rounded-lg border", children: list.items.map((item) => (_jsxs("li", { className: "flex min-w-0 flex-col gap-2 p-3 [overflow-wrap:anywhere]", "data-attachment-id": item.id, children: [_jsxs("div", { className: "flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center", children: [_jsx(FileText, { "aria-hidden": "true", className: "hidden size-5 shrink-0 text-muted-foreground sm:block" }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsxs("p", { className: "font-medium text-sm", children: [_jsxs("span", { className: "sr-only", children: [t.attachmentName, "\uFF1A"] }), item.fileName] }), _jsxs("p", { className: "text-muted-foreground text-xs", children: [_jsxs("span", { className: "sr-only", children: [t.attachmentSize, "\uFF1A"] }), attachmentSize(item.size), " \u00B7", ' ', _jsxs("span", { className: "sr-only", children: [t.attachmentType, "\uFF1A"] }), fileTypeLabel(item.detectedContentType, item.fileName), " \u00B7", ' ', _jsxs("span", { className: "sr-only", children: [t.uploadedBy, "\uFF1A"] }), item.uploadedByName ?? t.unknownPerson, when(item.createdAt) && _jsxs(_Fragment, { children: [" \u00B7 ", when(item.createdAt)] })] })] }), _jsx(StateBadge, { className: "self-start sm:self-center", label: item.status === 'READY'
172
+ ? t.attachmentReady
173
+ : item.status === 'PENDING_SCAN'
174
+ ? t.attachmentPending
175
+ : t.attachmentRejected, tone: item.status === 'READY'
176
+ ? 'success'
177
+ : item.status === 'PENDING_SCAN'
178
+ ? 'info'
179
+ : 'danger' }), _jsxs("div", { className: "flex flex-wrap gap-2", children: [item.status === 'READY' && (_jsxs("a", { className: "inline-flex h-8 items-center gap-1.5 rounded-lg border bg-background px-2.5 font-medium text-sm outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 max-md:min-h-11", href: `${route}/${encodeURIComponent(item.id)}/content`, children: [_jsx(Download, { "aria-hidden": "true", className: "size-4" }), t.attachmentDownload] })), item.canDelete && (_jsx(Button, { type: "button", variant: "ghost", className: cn('text-destructive', touch), disabled: task.pending, onClick: () => setConfirm(item.id), children: t.deleteAttachment }))] })] }), confirm === item.id && item.canDelete && (_jsxs("fieldset", { "aria-label": t.confirmDeleteAttachment, className: "flex flex-wrap items-center gap-2 rounded-lg bg-destructive/5 p-3", children: [_jsx("p", { className: "flex-1 text-sm", children: t.confirmDeleteAttachment }), _jsx(Button, { type: "button", variant: "destructive", className: touch, disabled: task.pending, onClick: () => void task.run(async () => {
144
180
  await call(action, {
145
181
  kind: 'deleteAttachment',
146
182
  id,
@@ -149,12 +185,12 @@ export function AttachmentsPanel({ id, basePath, initial, labels: t, action, onC
149
185
  setConfirm(undefined);
150
186
  await refresh();
151
187
  await onChanged?.();
152
- }), children: t.confirmAttachmentDeletion }), _jsx(Button, { type: "button", variant: "outline", disabled: task.pending, onClick: () => setConfirm(undefined), children: t.cancelDeleteAttachment })] }))] }, item.id))) }), list.canUpload === true && (_jsxs(_Fragment, { children: [list.limits && (_jsxs("p", { children: [t.attachmentRemaining, ": ", list.limits.remaining, " /", ' ', list.limits.maxAttachmentsPerInstance] })), list.limits?.remaining === 0 && _jsx("p", { role: "status", children: t.attachmentLimit }), _jsx("input", { ref: fileInput, type: "file", multiple: true, "aria-label": t.uploadAttachments, disabled: disabled, className: "sr-only", onChange: (event) => {
188
+ }), children: t.confirmAttachmentDeletion }), _jsx(Button, { type: "button", variant: "outline", className: touch, disabled: task.pending, onClick: () => setConfirm(undefined), children: t.cancelDeleteAttachment })] }))] }, item.id))) })), list.canUpload === true && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("input", { ref: fileInput, type: "file", multiple: true, "aria-label": t.uploadAttachments, disabled: disabled, className: "sr-only", onChange: (event) => {
153
189
  upload(Array.from(event.currentTarget.files ?? []));
154
190
  event.currentTarget.value = '';
155
- } }), _jsx(Button, { type: "button", disabled: disabled, onClick: () => fileInput.current?.click(), children: t.uploadAttachments }), _jsx("button", { type: "button", "aria-label": t.attachmentDrop, disabled: disabled, className: "min-w-0 rounded-md border border-dashed p-6 text-left focus-visible:outline-2 disabled:opacity-50 [overflow-wrap:anywhere]", onClick: () => fileInput.current?.click(), onDragOver: (event) => event.preventDefault(), onDrop: (event) => {
191
+ } }), _jsxs("button", { type: "button", "aria-label": t.attachmentDrop, disabled: disabled, className: "flex min-w-0 flex-col items-center gap-1 rounded-lg border border-dashed p-6 text-center text-muted-foreground text-sm outline-none hover:bg-muted/40 focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 [overflow-wrap:anywhere]", onClick: () => fileInput.current?.click(), onDragOver: (event) => event.preventDefault(), onDrop: (event) => {
156
192
  event.preventDefault();
157
193
  upload(Array.from(event.dataTransfer.files));
158
- }, children: t.attachmentDrop })] }))] })), _jsx("ol", { "aria-live": "polite", className: "min-w-0 [overflow-wrap:anywhere]", children: uploads.map((row) => (_jsxs("li", { className: "my-3 min-w-0", children: [_jsxs("p", { children: [row.name, " \u00B7 ", t[row.status]] }), !!row.hints.length && (_jsxs("div", { children: [_jsx("p", { children: t.attachmentPrecheck }), row.hints.map((hint) => (_jsx("p", { children: t[hint] }, hint)))] })), _jsx("progress", { value: row.progress, max: 100, "aria-label": `${t.attachmentUploading}: ${row.name}`, className: "w-full" }), _jsx(ErrorMessage, { error: row.error, labels: t })] }, row.id))) })] }));
194
+ }, children: [_jsx(Upload, { "aria-hidden": "true", className: "size-5" }), t.attachmentDrop] }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [list.limits ? (_jsxs("p", { className: "text-muted-foreground text-xs", children: [t.attachmentRemaining, "\uFF1A", list.limits.remaining, " /", ' ', list.limits.maxAttachmentsPerInstance] })) : (_jsx("span", {})), _jsx(Button, { type: "button", className: touch, disabled: disabled, onClick: () => fileInput.current?.click(), children: t.uploadAttachments })] }), list.limits?.remaining === 0 && (_jsx("p", { role: "status", className: "text-muted-foreground text-sm", children: t.attachmentLimit }))] }))] })), _jsx("ol", { "aria-live": "polite", className: "flex min-w-0 flex-col gap-2 [overflow-wrap:anywhere]", children: uploads.map((row) => (_jsxs("li", { className: "flex min-w-0 flex-col gap-1 rounded-lg border p-3 text-sm", children: [_jsxs("p", { children: [row.name, " \u00B7 ", t[row.status]] }), !!row.hints.length && (_jsxs("div", { className: "text-muted-foreground text-xs", children: [_jsx("p", { children: t.attachmentPrecheck }), row.hints.map((hint) => (_jsx("p", { children: t[hint] }, hint)))] })), _jsx("progress", { value: row.progress, max: 100, "aria-label": `${t.attachmentUploading}: ${row.name}`, className: "h-2 w-full accent-primary" }), _jsx(ErrorMessage, { error: row.error, labels: t })] }, row.id))) })] }));
159
195
  }
160
196
  //# sourceMappingURL=attachments-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachments-client.js","sourceRoot":"","sources":["../src/attachments-client.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,MAAM,IAAI,GAAG,KAAK,IAAI,OAA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/B,YAAG,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,+BAA+B,YACvD,CAAC,CAAC,eAAe,GAChB,CACL,IACG,CACP,IACA,CACJ,EACD,0BAAc,QAAQ,EAAC,SAAS,EAAC,sDAAsD,YACpF,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,cAAiB,SAAS,EAAC,2DAA2D,aACpF,wBACG,GAAG,CAAC,IAAI,cAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IACzB,EACH,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,CACrB,eAAK,SAAS,EAAC,+BAA+B,aAC5C,sBAAI,CAAC,CAAC,kBAAkB,GAAK,EAC5B,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,sBAAe,CAAC,CAAC,IAAI,CAAC,IAAd,IAAI,CAAe,CAC5B,CAAC,IACE,CACP,EACD,mBACE,KAAK,EAAE,GAAG,CAAC,QAAQ,EACnB,GAAG,EAAE,GAAG,gBACI,GAAG,CAAC,CAAC,mBAAmB,KAAK,GAAG,CAAC,IAAI,EAAE,EACnD,SAAS,EAAC,2BAA2B,GACrC,EACF,KAAC,YAAY,IAAC,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,GAAI,KAlBtC,GAAG,CAAC,EAAE,CAmBV,CACN,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC"}
package/dist/client.d.ts CHANGED
@@ -1,79 +1,16 @@
1
+ /** Client entry: page components, panels and display building blocks. */
2
+ export { call, ErrorMessage, useTask } from './action-client.js';
1
3
  export { AttachmentsPanel } from './attachments-client.js';
4
+ export { ContentCard, DetailClient, type DetailClientProps, type DetailView, } from './detail-client.js';
2
5
  export { DocumentsPanel } from './documents-client.js';
3
6
  export { DraftEditor } from './draft-client.js';
4
- export { DeletedInstancesClient, LifecyclePanel, TagPicker, TagsPanel, } from './instance-management-client.js';
5
- import type { AccessList, InstanceDetail, TagList } from './contracts.js';
6
- import { type Condition, type FormField, type ImportField, type InstanceAction, type InstanceQuery, type Job, type JobResult, type Labels, type ListResult, type QueryField, type SavedView, type Timeline, type UploadAction } from './contracts.js';
7
- export { call, ErrorMessage, useTask } from './action-client.js';
8
- export { InstanceAccessPanel } from './management-client.js';
9
- export declare function FilterEditor({ condition, fields, labels, onChange, depth, }: {
10
- condition: Condition;
11
- fields: QueryField[];
12
- labels: Labels;
13
- onChange: (value: Condition) => void;
14
- depth?: number;
15
- }): import("react").JSX.Element;
16
- declare function prepareFilter(condition: Condition, fields: QueryField[]): Condition | undefined;
17
- export { prepareFilter };
18
- export declare function ListClient({ fields, initial, initialQuery, initialTagsAvailable, views: initialViews, machineCode, basePath, labels: t, action, }: {
19
- fields: QueryField[];
20
- initial: ListResult;
21
- initialQuery: InstanceQuery;
22
- initialTagsAvailable?: boolean;
23
- views: SavedView[];
24
- machineCode: string;
25
- basePath: string;
26
- labels: Labels;
27
- action: InstanceAction;
28
- }): import("react").JSX.Element;
29
- export declare function DetailClient({ id, data, fields, state, submitterId, submitterName, createdAt, initial, initialNumbers, initialAccess, attachmentBase, documentDownloadUrl, managementInstance, initialTags, isInitial, basePath, draftKeepaliveUrl, labels: t, action, }: {
30
- id: string;
31
- data: Record<string, unknown>;
32
- fields: FormField[];
33
- state: string;
34
- submitterId: string | null;
35
- submitterName?: string | null;
36
- createdAt: string;
37
- initial: Timeline;
38
- initialNumbers?: string[];
39
- initialAccess?: AccessList;
40
- attachmentBase?: string;
41
- documentDownloadUrl?: string;
42
- managementInstance?: InstanceDetail['instance'];
43
- initialTags?: TagList;
44
- isInitial?: boolean;
45
- basePath?: string;
46
- draftKeepaliveUrl?: string;
47
- labels: Labels;
48
- action: InstanceAction;
49
- }): import("react").JSX.Element;
50
- export declare function JobStatus({ initial, labels: t, action, downloadBase, onComplete, }: {
51
- initial: Job;
52
- labels: Labels;
53
- action: InstanceAction;
54
- downloadBase: string;
55
- onComplete?: (job: Job) => void;
56
- }): import("react").JSX.Element;
57
- export declare function JobReport({ result, labels: t, downloadBase, }: {
58
- result: JobResult;
59
- labels: Labels;
60
- downloadBase: string;
61
- }): import("react").JSX.Element;
62
- export declare function ImportClient({ machines, fields: initialFields, labels: t, action, uploadAction, downloadBase, }: {
63
- machines: {
64
- code: string;
65
- label: string;
66
- }[];
67
- fields: ImportField[];
68
- labels: Labels;
69
- action: InstanceAction;
70
- uploadAction: UploadAction;
71
- downloadBase: string;
72
- }): import("react").JSX.Element;
73
- export declare function ImportConfirmation({ job, labels: t, pending, onConfirm, }: {
74
- job: Job;
75
- labels: Labels;
76
- pending: boolean;
77
- onConfirm: () => void;
78
- }): import("react").JSX.Element | null;
7
+ export { FilterEditor, prepareFilter } from './filter-editor.js';
8
+ export { ImportClient, ImportConfirmation, JobReport, JobStatus } from './import-client.js';
9
+ export { DeletedInstancesClient, LifecycleMenu, LifecyclePanel, TagPicker, TagsPanel, } from './instance-management-client.js';
10
+ export { CreateRecordButton, ListClient, type ListClientProps } from './list-client.js';
11
+ export { DelegationsClient, InstanceAccessPanel, PrincipalPicker } from './management-client.js';
12
+ export { ProcessActions, RoutingNotice } from './process-client.js';
13
+ export { TaskCountBadge, TaskResponse, TasksClient, TasksSkeleton } from './tasks-client.js';
14
+ export { ActivityFeed, commentText, timelineSentence } from './timeline.js';
15
+ export { Chip, DateTimeText, EmptyState, ErrorState, FieldValue, StateBadge, SubformTable, Tabs, } from './ui.js';
79
16
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd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