@dashspec/renderer 0.1.10 → 0.1.11
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 +21 -1
- package/dist/{chunk-TAOP57T2.js → chunk-RSIUW5J4.js} +28 -4
- package/dist/chunk-RSIUW5J4.js.map +1 -0
- package/dist/{core-CYeLBFK9.d.ts → core-DchxX9ku.d.ts} +3 -2
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +88 -19
- package/dist/index.js.map +1 -1
- package/docs/data.md +1 -1
- package/docs/widgets.md +4 -1
- package/package.json +1 -1
- package/dist/chunk-TAOP57T2.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,25 @@ under the new version.
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [0.1.11] - 2026-11-18
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Table `pagination.layout: "simple"` ("Showing 1–25 of 223 rows", Previous, "Page 1 of 9",
|
|
22
|
+
Next) and `pagination.sizes: false` to hide the rows-per-page picker.
|
|
23
|
+
- Tiles `captionInline`: the caption right after the number ("12 passed"); a template `value` that
|
|
24
|
+
resolves to `""` draws no number.
|
|
25
|
+
- `fmt.date(v, { weekday, day, month, … })`: format a date with the parts you want.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Charts replay their grow-in animation when the categories change completely (a drill-down, the
|
|
30
|
+
next week) instead of jumping to the new bars.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Tiles show hover feedback only when they do something (selectable, or the panel has `on.click`).
|
|
35
|
+
|
|
17
36
|
## [0.1.10] - 2026-11-18
|
|
18
37
|
|
|
19
38
|
### Added
|
|
@@ -199,7 +218,8 @@ First public release.
|
|
|
199
218
|
never reach object prototypes, values inserted into Markdown are escaped, and custom
|
|
200
219
|
code runs in the sandbox by default. See [docs/security.md](docs/security.md).
|
|
201
220
|
|
|
202
|
-
[Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.
|
|
221
|
+
[Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.11...HEAD
|
|
222
|
+
[0.1.11]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.10...v0.1.11
|
|
203
223
|
[0.1.10]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.9...v0.1.10
|
|
204
224
|
[0.1.9]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.8...v0.1.9
|
|
205
225
|
[0.1.8]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.7...v0.1.8
|
|
@@ -406,11 +406,12 @@ function createHelpers(t = {}) {
|
|
|
406
406
|
if (m) return s ? `${m} min ${s} sec` : `${m} min`;
|
|
407
407
|
return `${s} sec`;
|
|
408
408
|
},
|
|
409
|
+
/** `style` is "date" | "datetime" | "time", or Intl options, e.g. { weekday: 'short', day: 'numeric', month: 'short' }. */
|
|
409
410
|
date: (v, style = "date") => {
|
|
410
411
|
if (v === null || v === void 0 || v === "") return "";
|
|
411
412
|
const d = new Date(typeof v === "number" ? v : String(v));
|
|
412
413
|
if (Number.isNaN(d.getTime())) return String(v);
|
|
413
|
-
const opts = style === "time" ? { timeStyle: "short" } : style === "datetime" ? { dateStyle: "medium", timeStyle: "short" } : { dateStyle: "medium" };
|
|
414
|
+
const opts = typeof style === "object" && style !== null ? pickDateOptions(style) : style === "time" ? { timeStyle: "short" } : style === "datetime" ? { dateStyle: "medium", timeStyle: "short" } : { dateStyle: "medium" };
|
|
414
415
|
return new Intl.DateTimeFormat(locale, { ...opts, ...t.timeZone ? { timeZone: t.timeZone } : {} }).format(d);
|
|
415
416
|
},
|
|
416
417
|
/** "just now", "2 min ago", "3 hr ago", "4 days ago". */
|
|
@@ -466,6 +467,23 @@ function createHelpers(t = {}) {
|
|
|
466
467
|
t: translator(t.translations, locale)
|
|
467
468
|
};
|
|
468
469
|
}
|
|
470
|
+
var DATE_KEYS = [
|
|
471
|
+
"weekday",
|
|
472
|
+
"era",
|
|
473
|
+
"year",
|
|
474
|
+
"month",
|
|
475
|
+
"day",
|
|
476
|
+
"hour",
|
|
477
|
+
"minute",
|
|
478
|
+
"second",
|
|
479
|
+
"hour12",
|
|
480
|
+
"timeZoneName"
|
|
481
|
+
];
|
|
482
|
+
function pickDateOptions(o) {
|
|
483
|
+
const out = {};
|
|
484
|
+
for (const k of DATE_KEYS) if (Object.hasOwn(o, k)) out[k] = o[k];
|
|
485
|
+
return out;
|
|
486
|
+
}
|
|
469
487
|
|
|
470
488
|
// src/core/expr/references.ts
|
|
471
489
|
var ROOTS = ["datasources", "panels", "filters", "state", "modal", "context", "event", "drill", "panel"];
|
|
@@ -1808,7 +1826,7 @@ function migrateDocument(input, widgets = []) {
|
|
|
1808
1826
|
import { z as z10 } from "zod";
|
|
1809
1827
|
|
|
1810
1828
|
// src/version.ts
|
|
1811
|
-
var RENDERER_VERSION = "0.1.
|
|
1829
|
+
var RENDERER_VERSION = "0.1.11";
|
|
1812
1830
|
var parse2 = (v) => {
|
|
1813
1831
|
const m = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:[-+].*)?$/.exec(v.trim());
|
|
1814
1832
|
return m ? [Number(m[1]), Number(m[2] ?? 0), Number(m[3] ?? 0)] : void 0;
|
|
@@ -2924,7 +2942,11 @@ var schema = z25.object({
|
|
|
2924
2942
|
mode: z25.enum(["client", "server"]).default("client"),
|
|
2925
2943
|
pageSize: z25.number().int().min(1).max(500).default(20),
|
|
2926
2944
|
pageSizes: z25.array(z25.number().int().min(1)).default([10, 20, 50, 100]),
|
|
2927
|
-
totalPath: z25.string().optional()
|
|
2945
|
+
totalPath: z25.string().optional(),
|
|
2946
|
+
/** "pages" (default): numbered pages. "simple": "Showing 1–25 of 223 rows", Previous, "Page 1 of 9", Next. */
|
|
2947
|
+
layout: z25.enum(["pages", "simple"]).default("pages"),
|
|
2948
|
+
/** Show the rows-per-page picker. */
|
|
2949
|
+
sizes: z25.boolean().default(true)
|
|
2928
2950
|
}).strict().optional(),
|
|
2929
2951
|
/** A search box. "server": writes `ui.search` (debounced) for the datasource; "client": matches row text. */
|
|
2930
2952
|
search: z25.union([
|
|
@@ -2973,6 +2995,8 @@ var TilesContract = {
|
|
|
2973
2995
|
value: z26.string(),
|
|
2974
2996
|
/** Small text under the number: plain ("heats") or per row ("of ${row.total} pending"). */
|
|
2975
2997
|
caption: z26.string().optional(),
|
|
2998
|
+
/** Put the caption on the number's line, right after it ("12 passed"). */
|
|
2999
|
+
captionInline: z26.boolean().default(false),
|
|
2976
3000
|
/** Optional status dot per tile. */
|
|
2977
3001
|
status: z26.string().optional(),
|
|
2978
3002
|
statusMap: ToneMap.optional(),
|
|
@@ -3447,4 +3471,4 @@ export {
|
|
|
3447
3471
|
RepeaterContract,
|
|
3448
3472
|
builtInWidgetChecks
|
|
3449
3473
|
};
|
|
3450
|
-
//# sourceMappingURL=chunk-
|
|
3474
|
+
//# sourceMappingURL=chunk-RSIUW5J4.js.map
|