# Plugins Reference

Canonical page: https://www.adaptabletools.com/docs/technical-reference-plugins

- Plugins are groupings of functionality relevant to a particular use case or set of users
- Currently 4 plugins available with more to come in due course

## AdapTable Plugins

AdapTable provides 4 plugins.

- Plugins keep the AdapTable download to a manageable size
- They ensure developers only download the functionality which is needed

| Plugin                                                             | Description                                                                      |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| [Master Detail](https://www.adaptabletools.com/docs/handbook-master-detail/index.md) | Leverages the Master / Detail grids provided by AG Grid                          |
| [OpenFin](https://www.adaptabletools.com/docs/integrations-openfin/index.md)         | Additional functionality when using AdapTable inside the OpenFin container       |
| [interop.io](https://www.adaptabletools.com/docs/integrations-interop/index.md)      | Leverages interop.io connect (previously Finsemble & Glue42) for AdapTable users |
| [ipushpull](https://www.adaptabletools.com/docs/integrations-ipushpull/index.md)     | Promotes collaboration through ipushpull                                         |

- The **No Code Plugin** was removed in [Version 24](https://www.adaptabletools.com/support/version-240-release-note)
- The **Charts Plugin**  was removed in [Version 11](https://www.adaptabletools.com/support/version-11-release-note) in place of comprehensive [support of AG Grid Charting](https://www.adaptabletools.com/docs/handbook-charts/index.md)
- The **Finance Plugin**  was removed in [Version 16](https://www.adaptabletools.com/support/version-16-release-note) as [FDC3 Support](https://www.adaptabletools.com/docs/handbook-fdc3/index.md) was moved into the core product
- The **Finsemble & Glue Plugins** were replaced in [Version 18](https://www.adaptabletools.com/support/version-180-release-note) with a new [interop.io](https://www.adaptabletools.com/docs/integrations-interop/index.md) plugin

## Configuring Plugins

There are a few steps required if you wish to use Plugins.

### Setting up Plugins in AdapTable

To use the AdapTable plugins you need to do the following:

Do this via the usual `npm install`.

Only install plugins you wish to use in your application.

npm install @adaptabletools/adaptable-plugin-master-detail

- You must install the same version of the plugin as you use for the AdapTable Vanilla, React or Angular package
- AdapTable will send a warning message to the console if these are different

Assuming you are using all the plugins then you will need all these import statements:

```ts
import masterDetail from "@adaptabletools/adaptable-plugin-master-detail-aggrid";
import ipushpull from "@adaptabletools/adaptable-plugin-ipushpull";
import interop from "@adaptabletools/adaptable-plugin-interop";
import openfin from "@adaptabletools/adaptable-plugin-openfin";
```

Add the plugins to [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md) via the `plugins` property.

Some plugins can optionally receive an Options object in the constructor, so provide this if required.

```ts {5}
const adaptableOptions: AdaptableOptions = {
    primaryKey: "OrderId",
    adaptableId: "Plugin Demo",
    // call the plugins functions and pass them to plugins array
    plugins: [masterdetail(), openfin(openFinOptions)],
    .....
  }
```

## Accessing Plugins

The [`Plugins API`](https://www.adaptabletools.com/docs/reference/pluginsapi.md) section of Adaptable API can be used for accessing an individual plugin at run-time.

Most Plugins have a dedicated Api page which can be retrieved directly from PluginsApi, e.g.:

```ts
const ipushpullApi: IPushPullApi = adaptableApi.pluginsApi.getipushpullPluginApi();
```

Full list of methods in Plugins API is:

| Method | Returns | Description |
| --- | --- | --- |
| [getInteropioPluginApi()](https://www.adaptabletools.com/docs/reference/pluginsapi.md#getinteropiopluginapi) | [`InteropioPluginApi`](https://www.adaptabletools.com/docs/reference/interopiopluginapi.md) | Returns Interopio API class in Adaptable API |
| [getipushpullPluginApi()](https://www.adaptabletools.com/docs/reference/pluginsapi.md#getipushpullpluginapi) | [`IPushPullApi`](https://www.adaptabletools.com/docs/reference/ipushpullapi.md) | Returns ipushpull API class in Adaptable API |
| [getOpenFinPluginApi()](https://www.adaptabletools.com/docs/reference/pluginsapi.md#getopenfinpluginapi) | [`OpenFinApi`](https://www.adaptabletools.com/docs/reference/openfinapi.md) | Returns OpenFin API class in Adaptable API |
| [getPluginsState()](https://www.adaptabletools.com/docs/reference/pluginsapi.md#getpluginsstate) | `PluginsState` | Retrieves the Plugin State (internal only) |
| [getPluginState(pluginId)](https://www.adaptabletools.com/docs/reference/pluginsapi.md#getpluginstate) | `any` | Gets the State for a given Plugin |
| [registerPlugin(pluginId, initialPluginState)](https://www.adaptabletools.com/docs/reference/pluginsapi.md#registerplugin) | `void` | Registers a Plugin (internal method) |
| [setPluginState(pluginId, pluginState)](https://www.adaptabletools.com/docs/reference/pluginsapi.md#setpluginstate) | `void` | Sets the initial state for a given plugin (internal method) |
