@prezly/theme-kit-core 10.2.3 → 10.3.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.
|
@@ -168,7 +168,7 @@ function createClient(prezly, newsroomUuid, newsroomThemeUuid) {
|
|
|
168
168
|
query,
|
|
169
169
|
offset = 0,
|
|
170
170
|
limit,
|
|
171
|
-
|
|
171
|
+
categories,
|
|
172
172
|
locale,
|
|
173
173
|
highlighted = 0,
|
|
174
174
|
tags
|
|
@@ -184,8 +184,13 @@ function createClient(prezly, newsroomUuid, newsroomThemeUuid) {
|
|
|
184
184
|
offset: offset > 0 ? offset + highlighted : offset,
|
|
185
185
|
search,
|
|
186
186
|
query: mergeQueries(query, {
|
|
187
|
-
["category.id"]:
|
|
188
|
-
$
|
|
187
|
+
["category.id"]: categories !== null && categories !== void 0 && categories.length ? {
|
|
188
|
+
$all: categories.map(_ref => {
|
|
189
|
+
var {
|
|
190
|
+
id
|
|
191
|
+
} = _ref;
|
|
192
|
+
return id;
|
|
193
|
+
})
|
|
189
194
|
} : undefined,
|
|
190
195
|
["newsroom.uuid"]: {
|
|
191
196
|
$in: [newsroomUuid]
|
|
@@ -11,7 +11,7 @@ export interface Options {
|
|
|
11
11
|
export declare namespace stories {
|
|
12
12
|
interface SearchParams {
|
|
13
13
|
search?: string;
|
|
14
|
-
|
|
14
|
+
categories?: Pick<Category, 'id'>[];
|
|
15
15
|
tags?: string[];
|
|
16
16
|
locale?: Pick<Culture, 'code'> | Culture.Code;
|
|
17
17
|
limit: number;
|
|
@@ -26,7 +26,7 @@ export declare namespace stories {
|
|
|
26
26
|
export declare namespace allStories {
|
|
27
27
|
interface SearchParams {
|
|
28
28
|
search?: string;
|
|
29
|
-
|
|
29
|
+
categories?: Pick<Category, 'id'>[];
|
|
30
30
|
locale?: Pick<Culture, 'code'>;
|
|
31
31
|
}
|
|
32
32
|
interface IncludeOptions<Include extends keyof Story.ExtraFields> {
|
|
@@ -160,7 +160,7 @@ export function createClient(prezly, newsroomUuid, newsroomThemeUuid) {
|
|
|
160
160
|
query,
|
|
161
161
|
offset = 0,
|
|
162
162
|
limit,
|
|
163
|
-
|
|
163
|
+
categories,
|
|
164
164
|
locale,
|
|
165
165
|
highlighted = 0,
|
|
166
166
|
tags
|
|
@@ -176,8 +176,13 @@ export function createClient(prezly, newsroomUuid, newsroomThemeUuid) {
|
|
|
176
176
|
offset: offset > 0 ? offset + highlighted : offset,
|
|
177
177
|
search,
|
|
178
178
|
query: mergeQueries(query, {
|
|
179
|
-
["category.id"]:
|
|
180
|
-
$
|
|
179
|
+
["category.id"]: categories !== null && categories !== void 0 && categories.length ? {
|
|
180
|
+
$all: categories.map(_ref => {
|
|
181
|
+
var {
|
|
182
|
+
id
|
|
183
|
+
} = _ref;
|
|
184
|
+
return id;
|
|
185
|
+
})
|
|
181
186
|
} : undefined,
|
|
182
187
|
["newsroom.uuid"]: {
|
|
183
188
|
$in: [newsroomUuid]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-core",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "Data layer and utility library for developing Prezly themes with JavaScript",
|
|
5
5
|
"main": "build/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@prezly/sdk": "21.12.0 || ^23.x"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@prezly/theme-kit-intl": "^10.
|
|
39
|
+
"@prezly/theme-kit-intl": "^10.3.0",
|
|
40
40
|
"@prezly/uploadcare": "2.4.4",
|
|
41
41
|
"@technically/is-not-undefined": "^1.0.0",
|
|
42
42
|
"@technically/omit-undefined": "^1.0.4",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "eea5189d4e5ffd67f39f20a73797d0b77bc8fef6"
|
|
75
75
|
}
|