@uxf/cms 11.35.0 → 11.37.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
1
  {
2
- "name": "@uxf/cms",
3
- "version": "11.35.0",
4
- "description": "UXF Cms",
5
- "author": "UXFans <dev@uxf.cz>",
6
- "homepage": "https://gitlab.com/uxf-npm/cms#readme",
7
- "license": "ISC",
8
- "main": "index.js",
9
- "typings": "index.d.ts",
10
- "module": "index.js",
11
- "publishConfig": {
12
- "access": "public"
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
- "scripts": {
22
- "build": "tsc -P tsconfig.json",
23
- "tw-tokens:check": "ts-node ../ui/scripts/generate-tw-tokens.js --mode=\"check\" --twConfig=\"./utils/tailwind.config.js\" --outputPath=\"./ui/tw-tokens/\"",
24
- "tw-tokens:gen": "ts-node ../ui/scripts/generate-tw-tokens.js --twConfig=\"./utils/tailwind.config.js\" --outputPath=\"./ui/tw-tokens/\"",
25
- "typecheck": "tsc --noEmit --skipLibCheck"
26
- },
27
- "dependencies": {
28
- "@dnd-kit/core": "6.1.0",
29
- "@dnd-kit/sortable": "8.0.0",
30
- "@dnd-kit/utilities": "3.2.2",
31
- "@floating-ui/react": "0.26.23",
32
- "@redux-devtools/extension": "3.3.0",
33
- "@uxf/core": "11.35.0",
34
- "@uxf/core-react": "11.35.0",
35
- "@uxf/data-grid": "11.35.0",
36
- "@uxf/form": "11.35.0",
37
- "@uxf/router": "11.32.0",
38
- "@uxf/ui": "11.35.0",
39
- "@uxf/wysiwyg": "11.35.0",
40
- "axios": "1.7.5",
41
- "axios-hooks": "5.0.2",
42
- "es6-error": "4.1.1",
43
- "qs": "6.13.0",
44
- "react-hook-form": "7.53.0",
45
- "react-redux": "8.1.3",
46
- "redux": "4.2.1",
47
- "swr": "2.2.5"
48
- },
49
- "peerDependencies": {
50
- "next": ">=13.2.0",
51
- "react": ">=18.2.0",
52
- "react-dom": ">=18.2.0"
53
- },
54
- "devDependencies": {
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
- }
63
- }
2
+ "name": "@uxf/cms",
3
+ "version": "11.37.0",
4
+ "description": "UXF Cms",
5
+ "author": "UXFans <dev@uxf.cz>",
6
+ "homepage": "https://gitlab.com/uxf-npm/cms#readme",
7
+ "license": "ISC",
8
+ "main": "index.js",
9
+ "typings": "index.d.ts",
10
+ "module": "index.js",
11
+ "publishConfig": {
12
+ "access": "public"
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
+ "scripts": {
22
+ "build": "tsc -P tsconfig.json",
23
+ "tw-tokens:check": "ts-node ../ui/scripts/generate-tw-tokens.js --mode=\"check\" --twConfig=\"./utils/tailwind.config.js\" --outputPath=\"./ui/tw-tokens/\"",
24
+ "tw-tokens:gen": "ts-node ../ui/scripts/generate-tw-tokens.js --twConfig=\"./utils/tailwind.config.js\" --outputPath=\"./ui/tw-tokens/\"",
25
+ "typecheck": "tsc --noEmit --skipLibCheck"
26
+ },
27
+ "dependencies": {
28
+ "@dnd-kit/core": "6.1.0",
29
+ "@dnd-kit/sortable": "8.0.0",
30
+ "@dnd-kit/utilities": "3.2.2",
31
+ "@floating-ui/react": "0.26.23",
32
+ "@redux-devtools/extension": "3.3.0",
33
+ "@uxf/core": "11.35.0",
34
+ "@uxf/core-react": "11.36.0",
35
+ "@uxf/data-grid": "11.37.0",
36
+ "@uxf/form": "11.37.0",
37
+ "@uxf/router": "11.32.0",
38
+ "@uxf/ui": "11.37.0",
39
+ "@uxf/wysiwyg": "11.37.0",
40
+ "axios": "1.7.5",
41
+ "axios-hooks": "5.0.2",
42
+ "es6-error": "4.1.1",
43
+ "qs": "6.13.0",
44
+ "react-hook-form": "7.53.0",
45
+ "react-redux": "8.1.3",
46
+ "redux": "4.2.1",
47
+ "swr": "2.2.5"
48
+ },
49
+ "peerDependencies": {
50
+ "next": ">=13.2.0",
51
+ "react": ">=18.2.0",
52
+ "react-dom": ">=18.2.0"
53
+ },
54
+ "devDependencies": {
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
+ }
63
+ }
@@ -1,11 +1,14 @@
1
- import { FC, ReactNode } from "react";
1
+ import React, { Dispatch, ReactNode, SetStateAction } from "react";
2
2
  import { Control } from "react-hook-form";
3
+ import { ContentBuilderTabs } from "../constants";
3
4
  import { ContentBuilderConfig } from "../types";
4
5
  interface Props {
5
- config: ContentBuilderConfig<any>;
6
- id: number | null;
6
+ activeTab: ContentBuilderTabs;
7
7
  children?: ReactNode;
8
+ config: ContentBuilderConfig<any>;
8
9
  control: Control<any>;
10
+ id: number | null;
11
+ setActiveTab: Dispatch<SetStateAction<ContentBuilderTabs>>;
9
12
  }
10
- export declare const FormRootFields: FC<Props>;
13
+ export declare function FormRootFields(props: Props): React.JSX.Element;
11
14
  export {};
@@ -1,29 +1,10 @@
1
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;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.FormRootFields = void 0;
6
+ exports.FormRootFields = FormRootFields;
7
+ const hide_1 = require("@uxf/core-react/components/hide");
27
8
  const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
28
9
  const checkbox_input_1 = require("@uxf/form/checkbox-input");
29
10
  const combobox_1 = require("@uxf/form/combobox/combobox");
@@ -34,57 +15,64 @@ const select_1 = require("@uxf/form/select");
34
15
  const text_input_1 = require("@uxf/form/text-input");
35
16
  const textarea_1 = require("@uxf/form/textarea");
36
17
  const tabs_1 = require("@uxf/ui/tabs");
37
- const react_1 = __importStar(require("react"));
18
+ const react_1 = __importDefault(require("react"));
38
19
  const api_1 = require("../../../api");
39
20
  const on_upload_file_1 = require("../../../forms/utils/on-upload-file");
21
+ const constants_1 = require("../constants");
40
22
  const options = [
41
23
  { id: "PRIVATE", label: "Privátní" },
42
24
  { id: "PUBLIC_WITHOUT_SITEMAP", label: "Veřejný bez sitemapy" },
43
25
  { id: "PUBLIC", label: "Veřejný" },
44
26
  ];
45
- const FormRootFields = (props) => {
27
+ function FormRootFields(props) {
46
28
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
47
- // eslint-disable-next-line react/destructuring-assignment
48
- const { children, config, id, control } = props;
49
- const [activeTab, setActiveTab] = (0, react_1.useState)("basic");
50
29
  return (react_1.default.createElement("div", { className: "pb-2 pt-4" },
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" },
30
+ react_1.default.createElement(tabs_1.Tabs, { onChange: props.setActiveTab, value: props.activeTab },
31
+ react_1.default.createElement(tabs_1.Tabs.Panel, { isAlwaysMounted: true, label: "Z\u00E1kladn\u00ED", name: constants_1.ContentBuilderTabs.Basic },
53
32
  react_1.default.createElement("div", { className: "space-y-8 px-4 pb-4" },
54
- config.allowedTypes && (react_1.default.createElement("div", null,
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 }))),
33
+ props.config.allowedTypes && (react_1.default.createElement("div", null,
34
+ react_1.default.createElement(select_1.Select, { control: props.control, isReadOnly: (0, is_not_nil_1.isNotNil)(props.id), isRequired: true, label: "Typ", name: "type", options: props.config.allowedTypes }))),
56
35
  react_1.default.createElement("div", null,
57
- react_1.default.createElement(text_input_1.TextInput, { control: control, isRequired: true, label: "Nadpis", name: "name" })),
58
- !((_a = config.hide) === null || _a === void 0 ? void 0 : _a.publishedAt) && (react_1.default.createElement("div", null,
59
- react_1.default.createElement(datetime_picker_input_1.DatetimePickerInput, { control: control, isRequired: true, label: "Datum publikace", name: "publishedAt" }))),
60
- !((_b = config.hide) === null || _b === void 0 ? void 0 : _b.perex) && (react_1.default.createElement("div", null,
61
- react_1.default.createElement(textarea_1.Textarea, { control: control, label: "Perex", name: "perex", rows: 3 }))),
62
- !((_c = config.hide) === null || _c === void 0 ? void 0 : _c.author) && (react_1.default.createElement("div", null,
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" }))),
64
- !((_d = config.hide) === null || _d === void 0 ? void 0 : _d.category) && (react_1.default.createElement("div", null,
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" }))),
36
+ react_1.default.createElement(text_input_1.TextInput, { control: props.control, isRequired: true, label: "Nadpis", name: "name", type: "text" })),
37
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_a = props.config.hide) === null || _a === void 0 ? void 0 : _a.publishedAt) },
38
+ react_1.default.createElement("div", null,
39
+ react_1.default.createElement(datetime_picker_input_1.DatetimePickerInput, { control: props.control, isRequired: true, label: "Datum publikace", name: "publishedAt" }))),
40
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_b = props.config.hide) === null || _b === void 0 ? void 0 : _b.perex) },
41
+ react_1.default.createElement("div", null,
42
+ react_1.default.createElement(textarea_1.Textarea, { control: props.control, label: "Perex", name: "perex", rows: 3 }))),
43
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_c = props.config.hide) === null || _c === void 0 ? void 0 : _c.author) },
44
+ react_1.default.createElement("div", null,
45
+ react_1.default.createElement(combobox_1.Combobox, { control: props.control, label: "Autor", loadOptions: (term) => (0, api_1.autocomplete)(null, { name: "content-author" }, { term }).then((r) => r.data), name: "author" }))),
46
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_d = props.config.hide) === null || _d === void 0 ? void 0 : _d.category) },
47
+ react_1.default.createElement("div", null,
48
+ react_1.default.createElement(combobox_1.Combobox, { control: props.control, label: "Kategorie", loadOptions: (term) => (0, api_1.autocomplete)(null, { name: "content-category" }, { term }).then((r) => r.data), name: "category" }))),
66
49
  react_1.default.createElement("div", null,
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" })),
68
- !((_e = config.hide) === null || _e === void 0 ? void 0 : _e.image) && (react_1.default.createElement("div", null,
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 }))),
50
+ react_1.default.createElement(multi_combobox_1.MultiCombobox, { control: props.control, label: "Tagy", loadOptions: (term) => (0, api_1.autocomplete)(null, { name: "content-tag" }, { term }).then((r) => r.data), name: "tags" })),
51
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_e = props.config.hide) === null || _e === void 0 ? void 0 : _e.image) },
52
+ react_1.default.createElement("div", null,
53
+ react_1.default.createElement(file_input_1.FileInput, { control: props.control, id: "image", label: "Hlavn\u00ED obr\u00E1zek", name: "image", onUploadFile: on_upload_file_1.onUploadFile }))),
70
54
  react_1.default.createElement("div", null,
71
- react_1.default.createElement(checkbox_input_1.CheckboxInput, { control: control, label: "Aktivn\u00ED", name: "active" })),
55
+ react_1.default.createElement(checkbox_input_1.CheckboxInput, { control: props.control, label: "Aktivn\u00ED", name: "active" })),
72
56
  react_1.default.createElement("div", null,
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" },
57
+ react_1.default.createElement(select_1.Select, { control: props.control, isRequired: true, label: "Viditelnost", name: "visibilityLevel", options: options })))),
58
+ react_1.default.createElement(tabs_1.Tabs.Panel, { isAlwaysMounted: true, label: "SEO", name: constants_1.ContentBuilderTabs.Seo },
75
59
  react_1.default.createElement("div", { className: "space-y-8 px-4 pb-4" },
76
60
  react_1.default.createElement("div", null,
77
- react_1.default.createElement(text_input_1.TextInput, { control: control, helperText: "Slug = unik\u00E1tn\u00ED koncovka URL adresy", label: "Slug", name: "seo.name" })),
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,
79
- react_1.default.createElement(text_input_1.TextInput, { control: control, label: "Nadpis", name: "seo.title" }))),
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,
81
- react_1.default.createElement(text_input_1.TextInput, { control: control, label: "Popis", name: "seo.description" }))),
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,
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" }))),
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,
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" }))),
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,
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 })))))),
88
- children));
89
- };
90
- exports.FormRootFields = FormRootFields;
61
+ react_1.default.createElement(text_input_1.TextInput, { control: props.control, helperText: "Slug = unik\u00E1tn\u00ED koncovka URL adresy", isRequired: true, label: "Slug", name: "seo.name", type: "text" })),
62
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_g = (_f = props.config.hide) === null || _f === void 0 ? void 0 : _f.seo) === null || _g === void 0 ? void 0 : _g.title) },
63
+ react_1.default.createElement("div", null,
64
+ react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "Nadpis", name: "seo.title", type: "text" }))),
65
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_j = (_h = props.config.hide) === null || _h === void 0 ? void 0 : _h.seo) === null || _j === void 0 ? void 0 : _j.description) },
66
+ react_1.default.createElement("div", null,
67
+ react_1.default.createElement(text_input_1.TextInput, { control: props.control, label: "Popis", name: "seo.description", type: "text" }))),
68
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_l = (_k = props.config.hide) === null || _k === void 0 ? void 0 : _k.seo) === null || _l === void 0 ? void 0 : _l.ogTitle) },
69
+ react_1.default.createElement("div", null,
70
+ react_1.default.createElement(text_input_1.TextInput, { control: props.control, helperText: "Nadpis kter\u00FD bude zobrazen p\u0159i sd\u00EDlen\u00ED na Facebooku, ...", label: "OG nadpis", name: "seo.ogTitle", type: "text" }))),
71
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_o = (_m = props.config.hide) === null || _m === void 0 ? void 0 : _m.seo) === null || _o === void 0 ? void 0 : _o.ogDescription) },
72
+ react_1.default.createElement("div", null,
73
+ react_1.default.createElement(text_input_1.TextInput, { control: props.control, helperText: "Popis kter\u00FD bude zobrazen p\u0159i sd\u00EDlen\u00ED na Facebooku, ...", label: "OG popis", name: "seo.ogDescription", type: "text" }))),
74
+ react_1.default.createElement(hide_1.Hide, { when: Boolean((_q = (_p = props.config.hide) === null || _p === void 0 ? void 0 : _p.seo) === null || _q === void 0 ? void 0 : _q.ogImage) },
75
+ react_1.default.createElement("div", null,
76
+ react_1.default.createElement(file_input_1.FileInput, { control: props.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 })))))),
77
+ props.children));
78
+ }
@@ -1,10 +1,10 @@
1
1
  import { FormProps as UXFFormProps } from "@uxf/form/form";
