@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.
Files changed (37) hide show
  1. package/README.md +150 -0
  2. package/dist/element-ui-extended.common.js +955 -692
  3. package/dist/element-ui-extended.common.js.map +1 -1
  4. package/dist/element-ui-extended.umd.js +955 -692
  5. package/dist/element-ui-extended.umd.js.map +1 -1
  6. package/dist/element-ui-extended.umd.min.js +1 -1
  7. package/dist/element-ui-extended.umd.min.js.map +1 -1
  8. package/package.json +23 -4
  9. package/src/App.vue +31 -2
  10. package/src/components/CompositeTable/index.vue +224 -0
  11. package/src/components/{GenericTable → GenericFilters}/FilterRow.vue +9 -2
  12. package/src/components/{GenericTable → GenericFilters}/FilterTopRow.vue +1 -1
  13. package/src/components/{GenericTable → GenericFilters}/GenericTopFilter.vue +22 -9
  14. package/src/components/{GenericTable/GenericFilter.vue → GenericFilters/index.vue} +23 -9
  15. package/src/components/GenericPaginator/index.vue +53 -0
  16. package/src/components/GenericTable/index.vue +23 -153
  17. package/src/filters-top.js +8 -0
  18. package/src/filters.js +64 -0
  19. package/src/lang/en.js +167 -0
  20. package/src/lang/index.js +23 -0
  21. package/src/models/base-model.ts +10 -0
  22. package/src/models/contact-model.ts +23 -0
  23. package/src/models/meta-model.ts +13 -0
  24. package/src/services/list-query-service.ts +39 -0
  25. package/src/services/local-storage-service.ts +27 -0
  26. package/src/services/resolutions.js +21 -0
  27. package/src/test/unit/components/TestComponent.vue +15 -0
  28. package/src/types/article.js +6 -0
  29. package/src/types/article.js.map +1 -0
  30. package/src/types/axiosInterface.ts +54 -0
  31. package/src/types/collection.ts +6 -0
  32. package/src/types/error.ts +3 -0
  33. package/src/types/icontact.ts +17 -0
  34. package/src/types/meta.ts +7 -0
  35. package/src/types/pagination.ts +8 -0
  36. package/src/components/GenericTable/GenericPaginator.vue +0 -37
  37. package/src/components/GenericTable/GenericRows.vue +0 -27
@@ -0,0 +1,6 @@
1
+ import {Meta} from "./meta";
2
+
3
+ export interface Collection<T>{
4
+ data: T[];
5
+ meta: Meta
6
+ }
@@ -0,0 +1,3 @@
1
+ interface IError {
2
+ message: string
3
+ }
@@ -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
+ }
@@ -0,0 +1,7 @@
1
+ import { Pagination } from "./pagination";
2
+
3
+ export interface Meta {
4
+ include: [];
5
+ custom: [];
6
+ pagination: Pagination;
7
+ }
@@ -0,0 +1,8 @@
1
+ export interface Pagination {
2
+ total: number,
3
+ count: number,
4
+ per_page: number,
5
+ current_page: number,
6
+ total_pages: number,
7
+ links: []
8
+ }
@@ -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>