hazo_collab_forms 5.1.2 → 5.3.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 (38) hide show
  1. package/CHANGE_LOG.md +136 -0
  2. package/README.md +142 -10
  3. package/dist/components/thread_form/components/collected_data_view.d.ts +5 -1
  4. package/dist/components/thread_form/components/collected_data_view.d.ts.map +1 -1
  5. package/dist/components/thread_form/components/collected_data_view.js +40 -6
  6. package/dist/components/thread_form/components/collected_data_view.js.map +1 -1
  7. package/dist/components/thread_form/components/extracted_fields_inline.d.ts +4 -0
  8. package/dist/components/thread_form/components/extracted_fields_inline.d.ts.map +1 -1
  9. package/dist/components/thread_form/components/extracted_fields_inline.js +141 -18
  10. package/dist/components/thread_form/components/extracted_fields_inline.js.map +1 -1
  11. package/dist/components/thread_form/components/file_bar.d.ts +5 -1
  12. package/dist/components/thread_form/components/file_bar.d.ts.map +1 -1
  13. package/dist/components/thread_form/components/file_bar.js +8 -2
  14. package/dist/components/thread_form/components/file_bar.js.map +1 -1
  15. package/dist/components/thread_form/components/task_card.d.ts +2 -2
  16. package/dist/components/thread_form/components/task_card.d.ts.map +1 -1
  17. package/dist/components/thread_form/components/thread_timeline.d.ts +1 -1
  18. package/dist/components/thread_form/components/thread_timeline.d.ts.map +1 -1
  19. package/dist/components/thread_form/components/thread_timeline.js +1 -1
  20. package/dist/components/thread_form/components/thread_timeline.js.map +1 -1
  21. package/dist/components/thread_form/hooks/use_file_pipeline.d.ts +15 -2
  22. package/dist/components/thread_form/hooks/use_file_pipeline.d.ts.map +1 -1
  23. package/dist/components/thread_form/hooks/use_file_pipeline.js +18 -4
  24. package/dist/components/thread_form/hooks/use_file_pipeline.js.map +1 -1
  25. package/dist/components/thread_form/index.d.ts +1 -1
  26. package/dist/components/thread_form/index.d.ts.map +1 -1
  27. package/dist/components/thread_form/thread_form.d.ts +1 -1
  28. package/dist/components/thread_form/thread_form.d.ts.map +1 -1
  29. package/dist/components/thread_form/thread_form.js +4 -3
  30. package/dist/components/thread_form/thread_form.js.map +1 -1
  31. package/dist/components/thread_form/types.d.ts +45 -2
  32. package/dist/components/thread_form/types.d.ts.map +1 -1
  33. package/dist/components/thread_form/types.js.map +1 -1
  34. package/dist/lib/classification_handler.d.ts +4 -0
  35. package/dist/lib/classification_handler.d.ts.map +1 -1
  36. package/dist/lib/classification_handler.js +42 -10
  37. package/dist/lib/classification_handler.js.map +1 -1
  38. package/package.json +1 -1
