@nocobase/app-plugin-projects 0.1.0-beta.7 → 0.1.0-beta.8

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 (457) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +55 -103
  3. package/dist/client/api/client.d.ts +4 -23
  4. package/dist/client/api/client.d.ts.map +1 -1
  5. package/dist/client/api/client.js +4 -48
  6. package/dist/client/api/client.js.map +1 -1
  7. package/dist/client/api/keys.d.ts +2 -8
  8. package/dist/client/api/keys.d.ts.map +1 -1
  9. package/dist/client/api/keys.js +2 -17
  10. package/dist/client/api/keys.js.map +1 -1
  11. package/dist/client/components/pm-badges.d.ts +1 -1
  12. package/dist/client/components/pm-badges.d.ts.map +1 -1
  13. package/dist/client/components/pm-executor-select.d.ts +2 -0
  14. package/dist/client/components/pm-executor-select.d.ts.map +1 -1
  15. package/dist/client/components/pm-executor-select.js.map +1 -1
  16. package/dist/client/components/ui/radio-group.d.ts +7 -0
  17. package/dist/client/components/ui/radio-group.d.ts.map +1 -0
  18. package/dist/client/components/ui/radio-group.js +12 -0
  19. package/dist/client/components/ui/radio-group.js.map +1 -0
  20. package/dist/client/config.d.ts +0 -2
  21. package/dist/client/config.d.ts.map +1 -1
  22. package/dist/client/config.js +1 -5
  23. package/dist/client/config.js.map +1 -1
  24. package/dist/client/issues.d.ts +2 -4
  25. package/dist/client/issues.d.ts.map +1 -1
  26. package/dist/client/issues.js +2 -3
  27. package/dist/client/issues.js.map +1 -1
  28. package/dist/client/kit/plans/lookup.d.ts +2 -2
  29. package/dist/client/kit/plans/lookup.js +3 -3
  30. package/dist/client/kit/plans/lookup.js.map +1 -1
  31. package/dist/client/kit/plans/plan-row.js +2 -2
  32. package/dist/client/kit/plans/plan-row.js.map +1 -1
  33. package/dist/client/kit.d.ts +2 -9
  34. package/dist/client/kit.d.ts.map +1 -1
  35. package/dist/client/kit.js +2 -9
  36. package/dist/client/kit.js.map +1 -1
  37. package/dist/client/lib/kinds.d.ts +3 -29
  38. package/dist/client/lib/kinds.d.ts.map +1 -1
  39. package/dist/client/lib/kinds.js +7 -46
  40. package/dist/client/lib/kinds.js.map +1 -1
  41. package/dist/client/lib/status-events.d.ts +21 -0
  42. package/dist/client/lib/status-events.d.ts.map +1 -0
  43. package/dist/client/lib/status-events.js +31 -0
  44. package/dist/client/lib/status-events.js.map +1 -0
  45. package/dist/client/lib/status.d.ts +5 -7
  46. package/dist/client/lib/status.d.ts.map +1 -1
  47. package/dist/client/lib/status.js +5 -7
  48. package/dist/client/lib/status.js.map +1 -1
  49. package/dist/client/locales/en-US.d.ts +6 -256
  50. package/dist/client/locales/en-US.d.ts.map +1 -1
  51. package/dist/client/locales/en-US.js +9 -255
  52. package/dist/client/locales/en-US.js.map +1 -1
  53. package/dist/client/locales/zh-CN.d.ts.map +1 -1
  54. package/dist/client/locales/zh-CN.js +10 -248
  55. package/dist/client/locales/zh-CN.js.map +1 -1
  56. package/dist/client/pages/issues/board/board-model.d.ts +1 -1
  57. package/dist/client/pages/issues/board/board-model.js +1 -1
  58. package/dist/client/pages/issues/board/use-board-move.d.ts +2 -8
  59. package/dist/client/pages/issues/board/use-board-move.d.ts.map +1 -1
  60. package/dist/client/pages/issues/board/use-board-move.js +5 -42
  61. package/dist/client/pages/issues/board/use-board-move.js.map +1 -1
  62. package/dist/client/pages/issues/detail/new-subtask.d.ts.map +1 -1
  63. package/dist/client/pages/issues/detail/new-subtask.js +6 -28
  64. package/dist/client/pages/issues/detail/new-subtask.js.map +1 -1
  65. package/dist/client/pages/issues/detail/subtask-model.d.ts +1 -1
  66. package/dist/client/pages/issues/detail/subtask-model.js +1 -1
  67. package/dist/client/pages/issues/detail/use-confirmed-update.d.ts +6 -8
  68. package/dist/client/pages/issues/detail/use-confirmed-update.d.ts.map +1 -1
  69. package/dist/client/pages/issues/detail/use-confirmed-update.js +9 -42
  70. package/dist/client/pages/issues/detail/use-confirmed-update.js.map +1 -1
  71. package/dist/client/pages/issues/detail/use-issue-page.d.ts +0 -4
  72. package/dist/client/pages/issues/detail/use-issue-page.d.ts.map +1 -1
  73. package/dist/client/pages/issues/detail/use-issue-page.js +0 -14
  74. package/dist/client/pages/issues/detail/use-issue-page.js.map +1 -1
  75. package/dist/client/pages/issues/detail/use-issue-update.d.ts +2 -2
  76. package/dist/client/pages/issues/detail/use-issue-update.d.ts.map +1 -1
  77. package/dist/client/pages/issues/detail/use-issue-update.js +4 -6
  78. package/dist/client/pages/issues/detail/use-issue-update.js.map +1 -1
  79. package/dist/client/pages/issues/new-issue-form.d.ts +11 -8
  80. package/dist/client/pages/issues/new-issue-form.d.ts.map +1 -1
  81. package/dist/client/pages/issues/new-issue-form.js +47 -79
  82. package/dist/client/pages/issues/new-issue-form.js.map +1 -1
  83. package/dist/client/pages/issues/new.d.ts.map +1 -1
  84. package/dist/client/pages/issues/new.js +2 -1
  85. package/dist/client/pages/issues/new.js.map +1 -1
  86. package/dist/client/pages/issues/use-executor-options.d.ts +3 -2
  87. package/dist/client/pages/issues/use-executor-options.d.ts.map +1 -1
  88. package/dist/client/pages/issues/use-executor-options.js +5 -23
  89. package/dist/client/pages/issues/use-executor-options.js.map +1 -1
  90. package/dist/client/pages/projects/detail/use-project-page.d.ts +4 -26
  91. package/dist/client/pages/projects/detail/use-project-page.d.ts.map +1 -1
  92. package/dist/client/pages/projects/detail/use-project-page.js +7 -53
  93. package/dist/client/pages/projects/detail/use-project-page.js.map +1 -1
  94. package/dist/client/pages/projects/new.d.ts +1 -1
  95. package/dist/client/pages/projects/new.d.ts.map +1 -1
  96. package/dist/client/pages/projects/new.js +3 -7
  97. package/dist/client/pages/projects/new.js.map +1 -1
  98. package/dist/client/plugin.d.ts +3 -0
  99. package/dist/client/plugin.d.ts.map +1 -1
  100. package/dist/client/plugin.js +8 -1
  101. package/dist/client/plugin.js.map +1 -1
  102. package/dist/client/projects.d.ts +2 -2
  103. package/dist/client/projects.d.ts.map +1 -1
  104. package/dist/client/projects.js +2 -2
  105. package/dist/client/projects.js.map +1 -1
  106. package/dist/client/providers/query-provider.d.ts.map +1 -1
  107. package/dist/client/providers/query-provider.js +0 -4
  108. package/dist/client/providers/query-provider.js.map +1 -1
  109. package/dist/database/migrations/.manifest.json +4 -0
  110. package/dist/database/migrations/202610240010_pm_fixed_statuses.d.ts +4 -0
  111. package/dist/database/migrations/202610240010_pm_fixed_statuses.d.ts.map +1 -0
  112. package/dist/database/migrations/202610240010_pm_fixed_statuses.js +189 -0
  113. package/dist/database/migrations/202610240010_pm_fixed_statuses.js.map +1 -0
  114. package/dist/server/composition.d.ts +11 -17
  115. package/dist/server/composition.d.ts.map +1 -1
  116. package/dist/server/composition.js +11 -56
  117. package/dist/server/composition.js.map +1 -1
  118. package/dist/server/domains/issues/index.d.ts +1 -1
  119. package/dist/server/domains/issues/index.d.ts.map +1 -1
  120. package/dist/server/domains/issues/index.js +1 -1
  121. package/dist/server/domains/issues/index.js.map +1 -1
  122. package/dist/server/domains/issues/issue.context.d.ts +6 -22
  123. package/dist/server/domains/issues/issue.context.d.ts.map +1 -1
  124. package/dist/server/domains/issues/issue.context.js +1 -22
  125. package/dist/server/domains/issues/issue.context.js.map +1 -1
  126. package/dist/server/domains/issues/issue.fields.d.ts +3 -3
  127. package/dist/server/domains/issues/issue.fields.d.ts.map +1 -1
  128. package/dist/server/domains/issues/issue.fields.js +12 -15
  129. package/dist/server/domains/issues/issue.fields.js.map +1 -1
  130. package/dist/server/domains/issues/issue.projects.d.ts +2 -2
  131. package/dist/server/domains/issues/issue.projects.d.ts.map +1 -1
  132. package/dist/server/domains/issues/issue.projects.js +1 -2
  133. package/dist/server/domains/issues/issue.projects.js.map +1 -1
  134. package/dist/server/domains/issues/issue.queries.d.ts +5 -7
  135. package/dist/server/domains/issues/issue.queries.d.ts.map +1 -1
  136. package/dist/server/domains/issues/issue.queries.js +12 -41
  137. package/dist/server/domains/issues/issue.queries.js.map +1 -1
  138. package/dist/server/domains/issues/issue.routes.d.ts +1 -1
  139. package/dist/server/domains/issues/issue.routes.d.ts.map +1 -1
  140. package/dist/server/domains/issues/issue.routes.js +17 -37
  141. package/dist/server/domains/issues/issue.routes.js.map +1 -1
  142. package/dist/server/domains/issues/issue.service.d.ts +20 -44
  143. package/dist/server/domains/issues/issue.service.d.ts.map +1 -1
  144. package/dist/server/domains/issues/issue.service.js +19 -80
  145. package/dist/server/domains/issues/issue.service.js.map +1 -1
  146. package/dist/server/domains/issues/issue.status.d.ts +6 -10
  147. package/dist/server/domains/issues/issue.status.d.ts.map +1 -1
  148. package/dist/server/domains/issues/issue.status.js +3 -20
  149. package/dist/server/domains/issues/issue.status.js.map +1 -1
  150. package/dist/server/domains/issues/ports.d.ts +19 -36
  151. package/dist/server/domains/issues/ports.d.ts.map +1 -1
  152. package/dist/server/domains/issues/ports.js +0 -5
  153. package/dist/server/domains/issues/ports.js.map +1 -1
  154. package/dist/server/domains/notices/notice.planner.d.ts +2 -1
  155. package/dist/server/domains/notices/notice.planner.d.ts.map +1 -1
  156. package/dist/server/domains/notices/notice.planner.js +2 -1
  157. package/dist/server/domains/notices/notice.planner.js.map +1 -1
  158. package/dist/server/domains/notices/notice.rules.d.ts +1 -4
  159. package/dist/server/domains/notices/notice.rules.d.ts.map +1 -1
  160. package/dist/server/domains/notices/notice.rules.js +4 -5
  161. package/dist/server/domains/notices/notice.rules.js.map +1 -1
  162. package/dist/server/domains/plans/plan.ops.d.ts +3 -3
  163. package/dist/server/domains/plans/plan.ops.d.ts.map +1 -1
  164. package/dist/server/domains/plans/plan.ops.js +7 -10
  165. package/dist/server/domains/plans/plan.ops.js.map +1 -1
  166. package/dist/server/domains/projects/index.d.ts +1 -1
  167. package/dist/server/domains/projects/index.d.ts.map +1 -1
  168. package/dist/server/domains/projects/index.js.map +1 -1
  169. package/dist/server/domains/projects/project.routes.d.ts.map +1 -1
  170. package/dist/server/domains/projects/project.routes.js +1 -3
  171. package/dist/server/domains/projects/project.routes.js.map +1 -1
  172. package/dist/server/domains/projects/project.service.d.ts +0 -7
  173. package/dist/server/domains/projects/project.service.d.ts.map +1 -1
  174. package/dist/server/domains/projects/project.service.js +0 -17
  175. package/dist/server/domains/projects/project.service.js.map +1 -1
  176. package/dist/server/domains/projects/project.store.d.ts +0 -1
  177. package/dist/server/domains/projects/project.store.d.ts.map +1 -1
  178. package/dist/server/domains/projects/project.store.js +0 -1
  179. package/dist/server/domains/projects/project.store.js.map +1 -1
  180. package/dist/server/domains/reports/report.service.d.ts +1 -12
  181. package/dist/server/domains/reports/report.service.d.ts.map +1 -1
  182. package/dist/server/domains/reports/report.service.js +23 -79
  183. package/dist/server/domains/reports/report.service.js.map +1 -1
  184. package/dist/server/domains/statuses/event-types.d.ts +16 -0
  185. package/dist/server/domains/statuses/event-types.d.ts.map +1 -0
  186. package/dist/server/domains/statuses/event-types.js +31 -0
  187. package/dist/server/domains/statuses/event-types.js.map +1 -0
  188. package/dist/server/domains/statuses/index.d.ts +4 -0
  189. package/dist/server/domains/statuses/index.d.ts.map +1 -0
  190. package/dist/server/domains/statuses/index.js +4 -0
  191. package/dist/server/domains/statuses/index.js.map +1 -0
  192. package/dist/server/domains/statuses/status.catalog.d.ts +15 -0
  193. package/dist/server/domains/statuses/status.catalog.d.ts.map +1 -0
  194. package/dist/server/domains/statuses/status.catalog.js +119 -0
  195. package/dist/server/domains/statuses/status.catalog.js.map +1 -0
  196. package/dist/server/domains/statuses/status.events.d.ts +15 -0
  197. package/dist/server/domains/statuses/status.events.d.ts.map +1 -0
  198. package/dist/server/domains/statuses/status.events.js +2 -0
  199. package/dist/server/domains/statuses/status.events.js.map +1 -0
  200. package/dist/server/domains/statuses/status.fire.d.ts +48 -0
  201. package/dist/server/domains/statuses/status.fire.d.ts.map +1 -0
  202. package/dist/server/domains/statuses/status.fire.js +38 -0
  203. package/dist/server/domains/statuses/status.fire.js.map +1 -0
  204. package/dist/server/domains/subscriptions/subscription.routes.d.ts.map +1 -1
  205. package/dist/server/domains/subscriptions/subscription.routes.js +4 -2
  206. package/dist/server/domains/subscriptions/subscription.routes.js.map +1 -1
  207. package/dist/server/domains/subtasks/subtask.blocking.d.ts +4 -4
  208. package/dist/server/domains/subtasks/subtask.blocking.d.ts.map +1 -1
  209. package/dist/server/domains/subtasks/subtask.blocking.js +2 -10
  210. package/dist/server/domains/subtasks/subtask.blocking.js.map +1 -1
  211. package/dist/server/domains/subtasks/subtask.release.d.ts +5 -9
  212. package/dist/server/domains/subtasks/subtask.release.d.ts.map +1 -1
  213. package/dist/server/domains/subtasks/subtask.release.js +0 -4
  214. package/dist/server/domains/subtasks/subtask.release.js.map +1 -1
  215. package/dist/server/domains/subtasks/subtask.service.d.ts +1 -3
  216. package/dist/server/domains/subtasks/subtask.service.d.ts.map +1 -1
  217. package/dist/server/domains/subtasks/subtask.service.js +0 -12
  218. package/dist/server/domains/subtasks/subtask.service.js.map +1 -1
  219. package/dist/server/kernel/http.d.ts.map +1 -1
  220. package/dist/server/kernel/http.js +0 -3
  221. package/dist/server/kernel/http.js.map +1 -1
  222. package/dist/server/kernel/kinds.d.ts +24 -6
  223. package/dist/server/kernel/kinds.d.ts.map +1 -1
  224. package/dist/server/kernel/kinds.js +21 -1
  225. package/dist/server/kernel/kinds.js.map +1 -1
  226. package/dist/server/kernel/work.d.ts +8 -4
  227. package/dist/server/kernel/work.d.ts.map +1 -1
  228. package/dist/server/kernel/work.js +21 -10
  229. package/dist/server/kernel/work.js.map +1 -1
  230. package/dist/server/locales/en-US.d.ts +0 -9
  231. package/dist/server/locales/en-US.d.ts.map +1 -1
  232. package/dist/server/locales/en-US.js +0 -9
  233. package/dist/server/locales/en-US.js.map +1 -1
  234. package/dist/server/locales/zh-CN.d.ts.map +1 -1
  235. package/dist/server/locales/zh-CN.js +2 -11
  236. package/dist/server/locales/zh-CN.js.map +1 -1
  237. package/dist/server/providers/notifications.d.ts +1 -0
  238. package/dist/server/providers/notifications.d.ts.map +1 -1
  239. package/dist/server/providers/notifications.js +6 -120
  240. package/dist/server/providers/notifications.js.map +1 -1
  241. package/dist/server/providers/projects.d.ts +3 -8
  242. package/dist/server/providers/projects.d.ts.map +1 -1
  243. package/dist/server/providers/projects.js +8 -27
  244. package/dist/server/providers/projects.js.map +1 -1
  245. package/dist/server/routes/api.d.ts.map +1 -1
  246. package/dist/server/routes/api.js +0 -6
  247. package/dist/server/routes/api.js.map +1 -1
  248. package/dist/server/routes/schemas.d.ts +1 -27
  249. package/dist/server/routes/schemas.d.ts.map +1 -1
  250. package/dist/server/routes/schemas.js +5 -166
  251. package/dist/server/routes/schemas.js.map +1 -1
  252. package/dist/server/tokens.d.ts +12 -34
  253. package/dist/server/tokens.d.ts.map +1 -1
  254. package/dist/server/tokens.js +4 -16
  255. package/dist/server/tokens.js.map +1 -1
  256. package/dist/shared/access.d.ts +0 -1
  257. package/dist/shared/access.d.ts.map +1 -1
  258. package/dist/shared/access.js +2 -11
  259. package/dist/shared/access.js.map +1 -1
  260. package/dist/shared/issues.d.ts +5 -36
  261. package/dist/shared/issues.d.ts.map +1 -1
  262. package/dist/shared/issues.js.map +1 -1
  263. package/dist/shared/kinds.d.ts +3 -1
  264. package/dist/shared/kinds.d.ts.map +1 -1
  265. package/dist/shared/kinds.js +1 -1
  266. package/dist/shared/locales/access.en-US.d.ts +0 -1
  267. package/dist/shared/locales/access.en-US.d.ts.map +1 -1
  268. package/dist/shared/locales/access.en-US.js +1 -2
  269. package/dist/shared/locales/access.en-US.js.map +1 -1
  270. package/dist/shared/locales/access.zh-CN.d.ts.map +1 -1
  271. package/dist/shared/locales/access.zh-CN.js +1 -2
  272. package/dist/shared/locales/access.zh-CN.js.map +1 -1
  273. package/dist/shared/plans.d.ts +4 -6
  274. package/dist/shared/plans.d.ts.map +1 -1
  275. package/dist/shared/plans.js +2 -1
  276. package/dist/shared/plans.js.map +1 -1
  277. package/dist/shared/projects.d.ts +0 -4
  278. package/dist/shared/projects.d.ts.map +1 -1
  279. package/dist/shared/projects.js.map +1 -1
  280. package/dist/shared/realtime.d.ts +1 -1
  281. package/dist/shared/realtime.d.ts.map +1 -1
  282. package/dist/shared/statuses.d.ts +42 -0
  283. package/dist/shared/statuses.d.ts.map +1 -0
  284. package/dist/shared/statuses.js +73 -0
  285. package/dist/shared/statuses.js.map +1 -0
  286. package/dist/shared/subtasks.d.ts +3 -3
  287. package/dist/shared/subtasks.d.ts.map +1 -1
  288. package/package.json +7 -15
  289. package/skills/nocobase-app-plugin-projects/SKILL.md +26 -50
  290. package/dist/client/hooks/use-workflow-leave-guard.d.ts +0 -3
  291. package/dist/client/hooks/use-workflow-leave-guard.d.ts.map +0 -1
  292. package/dist/client/hooks/use-workflow-leave-guard.js +0 -31
  293. package/dist/client/hooks/use-workflow-leave-guard.js.map +0 -1
  294. package/dist/client/lib/built-in-rule-editors.d.ts +0 -13
  295. package/dist/client/lib/built-in-rule-editors.d.ts.map +0 -1
  296. package/dist/client/lib/built-in-rule-editors.js +0 -86
  297. package/dist/client/lib/built-in-rule-editors.js.map +0 -1
  298. package/dist/client/lib/built-in-rule-types.d.ts +0 -3
  299. package/dist/client/lib/built-in-rule-types.d.ts.map +0 -1
  300. package/dist/client/lib/built-in-rule-types.js +0 -63
  301. package/dist/client/lib/built-in-rule-types.js.map +0 -1
  302. package/dist/client/lib/status-rule-types.d.ts +0 -60
  303. package/dist/client/lib/status-rule-types.d.ts.map +0 -1
  304. package/dist/client/lib/status-rule-types.js +0 -38
  305. package/dist/client/lib/status-rule-types.js.map +0 -1
  306. package/dist/client/lib/workflow-events.d.ts +0 -25
  307. package/dist/client/lib/workflow-events.d.ts.map +0 -1
  308. package/dist/client/lib/workflow-events.js +0 -30
  309. package/dist/client/lib/workflow-events.js.map +0 -1
  310. package/dist/client/pages/config/workflow-detail.d.ts +0 -10
  311. package/dist/client/pages/config/workflow-detail.d.ts.map +0 -1
  312. package/dist/client/pages/config/workflow-detail.js +0 -207
  313. package/dist/client/pages/config/workflow-detail.js.map +0 -1
  314. package/dist/client/pages/config/workflows/flow-editor.d.ts +0 -15
  315. package/dist/client/pages/config/workflows/flow-editor.d.ts.map +0 -1
  316. package/dist/client/pages/config/workflows/flow-editor.js +0 -76
  317. package/dist/client/pages/config/workflows/flow-editor.js.map +0 -1
  318. package/dist/client/pages/config/workflows/status-rules.d.ts +0 -21
  319. package/dist/client/pages/config/workflows/status-rules.d.ts.map +0 -1
  320. package/dist/client/pages/config/workflows/status-rules.js +0 -203
  321. package/dist/client/pages/config/workflows/status-rules.js.map +0 -1
  322. package/dist/client/pages/config/workflows/transitions-matrix.d.ts +0 -20
  323. package/dist/client/pages/config/workflows/transitions-matrix.d.ts.map +0 -1
  324. package/dist/client/pages/config/workflows/transitions-matrix.js +0 -114
  325. package/dist/client/pages/config/workflows/transitions-matrix.js.map +0 -1
  326. package/dist/client/pages/config/workflows/use-status-name.d.ts +0 -4
  327. package/dist/client/pages/config/workflows/use-status-name.d.ts.map +0 -1
  328. package/dist/client/pages/config/workflows/use-status-name.js +0 -17
  329. package/dist/client/pages/config/workflows/use-status-name.js.map +0 -1
  330. package/dist/client/pages/config/workflows/workflow-diagram.d.ts +0 -17
  331. package/dist/client/pages/config/workflows/workflow-diagram.d.ts.map +0 -1
  332. package/dist/client/pages/config/workflows/workflow-diagram.js +0 -298
  333. package/dist/client/pages/config/workflows/workflow-diagram.js.map +0 -1
  334. package/dist/client/pages/config/workflows/workflow-model.d.ts +0 -157
  335. package/dist/client/pages/config/workflows/workflow-model.d.ts.map +0 -1
  336. package/dist/client/pages/config/workflows/workflow-model.js +0 -403
  337. package/dist/client/pages/config/workflows/workflow-model.js.map +0 -1
  338. package/dist/client/pages/config/workflows/workflow-views.d.ts +0 -31
  339. package/dist/client/pages/config/workflows/workflow-views.d.ts.map +0 -1
  340. package/dist/client/pages/config/workflows/workflow-views.js +0 -76
  341. package/dist/client/pages/config/workflows/workflow-views.js.map +0 -1
  342. package/dist/client/pages/config/workflows.d.ts +0 -8
  343. package/dist/client/pages/config/workflows.d.ts.map +0 -1
  344. package/dist/client/pages/config/workflows.js +0 -139
  345. package/dist/client/pages/config/workflows.js.map +0 -1
  346. package/dist/client/pages/issues/detail/start-dialog.d.ts +0 -20
  347. package/dist/client/pages/issues/detail/start-dialog.d.ts.map +0 -1
  348. package/dist/client/pages/issues/detail/start-dialog.js +0 -31
  349. package/dist/client/pages/issues/detail/start-dialog.js.map +0 -1
  350. package/dist/client/pages/projects/workflow-select.d.ts +0 -14
  351. package/dist/client/pages/projects/workflow-select.d.ts.map +0 -1
  352. package/dist/client/pages/projects/workflow-select.js +0 -34
  353. package/dist/client/pages/projects/workflow-select.js.map +0 -1
  354. package/dist/server/domains/approvals/approval.events.d.ts +0 -47
  355. package/dist/server/domains/approvals/approval.events.d.ts.map +0 -1
  356. package/dist/server/domains/approvals/approval.events.js +0 -2
  357. package/dist/server/domains/approvals/approval.events.js.map +0 -1
  358. package/dist/server/domains/approvals/approval.lifecycle.d.ts +0 -8
  359. package/dist/server/domains/approvals/approval.lifecycle.d.ts.map +0 -1
  360. package/dist/server/domains/approvals/approval.lifecycle.js +0 -54
  361. package/dist/server/domains/approvals/approval.lifecycle.js.map +0 -1
  362. package/dist/server/domains/approvals/approval.routes.d.ts +0 -10
  363. package/dist/server/domains/approvals/approval.routes.d.ts.map +0 -1
  364. package/dist/server/domains/approvals/approval.routes.js +0 -87
  365. package/dist/server/domains/approvals/approval.routes.js.map +0 -1
  366. package/dist/server/domains/approvals/approval.service.d.ts +0 -72
  367. package/dist/server/domains/approvals/approval.service.d.ts.map +0 -1
  368. package/dist/server/domains/approvals/approval.service.js +0 -261
  369. package/dist/server/domains/approvals/approval.service.js.map +0 -1
  370. package/dist/server/domains/approvals/approval.store.d.ts +0 -42
  371. package/dist/server/domains/approvals/approval.store.d.ts.map +0 -1
  372. package/dist/server/domains/approvals/approval.store.js +0 -66
  373. package/dist/server/domains/approvals/approval.store.js.map +0 -1
  374. package/dist/server/domains/approvals/index.d.ts +0 -4
  375. package/dist/server/domains/approvals/index.d.ts.map +0 -1
  376. package/dist/server/domains/approvals/index.js +0 -3
  377. package/dist/server/domains/approvals/index.js.map +0 -1
  378. package/dist/server/domains/checklists/checklist.routes.d.ts +0 -9
  379. package/dist/server/domains/checklists/checklist.routes.d.ts.map +0 -1
  380. package/dist/server/domains/checklists/checklist.routes.js +0 -62
  381. package/dist/server/domains/checklists/checklist.routes.js.map +0 -1
  382. package/dist/server/domains/checklists/checklist.service.d.ts +0 -26
  383. package/dist/server/domains/checklists/checklist.service.d.ts.map +0 -1
  384. package/dist/server/domains/checklists/checklist.service.js +0 -80
  385. package/dist/server/domains/checklists/checklist.service.js.map +0 -1
  386. package/dist/server/domains/checklists/checklist.store.d.ts +0 -32
  387. package/dist/server/domains/checklists/checklist.store.d.ts.map +0 -1
  388. package/dist/server/domains/checklists/checklist.store.js +0 -66
  389. package/dist/server/domains/checklists/checklist.store.js.map +0 -1
  390. package/dist/server/domains/checklists/index.d.ts +0 -4
  391. package/dist/server/domains/checklists/index.d.ts.map +0 -1
  392. package/dist/server/domains/checklists/index.js +0 -4
  393. package/dist/server/domains/checklists/index.js.map +0 -1
  394. package/dist/server/domains/workflows/built-in-rule-types.d.ts +0 -40
  395. package/dist/server/domains/workflows/built-in-rule-types.d.ts.map +0 -1
  396. package/dist/server/domains/workflows/built-in-rule-types.js +0 -260
  397. package/dist/server/domains/workflows/built-in-rule-types.js.map +0 -1
  398. package/dist/server/domains/workflows/event-types.d.ts +0 -21
  399. package/dist/server/domains/workflows/event-types.d.ts.map +0 -1
  400. package/dist/server/domains/workflows/event-types.js +0 -31
  401. package/dist/server/domains/workflows/event-types.js.map +0 -1
  402. package/dist/server/domains/workflows/index.d.ts +0 -10
  403. package/dist/server/domains/workflows/index.d.ts.map +0 -1
  404. package/dist/server/domains/workflows/index.js +0 -10
  405. package/dist/server/domains/workflows/index.js.map +0 -1
  406. package/dist/server/domains/workflows/rule-types.d.ts +0 -129
  407. package/dist/server/domains/workflows/rule-types.d.ts.map +0 -1
  408. package/dist/server/domains/workflows/rule-types.js +0 -33
  409. package/dist/server/domains/workflows/rule-types.js.map +0 -1
  410. package/dist/server/domains/workflows/templates.d.ts +0 -62
  411. package/dist/server/domains/workflows/templates.d.ts.map +0 -1
  412. package/dist/server/domains/workflows/templates.js +0 -63
  413. package/dist/server/domains/workflows/templates.js.map +0 -1
  414. package/dist/server/domains/workflows/workflow.diff.d.ts +0 -14
  415. package/dist/server/domains/workflows/workflow.diff.d.ts.map +0 -1
  416. package/dist/server/domains/workflows/workflow.diff.js +0 -80
  417. package/dist/server/domains/workflows/workflow.diff.js.map +0 -1
  418. package/dist/server/domains/workflows/workflow.events.d.ts +0 -26
  419. package/dist/server/domains/workflows/workflow.events.d.ts.map +0 -1
  420. package/dist/server/domains/workflows/workflow.events.js +0 -2
  421. package/dist/server/domains/workflows/workflow.events.js.map +0 -1
  422. package/dist/server/domains/workflows/workflow.fire.d.ts +0 -38
  423. package/dist/server/domains/workflows/workflow.fire.d.ts.map +0 -1
  424. package/dist/server/domains/workflows/workflow.fire.js +0 -57
  425. package/dist/server/domains/workflows/workflow.fire.js.map +0 -1
  426. package/dist/server/domains/workflows/workflow.registry.d.ts +0 -27
  427. package/dist/server/domains/workflows/workflow.registry.d.ts.map +0 -1
  428. package/dist/server/domains/workflows/workflow.registry.js +0 -132
  429. package/dist/server/domains/workflows/workflow.registry.js.map +0 -1
  430. package/dist/server/domains/workflows/workflow.routes.d.ts +0 -6
  431. package/dist/server/domains/workflows/workflow.routes.d.ts.map +0 -1
  432. package/dist/server/domains/workflows/workflow.routes.js +0 -148
  433. package/dist/server/domains/workflows/workflow.routes.js.map +0 -1
  434. package/dist/server/domains/workflows/workflow.rules.d.ts +0 -14
  435. package/dist/server/domains/workflows/workflow.rules.d.ts.map +0 -1
  436. package/dist/server/domains/workflows/workflow.rules.js +0 -212
  437. package/dist/server/domains/workflows/workflow.rules.js.map +0 -1
  438. package/dist/server/domains/workflows/workflow.service.d.ts +0 -71
  439. package/dist/server/domains/workflows/workflow.service.d.ts.map +0 -1
  440. package/dist/server/domains/workflows/workflow.service.js +0 -366
  441. package/dist/server/domains/workflows/workflow.service.js.map +0 -1
  442. package/dist/server/domains/workflows/workflow.store.d.ts +0 -33
  443. package/dist/server/domains/workflows/workflow.store.d.ts.map +0 -1
  444. package/dist/server/domains/workflows/workflow.store.js +0 -148
  445. package/dist/server/domains/workflows/workflow.store.js.map +0 -1
  446. package/dist/shared/approvals.d.ts +0 -37
  447. package/dist/shared/approvals.d.ts.map +0 -1
  448. package/dist/shared/approvals.js +0 -4
  449. package/dist/shared/approvals.js.map +0 -1
  450. package/dist/shared/checklists.d.ts +0 -27
  451. package/dist/shared/checklists.d.ts.map +0 -1
  452. package/dist/shared/checklists.js +0 -7
  453. package/dist/shared/checklists.js.map +0 -1
  454. package/dist/shared/workflows.d.ts +0 -276
  455. package/dist/shared/workflows.d.ts.map +0 -1
  456. package/dist/shared/workflows.js +0 -151
  457. package/dist/shared/workflows.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: nocobase-app-plugin-projects
