@uxf/cms 11.78.0 → 11.80.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/components.d.ts +22 -0
- package/components.js +49 -0
- package/content-builder/content-builder.stories.d.ts +2 -0
- package/content-builder/content-builder.stories.js +19 -0
- package/forms/invite-user-form/invite-user-form.d.ts +2 -2
- package/forms/invite-user-form/invite-user-form.js +3 -4
- package/forms/invite-user-form/invite-user-form.stories.d.ts +2 -0
- package/forms/invite-user-form/invite-user-form.stories.js +12 -0
- package/forms/login-form/login-form.stories.d.ts +2 -0
- package/forms/login-form/login-form.stories.js +13 -0
- package/forms/renew-password-form/renew-password-form.d.ts +2 -2
- package/forms/renew-password-form/renew-password-form.js +3 -4
- package/forms/renew-password-form/renew-password-form.stories.d.ts +2 -0
- package/forms/renew-password-form/renew-password-form.stories.js +12 -0
- package/package.json +7 -7
- package/pages/grid-page/grid-page.js +1 -1
- package/translations.d.ts +20 -0
package/components.d.ts
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
import * as contentBuilderStories from "./content-builder/content-builder.stories";
|
2
|
+
import * as inviteUserFormStories from "./forms/invite-user-form/invite-user-form.stories";
|
3
|
+
import * as loginFormStories from "./forms/login-form/login-form.stories";
|
4
|
+
import * as renewPasswordFormStories from "./forms/renew-password-form/renew-password-form.stories";
|
5
|
+
export declare const components: {
|
6
|
+
readonly "content-builder": {
|
7
|
+
readonly title: "ContentBuilder";
|
8
|
+
readonly stories: typeof contentBuilderStories;
|
9
|
+
};
|
10
|
+
readonly "invite-user-form": {
|
11
|
+
readonly title: "InviteUserForm";
|
12
|
+
readonly stories: typeof inviteUserFormStories;
|
13
|
+
};
|
14
|
+
readonly "login-form": {
|
15
|
+
readonly title: "LoginForm";
|
16
|
+
readonly stories: typeof loginFormStories;
|
17
|
+
};
|
18
|
+
readonly "renew-password-form": {
|
19
|
+
readonly title: "RenewPasswordForm";
|
20
|
+
readonly stories: typeof renewPasswordFormStories;
|
21
|
+
};
|
22
|
+
};
|
package/components.js
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.components = void 0;
|
27
|
+
// generated file
|
28
|
+
const contentBuilderStories = __importStar(require("./content-builder/content-builder.stories"));
|
29
|
+
const inviteUserFormStories = __importStar(require("./forms/invite-user-form/invite-user-form.stories"));
|
30
|
+
const loginFormStories = __importStar(require("./forms/login-form/login-form.stories"));
|
31
|
+
const renewPasswordFormStories = __importStar(require("./forms/renew-password-form/renew-password-form.stories"));
|
32
|
+
exports.components = {
|
33
|
+
"content-builder": {
|
34
|
+
title: "ContentBuilder",
|
35
|
+
stories: contentBuilderStories
|
36
|
+
},
|
37
|
+
"invite-user-form": {
|
38
|
+
title: "InviteUserForm",
|
39
|
+
stories: inviteUserFormStories
|
40
|
+
},
|
41
|
+
"login-form": {
|
42
|
+
title: "LoginForm",
|
43
|
+
stories: loginFormStories
|
44
|
+
},
|
45
|
+
"renew-password-form": {
|
46
|
+
title: "RenewPasswordForm",
|
47
|
+
stories: renewPasswordFormStories
|
48
|
+
},
|
49
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.Default = Default;
|
7
|
+
const content_builder_1 = require("@uxf/cms/content-builder");
|
8
|
+
const use_content_builder_form_api_1 = require("@uxf/cms/content-builder/use-content-builder-form-api");
|
9
|
+
const people_1 = require("@uxf/cms/pages/content-builder/content/people");
|
10
|
+
const wysiwyg_1 = require("@uxf/cms/pages/content-builder/content/wysiwyg");
|
11
|
+
const react_1 = __importDefault(require("react"));
|
12
|
+
const Contents = [wysiwyg_1.Wysiwyg, people_1.People];
|
13
|
+
function Default() {
|
14
|
+
const formApi = (0, use_content_builder_form_api_1.useContentBuilderFormApi)({
|
15
|
+
defaultValues: (0, content_builder_1.mapContentResponseToFormData)(null),
|
16
|
+
});
|
17
|
+
return (react_1.default.createElement("div", { className: "bg-neutral-200" },
|
18
|
+
react_1.default.createElement(content_builder_1.ContentBuilder, { ContentComponents: Contents, formApi: formApi, onSubmit: console.log })));
|
19
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import React from "react";
|
2
2
|
import { InviteUserFormProps } from "./types";
|
3
|
-
export declare
|
3
|
+
export declare function InviteUserForm(props: InviteUserFormProps): React.JSX.Element;
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
5
5
|
};
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
-
exports.InviteUserForm =
|
7
|
+
exports.InviteUserForm = InviteUserForm;
|
8
8
|
const translations_1 = require("@uxf/core-react/translations");
|
9
9
|
const checkbox_input_1 = require("@uxf/form/checkbox-input");
|
10
10
|
const form_1 = require("@uxf/form/form");
|
@@ -14,7 +14,7 @@ const button_1 = require("@uxf/ui/button");
|
|
14
14
|
const react_1 = __importDefault(require("react"));
|
15
15
|
const react_hook_form_1 = require("react-hook-form");
|
16
16
|
const widget_1 = require("../../ui/widget");
|
17
|
-
|
17
|
+
function InviteUserForm(props) {
|
18
18
|
// eslint-disable-next-line react/destructuring-assignment
|
19
19
|
const { defaultValues, ...formProps } = props;
|
20
20
|
const t = (0, translations_1.useUxfTranslation)();
|
@@ -29,5 +29,4 @@ const InviteUserForm = (props) => {
|
|
29
29
|
react_1.default.createElement(text_input_1.TextInput, { control: formApi.control, isRequired: true, label: t("uxf-cms-invite-user-form:surname"), name: "surname" }),
|
30
30
|
react_1.default.createElement(multi_combobox_1.MultiCombobox, { control: formApi.control, isRequired: true, label: t("uxf-cms-invite-user-form:roles"), loadOptions: props.onLoadRoles, name: "roles" }),
|
31
31
|
react_1.default.createElement(checkbox_input_1.CheckboxInput, { control: formApi.control, label: t("uxf-cms-invite-user-form:send-invitation"), name: "sendInvitation" }))));
|
32
|
-
}
|
33
|
-
exports.InviteUserForm = InviteUserForm;
|
32
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.Default = Default;
|
7
|
+
const react_1 = __importDefault(require("react"));
|
8
|
+
const invite_user_form_1 = require("./invite-user-form");
|
9
|
+
function Default() {
|
10
|
+
return (react_1.default.createElement("div", { className: "p-8" },
|
11
|
+
react_1.default.createElement(invite_user_form_1.InviteUserForm, { onLoadRoles: async () => [{ id: 1, label: "ROLE_USER" }], onSubmit: console.log })));
|
12
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.Default = Default;
|
7
|
+
const react_1 = __importDefault(require("react"));
|
8
|
+
const login_layout_1 = require("../../lib/login-layout");
|
9
|
+
const login_form_1 = require("./login-form");
|
10
|
+
function Default() {
|
11
|
+
return (react_1.default.createElement(login_layout_1.LoginLayout, { title: "P\u0159ihl\u00E1\u0161en\u00ED" },
|
12
|
+
react_1.default.createElement(login_form_1.LoginForm, { onSubmit: console.log })));
|
13
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import React from "react";
|
2
2
|
import { RenewPasswordFormProps } from "./types";
|
3
|
-
export declare
|
3
|
+
export declare function RenewPasswordForm(props: RenewPasswordFormProps): React.JSX.Element;
|
@@ -23,14 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.RenewPasswordForm =
|
26
|
+
exports.RenewPasswordForm = RenewPasswordForm;
|
27
27
|
const translations_1 = require("@uxf/core-react/translations");
|
28
28
|
const form_1 = require("@uxf/form/form");
|
29
29
|
const text_input_1 = require("@uxf/form/text-input");
|
30
30
|
const button_1 = require("@uxf/ui/button");
|
31
31
|
const react_1 = __importStar(require("react"));
|
32
32
|
const react_hook_form_1 = require("react-hook-form");
|
33
|
-
|
33
|
+
function RenewPasswordForm(props) {
|
34
34
|
// eslint-disable-next-line react/destructuring-assignment
|
35
35
|
const { defaultValues, ...formProps } = props;
|
36
36
|
const t = (0, translations_1.useUxfTranslation)();
|
@@ -49,5 +49,4 @@ const RenewPasswordForm = (props) => {
|
|
49
49
|
t("uxf-cms-renew-password-form:passwords-must-match"),
|
50
50
|
}, type: "password" }),
|
51
51
|
react_1.default.createElement(button_1.Button, { isDisabled: formDisabled || formApi.formState.isSubmitting, isFullWidth: true, isLoading: formApi.formState.isSubmitting, type: "submit" }, t("uxf-cms-renew-password-form:change-password")))));
|
52
|
-
}
|
53
|
-
exports.RenewPasswordForm = RenewPasswordForm;
|
52
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.Default = Default;
|
7
|
+
const react_1 = __importDefault(require("react"));
|
8
|
+
const renew_password_form_1 = require("./renew-password-form");
|
9
|
+
function Default() {
|
10
|
+
return (react_1.default.createElement("div", { className: "p-8" },
|
11
|
+
react_1.default.createElement(renew_password_form_1.RenewPasswordForm, { onSubmit: console.log })));
|
12
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uxf/cms",
|
3
|
-
"version": "11.
|
3
|
+
"version": "11.80.0",
|
4
4
|
"description": "UXF Cms",
|
5
5
|
"author": "UXFans <dev@uxf.cz>",
|
6
6
|
"homepage": "https://gitlab.com/uxf-npm/cms#readme",
|
@@ -30,13 +30,13 @@
|
|
30
30
|
"@dnd-kit/utilities": "3.2.2",
|
31
31
|
"@floating-ui/react": "0.26.28",
|
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.
|
33
|
+
"@uxf/core": "11.80.0",
|
34
|
+
"@uxf/core-react": "11.80.0",
|
35
|
+
"@uxf/data-grid": "11.80.0",
|
36
|
+
"@uxf/form": "11.80.0",
|
37
37
|
"@uxf/router": "11.78.0",
|
38
|
-
"@uxf/ui": "11.
|
39
|
-
"@uxf/wysiwyg": "11.
|
38
|
+
"@uxf/ui": "11.80.0",
|
39
|
+
"@uxf/wysiwyg": "11.80.0",
|
40
40
|
"axios": "1.7.5",
|
41
41
|
"axios-hooks": "5.0.2",
|
42
42
|
"es6-error": "4.1.1",
|
@@ -131,7 +131,7 @@ function GridPageComponent(props) {
|
|
131
131
|
: undefined);
|
132
132
|
return (react_1.default.createElement(Layout, { appName: (_g = props.appName) !== null && _g !== void 0 ? _g : "", key: props.entityAlias, title: (_k = (_h = props.title) !== null && _h !== void 0 ? _h : (_j = props.metaSchema) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : "" },
|
133
133
|
react_1.default.createElement("div", { className: "mb-10" },
|
134
|
-
react_1.default.createElement(data_grid_1.DataGrid, { NoRowsFallback: (_l = props.ui) === null || _l === void 0 ? void 0 : _l.NoRowsFallback, SelectedRowsToolbarActions: (_m = props.ui) === null || _m === void 0 ? void 0 : _m.SelectedRowsToolbarActions, actionCell: actionCell, actions: actions, bodyCells: (_o = props.ui) === null || _o === void 0 ? void 0 : _o.BodyCells, customActions: cActions, data: data, error: error, filterHandlers: (_p = props.ui) === null || _p === void 0 ? void 0 : _p.FilterHandlers, getCsvDownloadUrl: (r) => `/api/cms/datagrid/export/${props.entityAlias}?${(0, qs_1.stringify)(r)}`, gridName: props.entityAlias, isLoading: isLoading,
|
134
|
+
react_1.default.createElement(data_grid_1.DataGrid, { NoRowsFallback: (_l = props.ui) === null || _l === void 0 ? void 0 : _l.NoRowsFallback, SelectedRowsToolbarActions: (_m = props.ui) === null || _m === void 0 ? void 0 : _m.SelectedRowsToolbarActions, actionCell: actionCell, actions: actions, bodyCells: (_o = props.ui) === null || _o === void 0 ? void 0 : _o.BodyCells, customActions: cActions, data: data, error: error, filterHandlers: (_p = props.ui) === null || _p === void 0 ? void 0 : _p.FilterHandlers, getCsvDownloadUrl: (r) => `/api/cms/datagrid/export/${props.entityAlias}?${(0, qs_1.stringify)(r)}`, gridName: props.entityAlias, isLoading: isLoading, isRowsSelectable: props.selectable, reload: reload, rowHeight: props.rowHeight, schema: props.gridSchema, state: state }))));
|
135
135
|
}
|
136
136
|
GridPageComponent.displayName = "GridPageComponent";
|
137
137
|
/** @deprecated - use custom DataGrid on project */
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import cmsTranslations from "@uxf/cms/translations/translations";
|
2
|
+
import type { TranslationsPaths } from "@uxf/core-react/translations/types";
|
3
|
+
import dataGridTranslations from "@uxf/data-grid/translations/translations";
|
4
|
+
import formTranslations from "@uxf/form/translations/translations";
|
5
|
+
import uiTranslations from "@uxf/ui/translations/translations";
|
6
|
+
import wysiwygTranslations from "@uxf/wysiwyg/translations/translations";
|
7
|
+
|
8
|
+
type cmsTypes = typeof cmsTranslations;
|
9
|
+
type dataGridTypes = typeof dataGridTranslations;
|
10
|
+
type formTypes = typeof formTranslations;
|
11
|
+
type uiTypes = typeof uiTranslations;
|
12
|
+
type wysiwygTypes = typeof wysiwygTranslations;
|
13
|
+
|
14
|
+
type TranslationsKeys = TranslationsPaths<cmsTypes & dataGridTypes & formTypes & uiTypes & wysiwygTypes>;
|
15
|
+
|
16
|
+
type TypeSafeTranslate = (key: TranslationsKeys, options?: Record<string, any>) => string;
|
17
|
+
|
18
|
+
declare module "@uxf/core-react/translations" {
|
19
|
+
export function useUxfTranslation(): TypeSafeTranslate;
|
20
|
+
}
|