2
- import { FC } from "react";
2
+ import React from "react";
3
3
  import { DefaultValues } from "react-hook-form";
4
4
  import { ContentBuilderConfig, RootContent } from "../types";
5
- export interface FormProps extends Omit<UXFFormProps<RootContent<any>>, "children" | "formApi" | "id" | "omitSubmitInput"> {
5
+ export interface FormProps extends Omit<UXFFormProps<RootContent<any>>, "children" | "formApi" | "id" | "shouldOmitSubmitInput"> {
6
6
  config: ContentBuilderConfig<any>;
7
7
  id: number | null;
8
8
  defaultValues?: DefaultValues<any>;
9
9
  }
10
- export declare const Form: FC<FormProps>;
10
+ export declare function Form(props: FormProps): React.JSX.Element;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Form = void 0;
26
+ exports.Form = Form;
27
27
  const form_1 = require("@uxf/form/form");
28
28
  const rem_1 = require("@uxf/styles/units/rem");
29
29
  const react_1 = __importStar(require("react"));
@@ -33,10 +33,28 @@ const constants_1 = require("../constants");
33
33
  const content_field_1 = require("../content-field");
34
34
  const details_visibility_context_1 = require("../context/details-visibility-context");
35
35
  const form_root_fields_1 = require("./form-root-fields");
36
- const Form = (props) => {
37
- const formApi = (0, react_hook_form_1.useForm)({ defaultValues: props.defaultValues });
36
+ // TODO: Mapování inputů na taby, asi by šlo udělat lépe
37
+ const INPUT_TAB_MAP = {
38
+ active: constants_1.ContentBuilderTabs.Basic,
39
+ author: constants_1.ContentBuilderTabs.Basic,
40
+ category: constants_1.ContentBuilderTabs.Basic,
41
+ content: constants_1.ContentBuilderTabs.Basic,
42
+ image: constants_1.ContentBuilderTabs.Basic,
43
+ name: constants_1.ContentBuilderTabs.Basic,
44
+ perex: constants_1.ContentBuilderTabs.Basic,
45
+ publishedAt: constants_1.ContentBuilderTabs.Basic,
46
+ seo: constants_1.ContentBuilderTabs.Seo,
47
+ tags: constants_1.ContentBuilderTabs.Basic,
48
+ type: constants_1.ContentBuilderTabs.Basic,
49
+ visibilityLevel: constants_1.ContentBuilderTabs.Basic,
50
+ };
51
+ function Form(props) {
52
+ const formApi = (0, react_hook_form_1.useForm)({
53
+ defaultValues: props.defaultValues,
54
+ });
38
55
  const viewportHeight = (0, use_viewport_height_1.useViewportHeight)(true);
39
56
  const [headerHeight, setHeaderHeight] = (0, react_1.useState)(0);
57
+ const [activeTab, setActiveTab] = (0, react_1.useState)(constants_1.ContentBuilderTabs.Basic);
40
58
  (0, react_1.useEffect)(() => {
41
59
  const header = document.getElementById(constants_1.CONTENT_BUILDER_PAGE_HEADER_ID);
42
60
  if (header) {
@@ -44,12 +62,20 @@ const Form = (props) => {
44
62
  }
45
63
  }, []);
46
64
  const height = viewportHeight === "100vh" ? viewportHeight : (0, rem_1.rem)(viewportHeight);
47
- return (react_1.default.createElement(form_1.Form, { formApi: formApi, id: constants_1.CONTENT_BUILDER_FORM_ID, onSubmit: props.onSubmit },
65
+ const handleError = (errors) => {
66
+ //TODO: přepnutí na tab s chybou, asi by šlo udělat lépe
67
+ for (const inputName in errors) {
68
+ if (inputName in INPUT_TAB_MAP) {
69
+ setActiveTab(INPUT_TAB_MAP[inputName]);
70
+ break;
71
+ }
72
+ }
73
+ };
74
+ return (react_1.default.createElement(form_1.Form, { formApi: formApi, id: constants_1.CONTENT_BUILDER_FORM_ID, onError: handleError, onSubmit: props.onSubmit },
48
75
  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
76
  react_1.default.createElement(details_visibility_context_1.DetailsVisibilityProvider, null,
50
77
  react_1.default.createElement(content_field_1.ContentField, { contentComponents: props.config.contentComponents, control: formApi.control, name: "content" })),
51
- react_1.default.createElement("div", { className: "basis-[500px] bg-white px-4 pb-8 xl:overflow-y-auto dark:bg-gray-950" },
78
+ react_1.default.createElement("div", { className: "shrink-0 basis-[500px] bg-white px-4 pb-8 xl:overflow-y-auto dark:bg-gray-950" },
52
79
  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, control: formApi.control, id: props.id })))));
54
- };
55
- exports.Form = Form;
80
+ react_1.default.createElement(form_root_fields_1.FormRootFields, { activeTab: activeTab, config: props.config, control: formApi.control, id: props.id, setActiveTab: setActiveTab })))));
81
+ }
@@ -1,6 +1,6 @@
1
- import { FC } from "react";
1
+ import React from "react";
2
2
  interface HeaderProps {
3
3
  title: string;
4
4
  }
