@rytass/bpm-core-react 0.18.0 → 0.19.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 (283) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/chunks/{FormBuilderView-BVKY1j_0.js → FormBuilderView-Djlm3y4S.js} +485 -481
  3. package/dist/chunks/FormBuilderView-Djlm3y4S.js.map +1 -0
  4. package/dist/chunks/FormBuilderView-G6uRSywl.cjs +3 -0
  5. package/dist/chunks/FormBuilderView-G6uRSywl.cjs.map +1 -0
  6. package/dist/chunks/{FormRendererView-BsTwZkqU.js → FormRendererView-DHfVgbo6.js} +511 -274
  7. package/dist/chunks/FormRendererView-DHfVgbo6.js.map +1 -0
  8. package/dist/chunks/FormRendererView-DwfFbaip.cjs +6 -0
  9. package/dist/chunks/FormRendererView-DwfFbaip.cjs.map +1 -0
  10. package/dist/chunks/admin-pickers-BjbkBpSJ.cjs +2 -0
  11. package/dist/chunks/admin-pickers-BjbkBpSJ.cjs.map +1 -0
  12. package/dist/chunks/{admin-pickers-Djq3h-UR.js → admin-pickers-DfGxsjpp.js} +42 -42
  13. package/dist/chunks/admin-pickers-DfGxsjpp.js.map +1 -0
  14. package/dist/chunks/{approval-instance-list-page-CPXMP3PL.js → approval-instance-list-page-BnI4t5mD.js} +7 -8
  15. package/dist/chunks/{approval-instance-list-page-CPXMP3PL.js.map → approval-instance-list-page-BnI4t5mD.js.map} +1 -1
  16. package/dist/chunks/{approval-instance-list-page-ax0pm8bt.cjs → approval-instance-list-page-fqvmkBlg.cjs} +2 -2
  17. package/dist/chunks/{approval-instance-list-page-ax0pm8bt.cjs.map → approval-instance-list-page-fqvmkBlg.cjs.map} +1 -1
  18. package/dist/chunks/auth-provider-4BeCw7cI.cjs.map +1 -1
  19. package/dist/chunks/{auth-provider-B5oPmvk2.js → auth-provider-C2b-5mGt.js} +2 -3
  20. package/dist/chunks/{auth-provider-B5oPmvk2.js.map → auth-provider-C2b-5mGt.js.map} +1 -1
  21. package/dist/chunks/{bpm-form-field-Cao0rMol.js → bpm-form-field-9B-Det0u.js} +2 -3
  22. package/dist/chunks/{bpm-form-field-Cao0rMol.js.map → bpm-form-field-9B-Det0u.js.map} +1 -1
  23. package/dist/chunks/bpm-form-field-Bc6k4ZEO.cjs.map +1 -1
  24. package/dist/chunks/{categories-riC33J_j.js → categories-BAdxjNSA.js} +14 -15
  25. package/dist/chunks/{categories-riC33J_j.js.map → categories-BAdxjNSA.js.map} +1 -1
  26. package/dist/chunks/{categories-AxxhqjLZ.cjs → categories-DQUtVEiV.cjs} +2 -2
  27. package/dist/chunks/{categories-AxxhqjLZ.cjs.map → categories-DQUtVEiV.cjs.map} +1 -1
  28. package/dist/chunks/{compose-B1GlrZW9.js → compose-D6zBIc2Z.js} +131 -148
  29. package/dist/chunks/compose-D6zBIc2Z.js.map +1 -0
  30. package/dist/chunks/compose-NH6dsFXD.cjs +2 -0
  31. package/dist/chunks/compose-NH6dsFXD.cjs.map +1 -0
  32. package/dist/chunks/{dashboard-page-DdBvV6YI.js → dashboard-page-BoqNhjT_.js} +5 -6
  33. package/dist/chunks/{dashboard-page-DdBvV6YI.js.map → dashboard-page-BoqNhjT_.js.map} +1 -1
  34. package/dist/chunks/{dashboard-page-BWQBSGDq.cjs → dashboard-page-D7YJ3udk.cjs} +2 -2
  35. package/dist/chunks/{dashboard-page-BWQBSGDq.cjs.map → dashboard-page-D7YJ3udk.cjs.map} +1 -1
  36. package/dist/chunks/{delegations-MxF3uJGW.js → delegations-BfhCDz5e.js} +15 -16
  37. package/dist/chunks/{delegations-MxF3uJGW.js.map → delegations-BfhCDz5e.js.map} +1 -1
  38. package/dist/chunks/{delegations-Ckf03icM.cjs → delegations-BmFGcuhA.cjs} +2 -2
  39. package/dist/chunks/{delegations-Ckf03icM.cjs.map → delegations-BmFGcuhA.cjs.map} +1 -1
  40. package/dist/chunks/{delegations-V9HIe3_P.cjs → delegations-CcS0SHbf.cjs} +2 -2
  41. package/dist/chunks/{delegations-V9HIe3_P.cjs.map → delegations-CcS0SHbf.cjs.map} +1 -1
  42. package/dist/chunks/{delegations-xUt1tj8d.js → delegations-DBh5TT6G.js} +16 -17
  43. package/dist/chunks/{delegations-xUt1tj8d.js.map → delegations-DBh5TT6G.js.map} +1 -1
  44. package/dist/chunks/designer-Be9UI9Tg.cjs +65 -0
  45. package/dist/chunks/designer-Be9UI9Tg.cjs.map +1 -0
  46. package/dist/chunks/{designer-BCLrjb4H.js → designer-uhC_7m2i.js} +1791 -1407
  47. package/dist/chunks/designer-uhC_7m2i.js.map +1 -0
  48. package/dist/chunks/detail-6uw5dmTi.cjs +5 -0
  49. package/dist/chunks/detail-6uw5dmTi.cjs.map +1 -0
  50. package/dist/chunks/{detail-4F39ggBn.js → detail-_GeKqNC-.js} +1012 -972
  51. package/dist/chunks/detail-_GeKqNC-.js.map +1 -0
  52. package/dist/chunks/{format-date-time-CB-LxzqT.js → format-date-time-B0LdmWg4.js} +2 -3
  53. package/dist/chunks/{format-date-time-CB-LxzqT.js.map → format-date-time-B0LdmWg4.js.map} +1 -1
  54. package/dist/chunks/format-date-time-D-cx5M8z.cjs.map +1 -1
  55. package/dist/chunks/{format-member-label-DudVI55w.js → format-member-label-C73FuP-d.js} +2 -3
  56. package/dist/chunks/{format-member-label-DudVI55w.js.map → format-member-label-C73FuP-d.js.map} +1 -1
  57. package/dist/chunks/format-member-label-t7ANTF62.cjs.map +1 -1
  58. package/dist/chunks/{approver-filled-form-Dm3Iw7iw.cjs → instance-error-message-DTARGbGo.cjs} +2 -2
  59. package/dist/chunks/instance-error-message-DTARGbGo.cjs.map +1 -0
  60. package/dist/chunks/{approver-filled-form-ZEwpmsHJ.js → instance-error-message-q6gy5evy.js} +50 -38
  61. package/dist/chunks/instance-error-message-q6gy5evy.js.map +1 -0
  62. package/dist/chunks/language-provider-Bdnx3Gxl.cjs.map +1 -1
  63. package/dist/chunks/{language-provider-B3cEbLe4.js → language-provider-phkWOapf.js} +2 -3
  64. package/dist/chunks/{language-provider-B3cEbLe4.js.map → language-provider-phkWOapf.js.map} +1 -1
  65. package/dist/chunks/{login-C6qlTC6F.js → login-D6cc3bo7.js} +4 -5
  66. package/dist/chunks/{login-C6qlTC6F.js.map → login-D6cc3bo7.js.map} +1 -1
  67. package/dist/chunks/{login-AtVxZBsC.cjs → login-uvVcltrS.cjs} +2 -2
  68. package/dist/chunks/{login-AtVxZBsC.cjs.map → login-uvVcltrS.cjs.map} +1 -1
  69. package/dist/chunks/notifications-Bc4mgSds.cjs.map +1 -1
  70. package/dist/chunks/{notifications-DJ5wzCye.js → notifications-Cvme5Qbl.js} +2 -3
  71. package/dist/chunks/{notifications-DJ5wzCye.js.map → notifications-Cvme5Qbl.js.map} +1 -1
  72. package/dist/chunks/orgs-B_2J2tLX.cjs +2 -0
  73. package/dist/chunks/{orgs-BeeDDWL1.cjs.map → orgs-B_2J2tLX.cjs.map} +1 -1
  74. package/dist/chunks/{orgs-8hje_l2n.js → orgs-DqxMds26.js} +48 -49
  75. package/dist/chunks/{orgs-8hje_l2n.js.map → orgs-DqxMds26.js.map} +1 -1
  76. package/dist/chunks/{providers-B_d5tbCL.js → providers-BbCs23sk.js} +21 -25
  77. package/dist/chunks/{providers-B_d5tbCL.js.map → providers-BbCs23sk.js.map} +1 -1
  78. package/dist/chunks/{providers-chuJvMgv.cjs → providers-D_KAgOOu.cjs} +2 -2
  79. package/dist/chunks/{providers-chuJvMgv.cjs.map → providers-D_KAgOOu.cjs.map} +1 -1
  80. package/dist/chunks/router-adapter--gYs13E8.cjs.map +1 -1
  81. package/dist/chunks/{router-adapter-DftlFTOd.js → router-adapter-CkxCyzf5.js} +2 -3
  82. package/dist/chunks/{router-adapter-DftlFTOd.js.map → router-adapter-CkxCyzf5.js.map} +1 -1
  83. package/dist/chunks/{routes-config-yZbESPlw.js → routes-config-BcNaWJWJ.js} +2 -3
  84. package/dist/chunks/{routes-config-yZbESPlw.js.map → routes-config-BcNaWJWJ.js.map} +1 -1
  85. package/dist/chunks/routes-config-C1j_vFKo.cjs.map +1 -1
  86. package/dist/chunks/task-decision-3d17ZvZE.js +29 -0
  87. package/dist/chunks/task-decision-3d17ZvZE.js.map +1 -0
  88. package/dist/chunks/task-decision-CqZ4WQOC.cjs +2 -0
  89. package/dist/chunks/task-decision-CqZ4WQOC.cjs.map +1 -0
  90. package/dist/chunks/{use-bpm-member-D57LKe_u.js → use-bpm-member-BPzcNU1g.js} +3 -4
  91. package/dist/chunks/{use-bpm-member-D57LKe_u.js.map → use-bpm-member-BPzcNU1g.js.map} +1 -1
  92. package/dist/chunks/use-bpm-member-DpNAQtNC.cjs.map +1 -1
  93. package/dist/chunks/{users-Pl6hY5Y5.js → users-BBtiZ9QQ.js} +22 -25
  94. package/dist/chunks/{users-Pl6hY5Y5.js.map → users-BBtiZ9QQ.js.map} +1 -1
  95. package/dist/chunks/{users-O2L_M3BK.cjs → users-EqSzDhuj.cjs} +2 -2
  96. package/dist/chunks/{users-O2L_M3BK.cjs.map → users-EqSzDhuj.cjs.map} +1 -1
  97. package/dist/components/admin-picker-options.d.cts +11 -0
  98. package/dist/components/admin-picker-options.d.ts +11 -0
  99. package/dist/components/admin-pickers.d.cts +2 -11
  100. package/dist/components/admin-pickers.d.ts +2 -11
  101. package/dist/index.cjs +1 -1
  102. package/dist/index.cjs.map +1 -1
  103. package/dist/index.js +17 -19
  104. package/dist/index.js.map +1 -1
  105. package/dist/lib/task-decision.d.cts +16 -0
  106. package/dist/lib/task-decision.d.ts +16 -0
  107. package/dist/lib/use-org-unit-names.d.cts +10 -0
  108. package/dist/lib/use-org-unit-names.d.ts +10 -0
  109. package/dist/next/index.cjs +1 -1
  110. package/dist/next/index.cjs.map +1 -1
  111. package/dist/next/index.js +7 -8
  112. package/dist/next/index.js.map +1 -1
  113. package/dist/next/workflow-chat-route.cjs +19 -1
  114. package/dist/next/workflow-chat-route.cjs.map +1 -1
  115. package/dist/next/workflow-chat-route.js +2 -3
  116. package/dist/next/workflow-chat-route.js.map +1 -1
  117. package/dist/pages/admin/delegations/index.cjs +1 -1
  118. package/dist/pages/admin/delegations/index.cjs.map +1 -1
  119. package/dist/pages/admin/delegations/index.js +2 -3
  120. package/dist/pages/admin/orgs/index.cjs +1 -1
  121. package/dist/pages/admin/orgs/index.cjs.map +1 -1
  122. package/dist/pages/admin/orgs/index.js +2 -3
  123. package/dist/pages/admin/users/index.cjs +1 -1
  124. package/dist/pages/admin/users/index.cjs.map +1 -1
  125. package/dist/pages/admin/users/index.js +2 -3
  126. package/dist/pages/admin/webhook-endpoints/index.cjs.map +1 -1
  127. package/dist/pages/admin/webhook-endpoints/index.js +1 -2
  128. package/dist/pages/cc/index.cjs.map +1 -1
  129. package/dist/pages/cc/index.js +1 -2
  130. package/dist/pages/dashboard/index.cjs.map +1 -1
  131. package/dist/pages/dashboard/index.js +1 -2
  132. package/dist/pages/delegations/index.cjs +1 -1
  133. package/dist/pages/delegations/index.cjs.map +1 -1
  134. package/dist/pages/delegations/index.js +2 -3
  135. package/dist/pages/inbox/index.cjs.map +1 -1
  136. package/dist/pages/inbox/index.js +1 -2
  137. package/dist/pages/instances/detail/index.cjs +1 -1
  138. package/dist/pages/instances/detail/index.cjs.map +1 -1
  139. package/dist/pages/instances/detail/index.js +2 -3
  140. package/dist/pages/instances/new/index.cjs.map +1 -1
  141. package/dist/pages/instances/new/index.js +1 -2
  142. package/dist/pages/login/index.cjs +1 -1
  143. package/dist/pages/login/index.cjs.map +1 -1
  144. package/dist/pages/login/index.js +2 -3
  145. package/dist/pages/root/index.cjs.map +1 -1
  146. package/dist/pages/root/index.js +1 -2
  147. package/dist/pages/search/index.cjs.map +1 -1
  148. package/dist/pages/search/index.js +1 -2
  149. package/dist/pages/sent/index.cjs.map +1 -1
  150. package/dist/pages/sent/index.js +1 -2
  151. package/dist/pages/settings/notifications/index.cjs.map +1 -1
  152. package/dist/pages/settings/notifications/index.js +2 -3
  153. package/dist/pages/templates/categories/index.cjs +1 -1
  154. package/dist/pages/templates/categories/index.cjs.map +1 -1
  155. package/dist/pages/templates/categories/index.js +2 -3
  156. package/dist/pages/templates/compose/index.cjs +1 -1
  157. package/dist/pages/templates/compose/index.cjs.map +1 -1
  158. package/dist/pages/templates/compose/index.js +2 -3
  159. package/dist/pages/templates/designer/index.cjs +1 -1
  160. package/dist/pages/templates/designer/index.cjs.map +1 -1
  161. package/dist/pages/templates/designer/index.js +2 -3
  162. package/dist/pages/templates/index.cjs.map +1 -1
  163. package/dist/pages/templates/index.js +1 -2
  164. package/dist/pages/templates/versions/index.cjs.map +1 -1
  165. package/dist/pages/templates/versions/index.js +1 -2
  166. package/dist/views/admin/delegations/index.cjs +1 -1
  167. package/dist/views/admin/delegations/index.js +1 -1
  168. package/dist/views/admin/index.cjs +1 -1
  169. package/dist/views/admin/index.js +3 -3
  170. package/dist/views/admin/orgs/index.cjs +1 -1
  171. package/dist/views/admin/orgs/index.js +1 -1
  172. package/dist/views/admin/users/index.cjs +1 -1
  173. package/dist/views/admin/users/index.js +1 -1
  174. package/dist/views/admin/webhook-endpoints/index.cjs +1 -1
  175. package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
  176. package/dist/views/admin/webhook-endpoints/index.js +52 -53
  177. package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
  178. package/dist/views/cc/index.cjs +1 -1
  179. package/dist/views/cc/index.cjs.map +1 -1
  180. package/dist/views/cc/index.js +2 -3
  181. package/dist/views/dashboard/index.cjs +1 -1
  182. package/dist/views/dashboard/index.cjs.map +1 -1
  183. package/dist/views/dashboard/index.js +2 -3
  184. package/dist/views/delegations/index.cjs +1 -1
  185. package/dist/views/delegations/index.js +1 -1
  186. package/dist/views/forms/builder/index.cjs +1 -1
  187. package/dist/views/forms/builder/index.js +1 -1
  188. package/dist/views/forms/renderer/FormRendererView.d.cts +24 -1
  189. package/dist/views/forms/renderer/FormRendererView.d.ts +24 -1
  190. package/dist/views/forms/renderer/file-upload-field.d.cts +84 -0
  191. package/dist/views/forms/renderer/file-upload-field.d.ts +84 -0
  192. package/dist/views/forms/renderer/form-value-readers.d.cts +7 -0
  193. package/dist/views/forms/renderer/form-value-readers.d.ts +7 -0
  194. package/dist/views/forms/renderer/index.cjs +1 -1
  195. package/dist/views/forms/renderer/index.d.cts +1 -0
  196. package/dist/views/forms/renderer/index.d.ts +1 -0
  197. package/dist/views/forms/renderer/index.js +1 -1
  198. package/dist/views/forms/renderer/org-unit-field-options.d.cts +44 -0
  199. package/dist/views/forms/renderer/org-unit-field-options.d.ts +44 -0
  200. package/dist/views/forms/renderer/org-unit-field.d.cts +23 -0
  201. package/dist/views/forms/renderer/org-unit-field.d.ts +23 -0
  202. package/dist/views/inbox/index.cjs +1 -1
  203. package/dist/views/inbox/index.cjs.map +1 -1
  204. package/dist/views/inbox/index.js +133 -137
  205. package/dist/views/inbox/index.js.map +1 -1
  206. package/dist/views/instances/approver-filled-form.d.cts +9 -2
  207. package/dist/views/instances/approver-filled-form.d.ts +9 -2
  208. package/dist/views/instances/detail/index.cjs +1 -1
  209. package/dist/views/instances/detail/index.js +1 -1
  210. package/dist/views/instances/detail/sections/InstanceFormSection.d.cts +19 -2
  211. package/dist/views/instances/detail/sections/InstanceFormSection.d.ts +19 -2
  212. package/dist/views/instances/detail/sections/InstanceHistorySection.d.cts +8 -1
  213. package/dist/views/instances/detail/sections/InstanceHistorySection.d.ts +8 -1
  214. package/dist/views/instances/detail/sections/container-helpers.d.cts +0 -1
  215. package/dist/views/instances/detail/sections/container-helpers.d.ts +0 -1
  216. package/dist/views/instances/detail/sections/shared.d.cts +3 -4
  217. package/dist/views/instances/detail/sections/shared.d.ts +3 -4
  218. package/dist/views/instances/instance-error-message.d.cts +5 -0
  219. package/dist/views/instances/instance-error-message.d.ts +5 -0
  220. package/dist/views/instances/new/index.cjs +1 -1
  221. package/dist/views/instances/new/index.cjs.map +1 -1
  222. package/dist/views/instances/new/index.js +78 -77
  223. package/dist/views/instances/new/index.js.map +1 -1
  224. package/dist/views/login/index.cjs +1 -1
  225. package/dist/views/login/index.js +1 -1
  226. package/dist/views/search/index.cjs +1 -1
  227. package/dist/views/search/index.cjs.map +1 -1
  228. package/dist/views/search/index.js +2 -3
  229. package/dist/views/sent/index.cjs +1 -1
  230. package/dist/views/sent/index.cjs.map +1 -1
  231. package/dist/views/sent/index.js +2 -3
  232. package/dist/views/settings/index.js +1 -1
  233. package/dist/views/settings/notifications/index.js +1 -1
  234. package/dist/views/templates/categories/index.cjs +1 -1
  235. package/dist/views/templates/categories/index.js +1 -1
  236. package/dist/views/templates/compose/index.cjs +1 -1
  237. package/dist/views/templates/compose/index.js +1 -1
  238. package/dist/views/templates/designer/approver-resolver-model.d.cts +211 -0
  239. package/dist/views/templates/designer/approver-resolver-model.d.ts +211 -0
  240. package/dist/views/templates/designer/dry-run-assignee-label.d.cts +2 -0
  241. package/dist/views/templates/designer/dry-run-assignee-label.d.ts +2 -0
  242. package/dist/views/templates/designer/dry-run-sample-data.d.cts +6 -0
  243. package/dist/views/templates/designer/dry-run-sample-data.d.ts +6 -0
  244. package/dist/views/templates/designer/dynamic-form-resolver-options.d.cts +25 -0
  245. package/dist/views/templates/designer/dynamic-form-resolver-options.d.ts +25 -0
  246. package/dist/views/templates/designer/index.cjs +1 -1
  247. package/dist/views/templates/designer/index.js +1 -1
  248. package/dist/views/templates/designer/node-actor-resolver-options.d.cts +38 -0
  249. package/dist/views/templates/designer/node-actor-resolver-options.d.ts +38 -0
  250. package/dist/views/templates/index.cjs +1 -1
  251. package/dist/views/templates/index.cjs.map +1 -1
  252. package/dist/views/templates/index.js +50 -51
  253. package/dist/views/templates/index.js.map +1 -1
  254. package/dist/views/templates/versions/index.cjs +1 -1
  255. package/dist/views/templates/versions/index.cjs.map +1 -1
  256. package/dist/views/templates/versions/index.js +7 -8
  257. package/dist/views/templates/versions/index.js.map +1 -1
  258. package/package.json +3 -3
  259. package/dist/chunks/FormBuilderView-BVKY1j_0.js.map +0 -1
  260. package/dist/chunks/FormBuilderView-SrGltzFT.cjs +0 -3
  261. package/dist/chunks/FormBuilderView-SrGltzFT.cjs.map +0 -1
  262. package/dist/chunks/FormRendererView-BsTwZkqU.js.map +0 -1
  263. package/dist/chunks/FormRendererView-GpsE03np.cjs +0 -4
  264. package/dist/chunks/FormRendererView-GpsE03np.cjs.map +0 -1
  265. package/dist/chunks/admin-pickers-BRHk3qKq.cjs +0 -2
  266. package/dist/chunks/admin-pickers-BRHk3qKq.cjs.map +0 -1
  267. package/dist/chunks/admin-pickers-Djq3h-UR.js.map +0 -1
  268. package/dist/chunks/approver-filled-form-Dm3Iw7iw.cjs.map +0 -1
  269. package/dist/chunks/approver-filled-form-ZEwpmsHJ.js.map +0 -1
  270. package/dist/chunks/compose-B1GlrZW9.js.map +0 -1
  271. package/dist/chunks/compose-DZk-SfHT.cjs +0 -2
  272. package/dist/chunks/compose-DZk-SfHT.cjs.map +0 -1
  273. package/dist/chunks/designer-BCLrjb4H.js.map +0 -1
  274. package/dist/chunks/designer-BYYxEN9L.cjs +0 -65
  275. package/dist/chunks/designer-BYYxEN9L.cjs.map +0 -1
  276. package/dist/chunks/detail-4F39ggBn.js.map +0 -1
  277. package/dist/chunks/detail-BkMtA_0K.cjs +0 -2
  278. package/dist/chunks/detail-BkMtA_0K.cjs.map +0 -1
  279. package/dist/chunks/orgs-BeeDDWL1.cjs +0 -2
  280. package/dist/chunks/task-node-label-BF6UllxP.cjs +0 -2
  281. package/dist/chunks/task-node-label-BF6UllxP.cjs.map +0 -1
  282. package/dist/chunks/task-node-label-CWZgOBj0.js +0 -9
  283. package/dist/chunks/task-node-label-CWZgOBj0.js.map +0 -1