3
- description: Register the Projects plugin in a NocoBase App, call its /api/projects API for projects, issues, workflows, labels and members, grant its permissions, or work out why a projects request is rejected.
3
+ description: Register the Projects plugin in a NocoBase App, call its /api/projects API for projects, issues, their fixed statuses, labels and members, grant its permissions, or work out why a projects request is rejected.
4
4
  metadata:
5
- short-description: Projects, issues, workflows, labels and members
5
+ short-description: Projects, issues, statuses, labels and members
6
6
  ---
7
7
 
8
8
  # Projects App Plugin
@@ -16,20 +16,20 @@ for generic collection CRUD; the plugin's tables are only written through its AP
16
16
  `@nocobase/app-plugin-projects/server/tokens` resolves the services. The App must bind `projectsAccessToken`
17
17
  (`ProjectsAccess`: `permissionsOf`, `admit`, `changed`, `administrators`, and optionally `permissionsOfUser` so
18
18
  notices reach only those who may see the issue): the plugin keeps no roles of its own. It may bind
19
- `projectsNoticesToken` (`ProjectsNotices`: `send`, `resolve`) to receive the plugin's notices (owner notified,
20
- approval requested as a `decision`, approval decided, commented, mentioned, status changed, owner or executor
21
- assigned; information carries a `group` to merge by) and keep its own inbox; otherwise they go to the in-app
19
+ `projectsNoticesToken` (`ProjectsNotices`: `send`) to receive the plugin's notices (owner notified, commented,
20
+ mentioned, status changed, owner or executor assigned; information carries a `group` to merge by) and keep its own
21
+ inbox; otherwise they go to the in-app
22
22
  channel `projects.inboxChannel`. Another plugin binds `projectsTriggersToken` (`IssueTriggers`) to start work when
