@adminforth/quick-filters 2.0.0 → 2.0.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 +4 -4
- package/custom/QickFiltersSelect.vue +1 -1
- package/dist/custom/FiltersArea.vue +4 -4
- package/dist/custom/QickFiltersSelect.vue +1 -1
- package/dist/index.js +0 -1
- package/index.ts +0 -1
- package/package.json +1 -1
- package/types.ts +3 -3
package/build.log
CHANGED
|
@@ -10,5 +10,5 @@ custom/UniversalSearchInput.vue
|
|
|
10
10
|
custom/tsconfig.json
|
|
11
11
|
custom/types.ts
|
|
12
12
|
|
|
13
|
-
sent 5,
|
|
14
|
-
total size is 4,
|
|
13
|
+
sent 5,213 bytes received 115 bytes 10,656.00 bytes/sec
|
|
14
|
+
total size is 4,786 speedup is 0.90
|
package/custom/FiltersArea.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex gap-1">
|
|
3
|
-
<
|
|
2
|
+
<div class="flex flex-wrap gap-1">
|
|
3
|
+
<template v-for="filter in meta.options" :key="filter.name" >
|
|
4
4
|
<UniversalSearchInput
|
|
5
5
|
v-if="filter.hasSearchInput"
|
|
6
6
|
:meta="{
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
}"
|
|
10
10
|
/>
|
|
11
11
|
|
|
12
|
-
<div v-else>
|
|
12
|
+
<div class="w-64" v-else>
|
|
13
13
|
<QickFiltersSelect
|
|
14
14
|
:filter="filter"
|
|
15
15
|
/>
|
|
16
16
|
</div>
|
|
17
|
-
</
|
|
17
|
+
</template>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex gap-1">
|
|
3
|
-
<
|
|
2
|
+
<div class="flex flex-wrap gap-1">
|
|
3
|
+
<template v-for="filter in meta.options" :key="filter.name" >
|
|
4
4
|
<UniversalSearchInput
|
|
5
5
|
v-if="filter.hasSearchInput"
|
|
6
6
|
:meta="{
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
}"
|
|
10
10
|
/>
|
|
11
11
|
|
|
12
|
-
<div v-else>
|
|
12
|
+
<div class="w-64" v-else>
|
|
13
13
|
<QickFiltersSelect
|
|
14
14
|
:filter="filter"
|
|
15
15
|
/>
|
|
16
16
|
</div>
|
|
17
|
-
</
|
|
17
|
+
</template>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
</template>
|
package/dist/index.js
CHANGED
|
@@ -83,7 +83,6 @@ export default class extends AdminForthPlugin {
|
|
|
83
83
|
const transformer = (_a) => __awaiter(this, [_a], void 0, function* ({ query }) {
|
|
84
84
|
const normalizedFilters = normalizeFilterValue(query.filters);
|
|
85
85
|
query.filters = normalizedFilters;
|
|
86
|
-
console.log('Transformed filters', query.filters);
|
|
87
86
|
return { ok: true, error: '' };
|
|
88
87
|
});
|
|
89
88
|
const originalBefore = this.resourceConfig.hooks.list.beforeDatasourceRequest;
|
package/index.ts
CHANGED
|
@@ -77,7 +77,6 @@ export default class extends AdminForthPlugin {
|
|
|
77
77
|
const transformer = async ({ query }: { query: any }) => {
|
|
78
78
|
const normalizedFilters = normalizeFilterValue(query.filters);
|
|
79
79
|
query.filters = normalizedFilters;
|
|
80
|
-
console.log('Transformed filters', query.filters);
|
|
81
80
|
return { ok: true, error: '' };
|
|
82
81
|
};
|
|
83
82
|
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Filters, type IAdminForthSingleFilter } from "adminforth"
|
|
1
|
+
import { Filters, type IAdminForthSingleFilter, type IAdminForthAndOrFilter } from "adminforth"
|
|
2
2
|
interface IFilter {
|
|
3
3
|
name: string;
|
|
4
4
|
icon?: string;
|
|
5
5
|
enum?: {
|
|
6
6
|
label: string;
|
|
7
7
|
icon?: string;
|
|
8
|
-
filters: () => IAdminForthSingleFilter | Promise<IAdminForthSingleFilter>;
|
|
8
|
+
filters: () => IAdminForthSingleFilter | IAdminForthAndOrFilter | Promise<IAdminForthSingleFilter | IAdminForthAndOrFilter>;
|
|
9
9
|
}[];
|
|
10
|
-
searchInput?: (searchVal: string) => IAdminForthSingleFilter | Promise<IAdminForthSingleFilter>;
|
|
10
|
+
searchInput?: (searchVal: string) => IAdminForthSingleFilter | IAdminForthAndOrFilter | Promise<IAdminForthSingleFilter | IAdminForthAndOrFilter>;
|
|
11
11
|
}
|
|
12
12
|
export interface PluginOptions {
|
|
13
13
|
filters: IFilter[]
|