npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@avoraui/av-dual-list-box

v0.0.5

Published

A customizable Angular dual list box component for managing item selections.

Readme

AvDualListBox Component (AvoraUI)

A customizable Angular dual list box component that allows users to move items between two lists with search functionality. This component implements Angular's ControlValueAccessor interface, making it fully compatible with reactive forms.

Features

  • Dual List Support: Move items between source and destination lists
  • Search Functionality: Filter items in both source and destination lists
  • Reactive Forms Integration: Full support for Angular reactive forms
  • Material Design: Built with Angular Material components
  • Dynamic Display: Customizable display property for list items
  • Selection Management: Supports multi-selection and bulk move operations
  • Memory Management: Maintains original lists for filtering and resets

Dependencies

This component requires the following Angular Material modules:

import { MatCard } from "@angular/material/card";
import { MatButton } from "@angular/material/button";
import { MatIcon } from '@angular/material/icon';
import { MatListOption, MatSelectionList } from "@angular/material/list";
import { MatFormField, MatLabel } from "@angular/material/form-field";
import { MatInput } from "@angular/material/input";

Installation

  1. Ensure you have Angular Material installed in your project
  2. Import the component in your module or use it directly (standalone component)

Usage

Basic Usage

<av-dual-list-box 
  [sourceList]="sourceItems"
  [displayProperty]="'name'">
</av-dual-list-box>

With Reactive Forms

// Component
export class MyComponent {
  listForm = this.fb.group({
    selectedItems: [[]]
  });

  sourceItems = [{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2' }];

  constructor(private fb: FormBuilder) {}
}
<!-- Template -->
<form [formGroup]="listForm">
  <av-dual-list-box 
    formControlName="selectedItems"
    [sourceList]="sourceItems"
    [displayProperty]="'name'">
  </av-dual-list-box>
</form>

Input Properties

| Property | Type | Required | Default | Description | |----------|------|----------|---------|-------------| | sourceList | T[] | Yes | [] | Array of items for the source list | | destinationObjectReference | string[] | No | [] | Reference path for nested object properties | | displayProperty | keyof T | '' | No | Property to display for each item |

Component Behavior

Item Selection

  • Select items in either list using the Material selection list
  • Move selected items between source and destination lists with arrow buttons

Search Functionality

  • Filter source and destination lists using the search inputs
  • Dynamic filtering based on the displayProperty

Item Management

  • Move: Transfer selected items between lists
  • Move All: Transfer all items between lists
  • Reset: Maintains original lists for filtering purposes

Form Integration

The component outputs an array of selected items, making it easy to:

  • Store in databases
  • Send via API calls
  • Integrate with form validation

Data Format

The component handles data as an array of objects:

Output: Array of selected items from the destination list Input: Array of items to initialize the destination list

Item Type Detection

The component uses the displayProperty to determine how to display items.

Error Handling

The component includes basic error handling for:

  • Invalid displayProperty (falls back to 'No Such Property')
  • Empty source list (displays no items)

Memory Management

The component automatically:

  • Maintains original lists for filtering
  • Updates lists dynamically without memory leaks

Styling

The component uses CSS classes that can be customized:

  • .listbox-container - Main container
  • .source-list - Source list container
  • .destination-list - Destination list container
  • .button-panel - Button panel container

Browser Compatibility

This component uses modern browser APIs:

  • Angular Material components
  • Reactive Forms API

Ensure your target browsers support these features or include appropriate polyfills.

Example Implementation

// app.component.ts
import { Component } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';

@Component({
  selector: 'app-root',
  template: `
    <form [formGroup]="listForm">
      <av-dual-list-box 
        formControlName="selectedItems"
        [sourceList]="sourceItems"
        [displayProperty]="'name'">
      </av-dual-list-box>
      
      <button (click)="onSubmit()" [disabled]="!listForm.valid">
        Submit
      </button>
    </form>
  `
})
export class AppComponent {
  sourceItems = [
    { id: 1, name: 'Item 1' },
    { id: 2, name: 'Item 2' },
    { id: 3, name: 'Item 3' }
  ];
  
  listForm: FormGroup = this.fb.group({
    selectedItems: [[]]
  });

  constructor(private fb: FormBuilder) {}

  onSubmit() {
    const selectedItems = this.listForm.get('selectedItems')?.value;
    console.log('Selected items:', selectedItems);
  }
}

Requirements

  • Angular 20+
  • Angular Material
  • Lodash (for isEqual utility)

Browser Support

  • Chrome/Edge 17+
  • Firefox 52+
  • Safari 10.1+

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

v0.0.5

  • Initial release
  • Basic dual list functionality
  • Search and filter support
  • Reactive forms integration
  • Material design implementation