hazo_collab_forms 2.2.8 → 3.0.2

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 (370) hide show
  1. package/CHANGE_LOG.md +47 -0
  2. package/dist/components/_internal_form_set.d.ts +17 -0
  3. package/dist/components/_internal_form_set.d.ts.map +1 -1
  4. package/dist/components/_internal_form_set.js +38 -9
  5. package/dist/components/_internal_form_set.js.map +1 -1
  6. package/dist/components/clarification/clarification_card.d.ts +36 -13
  7. package/dist/components/clarification/clarification_card.d.ts.map +1 -1
  8. package/dist/components/clarification/clarification_card.js +12 -32
  9. package/dist/components/clarification/clarification_card.js.map +1 -1
  10. package/dist/components/clarification/clarification_dialog.d.ts.map +1 -1
  11. package/dist/components/clarification/clarification_dialog.js +11 -5
  12. package/dist/components/clarification/clarification_dialog.js.map +1 -1
  13. package/dist/components/clarification/clarification_doc_reference.d.ts +6 -0
  14. package/dist/components/clarification/clarification_doc_reference.d.ts.map +1 -1
  15. package/dist/components/clarification/clarification_doc_reference.js +20 -11
  16. package/dist/components/clarification/clarification_doc_reference.js.map +1 -1
  17. package/dist/components/clarification/clarification_group_card.d.ts +65 -0
  18. package/dist/components/clarification/clarification_group_card.d.ts.map +1 -0
  19. package/dist/components/clarification/clarification_group_card.js +84 -0
  20. package/dist/components/clarification/clarification_group_card.js.map +1 -0
  21. package/dist/components/clarification/clarification_item_body.d.ts +80 -0
  22. package/dist/components/clarification/clarification_item_body.d.ts.map +1 -0
  23. package/dist/components/clarification/clarification_item_body.js +55 -0
  24. package/dist/components/clarification/clarification_item_body.js.map +1 -0
  25. package/dist/components/clarification/clarification_response_form.d.ts +25 -1
  26. package/dist/components/clarification/clarification_response_form.d.ts.map +1 -1
  27. package/dist/components/clarification/clarification_response_form.js +103 -9
  28. package/dist/components/clarification/clarification_response_form.js.map +1 -1
  29. package/dist/components/clarification/clarification_section.d.ts +36 -2
  30. package/dist/components/clarification/clarification_section.d.ts.map +1 -1
  31. package/dist/components/clarification/clarification_section.js +55 -19
  32. package/dist/components/clarification/clarification_section.js.map +1 -1
  33. package/dist/components/clarification/clarification_status_config.d.ts +57 -0
  34. package/dist/components/clarification/clarification_status_config.d.ts.map +1 -0
  35. package/dist/components/clarification/clarification_status_config.js +131 -0
  36. package/dist/components/clarification/clarification_status_config.js.map +1 -0
  37. package/dist/components/clarification/index.d.ts +6 -0
  38. package/dist/components/clarification/index.d.ts.map +1 -1
  39. package/dist/components/clarification/index.js +3 -0
  40. package/dist/components/clarification/index.js.map +1 -1
  41. package/dist/components/collab_form_file_upload.d.ts +3 -1
  42. package/dist/components/collab_form_file_upload.d.ts.map +1 -1
  43. package/dist/components/collab_form_file_upload.js +6 -6
  44. package/dist/components/collab_form_file_upload.js.map +1 -1
  45. package/dist/components/hazo_add_field_dialog/components/pending_field_item.d.ts +14 -2
  46. package/dist/components/hazo_add_field_dialog/components/pending_field_item.d.ts.map +1 -1
  47. package/dist/components/hazo_add_field_dialog/components/pending_field_item.js +11 -9
  48. package/dist/components/hazo_add_field_dialog/components/pending_field_item.js.map +1 -1
  49. package/dist/components/hazo_add_field_dialog/components/pending_field_list.d.ts +14 -2
  50. package/dist/components/hazo_add_field_dialog/components/pending_field_list.d.ts.map +1 -1
  51. package/dist/components/hazo_add_field_dialog/components/pending_field_list.js +2 -2
  52. package/dist/components/hazo_add_field_dialog/components/pending_field_list.js.map +1 -1
  53. package/dist/components/hazo_add_field_dialog/components/question_input.d.ts +6 -1
  54. package/dist/components/hazo_add_field_dialog/components/question_input.d.ts.map +1 -1
  55. package/dist/components/hazo_add_field_dialog/components/question_input.js +2 -2
  56. package/dist/components/hazo_add_field_dialog/components/question_input.js.map +1 -1
  57. package/dist/components/hazo_add_field_dialog/hazo_add_field_dialog.d.ts +6 -1
  58. package/dist/components/hazo_add_field_dialog/hazo_add_field_dialog.d.ts.map +1 -1
  59. package/dist/components/hazo_add_field_dialog/hazo_add_field_dialog.js +67 -17
  60. package/dist/components/hazo_add_field_dialog/hazo_add_field_dialog.js.map +1 -1
  61. package/dist/components/hazo_add_field_dialog/index.d.ts +3 -1
  62. package/dist/components/hazo_add_field_dialog/index.d.ts.map +1 -1
  63. package/dist/components/hazo_add_field_dialog/index.js +2 -0
  64. package/dist/components/hazo_add_field_dialog/index.js.map +1 -1
  65. package/dist/components/hazo_add_field_dialog/options/file_textbox_options.d.ts +31 -0
  66. package/dist/components/hazo_add_field_dialog/options/file_textbox_options.d.ts.map +1 -0
  67. package/dist/components/hazo_add_field_dialog/options/file_textbox_options.js +54 -0
  68. package/dist/components/hazo_add_field_dialog/options/file_textbox_options.js.map +1 -0
  69. package/dist/components/hazo_add_field_dialog/options/index.d.ts +1 -0
  70. package/dist/components/hazo_add_field_dialog/options/index.d.ts.map +1 -1
  71. package/dist/components/hazo_add_field_dialog/options/index.js +1 -0
  72. package/dist/components/hazo_add_field_dialog/options/index.js.map +1 -1
  73. package/dist/components/hazo_add_field_dialog/types.d.ts +51 -2
  74. package/dist/components/hazo_add_field_dialog/types.d.ts.map +1 -1
  75. package/dist/components/hazo_add_field_dialog/types.js +7 -0
  76. package/dist/components/hazo_add_field_dialog/types.js.map +1 -1
  77. package/dist/components/hazo_collab_form_base.d.ts +6 -1
  78. package/dist/components/hazo_collab_form_base.d.ts.map +1 -1
  79. package/dist/components/hazo_collab_form_base.js +7 -15
  80. package/dist/components/hazo_collab_form_base.js.map +1 -1
  81. package/dist/components/hazo_collab_form_data_table.d.ts.map +1 -1
  82. package/dist/components/hazo_collab_form_data_table.js +4 -2
  83. package/dist/components/hazo_collab_form_data_table.js.map +1 -1
  84. package/dist/components/hazo_collab_form_file_textbox/file_chip.d.ts +37 -0
  85. package/dist/components/hazo_collab_form_file_textbox/file_chip.d.ts.map +1 -0
  86. package/dist/components/hazo_collab_form_file_textbox/file_chip.js +45 -0
  87. package/dist/components/hazo_collab_form_file_textbox/file_chip.js.map +1 -0
  88. package/dist/components/hazo_collab_form_file_textbox/file_group.d.ts +35 -0
  89. package/dist/components/hazo_collab_form_file_textbox/file_group.d.ts.map +1 -0
  90. package/dist/components/hazo_collab_form_file_textbox/file_group.js +54 -0
  91. package/dist/components/hazo_collab_form_file_textbox/file_group.js.map +1 -0
  92. package/dist/components/hazo_collab_form_file_textbox/file_textbox_panel.d.ts +46 -0
  93. package/dist/components/hazo_collab_form_file_textbox/file_textbox_panel.d.ts.map +1 -0
  94. package/dist/components/hazo_collab_form_file_textbox/file_textbox_panel.js +104 -0
  95. package/dist/components/hazo_collab_form_file_textbox/file_textbox_panel.js.map +1 -0
  96. package/dist/components/hazo_collab_form_file_textbox/file_upload_zone.d.ts +20 -0
  97. package/dist/components/hazo_collab_form_file_textbox/file_upload_zone.d.ts.map +1 -0
  98. package/dist/components/hazo_collab_form_file_textbox/file_upload_zone.js +14 -0
  99. package/dist/components/hazo_collab_form_file_textbox/file_upload_zone.js.map +1 -0
  100. package/dist/components/hazo_collab_form_file_textbox/hazo_collab_form_file_textbox.d.ts +63 -0
  101. package/dist/components/hazo_collab_form_file_textbox/hazo_collab_form_file_textbox.d.ts.map +1 -0
  102. package/dist/components/hazo_collab_form_file_textbox/hazo_collab_form_file_textbox.js +226 -0
  103. package/dist/components/hazo_collab_form_file_textbox/hazo_collab_form_file_textbox.js.map +1 -0
  104. package/dist/components/hazo_collab_form_file_textbox/index.d.ts +24 -0
  105. package/dist/components/hazo_collab_form_file_textbox/index.d.ts.map +1 -0
  106. package/dist/components/hazo_collab_form_file_textbox/index.js +16 -0
  107. package/dist/components/hazo_collab_form_file_textbox/index.js.map +1 -0
  108. package/dist/components/hazo_collab_form_file_textbox/tag_pills.d.ts +11 -0
  109. package/dist/components/hazo_collab_form_file_textbox/tag_pills.d.ts.map +1 -0
  110. package/dist/components/hazo_collab_form_file_textbox/tag_pills.js +17 -0
  111. package/dist/components/hazo_collab_form_file_textbox/tag_pills.js.map +1 -0
  112. package/dist/components/hazo_collab_form_file_textbox/utils.d.ts +14 -0
  113. package/dist/components/hazo_collab_form_file_textbox/utils.d.ts.map +1 -0
  114. package/dist/components/hazo_collab_form_file_textbox/utils.js +58 -0
  115. package/dist/components/hazo_collab_form_file_textbox/utils.js.map +1 -0
  116. package/dist/components/hazo_collab_form_file_textbox/validation_dialog.d.ts +29 -0
  117. package/dist/components/hazo_collab_form_file_textbox/validation_dialog.d.ts.map +1 -0
  118. package/dist/components/hazo_collab_form_file_textbox/validation_dialog.js +182 -0
  119. package/dist/components/hazo_collab_form_file_textbox/validation_dialog.js.map +1 -0
  120. package/dist/components/hazo_collab_form_group.d.ts.map +1 -1
  121. package/dist/components/hazo_collab_form_group.js +2 -2
  122. package/dist/components/hazo_collab_form_group.js.map +1 -1
  123. package/dist/components/hazo_collab_form_view/context.d.ts.map +1 -1
  124. package/dist/components/hazo_collab_form_view/context.js +10 -3
  125. package/dist/components/hazo_collab_form_view/context.js.map +1 -1
  126. package/dist/components/hazo_collab_form_view/index.d.ts +1 -1
  127. package/dist/components/hazo_collab_form_view/index.d.ts.map +1 -1
  128. package/dist/components/hazo_collab_form_view/index.js.map +1 -1
  129. package/dist/components/hazo_collab_form_view/types.d.ts +32 -4
  130. package/dist/components/hazo_collab_form_view/types.d.ts.map +1 -1
  131. package/dist/components/hazo_collab_form_view/views/edit_view.d.ts.map +1 -1
  132. package/dist/components/hazo_collab_form_view/views/edit_view.js +4 -2
  133. package/dist/components/hazo_collab_form_view/views/edit_view.js.map +1 -1
  134. package/dist/components/hazo_collab_form_view/views/summary_view.d.ts.map +1 -1
  135. package/dist/components/hazo_collab_form_view/views/summary_view.js +2 -2
  136. package/dist/components/hazo_collab_form_view/views/summary_view.js.map +1 -1
  137. package/dist/components/hazo_data_form/hazo_data_form.d.ts.map +1 -1
  138. package/dist/components/hazo_data_form/hazo_data_form.js +4 -2
  139. package/dist/components/hazo_data_form/hazo_data_form.js.map +1 -1
  140. package/dist/components/hazo_data_form/pdf_panel.d.ts.map +1 -1
  141. package/dist/components/hazo_data_form/pdf_panel.js +7 -2
  142. package/dist/components/hazo_data_form/pdf_panel.js.map +1 -1
  143. package/dist/components/hazo_fb_form/components/backoffice_run_button.d.ts +16 -0
  144. package/dist/components/hazo_fb_form/components/backoffice_run_button.d.ts.map +1 -0
  145. package/dist/components/hazo_fb_form/components/backoffice_run_button.js +23 -0
  146. package/dist/components/hazo_fb_form/components/backoffice_run_button.js.map +1 -0
  147. package/dist/components/hazo_fb_form/components/draft_clarification_card.d.ts +25 -0
  148. package/dist/components/hazo_fb_form/components/draft_clarification_card.d.ts.map +1 -0
  149. package/dist/components/hazo_fb_form/components/draft_clarification_card.js +71 -0
  150. package/dist/components/hazo_fb_form/components/draft_clarification_card.js.map +1 -0
  151. package/dist/components/hazo_fb_form/components/fb_document_type_editor.d.ts +11 -0
  152. package/dist/components/hazo_fb_form/components/fb_document_type_editor.d.ts.map +1 -0
  153. package/dist/components/hazo_fb_form/components/fb_document_type_editor.js +82 -0
  154. package/dist/components/hazo_fb_form/components/fb_document_type_editor.js.map +1 -0
  155. package/dist/components/hazo_fb_form/components/fb_tag_editor.d.ts +11 -0
  156. package/dist/components/hazo_fb_form/components/fb_tag_editor.d.ts.map +1 -0
  157. package/dist/components/hazo_fb_form/components/fb_tag_editor.js +107 -0
  158. package/dist/components/hazo_fb_form/components/fb_tag_editor.js.map +1 -0
  159. package/dist/components/hazo_fb_form/components/front_office_stepper.d.ts +15 -0
  160. package/dist/components/hazo_fb_form/components/front_office_stepper.d.ts.map +1 -0
  161. package/dist/components/hazo_fb_form/components/front_office_stepper.js +21 -0
  162. package/dist/components/hazo_fb_form/components/front_office_stepper.js.map +1 -0
  163. package/dist/components/hazo_fb_form/components/instance_sidebar.d.ts +21 -0
  164. package/dist/components/hazo_fb_form/components/instance_sidebar.d.ts.map +1 -0
  165. package/dist/components/hazo_fb_form/components/instance_sidebar.js +58 -0
  166. package/dist/components/hazo_fb_form/components/instance_sidebar.js.map +1 -0
  167. package/dist/components/hazo_fb_form/components/run_button.d.ts +19 -0
  168. package/dist/components/hazo_fb_form/components/run_button.d.ts.map +1 -0
  169. package/dist/components/hazo_fb_form/components/run_button.js +38 -0
  170. package/dist/components/hazo_fb_form/components/run_button.js.map +1 -0
  171. package/dist/components/hazo_fb_form/components/run_details_dialog.d.ts +17 -0
  172. package/dist/components/hazo_fb_form/components/run_details_dialog.d.ts.map +1 -0
  173. package/dist/components/hazo_fb_form/components/run_details_dialog.js +35 -0
  174. package/dist/components/hazo_fb_form/components/run_details_dialog.js.map +1 -0
  175. package/dist/components/hazo_fb_form/components/tag_pill.d.ts +15 -0
  176. package/dist/components/hazo_fb_form/components/tag_pill.d.ts.map +1 -0
  177. package/dist/components/hazo_fb_form/components/tag_pill.js +15 -0
  178. package/dist/components/hazo_fb_form/components/tag_pill.js.map +1 -0
  179. package/dist/components/hazo_fb_form/context.d.ts +90 -0
  180. package/dist/components/hazo_fb_form/context.d.ts.map +1 -0
  181. package/dist/components/hazo_fb_form/context.js +13 -0
  182. package/dist/components/hazo_fb_form/context.js.map +1 -0
  183. package/dist/components/hazo_fb_form/hazo_fb_form.d.ts +13 -0
  184. package/dist/components/hazo_fb_form/hazo_fb_form.d.ts.map +1 -0
  185. package/dist/components/hazo_fb_form/hazo_fb_form.js +401 -0
  186. package/dist/components/hazo_fb_form/hazo_fb_form.js.map +1 -0
  187. package/dist/components/hazo_fb_form/hooks/use_fb_form_state.d.ts +45 -0
  188. package/dist/components/hazo_fb_form/hooks/use_fb_form_state.d.ts.map +1 -0
  189. package/dist/components/hazo_fb_form/hooks/use_fb_form_state.js +223 -0
  190. package/dist/components/hazo_fb_form/hooks/use_fb_form_state.js.map +1 -0
  191. package/dist/components/hazo_fb_form/hooks/use_llm_run.d.ts +46 -0
  192. package/dist/components/hazo_fb_form/hooks/use_llm_run.d.ts.map +1 -0
  193. package/dist/components/hazo_fb_form/hooks/use_llm_run.js +1435 -0
  194. package/dist/components/hazo_fb_form/hooks/use_llm_run.js.map +1 -0
  195. package/dist/components/hazo_fb_form/index.d.ts +24 -0
  196. package/dist/components/hazo_fb_form/index.d.ts.map +1 -0
  197. package/dist/components/hazo_fb_form/index.js +16 -0
  198. package/dist/components/hazo_fb_form/index.js.map +1 -0
  199. package/dist/components/hazo_fb_form/shared/clarification_helpers.d.ts +15 -0
  200. package/dist/components/hazo_fb_form/shared/clarification_helpers.d.ts.map +1 -0
  201. package/dist/components/hazo_fb_form/shared/clarification_helpers.js +23 -0
  202. package/dist/components/hazo_fb_form/shared/clarification_helpers.js.map +1 -0
  203. package/dist/components/hazo_fb_form/shared/file_utils.d.ts +9 -0
  204. package/dist/components/hazo_fb_form/shared/file_utils.d.ts.map +1 -0
  205. package/dist/components/hazo_fb_form/shared/file_utils.js +31 -0
  206. package/dist/components/hazo_fb_form/shared/file_utils.js.map +1 -0
  207. package/dist/components/hazo_fb_form/shared/format.d.ts +12 -0
  208. package/dist/components/hazo_fb_form/shared/format.d.ts.map +1 -0
  209. package/dist/components/hazo_fb_form/shared/format.js +45 -0
  210. package/dist/components/hazo_fb_form/shared/format.js.map +1 -0
  211. package/dist/components/hazo_fb_form/shared/index.d.ts +10 -0
  212. package/dist/components/hazo_fb_form/shared/index.d.ts.map +1 -0
  213. package/dist/components/hazo_fb_form/shared/index.js +9 -0
  214. package/dist/components/hazo_fb_form/shared/index.js.map +1 -0
  215. package/dist/components/hazo_fb_form/shared/pdf_side_panel.d.ts +22 -0
  216. package/dist/components/hazo_fb_form/shared/pdf_side_panel.d.ts.map +1 -0
  217. package/dist/components/hazo_fb_form/shared/pdf_side_panel.js +10 -0
  218. package/dist/components/hazo_fb_form/shared/pdf_side_panel.js.map +1 -0
  219. package/dist/components/hazo_fb_form/shared/use_pdf_viewer.d.ts +26 -0
  220. package/dist/components/hazo_fb_form/shared/use_pdf_viewer.d.ts.map +1 -0
  221. package/dist/components/hazo_fb_form/shared/use_pdf_viewer.js +41 -0
  222. package/dist/components/hazo_fb_form/shared/use_pdf_viewer.js.map +1 -0
  223. package/dist/components/hazo_fb_form/types.d.ts +283 -0
  224. package/dist/components/hazo_fb_form/types.d.ts.map +1 -0
  225. package/dist/components/hazo_fb_form/types.js +5 -0
  226. package/dist/components/hazo_fb_form/types.js.map +1 -0
  227. package/dist/components/hazo_fb_form/views/back_office_view.d.ts +7 -0
  228. package/dist/components/hazo_fb_form/views/back_office_view.d.ts.map +1 -0
  229. package/dist/components/hazo_fb_form/views/back_office_view.js +327 -0
  230. package/dist/components/hazo_fb_form/views/back_office_view.js.map +1 -0
  231. package/dist/components/hazo_fb_form/views/clarifications_view.d.ts +16 -0
  232. package/dist/components/hazo_fb_form/views/clarifications_view.d.ts.map +1 -0
  233. package/dist/components/hazo_fb_form/views/clarifications_view.js +262 -0
  234. package/dist/components/hazo_fb_form/views/clarifications_view.js.map +1 -0
  235. package/dist/components/hazo_fb_form/views/front_office_view.d.ts +6 -0
  236. package/dist/components/hazo_fb_form/views/front_office_view.d.ts.map +1 -0
  237. package/dist/components/hazo_fb_form/views/front_office_view.js +1097 -0
  238. package/dist/components/hazo_fb_form/views/front_office_view.js.map +1 -0
  239. package/dist/components/hazo_fb_form/views/interim_view.d.ts +8 -0
  240. package/dist/components/hazo_fb_form/views/interim_view.d.ts.map +1 -0
  241. package/dist/components/hazo_fb_form/views/interim_view.js +416 -0
  242. package/dist/components/hazo_fb_form/views/interim_view.js.map +1 -0
  243. package/dist/components/hazo_fb_form/views/summary_review_view.d.ts +15 -0
  244. package/dist/components/hazo_fb_form/views/summary_review_view.d.ts.map +1 -0
  245. package/dist/components/hazo_fb_form/views/summary_review_view.js +173 -0
  246. package/dist/components/hazo_fb_form/views/summary_review_view.js.map +1 -0
  247. package/dist/components/hazo_field_library/components/template_loader_dialog.d.ts.map +1 -1
  248. package/dist/components/hazo_field_library/components/template_loader_dialog.js +7 -7
  249. package/dist/components/hazo_field_library/components/template_loader_dialog.js.map +1 -1
  250. package/dist/components/hazo_validation_rule_editor/components/clarification_settings.d.ts.map +1 -1
  251. package/dist/components/hazo_validation_rule_editor/components/clarification_settings.js +29 -2
  252. package/dist/components/hazo_validation_rule_editor/components/clarification_settings.js.map +1 -1
  253. package/dist/components/hazo_validation_rule_editor/components/rule_editor.d.ts.map +1 -1
  254. package/dist/components/hazo_validation_rule_editor/components/rule_editor.js +4 -4
  255. package/dist/components/hazo_validation_rule_editor/components/rule_editor.js.map +1 -1
  256. package/dist/components/hazo_validation_rule_editor/context.d.ts +3 -2
  257. package/dist/components/hazo_validation_rule_editor/context.d.ts.map +1 -1
  258. package/dist/components/hazo_validation_rule_editor/context.js +5 -1
  259. package/dist/components/hazo_validation_rule_editor/context.js.map +1 -1
  260. package/dist/components/hazo_validation_rule_editor/hooks/use_file_validation.d.ts.map +1 -1
  261. package/dist/components/hazo_validation_rule_editor/hooks/use_file_validation.js +23 -7
  262. package/dist/components/hazo_validation_rule_editor/hooks/use_file_validation.js.map +1 -1
  263. package/dist/components/hazo_validation_rule_editor/index.d.ts +1 -1
  264. package/dist/components/hazo_validation_rule_editor/index.d.ts.map +1 -1
  265. package/dist/components/hazo_validation_rule_editor/index.js.map +1 -1
  266. package/dist/components/hazo_validation_rule_editor/types.d.ts +10 -0
  267. package/dist/components/hazo_validation_rule_editor/types.d.ts.map +1 -1
  268. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.d.ts +1 -1
  269. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.d.ts.map +1 -1
  270. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.js +2 -2
  271. package/dist/components/hazo_validation_rule_editor/validation_rule_editor.js.map +1 -1
  272. package/dist/components/index.d.ts +10 -2
  273. package/dist/components/index.d.ts.map +1 -1
  274. package/dist/components/index.js +5 -0
  275. package/dist/components/index.js.map +1 -1
  276. package/dist/components/shared/editor_theme/components.d.ts.map +1 -1
  277. package/dist/components/shared/editor_theme/components.js +35 -3
  278. package/dist/components/shared/editor_theme/components.js.map +1 -1
  279. package/dist/components/shared/file_bar/file_bar.d.ts +51 -0
  280. package/dist/components/shared/file_bar/file_bar.d.ts.map +1 -0
  281. package/dist/components/shared/file_bar/file_bar.js +91 -0
  282. package/dist/components/shared/file_bar/file_bar.js.map +1 -0
  283. package/dist/components/shared/file_bar/file_bar_tag.d.ts +10 -0
  284. package/dist/components/shared/file_bar/file_bar_tag.d.ts.map +1 -0
  285. package/dist/components/shared/file_bar/file_bar_tag.js +15 -0
  286. package/dist/components/shared/file_bar/file_bar_tag.js.map +1 -0
  287. package/dist/components/shared/file_bar/file_bar_types.d.ts +29 -0
  288. package/dist/components/shared/file_bar/file_bar_types.d.ts.map +1 -0
  289. package/dist/components/shared/file_bar/file_bar_types.js +5 -0
  290. package/dist/components/shared/file_bar/file_bar_types.js.map +1 -0
  291. package/dist/components/shared/file_bar/file_bar_validation.d.ts +11 -0
  292. package/dist/components/shared/file_bar/file_bar_validation.d.ts.map +1 -0
  293. package/dist/components/shared/file_bar/file_bar_validation.js +21 -0
  294. package/dist/components/shared/file_bar/file_bar_validation.js.map +1 -0
  295. package/dist/components/shared/file_bar/file_bar_validation_dialog.d.ts +13 -0
  296. package/dist/components/shared/file_bar/file_bar_validation_dialog.d.ts.map +1 -0
  297. package/dist/components/shared/file_bar/file_bar_validation_dialog.js +74 -0
  298. package/dist/components/shared/file_bar/file_bar_validation_dialog.js.map +1 -0
  299. package/dist/components/shared/file_bar/file_validation_issues_dialog.d.ts +24 -0
  300. package/dist/components/shared/file_bar/file_validation_issues_dialog.d.ts.map +1 -0
  301. package/dist/components/shared/file_bar/file_validation_issues_dialog.js +22 -0
  302. package/dist/components/shared/file_bar/file_validation_issues_dialog.js.map +1 -0
  303. package/dist/components/shared/file_bar/index.d.ts +13 -0
  304. package/dist/components/shared/file_bar/index.d.ts.map +1 -0
  305. package/dist/components/shared/file_bar/index.js +8 -0
  306. package/dist/components/shared/file_bar/index.js.map +1 -0
  307. package/dist/components/shared/strip_base_props.d.ts.map +1 -1
  308. package/dist/components/shared/strip_base_props.js +2 -0
  309. package/dist/components/shared/strip_base_props.js.map +1 -1
  310. package/dist/components/shared/summary_files/summary_files.d.ts +2 -2
  311. package/dist/components/shared/summary_files/summary_files.d.ts.map +1 -1
  312. package/dist/components/shared/summary_files/summary_files.js +31 -72
  313. package/dist/components/shared/summary_files/summary_files.js.map +1 -1
  314. package/dist/components/shared/use_base_form_field.d.ts +1 -0
  315. package/dist/components/shared/use_base_form_field.d.ts.map +1 -1
  316. package/dist/components/shared/use_base_form_field.js +2 -1
  317. package/dist/components/shared/use_base_form_field.js.map +1 -1
  318. package/dist/config/clarification_templates.d.ts.map +1 -1
  319. package/dist/config/clarification_templates.js +15 -5
  320. package/dist/config/clarification_templates.js.map +1 -1
  321. package/dist/lib/autofill_handler.d.ts +42 -23
  322. package/dist/lib/autofill_handler.d.ts.map +1 -1
  323. package/dist/lib/autofill_handler.js +74 -197
  324. package/dist/lib/autofill_handler.js.map +1 -1
  325. package/dist/lib/fb_form_handler.d.ts +63 -0
  326. package/dist/lib/fb_form_handler.d.ts.map +1 -0
  327. package/dist/lib/fb_form_handler.js +232 -0
  328. package/dist/lib/fb_form_handler.js.map +1 -0
  329. package/dist/lib/index.d.ts +2 -0
  330. package/dist/lib/index.d.ts.map +1 -1
  331. package/dist/lib/index.js +1 -0
  332. package/dist/lib/index.js.map +1 -1
  333. package/dist/lib/validation_handler.d.ts.map +1 -1
  334. package/dist/lib/validation_handler.js +153 -0
  335. package/dist/lib/validation_handler.js.map +1 -1
  336. package/dist/types/clarification.d.ts +14 -1
  337. package/dist/types/clarification.d.ts.map +1 -1
  338. package/dist/types/fb_form_instance.d.ts +44 -0
  339. package/dist/types/fb_form_instance.d.ts.map +1 -0
  340. package/dist/types/fb_form_instance.js +10 -0
  341. package/dist/types/fb_form_instance.js.map +1 -0
  342. package/dist/types/file_manager.d.ts +2 -0
  343. package/dist/types/file_manager.d.ts.map +1 -1
  344. package/dist/types/file_textbox.d.ts +36 -0
  345. package/dist/types/file_textbox.d.ts.map +1 -0
  346. package/dist/types/file_textbox.js +59 -0
  347. package/dist/types/file_textbox.js.map +1 -0
  348. package/dist/types/index.d.ts +6 -2
  349. package/dist/types/index.d.ts.map +1 -1
  350. package/dist/types/index.js +2 -0
  351. package/dist/types/index.js.map +1 -1
  352. package/dist/types/validation.d.ts +34 -2
  353. package/dist/types/validation.d.ts.map +1 -1
  354. package/dist/utils/dev_file_manager.d.ts +12 -0
  355. package/dist/utils/dev_file_manager.d.ts.map +1 -0
  356. package/dist/utils/dev_file_manager.js +54 -0
  357. package/dist/utils/dev_file_manager.js.map +1 -0
  358. package/dist/utils/index.d.ts +4 -0
  359. package/dist/utils/index.d.ts.map +1 -1
  360. package/dist/utils/index.js +8 -0
  361. package/dist/utils/index.js.map +1 -1
  362. package/dist/utils/rule_to_execution.d.ts +7 -0
  363. package/dist/utils/rule_to_execution.d.ts.map +1 -0
  364. package/dist/utils/rule_to_execution.js +18 -0
  365. package/dist/utils/rule_to_execution.js.map +1 -0
  366. package/dist/utils/section_helpers.d.ts +20 -0
  367. package/dist/utils/section_helpers.d.ts.map +1 -0
  368. package/dist/utils/section_helpers.js +37 -0
  369. package/dist/utils/section_helpers.js.map +1 -0
  370. package/package.json +53 -23
