@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../locale/messages.js";
|
|
2
2
|
//#region src/account/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "password" | "passkey" | "email" | "code" | "loading" | "staff" | "name" | "cancel" | "as" | "account" | "mailbox" | "ended" | "noDevices" | "remove" | "revoke" | "copied" | "continue" | "connected" | "connections" | "default" | "edit" | "reset" | "done" | "copy" | "connect" | "connectAgain" | "required" | "save" | "signOut" | "otherAddress" | "off" | "download" | "on" | "optional" | "twoFactor" | "backupCodes" | "changeEmail" | "changePassword" | "setPassword" | "newPassword" | "newEmail" | "currentPassword" | "signInPolicy" | "emailedCode" | "turnOn" | "turnOff" | "devices" | "stopped" | "noAccount" | "noAccountDescription" | "couldNotReadMethods" | "couldNotReadProfile" | "profile" | "profileDescription" | "changeName" | "changeNameDescription" | "changeEmailDescription" | "sendCode" | "codeSentTo" | "theProvider" | "yourPassword" | "passwordIsSet" | "passwordNotSet" | "passwordForbidden" | "passwordStaff" | "passwordSaved" | "repeatPassword" | "changeSignsOutOthers" | "atLeast" | "useAtLeast" | "passwordTooLong" | "passwordsDiffer" | "passkeys" | "passkeysAllowed" | "passkeysRequired" | "passkeysForbidden" | "addedOn" | "addedEarlier" | "synced" | "oneDevice" | "rename" | "keepLastPasskey" | "addPasskey" | "confirmedAddPasskey" | "renamePasskey" | "renamePasskeyDescription" | "removePasskey" | "removePasskeyDescription" | "thisPasskey" | "connectedAccounts" | "connectedAccountsDescription" | "mailboxDescription" | "fromAddresses" | "fromAddressesDescription" | "couldNotReadFromAddresses" | "mailboxOwnAddress" | "makeDefault" | "ownSignature" | "genericSignature" | "addFromAddress" | "addFromAddressDescription" | "changeFromAddressDescription" | "addAddress" | "fromAddress" | "fromAddressPlaceholder" | "fromName" | "fromNamePlaceholder" | "defaultFromAddress" | "signature" | "signaturePlaceholder" | "removeFromAddress" | "removeFromAddressDescription" | "connectionsDescription" | "connectedOn" | "connectionNeedsSignIn" | "connectionUsedBy" | "disconnect" | "disconnectTitle" | "disconnectDescription" | "disconnectWholeGrant" | "disconnectedRevoked" | "disconnectedQueued" | "disconnectedNotRevoked" | "signedInUntil" | "devicesDescription" | "couldNotReadDevices" | "thisDevice" | "browserOn" | "aBrowserOn" | "unknownDevice" | "staffOf" | "signedInFromUntil" | "signOutDevice" | "signOutDeviceDescription" | "signOutLinkedDeviceDescription" | "deviceThrough" | "linkedOn" | "signOutOthers" | "signOutOthersTitle" | "signOutOthersDescription" | "staffSignIns" | "staffSignInsDescription" | "noStaffSignIns" | "qrCode" | "twoFactorAllowed" | "twoFactorRequired" | "twoFactorForbidden" | "twoFactorOnWithApp" | "twoFactorOnWithAppOrMail" | "twoFactorOnWithMail" | "addAuthenticator" | "newBackupCodes" | "twoFactorIsRequired" | "turnOffTitle" | "turnOffDescription" | "newCodesTitle" | "newCodesDescription" | "makeNewCodes" | "yourNewCodes" | "keepCodesSafe" | "savedCodes" | "authenticatorApp" | "authenticatorAppDescription" | "emailedCodeDescription" | "twoFactorIsOn" | "scanCode" | "cannotScan" | "codeFromApp" | "secondStep" | "passwordDescription" | "emailedSignInCode" | "emailedSignInCodeDescription" | "passkeysPolicyDescription" | "twoFactorPolicyDescription" | "staffAccess" | "staffAccessDescription" | "emailThePerson" | "platformSignIn" | "platformSignInDescription" | "platformSignInWith" | "codeNeedsMail" | "passwordStaysOn" | "staffNeedsMail" | "platformOff" | "appliesAs" | "lastSaved" | "lastSavedBy" | "neverChanged" | "couldNotReadStaffSignIns" | "couldNotReadPolicy" | "policySaved" | "policySubtitle" | "mcpAddress" | "mcpAddressDescription" | "copyMcpAddress" | "accessTokens" | "accessTokensDescription" | "couldNotReadAccessTokens" | "noAccessTokens" | "newAccessToken" | "newAccessTokenDescription" | "accessTokenNamePlaceholder" | "accessTokenExpiry" | "expiresIn30Days" | "expiresIn90Days" | "expiresInAYear" | "neverExpires" | "createAccessToken" | "confirmedCreateAccessToken" | "accessTokenCreated" | "accessTokenCreatedDescription" | "copyAccessToken" | "noAnswerFromServer" | "copyRefused" | "createdOn" | "expiresOn" | "expiredOn" | "lastUsedOn" | "notUsedYet" | "actsAs" | "actsAsIn" | "revokeAccessToken" | "revokeAccessTokenDescription" | "addToClaude" | "deleteAccount" | "deleteAccountDescription" | "deleteAccountStaff" | "deleteAccountQuestion" | "deleteAccountWarning" | "deleteAccountPassword" | "deleteAccountConfirm" | "deleteAccountLastAdmin" | "deleteAccountLocked", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "password" | "passkey" | "email" | "code" | "loading" | "staff" | "name" | "cancel" | "as" | "account" | "mailbox" | "ended" | "noDevices" | "remove" | "revoke" | "copied" | "continue" | "connected" | "connections" | "default" | "edit" | "reset" | "done" | "copy" | "connect" | "connectAgain" | "required" | "save" | "signOut" | "otherAddress" | "off" | "download" | "on" | "optional" | "twoFactor" | "backupCodes" | "changeEmail" | "changePassword" | "setPassword" | "newPassword" | "newEmail" | "currentPassword" | "signInPolicy" | "emailedCode" | "turnOn" | "turnOff" | "devices" | "stopped" | "noAccount" | "noAccountDescription" | "couldNotReadMethods" | "couldNotReadProfile" | "profile" | "profileDescription" | "changeName" | "changeNameDescription" | "changeEmailDescription" | "sendCode" | "codeSentTo" | "theProvider" | "yourPassword" | "passwordIsSet" | "passwordNotSet" | "passwordForbidden" | "passwordStaff" | "passwordSaved" | "repeatPassword" | "changeSignsOutOthers" | "atLeast" | "useAtLeast" | "passwordTooLong" | "passwordsDiffer" | "passkeys" | "passkeysAllowed" | "passkeysRequired" | "passkeysForbidden" | "addedOn" | "addedEarlier" | "synced" | "oneDevice" | "rename" | "keepLastPasskey" | "addPasskey" | "confirmedAddPasskey" | "renamePasskey" | "renamePasskeyDescription" | "removePasskey" | "removePasskeyDescription" | "thisPasskey" | "connectedAccounts" | "connectedAccountsDescription" | "mailboxDescription" | "fromAddresses" | "fromAddressesDescription" | "couldNotReadFromAddresses" | "mailboxOwnAddress" | "makeDefault" | "ownSignature" | "genericSignature" | "addFromAddress" | "addFromAddressDescription" | "changeFromAddressDescription" | "addAddress" | "fromAddress" | "fromAddressPlaceholder" | "fromName" | "fromNamePlaceholder" | "defaultFromAddress" | "signature" | "signaturePlaceholder" | "removeFromAddress" | "removeFromAddressDescription" | "connectionsDescription" | "connectedOn" | "connectionNeedsSignIn" | "connectionUsedBy" | "disconnect" | "disconnectTitle" | "disconnectDescription" | "disconnectWholeGrant" | "disconnectedRevoked" | "disconnectedQueued" | "disconnectedNotRevoked" | "signedInUntil" | "devicesDescription" | "couldNotReadDevices" | "thisDevice" | "browserOn" | "aBrowserOn" | "unknownDevice" | "staffOf" | "signedInFromUntil" | "signOutDevice" | "signOutDeviceDescription" | "signOutLinkedDeviceDescription" | "deviceThrough" | "linkedOn" | "signOutOthers" | "signOutOthersTitle" | "signOutOthersDescription" | "staffSignIns" | "staffSignInsDescription" | "noStaffSignIns" | "qrCode" | "twoFactorAllowed" | "twoFactorRequired" | "twoFactorForbidden" | "twoFactorOnWithApp" | "twoFactorOnWithAppOrMail" | "twoFactorOnWithMail" | "addAuthenticator" | "newBackupCodes" | "twoFactorIsRequired" | "turnOffTitle" | "turnOffDescription" | "newCodesTitle" | "newCodesDescription" | "makeNewCodes" | "yourNewCodes" | "keepCodesSafe" | "savedCodes" | "authenticatorApp" | "authenticatorAppDescription" | "emailedCodeDescription" | "twoFactorIsOn" | "scanCode" | "cannotScan" | "codeFromApp" | "secondStep" | "passwordDescription" | "emailedSignInCode" | "emailedSignInCodeDescription" | "passkeysPolicyDescription" | "twoFactorPolicyDescription" | "staffAccess" | "staffAccessDescription" | "emailThePerson" | "platformSignIn" | "platformSignInDescription" | "platformSignInWith" | "codeNeedsMail" | "passwordStaysOn" | "staffNeedsMail" | "platformOff" | "appliesAs" | "lastSaved" | "lastSavedBy" | "neverChanged" | "couldNotReadStaffSignIns" | "couldNotReadPolicy" | "policySaved" | "policySubtitle" | "mcpAddress" | "mcpAddressDescription" | "copyMcpAddress" | "accessTokens" | "accessTokensDescription" | "couldNotReadAccessTokens" | "noAccessTokens" | "newAccessToken" | "newAccessTokenDescription" | "accessTokenNamePlaceholder" | "accessTokenExpiry" | "expiresIn30Days" | "expiresIn90Days" | "expiresInAYear" | "neverExpires" | "createAccessToken" | "confirmedCreateAccessToken" | "accessTokenCreated" | "accessTokenCreatedDescription" | "copyAccessToken" | "noAnswerFromServer" | "copyRefused" | "createdOn" | "expiresOn" | "expiredOn" | "lastUsedOn" | "notUsedYet" | "actsAs" | "actsAsIn" | "revokeAccessToken" | "revokeAccessTokenDescription" | "addToClaude" | "deleteAccount" | "deleteAccountDescription" | "deleteAccountStaff" | "deleteAccountQuestion" | "deleteAccountWarning" | "deleteAccountPassword" | "deleteAccountConfirm" | "deleteAccountLastAdmin" | "deleteAccountLocked", 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/activity-chart/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "day" | "week" | "couldNotLoad", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "day" | "week" | "couldNotLoad", 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/change-confirm/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "cancel" | "title" | "change", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "cancel" | "title" | "change", 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/charts/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "today" | "maximum" | "count" | "yes" | "no" | "sum" | "couldNotLoad" | "records" | "average" | "nothingYet" | "notSet" | "other" | "toToday" | "period" | "chartKeys", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "today" | "maximum" | "count" | "yes" | "no" | "sum" | "couldNotLoad" | "records" | "average" | "nothingYet" | "notSet" | "other" | "toToday" | "period" | "chartKeys", 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/confirm-sign-in-messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "password" | "emailCode" | "codeSent" | "
|
|
5
|
-
rich(id: "password" | "emailCode" | "codeSent" | "
|
|
4
|
+
(id: "password" | "emailCode" | "codeSent" | "confirmTitle" | "confirmWhy" | "confirmWhyChange" | "usePasskey" | "authenticatorCode" | "confirm" | "emailedCode" | "emailNewCode" | "nothingToConfirmWith", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "password" | "emailCode" | "codeSent" | "confirmTitle" | "confirmWhy" | "confirmWhyChange" | "usePasskey" | "authenticatorCode" | "confirm" | "emailedCode" | "emailNewCode" | "nothingToConfirmWith", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PeopleSearch } from "../../mentions/use-people-search.js";
|
|
2
2
|
import "../../mentions/index.js";
|
|
3
|
+
import { AttachmentsModel } from "@protobase/schema";
|
|
3
4
|
//#region src/app/conversation/message-composer.d.ts
|
|
4
5
|
export type MessageComposerProps = {
|
|
5
6
|
resource: string;
|
|
@@ -12,10 +13,14 @@ export type MessageComposerProps = {
|
|
|
12
13
|
searchPeople?: PeopleSearch;
|
|
13
14
|
/** The JSON field the ids of the people a message mentions go in. */
|
|
14
15
|
mentions?: string;
|
|
16
|
+
/** The files a message carries, picked, pasted or dropped in the box and uploaded at once. */
|
|
17
|
+
attachments?: AttachmentsModel;
|
|
15
18
|
};
|
|
16
19
|
/**
|
|
17
20
|
* A box that sends a message: each send creates a record of `resource` with the text in `field`, the ids of the people
|
|
18
|
-
* it mentions in `mentions` and the `values`, for a user who may create one.
|
|
21
|
+
* it mentions in `mentions` and the `values`, for a user who may create one. With `attachments`, a button left of the box
|
|
22
|
+
* picks files, and pasted and dropped ones join them: each uploads at once and shows above the box, the message waits
|
|
23
|
+
* for their uploads and is written with them in one batch, and once one is uploaded it may go without text.
|
|
19
24
|
*/
|
|
20
|
-
export declare const MessageComposer: ({ resource, field, values, placeholder, searchPeople, mentions }: MessageComposerProps) => import("react").JSX.Element | null;
|
|
25
|
+
export declare const MessageComposer: ({ resource, field, values, placeholder, searchPeople, mentions, attachments }: MessageComposerProps) => import("react").JSX.Element | null;
|
|
21
26
|
//#endregion
|
|
@@ -1,39 +1,54 @@
|
|
|
1
1
|
import { useClient } from "../../data/api-provider.js";
|
|
2
2
|
import { useAdminMeta, usePermissions } from "../meta-gate.js";
|
|
3
3
|
import { can } from "../permissions.js";
|
|
4
|
+
import { acceptOf } from "../../live/file-values.js";
|
|
4
5
|
import { ErrorBanner } from "../error-banner.js";
|
|
5
6
|
import { useRefreshResource } from "../pages/use-layout-data.js";
|
|
6
7
|
import { Composer } from "../../chat/composer.js";
|
|
8
|
+
import { AttachmentPicker } from "../conversation-page/attachment-picker.js";
|
|
9
|
+
import { sendOps } from "../conversation-page/message-ops.js";
|
|
10
|
+
import { PendingAttachments } from "../conversation-page/pending-attachments.js";
|
|
11
|
+
import { useAttachmentUploads } from "../conversation-page/use-attachment-uploads.js";
|
|
7
12
|
import { text } from "./messages.js";
|
|
8
13
|
import { useState } from "react";
|
|
9
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
15
|
//#region src/app/conversation/message-composer.tsx
|
|
11
16
|
/**
|
|
12
17
|
* A box that sends a message: each send creates a record of `resource` with the text in `field`, the ids of the people
|
|
13
|
-
* it mentions in `mentions` and the `values`, for a user who may create one.
|
|
18
|
+
* it mentions in `mentions` and the `values`, for a user who may create one. With `attachments`, a button left of the box
|
|
19
|
+
* picks files, and pasted and dropped ones join them: each uploads at once and shows above the box, the message waits
|
|
20
|
+
* for their uploads and is written with them in one batch, and once one is uploaded it may go without text.
|
|
14
21
|
*/
|
|
15
|
-
const MessageComposer = ({ resource, field, values, placeholder, searchPeople, mentions }) => {
|
|
22
|
+
const MessageComposer = ({ resource, field, values, placeholder, searchPeople, mentions, attachments }) => {
|
|
16
23
|
const { resources } = useAdminMeta();
|
|
17
24
|
const client = useClient();
|
|
18
25
|
const refresh = useRefreshResource();
|
|
19
26
|
const permissions = usePermissions(resource);
|
|
20
27
|
const [sending, setSending] = useState(false);
|
|
21
28
|
const [failure, setFailure] = useState();
|
|
29
|
+
const files = useAttachmentUploads(attachments);
|
|
22
30
|
if (!resources[resource] || !can(permissions, "create")) return null;
|
|
31
|
+
const fileField = attachments && resources[attachments.resource]?.fields[attachments.file];
|
|
32
|
+
const fileAccept = fileField && acceptOf(fileField);
|
|
23
33
|
const send = async (message, mentioned) => {
|
|
24
34
|
setSending(true);
|
|
25
35
|
setFailure(void 0);
|
|
26
|
-
const
|
|
36
|
+
const tickets = files.tickets;
|
|
37
|
+
const data = {
|
|
27
38
|
...values,
|
|
28
|
-
[field]: message,
|
|
39
|
+
...message !== "" && { [field]: message },
|
|
29
40
|
...mentions !== void 0 && { [mentions]: mentioned }
|
|
30
|
-
}
|
|
41
|
+
};
|
|
42
|
+
const sent = await (attachments && tickets.length > 0 ? client.batchWrite(sendOps(resource, data, attachments, tickets)) : client.create(resource, data)).then(() => true, (error) => {
|
|
31
43
|
setFailure(error);
|
|
32
44
|
return false;
|
|
33
45
|
});
|
|
34
46
|
setSending(false);
|
|
35
|
-
if (sent)
|
|
36
|
-
|
|
47
|
+
if (!sent) return false;
|
|
48
|
+
refresh(resource);
|
|
49
|
+
if (attachments) files.sent(tickets);
|
|
50
|
+
if (attachments && tickets.length > 0) refresh(attachments.resource);
|
|
51
|
+
return true;
|
|
37
52
|
};
|
|
38
53
|
return /* @__PURE__ */ jsxs("div", {
|
|
39
54
|
className: "flex flex-col gap-2",
|
|
@@ -42,9 +57,21 @@ const MessageComposer = ({ resource, field, values, placeholder, searchPeople, m
|
|
|
42
57
|
error: failure
|
|
43
58
|
}), /* @__PURE__ */ jsx(Composer, {
|
|
44
59
|
onSend: send,
|
|
45
|
-
busy: sending,
|
|
60
|
+
busy: sending || files.uploading,
|
|
46
61
|
placeholder,
|
|
47
|
-
searchPeople
|
|
62
|
+
searchPeople,
|
|
63
|
+
...attachments && {
|
|
64
|
+
actions: /* @__PURE__ */ jsx(AttachmentPicker, {
|
|
65
|
+
onPick: files.pick,
|
|
66
|
+
accept: fileAccept
|
|
67
|
+
}),
|
|
68
|
+
attachments: files.uploads.length > 0 && /* @__PURE__ */ jsx(PendingAttachments, {
|
|
69
|
+
uploads: files.uploads,
|
|
70
|
+
onRemove: files.remove
|
|
71
|
+
}),
|
|
72
|
+
canSendEmpty: files.ready,
|
|
73
|
+
onFiles: files.pick
|
|
74
|
+
}
|
|
48
75
|
})]
|
|
49
76
|
});
|
|
50
77
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageValue } from "../../locale/messages.js";
|
|
2
2
|
//#region src/app/conversation/messages.d.ts
|
|
3
3
|
export declare const text: {
|
|
4
|
-
(id: "
|
|
5
|
-
rich(id: "
|
|
4
|
+
(id: "notSent" | "couldNotLoad" | "noMessages" | "loadingMessages" | "callInput" | "callResult" | "callError" | "couldNotLoadCalls", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "notSent" | "couldNotLoad" | "noMessages" | "loadingMessages" | "callInput" | "callResult" | "callError" | "couldNotLoadCalls", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -8,7 +8,7 @@ type ThreadList = {
|
|
|
8
8
|
* What a thread shows of its list: the error only while no message has loaded, so a failed refetch keeps the messages
|
|
9
9
|
* on screen and the reader's place in them; then its loading line until the first page arrives; then the messages.
|
|
10
10
|
*/
|
|
11
|
-
export declare const threadState: (list: ThreadList) => "
|
|
11
|
+
export declare const threadState: (list: ThreadList) => "loading" | "error" | "messages";
|
|
12
12
|
/** What an empty thread says: its loading line while its calls still load, so it never says empty before they arrive. */
|
|
13
13
|
export declare const emptyLine: (calls: {
|
|
14
14
|
isLoading: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/app/conversation-page/attachment-picker.d.ts
|
|
2
|
+
type Props = {
|
|
3
|
+
onPick: (files: File[]) => void;
|
|
4
|
+
/** The file field's accepted types, as the file input takes them. */
|
|
5
|
+
accept?: string;
|
|
6
|
+
};
|
|
7
|
+
/** A button left of the message box that opens the browser's file picker, giving the files the reader picks. */
|
|
8
|
+
export declare const AttachmentPicker: ({ onPick, accept }: Props) => import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Button } from "../../primitives/button.js";
|
|
2
|
+
import { text } from "./messages.js";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { Paperclip } from "lucide-react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/app/conversation-page/attachment-picker.tsx
|
|
7
|
+
/** A button left of the message box that opens the browser's file picker, giving the files the reader picks. */
|
|
8
|
+
const AttachmentPicker = ({ onPick, accept }) => {
|
|
9
|
+
const input = useRef(null);
|
|
10
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("input", {
|
|
11
|
+
ref: input,
|
|
12
|
+
type: "file",
|
|
13
|
+
multiple: true,
|
|
14
|
+
hidden: true,
|
|
15
|
+
accept,
|
|
16
|
+
"aria-label": text("filesToAttach"),
|
|
17
|
+
onChange: (event) => {
|
|
18
|
+
onPick([...event.target.files ?? []]);
|
|
19
|
+
event.target.value = "";
|
|
20
|
+
}
|
|
21
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
22
|
+
type: "button",
|
|
23
|
+
variant: "ghost",
|
|
24
|
+
size: "icon",
|
|
25
|
+
"aria-label": text("attachFiles"),
|
|
26
|
+
title: text("attachFiles"),
|
|
27
|
+
onClick: () => input.current?.click(),
|
|
28
|
+
children: /* @__PURE__ */ jsx(Paperclip, { className: "size-4" })
|
|
29
|
+
})] });
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { AttachmentPicker };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { recordKey } from "../../live/model-helpers.js";
|
|
2
|
+
import { AttachmentsModel, ResourceModel } from "@protobase/schema";
|
|
3
|
+
//#region src/app/conversation-page/attachments.d.ts
|
|
4
|
+
type Row = Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* A file under a message, as its attachment record gives it: the record's key, which deletes it, the file's name, type
|
|
7
|
+
* and size from the file field's value, the signed link the API answers with it, `undefined` while the file is missing
|
|
8
|
+
* from storage, and an image's size in pixels where the record holds it.
|
|
9
|
+
*/
|
|
10
|
+
export type Attachment = {
|
|
11
|
+
key: ReturnType<typeof recordKey>;
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
size: number | undefined;
|
|
15
|
+
url: string | undefined;
|
|
16
|
+
width: number | undefined;
|
|
17
|
+
height: number | undefined;
|
|
18
|
+
};
|
|
19
|
+
/** The attachment record `row` as an `Attachment`; `undefined` for one with no file. */
|
|
20
|
+
export declare const attachmentOf: (row: Row, model: ResourceModel, attachments: AttachmentsModel) => Attachment | undefined;
|
|
21
|
+
/** Attachment rows by the key of the message they are in, as text, each message's in the order the rows came. */
|
|
22
|
+
export declare const attachmentsByMessage: (rows: readonly Row[], model: ResourceModel, attachments: AttachmentsModel) => Map<string, Attachment[]>;
|
|
23
|
+
/** Whether a file shows as an image under its message, rather than as a link that downloads it: a raster image with a link. */
|
|
24
|
+
export declare const isPreviewed: (attachment: Pick<Attachment, "type" | "url">) => boolean;
|
|
25
|
+
//#endregion
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { recordKey } from "../../live/model-helpers.js";
|
|
2
|
+
import { fileShown, isPreviewable } from "../../live/file-values.js";
|
|
3
|
+
//#region src/app/conversation-page/attachments.ts
|
|
4
|
+
const pixels = (value) => typeof value === "number" ? value : void 0;
|
|
5
|
+
/** The attachment record `row` as an `Attachment`; `undefined` for one with no file. */
|
|
6
|
+
const attachmentOf = (row, model, attachments) => {
|
|
7
|
+
const file = fileShown(row[attachments.file]);
|
|
8
|
+
if (!file) return;
|
|
9
|
+
const stored = "missing" in file ? void 0 : file;
|
|
10
|
+
return {
|
|
11
|
+
key: recordKey(model, row),
|
|
12
|
+
name: file.name,
|
|
13
|
+
type: file.type,
|
|
14
|
+
size: stored?.size,
|
|
15
|
+
url: stored?.url,
|
|
16
|
+
width: attachments.width === void 0 ? void 0 : pixels(row[attachments.width]),
|
|
17
|
+
height: attachments.height === void 0 ? void 0 : pixels(row[attachments.height])
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
/** Attachment rows by the key of the message they are in, as text, each message's in the order the rows came. */
|
|
21
|
+
const attachmentsByMessage = (rows, model, attachments) => {
|
|
22
|
+
const byMessage = /* @__PURE__ */ new Map();
|
|
23
|
+
for (const row of rows) {
|
|
24
|
+
const attachment = attachmentOf(row, model, attachments);
|
|
25
|
+
if (!attachment) continue;
|
|
26
|
+
const message = String(row[attachments.field]);
|
|
27
|
+
byMessage.set(message, [...byMessage.get(message) ?? [], attachment]);
|
|
28
|
+
}
|
|
29
|
+
return byMessage;
|
|
30
|
+
};
|
|
31
|
+
/** Whether a file shows as an image under its message, rather than as a link that downloads it: a raster image with a link. */
|
|
32
|
+
const isPreviewed = (attachment) => attachment.url !== void 0 && isPreviewable(attachment.type);
|
|
33
|
+
//#endregion
|
|
34
|
+
export { attachmentOf, attachmentsByMessage, isPreviewed };
|
|
@@ -2,8 +2,8 @@ import { cn } from "../../lib/cn.js";
|
|
|
2
2
|
import { buttonClass } from "../../primitives/button.js";
|
|
3
3
|
import { AppLink } from "../use-app-address.js";
|
|
4
4
|
import { CallMark } from "../../calls/call-mark.js";
|
|
5
|
-
import { MembersTitle } from "./members-title.js";
|
|
6
5
|
import { text } from "./messages.js";
|
|
6
|
+
import { MembersTitle } from "./members-title.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/app/conversation-page/conversation-header.tsx
|
|
9
9
|
/**
|
|
@@ -13,8 +13,8 @@ type Props = {
|
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* One message under its author, named after the organization's member with their id when there is one: its text with
|
|
16
|
-
* the people it mentions picked out as `MentionedText` does, or a box to change it while its author edits it;
|
|
17
|
-
* conversation itself its thread's replies; and a footer of "(edited)" once changed and its reactions. What the reader
|
|
16
|
+
* the people it mentions picked out as `MentionedText` does, or a box to change it while its author edits it; its files;
|
|
17
|
+
* in the conversation itself its thread's replies; and a footer of "(edited)" once changed and its reactions. What the reader
|
|
18
18
|
* can do to it shows in a bar while they point at it, or, by touch, in a sheet a tap or long-press opens, which also
|
|
19
19
|
* copies its text; a button only a keyboard or screen reader reaches opens that sheet on a touch screen too.
|
|
20
20
|
*/
|
|
@@ -7,6 +7,7 @@ import { text } from "./messages.js";
|
|
|
7
7
|
import { DeleteMessageDialog } from "./delete-message-dialog.js";
|
|
8
8
|
import { MessageActionsBar } from "./message-actions-bar.js";
|
|
9
9
|
import { MessageActionsSheet } from "./message-actions-sheet.js";
|
|
10
|
+
import { MessageAttachments } from "./message-attachments.js";
|
|
10
11
|
import { MessageEditor } from "./message-editor.js";
|
|
11
12
|
import { ReactionChips } from "./reaction-chips.js";
|
|
12
13
|
import { ThreadSummary } from "./thread-summary.js";
|
|
@@ -18,8 +19,8 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
18
19
|
const idsOf = (value) => Array.isArray(value) ? value.filter((id) => typeof id === "string") : [];
|
|
19
20
|
/**
|
|
20
21
|
* One message under its author, named after the organization's member with their id when there is one: its text with
|
|
21
|
-
* the people it mentions picked out as `MentionedText` does, or a box to change it while its author edits it;
|
|
22
|
-
* conversation itself its thread's replies; and a footer of "(edited)" once changed and its reactions. What the reader
|
|
22
|
+
* the people it mentions picked out as `MentionedText` does, or a box to change it while its author edits it; its files;
|
|
23
|
+
* in the conversation itself its thread's replies; and a footer of "(edited)" once changed and its reactions. What the reader
|
|
23
24
|
* can do to it shows in a bar while they point at it, or, by touch, in a sheet a tap or long-press opens, which also
|
|
24
25
|
* copies its text; a button only a keyboard or screen reader reaches opens that sheet on a touch screen too.
|
|
25
26
|
*/
|
|
@@ -32,6 +33,7 @@ const ConversationMessage = ({ setup, row, messageKey, author, time, continued }
|
|
|
32
33
|
const body = row[page.text] == null ? "" : String(row[page.text]);
|
|
33
34
|
const mine = me !== void 0 && author.id === me;
|
|
34
35
|
const name = member(author.id)?.name ?? author.name;
|
|
36
|
+
const files = setup.attachmentsOf(messageKey);
|
|
35
37
|
const mentionIds = page.mentions === void 0 ? [] : idsOf(row[page.mentions]);
|
|
36
38
|
const controls = useMessageControls(setup, {
|
|
37
39
|
row,
|
|
@@ -83,23 +85,27 @@ const ConversationMessage = ({ setup, row, messageKey, author, time, continued }
|
|
|
83
85
|
time,
|
|
84
86
|
continued,
|
|
85
87
|
footer,
|
|
86
|
-
children: [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
id
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
88
|
+
children: [
|
|
89
|
+
editing ? /* @__PURE__ */ jsx(MessageEditor, {
|
|
90
|
+
body,
|
|
91
|
+
picked: mentionIds.flatMap((id) => member(id) ? [{
|
|
92
|
+
id,
|
|
93
|
+
name: member(id).name
|
|
94
|
+
}] : []),
|
|
95
|
+
searchPeople: setup.searchPeople,
|
|
96
|
+
onSave: (changed, mentions) => setup.writes.edit(messageKey, changed, mentions),
|
|
97
|
+
onCancel: () => setEditing(false)
|
|
98
|
+
}) : body !== "" && /* @__PURE__ */ jsx(MentionedText, {
|
|
99
|
+
text: body,
|
|
100
|
+
mentions: mentionIds.map((id) => ({ name: member(id)?.name }))
|
|
101
|
+
}),
|
|
102
|
+
files.length > 0 && /* @__PURE__ */ jsx(MessageAttachments, { attachments: files }),
|
|
103
|
+
replies > 0 && controls.thread && /* @__PURE__ */ jsx(ThreadSummary, {
|
|
104
|
+
count: replies,
|
|
105
|
+
last,
|
|
106
|
+
to: controls.thread
|
|
107
|
+
})
|
|
108
|
+
]
|
|
103
109
|
})
|
|
104
110
|
]
|
|
105
111
|
}),
|
|
@@ -107,7 +113,7 @@ const ConversationMessage = ({ setup, row, messageKey, author, time, continued }
|
|
|
107
113
|
onClose: () => setDeleting(false),
|
|
108
114
|
onDelete: () => {
|
|
109
115
|
setDeleting(false);
|
|
110
|
-
setup.writes.remove(messageKey);
|
|
116
|
+
setup.writes.remove(messageKey, files);
|
|
111
117
|
}
|
|
112
118
|
}),
|
|
113
119
|
acting && !editing && /* @__PURE__ */ jsx(MessageActionsSheet, {
|
|
@@ -22,7 +22,8 @@ type Props = {
|
|
|
22
22
|
* The record's messages, the latest page with earlier ones on request, read with the reader's own access and their
|
|
23
23
|
* senders' names in the same read, kept current as the live updates tell of new, changed and deleted ones. They show
|
|
24
24
|
* once the read position is there too, so they open on the "New messages" line, and reading to the end moves it. They
|
|
25
|
-
* scroll in a box of their own, so the box that sends one stays in view. Their reactions are read a page at a
|
|
25
|
+
* scroll in a box of their own, so the box that sends one stays in view. Their reactions and files are read a page at a
|
|
26
|
+
* time.
|
|
26
27
|
*/
|
|
27
28
|
export declare const ConversationMessages: ({ page, model, recordKey, me, position, threadTo, searchPeople }: Props) => import("react").JSX.Element;
|
|
28
29
|
//#endregion
|
|
@@ -6,8 +6,8 @@ import { Quiet } from "../pages/blocks/card-frame.js";
|
|
|
6
6
|
import { listLabels, withLabels } from "../../live/relation-labels.js";
|
|
7
7
|
import { ChatDivider } from "../../chat/chat-divider.js";
|
|
8
8
|
import { ChatThread } from "../../chat/chat-thread.js";
|
|
9
|
-
import { retryOf, showsErrorAbove, threadState } from "../conversation/thread-state.js";
|
|
10
9
|
import { text } from "./messages.js";
|
|
10
|
+
import { retryOf, showsErrorAbove, threadState } from "../conversation/thread-state.js";
|
|
11
11
|
import { ConversationMessage } from "./conversation-message.js";
|
|
12
12
|
import { messagesRequest } from "./conversation-reads.js";
|
|
13
13
|
import { conversationRows, firstUnreadKey, highestKey } from "./conversation-rows.js";
|
|
@@ -19,7 +19,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
19
19
|
* The record's messages, the latest page with earlier ones on request, read with the reader's own access and their
|
|
20
20
|
* senders' names in the same read, kept current as the live updates tell of new, changed and deleted ones. They show
|
|
21
21
|
* once the read position is there too, so they open on the "New messages" line, and reading to the end moves it. They
|
|
22
|
-
* scroll in a box of their own, so the box that sends one stays in view. Their reactions are read a page at a
|
|
22
|
+
* scroll in a box of their own, so the box that sends one stays in view. Their reactions and files are read a page at a
|
|
23
|
+
* time.
|
|
23
24
|
*/
|
|
24
25
|
const ConversationMessages = ({ page, model, recordKey: recordKey$1, me, position, threadTo, searchPeople }) => {
|
|
25
26
|
const { resources, views } = useAdminMeta();
|
|
@@ -30,7 +31,7 @@ const ConversationMessages = ({ page, model, recordKey: recordKey$1, me, positio
|
|
|
30
31
|
});
|
|
31
32
|
const oldestFirst = withLabels(resources, model, senders, list.items, list.labels).reverse();
|
|
32
33
|
const key = (row) => String(recordKey(model, row));
|
|
33
|
-
const { setup, reactionsError } = useMessageSetup({
|
|
34
|
+
const { setup, reactionsError, attachmentsError } = useMessageSetup({
|
|
34
35
|
page,
|
|
35
36
|
me,
|
|
36
37
|
pages: (list.data?.pages ?? []).map((read) => read.items.map(key)),
|
|
@@ -79,6 +80,13 @@ const ConversationMessages = ({ page, model, recordKey: recordKey$1, me, positio
|
|
|
79
80
|
error: reactionsError
|
|
80
81
|
})
|
|
81
82
|
}),
|
|
83
|
+
attachmentsError !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
84
|
+
className: "shrink-0 p-2",
|
|
85
|
+
children: /* @__PURE__ */ jsx(ErrorBanner, {
|
|
86
|
+
title: text("couldNotLoadFiles"),
|
|
87
|
+
error: attachmentsError
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
82
90
|
/* @__PURE__ */ jsx(ChatThread, {
|
|
83
91
|
length: oldestFirst.length,
|
|
84
92
|
followKey: own?.key,
|
|
@@ -3,10 +3,10 @@ import { useAdminMeta } from "../meta-gate.js";
|
|
|
3
3
|
import { useMembers } from "../../people/use-members.js";
|
|
4
4
|
import { useRecordTitle } from "../titles/record-titles.js";
|
|
5
5
|
import { keyValue } from "../create/create-values.js";
|
|
6
|
+
import { text } from "./messages.js";
|
|
6
7
|
import { MessageComposer } from "../conversation/message-composer.js";
|
|
7
8
|
import { FullArea } from "../full-area-record.js";
|
|
8
9
|
import { ConversationCall } from "./conversation-call.js";
|
|
9
|
-
import { text } from "./messages.js";
|
|
10
10
|
import { ConversationHeader } from "./conversation-header.js";
|
|
11
11
|
import { ConversationMessages } from "./conversation-messages.js";
|
|
12
12
|
import { matchingMembers } from "./member-search.js";
|
|
@@ -80,7 +80,8 @@ const ConversationPage = ({ page, scope }) => {
|
|
|
80
80
|
values: { [page.field]: keyValue(scope.model, scope.key) },
|
|
81
81
|
placeholder: page.placeholder,
|
|
82
82
|
searchPeople,
|
|
83
|
-
mentions: page.mentions
|
|
83
|
+
mentions: page.mentions,
|
|
84
|
+
attachments: page.attachments
|
|
84
85
|
})
|
|
85
86
|
})
|
|
86
87
|
]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Client } from "@protobase/client";
|
|
2
|
-
import { ConversationPageModel,
|
|
2
|
+
import { ConversationPageModel, ReadPositionModel } from "@protobase/schema";
|
|
3
3
|
//#region src/app/conversation-page/conversation-reads.d.ts
|
|
4
4
|
/** How many messages a page of the conversation brings: the latest on opening, and each "Load earlier". */
|
|
5
5
|
export declare const conversationPageSize = 50;
|
|
6
|
-
/** How many
|
|
7
|
-
export declare const
|
|
6
|
+
/** How many records one read of a page of messages' reactions or files brings; a page with more reads on until it has them all. */
|
|
7
|
+
export declare const recordsPageSize = 500;
|
|
8
8
|
/**
|
|
9
9
|
* The read of a conversation's messages through the list API, with the reader's own access, so a message they may not
|
|
10
10
|
* read never shows: those whose relation holds the record's key, newest first, a page at a time. With threads, only
|
|
@@ -21,10 +21,15 @@ export declare const repliesRequest: (page: Pick<ConversationPageModel, "time">,
|
|
|
21
21
|
orderBy: string;
|
|
22
22
|
pageSize: number;
|
|
23
23
|
};
|
|
24
|
-
/** The
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
/** The records of a resource of the messages' own, such as their reactions or files, by its relation `field` to them. */
|
|
25
|
+
type OfMessages = {
|
|
26
|
+
resource: string;
|
|
27
|
+
field: string;
|
|
28
|
+
};
|
|
29
|
+
/** The filter of the records, such as reactions, of the messages keyed `messages`. */
|
|
30
|
+
export declare const ofMessagesFilter: (of: Pick<OfMessages, "field">, messages: readonly string[]) => string;
|
|
31
|
+
/** Every record, such as a reaction, of the messages keyed `messages`, in one read, or one per `recordsPageSize` of them. */
|
|
32
|
+
export declare const readOfMessages: (client: Pick<Client, "list">, of: OfMessages, messages: readonly string[]) => Promise<Record<string, unknown>[]>;
|
|
28
33
|
/**
|
|
29
34
|
* The read of the reader's own read position in a record, through the list API: the one whose relation holds the
|
|
30
35
|
* record's key and whose author, `author`, is `me`, even where the resource lets them read other people's.
|
|
@@ -4,8 +4,8 @@ import { createWhere, printFilter } from "@protobase/schema";
|
|
|
4
4
|
const where$1 = createWhere();
|
|
5
5
|
/** How many messages a page of the conversation brings: the latest on opening, and each "Load earlier". */
|
|
6
6
|
const conversationPageSize = 50;
|
|
7
|
-
/** How many
|
|
8
|
-
const
|
|
7
|
+
/** How many records one read of a page of messages' reactions or files brings; a page with more reads on until it has them all. */
|
|
8
|
+
const recordsPageSize = 500;
|
|
9
9
|
/**
|
|
10
10
|
* The read of a conversation's messages through the list API, with the reader's own access, so a message they may not
|
|
11
11
|
* read never shows: those whose relation holds the record's key, newest first, a page at a time. With threads, only
|
|
@@ -22,15 +22,15 @@ const repliesRequest = (page, thread, first) => ({
|
|
|
22
22
|
orderBy: threadSort(page.time),
|
|
23
23
|
pageSize: 50
|
|
24
24
|
});
|
|
25
|
-
/** The filter of the reactions
|
|
26
|
-
const
|
|
27
|
-
/** Every reaction
|
|
28
|
-
const
|
|
29
|
-
const filter =
|
|
25
|
+
/** The filter of the records, such as reactions, of the messages keyed `messages`. */
|
|
26
|
+
const ofMessagesFilter = (of, messages) => printFilter(where$1.in(of.field, [...messages]));
|
|
27
|
+
/** Every record, such as a reaction, of the messages keyed `messages`, in one read, or one per `recordsPageSize` of them. */
|
|
28
|
+
const readOfMessages = async (client, of, messages) => {
|
|
29
|
+
const filter = ofMessagesFilter(of, messages);
|
|
30
30
|
const rows = [];
|
|
31
31
|
let pageToken = "";
|
|
32
32
|
do {
|
|
33
|
-
const page = await client.list(
|
|
33
|
+
const page = await client.list(of.resource, {
|
|
34
34
|
filter,
|
|
35
35
|
pageSize: 500,
|
|
36
36
|
pageToken
|
|
@@ -46,4 +46,4 @@ const readReactions = async (client, reactions, messages) => {
|
|
|
46
46
|
*/
|
|
47
47
|
const ownPositionFilter = (position, recordKey, author, me) => printFilter(where$1.and(where$1.eq(position.field, recordKey), where$1.eq(author, me)));
|
|
48
48
|
//#endregion
|
|
49
|
-
export { conversationPageSize, messagesRequest,
|
|
49
|
+
export { conversationPageSize, messagesRequest, ofMessagesFilter, ownPositionFilter, readOfMessages, recordsPageSize, repliesRequest };
|