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.
@pitaya-components/dialog
Advanced tools
Pitaya-framework template component.
This documentation assumes you are at least slightly familiar with aurelia and its usage. If not, we highly suggest you take a look at its Quick Start section first to get a better understanding of the approaches that are presented it here.
npm install @pitaya-components/master-component --save
You have a few options when importing a component into your layout:
<template>
<require from="@pitaya-components/master-component/dist/native-modules/master-component"></require>
...
</template>
@viewResources( "@pitaya-components/master-component/dist/native-modules/master-component" )
export class MyView
{
...
}
export function configure( config: FrameworkConfiguration )
{
config.globalResources( [
PLATFORM.moduleName( "@pitaya-components/master-component/dist/native-modules/master-component" )
] );
}
Our components are usually initialized by defining them in your views HTML. And can be accessed afterwards in the corresponding view model.
<template>
<master-component
view-model.ref="masterComponent"
on-attached.call="_masterComponentHasBeenAttached(component)"
></master-component>
...
</template>
import {MasterComponent} from "@pitaya-components/master-component";
export class MyView
{
public component: MasterComponent;
public doSomething()
{
this.component.title = "Bananarama";
}
}
Put different variants here
<master-component></master-component>
Attaching an event handler is as simple as adding on-<event>.call="<function>(<parameters>)"
.
The function that you specify has to be defined as a method on the view model class, so that aurelias template engine can use it.
<pitaya-button
on-click.call="myButtonHasBeenClicked(event)"
>
BUTTON LABEL
</pitaya-button>
export class MyView
{
public myButtonHasBeenClicked(event: CustomEvent)
{
console.log("Event detail:", event.detail);
}
}
You also can pass any parameter you like.
Specifying event
just tells the component that you wish to receive the event object, but if you define something else, it will be passed down to your function just like one would expect.
<pitaya-button
on-click.call="myButtonHasBeenClicked('my custom message')"
>
BUTTON LABEL
</pitaya-button>
export class MyView
{
public myButtonHasBeenClicked(message: string)
{
console.log(message);
}
}
A bindable is part of a core functionality of aurelia which basically allows you to configure a component from within your HTML code. They can be set/accessed via HTML attribute and also programmatically.
<master-component
title="Super duper template component"
></master-component>
import {MasterComponent} from "@pitaya-components/master-component";
export class MyView
{
public component: MasterComponent;
public someMethod()
{
this.component.title = "Super duper template component";
}
}
Attribute / Property | Type |
---|---|
title | string |
on-attached | ( component ) => {} |
Method Signature | Description |
---|---|
title: string | Sets the title |
onAttached: Function | Sets the onAttached callback |
reinitialize() => Promise <void> | void | Reinitializes the component |
Mixin | Desciption |
---|---|
master-component-background | Sets the background color |
With this component we are relying on the [PLACEHOLDER] component of MDC. Check out the documentation to learn how to use their SASS mixins.
Package | Url |
---|---|
aurelia-framework | aurelia-framework |
Aurelia-typed-observable-plugin | Aurelia-typed-observable-plugin |
The main repository uses tagged Releases to communicate changes between versions.
Q: Why another JavaScript framework?
A: Read this article for a detailed overview of ours goals.
Find us on Twitter for the latest news, and please consider giving us a ?? star on GitHub!
For contributions in the form of bug fixes and changes, feel free to use Pull Requests or send us a DM on Twitter to discuss how best to approach your issue.
The Master component source code is licensed under the MIT license.
FAQs
Pitaya-Framework Dialog Component.
The npm package @pitaya-components/dialog receives a total of 1 weekly downloads. As such, @pitaya-components/dialog popularity was classified as not popular.
We found that @pitaya-components/dialog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.