@pronto-tools-and-more/components 14.40.0 → 14.42.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 +45 -5
- package/dist/parts/ArticleList/ArticleList.d.ts +2 -1
- package/dist/parts/CreateFilterFromProperties/CreateFilterFromProperties.d.ts +2 -1
- package/dist/parts/CreateTaxonomyFilter/CreateTaxonomyFilter.d.ts +1 -0
- package/dist/parts/GetArticleListDataSource/GetArticleListDataSource.d.ts +2 -1
- package/package.json +5 -5
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
|
};
|
@@ -185,7 +221,8 @@ var getArticleListDataSource = ({
|
|
185
221
|
offset,
|
186
222
|
bookmarks,
|
187
223
|
contextId,
|
188
|
-
asContext
|
224
|
+
asContext,
|
225
|
+
taxonomy
|
189
226
|
}) => {
|
190
227
|
if (contextId) {
|
191
228
|
if (!contextId.startsWith("$context.") && !contextId.startsWith("$functions.")) {
|
@@ -232,7 +269,8 @@ var getArticleListDataSource = ({
|
|
232
269
|
properties,
|
233
270
|
authorId,
|
234
271
|
categoryId,
|
235
|
-
bundleId
|
272
|
+
bundleId,
|
273
|
+
taxonomy
|
236
274
|
});
|
237
275
|
const filter = {
|
238
276
|
AND: [
|
@@ -338,7 +376,8 @@ var ArticleList = ({
|
|
338
376
|
noContentFound,
|
339
377
|
bookmarks,
|
340
378
|
contextId,
|
341
|
-
asContext
|
379
|
+
asContext,
|
380
|
+
taxonomy
|
342
381
|
}) => {
|
343
382
|
const dataSource = getArticleListDataSource({
|
344
383
|
properties,
|
@@ -350,6 +389,7 @@ var ArticleList = ({
|
|
350
389
|
collectionName,
|
351
390
|
bookmarks,
|
352
391
|
contextId,
|
392
|
+
taxonomy,
|
353
393
|
asContext
|
354
394
|
});
|
355
395
|
const json = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ArticleListItemRenderer } from "../ArticleListItemRenderer/ArticleListItemRenderer.ts";
|
2
|
-
export declare const ArticleList: ({ properties, render, authorId, categoryId, bundleId, limit, offset, collectionName, noContentFound, bookmarks, contextId, asContext, }: {
|
2
|
+
export declare const ArticleList: ({ properties, render, authorId, categoryId, bundleId, limit, offset, collectionName, noContentFound, bookmarks, contextId, asContext, taxonomy, }: {
|
3
3
|
properties?: any;
|
4
4
|
authorId?: string;
|
5
5
|
categoryId?: string;
|
@@ -12,4 +12,5 @@ export declare const ArticleList: ({ properties, render, authorId, categoryId, b
|
|
12
12
|
bookmarks?: boolean;
|
13
13
|
contextId?: string;
|
14
14
|
asContext?: string;
|
15
|
+
taxonomy?: any;
|
15
16
|
}) => import("react").JSX.Element;
|
@@ -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[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare const getArticleListDataSource: ({ properties, authorId, categoryId, bundleId, collectionName, limit, offset, bookmarks, contextId, asContext, }: {
|
1
|
+
export declare const getArticleListDataSource: ({ properties, authorId, categoryId, bundleId, collectionName, limit, offset, bookmarks, contextId, asContext, taxonomy, }: {
|
2
2
|
properties: any;
|
3
3
|
authorId: any;
|
4
4
|
categoryId: any;
|
@@ -9,6 +9,7 @@ export declare const getArticleListDataSource: ({ properties, authorId, category
|
|
9
9
|
bookmarks: any;
|
10
10
|
contextId: any;
|
11
11
|
asContext: any;
|
12
|
+
taxonomy: any;
|
12
13
|
}) => {
|
13
14
|
type: string;
|
14
15
|
data: 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.42.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
|
}
|