@uxf/cms 11.41.0 → 11.41.1
Sign up to get free protection for your applications and to get access to all the features.
package/api/index.d.ts
CHANGED
@@ -29,6 +29,10 @@ export interface ContentResponse {
|
|
29
29
|
type: string;
|
30
30
|
name: string;
|
31
31
|
perex: string;
|
32
|
+
parent?: {
|
33
|
+
id: number;
|
34
|
+
label: string;
|
35
|
+
} | null;
|
32
36
|
seo: ContentSeoResponse;
|
33
37
|
visibilityLevel: VisibilityLevel;
|
34
38
|
hidden: boolean;
|
@@ -53,6 +57,7 @@ export interface ContentRequestBody {
|
|
53
57
|
type: string;
|
54
58
|
name: string;
|
55
59
|
perex: string;
|
60
|
+
parent: number | null;
|
56
61
|
seo: ContentSeoRequestBody;
|
57
62
|
visibilityLevel: VisibilityLevel;
|
58
63
|
hidden: boolean;
|
package/package.json
CHANGED
@@ -8,6 +8,7 @@ function mapResponseToFormData(response) {
|
|
8
8
|
return {
|
9
9
|
type: response.type || null,
|
10
10
|
name: response.name,
|
11
|
+
parent: response.parent,
|
11
12
|
perex: response.perex,
|
12
13
|
seo: {
|
13
14
|
name: response.seo.name,
|
@@ -39,26 +40,27 @@ function mapResponseToFormData(response) {
|
|
39
40
|
};
|
40
41
|
}
|
41
42
|
function mapFormDataToRequest(values) {
|
42
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
43
44
|
return {
|
44
45
|
name: values.name,
|
45
46
|
perex: values.perex,
|
46
47
|
type: (_a = values.type) !== null && _a !== void 0 ? _a : "",
|
48
|
+
parent: (_c = (_b = values.parent) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : null,
|
47
49
|
seo: {
|
48
|
-
name: (
|
50
|
+
name: (_d = values.seo.name) !== null && _d !== void 0 ? _d : "",
|
49
51
|
title: values.seo.title,
|
50
52
|
description: values.seo.description,
|
51
53
|
ogTitle: values.seo.ogTitle,
|
52
54
|
ogDescription: values.seo.ogDescription,
|
53
|
-
ogImage: (
|
55
|
+
ogImage: (_f = (_e = values.seo.ogImage) === null || _e === void 0 ? void 0 : _e.id) !== null && _f !== void 0 ? _f : null,
|
54
56
|
},
|
55
57
|
hidden: !values.active,
|
56
|
-
category: (
|
57
|
-
author: (
|
58
|
+
category: (_h = (_g = values.category) === null || _g === void 0 ? void 0 : _g.id) !== null && _h !== void 0 ? _h : null,
|
59
|
+
author: (_k = (_j = values.author) === null || _j === void 0 ? void 0 : _j.id) !== null && _k !== void 0 ? _k : null,
|
58
60
|
publishedAt: values.publishedAt,
|
59
61
|
visibilityLevel: values.visibilityLevel,
|
60
|
-
image: (
|
61
|
-
tags: (
|
62
|
+
image: (_m = (_l = values.image) === null || _l === void 0 ? void 0 : _l.id) !== null && _m !== void 0 ? _m : null,
|
63
|
+
tags: (_p = (_o = values.tags) === null || _o === void 0 ? void 0 : _o.map((t) => t.id)) !== null && _p !== void 0 ? _p : empty_array_1.EMPTY_ARRAY,
|
62
64
|
content: {
|
63
65
|
data: values.content,
|
64
66
|
search: "", // TODO
|