report-studio 1.1.0 → 1.2.1

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/README.md CHANGED
@@ -1,14 +1,24 @@
1
1
  # Report Studio
2
2
 
3
- Design paginated reports in the browser, then render them inside your own app.
3
+ **Design paginated reports visually. Zero runtime dependencies. Works in plain
4
+ JS or React.**
4
5
 
5
- You draw the report once in a visual designer — headers, footers, groups,
6
- tables, text — and it is saved as a plain JSON file. At runtime your app feeds
7
- that layout its own data and gets back a page-by-page report viewer, with
8
- navigation, zoom, search, print and CSV export.
6
+ ![Adding a text box in the designer, saving, and running the report](https://raw.githubusercontent.com/Shafickbinameer/report-studio/main/.github/demo.gif)
7
+
8
+ **[Try it live on StackBlitz](https://stackblitz.com/github/Shafickbinameer/report-studio/tree/main/examples/demo?file=src%2Fmain.js)**: the viewer and the designer in a Vite app, nothing to install.
9
9
 
10
- No framework, no runtime dependencies. The renderer is plain DOM, so it works
11
- in any project: plain JS, or React through the included components.
10
+ You draw the report once in a visual designer — headers, footers, groups,
11
+ tables, text, images — and it is saved as a plain JSON file. At runtime your
12
+ app feeds that layout its own data and gets back a page-by-page report viewer,
13
+ with navigation, zoom, search, print and CSV export.
14
+
15
+ * **Zero runtime dependencies.** The renderer is plain DOM. No server to run,
16
+ no framework required.
17
+ * **Layouts are plain JSON.** Commit them, diff them, load them with `fetch`.
18
+ * **React components included**, for both the viewer and the designer.
19
+ * **Vite plugin.** One line in `vite.config.js` and your existing dev server
20
+ hosts the designer's save routes.
21
+ * **TypeScript types included.**
12
22
 
13
23
  ## Installation
14
24
 
@@ -63,6 +73,24 @@ file; it passes its own data to `buildPages`.
63
73
  The designer is a design-time tool. It reads and writes files inside `--dir`
64
74
  and nowhere else — keep it on localhost and do not run it in production.
65
75
 
76
+ ### Already using Vite?
77
+
78
+ Skip the separate command. The plugin mounts the same read-and-write routes in
79
+ the dev server you already run:
80
+
81
+ ```js
82
+ import { defineConfig } from 'vite';
83
+ import { reportStudio } from 'report-studio/vite';
84
+
85
+ export default defineConfig({
86
+ plugins: [reportStudio({ dir: 'reports' })]
87
+ });
88
+ ```
89
+
90
+ Dev only, deliberately: it writes files, and mounting that in front of a
91
+ production build would be a hole rather than a feature. The CLI stays the
92
+ default because it works in any project, Vite or not.
93
+
66
94
  ## Preview setup
67
95
 
68
96
  Two files: an HTML page with one empty element, and a module that fills it.
@@ -226,6 +254,10 @@ import 'report-studio/viewer.css';
226
254
  | `report-studio/designer.css` | the designer's styles, likewise |
227
255
  | `report-studio/report.css` | the report alone, for drawing pages with no chrome |
228
256
 
257
+ The stylesheets style only what the viewer and designer draw. Your page's
258
+ fonts, margins and CSS variables are left alone. The toolbar rearranges itself
259
+ when the viewer is narrow, whether it is on a phone or in a side panel.
260
+
229
261
  ## React
230
262
 
231
263
  React components are included. React itself is not bundled: install it
@@ -336,27 +368,29 @@ const store = {
336
368
  id. `loadData` must resolve to `null`, not throw, when a report has no data
337
369
  file yet: that is an ordinary state, not a failure.
338
370
 
371
+ Give the mount element a height, as you do for the viewer. The designer fills
372
+ it, so your own header or tabs can sit above it. An element with no height
373
+ gets the full window.
374
+
339
375
  `createDesigner` returns a handle with the current `layout`, `redraw()` and
340
376
  `destroy()`. `openDesignerWindow(options)` opens the same designer in a window
341
377
  of its own, for the same reason `openViewerWindow` does.
342
378
 
343
- ## Reports in a project that already runs Vite
379
+ ## TypeScript
344
380
 
345
- The CLI is the primary way in because it works for any project. If yours is
346
- already a Vite one, the same read-and-write routes can be mounted in the dev
347
- server you have:
381
+ Type declarations ship with the package, for every entry point. Nothing to
382
+ install. The layout file has types of its own, so a layout loaded from JSON can
383
+ be checked:
348
384
 
349
- ```js
350
- import { defineConfig } from 'vite';
351
- import { reportStudio } from 'report-studio/vite';
385
+ ```ts
386
+ import { buildPages, createViewer, type Layout } from 'report-studio';
352
387
 
353
- export default defineConfig({
354
- plugins: [reportStudio({ dir: 'reports' })]
355
- });
388
+ const layout: Layout = await fetch('./reports/sales-summary.json')
389
+ .then(r => r.json());
356
390
  ```
357
391
 
358
- Dev only, deliberately: it writes files, and mounting that in front of a
359
- production build would be a hole rather than a feature.
392
+ `Layout`, `ReportItem`, `PaginatedReport`, `ViewerHandle`, `ReportStore`,
393
+ `DesignerHandle` and the component props are all exported as types.
360
394
 
361
395
  ## Licence
362
396
 
@@ -1,4 +1,4 @@
1
- import { A as e, E as t, I as n, L as r, O as i, S as a, T as o, a as s, c, d as l, f as u, k as d, l as f, n as p, o as m, p as h, r as g, s as _, t as ee, u as v, w as y, x as b } from "./viewer-xa17tyMJ.js";
1
+ import { A as e, E as t, I as n, L as r, O as i, S as a, T as o, a as s, c, d as l, f as u, k as d, l as f, n as p, o as m, p as h, r as g, s as _, t as ee, u as v, w as y, x as b } from "./viewer-5nSb_EH2.js";
2
2
  //#region src/designer/fields.js
3
3
  var x = [
4
4
  {
package/dist/designer.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./designer-qy59eEux.js";
1
+ import { n as e, t } from "./designer-Be8PdEYf.js";
2
2
  export { t as createDesigner, e as openDesignerWindow };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { C as e, D as t, F as n, M as r, N as i, O as a, P as o, _ as s, a as c, b as l, c as u, g as d, h as f, i as p, j as m, k as h, l as g, m as _, p as v, v as y, y as b } from "./viewer-xa17tyMJ.js";
1
+ import { C as e, D as t, F as n, M as r, N as i, O as a, P as o, _ as s, a as c, b as l, c as u, g as d, h as f, i as p, j as m, k as h, l as g, m as _, p as v, v as y, y as b } from "./viewer-5nSb_EH2.js";
2
2
  export { r as LINE_HEIGHT_RATIO, a as ReportError, v as buildPages, p as createViewer, e as group, m as measure, i as measureText, c as openViewerWindow, u as openWindow, l as paginate, g as render, _ as reportFilename, f as reportTables, t as resolve, y as search, b as searchPages, o as textHeight, d as toCSV, s as toReportCSV, h as validateLayout, n as wrapLines };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./designer-qy59eEux.js";
1
+ import { t as e } from "./designer-Be8PdEYf.js";
2
2
  import { createElement as t, forwardRef as n, useEffect as r, useImperativeHandle as i, useRef as a } from "react";
3
3
  //#region src/react/designer.js
4
4
  var o = n(function({ layout: n, id: o = null, store: s, guardUnload: c = !0, onChange: l, className: u, style: d }, f) {
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as e, p as t } from "./viewer-xa17tyMJ.js";
1
+ import { i as e, p as t } from "./viewer-5nSb_EH2.js";
2
2
  import { createElement as n, forwardRef as r, useEffect as i, useImperativeHandle as a, useMemo as o, useRef as s } from "react";
3
3
  //#region src/react/index.js
4
4
  var c = [
@@ -1298,67 +1298,73 @@ function qt({ title: e = "Report Studio" } = {}) {
1298
1298
  <!--
1299
1299
  A header, not role="toolbar": that role promises arrow-key roving focus
1300
1300
  between the controls, and here the arrow keys page the report instead.
1301
+
1302
+ Two boxes: the header is what measures its width, and the row inside
1303
+ it is what rearranges. A container query restyles what is inside the
1304
+ container, never the container, so the grid cannot be the header.
1301
1305
  -->
1302
- <header class="toolbar" data-role="bar" aria-label="Report tools">
1303
- <div class="toolbar-brand">${e}</div>
1306
+ <header class="toolbar" aria-label="Report tools">
1307
+ <div class="toolbar-row" data-role="bar">
1308
+ <div class="toolbar-brand">${e}</div>
1304
1309
 
1305
- <div class="toolbar-centre">
1306
- <div class="toolbar-group toolbar-search">
1307
- <!--
1308
- Buttons cannot live inside an <input>, so the wrapper draws
1309
- the field and the input inside it draws no chrome of its own.
1310
- -->
1311
- <div class="search-field">
1312
- <input type="search" data-role="query" placeholder="Search the report (ctrl+K)"
1313
- title="Search the report (ctrl+K)"
1314
- aria-label="Search the report" spellcheck="false">
1315
- <span class="hits" data-role="hits" data-state="idle" aria-live="polite"></span>
1316
- <button type="button" data-role="hit-prev" title="Previous match (shift+enter)"
1317
- aria-label="Previous match">&#8593;</button>
1318
- <button type="button" data-role="hit-next" title="Next match (enter)"
1319
- aria-label="Next match">&#8595;</button>
1310
+ <div class="toolbar-centre">
1311
+ <div class="toolbar-group toolbar-search">
1312
+ <!--
1313
+ Buttons cannot live inside an <input>, so the wrapper draws
1314
+ the field and the input inside it draws no chrome of its own.
1315
+ -->
1316
+ <div class="search-field">
1317
+ <input type="search" data-role="query" placeholder="Search the report (ctrl+K)"
1318
+ title="Search the report (ctrl+K)"
1319
+ aria-label="Search the report" spellcheck="false">
1320
+ <span class="hits" data-role="hits" data-state="idle" aria-live="polite"></span>
1321
+ <button type="button" data-role="hit-prev" title="Previous match (shift+enter)"
1322
+ aria-label="Previous match">&#8593;</button>
1323
+ <button type="button" data-role="hit-next" title="Next match (enter)"
1324
+ aria-label="Next match">&#8595;</button>
1325
+ </div>
1320
1326
  </div>
1321
- </div>
1322
1327
 
1323
- <div class="toolbar-group toolbar-zoom">
1324
- <button type="button" data-role="zoom-out" title="Zoom out (ctrl+-)"
1325
- aria-label="Zoom out">&#8722;</button>
1328
+ <div class="toolbar-group toolbar-zoom">
1329
+ <button type="button" data-role="zoom-out" title="Zoom out (ctrl+-)"
1330
+ aria-label="Zoom out">&#8722;</button>
1326
1331
 
1327
- <!--
1328
- A listbox rather than a <select>: option items are drawn by
1329
- the operating system, so they cannot take the palette.
1330
- -->
1331
- <div class="dropdown" data-role="zoom-dropdown">
1332
- <button type="button" class="dropdown-trigger" data-role="zoom"
1333
- aria-haspopup="listbox" aria-expanded="false" aria-label="Zoom level">
1334
- <span class="dropdown-value">100%</span>
1335
- <span class="dropdown-caret" aria-hidden="true"></span>
1336
- </button>
1332
+ <!--
1333
+ A listbox rather than a <select>: option items are drawn by
1334
+ the operating system, so they cannot take the palette.
1335
+ -->
1336
+ <div class="dropdown" data-role="zoom-dropdown">
1337
+ <button type="button" class="dropdown-trigger" data-role="zoom"
1338
+ aria-haspopup="listbox" aria-expanded="false" aria-label="Zoom level">
1339
+ <span class="dropdown-value">100%</span>
1340
+ <span class="dropdown-caret" aria-hidden="true"></span>
1341
+ </button>
1337
1342
 
1338
- <ul class="dropdown-menu" data-role="zoom-menu" role="listbox"
1339
- aria-label="Zoom level" hidden>
1340
- <li class="dropdown-item" role="option" tabindex="-1" data-value="fit">Fit width</li>
1341
- <li class="dropdown-item" role="option" tabindex="-1" data-value="0.5">50%</li>
1342
- <li class="dropdown-item" role="option" tabindex="-1" data-value="0.75">75%</li>
1343
- <li class="dropdown-item" role="option" tabindex="-1" data-value="1"
1344
- data-selected="true">100%</li>
1345
- <li class="dropdown-item" role="option" tabindex="-1" data-value="1.25">125%</li>
1346
- <li class="dropdown-item" role="option" tabindex="-1" data-value="1.5">150%</li>
1347
- <li class="dropdown-item" role="option" tabindex="-1" data-value="2">200%</li>
1348
- <li class="dropdown-item" role="option" tabindex="-1" data-value="3">300%</li>
1349
- </ul>
1350
- </div>
1343
+ <ul class="dropdown-menu" data-role="zoom-menu" role="listbox"
1344
+ aria-label="Zoom level" hidden>
1345
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="fit">Fit width</li>
1346
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="0.5">50%</li>
1347
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="0.75">75%</li>
1348
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="1"
1349
+ data-selected="true">100%</li>
1350
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="1.25">125%</li>
1351
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="1.5">150%</li>
1352
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="2">200%</li>
1353
+ <li class="dropdown-item" role="option" tabindex="-1" data-value="3">300%</li>
1354
+ </ul>
1355
+ </div>
1351
1356
 
1352
- <button type="button" data-role="zoom-in" title="Zoom in (ctrl++)"
1353
- aria-label="Zoom in">&#43;</button>
1357
+ <button type="button" data-role="zoom-in" title="Zoom in (ctrl++)"
1358
+ aria-label="Zoom in">&#43;</button>
1359
+ </div>
1354
1360
  </div>
1355
- </div>
1356
1361
 
1357
- <div class="toolbar-group toolbar-save">
1358
- <button type="button" data-role="print" title="Print or save as PDF (ctrl+P)">
1359
- Print</button>
1360
- <button type="button" data-role="export" title="Export the report (ctrl+X)">
1361
- Export&#8230;</button>
1362
+ <div class="toolbar-group toolbar-save">
1363
+ <button type="button" data-role="print" title="Print or save as PDF (ctrl+P)">
1364
+ Print</button>
1365
+ <button type="button" data-role="export" title="Export the report (ctrl+X)">
1366
+ Export&#8230;</button>
1367
+ </div>
1362
1368
  </div>
1363
1369
  </header>
1364
1370
 
package/package.json CHANGED
@@ -1,25 +1,35 @@
1
1
  {
2
2
  "name": "report-studio",
3
- "version": "1.1.0",
4
- "description": "Design and preview paginated reports in the browser. Zero runtime dependencies; optional React components.",
3
+ "version": "1.2.1",
4
+ "description": "Visual report designer and paginated report viewer for the browser. Zero runtime dependencies; plain JS, React components and a Vite plugin.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/Shafickbinameer/report-studio.git"
8
8
  },
9
9
  "keywords": [
10
10
  "report",
11
+ "report-designer",
12
+ "report-builder",
13
+ "report-viewer",
11
14
  "designer",
15
+ "paginated",
12
16
  "pagination",
13
17
  "pdf",
14
18
  "print",
15
19
  "layout",
16
- "react"
20
+ "viewer",
21
+ "zero-dependency",
22
+ "react",
23
+ "vite-plugin",
24
+ "typescript"
17
25
  ],
18
26
  "author": "Mohammed Shafick <shafickbinameer@gmail.com>",
19
27
  "license": "MIT",
20
28
  "type": "module",
29
+ "types": "./types/index.d.ts",
21
30
  "files": [
22
31
  "dist",
32
+ "types",
23
33
  "src/asset",
24
34
  "src/cli",
25
35
  "src/designer",
@@ -34,11 +44,26 @@
34
44
  "src/index.js"
35
45
  ],
36
46
  "exports": {
37
- ".": "./dist/index.js",
38
- "./designer": "./dist/designer.js",
39
- "./react": "./dist/react.js",
40
- "./react/designer": "./dist/react-designer.js",
41
- "./vite": "./src/vite/index.js",
47
+ ".": {
48
+ "types": "./types/index.d.ts",
49
+ "default": "./dist/index.js"
50
+ },
51
+ "./designer": {
52
+ "types": "./types/designer.d.ts",
53
+ "default": "./dist/designer.js"
54
+ },
55
+ "./react": {
56
+ "types": "./types/react.d.ts",
57
+ "default": "./dist/react.js"
58
+ },
59
+ "./react/designer": {
60
+ "types": "./types/react-designer.d.ts",
61
+ "default": "./dist/react-designer.js"
62
+ },
63
+ "./vite": {
64
+ "types": "./types/vite.d.ts",
65
+ "default": "./src/vite/index.js"
66
+ },
42
67
  "./report.css": "./src/render/report.css",
43
68
  "./viewer.css": "./src/preview/styles.css",
44
69
  "./designer.css": "./src/designer/styles.css",
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="en" class="report-studio-page">
3
3
 
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -15,7 +15,7 @@
15
15
  @import "../shared/dropdown.css";
16
16
  @import "../preview/chrome.css";
17
17
 
18
- :root {
18
+ .report-designer {
19
19
  --dz-bar-height: 56px;
20
20
  /* wide enough for "reportHeader", the longest band name */
21
21
  --dz-gutter: 96px;
@@ -25,11 +25,30 @@
25
25
  --dz-foot-offset: 20px;
26
26
  }
27
27
 
28
+ /**
29
+ * The designer fills the element it was given - a column of the bar and the
30
+ * row below it - so a host can put its own header above it. A mount with no
31
+ * height of its own (the CLI's page, a host that never set one) gets the
32
+ * window's instead: height: 100% has nothing to resolve against there, so the
33
+ * cap is what stops the designer growing to the length of the page.
34
+ */
28
35
  .report-designer {
29
- min-height: 100vh;
36
+ display: flex;
37
+ flex-direction: column;
38
+ height: 100%;
39
+ max-height: 100vh;
30
40
  background-color: var(--backdrop);
31
41
  }
32
42
 
43
+ /**
44
+ * A class outranks the browser's own [hidden] rule, so display: flex above
45
+ * would keep a designer on screen that its host had hidden - under the report,
46
+ * in a tabbed page that hides whichever screen is not chosen.
47
+ */
48
+ .report-designer[hidden] {
49
+ display: none;
50
+ }
51
+
33
52
  /**
34
53
  * The designer takes the focus so its shortcuts have somewhere to arrive, but
35
54
  * it is not a control - a ring around the whole screen would be saying that it
@@ -41,10 +60,14 @@
41
60
 
42
61
  /* ---------------- the bar ---------------- */
43
62
 
63
+ /**
64
+ * In the column, not fixed to the window: fixed, it sat over whatever the host
65
+ * had at the top of its page - its own header, and the tabs to leave by.
66
+ */
44
67
  .dz-bar {
45
- position: fixed;
46
- inset: 0 0 auto 0;
68
+ position: relative;
47
69
  z-index: 10;
70
+ flex: none;
48
71
 
49
72
  display: flex;
50
73
  align-items: center;
@@ -98,12 +121,12 @@
98
121
 
99
122
  /* ---------------- the canvas ---------------- */
100
123
 
101
- /* the bar is fixed, so the row below it starts where the bar ends */
124
+ /* whatever height the bar leaves; the canvas and the rail scroll inside it */
102
125
  .dz-body {
126
+ flex: 1;
127
+ min-height: 0;
103
128
  display: flex;
104
129
  align-items: stretch;
105
- margin-top: var(--dz-bar-height);
106
- height: calc(100vh - var(--dz-bar-height));
107
130
  }
108
131
 
109
132
  /**
@@ -299,7 +322,7 @@
299
322
 
300
323
  /* ---------------- rulers and guides ---------------- */
301
324
 
302
- :root {
325
+ .report-designer {
303
326
  --dz-ruler: 18px;
304
327
  }
305
328
 
package/src/index.html CHANGED
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="en" class="report-studio-page">
3
3
 
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -48,6 +48,11 @@
48
48
  background: var(--backdrop);
49
49
  }
50
50
 
51
+ /* display: flex above outranks the browser's [hidden], so a hidden viewer would stay up */
52
+ .report-viewer[hidden] {
53
+ display: none;
54
+ }
55
+
51
56
  /* the standalone page gives it the window; an application gives it a panel */
52
57
  .report-fills-window {
53
58
  height: 100vh;
@@ -170,8 +175,24 @@
170
175
 
171
176
  /* ---------------- viewer chrome ---------------- */
172
177
 
178
+ /**
179
+ * The bar measures its own width, so a viewer in a narrow panel rearranges the
180
+ * same as one on a phone. The bar rather than .report-viewer: a container's
181
+ * width cannot come from its content, and the bar is stretched to the viewer
182
+ * anyway - on the viewer it would collapse a host's shrink-to-fit mount.
183
+ */
173
184
  .report-viewer .toolbar {
174
185
  flex: none;
186
+ container-type: inline-size;
187
+ background: var(--surface);
188
+ border-bottom: 1px solid var(--border);
189
+ font-family: "Instrument Sans", system-ui, sans-serif;
190
+ font-size: 13px;
191
+ color: var(--ink);
192
+ z-index: 10;
193
+ }
194
+
195
+ .report-viewer .toolbar-row {
175
196
  height: var(--bar-height);
176
197
 
177
198
  /**
@@ -180,16 +201,10 @@
180
201
  * whatever the zoom and export controls left over.
181
202
  */
182
203
  display: grid;
183
- grid-template-columns: 1fr auto 1fr;
204
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
184
205
  align-items: center;
185
206
  gap: 16px;
186
207
  padding: 0 16px;
187
- background: var(--surface);
188
- border-bottom: 1px solid var(--border);
189
- font-family: "Instrument Sans", system-ui, sans-serif;
190
- font-size: 13px;
191
- color: var(--ink);
192
- z-index: 10;
193
208
  }
194
209
 
195
210
  .report-viewer .toolbar-group {
@@ -198,12 +213,19 @@
198
213
  gap: 8px;
199
214
  }
200
215
 
201
- /* the wordmark holds the left column, so the centre column stays centred */
216
+ /**
217
+ * The name holds the left column, so the centre column stays centred. It is
218
+ * the report's own name and can be any length, so it ends in an ellipsis
219
+ * rather than pushing the controls off the bar: block, because an ellipsis
220
+ * needs a block box, and max-width, because start-aligned it is otherwise as
221
+ * wide as its text.
222
+ */
202
223
  .report-viewer .toolbar-brand {
203
224
  justify-self: start;
204
- display: flex;
205
- align-items: center;
206
- gap: 8px;
225
+ display: block;
226
+ max-width: 100%;
227
+ overflow: hidden;
228
+ text-overflow: ellipsis;
207
229
  font-size: 14px;
208
230
  font-weight: 600;
209
231
  letter-spacing: -0.01em;
@@ -408,6 +430,48 @@
408
430
  outline: 1px solid var(--accent-ink);
409
431
  }
410
432
 
433
+ /**
434
+ * Too narrow for one row: the name and Print/Export share the top line, and
435
+ * search and zoom take the whole line under it, the search field stretching to
436
+ * whatever zoom leaves. Below this the three-column row ran off the right edge
437
+ * and dragged the host page sideways with it.
438
+ */
439
+ @container (max-width: 900px) {
440
+ .report-viewer .toolbar-row {
441
+ height: auto;
442
+ grid-template-columns: minmax(0, 1fr) auto;
443
+ grid-template-areas:
444
+ "brand save"
445
+ "centre centre";
446
+ gap: 8px 12px;
447
+ padding: 8px 12px;
448
+ }
449
+
450
+ .report-viewer .toolbar-brand {
451
+ grid-area: brand;
452
+ }
453
+
454
+ .report-viewer .toolbar-save {
455
+ grid-area: save;
456
+ }
457
+
458
+ .report-viewer .toolbar-centre {
459
+ grid-area: centre;
460
+ justify-self: stretch;
461
+ min-width: 0;
462
+ gap: 8px;
463
+ }
464
+
465
+ .report-viewer .toolbar-search {
466
+ flex: 1;
467
+ min-width: 0;
468
+ }
469
+
470
+ .report-viewer .search-field {
471
+ width: 100%;
472
+ }
473
+ }
474
+
411
475
  @media print {
412
476
  .report-viewer .toolbar,
413
477
  .report-viewer .pager { display: none; }
@@ -417,7 +481,6 @@
417
481
  .report-viewer #main-page { width: auto !important; height: auto !important; margin: 0; }
418
482
 
419
483
  /* the sheet's own background must not print over the report */
420
- body,
421
484
  .graph-paper { background: none; }
422
485
 
423
486
  .report-viewer .page {