@tripup-company/element-ui-extended 0.0.3 → 0.0.8
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 +150 -0
- package/dist/element-ui-extended.common.js +955 -692
- package/dist/element-ui-extended.common.js.map +1 -1
- package/dist/element-ui-extended.umd.js +955 -692
- package/dist/element-ui-extended.umd.js.map +1 -1
- package/dist/element-ui-extended.umd.min.js +1 -1
- package/dist/element-ui-extended.umd.min.js.map +1 -1
- package/package.json +23 -4
- package/src/App.vue +31 -2
- package/src/components/CompositeTable/index.vue +224 -0
- package/src/components/{GenericTable → GenericFilters}/FilterRow.vue +9 -2
- package/src/components/{GenericTable → GenericFilters}/FilterTopRow.vue +1 -1
- package/src/components/{GenericTable → GenericFilters}/GenericTopFilter.vue +22 -9
- package/src/components/{GenericTable/GenericFilter.vue → GenericFilters/index.vue} +23 -9
- package/src/components/GenericPaginator/index.vue +53 -0
- package/src/components/GenericTable/index.vue +23 -153
- package/src/filters-top.js +8 -0
- package/src/filters.js +64 -0
- package/src/lang/en.js +167 -0
- package/src/lang/index.js +23 -0
- package/src/models/base-model.ts +10 -0
- package/src/models/contact-model.ts +23 -0
- package/src/models/meta-model.ts +13 -0
- package/src/services/list-query-service.ts +39 -0
- package/src/services/local-storage-service.ts +27 -0
- package/src/services/resolutions.js +21 -0
- package/src/test/unit/components/TestComponent.vue +15 -0
- package/src/types/article.js +6 -0
- package/src/types/article.js.map +1 -0
- package/src/types/axiosInterface.ts +54 -0
- package/src/types/collection.ts +6 -0
- package/src/types/error.ts +3 -0
- package/src/types/icontact.ts +17 -0
- package/src/types/meta.ts +7 -0
- package/src/types/pagination.ts +8 -0
- package/src/components/GenericTable/GenericPaginator.vue +0 -37
- package/src/components/GenericTable/GenericRows.vue +0 -27
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Icontact {
|
|
2
|
+
id?: number;
|
|
3
|
+
title?: string;
|
|
4
|
+
first_name?: string;
|
|
5
|
+
last_name?: string;
|
|
6
|
+
email: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
mobile?: string;
|
|
9
|
+
position?: string;
|
|
10
|
+
comments_guid?: string;
|
|
11
|
+
city: string;
|
|
12
|
+
state?: string;
|
|
13
|
+
zip_code: string;
|
|
14
|
+
street?: string;
|
|
15
|
+
country?: string;
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="m-t-15">
|
|
3
|
-
<el-pagination
|
|
4
|
-
:current-page="currentPage"
|
|
5
|
-
:total="total"
|
|
6
|
-
:layout="'total, sizes, prev, pager, next, jumper'"
|
|
7
|
-
@size-change="actions.handleSizeChange"
|
|
8
|
-
@current-change="actions.handleCurrentChange"
|
|
9
|
-
/>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
name: 'GenericPaginator',
|
|
17
|
-
inject: ['data', 'actions'],
|
|
18
|
-
computed: {
|
|
19
|
-
currentPage(){
|
|
20
|
-
if (this.data.meta?.pagination){
|
|
21
|
-
return this.data.meta.pagination.current_page;
|
|
22
|
-
}
|
|
23
|
-
return 0;
|
|
24
|
-
},
|
|
25
|
-
total(){
|
|
26
|
-
if (this.data.meta?.pagination){
|
|
27
|
-
return this.data.meta.pagination.total;
|
|
28
|
-
}
|
|
29
|
-
return 0;
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<style scoped>
|
|
36
|
-
|
|
37
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<slot :items="data.items" :fields="data.fields">
|
|
4
|
-
<el-table :data="data.items" border>
|
|
5
|
-
<template v-for="field in data.fields">
|
|
6
|
-
<template v-if="field.callback">
|
|
7
|
-
<el-table-column :key="field.prop" v-slot="context" :prop="field.prop" :label="field.label" :width="field.width ? field.width : null">
|
|
8
|
-
<el-link @click="field.callback(field.prop, context.$index, context.row)">
|
|
9
|
-
{{ typeof field.formatter === 'function' ? field.formatter(context.row) : context.row[field.prop] }}
|
|
10
|
-
</el-link>
|
|
11
|
-
</el-table-column>
|
|
12
|
-
</template>
|
|
13
|
-
<template v-else>
|
|
14
|
-
<el-table-column :formatter="typeof field.formatter === 'function' ? field.formatter : null" :key="field.prop" :prop="field.prop" :label="field.label" :width="field.width ? field.width : null" />
|
|
15
|
-
</template>
|
|
16
|
-
</template>
|
|
17
|
-
</el-table>
|
|
18
|
-
</slot>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
export default {
|
|
24
|
-
name: 'GenericRows',
|
|
25
|
-
inject: ['data'],
|
|
26
|
-
};
|
|
27
|
-
</script>
|