@protobase/ui 0.121.1 → 0.121.2

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 (212) hide show
  1. package/dist/account/messages.d.ts +2 -2
  2. package/dist/app/change-confirm/messages.d.ts +2 -2
  3. package/dist/app/charts/messages.d.ts +2 -2
  4. package/dist/app/comments/messages.d.ts +2 -2
  5. package/dist/app/confirm-sign-in-messages.d.ts +2 -2
  6. package/dist/app/conversation/messages.d.ts +2 -2
  7. package/dist/app/conversation-page/messages.d.ts +2 -2
  8. package/dist/app/create/messages.d.ts +2 -2
  9. package/dist/app/custom-section.d.ts +1 -1
  10. package/dist/app/delete/messages.d.ts +2 -2
  11. package/dist/app/displays/list-cards.d.ts +1 -1
  12. package/dist/app/displays/messages.d.ts +2 -2
  13. package/dist/app/embedded-list/messages.d.ts +2 -2
  14. package/dist/app/export/messages.d.ts +2 -2
  15. package/dist/app/field-messages.d.ts +2 -2
  16. package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
  17. package/dist/app/field-types/runner-install/messages.d.ts +2 -2
  18. package/dist/app/field-types/widget-part.d.ts +1 -1
  19. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  20. package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
  21. package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
  22. package/dist/app/file-viewers/messages.d.ts +2 -2
  23. package/dist/app/focus/messages.d.ts +2 -2
  24. package/dist/app/gallery/messages.d.ts +2 -2
  25. package/dist/app/hand-order/messages.d.ts +2 -2
  26. package/dist/app/history/messages.d.ts +2 -2
  27. package/dist/app/import/messages.d.ts +2 -2
  28. package/dist/app/list-edit/messages.d.ts +2 -2
  29. package/dist/app/list-messages.d.ts +2 -2
  30. package/dist/app/messages.d.ts +2 -2
  31. package/dist/app/meta-gate-messages.d.ts +2 -2
  32. package/dist/app/new-version/messages.d.ts +2 -2
  33. package/dist/app/pages/custom-boundary.d.ts +1 -1
  34. package/dist/app/pages/custom-chosen.d.ts +1 -1
  35. package/dist/app/pages/messages.d.ts +2 -2
  36. package/dist/app/record-chart/messages.d.ts +2 -2
  37. package/dist/app/record-messages.d.ts +2 -2
  38. package/dist/app/record-row/messages.d.ts +2 -2
  39. package/dist/app/related-cards/messages.d.ts +2 -2
  40. package/dist/app/saved/messages.d.ts +2 -2
  41. package/dist/app/saved/saved-list.d.ts +1 -1
  42. package/dist/app/search/messages.d.ts +2 -2
  43. package/dist/app/searches/messages.d.ts +2 -2
  44. package/dist/app-shell/messages.d.ts +2 -2
  45. package/dist/assistant-dock/messages.d.ts +2 -2
  46. package/dist/auth/messages.d.ts +2 -2
  47. package/dist/chat/messages.d.ts +2 -2
  48. package/dist/data-grid/column-spec.d.ts +1 -1
  49. package/dist/data-grid/messages.d.ts +2 -2
  50. package/dist/filter-panel/messages.d.ts +2 -2
  51. package/dist/format/messages.d.ts +2 -2
  52. package/dist/forms/messages.d.ts +2 -2
  53. package/dist/inline-child-table/messages.d.ts +2 -2
  54. package/dist/invitations/messages.d.ts +2 -2
  55. package/dist/live/messages.d.ts +2 -2
  56. package/dist/locale/texts-gate.d.ts +1 -1
  57. package/dist/mailbox/messages.d.ts +2 -2
  58. package/dist/mentions/messages.d.ts +2 -2
  59. package/dist/mocks/orders.d.ts +1 -1
  60. package/dist/notifications/bell/messages.d.ts +2 -2
  61. package/dist/organizations/messages.d.ts +2 -2
  62. package/dist/package.js +1 -1
  63. package/dist/plugins/before-sign-in.d.ts +1 -1
  64. package/dist/primitives/messages.d.ts +2 -2
  65. package/dist/shell/assets/{account-page-BejiSHKM.js → account-page-BEMlob92.js} +2 -2
  66. package/dist/shell/assets/{app-BXbP4Ty1.js → app-CwxoFZn2.js} +5 -5
  67. package/dist/shell/assets/{assistant-shell-BWbl-WEv.js → assistant-shell-D1PLZHeQ.js} +2 -2
  68. package/dist/shell/assets/{board-display-CoJK20M9.js → board-display-BZb6Av24.js} +2 -2
  69. package/dist/shell/assets/{calendar-display-iYqswJgc.js → calendar-display-CNFg47Me.js} +2 -2
  70. package/dist/shell/assets/{call-rings-Cwk4WNlZ.js → call-rings-B0cAdcLq.js} +2 -2
  71. package/dist/shell/assets/{calls-DxBhpisW.js → calls-CJX48uHr.js} +2 -2
  72. package/dist/shell/assets/{circle-alert-C9H3FqM7.js → circle-alert-B-bmotNV.js} +2 -2
  73. package/dist/shell/assets/{composed-page-1q5wrcUN.js → composed-page-itsBuYQN.js} +2 -2
  74. package/dist/shell/assets/{composer-section-CsrTm8Ss.js → composer-section-CcOJo5ti.js} +2 -2
  75. package/dist/shell/assets/{connect-route-BY5fhvuR.js → connect-route-CFKOOd6G.js} +2 -2
  76. package/dist/shell/assets/{copy-field-CN_wHY_K.js → copy-field-DOFRIY_Q.js} +2 -2
  77. package/dist/shell/assets/{create-route-CkONKdX6.js → create-route-Dv-SPGqY.js} +2 -2
  78. package/dist/shell/assets/{custom-step-container-field-B0adLm01.js → custom-step-container-field-Cpk6ImRJ.js} +2 -2
  79. package/dist/shell/assets/{embedded-list-Nomt6OUK.js → embedded-list-DoHDT3Av.js} +3 -3
  80. package/dist/shell/assets/{export-dialog-C7Gpq0EK.js → export-dialog-Ivzdiuhz.js} +2 -2
  81. package/dist/shell/assets/{first-organization-page-B9Qj8EgA.js → first-organization-page-in6WzIgy.js} +2 -2
  82. package/dist/shell/assets/{graph-view-BU3sYZDD.js → graph-view-BRuO-SOE.js} +2 -2
  83. package/dist/shell/assets/{group-donut-MrMdALOR.js → group-donut-3NIqjraT.js} +2 -2
  84. package/dist/shell/assets/{guest-call-page-Cf-QdD6u.js → guest-call-page-NZyVZiKI.js} +3 -3
  85. package/dist/shell/assets/{html-viewer-4q3cR5U2.js → html-viewer-C1KycBYl.js} +2 -2
  86. package/dist/shell/assets/{import-dialog-CBT7GHQ6.js → import-dialog-CyB3vJn7.js} +2 -2
  87. package/dist/shell/assets/{import-table-dialog-DNPoaf3W.js → import-table-dialog-D8yGy95h.js} +2 -2
  88. package/dist/shell/assets/{index-CrsKmqF6.js → index-CkkBg7C6.js} +1 -1
  89. package/dist/shell/assets/{invitations-page-T5Zl42lB.js → invitations-page-BjEW7hIz.js} +2 -2
  90. package/dist/shell/assets/{layout-grid-C0JKQ-Vr.js → layout-grid-OO8eIGYq.js} +2 -2
  91. package/dist/shell/assets/{legend-item-BC8NMrG0.js → legend-item-eNQOaTxV.js} +2 -2
  92. package/dist/shell/assets/{list-page-Dt2tN3Li.js → list-page-bIQkpGOc.js} +4 -4
  93. package/dist/shell/assets/{maplibre-CBGBPT2u.js → maplibre-DV3j-5Y6.js} +2 -2
  94. package/dist/shell/assets/{markdown-content-CE3gKAHx.js → markdown-content-C08v-1FZ.js} +2 -2
  95. package/dist/shell/assets/{members-page-RClHb_e8.js → members-page-B9hyyuVp.js} +2 -2
  96. package/dist/shell/assets/{message-content-OCOwOHzz.js → message-content-DLKHIzRa.js} +2 -2
  97. package/dist/shell/assets/{messages-9TFLyKlr.js → messages-NBuAsjFr.js} +2 -2
  98. package/dist/shell/assets/{organization-page-BVWyQvBY.js → organization-page-DeTS9uAn.js} +2 -2
  99. package/dist/shell/assets/{organizations-page-Bn3IY_Zs.js → organizations-page-qM5TQfyb.js} +2 -2
  100. package/dist/shell/assets/{pending-invitation-row-D58juRaB.js → pending-invitation-row-9-2Fmy3F.js} +2 -2
  101. package/dist/shell/assets/{period-chart-DSnwMzgV.js → period-chart-UOm7kPWB.js} +2 -2
  102. package/dist/shell/assets/{person-row-shwrR0nf.js → person-row-DOXM02rY.js} +2 -2
  103. package/dist/shell/assets/{public-form-page-o8AZ5FHd.js → public-form-page-Bj9YxgGp.js} +2 -2
  104. package/dist/shell/assets/{record-lines-fwUdQsF7.js → record-lines-PZ4g8sb5.js} +2 -2
  105. package/dist/shell/assets/{record-map-3vSnFihG.js → record-map-CkWjStZn.js} +2 -2
  106. package/dist/shell/assets/{record-opens-BjvGP76q.js → record-opens-6vtBiJ2O.js} +2 -2
  107. package/dist/shell/assets/{record-page-oAgFQCZx.js → record-page-DrQL98n9.js} +3 -3
  108. package/dist/shell/assets/{record-preview-bznf4p6C.js → record-preview-BSqik7HQ.js} +2 -2
  109. package/dist/shell/assets/{records-map-BZ9IztOw.js → records-map-CXBbBlYG.js} +2 -2
  110. package/dist/shell/assets/{render-node-D-4-E94O.js → render-node-DEyR63E8.js} +3 -3
  111. package/dist/shell/assets/{reorder-button-B6J3Gmzg.js → reorder-button-CdgrzXlf.js} +2 -2
  112. package/dist/shell/assets/{run-trace-view-B_bJcy_e.js → run-trace-view-CqcgX5lE.js} +2 -2
  113. package/dist/shell/assets/{runner-install-field-Dg5VV1Bz.js → runner-install-field-Dm7GhYaF.js} +2 -2
  114. package/dist/shell/assets/{runtime-update-CkX7qK0y.js → runtime-update-BdhyiFl9.js} +2 -2
  115. package/dist/shell/assets/{shared-protobase-ui-Bmj9LnMR.js → shared-protobase-ui-CDtJQrEp.js} +1 -1
  116. package/dist/shell/assets/{sheet-source-De92TWm8.js → sheet-source-NKu1Enl2.js} +2 -2
  117. package/dist/shell/assets/{sign-in-policy-page-P6Z6NlWj.js → sign-in-policy-page-DINzAtyt.js} +2 -2
  118. package/dist/shell/assets/{start-block-queries-sM50NWuR.js → start-block-queries-Bc743CdL.js} +2 -2
  119. package/dist/shell/assets/{step-catalog-C6uiLqhG.js → step-catalog-B9QbvZP_.js} +2 -2
  120. package/dist/shell/assets/{step-panel-BtgXKvBb.js → step-panel-C5Pnb-Vb.js} +2 -2
  121. package/dist/shell/assets/{timeline-display-CFYOr7ER.js → timeline-display-hbo62z0J.js} +2 -2
  122. package/dist/shell/assets/{trash-hWgXyHxA.js → trash-YqRXn8JG.js} +2 -2
  123. package/dist/shell/assets/{update-set-jWhZWR7M.js → update-set-DFWECx_E.js} +2 -2
  124. package/dist/shell/assets/{use-calendar-move-B902R-oH.js → use-calendar-move-D_6TlMr4.js} +2 -2
  125. package/dist/shell/assets/{use-display-rows-DRKftIme.js → use-display-rows-1Xjy5pR2.js} +2 -2
  126. package/dist/shell/assets/{use-my-invitations-BmYWQO42.js → use-my-invitations-CrSF37dB.js} +2 -2
  127. package/dist/shell/assets/{use-paged-search-CQZq-5QD.js → use-paged-search-CtD7Lf-E.js} +2 -2
  128. package/dist/shell/assets/{use-run-trace-CP67JSwu.js → use-run-trace-5H4UJvB-.js} +2 -2
  129. package/dist/shell/assets/{use-workflow-page-DyT1T2px.js → use-workflow-page-dAWuZvWk.js} +2 -2
  130. package/dist/shell/assets/{use-workflow-types-DPCbdYrq.js → use-workflow-types-Cjkw47Mf.js} +2 -2
  131. package/dist/shell/assets/{workflow-canvas-DmxNQs0O.js → workflow-canvas-BkFimRd2.js} +2 -2
  132. package/dist/shell/assets/{workflow-field-DbMcq81f.js → workflow-field-BQImywHx.js} +3 -3
  133. package/dist/shell/assets/{workflow-graph-editor-C9BYEvXl.js → workflow-graph-editor-DYBqdH_O.js} +2 -2
  134. package/dist/shell/assets/{workflow-run-field-jJu07psu.js → workflow-run-field-CyxK0W7w.js} +3 -3
  135. package/dist/shell/assets/{workflow-status-field-Dr5AeWYR.js → workflow-status-field-Bzri4NHN.js} +2 -2
  136. package/dist/shell/assets/{workflow-workbench-DDVq899p.js → workflow-workbench-DC2gtXz1.js} +2 -2
  137. package/dist/shell/index.html +3 -3
  138. package/dist/shell/protobase.shell.json +2 -2
  139. package/dist/shell/protobase.sw.js +2 -2
  140. package/dist/shell-source-maps/assets/{account-page-BejiSHKM.js.map → account-page-BEMlob92.js.map} +1 -1
  141. package/dist/shell-source-maps/assets/{app-BXbP4Ty1.js.map → app-CwxoFZn2.js.map} +1 -1
  142. package/dist/shell-source-maps/assets/{assistant-shell-BWbl-WEv.js.map → assistant-shell-D1PLZHeQ.js.map} +1 -1
  143. package/dist/shell-source-maps/assets/{board-display-CoJK20M9.js.map → board-display-BZb6Av24.js.map} +1 -1
  144. package/dist/shell-source-maps/assets/{calendar-display-iYqswJgc.js.map → calendar-display-CNFg47Me.js.map} +1 -1
  145. package/dist/shell-source-maps/assets/{call-rings-Cwk4WNlZ.js.map → call-rings-B0cAdcLq.js.map} +1 -1
  146. package/dist/shell-source-maps/assets/{calls-DxBhpisW.js.map → calls-CJX48uHr.js.map} +1 -1
  147. package/dist/shell-source-maps/assets/{circle-alert-C9H3FqM7.js.map → circle-alert-B-bmotNV.js.map} +1 -1
  148. package/dist/shell-source-maps/assets/{composed-page-1q5wrcUN.js.map → composed-page-itsBuYQN.js.map} +1 -1
  149. package/dist/shell-source-maps/assets/{composer-section-CsrTm8Ss.js.map → composer-section-CcOJo5ti.js.map} +1 -1
  150. package/dist/shell-source-maps/assets/{connect-route-BY5fhvuR.js.map → connect-route-CFKOOd6G.js.map} +1 -1
  151. package/dist/shell-source-maps/assets/{copy-field-CN_wHY_K.js.map → copy-field-DOFRIY_Q.js.map} +1 -1
  152. package/dist/shell-source-maps/assets/{create-route-CkONKdX6.js.map → create-route-Dv-SPGqY.js.map} +1 -1
  153. package/dist/shell-source-maps/assets/{custom-step-container-field-B0adLm01.js.map → custom-step-container-field-Cpk6ImRJ.js.map} +1 -1
  154. package/dist/shell-source-maps/assets/{embedded-list-Nomt6OUK.js.map → embedded-list-DoHDT3Av.js.map} +1 -1
  155. package/dist/shell-source-maps/assets/{export-dialog-C7Gpq0EK.js.map → export-dialog-Ivzdiuhz.js.map} +1 -1
  156. package/dist/shell-source-maps/assets/{first-organization-page-B9Qj8EgA.js.map → first-organization-page-in6WzIgy.js.map} +1 -1
  157. package/dist/shell-source-maps/assets/{graph-view-BU3sYZDD.js.map → graph-view-BRuO-SOE.js.map} +1 -1
  158. package/dist/shell-source-maps/assets/{group-donut-MrMdALOR.js.map → group-donut-3NIqjraT.js.map} +1 -1
  159. package/dist/shell-source-maps/assets/{guest-call-page-Cf-QdD6u.js.map → guest-call-page-NZyVZiKI.js.map} +1 -1
  160. package/dist/shell-source-maps/assets/{html-viewer-4q3cR5U2.js.map → html-viewer-C1KycBYl.js.map} +1 -1
  161. package/dist/shell-source-maps/assets/{import-dialog-CBT7GHQ6.js.map → import-dialog-CyB3vJn7.js.map} +1 -1
  162. package/dist/shell-source-maps/assets/{import-table-dialog-DNPoaf3W.js.map → import-table-dialog-D8yGy95h.js.map} +1 -1
  163. package/dist/shell-source-maps/assets/{invitations-page-T5Zl42lB.js.map → invitations-page-BjEW7hIz.js.map} +1 -1
  164. package/dist/shell-source-maps/assets/{layout-grid-C0JKQ-Vr.js.map → layout-grid-OO8eIGYq.js.map} +1 -1
  165. package/dist/shell-source-maps/assets/{legend-item-BC8NMrG0.js.map → legend-item-eNQOaTxV.js.map} +1 -1
  166. package/dist/shell-source-maps/assets/{list-page-Dt2tN3Li.js.map → list-page-bIQkpGOc.js.map} +1 -1
  167. package/dist/shell-source-maps/assets/{maplibre-CBGBPT2u.js.map → maplibre-DV3j-5Y6.js.map} +1 -1
  168. package/dist/shell-source-maps/assets/{markdown-content-CE3gKAHx.js.map → markdown-content-C08v-1FZ.js.map} +1 -1
  169. package/dist/shell-source-maps/assets/{members-page-RClHb_e8.js.map → members-page-B9hyyuVp.js.map} +1 -1
  170. package/dist/shell-source-maps/assets/{message-content-OCOwOHzz.js.map → message-content-DLKHIzRa.js.map} +1 -1
  171. package/dist/shell-source-maps/assets/{messages-9TFLyKlr.js.map → messages-NBuAsjFr.js.map} +1 -1
  172. package/dist/shell-source-maps/assets/{organization-page-BVWyQvBY.js.map → organization-page-DeTS9uAn.js.map} +1 -1
  173. package/dist/shell-source-maps/assets/{organizations-page-Bn3IY_Zs.js.map → organizations-page-qM5TQfyb.js.map} +1 -1
  174. package/dist/shell-source-maps/assets/{pending-invitation-row-D58juRaB.js.map → pending-invitation-row-9-2Fmy3F.js.map} +1 -1
  175. package/dist/shell-source-maps/assets/{period-chart-DSnwMzgV.js.map → period-chart-UOm7kPWB.js.map} +1 -1
  176. package/dist/shell-source-maps/assets/{person-row-shwrR0nf.js.map → person-row-DOXM02rY.js.map} +1 -1
  177. package/dist/shell-source-maps/assets/{public-form-page-o8AZ5FHd.js.map → public-form-page-Bj9YxgGp.js.map} +1 -1
  178. package/dist/shell-source-maps/assets/{record-lines-fwUdQsF7.js.map → record-lines-PZ4g8sb5.js.map} +1 -1
  179. package/dist/shell-source-maps/assets/{record-map-3vSnFihG.js.map → record-map-CkWjStZn.js.map} +1 -1
  180. package/dist/shell-source-maps/assets/{record-opens-BjvGP76q.js.map → record-opens-6vtBiJ2O.js.map} +1 -1
  181. package/dist/shell-source-maps/assets/{record-page-oAgFQCZx.js.map → record-page-DrQL98n9.js.map} +1 -1
  182. package/dist/shell-source-maps/assets/{record-preview-bznf4p6C.js.map → record-preview-BSqik7HQ.js.map} +1 -1
  183. package/dist/shell-source-maps/assets/{records-map-BZ9IztOw.js.map → records-map-CXBbBlYG.js.map} +1 -1
  184. package/dist/shell-source-maps/assets/{render-node-D-4-E94O.js.map → render-node-DEyR63E8.js.map} +1 -1
  185. package/dist/shell-source-maps/assets/{reorder-button-B6J3Gmzg.js.map → reorder-button-CdgrzXlf.js.map} +1 -1
  186. package/dist/shell-source-maps/assets/{run-trace-view-B_bJcy_e.js.map → run-trace-view-CqcgX5lE.js.map} +1 -1
  187. package/dist/shell-source-maps/assets/{runner-install-field-Dg5VV1Bz.js.map → runner-install-field-Dm7GhYaF.js.map} +1 -1
  188. package/dist/shell-source-maps/assets/{runtime-update-CkX7qK0y.js.map → runtime-update-BdhyiFl9.js.map} +1 -1
  189. package/dist/shell-source-maps/assets/{sheet-source-De92TWm8.js.map → sheet-source-NKu1Enl2.js.map} +1 -1
  190. package/dist/shell-source-maps/assets/{sign-in-policy-page-P6Z6NlWj.js.map → sign-in-policy-page-DINzAtyt.js.map} +1 -1
  191. package/dist/shell-source-maps/assets/{start-block-queries-sM50NWuR.js.map → start-block-queries-Bc743CdL.js.map} +1 -1
  192. package/dist/shell-source-maps/assets/{step-catalog-C6uiLqhG.js.map → step-catalog-B9QbvZP_.js.map} +1 -1
  193. package/dist/shell-source-maps/assets/{step-panel-BtgXKvBb.js.map → step-panel-C5Pnb-Vb.js.map} +1 -1
  194. package/dist/shell-source-maps/assets/{timeline-display-CFYOr7ER.js.map → timeline-display-hbo62z0J.js.map} +1 -1
  195. package/dist/shell-source-maps/assets/{trash-hWgXyHxA.js.map → trash-YqRXn8JG.js.map} +1 -1
  196. package/dist/shell-source-maps/assets/{update-set-jWhZWR7M.js.map → update-set-DFWECx_E.js.map} +1 -1
  197. package/dist/shell-source-maps/assets/{use-calendar-move-B902R-oH.js.map → use-calendar-move-D_6TlMr4.js.map} +1 -1
  198. package/dist/shell-source-maps/assets/{use-display-rows-DRKftIme.js.map → use-display-rows-1Xjy5pR2.js.map} +1 -1
  199. package/dist/shell-source-maps/assets/{use-my-invitations-BmYWQO42.js.map → use-my-invitations-CrSF37dB.js.map} +1 -1
  200. package/dist/shell-source-maps/assets/{use-paged-search-CQZq-5QD.js.map → use-paged-search-CtD7Lf-E.js.map} +1 -1
  201. package/dist/shell-source-maps/assets/{use-run-trace-CP67JSwu.js.map → use-run-trace-5H4UJvB-.js.map} +1 -1
  202. package/dist/shell-source-maps/assets/{use-workflow-page-DyT1T2px.js.map → use-workflow-page-dAWuZvWk.js.map} +1 -1
  203. package/dist/shell-source-maps/assets/{use-workflow-types-DPCbdYrq.js.map → use-workflow-types-Cjkw47Mf.js.map} +1 -1
  204. package/dist/shell-source-maps/assets/{workflow-canvas-DmxNQs0O.js.map → workflow-canvas-BkFimRd2.js.map} +1 -1
  205. package/dist/shell-source-maps/assets/{workflow-field-DbMcq81f.js.map → workflow-field-BQImywHx.js.map} +1 -1
  206. package/dist/shell-source-maps/assets/{workflow-graph-editor-C9BYEvXl.js.map → workflow-graph-editor-DYBqdH_O.js.map} +1 -1
  207. package/dist/shell-source-maps/assets/{workflow-run-field-jJu07psu.js.map → workflow-run-field-CyxK0W7w.js.map} +1 -1
  208. package/dist/shell-source-maps/assets/{workflow-status-field-Dr5AeWYR.js.map → workflow-status-field-Bzri4NHN.js.map} +1 -1
  209. package/dist/shell-source-maps/assets/{workflow-workbench-DDVq899p.js.map → workflow-workbench-DC2gtXz1.js.map} +1 -1
  210. package/dist/status/messages.d.ts +2 -2
  211. package/dist/users/messages.d.ts +2 -2
  212. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"use-display-rows-DRKftIme.js","names":["n","a","t","displayRow","useInfiniteQuery","useDisplayRows","query","key","page","pageParam","last","pages","model","loaded","row"],"sources":["../../../src/app/displays/use-display-rows.ts"],"sourcesContent":["import { useInfiniteQuery } from '@tanstack/react-query'\nimport type { ResourceModel } from '@protobase/schema'\nimport { gridPageSize } from '../../data-grid'\nimport type { LoadedPage } from '../../live/grid-loader'\nimport type { ListDisplay } from './display-context'\nimport { displayRow } from './list-displays'\n\n/**\n * The list page's rows page by page, for a display other than the table: the same loader and pages as the table, so\n * switching between them reads no row twice.\n */\nexport const useDisplayRows = (model: ResourceModel, page: (number: number) => Promise<LoadedPage>, key: readonly unknown[], enabled: boolean): ListDisplay => {\n const query = useInfiniteQuery({\n queryKey: [...key, 'display'],\n enabled,\n initialPageParam: 0,\n queryFn: ({ pageParam }) => page(pageParam),\n getNextPageParam: (last, pages) => (last.rows.length === gridPageSize && pages.length * gridPageSize < (pages[0]?.total ?? 0) ? pages.length : undefined),\n })\n const pages = query.data?.pages ?? []\n return {\n resource: model.name,\n rows: pages.flatMap((loaded) => loaded.rows.map((row) => displayRow(model, row))),\n total: pages[0]?.total ?? 0,\n loading: query.isPending,\n error: query.error,\n more: query.hasNextPage,\n loadMore: () => void query.fetchNextPage(),\n }\n}\n"],"mappings":"uiBAWA,IAAaK,GAAkB,EAAsB,EAA+C,EAAyB,IAAkC,CAC7J,IAAMC,EAAQF,EAAiB,CAC7B,SAAU,CAAC,GAAGG,EAAK,SAAS,EAC5B,UACA,iBAAkB,EAClB,SAAU,CAAE,eAAgBC,EAAKC,CAAS,EAC1C,kBAAmB,EAAM,IAAWC,EAAK,KAAK,SAAA,IAA2BC,EAAM,OAAA,IAAyBA,EAAM,EAAE,EAAE,OAAS,GAAKA,EAAM,OAAS,IAAA,EACjJ,CAAC,EACKA,EAAQL,EAAM,MAAM,OAAS,CAAC,EACpC,MAAO,CACL,SAAUM,EAAM,KAChB,KAAMD,EAAM,QAAS,GAAWE,EAAO,KAAK,IAAK,GAAQV,EAAWS,EAAOE,CAAG,CAAC,CAAC,EAChF,MAAOH,EAAM,EAAE,EAAE,OAAS,EAC1B,QAASL,EAAM,UACf,MAAOA,EAAM,MACb,KAAMA,EAAM,YACZ,aAAgB,KAAKA,EAAM,cAAc,CAC3C,CACF","debugId":"d129fb48-99e0-4ff9-9f2f-4d164abe4a3e"}