package/CHANGE_LOG.md CHANGED
@@ -7,6 +7,142 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [5.3.0] - 2026-05-04
11
+
12
+ ### Added
13
+
14
+ - **`ThreadFormProps.on_selection_change?: (delta: Record<string, boolean>) => void`** —
15
+ dedicated state setter for collected-data Keep selections. Receives a
16
+ chain-expanded delta (only changed keys). Wire to
17
+ `use_thread_form`'s `update_selections` to get the canonical merge
18
+ behavior. The existing `on_form_change` still fires alongside it for
19
+ backward compatibility.
20
+ - **Validation rule count + names in `FileBar` progress text** — the
21
+ pipeline-status strip under each file now reads
22
+ `Running N validation rule(s)…` instead of the generic
23
+ `Running validation rules…`. Hover the strip to see the rule names
24
+ via the standard `title` tooltip.
25
+ - New `pipeline_rule_count?` and `pipeline_rule_names?` props on
26
+ `FileBar`.
27
+ - `use_file_pipeline.file_statuses` Map value upgraded from
28
+ `FileStatus` (string) to `FileStatusEntry` (`{ status, total_rules?,
29
+ rule_names? }`). Downstream consumers (`TaskCard`, `ThreadTimeline`)
30
+ updated.
31
+
32
+ ### Changed
33
+
34
+ - **`CollectedDataView` row visuals** — flat divided rows replaced with
35
+ card rows (white bg, 1 px border, subtle shadow) sitting on a `#FAFBFC`
36
+ bucket strip with a 3 px neutral-gray left bar on each bucket header.
37
+ Pure CSS, no API change.
38
+ - **Extracted-fields metadata labels** — `Document date:`, `Confidence:`,
39
+ and inline scalar labels switch from light gray to
40
+ `font-semibold text-[#64748B]` so labels visibly distinguish from
41
+ values. Same 12 px size.
42
+ - **`on_form_change` docstring** clarified — it is a debounced
43
+ full-state persistence sink, NOT a state setter. Wiring it in
44
+ isolation (without per-event setters or a `use_thread_form` hook)
45
+ silently drops UI updates from controls that only have the
46
+ full-state path. Selection toggles were the visible symptom of this
47
+ pre-`on_selection_change` and are now fixed.
48
+
49
+ ### Fixed
50
+
51
+ - **Keep checkbox / "select all" / "unselect all" not updating in UI** —
52
+ consumers wiring `on_form_change` strictly per its docstring (as a
53
+ debounced backend save) saw no visual response when toggling Keep
54
+ on a file row or using the per-message select/unselect-all link.
55
+ The internal handler now also fires the new `on_selection_change`
56
+ setter so local state can update independently of the persistence
57
+ round-trip.
58
+
59
+ ### Notes
60
+
61
+ - ~10 other handlers in `thread_form.tsx` follow the same
62
+ `on_form_change`-only pattern. Most are fine in practice because
63
+ they fire other state setters in the same handler, but a follow-up
64
+ audit pass is warranted to close the latent bug class.
65
+
66
+ ## [5.2.0] - 2026-05-04
67
+
68
+ ### Added
69
+
70
+ - **`ExpectedField.array_of`** — declare a field whose value is an array of
71
+ structured rows, e.g. `array_of: { type: 'object', shape: [...] }`. The
72
+ classification prompt builder auto-emits an `(array of objects)` sub-block
73
+ with the nested shape, and `ExtractedFieldsInline` renders the value as
74
+ a table with one column per shape entry. Backwards-compatible (optional).
75
+ - **`ThreadFormProps.on_request_reextraction`** — agent-only per-file
76
+ re-extract callback. Signature `(content_id, scope: 'classification' | 'full')
77
+ => Promise<void> | void`. Wired through `ThreadForm` →
78
+ `CollectedDataView` → `ExtractedFieldsInline`.
79
+ - **Re-extract icon button** on the extracted-fields meta line, plus a
80
+ Radix Popover **kebab menu** with two scopes (`'classification'` / `'full'`).
81
+ Visible only when `role === 'agent'` AND a callback is provided.
82
+ - **Dim-in-place loading state** for the re-extract action. Content area
83
+ gets `opacity-50 pointer-events-none` while the callback is in flight;
84
+ action buttons stay clickable (visibly disabled).
85
+ - **Per-row accordion** in `CollectedDataView`. Each file row's extracted-
86
+ fields block collapses behind a chevron; default state is collapsed.
87
+ - **Expand all / Collapse all** toggle in the Collected Data tab header.
88
+ Single button that flips based on current state.
89
+ - **Info icon (`FileInfoDialog`) on Collected Data file rows** — agent-only
90
+ trigger that opens the same classification + validation + debug-JSON
91
+ dialog already present on `FileBar`. Hidden when there's nothing to
92
+ show.
93
+ - **`build_extracted_fields_instruction`** helper exposed via
94
+ `__test_only__` for unit testing the prompt-builder path.
95
+ - Renderer now handles **lenient fallbacks** for arrays:
96
+ - Undeclared `Array<object>` → inferred-column table
97
+ - Undeclared `Array<scalar>` → bullet list
98
+ - Declared scalar with `Array<object>` value → inferred-column table
99
+ (uses declared label) — schema upgrade hint without breaking
100
+ - **Test-app demo** (`/thread-form-extracted-fields`) updated with
101
+ rental-statement fixture exercising every render path, plus a mock
102
+ re-extract handler that swaps state after a 1.2s delay.
103
+
104
+ ### Changed
105
+
106
+ - **`render_document_types`** factored into a recursive `render_expected_field`
107
+ helper that emits the nested object-array sub-block. Pure refactor;
108
+ scalar output unchanged.
109
+ - **`extracted_fields_instruction`** assembly extracted into the pure
110
+ `build_extracted_fields_instruction(document_types)` helper, replacing
111
+ the inline construction in the route handler. Adds an `array_of`-aware
112
+ clause when at least one doctype declares it.
113
+ - **`ExtractedFieldsInline`** restructured around a `partition_entries`
114
+ helper that splits entries into scalars / tables / lists. JSX now
115
+ uses semantic `<table>`/`<thead>`/`<tbody>` with `border-collapse`,
116
+ `scope="col"` on `<th>`, `<caption className="sr-only">`, alternating
117
+ row tint, and `tabular-nums` on numeric/currency columns. Bordered
118
+ card wrapper around each table.
119
+ - **Internal `has_anything` → `has_content`** rename in
120
+ `ExtractedFieldsInline` so the existing "confidence alone returns null"
121
+ contract remains pinned even with the new content categories.
122
+
123
+ ### Fixed
124
+
125
+ - **`parse_classification_response` no longer JSON-stringifies arrays
126
+ in `extracted_fields` extras.** Previously, declared `array_of: object`
127
+ values arrived at the client as JSON-encoded strings (because
128
+ `JSON.stringify(v)` ran on every `typeof v === 'object'` value),
129
+ silently breaking the table render path. Arrays now pass through
130
+ unchanged; plain (non-array) objects still get stringified for the
131
+ scalar fallback.
132
+ - **Re-extract click in tests** wrapped in `await act(async () => ...)`
133
+ to flush the trailing `set_is_loading(false)` state update.
134
+
135
+ ### Notes
136
+
137
+ - All schema/prop additions are optional — no consumer change required to
138
+ upgrade. To take advantage of `array_of` table rendering, opt in by
139
+ adding `array_of: { type: 'object', shape: [...] }` to your doctype's
140
+ `expected_fields`.
141
+ - The `LuMoreVertical` icon was substituted with `LuEllipsisVertical`
142
+ (lucide-react renamed it upstream); visually identical.
143
+ - Internal: 31 tests in `extracted_fields_inline.test.tsx` cover every
144
+ branch of the partition decision tree plus the loading-state lifecycle.
145
+
10
146
  ## [5.1.0] - 2026-05-03
