@bildvitta/quasar-ui-asteroid 3.10.0-beta.1 → 3.10.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
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<script>
|
|
41
41
|
import PvFiltersButton from './private/PvFiltersButton.vue'
|
|
42
42
|
|
|
43
|
-
import { camelize, camelizeKeys } from 'humps'
|
|
43
|
+
import { camelize, camelizeKeys, decamelize } from 'humps'
|
|
44
44
|
import { humanize, parseValue } from '../../helpers/filters.js'
|
|
45
45
|
import contextMixin from '../../mixins/context.js'
|
|
46
46
|
import { getState, getAction } from '@bildvitta/store-adapter'
|
|
@@ -137,8 +137,10 @@ export default {
|
|
|
137
137
|
const hasField = fields.includes(key)
|
|
138
138
|
|
|
139
139
|
if (hasField) {
|
|
140
|
-
const
|
|
141
|
-
|
|
140
|
+
const field = { ...this.fields[key], ...this.formattedFieldsProps?.[key] }
|
|
141
|
+
|
|
142
|
+
const value = humanize(field, this.normalizeValues(filters[key], field?.multiple))
|
|
143
|
+
const { label, name } = field
|
|
142
144
|
|
|
143
145
|
activeFilters[key] = { label, name, value }
|
|
144
146
|
}
|
|
@@ -147,6 +149,18 @@ export default {
|
|
|
147
149
|
return activeFilters
|
|
148
150
|
},
|
|
149
151
|
|
|
152
|
+
formattedFieldsProps () {
|
|
153
|
+
const fieldsProps = {}
|
|
154
|
+
|
|
155
|
+
for (const key in this.fieldsProps) {
|
|
156
|
+
const decamelizedFieldKey = decamelize(key)
|
|
157
|
+
|
|
158
|
+
fieldsProps[decamelizedFieldKey] = { ...this.fieldsProps[key] }
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return fieldsProps
|
|
162
|
+
},
|
|
163
|
+
|
|
150
164
|
fields () {
|
|
151
165
|
return getState.call(this, { entity: this.entity, key: 'filters' })
|
|
152
166
|
},
|
|
@@ -166,7 +180,7 @@ export default {
|
|
|
166
180
|
color: this.filterButtonColor,
|
|
167
181
|
error: this.hasFetchError,
|
|
168
182
|
fields: this.fields,
|
|
169
|
-
fieldsProps: this.
|
|
183
|
+
fieldsProps: this.formattedFieldsProps,
|
|
170
184
|
loading: this.isFetching,
|
|
171
185
|
|
|
172
186
|
onClear: this.clearFilters,
|
|
@@ -216,7 +230,8 @@ export default {
|
|
|
216
230
|
|
|
217
231
|
methods: {
|
|
218
232
|
clearFilters () {
|
|
219
|
-
const { filters
|
|
233
|
+
const { filters } = this.mx_context
|
|
234
|
+
const query = { ...this.$route.query }
|
|
220
235
|
const activeFilters = {
|
|
221
236
|
...filters,
|
|
222
237
|
...this.filters
|
|
@@ -298,6 +313,10 @@ export default {
|
|
|
298
313
|
search: this.search || undefined
|
|
299
314
|
}
|
|
300
315
|
|
|
316
|
+
for (const key in query) {
|
|
317
|
+
if (!query[key]) delete query[key]
|
|
318
|
+
}
|
|
319
|
+
|
|
301
320
|
this.hideFiltersMenu()
|
|
302
321
|
this.updateCurrentFilters()
|
|
303
322
|
this.updateRouteQuery(query)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// headings
|
|
11
11
|
$h1: (
|
|
12
12
|
size: 3rem,
|
|
13
|
-
line-height:
|
|
13
|
+
line-height: 140%,
|
|
14
14
|
letter-spacing: 0,
|
|
15
15
|
weight: 800,
|
|
16
16
|
margin: 0
|
|
@@ -18,7 +18,7 @@ $h1: (
|
|
|
18
18
|
|
|
19
19
|
$h2: (
|
|
20
20
|
size: 2rem,
|
|
21
|
-
line-height:
|
|
21
|
+
line-height: 140%,
|
|
22
22
|
letter-spacing: 0,
|
|
23
23
|
weight: 700,
|
|
24
24
|
margin: 0
|
|
@@ -26,7 +26,7 @@ $h2: (
|
|
|
26
26
|
|
|
27
27
|
$h3: (
|
|
28
28
|
size: 1.5rem,
|
|
29
|
-
line-height:
|
|
29
|
+
line-height: 140%,
|
|
30
30
|
letter-spacing: 0,
|
|
31
31
|
weight: 700,
|
|
32
32
|
margin: 0
|
|
@@ -34,7 +34,7 @@ $h3: (
|
|
|
34
34
|
|
|
35
35
|
$h4: (
|
|
36
36
|
size: 1.125rem,
|
|
37
|
-
line-height:
|
|
37
|
+
line-height: 140%,
|
|
38
38
|
letter-spacing: 0,
|
|
39
39
|
weight: 600,
|
|
40
40
|
margin: 0
|
|
@@ -42,7 +42,7 @@ $h4: (
|
|
|
42
42
|
|
|
43
43
|
$h5: (
|
|
44
44
|
size: 1rem,
|
|
45
|
-
line-height:
|
|
45
|
+
line-height: 140%,
|
|
46
46
|
letter-spacing: 0,
|
|
47
47
|
weight: 600,
|
|
48
48
|
margin: 0
|
|
@@ -50,7 +50,7 @@ $h5: (
|
|
|
50
50
|
|
|
51
51
|
$h6: (
|
|
52
52
|
size: 0.875rem,
|
|
53
|
-
line-height:
|
|
53
|
+
line-height: 140%,
|
|
54
54
|
letter-spacing: 0,
|
|
55
55
|
weight: 600,
|
|
56
56
|
margin: 0
|
|
@@ -59,14 +59,14 @@ $h6: (
|
|
|
59
59
|
// subtitles
|
|
60
60
|
$subtitle1: (
|
|
61
61
|
size: 1rem,
|
|
62
|
-
line-height:
|
|
62
|
+
line-height: 140%,
|
|
63
63
|
letter-spacing: 0,
|
|
64
64
|
weight: 600
|
|
65
65
|
);
|
|
66
66
|
|
|
67
67
|
$subtitle2: (
|
|
68
68
|
size: 0.875rem,
|
|
69
|
-
line-height:
|
|
69
|
+
line-height: 140%,
|
|
70
70
|
letter-spacing: 0,
|
|
71
71
|
weight: 600
|
|
72
72
|
);
|
|
@@ -74,14 +74,14 @@ $subtitle2: (
|
|
|
74
74
|
// body
|
|
75
75
|
$body1: (
|
|
76
76
|
size: 1rem,
|
|
77
|
-
line-height:
|
|
77
|
+
line-height: 140%,
|
|
78
78
|
letter-spacing: 0,
|
|
79
79
|
weight: 400
|
|
80
80
|
);
|
|
81
81
|
|
|
82
82
|
$body2: (
|
|
83
83
|
size: 0.875rem,
|
|
84
|
-
line-height:
|
|
84
|
+
line-height: 140%,
|
|
85
85
|
letter-spacing: 0,
|
|
86
86
|
weight: 400
|
|
87
87
|
);
|
|
@@ -89,7 +89,7 @@ $body2: (
|
|
|
89
89
|
// overline
|
|
90
90
|
$overline: (
|
|
91
91
|
size: 0.875rem,
|
|
92
|
-
line-height:
|
|
92
|
+
line-height: 140%,
|
|
93
93
|
letter-spacing: 0.25rem,
|
|
94
94
|
weight: 600
|
|
95
95
|
);
|
|
@@ -97,7 +97,7 @@ $overline: (
|
|
|
97
97
|
// caption
|
|
98
98
|
$caption: (
|
|
99
99
|
size: 0.75rem,
|
|
100
|
-
line-height:
|
|
100
|
+
line-height: 140%,
|
|
101
101
|
letter-spacing: 0,
|
|
102
102
|
weight: 400
|
|
103
103
|
);
|