@uxf/cms 11.74.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 (333) hide show
  1. package/api/index.d.ts +165 -0
  2. package/api/index.js +100 -0
  3. package/api/swr.d.ts +76 -0
  4. package/api/swr.js +43 -0
  5. package/config/container.d.ts +29 -0
  6. package/config/container.js +24 -0
  7. package/config/index.d.ts +2 -0
  8. package/config/index.js +6 -0
  9. package/content-builder/content-builder-body.d.ts +6 -0
  10. package/content-builder/content-builder-body.js +10 -0
  11. package/content-builder/content-builder-header.d.ts +7 -0
  12. package/content-builder/content-builder-header.js +15 -0
  13. package/content-builder/content-builder-root.d.ts +11 -0
  14. package/content-builder/content-builder-root.js +13 -0
  15. package/content-builder/content-builder-sidebar.d.ts +7 -0
  16. package/content-builder/content-builder-sidebar.js +12 -0
  17. package/content-builder/content-builder.d.ts +14 -0
  18. package/content-builder/content-builder.js +57 -0
  19. package/content-builder/forms/content-builder-basic-form.d.ts +10 -0
  20. package/content-builder/forms/content-builder-basic-form.js +49 -0
  21. package/content-builder/forms/content-builder-seo-form.d.ts +10 -0
  22. package/content-builder/forms/content-builder-seo-form.js +22 -0
  23. package/content-builder/index.d.ts +4 -0
  24. package/content-builder/index.js +20 -0
  25. package/content-builder/map-content-response-to-form-data.d.ts +3 -0
  26. package/content-builder/map-content-response-to-form-data.js +44 -0
  27. package/content-builder/map-form-data-to-content-request.d.ts +2 -0
  28. package/content-builder/map-form-data-to-content-request.js +28 -0
  29. package/content-builder/translations.d.ts +127 -0
  30. package/content-builder/translations.js +128 -0
  31. package/content-builder/types.d.ts +186 -0
  32. package/content-builder/types.js +2 -0
  33. package/content-builder/use-content-builder-form-api.d.ts +3 -0
  34. package/content-builder/use-content-builder-form-api.js +7 -0
  35. package/context/cms-provider.d.ts +7 -0
  36. package/context/cms-provider.js +18 -0
  37. package/deprecated/api/api-client.d.ts +15 -0
  38. package/deprecated/api/api-client.js +86 -0
  39. package/deprecated/hoc/with-authenticate.d.ts +6 -0
  40. package/deprecated/hoc/with-authenticate.js +61 -0
  41. package/deprecated/redux/configure-store.d.ts +3 -0
  42. package/deprecated/redux/configure-store.js +16 -0
  43. package/deprecated/redux/entities/actions.d.ts +30 -0
  44. package/deprecated/redux/entities/actions.js +15 -0
  45. package/deprecated/redux/entities/index.d.ts +2 -0
  46. package/deprecated/redux/entities/index.js +18 -0
  47. package/deprecated/redux/entities/reducer.d.ts +3 -0
  48. package/deprecated/redux/entities/reducer.js +36 -0
  49. package/deprecated/redux/entities/selectors.d.ts +10 -0
  50. package/deprecated/redux/entities/selectors.js +16 -0
  51. package/deprecated/redux/index.d.ts +3 -0
  52. package/deprecated/redux/index.js +22 -0
  53. package/deprecated/redux/redux-helper.d.ts +15 -0
  54. package/deprecated/redux/redux-helper.js +6 -0
  55. package/deprecated/redux/types.d.ts +7 -0
  56. package/deprecated/redux/types.js +2 -0
  57. package/deprecated/redux/user/actions.d.ts +19 -0
  58. package/deprecated/redux/user/actions.js +14 -0
  59. package/deprecated/redux/user/index.d.ts +2 -0
  60. package/deprecated/redux/user/index.js +18 -0
  61. package/deprecated/redux/user/reducer.d.ts +3 -0
  62. package/deprecated/redux/user/reducer.js +21 -0
  63. package/deprecated/redux/user/selectors.d.ts +3 -0
  64. package/deprecated/redux/user/selectors.js +5 -0
  65. package/deprecated/redux/with-redux-store.d.ts +1 -0
  66. package/deprecated/redux/with-redux-store.js +70 -0
  67. package/deprecated/security/cms-authorizator.d.ts +3 -0
  68. package/deprecated/security/cms-authorizator.js +8 -0
  69. package/deprecated/types/app.d.ts +6 -0
  70. package/deprecated/types/app.js +2 -0
  71. package/deprecated/types/form.d.ts +25 -0
  72. package/deprecated/types/form.js +16 -0
  73. package/errors/BadRequestError.d.ts +18 -0
  74. package/errors/BadRequestError.js +14 -0
  75. package/errors/ForbiddenError.d.ts +4 -0
  76. package/errors/ForbiddenError.js +13 -0
  77. package/errors/NetworkError.d.ts +4 -0
  78. package/errors/NetworkError.js +13 -0
  79. package/errors/UnauthorizedError.d.ts +4 -0
  80. package/errors/UnauthorizedError.js +13 -0
  81. package/errors/ValidationError.d.ts +7 -0
  82. package/errors/ValidationError.js +17 -0
  83. package/form-renderer/field/content-dynamic.d.ts +8 -0
  84. package/form-renderer/field/content-dynamic.js +15 -0
  85. package/form-renderer/field/content.d.ts +5 -0
  86. package/form-renderer/field/content.js +38 -0
  87. package/forms/change-password-form/change-password-form.d.ts +3 -0
  88. package/forms/change-password-form/change-password-form.js +31 -0
  89. package/forms/change-password-form/index.d.ts +2 -0
  90. package/forms/change-password-form/index.js +18 -0
  91. package/forms/change-password-form/translations.d.ts +35 -0
  92. package/forms/change-password-form/translations.js +36 -0
  93. package/forms/change-password-form/types.d.ts +13 -0
  94. package/forms/change-password-form/types.js +2 -0
  95. package/forms/components/wysiwyg-input/index.d.ts +1 -0
  96. package/forms/components/wysiwyg-input/index.js +17 -0
  97. package/forms/components/wysiwyg-input/wysiwyg-input.d.ts +26 -0
  98. package/forms/components/wysiwyg-input/wysiwyg-input.js +83 -0
  99. package/forms/forgotten-password-form/forgotten-password-form.d.ts +3 -0
  100. package/forms/forgotten-password-form/forgotten-password-form.js +52 -0
  101. package/forms/forgotten-password-form/index.d.ts +2 -0
  102. package/forms/forgotten-password-form/index.js +18 -0
  103. package/forms/forgotten-password-form/translations.d.ts +17 -0
  104. package/forms/forgotten-password-form/translations.js +18 -0
  105. package/forms/forgotten-password-form/types.d.ts +10 -0
  106. package/forms/forgotten-password-form/types.js +2 -0
  107. package/forms/invite-user-form/index.d.ts +2 -0
  108. package/forms/invite-user-form/index.js +18 -0
  109. package/forms/invite-user-form/invite-user-form.d.ts +3 -0
  110. package/forms/invite-user-form/invite-user-form.js +33 -0
  111. package/forms/invite-user-form/translations.d.ts +35 -0
  112. package/forms/invite-user-form/translations.js +36 -0
  113. package/forms/invite-user-form/types.d.ts +15 -0
  114. package/forms/invite-user-form/types.js +2 -0
  115. package/forms/login-form/index.d.ts +2 -0
  116. package/forms/login-form/index.js +18 -0
  117. package/forms/login-form/login-form.d.ts +3 -0
  118. package/forms/login-form/login-form.js +51 -0
  119. package/forms/login-form/translations.d.ts +23 -0
  120. package/forms/login-form/translations.js +24 -0
  121. package/forms/login-form/types.d.ts +11 -0
  122. package/forms/login-form/types.js +2 -0
  123. package/forms/renew-password-form/index.d.ts +2 -0
  124. package/forms/renew-password-form/index.js +18 -0
  125. package/forms/renew-password-form/renew-password-form.d.ts +3 -0
  126. package/forms/renew-password-form/renew-password-form.js +53 -0
  127. package/forms/renew-password-form/translations.d.ts +29 -0
  128. package/forms/renew-password-form/translations.js +30 -0
  129. package/forms/renew-password-form/types.d.ts +11 -0
  130. package/forms/renew-password-form/types.js +2 -0
  131. package/lib/api/create-axios-instance.d.ts +6 -0
  132. package/lib/api/create-axios-instance.js +17 -0
  133. package/lib/api/create-axios-request.d.ts +3 -0
  134. package/lib/api/create-axios-request.js +39 -0
  135. package/lib/api/create-use-axios-request.d.ts +5 -0
  136. package/lib/api/create-use-axios-request.js +35 -0
  137. package/lib/api/index.d.ts +2 -0
  138. package/lib/api/index.js +19 -0
  139. package/lib/api/types.d.ts +18 -0
  140. package/lib/api/types.js +2 -0
  141. package/lib/layout/breadcrumbs.d.ts +9 -0
  142. package/lib/layout/breadcrumbs.js +21 -0
  143. package/lib/layout/index.d.ts +3 -0
  144. package/lib/layout/index.js +19 -0
  145. package/lib/layout/layout-container.d.ts +3 -0
  146. package/lib/layout/layout-container.js +22 -0
  147. package/lib/layout/layout.d.ts +3 -0
  148. package/lib/layout/layout.js +47 -0
  149. package/lib/layout/sidebar.d.ts +3 -0
  150. package/lib/layout/sidebar.js +77 -0
  151. package/lib/layout/styles.d.ts +1 -0
  152. package/lib/layout/styles.js +4 -0
  153. package/lib/layout/types.d.ts +36 -0
  154. package/lib/layout/types.js +2 -0
  155. package/lib/login-layout/index.d.ts +2 -0
  156. package/lib/login-layout/index.js +18 -0
  157. package/lib/login-layout/login-layout.d.ts +3 -0
  158. package/lib/login-layout/login-layout.js +19 -0
  159. package/lib/login-layout/types.d.ts +9 -0
  160. package/lib/login-layout/types.js +2 -0
  161. package/lib/menu/active-item-resolver.d.ts +7 -0
  162. package/lib/menu/active-item-resolver.js +42 -0
  163. package/lib/menu/factory.d.ts +10 -0
  164. package/lib/menu/factory.js +40 -0
  165. package/lib/menu/index.d.ts +5 -0
  166. package/lib/menu/index.js +21 -0
  167. package/lib/menu/mobile-bar.d.ts +8 -0
  168. package/lib/menu/mobile-bar.js +54 -0
  169. package/lib/menu/model.d.ts +56 -0
  170. package/lib/menu/model.js +112 -0
  171. package/lib/menu/types.d.ts +5 -0
  172. package/lib/menu/types.js +2 -0
  173. package/lib/menu/ui/list-item/index.d.ts +2 -0
  174. package/lib/menu/ui/list-item/index.js +18 -0
  175. package/lib/menu/ui/list-item/list-item.d.ts +3 -0
  176. package/lib/menu/ui/list-item/list-item.js +37 -0
  177. package/lib/menu/ui/list-item/types.d.ts +19 -0
  178. package/lib/menu/ui/list-item/types.js +2 -0
  179. package/lib/menu/ui/menu-custom-item.d.ts +6 -0
  180. package/lib/menu/ui/menu-custom-item.js +17 -0
  181. package/lib/menu/ui/menu-item.d.ts +6 -0
  182. package/lib/menu/ui/menu-item.js +55 -0
  183. package/lib/menu/ui/menu-super-section-item.d.ts +6 -0
  184. package/lib/menu/ui/menu-super-section-item.js +40 -0
  185. package/lib/menu/ui/menu.d.ts +6 -0
  186. package/lib/menu/ui/menu.js +37 -0
  187. package/lib/menu/ui/sub-menu/sub-menu-item.d.ts +7 -0
  188. package/lib/menu/ui/sub-menu/sub-menu-item.js +23 -0
  189. package/lib/menu/ui/sub-menu/sub-menu-mobile.d.ts +8 -0
  190. package/lib/menu/ui/sub-menu/sub-menu-mobile.js +48 -0
  191. package/lib/menu/ui/sub-menu/sub-menu.d.ts +7 -0
  192. package/lib/menu/ui/sub-menu/sub-menu.js +46 -0
  193. package/lib/menu/ui/sub-menu/use-sub-menu.d.ts +49 -0
  194. package/lib/menu/ui/sub-menu/use-sub-menu.js +45 -0
  195. package/lib/menu/ui/translations.d.ts +17 -0
  196. package/lib/menu/ui/translations.js +18 -0
  197. package/lib/menu/ui/user-menu.d.ts +6 -0
  198. package/lib/menu/ui/user-menu.js +55 -0
  199. package/package.json +6 -6
  200. package/pages/content-builder/components/form-content.d.ts +12 -0
  201. package/pages/content-builder/components/form-content.js +64 -0
  202. package/pages/content-builder/components/form-root-fields.d.ts +16 -0
  203. package/pages/content-builder/components/form-root-fields.js +62 -0
  204. package/pages/content-builder/components/form.d.ts +12 -0
  205. package/pages/content-builder/components/form.js +83 -0
  206. package/pages/content-builder/components/header.d.ts +6 -0
  207. package/pages/content-builder/components/header.js +18 -0
  208. package/pages/content-builder/constants.d.ts +6 -0
  209. package/pages/content-builder/constants.js +10 -0
  210. package/pages/content-builder/content/feature-section.d.ts +17 -0
  211. package/pages/content-builder/content/feature-section.js +62 -0
  212. package/pages/content-builder/content/gallery.d.ts +9 -0
  213. package/pages/content-builder/content/gallery.js +29 -0
  214. package/pages/content-builder/content/hero-section.d.ts +12 -0
  215. package/pages/content-builder/content/hero-section.js +35 -0
  216. package/pages/content-builder/content/people.d.ts +17 -0
  217. package/pages/content-builder/content/people.js +61 -0
  218. package/pages/content-builder/content/wysiwyg.d.ts +15 -0
  219. package/pages/content-builder/content/wysiwyg.js +32 -0
  220. package/pages/content-builder/content-builder-page.d.ts +3 -0
  221. package/pages/content-builder/content-builder-page.js +107 -0
  222. package/pages/content-builder/content-field.d.ts +10 -0
  223. package/pages/content-builder/content-field.js +62 -0
  224. package/pages/content-builder/content-header.d.ts +3 -0
  225. package/pages/content-builder/content-header.js +55 -0
  226. package/pages/content-builder/context/details-visibility-context.d.ts +4 -0
  227. package/pages/content-builder/context/details-visibility-context.js +58 -0
  228. package/pages/content-builder/hooks/use-sortable.d.ts +15 -0
  229. package/pages/content-builder/hooks/use-sortable.js +57 -0
  230. package/pages/content-builder/index.d.ts +5 -0
  231. package/pages/content-builder/index.js +21 -0
  232. package/pages/content-builder/mapper.d.ts +4 -0
  233. package/pages/content-builder/mapper.js +69 -0
  234. package/pages/content-builder/types.d.ts +94 -0
  235. package/pages/content-builder/types.js +2 -0
  236. package/pages/forgotten-password-page/forgotten-password-page.d.ts +5 -0
  237. package/pages/forgotten-password-page/forgotten-password-page.js +49 -0
  238. package/pages/forgotten-password-page/index.d.ts +2 -0
  239. package/pages/forgotten-password-page/index.js +18 -0
  240. package/pages/forgotten-password-page/types.d.ts +11 -0
  241. package/pages/forgotten-password-page/types.js +2 -0
  242. package/pages/grid-page/get-initial-props-helper.d.ts +4 -0
  243. package/pages/grid-page/get-initial-props-helper.js +20 -0
  244. package/pages/grid-page/grid-page.d.ts +6 -0
  245. package/pages/grid-page/grid-page.js +161 -0
  246. package/pages/grid-page/index.d.ts +1 -0
  247. package/pages/grid-page/index.js +5 -0
  248. package/pages/grid-page/types.d.ts +65 -0
  249. package/pages/grid-page/types.js +2 -0
  250. package/pages/grid-page/use-hidden-columns.d.ts +4 -0
  251. package/pages/grid-page/use-hidden-columns.js +17 -0
  252. package/pages/invite-user-page/index.d.ts +2 -0
  253. package/pages/invite-user-page/index.js +18 -0
  254. package/pages/invite-user-page/invite-user-page.d.ts +2 -0
  255. package/pages/invite-user-page/invite-user-page.js +57 -0
  256. package/pages/invite-user-page/types.d.ts +12 -0
  257. package/pages/invite-user-page/types.js +2 -0
  258. package/pages/login-page/index.d.ts +2 -0
  259. package/pages/login-page/index.js +18 -0
  260. package/pages/login-page/login-page.d.ts +5 -0
  261. package/pages/login-page/login-page.js +80 -0
  262. package/pages/login-page/types.d.ts +21 -0
  263. package/pages/login-page/types.js +2 -0
  264. package/pages/renew-password-page/index.d.ts +2 -0
  265. package/pages/renew-password-page/index.js +18 -0
  266. package/pages/renew-password-page/renew-password-page.d.ts +9 -0
  267. package/pages/renew-password-page/renew-password-page.js +53 -0
  268. package/pages/renew-password-page/types.d.ts +14 -0
  269. package/pages/renew-password-page/types.js +2 -0
  270. package/pages/translations.d.ts +93 -0
  271. package/pages/translations.js +94 -0
  272. package/security/restricted-page.d.ts +10 -0
  273. package/security/restricted-page.js +40 -0
  274. package/security/translations.d.ts +29 -0
  275. package/security/translations.js +30 -0
  276. package/security/use-logged-user.d.ts +5 -0
  277. package/security/use-logged-user.js +17 -0
  278. package/ui/avatar/avatar.d.ts +11 -0
  279. package/ui/avatar/avatar.js +47 -0
  280. package/ui/avatar/get-avatar-user-letters.d.ts +1 -0
  281. package/ui/avatar/get-avatar-user-letters.js +18 -0
  282. package/ui/avatar/index.d.ts +3 -0
  283. package/ui/avatar/index.js +5 -0
  284. package/ui/avatar/theme.d.ts +11 -0
  285. package/ui/avatar/theme.js +2 -0
  286. package/ui/copy-to-clipboard/copy-to-clipboard.d.ts +3 -0
  287. package/ui/copy-to-clipboard/copy-to-clipboard.js +47 -0
  288. package/ui/copy-to-clipboard/index.d.ts +2 -0
  289. package/ui/copy-to-clipboard/index.js +18 -0
  290. package/ui/copy-to-clipboard/translations.d.ts +17 -0
  291. package/ui/copy-to-clipboard/translations.js +18 -0
  292. package/ui/copy-to-clipboard/types.d.ts +7 -0
  293. package/ui/copy-to-clipboard/types.js +2 -0
  294. package/ui/copy-to-clipboard-button/copy-to-clipboard-button.d.ts +3 -0
  295. package/ui/copy-to-clipboard-button/copy-to-clipboard-button.js +48 -0
  296. package/ui/copy-to-clipboard-button/index.d.ts +2 -0
  297. package/ui/copy-to-clipboard-button/index.js +18 -0
  298. package/ui/copy-to-clipboard-button/translations.d.ts +17 -0
  299. package/ui/copy-to-clipboard-button/translations.js +18 -0
  300. package/ui/copy-to-clipboard-button/types.d.ts +6 -0
  301. package/ui/copy-to-clipboard-button/types.js +2 -0
  302. package/ui/index.d.ts +1 -0
  303. package/ui/index.js +6 -0
  304. package/ui/tw-tokens/tw-box-shadow.d.ts +12 -0
  305. package/ui/tw-tokens/tw-box-shadow.js +15 -0
  306. package/ui/tw-tokens/tw-colors.d.ts +475 -0
  307. package/ui/tw-tokens/tw-colors.js +474 -0
  308. package/ui/tw-tokens/tw-containers.d.ts +8 -0
  309. package/ui/tw-tokens/tw-containers.js +5 -0
  310. package/ui/tw-tokens/tw-font-size.d.ts +55 -0
  311. package/ui/tw-tokens/tw-font-size.js +32 -0
  312. package/ui/tw-tokens/tw-font-weight.d.ts +12 -0
  313. package/ui/tw-tokens/tw-font-weight.js +15 -0
  314. package/ui/tw-tokens/tw-line-height.d.ts +17 -0
  315. package/ui/tw-tokens/tw-line-height.js +20 -0
  316. package/ui/tw-tokens/tw-screens.d.ts +8 -0
  317. package/ui/tw-tokens/tw-screens.js +5 -0
  318. package/ui/tw-tokens/tw-spacing.d.ts +39 -0
  319. package/ui/tw-tokens/tw-spacing.js +42 -0
  320. package/ui/tw-tokens/tw-z-index.d.ts +21 -0
  321. package/ui/tw-tokens/tw-z-index.js +24 -0
  322. package/ui/widget/index.d.ts +2 -0
  323. package/ui/widget/index.js +18 -0
  324. package/ui/widget/types.d.ts +6 -0
  325. package/ui/widget/types.js +2 -0
  326. package/ui/widget/widget.d.ts +3 -0
  327. package/ui/widget/widget.js +15 -0
  328. package/utils/remove-confirm-handler.d.ts +1 -0
  329. package/utils/remove-confirm-handler.js +31 -0
  330. package/utils/translations.d.ts +23 -0
  331. package/utils/translations.js +24 -0
  332. package/utils/use-viewport-height.d.ts +3 -0
  333. package/utils/use-viewport-height.js +28 -0
