@bildvitta/quasar-ui-asteroid 3.8.0-beta.0 → 3.8.0-beta.2
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/package.json +1 -1
- package/src/components/dialog/QasDialog.yml +1 -1
- package/src/components/field/QasField.vue +1 -1
- package/src/components/filters/QasFilters.vue +82 -48
- package/src/components/filters/QasFilters.yml +51 -9
- package/src/components/filters/private/PvFiltersButton.vue +89 -0
- package/src/components/form-view/QasFormView.vue +12 -0
- package/src/components/gallery-card/QasGalleryCard.vue +116 -0
- package/src/components/gallery-card/QasGalleryCard.yml +45 -0
- package/src/components/grid-generator/QasGridGenerator.vue +0 -5
- package/src/components/label/QasLabel.vue +19 -6
- package/src/components/nested-fields/QasNestedFields.vue +47 -30
- package/src/components/pagination/QasPagination.vue +2 -2
- package/src/components/signature-uploader/QasSignatureUploader.vue +45 -57
- package/src/components/signature-uploader/QasSignatureUploader.yml +5 -9
- package/src/components/table-generator/QasTableGenerator.vue +39 -3
- package/src/components/table-generator/QasTableGenerator.yml +10 -0
- package/src/components/uploader/QasUploader.vue +330 -168
- package/src/components/uploader/QasUploader.yml +68 -12
- package/src/components/uploader/private/PvUploaderGalleryCard.vue +332 -0
- package/src/css/components/index.scss +1 -0
- package/src/css/components/scrollbar.scss +20 -0
- package/src/css/variables/index.scss +1 -0
- package/src/css/variables/scrollbar.scss +11 -0
- package/src/helpers/download-file.js +21 -0
- package/src/helpers/index.js +10 -9
- package/src/vue-plugin.js +3 -0
|
@@ -8,6 +8,19 @@ meta:
|
|
|
8
8
|
desc: Componente para upload com auto redimensionamento que implementa o "QField" e "QUploader".
|
|
9
9
|
|
|
10
10
|
props:
|
|
11
|
+
'add-button-fn -> function (scope)':
|
|
12
|
+
desc: Callback para interceptar ação do botão de adicionar arquivos, caso passe uma função para essa prop, é desabilitado o a ação de abrir o seletor de arquivos e é necessário fazer o controle manual.
|
|
13
|
+
type: Function
|
|
14
|
+
params:
|
|
15
|
+
scope:
|
|
16
|
+
desc: Retorna o valor de referencia do QUploader.
|
|
17
|
+
type: Object
|
|
18
|
+
|
|
19
|
+
add-button-label:
|
|
20
|
+
desc: Label do botão de adicionar arquivo(s).
|
|
21
|
+
default: Adicionar
|
|
22
|
+
type: String
|
|
23
|
+
|
|
11
24
|
accept-resize-types:
|
|
12
25
|
desc: Tipos de arquivos aceitos para fazer o redimensionamento antes de upar.
|
|
13
26
|
type: Array
|
|
@@ -20,18 +33,58 @@ props:
|
|
|
20
33
|
'image/webp',
|
|
21
34
|
'image/jpg'
|
|
22
35
|
]
|
|
36
|
+
|
|
37
|
+
columns:
|
|
38
|
+
desc: Seta as colunas (grid cols), valor default depende se o componente é múltiplo ou não.
|
|
39
|
+
default:
|
|
40
|
+
col: 12
|
|
41
|
+
sm: 6
|
|
42
|
+
md: 4
|
|
43
|
+
lg: 3
|
|
44
|
+
type: Object
|
|
45
|
+
examples: ['{ col: 12, sm: 6 }']
|
|
46
|
+
|
|
47
|
+
dialog-props:
|
|
48
|
+
desc: props repassadas para o componente QasDialog, que é utilizado quando os arquivos upados podem ser editados.
|
|
49
|
+
default: {}
|
|
50
|
+
type: Object
|
|
23
51
|
|
|
24
52
|
entity:
|
|
25
53
|
desc: Entidade enviada para a API do `/upload-credentials/`.
|
|
26
54
|
required: true
|
|
27
55
|
type: String
|
|
28
56
|
|
|
57
|
+
error:
|
|
58
|
+
desc: Habilita modo erro.
|
|
59
|
+
default: false
|
|
60
|
+
type: Boolean
|
|
61
|
+
|
|
29
62
|
error-message:
|
|
30
63
|
desc: Mensagem de erro.
|
|
31
64
|
type: String
|
|
32
65
|
|
|
33
|
-
|
|
34
|
-
desc:
|
|
66
|
+
fields:
|
|
67
|
+
desc: Quando utilizar os mesmos campos no "QasGridGenerator" e "QasFormGenerator", utilize esta prop para não ter que repetir os fields.
|
|
68
|
+
default: {}
|
|
69
|
+
type: Object
|
|
70
|
+
|
|
71
|
+
form-generator-props:
|
|
72
|
+
desc: Propriedades repassadas para o componente "QasFormGenerator".
|
|
73
|
+
default: {}
|
|
74
|
+
type: Object
|
|
75
|
+
|
|
76
|
+
gallery-card-props:
|
|
77
|
+
desc: Propriedades repassadas para o componente "QasGalleryCard".
|
|
78
|
+
default: {}
|
|
79
|
+
type: Object
|
|
80
|
+
|
|
81
|
+
grid-generator-props:
|
|
82
|
+
desc: Propriedades repassadas para o componente "QasGridGenerator".
|
|
83
|
+
default: {}
|
|
84
|
+
type: Object
|
|
85
|
+
|
|
86
|
+
label:
|
|
87
|
+
desc: Label do componente, repassado para o componente "QasLabel".
|
|
35
88
|
type: String
|
|
36
89
|
|
|
37
90
|
max-files:
|
|
@@ -65,22 +118,27 @@ props:
|
|
|
65
118
|
default: 1280
|
|
66
119
|
type: Number
|
|
67
120
|
|
|
68
|
-
use-resize:
|
|
69
|
-
desc: Controla se o componente vai fazer o redimensionamento antes de upar as imagens.
|
|
70
|
-
default: true
|
|
71
|
-
type: Number
|
|
72
|
-
|
|
73
121
|
uploading:
|
|
74
122
|
desc: Model que retorna se o componente está fazendo algum upload.
|
|
75
123
|
type: Boolean
|
|
76
124
|
examples: [v-model:uploading="isUploading"]
|
|
77
125
|
model: true
|
|
78
126
|
|
|
79
|
-
|
|
127
|
+
use-download:
|
|
128
|
+
desc: Habilita a opção de fazer download por arquivo.
|
|
129
|
+
default: true
|
|
130
|
+
type: Boolean
|
|
131
|
+
|
|
132
|
+
use-object-model:
|
|
80
133
|
desc: Controla se a model retornará um array de objetos.
|
|
81
134
|
type: Boolean
|
|
82
135
|
model: true
|
|
83
136
|
|
|
137
|
+
use-resize:
|
|
138
|
+
desc: Controla se o componente vai fazer o redimensionamento antes de upar as imagens.
|
|
139
|
+
default: true
|
|
140
|
+
type: Boolean
|
|
141
|
+
|
|
84
142
|
slots:
|
|
85
143
|
header:
|
|
86
144
|
desc: Acesso ao header do <q-uploader />.
|
|
@@ -94,16 +152,14 @@ slots:
|
|
|
94
152
|
desc: Acesso ao conteúdo onde fica a listagem de arquivos.
|
|
95
153
|
scope:
|
|
96
154
|
scope:
|
|
97
|
-
desc:
|
|
98
|
-
default: {}
|
|
155
|
+
desc: Retorna o valor de referencia do QUploader.
|
|
99
156
|
type: Object
|
|
100
157
|
|
|
101
158
|
custom-upload:
|
|
102
159
|
desc: Acesso ao conteúdo onde fica a listagem de arquivos.
|
|
103
160
|
scope:
|
|
104
161
|
context:
|
|
105
|
-
desc:
|
|
106
|
-
default: {}
|
|
162
|
+
desc: Retorna o valor de referencia do QasUploader.
|
|
107
163
|
type: Object
|
|
108
164
|
|
|
109
165
|
events:
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<qas-gallery-card v-bind="defaultGalleryCardProps">
|
|
4
|
+
<!-- este template é para quando existe um erro carregar uma imagem de um arquivo como PDF, DOCX. -->
|
|
5
|
+
<template #image-error>
|
|
6
|
+
<div class="text-uppercase" :class="errorClasses">
|
|
7
|
+
{{ fileType }}
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<!-- este template é para quando existe um erro ao fazer um UPLOAD! -->
|
|
12
|
+
<template v-if="hasError" #image>
|
|
13
|
+
<div :class="errorClasses">
|
|
14
|
+
<div class="q-pa-sm text-center">
|
|
15
|
+
<div>
|
|
16
|
+
<q-icon name="sym_r_cancel" size="sm" />
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="q-mt-sm">
|
|
20
|
+
Falha ao carregar arquivo.
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<template v-if="hasGenerator" #bottom>
|
|
27
|
+
<div>
|
|
28
|
+
<qas-grid-generator v-if="hasGridGenerator" v-bind="defaultGridGeneratorProps" />
|
|
29
|
+
|
|
30
|
+
<qas-form-generator v-else-if="hasFormGenerator" v-bind="defaultFormGeneratorProps" />
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
</qas-gallery-card>
|
|
34
|
+
|
|
35
|
+
<qas-dialog v-model="showDialog" use-form use-validation-all-at-once v-bind="dialogProps" @validate="onValidate">
|
|
36
|
+
<template #description>
|
|
37
|
+
<qas-form-generator v-bind="dialogFormGeneratorProps" v-model="dialogValues" />
|
|
38
|
+
</template>
|
|
39
|
+
</qas-dialog>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import downloadFile from '../../../helpers/download-file.js'
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
name: 'PvUploaderGalleryCard',
|
|
48
|
+
|
|
49
|
+
inheritAttrs: false,
|
|
50
|
+
|
|
51
|
+
props: {
|
|
52
|
+
currentModelValue: {
|
|
53
|
+
default: '',
|
|
54
|
+
type: [String, Array, Object]
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
dialogProps: {
|
|
58
|
+
type: Object,
|
|
59
|
+
default: () => ({})
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
fields: {
|
|
63
|
+
type: Object,
|
|
64
|
+
default: () => ({})
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
file: {
|
|
68
|
+
type: Object,
|
|
69
|
+
default: () => ({})
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
fileKey: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: ''
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
formGeneratorProps: {
|
|
78
|
+
type: Object,
|
|
79
|
+
default: () => ({})
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
galleryCardProps: {
|
|
83
|
+
type: Object,
|
|
84
|
+
default: () => ({})
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
gridGeneratorProps: {
|
|
88
|
+
type: Object,
|
|
89
|
+
default: () => ({})
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
savedFiles: {
|
|
93
|
+
type: Object,
|
|
94
|
+
default: () => ({})
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
useDownload: {
|
|
98
|
+
type: Boolean
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
useMultiple: {
|
|
102
|
+
type: Boolean
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
useObjectModel: {
|
|
106
|
+
type: Boolean
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
emits: ['update-model', 'remove'],
|
|
111
|
+
|
|
112
|
+
data () {
|
|
113
|
+
return {
|
|
114
|
+
dialogValues: {},
|
|
115
|
+
showDialog: false
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
computed: {
|
|
120
|
+
dialogFormGeneratorProps () {
|
|
121
|
+
const { modelValue, 'onUpdate:modelValue': _, ...props } = this.defaultFormGeneratorProps
|
|
122
|
+
|
|
123
|
+
return props
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
defaultFormGeneratorProps () {
|
|
127
|
+
return {
|
|
128
|
+
modelValue: this.currentModelValue,
|
|
129
|
+
disable: this.hasError,
|
|
130
|
+
columns: this.getDefaultColumns(this.formFields),
|
|
131
|
+
|
|
132
|
+
'onUpdate:modelValue': this.updateModel,
|
|
133
|
+
|
|
134
|
+
...this.defaultGeneratorProps,
|
|
135
|
+
...this.formGeneratorProps
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
defaultGalleryCardProps () {
|
|
140
|
+
const { list, buttonProps, ...actionsMenuProps } = this.galleryCardProps.actionsMenuProps || {}
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
...this.galleryCardProps,
|
|
144
|
+
disable: this.hasError,
|
|
145
|
+
|
|
146
|
+
actionsMenuProps: {
|
|
147
|
+
buttonProps: {
|
|
148
|
+
disable: false,
|
|
149
|
+
...buttonProps
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
...actionsMenuProps,
|
|
153
|
+
|
|
154
|
+
list: {
|
|
155
|
+
...(
|
|
156
|
+
this.hasEditButton &&
|
|
157
|
+
{
|
|
158
|
+
edit: {
|
|
159
|
+
label: 'Editar',
|
|
160
|
+
icon: 'sym_r_edit',
|
|
161
|
+
|
|
162
|
+
// callback
|
|
163
|
+
handler: () => {
|
|
164
|
+
this.dialogValues = { ...this.currentModelValue }
|
|
165
|
+
this.toggleDialog()
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
|
|
171
|
+
...(
|
|
172
|
+
this.hasDownloadButton &&
|
|
173
|
+
{
|
|
174
|
+
download: {
|
|
175
|
+
label: 'Baixar arquivo',
|
|
176
|
+
icon: 'sym_r_download',
|
|
177
|
+
|
|
178
|
+
// callback
|
|
179
|
+
handler: () => downloadFile(this.normalizedModelValue)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
|
|
184
|
+
destroy: {
|
|
185
|
+
label: 'Excluir',
|
|
186
|
+
color: 'grey-9',
|
|
187
|
+
icon: 'sym_r_delete',
|
|
188
|
+
|
|
189
|
+
// callback
|
|
190
|
+
handler: () => this.$emit('remove')
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
...list
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
card: this.normalizedModelValue
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
defaultGeneratorProps () {
|
|
202
|
+
return {
|
|
203
|
+
fields: this.fields,
|
|
204
|
+
gutter: 'md'
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
defaultGridGeneratorProps () {
|
|
209
|
+
return {
|
|
210
|
+
useEmptyResult: false,
|
|
211
|
+
result: this.currentModelValue,
|
|
212
|
+
columns: this.getDefaultColumns(this.gridFields),
|
|
213
|
+
|
|
214
|
+
...this.defaultGeneratorProps,
|
|
215
|
+
...this.gridGeneratorProps
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
errorClasses () {
|
|
220
|
+
return [
|
|
221
|
+
'bg-grey-4',
|
|
222
|
+
'flex',
|
|
223
|
+
'full-height',
|
|
224
|
+
'full-width',
|
|
225
|
+
'items-center',
|
|
226
|
+
'justify-center',
|
|
227
|
+
'text-grey-9',
|
|
228
|
+
'text-subtitle2'
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
fileName () {
|
|
233
|
+
return this.url.split('/').pop()
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
fileType () {
|
|
237
|
+
return this.fileName.split('.').pop()
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
formFields () {
|
|
241
|
+
return this.formGeneratorProps.fields
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
gridFields () {
|
|
245
|
+
return this.gridGeneratorProps.fields
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
hasDownloadButton () {
|
|
249
|
+
return this.useDownload && !this.hasError
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
hasEditButton () {
|
|
253
|
+
return this.isGalleryMode && this.useObjectModel && this.hasFormFields
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
hasError () {
|
|
257
|
+
return this.file.isFailed
|
|
258
|
+
},
|
|
259
|
+
|
|
260
|
+
hasFormFields () {
|
|
261
|
+
const { fields } = this.defaultFormGeneratorProps
|
|
262
|
+
return !!Object.keys(fields).length
|
|
263
|
+
},
|
|
264
|
+
|
|
265
|
+
hasFormGenerator () {
|
|
266
|
+
const { fields } = this.defaultFormGeneratorProps
|
|
267
|
+
|
|
268
|
+
return !!Object.keys(fields).length && !this.isGalleryMode
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
hasGenerator () {
|
|
272
|
+
if (!this.useObjectModel) return false
|
|
273
|
+
|
|
274
|
+
return (this.hasGridGenerator) || this.hasFormGenerator
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
hasGridGenerator () {
|
|
278
|
+
const { fields } = this.defaultGridGeneratorProps
|
|
279
|
+
const hasFields = !!Object.keys(fields).length
|
|
280
|
+
|
|
281
|
+
if (!this.hasFormFields && hasFields) return true
|
|
282
|
+
|
|
283
|
+
return this.isGalleryMode && hasFields && !this.hasError
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
isGalleryMode () {
|
|
287
|
+
return (!('isUploaded' in this.file) || this.savedFiles[this.fileKey])
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
normalizedModelValue () {
|
|
291
|
+
return this.useObjectModel && !this.hasError ? this.currentModelValue : this.file
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
url () {
|
|
295
|
+
return this.defaultGalleryCardProps?.card?.url
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
|
|
299
|
+
methods: {
|
|
300
|
+
getDefaultColumns (fields) {
|
|
301
|
+
fields ??= this.fields
|
|
302
|
+
|
|
303
|
+
const columns = {}
|
|
304
|
+
|
|
305
|
+
for (const key in fields) {
|
|
306
|
+
columns[key] = { col: 12 }
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return columns
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
getFileName (value) {
|
|
313
|
+
return value.split('/').pop()
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
onValidate (isValid) {
|
|
317
|
+
if (!isValid) return
|
|
318
|
+
|
|
319
|
+
this.toggleDialog()
|
|
320
|
+
this.updateModel(this.dialogValues)
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
toggleDialog () {
|
|
324
|
+
this.showDialog = !this.showDialog
|
|
325
|
+
},
|
|
326
|
+
|
|
327
|
+
updateModel (value) {
|
|
328
|
+
this.$emit('update-model', value)
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Webkit browsers
|
|
2
|
+
::-webkit-scrollbar {
|
|
3
|
+
background: var(--qas-scrollbar-background);
|
|
4
|
+
border-radius: var(--qas-scrollbar-border-radius);
|
|
5
|
+
height: var(--qas-scrollbar-size);
|
|
6
|
+
width: var(--qas-scrollbar-size);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
::-webkit-scrollbar-thumb {
|
|
10
|
+
background: var(--qas-scrollbar-thumb-background);
|
|
11
|
+
background-clip: padding-box;
|
|
12
|
+
border: 1px solid rgba(0%, 0%, 0%, 0%);
|
|
13
|
+
border-radius: var(--qas-scrollbar-border-radius);
|
|
14
|
+
transition: background-color var(--qas-generic-transition);
|
|
15
|
+
width: var(--qas-scrollbar-size);
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
background: var(--qas-scrollbar-thumb-background-hover);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--qas-scrollbar-size: 9px;
|
|
3
|
+
--qas-scrollbar-background: #E0E0E0;
|
|
4
|
+
--qas-scrollbar-thumb-background: var(--q-primary);
|
|
5
|
+
--qas-scrollbar-thumb-background-hover: var(--q-primary-contrast);
|
|
6
|
+
--qas-scrollbar-border-radius: calc(var(--qas-generic-border-radius) * 2);
|
|
7
|
+
|
|
8
|
+
// Firefox support
|
|
9
|
+
scrollbar-color: var(--qas-scrollbar-thumb-background) var(--qas-scrollbar-background);
|
|
10
|
+
scrollbar-width: thin;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Faz o download de um arquivo a partir de uma URL com um nome de arquivo especificado.
|
|
3
|
+
* @param {Object} options As opções de download.
|
|
4
|
+
* @param {string} options.url A URL do arquivo a ser baixado.
|
|
5
|
+
* @param {string} options.fileName O nome do arquivo a ser salvo no disco local.
|
|
6
|
+
* @returns {void}
|
|
7
|
+
*/
|
|
8
|
+
export default ({ url, name }) => {
|
|
9
|
+
const link = document.createElement('a')
|
|
10
|
+
|
|
11
|
+
link.download = name
|
|
12
|
+
link.href = url
|
|
13
|
+
link.style.display = 'none'
|
|
14
|
+
|
|
15
|
+
link.setAttribute('target', '_blank')
|
|
16
|
+
document.body.appendChild(link)
|
|
17
|
+
|
|
18
|
+
link.click()
|
|
19
|
+
|
|
20
|
+
document.body.removeChild(link)
|
|
21
|
+
}
|
package/src/helpers/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
export { default as addCounterSuffix } from './add-counter-suffix.js'
|
|
2
|
-
export { default as getSlotChildrenText } from './get-slot-children-text.js'
|
|
3
|
-
export { default as setScrollOnGrab } from './set-scroll-on-grab.js'
|
|
4
|
-
export { default as isLocalDevelopment } from './is-local-development.js'
|
|
5
2
|
export { default as base64ToBlob } from './base-64-to-blob.js'
|
|
3
|
+
export { default as camelizeFieldsName } from './camelize-fields-name.js'
|
|
6
4
|
export { default as constructObject } from './construct-object.js'
|
|
5
|
+
export { default as copyToClipboard } from './copy-to-clipboard.js'
|
|
6
|
+
export { default as destroyNestedChildrenByKey } from './destroy-nested-children-by-key.js'
|
|
7
|
+
export { default as downloadFile } from './download-file.js'
|
|
8
|
+
export { default as filterListByHandle } from './filter-list-by-handle.js'
|
|
7
9
|
export { default as filterObject } from './filter-object.js'
|
|
8
|
-
export { default as getGreatestCommonDivisor } from './get-greatest-common-divisor.js'
|
|
9
10
|
export { default as filterObjectToArray } from './filter-object-to-array.js'
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
11
|
+
export { default as findChildrenByKey } from './find-children-by-key.js'
|
|
12
|
+
export { default as getGreatestCommonDivisor } from './get-greatest-common-divisor.js'
|
|
12
13
|
export { default as getNormalizedOptions } from './get-normalized-options.js'
|
|
14
|
+
export { default as getSlotChildrenText } from './get-slot-children-text.js'
|
|
13
15
|
export { default as handleProcess } from './handle-process.js'
|
|
14
|
-
export { default as
|
|
16
|
+
export { default as isLocalDevelopment } from './is-local-development.js'
|
|
15
17
|
export { default as promiseHandler } from './promise-handler.js'
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as copyToClipboard } from './copy-to-clipboard.js'
|
|
18
|
+
export { default as setScrollOnGrab } from './set-scroll-on-grab.js'
|
|
18
19
|
|
|
19
20
|
export * from './filters.js'
|
|
20
21
|
export * from './images.js'
|
package/src/vue-plugin.js
CHANGED
|
@@ -23,6 +23,7 @@ import QasFilters from './components/filters/QasFilters.vue'
|
|
|
23
23
|
import QasFormGenerator from './components/form-generator/QasFormGenerator.vue'
|
|
24
24
|
import QasFormView from './components/form-view/QasFormView.vue'
|
|
25
25
|
import QasGallery from './components/gallery/QasGallery.vue'
|
|
26
|
+
import QasGalleryCard from './components/gallery-card/QasGalleryCard.vue'
|
|
26
27
|
import QasGridGenerator from './components/grid-generator/QasGridGenerator.vue'
|
|
27
28
|
import QasHeaderActions from './components/header-actions/QasHeaderActions.vue'
|
|
28
29
|
import QasInput from './components/input/QasInput.vue'
|
|
@@ -102,6 +103,7 @@ function install (app) {
|
|
|
102
103
|
app.component('QasFormGenerator', QasFormGenerator)
|
|
103
104
|
app.component('QasFormView', QasFormView)
|
|
104
105
|
app.component('QasGallery', QasGallery)
|
|
106
|
+
app.component('QasGalleryCard', QasGalleryCard)
|
|
105
107
|
app.component('QasGridGenerator', QasGridGenerator)
|
|
106
108
|
app.component('QasHeaderActions', QasHeaderActions)
|
|
107
109
|
app.component('QasInput', QasInput)
|
|
@@ -182,6 +184,7 @@ export {
|
|
|
182
184
|
QasFormGenerator,
|
|
183
185
|
QasFormView,
|
|
184
186
|
QasGallery,
|
|
187
|
+
QasGalleryCard,
|
|
185
188
|
QasGridGenerator,
|
|
186
189
|
QasHeaderActions,
|
|
187
190
|
QasInput,
|