@happyvertical/smrt-reports 0.68.0 → 0.70.0
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/manifest.json +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/dist/smrt-knowledge.okf.md +2 -2
- package/dist/state.js +1 -1
- package/dist/state.js.map +1 -1
- package/dist/svelte/ReportResult.svelte +16 -3
- package/dist/svelte/ReportResult.svelte.d.ts +5 -0
- package/dist/svelte/ReportResult.svelte.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -31,6 +31,11 @@ export interface Props {
|
|
|
31
31
|
result: RuntimeReportResult;
|
|
32
32
|
/** `compact` (default) for a preview card, `full` for a report's page. */
|
|
33
33
|
variant?: 'compact' | 'full';
|
|
34
|
+
/**
|
|
35
|
+
* A narrow column (the assistant's chat): the table only, cells wrap and the
|
|
36
|
+
* table never scrolls sideways. The host picks which columns to pass.
|
|
37
|
+
*/
|
|
38
|
+
fit?: boolean;
|
|
34
39
|
/** The report's spec, so figures know which measures add up. */
|
|
35
40
|
spec?: RuntimeReportSpec;
|
|
36
41
|
/** Chart or table, bindable so the page's actions can follow it. */
|
|
@@ -52,6 +57,7 @@ export interface Props {
|
|
|
52
57
|
let {
|
|
53
58
|
result,
|
|
54
59
|
variant = 'compact',
|
|
60
|
+
fit = false,
|
|
55
61
|
spec,
|
|
56
62
|
view = $bindable('chart'),
|
|
57
63
|
locale = 'en',
|
|
@@ -73,7 +79,7 @@ const xColumn = $derived(
|
|
|
73
79
|
);
|
|
74
80
|
const axis = $derived(valid ? timeAxis(result) : undefined);
|
|
75
81
|
const tableOnly = $derived(valid && result.chart.type === 'table');
|
|
76
|
-
const showTable = $derived(tableOnly || view === 'table');
|
|
82
|
+
const showTable = $derived(tableOnly || fit || view === 'table');
|
|
77
83
|
|
|
78
84
|
/** A time bucket reads by its granularity ("Jan 2025"), never as an ISO instant. */
|
|
79
85
|
function bucketLabel(value: unknown, column: Column | undefined) {
|
|
@@ -148,7 +154,7 @@ const measureOptions = $derived(
|
|
|
148
154
|
);
|
|
149
155
|
</script>
|
|
150
156
|
|
|
151
|
-
<div class="smrt-report-result__root" data-smrt-component="ReportResult" data-variant={variant}>
|
|
157
|
+
<div class="smrt-report-result__root" data-smrt-component="ReportResult" data-variant={variant} data-fit={fit ? '' : undefined}>
|
|
152
158
|
{#if !valid}
|
|
153
159
|
<p role="alert">{t(M['reports.invalid'])}</p>
|
|
154
160
|
{:else if result.rows.length === 0}
|
|
@@ -196,7 +202,7 @@ const measureOptions = $derived(
|
|
|
196
202
|
{/each}
|
|
197
203
|
</dl>
|
|
198
204
|
{/if}
|
|
199
|
-
{:else if !tableOnly}
|
|
205
|
+
{:else if !tableOnly && !fit}
|
|
200
206
|
<div class="smrt-report-result__toggle" data-smrt-part="trigger">
|
|
201
207
|
<Button type="button" variant="ghost" size="sm" aria-pressed={view === 'table'} onclick={() => (view = view === 'table' ? 'chart' : 'table')}>{t(M[view === 'table' ? 'reports.chart' : 'reports.table'])}</Button>
|
|
202
208
|
</div>
|
|
@@ -317,6 +323,13 @@ const measureOptions = $derived(
|
|
|
317
323
|
.smrt-report-result__root[data-variant='compact'] th, .smrt-report-result__root[data-variant='compact'] td {
|
|
318
324
|
padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
|
|
319
325
|
}
|
|
326
|
+
.smrt-report-result__root[data-fit] .smrt-report-result__table {
|
|
327
|
+
overflow-x: visible;
|
|
328
|
+
}
|
|
329
|
+
.smrt-report-result__root[data-fit] :is(th, td) {
|
|
330
|
+
white-space: normal;
|
|
331
|
+
overflow-wrap: anywhere;
|
|
332
|
+
}
|
|
320
333
|
}
|
|
321
334
|
|
|
322
335
|
@layer smrt.theme {
|
|
@@ -4,6 +4,11 @@ export interface Props {
|
|
|
4
4
|
result: RuntimeReportResult;
|
|
5
5
|
/** `compact` (default) for a preview card, `full` for a report's page. */
|
|
6
6
|
variant?: 'compact' | 'full';
|
|
7
|
+
/**
|
|
8
|
+
* A narrow column (the assistant's chat): the table only, cells wrap and the
|
|
9
|
+
* table never scrolls sideways. The host picks which columns to pass.
|
|
10
|
+
*/
|
|
11
|
+
fit?: boolean;
|
|
7
12
|
/** The report's spec, so figures know which measures add up. */
|
|
8
13
|
spec?: RuntimeReportSpec;
|
|
9
14
|
/** Chart or table, bindable so the page's actions can follow it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportResult.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/ReportResult.svelte.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGzE,KAAK,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,gEAAgE;IAChE,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,CACX,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KACrC,MAAM,GAAG,SAAS,CAAC;IACxB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KACrC,MAAM,GAAG,SAAS,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"ReportResult.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/ReportResult.svelte.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGzE,KAAK,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,gEAAgE;IAChE,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,CACX,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KACrC,MAAM,GAAG,SAAS,CAAC;IACxB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KACrC,MAAM,GAAG,SAAS,CAAC;CACzB;AAkMD,QAAA,MAAM,YAAY,+CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-reports",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"description": "Materialized aggregate report models for SMRT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@happyvertical/smrt-core": "0.
|
|
64
|
-
"@happyvertical/smrt-jobs": "0.
|
|
65
|
-
"@happyvertical/smrt-types": "0.
|
|
66
|
-
"@happyvertical/smrt-tenancy": "0.
|
|
63
|
+
"@happyvertical/smrt-core": "0.70.0",
|
|
64
|
+
"@happyvertical/smrt-jobs": "0.70.0",
|
|
65
|
+
"@happyvertical/smrt-types": "0.70.0",
|
|
66
|
+
"@happyvertical/smrt-tenancy": "0.70.0",
|
|
67
67
|
"@happyvertical/sql": "^0.116.6",
|
|
68
|
-
"@happyvertical/smrt-config": "0.
|
|
69
|
-
"@happyvertical/smrt-ui": "0.
|
|
68
|
+
"@happyvertical/smrt-config": "0.70.0",
|
|
69
|
+
"@happyvertical/smrt-ui": "0.70.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@happyvertical/smrt-scanner": "0.
|
|
73
|
-
"@happyvertical/smrt-vitest": "0.
|
|
72
|
+
"@happyvertical/smrt-scanner": "0.70.0",
|
|
73
|
+
"@happyvertical/smrt-vitest": "0.70.0",
|
|
74
74
|
"@types/node": "24.13.6",
|
|
75
75
|
"typescript": "6.0.3",
|
|
76
76
|
"vite": "8.1.6",
|