@lblod/ember-address-search

0.1.0 • Public • Published

@lblod/ember-address-search

This addon provides methods to get addresses from existing registries.

It works together with the backend service adressenregister-fuzzy-search-service, to which it makes calls to suggest or find addresses.

Installation

ember install @lblod/ember-address-search

Usage

The addon can be used by importing the following service in your controller:

@service addressRegister;

Methods

The addresses described below are objects with the following properties :

{
  uri, // only after `findAll`
  addressRegisterId,
  fullAddress,
  street,
  housenumber,
  busNumber,
  zipCode,
  municipality,
  country
}

The service provides the following methods:

  • suggest(fuzzyString): does a fuzzy search based on a given string. Returns an array of addresses.
  • findAll(suggestion): tries to find all the addresses matching a suggestion. Returns an array of addresses.
  • isEmpty(address): returns true if the address is empty, false otherwise.

Roadmap

  • Fix the continuous integration to push new versions to the npm registry. In the meantime, npm publish is our friend.
  • If a decision is made to use the same display for address selection across the LBLOD applications, we could create a component using this service in ember-appuniversum.

License

This project is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i @lblod/ember-address-search

Weekly Downloads

34

Version

0.1.0

License

MIT

Unpacked Size

9.45 kB

Total Files

10

Last publish

Collaborators

  • erikap
  • nielsv
  • madnificent
  • cecemel
  • clairelovisa
  • dietr
  • oscar.redpencil
  • aatauil