Endpoints
Description
Class used to make all endpoint-related operations.
Description
Initializes the endpoints manager with a reference to the ColumnSummary plugin and the summary endpoint configuration.
Members
currentEndpoint
endpoints.currentEndpoint : object
The current endpoint (calculation destination point) in question.
Default: null
endpoints
endpoints.endpoints : Array
Array of declared plugin endpoints (calculation destination points).
Default: {Array} Empty array.
settingsType
endpoints.settingsType : string
Settings type. Can be either ‘array’ or ‘function’.
Default: ”{‘array’}“
Methods
assignSetting
endpoints.assignSetting(settings, endpoint, name, defaultValue)
Setter for the internal setting objects.
| Param | Type | Description |
|---|---|---|
| settings | object | Object with the settings. |
| endpoint | object | Contains information about the endpoint for the the calculation. |
| name | string | Settings name. |
| defaultValue | object | Default value for the settings. |
getAllEndpoints
endpoints.getAllEndpoints() ⇒ Array
Get an array with all the endpoints.
getEndpoint
endpoints.getEndpoint(index) ⇒ object
Get a single endpoint object.
| Param | Type | Description |
|---|---|---|
| index | number | Index of the endpoint. |
initEndpoints
endpoints.initEndpoints()
Initialize the endpoints provided in the settings.
parseSettings
endpoints.parseSettings(settings) ⇒ Array<object>
Parse plugin’s settings.
| Param | Type | Description |
|---|---|---|
| settings | Array | The settings array. |
refreshAllEndpoints
endpoints.refreshAllEndpoints()
Calculate and refresh all defined endpoints.
refreshCellMetas
endpoints.refreshCellMetas()
Refreshes the cell meta information for the all endpoints after the updateSettings method call which in some
cases (call with columns option) can reset the cell metas to the initial state.
refreshChangedEndpoints
endpoints.refreshChangedEndpoints(changes)
Calculate and refresh endpoints only in the changed columns.
| Param | Type | Description |
|---|---|---|
| changes | Array | Array of changes from the afterChange hook. |
refreshEndpoint
endpoints.refreshEndpoint(endpoint)
Calculate and refresh a single endpoint.
| Param | Type | Description |
|---|---|---|
| endpoint | object | Contains the endpoint information. |
refreshEndpointsBySourceColumns
endpoints.refreshEndpointsBySourceColumns(visualColumns)
Calculate and refresh endpoints whose sourceColumn (visual) matches any of the provided columns.
| Param | Type | Description |
|---|---|---|
| visualColumns | Set<number> Array<number> | Visual column indexes to match against. |
resetAllEndpoints
endpoints.resetAllEndpoints([endpoints], [useOffset])
Resets (removes) the endpoints from the table.
| Param | Type | Default | Description |
|---|---|---|---|
| [endpoints] | Array | optional Array containing the endpoints. | |
| [useOffset] | boolean | true | optional Use the cell offset value. |
resetEndpointValue
endpoints.resetEndpointValue(endpoint, [useOffset])
Reset the endpoint value.
| Param | Type | Default | Description |
|---|---|---|---|
| endpoint | object | Contains the endpoint information. | |
| [useOffset] | boolean | true | optional Use the cell offset value. |
setEndpointValue
endpoints.setEndpointValue(endpoint, [source], [render])
Set the endpoint value.
| Param | Type | Default | Description |
|---|---|---|---|
| endpoint | object | Contains the endpoint information. | |
| [source] | string | optional Source of the call information. | |
| [render] | boolean | false | optional true if it needs to render the table afterwards. |