23
23
  a person comments, and adds notice rules through `projectsNoticeRulesToken`. Operation plans (`shared/plans.ts`)
24
24
  are proposed through `projects.plans` (`PlanService`: rehearse, create, propose to someone else, execute, preview an undo and undo in one step), and
25
25
  a plugin binds `projectsPlanHooksToken` (`PlanHooks.onPlanDecided`) to hear their decisions.
26
26
  - Shared types: `@nocobase/app-plugin-projects/shared/<name>` (`access`, `attachments`, `comments`, `common`, `issues`,
27
- `labels`, `members`, `plans`, `projects`, `settings`, `subscriptions`, `subtasks`, `workflows`).
27
+ `labels`, `members`, `plans`, `projects`, `settings`, `statuses`, `subscriptions`, `subtasks`).
28
28
  - Server routes: everything under `/api/projects`; see the package README for the list. Failures are the standard error body with domain `projects`: branch on `reason`, read details from `metadata`.
29
29
  - Client: the default export of `@nocobase/app-plugin-projects/client` adds `/projects` (the list and "New project").
30
30
  The App owns a project's page (`/projects/:projectId`, routed as that route's child) and composes it from the
31
31
  headless `@nocobase/app-plugin-projects/client/projects` (`useProjectDetail`, `useProjectUpdate`,
32
- `useProjectMembership`, `useProjectResources`, `useResourceValidation`, `useDeleteProject`, `useProjectWorkflow`).
32
+ `useProjectMembership`, `useProjectResources`, `useResourceValidation`, `useDeleteProject`).
33
33
  The App also owns `/issues` and
