@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 +2 -2
- package/custom/FiltersArea.vue +11 -6
- package/dist/custom/FiltersArea.vue +11 -6
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- 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
|
-
|
|
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
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
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
|
|
45
|
+
return `${this.resourceConfig.resourceId}-quick-filters`;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
}
|