@devicechain/widgets 1.5.0 → 1.6.0
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 +14 -1
- package/dist/access-strings.d.ts +1 -1
- package/dist/aggregate-strings.d.ts +3 -1
- package/dist/alarm-strings.d.ts +4 -1
- package/dist/chunks/{aggregate-feed-HCF5FYIJ.js → aggregate-feed-QJRO7Y4V.js} +7 -4
- package/dist/chunks/aggregate-feed-QJRO7Y4V.js.map +7 -0
- package/dist/chunks/{aggregate-widgets-IFZUFYXV.js → aggregate-widgets-SHPHUHNL.js} +39 -62
- package/dist/chunks/aggregate-widgets-SHPHUHNL.js.map +7 -0
- package/dist/chunks/{alarm-widgets-TTQYBKMZ.js → alarm-widgets-DQEITFVN.js} +2 -2
- package/dist/chunks/alarm-widgets-DQEITFVN.js.map +7 -0
- package/dist/chunks/{chunk-FM7OI5TQ.js → chunk-2GMBZTQD.js} +44 -5
- package/dist/chunks/chunk-2GMBZTQD.js.map +7 -0
- package/dist/chunks/{chunk-AF4M5OXQ.js → chunk-4BEFYYM3.js} +3 -3
- package/dist/chunks/chunk-5UDZ5R5F.js +60 -0
- package/dist/chunks/chunk-5UDZ5R5F.js.map +7 -0
- package/dist/chunks/{chunk-VTGKDO44.js → chunk-7TEFJ64H.js} +19 -5
- package/dist/chunks/chunk-7TEFJ64H.js.map +7 -0
- package/dist/chunks/{chunk-GUCEPNGM.js → chunk-EFTUK5YX.js} +1 -1
- package/dist/chunks/chunk-EFTUK5YX.js.map +7 -0
- package/dist/chunks/{chunk-EQOWBDS7.js → chunk-G5UBMPMX.js} +2 -2
- package/dist/chunks/{chunk-EQOWBDS7.js.map → chunk-G5UBMPMX.js.map} +2 -2
- package/dist/chunks/{chunk-RG2AYYKO.js → chunk-GWH5AHG3.js} +6 -4
- package/dist/chunks/chunk-GWH5AHG3.js.map +7 -0
- package/dist/chunks/{chunk-XJ7UF2CP.js → chunk-O763YMOG.js} +1 -1
- package/dist/chunks/chunk-O763YMOG.js.map +7 -0
- package/dist/chunks/{chunk-ZX4K3GT5.js → chunk-R2XEYQEJ.js} +45 -24
- package/dist/chunks/chunk-R2XEYQEJ.js.map +7 -0
- package/dist/chunks/{chunk-JVC6JYUR.js → chunk-RLVZXNPJ.js} +1 -1
- package/dist/chunks/{chunk-JVC6JYUR.js.map → chunk-RLVZXNPJ.js.map} +1 -1
- package/dist/chunks/{chunk-QHTO5ZEM.js → chunk-UDQVBVXJ.js} +1 -1
- package/dist/chunks/chunk-UDQVBVXJ.js.map +7 -0
- package/dist/chunks/chunk-UVLEBGAC.js +17 -0
- package/dist/chunks/chunk-UVLEBGAC.js.map +7 -0
- package/dist/chunks/chunk-VR6643C7.js +119 -0
- package/dist/chunks/chunk-VR6643C7.js.map +7 -0
- package/dist/chunks/{chunk-ZR74ORIT.js → chunk-XDHKONWK.js} +1 -1
- package/dist/chunks/chunk-XDHKONWK.js.map +7 -0
- package/dist/chunks/{chunk-3FSXS67N.js → chunk-ZKR5WDF5.js} +68 -18
- package/dist/chunks/chunk-ZKR5WDF5.js.map +7 -0
- package/dist/chunks/{compare-feed-MLHG7YFN.js → compare-feed-K46QVE5D.js} +28 -16
- package/dist/chunks/compare-feed-K46QVE5D.js.map +7 -0
- package/dist/chunks/{control-widgets-KTH6BWMH.js → control-widgets-VMWBTRC6.js} +70 -34
- package/dist/chunks/control-widgets-VMWBTRC6.js.map +7 -0
- package/dist/chunks/entity-selector-IRUFUDQ6.js +7 -0
- package/dist/chunks/{event-markers-feed-BQO4T367.js → event-markers-feed-TOAQ53YC.js} +29 -11
- package/dist/chunks/event-markers-feed-TOAQ53YC.js.map +7 -0
- package/dist/chunks/{export-rows-OEWIBIUY.js → export-rows-XKIVLOM3.js} +3 -3
- package/dist/chunks/{fleet-feed-AKJ7QIMP.js → fleet-feed-AYNL3CC2.js} +6 -6
- package/dist/chunks/{history-widgets-7GNKTE5X.js → history-widgets-WJ4KRTG7.js} +55 -20
- package/dist/chunks/history-widgets-WJ4KRTG7.js.map +7 -0
- package/dist/chunks/{level-widgets-DKCQT2XF.js → level-widgets-3SRESJYW.js} +46 -14
- package/dist/chunks/level-widgets-3SRESJYW.js.map +7 -0
- package/dist/chunks/{natural-earth-data-VMKQ6LY3.js → natural-earth-data-R7NPQARR.js} +1 -1
- package/dist/chunks/natural-earth-data-R7NPQARR.js.map +7 -0
- package/dist/chunks/{no-reading-B4MPXAS2.js → no-reading-CTQCMNYA.js} +4 -4
- package/dist/chunks/{presence-widgets-7OGANOLB.js → presence-widgets-P2H3A2SD.js} +34 -16
- package/dist/chunks/presence-widgets-P2H3A2SD.js.map +7 -0
- package/dist/chunks/table-HAKFOUMS.js +8 -0
- package/dist/command-control-strings.d.ts +1 -1
- package/dist/compare-strings.d.ts +1 -1
- package/dist/event-markers-strings.d.ts +1 -1
- package/dist/fleet-strings.d.ts +1 -1
- package/dist/history-strings.d.ts +1 -1
- package/dist/host-context.js +1 -1
- package/dist/index.d.ts +112 -4
- package/dist/index.js +338 -131
- package/dist/index.js.map +4 -4
- package/dist/level-strings.d.ts +1 -1
- package/dist/presence-strings.d.ts +1 -1
- package/dist/registry.d.ts +2 -0
- package/dist/scada-strings.d.ts +1 -1
- package/dist/selection-strings.d.ts +10 -0
- package/dist/shared-strings.d.ts +38 -0
- package/dist/state-timeline-strings.d.ts +1 -1
- package/dist/status-grid-strings.d.ts +1 -1
- package/dist/table-strings.d.ts +1 -1
- package/dist/time-range-bar.d.ts +1 -2
- package/dist/time-range-strings.d.ts +8 -0
- package/dist/vite.js.map +1 -1
- package/dist/widgets/command-status.d.ts +1 -0
- package/dist/widgets/map-geometry.d.ts +2 -0
- package/package.json +8 -8
- package/dist/chunks/aggregate-feed-HCF5FYIJ.js.map +0 -7
- package/dist/chunks/aggregate-widgets-IFZUFYXV.js.map +0 -7
- package/dist/chunks/alarm-widgets-TTQYBKMZ.js.map +0 -7
- package/dist/chunks/chunk-3FSXS67N.js.map +0 -7
- package/dist/chunks/chunk-BRH66T5F.js +0 -15
- package/dist/chunks/chunk-BRH66T5F.js.map +0 -7
- package/dist/chunks/chunk-FM7OI5TQ.js.map +0 -7
- package/dist/chunks/chunk-GUCEPNGM.js.map +0 -7
- package/dist/chunks/chunk-QHTO5ZEM.js.map +0 -7
- package/dist/chunks/chunk-QMGKB6J3.js +0 -84
- package/dist/chunks/chunk-QMGKB6J3.js.map +0 -7
- package/dist/chunks/chunk-RG2AYYKO.js.map +0 -7
- package/dist/chunks/chunk-VTGKDO44.js.map +0 -7
- package/dist/chunks/chunk-XJ7UF2CP.js.map +0 -7
- package/dist/chunks/chunk-ZR74ORIT.js.map +0 -7
- package/dist/chunks/chunk-ZX4K3GT5.js.map +0 -7
- package/dist/chunks/compare-feed-MLHG7YFN.js.map +0 -7
- package/dist/chunks/control-widgets-KTH6BWMH.js.map +0 -7
- package/dist/chunks/entity-selector-3JJFI4DT.js +0 -7
- package/dist/chunks/event-markers-feed-BQO4T367.js.map +0 -7
- package/dist/chunks/history-widgets-7GNKTE5X.js.map +0 -7
- package/dist/chunks/level-widgets-DKCQT2XF.js.map +0 -7
- package/dist/chunks/natural-earth-data-VMKQ6LY3.js.map +0 -7
- package/dist/chunks/presence-widgets-7OGANOLB.js.map +0 -7
- package/dist/chunks/table-2UGM2Q4H.js +0 -8
- /package/dist/chunks/{chunk-AF4M5OXQ.js.map → chunk-4BEFYYM3.js.map} +0 -0
- /package/dist/chunks/{entity-selector-3JJFI4DT.js.map → entity-selector-IRUFUDQ6.js.map} +0 -0
- /package/dist/chunks/{export-rows-OEWIBIUY.js.map → export-rows-XKIVLOM3.js.map} +0 -0
- /package/dist/chunks/{fleet-feed-AKJ7QIMP.js.map → fleet-feed-AYNL3CC2.js.map} +0 -0
- /package/dist/chunks/{no-reading-B4MPXAS2.js.map → no-reading-CTQCMNYA.js.map} +0 -0
- /package/dist/chunks/{table-2UGM2Q4H.js.map → table-HAKFOUMS.js.map} +0 -0
package/dist/level-strings.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export interface LevelStrings {
|
|
|
9
9
|
off: string;
|
|
10
10
|
cardinals: readonly [string, string, string, string];
|
|
11
11
|
}
|
|
12
|
-
export declare const LEVEL_STRINGS: Record<'en' | 'es', LevelStrings>;
|
|
12
|
+
export declare const LEVEL_STRINGS: Record<'en' | 'es' | 'zh-CN', LevelStrings>;
|
|
13
13
|
export declare function levelStrings(locale?: string | undefined): LevelStrings;
|
|
@@ -15,5 +15,5 @@ export interface PresenceStrings {
|
|
|
15
15
|
noStatusYet: (n: number) => string;
|
|
16
16
|
chartLabel: (online: number, offline: number, unknown: number) => string;
|
|
17
17
|
}
|
|
18
|
-
export declare const PRESENCE_STRINGS: Record<'en' | 'es', PresenceStrings>;
|
|
18
|
+
export declare const PRESENCE_STRINGS: Record<'en' | 'es' | 'zh-CN', PresenceStrings>;
|
|
19
19
|
export declare function presenceStrings(locale?: string | undefined): PresenceStrings;
|
package/dist/registry.d.ts
CHANGED
|
@@ -2,9 +2,11 @@ import type { BuiltinWidgetId, WidgetChannel } from '@devicechain/dashboards';
|
|
|
2
2
|
import { builtinWidgetDescriptors } from './builtin-descriptors';
|
|
3
3
|
export type { WidgetChannel };
|
|
4
4
|
type Descriptors = typeof builtinWidgetDescriptors;
|
|
5
|
+
/** @deprecated Use builtinWidgetDescriptors[id].channel instead. */
|
|
5
6
|
export declare const WIDGET_CHANNEL: {
|
|
6
7
|
readonly [K in BuiltinWidgetId]: Descriptors[K]['channel'];
|
|
7
8
|
};
|
|
9
|
+
/** @deprecated Use builtinWidgetDescriptors[id].datasource.mode !== 'none' instead. */
|
|
8
10
|
export declare const WIDGET_BINDS_DATASOURCE: {
|
|
9
11
|
readonly [K in BuiltinWidgetId]: boolean;
|
|
10
12
|
};
|
package/dist/scada-strings.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export interface ScadaStrings {
|
|
|
6
6
|
reverse: string;
|
|
7
7
|
label: (symbol: string, state: string) => string;
|
|
8
8
|
}
|
|
9
|
-
export declare const SCADA_STRINGS: Record<'en' | 'es', ScadaStrings>;
|
|
9
|
+
export declare const SCADA_STRINGS: Record<'en' | 'es' | 'zh-CN', ScadaStrings>;
|
|
10
10
|
export declare function scadaStrings(locale?: string | undefined): ScadaStrings;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function selectionStrings(locale?: string | undefined): {
|
|
2
|
+
selectionUnavailable: string;
|
|
3
|
+
noTarget: string;
|
|
4
|
+
liveSelection: string;
|
|
5
|
+
selectTarget: (target: string) => string;
|
|
6
|
+
loading: string;
|
|
7
|
+
noOptions: string;
|
|
8
|
+
select: string;
|
|
9
|
+
optionsFailed: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { UnresolvedWidgetReason } from '@devicechain/dashboards';
|
|
2
|
+
export declare function sharedStrings(locale?: string | undefined): {
|
|
3
|
+
renderFailed: string;
|
|
4
|
+
reset: string;
|
|
5
|
+
dismiss: string;
|
|
6
|
+
newerViewer: string;
|
|
7
|
+
cannotShow: string;
|
|
8
|
+
widgetType: (type: string) => string;
|
|
9
|
+
deviceUnavailable: string;
|
|
10
|
+
deviceGone: string;
|
|
11
|
+
notForCustomers: string;
|
|
12
|
+
customerBinding: string;
|
|
13
|
+
dataUnavailable: string;
|
|
14
|
+
loading: string;
|
|
15
|
+
noImage: string;
|
|
16
|
+
naturalEarth: string;
|
|
17
|
+
locationDenied: string;
|
|
18
|
+
locationPermission: string;
|
|
19
|
+
noMapRuntime: string;
|
|
20
|
+
mapRuntimeHint: string;
|
|
21
|
+
noDevices: string;
|
|
22
|
+
noPositions: string;
|
|
23
|
+
bindLocation: string;
|
|
24
|
+
positionsEmpty: string;
|
|
25
|
+
mapUnavailable: string;
|
|
26
|
+
now: string;
|
|
27
|
+
currentState: string;
|
|
28
|
+
undeclared: (capability: string) => string;
|
|
29
|
+
versions: (authored: number, installed: number) => string;
|
|
30
|
+
unresolved: {
|
|
31
|
+
unregistered: string;
|
|
32
|
+
unversioned: string;
|
|
33
|
+
'invalid-metadata': string;
|
|
34
|
+
'options-version': string;
|
|
35
|
+
'sdk-incompatible': string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare function unresolvedWidgetDetail(reason: UnresolvedWidgetReason, locale?: string | undefined): string;
|
|
@@ -13,5 +13,5 @@ export interface StateTimelineStrings {
|
|
|
13
13
|
basisTitle: (bucket: string) => string;
|
|
14
14
|
segment: (state: string, from: string, to: string) => string;
|
|
15
15
|
}
|
|
16
|
-
export declare const STATE_TIMELINE_STRINGS: Record<'en' | 'es', StateTimelineStrings>;
|
|
16
|
+
export declare const STATE_TIMELINE_STRINGS: Record<'en' | 'es' | 'zh-CN', StateTimelineStrings>;
|
|
17
17
|
export declare function stateTimelineStrings(): StateTimelineStrings;
|
|
@@ -5,5 +5,5 @@ export interface StatusGridStrings {
|
|
|
5
5
|
levels: Record<string, string>;
|
|
6
6
|
tile: (device: string, reading: string, group: string) => string;
|
|
7
7
|
}
|
|
8
|
-
export declare const STATUS_GRID_STRINGS: Record<'en' | 'es', StatusGridStrings>;
|
|
8
|
+
export declare const STATUS_GRID_STRINGS: Record<'en' | 'es' | 'zh-CN', StatusGridStrings>;
|
|
9
9
|
export declare function statusGridStrings(locale?: string | undefined): StatusGridStrings;
|
package/dist/table-strings.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export interface TableStrings {
|
|
|
3
3
|
value: string;
|
|
4
4
|
time: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const TABLE_STRINGS: Record<'en' | 'es', TableStrings>;
|
|
6
|
+
export declare const TABLE_STRINGS: Record<'en' | 'es' | 'zh-CN', TableStrings>;
|
|
7
7
|
export declare function tableStrings(locale?: string | undefined): TableStrings;
|
package/dist/time-range-bar.d.ts
CHANGED
|
@@ -31,8 +31,7 @@ export interface TimeRangeLabels {
|
|
|
31
31
|
actionsLive: string;
|
|
32
32
|
absolute?: Partial<AbsoluteLabels>;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
35
|
-
export declare const DEFAULT_TIME_RANGE_LABELS: TimeRangeLabels;
|
|
34
|
+
export { DEFAULT_ABSOLUTE_LABELS, DEFAULT_TIME_RANGE_LABELS } from './time-range-strings';
|
|
36
35
|
export declare function rejectedLinkNote(rejected: AbsoluteLinkRejection, labels?: TimeRangeLabels): string;
|
|
37
36
|
export declare function PausedIndicator({ pausedAt, labels, }: {
|
|
38
37
|
pausedAt: number | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AbsoluteLabels, TimeRangeLabels } from './time-range-bar';
|
|
2
|
+
export declare const DEFAULT_ABSOLUTE_LABELS: AbsoluteLabels;
|
|
3
|
+
export declare const DEFAULT_TIME_RANGE_LABELS: TimeRangeLabels;
|
|
4
|
+
type CompleteLabels = TimeRangeLabels & {
|
|
5
|
+
absolute: AbsoluteLabels;
|
|
6
|
+
};
|
|
7
|
+
export declare function timeRangeStrings(locale?: string | undefined): CompleteLabels;
|
|
8
|
+
export {};
|
package/dist/vite.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/vite.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// `@devicechain/widgets/vite`
|
|
4
|
+
"sourcesContent": ["// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// `@devicechain/widgets/vite` — the ready-made map runtime for hosts built with Vite.\n//\n// 🔴 THIS IS THE ONE FILE IN THIS PACKAGE ALLOWED TO WRITE A BUNDLER'S DIALECT, and the\n// exception is deliberate, bounded, and enforced rather than promised. The main entry\n// (`@devicechain/widgets`) contains no bundler-specific specifier at all — that is what\n// lets a webpack, Next or Rollup consumer build it — and the dialect gate proves it by\n// building the two entries SEPARATELY: zero dialect specifiers reachable from `index.ts`,\n// exactly one from here. So the carve-out cannot quietly widen, and it cannot leak into\n// the portable entry, because a consumer only ever gets this module by importing it BY\n// NAME.\n//\n// 🔴 WHY THE EXCEPTION IS WORTH IT. Without it every Vite consumer — which today means\n// every likely consumer, including this repo's own console and /dash — must learn that\n// MapLibre needs a worker URL, learn their bundler's idiom for emitting one, and write it\n// correctly, to render a map. That is a lot of ceremony to hand someone who asked for a map\n// widget, and getting it wrong has a famously quiet failure mode. Simplicity for the\n// consumer is worth one carefully fenced file.\n//\n// VERIFIED, not assumed: a package inside `node_modules` writing `?worker&url` is resolved\n// correctly by a CONSUMER's Vite — tested outside this monorepo against Vite 6.4.3 and\n// 8.2.2, with the worker emitted as its own entry and its `maplibre-gl-shared.mjs` sibling\n// INLINED into it. That last part is why `?worker&url` and not plain `?url`: the plain form\n// copies one file verbatim and leaves the sibling dangling.\n\nimport type { MapRuntime } from './map-runtime-context';\n\n// `?worker&url` makes Vite treat the module as a worker ENTRY — bundling what it imports\n// along with it — and hand back the emitted, hashed URL.\nimport workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url';\n\n/**\n * A complete `MapRuntime` for a Vite host.\n *\n * ```tsx\n * import { MapRuntimeProvider } from '@devicechain/widgets';\n * import { viteMapRuntime } from '@devicechain/widgets/vite';\n *\n * <MapRuntimeProvider runtime={viteMapRuntime}>{children}</MapRuntimeProvider>\n * ```\n *\n * A module constant, so it is referentially stable for the life of the page.\n *\n * `loadStyles` keeps MapLibre's 83 KB stylesheet (10.7 KB gzipped) on the renderer's lazy\n * chunk, so a viewer who opens no map downloads none of it. Import the stylesheet yourself\n * instead if you would rather have it eagerly — the field is optional and this is only the\n * default that costs a first-time user nothing to accept.\n */\nexport const viteMapRuntime: MapRuntime = {\n workerUrl,\n loadStyles: () => import('maplibre-gl/dist/maplibre-gl.css'),\n};\n"],
|
|
5
5
|
"mappings": ";AA+BA,OAAO,eAAe;AAmBf,IAAM,iBAA6B;AAAA,EACxC;AAAA,EACA,YAAY,MAAM,OAAO,kCAAkC;AAC7D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function commandStatusColor(status: string): string;
|
|
2
|
+
/** @deprecated Use isTerminalCommandStatus from `@devicechain/dashboards` instead. */
|
|
2
3
|
export declare function isTerminalStatus(status: string): boolean;
|
|
3
4
|
export declare function commandStatusLabel(status: string): string;
|
|
4
5
|
/** commandStatusLabel for an explicit locale (module-internal; not part of the package API). */
|
|
@@ -14,4 +14,6 @@ export declare function describePosition(sample: PlaceableLocation): string;
|
|
|
14
14
|
export declare function rasterStyleFor(tileUrl: string, attribution: string | undefined): unknown;
|
|
15
15
|
export declare const BUNDLED_BASEMAP_ATTRIBUTION = "Made with Natural Earth";
|
|
16
16
|
export declare function landStyleFrom(land: unknown, boundaries: unknown): unknown;
|
|
17
|
+
export declare function landStyleFrom(land: unknown, boundaries: unknown, attribution: string | undefined): unknown;
|
|
17
18
|
export declare function loadLandStyle(): Promise<unknown>;
|
|
19
|
+
export declare function loadLandStyle(attribution: string | undefined): Promise<unknown>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devicechain/widgets",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "DeviceChain
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "DeviceChain dashboard widgets and React renderer across measurement, aggregate, static, alarm, control, selection and location channels. Built on @devicechain/widget-sdk, themed with CSS custom properties, with lazy chart and map loading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devicechain",
|
|
7
7
|
"iot",
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
"test": "vitest run"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@devicechain/client": "1.
|
|
62
|
-
"@devicechain/dashboards": "1.
|
|
63
|
-
"@devicechain/widget-sdk": "1.
|
|
61
|
+
"@devicechain/client": "1.6.0",
|
|
62
|
+
"@devicechain/dashboards": "1.6.0",
|
|
63
|
+
"@devicechain/widget-sdk": "1.6.0",
|
|
64
64
|
"echarts": "^6.0.0",
|
|
65
65
|
"maplibre-gl": "^6.13.0",
|
|
66
66
|
"react": "^19.3.0",
|
|
67
67
|
"react-dom": "^19.3.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@devicechain/client": "1.
|
|
71
|
-
"@devicechain/dashboards": "1.
|
|
72
|
-
"@devicechain/widget-sdk": "1.
|
|
70
|
+
"@devicechain/client": "1.6.0",
|
|
71
|
+
"@devicechain/dashboards": "1.6.0",
|
|
72
|
+
"@devicechain/widget-sdk": "1.6.0",
|
|
73
73
|
"@testing-library/react": "^16.3.3",
|
|
74
74
|
"@types/node": "^26.6.6",
|
|
75
75
|
"@types/react": "^19.3.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/aggregate-feed.tsx", "../../src/aggregate-fold.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// The data feed of an aggregate widget: the exact aggregates of its measurements over its span,\n// plus the newest live reading of each. Loaded on first use (connected-widget.tsx imports it\n// dynamically), so a board with no aggregate widget never downloads it.\n//\n// The aggregates are folded from the source's own buckets (WidgetDataSource.bucketMeasurements: each\n// carries the exact count, min, max and sum), never from the chart seed: a seed is a series of bucket\n// AVERAGES, and a minimum or maximum cannot be recovered from those. A source that produces no\n// buckets is an explained state, not a guess.\n//\n// - the span is the widget's pinned one, else the board's (DEFAULT_TIME_RANGE_SECONDS off a board);\n// - the window is whole minutes (aggregateWindow), so it holds no reading from before the span;\n// - live, the read ends at the last minute and repeats on the boundaries of aggregateRefreshMs\n// (one chart bucket of the span: a minute for an hour, 42 minutes for a week), so every card on\n// the board reads at the same moment and the hub serves identical reads once; paused, it ends\n// at the freeze instant and is read once, so the number on screen does not move;\n// - a card with `sparkline` set reads the SAME window in the span's chart buckets\n// (bucketSecondsFor) instead of one, and keeps each bucket as a trend point; the figure is\n// folded from those buckets and is the same number either way;\n// - a hidden tab does not read; it reads once when it is shown again;\n// - a live feed that resumes after an interruption reads again at once, so the figures take in\n// the readings sent during the outage (and a read that failed during it stops saying so) without\n// waiting for the next refresh, which on a week's span is 42 minutes away;\n// - a read for a different selector, span or freeze instant is not shown under the new one: a\n// result is tagged with the key it was read for, and a mismatch reads as loading;\n// - a card showing the latest reading ('last') is also handed the newest stored bucket by the board\n// (initialSamples), a minute's mean standing in until a live reading arrives and never over one.\n\nimport {\n bucketSecondsFor,\n DEFAULT_TIME_RANGE_SECONDS,\n type AggregateResult,\n type AggregateStreamState,\n type MeasurementSample,\n type WidgetActions,\n type WidgetDataSource,\n type WidgetDescriptor,\n type WidgetInstance,\n} from '@devicechain/dashboards';\nimport { optBoolean, useMeasurementStream, useWidgetTimeRange } from '@devicechain/widget-sdk';\nimport { useEffect, useMemo, useReducer, useState, type ComponentType } from 'react';\n\nimport { aggregateBuckets, aggregateRefreshMs, aggregateSeries, aggregateWindow } from './aggregate-fold';\nimport { measurementSpan } from './binding-policy';\n\nconst LOADING: AggregateResult = { status: 'loading' };\n\nexport interface AggregateFeedProps {\n hub: WidgetDataSource;\n widget: WidgetInstance;\n descriptor: WidgetDescriptor;\n // The widget's component, and the host's pane for a stream that failed (before any figure).\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Component: ComponentType<any>;\n actions: WidgetActions | undefined;\n // The stored latest reading of a card that shows it (see seedKey in dashboard-renderer.tsx).\n initialSamples?: MeasurementSample[];\n initialSamplesAsOf?: number;\n onReconnect?: () => void;\n ErrorFrame: ComponentType<{ widget: WidgetInstance; error: unknown }>;\n}\n\nexport default function AggregateFeed({ hub, widget, descriptor, Component, actions, ErrorFrame, initialSamples, initialSamplesAsOf, onReconnect }: AggregateFeedProps) {\n const range = useWidgetTimeRange();\n const now = useMemo(() => (hub.now ? () => hub.now!() : Date.now), [hub]);\n const spanSeconds = measurementSpan(descriptor, widget, range?.spanSeconds) ?? DEFAULT_TIME_RANGE_SECONDS;\n const pausedAt = range?.paused ? range.pausedAt : undefined;\n const ds = widget.datasource;\n\n // The newest live reading per measurement. It holds one sample: only `latest` is read, and the\n // pause keeps it from moving.\n const [resumes, resumed] = useReducer((n: number) => n + 1, 0);\n const stream = useMeasurementStream(hub, ds, {\n window: 1,\n pausedAt,\n now,\n initialSamples,\n initialSamplesAsOf,\n onReconnect: () => {\n resumed();\n onReconnect?.();\n },\n });\n\n const trend = optBoolean(widget.options, 'sparkline');\n const key = JSON.stringify([ds ?? null, spanSeconds, pausedAt ?? null, trend]);\n const supported = hub.bucketMeasurements !== undefined;\n const [tagged, setTagged] = useState<{ key: string; result: AggregateResult }>({ key, result: LOADING });\n\n useEffect(() => {\n if (!supported || !ds) return;\n let current = true;\n // Reads overlap (a boundary, a tab shown, a reconnect); only the NEWEST one's outcome is applied.\n let latest = 0;\n const run = (): void => {\n const mine = ++latest;\n const { window, spanSeconds: covered } = aggregateWindow(spanSeconds, pausedAt ?? now(), trend ? bucketSecondsFor(spanSeconds) : undefined);\n // Folded inside the chain, so a bucket that cannot be trusted fails the read like a network error.\n hub.bucketMeasurements!(ds, window).then((buckets) => ({ byName: aggregateBuckets(buckets), buckets })).then(\n ({ byName, buckets }) => {\n if (!current || mine !== latest) return;\n const { startTime, endTime } = window;\n const series = trend ? { series: aggregateSeries(buckets) } : {};\n setTagged({ key, result: { status: 'ready', byName, ...series, startTime, endTime, spanSeconds: covered } });\n },\n (err: unknown) => {\n if (!current || mine !== latest) return;\n const message = err instanceof Error ? err.message : String(err);\n setTagged({ key, result: { status: 'unavailable', reason: 'failed', message } });\n },\n );\n };\n run();\n // Paused, the window is fixed at the freeze instant: nothing new can land in it.\n if (pausedAt !== undefined) return () => void (current = false);\n const hidden = () => document.hidden;\n const every = aggregateRefreshMs(spanSeconds);\n let timer: ReturnType<typeof setTimeout>;\n const schedule = (): void => {\n timer = setTimeout(\n () => {\n if (!hidden()) run();\n schedule();\n },\n every - (now() % every),\n );\n };\n schedule();\n const shown = (): void => {\n if (!hidden()) run();\n };\n document.addEventListener('visibilitychange', shown);\n return () => {\n current = false;\n clearTimeout(timer);\n document.removeEventListener('visibilitychange', shown);\n };\n // `ds` is read through `key` (value identity), not by reference.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hub, supported, key, resumes]);\n\n let aggregates: AggregateResult;\n if (!supported) aggregates = { status: 'unavailable', reason: 'unsupported' };\n else if (!ds) aggregates = { status: 'ready', byName: {}, startTime: '', endTime: '', spanSeconds };\n else aggregates = tagged.key === key ? tagged.result : LOADING;\n\n const data: AggregateStreamState = { aggregates, latest: stream.latest, error: stream.error };\n return data.error ? <ErrorFrame widget={widget} error={data.error} /> : <Component widget={widget} data={data} actions={actions} />;\n}\n", "// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Aggregates over a span, folded from the backend's time buckets. Each bucket carries the exact\n// count, minimum, maximum and sum of the readings in it, so the span's aggregates are exact too:\n// the min of the mins, the max of the maxes, the sum of the sums, the count of the counts, and a\n// mean that is the total sum over the total count (which is the count-weighted mean of the\n// buckets' averages, without ever reading an average).\n//\n// \uD83D\uDD34 A MINIMUM OR MAXIMUM IS NEVER DERIVED FROM AVERAGES. A bucket's average hides its extremes, so\n// the \"max of the avgs\" is a plausible number that is not the maximum. A bucket that holds\n// readings but lacks a field the aggregate needs is therefore a loud failure here, never a\n// quiet substitution.\n\nimport {\n bucketSecondsFor,\n type AggregateTrendPoint,\n type HistoryWindow,\n type MeasurementAggregate,\n type MeasurementBucket,\n} from '@devicechain/dashboards';\n\nexport class AggregateFieldsError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AggregateFieldsError';\n }\n}\n\n// aggregateBuckets folds the buckets (any number of devices) into one aggregate per measurement\n// name. A name with no readings in any bucket is absent from the result, not zero.\nexport function aggregateBuckets(buckets: readonly MeasurementBucket[]): Record<string, MeasurementAggregate> {\n const out: Record<string, MeasurementAggregate> = {};\n for (const b of buckets) {\n if (typeof b.count !== 'number') {\n throw new AggregateFieldsError(`the bucket at ${b.bucketStart} for \"${b.name}\" carries no reading count`);\n }\n if (b.count === 0) continue;\n const { min, max, sum } = b;\n if (min == null || max == null || sum == null) {\n const missing = [min == null && 'min', max == null && 'max', sum == null && 'sum'].filter(Boolean);\n throw new AggregateFieldsError(\n `the bucket at ${b.bucketStart} for \"${b.name}\" holds ${b.count} readings but no ${missing.join(', ')}`,\n );\n }\n const a = out[b.name];\n if (!a) out[b.name] = { count: b.count, min, max, sum, avg: sum / b.count };\n else {\n a.count += b.count;\n a.sum += sum;\n a.min = Math.min(a.min, min);\n a.max = Math.max(a.max, max);\n a.avg = a.sum / a.count;\n }\n }\n return out;\n}\n\n// aggregateSeries lays the same buckets out as a trend: per measurement name, one point per bucket\n// that holds readings, oldest first. Buckets of several devices at one instant merge exactly as\n// aggregateBuckets merges them. Call it only on buckets aggregateBuckets accepted (it does not\n// re-validate), so a bucket that cannot be trusted has already failed the read.\nexport function aggregateSeries(buckets: readonly MeasurementBucket[]): Record<string, AggregateTrendPoint[]> {\n const byName = new Map<string, Map<string, AggregateTrendPoint>>();\n for (const b of buckets) {\n if (!b.count || b.min == null || b.max == null || b.sum == null) continue;\n let points = byName.get(b.name);\n if (!points) byName.set(b.name, (points = new Map()));\n const at = points.get(b.bucketStart);\n if (!at) {\n points.set(b.bucketStart, { bucketStart: b.bucketStart, count: b.count, min: b.min, max: b.max, sum: b.sum, avg: b.sum / b.count });\n } else {\n at.count += b.count;\n at.sum += b.sum;\n at.min = Math.min(at.min, b.min);\n at.max = Math.max(at.max, b.max);\n at.avg = at.sum / at.count;\n }\n }\n const out: Record<string, AggregateTrendPoint[]> = {};\n for (const [name, points] of byName) {\n out[name] = [...points.values()].sort((a, b) => Date.parse(a.bucketStart) - Date.parse(b.bucketStart));\n }\n return out;\n}\n\n// ---- The window a stat reads ------------------------------------------------------------------\n\nconst MINUTE_MS = 60_000;\n\n// aggregateRefreshMs is how often a live stat reads again: one bucket of the span's chart\n// (bucketSecondsFor), so never more often than once a minute. Finer is wasted -- the window it\n// reads moves in whole minutes (aggregateWindow) -- and a 7-day figure re-read every few seconds\n// costs the event store a scan of a week of summaries to move by a few seconds' readings.\nexport function aggregateRefreshMs(spanSeconds: number): number {\n return bucketSecondsFor(spanSeconds) * 1000;\n}\n\nexport interface AggregateWindow {\n window: HistoryWindow;\n // The length the window actually covers, in seconds: the span, or less when the span is not a\n // whole number of minutes. This, not the span asked for, is what the card says it covers.\n spanSeconds: number;\n}\n\n// aggregateWindow is the window a stat over `spanSeconds` reads at `at` (epoch ms): whole minutes,\n// ending at the last minute boundary at or before `at`.\n//\n// \uD83D\uDD34 Whole minutes because the event store answers from one-minute summaries, and a summary is\n// read whole: a window starting mid-minute would also count the readings from that minute's\n// start, BEFORE the span, so \"Maximum \u00B7 1h\" could be the maximum of an hour and a minute. Both\n// edges fall on minute boundaries instead, and the end is asked for as the instant just before\n// its boundary (the store's end is inclusive), so the summaries read are exactly the window's.\n// The start rounds UP, so a span that is not a whole number of minutes covers less, never more,\n// and says so (`spanSeconds`).\n//\n// Live cards read again on the boundaries of aggregateRefreshMs (a whole number of minutes), so\n// every card of one span ends its window on the same boundary: cards that read the same\n// measurement ask the same question at the same moment, and the hub answers them with one read.\n// One bucket wide: the card needs only the totals, so the store returns one or two rows per\n// measurement rather than a chart's worth.\n//\n// `bucketSeconds` asks for the window in finer buckets (a trend needs a point per bucket); the\n// totals fold identically from any number of buckets, so the figure is the same either way. Unset\n// the window is one bucket wide, as above.\nexport function aggregateWindow(spanSeconds: number, at: number, bucketSeconds?: number): AggregateWindow {\n const end = Math.floor(at / MINUTE_MS) * MINUTE_MS;\n const start = Math.ceil((end - spanSeconds * 1000) / MINUTE_MS) * MINUTE_MS;\n const covered = (end - start) / 1000;\n return {\n window: {\n startTime: new Date(start).toISOString(),\n endTime: new Date(end - 1).toISOString(),\n intervalSeconds: Math.max(60, bucketSeconds === undefined ? covered : Math.min(covered, bucketSeconds)),\n },\n spanSeconds: covered,\n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