5
- export declare const Header: FC<HeaderProps>;
5
+ export declare function Header(props: HeaderProps): React.JSX.Element;
6
6
  export {};
@@ -1,44 +1,16 @@
1
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;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Header = void 0;
27
- const button_1 = require("@uxf/ui/button");
28
- const button_group_1 = require("@uxf/ui/button-group");
29
- const react_1 = __importStar(require("react"));
6
+ exports.Header = Header;
7
+ const react_1 = __importDefault(require("react"));
30
8
  const layout_container_1 = require("../../../lib/layout/layout-container");
31
9
  const constants_1 = require("../constants");
32
- const Header = (props) => {
33
- const [language, setLanguage] = (0, react_1.useState)("cs");
10
+ function Header(props) {
34
11
  return (react_1.default.createElement("div", { className: "sticky top-0 z-10 bg-white shadow-md dark:bg-gray-950", id: constants_1.CONTENT_BUILDER_PAGE_HEADER_ID },
35
12
  react_1.default.createElement(layout_container_1.LayoutContainer, { className: "flex items-center justify-between py-4" },
36
13
  react_1.default.createElement("h1", { className: "uxf-typo-h5" }, props.title),
37
- react_1.default.createElement("div", { className: "flex space-x-4" },
38
- react_1.default.createElement(button_group_1.ButtonGroup, null,
39
- react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("cs"), size: "sm", variant: language === "cs" ? "default" : "secondary" }, "CS"),
40
- react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("en"), size: "sm", variant: language === "en" ? "default" : "secondary" }, "EN"),
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", { 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
- };
44
- exports.Header = Header;
14
+ " ",
15
+ 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"))));
16
+ }
@@ -1,2 +1,6 @@
1
1
  export declare const CONTENT_BUILDER_FORM_ID = "content-builder-form";
2
2
  export declare const CONTENT_BUILDER_PAGE_HEADER_ID = "content-builder-page-header";
3
+ export declare enum ContentBuilderTabs {
4
+ Basic = "basic",
5
+ Seo = "seo"
6
+ }
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONTENT_BUILDER_PAGE_HEADER_ID = exports.CONTENT_BUILDER_FORM_ID = void 0;
3
+ exports.ContentBuilderTabs = exports.CONTENT_BUILDER_PAGE_HEADER_ID = exports.CONTENT_BUILDER_FORM_ID = void 0;
4
4
  exports.CONTENT_BUILDER_FORM_ID = "content-builder-form";
5
5
  exports.CONTENT_BUILDER_PAGE_HEADER_ID = "content-builder-page-header";
6
+ var ContentBuilderTabs;
7
+ (function (ContentBuilderTabs) {
8
+ ContentBuilderTabs["Basic"] = "basic";
9
+ ContentBuilderTabs["Seo"] = "seo";
10
+ })(ContentBuilderTabs || (exports.ContentBuilderTabs = ContentBuilderTabs = {}));
@@ -8,7 +8,7 @@ const dropzone_input_1 = require("@uxf/form/dropzone/dropzone-input");
8
8
  const dropzone_list_1 = require("@uxf/form/dropzone/dropzone-list");
9
9
  const react_1 = __importDefault(require("react"));
10
10
  const on_upload_dropzone_file_1 = require("../../../forms/utils/on-upload-dropzone-file");
11
- const on_remove_confirm_1 = require("../../../utils/on-remove-confirm");
11
+ const remove_confirm_handler_1 = require("../../../utils/remove-confirm-handler");
12
12
  const content_header_1 = require("../content-header");
13
13
  const details_visibility_context_1 = require("../context/details-visibility-context");
14
14
  const Gallery = (props) => {
@@ -17,7 +17,7 @@ const Gallery = (props) => {
17
17
  react_1.default.createElement(content_header_1.ContentHeader, { ...props }),
18
18
  visibility && (react_1.default.createElement("div", { className: "p-4" },
19
19
  react_1.default.createElement(dropzone_input_1.DropzoneInput, { control: props.control, name: `${props.name}.images`, onUploadFile: on_upload_dropzone_file_1.onUploadDropzoneFile }),
20
- react_1.default.createElement(dropzone_list_1.DropzoneList, { control: props.control, name: `${props.name}.images`, onRemoveConfirm: on_remove_confirm_1.onRemoveConfirm })))));
20
+ react_1.default.createElement(dropzone_list_1.DropzoneList, { className: "mt-4", control: props.control, name: `${props.name}.images`, onRemoveConfirm: remove_confirm_handler_1.removeConfirmHandler })))));
21
21
  };
