Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@acpaas-ui/ngx-embeddable-widgets
Advanced tools
Angular wrapper for ACPaaS UI Embeddable Widgets
This is an Angular component and decorator that wraps the ACPaaS UI Embeddable Widgets framework.
For more information on what embeddable widgets are see the link above.
There is a demo app, see below for instructions on running it.
> npm install @acpaas-ui/ngx-embeddable-widgets
Import the component in your module:
import { EmbeddableWidgetsModule } from '@acpaas-ui/ngx-embeddable-widgets';
@NgModule({
imports: [
...,
EmbeddableWidgetsModule
],
...
})
In your template:
<aui-embeddable-widget
widgetUrl="//example.com/widget/definition.json"
[props]="{ someProp: 'value' }">
</aui-embeddable-widget>
Supported attributes:
There are no events, since all event handlers are specified in props. To understand how to do this, look at the onClick
event inside the example
folder.
Create a page in your angular app that contains the widget.
Publish a JSON definition for your widget. For example, you can include a file widget-definition.json
in the assets folder. See example/assets/widget-definition.json
for an example.
Decorate the page's component:
import { EmbeddableWidget } from '@acpaas-ui/ngx-embeddable-widgets';
@Component({
selector: 'app-widget',
templateUrl: './widget.page.html'
})
@EmbeddableWidget('/assets/widget-definition.json')
export class WidgetPage {
// ...
public auiOnWidgetInit(props) {
// initialize from props here
}
This will do the following:
auiOnWidgetInit
method and pass it the props
specified from the container app.> npm install
> npm start
Browse to localhost:4200
The <aui-embeddable-widget>
component can be rendered with server-side rendering in Angular Universal.
Include the following code in server.ts
of your Universal app
if (typeof window === 'undefined') {
global['window'] = {};
}
Use <aui-embeddable-widget>
in the normal way
We welcome your bug reports and pull requests.
Please see our contribution guide.
Joeri Sebrechts (joeri.sebrechts@digipolis.be)
This project is published under the MIT license.
3.0.1 - 2023-11-27
FAQs
Angular wrapper for ACPaaS UI Embeddable Widgets
We found that @acpaas-ui/ngx-embeddable-widgets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.