@arbidocs/blocks 0.4.147 → 0.4.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConnectedNativeDocxComparison-OFPIXNJB.js +35 -0
- package/dist/ConnectedNativeDocxComparison-OFPIXNJB.js.map +1 -0
- package/dist/ConnectedNativeDocxComparison-Y5BNLNH6.cjs +44 -0
- package/dist/ConnectedNativeDocxComparison-Y5BNLNH6.cjs.map +1 -0
- package/dist/ConnectedNativeDocxEditor-HTEW5JAH.cjs +46 -0
- package/dist/ConnectedNativeDocxEditor-HTEW5JAH.cjs.map +1 -0
- package/dist/ConnectedNativeDocxEditor-LRYU5HPA.js +33 -0
- package/dist/ConnectedNativeDocxEditor-LRYU5HPA.js.map +1 -0
- package/dist/ConnectedStreamedWordArtifact-QAUVUCSX.js +35 -0
- package/dist/ConnectedStreamedWordArtifact-QAUVUCSX.js.map +1 -0
- package/dist/ConnectedStreamedWordArtifact-QW74LKHN.cjs +44 -0
- package/dist/ConnectedStreamedWordArtifact-QW74LKHN.cjs.map +1 -0
- package/dist/FactTextEditor-YESAU2IJ.js +25 -0
- package/dist/FactTextEditor-YESAU2IJ.js.map +1 -0
- package/dist/FactTextEditor-YUPBCTXK.cjs +27 -0
- package/dist/FactTextEditor-YUPBCTXK.cjs.map +1 -0
- package/dist/{NativeDocxEditor-BE2OEOTJ.cjs → NativeDocxEditor-5VBNM5I7.cjs} +8 -8
- package/dist/{NativeDocxEditor-BE2OEOTJ.cjs.map → NativeDocxEditor-5VBNM5I7.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-KOPFMRYW.js → NativeDocxEditor-XT5ZLFGU.js} +4 -4
- package/dist/{NativeDocxEditor-KOPFMRYW.js.map → NativeDocxEditor-XT5ZLFGU.js.map} +1 -1
- package/dist/agents/index.cjs +263 -264
- package/dist/agents/index.js +6 -7
- package/dist/calendar/index.cjs +117 -125
- package/dist/calendar/index.d.ts +0 -1
- package/dist/calendar/index.js +1 -1
- package/dist/chat/index.cjs +78 -78
- package/dist/chat/index.js +3 -3
- package/dist/{chunk-2FL7QJKJ.js → chunk-265GOG4W.js} +3 -3
- package/dist/{chunk-2FL7QJKJ.js.map → chunk-265GOG4W.js.map} +1 -1
- package/dist/{chunk-LTU35TQN.cjs → chunk-2FLWPM3B.cjs} +636 -31
- package/dist/chunk-2FLWPM3B.cjs.map +1 -0
- package/dist/{chunk-SUUPR735.js → chunk-3PCBYOIZ.js} +4 -4
- package/dist/{chunk-SUUPR735.js.map → chunk-3PCBYOIZ.js.map} +1 -1
- package/dist/{chunk-WIZ7Z7FN.js → chunk-4236BRZK.js} +46 -221
- package/dist/chunk-4236BRZK.js.map +1 -0
- package/dist/{chunk-IL3WB3YX.cjs → chunk-4JNKXOFZ.cjs} +3 -3
- package/dist/{chunk-IL3WB3YX.cjs.map → chunk-4JNKXOFZ.cjs.map} +1 -1
- package/dist/{chunk-ODRHHWHY.cjs → chunk-4KMLM3GY.cjs} +4 -4
- package/dist/chunk-4KMLM3GY.cjs.map +1 -0
- package/dist/chunk-6I6CVX5G.cjs +22 -0
- package/dist/chunk-6I6CVX5G.cjs.map +1 -0
- package/dist/{chunk-MHFF5N65.cjs → chunk-757OYF6G.cjs} +4 -38
- package/dist/chunk-757OYF6G.cjs.map +1 -0
- package/dist/chunk-B3FMUFAW.cjs +1956 -0
- package/dist/chunk-B3FMUFAW.cjs.map +1 -0
- package/dist/{chunk-B3AHCIV5.js → chunk-BJ24VPOA.js} +4 -55
- package/dist/chunk-BJ24VPOA.js.map +1 -0
- package/dist/chunk-C7PTF6BQ.cjs +172 -0
- package/dist/chunk-C7PTF6BQ.cjs.map +1 -0
- package/dist/{chunk-LZRMXJIE.js → chunk-COA3S3CZ.js} +3 -3
- package/dist/{chunk-LZRMXJIE.js.map → chunk-COA3S3CZ.js.map} +1 -1
- package/dist/{chunk-VUR63NMQ.js → chunk-CROTH2BS.js} +6 -6
- package/dist/{chunk-VUR63NMQ.js.map → chunk-CROTH2BS.js.map} +1 -1
- package/dist/{chunk-AO7SK6WP.cjs → chunk-CU2O32Z4.cjs} +31 -31
- package/dist/{chunk-AO7SK6WP.cjs.map → chunk-CU2O32Z4.cjs.map} +1 -1
- package/dist/chunk-D3WFIFRY.cjs +659 -0
- package/dist/chunk-D3WFIFRY.cjs.map +1 -0
- package/dist/{chunk-DAHCRVPM.js → chunk-DB2OXRQC.js} +84 -82
- package/dist/chunk-DB2OXRQC.js.map +1 -0
- package/dist/{chunk-QXMR5YHC.js → chunk-DIB4JYUY.js} +19 -3
- package/dist/chunk-DIB4JYUY.js.map +1 -0
- package/dist/chunk-DVB5ZKOF.js +22 -0
- package/dist/chunk-DVB5ZKOF.js.map +1 -0
- package/dist/chunk-EYJMMGXF.js +19 -0
- package/dist/chunk-EYJMMGXF.js.map +1 -0
- package/dist/chunk-FAXXN7KI.cjs +213 -0
- package/dist/chunk-FAXXN7KI.cjs.map +1 -0
- package/dist/{chunk-2MJWWPHY.js → chunk-G4IYES7G.js} +140 -15
- package/dist/chunk-G4IYES7G.js.map +1 -0
- package/dist/{chunk-T5I4NRFP.cjs → chunk-GFOEWPAP.cjs} +8 -8
- package/dist/{chunk-T5I4NRFP.cjs.map → chunk-GFOEWPAP.cjs.map} +1 -1
- package/dist/{chunk-QI6AIHWP.cjs → chunk-GOWXP5KT.cjs} +145 -14
- package/dist/chunk-GOWXP5KT.cjs.map +1 -0
- package/dist/chunk-HALD6ZB5.cjs +18 -0
- package/dist/chunk-HALD6ZB5.cjs.map +1 -0
- package/dist/chunk-HUJF2XM2.js +6584 -0
- package/dist/chunk-HUJF2XM2.js.map +1 -0
- package/dist/{chunk-NRFAWUVD.js → chunk-JAANWQGB.js} +157 -157
- package/dist/chunk-JAANWQGB.js.map +1 -0
- package/dist/{chunk-7RJTEWYM.js → chunk-JGOST4IL.js} +350 -64
- package/dist/chunk-JGOST4IL.js.map +1 -0
- package/dist/chunk-KHXEIEXN.js +41 -0
- package/dist/chunk-KHXEIEXN.js.map +1 -0
- package/dist/chunk-KQYPP72K.js +644 -0
- package/dist/chunk-KQYPP72K.js.map +1 -0
- package/dist/chunk-KUT2Y7JF.cjs +43 -0
- package/dist/chunk-KUT2Y7JF.cjs.map +1 -0
- package/dist/{chunk-6YTHQ73P.cjs → chunk-LLYZGH3L.cjs} +3 -56
- package/dist/chunk-LLYZGH3L.cjs.map +1 -0
- package/dist/{chunk-YSHIC4NJ.cjs → chunk-LXTOOUEN.cjs} +159 -154
- package/dist/chunk-LXTOOUEN.cjs.map +1 -0
- package/dist/{chunk-EVUEIBNU.js → chunk-M4S75AEJ.js} +44 -5
- package/dist/chunk-M4S75AEJ.js.map +1 -0
- package/dist/{chunk-V5OAXIBN.cjs → chunk-NPR5BGFF.cjs} +11 -11
- package/dist/{chunk-V5OAXIBN.cjs.map → chunk-NPR5BGFF.cjs.map} +1 -1
- package/dist/{chunk-PLJ7PHWU.cjs → chunk-NS7NVX4E.cjs} +3 -3
- package/dist/{chunk-PLJ7PHWU.cjs.map → chunk-NS7NVX4E.cjs.map} +1 -1
- package/dist/{chunk-AINU3EJ6.cjs → chunk-Q4BY2CQQ.cjs} +92 -90
- package/dist/chunk-Q4BY2CQQ.cjs.map +1 -0
- package/dist/chunk-QN47Q4N7.js +16 -0
- package/dist/chunk-QN47Q4N7.js.map +1 -0
- package/dist/{chunk-I2QSDQQV.cjs → chunk-QT3A4PFC.cjs} +21 -2
- package/dist/chunk-QT3A4PFC.cjs.map +1 -0
- package/dist/{chunk-ZM26YEOT.js → chunk-RY2SODRN.js} +3 -3
- package/dist/{chunk-ZM26YEOT.js.map → chunk-RY2SODRN.js.map} +1 -1
- package/dist/chunk-SDOEHEJP.js +208 -0
- package/dist/chunk-SDOEHEJP.js.map +1 -0
- package/dist/{chunk-DETZZBG2.cjs → chunk-SIB6C7P7.cjs} +43 -2
- package/dist/chunk-SIB6C7P7.cjs.map +1 -0
- package/dist/{chunk-MFY2ZNP6.cjs → chunk-SMN32BQ3.cjs} +4 -4
- package/dist/chunk-SMN32BQ3.cjs.map +1 -0
- package/dist/chunk-T74Q3MCZ.cjs +6751 -0
- package/dist/chunk-T74Q3MCZ.cjs.map +1 -0
- package/dist/{chunk-AOSUHWIL.js → chunk-TZOQKV64.js} +4 -37
- package/dist/chunk-TZOQKV64.js.map +1 -0
- package/dist/{chunk-U37AYUPI.cjs → chunk-U6JQ4KMX.cjs} +46 -233
- package/dist/chunk-U6JQ4KMX.cjs.map +1 -0
- package/dist/chunk-WFA2GVZJ.js +16 -0
- package/dist/chunk-WFA2GVZJ.js.map +1 -0
- package/dist/chunk-WU34CHU5.js +1907 -0
- package/dist/chunk-WU34CHU5.js.map +1 -0
- package/dist/{chunk-O4YPVYPO.cjs → chunk-YAEXSCUW.cjs} +364 -60
- package/dist/chunk-YAEXSCUW.cjs.map +1 -0
- package/dist/{chunk-H74HEPKT.js → chunk-YXNNNP57.js} +598 -13
- package/dist/chunk-YXNNNP57.js.map +1 -0
- package/dist/chunk-Z27QMJ6S.cjs +25 -0
- package/dist/chunk-Z27QMJ6S.cjs.map +1 -0
- package/dist/{chunk-CSI2B2H5.js → chunk-Z4NQ3TED.js} +4 -4
- package/dist/chunk-Z4NQ3TED.js.map +1 -0
- package/dist/{chunk-DGV7HQA7.js → chunk-ZLEYLCE4.js} +4 -4
- package/dist/chunk-ZLEYLCE4.js.map +1 -0
- package/dist/chunk-ZNLTEZEF.js +170 -0
- package/dist/chunk-ZNLTEZEF.js.map +1 -0
- package/dist/chunk-ZP6Q3KXU.cjs +18 -0
- package/dist/chunk-ZP6Q3KXU.cjs.map +1 -0
- package/dist/citations/index.cjs +14 -14
- package/dist/citations/index.js +2 -2
- package/dist/collaboration/index.cjs +35 -35
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/docx.cjs +21 -26
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +10 -26
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +8662 -2824
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +10 -2
- package/dist/connect/index.js +8467 -2670
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +2357 -0
- package/dist/connect/viewer.cjs.map +1 -0
- package/dist/connect/viewer.d.ts +8 -0
- package/dist/connect/viewer.js +2350 -0
- package/dist/connect/viewer.js.map +1 -0
- package/dist/connection/ConnectedWorkflowsTable.d.ts +2 -12
- package/dist/connection/ai.d.ts +2 -9
- package/dist/connection/billing/AddAddonDialog.d.ts +24 -0
- package/dist/connection/billing/BillingCard.d.ts +18 -0
- package/dist/connection/billing/BillingProjectEntity.d.ts +9 -0
- package/dist/connection/billing/ChangePlanDialog.d.ts +20 -0
- package/dist/connection/billing/ChangeProPlan.d.ts +20 -0
- package/dist/connection/billing/CheckoutTotal.d.ts +12 -0
- package/dist/connection/billing/DailyCapEditor.d.ts +4 -0
- package/dist/connection/billing/InvoicesModal.d.ts +6 -0
- package/dist/connection/billing/NewProjectFlow.d.ts +14 -0
- package/dist/connection/billing/PlanChangeLines.d.ts +13 -0
- package/dist/connection/billing/PlanSelector.d.ts +50 -0
- package/dist/connection/billing/ProjectBilling.d.ts +24 -0
- package/dist/connection/billing/ProjectDetail.d.ts +16 -0
- package/dist/connection/billing/ProjectUsageCard.d.ts +21 -0
- package/dist/connection/billing/ProjectUsageContent.d.ts +18 -0
- package/dist/connection/billing/ProjectsTable.d.ts +13 -0
- package/dist/connection/billing/ReduceAddonDialog.d.ts +18 -0
- package/dist/connection/billing/ReferralReward.d.ts +32 -0
- package/dist/connection/billing/SharedProjects.d.ts +13 -0
- package/dist/connection/billing/StripeCheckoutModal.d.ts +32 -0
- package/dist/connection/billing/SubscriptionPlans.d.ts +15 -0
- package/dist/connection/billing/SubscriptionStatus.d.ts +10 -0
- package/dist/connection/billing/addon-pricing.d.ts +97 -0
- package/dist/connection/billing/api-error.d.ts +6 -0
- package/dist/connection/billing/billing-country.d.ts +14 -0
- package/dist/connection/billing/billing-focus.d.ts +11 -0
- package/dist/connection/billing/index.d.ts +22 -0
- package/dist/connection/billing/plan-badge.d.ts +15 -0
- package/dist/connection/billing/plan-change-outcome.d.ts +15 -0
- package/dist/connection/billing/plan-constants.d.ts +29 -0
- package/dist/connection/billing/plan-pricing.d.ts +67 -0
- package/dist/connection/billing/quota-items.d.ts +33 -0
- package/dist/connection/billing/referral-reward.d.ts +28 -0
- package/dist/connection/billing/refusal-copy.d.ts +5 -0
- package/dist/connection/billing/reward-balance.d.ts +19 -0
- package/dist/connection/billing/support.d.ts +35 -0
- package/dist/connection/billing/tax-quote.d.ts +36 -0
- package/dist/connection/billing/useAddonPurchase.d.ts +32 -0
- package/dist/connection/billing/useAutoRefreshPendingProjects.d.ts +11 -0
- package/dist/connection/billing/useCheckoutQuote.d.ts +30 -0
- package/dist/connection/billing/useOpenBillingPortal.d.ts +12 -0
- package/dist/connection/calendar/CalendarSettingsDialog.d.ts +1 -1
- package/dist/connection/facts/ConnectedFactsPage.d.ts +50 -0
- package/dist/connection/facts/FactMarkdownEditor.d.ts +57 -0
- package/dist/connection/facts/FactSourcesPopover.d.ts +38 -0
- package/dist/connection/facts/FactTextEditor.d.ts +2 -0
- package/dist/connection/facts/factNouns.d.ts +4 -0
- package/dist/connection/facts/factPageColumns.d.ts +37 -0
- package/dist/connection/facts/types.d.ts +127 -0
- package/dist/connection/facts/useFactActions.d.ts +10 -0
- package/dist/connection/facts/useFactComposer.d.ts +54 -0
- package/dist/connection/facts/useFactFilters.d.ts +101 -0
- package/dist/connection/facts/useFactSelection.d.ts +82 -0
- package/dist/connection/facts/useFactsGrid.d.ts +87 -0
- package/dist/connection/facts/useFactsPageView.d.ts +4 -0
- package/dist/connection/mail/ConnectedMailComposer.d.ts +3 -1
- package/dist/connection/mail/ConnectedMailbox.d.ts +4 -2
- package/dist/connection/mail/MailComposerForm.d.ts +4 -2
- package/dist/connection/mail/MailRecipientInput.d.ts +14 -0
- package/dist/connection/mail/index.d.ts +1 -1
- package/dist/connection/mail/types.d.ts +10 -0
- package/dist/connection/search/ConnectedSearchPage.d.ts +64 -0
- package/dist/connection/search/SearchResultRows.d.ts +38 -0
- package/dist/connection/search/index.d.ts +2 -0
- package/dist/connection/tags/ConnectedTagTable.d.ts +108 -0
- package/dist/connection/tags/ConnectedTagsPage.d.ts +55 -0
- package/dist/connection/tags/DocTagPassages.d.ts +25 -0
- package/dist/connection/tags/GlossaryExport.d.ts +7 -0
- package/dist/connection/tags/TagCombineFilter.d.ts +14 -0
- package/dist/connection/tags/TagPlacement.d.ts +16 -0
- package/dist/connection/tags/TagsPageSections.d.ts +36 -0
- package/dist/connection/tags/tagCombine.d.ts +55 -0
- package/dist/connection/useConnectedWorkNotifications.d.ts +7 -24
- package/dist/connection/viewer/ConnectedDocumentToolsProvider.d.ts +11 -0
- package/dist/connection/viewer/ConnectedDocumentViewer.d.ts +21 -0
- package/dist/connection/viewer/FinaliseTranslationButton.d.ts +15 -0
- package/dist/connection/viewer/ViewerPdfPane.d.ts +46 -0
- package/dist/connection/viewer/parsed/ParsedPassage.d.ts +48 -0
- package/dist/connection/viewer/parsed/ParsedTextView.d.ts +17 -0
- package/dist/connection/viewer/parsed/PassageTagPanel.d.ts +18 -0
- package/dist/connection/viewer/parsed/citation-line.d.ts +17 -0
- package/dist/connection/viewer/parsed/document-tags.d.ts +8 -0
- package/dist/connection/viewer/parsed/useChunkTagging.d.ts +46 -0
- package/dist/connection/viewer/parsed/useCitationSelection.d.ts +27 -0
- package/dist/connection/viewer/parsed/useDocumentLabels.d.ts +38 -0
- package/dist/connection/viewer/parsed/useLazyPages.d.ts +18 -0
- package/dist/connection/viewer/parsed/usePageScrollSync.d.ts +17 -0
- package/dist/connection/viewer/parsed/usePassageCopy.d.ts +25 -0
- package/dist/connection/viewer/support.d.ts +97 -0
- package/dist/connection/viewer/useImageCrop.d.ts +13 -0
- package/dist/connection/viewer/useViewedDocument.d.ts +70 -0
- package/dist/connection/viewer/useViewerBlobs.d.ts +15 -0
- package/dist/connection/viewer/useViewerTabs.d.ts +18 -0
- package/dist/connection/viewer/useViewerVersions.d.ts +11 -0
- package/dist/connection/workspace-settings/useConnectedWorkspaceSettings.d.ts +6 -0
- package/dist/document-tools/index.cjs +59 -652
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +2 -641
- package/dist/document-tools/index.js.map +1 -1
- package/dist/docx/index.cjs +48 -47
- package/dist/docx/index.js +4 -3
- package/dist/facts/FactsBulkBar.d.ts +6 -3
- package/dist/facts/cited-version-ref.d.ts +1 -0
- package/dist/facts/index.cjs +204 -1940
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.d.ts +1 -0
- package/dist/facts/index.js +13 -1895
- package/dist/facts/index.js.map +1 -1
- package/dist/files/TagPassagePanel.d.ts +2 -1
- package/dist/files/ViewerChrome.d.ts +5 -4
- package/dist/files/ViewerControlBar.d.ts +12 -0
- package/dist/files/doc-labels.d.ts +35 -0
- package/dist/files/grid/FilterButton.d.ts +12 -0
- package/dist/files/grid/RowDensityControl.d.ts +18 -0
- package/dist/files/grid/row-density.d.ts +27 -0
- package/dist/files/index.cjs +778 -7099
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.d.ts +5 -0
- package/dist/files/index.js +13 -6918
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +993 -1209
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -355
- package/dist/index.js.map +1 -1
- package/dist/retrieval/SearchSnippet.d.ts +6 -0
- package/dist/retrieval/index.cjs +74 -41
- package/dist/retrieval/index.d.ts +2 -0
- package/dist/retrieval/index.js +2 -1
- package/dist/retrieval/search-results.d.ts +46 -0
- package/dist/settings/Billing.d.ts +0 -66
- package/dist/settings/SubscriptionParts.d.ts +1 -50
- package/dist/settings/index.cjs +166 -214
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +1 -1
- package/dist/settings/inverted-index-filter.d.ts +26 -0
- package/dist/studio/index.cjs +3 -3
- package/dist/studio/index.js +2 -2
- package/dist/tags/definitions.d.ts +10 -0
- package/dist/tags/index.d.ts +4 -1
- package/dist/tags/page/ExtractEntitiesDialog.d.ts +24 -0
- package/dist/tags/page/TagPicker.d.ts +16 -0
- package/dist/tags/page/tagsPageLabels.d.ts +36 -0
- package/dist/workflow-canvas/index.cjs +19 -20
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +6 -7
- package/dist/workflow-canvas/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +13 -4
- package/dist/calendar/access-setup.d.ts +0 -8
- package/dist/chunk-2MJWWPHY.js.map +0 -1
- package/dist/chunk-3AFWGEDJ.cjs +0 -53
- package/dist/chunk-3AFWGEDJ.cjs.map +0 -1
- package/dist/chunk-6YTHQ73P.cjs.map +0 -1
- package/dist/chunk-7RJTEWYM.js.map +0 -1
- package/dist/chunk-AINU3EJ6.cjs.map +0 -1
- package/dist/chunk-AOSUHWIL.js.map +0 -1
- package/dist/chunk-B3AHCIV5.js.map +0 -1
- package/dist/chunk-CSI2B2H5.js.map +0 -1
- package/dist/chunk-DAHCRVPM.js.map +0 -1
- package/dist/chunk-DETZZBG2.cjs.map +0 -1
- package/dist/chunk-DGV7HQA7.js.map +0 -1
- package/dist/chunk-EVUEIBNU.js.map +0 -1
- package/dist/chunk-H74HEPKT.js.map +0 -1
- package/dist/chunk-I2QSDQQV.cjs.map +0 -1
- package/dist/chunk-J5CWKFSC.js +0 -170
- package/dist/chunk-J5CWKFSC.js.map +0 -1
- package/dist/chunk-LTU35TQN.cjs.map +0 -1
- package/dist/chunk-MFY2ZNP6.cjs.map +0 -1
- package/dist/chunk-MHFF5N65.cjs.map +0 -1
- package/dist/chunk-NRFAWUVD.js.map +0 -1
- package/dist/chunk-O4YPVYPO.cjs.map +0 -1
- package/dist/chunk-ODRHHWHY.cjs.map +0 -1
- package/dist/chunk-QI6AIHWP.cjs.map +0 -1
- package/dist/chunk-QXMR5YHC.js.map +0 -1
- package/dist/chunk-RFXJYIDV.js +0 -50
- package/dist/chunk-RFXJYIDV.js.map +0 -1
- package/dist/chunk-U37AYUPI.cjs.map +0 -1
- package/dist/chunk-WIZ7Z7FN.js.map +0 -1
- package/dist/chunk-XVUOMWMD.cjs +0 -177
- package/dist/chunk-XVUOMWMD.cjs.map +0 -1
- package/dist/chunk-YSHIC4NJ.cjs.map +0 -1
- package/dist/connection/ConnectedTagTable.d.ts +0 -32
- package/dist/connection/calendar/CopyField.d.ts +0 -9
- package/dist/connection/calendar/OpenAccessPanel.d.ts +0 -7
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { LabelPickerList } from './chunk-SDOEHEJP.js';
|
|
3
|
+
import { DetailLoading, DetailBody, DetailSection, DetailFields, DetailField, DetailLinkList, DetailLinkItem, DetailEmpty } from './chunk-ZCOVDK2E.js';
|
|
4
|
+
import { page, minuteUtc, cell, paragraph, documentXml, docxPackage, TABLE_DOCUMENT_STYLES, groupDefinitions, compareDefinitions } from './chunk-DIB4JYUY.js';
|
|
5
|
+
import { taskActivityHeadline, DEFAULT_TASK_ACTIVITY_LABELS } from './chunk-3PCBYOIZ.js';
|
|
6
|
+
import { DocumentPicker } from './chunk-KSHKTOY2.js';
|
|
7
|
+
import { ModalHeader } from './chunk-TX2ZICS7.js';
|
|
8
|
+
import { cn, Textarea, Input, Button, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuItem, Checkbox, getEntityLabel, tagKindNouns, tagKindTitle, Popover, PopoverTrigger, PopoverContent, getEntityColor, isImageDocument, getDocumentTitle, Dialog, DialogContent, DialogTitle, DialogDescription } from '@arbidocs/react/ui';
|
|
5
9
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
10
|
+
import { ChevronLeft, ChevronRight, Pencil, BellOff, BellRing, Bell, Activity, ArrowUp, ArrowDown, X, Plus, Loader2, ArrowUpRight, ChevronDown, SlidersHorizontal, Download, FileDown, FileText, Lightbulb, MessagesSquare, Search, Workflow, MessageSquare } from 'lucide-react';
|
|
11
|
+
import { useState, useCallback, useEffect, useMemo } from 'react';
|
|
8
12
|
|
|
9
13
|
function LoadingIndicator({
|
|
10
14
|
message,
|
|
@@ -36,6 +40,101 @@ function LoadingIndicator({
|
|
|
36
40
|
message && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: message })
|
|
37
41
|
] });
|
|
38
42
|
}
|
|
43
|
+
function RowNavigatorControls({
|
|
44
|
+
total,
|
|
45
|
+
currentIndex,
|
|
46
|
+
onGo,
|
|
47
|
+
testId,
|
|
48
|
+
itemLabel = "row",
|
|
49
|
+
keepWhenEmpty = false
|
|
50
|
+
}) {
|
|
51
|
+
if (total === 0 && !keepWhenEmpty) return null;
|
|
52
|
+
return /* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-0.5", "data-testid": `${testId}-nav`, children: [
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
"button",
|
|
55
|
+
{
|
|
56
|
+
type: "button",
|
|
57
|
+
"aria-label": `Previous ${itemLabel}`,
|
|
58
|
+
"data-testid": `${testId}-nav-prev`,
|
|
59
|
+
disabled: total === 0 || currentIndex === null || currentIndex <= 0,
|
|
60
|
+
onClick: () => onGo((currentIndex ?? 0) - 1),
|
|
61
|
+
className: "rounded p-0.5 text-muted-foreground enabled:hover:bg-accent enabled:hover:text-foreground disabled:opacity-30 pointer-coarse:size-11! shrink-0",
|
|
62
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsxs(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: "whitespace-nowrap tabular-nums text-sm font-light text-muted-foreground",
|
|
69
|
+
"data-testid": `${testId}-nav-position`,
|
|
70
|
+
children: [
|
|
71
|
+
currentIndex !== null ? currentIndex + 1 : "\u2013",
|
|
72
|
+
" / ",
|
|
73
|
+
total > 0 ? total : "\u2013"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
type: "button",
|
|
81
|
+
"aria-label": `Next ${itemLabel}`,
|
|
82
|
+
"data-testid": `${testId}-nav-next`,
|
|
83
|
+
disabled: total === 0 || currentIndex !== null && currentIndex >= total - 1,
|
|
84
|
+
onClick: () => onGo(currentIndex === null ? 0 : currentIndex + 1),
|
|
85
|
+
className: "rounded p-0.5 text-muted-foreground enabled:hover:bg-accent enabled:hover:text-foreground disabled:opacity-30 pointer-coarse:size-11! shrink-0",
|
|
86
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
] });
|
|
90
|
+
}
|
|
91
|
+
var ROW_MODEL_EVENTS = ["modelUpdated", "sortChanged", "filterChanged", "rowDataUpdated"];
|
|
92
|
+
function GridRowNavigator({
|
|
93
|
+
gridApi,
|
|
94
|
+
selectedId,
|
|
95
|
+
onSelect,
|
|
96
|
+
testId,
|
|
97
|
+
itemLabel = "row"
|
|
98
|
+
}) {
|
|
99
|
+
const [{ total, currentIndex }, setPosition] = useState({ total: 0, currentIndex: null });
|
|
100
|
+
const readPosition = useCallback(() => {
|
|
101
|
+
if (!gridApi || gridApi.isDestroyed()) {
|
|
102
|
+
setPosition({ total: 0, currentIndex: null });
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const total2 = gridApi.getDisplayedRowCount();
|
|
106
|
+
const node = selectedId ? gridApi.getRowNode(selectedId) : void 0;
|
|
107
|
+
const index = node?.rowIndex;
|
|
108
|
+
setPosition({ total: total2, currentIndex: typeof index === "number" && index >= 0 ? index : null });
|
|
109
|
+
}, [gridApi, selectedId]);
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
readPosition();
|
|
112
|
+
if (!gridApi || gridApi.isDestroyed()) return;
|
|
113
|
+
for (const ev of ROW_MODEL_EVENTS) gridApi.addEventListener(ev, readPosition);
|
|
114
|
+
return () => {
|
|
115
|
+
if (gridApi.isDestroyed()) return;
|
|
116
|
+
for (const ev of ROW_MODEL_EVENTS) gridApi.removeEventListener(ev, readPosition);
|
|
117
|
+
};
|
|
118
|
+
}, [gridApi, readPosition]);
|
|
119
|
+
const goTo = (index) => {
|
|
120
|
+
if (!gridApi || gridApi.isDestroyed()) return;
|
|
121
|
+
const clamped = Math.max(0, Math.min(total - 1, index));
|
|
122
|
+
const node = gridApi.getDisplayedRowAtIndex(clamped);
|
|
123
|
+
if (!node?.data) return;
|
|
124
|
+
gridApi.ensureIndexVisible(clamped, "middle");
|
|
125
|
+
onSelect(node.data);
|
|
126
|
+
};
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
RowNavigatorControls,
|
|
129
|
+
{
|
|
130
|
+
total,
|
|
131
|
+
currentIndex,
|
|
132
|
+
onGo: goTo,
|
|
133
|
+
testId,
|
|
134
|
+
itemLabel
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
39
138
|
var IDENTITY_NAME_MAX_LENGTH = 50;
|
|
40
139
|
var COUNTER_THRESHOLD = 10;
|
|
41
140
|
function EntityIdentityBar({
|
|
@@ -290,7 +389,7 @@ function WorkspaceActivityList({
|
|
|
290
389
|
/* @__PURE__ */ jsx("ul", { className: "divide-y divide-border", "data-testid": `${testId}-list`, children: items.map((item) => {
|
|
291
390
|
const target = workspaceActivityTarget(item);
|
|
292
391
|
const actor = item.actor_ext_id ? nameOf?.(item.actor_ext_id) ?? null : l.system;
|
|
293
|
-
const
|
|
392
|
+
const body2 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
294
393
|
/* @__PURE__ */ jsx("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: ICONS[item.source] }),
|
|
295
394
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 text-sm", children: [
|
|
296
395
|
actor && /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
|
|
@@ -319,9 +418,9 @@ function WorkspaceActivityList({
|
|
|
319
418
|
type: "button",
|
|
320
419
|
className: "flex w-full items-start gap-3 px-3 py-2 text-left hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",
|
|
321
420
|
onClick: () => onOpen(target, item),
|
|
322
|
-
children:
|
|
421
|
+
children: body2
|
|
323
422
|
}
|
|
324
|
-
) : /* @__PURE__ */ jsx("div", { className: "flex items-start gap-3 px-3 py-2", children:
|
|
423
|
+
) : /* @__PURE__ */ jsx("div", { className: "flex items-start gap-3 px-3 py-2", children: body2 })
|
|
325
424
|
},
|
|
326
425
|
item.external_id
|
|
327
426
|
);
|
|
@@ -1282,6 +1381,158 @@ function TagTable({
|
|
|
1282
1381
|
] })
|
|
1283
1382
|
] });
|
|
1284
1383
|
}
|
|
1384
|
+
var DEFAULT_TAG_DETAIL_LABELS = {
|
|
1385
|
+
fields: "Fields",
|
|
1386
|
+
documents: "Documents",
|
|
1387
|
+
facts: "Facts",
|
|
1388
|
+
threads: "Threads",
|
|
1389
|
+
showing: "Showing {shown} of {count}",
|
|
1390
|
+
noDocuments: "No document carries this tag yet.",
|
|
1391
|
+
noFacts: "No fact carries this tag yet.",
|
|
1392
|
+
noValue: "No note",
|
|
1393
|
+
noThreads: "No thread carries this tag yet.",
|
|
1394
|
+
untitledThread: "Untitled thread",
|
|
1395
|
+
threadUpdated: "Updated {date}",
|
|
1396
|
+
passages: "{count} passages",
|
|
1397
|
+
passage: "1 passage",
|
|
1398
|
+
loading: "Loading\u2026"
|
|
1399
|
+
};
|
|
1400
|
+
var formatDay = (iso) => {
|
|
1401
|
+
const at = new Date(iso);
|
|
1402
|
+
return Number.isNaN(at.getTime()) ? iso : at.toLocaleDateString(void 0, { day: "numeric", month: "short", year: "numeric" });
|
|
1403
|
+
};
|
|
1404
|
+
function TagDetail({
|
|
1405
|
+
row,
|
|
1406
|
+
fields = [],
|
|
1407
|
+
isLoading,
|
|
1408
|
+
people,
|
|
1409
|
+
tags,
|
|
1410
|
+
onOpenTag,
|
|
1411
|
+
onChangeValue,
|
|
1412
|
+
onOpenDocument,
|
|
1413
|
+
onOpenFact,
|
|
1414
|
+
onOpenThread,
|
|
1415
|
+
noteLabel,
|
|
1416
|
+
noteIsValue = false,
|
|
1417
|
+
renderPassages,
|
|
1418
|
+
labels,
|
|
1419
|
+
fieldLabels,
|
|
1420
|
+
className,
|
|
1421
|
+
testId = "tag-detail"
|
|
1422
|
+
}) {
|
|
1423
|
+
const l = { ...DEFAULT_TAG_DETAIL_LABELS, ...labels };
|
|
1424
|
+
const cellLabels = { ...DEFAULT_TAG_TABLE_LABELS, ...fieldLabels };
|
|
1425
|
+
if (isLoading || !row) return /* @__PURE__ */ jsx(DetailLoading, { label: l.loading });
|
|
1426
|
+
const links = rowLinks(row);
|
|
1427
|
+
const docs = links.docs ?? [];
|
|
1428
|
+
const facts = links.facts ?? [];
|
|
1429
|
+
const threads = links.threads ?? [];
|
|
1430
|
+
const passages = (n) => n === 1 ? l.passage : l.passages.replace("{count}", String(n));
|
|
1431
|
+
return /* @__PURE__ */ jsxs(DetailBody, { className, testId, children: [
|
|
1432
|
+
fields.length > 0 && /* @__PURE__ */ jsx(DetailSection, { title: l.fields, testId: `${testId}-fields`, children: /* @__PURE__ */ jsx(DetailFields, { children: fields.map((field) => /* @__PURE__ */ jsx(DetailField, { label: field.name, children: /* @__PURE__ */ jsx(
|
|
1433
|
+
TagTableCell,
|
|
1434
|
+
{
|
|
1435
|
+
row,
|
|
1436
|
+
column: field,
|
|
1437
|
+
people,
|
|
1438
|
+
tags,
|
|
1439
|
+
onOpenTag,
|
|
1440
|
+
onChange: onChangeValue,
|
|
1441
|
+
l: cellLabels,
|
|
1442
|
+
testId: `${testId}-field-${field.id}`
|
|
1443
|
+
}
|
|
1444
|
+
) }, field.id)) }) }),
|
|
1445
|
+
/* @__PURE__ */ jsx(
|
|
1446
|
+
DetailSection,
|
|
1447
|
+
{
|
|
1448
|
+
title: l.documents,
|
|
1449
|
+
count: links.doc_count,
|
|
1450
|
+
shown: docs.length,
|
|
1451
|
+
showingLabel: l.showing,
|
|
1452
|
+
testId: `${testId}-documents`,
|
|
1453
|
+
children: docs.length ? /* @__PURE__ */ jsx(DetailLinkList, { children: docs.map((d) => /* @__PURE__ */ jsx(
|
|
1454
|
+
DetailLinkItem,
|
|
1455
|
+
{
|
|
1456
|
+
icon: /* @__PURE__ */ jsx(FileText, { className: "size-4" }),
|
|
1457
|
+
onClick: onOpenDocument ? () => onOpenDocument(d.doc_ext_id) : void 0,
|
|
1458
|
+
testId: `${testId}-doc-${d.doc_ext_id}`,
|
|
1459
|
+
trailing: d.citations_count > 0 && !renderPassages && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: passages(d.citations_count) }),
|
|
1460
|
+
after: d.citations_count > 0 && renderPassages && /* @__PURE__ */ jsx("span", { className: "shrink-0 px-3 py-2 text-xs", children: renderPassages(d, passages(d.citations_count)) }),
|
|
1461
|
+
children: /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1462
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate font-medium", children: d.file_name }),
|
|
1463
|
+
(d.note || noteIsValue) && /* @__PURE__ */ jsxs(
|
|
1464
|
+
"span",
|
|
1465
|
+
{
|
|
1466
|
+
className: cn(
|
|
1467
|
+
"mt-0.5 flex min-w-0 items-baseline gap-2",
|
|
1468
|
+
noteIsValue ? "text-base text-foreground" : "text-muted-foreground"
|
|
1469
|
+
),
|
|
1470
|
+
"data-testid": `${testId}-doc-${d.doc_ext_id}-note`,
|
|
1471
|
+
children: [
|
|
1472
|
+
noteLabel && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: noteLabel }),
|
|
1473
|
+
/* @__PURE__ */ jsx(
|
|
1474
|
+
"span",
|
|
1475
|
+
{
|
|
1476
|
+
className: cn(
|
|
1477
|
+
"line-clamp-3 min-w-0 whitespace-pre-line",
|
|
1478
|
+
noteIsValue && "font-semibold",
|
|
1479
|
+
!d.note && "font-normal italic text-muted-foreground"
|
|
1480
|
+
),
|
|
1481
|
+
children: d.note || l.noValue
|
|
1482
|
+
}
|
|
1483
|
+
)
|
|
1484
|
+
]
|
|
1485
|
+
}
|
|
1486
|
+
)
|
|
1487
|
+
] })
|
|
1488
|
+
},
|
|
1489
|
+
d.doc_ext_id
|
|
1490
|
+
)) }) : /* @__PURE__ */ jsx(DetailEmpty, { children: l.noDocuments })
|
|
1491
|
+
}
|
|
1492
|
+
),
|
|
1493
|
+
/* @__PURE__ */ jsx(
|
|
1494
|
+
DetailSection,
|
|
1495
|
+
{
|
|
1496
|
+
title: l.facts,
|
|
1497
|
+
count: links.fact_count,
|
|
1498
|
+
shown: facts.length,
|
|
1499
|
+
showingLabel: l.showing,
|
|
1500
|
+
testId: `${testId}-facts`,
|
|
1501
|
+
children: facts.length ? /* @__PURE__ */ jsx(DetailLinkList, { children: facts.map((f) => /* @__PURE__ */ jsx(
|
|
1502
|
+
DetailLinkItem,
|
|
1503
|
+
{
|
|
1504
|
+
icon: /* @__PURE__ */ jsx(Lightbulb, { className: "size-4" }),
|
|
1505
|
+
onClick: onOpenFact ? () => onOpenFact(f.fact_ext_id) : void 0,
|
|
1506
|
+
testId: `${testId}-fact-${f.fact_ext_id}`,
|
|
1507
|
+
children: /* @__PURE__ */ jsx("span", { className: "line-clamp-3 min-w-0 flex-1", children: f.text })
|
|
1508
|
+
},
|
|
1509
|
+
f.fact_ext_id
|
|
1510
|
+
)) }) : /* @__PURE__ */ jsx(DetailEmpty, { children: l.noFacts })
|
|
1511
|
+
}
|
|
1512
|
+
),
|
|
1513
|
+
/* @__PURE__ */ jsx(
|
|
1514
|
+
DetailSection,
|
|
1515
|
+
{
|
|
1516
|
+
title: l.threads,
|
|
1517
|
+
count: links.thread_count,
|
|
1518
|
+
shown: threads.length,
|
|
1519
|
+
showingLabel: l.showing,
|
|
1520
|
+
testId: `${testId}-threads`,
|
|
1521
|
+
children: threads.length ? /* @__PURE__ */ jsx(DetailLinkList, { children: threads.map((t) => /* @__PURE__ */ jsx(
|
|
1522
|
+
DetailLinkItem,
|
|
1523
|
+
{
|
|
1524
|
+
icon: /* @__PURE__ */ jsx(MessagesSquare, { className: "size-4" }),
|
|
1525
|
+
onClick: onOpenThread ? () => onOpenThread(t.conversation_ext_id) : void 0,
|
|
1526
|
+
testId: `${testId}-thread-${t.conversation_ext_id}`,
|
|
1527
|
+
trailing: /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: l.threadUpdated.replace("{date}", formatDay(t.updated_at)) }),
|
|
1528
|
+
children: /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-medium", children: t.title || l.untitledThread })
|
|
1529
|
+
},
|
|
1530
|
+
t.conversation_ext_id
|
|
1531
|
+
)) }) : /* @__PURE__ */ jsx(DetailEmpty, { children: l.noThreads })
|
|
1532
|
+
}
|
|
1533
|
+
)
|
|
1534
|
+
] });
|
|
1535
|
+
}
|
|
1285
1536
|
|
|
1286
1537
|
// src/tags/tagTableDocx.ts
|
|
1287
1538
|
var TAG_TABLE_DOCX_LANDSCAPE_AFTER = 6;
|
|
@@ -1360,7 +1611,7 @@ function tagTableDocumentXml(table, options) {
|
|
|
1360
1611
|
const header = `<w:tr><w:trPr><w:tblHeader/><w:cantSplit/></w:trPr>${heads.map(
|
|
1361
1612
|
(h, i) => cell([paragraph([{ text: h, bold: true }], "TagTableCell")], widths[i], "E7E6E6")
|
|
1362
1613
|
).join("")}</w:tr>`;
|
|
1363
|
-
const
|
|
1614
|
+
const body2 = rows.map((row) => {
|
|
1364
1615
|
const fill = isGap(row) ? "FFF2CC" : void 0;
|
|
1365
1616
|
const cells = [
|
|
1366
1617
|
cell([paragraph([{ text: row.name, bold: true }], "TagTableCell")], widths[0], fill),
|
|
@@ -1373,7 +1624,7 @@ function tagTableDocumentXml(table, options) {
|
|
|
1373
1624
|
];
|
|
1374
1625
|
return `<w:tr><w:trPr><w:cantSplit/></w:trPr>${cells.join("")}</w:tr>`;
|
|
1375
1626
|
});
|
|
1376
|
-
const grid = `<w:tbl><w:tblPr><w:tblStyle w:val="TagTableGrid"/><w:tblW w:w="${textWidth}" w:type="dxa"/><w:tblLayout w:type="fixed"/><w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/></w:tblPr><w:tblGrid>${widths.map((w) => `<w:gridCol w:w="${w}"/>`).join("")}</w:tblGrid>${header}${
|
|
1627
|
+
const grid = `<w:tbl><w:tblPr><w:tblStyle w:val="TagTableGrid"/><w:tblW w:w="${textWidth}" w:type="dxa"/><w:tblLayout w:type="fixed"/><w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/></w:tblPr><w:tblGrid>${widths.map((w) => `<w:gridCol w:w="${w}"/>`).join("")}</w:tblGrid>${header}${body2.join("")}</w:tbl>`;
|
|
1377
1628
|
return documentXml(
|
|
1378
1629
|
`${paragraph(
|
|
1379
1630
|
[{ text: options.title }],
|
|
@@ -1391,6 +1642,340 @@ function tagTableDocx(table, options) {
|
|
|
1391
1642
|
});
|
|
1392
1643
|
}
|
|
1393
1644
|
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1645
|
+
// src/tags/glossary.ts
|
|
1646
|
+
var DEFAULT_GLOSSARY_LABELS = {
|
|
1647
|
+
term: "Term",
|
|
1648
|
+
definition: "Definition",
|
|
1649
|
+
source: "Source",
|
|
1650
|
+
takenAt: "Printed {at}",
|
|
1651
|
+
empty: "No definitions."
|
|
1652
|
+
};
|
|
1653
|
+
var body = (rest) => rest.replace(/^\s*[:—–-]\s*/, "").trim();
|
|
1654
|
+
function glossaryEntries(sources, options = {}) {
|
|
1655
|
+
const { groups, unparsed } = groupDefinitions(sources, options);
|
|
1656
|
+
return [
|
|
1657
|
+
...groups.flatMap(
|
|
1658
|
+
(g) => g.definitions.map((d) => ({
|
|
1659
|
+
term: d.term,
|
|
1660
|
+
definition: body(d.rest),
|
|
1661
|
+
source: d.source ?? "",
|
|
1662
|
+
factId: d.id
|
|
1663
|
+
}))
|
|
1664
|
+
),
|
|
1665
|
+
...[...unparsed].sort(compareDefinitions).map((d) => ({
|
|
1666
|
+
term: "",
|
|
1667
|
+
definition: d.text.trim(),
|
|
1668
|
+
source: d.source ?? "",
|
|
1669
|
+
factId: d.id
|
|
1670
|
+
}))
|
|
1671
|
+
];
|
|
1672
|
+
}
|
|
1673
|
+
var escapeCell2 = (text) => text.replace(/\|/g, "\\|").replace(/\n+/g, " ");
|
|
1674
|
+
function glossaryMarkdown(entries, options) {
|
|
1675
|
+
const l = { ...DEFAULT_GLOSSARY_LABELS, ...options.labels };
|
|
1676
|
+
const at = minuteUtc(options.at ?? (/* @__PURE__ */ new Date()).toISOString());
|
|
1677
|
+
const lines = [
|
|
1678
|
+
`# ${options.title}`,
|
|
1679
|
+
"",
|
|
1680
|
+
`_${l.takenAt.replace("{at}", `${at} UTC`)}_`,
|
|
1681
|
+
"",
|
|
1682
|
+
`| ${l.term} | ${l.definition} | ${l.source} |`,
|
|
1683
|
+
"| --- | --- | --- |",
|
|
1684
|
+
...entries.map(
|
|
1685
|
+
(e) => `| ${e.term ? `**${escapeCell2(e.term)}**` : ""} | ${escapeCell2(e.definition)} | ${escapeCell2(e.source)} |`
|
|
1686
|
+
)
|
|
1687
|
+
];
|
|
1688
|
+
if (!entries.length) lines.push("", l.empty);
|
|
1689
|
+
return `${lines.join("\n")}
|
|
1690
|
+
`;
|
|
1691
|
+
}
|
|
1692
|
+
function glossaryDocumentXml(entries, options) {
|
|
1693
|
+
const l = { ...DEFAULT_GLOSSARY_LABELS, ...options.labels };
|
|
1694
|
+
const { textWidth, sectPr } = page(false);
|
|
1695
|
+
const widths = [2, 6, 2].map((w) => Math.floor(textWidth * w / 10));
|
|
1696
|
+
const at = minuteUtc(options.at ?? (/* @__PURE__ */ new Date()).toISOString());
|
|
1697
|
+
const text = (t, bold = false) => [paragraph([{ text: t, bold }], "TagTableCell")];
|
|
1698
|
+
const header = `<w:tr><w:trPr><w:tblHeader/><w:cantSplit/></w:trPr>${[
|
|
1699
|
+
l.term,
|
|
1700
|
+
l.definition,
|
|
1701
|
+
l.source
|
|
1702
|
+
].map((h, i) => cell(text(h, true), widths[i], "E7E6E6")).join("")}</w:tr>`;
|
|
1703
|
+
const rows = entries.map(
|
|
1704
|
+
(e) => `<w:tr><w:trPr><w:cantSplit/></w:trPr>${cell(e.term ? text(e.term, true) : [], widths[0])}${cell(
|
|
1705
|
+
text(e.definition),
|
|
1706
|
+
widths[1]
|
|
1707
|
+
)}${cell(e.source ? text(e.source) : [], widths[2])}</w:tr>`
|
|
1708
|
+
);
|
|
1709
|
+
const table = `<w:tbl><w:tblPr><w:tblStyle w:val="TagTableGrid"/><w:tblW w:w="${textWidth}" w:type="dxa"/><w:tblLayout w:type="fixed"/><w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/></w:tblPr><w:tblGrid>${widths.map((w) => `<w:gridCol w:w="${w}"/>`).join("")}</w:tblGrid>${header}${rows.join("")}</w:tbl>`;
|
|
1710
|
+
return documentXml(
|
|
1711
|
+
`${paragraph([{ text: options.title }], "Title")}${paragraph([
|
|
1712
|
+
{ text: l.takenAt.replace("{at}", `${at} UTC`), muted: true }
|
|
1713
|
+
])}${table}${entries.length ? "" : paragraph([{ text: l.empty, muted: true }])}<w:p/>${sectPr}`
|
|
1714
|
+
);
|
|
1715
|
+
}
|
|
1716
|
+
function glossaryDocx(entries, options) {
|
|
1717
|
+
const at = new Date(options.at ?? Date.now()).toISOString();
|
|
1718
|
+
return docxPackage({
|
|
1719
|
+
document: glossaryDocumentXml(entries, { ...options, at }),
|
|
1720
|
+
styles: TABLE_DOCUMENT_STYLES,
|
|
1721
|
+
title: options.title,
|
|
1722
|
+
at
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
function glossaryFileName(title, extension) {
|
|
1726
|
+
return `${title.replace(/[\\/:*?"<>|]+/g, " ").trim() || "Glossary"}.${extension}`;
|
|
1727
|
+
}
|
|
1728
|
+
var lower = (text) => text.toLowerCase();
|
|
1729
|
+
function tagsPageNouns() {
|
|
1730
|
+
return {
|
|
1731
|
+
// ANY_TAG, not TAG: TAG is the Files page's "Field" (a document column).
|
|
1732
|
+
tag: getEntityLabel("ANY_TAG"),
|
|
1733
|
+
tags: getEntityLabel("ANY_TAG", "PLURAL"),
|
|
1734
|
+
document: getEntityLabel("DOCUMENT"),
|
|
1735
|
+
documents: getEntityLabel("DOCUMENT", "PLURAL"),
|
|
1736
|
+
fact: getEntityLabel("FACT"),
|
|
1737
|
+
facts: getEntityLabel("FACT", "PLURAL"),
|
|
1738
|
+
thread: getEntityLabel("CONVERSATION"),
|
|
1739
|
+
threads: getEntityLabel("CONVERSATION", "PLURAL"),
|
|
1740
|
+
people: getEntityLabel("PERSON", "PLURAL"),
|
|
1741
|
+
organisations: getEntityLabel("ORGANISATION", "PLURAL")
|
|
1742
|
+
};
|
|
1743
|
+
}
|
|
1744
|
+
function entitiesPhrase() {
|
|
1745
|
+
const n = tagsPageNouns();
|
|
1746
|
+
return `${n.people} and ${lower(n.organisations)}`;
|
|
1747
|
+
}
|
|
1748
|
+
function documentCount(count2) {
|
|
1749
|
+
const n = tagsPageNouns();
|
|
1750
|
+
return `${count2} ${lower(count2 === 1 ? n.document : n.documents)}`;
|
|
1751
|
+
}
|
|
1752
|
+
function tagTableLabels(kind) {
|
|
1753
|
+
const n = tagsPageNouns();
|
|
1754
|
+
const k = tagKindNouns(kind);
|
|
1755
|
+
return {
|
|
1756
|
+
row: tagKindTitle(kind),
|
|
1757
|
+
evidence: "Tagged items",
|
|
1758
|
+
documents: `{count} ${lower(n.documents)}`,
|
|
1759
|
+
document: `1 ${lower(n.document)}`,
|
|
1760
|
+
facts: `{count} ${lower(n.facts)}`,
|
|
1761
|
+
fact: `1 ${lower(n.fact)}`,
|
|
1762
|
+
threads: `{count} ${lower(n.threads)}`,
|
|
1763
|
+
thread: `1 ${lower(n.thread)}`,
|
|
1764
|
+
untitledThread: `Untitled ${lower(n.thread)}`,
|
|
1765
|
+
empty: `No ${k.plural} yet.`,
|
|
1766
|
+
noColumns: "No fields yet."
|
|
1767
|
+
};
|
|
1768
|
+
}
|
|
1769
|
+
function tagDetailLabels() {
|
|
1770
|
+
const n = tagsPageNouns();
|
|
1771
|
+
const carries = (noun) => `No ${lower(noun)} carries this ${lower(n.tag)} yet.`;
|
|
1772
|
+
return {
|
|
1773
|
+
documents: n.documents,
|
|
1774
|
+
facts: n.facts,
|
|
1775
|
+
threads: n.threads,
|
|
1776
|
+
noDocuments: carries(n.document),
|
|
1777
|
+
noFacts: carries(n.fact),
|
|
1778
|
+
noThreads: carries(n.thread),
|
|
1779
|
+
untitledThread: `Untitled ${lower(n.thread)}`
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1782
|
+
function tagNoteLabel(kind) {
|
|
1783
|
+
return kind === "label" || kind === "search" ? void 0 : "Note";
|
|
1784
|
+
}
|
|
1785
|
+
function tagKindDescription(kind) {
|
|
1786
|
+
const n = tagsPageNouns();
|
|
1787
|
+
const k = tagKindNouns(kind);
|
|
1788
|
+
const docs = lower(n.documents);
|
|
1789
|
+
switch (kind) {
|
|
1790
|
+
case "label":
|
|
1791
|
+
return `Short names that file ${docs}, ${lower(n.facts)} and ${lower(n.threads)}.`;
|
|
1792
|
+
case "annotation":
|
|
1793
|
+
return `A note on each ${lower(n.document)} (text, number, choice or date), filled in by hand or by AI.`;
|
|
1794
|
+
case "issue":
|
|
1795
|
+
return `Points in dispute, each with the same ${lower(k.singular)} fields.`;
|
|
1796
|
+
case "person":
|
|
1797
|
+
case "organisation":
|
|
1798
|
+
return `${tagKindTitle(kind, { plural: true })} the ${docs} mention.`;
|
|
1799
|
+
case "search":
|
|
1800
|
+
return `${tagKindTitle(kind, { plural: true })}.`;
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
function TagPicker({ tags, selectedId, kinds, onSelect, onCreate }) {
|
|
1804
|
+
const [open, setOpen] = useState(false);
|
|
1805
|
+
const [kind, ...otherKinds] = kinds;
|
|
1806
|
+
const noun = tagKindNouns(kind);
|
|
1807
|
+
const create = (name, as) => {
|
|
1808
|
+
setOpen(false);
|
|
1809
|
+
void onCreate?.(name, as);
|
|
1810
|
+
};
|
|
1811
|
+
const selected = tags.find((t) => t.external_id === selectedId);
|
|
1812
|
+
const placeholder = onCreate ? `Find or create a ${noun.singular}\u2026` : `Find a ${noun.singular}\u2026`;
|
|
1813
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
1814
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1815
|
+
"button",
|
|
1816
|
+
{
|
|
1817
|
+
type: "button",
|
|
1818
|
+
className: "flex h-9 w-72 max-w-full items-center gap-2 rounded-md border border-input bg-background px-3 text-left text-sm hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1819
|
+
"data-testid": "tags-picker",
|
|
1820
|
+
children: [
|
|
1821
|
+
/* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1822
|
+
/* @__PURE__ */ jsx("span", { className: selected ? "min-w-0 flex-1 truncate" : "flex-1 text-muted-foreground", children: selected?.name ?? placeholder }),
|
|
1823
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground" })
|
|
1824
|
+
]
|
|
1825
|
+
}
|
|
1826
|
+
) }),
|
|
1827
|
+
open && /* @__PURE__ */ jsx(
|
|
1828
|
+
PopoverContent,
|
|
1829
|
+
{
|
|
1830
|
+
className: "w-[var(--radix-popover-trigger-width)] min-w-72 p-0",
|
|
1831
|
+
align: "start",
|
|
1832
|
+
sideOffset: 4,
|
|
1833
|
+
"data-testid": "tags-picker-list",
|
|
1834
|
+
children: /* @__PURE__ */ jsx(
|
|
1835
|
+
LabelPickerList,
|
|
1836
|
+
{
|
|
1837
|
+
options: tags.map((t) => ({
|
|
1838
|
+
id: t.external_id,
|
|
1839
|
+
name: t.name,
|
|
1840
|
+
color: getEntityColor(t.external_id, "medium")
|
|
1841
|
+
})),
|
|
1842
|
+
appliedIds: new Set(selectedId ? [selectedId] : []),
|
|
1843
|
+
onToggle: (id) => {
|
|
1844
|
+
setOpen(false);
|
|
1845
|
+
onSelect(id);
|
|
1846
|
+
},
|
|
1847
|
+
onCreate: onCreate ? (name) => create(name, kind) : void 0,
|
|
1848
|
+
moreCreates: onCreate ? otherKinds.map((other) => ({
|
|
1849
|
+
label: (name) => `Create ${tagKindNouns(other).singular} \u201C${name}\u201D`,
|
|
1850
|
+
onCreate: (name) => create(name, other)
|
|
1851
|
+
})) : void 0,
|
|
1852
|
+
labels: {
|
|
1853
|
+
searchPlaceholder: placeholder,
|
|
1854
|
+
noLabels: `No ${noun.plural} yet`,
|
|
1855
|
+
create: (name) => `Create ${noun.singular} \u201C${name}\u201D`
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
)
|
|
1859
|
+
}
|
|
1860
|
+
)
|
|
1861
|
+
] });
|
|
1862
|
+
}
|
|
1863
|
+
var EXTRACT_LIMIT = 500;
|
|
1864
|
+
var isTopLevel = (d) => !d.parent_ext_id;
|
|
1865
|
+
function ExtractEntitiesDialog({
|
|
1866
|
+
open,
|
|
1867
|
+
onOpenChange,
|
|
1868
|
+
documents,
|
|
1869
|
+
onExtract,
|
|
1870
|
+
onTooMany,
|
|
1871
|
+
isPending
|
|
1872
|
+
}) {
|
|
1873
|
+
const [picked, setPicked] = useState([]);
|
|
1874
|
+
const [all, setAll] = useState(false);
|
|
1875
|
+
const topLevel = useMemo(() => documents.filter(isTopLevel), [documents]);
|
|
1876
|
+
const allIds = topLevel.map((d) => d.external_id);
|
|
1877
|
+
const docIds = all ? allIds : picked;
|
|
1878
|
+
const nouns = tagsPageNouns();
|
|
1879
|
+
const entities = entitiesPhrase().toLowerCase();
|
|
1880
|
+
const groups = useMemo(
|
|
1881
|
+
() => [
|
|
1882
|
+
{
|
|
1883
|
+
id: "all",
|
|
1884
|
+
heading: "In this workspace",
|
|
1885
|
+
docs: topLevel.map((d) => ({
|
|
1886
|
+
id: d.external_id,
|
|
1887
|
+
title: getDocumentTitle(d, d.file_name ?? void 0),
|
|
1888
|
+
fileName: d.file_name,
|
|
1889
|
+
pages: isImageDocument(d) ? null : d.n_pages ?? null,
|
|
1890
|
+
tokens: isImageDocument(d) ? null : d.tokens ?? null
|
|
1891
|
+
})).sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()))
|
|
1892
|
+
}
|
|
1893
|
+
],
|
|
1894
|
+
[topLevel]
|
|
1895
|
+
);
|
|
1896
|
+
const toggle = (id) => setPicked((ids) => ids.includes(id) ? ids.filter((x) => x !== id) : [...ids, id]);
|
|
1897
|
+
const close = () => {
|
|
1898
|
+
setPicked([]);
|
|
1899
|
+
setAll(false);
|
|
1900
|
+
onOpenChange(false);
|
|
1901
|
+
};
|
|
1902
|
+
const run = async () => {
|
|
1903
|
+
if (docIds.length > EXTRACT_LIMIT) {
|
|
1904
|
+
onTooMany(`Choose at most ${documentCount(EXTRACT_LIMIT)} at a time.`);
|
|
1905
|
+
return;
|
|
1906
|
+
}
|
|
1907
|
+
try {
|
|
1908
|
+
await onExtract(docIds);
|
|
1909
|
+
close();
|
|
1910
|
+
} catch {
|
|
1911
|
+
}
|
|
1912
|
+
};
|
|
1913
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (next) => next ? onOpenChange(true) : close(), children: /* @__PURE__ */ jsxs(
|
|
1914
|
+
DialogContent,
|
|
1915
|
+
{
|
|
1916
|
+
presentation: "sheet",
|
|
1917
|
+
className: "w-modal max-w-modal-vw max-h-panel flex flex-col overflow-hidden p-0",
|
|
1918
|
+
"data-testid": "extract-entities-dialog",
|
|
1919
|
+
children: [
|
|
1920
|
+
/* @__PURE__ */ jsxs(ModalHeader, { children: [
|
|
1921
|
+
/* @__PURE__ */ jsxs(DialogTitle, { children: [
|
|
1922
|
+
"Extract ",
|
|
1923
|
+
entities
|
|
1924
|
+
] }),
|
|
1925
|
+
/* @__PURE__ */ jsxs(DialogDescription, { children: [
|
|
1926
|
+
"The AI finds the ",
|
|
1927
|
+
entities,
|
|
1928
|
+
" each ",
|
|
1929
|
+
nouns.document.toLowerCase(),
|
|
1930
|
+
" names and links them, with the passages that name them. ",
|
|
1931
|
+
entitiesPhrase(),
|
|
1932
|
+
" already here are matched by name."
|
|
1933
|
+
] })
|
|
1934
|
+
] }),
|
|
1935
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-h-0 flex-col gap-3 overflow-auto p-4", children: [
|
|
1936
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm", children: [
|
|
1937
|
+
/* @__PURE__ */ jsx(
|
|
1938
|
+
Checkbox,
|
|
1939
|
+
{
|
|
1940
|
+
checked: all,
|
|
1941
|
+
onCheckedChange: (v) => setAll(v === true),
|
|
1942
|
+
"data-testid": "extract-entities-all"
|
|
1943
|
+
}
|
|
1944
|
+
),
|
|
1945
|
+
"All ",
|
|
1946
|
+
nouns.documents.toLowerCase(),
|
|
1947
|
+
" (",
|
|
1948
|
+
allIds.length,
|
|
1949
|
+
")"
|
|
1950
|
+
] }),
|
|
1951
|
+
!all && /* @__PURE__ */ jsx(
|
|
1952
|
+
DocumentPicker,
|
|
1953
|
+
{
|
|
1954
|
+
groups,
|
|
1955
|
+
value: "",
|
|
1956
|
+
onValueChange: toggle,
|
|
1957
|
+
selectedIds: picked,
|
|
1958
|
+
labels: { placeholder: `Search ${nouns.documents.toLowerCase()}\u2026` }
|
|
1959
|
+
}
|
|
1960
|
+
)
|
|
1961
|
+
] }),
|
|
1962
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2 border-t border-border px-4 py-3", children: [
|
|
1963
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: close, children: "Cancel" }),
|
|
1964
|
+
/* @__PURE__ */ jsx(
|
|
1965
|
+
Button,
|
|
1966
|
+
{
|
|
1967
|
+
onClick: () => void run(),
|
|
1968
|
+
disabled: docIds.length === 0 || isPending,
|
|
1969
|
+
"data-testid": "extract-entities-run",
|
|
1970
|
+
children: docIds.length > 0 ? `Extract from ${documentCount(docIds.length)}` : "Extract"
|
|
1971
|
+
}
|
|
1972
|
+
)
|
|
1973
|
+
] })
|
|
1974
|
+
]
|
|
1975
|
+
}
|
|
1976
|
+
) });
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
export { DEFAULT_GLOSSARY_LABELS, DEFAULT_TAG_COLUMNS_EDITOR_LABELS, DEFAULT_TAG_DETAIL_LABELS, DEFAULT_TAG_TABLE_DOCX_LABELS, DEFAULT_TAG_TABLE_LABELS, DEFAULT_THREAD_FOLLOW_LABELS, DEFAULT_WORKSPACE_ACTIVITY_LABELS, DEFAULT_WORKSPACE_NOTIFICATION_MENU_LABELS, EXTRACT_LIMIT, EntityIdentityBar, ExtractEntitiesDialog, GridRowNavigator, IDENTITY_NAME_MAX_LENGTH, LoadingIndicator, RowNavigatorControls, TAG_TABLE_DOCX_LANDSCAPE_AFTER, TagColumnsEditor, TagDetail, TagPicker, TagTable, TagTableCell, ThreadFollowButton, ThreadFollowMenuItem, WorkspaceActivityList, WorkspaceNotificationMenu, cellText, cellValue, documentCount, entitiesPhrase, fieldWrites, glossaryDocumentXml, glossaryDocx, glossaryEntries, glossaryFileName, glossaryMarkdown, isGap, parseCell, rowLinks, tagDetailLabels, tagKindDescription, tagNoteLabel, tagTableDocumentXml, tagTableDocx, tagTableLabels, tagTableMarkdown, tagsPageNouns, workspaceActivityHeadline, workspaceActivityTarget };
|
|
1980
|
+
//# sourceMappingURL=chunk-YXNNNP57.js.map
|
|
1981
|
+
//# sourceMappingURL=chunk-YXNNNP57.js.map
|