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 🙏

© 2024 – Pkg Stats / Ryan Hefner

datastop-io-autocomplete-library-1

v2.0.5

Published

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.5.

Downloads

21

Readme

Datastop.io Autocomplete Library

This project was generated with Angular CLI version 9.0.5.

Datastop.io Autocomplete Library contains multiple auto-complete (type-ahead) components which can be used in data entry forms or for filtering in UIs.

Angular Material

Datastop.io Autocomplete Library components are built following Angular Material's Auto-Complete functionality

Data Sources

The following auto-complete widgets are defined:

  • Institutions (Universities and Colleges based on IPEDS)
  • Locations (city, state and/or zip code)
  • Majors (college degrees - based on CIP Codes)
  • Occupations (ONET occupations)

Data sources for each auto-complete widget:

Institutions

Institutitons (colleges/universities) are sourced from IPEDS.

Locations

Locations (city, state zipcode) allow user to find City/State location based on filtering using zipCode or city name.

Majors

Majors are CIP Codes from Department of Ed's IPEDS.

Occupations

Occupations are built from Burning Glass SubOccupations. SubOccupations are refinements in ONET classifications

Development Information

Component Inputs

  @Input() apiUrl: string;
  @Input() searchTerm: string;
  @Input() selectedSearchResultModel: SearchResultModel;
  @Input() label: string;
  @Input() formFieldAppearance: string;

apiUrl

@Input() apiUrl: string

Each Datastop.io Autocomplete Library component has its own default API developed against data sources outlined above.

NOTE: you can provide your own API for any of the auto-completes above. This will override the default API. By providing your own API, you are essenttially making the auto-complete a 'generic' auto-complete widget.

By using your own API, YOU MUST ENSURE your API returns results matching SearchResultModel below, otherwise, unintended consequences will happen.

searchTerm

@Input() searchTerm: string

This is the search string input used by API to do a search.

selectedSearchResultModel

@Input() selectedSearchResultModel: SearchResultModel;

The SearchResultModel representing the selected record used to preselect the record in drop down.

label

@Input() label: string;

The label you wish to use for auto-complete form element.

formFieldAppearance

@Input() formFieldAppearance: string;

The ability to influence the form field appearance based on Angular Material Design

Component Outputs

@Output('onSelection') searchResultSelectionEventEmitter: EventEmitter<SearchResultModel> = new EventEmitter<SearchResultModel>();

SearchResultModel[]

Each Datastop.io Autocomplete Library component returns a common model named SearchResultModel.

export interface SearchResultModel
{
  id: string;
  name: string;
  data: {};
}

The auto-complete (type-ahead) results will contain results matching a search string input. Each record in the result will contain data matching the signature of SearchResultModel above.

id

This is a string data type containing the unique identifier for the record. This value could be a number. It could also be a concatenated string representing a multi-part identifier.

name

This represents a textual value used in the drop down representing the record returned from API service.

data

This is a JSON object representing additional meta-data about the returned record. This could be data client app consumes.