@uxf/cms 11.73.0 → 11.74.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.
Files changed (50) hide show
  1. package/content-builder/content-builder-header.js +3 -1
  2. package/content-builder/content-builder.js +5 -3
  3. package/content-builder/forms/content-builder-basic-form.js +10 -8
  4. package/content-builder/forms/content-builder-seo-form.js +8 -6
  5. package/content-builder/translations.d.ts +127 -0
  6. package/content-builder/translations.js +128 -0
  7. package/forms/change-password-form/change-password-form.js +9 -4
  8. package/forms/change-password-form/translations.d.ts +35 -0
  9. package/forms/change-password-form/translations.js +36 -0
  10. package/forms/forgotten-password-form/forgotten-password-form.js +4 -2
  11. package/forms/forgotten-password-form/translations.d.ts +17 -0
  12. package/forms/forgotten-password-form/translations.js +18 -0
  13. package/forms/invite-user-form/invite-user-form.js +7 -5
  14. package/forms/invite-user-form/translations.d.ts +35 -0
  15. package/forms/invite-user-form/translations.js +36 -0
  16. package/forms/login-form/login-form.js +5 -3
  17. package/forms/login-form/translations.d.ts +23 -0
  18. package/forms/login-form/translations.js +24 -0
  19. package/forms/renew-password-form/renew-password-form.js +8 -3
  20. package/forms/renew-password-form/translations.d.ts +29 -0
  21. package/forms/renew-password-form/translations.js +30 -0
  22. package/lib/menu/ui/translations.d.ts +17 -0
  23. package/lib/menu/ui/translations.js +18 -0
  24. package/lib/menu/ui/user-menu.js +3 -1
  25. package/package.json +6 -6
  26. package/pages/content-builder/components/header.js +3 -1
  27. package/pages/content-builder/content/feature-section.js +17 -14
  28. package/pages/content-builder/content/gallery.js +6 -4
  29. package/pages/content-builder/content/hero-section.js +10 -6
  30. package/pages/content-builder/content/people.js +19 -15
  31. package/pages/content-builder/content/wysiwyg.js +9 -5
  32. package/pages/content-builder/content-header.js +4 -2
  33. package/pages/grid-page/grid-page.js +3 -1
  34. package/pages/translations.d.ts +93 -0
  35. package/pages/translations.js +94 -0
  36. package/security/restricted-page.d.ts +2 -1
  37. package/security/restricted-page.js +7 -5
  38. package/security/translations.d.ts +29 -0
  39. package/security/translations.js +30 -0
  40. package/translations/translations.d.ts +429 -0
  41. package/translations/translations.js +31 -0
  42. package/ui/copy-to-clipboard/copy-to-clipboard.js +4 -2
  43. package/ui/copy-to-clipboard/translations.d.ts +17 -0
  44. package/ui/copy-to-clipboard/translations.js +18 -0
  45. package/ui/copy-to-clipboard-button/copy-to-clipboard-button.js +6 -2
  46. package/ui/copy-to-clipboard-button/translations.d.ts +17 -0
  47. package/ui/copy-to-clipboard-button/translations.js +18 -0
  48. package/utils/remove-confirm-handler.js +10 -5
  49. package/utils/translations.d.ts +23 -0
  50. package/utils/translations.js +24 -0
