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

hms-core

v0.0.4

Published

The library is common library of Hotel Management System

Downloads

8

Readme

HMS Core Library

This library provides common components which use in other Angular projects. Currently, we have 4 components implemented and publish to public NPM.

Table Of Contents

Getting Started

Dependencies

| Dependencies | Version | | :-----------: |:--------------:| | Angular | ^7.2.0 | | Bootstrap | ^4.3.1 | | Ng-Bootstrap | ^4.1.2 |

Install

First thing, You need to an Angular project which you generate by Angular CLI. After that, You need to install Bootstrap CSS/SCSS and Ng-Bootstrap on either Dependencies or Dev Dependencies (--save-dev). You need to make sure about you imported bootstrap CSS/SCSS to your project.

// styles.scss
    @import '../../../node_modules/bootstrap/scss/bootstrap.scss';
// styles.css
    @import '../node_modules/bootstrap/dist/css/bootstrap.min.css';

About ".../.../.../" or ".../" at URL prefix, It's belong to project structure you have.

Then you can get our library from NPM as below:

npm i hms-core
npm install hms-core

Import the library to project

Now, you need to import the library to any modules that you need as the following example

// app.module.ts
...
import { HmsCoreModule } from 'hms-core'; // <-- Declare importting module from hms-core here
...

@NgModule({
    declarations: [
        AppComponent,
        ...
    ],
    imports: [
        ...,
        HmsCoreModule, // <-- Import the library here
        ...
    ],
    providers: [],
    bootstrap: [AppComponent],
    schemas: [CUSTOM_ELEMENTS_SCHEMA] // <-- Put CUSTOM_ELEMENTS_SCHEMA to schemas
})
export class AppModule { }

About HMS Core Components

Login

<hms-login [loginLanguages]="loginLanguage" [loginSignal]="loginSignal" (signIn)="onSignIn($event)" (signOut)="onSignOut()"></hms-login>

| Decorator | Name | Type | Require | Description | |:--------:|:-------:|:--------:|:--------:|:-----------:| | @Input | loginLanguages | LoginLanguages | Optional | Support multiple languages (i18n) for texts, labels in Login Component | | @Input | loginSignal | LoginSignal | Required | Get signal from external about login valid or invalid | | @Output | signIn | EventEmitter<LoginUser> | Optional | Emit LoginUser instance to external component | | @Output | signUp | EventEmitter<boolean> | Optional | Emit signal boolean to external component |

Header

<hms-header [headerData]="headerData" (searchTerm)="onSearch($event)" (updateProfile)="onUpdateProfile()" (changePassword)="onChangePassword()" (signOut)="onSignOut()"></hms-header>

| Decorator | Name | Type | Require | Description | |:--------:|:-------:|:--------:|:--------:|:-----------:| | @Input | headerData | Header | Required | Package other models need for header. As Logo, Title, Routes Menu, Multiple Languages for User Menu and so on | | @Output | searchTerm | EventEmitter<string> | Optional | Emit a string from search input | | @Output | updateProfile | EventEmitter<boolean> | Optional | Emit signal about user would like to navigate to "Profile" page to update info | | @Output | changePassword | EventEmitter<boolean> | Optional | Emit signal about user would like to navigate to "Change Password" page to update info | | @Output | signOut | EventEmitter<boolean> | Optional | Emit signal about user would like to sign out |

Footer

<hms-footer [footerData]="footerData"></hms-footer>

| Decorator | Name | Type | Require | Description | |:--------:|:-------:|:--------:|:--------:|:-----------:| | @Input | footerData | Footer | Required | Package other models for CopyRight text and Logo |

SideBar

<hms-sidebar [sideBarData]="sideBarData"></hms-sidebar>

| Decorator | Name | Type | Require | Description | |:--------:|:-------:|:--------:|:--------:|:-----------:| | @Input | sideBarData | SideBar | Required | Package other models for Title, Routes Menu |

Models

Login

//login-languages.model.ts

---LoginLanguages CLASS
-------title?: string;
-------emailLabel?: string;
-------passwordLabel?: string;
-------signInText?: string;
-------signUpText?: string;
-------signUpIntroText?: string;
-------invalidEmailMessageText?: string;
//login-signal.model.ts

---LoginSignal CLASS
-------isValid: string;
-------invalidMessage: string;
//login-user.model.ts

---LoginUser CLASS
-------email: string;
-------password: string;

Header

//header.model.ts

---Header CLASS
-------logo: Logo;
-------title: string;
-------menu: MenuItem[];
-------user: User;
-------userMenuLanguage: UserMenuLanguage;
//logo.model.ts

---Logo CLASS
-------imgUrl: string;
-------alt: string;
-------homePageUrl: string;
//menu-item.model.ts

---MenuItem CLASS
-------displayText: string;
-------url: string;
//user-menu-language.model.ts

---UserMenuLanguage CLASS
-------profile: Logo;
-------changePassword: string;
-------signOut: MenuItem[];
//user.model.ts

---User CLASS
-------firstName: string;
-------lastName: string;
-------email: string;
-------user: string;

Footer

//footer.model.ts

---Footer CLASS
-------copyRightText: string;
-------logo: Logo;

SideBar

//sidebar.model.ts

---SideBar CLASS
-------title: string;
-------menu: string;

Running unit tests

Run ng test hms-core to execute the unit tests via Karma.

Author

  • Shane - Sang Nguyen - Initial work - Github