@enso-ui/filters 3.0.18 → 3.0.19
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": "@enso-ui/filters",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.19",
|
|
4
4
|
"description": "Renderless Vue Filter Components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@enso-ui/switch": "^2.0",
|
|
31
31
|
"@enso-ui/transitions": "^2.0",
|
|
32
32
|
"@fortawesome/fontawesome-svg-core": "^1.2.2",
|
|
33
|
-
"@fortawesome/free-solid-svg-icons": "^5.2
|
|
33
|
+
"@fortawesome/free-solid-svg-icons": "^5.11.2",
|
|
34
34
|
"@fortawesome/vue-fontawesome": "3.0.0-5",
|
|
35
35
|
"bulma": "^0.9.0",
|
|
36
36
|
"date-fns": "^2.0.0",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
compareAsc, format, addDays, startOfDay, endOfDay, addWeeks,
|
|
4
4
|
startOfWeek, endOfWeek, addMonths, startOfMonth, endOfMonth,
|
|
5
|
-
addYears, startOfYear, endOfYear, parse
|
|
5
|
+
addYears, startOfYear, endOfYear, parse,
|
|
6
6
|
} from 'date-fns';
|
|
7
7
|
import { lcwords } from '@enso-ui/strings';
|
|
8
8
|
import {
|
|
@@ -115,33 +115,33 @@ export default {
|
|
|
115
115
|
methods: {
|
|
116
116
|
update(filter = this.filter) {
|
|
117
117
|
switch (filter) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
118
|
+
case Intervals.today:
|
|
119
|
+
case Intervals.yesterday:
|
|
120
|
+
case Intervals.tomorrow:
|
|
121
|
+
this.daily();
|
|
122
|
+
break;
|
|
123
|
+
case Intervals.lastWeek:
|
|
124
|
+
case Intervals.thisWeek:
|
|
125
|
+
case Intervals.nextWeek:
|
|
126
|
+
this.weekly();
|
|
127
|
+
break;
|
|
128
|
+
case Intervals.lastMonth:
|
|
129
|
+
case Intervals.thisMonth:
|
|
130
|
+
case Intervals.nextMonth:
|
|
131
|
+
this.monthly();
|
|
132
|
+
break;
|
|
133
|
+
case Intervals.lastYear:
|
|
134
|
+
case Intervals.thisYear:
|
|
135
|
+
case Intervals.nextYear:
|
|
136
|
+
this.yearly();
|
|
137
|
+
break;
|
|
138
|
+
case Intervals.all:
|
|
139
|
+
this.all();
|
|
140
|
+
break;
|
|
141
|
+
case Intervals.custom:
|
|
142
|
+
break;
|
|
143
|
+
default:
|
|
144
|
+
throw Error('Unknown Interval');
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
label(option) {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export default {
|
|
3
3
|
name: 'CoreInputFilter',
|
|
4
4
|
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
|
|
5
7
|
props: {
|
|
6
8
|
modelValue: {
|
|
7
9
|
type: String,
|
|
@@ -15,8 +17,6 @@ export default {
|
|
|
15
17
|
|
|
16
18
|
emits: ['update:modelValue'],
|
|
17
19
|
|
|
18
|
-
inheritAttrs: false,
|
|
19
|
-
|
|
20
20
|
render() {
|
|
21
21
|
return this.$slots.default({
|
|
22
22
|
modelValue: this.modelValue,
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export default {
|
|
3
3
|
name: 'CoreIntervalFilter',
|
|
4
4
|
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
|
|
5
7
|
props: {
|
|
6
8
|
modelValue: {
|
|
7
9
|
type: Object,
|
|
@@ -20,14 +22,13 @@ export default {
|
|
|
20
22
|
|
|
21
23
|
emits: ['change', 'update:modelValue'],
|
|
22
24
|
|
|
23
|
-
inheritAttrs: false,
|
|
24
|
-
|
|
25
25
|
computed: {
|
|
26
26
|
invalid() {
|
|
27
27
|
return ![null, ''].includes(this.modelValue.min)
|
|
28
28
|
&& ![null, ''].includes(this.modelValue.max)
|
|
29
29
|
&& (this.type === 'number'
|
|
30
|
-
? Number.parseFloat(this.modelValue.min)
|
|
30
|
+
? Number.parseFloat(this.modelValue.min)
|
|
31
|
+
> Number.parseFloat(this.modelValue.max)
|
|
31
32
|
: this.modelValue.min > this.modelValue.max);
|
|
32
33
|
},
|
|
33
34
|
},
|