@@ -0,0 +1,93 @@
1
+ declare const _default: {
2
+ "uxf-cms-pages-content-builder": {
3
+ components: {
4
+ "content-header": {
5
+ "confirm-delete-section": {
6
+ cs: string;
7
+ };
8
+ };
9
+ header: {
10
+ save: {
11
+ cs: string;
12
+ };
13
+ };
14
+ };
15
+ content: {
16
+ "hero-section": {
17
+ title: {
18
+ cs: string;
19
+ };
20
+ subtitle: {
21
+ cs: string;
22
+ };
23
+ };
24
+ "feature-section": {
25
+ title: {
26
+ cs: string;
27
+ };
28
+ subtitle: {
29
+ cs: string;
30
+ };
31
+ "add-feature": {
32
+ cs: string;
33
+ };
34
+ "confirm-delete-feature": {
35
+ cs: string;
36
+ };
37
+ "feature-title": {
38
+ cs: string;
39
+ };
40
+ "delete-feature": {
41
+ cs: string;
42
+ };
43
+ "feature-name": {
44
+ cs: string;
45
+ };
46
+ image: {
47
+ cs: string;
48
+ };
49
+ };
50
+ people: {
51
+ "confirm-delete-person": {
52
+ cs: string;
53
+ };
54
+ "person-title": {
55
+ cs: string;
56
+ };
57
+ "delete-person": {
58
+ cs: string;
59
+ };
60
+ name: {
61
+ cs: string;
62
+ };
63
+ image: {
64
+ cs: string;
65
+ };
66
+ description: {
67
+ cs: string;
68
+ };
69
+ text: {
70
+ cs: string;
71
+ };
72
+ phone: {
73
+ cs: string;
74
+ };
75
+ "add-person": {
76
+ cs: string;
77
+ };
78
+ };
79
+ wysiwyg: {
80
+ text: {
81
+ cs: string;
82
+ };
83
+ placeholder: {
84
+ cs: string;
85
+ };
86
+ };
87
+ };
88
+ "confirm-delete-section": {
89
+ cs: string;
90
+ };
91
+ };
92
+ };
93
+ export default _default;
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-cms-pages-content-builder": {
5
+ components: {
6
+ "content-header": {
7
+ "confirm-delete-section": {
8
+ cs: "Opravdu chcete smazat tuto sekci?",
9
+ },
10
+ },
11
+ header: {
12
+ save: {
13
+ cs: "Uložit",
14
+ },
15
+ },
16
+ },
17
+ content: {
18
+ "hero-section": {
19
+ title: {
20
+ cs: "Nadpis",
21
+ },
22
+ subtitle: {
23
+ cs: "Podnadpis",
24
+ },
25
+ },
26
+ "feature-section": {
27
+ title: {
28
+ cs: "Název sekce",
29
+ },
30
+ subtitle: {
31
+ cs: "Popis sekce",
32
+ },
33
+ "add-feature": {
34
+ cs: "Přidat funkci",
35
+ },
36
+ "confirm-delete-feature": {
37
+ cs: "Opravdu chcete smazat tuto funkci?",
38
+ },
39
+ "feature-title": {
40
+ cs: "Funkce {{index}}",
41
+ },
42
+ "delete-feature": {
43
+ cs: "Smazat funkci",
44
+ },
45
+ "feature-name": {
46
+ cs: "Název funkce",
47
+ },
48
+ image: {
49
+ cs: "Obrázek",
50
+ },
51
+ },
52
+ people: {
53
+ "confirm-delete-person": {
54
+ cs: "Opravdu chcete smazat tuto osobu?",
55
+ },
56
+ "person-title": {
57
+ cs: "Osoba {{index}}",
58
+ },
59
+ "delete-person": {
60
+ cs: "Smazat osobu",
61
+ },
62
+ name: {
63
+ cs: "Jméno",
64
+ },
65
+ image: {
66
+ cs: "Obrázek",
67
+ },
68
+ description: {
69
+ cs: "Popis",
70
+ },
71
+ text: {
72
+ cs: "Text",
73
+ },
74
+ phone: {
75
+ cs: "Telefon",
76
+ },
77
+ "add-person": {
78
+ cs: "Přidat osobu",
79
+ },
80
+ },
81
+ wysiwyg: {
82
+ text: {
83
+ cs: "Text",
84
+ },
85
+ placeholder: {
86
+ cs: "Zadejte text...",
87
+ },
88
+ },
89
+ },
90
+ "confirm-delete-section": {
91
+ cs: "Opravdu chcete smazat sekci?",
92
+ },
93
+ },
94
+ };
@@ -1,3 +1,4 @@
1
+ import { useUxfTranslation } from "@uxf/core-react/translations";
1
2
  import React, { ReactNode } from "react";
