Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@cloudquery/plugin-config-ui-lib
Advanced tools
Plugin configuration UI library for CloudQuery Cloud App
Plugin Config UI library for CloudQuery Plugin Config UI
@cloudquery/plugin-config-ui-lib
is a library that provides various utilities that can be used in CloudQuery Plugin Config UI.
To install the library, you can use npm:
npm install @cloudquery/plugin-config-ui-lib
This hook is used to automatically detect the changes of the height of the form container and notify CloudQuery Cloud App about those. The hooks returns the React Ref object that should reference the HTML element that represents the form container.
const containerRef = useFormHeightChange(pluginUiMessageHandler);
return (
<div ref={containerRef}>
<form>
<input type="text" />
</form>
</div>
);
This hook is used get the initial values for the form from the CloudQuery Cloud App. The initial values can be undefined, therefore the hook also returns information whether it was initialized.
const { initialized, initialValues } = useFormInit(pluginUiMessageHandler, false);
if (!initialized) {
return null;
}
return (
<div>
<form>
<input type="text" value={initialValues.name} />
</form>
</div>
);
This hook is used to handle the submit event for the form from the CloudQuery Cloud App.
It requires the function that should validate the data and return an object either with
errors
or values
depending on the validation result. The function can also return
a Promise of the same type.
const [name, setName] = useState('');
const handleValidate = () => {
if (!name.trim()) {
return { errors: { name: 'Name is required' } }
}
return { values: { name } };
}
useFormSubmit(handleValidate);
return (
<input type="text" value={name} onChange={event => setName(event.target.value)} />
)
To build the library, run:
npm run build
To run the test suite, execute:
npm test
If you encounter any issues or have feature requests, please feel free to open an issue on the GitHub repository.
This project is licensed under the Mozilla Public License..
FAQs
Plugin configuration UI library for CloudQuery Cloud App
The npm package @cloudquery/plugin-config-ui-lib receives a total of 180 weekly downloads. As such, @cloudquery/plugin-config-ui-lib popularity was classified as not popular.
We found that @cloudquery/plugin-config-ui-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.