@yamcs/opi 1.2.2 → 1.2.5
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 +21 -18
- package/README.md +2 -2
- 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 +56 -0
- package/dist/opi.js +1 -1
- package/dist/opi.js.map +1 -1
- package/dist/opi.umd.js +1 -1
- package/dist/opi.umd.js.map +1 -1
- package/dist/types/ConsoleHandler.d.ts +10 -0
- package/dist/types/Display.d.ts +15 -7
- package/dist/types/PathResolver.d.ts +10 -0
- package/dist/types/Widget.d.ts +4 -6
- package/dist/types/XMLNode.d.ts +1 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/properties.d.ts +2 -0
- package/dist/types/pv/PV.d.ts +6 -5
- package/dist/types/pv/PVEngine.d.ts +11 -1
- package/dist/types/scripting/ConsoleUtil.d.ts +3 -0
- package/dist/types/scripting/DisplayWrapper.d.ts +1 -0
- package/dist/types/scripting/FileUtil.d.ts +6 -0
- package/dist/types/scripting/GUIUtil.d.ts +8 -0
- package/dist/types/scripting/Java.d.ts +18 -0
- package/dist/types/scripting/PVUtil.d.ts +5 -0
- package/dist/types/scripting/PVWrapper.d.ts +2 -0
- package/dist/types/scripting/ScriptEngine.d.ts +1 -1
- package/dist/types/scripting/SpreadSheetTable.d.ts +36 -0
- package/dist/types/scripting/TableWrapper.d.ts +9 -0
- package/dist/types/scripting/WidgetWrapper.d.ts +6 -0
- package/dist/types/widgets/controls/Combo.d.ts +3 -5
- package/dist/types/widgets/controls/MenuButton.d.ts +18 -0
- package/dist/types/widgets/controls/TextInput.d.ts +12 -0
- package/dist/types/widgets/graphics/ImageWidget.d.ts +1 -0
- package/dist/types/widgets/others/AbstractContainerWidget.d.ts +0 -1
- package/dist/types/widgets/others/GroupingContainer.d.ts +1 -0
- package/dist/types/widgets/others/LinkingContainer.d.ts +1 -0
- package/dist/types/widgets/others/Table.d.ts +22 -0
- package/package.json +6 -6
- package/dist/fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/types/widgets/monitors/Axis.d.ts +0 -40
- package/dist/types/widgets/monitors/CommandBuffer.d.ts +0 -6
- package/dist/types/widgets/monitors/SampleBuffer.d.ts +0 -23
- package/dist/types/widgets/monitors/Trace.d.ts +0 -38
- package/dist/types/widgets/monitors/TraceBuffer.d.ts +0 -32
- package/dist/types/widgets/monitors/XYGraph.d.ts +0 -33
- package/dist/types/widgets/monitors/XYGraph2.d.ts +0 -46
- package/dist/types/widgets/monitors/XYGraphCSS.d.ts +0 -14
- package/dist/types/widgets/monitors/XYGraphToolbar.d.ts +0 -51
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ConsoleHandler {
|
|
2
|
+
writeInfo(message: string): void;
|
|
3
|
+
writeError(message: string): void;
|
|
4
|
+
writeWarning(message: string): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class DefaultConsoleHandler implements ConsoleHandler {
|
|
7
|
+
writeInfo(message: string): void;
|
|
8
|
+
writeError(message: string): void;
|
|
9
|
+
writeWarning(message: string): void;
|
|
10
|
+
}
|
package/dist/types/Display.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ConsoleHandler } from './ConsoleHandler';
|
|
1
2
|
import { OPIEvent, OPIEventMap } from './events';
|
|
3
|
+
import { PathResolver } from './PathResolver';
|
|
2
4
|
import { Bounds } from './positioning';
|
|
3
5
|
import { PVEngine } from './pv/PVEngine';
|
|
4
6
|
import { PVProvider } from './pv/PVProvider';
|
|
@@ -11,6 +13,7 @@ import { CheckBox } from './widgets/controls/CheckBox';
|
|
|
11
13
|
import { ChoiceButton } from './widgets/controls/ChoiceButton';
|
|
12
14
|
import { Combo } from './widgets/controls/Combo';
|
|
13
15
|
import { ImageBooleanButton } from './widgets/controls/ImageBooleanButton';
|
|
16
|
+
import { MenuButton } from './widgets/controls/MenuButton';
|
|
14
17
|
import { RadioBox } from './widgets/controls/RadioBox';
|
|
15
18
|
import { Scrollbar } from './widgets/controls/Scrollbar';
|
|
16
19
|
import { TextInput } from './widgets/controls/TextInput';
|
|
@@ -38,6 +41,7 @@ import { DisplayWidget } from './widgets/others/DisplayWidget';
|
|
|
38
41
|
import { GroupingContainer } from './widgets/others/GroupingContainer';
|
|
39
42
|
import { LinkingContainer } from './widgets/others/LinkingContainer';
|
|
40
43
|
import { TabbedContainer } from './widgets/others/TabbedContainer';
|
|
44
|
+
import { Table } from './widgets/others/Table';
|
|
41
45
|
import { WebBrowser } from './widgets/others/WebBrowser';
|
|
42
46
|
export declare class Display {
|
|
43
47
|
private readonly targetElement;
|
|
@@ -45,6 +49,8 @@ export declare class Display {
|
|
|
45
49
|
private g;
|
|
46
50
|
private ctx;
|
|
47
51
|
pvEngine: PVEngine;
|
|
52
|
+
private pathResolver;
|
|
53
|
+
private consoleHandler;
|
|
48
54
|
private repaintRequested;
|
|
49
55
|
private _editMode;
|
|
50
56
|
private _showGrid;
|
|
@@ -61,13 +67,18 @@ export declare class Display {
|
|
|
61
67
|
/**
|
|
62
68
|
* Prefix for workspace references (images, scripts, displays)
|
|
63
69
|
*/
|
|
64
|
-
|
|
70
|
+
absPrefix: string;
|
|
71
|
+
relPrefix: string;
|
|
65
72
|
instance?: DisplayWidget;
|
|
66
73
|
private eventListeners;
|
|
67
74
|
private displayRegion;
|
|
68
75
|
constructor(targetElement: HTMLElement);
|
|
69
76
|
addProvider(provider: PVProvider): void;
|
|
70
77
|
addScriptLibrary(name: string, library: any): void;
|
|
78
|
+
setPathResolver(pathResolver: PathResolver): void;
|
|
79
|
+
getPathResolver(): PathResolver;
|
|
80
|
+
setConsoleHandler(consoleHandler: ConsoleHandler): void;
|
|
81
|
+
getConsoleHandler(): ConsoleHandler;
|
|
71
82
|
private step;
|
|
72
83
|
private drawScreen;
|
|
73
84
|
/**
|
|
@@ -76,14 +87,11 @@ export declare class Display {
|
|
|
76
87
|
*/
|
|
77
88
|
requestRepaint(): void;
|
|
78
89
|
setTooltip(tooltip: string | undefined): void;
|
|
79
|
-
|
|
80
|
-
* Closes the currently active menu (if any)
|
|
81
|
-
*/
|
|
82
|
-
closeMenu(): void;
|
|
83
|
-
createWidget(kind: string, parent: AbstractContainerWidget): ActionButton | Arc | BooleanButton | BooleanSwitch | ByteMonitor | CheckBox | ChoiceButton | Combo | Ellipse | Gauge | GroupingContainer | ImageWidget | ImageBooleanButton | ImageBooleanIndicator | IntensityGraph | Label | LED | LinkingContainer | Meter | Polygon | Polyline | ProgressBar | RadioBox | Rectangle | RoundedRectangle | Scrollbar | TabbedContainer | Tank | TextInput | TextUpdate | Thermometer | WebBrowser | XYGraph | undefined;
|
|
90
|
+
createWidget(kind: string, parent: AbstractContainerWidget): LinkingContainer | ActionButton | Arc | BooleanButton | BooleanSwitch | ByteMonitor | CheckBox | ChoiceButton | Combo | Ellipse | Gauge | GroupingContainer | ImageWidget | ImageBooleanButton | ImageBooleanIndicator | IntensityGraph | Label | LED | MenuButton | Meter | Polygon | Polyline | ProgressBar | RadioBox | Rectangle | RoundedRectangle | Scrollbar | TabbedContainer | Table | Tank | TextInput | TextUpdate | Thermometer | WebBrowser | XYGraph | undefined;
|
|
84
91
|
destroy(): void;
|
|
92
|
+
resolvePath(path: string, widget?: Widget): string;
|
|
85
93
|
setSource(href: string): Promise<void>;
|
|
86
|
-
setSourceString
|
|
94
|
+
private setSourceString;
|
|
87
95
|
private reset;
|
|
88
96
|
/**
|
|
89
97
|
* Bounds of this widget relative to the root
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Display } from './Display';
|
|
2
|
+
import { Widget } from './Widget';
|
|
3
|
+
export interface PathResolver {
|
|
4
|
+
resolve(file: string, widget?: Widget): string;
|
|
5
|
+
}
|
|
6
|
+
export declare class DefaultPathResolver implements PathResolver {
|
|
7
|
+
private display;
|
|
8
|
+
constructor(display: Display);
|
|
9
|
+
resolve(path: string, widget?: Widget): string;
|
|
10
|
+
}
|
package/dist/types/Widget.d.ts
CHANGED
|
@@ -21,19 +21,17 @@ export declare abstract class Widget {
|
|
|
21
21
|
protected fillRoundRectangleBackgroundBorder: boolean;
|
|
22
22
|
private holderRegion?;
|
|
23
23
|
properties: PropertySet;
|
|
24
|
+
readonly vars: Map<string, any>;
|
|
24
25
|
constructor(display: Display, parent?: AbstractContainerWidget | undefined);
|
|
25
26
|
parseNode(node: XMLNode): void;
|
|
26
27
|
drawHolder(g: Graphics): void;
|
|
28
|
+
beforeDrawBorder(g: Graphics): void;
|
|
27
29
|
private drawBorderStyle;
|
|
28
30
|
drawDecoration(g: Graphics): void;
|
|
29
31
|
drawOverlay(g: Graphics): void;
|
|
30
32
|
drawSelection(ctx: CanvasRenderingContext2D): void;
|
|
31
33
|
requestRepaint(): void;
|
|
32
|
-
|
|
33
|
-
* May be called when an other widget
|
|
34
|
-
* wants to open a menu.
|
|
35
|
-
*/
|
|
36
|
-
closeMenu(): void;
|
|
34
|
+
resolvePath(path: string): string;
|
|
37
35
|
/**
|
|
38
36
|
* Bounds of this widget (within its parent).
|
|
39
37
|
* Bounds cover the entire widget: area + ornaments.
|
|
@@ -47,7 +45,7 @@ export declare abstract class Widget {
|
|
|
47
45
|
get area(): Bounds;
|
|
48
46
|
private drawShadowBorder;
|
|
49
47
|
private drawDashedBorder;
|
|
50
|
-
|
|
48
|
+
executeAction(index: number): void;
|
|
51
49
|
expandMacro(text: string): string;
|
|
52
50
|
get pv(): PV | undefined;
|
|
53
51
|
isMinorSeverity(): boolean;
|
package/dist/types/XMLNode.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export declare class XMLNode {
|
|
|
70
70
|
y: number;
|
|
71
71
|
}[];
|
|
72
72
|
getStringList(name: string): string[];
|
|
73
|
+
getStringTable(name: string): string[][];
|
|
73
74
|
getScripts(name: string): ScriptSet;
|
|
74
75
|
getScaleOptions(name: string): ScaleOptions;
|
|
75
76
|
getAutoScaleWidgets(name: string): AutoScaleWidgets;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export { ConsoleHandler, DefaultConsoleHandler } from './ConsoleHandler';
|
|
1
2
|
export { Display } from './Display';
|
|
3
|
+
export { DefaultPathResolver, PathResolver } from './PathResolver';
|
|
4
|
+
export { CompiledFormula, DataSourceStatus } from './pv/formulas/CompiledFormula';
|
|
5
|
+
export { FormulaCompiler } from './pv/formulas/FormulaCompiler';
|
|
2
6
|
export { AlarmSeverity, PV } from './pv/PV';
|
|
3
7
|
export { PVProvider } from './pv/PVProvider';
|
|
4
8
|
export { Sample } from './pv/Sample';
|
|
5
|
-
export { FormulaCompiler } from './pv/formulas/FormulaCompiler';
|
|
6
|
-
export { DataSourceStatus, CompiledFormula } from './pv/formulas/CompiledFormula';
|
|
@@ -79,6 +79,8 @@ export declare class ScriptsProperty extends Property<ScriptSet> {
|
|
|
79
79
|
}
|
|
80
80
|
export declare class StringListProperty extends Property<string[]> {
|
|
81
81
|
}
|
|
82
|
+
export declare class StringTableProperty extends Property<string[][]> {
|
|
83
|
+
}
|
|
82
84
|
export declare class RulesProperty extends Property<RuleSet> {
|
|
83
85
|
}
|
|
84
86
|
export declare class ScaleOptionsProperty extends Property<ScaleOptions> {
|
package/dist/types/pv/PV.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare class PV {
|
|
|
43
43
|
get value(): any | undefined;
|
|
44
44
|
get indexValue(): number | undefined;
|
|
45
45
|
get severity(): AlarmSeverity;
|
|
46
|
+
get alarmName(): string;
|
|
46
47
|
toNumber(): number | null | undefined;
|
|
47
48
|
formatValue(formatType: number, precision: number): string;
|
|
48
49
|
private formatNumber;
|
|
@@ -53,9 +54,9 @@ export declare class PV {
|
|
|
53
54
|
}
|
|
54
55
|
export declare type PVListener = () => void;
|
|
55
56
|
export declare enum AlarmSeverity {
|
|
56
|
-
NONE =
|
|
57
|
-
MINOR =
|
|
58
|
-
MAJOR =
|
|
59
|
-
INVALID =
|
|
60
|
-
UNDEFINED =
|
|
57
|
+
NONE = "NONE",
|
|
58
|
+
MINOR = "MINOR",
|
|
59
|
+
MAJOR = "MAJOR",
|
|
60
|
+
INVALID = "INVALID",
|
|
61
|
+
UNDEFINED = "UNDEFINED"
|
|
61
62
|
}
|
|
@@ -16,6 +16,16 @@ export declare class PVEngine {
|
|
|
16
16
|
};
|
|
17
17
|
private listeners;
|
|
18
18
|
constructor(display: Display);
|
|
19
|
+
/**
|
|
20
|
+
* To be called following display parse.
|
|
21
|
+
* It triggers an update on all listeners whose PV already has
|
|
22
|
+
* a value (for example because of loc initializer or formula).
|
|
23
|
+
*
|
|
24
|
+
* It is important to do this after the full display is parsed,
|
|
25
|
+
* because some scripts may require the presence of certain
|
|
26
|
+
* widgets.
|
|
27
|
+
*/
|
|
28
|
+
init(): void;
|
|
19
29
|
clearState(): void;
|
|
20
30
|
getPVNames(): string[];
|
|
21
31
|
hasPV(pvName: string): boolean;
|
|
@@ -32,6 +42,6 @@ export declare class PVEngine {
|
|
|
32
42
|
createRule(widget: Widget, model: Rule): void;
|
|
33
43
|
addProvider(provider: PVProvider): void;
|
|
34
44
|
addScriptLibrary(name: string, library: any): void;
|
|
35
|
-
addListener(pvName: string, listener: PVListener): void;
|
|
45
|
+
addListener(pvName: string, listener: PVListener, mayTriggerNow?: boolean): void;
|
|
36
46
|
removeListener(pvName: string, listener: PVListener): void;
|
|
37
47
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class GUIUtil {
|
|
2
|
+
fullScreen(): void;
|
|
3
|
+
openConfirmDialog(message: string): boolean;
|
|
4
|
+
openInformationDialog(message: string): void;
|
|
5
|
+
openWarningDialog(message: string): void;
|
|
6
|
+
openErrorDialog(message: string): void;
|
|
7
|
+
openPasswordDialog(message: string, password: string): boolean | undefined;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SpreadSheetTable } from './SpreadSheetTable';
|
|
2
|
+
export declare namespace java {
|
|
3
|
+
namespace lang {
|
|
4
|
+
const Runnable: (args: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}) => void;
|
|
7
|
+
const Thread: {
|
|
8
|
+
(runnable: any): void;
|
|
9
|
+
sleep(delay: number): void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare class Java {
|
|
14
|
+
type(className: string): ((args: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}) => void) | typeof SpreadSheetTable;
|
|
17
|
+
to(jsValue: any, javaType: string): any;
|
|
18
|
+
}
|
|
@@ -6,6 +6,11 @@ export declare class PVUtil {
|
|
|
6
6
|
getDouble(pv: PVWrapper): number;
|
|
7
7
|
getLong(pv: PVWrapper): number;
|
|
8
8
|
getString(pv: PVWrapper): string;
|
|
9
|
+
getStringArray(pv: PVWrapper): string[];
|
|
10
|
+
getTimeInMilliseconds(pv: PVWrapper): number;
|
|
9
11
|
getTimeString(pv: PVWrapper, format?: string): string | null;
|
|
12
|
+
getSeverity(pv: PVWrapper): 0 | 1 | -1 | 2;
|
|
13
|
+
getSeverityString(pv: PVWrapper): string;
|
|
14
|
+
getStatus(pv: PVWrapper): string;
|
|
10
15
|
private formatDate;
|
|
11
16
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Color } from '../Color';
|
|
2
|
+
import { Table } from '../widgets/others/Table';
|
|
3
|
+
interface Cell {
|
|
4
|
+
text?: string;
|
|
5
|
+
backgroundColor?: Color;
|
|
6
|
+
foregroundColor?: Color;
|
|
7
|
+
}
|
|
8
|
+
export declare class SpreadSheetTable {
|
|
9
|
+
private table;
|
|
10
|
+
private columnCount;
|
|
11
|
+
private cells;
|
|
12
|
+
dirty: boolean;
|
|
13
|
+
constructor(table: Table);
|
|
14
|
+
isEmpty(): boolean;
|
|
15
|
+
refresh(): void;
|
|
16
|
+
getCells(): Cell[][];
|
|
17
|
+
getContent(): string[][];
|
|
18
|
+
setContent(content: string[][]): void;
|
|
19
|
+
getColumnCount(): number;
|
|
20
|
+
getRowCount(): number;
|
|
21
|
+
getCellText(row: number, col: number): string | null;
|
|
22
|
+
setColumnsCount(count: number): void;
|
|
23
|
+
appendRow(): number;
|
|
24
|
+
deleteRow(index: number): void;
|
|
25
|
+
deleteColumn(index: number): void;
|
|
26
|
+
insertRow(index: number): void;
|
|
27
|
+
insertColumn(index: number): void;
|
|
28
|
+
private getCell;
|
|
29
|
+
setCellText(row: number, col: number, text: string): void;
|
|
30
|
+
setRowBackground(row: number, color: Color): void;
|
|
31
|
+
setRowForeground(row: number, color: Color): void;
|
|
32
|
+
setCellBackground(row: number, col: number, color: Color): void;
|
|
33
|
+
setCellForeground(row: number, col: number, color: Color): void;
|
|
34
|
+
setColumnCellEditorData(col: number, data: any): void;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Table } from '../widgets/others/Table';
|
|
2
|
+
import { SpreadSheetTable } from './SpreadSheetTable';
|
|
3
|
+
import { WidgetWrapper } from './WidgetWrapper';
|
|
4
|
+
export declare class TableWrapper extends WidgetWrapper {
|
|
5
|
+
private table;
|
|
6
|
+
private spreadSheetTable;
|
|
7
|
+
constructor(widget: Table);
|
|
8
|
+
getTable(): SpreadSheetTable;
|
|
9
|
+
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { Widget } from '../Widget';
|
|
2
|
+
import { PVWrapper } from './PVWrapper';
|
|
2
3
|
/**
|
|
3
4
|
* Exposes the API for the variable "widget" as used in display scripts.
|
|
4
5
|
*/
|
|
5
6
|
export declare class WidgetWrapper {
|
|
6
7
|
private widget;
|
|
7
8
|
constructor(widget: Widget);
|
|
9
|
+
executeAction(index: number): void;
|
|
10
|
+
getPVByName(name: string): PVWrapper | null;
|
|
11
|
+
getPV(propertyName?: string): PVWrapper | null;
|
|
12
|
+
getVar(name: string): any;
|
|
13
|
+
setVar(name: string, value: any): void;
|
|
8
14
|
getPropertyValue(propertyName: string): any;
|
|
9
15
|
setPropertyValue(propertyName: string, value: any): void;
|
|
10
16
|
getName(): string;
|
|
@@ -4,16 +4,14 @@ import { Graphics } from '../../Graphics';
|
|
|
4
4
|
import { Widget } from '../../Widget';
|
|
5
5
|
import { AbstractContainerWidget } from '../others/AbstractContainerWidget';
|
|
6
6
|
export declare class Combo extends Widget {
|
|
7
|
-
private listVisible;
|
|
8
|
-
private hoveredItem?;
|
|
9
7
|
private areaRegion?;
|
|
10
|
-
private
|
|
8
|
+
private selectEl?;
|
|
11
9
|
constructor(display: Display, parent: AbstractContainerWidget);
|
|
12
10
|
init(): void;
|
|
13
11
|
draw(g: Graphics): void;
|
|
14
|
-
closeMenu(): void;
|
|
15
|
-
drawOverlay(g: Graphics): void;
|
|
16
12
|
private writeValue;
|
|
13
|
+
hide(): void;
|
|
14
|
+
destroy(): void;
|
|
17
15
|
get selectorWidth(): number;
|
|
18
16
|
get enabled(): boolean;
|
|
19
17
|
get font(): Font;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Color } from '../../Color';
|
|
2
|
+
import { Display } from '../../Display';
|
|
3
|
+
import { Font } from '../../Font';
|
|
4
|
+
import { Graphics } from '../../Graphics';
|
|
5
|
+
import { Widget } from '../../Widget';
|
|
6
|
+
import { AbstractContainerWidget } from '../others/AbstractContainerWidget';
|
|
7
|
+
export declare class MenuButton extends Widget {
|
|
8
|
+
private areaRegion?;
|
|
9
|
+
private selectEl?;
|
|
10
|
+
constructor(display: Display, parent: AbstractContainerWidget);
|
|
11
|
+
init(): void;
|
|
12
|
+
draw(g: Graphics): void;
|
|
13
|
+
hide(): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
get font(): Font;
|
|
16
|
+
get backgroundColor(): Color;
|
|
17
|
+
get label(): string;
|
|
18
|
+
}
|
|
@@ -4,11 +4,23 @@ import { Graphics } from '../../Graphics';
|
|
|
4
4
|
import { Widget } from '../../Widget';
|
|
5
5
|
import { AbstractContainerWidget } from '../others/AbstractContainerWidget';
|
|
6
6
|
export declare class TextInput extends Widget {
|
|
7
|
+
private areaRegion?;
|
|
8
|
+
private inputEl?;
|
|
9
|
+
private editing;
|
|
7
10
|
constructor(display: Display, parent: AbstractContainerWidget);
|
|
11
|
+
init(): void;
|
|
12
|
+
private cancelInput;
|
|
8
13
|
draw(g: Graphics): void;
|
|
14
|
+
hide(): void;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
get value(): any;
|
|
17
|
+
set value(value: any);
|
|
18
|
+
get confirmMessage(): string;
|
|
9
19
|
get font(): Font;
|
|
10
20
|
get formatType(): number;
|
|
11
21
|
get horizAlignment(): number;
|
|
22
|
+
get multilineInput(): boolean;
|
|
23
|
+
get passwordInput(): boolean;
|
|
12
24
|
get precision(): number;
|
|
13
25
|
get precisionFromPV(): boolean;
|
|
14
26
|
get vertAlignment(): number;
|
|
@@ -13,7 +13,6 @@ export declare abstract class AbstractContainerWidget extends Widget {
|
|
|
13
13
|
expandContainerMacros(text: string): string;
|
|
14
14
|
findWidget(wuid: string): Widget | undefined;
|
|
15
15
|
findWidgetByName(name: string): Widget | undefined;
|
|
16
|
-
closeMenu(): void;
|
|
17
16
|
hide(): void;
|
|
18
17
|
destroy(): void;
|
|
19
18
|
get widgets(): Widget[];
|
|
@@ -3,5 +3,6 @@ import { XMLNode } from '../../XMLNode';
|
|
|
3
3
|
import { AbstractContainerWidget } from './AbstractContainerWidget';
|
|
4
4
|
export declare class GroupingContainer extends AbstractContainerWidget {
|
|
5
5
|
parseNode(node: XMLNode): void;
|
|
6
|
+
beforeDrawBorder(g: Graphics): void;
|
|
6
7
|
draw(g: Graphics): void;
|
|
7
8
|
}
|
|
@@ -4,6 +4,7 @@ import { XMLNode } from '../../XMLNode';
|
|
|
4
4
|
import { AbstractContainerWidget } from './AbstractContainerWidget';
|
|
5
5
|
export declare class LinkingContainer extends AbstractContainerWidget {
|
|
6
6
|
private linkedDisplay?;
|
|
7
|
+
resolvedOpiFile?: string;
|
|
7
8
|
constructor(display: Display, parent: AbstractContainerWidget);
|
|
8
9
|
parseNode(node: XMLNode): void;
|
|
9
10
|
init(): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Display } from '../../Display';
|
|
2
|
+
import { Font } from '../../Font';
|
|
3
|
+
import { Graphics } from '../../Graphics';
|
|
4
|
+
import { SpreadSheetTable } from '../../scripting/SpreadSheetTable';
|
|
5
|
+
import { Widget } from '../../Widget';
|
|
6
|
+
import { AbstractContainerWidget } from './AbstractContainerWidget';
|
|
7
|
+
export declare class Table extends Widget {
|
|
8
|
+
private tableWrapper?;
|
|
9
|
+
private table?;
|
|
10
|
+
spreadsheet: SpreadSheetTable;
|
|
11
|
+
constructor(display: Display, parent: AbstractContainerWidget);
|
|
12
|
+
init(): void;
|
|
13
|
+
draw(g: Graphics): void;
|
|
14
|
+
private generateTableContent;
|
|
15
|
+
hide(): void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
get columnsCount(): number;
|
|
18
|
+
get columnHeaders(): string[][];
|
|
19
|
+
get columnHeaderVisible(): boolean;
|
|
20
|
+
get defaultContent(): string[][];
|
|
21
|
+
get font(): Font;
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamcs/opi",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "OPI Display Renderer",
|
|
5
5
|
"author": "Yamcs Team <yamcs@spaceapplications.com>",
|
|
6
6
|
"repository": {
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"dist/"
|
|
25
25
|
],
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@rollup/plugin-commonjs": "^
|
|
27
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
|
28
28
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
29
29
|
"@types/fontfaceobserver": "2.1.0",
|
|
30
|
-
"@types/node": "^14.
|
|
31
|
-
"express": "^4.
|
|
30
|
+
"@types/node": "^14.18.12",
|
|
31
|
+
"express": "^4.18.1",
|
|
32
32
|
"fontfaceobserver": "^2.0.13",
|
|
33
33
|
"morgan": "^1.10.0",
|
|
34
34
|
"nunjucks": "^3.2.2",
|
|
35
35
|
"peggy": "^1.2.0",
|
|
36
|
-
"rollup": "^2.
|
|
36
|
+
"rollup": "^2.71.1",
|
|
37
37
|
"rollup-plugin-copy": "^3.3.0",
|
|
38
38
|
"rollup-plugin-terser": "^7.0.2",
|
|
39
|
-
"rollup-plugin-typescript2": "^0.
|
|
39
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
40
40
|
"typescript": "^4.3.5"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Color } from '../../Color';
|
|
2
|
-
import { Font } from '../../Font';
|
|
3
|
-
import { LinearScale } from './LinearScale';
|
|
4
|
-
import { XYGraph } from './XYGraph';
|
|
5
|
-
export declare class Axis {
|
|
6
|
-
private widget;
|
|
7
|
-
private i;
|
|
8
|
-
linearScale?: LinearScale;
|
|
9
|
-
private _effectiveMinimum?;
|
|
10
|
-
private _effectiveMaximum?;
|
|
11
|
-
constructor(widget: XYGraph, i: number);
|
|
12
|
-
get scale(): number;
|
|
13
|
-
private getValue;
|
|
14
|
-
isDateEnabled(): boolean;
|
|
15
|
-
isHorizontal(): boolean;
|
|
16
|
-
isVertical(): boolean;
|
|
17
|
-
isPrimary(): boolean;
|
|
18
|
-
get effectiveMinimum(): number;
|
|
19
|
-
set effectiveMinimum(effectiveMinimum: number);
|
|
20
|
-
get effectiveMaximum(): number;
|
|
21
|
-
set effectiveMaximum(effectiveMaximum: number);
|
|
22
|
-
applyZoom(center: number, ratio: number): void;
|
|
23
|
-
get autoScale(): boolean;
|
|
24
|
-
get autoScaleTreshold(): number;
|
|
25
|
-
get axisColor(): Color;
|
|
26
|
-
get axisTitle(): string;
|
|
27
|
-
get dashGridLine(): boolean;
|
|
28
|
-
get gridColor(): Color;
|
|
29
|
-
get leftBottomSide(): boolean;
|
|
30
|
-
get logScale(): boolean;
|
|
31
|
-
private get maximum();
|
|
32
|
-
private get minimum();
|
|
33
|
-
get scaleFont(): Font;
|
|
34
|
-
get scaleFormat(): string;
|
|
35
|
-
get showGrid(): boolean;
|
|
36
|
-
get timeFormat(): number;
|
|
37
|
-
get titleFont(): Font;
|
|
38
|
-
get visible(): boolean;
|
|
39
|
-
get yAxis(): boolean;
|
|
40
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sample for a time-based plot.
|
|
3
|
-
* http://dygraphs.com/data.html#array
|
|
4
|
-
*/
|
|
5
|
-
export declare type Sample = [Date, number | null] | [Date, number | null, number | null] | [Date, number | null, number | null, number | null];
|
|
6
|
-
/**
|
|
7
|
-
* Sample buffer that limits samples to a fixed total.
|
|
8
|
-
* When the buffer is full, samples are dropped in FIFO order.
|
|
9
|
-
*/
|
|
10
|
-
export declare class SampleBuffer {
|
|
11
|
-
private buf;
|
|
12
|
-
private pointer;
|
|
13
|
-
constructor(bufferSize: number);
|
|
14
|
-
/**
|
|
15
|
-
* Adds a sample to this buffer. Samples may be added in non-chronological order.
|
|
16
|
-
*/
|
|
17
|
-
push(sample: Sample): void;
|
|
18
|
-
/**
|
|
19
|
-
* Returns a copy of this buffer's current content with samples
|
|
20
|
-
* sorted chronologically. This is a relatively expensive operation.
|
|
21
|
-
*/
|
|
22
|
-
snapshot(): Sample[];
|
|
23
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Color } from '../../Color';
|
|
2
|
-
import { Graphics } from '../../Graphics';
|
|
3
|
-
import { Point } from '../../positioning';
|
|
4
|
-
import { XYGraph } from './XYGraph';
|
|
5
|
-
export declare class Trace {
|
|
6
|
-
private widget;
|
|
7
|
-
private i;
|
|
8
|
-
private traceData?;
|
|
9
|
-
private xPVInstance?;
|
|
10
|
-
private yPVInstance?;
|
|
11
|
-
private xPVListener;
|
|
12
|
-
private yPVListener;
|
|
13
|
-
constructor(widget: XYGraph, i: number);
|
|
14
|
-
init(): void;
|
|
15
|
-
snapshot(): import("./TraceBuffer").Sample[];
|
|
16
|
-
drawTrace(g: Graphics, points: Point[]): void;
|
|
17
|
-
drawPoint(g: Graphics, point: Point): void;
|
|
18
|
-
clearData(): void;
|
|
19
|
-
get scale(): number;
|
|
20
|
-
private getValue;
|
|
21
|
-
get antiAlias(): boolean;
|
|
22
|
-
get bufferSize(): number;
|
|
23
|
-
get concatenateData(): boolean;
|
|
24
|
-
get lineWidth(): number;
|
|
25
|
-
get name(): string;
|
|
26
|
-
get plotMode(): number;
|
|
27
|
-
get pointSize(): number;
|
|
28
|
-
get pointStyle(): number;
|
|
29
|
-
get traceColor(): Color;
|
|
30
|
-
get traceType(): number;
|
|
31
|
-
get updateDelay(): number;
|
|
32
|
-
get updateMode(): number;
|
|
33
|
-
get visible(): boolean;
|
|
34
|
-
get xAxisIndex(): number;
|
|
35
|
-
get xPV(): string;
|
|
36
|
-
get yAxisIndex(): number;
|
|
37
|
-
get yPV(): string;
|
|
38
|
-
}
|