22
22
  exports.Gallery = Gallery;
23
23
  exports.Gallery.getConfig = () => ({
@@ -25,16 +25,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ContentHeader = void 0;
27
27
  const use_clickable_props_1 = require("@uxf/core-react/hooks/use-clickable-props");
28
- const button_1 = require("@uxf/ui/button");
29
- const datetime_picker_input_1 = require("@uxf/ui/datetime-picker-input");
30
28
  const icon_1 = require("@uxf/ui/icon");
31
- const modal_service_1 = require("@uxf/ui/modal/modal-service");
32
- const paper_1 = require("@uxf/ui/paper/paper");
29
+ const icon_button_1 = require("@uxf/ui/icon-button");
33
30
  const react_1 = __importStar(require("react"));
34
31
  const details_visibility_context_1 = require("./context/details-visibility-context");
35
32
  const ContentHeader = (props) => {
36
- const [validityFrom, setValidityFrom] = (0, react_1.useState)(null);
37
- const [validityTo, setValidityTo] = (0, react_1.useState)(null);
38
33
  const [visibility, toggleVisibility] = (0, details_visibility_context_1.useDetailsVisibilityForSection)(props.id);
39
34
  const removeHandler = (0, react_1.useCallback)((event) => {
40
35
  event.stopPropagation();
@@ -49,23 +44,10 @@ const ContentHeader = (props) => {
49
44
  className: "flex w-full cursor-pointer flex-row items-center justify-between p-4",
50
45
  onClick: toggleVisibility,
51
46
  });
52
- const setVisibilityHandler = (event) => {
53
- event.stopPropagation();
54
- (0, modal_service_1.openModal)({
55
- children: (react_1.default.createElement(paper_1.Paper, { className: "space-y-4 p-4 dark:bg-gray-950" },
56
- react_1.default.createElement(datetime_picker_input_1.DatetimePickerInput, { label: "Platnost od", name: "visibilityFrom", onChange: (value) => setValidityFrom(value), value: validityFrom }),
57
- react_1.default.createElement(datetime_picker_input_1.DatetimePickerInput, { label: "Platnost do", name: "visibilityTo", onChange: (value) => setValidityTo(value), value: validityTo }))),
58
- width: "sm",
59
- });
60
- };
61
47
  return (react_1.default.createElement("div", { ...clickableProps },
62
48
  react_1.default.createElement("h3", { className: "uxf-typo-h6" }, props.title),
63
49
  react_1.default.createElement("div", { className: "flex items-center space-x-4" },
64
- react_1.default.createElement("div", { className: "flex space-x-2" },
65
- react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: (event) => setVisibilityHandler(event), size: "sm", variant: "secondary" },
66
- react_1.default.createElement(icon_1.Icon, { name: "calendar" })),
67
- react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: (event) => removeHandler(event), size: "sm", variant: "secondary" },
68
- react_1.default.createElement(icon_1.Icon, { name: "delete" }))),
50
+ react_1.default.createElement(icon_button_1.IconButton, { iconName: "delete", label: "d", onClick: removeHandler, size: "sm", variant: "secondary" }),
69
51
  react_1.default.createElement(icon_1.Icon, { name: `${visibility ? "chevronUp" : "chevronDown"}`, size: 16 }))));