@@ -1,11 +1,10 @@
1
1
  "use client";
2
- import { t as e } from "../../chunks/dashboard-page-DdBvV6YI.js";
2
+ import { t as e } from "../../chunks/dashboard-page-BoqNhjT_.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
- //#region src/views/dashboard/DashboardView.tsx
4
+ // src/views/dashboard/DashboardView.tsx
5
5
  function n() {
6
6
  return /* @__PURE__ */ t(e, {});
7
7
  }
8
- //#endregion
9
8
  export { n as DashboardView };
10
9
 
11
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/delegations-Ckf03icM.cjs");exports.DelegationsView=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/delegations-BmFGcuhA.cjs");exports.DelegationsView=e.t;
@@ -1 +1 @@
1
- export { t as DelegationsView } from "../../chunks/delegations-MxF3uJGW.js";
1
+ export { t as DelegationsView } from "../../chunks/delegations-BfhCDz5e.js";
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/FormBuilderView-SrGltzFT.cjs");exports.FormBuilderView=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/FormBuilderView-G6uRSywl.cjs");exports.FormBuilderView=e.t;
@@ -1 +1 @@
1
- export { t as FormBuilderView } from "../../../chunks/FormBuilderView-BVKY1j_0.js";
1
+ export { t as FormBuilderView } from "../../../chunks/FormBuilderView-Djlm3y4S.js";
@@ -3,9 +3,16 @@ import { FormDataSourceValueSnapshots, FormDefinitionSchema, FormFieldDefinition
3
3
  import { FormRendererValues } from '@rytass/bpm-core-client/form';
4
4
  import { ResolvedFieldAccess } from '@rytass/bpm-core-shared';
5
5
  import { FormDataSourceFieldState, FormRendererDataSourceContext } from './form-data-source-field.cjs';
6
+ import { FileUploadFieldState, FormRendererAttachment } from './file-upload-field.cjs';
6
7
  export interface FormRendererProps {
7
8
  readonly dataSourceContext?: FormRendererDataSourceContext;
8
9
  readonly dataSourceInitialValues?: FormRendererValues;
10
+ /**
11
+ * Attachments the form's `file_upload` values may refer to (for example the
12
+ * instance's `listAttachments`). A field lists each id it holds by the name
13
+ * and size found here.
14
+ */
15
+ readonly attachments?: readonly FormRendererAttachment[];
9
16
  readonly emptyText?: string;
10
17
  readonly errors?: Readonly<Record<string, string>>;
11
18
  /**
@@ -25,6 +32,22 @@ export interface FormRendererProps {
25
32
  readonly maxWidth?: CSSProperties['maxWidth'];
26
33
  readonly onChange?: (values: FormRendererValues) => void;
27
34
  readonly onDataSourceStateChange?: (fieldKey: string, state: Pick<FormDataSourceFieldState, 'hasValue' | 'invalidValues' | 'status'>) => void;
35
+ /**
36
+ * Called when a `file_upload` field starts or settles an upload. A host
37
+ * that submits the form refuses to while any field reports a pending or
38
+ * failed upload (`readFileUploadSubmissionBlockMessage`): those files are
39
+ * listed but not in the value.
40
+ */
41
+ readonly onFileUploadStateChange?: (fieldKey: string, state: FileUploadFieldState) => void;
42
+ /**
43
+ * Opens an attachment a `file_upload` field lists. Without it, only files
44
+ * picked in this form can be downloaded from the field.
45
+ */
46
+ readonly onDownloadAttachment?: (attachmentId: string) => void;
47
+ /**
48
+ * Uploads a file picked in a `file_upload` field and returns the attachment
49
+ * id the value then holds. Without it a `file_upload` field cannot upload.
50
+ */
28
51
  readonly onUploadAttachment?: (field: FormFieldDefinition, file: File) => Promise<{
29
52
  readonly id: string;
30
53
  }>;
@@ -35,5 +58,5 @@ export interface FormRendererProps {
35
58
  readonly uiSchema: FormUiSchema;
36
59
  readonly value?: FormRendererValues;
37
60
  }
38
- export declare function FormRenderer({ dataSourceContext, dataSourceInitialValues, emptyText, errors, fieldAccess, fieldLabelMarkers, maxWidth, onChange, onDataSourceStateChange, onUploadAttachment, optionSnapshots, readonly, schema, singleColumn, uiSchema, value, }: FormRendererProps): ReactElement;
61
+ export declare function FormRenderer({ attachments, dataSourceContext, dataSourceInitialValues, emptyText, errors, fieldAccess, fieldLabelMarkers, maxWidth, onChange, onDataSourceStateChange, onDownloadAttachment, onFileUploadStateChange, onUploadAttachment, optionSnapshots, readonly, schema, singleColumn, uiSchema, value, }: FormRendererProps): ReactElement;
39
62
  export { FormRenderer as FormRendererView };
@@ -3,9 +3,16 @@ import { FormDataSourceValueSnapshots, FormDefinitionSchema, FormFieldDefinition
3
3
  import { FormRendererValues } from '@rytass/bpm-core-client/form';
4
4
  import { ResolvedFieldAccess } from '@rytass/bpm-core-shared';
5
5
  import { FormDataSourceFieldState, FormRendererDataSourceContext } from './form-data-source-field.js';
6
+ import { FileUploadFieldState, FormRendererAttachment } from './file-upload-field.js';
6
7
  export interface FormRendererProps {
7
8
  readonly dataSourceContext?: FormRendererDataSourceContext;
8
9
  readonly dataSourceInitialValues?: FormRendererValues;
10
+ /**
11
+ * Attachments the form's `file_upload` values may refer to (for example the
12
+ * instance's `listAttachments`). A field lists each id it holds by the name
13
+ * and size found here.
14
+ */
15
+ readonly attachments?: readonly FormRendererAttachment[];
9
16
  readonly emptyText?: string;
10
17
  readonly errors?: Readonly<Record<string, string>>;
11
18
  /**
@@ -25,6 +32,22 @@ export interface FormRendererProps {
25
32
  readonly maxWidth?: CSSProperties['maxWidth'];
26
33
  readonly onChange?: (values: FormRendererValues) => void;
27
34
  readonly onDataSourceStateChange?: (fieldKey: string, state: Pick<FormDataSourceFieldState, 'hasValue' | 'invalidValues' | 'status'>) => void;
35
+ /**
36
+ * Called when a `file_upload` field starts or settles an upload. A host
37
+ * that submits the form refuses to while any field reports a pending or
38
+ * failed upload (`readFileUploadSubmissionBlockMessage`): those files are
39
+ * listed but not in the value.
40
+ */
41
+ readonly onFileUploadStateChange?: (fieldKey: string, state: FileUploadFieldState) => void;
42
+ /**
43
+ * Opens an attachment a `file_upload` field lists. Without it, only files
44
+ * picked in this form can be downloaded from the field.
45
+ */
46
+ readonly onDownloadAttachment?: (attachmentId: string) => void;
47
+ /**
48
+ * Uploads a file picked in a `file_upload` field and returns the attachment
49
+ * id the value then holds. Without it a `file_upload` field cannot upload.
50
+ */
28
51
  readonly onUploadAttachment?: (field: FormFieldDefinition, file: File) => Promise<{
29
52
  readonly id: string;
30
53
  }>;
@@ -35,5 +58,5 @@ export interface FormRendererProps {
35
58
  readonly uiSchema: FormUiSchema;
36
59
  readonly value?: FormRendererValues;
37
60
  }
38
- export declare function FormRenderer({ dataSourceContext, dataSourceInitialValues, emptyText, errors, fieldAccess, fieldLabelMarkers, maxWidth, onChange, onDataSourceStateChange, onUploadAttachment, optionSnapshots, readonly, schema, singleColumn, uiSchema, value, }: FormRendererProps): ReactElement;
61
+ export declare function FormRenderer({ attachments, dataSourceContext, dataSourceInitialValues, emptyText, errors, fieldAccess, fieldLabelMarkers, maxWidth, onChange, onDataSourceStateChange, onDownloadAttachment, onFileUploadStateChange, onUploadAttachment, optionSnapshots, readonly, schema, singleColumn, uiSchema, value, }: FormRendererProps): ReactElement;
39
62
  export { FormRenderer as FormRendererView };
@@ -0,0 +1,84 @@
1
+ import { ReactElement } from 'react';
2
+ import { FileUploadFieldDefinition, FormFieldDefinition, FormFieldValue } from '@rytass/bpm-core-shared/form';
3
+ /**
4
+ * What a `file_upload` field needs to know about an attachment it did not
5
+ * upload itself (a resubmitted case, a stored instance) to list it. The shape
6
+ * is a subset of `AttachmentRecord`, so a host passes its attachment list as is.
7
+ */
8
+ export interface FormRendererAttachment {
9
+ readonly filename: string;
10
+ readonly id: string;
11
+ readonly sizeBytes: number | string;
12
+ }
13
+ /**
14
+ * Where a `file_upload` field stands, reported to the host through
15
+ * `FormRenderer`'s `onFileUploadStateChange`.
16
+ */
17
+ export interface FileUploadFieldState {
18
+ /** Files that failed to upload. They are listed, but not in the value. */
19
+ readonly failedCount: number;
20
+ /** Files still uploading. They are listed, but not in the value yet. */
21
+ readonly pendingCount: number;
22
+ }
23
+ /**
24
+ * The copy to show when a submission is refused because a `file_upload` field
25
+ * has not settled. An upload still running is a "wait a moment"; a failed one
26
+ * needs the filler to retry or remove it. Returns `null` when nothing blocks.
27
+ *
28
+ * Without this check a submit made while a file is uploading sends the form
29
+ * without that attachment, although the field lists the file.
30
+ */
31
+ export declare function readFileUploadSubmissionBlockMessage(states: readonly Pick<FileUploadFieldState, 'failedCount' | 'pendingCount'>[]): string | null;
32
+ export interface FileUploadFieldStates {
33
+ /** `readFileUploadSubmissionBlockMessage` over every field reported so far. */
34
+ readonly blockMessage: string | null;
35
+ /** Pass to `FormRenderer`'s `onFileUploadStateChange`. */
36
+ readonly onFileUploadStateChange: (fieldKey: string, state: FileUploadFieldState) => void;
37
+ }
38
+ /**
39
+ * Collects what a form's `file_upload` fields report, for a host that has to
40
+ * refuse a submit while one of them is uploading or holds a failed upload.
41
+ */
42
+ export declare function useFileUploadFieldStates(): FileUploadFieldStates;
43
+ export interface FileUploadFieldControlProps {
44
+ /** Metadata for listing attachments this control did not upload. */
45
+ readonly attachments?: readonly FormRendererAttachment[];
46
+ readonly field: FileUploadFieldDefinition;
47
+ /**
48
+ * Receives the attachment ids the field now holds. Like a controlled input,
49
+ * the host renders the value back: the list shows the value it is given.
50
+ */
51
+ readonly onChange: (value: FormFieldValue | undefined) => void;
52
+ /** Opens an attachment the value holds. Without it, only files picked here download. */
53
+ readonly onDownloadAttachment?: (attachmentId: string) => void;
54
+ readonly onStateChange?: (state: FileUploadFieldState) => void;
55
+ readonly onUploadAttachment?: (field: FormFieldDefinition, file: File) => Promise<{
56
+ readonly id: string;
57
+ }>;
58
+ readonly readonly: boolean;
59
+ readonly value: FormFieldValue | undefined;
60
+ }
61
+ /**
62
+ * The `file_upload` control.
63
+ *
64
+ * Mezzanine's `Upload` is fully controlled: it renders `files` and resets its
65
+ * working list to that prop after every render, so the list is built here.
66
+ *
67
+ * What is attached is the host's value, and only that: every id it holds is
68
+ * listed — a file picked here by its own `File`, any other id by the name and
69
+ * size in `attachments` (or as an unnamed attachment without them) — so each
70
+ * one can be removed and counts towards `maxFiles`. Uploads still running and
71
+ * uploads that failed are listed too, in the order `Upload` keeps, but are not
72
+ * in the value; `onStateChange` reports them so the host can refuse a submit.
73
+ *
74
+ * The value emitted on a change is read off the list `Upload` hands back —
75
+ * the finished files in it, in order — never off this control's state. That
76
+ * list is `Upload`'s own working copy, which it updates the moment it emits,
77
+ * so it is current even when two uploads finish before the host re-renders.
78
+ * `Upload` calls the `onChange` it captured when a file was picked, so it is
79
+ * given a stable function that forwards to the latest handler.
80
+ *
81
+ * Without `onUploadAttachment` nothing can be uploaded, so the control is
82
+ * disabled and says so rather than listing a file no attachment stands behind.
83
+ */
84
+ export declare function FileUploadFieldControl({ attachments, field, onChange, onDownloadAttachment, onStateChange, onUploadAttachment, readonly, value, }: FileUploadFieldControlProps): ReactElement;
@@ -0,0 +1,84 @@
1
+ import { ReactElement } from 'react';
2
+ import { FileUploadFieldDefinition, FormFieldDefinition, FormFieldValue } from '@rytass/bpm-core-shared/form';
3
+ /**
4
+ * What a `file_upload` field needs to know about an attachment it did not
5
+ * upload itself (a resubmitted case, a stored instance) to list it. The shape
6
+ * is a subset of `AttachmentRecord`, so a host passes its attachment list as is.
7
+ */
8
+ export interface FormRendererAttachment {
9
+ readonly filename: string;
10
+ readonly id: string;
11
+ readonly sizeBytes: number | string;
12
+ }
13
+ /**
14
+ * Where a `file_upload` field stands, reported to the host through
15
+ * `FormRenderer`'s `onFileUploadStateChange`.
16
+ */
17
+ export interface FileUploadFieldState {
18
+ /** Files that failed to upload. They are listed, but not in the value. */
19
+ readonly failedCount: number;
20
+ /** Files still uploading. They are listed, but not in the value yet. */
21
+ readonly pendingCount: number;
22
+ }
23
+ /**
24
+ * The copy to show when a submission is refused because a `file_upload` field
25
+ * has not settled. An upload still running is a "wait a moment"; a failed one
26
+ * needs the filler to retry or remove it. Returns `null` when nothing blocks.
27
+ *
28
+ * Without this check a submit made while a file is uploading sends the form
29
+ * without that attachment, although the field lists the file.
30
+ */
31
+ export declare function readFileUploadSubmissionBlockMessage(states: readonly Pick<FileUploadFieldState, 'failedCount' | 'pendingCount'>[]): string | null;
32
+ export interface FileUploadFieldStates {
33
+ /** `readFileUploadSubmissionBlockMessage` over every field reported so far. */
34
+ readonly blockMessage: string | null;
35
+ /** Pass to `FormRenderer`'s `onFileUploadStateChange`. */
36
+ readonly onFileUploadStateChange: (fieldKey: string, state: FileUploadFieldState) => void;
37
+ }
38
+ /**
39
+ * Collects what a form's `file_upload` fields report, for a host that has to
40
+ * refuse a submit while one of them is uploading or holds a failed upload.
41
+ */
42
+ export declare function useFileUploadFieldStates(): FileUploadFieldStates;
43
+ export interface FileUploadFieldControlProps {
44
+ /** Metadata for listing attachments this control did not upload. */
45
+ readonly attachments?: readonly FormRendererAttachment[];
46
+ readonly field: FileUploadFieldDefinition;
47
+ /**
48
+ * Receives the attachment ids the field now holds. Like a controlled input,
49
+ * the host renders the value back: the list shows the value it is given.
50
+ */
51
+ readonly onChange: (value: FormFieldValue | undefined) => void;
52
+ /** Opens an attachment the value holds. Without it, only files picked here download. */
53
+ readonly onDownloadAttachment?: (attachmentId: string) => void;
54
+ readonly onStateChange?: (state: FileUploadFieldState) => void;
55
+ readonly onUploadAttachment?: (field: FormFieldDefinition, file: File) => Promise<{
56
+ readonly id: string;
57
+ }>;
58
+ readonly readonly: boolean;
59
+ readonly value: FormFieldValue | undefined;
60
+ }
61
+ /**
62
+ * The `file_upload` control.
63
+ *
64
+ * Mezzanine's `Upload` is fully controlled: it renders `files` and resets its
65
+ * working list to that prop after every render, so the list is built here.
66
+ *
67
+ * What is attached is the host's value, and only that: every id it holds is
68
+ * listed — a file picked here by its own `File`, any other id by the name and
69
+ * size in `attachments` (or as an unnamed attachment without them) — so each
70
+ * one can be removed and counts towards `maxFiles`. Uploads still running and
71
+ * uploads that failed are listed too, in the order `Upload` keeps, but are not
72
+ * in the value; `onStateChange` reports them so the host can refuse a submit.
73
+ *
74
+ * The value emitted on a change is read off the list `Upload` hands back —
75
+ * the finished files in it, in order — never off this control's state. That
76
+ * list is `Upload`'s own working copy, which it updates the moment it emits,
77
+ * so it is current even when two uploads finish before the host re-renders.
78
+ * `Upload` calls the `onChange` it captured when a file was picked, so it is
79
+ * given a stable function that forwards to the latest handler.
80
+ *
81
+ * Without `onUploadAttachment` nothing can be uploaded, so the control is
82
+ * disabled and says so rather than listing a file no attachment stands behind.
83
+ */
84
+ export declare function FileUploadFieldControl({ attachments, field, onChange, onDownloadAttachment, onStateChange, onUploadAttachment, readonly, value, }: FileUploadFieldControlProps): ReactElement;
@@ -0,0 +1,7 @@
1
+ import { FormFieldValue } from '@rytass/bpm-core-shared/form';
2
+ /**
3
+ * A multi-value field's ids or option values, or `[]` for anything else.
4
+ * A table value is also an array, so the element check is what separates a
5
+ * multi-select or `file_upload` value from table rows.
6
+ */
7
+ export declare function readStringArrayValue(value: FormFieldValue | undefined): readonly string[];
@@ -0,0 +1,7 @@
1
+ import { FormFieldValue } from '@rytass/bpm-core-shared/form';
2
+ /**
3
+ * A multi-value field's ids or option values, or `[]` for anything else.
4
+ * A table value is also an array, so the element check is what separates a
5
+ * multi-select or `file_upload` value from table rows.
6
+ */
7
+ export declare function readStringArrayValue(value: FormFieldValue | undefined): readonly string[];
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/FormRendererView-GpsE03np.cjs");exports.FormRenderer=e.t,exports.FormRendererView=e.t,exports.isFormDataSourceFieldSubmissionBlocked=e.i,exports.readFormDataSourceFieldStatusMessage=e.a,exports.readFormDataSourceSubmissionBlockMessage=e.o,exports.useFormDataSourceField=e.s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/FormRendererView-DwfFbaip.cjs");exports.FormRenderer=e.t,exports.FormRendererView=e.t,exports.isFormDataSourceFieldSubmissionBlocked=e.s,exports.readFileUploadSubmissionBlockMessage=e.a,exports.readFormDataSourceFieldStatusMessage=e.c,exports.readFormDataSourceSubmissionBlockMessage=e.l,exports.useFormDataSourceField=e.u;
@@ -1,2 +1,3 @@
1
1
  export * from './FormRendererView.cjs';
2
2
  export * from './form-data-source-field.cjs';
3
+ export { readFileUploadSubmissionBlockMessage, type FileUploadFieldState, type FormRendererAttachment, } from './file-upload-field.cjs';
@@ -1,2 +1,3 @@
1
1
  export * from './FormRendererView.js';
2
2
  export * from './form-data-source-field.js';
3
+ export { readFileUploadSubmissionBlockMessage, type FileUploadFieldState, type FormRendererAttachment, } from './file-upload-field.js';
@@ -1 +1 @@
1
- export { t as FormRenderer, t as FormRendererView, i as isFormDataSourceFieldSubmissionBlocked, a as readFormDataSourceFieldStatusMessage, o as readFormDataSourceSubmissionBlockMessage, s as useFormDataSourceField } from "../../../chunks/FormRendererView-BsTwZkqU.js";
1
+ export { t as FormRenderer, t as FormRendererView, s as isFormDataSourceFieldSubmissionBlocked, a as readFileUploadSubmissionBlockMessage, c as readFormDataSourceFieldStatusMessage, l as readFormDataSourceSubmissionBlockMessage, u as useFormDataSourceField } from "../../../chunks/FormRendererView-DHfVgbo6.js";
@@ -0,0 +1,44 @@
1
+ import { FormFieldValue } from '@rytass/bpm-core-shared/form';
2
+ import { OrgUnitOptionRecord } from '@rytass/bpm-core-client/organization';
3
+ /**
4
+ * One pickable organization unit, shaped for Mezzanine `AutoComplete` (`id` +
5
+ * `name`). `unresolved` marks a placeholder written while the stored id has no
6
+ * name yet (the id itself is shown) or when the server cannot give one
7
+ * (「未知組織」), so a real name arriving later replaces the placeholder.
8
+ */
9
+ export type OrgUnitFieldOption = Readonly<{
10
+ id: string;
11
+ name: string;
12
+ unresolved?: boolean;
13
+ }>;
14
+ export declare const UNKNOWN_ORG_UNIT_NAME = "\u672A\u77E5\u7D44\u7E54";
15
+ export declare const DELETED_ORG_UNIT_SUFFIX = "\uFF08\u5DF2\u522A\u9664\uFF09";
16
+ export declare function readOrgUnitFieldOption(record: OrgUnitOptionRecord): OrgUnitFieldOption;
17
+ /** The id stands in for the name until the lookup comes back. */
18
+ export declare function readPendingOrgUnitFieldOption(orgUnitId: string): OrgUnitFieldOption;
19
+ export declare function readUnknownOrgUnitFieldOption(orgUnitId: string): OrgUnitFieldOption;
20
+ /**
21
+ * The stored value as an option. An id nobody has named yet shows as itself;
22
+ * one the server could not name shows as 「未知組織」 (it is in `knownOptions` as
23
+ * a placeholder), so the filler can still see and replace it.
24
+ */
25
+ export declare function readSelectedOrgUnitFieldOption(value: FormFieldValue | undefined, knownOptions: readonly OrgUnitFieldOption[]): OrgUnitFieldOption | null;
26
+ /**
27
+ * The stored id that no known option covers yet, or `null`. An id the server
28
+ * could not name is covered by its 「未知組織」 placeholder, so it is not asked
29
+ * for again.
30
+ */
31
+ export declare function readUnresolvedOrgUnitId(value: FormFieldValue | undefined, knownOptions: readonly OrgUnitFieldOption[]): string | null;
32
+ /**
33
+ * Adds `nextOptions` to `currentOptions`. A named option replaces an unresolved
34
+ * placeholder with the same id, compared without regard to case like every
35
+ * other id match here; otherwise the first one seen wins. Returns
36
+ * `currentOptions` itself when nothing changed, so state setters can bail out
37
+ * of a re-render.
38
+ */
39
+ export declare function mergeOrgUnitFieldOptions(currentOptions: readonly OrgUnitFieldOption[], nextOptions: readonly OrgUnitFieldOption[]): readonly OrgUnitFieldOption[];
40
+ /**
41
+ * What a picker change writes back. Nothing picked is `undefined`, the same as
42
+ * every other optional field.
43
+ */
44
+ export declare function readOrgUnitFieldValue(selected: OrgUnitFieldOption | null): FormFieldValue | undefined;
@@ -0,0 +1,44 @@
1
+ import { FormFieldValue } from '@rytass/bpm-core-shared/form';
2
+ import { OrgUnitOptionRecord } from '@rytass/bpm-core-client/organization';
3
+ /**
4
+ * One pickable organization unit, shaped for Mezzanine `AutoComplete` (`id` +
5
+ * `name`). `unresolved` marks a placeholder written while the stored id has no
6
+ * name yet (the id itself is shown) or when the server cannot give one
7
+ * (「未知組織」), so a real name arriving later replaces the placeholder.
8
+ */
9
+ export type OrgUnitFieldOption = Readonly<{
10
+ id: string;
11
+ name: string;
12
+ unresolved?: boolean;
13
+ }>;
14
+ export declare const UNKNOWN_ORG_UNIT_NAME = "\u672A\u77E5\u7D44\u7E54";
15
+ export declare const DELETED_ORG_UNIT_SUFFIX = "\uFF08\u5DF2\u522A\u9664\uFF09";
16
+ export declare function readOrgUnitFieldOption(record: OrgUnitOptionRecord): OrgUnitFieldOption;
17
+ /** The id stands in for the name until the lookup comes back. */
18
+ export declare function readPendingOrgUnitFieldOption(orgUnitId: string): OrgUnitFieldOption;
19
+ export declare function readUnknownOrgUnitFieldOption(orgUnitId: string): OrgUnitFieldOption;
20
+ /**
21
+ * The stored value as an option. An id nobody has named yet shows as itself;
22
+ * one the server could not name shows as 「未知組織」 (it is in `knownOptions` as
23
+ * a placeholder), so the filler can still see and replace it.
24
+ */
25
+ export declare function readSelectedOrgUnitFieldOption(value: FormFieldValue | undefined, knownOptions: readonly OrgUnitFieldOption[]): OrgUnitFieldOption | null;
26
+ /**
27
+ * The stored id that no known option covers yet, or `null`. An id the server
28
+ * could not name is covered by its 「未知組織」 placeholder, so it is not asked
29
+ * for again.
30
+ */
31
+ export declare function readUnresolvedOrgUnitId(value: FormFieldValue | undefined, knownOptions: readonly OrgUnitFieldOption[]): string | null;
32
+ /**
33
+ * Adds `nextOptions` to `currentOptions`. A named option replaces an unresolved
34
+ * placeholder with the same id, compared without regard to case like every
35
+ * other id match here; otherwise the first one seen wins. Returns
36
+ * `currentOptions` itself when nothing changed, so state setters can bail out
37
+ * of a re-render.
38
+ */
39
+ export declare function mergeOrgUnitFieldOptions(currentOptions: readonly OrgUnitFieldOption[], nextOptions: readonly OrgUnitFieldOption[]): readonly OrgUnitFieldOption[];
40
+ /**
41
+ * What a picker change writes back. Nothing picked is `undefined`, the same as
42
+ * every other optional field.
43
+ */
44
+ export declare function readOrgUnitFieldValue(selected: OrgUnitFieldOption | null): FormFieldValue | undefined;
@@ -0,0 +1,23 @@
1
+ import { ReactElement } from 'react';
2
+ import { FormFieldValue } from '@rytass/bpm-core-shared/form';
3
+ export interface OrgUnitFieldControlProps {
4
+ readonly name: string;
5
+ readonly onChange: (value: FormFieldValue | undefined) => void;
6
+ readonly placeholder?: string;
7
+ readonly readonly: boolean;
8
+ readonly size?: 'main' | 'sub';
9
+ readonly value: FormFieldValue | undefined;
10
+ }
11
+ export declare const ORG_UNIT_SEARCH_FAILED_TEXT = "\u641C\u5C0B\u7D44\u7E54\u5931\u6557\uFF0C\u8ACB\u7A0D\u5F8C\u518D\u8A66\u3002";
12
+ /**
13
+ * 組織選擇 picker. The stored value is one organization unit id. Searching and
14
+ * name lookup use the picker queries open to any signed-in member
15
+ * (`searchOrgUnitOptions` / `resolveOrgUnitOptions`), not the designer-only
16
+ * organization directory.
17
+ *
18
+ * A stored id shows as itself until its name comes back, then as the name
19
+ * (「(已刪除)」 after it for a retired unit). An id the server cannot name
20
+ * — unknown, or the lookup failed — shows as 「未知組織」 and is not asked for
21
+ * again unless a later search returns the unit.
22
+ */
23
+ export declare function OrgUnitFieldControl({ name, onChange, placeholder, readonly, size, value, }: OrgUnitFieldControlProps): ReactElement;
@@ -0,0 +1,23 @@
1
+ import { ReactElement } from 'react';
2
+ import { FormFieldValue } from '@rytass/bpm-core-shared/form';
3
+ export interface OrgUnitFieldControlProps {
4
+ readonly name: string;
5
+ readonly onChange: (value: FormFieldValue | undefined) => void;
6
+ readonly placeholder?: string;
7
+ readonly readonly: boolean;
8
+ readonly size?: 'main' | 'sub';
9
+ readonly value: FormFieldValue | undefined;
10
+ }
11
+ export declare const ORG_UNIT_SEARCH_FAILED_TEXT = "\u641C\u5C0B\u7D44\u7E54\u5931\u6557\uFF0C\u8ACB\u7A0D\u5F8C\u518D\u8A66\u3002";
12
+ /**
13
+ * 組織選擇 picker. The stored value is one organization unit id. Searching and
14
+ * name lookup use the picker queries open to any signed-in member
15
+ * (`searchOrgUnitOptions` / `resolveOrgUnitOptions`), not the designer-only
16
+ * organization directory.
17
+ *
18
+ * A stored id shows as itself until its name comes back, then as the name
19
+ * (「(已刪除)」 after it for a retired unit). An id the server cannot name
20
+ * — unknown, or the lookup failed — shows as 「未知組織」 and is not asked for
21
+ * again unless a later search returns the unit.
22
+ */
23
+ export declare function OrgUnitFieldControl({ name, onChange, placeholder, readonly, size, value, }: OrgUnitFieldControlProps): ReactElement;
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/rolldown-runtime-BocRIvOZ.cjs"),t=require("../../chunks/router-adapter--gYs13E8.cjs"),n=require("../../chunks/auth-provider-4BeCw7cI.cjs"),r=require("../../chunks/format-date-time-D-cx5M8z.cjs"),i=require("../../chunks/routes-config-C1j_vFKo.cjs"),a=require("../../chunks/task-node-label-BF6UllxP.cjs");let o=require("react"),s=require("@mezzanine-ui/react"),c=require("react/jsx-runtime"),l=require("@rytass/bpm-core-client/workflow"),u=require("@mezzanine-ui/react/ContentHeader");u=e.t(u,1);let d=require("@mezzanine-ui/icons");var f=100,p={display:`grid`,gap:`var(--mzn-spacing-gap-base)`,marginBottom:`var(--mzn-spacing-padding-vertical-spacious)`};function m(){let e=t.r(),a=i.r(),{member:f}=n.n(),m=f?.memberId??null,[_,b]=(0,o.useState)(`pending`),[x,S]=(0,o.useState)(null),[C,w]=(0,o.useState)([]),[E,O]=(0,o.useState)(!0),[A,j]=(0,o.useState)([]),[M,N]=(0,o.useState)([]),[F,I]=(0,o.useState)(!1);(0,o.useEffect)(()=>{m&&G()},[m]);let L=(0,o.useMemo)(()=>[{dataIndex:`caseTitle`,key:`caseTitle`,title:`案件`,width:280},{dataIndex:`nodeText`,key:`nodeText`,title:`節點`,width:180},{dataIndex:`statusLabel`,key:`statusLabel`,title:`狀態`,width:120},{key:`fill`,render:e=>e.hasFillableFields?(0,c.jsx)(s.Badge,{size:`sub`,text:`需補填`,variant:`dot-warning`}):null,title:`補填`,width:120},{key:`slaDueAt`,render:e=>(0,c.jsx)(s.Typography,{color:e.slaStatusColor,component:`span`,variant:`body`,children:e.slaStatusText}),title:`SLA`,width:180},{key:`createdAt`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:r.t(e.createdAt)}),title:`建立時間`,width:220}],[]),R=(0,o.useMemo)(()=>({render:t=>[{name:`處理`,onClick:()=>e.push(a.caseDetail(t.instanceId))}],variant:`base-secondary`,width:88}),[e,a]),z=(0,o.useMemo)(()=>[{dataIndex:`caseTitle`,key:`caseTitle`,title:`案件`,width:280},{key:`startedAt`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:r.t(e.startedAt)}),title:`發起時間`,width:220}],[]),B=(0,o.useMemo)(()=>({render:t=>[{name:`重新送出`,onClick:()=>e.push(a.caseDetail(t.id))}],variant:`base-secondary`,width:120}),[e,a]),V=(0,o.useMemo)(()=>[{dataIndex:`caseTitle`,key:`caseTitle`,title:`案件`,width:280},{dataIndex:`nodeText`,key:`nodeText`,title:`節點`,width:180},{key:`decisionLabel`,render:e=>(0,c.jsx)(s.Typography,{color:T(e.decisionAction),component:`span`,variant:`body`,children:e.decisionLabel}),title:`決議`,width:120},{key:`decisionComment`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:e.decisionCommentText}),title:`意見`,width:240},{key:`instanceStateLabel`,render:e=>(0,c.jsx)(s.Typography,{color:D(e.instanceState),component:`span`,variant:`body`,children:e.instanceStateLabel}),title:`流程狀態`,width:140},{key:`decidedAt`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:k(e.decidedAt)}),title:`簽核時間`,width:220}],[]),H=(0,o.useMemo)(()=>({render:t=>[{name:`查看`,onClick:()=>e.push(a.caseDetail(t.instanceId))}],variant:`base-secondary`,width:88}),[e,a]),U=(0,o.useMemo)(()=>C.filter(e=>e.instanceState===`RUNNING`),[C]);function W(e){b(e===`history`||e===`pending`||e===`tracking`?e:`pending`)}async function G(){O(!0),S(null);try{if(!m){j([]),w([]),N([]),I(!1);return}let[e,t,n]=await Promise.all([(0,l.listInboxTasks)(m),(0,l.listApprovalHistoryTasks)(m),g(m)]),[r,i]=await Promise.all([v(e),y(t)]);j(r),w(i),N(n?.rows??[]),I(n?.truncated??!1)}catch(e){S(P(e))}finally{O(!1)}}return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.PageHeader,{children:(0,c.jsx)(u.default,{description:`目前以 ${f?.name??m??`目前登入會員`} 查詢待處理與歷史簽核任務。`,title:`我的待簽`,children:(0,c.jsx)(s.Button,{icon:d.PlusIcon,iconType:`leading`,onClick:()=>e.push(a.caseNew()),variant:`base-primary`,children:`發起簽核`})})}),(0,c.jsx)(s.SectionGroup,{children:(0,c.jsxs)(s.Section,{children:[x?(0,c.jsx)(s.Typography,{color:`text-error`,variant:`body`,children:x}):null,(0,c.jsxs)(s.Tab,{activeKey:_,onChange:W,size:`sub`,children:[(0,c.jsx)(s.TabItem,{badgeCount:E?void 0:A.length,children:`待簽核`},`pending`),(0,c.jsx)(s.TabItem,{badgeCount:E?void 0:U.length,children:`已處理未結束`},`tracking`),(0,c.jsx)(s.TabItem,{children:`歷史簽核記錄`},`history`)]}),_===`pending`&&(M.length>0||F)?(0,c.jsxs)(`div`,{"data-returned-instances":``,style:p,children:[M.length>0?(0,c.jsx)(s.Typography,{component:`h2`,variant:`label-primary`,children:`被退回待重送`}):null,(0,c.jsx)(s.Typography,{color:`text-neutral`,variant:`caption`,children:h(M.length>0,F)}),M.length>0?(0,c.jsx)(s.Table,{actions:B,columns:z,dataSource:[...M],fullWidth:!0}):null]}):null,_===`pending`?(0,c.jsx)(s.Table,{actions:R,columns:L,dataSource:A,fullWidth:!0,loading:E}):null,_===`tracking`?(0,c.jsx)(s.Table,{actions:H,columns:V,dataSource:U,fullWidth:!0,loading:E}):null,_===`history`?(0,c.jsx)(s.Table,{actions:H,columns:V,dataSource:C,fullWidth:!0,loading:E}):null]})})]})}function h(e,t){return e?t?`你發起的案件被退回,請修改後重新送出。可能還有其他被退回的案件,請到「我發起的」查看。`:`你發起的案件被退回,請修改後重新送出。`:`前 ${f} 筆被退回的案件中沒有你發起的,可能還有其他被退回的案件,請到「我發起的」查看。`}async function g(e){try{let t=await(0,l.listApprovalInstancesPage)({page:1,pageSize:f,searchText:null,state:`RETURNED`,templateId:null,view:`SENT`});return{rows:_(t.instances,e),truncated:t.totalCount>t.instances.length}}catch{return null}}function _(e,t){return e.filter(e=>e.initiatorMemberId===t).map(e=>({caseTitle:(0,l.readApprovalInstanceCaseTitle)(e),id:e.id,key:e.id,startedAt:e.startedAt}))}async function v(e){let t=await b(e);return e.map((e,n)=>({...e,caseTitle:x(e,t[n]??null),key:e.id,nodeText:a.t(e),slaStatusColor:j(e.slaDueAt),slaStatusText:A(e.slaDueAt),statusLabel:N(e.status)}))}async function y(e){let[t,n]=await Promise.all([Promise.all(e.map(e=>(0,l.listTaskDecisions)(e.id))),b(e)]);return e.map((e,r)=>{let i=S(t[r]??[]),o=n[r]??null;return{...e,caseTitle:x(e,o),decisionAction:i?.action??null,decisionComment:i?.comment??null,decisionCommentText:O(i?.comment??null),decisionLabel:w(i?.action??null),decidedAt:i?.decidedAt??e.completedAt,instanceState:o?.state??null,instanceStateLabel:E(o?.state??null),key:e.id,nodeText:a.t(e)}})}async function b(e){return Promise.all(e.map(async e=>{try{return(await(0,l.readApprovalInstance)(e.instanceId)).instance}catch{return null}}))}function x(e,t){return t?(0,l.readApprovalInstanceCaseTitle)(t):e.instanceId}function S(e){return[...e].sort(C)[0]??null}function C(e,t){return new Date(t.decidedAt).getTime()-new Date(e.decidedAt).getTime()}function w(e){return e===`APPROVED`?`同意`:e===`REJECTED`?`拒絕`:e===`RETURNED`?`退回`:e===`TRANSFERRED`?`轉派`:`未記錄`}function T(e){return e===`APPROVED`?`text-success`:e===`REJECTED`||e===`RETURNED`?`text-error`:`text-neutral`}function E(e){return e===`RUNNING`?`進行中`:e===`APPROVED`?`已通過`:e===`REJECTED`?`已拒絕`:e===`RETURNED`?`已退回`:e===`CANCELLED`?`已取消`:e===`EXPIRED`?`已逾期`:e===`DRAFT`?`草稿`:`-`}function D(e){return e===`APPROVED`?`text-success`:e===`REJECTED`||e===`CANCELLED`||e===`EXPIRED`?`text-error`:`text-neutral`}function O(e){return(e?.trim()??``)||`-`}function k(e){return r.t(e)}function A(e){if(!e)return`-`;let t=new Date(e).getTime(),n=Date.now(),r=M(Math.abs(t-n));return t<n?`已逾期 ${r}`:`剩餘 ${r}`}function j(e){return e?new Date(e).getTime()<Date.now()?`text-error`:`text-success`:`text-neutral`}function M(e){let t=Math.max(1,Math.ceil(e/6e4)),n=Math.floor(t/1440),r=Math.floor(t%1440/60),i=t%60;return n>0?`${n}天 ${r}小時`:r>0?`${r}小時 ${i}分鐘`:`${i}分鐘`}function N(e){return e===`PENDING`?`待處理`:e===`IN_PROGRESS`?`處理中`:e===`COMPLETED`?`已完成`:e===`TRANSFERRED`?`已轉派`:e===`CANCELLED`?`已取消`:e}function P(e){return e instanceof Error?e.message:`發生未知錯誤`}exports.InboxView=m;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/rolldown-runtime-BocRIvOZ.cjs"),t=require("../../chunks/format-date-time-D-cx5M8z.cjs"),n=require("../../chunks/auth-provider-4BeCw7cI.cjs"),r=require("../../chunks/task-decision-CqZ4WQOC.cjs"),i=require("../../chunks/router-adapter--gYs13E8.cjs"),a=require("../../chunks/routes-config-C1j_vFKo.cjs");let o=require("react"),s=require("@mezzanine-ui/react"),c=require("react/jsx-runtime"),l=require("@rytass/bpm-core-client/workflow"),u=require("@mezzanine-ui/react/ContentHeader");u=e.t(u,1);let d=require("@mezzanine-ui/icons");var f=100,p={display:`grid`,gap:`var(--mzn-spacing-gap-base)`,marginBottom:`var(--mzn-spacing-padding-vertical-spacious)`};function m(){let e=i.r(),r=a.r(),{member:f}=n.n(),m=f?.memberId??null,[_,b]=(0,o.useState)(`pending`),[x,S]=(0,o.useState)(null),[C,T]=(0,o.useState)([]),[D,k]=(0,o.useState)(!0),[A,j]=(0,o.useState)([]),[M,P]=(0,o.useState)([]),[F,I]=(0,o.useState)(!1);(0,o.useEffect)(()=>{m&&G()},[m]);let L=(0,o.useMemo)(()=>[{dataIndex:`caseTitle`,key:`caseTitle`,title:`案件`,width:280},{dataIndex:`nodeText`,key:`nodeText`,title:`節點`,width:180},{dataIndex:`statusLabel`,key:`statusLabel`,title:`狀態`,width:120},{key:`fill`,render:e=>e.hasFillableFields?(0,c.jsx)(s.Badge,{size:`sub`,text:`需補填`,variant:`dot-warning`}):null,title:`補填`,width:120},{key:`slaDueAt`,render:e=>(0,c.jsx)(s.Typography,{color:e.slaStatusColor,component:`span`,variant:`body`,children:e.slaStatusText}),title:`SLA`,width:180},{key:`createdAt`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:t.t(e.createdAt)}),title:`建立時間`,width:220}],[]),R=(0,o.useMemo)(()=>({render:t=>[{name:`處理`,onClick:()=>e.push(r.caseDetail(t.instanceId))}],variant:`base-secondary`,width:88}),[e,r]),z=(0,o.useMemo)(()=>[{dataIndex:`caseTitle`,key:`caseTitle`,title:`案件`,width:280},{key:`startedAt`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:t.t(e.startedAt)}),title:`發起時間`,width:220}],[]),B=(0,o.useMemo)(()=>({render:t=>[{name:`重新送出`,onClick:()=>e.push(r.caseDetail(t.id))}],variant:`base-secondary`,width:120}),[e,r]),V=(0,o.useMemo)(()=>[{dataIndex:`caseTitle`,key:`caseTitle`,title:`案件`,width:280},{dataIndex:`nodeText`,key:`nodeText`,title:`節點`,width:180},{key:`decisionLabel`,render:e=>(0,c.jsx)(s.Typography,{color:w(e.decisionAction),component:`span`,variant:`body`,children:e.decisionLabel}),title:`決議`,width:120},{key:`decisionComment`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:e.decisionCommentText}),title:`意見`,width:240},{key:`instanceStateLabel`,render:e=>(0,c.jsx)(s.Typography,{color:E(e.instanceState),component:`span`,variant:`body`,children:e.instanceStateLabel}),title:`流程狀態`,width:140},{key:`decidedAt`,render:e=>(0,c.jsx)(s.Typography,{component:`span`,variant:`body`,children:O(e.decidedAt)}),title:`簽核時間`,width:220}],[]),H=(0,o.useMemo)(()=>({render:t=>[{name:`查看`,onClick:()=>e.push(r.caseDetail(t.instanceId))}],variant:`base-secondary`,width:88}),[e,r]),U=(0,o.useMemo)(()=>C.filter(e=>e.instanceState===`RUNNING`),[C]);function W(e){b(e===`history`||e===`pending`||e===`tracking`?e:`pending`)}async function G(){k(!0),S(null);try{if(!m){j([]),T([]),P([]),I(!1);return}let[e,t,n]=await Promise.all([(0,l.listInboxTasks)(m),(0,l.listApprovalHistoryTasks)(m),g(m)]),[r,i]=await Promise.all([v(e),y(t,m)]);j(r),T(i),P(n?.rows??[]),I(n?.truncated??!1)}catch(e){S(N(e))}finally{k(!1)}}return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.PageHeader,{children:(0,c.jsx)(u.default,{description:`目前以 ${f?.name??m??`目前登入會員`} 查詢待處理與歷史簽核任務。`,title:`我的待簽`,children:(0,c.jsx)(s.Button,{icon:d.PlusIcon,iconType:`leading`,onClick:()=>e.push(r.caseNew()),variant:`base-primary`,children:`發起簽核`})})}),(0,c.jsx)(s.SectionGroup,{children:(0,c.jsxs)(s.Section,{children:[x?(0,c.jsx)(s.Typography,{color:`text-error`,variant:`body`,children:x}):null,(0,c.jsxs)(s.Tab,{activeKey:_,onChange:W,size:`sub`,children:[(0,c.jsx)(s.TabItem,{badgeCount:D?void 0:A.length,children:`待簽核`},`pending`),(0,c.jsx)(s.TabItem,{badgeCount:D?void 0:U.length,children:`已處理未結束`},`tracking`),(0,c.jsx)(s.TabItem,{children:`歷史簽核記錄`},`history`)]}),_===`pending`&&(M.length>0||F)?(0,c.jsxs)(`div`,{"data-returned-instances":``,style:p,children:[M.length>0?(0,c.jsx)(s.Typography,{component:`h2`,variant:`label-primary`,children:`被退回待重送`}):null,(0,c.jsx)(s.Typography,{color:`text-neutral`,variant:`caption`,children:h(M.length>0,F)}),M.length>0?(0,c.jsx)(s.Table,{actions:B,columns:z,dataSource:[...M],fullWidth:!0}):null]}):null,_===`pending`?(0,c.jsx)(s.Table,{actions:R,columns:L,dataSource:A,fullWidth:!0,loading:D}):null,_===`tracking`?(0,c.jsx)(s.Table,{actions:H,columns:V,dataSource:U,fullWidth:!0,loading:D}):null,_===`history`?(0,c.jsx)(s.Table,{actions:H,columns:V,dataSource:C,fullWidth:!0,loading:D}):null]})})]})}function h(e,t){return e?t?`你發起的案件被退回,請修改後重新送出。可能還有其他被退回的案件,請到「我發起的」查看。`:`你發起的案件被退回,請修改後重新送出。`:`前 ${f} 筆被退回的案件中沒有你發起的,可能還有其他被退回的案件,請到「我發起的」查看。`}async function g(e){try{let t=await(0,l.listApprovalInstancesPage)({page:1,pageSize:f,searchText:null,state:`RETURNED`,templateId:null,view:`SENT`});return{rows:_(t.instances,e),truncated:t.totalCount>t.instances.length}}catch{return null}}function _(e,t){return e.filter(e=>e.initiatorMemberId===t).map(e=>({caseTitle:(0,l.readApprovalInstanceCaseTitle)(e),id:e.id,key:e.id,startedAt:e.startedAt}))}async function v(e){let t=await b(e);return e.map((e,n)=>({...e,caseTitle:x(e,t[n]??null),key:e.id,nodeText:r.o(e),slaStatusColor:A(e.slaDueAt),slaStatusText:k(e.slaDueAt),statusLabel:M(e.status)}))}async function y(e,t){let[n,i]=await Promise.all([Promise.all(e.map(e=>(0,l.listTaskDecisions)(e.id))),b(e)]);return e.map((e,a)=>{let o=n[a]??[],s=S(o,t),c=i[a]??null;return{...e,caseTitle:x(e,c),decisionAction:s?.action??null,decisionComment:s?.comment??null,decisionCommentText:D(s?.comment??null),decisionLabel:C(s?.action??null),decidedAt:s?.decidedAt??(o.length===0?e.completedAt:null),instanceState:c?.state??null,instanceStateLabel:T(c?.state??null),key:e.id,nodeText:r.o(e)}})}async function b(e){return Promise.all(e.map(async e=>{try{return(await(0,l.readApprovalInstance)(e.instanceId)).instance}catch{return null}}))}function x(e,t){return t?(0,l.readApprovalInstanceCaseTitle)(t):e.instanceId}function S(e,t){return r.i(e.filter(e=>e.decidedByMemberId===t))}function C(e){return e===`APPROVED`?`同意`:e===`REJECTED`?`拒絕`:e===`RETURNED`?`退回`:e===`TRANSFERRED`?`轉派`:`未記錄`}function w(e){return e===`APPROVED`?`text-success`:e===`REJECTED`||e===`RETURNED`?`text-error`:`text-neutral`}function T(e){return e===`RUNNING`?`進行中`:e===`APPROVED`?`已通過`:e===`REJECTED`?`已拒絕`:e===`RETURNED`?`已退回`:e===`CANCELLED`?`已取消`:e===`EXPIRED`?`已逾期`:e===`DRAFT`?`草稿`:`-`}function E(e){return e===`APPROVED`?`text-success`:e===`REJECTED`||e===`CANCELLED`||e===`EXPIRED`?`text-error`:`text-neutral`}function D(e){return(e?.trim()??``)||`-`}function O(e){return t.t(e)}function k(e){if(!e)return`-`;let t=new Date(e).getTime(),n=Date.now(),r=j(Math.abs(t-n));return t<n?`已逾期 ${r}`:`剩餘 ${r}`}function A(e){return e?new Date(e).getTime()<Date.now()?`text-error`:`text-success`:`text-neutral`}function j(e){let t=Math.max(1,Math.ceil(e/6e4)),n=Math.floor(t/1440),r=Math.floor(t%1440/60),i=t%60;return n>0?`${n}天 ${r}小時`:r>0?`${r}小時 ${i}分鐘`:`${i}分鐘`}function M(e){return e===`PENDING`?`待處理`:e===`IN_PROGRESS`?`處理中`:e===`COMPLETED`?`已完成`:e===`TRANSFERRED`?`已轉派`:e===`CANCELLED`?`已取消`:e}function N(e){return e instanceof Error?e.message:`發生未知錯誤`}exports.InboxView=m;
2
2
  //# sourceMappingURL=index.cjs.map