11
147
 
12
148
  ### Added
package/README.md CHANGED
@@ -2848,7 +2848,10 @@ const fileManager: FileManagerConfig = {
2848
2848
 
2849
2849
  `<ThreadForm>` and `<CollectedDataView>` can display each file's
2850
2850
  `classification_result.extracted_fields` inline below its row in the
2851
- Collected Data tab.
2851
+ Collected Data tab. As of v5.2.0 the display supports scalar fields,
2852
+ **repeating-row tables** (declared via `array_of`), and bullet lists
2853
+ for scalar arrays — plus a per-row accordion, an info-icon dialog,
2854
+ and an agent-only re-extract action.
2852
2855
 
2853
2856
  ```tsx
2854
2857
  <ThreadForm
@@ -2858,6 +2861,10 @@ Collected Data tab.
2858
2861
  show_extracted_fields
2859
2862
  collected_data_locale="en-AU"
2860
2863
  collected_data_currency_code="AUD"
2864
+ on_request_reextraction={async (content_id, scope) => {
2865
+ // 'classification' = re-run classify only; 'full' = + back-office
2866
+ await my_api.reclassify(content_id, scope);
2867
+ }}
2861
2868
  available_document_types={[
2862
2869
  {
2863
2870
  type_id: 'bank_statement',
@@ -2867,16 +2874,127 @@ Collected Data tab.
2867
2874
  { key: 'interest_earned', type: 'currency', description: 'Total interest' },
2868
2875
  ],
2869
2876
  },
2877
+ {
2878
+ type_id: 'rental_statement',
2879
+ type_label: 'Rental Statement',
2880
+ expected_fields: [
2881
+ { key: 'vendor', type: 'string', label: 'Vendor' },
2882
+ { key: 'property_address', type: 'string', label: 'Property address' },
2883
+ { key: 'total', type: 'currency', label: 'Total' },
2884
+ {
2885
+ // Object-array shape → renders as a table with one column per shape entry
2886
+ key: 'line_items',
2887
+ label: 'Line items',
2888
+ array_of: {
2889
+ type: 'object',
2890
+ shape: [
2891
+ { key: 'description', type: 'string', label: 'Description' },
2892
+ { key: 'type', type: 'string', label: 'Type' },
2893
+ { key: 'amount', type: 'currency', label: 'Amount' },
2894
+ ],
2895
+ },
2896
+ },
2897
+ ],
2898
+ },
2870
2899
  ]}
2871
2900
  />
2872
2901
  ```
2873
2902
 
2874
- If your consuming app already passes `available_document_types` from a
2875
- config table (e.g. `hazo_app_config.classification_document_types`), the
2876
- existing prop pickup needs no other change just add `expected_fields`
2877
- to the rows you want to drive the inline display.
2903
+ ### Render decision tree (per `extracted_fields` key)
2904
+
2905
+ | Field declaration | Value shape | Renders as |
2906
+ |---|---|---|
2907
+ | `array_of: { type: 'object', shape }` | `Array<object>` | **Table** with declared columns |
2908
+ | `array_of: { type: 'object', shape }` | empty array `[]` | Dropped (entry hidden) |
2909
+ | `array_of: { type: 'object', shape }` | non-array (string, number, single object) | JSON-string scalar (strict mismatch — surface the bug) |
2910
+ | Plain `type: 'string' \| 'number' \| 'currency' \| 'date' \| 'boolean'` | `Array<object>` | **Table** with inferred columns (lenient — uses declared label) |
2911
+ | Plain `type` | `Array<scalar>` | **Bullet list** (lenient) |
2912
+ | Plain `type` | scalar | Inline dot-list entry |
2913
+ | Undeclared (LLM-emitted extra) | `Array<object>` | **Table** with inferred columns |
2914
+ | Undeclared | `Array<scalar>` | **Bullet list** |
2915
+ | Undeclared | scalar | Inline dot-list entry |
2916
+
2917
+ Strict-for-declared-`array_of` semantics surface schema mismatches as
2918
+ readable JSON so they're noticed; everything else degrades gracefully
2919
+ into the most useful display.
2920
+
2921
+ ### Per-row accordion + Expand/Collapse all
2922
+
2923
+ Each file row's extracted-fields block is collapsed by default. A
2924
+ chevron between the checkbox and the file icon toggles that row.
2925
+ The header bar above the categories shows a single button that
2926
+ flips between **Expand all** and **Collapse all** based on current
2927
+ state. No prop required — it's on by default.
2928
+
2929
+ ### Keep selections — `on_selection_change` (v5.3.0+)
2930
+
2931
+ Each file row has a Keep checkbox; each multi-file message has a
2932
+ "select all / unselect all" link. Toggling either drives which files
2933
+ flow into the export. As of v5.3.0, ThreadForm exposes a dedicated
2934
+ state setter for these toggles so the UI updates regardless of how
2935
+ `on_form_change` is wired:
2936
+
2937
+ ```tsx
2938
+ import { use_thread_form, ThreadForm } from 'hazo_collab_forms/thread-form';
2939
+
2940
+ const { data, update_selections, /* …other setters… */ } = use_thread_form({
2941
+ initial_data,
2942
+ on_form_change: debounced_save_to_backend, // debounced full-state sink
2943
+ });
2944
+
2945
+ <ThreadForm
2946
+ data={data}
2947
+ on_selection_change={update_selections} // ← state setter (delta merge)
2948
+ on_form_change={debounced_save_to_backend} // optional, fires alongside
2949
+ // …other setters…
2950
+ />
2951
+ ```
2952
+
2953
+ `on_selection_change` receives a **delta** — only the keys that
2954
+ changed, chain-expanded so toggling either end of a replacement
2955
+ chain syncs both ends. The consumer merges it into
2956
+ `data.collected_data_selections`. This is exactly what
2957
+ `use_thread_form.update_selections` does, so wiring the two together
2958
+ is the canonical setup.
2959
+
2960
+ > **Heads up:** `on_form_change` is a debounced full-state persistence
2961
+ > sink, not a state setter. Wiring it as the only state path silently
2962
+ > drops UI updates from controls that have no per-event setter.
2963
+ > Always pair it with the per-event setters listed in `ThreadFormProps`
2964
+ > (or use `use_thread_form`).
2965
+
2966
+ ### File info dialog (agent-only)
2967
+
2968
+ Each agent-side file row in the Collected Data tab has an `(i)`
2969
+ icon next to "View" that opens `FileInfoDialog` showing the
2970
+ classification result, validation rule outcomes, and debug JSON.
2971
+ Same component as the one on `FileBar`. Hidden when the row has
2972
+ no classification AND no validation results.
2973
+
2974
+ ### Re-extract action (agent-only)
2975
+
2976
+ When `on_request_reextraction` is provided AND `role === 'agent'`,
2977
+ `ExtractedFieldsInline` renders a refresh icon on the meta line plus
2978
+ a kebab popover with two scopes:
2979
+
2980
+ - **Re-extract fields** (or click the icon): scope `'classification'`
2981
+ — re-run the classify-document LLM call.
2982
+ - **Re-run full analysis**: scope `'full'` — consumer-defined; typically
2983
+ re-classify and re-run back-office validation.
2984
+
2985
+ While the callback is in flight, the content dims (`opacity-50
2986
+ pointer-events-none`) and the icon spins. The buttons stay clickable
2987
+ (visibly disabled). Concurrent re-extracts on different files are fine;
2988
+ re-clicking the same row is a no-op until the callback resolves.
2989
+
2990
+ The consumer is expected to call `on_update_content_item(content_id,
2991
+ { classification_result })` once their API returns; the renderer
2992
+ re-renders automatically.
2993
+
2994
+ ### Custom layout escape hatch
2878
2995
 
2879
- For fully custom layouts use `render_collected_item_details`:
2996
+ For fully custom layouts use `render_collected_item_details` (takes
2997
+ precedence over `show_extracted_fields`):
2880
2998
 
2881
2999
  ```tsx
2882
3000
  <ThreadForm
@@ -2888,10 +3006,24 @@ For fully custom layouts use `render_collected_item_details`:
2888
3006
  ### Prompt variable: `{{extracted_fields_instruction}}`
2889
3007
 
2890
3008
  `create_classification_route` resolves `{{extracted_fields_instruction}}`
2891
- to either a targeted instruction (when any doctype declares
2892
- `expected_fields`) or a generic fallback. Add this variable to your
2893
- classification prompt template to opt in. Existing prompts that don't
2894
- reference it keep working unchanged.
3009
+ to one of three strings depending on what's declared in
3010
+ `available_document_types`:
3011
+
3012
+ - **No doctype declares `expected_fields`** → generic fallback
3013
+ (`"Return any fields you would consider salient..."`).
3014
+ - **At least one doctype declares `expected_fields`** → targeted
3015
+ instruction (`"Return the listed expected_fields for the chosen
3016
+ doctype above..."`).
3017
+ - **At least one doctype declares `array_of`** → targeted instruction
3018
+ PLUS array clause (`"...For fields marked 'array of objects', return
3019
+ a JSON array where each element is an object with the listed keys."`).
3020
+
3021
+ The doctype block in the prompt also auto-emits a nested shape
3022
+ sub-block for `array_of` fields so the LLM knows the expected JSON
3023
+ structure.
3024
+
3025
+ Existing prompts that don't reference `{{extracted_fields_instruction}}`
3026
+ keep working unchanged.
2895
3027
 
2896
3028
  ---
2897
3029
 
@@ -25,6 +25,10 @@ export interface CollectedDataViewProps {
25
25
  locale?: string;
26
26
  currency_code?: string;
27
27
  truncate_chars?: number;
28
+ /** Role gating for action buttons in inline display. */
29
+ role?: 'agent' | 'client';
30
+ /** Per-file re-extract callback. See ThreadFormProps for full docs. */
31
+ on_request_reextraction?: (content_id: string, scope: 'classification' | 'full') => Promise<void> | void;
28
32
  }
29
- export declare function CollectedDataView({ data, classification_results, on_selection_change, on_export, on_view_file, render_item_details, show_extracted_fields, document_types, locale, currency_code, truncate_chars, }: CollectedDataViewProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function CollectedDataView({ data, classification_results, on_selection_change, on_export, on_view_file, render_item_details, show_extracted_fields, document_types, locale, currency_code, truncate_chars, role, on_request_reextraction, }: CollectedDataViewProps): import("react/jsx-runtime").JSX.Element;
30
34
  //# sourceMappingURL=collected_data_view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collected_data_view.d.ts","sourceRoot":"","sources":["../../../../src/components/thread_form/components/collected_data_view.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAIjH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,cAAc,CAAC;IACrB,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC3D,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACpE,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7D;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC9C,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAoFD,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,sBAAsB,EACtB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,MAAM,EACN,aAAa,EACb,cAAc,GACf,EAAE,sBAAsB,2CA4HxB"}
1
+ {"version":3,"file":"collected_data_view.d.ts","sourceRoot":"","sources":["../../../../src/components/thread_form/components/collected_data_view.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA6CjH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,cAAc,CAAC;IACrB,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC3D,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACpE,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7D;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC9C,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,uEAAuE;IACvE,uBAAuB,CAAC,EAAE,CACxB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,gBAAgB,GAAG,MAAM,KAC7B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3B;AAoFD,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,sBAAsB,EACtB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,MAAM,EACN,aAAa,EACb,cAAc,EACd,IAAI,EACJ,uBAAuB,GACxB,EAAE,sBAAsB,2CAiLxB"}
@@ -3,9 +3,25 @@
3
3
  * Checkboxes for selecting what to export. AI auto-checks relevant items.
4
4
  */
5
5
  'use client';
6
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
6
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
7
+ import { useState } from 'react';
7
8
  import { ExtractedFieldsInline } from './extracted_fields_inline.js';
9
+ import { FileInfoDialog } from './file_info_dialog.js';
8
10
  import { PdfIcon } from './shared.js';
11
+ /** Inline info-icon button that opens FileInfoDialog. Agent-only by default. */
12
+ function FileInfoButton({ item, classification_results, }) {
13
+ const [open, set_open] = useState(false);
14
+ if (item.type !== 'file' || !item.file)
15
+ return null;
16
+ const classification = item.classification_result
17
+ ?? classification_results?.get(item.content_id)
18
+ ?? null;
19
+ const validation_results = item.validation_rule_results ?? [];
20
+ const has_info = !!classification || validation_results.length > 0;
21
+ if (!has_info)
22
+ return null;
23
+ return (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => set_open(true), className: "p-0.5 rounded text-[#94A3B8] hover:text-blue-500 transition-colors flex-shrink-0 cursor-pointer", title: "File details", children: _jsx("svg", { className: "w-3.5 h-3.5", fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }) }), _jsx(FileInfoDialog, { open: open, on_open_change: set_open, file_name: item.file.file_name, classification: classification, validation_results: validation_results })] }));
24
+ }
9
25
  /** Gather all content items across tasks, grouped by category */