70
52
  };
71
53
  exports.ContentHeader = ContentHeader;
@@ -23,7 +23,7 @@ const react_1 = __importDefault(require("react"));
23
23
  const api_1 = require("../../api");
24
24
  const on_upload_dropzone_file_1 = require("../../forms/utils/on-upload-dropzone-file");
25
25
  const on_upload_file_1 = require("../../forms/utils/on-upload-file");
26
- const on_remove_confirm_1 = require("../../utils/on-remove-confirm");
26
+ const remove_confirm_handler_1 = require("../../utils/remove-confirm-handler");
27
27
  const field_array_1 = require("./field-array"); // eslint-disable-line import/no-cycle
28
28
  const content_1 = require("./field/content");
29
29
  // eslint-disable-next-line complexity
@@ -58,7 +58,7 @@ const BaseField = (props) => {
58
58
  react_1.default.createElement(label_1.Label, null, label),
59
59
  react_1.default.createElement("div", { className: "mb-3" },
60
60
  react_1.default.createElement(dropzone_input_1.DropzoneInput, { control: control, label: label, name: fieldName, onUploadFile: on_upload_dropzone_file_1.onUploadDropzoneFile })),
61
- react_1.default.createElement(dropzone_list_1.DropzoneList, { control: control, errorText: "Soubor se nepoda\u0159ilo nahr\u00E1t.", name: fieldName, onRemoveConfirm: on_remove_confirm_1.onRemoveConfirm })));
61
+ react_1.default.createElement(dropzone_list_1.DropzoneList, { control: control, errorText: "Soubor se nepoda\u0159ilo nahr\u00E1t.", name: fieldName, onRemoveConfirm: remove_confirm_handler_1.removeConfirmHandler })));
62
62
  case "manyToMany":
63
63
  return (react_1.default.createElement(multi_combobox_1.MultiCombobox, { control: control, isDisabled: disabled, isRequired: required, label: label, loadOptions: (term) => { var _a; return (0, api_1.autocomplete)(null, { name: (_a = fieldSchema.autocomplete) !== null && _a !== void 0 ? _a : "" }, { term }).then((r) => r.data); }, name: fieldName }));
64
64
  case "manyToOne":
@@ -129,7 +129,7 @@ const GridPageComponent = (props) => {
129
129
  : undefined);
130
130
  return (react_1.default.createElement(Layout, { key: props.entityAlias, title: (_j = (_g = props.title) !== null && _g !== void 0 ? _g : (_h = props.metaSchema) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : "" },
131
131
  react_1.default.createElement("div", { className: "mb-10" },
132
- react_1.default.createElement(data_grid_1.DataGrid, { NoRowsFallback: (_k = props.ui) === null || _k === void 0 ? void 0 : _k.NoRowsFallback, SelectedRowsToolbarActions: (_l = props.ui) === null || _l === void 0 ? void 0 : _l.SelectedRowsToolbarActions, actionCell: actionCell, actions: actions, bodyCells: (_m = props.ui) === null || _m === void 0 ? void 0 : _m.BodyCells, customActions: cActions, data: data, error: error, filterHandlers: (_o = props.ui) === null || _o === void 0 ? void 0 : _o.FilterHandlers, gridName: props.entityAlias, isLoading: isLoading, isRowSelectable: props.selectable, noBorder: true, onCsvDownload: (r) => window.open(`/api/cms/datagrid/export/${props.entityAlias}?${(0, qs_1.stringify)(r)}`), onReload: onReload, rowHeight: props.rowHeight, schema: props.gridSchema, state: state }))));
132
+ react_1.default.createElement(data_grid_1.DataGrid, { NoRowsFallback: (_k = props.ui) === null || _k === void 0 ? void 0 : _k.NoRowsFallback, SelectedRowsToolbarActions: (_l = props.ui) === null || _l === void 0 ? void 0 : _l.SelectedRowsToolbarActions, actionCell: actionCell, actions: actions, bodyCells: (_m = props.ui) === null || _m === void 0 ? void 0 : _m.BodyCells, customActions: cActions, data: data, error: error, filterHandlers: (_o = props.ui) === null || _o === void 0 ? void 0 : _o.FilterHandlers, gridName: props.entityAlias, isLoading: isLoading, isRowSelectable: props.selectable, onCsvDownload: (r) => window.open(`/api/cms/datagrid/export/${props.entityAlias}?${(0, qs_1.stringify)(r)}`), onReload: onReload, rowHeight: props.rowHeight, schema: props.gridSchema, state: state }))));
133
133
  };
