@uxf/cms 15.2.0 → 15.3.1
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022–2026 UX Fans s.r.o.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @uxf/cms
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@uxf/cms)
|
|
4
|
+
|
|
3
5
|
Building blocks for UXF admin / CMS applications: authentication pages and forms, a role-gated page wrapper, an admin layout shell (layout, sidebar, menu, breadcrumbs), a data-grid listing page, a structured content builder, and typed clients for the UXF CMS backend (`/api/cms/*`). It composes `@uxf/ui`, `@uxf/form`, `@uxf/data-grid` and `@uxf/wysiwyg` rather than replacing them.
|
|
4
6
|
|
|
5
7
|
The package has no root entry — everything is consumed through subpath imports (e.g. `import { LoginPage } from "@uxf/cms/pages/login-page"`). It is Next.js-oriented: pages use `getInitialProps` and `next/router`.
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--uxf-cb-header-height: theme("height.14");
|
|
3
|
+
--uxf-cb-surface-color: theme("colors.white");
|
|
4
|
+
|
|
5
|
+
& .dark {
|
|
6
|
+
--uxf-cb-surface-color: theme("colors.gray.900");
|
|
7
|
+
}
|
|
3
8
|
}
|
|
4
9
|
|
|
5
10
|
.uxf-cb {
|
|
6
11
|
&__header {
|
|
7
12
|
align-items: center;
|
|
8
|
-
background-color:
|
|
13
|
+
background-color: var(--uxf-cb-surface-color);
|
|
9
14
|
display: flex;
|
|
10
15
|
height: var(--uxf-cb-header-height);
|
|
11
16
|
justify-content: space-between;
|
|
@@ -42,7 +47,7 @@
|
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
&__sidebar {
|
|
45
|
-
background-color:
|
|
50
|
+
background-color: var(--uxf-cb-surface-color);
|
|
46
51
|
flex-shrink: 0;
|
|
47
52
|
overflow-y: auto;
|
|
48
53
|
padding: theme("space.4") theme("space.4") theme("space.16");
|
|
@@ -26,7 +26,7 @@ function Default() {
|
|
|
26
26
|
const formApi = (0, use_content_builder_form_api_1.useContentBuilderFormApi)(t0);
|
|
27
27
|
let t1;
|
|
28
28
|
if ($[1] !== formApi) {
|
|
29
|
-
t1 = react_1.default.createElement("div", { className: "bg-neutral-200" },
|
|
29
|
+
t1 = react_1.default.createElement("div", { className: "bg-neutral-200 dark:bg-gray-950" },
|
|
30
30
|
react_1.default.createElement(content_builder_1.ContentBuilder, { ContentComponents: Contents, formApi: formApi, onSubmit: console.log }));
|
|
31
31
|
$[1] = formApi;
|
|
32
32
|
$[2] = t1;
|
|
@@ -42,6 +42,7 @@ const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
|
|
42
42
|
const use_input_focus_1 = require("@uxf/core-react/hooks/use-input-focus");
|
|
43
43
|
const translations_1 = require("@uxf/core-react/translations");
|
|
44
44
|
const form_component_1 = require("@uxf/ui/form-component");
|
|
45
|
+
const get_error_id_1 = require("@uxf/ui/utils/get-error-id");
|
|
45
46
|
const wysiwyg_1 = require("@uxf/wysiwyg");
|
|
46
47
|
const create_all_plugins_with_ui_1 = require("@uxf/wysiwyg/create-all-plugins-with-ui");
|
|
47
48
|
const react_1 = __importStar(require("react"));
|
|
@@ -49,7 +50,7 @@ const react_hook_form_1 = require("react-hook-form");
|
|
|
49
50
|
const api_1 = require("../../../api");
|
|
50
51
|
function WysiwygInput(props) {
|
|
51
52
|
var _a, _b, _d, _e, _f;
|
|
52
|
-
const $ = (0, compiler_runtime_1.c)(
|
|
53
|
+
const $ = (0, compiler_runtime_1.c)(67);
|
|
53
54
|
const t = (0, translations_1.useUxfTranslation)();
|
|
54
55
|
let t0;
|
|
55
56
|
if ($[0] !== props.isRequired || $[1] !== props.requiredMessage || $[2] !== t) {
|
|
@@ -117,67 +118,71 @@ function WysiwygInput(props) {
|
|
|
117
118
|
const editorRef = (0, react_1.useRef)(null);
|
|
118
119
|
const input = (0, use_input_focus_1.useInputFocus)(innerRef, props.onBlur, props.onFocus);
|
|
119
120
|
let errorId;
|
|
121
|
+
let helperText;
|
|
120
122
|
let isInvalid;
|
|
121
123
|
let t4;
|
|
122
|
-
if ($[16] !== fieldState.error || $[17] !==
|
|
124
|
+
if ($[16] !== fieldState.error || $[17] !== id || $[18] !== input || $[19] !== props._isFocused || $[20] !== props.className || $[21] !== props.helperText || $[22] !== props.isDisabled || $[23] !== props.isReadOnly || $[24] !== props.isRequired) {
|
|
123
125
|
isInvalid = (0, is_not_nil_1.isNotNil)(fieldState.error);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
helperText = (_e = (_d = fieldState.error) === null || _d === void 0 ? void 0 : _d.message) !== null && _e !== void 0 ? _e : props.helperText;
|
|
127
|
+
errorId = (0, get_error_id_1.getErrorId)(id, isInvalid, helperText);
|
|
128
|
+
t4 = (0, cx_1.cx)("uxf-text-input", ((_f = props._isFocused) !== null && _f !== void 0 ? _f : 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);
|
|
126
129
|
$[16] = fieldState.error;
|
|
127
|
-
$[17] =
|
|
128
|
-
$[18] =
|
|
129
|
-
$[19] = props.
|
|
130
|
-
$[20] = props.
|
|
131
|
-
$[21] = props.
|
|
132
|
-
$[22] = props.
|
|
133
|
-
$[23] = props.
|
|
134
|
-
$[24] =
|
|
135
|
-
$[25] =
|
|
136
|
-
$[26] =
|
|
130
|
+
$[17] = id;
|
|
131
|
+
$[18] = input;
|
|
132
|
+
$[19] = props._isFocused;
|
|
133
|
+
$[20] = props.className;
|
|
134
|
+
$[21] = props.helperText;
|
|
135
|
+
$[22] = props.isDisabled;
|
|
136
|
+
$[23] = props.isReadOnly;
|
|
137
|
+
$[24] = props.isRequired;
|
|
138
|
+
$[25] = errorId;
|
|
139
|
+
$[26] = helperText;
|
|
140
|
+
$[27] = isInvalid;
|
|
141
|
+
$[28] = t4;
|
|
137
142
|
}
|
|
138
143
|
else {
|
|
139
|
-
errorId = $[
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
errorId = $[25];
|
|
145
|
+
helperText = $[26];
|
|
146
|
+
isInvalid = $[27];
|
|
147
|
+
t4 = $[28];
|
|
142
148
|
}
|
|
143
149
|
const rootClassName = t4;
|
|
144
150
|
let t5;
|
|
145
|
-
if ($[
|
|
151
|
+
if ($[29] !== input || $[30] !== props) {
|
|
146
152
|
t5 = e => {
|
|
147
153
|
var _a, _b;
|
|
148
154
|
input.onFocus(e);
|
|
149
155
|
(_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
150
156
|
(_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
151
157
|
};
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
158
|
+
$[29] = input;
|
|
159
|
+
$[30] = props;
|
|
160
|
+
$[31] = t5;
|
|
155
161
|
}
|
|
156
162
|
else {
|
|
157
|
-
t5 = $[
|
|
163
|
+
t5 = $[31];
|
|
158
164
|
}
|
|
159
165
|
const onFocus = t5;
|
|
160
166
|
let t6;
|
|
161
|
-
if ($[
|
|
167
|
+
if ($[32] !== field || $[33] !== input || $[34] !== props) {
|
|
162
168
|
t6 = e_0 => {
|
|
163
169
|
var _a;
|
|
164
170
|
field.onBlur();
|
|
165
171
|
input.onBlur(e_0);
|
|
166
172
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e_0);
|
|
167
173
|
};
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
174
|
+
$[32] = field;
|
|
175
|
+
$[33] = input;
|
|
176
|
+
$[34] = props;
|
|
177
|
+
$[35] = t6;
|
|
172
178
|
}
|
|
173
179
|
else {
|
|
174
|
-
t6 = $[
|
|
180
|
+
t6 = $[35];
|
|
175
181
|
}
|
|
176
182
|
const onBlur = t6;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
t8 = {
|
|
183
|
+
let t7;
|
|
184
|
+
if ($[36] !== errorId || $[37] !== isInvalid || $[38] !== onBlur || $[39] !== onFocus || $[40] !== props.autoComplete || $[41] !== props.form || $[42] !== props.isDisabled || $[43] !== props.isReadOnly || $[44] !== props.isRequired || $[45] !== props.onKeyDown || $[46] !== props.placeholder) {
|
|
185
|
+
t7 = {
|
|
181
186
|
"aria-describedby": errorId,
|
|
182
187
|
"aria-invalid": isInvalid,
|
|
183
188
|
autoComplete: props.autoComplete,
|
|
@@ -190,54 +195,54 @@ function WysiwygInput(props) {
|
|
|
190
195
|
readOnly: props.isReadOnly,
|
|
191
196
|
required: props.isRequired
|
|
192
197
|
};
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
198
|
+
$[36] = errorId;
|
|
199
|
+
$[37] = isInvalid;
|
|
200
|
+
$[38] = onBlur;
|
|
201
|
+
$[39] = onFocus;
|
|
202
|
+
$[40] = props.autoComplete;
|
|
203
|
+
$[41] = props.form;
|
|
204
|
+
$[42] = props.isDisabled;
|
|
205
|
+
$[43] = props.isReadOnly;
|
|
206
|
+
$[44] = props.isRequired;
|
|
207
|
+
$[45] = props.onKeyDown;
|
|
208
|
+
$[46] = props.placeholder;
|
|
209
|
+
$[47] = t7;
|
|
205
210
|
}
|
|
206
211
|
else {
|
|
207
|
-
|
|
212
|
+
t7 = $[47];
|
|
208
213
|
}
|
|
209
|
-
let
|
|
210
|
-
if ($[
|
|
211
|
-
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
214
|
+
let t8;
|
|
215
|
+
if ($[48] !== field.onChange || $[49] !== field.value || $[50] !== id || $[51] !== plugins || $[52] !== props.customPluginsToolbarButtons || $[53] !== props.editorProps || $[54] !== t7) {
|
|
216
|
+
t8 = react_1.default.createElement(wysiwyg_1.WysiwygEditor, { customPluginsToolbarButtons: props.customPluginsToolbarButtons, editableProps: t7, id: id, initialValue: field.value, onChange: field.onChange, plugins: plugins, ref: editorRef, ...props.editorProps });
|
|
217
|
+
$[48] = field.onChange;
|
|
218
|
+
$[49] = field.value;
|
|
219
|
+
$[50] = id;
|
|
220
|
+
$[51] = plugins;
|
|
221
|
+
$[52] = props.customPluginsToolbarButtons;
|
|
222
|
+
$[53] = props.editorProps;
|
|
223
|
+
$[54] = t7;
|
|
224
|
+
$[55] = t8;
|
|
220
225
|
}
|
|
221
226
|
else {
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
let
|
|
225
|
-
if ($[
|
|
226
|
-
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
227
|
+
t8 = $[55];
|
|
228
|
+
}
|
|
229
|
+
let t9;
|
|
230
|
+
if ($[56] !== errorId || $[57] !== helperText || $[58] !== id || $[59] !== props.form || $[60] !== props.hiddenLabel || $[61] !== props.isRequired || $[62] !== props.label || $[63] !== props.name || $[64] !== rootClassName || $[65] !== t8) {
|
|
231
|
+
t9 = react_1.default.createElement(form_component_1.FormComponent, { className: rootClassName, errorId: errorId, form: props.form, helperText: helperText, hiddenLabel: props.hiddenLabel, inputId: id, isRequired: props.isRequired, label: props.label, name: props.name }, t8);
|
|
232
|
+
$[56] = errorId;
|
|
233
|
+
$[57] = helperText;
|
|
234
|
+
$[58] = id;
|
|
235
|
+
$[59] = props.form;
|
|
236
|
+
$[60] = props.hiddenLabel;
|
|
237
|
+
$[61] = props.isRequired;
|
|
238
|
+
$[62] = props.label;
|
|
239
|
+
$[63] = props.name;
|
|
240
|
+
$[64] = rootClassName;
|
|
241
|
+
$[65] = t8;
|
|
242
|
+
$[66] = t9;
|
|
238
243
|
}
|
|
239
244
|
else {
|
|
240
|
-
|
|
245
|
+
t9 = $[66];
|
|
241
246
|
}
|
|
242
|
-
return
|
|
247
|
+
return t9;
|
|
243
248
|
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/cms",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.1",
|
|
4
4
|
"description": "UXF Cms",
|
|
5
|
-
"author": "
|
|
6
|
-
"homepage": "https://
|
|
7
|
-
"license": "
|
|
5
|
+
"author": "UX Fans s.r.o. <dev@uxf.cz>",
|
|
6
|
+
"homepage": "https://fe.uxf.dev/docs/cms",
|
|
7
|
+
"license": "MIT",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"typings": "index.d.ts",
|
|
10
10
|
"module": "index.js",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "git+https://gitlab.com/uxf-npm/cms.git"
|
|
17
|
-
},
|
|
18
|
-
"bugs": {
|
|
19
|
-
"url": "https://gitlab.com/uxf-npm/cms/issues"
|
|
20
|
-
},
|
|
21
14
|
"scripts": {
|
|
22
15
|
"build": "tsc -P tsconfig.json && node ../../scripts/build-react-package.mjs",
|
|
23
16
|
"tw-tokens:check": "tsx ../ui/scripts/generate-tw-tokens.js --mode=\"check\" --twConfig=\"./utils/tailwind.config.js\" --outputPath=\"./ui/tw-tokens/\"",
|
|
@@ -29,15 +22,15 @@
|
|
|
29
22
|
},
|
|
30
23
|
"peerDependencies": {
|
|
31
24
|
"@floating-ui/react": "^0.27.20",
|
|
32
|
-
"@uxf/core": "15.
|
|
33
|
-
"@uxf/core-react": "15.
|
|
34
|
-
"@uxf/data-grid": "15.
|
|
35
|
-
"@uxf/dnd": "15.
|
|
36
|
-
"@uxf/form": "15.
|
|
37
|
-
"@uxf/router": "15.
|
|
38
|
-
"@uxf/styles": "15.
|
|
39
|
-
"@uxf/ui": "15.
|
|
40
|
-
"@uxf/wysiwyg": "15.
|
|
25
|
+
"@uxf/core": "15.2.1",
|
|
26
|
+
"@uxf/core-react": "15.2.1",
|
|
27
|
+
"@uxf/data-grid": "15.3.1",
|
|
28
|
+
"@uxf/dnd": "15.2.1",
|
|
29
|
+
"@uxf/form": "15.3.1",
|
|
30
|
+
"@uxf/router": "15.2.1",
|
|
31
|
+
"@uxf/styles": "15.2.1",
|
|
32
|
+
"@uxf/ui": "15.3.1",
|
|
33
|
+
"@uxf/wysiwyg": "15.3.1",
|
|
41
34
|
"axios": "^1.20.0",
|
|
42
35
|
"axios-hooks": "^5.1.1",
|
|
43
36
|
"next": ">=16.4.3",
|
|
@@ -51,18 +44,18 @@
|
|
|
51
44
|
"@types/node": "26",
|
|
52
45
|
"@types/react": "19.3.0",
|
|
53
46
|
"@types/react-dom": "19.3.0",
|
|
54
|
-
"@uxf/core": "15.
|
|
55
|
-
"@uxf/core-react": "15.
|
|
56
|
-
"@uxf/data-grid": "15.
|
|
57
|
-
"@uxf/dnd": "15.
|
|
58
|
-
"@uxf/form": "15.
|
|
59
|
-
"@uxf/router": "15.
|
|
60
|
-
"@uxf/styles": "15.
|
|
61
|
-
"@uxf/ui": "15.
|
|
62
|
-
"@uxf/wysiwyg": "15.
|
|
47
|
+
"@uxf/core": "15.2.1",
|
|
48
|
+
"@uxf/core-react": "15.2.1",
|
|
49
|
+
"@uxf/data-grid": "15.3.1",
|
|
50
|
+
"@uxf/dnd": "15.2.1",
|
|
51
|
+
"@uxf/form": "15.3.1",
|
|
52
|
+
"@uxf/router": "15.2.1",
|
|
53
|
+
"@uxf/styles": "15.2.1",
|
|
54
|
+
"@uxf/ui": "15.3.1",
|
|
55
|
+
"@uxf/wysiwyg": "15.3.1",
|
|
63
56
|
"axios": "^1.20.0",
|
|
64
57
|
"axios-hooks": "^5.1.1",
|
|
65
|
-
"next": "16.4.
|
|
58
|
+
"next": "16.4.6",
|
|
66
59
|
"react": "19.3.1",
|
|
67
60
|
"react-dom": "19.3.1",
|
|
68
61
|
"react-hook-form": "^7.89.0",
|