10
26
  function gather_categories(data, classification_results) {
11
27
  const categories = new Map();
@@ -88,13 +104,29 @@ function is_item_selected(item, selections) {
88
104
  const explicit = selections[item.content_id];
89
105
  return explicit === undefined ? default_selected(item) : explicit;
90
106
  }
91
- export function CollectedDataView({ data, classification_results, on_selection_change, on_export, on_view_file, render_item_details, show_extracted_fields, document_types, locale, currency_code, truncate_chars, }) {
107
+ export function CollectedDataView({ data, classification_results, on_selection_change, on_export, on_view_file, render_item_details, show_extracted_fields, document_types, locale, currency_code, truncate_chars, role, on_request_reextraction, }) {
92
108
  const categories = gather_categories(data, classification_results);
93
109
  const selections = data.collected_data_selections || {};
110
+ // Per-row accordion state. Default: all collapsed. Set membership = expanded.
111
+ const [expanded_rows, set_expanded_rows] = useState(new Set());
94
112
  const handle_toggle = (item) => {
95
113
  const current = is_item_selected(item, selections);
96
114
  on_selection_change?.({ [item.content_id]: !current });
97
115
  };
116
+ const toggle_row = (content_id) => {
117
+ set_expanded_rows(prev => {
118
+ const next = new Set(prev);
119
+ if (next.has(content_id))
120
+ next.delete(content_id);
121
+ else
122
+ next.add(content_id);
123
+ return next;
124
+ });
125
+ };
126
+ const all_content_ids = Array.from(categories.values()).flat().map(i => i.content_id);
127
+ const expand_all = () => set_expanded_rows(new Set(all_content_ids));
128
+ const collapse_all = () => set_expanded_rows(new Set());
129
+ const all_expanded = expanded_rows.size > 0 && expanded_rows.size === all_content_ids.length;
98
130
  const handle_export = () => {
99
131
  const selected = [];
100
132
  for (const [, items] of categories) {
@@ -109,18 +141,20 @@ export function CollectedDataView({ data, classification_results, on_selection_c
109
141
  .flat()
110
142
  .filter(item => is_item_selected(item, selections)).length;
111
143
  const total_items = Array.from(categories.values()).flat().length;
112
- return (_jsxs("div", { className: "space-y-4", children: [_jsx("div", { className: "flex items-center justify-between text-[13px] text-[#64748B]", children: _jsxs("span", { children: [total_selected, " of ", total_items, " items selected"] }) }), Array.from(categories.entries()).map(([cat, items]) => {
144
+ return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between text-[13px] text-[#64748B]", children: [_jsxs("span", { children: [total_selected, " of ", total_items, " items selected"] }), _jsx("button", { type: "button", onClick: all_expanded ? collapse_all : expand_all, className: "text-[12px] text-[#2563EB] hover:text-[#1D4ED8] font-medium cursor-pointer", children: all_expanded ? 'Collapse all' : 'Expand all' })] }), Array.from(categories.entries()).map(([cat, items]) => {
113
145
  const sel_count = items.filter(i => is_item_selected(i, selections)).length;
114
146
  const sorted = sort_with_replacement_chains(items);
115
- return (_jsxs("div", { className: "rounded-md border border-[#E2E8F0] overflow-hidden", children: [_jsxs("div", { className: "flex items-center justify-between px-4 py-2.5 bg-[#F8FAFC] border-b border-[#E2E8F0]", children: [_jsx("span", { className: "text-[13px] font-medium text-[#0F172A]", children: cat }), _jsxs("span", { className: "text-[11px] text-[#94A3B8]", children: [sel_count, "/", items.length, " selected"] })] }), _jsx("div", { className: "divide-y divide-[#F1F5F9]", children: sorted.map(({ item, depth }) => {
147
+ return (_jsxs("div", { className: "rounded-md border border-[#E2E8F0] overflow-hidden border-l-[3px] border-l-[#94A3B8]", children: [_jsxs("div", { className: "flex items-center justify-between px-4 py-2.5 bg-[#F8FAFC] border-b border-[#E2E8F0]", children: [_jsx("span", { className: "text-[13px] font-medium text-[#0F172A]", children: cat }), _jsxs("span", { className: "text-[11px] text-[#94A3B8]", children: [sel_count, "/", items.length, " selected"] })] }), _jsx("div", { className: "p-2 space-y-1.5 bg-[#FAFBFC]", children: sorted.map(({ item, depth }) => {
116
148
  const is_selected = is_item_selected(item, selections);
117
149
  const is_replaced = !!item.replaced_by_content_id;
118
150
  const inline_details = render_item_details
119
151
  ? render_item_details(item)
120
152
  : show_extracted_fields
121
- ? _jsx(ExtractedFieldsInline, { item: item, classification_results: classification_results, document_types: document_types, locale: locale, currency_code: currency_code, truncate_chars: truncate_chars })
153
+ ? _jsx(ExtractedFieldsInline, { item: item, classification_results: classification_results, document_types: document_types, locale: locale, currency_code: currency_code, truncate_chars: truncate_chars, role: role, on_request_reextraction: on_request_reextraction })
122
154
  : null;
123
- return (_jsxs("div", { children: [_jsxs("div", { className: `flex items-center gap-3 px-4 py-2.5 text-[13px] hover:bg-[#FAFBFC] ${is_replaced ? 'bg-[#F8FAFC]' : ''}`, style: depth > 0 ? { paddingLeft: `${16 + depth * 20}px` } : undefined, children: [_jsx("input", { type: "checkbox", checked: is_selected, onChange: () => handle_toggle(item), className: "rounded border-[#CBD5E1] text-[#2563EB] focus:ring-[#2563EB] cursor-pointer" }), item.type === 'file' ? (_jsxs(_Fragment, { children: [_jsx(PdfIcon, { className: `w-4 h-4 ${is_replaced ? 'opacity-40' : ''}` }), _jsx("span", { className: `truncate flex-1 ${is_replaced ? 'text-[#94A3B8] line-through' : 'text-[#0F172A]'}`, children: item.file?.file_name || item.split_info?.label }), item.split_info?.page_range && (_jsx("span", { className: "text-[11px] text-[#94A3B8]", children: item.split_info.page_range })), is_replaced && (_jsx("span", { className: "text-[10px] text-[#94A3B8] uppercase tracking-wide flex-shrink-0", children: "Replaced" })), _jsx("button", { onClick: () => on_view_file?.(item), className: "text-[11px] text-[#2563EB] font-medium cursor-pointer", children: "View" })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: `flex-shrink-0 ${is_replaced ? 'text-[#CBD5E1]' : 'text-[#94A3B8]'}`, children: _jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }) }), _jsx("span", { className: `truncate flex-1 ${is_replaced ? 'text-[#94A3B8] line-through' : 'text-[#0F172A]'}`, children: item.text }), is_replaced && (_jsx("span", { className: "text-[10px] text-[#94A3B8] uppercase tracking-wide flex-shrink-0", children: "Replaced" }))] }))] }), inline_details && (_jsx("div", { className: `px-4 pb-2 text-[13px] ${is_replaced ? 'bg-[#F8FAFC]' : ''}`, style: depth > 0 ? { paddingLeft: `${16 + depth * 20}px` } : undefined, children: inline_details }))] }, item.content_id));
155
+ const has_details = !!inline_details;
156
+ const is_expanded = expanded_rows.has(item.content_id);
157
+ return (_jsxs("div", { className: "rounded-sm border border-[#E2E8F0] bg-white shadow-[0_1px_2px_rgba(15,23,42,0.04)] overflow-hidden", children: [_jsxs("div", { className: `flex items-center gap-3 px-4 py-2.5 text-[13px] hover:bg-[#FAFBFC] ${is_replaced ? 'bg-[#F8FAFC]' : ''}`, style: depth > 0 ? { paddingLeft: `${16 + depth * 20}px` } : undefined, children: [_jsx("input", { type: "checkbox", checked: is_selected, onChange: () => handle_toggle(item), className: "rounded border-[#CBD5E1] text-[#2563EB] focus:ring-[#2563EB] cursor-pointer" }), has_details ? (_jsx("button", { type: "button", onClick: () => toggle_row(item.content_id), "aria-expanded": is_expanded, "aria-label": is_expanded ? 'Collapse details' : 'Expand details', className: "p-0.5 rounded text-[#94A3B8] hover:text-[#475569] transition-colors flex-shrink-0 cursor-pointer", children: _jsx("svg", { className: `w-3.5 h-3.5 transition-transform ${is_expanded ? 'rotate-90' : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })) : (_jsx("span", { className: "w-3.5 flex-shrink-0", "aria-hidden": "true" })), item.type === 'file' ? (_jsxs(_Fragment, { children: [_jsx(PdfIcon, { className: `w-4 h-4 ${is_replaced ? 'opacity-40' : ''}` }), _jsx("span", { className: `truncate flex-1 ${is_replaced ? 'text-[#94A3B8] line-through' : 'text-[#0F172A]'}`, children: item.file?.file_name || item.split_info?.label }), item.split_info?.page_range && (_jsx("span", { className: "text-[11px] text-[#94A3B8]", children: item.split_info.page_range })), is_replaced && (_jsx("span", { className: "text-[10px] text-[#94A3B8] uppercase tracking-wide flex-shrink-0", children: "Replaced" })), role === 'agent' && (_jsx(FileInfoButton, { item: item, classification_results: classification_results })), _jsx("button", { onClick: () => on_view_file?.(item), className: "text-[11px] text-[#2563EB] font-medium cursor-pointer", children: "View" })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: `flex-shrink-0 ${is_replaced ? 'text-[#CBD5E1]' : 'text-[#94A3B8]'}`, children: _jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }) }), _jsx("span", { className: `truncate flex-1 ${is_replaced ? 'text-[#94A3B8] line-through' : 'text-[#0F172A]'}`, children: item.text }), is_replaced && (_jsx("span", { className: "text-[10px] text-[#94A3B8] uppercase tracking-wide flex-shrink-0", children: "Replaced" }))] }))] }), has_details && is_expanded && (_jsx("div", { className: `px-4 pb-2 text-[13px] ${is_replaced ? 'bg-[#F8FAFC]' : ''}`, style: depth > 0 ? { paddingLeft: `${16 + depth * 20}px` } : undefined, children: inline_details }))] }, item.content_id));
124
158
  }) })] }, cat));
125
159
  }), _jsxs("button", { onClick: handle_export, disabled: total_selected === 0, className: "w-full bg-[#0F172A] text-white rounded-md py-2.5 text-[13px] font-medium hover:bg-[#1E293B] disabled:bg-[#E2E8F0] disabled:text-[#94A3B8] cursor-pointer disabled:cursor-not-allowed transition-colors", children: ["Export ", total_selected, " Selected Items to Data Form \u2192"] })] }));
126
160
  }
@@ -1 +1 @@
1
- {"version":3,"file":"collected_data_view.js","sourceRoot":"","sources":["../../../../src/components/thread_form/components/collected_data_view.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,CAAC;;AAGb,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA0BtC,iEAAiE;AACjE,SAAS,iBAAiB,CAAC,IAAoB,EAAE,sBAA0D;IACzG,MAAM,UAAU,GAAG,IAAI,GAAG,EAAyB,CAAC;IAEpD,SAAS,GAAG,CAAC,GAAW,EAAE,IAAiB;QACzC,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,GAAG;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;YACnB,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC9B,8BAA8B;YAC9B,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,aAAa,IAAI,EAAE,EAAE,CAAC;gBAC3C,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;oBACxB,G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,EACvE,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,KAAK,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,YAErE,cAAc,GACX,CACP,KA/CO,IAAI,CAAC,UAAU,CAgDnB,CACP,CAAC;4BACJ,CAAC,CAAC,GACE,KAzEE,GAAG,CA0EP,CACP,CAAC;YACJ,CAAC,CAAC,EAGF,kBACE,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,cAAc,KAAK,CAAC,EAC9B,SAAS,EAAC,wMAAwM,wBAE1M,cAAc,2CACf,IACL,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"collected_data_view.js","sourceRoot":"","sources":["../../../../src/components/thread_form/components/collected_data_view.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,gFAAgF;AAChF,SAAS,cAAc,CAAC,EACtB,IAAI,EACJ,sBAAsB,GAIvB;IACC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACpD,MAAM,cAAc,GAAG,IAAI,CAAC,qBAAqB;WAC5C,sBAAsB,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;WAC5C,IAAI,CAAC;IACV,MAAM,kBAAkB,GAAI,IAAI,CAAC,uBAA8D,IAAI,EAAE,CAAC;IACtG,MAAM,QAAQ,GAAG,CAAC,CAAC,cAAc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AAQ,EAAE,cAAc,KAAK,CAAC,EAC9B,SAAS,EAAC,wMAAwM,wBAE1M,cAAc,2CACf,IACL,CACP,CAAC;AACJ,CAAC"}
@@ -7,6 +7,10 @@ export interface ExtractedFieldsInlineProps {
7
7
  locale?: string;
8
8
  currency_code?: string;
9
9
  truncate_chars?: number;
10
+ /** When 'agent' AND on_request_reextraction provided, renders the re-extract action. */
11
+ role?: 'agent' | 'client';
12
+ /** Per-file re-extract callback. See ThreadFormProps for full docs. */
13
+ on_request_reextraction?: (content_id: string, scope: 'classification' | 'full') => Promise<void> | void;
10
14
  }
11
15
  export declare function ExtractedFieldsInline(props: ExtractedFieldsInlineProps): React.ReactElement | null;
12
16
  //# sourceMappingURL=extracted_fields_inline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extracted_fields_inline.d.ts","sourceRoot":"","sources":["../../../../src/components/thread_form/components/extracted_fields_inline.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAiB,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAIhH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,WAAW,CAAC;IAClB,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAgBD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAkElG"}
1
+ {"version":3,"file":"extracted_fields_inline.d.ts","sourceRoot":"","sources":["../../../../src/components/thread_form/components/extracted_fields_inline.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAoC,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAMnI,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,WAAW,CAAC;IAClB,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,uEAAuE;IACvE,uBAAuB,CAAC,EAAE,CACxB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,gBAAgB,GAAG,MAAM,KAC7B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3B;AA6ID,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA6MlG"}