@protobase/ui 0.121.9 → 0.121.10
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/account/messages.d.ts +2 -2
- package/dist/activity-chart/messages.d.ts +2 -2
- package/dist/app/change-confirm/messages.d.ts +2 -2
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/confirm-sign-in-messages.d.ts +2 -2
- package/dist/app/conversation/message-composer.d.ts +7 -2
- package/dist/app/conversation/message-composer.js +36 -9
- package/dist/app/conversation/messages.d.ts +2 -2
- package/dist/app/conversation/thread-state.d.ts +1 -1
- package/dist/app/conversation-page/attachment-picker.d.ts +9 -0
- package/dist/app/conversation-page/attachment-picker.js +32 -0
- package/dist/app/conversation-page/attachments.d.ts +25 -0
- package/dist/app/conversation-page/attachments.js +34 -0
- package/dist/app/conversation-page/conversation-header.js +1 -1
- package/dist/app/conversation-page/conversation-message.d.ts +2 -2
- package/dist/app/conversation-page/conversation-message.js +26 -20
- package/dist/app/conversation-page/conversation-messages.d.ts +2 -1
- package/dist/app/conversation-page/conversation-messages.js +11 -3
- package/dist/app/conversation-page/conversation-page.js +3 -2
- package/dist/app/conversation-page/conversation-reads.d.ts +12 -7
- package/dist/app/conversation-page/conversation-reads.js +9 -9
- package/dist/app/conversation-page/message-attachments.d.ts +13 -0
- package/dist/app/conversation-page/message-attachments.js +63 -0
- package/dist/app/conversation-page/message-ops.d.ts +15 -0
- package/dist/app/conversation-page/message-ops.js +32 -0
- package/dist/app/conversation-page/message-setup.d.ts +3 -1
- package/dist/app/conversation-page/messages.d.ts +2 -2
- package/dist/app/conversation-page/pending-attachments.d.ts +12 -0
- package/dist/app/conversation-page/pending-attachments.js +40 -0
- package/dist/app/conversation-page/thread-panel.js +5 -4
- package/dist/app/conversation-page/uploads.d.ts +32 -0
- package/dist/app/conversation-page/uploads.js +33 -0
- package/dist/app/conversation-page/use-attachment-uploads.d.ts +20 -0
- package/dist/app/conversation-page/use-attachment-uploads.js +66 -0
- package/dist/app/conversation-page/use-message-attachments.d.ts +13 -0
- package/dist/app/conversation-page/use-message-attachments.js +28 -0
- package/dist/app/conversation-page/use-message-reactions.js +3 -3
- package/dist/app/conversation-page/use-message-setup.d.ts +3 -2
- package/dist/app/conversation-page/use-message-setup.js +6 -2
- package/dist/app/conversation-page/use-message-writes.d.ts +3 -2
- package/dist/app/conversation-page/use-message-writes.js +3 -2
- package/dist/app/create/messages.d.ts +2 -2
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/board-display.d.ts +4 -4
- package/dist/app/displays/board-display.js +12 -8
- package/dist/app/displays/board-takes.d.ts +21 -0
- package/dist/app/displays/board-takes.js +32 -0
- package/dist/app/displays/check-reason.d.ts +9 -0
- package/dist/app/displays/check-reason.js +30 -0
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/displays/set-undo.d.ts +14 -0
- package/dist/app/displays/set-undo.js +14 -0
- package/dist/app/displays/use-board-move.d.ts +9 -4
- package/dist/app/displays/use-board-move.js +33 -6
- package/dist/app/embedded-list/messages.d.ts +2 -2
- package/dist/app/export/export-worker.js +1 -1
- package/dist/app/export/messages.d.ts +2 -2
- package/dist/app/field-messages.d.ts +2 -2
- package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
- package/dist/app/field-types/json/messages.d.ts +2 -2
- package/dist/app/field-types/runner-install/messages.d.ts +2 -2
- package/dist/app/field-types/workflow/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
- package/dist/app/file-viewers/messages.d.ts +2 -2
- package/dist/app/focus/messages.d.ts +2 -2
- package/dist/app/gallery/messages.d.ts +2 -2
- package/dist/app/hand-order/messages.d.ts +2 -2
- package/dist/app/history/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/list-page.js +1 -1
- package/dist/app/main.js +1 -1
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/new-version/messages.d.ts +2 -2
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-lines.js +1 -1
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-page.js +1 -1
- package/dist/app/record-row/messages.d.ts +2 -2
- package/dist/app/related-cards/messages.d.ts +2 -2
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/assistant-dock/messages.d.ts +2 -2
- package/dist/auth/messages.d.ts +2 -2
- package/dist/calls/messages.d.ts +2 -2
- package/dist/chat/messages.d.ts +2 -2
- package/dist/compact-table/messages.d.ts +2 -2
- package/dist/data/query-keys.d.ts +2 -0
- package/dist/data/query-keys.js +7 -0
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/inline-child-table/messages.d.ts +2 -2
- package/dist/invitations/messages.d.ts +2 -2
- package/dist/locale/en.js +11 -1
- package/dist/locale/en.json.d.ts +10 -0
- package/dist/locale/messages.d.ts +20 -0
- package/dist/locale/nl.js +11 -1
- package/dist/mailbox/messages.d.ts +2 -2
- package/dist/mentions/messages.d.ts +2 -2
- package/dist/mocks/orders.d.ts +2 -2
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/package.js +1 -1
- package/dist/plugins/messages.d.ts +2 -2
- package/dist/primitives/messages.d.ts +2 -2
- package/dist/record-view/messages.d.ts +2 -2
- package/dist/shell/assets/{account-page-CfX28GQ8.js → account-page-K162oV2K.js} +2 -2
- package/dist/shell/assets/app-lQJl2mz_.css +2 -0
- package/dist/shell/assets/app-vx5mZ2uE.js +34 -0
- package/dist/shell/assets/{assistant-shell-z2XOEbOj.js → assistant-shell-BudITySr.js} +2 -2
- package/dist/shell/assets/board-display-Bs4z3PwA.js +2 -0
- package/dist/shell/assets/{calendar-display-CCAuGvO0.js → calendar-display-tHm1Uuwv.js} +2 -2
- package/dist/shell/assets/{call-rings-DpsiFB6J.js → call-rings-pKCPyD1-.js} +2 -2
- package/dist/shell/assets/{calls-DXZIKdLq.js → calls-CLQwaemL.js} +2 -2
- package/dist/shell/assets/{circle-alert-DLkf2jqw.js → circle-alert-05wFSlkE.js} +2 -2
- package/dist/shell/assets/composed-page-D3_OTQB4.js +2 -0
- package/dist/shell/assets/{composer-section-DfppQhmw.js → composer-section-BoFYW5rp.js} +2 -2
- package/dist/shell/assets/{connect-route-CY2ZfSc_.js → connect-route-D0m9ozLK.js} +2 -2
- package/dist/shell/assets/{copy-field-q7yD4jZB.js → copy-field-DjAdwdDh.js} +2 -2
- package/dist/shell/assets/create-route-CZDGdfY8.js +2 -0
- package/dist/shell/assets/{custom-step-container-field-CgoMp_U9.js → custom-step-container-field-DTCgqZMO.js} +4 -4
- package/dist/shell/assets/embedded-list-wbLEr5-r.js +3 -0
- package/dist/shell/assets/en-0TxR0Vfb.js +2 -0
- package/dist/shell/assets/{export-dialog-WJeF3CbF.js → export-dialog-BVmThgqO.js} +2 -2
- package/dist/shell/assets/export-worker-AFqbgGzG.js +15 -0
- package/dist/shell/assets/{first-organization-page-DEEIRm-0.js → first-organization-page-B986-W2g.js} +2 -2
- package/dist/shell/assets/{graph-view-D4xNpQ_g.js → graph-view-BEerNiMa.js} +2 -2
- package/dist/shell/assets/{group-donut-BaFas9ku.js → group-donut-DgttsF8V.js} +2 -2
- package/dist/shell/assets/{guest-call-page-DkPBCsWu.js → guest-call-page-CKEva7eV.js} +3 -3
- package/dist/shell/assets/{html-viewer-BxpAIOTS.js → html-viewer-FMIvHlJ9.js} +2 -2
- package/dist/shell/assets/{import-dialog-CGbSlHpH.js → import-dialog-CjFrTZBf.js} +2 -2
- package/dist/shell/assets/{import-table-dialog-D_Ocp3vu.js → import-table-dialog-CoTd03ud.js} +2 -2
- package/dist/shell/assets/{index-BqXzr-yT.js → index-BrTE5pLB.js} +1 -1
- package/dist/shell/assets/{invitations-page-BMPl6GWq.js → invitations-page-Ds817tOV.js} +2 -2
- package/dist/shell/assets/{layout-grid-DRPuMrqQ.js → layout-grid-o1f0ZIIR.js} +2 -2
- package/dist/shell/assets/{legend-item-BBq7fIY0.js → legend-item-CamCYS1J.js} +2 -2
- package/dist/shell/assets/list-page-CHdsbqR8.js +4 -0
- package/dist/shell/assets/{maplibre-DtBIeJSN.js → maplibre-DVBhKlXN.js} +2 -2
- package/dist/shell/assets/{markdown-content-CtsPlIoM.js → markdown-content-CfblNnhw.js} +2 -2
- package/dist/shell/assets/members-page-CCLPZ9sH.js +2 -0
- package/dist/shell/assets/{message-content-DXUPTfSg.js → message-content--7TsRUEK.js} +3 -3
- package/dist/shell/assets/messages-BaKJKIHo.js +2 -0
- package/dist/shell/assets/nl-mDiTKi5y.js +2 -0
- package/dist/shell/assets/organization-page-DE4U9Xbi.js +2 -0
- package/dist/shell/assets/organizations-page-DcRX2C5D.js +2 -0
- package/dist/shell/assets/parse-worker-C5wWzRYH.js +35 -0
- package/dist/shell/assets/{pending-invitation-row-CNhLeVIQ.js → pending-invitation-row-By5UWOua.js} +2 -2
- package/dist/shell/assets/{period-chart-Dt45QkuG.js → period-chart-C3ZV_QjX.js} +2 -2
- package/dist/shell/assets/{person-row-CcvbtovO.js → person-row-Dvc6wiac.js} +2 -2
- package/dist/shell/assets/public-form-page-C2K3mhKj.js +2 -0
- package/dist/shell/assets/record-lines-DLM3i7dN.js +2 -0
- package/dist/shell/assets/{record-map-B9GnjR1C.js → record-map-M24QGWvA.js} +2 -2
- package/dist/shell/assets/{record-opens-B4gCpNRB.js → record-opens-CNOaCrB0.js} +2 -2
- package/dist/shell/assets/record-page-DVmkJFmF.js +3 -0
- package/dist/shell/assets/{record-preview-JiWY0Bog.js → record-preview-Bk9A5TNd.js} +2 -2
- package/dist/shell/assets/{records-map-C8eK7w7P.js → records-map-D1JVIHvn.js} +2 -2
- package/dist/shell/assets/render-node-C-yLArnA.js +3 -0
- package/dist/shell/assets/reorder-button-CrDVuiOd.js +2 -0
- package/dist/shell/assets/{run-trace-view-C9eyUJ6D.js → run-trace-view-CBYw9RPI.js} +2 -2
- package/dist/shell/assets/{runner-install-field-DSyxhG1I.js → runner-install-field--7xa6MIJ.js} +2 -2
- package/dist/shell/assets/{runtime-update-L7M--oiI.js → runtime-update-DWO9xR0h.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-DGEYEBZj.js +1 -0
- package/dist/shell/assets/{sheet-source-D5zF3gg-.js → sheet-source-DKZ31RE_.js} +3 -3
- package/dist/shell/assets/sign-in-policy-page-B-m5Pcyb.js +2 -0
- package/dist/shell/assets/start-block-queries-OldcFqiL.js +2 -0
- package/dist/shell/assets/step-catalog-N67Ej6Fl.js +2 -0
- package/dist/shell/assets/{step-panel-DMfELcMq.js → step-panel-xClc_YhC.js} +2 -2
- package/dist/shell/assets/timeline-display-DwR4-qO_.js +2 -0
- package/dist/shell/assets/{trash-CjMf5J76.js → trash-DTqja_Bl.js} +2 -2
- package/dist/shell/assets/{update-set-WE2PkaIw.js → update-set-g33TLRML.js} +2 -2
- package/dist/shell/assets/use-calendar-move-BaNKG9_2.js +2 -0
- package/dist/shell/assets/{use-display-rows-mgonVNXo.js → use-display-rows-sN3JfCRy.js} +2 -2
- package/dist/shell/assets/use-my-invitations-BIsBGgmc.js +2 -0
- package/dist/shell/assets/{use-paged-search-RKqj14d3.js → use-paged-search-DrjHdSz7.js} +2 -2
- package/dist/shell/assets/{use-run-trace-Cpbf2fu6.js → use-run-trace-DFLNmghw.js} +2 -2
- package/dist/shell/assets/{use-workflow-page-CoLMHSGc.js → use-workflow-page-Cfztiqhc.js} +2 -2
- package/dist/shell/assets/{use-workflow-types-D-FjK73S.js → use-workflow-types-BFToPBTN.js} +2 -2
- package/dist/shell/assets/{workflow-canvas-RpvT30bM.js → workflow-canvas-D7hU35fr.js} +4 -4
- package/dist/shell/assets/{workflow-field-lsm3hyfI.js → workflow-field-D7X0A1GO.js} +3 -3
- package/dist/shell/assets/{workflow-graph-editor-jIDR6xNQ.js → workflow-graph-editor-16CoiFFG.js} +2 -2
- package/dist/shell/assets/{workflow-run-field-BBBew-3S.js → workflow-run-field-DJLolq5e.js} +3 -3
- package/dist/shell/assets/workflow-status-field-weFyKOIV.js +2 -0
- package/dist/shell/assets/workflow-workbench-DErE_AKt.js +4 -0
- package/dist/shell/index.html +4 -4
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/{account-page-CfX28GQ8.js.map → account-page-K162oV2K.js.map} +1 -1
- package/dist/shell-source-maps/assets/app-vx5mZ2uE.js.map +1 -0
- package/dist/shell-source-maps/assets/{assistant-shell-z2XOEbOj.js.map → assistant-shell-BudITySr.js.map} +1 -1
- package/dist/shell-source-maps/assets/board-display-Bs4z3PwA.js.map +1 -0
- package/dist/shell-source-maps/assets/{calendar-display-CCAuGvO0.js.map → calendar-display-tHm1Uuwv.js.map} +1 -1
- package/dist/shell-source-maps/assets/{call-rings-DpsiFB6J.js.map → call-rings-pKCPyD1-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calls-DXZIKdLq.js.map → calls-CLQwaemL.js.map} +1 -1
- package/dist/shell-source-maps/assets/{circle-alert-DLkf2jqw.js.map → circle-alert-05wFSlkE.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composed-page-Dgq_w1W6.js.map → composed-page-D3_OTQB4.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composer-section-DfppQhmw.js.map → composer-section-BoFYW5rp.js.map} +1 -1
- package/dist/shell-source-maps/assets/{connect-route-CY2ZfSc_.js.map → connect-route-D0m9ozLK.js.map} +1 -1
- package/dist/shell-source-maps/assets/{copy-field-q7yD4jZB.js.map → copy-field-DjAdwdDh.js.map} +1 -1
- package/dist/shell-source-maps/assets/{create-route-DA9m3zuH.js.map → create-route-CZDGdfY8.js.map} +1 -1
- package/dist/shell-source-maps/assets/{custom-step-container-field-CgoMp_U9.js.map → custom-step-container-field-DTCgqZMO.js.map} +1 -1
- package/dist/shell-source-maps/assets/{embedded-list-BdX2FUxK.js.map → embedded-list-wbLEr5-r.js.map} +1 -1
- package/dist/shell-source-maps/assets/en-0TxR0Vfb.js.map +1 -0
- package/dist/shell-source-maps/assets/{export-dialog-WJeF3CbF.js.map → export-dialog-BVmThgqO.js.map} +1 -1
- package/dist/shell-source-maps/assets/export-worker-AFqbgGzG.js.map +1 -0
- package/dist/shell-source-maps/assets/{first-organization-page-DEEIRm-0.js.map → first-organization-page-B986-W2g.js.map} +1 -1
- package/dist/shell-source-maps/assets/{graph-view-D4xNpQ_g.js.map → graph-view-BEerNiMa.js.map} +1 -1
- package/dist/shell-source-maps/assets/{group-donut-BaFas9ku.js.map → group-donut-DgttsF8V.js.map} +1 -1
- package/dist/shell-source-maps/assets/{guest-call-page-DkPBCsWu.js.map → guest-call-page-CKEva7eV.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-BxpAIOTS.js.map → html-viewer-FMIvHlJ9.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-dialog-CGbSlHpH.js.map → import-dialog-CjFrTZBf.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-table-dialog-D_Ocp3vu.js.map → import-table-dialog-CoTd03ud.js.map} +1 -1
- package/dist/shell-source-maps/assets/{invitations-page-BMPl6GWq.js.map → invitations-page-Ds817tOV.js.map} +1 -1
- package/dist/shell-source-maps/assets/{layout-grid-DRPuMrqQ.js.map → layout-grid-o1f0ZIIR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{legend-item-BBq7fIY0.js.map → legend-item-CamCYS1J.js.map} +1 -1
- package/dist/shell-source-maps/assets/{list-page-C2PiELeV.js.map → list-page-CHdsbqR8.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-DtBIeJSN.js.map → maplibre-DVBhKlXN.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-CtsPlIoM.js.map → markdown-content-CfblNnhw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{members-page-BOGEqd2d.js.map → members-page-CCLPZ9sH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{message-content-DXUPTfSg.js.map → message-content--7TsRUEK.js.map} +1 -1
- package/dist/shell-source-maps/assets/{messages-uoUGFNWe.js.map → messages-BaKJKIHo.js.map} +1 -1
- package/dist/shell-source-maps/assets/nl-mDiTKi5y.js.map +1 -0
- package/dist/shell-source-maps/assets/{organization-page-i6ma8Zpd.js.map → organization-page-DE4U9Xbi.js.map} +1 -1
- package/dist/shell-source-maps/assets/{organizations-page-DoKdrKKR.js.map → organizations-page-DcRX2C5D.js.map} +1 -1
- package/dist/shell-source-maps/assets/parse-worker-C5wWzRYH.js.map +1 -0
- package/dist/shell-source-maps/assets/{pending-invitation-row-CNhLeVIQ.js.map → pending-invitation-row-By5UWOua.js.map} +1 -1
- package/dist/shell-source-maps/assets/{period-chart-Dt45QkuG.js.map → period-chart-C3ZV_QjX.js.map} +1 -1
- package/dist/shell-source-maps/assets/{person-row-CcvbtovO.js.map → person-row-Dvc6wiac.js.map} +1 -1
- package/dist/shell-source-maps/assets/{public-form-page-uedT0S1c.js.map → public-form-page-C2K3mhKj.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-lines-Dv0Sa0Bm.js.map → record-lines-DLM3i7dN.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-B9GnjR1C.js.map → record-map-M24QGWvA.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-opens-B4gCpNRB.js.map → record-opens-CNOaCrB0.js.map} +1 -1
- package/dist/shell-source-maps/assets/record-page-DVmkJFmF.js.map +1 -0
- package/dist/shell-source-maps/assets/{record-preview-JiWY0Bog.js.map → record-preview-Bk9A5TNd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-C8eK7w7P.js.map → records-map-D1JVIHvn.js.map} +1 -1
- package/dist/shell-source-maps/assets/render-node-C-yLArnA.js.map +1 -0
- package/dist/shell-source-maps/assets/{reorder-button-osmG3Y_Q.js.map → reorder-button-CrDVuiOd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-C9eyUJ6D.js.map → run-trace-view-CBYw9RPI.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runner-install-field-DSyxhG1I.js.map → runner-install-field--7xa6MIJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runtime-update-L7M--oiI.js.map → runtime-update-DWO9xR0h.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sheet-source-D5zF3gg-.js.map → sheet-source-DKZ31RE_.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sign-in-policy-page-DYeJZDYd.js.map → sign-in-policy-page-B-m5Pcyb.js.map} +1 -1
- package/dist/shell-source-maps/assets/{start-block-queries-KIFQbRdj.js.map → start-block-queries-OldcFqiL.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-catalog-DOFD42Kz.js.map → step-catalog-N67Ej6Fl.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-DMfELcMq.js.map → step-panel-xClc_YhC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{timeline-display-YsTp3TdW.js.map → timeline-display-DwR4-qO_.js.map} +1 -1
- package/dist/shell-source-maps/assets/{trash-CjMf5J76.js.map → trash-DTqja_Bl.js.map} +1 -1
- package/dist/shell-source-maps/assets/{update-set-WE2PkaIw.js.map → update-set-g33TLRML.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-calendar-move-z44ne2up.js.map → use-calendar-move-BaNKG9_2.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-display-rows-mgonVNXo.js.map → use-display-rows-sN3JfCRy.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-my-invitations-KI0E0ZhE.js.map → use-my-invitations-BIsBGgmc.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-paged-search-RKqj14d3.js.map → use-paged-search-DrjHdSz7.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-run-trace-Cpbf2fu6.js.map → use-run-trace-DFLNmghw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-page-CoLMHSGc.js.map → use-workflow-page-Cfztiqhc.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-types-D-FjK73S.js.map → use-workflow-types-BFToPBTN.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-RpvT30bM.js.map → workflow-canvas-D7hU35fr.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-field-lsm3hyfI.js.map → workflow-field-D7X0A1GO.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-jIDR6xNQ.js.map → workflow-graph-editor-16CoiFFG.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-run-field-BBBew-3S.js.map → workflow-run-field-DJLolq5e.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-status-field-DfUANDAX.js.map → workflow-status-field-weFyKOIV.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-workbench-C_-fh16c.js.map → workflow-workbench-DErE_AKt.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/users/messages.d.ts +2 -2
- package/package.json +5 -5
- package/dist/shell/assets/app-26FM9hvC.js +0 -34
- package/dist/shell/assets/app-woXO0qfi.css +0 -2
- package/dist/shell/assets/board-display-DJpwNHqR.js +0 -2
- package/dist/shell/assets/composed-page-Dgq_w1W6.js +0 -2
- package/dist/shell/assets/create-route-DA9m3zuH.js +0 -2
- package/dist/shell/assets/embedded-list-BdX2FUxK.js +0 -3
- package/dist/shell/assets/en-F4WlEfjV.js +0 -2
- package/dist/shell/assets/export-worker-BbrJ4DH1.js +0 -15
- package/dist/shell/assets/list-page-C2PiELeV.js +0 -4
- package/dist/shell/assets/members-page-BOGEqd2d.js +0 -2
- package/dist/shell/assets/messages-uoUGFNWe.js +0 -2
- package/dist/shell/assets/nl-CGzPjT6w.js +0 -2
- package/dist/shell/assets/organization-page-i6ma8Zpd.js +0 -2
- package/dist/shell/assets/organizations-page-DoKdrKKR.js +0 -2
- package/dist/shell/assets/parse-worker-CG0FAJQa.js +0 -35
- package/dist/shell/assets/public-form-page-uedT0S1c.js +0 -2
- package/dist/shell/assets/record-lines-Dv0Sa0Bm.js +0 -2
- package/dist/shell/assets/record-page-Cj_q__l8.js +0 -3
- package/dist/shell/assets/render-node-BuW1TcF4.js +0 -3
- package/dist/shell/assets/reorder-button-osmG3Y_Q.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-DfJkgcs2.js +0 -1
- package/dist/shell/assets/sign-in-policy-page-DYeJZDYd.js +0 -2
- package/dist/shell/assets/start-block-queries-KIFQbRdj.js +0 -2
- package/dist/shell/assets/step-catalog-DOFD42Kz.js +0 -2
- package/dist/shell/assets/timeline-display-YsTp3TdW.js +0 -2
- package/dist/shell/assets/use-calendar-move-z44ne2up.js +0 -2
- package/dist/shell/assets/use-my-invitations-KI0E0ZhE.js +0 -2
- package/dist/shell/assets/workflow-status-field-DfUANDAX.js +0 -2
- package/dist/shell/assets/workflow-workbench-C_-fh16c.js +0 -4
- package/dist/shell-source-maps/assets/app-26FM9hvC.js.map +0 -1
- package/dist/shell-source-maps/assets/board-display-DJpwNHqR.js.map +0 -1
- package/dist/shell-source-maps/assets/en-F4WlEfjV.js.map +0 -1
- package/dist/shell-source-maps/assets/export-worker-BbrJ4DH1.js.map +0 -1
- package/dist/shell-source-maps/assets/nl-CGzPjT6w.js.map +0 -1
- package/dist/shell-source-maps/assets/parse-worker-CG0FAJQa.js.map +0 -1
- package/dist/shell-source-maps/assets/record-page-Cj_q__l8.js.map +0 -1
- package/dist/shell-source-maps/assets/render-node-BuW1TcF4.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Attachment } from "./attachments.js";
|
|
2
|
+
//#region src/app/conversation-page/message-attachments.d.ts
|
|
3
|
+
/** The tallest an image preview is drawn, in CSS pixels; a wider one is scaled down to the message's width. */
|
|
4
|
+
export declare const previewHeight = 240;
|
|
5
|
+
/**
|
|
6
|
+
* A message's files under its text: an image as a preview at most `previewHeight` high, a link that opens it in a new
|
|
7
|
+
* tab, any other file as a link with its name and size that downloads it. The links are those the API signs for the
|
|
8
|
+
* reader.
|
|
9
|
+
*/
|
|
10
|
+
export declare const MessageAttachments: ({ attachments }: {
|
|
11
|
+
attachments: readonly Attachment[];
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { buttonClass } from "../../primitives/button.js";
|
|
2
|
+
import { formatSize } from "../../live/file-values.js";
|
|
3
|
+
import { text } from "./messages.js";
|
|
4
|
+
import { isPreviewed } from "./attachments.js";
|
|
5
|
+
import { FileText } from "lucide-react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/app/conversation-page/message-attachments.tsx
|
|
8
|
+
/** The tallest an image preview is drawn, in CSS pixels; a wider one is scaled down to the message's width. */
|
|
9
|
+
const previewHeight = 240;
|
|
10
|
+
const FileLabel = ({ attachment }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(FileText, { className: "size-4" }),
|
|
12
|
+
/* @__PURE__ */ jsx("span", {
|
|
13
|
+
className: "max-w-64 truncate",
|
|
14
|
+
children: attachment.name
|
|
15
|
+
}),
|
|
16
|
+
attachment.size !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: "text-muted-foreground",
|
|
18
|
+
children: formatSize(attachment.size)
|
|
19
|
+
})
|
|
20
|
+
] });
|
|
21
|
+
const FileDownload = ({ attachment }) => {
|
|
22
|
+
const className = buttonClass({
|
|
23
|
+
variant: "secondary",
|
|
24
|
+
size: "sm"
|
|
25
|
+
});
|
|
26
|
+
if (attachment.url === void 0) return /* @__PURE__ */ jsx("span", {
|
|
27
|
+
className,
|
|
28
|
+
"aria-disabled": true,
|
|
29
|
+
title: text("fileMissing"),
|
|
30
|
+
children: /* @__PURE__ */ jsx(FileLabel, { attachment })
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ jsx("a", {
|
|
33
|
+
href: attachment.url,
|
|
34
|
+
download: attachment.name,
|
|
35
|
+
className,
|
|
36
|
+
children: /* @__PURE__ */ jsx(FileLabel, { attachment })
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A message's files under its text: an image as a preview at most `previewHeight` high, a link that opens it in a new
|
|
41
|
+
* tab, any other file as a link with its name and size that downloads it. The links are those the API signs for the
|
|
42
|
+
* reader.
|
|
43
|
+
*/
|
|
44
|
+
const MessageAttachments = ({ attachments }) => /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: "flex flex-wrap items-start gap-2",
|
|
46
|
+
children: attachments.map((attachment) => isPreviewed(attachment) ? /* @__PURE__ */ jsx("a", {
|
|
47
|
+
href: attachment.url,
|
|
48
|
+
target: "_blank",
|
|
49
|
+
rel: "noreferrer",
|
|
50
|
+
title: attachment.name,
|
|
51
|
+
className: "max-w-full",
|
|
52
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
53
|
+
src: attachment.url,
|
|
54
|
+
alt: attachment.name,
|
|
55
|
+
width: attachment.width,
|
|
56
|
+
height: attachment.height,
|
|
57
|
+
style: { maxHeight: 240 },
|
|
58
|
+
className: "h-auto w-auto max-w-full rounded-md border border-border object-contain"
|
|
59
|
+
})
|
|
60
|
+
}, String(attachment.key)) : /* @__PURE__ */ jsx(FileDownload, { attachment }, String(attachment.key)))
|
|
61
|
+
});
|
|
62
|
+
//#endregion
|
|
63
|
+
export { MessageAttachments, previewHeight };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Attachment } from "./attachments.js";
|
|
2
|
+
import { BatchOp } from "@protobase/client";
|
|
3
|
+
import { AttachmentsModel, ResourceModel } from "@protobase/schema";
|
|
4
|
+
//#region src/app/conversation-page/message-ops.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The one batch that sends a message of `resource` with `data`, its text and mentions among them, and its files: the
|
|
7
|
+
* message first, then one attachment per upload `ticket`, each pointing at the message the batch creates.
|
|
8
|
+
*/
|
|
9
|
+
export declare const sendOps: (resource: string, data: Record<string, unknown>, attachments: AttachmentsModel, tickets: readonly string[]) => BatchOp[];
|
|
10
|
+
/** The one batch that deletes the message keyed `key` of `page.resource` after its `files`, so none outlives it. */
|
|
11
|
+
export declare const deleteOps: (page: {
|
|
12
|
+
resource: string;
|
|
13
|
+
attachments?: AttachmentsModel;
|
|
14
|
+
}, model: ResourceModel, key: string, files: readonly Attachment[]) => BatchOp[];
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { keyValue } from "../create/create-values.js";
|
|
2
|
+
//#region src/app/conversation-page/message-ops.ts
|
|
3
|
+
const message = "message";
|
|
4
|
+
/**
|
|
5
|
+
* The one batch that sends a message of `resource` with `data`, its text and mentions among them, and its files: the
|
|
6
|
+
* message first, then one attachment per upload `ticket`, each pointing at the message the batch creates.
|
|
7
|
+
*/
|
|
8
|
+
const sendOps = (resource, data, attachments, tickets) => [{
|
|
9
|
+
op: "create",
|
|
10
|
+
resource,
|
|
11
|
+
ref: message,
|
|
12
|
+
data
|
|
13
|
+
}, ...tickets.map((ticket) => ({
|
|
14
|
+
op: "create",
|
|
15
|
+
resource: attachments.resource,
|
|
16
|
+
data: {
|
|
17
|
+
[attachments.field]: { $ref: message },
|
|
18
|
+
[attachments.file]: ticket
|
|
19
|
+
}
|
|
20
|
+
}))];
|
|
21
|
+
/** The one batch that deletes the message keyed `key` of `page.resource` after its `files`, so none outlives it. */
|
|
22
|
+
const deleteOps = (page, model, key, files) => [...page.attachments ? files.map((file) => ({
|
|
23
|
+
op: "delete",
|
|
24
|
+
resource: page.attachments.resource,
|
|
25
|
+
key: file.key
|
|
26
|
+
})) : [], {
|
|
27
|
+
op: "delete",
|
|
28
|
+
resource: page.resource,
|
|
29
|
+
key: keyValue(model, key)
|
|
30
|
+
}];
|
|
31
|
+
//#endregion
|
|
32
|
+
export { deleteOps, sendOps };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Attachment } from "./attachments.js";
|
|
1
2
|
import { PeopleSearch } from "../../mentions/use-people-search.js";
|
|
2
3
|
import "../../mentions/index.js";
|
|
3
4
|
import { Member } from "../../people/use-members.js";
|
|
@@ -9,7 +10,7 @@ import { AppAddress, ConversationPageModel } from "@protobase/schema";
|
|
|
9
10
|
/**
|
|
10
11
|
* What every message of a conversation, or of a thread beside it, needs beyond its own row: the page, the reader, the
|
|
11
12
|
* organization's members, the writes, the emoji offered, the access to messages and reactions, each message's
|
|
12
|
-
* reactions by its key, `threadTo` for a message of the conversation itself, whose thread opens at that address, and
|
|
13
|
+
* reactions and files by its key, `threadTo` for a message of the conversation itself, whose thread opens at that address, and
|
|
13
14
|
* the people `@` lists while editing.
|
|
14
15
|
*/
|
|
15
16
|
export type MessageSetup = {
|
|
@@ -21,6 +22,7 @@ export type MessageSetup = {
|
|
|
21
22
|
messagePermissions: ResourcePermissions;
|
|
22
23
|
reactionPermissions: ResourcePermissions;
|
|
23
24
|
reactionsOf: (key: string) => readonly Record<string, unknown>[];
|
|
25
|
+
attachmentsOf: (key: string) => readonly Attachment[];
|
|
24
26
|
threadTo?: (key: string) => AppAddress;
|
|
25
27
|
searchPeople?: PeopleSearch;
|
|
26
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/conversation-page/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "cancel" | "someone" | "copied" | "edit" | "thread" | "
|
|
5
|
-
rich(id: "cancel" | "someone" | "copied" | "edit" | "thread" | "
|
|
4
|
+
(id: "cancel" | "someone" | "copied" | "edit" | "thread" | "fileMissing" | "message" | "save" | "delete" | "details" | "deleteDescription" | "deleteTitle" | "couldNotLoad" | "notSaved" | "noMessages" | "loadingMessages" | "edited" | "editedAt" | "positionNotSaved" | "messageActions" | "reactWith" | "react" | "reactedBy" | "replyInThread" | "copyText" | "editMessage" | "yourMessage" | "messageFrom" | "showYourActions" | "showActionsFrom" | "showActions" | "notDeleted" | "reactionNotSaved" | "replies" | "lastReply" | "replyPlaceholder" | "couldNotLoadThread" | "threadElsewhere" | "couldNotLoadReactions" | "notCopied" | "attachFiles" | "filesToAttach" | "filesToSend" | "takeFileOff" | "fileTooLarge" | "fileNotUploaded" | "uploadedPercent" | "couldNotLoadFiles", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "cancel" | "someone" | "copied" | "edit" | "thread" | "fileMissing" | "message" | "save" | "delete" | "details" | "deleteDescription" | "deleteTitle" | "couldNotLoad" | "notSaved" | "noMessages" | "loadingMessages" | "edited" | "editedAt" | "positionNotSaved" | "messageActions" | "reactWith" | "react" | "reactedBy" | "replyInThread" | "copyText" | "editMessage" | "yourMessage" | "messageFrom" | "showYourActions" | "showActionsFrom" | "showActions" | "notDeleted" | "reactionNotSaved" | "replies" | "lastReply" | "replyPlaceholder" | "couldNotLoadThread" | "threadElsewhere" | "couldNotLoadReactions" | "notCopied" | "attachFiles" | "filesToAttach" | "filesToSend" | "takeFileOff" | "fileTooLarge" | "fileNotUploaded" | "uploadedPercent" | "couldNotLoadFiles", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Upload } from "./uploads.js";
|
|
2
|
+
//#region src/app/conversation-page/pending-attachments.d.ts
|
|
3
|
+
type Props = {
|
|
4
|
+
uploads: readonly Upload[];
|
|
5
|
+
onRemove: (key: number) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The files picked, pasted or dropped for the next message, above the box: each with its size, how far its upload is,
|
|
9
|
+
* or why it was refused, and a button that takes it off.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PendingAttachments: ({ uploads, onRemove }: Props) => import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.js";
|
|
2
|
+
import { Button } from "../../primitives/button.js";
|
|
3
|
+
import { text } from "./messages.js";
|
|
4
|
+
import { uploadState } from "./uploads.js";
|
|
5
|
+
import { X } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/app/conversation-page/pending-attachments.tsx
|
|
8
|
+
/**
|
|
9
|
+
* The files picked, pasted or dropped for the next message, above the box: each with its size, how far its upload is,
|
|
10
|
+
* or why it was refused, and a button that takes it off.
|
|
11
|
+
*/
|
|
12
|
+
const PendingAttachments = ({ uploads, onRemove }) => /* @__PURE__ */ jsx("ul", {
|
|
13
|
+
"aria-label": text("filesToSend"),
|
|
14
|
+
className: "flex flex-wrap gap-2",
|
|
15
|
+
children: uploads.map((upload) => /* @__PURE__ */ jsxs("li", {
|
|
16
|
+
className: "flex max-w-full items-center gap-1 rounded-md border border-border py-0.5 pl-2 text-sm",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "min-w-0 max-w-48 truncate",
|
|
20
|
+
children: upload.name
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx("span", {
|
|
23
|
+
role: upload.refusal === void 0 ? void 0 : "alert",
|
|
24
|
+
className: cn("min-w-0", upload.refusal === void 0 ? "text-muted-foreground" : "text-danger-text"),
|
|
25
|
+
children: uploadState(upload)
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ jsx(Button, {
|
|
28
|
+
type: "button",
|
|
29
|
+
variant: "ghost",
|
|
30
|
+
size: "icon",
|
|
31
|
+
"aria-label": text("takeFileOff", { name: upload.name }),
|
|
32
|
+
title: text("takeFileOff", { name: upload.name }),
|
|
33
|
+
onClick: () => onRemove(upload.key),
|
|
34
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
}, upload.key))
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { PendingAttachments };
|
|
@@ -8,9 +8,9 @@ import { ChatDivider } from "../../chat/chat-divider.js";
|
|
|
8
8
|
import { ChatThread } from "../../chat/chat-thread.js";
|
|
9
9
|
import { SidePanel } from "../../side-panel/side-panel.js";
|
|
10
10
|
import { keyValue } from "../create/create-values.js";
|
|
11
|
+
import { text } from "./messages.js";
|
|
11
12
|
import { MessageComposer } from "../conversation/message-composer.js";
|
|
12
13
|
import { authorOf } from "../conversation/thread-items.js";
|
|
13
|
-
import { text } from "./messages.js";
|
|
14
14
|
import { ConversationMessage } from "./conversation-message.js";
|
|
15
15
|
import { repliesRequest } from "./conversation-reads.js";
|
|
16
16
|
import { conversationRows } from "./conversation-rows.js";
|
|
@@ -35,14 +35,14 @@ const ThreadPanel = ({ page, owner, recordKey: recordKey$1, first, me, searchPeo
|
|
|
35
35
|
});
|
|
36
36
|
const oldestFirst = withLabels(resources, model, senders, list.items, list.labels).reverse();
|
|
37
37
|
const key = (row) => String(recordKey(model, row));
|
|
38
|
-
const { setup, reactionsError } = useMessageSetup({
|
|
38
|
+
const { setup, reactionsError, attachmentsError } = useMessageSetup({
|
|
39
39
|
page,
|
|
40
40
|
me,
|
|
41
41
|
pages: [[first], ...(list.data?.pages ?? []).map((read) => read.items.map(key))],
|
|
42
42
|
searchPeople
|
|
43
43
|
});
|
|
44
44
|
const headRow = head.row;
|
|
45
|
-
const error = head.error ?? list.error ?? reactionsError;
|
|
45
|
+
const error = head.error ?? list.error ?? reactionsError ?? attachmentsError;
|
|
46
46
|
const rows = conversationRows(oldestFirst, {
|
|
47
47
|
key,
|
|
48
48
|
sender: page.sender,
|
|
@@ -62,7 +62,8 @@ const ThreadPanel = ({ page, owner, recordKey: recordKey$1, first, me, searchPeo
|
|
|
62
62
|
},
|
|
63
63
|
placeholder: text("replyPlaceholder"),
|
|
64
64
|
searchPeople,
|
|
65
|
-
mentions: page.mentions
|
|
65
|
+
mentions: page.mentions,
|
|
66
|
+
attachments: page.attachments
|
|
66
67
|
}),
|
|
67
68
|
children: [error && /* @__PURE__ */ jsx("div", {
|
|
68
69
|
className: "shrink-0 p-2",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/app/conversation-page/uploads.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A file picked for the next message: uploading while it has neither `ticket` nor `refusal`, `sent` bytes of it so
|
|
4
|
+
* far; ready to send with its `ticket`; or refused, before its upload or by the server, with why.
|
|
5
|
+
*/
|
|
6
|
+
export type Upload = {
|
|
7
|
+
key: number;
|
|
8
|
+
name: string;
|
|
9
|
+
size: number;
|
|
10
|
+
sent: number;
|
|
11
|
+
ticket?: string;
|
|
12
|
+
refusal?: string;
|
|
13
|
+
};
|
|
14
|
+
/** Why a file is refused before it uploads, or `undefined` when it fits `maxSize`, the file field's limit in bytes. */
|
|
15
|
+
export declare const refusalOf: (file: {
|
|
16
|
+
name: string;
|
|
17
|
+
size: number;
|
|
18
|
+
}, maxSize: number | undefined) => string | undefined;
|
|
19
|
+
/** The uploads `files` start, numbered from `firstKey`, each one larger than `maxSize` refused at once. */
|
|
20
|
+
export declare const uploadsOf: (files: readonly {
|
|
21
|
+
name: string;
|
|
22
|
+
size: number;
|
|
23
|
+
}[], firstKey: number, maxSize: number | undefined) => Upload[];
|
|
24
|
+
/** Whether a file is still on its way. */
|
|
25
|
+
export declare const isUploading: (upload: Upload) => boolean;
|
|
26
|
+
/** The tickets of the finished uploads, which the message's write sends as its files. */
|
|
27
|
+
export declare const ticketsOf: (uploads: readonly Upload[]) => string[];
|
|
28
|
+
/** Whether the message may go without text: a file is uploaded and none is still on its way. */
|
|
29
|
+
export declare const hasFilesToSend: (uploads: readonly Upload[]) => boolean;
|
|
30
|
+
/** What a picked file says beside its name: why it was refused, how far its upload is, or its size once uploaded. */
|
|
31
|
+
export declare const uploadState: (upload: Upload) => string;
|
|
32
|
+
//#endregion
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { formatSize } from "../../live/file-values.js";
|
|
2
|
+
import { text } from "./messages.js";
|
|
3
|
+
//#region src/app/conversation-page/uploads.ts
|
|
4
|
+
/** Why a file is refused before it uploads, or `undefined` when it fits `maxSize`, the file field's limit in bytes. */
|
|
5
|
+
const refusalOf = (file, maxSize) => {
|
|
6
|
+
if (maxSize === void 0 || file.size <= maxSize) return;
|
|
7
|
+
return text("fileTooLarge", {
|
|
8
|
+
size: formatSize(file.size),
|
|
9
|
+
max: formatSize(maxSize)
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
/** The uploads `files` start, numbered from `firstKey`, each one larger than `maxSize` refused at once. */
|
|
13
|
+
const uploadsOf = (files, firstKey, maxSize) => files.map((file, index) => ({
|
|
14
|
+
key: firstKey + index,
|
|
15
|
+
name: file.name,
|
|
16
|
+
size: file.size,
|
|
17
|
+
sent: 0,
|
|
18
|
+
refusal: refusalOf(file, maxSize)
|
|
19
|
+
}));
|
|
20
|
+
/** Whether a file is still on its way. */
|
|
21
|
+
const isUploading = (upload) => upload.ticket === void 0 && upload.refusal === void 0;
|
|
22
|
+
/** The tickets of the finished uploads, which the message's write sends as its files. */
|
|
23
|
+
const ticketsOf = (uploads) => uploads.flatMap((upload) => upload.ticket === void 0 ? [] : [upload.ticket]);
|
|
24
|
+
/** Whether the message may go without text: a file is uploaded and none is still on its way. */
|
|
25
|
+
const hasFilesToSend = (uploads) => !uploads.some(isUploading) && ticketsOf(uploads).length > 0;
|
|
26
|
+
/** What a picked file says beside its name: why it was refused, how far its upload is, or its size once uploaded. */
|
|
27
|
+
const uploadState = (upload) => {
|
|
28
|
+
if (upload.refusal !== void 0) return upload.refusal;
|
|
29
|
+
if (upload.ticket !== void 0 || upload.size === 0) return formatSize(upload.size);
|
|
30
|
+
return text("uploadedPercent", { percent: Math.floor(Math.min(upload.sent, upload.size) / upload.size * 100) });
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { hasFilesToSend, isUploading, refusalOf, ticketsOf, uploadState, uploadsOf };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Upload } from "./uploads.js";
|
|
2
|
+
import { AttachmentsModel } from "@protobase/schema";
|
|
3
|
+
//#region src/app/conversation-page/use-attachment-uploads.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The files picked for the next message, each uploaded through the client's upload to the attachments' file field as
|
|
6
|
+
* soon as it is picked, so sending waits only for those still on their way. One larger than the field's limit is
|
|
7
|
+
* refused before it uploads; the server's own refusal shows on its file. `pick` adds files, `remove` takes one off and
|
|
8
|
+
* stops its upload, and `sent` takes off the files a message carried, with those refused. Without attachments, it
|
|
9
|
+
* holds nothing.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useAttachmentUploads: (attachments: AttachmentsModel | undefined) => {
|
|
12
|
+
uploads: Upload[];
|
|
13
|
+
tickets: string[];
|
|
14
|
+
uploading: boolean;
|
|
15
|
+
ready: boolean;
|
|
16
|
+
pick: (files: readonly File[]) => void;
|
|
17
|
+
remove: (key: number) => void;
|
|
18
|
+
sent: (tickets: readonly string[]) => void;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useClient } from "../../data/api-provider.js";
|
|
2
|
+
import { useAdminMeta } from "../meta-gate.js";
|
|
3
|
+
import { refusalReason } from "../displays/board-columns.js";
|
|
4
|
+
import { text } from "./messages.js";
|
|
5
|
+
import { hasFilesToSend, isUploading, ticketsOf, uploadsOf } from "./uploads.js";
|
|
6
|
+
import { useEffect, useRef, useState } from "react";
|
|
7
|
+
//#region src/app/conversation-page/use-attachment-uploads.ts
|
|
8
|
+
/**
|
|
9
|
+
* The files picked for the next message, each uploaded through the client's upload to the attachments' file field as
|
|
10
|
+
* soon as it is picked, so sending waits only for those still on their way. One larger than the field's limit is
|
|
11
|
+
* refused before it uploads; the server's own refusal shows on its file. `pick` adds files, `remove` takes one off and
|
|
12
|
+
* stops its upload, and `sent` takes off the files a message carried, with those refused. Without attachments, it
|
|
13
|
+
* holds nothing.
|
|
14
|
+
*/
|
|
15
|
+
const useAttachmentUploads = (attachments) => {
|
|
16
|
+
const client = useClient();
|
|
17
|
+
const { resources } = useAdminMeta();
|
|
18
|
+
const maxSize = attachments && resources[attachments.resource]?.fields[attachments.file]?.file?.maxSize;
|
|
19
|
+
const [uploads, setUploads] = useState([]);
|
|
20
|
+
const nextKey = useRef(0);
|
|
21
|
+
const stops = useRef(/* @__PURE__ */ new Map());
|
|
22
|
+
const change = (key, patch) => setUploads((current) => current.map((upload) => upload.key === key ? {
|
|
23
|
+
...upload,
|
|
24
|
+
...patch
|
|
25
|
+
} : upload));
|
|
26
|
+
const start = (attached, upload, file) => {
|
|
27
|
+
const stop = new AbortController();
|
|
28
|
+
stops.current.set(upload.key, stop);
|
|
29
|
+
client.upload(attached.resource, attached.file, file, {
|
|
30
|
+
signal: stop.signal,
|
|
31
|
+
onProgress: (sent) => change(upload.key, { sent })
|
|
32
|
+
}).then((result) => change(upload.key, { ticket: result.value }), (error) => {
|
|
33
|
+
if (stop.signal.aborted) return;
|
|
34
|
+
change(upload.key, { refusal: text("fileNotUploaded", { reason: refusalReason(error) }) });
|
|
35
|
+
}).finally(() => stops.current.delete(upload.key));
|
|
36
|
+
};
|
|
37
|
+
const pick = (files) => {
|
|
38
|
+
if (!attachments || files.length === 0) return;
|
|
39
|
+
const added = uploadsOf(files, nextKey.current, maxSize);
|
|
40
|
+
nextKey.current += files.length;
|
|
41
|
+
setUploads((current) => [...current, ...added]);
|
|
42
|
+
added.forEach((upload, index) => {
|
|
43
|
+
if (upload.refusal === void 0) start(attachments, upload, files[index]);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const remove = (key) => {
|
|
47
|
+
stops.current.get(key)?.abort();
|
|
48
|
+
setUploads((current) => current.filter((upload) => upload.key !== key));
|
|
49
|
+
};
|
|
50
|
+
const sent = (tickets) => setUploads((current) => current.filter((upload) => isUploading(upload) || upload.ticket !== void 0 && !tickets.includes(upload.ticket)));
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
const running = stops.current;
|
|
53
|
+
return () => running.forEach((stop) => stop.abort());
|
|
54
|
+
}, []);
|
|
55
|
+
return {
|
|
56
|
+
uploads,
|
|
57
|
+
tickets: ticketsOf(uploads),
|
|
58
|
+
uploading: uploads.some(isUploading),
|
|
59
|
+
ready: hasFilesToSend(uploads),
|
|
60
|
+
pick,
|
|
61
|
+
remove,
|
|
62
|
+
sent
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { useAttachmentUploads };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Attachment } from "./attachments.js";
|
|
2
|
+
import { AttachmentsModel } from "@protobase/schema";
|
|
3
|
+
//#region src/app/conversation-page/use-message-attachments.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The files of the messages shown, read with the reader's own access in one batch per page of messages, never one read
|
|
6
|
+
* per message, and read again when the files' resource changes, as a sent or deleted message's do: `byMessage` holds
|
|
7
|
+
* each message's files by its key. Without attachments, nothing is read.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useMessageAttachments: (attachments: AttachmentsModel | undefined, pages: readonly (readonly string[])[]) => {
|
|
10
|
+
byMessage: Map<string, Attachment[]>;
|
|
11
|
+
error: Error | undefined;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { keys } from "../../data/query-keys.js";
|
|
2
|
+
import { useClient } from "../../data/api-provider.js";
|
|
3
|
+
import { useAdminMeta } from "../meta-gate.js";
|
|
4
|
+
import { attachmentsByMessage } from "./attachments.js";
|
|
5
|
+
import { ofMessagesFilter, readOfMessages } from "./conversation-reads.js";
|
|
6
|
+
import { useQueries } from "@tanstack/react-query";
|
|
7
|
+
//#region src/app/conversation-page/use-message-attachments.ts
|
|
8
|
+
/**
|
|
9
|
+
* The files of the messages shown, read with the reader's own access in one batch per page of messages, never one read
|
|
10
|
+
* per message, and read again when the files' resource changes, as a sent or deleted message's do: `byMessage` holds
|
|
11
|
+
* each message's files by its key. Without attachments, nothing is read.
|
|
12
|
+
*/
|
|
13
|
+
const useMessageAttachments = (attachments, pages) => {
|
|
14
|
+
const client = useClient();
|
|
15
|
+
const { resources } = useAdminMeta();
|
|
16
|
+
const results = useQueries({ queries: (attachments ? pages.filter((page) => page.length > 0) : []).map((page) => ({
|
|
17
|
+
queryKey: keys.attachmentsOf(attachments.resource, ofMessagesFilter(attachments, page)),
|
|
18
|
+
queryFn: () => readOfMessages(client, attachments, page)
|
|
19
|
+
})) });
|
|
20
|
+
const model = attachments && resources[attachments.resource];
|
|
21
|
+
const rows = results.flatMap((result) => result.data ?? []);
|
|
22
|
+
return {
|
|
23
|
+
byMessage: attachments && model ? attachmentsByMessage(rows, model, attachments) : /* @__PURE__ */ new Map(),
|
|
24
|
+
error: results.find((result) => result.error)?.error ?? void 0
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { useMessageAttachments };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keys } from "../../data/query-keys.js";
|
|
2
2
|
import { useClient } from "../../data/api-provider.js";
|
|
3
3
|
import { reactionsByMessage } from "./reactions.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ofMessagesFilter, readOfMessages } from "./conversation-reads.js";
|
|
5
5
|
import { useQueries } from "@tanstack/react-query";
|
|
6
6
|
//#region src/app/conversation-page/use-message-reactions.ts
|
|
7
7
|
/**
|
|
@@ -11,8 +11,8 @@ import { useQueries } from "@tanstack/react-query";
|
|
|
11
11
|
const useMessageReactions = (reactions, pages) => {
|
|
12
12
|
const client = useClient();
|
|
13
13
|
const results = useQueries({ queries: (reactions ? pages.filter((page) => page.length > 0) : []).map((page) => ({
|
|
14
|
-
queryKey: keys.reactionsOf(reactions.resource,
|
|
15
|
-
queryFn: () =>
|
|
14
|
+
queryKey: keys.reactionsOf(reactions.resource, ofMessagesFilter(reactions, page)),
|
|
15
|
+
queryFn: () => readOfMessages(client, reactions, page)
|
|
16
16
|
})) });
|
|
17
17
|
const rows = results.flatMap((result) => result.data ?? []);
|
|
18
18
|
return {
|
|
@@ -6,14 +6,15 @@ import { AppAddress, ConversationPageModel } from "@protobase/schema";
|
|
|
6
6
|
type Input = {
|
|
7
7
|
page: ConversationPageModel;
|
|
8
8
|
me: string | undefined;
|
|
9
|
-
/** The keys of the messages shown, a list per page they were read in, whose reactions are read a page at a time. */
|
|
9
|
+
/** The keys of the messages shown, a list per page they were read in, whose reactions and files are read a page at a time. */
|
|
10
10
|
pages: readonly (readonly string[])[];
|
|
11
11
|
threadTo?: (key: string) => AppAddress;
|
|
12
12
|
searchPeople?: PeopleSearch;
|
|
13
13
|
};
|
|
14
|
-
/** The `MessageSetup` of the messages shown, with their reactions read, and the
|
|
14
|
+
/** The `MessageSetup` of the messages shown, with their reactions and files read, and the errors of those reads, if any. */
|
|
15
15
|
export declare const useMessageSetup: ({ page, me, pages, threadTo, searchPeople }: Input) => {
|
|
16
16
|
setup: MessageSetup;
|
|
17
17
|
reactionsError: Error | undefined;
|
|
18
|
+
attachmentsError: Error | undefined;
|
|
18
19
|
};
|
|
19
20
|
//#endregion
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useAdminMeta, usePermissions } from "../meta-gate.js";
|
|
2
2
|
import { useMembers } from "../../people/use-members.js";
|
|
3
3
|
import { emojiSet } from "./reactions.js";
|
|
4
|
+
import { useMessageAttachments } from "./use-message-attachments.js";
|
|
4
5
|
import { useMessageReactions } from "./use-message-reactions.js";
|
|
5
6
|
import { useMessageWrites } from "./use-message-writes.js";
|
|
6
7
|
//#region src/app/conversation-page/use-message-setup.ts
|
|
7
|
-
/** The `MessageSetup` of the messages shown, with their reactions read, and the
|
|
8
|
+
/** The `MessageSetup` of the messages shown, with their reactions and files read, and the errors of those reads, if any. */
|
|
8
9
|
const useMessageSetup = ({ page, me, pages, threadTo, searchPeople }) => {
|
|
9
10
|
const { resources } = useAdminMeta();
|
|
10
11
|
const { member } = useMembers();
|
|
@@ -12,6 +13,7 @@ const useMessageSetup = ({ page, me, pages, threadTo, searchPeople }) => {
|
|
|
12
13
|
const messagePermissions = usePermissions(page.resource);
|
|
13
14
|
const reactionPermissions = usePermissions(page.reactions?.resource ?? page.resource);
|
|
14
15
|
const reactions = useMessageReactions(page.reactions, pages);
|
|
16
|
+
const files = useMessageAttachments(page.attachments, pages);
|
|
15
17
|
const values = page.reactions ? resources[page.reactions.resource]?.fields[page.reactions.emoji]?.enumValues ?? [] : [];
|
|
16
18
|
return {
|
|
17
19
|
setup: {
|
|
@@ -23,10 +25,12 @@ const useMessageSetup = ({ page, me, pages, threadTo, searchPeople }) => {
|
|
|
23
25
|
messagePermissions,
|
|
24
26
|
reactionPermissions,
|
|
25
27
|
reactionsOf: (key) => reactions.byMessage.get(key) ?? [],
|
|
28
|
+
attachmentsOf: (key) => files.byMessage.get(key) ?? [],
|
|
26
29
|
threadTo,
|
|
27
30
|
searchPeople
|
|
28
31
|
},
|
|
29
|
-
reactionsError: reactions.error
|
|
32
|
+
reactionsError: reactions.error,
|
|
33
|
+
attachmentsError: files.error
|
|
30
34
|
};
|
|
31
35
|
};
|
|
32
36
|
//#endregion
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { Attachment } from "./attachments.js";
|
|
1
2
|
import { ConversationPageModel } from "@protobase/schema";
|
|
2
3
|
//#region src/app/conversation-page/use-message-writes.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* The writes a reader makes to a conversation's messages, each resolving whether the server took it: edit a message's
|
|
5
|
-
* text and mentions, delete one, and react to one or take a reaction back. A refused write changes nothing on screen
|
|
6
|
+
* text and mentions, delete one after its files, and react to one or take a reaction back. A refused write changes nothing on screen
|
|
6
7
|
* and shows the server's reason in a toast; a taken one reads the resource again.
|
|
7
8
|
*/
|
|
8
9
|
export declare const useMessageWrites: (page: ConversationPageModel) => {
|
|
9
10
|
edit: (key: string, body: string, mentions: string[]) => Promise<boolean>;
|
|
10
|
-
remove: (key: string) => Promise<boolean>;
|
|
11
|
+
remove: (key: string, files: readonly Attachment[]) => Promise<boolean>;
|
|
11
12
|
react: ((key: string, emoji: string) => Promise<boolean>) | undefined;
|
|
12
13
|
unreact: ((row: Record<string, unknown>) => Promise<boolean>) | undefined;
|
|
13
14
|
};
|
|
@@ -6,10 +6,11 @@ import { refusalReason } from "../displays/board-columns.js";
|
|
|
6
6
|
import { useRefreshResource } from "../pages/use-layout-data.js";
|
|
7
7
|
import { keyValue } from "../create/create-values.js";
|
|
8
8
|
import { text } from "./messages.js";
|
|
9
|
+
import { deleteOps } from "./message-ops.js";
|
|
9
10
|
//#region src/app/conversation-page/use-message-writes.ts
|
|
10
11
|
/**
|
|
11
12
|
* The writes a reader makes to a conversation's messages, each resolving whether the server took it: edit a message's
|
|
12
|
-
* text and mentions, delete one, and react to one or take a reaction back. A refused write changes nothing on screen
|
|
13
|
+
* text and mentions, delete one after its files, and react to one or take a reaction back. A refused write changes nothing on screen
|
|
13
14
|
* and shows the server's reason in a toast; a taken one reads the resource again.
|
|
14
15
|
*/
|
|
15
16
|
const useMessageWrites = (page) => {
|
|
@@ -34,7 +35,7 @@ const useMessageWrites = (page) => {
|
|
|
34
35
|
[page.text]: body,
|
|
35
36
|
...page.mentions !== void 0 && { [page.mentions]: mentions }
|
|
36
37
|
}, "*"));
|
|
37
|
-
const remove = (key) => run(page.resource, text("notDeleted"), () => client.remove(page.resource, key));
|
|
38
|
+
const remove = (key, files) => run(page.resource, text("notDeleted"), () => page.attachments && files.length > 0 ? client.batchWrite(deleteOps(page, model, key, files)) : client.remove(page.resource, key));
|
|
38
39
|
return {
|
|
39
40
|
edit,
|
|
40
41
|
remove,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/create/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "cancel" | "title" | "setByDatabase" | "submit" | "details" | "notSaved" | "subject" | "notCreated" | "otherFields" | "notAllowed" | "cannotCreate", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "cancel" | "title" | "setByDatabase" | "submit" | "details" | "notSaved" | "subject" | "notCreated" | "otherFields" | "notAllowed" | "cannotCreate", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/delete/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "cancel" | "working" | "
|
|
5
|
-
rich(id: "cancel" | "working" | "
|
|
4
|
+
(id: "cancel" | "working" | "done" | "progress" | "kept" | "delete" | "show" | "confirmTitle" | "deleteCount" | "confirmDescription" | "changedTitle" | "changedDescription" | "reviewChanges" | "deleteAnyway" | "noVisibleChanges" | "bulkConfirmTitle" | "bulkConfirmDescription" | "deleting" | "deleted" | "deletedOf" | "deletedToast" | "undo" | "restored" | "alreadyBack" | "couldNotRestore" | "couldNotDelete" | "changedSinceLoaded" | "stillPointAt", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "cancel" | "working" | "done" | "progress" | "kept" | "delete" | "show" | "confirmTitle" | "deleteCount" | "confirmDescription" | "changedTitle" | "changedDescription" | "reviewChanges" | "deleteAnyway" | "noVisibleChanges" | "bulkConfirmTitle" | "bulkConfirmDescription" | "deleting" | "deleted" | "deletedOf" | "deletedToast" | "undo" | "restored" | "alreadyBack" | "couldNotRestore" | "couldNotDelete" | "changedSinceLoaded" | "stillPointAt", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -16,10 +16,10 @@ type BoardProps = {
|
|
|
16
16
|
/**
|
|
17
17
|
* A column per value of the board's enum field, each loading its own records through the list API, with their count.
|
|
18
18
|
* When the list's `drag.board` is on, a card dragged, or moved with the keyboard, to another column saves the record
|
|
19
|
-
* with that column's value;
|
|
20
|
-
*
|
|
21
|
-
* and when `drag.rank` is on a card is dropped at
|
|
22
|
-
* the drop renumbers the cards before it. Each change says so with **Undo**.
|
|
19
|
+
* with that column's value; as `{ set, columns }` in the `set` field, only between the `columns` it names; when it names
|
|
20
|
+
* a board drop of the UI config, only between the columns it names, each running its own write. When the resource has
|
|
21
|
+
* a position, its records ordered as one, the columns are in its order, and when `drag.rank` is on a card is dropped at
|
|
22
|
+
* a place: the up and down arrow keys move it within its column, and the drop renumbers the cards before it. Each change says so with **Undo**.
|
|
23
23
|
*/
|
|
24
24
|
export declare const BoardDisplay: ({ model, view, display, fields, filter, orderBy, limit }: BoardProps) => import("react").JSX.Element;
|
|
25
25
|
//#endregion
|