flexdesk 0.17.11 → 0.17.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.12 (2026-10-26)
4
+
5
+ A patch release: everything below is additive. Every fix is documented in a
6
+ section of the docs headed "(0.17.12)"; each entry links to it.
7
+
8
+ ### Added and changed
9
+
10
+ - [An empty cell can name what is missing: `emptyMessage` as a function](docs/components/charts.md#an-empty-cell-can-name-what-is-missing-emptymessage-as-a-function-01712): `renderPlotGrid`, `PlotPopoutWindow` and `openPlotPopoutWindow` take `emptyMessage` as a string, as before, or as a function `(subplot, results, index) => string`. It is called each time a cell is drawn empty, with that cell's subplot, the grid's results at that moment (as the grid was given them, so null or undefined when there are none) and the cell's index in the layout: on the first draw, on every `update()` (new `results`, a new `plotConfig`, `overlays` or `hiddenSeries`), on a resize that draws a deferred cell, and when a subplot fails to draw, so the message follows results that stream in or change without rebuilding the grid. The plot window hands its `emptyMessage` to its grid, so the function is also called on the window's refresh and stream events and `updateConfig()`; `openPlotPopoutWindow` forwards it. A slot with no subplot still shows `noSubplotMessage`, the Data tab's `tableEmptyMessage` stays a string, and a string `emptyMessage` is shown exactly as before (STORY-0117).
11
+
12
+ ### Removed or renamed exports
13
+
14
+ None. Compared with 0.17.11, across every entry point (`core`, `widgets`, `wm`,
15
+ `host`, `canvas`, `flow`, `charts`, `tiles`, `editor`) and the package
16
+ `exports` map, no export was added, removed or renamed, and no option was
17
+ removed or renamed: `emptyMessage` accepts a function as well as a string.
18
+
3
19
  ## 0.17.11 (2026-10-25)
4
20
 
5
21
  A patch release: everything below is additive. Every fix is documented in a
package/dist/charts.js CHANGED
@@ -55,7 +55,7 @@ import {
55
55
  strideIndices,
56
56
  uid,
57
57
  updateChart
58
- } from "./chunk-2YTM3GJE.js";
58
+ } from "./chunk-75FLVAUT.js";
59
59
  import {
60
60
  AutocompleteField,
61
61
  createRafResizeObserver
@@ -1379,6 +1379,9 @@ function resolveSeriesData(series, results) {
1379
1379
  if (!y) return null;
1380
1380
  return series._resultTime ? { y, x: series._resultTime } : { y };
1381
1381
  }
1382
+ function emptyMessageFor(message, subplot, results, index) {
1383
+ return typeof message === "function" ? message(subplot, results, index) : message;
1384
+ }
1382
1385
  function renderPlotGrid(container, plotConfig, results, options = {}) {
1383
1386
  const opts = {
1384
1387
  resolveSeries: resolveSeriesData,
@@ -1436,6 +1439,9 @@ function renderPlotGrid(container, plotConfig, results, options = {}) {
1436
1439
  tokens = cells.map(() => 0);
1437
1440
  deferred.clear();
1438
1441
  }
1442
+ function showEmpty(cell, index) {
1443
+ showMessage(cell, emptyMessageFor(opts.emptyMessage, config?.subplots?.[index] ?? null, data, index));
1444
+ }
1439
1445
  function showMessage(cell, text) {
1440
1446
  purgeCell(cell);
1441
1447
  const msg = document.createElement("div");
@@ -1597,7 +1603,7 @@ function renderPlotGrid(container, plotConfig, results, options = {}) {
1597
1603
  const figure = await buildFigure(sp, index);
1598
1604
  if (!current()) return false;
1599
1605
  if (!figure) {
1600
- showMessage(cell, opts.emptyMessage);
1606
+ showEmpty(cell, index);
1601
1607
  deferred.delete(index);
1602
1608
  return false;
1603
1609
  }
@@ -1627,7 +1633,7 @@ function renderPlotGrid(container, plotConfig, results, options = {}) {
1627
1633
  if (disposed) return false;
1628
1634
  if (cells[index] === cell && tokens[index] === token) {
1629
1635
  deferred.delete(index);
1630
- showMessage(cell, opts.emptyMessage);
1636
+ showEmpty(cell, index);
1631
1637
  }
1632
1638
  opts.onError?.({ index, error });
1633
1639
  return false;
@@ -1719,6 +1725,11 @@ var PlotPopoutWindow = class {
1719
1725
  * updates through `refreshEvent` and explicit calls only.
1720
1726
  * @param {Function} [options.resolveSeries] - `(series, results, subplot) => { y, x? } | null`
1721
1727
  * (plot_grid.js); used by the chart and the data table. Default resolveSeriesData.
1728
+ * @param {string|Function} [options.emptyMessage='No data yet.'] - What a chart
1729
+ * cell with nothing to draw says: a string, or `(subplot, results, index) =>
1730
+ * string`, called on every redraw that leaves the cell empty (renderPlotGrid).
1731
+ * @param {string} [options.tableEmptyMessage='No data yet.'] - What the Data tab
1732
+ * says with no rows.
1722
1733
  */
1723
1734
  constructor({
1724
1735
  id,
@@ -2840,4 +2851,4 @@ export {
2840
2851
  openPlotPopoutWindow,
2841
2852
  openRawTracesWindow
2842
2853
  };
2843
- //# sourceMappingURL=chunk-2YTM3GJE.js.map
2854
+ //# sourceMappingURL=chunk-75FLVAUT.js.map