@yamcs/opi 1.2.6 → 1.2.8
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/LICENSE +0 -35
- package/dist/fonts/LiberationMono-Bold.woff2 +0 -0
- package/dist/fonts/LiberationMono-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationMono-Italic.woff2 +0 -0
- package/dist/fonts/LiberationMono-Regular.woff2 +0 -0
- package/dist/fonts/LiberationSans-Bold.woff2 +0 -0
- package/dist/fonts/LiberationSans-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationSans-Italic.woff2 +0 -0
- package/dist/fonts/LiberationSans-Regular.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Bold.woff2 +0 -0
- package/dist/fonts/LiberationSerif-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Italic.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Regular.woff2 +0 -0
- package/dist/opi.js +1 -1
- package/dist/opi.js.map +1 -1
- package/dist/types/Color.d.ts +36 -36
- package/dist/types/ColorMap.d.ts +23 -23
- package/dist/types/ConsoleHandler.d.ts +10 -10
- package/dist/types/DecimalFormat.d.ts +36 -36
- package/dist/types/DialogHandler.d.ts +14 -0
- package/dist/types/Display.d.ts +141 -130
- package/dist/types/EventHandler.d.ts +34 -34
- package/dist/types/Font.d.ts +15 -13
- package/dist/types/FontResolver.d.ts +4 -0
- package/dist/types/Graphics.d.ts +172 -172
- package/dist/types/HitCanvas.d.ts +14 -14
- package/dist/types/HitRegionSpecification.d.ts +15 -15
- package/dist/types/PathResolver.d.ts +10 -10
- package/dist/types/Range.d.ts +4 -4
- package/dist/types/Widget.d.ts +118 -112
- package/dist/types/XMLNode.d.ts +83 -83
- package/dist/types/actions/Action.d.ts +10 -0
- package/dist/types/actions/ExecuteCommandAction.d.ts +10 -0
- package/dist/types/actions/ExecuteJavaScriptAction.d.ts +10 -0
- package/dist/types/actions/OpenDisplayAction.d.ts +11 -0
- package/dist/types/actions/OpenFileAction.d.ts +8 -0
- package/dist/types/actions/OpenWebpageAction.d.ts +8 -0
- package/dist/types/actions/PlaySoundAction.d.ts +8 -0
- package/dist/types/actions/WritePVAction.d.ts +11 -0
- package/dist/types/actions.d.ts +10 -64
- package/dist/types/events.d.ts +41 -41
- package/dist/types/index.d.ts +11 -8
- package/dist/types/macros.d.ts +9 -9
- package/dist/types/positioning.d.ts +57 -57
- package/dist/types/properties.d.ts +89 -89
- package/dist/types/pv/FormulaPVProvider.d.ts +10 -10
- package/dist/types/pv/LocalPV.d.ts +10 -10
- package/dist/types/pv/PV.d.ts +62 -62
- package/dist/types/pv/PVEngine.d.ts +57 -47
- package/dist/types/pv/PVProvider.d.ts +8 -8
- package/dist/types/pv/Sample.d.ts +11 -11
- package/dist/types/pv/SimulatedPVProvider.d.ts +10 -10
- package/dist/types/pv/formulas/CompiledFormula.d.ts +23 -23
- package/dist/types/pv/formulas/FormulaCompiler.d.ts +5 -5
- package/dist/types/pv/formulas/ast.d.ts +60 -60
- package/dist/types/pv/formulas/manual-test.d.ts +1 -1
- package/dist/types/pv/sim.d.ts +60 -60
- package/dist/types/rules.d.ts +26 -26
- package/dist/types/scale.d.ts +39 -39
- package/dist/types/scripting/ActionWrapper.d.ts +12 -0
- package/dist/types/scripting/ArrayList.d.ts +5 -0
- package/dist/types/scripting/ColorFontUtil.d.ts +19 -19
- package/dist/types/scripting/ConsoleUtil.d.ts +8 -8
- package/dist/types/scripting/DataUtil.d.ts +6 -6
- package/dist/types/scripting/DisplayWrapper.d.ts +9 -7
- package/dist/types/scripting/FileUtil.d.ts +6 -6
- package/dist/types/scripting/GUIUtil.d.ts +11 -8
- package/dist/types/scripting/Java.d.ts +84 -18
- package/dist/types/scripting/MessageDialog.d.ts +8 -5
- package/dist/types/scripting/PVUtil.d.ts +19 -16
- package/dist/types/scripting/PVWrapper.d.ts +11 -10
- package/dist/types/scripting/ScriptEngine.d.ts +12 -8
- package/dist/types/scripting/ScriptUtil.d.ts +7 -7
- package/dist/types/scripting/SpreadSheetTable.d.ts +43 -36
- package/dist/types/scripting/SpreadSheetTableWrapper.d.ts +30 -0
- package/dist/types/scripting/TableWrapper.d.ts +10 -9
- package/dist/types/scripting/WidgetWrapper.d.ts +28 -25
- package/dist/types/scripting/XYGraphWrapper.d.ts +9 -9
- package/dist/types/scripting/utils.d.ts +4 -3
- package/dist/types/scripts.d.ts +19 -19
- package/dist/types/utils.d.ts +2 -2
- package/dist/types/widgets/controls/ActionButton.d.ts +23 -21
- package/dist/types/widgets/controls/BooleanButton.d.ts +37 -37
- package/dist/types/widgets/controls/BooleanSwitch.d.ts +32 -32
- package/dist/types/widgets/controls/CheckBox.d.ts +24 -24
- package/dist/types/widgets/controls/ChoiceButton.d.ts +23 -23
- package/dist/types/widgets/controls/Combo.d.ts +20 -20
- package/dist/types/widgets/controls/ImageBooleanButton.d.ts +33 -33
- package/dist/types/widgets/controls/MenuButton.d.ts +18 -18
- package/dist/types/widgets/controls/NativeButton.d.ts +9 -9
- package/dist/types/widgets/controls/RadioBox.d.ts +26 -26
- package/dist/types/widgets/controls/Scrollbar.d.ts +51 -51
- package/dist/types/widgets/controls/TextInput.d.ts +27 -27
- package/dist/types/widgets/figures/Ramp.d.ts +36 -36
- package/dist/types/widgets/graphics/Arc.d.ts +15 -15
- package/dist/types/widgets/graphics/Ellipse.d.ts +20 -20
- package/dist/types/widgets/graphics/ImageHelper.d.ts +3 -3
- package/dist/types/widgets/graphics/ImageWidget.d.ts +19 -19
- package/dist/types/widgets/graphics/Label.d.ts +15 -15
- package/dist/types/widgets/graphics/Polygon.d.ts +19 -19
- package/dist/types/widgets/graphics/Polyline.d.ts +20 -20
- package/dist/types/widgets/graphics/Rectangle.d.ts +20 -20
- package/dist/types/widgets/graphics/RoundedRectangle.d.ts +22 -22
- package/dist/types/widgets/monitors/ByteMonitor.d.ts +27 -27
- package/dist/types/widgets/monitors/Gauge.d.ts +40 -40
- package/dist/types/widgets/monitors/ImageBooleanIndicator.d.ts +25 -25
- package/dist/types/widgets/monitors/IntensityGraph.d.ts +43 -43
- package/dist/types/widgets/monitors/LED.d.ts +37 -37
- package/dist/types/widgets/monitors/LinearScale.d.ts +66 -66
- package/dist/types/widgets/monitors/Meter.d.ts +39 -39
- package/dist/types/widgets/monitors/ProgressBar.d.ts +64 -64
- package/dist/types/widgets/monitors/Tank.d.ts +52 -52
- package/dist/types/widgets/monitors/TextUpdate.d.ts +17 -17
- package/dist/types/widgets/monitors/Thermometer.d.ts +58 -58
- package/dist/types/widgets/monitors/xygraph/Axis.d.ts +41 -41
- package/dist/types/widgets/monitors/xygraph/CommandBuffer.d.ts +26 -26
- package/dist/types/widgets/monitors/xygraph/PlotAreaRegion.d.ts +22 -22
- package/dist/types/widgets/monitors/xygraph/Trace.d.ts +38 -38
- package/dist/types/widgets/monitors/xygraph/TraceBuffer.d.ts +32 -32
- package/dist/types/widgets/monitors/xygraph/XYGraph.d.ts +44 -44
- package/dist/types/widgets/monitors/xygraph/XYGraphToolbar.d.ts +54 -54
- package/dist/types/widgets/others/AbstractContainerWidget.d.ts +21 -21
- package/dist/types/widgets/others/Connection.d.ts +39 -39
- package/dist/types/widgets/others/DisplayWidget.d.ts +13 -13
- package/dist/types/widgets/others/GroupingContainer.d.ts +8 -8
- package/dist/types/widgets/others/LinkingContainer.d.ts +19 -19
- package/dist/types/widgets/others/TabbedContainer.d.ts +24 -24
- package/dist/types/widgets/others/Table.d.ts +22 -22
- package/dist/types/widgets/others/WebBrowser.d.ts +14 -14
- package/package.json +5 -10
- package/dist/fonts/LiberationMono-Bold.woff +0 -0
- package/dist/fonts/LiberationMono-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationMono-Italic.woff +0 -0
- package/dist/fonts/LiberationMono-Regular.woff +0 -0
- package/dist/fonts/LiberationSans-Bold.woff +0 -0
- package/dist/fonts/LiberationSans-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationSans-Italic.woff +0 -0
- package/dist/fonts/LiberationSans-Regular.woff +0 -0
- package/dist/fonts/LiberationSerif-Bold.woff +0 -0
- package/dist/fonts/LiberationSerif-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationSerif-Italic.woff +0 -0
- package/dist/fonts/LiberationSerif-Regular.woff +0 -0
- package/dist/fonts/stylesheet.css +0 -83
- package/dist/opi.umd.js +0 -2
- package/dist/opi.umd.js.map +0 -1
package/dist/types/Widget.d.ts
CHANGED
|
@@ -1,112 +1,118 @@
|
|
|
1
|
-
import { ActionSet } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
get
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
get
|
|
72
|
-
get
|
|
73
|
-
get
|
|
74
|
-
get
|
|
75
|
-
get
|
|
76
|
-
get
|
|
77
|
-
get
|
|
78
|
-
get
|
|
79
|
-
get
|
|
80
|
-
get
|
|
81
|
-
get
|
|
82
|
-
get
|
|
83
|
-
get
|
|
84
|
-
get
|
|
85
|
-
get
|
|
86
|
-
get
|
|
87
|
-
get
|
|
88
|
-
get
|
|
89
|
-
get
|
|
90
|
-
get
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
1
|
+
import { ActionSet } from "./actions";
|
|
2
|
+
import { Action } from "./actions/Action";
|
|
3
|
+
import { Color } from "./Color";
|
|
4
|
+
import { Display } from "./Display";
|
|
5
|
+
import { Graphics } from "./Graphics";
|
|
6
|
+
import { Bounds } from "./positioning";
|
|
7
|
+
import { PropertyListener, PropertySet } from "./properties";
|
|
8
|
+
import { PV } from "./pv/PV";
|
|
9
|
+
import { RuleSet } from "./rules";
|
|
10
|
+
import { ScaleOptions } from "./scale";
|
|
11
|
+
import { ScriptSet } from "./scripts";
|
|
12
|
+
import { AbstractContainerWidget } from "./widgets/others/AbstractContainerWidget";
|
|
13
|
+
import { XMLNode } from "./XMLNode";
|
|
14
|
+
export declare abstract class Widget {
|
|
15
|
+
readonly display: Display;
|
|
16
|
+
readonly parent?: AbstractContainerWidget | undefined;
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
private _value;
|
|
22
|
+
protected fillRoundRectangleBackgroundBorder: boolean;
|
|
23
|
+
private holderRegion?;
|
|
24
|
+
properties: PropertySet;
|
|
25
|
+
readonly vars: Map<string, any>;
|
|
26
|
+
private pvs;
|
|
27
|
+
constructor(display: Display, parent?: AbstractContainerWidget | undefined);
|
|
28
|
+
parseNode(node: XMLNode): void;
|
|
29
|
+
getHookedActions(): Action[];
|
|
30
|
+
drawHolder(g: Graphics): void;
|
|
31
|
+
beforeDrawBorder(g: Graphics): void;
|
|
32
|
+
private drawBorderStyle;
|
|
33
|
+
private isDisconnected;
|
|
34
|
+
drawDecoration(g: Graphics): void;
|
|
35
|
+
drawOverlay(g: Graphics): void;
|
|
36
|
+
drawSelection(ctx: CanvasRenderingContext2D): void;
|
|
37
|
+
requestRepaint(): void;
|
|
38
|
+
resolvePath(path: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Bounds of this widget (within its parent).
|
|
41
|
+
* Bounds cover the entire widget: area + ornaments.
|
|
42
|
+
*/
|
|
43
|
+
get bounds(): Bounds;
|
|
44
|
+
get unscaledBounds(): Bounds;
|
|
45
|
+
/**
|
|
46
|
+
* Area where the widget can draw.
|
|
47
|
+
* (this is smaller than the actual widget bounds).
|
|
48
|
+
*/
|
|
49
|
+
get area(): Bounds;
|
|
50
|
+
private drawShadowBorder;
|
|
51
|
+
private drawDashedBorder;
|
|
52
|
+
executeActionByIndex(index: number): void;
|
|
53
|
+
executeAction(action: Action): void;
|
|
54
|
+
expandMacro(text: string): string;
|
|
55
|
+
private loadFont;
|
|
56
|
+
get pv(): PV | undefined;
|
|
57
|
+
isMinorSeverity(): boolean;
|
|
58
|
+
isMajorSeverity(): boolean;
|
|
59
|
+
get alarm(): boolean;
|
|
60
|
+
get alarmSensitiveBackgroundColor(): Color;
|
|
61
|
+
get alarmSensitiveForegroundColor(): Color;
|
|
62
|
+
get scale(): number;
|
|
63
|
+
get value(): any;
|
|
64
|
+
set value(value: any);
|
|
65
|
+
addPropertyListener(propertyName: string, listener: PropertyListener<any>): void;
|
|
66
|
+
removePropertyListener(propertyName: string, listener: PropertyListener<any>): void;
|
|
67
|
+
/**
|
|
68
|
+
* Returns this widget as an image.
|
|
69
|
+
*/
|
|
70
|
+
toDataURL(type?: string, quality?: any): string;
|
|
71
|
+
get wuid(): string;
|
|
72
|
+
get name(): string;
|
|
73
|
+
get holderX(): number;
|
|
74
|
+
get holderY(): number;
|
|
75
|
+
get holderWidth(): number;
|
|
76
|
+
get holderHeight(): number;
|
|
77
|
+
get borderAlarmSensitive(): boolean;
|
|
78
|
+
get backgroundAlarmSensitive(): boolean;
|
|
79
|
+
get foregroundAlarmSensitive(): boolean;
|
|
80
|
+
get pvName(): string | undefined;
|
|
81
|
+
get pvValue(): any;
|
|
82
|
+
get borderColor(): Color;
|
|
83
|
+
get borderStyle(): number;
|
|
84
|
+
get borderWidth(): number;
|
|
85
|
+
get backgroundColor(): Color;
|
|
86
|
+
get enabled(): boolean;
|
|
87
|
+
get foregroundColor(): Color;
|
|
88
|
+
get tooltip(): string | undefined;
|
|
89
|
+
get transparent(): boolean;
|
|
90
|
+
get visible(): boolean;
|
|
91
|
+
get actions(): ActionSet;
|
|
92
|
+
get scripts(): ScriptSet;
|
|
93
|
+
get rules(): RuleSet;
|
|
94
|
+
get scaleOptions(): ScaleOptions;
|
|
95
|
+
get widgetType(): string | undefined;
|
|
96
|
+
get text(): string;
|
|
97
|
+
/**
|
|
98
|
+
* Called exactly once post-construct. A destroyed widget will
|
|
99
|
+
* never be re-inited.
|
|
100
|
+
*/
|
|
101
|
+
init(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Called when a widget should temporarily hide content
|
|
104
|
+
* (tab switch).
|
|
105
|
+
*
|
|
106
|
+
* Most widgets don't need to override, but it used by some
|
|
107
|
+
* that position HTML on top of the canvas.
|
|
108
|
+
*
|
|
109
|
+
* Unhide should occur upon the next draw request.
|
|
110
|
+
*/
|
|
111
|
+
hide(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Called when a widget will never be used again.
|
|
114
|
+
* (display close).
|
|
115
|
+
*/
|
|
116
|
+
destroy(): void;
|
|
117
|
+
abstract draw(g: Graphics): void;
|
|
118
|
+
}
|
package/dist/types/XMLNode.d.ts
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { ActionSet } from
|
|
2
|
-
import { Color } from
|
|
3
|
-
import { ColorMap } from
|
|
4
|
-
import { Font } from
|
|
5
|
-
import { MacroSet } from
|
|
6
|
-
import { RuleSet } from
|
|
7
|
-
import { AutoScaleWidgets, ScaleOptions } from
|
|
8
|
-
import { ScriptSet } from
|
|
9
|
-
export declare class XMLNode {
|
|
10
|
-
private node;
|
|
11
|
-
constructor(node: Node);
|
|
12
|
-
get name(): string;
|
|
13
|
-
static parseFromXML(xml: string): XMLNode;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
getNode(name: string): XMLNode;
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
getNodes(name?: string): XMLNode[];
|
|
25
|
-
hasNode(name: string): boolean;
|
|
26
|
-
hasAttribute(name: string): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Returns the inner content of this node as a string
|
|
29
|
-
*/
|
|
30
|
-
getTextContent(defaultValue?: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Parses the child node contents of the given parent node as a string.
|
|
33
|
-
*
|
|
34
|
-
* @throws when no such child was found and defaultValue was undefined
|
|
35
|
-
*/
|
|
36
|
-
getString(name: string, defaultValue?: string): string;
|
|
37
|
-
getStringAttribute(name: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Parses the child node contents of the given parent node as a float.
|
|
40
|
-
*
|
|
41
|
-
* @throws when no such child was found and defaultValue was undefined.
|
|
42
|
-
*/
|
|
43
|
-
getFloat(name: string, defaultValue?: number): number;
|
|
44
|
-
/**
|
|
45
|
-
* Parses the child node contents of the given parent node as an integer.
|
|
46
|
-
*
|
|
47
|
-
* @throws when no such child was found and defaultValue was undefined.
|
|
48
|
-
*/
|
|
49
|
-
getInt(name: string, defaultValue?: number): number;
|
|
50
|
-
getIntAttribute(name: string): number;
|
|
51
|
-
/**
|
|
52
|
-
* Parses the child node contents of the given parent node as a boolean.
|
|
53
|
-
*
|
|
54
|
-
* @throws when no such child was found and defaultValue was undefined.
|
|
55
|
-
*/
|
|
56
|
-
getBoolean(name: string, defaultValue?: boolean): boolean;
|
|
57
|
-
getBooleanAttribute(name: string, defaultValue?: boolean): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Parses the child node contents as a color.
|
|
60
|
-
*
|
|
61
|
-
* @throws when no such child was found and defaultValue was undefined.
|
|
62
|
-
*/
|
|
63
|
-
getColor(name: string, defaultValue?: Color): Color;
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
getFont(name: string): Font;
|
|
68
|
-
getPoints(name: string): {
|
|
69
|
-
x: number;
|
|
70
|
-
y: number;
|
|
71
|
-
}[];
|
|
72
|
-
getStringList(name: string): string[];
|
|
73
|
-
getStringTable(name: string): string[][];
|
|
74
|
-
getScripts(name: string): ScriptSet;
|
|
75
|
-
getScaleOptions(name: string): ScaleOptions;
|
|
76
|
-
getAutoScaleWidgets(name: string): AutoScaleWidgets;
|
|
77
|
-
getColorMap(name: string): ColorMap | undefined;
|
|
78
|
-
getRules(name: string): RuleSet;
|
|
79
|
-
getMacros(name: string): MacroSet;
|
|
80
|
-
getActions(name: string): ActionSet;
|
|
81
|
-
private parseColorNode;
|
|
82
|
-
private findChild;
|
|
83
|
-
}
|
|
1
|
+
import { ActionSet } from "./actions";
|
|
2
|
+
import { Color } from "./Color";
|
|
3
|
+
import { ColorMap } from "./ColorMap";
|
|
4
|
+
import { Font } from "./Font";
|
|
5
|
+
import { MacroSet } from "./macros";
|
|
6
|
+
import { RuleSet } from "./rules";
|
|
7
|
+
import { AutoScaleWidgets, ScaleOptions } from "./scale";
|
|
8
|
+
import { ScriptSet } from "./scripts";
|
|
9
|
+
export declare class XMLNode {
|
|
10
|
+
private node;
|
|
11
|
+
constructor(node: Node);
|
|
12
|
+
get name(): string;
|
|
13
|
+
static parseFromXML(xml: string): XMLNode;
|
|
14
|
+
/**
|
|
15
|
+
* Searches for a direct child with the specified name.
|
|
16
|
+
*
|
|
17
|
+
* @throws when no such child was found
|
|
18
|
+
*/
|
|
19
|
+
getNode(name: string): XMLNode;
|
|
20
|
+
/**
|
|
21
|
+
* Searches for all direct children with the specified name.
|
|
22
|
+
* If this name is undefined, all children are returned.
|
|
23
|
+
*/
|
|
24
|
+
getNodes(name?: string): XMLNode[];
|
|
25
|
+
hasNode(name: string): boolean;
|
|
26
|
+
hasAttribute(name: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the inner content of this node as a string
|
|
29
|
+
*/
|
|
30
|
+
getTextContent(defaultValue?: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Parses the child node contents of the given parent node as a string.
|
|
33
|
+
*
|
|
34
|
+
* @throws when no such child was found and defaultValue was undefined
|
|
35
|
+
*/
|
|
36
|
+
getString(name: string, defaultValue?: string): string;
|
|
37
|
+
getStringAttribute(name: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Parses the child node contents of the given parent node as a float.
|
|
40
|
+
*
|
|
41
|
+
* @throws when no such child was found and defaultValue was undefined.
|
|
42
|
+
*/
|
|
43
|
+
getFloat(name: string, defaultValue?: number): number;
|
|
44
|
+
/**
|
|
45
|
+
* Parses the child node contents of the given parent node as an integer.
|
|
46
|
+
*
|
|
47
|
+
* @throws when no such child was found and defaultValue was undefined.
|
|
48
|
+
*/
|
|
49
|
+
getInt(name: string, defaultValue?: number): number;
|
|
50
|
+
getIntAttribute(name: string): number;
|
|
51
|
+
/**
|
|
52
|
+
* Parses the child node contents of the given parent node as a boolean.
|
|
53
|
+
*
|
|
54
|
+
* @throws when no such child was found and defaultValue was undefined.
|
|
55
|
+
*/
|
|
56
|
+
getBoolean(name: string, defaultValue?: boolean): boolean;
|
|
57
|
+
getBooleanAttribute(name: string, defaultValue?: boolean): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Parses the child node contents as a color.
|
|
60
|
+
*
|
|
61
|
+
* @throws when no such child was found and defaultValue was undefined.
|
|
62
|
+
*/
|
|
63
|
+
getColor(name: string, defaultValue?: Color): Color;
|
|
64
|
+
/**
|
|
65
|
+
* Parses the child node contents as a font.
|
|
66
|
+
*/
|
|
67
|
+
getFont(name: string): Font;
|
|
68
|
+
getPoints(name: string): {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
}[];
|
|
72
|
+
getStringList(name: string): string[];
|
|
73
|
+
getStringTable(name: string): string[][];
|
|
74
|
+
getScripts(name: string): ScriptSet;
|
|
75
|
+
getScaleOptions(name: string): ScaleOptions;
|
|
76
|
+
getAutoScaleWidgets(name: string): AutoScaleWidgets;
|
|
77
|
+
getColorMap(name: string): ColorMap | undefined;
|
|
78
|
+
getRules(name: string): RuleSet;
|
|
79
|
+
getMacros(name: string): MacroSet;
|
|
80
|
+
getActions(name: string): ActionSet;
|
|
81
|
+
private parseColorNode;
|
|
82
|
+
private findChild;
|
|
83
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropertySet } from "../properties";
|
|
2
|
+
import { Widget } from "../Widget";
|
|
3
|
+
import { XMLNode } from "../XMLNode";
|
|
4
|
+
export declare abstract class Action {
|
|
5
|
+
properties: PropertySet;
|
|
6
|
+
constructor();
|
|
7
|
+
parseNode(node: XMLNode): void;
|
|
8
|
+
abstract execute(widget: Widget): void;
|
|
9
|
+
get description(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Widget } from "../Widget";
|
|
2
|
+
import { Action } from "./Action";
|
|
3
|
+
export declare class ExecuteCommandAction extends Action {
|
|
4
|
+
constructor();
|
|
5
|
+
execute(widget: Widget): void;
|
|
6
|
+
get command(): string;
|
|
7
|
+
get commandDirectory(): string;
|
|
8
|
+
get waitTime(): number;
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Widget } from "../Widget";
|
|
2
|
+
import { Action } from "./Action";
|
|
3
|
+
export declare class ExecuteJavaScriptAction extends Action {
|
|
4
|
+
constructor();
|
|
5
|
+
execute(widget: Widget): void;
|
|
6
|
+
get path(): string;
|
|
7
|
+
get embedded(): boolean;
|
|
8
|
+
get scriptText(): string;
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MacroSet } from "../macros";
|
|
2
|
+
import { Widget } from "../Widget";
|
|
3
|
+
import { Action } from "./Action";
|
|
4
|
+
export declare class OpenDisplayAction extends Action {
|
|
5
|
+
constructor();
|
|
6
|
+
execute(widget: Widget): void;
|
|
7
|
+
get macros(): MacroSet;
|
|
8
|
+
get path(): string;
|
|
9
|
+
get mode(): number;
|
|
10
|
+
toString(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Widget } from "../Widget";
|
|
2
|
+
import { Action } from "./Action";
|
|
3
|
+
export declare class WritePVAction extends Action {
|
|
4
|
+
constructor();
|
|
5
|
+
execute(widget: Widget): void;
|
|
6
|
+
get pvName(): string;
|
|
7
|
+
get value(): string;
|
|
8
|
+
get timeout(): number;
|
|
9
|
+
get confirmMessage(): string;
|
|
10
|
+
toString(): string;
|
|
11
|
+
}
|
package/dist/types/actions.d.ts
CHANGED
|
@@ -1,64 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
toString(): string;
|
|
10
|
-
}
|
|
11
|
-
declare type Action = ExecuteCommandAction | ExecuteJavaScriptAction | OpenDisplayAction | OpenFileAction | OpenWebpageAction | WritePVAction | PlaySoundAction;
|
|
12
|
-
export declare class OpenDisplayAction {
|
|
13
|
-
path: string;
|
|
14
|
-
readonly type = "OPEN_DISPLAY";
|
|
15
|
-
mode?: number;
|
|
16
|
-
description?: string;
|
|
17
|
-
constructor(path: string);
|
|
18
|
-
toString(): string;
|
|
19
|
-
}
|
|
20
|
-
export declare class OpenFileAction {
|
|
21
|
-
readonly type = "OPEN_FILE";
|
|
22
|
-
path?: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
toString(): string;
|
|
25
|
-
}
|
|
26
|
-
export declare class ExecuteJavaScriptAction {
|
|
27
|
-
embedded: boolean;
|
|
28
|
-
readonly type = "EXECUTE_JAVASCRIPT";
|
|
29
|
-
text?: string;
|
|
30
|
-
path?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
constructor(embedded: boolean);
|
|
33
|
-
toString(): string;
|
|
34
|
-
}
|
|
35
|
-
export declare class ExecuteCommandAction {
|
|
36
|
-
readonly type = "EXECUTE_CMD";
|
|
37
|
-
command?: string;
|
|
38
|
-
commandDirectory?: string;
|
|
39
|
-
waitTime?: number;
|
|
40
|
-
description?: string;
|
|
41
|
-
toString(): string;
|
|
42
|
-
}
|
|
43
|
-
export declare class WritePVAction {
|
|
44
|
-
pvName: string;
|
|
45
|
-
value: string;
|
|
46
|
-
readonly type = "WRITE_PV";
|
|
47
|
-
confirmMessage?: string;
|
|
48
|
-
description?: string;
|
|
49
|
-
constructor(pvName: string, value: string);
|
|
50
|
-
toString(): string;
|
|
51
|
-
}
|
|
52
|
-
export declare class PlaySoundAction {
|
|
53
|
-
readonly type = "PLAY_SOUND";
|
|
54
|
-
path?: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
toString(): string;
|
|
57
|
-
}
|
|
58
|
-
export declare class OpenWebpageAction {
|
|
59
|
-
readonly type = "OPEN_WEBPAGE";
|
|
60
|
-
hyperlink?: string;
|
|
61
|
-
description?: string;
|
|
62
|
-
toString(): string;
|
|
63
|
-
}
|
|
64
|
-
export {};
|
|
1
|
+
import { Action } from "./actions/Action";
|
|
2
|
+
export declare class ActionSet {
|
|
3
|
+
actions: (Action | null)[];
|
|
4
|
+
hookFirstActionToClick: boolean;
|
|
5
|
+
hookAllActionsToClick: boolean;
|
|
6
|
+
add(action: Action | null): void;
|
|
7
|
+
isClickable(): boolean | 0;
|
|
8
|
+
getAction(index: number): Action | null | undefined;
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
package/dist/types/events.d.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
export interface OPIEvent {
|
|
2
|
-
detail?: any;
|
|
3
|
-
}
|
|
4
|
-
export interface OPIEventMap {
|
|
5
|
-
[index: string]: OPIEvent;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export interface SelectionEvent extends OPIEvent {
|
|
13
|
-
selected: string[];
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* A script or a button requested to open another display.
|
|
17
|
-
*/
|
|
18
|
-
export interface OpenDisplayEvent extends OPIEvent {
|
|
19
|
-
path: string;
|
|
20
|
-
replace: boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The user has selected a widget with a navigable PV.
|
|
24
|
-
*/
|
|
25
|
-
export interface OpenPVEvent extends OPIEvent {
|
|
26
|
-
pvName: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A script or a button requested to close the current display.
|
|
30
|
-
*/
|
|
31
|
-
export interface CloseDisplayEvent extends OPIEvent {
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* This display scale has changed.
|
|
35
|
-
*/
|
|
36
|
-
export interface ScaleEvent extends OPIEvent {
|
|
37
|
-
scale: number;
|
|
38
|
-
}
|
|
39
|
-
export
|
|
40
|
-
[index: string]: Array<(ev: OPIEvent) => void>;
|
|
41
|
-
};
|
|
1
|
+
export interface OPIEvent {
|
|
2
|
+
detail?: any;
|
|
3
|
+
}
|
|
4
|
+
export interface OPIEventMap {
|
|
5
|
+
[index: string]: OPIEvent;
|
|
6
|
+
closedisplay: CloseDisplayEvent;
|
|
7
|
+
opendisplay: OpenDisplayEvent;
|
|
8
|
+
openpv: OpenPVEvent;
|
|
9
|
+
selection: SelectionEvent;
|
|
10
|
+
scale: ScaleEvent;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectionEvent extends OPIEvent {
|
|
13
|
+
selected: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A script or a button requested to open another display.
|
|
17
|
+
*/
|
|
18
|
+
export interface OpenDisplayEvent extends OPIEvent {
|
|
19
|
+
path: string;
|
|
20
|
+
replace: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The user has selected a widget with a navigable PV.
|
|
24
|
+
*/
|
|
25
|
+
export interface OpenPVEvent extends OPIEvent {
|
|
26
|
+
pvName: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A script or a button requested to close the current display.
|
|
30
|
+
*/
|
|
31
|
+
export interface CloseDisplayEvent extends OPIEvent {
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* This display scale has changed.
|
|
35
|
+
*/
|
|
36
|
+
export interface ScaleEvent extends OPIEvent {
|
|
37
|
+
scale: number;
|
|
38
|
+
}
|
|
39
|
+
export type OPIEventHandlers = {
|
|
40
|
+
[index: string]: Array<(ev: OPIEvent) => void>;
|
|
41
|
+
};
|