@@ -0,0 +1,49 @@
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.ContentBuilderBasicForm = ContentBuilderBasicForm;
7
+ const translations_1 = require("@uxf/core-react/translations");
8
+ const is_empty_1 = require("@uxf/core/utils/is-empty");
9
+ const is_nil_1 = require("@uxf/core/utils/is-nil");
10
+ const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
11
+ const slugify_1 = require("@uxf/core/utils/slugify");
12
+ const checkbox_input_1 = require("@uxf/form/checkbox-input");
13
+ const combobox_1 = require("@uxf/form/combobox");
14
+ const datetime_picker_input_1 = require("@uxf/form/datetime-picker-input");
15
+ const file_input_1 = require("@uxf/form/file-input");
16
+ const multi_combobox_1 = require("@uxf/form/multi-combobox");
17
+ const select_1 = require("@uxf/form/select");
18
+ const text_input_1 = require("@uxf/form/text-input");
19
+ const textarea_1 = require("@uxf/form/textarea");
20
+ const react_1 = __importDefault(require("react"));
21
+ const api_1 = require("../../api");
22
+ const visibilityLevelOptions = [
23
+ { id: "PRIVATE", label: "Privátní" },
24
+ { id: "PUBLIC_WITHOUT_SITEMAP", label: "Veřejný bez sitemapy" },
25
+ { id: "PUBLIC", label: "Veřejný" },
26
+ ];
27
+ function ContentBuilderBasicForm(props) {
28
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
29
+ const seoName = props.formApi.watch("seo.name");
30
+ const t = (0, translations_1.useUxfTranslation)();
31
+ const onBlurName = (event) => {
32
+ if ((0, is_nil_1.isNil)(seoName) || (0, is_empty_1.isEmpty)(seoName)) {
33
+ props.formApi.setValue("seo.name", (0, slugify_1.slugify)(event.target.value));
34
+ }
35
+ };
36
+ return (react_1.default.createElement("div", { className: props.className },
37
+ ((_b = (_a = props.fields) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.options) && (react_1.default.createElement(select_1.Select, { control: props.formApi.control, isReadOnly: props.fields.type.isReadOnly, isRequired: true, label: "Typ", name: "type", options: props.fields.type.options })),
38
+ react_1.default.createElement(text_input_1.TextInput, { control: props.formApi.control, isRequired: true, label: t("uxf-cms-content-builder:basic-form.title"), name: "name", onBlur: onBlurName, type: "text" }),
39
+ !((_d = (_c = props.fields) === null || _c === void 0 ? void 0 : _c.publishedAt) === null || _d === void 0 ? void 0 : _d.isHidden) && (react_1.default.createElement(datetime_picker_input_1.DatetimePickerInput, { control: props.formApi.control, isRequired: true, label: t("uxf-cms-content-builder:basic-form.published-at"), name: "publishedAt" })),
40
+ !((_f = (_e = props.fields) === null || _e === void 0 ? void 0 : _e.perex) === null || _f === void 0 ? void 0 : _f.isHidden) && (react_1.default.createElement(textarea_1.Textarea, { control: props.formApi.control, label: t("uxf-cms-content-builder:basic-form.perex"), name: "perex", rows: 3 })),
41
+ ((_h = (_g = props.fields) === null || _g === void 0 ? void 0 : _g.authorText) === null || _h === void 0 ? void 0 : _h.isHidden) === false && (react_1.default.createElement(text_input_1.TextInput, { control: props.formApi.control, label: t("uxf-cms-content-builder:basic-form.author"), name: "authorText" })),
42
+ !((_k = (_j = props.fields) === null || _j === void 0 ? void 0 : _j.author) === null || _k === void 0 ? void 0 : _k.isHidden) && ((_m = (_l = props.fields) === null || _l === void 0 ? void 0 : _l.author) === null || _m === void 0 ? void 0 : _m.autocomplete) && (react_1.default.createElement(combobox_1.Combobox, { control: props.formApi.control, label: t("uxf-cms-content-builder:basic-form.author"), loadOptions: props.fields.author.autocomplete, name: "author" })),
43
+ !((_p = (_o = props.fields) === null || _o === void 0 ? void 0 : _o.category) === null || _p === void 0 ? void 0 : _p.isHidden) && ((_r = (_q = props.fields) === null || _q === void 0 ? void 0 : _q.category) === null || _r === void 0 ? void 0 : _r.autocomplete) && (react_1.default.createElement(combobox_1.Combobox, { control: props.formApi.control, label: "Kategorie", loadOptions: props.fields.category.autocomplete, name: "category" })),
44
+ !((_t = (_s = props.fields) === null || _s === void 0 ? void 0 : _s.tags) === null || _t === void 0 ? void 0 : _t.isHidden) && ((_v = (_u = props.fields) === null || _u === void 0 ? void 0 : _u.tags) === null || _v === void 0 ? void 0 : _v.autocomplete) && (react_1.default.createElement(multi_combobox_1.MultiCombobox, { control: props.formApi.control, label: "Tagy", loadOptions: props.fields.tags.autocomplete, name: "tags" })),
45
+ !((_x = (_w = props.fields) === null || _w === void 0 ? void 0 : _w.image) === null || _x === void 0 ? void 0 : _x.isHidden) && (react_1.default.createElement(file_input_1.FileInput, { control: props.formApi.control, id: "image", label: t("uxf-cms-content-builder:basic-form.main-image"), name: "image", onUploadFile: (file) => (0, api_1.uploadFile)(file, props.uploadNamespace) })),
46
+ !((_z = (_y = props.fields) === null || _y === void 0 ? void 0 : _y.isActive) === null || _z === void 0 ? void 0 : _z.isHidden) && (react_1.default.createElement(checkbox_input_1.CheckboxInput, { control: props.formApi.control, label: t("uxf-cms-content-builder:basic-form.active"), name: "isActive" })),
47
+ !((_1 = (_0 = props.fields) === null || _0 === void 0 ? void 0 : _0.visibilityLevel) === null || _1 === void 0 ? void 0 : _1.isHidden) && (react_1.default.createElement(select_1.Select, { control: props.formApi.control, isRequired: true, label: "Viditelnost", name: "visibilityLevel", options: visibilityLevelOptions })),
48
+ (0, is_not_nil_1.isNotNil)((_3 = (_2 = props.fields) === null || _2 === void 0 ? void 0 : _2.parent) === null || _3 === void 0 ? void 0 : _3.autocomplete) && (react_1.default.createElement(combobox_1.Combobox, { control: props.formApi.control, label: t("uxf-cms-content-builder:basic-form.parent-article"), loadOptions: props.fields.parent.autocomplete, name: "parent" }))));
49
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { UseFormReturn } from "react-hook-form";
3
+ import { ContentBuilderFormData, FieldsConfiguration } from "../types";
4
+ export interface ContentBuilderSeoFormProps {
5
+ formApi: UseFormReturn<ContentBuilderFormData>;
6
+ className?: string;
7
+ uploadNamespace?: string;
8
+ fields?: FieldsConfiguration;
9
+ }
10
+ export declare function ContentBuilderSeoForm(props: ContentBuilderSeoFormProps): React.JSX.Element;
@@ -0,0 +1,22 @@
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.ContentBuilderSeoForm = ContentBuilderSeoForm;
7
+ const translations_1 = require("@uxf/core-react/translations");
8
+ const file_input_1 = require("@uxf/form/file-input");
9
+ const text_input_1 = require("@uxf/form/text-input");
10
+ const react_1 = __importDefault(require("react"));
11
+ const api_1 = require("../../api");
12
+ function ContentBuilderSeoForm(props) {
13
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
14
+ const t = (0, translations_1.useUxfTranslation)();
15
+ return (react_1.default.createElement("div", { className: props.className },
16
+ !((_c = (_b = (_a = props.fields) === null || _a === void 0 ? void 0 : _a.seo) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.isHidden) && (react_1.default.createElement(text_input_1.TextInput, { control: props.formApi.control, helperText: t("uxf-cms-content-builder:seo-form.slug-helper"), isRequired: true, label: t("uxf-cms-content-builder:seo-form.slug"), name: "seo.name", type: "text" })),
17
+ !((_f = (_e = (_d = props.fields) === null || _d === void 0 ? void 0 : _d.seo) === null || _e === void 0 ? void 0 : _e.title) === null || _f === void 0 ? void 0 : _f.isHidden) && (react_1.default.createElement(text_input_1.TextInput, { control: props.formApi.control, label: t("uxf-cms-content-builder:seo-form.title"), name: "seo.title", type: "text" })),
18
+ !((_j = (_h = (_g = props.fields) === null || _g === void 0 ? void 0 : _g.seo) === null || _h === void 0 ? void 0 : _h.description) === null || _j === void 0 ? void 0 : _j.isHidden) && (react_1.default.createElement(text_input_1.TextInput, { control: props.formApi.control, label: t("uxf-cms-content-builder:seo-form.description"), name: "seo.description", type: "text" })),
19
+ !((_m = (_l = (_k = props.fields) === null || _k === void 0 ? void 0 : _k.seo) === null || _l === void 0 ? void 0 : _l.ogTitle) === null || _m === void 0 ? void 0 : _m.isHidden) && (react_1.default.createElement(text_input_1.TextInput, { control: props.formApi.control, helperText: t("uxf-cms-content-builder:seo-form.og-title-helper"), label: "OG nadpis", name: "seo.ogTitle", type: "text" })),
20
+ !((_q = (_p = (_o = props.fields) === null || _o === void 0 ? void 0 : _o.seo) === null || _p === void 0 ? void 0 : _p.ogDescription) === null || _q === void 0 ? void 0 : _q.isHidden) && (react_1.default.createElement(text_input_1.TextInput, { control: props.formApi.control, helperText: t("uxf-cms-content-builder:seo-form.og-description-helper"), label: "OG popis", name: "seo.ogDescription", type: "text" })),
21
+ !((_t = (_s = (_r = props.fields) === null || _r === void 0 ? void 0 : _r.seo) === null || _s === void 0 ? void 0 : _s.ogImage) === null || _t === void 0 ? void 0 : _t.isHidden) && (react_1.default.createElement(file_input_1.FileInput, { control: props.formApi.control, helperText: t("uxf-cms-content-builder:seo-form.og-image-helper"), id: "seo.ogImage", label: t("uxf-cms-content-builder:seo-form.og-image"), name: "seo.ogImage", onUploadFile: (file) => (0, api_1.uploadFile)(file, props.uploadNamespace) }))));
22
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./content-builder";
2
+ export * from "./content-builder-root";
3
+ export * from "./map-content-response-to-form-data";
4
+ export * from "./map-form-data-to-content-request";
@@ -0,0 +1,20 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./content-builder"), exports);
18
+ __exportStar(require("./content-builder-root"), exports);
19
+ __exportStar(require("./map-content-response-to-form-data"), exports);
20
+ __exportStar(require("./map-form-data-to-content-request"), exports);
@@ -0,0 +1,3 @@
1
+ import { Nullish } from "@uxf/core/types";
2
+ import { ContentBuilderFormData, ContentResponse } from "./types";
3
+ export declare function mapContentResponseToFormData(content: ContentResponse | Nullish): ContentBuilderFormData;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapContentResponseToFormData = mapContentResponseToFormData;
4
+ const is_not_empty_1 = require("@uxf/core/utils/is-not-empty");
5
+ const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
6
+ function mapContentResponseToFormData(content) {
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
8
+ return {
9
+ name: (_a = content === null || content === void 0 ? void 0 : content.name) !== null && _a !== void 0 ? _a : "",
10
+ visibilityLevel: (_b = content === null || content === void 0 ? void 0 : content.visibilityLevel) !== null && _b !== void 0 ? _b : null,
11
+ authorText: [(_c = content === null || content === void 0 ? void 0 : content.author) === null || _c === void 0 ? void 0 : _c.firstName, (_d = content === null || content === void 0 ? void 0 : content.author) === null || _d === void 0 ? void 0 : _d.surname]
12
+ .filter(is_not_nil_1.isNotNil)
13
+ .filter(is_not_empty_1.isNotEmpty)
14
+ .join(" "),
15
+ author: (content === null || content === void 0 ? void 0 : content.author)
16
+ ? {
17
+ id: content.author.id,
18
+ label: `${content.author.firstName} ${content.author.surname}`,
19
+ }
20
+ : null,
21
+ image: (_e = content === null || content === void 0 ? void 0 : content.image) !== null && _e !== void 0 ? _e : null,
22
+ publishedAt: (_f = content === null || content === void 0 ? void 0 : content.publishedAt) !== null && _f !== void 0 ? _f : null,
23
+ type: (_g = content === null || content === void 0 ? void 0 : content.type) !== null && _g !== void 0 ? _g : null,
24
+ category: (content === null || content === void 0 ? void 0 : content.category)
25
+ ? {
26
+ id: content.category.id,
27
+ label: content.category.name,
28
+ }
29
+ : null,
30
+ parent: (_h = content === null || content === void 0 ? void 0 : content.parent) !== null && _h !== void 0 ? _h : null,
31
+ isActive: !(content === null || content === void 0 ? void 0 : content.hidden),
32
+ perex: (_j = content === null || content === void 0 ? void 0 : content.perex) !== null && _j !== void 0 ? _j : null,
33
+ tags: (_k = content === null || content === void 0 ? void 0 : content.tags) !== null && _k !== void 0 ? _k : [],
34
+ seo: {
35
+ name: (_l = content === null || content === void 0 ? void 0 : content.seo.name) !== null && _l !== void 0 ? _l : "",
36
+ title: (_m = content === null || content === void 0 ? void 0 : content.seo.title) !== null && _m !== void 0 ? _m : "",
37
+ description: (_o = content === null || content === void 0 ? void 0 : content.seo.description) !== null && _o !== void 0 ? _o : "",
38
+ ogTitle: (_p = content === null || content === void 0 ? void 0 : content.seo.ogTitle) !== null && _p !== void 0 ? _p : "",
39
+ ogDescription: (_q = content === null || content === void 0 ? void 0 : content.seo.ogDescription) !== null && _q !== void 0 ? _q : "",
40
+ ogImage: (_r = content === null || content === void 0 ? void 0 : content.seo.ogImage) !== null && _r !== void 0 ? _r : null,
41
+ },
42
+ content: { data: (_s = content === null || content === void 0 ? void 0 : content.content) !== null && _s !== void 0 ? _s : [], search: "" },
43
+ };
44
+ }
@@ -0,0 +1,2 @@
1
+ import { ContentBuilderFormData, ContentRequestBody } from "./types";
2
+ export declare function mapFormDataToContentRequest(values: ContentBuilderFormData): ContentRequestBody;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapFormDataToContentRequest = mapFormDataToContentRequest;
4
+ function mapFormDataToContentRequest(values) {
5
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
6
+ return {
7
+ author: (_b = (_a = values.author) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
8
+ category: (_c = values.category) === null || _c === void 0 ? void 0 : _c.id,
9
+ content: values.content,
10
+ hidden: !values.isActive,
11
+ image: (_e = (_d = values.image) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : null,
12
+ name: (_f = values.name) !== null && _f !== void 0 ? _f : "",
13
+ parent: (_g = values.parent) === null || _g === void 0 ? void 0 : _g.id,
14
+ perex: (_h = values.perex) !== null && _h !== void 0 ? _h : "",
15
+ publishedAt: values.publishedAt,
16
+ seo: {
17
+ description: (_j = values.seo.description) !== null && _j !== void 0 ? _j : "",
18
+ name: values.seo.name,
19
+ ogDescription: (_k = values.seo.ogDescription) !== null && _k !== void 0 ? _k : "",
20
+ ogImage: (_m = (_l = values.seo.ogImage) === null || _l === void 0 ? void 0 : _l.id) !== null && _m !== void 0 ? _m : null,
21
+ ogTitle: (_o = values.seo.ogTitle) !== null && _o !== void 0 ? _o : "",
22
+ title: (_p = values.seo.title) !== null && _p !== void 0 ? _p : "",
23
+ },
24
+ tags: (_r = (_q = values.tags) === null || _q === void 0 ? void 0 : _q.map((tag) => tag.id)) !== null && _r !== void 0 ? _r : [],
25
+ type: (_s = values.type) !== null && _s !== void 0 ? _s : "",
26
+ visibilityLevel: (_t = values.visibilityLevel) !== null && _t !== void 0 ? _t : "PRIVATE",
27
+ };
28
+ }
@@ -0,0 +1,127 @@
1
+ declare const _default: {
2
+ "uxf-cms-content-builder": {
3
+ header: {
4
+ save: {
5
+ cs: string;
6
+ en: string;
7
+ sk: string;
8
+ de: string;
9
+ };
10
+ };
11
+ settings: {
12
+ "default-title": {
13
+ cs: string;
14
+ en: string;
15
+ sk: string;
16
+ de: string;
17
+ };
18
+ settings: {
19
+ cs: string;
20
+ en: string;
21
+ sk: string;
22
+ de: string;
23
+ };
24
+ basic: {
25
+ cs: string;
26
+ en: string;
27
+ sk: string;
28
+ de: string;
29
+ };
30
+ };
31
+ "basic-form": {
32
+ title: {
33
+ cs: string;
34
+ en: string;
35
+ sk: string;
36
+ de: string;
37
+ };
38
+ perex: {
39
+ cs: string;
40
+ en: string;
41
+ sk: string;
42
+ de: string;
43
+ };
44
+ author: {
45
+ cs: string;
46
+ en: string;
47
+ sk: string;
48
+ de: string;
49
+ };
50
+ "main-image": {
51
+ cs: string;
52
+ en: string;
53
+ sk: string;
54
+ de: string;
55
+ };
56
+ active: {
57
+ cs: string;
58
+ en: string;
59
+ sk: string;
60
+ de: string;
61
+ };
62
+ "parent-article": {
63
+ cs: string;
64
+ en: string;
65
+ sk: string;
66
+ de: string;
67
+ };
68
+ "published-at": {
69
+ cs: string;
70
+ en: string;
71
+ sk: string;
72
+ de: string;
73
+ };
74
+ };
75
+ "seo-form": {
76
+ slug: {
77
+ cs: string;
78
+ en: string;
79
+ sk: string;
80
+ de: string;
81
+ };
82
+ "slug-helper": {
83
+ cs: string;
84
+ en: string;
85
+ sk: string;
86
+ de: string;
87
+ };
88
+ title: {
89
+ cs: string;
90
+ en: string;
91
+ sk: string;
92
+ de: string;
93
+ };
94
+ description: {
95
+ cs: string;
96
+ en: string;
97
+ sk: string;
98
+ de: string;
99
+ };
100
+ "og-title-helper": {
101
+ cs: string;
102
+ en: string;
103
+ sk: string;
104
+ de: string;
105
+ };
106
+ "og-description-helper": {
107
+ cs: string;
108
+ en: string;
109
+ sk: string;
110
+ de: string;
111
+ };
112
+ "og-image": {
113
+ cs: string;
114
+ en: string;
115
+ sk: string;
116
+ de: string;
117
+ };
118
+ "og-image-helper": {
119
+ cs: string;
120
+ en: string;
121
+ sk: string;
122
+ de: string;
123
+ };
124
+ };
125
+ };
126
+ };
127
+ export default _default;
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-cms-content-builder": {
5
+ header: {
6
+ save: {
7
+ cs: "Uložit",
8
+ en: "Save",
9
+ sk: "Uložiť",
10
+ de: "Speichern",
11
+ },
12
+ },
13
+ settings: {
14
+ "default-title": {
15
+ cs: "Článek knihovny",
16
+ en: "Library article",
17
+ sk: "Článok knižnice",
18
+ de: "Bibliotheksartikel",
19
+ },
20
+ settings: {
21
+ cs: "Nastavení",
22
+ en: "Settings",
23
+ sk: "Nastavenia",
24
+ de: "Einstellungen",
25
+ },
26
+ basic: {
27
+ cs: "Základní",
28
+ en: "Basic",
29
+ sk: "Základné",
30
+ de: "Grundlagen",
31
+ },
32
+ },
33
+ "basic-form": {
34
+ title: {
35
+ cs: "Nadpis",
36
+ en: "Title",
37
+ sk: "Nadpis",
38
+ de: "Titel",
39
+ },
40
+ perex: {
41
+ cs: "Perex",
42
+ en: "Perex",
43
+ sk: "Perex",
44
+ de: "Perex",
45
+ },
46
+ author: {
47
+ cs: "Autor",
48
+ en: "Author",
49
+ sk: "Autor",
50
+ de: "Autor",
51
+ },
52
+ "main-image": {
53
+ cs: "Hlavní obrázek",
54
+ en: "Main image",
55
+ sk: "Hlavný obrázok",
56
+ de: "Hauptbild",
57
+ },
58
+ active: {
59
+ cs: "Aktivní",
60
+ en: "Active",
61
+ sk: "Aktívny",
62
+ de: "Aktiv",
63
+ },
64
+ "parent-article": {
65
+ cs: "Nadřazený článek",
66
+ en: "Parent article",
67
+ sk: "Nadradený článok",
68
+ de: "Übergeordneter Artikel",
69
+ },
70
+ "published-at": {
71
+ cs: "Datum vydání",
72
+ en: "Publication date",
73
+ sk: "Dátum vydania",
74
+ de: "Veröffentlichungsdatum",
75
+ },
76
+ },
77
+ "seo-form": {
78
+ slug: {
79
+ cs: "Slug",
80
+ en: "Slug",
81
+ sk: "Slug",
82
+ de: "Slug",
83
+ },
84
+ "slug-helper": {
85
+ cs: "Slug = unikátní koncovka URL adresy",
86
+ en: "Slug = unique URL address ending",
87
+ sk: "Slug = unikátna koncovka URL adresy",
88
+ de: "Slug = eindeutige URL-Adressenendung",
89
+ },
90
+ title: {
91
+ cs: "Nadpis",
92
+ en: "Title",
93
+ sk: "Nadpis",
94
+ de: "Titel",
95
+ },
96
+ description: {
97
+ cs: "Popis",
98
+ en: "Description",
99
+ sk: "Popis",
100
+ de: "Beschreibung",
101
+ },
102
+ "og-title-helper": {
103
+ cs: "Nadpis který bude zobrazen při sdílení na Facebooku, ...",
104
+ en: "Title that will be displayed when sharing on Facebook, ...",
105
+ sk: "Nadpis ktorý bude zobrazený pri zdieľaní na Facebooku, ...",
106
+ de: "Titel, der beim Teilen auf Facebook angezeigt wird, ...",
107
+ },
108
+ "og-description-helper": {
109
+ cs: "Popis který bude zobrazen při sdílení na Facebooku, ...",
110
+ en: "Description that will be displayed when sharing on Facebook, ...",
111
+ sk: "Popis ktorý bude zobrazený pri zdieľaní na Facebooku, ...",
112
+ de: "Beschreibung, die beim Teilen auf Facebook angezeigt wird, ...",
113
+ },
114
+ "og-image": {
115
+ cs: "OG obrázek",
116
+ en: "OG image",
117
+ sk: "OG obrázok",
118
+ de: "OG-Bild",
119
+ },
120
+ "og-image-helper": {
121
+ cs: "Obrázek který bude zobrazen při sdílení na Facebooku, ...",
122
+ en: "Image that will be displayed when sharing on Facebook, ...",
123
+ sk: "Obrázok ktorý bude zobrazený pri zdieľaní na Facebooku, ...",
124
+ de: "Bild, das beim Teilen auf Facebook angezeigt wird, ...",
125
+ },
126
+ },
127
+ },
128
+ };
@@ -0,0 +1,186 @@
1
+ import { CheckboxInputValue } from "@uxf/form/checkbox-input";
2
+ import { ComboboxValue } from "@uxf/form/combobox";
3
+ import { DatetimePickerInputValue } from "@uxf/form/datetime-picker-input";
4
+ import { FileInputValue } from "@uxf/form/file-input";
5
+ import { MultiComboboxValue } from "@uxf/form/multi-combobox";
6
+ import { SelectValue } from "@uxf/form/select";
7
+ import { TextInputValue } from "@uxf/form/text-input";
8
+ import { TextareaValue } from "@uxf/form/textarea";
9
+ import { SelectOption } from "@uxf/ui/select";
10
+ export type ContentBuilderFormData = {
11
+ authorText: TextInputValue;
12
+ author: ComboboxValue<number>;
13
+ category: ComboboxValue<number>;
14
+ content: {
15
+ data: any[];
16
+ search: string;
17
+ };
18
+ image: FileInputValue;
19
+ isActive: CheckboxInputValue;
20
+ name: TextInputValue;
21
+ parent: ComboboxValue<number>;
22
+ perex: TextareaValue;
23
+ publishedAt: DatetimePickerInputValue;
24
+ seo: {
25
+ description: TextInputValue;
26
+ name: TextInputValue;
27
+ ogDescription: TextInputValue;
28
+ ogImage: FileInputValue;
29
+ ogTitle: TextInputValue;
30
+ title: TextInputValue;
31
+ };
32
+ tags: MultiComboboxValue<number>;
33
+ type: SelectValue<string>;
34
+ visibilityLevel: SelectValue<VisibilityLevel>;
35
+ };
36
+ export type FieldsConfiguration = {
37
+ parent?: {
38
+ autocomplete?: Autocomplete;
39
+ };
40
+ type?: {
41
+ options?: SelectOption[];
42
+ isReadOnly?: boolean;
43
+ };
44
+ publishedAt?: {
45
+ isHidden?: boolean;
46
+ };
47
+ perex?: {
48
+ isHidden?: boolean;
49
+ };
50
+ authorText?: {
51
+ isHidden?: boolean;
52
+ };
53
+ author?: {
54
+ autocomplete?: Autocomplete;
55
+ isHidden?: boolean;
56
+ };
57
+ category?: {
58
+ autocomplete?: Autocomplete;
59
+ isHidden?: boolean;
60
+ };
61
+ tags?: {
62
+ autocomplete?: Autocomplete;
63
+ isHidden?: boolean;
64
+ };
65
+ image?: {
66
+ isHidden?: boolean;
67
+ };
68
+ visibilityLevel?: {
69
+ isHidden?: boolean;
70
+ };
71
+ isActive?: {
72
+ isHidden?: boolean;
73
+ };
74
+ seo?: {
75
+ isHidden?: boolean;
76
+ name?: {
77
+ isHidden?: boolean;
78
+ };
79
+ title?: {
80
+ isHidden?: boolean;
81
+ };
82
+ description?: {
83
+ isHidden?: boolean;
84
+ };
85
+ ogTitle?: {
86
+ isHidden?: boolean;
87
+ };
88
+ ogDescription?: {
89
+ isHidden?: boolean;
90
+ };
91
+ ogImage?: {
92
+ isHidden?: boolean;
93
+ };
94
+ };
95
+ };
96
+ export type VisibilityLevel = "PUBLIC" | "PUBLIC_WITHOUT_SITEMAP" | "PRIVATE";
97
+ export interface AutocompleteResponse {
98
+ id: number;
99
+ label: string;
100
+ }
101
+ export interface StorageImageResponse {
102
+ id: number;
103
+ uuid: string;
104
+ type: string;
105
+ extension: string;
106
+ name: string;
107
+ namespace: string;
108
+ width: number;
109
+ height: number;
110
+ size: number;
111
+ createdAt: string;
112
+ fileType: "image";
113
+ }
114
+ interface ContentSeo {
115
+ name: string | null;
116
+ title: string;
117
+ description: string;
118
+ ogTitle: string;
119
+ ogDescription: string;
120
+ ogImage: number | null;
121
+ }
122
+ interface ContentSeoResponse {
123
+ name: string | null;
124
+ title: string;
125
+ description: string;
126
+ ogTitle: string;
127
+ ogDescription: string;
128
+ ogImage: StorageImageResponse | null;
129
+ }
130
+ export interface ContentLite {
131
+ data: Array<any>;
132
+ search: string;
133
+ }
134
+ export interface ContentRequestBody {
135
+ type: string;
136
+ name: string;
137
+ perex: string;
138
+ seo: ContentSeo;
139
+ visibilityLevel: VisibilityLevel;
140
+ hidden: boolean;
141
+ image: number | null;
142
+ publishedAt: string | null;
143
+ author: number | null;
144
+ content: ContentLite;
145
+ tags: Array<number>;
146
+ parent?: number | null;
147
+ category?: number | null;
148
+ }
149
+ export interface ContentCategoryResponse {
150
+ id: number;
151
+ name: string;
152
+ }
153
+ export interface ContentPreviewResponse {
154
+ id: number;
155
+ name: string;
156
+ label: string;
157
+ }
158
+ export interface ContentAuthorResponse {
159
+ id: number;
160
+ firstName: string;
161
+ surname: string;
162
+ avatar: StorageImageResponse | null;
163
+ }
164
+ export interface ContentResponse {
165
+ id: number;
166
+ type: string;
167
+ name: string;
168
+ perex: string;
169
+ seo: ContentSeoResponse;
170
+ visibilityLevel: VisibilityLevel;
171
+ hidden: boolean;
172
+ image: StorageImageResponse | null;
173
+ publishedAt: string | null;
174
+ author: ContentAuthorResponse | null;
175
+ parent: ContentPreviewResponse | null;
176
+ category: ContentCategoryResponse | null;
177
+ content: Array<any>;
178
+ tags: Array<AutocompleteResponse>;
179
+ createdAt: string;
180
+ updatedAt: string;
181
+ }
182
+ export type Autocomplete = (value: string) => Promise<Array<{
183
+ id: string | number;
184
+ label: string;
185
+ }>>;
186
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { UseFormProps } from "react-hook-form";
2
+ import { ContentBuilderFormData } from "./types";
3
+ export declare function useContentBuilderFormApi(props: UseFormProps<ContentBuilderFormData>): import("react-hook-form").UseFormReturn<ContentBuilderFormData, any, undefined>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useContentBuilderFormApi = useContentBuilderFormApi;
4
+ const react_hook_form_1 = require("react-hook-form");
5
+ function useContentBuilderFormApi(props) {
6
+ return (0, react_hook_form_1.useForm)(props);
7
+ }
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren, ReactNode } from "react";
2
+ import { SWRConfiguration } from "swr";
3
+ interface Props {
4
+ swrConfig?: SWRConfiguration;
5
+ }
6
+ export declare function CmsProvider(props: PropsWithChildren<Props>): ReactNode;
7
+ export {};