@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.
Files changed (304) hide show
  1. package/dist/account/messages.d.ts +2 -2
  2. package/dist/activity-chart/messages.d.ts +2 -2
  3. package/dist/app/change-confirm/messages.d.ts +2 -2
  4. package/dist/app/charts/messages.d.ts +2 -2
  5. package/dist/app/confirm-sign-in-messages.d.ts +2 -2
  6. package/dist/app/conversation/message-composer.d.ts +7 -2
  7. package/dist/app/conversation/message-composer.js +36 -9
  8. package/dist/app/conversation/messages.d.ts +2 -2
  9. package/dist/app/conversation/thread-state.d.ts +1 -1
  10. package/dist/app/conversation-page/attachment-picker.d.ts +9 -0
  11. package/dist/app/conversation-page/attachment-picker.js +32 -0
  12. package/dist/app/conversation-page/attachments.d.ts +25 -0
  13. package/dist/app/conversation-page/attachments.js +34 -0
  14. package/dist/app/conversation-page/conversation-header.js +1 -1
  15. package/dist/app/conversation-page/conversation-message.d.ts +2 -2
  16. package/dist/app/conversation-page/conversation-message.js +26 -20
  17. package/dist/app/conversation-page/conversation-messages.d.ts +2 -1
  18. package/dist/app/conversation-page/conversation-messages.js +11 -3
  19. package/dist/app/conversation-page/conversation-page.js +3 -2
  20. package/dist/app/conversation-page/conversation-reads.d.ts +12 -7
  21. package/dist/app/conversation-page/conversation-reads.js +9 -9
  22. package/dist/app/conversation-page/message-attachments.d.ts +13 -0
  23. package/dist/app/conversation-page/message-attachments.js +63 -0
  24. package/dist/app/conversation-page/message-ops.d.ts +15 -0
  25. package/dist/app/conversation-page/message-ops.js +32 -0
  26. package/dist/app/conversation-page/message-setup.d.ts +3 -1
  27. package/dist/app/conversation-page/messages.d.ts +2 -2
  28. package/dist/app/conversation-page/pending-attachments.d.ts +12 -0
  29. package/dist/app/conversation-page/pending-attachments.js +40 -0
  30. package/dist/app/conversation-page/thread-panel.js +5 -4
  31. package/dist/app/conversation-page/uploads.d.ts +32 -0
  32. package/dist/app/conversation-page/uploads.js +33 -0
  33. package/dist/app/conversation-page/use-attachment-uploads.d.ts +20 -0
  34. package/dist/app/conversation-page/use-attachment-uploads.js +66 -0
  35. package/dist/app/conversation-page/use-message-attachments.d.ts +13 -0
  36. package/dist/app/conversation-page/use-message-attachments.js +28 -0
  37. package/dist/app/conversation-page/use-message-reactions.js +3 -3
  38. package/dist/app/conversation-page/use-message-setup.d.ts +3 -2
  39. package/dist/app/conversation-page/use-message-setup.js +6 -2
  40. package/dist/app/conversation-page/use-message-writes.d.ts +3 -2
  41. package/dist/app/conversation-page/use-message-writes.js +3 -2
  42. package/dist/app/create/messages.d.ts +2 -2
  43. package/dist/app/delete/messages.d.ts +2 -2
  44. package/dist/app/displays/board-display.d.ts +4 -4
  45. package/dist/app/displays/board-display.js +12 -8
  46. package/dist/app/displays/board-takes.d.ts +21 -0
  47. package/dist/app/displays/board-takes.js +32 -0
  48. package/dist/app/displays/check-reason.d.ts +9 -0
  49. package/dist/app/displays/check-reason.js +30 -0
  50. package/dist/app/displays/messages.d.ts +2 -2
  51. package/dist/app/displays/set-undo.d.ts +14 -0
  52. package/dist/app/displays/set-undo.js +14 -0
  53. package/dist/app/displays/use-board-move.d.ts +9 -4
  54. package/dist/app/displays/use-board-move.js +33 -6
  55. package/dist/app/embedded-list/messages.d.ts +2 -2
  56. package/dist/app/export/export-worker.js +1 -1
  57. package/dist/app/export/messages.d.ts +2 -2
  58. package/dist/app/field-messages.d.ts +2 -2
  59. package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
  60. package/dist/app/field-types/json/messages.d.ts +2 -2
  61. package/dist/app/field-types/runner-install/messages.d.ts +2 -2
  62. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  63. package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
  64. package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
  65. package/dist/app/file-viewers/messages.d.ts +2 -2
  66. package/dist/app/focus/messages.d.ts +2 -2
  67. package/dist/app/gallery/messages.d.ts +2 -2
  68. package/dist/app/hand-order/messages.d.ts +2 -2
  69. package/dist/app/history/messages.d.ts +2 -2
  70. package/dist/app/import/messages.d.ts +2 -2
  71. package/dist/app/list-messages.d.ts +2 -2
  72. package/dist/app/list-page.js +1 -1
  73. package/dist/app/main.js +1 -1
  74. package/dist/app/messages.d.ts +2 -2
  75. package/dist/app/new-version/messages.d.ts +2 -2
  76. package/dist/app/pages/messages.d.ts +2 -2
  77. package/dist/app/record-chart/messages.d.ts +2 -2
  78. package/dist/app/record-lines.js +1 -1
  79. package/dist/app/record-messages.d.ts +2 -2
  80. package/dist/app/record-page.js +1 -1
  81. package/dist/app/record-row/messages.d.ts +2 -2
  82. package/dist/app/related-cards/messages.d.ts +2 -2
  83. package/dist/app/runtime/messages.d.ts +2 -2
  84. package/dist/app/saved/messages.d.ts +2 -2
  85. package/dist/app/searches/messages.d.ts +2 -2
  86. package/dist/app-shell/messages.d.ts +2 -2
  87. package/dist/assistant-dock/messages.d.ts +2 -2
  88. package/dist/auth/messages.d.ts +2 -2
  89. package/dist/calls/messages.d.ts +2 -2
  90. package/dist/chat/messages.d.ts +2 -2
  91. package/dist/compact-table/messages.d.ts +2 -2
  92. package/dist/data/query-keys.d.ts +2 -0
  93. package/dist/data/query-keys.js +7 -0
  94. package/dist/data-grid/messages.d.ts +2 -2
  95. package/dist/filter-panel/messages.d.ts +2 -2
  96. package/dist/inline-child-table/messages.d.ts +2 -2
  97. package/dist/invitations/messages.d.ts +2 -2
  98. package/dist/locale/en.js +11 -1
  99. package/dist/locale/en.json.d.ts +10 -0
  100. package/dist/locale/messages.d.ts +20 -0
  101. package/dist/locale/nl.js +11 -1
  102. package/dist/mailbox/messages.d.ts +2 -2
  103. package/dist/mentions/messages.d.ts +2 -2
  104. package/dist/mocks/orders.d.ts +2 -2
  105. package/dist/notifications/bell/messages.d.ts +2 -2
  106. package/dist/organizations/messages.d.ts +2 -2
  107. package/dist/package.js +1 -1
  108. package/dist/plugins/messages.d.ts +2 -2
  109. package/dist/primitives/messages.d.ts +2 -2
  110. package/dist/record-view/messages.d.ts +2 -2
  111. package/dist/shell/assets/{account-page-CfX28GQ8.js → account-page-K162oV2K.js} +2 -2
  112. package/dist/shell/assets/app-lQJl2mz_.css +2 -0
  113. package/dist/shell/assets/app-vx5mZ2uE.js +34 -0
  114. package/dist/shell/assets/{assistant-shell-z2XOEbOj.js → assistant-shell-BudITySr.js} +2 -2
  115. package/dist/shell/assets/board-display-Bs4z3PwA.js +2 -0
  116. package/dist/shell/assets/{calendar-display-CCAuGvO0.js → calendar-display-tHm1Uuwv.js} +2 -2
  117. package/dist/shell/assets/{call-rings-DpsiFB6J.js → call-rings-pKCPyD1-.js} +2 -2
  118. package/dist/shell/assets/{calls-DXZIKdLq.js → calls-CLQwaemL.js} +2 -2
  119. package/dist/shell/assets/{circle-alert-DLkf2jqw.js → circle-alert-05wFSlkE.js} +2 -2
  120. package/dist/shell/assets/composed-page-D3_OTQB4.js +2 -0
  121. package/dist/shell/assets/{composer-section-DfppQhmw.js → composer-section-BoFYW5rp.js} +2 -2
  122. package/dist/shell/assets/{connect-route-CY2ZfSc_.js → connect-route-D0m9ozLK.js} +2 -2
  123. package/dist/shell/assets/{copy-field-q7yD4jZB.js → copy-field-DjAdwdDh.js} +2 -2
  124. package/dist/shell/assets/create-route-CZDGdfY8.js +2 -0
  125. package/dist/shell/assets/{custom-step-container-field-CgoMp_U9.js → custom-step-container-field-DTCgqZMO.js} +4 -4
  126. package/dist/shell/assets/embedded-list-wbLEr5-r.js +3 -0
  127. package/dist/shell/assets/en-0TxR0Vfb.js +2 -0
  128. package/dist/shell/assets/{export-dialog-WJeF3CbF.js → export-dialog-BVmThgqO.js} +2 -2
  129. package/dist/shell/assets/export-worker-AFqbgGzG.js +15 -0
  130. package/dist/shell/assets/{first-organization-page-DEEIRm-0.js → first-organization-page-B986-W2g.js} +2 -2
  131. package/dist/shell/assets/{graph-view-D4xNpQ_g.js → graph-view-BEerNiMa.js} +2 -2
  132. package/dist/shell/assets/{group-donut-BaFas9ku.js → group-donut-DgttsF8V.js} +2 -2
  133. package/dist/shell/assets/{guest-call-page-DkPBCsWu.js → guest-call-page-CKEva7eV.js} +3 -3
  134. package/dist/shell/assets/{html-viewer-BxpAIOTS.js → html-viewer-FMIvHlJ9.js} +2 -2
  135. package/dist/shell/assets/{import-dialog-CGbSlHpH.js → import-dialog-CjFrTZBf.js} +2 -2
  136. package/dist/shell/assets/{import-table-dialog-D_Ocp3vu.js → import-table-dialog-CoTd03ud.js} +2 -2
  137. package/dist/shell/assets/{index-BqXzr-yT.js → index-BrTE5pLB.js} +1 -1
  138. package/dist/shell/assets/{invitations-page-BMPl6GWq.js → invitations-page-Ds817tOV.js} +2 -2
  139. package/dist/shell/assets/{layout-grid-DRPuMrqQ.js → layout-grid-o1f0ZIIR.js} +2 -2
  140. package/dist/shell/assets/{legend-item-BBq7fIY0.js → legend-item-CamCYS1J.js} +2 -2
  141. package/dist/shell/assets/list-page-CHdsbqR8.js +4 -0
  142. package/dist/shell/assets/{maplibre-DtBIeJSN.js → maplibre-DVBhKlXN.js} +2 -2
  143. package/dist/shell/assets/{markdown-content-CtsPlIoM.js → markdown-content-CfblNnhw.js} +2 -2
  144. package/dist/shell/assets/members-page-CCLPZ9sH.js +2 -0
  145. package/dist/shell/assets/{message-content-DXUPTfSg.js → message-content--7TsRUEK.js} +3 -3
  146. package/dist/shell/assets/messages-BaKJKIHo.js +2 -0
  147. package/dist/shell/assets/nl-mDiTKi5y.js +2 -0
  148. package/dist/shell/assets/organization-page-DE4U9Xbi.js +2 -0
  149. package/dist/shell/assets/organizations-page-DcRX2C5D.js +2 -0
  150. package/dist/shell/assets/parse-worker-C5wWzRYH.js +35 -0
  151. package/dist/shell/assets/{pending-invitation-row-CNhLeVIQ.js → pending-invitation-row-By5UWOua.js} +2 -2
  152. package/dist/shell/assets/{period-chart-Dt45QkuG.js → period-chart-C3ZV_QjX.js} +2 -2
  153. package/dist/shell/assets/{person-row-CcvbtovO.js → person-row-Dvc6wiac.js} +2 -2
  154. package/dist/shell/assets/public-form-page-C2K3mhKj.js +2 -0
  155. package/dist/shell/assets/record-lines-DLM3i7dN.js +2 -0
  156. package/dist/shell/assets/{record-map-B9GnjR1C.js → record-map-M24QGWvA.js} +2 -2
  157. package/dist/shell/assets/{record-opens-B4gCpNRB.js → record-opens-CNOaCrB0.js} +2 -2
  158. package/dist/shell/assets/record-page-DVmkJFmF.js +3 -0
  159. package/dist/shell/assets/{record-preview-JiWY0Bog.js → record-preview-Bk9A5TNd.js} +2 -2
  160. package/dist/shell/assets/{records-map-C8eK7w7P.js → records-map-D1JVIHvn.js} +2 -2
  161. package/dist/shell/assets/render-node-C-yLArnA.js +3 -0
  162. package/dist/shell/assets/reorder-button-CrDVuiOd.js +2 -0
  163. package/dist/shell/assets/{run-trace-view-C9eyUJ6D.js → run-trace-view-CBYw9RPI.js} +2 -2
  164. package/dist/shell/assets/{runner-install-field-DSyxhG1I.js → runner-install-field--7xa6MIJ.js} +2 -2
  165. package/dist/shell/assets/{runtime-update-L7M--oiI.js → runtime-update-DWO9xR0h.js} +2 -2
  166. package/dist/shell/assets/shared-protobase-ui-DGEYEBZj.js +1 -0
  167. package/dist/shell/assets/{sheet-source-D5zF3gg-.js → sheet-source-DKZ31RE_.js} +3 -3
  168. package/dist/shell/assets/sign-in-policy-page-B-m5Pcyb.js +2 -0
  169. package/dist/shell/assets/start-block-queries-OldcFqiL.js +2 -0
  170. package/dist/shell/assets/step-catalog-N67Ej6Fl.js +2 -0
  171. package/dist/shell/assets/{step-panel-DMfELcMq.js → step-panel-xClc_YhC.js} +2 -2
  172. package/dist/shell/assets/timeline-display-DwR4-qO_.js +2 -0
  173. package/dist/shell/assets/{trash-CjMf5J76.js → trash-DTqja_Bl.js} +2 -2
  174. package/dist/shell/assets/{update-set-WE2PkaIw.js → update-set-g33TLRML.js} +2 -2
  175. package/dist/shell/assets/use-calendar-move-BaNKG9_2.js +2 -0
  176. package/dist/shell/assets/{use-display-rows-mgonVNXo.js → use-display-rows-sN3JfCRy.js} +2 -2
  177. package/dist/shell/assets/use-my-invitations-BIsBGgmc.js +2 -0
  178. package/dist/shell/assets/{use-paged-search-RKqj14d3.js → use-paged-search-DrjHdSz7.js} +2 -2
  179. package/dist/shell/assets/{use-run-trace-Cpbf2fu6.js → use-run-trace-DFLNmghw.js} +2 -2
  180. package/dist/shell/assets/{use-workflow-page-CoLMHSGc.js → use-workflow-page-Cfztiqhc.js} +2 -2
  181. package/dist/shell/assets/{use-workflow-types-D-FjK73S.js → use-workflow-types-BFToPBTN.js} +2 -2
  182. package/dist/shell/assets/{workflow-canvas-RpvT30bM.js → workflow-canvas-D7hU35fr.js} +4 -4
  183. package/dist/shell/assets/{workflow-field-lsm3hyfI.js → workflow-field-D7X0A1GO.js} +3 -3
  184. package/dist/shell/assets/{workflow-graph-editor-jIDR6xNQ.js → workflow-graph-editor-16CoiFFG.js} +2 -2
  185. package/dist/shell/assets/{workflow-run-field-BBBew-3S.js → workflow-run-field-DJLolq5e.js} +3 -3
  186. package/dist/shell/assets/workflow-status-field-weFyKOIV.js +2 -0
  187. package/dist/shell/assets/workflow-workbench-DErE_AKt.js +4 -0
  188. package/dist/shell/index.html +4 -4
  189. package/dist/shell/protobase.shell.json +2 -2
  190. package/dist/shell/protobase.sw.js +2 -2
  191. package/dist/shell-source-maps/assets/{account-page-CfX28GQ8.js.map → account-page-K162oV2K.js.map} +1 -1
  192. package/dist/shell-source-maps/assets/app-vx5mZ2uE.js.map +1 -0
  193. package/dist/shell-source-maps/assets/{assistant-shell-z2XOEbOj.js.map → assistant-shell-BudITySr.js.map} +1 -1
  194. package/dist/shell-source-maps/assets/board-display-Bs4z3PwA.js.map +1 -0
  195. package/dist/shell-source-maps/assets/{calendar-display-CCAuGvO0.js.map → calendar-display-tHm1Uuwv.js.map} +1 -1
  196. package/dist/shell-source-maps/assets/{call-rings-DpsiFB6J.js.map → call-rings-pKCPyD1-.js.map} +1 -1
  197. package/dist/shell-source-maps/assets/{calls-DXZIKdLq.js.map → calls-CLQwaemL.js.map} +1 -1
  198. package/dist/shell-source-maps/assets/{circle-alert-DLkf2jqw.js.map → circle-alert-05wFSlkE.js.map} +1 -1
  199. package/dist/shell-source-maps/assets/{composed-page-Dgq_w1W6.js.map → composed-page-D3_OTQB4.js.map} +1 -1
  200. package/dist/shell-source-maps/assets/{composer-section-DfppQhmw.js.map → composer-section-BoFYW5rp.js.map} +1 -1
  201. package/dist/shell-source-maps/assets/{connect-route-CY2ZfSc_.js.map → connect-route-D0m9ozLK.js.map} +1 -1
  202. package/dist/shell-source-maps/assets/{copy-field-q7yD4jZB.js.map → copy-field-DjAdwdDh.js.map} +1 -1
  203. package/dist/shell-source-maps/assets/{create-route-DA9m3zuH.js.map → create-route-CZDGdfY8.js.map} +1 -1
  204. package/dist/shell-source-maps/assets/{custom-step-container-field-CgoMp_U9.js.map → custom-step-container-field-DTCgqZMO.js.map} +1 -1
  205. package/dist/shell-source-maps/assets/{embedded-list-BdX2FUxK.js.map → embedded-list-wbLEr5-r.js.map} +1 -1
  206. package/dist/shell-source-maps/assets/en-0TxR0Vfb.js.map +1 -0
  207. package/dist/shell-source-maps/assets/{export-dialog-WJeF3CbF.js.map → export-dialog-BVmThgqO.js.map} +1 -1
  208. package/dist/shell-source-maps/assets/export-worker-AFqbgGzG.js.map +1 -0
  209. package/dist/shell-source-maps/assets/{first-organization-page-DEEIRm-0.js.map → first-organization-page-B986-W2g.js.map} +1 -1
  210. package/dist/shell-source-maps/assets/{graph-view-D4xNpQ_g.js.map → graph-view-BEerNiMa.js.map} +1 -1
  211. package/dist/shell-source-maps/assets/{group-donut-BaFas9ku.js.map → group-donut-DgttsF8V.js.map} +1 -1
  212. package/dist/shell-source-maps/assets/{guest-call-page-DkPBCsWu.js.map → guest-call-page-CKEva7eV.js.map} +1 -1
  213. package/dist/shell-source-maps/assets/{html-viewer-BxpAIOTS.js.map → html-viewer-FMIvHlJ9.js.map} +1 -1
  214. package/dist/shell-source-maps/assets/{import-dialog-CGbSlHpH.js.map → import-dialog-CjFrTZBf.js.map} +1 -1
  215. package/dist/shell-source-maps/assets/{import-table-dialog-D_Ocp3vu.js.map → import-table-dialog-CoTd03ud.js.map} +1 -1
  216. package/dist/shell-source-maps/assets/{invitations-page-BMPl6GWq.js.map → invitations-page-Ds817tOV.js.map} +1 -1
  217. package/dist/shell-source-maps/assets/{layout-grid-DRPuMrqQ.js.map → layout-grid-o1f0ZIIR.js.map} +1 -1
  218. package/dist/shell-source-maps/assets/{legend-item-BBq7fIY0.js.map → legend-item-CamCYS1J.js.map} +1 -1
  219. package/dist/shell-source-maps/assets/{list-page-C2PiELeV.js.map → list-page-CHdsbqR8.js.map} +1 -1
  220. package/dist/shell-source-maps/assets/{maplibre-DtBIeJSN.js.map → maplibre-DVBhKlXN.js.map} +1 -1
  221. package/dist/shell-source-maps/assets/{markdown-content-CtsPlIoM.js.map → markdown-content-CfblNnhw.js.map} +1 -1
  222. package/dist/shell-source-maps/assets/{members-page-BOGEqd2d.js.map → members-page-CCLPZ9sH.js.map} +1 -1
  223. package/dist/shell-source-maps/assets/{message-content-DXUPTfSg.js.map → message-content--7TsRUEK.js.map} +1 -1
  224. package/dist/shell-source-maps/assets/{messages-uoUGFNWe.js.map → messages-BaKJKIHo.js.map} +1 -1
  225. package/dist/shell-source-maps/assets/nl-mDiTKi5y.js.map +1 -0
  226. package/dist/shell-source-maps/assets/{organization-page-i6ma8Zpd.js.map → organization-page-DE4U9Xbi.js.map} +1 -1
  227. package/dist/shell-source-maps/assets/{organizations-page-DoKdrKKR.js.map → organizations-page-DcRX2C5D.js.map} +1 -1
  228. package/dist/shell-source-maps/assets/parse-worker-C5wWzRYH.js.map +1 -0
  229. package/dist/shell-source-maps/assets/{pending-invitation-row-CNhLeVIQ.js.map → pending-invitation-row-By5UWOua.js.map} +1 -1
  230. package/dist/shell-source-maps/assets/{period-chart-Dt45QkuG.js.map → period-chart-C3ZV_QjX.js.map} +1 -1
  231. package/dist/shell-source-maps/assets/{person-row-CcvbtovO.js.map → person-row-Dvc6wiac.js.map} +1 -1
  232. package/dist/shell-source-maps/assets/{public-form-page-uedT0S1c.js.map → public-form-page-C2K3mhKj.js.map} +1 -1
  233. package/dist/shell-source-maps/assets/{record-lines-Dv0Sa0Bm.js.map → record-lines-DLM3i7dN.js.map} +1 -1
  234. package/dist/shell-source-maps/assets/{record-map-B9GnjR1C.js.map → record-map-M24QGWvA.js.map} +1 -1
  235. package/dist/shell-source-maps/assets/{record-opens-B4gCpNRB.js.map → record-opens-CNOaCrB0.js.map} +1 -1
  236. package/dist/shell-source-maps/assets/record-page-DVmkJFmF.js.map +1 -0
  237. package/dist/shell-source-maps/assets/{record-preview-JiWY0Bog.js.map → record-preview-Bk9A5TNd.js.map} +1 -1
  238. package/dist/shell-source-maps/assets/{records-map-C8eK7w7P.js.map → records-map-D1JVIHvn.js.map} +1 -1
  239. package/dist/shell-source-maps/assets/render-node-C-yLArnA.js.map +1 -0
  240. package/dist/shell-source-maps/assets/{reorder-button-osmG3Y_Q.js.map → reorder-button-CrDVuiOd.js.map} +1 -1
  241. package/dist/shell-source-maps/assets/{run-trace-view-C9eyUJ6D.js.map → run-trace-view-CBYw9RPI.js.map} +1 -1
  242. package/dist/shell-source-maps/assets/{runner-install-field-DSyxhG1I.js.map → runner-install-field--7xa6MIJ.js.map} +1 -1
  243. package/dist/shell-source-maps/assets/{runtime-update-L7M--oiI.js.map → runtime-update-DWO9xR0h.js.map} +1 -1
  244. package/dist/shell-source-maps/assets/{sheet-source-D5zF3gg-.js.map → sheet-source-DKZ31RE_.js.map} +1 -1
  245. package/dist/shell-source-maps/assets/{sign-in-policy-page-DYeJZDYd.js.map → sign-in-policy-page-B-m5Pcyb.js.map} +1 -1
  246. package/dist/shell-source-maps/assets/{start-block-queries-KIFQbRdj.js.map → start-block-queries-OldcFqiL.js.map} +1 -1
  247. package/dist/shell-source-maps/assets/{step-catalog-DOFD42Kz.js.map → step-catalog-N67Ej6Fl.js.map} +1 -1
  248. package/dist/shell-source-maps/assets/{step-panel-DMfELcMq.js.map → step-panel-xClc_YhC.js.map} +1 -1
  249. package/dist/shell-source-maps/assets/{timeline-display-YsTp3TdW.js.map → timeline-display-DwR4-qO_.js.map} +1 -1
  250. package/dist/shell-source-maps/assets/{trash-CjMf5J76.js.map → trash-DTqja_Bl.js.map} +1 -1
  251. package/dist/shell-source-maps/assets/{update-set-WE2PkaIw.js.map → update-set-g33TLRML.js.map} +1 -1
  252. package/dist/shell-source-maps/assets/{use-calendar-move-z44ne2up.js.map → use-calendar-move-BaNKG9_2.js.map} +1 -1
  253. package/dist/shell-source-maps/assets/{use-display-rows-mgonVNXo.js.map → use-display-rows-sN3JfCRy.js.map} +1 -1
  254. package/dist/shell-source-maps/assets/{use-my-invitations-KI0E0ZhE.js.map → use-my-invitations-BIsBGgmc.js.map} +1 -1
  255. package/dist/shell-source-maps/assets/{use-paged-search-RKqj14d3.js.map → use-paged-search-DrjHdSz7.js.map} +1 -1
  256. package/dist/shell-source-maps/assets/{use-run-trace-Cpbf2fu6.js.map → use-run-trace-DFLNmghw.js.map} +1 -1
  257. package/dist/shell-source-maps/assets/{use-workflow-page-CoLMHSGc.js.map → use-workflow-page-Cfztiqhc.js.map} +1 -1
  258. package/dist/shell-source-maps/assets/{use-workflow-types-D-FjK73S.js.map → use-workflow-types-BFToPBTN.js.map} +1 -1
  259. package/dist/shell-source-maps/assets/{workflow-canvas-RpvT30bM.js.map → workflow-canvas-D7hU35fr.js.map} +1 -1
  260. package/dist/shell-source-maps/assets/{workflow-field-lsm3hyfI.js.map → workflow-field-D7X0A1GO.js.map} +1 -1
  261. package/dist/shell-source-maps/assets/{workflow-graph-editor-jIDR6xNQ.js.map → workflow-graph-editor-16CoiFFG.js.map} +1 -1
  262. package/dist/shell-source-maps/assets/{workflow-run-field-BBBew-3S.js.map → workflow-run-field-DJLolq5e.js.map} +1 -1
  263. package/dist/shell-source-maps/assets/{workflow-status-field-DfUANDAX.js.map → workflow-status-field-weFyKOIV.js.map} +1 -1
  264. package/dist/shell-source-maps/assets/{workflow-workbench-C_-fh16c.js.map → workflow-workbench-DErE_AKt.js.map} +1 -1
  265. package/dist/status/messages.d.ts +2 -2
  266. package/dist/users/messages.d.ts +2 -2
  267. package/package.json +5 -5
  268. package/dist/shell/assets/app-26FM9hvC.js +0 -34
  269. package/dist/shell/assets/app-woXO0qfi.css +0 -2
  270. package/dist/shell/assets/board-display-DJpwNHqR.js +0 -2
  271. package/dist/shell/assets/composed-page-Dgq_w1W6.js +0 -2
  272. package/dist/shell/assets/create-route-DA9m3zuH.js +0 -2
  273. package/dist/shell/assets/embedded-list-BdX2FUxK.js +0 -3
  274. package/dist/shell/assets/en-F4WlEfjV.js +0 -2
  275. package/dist/shell/assets/export-worker-BbrJ4DH1.js +0 -15
  276. package/dist/shell/assets/list-page-C2PiELeV.js +0 -4
  277. package/dist/shell/assets/members-page-BOGEqd2d.js +0 -2
  278. package/dist/shell/assets/messages-uoUGFNWe.js +0 -2
  279. package/dist/shell/assets/nl-CGzPjT6w.js +0 -2
  280. package/dist/shell/assets/organization-page-i6ma8Zpd.js +0 -2
  281. package/dist/shell/assets/organizations-page-DoKdrKKR.js +0 -2
  282. package/dist/shell/assets/parse-worker-CG0FAJQa.js +0 -35
  283. package/dist/shell/assets/public-form-page-uedT0S1c.js +0 -2
  284. package/dist/shell/assets/record-lines-Dv0Sa0Bm.js +0 -2
  285. package/dist/shell/assets/record-page-Cj_q__l8.js +0 -3
  286. package/dist/shell/assets/render-node-BuW1TcF4.js +0 -3
  287. package/dist/shell/assets/reorder-button-osmG3Y_Q.js +0 -2
  288. package/dist/shell/assets/shared-protobase-ui-DfJkgcs2.js +0 -1
  289. package/dist/shell/assets/sign-in-policy-page-DYeJZDYd.js +0 -2
  290. package/dist/shell/assets/start-block-queries-KIFQbRdj.js +0 -2
  291. package/dist/shell/assets/step-catalog-DOFD42Kz.js +0 -2
  292. package/dist/shell/assets/timeline-display-YsTp3TdW.js +0 -2
  293. package/dist/shell/assets/use-calendar-move-z44ne2up.js +0 -2
  294. package/dist/shell/assets/use-my-invitations-KI0E0ZhE.js +0 -2
  295. package/dist/shell/assets/workflow-status-field-DfUANDAX.js +0 -2
  296. package/dist/shell/assets/workflow-workbench-C_-fh16c.js +0 -4
  297. package/dist/shell-source-maps/assets/app-26FM9hvC.js.map +0 -1
  298. package/dist/shell-source-maps/assets/board-display-DJpwNHqR.js.map +0 -1
  299. package/dist/shell-source-maps/assets/en-F4WlEfjV.js.map +0 -1
  300. package/dist/shell-source-maps/assets/export-worker-BbrJ4DH1.js.map +0 -1
  301. package/dist/shell-source-maps/assets/nl-CGzPjT6w.js.map +0 -1
  302. package/dist/shell-source-maps/assets/parse-worker-CG0FAJQa.js.map +0 -1
  303. package/dist/shell-source-maps/assets/record-page-Cj_q__l8.js.map +0 -1
  304. package/dist/shell-source-maps/assets/render-node-BuW1TcF4.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"board-display-DJpwNHqR.js","names":["isRank","text","text","useState","useRef","text","orderText","useState","useRef","text","n","a","t","__toESM","require_react","require_jsx_runtime","can","useToast","recordKey","cn","useProjectUi","rowAllows","Problem","parseFilter","useRefreshResource","useAdminMeta","boardColumns","boardRank","text$1","humanize","useClient","ValueBadge","usePermissions","formatTag","Button","columnFilter","Skeleton","boardCard","encodeKey","ErrorBanner","useMutation","RecordCard","useLiveRows","useSensor","MouseSensor","useDroppable","KeyboardSensor","DragOverlay","TouchSensor","DndContext","useSensors","verticalListSortingStrategy","useSortable","arrayMove","SortableContext","undoOps","rankBounds","listHandOrder","numberedBefore","moveRefusal","anchoredMove","text$3","text$2","collision","columnId","cardCoordinates","useDisplayRows","isRank$1","value","reorderSpan","rising","first","ranks","tail","last","from","start","to","import_react","useBoardColumn","rows","fields","filter","by","model","import_jsx_runtime","inOrder","order","byKey","row","named","key","BoardColumnView","list","display","column","card","view","loaded","moving","moves","entry","leaving","arriving","staying","placing","all","limit","more","count","isOver","plural","hints","setNodeRef","index","BoardCard","movable","placeable","draggable","active","element","setActivatorNodeRef","listeners","event","dragged","transform","isDragging","flatten","expr","text","allowedBy","clause","values","columnsAllowed","parsed","columns","clauses","dropWrite","drop","placedRows","placeOps","move","rank","bumped","bump","boardWrites","keyOf","record","result","before","stored","written","was","isRank","rankedPlace","end","reason","at","span","ranked","i","rankOf","bound","mine","above","bounds","below","refusal","title","useBoardMove","client","toast","refresh","setMoves","undoToast","settle","current","undo","undoing","error","dropped","write","etag","saved","writes","show","moved","keys","allowed","place","titleOf","stays","placed","landing","mutation","landed","labelOf","id","placeOver","data","over","own","BoardDisplay","every","permissions","drag","dropName","boardDrops","takes","columnOrder","orderBy","setActive","sensors","columnOf","valueOf","crosses","announced","refused","target","picked","said"],"sources":["../../../../schema/src/reorder-span.ts","../../../src/app/displays/use-board-column.ts","../../../src/app/displays/board-column.tsx","../../../src/app/displays/board-allowed.ts","../../../src/app/displays/board-drop.ts","../../../src/app/displays/board-place.ts","../../../src/app/rank-after/ranked-place.ts","../../../src/app/displays/use-board-move.ts","../../../src/app/displays/board-display.tsx"],"sourcesContent":["/** The stretch of an ordered list a `reorder` numbers: the records `first` to `last`, valued `start`, `start` + 1, ... */\nexport type ReorderSpan = { first: number; last: number; start: number }\n\nconst isRank = (value: unknown): value is number => typeof value === 'number' && Number.isInteger(value)\n\n/**\n * The shortest stretch that saves a move: `ranks` are the records' values in their new order, and `first` to `last`\n * the places that moved. The records before it keep their values, so they must already rise, and the stretch starts\n * just above them, or at 1; it then reaches on until the next record already ranks above it. When the values were\n * 1, 2, 3, ... that is the records that moved and nothing else, so a long list sends a few keys instead of all of them.\n */\nexport const reorderSpan = (ranks: readonly unknown[], first: number, last: number): ReorderSpan => {\n // How far from the start the values rise, and from where they rise to the end\n let rising = 0\n while (rising < first && isRank(ranks[rising]) && (rising === 0 || (ranks[rising] as number) > (ranks[rising - 1] as number))) rising += 1\n let tail = ranks.length\n while (tail - 1 > last && isRank(ranks[tail - 1]) && (tail === ranks.length || (ranks[tail - 1] as number) < (ranks[tail] as number))) tail -= 1\n\n const from = Math.min(first, rising)\n const start = from === 0 ? 1 : (ranks[from - 1] as number) + 1\n let to = Math.max(last, tail - 1)\n while (to + 1 < ranks.length && (ranks[to + 1] as number) <= start + (to - from)) to += 1\n return { first: from, last: to, start }\n}\n","import type { ResourceModel } from '@protobase/schema'\nimport { useLiveRows } from '../../live/use-live-rows'\nimport { useAdminMeta } from '../meta-gate'\nimport { columnFilter } from './board-columns'\nimport type { ListDisplay } from './display-context'\nimport { useDisplayRows } from './use-display-rows'\n\nexport type BoardColumnParams = {\n model: ResourceModel\n by: string\n value: string | null\n /** The fields the cards show, which the records' relations are labelled for. */\n fields: string[]\n /** The list's filter, its search included, and its order, as the list API takes them. */\n filter: string\n orderBy: string\n}\n\n/**\n * The records of one column of a board, page by page through the list API: the list's filter with the column's value\n * added, in the list's order, with how many there are. A change to the resource reloads them, as it does the table.\n */\nexport const useBoardColumn = ({ model, by, value, fields, filter, orderBy }: BoardColumnParams): ListDisplay => {\n const { resources, views } = useAdminMeta()\n const rows = useLiveRows({ resources, views, model, columns: fields, filter: columnFilter(filter, by, value), orderBy })\n return useDisplayRows(model, rows.page, rows.key, true)\n}\n","import { useDroppable } from '@dnd-kit/core'\nimport { SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable'\nimport type { ResourceModel, ViewModel } from '@protobase/schema'\nimport { cn } from '../../lib/cn'\nimport { humanize } from '../../live/naming'\nimport { Button } from '../../primitives/button'\nimport { Skeleton } from '../../primitives/skeleton'\nimport { ErrorBanner } from '../error-banner'\nimport { rowAllows } from '../permissions'\nimport { ValueBadge } from '../value-badge'\nimport { boardCard, type BoardColumn, type BoardDisplayModel } from './board-columns'\nimport { columnId } from './board-dnd'\nimport type { ListDisplayRow } from './list-displays'\nimport { RecordCard } from './record-card'\nimport { useBoardColumn } from './use-board-column'\nimport type { BoardMove } from './use-board-move'\nimport { formatTag } from '../../locale/active-locale'\nimport { text } from './messages'\n\ntype ColumnProps = {\n model: ResourceModel\n view: ViewModel | undefined\n display: BoardDisplayModel\n fields: string[]\n filter: string\n orderBy: string\n limit?: number\n column: BoardColumn\n moves: BoardMove[]\n /** Whether the user may move a card of this column to another, and whether to another place: that of the card it is dropped on. */\n movable: boolean\n placeable: boolean\n dragged: () => boolean\n}\n\n// The rows shown in the order a ranked drop on its way gives them, those it does not name after them\nconst inOrder = (rows: ListDisplayRow[], order: string[] | undefined) => {\n if (!order) return rows\n const byKey = new Map(rows.map((row) => [row.key, row]))\n const named = new Set(order)\n return [...order.flatMap((key) => byKey.get(key) ?? []), ...rows.filter((row) => !named.has(row.key))]\n}\n\n/**\n * One column of a board: its loaded records, those on their way out shown in their new column, and those on their way\n * in at its top, or on a ranked board at the place they were dropped.\n */\nexport const BoardColumnView = ({ model, view, display, column, fields, filter, orderBy, limit, moves, movable, placeable, dragged }: ColumnProps) => {\n const list = useBoardColumn({ model, by: display.by, value: column.value, fields, filter, orderBy })\n const card = boardCard(model, view, display)\n const loaded = new Set(list.rows.map((row) => row.key))\n const moving = new Map(moves.map((entry) => [entry.row.key, entry]))\n const leaving = list.rows.filter((row) => moving.has(row.key) && moving.get(row.key)!.to !== column.value)\n const arriving = moves.filter((entry) => entry.to === column.value && !loaded.has(entry.row.key)).map((entry) => entry.row)\n const staying = list.rows.filter((row) => !leaving.includes(row)).map((row) => (moving.has(row.key) ? moving.get(row.key)!.row : row))\n const placing = moves.findLast((entry) => entry.to === column.value && entry.order)\n const all = inOrder([...arriving, ...staying], placing?.order)\n const rows = all.slice(0, limit)\n // Cards below the last one shown, not loaded or cut off, so a drop after it does not know the card after it\n const more = list.more || all.length > rows.length\n const { setNodeRef, isOver } = useDroppable({ id: columnId(column.value), data: { column, rows, more } })\n const count = list.total - leaving.length + arriving.length\n // The column of records without a value shows only while some are in it\n if (column.value === null && !list.loading && count === 0 && !isOver) return null\n\n const plural = (view?.names?.plural ?? humanize(model.name)).toLowerCase()\n const hints = view?.fields[display.by]\n return (\n <section\n ref={setNodeRef}\n aria-label={`${column.label}, ${count}`}\n className={cn('flex w-72 shrink-0 snap-start flex-col gap-2 rounded-lg bg-surface p-2', isOver && 'ring-2 ring-primary/30')}\n >\n <header className=\"flex items-center justify-between gap-2 px-1 pt-0.5\">\n <h2 className=\"min-w-0 truncate text-body font-medium\">\n {column.value === null ? (\n <span className=\"text-muted-foreground\">{column.label}</span>\n ) : (\n <ValueBadge value={column.value} hints={hints}>\n {column.label}\n </ValueBadge>\n )}\n </h2>\n {!list.loading && <span className=\"text-xs tabular-nums text-muted-foreground\">{count.toLocaleString(formatTag())}</span>}\n </header>\n {list.loading ? (\n Array.from({ length: 3 }, (_, index) => <Skeleton key={index} className=\"h-20\" />)\n ) : list.error ? (\n <ErrorBanner title={text('couldNotLoadRows')} error={list.error} />\n ) : rows.length === 0 ? (\n <p className=\"px-1 py-4 text-center text-xs text-muted-foreground\">{text('noPlural', { plural })}</p>\n ) : (\n // Cards tile without gaps, so a pointer in the column is over a card or below the last one\n <SortableContext id={columnId(column.value)} items={rows.map((row) => row.key)} strategy={verticalListSortingStrategy}>\n <ul className=\"-mb-2 flex flex-col\">\n {rows.map((row) => (\n <BoardCard\n key={row.key}\n model={model}\n view={view}\n card={card}\n row={row}\n column={column}\n rows={rows}\n more={more}\n draggable={(movable || placeable) && rowAllows(row.record, 'update')}\n placeable={placeable}\n dragged={dragged}\n />\n ))}\n </ul>\n </SortableContext>\n )}\n {limit === undefined && list.more && (\n <Button size=\"sm\" variant=\"ghost\" onClick={list.loadMore}>\n {text('showMore')}\n </Button>\n )}\n </section>\n )\n}\n\ntype CardProps = {\n model: ResourceModel\n view: ViewModel | undefined\n card: ReturnType<typeof boardCard>\n row: ListDisplayRow\n column: BoardColumn\n rows: ListDisplayRow[]\n more: boolean\n draggable: boolean\n placeable: boolean\n dragged: () => boolean\n}\n\n/**\n * A record's card, picked up by dragging it or by Space on its link; one the user may not update stays put. Where the\n * user may change the order of a ranked board, a card is dropped on too: in its own column the cards make room as it\n * moves, in another a bar marks its place.\n */\nconst BoardCard = ({ model, view, card, row, column, rows, more, draggable, placeable, dragged }: CardProps) => {\n const { setNodeRef, setActivatorNodeRef, listeners, isDragging, isOver, active, transform, transition } = useSortable({\n id: row.key,\n data: { row, column, rows, more },\n disabled: { draggable: !draggable, droppable: !placeable },\n })\n const arriving = isOver && (active?.data.current?.column as BoardColumn | undefined)?.value !== column.value\n return (\n <li\n ref={(element) => {\n setNodeRef(element)\n // Space picks the card up from its link, which has the focus\n setActivatorNodeRef(element?.querySelector('a[data-card-link]') ?? element)\n }}\n {...listeners}\n // The card is a link, which the browser would drag as one\n onDragStart={(event) => event.preventDefault()}\n onClickCapture={(event) => {\n if (!dragged()) return\n event.preventDefault()\n event.stopPropagation()\n }}\n style={{ transform: transform ? `translate3d(${transform.x}px, ${transform.y}px, 0)` : undefined, transition }}\n className={cn(\n 'relative pb-2',\n draggable && 'cursor-grab touch-manipulation',\n isDragging && 'opacity-40',\n arriving && 'before:absolute before:inset-x-0 before:-top-1 before:h-0.5 before:rounded-full before:bg-primary',\n )}\n >\n <RecordCard model={model} view={view} display={card} row={row} swipe={false} />\n </li>\n )\n}\n","import { parseFilter, type FilterExpr } from '@protobase/schema'\nimport type { BoardColumn } from './board-columns'\n\nconst flatten = (expr: FilterExpr): FilterExpr[] => (expr.kind === 'and' ? expr.args.flatMap(flatten) : [expr])\n\nconst text = (value: { kind: string; value?: unknown }) => (value.kind === 'string' ? String(value.value) : undefined)\n\n// The values `by = \"v\"` or `in(by, ...)` allows, or none for any other clause\nconst allowedBy = (clause: FilterExpr, by: string): string[] | undefined => {\n if (clause.kind === 'compare' && clause.op === '=' && clause.field.path.join('.') === by) {\n const value = text(clause.value)\n return value === undefined ? undefined : [value]\n }\n if (clause.kind === 'in' && clause.field.path.join('.') === by) {\n const values = clause.values.map(text)\n return values.every((value) => value !== undefined) ? (values as string[]) : undefined\n }\n return undefined\n}\n\n/**\n * The columns of a board `filter` does not rule out: those its top-level `by = \"v\"` and `in(by, ...)` clauses allow. Any\n * other clause leaves every column, so a column is left out only when no record in it can match.\n */\nexport const columnsAllowed = (filter: string, by: string, columns: BoardColumn[]): BoardColumn[] => {\n const parsed = parseFilter(filter)\n if (!parsed.ok || !parsed.ast) return columns\n const clauses = flatten(parsed.ast).map((clause) => allowedBy(clause, by)).filter((values) => values !== undefined)\n return columns.filter((column) => clauses.every((values) => column.value !== null && values.includes(column.value)))\n}\n","import type { Client } from '@protobase/client'\nimport type { KeyValue } from '@protobase/schema'\n\n/** What a board drop's write gets: the card's record as listed, its key and ETag, the column it was dropped on, and the API. */\nexport type BoardDropContext = {\n resource: string\n record: Record<string, unknown>\n /** The record's key as the API takes it. */\n recordKey: KeyValue | readonly KeyValue[]\n etag: string\n /** The value of the column the card was dropped on. */\n to: string\n client: Client\n}\n\n/** What undoes a board drop's write, such as deleting the record it created. */\nexport type BoardDropUndo = () => Promise<void>\n\n/** A board drop's write for one column: what it saves in place of the record's `by`, and what undoes it, when it can be undone. */\nexport type BoardDropWrite = (context: BoardDropContext) => Promise<BoardDropUndo | void>\n\n/**\n * How cards move between a board's columns, a view's `drag.board` naming it: by the value of each column that takes a\n * card, what a drop there writes, such as creating a record of a related resource when `by` is computed from them. A\n * card in or dropped on any other column stays in its column, as does one dropped on the column of records without a\n * value.\n */\nexport type BoardDrop = Record<string, BoardDropWrite>\n\n/** The write a drop on the column of `value` performs, if that column takes cards. */\nexport const dropWrite = (drop: BoardDrop, value: string | null) => (value !== null && Object.hasOwn(drop, value) ? drop[value] : undefined)\n","import { arrayMove } from '@dnd-kit/sortable'\nimport type { BatchOp, BatchResult } from '@protobase/client'\nimport type { ResourceModel } from '@protobase/schema'\nimport { encodeKey } from '@protobase/schema/internal'\nimport { recordKey } from '../../live/model-helpers'\nimport { anchoredMove } from '../hand-order/anchored-move'\nimport { numberedBefore } from '../hand-order/numbered-before'\nimport type { DragWrite } from '../hand-order/undo-ops'\nimport { columnFilter, type BoardColumn } from './board-columns'\nimport type { ListDisplayRow } from './list-displays'\n\n/** Where a card is dropped: the column, its cards as shown before the drop, whether more follow them, and the place among them. */\nexport type BoardPlace = { column: BoardColumn; rows: ListDisplayRow[]; more: boolean; index: number }\n\n/**\n * The column's cards once `row` is dropped at `index`. In its own column it moves there, as a sortable list moves an\n * item; in another it goes in before the card at `index`, or last.\n */\nexport const placedRows = (rows: ListDisplayRow[], row: ListDisplayRow, index: number) => {\n const from = rows.findIndex((entry) => entry.key === row.key)\n if (from !== -1) return arrayMove(rows, from, index)\n return [...rows.slice(0, index), row, ...rows.slice(index)]\n}\n\n/** The column's cards once `row` is dropped at `index`, with the first and last place that changed. */\nexport const placing = (rows: ListDisplayRow[], row: ListDisplayRow, index: number) => {\n const from = rows.findIndex((entry) => entry.key === row.key)\n return { order: placedRows(rows, row, index), first: from === -1 ? index : Math.min(from, index), last: from === -1 ? index : Math.max(from, index) }\n}\n\n/**\n * The batch that saves a drop on a ranked board: in another column first the update of `by`, then a `move` of the card\n * to its place in `order`, the column's cards once dropped, anchored to the cards around it (see `anchoredMove`) in\n * the column `filter` reads, so it saves whatever else changed meanwhile; with `more` cards after `order`, unloaded. With `bump`, the card, last in the column,\n * first takes that rank in a `reorder` of its own, so it ranks above a record it depends on (see `rankedPlace`), and the\n * `move` then only checks its place. The update and the bump write any version, as the `move` decides the order.\n */\nexport const placeOps = (model: ResourceModel, by: string, rank: string, filter: string, row: ListDisplayRow, column: BoardColumn, order: ListDisplayRow[], more: boolean, bump?: number): BatchOp[] => {\n const key = recordKey(model, row.record)\n const index = order.findIndex((entry) => entry.key === row.key)\n const move = anchoredMove(model, rank, columnFilter(filter, by, column.value), order.map((entry) => entry.record), index, more)\n const bumped: BatchOp[] = bump === undefined ? [] : [{ op: 'reorder', resource: model.name, field: rank, keys: [key], start: bump, etags: { [encodeKey(key)]: '*' } }]\n const moving = (row.record[by] ?? null) !== column.value\n const update: BatchOp[] = moving ? [{ op: 'update', resource: model.name, key, data: { [by]: column.value }, etag: '*' }] : []\n return [...update, ...bumped, move]\n}\n\n/**\n * What the batch of a drop saved: each record it wrote, as it stored it last, with its values in `rows`, the column's\n * cards as listed before the drop, and its `rank` as the server had it before the batch, so the drop can be undone.\n */\nexport const boardWrites = (model: ResourceModel, rank: string, rows: ListDisplayRow[], result: BatchResult): DragWrite[] => {\n const keyOf = (record: Record<string, unknown>) => encodeKey(recordKey(model, record))\n const ranks = numberedBefore(result.results, keyOf)\n const before = new Map(rows.map((row) => {\n const key = keyOf(row.record)\n return [key, ranks.has(key) ? { ...row.record, [rank]: ranks.get(key) } : row.record]\n }))\n const stored = new Map<string, { record: Record<string, unknown>; etag: string }>()\n for (const entry of result.results) {\n const written = entry.op === 'reorder' || entry.op === 'move' ? entry.records : entry.op === 'update' ? [entry] : []\n for (const { record, etag } of written) stored.set(keyOf(record), { record, etag })\n }\n return [...stored].flatMap(([key, written]) => {\n const was = before.get(key)\n return was ? [{ before: was, ...written }] : []\n })\n}\n","import type { ResourceModel } from '@protobase/schema'\nimport { encodeKey } from '@protobase/schema/internal'\nimport { recordKey } from '../../live/model-helpers'\nimport { placing } from '../displays/board-place'\nimport type { ListDisplayRow } from '../displays/list-displays'\nimport { reorderSpan } from '@protobase/schema/internal'\nimport { text } from './messages'\nimport type { RankBound, RankBounds } from './rank-bounds'\n\n/** Where a dropped card lands: its place in the column, and the rank it takes there when that must be above its column's order. */\nexport type RankedPlace = { index: number; bump?: number }\n\ntype Request = { model: ResourceModel; rank: string; rows: ListDisplayRow[]; row: ListDisplayRow; index: number; bounds: RankBounds; title: string }\n\nconst isRank = (value: unknown) => value !== null && value !== undefined && value !== ''\n\n/**\n * Where a card of a ranked board dropped at `index` of a column, its cards `rows`, may land by `bounds`: at the first\n * place from there down where the ranks its `reorder` gives keep it below each record it depends on and above each that\n * depends on it, wherever those are. In the last place it may take a rank just above what it depends on, for a record\n * of another column that ranks above the whole column. With the reason it refused `index`; with no place, none.\n */\nexport const rankedPlace = ({ model, rank, rows, row, index, bounds, title }: Request): { place?: RankedPlace; reason?: string } => {\n const own = rows.some((entry) => entry.key === row.key)\n const end = own ? rows.length - 1 : rows.length\n let reason: string | undefined\n for (let at = index; at <= end; at++) {\n const { order, first, last } = placing(rows, row, at)\n const ranks = order.map((entry) => entry.record[rank])\n const span = reorderSpan(ranks, first, last)\n const ranked = new Map(order.map((entry, i) => [encodeKey(recordKey(model, entry.record)), i >= span.first && i <= span.last ? span.start + i - span.first : ranks[i]]))\n const rankOf = (bound: RankBound) => (ranked.has(bound.key) ? ranked.get(bound.key) : bound.rank)\n const mine = Number(ranked.get(encodeKey(recordKey(model, row.record))))\n const above = bounds.after.filter((bound) => isRank(rankOf(bound)) && Number(rankOf(bound)) >= mine)\n const below = bounds.before.find((bound) => isRank(rankOf(bound)) && Number(rankOf(bound)) <= mine)\n const refusal = below ? text('dependsOn', { record: below.title, other: title }) : above[0] && text('dependsOn', { record: title, other: above[0].title })\n if (!refusal) return { place: { index: at }, ...(reason !== undefined && { reason }) }\n reason ??= refusal\n if (at !== end || below) continue\n // Last in its column, nothing after it there keeps its rank down\n const bump = Math.max(...above.map((bound) => Number(rankOf(bound)))) + 1\n if (bounds.before.every((bound) => !isRank(rankOf(bound)) || Number(rankOf(bound)) > bump)) return { place: { index: at, bump }, reason }\n }\n return { reason: reason! }\n}\n","import { useMutation } from '@tanstack/react-query'\nimport { useRef, useState } from 'react'\nimport type { KeyValue, ResourceModel, ViewModel } from '@protobase/schema'\nimport { useClient } from '../../data/api-provider'\nimport { recordKey } from '../../live/model-helpers'\nimport { useToast } from '../../toasts'\nimport { text as orderText } from '../hand-order/messages'\nimport { moveRefusal } from '../hand-order/move-refusal'\nimport { undoOps, type DragWrite } from '../hand-order/undo-ops'\nimport { useRefreshResource } from '../pages/use-layout-data'\nimport { rankBounds } from '../rank-after/rank-bounds'\nimport { rankedPlace, type RankedPlace } from '../rank-after/ranked-place'\nimport type { BoardColumn } from './board-columns'\nimport { dropWrite, type BoardDrop } from './board-drop'\nimport { boardWrites, placeOps, placing, type BoardPlace } from './board-place'\nimport type { ListDisplayRow } from './list-displays'\nimport { text } from './messages'\n\n/**\n * A card on its way to another column or place: the record as it will be, shown there until the columns have reloaded,\n * and on a ranked board the keys of the column's cards in their new order.\n */\nexport type BoardMove = { row: ListDisplayRow; to: string | null; order?: string[] }\n\ntype Move = { row: ListDisplayRow; to: BoardColumn; place?: Omit<BoardPlace, 'column'> }\n\n// What a move saved: the column its record is in now, and what undoes it, when it can be undone; nothing when it stayed put\ntype Saved = { landed: string | null; undo?: () => Promise<unknown> } | undefined\n\ntype Options = {\n model: ResourceModel\n view: ViewModel | undefined\n by: string\n rank?: string | undefined\n /** The list's filter, its search included, which a column narrows to its records. */\n filter: string\n /** The board's own writes for a card dropped on another column, in place of saving `by`. */\n drop?: BoardDrop | undefined\n /** The heading of the column of a value. */\n labelOf: (value: string | null) => string\n /** The title a card shows. */\n titleOf: (row: ListDisplayRow) => string\n}\n\n/**\n * Moving a board's card to another column: one update of the record with the column's value and the ETag it was listed\n * with, as a named update action sends, so the resource's access rules and `validate` decide. On a ranked board a drop\n * at a place is one batch instead, that update when the column changes and a `move` by `rank` among the column's cards,\n * anchored to the card above where it was dropped (see `placeOps`).\n * With the board's `drop`, a card dropped on another column runs that column's write instead, and then reads the record\n * again to say which column it is in now. The card shows in its new place at once; a saved move says so with **Undo**,\n * which puts back the values it changed or runs the undo the drop's write gave, and a refusal puts it back and says why,\n * or that the board changed where it was dropped.\n * With the position's `after`, a card dropped above a record it depends on lands at the first place below that keeps\n * the order, or stays where it was, with a warning saying why (see `rankedPlace`).\n * Either way every list of the resource reloads, which puts the card where its record now is.\n */\nexport const useBoardMove = ({ model, view, by, rank, filter, drop, labelOf, titleOf }: Options) => {\n const client = useClient()\n const toast = useToast()\n const refresh = useRefreshResource()\n const [moves, setMoves] = useState<BoardMove[]>([])\n // Only the latest move can be undone, so its toast replaces the one before\n const undoToast = useRef<number>(undefined)\n const settle = (key: string) => setMoves((current) => current.filter((move) => move.row.key !== key))\n const fields = rank ? [by, rank] : [by]\n\n const undo = useMutation({\n mutationFn: (undoing: () => Promise<unknown>) => undoing(),\n onError: (error) => toast.show(moveRefusal(error, text('couldNotUndo'), { place: 'board' })),\n onSettled: () => refresh(model.name),\n })\n\n // A drop on a column of the board's `drop`: its write, then the record read again for the column it is in now\n const dropped = async (row: ListDisplayRow, to: BoardColumn): Promise<Saved> => {\n const write = drop && dropWrite(drop, to.value)\n if (!write) throw new Error(`The column ${to.label} takes no cards`)\n const key = recordKey(model, row.record) as KeyValue\n const etag = typeof row.record.etag === 'string' ? row.record.etag : '*'\n const undoing = await write({ resource: model.name, record: row.record, recordKey: key, etag, to: to.value!, client })\n const stored = await client.get(model.name, key)\n return { landed: (stored.record[by] ?? null) as string | null, ...(undoing && { undo: undoing }) }\n }\n\n // The values a move or placing saved, which its undo puts back\n const saved = (writes: DragWrite[], to: BoardColumn): Saved => ({ landed: to.value, undo: () => client.batchWrite(undoOps(model, writes, fields)) })\n\n // The card shown in its column, in `order` when it has a place there\n const show = (row: ListDisplayRow, to: BoardColumn, order?: ListDisplayRow[]) => {\n const moved = { ...row, record: { ...row.record, [by]: to.value } }\n const keys = order?.map((entry) => entry.key)\n setMoves((current) => [...current.filter((move) => move.row.key !== row.key), { row: moved, to: to.value, ...(keys && { order: keys }) }])\n }\n\n // Where the card lands by what its record depends on, saying so when that is not where it was dropped\n const allowed = async (row: ListDisplayRow, to: BoardColumn, place: NonNullable<Move['place']>): Promise<RankedPlace | undefined> => {\n if (!model.position?.after) return { index: place.index }\n const bounds = await rankBounds(client, model, view, row.record)\n const ranked = rankedPlace({ model, rank: rank!, rows: place.rows, row, index: place.index, bounds, title: titleOf(row) })\n // Back in its own place it stays as it was, unwritten\n const stays = !ranked.place || (ranked.place.bump === undefined && ranked.place.index === place.rows.findIndex((entry) => entry.key === row.key))\n if (ranked.reason !== undefined) toast.show({ state: 'warning', title: stays ? orderText('notMoved') : orderText('movedToPlace', { place: ranked.place!.index + 1 }), description: ranked.reason })\n if (stays) return undefined\n if (ranked.place!.index !== place.index) show(row, to, placing(place.rows, row, ranked.place!.index).order)\n return ranked.place\n }\n\n // A drop at a place: the card's move among the column's cards, with its update first when it changes column\n const placed = async (row: ListDisplayRow, to: BoardColumn, place: NonNullable<Move['place']>): Promise<Saved> => {\n const landing = await allowed(row, to, place)\n if (!landing) return undefined\n const { order } = placing(place.rows, row, landing.index)\n return saved(boardWrites(model, rank!, order, await client.batchWrite(placeOps(model, by, rank!, filter, row, to, order, place.more, landing.bump))), to)\n }\n\n const mutation = useMutation({\n mutationFn: async ({ row, to, place }: Move): Promise<Saved> => {\n if (place && !rank) throw new Error('A board places a card only by its rank')\n const from = (row.record[by] ?? null) as string | null\n if (drop && to.value !== from) return dropped(row, to)\n if (place) return placed(row, to, place)\n const etag = typeof row.record.etag === 'string' ? row.record.etag : '*'\n const stored = await client.update(model.name, recordKey(model, row.record) as KeyValue, { [by]: to.value }, etag)\n return saved([{ before: row.record, record: stored.record, etag: stored.etag }], to)\n },\n onMutate: ({ row, to, place }) => show(row, to, place && placing(place.rows, row, place.index).order),\n onSuccess: (result, { row, to }) => {\n if (!result) return\n const { landed, undo: undoing } = result\n if (undoToast.current !== undefined) toast.dismiss(undoToast.current)\n undoToast.current = undefined\n const from = row.record[by] ?? null\n const title = landed !== from ? text('movedTo', { column: labelOf(landed) }) : from === to.value ? text('orderChanged') : text('stayedIn', { column: labelOf(landed) })\n if (!undoing) {\n toast.show({ state: 'success', title })\n return\n }\n const id = toast.show({\n state: 'success',\n title,\n action: {\n label: text('undo'),\n onClick: () => {\n toast.dismiss(id)\n undoToast.current = undefined\n undo.mutate(undoing)\n },\n },\n })\n undoToast.current = id\n },\n onError: (error, { row, to }) => {\n settle(row.key)\n const title = (row.record[by] ?? null) === to.value ? text('couldNotReorder') : text('couldNotMoveTo', { to: to.label })\n toast.show(moveRefusal(error, title, { place: 'board', title: titleOf(row) }))\n },\n onSettled: async (_result, _error, { row }) => {\n await refresh(model.name)\n settle(row.key)\n },\n })\n\n return { moves, move: (row: ListDisplayRow, to: BoardColumn, place?: NonNullable<Move['place']>) => mutation.mutate({ row, to, ...(place && { place }) }) }\n}\n","import { DndContext, DragOverlay, KeyboardSensor, MouseSensor, TouchSensor, useSensor, useSensors, type Announcements, type DragEndEvent, type DragStartEvent, type Over } from '@dnd-kit/core'\nimport { useRef, useState } from 'react'\nimport type { ResourceModel, ViewModel } from '@protobase/schema'\nimport { listHandOrder } from '../hand-order/hand-order'\nimport { usePermissions } from '../meta-gate'\nimport { can } from '../permissions'\nimport { BoardColumnView } from './board-column'\nimport { columnsAllowed } from './board-allowed'\nimport { Problem } from '../pages/problem'\nimport { useProjectUi } from '../pages/project-ui'\nimport { boardCard, boardColumns, boardRank, type BoardColumn, type BoardDisplayModel } from './board-columns'\nimport { cardCoordinates, collision, columnId } from './board-dnd'\nimport { dropWrite } from './board-drop'\nimport type { BoardPlace } from './board-place'\nimport type { ListDisplayRow } from './list-displays'\nimport { RecordCard } from './record-card'\nimport { useBoardMove } from './use-board-move'\nimport { text } from './messages'\n\ntype BoardProps = {\n model: ResourceModel\n view: ViewModel | undefined\n display: BoardDisplayModel\n /** The fields the cards show, which the records' relations are labelled for. */\n fields: string[]\n /** The list's filter, its search included, and its order, as the list API takes them. */\n filter: string\n orderBy: string\n /** The most cards a column shows, without a button for more, as an embedded list shows them. */\n limit?: number\n}\n\n// Where a card over `over` would be dropped: before the card it is over, or after the last card of the column\nconst placeOver = (over: Over, row: ListDisplayRow): BoardPlace | undefined => {\n const data = over.data.current as { column?: BoardPlace['column']; rows?: ListDisplayRow[]; more?: boolean; sortable?: { index: number } } | undefined\n if (!data?.column || !data.rows) return undefined\n const more = data.more === true\n if (data.sortable) return { column: data.column, rows: data.rows, more, index: data.sortable.index }\n const own = data.rows.some((entry) => entry.key === row.key)\n return { column: data.column, rows: data.rows, more, index: own ? data.rows.length - 1 : data.rows.length }\n}\n\n/**\n * A column per value of the board's enum field, each loading its own records through the list API, with their count.\n * When the list's `drag.board` is on, a card dragged, or moved with the keyboard, to another column saves the record\n * with that column's value; when it names a board drop of the UI config, only between the columns it names, each\n * running its own write. When the resource has a position, its records ordered as one, the columns are in its order,\n * and when `drag.rank` is on a card is dropped at a place: the up and down arrow keys move it within its column, and\n * the drop renumbers the cards before it. Each change says so with **Undo**.\n */\nexport const BoardDisplay = ({ model, view, display, fields, filter, orderBy, limit }: BoardProps) => {\n const every = boardColumns(model, view, display)\n const columns = columnsAllowed(filter, display.by, every)\n const card = boardCard(model, view, display)\n const permissions = usePermissions(model.name)\n const { boardDrops } = useProjectUi()\n const drag = view?.list?.drag\n const dropName = typeof drag?.board === 'string' ? drag.board : undefined\n const drop = dropName === undefined ? undefined : boardDrops?.[dropName]\n // Whether a card moves in or out of a column: any with `board: true`, else those the named board drop lists\n const takes = (value: string | null) =>\n can(permissions, 'update') && (drag?.board === true ? !model.fields[display.by]?.readOnly : drop !== undefined && dropWrite(drop, value) !== undefined)\n const movable = columns.some((column) => takes(column.value))\n const rank = boardRank(model)\n // Changing the order takes the same right as sorting the list by hand\n const placeable = drag?.rank === true && rank !== undefined && listHandOrder(model, permissions) !== undefined\n const columnOrder = rank ? `${rank} asc` : orderBy\n const labelOf = (value: string | null) => every.find((column) => column.value === value)?.label ?? String(value)\n const title = (row: ListDisplayRow) => String(row.labels[card.title!] ?? row.record[card.title!] ?? row.key)\n const { moves, move } = useBoardMove({ model, view, by: display.by, rank, filter, drop, labelOf, titleOf: title })\n const [active, setActive] = useState<ListDisplayRow | undefined>()\n // The click that ends a drag with a mouse lands on the card's link, which must not open the record\n const dragged = useRef(false)\n const sensors = useSensors(\n useSensor(MouseSensor, { activationConstraint: { distance: 4 } }),\n useSensor(TouchSensor, { activationConstraint: { delay: 250, tolerance: 5 } }),\n // Enter opens the card's record, so only Space picks a card up\n useSensor(KeyboardSensor, { keyboardCodes: { start: ['Space'], cancel: ['Escape'], end: ['Space', 'Enter'] }, coordinateGetter: cardCoordinates }),\n )\n if (dropName !== undefined && !drop) return <Problem>{text.rich('noDrop', { drop: dropName })}</Problem>\n\n const columnOf = (id: unknown) => columns.find((column) => columnId(column.value) === id)\n const valueOf = (row: ListDisplayRow) => (row.record[display.by] ?? null) as string | null\n const crosses = (row: ListDisplayRow, to: BoardColumn) => takes(valueOf(row)) && takes(to.value)\n const announced = (row: ListDisplayRow, over: Over | null) => {\n if (!over) return { over: text('noColumn') }\n const place = placeable ? placeOver(over, row) : undefined\n if (!place) return { over: columnOf(over.id)?.label ?? text('noColumn') }\n const count = place.rows.some((entry) => entry.key === row.key) ? place.rows.length : place.rows.length + 1\n return { over: text('placeOf', { column: place.column.label, place: place.index + 1, count }), place: text('place', { column: place.column.label, place: place.index + 1 }) }\n }\n // Whether a drop on `over` takes the card to a column it may not move to\n const refused = (row: ListDisplayRow, over: Over) => {\n const target = (placeable ? placeOver(over, row)?.column : undefined) ?? columnOf(over.id)\n return target !== undefined && target.value !== valueOf(row) && !crosses(row, target)\n }\n const announcements: Announcements = {\n onDragStart: ({ active: picked }) => text('pickedUp', { title: title(picked.data.current!.row) }),\n onDragOver: ({ active: picked, over }) => text('isOver', { title: title(picked.data.current!.row), over: announced(picked.data.current!.row, over).over }),\n onDragEnd: ({ active: picked, over }) => {\n const row = picked.data.current!.row as ListDisplayRow\n if (!over || refused(row, over)) return text('putBack', { title: title(row) })\n const said = announced(row, over)\n return text('wasMovedTo', { title: title(row), to: said.place ?? said.over })\n },\n onDragCancel: ({ active: picked }) => text('cancelled', { title: title(picked.data.current!.row) }),\n }\n\n const start = ({ active: picked }: DragStartEvent) => {\n dragged.current = true\n setActive(picked.data.current!.row as ListDisplayRow)\n }\n const end = ({ active: picked, over }: DragEndEvent) => {\n setActive(undefined)\n setTimeout(() => (dragged.current = false))\n const row = picked.data.current!.row as ListDisplayRow\n if (!over) return\n const place = placeable ? placeOver(over, row) : undefined\n if (!place) {\n const target = columnOf(over.id)\n if (target && target.value !== valueOf(row) && crosses(row, target)) move(row, target)\n return\n }\n const from = place.rows.findIndex((entry) => entry.key === row.key)\n // A card the user may not move to another column goes back\n if (from === -1 && !crosses(row, place.column)) return\n // A board drop's write decides where the card lands in another column, so it has no place there\n if (from === -1 && drop) return move(row, place.column)\n if (from === place.index) return\n move(row, place.column, { rows: place.rows, more: place.more, index: place.index })\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={collision}\n onDragStart={start}\n onDragEnd={end}\n onDragCancel={() => {\n setActive(undefined)\n setTimeout(() => (dragged.current = false))\n }}\n accessibility={{\n announcements,\n screenReaderInstructions: {\n draggable: !placeable\n ? text('boardAcross')\n : movable\n ? text('boardAnywhere')\n : text('boardWithin'),\n },\n }}\n >\n {/* As tall as its longest column, scrolling with the page, and sideways when its columns are wider than the page; positioned, so what its cards place absolutely, such as their screen-reader labels, scrolls inside it instead of widening the page */}\n <div className=\"relative min-w-0 flex-1 overflow-x-auto\">\n <div className=\"flex snap-x items-start gap-3 pb-2\">\n {columns.map((column) => (\n <BoardColumnView\n key={columnId(column.value)}\n model={model}\n view={view}\n display={display}\n column={column}\n fields={fields}\n filter={filter}\n orderBy={columnOrder}\n limit={limit}\n moves={moves}\n movable={takes(column.value)}\n placeable={placeable}\n dragged={() => dragged.current}\n />\n ))}\n </div>\n </div>\n <DragOverlay>{active && <RecordCard model={model} view={view} display={card} row={active} swipe={false} />}</DragOverlay>\n </DndContext>\n )\n}\n"],"mappings":"gyCAGA,IAAMA,GAAU,GAAoC,OAAOoE,GAAU,UAAY,OAAO,UAAUA,CAAK,EAQ1FC,IAAe,EAA2B,EAAe,IAA8B,CAElG,IAAIC,EAAS,EACb,KAAOA,EAASC,GAASvE,GAAOwE,EAAMF,EAAO,IAAMA,IAAW,GAAME,EAAMF,GAAsBE,EAAMF,EAAS,KAAgB,GAAU,EACzI,IAAIG,EAAOD,EAAM,OACjB,KAAOC,EAAO,EAAIC,GAAQ1E,GAAOwE,EAAMC,EAAO,EAAE,IAAMA,IAASD,EAAM,QAAWA,EAAMC,EAAO,GAAiBD,EAAMC,KAAmB,IAEvI,IAAME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