@uxf/cms 11.31.2 → 11.32.0
Sign up to get free protection for your applications and to get access to all the features.
- package/api/index.js +22 -20
- package/config/container.js +3 -3
- package/context/cms-provider.d.ts +2 -2
- package/context/cms-provider.js +1 -2
- package/deprecated/redux/entities/selectors.js +3 -2
- package/deprecated/redux/redux-helper.js +1 -2
- package/forms/change-password-form/change-password-form.js +1 -1
- package/forms/components/wysiwyg-input/wysiwyg-input.js +8 -8
- package/forms/forgotten-password-form/forgotten-password-form.js +3 -3
- package/forms/invite-user-form/invite-user-form.js +7 -7
- package/forms/login-form/login-form.js +4 -4
- package/lib/api/create-axios-instance.d.ts +1 -1
- package/lib/api/create-axios-instance.js +1 -2
- package/lib/api/create-use-axios-request.d.ts +1 -1
- package/lib/layout/breadcrumbs.js +4 -2
- package/lib/layout/layout.js +3 -3
- package/lib/layout/sidebar.js +5 -5
- package/lib/layout/types.d.ts +9 -9
- package/lib/menu/factory.js +7 -8
- package/lib/menu/mobile-bar.js +6 -6
- package/lib/menu/model.js +4 -2
- package/lib/menu/ui/list-item/list-item.d.ts +1 -1
- package/lib/menu/ui/list-item/list-item.js +10 -10
- package/lib/menu/ui/menu-item.js +1 -1
- package/lib/menu/ui/sub-menu/sub-menu-item.js +1 -1
- package/lib/menu/ui/sub-menu/sub-menu-mobile.js +1 -1
- package/lib/menu/ui/sub-menu/sub-menu.js +1 -1
- package/lib/menu/ui/sub-menu/use-sub-menu.d.ts +7 -8
- package/lib/menu/ui/sub-menu/use-sub-menu.js +2 -3
- package/lib/menu/ui/user-menu.js +6 -4
- package/package.json +19 -19
- package/pages/content-builder/components/form-content.js +7 -7
- package/pages/content-builder/components/form-root-fields.js +20 -19
- package/pages/content-builder/components/form.js +2 -2
- package/pages/content-builder/components/header.js +1 -1
- package/pages/content-builder/content/feature-section.js +9 -9
- package/pages/content-builder/content/gallery.js +1 -1
- package/pages/content-builder/content/hero-section.js +4 -4
- package/pages/content-builder/content/people.js +9 -9
- package/pages/content-builder/content/wysiwyg.js +2 -2
- package/pages/content-builder/content-builder-page.js +2 -2
- package/pages/content-builder/content-field.js +12 -12
- package/pages/content-builder/content-header.js +4 -4
- package/pages/content-builder/context/details-visibility-context.js +2 -1
- package/pages/content-builder/mapper.js +5 -5
- package/pages/content-builder/types.d.ts +33 -33
- package/pages/forgotten-password-page/forgotten-password-page.js +1 -1
- package/pages/form-page/base-field.js +15 -15
- package/pages/form-page/field/content.js +1 -1
- package/pages/form-page/field-array.js +3 -3
- package/pages/form-page/form-page.d.ts +1 -1
- package/pages/form-page/form-page.js +3 -2
- package/pages/form-page/form.d.ts +1 -1
- package/pages/form-page/form.js +7 -8
- package/pages/form-page/mapper.js +2 -1
- package/pages/grid-page/get-initial-props-helper.js +2 -3
- package/pages/grid-page/grid-page.js +4 -3
- package/pages/grid-page/types.d.ts +12 -13
- package/pages/login-page/login-page.js +2 -1
- package/pages/renew-password-page/renew-password-page.js +1 -1
- package/security/use-logged-user.js +1 -2
- package/ui/avatar/get-avatar-user-letters.js +5 -4
- package/ui/copy-to-clipboard/copy-to-clipboard.js +3 -2
- package/utils/on-remove-confirm.js +1 -2
- package/utils/use-viewport-height.js +1 -2
@@ -3,35 +3,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.ListItem =
|
6
|
+
exports.ListItem = ListItem;
|
7
7
|
const classes_1 = require("@uxf/core/constants/classes");
|
8
|
+
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
8
9
|
const icon_1 = require("@uxf/ui/icon");
|
9
10
|
const link_1 = __importDefault(require("next/link"));
|
10
11
|
const react_1 = __importDefault(require("react"));
|
11
12
|
const config_1 = require("../../../../config");
|
12
13
|
const sub_menu_1 = require("../sub-menu/sub-menu");
|
13
|
-
|
14
|
+
function ListItem(props) {
|
14
15
|
var _a, _b, _c, _d;
|
15
|
-
const hasSubMenu =
|
16
|
+
const hasSubMenu = Boolean((_a = props.subMenu) === null || _a === void 0 ? void 0 : _a.length);
|
16
17
|
const Content = (_b = props.children) !== null && _b !== void 0 ? _b : (react_1.default.createElement("div", { className: `uxf-cms-menu__item uxf-cms-menu__item--basic ${props.selected ? classes_1.CLASSES.IS_SELECTED : ""}` },
|
17
|
-
react_1.default.createElement("div", { className: `uxf-cms-menu__icon-wrapper ${props.level === 1 ? "uxf-cms-menu__icon-wrapper--level-one" : ""}` },
|
18
|
+
react_1.default.createElement("div", { className: `uxf-cms-menu__icon-wrapper ${props.level === 1 ? "uxf-cms-menu__icon-wrapper--level-one" : ""}` }, (0, is_not_nil_1.isNotNil)(props.icon) && props.level !== 1 && react_1.default.createElement(icon_1.Icon, { name: props.icon, size: 16 })),
|
18
19
|
react_1.default.createElement("div", { className: "uxf-cms-menu__item-label" }, props.label),
|
19
20
|
react_1.default.createElement("div", { className: "uxf-cms-menu__item-end-element" }, props.endElement),
|
20
|
-
hasSubMenu && (react_1.default.createElement(icon_1.Icon, {
|
21
|
+
hasSubMenu && (react_1.default.createElement(icon_1.Icon, { className: `uxf-cms-menu__caret ${!props.isOpen ? classes_1.CLASSES.IS_OPEN : ""}`, name: "caretDown", size: 16 }))));
|
21
22
|
// eslint-disable-next-line react/destructuring-assignment
|
22
|
-
const Button = ({ className }) => (react_1.default.createElement("button", {
|
23
|
+
const Button = ({ className }) => (react_1.default.createElement("button", { className: className, onClick: props.toggle, type: "button" }, Content));
|
23
24
|
if (props.href || props.route) {
|
24
25
|
if (props.subMenu && hasSubMenu && !props.isInitiallyOpen) {
|
25
26
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
26
27
|
react_1.default.createElement(sub_menu_1.SubMenu, { content: props.subMenu },
|
27
|
-
react_1.default.createElement(link_1.default, { href: (_c = props.href) !== null && _c !== void 0 ? _c : config_1.container.get("route")(props.route, props.params),
|
28
|
+
react_1.default.createElement(link_1.default, { href: (_c = props.href) !== null && _c !== void 0 ? _c : config_1.container.get("route")(props.route, props.params), rel: props.isExternal ? "noreferrer noopener" : undefined, target: props.isExternal ? "_blank" : undefined }, Content)),
|
28
29
|
react_1.default.createElement(Button, { className: "uxf-cms-menu__submenu-button uxf-cms-menu__submenu-button--initially-closed" })));
|
29
30
|
}
|
30
31
|
if (hasSubMenu) {
|
31
32
|
return react_1.default.createElement(Button, { className: "uxf-cms-menu__submenu-button uxf-cms-menu__submenu-button--initially-open" });
|
32
33
|
}
|
33
|
-
return (react_1.default.createElement(link_1.default, { href: (_d = props.href) !== null && _d !== void 0 ? _d : config_1.container.get("route")(props.route, props.params),
|
34
|
+
return (react_1.default.createElement(link_1.default, { href: (_d = props.href) !== null && _d !== void 0 ? _d : config_1.container.get("route")(props.route, props.params), rel: props.isExternal ? "noreferrer noopener" : undefined, target: props.isExternal ? "_blank" : undefined }, Content));
|
34
35
|
}
|
35
36
|
return Content;
|
36
|
-
}
|
37
|
-
exports.ListItem = ListItem;
|
37
|
+
}
|
package/lib/menu/ui/menu-item.js
CHANGED
@@ -37,7 +37,7 @@ const MenuItem = (props) => {
|
|
37
37
|
const useLoggedUser = config_1.container.get("useLoggedUser");
|
38
38
|
const loggedUser = useLoggedUser();
|
39
39
|
const visibleChildren = props.item.children.filter((i) => i.isVisible(loggedUser));
|
40
|
-
const firstVisibleChild = visibleChildren.
|
40
|
+
const firstVisibleChild = visibleChildren.at(0);
|
41
41
|
const isInitiallyOpen = (isActive || hasActiveChildren) && props.item.children.length > 0;
|
42
42
|
const [isSubmenuOpen, setIsSubmenuOpen] = (0, react_1.useState)(isInitiallyOpen);
|
43
43
|
const toggle = () => setIsSubmenuOpen((prev) => !prev);
|
@@ -16,7 +16,7 @@ const SubMenuItem = (props) => {
|
|
16
16
|
}
|
17
17
|
const Content = react_1.default.createElement("div", { className: "uxf-cms-sub-menu__item" }, props.item.title);
|
18
18
|
if (props.item.url || props.item.route) {
|
19
|
-
return (react_1.default.createElement(link_1.default, { href: (_a = props.item.url) !== null && _a !== void 0 ? _a : config_1.container.get("route")(props.item.route, props.item.routeParams),
|
19
|
+
return (react_1.default.createElement(link_1.default, { href: (_a = props.item.url) !== null && _a !== void 0 ? _a : config_1.container.get("route")(props.item.route, props.item.routeParams), rel: props.item.isExternal ? "noreferrer noopener" : undefined, target: props.item.isExternal ? "_blank" : undefined }, Content));
|
20
20
|
}
|
21
21
|
return Content;
|
22
22
|
};
|
@@ -43,6 +43,6 @@ exports.SubMenuMobile = (0, react_1.forwardRef)(({ children, content, title }, r
|
|
43
43
|
style: subMenu.floatingStyles,
|
44
44
|
}) },
|
45
45
|
react_1.default.createElement("div", { className: "uxf-cms-sub-menu__title" }, title),
|
46
|
-
content.map((item, index) => (react_1.default.createElement(sub_menu_item_1.SubMenuItem, {
|
46
|
+
content.map((item, index) => (react_1.default.createElement(sub_menu_item_1.SubMenuItem, { item: item, key: index })))))));
|
47
47
|
});
|
48
48
|
exports.SubMenuMobile.displayName = "SubMenuMobile";
|
@@ -41,6 +41,6 @@ exports.SubMenu = (0, react_1.forwardRef)(({ children, content }, ref) => {
|
|
41
41
|
ref: subMenu.refs.setFloating,
|
42
42
|
style: subMenu.floatingStyles,
|
43
43
|
className: "uxf-cms-sidebar__scrollbar uxf-cms-sub-menu__wrapper",
|
44
|
-
}) }, content.map((item, index) => (react_1.default.createElement(sub_menu_item_1.SubMenuItem, {
|
44
|
+
}) }, content.map((item, index) => (react_1.default.createElement(sub_menu_item_1.SubMenuItem, { item: item, key: index })))))));
|
45
45
|
});
|
46
46
|
exports.SubMenu.displayName = "SubMenu";
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface SubMenuOptions {
|
3
2
|
isMobile?: boolean;
|
4
3
|
}
|
@@ -31,7 +30,7 @@ export declare function useSubMenu(options: SubMenuOptions): {
|
|
31
30
|
update: () => void;
|
32
31
|
floatingStyles: import("react").CSSProperties;
|
33
32
|
open: boolean;
|
34
|
-
onOpenChange: (open: boolean, event?: Event
|
33
|
+
onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
|
35
34
|
events: import("@floating-ui/react").FloatingEvents;
|
36
35
|
dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
|
37
36
|
nodeId: string | undefined;
|
@@ -39,12 +38,12 @@ export declare function useSubMenu(options: SubMenuOptions): {
|
|
39
38
|
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
40
39
|
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
41
40
|
};
|
42
|
-
getReferenceProps: (userProps?: import("react").HTMLProps<Element>
|
43
|
-
getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement>
|
44
|
-
getItemProps: (userProps?:
|
45
|
-
active?: boolean
|
46
|
-
selected?: boolean
|
47
|
-
})
|
41
|
+
getReferenceProps: (userProps?: import("react").HTMLProps<Element>) => Record<string, unknown>;
|
42
|
+
getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement>) => Record<string, unknown>;
|
43
|
+
getItemProps: (userProps?: Omit<import("react").HTMLProps<HTMLElement>, "selected" | "active"> & {
|
44
|
+
active?: boolean;
|
45
|
+
selected?: boolean;
|
46
|
+
}) => Record<string, unknown>;
|
48
47
|
open: boolean;
|
49
48
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
50
49
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useSubMenu =
|
3
|
+
exports.useSubMenu = useSubMenu;
|
4
4
|
const react_1 = require("@floating-ui/react");
|
5
5
|
const react_2 = require("react");
|
6
6
|
function useSubMenu(options) {
|
@@ -32,7 +32,7 @@ function useSubMenu(options) {
|
|
32
32
|
handleClose: (0, react_1.safePolygon)(),
|
33
33
|
enabled: !options.isMobile,
|
34
34
|
});
|
35
|
-
const click = (0, react_1.useClick)(context, { enabled:
|
35
|
+
const click = (0, react_1.useClick)(context, { enabled: Boolean(options.isMobile) });
|
36
36
|
const focus = (0, react_1.useFocus)(context);
|
37
37
|
const dismiss = (0, react_1.useDismiss)(context);
|
38
38
|
const interactions = (0, react_1.useInteractions)([hover, click, focus, dismiss]);
|
@@ -43,4 +43,3 @@ function useSubMenu(options) {
|
|
43
43
|
...data,
|
44
44
|
}), [open, setOpen, interactions, data]);
|
45
45
|
}
|
46
|
-
exports.useSubMenu = useSubMenu;
|
package/lib/menu/ui/user-menu.js
CHANGED
@@ -25,6 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.UserMenu = void 0;
|
27
27
|
const classes_1 = require("@uxf/core/constants/classes");
|
28
|
+
const empty_array_1 = require("@uxf/core/constants/empty-array");
|
29
|
+
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
28
30
|
const icon_1 = require("@uxf/ui/icon");
|
29
31
|
const react_1 = __importStar(require("react"));
|
30
32
|
const avatar_1 = require("../../../ui/avatar");
|
@@ -40,12 +42,12 @@ const Component = (props) => {
|
|
40
42
|
react_1.default.createElement("div", { className: "uxf-cms-user-menu__label-wrapper" },
|
41
43
|
react_1.default.createElement("div", { className: "uxf-cms-user-menu__name" }, props.name),
|
42
44
|
react_1.default.createElement("div", { className: "uxf-cms-user-menu__roles" }, props.roles)),
|
43
|
-
react_1.default.createElement("div", { className: "uxf-cms-user-menu__caret-wrapper" }, hasSubmenu && (react_1.default.createElement(icon_1.Icon, {
|
44
|
-
isSubmenuOpen && (react_1.default.createElement("div", { className: "uxf-cms-user-menu__sub-menu" }, props.submenu.map((item, index) => (react_1.default.createElement(list_item_1.ListItem, { endElement: item.endElement, href: item.url,
|
45
|
+
react_1.default.createElement("div", { className: "uxf-cms-user-menu__caret-wrapper" }, hasSubmenu && (react_1.default.createElement(icon_1.Icon, { className: `uxf-cms-user-menu__caret ${!isSubmenuOpen ? classes_1.CLASSES.IS_OPEN : ""}`, name: "caretDown", size: 16 })))),
|
46
|
+
isSubmenuOpen && (react_1.default.createElement("div", { className: "uxf-cms-user-menu__sub-menu" }, props.submenu.map((item, index) => (react_1.default.createElement(list_item_1.ListItem, { endElement: item.endElement, href: item.url, icon: item.icon, key: index, label: item.title, params: item.routeParams, route: item.route })))))));
|
45
47
|
};
|
46
48
|
const UserMenu = (props) => {
|
47
49
|
var _a, _b, _c, _d, _e, _f;
|
48
|
-
const userMenu = props.menu.find((item) =>
|
49
|
-
return (react_1.default.createElement(Component, {
|
50
|
+
const userMenu = props.menu.find((item) => (0, is_not_nil_1.isNotNil)(item.userMenuData));
|
51
|
+
return (react_1.default.createElement(Component, { avatar: (_a = userMenu === null || userMenu === void 0 ? void 0 : userMenu.userMenuData) === null || _a === void 0 ? void 0 : _a.avatar, name: (_c = (_b = userMenu === null || userMenu === void 0 ? void 0 : userMenu.userMenuData) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : "Uživatel", roles: (_e = (_d = userMenu === null || userMenu === void 0 ? void 0 : userMenu.userMenuData) === null || _d === void 0 ? void 0 : _d.roles) !== null && _e !== void 0 ? _e : "nepřihlášený", submenu: (_f = userMenu === null || userMenu === void 0 ? void 0 : userMenu.children) !== null && _f !== void 0 ? _f : empty_array_1.EMPTY_ARRAY }));
|
50
52
|
};
|
51
53
|
exports.UserMenu = UserMenu;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uxf/cms",
|
3
|
-
"version": "11.
|
3
|
+
"version": "11.32.0",
|
4
4
|
"description": "UXF Cms",
|
5
5
|
"author": "UXFans <dev@uxf.cz>",
|
6
6
|
"homepage": "https://gitlab.com/uxf-npm/cms#readme",
|
@@ -28,20 +28,20 @@
|
|
28
28
|
"@dnd-kit/core": "6.1.0",
|
29
29
|
"@dnd-kit/sortable": "8.0.0",
|
30
30
|
"@dnd-kit/utilities": "3.2.2",
|
31
|
-
"@floating-ui/react": "0.26.
|
31
|
+
"@floating-ui/react": "0.26.23",
|
32
32
|
"@redux-devtools/extension": "3.3.0",
|
33
|
-
"@uxf/core": "11.
|
34
|
-
"@uxf/core-react": "11.
|
35
|
-
"@uxf/data-grid": "11.
|
36
|
-
"@uxf/form": "11.
|
37
|
-
"@uxf/router": "11.
|
38
|
-
"@uxf/ui": "11.
|
39
|
-
"@uxf/wysiwyg": "11.
|
40
|
-
"axios": "1.
|
33
|
+
"@uxf/core": "11.32.0",
|
34
|
+
"@uxf/core-react": "11.32.0",
|
35
|
+
"@uxf/data-grid": "11.32.0",
|
36
|
+
"@uxf/form": "11.32.0",
|
37
|
+
"@uxf/router": "11.32.0",
|
38
|
+
"@uxf/ui": "11.32.0",
|
39
|
+
"@uxf/wysiwyg": "11.32.0",
|
40
|
+
"axios": "1.7.5",
|
41
41
|
"axios-hooks": "5.0.2",
|
42
42
|
"es6-error": "4.1.1",
|
43
|
-
"qs": "6.
|
44
|
-
"react-hook-form": "7.
|
43
|
+
"qs": "6.13.0",
|
44
|
+
"react-hook-form": "7.53.0",
|
45
45
|
"react-redux": "8.1.3",
|
46
46
|
"redux": "4.2.1",
|
47
47
|
"swr": "2.2.5"
|
@@ -52,12 +52,12 @@
|
|
52
52
|
"react-dom": ">=18.2.0"
|
53
53
|
},
|
54
54
|
"devDependencies": {
|
55
|
-
"@types/node": "
|
56
|
-
"@types/qs": "6.9.
|
57
|
-
"@types/react": "18.
|
58
|
-
"@types/react-dom": "18.
|
59
|
-
"next": "14.
|
60
|
-
"react": "18.
|
61
|
-
"react-dom": "18.
|
55
|
+
"@types/node": "20.16.1",
|
56
|
+
"@types/qs": "6.9.15",
|
57
|
+
"@types/react": "18.3.5",
|
58
|
+
"@types/react-dom": "18.3.0",
|
59
|
+
"next": "14.2.6",
|
60
|
+
"react": "18.3.1",
|
61
|
+
"react-dom": "18.3.1"
|
62
62
|
}
|
63
63
|
}
|
@@ -20,9 +20,9 @@ const AddSectionButton = (props) => {
|
|
20
20
|
react_1.default.createElement(button_1.Button, { onClick: () => (0, modal_service_1.openModal)({
|
21
21
|
children: (react_1.default.createElement("div", { className: "px-4 py-6" },
|
22
22
|
react_1.default.createElement("h2", { className: "uxf-typo-h5 mb-4" }, "P\u0159idat sekci"),
|
23
|
-
react_1.default.createElement("div", { className: "space-y-4" }, props.contentComponents.map((component) => (react_1.default.createElement(button_1.Button, { key: component.getConfig().type,
|
23
|
+
react_1.default.createElement("div", { className: "space-y-4" }, props.contentComponents.map((component) => (react_1.default.createElement(button_1.Button, { isFullWidth: true, key: component.getConfig().type, onClick: () => props.createSection(component, props.index), variant: "secondary" }, component.getConfig().label)))))),
|
24
24
|
width: "sm",
|
25
|
-
}),
|
25
|
+
}), size: "sm", variant: "secondary" }, "P\u0159idat sekci")));
|
26
26
|
};
|
27
27
|
const FormContent = (props) => {
|
28
28
|
// eslint-disable-next-line react/destructuring-assignment
|
@@ -38,17 +38,17 @@ const FormContent = (props) => {
|
|
38
38
|
transition,
|
39
39
|
};
|
40
40
|
if (SectionContent) {
|
41
|
-
return (react_1.default.createElement("div", {
|
41
|
+
return (react_1.default.createElement("div", { className: "relative", ref: setNodeRef, style: style },
|
42
42
|
react_1.default.createElement("button", { type: "button", ...attributes, ...listeners, className: "absolute -left-7 top-6" },
|
43
|
-
react_1.default.createElement(icon_1.Icon, {
|
43
|
+
react_1.default.createElement(icon_1.Icon, { name: "grip-dots-vertical", size: 20 })),
|
44
44
|
react_1.default.createElement(paper_1.Paper, { className: "dark:bg-gray-800" },
|
45
|
-
react_1.default.createElement(SectionContent, {
|
45
|
+
react_1.default.createElement(SectionContent, { TypeInputProps: {
|
46
46
|
...field,
|
47
47
|
options: contentComponents.map((s) => ({
|
48
48
|
id: s.getConfig().type,
|
49
49
|
label: s.getConfig().label,
|
50
50
|
})),
|
51
|
-
} })),
|
51
|
+
}, control: control, id: id, index: index, name: `${name}.content`, onRemove: onRemove, title: SectionContent.getConfig().label })),
|
52
52
|
showAddButton && (react_1.default.createElement(AddSectionButton, { contentComponents: contentComponents, createSection: createSection, index: index }))));
|
53
53
|
}
|
54
54
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
@@ -56,7 +56,7 @@ const FormContent = (props) => {
|
|
56
56
|
react_1.default.createElement("div", null),
|
57
57
|
react_1.default.createElement("div", { className: "flex grow items-center justify-center" },
|
58
58
|
react_1.default.createElement("p", { className: "text-error font-bold" }, "Nepodporovan\u00E1 sekce")),
|
59
|
-
react_1.default.createElement(button_1.Button, {
|
59
|
+
react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: onRemove, size: "sm", variant: "secondary" },
|
60
60
|
react_1.default.createElement(icon_1.Icon, { name: "delete" }))),
|
61
61
|
react_1.default.createElement(AddSectionButton, { contentComponents: contentComponents, createSection: createSection, index: index })));
|
62
62
|
};
|
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.FormRootFields = void 0;
|
27
|
+
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
27
28
|
const checkbox_input_1 = require("@uxf/form/checkbox-input");
|
28
29
|
const combobox_1 = require("@uxf/form/combobox/combobox");
|
29
30
|
const datetime_picker_input_1 = require("@uxf/form/datetime-picker-input");
|
@@ -47,43 +48,43 @@ const FormRootFields = (props) => {
|
|
47
48
|
const { children, config, id, control } = props;
|
48
49
|
const [activeTab, setActiveTab] = (0, react_1.useState)("basic");
|
49
50
|
return (react_1.default.createElement("div", { className: "pb-2 pt-4" },
|
50
|
-
react_1.default.createElement(tabs_1.Tabs, {
|
51
|
-
react_1.default.createElement(tabs_1.Tabs.Panel, {
|
51
|
+
react_1.default.createElement(tabs_1.Tabs, { onChange: setActiveTab, value: activeTab },
|
52
|
+
react_1.default.createElement(tabs_1.Tabs.Panel, { label: "Z\u00E1kladn\u00ED", name: "basic" },
|
52
53
|
react_1.default.createElement("div", { className: "space-y-8 px-4 pb-4" },
|
53
54
|
config.allowedTypes && (react_1.default.createElement("div", null,
|
54
|
-
react_1.default.createElement(select_1.Select, {
|
55
|
+
react_1.default.createElement(select_1.Select, { control: control, isReadOnly: (0, is_not_nil_1.isNotNil)(id), isRequired: true, label: "Typ", name: "type", options: config.allowedTypes }))),
|
55
56
|
react_1.default.createElement("div", null,
|
56
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
57
|
+
react_1.default.createElement(text_input_1.TextInput, { control: control, isRequired: true, label: "Nadpis", name: "name" })),
|
57
58
|
!((_a = config.hide) === null || _a === void 0 ? void 0 : _a.publishedAt) && (react_1.default.createElement("div", null,
|
58
|
-
react_1.default.createElement(datetime_picker_input_1.DatetimePickerInput, {
|
59
|
+
react_1.default.createElement(datetime_picker_input_1.DatetimePickerInput, { control: control, isRequired: true, label: "Datum publikace", name: "publishedAt" }))),
|
59
60
|
!((_b = config.hide) === null || _b === void 0 ? void 0 : _b.perex) && (react_1.default.createElement("div", null,
|
60
|
-
react_1.default.createElement(textarea_1.Textarea, {
|
61
|
+
react_1.default.createElement(textarea_1.Textarea, { control: control, label: "Perex", name: "perex", rows: 3 }))),
|
61
62
|
!((_c = config.hide) === null || _c === void 0 ? void 0 : _c.author) && (react_1.default.createElement("div", null,
|
62
|
-
react_1.default.createElement(combobox_1.Combobox, {
|
63
|
+
react_1.default.createElement(combobox_1.Combobox, { control: control, label: "Autor", loadOptions: (term) => (0, api_1.autocomplete)(null, { name: "content-author" }, { term }).then((r) => r.data), name: "author" }))),
|
63
64
|
!((_d = config.hide) === null || _d === void 0 ? void 0 : _d.category) && (react_1.default.createElement("div", null,
|
64
|
-
react_1.default.createElement(combobox_1.Combobox, {
|
65
|
+
react_1.default.createElement(combobox_1.Combobox, { control: control, label: "Kategorie", loadOptions: (term) => (0, api_1.autocomplete)(null, { name: "content-category" }, { term }).then((r) => r.data), name: "category" }))),
|
65
66
|
react_1.default.createElement("div", null,
|
66
|
-
react_1.default.createElement(multi_combobox_1.MultiCombobox, {
|
67
|
+
react_1.default.createElement(multi_combobox_1.MultiCombobox, { control: control, label: "Tagy", loadOptions: (term) => (0, api_1.autocomplete)(null, { name: "content-tag" }, { term }).then((r) => r.data), name: "tags" })),
|
67
68
|
!((_e = config.hide) === null || _e === void 0 ? void 0 : _e.image) && (react_1.default.createElement("div", null,
|
68
|
-
react_1.default.createElement(file_input_1.FileInput, {
|
69
|
+
react_1.default.createElement(file_input_1.FileInput, { control: control, id: "image", label: "Hlavn\u00ED obr\u00E1zek", name: "image", onUploadFile: on_upload_file_1.onUploadFile }))),
|
69
70
|
react_1.default.createElement("div", null,
|
70
|
-
react_1.default.createElement(checkbox_input_1.CheckboxInput, {
|
71
|
+
react_1.default.createElement(checkbox_input_1.CheckboxInput, { control: control, label: "Aktivn\u00ED", name: "active" })),
|
71
72
|
react_1.default.createElement("div", null,
|
72
|
-
react_1.default.createElement(select_1.Select, {
|
73
|
-
react_1.default.createElement(tabs_1.Tabs.Panel, {
|
73
|
+
react_1.default.createElement(select_1.Select, { control: control, isRequired: true, label: "Viditelnost", name: "visibilityLevel", options: options })))),
|
74
|
+
react_1.default.createElement(tabs_1.Tabs.Panel, { label: "SEO", name: "seo" },
|
74
75
|
react_1.default.createElement("div", { className: "space-y-8 px-4 pb-4" },
|
75
76
|
react_1.default.createElement("div", null,
|
76
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
77
|
+
react_1.default.createElement(text_input_1.TextInput, { control: control, helperText: "Slug = unik\u00E1tn\u00ED koncovka URL adresy", label: "Slug", name: "seo.name" })),
|
77
78
|
!((_g = (_f = config.hide) === null || _f === void 0 ? void 0 : _f.seo) === null || _g === void 0 ? void 0 : _g.title) && (react_1.default.createElement("div", null,
|
78
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
79
|
+
react_1.default.createElement(text_input_1.TextInput, { control: control, label: "Nadpis", name: "seo.title" }))),
|
79
80
|
!((_j = (_h = config.hide) === null || _h === void 0 ? void 0 : _h.seo) === null || _j === void 0 ? void 0 : _j.description) && (react_1.default.createElement("div", null,
|
80
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
81
|
+
react_1.default.createElement(text_input_1.TextInput, { control: control, label: "Popis", name: "seo.description" }))),
|
81
82
|
!((_l = (_k = config.hide) === null || _k === void 0 ? void 0 : _k.seo) === null || _l === void 0 ? void 0 : _l.ogTitle) && (react_1.default.createElement("div", null,
|
82
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
83
|
+
react_1.default.createElement(text_input_1.TextInput, { control: control, helperText: "Nadpis kter\u00FD bude zobrazen p\u0159i sd\u00EDlen\u00ED na Facebooku, ...", label: "OG nadpis", name: "seo.ogTitle" }))),
|
83
84
|
!((_o = (_m = config.hide) === null || _m === void 0 ? void 0 : _m.seo) === null || _o === void 0 ? void 0 : _o.ogDescription) && (react_1.default.createElement("div", null,
|
84
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
85
|
+
react_1.default.createElement(text_input_1.TextInput, { control: control, helperText: "Popis kter\u00FD bude zobrazen p\u0159i sd\u00EDlen\u00ED na Facebooku, ...", label: "OG popis", name: "seo.ogDescription" }))),
|
85
86
|
!((_q = (_p = config.hide) === null || _p === void 0 ? void 0 : _p.seo) === null || _q === void 0 ? void 0 : _q.ogImage) && (react_1.default.createElement("div", null,
|
86
|
-
react_1.default.createElement(file_input_1.FileInput, {
|
87
|
+
react_1.default.createElement(file_input_1.FileInput, { control: control, helperText: "Obr\u00E1zek kter\u00FD bude zobrazen p\u0159i sd\u00EDlen\u00ED na Facebooku, ...", id: "seo.ogImage", label: "OG obr\u00E1zek", name: "seo.ogImage", onUploadFile: on_upload_file_1.onUploadFile })))))),
|
87
88
|
children));
|
88
89
|
};
|
89
90
|
exports.FormRootFields = FormRootFields;
|
@@ -47,9 +47,9 @@ const Form = (props) => {
|
|
47
47
|
return (react_1.default.createElement(form_1.Form, { formApi: formApi, id: constants_1.CONTENT_BUILDER_FORM_ID, onSubmit: props.onSubmit },
|
48
48
|
react_1.default.createElement("div", { className: "flex flex-col-reverse overflow-hidden xl:h-[calc(var(--viewport-height)-var(--header-height))] xl:flex-row", style: { "--viewport-height": height, "--header-height": (0, rem_1.rem)(headerHeight) } },
|
49
49
|
react_1.default.createElement(details_visibility_context_1.DetailsVisibilityProvider, null,
|
50
|
-
react_1.default.createElement(content_field_1.ContentField, {
|
50
|
+
react_1.default.createElement(content_field_1.ContentField, { contentComponents: props.config.contentComponents, control: formApi.control, name: "content" })),
|
51
51
|
react_1.default.createElement("div", { className: "basis-[500px] bg-white px-4 pb-8 xl:overflow-y-auto dark:bg-gray-950" },
|
52
52
|
react_1.default.createElement("h2", { className: "uxf-typo-h5 px-4 pb-4 pt-6" }, "Nastaven\u00ED"),
|
53
|
-
react_1.default.createElement(form_root_fields_1.FormRootFields, { config: props.config,
|
53
|
+
react_1.default.createElement(form_root_fields_1.FormRootFields, { config: props.config, control: formApi.control, id: props.id })))));
|
54
54
|
};
|
55
55
|
exports.Form = Form;
|
@@ -39,6 +39,6 @@ const Header = (props) => {
|
|
39
39
|
react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("cs"), size: "sm", variant: language === "cs" ? "default" : "secondary" }, "CS"),
|
40
40
|
react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("en"), size: "sm", variant: language === "en" ? "default" : "secondary" }, "EN"),
|
41
41
|
react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("de"), size: "sm", variant: language === "de" ? "default" : "secondary" }, "DE")),
|
42
|
-
react_1.default.createElement("button", {
|
42
|
+
react_1.default.createElement("button", { className: "uxf-button uxf-button--color-default uxf-button--size-default uxf-button--variant-default is-hoverable", form: constants_1.CONTENT_BUILDER_FORM_ID, type: "submit" }, "Ulo\u017Eit")))));
|
43
43
|
};
|
44
44
|
exports.Header = Header;
|
@@ -21,9 +21,9 @@ const FeatureSection = (props) => {
|
|
21
21
|
visibility && (react_1.default.createElement("div", { className: "p-4" },
|
22
22
|
react_1.default.createElement("div", { className: "mt-2 grid grid-cols-12 gap-4" },
|
23
23
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
24
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
24
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, isRequired: true, label: "Nadpis", name: `${props.name}.title` })),
|
25
25
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
26
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
26
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "Podnadpis", name: `${props.name}.subtitle` })),
|
27
27
|
react_1.default.createElement("div", { className: "col-span-12" },
|
28
28
|
fields.map((field, index) => {
|
29
29
|
const handleRemove = () => {
|
@@ -32,24 +32,24 @@ const FeatureSection = (props) => {
|
|
32
32
|
remove(index);
|
33
33
|
}
|
34
34
|
};
|
35
|
-
return (react_1.default.createElement("div", {
|
35
|
+
return (react_1.default.createElement("div", { className: "border-primary mb-8 border-l-2 pl-8", key: field.id },
|
36
36
|
react_1.default.createElement("div", { className: "flex justify-between" },
|
37
37
|
react_1.default.createElement("h4", { className: "uxf-typo-h6" },
|
38
38
|
"Feature #",
|
39
39
|
index + 1),
|
40
40
|
index > 0 ? (react_1.default.createElement("div", null,
|
41
|
-
react_1.default.createElement(button_1.Button, { size: "sm", variant: "secondary"
|
41
|
+
react_1.default.createElement(button_1.Button, { onClick: handleRemove, size: "sm", variant: "secondary" }, "Smazat feature"))) : (react_1.default.createElement("div", null))),
|
42
42
|
react_1.default.createElement("div", { className: "mt-2 grid grid-cols-12 gap-4" },
|
43
43
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
44
|
-
react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.features[${index}].title
|
44
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, isRequired: true, label: "Nadpis", name: `${props.name}.features[${index}].title` })),
|
45
45
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
46
|
-
react_1.default.createElement(file_input_1.FileInput, { id: `${props.name}.features[${index}].image`, name: `${props.name}.features[${index}].image`,
|
46
|
+
react_1.default.createElement(file_input_1.FileInput, { control: props.control, id: `${props.name}.features[${index}].image`, label: "Obr\u00E1zek", name: `${props.name}.features[${index}].image`, onUploadFile: on_upload_dropzone_file_1.onUploadDropzoneFile })),
|
47
47
|
react_1.default.createElement("div", { className: "col-span-12" },
|
48
|
-
react_1.default.createElement(wysiwyg_input_1.WysiwygInput, { name: `${props.name}.features[${index}].text
|
48
|
+
react_1.default.createElement(wysiwyg_input_1.WysiwygInput, { control: props.control, name: `${props.name}.features[${index}].text` })),
|
49
49
|
react_1.default.createElement("div", { className: "col-span-12" },
|
50
|
-
react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.features[${index}].ctaUrl
|
50
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "CTA url", name: `${props.name}.features[${index}].ctaUrl` })))));
|
51
51
|
}),
|
52
|
-
react_1.default.createElement(button_1.Button, {
|
52
|
+
react_1.default.createElement(button_1.Button, { onClick: () => append({ title: "" }), size: "sm", variant: "secondary" }, "P\u0159idat feature")))))));
|
53
53
|
};
|
54
54
|
exports.FeatureSection = FeatureSection;
|
55
55
|
exports.FeatureSection.getConfig = () => ({
|
@@ -16,7 +16,7 @@ const Gallery = (props) => {
|
|
16
16
|
return (react_1.default.createElement("div", { className: "divide-lightBorder dark:divide-darkBorder divide-y" },
|
17
17
|
react_1.default.createElement(content_header_1.ContentHeader, { ...props }),
|
18
18
|
visibility && (react_1.default.createElement("div", { className: "p-4" },
|
19
|
-
react_1.default.createElement(dropzone_input_1.DropzoneInput, { name: `${props.name}.images`,
|
19
|
+
react_1.default.createElement(dropzone_input_1.DropzoneInput, { control: props.control, name: `${props.name}.images`, onUploadFile: on_upload_dropzone_file_1.onUploadDropzoneFile }),
|
20
20
|
react_1.default.createElement(dropzone_list_1.DropzoneList, { control: props.control, name: `${props.name}.images`, onRemoveConfirm: on_remove_confirm_1.onRemoveConfirm })))));
|
21
21
|
};
|
22
22
|
exports.Gallery = Gallery;
|
@@ -16,13 +16,13 @@ const HeroSection = (props) => {
|
|
16
16
|
visibility && (react_1.default.createElement("div", { className: "p-4" },
|
17
17
|
react_1.default.createElement("div", { className: "mt-2 grid grid-cols-12 gap-4" },
|
18
18
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
19
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
19
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, isRequired: true, label: "Nadpis", name: `${props.name}.title` })),
|
20
20
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
21
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
21
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "Podnadpis", name: `${props.name}.subtitle` })),
|
22
22
|
react_1.default.createElement("div", { className: "col-span-12" },
|
23
|
-
react_1.default.createElement(wysiwyg_input_1.WysiwygInput, { name: `${props.name}.text
|
23
|
+
react_1.default.createElement(wysiwyg_input_1.WysiwygInput, { control: props.control, name: `${props.name}.text` })),
|
24
24
|
react_1.default.createElement("div", { className: "col-span-12" },
|
25
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
25
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "CTA url", name: `${props.name}.ctaUrl` })))))));
|
26
26
|
};
|
27
27
|
exports.HeroSection = HeroSection;
|
28
28
|
exports.HeroSection.getConfig = () => ({
|
@@ -26,28 +26,28 @@ const People = (props) => {
|
|
26
26
|
remove(index);
|
27
27
|
}
|
28
28
|
};
|
29
|
-
return (react_1.default.createElement("div", {
|
29
|
+
return (react_1.default.createElement("div", { className: "border-primary mb-8 border-l-2 pl-8", key: field.id },
|
30
30
|
react_1.default.createElement("div", { className: "flex justify-between" },
|
31
31
|
react_1.default.createElement("h4", { className: "uxf-typo-h6 mb-3 pt-1" },
|
32
32
|
"Osoba #",
|
33
33
|
index + 1),
|
34
34
|
index > 0 ? (react_1.default.createElement("div", null,
|
35
|
-
react_1.default.createElement(button_1.Button, { size: "sm", variant: "secondary"
|
35
|
+
react_1.default.createElement(button_1.Button, { onClick: handleRemove, size: "sm", variant: "secondary" }, "Smazat osobu"))) : (react_1.default.createElement("div", null))),
|
36
36
|
react_1.default.createElement("div", { className: "mt-2 grid grid-cols-12 gap-4" },
|
37
37
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
38
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
38
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, isRequired: true, label: "Jm\u00E9no", name: `${props.name}.people.${index}.name` })),
|
39
39
|
react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
|
40
|
-
react_1.default.createElement(file_input_1.FileInput, { id: `${props.name}.people.${index}.image`, name: `${props.name}.people.${index}.image`,
|
40
|
+
react_1.default.createElement(file_input_1.FileInput, { control: props.control, id: `${props.name}.people.${index}.image`, label: "Obr\u00E1zek", name: `${props.name}.people.${index}.image`, onUploadFile: on_upload_file_1.onUploadFile })),
|
41
41
|
react_1.default.createElement("div", { className: "col-span-12" },
|
42
|
-
react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.people.${index}.subtitle
|
42
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "Popisek", name: `${props.name}.people.${index}.subtitle` })),
|
43
43
|
react_1.default.createElement("div", { className: "col-span-12" },
|
44
|
-
react_1.default.createElement(textarea_1.Textarea, { name: `${props.name}.people.${index}.text`,
|
44
|
+
react_1.default.createElement(textarea_1.Textarea, { control: props.control, label: "Text", name: `${props.name}.people.${index}.text`, rows: 2 })),
|
45
45
|
react_1.default.createElement("div", { className: "col-span-6" },
|
46
|
-
react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.people.${index}.phone`,
|
46
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "Telefon", name: `${props.name}.people.${index}.phone`, type: "tel" })),
|
47
47
|
react_1.default.createElement("div", { className: "col-span-6" },
|
48
|
-
react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.people.${index}.email`,
|
48
|
+
react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "E-mail", name: `${props.name}.people.${index}.email`, type: "email" })))));
|
49
49
|
}),
|
50
|
-
react_1.default.createElement(button_1.Button, {
|
50
|
+
react_1.default.createElement(button_1.Button, { onClick: () => append({ name: "" }), size: "sm", variant: "secondary" }, "P\u0159idat osobu")))));
|
51
51
|
};
|
52
52
|
exports.People = People;
|
53
53
|
exports.People.getConfig = () => ({
|
@@ -11,8 +11,8 @@ const details_visibility_context_1 = require("../context/details-visibility-cont
|
|
11
11
|
const Wysiwyg = (props) => {
|
12
12
|
const [visibility] = (0, details_visibility_context_1.useDetailsVisibilityForSection)(props.id);
|
13
13
|
return (react_1.default.createElement("div", { className: "divide-lightBorder dark:divide-darkBorder divide-y" },
|
14
|
-
react_1.default.createElement(content_header_1.ContentHeader, {
|
15
|
-
visibility && (react_1.default.createElement(wysiwyg_input_1.WysiwygInput, { allPluginsOptions: props.allPluginsOptions,
|
14
|
+
react_1.default.createElement(content_header_1.ContentHeader, { TypeInputProps: props.TypeInputProps, control: props.control, id: props.id, index: props.index, name: props.name, onRemove: props.onRemove, title: props.title }),
|
15
|
+
visibility && (react_1.default.createElement(wysiwyg_input_1.WysiwygInput, { allPluginsOptions: props.allPluginsOptions, className: "p-4", control: props.control, editorProps: props.editorProps, isRequired: true, label: "Text", name: `${props.name}.content`, placeholder: "Zadejte text", plugins: props.plugins }))));
|
16
16
|
};
|
17
17
|
exports.Wysiwyg = Wysiwyg;
|
18
18
|
const defaultGetConfig = () => ({
|
@@ -85,12 +85,12 @@ const ContentBuilderPageComponent = (props) => {
|
|
85
85
|
}, [onSubmit, onSubmitSuccess, props.id, props.config]);
|
86
86
|
return (react_1.default.createElement(Layout, null,
|
87
87
|
react_1.default.createElement("div", { className: "-mx-4 md:-mx-10" },
|
88
|
-
react_1.default.createElement(form_1.Form, { config: props.config, id: props.id, onSubmit: handleSubmit
|
88
|
+
react_1.default.createElement(form_1.Form, { config: props.config, defaultValues: props.initialValues, id: props.id, onSubmit: handleSubmit }))));
|
89
89
|
};
|
90
90
|
ContentBuilderPageComponent.displayName = "ContentBuilderComponent";
|
91
91
|
const ContentBuilderPage = (config) => {
|
92
92
|
const Page = (props) => {
|
93
|
-
return react_1.default.createElement(ContentBuilderPageComponent, { config: config,
|
93
|
+
return react_1.default.createElement(ContentBuilderPageComponent, { config: config, id: props.id, initialValues: props.initialValues });
|
94
94
|
};
|
95
95
|
Page.getInitialProps = async (ctx) => {
|
96
96
|
var _a, _b;
|