@devicechain/widgets 0.23.0-rc.1 → 0.24.0-rc.1
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 +8 -3
- package/dist/aggregate-fold.d.ts +3 -2
- package/dist/aggregate-strings.d.ts +1 -0
- package/dist/alarm-strings.d.ts +18 -0
- package/dist/binding-policy.d.ts +4 -0
- package/dist/bound-devices-notice.d.ts +30 -0
- package/dist/builtin-descriptors.d.ts +290 -249
- package/dist/builtin-option-docs.d.ts +2 -0
- package/dist/builtin-registry.d.ts +249 -226
- package/dist/category-geometry.d.ts +1 -0
- package/dist/chunks/{aggregate-feed-BD3CHNFU.js → aggregate-feed-4FSBQYJL.js} +39 -11
- package/dist/chunks/aggregate-feed-4FSBQYJL.js.map +7 -0
- package/dist/chunks/{aggregate-widgets-HZQI5HTX.js → aggregate-widgets-2ZQBW3YF.js} +376 -182
- package/dist/chunks/aggregate-widgets-2ZQBW3YF.js.map +7 -0
- package/dist/chunks/alarm-widgets-X4PX5MYJ.js +72 -0
- package/dist/chunks/alarm-widgets-X4PX5MYJ.js.map +7 -0
- package/dist/chunks/chunk-546TK2QG.js +722 -0
- package/dist/chunks/chunk-546TK2QG.js.map +7 -0
- package/dist/chunks/{chunk-WBKHYZU2.js → chunk-62CHYCHI.js} +6 -62
- package/dist/chunks/chunk-62CHYCHI.js.map +7 -0
- package/dist/chunks/chunk-BMFQOTYG.js +41 -0
- package/dist/chunks/chunk-BMFQOTYG.js.map +7 -0
- package/dist/chunks/{chunk-2D7JNKFE.js → chunk-JFH4QMLA.js} +28 -4
- package/dist/chunks/chunk-JFH4QMLA.js.map +7 -0
- package/dist/chunks/chunk-QMGKB6J3.js +84 -0
- package/dist/chunks/chunk-QMGKB6J3.js.map +7 -0
- package/dist/chunks/chunk-XNEBAY4J.js +19 -0
- package/dist/chunks/chunk-XNEBAY4J.js.map +7 -0
- package/dist/chunks/chunk-YYJV54BV.js +58 -0
- package/dist/chunks/chunk-YYJV54BV.js.map +7 -0
- package/dist/chunks/compare-feed-AY3CVKUZ.js +346 -0
- package/dist/chunks/compare-feed-AY3CVKUZ.js.map +7 -0
- package/dist/chunks/{control-widgets-3V2LSSRF.js → control-widgets-UCTJJJ2D.js} +267 -78
- package/dist/chunks/control-widgets-UCTJJJ2D.js.map +7 -0
- package/dist/chunks/event-markers-feed-GEGTIHXT.js +373 -0
- package/dist/chunks/event-markers-feed-GEGTIHXT.js.map +7 -0
- package/dist/chunks/{fleet-feed-5QGDLOV5.js → fleet-feed-2SKDR6ZQ.js} +47 -8
- package/dist/chunks/fleet-feed-2SKDR6ZQ.js.map +7 -0
- package/dist/chunks/presence-widgets-2LIUKN4Y.js +350 -0
- package/dist/chunks/presence-widgets-2LIUKN4Y.js.map +7 -0
- package/dist/command-control-strings.d.ts +5 -0
- package/dist/compare-feed.d.ts +13 -0
- package/dist/compare-model.d.ts +38 -0
- package/dist/compare-strings.d.ts +13 -0
- package/dist/documented-descriptors.d.ts +4826 -0
- package/dist/event-markers-feed.d.ts +11 -0
- package/dist/event-markers-model.d.ts +38 -0
- package/dist/event-markers-strings.d.ts +20 -0
- package/dist/event-markers-types.d.ts +7 -0
- package/dist/fleet-count-model.d.ts +13 -0
- package/dist/fleet-feed.d.ts +1 -0
- package/dist/fleet-model.d.ts +1 -0
- package/dist/fleet-strings.d.ts +11 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +946 -398
- package/dist/index.js.map +4 -4
- package/dist/presence-feed.d.ts +24 -0
- package/dist/presence-model.d.ts +13 -0
- package/dist/presence-strings.d.ts +19 -0
- package/dist/sparkline.d.ts +23 -0
- package/dist/use-bound-devices.d.ts +26 -0
- package/dist/widgets/aggregate-lazy.d.ts +81 -46
- package/dist/widgets/aggregate-widgets.d.ts +1 -0
- package/dist/widgets/alarm-grouped.d.ts +17 -0
- package/dist/widgets/alarm-lazy.d.ts +63 -16
- package/dist/widgets/alarm-severity.d.ts +8 -0
- package/dist/widgets/alarm-table.d.ts +2 -0
- package/dist/widgets/alarm-type-tabs.d.ts +10 -0
- package/dist/widgets/alarm-widgets.d.ts +2 -0
- package/dist/widgets/command-stepper.d.ts +22 -0
- package/dist/widgets/control-lazy.d.ts +16 -24
- package/dist/widgets/device-status.d.ts +4 -0
- package/dist/widgets/fleet-count.d.ts +2 -0
- package/dist/widgets/gauge.d.ts +2 -15
- package/dist/widgets/image.d.ts +2 -6
- package/dist/widgets/label.d.ts +2 -6
- package/dist/widgets/latest-card.d.ts +2 -13
- package/dist/widgets/lazy-chunk.d.ts +7 -2
- package/dist/widgets/level-lazy.d.ts +14 -96
- package/dist/widgets/map.d.ts +8 -5
- package/dist/widgets/online-doughnut.d.ts +2 -0
- package/dist/widgets/presence-lazy.d.ts +27 -0
- package/dist/widgets/presence-widgets.d.ts +3 -0
- package/dist/widgets/selection-lazy.d.ts +2 -4
- package/dist/widgets/table-lazy.d.ts +2 -7
- package/dist/widgets/time-series-chart.d.ts +62 -12
- package/package.json +13 -13
- package/dist/chunks/aggregate-feed-BD3CHNFU.js.map +0 -7
- package/dist/chunks/aggregate-widgets-HZQI5HTX.js.map +0 -7
- package/dist/chunks/alarm-widgets-7UY6MIYZ.js +0 -9
- package/dist/chunks/alarm-widgets-7UY6MIYZ.js.map +0 -7
- package/dist/chunks/chunk-2D7JNKFE.js.map +0 -7
- package/dist/chunks/chunk-6OGI4UFJ.js +0 -367
- package/dist/chunks/chunk-6OGI4UFJ.js.map +0 -7
- package/dist/chunks/chunk-WBKHYZU2.js.map +0 -7
- package/dist/chunks/control-widgets-3V2LSSRF.js.map +0 -7
- package/dist/chunks/fleet-feed-5QGDLOV5.js.map +0 -7
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type MeasurementStreamState, type WidgetActions, type WidgetDataSource, type WidgetDescriptor, type WidgetInstance } from '@devicechain/dashboards';
|
|
2
|
+
import { type ComponentType } from 'react';
|
|
3
|
+
export interface EventMarkersFeedProps {
|
|
4
|
+
hub: WidgetDataSource;
|
|
5
|
+
widget: WidgetInstance;
|
|
6
|
+
descriptor: WidgetDescriptor;
|
|
7
|
+
data: MeasurementStreamState;
|
|
8
|
+
Component: ComponentType<any>;
|
|
9
|
+
actions: WidgetActions | undefined;
|
|
10
|
+
}
|
|
11
|
+
export default function EventMarkersFeed({ hub, widget, descriptor, data, Component, actions }: EventMarkersFeedProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AlarmRow, CommandRow } from '@devicechain/dashboards';
|
|
2
|
+
import { type AlarmLevel } from '@devicechain/widget-sdk';
|
|
3
|
+
import { type ChartTheme, type EChartOption } from '@devicechain/widget-sdk/echarts';
|
|
4
|
+
import type { EventKind, EventMarkerStrings } from './event-markers-strings';
|
|
5
|
+
export declare const MAX_EVENT_MARKERS = 30;
|
|
6
|
+
export interface EventRange {
|
|
7
|
+
from: number;
|
|
8
|
+
to: number;
|
|
9
|
+
}
|
|
10
|
+
export interface EventItem {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: EventKind;
|
|
13
|
+
at: number;
|
|
14
|
+
end: number | null;
|
|
15
|
+
level: AlarmLevel | undefined;
|
|
16
|
+
name: string;
|
|
17
|
+
title: string;
|
|
18
|
+
detail: string;
|
|
19
|
+
metric?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function alarmLevel(severity: string): AlarmLevel | undefined;
|
|
22
|
+
export declare function alarmEvents(rows: readonly AlarmRow[], deviceToken: string | undefined, range: EventRange, words: EventMarkerStrings, fmt: (at: number) => string): EventItem[];
|
|
23
|
+
export type AlarmScope = 'series' | 'device';
|
|
24
|
+
export declare function alarmScope(value: unknown): AlarmScope;
|
|
25
|
+
export declare function splitByScope(items: readonly EventItem[], scope: AlarmScope, charted: ReadonlySet<string>): {
|
|
26
|
+
drawn: EventItem[];
|
|
27
|
+
other: EventItem[];
|
|
28
|
+
};
|
|
29
|
+
export declare function commandEvents(rows: readonly CommandRow[], range: EventRange, words: EventMarkerStrings, fmt: (at: number) => string): EventItem[];
|
|
30
|
+
export interface MarkerPlan {
|
|
31
|
+
shown: EventItem[];
|
|
32
|
+
hidden: number;
|
|
33
|
+
decorate: (option: EChartOption, size?: {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
}) => EChartOption;
|
|
37
|
+
}
|
|
38
|
+
export declare function planMarkers(items: readonly EventItem[], range: EventRange, theme: ChartTheme): MarkerPlan;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type EventKind = 'alarm' | 'command';
|
|
2
|
+
export interface EventMarkerStrings {
|
|
3
|
+
events: (count: number) => string;
|
|
4
|
+
otherAlarms: (count: number) => string;
|
|
5
|
+
noMeasurement: string;
|
|
6
|
+
aboutMeasurement: (name: string) => string;
|
|
7
|
+
alarm: string;
|
|
8
|
+
command: string;
|
|
9
|
+
severity: Record<string, string>;
|
|
10
|
+
raised: (time: string) => string;
|
|
11
|
+
cleared: (time: string) => string;
|
|
12
|
+
stillActive: string;
|
|
13
|
+
sent: (time: string) => string;
|
|
14
|
+
outcome: Record<string, string>;
|
|
15
|
+
more: (count: number) => string;
|
|
16
|
+
notInRecording: Record<EventKind, string>;
|
|
17
|
+
failed: Record<EventKind, string>;
|
|
18
|
+
}
|
|
19
|
+
export declare const EVENT_MARKER_STRINGS: Record<'en' | 'es', EventMarkerStrings>;
|
|
20
|
+
export declare function eventMarkerStrings(locale?: string | undefined): EventMarkerStrings;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ElementSize } from '@devicechain/widget-sdk';
|
|
2
|
+
import type { EChartOption } from '@devicechain/widget-sdk/echarts';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
export interface EventMarkersView {
|
|
5
|
+
decorate: (option: EChartOption, size?: ElementSize) => EChartOption;
|
|
6
|
+
footer: ReactNode;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FleetMember } from '@devicechain/dashboards';
|
|
2
|
+
import { type SeverityLevel, type Threshold } from '@devicechain/widget-sdk';
|
|
3
|
+
export interface AttentionCount {
|
|
4
|
+
members: number;
|
|
5
|
+
notMeasured: number;
|
|
6
|
+
flagged: number;
|
|
7
|
+
reporting: number;
|
|
8
|
+
pending: number;
|
|
9
|
+
unread: number;
|
|
10
|
+
worst: SeverityLevel | undefined;
|
|
11
|
+
label: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function attentionCount(members: readonly FleetMember[], measurement: string, thresholds: readonly Threshold[]): AttentionCount;
|
package/dist/fleet-feed.d.ts
CHANGED
|
@@ -19,4 +19,5 @@ export declare function GroupRefusal({ widget, descriptor }: {
|
|
|
19
19
|
descriptor: WidgetDescriptor;
|
|
20
20
|
}): import("react").JSX.Element;
|
|
21
21
|
export declare function shownMeasurements(widget: WidgetInstance): string[];
|
|
22
|
+
export declare function comparesMembers(descriptor: WidgetDescriptor): boolean;
|
|
22
23
|
export default function FleetEntry(props: FleetFeedProps): import("react").JSX.Element;
|
package/dist/fleet-model.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface FleetInputs {
|
|
|
4
4
|
roster: MemberRoster | null;
|
|
5
5
|
seeds: ReadonlyMap<string, MemberSeed | 'failed'>;
|
|
6
6
|
live: ReadonlyMap<string, ReadonlyMap<string, MeasurementSample>>;
|
|
7
|
+
declared?: ReadonlyMap<string, readonly string[] | null>;
|
|
7
8
|
since: number;
|
|
8
9
|
forbidden: boolean;
|
|
9
10
|
}
|
package/dist/fleet-strings.d.ts
CHANGED
|
@@ -13,7 +13,18 @@ export interface FleetStrings {
|
|
|
13
13
|
oneDevice: string;
|
|
14
14
|
useFleetTable: string;
|
|
15
15
|
usePerDevice: string;
|
|
16
|
+
useLinePerDevice: string;
|
|
16
17
|
stale: string;
|
|
18
|
+
noMeasurementCount: string;
|
|
19
|
+
noBands: string;
|
|
20
|
+
countOf: (total: number) => string;
|
|
21
|
+
needAttention: string;
|
|
22
|
+
devices: string;
|
|
23
|
+
notReporting: (n: number) => string;
|
|
24
|
+
notMeasured: (n: number) => string;
|
|
25
|
+
noneMeasured: string;
|
|
26
|
+
noneMeasuredShown: (shown: number, total: number) => string;
|
|
27
|
+
notRead: (n: number) => string;
|
|
17
28
|
truncated: (shown: number, total: number) => string;
|
|
18
29
|
range: (from: number, to: number, of: number) => string;
|
|
19
30
|
previous: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
export { DashboardRenderer, resolveWidgets, widgetSubjectLabel, type DashboardRendererProps } from './dashboard-renderer';
|
|
2
2
|
export { DEFAULT_TIME_RANGE_LABELS, PausedIndicator, TimeRangeBar, useBoardTimeRange, type TimeRangeControls, type TimeRangeLabels, } from './time-range-bar';
|
|
3
|
+
export { useBoundDevices, type BoundDevices, type BoundDevicesAddress, type BoundDevicesPhase, type LinkProblems, } from './use-bound-devices';
|
|
4
|
+
export { BoundDevicesNotice, describeBoundDevicesProblems, type BoundDevicesNoticeProps, type BoundDevicesWording, } from './bound-devices-notice';
|
|
3
5
|
export { ConnectedWidget, type ConnectedWidgetProps } from './connected-widget';
|
|
4
|
-
export { builtinWidgetCatalog, builtinWidgetDescriptors } from './
|
|
5
|
-
export { builtinWidgetDefinitions
|
|
6
|
+
export { builtinWidgetCatalog, builtinWidgetDescriptors, builtinWidgetDefinitions, createBuiltinWidgetRegistry, WIDGET_OPTIONS, } from './documented-descriptors';
|
|
7
|
+
export { builtinWidgetDefinitions as builtinWidgetDefinitionsWithoutDocs } from './builtin-registry';
|
|
6
8
|
export { preloadWidgets } from './preload';
|
|
7
9
|
export { WIDGET_CHANNEL, WIDGET_BINDS_DATASOURCE, type WidgetChannel } from './registry';
|
|
8
10
|
export { pickSample, optBoolean, type WidgetProps, type WidgetComponent } from '@devicechain/widget-sdk';
|
|
9
11
|
export { TenantBasemapProvider, useTenantBasemap } from './basemap-context';
|
|
10
12
|
export { MapRuntimeProvider, useMapRuntime, type MapRuntime } from './map-runtime-context';
|
|
11
|
-
export {
|
|
13
|
+
export { validateWidgetOptions, numberOptionSpec, clampNumberOption, enumOptionValues, type WidgetOptions, type WidgetOptionSpecs, type OptionSpec, type StringOptionSpec, type NumberOptionSpec, type BooleanOptionSpec, type EnumOptionSpec, type ListItemFieldSpec, type ListOptionSpec, type OptionIssue, type OptionIssueCode, } from './options';
|
|
12
14
|
export { validateDefinitionOptions, stripUnknownOptions, type DefinitionOptionIssue, type DefinitionValidationOptions, } from './definition-options';
|
|
13
15
|
export { LatestCard } from './widgets/latest-card';
|
|
14
16
|
export { Gauge } from './widgets/gauge';
|
|
@@ -18,6 +20,7 @@ export { Label } from './widgets/label';
|
|
|
18
20
|
export { Image } from './widgets/image';
|
|
19
21
|
export { AlarmTable } from './widgets/alarm-table';
|
|
20
22
|
export { AlarmCount } from './widgets/alarm-count';
|
|
23
|
+
export { AlarmSeverity } from './widgets/alarm-severity';
|
|
21
24
|
export { CommandButton } from './widgets/command-button';
|
|
22
25
|
export { EntitySelector } from './widgets/entity-selector';
|
|
23
26
|
export { MapWidget } from './widgets/map';
|