@bakers-build/addon-bakers-ui 0.6.1-next.4 → 0.6.1-next.6

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 (154) hide show
  1. package/dist/src/Component/section-list/index.d.ts +5 -5
  2. package/dist/src/Component/section-list/index.js +2 -2
  3. package/dist/src/Entity/conductor/Data/conductors.d.ts +2 -12
  4. package/dist/src/Entity/conductor/Data/conductors.js +3 -25
  5. package/dist/src/Entity/conductor/Data/own-conductor.d.ts +5 -7
  6. package/dist/src/Entity/conductor/Data/own-conductor.js +9 -16
  7. package/dist/src/Entity/project/Screen/projects-screen.js +1 -4
  8. package/dist/src/Entity/run/Component/run-detail/index.d.ts +1 -1
  9. package/dist/src/Entity/run/Component/run-detail/index.js +1 -1
  10. package/dist/src/Entity/run/Data/query.d.ts +0 -5
  11. package/dist/src/Entity/run/Data/query.js +0 -8
  12. package/dist/src/Entity/run/Data/runs.d.ts +0 -2
  13. package/dist/src/Entity/run/Data/runs.js +1 -26
  14. package/dist/src/Entity/run/Screen/run-detail.d.ts +1 -1
  15. package/dist/src/Entity/run/Screen/run-detail.js +1 -1
  16. package/dist/src/Entity/ticket/Component/edit-form/index.d.ts +1 -2
  17. package/dist/src/Entity/ticket/Component/edit-form/index.js +1 -2
  18. package/dist/src/Entity/ticket/Component/ticket-content/index.d.ts +3 -8
  19. package/dist/src/Entity/ticket/Component/ticket-content/index.js +4 -71
  20. package/dist/src/Entity/ticket/Component/ticket-content/model.d.ts +0 -25
  21. package/dist/src/Entity/ticket/Component/ticket-content/model.js +0 -195
  22. package/dist/src/Entity/ticket/Data/parents.d.ts +3 -3
  23. package/dist/src/Entity/ticket/Data/parents.js +8 -9
  24. package/dist/src/Entity/ticket/Data/query.d.ts +0 -2
  25. package/dist/src/Entity/ticket/Data/query.js +0 -8
  26. package/dist/src/Entity/ticket/Data/tickets.d.ts +0 -2
  27. package/dist/src/Entity/ticket/Data/tickets.js +1 -20
  28. package/dist/src/Entity/ticket/Data/write.d.ts +0 -32
  29. package/dist/src/Entity/ticket/Data/write.js +0 -94
  30. package/dist/src/Entity/ticket/Form/edit-data.js +10 -4
  31. package/dist/src/Entity/ticket/Form/edit-parent-source.d.ts +1 -1
  32. package/dist/src/Entity/ticket/Form/edit.d.ts +11 -8
  33. package/dist/src/Entity/ticket/Form/edit.js +1 -1
  34. package/dist/src/Entity/ticket/Form/parent-filter.d.ts +2 -2
  35. package/dist/src/Entity/ticket/Form/parent-filter.js +1 -1
  36. package/dist/src/Entity/ticket/Form/parent-source.d.ts +11 -2
  37. package/dist/src/Entity/ticket/Form/parent-source.js +5 -7
  38. package/dist/src/Entity/ticket/Screen/edit-assignment-form.d.ts +2 -2
  39. package/dist/src/Entity/ticket/Screen/edit-assignment-form.js +3 -3
  40. package/dist/src/Entity/ticket/Screen/parent-filter-form.js +3 -4
  41. package/dist/src/Entity/ticket/Screen/ticket-content-screen.d.ts +1 -1
  42. package/dist/src/Entity/ticket/Screen/ticket-content-screen.js +1 -1
  43. package/dist/src/Entity/ticket/Screen/ticket-react-markdown.js +2 -2
  44. package/dist/src/Entity/ticket/Screen/ticket-runs.d.ts +2 -0
  45. package/dist/src/Entity/ticket/Screen/ticket-runs.js +26 -16
  46. package/dist/src/Entity/ticket/Screen/ticket-search.d.ts +1 -1
  47. package/dist/src/Entity/ticket/Screen/tickets.d.ts +1 -2
  48. package/dist/src/Entity/ticket/Screen/tickets.js +0 -23
  49. package/dist/src/Entity/user/Data/member-context.d.ts +1 -1
  50. package/dist/src/Entity/user/Data/users.d.ts +17 -98
  51. package/dist/src/Entity/user/Data/users.js +27 -74
  52. package/dist/src/Entity/user/Screen/member-overview.d.ts +12 -29
  53. package/dist/src/Entity/user/Screen/member-overview.js +38 -38
  54. package/dist/src/Entity/workspace/Screen/workspace-picker.js +1 -2
  55. package/dist/src/Form/field.js +1 -1
  56. package/dist/src/Kernel/key-input.d.ts +1 -2
  57. package/dist/src/Kernel/key-input.js +1 -2
  58. package/dist/src/Kernel/logo.d.ts +3 -0
  59. package/dist/src/Kernel/logo.js +48 -0
  60. package/dist/src/Kernel/splash.js +5 -5
  61. package/dist/src/Kernel/tui-kernel.js +1 -5
  62. package/dist/src/Routing/context.d.ts +0 -5
  63. package/dist/src/Routing/context.js +0 -6
  64. package/dist/src/Routing/registry.js +3 -6
  65. package/dist/src/Routing/routes.js +1 -24
  66. package/dist/src/Screen/async-modal-screen.d.ts +1 -1
  67. package/dist/src/Screen/async-modal-screen.js +1 -1
  68. package/dist/src/Widget/chrome.d.ts +1 -1
  69. package/dist/src/Widget/chrome.js +1 -1
  70. package/dist/src/Widget/option-source.js +3 -3
  71. package/dist/src/Widget/types.d.ts +2 -3
  72. package/dist/src/index.d.ts +0 -1
  73. package/dist/src/index.js +1 -2
  74. package/dist/src/launcher.d.ts +7 -14
  75. package/dist/src/launcher.js +2 -10
  76. package/dist/src/lib/cursor.d.ts +5 -5
  77. package/dist/src/lib/cursor.js +5 -5
  78. package/dist/src/lib/refresh-signal.d.ts +1 -1
  79. package/dist/src/lib/theme.d.ts +7 -23
  80. package/dist/src/lib/theme.js +7 -23
  81. package/dist/src/plugin.d.ts +1 -2
  82. package/dist/src/plugin.js +3 -7
  83. package/dist/src/react-experiment.js +0 -2
  84. package/dist/src/route.js +1 -1
  85. package/dist/src/types.d.ts +5 -56
  86. package/package.json +4 -4
  87. package/dist/src/Agent/launch.d.ts +0 -25
  88. package/dist/src/Agent/launch.js +0 -57
  89. package/dist/src/Component/badge/index.d.ts +0 -11
  90. package/dist/src/Component/badge/index.js +0 -10
  91. package/dist/src/Component/bar-chart/index.d.ts +0 -16
  92. package/dist/src/Component/bar-chart/index.js +0 -63
  93. package/dist/src/Component/heat-map/index.d.ts +0 -21
  94. package/dist/src/Component/heat-map/index.js +0 -86
  95. package/dist/src/Component/stats-panel/index.d.ts +0 -61
  96. package/dist/src/Component/stats-panel/index.js +0 -112
  97. package/dist/src/Component/team-member-workload-list/index.d.ts +0 -9
  98. package/dist/src/Component/team-member-workload-list/index.js +0 -31
  99. package/dist/src/Entity/team/Data/members.d.ts +0 -30
  100. package/dist/src/Entity/team/Data/members.js +0 -83
  101. package/dist/src/Entity/team/Data/projects.d.ts +0 -3
  102. package/dist/src/Entity/team/Data/projects.js +0 -23
  103. package/dist/src/Entity/team/Data/team.d.ts +0 -22
  104. package/dist/src/Entity/team/Data/team.js +0 -38
  105. package/dist/src/Entity/team/Data/teams.d.ts +0 -223
  106. package/dist/src/Entity/team/Data/teams.js +0 -268
  107. package/dist/src/Entity/team/Data/workload.d.ts +0 -25
  108. package/dist/src/Entity/team/Data/workload.js +0 -60
  109. package/dist/src/Entity/team/Screen/team-member-work.d.ts +0 -41
  110. package/dist/src/Entity/team/Screen/team-member-work.js +0 -56
  111. package/dist/src/Entity/team/Screen/team-users.d.ts +0 -63
  112. package/dist/src/Entity/team/Screen/team-users.js +0 -210
  113. package/dist/src/Entity/team/Screen/team-work.d.ts +0 -39
  114. package/dist/src/Entity/team/Screen/team-work.js +0 -112
  115. package/dist/src/Entity/team/Screen/teams-screen.d.ts +0 -110
  116. package/dist/src/Entity/team/Screen/teams-screen.js +0 -264
  117. package/dist/src/Entity/ticket/Component/create-form/index.d.ts +0 -28
  118. package/dist/src/Entity/ticket/Component/create-form/index.js +0 -74
  119. package/dist/src/Entity/ticket/Component/demo-statistics.d.ts +0 -14
  120. package/dist/src/Entity/ticket/Component/demo-statistics.js +0 -88
  121. package/dist/src/Entity/ticket/Component/react-statistics.d.ts +0 -14
  122. package/dist/src/Entity/ticket/Component/react-statistics.js +0 -23
  123. package/dist/src/Entity/ticket/Data/workflow.d.ts +0 -9
  124. package/dist/src/Entity/ticket/Data/workflow.js +0 -18
  125. package/dist/src/Entity/ticket/Form/create-data.d.ts +0 -75
  126. package/dist/src/Entity/ticket/Form/create-data.js +0 -217
  127. package/dist/src/Entity/ticket/Form/create.d.ts +0 -230
  128. package/dist/src/Entity/ticket/Form/create.js +0 -198
  129. package/dist/src/Entity/ticket/Screen/create-ticket-form.d.ts +0 -133
  130. package/dist/src/Entity/ticket/Screen/create-ticket-form.js +0 -621
  131. package/dist/src/Entity/ticket/Screen/ticket-agents.d.ts +0 -134
  132. package/dist/src/Entity/ticket/Screen/ticket-agents.js +0 -253
  133. package/dist/src/Entity/ticket/Screen/ticket-react.d.ts +0 -41
  134. package/dist/src/Entity/ticket/Screen/ticket-react.js +0 -136
  135. package/dist/src/Entity/ticket-template/Data/templates.d.ts +0 -26
  136. package/dist/src/Entity/ticket-template/Data/templates.js +0 -62
  137. package/dist/src/Kernel/braid.d.ts +0 -4
  138. package/dist/src/Kernel/braid.js +0 -10
  139. package/dist/src/Screen/empty-overview.d.ts +0 -9
  140. package/dist/src/Screen/empty-overview.js +0 -14
  141. package/dist/src/Statistics/client.d.ts +0 -73
  142. package/dist/src/Statistics/client.js +0 -220
  143. package/dist/src/Statistics/comparison-chart.d.ts +0 -7
  144. package/dist/src/Statistics/comparison-chart.js +0 -525
  145. package/dist/src/Statistics/dashboard.d.ts +0 -93
  146. package/dist/src/Statistics/dashboard.js +0 -206
  147. package/dist/src/Statistics/figures.d.ts +0 -18
  148. package/dist/src/Statistics/figures.js +0 -162
  149. package/dist/src/Statistics/member-stats.d.ts +0 -58
  150. package/dist/src/Statistics/member-stats.js +0 -152
  151. package/dist/src/Statistics/presentation.d.ts +0 -8
  152. package/dist/src/Statistics/presentation.js +0 -36
  153. package/dist/src/Statistics/screen.d.ts +0 -44
  154. package/dist/src/Statistics/screen.js +0 -204
@@ -1,210 +0,0 @@
1
- import { actionItem } from '../../../Component/footer-actions/index.js';
2
- import { sectionRowNode, } from '../../../Component/section-list/index.js';
3
- import { ListCursor } from '../../../lib/cursor.js';
4
- import { columnNode } from '../../../lib/vnode.js';
5
- import { AsyncScreen } from '../../../Screen/async-screen.js';
6
- import { listRowIds, listTableTree } from '../../collection.js';
7
- import { listAllUsers, TEAM_MEMBER_TABLE, } from '../../user/Data/users.js';
8
- import { loadTeamWorkload } from '../Data/workload.js';
9
- import { TeamsScreen } from './teams-screen.js';
10
- // BB-391 AC4 (second round) — the crew's people, on the TEAM level.
11
- //
12
- // This is where the former `users` root tab went, by operator ruling: current
13
- // assignments are read through the crew they belong to, so the roster is
14
- // team-scoped.
15
- //
16
- // The answer combines three resources:
17
- //
18
- // - who is in the crew: `og_membership`
19
- // - how those people are named: the `user` collection
20
- // - what is assigned now: open tickets from the team's linked projects
21
- //
22
- // The composition lives here because it joins the team workload with the user
23
- // slice's display identities; the team data loader itself stays slice-local.
24
- /** Rows that are plain text, keyed under one name: a failure state. */
25
- const plainRows = (key, lines) => lines.map((text, index) => ({ key: `${key}-${index}`, text, bold: false }));
26
- /** What this screen says when it was opened without a crew to open. */
27
- const NO_CREW = 'Open a crew from Teams to see who is in it.';
28
- /**
29
- * The atomic team-members figure, keyed by user id. All three measurements
30
- * share its category axis and arrive from PHP as one payload.
31
- */
32
- /** One member's row: identity plus live assignments from the team workload. */
33
- function rowOf(user, workload) {
34
- return {
35
- id: user.id,
36
- label: user.label,
37
- open: workload.open,
38
- running: workload.running,
39
- waiting: workload.waiting,
40
- };
41
- }
42
- /**
43
- * One crew's people — the team level's Members tab.
44
- *
45
- * `fallback` points at the crews list: Escape lands where the operator came from,
46
- * which after the ruling is Teams and no longer a root Users tab.
47
- */
48
- export class TeamUsersScreen extends AsyncScreen {
49
- frameId = 'team-users';
50
- reload(context) {
51
- this.retry(context);
52
- }
53
- static route = {
54
- id: 'team.members',
55
- path: '/teams/:teamId/members',
56
- tab: { id: 'members', label: 'Members', scope: 'team', weight: 20 },
57
- fallback: { routeId: TeamsScreen.route.id },
58
- };
59
- id = TeamUsersScreen.route.id;
60
- cursor = new ListCursor();
61
- get selectedIndex() {
62
- return this.cursor.index;
63
- }
64
- set selectedIndex(value) {
65
- this.cursor.index = value;
66
- }
67
- get rows() {
68
- return this.drawable ? (this.readyValue?.rows ?? []) : [];
69
- }
70
- /** Whether the ready value is a CREW at all, rather than a notice about one. */
71
- get drawable() {
72
- const result = this.readyValue;
73
- return (result !== undefined && result.error === undefined && !result.unscoped);
74
- }
75
- async load(context) {
76
- if (!context.services)
77
- throw new Error('Team users requires services');
78
- const teamId = context.params?.teamId;
79
- // Reached without a crew — the shape the user level's `fallback` produces,
80
- // because a person's route carries `userId` and never a `teamId`. A notice
81
- // rather than a throw: there is nothing wrong here, there is just no crew
82
- // chosen yet, and the operator needs to be told where to choose one.
83
- if (!teamId)
84
- return { rows: [], unscoped: true };
85
- const client = context.services.client;
86
- let workload;
87
- const users = await listAllUsers(client);
88
- try {
89
- workload = await loadTeamWorkload(client, teamId);
90
- }
91
- catch (caught) {
92
- return {
93
- rows: [],
94
- error: caught instanceof Error ? caught.message : String(caught),
95
- };
96
- }
97
- // Either failure leaves the crew unknown, and an unknown crew must not be
98
- // drawn as an empty one: without the memberships there is nobody to keep,
99
- // and without the collection there is nobody to name.
100
- if (users.error !== undefined)
101
- return { rows: [], error: users.error };
102
- const resolvedIds = new Set(users.rows.map(({ id }) => id));
103
- const unresolved = workload.members.find(({ userId }) => !resolvedIds.has(userId));
104
- if (unresolved) {
105
- return {
106
- rows: [],
107
- error: `active member ${unresolved.userId} could not be resolved`,
108
- };
109
- }
110
- const byUser = new Map(workload.members.map((member) => [member.userId, member]));
111
- return {
112
- rows: users.rows
113
- // Anonymous (0) and Drupal uid 1 are never operator rows — the rule the
114
- // root list carried, kept where the list now lives.
115
- .filter((user) => byUser.has(user.id) && user.uid !== 0 && user.uid !== 1)
116
- .flatMap((user) => {
117
- const memberWorkload = byUser.get(user.id);
118
- return memberWorkload ? [rowOf(user, memberWorkload)] : [];
119
- }),
120
- };
121
- }
122
- renderLoading() {
123
- return ['Loading crew…'];
124
- }
125
- renderReady(result) {
126
- const notice = (key, lines) => columnNode('team-users', ...plainRows(key, lines).map((row) => sectionRowNode('team-users', row)));
127
- if (result.unscoped)
128
- return notice('team-users-unscoped', [NO_CREW]);
129
- if (result.error !== undefined)
130
- return notice('team-users-error', [
131
- 'Could not read the crew.',
132
- '',
133
- result.error,
134
- ]);
135
- return listTableTree(TEAM_MEMBER_TABLE, result.rows, undefined, {
136
- selectedIndex: this.selectedIndex,
137
- });
138
- }
139
- chrome(context) {
140
- const rows = this.rows;
141
- const result = this.readyValue;
142
- const name = context.params?.teamName ?? context.params?.teamId ?? 'team';
143
- if (result?.unscoped)
144
- return {
145
- selectable: 0,
146
- selectedIndex: 0,
147
- rowIds: [],
148
- title: 'bakers.build crew',
149
- meta: 'no crew chosen',
150
- };
151
- if (result?.error !== undefined)
152
- return {
153
- selectable: 0,
154
- selectedIndex: 0,
155
- rowIds: [],
156
- title: `${name} · members`,
157
- meta: 'crew unavailable',
158
- };
159
- return {
160
- selectable: rows.length,
161
- selectedIndex: this.selectedIndex,
162
- rowIds: listRowIds(TEAM_MEMBER_TABLE, rows),
163
- title: `${name} · members`,
164
- meta: `${rows.length} member(s)`,
165
- };
166
- }
167
- actions() {
168
- return [
169
- actionItem('team-users-open', 'Enter', 'open'),
170
- actionItem('team-users-tab', 'Tab', 'tabs'),
171
- ];
172
- }
173
- activate(index, context) {
174
- const row = this.rows[index];
175
- const teamId = context.params?.teamId;
176
- if (!row || !teamId || !context.navigate)
177
- return false;
178
- context.navigate('team.member.overview', {
179
- teamId,
180
- teamName: context.params?.teamName ?? teamId,
181
- userId: row.id,
182
- userName: row.label,
183
- });
184
- return true;
185
- }
186
- select(index, context) {
187
- if (index < 0 || index >= this.rows.length)
188
- return false;
189
- this.selectedIndex = index;
190
- context.requestDraw();
191
- return true;
192
- }
193
- handleInput(input, context) {
194
- if (super.handleInput(input, context))
195
- return true;
196
- if (this.readyValue === undefined)
197
- return false;
198
- if (this.cursor.handle(input, this.rows.length)) {
199
- context.requestDraw();
200
- return true;
201
- }
202
- if (input === 'enter')
203
- return this.activate(this.cursor.index, context);
204
- return false;
205
- }
206
- reset() {
207
- this.cursor.reset();
208
- super.reset();
209
- }
210
- }
@@ -1,39 +0,0 @@
1
- import type { VNode } from '@opentui/core';
2
- import { AsyncScreen } from '../../../Screen/async-screen.js';
3
- import type { FullScreenChrome, ListFilterBadge } from '../../../Screen/full-screen.js';
4
- import type { ScreenContext } from '../../../Screen/screen.js';
5
- import { type TeamWorkloadResult } from '../Data/workload.js';
6
- export declare class TeamWorkScreen extends AsyncScreen<TeamWorkloadResult> {
7
- readonly frameId = "team-work";
8
- static readonly route: {
9
- id: string;
10
- path: string;
11
- tab: {
12
- id: string;
13
- label: string;
14
- scope: string;
15
- weight: number;
16
- };
17
- fallback: {
18
- routeId: string;
19
- };
20
- };
21
- readonly id: string;
22
- searchQuery: string;
23
- private readonly search;
24
- /** No ticket rows here, so only a refusal lands: nothing was found, and the
25
- * counts say so instead of standing over the previous search. */
26
- showRows(): void;
27
- reloadSearch(context: ScreenContext): Promise<boolean>;
28
- reload(context: ScreenContext): void;
29
- protected load(context: ScreenContext): Promise<TeamWorkloadResult>;
30
- protected renderLoading(): string[];
31
- protected renderReady(result: TeamWorkloadResult): VNode;
32
- protected chrome(context: ScreenContext): FullScreenChrome;
33
- protected badges(): readonly ListFilterBadge[];
34
- protected notice(): string | undefined;
35
- handleInput(input: string, context: ScreenContext): boolean;
36
- leave(): void;
37
- reset(): void;
38
- protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
39
- }
@@ -1,112 +0,0 @@
1
- import { actionItem } from '../../../Component/footer-actions/index.js';
2
- import { sectionRowNode, sectionRows, } from '../../../Component/section-list/index.js';
3
- import { workloadSummaryRows } from '../../../Component/workload-summary/index.js';
4
- import { columnNode } from '../../../lib/vnode.js';
5
- import { AsyncScreen } from '../../../Screen/async-screen.js';
6
- import { TicketSearch } from '../../ticket/Screen/ticket-search.js';
7
- import { loadTeamWorkload } from '../Data/workload.js';
8
- export class TeamWorkScreen extends AsyncScreen {
9
- frameId = 'team-work';
10
- static route = {
11
- id: 'team.work',
12
- path: '/teams/:teamId/work',
13
- tab: { id: 'work', label: 'Work', scope: 'team', weight: 5 },
14
- fallback: { routeId: 'teams' },
15
- };
16
- id = TeamWorkScreen.route.id;
17
- searchQuery = '';
18
- search = new TicketSearch(this);
19
- /** No ticket rows here, so only a refusal lands: nothing was found, and the
20
- * counts say so instead of standing over the previous search. */
21
- showRows() {
22
- const current = this.readyValue;
23
- if (!current)
24
- return;
25
- const none = { open: 0, running: 0, waiting: 0 };
26
- this.replaceReady({
27
- ...current,
28
- members: current.members.map((member) => ({ ...member, ...none })),
29
- total: none,
30
- });
31
- }
32
- reloadSearch(context) {
33
- return this.reloadInPlace(context);
34
- }
35
- reload(context) {
36
- this.retry(context);
37
- }
38
- load(context) {
39
- if (!context.services)
40
- throw new Error('Team Work requires services');
41
- const teamId = context.params?.teamId;
42
- if (!teamId)
43
- throw new Error('Team Work requires teamId');
44
- return loadTeamWorkload(context.services.client, teamId, this.searchQuery);
45
- }
46
- renderLoading() {
47
- return ['Loading team work…'];
48
- }
49
- renderReady(result) {
50
- const rows = sectionRows([
51
- {
52
- heading: 'Team',
53
- lines: [
54
- ...(result.team.workspace
55
- ? [`Workspace: ${result.team.workspace}`]
56
- : []),
57
- `Members: ${result.team.memberCount}`,
58
- `Projects: ${result.team.projectCount}`,
59
- ],
60
- },
61
- {
62
- heading: 'Current work',
63
- lines: workloadSummaryRows([
64
- ['Open', result.total.open],
65
- ['Running', result.total.running],
66
- ['Waiting', result.total.waiting],
67
- ['Members', result.team.memberCount],
68
- ]),
69
- },
70
- ]);
71
- return columnNode('team-work', ...rows.map((row) => sectionRowNode('team-work', row)));
72
- }
73
- chrome(context) {
74
- const teamName = this.readyValue?.team.name ??
75
- context.params?.teamName ??
76
- context.params?.teamId ??
77
- 'Team';
78
- return {
79
- title: `${teamName} · work`,
80
- meta: [
81
- `${this.readyValue?.team.projectCount ?? 0} project(s)`,
82
- context.services?.baseUrl ?? '',
83
- this.search.hint(),
84
- ]
85
- .filter(Boolean)
86
- .join(' · '),
87
- };
88
- }
89
- badges() {
90
- return [this.search.badge()];
91
- }
92
- notice() {
93
- return this.search.status || undefined;
94
- }
95
- handleInput(input, context) {
96
- if (super.handleInput(input, context))
97
- return true;
98
- return this.search.handleKey(input, context);
99
- }
100
- leave() {
101
- this.search.close();
102
- super.leave();
103
- }
104
- reset() {
105
- this.searchQuery = '';
106
- this.search.reset();
107
- super.reset();
108
- }
109
- actions() {
110
- return [actionItem('team-work-tab', 'Tab', 'tabs')];
111
- }
112
- }
@@ -1,110 +0,0 @@
1
- import type { VNode } from '@opentui/core';
2
- import { type SectionRow } from '../../../Component/section-list/index.js';
3
- import { AsyncScreen } from '../../../Screen/async-screen.js';
4
- import { EmptyOverviewScreen } from '../../../Screen/empty-overview.js';
5
- import type { FullScreenChrome } from '../../../Screen/full-screen.js';
6
- import type { ScreenContext } from '../../../Screen/screen.js';
7
- import { type GroupStatisticsResult } from '../../../Statistics/client.js';
8
- import { StatisticsScreen } from '../../../Statistics/screen.js';
9
- import { type TeamListResult, type TeamListRow } from '../Data/teams.js';
10
- /**
11
- * The Teams list — a ROOT tab, which is what makes it reachable.
12
- *
13
- * Root rather than project level, by the argument BB-232 used for Conductors: a
14
- * team cuts ACROSS customer projects (it is the level that does, per BB-321), so
15
- * "which crews are there" must be answerable without first choosing a project.
16
- *
17
- * `weight: 40` puts it last, after Conductors, preserving the root navigation
18
- * order while leaving intermediate weights available for addon screens.
19
- */
20
- export declare class TeamsScreen extends AsyncScreen<TeamListResult> {
21
- readonly frameId = "teams";
22
- reload(context: ScreenContext): void;
23
- static readonly route: {
24
- id: string;
25
- path: string;
26
- tab: {
27
- id: string;
28
- label: string;
29
- scope: string;
30
- weight: number;
31
- };
32
- };
33
- readonly id: string;
34
- private readonly cursor;
35
- get selectedIndex(): number;
36
- set selectedIndex(value: number);
37
- saveState(): {
38
- selectedIndex: number;
39
- };
40
- restoreState(token: unknown): void;
41
- get rows(): readonly TeamListRow[];
42
- protected load(context: ScreenContext): Promise<TeamListResult>;
43
- protected renderLoading(): string[];
44
- protected renderReady(result: TeamListResult): VNode;
45
- protected chrome(context: ScreenContext): FullScreenChrome;
46
- protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
47
- activate(index: number, context: ScreenContext): boolean;
48
- select(index: number, context: ScreenContext): boolean;
49
- handleInput(input: string, context: ScreenContext): boolean;
50
- reset(): void;
51
- }
52
- /**
53
- * ONE team's report: the crew's identity plus its configured figures,
54
- * discovered and read for the team's own uuid (BB-456 spec D5).
55
- *
56
- * `fallback` points at the list, so Escape from a deep link lands somewhere real
57
- * rather than on the default route — the rule `UserOverviewScreen` follows.
58
- */
59
- export declare class TeamOverviewScreen extends EmptyOverviewScreen {
60
- readonly frameId = "team-overview";
61
- /**
62
- * BB-391 AC4 (second round) — the team level's landing tab.
63
- *
64
- * The earlier round declared no `tab` here and argued a team owns no LEVEL
65
- * because "there is nothing under it to tab between". The operator's ruling is
66
- * the opposite: the users level is under it, so the crew has a bar of its own
67
- * (Overview · Users) and this screen is its first entry.
68
- */
69
- static readonly route: {
70
- id: string;
71
- path: string;
72
- tab: {
73
- id: string;
74
- label: string;
75
- scope: string;
76
- weight: number;
77
- };
78
- fallback: {
79
- routeId: string;
80
- };
81
- };
82
- readonly id: string;
83
- protected chrome(context: ScreenContext): FullScreenChrome;
84
- protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
85
- }
86
- export declare class TeamStatsScreen extends StatisticsScreen<GroupStatisticsResult> {
87
- readonly frameId = "team-stats";
88
- static readonly route: {
89
- id: string;
90
- path: string;
91
- tab: {
92
- id: string;
93
- label: string;
94
- scope: string;
95
- weight: number;
96
- };
97
- fallback: {
98
- routeId: string;
99
- preserveParams: true;
100
- };
101
- };
102
- readonly id: string;
103
- reload(context: ScreenContext): void;
104
- protected load(context: ScreenContext): Promise<GroupStatisticsResult>;
105
- protected renderLoading(): string[];
106
- protected readyRows(statistics: GroupStatisticsResult): SectionRow[];
107
- protected statistics(value: GroupStatisticsResult): GroupStatisticsResult;
108
- protected chrome(context: ScreenContext): FullScreenChrome;
109
- protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
110
- }