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

naviboard

v4.1.0

Published

A javascript library for handling navigation on web application, feature phone and KAIOS applications.

Downloads

78

Readme

naviboard JS

Commitizen friendly Travis NPM Version Downloads This Week License semantic-release

Naviboard is a library for navigation with the help of keyboard/keypad in the feature phone web applications(e.g kaiOS applications). This library helps developer to think about logic rather than thinking about handling navigation in their web page by simple API's. Developers working on feature phones which need navigation support from keypad to browse in their native application will surely be benefited with this small javascipt library.It auto generates a navigation schema based on desired navigation according to design.

Naviboard is available as a NPM module for use with node.js. If you don't use node to install the library then you can simply include naviboard.js or naviboard.min.js from the dist folder in this repo. These files are UMD wrapped so they can be used with or without a module loader such as requireJS.

 npm install naviboard

Steps to setup:

  • Developer can include it directly or by CDN link in index.html like below:
<script src="https://cdn.jsdelivr.net/npm/naviboard@latest-version/dist/naviboard.min.js"></script>
  • Please check the latest stable version available in the release list.

  • After installing/including in index.html naviBoard will be available globally.Its ready to use like below:

Whenever the component(Angular, React etc) or the web page is initiating the loading, considering below as the first step: Give class navigable to the elements which require navigation under a parent component.

<div class="wrapper" id='ParentElementID'>
    <div class="box a navigable">A</div>
    <div class="box b navigable">B</div>
    <div class="box c navigable">C</div>
    <div class="box d navigable">D</div>
    <div class="box e navigable">E</div>
</div>

Now give id as arguement to the API setNavigation eg. ParentElementID in above case.

 naviBoard.setNavigation('ParentElementID')

Go to the below link for proper understanding of other API's

  • https://jsfiddle.net/amanboss9/zv5hocxq/2/embedded/result

Yippie!! All set to navigate through the elements.

Now when we want to navigate other page or component, we need to destroy the previous component and set the new one for navigation. Its advisable to use destroy method associated with the component like componentWillUnmount() in react or this.$onDestroy in angular v1.6.

 naviBoard.destroyNavigation('ParentElementID')

Other API's:

Whenever the client is getting refreshed(some new DOM element insertion or deletion) we need to handle it with updated navigation schema and for this we use refreshNavigation API.

e.g if a new component has been added in run time we need to update our library for taking care of the newly added element or removed element.

 naviBoard.refreshNavigation('ParentElementID',status)

status could be update ,destroy and refresh depending upon the change in navigation required in application.

  • There is one more API for getting the current focused element by navigation. "By navigation" explicitly means that if focus is been hindered by other thing we might lose track of the desired navigation.

Current active element can be used to attach events. Like one can attach click event on element and can use ng-click on top of that.

 naviBoard.getActiveElement()
  • You can attach event according to component currently having the access for navigation by getting the current rendered component and can map it to different event.
 naviBoard.getNavigationComponent()
  • User can pause the navigation in between as well. For Ex: If a rest call is happening and before the response if user wants to pause the navigation and after response if user wants to again resume navigation, he can by using the below API's.
 naviBoard.pauseNavigation()
 naviBoard.resumeNavigation()

Happy Coding!!!

Use naviboard and suggest changes or modifications required as its a small step for developers to save their time in order to navigate in feature phone/banana phones applications instead writing lot of extra lines.