@cloudquery/plugin-config-ui-connector
Version:
Plugin configuration UI connector for CloudQuery Cloud App
63 lines (38 loc) • 1.45 kB
Markdown
# @cloudquery/plugin-config-ui-connector
Plugin configuration UI connector for CloudQuery Cloud App.
## Description
`@cloudquery/plugin-config-ui-connector` is a library designed to establish communication between CloudQuery Cloud App form and Plugin UI.
## Installation
To install the library, you can use npm:
```bash
npm install @cloudquery/plugin-config-ui-connector
```
## Usage
Below is an example of how to use the `getPluginUiMessageHandler` function provided by the library.
### Example
```typescript
import { getPluginUiMessageHandler } from '@cloudquery/plugin-config-ui-connector';
// Create a message handler instance
const messageHandler = getPluginUiMessageHandler();
// Example of sending a message to the CloudQuery Cloud App form
messageHandler.sendMessage('height_changed', { height: 200 });
// Example of receiving a message from the CloudQuery Cloud App form
messageHandler.subscribeToMessage('init', function (payload) {
customCallback(payload);
});
```
## Development
### Building the Library
To build the library, run:
```bash
npm run build
```
### Running Tests
To run the test suite, execute:
```bash
npm test
```
## Contributing
If you encounter any issues or have feature requests, please feel free to open an issue on the [GitHub repository](https://github.com/cloudquery/plugin-config-ui-connector/issues).
## License
This project is licensed under the [Mozilla Public License.](LICENSE).