@open-amt-cloud-toolkit/ui-toolkit-react 2.0.2 → 2.0.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/README.md +71 -0
- package/dist/package.json +84 -0
- package/package.json +84 -77
- package/i18n.d.ts +0 -6
- package/jest.setup.d.ts +0 -5
- package/kvm.min.js +0 -3
- package/kvm.min.js.LICENSE.txt +0 -32
- package/reactjs/KVM/ConnectButton.d.ts +0 -13
- package/reactjs/KVM/DesktopSettings.d.ts +0 -17
- package/reactjs/KVM/EncodingOptions.d.ts +0 -17
- package/reactjs/KVM/Header.d.ts +0 -17
- package/reactjs/KVM/PureCanvas.d.ts +0 -19
- package/reactjs/KVM/UI.d.ts +0 -47
- package/reactjs/KVM/index.d.ts +0 -1
- package/reactjs/SerialOverLAN/Sol.d.ts +0 -53
- package/reactjs/SerialOverLAN/Terminal.d.ts +0 -15
- package/reactjs/SerialOverLAN/index.d.ts +0 -5
- package/reactjs/services/HttpClient.d.ts +0 -10
- package/reactjs/shared/Methods.d.ts +0 -13
- package/reactjs/shared/SnackBar.d.ts +0 -5
- package/reactjs/shared/Utilities.d.ts +0 -8
- package/reactjs/src/kvm.bundle.js +0 -1
- package/reactjs/src/sol.bundle.js +0 -15
- package/reactjs/src/sol.bundle.js.LICENSE.txt +0 -8
- package/sol.min.js +0 -16
- package/sol.min.js.LICENSE.txt +0 -41
- package/src/i18n.d.ts +0 -6
- package/src/reactjs/KVM/ConnectButton.d.ts +0 -13
- package/src/reactjs/KVM/DesktopSettings.d.ts +0 -17
- package/src/reactjs/KVM/EncodingOptions.d.ts +0 -17
- package/src/reactjs/KVM/Header.d.ts +0 -17
- package/src/reactjs/KVM/PureCanvas.d.ts +0 -19
- package/src/reactjs/KVM/UI.d.ts +0 -47
- package/src/reactjs/KVM/index.d.ts +0 -1
- package/src/reactjs/SerialOverLAN/Sol.d.ts +0 -53
- package/src/reactjs/SerialOverLAN/Terminal.d.ts +0 -15
- package/src/reactjs/SerialOverLAN/index.d.ts +0 -5
- package/src/reactjs/services/HttpClient.d.ts +0 -10
- package/src/reactjs/shared/Methods.d.ts +0 -13
- package/src/reactjs/shared/SnackBar.d.ts +0 -5
- package/src/reactjs/shared/Utilities.d.ts +0 -8
- package/src/test/connectbutton.spec.d.ts +0 -5
- package/src/test/desktopsettings.spec.d.ts +0 -5
- package/src/test/encodingoptions.spec.d.ts +0 -5
- package/src/test/helper/amtredirector1.d.ts +0 -71
- package/src/test/helper/mockeventpersist.d.ts +0 -7
- package/src/test/helper/terminal.d.ts +0 -11
- package/src/test/httpclient.test.d.ts +0 -1
- package/src/test/purecanvas.spec.d.ts +0 -5
- package/src/test/sol.test.d.ts +0 -1
- package/src/test/terminal.test.d.ts +0 -1
- package/src/test/ui.spec.d.ts +0 -4
package/sol.min.js.LICENSE.txt
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/** @license React v0.20.2
|
|
8
|
-
* scheduler.production.min.js
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/** @license React v16.13.1
|
|
17
|
-
* react-is.production.min.js
|
|
18
|
-
*
|
|
19
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license found in the
|
|
22
|
-
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
/** @license React v17.0.2
|
|
26
|
-
* react-dom.production.min.js
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/** @license React v17.0.2
|
|
35
|
-
* react.production.min.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/
|
package/src/i18n.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import i18n from 'i18next';
|
|
6
|
-
export default i18n;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import './ConnectButton.scss';
|
|
7
|
-
export interface ConnectProps {
|
|
8
|
-
kvmstate: number;
|
|
9
|
-
handleConnectClick: (e: any) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare class ConnectButton extends React.Component<ConnectProps, {}> {
|
|
12
|
-
render(): React.ReactNode;
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
export interface IDesktopSettings {
|
|
7
|
-
changeDesktopSettings: (settings: any) => void;
|
|
8
|
-
getConnectState: () => number;
|
|
9
|
-
}
|
|
10
|
-
export declare class DesktopSettings extends React.Component<IDesktopSettings> {
|
|
11
|
-
desktopsettings: {
|
|
12
|
-
encoding: number;
|
|
13
|
-
};
|
|
14
|
-
constructor(props: IDesktopSettings);
|
|
15
|
-
changeEncoding(encoding: number): void;
|
|
16
|
-
render(): React.ReactNode;
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import './EncodingOptions.scss';
|
|
7
|
-
export interface IEncodingOptions {
|
|
8
|
-
changeEncoding: (encoding: number) => void;
|
|
9
|
-
getConnectState: () => number;
|
|
10
|
-
}
|
|
11
|
-
export declare class EncodingOptions extends React.Component<IEncodingOptions, {
|
|
12
|
-
value: number;
|
|
13
|
-
}> {
|
|
14
|
-
constructor(props: IEncodingOptions);
|
|
15
|
-
onEncodingChange(e: any): void;
|
|
16
|
-
render(): React.ReactNode;
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import './Header.scss';
|
|
7
|
-
export interface IHeaderProps {
|
|
8
|
-
kvmstate: number;
|
|
9
|
-
deviceId: string | null;
|
|
10
|
-
server: string | null;
|
|
11
|
-
handleConnectClick: (e: any) => void;
|
|
12
|
-
changeDesktopSettings: (settings: any) => void;
|
|
13
|
-
getConnectState: () => number;
|
|
14
|
-
}
|
|
15
|
-
export declare class Header extends React.Component<IHeaderProps> {
|
|
16
|
-
render(): JSX.Element;
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
* Author : Ramu Bachala
|
|
5
|
-
**********************************************************************/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import './PureCanvas.scss';
|
|
8
|
-
export interface PureCanvasProps {
|
|
9
|
-
contextRef: (ctx: CanvasRenderingContext2D) => void;
|
|
10
|
-
mouseDown: (event: React.MouseEvent) => void;
|
|
11
|
-
mouseUp: (event: React.MouseEvent) => void;
|
|
12
|
-
mouseMove: (event: React.MouseEvent) => void;
|
|
13
|
-
canvasHeight: string;
|
|
14
|
-
canvasWidth: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class PureCanvas extends React.Component<PureCanvasProps, {}> {
|
|
17
|
-
shouldComponentUpdate(): boolean;
|
|
18
|
-
render(): React.ReactNode;
|
|
19
|
-
}
|
package/src/reactjs/KVM/UI.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
* Author : Ramu Bachala
|
|
5
|
-
**********************************************************************/
|
|
6
|
-
import { IDataProcessor, IKvmDataCommunicator, ILogger, Desktop } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
7
|
-
import { MouseHelper, KeyBoardHelper } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import './UI.scss';
|
|
10
|
-
export interface KVMProps {
|
|
11
|
-
deviceId: string | null;
|
|
12
|
-
mpsServer: string | null;
|
|
13
|
-
mouseDebounceTime: number;
|
|
14
|
-
canvasHeight: string;
|
|
15
|
-
canvasWidth: string;
|
|
16
|
-
autoConnect?: boolean;
|
|
17
|
-
authToken: string;
|
|
18
|
-
}
|
|
19
|
-
export declare class KVM extends React.Component<KVMProps, {
|
|
20
|
-
kvmstate: number;
|
|
21
|
-
encodingOption: number;
|
|
22
|
-
}> {
|
|
23
|
-
module: Desktop | any;
|
|
24
|
-
dataProcessor: IDataProcessor | any;
|
|
25
|
-
redirector: IKvmDataCommunicator | any;
|
|
26
|
-
mouseHelper: MouseHelper | any;
|
|
27
|
-
logger: ILogger;
|
|
28
|
-
keyboard: KeyBoardHelper | any;
|
|
29
|
-
desktopSettingsChange: boolean;
|
|
30
|
-
ctx: CanvasRenderingContext2D;
|
|
31
|
-
fr: FileReader;
|
|
32
|
-
constructor(props: KVMProps);
|
|
33
|
-
saveContext(ctx: CanvasRenderingContext2D): void;
|
|
34
|
-
init(): void;
|
|
35
|
-
cleanUp(): void;
|
|
36
|
-
componentWillUnmount(): void;
|
|
37
|
-
onRedirectorError(): void;
|
|
38
|
-
reset(): void;
|
|
39
|
-
OnConnectionStateChange(redirector: any, state: number): any;
|
|
40
|
-
changeDesktopSettings(settings: any): void;
|
|
41
|
-
startKVM(): void;
|
|
42
|
-
stopKVM(): void;
|
|
43
|
-
getRenderStatus(): any;
|
|
44
|
-
handleConnectClick(e: any): void;
|
|
45
|
-
componentDidUpdate(prevProps: any): void;
|
|
46
|
-
render(): React.ReactNode;
|
|
47
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import 'xterm/css/xterm.css';
|
|
7
|
-
import './sol.scss';
|
|
8
|
-
export interface SOLProps {
|
|
9
|
-
deviceId: string | null;
|
|
10
|
-
mpsServer: string | null;
|
|
11
|
-
autoConnect?: boolean;
|
|
12
|
-
authToken: string;
|
|
13
|
-
}
|
|
14
|
-
export interface SOLStates {
|
|
15
|
-
isConnected: boolean;
|
|
16
|
-
SOLstate: number;
|
|
17
|
-
powerState: number;
|
|
18
|
-
showSuccess: boolean;
|
|
19
|
-
message: string;
|
|
20
|
-
isSelected: boolean;
|
|
21
|
-
type: string;
|
|
22
|
-
solNotEnabled: string;
|
|
23
|
-
deviceOnSleep: string;
|
|
24
|
-
isPowerStateLoaded: boolean;
|
|
25
|
-
}
|
|
26
|
-
/** container class for SOL */
|
|
27
|
-
export declare class Sol extends React.Component<SOLProps, SOLStates> {
|
|
28
|
-
redirector: any;
|
|
29
|
-
terminal: any;
|
|
30
|
-
logger: any;
|
|
31
|
-
dataProcessor: any;
|
|
32
|
-
callback: any;
|
|
33
|
-
term: any;
|
|
34
|
-
fr: FileReader;
|
|
35
|
-
constructor(props: SOLProps);
|
|
36
|
-
init: () => void;
|
|
37
|
-
cleanUp: () => void;
|
|
38
|
-
componentDidMount(): void;
|
|
39
|
-
/** write the processed data from webscoket in to xterm */
|
|
40
|
-
handleWriteToXterm: (str: any) => any;
|
|
41
|
-
handleClearTerminal: () => any;
|
|
42
|
-
/** capture the data on xterm key press */
|
|
43
|
-
handleKeyPress: (domEvent: any) => any;
|
|
44
|
-
handleKeyDownPress: (domEvent: any) => any;
|
|
45
|
-
startSOL: () => void;
|
|
46
|
-
stopSOL: () => void;
|
|
47
|
-
handleSOLConnect: (e: any) => void;
|
|
48
|
-
onTerminalStateChange: (redirector: any, state: number) => void;
|
|
49
|
-
/** callback functions from child components to update the state values */
|
|
50
|
-
handleFeatureStatus: (value: any) => void;
|
|
51
|
-
getSOLState: () => any;
|
|
52
|
-
render(): React.ReactNode;
|
|
53
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
export interface IPropTerminal {
|
|
7
|
-
handleKeyPress: any;
|
|
8
|
-
xterm: any;
|
|
9
|
-
handleKeyDownPress: any;
|
|
10
|
-
}
|
|
11
|
-
declare class Term extends React.Component<IPropTerminal> {
|
|
12
|
-
componentDidMount(): void;
|
|
13
|
-
render(): React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
export default Term;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
export declare const HttpClient: {
|
|
6
|
-
get(url: any, options?: {}): Promise<any>;
|
|
7
|
-
post(url: any, body?: {}, options?: {}): Promise<any>;
|
|
8
|
-
delete(url: any, options?: {}): Promise<any>;
|
|
9
|
-
fetch(url: any, options?: {}): Promise<any>;
|
|
10
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
/** function to get the static tranlation texts from translation.json
|
|
6
|
-
* @param: text - contains the path to the text in translation.json
|
|
7
|
-
*/
|
|
8
|
-
export declare const translateText: (text: any) => any;
|
|
9
|
-
/** function to get the translation text when there are dynamic values to be rendered in translation
|
|
10
|
-
* @param: text - contains the path to the text in translation.json
|
|
11
|
-
* @param: translate - object containing dynamic values. The keys to be used inside translation.json
|
|
12
|
-
*/
|
|
13
|
-
export declare const translateDynamicText: (text: any, translate: any) => any;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
/** utility function to join the css class names */
|
|
6
|
-
export declare const joinClasses: (...classNames: any[]) => any;
|
|
7
|
-
export declare const prepareHeaders: () => any;
|
|
8
|
-
export declare const isFalsy: (value: any) => boolean;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
import { ILogger, AMTRedirector } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
6
|
-
export declare enum Protocol {
|
|
7
|
-
SOL = 1,
|
|
8
|
-
KVM = 2,
|
|
9
|
-
IDER = 3
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* AMTRedirector provides all communication over WebSockets
|
|
13
|
-
*/
|
|
14
|
-
export declare class AMTRedirector1 extends AMTRedirector {
|
|
15
|
-
state: number;
|
|
16
|
-
socket: any;
|
|
17
|
-
host: string;
|
|
18
|
-
port: number;
|
|
19
|
-
user: string;
|
|
20
|
-
pass: string;
|
|
21
|
-
tls: number;
|
|
22
|
-
authUri: string;
|
|
23
|
-
tlsv1only: number;
|
|
24
|
-
connectState: number;
|
|
25
|
-
protocol: Protocol;
|
|
26
|
-
amtAccumulator: string;
|
|
27
|
-
amtSequence: number;
|
|
28
|
-
amtKeepAliveTimer: any;
|
|
29
|
-
fileReader: FileReader;
|
|
30
|
-
fileReaderInUse: boolean;
|
|
31
|
-
fileReaderAcc: any[];
|
|
32
|
-
randomNonceChars: string;
|
|
33
|
-
RedirectStartSol: string;
|
|
34
|
-
RedirectStartKvm: string;
|
|
35
|
-
RedirectStartIder: string;
|
|
36
|
-
urlvars: any;
|
|
37
|
-
inDataCount: number;
|
|
38
|
-
server: any;
|
|
39
|
-
logger: ILogger;
|
|
40
|
-
startvariable: number;
|
|
41
|
-
stopvariable: number;
|
|
42
|
-
onProcessData: (data: string) => void;
|
|
43
|
-
onStart: () => void;
|
|
44
|
-
onNewState: (state: number) => void;
|
|
45
|
-
onStateChanged: (redirector: any, state: number) => void;
|
|
46
|
-
onError: () => void;
|
|
47
|
-
constructor(logger: ILogger, protocol: number, fr: FileReader, host: string, port: number, user: string, pass: string, tls: number, tls1only: number, authToken: string, server?: string);
|
|
48
|
-
/**
|
|
49
|
-
* gets Ws Location and starts a websocket for listening
|
|
50
|
-
* @param c is base type for WebSocket
|
|
51
|
-
*/
|
|
52
|
-
start<T>(c: new (path: string, authToken: string) => T): void;
|
|
53
|
-
onSocketConnected(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Called when there is new data on the websocket
|
|
56
|
-
* @param e data received over the websocket
|
|
57
|
-
*/
|
|
58
|
-
onMessage(e: any): void;
|
|
59
|
-
hex_md5(str: string): string;
|
|
60
|
-
socketSend(data: string): void;
|
|
61
|
-
/**
|
|
62
|
-
* Send sends data over the websocket to the server.
|
|
63
|
-
* @param data data to send to server
|
|
64
|
-
*/
|
|
65
|
-
send(data: string): void;
|
|
66
|
-
sendAmtKeepAlive(): void;
|
|
67
|
-
generateRandomNonce(length: number): any;
|
|
68
|
-
onSocketClosed(e: Event): void;
|
|
69
|
-
onStateChange(newstate: number): void;
|
|
70
|
-
stop(): void;
|
|
71
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
export declare class Mockeventpersist {
|
|
6
|
-
persist(): void;
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) Intel Corporation 2019
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
**********************************************************************/
|
|
5
|
-
export declare class Terminal {
|
|
6
|
-
writestring: string;
|
|
7
|
-
resetvalue: number;
|
|
8
|
-
constructor();
|
|
9
|
-
write(strarg: string): void;
|
|
10
|
-
reset(): void;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/test/sol.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/test/ui.spec.d.ts
DELETED