@bildvitta/quasar-ui-asteroid 2.23.0 → 2.24.0-beta.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bildvitta/quasar-ui-asteroid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.0-beta.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,52 +26,56 @@
|
|
|
26
26
|
"author": "Inovação Bild & Vitta <inova@bild.com.br>",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@babel/core": "^7.12
|
|
30
|
-
"@babel/eslint-parser": "^7.
|
|
31
|
-
"@babel/preset-env": "^7.
|
|
32
|
-
"@storybook/addon-actions": "^6.
|
|
29
|
+
"@babel/core": "^7.20.12",
|
|
30
|
+
"@babel/eslint-parser": "^7.19.1",
|
|
31
|
+
"@babel/preset-env": "^7.20.2",
|
|
32
|
+
"@storybook/addon-actions": "^6.5.16",
|
|
33
33
|
"@storybook/addon-console": "^1.2.3",
|
|
34
|
-
"@storybook/addon-essentials": "^6.
|
|
35
|
-
"@storybook/addon-links": "^6.
|
|
34
|
+
"@storybook/addon-essentials": "^6.5.16",
|
|
35
|
+
"@storybook/addon-links": "^6.5.16",
|
|
36
36
|
"@storybook/addon-postcss": "^2.0.0",
|
|
37
|
-
"@storybook/vue": "^6.
|
|
38
|
-
"@testing-library/jest-dom": "^5.
|
|
39
|
-
"@vue/test-utils": "^1.
|
|
40
|
-
"autoprefixer": "^10.
|
|
37
|
+
"@storybook/vue": "^6.5.16",
|
|
38
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
39
|
+
"@vue/test-utils": "^1.3.4",
|
|
40
|
+
"autoprefixer": "^10.4.13",
|
|
41
41
|
"babel-core": "^7.0.0-bridge.0",
|
|
42
42
|
"babel-jest": "^27.0.1",
|
|
43
|
-
"babel-loader": "^8.
|
|
44
|
-
"core-js": "^3.
|
|
43
|
+
"babel-loader": "^8.3.0",
|
|
44
|
+
"core-js": "^3.27.2",
|
|
45
45
|
"eslint": "^7.18.0",
|
|
46
46
|
"eslint-plugin-jest": "^24.1.3",
|
|
47
47
|
"eslint-plugin-vue": "^7.5.0",
|
|
48
|
-
"eslint-webpack-plugin": "^2.
|
|
48
|
+
"eslint-webpack-plugin": "^2.7.0",
|
|
49
49
|
"jest": "^27.0.3",
|
|
50
|
-
"postcss": "^8.
|
|
50
|
+
"postcss": "^8.4.21",
|
|
51
51
|
"react-is": "^17.0.1",
|
|
52
|
-
"sass": "^1.
|
|
53
|
-
"sass-loader": "^10.
|
|
52
|
+
"sass": "^1.58.0",
|
|
53
|
+
"sass-loader": "^10.4.1",
|
|
54
54
|
"standard": "^16.0.3",
|
|
55
55
|
"vue-jest": "^3.0.7",
|
|
56
|
-
"vue-loader": "^15.
|
|
57
|
-
"vue-template-compiler": "^2.
|
|
56
|
+
"vue-loader": "^15.10.1",
|
|
57
|
+
"vue-template-compiler": "^2.7.14"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@quasar/extras": "^1.
|
|
60
|
+
"@quasar/extras": "^1.15.10",
|
|
61
61
|
"autonumeric": "^4.6.0",
|
|
62
62
|
"axios": "^0.21.1",
|
|
63
|
-
"date-fns": "^2.
|
|
63
|
+
"date-fns": "^2.29.3",
|
|
64
64
|
"fuse.js": "^3.4.6",
|
|
65
65
|
"humps": "^2.0.1",
|
|
66
66
|
"lodash": "^4.17.21",
|
|
67
67
|
"pica": "^7.1.0",
|
|
68
|
-
"quasar": "^1.
|
|
68
|
+
"quasar": "^1.22.5",
|
|
69
69
|
"signature_pad": "^3.0.0-beta.4",
|
|
70
70
|
"sortablejs": "^1.12.0",
|
|
71
|
-
"vue-router": "^3.
|
|
71
|
+
"vue-router": "^3.6.5",
|
|
72
72
|
"vuex": "^3.6.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"vue": "^2.6.14"
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">= 10.18.1 <= 16",
|
|
79
|
+
"npm": ">= 6.13.4"
|
|
76
80
|
}
|
|
77
81
|
}
|
|
@@ -31,6 +31,14 @@ export default {
|
|
|
31
31
|
description: '[VuexStoreModule](https://github.com/bildvitta/vuex-store-module) entity.'
|
|
32
32
|
},
|
|
33
33
|
|
|
34
|
+
fieldsEvents: {
|
|
35
|
+
description: 'Defines each field events.'
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
fieldsProps: {
|
|
39
|
+
description: 'Defines each field props.'
|
|
40
|
+
},
|
|
41
|
+
|
|
34
42
|
noFilterButton: {
|
|
35
43
|
description: 'Hides filter button.'
|
|
36
44
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<q-form v-else class="q-gutter-y-md q-pa-md" @submit.prevent="filter()">
|
|
29
29
|
<div v-for="(field, index) in fields" :key="index">
|
|
30
|
-
<qas-field v-
|
|
30
|
+
<qas-field dense :field="field" :value="filters[field.name]" v-bind="fieldsProps[field.name]" v-on="fieldsEvents[field.name]" @input="emitter(field.name, $event)" />
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<div class="text-right">
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
<script>
|
|
52
52
|
import QasField from '../field/QasField'
|
|
53
53
|
|
|
54
|
+
import { isNil, isEmpty } from 'lodash'
|
|
54
55
|
import { camelize, camelizeKeys } from 'humps'
|
|
55
56
|
import { humanize, parseValue } from '../../helpers/filters'
|
|
56
57
|
import contextMixin from '../../mixins/context'
|
|
@@ -73,6 +74,16 @@ export default {
|
|
|
73
74
|
type: String
|
|
74
75
|
},
|
|
75
76
|
|
|
77
|
+
fieldsProps: {
|
|
78
|
+
default: () => ({}),
|
|
79
|
+
type: Object
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
fieldsEvents: {
|
|
83
|
+
default: () => ({}),
|
|
84
|
+
type: Object
|
|
85
|
+
},
|
|
86
|
+
|
|
76
87
|
noFilterButton: {
|
|
77
88
|
default: false,
|
|
78
89
|
type: Boolean
|
|
@@ -100,6 +111,11 @@ export default {
|
|
|
100
111
|
|
|
101
112
|
forceRefetch: {
|
|
102
113
|
type: Boolean
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
value: {
|
|
117
|
+
default: () => ({}),
|
|
118
|
+
type: Object
|
|
103
119
|
}
|
|
104
120
|
},
|
|
105
121
|
|
|
@@ -127,7 +143,9 @@ export default {
|
|
|
127
143
|
const hasField = fields.includes(key)
|
|
128
144
|
|
|
129
145
|
if (hasField) {
|
|
130
|
-
const
|
|
146
|
+
const field = { ...this.fields[key], ...this.fieldsProps?.[key] }
|
|
147
|
+
|
|
148
|
+
const value = humanize(field, this.normalizeValues(filters[key], this.fields[key]?.multiple))
|
|
131
149
|
const { label, name } = this.fields[key]
|
|
132
150
|
|
|
133
151
|
activeFilters[key] = { label, name, value }
|
|
@@ -184,10 +202,25 @@ export default {
|
|
|
184
202
|
this.updateValues()
|
|
185
203
|
},
|
|
186
204
|
|
|
205
|
+
'$route.query': {
|
|
206
|
+
immediate: true,
|
|
207
|
+
handler () {
|
|
208
|
+
this.$emit('input', this.context.filters)
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
|
|
187
212
|
search () {
|
|
188
213
|
if (this.debounce) {
|
|
189
214
|
this.filter()
|
|
190
215
|
}
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
value: {
|
|
219
|
+
immediate: true,
|
|
220
|
+
deep: true,
|
|
221
|
+
handler (value) {
|
|
222
|
+
this.filters = value
|
|
223
|
+
}
|
|
191
224
|
}
|
|
192
225
|
},
|
|
193
226
|
|
|
@@ -275,6 +308,11 @@ export default {
|
|
|
275
308
|
this.search = search || ''
|
|
276
309
|
|
|
277
310
|
for (const key in filters) {
|
|
311
|
+
if (isEmpty(filters[key]) || isNil(filters[key])) {
|
|
312
|
+
delete filters[key]
|
|
313
|
+
continue
|
|
314
|
+
}
|
|
315
|
+
|
|
278
316
|
this.$set(this.filters, key, parseValue(this.normalizeValues(filters[key], this.fields[key]?.multiple)))
|
|
279
317
|
}
|
|
280
318
|
},
|
|
@@ -292,6 +330,11 @@ export default {
|
|
|
292
330
|
watchOnce()
|
|
293
331
|
}
|
|
294
332
|
})
|
|
333
|
+
},
|
|
334
|
+
|
|
335
|
+
emitter (key, value) {
|
|
336
|
+
this.filters[key] = value
|
|
337
|
+
this.$emit('input', this.filters)
|
|
295
338
|
}
|
|
296
339
|
}
|
|
297
340
|
}
|