@meshmakers/octo-meshboard 3.4.820 → 3.4.890

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshmakers/octo-meshboard",
3
- "version": "3.4.820",
3
+ "version": "3.4.890",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.0.0",
6
6
  "@angular/core": "^22.0.0",
@@ -296,18 +296,28 @@ interface PersistentQueryDataSource extends WidgetDataSource {
296
296
  * (absent/`false`) keeps the direct query.
297
297
  */
298
298
  resolutionAware?: boolean;
299
- /**
300
- * Optional OBIS-code filter forwarded to resolution-aware routing / the downsampling
301
- * query to narrow the series (e.g. `1.8.0` active-energy import). Stream-data only.
302
- */
303
- obisFilter?: string;
304
299
  /**
305
300
  * Resolution-aware routing (AB#4290): the aggregation the series must be reduced with
306
- * (`SUM` for additive energy, `MAX` for demand, …). Required when `resolutionAware` is on —
307
- * the resolver never guesses it. Matched against a rollup's stored aggregation function; it is
308
- * also the reducer applied by the downsampling query. Stream-data only.
301
+ * (`SUM`, `MAX`, …). Required when `resolutionAware` is on — the resolver never guesses it.
302
+ * Matched against a rollup's stored aggregation function; it is also the reducer applied by the
303
+ * downsampling query. Stream-data only.
309
304
  */
310
305
  requiredAggregation?: SeriesAggregationFunction;
306
+ /**
307
+ * Group-aggregation mode (AB#4714). Only honoured together with {@link resolutionAware}.
308
+ *
309
+ * The default resolution-aware fan-out emits ONE line per source rtId. When several sources map
310
+ * to the same {@link seriesGroupField} value, the widget's client-side grouping then collapses
311
+ * them last-write-wins, so each line reflects one arbitrary source instead of the combined value.
312
+ *
313
+ * When `true`, the source rtIds are grouped by their `seriesGroupField` attribute value FIRST,
314
+ * and the downsampling query runs once per group with the whole group's rtIds. The transient
315
+ * downsampling groups only by time bin, so it reduces (per {@link requiredAggregation}) over
316
+ * every source in the group server-side — one aggregate line per distinct group value. The
317
+ * grouping is resolved from the source entities' attributes (a rollup archive does not carry the
318
+ * grouping column). Stream-data only.
319
+ */
320
+ aggregateSeriesByGroup?: boolean;
311
321
  }
312
322
  /**
313
323
  * The canonical aggregation functions a resolution-aware series can be reduced with
@@ -2821,11 +2831,23 @@ declare class QueryExecutorService {
2821
2831
  /**
2822
2832
  * Best-effort per-series labels for resolution-aware fan-out (AB#4290): reads each source
2823
2833
  * entity's attribute matching `labelField` (canonical, case/underscore-insensitive so an archive
2824
- * column like `obis_code` maps to the CK attribute `obisCode`). Entities that fail to load or
2825
- * lack the attribute are simply omitted; the caller falls back to the rtId. Returns a
2826
- * `rtId → label` map.
2834
+ * column name maps to its CK attribute). Entities that fail to load or lack the attribute are
2835
+ * simply omitted; the caller falls back to the rtId. Returns a `rtId → label` map.
2827
2836
  */
2828
2837
  fetchSeriesLabels(ckTypeId: string, rtIds: string[], labelField: string): Promise<Map<string, string>>;
2838
+ /** Cap on the source-entity population read for group-aggregation (AB#4714). A truncated read is
2839
+ * logged, never silent. */
2840
+ private static readonly ENTITY_GROUP_FETCH_CAP;
2841
+ /**
2842
+ * Group-aggregation source resolution (AB#4714): fetches the source entities of `ckTypeId` in a
2843
+ * single bulk read and buckets their rtIds by the value of `groupField` (canonical match — case
2844
+ * and non-alphanumerics are ignored, so an archive column name maps to its CK attribute). Returns
2845
+ * `groupValue → rtIds`. Optionally restricted to `restrictRtIds` (an entity-selector scope) —
2846
+ * entities outside that set are dropped. Entities whose group attribute is missing/null are
2847
+ * omitted (they cannot be attributed to a line). The population is bounded to
2848
+ * {@link ENTITY_GROUP_FETCH_CAP}; a truncated read is logged (never silently capped).
2849
+ */
2850
+ fetchEntityGroups(ckTypeId: string, groupField: string, restrictRtIds?: string[]): Promise<Map<string, string[]>>;
2829
2851
  private buildStreamDataArg;
2830
2852
  private mapColumns;
2831
2853
  private mapRuntimeRows;
@@ -4396,12 +4418,27 @@ declare class LineChartWidgetComponent implements DashboardWidget<LineChartWidge
4396
4418
  private loadData;
4397
4419
  /**
4398
4420
  * Resolution-aware routing (AB#4290): resolve the best archive/rollup for the window + target
4399
- * point count, then downsample each source series against it. The transient downsampling groups
4400
- * by bin (merging source rtIds), so this fans out one call per source rtId to keep each register
4401
- * a separate line; each series' bins are reshaped onto the widget's configured value/series
4402
- * fields so the shared {@link processData} pipeline renders them unchanged.
4421
+ * point count, then downsample the source series against it. Two fan-out shapes, both reshaped
4422
+ * onto the widget's value/series fields so the shared {@link processData} pipeline renders them
4423
+ * unchanged:
4424
+ * - default: one call per source rtId → one line per register ({@link loadPerRtIdRows}).
4425
+ * - `aggregateSeriesByGroup` (AB#4714): one call per `seriesGroupField` value with the whole
4426
+ * group's rtIds → one server-side-summed line per group ({@link loadGroupAggregatedRows}).
4403
4427
  */
4404
4428
  private loadResolutionAware;
4429
+ /**
4430
+ * Group-aggregation fan-out (AB#4714): buckets the source entities by `seriesGroupField` and runs
4431
+ * one downsampling call per group with the group's rtIds. The transient downsampling reduces over
4432
+ * the group's members server-side, yielding one aggregate line per distinct group value. Falls
4433
+ * back to a single merged series when no group can be resolved.
4434
+ */
4435
+ private loadGroupAggregatedRows;
4436
+ /**
4437
+ * Default resolution-aware fan-out (AB#4290): one downsampling call per source rtId so each
4438
+ * register stays its own line, labeled from its `seriesGroupField` attribute. With no source
4439
+ * scope a single merged series is produced (labeled by the series-group field name).
4440
+ */
4441
+ private loadPerRtIdRows;
4405
4442
  /**
4406
4443
  * Reshapes one downsampling bin onto the widget's configured value + series-group fields so the
4407
4444
  * shared {@link processData} path plots it. The transient row carries the reduced value under a