Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@widget-editor/widget-editor
Advanced tools
This is the second iteration of the widget editor. The widget editor is a tool to generate charts based on vega configurations. You can plug in any api using Adapters. Currently, we support out of the box the resource watch API.
This is the second iteration of the widget editor. The widget editor is a tool to generate charts based on vega configurations. You can plug in any api using Adapters. Currently, we support out of the box the resource watch API.
Installing through NPM npm install widget-editor
Instaling with Yarn(v1) yarn install widget-editor
There are two parts to the editor. Eather, you can use the entire editor by merely importing the WidgetEditor
component. Or if you want to display the configured charts, you should import the Renderer
.
import WidgetEditor from "widget-editor";
const App = () => {
return <WidgetEditor />;
};
The editor has a few properties, some required. Below you have all properties listed.
First of all, we need to plug in an adapter
to the editor. This adapter is responsible for proxying and resolving any necessary information into the editor itself. Currently, we only have an adapter written for the resource watch API.
This tells the editor what dataset to utilize. (note* this might change in the future)
widgetId is used together with a datasetId. This will make another request fetching the necessary widget.
Schemes allow you to add custom themes to the editor. This takes an array of objects of this format:
{
"name": "theme name",
"mainColor": "#hex",
"category": ["#hex"]
}
This property renders the editor in a compact mode. By default, the editor is a two-column layout. Enabling this setting will render one column & overlay the options.
This property allows you to disable specific features in the editor, read more here.
import WidgetEditor, { RwAdapter } from "widget-editor";
<WidgetEditor
disable={[string]}
schemes={[theme_objects]}
datasetId="string"
widgetId="string"
adapter={RwAdapter}
/>;
The renderer allows you to render a chart based on a widget configuration. It takes one parameter, which is a widget configuration.
import { Renderer } from "widget-editor";
const App = () => {
return <Renderer widgetConfig={...} />;
};
FAQs
This is the second iteration of the widget editor. The widget editor is a tool to generate charts based on vega configurations. You can plug in any api using Adapters. Currently, we support out of the box the resource watch API.
We found that @widget-editor/widget-editor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.