@uxf/cms 11.126.0 → 11.127.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.
|
@@ -70,10 +70,18 @@ function WysiwygInput(props) {
|
|
|
70
70
|
const generatedId = (0, react_1.useId)();
|
|
71
71
|
const id = (_a = props.id) !== null && _a !== void 0 ? _a : generatedId;
|
|
72
72
|
const innerRef = (0, react_1.useRef)(null);
|
|
73
|
+
const editorRef = (0, react_1.useRef)(null);
|
|
73
74
|
const input = (0, use_input_focus_1.useInputFocus)(innerRef, props.onBlur, props.onFocus);
|
|
74
75
|
const isInvalid = (0, is_not_nil_1.isNotNil)(fieldState.error);
|
|
75
76
|
const errorId = isInvalid ? `${props.id}--error-message` : undefined;
|
|
76
77
|
const rootClassName = (0, cx_1.cx)("uxf-text-input", ((_b = props.isFocused) !== null && _b !== void 0 ? _b : input.focused) && classes_1.CLASSES.IS_FOCUSED, props.isDisabled && classes_1.CLASSES.IS_DISABLED, isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.isRequired && classes_1.CLASSES.IS_REQUIRED, props.className);
|
|
78
|
+
const onFocus = (0, react_1.useCallback)((e) => {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
input.onFocus(e);
|
|
81
|
+
(_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
82
|
+
// Trigger editor focus via ref
|
|
83
|
+
(_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
84
|
+
}, [input, props]);
|
|
77
85
|
const onBlur = (0, react_1.useCallback)((e) => {
|
|
78
86
|
var _a;
|
|
79
87
|
field.onBlur();
|
|
@@ -88,10 +96,10 @@ function WysiwygInput(props) {
|
|
|
88
96
|
disabled: props.isDisabled,
|
|
89
97
|
form: props.form,
|
|
90
98
|
onBlur,
|
|
91
|
-
onFocus
|
|
99
|
+
onFocus,
|
|
92
100
|
onKeyDown: props.onKeyDown,
|
|
93
101
|
placeholder: props.placeholder,
|
|
94
102
|
readOnly: props.isReadOnly,
|
|
95
103
|
required: props.isRequired,
|
|
96
|
-
}, id: id, initialValue: field.value, onChange: field.onChange, plugins: plugins, ...props.editorProps })));
|
|
104
|
+
}, editorRef: editorRef, id: id, initialValue: field.value, onChange: field.onChange, plugins: plugins, ...props.editorProps })));
|
|
97
105
|
}
|
|
@@ -23,8 +23,8 @@ export declare function useSubMenu(options: SubMenuOptions): {
|
|
|
23
23
|
context: {
|
|
24
24
|
x: number;
|
|
25
25
|
y: number;
|
|
26
|
-
strategy: import("@floating-ui/utils").Strategy;
|
|
27
26
|
placement: import("@floating-ui/utils").Placement;
|
|
27
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
28
28
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
29
29
|
isPositioned: boolean;
|
|
30
30
|
update: () => void;
|
package/lib/menu/ui/user-menu.js
CHANGED
|
@@ -51,7 +51,7 @@ const Component = (props) => {
|
|
|
51
51
|
react_1.default.createElement("button", { className: "uxf-cms-user-menu__button", onClick: toggle },
|
|
52
52
|
react_1.default.createElement(avatar_1.Avatar, { className: "uxf-cms-user-menu__avatar", letters: (0, get_avatar_user_letters_1.getAvatarUserLetters)(props.name), size: "sm", src: props.avatar, variant: "rounded" }),
|
|
53
53
|
react_1.default.createElement("div", { className: "uxf-cms-user-menu__label-wrapper" },
|
|
54
|
-
react_1.default.createElement("div", { className: "uxf-cms-user-menu__name" }, props.name),
|
|
54
|
+
react_1.default.createElement("div", { className: "uxf-cms-user-menu__name", "data-testid": "cms-user-menu-name" }, props.name),
|
|
55
55
|
react_1.default.createElement("div", { className: "uxf-cms-user-menu__roles" }, props.roles)),
|
|
56
56
|
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 })))),
|
|
57
57
|
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 })))))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/cms",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.127.0",
|
|
4
4
|
"description": "UXF Cms",
|
|
5
5
|
"author": "UXFans <dev@uxf.cz>",
|
|
6
6
|
"homepage": "https://gitlab.com/uxf-npm/cms#readme",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@dnd-kit/sortable": "^10.0.0",
|
|
33
33
|
"@dnd-kit/utilities": "^3.2.2",
|
|
34
34
|
"@floating-ui/react": "^0.27.20",
|
|
35
|
-
"@uxf/core": "11.
|
|
36
|
-
"@uxf/core-react": "11.
|
|
37
|
-
"@uxf/data-grid": "11.
|
|
38
|
-
"@uxf/form": "11.
|
|
39
|
-
"@uxf/router": "11.
|
|
40
|
-
"@uxf/styles": "11.
|
|
41
|
-
"@uxf/ui": "11.
|
|
42
|
-
"@uxf/wysiwyg": "11.
|
|
35
|
+
"@uxf/core": "11.127.0",
|
|
36
|
+
"@uxf/core-react": "11.127.0",
|
|
37
|
+
"@uxf/data-grid": "11.127.0",
|
|
38
|
+
"@uxf/form": "11.127.0",
|
|
39
|
+
"@uxf/router": "11.127.0",
|
|
40
|
+
"@uxf/styles": "11.127.0",
|
|
41
|
+
"@uxf/ui": "11.127.0",
|
|
42
|
+
"@uxf/wysiwyg": "11.127.0",
|
|
43
43
|
"axios": "^1.19.0",
|
|
44
44
|
"axios-hooks": "^5.1.1",
|
|
45
45
|
"next": ">=13.2.0",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"@types/node": "24",
|
|
57
57
|
"@types/react": "18.3.31",
|
|
58
58
|
"@types/react-dom": "18.3.7",
|
|
59
|
-
"@uxf/core": "11.
|
|
60
|
-
"@uxf/core-react": "11.
|
|
61
|
-
"@uxf/data-grid": "11.
|
|
62
|
-
"@uxf/form": "11.
|
|
63
|
-
"@uxf/router": "11.
|
|
64
|
-
"@uxf/styles": "11.
|
|
65
|
-
"@uxf/ui": "11.
|
|
66
|
-
"@uxf/wysiwyg": "11.
|
|
59
|
+
"@uxf/core": "11.127.0",
|
|
60
|
+
"@uxf/core-react": "11.127.0",
|
|
61
|
+
"@uxf/data-grid": "11.127.0",
|
|
62
|
+
"@uxf/form": "11.127.0",
|
|
63
|
+
"@uxf/router": "11.127.0",
|
|
64
|
+
"@uxf/styles": "11.127.0",
|
|
65
|
+
"@uxf/ui": "11.127.0",
|
|
66
|
+
"@uxf/wysiwyg": "11.127.0",
|
|
67
67
|
"axios": "^1.19.0",
|
|
68
68
|
"axios-hooks": "^5.1.1",
|
|
69
69
|
"next": "16.3.0",
|