134
134
  GridPageComponent.displayName = "GridPageComponent";
135
135
  const GridPage = (config) => {
@@ -351,6 +351,121 @@ export declare const twColors: {
351
351
  DEFAULT: string;
352
352
  };
353
353
  test: string;
354
+ primary_surface_default: string;
355
+ primary_surface_default_hover: string;
356
+ base_border_border: string;
357
+ base_border_input: string;
358
+ base_border_inverted_border: string;
359
+ base_border_inverted_input: string;
360
+ base_icon_disabled: string;
361
+ base_icon_high_emphasis: string;
362
+ base_icon_low_emphasis: string;
363
+ base_icon_medium_emphasis: string;
364
+ base_icon_inverted_low_emphasis: string;
365
+ base_icon_inverted_disabled: string;
366
+ base_icon_inverted_high_emphasis: string;
367
+ base_shadow_shadow_md: string;
368
+ base_shadow_shadow_sm: string;
369
+ base_surface_background: string;
370
+ base_surface_disabled: string;
371
+ base_surface_input: string;
372
+ base_surface_input_disabled: string;
373
+ base_surface_input_hover: string;
374
+ base_surface_main: string;
375
+ base_surface_main_hover: string;
376
+ base_surface_popup: string;
377
+ base_surface_tooltip: string;
378
+ base_surface_inverted_default: string;
379
+ base_surface_inverted_default_hover: string;
380
+ base_surface_inverted_disabled: string;
381
+ base_surface_inverted_main: string;
382
+ base_surface_inverted_main_hover: string;
383
+ base_text_disabled: string;
384
+ base_text_high_emphasis: string;
385
+ base_text_link: string;
386
+ base_text_link_pressed: string;
387
+ base_text_low_emphasis: string;
388
+ base_text_inverted_disabled: string;
389
+ base_text_inverted_high_emphasis: string;
390
+ base_text_inverted_link: string;
391
+ base_text_inverted_low_emphasis: string;
392
+ brand_border: string;
393
+ brand_icon: string;
394
+ brand_icon_on_muted: string;
395
+ brand_text: string;
396
+ brand_text_on_muted: string;
397
+ brand_surface_bolder: string;
398
+ brand_surface_bolder_hover: string;
399
+ brand_surface_default: string;
400
+ brand_surface_default_hover: string;
401
+ brand_surface_muted: string;
402
+ brand_surface_muted_hover: string;
403
+ brand_surface_subtle: string;
404
+ brand_surface_subtle_hover: string;
405
+ info_border: string;
406
+ info_icon: string;
407
+ info_icon_on_muted: string;
408
+ info_text: string;
409
+ info_text_on_muted: string;
410
+ info_surface_default: string;
411
+ info_surface_default_hover: string;
412
+ info_surface_muted: string;
413
+ info_surface_muted_hover: string;
414
+ info_surface_subtle: string;
415
+ info_surface_subtle_hover: string;
416
+ inverted_border: string;
417
+ inverted_icon: string;
418
+ inverted_icon_on_muted: string;
419
+ inverted_text_default: string;
420
+ inverted_text_disabled: string;
421
+ inverted_text_muted: string;
422
+ inverted_text_on_muted: string;
423
+ negative_border: string;
424
+ negative_icon: string;
425
+ negative_icon_on_muted: string;
426
+ negative_text: string;
427
+ negative_text_on_muted: string;
428
+ negative_surface_default: string;
429
+ negative_surface_default_hover: string;
430
+ negative_surface_muted: string;
431
+ negative_surface_muted_hover: string;
432
+ negative_surface_subtle: string;
433
+ negative_surface_subtle_hover: string;
434
+ neutral_border: string;
435
+ neutral_icon: string;
436
+ neutral_icon_on_muted: string;
437
+ neutral_text: string;
438
+ neutral_text_on_muted: string;
439
+ neutral_surface_bolder: string;
440
+ neutral_surface_bolder_hover: string;
441
+ neutral_surface_default: string;
442
+ neutral_surface_default_hover: string;
443
+ neutral_surface_muted: string;
444
+ neutral_surface_muted_hover: string;
445
+ neutral_surface_subtle: string;
446
+ neutral_surface_subtle_hover: string;
447
+ positive_border: string;
448
+ positive_icon: string;
449
+ positive_icon_on_muted: string;
450
+ positive_text: string;
451
+ positive_text_on_muted: string;
452
+ positive_surface_default: string;
453
+ positive_surface_default_hover: string;
454
+ positive_surface_muted: string;
455
+ positive_surface_muted_hover: string;
456
+ positive_surface_subtle: string;
457
+ positive_surface_subtle_hover: string;
458
+ warning_border: string;
459
+ warning_icon: string;
460
+ warning_icon_on_muted: string;
461
+ warning_text: string;
462
+ warning_text_on_muted: string;
463
+ warning_surface_default: string;
464
+ warning_surface_default_hover: string;
465
+ warning_surface_muted: string;
466
+ warning_surface_muted_hover: string;
467
+ warning_surface_subtle: string;
468
+ warning_surface_subtle_hover: string;
354
469
  dataGridPrimary: string;
355
470
  dataGridSecondary: string;
356
471
  sidebar: {
@@ -355,6 +355,121 @@ exports.twColors = {
355
355
  DEFAULT: "#ef4444",
356
356
  },
357
357
  test: "#ff00ff",
358
+ primary_surface_default: "var(--uxf-color-brand-surface-default)",
359
+ primary_surface_default_hover: "var(--uxf-color-brand-surface-default-hover)",
360
+ base_border_border: "var(--uxf-color-base-border-border)",
361
+ base_border_input: "var(--uxf-color-base-border-input)",
362
+ base_border_inverted_border: "var(--uxf-color-base-border-inverted-border)",
363
+ base_border_inverted_input: "var(--uxf-color-base-border-inverted-input)",
364
+ base_icon_disabled: "var(--uxf-color-base-icon-disabled)",
365
+ base_icon_high_emphasis: "var(--uxf-color-base-icon-high-emphasis)",
366
+ base_icon_low_emphasis: "var(--uxf-color-base-icon-low-emphasis)",
367
+ base_icon_medium_emphasis: "var(--uxf-color-base-icon-medium-emphasis)",
368
+ base_icon_inverted_low_emphasis: "var(--uxf-color-base-icon-inverted-low-emphasis)",
369
+ base_icon_inverted_disabled: "var(--uxf-color-base-icon-inverted-disabled)",
370
+ base_icon_inverted_high_emphasis: "var(--uxf-color-base-icon-inverted-high-emphasis)",
371
+ base_shadow_shadow_md: "var(--uxf-color-base-shadow-shadow-md)",
372
+ base_shadow_shadow_sm: "var(--uxf-color-base-shadow-shadow-sm)",
373
+ base_surface_background: "var(--uxf-color-base-surface-background)",
374
+ base_surface_disabled: "var(--uxf-color-base-surface-disabled)",
375
+ base_surface_input: "var(--uxf-color-base-surface-input)",
376
+ base_surface_input_disabled: "var(--uxf-color-base-surface-input-disabled)",
377
+ base_surface_input_hover: "var(--uxf-color-base-surface-input-hover)",
378
+ base_surface_main: "var(--uxf-color-base-surface-main)",
379
+ base_surface_main_hover: "var(--uxf-color-base-surface-main-hover)",
380
+ base_surface_popup: "var(--uxf-color-base-surface-popup)",
381
+ base_surface_tooltip: "var(--uxf-color-base-surface-tooltip)",
382
+ base_surface_inverted_default: "var(--uxf-color-base-surface-inverted-default)",
383
+ base_surface_inverted_default_hover: "var(--uxf-color-base-surface-inverted-default-hover)",
384
+ base_surface_inverted_disabled: "var(--uxf-color-base-surface-inverted-disabled)",
385
+ base_surface_inverted_main: "var(--uxf-color-base-surface-inverted-main)",
386
+ base_surface_inverted_main_hover: "var(--uxf-color-base-surface-inverted-main-hover)",
387
+ base_text_disabled: "var(--uxf-color-base-text-disabled)",
388
+ base_text_high_emphasis: "var(--uxf-color-base-text-high-emphasis)",
389
+ base_text_link: "var(--uxf-color-base-text-link)",
390
+ base_text_link_pressed: "var(--uxf-color-base-text-link-pressed)",
391
+ base_text_low_emphasis: "var(--uxf-color-base-text-low-emphasis)",
392
+ base_text_inverted_disabled: "var(--uxf-color-base-text-inverted-disabled)",
393
+ base_text_inverted_high_emphasis: "var(--uxf-color-base-text-inverted-high-emphasis)",
394
+ base_text_inverted_link: "var(--uxf-color-base-text-inverted-link)",
395
+ base_text_inverted_low_emphasis: "var(--uxf-color-base-text-inverted-low-emphasis)",
396
+ brand_border: "var(--uxf-color-brand-border)",
397
+ brand_icon: "var(--uxf-color-brand-icon)",
398
+ brand_icon_on_muted: "var(--uxf-color-brand-icon-on-muted)",
399
+ brand_text: "var(--uxf-color-brand-text)",
400
+ brand_text_on_muted: "var(--uxf-color-brand-text-on-muted)",
401
+ brand_surface_bolder: "var(--uxf-color-brand-surface-bolder)",
402
+ brand_surface_bolder_hover: "var(--uxf-color-brand-surface-bolder-hover)",
403
+ brand_surface_default: "var(--uxf-color-brand-surface-default)",
404
+ brand_surface_default_hover: "var(--uxf-color-brand-surface-default-hover)",
405
+ brand_surface_muted: "var(--uxf-color-brand-surface-muted)",
406
+ brand_surface_muted_hover: "var(--uxf-color-brand-surface-muted-hover)",
407
+ brand_surface_subtle: "var(--uxf-color-brand-surface-subtle)",
408
+ brand_surface_subtle_hover: "var(--uxf-color-brand-surface-subtle-hover)",
409
+ info_border: "var(--uxf-color-info-border)",
410
+ info_icon: "var(--uxf-color-info-icon)",
411
+ info_icon_on_muted: "var(--uxf-color-info-icon-on-muted)",
412
+ info_text: "var(--uxf-color-info-text)",
413
+ info_text_on_muted: "var(--uxf-color-info-text-on-muted)",
414
+ info_surface_default: "var(--uxf-color-info-surface-default)",
415
+ info_surface_default_hover: "var(--uxf-color-info-surface-default-hover)",
416
+ info_surface_muted: "var(--uxf-color-info-surface-muted)",
417
+ info_surface_muted_hover: "var(--uxf-color-info-surface-muted-hover)",
418
+ info_surface_subtle: "var(--uxf-color-info-surface-subtle)",
419
+ info_surface_subtle_hover: "var(--uxf-color-info-surface-subtle-hover)",
420
+ inverted_border: "var(--uxf-color-inverted-border)",
421
+ inverted_icon: "var(--uxf-color-inverted-icon)",
422
+ inverted_icon_on_muted: "var(--uxf-color-inverted-icon-on-muted)",
423
+ inverted_text_default: "var(--uxf-color-inverted-text-default)",
424
+ inverted_text_disabled: "var(--uxf-color-inverted-text-disabled)",
425
+ inverted_text_muted: "var(--uxf-color-inverted-text-muted)",
426
+ inverted_text_on_muted: "var(--uxf-color-inverted-text-on-muted)",
427
+ negative_border: "var(--uxf-color-negative-border)",
428
+ negative_icon: "var(--uxf-color-negative-icon)",
429
+ negative_icon_on_muted: "var(--uxf-color-negative-icon-on-muted)",
430
+ negative_text: "var(--uxf-color-negative-text)",
431
+ negative_text_on_muted: "var(--uxf-color-negative-text-on-muted)",
432
+ negative_surface_default: "var(--uxf-color-negative-surface-default)",
433
+ negative_surface_default_hover: "var(--uxf-color-negative-surface-default-hover)",
434
+ negative_surface_muted: "var(--uxf-color-negative-surface-muted)",
435
+ negative_surface_muted_hover: "var(--uxf-color-negative-surface-muted-hover)",
436
+ negative_surface_subtle: "var(--uxf-color-negative-surface-subtle)",
437
+ negative_surface_subtle_hover: "var(--uxf-color-negative-surface-subtle-hover)",
438
+ neutral_border: "var(--uxf-color-neutral-border)",
439
+ neutral_icon: "var(--uxf-color-neutral-icon)",
440
+ neutral_icon_on_muted: "var(--uxf-color-neutral-icon-on-muted)",
441
+ neutral_text: "var(--uxf-color-neutral-text)",
442
+ neutral_text_on_muted: "var(--uxf-color-neutral-text-on-muted)",
443
+ neutral_surface_bolder: "var(--uxf-color-neutral-surface-bolder)",
444
+ neutral_surface_bolder_hover: "var(--uxf-color-neutral-surface-bolder-hover)",
445
+ neutral_surface_default: "var(--uxf-color-neutral-surface-default)",
446
+ neutral_surface_default_hover: "var(--uxf-color-neutral-surface-default-hover)",
447
+ neutral_surface_muted: "var(--uxf-color-neutral-surface-muted)",
448
+ neutral_surface_muted_hover: "var(--uxf-color-neutral-surface-muted-hover)",
449
+ neutral_surface_subtle: "var(--uxf-color-neutral-surface-subtle)",
450
+ neutral_surface_subtle_hover: "var(--uxf-color-neutral-surface-subtle-hover)",
451
+ positive_border: "var(--uxf-color-positive-border)",
452
+ positive_icon: "var(--uxf-color-positive-icon)",
453
+ positive_icon_on_muted: "var(--uxf-color-positive-icon-on-muted)",
454
+ positive_text: "var(--uxf-color-positive-text)",
455
+ positive_text_on_muted: "var(--uxf-color-positive-text-on-muted)",
456
+ positive_surface_default: "var(--uxf-color-positive-surface-default)",
457
+ positive_surface_default_hover: "var(--uxf-color-positive-surface-default-hover)",
458
+ positive_surface_muted: "var(--uxf-color-positive-surface-muted)",
459
+ positive_surface_muted_hover: "var(--uxf-color-positive-surface-muted-hover)",
460
+ positive_surface_subtle: "var(--uxf-color-positive-surface-subtle)",
461
+ positive_surface_subtle_hover: "var(--uxf-color-positive-surface-subtle-hover)",
462
+ warning_border: "var(--uxf-color-warning-border)",
463
+ warning_icon: "var(--uxf-color-warning-icon)",
464
+ warning_icon_on_muted: "var(--uxf-color-warning-icon-on-muted)",
465
+ warning_text: "var(--uxf-color-warning-text)",
466
+ warning_text_on_muted: "var(--uxf-color-warning-text-on-muted)",
467
+ warning_surface_default: "var(--uxf-color-warning-surface-default)",
468
+ warning_surface_default_hover: "var(--uxf-color-warning-surface-default-hover)",
469
+ warning_surface_muted: "var(--uxf-color-warning-surface-muted)",
470
+ warning_surface_muted_hover: "var(--uxf-color-warning-surface-muted-hover)",
471
+ warning_surface_subtle: "var(--uxf-color-warning-surface-subtle)",
472
+ warning_surface_subtle_hover: "var(--uxf-color-warning-surface-subtle-hover)",
358
473
  dataGridPrimary: "#140939",
359
474
  dataGridSecondary: "#FF4F06",
360
475
  sidebar: { background: "#1F2937", highlight: "#111827", hover: "#111827" },
@@ -2,10 +2,4 @@
2
2
  // this file is generated automatically, do not change anything manually in the contents of this file
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.twContainers = void 0;
5
- exports.twContainers = {
6
- xs: "33.75rem",
7
- sm: "45rem",
8
- md: "58rem",
9
- lg: "64rem",
10
- xl: "76rem",
11
- };
5
+ exports.twContainers = { xs: "33.75rem", sm: "45rem", md: "58rem", lg: "64rem", xl: "76rem" };
@@ -2,10 +2,4 @@
2
2
  // this file is generated automatically, do not change anything manually in the contents of this file
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.twScreens = void 0;
5
- exports.twScreens = {
6
- xs: "36em",
7
- sm: "48em",
8
- md: "62em",
9
- lg: "75em",
10
- xl: "90em",
11
- };
5
+ exports.twScreens = { xs: "36em", sm: "48em", md: "62em", lg: "75em", xl: "90em" };
@@ -0,0 +1 @@
1
+ export declare function removeConfirmHandler(): Promise<boolean>;
@@ -0,0 +1,27 @@
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.removeConfirmHandler = removeConfirmHandler;
7
+ const button_1 = require("@uxf/ui/button");
8
+ const modal_1 = require("@uxf/ui/modal");
9
+ const modal_dialog_1 = require("@uxf/ui/modal-dialog/modal-dialog");
10
+ const react_1 = __importDefault(require("react"));
11
+ function removeConfirmHandler() {
12
+ return new Promise((resolve) => {
13
+ (0, modal_1.openModal)({
14
+ disableBackdropClose: true,
15
+ children: (react_1.default.createElement(modal_dialog_1.ModalDialog, { footer: react_1.default.createElement(react_1.default.Fragment, null,
16
+ react_1.default.createElement(button_1.Button, { onClick: () => {
17
+ resolve(false);
18
+ (0, modal_1.closeModal)();
19
+ } }, "Zru\u0161it"),
20
+ react_1.default.createElement(button_1.Button, { color: "negative", onClick: () => {
21
+ resolve(true);
22
+ (0, modal_1.closeModal)();
23
+ } }, "Ano, smazat")), title: "Opravdu chcete smazat tento soubor?" })),
24
+ width: "sm",
25
+ });
26
+ });
27
+ }
@@ -1 +0,0 @@
1
- export declare function onRemoveConfirm(): Promise<boolean>;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.onRemoveConfirm = onRemoveConfirm;
4
- const message_1 = require("@uxf/ui/message");
5
- function onRemoveConfirm() {
6
- return new Promise((resolve) => {
7
- message_1.MessageService.openConfirm({
8
- acceptLabel: "Yes, delete",
9
- cancelLabel: "Cancel",
10
- title: "Do you want to delete the file?",
11
- color: "error",
12
- variant: "centered",
13
- onAccept: () => resolve(true),
14
- onCancel: () => resolve(false),
15
- CustomIconComponent: null,
16
- });
17
- });
18
- }