@protobase/ui 0.121.4 → 0.121.6
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/messages.d.ts +2 -2
- package/dist/app/conversation-page/conversation-message.d.ts +10 -7
- package/dist/app/conversation-page/conversation-message.js +107 -20
- package/dist/app/conversation-page/conversation-messages.d.ts +9 -3
- package/dist/app/conversation-page/conversation-messages.js +42 -26
- package/dist/app/conversation-page/conversation-page.d.ts +2 -1
- package/dist/app/conversation-page/conversation-page.js +51 -30
- package/dist/app/conversation-page/conversation-reads.d.ts +17 -3
- package/dist/app/conversation-page/conversation-reads.js +30 -4
- package/dist/app/conversation-page/delete-message-dialog.d.ts +7 -0
- package/dist/app/conversation-page/delete-message-dialog.js +22 -0
- package/dist/app/conversation-page/message-access.d.ts +19 -0
- package/dist/app/conversation-page/message-access.js +25 -0
- package/dist/app/conversation-page/message-actions-bar.d.ts +12 -0
- package/dist/app/conversation-page/message-actions-bar.js +57 -0
- package/dist/app/conversation-page/message-actions-sheet.d.ts +18 -0
- package/dist/app/conversation-page/message-actions-sheet.js +73 -0
- package/dist/app/conversation-page/message-controls.d.ts +19 -0
- package/dist/app/conversation-page/message-controls.js +0 -0
- package/dist/app/conversation-page/message-editor.d.ts +23 -0
- package/dist/app/conversation-page/message-editor.js +72 -0
- package/dist/app/conversation-page/message-press.d.ts +59 -0
- package/dist/app/conversation-page/message-press.js +55 -0
- package/dist/app/conversation-page/message-setup.d.ts +27 -0
- package/dist/app/conversation-page/message-setup.js +0 -0
- package/dist/app/conversation-page/messages.d.ts +2 -2
- package/dist/app/conversation-page/reaction-chips.d.ts +18 -0
- package/dist/app/conversation-page/reaction-chips.js +30 -0
- package/dist/app/conversation-page/reactions.d.ts +28 -0
- package/dist/app/conversation-page/reactions.js +31 -0
- package/dist/app/conversation-page/reply-labels.d.ts +4 -0
- package/dist/app/conversation-page/reply-labels.js +9 -0
- package/dist/app/conversation-page/thread-head.d.ts +4 -0
- package/dist/app/conversation-page/thread-head.js +5 -0
- package/dist/app/conversation-page/thread-panel.d.ts +25 -0
- package/dist/app/conversation-page/thread-panel.js +107 -0
- package/dist/app/conversation-page/thread-summary.d.ts +10 -0
- package/dist/app/conversation-page/thread-summary.js +26 -0
- package/dist/app/conversation-page/use-message-controls.d.ts +14 -0
- package/dist/app/conversation-page/use-message-controls.js +32 -0
- package/dist/app/conversation-page/use-message-press.d.ts +16 -0
- package/dist/app/conversation-page/use-message-press.js +88 -0
- package/dist/app/conversation-page/use-message-reactions.d.ts +13 -0
- package/dist/app/conversation-page/use-message-reactions.js +24 -0
- package/dist/app/conversation-page/use-message-setup.d.ts +19 -0
- package/dist/app/conversation-page/use-message-setup.js +33 -0
- package/dist/app/conversation-page/use-message-writes.d.ts +14 -0
- package/dist/app/conversation-page/use-message-writes.js +49 -0
- package/dist/app/conversation-page/use-thread-address.d.ts +13 -0
- package/dist/app/conversation-page/use-thread-address.js +29 -0
- package/dist/app/conversation-page/use-thread-head.d.ts +15 -0
- package/dist/app/conversation-page/use-thread-head.js +31 -0
- package/dist/app/create/messages.d.ts +2 -2
- package/dist/app/current-address.d.ts +1 -0
- package/dist/app/current-address.js +2 -1
- package/dist/app/custom-section.d.ts +1 -1
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/list-cards.d.ts +1 -1
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/embedded-list/messages.d.ts +2 -2
- 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/runner-install/messages.d.ts +2 -2
- package/dist/app/field-types/widget-part.d.ts +1 -1
- 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/hand-order/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/list-edit/messages.d.ts +2 -2
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/meta-gate-messages.d.ts +2 -2
- package/dist/app/new-version/messages.d.ts +2 -2
- package/dist/app/pages/custom-boundary.d.ts +1 -1
- package/dist/app/pages/custom-chosen.d.ts +1 -1
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-mode/shown-layout.d.ts +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/saved/saved-list.d.ts +1 -1
- 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/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/column-spec.d.ts +1 -1
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/format/messages.d.ts +2 -2
- package/dist/forms/messages.d.ts +2 -2
- package/dist/invitations/messages.d.ts +2 -2
- package/dist/locale/en.js +33 -1
- package/dist/locale/en.json.d.ts +32 -0
- package/dist/locale/messages.d.ts +64 -0
- package/dist/locale/nl.js +33 -1
- package/dist/locale/texts-gate.d.ts +1 -1
- package/dist/mailbox/messages.d.ts +2 -2
- package/dist/mentions/messages.d.ts +2 -2
- package/dist/mocks/orders.d.ts +1 -1
- 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/before-sign-in.d.ts +1 -1
- package/dist/primitives/messages.d.ts +2 -2
- package/dist/record-view/messages.d.ts +2 -2
- package/dist/shell/assets/{account-page-DUZhZTQe.js → account-page-D1S57VfK.js} +2 -2
- package/dist/shell/assets/{app-CWCg5I0x.js → app-2d0YQdR7.js} +7 -7
- package/dist/shell/assets/app-Cv0aTDUz.css +2 -0
- package/dist/shell/assets/{assistant-shell-BB-qTSNN.js → assistant-shell-Bb0KRa8E.js} +2 -2
- package/dist/shell/assets/board-display-B0hMSJLc.js +2 -0
- package/dist/shell/assets/calendar-display-DNTXJ2Lj.js +2 -0
- package/dist/shell/assets/{call-rings-CMu9LCVA.js → call-rings-D2efFDY-.js} +2 -2
- package/dist/shell/assets/{calls-CAwUiNFC.js → calls-mmgOyL_n.js} +2 -2
- package/dist/shell/assets/{circle-alert-DBbXAqFr.js → circle-alert-BWBUUk9M.js} +2 -2
- package/dist/shell/assets/{composed-page-CDZcDEpb.js → composed-page-jwnPyg2o.js} +2 -2
- package/dist/shell/assets/{composer-section-BLXex8WX.js → composer-section-raPl4Mf_.js} +2 -2
- package/dist/shell/assets/{connect-route-DMz3C4cs.js → connect-route-DnTRKFdW.js} +2 -2
- package/dist/shell/assets/{copy-field-D0wtSWzb.js → copy-field-BtAsyigB.js} +2 -2
- package/dist/shell/assets/create-route-CEuERj3K.js +2 -0
- package/dist/shell/assets/{custom-step-container-field-B2IfCGAR.js → custom-step-container-field-B1RXdjeH.js} +4 -4
- package/dist/shell/assets/embedded-list-BIvBUQCm.js +3 -0
- package/dist/shell/assets/en-_QUqgkv9.js +2 -0
- package/dist/shell/assets/{export-dialog-Ogugn53w.js → export-dialog-BibbA1JE.js} +2 -2
- package/dist/shell/assets/export-worker-BUvAe-pU.js +15 -0
- package/dist/shell/assets/{first-organization-page-C4-rQ_I2.js → first-organization-page-DgL_N1W1.js} +2 -2
- package/dist/shell/assets/{graph-view-CzTg5srj.js → graph-view-D5uSsu67.js} +2 -2
- package/dist/shell/assets/{group-donut-3ebIs5gF.js → group-donut-BeAjogon.js} +2 -2
- package/dist/shell/assets/{guest-call-page-CD0LJIht.js → guest-call-page-DXOfa3rF.js} +3 -3
- package/dist/shell/assets/{html-viewer-BYJGABwQ.js → html-viewer-SuYrL7fw.js} +2 -2
- package/dist/shell/assets/{import-dialog-BpUqiIUH.js → import-dialog-DjMoHP8N.js} +2 -2
- package/dist/shell/assets/import-table-dialog-45beoZDX.js +2 -0
- package/dist/shell/assets/{index-k2uQ-7c-.js → index-CH_1Ns3R.js} +1 -1
- package/dist/shell/assets/{invitations-page-BsN4z7EC.js → invitations-page-CwtY8Tbq.js} +2 -2
- package/dist/shell/assets/{layout-grid-DvW29fH0.js → layout-grid-DSS3tNid.js} +2 -2
- package/dist/shell/assets/{legend-item-CuD1ms2_.js → legend-item--JCuOrBW.js} +2 -2
- package/dist/shell/assets/list-page-Do4wAJXr.js +4 -0
- package/dist/shell/assets/{maplibre-DWK2ok5e.js → maplibre-DmuZi_YZ.js} +2 -2
- package/dist/shell/assets/{markdown-content-HRnOc3WU.js → markdown-content-B0lkEYGr.js} +2 -2
- package/dist/shell/assets/members-page-BaLe1e4J.js +2 -0
- package/dist/shell/assets/{message-content-ypqgAMEt.js → message-content-JJSKhX2W.js} +3 -3
- package/dist/shell/assets/messages-BaKmueMc.js +2 -0
- package/dist/shell/assets/nl-B7S2-35v.js +2 -0
- package/dist/shell/assets/organization-page-CIML07Cz.js +2 -0
- package/dist/shell/assets/organizations-page-Cctkt6cu.js +2 -0
- package/dist/shell/assets/parse-worker-BXZM3e8_.js +35 -0
- package/dist/shell/assets/{pending-invitation-row-1zBmAsKC.js → pending-invitation-row-xf_wfIQ2.js} +2 -2
- package/dist/shell/assets/{period-chart-Mcf3pdtE.js → period-chart-Cuw7AISK.js} +2 -2
- package/dist/shell/assets/{person-row-Dg1T6u1A.js → person-row-DtXuek5W.js} +2 -2
- package/dist/shell/assets/public-form-page-noW7JMKv.js +2 -0
- package/dist/shell/assets/{record-lines-B4MMhxps.js → record-lines-B-Wll3-R.js} +2 -2
- package/dist/shell/assets/{record-map-C8o8jmlo.js → record-map-D6Yog0Uu.js} +2 -2
- package/dist/shell/assets/{record-opens-Ds_etNOv.js → record-opens-Cy15Gu5o.js} +2 -2
- package/dist/shell/assets/record-page-Bo0pD8vx.js +3 -0
- package/dist/shell/assets/{record-preview-C2bjzVoh.js → record-preview-CDgsSTFF.js} +2 -2
- package/dist/shell/assets/{records-map-DT_SwhgY.js → records-map-CV5k8jcU.js} +2 -2
- package/dist/shell/assets/render-node-CtZZjLGx.js +3 -0
- package/dist/shell/assets/reorder-button-DHV9_n1M.js +2 -0
- package/dist/shell/assets/{run-trace-view-CScFddUb.js → run-trace-view-DOyzvKTV.js} +2 -2
- package/dist/shell/assets/{runner-install-field-DyyHVUfd.js → runner-install-field-CJberN6i.js} +2 -2
- package/dist/shell/assets/{runtime-update-CuLL4Qbm.js → runtime-update-DiRL2UEA.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-Bq-qMwVs.js +1 -0
- package/dist/shell/assets/{sheet-source-IXyzIyO8.js → sheet-source-xZ9l3FLl.js} +3 -3
- package/dist/shell/assets/sign-in-policy-page-BUKwvVFG.js +2 -0
- package/dist/shell/assets/start-block-queries-s1eLXHpW.js +2 -0
- package/dist/shell/assets/step-catalog-BvlUh62_.js +2 -0
- package/dist/shell/assets/{step-panel-CA5-2Doz.js → step-panel-BGJiJ7z6.js} +2 -2
- package/dist/shell/assets/timeline-display-B_xs7U-p.js +2 -0
- package/dist/shell/assets/{trash-Cd-g6Eyo.js → trash-BfWYOlBD.js} +2 -2
- package/dist/shell/assets/{update-set-DfPWNMBL.js → update-set-iwxyRxhm.js} +2 -2
- package/dist/shell/assets/use-calendar-move-Cd92WAhx.js +2 -0
- package/dist/shell/assets/{use-display-rows-CYGJYJrz.js → use-display-rows-HuX1NEhA.js} +2 -2
- package/dist/shell/assets/use-my-invitations-DaKmW2De.js +2 -0
- package/dist/shell/assets/{use-paged-search-cBs-xWuq.js → use-paged-search-DPuOZYVz.js} +2 -2
- package/dist/shell/assets/{use-run-trace-CSdKdxn9.js → use-run-trace-Dukz4W0q.js} +2 -2
- package/dist/shell/assets/{use-workflow-page-DGd_5JMB.js → use-workflow-page-Cgw-Aurp.js} +2 -2
- package/dist/shell/assets/{use-workflow-types-BQl6tPM-.js → use-workflow-types-B1NI4zqE.js} +2 -2
- package/dist/shell/assets/{workflow-canvas-DbLkc3zJ.js → workflow-canvas-B-IYnZVg.js} +4 -4
- package/dist/shell/assets/{workflow-field-DRAphvYG.js → workflow-field-BSH37gjx.js} +3 -3
- package/dist/shell/assets/{workflow-graph-editor-CzgoB1_t.js → workflow-graph-editor-C1U_7a-n.js} +2 -2
- package/dist/shell/assets/{workflow-run-field-CQf9E5e1.js → workflow-run-field-D_yV-Pdt.js} +3 -3
- package/dist/shell/assets/workflow-status-field-CIX3WM-W.js +2 -0
- package/dist/shell/assets/workflow-workbench-CoVlp47h.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-DUZhZTQe.js.map → account-page-D1S57VfK.js.map} +1 -1
- package/dist/shell-source-maps/assets/app-2d0YQdR7.js.map +1 -0
- package/dist/shell-source-maps/assets/{assistant-shell-BB-qTSNN.js.map → assistant-shell-Bb0KRa8E.js.map} +1 -1
- package/dist/shell-source-maps/assets/{board-display-DxdFR3Wq.js.map → board-display-B0hMSJLc.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calendar-display-uBGEfuIv.js.map → calendar-display-DNTXJ2Lj.js.map} +1 -1
- package/dist/shell-source-maps/assets/{call-rings-CMu9LCVA.js.map → call-rings-D2efFDY-.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calls-CAwUiNFC.js.map → calls-mmgOyL_n.js.map} +1 -1
- package/dist/shell-source-maps/assets/{circle-alert-DBbXAqFr.js.map → circle-alert-BWBUUk9M.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composed-page-CDZcDEpb.js.map → composed-page-jwnPyg2o.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composer-section-BLXex8WX.js.map → composer-section-raPl4Mf_.js.map} +1 -1
- package/dist/shell-source-maps/assets/{connect-route-DMz3C4cs.js.map → connect-route-DnTRKFdW.js.map} +1 -1
- package/dist/shell-source-maps/assets/{copy-field-D0wtSWzb.js.map → copy-field-BtAsyigB.js.map} +1 -1
- package/dist/shell-source-maps/assets/{create-route-BQoMwg6m.js.map → create-route-CEuERj3K.js.map} +1 -1
- package/dist/shell-source-maps/assets/{custom-step-container-field-B2IfCGAR.js.map → custom-step-container-field-B1RXdjeH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{embedded-list-BOlcwiiA.js.map → embedded-list-BIvBUQCm.js.map} +1 -1
- package/dist/shell-source-maps/assets/{en-BED8S1rX.js.map → en-_QUqgkv9.js.map} +1 -1
- package/dist/shell-source-maps/assets/{export-dialog-Ogugn53w.js.map → export-dialog-BibbA1JE.js.map} +1 -1
- package/dist/shell-source-maps/assets/export-worker-BUvAe-pU.js.map +1 -0
- package/dist/shell-source-maps/assets/{first-organization-page-C4-rQ_I2.js.map → first-organization-page-DgL_N1W1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{graph-view-CzTg5srj.js.map → graph-view-D5uSsu67.js.map} +1 -1
- package/dist/shell-source-maps/assets/{group-donut-3ebIs5gF.js.map → group-donut-BeAjogon.js.map} +1 -1
- package/dist/shell-source-maps/assets/{guest-call-page-CD0LJIht.js.map → guest-call-page-DXOfa3rF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-BYJGABwQ.js.map → html-viewer-SuYrL7fw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-dialog-BpUqiIUH.js.map → import-dialog-DjMoHP8N.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-table-dialog-CYYjVijG.js.map → import-table-dialog-45beoZDX.js.map} +1 -1
- package/dist/shell-source-maps/assets/{invitations-page-BsN4z7EC.js.map → invitations-page-CwtY8Tbq.js.map} +1 -1
- package/dist/shell-source-maps/assets/{layout-grid-DvW29fH0.js.map → layout-grid-DSS3tNid.js.map} +1 -1
- package/dist/shell-source-maps/assets/{legend-item-CuD1ms2_.js.map → legend-item--JCuOrBW.js.map} +1 -1
- package/dist/shell-source-maps/assets/{list-page-BtuFsbiK.js.map → list-page-Do4wAJXr.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-DWK2ok5e.js.map → maplibre-DmuZi_YZ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-HRnOc3WU.js.map → markdown-content-B0lkEYGr.js.map} +1 -1
- package/dist/shell-source-maps/assets/{members-page-CXYBNAaR.js.map → members-page-BaLe1e4J.js.map} +1 -1
- package/dist/shell-source-maps/assets/{message-content-ypqgAMEt.js.map → message-content-JJSKhX2W.js.map} +1 -1
- package/dist/shell-source-maps/assets/{messages-QTTbTkpW.js.map → messages-BaKmueMc.js.map} +1 -1
- package/dist/shell-source-maps/assets/nl-B7S2-35v.js.map +1 -0
- package/dist/shell-source-maps/assets/{organization-page-C0iuWYaS.js.map → organization-page-CIML07Cz.js.map} +1 -1
- package/dist/shell-source-maps/assets/{organizations-page-BOryGu_-.js.map → organizations-page-Cctkt6cu.js.map} +1 -1
- package/dist/shell-source-maps/assets/parse-worker-BXZM3e8_.js.map +1 -0
- package/dist/shell-source-maps/assets/{pending-invitation-row-1zBmAsKC.js.map → pending-invitation-row-xf_wfIQ2.js.map} +1 -1
- package/dist/shell-source-maps/assets/{period-chart-Mcf3pdtE.js.map → period-chart-Cuw7AISK.js.map} +1 -1
- package/dist/shell-source-maps/assets/{person-row-Dg1T6u1A.js.map → person-row-DtXuek5W.js.map} +1 -1
- package/dist/shell-source-maps/assets/{public-form-page-DKBrB0BB.js.map → public-form-page-noW7JMKv.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-lines-B4MMhxps.js.map → record-lines-B-Wll3-R.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-C8o8jmlo.js.map → record-map-D6Yog0Uu.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-opens-Ds_etNOv.js.map → record-opens-Cy15Gu5o.js.map} +1 -1
- package/dist/shell-source-maps/assets/record-page-Bo0pD8vx.js.map +1 -0
- package/dist/shell-source-maps/assets/{record-preview-C2bjzVoh.js.map → record-preview-CDgsSTFF.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-DT_SwhgY.js.map → records-map-CV5k8jcU.js.map} +1 -1
- package/dist/shell-source-maps/assets/{render-node-BKYZK3FU.js.map → render-node-CtZZjLGx.js.map} +1 -1
- package/dist/shell-source-maps/assets/{reorder-button-DmgQZa3E.js.map → reorder-button-DHV9_n1M.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-CScFddUb.js.map → run-trace-view-DOyzvKTV.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runner-install-field-DyyHVUfd.js.map → runner-install-field-CJberN6i.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runtime-update-CuLL4Qbm.js.map → runtime-update-DiRL2UEA.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sheet-source-IXyzIyO8.js.map → sheet-source-xZ9l3FLl.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sign-in-policy-page-Dto5W87n.js.map → sign-in-policy-page-BUKwvVFG.js.map} +1 -1
- package/dist/shell-source-maps/assets/{start-block-queries-DNegRXtD.js.map → start-block-queries-s1eLXHpW.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-catalog-Dw8bipyJ.js.map → step-catalog-BvlUh62_.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-CA5-2Doz.js.map → step-panel-BGJiJ7z6.js.map} +1 -1
- package/dist/shell-source-maps/assets/{timeline-display-BLF3onV2.js.map → timeline-display-B_xs7U-p.js.map} +1 -1
- package/dist/shell-source-maps/assets/{trash-Cd-g6Eyo.js.map → trash-BfWYOlBD.js.map} +1 -1
- package/dist/shell-source-maps/assets/{update-set-DfPWNMBL.js.map → update-set-iwxyRxhm.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-calendar-move-J9sB_jXo.js.map → use-calendar-move-Cd92WAhx.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-display-rows-CYGJYJrz.js.map → use-display-rows-HuX1NEhA.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-my-invitations-DZ0rA8RK.js.map → use-my-invitations-DaKmW2De.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-paged-search-cBs-xWuq.js.map → use-paged-search-DPuOZYVz.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-run-trace-CSdKdxn9.js.map → use-run-trace-Dukz4W0q.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-page-DGd_5JMB.js.map → use-workflow-page-Cgw-Aurp.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-types-BQl6tPM-.js.map → use-workflow-types-B1NI4zqE.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-DbLkc3zJ.js.map → workflow-canvas-B-IYnZVg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-field-DRAphvYG.js.map → workflow-field-BSH37gjx.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-CzgoB1_t.js.map → workflow-graph-editor-C1U_7a-n.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-run-field-CQf9E5e1.js.map → workflow-run-field-D_yV-Pdt.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-status-field-CiaCtBkf.js.map → workflow-status-field-CIX3WM-W.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-workbench-CMl69WwH.js.map → workflow-workbench-CoVlp47h.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-DLkpxjgP.css +0 -2
- package/dist/shell/assets/board-display-DxdFR3Wq.js +0 -2
- package/dist/shell/assets/calendar-display-uBGEfuIv.js +0 -2
- package/dist/shell/assets/create-route-BQoMwg6m.js +0 -2
- package/dist/shell/assets/embedded-list-BOlcwiiA.js +0 -3
- package/dist/shell/assets/en-BED8S1rX.js +0 -2
- package/dist/shell/assets/export-worker-S5xPFD_M.js +0 -15
- package/dist/shell/assets/import-table-dialog-CYYjVijG.js +0 -2
- package/dist/shell/assets/list-page-BtuFsbiK.js +0 -4
- package/dist/shell/assets/members-page-CXYBNAaR.js +0 -2
- package/dist/shell/assets/messages-QTTbTkpW.js +0 -2
- package/dist/shell/assets/nl-DjHVomkB.js +0 -2
- package/dist/shell/assets/organization-page-C0iuWYaS.js +0 -2
- package/dist/shell/assets/organizations-page-BOryGu_-.js +0 -2
- package/dist/shell/assets/parse-worker-CO_GFfU7.js +0 -35
- package/dist/shell/assets/public-form-page-DKBrB0BB.js +0 -2
- package/dist/shell/assets/record-page-DR3a2_Z8.js +0 -3
- package/dist/shell/assets/render-node-BKYZK3FU.js +0 -3
- package/dist/shell/assets/reorder-button-DmgQZa3E.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-DOsgmmrs.js +0 -1
- package/dist/shell/assets/sign-in-policy-page-Dto5W87n.js +0 -2
- package/dist/shell/assets/start-block-queries-DNegRXtD.js +0 -2
- package/dist/shell/assets/step-catalog-Dw8bipyJ.js +0 -2
- package/dist/shell/assets/timeline-display-BLF3onV2.js +0 -2
- package/dist/shell/assets/use-calendar-move-J9sB_jXo.js +0 -2
- package/dist/shell/assets/use-my-invitations-DZ0rA8RK.js +0 -2
- package/dist/shell/assets/workflow-status-field-CiaCtBkf.js +0 -2
- package/dist/shell/assets/workflow-workbench-CMl69WwH.js +0 -4
- package/dist/shell-source-maps/assets/app-CWCg5I0x.js.map +0 -1
- package/dist/shell-source-maps/assets/export-worker-S5xPFD_M.js.map +0 -1
- package/dist/shell-source-maps/assets/nl-DjHVomkB.js.map +0 -1
- package/dist/shell-source-maps/assets/parse-worker-CO_GFfU7.js.map +0 -1
- package/dist/shell-source-maps/assets/record-page-DR3a2_Z8.js.map +0 -1
|
@@ -1,23 +1,49 @@
|
|
|
1
|
-
import { recordMessagesFilter } from "../conversation/record-filter.js";
|
|
2
1
|
import { threadSort } from "@protobase/layout";
|
|
3
2
|
import { createWhere, printFilter } from "@protobase/schema";
|
|
4
3
|
//#region src/app/conversation-page/conversation-reads.ts
|
|
5
4
|
const where$1 = createWhere();
|
|
6
5
|
/** How many messages a page of the conversation brings: the latest on opening, and each "Load earlier". */
|
|
7
6
|
const conversationPageSize = 50;
|
|
7
|
+
/** How many reactions one read of a page of messages brings; a page with more reads on until it has them all. */
|
|
8
|
+
const reactionsPageSize = 500;
|
|
8
9
|
/**
|
|
9
10
|
* The read of a conversation's messages through the list API, with the reader's own access, so a message they may not
|
|
10
|
-
* read never shows: those whose relation holds the record's key, newest first, a page at a time.
|
|
11
|
+
* read never shows: those whose relation holds the record's key, newest first, a page at a time. With threads, only
|
|
12
|
+
* the messages of the conversation itself, not the replies in a thread.
|
|
11
13
|
*/
|
|
12
14
|
const messagesRequest = (page, recordKey) => ({
|
|
13
|
-
filter:
|
|
15
|
+
filter: printFilter(page.thread ? where$1.and(where$1.eq(page.field, recordKey), where$1.isNull(page.thread.field)) : where$1.eq(page.field, recordKey)),
|
|
14
16
|
orderBy: threadSort(page.time),
|
|
15
17
|
pageSize: 50
|
|
16
18
|
});
|
|
19
|
+
/** The read of the replies in the thread of the message keyed `first`, newest first, a page at a time. */
|
|
20
|
+
const repliesRequest = (page, thread, first) => ({
|
|
21
|
+
filter: printFilter(where$1.eq(thread.field, first)),
|
|
22
|
+
orderBy: threadSort(page.time),
|
|
23
|
+
pageSize: 50
|
|
24
|
+
});
|
|
25
|
+
/** The filter of the reactions to the messages keyed `messages`. */
|
|
26
|
+
const reactionsFilter = (reactions, messages) => printFilter(where$1.in(reactions.field, [...messages]));
|
|
27
|
+
/** Every reaction to the messages keyed `messages`, in one read, or one per `reactionsPageSize` of them. */
|
|
28
|
+
const readReactions = async (client, reactions, messages) => {
|
|
29
|
+
const filter = reactionsFilter(reactions, messages);
|
|
30
|
+
const rows = [];
|
|
31
|
+
let pageToken = "";
|
|
32
|
+
do {
|
|
33
|
+
const page = await client.list(reactions.resource, {
|
|
34
|
+
filter,
|
|
35
|
+
pageSize: 500,
|
|
36
|
+
pageToken
|
|
37
|
+
});
|
|
38
|
+
rows.push(...page.items);
|
|
39
|
+
pageToken = page.nextPageToken;
|
|
40
|
+
} while (pageToken);
|
|
41
|
+
return rows;
|
|
42
|
+
};
|
|
17
43
|
/**
|
|
18
44
|
* The read of the reader's own read position in a record, through the list API: the one whose relation holds the
|
|
19
45
|
* record's key and whose author, `author`, is `me`, even where the resource lets them read other people's.
|
|
20
46
|
*/
|
|
21
47
|
const ownPositionFilter = (position, recordKey, author, me) => printFilter(where$1.and(where$1.eq(position.field, recordKey), where$1.eq(author, me)));
|
|
22
48
|
//#endregion
|
|
23
|
-
export { conversationPageSize, messagesRequest, ownPositionFilter };
|
|
49
|
+
export { conversationPageSize, messagesRequest, ownPositionFilter, reactionsFilter, reactionsPageSize, readReactions, repliesRequest };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/app/conversation-page/delete-message-dialog.d.ts
|
|
2
|
+
/** Asks before a message is deleted, since it goes for everyone in the conversation. */
|
|
3
|
+
export declare const DeleteMessageDialog: ({ onDelete, onClose }: {
|
|
4
|
+
onDelete: () => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Button } from "../../primitives/button.js";
|
|
2
|
+
import { ResponsiveDialog } from "../../primitives/responsive-dialog.js";
|
|
3
|
+
import { text } from "./messages.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/app/conversation-page/delete-message-dialog.tsx
|
|
6
|
+
/** Asks before a message is deleted, since it goes for everyone in the conversation. */
|
|
7
|
+
const DeleteMessageDialog = ({ onDelete, onClose }) => /* @__PURE__ */ jsx(ResponsiveDialog, {
|
|
8
|
+
open: true,
|
|
9
|
+
title: text("deleteTitle"),
|
|
10
|
+
description: text("deleteDescription"),
|
|
11
|
+
onClose,
|
|
12
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
13
|
+
onClick: onClose,
|
|
14
|
+
children: text("cancel")
|
|
15
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
16
|
+
variant: "danger",
|
|
17
|
+
onClick: onDelete,
|
|
18
|
+
children: text("delete")
|
|
19
|
+
})] })
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { DeleteMessageDialog };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ResourcePermissions } from "@protobase/client";
|
|
2
|
+
import { ConversationPageModel } from "@protobase/schema";
|
|
3
|
+
//#region src/app/conversation-page/message-access.d.ts
|
|
4
|
+
type Row = Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* What the reader may do to a message, as far as the page can tell: edit their own (`mine`) when the conversation lets
|
|
7
|
+
* authors edit, and delete one when it lets anyone and its condition does not keep the message, each only where the
|
|
8
|
+
* resource's access and the row's own permissions allow it. The server checks every write again.
|
|
9
|
+
*/
|
|
10
|
+
export declare const messageAccess: (page: Pick<ConversationPageModel, "edit" | "delete">, row: Row, mine: boolean, permissions: ResourcePermissions) => {
|
|
11
|
+
edit: boolean;
|
|
12
|
+
delete: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** Whether the reader may react, and take back their own reactions, by the reaction resource's access. */
|
|
15
|
+
export declare const reactionAccess: (permissions: ResourcePermissions) => {
|
|
16
|
+
react: boolean;
|
|
17
|
+
unreact: boolean;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { can, rowAllows } from "../permissions.js";
|
|
2
|
+
import { evaluateCondition, parseCondition } from "@protobase/layout";
|
|
3
|
+
//#region src/app/conversation-page/message-access.ts
|
|
4
|
+
const deleteAllowed = (option, row) => {
|
|
5
|
+
if (option === void 0 || option === false) return false;
|
|
6
|
+
if (option === true) return true;
|
|
7
|
+
const condition = parseCondition(option.unless);
|
|
8
|
+
return condition.ok && !evaluateCondition(condition, row);
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* What the reader may do to a message, as far as the page can tell: edit their own (`mine`) when the conversation lets
|
|
12
|
+
* authors edit, and delete one when it lets anyone and its condition does not keep the message, each only where the
|
|
13
|
+
* resource's access and the row's own permissions allow it. The server checks every write again.
|
|
14
|
+
*/
|
|
15
|
+
const messageAccess = (page, row, mine, permissions) => ({
|
|
16
|
+
edit: page.edit === true && mine && can(permissions, "update") && rowAllows(row, "update"),
|
|
17
|
+
delete: deleteAllowed(page.delete, row) && can(permissions, "delete") && rowAllows(row, "delete")
|
|
18
|
+
});
|
|
19
|
+
/** Whether the reader may react, and take back their own reactions, by the reaction resource's access. */
|
|
20
|
+
const reactionAccess = (permissions) => ({
|
|
21
|
+
react: can(permissions, "create"),
|
|
22
|
+
unreact: can(permissions, "delete")
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { messageAccess, reactionAccess };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MessageControls } from "./message-controls.js";
|
|
2
|
+
//#region src/app/conversation-page/message-actions-bar.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* What the reader can do to a message, a bar over its top right corner shown while they point at it or move into it with
|
|
5
|
+
* the keyboard, so it takes no room of its own: react with an emoji they have not reacted with yet, reply in its
|
|
6
|
+
* thread, edit and delete. Only a screen that can point shows it; on a touch screen a tap or long-press opens
|
|
7
|
+
* `MessageActionsSheet` instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MessageActionsBar: ({ controls }: {
|
|
10
|
+
controls: MessageControls;
|
|
11
|
+
}) => import("react").JSX.Element | null;
|
|
12
|
+
//#endregion
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Button, buttonClass } from "../../primitives/button.js";
|
|
2
|
+
import { AppLink } from "../use-app-address.js";
|
|
3
|
+
import { text } from "./messages.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/app/conversation-page/message-actions-bar.tsx
|
|
6
|
+
/**
|
|
7
|
+
* What the reader can do to a message, a bar over its top right corner shown while they point at it or move into it with
|
|
8
|
+
* the keyboard, so it takes no room of its own: react with an emoji they have not reacted with yet, reply in its
|
|
9
|
+
* thread, edit and delete. Only a screen that can point shows it; on a touch screen a tap or long-press opens
|
|
10
|
+
* `MessageActionsSheet` instead.
|
|
11
|
+
*/
|
|
12
|
+
const MessageActionsBar = ({ controls }) => {
|
|
13
|
+
const { emoji, groups, onReact, thread, onEdit, onDelete } = controls;
|
|
14
|
+
const reacted = new Set(groups.filter((group) => group.mine).map((group) => group.emoji));
|
|
15
|
+
const offered = onReact ? emoji.filter((entry) => !reacted.has(entry.emoji)) : [];
|
|
16
|
+
if (offered.length === 0 && !thread && !onEdit && !onDelete) return null;
|
|
17
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
role: "toolbar",
|
|
19
|
+
"aria-label": text("messageActions"),
|
|
20
|
+
className: "pointer-events-none absolute -top-3 right-0 z-10 hidden items-center gap-0.5 rounded-md border border-border bg-background p-0.5 opacity-0 shadow-sm transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100 [@media(hover:hover)]:flex",
|
|
21
|
+
children: [
|
|
22
|
+
offered.map(({ emoji: value, symbol, name }) => /* @__PURE__ */ jsx(Button, {
|
|
23
|
+
size: "icon",
|
|
24
|
+
variant: "ghost",
|
|
25
|
+
"aria-label": text("reactWith", { name }),
|
|
26
|
+
title: name,
|
|
27
|
+
onClick: () => onReact(value),
|
|
28
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
29
|
+
"aria-hidden": true,
|
|
30
|
+
children: symbol
|
|
31
|
+
})
|
|
32
|
+
}, value)),
|
|
33
|
+
thread && /* @__PURE__ */ jsx(AppLink, {
|
|
34
|
+
to: thread,
|
|
35
|
+
className: buttonClass({
|
|
36
|
+
variant: "ghost",
|
|
37
|
+
size: "sm"
|
|
38
|
+
}),
|
|
39
|
+
children: text("replyInThread")
|
|
40
|
+
}),
|
|
41
|
+
onEdit && /* @__PURE__ */ jsx(Button, {
|
|
42
|
+
size: "sm",
|
|
43
|
+
variant: "ghost",
|
|
44
|
+
onClick: onEdit,
|
|
45
|
+
children: text("edit")
|
|
46
|
+
}),
|
|
47
|
+
onDelete && /* @__PURE__ */ jsx(Button, {
|
|
48
|
+
size: "sm",
|
|
49
|
+
variant: "ghost",
|
|
50
|
+
onClick: onDelete,
|
|
51
|
+
children: text("delete")
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { MessageActionsBar };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MessageControls } from "./message-controls.js";
|
|
2
|
+
//#region src/app/conversation-page/message-actions-sheet.d.ts
|
|
3
|
+
type Props = {
|
|
4
|
+
controls: MessageControls;
|
|
5
|
+
/** Names the message it acts on, such as "Message from Lena Fischer". */
|
|
6
|
+
title: string;
|
|
7
|
+
/** The message's text, shown under the title. */
|
|
8
|
+
preview: string;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* What the reader can do to a message, opened by a finger's tap or long-press on it, under a line of the message: a row
|
|
13
|
+
* of every emoji, those they reacted with pressed, taking their reaction back as its chip does, then reply in its
|
|
14
|
+
* thread, copy its text, edit and delete. A sheet from the bottom at mobile width, a dialog on a wider touch screen.
|
|
15
|
+
* Each choice closes it.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MessageActionsSheet: ({ controls, title, preview, onClose }: Props) => import("react").JSX.Element;
|
|
18
|
+
//#endregion
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Button, buttonClass } from "../../primitives/button.js";
|
|
2
|
+
import { ResponsiveDialog } from "../../primitives/responsive-dialog.js";
|
|
3
|
+
import { AppLink } from "../use-app-address.js";
|
|
4
|
+
import { text } from "./messages.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/app/conversation-page/message-actions-sheet.tsx
|
|
7
|
+
/**
|
|
8
|
+
* What the reader can do to a message, opened by a finger's tap or long-press on it, under a line of the message: a row
|
|
9
|
+
* of every emoji, those they reacted with pressed, taking their reaction back as its chip does, then reply in its
|
|
10
|
+
* thread, copy its text, edit and delete. A sheet from the bottom at mobile width, a dialog on a wider touch screen.
|
|
11
|
+
* Each choice closes it.
|
|
12
|
+
*/
|
|
13
|
+
const MessageActionsSheet = ({ controls, title, preview, onClose }) => {
|
|
14
|
+
const { emoji, groups, onReact, onUnreact, thread, onCopy, onEdit, onDelete } = controls;
|
|
15
|
+
const mine = new Map(groups.flatMap((group) => group.mine ? [[group.emoji, group.mine]] : []));
|
|
16
|
+
const choose = (onChoose) => () => {
|
|
17
|
+
onClose();
|
|
18
|
+
onChoose();
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsx(ResponsiveDialog, {
|
|
21
|
+
open: true,
|
|
22
|
+
title,
|
|
23
|
+
description: preview && /* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: "line-clamp-2",
|
|
25
|
+
children: preview
|
|
26
|
+
}),
|
|
27
|
+
onClose,
|
|
28
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
+
onDelete && /* @__PURE__ */ jsx(Button, {
|
|
30
|
+
variant: "danger",
|
|
31
|
+
onClick: choose(onDelete),
|
|
32
|
+
children: text("delete")
|
|
33
|
+
}),
|
|
34
|
+
onEdit && /* @__PURE__ */ jsx(Button, {
|
|
35
|
+
onClick: choose(onEdit),
|
|
36
|
+
children: text("edit")
|
|
37
|
+
}),
|
|
38
|
+
onCopy && /* @__PURE__ */ jsx(Button, {
|
|
39
|
+
onClick: choose(onCopy),
|
|
40
|
+
children: text("copyText")
|
|
41
|
+
}),
|
|
42
|
+
thread && /* @__PURE__ */ jsx(AppLink, {
|
|
43
|
+
to: thread,
|
|
44
|
+
className: buttonClass(),
|
|
45
|
+
onClick: onClose,
|
|
46
|
+
children: text("replyInThread")
|
|
47
|
+
})
|
|
48
|
+
] }),
|
|
49
|
+
children: emoji.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
50
|
+
role: "group",
|
|
51
|
+
"aria-label": text("react"),
|
|
52
|
+
className: "flex flex-wrap gap-1",
|
|
53
|
+
children: emoji.map(({ emoji: value, symbol, name }) => {
|
|
54
|
+
const reaction = mine.get(value);
|
|
55
|
+
const press = reaction ? onUnreact && (() => onUnreact(reaction)) : onReact && (() => onReact(value));
|
|
56
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
57
|
+
size: "icon",
|
|
58
|
+
variant: reaction ? "secondary" : "ghost",
|
|
59
|
+
"aria-pressed": reaction !== void 0,
|
|
60
|
+
"aria-label": text("reactWith", { name }),
|
|
61
|
+
disabled: !press,
|
|
62
|
+
onClick: press && choose(press),
|
|
63
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
64
|
+
"aria-hidden": true,
|
|
65
|
+
children: symbol
|
|
66
|
+
})
|
|
67
|
+
}, value);
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { MessageActionsSheet };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EmojiEntry, ReactionGroup } from "./reactions.js";
|
|
2
|
+
import { AppAddress } from "@protobase/schema";
|
|
3
|
+
//#region src/app/conversation-page/message-controls.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* What the reader can do to one message, each given only when they may: react with an emoji of `emoji`, take back
|
|
6
|
+
* their own reaction, open its thread (`thread`, the address of a message of the conversation itself), copy its text,
|
|
7
|
+
* edit it and delete it. The pointer's bar and the touch sheet both draw it.
|
|
8
|
+
*/
|
|
9
|
+
export type MessageControls = {
|
|
10
|
+
emoji: readonly EmojiEntry[];
|
|
11
|
+
groups: readonly ReactionGroup[];
|
|
12
|
+
onReact?: (emoji: string) => void;
|
|
13
|
+
onUnreact?: (reaction: Record<string, unknown>) => void;
|
|
14
|
+
thread?: AppAddress;
|
|
15
|
+
onCopy?: () => void;
|
|
16
|
+
onEdit?: () => void;
|
|
17
|
+
onDelete?: () => void;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PickedUser } from "../../mentions/mention-text.js";
|
|
2
|
+
import { PeopleSearch } from "../../mentions/use-people-search.js";
|
|
3
|
+
import "../../mentions/index.js";
|
|
4
|
+
//#region src/app/conversation-page/message-editor.d.ts
|
|
5
|
+
type Props = {
|
|
6
|
+
/** The message's text as it is. */
|
|
7
|
+
body: string;
|
|
8
|
+
/** The people it mentions, by id and name, kept while their `@name` stays in the text. */
|
|
9
|
+
picked: PickedUser[];
|
|
10
|
+
/** Finds the people `@` lists; without it, `@` is plain text. */
|
|
11
|
+
searchPeople?: PeopleSearch;
|
|
12
|
+
/** Resolves true once saved; false leaves the box open, as the server refused it. */
|
|
13
|
+
onSave: (body: string, mentions: string[]) => Promise<boolean>;
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A message's text in a box to change it, its mentions kept while their `@name` stays: Enter or Save keeps the trimmed
|
|
18
|
+
* text, Shift+Enter starts a new line, Escape or Cancel leaves it as it was. An empty text is no edit: deleting is.
|
|
19
|
+
* The box is read-only while it saves, so nothing typed then is lost, and a save that ends after the box closed
|
|
20
|
+
* closes nothing, such as the box opened again on the same message.
|
|
21
|
+
*/
|
|
22
|
+
export declare const MessageEditor: ({ body, picked, searchPeople, onSave, onCancel }: Props) => import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Button } from "../../primitives/button.js";
|
|
2
|
+
import { mentionedIds } from "../../mentions/mention-text.js";
|
|
3
|
+
import { MentionBox } from "../../mentions/mention-box.js";
|
|
4
|
+
import { text } from "./messages.js";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/app/conversation-page/message-editor.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A message's text in a box to change it, its mentions kept while their `@name` stays: Enter or Save keeps the trimmed
|
|
10
|
+
* text, Shift+Enter starts a new line, Escape or Cancel leaves it as it was. An empty text is no edit: deleting is.
|
|
11
|
+
* The box is read-only while it saves, so nothing typed then is lost, and a save that ends after the box closed
|
|
12
|
+
* closes nothing, such as the box opened again on the same message.
|
|
13
|
+
*/
|
|
14
|
+
const MessageEditor = ({ body, picked, searchPeople, onSave, onCancel }) => {
|
|
15
|
+
const [draft, setDraft] = useState({
|
|
16
|
+
text: body,
|
|
17
|
+
picked
|
|
18
|
+
});
|
|
19
|
+
const [saving, setSaving] = useState(false);
|
|
20
|
+
const mounted = useRef(true);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
mounted.current = true;
|
|
23
|
+
return () => {
|
|
24
|
+
mounted.current = false;
|
|
25
|
+
};
|
|
26
|
+
}, []);
|
|
27
|
+
const trimmed = draft.text.trim();
|
|
28
|
+
const save = async () => {
|
|
29
|
+
if (trimmed === "" || saving) return;
|
|
30
|
+
if (trimmed === body) return onCancel();
|
|
31
|
+
setSaving(true);
|
|
32
|
+
const saved = await onSave(trimmed, mentionedIds(trimmed, draft.picked));
|
|
33
|
+
if (!mounted.current) return;
|
|
34
|
+
setSaving(false);
|
|
35
|
+
if (saved) onCancel();
|
|
36
|
+
};
|
|
37
|
+
const keys = (event) => {
|
|
38
|
+
if (event.nativeEvent.isComposing) return;
|
|
39
|
+
if (event.key === "Escape") return onCancel();
|
|
40
|
+
if (event.key !== "Enter" || event.shiftKey) return;
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
save();
|
|
43
|
+
};
|
|
44
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: "flex flex-col gap-2 whitespace-normal",
|
|
46
|
+
children: [/* @__PURE__ */ jsx(MentionBox, {
|
|
47
|
+
value: draft,
|
|
48
|
+
onChange: setDraft,
|
|
49
|
+
searchPeople,
|
|
50
|
+
onKeyDown: keys,
|
|
51
|
+
readOnly: saving,
|
|
52
|
+
"aria-label": text("editMessage"),
|
|
53
|
+
autoFocus: true
|
|
54
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: "flex gap-2",
|
|
56
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
57
|
+
size: "sm",
|
|
58
|
+
variant: "primary",
|
|
59
|
+
disabled: trimmed === "",
|
|
60
|
+
loading: saving,
|
|
61
|
+
onClick: () => void save(),
|
|
62
|
+
children: text("save")
|
|
63
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
64
|
+
size: "sm",
|
|
65
|
+
onClick: onCancel,
|
|
66
|
+
children: text("cancel")
|
|
67
|
+
})]
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { MessageEditor };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//#region src/app/conversation-page/message-press.d.ts
|
|
2
|
+
/** How long a finger rests on a message before its actions open without letting go. */
|
|
3
|
+
export declare const longPressMs = 500;
|
|
4
|
+
/** How far, in CSS pixels, a finger may drift before its press counts as a scroll rather than a tap or long-press. */
|
|
5
|
+
export declare const pressSlop = 10;
|
|
6
|
+
/**
|
|
7
|
+
* Where a finger came down on a message, while it may still become a tap or long-press. `tapOpens`: a tap opens the
|
|
8
|
+
* actions too, unless it came while the reader was typing, when it only lowers the keyboard. `lifted`: the finger is
|
|
9
|
+
* up, so only the tap's click may still come, however late the browser sends it.
|
|
10
|
+
*/
|
|
11
|
+
export type Press = {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
tapOpens: boolean;
|
|
15
|
+
lifted?: true;
|
|
16
|
+
} | undefined;
|
|
17
|
+
export type PressEvent =
|
|
18
|
+
/**
|
|
19
|
+
* `touch`: a finger rather than a mouse or pen. `onControl`: on a link or button of the message, which keeps its own
|
|
20
|
+
* press. `typing`: a text box had the focus, so the on-screen keyboard is up.
|
|
21
|
+
*/
|
|
22
|
+
{
|
|
23
|
+
type: 'down';
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
touch: boolean;
|
|
27
|
+
onControl: boolean;
|
|
28
|
+
typing: boolean;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'move';
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
} |
|
|
34
|
+
/** The finger lifted. */
|
|
35
|
+
{
|
|
36
|
+
type: 'up';
|
|
37
|
+
} |
|
|
38
|
+
/** The browser took the touch over, such as to scroll. */
|
|
39
|
+
{
|
|
40
|
+
type: 'cancel';
|
|
41
|
+
} |
|
|
42
|
+
/** The finger stayed down for `longPressMs`. */
|
|
43
|
+
{
|
|
44
|
+
type: 'held';
|
|
45
|
+
} |
|
|
46
|
+
/** The browser's click after the finger lifted. */
|
|
47
|
+
{
|
|
48
|
+
type: 'tap';
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The next state of a press on a message, and whether it opens the message's actions: a finger that comes down on the
|
|
52
|
+
* message, off its links and buttons, and lifts or rests there without drifting away; a tap while the reader types
|
|
53
|
+
* only lowers the keyboard. A mouse keeps the hover bar.
|
|
54
|
+
*/
|
|
55
|
+
export declare const nextPress: (press: Press, event: PressEvent) => {
|
|
56
|
+
press: Press;
|
|
57
|
+
open: boolean;
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region src/app/conversation-page/message-press.ts
|
|
2
|
+
/** How long a finger rests on a message before its actions open without letting go. */
|
|
3
|
+
const longPressMs = 500;
|
|
4
|
+
/** How far, in CSS pixels, a finger may drift before its press counts as a scroll rather than a tap or long-press. */
|
|
5
|
+
const pressSlop = 10;
|
|
6
|
+
/**
|
|
7
|
+
* The next state of a press on a message, and whether it opens the message's actions: a finger that comes down on the
|
|
8
|
+
* message, off its links and buttons, and lifts or rests there without drifting away; a tap while the reader types
|
|
9
|
+
* only lowers the keyboard. A mouse keeps the hover bar.
|
|
10
|
+
*/
|
|
11
|
+
const nextPress = (press, event) => {
|
|
12
|
+
if (event.type === "down") return {
|
|
13
|
+
press: event.touch && !event.onControl ? {
|
|
14
|
+
x: event.x,
|
|
15
|
+
y: event.y,
|
|
16
|
+
tapOpens: !event.typing
|
|
17
|
+
} : void 0,
|
|
18
|
+
open: false
|
|
19
|
+
};
|
|
20
|
+
if (event.type === "cancel") return {
|
|
21
|
+
press: void 0,
|
|
22
|
+
open: false
|
|
23
|
+
};
|
|
24
|
+
if (event.type === "up") return {
|
|
25
|
+
press: press && {
|
|
26
|
+
...press,
|
|
27
|
+
lifted: true
|
|
28
|
+
},
|
|
29
|
+
open: false
|
|
30
|
+
};
|
|
31
|
+
if (event.type === "move") {
|
|
32
|
+
if (!press) return {
|
|
33
|
+
press,
|
|
34
|
+
open: false
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
press: Math.hypot(event.x - press.x, event.y - press.y) > 10 ? void 0 : press,
|
|
38
|
+
open: false
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (event.type === "tap") return {
|
|
42
|
+
press: void 0,
|
|
43
|
+
open: press?.tapOpens === true
|
|
44
|
+
};
|
|
45
|
+
if (press?.lifted) return {
|
|
46
|
+
press,
|
|
47
|
+
open: false
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
press: void 0,
|
|
51
|
+
open: press !== void 0
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { longPressMs, nextPress, pressSlop };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PeopleSearch } from "../../mentions/use-people-search.js";
|
|
2
|
+
import "../../mentions/index.js";
|
|
3
|
+
import { Member } from "../../people/use-members.js";
|
|
4
|
+
import { EmojiEntry } from "./reactions.js";
|
|
5
|
+
import { useMessageWrites } from "./use-message-writes.js";
|
|
6
|
+
import { ResourcePermissions } from "@protobase/client";
|
|
7
|
+
import { AppAddress, ConversationPageModel } from "@protobase/schema";
|
|
8
|
+
//#region src/app/conversation-page/message-setup.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* What every message of a conversation, or of a thread beside it, needs beyond its own row: the page, the reader, the
|
|
11
|
+
* 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
|
+
* the people `@` lists while editing.
|
|
14
|
+
*/
|
|
15
|
+
export type MessageSetup = {
|
|
16
|
+
page: ConversationPageModel;
|
|
17
|
+
me: string | undefined;
|
|
18
|
+
member: (id: string) => Member | undefined;
|
|
19
|
+
writes: ReturnType<typeof useMessageWrites>;
|
|
20
|
+
emoji: readonly EmojiEntry[];
|
|
21
|
+
messagePermissions: ResourcePermissions;
|
|
22
|
+
reactionPermissions: ResourcePermissions;
|
|
23
|
+
reactionsOf: (key: string) => readonly Record<string, unknown>[];
|
|
24
|
+
threadTo?: (key: string) => AppAddress;
|
|
25
|
+
searchPeople?: PeopleSearch;
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
File without changes
|
|
@@ -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: "couldNotLoad" | "
|
|
5
|
-
rich(id: "couldNotLoad" | "
|
|
4
|
+
(id: "cancel" | "someone" | "copied" | "edit" | "thread" | "message" | "couldNotLoad" | "save" | "delete" | "notSent" | "details" | "deleteDescription" | "deleteTitle" | "noMessages" | "loadingMessages" | "callInput" | "callResult" | "callError" | "couldNotLoadCalls" | "edited" | "editedAt" | "positionNotSaved" | "messageActions" | "reactWith" | "react" | "reactedBy" | "replyInThread" | "copyText" | "editMessage" | "yourMessage" | "messageFrom" | "showYourActions" | "showActionsFrom" | "showActions" | "notSaved" | "notDeleted" | "reactionNotSaved" | "replies" | "lastReply" | "replyPlaceholder" | "couldNotLoadThread" | "threadElsewhere" | "couldNotLoadReactions" | "notCopied", values?: Record<string, MessageValue>): string;
|
|
5
|
+
rich(id: "cancel" | "someone" | "copied" | "edit" | "thread" | "message" | "couldNotLoad" | "save" | "delete" | "notSent" | "details" | "deleteDescription" | "deleteTitle" | "noMessages" | "loadingMessages" | "callInput" | "callResult" | "callError" | "couldNotLoadCalls" | "edited" | "editedAt" | "positionNotSaved" | "messageActions" | "reactWith" | "react" | "reactedBy" | "replyInThread" | "copyText" | "editMessage" | "yourMessage" | "messageFrom" | "showYourActions" | "showActionsFrom" | "showActions" | "notSaved" | "notDeleted" | "reactionNotSaved" | "replies" | "lastReply" | "replyPlaceholder" | "couldNotLoadThread" | "threadElsewhere" | "couldNotLoadReactions" | "notCopied", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactionGroup } from "./reactions.js";
|
|
2
|
+
//#region src/app/conversation-page/reaction-chips.d.ts
|
|
3
|
+
type Props = {
|
|
4
|
+
groups: readonly ReactionGroup[];
|
|
5
|
+
member: (id: string) => {
|
|
6
|
+
name: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
/** Given when the reader may react. */
|
|
9
|
+
onReact?: (emoji: string) => void;
|
|
10
|
+
/** Given when the reader may take back their own reaction. */
|
|
11
|
+
onUnreact?: (reaction: Record<string, unknown>) => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A message's reactions, one button per emoji with its count, naming who reacted on hover: the reader's own filled,
|
|
15
|
+
* taking it back when pressed, and another's adding the reader's with the same emoji.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ReactionChips: ({ groups, member, onReact, onUnreact }: Props) => import("react").JSX.Element[];
|
|
18
|
+
//#endregion
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Button } from "../../primitives/button.js";
|
|
2
|
+
import { text } from "./messages.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/app/conversation-page/reaction-chips.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A message's reactions, one button per emoji with its count, naming who reacted on hover: the reader's own filled,
|
|
7
|
+
* taking it back when pressed, and another's adding the reader's with the same emoji.
|
|
8
|
+
*/
|
|
9
|
+
const ReactionChips = ({ groups, member, onReact, onUnreact }) => groups.map(({ emoji, symbol, name, count, userIds, mine }) => {
|
|
10
|
+
const people = userIds.map((id) => member(id)?.name ?? text("someone")).join(", ");
|
|
11
|
+
const press = mine ? onUnreact && (() => onUnreact(mine)) : onReact && (() => onReact(emoji));
|
|
12
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
13
|
+
size: "sm",
|
|
14
|
+
variant: mine ? "primary" : "secondary",
|
|
15
|
+
"aria-pressed": mine !== void 0,
|
|
16
|
+
"aria-label": text("reactedBy", {
|
|
17
|
+
name,
|
|
18
|
+
people
|
|
19
|
+
}),
|
|
20
|
+
title: people,
|
|
21
|
+
disabled: !press,
|
|
22
|
+
onClick: press,
|
|
23
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
24
|
+
"aria-hidden": true,
|
|
25
|
+
children: symbol
|
|
26
|
+
}), /* @__PURE__ */ jsx("span", { children: count })]
|
|
27
|
+
}, emoji);
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ReactionChips };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactionsModel } from "@protobase/schema";
|
|
2
|
+
//#region src/app/conversation-page/reactions.d.ts
|
|
3
|
+
type Row = Record<string, unknown>;
|
|
4
|
+
/**
|
|
5
|
+
* One emoji under a message: its label, how many reacted with it and who, by user id, and the reader's own reaction
|
|
6
|
+
* with it, if any, as the row the reactions API gave.
|
|
7
|
+
*/
|
|
8
|
+
export type ReactionGroup = {
|
|
9
|
+
emoji: string;
|
|
10
|
+
symbol: string;
|
|
11
|
+
name: string;
|
|
12
|
+
count: number;
|
|
13
|
+
userIds: string[];
|
|
14
|
+
mine?: Row;
|
|
15
|
+
};
|
|
16
|
+
/** An emoji a conversation offers, as it stores it, draws it and names it. */
|
|
17
|
+
export type EmojiEntry = {
|
|
18
|
+
emoji: string;
|
|
19
|
+
symbol: string;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
/** The emoji a conversation offers, in the order of the emoji field's values, each with its label. */
|
|
23
|
+
export declare const emojiSet: (reactions: Pick<ReactionsModel, "labels">, values: readonly string[]) => EmojiEntry[];
|
|
24
|
+
/** Reaction rows by the key of the message they answer, as text. */
|
|
25
|
+
export declare const reactionsByMessage: (rows: readonly Row[], field: string) => Map<string, Row[]>;
|
|
26
|
+
/** A message's reactions per emoji of `set`, in its order, each emoji someone reacted with once; `me` finds the reader's own. */
|
|
27
|
+
export declare const reactionGroups: (rows: readonly Row[], { user, emoji: field }: Pick<ReactionsModel, "user" | "emoji">, set: readonly EmojiEntry[], me: string | undefined) => ReactionGroup[];
|
|
28
|
+
//#endregion
|