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

@ionutpuenaru/employee_table

v1.1.13

Published

A reusable and dynamic Employee Table component

Downloads

265

Readme

React version Typescript version CSS version Vite version Vitest Badge NPM version Node version Visual Studio Code ESLint Badge

@ionutpuenaru/employee_table

Employee Table Component

Table of Contents

Description

The EmployeeTable component is a reusable React component designed for displaying employee data in a tabular format. It includes features such as sorting, filtering, pagination, and customizable styling. This component is built with TypeScript and Vite for optimized development and build processes.

Technologies

This project uses a variety of technologies and tools to build and maintain the Employee Table component:

  • React: A JavaScript library for building user interfaces.
  • React DOM: A package that provides DOM-specific methods for React.
  • TypeScript: A strongly typed programming language that builds on JavaScript.
  • Vite: A fast build tool and development server.
  • Vitest: A fast and efficient testing framework for Vite projects.
  • ESLint: A tool for identifying and fixing problems in JavaScript and TypeScript code.
  • Vite Plugin React: A Vite plugin to support React in the development process.
  • Vite Plugin CSS Injected by JS: A plugin for injecting CSS via JavaScript in Vite projects.
  • Vite Plugin DTS: A Vite plugin for generating TypeScript declaration files.
  • @typescript-eslint: A set of tools for linting TypeScript code using ESLint.
  • Node.js: JavaScript runtime built on Chrome's V8 engine, used to manage dependencies and run scripts.

Features

  • Sorting: Clickable table headers to sort data in ascending or descending order.
  • Filtering: Search bar to filter rows based on user input.
  • Pagination: Control the number of rows displayed per page and navigate through pages.
  • Customization: Easily customizable styles through props.

Prerequisites

  • Node.js: Version 16 or later
  • Editor: Recommended editors include Visual Studio Code, WebStorm, or any editor with TypeScript support.

Installation

To use this library in your project, follow these steps:

  1. Install the Package:

    You can install the employee-table package from npm using the following command:

    npm install @ionutpuenaru/employee_table

    Or if you're using Yarn:

    yarn add @ionutpuenaru/employee_table
  2. Setup:

After installation, you can use the EmployeeTable component in your React project.

Example Usage:

import React from 'react';
import { EmployeeTable } from '@ionutpuenaru/employee_table';
import { data } from './path-to-your-data';

const App = () => (
  <div>
    <EmployeeTable 
      data={data}
      tableAppClassName="my-custom-table-app"
      tableClassName="my-custom-table"
      headerClassName="my-custom-header"
      rowClassName="my-custom-row"
      cellClassName="my-custom-cell"
    />
  </div>
);

export default App;

Component Documentation

EmployeeTable

  • Description:

    • Renders a table with employee data, supporting sorting, filtering, and pagination.
  • Props:

    • data (DataRow[]): Array of data rows to be displayed in the table.
    • tableAppClassName (string): Optional class name for the outer container of the table.
    • tableClassName (string): Optional class name for the <table> element.
    • headerClassName (string): Optional class name for the table headers.
    • rowClassName (string): Optional class name for table rows.
    • cellClassName (string): Optional class name for table cells.

DataRow

  • Description: Represents a single row of data in the table.

  • Type:

    export interface DataRow {
      [key: string]: string | number | Date;
    }

Development

To develop and test this component locally:

  1. Clone the Repository:

    git clone https://github.com/PuenaruIonutMarian/EmployeeTable.git
    cd employee_table
  2. Install Dependencies:

    npm install
  3. Run the Development Server:

     npm run dev
  4. Build for Production:

    npm run build
  5. Run Tests:

    npm run test

Authors

Puenaru Ionut Marian

License

This project is licensed under the MIT License.