@squirkle-ui/datagrid 0.1.0 → 0.1.1
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 +27 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
# @squirkle-ui/datagrid
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Data grid: sort, filter, group, aggregate, pivot, tree data, master/detail, pinning, editing with undo, range selection, clipboard, CSV, virtual scroll, server-side model for [Squirkle UI](https://www.npmjs.com/package/squirkle-ui). Works with Vue 3 and Vue 2.7.
|
|
4
4
|
|
|
5
|
+
## Install
|
|
5
6
|
```bash
|
|
6
7
|
npm i @squirkle-ui/datagrid @squirkle-ui/ui
|
|
7
8
|
```
|
|
9
|
+
Or get every component and add-on with [`squirkle-ui`](https://www.npmjs.com/package/squirkle-ui) and import from `squirkle-ui/datagrid`.
|
|
10
|
+
|
|
11
|
+
Peer dependencies: `vue`, `@squirkle-ui/ui`. Set up `@squirkle-ui/ui` first (`app.use(createSquirkle())` and `@squirkle-ui/ui/styles.css`).
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
8
14
|
```ts
|
|
9
15
|
import { SqDataGrid } from '@squirkle-ui/datagrid' // Vue 3
|
|
10
16
|
// import { SqDataGrid } from '@squirkle-ui/datagrid/vue2' // Vue 2.7
|
|
11
17
|
import '@squirkle-ui/datagrid/styles.css'
|
|
12
18
|
```
|
|
13
|
-
|
|
19
|
+
```vue
|
|
20
|
+
<template>
|
|
21
|
+
<SqDataGrid :rows="rows" :columns="columns" :height="480" />
|
|
22
|
+
</template>
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { SqDataGrid } from '@squirkle-ui/datagrid'
|
|
25
|
+
const rows = [{ name: 'Ada', department: 'R&D', salary: 120000 }]
|
|
26
|
+
const columns = [
|
|
27
|
+
{ field: 'name', sortable: true },
|
|
28
|
+
{ field: 'department', filter: 'set' },
|
|
29
|
+
{ field: 'salary', type: 'number', aggFunc: 'sum' },
|
|
30
|
+
]
|
|
31
|
+
</script>
|
|
32
|
+
```
|
|
33
|
+
Key props: `rows`, `columns`, `defaultColDef`, `rowId`, `height`, `rowHeight`, `headerHeight`. Slots: `cell`, `cell-<colId>`, `header-<colId>`, `detail`, `group`, `toolbar`, `loading`, `no-rows`.
|
|
34
|
+
|
|
35
|
+
Features: sorting and multi-sort, filters (text, number, set), row grouping with a drag-to-group panel, aggregation, totals and pinned rows, tree data, pivot mode, master/detail, pinned columns, header groups, resize and reorder, row and range selection, clipboard, cell editing with undo, CSV export, virtual scrolling, and a server-side datasource.
|
|
36
|
+
|
|
14
37
|
|
|
15
|
-
|
|
38
|
+
## License
|
|
39
|
+
MIT © KheangLov · [Source and issues](https://github.com/KheangLov/squirkle-ui)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squirkle-ui/datagrid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Enterprise-grade virtualized data grid for Squirkle UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"vue": "^2.7.0 || ^3.3.0",
|
|
50
|
-
"@squirkle-ui/ui": "^0.1.
|
|
50
|
+
"@squirkle-ui/ui": "^0.1.1"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@squirkle-ui/core": "^0.1.
|
|
53
|
+
"@squirkle-ui/core": "^0.1.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@squirkle-ui/ui": "^0.1.
|
|
56
|
+
"@squirkle-ui/ui": "^0.1.1"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|