@adminforth/quick-filters 1.2.0 → 1.2.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/build.log CHANGED
@@ -7,5 +7,5 @@ custom/
7
7
  custom/FiltersArea.vue
8
8
  custom/tsconfig.json
9
9
 
10
- sent 12,833 bytes received 58 bytes 25,782.00 bytes/sec
11
- total size is 12,621 speedup is 0.98
10
+ sent 13,013 bytes received 58 bytes 26,142.00 bytes/sec
11
+ total size is 12,798 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>
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>
9
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-4 w-full">
10
12
  <div class="flex flex-col" v-for="c in columnsWithFilter" :key="c">
11
13
  <div class="min-w-48">
12
14
  <p class="dark:text-gray-400">{{ 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"
@@ -33,6 +36,7 @@
33
36
  </template>
34
37
  </Select>
35
38
  <Select
39
+ :teleportToBody="true"
36
40
  :multiple="c.filterOptions.multiselect"
37
41
  class="w-full"
38
42
  v-else-if="c.type === 'boolean'"
@@ -49,6 +53,7 @@
49
53
  />
50
54
 
51
55
  <Select
56
+ :teleportToBody="true"
52
57
  :multiple="c.filterOptions.multiselect"
53
58
  class="w-full"
54
59
  v-else-if="c.enum"
@@ -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>
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>
9
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-4 w-full">
10
12
  <div class="flex flex-col" v-for="c in columnsWithFilter" :key="c">
11
13
  <div class="min-w-48">
12
14
  <p class="dark:text-gray-400">{{ 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"
@@ -33,6 +36,7 @@
33
36
  </template>
34
37
  </Select>
35
38
  <Select
39
+ :teleportToBody="true"
36
40
  :multiple="c.filterOptions.multiselect"
37
41
  class="w-full"
38
42
  v-else-if="c.type === 'boolean'"
@@ -49,6 +53,7 @@
49
53
  />
50
54
 
51
55
  <Select
56
+ :teleportToBody="true"
52
57
  :multiple="c.filterOptions.multiselect"
53
58
  class="w-full"
54
59
  v-else-if="c.enum"
package/dist/index.js CHANGED
@@ -45,6 +45,6 @@ export default class extends AdminForthPlugin {
45
45
  instanceUniqueRepresentation(pluginOptions) {
46
46
  // optional method to return unique string representation of plugin instance.
47
47
  // Needed if plugin can have multiple instances on one resource
48
- return `single`;
48
+ return `${this.resourceConfig.resourceId}-quick-filters`;
49
49
  }
50
50
  }
package/index.ts CHANGED
@@ -42,7 +42,7 @@ export default class extends AdminForthPlugin {
42
42
  instanceUniqueRepresentation(pluginOptions: any) : string {
43
43
  // optional method to return unique string representation of plugin instance.
44
44
  // Needed if plugin can have multiple instances on one resource
45
- return `single`;
45
+ return `${this.resourceConfig.resourceId}-quick-filters`;
46
46
  }
47
47
 
48
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/quick-filters",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",