@bakers-build/addon-bakers-ui 0.2.1-next.211 → 0.3.1-next.308
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/Data/conductors.d.ts +9 -7
- package/dist/src/Entity/conductor/Data/conductors.js +33 -12
- package/dist/src/Entity/project/Data/projects.d.ts +8 -7
- package/dist/src/Entity/project/Data/projects.js +39 -52
- package/dist/src/Entity/project/Screen/projects-screen.d.ts +2 -2
- package/dist/src/Entity/project/Screen/projects-screen.js +2 -2
- package/dist/src/Statistics/client.d.ts +9 -1
- package/dist/src/Statistics/client.js +26 -3
- package/dist/src/Statistics/figures.js +2 -2
- package/dist/src/Statistics/screen.d.ts +1 -6
- package/dist/src/Statistics/screen.js +8 -10
- package/dist/src/types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -442,16 +442,18 @@ export declare const fetchConductorLastSeen: (client: DropshClient, id: string)
|
|
|
442
442
|
*/
|
|
443
443
|
export declare const countConductors: (client: DropshClient, query: ConductorQuery) => Promise<number | null>;
|
|
444
444
|
/**
|
|
445
|
-
* Project uuid → name, for the Conductors screen's project column
|
|
445
|
+
* Project uuid → name, for the Conductors screen's project column and the
|
|
446
|
+
* Projects tab (`loadProjectRows`).
|
|
446
447
|
*
|
|
447
|
-
* A conductor references its project by uuid; the
|
|
448
|
-
*
|
|
449
|
-
* `
|
|
450
|
-
*
|
|
451
|
-
*
|
|
448
|
+
* A conductor references its project by uuid; the screens show the name.
|
|
449
|
+
*
|
|
450
|
+
* Without `ids` this is one `bb_project` read, so only the first page of
|
|
451
|
+
* visible projects is named. With `ids` only those projects are read, in
|
|
452
|
+
* chunks below the server's page cap, so every referenced project is named
|
|
453
|
+
* however many projects the user can see.
|
|
452
454
|
*
|
|
453
455
|
* A failed read yields an empty map: an unnamed project renders blank, which is
|
|
454
456
|
* better than a screen that refuses to list conductors because their projects
|
|
455
457
|
* could not be resolved.
|
|
456
458
|
*/
|
|
457
|
-
export declare const listProjectNames: (client: DropshClient) => Promise<Map<string, string>>;
|
|
459
|
+
export declare const listProjectNames: (client: DropshClient, ids?: string[]) => Promise<Map<string, string>>;
|
|
@@ -503,22 +503,43 @@ export const countConductors = async (client, query) => {
|
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
/**
|
|
506
|
-
* Project uuid → name, for the Conductors screen's project column
|
|
506
|
+
* Project uuid → name, for the Conductors screen's project column and the
|
|
507
|
+
* Projects tab (`loadProjectRows`).
|
|
507
508
|
*
|
|
508
|
-
* A conductor references its project by uuid; the
|
|
509
|
-
*
|
|
510
|
-
* `
|
|
511
|
-
*
|
|
512
|
-
*
|
|
509
|
+
* A conductor references its project by uuid; the screens show the name.
|
|
510
|
+
*
|
|
511
|
+
* Without `ids` this is one `bb_project` read, so only the first page of
|
|
512
|
+
* visible projects is named. With `ids` only those projects are read, in
|
|
513
|
+
* chunks below the server's page cap, so every referenced project is named
|
|
514
|
+
* however many projects the user can see.
|
|
513
515
|
*
|
|
514
516
|
* A failed read yields an empty map: an unnamed project renders blank, which is
|
|
515
517
|
* better than a screen that refuses to list conductors because their projects
|
|
516
518
|
* could not be resolved.
|
|
517
519
|
*/
|
|
518
|
-
export const listProjectNames = async (client) => {
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
export const listProjectNames = async (client, ids) => {
|
|
521
|
+
const nameOf = (r) => str(r.attr('name')) ?? str(r.attr('label')) ?? '';
|
|
522
|
+
if (!ids) {
|
|
523
|
+
const outcome = await listOutcome(client, 'bb_project', (r) => ({
|
|
524
|
+
id: r.id,
|
|
525
|
+
name: nameOf(r),
|
|
526
|
+
}));
|
|
527
|
+
return new Map(outcome.rows.map((p) => [p.id, p.name]));
|
|
528
|
+
}
|
|
529
|
+
const names = new Map();
|
|
530
|
+
try {
|
|
531
|
+
for (let i = 0; i < ids.length; i += LIST_PAGE_SIZE) {
|
|
532
|
+
const chunk = ids.slice(i, i + LIST_PAGE_SIZE);
|
|
533
|
+
const rows = await client
|
|
534
|
+
.collection('bb_project')
|
|
535
|
+
.whereIn('id', chunk)
|
|
536
|
+
.list();
|
|
537
|
+
for (const r of rows)
|
|
538
|
+
names.set(r.id, nameOf(r));
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
catch {
|
|
542
|
+
return new Map();
|
|
543
|
+
}
|
|
544
|
+
return names;
|
|
524
545
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DropshClient } from '../../../types.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { ConductorStatus } from '../../conductor/Data/liveness.js';
|
|
3
3
|
/** A derived project row: one distinct project + its liveliest conductor. */
|
|
4
4
|
export interface ProjectRow {
|
|
5
5
|
project: string;
|
|
@@ -131,12 +131,13 @@ export declare const PROJECT_TABLE: {
|
|
|
131
131
|
}];
|
|
132
132
|
};
|
|
133
133
|
/**
|
|
134
|
-
* Resolve the projects screen's rows straight from the control plane:
|
|
135
|
-
* `bb_conductor`
|
|
136
|
-
* the current user's conductors — no
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
134
|
+
* Resolve the projects screen's rows straight from the control plane: page the
|
|
135
|
+
* `bb_conductor` collection through the Conductors screen's own read (read is
|
|
136
|
+
* owner-gated, so this is already scoped to the current user's conductors — no
|
|
137
|
+
* local registry needed), name each conductor's project through
|
|
138
|
+
* `listProjectNames`, group by project name, and report each project's
|
|
139
|
+
* liveliest conductor (online > stale > offline). Everything is a Drupal entity
|
|
140
|
+
* read through `services.client` (AC-5); the screen itself stays a screen/route.
|
|
140
141
|
*/
|
|
141
142
|
export declare function loadProjectRows({ client, nowSeconds, }: {
|
|
142
143
|
client: DropshClient;
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import { DrupalJsonApiParams } from 'drupal-jsonapi-params';
|
|
2
1
|
import { humanizeAge } from '../../../lib/format.js';
|
|
3
|
-
import {
|
|
4
|
-
/** JSON:API timestamps arrive as ISO-8601 strings; liveness works in seconds. */
|
|
5
|
-
function toEpochSeconds(value) {
|
|
6
|
-
if (value == null)
|
|
7
|
-
return null;
|
|
8
|
-
if (typeof value === 'number')
|
|
9
|
-
return value;
|
|
10
|
-
if (typeof value !== 'string')
|
|
11
|
-
return null;
|
|
12
|
-
const ms = Date.parse(value);
|
|
13
|
-
return Number.isNaN(ms) ? null : Math.floor(ms / 1000);
|
|
14
|
-
}
|
|
15
|
-
/** Id of a single-valued relationship linkage (`data` object), or null. */
|
|
16
|
-
function singleRelId(rel) {
|
|
17
|
-
const data = rel?.data;
|
|
18
|
-
if (!data || Array.isArray(data))
|
|
19
|
-
return null;
|
|
20
|
-
return data.id ?? null;
|
|
21
|
-
}
|
|
2
|
+
import { listConductorRowPage, listProjectNames, } from '../../conductor/Data/conductors.js';
|
|
22
3
|
// Most-alive-first ranking so a project with several conductors reports its
|
|
23
4
|
// liveliest one, not whichever the collection happened to return first.
|
|
24
5
|
const STATUS_RANK = {
|
|
@@ -142,53 +123,59 @@ export const PROJECT_TABLE = {
|
|
|
142
123
|
],
|
|
143
124
|
};
|
|
144
125
|
/**
|
|
145
|
-
* Resolve the projects screen's rows straight from the control plane:
|
|
146
|
-
* `bb_conductor`
|
|
147
|
-
* the current user's conductors — no
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
126
|
+
* Resolve the projects screen's rows straight from the control plane: page the
|
|
127
|
+
* `bb_conductor` collection through the Conductors screen's own read (read is
|
|
128
|
+
* owner-gated, so this is already scoped to the current user's conductors — no
|
|
129
|
+
* local registry needed), name each conductor's project through
|
|
130
|
+
* `listProjectNames`, group by project name, and report each project's
|
|
131
|
+
* liveliest conductor (online > stale > offline). Everything is a Drupal entity
|
|
132
|
+
* read through `services.client` (AC-5); the screen itself stays a screen/route.
|
|
151
133
|
*/
|
|
152
134
|
export async function loadProjectRows({ client, nowSeconds, }) {
|
|
153
|
-
const
|
|
154
|
-
|
|
135
|
+
const now = nowSeconds();
|
|
136
|
+
// Only liveness is read off these rows; locality and host identity are the
|
|
137
|
+
// Conductors screen's concern, so they are given values that claim neither.
|
|
138
|
+
const ctx = {
|
|
139
|
+
now,
|
|
140
|
+
exists: () => false,
|
|
141
|
+
thisHostKey: '',
|
|
142
|
+
};
|
|
143
|
+
// Every page, or no list: a failed page never yields a truncated one.
|
|
144
|
+
const conductors = [];
|
|
155
145
|
try {
|
|
156
|
-
|
|
146
|
+
for (let page = 0;; page++) {
|
|
147
|
+
const result = await listConductorRowPage(client, ctx, {}, page);
|
|
148
|
+
conductors.push(...result.rows);
|
|
149
|
+
if (!result.hasNext)
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
157
152
|
}
|
|
158
153
|
catch {
|
|
159
154
|
return [];
|
|
160
155
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if (inc.id && typeof inc.attributes?.name === 'string') {
|
|
165
|
-
projectNameById.set(inc.id, inc.attributes.name);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
const now = nowSeconds();
|
|
156
|
+
const projectNameById = await listProjectNames(client, [
|
|
157
|
+
...new Set(conductors.flatMap((c) => (c.projectId ? [c.projectId] : []))),
|
|
158
|
+
]);
|
|
169
159
|
const best = new Map();
|
|
170
|
-
for (const c of
|
|
171
|
-
const
|
|
172
|
-
const projectId = singleRelId(c.relationships?.project_id);
|
|
173
|
-
const project = projectId ? projectNameById.get(projectId) : undefined;
|
|
160
|
+
for (const c of conductors) {
|
|
161
|
+
const project = c.projectId ? projectNameById.get(c.projectId) : undefined;
|
|
174
162
|
// A conductor whose project cannot be resolved is not a project row.
|
|
175
|
-
if (!project)
|
|
163
|
+
if (!c.projectId || !project)
|
|
176
164
|
continue;
|
|
177
|
-
const lastSeen = toEpochSeconds(a.last_seen ?? null);
|
|
178
|
-
const derivedStatus = deriveConductorStatus({
|
|
179
|
-
present: true,
|
|
180
|
-
status: typeof a.status === 'string' ? a.status : null,
|
|
181
|
-
lastSeen,
|
|
182
|
-
leaseExpiresAt: toEpochSeconds(a.lease_expires_at ?? null),
|
|
183
|
-
}, now);
|
|
184
165
|
const prev = best.get(project);
|
|
185
|
-
if (!prev ||
|
|
186
|
-
|
|
166
|
+
if (!prev ||
|
|
167
|
+
STATUS_RANK[c.derivedStatus] < STATUS_RANK[prev.derivedStatus]) {
|
|
168
|
+
best.set(project, {
|
|
169
|
+
id: c.projectId,
|
|
170
|
+
derivedStatus: c.derivedStatus,
|
|
171
|
+
// ConductorRow spells "never reported" as 0.
|
|
172
|
+
lastSeen: c.lastSeen || null,
|
|
173
|
+
});
|
|
187
174
|
}
|
|
188
175
|
}
|
|
189
176
|
return [...best.entries()].map(([project, b]) => ({
|
|
190
177
|
project,
|
|
191
|
-
id:
|
|
178
|
+
id: b.id,
|
|
192
179
|
projectName: project,
|
|
193
180
|
projectSlug: project,
|
|
194
181
|
derivedStatus: b.derivedStatus,
|
|
@@ -9,8 +9,8 @@ import { type ProjectRow } from '../Data/projects.js';
|
|
|
9
9
|
*
|
|
10
10
|
* MOUNTED WHOLE, so the bound on its nodes is the data's own length against
|
|
11
11
|
* `@opentui/core@0.5.1`'s ceiling of 16 382 renderables. A project row is one
|
|
12
|
-
* box of 3 cells, and the rows are the user's own projects read from
|
|
13
|
-
*
|
|
12
|
+
* box of 3 cells, and the rows are the user's own projects read from the
|
|
13
|
+
* `bb_conductor` collection page by page, grouped by project — three orders of
|
|
14
14
|
* magnitude of headroom on any control plane a person works with. This screen
|
|
15
15
|
* therefore windows nothing of its own, deliberately rather than by omission.
|
|
16
16
|
*/
|
|
@@ -10,8 +10,8 @@ import { ProjectOverviewScreen } from './project-overview.js';
|
|
|
10
10
|
*
|
|
11
11
|
* MOUNTED WHOLE, so the bound on its nodes is the data's own length against
|
|
12
12
|
* `@opentui/core@0.5.1`'s ceiling of 16 382 renderables. A project row is one
|
|
13
|
-
* box of 3 cells, and the rows are the user's own projects read from
|
|
14
|
-
*
|
|
13
|
+
* box of 3 cells, and the rows are the user's own projects read from the
|
|
14
|
+
* `bb_conductor` collection page by page, grouped by project — three orders of
|
|
15
15
|
* magnitude of headroom on any control plane a person works with. This screen
|
|
16
16
|
* therefore windows nothing of its own, deliberately rather than by omission.
|
|
17
17
|
*/
|
|
@@ -23,13 +23,20 @@ export interface StatisticFilter {
|
|
|
23
23
|
value: string;
|
|
24
24
|
options: StatisticFilterOption[];
|
|
25
25
|
}
|
|
26
|
+
declare const GROUPINGS: readonly ["day", "week", "month", "quarter"];
|
|
27
|
+
declare const WIDGETS: readonly ["matrix", "line", "grouped_horizontal_bars", "bars", "tiles", "flow", "table"];
|
|
26
28
|
export interface StatisticFigure {
|
|
27
29
|
id: string;
|
|
28
30
|
label: string;
|
|
29
31
|
description: string;
|
|
30
|
-
|
|
32
|
+
/** `tiles`, `flow`, `table` and `bars` render through the bars fallback. */
|
|
33
|
+
widget: (typeof WIDGETS)[number];
|
|
31
34
|
generated: string;
|
|
32
35
|
filters: Record<string, StatisticFilter>;
|
|
36
|
+
/** Bucket size of the selected period; absent on `windows` figures. */
|
|
37
|
+
period?: {
|
|
38
|
+
grouping: (typeof GROUPINGS)[number];
|
|
39
|
+
};
|
|
33
40
|
categories: StatisticCategory[];
|
|
34
41
|
measurements: StatisticMeasurement[];
|
|
35
42
|
empty: {
|
|
@@ -63,3 +70,4 @@ export declare function errorResultOf(caught: unknown): {
|
|
|
63
70
|
message: string;
|
|
64
71
|
};
|
|
65
72
|
export declare function loadGroupStatistics(client: DropshClient, contexts: StatisticsContexts, filters?: StatisticsFilters): Promise<GroupStatisticsResult>;
|
|
73
|
+
export {};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { DrupalJsonApiParams } from 'drupal-jsonapi-params';
|
|
2
|
+
const GROUPINGS = ['day', 'week', 'month', 'quarter'];
|
|
3
|
+
const WIDGETS = [
|
|
4
|
+
'matrix',
|
|
5
|
+
'line',
|
|
6
|
+
'grouped_horizontal_bars',
|
|
7
|
+
'bars',
|
|
8
|
+
'tiles',
|
|
9
|
+
'flow',
|
|
10
|
+
'table',
|
|
11
|
+
];
|
|
2
12
|
function statusOf(caught) {
|
|
3
13
|
if (typeof caught !== 'object' || caught === null)
|
|
4
14
|
return undefined;
|
|
@@ -113,7 +123,7 @@ function figureOf(value) {
|
|
|
113
123
|
typeof row.id !== 'string' ||
|
|
114
124
|
typeof row.label !== 'string' ||
|
|
115
125
|
typeof row.description !== 'string' ||
|
|
116
|
-
!
|
|
126
|
+
!WIDGETS.includes(String(row.widget)) ||
|
|
117
127
|
typeof row.generated !== 'string' ||
|
|
118
128
|
!Array.isArray(row.categories) ||
|
|
119
129
|
!Array.isArray(row.measurements) ||
|
|
@@ -129,8 +139,14 @@ function figureOf(value) {
|
|
|
129
139
|
const measurements = row.measurements.map(measurementOf);
|
|
130
140
|
if (categories.includes(undefined) || measurements.includes(undefined))
|
|
131
141
|
return undefined;
|
|
142
|
+
const grouping = recordOf(row.period)?.grouping;
|
|
143
|
+
const period = GROUPINGS.find((item) => item === grouping);
|
|
132
144
|
const parsedFilters = {};
|
|
133
145
|
for (const [key, item] of Object.entries(filters)) {
|
|
146
|
+
// An entity filter (project, team, person) picks UUIDs in the web UI; the
|
|
147
|
+
// cockpit offers no picker for it, so it is left out, not refused.
|
|
148
|
+
if (recordOf(item)?.type === 'entities')
|
|
149
|
+
continue;
|
|
134
150
|
const parsed = filterOf(item);
|
|
135
151
|
if (!parsed)
|
|
136
152
|
return undefined;
|
|
@@ -143,6 +159,7 @@ function figureOf(value) {
|
|
|
143
159
|
widget: row.widget,
|
|
144
160
|
generated: row.generated,
|
|
145
161
|
filters: parsedFilters,
|
|
162
|
+
...(period ? { period: { grouping: period } } : {}),
|
|
146
163
|
categories: categories,
|
|
147
164
|
measurements: measurements,
|
|
148
165
|
empty: {
|
|
@@ -163,7 +180,10 @@ function groupOf(value) {
|
|
|
163
180
|
typeof row.label !== 'string' ||
|
|
164
181
|
!Array.isArray(row.figures))
|
|
165
182
|
return undefined;
|
|
166
|
-
|
|
183
|
+
// A figure whose widget the CLI cannot draw is skipped, not malformed.
|
|
184
|
+
const figures = row.figures
|
|
185
|
+
.filter((figure) => WIDGETS.includes(String(recordOf(figure)?.widget)))
|
|
186
|
+
.map(figureOf);
|
|
167
187
|
if (figures.includes(undefined))
|
|
168
188
|
return undefined;
|
|
169
189
|
return {
|
|
@@ -193,5 +213,8 @@ export async function loadGroupStatistics(client, contexts, filters = {}) {
|
|
|
193
213
|
const groups = source.map(groupOf);
|
|
194
214
|
if (groups.includes(undefined))
|
|
195
215
|
return { kind: 'error', message: 'malformed statistics document' };
|
|
196
|
-
return {
|
|
216
|
+
return {
|
|
217
|
+
kind: 'ok',
|
|
218
|
+
groups: groups.filter((group) => group.figures.length > 0),
|
|
219
|
+
};
|
|
197
220
|
}
|
|
@@ -50,11 +50,11 @@ function matrixDisplay(id, figure, width) {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
function partialPeriodUnit(figure) {
|
|
53
|
-
return figure.
|
|
53
|
+
return figure.period?.grouping ?? 'day';
|
|
54
54
|
}
|
|
55
55
|
// Shared above every widget: which trailing period is still filling in (the
|
|
56
56
|
// figure's own categories carry the `partial` flag — see
|
|
57
|
-
// MeasurementEvaluator::
|
|
57
|
+
// MeasurementEvaluator::buckets()) and what the figure means, in the
|
|
58
58
|
// figure's own words. Rendered once here rather than per-widget so every
|
|
59
59
|
// shipped widget (matrix, grouped_horizontal_bars) gets both without having
|
|
60
60
|
// to know about them.
|
|
@@ -20,14 +20,9 @@ export declare abstract class StatisticsScreen<T> extends AsyncScreen<T> {
|
|
|
20
20
|
private activeGroup;
|
|
21
21
|
private shiftActiveGroup;
|
|
22
22
|
protected statisticsFilters(): StatisticsFilters;
|
|
23
|
-
/**
|
|
24
|
-
* Maps a preset's raw period value to the granularity legible label
|
|
25
|
-
* (BB-548 scope change 7): `7`/`30` are daily buckets, `365` is monthly.
|
|
26
|
-
*/
|
|
27
|
-
private static rangeLabel;
|
|
28
23
|
private periodFilter;
|
|
29
24
|
/**
|
|
30
|
-
* One boxed filter chip cycling the
|
|
25
|
+
* One boxed filter chip cycling the period kinds
|
|
31
26
|
* (BB-548 scope change 7, replacing the former two independent
|
|
32
27
|
* period/granularity chips of addendum 4). Rendered via
|
|
33
28
|
* `filterBadgeStrip` inside `renderReady`, below Overview — see the
|
|
@@ -60,13 +60,6 @@ export class StatisticsScreen extends AsyncScreen {
|
|
|
60
60
|
filters.period = this.period;
|
|
61
61
|
return filters;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Maps a preset's raw period value to the granularity legible label
|
|
65
|
-
* (BB-548 scope change 7): `7`/`30` are daily buckets, `365` is monthly.
|
|
66
|
-
*/
|
|
67
|
-
static rangeLabel(value) {
|
|
68
|
-
return value === '365' ? '1y·monthly' : `${value}d·daily`;
|
|
69
|
-
}
|
|
70
63
|
periodFilter() {
|
|
71
64
|
const result = this.readyValue === undefined
|
|
72
65
|
? undefined
|
|
@@ -79,14 +72,19 @@ export class StatisticsScreen extends AsyncScreen {
|
|
|
79
72
|
if (filter)
|
|
80
73
|
return {
|
|
81
74
|
value: filter.value,
|
|
82
|
-
|
|
75
|
+
label: filter.options.find((option) => option.value === filter.value)
|
|
76
|
+
?.label ?? filter.value,
|
|
77
|
+
// Custom needs start and end dates, which this screen cannot supply.
|
|
78
|
+
options: filter.options
|
|
79
|
+
.map((option) => option.value)
|
|
80
|
+
.filter((value) => value !== 'custom'),
|
|
83
81
|
};
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
return undefined;
|
|
87
85
|
}
|
|
88
86
|
/**
|
|
89
|
-
* One boxed filter chip cycling the
|
|
87
|
+
* One boxed filter chip cycling the period kinds
|
|
90
88
|
* (BB-548 scope change 7, replacing the former two independent
|
|
91
89
|
* period/granularity chips of addendum 4). Rendered via
|
|
92
90
|
* `filterBadgeStrip` inside `renderReady`, below Overview — see the
|
|
@@ -99,7 +97,7 @@ export class StatisticsScreen extends AsyncScreen {
|
|
|
99
97
|
return [
|
|
100
98
|
{
|
|
101
99
|
id: 'period',
|
|
102
|
-
label: `t Range(${
|
|
100
|
+
label: `t Range(${period.label})`,
|
|
103
101
|
},
|
|
104
102
|
];
|
|
105
103
|
}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface Resource {
|
|
|
10
10
|
/** A dropsh collection query builder (fluent). */
|
|
11
11
|
export interface Collection {
|
|
12
12
|
where(path: string, op: string, value: unknown): Collection;
|
|
13
|
+
whereIn(path: string, values: unknown[]): Collection;
|
|
13
14
|
sort(field: string, direction: string): Collection;
|
|
14
15
|
page(size: number): Collection;
|
|
15
16
|
first(): Promise<Resource | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-bakers-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1-next.308",
|
|
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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"zustand": "^5.0.15"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@bakers-build/core": "^0.
|
|
33
|
-
"@bakers-build/message": "^0.
|
|
32
|
+
"@bakers-build/core": "^0.3.1-next.308",
|
|
33
|
+
"@bakers-build/message": "^0.3.1-next.308"
|
|
34
34
|
}
|
|
35
35
|
}
|