2
3
  interface Config {
3
4
  allowedRole: string[];
@@ -5,5 +6,5 @@ interface Config {
5
6
  export declare function ErrorContent(props: {
6
7
  error: any;
7
8
  }): React.JSX.Element;
8
- export declare function restrictedPage(Component: () => ReactNode, config: Config): (props: any) => React.JSX.Element;
9
+ export declare function restrictedPage(Component: () => ReactNode, config: Config, t: ReturnType<typeof useUxfTranslation>): (props: any) => React.JSX.Element;
9
10
  export {};
@@ -5,20 +5,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ErrorContent = ErrorContent;
7
7
  exports.restrictedPage = restrictedPage;
8
+ const translations_1 = require("@uxf/core-react/translations");
8
9
  const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
9
10
  const button_1 = require("@uxf/ui/button");
10
11
  const loader_1 = require("@uxf/ui/loader");
11
12
  const react_1 = __importDefault(require("react"));
12
13
  const swr_1 = require("../api/swr");
13
14
  function ErrorContent(props) {
15
+ const t = (0, translations_1.useUxfTranslation)();
14
16
  if (props.error.code === "UNAUTHORIZED") {
15
17
  return (react_1.default.createElement(react_1.default.Fragment, null,
16
- react_1.default.createElement("div", null, "Mus\u00EDte se p\u0159\u00EDhl\u00E1sit"),
17
- react_1.default.createElement(button_1.Button, { href: `/admin/login?redirect=${window.location.href}` }, "P\u0159ihl\u00E1sit")));
18
+ react_1.default.createElement("div", null, t("uxf-cms-restricted-page:login-required")),
19
+ react_1.default.createElement(button_1.Button, { href: `/admin/login?redirect=${window.location.href}` }, t("uxf-cms-restricted-page:login"))));
18
20
  }
19
- return react_1.default.createElement("div", null, "Vyskytla se chyba");
21
+ return react_1.default.createElement("div", null, t("uxf-cms-restricted-page:unknown-error"));
20
22
  }
21
- function restrictedPage(Component, config) {
23
+ function restrictedPage(Component, config, t) {
22
24
  return function Page(props) {
23
25
  const meQuery = (0, swr_1.useCmsMeQuery)();
24
26
  if (meQuery.isLoading || typeof window === "undefined") {
@@ -31,7 +33,7 @@ function restrictedPage(Component, config) {
31
33
  }
32
34
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
33
35
  if (!config.allowedRole.some((role) => { var _a, _b; return (_b = (_a = meQuery.data) === null || _a === void 0 ? void 0 : _a.roles) === null || _b === void 0 ? void 0 : _b.includes(role); })) {
34
- return (react_1.default.createElement("div", { className: "flex min-h-screen w-full items-center justify-center" }, "Pro tuto str\u00E1nku nem\u00E1te opr\u00E1vn\u011Bn\u00ED."));
36
+ return (react_1.default.createElement("div", { className: "flex min-h-screen w-full items-center justify-center" }, t("uxf-cms-restricted-page:forbidden")));
35
37
  }
36
38
  return react_1.default.createElement(Component, { ...props });
37
39
  };
@@ -0,0 +1,29 @@
1
+ declare const _default: {
2
+ "uxf-cms-restricted-page": {
3
+ login: {
4
+ cs: string;
5
+ en: string;
6
+ sk: string;
7
+ de: string;
8
+ };
9
+ "login-required": {
10
+ cs: string;
11
+ en: string;
12
+ sk: string;
13
+ de: string;
14
+ };
15
+ "unknown-error": {
16
+ cs: string;
17
+ en: string;
18
+ sk: string;
19
+ de: string;
20
+ };
21
+ forbidden: {
22
+ cs: string;
23
+ en: string;
24
+ sk: string;
25
+ de: string;
26
+ };
27
+ };
28
+ };
29
+ export default _default;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-cms-restricted-page": {
5
+ login: {
6
+ cs: "Přihlásit",
7
+ en: "Login",
8
+ sk: "Prihlásiť",
9
+ de: "Anmelden",
10
+ },
11
+ "login-required": {
12
+ cs: "Musíte se přihlásit",
13
+ en: "You must log in",
14
+ sk: "Musíte sa prihlásiť",
15
+ de: "Sie müssen sich anmelden",
16
+ },
17
+ "unknown-error": {
18
+ cs: "Vyskytla se chyba",
19
+ en: "An error occurred",
20
+ sk: "Vyskytla sa chyba",
21
+ de: "Ein Fehler ist aufgetreten",
22
+ },
23
+ forbidden: {
24
+ cs: "Pro tuto stránku nemáte oprávnění.",
25
+ en: "You don't have permission for this page.",
26
+ sk: "Pre túto stránku nemáte oprávnenie.",
27
+ de: "Sie haben keine Berechtigung für diese Seite.",
28
+ },
29
+ },
30
+ };