@nocobase/app-plugin-projects 0.1.0-beta.7 → 0.1.0-beta.9
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.
- package/CHANGELOG.md +58 -0
- package/README.md +60 -104
- package/dist/client/api/changed-issues.d.ts +12 -0
- package/dist/client/api/changed-issues.d.ts.map +1 -0
- package/dist/client/api/changed-issues.js +30 -0
- package/dist/client/api/changed-issues.js.map +1 -0
- package/dist/client/api/client.d.ts +4 -23
- package/dist/client/api/client.d.ts.map +1 -1
- package/dist/client/api/client.js +4 -48
- package/dist/client/api/client.js.map +1 -1
- package/dist/client/api/keys.d.ts +2 -8
- package/dist/client/api/keys.d.ts.map +1 -1
- package/dist/client/api/keys.js +2 -17
- package/dist/client/api/keys.js.map +1 -1
- package/dist/client/components/pm-badges.d.ts +1 -1
- package/dist/client/components/pm-badges.d.ts.map +1 -1
- package/dist/client/components/pm-executor-select.d.ts +2 -0
- package/dist/client/components/pm-executor-select.d.ts.map +1 -1
- package/dist/client/components/pm-executor-select.js.map +1 -1
- package/dist/client/components/ui/radio-group.d.ts +7 -0
- package/dist/client/components/ui/radio-group.d.ts.map +1 -0
- package/dist/client/components/ui/radio-group.js +12 -0
- package/dist/client/components/ui/radio-group.js.map +1 -0
- package/dist/client/config.d.ts +0 -2
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js +1 -5
- package/dist/client/config.js.map +1 -1
- package/dist/client/issues.d.ts +2 -4
- package/dist/client/issues.d.ts.map +1 -1
- package/dist/client/issues.js +2 -3
- package/dist/client/issues.js.map +1 -1
- package/dist/client/kit/plans/lookup.d.ts +2 -2
- package/dist/client/kit/plans/lookup.js +3 -3
- package/dist/client/kit/plans/lookup.js.map +1 -1
- package/dist/client/kit/plans/plan-row.js +2 -2
- package/dist/client/kit/plans/plan-row.js.map +1 -1
- package/dist/client/kit.d.ts +3 -9
- package/dist/client/kit.d.ts.map +1 -1
- package/dist/client/kit.js +3 -9
- package/dist/client/kit.js.map +1 -1
- package/dist/client/lib/kinds.d.ts +3 -29
- package/dist/client/lib/kinds.d.ts.map +1 -1
- package/dist/client/lib/kinds.js +7 -46
- package/dist/client/lib/kinds.js.map +1 -1
- package/dist/client/lib/status-events.d.ts +21 -0
- package/dist/client/lib/status-events.d.ts.map +1 -0
- package/dist/client/lib/status-events.js +31 -0
- package/dist/client/lib/status-events.js.map +1 -0
- package/dist/client/lib/status.d.ts +5 -7
- package/dist/client/lib/status.d.ts.map +1 -1
- package/dist/client/lib/status.js +5 -7
- package/dist/client/lib/status.js.map +1 -1
- package/dist/client/locales/en-US.d.ts +6 -256
- package/dist/client/locales/en-US.d.ts.map +1 -1
- package/dist/client/locales/en-US.js +9 -255
- package/dist/client/locales/en-US.js.map +1 -1
- package/dist/client/locales/zh-CN.d.ts.map +1 -1
- package/dist/client/locales/zh-CN.js +10 -248
- package/dist/client/locales/zh-CN.js.map +1 -1
- package/dist/client/pages/issues/board/board-model.d.ts +1 -1
- package/dist/client/pages/issues/board/board-model.js +1 -1
- package/dist/client/pages/issues/board/use-board-move.d.ts +2 -8
- package/dist/client/pages/issues/board/use-board-move.d.ts.map +1 -1
- package/dist/client/pages/issues/board/use-board-move.js +5 -42
- package/dist/client/pages/issues/board/use-board-move.js.map +1 -1
- package/dist/client/pages/issues/detail/new-subtask.d.ts.map +1 -1
- package/dist/client/pages/issues/detail/new-subtask.js +6 -28
- package/dist/client/pages/issues/detail/new-subtask.js.map +1 -1
- package/dist/client/pages/issues/detail/subtask-model.d.ts +1 -1
- package/dist/client/pages/issues/detail/subtask-model.js +1 -1
- package/dist/client/pages/issues/detail/use-confirmed-update.d.ts +6 -8
- package/dist/client/pages/issues/detail/use-confirmed-update.d.ts.map +1 -1
- package/dist/client/pages/issues/detail/use-confirmed-update.js +9 -42
- package/dist/client/pages/issues/detail/use-confirmed-update.js.map +1 -1
- package/dist/client/pages/issues/detail/use-issue-page.d.ts +0 -4
- package/dist/client/pages/issues/detail/use-issue-page.d.ts.map +1 -1
- package/dist/client/pages/issues/detail/use-issue-page.js +0 -14
- package/dist/client/pages/issues/detail/use-issue-page.js.map +1 -1
- package/dist/client/pages/issues/detail/use-issue-update.d.ts +2 -2
- package/dist/client/pages/issues/detail/use-issue-update.d.ts.map +1 -1
- package/dist/client/pages/issues/detail/use-issue-update.js +4 -6
- package/dist/client/pages/issues/detail/use-issue-update.js.map +1 -1
- package/dist/client/pages/issues/new-issue-form.d.ts +11 -8
- package/dist/client/pages/issues/new-issue-form.d.ts.map +1 -1
- package/dist/client/pages/issues/new-issue-form.js +47 -79
- package/dist/client/pages/issues/new-issue-form.js.map +1 -1
- package/dist/client/pages/issues/new.d.ts.map +1 -1
- package/dist/client/pages/issues/new.js +2 -1
- package/dist/client/pages/issues/new.js.map +1 -1
- package/dist/client/pages/issues/use-executor-options.d.ts +3 -2
- package/dist/client/pages/issues/use-executor-options.d.ts.map +1 -1
- package/dist/client/pages/issues/use-executor-options.js +5 -23
- package/dist/client/pages/issues/use-executor-options.js.map +1 -1
- package/dist/client/pages/projects/detail/use-project-page.d.ts +4 -26
- package/dist/client/pages/projects/detail/use-project-page.d.ts.map +1 -1
- package/dist/client/pages/projects/detail/use-project-page.js +7 -53
- package/dist/client/pages/projects/detail/use-project-page.js.map +1 -1
- package/dist/client/pages/projects/new.d.ts +1 -1
- package/dist/client/pages/projects/new.d.ts.map +1 -1
- package/dist/client/pages/projects/new.js +3 -7
- package/dist/client/pages/projects/new.js.map +1 -1
- package/dist/client/plugin.d.ts +3 -0
- package/dist/client/plugin.d.ts.map +1 -1
- package/dist/client/plugin.js +8 -1
- package/dist/client/plugin.js.map +1 -1
- package/dist/client/projects.d.ts +2 -2
- package/dist/client/projects.d.ts.map +1 -1
- package/dist/client/projects.js +2 -2
- package/dist/client/projects.js.map +1 -1
- package/dist/client/providers/query-provider.d.ts.map +1 -1
- package/dist/client/providers/query-provider.js +13 -10
- package/dist/client/providers/query-provider.js.map +1 -1
- package/dist/database/migrations/.manifest.json +8 -0
- package/dist/database/migrations/202610240010_pm_fixed_statuses.d.ts +4 -0
- package/dist/database/migrations/202610240010_pm_fixed_statuses.d.ts.map +1 -0
- package/dist/database/migrations/202610240010_pm_fixed_statuses.js +189 -0
- package/dist/database/migrations/202610240010_pm_fixed_statuses.js.map +1 -0
- package/dist/database/migrations/202610240011_pm_issue_progress.d.ts +4 -0
- package/dist/database/migrations/202610240011_pm_issue_progress.d.ts.map +1 -0
- package/dist/database/migrations/202610240011_pm_issue_progress.js +19 -0
- package/dist/database/migrations/202610240011_pm_issue_progress.js.map +1 -0
- package/dist/server/composition.d.ts +11 -17
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +11 -56
- package/dist/server/composition.js.map +1 -1
- package/dist/server/domains/comments/comment.queries.d.ts +31 -0
- package/dist/server/domains/comments/comment.queries.d.ts.map +1 -1
- package/dist/server/domains/comments/comment.queries.js +27 -1
- package/dist/server/domains/comments/comment.queries.js.map +1 -1
- package/dist/server/domains/comments/comment.store.d.ts +19 -0
- package/dist/server/domains/comments/comment.store.d.ts.map +1 -1
- package/dist/server/domains/comments/comment.store.js +55 -0
- package/dist/server/domains/comments/comment.store.js.map +1 -1
- package/dist/server/domains/comments/index.d.ts +1 -1
- package/dist/server/domains/comments/index.d.ts.map +1 -1
- package/dist/server/domains/comments/index.js.map +1 -1
- package/dist/server/domains/issues/index.d.ts +1 -1
- package/dist/server/domains/issues/index.d.ts.map +1 -1
- package/dist/server/domains/issues/index.js +1 -1
- package/dist/server/domains/issues/index.js.map +1 -1
- package/dist/server/domains/issues/issue.context.d.ts +6 -22
- package/dist/server/domains/issues/issue.context.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.context.js +1 -22
- package/dist/server/domains/issues/issue.context.js.map +1 -1
- package/dist/server/domains/issues/issue.fields.d.ts +5 -3
- package/dist/server/domains/issues/issue.fields.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.fields.js +37 -16
- package/dist/server/domains/issues/issue.fields.js.map +1 -1
- package/dist/server/domains/issues/issue.projects.d.ts +2 -2
- package/dist/server/domains/issues/issue.projects.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.projects.js +1 -2
- package/dist/server/domains/issues/issue.projects.js.map +1 -1
- package/dist/server/domains/issues/issue.queries.d.ts +10 -7
- package/dist/server/domains/issues/issue.queries.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.queries.js +15 -41
- package/dist/server/domains/issues/issue.queries.js.map +1 -1
- package/dist/server/domains/issues/issue.routes.d.ts +1 -1
- package/dist/server/domains/issues/issue.routes.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.routes.js +20 -38
- package/dist/server/domains/issues/issue.routes.js.map +1 -1
- package/dist/server/domains/issues/issue.service.d.ts +20 -44
- package/dist/server/domains/issues/issue.service.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.service.js +26 -81
- package/dist/server/domains/issues/issue.service.js.map +1 -1
- package/dist/server/domains/issues/issue.status.d.ts +6 -10
- package/dist/server/domains/issues/issue.status.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.status.js +3 -20
- package/dist/server/domains/issues/issue.status.js.map +1 -1
- package/dist/server/domains/issues/issue.store.d.ts +2 -0
- package/dist/server/domains/issues/issue.store.d.ts.map +1 -1
- package/dist/server/domains/issues/issue.store.js +2 -0
- package/dist/server/domains/issues/issue.store.js.map +1 -1
- package/dist/server/domains/issues/ports.d.ts +19 -36
- package/dist/server/domains/issues/ports.d.ts.map +1 -1
- package/dist/server/domains/issues/ports.js +0 -5
- package/dist/server/domains/issues/ports.js.map +1 -1
- package/dist/server/domains/notices/notice.planner.d.ts +2 -1
- package/dist/server/domains/notices/notice.planner.d.ts.map +1 -1
- package/dist/server/domains/notices/notice.planner.js +2 -1
- package/dist/server/domains/notices/notice.planner.js.map +1 -1
- package/dist/server/domains/notices/notice.rules.d.ts +1 -4
- package/dist/server/domains/notices/notice.rules.d.ts.map +1 -1
- package/dist/server/domains/notices/notice.rules.js +4 -5
- package/dist/server/domains/notices/notice.rules.js.map +1 -1
- package/dist/server/domains/plans/plan.ops.d.ts +3 -3
- package/dist/server/domains/plans/plan.ops.d.ts.map +1 -1
- package/dist/server/domains/plans/plan.ops.js +23 -13
- package/dist/server/domains/plans/plan.ops.js.map +1 -1
- package/dist/server/domains/projects/index.d.ts +1 -1
- package/dist/server/domains/projects/index.d.ts.map +1 -1
- package/dist/server/domains/projects/index.js.map +1 -1
- package/dist/server/domains/projects/project.events.d.ts +10 -0
- package/dist/server/domains/projects/project.events.d.ts.map +1 -0
- package/dist/server/domains/projects/project.events.js +2 -0
- package/dist/server/domains/projects/project.events.js.map +1 -0
- package/dist/server/domains/projects/project.routes.d.ts.map +1 -1
- package/dist/server/domains/projects/project.routes.js +1 -3
- package/dist/server/domains/projects/project.routes.js.map +1 -1
- package/dist/server/domains/projects/project.service.d.ts +1 -7
- package/dist/server/domains/projects/project.service.d.ts.map +1 -1
- package/dist/server/domains/projects/project.service.js +2 -17
- package/dist/server/domains/projects/project.service.js.map +1 -1
- package/dist/server/domains/projects/project.store.d.ts +0 -1
- package/dist/server/domains/projects/project.store.d.ts.map +1 -1
- package/dist/server/domains/projects/project.store.js +0 -1
- package/dist/server/domains/projects/project.store.js.map +1 -1
- package/dist/server/domains/reports/report.service.d.ts +1 -12
- package/dist/server/domains/reports/report.service.d.ts.map +1 -1
- package/dist/server/domains/reports/report.service.js +23 -79
- package/dist/server/domains/reports/report.service.js.map +1 -1
- package/dist/server/domains/statuses/event-types.d.ts +16 -0
- package/dist/server/domains/statuses/event-types.d.ts.map +1 -0
- package/dist/server/domains/statuses/event-types.js +31 -0
- package/dist/server/domains/statuses/event-types.js.map +1 -0
- package/dist/server/domains/statuses/index.d.ts +4 -0
- package/dist/server/domains/statuses/index.d.ts.map +1 -0
- package/dist/server/domains/statuses/index.js +4 -0
- package/dist/server/domains/statuses/index.js.map +1 -0
- package/dist/server/domains/statuses/status.catalog.d.ts +15 -0
- package/dist/server/domains/statuses/status.catalog.d.ts.map +1 -0
- package/dist/server/domains/statuses/status.catalog.js +119 -0
- package/dist/server/domains/statuses/status.catalog.js.map +1 -0
- package/dist/server/domains/statuses/status.events.d.ts +15 -0
- package/dist/server/domains/statuses/status.events.d.ts.map +1 -0
- package/dist/server/domains/statuses/status.events.js +2 -0
- package/dist/server/domains/statuses/status.events.js.map +1 -0
- package/dist/server/domains/statuses/status.fire.d.ts +48 -0
- package/dist/server/domains/statuses/status.fire.d.ts.map +1 -0
- package/dist/server/domains/statuses/status.fire.js +38 -0
- package/dist/server/domains/statuses/status.fire.js.map +1 -0
- package/dist/server/domains/subscriptions/subscription.routes.d.ts.map +1 -1
- package/dist/server/domains/subscriptions/subscription.routes.js +4 -2
- package/dist/server/domains/subscriptions/subscription.routes.js.map +1 -1
- package/dist/server/domains/subtasks/subtask.blocking.d.ts +4 -4
- package/dist/server/domains/subtasks/subtask.blocking.d.ts.map +1 -1
- package/dist/server/domains/subtasks/subtask.blocking.js +2 -10
- package/dist/server/domains/subtasks/subtask.blocking.js.map +1 -1
- package/dist/server/domains/subtasks/subtask.release.d.ts +5 -9
- package/dist/server/domains/subtasks/subtask.release.d.ts.map +1 -1
- package/dist/server/domains/subtasks/subtask.release.js +0 -4
- package/dist/server/domains/subtasks/subtask.release.js.map +1 -1
- package/dist/server/domains/subtasks/subtask.service.d.ts +1 -3
- package/dist/server/domains/subtasks/subtask.service.d.ts.map +1 -1
- package/dist/server/domains/subtasks/subtask.service.js +0 -12
- package/dist/server/domains/subtasks/subtask.service.js.map +1 -1
- package/dist/server/kernel/http.d.ts.map +1 -1
- package/dist/server/kernel/http.js +0 -3
- package/dist/server/kernel/http.js.map +1 -1
- package/dist/server/kernel/kinds.d.ts +24 -6
- package/dist/server/kernel/kinds.d.ts.map +1 -1
- package/dist/server/kernel/kinds.js +21 -1
- package/dist/server/kernel/kinds.js.map +1 -1
- package/dist/server/kernel/work.d.ts +8 -4
- package/dist/server/kernel/work.d.ts.map +1 -1
- package/dist/server/kernel/work.js +21 -10
- package/dist/server/kernel/work.js.map +1 -1
- package/dist/server/locales/en-US.d.ts +0 -9
- package/dist/server/locales/en-US.d.ts.map +1 -1
- package/dist/server/locales/en-US.js +0 -9
- package/dist/server/locales/en-US.js.map +1 -1
- package/dist/server/locales/zh-CN.d.ts.map +1 -1
- package/dist/server/locales/zh-CN.js +2 -11
- package/dist/server/locales/zh-CN.js.map +1 -1
- package/dist/server/providers/change-announcer.d.ts +27 -0
- package/dist/server/providers/change-announcer.d.ts.map +1 -0
- package/dist/server/providers/change-announcer.js +74 -0
- package/dist/server/providers/change-announcer.js.map +1 -0
- package/dist/server/providers/notifications.d.ts +1 -0
- package/dist/server/providers/notifications.d.ts.map +1 -1
- package/dist/server/providers/notifications.js +6 -120
- package/dist/server/providers/notifications.js.map +1 -1
- package/dist/server/providers/projects.d.ts +3 -8
- package/dist/server/providers/projects.d.ts.map +1 -1
- package/dist/server/providers/projects.js +14 -37
- package/dist/server/providers/projects.js.map +1 -1
- package/dist/server/routes/api.d.ts.map +1 -1
- package/dist/server/routes/api.js +0 -6
- package/dist/server/routes/api.js.map +1 -1
- package/dist/server/routes/schemas.d.ts +1 -27
- package/dist/server/routes/schemas.d.ts.map +1 -1
- package/dist/server/routes/schemas.js +23 -167
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/tokens.d.ts +12 -34
- package/dist/server/tokens.d.ts.map +1 -1
- package/dist/server/tokens.js +4 -16
- package/dist/server/tokens.js.map +1 -1
- package/dist/shared/access.d.ts +0 -1
- package/dist/shared/access.d.ts.map +1 -1
- package/dist/shared/access.js +2 -11
- package/dist/shared/access.js.map +1 -1
- package/dist/shared/issues.d.ts +14 -36
- package/dist/shared/issues.d.ts.map +1 -1
- package/dist/shared/issues.js +1 -0
- package/dist/shared/issues.js.map +1 -1
- package/dist/shared/kinds.d.ts +3 -1
- package/dist/shared/kinds.d.ts.map +1 -1
- package/dist/shared/kinds.js +1 -1
- package/dist/shared/locales/access.en-US.d.ts +0 -1
- package/dist/shared/locales/access.en-US.d.ts.map +1 -1
- package/dist/shared/locales/access.en-US.js +1 -2
- package/dist/shared/locales/access.en-US.js.map +1 -1
- package/dist/shared/locales/access.zh-CN.d.ts.map +1 -1
- package/dist/shared/locales/access.zh-CN.js +1 -2
- package/dist/shared/locales/access.zh-CN.js.map +1 -1
- package/dist/shared/plans.d.ts +6 -6
- package/dist/shared/plans.d.ts.map +1 -1
- package/dist/shared/plans.js +2 -1
- package/dist/shared/plans.js.map +1 -1
- package/dist/shared/projects.d.ts +0 -4
- package/dist/shared/projects.d.ts.map +1 -1
- package/dist/shared/projects.js.map +1 -1
- package/dist/shared/realtime.d.ts +9 -3
- package/dist/shared/realtime.d.ts.map +1 -1
- package/dist/shared/realtime.js +3 -2
- package/dist/shared/realtime.js.map +1 -1
- package/dist/shared/statuses.d.ts +42 -0
- package/dist/shared/statuses.d.ts.map +1 -0
- package/dist/shared/statuses.js +73 -0
- package/dist/shared/statuses.js.map +1 -0
- package/dist/shared/subtasks.d.ts +3 -3
- package/dist/shared/subtasks.d.ts.map +1 -1
- package/package.json +9 -17
- package/skills/nocobase-app-plugin-projects/SKILL.md +27 -51
- package/dist/client/hooks/use-workflow-leave-guard.d.ts +0 -3
- package/dist/client/hooks/use-workflow-leave-guard.d.ts.map +0 -1
- package/dist/client/hooks/use-workflow-leave-guard.js +0 -31
- package/dist/client/hooks/use-workflow-leave-guard.js.map +0 -1
- package/dist/client/lib/built-in-rule-editors.d.ts +0 -13
- package/dist/client/lib/built-in-rule-editors.d.ts.map +0 -1
- package/dist/client/lib/built-in-rule-editors.js +0 -86
- package/dist/client/lib/built-in-rule-editors.js.map +0 -1
- package/dist/client/lib/built-in-rule-types.d.ts +0 -3
- package/dist/client/lib/built-in-rule-types.d.ts.map +0 -1
- package/dist/client/lib/built-in-rule-types.js +0 -63
- package/dist/client/lib/built-in-rule-types.js.map +0 -1
- package/dist/client/lib/status-rule-types.d.ts +0 -60
- package/dist/client/lib/status-rule-types.d.ts.map +0 -1
- package/dist/client/lib/status-rule-types.js +0 -38
- package/dist/client/lib/status-rule-types.js.map +0 -1
- package/dist/client/lib/workflow-events.d.ts +0 -25
- package/dist/client/lib/workflow-events.d.ts.map +0 -1
- package/dist/client/lib/workflow-events.js +0 -30
- package/dist/client/lib/workflow-events.js.map +0 -1
- package/dist/client/pages/config/workflow-detail.d.ts +0 -10
- package/dist/client/pages/config/workflow-detail.d.ts.map +0 -1
- package/dist/client/pages/config/workflow-detail.js +0 -207
- package/dist/client/pages/config/workflow-detail.js.map +0 -1
- package/dist/client/pages/config/workflows/flow-editor.d.ts +0 -15
- package/dist/client/pages/config/workflows/flow-editor.d.ts.map +0 -1
- package/dist/client/pages/config/workflows/flow-editor.js +0 -76
- package/dist/client/pages/config/workflows/flow-editor.js.map +0 -1
- package/dist/client/pages/config/workflows/status-rules.d.ts +0 -21
- package/dist/client/pages/config/workflows/status-rules.d.ts.map +0 -1
- package/dist/client/pages/config/workflows/status-rules.js +0 -203
- package/dist/client/pages/config/workflows/status-rules.js.map +0 -1
- package/dist/client/pages/config/workflows/transitions-matrix.d.ts +0 -20
- package/dist/client/pages/config/workflows/transitions-matrix.d.ts.map +0 -1
- package/dist/client/pages/config/workflows/transitions-matrix.js +0 -114
- package/dist/client/pages/config/workflows/transitions-matrix.js.map +0 -1
- package/dist/client/pages/config/workflows/use-status-name.d.ts +0 -4
- package/dist/client/pages/config/workflows/use-status-name.d.ts.map +0 -1
- package/dist/client/pages/config/workflows/use-status-name.js +0 -17
- package/dist/client/pages/config/workflows/use-status-name.js.map +0 -1
- package/dist/client/pages/config/workflows/workflow-diagram.d.ts +0 -17
- package/dist/client/pages/config/workflows/workflow-diagram.d.ts.map +0 -1
- package/dist/client/pages/config/workflows/workflow-diagram.js +0 -298
- package/dist/client/pages/config/workflows/workflow-diagram.js.map +0 -1
- package/dist/client/pages/config/workflows/workflow-model.d.ts +0 -157
- package/dist/client/pages/config/workflows/workflow-model.d.ts.map +0 -1
- package/dist/client/pages/config/workflows/workflow-model.js +0 -403
- package/dist/client/pages/config/workflows/workflow-model.js.map +0 -1
- package/dist/client/pages/config/workflows/workflow-views.d.ts +0 -31
- package/dist/client/pages/config/workflows/workflow-views.d.ts.map +0 -1
- package/dist/client/pages/config/workflows/workflow-views.js +0 -76
- package/dist/client/pages/config/workflows/workflow-views.js.map +0 -1
- package/dist/client/pages/config/workflows.d.ts +0 -8
- package/dist/client/pages/config/workflows.d.ts.map +0 -1
- package/dist/client/pages/config/workflows.js +0 -139
- package/dist/client/pages/config/workflows.js.map +0 -1
- package/dist/client/pages/issues/detail/start-dialog.d.ts +0 -20
- package/dist/client/pages/issues/detail/start-dialog.d.ts.map +0 -1
- package/dist/client/pages/issues/detail/start-dialog.js +0 -31
- package/dist/client/pages/issues/detail/start-dialog.js.map +0 -1
- package/dist/client/pages/projects/workflow-select.d.ts +0 -14
- package/dist/client/pages/projects/workflow-select.d.ts.map +0 -1
- package/dist/client/pages/projects/workflow-select.js +0 -34
- package/dist/client/pages/projects/workflow-select.js.map +0 -1
- package/dist/server/domains/approvals/approval.events.d.ts +0 -47
- package/dist/server/domains/approvals/approval.events.d.ts.map +0 -1
- package/dist/server/domains/approvals/approval.events.js +0 -2
- package/dist/server/domains/approvals/approval.events.js.map +0 -1
- package/dist/server/domains/approvals/approval.lifecycle.d.ts +0 -8
- package/dist/server/domains/approvals/approval.lifecycle.d.ts.map +0 -1
- package/dist/server/domains/approvals/approval.lifecycle.js +0 -54
- package/dist/server/domains/approvals/approval.lifecycle.js.map +0 -1
- package/dist/server/domains/approvals/approval.routes.d.ts +0 -10
- package/dist/server/domains/approvals/approval.routes.d.ts.map +0 -1
- package/dist/server/domains/approvals/approval.routes.js +0 -87
- package/dist/server/domains/approvals/approval.routes.js.map +0 -1
- package/dist/server/domains/approvals/approval.service.d.ts +0 -72
- package/dist/server/domains/approvals/approval.service.d.ts.map +0 -1
- package/dist/server/domains/approvals/approval.service.js +0 -261
- package/dist/server/domains/approvals/approval.service.js.map +0 -1
- package/dist/server/domains/approvals/approval.store.d.ts +0 -42
- package/dist/server/domains/approvals/approval.store.d.ts.map +0 -1
- package/dist/server/domains/approvals/approval.store.js +0 -66
- package/dist/server/domains/approvals/approval.store.js.map +0 -1
- package/dist/server/domains/approvals/index.d.ts +0 -4
- package/dist/server/domains/approvals/index.d.ts.map +0 -1
- package/dist/server/domains/approvals/index.js +0 -3
- package/dist/server/domains/approvals/index.js.map +0 -1
- package/dist/server/domains/checklists/checklist.routes.d.ts +0 -9
- package/dist/server/domains/checklists/checklist.routes.d.ts.map +0 -1
- package/dist/server/domains/checklists/checklist.routes.js +0 -62
- package/dist/server/domains/checklists/checklist.routes.js.map +0 -1
- package/dist/server/domains/checklists/checklist.service.d.ts +0 -26
- package/dist/server/domains/checklists/checklist.service.d.ts.map +0 -1
- package/dist/server/domains/checklists/checklist.service.js +0 -80
- package/dist/server/domains/checklists/checklist.service.js.map +0 -1
- package/dist/server/domains/checklists/checklist.store.d.ts +0 -32
- package/dist/server/domains/checklists/checklist.store.d.ts.map +0 -1
- package/dist/server/domains/checklists/checklist.store.js +0 -66
- package/dist/server/domains/checklists/checklist.store.js.map +0 -1
- package/dist/server/domains/checklists/index.d.ts +0 -4
- package/dist/server/domains/checklists/index.d.ts.map +0 -1
- package/dist/server/domains/checklists/index.js +0 -4
- package/dist/server/domains/checklists/index.js.map +0 -1
- package/dist/server/domains/workflows/built-in-rule-types.d.ts +0 -40
- package/dist/server/domains/workflows/built-in-rule-types.d.ts.map +0 -1
- package/dist/server/domains/workflows/built-in-rule-types.js +0 -260
- package/dist/server/domains/workflows/built-in-rule-types.js.map +0 -1
- package/dist/server/domains/workflows/event-types.d.ts +0 -21
- package/dist/server/domains/workflows/event-types.d.ts.map +0 -1
- package/dist/server/domains/workflows/event-types.js +0 -31
- package/dist/server/domains/workflows/event-types.js.map +0 -1
- package/dist/server/domains/workflows/index.d.ts +0 -10
- package/dist/server/domains/workflows/index.d.ts.map +0 -1
- package/dist/server/domains/workflows/index.js +0 -10
- package/dist/server/domains/workflows/index.js.map +0 -1
- package/dist/server/domains/workflows/rule-types.d.ts +0 -129
- package/dist/server/domains/workflows/rule-types.d.ts.map +0 -1
- package/dist/server/domains/workflows/rule-types.js +0 -33
- package/dist/server/domains/workflows/rule-types.js.map +0 -1
- package/dist/server/domains/workflows/templates.d.ts +0 -62
- package/dist/server/domains/workflows/templates.d.ts.map +0 -1
- package/dist/server/domains/workflows/templates.js +0 -63
- package/dist/server/domains/workflows/templates.js.map +0 -1
- package/dist/server/domains/workflows/workflow.diff.d.ts +0 -14
- package/dist/server/domains/workflows/workflow.diff.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.diff.js +0 -80
- package/dist/server/domains/workflows/workflow.diff.js.map +0 -1
- package/dist/server/domains/workflows/workflow.events.d.ts +0 -26
- package/dist/server/domains/workflows/workflow.events.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.events.js +0 -2
- package/dist/server/domains/workflows/workflow.events.js.map +0 -1
- package/dist/server/domains/workflows/workflow.fire.d.ts +0 -38
- package/dist/server/domains/workflows/workflow.fire.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.fire.js +0 -57
- package/dist/server/domains/workflows/workflow.fire.js.map +0 -1
- package/dist/server/domains/workflows/workflow.registry.d.ts +0 -27
- package/dist/server/domains/workflows/workflow.registry.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.registry.js +0 -132
- package/dist/server/domains/workflows/workflow.registry.js.map +0 -1
- package/dist/server/domains/workflows/workflow.routes.d.ts +0 -6
- package/dist/server/domains/workflows/workflow.routes.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.routes.js +0 -148
- package/dist/server/domains/workflows/workflow.routes.js.map +0 -1
- package/dist/server/domains/workflows/workflow.rules.d.ts +0 -14
- package/dist/server/domains/workflows/workflow.rules.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.rules.js +0 -212
- package/dist/server/domains/workflows/workflow.rules.js.map +0 -1
- package/dist/server/domains/workflows/workflow.service.d.ts +0 -71
- package/dist/server/domains/workflows/workflow.service.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.service.js +0 -366
- package/dist/server/domains/workflows/workflow.service.js.map +0 -1
- package/dist/server/domains/workflows/workflow.store.d.ts +0 -33
- package/dist/server/domains/workflows/workflow.store.d.ts.map +0 -1
- package/dist/server/domains/workflows/workflow.store.js +0 -148
- package/dist/server/domains/workflows/workflow.store.js.map +0 -1
- package/dist/shared/approvals.d.ts +0 -37
- package/dist/shared/approvals.d.ts.map +0 -1
- package/dist/shared/approvals.js +0 -4
- package/dist/shared/approvals.js.map +0 -1
- package/dist/shared/checklists.d.ts +0 -27
- package/dist/shared/checklists.d.ts.map +0 -1
- package/dist/shared/checklists.js +0 -7
- package/dist/shared/checklists.js.map +0 -1
- package/dist/shared/workflows.d.ts +0 -276
- package/dist/shared/workflows.d.ts.map +0 -1
- package/dist/shared/workflows.js +0 -151
- package/dist/shared/workflows.js.map +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export const STATUS_CATEGORIES = [
|
|
2
|
+
'unstarted',
|
|
3
|
+
'started',
|
|
4
|
+
'done',
|
|
5
|
+
'closed',
|
|
6
|
+
];
|
|
7
|
+
export const BACKLOG_STATUS = 'backlog';
|
|
8
|
+
export const IN_PROGRESS_STATUS = 'in_progress';
|
|
9
|
+
export const BLOCKED_STATUS = 'blocked';
|
|
10
|
+
export const IN_REVIEW_STATUS = 'in_review';
|
|
11
|
+
export const DONE_STATUS = 'done';
|
|
12
|
+
export const CANCELLED_STATUS = 'cancelled';
|
|
13
|
+
/** The fixed statuses, in order. Names are English; the browser shows each in the viewer's language. */
|
|
14
|
+
export const FIXED_STATUSES = [
|
|
15
|
+
{
|
|
16
|
+
key: BACKLOG_STATUS,
|
|
17
|
+
name: 'Backlog',
|
|
18
|
+
category: 'unstarted',
|
|
19
|
+
color: 'gray',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
key: IN_PROGRESS_STATUS,
|
|
23
|
+
name: 'In progress',
|
|
24
|
+
category: 'started',
|
|
25
|
+
color: 'yellow',
|
|
26
|
+
},
|
|
27
|
+
{ key: BLOCKED_STATUS, name: 'Blocked', category: 'started', color: 'red' },
|
|
28
|
+
{
|
|
29
|
+
key: IN_REVIEW_STATUS,
|
|
30
|
+
name: 'In review',
|
|
31
|
+
category: 'started',
|
|
32
|
+
color: 'purple',
|
|
33
|
+
},
|
|
34
|
+
{ key: DONE_STATUS, name: 'Done', category: 'done', color: 'green' },
|
|
35
|
+
{
|
|
36
|
+
key: CANCELLED_STATUS,
|
|
37
|
+
name: 'Cancelled',
|
|
38
|
+
category: 'closed',
|
|
39
|
+
color: 'gray',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
export const STATUS_KEYS = FIXED_STATUSES.map((status) => status.key);
|
|
43
|
+
/** The statuses a new issue may start in: right away, or later. */
|
|
44
|
+
export const START_STATUSES = [
|
|
45
|
+
IN_PROGRESS_STATUS,
|
|
46
|
+
BACKLOG_STATUS,
|
|
47
|
+
];
|
|
48
|
+
/** Where a new issue starts when its creator names no status: nothing starts. */
|
|
49
|
+
export const DEFAULT_START_STATUS = BACKLOG_STATUS;
|
|
50
|
+
/** The owner is told when an issue enters one of these. */
|
|
51
|
+
export const OWNER_NOTIFIED_STATUSES = [
|
|
52
|
+
BLOCKED_STATUS,
|
|
53
|
+
IN_REVIEW_STATUS,
|
|
54
|
+
];
|
|
55
|
+
export function isFixedStatus(key) {
|
|
56
|
+
return STATUS_KEYS.includes(key);
|
|
57
|
+
}
|
|
58
|
+
export function statusCategory(key) {
|
|
59
|
+
return FIXED_STATUSES.find((status) => status.key === key)?.category ?? null;
|
|
60
|
+
}
|
|
61
|
+
export function statusOf(key) {
|
|
62
|
+
return FIXED_STATUSES.find((status) => status.key === key) ?? null;
|
|
63
|
+
}
|
|
64
|
+
export function isTerminalCategory(category) {
|
|
65
|
+
return category === 'done' || category === 'closed';
|
|
66
|
+
}
|
|
67
|
+
/** Whether a status still has its fixed English name, so the interface shows the translation instead. */
|
|
68
|
+
export function hasDefaultName(status) {
|
|
69
|
+
return FIXED_STATUSES.some((fixed) => fixed.key === status.key && fixed.name === status.name);
|
|
70
|
+
}
|
|
71
|
+
/** A status event's key: dotted, its plugin's prefix first, such as `acme.merged`. */
|
|
72
|
+
export const STATUS_EVENT_PATTERN = /^[a-z][a-zA-Z0-9]{0,31}(\.[a-z][a-zA-Z0-9]{0,63}){1,3}$/u;
|
|
73
|
+
//# sourceMappingURL=statuses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statuses.js","sourceRoot":"","sources":["../../shared/statuses.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,iBAAiB,GAA8B;IAC1D,WAAW;IACX,SAAS;IACT,MAAM;IACN,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AACxC,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAChD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAC5C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAE5C,wGAAwG;AACxG,MAAM,CAAC,MAAM,cAAc,GAAgC;IACzD;QACE,GAAG,EAAE,cAAc;QACnB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,WAAW;QACrB,KAAK,EAAE,MAAM;KACd;IACD;QACE,GAAG,EAAE,kBAAkB;QACvB,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,QAAQ;KAChB;IACD,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;IAC3E;QACE,GAAG,EAAE,gBAAgB;QACrB,IAAI,EAAE,WAAW;Q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AAyG;AACzG,MAAM,UAAU,cAAc,CAAC,MAG9B;IACC,OAAO,cAAc,CAAC,IAAI,CACxB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAClE,CAAC;AACJ,CAAC;AAED,sFAAsF;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAC/B,0DAA0D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sub-issues and dependencies. An issue may wait for others: `blockedBy` holds it until the other is finished (in a
|
|
3
|
-
* done or closed status
|
|
3
|
+
* done or closed status), `relatedTo` only links the two. Sub-issues with a stage form batches: a
|
|
4
4
|
* sub-issue waits until every sibling of a lower stage is finished.
|
|
5
5
|
*/
|
|
6
6
|
import type { Executor, StatusDefinition } from './issues.js';
|
|
@@ -18,7 +18,7 @@ export interface IssueDependency {
|
|
|
18
18
|
readonly issueId: string;
|
|
19
19
|
readonly identifier: string;
|
|
20
20
|
readonly title: string;
|
|
21
|
-
/** That issue's current status,
|
|
21
|
+
/** That issue's current status, as it is now (it may be in another project). */
|
|
22
22
|
readonly status: StatusDefinition;
|
|
23
23
|
readonly type: DependencyType;
|
|
24
24
|
}
|
|
@@ -40,7 +40,7 @@ export interface SubtaskSummary {
|
|
|
40
40
|
readonly executorName: string | null;
|
|
41
41
|
/** Unfinished issues it waits for. */
|
|
42
42
|
readonly blockedCount: number;
|
|
43
|
-
/** Finished
|
|
43
|
+
/** Finished: done or cancelled. */
|
|
44
44
|
readonly terminal: boolean;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subtasks.d.ts","sourceRoot":"","sources":["../../shared/subtasks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;A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-plugin-projects",
|
|
3
3
|
"displayName": "Projects",
|
|
4
|
-
"description": "Projects, issues
|
|
5
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"description": "Projects, issues and collaboration for a NocoBase application.",
|
|
5
|
+
"version": "0.1.0-beta.9",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"prettier": "@nocobase/dev-config/prettier",
|
|
8
8
|
"engines": {
|
|
@@ -26,18 +26,10 @@
|
|
|
26
26
|
"types": "./dist/shared/access.d.ts",
|
|
27
27
|
"import": "./dist/shared/access.js"
|
|
28
28
|
},
|
|
29
|
-
"./shared/approvals": {
|
|
30
|
-
"types": "./dist/shared/approvals.d.ts",
|
|
31
|
-
"import": "./dist/shared/approvals.js"
|
|
32
|
-
},
|
|
33
29
|
"./shared/attachments": {
|
|
34
30
|
"types": "./dist/shared/attachments.d.ts",
|
|
35
31
|
"import": "./dist/shared/attachments.js"
|
|
36
32
|
},
|
|
37
|
-
"./shared/checklists": {
|
|
38
|
-
"types": "./dist/shared/checklists.d.ts",
|
|
39
|
-
"import": "./dist/shared/checklists.js"
|
|
40
|
-
},
|
|
41
33
|
"./shared/common": {
|
|
42
34
|
"types": "./dist/shared/common.d.ts",
|
|
43
35
|
"import": "./dist/shared/common.js"
|
|
@@ -78,9 +70,9 @@
|
|
|
78
70
|
"types": "./dist/shared/settings.d.ts",
|
|
79
71
|
"import": "./dist/shared/settings.js"
|
|
80
72
|
},
|
|
81
|
-
"./shared/
|
|
82
|
-
"types": "./dist/shared/
|
|
83
|
-
"import": "./dist/shared/
|
|
73
|
+
"./shared/statuses": {
|
|
74
|
+
"types": "./dist/shared/statuses.d.ts",
|
|
75
|
+
"import": "./dist/shared/statuses.js"
|
|
84
76
|
},
|
|
85
77
|
"./client": {
|
|
86
78
|
"types": "./dist/client/index.d.ts",
|
|
@@ -162,14 +154,14 @@
|
|
|
162
154
|
"react-virtuoso": "^4.18.15",
|
|
163
155
|
"remark-gfm": "^4.0.1",
|
|
164
156
|
"@nocobase/app-client": "^3.0.0-beta.1",
|
|
165
|
-
"@nocobase/app-plugin-authentication": "^2.0.0-beta.
|
|
157
|
+
"@nocobase/app-plugin-authentication": "^2.0.0-beta.9",
|
|
166
158
|
"@nocobase/app-plugin-authorization": "^1.0.0-beta.27",
|
|
167
159
|
"@nocobase/app-plugin-file": "^1.0.0-beta.23",
|
|
168
160
|
"@nocobase/app-plugin-notification": "^1.0.0-beta.27",
|
|
169
161
|
"@nocobase/app-plugin-users": "^2.0.0-beta.4",
|
|
170
|
-
"@nocobase/app-server": "^2.0.0-beta.
|
|
162
|
+
"@nocobase/app-server": "^2.0.0-beta.7",
|
|
171
163
|
"@nocobase/authorization": "^1.0.0-beta.13",
|
|
172
|
-
"@nocobase/db": "^1.0.0-beta.
|
|
164
|
+
"@nocobase/db": "^1.0.0-beta.20",
|
|
173
165
|
"@nocobase/i18n": "^1.0.0-beta.7",
|
|
174
166
|
"@nocobase/markdown-mermaid": "^0.1.0-beta.2",
|
|
175
167
|
"@nocobase/repository-input": "^0.1.0-beta.3",
|
|
@@ -189,7 +181,7 @@
|
|
|
189
181
|
"tw-animate-css": "^1.2.5",
|
|
190
182
|
"typescript": "^6.0.3",
|
|
191
183
|
"vitest": "^4.1.10",
|
|
192
|
-
"@nocobase/app-testing": "0.1.0-beta.
|
|
184
|
+
"@nocobase/app-testing": "0.1.0-beta.4",
|
|
193
185
|
"@nocobase/db-sqlite": "0.1.0-beta.5",
|
|
194
186
|
"@nocobase/dev-config": "0.1.0-beta.22"
|
|
195
187
|
},
|
|
@@ -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,
|
|
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,
|
|
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
|
|
20
|
-
|
|
21
|
-
|
|
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`, `
|
|
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
|
|
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,9 +37,9 @@ 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
|
|
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
|
-
components from `@nocobase/app-plugin-projects/client/kit`. Changes are announced on the realtime topic `pm:changes
|
|
42
|
+
components from `@nocobase/app-plugin-projects/client/kit`. Changes are announced on the realtime topic `pm:changes`, naming the changed issues in `issueIds` when they can; refresh only those issues' reads then.
|
|
43
43
|
|
|
44
44
|
The NocoBase UI Library presents these headless entries; install an item rather than building the page from scratch, and read its example (`pnpm exec shadcn view @nocobase/<item>-demo`) first. `project-detail` is a block for a project's page, `issue-detail` a block for an issue's page, and `issue-table`, `kanban` and `comment-thread` the components for the issue list, the board and an issue's activity. For agents working on issues, `agent-queue` (a block) and `agent-run-history` (a component) take the runs of `@nocobase/app-plugin-agents`. Each is installed with `yes n | pnpm exec shadcn add @nocobase/<item>` and is presentational: map the hooks' data to its props and its callbacks to the hooks' mutations.
|
|
45
45
|
|
|
@@ -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
|
|
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
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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.
|
|
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.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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,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAOlD,MAAM,OAAO,GAAG,CAAC,MAAwB,EAA6B,EAAE,CACtE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IACzB,CAAC,CAAE,MAAM,CAAC,KAAmC;IAC7C,CAAC,CAAC,EAAE,CAAC;AAET,8GAA8G;AAC9G,SAAS,UAAU,CAAC,KAAyC;IAC3D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,KAAK,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,IAAI,CAAC;QAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAAE,OAAO,QAAQ,CAAC,EAAE,CAAC;AAC5E,CAAC;AAED,0HAA0H;AAC1H,MAAM,UAAU,eAAe,CAAC,EAC9B,MAAM,EACN,QAAQ,GACc;IACtB,MAAM,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|
|
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;;;;;GAKG;AACH,OAAO,EACL,QAAQ,EACR,aAAa,EACb,cAAc,EACd,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE,CAA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