@bakers-build/addon-bakers-ui 0.11.1-next.1 → 0.11.1-next.2

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.
@@ -52,10 +52,17 @@ export declare class MyWorkScreen extends AsyncScreen<MyWorkResult> {
52
52
  get criteria(): TicketCriteria;
53
53
  /** Reload through `retry`, mirroring `TicketsScreen.setCriteria`. */
54
54
  setCriteria(next: TicketCriteria, context: ScreenContext): void;
55
+ /**
56
+ * The pickers' picks land here through `context.back(result)`, as on
57
+ * `TicketsScreen.receiveResult`. A null pick clears only that criterion.
58
+ */
59
+ receiveResult(result: unknown, context: ScreenContext): void;
55
60
  /** My work has no `mine` shortcut — the assignee is the current user. */
56
61
  resolveMine(): undefined;
57
62
  /** The bar dispatches `r` only when the host marks itself as My work. */
58
63
  navigateToProjectFilter(context: ScreenContext): boolean;
64
+ /** `p` opens My work's own parent picker, not the project list's. */
65
+ navigateToParentFilter(context: ScreenContext): boolean;
59
66
  /** Mirror of `TicketsScreen.filterRow` — delegates to the bar. */
60
67
  protected filterRow(row: TicketRow): boolean;
61
68
  }
@@ -174,6 +174,19 @@ export class MyWorkScreen extends AsyncScreen {
174
174
  this.cursor.reset();
175
175
  this.retry(context);
176
176
  }
177
+ /**
178
+ * The pickers' picks land here through `context.back(result)`, as on
179
+ * `TicketsScreen.receiveResult`. A null pick clears only that criterion.
180
+ */
181
+ receiveResult(result, context) {
182
+ if (!result || typeof result !== 'object')
183
+ return;
184
+ const returned = result;
185
+ if (returned.type === 'project-filter-set')
186
+ this.setCriteria({ ...this.criteria, project: returned.project ?? null }, context);
187
+ if (returned.type === 'parent-filter-set')
188
+ this.setCriteria({ ...this.criteria, parent: returned.parent ?? null }, context);
189
+ }
177
190
  /** My work has no `mine` shortcut — the assignee is the current user. */
178
191
  resolveMine() {
179
192
  return undefined;
@@ -182,6 +195,10 @@ export class MyWorkScreen extends AsyncScreen {
182
195
  navigateToProjectFilter(context) {
183
196
  return context.navigate?.('my.work.project-filter', {}) ?? false;
184
197
  }
198
+ /** `p` opens My work's own parent picker, not the project list's. */
199
+ navigateToParentFilter(context) {
200
+ return context.navigate?.('my.work.parent-filter', {}) ?? false;
201
+ }
185
202
  /** Mirror of `TicketsScreen.filterRow` — delegates to the bar. */
186
203
  filterRow(row) {
187
204
  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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-bakers-ui",
3
- "version": "0.11.1-next.1",
3
+ "version": "0.11.1-next.2",
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.1",
36
- "@bakers-build/message": "^0.11.1-next.1"
35
+ "@bakers-build/core": "^0.11.1-next.2",
36
+ "@bakers-build/message": "^0.11.1-next.2"
37
37
  },
38
38
  "bakersBuild": {
39
- "commit": "a32643ac726f468692c47ff7be1759da3f63fd87",
39
+ "commit": "b904c6ec899a0f00565b01ae808abb2fab8ae95d",
40
40
  "channel": "next"
41
41
  }
42
42
  }