easycomponentstools 1.0.0-dev.9 → 1.0.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/.idea/vcs.xml +6 -0
- package/package.json +2 -3
- package/src/components/Form/types/map/CustomMapAutoComplete.vue +1 -1
- package/src/components/Table/EasyTable.vue +12 -6
- package/src/components/Table/Headers/DialogColumns.vue +1 -1
- package/src/components/Table/Headers/ExportData.vue +5 -5
- package/src/components/Table/Headers/Filters.vue +4 -4
- package/src/components/Table/Headers/Headers.vue +25 -14
- package/src/composables/useDataTableExport.ts +1 -1
- package/src/scss/app.scss +13 -0
- package/dist/easyComponents.es.js +0 -35624
- package/dist/easyComponents.umd.js +0 -27
- package/dist/easycomponents.css +0 -2
- package/dist/src/components/Form/EasyForm.vue.d.ts +0 -24
- package/dist/src/components/Form/MenuActions.vue.d.ts +0 -7
- package/dist/src/components/Form/types/DatePicker.vue.d.ts +0 -16
- package/dist/src/components/Form/types/FileInput.vue.d.ts +0 -16
- package/dist/src/components/Form/types/Gallery.vue.d.ts +0 -7
- package/dist/src/components/Form/types/Input.vue.d.ts +0 -12
- package/dist/src/components/Form/types/MapAutoComplete.vue.d.ts +0 -20
- package/dist/src/components/Form/types/Number.vue.d.ts +0 -12
- package/dist/src/components/Form/types/Password.vue.d.ts +0 -12
- package/dist/src/components/Form/types/RangeDatePicker.vue.d.ts +0 -16
- package/dist/src/components/Form/types/Selects.vue.d.ts +0 -16
- package/dist/src/components/Form/types/SelectsAutoComplete.vue.d.ts +0 -16
- package/dist/src/components/Form/types/Switch.vue.d.ts +0 -16
- package/dist/src/components/Form/types/Tags.vue.d.ts +0 -16
- package/dist/src/components/Form/types/TextArea.vue.d.ts +0 -12
- package/dist/src/components/Form/types/map/CustomMapAutoComplete.vue.d.ts +0 -7
- package/dist/src/composables/useHelpers.d.ts +0 -9
- package/dist/src/composables/useMap.d.ts +0 -41
- package/dist/src/lang/el/form.d.ts +0 -5
- package/dist/src/lang/el/index.d.ts +0 -7
- package/dist/src/lang/en/form.d.ts +0 -5
- package/dist/src/lang/en/index.d.ts +0 -7
- package/dist/src/main.d.ts +0 -6
- package/dist/src/stores/useInfo.d.ts +0 -7
- package/dist/src/types/form.d.ts +0 -48
- package/dist/src/types/gallery.d.ts +0 -4
- package/dist/src/types/map.d.ts +0 -32
- package/dist/src/types/plugins.d.ts +0 -14
- package/dist/src/types/table.d.ts +0 -79
package/.idea/vcs.xml
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easycomponentstools",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Easy Vue Components",
|
|
7
7
|
"keywords": [
|
|
@@ -50,10 +50,9 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@mdi/font": "^7.4.47",
|
|
53
|
-
"@tmcw/togeojson": "^7.1.2",
|
|
54
53
|
"@types/google.maps": "^3.65.0",
|
|
55
54
|
"json-as-xlsx": "^2.5.6",
|
|
56
|
-
"lucide-static": "^0.
|
|
55
|
+
"lucide-static": "^0.577.0",
|
|
57
56
|
"moment-timezone": "^0.6.2",
|
|
58
57
|
"pdfmake": "^0.3.6",
|
|
59
58
|
"print-js": "^1.6.0",
|
|
@@ -150,8 +150,10 @@ const deletion = (id: string | number) => {
|
|
|
150
150
|
})
|
|
151
151
|
.then(async (response) => {
|
|
152
152
|
if (!response.ok) {
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
throw {
|
|
154
|
+
statusCode: response.status,
|
|
155
|
+
data: await response.json(),
|
|
156
|
+
}
|
|
155
157
|
}
|
|
156
158
|
return response.json()
|
|
157
159
|
})
|
|
@@ -173,8 +175,10 @@ const multipleDelete = () => {
|
|
|
173
175
|
})
|
|
174
176
|
.then(async (response) => {
|
|
175
177
|
if (!response.ok) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
throw {
|
|
179
|
+
statusCode: response.status,
|
|
180
|
+
data: await response.json(),
|
|
181
|
+
}
|
|
178
182
|
}
|
|
179
183
|
return response.json()
|
|
180
184
|
})
|
|
@@ -201,8 +205,10 @@ const getData = async () => {
|
|
|
201
205
|
fetch(`${props.api.get}?${params}`, { method: 'GET' })
|
|
202
206
|
.then(async (response) => {
|
|
203
207
|
if (!response.ok) {
|
|
204
|
-
|
|
205
|
-
|
|
208
|
+
throw {
|
|
209
|
+
statusCode: response.status,
|
|
210
|
+
data: await response.json(),
|
|
211
|
+
}
|
|
206
212
|
}
|
|
207
213
|
return response.json()
|
|
208
214
|
})
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
style="margin-left: -14px"
|
|
8
8
|
class="text-md-body-large"
|
|
9
9
|
>
|
|
10
|
-
<i class="icon-columns-3 mr-1" /> {{ $i18n.t('
|
|
10
|
+
<i class="icon icon-columns-3 mr-1" /> {{ $i18n.t('table.columns') }}
|
|
11
11
|
</v-btn>
|
|
12
12
|
</template>
|
|
13
13
|
<v-card class="list_draggable" @mousemove="onDragMove">
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-list-item :disabled="disabledComputed" @click="$useDataTableExport.exportData('pdf')">
|
|
4
|
-
<i class="icon-file-sliders" /> PDF
|
|
4
|
+
<i class="icon icon-file-sliders" /> PDF
|
|
5
5
|
</v-list-item>
|
|
6
6
|
<v-list-item :disabled="disabledComputed" @click="$useDataTableExport.exportData('csv')">
|
|
7
|
-
<i class="icon-file-sliders" /> CSV
|
|
7
|
+
<i class="icon icon-file-sliders" /> CSV
|
|
8
8
|
</v-list-item>
|
|
9
9
|
<v-list-item :disabled="disabledComputed" @click="$useDataTableExport.exportData('xlsx')">
|
|
10
|
-
<i class="icon-file-sliders" /> EXCEL
|
|
10
|
+
<i class="icon icon-file-sliders" /> EXCEL
|
|
11
11
|
</v-list-item>
|
|
12
12
|
<v-list-item :disabled="disabledComputed" @click="$useDataTableExport.exportData('word')">
|
|
13
|
-
<i class="icon-file-sliders" /> WORD
|
|
13
|
+
<i class="icon icon-file-sliders" /> WORD
|
|
14
14
|
</v-list-item>
|
|
15
15
|
<v-list-item :disabled="disabledComputed" @click="$useDataTableExport.exportData('print')">
|
|
16
|
-
<i class="icon-file-sliders" /> {{ $i18n.t('table.print') }}
|
|
16
|
+
<i class="icon icon-file-sliders" /> {{ $i18n.t('table.print') }}
|
|
17
17
|
</v-list-item>
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
class="mr-2"
|
|
8
8
|
@click="clear"
|
|
9
9
|
>
|
|
10
|
-
<i class="icon-funnel-x"></i>
|
|
10
|
+
<i class="icon icon-funnel-x"></i>
|
|
11
11
|
</v-btn>
|
|
12
12
|
<v-btn
|
|
13
13
|
v-bind="props"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:width="active_filters.length === 0 ? '100%' : '50%'"
|
|
16
16
|
@click="dialog = true"
|
|
17
17
|
>
|
|
18
|
-
<i class="icon-funnel mr-1"></i> {{ $i18n.t('table.filters') }}
|
|
18
|
+
<i class="icon icon-funnel mr-1"></i> {{ $i18n.t('table.filters') }}
|
|
19
19
|
</v-btn>
|
|
20
20
|
<v-dialog v-model="dialog" width="600">
|
|
21
21
|
<v-card>
|
|
@@ -104,12 +104,12 @@
|
|
|
104
104
|
<v-row>
|
|
105
105
|
<v-col class="d-flex justify-start">
|
|
106
106
|
<v-btn color="error" variant="flat" @click="dialog = false">
|
|
107
|
-
{{ $i18n.t('
|
|
107
|
+
{{ $i18n.t('table.cancel') }}
|
|
108
108
|
</v-btn>
|
|
109
109
|
</v-col>
|
|
110
110
|
<v-col class="d-flex justify-end">
|
|
111
111
|
<v-btn color="success" variant="flat" @click="submit">
|
|
112
|
-
{{ $i18n.t('
|
|
112
|
+
{{ $i18n.t('table.submit') }}
|
|
113
113
|
</v-btn>
|
|
114
114
|
</v-col>
|
|
115
115
|
</v-row>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</v-col>
|
|
19
19
|
<v-col cols="12" md="12" lg="2" sm="12" class="d-flex justify-end">
|
|
20
20
|
<v-btn v-if="create" color="primary" width="100%" @click="create">
|
|
21
|
-
<i class="icon-plus" /> {{ $i18n.t('table.create') }}
|
|
21
|
+
<i class="icon icon-plus" /> {{ $i18n.t('table.create') }}
|
|
22
22
|
</v-btn>
|
|
23
23
|
</v-col>
|
|
24
24
|
<v-col cols="12" md="12" lg="2" sm="12" class="d-flex justify-end">
|
|
@@ -42,17 +42,20 @@
|
|
|
42
42
|
<slot name="moreActions"></slot>
|
|
43
43
|
<ExportData
|
|
44
44
|
v-if="showExportData"
|
|
45
|
-
ref="
|
|
45
|
+
ref="exportDataRef"
|
|
46
46
|
@loading="(v: boolean) => emit('loading', v)"
|
|
47
47
|
></ExportData>
|
|
48
48
|
</v-list>
|
|
49
49
|
</v-menu>
|
|
50
50
|
</v-col>
|
|
51
51
|
</v-row>
|
|
52
|
-
<v-row
|
|
52
|
+
<v-row
|
|
53
|
+
v-if="multipleDeletion && selected.length !== 0"
|
|
54
|
+
class="mb-2 d-flex justify-end multipleDeletion"
|
|
55
|
+
>
|
|
53
56
|
<v-col cols="12" md="12" lg="2" sm="12">
|
|
54
57
|
<v-btn color="error" width="100%" @click="multipleDelete">
|
|
55
|
-
<i class="icon-trash" /> {{ $i18n.t('table.delete') }}
|
|
58
|
+
<i class="icon icon-trash" /> {{ $i18n.t('table.delete') }}
|
|
56
59
|
</v-btn>
|
|
57
60
|
</v-col>
|
|
58
61
|
</v-row>
|
|
@@ -61,10 +64,11 @@
|
|
|
61
64
|
<script setup lang="ts">
|
|
62
65
|
import { AdvancedFiltersDTO, HardFiltersDTO, HeaderDTO, SortDTO } from '../../../types/table'
|
|
63
66
|
import { useI18n } from 'vue-i18n'
|
|
64
|
-
import { onMounted, ref, Ref } from 'vue'
|
|
67
|
+
import { nextTick, onMounted, ref, Ref } from 'vue'
|
|
65
68
|
import useHeadersStorage from '../../../composables/useHeadersStorage'
|
|
66
69
|
import Filters from './Filters.vue'
|
|
67
70
|
import DialogColumns from './DialogColumns.vue'
|
|
71
|
+
import ExportData from './ExportData.vue'
|
|
68
72
|
|
|
69
73
|
type propsType = {
|
|
70
74
|
id: string
|
|
@@ -83,7 +87,7 @@ const $i18n = useI18n()
|
|
|
83
87
|
const $useHeadersStorage = useHeadersStorage()
|
|
84
88
|
const emit = defineEmits(['loading', 'headers', 'search', 'hardFilters', 'multipleDelete'])
|
|
85
89
|
const active_hard_filters: Ref<any[]> = ref([])
|
|
86
|
-
const
|
|
90
|
+
const exportDataRef: any = ref(null)
|
|
87
91
|
|
|
88
92
|
const updateHardFilters = (hard_filters_keys: any) => {
|
|
89
93
|
const hard_filters: HardFiltersDTO[] = []
|
|
@@ -97,27 +101,27 @@ const updateHardFilters = (hard_filters_keys: any) => {
|
|
|
97
101
|
})
|
|
98
102
|
}
|
|
99
103
|
})
|
|
100
|
-
|
|
104
|
+
exportDataRef.value?.setHardFilters(hard_filters)
|
|
101
105
|
emit('hardFilters', hard_filters)
|
|
102
106
|
}
|
|
103
107
|
const multipleDelete = () => {
|
|
104
108
|
emit('multipleDelete', true)
|
|
105
109
|
}
|
|
106
110
|
const search = (filters: AdvancedFiltersDTO[]) => {
|
|
107
|
-
|
|
111
|
+
exportDataRef.value?.setFilters(filters)
|
|
108
112
|
emit('search', filters)
|
|
109
113
|
}
|
|
110
114
|
const submitHeaders = (headers: HeaderDTO[]) => {
|
|
111
115
|
$useHeadersStorage.submitHeaders(headers, props.id)
|
|
112
116
|
const displayHeaders = headers.filter((v) => !v.hidden)
|
|
113
117
|
emit('headers', displayHeaders)
|
|
114
|
-
|
|
118
|
+
exportDataRef.value?.setHeaders(displayHeaders)
|
|
115
119
|
}
|
|
116
120
|
const updateExportSortData = (sort: SortDTO) => {
|
|
117
|
-
|
|
121
|
+
exportDataRef.value?.setSort(sort)
|
|
118
122
|
}
|
|
119
123
|
const updateExportDataTotal = (total: number) => {
|
|
120
|
-
|
|
124
|
+
exportDataRef.value?.setTotal(total)
|
|
121
125
|
}
|
|
122
126
|
const updateExportData = (
|
|
123
127
|
api: string,
|
|
@@ -128,9 +132,16 @@ const updateExportData = (
|
|
|
128
132
|
hard_filters: HardFiltersDTO[]
|
|
129
133
|
) => {
|
|
130
134
|
const displayHeaders = headers.filter((header: HeaderDTO) => !header.hidden)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
nextTick(() => {
|
|
136
|
+
exportDataRef.value?.setExportDataInfo(
|
|
137
|
+
api,
|
|
138
|
+
displayHeaders,
|
|
139
|
+
total,
|
|
140
|
+
sort,
|
|
141
|
+
filters,
|
|
142
|
+
hard_filters
|
|
143
|
+
)
|
|
144
|
+
})
|
|
134
145
|
}
|
|
135
146
|
|
|
136
147
|
onMounted(() => {
|
|
@@ -46,7 +46,7 @@ export default function useDataTableExport() {
|
|
|
46
46
|
if (!response.ok) {
|
|
47
47
|
throw new Error(`Error: ${response.status}`)
|
|
48
48
|
}
|
|
49
|
-
const data = response.json()
|
|
49
|
+
const data = await response.json()
|
|
50
50
|
allPrintableItems.value = 'data' in data ? data.data : data
|
|
51
51
|
} catch (e) {
|
|
52
52
|
console.error('Failed Export Error', e)
|
package/src/scss/app.scss
CHANGED
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
.maintable{
|
|
13
|
+
.multipleDeletion{
|
|
14
|
+
margin-top: -54px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
@media only screen and (max-width: 1155px) {
|
|
18
|
+
.maintable{
|
|
19
|
+
.multipleDeletion{
|
|
20
|
+
margin-top: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
12
25
|
.cardMap{
|
|
13
26
|
&:fullscreen{
|
|
14
27
|
.vue-map-container{
|