@arbidocs/blocks 0.4.147 → 0.4.150

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 (337) hide show
  1. package/dist/ConnectedNativeDocxComparison-3XQSINPQ.cjs +44 -0
  2. package/dist/ConnectedNativeDocxComparison-3XQSINPQ.cjs.map +1 -0
  3. package/dist/ConnectedNativeDocxComparison-XQSXVGHR.js +35 -0
  4. package/dist/ConnectedNativeDocxComparison-XQSXVGHR.js.map +1 -0
  5. package/dist/ConnectedNativeDocxEditor-IPEZDERL.js +33 -0
  6. package/dist/ConnectedNativeDocxEditor-IPEZDERL.js.map +1 -0
  7. package/dist/ConnectedNativeDocxEditor-OUWFMIPH.cjs +46 -0
  8. package/dist/ConnectedNativeDocxEditor-OUWFMIPH.cjs.map +1 -0
  9. package/dist/ConnectedStreamedWordArtifact-D5LSMDO4.cjs +44 -0
  10. package/dist/ConnectedStreamedWordArtifact-D5LSMDO4.cjs.map +1 -0
  11. package/dist/ConnectedStreamedWordArtifact-UZVNBKQB.js +35 -0
  12. package/dist/ConnectedStreamedWordArtifact-UZVNBKQB.js.map +1 -0
  13. package/dist/FactTextEditor-YESAU2IJ.js +25 -0
  14. package/dist/FactTextEditor-YESAU2IJ.js.map +1 -0
  15. package/dist/FactTextEditor-YUPBCTXK.cjs +27 -0
  16. package/dist/FactTextEditor-YUPBCTXK.cjs.map +1 -0
  17. package/dist/{NativeDocxEditor-BE2OEOTJ.cjs → NativeDocxEditor-5VBNM5I7.cjs} +8 -8
  18. package/dist/{NativeDocxEditor-BE2OEOTJ.cjs.map → NativeDocxEditor-5VBNM5I7.cjs.map} +1 -1
  19. package/dist/{NativeDocxEditor-KOPFMRYW.js → NativeDocxEditor-XT5ZLFGU.js} +4 -4
  20. package/dist/{NativeDocxEditor-KOPFMRYW.js.map → NativeDocxEditor-XT5ZLFGU.js.map} +1 -1
  21. package/dist/agents/index.cjs +265 -266
  22. package/dist/agents/index.js +8 -9
  23. package/dist/calendar/index.cjs +117 -125
  24. package/dist/calendar/index.d.ts +0 -1
  25. package/dist/calendar/index.js +1 -1
  26. package/dist/calls/index.cjs +3 -3
  27. package/dist/calls/index.js +2 -2
  28. package/dist/chat/index.cjs +78 -78
  29. package/dist/chat/index.js +3 -3
  30. package/dist/{chunk-2FL7QJKJ.js → chunk-265GOG4W.js} +3 -3
  31. package/dist/{chunk-2FL7QJKJ.js.map → chunk-265GOG4W.js.map} +1 -1
  32. package/dist/{chunk-VUR63NMQ.js → chunk-3E2F4AHD.js} +8 -8
  33. package/dist/{chunk-VUR63NMQ.js.map → chunk-3E2F4AHD.js.map} +1 -1
  34. package/dist/{chunk-U37AYUPI.cjs → chunk-3FSXWVHW.cjs} +47 -234
  35. package/dist/chunk-3FSXWVHW.cjs.map +1 -0
  36. package/dist/{chunk-IL3WB3YX.cjs → chunk-4JNKXOFZ.cjs} +3 -3
  37. package/dist/{chunk-IL3WB3YX.cjs.map → chunk-4JNKXOFZ.cjs.map} +1 -1
  38. package/dist/{chunk-ODRHHWHY.cjs → chunk-4KMLM3GY.cjs} +4 -4
  39. package/dist/chunk-4KMLM3GY.cjs.map +1 -0
  40. package/dist/{chunk-MHFF5N65.cjs → chunk-757OYF6G.cjs} +4 -38
  41. package/dist/chunk-757OYF6G.cjs.map +1 -0
  42. package/dist/chunk-AXTDDWMR.js +16 -0
  43. package/dist/chunk-AXTDDWMR.js.map +1 -0
  44. package/dist/{chunk-B3AHCIV5.js → chunk-BJ24VPOA.js} +4 -55
  45. package/dist/chunk-BJ24VPOA.js.map +1 -0
  46. package/dist/chunk-C7PTF6BQ.cjs +172 -0
  47. package/dist/chunk-C7PTF6BQ.cjs.map +1 -0
  48. package/dist/{chunk-LZRMXJIE.js → chunk-COA3S3CZ.js} +3 -3
  49. package/dist/{chunk-LZRMXJIE.js.map → chunk-COA3S3CZ.js.map} +1 -1
  50. package/dist/{chunk-SUUPR735.js → chunk-CQPFW64W.js} +5 -5
  51. package/dist/{chunk-SUUPR735.js.map → chunk-CQPFW64W.js.map} +1 -1
  52. package/dist/chunk-D3WFIFRY.cjs +659 -0
  53. package/dist/chunk-D3WFIFRY.cjs.map +1 -0
  54. package/dist/{chunk-QXMR5YHC.js → chunk-DIB4JYUY.js} +19 -3
  55. package/dist/chunk-DIB4JYUY.js.map +1 -0
  56. package/dist/chunk-DVB5ZKOF.js +22 -0
  57. package/dist/chunk-DVB5ZKOF.js.map +1 -0
  58. package/dist/{chunk-VHJHY7TT.js → chunk-ECERC6TI.js} +3 -3
  59. package/dist/{chunk-VHJHY7TT.js.map → chunk-ECERC6TI.js.map} +1 -1
  60. package/dist/chunk-EDV7CYG6.cjs +18 -0
  61. package/dist/chunk-EDV7CYG6.cjs.map +1 -0
  62. package/dist/chunk-FAXXN7KI.cjs +213 -0
  63. package/dist/chunk-FAXXN7KI.cjs.map +1 -0
  64. package/dist/{chunk-2MJWWPHY.js → chunk-G4IYES7G.js} +140 -15
  65. package/dist/chunk-G4IYES7G.js.map +1 -0
  66. package/dist/{chunk-AINU3EJ6.cjs → chunk-GGTUMLCT.cjs} +93 -91
  67. package/dist/chunk-GGTUMLCT.cjs.map +1 -0
  68. package/dist/{chunk-QI6AIHWP.cjs → chunk-GOWXP5KT.cjs} +145 -14
  69. package/dist/chunk-GOWXP5KT.cjs.map +1 -0
  70. package/dist/{chunk-H74HEPKT.js → chunk-HGLC566X.js} +598 -13
  71. package/dist/chunk-HGLC566X.js.map +1 -0
  72. package/dist/{chunk-AO7SK6WP.cjs → chunk-ILM42LE6.cjs} +33 -33
  73. package/dist/{chunk-AO7SK6WP.cjs.map → chunk-ILM42LE6.cjs.map} +1 -1
  74. package/dist/{chunk-LTU35TQN.cjs → chunk-IPQ5MJ4Z.cjs} +636 -31
  75. package/dist/chunk-IPQ5MJ4Z.cjs.map +1 -0
  76. package/dist/{chunk-NRFAWUVD.js → chunk-JAANWQGB.js} +157 -157
  77. package/dist/chunk-JAANWQGB.js.map +1 -0
  78. package/dist/{chunk-7RJTEWYM.js → chunk-JGOST4IL.js} +350 -64
  79. package/dist/chunk-JGOST4IL.js.map +1 -0
  80. package/dist/chunk-KHXEIEXN.js +41 -0
  81. package/dist/chunk-KHXEIEXN.js.map +1 -0
  82. package/dist/chunk-KLPRAQCE.cjs +22 -0
  83. package/dist/chunk-KLPRAQCE.cjs.map +1 -0
  84. package/dist/chunk-KQYPP72K.js +644 -0
  85. package/dist/chunk-KQYPP72K.js.map +1 -0
  86. package/dist/chunk-KUT2Y7JF.cjs +43 -0
  87. package/dist/chunk-KUT2Y7JF.cjs.map +1 -0
  88. package/dist/{chunk-6YTHQ73P.cjs → chunk-LLYZGH3L.cjs} +3 -56
  89. package/dist/chunk-LLYZGH3L.cjs.map +1 -0
  90. package/dist/{chunk-YSHIC4NJ.cjs → chunk-LXTOOUEN.cjs} +159 -154
  91. package/dist/chunk-LXTOOUEN.cjs.map +1 -0
  92. package/dist/{chunk-EVUEIBNU.js → chunk-M4S75AEJ.js} +44 -5
  93. package/dist/chunk-M4S75AEJ.js.map +1 -0
  94. package/dist/{chunk-V5OAXIBN.cjs → chunk-NPR5BGFF.cjs} +11 -11
  95. package/dist/{chunk-V5OAXIBN.cjs.map → chunk-NPR5BGFF.cjs.map} +1 -1
  96. package/dist/{chunk-PLJ7PHWU.cjs → chunk-NS7NVX4E.cjs} +3 -3
  97. package/dist/{chunk-PLJ7PHWU.cjs.map → chunk-NS7NVX4E.cjs.map} +1 -1
  98. package/dist/{chunk-T5I4NRFP.cjs → chunk-NWNAYXC7.cjs} +9 -9
  99. package/dist/{chunk-T5I4NRFP.cjs.map → chunk-NWNAYXC7.cjs.map} +1 -1
  100. package/dist/{chunk-WIZ7Z7FN.js → chunk-Q6N6MZKO.js} +47 -222
  101. package/dist/chunk-Q6N6MZKO.js.map +1 -0
  102. package/dist/{chunk-I2QSDQQV.cjs → chunk-QT3A4PFC.cjs} +21 -2
  103. package/dist/chunk-QT3A4PFC.cjs.map +1 -0
  104. package/dist/{chunk-ZM26YEOT.js → chunk-RY2SODRN.js} +3 -3
  105. package/dist/{chunk-ZM26YEOT.js.map → chunk-RY2SODRN.js.map} +1 -1
  106. package/dist/chunk-SDOEHEJP.js +208 -0
  107. package/dist/chunk-SDOEHEJP.js.map +1 -0
  108. package/dist/{chunk-DETZZBG2.cjs → chunk-SIB6C7P7.cjs} +43 -2
  109. package/dist/chunk-SIB6C7P7.cjs.map +1 -0
  110. package/dist/{chunk-MFY2ZNP6.cjs → chunk-SMN32BQ3.cjs} +4 -4
  111. package/dist/chunk-SMN32BQ3.cjs.map +1 -0
  112. package/dist/chunk-TAWPVD6C.cjs +1956 -0
  113. package/dist/chunk-TAWPVD6C.cjs.map +1 -0
  114. package/dist/chunk-TC25LGIM.js +6584 -0
  115. package/dist/chunk-TC25LGIM.js.map +1 -0
  116. package/dist/{chunk-DAHCRVPM.js → chunk-TL45OJQE.js} +85 -83
  117. package/dist/chunk-TL45OJQE.js.map +1 -0
  118. package/dist/{chunk-AOSUHWIL.js → chunk-TZOQKV64.js} +4 -37
  119. package/dist/chunk-TZOQKV64.js.map +1 -0
  120. package/dist/chunk-UTVY63DG.js +16 -0
  121. package/dist/chunk-UTVY63DG.js.map +1 -0
  122. package/dist/chunk-V4YZXGXR.cjs +6751 -0
  123. package/dist/chunk-V4YZXGXR.cjs.map +1 -0
  124. package/dist/chunk-XRWHFMHK.js +19 -0
  125. package/dist/chunk-XRWHFMHK.js.map +1 -0
  126. package/dist/{chunk-O4YPVYPO.cjs → chunk-YAEXSCUW.cjs} +364 -60
  127. package/dist/chunk-YAEXSCUW.cjs.map +1 -0
  128. package/dist/chunk-YIFCLNII.cjs +18 -0
  129. package/dist/chunk-YIFCLNII.cjs.map +1 -0
  130. package/dist/chunk-Z27QMJ6S.cjs +25 -0
  131. package/dist/chunk-Z27QMJ6S.cjs.map +1 -0
  132. package/dist/{chunk-CSI2B2H5.js → chunk-Z4NQ3TED.js} +4 -4
  133. package/dist/chunk-Z4NQ3TED.js.map +1 -0
  134. package/dist/{chunk-DWZXSPMB.cjs → chunk-ZAVEMQ37.cjs} +3 -3
  135. package/dist/{chunk-DWZXSPMB.cjs.map → chunk-ZAVEMQ37.cjs.map} +1 -1
  136. package/dist/{chunk-DGV7HQA7.js → chunk-ZLEYLCE4.js} +4 -4
  137. package/dist/chunk-ZLEYLCE4.js.map +1 -0
  138. package/dist/chunk-ZNLTEZEF.js +170 -0
  139. package/dist/chunk-ZNLTEZEF.js.map +1 -0
  140. package/dist/chunk-ZO7PJMCO.js +1907 -0
  141. package/dist/chunk-ZO7PJMCO.js.map +1 -0
  142. package/dist/citations/index.cjs +14 -14
  143. package/dist/citations/index.js +2 -2
  144. package/dist/collaboration/index.cjs +36 -36
  145. package/dist/collaboration/index.js +2 -2
  146. package/dist/connect/docx.cjs +23 -28
  147. package/dist/connect/docx.cjs.map +1 -1
  148. package/dist/connect/docx.js +12 -28
  149. package/dist/connect/docx.js.map +1 -1
  150. package/dist/connect/index.cjs +8661 -2823
  151. package/dist/connect/index.cjs.map +1 -1
  152. package/dist/connect/index.d.ts +10 -2
  153. package/dist/connect/index.js +8468 -2671
  154. package/dist/connect/index.js.map +1 -1
  155. package/dist/connect/viewer.cjs +1229 -0
  156. package/dist/connect/viewer.cjs.map +1 -0
  157. package/dist/connect/viewer.d.ts +8 -0
  158. package/dist/connect/viewer.js +1226 -0
  159. package/dist/connect/viewer.js.map +1 -0
  160. package/dist/connection/ConnectedWorkflowsTable.d.ts +2 -12
  161. package/dist/connection/ai.d.ts +2 -9
  162. package/dist/connection/billing/AddAddonDialog.d.ts +24 -0
  163. package/dist/connection/billing/BillingCard.d.ts +18 -0
  164. package/dist/connection/billing/BillingProjectEntity.d.ts +9 -0
  165. package/dist/connection/billing/ChangePlanDialog.d.ts +20 -0
  166. package/dist/connection/billing/ChangeProPlan.d.ts +20 -0
  167. package/dist/connection/billing/CheckoutTotal.d.ts +12 -0
  168. package/dist/connection/billing/DailyCapEditor.d.ts +4 -0
  169. package/dist/connection/billing/InvoicesModal.d.ts +6 -0
  170. package/dist/connection/billing/NewProjectFlow.d.ts +14 -0
  171. package/dist/connection/billing/PlanChangeLines.d.ts +13 -0
  172. package/dist/connection/billing/PlanSelector.d.ts +50 -0
  173. package/dist/connection/billing/ProjectBilling.d.ts +24 -0
  174. package/dist/connection/billing/ProjectDetail.d.ts +16 -0
  175. package/dist/connection/billing/ProjectUsageCard.d.ts +21 -0
  176. package/dist/connection/billing/ProjectUsageContent.d.ts +18 -0
  177. package/dist/connection/billing/ProjectsTable.d.ts +13 -0
  178. package/dist/connection/billing/ReduceAddonDialog.d.ts +18 -0
  179. package/dist/connection/billing/ReferralReward.d.ts +32 -0
  180. package/dist/connection/billing/SharedProjects.d.ts +13 -0
  181. package/dist/connection/billing/StripeCheckoutModal.d.ts +32 -0
  182. package/dist/connection/billing/SubscriptionPlans.d.ts +15 -0
  183. package/dist/connection/billing/SubscriptionStatus.d.ts +10 -0
  184. package/dist/connection/billing/addon-pricing.d.ts +97 -0
  185. package/dist/connection/billing/api-error.d.ts +6 -0
  186. package/dist/connection/billing/billing-country.d.ts +14 -0
  187. package/dist/connection/billing/billing-focus.d.ts +11 -0
  188. package/dist/connection/billing/index.d.ts +22 -0
  189. package/dist/connection/billing/plan-badge.d.ts +15 -0
  190. package/dist/connection/billing/plan-change-outcome.d.ts +15 -0
  191. package/dist/connection/billing/plan-constants.d.ts +29 -0
  192. package/dist/connection/billing/plan-pricing.d.ts +67 -0
  193. package/dist/connection/billing/quota-items.d.ts +33 -0
  194. package/dist/connection/billing/referral-reward.d.ts +28 -0
  195. package/dist/connection/billing/refusal-copy.d.ts +5 -0
  196. package/dist/connection/billing/reward-balance.d.ts +19 -0
  197. package/dist/connection/billing/support.d.ts +35 -0
  198. package/dist/connection/billing/tax-quote.d.ts +36 -0
  199. package/dist/connection/billing/useAddonPurchase.d.ts +32 -0
  200. package/dist/connection/billing/useAutoRefreshPendingProjects.d.ts +11 -0
  201. package/dist/connection/billing/useCheckoutQuote.d.ts +30 -0
  202. package/dist/connection/billing/useOpenBillingPortal.d.ts +12 -0
  203. package/dist/connection/calendar/CalendarSettingsDialog.d.ts +1 -1
  204. package/dist/connection/facts/ConnectedFactsPage.d.ts +50 -0
  205. package/dist/connection/facts/FactMarkdownEditor.d.ts +57 -0
  206. package/dist/connection/facts/FactSourcesPopover.d.ts +38 -0
  207. package/dist/connection/facts/FactTextEditor.d.ts +2 -0
  208. package/dist/connection/facts/factNouns.d.ts +4 -0
  209. package/dist/connection/facts/factPageColumns.d.ts +37 -0
  210. package/dist/connection/facts/types.d.ts +127 -0
  211. package/dist/connection/facts/useFactActions.d.ts +10 -0
  212. package/dist/connection/facts/useFactComposer.d.ts +54 -0
  213. package/dist/connection/facts/useFactFilters.d.ts +101 -0
  214. package/dist/connection/facts/useFactSelection.d.ts +82 -0
  215. package/dist/connection/facts/useFactsGrid.d.ts +87 -0
  216. package/dist/connection/facts/useFactsPageView.d.ts +4 -0
  217. package/dist/connection/mail/ConnectedMailComposer.d.ts +3 -1
  218. package/dist/connection/mail/ConnectedMailbox.d.ts +4 -2
  219. package/dist/connection/mail/MailComposerForm.d.ts +4 -2
  220. package/dist/connection/mail/MailRecipientInput.d.ts +14 -0
  221. package/dist/connection/mail/index.d.ts +1 -1
  222. package/dist/connection/mail/types.d.ts +10 -0
  223. package/dist/connection/search/ConnectedSearchPage.d.ts +64 -0
  224. package/dist/connection/search/SearchResultRows.d.ts +38 -0
  225. package/dist/connection/search/index.d.ts +2 -0
  226. package/dist/connection/tags/ConnectedTagTable.d.ts +108 -0
  227. package/dist/connection/tags/ConnectedTagsPage.d.ts +55 -0
  228. package/dist/connection/tags/DocTagPassages.d.ts +25 -0
  229. package/dist/connection/tags/GlossaryExport.d.ts +7 -0
  230. package/dist/connection/tags/TagCombineFilter.d.ts +14 -0
  231. package/dist/connection/tags/TagPlacement.d.ts +16 -0
  232. package/dist/connection/tags/TagsPageSections.d.ts +36 -0
  233. package/dist/connection/tags/tagCombine.d.ts +55 -0
  234. package/dist/connection/useConnectedWorkNotifications.d.ts +7 -24
  235. package/dist/connection/viewer/ConnectedDocumentToolsProvider.d.ts +11 -0
  236. package/dist/connection/viewer/ConnectedDocumentViewer.d.ts +21 -0
  237. package/dist/connection/viewer/FinaliseTranslationButton.d.ts +15 -0
  238. package/dist/connection/viewer/ViewerPdfPane.d.ts +46 -0
  239. package/dist/connection/viewer/support.d.ts +79 -0
  240. package/dist/connection/viewer/useImageCrop.d.ts +13 -0
  241. package/dist/connection/viewer/useViewedDocument.d.ts +70 -0
  242. package/dist/connection/viewer/useViewerBlobs.d.ts +15 -0
  243. package/dist/connection/viewer/useViewerTabs.d.ts +18 -0
  244. package/dist/connection/viewer/useViewerVersions.d.ts +11 -0
  245. package/dist/connection/workspace-settings/useConnectedWorkspaceSettings.d.ts +6 -0
  246. package/dist/document-tools/index.cjs +59 -652
  247. package/dist/document-tools/index.cjs.map +1 -1
  248. package/dist/document-tools/index.js +2 -641
  249. package/dist/document-tools/index.js.map +1 -1
  250. package/dist/docx/index.cjs +48 -47
  251. package/dist/docx/index.js +4 -3
  252. package/dist/facts/FactsBulkBar.d.ts +6 -3
  253. package/dist/facts/cited-version-ref.d.ts +1 -0
  254. package/dist/facts/index.cjs +206 -1942
  255. package/dist/facts/index.cjs.map +1 -1
  256. package/dist/facts/index.d.ts +1 -0
  257. package/dist/facts/index.js +15 -1897
  258. package/dist/facts/index.js.map +1 -1
  259. package/dist/files/ViewerChrome.d.ts +5 -4
  260. package/dist/files/ViewerControlBar.d.ts +12 -0
  261. package/dist/files/doc-labels.d.ts +35 -0
  262. package/dist/files/grid/FilterButton.d.ts +12 -0
  263. package/dist/files/grid/RowDensityControl.d.ts +18 -0
  264. package/dist/files/grid/row-density.d.ts +27 -0
  265. package/dist/files/index.cjs +779 -7100
  266. package/dist/files/index.cjs.map +1 -1
  267. package/dist/files/index.d.ts +5 -0
  268. package/dist/files/index.js +14 -6919
  269. package/dist/files/index.js.map +1 -1
  270. package/dist/home/index.cjs +2 -2
  271. package/dist/home/index.js +2 -2
  272. package/dist/index.cjs +1041 -1257
  273. package/dist/index.cjs.map +1 -1
  274. package/dist/index.js +24 -357
  275. package/dist/index.js.map +1 -1
  276. package/dist/retrieval/SearchSnippet.d.ts +6 -0
  277. package/dist/retrieval/index.cjs +75 -42
  278. package/dist/retrieval/index.d.ts +2 -0
  279. package/dist/retrieval/index.js +3 -2
  280. package/dist/retrieval/search-results.d.ts +46 -0
  281. package/dist/settings/Billing.d.ts +0 -66
  282. package/dist/settings/SubscriptionParts.d.ts +1 -50
  283. package/dist/settings/index.cjs +170 -218
  284. package/dist/settings/index.d.ts +3 -2
  285. package/dist/settings/index.js +3 -3
  286. package/dist/settings/inverted-index-filter.d.ts +26 -0
  287. package/dist/shell/index.cjs +2 -2
  288. package/dist/shell/index.js +2 -2
  289. package/dist/studio/index.cjs +5 -5
  290. package/dist/studio/index.js +4 -4
  291. package/dist/tags/definitions.d.ts +10 -0
  292. package/dist/tags/index.d.ts +4 -1
  293. package/dist/tags/page/ExtractEntitiesDialog.d.ts +24 -0
  294. package/dist/tags/page/TagPicker.d.ts +16 -0
  295. package/dist/tags/page/tagsPageLabels.d.ts +36 -0
  296. package/dist/workflow-canvas/index.cjs +21 -22
  297. package/dist/workflow-canvas/index.cjs.map +1 -1
  298. package/dist/workflow-canvas/index.js +8 -9
  299. package/dist/workflow-canvas/index.js.map +1 -1
  300. package/node_modules/@arbidocs/coedit/package.json +1 -1
  301. package/package.json +13 -4
  302. package/dist/calendar/access-setup.d.ts +0 -8
  303. package/dist/chunk-2MJWWPHY.js.map +0 -1
  304. package/dist/chunk-3AFWGEDJ.cjs +0 -53
  305. package/dist/chunk-3AFWGEDJ.cjs.map +0 -1
  306. package/dist/chunk-6YTHQ73P.cjs.map +0 -1
  307. package/dist/chunk-7RJTEWYM.js.map +0 -1
  308. package/dist/chunk-AINU3EJ6.cjs.map +0 -1
  309. package/dist/chunk-AOSUHWIL.js.map +0 -1
  310. package/dist/chunk-B3AHCIV5.js.map +0 -1
  311. package/dist/chunk-CSI2B2H5.js.map +0 -1
  312. package/dist/chunk-DAHCRVPM.js.map +0 -1
  313. package/dist/chunk-DETZZBG2.cjs.map +0 -1
  314. package/dist/chunk-DGV7HQA7.js.map +0 -1
  315. package/dist/chunk-EVUEIBNU.js.map +0 -1
  316. package/dist/chunk-H74HEPKT.js.map +0 -1
  317. package/dist/chunk-I2QSDQQV.cjs.map +0 -1
  318. package/dist/chunk-J5CWKFSC.js +0 -170
  319. package/dist/chunk-J5CWKFSC.js.map +0 -1
  320. package/dist/chunk-LTU35TQN.cjs.map +0 -1
  321. package/dist/chunk-MFY2ZNP6.cjs.map +0 -1
  322. package/dist/chunk-MHFF5N65.cjs.map +0 -1
  323. package/dist/chunk-NRFAWUVD.js.map +0 -1
  324. package/dist/chunk-O4YPVYPO.cjs.map +0 -1
  325. package/dist/chunk-ODRHHWHY.cjs.map +0 -1
  326. package/dist/chunk-QI6AIHWP.cjs.map +0 -1
  327. package/dist/chunk-QXMR5YHC.js.map +0 -1
  328. package/dist/chunk-RFXJYIDV.js +0 -50
  329. package/dist/chunk-RFXJYIDV.js.map +0 -1
  330. package/dist/chunk-U37AYUPI.cjs.map +0 -1
  331. package/dist/chunk-WIZ7Z7FN.js.map +0 -1
  332. package/dist/chunk-XVUOMWMD.cjs +0 -177
  333. package/dist/chunk-XVUOMWMD.cjs.map +0 -1
  334. package/dist/chunk-YSHIC4NJ.cjs.map +0 -1
  335. package/dist/connection/ConnectedTagTable.d.ts +0 -32
  336. package/dist/connection/calendar/CopyField.d.ts +0 -9
  337. package/dist/connection/calendar/OpenAccessPanel.d.ts +0 -7
