@adminforth/quick-filters 1.2.1 → 1.2.3
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/build.log +2 -2
- package/custom/FiltersArea.vue +16 -8
- package/dist/custom/FiltersArea.vue +16 -8
- package/package.json +1 -1
package/build.log
CHANGED
package/custom/FiltersArea.vue
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="columnsWithFilter && columnsWithFilter.length > 0" class="flex flex-col w-full p-4 mb-4 rounded-lg border border-gray-100 dark:border-gray-700 shadow-sm dark:shadow-lg text-gray-900 dark:text-white">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
<div class ="flex justify-end items-center">
|
|
4
|
+
<p
|
|
5
|
+
class="hover:underline cursor-pointer text-blue-700 dark:text-blue-500 text-end"
|
|
6
|
+
@click="isExpanded = !isExpanded"
|
|
7
|
+
>
|
|
8
|
+
{{ isExpanded ? 'Hide filters' : 'Show filters' }}
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
<div v-if="isExpanded" class="md:grid md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-6 gap-2 w-full">
|
|
10
12
|
<div class="flex flex-col" v-for="c in columnsWithFilter" :key="c">
|
|
11
13
|
<div class="min-w-48">
|
|
12
|
-
<p class="dark:text-gray-400">{{ c.label }}</p>
|
|
14
|
+
<p class="dark:text-gray-400 text-sm">{{ c.label }}</p>
|
|
13
15
|
<Select
|
|
16
|
+
:teleportToBody="true"
|
|
14
17
|
v-if="c.foreignResource"
|
|
15
18
|
:multiple="c.filterOptions.multiselect"
|
|
16
19
|
class="w-full"
|
|
@@ -24,6 +27,7 @@
|
|
|
24
27
|
}"
|
|
25
28
|
@update:modelValue="onFilterInput[c.name]({ column: c, operator: c.filterOptions.multiselect ? 'in' : 'eq', value: c.filterOptions.multiselect ? ($event.length ? $event : undefined) : $event || undefined })"
|
|
26
29
|
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value || (c.filterOptions.multiselect ? [] : '')"
|
|
30
|
+
:teleportToTop="true"
|
|
27
31
|
>
|
|
28
32
|
<template #extra-item v-if="columnLoadingState[c.name]?.loading">
|
|
29
33
|
<div class="text-center text-gray-400 dark:text-gray-300 py-2 flex items-center justify-center gap-2">
|
|
@@ -33,6 +37,7 @@
|
|
|
33
37
|
</template>
|
|
34
38
|
</Select>
|
|
35
39
|
<Select
|
|
40
|
+
:teleportToBody="true"
|
|
36
41
|
:multiple="c.filterOptions.multiselect"
|
|
37
42
|
class="w-full"
|
|
38
43
|
v-else-if="c.type === 'boolean'"
|
|
@@ -46,15 +51,18 @@
|
|
|
46
51
|
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value !== undefined
|
|
47
52
|
? filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value
|
|
48
53
|
: (c.filterOptions.multiselect ? [] : '')"
|
|
54
|
+
:teleportToTop="true"
|
|
49
55
|
/>
|
|
50
56
|
|
|
51
57
|
<Select
|
|
58
|
+
:teleportToBody="true"
|
|
52
59
|
:multiple="c.filterOptions.multiselect"
|
|
53
60
|
class="w-full"
|
|
54
61
|
v-else-if="c.enum"
|
|
55
62
|
:options="c.enum"
|
|
56
63
|
@update:modelValue="onFilterInput[c.name]({ column: c, operator: c.filterOptions.multiselect ? 'in' : 'eq', value: c.filterOptions.multiselect ? ($event.length ? $event : undefined) : $event || undefined })"
|
|
57
64
|
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value || (c.filterOptions.multiselect ? [] : '')"
|
|
65
|
+
:teleportToTop="true"
|
|
58
66
|
/>
|
|
59
67
|
|
|
60
68
|
<Input
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="columnsWithFilter && columnsWithFilter.length > 0" class="flex flex-col w-full p-4 mb-4 rounded-lg border border-gray-100 dark:border-gray-700 shadow-sm dark:shadow-lg text-gray-900 dark:text-white">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
<div class ="flex justify-end items-center">
|
|
4
|
+
<p
|
|
5
|
+
class="hover:underline cursor-pointer text-blue-700 dark:text-blue-500 text-end"
|
|
6
|
+
@click="isExpanded = !isExpanded"
|
|
7
|
+
>
|
|
8
|
+
{{ isExpanded ? 'Hide filters' : 'Show filters' }}
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
<div v-if="isExpanded" class="md:grid md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-6 gap-2 w-full">
|
|
10
12
|
<div class="flex flex-col" v-for="c in columnsWithFilter" :key="c">
|
|
11
13
|
<div class="min-w-48">
|
|
12
|
-
<p class="dark:text-gray-400">{{ c.label }}</p>
|
|
14
|
+
<p class="dark:text-gray-400 text-sm">{{ c.label }}</p>
|
|
13
15
|
<Select
|
|
16
|
+
:teleportToBody="true"
|
|
14
17
|
v-if="c.foreignResource"
|
|
15
18
|
:multiple="c.filterOptions.multiselect"
|
|
16
19
|
class="w-full"
|
|
@@ -24,6 +27,7 @@
|
|
|
24
27
|
}"
|
|
25
28
|
@update:modelValue="onFilterInput[c.name]({ column: c, operator: c.filterOptions.multiselect ? 'in' : 'eq', value: c.filterOptions.multiselect ? ($event.length ? $event : undefined) : $event || undefined })"
|
|
26
29
|
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value || (c.filterOptions.multiselect ? [] : '')"
|
|
30
|
+
:teleportToTop="true"
|
|
27
31
|
>
|
|
28
32
|
<template #extra-item v-if="columnLoadingState[c.name]?.loading">
|
|
29
33
|
<div class="text-center text-gray-400 dark:text-gray-300 py-2 flex items-center justify-center gap-2">
|
|
@@ -33,6 +37,7 @@
|
|
|
33
37
|
</template>
|
|
34
38
|
</Select>
|
|
35
39
|
<Select
|
|
40
|
+
:teleportToBody="true"
|
|
36
41
|
:multiple="c.filterOptions.multiselect"
|
|
37
42
|
class="w-full"
|
|
38
43
|
v-else-if="c.type === 'boolean'"
|
|
@@ -46,15 +51,18 @@
|
|
|
46
51
|
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value !== undefined
|
|
47
52
|
? filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value
|
|
48
53
|
: (c.filterOptions.multiselect ? [] : '')"
|
|
54
|
+
:teleportToTop="true"
|
|
49
55
|
/>
|
|
50
56
|
|
|
51
57
|
<Select
|
|
58
|
+
:teleportToBody="true"
|
|
52
59
|
:multiple="c.filterOptions.multiselect"
|
|
53
60
|
class="w-full"
|
|
54
61
|
v-else-if="c.enum"
|
|
55
62
|
:options="c.enum"
|
|
56
63
|
@update:modelValue="onFilterInput[c.name]({ column: c, operator: c.filterOptions.multiselect ? 'in' : 'eq', value: c.filterOptions.multiselect ? ($event.length ? $event : undefined) : $event || undefined })"
|
|
57
64
|
:modelValue="filtersStore.filters.find(f => f.field === c.name && f.operator === (c.filterOptions.multiselect ? 'in' : 'eq'))?.value || (c.filterOptions.multiselect ? [] : '')"
|
|
65
|
+
:teleportToTop="true"
|
|
58
66
|
/>
|
|
59
67
|
|
|
60
68
|
<Input
|