34
34
  `/my-issues`: it composes them from the headless `@nocobase/app-plugin-projects/client/issues` (list and board queries,
35
35
  board moves, filters in the query string, executor options) and routes the plugin's pages under `/issues` (the New
@@ -37,7 +37,7 @@ for generic collection CRUD; the plugin's tables are only written through its AP
37
37
  issue's page (`/issues/:issueId`), presented over the same headless entry (`useIssueDetail`, `useIssuePageActions`,
38
38
  `useIssueTimeline`, `useIssueCommentActions` and the rest), and hosts the plugin's "New sub-issue" dialog under it
39
39
  (`issueDetailChildRoutes`).
40
- The settings pages (issue prefix, labels, workflows) are exported from
40
+ The settings pages (issue prefix, labels) are exported from
41
41
  `@nocobase/app-plugin-projects/client/config` for the App to route under its own settings page, and shared page
42
42
  components from `@nocobase/app-plugin-projects/client/kit`. Changes are announced on the realtime topic `pm:changes`.
43
43
 
@@ -58,50 +58,26 @@ grants from before roles moved to the App; the App converts them (for example, `
58
58
  moderate-comments, close, change-owner, delete; `pm.attachments`: upload) reach none, related or all records. The
59
59
  plugin registers them as the `pm` resource type, one action per level (`edit.related`, `edit.all`; `create` and
60
60
  `delete` without levels; `shared/access.ts`: `levelActionsOf`), and a role grants the level's action; the App's
61
- `permissionsOf` says which for each request. Settings items (`pm.general`, `pm.labels`, `pm.workflows`: read,
62
- update; `pm.members`: read, invite, assign, define-roles) are registered by the plugin. Creating an issue needs `pm.issues` `create`, not `edit`. `GET /api/projects/me` returns what the caller
61
+ `permissionsOf` says which for each request. Settings items (`pm.general`, `pm.labels`: read, update; `pm.members`: read, invite, assign, define-roles) are registered by the plugin. Creating an issue needs `pm.issues` `create`, not `edit`. `GET /api/projects/me` returns what the caller
63
62
  holds.
64
63
  - Authorized original inviters can generate and privately deliver invitation links using an unscoped person credential, without global user creation permissions or an email channel. New accounts register from the link and remain email-unverified; existing users sign in with the matching account. Links use `app.publicOrigin` or the request origin. Generating a new link invalidates the old link; current access to every remaining project is rechecked. Other managers and scoped credentials remain email-only.
65
64
  - Issue updates need the `revision` the caller read; a stale revision is 409 `REVISION_CONFLICT` (`ABORTED`).
66
- - An issue cannot be created in a terminal status, and moving it to another project needs a status that project's
67
- workflow has. A status change the workflow does not allow for the caller is 400 `TRANSITION_NOT_ALLOWED`.
68
- - Workflows (`/api/projects/workflows`) are read by every member and changed with `pm.workflows` `update`. A definition is
69
- `{ states: [{ key, name, category, color, builtIn? }], transitions: [{ from, to, actors }] }` (`*` for any
70
- status, actors: registered kind keys, `user` and `system` built in); the seven built-in statuses stay, each
71
- transition stays within what its kinds allow (`mayEnter`, `mayTargetAny`), and people can leave every status. Problems are 400 `INVALID_WORKFLOW` with `metadata.issues`; dropping a
72
- status issues are in is 400 `WORKFLOW_STATUS_CONFLICT` (`FAILED_PRECONDITION`). A project's `workflowId` (null: the default) switches only
73
- when every issue keeps its status.
74
- - A status may carry `rules`: `{ type: 'checklist', config: { items: [{ key, label, required }] } }` and
75
- `{ type: 'notifyOwner', config: { message? } }`, each at most once. Entering the status copies the checklist to the
76
- issue (`GET /api/projects/issues/{issueId}/checklists`, `PATCH …/checklists/{statusKey}/items/{itemKey} { checked }` by anyone who may
77
- edit the issue); leaving it for anything but a closed status is 400 `CHECKLIST_INCOMPLETE` until the required items
78
- are checked. `notifyOwner` records `owner_notified` and sends an `owner_notified` notice (see `projectsNoticesToken`
79
- above); nothing is sent when the owner moved the issue.
80
- - Another plugin adds status rule types through `projectsStatusRulesToken` (`StatusRuleTypes.add({ type, categories?,
81
- validate?, describe?, canEnter?, entered? })`; `entered` runs in the move's transaction with the issue after the move
82
- and may `setExecutor`; `canEnter` runs before every move into the status, the system's event moves included, and
83
- answers null or `{ code, message, details? }`, which refuses the move with 400 `code`) and workflows that use them through `projectsWorkflowTemplatesToken` (installed once each, marked by
84
- `builtInKey`, titled by the template's `title`). What such a rule did is recorded as `stage_action_applied` or
85
- `stage_action_skipped { reason }`. A rule whose type is gone stays in the definition: saving keeps it unchanged,
86
- entering skips it as `unavailable`. `POST /api/projects/workflows/{workflowId}/preview { definition }` (with `pm.workflows`
87
- `update`) lists the rules a save would add or remove and those that wake someone without confirmation. In the
88
- browser, `StatusRuleTypesContext` from `client/kit` gives each type its title, editor and summary.
89
- - Another plugin registers workflow events through `projectsWorkflowEventsToken` (`WorkflowEventTypes.add({ key, from?,
90
- to? })`, a dotted key such as `acme.merged`; `from`/`to` are the status categories a transition on it may leave and
91
- enter) and fires one with `projects.workflowEvents.fire({ event, issueIds, actor?, note?, details? }, tx?)`. Each
92
- issue with a `{ from, to, actors: ['system'], on: event }` transition from its status moves as the system, inside
93
- `tx` when given; the activity `status_changed { event, note, cause }` names `actor`. The answer lists one outcome
94
- per issue: `moved`, `ignored { reason: 'notFound' | 'noTransition' }` or `refused { code }` (an entry condition held
95
- it back, recorded as `auto_move_skipped`). Only registered, contributed events may be fired. A transition on an
96
- event whose plugin is gone is kept while unchanged. In the browser, `WorkflowEventsContext` (`client/kit`) gives
97
- each event its title and hint for the workflow editor and the timeline.
98
- - A transition may carry `approval: { approvers: ['owner' | 'projectLead' | 'admin', …] }`. A status change through
99
- it answers `PATCH /api/projects/issues/{issueId}` with 202 `{ data: { issue, pendingApproval } }` (the issue unchanged) unless the
100
- mover is an approver or none resolves. `GET /api/projects/approvals` lists the caller's; `POST /api/projects/approvals/{approvalId}/
101
- approve|reject` (403 `NOT_APPROVER`) and `/withdraw` (403 `NOT_REQUESTER`) decide; a decided request is 400
102
- `APPROVAL_DECIDED`, a second pending one 400 `APPROVAL_PENDING`. Approving moves the issue, or leaves the request
103
- `stale` when the move no longer passes; the issue leaving the status also makes its request stale.
104
- - A sub-issue may have a `stage` (0–1000, 400 `INVALID_STAGE`). `POST /api/projects/issues/{issueId}/dependencies { dependsOnIssueId, type: 'blockedBy' | 'relatedTo' }` links issues (201); `DELETE …/dependencies/{dependencyId}` removes a link (204). `PATCH …/dependencies/{dependencyId} { type, expectedType }` changes its type atomically and preserves its ID (200); a stale type is 409 `DEPENDENCY_CHANGED`, and an existing target relationship is 409 `DEPENDENCY_EXISTS` with both links preserved. A related link can be converted from either end; the current issue waits when converted to `blockedBy`. A cycle is 400 `DEPENDENCY_CYCLE`, a duplicate 409 `DEPENDENCY_EXISTS`. Concurrent dependency graph changes can return 409 `DEPENDENCY_GRAPH_CHANGED`; reload and retry the whole operation, including a plan if the write belongs to one. All relationship writes, including both removal endpoints, share this protection so duplicate checks, activity and release notifications use a consistent relationship type and direction. Plans take the graph guard before their first row during rehearsal, execution and undo. Issue status/project changes, approval execution, workflow events and deletion take the same guard before writing issue rows, so concurrent releases cannot leave unblocked work idle; automatic parent/stage completion retains it. Creation, parent/stage changes and restoration share this protection; independent creates without waits lock without changing the graph revision and do not conflict with each other; restoring a deleted issue can be rejected with `DEPENDENCY_CYCLE`. Issue detail carries `subtasks`, `blockedBy`, `blocks`, `relatedTo`, `blockers` and `hiddenBlockerCount`; list items `subtaskCount` and `blockedCount`. Finishing an issue releases the issues waiting on it (`dependency_released` notice) and tells the parent's owner when a stage or all sub-issues finish (`batch_done`). A workflow transition `{ from, to, actors: ['system'], on: 'subtasks.done' }` moves the parent then; status rules `{ type: 'subtasksDone' }` (400 `SUBTASKS_OPEN`) and `{ type: 'blockersDone' }` (400 `ISSUE_BLOCKED`) refuse entering a status too early.
65
+ - Statuses are fixed (`shared/statuses.ts`): `backlog`, `in_progress`, `blocked`, `in_review`, `done`, `cancelled`, the
66
+ same for every project (`GET /api/projects/issues/statuses`). A new issue starts in `backlog` (nothing starts) or
67
+ `in_progress` (its work starts); any other `statusKey` is 400 `INVALID_STATUS`. Left without `executor`, it gets the
68
+ default executor a kind names (`PrincipalKind.defaultExecutor`; `GET /api/projects/executors` marks it `isDefault`).
69
+ People move an issue between any two statuses; a principal of another kind only along its kind's `moves`, and only
70
+ when its `mayMove` agrees; anything else is 400 `TRANSITION_NOT_ALLOWED`. Entering `blocked` or `in_review` records
71
+ `owner_notified` and sends an `owner_notified` notice, unless the owner moved it. `PATCH /api/projects/issues/{issueId}`
72
+ answers 200 `{ data: { issue } }`.
73
+ - Another plugin registers status events through `projectsStatusEventsToken` (`StatusEventTypes.add({ key, from, to })`,
74
+ a dotted key such as `acme.merged`, the statuses it moves an issue out of and the one it moves it to) and fires one
75
+ with `projects.statusEvents.fire({ event, issueIds, actor?, note?, details? }, tx?)`. Each issue in one of `from`
76
+ moves to `to` as the system, inside `tx` when given; the activity `status_changed { event, note, cause }` names
77
+ `actor`. The answer lists one outcome per issue: `moved`, `ignored { reason: 'notFound' | 'noTransition' }` or
78
+ `refused { code }` (recorded as `auto_move_skipped`). `projects.statusEvents.target(event, issueId)` says where it
79
+ would take one issue. In the browser, `StatusEventsContext` (`client/kit`) titles each event for the timeline.
80
+ - A sub-issue may have a `stage` (0–1000, 400 `INVALID_STAGE`). `POST /api/projects/issues/{issueId}/dependencies { dependsOnIssueId, type: 'blockedBy' | 'relatedTo' }` links issues (201); `DELETE …/dependencies/{dependencyId}` removes a link (204). `PATCH …/dependencies/{dependencyId} { type, expectedType }` changes its type atomically and preserves its ID (200); a stale type is 409 `DEPENDENCY_CHANGED`, and an existing target relationship is 409 `DEPENDENCY_EXISTS` with both links preserved. A related link can be converted from either end; the current issue waits when converted to `blockedBy`. A cycle is 400 `DEPENDENCY_CYCLE`, a duplicate 409 `DEPENDENCY_EXISTS`. Concurrent dependency graph changes can return 409 `DEPENDENCY_GRAPH_CHANGED`; reload and retry the whole operation, including a plan if the write belongs to one. All relationship writes, including both removal endpoints, share this protection so duplicate checks, activity and release notifications use a consistent relationship type and direction. Plans take the graph guard before their first row during rehearsal, execution and undo. Issue status/project changes, status events and deletion take the same guard before writing issue rows, so concurrent releases cannot leave unblocked work idle; automatic parent/stage completion retains it. Creation, parent/stage changes and restoration share this protection; independent creates without waits lock without changing the graph revision and do not conflict with each other; restoring a deleted issue can be rejected with `DEPENDENCY_CYCLE`. Issue detail carries `subtasks`, `blockedBy`, `blocks`, `relatedTo`, `blockers` and `hiddenBlockerCount`; list items `subtaskCount` and `blockedCount`. Finishing an issue releases the issues waiting on it (`dependency_released` notice) and tells the parent's owner when a stage or all sub-issues finish (`batch_done`, and the `onSubtasksFinished` trigger); the parent's status does not move on its own.
105
81
  - Comments (`/api/projects/issues/{issueId}/comments`, `/api/projects/comments/{commentId}…`): posting, replying and resolving need
106
82
  `pm.issues` `comment`; only the author edits a comment (403 otherwise); deleting another's needs
107
83
  `moderate-comments`. Content is 1 to 200,000 characters (400 `INVALID_COMMENT`); a reply's parent must be a comment of the
@@ -119,7 +95,7 @@ approve|reject` (403 `NOT_APPROVER`) and `/withdraw` (403 `NOT_REQUESTER`) decid
119
95
 
120
96
  ## Verification
121
97
 
122
- Work handlers receive the original optional `actor` on `onOwnerChanged`, `onUnblocked` and `onSubtasksFinished`, including `actor.trace.runId` when supplied. Status rule conditions and entry actions receive optional `sourceActor` for the original cause (including its full trace); `actor` remains the identity used by the workflow for permissions, so event moves still use `system`. For ordinary moves, `sourceActor` equals `actor`. Use `sourceActor` to attribute work started by a rule, and pass the real actor when firing workflow events; omitted event actors default to the system.
98
+ Work handlers receive the original optional `actor` on `onOwnerChanged`, `onUnblocked` and `onSubtasksFinished`, including `actor.trace.runId` when supplied. A status event moves as the system but records the actor it was fired with; pass the real actor when firing one, since an omitted actor defaults to the system.
123
99
 
124
100
  `GET /api/projects/me` as a signed-in user returns 200 with `permissions`; `POST /api/projects/issues` with a `title` returns 201
125
101
  with an identifier such as `PM-1`.
@@ -1,3 +0,0 @@
1
- /** Reports the editor's leave decision to the host; only dirty or pending editors subscribe to page unload. */
2
- export declare function useWorkflowLeaveGuard(dirty: boolean, pending: boolean, message: string): () => void;
3
- //# sourceMappingURL=use-workflow-leave-guard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-workflow-leave-guard.d.ts","sourceRoot":"","sources":["../../../client/hooks/use-workflow-leave-guard.ts"],"names":[],"mappings":"AAGA,+GAA+G;AAC/G,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,MAAM,IAAI,CAwBZ"}
@@ -1,31 +0,0 @@
1
- import { useNavigationGuard } from '@nocobase/app-client';
2
- import { useCallback, useLayoutEffect, useRef } from 'react';
3
- /** Reports the editor's leave decision to the host; only dirty or pending editors subscribe to page unload. */
4
- export function useWorkflowLeaveGuard(dirty, pending, message) {
5
- const stateRef = useRef({ dirty, pending, message });
6
- useLayoutEffect(() => {
7
- stateRef.current = { dirty, pending, message };
8
- }, [dirty, pending, message]);
9
- useNavigationGuard(() => {
10
- const state = stateRef.current;
11
- return !state.pending && (!state.dirty || window.confirm(state.message));
12
- });
13
- const active = dirty || pending;
14
- useLayoutEffect(() => {
15
- if (!active)
16
- return;
17
- const onBeforeUnload = (event) => {
18
- const state = stateRef.current;
19
- if (!state.dirty && !state.pending)
20
- return;
21
- event.preventDefault();
22
- event.returnValue = '';
23
- };
24
- window.addEventListener('beforeunload', onBeforeUnload);
25
- return () => window.removeEventListener('beforeunload', onBeforeUnload);
26
- }, [active]);
27
- return useCallback(() => {
28
- stateRef.current = { ...stateRef.current, dirty: false, pending: false };
29
- }, []);
30
- }
31
- //# sourceMappingURL=use-workflow-leave-guard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-workflow-leave-guard.js","sourceRoot":"","sources":["../../../client/hooks/use-workflow-leave-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE7D,+GAA+G;AAC/G,MAAM,UAAU,qBAAqB,CACnC,KAAc,EACd,OAAgB,EAChB,OAAe;IAEf,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACrD,eAAe,CAAC,GAAG,EAAE;QACnB,QAAQ,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IACjD,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9B,kBAAkB,CAAC,GAAG,EAAE;QACtB,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,KAAK,IAAI,OAAO,CAAC;IAChC,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAQ,EAAE;YACxD,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC;YAC/B,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO;gBAAE,OAAO;YAC3C,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,WAAW,GAAG,EAAE,CAAC;QACzB,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;QACxD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAC1E,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,OAAO,WAAW,CAAC,GAAG,EAAE;QACtB,QAAQ,CAAC,OAAO,GAAG,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC3E,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { StatusRuleEditorProps, StatusRuleSummaryProps } from './status-rule-types.js';
3
- /** The items, each with its label and whether it is required. A checklist keeps at least one; remove the rule instead. */
4
- export declare function ChecklistEditor({ config, onChange, }: StatusRuleEditorProps): ReactElement;
5
- export declare function ChecklistSummary({ config, }: StatusRuleSummaryProps): ReactElement;
6
- export declare function NotifyOwnerEditor({ config, onChange, idPrefix, }: StatusRuleEditorProps): ReactElement;
7
- export declare function NotifyOwnerSummary({ config, }: StatusRuleSummaryProps): ReactElement;
8
- export declare function SubtasksDoneSummary(): ReactElement;
9
- export declare function BlockersDoneSummary(): ReactElement;
10
- /** A `startOption` rule's label and hint; a keyed one (a template's) shows in the reader's words until edited. */
11
- export declare function StartOptionEditor({ config, onChange, idPrefix, }: StatusRuleEditorProps): ReactElement;
12
- export declare function StartOptionSummary({ config, }: StatusRuleSummaryProps): ReactElement;
13
- //# sourceMappingURL=built-in-rule-editors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"built-in-rule-editors.d.ts","sourceRoot":"","sources":["../../../client/lib/built-in-rule-editors.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAc1C,OAAO,KAAK,EAEV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAahC,0HAA0H;AAC1H,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,QAAQ,GACT,EAAE,qBAAqB,GAAG,YAAY,CAqEtC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,GACP,EAAE,sBAAsB,GAAG,YAAY,CAWvC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,EAAE,qBAAqB,GAAG,YAAY,CAoBtC;AAED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,GACP,EAAE,sBAAsB,GAAG,YAAY,CAavC;AAED,wBAAgB,mBAAmB,IAAI,YAAY,CAGlD;AAED,wBAAgB,mBAAmB,IAAI,YAAY,CAGlD;AAED,kHAAkH;AAClH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,EAAE,qBAAqB,GAAG,YAAY,CAmCtC;AAED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,GACP,EAAE,sBAAsB,GAAG,YAAY,CAavC"}
@@ -1,86 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /** The settings editors and summaries of this plugin's own status rule types (`built-in-rule-types.ts`). */
3
- import { useTranslation } from '@nocobase/i18n/client';
4
- import { PlusIcon, Trash2Icon } from 'lucide-react';
5
- import { CHECKLIST_ITEMS_MAX, CHECKLIST_LABEL_MAX, NOTIFY_MESSAGE_MAX, START_LABEL_MAX, messageText, } from '../../shared/workflows.js';
6
- import { PmExpandableTextarea } from '../components/pm-expandable-textarea.js';
7
- import { Button } from '../components/ui/button.js';
8
- import { Checkbox } from '../components/ui/checkbox.js';
9
- import { Input } from '../components/ui/input.js';
10
- const itemsOf = (config) => Array.isArray(config.items)
11
- ? config.items
12
- : [];
13
- /** A key for a new checklist item: `item_1`, `item_2`… whichever is free; it stays when the label changes. */
14
- function newItemKey(items) {
15
- const taken = new Set(items.map((item) => item.key));
16
- for (let n = 1;; n += 1)
17
- if (!taken.has(`item_${n}`))
18
- return `item_${n}`;
19
- }
20
- /** The items, each with its label and whether it is required. A checklist keeps at least one; remove the rule instead. */
21
- export function ChecklistEditor({ config, onChange, }) {
22
- const { t } = useTranslation();
23
- const items = itemsOf(config);
24
- const setItems = (next) => onChange({ items: next });
25
- const update = (key, patch) => setItems(items.map((entry) => entry.key === key ? { ...entry, ...patch } : entry));
26
- return (_jsxs("ul", { className: 'space-y-2', children: [items.map((item, index) => (_jsxs("li", { className: 'flex min-w-0 items-center gap-2', children: [_jsx(Input, { value: item.label, maxLength: CHECKLIST_LABEL_MAX, placeholder: t('workflows.rules.itemPlaceholder'), "aria-label": t('workflows.rules.itemLabel', {
27
- position: index + 1,
28
- }), className: 'h-8 min-w-0 flex-1', onChange: (event) => update(item.key, { label: event.target.value }) }), _jsxs("label", { className: 'flex shrink-0 items-center gap-1.5 text-xs', children: [_jsx(Checkbox, { checked: item.required, onCheckedChange: (checked) => update(item.key, { required: checked === true }) }), t('workflows.rules.required')] }), _jsx(Button, { variant: 'ghost', size: 'icon-sm', disabled: items.length <= 1, "aria-label": t('workflows.rules.removeItem', {
29
- position: index + 1,
30
- }), onClick: () => setItems(items.filter((entry) => entry.key !== item.key)), children: _jsx(Trash2Icon, {}) })] }, item.key))), _jsx("li", { children: _jsxs(Button, { variant: 'outline', size: 'sm', disabled: items.length >= CHECKLIST_ITEMS_MAX, onClick: () => setItems([
31
- ...items,
32
- { key: newItemKey(items), label: '', required: true },
33
- ]), children: [_jsx(PlusIcon, { "data-icon": 'inline-start' }), t('workflows.rules.addItem')] }) })] }));
34
- }
35
- export function ChecklistSummary({ config, }) {
36
- const { t } = useTranslation();
37
- const items = itemsOf(config);
38
- return (_jsx(_Fragment, { children: t('workflows.ruleChecklistShort', {
39
- count: items.length,
40
- required: items.filter((item) => item.required).length,
41
- }) }));
42
- }
43
- export function NotifyOwnerEditor({ config, onChange, idPrefix, }) {
44
- const { t } = useTranslation();
45
- return (_jsxs("div", { className: 'space-y-1.5', children: [_jsx("label", { htmlFor: `${idPrefix}-message`, className: 'text-sm font-medium', children: t('workflows.rules.message') }), _jsx(PmExpandableTextarea, { id: `${idPrefix}-message`,
46
- // A keyed message (a template's) shows in the reader's words; editing it makes it plain text.
47
- value: messageText(config.message, t) ?? '', maxLength: NOTIFY_MESSAGE_MAX, rows: 2, placeholder: t('workflows.rules.messagePlaceholder'), onChange: (event) => onChange(event.target.value ? { message: event.target.value } : {}) })] }));
48
- }
49
- export function NotifyOwnerSummary({ config, }) {
50
- const { t } = useTranslation();
51
- const message = messageText(config.message, t);
52
- return (_jsx(_Fragment, { children: message
53
- ? t('workflows.ruleNotifyOwnerWith', {
54
- message,
55
- interpolation: { escapeValue: false },
56
- })
57
- : t('workflows.ruleNotifyOwnerShort') }));
58
- }
59
- export function SubtasksDoneSummary() {
60
- const { t } = useTranslation();
61
- return _jsx(_Fragment, { children: t('workflows.ruleSubtasksDoneShort') });
62
- }
63
- export function BlockersDoneSummary() {
64
- const { t } = useTranslation();
65
- return _jsx(_Fragment, { children: t('workflows.ruleBlockersDoneShort') });
66
- }
67
- /** A `startOption` rule's label and hint; a keyed one (a template's) shows in the reader's words until edited. */
68
- export function StartOptionEditor({ config, onChange, idPrefix, }) {
69
- const { t } = useTranslation();
70
- const set = (field, value) => {
71
- const { [field]: _dropped, ...rest } = config;
72
- onChange(value ? { ...rest, [field]: value } : rest);
73
- };
74
- return (_jsxs("div", { className: 'space-y-3', children: [_jsxs("div", { className: 'space-y-1.5', children: [_jsx("label", { htmlFor: `${idPrefix}-label`, className: 'text-sm font-medium', children: t('workflows.rules.startLabel') }), _jsx(Input, { id: `${idPrefix}-label`, value: messageText(config.label, t) ?? '', maxLength: START_LABEL_MAX, placeholder: t('workflows.rules.startLabelPlaceholder'), onChange: (event) => set('label', event.target.value) })] }), _jsxs("div", { className: 'space-y-1.5', children: [_jsx("label", { htmlFor: `${idPrefix}-hint`, className: 'text-sm font-medium', children: t('workflows.rules.startHint') }), _jsx(PmExpandableTextarea, { id: `${idPrefix}-hint`, value: messageText(config.hint, t) ?? '', maxLength: NOTIFY_MESSAGE_MAX, rows: 2, placeholder: t('workflows.rules.startHintPlaceholder'), onChange: (event) => set('hint', event.target.value) })] })] }));
75
- }
76
- export function StartOptionSummary({ config, }) {
77
- const { t } = useTranslation();
78
- const label = messageText(config.label, t);
79
- return (_jsx(_Fragment, { children: label
80
- ? t('workflows.ruleStartOptionWith', {
81
- label,
82
- interpolation: { escapeValue: false },
83
- })
84
- : t('workflows.ruleStartOptionShort') }));
85
- }
86
- //# sourceMappingURL=built-in-rule-editors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"built-in-rule-editors.js","sourceRoot":"","sources":["../../../client/lib/built-in-rule-editors.tsx"],"names":[],"mappings":";AAAA,4GAA4G;AAC5G,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,WAAW,GAEZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CA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,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GACpD,IACE,IACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,MAAM,GACiB;IACvB,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3C,OAAO,CACL,4BACG,KAAK;YACJ,CAAC,CAAC,CAAC,CAAC,+BAA+B,EAAE;gBACjC,KAAK;gBACL,aAAa,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;aACtC,CAAC;YACJ,CAAC,CAAC,CAAC,CAAC,gCAAgC,CAAC,GACtC,CACJ,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { StatusRuleTypeUI } from './status-rule-types.js';
2
- export declare const BUILT_IN_STATUS_RULE_TYPES: readonly StatusRuleTypeUI[];
3
- //# sourceMappingURL=built-in-rule-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"built-in-rule-types.d.ts","sourceRoot":"","sources":["../../../client/lib/built-in-rule-types.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI/D,eAAO,MAAM,0BAA0B,EAAE,SAAS,gBAAgB,EAmDjE,CAAC"}
@@ -1,63 +0,0 @@
1
- /**
2
- * This plugin's own status rule types in the workflow editor, described like the ones other plugins contribute
3
- * (`status-rule-types.ts`), so the editor treats every type the same way. The server's are in
4
- * `server/domains/workflows/built-in-rule-types.ts`; their stored form is unchanged (`subtasksDone` and `blockersDone`
5
- * keep no settings, so they have no `initialConfig`).
6
- */
7
- import { BellIcon, HourglassIcon, ListChecksIcon, ListTreeIcon, SquarePlusIcon, } from 'lucide-react';
8
- import { ACCESS_NAMESPACE } from '../../shared/access.js';
9
- import { BlockersDoneSummary, ChecklistEditor, ChecklistSummary, NotifyOwnerEditor, NotifyOwnerSummary, StartOptionEditor, StartOptionSummary, SubtasksDoneSummary, } from './built-in-rule-editors.js';
10
- const text = (key) => ({ key, ns: ACCESS_NAMESPACE });
11
- export const BUILT_IN_STATUS_RULE_TYPES = [
12
- {
13
- type: 'checklist',
14
- title: text('workflows.rules.checklist'),
15
- hint: text('workflows.rules.checklistHint'),
16
- group: 'action',
17
- Icon: ListChecksIcon,
18
- initialConfig: { items: [{ key: 'item_1', label: '', required: true }] },
19
- Editor: ChecklistEditor,
20
- Summary: ChecklistSummary,
21
- },
22
- {
23
- type: 'notifyOwner',
24
- title: text('workflows.rules.notifyOwner'),
25
- hint: text('workflows.rules.notifyOwnerHint'),
26
- group: 'action',
27
- Icon: BellIcon,
28
- initialConfig: {},
29
- Editor: NotifyOwnerEditor,
30
- Summary: NotifyOwnerSummary,
31
- },
32
- {
33
- type: 'subtasksDone',
34
- title: text('workflows.rules.subtasksDone'),
35
- hint: text('workflows.rules.subtasksDoneHint'),
36
- // A closed status never waits, so the rule is not offered there.
37
- categories: ['unstarted', 'started', 'done'],
38
- group: 'condition',
39
- Icon: ListTreeIcon,
40
- Summary: SubtasksDoneSummary,
41
- },
42
- {
43
- type: 'blockersDone',
44
- title: text('workflows.rules.blockersDone'),
45
- hint: text('workflows.rules.blockersDoneHint'),
46
- group: 'condition',
47
- Icon: HourglassIcon,
48
- Summary: BlockersDoneSummary,
49
- },
50
- {
51
- type: 'startOption',
52
- title: text('workflows.rules.startOption'),
53
- hint: text('workflows.rules.startOptionHint'),
54
- // A new issue cannot be created finished.
55
- categories: ['unstarted', 'started'],
56
- group: 'condition',
57
- Icon: SquarePlusIcon,
58
- initialConfig: {},
59
- Editor: StartOptionEditor,
60
- Summary: StartOptionSummary,
61
- },
62
- ];
63
- //# sourceMappingURL=built-in-rule-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"built-in-rule-types.js","sourceRoot":"","sources":["../../../client/lib/built-in-rule-types.ts"],"names":[],"mappings":"AAAA;;;;;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W,EAAE,SAAS,EAAE,MAAM,CAAC;QAC5C,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,mBAAmB;KAC7B;IACD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,IAAI,CAAC,8BAA8B,CAAC;QAC3C,IAAI,EAAE,IAAI,CAAC,kCAAkC,CAAC;QAC9C,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,mBAAmB;KAC7B;IACD;QACE,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,IAAI,CAAC,6BAA6B,CAAC;QAC1C,IAAI,EAAE,IAAI,CAAC,iCAAiC,CAAC;QAC7C,0CAA0C;QAC1C,UAAU,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;QACpC,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,cAAc;QACpB,aAAa,EAAE,EAAE;QACjB,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,kBAAkB;KAC5B;CACF,CAAC"}
@@ -1,60 +0,0 @@
1
- import { type ComponentType, type Context } from 'react';
2
- import type { StatusCategory } from '../../shared/issues.js';
3
- import type { KindTitle } from '../../shared/kinds.js';
4
- export type StatusRuleConfig = Readonly<Record<string, unknown>>;
5
- /** The status a rule is on, as its editor and summary see it. */
6
- export interface StatusRuleStatus {
7
- readonly key: string;
8
- /** As the reader sees it: translated while it keeps its default name. */
9
- readonly name: string;
10
- readonly category: StatusCategory;
11
- }
12
- export interface StatusRuleEditorProps {
13
- readonly config: StatusRuleConfig;
14
- readonly onChange: (config: StatusRuleConfig) => void;
15
- readonly status: StatusRuleStatus;
16
- /** A prefix for the ids of the editor's fields, unique on the page. */
17
- readonly idPrefix: string;
18
- }
19
- export interface StatusRuleSummaryProps {
20
- readonly config: StatusRuleConfig;
21
- readonly status: StatusRuleStatus;
22
- }
23
- /**
24
- * Where the editor's "Add rule" menu lists a type: `action` under "When entering" (it does something once an issue
25
- * entered the status), `condition` under "Entry conditions" (it only lets an issue in or keeps it out).
26
- */
27
- export type StatusRuleGroup = 'action' | 'condition';
28
- export interface StatusRuleTypeUI {
29
- readonly type: string;
30
- readonly title: KindTitle;
31
- /** One sentence under the title in the "Add rule" menu. */
32
- readonly hint?: KindTitle;
33
- /** Where it may be put; every category when left out. The server refuses the others. */
34
- readonly categories?: readonly StatusCategory[];
35
- /** `action` when left out. */
36
- readonly group?: StatusRuleGroup;
37
- /** Drawn before its summary; a puzzle piece when left out. */
38
- readonly Icon?: ComponentType<{
39
- readonly className?: string;
40
- }>;
41
- /** The settings a rule starts with when it is added; a rule of a type without them is stored without `config`. */
42
- readonly initialConfig?: StatusRuleConfig;
43
- /** Edits the settings; a type without settings has nothing to expand. */
44
- readonly Editor?: ComponentType<StatusRuleEditorProps>;
45
- /**
46
- * The rule in one short line, from its settings: on its collapsed card in the editor and under its status, such as
47
- * "Runs Reviewer: Analyse and propose…" or "Checklist: 3 items, 2 required". A component, so it may read what it
48
- * names (an agent's name) through hooks.
49
- */
50
- readonly Summary: ComponentType<StatusRuleSummaryProps>;
51
- }
52
- export declare const StatusRuleTypesContext: Context<readonly StatusRuleTypeUI[]>;
53
- /** This plugin's own types, then those the application gives (a given type cannot replace a built-in one). */
54
- export declare function useStatusRuleTypes(): readonly StatusRuleTypeUI[];
55
- export declare function groupOf(type: Pick<StatusRuleTypeUI, 'group'>): StatusRuleGroup;
56
- /** Whether a type may sit on a status of `category`. */
57
- export declare function allowedOn(type: Pick<StatusRuleTypeUI, 'categories'>, category: StatusCategory): boolean;
58
- /** A title given as text or as an i18n key in another plugin's namespace. */
59
- export declare function useTitleText(): (title: KindTitle) => string;
60
- //# sourceMappingURL=status-rule-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status-rule-types.d.ts","sourceRoot":"","sources":["../../../client/lib/status-rule-types.ts"],"names":[],"mappings":"AAYA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,OAAO,EACb,MAAM,OAAO,CAAC;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Aa,CAAC;QAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,kHAAkH;IAClH,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,CAAC;IAC1C,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,sBAAsB,EAAE,OAAO,CAAC,SAAS,gBAAgB,EAAE,CACxB,CAAC;AAEjD,8GAA8G;AAC9G,wBAAgB,kBAAkB,IAAI,SAAS,gBAAgB,EAAE,CAYhE;AAED,wBAAgB,OAAO,CACrB,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,GACpC,eAAe,CAEjB;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAC1C,QAAQ,EAAE,cAAc,GACvB,OAAO,CAET;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,IAAI,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAM3D"}
@@ -1,38 +0,0 @@
1
- /**
2
- * Status rule types as the workflow editor shows them. This plugin's own types (`built-in-rule-types.tsx`: checklist,
3
- * notify the owner, wait for sub-issues, wait for blockers) and the ones the application gives through
4
- * `StatusRuleTypesContext` (the assembling application joins the agents plugin's `runAgent` and `suggestExecutor` here; this plugin imports
5
- * none of them) are described the same way, and `useStatusRuleTypes` lists them together, the built-in ones first. The
6
- * server registers the same types (`projectsStatusRulesToken`).
7
- *
8
- * Each type has a title and a hint (i18n keys in its plugin's namespace), the categories of status it may sit on, the
9
- * group the editor's "Add rule" menu lists it under, the settings a new rule starts with, an editor for its settings
10
- * and a one-line summary. A rule whose type nobody gives here is shown as unavailable and can only be removed.
11
- */
12
- import { useTranslation } from '@nocobase/i18n/client';
13
- import { createContext, useContext, useMemo, } from 'react';
14
- import { BUILT_IN_STATUS_RULE_TYPES } from './built-in-rule-types.js';
15
- export const StatusRuleTypesContext = createContext([]);
16
- /** This plugin's own types, then those the application gives (a given type cannot replace a built-in one). */
17
- export function useStatusRuleTypes() {
18
- const given = useContext(StatusRuleTypesContext);
19
- return useMemo(() => [
20
- ...BUILT_IN_STATUS_RULE_TYPES,
21
- ...given.filter((type) => !BUILT_IN_STATUS_RULE_TYPES.some((own) => own.type === type.type)),
22
- ], [given]);
23
- }
24
- export function groupOf(type) {
25
- return type.group ?? 'action';
26
- }
27
- /** Whether a type may sit on a status of `category`. */
28
- export function allowedOn(type, category) {
29
- return !type.categories || type.categories.includes(category);
30
- }
31
- /** A title given as text or as an i18n key in another plugin's namespace. */
32
- export function useTitleText() {
33
- const { t } = useTranslation();
34
- return (title) => typeof title === 'string'
35
- ? title
36
- : t(title.key, { ns: title.ns, defaultValue: title.key });
37
- }
38
- //# sourceMappingURL=status-rule-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status-rule-types.js","sourceRoot":"","sources":["../../../client/lib/status-rule-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,aAAa,EACb,UAAU,EACV,OAAO,GAGR,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAsDtE,MAAM,CAAC,MAAM,sBAAsB,GACjC,aAAa,CAA8B,EAAE,CAAC,CAAC;AAEjD,8GAA8G;AAC9G,MAAM,UAAU,kBAAkB;IAChC,MAAM,KAAK,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAC;IACjD,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC;QACJ,GAAG,0BAA0B;QAC7B,GAAG,KAAK,CAAC,MAAM,CACb,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,CACpE;KACF,EACD,CAAC,KAAK,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CACrB,IAAqC;IAErC,OAAO,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC;AAChC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,SAAS,CACvB,IAA0C,EAC1C,QAAwB;IAExB,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChE,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,YAAY;IAC1B,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO,CAAC,KAAK,EAAE,EAAE,CACf,OAAO,KAAK,KAAK,QAAQ;QACvB,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AAChE,CAAC"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Workflow events other plugins contribute, as the workflow editor and the timeline show them, given by the
3
- * application (the assembling application joins its own here; this plugin imports none of them). The server registers the same keys
4
- * (`projectsWorkflowEventsToken`) with the same placement (`from`, `to`).
5
- *
6
- * Each event has a title (what happened, such as "Pull request merged") and an optional hint, as text or i18n keys in
7
- * its plugin's namespace. The editor offers it on every status of a category it may leave, to choose where the system
8
- * then moves the issue. A transition on an event nobody gives here is shown as unavailable and can only be removed.
9
- */
10
- import { type Context } from 'react';
11
- import type { StatusCategory } from '../../shared/issues.js';
12
- import type { KindTitle } from '../../shared/kinds.js';
13
- import type { WorkflowEventPlacement } from '../../shared/workflows.js';
14
- export interface WorkflowEventUI extends WorkflowEventPlacement {
15
- readonly title: KindTitle;
16
- /** One sentence under the title in the editor. */
17
- readonly hint?: KindTitle;
18
- }
19
- export declare const WorkflowEventsContext: Context<readonly WorkflowEventUI[]>;
20
- export declare function useWorkflowEvents(): readonly WorkflowEventUI[];
21
- /** Whether a transition on the event may leave (`from`) or enter (`to`) a status of `category`. */
22
- export declare function eventAllows(event: WorkflowEventPlacement, end: 'from' | 'to', category: StatusCategory): boolean;
23
- /** A contributed event's title as the reader sees it, or null when nobody gives the event. */
24
- export declare function useEventTitle(): (key: string) => string | null;
25
- //# sourceMappingURL=workflow-events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-events.d.ts","sourceRoot":"","sources":["../../../client/lib/workflow-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAA6B,KAAK,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAGxE,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,SAAS,eAAe,EAAE,CACvB,CAAC;AAEhD,wBAAgB,iBAAiB,IAAI,SAAS,eAAe,EAAE,CAE9D;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CACzB,KAAK,EAAE,sBAAsB,EAC7B,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAGT;AAED,8FAA8F;AAC9F,wBAAgB,aAAa,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAO9D"}
@@ -1,30 +0,0 @@
1
- /**
2
- * Workflow events other plugins contribute, as the workflow editor and the timeline show them, given by the
3
- * application (the assembling application joins its own here; this plugin imports none of them). The server registers the same keys
4
- * (`projectsWorkflowEventsToken`) with the same placement (`from`, `to`).
5
- *
6
- * Each event has a title (what happened, such as "Pull request merged") and an optional hint, as text or i18n keys in
7
- * its plugin's namespace. The editor offers it on every status of a category it may leave, to choose where the system
8
- * then moves the issue. A transition on an event nobody gives here is shown as unavailable and can only be removed.
9
- */
10
- import { createContext, useContext } from 'react';
11
- import { useTitleText } from './status-rule-types.js';
12
- export const WorkflowEventsContext = createContext([]);
13
- export function useWorkflowEvents() {
14
- return useContext(WorkflowEventsContext);
15
- }
16
- /** Whether a transition on the event may leave (`from`) or enter (`to`) a status of `category`. */
17
- export function eventAllows(event, end, category) {
18
- const allowed = event[end];
19
- return !allowed || allowed.includes(category);
20
- }
21
- /** A contributed event's title as the reader sees it, or null when nobody gives the event. */
22
- export function useEventTitle() {
23
- const events = useWorkflowEvents();
24
- const text = useTitleText();
25
- return (key) => {
26
- const event = events.find((item) => item.key === key);
27
- return event ? text(event.title) : null;
28
- };
29
- }
30
- //# sourceMappingURL=workflow-events.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-events.js","sourceRoot":"","sources":["../../../client/lib/workflow-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAgB,MAAM,OAAO,CAAC;AAKhE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAQtD,MAAM,CAAC,MAAM,qBAAqB,GAChC,aAAa,CAA6B,EAAE,CAAC,CAAC;AAEhD,MAAM,UAAU,iBAAiB;IAC/B,OAAO,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,WAAW,CACzB,KAA6B,EAC7B,GAAkB,EAClB,QAAwB;IAExB,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC;AAED,8FAA8F;AAC9F,MAAM,UAAU,aAAa;IAC3B,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,OAAO,CAAC,GAAG,EAAE,EAAE;QACb,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;QACtD,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1C,CAAC,CAAC;AACJ,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type ReactElement } from 'react';
2
- /**
3
- * `/config/workflows/:workflowId`: one workflow as a covering page, laid out as the old workflow page — the status
4
- * flow, the transition matrix, the rules and the limits, and how many projects use it. Whoever holds
5
- * `pm.workflows/update` gets an Edit button; edit mode keeps the same layout and makes it operable in place (the name
6
- * in the header, the status statuses on the flow strip, the matrix's cells, each status's rules, the limits). The
7
- * whole change is saved at once; the server validates it and refuses to drop a status issues are in.
8
- */
9
- export default function WorkflowDetailPage(): ReactElement;
10
- //# sourceMappingURL=workflow-detail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-detail.d.ts","sourceRoot":"","sources":["../../../../client/pages/config/workflow-detail.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,OAAO,CAAC;AAmepE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,IAAI,YAAY,CA2DzD"}