@meshmakers/octo-meshboard 3.5.550 → 3.5.570

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
@@ -365,9 +365,49 @@ interface TableWidgetConfig {
365
365
  filters?: WidgetFilterConfig[];
366
366
  pageSize?: number;
367
367
  sortable?: boolean;
368
+ labelFields?: string[]; // AB#7728
369
+ rowAction?: { label: string }; // AB#7728
370
+ valueMarkers?: { field: string; tooltip: string; icon?: string; color?: string; showValue?: boolean }[]; // AB#7728
368
371
  }
369
372
  ```
370
373
 
374
+ **Row action (AB#7728).** A board author switches on *Row Action* in the table's configuration
375
+ dialog and gives it a label (e.g. "Details"); it is stored as `rowAction: { label }` in the widget's
376
+ `Config` JSON. The table offers it as a row action button **only when the host app provides
377
+ `MESHBOARD_TABLE_ROW_ACTION_HANDLER`** — without a handler (other apps, the Refinery Studio) the
378
+ table looks as before. The handler receives which widget the action came from and the row's values:
379
+
380
+ ```typescript
381
+ import { MESHBOARD_TABLE_ROW_ACTION_HANDLER, MeshBoardTableRowActionEvent } from '@meshmakers/octo-meshboard';
382
+
383
+ providers: [
384
+ // app-wide, or on the component that embeds <mm-meshboard-view>
385
+ {
386
+ provide: MESHBOARD_TABLE_ROW_ACTION_HANDLER,
387
+ useFactory: () => {
388
+ const details = inject(DailyDetailsDialogService);
389
+ return (e: MeshBoardTableRowActionEvent) => {
390
+ // e = { widgetId (rtId, else local id), widgetTitle, meshBoardRtId, actionLabel, row }
391
+ if (e.widgetTitle === 'Energiedaten täglich') {
392
+ details.open(e.row['rtWellKnownName'] as string, e.row['day'] as string);
393
+ }
394
+ };
395
+ }
396
+ }
397
+ ]
398
+ ```
399
+
400
+ `row` is keyed by column field (attribute path / query column), a copy of the list row. A handler that
401
+ throws (or rejects) is logged and does not break the table.
402
+
403
+ **Value markers (AB#7728).** `valueMarkers` turns a column into a marker column: the cell shows the
404
+ icon (status icon set: `exclamation-circle` (default), `warning-triangle`, `check-circle`, `x-circle`,
405
+ `minus-circle`, `question-circle`, `circle`) with `tooltip` as title and accessible name when the value
406
+ is a number (or numeric string) above zero, and stays empty otherwise (`isPositiveMarkerValue`). It
407
+ works for configured columns and for columns derived from a persistent query; set it in the dialog's
408
+ *Value Markers* card. With `showValue: true` the cell shows the value next to the icon (default: icon
409
+ only); a value of zero or below still leaves the cell empty.
410
+
371
411
  **Texts (AB#5622).** The list inside the table (`mm-list-view`) takes its texts from
372
412
  `MESHBOARD_MESSAGES` — "No records available.", pager texts, toolbar labels — merged over the
373
413
  English defaults; the host sets them once (fixed object or a signal for a runtime language switch):
@@ -480,6 +520,14 @@ Example — the daily quality 1/2/3 shown as L1/L2/L3 with German and English he
480
520
  }
481
521
  ```
482
522
 
523
+ **Label fields (AB#7728).** `labelFields: ['dataquality_max', 'rtWellKnownName']` on a table offers
524
+ these columns to the resolver whatever their type, also numeric or typed text query columns that are
525
+ otherwise skipped. The resolver gets the same `tableCell` request for string and number cells, with
526
+ `value` as text (`3` arrives as `'3'`, zero included; empty cells are not offered), and `valueType`
527
+ when the query reports it. Returning `null` keeps the plain text, which also replaces a numeric
528
+ `format` of that column; a value marker on the same column wins. Without a resolver the key has no
529
+ effect. The key is set in the widget's `Config` JSON (no dialog field); a dialog save keeps it.
530
+
483
531
  ### Pie Chart Widget
484
532
  Displays data as pie or donut chart.
485
533