@protobase/ui 0.118.0 → 0.119.0

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 (302) hide show
  1. package/dist/account/messages.d.ts +2 -2
  2. package/dist/app/app.js +67 -31
  3. package/dist/app/change-confirm/messages.d.ts +2 -2
  4. package/dist/app/charts/chart-params.js +1 -1
  5. package/dist/app/charts/messages.d.ts +2 -2
  6. package/dist/app/comments/messages.d.ts +2 -2
  7. package/dist/app/conversation/thread-state.d.ts +1 -1
  8. package/dist/app/create/messages.d.ts +2 -2
  9. package/dist/app/delete/messages.d.ts +2 -2
  10. package/dist/app/displays/calendar-event.js +1 -1
  11. package/dist/app/displays/messages.d.ts +2 -2
  12. package/dist/app/displays/use-calendar-move.js +1 -1
  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/runner-install/messages.d.ts +2 -2
  17. package/dist/app/field-types/workflow/definition.d.ts +1 -1
  18. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  19. package/dist/app/field-types/workflow/pins/pin-text.d.ts +1 -1
  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/field-types/workflow-status/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/lazy-routes.d.ts +4 -0
  29. package/dist/app/lazy-routes.js +2 -1
  30. package/dist/app/list-messages.d.ts +2 -2
  31. package/dist/app/list-page.js +1 -1
  32. package/dist/app/messages.d.ts +2 -2
  33. package/dist/app/meta-gate-messages.d.ts +2 -2
  34. package/dist/app/nav-recent.js +1 -1
  35. package/dist/app/new-version/messages.d.ts +2 -2
  36. package/dist/app/opened-address.d.ts +9 -0
  37. package/dist/app/opened-address.js +14 -0
  38. package/dist/app/pages/messages.d.ts +2 -2
  39. package/dist/app/record-chart/messages.d.ts +2 -2
  40. package/dist/app/record-messages.d.ts +2 -2
  41. package/dist/app/record-opens.d.ts +1 -6
  42. package/dist/app/record-opens.js +2 -12
  43. package/dist/app/record-page.js +2 -1
  44. package/dist/app/record-row/messages.d.ts +2 -2
  45. package/dist/app/related-cards/messages.d.ts +2 -2
  46. package/dist/app/runtime/messages.d.ts +2 -2
  47. package/dist/app/saved/messages.d.ts +2 -2
  48. package/dist/app/saved/use-favorite.d.ts +1 -1
  49. package/dist/app/search/messages.d.ts +2 -2
  50. package/dist/app/search/search-model.d.ts +7 -3
  51. package/dist/app/search/search-model.js +13 -6
  52. package/dist/app/searches/messages.d.ts +2 -2
  53. package/dist/app/searches/update-search-dialog.js +1 -1
  54. package/dist/app/searches/use-save-search.d.ts +1 -1
  55. package/dist/app/start-record.d.ts +22 -0
  56. package/dist/app/start-record.js +33 -0
  57. package/dist/app/use-nav-recent.d.ts +2 -2
  58. package/dist/app/use-nav-recent.js +8 -3
  59. package/dist/app/use-start-address.d.ts +21 -0
  60. package/dist/app/use-start-address.js +49 -0
  61. package/dist/app-shell/messages.d.ts +2 -2
  62. package/dist/app-shell/profile-menu.d.ts +2 -0
  63. package/dist/app-shell/profile-menu.js +1 -1
  64. package/dist/assistant-dock/messages.d.ts +2 -2
  65. package/dist/auth/messages.d.ts +2 -2
  66. package/dist/calls/messages.d.ts +2 -2
  67. package/dist/carousel/messages.d.ts +2 -2
  68. package/dist/chat/messages.d.ts +2 -2
  69. package/dist/data/query-keys.d.ts +4 -0
  70. package/dist/data/query-keys.js +11 -0
  71. package/dist/data/start-cache/restored-state.d.ts +7 -0
  72. package/dist/data/start-cache/restored-state.js +5 -1
  73. package/dist/data-grid/messages.d.ts +2 -2
  74. package/dist/filter-panel/messages.d.ts +2 -2
  75. package/dist/forms/messages.d.ts +2 -2
  76. package/dist/inline-child-table/messages.d.ts +2 -2
  77. package/dist/invitations/messages.d.ts +2 -2
  78. package/dist/locale/en.js +38 -21
  79. package/dist/locale/en.json.d.ts +17 -0
  80. package/dist/locale/messages.d.ts +34 -0
  81. package/dist/locale/nl.js +38 -21
  82. package/dist/mentions/messages.d.ts +2 -2
  83. package/dist/mocks/orders.d.ts +1 -1
  84. package/dist/notifications/bell/messages.d.ts +2 -2
  85. package/dist/organizations/all-organizations.js +5 -3
  86. package/dist/organizations/first-organization-page.d.ts +21 -0
  87. package/dist/organizations/first-organization-page.js +125 -0
  88. package/dist/organizations/invitations-page.js +3 -1
  89. package/dist/organizations/members-page.js +5 -2
  90. package/dist/organizations/messages.d.ts +2 -2
  91. package/dist/organizations/my-invitation-row.d.ts +11 -0
  92. package/dist/organizations/my-invitation-row.js +34 -0
  93. package/dist/organizations/new-organization-form.d.ts +10 -0
  94. package/dist/organizations/new-organization-form.js +76 -0
  95. package/dist/organizations/organization-page.js +9 -6
  96. package/dist/organizations/organization-paths.d.ts +7 -2
  97. package/dist/organizations/organization-paths.js +14 -8
  98. package/dist/organizations/organization-word.d.ts +14 -0
  99. package/dist/organizations/organization-word.js +22 -0
  100. package/dist/organizations/organizations-page.d.ts +0 -2
  101. package/dist/organizations/organizations-page.js +31 -98
  102. package/dist/organizations/use-my-invitations.d.ts +17 -0
  103. package/dist/organizations/use-my-invitations.js +30 -0
  104. package/dist/organizations/use-organizations.d.ts +4 -0
  105. package/dist/organizations/use-organizations.js +8 -3
  106. package/dist/package.js +1 -1
  107. package/dist/plugins/messages.d.ts +2 -2
  108. package/dist/primitives/messages.d.ts +2 -2
  109. package/dist/record-view/messages.d.ts +2 -2
  110. package/dist/record-view/use-autosave.d.ts +1 -1
  111. package/dist/shell/assets/{account-page-DOXkanFO.js → account-page-BQp5_GhJ.js} +2 -2
  112. package/dist/shell/assets/app-Bu6FwwHZ.js +34 -0
  113. package/dist/shell/assets/{app-Dq5eubgK.css → app-xwgcmboV.css} +1 -1
  114. package/dist/shell/assets/{assistant-shell-Drpmyy7B.js → assistant-shell-BZIclUxo.js} +2 -2
  115. package/dist/shell/assets/board-display-i-mb2Cpu.js +2 -0
  116. package/dist/shell/assets/calendar-display-DeNTjhbB.js +2 -0
  117. package/dist/shell/assets/{call-rings-C7f5skja.js → call-rings-BJF7hAje.js} +2 -2
  118. package/dist/shell/assets/{calls-Ca2RAgzS.js → calls-BcTDHAo3.js} +2 -2
  119. package/dist/shell/assets/{circle-alert-B5-CtUEU.js → circle-alert-lCeGgu8R.js} +2 -2
  120. package/dist/shell/assets/{composed-page-BMYkHKrZ.js → composed-page-DNJnwQvq.js} +2 -2
  121. package/dist/shell/assets/{composer-section-CHUNzdVu.js → composer-section-Ca3NwGut.js} +2 -2
  122. package/dist/shell/assets/{connect-route-B_u1trIm.js → connect-route-S-wzFft6.js} +2 -2
  123. package/dist/shell/assets/{copy-field-9SzlccPw.js → copy-field-BlILh8XJ.js} +2 -2
  124. package/dist/shell/assets/create-route-BzX8GS_M.js +2 -0
  125. package/dist/shell/assets/{custom-step-container-field-BqLAbXaI.js → custom-step-container-field-0KjqrW7Y.js} +4 -4
  126. package/dist/shell/assets/embedded-list-DJUmoyQF.js +3 -0
  127. package/dist/shell/assets/{en-wsBk87ZG.js → en-BrEwbNhJ.js} +2 -2
  128. package/dist/shell/assets/{export-dialog-DG5H_BHu.js → export-dialog-DB5gIvOy.js} +2 -2
  129. package/dist/shell/assets/export-worker-DuHOhIiP.js +15 -0
  130. package/dist/shell/assets/first-organization-page-CBSCVXlw.js +2 -0
  131. package/dist/shell/assets/{graph-view-DFeWGm5G.js → graph-view-AIzSVa3P.js} +2 -2
  132. package/dist/shell/assets/{group-donut-D9vSqco5.js → group-donut-9Eg3TrZC.js} +2 -2
  133. package/dist/shell/assets/{guest-call-page-DIEo-q93.js → guest-call-page-CuUFfdZa.js} +3 -3
  134. package/dist/shell/assets/{html-viewer-F2craD8b.js → html-viewer-CFbk369s.js} +2 -2
  135. package/dist/shell/assets/{import-dialog-C6QghYOc.js → import-dialog-DWGqsC2-.js} +2 -2
  136. package/dist/shell/assets/import-table-dialog-BNe0eZoG.js +2 -0
  137. package/dist/shell/assets/{index-lcg5mDSu.js → index-dMJn1vs1.js} +1 -1
  138. package/dist/shell/assets/invitations-page-AmDwJw-A.js +2 -0
  139. package/dist/shell/assets/{layout-grid-XTZwSFbV.js → layout-grid-CxTl_dur.js} +2 -2
  140. package/dist/shell/assets/{legend-item-BoeI6b5Y.js → legend-item-DXXBS_hw.js} +2 -2
  141. package/dist/shell/assets/list-page-CXrB1As-.js +4 -0
  142. package/dist/shell/assets/{maplibre-CLloBp_X.js → maplibre-Cd9zd3y9.js} +2 -2
  143. package/dist/shell/assets/{markdown-content-CEV942Pa.js → markdown-content-CqKm2ku9.js} +2 -2
  144. package/dist/shell/assets/members-page-Da7ADmBH.js +2 -0
  145. package/dist/shell/assets/messages-ZaTNJ5q-.js +2 -0
  146. package/dist/shell/assets/{nl-nieWXCy1.js → nl-Dto12ewP.js} +2 -2
  147. package/dist/shell/assets/organization-page-CfK6Dim2.js +2 -0
  148. package/dist/shell/assets/organizations-page-B0QsHpBE.js +2 -0
  149. package/dist/shell/assets/parse-worker-BRxyLV_D.js +35 -0
  150. package/dist/shell/assets/{pending-invitation-row-T-_gptFs.js → pending-invitation-row-Bcf8ttkD.js} +2 -2
  151. package/dist/shell/assets/{period-chart-BLA0qneK.js → period-chart-Ckx_KTsu.js} +2 -2
  152. package/dist/shell/assets/{person-row-CB2jyi4a.js → person-row-4RzpLZJE.js} +2 -2
  153. package/dist/shell/assets/public-form-page-BQR19Cet.js +2 -0
  154. package/dist/shell/assets/{record-lines-C-s6d1b-.js → record-lines-BmaATx8t.js} +2 -2
  155. package/dist/shell/assets/{record-map-1LgfFbVl.js → record-map-BnCgDA0b.js} +2 -2
  156. package/dist/shell/assets/{record-opens-DayPkcEp.js → record-opens-DrMa-fHq.js} +2 -2
  157. package/dist/shell/assets/record-page-DHgth2rZ.js +3 -0
  158. package/dist/shell/assets/{record-preview-DYLddBgR.js → record-preview-Dcgb16a2.js} +2 -2
  159. package/dist/shell/assets/{records-map-Dbzp06m5.js → records-map-Clj4sGQc.js} +2 -2
  160. package/dist/shell/assets/render-node-DSmBsYMg.js +3 -0
  161. package/dist/shell/assets/reorder-button-DaTBmXBl.js +2 -0
  162. package/dist/shell/assets/{run-trace-view-C7Fa31YF.js → run-trace-view-DlxVKKf8.js} +2 -2
  163. package/dist/shell/assets/{runner-install-field-Bpj6cGb0.js → runner-install-field-Bo_itrWB.js} +2 -2
  164. package/dist/shell/assets/{runtime-update-CZ31fRYM.js → runtime-update-D8Ly6R1y.js} +2 -2
  165. package/dist/shell/assets/shared-protobase-ui-BzbF8jUw.js +1 -0
  166. package/dist/shell/assets/{sheet-source-CpQBUfMu.js → sheet-source-BYMMaydU.js} +3 -3
  167. package/dist/shell/assets/sign-in-policy-page-Bw2A76AY.js +2 -0
  168. package/dist/shell/assets/start-block-queries-BCn7NH98.js +2 -0
  169. package/dist/shell/assets/step-catalog-DeHAX9pK.js +2 -0
  170. package/dist/shell/assets/{step-panel-BNu4CT-a.js → step-panel-Df4GlchE.js} +2 -2
  171. package/dist/shell/assets/timeline-display-BijL0a02.js +2 -0
  172. package/dist/shell/assets/{trash-DGtnZxzc.js → trash-CM78fU0k.js} +2 -2
  173. package/dist/shell/assets/{update-set-DmSoOUGC.js → update-set-BmW6qYcW.js} +2 -2
  174. package/dist/shell/assets/use-calendar-move-DdkPJiaa.js +2 -0
  175. package/dist/shell/assets/{use-display-rows-QMseygYe.js → use-display-rows-DAUXr6DH.js} +2 -2
  176. package/dist/shell/assets/use-my-invitations-Cy6qlxUU.js +2 -0
  177. package/dist/shell/assets/{use-paged-search-CI7t7XI0.js → use-paged-search-BXLXKyHF.js} +2 -2
  178. package/dist/shell/assets/{use-run-trace-D0jDOrL8.js → use-run-trace-D9muWJxD.js} +2 -2
  179. package/dist/shell/assets/{use-workflow-page-BMjBBt83.js → use-workflow-page-DSt6Ws-R.js} +2 -2
  180. package/dist/shell/assets/{use-workflow-types-8ZRuZVuJ.js → use-workflow-types-BcmFpA4n.js} +2 -2
  181. package/dist/shell/assets/{workflow-canvas-DtTiaGIh.js → workflow-canvas-B2SGJgTS.js} +4 -4
  182. package/dist/shell/assets/{workflow-field-2I9HpR3s.js → workflow-field-DN0iAPqC.js} +3 -3
  183. package/dist/shell/assets/{workflow-graph-editor-DJoriSTb.js → workflow-graph-editor-DQYfPu8C.js} +2 -2
  184. package/dist/shell/assets/{workflow-run-field-BB6DMeK0.js → workflow-run-field-Bau9h_Pu.js} +3 -3
  185. package/dist/shell/assets/workflow-status-field-CBRUOn6n.js +2 -0
  186. package/dist/shell/assets/workflow-workbench-B2GjHXy6.js +4 -0
  187. package/dist/shell/index.html +4 -4
  188. package/dist/shell/protobase.shell.json +2 -2
  189. package/dist/shell/protobase.sw.js +2 -2
  190. package/dist/shell-source-maps/assets/{account-page-DOXkanFO.js.map → account-page-BQp5_GhJ.js.map} +1 -1
  191. package/dist/shell-source-maps/assets/app-Bu6FwwHZ.js.map +1 -0
  192. package/dist/shell-source-maps/assets/{assistant-shell-Drpmyy7B.js.map → assistant-shell-BZIclUxo.js.map} +1 -1
  193. package/dist/shell-source-maps/assets/{board-display-D9PUmRbl.js.map → board-display-i-mb2Cpu.js.map} +1 -1
  194. package/dist/shell-source-maps/assets/{calendar-display-B8J8DI5J.js.map → calendar-display-DeNTjhbB.js.map} +1 -1
  195. package/dist/shell-source-maps/assets/{call-rings-C7f5skja.js.map → call-rings-BJF7hAje.js.map} +1 -1
  196. package/dist/shell-source-maps/assets/{calls-Ca2RAgzS.js.map → calls-BcTDHAo3.js.map} +1 -1
  197. package/dist/shell-source-maps/assets/{circle-alert-B5-CtUEU.js.map → circle-alert-lCeGgu8R.js.map} +1 -1
  198. package/dist/shell-source-maps/assets/{composed-page-BMYkHKrZ.js.map → composed-page-DNJnwQvq.js.map} +1 -1
  199. package/dist/shell-source-maps/assets/{composer-section-CHUNzdVu.js.map → composer-section-Ca3NwGut.js.map} +1 -1
  200. package/dist/shell-source-maps/assets/{connect-route-B_u1trIm.js.map → connect-route-S-wzFft6.js.map} +1 -1
  201. package/dist/shell-source-maps/assets/{copy-field-9SzlccPw.js.map → copy-field-BlILh8XJ.js.map} +1 -1
  202. package/dist/shell-source-maps/assets/{create-route-rbublA-_.js.map → create-route-BzX8GS_M.js.map} +1 -1
  203. package/dist/shell-source-maps/assets/{custom-step-container-field-BqLAbXaI.js.map → custom-step-container-field-0KjqrW7Y.js.map} +1 -1
  204. package/dist/shell-source-maps/assets/{embedded-list-CdFZ5TIe.js.map → embedded-list-DJUmoyQF.js.map} +1 -1
  205. package/dist/shell-source-maps/assets/en-BrEwbNhJ.js.map +1 -0
  206. package/dist/shell-source-maps/assets/{export-dialog-DG5H_BHu.js.map → export-dialog-DB5gIvOy.js.map} +1 -1
  207. package/dist/shell-source-maps/assets/export-worker-DuHOhIiP.js.map +1 -0
  208. package/dist/shell-source-maps/assets/first-organization-page-CBSCVXlw.js.map +1 -0
  209. package/dist/shell-source-maps/assets/{graph-view-DFeWGm5G.js.map → graph-view-AIzSVa3P.js.map} +1 -1
  210. package/dist/shell-source-maps/assets/{group-donut-D9vSqco5.js.map → group-donut-9Eg3TrZC.js.map} +1 -1
  211. package/dist/shell-source-maps/assets/{guest-call-page-DIEo-q93.js.map → guest-call-page-CuUFfdZa.js.map} +1 -1
  212. package/dist/shell-source-maps/assets/{html-viewer-F2craD8b.js.map → html-viewer-CFbk369s.js.map} +1 -1
  213. package/dist/shell-source-maps/assets/{import-dialog-C6QghYOc.js.map → import-dialog-DWGqsC2-.js.map} +1 -1
  214. package/dist/shell-source-maps/assets/{import-table-dialog-BzpzE7wd.js.map → import-table-dialog-BNe0eZoG.js.map} +1 -1
  215. package/dist/shell-source-maps/assets/invitations-page-AmDwJw-A.js.map +1 -0
  216. package/dist/shell-source-maps/assets/{layout-grid-XTZwSFbV.js.map → layout-grid-CxTl_dur.js.map} +1 -1
  217. package/dist/shell-source-maps/assets/{legend-item-BoeI6b5Y.js.map → legend-item-DXXBS_hw.js.map} +1 -1
  218. package/dist/shell-source-maps/assets/{list-page-C7h-_WJY.js.map → list-page-CXrB1As-.js.map} +1 -1
  219. package/dist/shell-source-maps/assets/{maplibre-CLloBp_X.js.map → maplibre-Cd9zd3y9.js.map} +1 -1
  220. package/dist/shell-source-maps/assets/{markdown-content-CEV942Pa.js.map → markdown-content-CqKm2ku9.js.map} +1 -1
  221. package/dist/shell-source-maps/assets/members-page-Da7ADmBH.js.map +1 -0
  222. package/dist/shell-source-maps/assets/{messages-lXPHUGLV.js.map → messages-ZaTNJ5q-.js.map} +1 -1
  223. package/dist/shell-source-maps/assets/nl-Dto12ewP.js.map +1 -0
  224. package/dist/shell-source-maps/assets/organization-page-CfK6Dim2.js.map +1 -0
  225. package/dist/shell-source-maps/assets/organizations-page-B0QsHpBE.js.map +1 -0
  226. package/dist/shell-source-maps/assets/parse-worker-BRxyLV_D.js.map +1 -0
  227. package/dist/shell-source-maps/assets/{pending-invitation-row-T-_gptFs.js.map → pending-invitation-row-Bcf8ttkD.js.map} +1 -1
  228. package/dist/shell-source-maps/assets/{period-chart-BLA0qneK.js.map → period-chart-Ckx_KTsu.js.map} +1 -1
  229. package/dist/shell-source-maps/assets/{person-row-CB2jyi4a.js.map → person-row-4RzpLZJE.js.map} +1 -1
  230. package/dist/shell-source-maps/assets/{public-form-page-CvtOJGMY.js.map → public-form-page-BQR19Cet.js.map} +1 -1
  231. package/dist/shell-source-maps/assets/{record-lines-C-s6d1b-.js.map → record-lines-BmaATx8t.js.map} +1 -1
  232. package/dist/shell-source-maps/assets/{record-map-1LgfFbVl.js.map → record-map-BnCgDA0b.js.map} +1 -1
  233. package/dist/shell-source-maps/assets/record-opens-DrMa-fHq.js.map +1 -0
  234. package/dist/shell-source-maps/assets/{record-page-BMFIEvdR.js.map → record-page-DHgth2rZ.js.map} +1 -1
  235. package/dist/shell-source-maps/assets/{record-preview-DYLddBgR.js.map → record-preview-Dcgb16a2.js.map} +1 -1
  236. package/dist/shell-source-maps/assets/{records-map-Dbzp06m5.js.map → records-map-Clj4sGQc.js.map} +1 -1
  237. package/dist/shell-source-maps/assets/{render-node-DEeBoZ9i.js.map → render-node-DSmBsYMg.js.map} +1 -1
  238. package/dist/shell-source-maps/assets/{reorder-button-BauUDONv.js.map → reorder-button-DaTBmXBl.js.map} +1 -1
  239. package/dist/shell-source-maps/assets/{run-trace-view-C7Fa31YF.js.map → run-trace-view-DlxVKKf8.js.map} +1 -1
  240. package/dist/shell-source-maps/assets/{runner-install-field-Bpj6cGb0.js.map → runner-install-field-Bo_itrWB.js.map} +1 -1
  241. package/dist/shell-source-maps/assets/{runtime-update-CZ31fRYM.js.map → runtime-update-D8Ly6R1y.js.map} +1 -1
  242. package/dist/shell-source-maps/assets/{sheet-source-CpQBUfMu.js.map → sheet-source-BYMMaydU.js.map} +1 -1
  243. package/dist/shell-source-maps/assets/{sign-in-policy-page-BumL1ZPK.js.map → sign-in-policy-page-Bw2A76AY.js.map} +1 -1
  244. package/dist/shell-source-maps/assets/{start-block-queries-DYE83u9M.js.map → start-block-queries-BCn7NH98.js.map} +1 -1
  245. package/dist/shell-source-maps/assets/{step-catalog-DAHY1jbn.js.map → step-catalog-DeHAX9pK.js.map} +1 -1
  246. package/dist/shell-source-maps/assets/{step-panel-BNu4CT-a.js.map → step-panel-Df4GlchE.js.map} +1 -1
  247. package/dist/shell-source-maps/assets/{timeline-display-Dj7rfbX5.js.map → timeline-display-BijL0a02.js.map} +1 -1
  248. package/dist/shell-source-maps/assets/{trash-DGtnZxzc.js.map → trash-CM78fU0k.js.map} +1 -1
  249. package/dist/shell-source-maps/assets/{update-set-DmSoOUGC.js.map → update-set-BmW6qYcW.js.map} +1 -1
  250. package/dist/shell-source-maps/assets/{use-calendar-move-r5AsNTri.js.map → use-calendar-move-DdkPJiaa.js.map} +1 -1
  251. package/dist/shell-source-maps/assets/{use-display-rows-QMseygYe.js.map → use-display-rows-DAUXr6DH.js.map} +1 -1
  252. package/dist/shell-source-maps/assets/use-my-invitations-Cy6qlxUU.js.map +1 -0
  253. package/dist/shell-source-maps/assets/{use-paged-search-CI7t7XI0.js.map → use-paged-search-BXLXKyHF.js.map} +1 -1
  254. package/dist/shell-source-maps/assets/{use-run-trace-D0jDOrL8.js.map → use-run-trace-D9muWJxD.js.map} +1 -1
  255. package/dist/shell-source-maps/assets/{use-workflow-page-BMjBBt83.js.map → use-workflow-page-DSt6Ws-R.js.map} +1 -1
  256. package/dist/shell-source-maps/assets/{use-workflow-types-8ZRuZVuJ.js.map → use-workflow-types-BcmFpA4n.js.map} +1 -1
  257. package/dist/shell-source-maps/assets/{workflow-canvas-DtTiaGIh.js.map → workflow-canvas-B2SGJgTS.js.map} +1 -1
  258. package/dist/shell-source-maps/assets/{workflow-field-2I9HpR3s.js.map → workflow-field-DN0iAPqC.js.map} +1 -1
  259. package/dist/shell-source-maps/assets/{workflow-graph-editor-DJoriSTb.js.map → workflow-graph-editor-DQYfPu8C.js.map} +1 -1
  260. package/dist/shell-source-maps/assets/{workflow-run-field-BB6DMeK0.js.map → workflow-run-field-Bau9h_Pu.js.map} +1 -1
  261. package/dist/shell-source-maps/assets/workflow-status-field-CBRUOn6n.js.map +1 -0
  262. package/dist/shell-source-maps/assets/{workflow-workbench-PnPXVcoE.js.map → workflow-workbench-B2GjHXy6.js.map} +1 -1
  263. package/dist/status/messages.d.ts +2 -2
  264. package/dist/users/messages.d.ts +2 -2
  265. package/package.json +5 -5
  266. package/dist/shell/assets/app-B48LQpC1.js +0 -34
  267. package/dist/shell/assets/board-display-D9PUmRbl.js +0 -2
  268. package/dist/shell/assets/calendar-display-B8J8DI5J.js +0 -2
  269. package/dist/shell/assets/create-route-rbublA-_.js +0 -2
  270. package/dist/shell/assets/embedded-list-CdFZ5TIe.js +0 -3
  271. package/dist/shell/assets/export-worker-CQwKM8Oc.js +0 -15
  272. package/dist/shell/assets/import-table-dialog-BzpzE7wd.js +0 -2
  273. package/dist/shell/assets/invitations-page-nBjy3DSn.js +0 -2
  274. package/dist/shell/assets/list-page-C7h-_WJY.js +0 -4
  275. package/dist/shell/assets/members-page-D1uMhOZR.js +0 -2
  276. package/dist/shell/assets/messages-lXPHUGLV.js +0 -2
  277. package/dist/shell/assets/organization-page-RMZnMPR0.js +0 -2
  278. package/dist/shell/assets/organizations-page-Ce6Nwl7X.js +0 -2
  279. package/dist/shell/assets/parse-worker-BN8cVWIa.js +0 -35
  280. package/dist/shell/assets/public-form-page-CvtOJGMY.js +0 -2
  281. package/dist/shell/assets/record-page-BMFIEvdR.js +0 -3
  282. package/dist/shell/assets/render-node-DEeBoZ9i.js +0 -3
  283. package/dist/shell/assets/reorder-button-BauUDONv.js +0 -2
  284. package/dist/shell/assets/shared-protobase-ui-BGJ_UVNP.js +0 -1
  285. package/dist/shell/assets/sign-in-policy-page-BumL1ZPK.js +0 -2
  286. package/dist/shell/assets/start-block-queries-DYE83u9M.js +0 -2
  287. package/dist/shell/assets/step-catalog-DAHY1jbn.js +0 -2
  288. package/dist/shell/assets/timeline-display-Dj7rfbX5.js +0 -2
  289. package/dist/shell/assets/use-calendar-move-r5AsNTri.js +0 -2
  290. package/dist/shell/assets/workflow-status-field-L_mimjzo.js +0 -2
  291. package/dist/shell/assets/workflow-workbench-PnPXVcoE.js +0 -4
  292. package/dist/shell-source-maps/assets/app-B48LQpC1.js.map +0 -1
  293. package/dist/shell-source-maps/assets/en-wsBk87ZG.js.map +0 -1
  294. package/dist/shell-source-maps/assets/export-worker-CQwKM8Oc.js.map +0 -1
  295. package/dist/shell-source-maps/assets/invitations-page-nBjy3DSn.js.map +0 -1
  296. package/dist/shell-source-maps/assets/members-page-D1uMhOZR.js.map +0 -1
  297. package/dist/shell-source-maps/assets/nl-nieWXCy1.js.map +0 -1
  298. package/dist/shell-source-maps/assets/organization-page-RMZnMPR0.js.map +0 -1
  299. package/dist/shell-source-maps/assets/organizations-page-Ce6Nwl7X.js.map +0 -1
  300. package/dist/shell-source-maps/assets/parse-worker-BN8cVWIa.js.map +0 -1
  301. package/dist/shell-source-maps/assets/record-opens-DayPkcEp.js.map +0 -1
  302. package/dist/shell-source-maps/assets/workflow-status-field-L_mimjzo.js.map +0 -1