@@ -1,650 +1,71 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
+ var chunkD3WFIFRY_cjs = require('../chunk-D3WFIFRY.cjs');
4
5
  var chunk6MG62I5B_cjs = require('../chunk-6MG62I5B.cjs');
6
+ require('../chunk-UWIILWDI.cjs');
5
7
  var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
6
- var chunkUWIILWDI_cjs = require('../chunk-UWIILWDI.cjs');
7
8
  require('../chunk-ULWRNGGE.cjs');
8
9
  require('../chunk-DES3K4SD.cjs');
9
- var lucideReact = require('lucide-react');
10
- var ui = require('@arbidocs/react/ui');
11
- var jsxRuntime = require('react/jsx-runtime');
12
- var documentTools = require('@arbidocs/react/document-tools');
13
- var react = require('react');
14
10
 
15
- var TOUCH = "pointer-coarse:min-h-11";
16
- function AnnotateButton({ active, onClick, compact }) {
17
- return /* @__PURE__ */ jsxRuntime.jsxs(
18
- ui.Button,
19
- {
20
- type: "button",
21
- variant: active ? "default" : "outline",
22
- size: compact ? "icon" : "sm",
23
- "aria-pressed": active,
24
- title: "Annotate: highlight, comment, stamp, redact",
25
- "aria-label": "Annotate",
26
- "data-testid": "annotate-toggle",
27
- className: TOUCH,
28
- onClick,
29
- children: [
30
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PencilLine, { className: "size-4" }),
31
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: "Annotate" })
32
- ]
33
- }
34
- );
35
- }
36
- function ShowOriginalButton({ active, onClick, compact }) {
37
- return /* @__PURE__ */ jsxRuntime.jsxs(
38
- ui.Button,
39
- {
40
- type: "button",
41
- variant: active ? "default" : "outline",
42
- size: compact ? "icon" : "sm",
43
- "aria-pressed": active,
44
- title: active ? "Show the markup again" : "Show the original, without markup",
45
- "aria-label": "Show original",
46
- "data-testid": "markup-show-original",
47
- className: TOUCH,
48
- onClick,
49
- children: [
50
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "size-4" }),
51
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: "Show original" })
52
- ]
53
- }
54
- );
55
- }
56
- function DownloadMarkupButton({
57
- onClick,
58
- disabledReason
59
- }) {
60
- const button = /* @__PURE__ */ jsxRuntime.jsx(
61
- ui.Button,
62
- {
63
- type: "button",
64
- variant: "outline",
65
- size: "icon",
66
- title: disabledReason ?? "Download with markup: the PDF with its annotations (opens in Acrobat or Preview)",
67
- "aria-label": "Download with markup",
68
- "aria-description": disabledReason,
69
- disabled: !!disabledReason,
70
- "data-testid": "markup-download",
71
- className: TOUCH,
72
- onClick,
73
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "size-4" })
74
- }
75
- );
76
- return disabledReason ? /* @__PURE__ */ jsxRuntime.jsx("span", { title: disabledReason, className: "inline-flex", "data-testid": "markup-download-locked", children: button }) : button;
77
- }
78
- function SignedEditNote() {
79
- return /* @__PURE__ */ jsxRuntime.jsx(
80
- "p",
81
- {
82
- className: "border-b px-3 py-1.5 text-xs text-muted-foreground",
83
- "data-testid": "signed-edit-note",
84
- children: "Editing creates a new unsigned version"
85
- }
86
- );
87
- }
88
- function SignButton({ active, onClick, compact }) {
89
- return /* @__PURE__ */ jsxRuntime.jsxs(
90
- ui.Button,
91
- {
92
- type: "button",
93
- variant: active ? "default" : "outline",
94
- size: compact ? "icon" : "sm",
95
- "aria-pressed": active,
96
- title: "Sign document",
97
- "aria-label": "Sign",
98
- "data-testid": "sign-document-button",
99
- className: TOUCH,
100
- onClick,
101
- children: [
102
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PenLine, { className: "size-4" }),
103
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: "Sign" })
104
- ]
105
- }
106
- );
107
- }
108
- function RequestSignaturesButton({ active, onClick, compact }) {
109
- return /* @__PURE__ */ jsxRuntime.jsxs(
110
- ui.Button,
111
- {
112
- type: "button",
113
- variant: active ? "default" : "outline",
114
- size: compact ? "icon" : "sm",
115
- "aria-pressed": active,
116
- title: "Request signatures",
117
- "aria-label": "Request signatures",
118
- "data-testid": "request-signatures-button",
119
- className: TOUCH,
120
- onClick,
121
- children: [
122
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "size-4" }),
123
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: "Request signatures" })
124
- ]
125
- }
126
- );
127
- }
128
- var BAR = "flex flex-wrap items-center justify-between gap-2 border-b px-3 py-2 text-xs";
129
- var LINK = "font-medium text-primary hover:underline disabled:opacity-50 disabled:no-underline pointer-coarse:min-h-11";
130
- function MarkupNotices({ legacyPrompt, olderNote, onOpenVersion }) {
131
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
132
- legacyPrompt && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: BAR, role: "status", "data-testid": "markup-migration-prompt", children: [
133
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
134
- legacyPrompt.count,
135
- " annotation",
136
- legacyPrompt.count === 1 ? "" : "s",
137
- " on this document",
138
- legacyPrompt.count === 1 ? " is" : " are",
139
- " saved only in this browser. Add",
140
- " ",
141
- legacyPrompt.count === 1 ? "it" : "them",
142
- " to the shared markup, where everyone with access sees ",
143
- legacyPrompt.count === 1 ? "it" : "them",
144
- "?"
145
- ] }),
146
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-3", children: [
147
- /* @__PURE__ */ jsxRuntime.jsx(
148
- "button",
149
- {
150
- type: "button",
151
- className: LINK,
152
- disabled: legacyPrompt.busy,
153
- "data-testid": "markup-migration-add",
154
- onClick: legacyPrompt.add,
155
- children: legacyPrompt.busy ? "Adding\u2026" : "Add to shared markup"
156
- }
157
- ),
158
- /* @__PURE__ */ jsxRuntime.jsx(
159
- "button",
160
- {
161
- type: "button",
162
- className: LINK,
163
- disabled: legacyPrompt.busy,
164
- "data-testid": "markup-migration-discard",
165
- onClick: legacyPrompt.discard,
166
- children: "Discard"
167
- }
168
- )
169
- ] })
170
- ] }),
171
- olderNote && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: BAR, "data-testid": "markup-older-version-note", children: [
172
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
173
- "The markup is on version ",
174
- olderNote.version,
175
- ". This version started without it.",
176
- olderNote.signed && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-testid": "markup-older-version-signed", children: [
177
- " ",
178
- "It is signed: comments copied here are kept beside it, and the signed PDF does not change."
179
- ] })
180
- ] }),
181
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-3", children: [
182
- /* @__PURE__ */ jsxRuntime.jsxs(
183
- "button",
184
- {
185
- type: "button",
186
- className: LINK,
187
- "data-testid": "markup-open-older-version",
188
- onClick: () => onOpenVersion(olderNote.version),
189
- children: [
190
- "Open version ",
191
- olderNote.version
192
- ]
193
- }
194
- ),
195
- /* @__PURE__ */ jsxRuntime.jsx(
196
- "button",
197
- {
198
- type: "button",
199
- className: LINK,
200
- disabled: olderNote.busy,
201
- "data-testid": "markup-copy-open-threads",
202
- title: "Copy the unresolved comment threads onto this version (redactions never carry over)",
203
- onClick: olderNote.copy,
204
- children: olderNote.busy ? "Copying\u2026" : "Copy open comments here"
205
- }
206
- )
207
- ] })
208
- ] })
209
- ] });
210
- }
211
- function MarkupViewNote({ showOriginal, onToggle }) {
212
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkUWIILWDI_cjs.ViewerStatusNote, { testId: "markup-view-note", children: [
213
- showOriginal ? "Original, without markup" : "With markup",
214
- " \xB7 ",
215
- /* @__PURE__ */ jsxRuntime.jsx(
216
- "button",
217
- {
218
- type: "button",
219
- className: "font-medium text-primary hover:underline pointer-coarse:min-h-11",
220
- "data-testid": "markup-view-note-toggle",
221
- onClick: onToggle,
222
- children: showOriginal ? "Show markup" : "Show original"
223
- }
224
- )
225
- ] });
226
- }
227
- function formatSignedAt(iso) {
228
- const date = new Date(iso);
229
- if (Number.isNaN(date.getTime())) return iso;
230
- return date.toLocaleString([], { dateStyle: "medium", timeStyle: "short" });
231
- }
232
- function Row({ label, field, children }) {
233
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[5.5rem_1fr] gap-2", children: [
234
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: label }),
235
- /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "min-w-0 break-words", "data-testid": `signature-detail-${field}`, children })
236
- ] });
237
- }
238
- function SignatureStatus({
239
- status,
240
- formatDate = formatSignedAt,
241
- certificateUrl
242
- }) {
243
- const tools = documentTools.useOptionalDocumentTools();
244
- const hostCertificateUrl = certificateUrl ?? tools?.certificateUrl;
245
- const signatures = status.signatures ?? [];
246
- const isCounterSigned = signatures.length > 1;
247
- return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
248
- /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
249
- "button",
250
- {
251
- type: "button",
252
- className: "flex-shrink-0 text-sm text-muted-foreground underline decoration-dotted underline-offset-4 hover:text-foreground pointer-coarse:min-h-11",
253
- "data-testid": "document-signature-status",
254
- "aria-label": `${status.intact ? "Signed, locked" : "Modified after signing"}: show signature details`,
255
- children: status.intact ? "Signed \u2014 locked" : "Modified after signing"
256
- }
257
- ) }),
258
- /* @__PURE__ */ jsxRuntime.jsxs(
259
- ui.PopoverContent,
260
- {
261
- className: "max-h-[70vh] w-80 overflow-y-auto p-3 text-sm",
262
- align: "start",
263
- "data-testid": "signature-details",
264
- children: [
265
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 font-medium", "data-testid": "signature-details-title", children: isCounterSigned ? `Electronic signatures (${signatures.length})` : "Electronic signature" }),
266
- signatures.map((signature, index) => /* @__PURE__ */ jsxRuntime.jsxs(
267
- "dl",
268
- {
269
- className: `mb-3 space-y-1 ${index > 0 ? "border-t border-border pt-2" : ""}`,
270
- "data-testid": `signature-item-${index}`,
271
- children: [
272
- /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "Signed by", field: "signer", children: signature.signer_name || signature.signer_email }),
273
- /* @__PURE__ */ jsxRuntime.jsx(Row, { label: "On", field: "time", children: formatDate(signature.signed_at) }),
274
- /* @__PURE__ */ jsxRuntime.jsx("dd", { children: /* @__PURE__ */ jsxRuntime.jsx(
275
- "a",
276
- {
277
- href: documentTools.certificateLink(signature, hostCertificateUrl),
278
- target: "_blank",
279
- rel: "noopener noreferrer",
280
- className: "inline-flex items-center font-medium text-primary hover:underline pointer-coarse:min-h-11",
281
- "data-testid": `signature-certificate-link-${index}`,
282
- children: "View certificate"
283
- }
284
- ) })
285
- ]
286
- },
287
- signature.reference
288
- )),
289
- /* @__PURE__ */ jsxRuntime.jsx(
290
- "p",
291
- {
292
- className: `border-t border-border pt-2 ${status.intact ? "" : "text-red-text"}`,
293
- "data-testid": "signature-detail-intact",
294
- children: status.intact ? isCounterSigned ? "\u2713 Unchanged since the last signature" : "\u2713 Unchanged since signing" : "\u2717 Changed after it was signed"
295
- }
296
- ),
297
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", "data-testid": "signature-detail-locked", children: "Locked: only further signatures can be added." })
298
- ]
299
- }
300
- )
301
- ] });
302
- }
303
- function Frame({ children }) {
304
- return /* @__PURE__ */ jsxRuntime.jsxs(
305
- "main",
306
- {
307
- className: "mx-auto w-full max-w-xl px-4 py-10 text-foreground",
308
- "data-testid": "signature-certificate",
309
- children: [
310
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "mb-6 text-xl font-semibold", children: "Signature certificate" }),
311
- children
312
- ]
313
- }
314
- );
315
- }
316
- function copyResult(name, match) {
317
- if (match.kind === "current") return `\u2713 ${name} is the signed document, unchanged.`;
318
- if (match.kind === "earlier") {
319
- return `\u2713 ${name}: this is the version signed by ${match.signature.signer_name || "an ARBI user"}.`;
320
- }
321
- return `\u2717 ${name} is not the signed document: it differs from what was signed.`;
322
- }
323
- function SignatureCertificate({
324
- reference,
325
- verification,
326
- isLoading = false,
327
- error,
328
- isErrorTransient = false,
329
- formatDate = formatSignedAt,
330
- allowCopyCheck = true
331
- }) {
332
- const [copy, setCopy] = react.useState({ state: "idle" });
333
- const [dragging, setDragging] = react.useState(false);
334
- const input = react.useRef(null);
335
- if (isLoading) {
336
- return /* @__PURE__ */ jsxRuntime.jsx(Frame, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", "data-testid": "signature-certificate-loading", children: "Checking the signature\u2026" }) });
337
- }
338
- if (error || !verification) {
339
- return /* @__PURE__ */ jsxRuntime.jsx(Frame, { children: /* @__PURE__ */ jsxRuntime.jsx(
340
- "p",
341
- {
342
- className: isErrorTransient ? "text-muted-foreground" : "text-red-text",
343
- role: isErrorTransient ? "status" : "alert",
344
- "data-testid": "signature-certificate-error",
345
- children: error || "The signature could not be checked."
346
- }
347
- ) });
348
- }
349
- const [first, ...counter] = verification.signatures;
350
- const check = async (file) => {
351
- if (!file) return;
352
- setCopy({ state: "checking", name: file.name });
353
- try {
354
- setCopy({ state: "done", name: file.name, match: await documentTools.matchSignedCopy(file, verification) });
355
- } catch {
356
- setCopy({ state: "failed", name: file.name });
357
- }
358
- };
359
- const onDrop = (e) => {
360
- e.preventDefault();
361
- setDragging(false);
362
- void check(e.dataTransfer.files[0]);
363
- };
364
- return /* @__PURE__ */ jsxRuntime.jsxs(Frame, { children: [
365
- /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-3", children: [
366
- first && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-base", "data-testid": "signature-certificate-signer", children: [
367
- "Signed by ",
368
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: first.signer_name || "an ARBI user" }),
369
- " on",
370
- " ",
371
- formatDate(first.signed_at)
372
- ] }),
373
- counter.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1 text-sm", "data-testid": "signature-certificate-counter", children: counter.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
374
- "Also signed by ",
375
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: s.signer_name || "an ARBI user" }),
376
- " on",
377
- " ",
378
- formatDate(s.signed_at)
379
- ] }, `${s.sha256}-${i}`)) }),
380
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "ARBI checks that this document hasn\u2019t changed since it was signed. If anything changed, this check fails." }),
381
- /* @__PURE__ */ jsxRuntime.jsx(
382
- "p",
383
- {
384
- className: ui.cn(
385
- "rounded-md border px-3 py-2 font-medium",
386
- verification.intact ? "border-green-border bg-green-bg text-green-text" : "border-red-text text-red-text"
387
- ),
388
- role: "status",
389
- "data-testid": "signature-certificate-result",
390
- "data-intact": verification.intact,
391
- children: verification.intact ? "\u2713 Unchanged since signing" : "\u2717 Changed since signing: this is not the document that was signed"
392
- }
393
- )
394
- ] }),
395
- allowCopyCheck && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "mt-8 space-y-2", children: [
396
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-medium", children: "Check your copy" }),
397
- /* @__PURE__ */ jsxRuntime.jsxs(
398
- "div",
399
- {
400
- role: "button",
401
- tabIndex: 0,
402
- className: ui.cn(
403
- "flex min-h-24 cursor-pointer flex-col items-center justify-center rounded-md border border-dashed px-4 py-6 text-center text-sm text-muted-foreground pointer-coarse:min-h-32",
404
- dragging && "border-primary bg-muted"
405
- ),
406
- "data-testid": "signature-certificate-dropzone",
407
- onClick: () => input.current?.click(),
408
- onKeyDown: (e) => {
409
- if (e.key === "Enter" || e.key === " ") {
410
- e.preventDefault();
411
- input.current?.click();
412
- }
413
- },
414
- onDragOver: (e) => {
415
- e.preventDefault();
416
- setDragging(true);
417
- },
418
- onDragLeave: () => setDragging(false),
419
- onDrop,
420
- children: [
421
- "Drop the PDF you were sent here, or choose it",
422
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 text-xs", children: "It is checked in this browser and never uploaded." }),
423
- /* @__PURE__ */ jsxRuntime.jsx(
424
- "input",
425
- {
426
- ref: input,
427
- type: "file",
428
- accept: "application/pdf,.pdf",
429
- className: "sr-only",
430
- "data-testid": "signature-certificate-file-input",
431
- onChange: (e) => void check(e.target.files?.[0])
432
- }
433
- )
434
- ]
435
- }
436
- ),
437
- copy.state !== "idle" && /* @__PURE__ */ jsxRuntime.jsx(
438
- "p",
439
- {
440
- className: ui.cn(
441
- "text-sm",
442
- copy.state === "done" && copy.match.kind !== "none" && "text-green-text",
443
- (copy.state === "done" && copy.match.kind === "none" || copy.state === "failed") && "text-red-text"
444
- ),
445
- role: "status",
446
- "data-testid": "signature-certificate-copy-result",
447
- children: copy.state === "checking" ? `Checking ${copy.name}\u2026` : copy.state === "failed" ? `${copy.name} could not be read.` : copyResult(copy.name, copy.match)
448
- }
449
- )
450
- ] }),
451
- reference && /* @__PURE__ */ jsxRuntime.jsxs(
452
- "p",
453
- {
454
- className: "mt-8 text-xs text-muted-foreground",
455
- "data-testid": "signature-certificate-reference",
456
- children: [
457
- "Reference ",
458
- reference
459
- ]
460
- }
461
- )
462
- ] });
463
- }
464
- var LINK2 = "font-medium text-primary hover:underline pointer-coarse:min-h-11";
465
- var DEFAULT_VERSION_SNAPSHOT_BAR_LABELS = {
466
- title: (number) => `${number ? `Version ${number}` : "Saved version"} \xB7 read only`,
467
- ask: "Ask about this version",
468
- returnToCurrent: "Return to current version",
469
- returnToLive: "Return to live document"
470
- };
471
- function VersionSnapshotBar({
472
- versionNumber,
473
- live = false,
474
- onAsk,
475
- onReturn,
476
- labels: overrides
477
- }) {
478
- const labels = { ...DEFAULT_VERSION_SNAPSHOT_BAR_LABELS, ...overrides };
479
- return /* @__PURE__ */ jsxRuntime.jsxs(
480
- "div",
481
- {
482
- className: "flex items-center justify-between border-b px-3 py-2 text-xs",
483
- "data-testid": "version-snapshot-bar",
484
- children: [
485
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: labels.title(versionNumber) }),
486
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-3", children: [
487
- onAsk && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: LINK2, "data-testid": "version-snapshot-ask", onClick: onAsk, children: labels.ask }),
488
- /* @__PURE__ */ jsxRuntime.jsx(
489
- "button",
490
- {
491
- type: "button",
492
- className: LINK2,
493
- "data-testid": "version-snapshot-return",
494
- onClick: onReturn,
495
- children: live ? labels.returnToLive : labels.returnToCurrent
496
- }
497
- )
498
- ] })
499
- ]
500
- }
501
- );
502
- }
503
- function names(request, status) {
504
- return request.signers.filter((s) => s.status === status).map((s) => s.name || s.email || "");
505
- }
506
- function SignatureRequestBanner({
507
- documentId,
508
- onSign,
509
- onEditDraft,
510
- hidden = false
511
- }) {
512
- const { user, notify } = documentTools.useDocumentTools();
513
- const requests = documentTools.useDocumentSignatureRequests(documentId, !hidden);
514
- const voidRequest = documentTools.useVoidSignatureRequest();
515
- const me = user?.externalId ?? null;
516
- if (hidden || !me || !requests.data) return null;
517
- const open = requests.data.filter((r) => r.status === "sent" || r.status === "draft");
518
- const awaitingMe = open.filter(
519
- (r) => r.status === "sent" && r.signers.some((s) => s.user_ext_id === me && s.status === "pending")
520
- );
521
- const sentByMe = open.filter(
522
- (r) => r.status === "sent" && r.created_by === me && !awaitingMe.includes(r)
523
- );
524
- const drafts = open.filter((r) => r.status === "draft" && r.created_by === me);
525
- if (awaitingMe.length + sentByMe.length + drafts.length === 0) return null;
526
- const doVoid = async (request) => {
527
- try {
528
- await voidRequest.mutateAsync(request.external_id);
529
- notify(request.status === "draft" ? "Draft discarded." : "Signature request voided.", "info");
530
- } catch (err) {
531
- notify(err instanceof Error ? err.message : "Could not void it", "error");
532
- }
533
- };
534
- return /* @__PURE__ */ jsxRuntime.jsxs(
535
- "div",
536
- {
537
- className: "space-y-1.5 border-b border-border px-3 py-2 text-sm",
538
- "data-testid": "signature-request-banner",
539
- children: [
540
- awaitingMe.map((r) => {
541
- const count = r.fields.filter((f) => f.signer === me).length;
542
- const author = r.signers.find((s) => s.user_ext_id === r.created_by)?.name;
543
- return /* @__PURE__ */ jsxRuntime.jsxs(
544
- "div",
545
- {
546
- className: "flex flex-wrap items-center gap-2 rounded-md bg-blue-50 px-2 py-1.5 text-blue-950 dark:bg-blue-950/40 dark:text-blue-100",
547
- "data-testid": "signature-request-awaiting-me",
548
- children: [
549
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PenLine, { className: "size-4 shrink-0", "aria-hidden": true }),
550
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mr-auto", children: [
551
- author && r.created_by !== me ? `${author} asked you to sign` : "You are asked to sign",
552
- " ",
553
- count,
554
- " field",
555
- count === 1 ? "" : "s",
556
- " in this document.",
557
- r.stale && " It has changed since it was sent: ask for it again."
558
- ] }),
559
- /* @__PURE__ */ jsxRuntime.jsx(
560
- ui.Button,
561
- {
562
- type: "button",
563
- size: "sm",
564
- onClick: () => onSign(r),
565
- disabled: r.stale,
566
- "data-testid": "signature-request-start",
567
- children: "Review and sign"
568
- }
569
- )
570
- ]
571
- },
572
- r.external_id
573
- );
574
- }),
575
- sentByMe.map((r) => {
576
- const pending = names(r, "pending");
577
- const signed = r.signers.length - pending.length;
578
- return /* @__PURE__ */ jsxRuntime.jsxs(
579
- "div",
580
- {
581
- className: "flex flex-wrap items-center gap-2",
582
- "data-testid": "signature-request-sent",
583
- children: [
584
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
585
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mr-auto", children: [
586
- "Out for signature: ",
587
- signed,
588
- " of ",
589
- r.signers.length,
590
- " signed",
591
- pending.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
592
- " \xB7 waiting for ",
593
- pending.join(", ")
594
- ] }),
595
- r.stale && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: " \xB7 the document has changed since it was sent" })
596
- ] }),
597
- /* @__PURE__ */ jsxRuntime.jsx(
598
- ui.Button,
599
- {
600
- type: "button",
601
- size: "sm",
602
- variant: "ghost",
603
- onClick: () => doVoid(r),
604
- disabled: voidRequest.isPending,
605
- children: "Void"
606
- }
607
- )
608
- ]
609
- },
610
- r.external_id
611
- );
612
- }),
613
- drafts.map((r) => /* @__PURE__ */ jsxRuntime.jsxs(
614
- "div",
615
- {
616
- className: "flex flex-wrap items-center gap-2",
617
- "data-testid": "signature-request-draft",
618
- children: [
619
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FilePenLine, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
620
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mr-auto", children: [
621
- "Draft signature request: ",
622
- r.fields.length,
623
- " field",
624
- r.fields.length === 1 ? "" : "s",
625
- ", not sent yet."
626
- ] }),
627
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { type: "button", size: "sm", variant: "outline", onClick: () => onEditDraft(r), children: "Continue" }),
628
- /* @__PURE__ */ jsxRuntime.jsx(
629
- ui.Button,
630
- {
631
- type: "button",
632
- size: "sm",
633
- variant: "ghost",
634
- onClick: () => doVoid(r),
635
- disabled: voidRequest.isPending,
636
- children: "Discard"
637
- }
638
- )
639
- ]
640
- },
641
- r.external_id
642
- ))
643
- ]
644
- }
645
- );
646
- }
647
11
 
