@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 CHANGED
@@ -7,5 +7,5 @@ custom/
7
7
  custom/FiltersArea.vue
8
8
  custom/tsconfig.json
9
9
 
10
- sent 12,836 bytes received 58 bytes 25,788.00 bytes/sec
11
- total size is 12,621 speedup is 0.98
10
+ sent 13,120 bytes received 58 bytes 26,356.00 bytes/sec
11
+ total size is 12,908 speedup is 0.98
@@ -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
- <p
4
- class="hover:underline cursor-pointer text-blue-700 dark:text-blue-500 text-end"
5
- @click="isExpanded = !isExpanded"
6
- >
7
- {{ isExpanded ? 'Hide filters' : 'Show filters' }}
8
- </p>
9
- <div v-if="isExpanded" class="md:grid md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-6 gap-4 w-full">
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
- <p
4
- class="hover:underline cursor-pointer text-blue-700 dark:text-blue-500 text-end"
5
- @click="isExpanded = !isExpanded"
6
- >
7
- {{ isExpanded ? 'Hide filters' : 'Show filters' }}
8
- </p>
9
- <div v-if="isExpanded" class="md:grid md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-6 gap-4 w-full">
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/quick-filters",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",