![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
github.com/andreysyagrovskiy/ngx-flexible-select
For detailed explanation on how things work, checkout the DEMO
npm install ngx-flexible-select --save
import { NgxFlexibleSelectModule } from 'ngx-flexible-select';
...
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgxFlexibleSelectModule,
FormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
....
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
address = null;
addressList = [
{
id: '1',
country: 'USA',
city: 'New York',
address: 'Dekalb Avenue',
house: '101',
flat: '12'
},
{
id: '2',
country: 'France',
city: 'Paris',
address: 'des Champs-Élysées',
house: '21',
flat: '1'
},
{
id: '3',
country: 'Great Britain',
city: 'London',
address: 'Arthur Street',
house: '91',
flat: '66'
}
];
filteredAddressList = [];
helloWorldAlert(name: string) {
alert(`Hello, ${name}!`);
}
ngOnInit() {
this.filteredAddressList.push(...this.addressList);
}
search(event) {
const value = event.target.value.toLowerCase();
this.filteredAddressList = this.addressList.filter(address => {
if (
address.address.toLowerCase().indexOf(value) !== -1 ||
address.country.toLowerCase().indexOf(value) !== -1 ||
address.city.toLowerCase().indexOf(value) !== -1 ||
address.house.toLowerCase().indexOf(value) !== -1 ||
address.flat.toLowerCase().indexOf(value) !== -1
) {
return true;
} else {
return false;
}
});
}
trackBy(index, item) {
return item.id;
}
}
<section id="demo">
<img class="icons" src="./assets/angular-icon-1.svg" />
<h1>ngx-flexible-select - the most flexible angular select</h1>
<br />
<h2>Simple select</h2>
<ngx-flexible-select [(ngModel)]="address">
<div value-text *ngIf="address">{{address.address}} {{address.house}} {{address.city}}</div>
<div label>Your address</div>
<ngx-flexible-select-option *ngFor="let item of addressList; trackBy: trackBy" [value]="item">{{item.address}}, {{item.house}}, {{item.flat}}, {{item.city}}, {{item.country}}</ngx-flexible-select-option>
</ngx-flexible-select>
<h2>Select with search input</h2>
<ngx-flexible-select [(ngModel)]="address">
<div value-text *ngIf="address">{{address.address}} {{address.house}} {{address.city}}</div>
<div label>Your address</div>
<input search-input (keyup)="search($event)" placeholder="Search address" />
<ngx-flexible-select-option *ngFor="let item of filteredAddressList; trackBy: trackBy" [value]="item">{{item.address}}, {{item.house}}, {{item.flat}}, {{item.city}}, {{item.country}}</ngx-flexible-select-option>
</ngx-flexible-select>
<h2>Select with Button</h2>
<ngx-flexible-select [(ngModel)]="address">
<div value-text *ngIf="address">{{address.address}} {{address.house}} {{address.city}}</div>
<div label>Your address</div>
<ngx-flexible-select-option *ngFor="let item of addressList; trackBy: trackBy" [value]="item">{{item.address}}, {{item.house}}, {{item.flat}}, {{item.city}}, {{item.country}}</ngx-flexible-select-option>
<ngx-flexible-select-button>
<button (click)="helloWorldAlert('ngx-flexible-select')">Show alert</button>
</ngx-flexible-select-button>
</ngx-flexible-select>
</section>
@Input() more = false;
@Input() needFocusInpOnTab = false;
@Input() optionsWrapClass = '';
@Input() pending = false;
@Input() value: any;
@Input() selectDisabled = false;
@Output() loadMore: EventEmitter<any> = new EventEmitter();
@Output() change: EventEmitter<any> = new EventEmitter();
For detailed explanation on how things work, checkout the DEMO
FAQs
Unknown package
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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.