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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bnuby/ng-bnuby

v0.0.11

Published

## Installation ``` npm install ng-bnuby --save ```

Readme

NgBnuby Library

Installation

npm install ng-bnuby --save

Usage

step 1: Import NgBnubyModule into your app.module.ts

  @NgModule({
    imports: [
      NgBnubyModule
    ]
  })

step 2:
You are Well Done!.
Now you can Add your favorite Component. (prefix with: ng-bnuby)

<body>
  <ng-bnuby-datatable></ng-bnuby-datatable>
  <ng-bnuby-image-upload></ng-bnuby-image-upload>
</body>

Components List

1. Datatable

2. Image Upload

3. Multi Select

4. Side Bar

Components


1. Datatable Component

Dom

example.component.html

<ng-bnuby-datatable
  [table]="table"
  [headers]="headers"
  [isLoading]="isLoading"
  [itemSet]="itemSet"
></ng-bnuby-datatable>

typescript

example.component.ts

Datatable main config

table: Datatable = {
  style: {
    'background-color': 'white'
  }
};

Define Header

headers: DatatableHeaders = [
  {
    title: 'Name',
    key: 'h1'
  },
  {
    title: 'Test2',
    key: 'h2'
  },
  {
    title: 'Tools',
    key: 'tools'
  }
];

Define thead style

theadStyle: { [klass: string]: any } = {
  'border-bottom': '1px solid gray'
};

Define th style

thStyle: { [klass: string]: any } = {
  padding: '10px 10px'
};

Define loading text

loadingText: string = 'Data Loading';

Define no Data text

noDataText: string = 'No Data';

Define Table Item

itemSet: DatatableRows =  [
    {
      _item: {},
      h1: {
        title: 'Hello World'
      },
      h2: {
        title: 'Temporary 2'
      },
      tools: {
        buttons: [
          {
            html: '<i class=\'fa fa-edit\'/i>',
            callback: item => {
              console.log(item);
            }
          },
          {
            html: '<i class=\'fa fa-trash\'/i>',
            callback: item => {
              console.log(item);
            }
          },
          {
            html: '<i class=\'fa fa-info\'/i>',
            callback: item => {
              console.log(item);
            }
          }
        ]
      }
    }
  ]

Methods / Attributes

| Attribute | Description | type | default value | | - | - | - | - | | table | Use to define datatable, ex: title, style, class | Datatable | { style: { 'background-color': 'white' } }; |
| theadStyle | Use to define thead Style | CSSStyleDeclaration | { 'border-bottom': '1px solid gray' }| | thStyle | Use to define th Style | CSSStyleDeclaration | { padding: '10px 10px' }|
| tdStyle | Use to define td Style | CSSStyleDeclaration | { padding: '5px 10px', 'border-bottom': '1px solid gray' } | | * headers | Use to define datatable header | DatatableHeaders | { title: 'Name', key: 'h1' } | | loadingText | Use to define loading text | string | Data Loading | | noDataText | Use to define no data text | string | No Data | | * itemSet | Use to define Table Data | DatatableRows | { ... } | | isLoading | Use to control loading text | boolean | false |


2. Image Upload Component

Use ng-bnuby-image-upload tag selector

<ng-bnuby-image-upload></ng-bnuby-image-upload>

Methods / Attributes

| Attribute | Description | type | default value | | - | - | - | - | | title | Given a title for the image upload | string | Image Upload |
| simple | If false Use the title attr and size attr | boolean | false|
| size | Use to define image upload size | sm, md, lg, fluid | md | | uploadURL (Require) | The url that file upload. | string | '' | | uploadedCallback | Use to receive the request callback and return a string for form control value. If status true, mean upload succses, otherwise mean fail. | Funtion | (status: boolean, res: any) => string | null |
| zIndex | Use to change content (image) z-index | number | 0|


3. Multi Select Component

Use ng-bnuby-multi-select multi selector

<ng-bnuby-multi-select></ng-bnuby-multi-select>

Methods / Attributes

| Attribute | Description | type | default value | | - | - | - | - | | title | Given a title for the image upload | string | Image Upload |
| simple | If false Use the title attr and size attr | boolean | false|
| options | Use to define the options | ngBnubyOptions | [ { title: 'example', value: 'example', } ]| | placeholder | Use to define placeholder | string | example |


4. Side Bar Component

Use ng-bnuby-side-bar selector

<ng-bnuby-side-bar></ng-bnuby-side-bar>

Methods / Attributes

| Attribute | Description | type | default value | | - | - | - | - | | sideBarItems | Use SideBarItems to define the sidebar | SideBarItems | Below Example 1 |

Example 1: Basic Usage

 sideBarItems: SideBarItems = [
  [
    {
      title: 'Home',
      icon: 'fa-home',
      path: '/home'
    },
    {
      title: 'User',
      icon: 'fa-user',
      children: [
        {
          title: 'Management',
          icon: 'fa-text',
          path: '/user/user-mgt'
        },
        {
          title: 'Setting',
          icon: 'fa-text',
          path: '/user/setting'
        },
      ],
    },
  ]
 ]