@bakers-build/addon-bakers-ui 0.11.1-next.1 → 0.11.1-next.3
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/dist/src/Entity/conductor/Screen/conductor-runs.d.ts +0 -1
- package/dist/src/Entity/conductor/Screen/conductor-runs.js +0 -7
- package/dist/src/Entity/run/Screen/runs.d.ts +0 -1
- package/dist/src/Entity/run/Screen/runs.js +0 -7
- package/dist/src/Entity/ticket/Screen/conductor-tickets.d.ts +0 -1
- package/dist/src/Entity/ticket/Screen/conductor-tickets.js +0 -7
- package/dist/src/Entity/ticket/Screen/my-work.d.ts +8 -0
- package/dist/src/Entity/ticket/Screen/my-work.js +24 -0
- package/dist/src/Entity/ticket/Screen/ticket-filter-bar.d.ts +5 -0
- package/dist/src/Entity/ticket/Screen/ticket-filter-bar.js +2 -0
- package/dist/src/Entity/ticket/Screen/tickets.d.ts +0 -1
- package/dist/src/Entity/ticket/Screen/tickets.js +0 -7
- package/dist/src/Entity/user/Screen/users.d.ts +1 -0
- package/dist/src/Entity/user/Screen/users.js +7 -0
- package/dist/src/Screen/list-screen.d.ts +3 -0
- package/dist/src/Screen/list-screen.js +9 -0
- package/package.json +4 -4
|
@@ -71,7 +71,6 @@ export declare class ConductorRunsScreen extends ListScreen<RunRow, number> {
|
|
|
71
71
|
protected chrome(context: ScreenContext): FullScreenChrome;
|
|
72
72
|
protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
|
|
73
73
|
activate(index: number, context: ScreenContext): boolean;
|
|
74
|
-
select(index: number, context: ScreenContext): boolean;
|
|
75
74
|
handleInput(input: string, context: ScreenContext): boolean;
|
|
76
75
|
/**
|
|
77
76
|
* The header title needs the shared conductor label. Loaded once here (the
|
|
@@ -73,13 +73,6 @@ export class ConductorRunsScreen extends ListScreen {
|
|
|
73
73
|
context.navigate('ticket.runs', { ticketId });
|
|
74
74
|
return true;
|
|
75
75
|
}
|
|
76
|
-
select(index, context) {
|
|
77
|
-
if (index < 0 || index >= this.rows.length)
|
|
78
|
-
return false;
|
|
79
|
-
this.selectedIndex = index;
|
|
80
|
-
context.requestDraw();
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
76
|
handleInput(input, context) {
|
|
84
77
|
if (super.handleInput(input, context))
|
|
85
78
|
return true;
|
|
@@ -79,7 +79,6 @@ export declare class RunsScreen extends ListScreen<RunRow, number> {
|
|
|
79
79
|
protected chrome(context: ScreenContext): FullScreenChrome;
|
|
80
80
|
protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
|
|
81
81
|
activate(index: number, context: ScreenContext): boolean;
|
|
82
|
-
select(index: number, context: ScreenContext): boolean;
|
|
83
82
|
handleInput(input: string, context: ScreenContext): boolean;
|
|
84
83
|
reset(): void;
|
|
85
84
|
}
|
|
@@ -101,13 +101,6 @@ export class RunsScreen extends ListScreen {
|
|
|
101
101
|
context.navigate('ticket.runs', { ticketId: id });
|
|
102
102
|
return true;
|
|
103
103
|
}
|
|
104
|
-
select(index, context) {
|
|
105
|
-
if (index < 0 || index >= this.rows.length)
|
|
106
|
-
return false;
|
|
107
|
-
this.selectedIndex = index;
|
|
108
|
-
context.requestDraw();
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
104
|
handleInput(input, context) {
|
|
112
105
|
if (super.handleInput(input, context))
|
|
113
106
|
return true;
|
|
@@ -80,7 +80,6 @@ export declare class ConductorTicketsScreen extends ListScreen<TicketRow, void>
|
|
|
80
80
|
protected notice(): string | undefined;
|
|
81
81
|
protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
|
|
82
82
|
activate(index: number, context: ScreenContext): boolean;
|
|
83
|
-
select(index: number, context: ScreenContext): boolean;
|
|
84
83
|
handleInput(input: string, context: ScreenContext): boolean;
|
|
85
84
|
private headerDetail;
|
|
86
85
|
protected didLoad(_data: Page<TicketRow>, context: ScreenContext): void;
|
|
@@ -82,13 +82,6 @@ export class ConductorTicketsScreen extends ListScreen {
|
|
|
82
82
|
context.navigate('ticket.detail', { ticketId: id });
|
|
83
83
|
return true;
|
|
84
84
|
}
|
|
85
|
-
select(index, context) {
|
|
86
|
-
if (index < 0 || index >= this.rows.length)
|
|
87
|
-
return false;
|
|
88
|
-
this.selectedIndex = index;
|
|
89
|
-
context.requestDraw();
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
85
|
handleInput(input, context) {
|
|
93
86
|
if (super.handleInput(input, context))
|
|
94
87
|
return true;
|
|
@@ -45,6 +45,7 @@ export declare class MyWorkScreen extends AsyncScreen<MyWorkResult> {
|
|
|
45
45
|
protected badges(): readonly ListFilterBadge[];
|
|
46
46
|
protected notice(): string | undefined;
|
|
47
47
|
protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
|
|
48
|
+
select(index: number, context: ScreenContext): boolean;
|
|
48
49
|
activate(index: number, context: ScreenContext): boolean;
|
|
49
50
|
handleInput(input: string, context: ScreenContext): boolean;
|
|
50
51
|
leave(): void;
|
|
@@ -52,10 +53,17 @@ export declare class MyWorkScreen extends AsyncScreen<MyWorkResult> {
|
|
|
52
53
|
get criteria(): TicketCriteria;
|
|
53
54
|
/** Reload through `retry`, mirroring `TicketsScreen.setCriteria`. */
|
|
54
55
|
setCriteria(next: TicketCriteria, context: ScreenContext): void;
|
|
56
|
+
/**
|
|
57
|
+
* The pickers' picks land here through `context.back(result)`, as on
|
|
58
|
+
* `TicketsScreen.receiveResult`. A null pick clears only that criterion.
|
|
59
|
+
*/
|
|
60
|
+
receiveResult(result: unknown, context: ScreenContext): void;
|
|
55
61
|
/** My work has no `mine` shortcut — the assignee is the current user. */
|
|
56
62
|
resolveMine(): undefined;
|
|
57
63
|
/** The bar dispatches `r` only when the host marks itself as My work. */
|
|
58
64
|
navigateToProjectFilter(context: ScreenContext): boolean;
|
|
65
|
+
/** `p` opens My work's own parent picker, not the project list's. */
|
|
66
|
+
navigateToParentFilter(context: ScreenContext): boolean;
|
|
59
67
|
/** Mirror of `TicketsScreen.filterRow` — delegates to the bar. */
|
|
60
68
|
protected filterRow(row: TicketRow): boolean;
|
|
61
69
|
}
|
|
@@ -128,6 +128,13 @@ export class MyWorkScreen extends AsyncScreen {
|
|
|
128
128
|
actionItem('my-work-tab', 'Tab', 'tabs'),
|
|
129
129
|
];
|
|
130
130
|
}
|
|
131
|
+
select(index, context) {
|
|
132
|
+
if (index < 0 || index >= this.rows.length)
|
|
133
|
+
return false;
|
|
134
|
+
this.cursor.index = index;
|
|
135
|
+
context.requestDraw();
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
131
138
|
activate(index, context) {
|
|
132
139
|
const row = this.rows[index];
|
|
133
140
|
if (!row || !context.navigate)
|
|
@@ -174,6 +181,19 @@ export class MyWorkScreen extends AsyncScreen {
|
|
|
174
181
|
this.cursor.reset();
|
|
175
182
|
this.retry(context);
|
|
176
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* The pickers' picks land here through `context.back(result)`, as on
|
|
186
|
+
* `TicketsScreen.receiveResult`. A null pick clears only that criterion.
|
|
187
|
+
*/
|
|
188
|
+
receiveResult(result, context) {
|
|
189
|
+
if (!result || typeof result !== 'object')
|
|
190
|
+
return;
|
|
191
|
+
const returned = result;
|
|
192
|
+
if (returned.type === 'project-filter-set')
|
|
193
|
+
this.setCriteria({ ...this.criteria, project: returned.project ?? null }, context);
|
|
194
|
+
if (returned.type === 'parent-filter-set')
|
|
195
|
+
this.setCriteria({ ...this.criteria, parent: returned.parent ?? null }, context);
|
|
196
|
+
}
|
|
177
197
|
/** My work has no `mine` shortcut — the assignee is the current user. */
|
|
178
198
|
resolveMine() {
|
|
179
199
|
return undefined;
|
|
@@ -182,6 +202,10 @@ export class MyWorkScreen extends AsyncScreen {
|
|
|
182
202
|
navigateToProjectFilter(context) {
|
|
183
203
|
return context.navigate?.('my.work.project-filter', {}) ?? false;
|
|
184
204
|
}
|
|
205
|
+
/** `p` opens My work's own parent picker, not the project list's. */
|
|
206
|
+
navigateToParentFilter(context) {
|
|
207
|
+
return context.navigate?.('my.work.parent-filter', {}) ?? false;
|
|
208
|
+
}
|
|
185
209
|
/** Mirror of `TicketsScreen.filterRow` — delegates to the bar. */
|
|
186
210
|
filterRow(row) {
|
|
187
211
|
return this.filter.applyTo(row);
|
|
@@ -17,6 +17,11 @@ export interface TicketFilterBarHost {
|
|
|
17
17
|
* does not implement it; MyWorkScreen does — `r` is a My-work-only affordance.
|
|
18
18
|
*/
|
|
19
19
|
navigateToProjectFilter?(context: ScreenContext): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Optional: when set, the bar's `p` key calls this instead of opening
|
|
22
|
+
* `project.tickets.parent-filter`. MyWorkScreen opens its own parent picker.
|
|
23
|
+
*/
|
|
24
|
+
navigateToParentFilter?(context: ScreenContext): boolean;
|
|
20
25
|
}
|
|
21
26
|
export declare class TicketFilterBar {
|
|
22
27
|
private readonly host;
|
|
@@ -95,6 +95,8 @@ export class TicketFilterBar {
|
|
|
95
95
|
return true;
|
|
96
96
|
}
|
|
97
97
|
if (!this.disable.has('parent') && input === 'p') {
|
|
98
|
+
if (this.host.navigateToParentFilter)
|
|
99
|
+
return this.host.navigateToParentFilter(context);
|
|
98
100
|
context.navigate?.('project.tickets.parent-filter', context.params ?? {});
|
|
99
101
|
return true;
|
|
100
102
|
}
|
|
@@ -211,7 +211,6 @@ export declare class TicketsScreen extends ListScreen<TicketRow, void> {
|
|
|
211
211
|
protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
|
|
212
212
|
protected notice(): string | undefined;
|
|
213
213
|
activate(index: number, context: ScreenContext): boolean;
|
|
214
|
-
select(index: number, context: ScreenContext): boolean;
|
|
215
214
|
handleInput(input: string, context: ScreenContext): boolean;
|
|
216
215
|
reset(): void;
|
|
217
216
|
}
|
|
@@ -423,13 +423,6 @@ export class TicketsScreen extends ListScreen {
|
|
|
423
423
|
context.navigate('ticket.detail', { ticketId: row.id });
|
|
424
424
|
return true;
|
|
425
425
|
}
|
|
426
|
-
select(index, context) {
|
|
427
|
-
if (index < 0 || index >= this.rows.length)
|
|
428
|
-
return false;
|
|
429
|
-
this.selectedIndex = index;
|
|
430
|
-
context.requestDraw();
|
|
431
|
-
return true;
|
|
432
|
-
}
|
|
433
426
|
handleInput(input, context) {
|
|
434
427
|
if (super.handleInput(input, context))
|
|
435
428
|
return true;
|
|
@@ -35,6 +35,7 @@ export declare class UsersScreen extends AsyncScreen<{
|
|
|
35
35
|
}): import("@opentui/core").VNode<any, import("@opentui/core").VChild[]>;
|
|
36
36
|
protected chrome(): FullScreenChrome;
|
|
37
37
|
protected actions(): import("../../../Component/footer-actions/index.js").ActionItem[];
|
|
38
|
+
select(index: number, context: ScreenContext): boolean;
|
|
38
39
|
activate(index: number, context: ScreenContext): boolean;
|
|
39
40
|
handleInput(input: string, context: ScreenContext): boolean;
|
|
40
41
|
}
|
|
@@ -80,6 +80,13 @@ export class UsersScreen extends AsyncScreen {
|
|
|
80
80
|
actionItem('workspace-members-tab', 'Tab', 'tabs'),
|
|
81
81
|
];
|
|
82
82
|
}
|
|
83
|
+
select(index, context) {
|
|
84
|
+
if (index < 0 || index >= this.rows.length)
|
|
85
|
+
return false;
|
|
86
|
+
this.cursor.index = index;
|
|
87
|
+
context.requestDraw();
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
83
90
|
activate(index, context) {
|
|
84
91
|
const row = this.rows[index];
|
|
85
92
|
const workspaceId = context.services?.workspaceId;
|
|
@@ -103,6 +103,9 @@ export declare abstract class ListScreen<Row extends {
|
|
|
103
103
|
* chain continues.
|
|
104
104
|
*/
|
|
105
105
|
protected handleCursorInput(input: string, context: ScreenContext): boolean;
|
|
106
|
+
/** A click on a row that is not selected (`Kernel/regions.ts`); a click on
|
|
107
|
+
* the selected row goes to the subclass's `activate()`. */
|
|
108
|
+
select(index: number, context: ScreenContext): boolean;
|
|
106
109
|
/**
|
|
107
110
|
* Show `rows` in place of the loaded page until the next read answers — the
|
|
108
111
|
* optimistic narrowing of a search. It keeps the LOADED page number so a
|
|
@@ -116,6 +116,15 @@ export class ListScreen extends AsyncScreen {
|
|
|
116
116
|
context.requestDraw();
|
|
117
117
|
return true;
|
|
118
118
|
}
|
|
119
|
+
/** A click on a row that is not selected (`Kernel/regions.ts`); a click on
|
|
120
|
+
* the selected row goes to the subclass's `activate()`. */
|
|
121
|
+
select(index, context) {
|
|
122
|
+
if (index < 0 || index >= this.rows.length)
|
|
123
|
+
return false;
|
|
124
|
+
this.selectedIndex = index;
|
|
125
|
+
context.requestDraw();
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
119
128
|
/**
|
|
120
129
|
* Show `rows` in place of the loaded page until the next read answers — the
|
|
121
130
|
* optimistic narrowing of a search. It keeps the LOADED page number so a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-bakers-ui",
|
|
3
|
-
"version": "0.11.1-next.
|
|
3
|
+
"version": "0.11.1-next.3",
|
|
4
4
|
"description": "bakers.build TUI: interactive terminal UI (dashboard, projects, tickets) as a dropsh `tui` renderer plugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"zustand": "^5.0.15"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@bakers-build/core": "^0.11.1-next.
|
|
36
|
-
"@bakers-build/message": "^0.11.1-next.
|
|
35
|
+
"@bakers-build/core": "^0.11.1-next.3",
|
|
36
|
+
"@bakers-build/message": "^0.11.1-next.3"
|
|
37
37
|
},
|
|
38
38
|
"bakersBuild": {
|
|
39
|
-
"commit": "
|
|
39
|
+
"commit": "0bd662a88dd41e11e79a7912bf83dc0ee48a733d",
|
|
40
40
|
"channel": "next"
|
|
41
41
|
}
|
|
42
42
|
}
|