@modeltables/fontawesome-vuetify 1.0.4 → 1.1.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/components/index.d.ts +1 -1
- package/components/index.js +7 -0
- package/components/models/tablemodels.d.ts +20 -0
- package/components/models/tablemodels.js +26 -0
- package/components/pagination/PaginationView.vue +18 -0
- package/components/table/TableView.vue +10 -10
- package/components/table/data/ItemView.vue +11 -0
- package/dist/index.amd.ts +12 -12
- package/dist/index.esm.ts +17487 -0
- package/package.json +24 -27
- package/tsconfig.json +4 -7
- package/vite.config.js +4 -2
- package/vue.config.js +53 -0
- package/dist/index.cjs.ts +0 -574
- /package/{README.md → components/index.html} +0 -0
- /package/components/models/{table-models.ts → tablemodels.ts} +0 -0
package/components/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @licence MIT */
|
|
2
2
|
|
|
3
3
|
export { default as TableView } from "./table/TableView.vue";
|
|
4
|
-
export { HeaderModel, PaginatonModel, PaginatedResponse } from './models/
|
|
4
|
+
export { HeaderModel, PaginatonModel, PaginatedResponse } from './models/tablemodels';
|
|
5
5
|
|
|
6
6
|
/*!
|
|
7
7
|
* Vuetify Labs v3.4.0 by vuetify - https://vuetifyjs.com
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Minimal build entry for Vue CLI pages
|
|
2
|
+
console.log('components/index.js loaded for build');
|
|
3
|
+
|
|
4
|
+
// If you want to mount a demo app during build, import Vue and mount here.
|
|
5
|
+
// import { createApp } from 'vue';
|
|
6
|
+
// import App from './App.vue';
|
|
7
|
+
// createApp(App).mount('#app');
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class HeaderModel {
|
|
2
|
+
title: string;
|
|
3
|
+
key?: string;
|
|
4
|
+
sort?: any;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export declare class PaginatonModel {
|
|
8
|
+
PageCount: number;
|
|
9
|
+
PerPage: number;
|
|
10
|
+
CurrentPage: number;
|
|
11
|
+
TotalCount: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare class PaginatedResponse<T> {
|
|
15
|
+
PageSize?: number;
|
|
16
|
+
PageCount?: number;
|
|
17
|
+
CurrentPage?: number;
|
|
18
|
+
TotalCount?: number;
|
|
19
|
+
Items: Array<T>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class HeaderModel {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.title = '';
|
|
4
|
+
this.key = undefined;
|
|
5
|
+
this.sort = undefined;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class PaginatonModel {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.PageCount = 1;
|
|
12
|
+
this.PerPage = 10;
|
|
13
|
+
this.CurrentPage = 1;
|
|
14
|
+
this.TotalCount = 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class PaginatedResponse {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.PageSize = undefined;
|
|
21
|
+
this.PageCount = undefined;
|
|
22
|
+
this.CurrentPage = undefined;
|
|
23
|
+
this.TotalCount = undefined;
|
|
24
|
+
this.Items = [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { faArrowAltCircleDown } from '@fortawesome/free-regular-svg-icons';
|
|
3
3
|
import { faChevronLeft, faChevronRight, faFastBackward, faFastForward } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
7
|
+
components: {
|
|
8
|
+
FontAwesomeIcon: FontAwesomeIcon
|
|
9
|
+
},
|
|
6
10
|
props: {
|
|
7
11
|
totalCount: {
|
|
8
12
|
type: Number,
|
|
@@ -34,6 +38,20 @@ export default {
|
|
|
34
38
|
fastForward: faFastForward
|
|
35
39
|
}
|
|
36
40
|
},
|
|
41
|
+
watch: {
|
|
42
|
+
page(newValue: any, oldValue: any) {
|
|
43
|
+
this.page = newValue;
|
|
44
|
+
},
|
|
45
|
+
perPage(newValue: any, oldValue: any) {
|
|
46
|
+
this.perPage = newValue;
|
|
47
|
+
},
|
|
48
|
+
pageCount(newValue: any, oldValue: any) {
|
|
49
|
+
this.pageCount = newValue;
|
|
50
|
+
},
|
|
51
|
+
totalCount(newValue: any, oldValue: any) {
|
|
52
|
+
this.totalCount = newValue;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
37
55
|
methods: {
|
|
38
56
|
pageChange(event: any){
|
|
39
57
|
this.$emit('pageChange', event);
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
|
4
4
|
import { faRefresh, faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
-
import { HeaderModel
|
|
5
|
+
import { HeaderModel } from './../models/tablemodels';
|
|
6
|
+
import { PaginatonModel } from './../models/tablemodels';
|
|
6
7
|
import { change, Id, load, rowClick, search } from '../helpers/resources';
|
|
7
8
|
import Date from '../headerFilters/Date.vue';
|
|
8
9
|
import Search from '../search/SearchView.vue';
|
|
@@ -17,30 +18,28 @@ export default {
|
|
|
17
18
|
props: {
|
|
18
19
|
dataheader: {
|
|
19
20
|
type: Array<HeaderModel>,
|
|
21
|
+
default: () => []
|
|
20
22
|
},
|
|
21
23
|
key: {
|
|
22
24
|
type: String,
|
|
23
|
-
required: true,
|
|
24
25
|
default: () => 'Id'
|
|
25
26
|
},
|
|
26
27
|
name: {
|
|
27
28
|
type: String
|
|
28
29
|
},
|
|
29
30
|
dataItems: {
|
|
30
|
-
type: Array
|
|
31
|
+
type: Array<Object>,
|
|
31
32
|
reactive: true,
|
|
32
|
-
required: true
|
|
33
|
+
required: true,
|
|
34
|
+
default: () => []
|
|
33
35
|
},
|
|
34
36
|
currentItem: {
|
|
35
37
|
type: Object,
|
|
36
|
-
reactive: true,
|
|
37
38
|
required: false
|
|
38
|
-
|
|
39
39
|
},
|
|
40
40
|
currentId: {
|
|
41
41
|
type: Number,
|
|
42
|
-
|
|
43
|
-
required: false
|
|
42
|
+
required: false
|
|
44
43
|
},
|
|
45
44
|
loading: {
|
|
46
45
|
type: Boolean,
|
|
@@ -100,6 +99,7 @@ export default {
|
|
|
100
99
|
}
|
|
101
100
|
},
|
|
102
101
|
pagination(newValue: PaginatonModel, oldValue) {
|
|
102
|
+
console.log(newValue);
|
|
103
103
|
this.page = newValue.CurrentPage;
|
|
104
104
|
this.perPage = newValue.PerPage;
|
|
105
105
|
this.pageCount = newValue.PageCount;
|
|
@@ -232,7 +232,7 @@ export default {
|
|
|
232
232
|
this.search();
|
|
233
233
|
},
|
|
234
234
|
sort(event: any, prop: any, index: number){
|
|
235
|
-
prop.sort = prop.sort
|
|
235
|
+
prop.sort = !prop.sort;
|
|
236
236
|
this.filters.SortColumn = Object.keys(this.dataItems[0])[index];
|
|
237
237
|
this.filters.SortDirection = window.Number(prop.sort);
|
|
238
238
|
console.log(this.filters);
|
|
@@ -289,7 +289,7 @@ export default {
|
|
|
289
289
|
@filterValue="filterValue($event, filters[prop])">
|
|
290
290
|
</Filters>
|
|
291
291
|
</td>
|
|
292
|
-
</tr
|
|
292
|
+
</tr>
|
|
293
293
|
<tr @dblclick="updateItem(item, $event)">
|
|
294
294
|
<td v-for="(prop) in Object.keys(item)">
|
|
295
295
|
<DataItem
|
|
@@ -19,6 +19,17 @@
|
|
|
19
19
|
required: false
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
watch: {
|
|
23
|
+
item(newValue: any, oldValue: any) {
|
|
24
|
+
this.item = newValue;
|
|
25
|
+
},
|
|
26
|
+
index(newValue: any, oldValue: any) {
|
|
27
|
+
this.index = newValue;
|
|
28
|
+
},
|
|
29
|
+
prop(newValue: any, oldValue: any) {
|
|
30
|
+
this.prop = newValue;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
22
33
|
data() {
|
|
23
34
|
return {
|
|
24
35
|
item: this.item,
|