@pronto-tools-and-more/components 14.39.0 → 14.41.0
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/dist/main.js
CHANGED
@@ -74,6 +74,39 @@ var createPropertiesFilter = (properties) => {
|
|
74
74
|
return outerFilter;
|
75
75
|
};
|
76
76
|
|
77
|
+
// src/parts/CreateTaxonomyFilter/CreateTaxonomyFilter.ts
|
78
|
+
var createTaxonomyFilter = (taxonomy = {}) => {
|
79
|
+
const entries = Object.entries(taxonomy);
|
80
|
+
if (entries.length === 0) {
|
81
|
+
return [];
|
82
|
+
}
|
83
|
+
const innerFilter = [];
|
84
|
+
for (const [key, value] of Object.entries(taxonomy)) {
|
85
|
+
if (typeof value === "string") {
|
86
|
+
innerFilter.push({
|
87
|
+
[key]: {
|
88
|
+
value
|
89
|
+
}
|
90
|
+
});
|
91
|
+
}
|
92
|
+
}
|
93
|
+
if (innerFilter.length === 0) {
|
94
|
+
return innerFilter;
|
95
|
+
}
|
96
|
+
const outerFilter = [
|
97
|
+
{
|
98
|
+
taxonomies: {
|
99
|
+
content: {
|
100
|
+
value: {
|
101
|
+
AND: innerFilter
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
];
|
107
|
+
return outerFilter;
|
108
|
+
};
|
109
|
+
|
77
110
|
// src/parts/CreateFilterFromProperties/CreateFilterFromProperties.ts
|
78
111
|
var createBundleFilter = (bundleId) => {
|
79
112
|
if (bundleId) {
|
@@ -159,17 +192,20 @@ var createFilterFromProperties = ({
|
|
159
192
|
properties,
|
160
193
|
authorId,
|
161
194
|
categoryId,
|
162
|
-
bundleId
|
195
|
+
bundleId,
|
196
|
+
taxonomy
|
163
197
|
}) => {
|
164
198
|
const categoryFilter = createCategoryFilter(categoryId);
|
165
199
|
const authorFilter = createAuthorFilter(authorId);
|
166
200
|
const bundleFilter = createBundleFilter(bundleId);
|
167
201
|
const propertiesFilter = createPropertiesFilter(properties);
|
202
|
+
const taxonomyFilter = createTaxonomyFilter(taxonomy);
|
168
203
|
const merged = mergeFilters([
|
169
204
|
categoryFilter,
|
170
205
|
authorFilter,
|
171
206
|
bundleFilter,
|
172
|
-
propertiesFilter
|
207
|
+
propertiesFilter,
|
208
|
+
taxonomyFilter
|
173
209
|
]);
|
174
210
|
return merged;
|
175
211
|
};
|
@@ -1,6 +1,7 @@
|
|
1
|
-
export declare const createFilterFromProperties: ({ properties, authorId, categoryId, bundleId, }: {
|
1
|
+
export declare const createFilterFromProperties: ({ properties, authorId, categoryId, bundleId, taxonomy, }: {
|
2
2
|
properties: any;
|
3
3
|
authorId?: string;
|
4
4
|
categoryId?: string;
|
5
5
|
bundleId?: string;
|
6
|
+
taxonomy?: any;
|
6
7
|
}) => any[];
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const createTaxonomyFilter: (taxonomy?: any) => readonly any[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pronto-tools-and-more/components",
|
3
|
-
"version": "14.
|
3
|
+
"version": "14.41.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/main.js",
|
6
6
|
"types": "dist/main.d.ts",
|
@@ -17,9 +17,9 @@
|
|
17
17
|
"license": "MIT",
|
18
18
|
"devDependencies": {
|
19
19
|
"@types/node": "^22.10.1",
|
20
|
-
"@types/react": "^19.0
|
21
|
-
"esbuild": "^0.25.
|
22
|
-
"react": "^19.
|
23
|
-
"ts-jest": "^29.3.
|
20
|
+
"@types/react": "^19.1.0",
|
21
|
+
"esbuild": "^0.25.2",
|
22
|
+
"react": "^19.1.0",
|
23
|
+
"ts-jest": "^29.3.1"
|
24
24
|
}
|
25
25
|
}
|