New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

navigation-component

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

navigation-component

It is a component added with the functions that navigation should have and designed with bootstrap.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

navigation-component

Build Status npm version

This is Navigation component.
Simply pass api and the id value of the html you want to specify as root, and the renderOption to complete the navigation.

Feature

You can see the demo with list component in demo-branch

1. Caching fetched data

Assuming that the data fetched from the api does not change, once fetched from the api, the data corresponding to that index is cached.

2. Activate buttons according to the situation

X: Clickable / O: Not clickable

Case 1
이전<<>>다음
XXOO

Case 2
이전<<>>다음
XOOO

Case 3
이전<<>>다음
OOOX

Case 4
이전<<>>다음
OOXX


Usage

const nav = new NavComponent(api, '#nav');
nav.on('buildNav', data => {
    //TODO attach event
});

Also,

const nav = new NavComponent(api, '#nav', {
    countOfItem: 5,
    countOfIndex: 3
});

Notice!

If the renderOption passed to the two each components is different, an error occurs. You can check it in tool for developer of browser.

// default renderOption
{
  countOfItem: 3, // Number of items to render on one page
  countOfIndex: 5 // Number of pagination about items
}

API Design in component

  • To fetch value to count of data
    • [Domain Address]/count

Install

> git clone https://github.com/JaeYeopHan/Navigation_Component nav
> cd nav
> yarn add //or npm install
> npm run dev

Dependency

  • axios
  • handlebars
  • mocha / chai / chai-http
  • Webpack2
    • eslint-loader(pre)
    • handlebars-loader
    • babel-loader
  • ESLint
    • airbnb-base
  • event-emitter
  • Travis CI
  • bootstrap

LICENSE

MIT License

Copyright (c) 2017 Jbee

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FAQs

Package last updated on 05 Jul 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc