# @schemater/components

> @schemater/components consists of components that use `@scehmater/core` and `bootstrap` to create components.

Latest version **2.1.0** (published 2024-01-18) · 0 weekly downloads

## Install

```sh
npm install @schemater/components
pnpm add @schemater/components
yarn add @schemater/components
bun add @schemater/components
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2024-01-18 |
| First published | 2018-06-29 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 116.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | piernik |

## Links

- npm: https://www.npmjs.com/package/@schemater/components
- npm.io page: https://npm.io/package/@schemater/components

## Dependencies (1)

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

## Recent versions

- 2.1.0 (latest) — 2024-01-18
- 2.0.0 — 2022-12-08
- 1.0.1 — 2021-10-07
- 1.0.0 — 2021-09-10
- 0.9.1 — 2020-03-25
- 0.9.0 — 2020-03-24
- 0.6.0 — 2019-10-02
- 0.5.0 — 2019-09-20
- 0.1.4 — 2019-05-23
- 0.1.3 — 2019-04-10
- 0.1.2 — 2019-01-25
- 0.1.1 — 2019-01-25
- 0.1.0 — 2018-12-03
- 0.0.5 — 2018-09-11
- 0.0.4 — 2018-08-08
- … 3 more at https://npm.io/package/@schemater/components/versions

## README

@schemater/components consists of components that use `@scehmater/core` and `bootstrap` to create components.

# Table

This component is used to present data table. It's build using `@angular/cdk` and `@fortawesome/angular-fontawesome`

## Usage

1. Import `@schemater/core` and `@schemater/bootstrap` and define all fields.
1. Import `SchematerComponentsModule`
1. Put `<schemater-table></schemater-table>` into template

## Parameters

### Inputs

`fields: SchematerFieldConfig[]` definitions of available fields. **required**

`data:any[]`
data in array to render in SchematerTable. Keys in data row should be the same as `field.id` in `fields`

`displayFields:string[]` Array of `field.id` to display in table

`sorting:SchematerTableSorting` Display indicator of which `field.id` is sorted and in which directions.
*Example*: `{fieldId: 'ASC'}`

`firstStickyColumnCellTemplate:any` Reference to template which will be rendered in cell of first column.
*Example*: `<ng-template #firstColumnCell let-row let-index="index">{{ index }} has data {{ row |json}} </ng-template>`

`firstStickyColumnHeaderTemplate:any` Reference to template which will be rendered in header of first column.
*Example*: `<ng-template #firstColumnHeader>Header</ng-template>`

`lastStickyColumnCellTemplate:any` Reference to template which will be rendered in cell of last column.
*Example*: `<ng-template #lastColumnCell let-row let-index="index">{{index}} has data {{row|json}} </ng-template>`

`lastStickyColumnHeaderTemplate:any` Reference to template which will be rendered in header of last column.

*Example*: `<ng-template #lastColumnHeader>Header</ng-template>`

`options:SchematerTableOptions` table options:

- `showSelection: boolean` - show selection column. *Default*: `false`
- `showSorting: boolean` - show column sorting. *Default*: `false`
- `maxColumnWidth: "auto" | boolean` - max width od column. *Default*: `"auto"`
- `minColumnWidth: "auto" | boolean` - min width od column. *Default*: `"auto"`

### Outputs

`sortingChange: SchematerTableSorting` event triggered when sorting changes

`selectionChange: SchematerFieldConfig[]` event triggered when selection changes



# Item list

This component is used to present list of fields as details.

## Usage

1. Import `@schemater/core` and `@schemater/bootstrap` and define all fields.
1. Import `SchematerComponentsModule`
1. Put `<schemater-item-list></schemater-item-list>` into template

## Parameters

### Inputs

`fields: SchematerFieldConfig[]` definitions of available fields. **required**

`values:any`
data of fields to render in SchematerItemList. Keys in data should be the same as `field.id` in `fields`

`displayFields:string[]` Array of `field.id` to display in list

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