@@ -9,6 +9,7 @@ import { PageHeader } from "../app-shell/page-header.js";
9
9
  import { text } from "./messages.js";
10
10
  import { managesOrganization, organizationRoleLabel } from "./organization-paths.js";
11
11
  import { useAction } from "./use-action.js";
12
+ import { useOrganizationText } from "./organization-word.js";
12
13
  import { reopenIn } from "./use-organizations.js";
13
14
  import { Switch } from "../primitives/switch.js";
14
15
  import { useEffect, useState } from "react";
@@ -112,19 +113,20 @@ const Delete = ({ organization, basePath }) => {
112
113
  const [confirming, setConfirming] = useState(false);
113
114
  const [typed, setTyped] = useState("");
114
115
  const { busy, error, run } = useAction();
116
+ const t = useOrganizationText();
115
117
  const remove = () => run(async () => {
116
118
  await session.organizations.remove(organization.id);
117
119
  reopenIn(basePath);
118
120
  });
119
121
  return /* @__PURE__ */ jsxs(AccountSection, {
120
- title: text("deleteOrganization"),
121
- description: text("deleteDescription"),
122
+ title: t("deleteOrganization"),
123
+ description: t("deleteDescription"),
122
124
  children: [
123
125
  /* @__PURE__ */ jsx(SectionError, { message: confirming ? void 0 : error }),
124
126
  /* @__PURE__ */ jsx(Button, {
125
127
  variant: "danger",
126
128
  onClick: () => setConfirming(true),
127
- children: text("deleteOrganization")
129
+ children: t("deleteOrganization")
128
130
  }),
129
131
  confirming && /* @__PURE__ */ jsxs(Dialog, {
130
132
  title: text("deleteTitle", { name: organization.name }),
@@ -141,7 +143,7 @@ const Delete = ({ organization, basePath }) => {
141
143
  children: text("delete")
142
144
  })] }),
143
145
  children: [/* @__PURE__ */ jsx(SectionError, { message: error }), /* @__PURE__ */ jsx(Input, {
144
- "aria-label": text("organizationName"),
146
+ "aria-label": t("organizationName"),
145
147
  value: typed,
146
148
  onChange: (event) => setTyped(event.target.value)
147
149
  })]
@@ -195,12 +197,13 @@ const Leave = ({ organization, basePath, owner }) => {
195
197
  */
196
198
  const OrganizationPage = ({ current, basePath, onChanged }) => {
197
199
  const calls = useMeta().data?.calls === true;
200
+ const t = useOrganizationText();
198
201
  const organization = current?.organization;
199
202
  if (!organization) return /* @__PURE__ */ jsx("div", {
200
203
  className: "mx-auto w-full max-w-3xl px-4 py-6 md:px-6",
201
204
  children: /* @__PURE__ */ jsx(PageHeader, {
202
- title: text("organization"),
203
- subtitle: text("noOrganization")
205
+ title: t("organization"),
206
+ subtitle: t("noOrganization")
204
207
  })
205
208
  });
206
209
  const owner = current.role === "owner";
@@ -1,13 +1,18 @@
1
1
  import { ProfileMenuItem } from "../app-shell/profile-menu.js";
2
2
  import "../app-shell/index.js";
3
+ import { OrganizationText } from "./organization-word.js";
3
4
  import { CurrentOrganization, OrganizationRole, RoleLabel } from "@protobase/client";
4
5
  //#region src/organizations/organization-paths.d.ts
5
6
  export declare const organizationsPath = "/-/organizations";
6
7
  export declare const organizationPath = "/-/organization";
7
8
  export declare const membersPath = "/-/organization/members";
8
9
  export declare const invitationsPath = "/-/organization/invitations";
10
+ export declare const firstOrganizationPath = "/-/first-organization";
11
+ export declare const firstOrganizationFormPath = "/-/first-organization/new";
9
12
  /** The title of the organization page at `path`; undefined for any other path. */
10
- export declare const organizationPageTitle: (path: string) => string | undefined;
13
+ export declare const organizationPageTitle: (path: string, t: OrganizationText) => string | undefined;
14
+ /** Whether `path` is the screen where someone in no organization names or joins their first. */
15
+ export declare const isFirstOrganizationPath: (path: string) => path is "/-/first-organization" | "/-/first-organization/new";
11
16
  /** The word for an organization role. */
12
17
  export declare const organizationRoleLabel: (role: OrganizationRole) => string;
13
18
  /** The label of an app role, as the server names it. */
@@ -19,7 +24,7 @@ export declare const managesOrganization: (current?: CurrentOrganization) => boo
19
24
  * details, and for its owners and admins its members and invitations. The first is "Manage organizations", as the
20
25
  * switcher above it already lists the organizations.
21
26
  */
22
- export declare const organizationMenuItems: (basePath: string, path: string, current?: CurrentOrganization) => ProfileMenuItem[];
27
+ export declare const organizationMenuItems: (basePath: string, path: string, t: OrganizationText, current?: CurrentOrganization) => ProfileMenuItem[];
23
28
  /** The app roles someone may give or take away: those they hold, those their roles grant, and every one for a superuser. */
24
29
  export declare const grantableRoles: (roles: readonly RoleLabel[], current?: CurrentOrganization) => Set<string>;
25
30
  //#endregion
@@ -5,17 +5,23 @@ const organizationsPath = "/-/organizations";
5
5
  const organizationPath = "/-/organization";
6
6
  const membersPath = "/-/organization/members";
7
7
  const invitationsPath = "/-/organization/invitations";
8
+ const firstOrganizationPath = "/-/first-organization";
9
+ const firstOrganizationFormPath = "/-/first-organization/new";
8
10
  const pageTitles = {
9
11
  [organizationsPath]: "organizations",
10
12
  [organizationPath]: "organization",
11
13
  [membersPath]: "members",
12
- [invitationsPath]: "invitations"
14
+ [invitationsPath]: "invitations",
15
+ [firstOrganizationPath]: "createTitle",
16
+ [firstOrganizationFormPath]: "createTitle"
13
17
  };
14
18
  /** The title of the organization page at `path`; undefined for any other path. */
15
- const organizationPageTitle = (path) => {
19
+ const organizationPageTitle = (path, t) => {
16
20
  const id = pageTitles[path];
17
- return id && text(id);
21
+ return id && t(id);
18
22
  };
23
+ /** Whether `path` is the screen where someone in no organization names or joins their first. */
24
+ const isFirstOrganizationPath = (path) => path === "/-/first-organization" || path === "/-/first-organization/new";
19
25
  /** The word for an organization role. */
20
26
  const organizationRoleLabel = (role) => text(role);
21
27
  /** The label of an app role, as the server names it. */
@@ -27,7 +33,7 @@ const managesOrganization = (current) => current?.role === "owner" || current?.r
27
33
  * details, and for its owners and admins its members and invitations. The first is "Manage organizations", as the
28
34
  * switcher above it already lists the organizations.
29
35
  */
30
- const organizationMenuItems = (basePath, path, current) => {
36
+ const organizationMenuItems = (basePath, path, t, current) => {
31
37
  const item = (id, label, icon, target) => ({
32
38
  id,
33
39
  label,
@@ -36,9 +42,9 @@ const organizationMenuItems = (basePath, path, current) => {
36
42
  active: path === target
37
43
  });
38
44
  return [
39
- item("organizations", text("manageOrganizations"), Network, organizationsPath),
40
- ...current?.organization ? [item("organization", text("organization"), Building2, organizationPath)] : [],
41
- ...managesOrganization(current) ? [item("members", text("members"), Users, membersPath), item("invitations", text("invitations"), Mail, invitationsPath)] : []
45
+ item("organizations", t("manageOrganizations"), Network, organizationsPath),
46
+ ...current?.organization ? [item("organization", t("organization"), Building2, organizationPath)] : [],
47
+ ...managesOrganization(current) ? [item("members", t("members"), Users, membersPath), item("invitations", t("invitations"), Mail, invitationsPath)] : []
42
48
  ];
43
49
  };
44
50
  /** The app roles someone may give or take away: those they hold, those their roles grant, and every one for a superuser. */
@@ -50,4 +56,4 @@ const grantableRoles = (roles, current) => {
50
56
  return new Set([...held, ...granted].filter((name) => membership.includes(name)));
51
57
  };
52
58
  //#endregion
53
- export { grantableRoles, invitationsPath, managesOrganization, membersPath, organizationMenuItems, organizationPageTitle, organizationPath, organizationRoleLabel, organizationsPath, roleLabel };
59
+ export { firstOrganizationFormPath, firstOrganizationPath, grantableRoles, invitationsPath, isFirstOrganizationPath, managesOrganization, membersPath, organizationMenuItems, organizationPageTitle, organizationPath, organizationRoleLabel, organizationsPath, roleLabel };
@@ -0,0 +1,14 @@
1
+ import { MessageValue } from "../locale/messages.js";
2
+ import { text } from "./messages.js";
3
+ //#region src/organizations/organization-word.d.ts
4
+ /** What the app calls an organization, capitalised as a view's names are (`auth.organizations.names`). */
5
+ export type OrganizationNames = {
6
+ singular: string;
7
+ plural: string;
8
+ };
9
+ export type OrganizationText = (id: Parameters<typeof text>[0], values?: Record<string, MessageValue>) => string;
10
+ /** The organization texts with the app's word for an organization in them, or the built-in "Organization". */
11
+ export declare const wordedText: (names?: OrganizationNames) => OrganizationText;
12
+ /** The organization texts in the words the app sets for an organization. */
13
+ export declare const useOrganizationText: () => OrganizationText;
14
+ //#endregion
@@ -0,0 +1,22 @@
1
+ import { useAuth } from "../auth/auth-provider.js";
2
+ import { text } from "./messages.js";
3
+ import { useMemo } from "react";
4
+ //#region src/organizations/organization-word.ts
5
+ /** The organization texts with the app's word for an organization in them, or the built-in "Organization". */
6
+ const wordedText = (names) => {
7
+ const word = {
8
+ word: names?.singular ?? text("word"),
9
+ words: names?.plural ?? text("words")
10
+ };
11
+ return (id, values) => text(id, {
12
+ ...word,
13
+ ...values
14
+ });
15
+ };
16
+ /** The organization texts in the words the app sets for an organization. */
17
+ const useOrganizationText = () => {
18
+ const names = useAuth().organizations?.names;
19
+ return useMemo(() => wordedText(names), [names]);
20
+ };
21
+ //#endregion
22
+ export { useOrganizationText, wordedText };
@@ -1,7 +1,5 @@
1
1
  import { OrganizationsState } from "./use-organizations.js";
2
2
  //#region src/organizations/organizations-page.d.ts
3
- /** A slug from a name: lowercase ASCII words joined by dashes, as the server accepts them. */
4
- export declare const slugOf: (name: string) => string;
5
3
  /**
6
4
  * The person's organizations: switching between them, making a new one when the app allows it, and for people with a
7
5
  * global role every organization. Someone in none sees their invitations here.
@@ -1,110 +1,38 @@
1
- import { formatTag } from "../locale/active-locale.js";
2
- import { Button } from "../primitives/button.js";
3
1
  import { useAuth } from "../auth/auth-provider.js";
4
2
  import { AccountSection, SectionError } from "../account/account-section.js";
5
- import { Input } from "../primitives/input.js";
6
3
  import { PageHeader } from "../app-shell/page-header.js";
7
- import { text } from "./messages.js";
8
- import { roleLabel } from "./organization-paths.js";
9
4
  import { useAction } from "./use-action.js";
10
5
  import { isAdmin } from "../auth/user-to-shell.js";
6
+ import { useOrganizationText } from "./organization-word.js";
11
7
  import { reopenIn } from "./use-organizations.js";
12
8
  import { OrganizationRow } from "./organization-row.js";
13
9
  import { AllOrganizations } from "./all-organizations.js";
14
- import { useEffect, useState } from "react";
10
+ import { MyInvitationRow } from "./my-invitation-row.js";
11
+ import { NewOrganizationForm } from "./new-organization-form.js";
12
+ import { useMyInvitations } from "./use-my-invitations.js";
15
13
  import { jsx, jsxs } from "react/jsx-runtime";
16
14
  //#region src/organizations/organizations-page.tsx
17
- /** A slug from a name: lowercase ASCII words joined by dashes, as the server accepts them. */
18
- const slugOf = (name) => name.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63);
19
- const NewOrganization = ({ basePath }) => {
20
- const { session } = useAuth();
21
- const [name, setName] = useState("");
22
- const [slug, setSlug] = useState();
23
- const { busy, error, run } = useAction();
24
- const create = () => run(async () => {
25
- await session.organizations.create({
26
- name: name.trim(),
27
- slug: slug ?? slugOf(name)
28
- });
29
- reopenIn(basePath);
30
- });
31
- return /* @__PURE__ */ jsxs(AccountSection, {
32
- title: text("newOrganization"),
33
- description: text("newOrganizationDescription"),
34
- children: [/* @__PURE__ */ jsx(SectionError, { message: error }), /* @__PURE__ */ jsxs("form", {
35
- className: "flex flex-col gap-2 sm:flex-row",
36
- onSubmit: (event) => {
37
- event.preventDefault();
38
- create();
39
- },
40
- children: [
41
- /* @__PURE__ */ jsx(Input, {
42
- "aria-label": text("name"),
43
- placeholder: text("name"),
44
- value: name,
45
- onChange: (event) => setName(event.target.value),
46
- wrapperClassName: "flex-1"
47
- }),
48
- /* @__PURE__ */ jsx(Input, {
49
- "aria-label": text("slug"),
50
- placeholder: "slug",
51
- value: slug ?? slugOf(name),
52
- onChange: (event) => setSlug(event.target.value),
53
- wrapperClassName: "sm:w-48"
54
- }),
55
- /* @__PURE__ */ jsx(Button, {
56
- type: "submit",
57
- variant: "primary",
58
- loading: busy,
59
- disabled: !name.trim(),
60
- children: text("create")
61
- })
62
- ]
63
- })]
64
- });
65
- };
66
- /** The invitations for the person's own address, each to accept, which opens the app in its organization. */
15
+ /** The invitations for the person's own address, each to join, which opens the app in its organization. */
67
16
  const YourInvitations = ({ basePath }) => {
68
- const { session, organizations } = useAuth();
69
- const [invitations, setInvitations] = useState([]);
17
+ const { session } = useAuth();
18
+ const t = useOrganizationText();
19
+ const read = useMyInvitations();
20
+ const invitations = read.state === "ready" ? read.invitations : void 0;
70
21
  const { busy, error, run } = useAction();
71
- useEffect(() => {
72
- session.organizations.myInvitations().then(setInvitations, () => setInvitations([]));
73
- }, [session]);
74
- if (invitations.length === 0) return null;
75
- const roles = organizations?.roles ?? [];
76
- const accept = (invitationId) => run(async () => {
77
- await session.organizations.acceptMine(invitationId);
78
- reopenIn(basePath);
79
- });
22
+ if (!invitations || invitations.length === 0) return null;
80
23
  return /* @__PURE__ */ jsxs(AccountSection, {
81
- title: text("invitationsForYou"),
82
- description: text("invitationsForYouDescription"),
24
+ title: t("invitationsForYou"),
25
+ description: t("invitationsForYouDescription"),
83
26
  children: [/* @__PURE__ */ jsx(SectionError, { message: error }), /* @__PURE__ */ jsx("ul", {
84
27
  className: "divide-y rounded-md border",
85
- children: invitations.map((invitation) => /* @__PURE__ */ jsxs("li", {
86
- className: "flex items-center gap-3 px-3 py-2.5",
87
- children: [/* @__PURE__ */ jsxs("span", {
88
- className: "min-w-0 flex-1",
89
- children: [
90
- /* @__PURE__ */ jsx("span", {
91
- className: "font-medium",
92
- children: invitation.organizationName ?? text("anOrganization")
93
- }),
94
- ": ",
95
- invitation.appRoles.map((name) => roleLabel(roles, name)).join(", ") || text("noAppRoles"),
96
- /* @__PURE__ */ jsx("span", {
97
- className: "block text-xs text-muted-foreground",
98
- children: text("until", { date: new Date(invitation.expiresAt).toLocaleDateString(formatTag()) })
99
- })
100
- ]
101
- }), /* @__PURE__ */ jsx(Button, {
102
- size: "sm",
103
- variant: "primary",
104
- loading: busy,
105
- onClick: () => void accept(invitation.id),
106
- children: text("accept")
107
- })]
28
+ children: invitations.map((invitation) => /* @__PURE__ */ jsx(MyInvitationRow, {
29
+ invitation,
30
+ t,
31
+ busy,
32
+ onJoin: () => void run(async () => {
33
+ await session.organizations.acceptMine(invitation.id);
34
+ reopenIn(basePath);
35
+ })
108
36
  }, invitation.id))
109
37
  })]
110
38
  });
@@ -115,6 +43,7 @@ const YourInvitations = ({ basePath }) => {
115
43
  */
116
44
  const OrganizationsPage = ({ state, basePath }) => {
117
45
  const { session, organizations: settings, state: auth } = useAuth();
46
+ const t = useOrganizationText();
118
47
  const { busy, error, run } = useAction();
119
48
  const user = auth.kind === "signed-in" ? auth.user : void 0;
120
49
  const mayCreate = settings?.create === "everyone" || user !== void 0 && isAdmin(user);
@@ -123,12 +52,12 @@ const OrganizationsPage = ({ state, basePath }) => {
123
52
  className: "mx-auto flex w-full max-w-3xl flex-col gap-4 px-4 py-6 md:px-6",
124
53
  children: [
125
54
  /* @__PURE__ */ jsx(PageHeader, {
126
- title: text("organizations"),
127
- subtitle: text("organizationsSubtitle")
55
+ title: t("organizations"),
56
+ subtitle: t("organizationsSubtitle")
128
57
  }),
129
58
  /* @__PURE__ */ jsxs(AccountSection, {
130
- title: text("yourOrganizations"),
131
- description: state.organizations.length > 0 ? text("memberOf") : text("notMember"),
59
+ title: t("yourOrganizations"),
60
+ description: state.organizations.length > 0 ? t("memberOf") : t("notMember"),
132
61
  children: [/* @__PURE__ */ jsx(SectionError, { message: error ?? state.error }), state.organizations.length > 0 && /* @__PURE__ */ jsx("ul", {
133
62
  className: "divide-y rounded-md border",
134
63
  children: state.organizations.map((organization) => /* @__PURE__ */ jsx(OrganizationRow, {
@@ -143,7 +72,11 @@ const OrganizationsPage = ({ state, basePath }) => {
143
72
  })]
144
73
  }),
145
74
  /* @__PURE__ */ jsx(YourInvitations, { basePath }),
146
- mayCreate && /* @__PURE__ */ jsx(NewOrganization, { basePath }),
75
+ mayCreate && /* @__PURE__ */ jsx(AccountSection, {
76
+ title: t("newOrganization"),
77
+ description: t("newOrganizationDescription"),
78
+ children: /* @__PURE__ */ jsx(NewOrganizationForm, { onCreated: () => reopenIn(basePath) })
79
+ }),
147
80
  (state.current?.globalRoles.length ?? 0) > 0 && /* @__PURE__ */ jsx(AllOrganizations, {
148
81
  basePath,
149
82
  currentId
@@ -152,4 +85,4 @@ const OrganizationsPage = ({ state, basePath }) => {
152
85
  });
153
86
  };
154
87
  //#endregion
155
- export { OrganizationsPage, slugOf };
88
+ export { OrganizationsPage };
@@ -0,0 +1,17 @@
1
+ import { OrganizationInvitation } from "@protobase/client";
2
+ //#region src/organizations/use-my-invitations.d.ts
3
+ export type MyInvitations = {
4
+ state: 'loading';
5
+ } | {
6
+ state: 'failed';
7
+ retry: () => void;
8
+ } | {
9
+ state: 'ready';
10
+ invitations: OrganizationInvitation[];
11
+ };
12
+ /**
13
+ * The pending invitations for the signed-in person's own address, as read in this page load, or that they could not be
14
+ * read, to try again: the start cache's answer may predate an invitation, which an empty list would then hide.
15
+ */
16
+ export declare const useMyInvitations: () => MyInvitations;
17
+ //#endregion
@@ -0,0 +1,30 @@
1
+ import { useAuth } from "../auth/auth-provider.js";
2
+ import { keys } from "../data/query-keys.js";
3
+ import { ClientStartContext, isAnsweredNow, lastFetchFailed } from "../data/start-cache/restored-state.js";
4
+ import { useContext } from "react";
5
+ import { useQuery } from "@tanstack/react-query";
6
+ //#region src/organizations/use-my-invitations.ts
7
+ /**
8
+ * The pending invitations for the signed-in person's own address, as read in this page load, or that they could not be
9
+ * read, to try again: the start cache's answer may predate an invitation, which an empty list would then hide.
10
+ */
11
+ const useMyInvitations = () => {
12
+ const { session } = useAuth();
13
+ const startedAt = useContext(ClientStartContext);
14
+ const query = useQuery({
15
+ queryKey: keys.myInvitations,
16
+ queryFn: () => session.organizations.myInvitations(),
17
+ retry: false
18
+ });
19
+ if (query.data && isAnsweredNow(query, startedAt)) return {
20
+ state: "ready",
21
+ invitations: query.data
22
+ };
23
+ if (lastFetchFailed(query)) return {
24
+ state: "failed",
25
+ retry: () => void query.refetch()
26
+ };
27
+ return { state: "loading" };
28
+ };
29
+ //#endregion
30
+ export { useMyInvitations };
@@ -5,6 +5,10 @@ export type OrganizationsState = {
5
5
  current?: CurrentOrganization;
6
6
  /** The person's organizations. */
7
7
  organizations: Organization[];
8
+ /** Whether `current` was read in this page load, rather than restored from the start cache. */
9
+ fresh: boolean;
10
+ /** Whether the last read failed, also when the start cache's answer stays on screen. */
11
+ failed: boolean;
8
12
  error?: string;
9
13
  reload: () => void;
10
14
  };
@@ -1,8 +1,9 @@
1
1
  import { useAuth } from "../auth/auth-provider.js";
2
2
  import { keys } from "../data/query-keys.js";
3
+ import { ClientStartContext, isAnsweredNow, lastFetchFailed } from "../data/start-cache/restored-state.js";
3
4
  import { authMessage } from "../auth/auth-messages.js";
4
- import { text } from "./messages.js";
5
- import { useCallback } from "react";
5
+ import { useOrganizationText } from "./organization-word.js";
6
+ import { useCallback, useContext } from "react";
6
7
  import { AuthError } from "@protobase/client";
7
8
  import { useQuery } from "@tanstack/react-query";
8
9
  //#region src/organizations/use-organizations.ts
@@ -13,6 +14,8 @@ const none = [];
13
14
  */
14
15
  const useOrganizations = (enabled) => {
15
16
  const { session } = useAuth();
17
+ const t = useOrganizationText();
18
+ const startedAt = useContext(ClientStartContext);
16
19
  const query = useQuery({
17
20
  queryKey: keys.organizations,
18
21
  queryFn: async () => {
@@ -28,10 +31,12 @@ const useOrganizations = (enabled) => {
28
31
  const { refetch } = query;
29
32
  const reload = useCallback(() => void refetch(), [refetch]);
30
33
  const data = enabled ? query.data : void 0;
31
- const error = enabled && query.error ? query.error instanceof AuthError ? authMessage(query.error) : text("couldNotReadOrganizations") : void 0;
34
+ const error = enabled && query.error ? query.error instanceof AuthError ? authMessage(query.error) : t("couldNotReadOrganizations") : void 0;
32
35
  return {
33
36
  current: data?.current,
34
37
  organizations: data?.organizations ?? none,
38
+ fresh: enabled && isAnsweredNow(query, startedAt),
39
+ failed: enabled && lastFetchFailed(query),
35
40
  ...error && { error },
36
41
  reload
37
42
  };
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.118.0";
2
+ var version = "0.119.0";
3
3
  var protobase = { "pluginApi": 1 };
4
4
  //#endregion
5
5
  export { protobase, version };
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/plugins/messages.d.ts
3
3
  export declare const text: {
4
- (id: "loading" | "couldNotLoad" | "pluginsOff" | "pluginOff" | "dismiss" | "answered" | "notObject" | "noName" | "noApi" | "noVersions" | "noModule" | "badStylesheet" | "badVersion", values?: Record<string, MessageValue>): string;
5
- rich(id: "loading" | "couldNotLoad" | "pluginsOff" | "pluginOff" | "dismiss" | "answered" | "notObject" | "noName" | "noApi" | "noVersions" | "noModule" | "badStylesheet" | "badVersion", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "couldNotLoad" | "loading" | "pluginsOff" | "pluginOff" | "dismiss" | "answered" | "notObject" | "noName" | "noApi" | "noVersions" | "noModule" | "badStylesheet" | "badVersion", values?: Record<string, MessageValue>): string;
5
+ rich(id: "couldNotLoad" | "loading" | "pluginsOff" | "pluginOff" | "dismiss" | "answered" | "notObject" | "noName" | "noApi" | "noVersions" | "noModule" | "badStylesheet" | "badVersion", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/primitives/messages.d.ts
3
3
  export declare const text: {
4
- (id: "loading" | "remove" | "next" | "close" | "previous" | "dragToClose", values?: Record<string, MessageValue>): string;
5
- rich(id: "loading" | "remove" | "next" | "close" | "previous" | "dragToClose", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "next" | "remove" | "close" | "loading" | "previous" | "dragToClose", values?: Record<string, MessageValue>): string;
5
+ rich(id: "next" | "remove" | "close" | "loading" | "previous" | "dragToClose", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/record-view/messages.d.ts
3
3
  export declare const text: {
4
- (id: "saving" | "actions" | "tabs" | "headingCount" | "headingCountRecords" | "savedDifferent" | "example" | "savedThis" | "keepMine" | "useTheirs" | "savedAgo" | "notSavedRetrying" | "lastEditedBy" | "lastUpdated" | "viewing", values?: Record<string, MessageValue>): string;
5
- rich(id: "saving" | "actions" | "tabs" | "headingCount" | "headingCountRecords" | "savedDifferent" | "example" | "savedThis" | "keepMine" | "useTheirs" | "savedAgo" | "notSavedRetrying" | "lastEditedBy" | "lastUpdated" | "viewing", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "tabs" | "actions" | "headingCount" | "headingCountRecords" | "savedDifferent" | "example" | "savedThis" | "keepMine" | "useTheirs" | "saving" | "savedAgo" | "notSavedRetrying" | "lastEditedBy" | "lastUpdated" | "viewing", values?: Record<string, MessageValue>): string;
5
+ rich(id: "tabs" | "actions" | "headingCount" | "headingCountRecords" | "savedDifferent" | "example" | "savedThis" | "keepMine" | "useTheirs" | "saving" | "savedAgo" | "notSavedRetrying" | "lastEditedBy" | "lastUpdated" | "viewing", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,6 +1,6 @@
1
1
  //#region src/record-view/use-autosave.d.ts
2
2
  export declare const useAutosave: (initialAgoSeconds: number, ticking: boolean) => {
3
- state: "saving" | "saved";
3
+ state: "saved" | "saving";
4
4
  agoSeconds: number;
5
5
  touch: () => void;
6
6
  };
@@ -1,2 +1,2 @@
1
- (function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{t}from"./react-CuiNlnus.js";import{Lo as n,Xo as r,_a as i,ls as a,us as o}from"./app-B48LQpC1.js";import{t as s}from"./render-node-DEeBoZ9i.js";var c=e(t(),1),l=({tab:e})=>{let t=n();return t?(0,c.jsx)(i,{route:{...e&&{tab:e},pathOf:a},children:(0,c.jsx)(s,{node:t.tree})}):(0,c.jsx)(r,{title:o(`noAccount`),children:o(`noAccountDescription`)})};export{l as AccountPage};
2
- //# debugId=ce5e46a7-14e9-47a0-b7fd-c712972b6cb7
1
+ (function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{t}from"./react-CuiNlnus.js";import{Ho as n,_s as r,pa as i,ts as a,vs as o}from"./app-Bu6FwwHZ.js";import{t as s}from"./render-node-DSmBsYMg.js";var c=e(t(),1),l=({tab:e})=>{let t=n();return t?(0,c.jsx)(i,{route:{...e&&{tab:e},pathOf:r},children:(0,c.jsx)(s,{node:t.tree})}):(0,c.jsx)(a,{title:o(`noAccount`),children:o(`noAccountDescription`)})};export{l as AccountPage};
2
+ //# debugId=50a79fc6-849d-441b-8d6f-f8de454a2a30