vueye-table 2.0.0-alpha.12 → 2.0.0-alpha.14
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 +42 -23
- package/dist/components/core/VueyeTable/components/VueyeBody/VueyeBody.vue.d.ts +1 -0
- package/dist/components/core/VueyeTable/components/VueyeBody/api.d.ts +1 -0
- package/dist/components/core/VueyeTable/components/utils/VueyeCheckbox.vue.d.ts +2 -3
- package/dist/components/core/VueyeTable/composables/useBodyRows.d.ts +1 -0
- package/dist/components/core/VueyeTable/utils/body.d.ts +2 -2
- package/dist/vueye-table.js +390 -372
- package/dist/vueye-table.umd.cjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,39 +4,58 @@ Vueye Table is a Vue 3 component for displaying data in a table.
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
+
Vue 3:
|
|
8
|
+
|
|
7
9
|
```bash
|
|
8
10
|
npm install vueye-table
|
|
9
11
|
```
|
|
10
12
|
|
|
13
|
+
Nuxt :
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install nuxt-vueye-table
|
|
17
|
+
```
|
|
18
|
+
|
|
11
19
|
## Usage
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
Vue :
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { VueyeTable } from 'vueye-table'
|
|
26
|
+
|
|
27
|
+
const items = [
|
|
28
|
+
{
|
|
29
|
+
id: 60,
|
|
30
|
+
name: {
|
|
31
|
+
first_name: 'Brahim',
|
|
32
|
+
last_name: 'Boussadjra',
|
|
33
|
+
},
|
|
34
|
+
age: 30,
|
|
35
|
+
address: {
|
|
36
|
+
country: 'Algeria',
|
|
37
|
+
city: 'Algiers',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
//...
|
|
41
|
+
]
|
|
42
|
+
</script>
|
|
43
|
+
|
|
14
44
|
<template>
|
|
15
|
-
<VueyeTable
|
|
16
|
-
:data="data"
|
|
17
|
-
:columnHeaders="columnHeaders"
|
|
18
|
-
:itemValue="itemValue"
|
|
19
|
-
:perPage="perPage"
|
|
20
|
-
:currentPage="currentPage"
|
|
21
|
-
:perPageOptions="perPageOptions"
|
|
22
|
-
:loading="loading"
|
|
23
|
-
:selected="selected"
|
|
24
|
-
:selectMode="selectMode"
|
|
25
|
-
:caption="caption"
|
|
26
|
-
:summary="summary"
|
|
27
|
-
@update:loading="updateLoading"
|
|
28
|
-
@update:selected="updateSelected"
|
|
29
|
-
>
|
|
30
|
-
<template #headerCellContent.name="props">
|
|
31
|
-
{{ props.columnHeader.name }}
|
|
32
|
-
</template>
|
|
33
|
-
<template #itemCellContent.name="props">
|
|
34
|
-
{{ props.item.name }}
|
|
35
|
-
</template>
|
|
36
|
-
</VueyeTable>
|
|
45
|
+
<VueyeTable :data="items" />
|
|
37
46
|
</template>
|
|
38
47
|
```
|
|
39
48
|
|
|
49
|
+
Nuxt :
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
// nuxt.config.js
|
|
53
|
+
export default defineNuxtConfig({
|
|
54
|
+
modules: ['nuxt-vueye-table'],
|
|
55
|
+
// ...
|
|
56
|
+
})
|
|
57
|
+
```
|
|
58
|
+
|
|
40
59
|
### VueyeTableProps
|
|
41
60
|
|
|
42
61
|
| Prop Name | Type | Default Value | Description |
|
|
@@ -9,6 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
loading: boolean;
|
|
10
10
|
selected: Row[] | null;
|
|
11
11
|
bodyRows: Row[];
|
|
12
|
+
notListedKeys: string[];
|
|
12
13
|
columnsLength: number;
|
|
13
14
|
}, {}>, Readonly<import("../../types").SlotRowItem<Record<string, string>> & import("../../types").SlotRowItemContent<Record<string, string>> & {
|
|
14
15
|
body: (props: {
|
|
@@ -3,7 +3,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
id: StringConstructor;
|
|
4
4
|
label: StringConstructor;
|
|
5
5
|
indeterminate: BooleanConstructor;
|
|
6
|
-
modelValue: BooleanConstructor;
|
|
6
|
+
modelValue: (BooleanConstructor | ArrayConstructor)[];
|
|
7
7
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
8
|
"update:modelValue": (...args: any[]) => void;
|
|
9
9
|
change: (...args: any[]) => void;
|
|
@@ -12,12 +12,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
id: StringConstructor;
|
|
13
13
|
label: StringConstructor;
|
|
14
14
|
indeterminate: BooleanConstructor;
|
|
15
|
-
modelValue: BooleanConstructor;
|
|
15
|
+
modelValue: (BooleanConstructor | ArrayConstructor)[];
|
|
16
16
|
}>> & {
|
|
17
17
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
18
18
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
19
19
|
}, {
|
|
20
|
-
modelValue: boolean;
|
|
21
20
|
checked: boolean;
|
|
22
21
|
indeterminate: boolean;
|
|
23
22
|
}, {}>;
|
|
@@ -7,6 +7,7 @@ interface PaginationProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function useBodyRows<TData extends Record<string, unknown>, TColumn extends ColumnHeader<TData>>(props: VueyeTableProps<TData, TColumn>, headers: MaybeRef<ColumnHeader[]>, pagination: MaybeRef<PaginationProps>): {
|
|
9
9
|
bodyRows: globalThis.ComputedRef<FlattenObject<TData>[]>;
|
|
10
|
+
notListedKeys: globalThis.ComputedRef<string[]>;
|
|
10
11
|
rowsCount: globalThis.ComputedRef<number>;
|
|
11
12
|
onSort: ({ key, desc }: {
|
|
12
13
|
key: keyof FlattenObject<TData>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function getBodyRows<TData>(rows: TData[],
|
|
1
|
+
import type { FlattenObject, NativeType } from '../types';
|
|
2
|
+
export declare function getBodyRows<TData>(rows: TData[], headerKeys: string[]): FlattenObject<TData>[];
|
|
3
3
|
export declare function paginateRows<TData>(rows: TData[], start?: number, end?: number): TData[];
|
|
4
4
|
export declare function nestedObjectTransformer(obj: object): Record<string, any>;
|
|
5
5
|
export declare function deepValues(obj: any): any[];
|