@knovator/pagecreator-admin 1.7.6 → 1.7.7
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/index.cjs +9 -8
- package/index.js +9 -8
- package/package.json +1 -1
- package/src/lib/api/list.d.ts +4 -0
package/index.cjs
CHANGED
|
@@ -2765,6 +2765,12 @@ const apiList = {
|
|
|
2765
2765
|
url: `${prefix}/languages`,
|
|
2766
2766
|
method: 'GET'
|
|
2767
2767
|
}),
|
|
2768
|
+
BLOG_CATEGORIES: ({
|
|
2769
|
+
prefix
|
|
2770
|
+
}) => ({
|
|
2771
|
+
url: `${prefix}/blog-categories`,
|
|
2772
|
+
method: 'GET'
|
|
2773
|
+
}),
|
|
2768
2774
|
// Image Upload API
|
|
2769
2775
|
IMAGE_UPLOAD: ({
|
|
2770
2776
|
prefix
|
|
@@ -7284,13 +7290,8 @@ const WidgetForm = ({
|
|
|
7284
7290
|
const response = yield commonApi({
|
|
7285
7291
|
baseUrl,
|
|
7286
7292
|
token,
|
|
7287
|
-
method: '
|
|
7288
|
-
url: `${widgetRoutesPrefix}/
|
|
7289
|
-
data: {
|
|
7290
|
-
search: '',
|
|
7291
|
-
collectionName: 'blog',
|
|
7292
|
-
collectionItems: []
|
|
7293
|
-
},
|
|
7293
|
+
method: 'GET',
|
|
7294
|
+
url: `${widgetRoutesPrefix}/blog-categories`,
|
|
7294
7295
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7295
7296
|
onError: error => console.error('Error fetching blog categories:', error)
|
|
7296
7297
|
});
|
|
@@ -7298,7 +7299,7 @@ const WidgetForm = ({
|
|
|
7298
7299
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7299
7300
|
const categories = response.data.docs.map(cat => ({
|
|
7300
7301
|
value: cat._id || cat.id,
|
|
7301
|
-
label: cat.
|
|
7302
|
+
label: cat.name || cat.nm || cat.label,
|
|
7302
7303
|
slug: cat.slug
|
|
7303
7304
|
}));
|
|
7304
7305
|
setBlogCategories(categories);
|
package/index.js
CHANGED
|
@@ -2753,6 +2753,12 @@ const apiList = {
|
|
|
2753
2753
|
url: `${prefix}/languages`,
|
|
2754
2754
|
method: 'GET'
|
|
2755
2755
|
}),
|
|
2756
|
+
BLOG_CATEGORIES: ({
|
|
2757
|
+
prefix
|
|
2758
|
+
}) => ({
|
|
2759
|
+
url: `${prefix}/blog-categories`,
|
|
2760
|
+
method: 'GET'
|
|
2761
|
+
}),
|
|
2756
2762
|
// Image Upload API
|
|
2757
2763
|
IMAGE_UPLOAD: ({
|
|
2758
2764
|
prefix
|
|
@@ -7272,13 +7278,8 @@ const WidgetForm = ({
|
|
|
7272
7278
|
const response = yield commonApi({
|
|
7273
7279
|
baseUrl,
|
|
7274
7280
|
token,
|
|
7275
|
-
method: '
|
|
7276
|
-
url: `${widgetRoutesPrefix}/
|
|
7277
|
-
data: {
|
|
7278
|
-
search: '',
|
|
7279
|
-
collectionName: 'blog',
|
|
7280
|
-
collectionItems: []
|
|
7281
|
-
},
|
|
7281
|
+
method: 'GET',
|
|
7282
|
+
url: `${widgetRoutesPrefix}/blog-categories`,
|
|
7282
7283
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7283
7284
|
onError: error => console.error('Error fetching blog categories:', error)
|
|
7284
7285
|
});
|
|
@@ -7286,7 +7287,7 @@ const WidgetForm = ({
|
|
|
7286
7287
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7287
7288
|
const categories = response.data.docs.map(cat => ({
|
|
7288
7289
|
value: cat._id || cat.id,
|
|
7289
|
-
label: cat.
|
|
7290
|
+
label: cat.name || cat.nm || cat.label,
|
|
7290
7291
|
slug: cat.slug
|
|
7291
7292
|
}));
|
|
7292
7293
|
setBlogCategories(categories);
|
package/package.json
CHANGED
package/src/lib/api/list.d.ts
CHANGED