@devicechain/dashboards 0.26.0 → 0.27.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/dist/candidates.d.ts +3 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +233 -144
- package/dist/index.js.map +4 -4
- package/dist/internal/alarm-doc.d.ts +6 -0
- package/dist/queries.d.ts +19 -16
- package/dist/recording.d.ts +5 -0
- package/dist/slots.d.ts +2 -1
- package/dist/types.d.ts +5 -0
- package/dist/viewer-bindings.d.ts +4 -0
- package/package.json +3 -3
|
@@ -12,6 +12,11 @@ export interface AlarmSearchCriteriaInput {
|
|
|
12
12
|
deviceType?: string | null;
|
|
13
13
|
startTime?: string | null;
|
|
14
14
|
endTime?: string | null;
|
|
15
|
+
anchor?: AlarmAnchorInput | null;
|
|
16
|
+
}
|
|
17
|
+
export interface AlarmAnchorInput {
|
|
18
|
+
type: string;
|
|
19
|
+
token: string;
|
|
15
20
|
}
|
|
16
21
|
export interface AlarmsQueryResult {
|
|
17
22
|
alarms: {
|
|
@@ -76,6 +81,7 @@ export interface AlarmStreamVariables {
|
|
|
76
81
|
state?: string | null;
|
|
77
82
|
severity?: string | null;
|
|
78
83
|
alarmKey?: string | null;
|
|
84
|
+
anchor?: AlarmAnchorInput | null;
|
|
79
85
|
}
|
|
80
86
|
export declare const ALARM_STREAM: TypedDocument<AlarmStreamResult, AlarmStreamVariables>;
|
|
81
87
|
export interface AlarmMutationVariables {
|
package/dist/queries.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import type { TypedDocument } from '@devicechain/client';
|
|
2
|
-
export interface
|
|
3
|
-
|
|
2
|
+
export interface CustomerDevicesResult {
|
|
3
|
+
customerDevices: {
|
|
4
4
|
results: Array<{
|
|
5
|
-
|
|
5
|
+
token: string;
|
|
6
|
+
name: string | null;
|
|
7
|
+
deviceType?: {
|
|
6
8
|
token: string;
|
|
7
|
-
};
|
|
9
|
+
} | null;
|
|
8
10
|
}>;
|
|
9
11
|
pagination?: {
|
|
10
12
|
totalRecords: number | null;
|
|
11
13
|
} | null;
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
|
-
export interface
|
|
16
|
+
export interface CustomerDevicesVariables {
|
|
15
17
|
criteria: {
|
|
16
18
|
pageNumber: number;
|
|
17
19
|
pageSize: number;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
target: string;
|
|
21
|
-
relationshipType?: string | null;
|
|
20
|
+
customer: string;
|
|
21
|
+
relationshipType: string;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export declare const
|
|
25
|
-
export interface
|
|
26
|
-
|
|
24
|
+
export declare const CUSTOMER_DEVICES: TypedDocument<CustomerDevicesResult, CustomerDevicesVariables>;
|
|
25
|
+
export interface AnchorDevicesResult {
|
|
26
|
+
anchorDevices: {
|
|
27
27
|
results: Array<{
|
|
28
28
|
token: string;
|
|
29
29
|
name: string | null;
|
|
@@ -36,15 +36,16 @@ export interface CustomerDevicesResult {
|
|
|
36
36
|
} | null;
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
export interface
|
|
39
|
+
export interface AnchorDevicesVariables {
|
|
40
40
|
criteria: {
|
|
41
41
|
pageNumber: number;
|
|
42
42
|
pageSize: number;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
targetType: string;
|
|
44
|
+
target: string;
|
|
45
|
+
relationshipType?: string | null;
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
export declare const
|
|
48
|
+
export declare const ANCHOR_DEVICES: TypedDocument<AnchorDevicesResult, AnchorDevicesVariables>;
|
|
48
49
|
export interface DevicesByTokenResult {
|
|
49
50
|
devicesByToken: Array<{
|
|
50
51
|
token: string;
|
|
@@ -90,6 +91,8 @@ export interface EntityListVariables {
|
|
|
90
91
|
criteria: {
|
|
91
92
|
pageNumber: number;
|
|
92
93
|
pageSize: number;
|
|
94
|
+
areaTypeToken?: string | null;
|
|
95
|
+
assetTypeToken?: string | null;
|
|
93
96
|
};
|
|
94
97
|
}
|
|
95
98
|
export declare const LIST_DEVICES: TypedDocument<{
|
package/dist/recording.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AnchorTarget } from './types';
|
|
1
2
|
export declare const RECORDING_FORMAT_VERSION = 2;
|
|
2
3
|
export declare const RECORDING_FORMAT_VERSIONS: readonly [1, 2];
|
|
3
4
|
export declare const RECORDING_KIND = "sitepulse-board-recording";
|
|
@@ -64,6 +65,9 @@ export interface RecordedLocationColumns {
|
|
|
64
65
|
spd: Array<number | null>;
|
|
65
66
|
}
|
|
66
67
|
export type RecordedDeclarations = Record<string, string[]>;
|
|
68
|
+
export interface RecordedAnchor extends AnchorTarget {
|
|
69
|
+
devices: string[];
|
|
70
|
+
}
|
|
67
71
|
export interface BoardRecording {
|
|
68
72
|
kind: typeof RECORDING_KIND;
|
|
69
73
|
formatVersion: (typeof RECORDING_FORMAT_VERSIONS)[number];
|
|
@@ -80,6 +84,7 @@ export interface BoardRecording {
|
|
|
80
84
|
clock: RecordedClockSegment[];
|
|
81
85
|
devices: RecordedDevice[];
|
|
82
86
|
declaredMetrics?: RecordedDeclarations;
|
|
87
|
+
anchors?: RecordedAnchor[];
|
|
83
88
|
channels: RecordedChannels;
|
|
84
89
|
board: {
|
|
85
90
|
path: string;
|
package/dist/slots.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnchorTarget, type DashboardDefinition, type LocationSelection, type SlotBinding, type SlotDefinition, type SlotScope, type WidgetInstance } from './types';
|
|
1
|
+
import { type AnchorTarget, type DashboardDefinition, type LocationSelection, type SlotBinding, type SlotDefinition, type SlotCandidates, type SlotScope, type WidgetInstance } from './types';
|
|
2
2
|
export declare function sameBinding(a: SlotBinding | undefined, b: SlotBinding | undefined): boolean;
|
|
3
3
|
export declare function nextSlotName(slots: Record<string, SlotDefinition>): string;
|
|
4
4
|
export declare function migrateToSlots(def: DashboardDefinition): DashboardDefinition;
|
|
@@ -7,6 +7,7 @@ export declare function clearWidgetDatasource(def: DashboardDefinition, widgetId
|
|
|
7
7
|
export declare function pruneSlots(def: DashboardDefinition): DashboardDefinition;
|
|
8
8
|
export declare function anchorSlotNames(def: DashboardDefinition): string[];
|
|
9
9
|
export declare function setSlotScope(def: DashboardDefinition, slotName: string, scope: SlotScope | undefined): DashboardDefinition;
|
|
10
|
+
export declare function setSlotCandidates(def: DashboardDefinition, slotName: string, candidates: SlotCandidates | undefined): DashboardDefinition;
|
|
10
11
|
export declare function widgetBinding(def: DashboardDefinition, widget: WidgetInstance): SlotBinding | undefined;
|
|
11
12
|
export declare function widgetSlotName(widget: WidgetInstance): string | undefined;
|
|
12
13
|
export type ConcreteSelector = {
|
package/dist/types.d.ts
CHANGED
|
@@ -226,6 +226,11 @@ export interface SlotDefinition {
|
|
|
226
226
|
label?: string;
|
|
227
227
|
defaultBinding?: SlotBinding;
|
|
228
228
|
scope?: SlotScope;
|
|
229
|
+
candidates?: SlotCandidates;
|
|
230
|
+
}
|
|
231
|
+
export interface SlotCandidates {
|
|
232
|
+
areaType?: string;
|
|
233
|
+
assetType?: string;
|
|
229
234
|
}
|
|
230
235
|
export type EntityListKind = 'device' | 'customer' | 'area' | 'asset';
|
|
231
236
|
export type EntityCandidateLister = (kind: EntityListKind) => Promise<Array<{
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type MemberResolver } from './context';
|
|
2
|
+
import type { DashboardDefinition, EntityCandidateLister, SlotBinding } from './types';
|
|
3
|
+
export declare function hasRootAnchorSlots(definition: DashboardDefinition): boolean;
|
|
4
|
+
export declare function resolveViewerBindings(definition: DashboardDefinition, base: Record<string, SlotBinding>, overlay: Record<string, SlotBinding>, resolver: MemberResolver, lister?: EntityCandidateLister): Promise<Record<string, SlotBinding>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devicechain/dashboards",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0-rc.1",
|
|
4
4
|
"description": "DeviceChain dashboard runtime — the DashboardHub (telemetry subscription multiplexing over the client wire, plus the alarm, command and location channels) and the dashboard-definition, selector, slot, and binding-manifest types.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devicechain",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@graphql-typed-document-node/core": "^3.2.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@devicechain/client": "0.
|
|
49
|
+
"@devicechain/client": "0.27.0-rc.1",
|
|
50
50
|
"graphql": "^16.0.0 || ^17.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@devicechain/client": "0.
|
|
53
|
+
"@devicechain/client": "0.27.0-rc.1",
|
|
54
54
|
"@types/node": "^26.6.5",
|
|
55
55
|
"graphql": "^17.0.2",
|
|
56
56
|
"typescript": "~7.0.2",
|