1
+ {"version":3,"file":"use-display-rows-1Xjy5pR2.js","names":["n","a","t","displayRow","useInfiniteQuery","useDisplayRows","query","key","page","pageParam","last","pages","model","loaded","row"],"sources":["../../../src/app/displays/use-display-rows.ts"],"sourcesContent":["import { useInfiniteQuery } from '@tanstack/react-query'\nimport type { ResourceModel } from '@protobase/schema'\nimport { gridPageSize } from '../../data-grid'\nimport type { LoadedPage } from '../../live/grid-loader'\nimport type { ListDisplay } from './display-context'\nimport { displayRow } from './list-displays'\n\n/**\n * The list page's rows page by page, for a display other than the table: the same loader and pages as the table, so\n * switching between them reads no row twice.\n */\nexport const useDisplayRows = (model: ResourceModel, page: (number: number) => Promise<LoadedPage>, key: readonly unknown[], enabled: boolean): ListDisplay => {\n const query = useInfiniteQuery({\n queryKey: [...key, 'display'],\n enabled,\n initialPageParam: 0,\n queryFn: ({ pageParam }) => page(pageParam),\n getNextPageParam: (last, pages) => (last.rows.length === gridPageSize && pages.length * gridPageSize < (pages[0]?.total ?? 0) ? pages.length : undefined),\n })\n const pages = query.data?.pages ?? []\n return {\n resource: model.name,\n rows: pages.flatMap((loaded) => loaded.rows.map((row) => displayRow(model, row))),\n total: pages[0]?.total ?? 0,\n loading: query.isPending,\n error: query.error,\n more: query.hasNextPage,\n loadMore: () => void query.fetchNextPage(),\n }\n}\n"],"mappings":"uiBAWA,IAAaK,GAAkB,EAAsB,EAA+C,EAAyB,IAAkC,CAC7J,IAAMC,EAAQF,EAAiB,CAC7B,SAAU,CAAC,GAAGG,EAAK,SAAS,EAC5B,UACA,iBAAkB,EAClB,SAAU,CAAE,eAAgBC,EAAKC,CAAS,EAC1C,kBAAmB,EAAM,IAAWC,EAAK,KAAK,SAAA,IAA2BC,EAAM,OAAA,IAAyBA,EAAM,EAAE,EAAE,OAAS,GAAKA,EAAM,OAAS,IAAA,EACjJ,CAAC,EACKA,EAAQL,EAAM,MAAM,OAAS,CAAC,EACpC,MAAO,CACL,SAAUM,EAAM,KAChB,KAAMD,EAAM,QAAS,GAAWE,EAAO,KAAK,IAAK,GAAQV,EAAWS,EAAOE,CAAG,CAAC,CAAC,EAChF,MAAOH,EAAM,EAAE,EAAE,OAAS,EAC1B,QAASL,EAAM,UACf,MAAOA,EAAM,MACb,KAAMA,EAAM,YACZ,aAAgB,KAAKA,EAAM,cAAc,CAC3C,CACF","debugId":"355e3cb9-a51d-4034-8921-5cc3fc58eaf8"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-my-invitations-BmYWQO42.js","names":["useState","useId","useRef","useState","useContext","n","a","t","__toESM","require_react","require_jsx_runtime","Input","useOrganizationText","useAction","ClientStartContext","formatTag","Button","roleLabel","keys","isAnsweredNow","useAuth","lastFetchFailed","useQuery","import_jsx_runtime","MyInvitationRow","roles","name","invitation","appRoles","role","expires","busy","joining","onJoin","import_react","NewOrganizationForm","setName","missing","setMissing","hint","field","submit","run","session","onCreated","problem","error","event","useJoinInvitation","pressed","setPressed","invitationId","onJoined","useMyInvitations","startedAt","query"],"sources":["../../../src/organizations/my-invitation-row.tsx","../../../src/organizations/new-organization-form.tsx","../../../src/organizations/use-join-invitation.ts","../../../src/organizations/use-my-invitations.ts"],"sourcesContent":["import type { OrganizationInvitation } from '@protobase/client'\nimport { useAuth } from '../auth/auth-provider'\nimport { formatTag } from '../locale/active-locale'\nimport { Button } from '../primitives/button'\nimport { roleLabel } from './organization-paths'\nimport type { OrganizationText } from './organization-word'\n\n/**\n * An invitation for the person's own address: where to, with which app roles, until when, and Join, which says it is\n * joining while `joining`; `busy` while any invitation is being joined.\n */\nexport const MyInvitationRow = ({ invitation, t, busy, joining, onJoin }: { invitation: OrganizationInvitation; t: OrganizationText; busy: boolean; joining: boolean; onJoin: () => void }) => {\n const roles = useAuth().organizations?.roles ?? []\n const name = invitation.organizationName ?? t('anOrganization')\n const appRoles = invitation.appRoles.map((role) => roleLabel(roles, role)).join(', ')\n const expires = t('expires', { date: new Date(invitation.expiresAt).toLocaleDateString(formatTag(), { dateStyle: 'long' }) })\n // On a phone the button goes under the name, full width, so a long name stays whole\n return (\n <li className=\"flex flex-col gap-2 px-3 py-2.5 sm:flex-row sm:items-center sm:gap-3\">\n <span className=\"min-w-0 flex-1\">\n <span className=\"block break-words font-medium\">{name}</span>\n <span className=\"block text-xs text-muted-foreground\">{appRoles ? `${appRoles} · ${expires}` : expires}</span>\n </span>\n <Button variant=\"primary\" disabled={busy} loading={joining} busyLabel={t('joining', { name })} onClick={onJoin} className=\"min-h-10 w-full sm:min-h-0 sm:w-auto\">\n {t('join', { name })}\n </Button>\n </li>\n )\n}\n","import { useId, useRef, useState } from 'react'\nimport { useAuth } from '../auth/auth-provider'\nimport { Button } from '../primitives/button'\nimport { Input } from '../primitives/input'\nimport { useAction } from './use-action'\nimport { useOrganizationText } from './organization-word'\n\n/**\n * Names a new organization, its one field; the server makes its slug from the name. The button always answers: an\n * empty name says so by the field, and while the organization is made a second press does nothing.\n */\nexport const NewOrganizationForm = ({ onCreated, autoFocus = false }: { onCreated: () => void; autoFocus?: boolean }) => {\n const { session } = useAuth()\n const t = useOrganizationText()\n const [name, setName] = useState('')\n const [missing, setMissing] = useState(false)\n const { busy, error, run } = useAction()\n const hint = useId()\n const field = useRef<HTMLInputElement>(null)\n const submit = () => {\n if (busy) return\n if (name.trim() === '') {\n setMissing(true)\n field.current?.focus()\n return\n }\n void run(async () => {\n await session.organizations.create({ name: name.trim() })\n onCreated()\n })\n }\n // Only a missing name is the field's fault; why the server refused, or could not be reached, stays beside it\n const problem = missing ? t('nameNeeded') : error\n return (\n <form className=\"flex flex-col gap-4\" noValidate onSubmit={(event) => { event.preventDefault(); submit() }}>\n <div className=\"flex flex-col gap-1.5\">\n <label className=\"flex flex-col gap-1.5 font-medium\">\n {t('organizationName')}\n <Input\n ref={field}\n name=\"organization\"\n autoComplete=\"organization\"\n autoFocus={autoFocus}\n maxLength={200}\n value={name}\n invalid={missing}\n aria-describedby={missing ? hint : undefined}\n onChange={(event) => {\n setName(event.target.value)\n setMissing(false)\n }}\n className=\"min-h-6\"\n />\n </label>\n {problem && <p id={hint} role=\"alert\" className=\"text-body font-medium text-danger-text\">{problem}</p>}\n </div>\n <Button variant=\"primary\" type=\"submit\" loading={busy} busyLabel={t('creating')} className=\"min-h-10\">\n {t('createButton')}\n </Button>\n </form>\n )\n}\n","import { useState } from 'react'\nimport { useAuth } from '../auth/auth-provider'\nimport { useAction } from './use-action'\n\n/** Joins one of the person's invitations at a time, then `onJoined`; `joining` is the invitation it is joining. */\nexport const useJoinInvitation = (onJoined: () => void) => {\n const { session } = useAuth()\n const { busy, error, run } = useAction()\n const [pressed, setPressed] = useState<string>()\n const join = (invitationId: string) => {\n setPressed(invitationId)\n void run(async () => {\n await session.organizations.acceptMine(invitationId)\n onJoined()\n })\n }\n return { busy, error, joining: busy ? pressed : undefined, join }\n}\n","import { useQuery } from '@tanstack/react-query'\nimport { useContext } from 'react'\nimport type { OrganizationInvitation } from '@protobase/client'\nimport { useAuth } from '../auth/auth-provider'\nimport { keys } from '../data/query-keys'\nimport { ClientStartContext, isAnsweredNow, lastFetchFailed } from '../data/start-cache/restored-state'\n\nexport type MyInvitations = { state: 'loading' } | { state: 'failed'; retry: () => void } | { state: 'ready'; invitations: OrganizationInvitation[] }\n\n/**\n * The pending invitations for the signed-in person's own address, as read in this page load, or that they could not be\n * read, to try again: the start cache's answer may predate an invitation, which an empty list would then hide.\n */\nexport const useMyInvitations = (): MyInvitations => {\n const { session } = useAuth()\n const startedAt = useContext(ClientStartContext)\n const query = useQuery({ queryKey: keys.myInvitations, queryFn: () => session.organizations.myInvitations(), retry: false })\n if (query.data && isAnsweredNow(query, startedAt)) return { state: 'ready', invitations: query.data }\n if (lastFetchFailed(query)) return { state: 'failed', retry: () => void query.refetch() }\n return { state: 'loading' }\n}\n"],"mappings":"wuBAWawB,GAAmB,CAAE,aAAY,EAAG,OAAM,UAAS,YAA+H,CAC7L,IAAMC,EAAQL,EAAQ,CAAC,CAAC,eAAe,OAAS,CAAC,EAC3CM,EAAOC,EAAW,kBAAoB,EAAE,gBAAgB,EACxDC,EAAWD,EAAW,SAAS,IAAK,GAASV,EAAUQ,EAAOI,CAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAC9EC,EAAU,EAAE,UAAW,CAAE,KAAM,IAAI,KAAKH,EAAW,SAAS,CAAC,CAAC,mBAAmBZ,EAAU,EAAG,CAAE,UAAW,MAAO,CAAC,CAAE,CAAC,EAE5H,OACE,EAAAQ,EAAA,KAAA,CAAC,KAAD,CAAI,UAAU,uEAAd,SAAA,EACE,EAAAA,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,iBAAhB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,gCAAiC,SAAAG,CAAW,CAAA,GAC5D,EAAAH,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,sCAAuC,SAAAK,EAAW,GAAGA,EAAS,KAAKE,IAAYA,CAAc,CAAA,CACzG,CACN,CAAA,GAAA,EAAAP,EAAA,IAAA,CAACP,EAAD,CAAQ,QAAQ,UAAU,SAAUe,EAAM,QAASC,EAAS,UAAW,EAAE,UAAW,CAAE,MAAK,CAAC,EAAG,QAASC,EAAQ,UAAU,uCACvH,SAAA,EAAE,OAAQ,CAAE,MAAK,CAAC,CACb,CAAA,CACN,GAER,aCjBaE,GAAuB,CAAE,YAAW,YAAY,MAA4D,CACvH,GAAM,CAAE,WAAYf,EAAQ,EACtBb,EAAIK,EAAoB,EACxB,CAACc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,CAACP,EAAD,CAAQ,QAAQ,UAAU,KAAK,SAAS,QAASe,EAAM,UAAWxB,EAAE,UAAU,EAAG,UAAU,WACxF,SAAAA,EAAE,cAAc,CACX,CAAA,CACJ,GAEV,ECxDayC,EAAqB,GAAyB,CACzD,GAAM,CAAE,WAAY5B,EAAQ,EACtB,CAAE,OAAM,QAAO,OAAQP,EAAU,EACjC,CAACoC,EAASC,IAAA,EAAc/C,EAAAA,SAAAA,CAAiB,EAQ/C,MAAO,CAAE,OAAM,QAAO,QAAS4B,EAAOkB,EAAU,IAAA,GAAW,KAP7C,GAAyB,CACrCC,EAAWC,CAAY,EACvBT,EAAS,SAAY,CACnB,MAAMC,EAAQ,cAAc,WAAWQ,CAAY,EACnDC,EAAS,CACX,CAAC,CACH,CACgE,CAClE,ECJaC,MAAwC,CACnD,GAAM,CAAE,WAAYjC,EAAQ,EACtBkC,GAAA,EAAYlD,EAAAA,WAAAA,CAAWU,CAAkB,EACzCyC,EAAQjC,EAAS,CAAE,SAAUJ,EAAK,cAAe,YAAeyB,EAAQ,cAAc,cAAc,EAAG,MAAO,EAAM,CAAC,EAG3H,OAFIY,EAAM,MAAQpC,EAAcoC,EAAOD,CAAS,EAAU,CAAE,MAAO,QAAS,YAAaC,EAAM,IAAK,EAChGlC,EAAgBkC,CAAK,EAAU,CAAE,MAAO,SAAU,UAAa,KAAKA,EAAM,QAAQ,CAAE,EACjF,CAAE,MAAO,SAAU,CAC5B","debugId":"6661640e-e364-4dac-aecb-4b502efbc66c"}
1
+ {"version":3,"file":"use-my-invitations-CrSF37dB.js","names":["useState","useId","useRef","useState","useContext","n","a","t","__toESM","require_react","require_jsx_runtime","Input","useOrganizationText","useAction","ClientStartContext","formatTag","Button","roleLabel","keys","isAnsweredNow","useAuth","lastFetchFailed","useQuery","import_jsx_runtime","MyInvitationRow","roles","name","invitation","appRoles","role","expires","busy","joining","onJoin","import_react","NewOrganizationForm","setName","missing","setMissing","hint","field","submit","run","session","onCreated","problem","error","event","useJoinInvitation","pressed","setPressed","invitationId","onJoined","useMyInvitations","startedAt","query"],"sources":["../../../src/organizations/my-invitation-row.tsx","../../../src/organizations/new-organization-form.tsx","../../../src/organizations/use-join-invitation.ts","../../../src/organizations/use-my-invitations.ts"],"sourcesContent":["import type { OrganizationInvitation } from '@protobase/client'\nimport { useAuth } from '../auth/auth-provider'\nimport { formatTag } from '../locale/active-locale'\nimport { Button } from '../primitives/button'\nimport { roleLabel } from './organization-paths'\nimport type { OrganizationText } from './organization-word'\n\n/**\n * An invitation for the person's own address: where to, with which app roles, until when, and Join, which says it is\n * joining while `joining`; `busy` while any invitation is being joined.\n */\nexport const MyInvitationRow = ({ invitation, t, busy, joining, onJoin }: { invitation: OrganizationInvitation; t: OrganizationText; busy: boolean; joining: boolean; onJoin: () => void }) => {\n const roles = useAuth().organizations?.roles ?? []\n const name = invitation.organizationName ?? t('anOrganization')\n const appRoles = invitation.appRoles.map((role) => roleLabel(roles, role)).join(', ')\n const expires = t('expires', { date: new Date(invitation.expiresAt).toLocaleDateString(formatTag(), { dateStyle: 'long' }) })\n // On a phone the button goes under the name, full width, so a long name stays whole\n return (\n <li className=\"flex flex-col gap-2 px-3 py-2.5 sm:flex-row sm:items-center sm:gap-3\">\n <span className=\"min-w-0 flex-1\">\n <span className=\"block break-words font-medium\">{name}</span>\n <span className=\"block text-xs text-muted-foreground\">{appRoles ? `${appRoles} · ${expires}` : expires}</span>\n </span>\n <Button variant=\"primary\" disabled={busy} loading={joining} busyLabel={t('joining', { name })} onClick={onJoin} className=\"min-h-10 w-full sm:min-h-0 sm:w-auto\">\n {t('join', { name })}\n </Button>\n </li>\n )\n}\n","import { useId, useRef, useState } from 'react'\nimport { useAuth } from '../auth/auth-provider'\nimport { Button } from '../primitives/button'\nimport { Input } from '../primitives/input'\nimport { useAction } from './use-action'\nimport { useOrganizationText } from './organization-word'\n\n/**\n * Names a new organization, its one field; the server makes its slug from the name. The button always answers: an\n * empty name says so by the field, and while the organization is made a second press does nothing.\n */\nexport const NewOrganizationForm = ({ onCreated, autoFocus = false }: { onCreated: () => void; autoFocus?: boolean }) => {\n const { session } = useAuth()\n const t = useOrganizationText()\n const [name, setName] = useState('')\n const [missing, setMissing] = useState(false)\n const { busy, error, run } = useAction()\n const hint = useId()\n const field = useRef<HTMLInputElement>(null)\n const submit = () => {\n if (busy) return\n if (name.trim() === '') {\n setMissing(true)\n field.current?.focus()\n return\n }\n void run(async () => {\n await session.organizations.create({ name: name.trim() })\n onCreated()\n })\n }\n // Only a missing name is the field's fault; why the server refused, or could not be reached, stays beside it\n const problem = missing ? t('nameNeeded') : error\n return (\n <form className=\"flex flex-col gap-4\" noValidate onSubmit={(event) => { event.preventDefault(); submit() }}>\n <div className=\"flex flex-col gap-1.5\">\n <label className=\"flex flex-col gap-1.5 font-medium\">\n {t('organizationName')}\n <Input\n ref={field}\n name=\"organization\"\n autoComplete=\"organization\"\n autoFocus={autoFocus}\n maxLength={200}\n value={name}\n invalid={missing}\n aria-describedby={missing ? hint : undefined}\n onChange={(event) => {\n setName(event.target.value)\n setMissing(false)\n }}\n className=\"min-h-6\"\n />\n </label>\n {problem && <p id={hint} role=\"alert\" className=\"text-body font-medium text-danger-text\">{problem}</p>}\n </div>\n <Button variant=\"primary\" type=\"submit\" loading={busy} busyLabel={t('creating')} className=\"min-h-10\">\n {t('createButton')}\n </Button>\n </form>\n )\n}\n","import { useState } from 'react'\nimport { useAuth } from '../auth/auth-provider'\nimport { useAction } from './use-action'\n\n/** Joins one of the person's invitations at a time, then `onJoined`; `joining` is the invitation it is joining. */\nexport const useJoinInvitation = (onJoined: () => void) => {\n const { session } = useAuth()\n const { busy, error, run } = useAction()\n const [pressed, setPressed] = useState<string>()\n const join = (invitationId: string) => {\n setPressed(invitationId)\n void run(async () => {\n await session.organizations.acceptMine(invitationId)\n onJoined()\n })\n }\n return { busy, error, joining: busy ? pressed : undefined, join }\n}\n","import { useQuery } from '@tanstack/react-query'\nimport { useContext } from 'react'\nimport type { OrganizationInvitation } from '@protobase/client'\nimport { useAuth } from '../auth/auth-provider'\nimport { keys } from '../data/query-keys'\nimport { ClientStartContext, isAnsweredNow, lastFetchFailed } from '../data/start-cache/restored-state'\n\nexport type MyInvitations = { state: 'loading' } | { state: 'failed'; retry: () => void } | { state: 'ready'; invitations: OrganizationInvitation[] }\n\n/**\n * The pending invitations for the signed-in person's own address, as read in this page load, or that they could not be\n * read, to try again: the start cache's answer may predate an invitation, which an empty list would then hide.\n */\nexport const useMyInvitations = (): MyInvitations => {\n const { session } = useAuth()\n const startedAt = useContext(ClientStartContext)\n const query = useQuery({ queryKey: keys.myInvitations, queryFn: () => session.organizations.myInvitations(), retry: false })\n if (query.data && isAnsweredNow(query, startedAt)) return { state: 'ready', invitations: query.data }\n if (lastFetchFailed(query)) return { state: 'failed', retry: () => void query.refetch() }\n return { state: 'loading' }\n}\n"],"mappings":"wuBAWawB,GAAmB,CAAE,aAAY,EAAG,OAAM,UAAS,YAA+H,CAC7L,IAAMC,EAAQL,EAAQ,CAAC,CAAC,eAAe,OAAS,CAAC,EAC3CM,EAAOC,EAAW,kBAAoB,EAAE,gBAAgB,EACxDC,EAAWD,EAAW,SAAS,IAAK,GAASV,EAAUQ,EAAOI,CAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAC9EC,EAAU,EAAE,UAAW,CAAE,KAAM,IAAI,KAAKH,EAAW,SAAS,CAAC,CAAC,mBAAmBZ,EAAU,EAAG,CAAE,UAAW,MAAO,CAAC,CAAE,CAAC,EAE5H,OACE,EAAAQ,EAAA,KAAA,CAAC,KAAD,CAAI,UAAU,uEAAd,SAAA,EACE,EAAAA,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,iBAAhB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,gCAAiC,SAAAG,CAAW,CAAA,GAC5D,EAAAH,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,sCAAuC,SAAAK,EAAW,GAAGA,EAAS,KAAKE,IAAYA,CAAc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C5B","debugId":"ab485dfb-7411-4959-bbf4-37148de64315"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-paged-search-CQZq-5QD.js","names":["useState","useRef","n","a","t","__toESM","require_react","require_jsx_runtime","AccountSection","Input","Search","SectionError","Button","messages","text","import_jsx_runtime","PagedSearchList","error","searchLabel","query","onQuery","event","list","renderRow","import_react","usePagedSearch","found","setFound","total","setTotal","loading","setLoading","latest","timer","search","page","asked","shown"],"sources":["../../../src/lists/messages.ts","../../../src/lists/paged-search-list.tsx","../../../src/lists/use-paged-search.ts"],"sourcesContent":["import { messages } from '../locale/messages'\n\nexport const text = messages('lists')\n","import { Search } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { AccountSection, SectionError } from '../account/account-section'\nimport { Button } from '../primitives/button'\nimport { Input } from '../primitives/input'\nimport type { PagedSearch } from './use-paged-search'\nimport { text } from './messages'\n\nexport type PagedSearchListProps<Item> = {\n title: string\n description: string\n /** The search box's accessible name, such as \"Find an organization\". */\n searchLabel: string\n placeholder: string\n query: string\n onQuery: (query: string) => void\n list: PagedSearch<Item>\n error?: string\n /** One `<li>` per item. */\n renderRow: (item: Item) => ReactNode\n}\n\n/** A section with a search box, how many of how many show, the rows found so far and \"Show more\" for the next page. */\nexport const PagedSearchList = <Item,>({ title, description, searchLabel, placeholder, query, onQuery, list, error, renderRow }: PagedSearchListProps<Item>) => (\n <AccountSection title={title} description={description}>\n <SectionError message={error} />\n <Input aria-label={searchLabel} placeholder={placeholder} value={query} onChange={(event) => onQuery(event.target.value)} leading={<Search className=\"size-3.5\" />} wrapperClassName=\"mb-2\" />\n <p className=\"mb-3 text-xs text-muted-foreground\">{list.found.length} of {list.total}</p>\n {list.found.length > 0 && <ul className=\"divide-y rounded-md border\">{list.found.map(renderRow)}</ul>}\n {list.found.length < list.total && <Button className=\"mt-3\" loading={list.loading} onClick={() => void list.more()}>{text('showMore')}</Button>}\n </AccountSection>\n)\n","import { useEffect, useRef, useState } from 'react'\n\n/** A page of what a search found, and how many there are in all. */\nexport type FoundPage<Item> = { items: Item[]; total: number }\n\n/** What `usePagedSearch` shows: the items found so far, the total, `more` for the next page, and whether a page is on its way. */\nexport type PagedSearch<Item> = { found: Item[]; total: number; more: () => Promise<void>; loading: boolean }\n\n/**\n * What `search` finds for `query`, a page at a time (searched 200 ms after the text stops changing). `more` adds the\n * next page. A page that arrives after the text changed is dropped, so it never adds rows of the old filter. `search`\n * must keep its identity between renders, or each render searches again.\n */\nexport const usePagedSearch = <Item,>(search: (query: string, offset: number) => Promise<FoundPage<Item>>, query: string): PagedSearch<Item> => {\n const [found, setFound] = useState<Item[]>([])\n const [total, setTotal] = useState(0)\n const [loading, setLoading] = useState(false)\n const latest = useRef(query)\n latest.current = query\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setLoading(true)\n void search(query, 0).then(\n (page) => {\n if (latest.current !== query) return\n setFound(page.items)\n setTotal(page.total)\n setLoading(false)\n },\n () => {\n if (latest.current !== query) return\n setFound([])\n setTotal(0)\n setLoading(false)\n },\n )\n }, 200)\n return () => clearTimeout(timer)\n }, [search, query])\n\n const more = async () => {\n const asked = query\n setLoading(true)\n const page = await search(asked, found.length).catch(() => undefined)\n if (latest.current !== asked) return\n if (page) {\n setFound((shown) => [...shown, ...page.items])\n setTotal(page.total)\n }\n setLoading(false)\n }\n\n return { found, total, more, loading }\n}\n"],"mappings":"woBAEA,IAAac,EAAOD,EAAS,OAAO,aCqBvBG,GAA0B,CAAE,QAAO,cAAa,cAAa,cAAa,QAAO,UAAS,OAAM,QAAO,gBAClH,EAAAD,EAAA,KAAA,CAACP,EAAD,CAAuB,QAAoB,cAA3C,SAAA,EACE,EAAAO,EAAA,IAAA,CAACJ,EAAD,CAAc,QAASM,CAAQ,CAAA,GAC/B,EAAAF,EAAA,IAAA,CAACN,EAAD,CAAO,aAAYS,EAA0B,cAAa,MAAOC,EAAO,SAAW,GAAUC,EAAQC,EAAM,OAAO,KAAK,EAAG,SAAS,EAAAN,EAAA,IAAA,CAAC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EAAQjB,EACdY,EAAW,EAAI,EACf,IAAMI,EAAO,MAAMD,EAAOE,EAAOV,EAAM,MAAM,CAAC,CAAC,UAAY,IAAA,EAAS,EAChEM,EAAO,UAAYI,IACnBD,IACFR,EAAU,GAAU,CAAC,GAAGU,EAAO,GAAGF,EAAK,KAAK,CAAC,EAC7CN,EAASM,EAAK,KAAK,GAErBJ,EAAW,EAAK,EAClB,EAE6B,SAAQ,CACvC","debugId":"9066afb9-4031-485c-a398-5046c56c091f"}
1
+ {"version":3,"file":"use-paged-search-CtD7Lf-E.js","names":["useState","useRef","n","a","t","__toESM","require_react","require_jsx_runtime","AccountSection","Input","Search","SectionError","Button","messages","text","import_jsx_runtime","PagedSearchList","error","searchLabel","query","onQuery","event","list","renderRow","import_react","usePagedSearch","found","setFound","total","setTotal","loading","setLoading","latest","timer","search","page","asked","shown"],"sources":["../../../src/lists/messages.ts","../../../src/lists/paged-search-list.tsx","../../../src/lists/use-paged-search.ts"],"sourcesContent":["import { messages } from '../locale/messages'\n\nexport const text = messages('lists')\n","import { Search } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { AccountSection, SectionError } from '../account/account-section'\nimport { Button } from '../primitives/button'\nimport { Input } from '../primitives/input'\nimport type { PagedSearch } from './use-paged-search'\nimport { text } from './messages'\n\nexport type PagedSearchListProps<Item> = {\n title: string\n description: string\n /** The search box's accessible name, such as \"Find an organization\". */\n searchLabel: string\n placeholder: string\n query: string\n onQuery: (query: string) => void\n list: PagedSearch<Item>\n error?: string\n /** One `<li>` per item. */\n renderRow: (item: Item) => ReactNode\n}\n\n/** A section with a search box, how many of how many show, the rows found so far and \"Show more\" for the next page. */\nexport const PagedSearchList = <Item,>({ title, description, searchLabel, placeholder, query, onQuery, list, error, renderRow }: PagedSearchListProps<Item>) => (\n <AccountSection title={title} description={description}>\n <SectionError message={error} />\n <Input aria-label={searchLabel} placeholder={placeholder} value={query} onChange={(event) => onQuery(event.target.value)} leading={<Search className=\"size-3.5\" />} wrapperClassName=\"mb-2\" />\n <p className=\"mb-3 text-xs text-muted-foreground\">{list.found.length} of {list.total}</p>\n {list.found.length > 0 && <ul className=\"divide-y rounded-md border\">{list.found.map(renderRow)}</ul>}\n {list.found.length < list.total && <Button className=\"mt-3\" loading={list.loading} onClick={() => void list.more()}>{text('showMore')}</Button>}\n </AccountSection>\n)\n","import { useEffect, useRef, useState } from 'react'\n\n/** A page of what a search found, and how many there are in all. */\nexport type FoundPage<Item> = { items: Item[]; total: number }\n\n/** What `usePagedSearch` shows: the items found so far, the total, `more` for the next page, and whether a page is on its way. */\nexport type PagedSearch<Item> = { found: Item[]; total: number; more: () => Promise<void>; loading: boolean }\n\n/**\n * What `search` finds for `query`, a page at a time (searched 200 ms after the text stops changing). `more` adds the\n * next page. A page that arrives after the text changed is dropped, so it never adds rows of the old filter. `search`\n * must keep its identity between renders, or each render searches again.\n */\nexport const usePagedSearch = <Item,>(search: (query: string, offset: number) => Promise<FoundPage<Item>>, query: string): PagedSearch<Item> => {\n const [found, setFound] = useState<Item[]>([])\n const [total, setTotal] = useState(0)\n const [loading, setLoading] = useState(false)\n const latest = useRef(query)\n latest.current = query\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setLoading(true)\n void search(query, 0).then(\n (page) => {\n if (latest.current !== query) return\n setFound(page.items)\n setTotal(page.total)\n setLoading(false)\n },\n () => {\n if (latest.current !== query) return\n setFound([])\n setTotal(0)\n setLoading(false)\n },\n )\n }, 200)\n return () => clearTimeout(timer)\n }, [search, query])\n\n const more = async () => {\n const asked = query\n setLoading(true)\n const page = await search(asked, found.length).catch(() => undefined)\n if (latest.current !== asked) return\n if (page) {\n setFound((shown) => [...shown, ...page.items])\n setTotal(page.total)\n }\n setLoading(false)\n }\n\n return { found, total, more, loading }\n}\n"],"mappings":"woBAEA,IAAac,EAAOD,EAAS,OAAO,aCqBvBG,GAA0B,CAAE,QAAO,cAAa,cAAa,cAAa,QAAO,UAAS,OAAM,QAAO,gBAClH,EAAAD,EAAA,KAAA,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,KAAK,EACnBJ,EAAW,EAAK,EAClB,MACM,CACAC,EAAO,UAAYb,IACvBQ,EAAS,CAAC,CAAC,EACXE,EAAS,CAAC,EACVE,EAAW,EAAK,EAClB,CACF,CACF,EAAG,GAAG,EACN,UAAa,aAAaE,CAAK,CACjC,EAAG,CAACC,EAAQf,CAAK,CAAC,EAcX,CAAE,QAAO,QAAO,cAZE,CACvB,IAAMiB,EAAQjB,EACdY,EAAW,EAAI,EACf,IAAMI,EAAO,MAAMD,EAAOE,EAAOV,EAAM,MAAM,CAAC,CAAC,UAAY,IAAA,EAAS,EAChEM,EAAO,UAAYI,IACnBD,IACFR,EAAU,GAAU,CAAC,GAAGU,EAAO,GAAGF,EAAK,KAAK,CAAC,EAC7CN,EAASM,EAAK,KAAK,GAErBJ,EAAW,EAAK,EAClB,EAE6B,SAAQ,CACvC","debugId":"ad0fb2df-f84a-47b5-a063-ce690dbf1e12"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-run-trace-CP67JSwu.js","names":["isObject","useRef","useContext","useRef","n","a","t","__toESM","require_react","useRecord","liveRefresh","FocusRefreshContext","useClient","keys","useQueryClient","useQuery","resultSchema","schemaAt","innerMachine","pinType","expressionSource","inputSchema","triggerSchema","orderOf","customStepTestDefinition","stepStatusSchema","parseReference","emptyDefinition","definitionOf","value","given","machine","States","start","recordDefinition","record","definitionRecord","_","withoutStart","definition","pathNames","path","pathOf","scope","name","splitPath","names","machineAt","stateAt","allNames","state","inner","pathOfName","other","found","holdsSteps","isObject$1","propertiesOf","schema","branches","own","entry","merged","field","branch","known","fields","fieldsOf","inputState","argumentsOf","inputPin","options","option","inputPins","schemas","required","args","key","outputsOf","stepOutputs","triggerOutputs","statusKey","conditionKey","statusPin","conditionPin","givenSchema","triggerLayoutKey","isObject","isPoint","pointsOf","point","workflowLayoutOf","views","keyPart","part","nameOf","id","pathPart","layoutKey","pure","withoutKey","layout","spacing","padding","overlaps","b","placedBoxes","moved","laidOut","boxes","box","children","parentOf","depth","parent","grown","ids","placed","others","under","group","width","height","import_react","followMs","stepRow","step","followedSteps","have","from","steps","useRunSteps","client","queryClient","queryKey","runId","data","following","was","stopped","refetch","goingOn","useFollow","refresh","timer","useEndRefresh","focusRefresh","going","ended","placeOf","within","block","useRunTrace","run","versioned","version"],"sources":["../../../src/app/field-types/workflow/definition.ts","../../../src/app/field-types/workflow/pins/node-pins.ts","../../../src/app/field-types/workflow/manual-layout.ts","../../../src/app/field-types/workflow-run/use-run-steps.ts","../../../src/app/field-types/workflow-run/use-run-trace.ts"],"sourcesContent":["import { innerMachine, orderOf, type Definition, type Machine, type State } from '@protobase/workflows'\n\n/** A state's path: its name, after the names of the Maps and Blocks it is inside, joined by `/` as the definition check names it. */\nexport type StatePath = string\n\n/** The node of the workflow's trigger, which leads to the first state; no state path is empty. */\nexport const triggerId = ''\n\n/** What a workflow without a definition starts from: run by hand, and no state yet. */\nexport const emptyDefinition = (): Definition => ({ trigger: { manual: {} }, stateMachine: { QueryLanguage: 'JSONata', StartAt: '', States: {} } })\n\n/** The value as a definition to draw and edit: a workflow without one starts empty. */\nexport const definitionOf = (value: unknown): Definition => {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) return emptyDefinition()\n const given = value as Partial<Definition>\n const machine = given.stateMachine\n const States = typeof machine?.States === 'object' && machine.States !== null && !Array.isArray(machine.States) ? machine.States : {}\n // In data order a machine has no start, as it is saved\n const start = given.order === 'data' ? {} : { StartAt: machine?.StartAt ?? '' }\n return { ...given, trigger: given.trigger ?? { manual: {} }, stateMachine: { ...machine, QueryLanguage: 'JSONata', ...start, States } } as Definition\n}\n\n/**\n * A workflow's or a version's record as the definition to draw and edit, from the fields it keeps it in: its state\n * machine, trigger, execution order, connections and trace. One in data order is drawn with an empty `StartAt`, which\n * it is saved without.\n */\nexport const recordDefinition = (record: Record<string, unknown>): Definition =>\n definitionOf({\n trigger: record.trigger,\n order: record.execution_order ?? 'sequence',\n stateMachine: record.state_machine,\n ...(record.connections ? { connections: record.connections } : {}),\n ...(record.trace ? { trace: record.trace } : {}),\n })\n\n/** The fields a definition is saved in, as `recordDefinition` reads them: a state machine in data order has no `StartAt`. */\nexport const definitionRecord = (definition: Definition) => {\n const { StartAt: _, ...withoutStart } = definition.stateMachine\n return {\n state_machine: orderOf(definition) === 'data' ? withoutStart : definition.stateMachine,\n trigger: definition.trigger,\n execution_order: orderOf(definition),\n connections: definition.connections ?? null,\n trace: definition.trace ?? null,\n }\n}\n\n/** The names of a path, outermost first. */\nexport const pathNames = (path: StatePath) => path.split('/')\n\n/** The path of a state named `name` in the machine at `scope`, the path of a Map or Block or [] for the whole workflow. */\nexport const pathOf = (scope: readonly string[], name: string): StatePath => [...scope, name].join('/')\n\n/** The Maps and Blocks a path is inside, outermost first, and its own name. */\nexport const splitPath = (path: StatePath) => {\n const names = pathNames(path)\n return { scope: names.slice(0, -1), name: names.at(-1)! }\n}\n\n/** The machine at `scope`: the whole workflow's for [], else the steps of the Map or Block at that path. */\nexport const machineAt = (definition: Definition, scope: readonly string[]): Machine | undefined => {\n let machine: Machine | undefined = definition.stateMachine\n for (const name of scope) machine = innerMachine(machine?.States[name])\n return machine\n}\n\n/** The state at a path, when there is one. */\nexport const stateAt = (definition: Definition, path: StatePath): State | undefined => {\n const { scope, name } = splitPath(path)\n return machineAt(definition, scope)?.States[name]\n}\n\n/** Every state name, the ones inside Maps and Blocks too, which are unique across the whole definition. */\nexport const allNames = (machine: Machine): string[] =>\n Object.entries(machine.States).flatMap(([name, state]) => {\n const inner = innerMachine(state)\n return [name, ...(inner?.States ? allNames(inner) : [])]\n })\n\n/** The path of the state named `name`, wherever it is in the definition: names are unique across it. */\nexport const pathOfName = (machine: Machine, name: string, scope: readonly string[] = []): string[] | undefined => {\n if (Object.hasOwn(machine.States, name)) return [...scope, name]\n for (const [other, state] of Object.entries(machine.States)) {\n const inner = innerMachine(state)\n const found = inner?.States && pathOfName(inner, name, [...scope, other])\n if (found) return found\n }\n return\n}\n\n/** Whether a state holds steps of its own, drawn inside it: a Map's or a Block's. */\nexport const holdsSteps = (state: State | undefined) => state?.Type === 'Map' || state?.Type === 'Block'\n","import { expressionSource, inputSchema, parseReference, pinType, resultSchema, schemaAt, stepStatusSchema, triggerSchema, type Definition, type PinSchemas, type PinType, type State } from '@protobase/workflows'\n\ntype JsonSchema = Record<string, unknown>\n\n/**\n * What an input holds: nothing; a value of its own; an expression that computes; one read by name, drawn as a wire;\n * or an object whose fields read values, drawn as a Make node.\n */\nexport type InputState = 'empty' | 'literal' | 'expression' | 'wired' | 'made'\n\n/**\n * A pin on the left of a step: an argument of its type, with its type, whether the type needs it, and what it holds;\n * `statuses`: its options are what a step's status can be, shown by their names.\n */\nexport type InputPin = { key: string; type: PinType; required: boolean; value: unknown; state: InputState; options?: readonly string[]; statuses?: true }\n\n/** A pin on the right of a node: the value at `path` in what it gives, with its type. */\nexport type OutputPin = { path: string[]; type: PinType }\n\nconst isObject = (value: unknown): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n\n// The fields of an object a schema describes, or of the branches of its anyOf or oneOf, each name once: a field that\n// several branches declare takes any of their schemas.\nconst propertiesOf = (schema: JsonSchema | undefined): [string, JsonSchema][] => {\n if (!schema) return []\n const branches = [schema.anyOf, schema.oneOf].find(Array.isArray) as unknown[] | undefined\n const own = isObject(schema.properties) ? Object.entries(schema.properties).filter((entry): entry is [string, JsonSchema] => isObject(entry[1])) : []\n if (!branches) return own\n // The schema's own fields first, then each the branches add\n const merged = new Map<string, JsonSchema[]>(own.map(([name, field]) => [name, [field]]))\n for (const [name, field] of branches.filter(isObject).flatMap((branch) => propertiesOf(branch as JsonSchema))) if (!own.some(([known]) => known === name)) merged.set(name, [...(merged.get(name) ?? []), field])\n return [...merged].map(([name, fields]) => [name, fields.length === 1 ? fields[0]! : { anyOf: fields }])\n}\n\n/** The fields of an object a schema describes, each with its schema; none when it names none. */\nexport const fieldsOf = (schema: JsonSchema | undefined) => propertiesOf(schema)\n\n/** What an input's value is, as its pin shows it. */\nexport const inputState = (value: unknown): InputState => {\n if (value === undefined || value === '') return 'empty'\n if (parseReference(value)) return 'wired'\n if (expressionSource(value) !== undefined) return 'expression'\n // An object whose fields read values, by name alone or in an expression, is built by a Make node\n if (isObject(value) && Object.values(value).some((field) => expressionSource(field) !== undefined)) return 'made'\n return 'literal'\n}\n\nconst argumentsOf = (state: State): Record<string, unknown> => ('Arguments' in state && isObject(state.Arguments) ? state.Arguments : {})\n\n/** An input pin for the value at `key`, typed by its schema, with the choices an enum offers. */\nexport const inputPin = (key: string, schema: JsonSchema, value: unknown, required: boolean): InputPin => {\n const options = Array.isArray(schema.enum) && schema.enum.every((option) => typeof option === 'string') ? (schema.enum as string[]) : undefined\n return { key, type: pinType(schema), required, value, state: inputState(value), ...(options && { options }) }\n}\n\n/** A step's input pins: one per argument its type takes, in the order its schema declares them. */\nexport const inputPins = (state: State, schemas: PinSchemas): InputPin[] => {\n const schema = inputSchema(state, schemas)\n if (!schema) return []\n const required = Array.isArray(schema.required) ? (schema.required as string[]) : []\n const args = argumentsOf(state)\n return fieldsOf(schema).map(([key, field]) => inputPin(key, field, args[key], required.includes(key)))\n}\n\n// The pins of what a node gives: one per value it returns, as the fields of an untitled object, as a Blueprint's\n// function gives each output its own pin; one for the whole of a titled object, such as a record, which a Break takes apart.\nconst outputsOf = (schema: JsonSchema | undefined): OutputPin[] => {\n const fields = typeof schema?.title === 'string' ? [] : fieldsOf(schema)\n if (fields.length === 0) return [{ path: [], type: pinType(schema) }]\n return fields.map(([key, field]) => ({ path: [key], type: pinType(field) }))\n}\n\n/** What a step gives later steps by name: a Task's result by its type, a Map's or a Block's whole; nothing for the others. */\nexport const stepOutputs = (state: State, schemas: PinSchemas): OutputPin[] => {\n if (state.Type === 'Task') return outputsOf(resultSchema(state, schemas))\n if (state.Type === 'Map') return [{ path: [], type: pinType({ type: 'array' }) }]\n if (state.Type === 'Block') return [{ path: [], type: pinType(undefined) }]\n return []\n}\n\n/** What the trigger gives as the run's input: its fields by its type, or the whole input of a manual workflow. */\nexport const triggerOutputs = (definition: Definition, schemas: PinSchemas): OutputPin[] => outputsOf(triggerSchema(definition, schemas))\n\n/** In data order, the pin a state's status comes out of, and the one its Condition takes, which other values' pins never are. */\nexport const statusKey = '#status'\nexport const conditionKey = '#condition'\n\n/** A state's status pin, in data order: `$states.context.Steps.<name>`. */\nexport const statusPin: OutputPin = { path: [statusKey], type: pinType(stepStatusSchema) }\n\n/** A state's Only when pin, in data order: its Condition, true or false. */\nexport const conditionPin = (state: State): InputPin => ({ key: conditionKey, type: { kinds: ['boolean'] }, required: false, value: state.Condition, state: inputState(state.Condition) })\n\n/** The schema of the value at `path` of what a node gives, for its Break nodes: a Task's result, the run's input, or a state's status. */\nexport const givenSchema = (definition: Definition, state: State | undefined, schemas: PinSchemas, path: readonly string[]) => {\n if (path[0] === statusKey) return schemaAt(stepStatusSchema, path.slice(1))\n return schemaAt(state ? resultSchema(state, schemas) : triggerSchema(definition, schemas), path)\n}\n","import { splitPath, triggerId } from './definition'\nimport type { Box } from './graph-layout'\nimport type { PureNode } from './pins/data-graph'\nimport type { GraphView } from './pins/graph-view'\nimport { statusKey } from './pins/node-pins'\n\n/** Where a node's top left corner is, within the Map or Block it is inside or else the canvas. */\nexport type Point = { x: number; y: number }\n\n/** Where nodes were moved by hand in one view of the graph, by their layout keys: ELK lays out every node it does not name. */\nexport type ManualLayout = Readonly<Record<string, Point>>\n\n/**\n * A workflow's `layout` field, kept for everyone who edits it: the nodes moved by hand in each view of the graph, Pins\n * and Simple, each view's its own, so moving a node in one leaves it where it is in the other.\n */\nexport type WorkflowLayout = Readonly<Record<GraphView, ManualLayout>>\n\n/** The views a layout keeps, as its field holds them. */\nexport const layoutViews: readonly GraphView[] = ['pins', 'simple']\n\n/** The key of the trigger's node, and before the fields of the run's input that Break nodes take apart; no state's name. */\nexport const triggerLayoutKey = '$trigger'\n\nconst isObject = (value: unknown): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n\nconst isPoint = (value: unknown): value is Point => isObject(value) && Number.isFinite(value.x) && Number.isFinite(value.y)\n\nconst pointsOf = (value: unknown): ManualLayout => (isObject(value) ? Object.fromEntries(Object.entries(value).flatMap(([key, point]) => (isPoint(point) ? [[key, { x: point.x, y: point.y }]] : []))) : {})\n\n/**\n * The layout a workflow's field holds, as its value or the JSON text a draft keeps it as: in each view, each position\n * with a finite `x` and `y`, read as those two alone, and nothing of what else it holds.\n */\nexport const workflowLayoutOf = (value: unknown): WorkflowLayout => {\n let given = value\n if (typeof value === 'string') {\n try {\n given = JSON.parse(value)\n } catch {\n given = undefined\n }\n }\n const views = isObject(given) ? given : {}\n return { pins: pointsOf(views.pins), simple: pointsOf(views.simple) }\n}\n\n/**\n * A name or a field as a part of a key: `%`, `.` and a leading `#` or `$` written as `%25`, `%2E`, `%23` and `%24`, so\n * a part is never read as two, and no part is taken for the trigger's key or a node's kind, which `#` starts.\n */\nexport const keyPart = (part: string) => part.replaceAll('%', '%25').replaceAll('.', '%2E').replace(/^#/, '%23').replace(/^\\$/, '%24')\n\n// A node's part of a key: a state's name, which is unique across the workflow, or the trigger's key\nconst nameOf = (id: string) => (id === triggerId ? triggerLayoutKey : keyPart(splitPath(id).name))\n\n// Where a value is in what a node gives, a status by its pin's own `#status`\nconst pathPart = (path: readonly string[]) => path.map((field) => (field === statusKey ? statusKey : keyPart(field)))\n\n/**\n * The key a node's position is kept under: a state's name; the trigger's key; a Break's the value it takes apart, such\n * as `Save.record`, or `Save.#break` for the whole of what a step gives; a Make's the argument it builds, such as\n * `Save.#make.data`; a Select's the argument it chooses, such as `Notify.#select.to`; and a condition node's its place among its step's Condition's nodes, such as `Tell.#when` for the\n * one wired to Only when and `Tell.#when.1` for the one at its second side. Every key but the trigger's starts with its\n * state's name, so a save drops those of a state removed.\n */\nexport const layoutKey = (id: string, pure?: PureNode) => {\n if (pure?.kind === 'break') return [nameOf(pure.source), ...(pure.path.length === 0 ? ['#break'] : pathPart(pure.path))].join('.')\n if (pure?.kind === 'make') return [nameOf(pure.target), '#make', keyPart(pure.key)].join('.')\n if (pure?.kind === 'select') return [nameOf(pure.target), '#select', keyPart(pure.key)].join('.')\n if (pure?.kind === 'condition') return [nameOf(pure.target), '#when', ...pure.at.map(String)].join('.')\n return nameOf(id)\n}\n\n/** The layout without a node's position, which ELK then lays out again. */\nexport const withoutKey = (layout: ManualLayout, key: string): ManualLayout => Object.fromEntries(Object.entries(layout).filter(([other]) => other !== key))\n\n// As ELK spaces nodes, and pads a Map or Block on its right and below\nconst spacing = 32\nconst padding = { right: 24, bottom: 24 }\n\nconst overlaps = (a: Box, b: Box) => a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height\n\n/**\n * The boxes ELK laid out, with the nodes moved by hand at their places: within each Map or Block, and on the canvas, a\n * node ELK laid out over one that was moved, or over a Map grown around it, goes down below it, and a Map or Block grows\n * around what was moved inside it. Without a node moved, ELK's boxes as they are.\n */\nexport const placedBoxes = (laidOut: ReadonlyMap<string, Box>, moved: ReadonlyMap<string, Point>, parentOf: (id: string) => string | undefined): ReadonlyMap<string, Box> => {\n if (![...moved.keys()].some((id) => laidOut.has(id))) return laidOut\n const boxes = new Map([...laidOut].map(([id, box]) => [id, { ...box, ...moved.get(id) }]))\n const children = new Map<string | undefined, string[]>()\n for (const id of boxes.keys()) children.set(parentOf(id), [...(children.get(parentOf(id)) ?? []), id])\n const depth = (parent: string | undefined): number => (parent === undefined ? 0 : depth(parentOf(parent)) + 1)\n const grown = new Set<string>()\n // The innermost first, so a Map grown inside another is placed at its new size\n for (const parent of [...children.keys()].sort((a, b) => depth(b) - depth(a))) {\n const ids = children.get(parent)!\n if (ids.some((id) => moved.has(id) || grown.has(id))) {\n const placed = ids.filter((id) => moved.has(id)).map((id) => boxes.get(id)!)\n const others = ids.filter((id) => !moved.has(id)).map((id) => boxes.get(id)!).sort((a, b) => a.y - b.y || a.x - b.x)\n for (const box of others) {\n let under = placed.find((other) => overlaps(box, other))\n while (under) {\n box.y = under.y + under.height + spacing\n under = placed.find((other) => overlaps(box, other))\n }\n placed.push(box)\n }\n }\n const group = parent === undefined ? undefined : boxes.get(parent)\n if (!group) continue\n const width = Math.max(group.width, ...ids.map((id) => boxes.get(id)!).map((box) => box.x + box.width + padding.right))\n const height = Math.max(group.height, ...ids.map((id) => boxes.get(id)!).map((box) => box.y + box.height + padding.bottom))\n if (width === group.width && height === group.height) continue\n Object.assign(group, { width, height })\n grown.add(parent!)\n }\n return boxes\n}\n","import { useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useEffect, useRef } from 'react'\nimport type { WorkflowRunTrace, WorkflowTraceStep } from '@protobase/client'\nimport { useClient } from '../../../data/api-provider'\nimport { keys } from '../../../data/query-keys'\nimport type { StepRow } from './step-card'\n\n/** How often the page reads a run that goes on again. */\nexport const followMs = 1000\n\n/** A step of the trace as the run's page shows it, keyed by its scope and number, which name it within the run. */\nexport const stepRow = (step: WorkflowTraceStep): StepRow => ({\n ...step,\n id: `${step.scope}#${step.seq}`,\n resume_at: step.resumeAt ?? null,\n started_at: step.startedAt,\n finished_at: step.finishedAt,\n duration_ms: Date.parse(step.finishedAt) - Date.parse(step.startedAt),\n})\n\n/** The steps the page has, as rows, and the trace's revision of them, which the next read after them sends back. */\nexport type FollowedSteps = { rows: StepRow[]; revision: string }\n\n/** The steps the page has, with those a read after them gave from the step it starts at. */\nexport const followedSteps = (have: readonly StepRow[], { from, steps, revision }: WorkflowRunTrace): FollowedSteps => ({ rows: [...have.slice(0, from), ...steps.map(stepRow)], revision })\n\n/**\n * The steps of a run's trace in the order they ran, read again every second while `following`, each time only those\n * after the steps the page has while they are still the trace's first, and once more when it stops, since the run is marked ended only once its whole trace\n * is kept. Without a run nothing is read.\n */\nexport const useRunSteps = (runId: string | undefined, following: boolean) => {\n const client = useClient()\n const queryClient = useQueryClient()\n const queryKey = keys.workflowRunTrace(runId ?? '')\n const steps = useQuery({\n queryKey,\n queryFn: async () => {\n const have = queryClient.getQueryData<FollowedSteps>(queryKey)\n return followedSteps(have?.rows ?? [], await client.workflowRunTrace(runId!, have && { after: have.rows.length, revision: have.revision }))\n },\n select: (data) => data.rows,\n enabled: runId !== undefined,\n refetchInterval: following ? followMs : false,\n })\n const was = useRef(following)\n const { refetch } = steps\n useEffect(() => {\n const stopped = was.current && !following\n was.current = following\n if (stopped && runId !== undefined) void refetch()\n }, [following, runId, refetch])\n return steps\n}\n","import { useQueryClient } from '@tanstack/react-query'\nimport { useContext, useEffect, useRef } from 'react'\nimport { FocusRefreshContext } from '../../../data/focus-refresh'\nimport { liveRefresh } from '../../../data/live-refresh'\nimport { customStepTestDefinition, type Definition } from '@protobase/workflows'\nimport { useRecord } from '../../../data/use-record'\nimport { pathOfName, recordDefinition, stateAt } from '../workflow/definition'\nimport type { TraceStep } from './run-trace'\nimport { followMs, useRunSteps } from './use-run-steps'\n\nconst goingOn = new Set(['queued', 'running', 'waiting'])\n\n/**\n * While `following`, reads again every second all the page shows of runs, as a live update would: the run's status and\n * fields; its trace follows on its own.\n */\nconst useFollow = (following: boolean) => {\n const queryClient = useQueryClient()\n useEffect(() => {\n if (!following) return\n // No form edits a run, so a draft of its workflow on the same page holds nothing back\n const refresh = liveRefresh(queryClient, () => false)\n const timer = setInterval(() => refresh.changed(['workflow_runs']), followMs)\n return () => {\n clearInterval(timer)\n refresh.stop()\n }\n }, [following, queryClient])\n}\n\n/**\n * Once a run followed here ends, reads its workflow again, whose status the run changed, as a live update would: the\n * workflow's page and the sidebar's list of workflows follow without a reload.\n */\nconst useEndRefresh = (going: boolean) => {\n const queryClient = useQueryClient()\n const focusRefresh = useContext(FocusRefreshContext)\n const was = useRef(going)\n useEffect(() => {\n const ended = was.current && !going\n was.current = going\n if (ended) liveRefresh(queryClient, () => focusRefresh?.paused() ?? false).changed(['workflows'])\n }, [going, queryClient, focusRefresh])\n}\n\n// Where a run's steps are on its version's graph: a block's run's inside its Block, from that Block's first state.\nconst placeOf = (definition: Definition | undefined, block: unknown) => {\n if (!definition) return\n const within = typeof block === 'string' ? pathOfName(definition.stateMachine, block) : undefined\n const state = within && stateAt(definition, within.join('/'))\n if (within && state?.Type === 'Block') return { within, startAt: state.Processor.StartAt }\n return { within: [], startAt: definition.stateMachine.StartAt }\n}\n\n/**\n * A run with what its trace draws: the run as stored, the definition of the version it runs, or of a custom step's test\n * run its one Task, where its steps are on that graph, and the steps of its trace in the order they ran, followed while the run goes on. Without a run nothing is read.\n */\nexport const useRunTrace = (runId: string | undefined) => {\n const run = useRecord('workflow_runs', runId ?? '', runId !== undefined)\n const record = run.data?.record\n const versioned = record?.workflow_id != null && record.version != null\n const version = useRecord('workflow_versions', [String(record?.workflow_id ?? ''), Number(record?.version ?? 0)], versioned)\n const going = goingOn.has(String(record?.status))\n // A custom step's test run has no workflow: its one Task is the step version it tested\n const definition = typeof record?.test_step === 'string' ? customStepTestDefinition(record.test_step) : version.data ? recordDefinition(version.data.record) : undefined\n const steps = useRunSteps(runId, going)\n useFollow(going)\n useEndRefresh(going)\n return {\n id: runId,\n run: record,\n stored: run.data,\n definition,\n place: placeOf(definition, record?.block_state),\n steps: (steps.data ?? []) satisfies TraceStep[],\n going,\n error: run.error ?? version.error ?? steps.error,\n }\n}\n\nexport type RunTraceData = ReturnType<typeof useRunTrace>\n"],"mappings":"4xBASA,IAAa2B,OAAqC,CAAE,QAAS,CAAE,OAAQ,CAAC,CAAE,EAAG,aAAc,CAAE,cAAe,UAAW,QAAS,GAAI,OAAQ,CAAC,CAAE,CAAE,GAGpIC,EAAgB,GAA+B,CAC1D,GAAI,OAAOC,GAAU,WAAYA,GAAkB,MAAM,QAAQA,CAAK,EAAG,OAAOF,EAAgB,EAChG,IAAMG,EAAQD,EACRE,EAAUD,EAAM,aAChBE,EAAS,OAAOD,GAAS,QAAW,UAAYA,EAAQ,SAAW,MAAQ,CAAC,MAAM,QAAQA,EAAQ,MAAM,EAAIA,EAAQ,OAAS,CAAC,EAE9HE,EAAQH,EAAM,QAAU,OAAS,CAAC,EAAI,CAA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GAA8B,CACxD,IAAMC,EAAMhJ,EAAU,gBAAiB8H,GAAS,GAAIA,IAAU,IAAA,EAAS,EACjEpG,EAASsH,EAAI,MAAM,OACnBC,EAAYvH,GAAQ,aAAe,MAAQA,EAAO,SAAW,KAC7DwH,EAAUlJ,EAAU,oBAAqB,CAAC,OAAO0B,GAAQ,aAAe,EAAE,EAAG,OAAOA,GAAQ,SAAW,CAAC,CAAC,EAAGuH,CAAS,EACrHP,EAAQN,GAAQ,IAAI,OAAO1G,GAAQ,MAAM,CAAC,EAE1CI,EAAa,OAAOJ,GAAQ,WAAc,SAAWX,GAAyBW,EAAO,SAAS,EAAIwH,EAAQ,KAAOzH,EAAiByH,EAAQ,KAAK,MAAM,EAAI,IAAA,GACzJzB,EAAQC,EAAYI,EAAOY,CAAK,EAGtC,OAFAL,GAAUK,CAAK,EACfF,GAAcE,CAAK,EACZ,CACL,GAAIZ,EACJ,IAAKpG,EACL,OAAQsH,EAAI,KACZ,aACA,MAAOJ,GAAQ9G,EAAYJ,GAAQ,WAAW,EAC9C,MAAQ+F,EAAM,MAAQ,CAAC,EACvB,QACA,MAAOuB,EAAI,OAASE,EAAQ,OAASzB,EAAM,KAC7C,CACF","debugId":"8febb252-c2ea-4db1-86e6-56d4aa7abaec"}
1
+ {"version":3,"file":"use-run-trace-5H4UJvB-.js","names":["isObject","useRef","useContext","useRef","n","a","t","__toESM","require_react","useRecord","liveRefresh","FocusRefreshContext","useClient","keys","useQueryClient","useQuery","resultSchema","schemaAt","innerMachine","pinType","expressionSource","inputSchema","triggerSchema","orderOf","customStepTestDefinition","stepStatusSchema","parseReference","emptyDefinition","definitionOf","value","given","machine","States","start","recordDefinition","record","definitionRecord","_","withoutStart","definition","pathNames","path","pathOf","scope","name","splitPath","names","machineAt","stateAt","allNames","state","inner","pathOfName","other","found","holdsSteps","isObject$1","propertiesOf","schema","branches","own","entry","merged","field","branch","known","fields","fieldsOf","inputState","argumentsOf","inputPin","options","option","inputPins","schemas","required","args","key","outputsOf","stepOutputs","triggerOutputs","statusKey","conditionKey","statusPin","conditionPin","givenSchema","triggerLayoutKey","isObject","isPoint","pointsOf","point","workflowLayoutOf","views","keyPart","part","nameOf","id","pathPart","layoutKey","pure","withoutKey","layout","spacing","padding","overlaps","b","placedBoxes","moved","laidOut","boxes","box","children","parentOf","depth","parent","grown","ids","placed","others","under","group","width","height","import_react","followMs","stepRow","step","followedSteps","have","from","steps","useRunSteps","client","queryClient","queryKey","runId","data","following","was","stopped","refetch","goingOn","useFollow","refresh","timer","useEndRefresh","focusRefresh","going","ended","placeOf","within","block","useRunTrace","run","versioned","version"],"sources":["../../../src/app/field-types/workflow/definition.ts","../../../src/app/field-types/workflow/pins/node-pins.ts","../../../src/app/field-types/workflow/manual-layout.ts","../../../src/app/field-types/workflow-run/use-run-steps.ts","../../../src/app/field-types/workflow-run/use-run-trace.ts"],"sourcesContent":["import { innerMachine, orderOf, type Definition, type Machine, type State } from '@protobase/workflows'\n\n/** A state's path: its name, after the names of the Maps and Blocks it is inside, joined by `/` as the definition check names it. */\nexport type StatePath = string\n\n/** The node of the workflow's trigger, which leads to the first state; no state path is empty. */\nexport const triggerId = ''\n\n/** What a workflow without a definition starts from: run by hand, and no state yet. */\nexport const emptyDefinition = (): Definition => ({ trigger: { manual: {} }, stateMachine: { QueryLanguage: 'JSONata', StartAt: '', States: {} } })\n\n/** The value as a definition to draw and edit: a workflow without one starts empty. */\nexport const definitionOf = (value: unknown): Definition => {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) return emptyDefinition()\n const given = value as Partial<Definition>\n const machine = given.stateMachine\n const States = typeof machine?.States === 'object' && machine.States !== null && !Array.isArray(machine.States) ? machine.States : {}\n // In data order a machine has no start, as it is saved\n const start = given.order === 'data' ? {} : { StartAt: machine?.StartAt ?? '' }\n return { ...given, trigger: given.trigger ?? { manual: {} }, stateMachine: { ...machine, QueryLanguage: 'JSONata', ...start, States } } as Definition\n}\n\n/**\n * A workflow's or a version's record as the definition to draw and edit, from the fields it keeps it in: its state\n * machine, trigger, execution order, connections and trace. One in data order is drawn with an empty `StartAt`, which\n * it is saved without.\n */\nexport const recordDefinition = (record: Record<string, unknown>): Definition =>\n definitionOf({\n trigger: record.trigger,\n order: record.execution_order ?? 'sequence',\n stateMachine: record.state_machine,\n ...(record.connections ? { connections: record.connections } : {}),\n ...(record.trace ? { trace: record.trace } : {}),\n })\n\n/** The fields a definition is saved in, as `recordDefinition` reads them: a state machine in data order has no `StartAt`. */\nexport const definitionRecord = (definition: Definition) => {\n const { StartAt: _, ...withoutStart } = definition.stateMachine\n return {\n state_machine: orderOf(definition) === 'data' ? withoutStart : definition.stateMachine,\n trigger: definition.trigger,\n execution_order: orderOf(definition),\n connections: definition.connections ?? null,\n trace: definition.trace ?? null,\n }\n}\n\n/** The names of a path, outermost first. */\nexport const pathNames = (path: StatePath) => path.split('/')\n\n/** The path of a state named `name` in the machine at `scope`, the path of a Map or Block or [] for the whole workflow. */\nexport const pathOf = (scope: readonly string[], name: string): StatePath => [...scope, name].join('/')\n\n/** The Maps and Blocks a path is inside, outermost first, and its own name. */\nexport const splitPath = (path: StatePath) => {\n const names = pathNames(path)\n return { scope: names.slice(0, -1), name: names.at(-1)! }\n}\n\n/** The machine at `scope`: the whole workflow's for [], else the steps of the Map or Block at that path. */\nexport const machineAt = (definition: Definition, scope: readonly string[]): Machine | undefined => {\n let machine: Machine | undefined = definition.stateMachine\n for (const name of scope) machine = innerMachine(machine?.States[name])\n return machine\n}\n\n/** The state at a path, when there is one. */\nexport const stateAt = (definition: Definition, path: StatePath): State | undefined => {\n const { scope, name } = splitPath(path)\n return machineAt(definition, scope)?.States[name]\n}\n\n/** Every state name, the ones inside Maps and Blocks too, which are unique across the whole definition. */\nexport const allNames = (machine: Machine): string[] =>\n Object.entries(machine.States).flatMap(([name, state]) => {\n const inner = innerMachine(state)\n return [name, ...(inner?.States ? allNames(inner) : [])]\n })\n\n/** The path of the state named `name`, wherever it is in the definition: names are unique across it. */\nexport const pathOfName = (machine: Machine, name: string, scope: readonly string[] = []): string[] | undefined => {\n if (Object.hasOwn(machine.States, name)) return [...scope, name]\n for (const [other, state] of Object.entries(machine.States)) {\n const inner = innerMachine(state)\n const found = inner?.States && pathOfName(inner, name, [...scope, other])\n if (found) return found\n }\n return\n}\n\n/** Whether a state holds steps of its own, drawn inside it: a Map's or a Block's. */\nexport const holdsSteps = (state: State | undefined) => state?.Type === 'Map' || state?.Type === 'Block'\n","import { expressionSource, inputSchema, parseReference, pinType, resultSchema, schemaAt, stepStatusSchema, triggerSchema, type Definition, type PinSchemas, type PinType, type State } from '@protobase/workflows'\n\ntype JsonSchema = Record<string, unknown>\n\n/**\n * What an input holds: nothing; a value of its own; an expression that computes; one read by name, drawn as a wire;\n * or an object whose fields read values, drawn as a Make node.\n */\nexport type InputState = 'empty' | 'literal' | 'expression' | 'wired' | 'made'\n\n/**\n * A pin on the left of a step: an argument of its type, with its type, whether the type needs it, and what it holds;\n * `statuses`: its options are what a step's status can be, shown by their names.\n */\nexport type InputPin = { key: string; type: PinType; required: boolean; value: unknown; state: InputState; options?: readonly string[]; statuses?: true }\n\n/** A pin on the right of a node: the value at `path` in what it gives, with its type. */\nexport type OutputPin = { path: string[]; type: PinType }\n\nconst isObject = (value: unknown): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n\n// The fields of an object a schema describes, or of the branches of its anyOf or oneOf, each name once: a field that\n// several branches declare takes any of their schemas.\nconst propertiesOf = (schema: JsonSchema | undefined): [string, JsonSchema][] => {\n if (!schema) return []\n const branches = [schema.anyOf, schema.oneOf].find(Array.isArray) as unknown[] | undefined\n const own = isObject(schema.properties) ? Object.entries(schema.properties).filter((entry): entry is [string, JsonSchema] => isObject(entry[1])) : []\n if (!branches) return own\n // The schema's own fields first, then each the branches add\n const merged = new Map<string, JsonSchema[]>(own.map(([name, field]) => [name, [field]]))\n for (const [name, field] of branches.filter(isObject).flatMap((branch) => propertiesOf(branch as JsonSchema))) if (!own.some(([known]) => known === name)) merged.set(name, [...(merged.get(name) ?? []), field])\n return [...merged].map(([name, fields]) => [name, fields.length === 1 ? fields[0]! : { anyOf: fields }])\n}\n\n/** The fields of an object a schema describes, each with its schema; none when it names none. */\nexport const fieldsOf = (schema: JsonSchema | undefined) => propertiesOf(schema)\n\n/** What an input's value is, as its pin shows it. */\nexport const inputState = (value: unknown): InputState => {\n if (value === undefined || value === '') return 'empty'\n if (parseReference(value)) return 'wired'\n if (expressionSource(value) !== undefined) return 'expression'\n // An object whose fields read values, by name alone or in an expression, is built by a Make node\n if (isObject(value) && Object.values(value).some((field) => expressionSource(field) !== undefined)) return 'made'\n return 'literal'\n}\n\nconst argumentsOf = (state: State): Record<string, unknown> => ('Arguments' in state && isObject(state.Arguments) ? state.Arguments : {})\n\n/** An input pin for the value at `key`, typed by its schema, with the choices an enum offers. */\nexport const inputPin = (key: string, schema: JsonSchema, value: unknown, required: boolean): InputPin => {\n const options = Array.isArray(schema.enum) && schema.enum.every((option) => typeof option === 'string') ? (schema.enum as string[]) : undefined\n return { key, type: pinType(schema), required, value, state: inputState(value), ...(options && { options }) }\n}\n\n/** A step's input pins: one per argument its type takes, in the order its schema declares them. */\nexport const inputPins = (state: State, schemas: PinSchemas): InputPin[] => {\n const schema = inputSchema(state, schemas)\n if (!schema) return []\n const required = Array.isArray(schema.required) ? (schema.required as string[]) : []\n const args = argumentsOf(state)\n return fieldsOf(schema).map(([key, field]) => inputPin(key, field, args[key], required.includes(key)))\n}\n\n// The pins of what a node gives: one per value it returns, as the fields of an untitled object, as a Blueprint's\n// function gives each output its own pin; one for the whole of a titled object, such as a record, which a Break takes apart.\nconst outputsOf = (schema: JsonSchema | undefined): OutputPin[] => {\n const fields = typeof schema?.title === 'string' ? [] : fieldsOf(schema)\n if (fields.length === 0) return [{ path: [], type: pinType(schema) }]\n return fields.map(([key, field]) => ({ path: [key], type: pinType(field) }))\n}\n\n/** What a step gives later steps by name: a Task's result by its type, a Map's or a Block's whole; nothing for the others. */\nexport const stepOutputs = (state: State, schemas: PinSchemas): OutputPin[] => {\n if (state.Type === 'Task') return outputsOf(resultSchema(state, schemas))\n if (state.Type === 'Map') return [{ path: [], type: pinType({ type: 'array' }) }]\n if (state.Type === 'Block') return [{ path: [], type: pinType(undefined) }]\n return []\n}\n\n/** What the trigger gives as the run's input: its fields by its type, or the whole input of a manual workflow. */\nexport const triggerOutputs = (definition: Definition, schemas: PinSchemas): OutputPin[] => outputsOf(triggerSchema(definition, schemas))\n\n/** In data order, the pin a state's status comes out of, and the one its Condition takes, which other values' pins never are. */\nexport const statusKey = '#status'\nexport const conditionKey = '#condition'\n\n/** A state's status pin, in data order: `$states.context.Steps.<name>`. */\nexport const statusPin: OutputPin = { path: [statusKey], type: pinType(stepStatusSchema) }\n\n/** A state's Only when pin, in data order: its Condition, true or false. */\nexport const conditionPin = (state: State): InputPin => ({ key: conditionKey, type: { kinds: ['boolean'] }, required: false, value: state.Condition, state: inputState(state.Condition) })\n\n/** The schema of the value at `path` of what a node gives, for its Break nodes: a Task's result, the run's input, or a state's status. */\nexport const givenSchema = (definition: Definition, state: State | undefined, schemas: PinSchemas, path: readonly string[]) => {\n if (path[0] === statusKey) return schemaAt(stepStatusSchema, path.slice(1))\n return schemaAt(state ? resultSchema(state, schemas) : triggerSchema(definition, schemas), path)\n}\n","import { splitPath, triggerId } from './definition'\nimport type { Box } from './graph-layout'\nimport type { PureNode } from './pins/data-graph'\nimport type { GraphView } from './pins/graph-view'\nimport { statusKey } from './pins/node-pins'\n\n/** Where a node's top left corner is, within the Map or Block it is inside or else the canvas. */\nexport type Point = { x: number; y: number }\n\n/** Where nodes were moved by hand in one view of the graph, by their layout keys: ELK lays out every node it does not name. */\nexport type ManualLayout = Readonly<Record<string, Point>>\n\n/**\n * A workflow's `layout` field, kept for everyone who edits it: the nodes moved by hand in each view of the graph, Pins\n * and Simple, each view's its own, so moving a node in one leaves it where it is in the other.\n */\nexport type WorkflowLayout = Readonly<Record<GraphView, ManualLayout>>\n\n/** The views a layout keeps, as its field holds them. */\nexport const layoutViews: readonly GraphView[] = ['pins', 'simple']\n\n/** The key of the trigger's node, and before the fields of the run's input that Break nodes take apart; no state's name. */\nexport const triggerLayoutKey = '$trigger'\n\nconst isObject = (value: unknown): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n\nconst isPoint = (value: unknown): value is Point => isObject(value) && Number.isFinite(value.x) && Number.isFinite(value.y)\n\nconst pointsOf = (value: unknown): ManualLayout => (isObject(value) ? Object.fromEntries(Object.entries(value).flatMap(([key, point]) => (isPoint(point) ? [[key, { x: point.x, y: point.y }]] : []))) : {})\n\n/**\n * The layout a workflow's field holds, as its value or the JSON text a draft keeps it as: in each view, each position\n * with a finite `x` and `y`, read as those two alone, and nothing of what else it holds.\n */\nexport const workflowLayoutOf = (value: unknown): WorkflowLayout => {\n let given = value\n if (typeof value === 'string') {\n try {\n given = JSON.parse(value)\n } catch {\n given = undefined\n }\n }\n const views = isObject(given) ? given : {}\n return { pins: pointsOf(views.pins), simple: pointsOf(views.simple) }\n}\n\n/**\n * A name or a field as a part of a key: `%`, `.` and a leading `#` or `$` written as `%25`, `%2E`, `%23` and `%24`, so\n * a part is never read as two, and no part is taken for the trigger's key or a node's kind, which `#` starts.\n */\nexport const keyPart = (part: string) => part.replaceAll('%', '%25').replaceAll('.', '%2E').replace(/^#/, '%23').replace(/^\\$/, '%24')\n\n// A node's part of a key: a state's name, which is unique across the workflow, or the trigger's key\nconst nameOf = (id: string) => (id === triggerId ? triggerLayoutKey : keyPart(splitPath(id).name))\n\n// Where a value is in what a node gives, a status by its pin's own `#status`\nconst pathPart = (path: readonly string[]) => path.map((field) => (field === statusKey ? statusKey : keyPart(field)))\n\n/**\n * The key a node's position is kept under: a state's name; the trigger's key; a Break's the value it takes apart, such\n * as `Save.record`, or `Save.#break` for the whole of what a step gives; a Make's the argument it builds, such as\n * `Save.#make.data`; a Select's the argument it chooses, such as `Notify.#select.to`; and a condition node's its place among its step's Condition's nodes, such as `Tell.#when` for the\n * one wired to Only when and `Tell.#when.1` for the one at its second side. Every key but the trigger's starts with its\n * state's name, so a save drops those of a state removed.\n */\nexport const layoutKey = (id: string, pure?: PureNode) => {\n if (pure?.kind === 'break') return [nameOf(pure.source), ...(pure.path.length === 0 ? ['#break'] : pathPart(pure.path))].join('.')\n if (pure?.kind === 'make') return [nameOf(pure.target), '#make', keyPart(pure.key)].join('.')\n if (pure?.kind === 'select') return [nameOf(pure.target), '#select', keyPart(pure.key)].join('.')\n if (pure?.kind === 'condition') return [nameOf(pure.target), '#when', ...pure.at.map(String)].join('.')\n return nameOf(id)\n}\n\n/** The layout without a node's position, which ELK then lays out again. */\nexport const withoutKey = (layout: ManualLayout, key: string): ManualLayout => Object.fromEntries(Object.entries(layout).filter(([other]) => other !== key))\n\n// As ELK spaces nodes, and pads a Map or Block on its right and below\nconst spacing = 32\nconst padding = { right: 24, bottom: 24 }\n\nconst overlaps = (a: Box, b: Box) => a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height\n\n/**\n * The boxes ELK laid out, with the nodes moved by hand at their places: within each Map or Block, and on the canvas, a\n * node ELK laid out over one that was moved, or over a Map grown around it, goes down below it, and a Map or Block grows\n * around what was moved inside it. Without a node moved, ELK's boxes as they are.\n */\nexport const placedBoxes = (laidOut: ReadonlyMap<string, Box>, moved: ReadonlyMap<string, Point>, parentOf: (id: string) => string | undefined): ReadonlyMap<string, Box> => {\n if (![...moved.keys()].some((id) => laidOut.has(id))) return laidOut\n const boxes = new Map([...laidOut].map(([id, box]) => [id, { ...box, ...moved.get(id) }]))\n const children = new Map<string | undefined, string[]>()\n for (const id of boxes.keys()) children.set(parentOf(id), [...(children.get(parentOf(id)) ?? []), id])\n const depth = (parent: string | undefined): number => (parent === undefined ? 0 : depth(parentOf(parent)) + 1)\n const grown = new Set<string>()\n // The innermost first, so a Map grown inside another is placed at its new size\n for (const parent of [...children.keys()].sort((a, b) => depth(b) - depth(a))) {\n const ids = children.get(parent)!\n if (ids.some((id) => moved.has(id) || grown.has(id))) {\n const placed = ids.filter((id) => moved.has(id)).map((id) => boxes.get(id)!)\n const others = ids.filter((id) => !moved.has(id)).map((id) => boxes.get(id)!).sort((a, b) => a.y - b.y || a.x - b.x)\n for (const box of others) {\n let under = placed.find((other) => overlaps(box, other))\n while (under) {\n box.y = under.y + under.height + spacing\n under = placed.find((other) => overlaps(box, other))\n }\n placed.push(box)\n }\n }\n const group = parent === undefined ? undefined : boxes.get(parent)\n if (!group) continue\n const width = Math.max(group.width, ...ids.map((id) => boxes.get(id)!).map((box) => box.x + box.width + padding.right))\n const height = Math.max(group.height, ...ids.map((id) => boxes.get(id)!).map((box) => box.y + box.height + padding.bottom))\n if (width === group.width && height === group.height) continue\n Object.assign(group, { width, height })\n grown.add(parent!)\n }\n return boxes\n}\n","import { useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useEffect, useRef } from 'react'\nimport type { WorkflowRunTrace, WorkflowTraceStep } from '@protobase/client'\nimport { useClient } from '../../../data/api-provider'\nimport { keys } from '../../../data/query-keys'\nimport type { StepRow } from './step-card'\n\n/** How often the page reads a run that goes on again. */\nexport const followMs = 1000\n\n/** A step of the trace as the run's page shows it, keyed by its scope and number, which name it within the run. */\nexport const stepRow = (step: WorkflowTraceStep): StepRow => ({\n ...step,\n id: `${step.scope}#${step.seq}`,\n resume_at: step.resumeAt ?? null,\n started_at: step.startedAt,\n finished_at: step.finishedAt,\n duration_ms: Date.parse(step.finishedAt) - Date.parse(step.startedAt),\n})\n\n/** The steps the page has, as rows, and the trace's revision of them, which the next read after them sends back. */\nexport type FollowedSteps = { rows: StepRow[]; revision: string }\n\n/** The steps the page has, with those a read after them gave from the step it starts at. */\nexport const followedSteps = (have: readonly StepRow[], { from, steps, revision }: WorkflowRunTrace): FollowedSteps => ({ rows: [...have.slice(0, from), ...steps.map(stepRow)], revision })\n\n/**\n * The steps of a run's trace in the order they ran, read again every second while `following`, each time only those\n * after the steps the page has while they are still the trace's first, and once more when it stops, since the run is marked ended only once its whole trace\n * is kept. Without a run nothing is read.\n */\nexport const useRunSteps = (runId: string | undefined, following: boolean) => {\n const client = useClient()\n const queryClient = useQueryClient()\n const queryKey = keys.workflowRunTrace(runId ?? '')\n const steps = useQuery({\n queryKey,\n queryFn: async () => {\n const have = queryClient.getQueryData<FollowedSteps>(queryKey)\n return followedSteps(have?.rows ?? [], await client.workflowRunTrace(runId!, have && { after: have.rows.length, revision: have.revision }))\n },\n select: (data) => data.rows,\n enabled: runId !== undefined,\n refetchInterval: following ? followMs : false,\n })\n const was = useRef(following)\n const { refetch } = steps\n useEffect(() => {\n const stopped = was.current && !following\n was.current = following\n if (stopped && runId !== undefined) void refetch()\n }, [following, runId, refetch])\n return steps\n}\n","import { useQueryClient } from '@tanstack/react-query'\nimport { useContext, useEffect, useRef } from 'react'\nimport { FocusRefreshContext } from '../../../data/focus-refresh'\nimport { liveRefresh } from '../../../data/live-refresh'\nimport { customStepTestDefinition, type Definition } from '@protobase/workflows'\nimport { useRecord } from '../../../data/use-record'\nimport { pathOfName, recordDefinition, stateAt } from '../workflow/definition'\nimport type { TraceStep } from './run-trace'\nimport { followMs, useRunSteps } from './use-run-steps'\n\nconst goingOn = new Set(['queued', 'running', 'waiting'])\n\n/**\n * While `following`, reads again every second all the page shows of runs, as a live update would: the run's status and\n * fields; its trace follows on its own.\n */\nconst useFollow = (following: boolean) => {\n const queryClient = useQueryClient()\n useEffect(() => {\n if (!following) return\n // No form edits a run, so a draft of its workflow on the same page holds nothing back\n const refresh = liveRefresh(queryClient, () => false)\n const timer = setInterval(() => refresh.changed(['workflow_runs']), followMs)\n return () => {\n clearInterval(timer)\n refresh.stop()\n }\n }, [following, queryClient])\n}\n\n/**\n * Once a run followed here ends, reads its workflow again, whose status the run changed, as a live update would: the\n * workflow's page and the sidebar's list of workflows follow without a reload.\n */\nconst useEndRefresh = (going: boolean) => {\n const queryClient = useQueryClient()\n const focusRefresh = useContext(FocusRefreshContext)\n const was = useRef(going)\n useEffect(() => {\n const ended = was.current && !going\n was.current = going\n if (ended) liveRefresh(queryClient, () => focusRefresh?.paused() ?? false).changed(['workflows'])\n }, [going, queryClient, focusRefresh])\n}\n\n// Where a run's steps are on its version's graph: a block's run's inside its Block, from that Block's first state.\nconst placeOf = (definition: Definition | undefined, block: unknown) => {\n if (!definition) return\n const within = typeof block === 'string' ? pathOfName(definition.stateMachine, block) : undefined\n const state = within && stateAt(definition, within.join('/'))\n if (within && state?.Type === 'Block') return { within, startAt: state.Processor.StartAt }\n return { within: [], startAt: definition.stateMachine.StartAt }\n}\n\n/**\n * A run with what its trace draws: the run as stored, the definition of the version it runs, or of a custom step's test\n * run its one Task, where its steps are on that graph, and the steps of its trace in the order they ran, followed while the run goes on. Without a run nothing is read.\n */\nexport const useRunTrace = (runId: string | undefined) => {\n const run = useRecord('workflow_runs', runId ?? '', runId !== undefined)\n const record = run.data?.record\n const versioned = record?.workflow_id != null && record.version != null\n const version = useRecord('workflow_versions', [String(record?.workflow_id ?? ''), Number(record?.version ?? 0)], versioned)\n const going = goingOn.has(String(record?.status))\n // A custom step's test run has no workflow: its one Task is the step version it tested\n const definition = typeof record?.test_step === 'string' ? customStepTestDefinition(record.test_step) : version.data ? recordDefinition(version.data.record) : undefined\n const steps = useRunSteps(runId, going)\n useFollow(going)\n useEndRefresh(going)\n return {\n id: runId,\n run: record,\n stored: run.data,\n definition,\n place: placeOf(definition, record?.block_state),\n steps: (steps.data ?? []) satisfies TraceStep[],\n going,\n error: run.error ?? version.error ?? steps.error,\n }\n}\n\nexport type RunTraceData = ReturnType<typeof useRunTrace>\n"],"mappings":"4xBASA,IAAa2B,OAAqC,CAAE,QAAS,CAAE,OAAQ,CAAC,CAAE,EAAG,aAAc,CAAE,cAAe,UAAW,QAAS,GAAI,OAAQ,CAAC,CAAE,CAAE,GAGpIC,EAAgB,GAA+B,CAC1D,GAAI,OAAOC,GAAU,WAAYA,GAAkB,MAAM,QAAQA,CAAK,EAAG,OAAOF,EAAgB,EACh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GAAUtG,EAAQT,EAAY+G,EAAO,KAAK,GAAG,CAAC,EAE5D,OADIA,GAAUpG,GAAO,OAAS,QAAgB,CAAE,SAAQ,QAASA,EAAM,UAAU,OAAQ,EAClF,CAAE,OAAQ,CAAC,EAAG,QAASX,EAAW,aAAa,OAAQ,CAChE,EAMaiH,GAAe,GAA8B,CACxD,IAAMC,EAAMhJ,EAAU,gBAAiB8H,GAAS,GAAIA,IAAU,IAAA,EAAS,EACjEpG,EAASsH,EAAI,MAAM,OACnBC,EAAYvH,GAAQ,aAAe,MAAQA,EAAO,SAAW,KAC7DwH,EAAUlJ,EAAU,oBAAqB,CAAC,OAAO0B,GAAQ,aAAe,EAAE,EAAG,OAAOA,GAAQ,SAAW,CAAC,CAAC,EAAGuH,CAAS,EACrHP,EAAQN,GAAQ,IAAI,OAAO1G,GAAQ,MAAM,CAAC,EAE1CI,EAAa,OAAOJ,GAAQ,WAAc,SAAWX,GAAyBW,EAAO,SAAS,EAAIwH,EAAQ,KAAOzH,EAAiByH,EAAQ,KAAK,MAAM,EAAI,IAAA,GACzJzB,EAAQC,EAAYI,EAAOY,CAAK,EAGtC,OAFAL,GAAUK,CAAK,EACfF,GAAcE,CAAK,EACZ,CACL,GAAIZ,EACJ,IAAKpG,EACL,OAAQsH,EAAI,KACZ,aACA,MAAOJ,GAAQ9G,EAAYJ,GAAQ,WAAW,EAC9C,MAAQ+F,EAAM,MAAQ,CAAC,EACvB,QACA,MAAOuB,EAAI,OAASE,EAAQ,OAASzB,EAAM,KAC7C,CACF","debugId":"391f8509-bc1f-4491-b3d2-237659526df7"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-workflow-page-DyT1T2px.js","names":["n","a","t","useAppAddress","useList","useRecord","useFocusRecord","workflowLayoutOf","useRunTrace","recordDefinition","workflowsResource","workflowViewAddress","workflow","version","run","versionAddress","latest","runAddress","closedRunAddress","numberOf","value","useWorkflowView","focus","address","useWorkflowPage","view","enabled","byWorkflow","versions","runs","trace","shown","past","row"],"sources":["../../../src/app/field-types/workflow-page/workflow-view.ts","../../../src/app/field-types/workflow-page/use-workflow-page.ts"],"sourcesContent":["import type { AppAddress } from '@protobase/schema'\n\n/** The resource of a workflow's record. */\nexport const workflowsResource = 'workflows'\n\n/**\n * What a workflow's page shows on its graph: the workflow, by key, the saved version chosen, the latest when omitted,\n * and the run opened on it, by key.\n */\nexport type WorkflowView = { workflow: string; version?: number; run?: string }\n\n/** The address of a workflow's page showing `view`. */\nexport const workflowViewAddress = ({ workflow, version, run }: WorkflowView): AppAddress => ({\n kind: 'record',\n resource: workflowsResource,\n key: workflow,\n ...(version !== undefined && { version }),\n ...(run && { run }),\n})\n\n/** The page showing `version` with no run, the address leaving out the latest, which the page shows by itself. */\nexport const versionAddress = (workflow: string, version: number, latest: number | undefined) => workflowViewAddress({ workflow, ...(version !== latest && { version }) })\n\n/** The page showing a run: on the latest version, to edit, when it ran on that one; else on the version it ran on, read-only. */\nexport const runAddress = (workflow: string, run: string, version: number, latest: number | undefined) => workflowViewAddress({ workflow, ...(version !== latest && { version }), run })\n\n/** The page with the run shown hidden: the version shown stays, unless it is the latest. */\nexport const closedRunAddress = ({ workflow, version }: WorkflowView, latest: number | undefined) => (version === undefined ? workflowViewAddress({ workflow }) : versionAddress(workflow, version, latest))\n","import { useList } from '../../../data/use-list'\nimport { useRecord } from '../../../data/use-record'\nimport { useFocusRecord } from '../../focus/focus-record'\nimport { useAppAddress } from '../../use-app-address'\nimport { useRunTrace } from '../workflow-run/use-run-trace'\nimport { recordDefinition } from '../workflow/definition'\nimport { workflowLayoutOf } from '../workflow/manual-layout'\nimport { workflowsResource, type WorkflowView } from './workflow-view'\n\n/** The most versions the version selector offers, the latest first: one page of the API. */\nexport const versionLimit = 100\n\n/** The most runs the run selector offers, the latest first, besides the run shown. */\nexport const runLimit = 20\n\nconst numberOf = (value: unknown) => (value === null || value === undefined ? undefined : Number(value))\n\n/** The workflow's page the address shows, as logical values, on a focus page, or none, such as on the create form. */\nexport const useWorkflowView = (): WorkflowView | undefined => {\n const { address } = useAppAddress()\n const focus = useFocusRecord()\n if (!focus || address?.kind !== 'record') return\n return { workflow: focus.key, ...(address.version !== undefined && { version: address.version }), ...(address.run && { run: address.run }) }\n}\n\n/**\n * What a workflow's page draws besides its definition: its latest and enabled version, its versions and latest runs for\n * the pickers, the run shown with its trace, and the version shown when it is not the latest, with its definition and\n * its layout.\n */\nexport const useWorkflowPage = (view: WorkflowView) => {\n const workflow = useRecord(workflowsResource, view.workflow)\n const latest = numberOf(workflow.data?.record.version)\n const enabled = numberOf(workflow.data?.record.enabled_version)\n const byWorkflow = `workflow_id = ${JSON.stringify(view.workflow)}`\n const versions = useList('workflow_versions', { filter: byWorkflow, orderBy: 'version desc', pageSize: versionLimit, fields: ['version', 'saved_at'] })\n // A block's run opens from the Block step that started it, not from the workflow's runs.\n const runs = useList('workflow_runs', { filter: `${byWorkflow} AND isNull(block_of)`, orderBy: 'created_at desc', pageSize: runLimit, fields: ['id', 'status', 'version', 'created_at', 'duration_ms', 'input', 'started_by', 'rerun_of', 'replay', 'error'] })\n const trace = useRunTrace(view.run)\n // A version other than the latest is drawn from its own record\n const shown = view.version\n const past = useRecord('workflow_versions', [view.workflow, shown ?? 0], shown !== undefined)\n return {\n latest,\n enabled,\n versions: versions.items.map((row) => ({ version: Number(row.version), savedAt: String(row.saved_at) })),\n runs: runs.items,\n trace,\n shown,\n pastDefinition: past.data && recordDefinition(past.data.record),\n // As the version looked when it was saved\n pastLayout: past.data && workflowLayoutOf(past.data.record.layout),\n versionsError: versions.error,\n runsError: runs.error,\n pastError: past.error,\n }\n}\n\nexport type WorkflowPage = ReturnType<typeof useWorkflowPage>\n"],"mappings":"mlBAGA,IAAaU,EAAoB,YASpBC,GAAuB,CAAE,WAAU,UAAS,UAAqC,CAC5F,KAAM,SACN,SAAUD,EACV,IAAKE,EACL,GAAIC,IAAY,IAAA,IAAa,CAAE,SAAQ,EACvC,GAAIC,GAAO,CAAE,KAAI,CACnB,GAGaC,GA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EAAO3B,EAAU,oBAAqB,CAACoB,EAAK,SAAUM,GAAS,CAAC,EAAGA,IAAU,IAAA,EAAS,EAC5F,MAAO,CACL,SACA,UACA,SAAUH,EAAS,MAAM,IAAK,IAAS,CAAE,QAAS,OAAOK,EAAI,OAAO,EAAG,QAAS,OAAOA,EAAI,QAAQ,CAAE,EAAE,EACvG,KAAMJ,EAAK,MACX,QACA,QACA,eAAgBG,EAAK,MAAQvB,EAAiBuB,EAAK,KAAK,MAAM,EAE9D,WAAYA,EAAK,MAAQzB,EAAiByB,EAAK,KAAK,OAAO,MAAM,EACjE,cAAeJ,EAAS,MACxB,UAAWC,EAAK,MAChB,UAAWG,EAAK,KAClB,CACF","debugId":"f24f54f6-a717-4410-bce3-6f7c8f795227"}
1
+ {"version":3,"file":"use-workflow-page-dAWuZvWk.js","names":["n","a","t","useAppAddress","useList","useRecord","useFocusRecord","workflowLayoutOf","useRunTrace","recordDefinition","workflowsResource","workflowViewAddress","workflow","version","run","versionAddress","latest","runAddress","closedRunAddress","numberOf","value","useWorkflowView","focus","address","useWorkflowPage","view","enabled","byWorkflow","versions","runs","trace","shown","past","row"],"sources":["../../../src/app/field-types/workflow-page/workflow-view.ts","../../../src/app/field-types/workflow-page/use-workflow-page.ts"],"sourcesContent":["import type { AppAddress } from '@protobase/schema'\n\n/** The resource of a workflow's record. */\nexport const workflowsResource = 'workflows'\n\n/**\n * What a workflow's page shows on its graph: the workflow, by key, the saved version chosen, the latest when omitted,\n * and the run opened on it, by key.\n */\nexport type WorkflowView = { workflow: string; version?: number; run?: string }\n\n/** The address of a workflow's page showing `view`. */\nexport const workflowViewAddress = ({ workflow, version, run }: WorkflowView): AppAddress => ({\n kind: 'record',\n resource: workflowsResource,\n key: workflow,\n ...(version !== undefined && { version }),\n ...(run && { run }),\n})\n\n/** The page showing `version` with no run, the address leaving out the latest, which the page shows by itself. */\nexport const versionAddress = (workflow: string, version: number, latest: number | undefined) => workflowViewAddress({ workflow, ...(version !== latest && { version }) })\n\n/** The page showing a run: on the latest version, to edit, when it ran on that one; else on the version it ran on, read-only. */\nexport const runAddress = (workflow: string, run: string, version: number, latest: number | undefined) => workflowViewAddress({ workflow, ...(version !== latest && { version }), run })\n\n/** The page with the run shown hidden: the version shown stays, unless it is the latest. */\nexport const closedRunAddress = ({ workflow, version }: WorkflowView, latest: number | undefined) => (version === undefined ? workflowViewAddress({ workflow }) : versionAddress(workflow, version, latest))\n","import { useList } from '../../../data/use-list'\nimport { useRecord } from '../../../data/use-record'\nimport { useFocusRecord } from '../../focus/focus-record'\nimport { useAppAddress } from '../../use-app-address'\nimport { useRunTrace } from '../workflow-run/use-run-trace'\nimport { recordDefinition } from '../workflow/definition'\nimport { workflowLayoutOf } from '../workflow/manual-layout'\nimport { workflowsResource, type WorkflowView } from './workflow-view'\n\n/** The most versions the version selector offers, the latest first: one page of the API. */\nexport const versionLimit = 100\n\n/** The most runs the run selector offers, the latest first, besides the run shown. */\nexport const runLimit = 20\n\nconst numberOf = (value: unknown) => (value === null || value === undefined ? undefined : Number(value))\n\n/** The workflow's page the address shows, as logical values, on a focus page, or none, such as on the create form. */\nexport const useWorkflowView = (): WorkflowView | undefined => {\n const { address } = useAppAddress()\n const focus = useFocusRecord()\n if (!focus || address?.kind !== 'record') return\n return { workflow: focus.key, ...(address.version !== undefined && { version: address.version }), ...(address.run && { run: address.run }) }\n}\n\n/**\n * What a workflow's page draws besides its definition: its latest and enabled version, its versions and latest runs for\n * the pickers, the run shown with its trace, and the version shown when it is not the latest, with its definition and\n * its layout.\n */\nexport const useWorkflowPage = (view: WorkflowView) => {\n const workflow = useRecord(workflowsResource, view.workflow)\n const latest = numberOf(workflow.data?.record.version)\n const enabled = numberOf(workflow.data?.record.enabled_version)\n const byWorkflow = `workflow_id = ${JSON.stringify(view.workflow)}`\n const versions = useList('workflow_versions', { filter: byWorkflow, orderBy: 'version desc', pageSize: versionLimit, fields: ['version', 'saved_at'] })\n // A block's run opens from the Block step that started it, not from the workflow's runs.\n const runs = useList('workflow_runs', { filter: `${byWorkflow} AND isNull(block_of)`, orderBy: 'created_at desc', pageSize: runLimit, fields: ['id', 'status', 'version', 'created_at', 'duration_ms', 'input', 'started_by', 'rerun_of', 'replay', 'error'] })\n const trace = useRunTrace(view.run)\n // A version other than the latest is drawn from its own record\n const shown = view.version\n const past = useRecord('workflow_versions', [view.workflow, shown ?? 0], shown !== undefined)\n return {\n latest,\n enabled,\n versions: versions.items.map((row) => ({ version: Number(row.version), savedAt: String(row.saved_at) })),\n runs: runs.items,\n trace,\n shown,\n pastDefinition: past.data && recordDefinition(past.data.record),\n // As the version looked when it was saved\n pastLayout: past.data && workflowLayoutOf(past.data.record.layout),\n versionsError: versions.error,\n runsError: runs.error,\n pastError: past.error,\n }\n}\n\nexport type WorkflowPage = ReturnType<typeof useWorkflowPage>\n"],"mappings":"mlBAGA,IAAaU,EAAoB,YASpBC,GAAuB,CAAE,WAAU,UAAS,UAAqC,CAC5F,KAAM,SACN,SAAUD,EACV,IAAKE,EACL,GAAIC,IAAY,IAAA,IAAa,CAAE,SAAQ,EACvC,GAAIC,GAAO,CAAE,KAAI,CACnB,GAGaC,GAAkB,EAAkB,EAAiB,IAA+BJ,EAAoB,CAAE,WAAU,GAAIE,IAAYG,GAAU,CAAE,SAAQ,CAAG,CAAC,EAG5JC,GAAc,EAAkB,EAAa,EAAiB,IAA+BN,EAAoB,CAAE,WAAU,GAAIE,IAAYG,GAAU,CAAE,SAAQ,EAAI,KAAI,CAAC,EAG1KE,GAAoB,CAAE,WAAU,WAAyB,IAAgCL,IAAY,IAAA,GAAYF,EAAoB,CAAE,UAAS,CAAC,EAAII,EAAeH,EAAUC,EAASG,CAAM,ECZpMG,EAAY,GAAoBC,GAAU,KAA8B,IAAA,GAAY,OAAOA,CAAK,EAGzFC,MAAkD,CAC7D,GAAM,CAAE,WAAYlB,EAAc,EAC5BmB,EAAQhB,EAAe,EAC7B,GAAKgB,GAASC,GAAS,OAAS,SAChC,MAAO,CAAE,SAAUD,EAA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["n","a","t","useClient","messages","keys","useQuery","text","useWorkflowTypes","client"],"sources":["../../../src/app/field-types/workflow/messages.ts","../../../src/app/field-types/workflow/use-workflow-types.ts"],"sourcesContent":["import { messages } from '../../../locale/messages'\n\nexport const text = messages('app/field-types/workflow')\n","import { useQuery } from '@tanstack/react-query'\nimport { useClient } from '../../../data/api-provider'\nimport { keys } from '../../../data/query-keys'\n\n/** The app's workflow trigger and step types, its plugins' included, as the server lists them for the editor. */\nexport const useWorkflowTypes = () => {\n const client = useClient()\n return useQuery({ queryKey: keys.workflowTypes, queryFn: () => client.workflowTypes() })\n}\n"],"mappings":"ujBAEA,IAAaO,EAAOH,EAAS,0BAA0B,ECG1CI,MAAyB,CACpC,IAAMC,EAASN,EAAU,EACzB,OAAOG,EAAS,CAAE,SAAUD,EAAK,cAAe,YAAeI,EAAO,cAAc,CAAE,CAAC,CACzF","debugId":"cf09b758-aea3-4435-9217-12d6f7872cce"}
1
+ {"version":3,"file":"use-workflow-types-Cjkw47Mf.js","names":["n","a","t","useClient","messages","keys","useQuery","text","useWorkflowTypes","client"],"sources":["../../../src/app/field-types/workflow/messages.ts","../../../src/app/field-types/workflow/use-workflow-types.ts"],"sourcesContent":["import { messages } from '../../../locale/messages'\n\nexport const text = messages('app/field-types/workflow')\n","import { useQuery } from '@tanstack/react-query'\nimport { useClient } from '../../../data/api-provider'\nimport { keys } from '../../../data/query-keys'\n\n/** The app's workflow trigger and step types, its plugins' included, as the server lists them for the editor. */\nexport const useWorkflowTypes = () => {\n const client = useClient()\n return useQuery({ queryKey: keys.workflowTypes, queryFn: () => client.workflowTypes() })\n}\n"],"mappings":"ujBAEA,IAAaO,EAAOH,EAAS,0BAA0B,ECG1CI,MAAyB,CACpC,IAAMC,EAASN,EAAU,EACzB,OAAOG,EAAS,CAAE,SAAUD,EAAK,cAAe,YAAeI,EAAO,cAAc,CAAE,CAAC,CACzF","debugId":"a3930e3b-31f4-4806-9b3f-9fc6f3281d08"}