@uxf/cms 13.0.3 → 14.1.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/README.md +1 -1
- package/api/index.d.ts +2 -0
- package/api/index.js +2 -2
- package/api/swr.js +71 -6
- package/content-builder/content-builder-header.js +42 -3
- package/content-builder/content-builder.js +140 -18
- package/content-builder/content-builder.stories.js +24 -5
- package/content-builder/forms/content-builder-basic-form.js +212 -25
- package/content-builder/forms/content-builder-seo-form.js +92 -8
- package/forms/change-password-form/change-password-form.js +152 -15
- package/forms/components/wysiwyg-input/wysiwyg-input.js +188 -50
- package/forms/components/wysiwyg-input/wysiwyg-input.stories.js +127 -22
- package/forms/forgotten-password-form/forgotten-password-form.js +119 -15
- package/forms/invite-user-form/invite-user-form.js +171 -13
- package/forms/login-form/login-form.js +122 -13
- package/forms/renew-password-form/renew-password-form.js +148 -16
- package/lib/api/create-axios-instance.d.ts +3 -1
- package/lib/api/create-axios-request.d.ts +3 -1
- package/lib/api/create-axios-request.js +9 -2
- package/lib/api/create-axios-request.test.d.ts +1 -0
- package/lib/api/create-axios-request.test.js +32 -0
- package/lib/layout/layout.js +126 -28
- package/lib/layout/sidebar.js +69 -38
- package/lib/menu/ui/menu-item.js +5 -2
- package/lib/menu/ui/sub-menu/sub-menu-mobile.js +62 -14
- package/lib/menu/ui/sub-menu/sub-menu.js +66 -14
- package/lib/menu/ui/sub-menu/use-sub-menu.js +137 -34
- package/lib/menu/ui/user-menu.js +178 -14
- package/package.json +21 -21
- package/pages/content-builder/components/form-content.js +189 -38
- package/pages/content-builder/components/form-root-fields.js +3 -3
- package/pages/content-builder/components/form.js +142 -27
- package/pages/content-builder/components/header.js +44 -5
- package/pages/content-builder/content/feature-section.js +67 -15
- package/pages/content-builder/content/gallery.js +38 -6
- package/pages/content-builder/content/hero-section.js +39 -6
- package/pages/content-builder/content/people.js +64 -13
- package/pages/content-builder/content/wysiwyg.js +60 -6
- package/pages/content-builder/content-builder-page.js +120 -48
- package/pages/content-builder/content-field.js +216 -35
- package/pages/content-builder/content-header-behaviour.spec.d.ts +1 -0
- package/pages/content-builder/content-header-behaviour.spec.js +22 -0
- package/pages/content-builder/content-header.js +100 -53
- package/pages/content-builder/context/details-visibility-context.js +96 -18
- package/pages/forgotten-password-page/forgotten-password-page.js +29 -46
- package/pages/grid-page/grid-page.js +292 -76
- package/pages/grid-page/history-pathname.d.ts +6 -0
- package/pages/grid-page/history-pathname.js +11 -0
- package/pages/grid-page/history-pathname.test.d.ts +1 -0
- package/pages/grid-page/history-pathname.test.js +11 -0
- package/pages/grid-page/use-hidden-columns.js +29 -8
- package/pages/invite-user-page/invite-user-page.js +39 -16
- package/pages/login-page/login-page.js +44 -50
- package/pages/renew-password-page/renew-password-page.js +35 -43
- package/pages/translations.d.ts +3 -0
- package/pages/translations.js +3 -0
- package/security/restricted-page.js +88 -10
- package/security/use-logged-user.js +33 -8
- package/translations/cs.json +2 -1
- package/translations/translations.d.ts +3 -0
- package/ui/avatar/avatar.js +3 -2
- package/ui/copy-to-clipboard/copy-to-clipboard.js +57 -44
- package/ui/copy-to-clipboard-button/copy-to-clipboard-button.js +47 -46
- package/utils/remove-confirm-handler.js +80 -11
- package/utils/use-viewport-height.js +26 -20
- package/utils/use-viewport-height.test.d.ts +1 -0
- package/utils/use-viewport-height.test.js +37 -0
- package/utils/use-visual-viewport-height.d.ts +2 -0
- package/utils/use-visual-viewport-height.js +26 -0
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ It is not a general UI kit (`@uxf/ui`), a form library (`@uxf/form`), or a data
|
|
|
16
16
|
yarn add @uxf/cms
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Peer dependencies: `@uxf/core`, `@uxf/core-react`, `@uxf/data-grid`, `@uxf/form`, `@uxf/router`, `@uxf/styles`, `@uxf/ui`, `@uxf/wysiwyg`, `@dnd-kit/core`, `@dnd-kit/sortable`, `@dnd-kit/utilities`, `@floating-ui/react`, `axios`, `axios-hooks`, `swr`, `react-hook-form`, `next` (>=
|
|
19
|
+
Peer dependencies: `@uxf/core`, `@uxf/core-react`, `@uxf/data-grid`, `@uxf/form`, `@uxf/router`, `@uxf/styles`, `@uxf/ui`, `@uxf/wysiwyg`, `@dnd-kit/core`, `@dnd-kit/sortable`, `@dnd-kit/utilities`, `@floating-ui/react`, `axios`, `axios-hooks`, `swr`, `react-hook-form`, `next` (>=16.0.0), `react` (^19.3.0), `react-dom` (^19.3.0).
|
|
20
20
|
|
|
21
21
|
Because it builds on `@uxf/ui`, `@uxf/form` and `@uxf/data-grid`, complete their setup as well (see [`@uxf/ui`](../ui/README.md) and [`@uxf/form`](../form/README.md)) — the `UiContextProvider`, the token layer, and the component CSS they require.
|
|
22
22
|
|
package/api/index.d.ts
CHANGED
|
@@ -149,6 +149,8 @@ export declare function autocomplete(ctx: any, path: {
|
|
|
149
149
|
}, query: {
|
|
150
150
|
term: string;
|
|
151
151
|
limit?: number;
|
|
152
|
+
}, options?: {
|
|
153
|
+
signal?: AbortSignal;
|
|
152
154
|
}): AxiosPromise<AutocompleteResultResponse[]>;
|
|
153
155
|
export declare function saveFormValues<T extends Record<string, any>>(ctx: any, path: {
|
|
154
156
|
entityAlias: string;
|
package/api/index.js
CHANGED
|
@@ -57,8 +57,8 @@ function getFormValues(ctx, path) {
|
|
|
57
57
|
function login(ctx, body) {
|
|
58
58
|
return axiosRequest(ctx, "/api/login", "post", body, null);
|
|
59
59
|
}
|
|
60
|
-
function autocomplete(ctx, path, query) {
|
|
61
|
-
return axiosRequest(ctx, `/api/cms/autocomplete/${path.name}`, "get", null, query);
|
|
60
|
+
function autocomplete(ctx, path, query, options) {
|
|
61
|
+
return axiosRequest(ctx, `/api/cms/autocomplete/${path.name}`, "get", null, query, options);
|
|
62
62
|
}
|
|
63
63
|
function saveFormValues(ctx, path, body) {
|
|
64
64
|
return path.id
|
package/api/swr.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useDatagridGetSchemaQuery = exports.useCmsTablesQuery = exports.useCmsMeQuery = exports.useCmsUserConfigUpdateMutation = exports.useCmsUserConfigQuery = exports._fetch = exports.ApiError = void 0;
|
|
7
|
+
const compiler_runtime_1 = require("react/compiler-runtime");
|
|
7
8
|
const swr_1 = __importDefault(require("swr"));
|
|
8
9
|
const mutation_1 = __importDefault(require("swr/mutation"));
|
|
9
10
|
class ApiError extends Error {
|
|
@@ -19,7 +20,7 @@ const _fetch = (url, method = "GET", body = undefined) => {
|
|
|
19
20
|
var _a;
|
|
20
21
|
return fetch(((_a = process.env.API_URL) !== null && _a !== void 0 ? _a : "") + url, {
|
|
21
22
|
method,
|
|
22
|
-
body: typeof body !== "undefined" ? JSON.stringify(body) : undefined
|
|
23
|
+
body: typeof body !== "undefined" ? JSON.stringify(body) : undefined
|
|
23
24
|
}).then(async (res) => {
|
|
24
25
|
const data = await res.json();
|
|
25
26
|
if (!res.ok) {
|
|
@@ -29,15 +30,79 @@ const _fetch = (url, method = "GET", body = undefined) => {
|
|
|
29
30
|
});
|
|
30
31
|
};
|
|
31
32
|
exports._fetch = _fetch;
|
|
32
|
-
|
|
33
|
+
// UXF\CMS\Http\Request\Cms\SaveUserConfigRequestBody
|
|
34
|
+
// UXF\CMS\Http\Response\UserResponse
|
|
35
|
+
// UXF\Core\Contract\Metadata\Metadata
|
|
36
|
+
const useCmsUserConfigQuery = (config, t0) => {
|
|
37
|
+
const $ = (0, compiler_runtime_1.c)(2);
|
|
38
|
+
let t1;
|
|
39
|
+
if ($[0] !== t0) {
|
|
40
|
+
t1 = t0 === undefined ? {} : t0;
|
|
41
|
+
$[0] = t0;
|
|
42
|
+
$[1] = t1;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
t1 = $[1];
|
|
46
|
+
}
|
|
47
|
+
const options = t1;
|
|
48
|
+
return (0, swr_1.default)(config.skip !== true ? `/api/cms/user-config/${config.path.name}` : null, options);
|
|
49
|
+
};
|
|
33
50
|
exports.useCmsUserConfigQuery = useCmsUserConfigQuery;
|
|
34
|
-
const useCmsUserConfigUpdateMutation = (config,
|
|
51
|
+
const useCmsUserConfigUpdateMutation = (config, t0) => {
|
|
52
|
+
const options = t0 === undefined ? undefined : t0;
|
|
53
|
+
return (0, mutation_1.default)(`/api/cms/user-config/${config.path.name}`, _temp, options);
|
|
54
|
+
};
|
|
35
55
|
exports.useCmsUserConfigUpdateMutation = useCmsUserConfigUpdateMutation;
|
|
36
|
-
const useCmsMeQuery = (
|
|
56
|
+
const useCmsMeQuery = (t0, t1) => {
|
|
57
|
+
const $ = (0, compiler_runtime_1.c)(2);
|
|
58
|
+
const config = t0 === undefined ? {} : t0;
|
|
59
|
+
let t2;
|
|
60
|
+
if ($[0] !== t1) {
|
|
61
|
+
t2 = t1 === undefined ? {} : t1;
|
|
62
|
+
$[0] = t1;
|
|
63
|
+
$[1] = t2;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
t2 = $[1];
|
|
67
|
+
}
|
|
68
|
+
const options = t2;
|
|
69
|
+
return (0, swr_1.default)(config.skip !== true ? "/api/cms/me" : null, options);
|
|
70
|
+
};
|
|
37
71
|
exports.useCmsMeQuery = useCmsMeQuery;
|
|
38
72
|
/** @deprecated will be removed - schemas are generated */
|
|
39
|
-
const useCmsTablesQuery = (
|
|
73
|
+
const useCmsTablesQuery = (t0, t1) => {
|
|
74
|
+
const $ = (0, compiler_runtime_1.c)(2);
|
|
75
|
+
const config = t0 === undefined ? {} : t0;
|
|
76
|
+
let t2;
|
|
77
|
+
if ($[0] !== t1) {
|
|
78
|
+
t2 = t1 === undefined ? {} : t1;
|
|
79
|
+
$[0] = t1;
|
|
80
|
+
$[1] = t2;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
t2 = $[1];
|
|
84
|
+
}
|
|
85
|
+
const options = t2;
|
|
86
|
+
return (0, swr_1.default)(config.skip !== true ? "/api/cms/tables" : null, options);
|
|
87
|
+
};
|
|
40
88
|
exports.useCmsTablesQuery = useCmsTablesQuery;
|
|
41
89
|
/** @deprecated will be removed - schemas are generated */
|
|
42
|
-
const useDatagridGetSchemaQuery = (config,
|
|
90
|
+
const useDatagridGetSchemaQuery = (config, t0) => {
|
|
91
|
+
const $ = (0, compiler_runtime_1.c)(2);
|
|
92
|
+
let t1;
|
|
93
|
+
if ($[0] !== t0) {
|
|
94
|
+
t1 = t0 === undefined ? {} : t0;
|
|
95
|
+
$[0] = t0;
|
|
96
|
+
$[1] = t1;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
t1 = $[1];
|
|
100
|
+
}
|
|
101
|
+
const options = t1;
|
|
102
|
+
return (0, swr_1.default)(config.skip !== true ? `/api/cms/datagrid/schema/${config.path.name}` : null, options);
|
|
103
|
+
};
|
|
43
104
|
exports.useDatagridGetSchemaQuery = useDatagridGetSchemaQuery;
|
|
105
|
+
function _temp(url, t0) {
|
|
106
|
+
const { arg: body } = t0;
|
|
107
|
+
return (0, exports._fetch)(url, "PUT", body);
|
|
108
|
+
}
|
|
@@ -4,12 +4,51 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ContentBuilderHeader = ContentBuilderHeader;
|
|
7
|
+
const compiler_runtime_1 = require("react/compiler-runtime");
|
|
7
8
|
const translations_1 = require("@uxf/core-react/translations");
|
|
8
9
|
const button_1 = require("@uxf/ui/button");
|
|
9
10
|
const react_1 = __importDefault(require("react"));
|
|
10
11
|
function ContentBuilderHeader(props) {
|
|
12
|
+
const $ = (0, compiler_runtime_1.c)(9);
|
|
11
13
|
const t = (0, translations_1.useUxfTranslation)();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
react_1.default.createElement(
|
|
14
|
+
let t0;
|
|
15
|
+
if ($[0] !== props.title) {
|
|
16
|
+
t0 = react_1.default.createElement("h1", { className: "uxg-cb__header-title uxf-typo-h5" }, props.title);
|
|
17
|
+
$[0] = props.title;
|
|
18
|
+
$[1] = t0;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
t0 = $[1];
|
|
22
|
+
}
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[2] !== t) {
|
|
25
|
+
t1 = t("uxf-cms-content-builder:header.save");
|
|
26
|
+
$[2] = t;
|
|
27
|
+
$[3] = t1;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
t1 = $[3];
|
|
31
|
+
}
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[4] !== t1) {
|
|
34
|
+
t2 = react_1.default.createElement(button_1.Button, { type: "submit" }, t1);
|
|
35
|
+
$[4] = t1;
|
|
36
|
+
$[5] = t2;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
t2 = $[5];
|
|
40
|
+
}
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[6] !== t0 || $[7] !== t2) {
|
|
43
|
+
t3 = react_1.default.createElement("div", { className: "uxf-cb__header" },
|
|
44
|
+
t0,
|
|
45
|
+
t2);
|
|
46
|
+
$[6] = t0;
|
|
47
|
+
$[7] = t2;
|
|
48
|
+
$[8] = t3;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
t3 = $[8];
|
|
52
|
+
}
|
|
53
|
+
return t3;
|
|
15
54
|
}
|
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.ContentBuilder = ContentBuilder;
|
|
37
|
+
const compiler_runtime_1 = require("react/compiler-runtime");
|
|
37
38
|
const translations_1 = require("@uxf/core-react/translations");
|
|
38
39
|
const tabs_1 = require("@uxf/ui/tabs");
|
|
39
40
|
const react_1 = __importStar(require("react"));
|
|
@@ -44,29 +45,150 @@ const content_builder_root_1 = require("./content-builder-root");
|
|
|
44
45
|
const content_builder_sidebar_1 = require("./content-builder-sidebar");
|
|
45
46
|
const content_builder_basic_form_1 = require("./forms/content-builder-basic-form");
|
|
46
47
|
const content_builder_seo_form_1 = require("./forms/content-builder-seo-form");
|
|
47
|
-
var TabName
|
|
48
|
-
(function (TabName) {
|
|
48
|
+
var TabName = /*#__PURE__*/ function (TabName) {
|
|
49
49
|
TabName["Basic"] = "basic";
|
|
50
50
|
TabName["Seo"] = "seo";
|
|
51
|
-
|
|
51
|
+
return TabName;
|
|
52
|
+
}(TabName || {});
|
|
52
53
|
function ContentBuilder(props) {
|
|
53
54
|
var _a, _b;
|
|
55
|
+
const $ = (0, compiler_runtime_1.c)(39);
|
|
54
56
|
const generatedId = (0, react_1.useId)();
|
|
55
57
|
const [activeTab, setActiveTab] = (0, react_1.useState)(TabName.Basic);
|
|
56
58
|
const t = (0, translations_1.useUxfTranslation)();
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
59
|
+
const t0 = props.formApi;
|
|
60
|
+
const t1 = (_a = props.id) !== null && _a !== void 0 ? _a : generatedId;
|
|
61
|
+
const t2 = props.onSubmit;
|
|
62
|
+
let t3;
|
|
63
|
+
if ($[0] !== props.title || $[1] !== t) {
|
|
64
|
+
t3 = (_b = props.title) !== null && _b !== void 0 ? _b : t("uxf-cms-content-builder:settings.default-title");
|
|
65
|
+
$[0] = props.title;
|
|
66
|
+
$[1] = t;
|
|
67
|
+
$[2] = t3;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
t3 = $[2];
|
|
71
|
+
}
|
|
72
|
+
let t4;
|
|
73
|
+
if ($[3] !== t3) {
|
|
74
|
+
t4 = react_1.default.createElement(content_builder_header_1.ContentBuilderHeader, { title: t3 });
|
|
75
|
+
$[3] = t3;
|
|
76
|
+
$[4] = t4;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
t4 = $[4];
|
|
80
|
+
}
|
|
81
|
+
const t5 = props.formApi.control;
|
|
82
|
+
let t6;
|
|
83
|
+
if ($[5] !== props.ContentComponents || $[6] !== t5) {
|
|
84
|
+
t6 = react_1.default.createElement(content_builder_1.ContentField, { contentComponents: props.ContentComponents, control: t5, name: "content" });
|
|
85
|
+
$[5] = props.ContentComponents;
|
|
86
|
+
$[6] = t5;
|
|
87
|
+
$[7] = t6;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
t6 = $[7];
|
|
91
|
+
}
|
|
92
|
+
let t7;
|
|
93
|
+
if ($[8] !== t) {
|
|
94
|
+
t7 = t("uxf-cms-content-builder:settings.settings");
|
|
95
|
+
$[8] = t;
|
|
96
|
+
$[9] = t7;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
t7 = $[9];
|
|
100
|
+
}
|
|
101
|
+
let t8;
|
|
102
|
+
if ($[10] !== t) {
|
|
103
|
+
t8 = t("uxf-cms-content-builder:settings.basic");
|
|
104
|
+
$[10] = t;
|
|
105
|
+
$[11] = t8;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
t8 = $[11];
|
|
109
|
+
}
|
|
110
|
+
let t9;
|
|
111
|
+
if ($[12] !== props.fields || $[13] !== props.formApi || $[14] !== props.uploadNamespace) {
|
|
112
|
+
t9 = react_1.default.createElement(content_builder_basic_form_1.ContentBuilderBasicForm, { className: "space-y-8", fields: props.fields, formApi: props.formApi, uploadNamespace: props.uploadNamespace });
|
|
113
|
+
$[12] = props.fields;
|
|
114
|
+
$[13] = props.formApi;
|
|
115
|
+
$[14] = props.uploadNamespace;
|
|
116
|
+
$[15] = t9;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
t9 = $[15];
|
|
120
|
+
}
|
|
121
|
+
let t10;
|
|
122
|
+
if ($[16] !== t8 || $[17] !== t9) {
|
|
123
|
+
t10 = react_1.default.createElement(tabs_1.Tabs.Panel, { isAlwaysMounted: true, label: t8, name: TabName.Basic }, t9);
|
|
124
|
+
$[16] = t8;
|
|
125
|
+
$[17] = t9;
|
|
126
|
+
$[18] = t10;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
t10 = $[18];
|
|
130
|
+
}
|
|
131
|
+
let t11;
|
|
132
|
+
if ($[19] !== props.fields || $[20] !== props.formApi || $[21] !== props.uploadNamespace) {
|
|
133
|
+
t11 = react_1.default.createElement(tabs_1.Tabs.Panel, { isAlwaysMounted: true, label: "SEO", name: TabName.Seo },
|
|
134
|
+
react_1.default.createElement(content_builder_seo_form_1.ContentBuilderSeoForm, { className: "space-y-8", fields: props.fields, formApi: props.formApi, uploadNamespace: props.uploadNamespace }));
|
|
135
|
+
$[19] = props.fields;
|
|
136
|
+
$[20] = props.formApi;
|
|
137
|
+
$[21] = props.uploadNamespace;
|
|
138
|
+
$[22] = t11;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
t11 = $[22];
|
|
142
|
+
}
|
|
143
|
+
let t12;
|
|
144
|
+
if ($[23] !== activeTab || $[24] !== t10 || $[25] !== t11) {
|
|
145
|
+
t12 = react_1.default.createElement(tabs_1.Tabs, { onChange: setActiveTab, value: activeTab },
|
|
146
|
+
t10,
|
|
147
|
+
t11);
|
|
148
|
+
$[23] = activeTab;
|
|
149
|
+
$[24] = t10;
|
|
150
|
+
$[25] = t11;
|
|
151
|
+
$[26] = t12;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
t12 = $[26];
|
|
155
|
+
}
|
|
156
|
+
let t13;
|
|
157
|
+
if ($[27] !== t12 || $[28] !== t7) {
|
|
158
|
+
t13 = react_1.default.createElement(content_builder_sidebar_1.ContentBuilderSidebar, { title: t7 }, t12);
|
|
159
|
+
$[27] = t12;
|
|
160
|
+
$[28] = t7;
|
|
161
|
+
$[29] = t13;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
t13 = $[29];
|
|
165
|
+
}
|
|
166
|
+
let t14;
|
|
167
|
+
if ($[30] !== t13 || $[31] !== t6) {
|
|
168
|
+
t14 = react_1.default.createElement(content_builder_body_1.ContentBuilderBody, null,
|
|
169
|
+
t6,
|
|
170
|
+
t13);
|
|
171
|
+
$[30] = t13;
|
|
172
|
+
$[31] = t6;
|
|
173
|
+
$[32] = t14;
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
t14 = $[32];
|
|
177
|
+
}
|
|
178
|
+
let t15;
|
|
179
|
+
if ($[33] !== props.formApi || $[34] !== props.onSubmit || $[35] !== t1 || $[36] !== t14 || $[37] !== t4) {
|
|
180
|
+
t15 = react_1.default.createElement(content_builder_root_1.ContentBuilderRoot, { formApi: t0, id: t1, onSubmit: t2 },
|
|
181
|
+
t4,
|
|
182
|
+
t14);
|
|
183
|
+
$[33] = props.formApi;
|
|
184
|
+
$[34] = props.onSubmit;
|
|
185
|
+
$[35] = t1;
|
|
186
|
+
$[36] = t14;
|
|
187
|
+
$[37] = t4;
|
|
188
|
+
$[38] = t15;
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
t15 = $[38];
|
|
192
|
+
}
|
|
193
|
+
return t15;
|
|
72
194
|
}
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Default = Default;
|
|
7
|
+
const compiler_runtime_1 = require("react/compiler-runtime");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const content_builder_1 = require("@uxf/cms/content-builder");
|
|
9
10
|
const use_content_builder_form_api_1 = require("@uxf/cms/content-builder/use-content-builder-form-api");
|
|
@@ -11,9 +12,27 @@ const people_1 = require("@uxf/cms/pages/content-builder/content/people");
|
|
|
11
12
|
const wysiwyg_1 = require("@uxf/cms/pages/content-builder/content/wysiwyg");
|
|
12
13
|
const Contents = [wysiwyg_1.Wysiwyg, people_1.People];
|
|
13
14
|
function Default() {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const $ = (0, compiler_runtime_1.c)(3);
|
|
16
|
+
let t0;
|
|
17
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18
|
+
t0 = {
|
|
19
|
+
defaultValues: (0, content_builder_1.mapContentResponseToFormData)(null)
|
|
20
|
+
};
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
t0 = $[0];
|
|
25
|
+
}
|
|
26
|
+
const formApi = (0, use_content_builder_form_api_1.useContentBuilderFormApi)(t0);
|
|
27
|
+
let t1;
|
|
28
|
+
if ($[1] !== formApi) {
|
|
29
|
+
t1 = react_1.default.createElement("div", { className: "bg-neutral-200" },
|
|
30
|
+
react_1.default.createElement(content_builder_1.ContentBuilder, { ContentComponents: Contents, formApi: formApi, onSubmit: console.log }));
|
|
31
|
+
$[1] = formApi;
|
|
32
|
+
$[2] = t1;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
t1 = $[2];
|
|
36
|
+
}
|
|
37
|
+
return t1;
|
|
19
38
|
}
|