# my-table-lib

> This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0.

Latest version **0.0.30** (published 2024-07-04) · 0 weekly downloads

## Install

```sh
npm install my-table-lib
pnpm add my-table-lib
yarn add my-table-lib
bun add my-table-lib
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.30 |
| Published | 2024-07-04 |
| First published | 2022-10-13 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 218 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Balasubramanyam |
| Maintainers | balulvrs |

## Links

- npm: https://www.npmjs.com/package/my-table-lib
- npm.io page: https://npm.io/package/my-table-lib

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Recent versions

- 0.0.30 (latest) — 2024-07-04
- 0.0.29 — 2024-07-04
- 0.0.27 — 2024-07-01
- 0.0.26 — 2024-07-01
- 0.0.25 — 2024-07-01
- 0.0.24 — 2024-07-01
- 0.0.23 — 2024-07-01
- 0.0.21 — 2024-07-01
- 0.0.20 — 2024-07-01
- 0.0.19 — 2024-07-01
- 0.0.18 — 2024-07-01
- 0.0.17 — 2024-07-01
- 0.0.15 — 2024-07-01
- 0.0.14 — 2022-10-28
- 0.0.13 — 2022-10-28
- … 11 more at https://npm.io/package/my-table-lib/versions

## README

# MyTableLib

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0.

## Code scaffolding

Run `ng generate component component-name --project my-table-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-table-lib`.
> Note: Don't forget to add `--project my-table-lib` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build my-table-lib` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build my-table-lib`, go to the dist folder `cd dist/my-table-lib` and run `npm publish`.

## Running unit tests

Run `ng test my-table-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

## Usage

Key Features:
                1. supports sorting enable/disable
                2. Can add custom text, links& buttons in the table columns by passing template
                3. supports static(Front end) & dynamic(Server side) pagination
                4. Renders static(Need to explicitly pass the columns config) & dynamic columns (If we pass the array data keys will be treated as columns)
                4. Table can be displayed with or without borders 

Plz find the attached mock-up.

Installation & Usage:

Installation commands : 
     c:\> npm i my-table-lib
     c:\> npm i my-pager-lib


HTML:
    <lib-my-table-lib *ngIf="showtable" [options]="tableOptions" [data]="tableData"
          [limit]="tableLimit" [offset]="tableOffset" (onSortingChanged)="onTableSort($event)"></lib-my-table-lib>
    
    <lib-my-pager-lib *ngIf="showPager" [size]="'default'"
              [bordered]="false"
              [useIcons]="true"
              [page]="tableOffset"
              [limit]="tableLimit"
              [totalItems]="tableData.length"
              [showPageDetails] = "true"
             (onPageChanged)="onPagerUpdated($event)"></lib-my-pager-lib>

Table options: {
    bordered: false,
    hover: true,
    dynamicData: false,
    columns: [
        {
            name: <column name>,
            sortable: <true/false>,
            template: <Html template with custom text or links or buttons>,
            sortKey: <Name of the columns to sort>,
        }
       
       ]
}

---
_Source: https://npm.io/package/my-table-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
