@devicechain/widgets 1.1.0 → 1.2.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 +1 -1
- package/dist/builtin-descriptors.d.ts +236 -0
- package/dist/builtin-registry.d.ts +233 -0
- package/dist/chunks/{aggregate-widgets-EVJNAA26.js → aggregate-widgets-IFZUFYXV.js} +229 -2
- package/dist/chunks/{aggregate-widgets-EVJNAA26.js.map → aggregate-widgets-IFZUFYXV.js.map} +4 -4
- package/dist/chunks/{event-markers-feed-DMRW5GV5.js → event-markers-feed-BQO4T367.js} +14 -4
- package/dist/chunks/event-markers-feed-BQO4T367.js.map +7 -0
- package/dist/chunks/{history-widgets-DZBMNMEX.js → history-widgets-7GNKTE5X.js} +209 -2
- package/dist/chunks/{history-widgets-DZBMNMEX.js.map → history-widgets-7GNKTE5X.js.map} +4 -4
- package/dist/chunks/{level-widgets-HE6EDSWC.js → level-widgets-DKCQT2XF.js} +377 -36
- package/dist/chunks/{level-widgets-HE6EDSWC.js.map → level-widgets-DKCQT2XF.js.map} +4 -4
- package/dist/documented-descriptors.d.ts +737 -32
- package/dist/index.js +140 -6
- package/dist/index.js.map +2 -2
- package/dist/scada-model.d.ts +16 -0
- package/dist/scada-strings.d.ts +10 -0
- package/dist/scada-symbols.d.ts +14 -0
- package/dist/state-timeline-model.d.ts +19 -0
- package/dist/state-timeline-strings.d.ts +17 -0
- package/dist/status-grid-model.d.ts +19 -0
- package/dist/status-grid-strings.d.ts +9 -0
- package/dist/widgets/aggregate-lazy.d.ts +74 -0
- package/dist/widgets/aggregate-widgets.d.ts +1 -0
- package/dist/widgets/history-lazy.d.ts +53 -0
- package/dist/widgets/history-widgets.d.ts +1 -0
- package/dist/widgets/level-lazy.d.ts +109 -0
- package/dist/widgets/level-widgets.d.ts +1 -0
- package/dist/widgets/scada-symbol.d.ts +3 -0
- package/dist/widgets/state-timeline.d.ts +8 -0
- package/dist/widgets/status-grid.d.ts +2 -0
- package/package.json +7 -7
- package/dist/chunks/event-markers-feed-DMRW5GV5.js.map +0 -7
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Threshold } from '@devicechain/widget-sdk';
|
|
2
|
+
export declare const SCADA_SYMBOLS: readonly ['pump', 'valve', 'tank', 'motor', 'fan', 'pipe', 'sensor', 'breaker', 'light'];
|
|
3
|
+
export type ScadaSymbol = (typeof SCADA_SYMBOLS)[number];
|
|
4
|
+
export type ScadaState = 'unknown' | 'stopped' | 'running' | 'fault';
|
|
5
|
+
export declare function isScadaSymbol(v: unknown): v is ScadaSymbol;
|
|
6
|
+
export declare function isContinuous(symbol: ScadaSymbol): boolean;
|
|
7
|
+
export declare function isRotating(symbol: ScadaSymbol): boolean;
|
|
8
|
+
export declare const DEFAULT_ON_AT = 1;
|
|
9
|
+
export type FlowDirection = 'forward' | 'reverse' | 'none';
|
|
10
|
+
export interface ScadaReading {
|
|
11
|
+
state: ScadaState;
|
|
12
|
+
flow: FlowDirection;
|
|
13
|
+
}
|
|
14
|
+
export declare function isFaultBand(band: Threshold | undefined): boolean;
|
|
15
|
+
export declare function readSymbol(symbol: ScadaSymbol, value: number | undefined, onAt: number | undefined, band: Threshold | undefined): ScadaReading;
|
|
16
|
+
export type StateWords = Record<ScadaState, string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ScadaState, ScadaSymbol } from './scada-model';
|
|
2
|
+
export interface ScadaStrings {
|
|
3
|
+
symbols: Record<ScadaSymbol, string>;
|
|
4
|
+
states: Record<ScadaSymbol, Record<ScadaState, string>>;
|
|
5
|
+
forward: string;
|
|
6
|
+
reverse: string;
|
|
7
|
+
label: (symbol: string, state: string) => string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SCADA_STRINGS: Record<'en' | 'es', ScadaStrings>;
|
|
10
|
+
export declare function scadaStrings(locale?: string | undefined): ScadaStrings;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FlowDirection, ScadaState, ScadaSymbol } from './scada-model';
|
|
2
|
+
export interface SymbolPaint {
|
|
3
|
+
state: ScadaState;
|
|
4
|
+
accent: string;
|
|
5
|
+
flow: FlowDirection;
|
|
6
|
+
motion: boolean;
|
|
7
|
+
fill?: number;
|
|
8
|
+
horizontal?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function SymbolArt({ symbol, paint, label }: {
|
|
11
|
+
symbol: ScadaSymbol;
|
|
12
|
+
paint: SymbolPaint;
|
|
13
|
+
label: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Threshold } from '@devicechain/widget-sdk';
|
|
2
|
+
import type { HistoryWindow, MeasurementBucket } from '@devicechain/dashboards';
|
|
3
|
+
export type StateKey = number | 'none';
|
|
4
|
+
export interface Segment {
|
|
5
|
+
state: StateKey;
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
slots: number;
|
|
9
|
+
}
|
|
10
|
+
export interface Lane {
|
|
11
|
+
measurement: string;
|
|
12
|
+
segments: Segment[];
|
|
13
|
+
}
|
|
14
|
+
export declare const MAX_LANES = 12;
|
|
15
|
+
export declare function laneNames(authored: readonly string[], datasource: readonly string[], observed: Iterable<string>): string[];
|
|
16
|
+
export declare function stateOf(bands: readonly Threshold[], avg: number | null | undefined): StateKey;
|
|
17
|
+
export declare function buildLane(measurement: string, buckets: readonly MeasurementBucket[], window: Pick<HistoryWindow, 'startTime' | 'endTime' | 'intervalSeconds'>, bands: readonly Threshold[]): Lane;
|
|
18
|
+
export declare function statesUsed(lanes: readonly Lane[]): StateKey[];
|
|
19
|
+
export declare function shares(lane: Lane): Map<StateKey, number>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface StateTimelineStrings {
|
|
2
|
+
loading: string;
|
|
3
|
+
unbound: string;
|
|
4
|
+
forbidden: string;
|
|
5
|
+
unsupported: string;
|
|
6
|
+
failed: string;
|
|
7
|
+
empty: string;
|
|
8
|
+
baseline: string;
|
|
9
|
+
noData: string;
|
|
10
|
+
levels: Record<string, string>;
|
|
11
|
+
lane: (name: string, shares: string, runs: string) => string;
|
|
12
|
+
basis: (bucket: string) => string;
|
|
13
|
+
basisTitle: (bucket: string) => string;
|
|
14
|
+
segment: (state: string, from: string, to: string) => string;
|
|
15
|
+
}
|
|
16
|
+
export declare const STATE_TIMELINE_STRINGS: Record<'en' | 'es', StateTimelineStrings>;
|
|
17
|
+
export declare function stateTimelineStrings(): StateTimelineStrings;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type SeverityLevel, type Threshold } from '@devicechain/widget-sdk';
|
|
2
|
+
import { type Cell } from './fleet-model';
|
|
3
|
+
import type { FleetMember } from '@devicechain/dashboards';
|
|
4
|
+
export declare const MAX_TILES = 400;
|
|
5
|
+
export interface Tile {
|
|
6
|
+
token: string;
|
|
7
|
+
label: string;
|
|
8
|
+
cell: Cell;
|
|
9
|
+
band: Threshold | undefined;
|
|
10
|
+
group: SeverityLevel | 'ok' | 'none';
|
|
11
|
+
}
|
|
12
|
+
export declare function groupOf(cell: Cell, band: Threshold | undefined): Tile['group'];
|
|
13
|
+
export declare function buildTiles(members: readonly FleetMember[], measurement: string, bands: readonly Threshold[], worstFirst: boolean): Tile[];
|
|
14
|
+
export declare function tally(tiles: readonly Tile[]): {
|
|
15
|
+
group: Tile['group'];
|
|
16
|
+
count: number;
|
|
17
|
+
label?: string;
|
|
18
|
+
}[];
|
|
19
|
+
export declare function tileSide(count: number, width: number, height: number, min: number, max: number, gap: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface StatusGridStrings {
|
|
2
|
+
ok: string;
|
|
3
|
+
none: string;
|
|
4
|
+
chooseMeasurement: string;
|
|
5
|
+
levels: Record<string, string>;
|
|
6
|
+
tile: (device: string, reading: string, group: string) => string;
|
|
7
|
+
}
|
|
8
|
+
export declare const STATUS_GRID_STRINGS: Record<'en' | 'es', StatusGridStrings>;
|
|
9
|
+
export declare function statusGridStrings(locale?: string | undefined): StatusGridStrings;
|
|
@@ -338,3 +338,77 @@ export declare const fleetTableWidget: import("@devicechain/widget-sdk").WidgetD
|
|
|
338
338
|
readonly helpId: 'widgetHintWindowSeconds';
|
|
339
339
|
};
|
|
340
340
|
}>>;
|
|
341
|
+
export declare const statusGridWidget: import("@devicechain/widget-sdk").WidgetDefinition<"measurement", import("../builtin-descriptors").DocumentedSpecs<{
|
|
342
|
+
readonly title: {
|
|
343
|
+
readonly kind: 'string';
|
|
344
|
+
readonly labelId: 'widgetLabelTitle';
|
|
345
|
+
};
|
|
346
|
+
readonly measurement: {
|
|
347
|
+
readonly kind: 'string';
|
|
348
|
+
readonly labelId: 'widgetLabelMeasurement';
|
|
349
|
+
readonly helpId: 'widgetHintMeasurement';
|
|
350
|
+
};
|
|
351
|
+
readonly unit: {
|
|
352
|
+
readonly kind: 'string';
|
|
353
|
+
readonly labelId: 'widgetLabelUnit';
|
|
354
|
+
};
|
|
355
|
+
readonly precision: {
|
|
356
|
+
readonly kind: 'number';
|
|
357
|
+
readonly integer: true;
|
|
358
|
+
readonly min: 0;
|
|
359
|
+
readonly max: 100;
|
|
360
|
+
readonly labelId: 'widgetLabelPrecision';
|
|
361
|
+
readonly helpId: 'widgetHintPrecision';
|
|
362
|
+
};
|
|
363
|
+
readonly thresholds: {
|
|
364
|
+
readonly kind: 'list';
|
|
365
|
+
readonly maxItems: 12;
|
|
366
|
+
readonly labelId: 'widgetLabelThresholds';
|
|
367
|
+
readonly helpId: 'widgetHintThresholds';
|
|
368
|
+
readonly item: {
|
|
369
|
+
readonly value: {
|
|
370
|
+
readonly kind: 'number';
|
|
371
|
+
readonly required: true;
|
|
372
|
+
readonly labelId: 'widgetLabelThresholdValue';
|
|
373
|
+
};
|
|
374
|
+
readonly level: {
|
|
375
|
+
readonly kind: 'enum';
|
|
376
|
+
readonly required: true;
|
|
377
|
+
readonly values: readonly ["normal", "warning", "minor", "major", "critical"];
|
|
378
|
+
readonly labelId: 'widgetLabelThresholdLevel';
|
|
379
|
+
readonly valueLabelIds: {
|
|
380
|
+
readonly normal: 'widgetSeverityNormal';
|
|
381
|
+
readonly warning: 'widgetSeverityWarning';
|
|
382
|
+
readonly minor: 'widgetSeverityMinor';
|
|
383
|
+
readonly major: 'widgetSeverityMajor';
|
|
384
|
+
readonly critical: 'widgetSeverityCritical';
|
|
385
|
+
};
|
|
386
|
+
readonly placeholderId: 'widgetPlaceholderThresholdLevel';
|
|
387
|
+
};
|
|
388
|
+
readonly label: {
|
|
389
|
+
readonly kind: 'string';
|
|
390
|
+
readonly labelId: 'widgetLabelThresholdLabel';
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
readonly worstFirst: {
|
|
395
|
+
readonly kind: "boolean";
|
|
396
|
+
readonly labelId: "widgetLabelWorstFirst";
|
|
397
|
+
readonly helpId: "widgetHintWorstFirst";
|
|
398
|
+
};
|
|
399
|
+
readonly staleAfterSeconds: {
|
|
400
|
+
readonly kind: 'number';
|
|
401
|
+
readonly integer: true;
|
|
402
|
+
readonly min: 1;
|
|
403
|
+
readonly labelId: 'widgetLabelStaleAfter';
|
|
404
|
+
readonly helpId: 'widgetHintStaleAfter';
|
|
405
|
+
};
|
|
406
|
+
readonly windowSeconds: {
|
|
407
|
+
readonly kind: 'number';
|
|
408
|
+
readonly integer: true;
|
|
409
|
+
readonly min: 60;
|
|
410
|
+
readonly max: 604800;
|
|
411
|
+
readonly labelId: 'widgetLabelWindowSeconds';
|
|
412
|
+
readonly helpId: 'widgetHintWindowSeconds';
|
|
413
|
+
};
|
|
414
|
+
}>>;
|
|
@@ -68,3 +68,56 @@ export declare const historyTableWidget: import("@devicechain/widget-sdk").Widge
|
|
|
68
68
|
readonly helpId: 'widgetHintWindowSeconds';
|
|
69
69
|
};
|
|
70
70
|
}>>;
|
|
71
|
+
export declare const stateTimelineWidget: import("@devicechain/widget-sdk").WidgetDefinition<"measurement", import("../builtin-descriptors").DocumentedSpecs<{
|
|
72
|
+
readonly title: {
|
|
73
|
+
readonly kind: 'string';
|
|
74
|
+
readonly labelId: 'widgetLabelTitle';
|
|
75
|
+
};
|
|
76
|
+
readonly thresholds: {
|
|
77
|
+
readonly kind: 'list';
|
|
78
|
+
readonly maxItems: 12;
|
|
79
|
+
readonly labelId: 'widgetLabelThresholds';
|
|
80
|
+
readonly item: {
|
|
81
|
+
readonly value: {
|
|
82
|
+
readonly kind: 'number';
|
|
83
|
+
readonly required: true;
|
|
84
|
+
readonly labelId: 'widgetLabelThresholdValue';
|
|
85
|
+
};
|
|
86
|
+
readonly level: {
|
|
87
|
+
readonly kind: 'enum';
|
|
88
|
+
readonly required: true;
|
|
89
|
+
readonly values: readonly ["normal", "warning", "minor", "major", "critical"];
|
|
90
|
+
readonly labelId: 'widgetLabelThresholdLevel';
|
|
91
|
+
readonly valueLabelIds: {
|
|
92
|
+
readonly normal: 'widgetSeverityNormal';
|
|
93
|
+
readonly warning: 'widgetSeverityWarning';
|
|
94
|
+
readonly minor: 'widgetSeverityMinor';
|
|
95
|
+
readonly major: 'widgetSeverityMajor';
|
|
96
|
+
readonly critical: 'widgetSeverityCritical';
|
|
97
|
+
};
|
|
98
|
+
readonly placeholderId: 'widgetPlaceholderThresholdLevel';
|
|
99
|
+
};
|
|
100
|
+
readonly label: {
|
|
101
|
+
readonly kind: 'string';
|
|
102
|
+
readonly labelId: 'widgetLabelThresholdLabel';
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly required: true;
|
|
106
|
+
readonly helpId: "widgetHintStateThresholds";
|
|
107
|
+
};
|
|
108
|
+
readonly staleAfterSeconds: {
|
|
109
|
+
readonly kind: 'number';
|
|
110
|
+
readonly integer: true;
|
|
111
|
+
readonly min: 1;
|
|
112
|
+
readonly labelId: 'widgetLabelStaleAfter';
|
|
113
|
+
readonly helpId: 'widgetHintStaleAfter';
|
|
114
|
+
};
|
|
115
|
+
readonly windowSeconds: {
|
|
116
|
+
readonly kind: 'number';
|
|
117
|
+
readonly integer: true;
|
|
118
|
+
readonly min: 60;
|
|
119
|
+
readonly max: 604800;
|
|
120
|
+
readonly labelId: 'widgetLabelWindowSeconds';
|
|
121
|
+
readonly helpId: 'widgetHintWindowSeconds';
|
|
122
|
+
};
|
|
123
|
+
}>>;
|
|
@@ -563,3 +563,112 @@ export declare const progressRingWidget: import("@devicechain/widget-sdk").Widge
|
|
|
563
563
|
readonly helpId: 'widgetHintWindow';
|
|
564
564
|
};
|
|
565
565
|
}>>;
|
|
566
|
+
export declare const scadaSymbolWidget: import("@devicechain/widget-sdk").WidgetDefinition<"measurement", import("../builtin-descriptors").DocumentedSpecs<{
|
|
567
|
+
readonly title: {
|
|
568
|
+
readonly kind: 'string';
|
|
569
|
+
readonly labelId: 'widgetLabelTitle';
|
|
570
|
+
};
|
|
571
|
+
readonly measurement: {
|
|
572
|
+
readonly kind: 'string';
|
|
573
|
+
readonly labelId: 'widgetLabelMeasurement';
|
|
574
|
+
readonly helpId: 'widgetHintMeasurement';
|
|
575
|
+
};
|
|
576
|
+
readonly symbol: {
|
|
577
|
+
readonly kind: "enum";
|
|
578
|
+
readonly values: readonly ["pump", "valve", "tank", "motor", "fan", "pipe", "sensor", "breaker", "light"];
|
|
579
|
+
readonly labelId: "widgetLabelScadaSymbol";
|
|
580
|
+
readonly helpId: "widgetHintScadaSymbol";
|
|
581
|
+
readonly valueLabelIds: {
|
|
582
|
+
readonly pump: "widgetScadaPump";
|
|
583
|
+
readonly valve: "widgetScadaValve";
|
|
584
|
+
readonly tank: "widgetScadaTank";
|
|
585
|
+
readonly motor: "widgetScadaMotor";
|
|
586
|
+
readonly fan: "widgetScadaFan";
|
|
587
|
+
readonly pipe: "widgetScadaPipe";
|
|
588
|
+
readonly sensor: "widgetScadaSensor";
|
|
589
|
+
readonly breaker: "widgetScadaBreaker";
|
|
590
|
+
readonly light: "widgetScadaLight";
|
|
591
|
+
};
|
|
592
|
+
readonly placeholderId: "widgetPlaceholderDefault";
|
|
593
|
+
};
|
|
594
|
+
readonly onAt: {
|
|
595
|
+
readonly kind: "number";
|
|
596
|
+
readonly labelId: "widgetLabelOnAt";
|
|
597
|
+
readonly helpId: "widgetHintScadaOnAt";
|
|
598
|
+
};
|
|
599
|
+
readonly orientation: {
|
|
600
|
+
readonly kind: "enum";
|
|
601
|
+
readonly values: readonly ["horizontal", "vertical"];
|
|
602
|
+
readonly labelId: "widgetLabelOrientation";
|
|
603
|
+
readonly valueLabelIds: {
|
|
604
|
+
readonly horizontal: "widgetOrientationHorizontal";
|
|
605
|
+
readonly vertical: "widgetOrientationVertical";
|
|
606
|
+
};
|
|
607
|
+
readonly placeholderId: "widgetPlaceholderDefault";
|
|
608
|
+
};
|
|
609
|
+
readonly min: {
|
|
610
|
+
readonly kind: "number";
|
|
611
|
+
readonly labelId: "widgetLabelMin";
|
|
612
|
+
};
|
|
613
|
+
readonly max: {
|
|
614
|
+
readonly kind: "number";
|
|
615
|
+
readonly labelId: "widgetLabelMax";
|
|
616
|
+
};
|
|
617
|
+
readonly unit: {
|
|
618
|
+
readonly kind: 'string';
|
|
619
|
+
readonly labelId: 'widgetLabelUnit';
|
|
620
|
+
};
|
|
621
|
+
readonly precision: {
|
|
622
|
+
readonly kind: 'number';
|
|
623
|
+
readonly integer: true;
|
|
624
|
+
readonly min: 0;
|
|
625
|
+
readonly max: 100;
|
|
626
|
+
readonly labelId: 'widgetLabelPrecision';
|
|
627
|
+
readonly helpId: 'widgetHintPrecision';
|
|
628
|
+
};
|
|
629
|
+
readonly thresholds: {
|
|
630
|
+
readonly kind: 'list';
|
|
631
|
+
readonly maxItems: 12;
|
|
632
|
+
readonly labelId: 'widgetLabelThresholds';
|
|
633
|
+
readonly helpId: 'widgetHintThresholds';
|
|
634
|
+
readonly item: {
|
|
635
|
+
readonly value: {
|
|
636
|
+
readonly kind: 'number';
|
|
637
|
+
readonly required: true;
|
|
638
|
+
readonly labelId: 'widgetLabelThresholdValue';
|
|
639
|
+
};
|
|
640
|
+
readonly level: {
|
|
641
|
+
readonly kind: 'enum';
|
|
642
|
+
readonly required: true;
|
|
643
|
+
readonly values: readonly ["normal", "warning", "minor", "major", "critical"];
|
|
644
|
+
readonly labelId: 'widgetLabelThresholdLevel';
|
|
645
|
+
readonly valueLabelIds: {
|
|
646
|
+
readonly normal: 'widgetSeverityNormal';
|
|
647
|
+
readonly warning: 'widgetSeverityWarning';
|
|
648
|
+
readonly minor: 'widgetSeverityMinor';
|
|
649
|
+
readonly major: 'widgetSeverityMajor';
|
|
650
|
+
readonly critical: 'widgetSeverityCritical';
|
|
651
|
+
};
|
|
652
|
+
readonly placeholderId: 'widgetPlaceholderThresholdLevel';
|
|
653
|
+
};
|
|
654
|
+
readonly label: {
|
|
655
|
+
readonly kind: 'string';
|
|
656
|
+
readonly labelId: 'widgetLabelThresholdLabel';
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
readonly staleAfterSeconds: {
|
|
661
|
+
readonly kind: 'number';
|
|
662
|
+
readonly integer: true;
|
|
663
|
+
readonly min: 1;
|
|
664
|
+
readonly labelId: 'widgetLabelStaleAfter';
|
|
665
|
+
readonly helpId: 'widgetHintStaleAfter';
|
|
666
|
+
};
|
|
667
|
+
readonly window: {
|
|
668
|
+
readonly kind: 'number';
|
|
669
|
+
readonly integer: true;
|
|
670
|
+
readonly min: 1;
|
|
671
|
+
readonly labelId: 'widgetLabelWindow';
|
|
672
|
+
readonly helpId: 'widgetHintWindow';
|
|
673
|
+
};
|
|
674
|
+
}>>;
|
|
@@ -3,5 +3,6 @@ export { Compass } from './compass';
|
|
|
3
3
|
export { LevelGauge } from './level-gauge';
|
|
4
4
|
export { LinearGauge } from './linear-gauge';
|
|
5
5
|
export { ProgressRing } from './progress-ring';
|
|
6
|
+
export { ScadaSymbol } from './scada-symbol';
|
|
6
7
|
export { SignalBars } from './signal-bars';
|
|
7
8
|
export { StatusLight } from './status-light';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Threshold, type WidgetProps } from '@devicechain/widget-sdk';
|
|
2
|
+
import { type HistoryView } from '../history-model';
|
|
3
|
+
import { type StateKey } from '../state-timeline-model';
|
|
4
|
+
import { type StateTimelineStrings } from '../state-timeline-strings';
|
|
5
|
+
export declare function StateTimeline({ widget, history }: WidgetProps & {
|
|
6
|
+
history?: HistoryView;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function stateLabel(key: StateKey, bands: readonly Threshold[], strings: StateTimelineStrings): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devicechain/widgets",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "DeviceChain's built-in dashboard widgets across six channels — telemetry (time-series chart + gauge over Apache ECharts, latest card, table, and lazily loaded level, indicator and radial widgets: linear and level gauges, battery, status light, signal bars, compass, progress ring), static (label, image; no data), alarm (table, count, severity breakdown), control (command button), selection (entity selector), and location (map over MapLibre GL, lazily loaded, tile source supplied by the host app) — plus the renderer that lays them out. Each is a registration built on @devicechain/widget-sdk. Themed via CSS custom properties, no Tailwind leakage.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devicechain",
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
"test": "vitest run"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@devicechain/client": "1.
|
|
61
|
-
"@devicechain/dashboards": "1.
|
|
62
|
-
"@devicechain/widget-sdk": "1.
|
|
60
|
+
"@devicechain/client": "1.2.0",
|
|
61
|
+
"@devicechain/dashboards": "1.2.0",
|
|
62
|
+
"@devicechain/widget-sdk": "1.2.0",
|
|
63
63
|
"echarts": "^6.0.0",
|
|
64
64
|
"maplibre-gl": "^6.13.0",
|
|
65
65
|
"react": "^19.3.0",
|
|
66
66
|
"react-dom": "^19.3.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@devicechain/client": "1.
|
|
70
|
-
"@devicechain/dashboards": "1.
|
|
71
|
-
"@devicechain/widget-sdk": "1.
|
|
69
|
+
"@devicechain/client": "1.2.0",
|
|
70
|
+
"@devicechain/dashboards": "1.2.0",
|
|
71
|
+
"@devicechain/widget-sdk": "1.2.0",
|
|
72
72
|
"@testing-library/react": "^16.3.3",
|
|
73
73
|
"@types/node": "^26.6.6",
|
|
74
74
|
"@types/react": "^19.3.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/event-markers-feed.tsx", "../../src/event-markers-model.ts", "../../src/event-markers-strings.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// The event-marker feed of a time-series chart: the alarms and commands of the chart's device inside\n// the chart's range, drawn as markers (event-markers-model.ts) and listed under the chart. Loaded on\n// first use (connected-widget.tsx imports it dynamically), so a board whose charts have the markers\n// off never downloads it, and the ECharts pieces it draws with load only when a marker is drawn.\n//\n// Where the events come from: the hub's own alarm and command channels (the queries the alarm table\n// and the command button already read), scoped to the chart's ONE device and to the chart's range,\n// which device-management and command-delivery apply before paging. So:\n//\n// - one page of MAX_EVENT_MARKERS is read per channel, and each page's total is the exact count in\n// range, so the note says exactly how many were left out, for a range of any age;\n// - a change of range, and a pause, read again (the subscription is keyed by the span and the\n// pause instant), so the note and the markers are never those of another range;\n// - a chart with no device reads nothing. It is NEVER given an unscoped subscription: on the alarm\n// channel \"no datasource\" means every alarm in the tenant;\n// - a paused board holds the events it showed at the pause (useHeld), as its readings are held;\n// - the alarm scope ('series', or 'device' when unset) picks which of the device's alarms are DRAWN:\n// 'series' keeps those about a measurement the chart plots, and the others are listed apart\n// (\"other alarms on this device\"), never drawn and never dropped;\n// - a source that cannot supply a channel (a recording without alarms or commands) says so in a\n// note instead of drawing none and implying there were none.\n\nimport {\n DEFAULT_TIME_RANGE_SECONDS,\n type AlarmSnapshot,\n type CommandSnapshot,\n type MeasurementStreamState,\n type WidgetActions,\n type WidgetDataSource,\n type WidgetDescriptor,\n type WidgetInstance,\n} from '@devicechain/dashboards';\nimport {\n css,\n fontVar,\n formatDateTime,\n formatTimestamp,\n optBoolean,\n optString,\n spaceVar,\n useWidgetTimeRange,\n useWidgetTimeZone,\n} from '@devicechain/widget-sdk';\nimport { useChartTheme } from '@devicechain/widget-sdk/echarts';\nimport { useEffect, useMemo, useRef, useState, type ComponentType, type ReactNode } from 'react';\n\nimport { measurementSpan } from './binding-policy';\nimport {\n alarmEvents,\n alarmScope,\n commandEvents,\n MAX_EVENT_MARKERS,\n planMarkers,\n splitByScope,\n type EventItem,\n type EventRange,\n} from './event-markers-model';\nimport { eventMarkerStrings, type EventKind } from './event-markers-strings';\nimport type { EventMarkersView } from './event-markers-types';\nimport { useHeld } from './use-held';\n\nconst DAY_MS = 86_400_000;\n\nexport interface EventMarkersFeedProps {\n hub: WidgetDataSource;\n widget: WidgetInstance;\n descriptor: WidgetDescriptor;\n data: MeasurementStreamState;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Component: ComponentType<any>;\n actions: WidgetActions | undefined;\n}\n\n// One channel's latest answer, tagged with the subscription it answers: a render that carries a new\n// key must not show the previous key's rows, so a mismatch reads as loading.\ninterface Channel<S> {\n key: string;\n value?: S;\n error?: unknown;\n}\n\ninterface Sink<S> {\n next: (value: S) => void;\n error?: (err: unknown) => void;\n}\n\nfunction useChannel<S>(subscribe: ((sink: Sink<S>) => () => void) | null, key: string, paused: boolean): Channel<S> {\n const [state, setState] = useState<Channel<S>>({ key: '' });\n const subscribeRef = useRef(subscribe);\n subscribeRef.current = subscribe;\n const enabled = subscribe !== null;\n useEffect(() => {\n const open = subscribeRef.current;\n if (!open) return;\n return open({\n next: (value) => setState({ key, value }),\n // A later error keeps the rows already read: the channel polls and heals.\n error: (error) => setState((prev) => ({ key, value: prev.key === key ? prev.value : undefined, error })),\n });\n }, [key, enabled]);\n const live: Channel<S> = enabled && state.key === key ? state : { key };\n return useHeld(live, paused, (c) => c.value !== undefined || c.error !== undefined);\n}\n\nconst isNotInRecording = (err: unknown): boolean => err instanceof Error && err.name === 'NotInRecordingError';\n\nexport default function EventMarkersFeed({ hub, widget, descriptor, data, Component, actions }: EventMarkersFeedProps) {\n const range = useWidgetTimeRange();\n const timeZone = useWidgetTimeZone();\n const theme = useChartTheme();\n const words = eventMarkerStrings();\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 paused = range?.paused === true;\n const pausedAt = paused ? range?.pausedAt : undefined;\n const ds = widget.datasource;\n const bound = ds !== undefined && ds.kind !== 'unbound';\n const wantAlarms = bound && optBoolean(widget.options, 'markAlarms') === true;\n const scope = alarmScope(optString(widget.options, 'markAlarmsScope'));\n const wantCommands = bound && optBoolean(widget.options, 'markCommands') === true;\n\n // The range is part of the key: a new span, or a pause (which fixes the range's end), reads\n // again, and the answer for one range is never shown under another.\n const key = JSON.stringify([ds ?? null, spanSeconds, pausedAt ?? null]);\n const window = { spanSeconds, ...(pausedAt !== undefined ? { endAt: pausedAt } : {}) };\n const alarms = useChannel<AlarmSnapshot>(\n wantAlarms ? (sink) => hub.subscribeAlarms({ datasource: ds, pageSize: MAX_EVENT_MARKERS, window }, sink) : null,\n `a${key}`,\n paused,\n );\n const commands = useChannel<CommandSnapshot>(\n wantCommands ? (sink) => hub.subscribeCommands({ datasource: ds, pageSize: MAX_EVENT_MARKERS, window }, sink) : null,\n `c${key}`,\n paused,\n );\n\n const view = useMemo((): EventMarkersView | undefined => {\n if (!wantAlarms && !wantCommands) return undefined;\n const to = pausedAt ?? now();\n const span: EventRange = { from: to - spanSeconds * 1000, to };\n const fmt = (at: number): string =>\n spanSeconds * 1000 > DAY_MS\n ? formatDateTime(new Date(at).toISOString(), timeZone)\n : formatTimestamp(new Date(at).toISOString(), timeZone);\n\n // What the chart plots: the measurements it names, else those its readings carry.\n const named = ds?.measurements ?? [];\n const charted = new Set<string>(named.length > 0 ? named : data.samples.map((s) => s.name));\n\n const deviceToken = ds?.kind === 'device' ? ds.deviceToken : undefined;\n const found: EventItem[] = [];\n const notes: string[] = [];\n let unloaded = 0;\n\n const channel = (kind: EventKind, c: Channel<unknown>): void => {\n if (c.value === undefined && c.error !== undefined) {\n notes.push(isNotInRecording(c.error) ? words.notInRecording[kind] : words.failed[kind]);\n }\n };\n if (wantAlarms) {\n channel('alarm', alarms);\n const snap = alarms.value;\n if (snap) {\n found.push(...alarmEvents(snap.alarms, deviceToken, span, words, fmt));\n // The source counted the range before paging, so the rows past the page are exact.\n unloaded += Math.max(0, snap.total - snap.alarms.length);\n }\n }\n if (wantCommands) {\n channel('command', commands);\n const snap = commands.value;\n if (snap) {\n found.push(...commandEvents(snap.commands, span, words, fmt));\n unloaded += Math.max(0, snap.total - snap.commands.length);\n }\n }\n\n const { drawn, other } = splitByScope(found, scope, charted);\n const plan = planMarkers(drawn, span, theme);\n const more = plan.hidden + unloaded;\n if (more > 0) notes.push(words.more(more));\n const listed = other.map((e) => ({\n ...e,\n detail: `${e.detail} \u00B7 ${e.metric ? words.aboutMeasurement(e.metric) : words.noMeasurement}`,\n }));\n return { decorate: plan.decorate, footer: footerOf(plan.shown, listed, notes, theme.severity) };\n // `ds` is read through the keys (value identity). `alarms`/`commands` are the channels' values.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wantAlarms, wantCommands, scope, alarms, commands, data.samples, theme, words, spanSeconds, pausedAt, now, timeZone, key]);\n\n return <Component widget={widget} data={data} actions={actions} markers={view} />;\n}\n\nconst FOOTER_STYLE = {\n flex: 'none',\n fontSize: fontVar('xs'),\n color: css('muted-foreground'),\n padding: `0 ${spaceVar(2)}`,\n} as const;\n\nfunction footerOf(\n shown: readonly EventItem[],\n other: readonly EventItem[],\n notes: readonly string[],\n severity: Record<string, string>,\n): ReactNode {\n if (shown.length === 0 && other.length === 0 && notes.length === 0) return null;\n const words = eventMarkerStrings();\n return (\n <div data-chart-events=\"\" style={FOOTER_STYLE}>\n {notes.map((note) => (\n <div key={note} data-chart-events-note=\"\">\n {note}\n </div>\n ))}\n {shown.length > 0 && <EventList events={shown} label={words.events(shown.length)} severity={severity} />}\n {other.length > 0 && <EventList events={other} label={words.otherAlarms(other.length)} severity={severity} other />}\n </div>\n );\n}\n\nfunction EventList({\n events,\n label,\n severity,\n other,\n}: {\n events: readonly EventItem[];\n label: string;\n severity: Record<string, string>;\n other?: boolean;\n}) {\n return (\n // A native disclosure: reachable and operable from the keyboard, with the canvas's tooltips\n // as its pointer-and-touch counterpart.\n <details data-chart-events-other={other ? '' : undefined}>\n <summary style={{ cursor: 'pointer' }}>{label}</summary>\n {/* The list scrolls past a few rows, so it takes focus: a keyboard can only scroll what it can reach. */}\n <ul tabIndex={0} aria-label={label} style={{ margin: 0, padding: 0, listStyle: 'none', maxHeight: 96, overflowY: 'auto' }}>\n {[...events].reverse().map((e) => (\n <li key={e.id} data-chart-event={e.kind} style={{ display: 'flex', gap: spaceVar(1), alignItems: 'baseline' }}>\n <span\n aria-hidden=\"true\"\n style={{\n flex: 'none',\n width: 8,\n height: 8,\n background: e.level ? severity[e.level] : css('muted-foreground'),\n borderRadius: e.kind === 'command' ? 4 : 0,\n }}\n />\n <span>\n {e.title} \u00B7 {e.detail}\n </span>\n </li>\n ))}\n </ul>\n </details>\n );\n}\n", "// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// The event markers of a time-series chart as plain data: which alarms and commands fall in the\n// chart's range, which of them are drawn, and the ECharts pieces that draw them. Pure (no React, no\n// ECharts import), and part of the markers' lazy chunk (event-markers-feed.tsx).\n//\n// - An ALARM is a span: a faint band from the raise to the clear (or to the end of the range while\n// it is still active) under a thin strip along the top edge, with a solid line at the raise. The\n// span takes its severity's colour; an\n// INDETERMINATE alarm and the clear line are neutral, because colour means severity and\n// \"back to normal\" has none (the ISA-101 rule the threshold bands follow).\n// - A chart whose alarm scope is 'series' draws only the alarms about a measurement it charts. The\n// rest (another measurement's, or none known) are not drawn but are LISTED, so nothing is hidden.\n// - A COMMAND is a dotted neutral line at the time it was sent (queued, when it never was), named\n// by the command, with its delivery outcome where it has one.\n// - At most MAX_EVENT_MARKERS events are drawn, the newest ones; the rest are COUNTED, never\n// dropped in silence (the feed prints the count).\n// - The markers sit on a helper series of their own, so the reading series are untouched.\n\nimport type { AlarmRow, CommandRow } from '@devicechain/dashboards';\nimport { levelColor, type AlarmLevel } from '@devicechain/widget-sdk';\nimport { severityFill, type ChartTheme, type EChartOption } from '@devicechain/widget-sdk/echarts';\n\nimport type { EventKind, EventMarkerStrings } from './event-markers-strings';\n\n// The most events drawn on one chart. Past it the chart is a comb, not a timeline.\nexport const MAX_EVENT_MARKERS = 30;\n\n// The opacity of an alarm's span behind the readings: a zone, not a wall.\nconst SPAN_ALPHA = 0.05;\n// The strip along the top edge of the plot that carries the span's colour: the band is a hint, the\n// strip is what reads as the alarm's severity.\nconst STRIP_PX = 3;\nconst STRIP_ALPHA = 0.85;\n// Labels are written on the canvas only on a roomy chart with few lines; the tooltip and the list\n// carry the same text everywhere.\nconst LABEL_MIN_WIDTH = 480;\nconst LABEL_MAX_LINES = 8;\n\nexport interface EventRange {\n from: number; // epoch ms\n to: number;\n}\n\nexport interface EventItem {\n id: string;\n kind: EventKind;\n // The raise time of an alarm; the send time of a command.\n at: number;\n // An alarm's clear time; null while it is active (and always null for a command).\n end: number | null;\n level: AlarmLevel | undefined;\n // The command's name, or the alarm's key.\n name: string;\n title: string;\n detail: string;\n // An alarm's measurement (its metricKey); empty when none is known. Absent on a command.\n metric?: string;\n}\n\nconst LEVELS: Record<string, AlarmLevel> = { CRITICAL: 'critical', MAJOR: 'major', MINOR: 'minor', WARNING: 'warning' };\n\n// INDETERMINATE (and any severity a newer platform adds) has no level: it draws neutral.\nexport function alarmLevel(severity: string): AlarmLevel | undefined {\n return LEVELS[severity.toUpperCase()];\n}\n\nfunction ms(iso: string | null): number | null {\n if (!iso) return null;\n const t = Date.parse(iso);\n return Number.isNaN(t) ? null : t;\n}\n\n// The alarms that overlap the range, as events. A row with no raise time cannot be placed and is\n// skipped; with `deviceToken`, only that device's rows are kept (the platform already limits a\n// viewer to the devices they may see, and this keeps another device's alarm off this device's chart\n// whatever a source returns).\nexport function alarmEvents(\n rows: readonly AlarmRow[],\n deviceToken: string | undefined,\n range: EventRange,\n words: EventMarkerStrings,\n fmt: (at: number) => string,\n): EventItem[] {\n const out: EventItem[] = [];\n for (const r of rows) {\n if (deviceToken !== undefined && r.originatorToken !== deviceToken) continue;\n const at = ms(r.raisedTime);\n if (at === null) continue;\n const end = ms(r.clearedTime);\n if (at > range.to || (end ?? Infinity) < range.from) continue;\n const sev = words.severity[r.severity.toUpperCase()] ?? r.severity;\n out.push({\n id: r.token,\n kind: 'alarm',\n at,\n end,\n level: alarmLevel(r.severity),\n name: r.alarmKey,\n metric: r.metricKey,\n title: `${words.alarm}: ${r.alarmKey}`,\n detail: [sev, words.raised(fmt(at)), end === null ? words.stillActive : words.cleared(fmt(end))].join(' \u00B7 '),\n });\n }\n return out;\n}\n\nexport type AlarmScope = 'series' | 'device';\n\n// Unset is 'device': a chart saved before the option existed marked every alarm on its device.\nexport function alarmScope(value: unknown): AlarmScope {\n return value === 'series' ? 'series' : 'device';\n}\n\n// The alarms a series-scoped chart draws are those about a measurement it charts; the others are\n// returned apart, for the list. An alarm with no known measurement is never drawn. Commands pass.\nexport function splitByScope(\n items: readonly EventItem[],\n scope: AlarmScope,\n charted: ReadonlySet<string>,\n): { drawn: EventItem[]; other: EventItem[] } {\n if (scope === 'device') return { drawn: [...items], other: [] };\n const drawn: EventItem[] = [];\n const other: EventItem[] = [];\n for (const e of items) (e.kind === 'alarm' && !(e.metric && charted.has(e.metric)) ? other : drawn).push(e);\n return { drawn, other };\n}\n\n// The commands sent inside the range, as events.\nexport function commandEvents(\n rows: readonly CommandRow[],\n range: EventRange,\n words: EventMarkerStrings,\n fmt: (at: number) => string,\n): EventItem[] {\n const out: EventItem[] = [];\n for (const r of rows) {\n const at = ms(r.sentTime) ?? ms(r.queuedTime);\n if (at === null || at < range.from || at > range.to) continue;\n out.push({\n id: r.token,\n kind: 'command',\n at,\n end: null,\n level: undefined,\n name: r.name,\n title: `${words.command}: ${r.name}`,\n detail: [words.sent(fmt(at)), words.outcome[r.status] ?? r.status].join(' \u00B7 '),\n });\n }\n return out;\n}\n\nexport interface MarkerPlan {\n // The events drawn, oldest first.\n shown: EventItem[];\n // Events in the range that were not drawn because of the cap.\n hidden: number;\n decorate: (option: EChartOption, size?: { width: number; height: number }) => EChartOption;\n}\n\nconst HTML_ESCAPES: Record<string, string> = { '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''' };\nconst escapeHtml = (s: string): string => s.replace(/[&<>\"']/g, (c) => HTML_ESCAPES[c]);\n\nexport function planMarkers(items: readonly EventItem[], range: EventRange, theme: ChartTheme): MarkerPlan {\n // Newest first, so the cap keeps what just happened; drawn and listed oldest first.\n const byNewest = [...items].sort((a, b) => b.at - a.at || (a.id < b.id ? -1 : 1));\n const shown = byNewest.slice(0, MAX_EVENT_MARKERS).reverse();\n const hidden = byNewest.length - shown.length;\n\n const neutral = theme.mutedForeground;\n const tips: Record<string, string> = {};\n const lines: Record<string, unknown>[] = [];\n const areas: unknown[] = [];\n const strips: Array<(top: number) => unknown> = [];\n for (const e of shown) {\n const tip = `<b>${escapeHtml(e.title)}</b><br/>${escapeHtml(e.detail)}`;\n if (e.kind === 'command') {\n tips[e.id] = tip;\n lines.push({ name: e.id, xAxis: e.at, lineStyle: { color: neutral, type: 'dotted', width: 2 }, labelText: e.name });\n continue;\n }\n const ink = levelColor(theme.severity, e.level) ?? neutral;\n const start = Math.max(e.at, range.from);\n const stop = Math.min(e.end ?? range.to, range.to);\n tips[`${e.id}:span`] = tip;\n areas.push([\n { name: `${e.id}:span`, xAxis: start, itemStyle: { color: e.level ? severityFill(theme, e.level, SPAN_ALPHA) : theme.border } },\n { xAxis: stop },\n ]);\n // Pixels, not data: the strip hugs the top of the plot whatever the value axis does, so its\n // y is known only when the option is (decorate).\n tips[`${e.id}:strip`] = tip;\n strips.push((top) => [\n { name: `${e.id}:strip`, xAxis: start, y: top, itemStyle: { color: e.level ? severityFill(theme, e.level, STRIP_ALPHA) : neutral } },\n { xAxis: stop, y: top + STRIP_PX },\n ]);\n if (e.at >= range.from) {\n tips[`${e.id}:raised`] = tip;\n lines.push({ name: `${e.id}:raised`, xAxis: e.at, lineStyle: { color: ink, type: 'solid', width: 2 } });\n }\n if (e.end !== null && e.end >= range.from && e.end <= range.to) {\n tips[`${e.id}:cleared`] = tip;\n lines.push({ name: `${e.id}:cleared`, xAxis: e.end, lineStyle: { color: neutral, type: 'dashed', width: 1 } });\n }\n }\n\n const tooltip = { trigger: 'item', formatter: (p: { name?: string }) => tips[p.name ?? ''] ?? '' };\n\n const decorate: MarkerPlan['decorate'] = (option, size) => {\n if (lines.length === 0 && areas.length === 0) return option;\n const base = option as { series?: unknown; xAxis?: object; legend?: object; textStyle?: { fontSize?: number }; grid?: { top?: unknown } };\n const top = typeof base.grid?.top === 'number' ? base.grid.top : 0;\n const series = Array.isArray(base.series) ? base.series : base.series ? [base.series] : [];\n const labelled = (size?.width ?? 0) >= LABEL_MIN_WIDTH && lines.length <= LABEL_MAX_LINES;\n const fontSize = base.textStyle?.fontSize ?? 10;\n const lineData = lines.map(({ labelText, ...line }) =>\n labelled && typeof labelText === 'string'\n ? { ...line, label: { show: true, position: 'insideEndTop', rotate: 90, color: neutral, fontSize, formatter: labelText } }\n : { ...line, label: { show: false } },\n );\n return {\n ...option,\n xAxis: { ...base.xAxis, min: range.from, max: range.to },\n // The legend lists the readings, not the helper series that carries the markers.\n ...(base.legend ? { legend: { ...base.legend, data: series.map((s: { name?: string }) => s.name) } } : {}),\n series: [\n ...series,\n {\n type: 'line',\n name: '',\n data: [],\n silent: false,\n z: 1,\n markArea: { silent: false, animation: false, label: { show: false }, tooltip, data: [...areas, ...strips.map((strip) => strip(top))] },\n markLine: { silent: false, animation: false, symbol: 'none', tooltip, data: lineData },\n },\n ],\n };\n };\n\n return { shown, hidden, decorate };\n}\n", "// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// The words the chart's event markers print: the tooltip and list text, and the notes under the\n// chart. The widget packages carry no i18n runtime, so this is the one small per-language table\n// (modelled on aggregate-strings.ts). Option labels are translated in the console's catalogs.\n\nimport { viewerLocale } from '@devicechain/widget-sdk';\n\nexport type EventKind = 'alarm' | 'command';\n\nexport interface EventMarkerStrings {\n // The disclosure's summary, with the number of events listed.\n events: (count: number) => string;\n // The disclosure summary of the alarms a series-scoped chart does not draw.\n otherAlarms: (count: number) => string;\n // Said of an alarm in that list when it names no measurement.\n noMeasurement: string;\n // Said of an alarm in that list that is about another measurement.\n aboutMeasurement: (name: string) => string;\n alarm: string;\n command: string;\n severity: Record<string, string>;\n raised: (time: string) => string;\n cleared: (time: string) => string;\n stillActive: string;\n sent: (time: string) => string;\n // A command's delivery status, where it has settled into one; otherwise the raw status.\n outcome: Record<string, string>;\n // Events in the range beyond the cap, exact.\n more: (count: number) => string;\n // A channel the source cannot supply (a recording without it) or failed to read.\n notInRecording: Record<EventKind, string>;\n failed: Record<EventKind, string>;\n}\n\nexport const EVENT_MARKER_STRINGS: Record<'en' | 'es', EventMarkerStrings> = {\n en: {\n events: (n) => `Events in this range (${n})`,\n otherAlarms: (n) => `Other alarms on this device (${n})`,\n noMeasurement: 'no measurement known',\n aboutMeasurement: (m) => `about ${m}`,\n alarm: 'Alarm',\n command: 'Command',\n severity: { CRITICAL: 'Critical', MAJOR: 'Major', MINOR: 'Minor', WARNING: 'Warning', INDETERMINATE: 'Indeterminate' },\n raised: (t) => `raised ${t}`,\n cleared: (t) => `cleared ${t}`,\n stillActive: 'still active',\n sent: (t) => `sent ${t}`,\n outcome: {\n SUCCESSFUL: 'succeeded',\n FAILED: 'failed',\n TIMEOUT: 'timed out',\n EXPIRED: 'expired',\n CANCELLED: 'cancelled',\n QUEUED: 'queued',\n SENT: 'sent, awaiting reply',\n HELD: 'held',\n PARKED: 'parked',\n },\n more: (n) => `${n} more not shown`,\n notInRecording: { alarm: 'Alarm markers: not in this recording', command: 'Command markers: not in this recording' },\n failed: { alarm: 'Alarm markers could not be loaded', command: 'Command markers could not be loaded' },\n },\n es: {\n events: (n) => `Eventos en este intervalo (${n})`,\n otherAlarms: (n) => `Otras alarmas de este dispositivo (${n})`,\n noMeasurement: 'medici\u00F3n desconocida',\n aboutMeasurement: (m) => `sobre ${m}`,\n alarm: 'Alarma',\n command: 'Comando',\n severity: { CRITICAL: 'Cr\u00EDtica', MAJOR: 'Mayor', MINOR: 'Menor', WARNING: 'Advertencia', INDETERMINATE: 'Indeterminada' },\n raised: (t) => `activada ${t}`,\n cleared: (t) => `despejada ${t}`,\n stillActive: 'sigue activa',\n sent: (t) => `enviado ${t}`,\n outcome: {\n SUCCESSFUL: 'correcto',\n FAILED: 'fallido',\n TIMEOUT: 'sin respuesta a tiempo',\n EXPIRED: 'caducado',\n CANCELLED: 'cancelado',\n QUEUED: 'en cola',\n SENT: 'enviado, esperando respuesta',\n HELD: 'retenido',\n PARKED: 'en espera',\n },\n more: (n) => `${n} m\u00E1s sin mostrar`,\n notInRecording: { alarm: 'Marcadores de alarmas: no est\u00E1n en esta grabaci\u00F3n', command: 'Marcadores de comandos: no est\u00E1n en esta grabaci\u00F3n' },\n failed: { alarm: 'No se pudieron cargar los marcadores de alarmas', command: 'No se pudieron cargar los marcadores de comandos' },\n },\n};\n\nexport function eventMarkerStrings(locale: string | undefined = viewerLocale()): EventMarkerStrings {\n return locale?.toLowerCase().split('-')[0] === 'es' ? EVENT_MARKER_STRINGS.es : EVENT_MARKER_STRINGS.en;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAyBA;AAAA,EACE;AAAA,OAQK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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