@@ -0,0 +1,45 @@
1
+ /**
2
+ * FileChip — Thin wrapper around FileBar for backward compatibility.
3
+ * Maps FileChipProps to FileBarProps.
4
+ */
5
+ 'use client';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { FileBar } from '../shared/file_bar/index.js';
8
+ export function FileChip({ attachment, index, disabled, classifying, queued, autofilling, validating, validated, validation_errors, response_label, classification_tags, classification_meta, on_download, on_remove, on_view, on_classify, on_issue_click, on_validated_click, responded_ids, validation_details, pipeline_status_text, max_width, }) {
9
+ // Derive status icon (validating takes priority over classifying)
10
+ const status_icon = validating ? 'validating'
11
+ : classifying ? 'classifying'
12
+ : autofilling ? 'autofilling'
13
+ : queued ? 'queued'
14
+ : null;
15
+ // Derive validation state
16
+ let validation = null;
17
+ if (validating) {
18
+ validation = { state: 'validating' };
19
+ }
20
+ else if (validation_errors?.length) {
21
+ if (response_label) {
22
+ validation = { state: 'resolved', issue_count: validation_errors.length };
23
+ }
24
+ else {
25
+ const pending = responded_ids
26
+ ? validation_errors.filter(e => !responded_ids.has(e.id)).length
27
+ : validation_errors.length;
28
+ if (pending === 0) {
29
+ validation = { state: 'resolved', issue_count: validation_errors.length };
30
+ }
31
+ else {
32
+ validation = { state: 'issues', issue_count: pending };
33
+ }
34
+ }
35
+ }
36
+ else if (validated) {
37
+ validation = { state: 'passed' };
38
+ }
39
+ // Derive validation click handler
40
+ const handle_validation_click = validation?.state === 'passed'
41
+ ? (on_validated_click ? (file_id) => on_validated_click(file_id) : undefined)
42
+ : (on_issue_click ? (file_id) => on_issue_click(file_id) : undefined);
43
+ return (_jsx(FileBar, { attachment: attachment, status_icon: status_icon, validation: validation, on_validation_click: handle_validation_click, validation_details: validation_details, pipeline_status_text: pipeline_status_text, max_width: max_width, classification_tags: classification_tags, classification_meta: classification_meta, on_download: on_download, on_view: on_view, on_remove: on_remove ? () => on_remove(index) : undefined, on_classify: on_classify, disabled: disabled }));
44
+ }
45
+ //# sourceMappingURL=file_chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_chip.js","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/file_chip.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,CAAC;;AAGb,OAAO,EAAE,OAAO,EAAqB,MAAM,6BAA6B,CAAC;AAkCzE,MAAM,UAAU,QAAQ,CAAC,EACvB,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EACpF,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAC3E,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAChF,aAAa,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,SAAS,GACpD;IACd,kEAAkE;IAClE,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,YAAqB;QACpD,C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AC,OAAe,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACrF,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAe,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEhF,OAAO,CACL,KAAC,OAAO,IACN,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,uBAAuB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,EAC1C,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EACzD,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Grouped files with tree connector — original + linked replacements/additions.
3
+ * Uses FileBar for consistent rendering of each file row.
4
+ * Supports recursive nesting: each linked file can have its own resolution files.
5
+ */
6
+ import type { FormFileAttachment } from '../../types/file_attachment.js';
7
+ import type { FileTextboxBlock } from '../../types/file_textbox.js';
8
+ import type { ClarificationItem } from '../../types/clarification.js';
9
+ import type { FileTextboxTag, FileClassificationMeta } from './hazo_collab_form_file_textbox.js';
10
+ export interface FileGroupProps {
11
+ original_block: FileTextboxBlock & {
12
+ type: 'file';
13
+ };
14
+ original_index: number;
15
+ linked_blocks: FileTextboxBlock[];
16
+ all_blocks: FileTextboxBlock[];
17
+ is_replaced: boolean;
18
+ disabled?: boolean;
19
+ classifying_file_ids?: Set<string>;
20
+ autofilling_file_ids?: Set<string>;
21
+ validating_file_ids?: Set<string>;
22
+ validation_errors?: Record<string, ClarificationItem[]>;
23
+ validated_file_ids?: Set<string>;
24
+ file_response_labels?: Record<string, string>;
25
+ classification_tags?: Record<string, FileTextboxTag[]>;
26
+ classification_metadata?: Record<string, FileClassificationMeta>;
27
+ on_download?: (attachment: FormFileAttachment) => void;
28
+ on_remove?: (index: number) => void;
29
+ on_view?: (attachment: FormFileAttachment) => void;
30
+ on_issue_click?: (file_id: string) => void;
31
+ on_validated_click?: (file_id: string) => void;
32
+ responded_ids?: Set<string>;
33
+ }
34
+ export declare function FileGroup({ original_block, original_index, linked_blocks, all_blocks, is_replaced, disabled, classifying_file_ids, autofilling_file_ids, validating_file_ids, validation_errors, validated_file_ids, file_response_labels, classification_tags, classification_metadata, on_download, on_remove, on_view, on_issue_click, on_validated_click, responded_ids, }: FileGroupProps): import("react/jsx-runtime").JSX.Element;
35
+ //# sourceMappingURL=file_group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_group.d.ts","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/file_group.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEjG,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,gBAAgB,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAA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a,GACnF,EAAE,cAAc,2CAuDhB"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Grouped files with tree connector — original + linked replacements/additions.
3
+ * Uses FileBar for consistent rendering of each file row.
4
+ * Supports recursive nesting: each linked file can have its own resolution files.
5
+ */
6
+ 'use client';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ import { FileBar, derive_validation } from '../shared/file_bar/index.js';
9
+ /** Find direct children of a file (blocks that `replaces` the given file_id). */
10
+ function find_children(file_id, all_blocks) {
11
+ return all_blocks.filter(b => b.type === 'file' && b.replaces === file_id);
12
+ }
13
+ /** Derive status icon from classifying/validating/autofilling sets. Validating takes priority over classifying. */
14
+ function derive_status(file_id, shared) {
15
+ if (shared.validating_file_ids?.has(file_id))
16
+ return 'validating';
17
+ if (shared.classifying_file_ids?.has(file_id))
18
+ return 'classifying';
19
+ if (shared.autofilling_file_ids?.has(file_id))
20
+ return 'autofilling';
21
+ return null;
22
+ }
23
+ /** Render a linked file row with its own sub-linked children (recursive). */
24
+ function LinkedFileNode({ block, index_in_siblings, sibling_count, depth, shared, }) {
25
+ const att = block.attachment;
26
+ const r_idx = shared.all_blocks.indexOf(block);
27
+ const is_last = index_in_siblings === sibling_count - 1;
28
+ const validation = derive_validation(att.file_id, {
29
+ validating_file_ids: shared.validating_file_ids,
30
+ validated_file_ids: shared.validated_file_ids,
31
+ validation_errors: shared.validation_errors,
32
+ file_response_labels: shared.file_response_labels,
33
+ responded_ids: shared.responded_ids,
34
+ });
35
+ const status = derive_status(att.file_id, shared);
36
+ // Find children of THIS linked file (resolution files, recursive)
37
+ const children = find_children(att.file_id, shared.all_blocks);
38
+ return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-center gap-1", style: { marginLeft: `${depth * 16}px` }, children: [_jsx("div", { className: "w-3 flex-shrink-0 flex items-center justify-end", children: _jsx("svg", { className: "w-3 h-4 text-violet-300/50", viewBox: "0 0 12 16", fill: "none", children: _jsx("path", { d: is_last && children.length === 0 ? "M6 0 V8 H12" : "M6 0 V16 M6 8 H12", stroke: "currentColor", strokeWidth: "1.5" }) }) }), _jsx(FileBar, { attachment: att, status_icon: status, validation: validation, on_validation_click: validation?.state === 'passed' ? shared.on_validated_click : shared.on_issue_click, classification_tags: shared.classification_tags?.[att.file_id], classification_meta: shared.classification_metadata?.[att.file_id], on_download: shared.on_download, on_view: shared.on_view, on_remove: !shared.disabled && r_idx >= 0 && shared.on_remove ? () => shared.on_remove(r_idx) : undefined, disabled: shared.disabled, class_name: "flex-1 min-w-0" })] }), children.map((child, ci) => (_jsx(LinkedFileNode, { block: child, index_in_siblings: ci, sibling_count: children.length, depth: depth + 1, shared: shared }, `child_${ci}`)))] }, `linked_d${depth}_${index_in_siblings}`));
39
+ }
40
+ export function FileGroup({ original_block, original_index, linked_blocks, all_blocks, is_replaced, disabled, classifying_file_ids, autofilling_file_ids, validating_file_ids, validation_errors, validated_file_ids, file_response_labels, classification_tags, classification_metadata, on_download, on_remove, on_view, on_issue_click, on_validated_click, responded_ids, }) {
41
+ const orig_file_id = original_block.attachment.file_id;
42
+ const orig_validation = is_replaced ? null : derive_validation(orig_file_id, {
43
+ validating_file_ids, validated_file_ids, validation_errors, file_response_labels, responded_ids,
44
+ });
45
+ const orig_status = derive_status(orig_file_id, { all_blocks, classifying_file_ids, autofilling_file_ids });
46
+ const shared = {
47
+ all_blocks, disabled, classifying_file_ids, autofilling_file_ids, validating_file_ids,
48
+ validation_errors, validated_file_ids, file_response_labels,
49
+ classification_tags, classification_metadata,
50
+ on_download, on_remove, on_view, on_issue_click, on_validated_click, responded_ids,
51
+ };
52
+ return (_jsx("div", { className: "col-span-1 rounded-lg border border-violet-200/50 bg-white/40 p-1.5", children: _jsxs("div", { className: "flex items-stretch gap-0", children: [_jsx("div", { className: "flex flex-col items-center w-5 flex-shrink-0 pt-3 pb-1", children: _jsx("div", { className: "w-px flex-1 bg-violet-300/50" }) }), _jsxs("div", { className: "flex-1 min-w-0 space-y-1", children: [_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("div", { className: "w-3 h-px bg-violet-300/50 flex-shrink-0" }), _jsx(FileBar, { attachment: original_block.attachment, muted: is_replaced, status_icon: orig_status, validation: orig_validation, on_validation_click: orig_validation?.state === 'passed' ? on_validated_click : on_issue_click, classification_tags: classification_tags?.[orig_file_id], classification_meta: classification_metadata?.[orig_file_id], on_download: on_download, on_view: on_view, disabled: disabled, class_name: "flex-1 min-w-0" })] }), linked_blocks.map((rb, ri) => (_jsx(LinkedFileNode, { block: rb, index_in_siblings: ri, sibling_count: linked_blocks.length, depth: 1, shared: shared }, `linked_${ri}`)))] })] }) }));
53
+ }
54
+ //# sourceMappingURL=file_group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_group.js","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/file_group.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,CAAC;;AAGb,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AA6BzE,iFAAiF;AACjF,SAAS,aAAa,CAAC,OAAe,EAAE,UAA8B;IACpE,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,IAAK,CAAS,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;AACtF,CAAC;AAsBD,mHAAmH;AACnH,SAAS,aAAa,CAAC,OAAe,EAAE,MAAmB;IACzD,IAAI,MAAM,CAAC,mBAAmB,EAAE,GAAG,CAAC,OAAO,CAAC;QAAE,OAAO,YAAY,CAAC;IAClE,IAAI,MAAM,CAAC,oBAAoB,EAAE,GAAG,CAAC,OAAO,CAAC;QAAE,OAAO,aAAa,CAAC;IACpE,IAAI,MAAM,CAAC,oBAAoB,EAAE,GAAG,CAAC,OAAO,CAAC;QAAE,OAAO,aAAa,CAAC;IACpE,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6EAA6E;AAC7E,SAAS,c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,uBAAuB,EAAE,CAAC,YAAY,CAAC,EAC5D,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAC,gBAAgB,GAC3B,IACE,EAEL,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAC7B,KAAC,cAAc,IAEb,KAAK,EAAE,EAAyC,EAChD,iBAAiB,EAAE,EAAE,EACrB,aAAa,EAAE,aAAa,CAAC,MAAM,EACnC,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,MAAM,IALT,UAAU,EAAE,EAAE,CAMnB,CACH,CAAC,IACE,IACF,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * FileTextboxPanel — a single purple panel with comment textarea + file grid + upload zone.
3
+ */
4
+ import type { FileTextboxEntry } from '../../types/file_textbox.js';
5
+ import type { FormFileAttachment } from '../../types/file_attachment.js';
6
+ import type { FileManagerCallbacks } from '../../types/file_manager.js';
7
+ import type { ClarificationItem } from '../../types/clarification.js';
8
+ import type { FileTextboxTag, FileClassificationMeta } from './hazo_collab_form_file_textbox.js';
9
+ export interface FileTextboxPanelProps {
10
+ entry: FileTextboxEntry;
11
+ entry_index: number;
12
+ disabled?: boolean;
13
+ placeholder?: string;
14
+ file_manager?: FileManagerCallbacks;
15
+ file_accept?: string;
16
+ max_files?: number;
17
+ field_id: string;
18
+ file_area_color?: string;
19
+ /** Total file count across all entries (for max_files limit) */
20
+ total_file_count: number;
21
+ classification_tags?: Record<string, FileTextboxTag[]>;
22
+ classification_metadata?: Record<string, FileClassificationMeta>;
23
+ classifying_file_ids?: Set<string>;
24
+ queued_file_ids?: Set<string>;
25
+ autofilling_file_ids?: Set<string>;
26
+ validation_errors?: Record<string, ClarificationItem[]>;
27
+ validating_file_ids?: Set<string>;
28
+ validated_file_ids?: Set<string>;
29
+ file_response_labels: Record<string, string>;
30
+ on_comment_change: (entry_index: number, comment: string) => void;
31
+ on_files_added: (entry_index: number, attachments: FormFileAttachment[]) => void;
32
+ on_file_remove: (entry_index: number, file_block_index: number) => void;
33
+ on_remove_panel: (entry_index: number) => void;
34
+ on_file_view?: (attachment: FormFileAttachment) => void;
35
+ on_classify_file?: (attachment: FormFileAttachment) => void;
36
+ on_download?: (attachment: FormFileAttachment) => void;
37
+ on_issue_click?: (file_id: string) => void;
38
+ on_validated_click?: (file_id: string) => void;
39
+ responded_ids?: Set<string>;
40
+ /** Per-file validation details for built-in dialog (keyed by file_id) */
41
+ file_validation_details?: Record<string, import('../shared/file_bar/file_bar_types.js').FileValidationDetails>;
42
+ /** Per-file pipeline status text (keyed by file_id) */
43
+ file_pipeline_status?: Record<string, string>;
44
+ }
45
+ export declare function FileTextboxPanel({ entry, entry_index, disabled, placeholder, file_manager, file_accept, max_files, field_id, total_file_count, classification_tags, classification_metadata, classifying_file_ids, queued_file_ids, autofilling_file_ids, validation_errors, validating_file_ids, validated_file_ids, file_response_labels, on_comment_change, on_files_added, on_file_remove, on_remove_panel, on_file_view, on_classify_file, on_download, on_issue_click, on_validated_click, responded_ids, file_validation_details, file_pipeline_status, }: FileTextboxPanelProps): import("react/jsx-runtime").JSX.Element;
46
+ //# sourceMappingURL=file_textbox_panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_textbox_panel.d.ts","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/file_textbox_panel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oC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_jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { useCallback, useRef, useState } from 'react';
7
+ import { cn } from '../../utils/cn.js';
8
+ import { FileChip } from './file_chip.js';
9
+ import { FileGroup } from './file_group.js';
10
+ import { FileUploadZone } from './file_upload_zone.js';
11
+ import { HiX } from 'react-icons/hi';
12
+ export function FileTextboxPanel({ entry, entry_index, disabled, placeholder, file_manager, file_accept, max_files = 50, field_id, total_file_count, classification_tags, classification_metadata, classifying_file_ids, queued_file_ids, autofilling_file_ids, validation_errors, validating_file_ids, validated_file_ids, file_response_labels, on_comment_change, on_files_added, on_file_remove, on_remove_panel, on_file_view, on_classify_file, on_download, on_issue_click, on_validated_click, responded_ids, file_validation_details, file_pipeline_status, }) {
13
+ const [upload_progress, set_upload_progress] = useState(null);
14
+ const [uploading_files, set_uploading_files] = useState([]);
15
+ // Drag counter to prevent flicker when hovering over child elements
16
+ const drag_counter_ref = useRef(0);
17
+ const [is_dragging, set_is_dragging] = useState(false);
18
+ // Track active upload count to prevent concurrent uploads clearing each other's state
19
+ const active_upload_ref = useRef(0);
20
+ // Ref to always call the latest on_files_added (avoids stale closure during async upload)
21
+ const on_files_added_ref = useRef(on_files_added);
22
+ on_files_added_ref.current = on_files_added;
23
+ const auto_resize = useCallback((el) => {
24
+ if (!el)
25
+ return;
26
+ el.style.height = 'auto';
27
+ el.style.height = el.scrollHeight + 'px';
28
+ }, []);
29
+ const handle_files = useCallback(async (files) => {
30
+ if (!file_manager)
31
+ return;
32
+ const remaining = max_files - total_file_count;
33
+ const to_upload = Array.from(files).slice(0, remaining);
34
+ if (to_upload.length === 0)
35
+ return;
36
+ active_upload_ref.current++;
37
+ set_uploading_files(prev => [...prev, ...to_upload.map((f) => ({ name: f.name, status: 'uploading' }))]);
38
+ const uploaded = [];
39
+ for (let i = 0; i < to_upload.length; i++) {
40
+ const file = to_upload[i];
41
+ set_upload_progress({ current: i + 1, total: to_upload.length, file_name: file.name });
42
+ try {
43
+ const attachment = await file_manager.upload(file, {
44
+ entity_id: field_id,
45
+ visibility: 'public',
46
+ });
47
+ uploaded.push(attachment);
48
+ }
49
+ catch (err) {
50
+ console.error('[FileTextboxPanel] Upload failed:', err);
51
+ }
52
+ }
53
+ active_upload_ref.current--;
54
+ // Only clear upload UI when ALL concurrent uploads are done
55
+ if (active_upload_ref.current === 0) {
56
+ set_upload_progress(null);
57
+ set_uploading_files([]);
58
+ }
59
+ if (uploaded.length > 0) {
60
+ // Use ref to call the latest callback (not the one captured at upload start)
61
+ on_files_added_ref.current(entry_index, uploaded);
62
+ }
63
+ }, [file_manager, max_files, total_file_count, field_id, entry_index]);
64
+ const handle_drag_enter = useCallback((e) => {
65
+ e.preventDefault();
66
+ drag_counter_ref.current++;
67
+ if (drag_counter_ref.current === 1)
68
+ set_is_dragging(true);
69
+ }, []);
70
+ const handle_drag_over = useCallback((e) => { e.preventDefault(); }, []);
71
+ const handle_drag_leave = useCallback((e) => {
72
+ drag_counter_ref.current--;
73
+ if (drag_counter_ref.current === 0)
74
+ set_is_dragging(false);
75
+ }, []);
76
+ const handle_drop = useCallback((e) => {
77
+ e.preventDefault();
78
+ drag_counter_ref.current = 0;
79
+ set_is_dragging(false);
80
+ if (e.dataTransfer.files.length)
81
+ handle_files(e.dataTransfer.files);
82
+ }, [handle_files]);
83
+ // Build blocks array for file_group (linked file detection)
84
+ const file_blocks = entry.files;
85
+ const can_upload = file_manager && !disabled && total_file_count < max_files;
86
+ return (_jsxs("div", { className: cn('rounded-xl border border-violet-200/50 bg-violet-50/30 p-3 relative group/panel transition-colors', is_dragging && 'border-primary bg-primary/5'), onDragEnter: handle_drag_enter, onDragOver: handle_drag_over, onDragLeave: handle_drag_leave, onDrop: handle_drop, children: [!disabled && (_jsx("button", { type: "button", onClick: () => on_remove_panel(entry_index), className: "absolute top-2 right-2 p-1 rounded-md text-muted-foreground/40 hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover/panel:opacity-100 transition-all", title: "Remove panel", children: _jsx(HiX, { className: "h-3.5 w-3.5" }) })), _jsx("textarea", { ref: (el) => { if (el)
87
+ auto_resize(el); }, value: entry.comment, placeholder: placeholder || 'Add a comment...', disabled: disabled, onChange: (e) => {
88
+ on_comment_change(entry_index, e.target.value);
89
+ auto_resize(e.target);
90
+ }, className: cn('w-full bg-transparent px-2 py-1.5 text-base md:text-sm resize-none outline-none rounded-md', 'placeholder:text-muted-foreground/50', 'disabled:cursor-not-allowed disabled:opacity-50', 'min-h-[40px]', 'focus:bg-white/50 transition-colors'), rows: 1 }), file_blocks.length > 0 && (_jsx("div", { className: "grid grid-cols-2 gap-1.5 items-start mt-2", children: file_blocks.map((block, fi) => {
91
+ if (block.type !== 'file')
92
+ return null;
93
+ const is_replaced = !!block.replaced_by;
94
+ const is_replacement = !!block.replaces;
95
+ if (is_replacement)
96
+ return null;
97
+ const linked = file_blocks.filter(b => b.type === 'file' && b.replaces === block.attachment.file_id);
98
+ if (linked.length === 0) {
99
+ return (_jsx(FileChip, { attachment: block.attachment, index: fi, disabled: disabled, classifying: classifying_file_ids?.has(block.attachment.file_id), autofilling: autofilling_file_ids?.has(block.attachment.file_id), queued: queued_file_ids?.has(block.attachment.file_id), validating: validating_file_ids?.has(block.attachment.file_id), validated: validated_file_ids?.has(block.attachment.file_id), validation_errors: validation_errors?.[block.attachment.file_id], response_label: file_response_labels[block.attachment.file_id], classification_tags: classification_tags?.[block.attachment.file_id], classification_meta: classification_metadata?.[block.attachment.file_id], on_download: on_download, on_remove: (idx) => on_file_remove(entry_index, idx), on_view: on_file_view, on_classify: on_classify_file, on_issue_click: on_issue_click, on_validated_click: on_validated_click, responded_ids: responded_ids, validation_details: file_validation_details?.[block.attachment.file_id], pipeline_status_text: file_pipeline_status?.[block.attachment.file_id] }, fi));
100
+ }
101
+ return (_jsx(FileGroup, { original_block: block, original_index: fi, linked_blocks: linked, all_blocks: file_blocks, is_replaced: is_replaced, disabled: disabled, classifying_file_ids: classifying_file_ids, autofilling_file_ids: autofilling_file_ids, validating_file_ids: validating_file_ids, validation_errors: validation_errors, validated_file_ids: validated_file_ids, file_response_labels: file_response_labels, classification_tags: classification_tags, classification_metadata: classification_metadata, on_download: on_download, on_remove: (idx) => on_file_remove(entry_index, idx), on_view: on_file_view, on_issue_click: on_issue_click, on_validated_click: on_validated_click, responded_ids: responded_ids }, fi));
102
+ }) })), can_upload && (_jsx("div", { className: "mt-2", children: _jsx(FileUploadZone, { file_accept: file_accept, upload_progress: upload_progress, uploading_files: uploading_files, on_files: handle_files }) }))] }));
103
+ }
104
+ //# sourceMappingURL=file_textbox_panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_textbox_panel.js","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/file_textbox_panel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,CAAC;;AAEb,OAAc,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAOvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AA0CrC,MAAM,UAAU,gBAAgB,CAAC,EAC/B,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,GAAG,EAAE,EACpF,QAAQ,EAAE,gBAAgB,EAC1B,mBAAmB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EACzG,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAChF,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAClE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EA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 /**
2
+ * Upload dropzone + progress indicator for FileTextbox panels.
3
+ */
4
+ export interface UploadProgress {
5
+ current: number;
6
+ total: number;
7
+ file_name: string;
8
+ }
9
+ export interface UploadingFile {
10
+ name: string;
11
+ status: 'uploading' | 'done';
12
+ }
13
+ export interface FileUploadZoneProps {
14
+ file_accept?: string;
15
+ upload_progress: UploadProgress | null;
16
+ uploading_files: UploadingFile[];
17
+ on_files: (files: FileList) => void;
18
+ }
19
+ export declare function FileUploadZone({ file_accept, upload_progress, uploading_files, on_files }: FileUploadZoneProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=file_upload_zone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_upload_zone.d.ts","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/file_upload_zone.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAQH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,eAAe,EAAE,aAAa,EAAE,CAAC;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAuE9G"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Upload dropzone + progress indicator for FileTextbox panels.
3
+ */
4
+ 'use client';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { useRef } from 'react';
7
+ import { cn } from '../../utils/cn.js';
8
+ import { HiCloudUpload } from 'react-icons/hi';
9
+ export function FileUploadZone({ file_accept, upload_progress, uploading_files, on_files }) {
10
+ const file_input_ref = useRef(null);
11
+ return (_jsxs("div", { children: [uploading_files.length > 0 && (_jsx("div", { className: "flex flex-col mb-1.5", children: uploading_files.map((uf, i) => (_jsxs("div", { className: "flex items-center gap-1.5 px-1.5 py-0.5 rounded", children: [uf.status === 'uploading' ? (_jsxs("svg", { className: "h-2.5 w-2.5 flex-shrink-0 text-blue-500 animate-spin", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] })) : (_jsx(HiCloudUpload, { className: "h-2.5 w-2.5 flex-shrink-0 text-green-600" })), _jsx("span", { className: "text-xs text-muted-foreground/60 truncate", children: uf.name })] }, `uploading_${i}`))) })), _jsxs("div", { children: [upload_progress ? (_jsxs("div", { className: "w-full py-1 rounded border border-dashed border-primary/40 bg-primary/5", children: [_jsxs("div", { className: "flex items-center justify-center gap-2 text-[11px] text-primary mb-0.5", children: [_jsxs("svg", { className: "h-3 w-3 animate-spin", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), _jsxs("span", { children: ["Uploading ", upload_progress.current, "/", upload_progress.total, ' — ', _jsx("span", { className: "truncate inline-block max-w-[200px] align-bottom", children: upload_progress.file_name })] })] }), _jsx("div", { className: "mx-3 h-0.5 rounded-full bg-primary/20 overflow-hidden", children: _jsx("div", { className: "h-full bg-primary rounded-full transition-all duration-300", style: { width: `${(upload_progress.current / upload_progress.total) * 100}%` } }) })] })) : (_jsxs("button", { type: "button", onClick: () => file_input_ref.current?.click(), className: cn('w-full flex items-center justify-center gap-1.5 py-1.5 rounded-md border border-dashed', 'border-violet-300/60 text-xs text-violet-400 bg-white/40', 'hover:border-violet-400/70 hover:text-violet-500 hover:bg-white/70 transition-all'), children: [_jsx(HiCloudUpload, { className: "h-3.5 w-3.5" }), "Drop files or click to upload"] })), _jsx("input", { ref: file_input_ref, type: "file", multiple: true, accept: file_accept, className: "hidden", onChange: (e) => { if (e.target.files?.length)
12
+ on_files(e.target.files); e.target.value = ''; } })] })] }));
13
+ }
14
+ //# sourceMappingURL=file_upload_zone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_upload_zone.js","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/file_upload_zone.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,CAAC;;AAEb,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAoB/C,MAAM,UAAU,cAAc,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAuB;IAC7G,MAAM,cAAc,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEtD,OAAO,CACL,0BAEG,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,cAAK,SAAS,EAAC,sBAAsB,YAClC,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAC9B,eAA4B,SAAS,EAAC,iDAAiD,aACpF,EAAE,CAAC,MAAM,KAAK,WAA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4D,EACtE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,eAAe,CAAC,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,GAC/E,GACE,IACF,CACP,CAAC,CAAC,CAAC,CACF,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAC9C,SAAS,EAAE,EAAE,CACX,wFAAwF,EACxF,0DAA0D,EAC1D,mFAAmF,CACpF,aAED,KAAC,aAAa,IAAC,SAAS,EAAC,aAAa,GAAG,qCAElC,CACV,EACD,gBACE,GAAG,EAAE,cAAc,EACnB,IAAI,EAAC,MAAM,EACX,QAAQ,QACR,MAAM,EAAE,WAAW,EACnB,SAAS,EAAC,QAAQ,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM;4BAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAC/F,IACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * File Textbox — Panel-based editor combining comment text areas and file attachments.
3
+ * Each panel is an independent comment + files group. Click "Comment/Upload Files" to add panels.
4
+ */
5
+ import React from 'react';
6
+ import { type CollabFormFieldBaseProps, type FileData } from '../hazo_collab_form_base.js';
7
+ import type { FileTextboxValue } from '../../types/file_textbox.js';
8
+ import type { FileManagerCallbacks } from '../../types/file_manager.js';
9
+ import type { FormFileAttachment } from '../../types/file_attachment.js';
10
+ import type { ClarificationItem, ClarificationResponse } from '../../types/clarification.js';
11
+ /** A classification tag to display on file blocks */
12
+ export interface FileTextboxTag {
13
+ id: string;
14
+ label: string;
15
+ color?: string;
16
+ tooltip?: string;
17
+ }
18
+ /** Classification metadata displayed below file blocks */
19
+ export interface FileClassificationMeta {
20
+ document_date?: string;
21
+ document_nature?: string;
22
+ document_type?: string[];
23
+ }
24
+ export interface HazoCollabFormFileTextboxProps extends CollabFormFieldBaseProps {
25
+ value: FileTextboxValue;
26
+ onChange: (value: FileTextboxValue) => void;
27
+ file_manager?: FileManagerCallbacks;
28
+ file_accept?: string;
29
+ max_files?: number;
30
+ tag_options?: string[];
31
+ tags_editable?: boolean;
32
+ classification_tags?: Record<string, FileTextboxTag[]>;
33
+ classification_metadata?: Record<string, FileClassificationMeta>;
34
+ on_file_view?: (attachment: FormFileAttachment) => void;
35
+ on_classify_file?: (attachment: FormFileAttachment) => void;
36
+ classifying_file_ids?: Set<string>;
37
+ queued_file_ids?: Set<string>;
38
+ autofilling_file_ids?: Set<string>;
39
+ validation_errors?: Record<string, ClarificationItem[]>;
40
+ validating_file_ids?: Set<string>;
41
+ validated_file_ids?: Set<string>;
42
+ on_validation_response?: (clarification_id: string, response: ClarificationResponse) => void;
43
+ /** External response labels (from shared pending responses) — merged with local state */
44
+ external_file_response_labels?: Record<string, string>;
45
+ /** Set of clarification IDs that have been responded to (for enriching dialog items) */
46
+ responded_clarification_ids?: Set<string>;
47
+ /** Sent/flushed clarifications with response data (for pre-filling responded items in dialog) */
48
+ sent_clarifications?: ClarificationItem[];
49
+ /** Callback when green validation tick is clicked (to show validation details) */
50
+ on_validated_click?: (file_id: string) => void;
51
+ placeholder?: string;
52
+ min_height?: string;
53
+ file_area_color?: string;
54
+ /** Per-file validation details for built-in dialog (keyed by file_id) */
55
+ file_validation_details?: Record<string, import('../shared/file_bar/file_bar_types.js').FileValidationDetails>;
56
+ /** Per-file pipeline status text (keyed by file_id) */
57
+ file_pipeline_status?: Record<string, string>;
58
+ }
59
+ export interface HazoCollabFormFileTextboxRef {
60
+ get_file_data: () => FileData[];
61
+ }
62
+ export declare const HazoCollabFormFileTextbox: React.ForwardRefExoticComponent<HazoCollabFormFileTextboxProps & React.RefAttributes<HTMLDivElement & HazoCollabFormFileTextboxRef>>;
63
+ //# sourceMappingURL=hazo_collab_form_file_textbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hazo_collab_form_file_textbox.d.ts","sourceRoot":"","sources":["../../../src/components/hazo_collab_form_file_textbox/hazo_collab_form_file_textbox.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAG3F,OAAO,KAAK,EAAE,gBAAgB,EAAsC,MAAM,6BAA6B,CAAC;AAExG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAU7F,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,8BAA+B,SAAQ,wBAAwB;IAC9E,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB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