Terminal Host
This section is about the functionality of the Terminal that is related to the host. The methods are to retrieve properties that are defined by the host the terminal is in (SOM, TabStops, ScrollOnResponse, etc).
getTerminalSOM
Returns the SOM of a specific terminal.
getTerminalSOM(state: Object, { terminalId: String }): String;
-
state Object
Required. The global state of the application.
-
terminalId String
Required. ID of the terminal from which we want to retrieve the SOM.
Returns
-
String
The terminal's SOM, > by default.
Example
const state = storeHelper.getState();
const getTerminalSOM = selectorsHelper.make('getTerminalSOM');
const som = getTerminalSOM(state, { terminalId });
replaceTerminalHostConnectionId
Changes the host connection of a specified terminal.
Usage
dispatchersHelper.dispatch('replaceTerminalHostConnectionId', {
hostConnectionId: String,
terminalId: String,
});
-
hostConnectionId String
Required. The new host connection ID.
-
terminalId String
Required. ID of the terminal that we want to modify.
Example
dispatchersHelper.dispatch('replaceTerminalHostConnectionId', {
hostConnectionId: 'host-connection-1',
terminalId: 'terminal-1',
});
getTerminalTabStops
Returns the tabStops of a specific terminal.
getTerminalTabStops(state: Object, { terminalId: String }): [String];
-
state Object
Required. The global state of the application.
-
terminalId String
Required. ID of the terminal from which we want to retrieve the tabStops.
Returns
-
String
The terminal's tabStops, ['ยท'] by default.
Example
const state = storeHelper.getState();
const getTerminalTabStops = selectorsHelper.make('getTerminalTabStops');
const tabStops = getTerminalTabStops(state, {
terminalId: 'terminal-1',
});
getTerminalHostConnectionId
Returns the hostConnectionId of a specific terminal.
getTerminalHostConnectionId(state: Object, { terminalId: String }): String;
-
state Object
Required. The global state of the application.
-
terminalId String
Required. ID of the terminal from which we want to retrieve the hostConnectionId.
Returns
-
String
The terminal's hostConnectionId.
Example
const state = storeHelper.getState();
const getTerminalHostConnectionId = selectorsHelper.make('getTerminalHostConnectionId');
const hostConnectionId = getTerminalHostConnectionId(state, {
terminalId: 'terminal-1',
});
getTerminalHostProperty
Returns a host property of a specific terminal.
getTerminalHostProperty(state: Object, { terminalId: String, key: String }): Any;
-
state Object
Required. The global state of the application.
-
terminalId String
Required. ID of the terminal from which we want to retrieve the host property.
-
key String
Required. Key of the property from which we want to retrieve it's value.
Returns
-
Any
The value of terminal's property.
Example
const state = storeHelper.getState();
const getTerminalHostProperty = selectorsHelper.make('getTerminalHostProperty');
const som = getTerminalHostProperty(state, {
terminalId: 'terminal-1',
key: 'som',
});