handy-uploader 1.1.8 → 2.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/README.md +391 -30
- package/dist/components/InsertButton.vue.d.ts +24 -0
- package/dist/components/SelectFileIconType.vue.d.ts +29 -0
- package/dist/components/SimpleUploader.vue.d.ts +60 -0
- package/dist/components/TableUploader.vue.d.ts +62 -0
- package/dist/components/ThumbnailUploader.vue.d.ts +59 -0
- package/dist/components/handyUploader.vue.d.ts +146 -0
- package/dist/composables/useErrorHandler.d.ts +39 -0
- package/dist/composables/useFileUpload.d.ts +33 -0
- package/dist/favicon.ico +0 -0
- package/dist/handy-uploader.es.js +2407 -0
- package/dist/handy-uploader.umd.js +1 -0
- package/dist/lib/index.d.ts +713 -0
- package/dist/lib/language.d.ts +39 -0
- package/dist/types/index.d.ts +129 -0
- package/dist/utils/documentation.d.ts +95 -0
- package/dist/utils/fileUtils.d.ts +41 -0
- package/dist/utils/propValidation.d.ts +71 -0
- package/package.json +59 -56
- package/.eslintrc.js +0 -14
- package/LICENSE +0 -21
- package/babel.config.js +0 -3
- package/dist/demo.html +0 -10
- package/dist/handyUploader.common.js +0 -30712
- package/dist/handyUploader.common.js.map +0 -1
- package/dist/handyUploader.css +0 -5
- package/dist/handyUploader.umd.js +0 -30722
- package/dist/handyUploader.umd.js.map +0 -1
- package/dist/handyUploader.umd.min.js +0 -11
- package/dist/handyUploader.umd.min.js.map +0 -1
- package/package-lock.json +0 -11831
- package/src/App.vue +0 -69
- package/src/components/InsertButton.vue +0 -61
- package/src/components/SelectFileIconType.vue +0 -103
- package/src/components/SimpleUploader.vue +0 -401
- package/src/components/TableUploader.vue +0 -350
- package/src/components/ThumbnailUploader.vue +0 -371
- package/src/components/handyUploader.vue +0 -883
- package/src/components/index.js +0 -10
- package/src/components/language.js +0 -148
- package/src/main.js +0 -10
- package/src/plugins/vuetify.js +0 -11
- package/vue.config.js +0 -3
package/src/App.vue
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-app>
|
|
3
|
-
<v-main>
|
|
4
|
-
<handy-uploader
|
|
5
|
-
:documentAttachment.sync="registryDocFile"
|
|
6
|
-
:fileUploaderType="'thumbnail'"
|
|
7
|
-
:maxFileSize="10240"
|
|
8
|
-
:imageCompressor="true"
|
|
9
|
-
:imageCompressLevel="0.8"
|
|
10
|
-
:maxFileCount="10"
|
|
11
|
-
:badgeCounter="true"
|
|
12
|
-
:changeFileName="true"
|
|
13
|
-
:addFileDescription="true"
|
|
14
|
-
:addFileTag="true"
|
|
15
|
-
:lang="'en'"
|
|
16
|
-
:tags="['Tag 1', 'Tag 2', 'Tag 3', 'Tag 4']"
|
|
17
|
-
>
|
|
18
|
-
</handy-uploader>
|
|
19
|
-
</v-main>
|
|
20
|
-
</v-app>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
import handyUploader from "./components/handyUploader";
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
name: "App",
|
|
28
|
-
|
|
29
|
-
components: {
|
|
30
|
-
handyUploader
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
data: () => ({
|
|
34
|
-
registryDocFile: [],
|
|
35
|
-
customLang: {
|
|
36
|
-
custom: {
|
|
37
|
-
insertFile: "Insert File1",
|
|
38
|
-
insertNewFile: "Insert New File1",
|
|
39
|
-
add: "Add",
|
|
40
|
-
delete: "Delete",
|
|
41
|
-
deleteDialog: {
|
|
42
|
-
message: "Are you sure you want to delete the file?",
|
|
43
|
-
cancel: "cancel"
|
|
44
|
-
},
|
|
45
|
-
table: {
|
|
46
|
-
thumb: "Thumb",
|
|
47
|
-
name: "Name",
|
|
48
|
-
size: "Size",
|
|
49
|
-
tags: "tags",
|
|
50
|
-
action: {
|
|
51
|
-
action: "Action",
|
|
52
|
-
deleteTooltip: "Delete"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
size: {
|
|
56
|
-
kb: "KB",
|
|
57
|
-
mb: "MB"
|
|
58
|
-
},
|
|
59
|
-
maxFileSizeAlert: "Max file Size is",
|
|
60
|
-
maxFileCountAlert: "Max file Count is",
|
|
61
|
-
fileName: "File Name",
|
|
62
|
-
fileDescription: "File Description",
|
|
63
|
-
fileTags: "File Tags"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}),
|
|
67
|
-
methods: {}
|
|
68
|
-
};
|
|
69
|
-
</script>
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<template v-if="badgeCounter">
|
|
4
|
-
<template v-if="documentAttachment.length > 0">
|
|
5
|
-
<v-badge
|
|
6
|
-
bordered
|
|
7
|
-
:color="
|
|
8
|
-
documentAttachment.length === maxFileCount ? 'error' : 'success'
|
|
9
|
-
"
|
|
10
|
-
overlap
|
|
11
|
-
:content="documentAttachment.length"
|
|
12
|
-
>
|
|
13
|
-
<v-btn :color="btnColor" @click="openInputDocumentModal" class="mb-4">
|
|
14
|
-
{{ selectedLang[lang].insertFile }}
|
|
15
|
-
</v-btn>
|
|
16
|
-
</v-badge>
|
|
17
|
-
</template>
|
|
18
|
-
<template v-else>
|
|
19
|
-
<v-btn :color="btnColor" @click="openInputDocumentModal" class="mb-4">
|
|
20
|
-
{{ selectedLang[lang].insertFile }}
|
|
21
|
-
</v-btn>
|
|
22
|
-
</template>
|
|
23
|
-
</template>
|
|
24
|
-
<template v-if="!badgeCounter">
|
|
25
|
-
<v-btn :color="btnColor" @click="openInputDocumentModal" class="mb-4">
|
|
26
|
-
{{ selectedLang[lang].insertFile }}
|
|
27
|
-
</v-btn>
|
|
28
|
-
</template>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
export default {
|
|
34
|
-
props: {
|
|
35
|
-
documentAttachment: [Array],
|
|
36
|
-
badgeCounter: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true
|
|
39
|
-
},
|
|
40
|
-
btnColor: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: "info"
|
|
43
|
-
},
|
|
44
|
-
lang: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: "en"
|
|
47
|
-
},
|
|
48
|
-
maxFileCount: {
|
|
49
|
-
type: Number,
|
|
50
|
-
default: 0
|
|
51
|
-
},
|
|
52
|
-
selectedLang: {}
|
|
53
|
-
},
|
|
54
|
-
data: () => ({}),
|
|
55
|
-
methods: {
|
|
56
|
-
openInputDocumentModal() {
|
|
57
|
-
this.$emit("openInputDocumentModal");
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
</script>
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<v-icon
|
|
4
|
-
v-if="format === 'pdf'"
|
|
5
|
-
:size="size"
|
|
6
|
-
file-word-outline
|
|
7
|
-
color="red darken-1"
|
|
8
|
-
>mdi-file-pdf-outline</v-icon
|
|
9
|
-
>
|
|
10
|
-
<v-icon
|
|
11
|
-
v-else-if="
|
|
12
|
-
fileFormat === 'doc' || fileFormat === 'docx' || fileFormat === 'odt'
|
|
13
|
-
"
|
|
14
|
-
:size="size"
|
|
15
|
-
file-word-outline
|
|
16
|
-
color="blue darken-1"
|
|
17
|
-
>mdi-file-word-outline</v-icon
|
|
18
|
-
>
|
|
19
|
-
<v-icon
|
|
20
|
-
v-else-if="
|
|
21
|
-
fileFormat === 'jpg' ||
|
|
22
|
-
fileFormat === 'jpeg' ||
|
|
23
|
-
fileFormat === 'png' ||
|
|
24
|
-
fileFormat === 'tif' ||
|
|
25
|
-
fileFormat === 'bmp'
|
|
26
|
-
"
|
|
27
|
-
:size="size"
|
|
28
|
-
file-word-outline
|
|
29
|
-
color="deep-purple darken-1"
|
|
30
|
-
>mdi-file-image-outline</v-icon
|
|
31
|
-
>
|
|
32
|
-
<v-icon
|
|
33
|
-
v-else-if="fileFormat === 'xls' || fileFormat === 'xlsx'"
|
|
34
|
-
:size="size"
|
|
35
|
-
file-word-outline
|
|
36
|
-
color="teal darken-1"
|
|
37
|
-
>mdi-file-excel-outline</v-icon
|
|
38
|
-
>
|
|
39
|
-
<v-icon
|
|
40
|
-
v-else-if="
|
|
41
|
-
fileFormat === 'pptx' || fileFormat === 'pptm' || fileFormat === 'ppt'
|
|
42
|
-
"
|
|
43
|
-
:size="size"
|
|
44
|
-
file-word-outline
|
|
45
|
-
color="orange darken-3"
|
|
46
|
-
>mdi-file-powerpoint-outline</v-icon
|
|
47
|
-
>
|
|
48
|
-
<v-icon
|
|
49
|
-
v-else-if="
|
|
50
|
-
fileFormat === 'mp4' ||
|
|
51
|
-
fileFormat === 'mov' ||
|
|
52
|
-
fileFormat === 'flv' ||
|
|
53
|
-
fileFormat === 'wmv' ||
|
|
54
|
-
fileFormat === 'avi'
|
|
55
|
-
"
|
|
56
|
-
:size="size"
|
|
57
|
-
file-word-outline
|
|
58
|
-
color="red lighten-1"
|
|
59
|
-
>mdi-file-video-outline</v-icon
|
|
60
|
-
>
|
|
61
|
-
<v-icon
|
|
62
|
-
v-else-if="fileFormat === 'dwg'"
|
|
63
|
-
:size="size"
|
|
64
|
-
file-word-outline
|
|
65
|
-
color="indigo lighten-2"
|
|
66
|
-
>mdi-file-cad</v-icon
|
|
67
|
-
>
|
|
68
|
-
<v-icon
|
|
69
|
-
v-else-if="
|
|
70
|
-
fileFormat === 'zip' || fileFormat === 'rar' || fileFormat === '7-zip'
|
|
71
|
-
"
|
|
72
|
-
:size="size"
|
|
73
|
-
file-word-outline
|
|
74
|
-
color="lime lighten-1"
|
|
75
|
-
>mdi-folder-zip-outline</v-icon
|
|
76
|
-
>
|
|
77
|
-
<v-icon
|
|
78
|
-
v-else-if="fileFormat === 'txt'"
|
|
79
|
-
:size="size"
|
|
80
|
-
file-word-outline
|
|
81
|
-
color="light-green darken-3"
|
|
82
|
-
>mdi-script-text-outline</v-icon
|
|
83
|
-
>
|
|
84
|
-
<v-icon v-else :size="size" file-word-outline color="indigo lighten-1"
|
|
85
|
-
>mdi-file-question-outline</v-icon
|
|
86
|
-
>
|
|
87
|
-
</div>
|
|
88
|
-
</template>
|
|
89
|
-
|
|
90
|
-
<script>
|
|
91
|
-
export default {
|
|
92
|
-
props: {
|
|
93
|
-
fileFormat: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: ""
|
|
96
|
-
},
|
|
97
|
-
size: {
|
|
98
|
-
type: Number,
|
|
99
|
-
default: 30
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
</script>
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<v-row>
|
|
4
|
-
<v-col
|
|
5
|
-
v-for="(attachment, index) in documentAttachment"
|
|
6
|
-
:key="`attachment-${index}`"
|
|
7
|
-
cols="12"
|
|
8
|
-
:md="cols"
|
|
9
|
-
xs="12"
|
|
10
|
-
>
|
|
11
|
-
<v-card
|
|
12
|
-
:shaped="shaped"
|
|
13
|
-
:outlined="outlined"
|
|
14
|
-
:raised="raised"
|
|
15
|
-
:tile="tile"
|
|
16
|
-
>
|
|
17
|
-
<v-list-item three-line>
|
|
18
|
-
<v-list-item-content>
|
|
19
|
-
<v-list-item-subtitle color="blue-grey darken-3">{{
|
|
20
|
-
attachment.file.name
|
|
21
|
-
}}</v-list-item-subtitle>
|
|
22
|
-
<v-list-item-subtitle
|
|
23
|
-
v-if="Number((attachment.file.size / 1000).toFixed(1)) < 1024"
|
|
24
|
-
>
|
|
25
|
-
<v-chip color="teal lighten-2" label text-color="white">
|
|
26
|
-
{{
|
|
27
|
-
Number((attachment.file.size / 1000).toFixed(1)) +
|
|
28
|
-
" " +
|
|
29
|
-
selectedLang[lang].size.kb
|
|
30
|
-
}}
|
|
31
|
-
<v-icon right>mdi-harddisk</v-icon>
|
|
32
|
-
</v-chip>
|
|
33
|
-
</v-list-item-subtitle>
|
|
34
|
-
<v-list-item-subtitle
|
|
35
|
-
v-if="Number((attachment.file.size / 1000).toFixed(1)) > 1024"
|
|
36
|
-
>
|
|
37
|
-
<v-chip color="teal lighten-2" label text-color="white">
|
|
38
|
-
{{
|
|
39
|
-
Number((attachment.file.size / 1000 / 1024).toFixed(1)) +
|
|
40
|
-
" " +
|
|
41
|
-
selectedLang[lang].size.mb
|
|
42
|
-
}}
|
|
43
|
-
<v-icon right>mdi-harddisk</v-icon>
|
|
44
|
-
</v-chip>
|
|
45
|
-
</v-list-item-subtitle>
|
|
46
|
-
</v-list-item-content>
|
|
47
|
-
<v-list-item-avatar tile size="80" color="blue-grey lighten-5">
|
|
48
|
-
<template
|
|
49
|
-
v-if="
|
|
50
|
-
attachment.file.name
|
|
51
|
-
.split('.')
|
|
52
|
-
.pop()
|
|
53
|
-
.toLowerCase() === 'jpg' ||
|
|
54
|
-
attachment.file.name
|
|
55
|
-
.split('.')
|
|
56
|
-
.pop()
|
|
57
|
-
.toLowerCase() === 'jpeg' ||
|
|
58
|
-
attachment.file.name
|
|
59
|
-
.split('.')
|
|
60
|
-
.pop()
|
|
61
|
-
.toLowerCase() === 'png' ||
|
|
62
|
-
attachment.file.name
|
|
63
|
-
.split('.')
|
|
64
|
-
.pop()
|
|
65
|
-
.toLowerCase() === 'tif' ||
|
|
66
|
-
attachment.file.name
|
|
67
|
-
.split('.')
|
|
68
|
-
.pop()
|
|
69
|
-
.toLowerCase() === 'bmp'
|
|
70
|
-
"
|
|
71
|
-
>
|
|
72
|
-
<v-img
|
|
73
|
-
v-if="thumb"
|
|
74
|
-
:src="
|
|
75
|
-
'data:' +
|
|
76
|
-
attachment.file.format +
|
|
77
|
-
',' +
|
|
78
|
-
attachment.file.base64
|
|
79
|
-
"
|
|
80
|
-
></v-img>
|
|
81
|
-
<v-icon
|
|
82
|
-
v-else
|
|
83
|
-
style="margin-left: 10px"
|
|
84
|
-
size="50"
|
|
85
|
-
file-word-outline
|
|
86
|
-
color="deep-purple darken-1"
|
|
87
|
-
>mdi-file-image-outline</v-icon
|
|
88
|
-
>
|
|
89
|
-
</template>
|
|
90
|
-
<template v-else>
|
|
91
|
-
<v-icon
|
|
92
|
-
v-if="
|
|
93
|
-
attachment.file.name
|
|
94
|
-
.split('.')
|
|
95
|
-
.pop()
|
|
96
|
-
.toLowerCase() === 'pdf'
|
|
97
|
-
"
|
|
98
|
-
x-large
|
|
99
|
-
file-word-outline
|
|
100
|
-
color="red darken-1"
|
|
101
|
-
>mdi-file-pdf-outline</v-icon
|
|
102
|
-
>
|
|
103
|
-
<v-icon
|
|
104
|
-
v-else-if="
|
|
105
|
-
attachment.file.name
|
|
106
|
-
.split('.')
|
|
107
|
-
.pop()
|
|
108
|
-
.toLowerCase() === 'doc' ||
|
|
109
|
-
attachment.file.name
|
|
110
|
-
.split('.')
|
|
111
|
-
.pop()
|
|
112
|
-
.toLowerCase() === 'docx' ||
|
|
113
|
-
attachment.file.name
|
|
114
|
-
.split('.')
|
|
115
|
-
.pop()
|
|
116
|
-
.toLowerCase() === 'odt'
|
|
117
|
-
"
|
|
118
|
-
x-large
|
|
119
|
-
file-word-outline
|
|
120
|
-
color="blue darken-1"
|
|
121
|
-
>mdi-file-word-outline</v-icon
|
|
122
|
-
>
|
|
123
|
-
<v-icon
|
|
124
|
-
v-else-if="
|
|
125
|
-
attachment.file.name
|
|
126
|
-
.split('.')
|
|
127
|
-
.pop()
|
|
128
|
-
.toLowerCase() === 'jpg' ||
|
|
129
|
-
attachment.file.name
|
|
130
|
-
.split('.')
|
|
131
|
-
.pop()
|
|
132
|
-
.toLowerCase() === 'jpeg' ||
|
|
133
|
-
attachment.file.name
|
|
134
|
-
.split('.')
|
|
135
|
-
.pop()
|
|
136
|
-
.toLowerCase() === 'png' ||
|
|
137
|
-
attachment.file.name
|
|
138
|
-
.split('.')
|
|
139
|
-
.pop()
|
|
140
|
-
.toLowerCase() === 'tif' ||
|
|
141
|
-
attachment.file.name
|
|
142
|
-
.split('.')
|
|
143
|
-
.pop()
|
|
144
|
-
.toLowerCase() === 'bmp'
|
|
145
|
-
"
|
|
146
|
-
x-large
|
|
147
|
-
file-word-outline
|
|
148
|
-
color="deep-purple darken-1"
|
|
149
|
-
>mdi-file-image-outline</v-icon
|
|
150
|
-
>
|
|
151
|
-
<v-icon
|
|
152
|
-
v-else-if="
|
|
153
|
-
attachment.file.name
|
|
154
|
-
.split('.')
|
|
155
|
-
.pop()
|
|
156
|
-
.toLowerCase() === 'xls' ||
|
|
157
|
-
attachment.file.name
|
|
158
|
-
.split('.')
|
|
159
|
-
.pop()
|
|
160
|
-
.toLowerCase() === 'xlsx'
|
|
161
|
-
"
|
|
162
|
-
x-large
|
|
163
|
-
file-word-outline
|
|
164
|
-
color="teal darken-1"
|
|
165
|
-
>mdi-file-excel-outline</v-icon
|
|
166
|
-
>
|
|
167
|
-
<v-icon
|
|
168
|
-
v-else-if="
|
|
169
|
-
attachment.file.name
|
|
170
|
-
.split('.')
|
|
171
|
-
.pop()
|
|
172
|
-
.toLowerCase() === 'pptx' ||
|
|
173
|
-
attachment.file.name
|
|
174
|
-
.split('.')
|
|
175
|
-
.pop()
|
|
176
|
-
.toLowerCase() === 'pptm' ||
|
|
177
|
-
attachment.file.name
|
|
178
|
-
.split('.')
|
|
179
|
-
.pop()
|
|
180
|
-
.toLowerCase() === 'ppt'
|
|
181
|
-
"
|
|
182
|
-
x-large
|
|
183
|
-
file-word-outline
|
|
184
|
-
color="orange darken-3"
|
|
185
|
-
>mdi-file-powerpoint-outline</v-icon
|
|
186
|
-
>
|
|
187
|
-
<v-icon
|
|
188
|
-
v-else-if="
|
|
189
|
-
attachment.file.name
|
|
190
|
-
.split('.')
|
|
191
|
-
.pop()
|
|
192
|
-
.toLowerCase() === 'mp4' ||
|
|
193
|
-
attachment.file.name
|
|
194
|
-
.split('.')
|
|
195
|
-
.pop()
|
|
196
|
-
.toLowerCase() === 'mov' ||
|
|
197
|
-
attachment.file.name
|
|
198
|
-
.split('.')
|
|
199
|
-
.pop()
|
|
200
|
-
.toLowerCase() === 'flv' ||
|
|
201
|
-
attachment.file.name
|
|
202
|
-
.split('.')
|
|
203
|
-
.pop()
|
|
204
|
-
.toLowerCase() === 'wmv' ||
|
|
205
|
-
attachment.file.name
|
|
206
|
-
.split('.')
|
|
207
|
-
.pop()
|
|
208
|
-
.toLowerCase() === 'avi'
|
|
209
|
-
"
|
|
210
|
-
x-large
|
|
211
|
-
file-word-outline
|
|
212
|
-
color="red lighten-1"
|
|
213
|
-
>mdi-file-video-outline</v-icon
|
|
214
|
-
>
|
|
215
|
-
<v-icon
|
|
216
|
-
v-else-if="
|
|
217
|
-
attachment.file.name
|
|
218
|
-
.split('.')
|
|
219
|
-
.pop()
|
|
220
|
-
.toLowerCase() === 'dwg'
|
|
221
|
-
"
|
|
222
|
-
x-large
|
|
223
|
-
file-word-outline
|
|
224
|
-
color="indigo lighten-2"
|
|
225
|
-
>mdi-file-cad</v-icon
|
|
226
|
-
>
|
|
227
|
-
<v-icon
|
|
228
|
-
v-else-if="
|
|
229
|
-
attachment.file.name
|
|
230
|
-
.split('.')
|
|
231
|
-
.pop()
|
|
232
|
-
.toLowerCase() === 'zip' ||
|
|
233
|
-
attachment.file.name
|
|
234
|
-
.split('.')
|
|
235
|
-
.pop()
|
|
236
|
-
.toLowerCase() === 'rar' ||
|
|
237
|
-
attachment.file.name
|
|
238
|
-
.split('.')
|
|
239
|
-
.pop()
|
|
240
|
-
.toLowerCase() === '7-zip'
|
|
241
|
-
"
|
|
242
|
-
x-large
|
|
243
|
-
file-word-outline
|
|
244
|
-
color="lime lighten-1"
|
|
245
|
-
>mdi-folder-zip-outline</v-icon
|
|
246
|
-
>
|
|
247
|
-
<v-icon
|
|
248
|
-
v-else-if="
|
|
249
|
-
attachment.file.name
|
|
250
|
-
.split('.')
|
|
251
|
-
.pop()
|
|
252
|
-
.toLowerCase() === 'txt'
|
|
253
|
-
"
|
|
254
|
-
x-large
|
|
255
|
-
file-word-outline
|
|
256
|
-
color="light-green darken-3"
|
|
257
|
-
>mdi-script-text-outline</v-icon
|
|
258
|
-
>
|
|
259
|
-
<v-icon
|
|
260
|
-
v-else
|
|
261
|
-
x-large
|
|
262
|
-
file-word-outline
|
|
263
|
-
color="indigo lighten-1"
|
|
264
|
-
>mdi-file-question-outline</v-icon
|
|
265
|
-
>
|
|
266
|
-
</template>
|
|
267
|
-
</v-list-item-avatar>
|
|
268
|
-
</v-list-item>
|
|
269
|
-
<v-divider class="mx-4"></v-divider>
|
|
270
|
-
<v-card-actions style="padding: 0">
|
|
271
|
-
<v-tooltip right>
|
|
272
|
-
<template v-slot:activator="{ on }">
|
|
273
|
-
<v-btn
|
|
274
|
-
v-if="deletePermission"
|
|
275
|
-
text
|
|
276
|
-
fab
|
|
277
|
-
v-on="on"
|
|
278
|
-
@click="openDeleteDialog(index, '')"
|
|
279
|
-
><v-icon color="red">mdi-trash-can-outline</v-icon></v-btn
|
|
280
|
-
>
|
|
281
|
-
</template>
|
|
282
|
-
<span class="BYekan">{{ selectedLang[lang].delete }}</span>
|
|
283
|
-
</v-tooltip>
|
|
284
|
-
<v-tooltip right>
|
|
285
|
-
<template v-slot:activator="{ on }">
|
|
286
|
-
<v-btn
|
|
287
|
-
v-if="editPermission"
|
|
288
|
-
text
|
|
289
|
-
fab
|
|
290
|
-
v-on="on"
|
|
291
|
-
@click="openEditDocumentDialog(attachment, index)"
|
|
292
|
-
><v-icon color="green">mdi-pencil-outline</v-icon></v-btn
|
|
293
|
-
>
|
|
294
|
-
</template>
|
|
295
|
-
<span class="BYekan">{{ selectedLang[lang].edit }}</span>
|
|
296
|
-
</v-tooltip>
|
|
297
|
-
|
|
298
|
-
<v-spacer></v-spacer>
|
|
299
|
-
|
|
300
|
-
<v-btn
|
|
301
|
-
v-if="
|
|
302
|
-
attachment.file.tags.length > 0 ||
|
|
303
|
-
attachment.file.description !== ''
|
|
304
|
-
"
|
|
305
|
-
icon
|
|
306
|
-
@click.prevent="
|
|
307
|
-
attachment.file.showDetailState = !attachment.file
|
|
308
|
-
.showDetailState
|
|
309
|
-
"
|
|
310
|
-
>
|
|
311
|
-
<v-icon>{{
|
|
312
|
-
attachment.file.showDetailState
|
|
313
|
-
? "mdi-chevron-up"
|
|
314
|
-
: "mdi-chevron-down"
|
|
315
|
-
}}</v-icon>
|
|
316
|
-
</v-btn>
|
|
317
|
-
</v-card-actions>
|
|
318
|
-
|
|
319
|
-
<v-expand-transition>
|
|
320
|
-
<template
|
|
321
|
-
v-if="
|
|
322
|
-
attachment.file.tags.length > 0 ||
|
|
323
|
-
attachment.file.description !== ''
|
|
324
|
-
"
|
|
325
|
-
>
|
|
326
|
-
<div v-show="attachment.file.showDetailState">
|
|
327
|
-
<v-divider></v-divider>
|
|
328
|
-
<v-chip-group
|
|
329
|
-
v-if="attachment.file.tags.length > 0"
|
|
330
|
-
multiple
|
|
331
|
-
active-class="primary--text"
|
|
332
|
-
style="padding: 8px"
|
|
333
|
-
>
|
|
334
|
-
<v-chip
|
|
335
|
-
v-for="(tag, index) in attachment.file.tags"
|
|
336
|
-
:key="`attachment-${index}`"
|
|
337
|
-
style="margin: 5px"
|
|
338
|
-
>
|
|
339
|
-
{{ tag }}
|
|
340
|
-
</v-chip>
|
|
341
|
-
</v-chip-group>
|
|
342
|
-
<v-card-text
|
|
343
|
-
v-if="attachment.file.description != null"
|
|
344
|
-
style="text-align: justify"
|
|
345
|
-
>
|
|
346
|
-
{{ attachment.file.description }}
|
|
347
|
-
</v-card-text>
|
|
348
|
-
</div>
|
|
349
|
-
</template>
|
|
350
|
-
</v-expand-transition>
|
|
351
|
-
</v-card>
|
|
352
|
-
</v-col>
|
|
353
|
-
</v-row>
|
|
354
|
-
</div>
|
|
355
|
-
</template>
|
|
356
|
-
|
|
357
|
-
<script>
|
|
358
|
-
export default {
|
|
359
|
-
props: {
|
|
360
|
-
documentAttachment: [Array],
|
|
361
|
-
thumb: {
|
|
362
|
-
type: Boolean,
|
|
363
|
-
default: true
|
|
364
|
-
},
|
|
365
|
-
lang: {
|
|
366
|
-
type: String,
|
|
367
|
-
default: "en"
|
|
368
|
-
},
|
|
369
|
-
cols: {
|
|
370
|
-
type: Number,
|
|
371
|
-
default: 4
|
|
372
|
-
},
|
|
373
|
-
editPermission: {
|
|
374
|
-
type: Boolean,
|
|
375
|
-
default: true
|
|
376
|
-
},
|
|
377
|
-
cardType: String,
|
|
378
|
-
outlined: Boolean,
|
|
379
|
-
raised: Boolean,
|
|
380
|
-
shaped: Boolean,
|
|
381
|
-
tile: Boolean,
|
|
382
|
-
deletePermission: {
|
|
383
|
-
type: Boolean,
|
|
384
|
-
default: true
|
|
385
|
-
},
|
|
386
|
-
selectedLang: {}
|
|
387
|
-
},
|
|
388
|
-
data: () => ({}),
|
|
389
|
-
methods: {
|
|
390
|
-
setCardTheme() {
|
|
391
|
-
this.$emit("setCardTheme");
|
|
392
|
-
},
|
|
393
|
-
openDeleteDialog(index, deleteId) {
|
|
394
|
-
this.$emit("openDeleteDialog", index, deleteId);
|
|
395
|
-
},
|
|
396
|
-
openEditDocumentDialog(item, index) {
|
|
397
|
-
this.$emit("openEditDocumentDialog", item, index);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
</script>
|