# odata-table

> Simplifies quering OData V4 APIs using material-dynamic-table.

Latest version **1.0.0-alpha.203** (published 2020-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install odata-table
pnpm add odata-table
yarn add odata-table
bun add odata-table
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-alpha.203 |
| Published | 2020-09-05 |
| First published | 2020-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 236.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | idemery |
| Keywords | Angular, odata, mat, material, table |

## Links

- npm: https://www.npmjs.com/package/odata-table
- Repository: https://github.com/idemery/mat-odata-table
- Issues: https://github.com/idemery/mat-odata-table/issues
- npm.io page: https://npm.io/package/odata-table

## Dependencies (1)

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

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.0-alpha.203 (latest) — 2020-09-05
- 1.0.0-alpha.202 — 2020-09-05
- 1.0.0-alpha.201 — 2020-09-05
- 1.0.0-alpha.2 — 2020-09-05
- 1.0.0-alpha.1 — 2020-09-05

## README

# odata-table
odata-table simplifies quering OData V4 APIs using [odata-query](https://github.com/techniq/odata-query), [odata-data-source](https://github.com/relair/odata-data-source), and [material-dynamic-table](https://github.com/relair/material-dynamic-table).

_Currently under development._

## Installation

To install dependencies mentioned above, run the following:
```
npm i odata-query material-dynamic-table @angular/material @angular/cdk  
```

To install odata-table run:
```
npm i odata-table
```

## Getting started
In your module include the following imports:
```javascript
import { CellService } from 'material-dynamic-table';
import { OdataTableModule, OdataTextCellComponent, OdataDateCellComponent } from 'odata-table';
```
add **OdataTableModule** to the imports:
```javascript
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    OdataTableModule
  ],
```
register string, and date cells in the constructor:
```javascript
export class AppModule { 
  constructor(private readonly cellService: CellService) {
    cellService.registerCell('string', OdataTextCellComponent);
    cellService.registerCell('date', OdataDateCellComponent);
  }
}
```


## Usage

```html
<mat-odata-table url="https://services.odata.org/V4/OData/OData.svc/Products">
  <mat-odata-field name="Name" displayName="Name" type="string"></mat-odata-field>
  <mat-odata-field name="Description" displayName="Description" type="string"></mat-odata-field>
  <mat-odata-field name="ReleaseDate" displayName="Release Date" type="date">
    <mat-odata-field-option name="format" value="long"></mat-odata-field-option>    
  </mat-odata-field>
  <mat-odata-field name="ProductDetail.Details" displayName="Details" type="string"></mat-odata-field>
  <mat-odata-field name="Supplier.Name" displayName="Supplier" type="string"></mat-odata-field>
</mat-odata-table>
```

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