web-mojo 2.4.11 → 2.4.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 +9 -0
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.es.js +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.es.js +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/chunks/exportChart-CJ824MnD.js +2 -0
- package/dist/chunks/exportChart-CJ824MnD.js.map +1 -0
- package/dist/chunks/exportChart-CyPESnlQ.js +2 -0
- package/dist/chunks/exportChart-CyPESnlQ.js.map +1 -0
- package/dist/chunks/{version-BxKPs9hq.js → version-B5EuEVdn.js} +2 -2
- package/dist/chunks/{version-BxKPs9hq.js.map → version-B5EuEVdn.js.map} +1 -1
- package/dist/chunks/{version-CfHtDs3p.js → version-DDmBPDCH.js} +2 -2
- package/dist/chunks/{version-CfHtDs3p.js.map → version-DDmBPDCH.js.map} +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/exportChart-DVnTgKP0.js +0 -2
- package/dist/chunks/exportChart-DVnTgKP0.js.map +0 -1
- package/dist/chunks/exportChart-DYWi1WFJ.js +0 -2
- package/dist/chunks/exportChart-DYWi1WFJ.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### Charts — `apiParams` passthrough on metrics-aware components
|
|
6
|
+
|
|
7
|
+
- **Added:** `MetricsChart` and `MetricsMiniChart` accept an `apiParams: object` constructor option — a passthrough map for arbitrary `/api/metrics/fetch` query params the framework doesn't yet promote to first-class options. `MetricsMiniChartWidget` forwards the option through `chartOptions` to its inner mini chart.
|
|
8
|
+
- **Added:** `MetricsChart.setApiParams(next)` and `MetricsMiniChart.setApiParams(next)` runtime setters that replace (not merge) the map and refetch. Callers wanting a merge do `chart.setApiParams({ ...chart.apiParams, key: value })` explicitly.
|
|
9
|
+
- **Added:** `MetricsChart.getStats()` now reports `apiParams` (defensive copy).
|
|
10
|
+
- **Precedence:** `apiParams` is spread *first* into `buildApiParams`; hardcoded options (`granularity`, `account`, `slugs`, `category`, `dateStart`/`End`, `withDelta`, `childKind`, `breakdown`) overwrite anything that overlaps. The `_` cache-buster always wins. Empty / omitted `apiParams` produces query strings byte-identical to today — no impact on existing callers. Use `apiParams` as a base layer for forward-compatible / experimental keys, not as an override surface.
|
|
11
|
+
- **Note:** `apiParams` is purely a query-string mechanic. Constructor options with non-URL side effects (e.g. `withDelta: true` switches the default endpoint to `/api/metrics/series`) require the first-class option.
|
|
12
|
+
- **Trust boundary:** `apiParams` values land directly in the URL — treat as developer-controlled (same convention as `title:`). Never pipe user input through it without sanitizing at the call site.
|
|
13
|
+
|
|
5
14
|
### Charts — group fan-out (parent rollup + per-child breakdown)
|
|
6
15
|
|
|
7
16
|
- **Added:** `MetricsChart` accepts `childKind: string` and `breakdown: boolean` constructor options that drive Modes 2 and 3 of `/api/metrics/fetch`. With `childKind` set on a `account: 'group-<id>'` chart, the backend sums the metric across all active descendants of that kind (Mode 2 — same response shape as Mode 1). Add `breakdown: true` and the backend returns one series per child group plus a `groups` map (name → child id) for drill-in (Mode 3 — single slug only).
|