@modeltables/fontawesome-vuetify 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/components/headerFilters/Filters.vue +1 -1
- package/components/models/tablemodels.d.ts +2 -0
- package/components/models/tablemodels.js +2 -0
- package/components/models/tablemodels.ts +2 -0
- package/components/sort/SortView.vue +3 -0
- package/components/table/data/ItemView.vue +7 -1
- package/dist/index.amd.ts +3 -3
- package/dist/index.esm.ts +902 -896
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@modeltables/fontawesome-vuetify — focused Vue table toolkit
|
|
2
|
+
|
|
3
|
+
@modeltables/fontawesome-vuetify is a small, practical Vue library that makes building polished data tables quick and painless. It provides ready-to-use components and TypeScript helpers you can drop into Vuetify or plain Vue apps to add filtering, sorting, searching and pagination with minimal setup.
|
|
4
|
+
|
|
5
|
+
Why use @modeltables/fontawesome-vuetify?
|
|
6
|
+
|
|
7
|
+
- Easy to use: helpful wrappers for headers, filters and table views so your grids look intentional from the start.
|
|
8
|
+
- Reactive by design: components update predictably with Vue reactivity as your data or form state changes.
|
|
9
|
+
- Lightweight: small surface area and minimal runtime overhead so your bundle stays lean.
|
|
10
|
+
- Customizable: swap icons, change sizes, or theme with your existing Vuetify setup without touching core logic.
|
|
11
|
+
- Accessibility-minded: uses clear affordances and aria-friendly patterns to improve form and table clarity.
|
|
12
|
+
|
|
13
|
+
Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add @modeltables/fontawesome-vuetify
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Quick start
|
|
20
|
+
|
|
21
|
+
Import the components or helpers you need and register them in your app. Example (single-file component):
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import TableView from '@tablemodels/table/TableView.vue'
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div>
|
|
30
|
+
<SearchView />
|
|
31
|
+
<TableView />
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Core models
|
|
37
|
+
|
|
38
|
+
The package includes a small TypeScript models module (see `components/models/tablemodels.ts`) that the components use and that you can reuse in your services:
|
|
39
|
+
|
|
40
|
+
- HeaderModel — column metadata (title, key, sort).
|
|
41
|
+
- PaginatonModel — pagination state (PageCount, PerPage, CurrentPage, TotalCount).
|
|
42
|
+
- PaginatedResponse<T> — generic paged response with `Items: T[]`.
|
|
43
|
+
- Options — a simple option shape (`Key`, `ShowKey`, `Name`, `Active`).
|
|
44
|
+
|
|
45
|
+
Example TypeScript snippet
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { PaginatedResponse, HeaderModel } from 'tablemodels'
|
|
49
|
+
|
|
50
|
+
type Item = { id: number; name: string }
|
|
51
|
+
|
|
52
|
+
const page: PaginatedResponse<Item> = {
|
|
53
|
+
PageSize: 10,
|
|
54
|
+
PageCount: 3,
|
|
55
|
+
CurrentPage: 1,
|
|
56
|
+
TotalCount: 25,
|
|
57
|
+
Items: []
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const col = new HeaderModel()
|
|
61
|
+
col.title = 'Name'
|
|
62
|
+
col.key = 'name'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Contributing
|
|
66
|
+
|
|
67
|
+
PRs and issues welcome — open an issue to discuss larger changes first. Keep changes focused and lightweight.
|
|
68
|
+
|
|
69
|
+
License
|
|
70
|
+
|
|
71
|
+
ISC
|
|
72
|
+
|
|
73
|
+
|
|
@@ -48,7 +48,13 @@
|
|
|
48
48
|
</script>
|
|
49
49
|
<template>
|
|
50
50
|
<span v-if="prop == options.Key!">
|
|
51
|
-
|
|
51
|
+
<template v-if="options.ShowKey">
|
|
52
|
+
{{ item[prop] }}
|
|
53
|
+
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else>
|
|
56
|
+
{{ index + 1 }}
|
|
57
|
+
</template>
|
|
52
58
|
</span>
|
|
53
59
|
<span v-else-if="isDateTime(item[prop])">
|
|
54
60
|
{{ toDate(item[prop]) }}
|