12
+
13
+ Object.defineProperty(exports, "AnnotateButton", {
14
+ enumerable: true,
15
+ get: function () { return chunkD3WFIFRY_cjs.AnnotateButton; }
16
+ });
17
+ Object.defineProperty(exports, "DEFAULT_VERSION_SNAPSHOT_BAR_LABELS", {
18
+ enumerable: true,
19
+ get: function () { return chunkD3WFIFRY_cjs.DEFAULT_VERSION_SNAPSHOT_BAR_LABELS; }
20
+ });
21
+ Object.defineProperty(exports, "DownloadMarkupButton", {
22
+ enumerable: true,
23
+ get: function () { return chunkD3WFIFRY_cjs.DownloadMarkupButton; }
24
+ });
25
+ Object.defineProperty(exports, "MarkupNotices", {
26
+ enumerable: true,
27
+ get: function () { return chunkD3WFIFRY_cjs.MarkupNotices; }
28
+ });
29
+ Object.defineProperty(exports, "MarkupViewNote", {
30
+ enumerable: true,
31
+ get: function () { return chunkD3WFIFRY_cjs.MarkupViewNote; }
32
+ });
33
+ Object.defineProperty(exports, "RequestSignaturesButton", {
34
+ enumerable: true,
35
+ get: function () { return chunkD3WFIFRY_cjs.RequestSignaturesButton; }
36
+ });
37
+ Object.defineProperty(exports, "ShowOriginalButton", {
38
+ enumerable: true,
39
+ get: function () { return chunkD3WFIFRY_cjs.ShowOriginalButton; }
40
+ });
41
+ Object.defineProperty(exports, "SignButton", {
42
+ enumerable: true,
43
+ get: function () { return chunkD3WFIFRY_cjs.SignButton; }
44
+ });
45
+ Object.defineProperty(exports, "SignatureCertificate", {
46
+ enumerable: true,
47
+ get: function () { return chunkD3WFIFRY_cjs.SignatureCertificate; }
48
+ });
49
+ Object.defineProperty(exports, "SignatureRequestBanner", {
50
+ enumerable: true,
51
+ get: function () { return chunkD3WFIFRY_cjs.SignatureRequestBanner; }
52
+ });
53
+ Object.defineProperty(exports, "SignatureStatus", {
54
+ enumerable: true,
55
+ get: function () { return chunkD3WFIFRY_cjs.SignatureStatus; }
56
+ });
57
+ Object.defineProperty(exports, "SignedEditNote", {
58
+ enumerable: true,
59
+ get: function () { return chunkD3WFIFRY_cjs.SignedEditNote; }
60
+ });
61
+ Object.defineProperty(exports, "VersionSnapshotBar", {
62
+ enumerable: true,
63
+ get: function () { return chunkD3WFIFRY_cjs.VersionSnapshotBar; }
64
+ });
65
+ Object.defineProperty(exports, "formatSignedAt", {
66
+ enumerable: true,
67
+ get: function () { return chunkD3WFIFRY_cjs.formatSignedAt; }
68
+ });
648
69
  Object.defineProperty(exports, "AdoptSignatureDialog", {
649
70
  enumerable: true,
650
71
  get: function () { return chunk6MG62I5B_cjs.AdoptSignatureDialog; }
@@ -657,19 +78,5 @@ Object.defineProperty(exports, "SignDocumentDialog", {
657
78
  enumerable: true,
658
79
  get: function () { return chunkJH6JTI76_cjs.SignDocumentDialog; }
659
80
  });
660
- exports.AnnotateButton = AnnotateButton;
661
- exports.DEFAULT_VERSION_SNAPSHOT_BAR_LABELS = DEFAULT_VERSION_SNAPSHOT_BAR_LABELS;
662
- exports.DownloadMarkupButton = DownloadMarkupButton;
663
- exports.MarkupNotices = MarkupNotices;
664
- exports.MarkupViewNote = MarkupViewNote;
665
- exports.RequestSignaturesButton = RequestSignaturesButton;
666
- exports.ShowOriginalButton = ShowOriginalButton;
667
- exports.SignButton = SignButton;
668
- exports.SignatureCertificate = SignatureCertificate;
669
- exports.SignatureRequestBanner = SignatureRequestBanner;
670
- exports.SignatureStatus = SignatureStatus;
671
- exports.SignedEditNote = SignedEditNote;
672
- exports.VersionSnapshotBar = VersionSnapshotBar;
673
- exports.formatSignedAt = formatSignedAt;
674
81
  //# sourceMappingURL=index.cjs.map
675
82
  //# sourceMappingURL=index.cjs.map