@qwickapps/react-framework 1.3.5 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/README.md +1681 -2
  2. package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
  3. package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
  4. package/dist/components/ErrorBoundary.d.ts +7 -0
  5. package/dist/components/ErrorBoundary.d.ts.map +1 -1
  6. package/dist/components/Html.d.ts +28 -18
  7. package/dist/components/Html.d.ts.map +1 -1
  8. package/dist/components/Logo.d.ts +12 -35
  9. package/dist/components/Logo.d.ts.map +1 -1
  10. package/dist/components/Markdown.d.ts +18 -13
  11. package/dist/components/Markdown.d.ts.map +1 -1
  12. package/dist/components/QwickApp.d.ts +16 -3
  13. package/dist/components/QwickApp.d.ts.map +1 -1
  14. package/dist/components/QwickIcon.d.ts +23 -0
  15. package/dist/components/QwickIcon.d.ts.map +1 -0
  16. package/dist/components/SafeSpan.d.ts +12 -5
  17. package/dist/components/SafeSpan.d.ts.map +1 -1
  18. package/dist/components/Scaffold.d.ts.map +1 -1
  19. package/dist/components/base/ModelView.d.ts +101 -0
  20. package/dist/components/base/ModelView.d.ts.map +1 -0
  21. package/dist/components/base/index.d.ts +11 -0
  22. package/dist/components/base/index.d.ts.map +1 -0
  23. package/dist/components/blocks/Article.d.ts +12 -2
  24. package/dist/components/blocks/Article.d.ts.map +1 -1
  25. package/dist/components/blocks/Code.d.ts +13 -2
  26. package/dist/components/blocks/Code.d.ts.map +1 -1
  27. package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
  28. package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
  29. package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
  30. package/dist/components/blocks/Footer.d.ts.map +1 -1
  31. package/dist/components/blocks/HeroBlock.d.ts +27 -13
  32. package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
  33. package/dist/components/blocks/Image.d.ts +41 -0
  34. package/dist/components/blocks/Image.d.ts.map +1 -0
  35. package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
  36. package/dist/components/blocks/Section.d.ts +16 -2
  37. package/dist/components/blocks/Section.d.ts.map +1 -1
  38. package/dist/components/blocks/Text.d.ts +41 -0
  39. package/dist/components/blocks/Text.d.ts.map +1 -0
  40. package/dist/components/blocks/index.d.ts +4 -0
  41. package/dist/components/blocks/index.d.ts.map +1 -1
  42. package/dist/components/buttons/Button.d.ts +23 -7
  43. package/dist/components/buttons/Button.d.ts.map +1 -1
  44. package/dist/components/forms/FormBlock.d.ts +19 -13
  45. package/dist/components/forms/FormBlock.d.ts.map +1 -1
  46. package/dist/components/index.d.ts +4 -0
  47. package/dist/components/index.d.ts.map +1 -1
  48. package/dist/components/input/ChoiceInputField.d.ts +17 -11
  49. package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
  50. package/dist/components/input/HtmlInputField.d.ts +17 -11
  51. package/dist/components/input/HtmlInputField.d.ts.map +1 -1
  52. package/dist/components/input/SelectInputField.d.ts +16 -10
  53. package/dist/components/input/SelectInputField.d.ts.map +1 -1
  54. package/dist/components/input/SwitchInputField.d.ts +16 -10
  55. package/dist/components/input/SwitchInputField.d.ts.map +1 -1
  56. package/dist/components/input/TextField.d.ts.map +1 -1
  57. package/dist/components/input/TextInputField.d.ts +16 -11
  58. package/dist/components/input/TextInputField.d.ts.map +1 -1
  59. package/dist/components/layout/GridCell.d.ts +23 -6
  60. package/dist/components/layout/GridCell.d.ts.map +1 -1
  61. package/dist/components/layout/GridLayout.d.ts +24 -23
  62. package/dist/components/layout/GridLayout.d.ts.map +1 -1
  63. package/dist/components/pages/FormPage.d.ts.map +1 -1
  64. package/dist/components/pages/Page.d.ts +49 -87
  65. package/dist/components/pages/Page.d.ts.map +1 -1
  66. package/dist/components/pages/index.d.ts +2 -2
  67. package/dist/components/pages/index.d.ts.map +1 -1
  68. package/dist/config/AppConfig.d.ts +49 -0
  69. package/dist/config/AppConfig.d.ts.map +1 -0
  70. package/dist/config/AppConfigBuilder.d.ts +75 -0
  71. package/dist/config/AppConfigBuilder.d.ts.map +1 -0
  72. package/dist/config/index.d.ts +13 -0
  73. package/dist/config/index.d.ts.map +1 -0
  74. package/dist/config/types.d.ts +130 -0
  75. package/dist/config/types.d.ts.map +1 -0
  76. package/dist/config.d.ts +15 -0
  77. package/dist/config.d.ts.map +1 -0
  78. package/dist/config.esm.js +451 -0
  79. package/dist/config.js +455 -0
  80. package/dist/contexts/PrintModeContext.d.ts +27 -0
  81. package/dist/contexts/PrintModeContext.d.ts.map +1 -0
  82. package/dist/contexts/QwickAppContext.d.ts +2 -2
  83. package/dist/contexts/QwickAppContext.d.ts.map +1 -1
  84. package/dist/contexts/index.d.ts +2 -0
  85. package/dist/contexts/index.d.ts.map +1 -1
  86. package/dist/hooks/index.d.ts +2 -0
  87. package/dist/hooks/index.d.ts.map +1 -1
  88. package/dist/hooks/usePrintMode.d.ts +39 -0
  89. package/dist/hooks/usePrintMode.d.ts.map +1 -0
  90. package/dist/index.css +1 -1
  91. package/dist/index.d.ts +1 -0
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.esm.css +1 -1
  94. package/dist/index.esm.js +10951 -6238
  95. package/dist/index.js +11014 -6287
  96. package/dist/schemas/CodeSchema.d.ts +2 -1
  97. package/dist/schemas/CodeSchema.d.ts.map +1 -1
  98. package/dist/schemas/CollapsibleLayoutSchema.d.ts +2 -1
  99. package/dist/schemas/CollapsibleLayoutSchema.d.ts.map +1 -1
  100. package/dist/schemas/ContentSchema.d.ts +2 -1
  101. package/dist/schemas/ContentSchema.d.ts.map +1 -1
  102. package/dist/schemas/GridCellSchema.d.ts +25 -0
  103. package/dist/schemas/GridCellSchema.d.ts.map +1 -0
  104. package/dist/schemas/GridLayoutSchema.d.ts +23 -0
  105. package/dist/schemas/GridLayoutSchema.d.ts.map +1 -0
  106. package/dist/schemas/HtmlSchema.d.ts +14 -0
  107. package/dist/schemas/HtmlSchema.d.ts.map +1 -0
  108. package/dist/schemas/ImageSchema.d.ts +32 -0
  109. package/dist/schemas/ImageSchema.d.ts.map +1 -0
  110. package/dist/schemas/LogoSchema.d.ts +35 -0
  111. package/dist/schemas/LogoSchema.d.ts.map +1 -0
  112. package/dist/schemas/MarkdownSchema.d.ts +14 -0
  113. package/dist/schemas/MarkdownSchema.d.ts.map +1 -0
  114. package/dist/schemas/PageTemplateSchema.d.ts +31 -0
  115. package/dist/schemas/PageTemplateSchema.d.ts.map +1 -0
  116. package/dist/schemas/PrintConfigSchema.d.ts +31 -0
  117. package/dist/schemas/PrintConfigSchema.d.ts.map +1 -0
  118. package/dist/schemas/SectionSchema.d.ts +2 -1
  119. package/dist/schemas/SectionSchema.d.ts.map +1 -1
  120. package/dist/schemas/TextSchema.d.ts +37 -0
  121. package/dist/schemas/TextSchema.d.ts.map +1 -0
  122. package/dist/schemas/ViewModelSchema.d.ts +23 -0
  123. package/dist/schemas/ViewModelSchema.d.ts.map +1 -0
  124. package/dist/schemas/index.d.ts +15 -1
  125. package/dist/schemas/index.d.ts.map +1 -1
  126. package/dist/schemas/transformers/ComponentTransformer.d.ts +116 -0
  127. package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
  128. package/dist/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
  129. package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
  130. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +66 -0
  131. package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +1 -0
  132. package/dist/schemas/transformers/registry.d.ts +15 -0
  133. package/dist/schemas/transformers/registry.d.ts.map +1 -0
  134. package/dist/schemas/types/Serializable.d.ts +46 -0
  135. package/dist/schemas/types/Serializable.d.ts.map +1 -0
  136. package/dist/utils/htmlTransform.d.ts.map +1 -1
  137. package/dist/utils/reactUtils.d.ts +12 -3
  138. package/dist/utils/reactUtils.d.ts.map +1 -1
  139. package/package.json +17 -3
  140. package/src/{components/__tests__ → __tests__/components}/AccessibilityProvider.test.tsx +1 -1
  141. package/src/{components/__tests__ → __tests__/components}/Article.test.tsx +1 -1
  142. package/src/{components/__tests__ → __tests__/components}/Breadcrumbs.test.tsx +1 -1
  143. package/src/{components/__tests__ → __tests__/components}/Button.test.tsx +1 -1
  144. package/src/{components/__tests__ → __tests__/components}/CardListGrid.test.tsx +2 -2
  145. package/src/{components/__tests__ → __tests__/components}/ChoiceInputField.test.tsx +1 -1
  146. package/src/{components/__tests__ → __tests__/components}/Code.test.tsx +1 -1
  147. package/src/{components/__tests__ → __tests__/components}/Content.integration.test.tsx +1 -1
  148. package/src/{components/__tests__ → __tests__/components}/Content.test.tsx +1 -1
  149. package/src/{components/__tests__ → __tests__/components}/CoverImageHeader.test.tsx +2 -2
  150. package/src/{components/__tests__ → __tests__/components}/ErrorBoundary.test.tsx +1 -1
  151. package/src/{components/__tests__ → __tests__/components}/FeatureCard.integration.test.tsx +2 -2
  152. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.integration.test.tsx +2 -2
  153. package/src/{components/__tests__ → __tests__/components}/FeatureGrid.test.tsx +2 -2
  154. package/src/{components/__tests__ → __tests__/components}/Footer.test.tsx +4 -4
  155. package/src/{components/__tests__ → __tests__/components}/FormBlock.test.tsx +1 -1
  156. package/src/{components/__tests__ → __tests__/components}/HeroBlock.integration.test.tsx +2 -2
  157. package/src/{components/__tests__ → __tests__/components}/HeroBlock.test.tsx +233 -7
  158. package/src/{components/__tests__ → __tests__/components}/Html.test.tsx +11 -2
  159. package/src/{components/__tests__ → __tests__/components}/HtmlInputField.test.tsx +3 -3
  160. package/src/__tests__/components/Logo.test.js +3 -3
  161. package/src/{components/__tests__ → __tests__/components}/Markdown.test.tsx +1 -1
  162. package/src/{components/__tests__ → __tests__/components}/PageBannerHeader.test.tsx +3 -3
  163. package/src/{components/__tests__ → __tests__/components}/PaletteSwitcher.test.tsx +3 -3
  164. package/src/{components/__tests__ → __tests__/components}/ProductCard.test.tsx +4 -4
  165. package/src/{components/__tests__ → __tests__/components}/SafeSpan.integration.test.tsx +2 -2
  166. package/src/{components/__tests__ → __tests__/components}/SafeSpan.simple.test.tsx +1 -1
  167. package/src/{components/__tests__ → __tests__/components}/SafeSpan.test.tsx +1 -1
  168. package/src/{components/__tests__ → __tests__/components}/Section.integration.test.tsx +1 -1
  169. package/src/{components/__tests__ → __tests__/components}/Section.test.tsx +1 -1
  170. package/src/{components/__tests__ → __tests__/components}/SelectInputField.test.tsx +1 -1
  171. package/src/{components/__tests__ → __tests__/components}/TextInputField.test.tsx +3 -3
  172. package/src/{components/__tests__ → __tests__/components}/ThemeSwitcher.test.tsx +3 -3
  173. package/src/__tests__/components/base/ModelView.test.tsx +220 -0
  174. package/src/__tests__/components/blocks/Code.performance.test.tsx +625 -0
  175. package/src/__tests__/components/blocks/Code.serialization.test.tsx +507 -0
  176. package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +414 -0
  177. package/src/__tests__/components/blocks/Image.serialization.test.tsx +257 -0
  178. package/src/__tests__/components/blocks/Section.serialization.test.tsx +553 -0
  179. package/src/__tests__/components/blocks/Text.performance.test.tsx +442 -0
  180. package/src/__tests__/components/blocks/Text.serialization.test.tsx +491 -0
  181. package/src/__tests__/components/buttons/Button.serialization.test.tsx +443 -0
  182. package/src/__tests__/components/input/FormComponents.serialization.test.tsx +482 -0
  183. package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +439 -0
  184. package/src/__tests__/components/input/TextInputField.serialization.test.tsx +359 -0
  185. package/src/{components/layout/CollapsibleLayout/__tests__ → __tests__/components/layout}/CollapsibleLayout.test.tsx +4 -4
  186. package/src/__tests__/components/layout/GridCell.serialization.test.tsx +403 -0
  187. package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +311 -0
  188. package/src/__tests__/hooks/usePrintMode.test.ts +89 -0
  189. package/src/__tests__/schemas/PageTemplateSchema.test.ts +161 -0
  190. package/src/__tests__/schemas/PrintConfigSchema.test.ts +127 -0
  191. package/src/__tests__/schemas/ViewModelSchema.test.ts +80 -0
  192. package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +602 -0
  193. package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +301 -0
  194. package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +521 -0
  195. package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +586 -0
  196. package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +103 -0
  197. package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +1165 -0
  198. package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +602 -0
  199. package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +691 -0
  200. package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +460 -0
  201. package/src/__tests__/schemas/transformers/TestAutomation.test.ts +597 -0
  202. package/src/{utils/__tests__ → __tests__/utils}/nested-dom-fix.test.tsx +1 -1
  203. package/src/components/ErrorBoundary.tsx +8 -8
  204. package/src/components/Html.tsx +147 -44
  205. package/src/components/Logo.tsx +198 -100
  206. package/src/components/Markdown.tsx +125 -16
  207. package/src/components/QwickApp.tsx +64 -31
  208. package/src/components/QwickIcon.tsx +59 -0
  209. package/src/components/SafeSpan.tsx +65 -10
  210. package/src/components/Scaffold.tsx +2 -8
  211. package/src/components/base/ModelView.tsx +199 -0
  212. package/src/components/base/index.ts +11 -0
  213. package/src/components/blocks/Article.tsx +57 -18
  214. package/src/components/blocks/Code.md +529 -0
  215. package/src/components/blocks/Code.tsx +102 -15
  216. package/src/components/blocks/CoverImageHeader.tsx +9 -4
  217. package/src/components/blocks/FeatureCard.tsx +1 -2
  218. package/src/components/blocks/FeatureGrid.tsx +19 -1
  219. package/src/components/blocks/Footer.tsx +13 -1
  220. package/src/components/blocks/HeroBlock.tsx +87 -20
  221. package/src/components/blocks/Image.tsx +395 -0
  222. package/src/components/blocks/PageBannerHeader.tsx +14 -12
  223. package/src/components/blocks/ProductCard.tsx +1 -1
  224. package/src/components/blocks/Section.tsx +113 -8
  225. package/src/components/blocks/Text.tsx +285 -0
  226. package/src/components/blocks/index.ts +4 -0
  227. package/src/components/buttons/Button.tsx +184 -15
  228. package/src/components/forms/FormBlock.tsx +70 -17
  229. package/src/components/index.ts +5 -0
  230. package/src/components/input/ChoiceInputField.tsx +48 -18
  231. package/src/components/input/HtmlInputField.tsx +48 -18
  232. package/src/components/input/SelectInputField.tsx +48 -16
  233. package/src/components/input/SwitchInputField.tsx +48 -17
  234. package/src/components/input/TextField.tsx +41 -1
  235. package/src/components/input/TextInputField.tsx +52 -18
  236. package/src/components/layout/GridCell.tsx +118 -9
  237. package/src/components/layout/GridLayout.tsx +125 -24
  238. package/src/components/pages/FormPage.tsx +0 -1
  239. package/src/components/pages/Page.css +304 -332
  240. package/src/components/pages/Page.tsx +307 -255
  241. package/src/components/pages/index.ts +2 -2
  242. package/src/config/AppConfig.ts +133 -0
  243. package/src/config/AppConfigBuilder.ts +421 -0
  244. package/src/config/__tests__/AppConfig.test.ts +385 -0
  245. package/src/config/__tests__/AppConfigBuilder.test.ts +432 -0
  246. package/src/config/index.ts +24 -0
  247. package/src/config/types.ts +170 -0
  248. package/src/config.ts +25 -0
  249. package/src/contexts/PrintModeContext.tsx +332 -0
  250. package/src/contexts/QwickAppContext.tsx +2 -2
  251. package/src/contexts/index.ts +2 -0
  252. package/src/hooks/index.ts +5 -1
  253. package/src/hooks/usePrintMode.ts +73 -0
  254. package/src/index.ts +3 -0
  255. package/src/schemas/CodeSchema.ts +3 -3
  256. package/src/schemas/CollapsibleLayoutSchema.ts +2 -1
  257. package/src/schemas/ContentSchema.ts +2 -1
  258. package/src/schemas/GridCellSchema.ts +164 -0
  259. package/src/schemas/GridLayoutSchema.ts +133 -0
  260. package/src/schemas/HtmlSchema.ts +47 -0
  261. package/src/schemas/ImageSchema.ts +235 -0
  262. package/src/schemas/LogoSchema.ts +241 -0
  263. package/src/schemas/MarkdownSchema.ts +47 -0
  264. package/src/schemas/PageTemplateSchema.ts +186 -0
  265. package/src/schemas/PrintConfigSchema.ts +207 -0
  266. package/src/schemas/README.md +661 -0
  267. package/src/schemas/SectionSchema.ts +2 -1
  268. package/src/schemas/TextSchema.ts +329 -0
  269. package/src/schemas/ViewModelSchema.ts +115 -0
  270. package/src/schemas/index.ts +21 -2
  271. package/src/schemas/transformers/ComponentTransformer.ts +403 -0
  272. package/src/schemas/transformers/ReactNodeTransformer.ts +236 -0
  273. package/src/schemas/transformers/registry.ts +72 -0
  274. package/src/schemas/types/Serializable.ts +51 -0
  275. package/src/stories/AccessibilityProvider.stories.tsx +253 -253
  276. package/src/stories/Article.stories.tsx +433 -433
  277. package/src/stories/Button.stories.tsx +1 -1
  278. package/src/stories/CardListGrid.stories.tsx +451 -451
  279. package/src/stories/ChoiceInputField.stories.tsx +503 -503
  280. package/src/stories/Code.stories.tsx +1 -1
  281. package/src/stories/CollapsibleLayout.stories.tsx +1414 -1414
  282. package/src/stories/Content.stories.tsx +393 -393
  283. package/src/stories/CoverImageHeader.stories.tsx +701 -701
  284. package/src/stories/DataBinding.advanced.stories.tsx +432 -432
  285. package/src/stories/DataProvider.stories.tsx +1192 -1192
  286. package/src/stories/FeatureCard.stories.tsx +557 -557
  287. package/src/stories/FeatureGrid.stories.tsx +594 -594
  288. package/src/stories/Footer.stories.tsx +640 -640
  289. package/src/stories/FormBlock.stories.tsx +760 -760
  290. package/src/stories/FormComponents.stories.tsx +349 -541
  291. package/src/stories/GridCell.stories.tsx +417 -0
  292. package/src/stories/GridLayout.stories.tsx +353 -0
  293. package/src/stories/HeroBlock.stories.tsx +862 -373
  294. package/src/stories/HtmlInputField.stories.tsx +474 -474
  295. package/src/stories/Image.stories.tsx +819 -0
  296. package/src/stories/Introduction.stories.tsx +667 -667
  297. package/src/stories/LayoutBlocks.stories.tsx +324 -324
  298. package/src/stories/Logo.stories.tsx +165 -6
  299. package/src/stories/Markdown.stories.tsx +137 -137
  300. package/src/stories/ModelView.stories.tsx +477 -0
  301. package/src/stories/Page.stories.tsx +688 -688
  302. package/src/stories/PageBannerHeader.stories.tsx +864 -864
  303. package/src/stories/PaletteSwitcher.stories.tsx +119 -119
  304. package/src/stories/ProductCard.stories.tsx +424 -424
  305. package/src/stories/QwickApp.stories.tsx +368 -368
  306. package/src/stories/ResponsiveMenu.stories.tsx +249 -249
  307. package/src/stories/SafeSpan.stories.tsx +531 -531
  308. package/src/stories/Section.stories.tsx +90 -2
  309. package/src/stories/SelectInputField.stories.tsx +524 -524
  310. package/src/stories/Text.stories.tsx +560 -0
  311. package/src/stories/TextInputField.stories.tsx +443 -443
  312. package/src/stories/ThemeSwitcher.stories.tsx +123 -123
  313. package/src/utils/htmlTransform.tsx +74 -53
  314. package/src/utils/reactUtils.tsx +57 -6
  315. package/dist/index.bundled.css +0 -12
  316. /package/src/{hooks/__tests__ → __tests__/hooks}/useDataBinding.test.tsx.disabled +0 -0
  317. /package/src/{schemas/__tests__ → __tests__/schemas}/builders.test.ts +0 -0
  318. /package/src/{utils/__tests__ → __tests__/utils}/createDataDrivenComponent.test.tsx.disabled +0 -0
  319. /package/src/{utils/__tests__ → __tests__/utils}/htmlTransform.test.tsx +0 -0
  320. /package/src/{utils/__tests__ → __tests__/utils}/optional-logging.test.ts +0 -0
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Schema for GridLayout component - Flexible grid layout
3
+ *
4
+ * Copyright (c) 2025 QwickApps.com. All rights reserved.
5
+ */
6
+
7
+ import type { ReactNode } from 'react';
8
+ import { IsBoolean, IsOptional, IsString, IsNumber, IsIn } from 'class-validator';
9
+ import 'reflect-metadata';
10
+ import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
11
+
12
+ @Schema('GridLayout', '1.0.0')
13
+ export class GridLayoutModel extends Model {
14
+ @Field()
15
+ @Editor({
16
+ field_type: FieldType.TEXTAREA,
17
+ label: 'Children',
18
+ description: 'Child components to arrange in grid layout',
19
+ placeholder: 'Nested components will be serialized automatically'
20
+ })
21
+ children?: ReactNode; // Runtime type: supports natural React usage
22
+
23
+ @Field()
24
+ @Editor({
25
+ field_type: FieldType.SELECT,
26
+ label: 'Columns',
27
+ description: 'Number of equal-width columns for auto-distribution'
28
+ })
29
+ @IsOptional()
30
+ @IsNumber()
31
+ @IsIn([1, 2, 3, 4, 5, 6])
32
+ columns?: 1 | 2 | 3 | 4 | 5 | 6;
33
+
34
+ @Field({ defaultValue: 'small' })
35
+ @Editor({
36
+ field_type: FieldType.SELECT,
37
+ label: 'Spacing',
38
+ description: 'Spacing between grid items'
39
+ })
40
+ @IsOptional()
41
+ @IsString()
42
+ @IsIn(['tiny', 'small', 'medium', 'large', 'huge'])
43
+ spacing?: string;
44
+
45
+ @Field({ defaultValue: false })
46
+ @Editor({
47
+ field_type: FieldType.BOOLEAN,
48
+ label: 'Equal Height',
49
+ description: 'Make all grid items the same height'
50
+ })
51
+ @IsOptional()
52
+ @IsBoolean()
53
+ equalHeight?: boolean;
54
+
55
+ @Field()
56
+ @Editor({
57
+ field_type: FieldType.TEXT,
58
+ label: 'Height',
59
+ description: 'Grid container height (e.g., "400px", "50vh", "medium")',
60
+ placeholder: 'auto'
61
+ })
62
+ @IsOptional()
63
+ @IsString()
64
+ height?: string;
65
+
66
+ @Field()
67
+ @Editor({
68
+ field_type: FieldType.TEXT,
69
+ label: 'Width',
70
+ description: 'Grid container width (e.g., "100%", "800px", "large")',
71
+ placeholder: '100%'
72
+ })
73
+ @IsOptional()
74
+ @IsString()
75
+ width?: string;
76
+
77
+ @Field()
78
+ @Editor({
79
+ field_type: FieldType.TEXT,
80
+ label: 'Min Height',
81
+ description: 'Minimum grid container height',
82
+ placeholder: 'auto'
83
+ })
84
+ @IsOptional()
85
+ @IsString()
86
+ minHeight?: string;
87
+
88
+ @Field()
89
+ @Editor({
90
+ field_type: FieldType.TEXT,
91
+ label: 'Min Width',
92
+ description: 'Minimum grid container width',
93
+ placeholder: 'auto'
94
+ })
95
+ @IsOptional()
96
+ @IsString()
97
+ minWidth?: string;
98
+
99
+ @Field()
100
+ @Editor({
101
+ field_type: FieldType.TEXT,
102
+ label: 'Max Height',
103
+ description: 'Maximum grid container height',
104
+ placeholder: 'none'
105
+ })
106
+ @IsOptional()
107
+ @IsString()
108
+ maxHeight?: string;
109
+
110
+ @Field()
111
+ @Editor({
112
+ field_type: FieldType.TEXT,
113
+ label: 'Max Width',
114
+ description: 'Maximum grid container width',
115
+ placeholder: 'none'
116
+ })
117
+ @IsOptional()
118
+ @IsString()
119
+ maxWidth?: string;
120
+
121
+ @Field()
122
+ @Editor({
123
+ field_type: FieldType.TEXT,
124
+ label: 'CSS Class',
125
+ description: 'Additional CSS class names',
126
+ placeholder: 'custom-grid-class'
127
+ })
128
+ @IsOptional()
129
+ @IsString()
130
+ className?: string;
131
+ }
132
+
133
+ export default GridLayoutModel;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Schema for Html component - Transforms HTML strings into Framework components
3
+ *
4
+ * Copyright (c) 2025 QwickApps.com. All rights reserved.
5
+ */
6
+
7
+ import { IsBoolean, IsOptional, IsString } from 'class-validator';
8
+ import 'reflect-metadata';
9
+ import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
10
+
11
+ @Schema('Html', '1.0.0')
12
+ export class HtmlModel extends Model {
13
+ @Field()
14
+ @Editor({
15
+ field_type: FieldType.TEXTAREA,
16
+ label: 'HTML Content',
17
+ description: 'HTML content to be transformed into React components',
18
+ placeholder: '<p>Enter HTML content...</p>'
19
+ })
20
+ @IsOptional()
21
+ @IsString()
22
+ children?: string;
23
+
24
+ @Field()
25
+ @Editor({
26
+ field_type: FieldType.CHECKBOX,
27
+ label: 'Strip Headers',
28
+ description: 'Whether to remove header elements (h1-h6) from the HTML'
29
+ })
30
+ @IsOptional()
31
+ @IsBoolean()
32
+ stripHeaders?: boolean;
33
+
34
+ @Field()
35
+ @Editor({
36
+ field_type: FieldType.TEXT,
37
+ label: 'Placeholder',
38
+ description: 'Fallback content to display when HTML is empty',
39
+ placeholder: 'No content available'
40
+ })
41
+ @IsOptional()
42
+ @IsString()
43
+ placeholder?: string;
44
+
45
+ }
46
+
47
+ export default HtmlModel;
@@ -0,0 +1,235 @@
1
+ /**
2
+ * Schema for Image component - Comprehensive image display component
3
+ *
4
+ * Copyright (c) 2025 QwickApps.com. All rights reserved.
5
+ */
6
+
7
+ import type { ReactNode } from 'react';
8
+ import { IsBoolean, IsOptional, IsString, IsNumber, IsIn } from 'class-validator';
9
+ import 'reflect-metadata';
10
+ import { Editor, Field, Schema, Model, FieldType, DataType } from '@qwickapps/schema';
11
+
12
+ // Image fit modes - how the image should be resized to fit the container
13
+ export type ImageFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
14
+
15
+ // Image loading states
16
+ export type ImageLoading = 'lazy' | 'eager';
17
+
18
+ // Image position for background-position style
19
+ export type ImagePosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
20
+
21
+ @Schema('Image', '1.0.0')
22
+ export class ImageModel extends Model {
23
+ @Field({ dataType: DataType.STRING })
24
+ @Editor({
25
+ field_type: FieldType.IMAGE,
26
+ label: 'Image Source',
27
+ description: 'Image source URL or path',
28
+ placeholder: 'https://example.com/image.jpg'
29
+ })
30
+ @IsOptional()
31
+ @IsString()
32
+ src?: string;
33
+
34
+ @Field({ dataType: DataType.STRING })
35
+ @Editor({
36
+ field_type: FieldType.TEXT,
37
+ label: 'Alt Text',
38
+ description: 'Alternative text for accessibility (required for images with src)',
39
+ placeholder: 'Describe the image for screen readers'
40
+ })
41
+ @IsOptional()
42
+ @IsString()
43
+ alt?: string;
44
+
45
+ @Field({ dataType: DataType.NUMBER })
46
+ @Editor({
47
+ field_type: FieldType.NUMBER,
48
+ label: 'Width',
49
+ description: 'Image width in pixels (optional)',
50
+ placeholder: '300'
51
+ })
52
+ @IsOptional()
53
+ @IsNumber()
54
+ width?: number;
55
+
56
+ @Field({ dataType: DataType.NUMBER })
57
+ @Editor({
58
+ field_type: FieldType.NUMBER,
59
+ label: 'Height',
60
+ description: 'Image height in pixels (optional)',
61
+ placeholder: '200'
62
+ })
63
+ @IsOptional()
64
+ @IsNumber()
65
+ height?: number;
66
+
67
+ @Field({ defaultValue: 'cover', dataType: DataType.STRING })
68
+ @Editor({
69
+ field_type: FieldType.SELECT,
70
+ label: 'Object Fit',
71
+ description: 'How the image should be resized to fit its container',
72
+ validation: {
73
+ options: [
74
+ { label: 'Fill', value: 'fill' },
75
+ { label: 'Contain', value: 'contain' },
76
+ { label: 'Cover', value: 'cover' },
77
+ { label: 'None', value: 'none' },
78
+ { label: 'Scale Down', value: 'scale-down' }
79
+ ]
80
+ }
81
+ })
82
+ @IsOptional()
83
+ @IsString()
84
+ @IsIn(['fill', 'contain', 'cover', 'none', 'scale-down'])
85
+ objectFit?: ImageFit;
86
+
87
+ @Field({ defaultValue: 'center', dataType: DataType.STRING })
88
+ @Editor({
89
+ field_type: FieldType.SELECT,
90
+ label: 'Object Position',
91
+ description: 'Position of the image within its container',
92
+ validation: {
93
+ options: [
94
+ { label: 'Center', value: 'center' },
95
+ { label: 'Top', value: 'top' },
96
+ { label: 'Bottom', value: 'bottom' },
97
+ { label: 'Left', value: 'left' },
98
+ { label: 'Right', value: 'right' },
99
+ { label: 'Top Left', value: 'top-left' },
100
+ { label: 'Top Right', value: 'top-right' },
101
+ { label: 'Bottom Left', value: 'bottom-left' },
102
+ { label: 'Bottom Right', value: 'bottom-right' }
103
+ ]
104
+ }
105
+ })
106
+ @IsOptional()
107
+ @IsString()
108
+ @IsIn(['center', 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right'])
109
+ objectPosition?: ImagePosition;
110
+
111
+ @Field({ defaultValue: 'lazy', dataType: DataType.STRING })
112
+ @Editor({
113
+ field_type: FieldType.SELECT,
114
+ label: 'Loading',
115
+ description: 'Image loading behavior',
116
+ validation: {
117
+ options: [
118
+ { label: 'Lazy (load when visible)', value: 'lazy' },
119
+ { label: 'Eager (load immediately)', value: 'eager' }
120
+ ]
121
+ }
122
+ })
123
+ @IsOptional()
124
+ @IsString()
125
+ @IsIn(['lazy', 'eager'])
126
+ loading?: ImageLoading;
127
+
128
+ @Field({ dataType: DataType.STRING })
129
+ @Editor({
130
+ field_type: FieldType.TEXT,
131
+ label: 'Title',
132
+ description: 'Image title (tooltip text)',
133
+ placeholder: 'Tooltip text on hover'
134
+ })
135
+ @IsOptional()
136
+ @IsString()
137
+ title?: string;
138
+
139
+ @Field({ defaultValue: false, dataType: DataType.BOOLEAN })
140
+ @Editor({
141
+ field_type: FieldType.BOOLEAN,
142
+ label: 'Draggable',
143
+ description: 'Allow the image to be dragged'
144
+ })
145
+ @IsOptional()
146
+ @IsBoolean()
147
+ draggable?: boolean;
148
+
149
+ @Field({ dataType: DataType.STRING })
150
+ @Editor({
151
+ field_type: FieldType.TEXT,
152
+ label: 'Border Radius',
153
+ description: 'CSS border radius (e.g., "8px", "50%", "1rem")',
154
+ placeholder: '8px'
155
+ })
156
+ @IsOptional()
157
+ @IsString()
158
+ borderRadius?: string;
159
+
160
+ @Field({ defaultValue: false, dataType: DataType.BOOLEAN })
161
+ @Editor({
162
+ field_type: FieldType.BOOLEAN,
163
+ label: 'Show Loading State',
164
+ description: 'Display a loading placeholder while the image loads'
165
+ })
166
+ @IsOptional()
167
+ @IsBoolean()
168
+ showLoading?: boolean;
169
+
170
+ @Field({ defaultValue: false, dataType: DataType.BOOLEAN })
171
+ @Editor({
172
+ field_type: FieldType.BOOLEAN,
173
+ label: 'Show Error State',
174
+ description: 'Display an error message if the image fails to load'
175
+ })
176
+ @IsOptional()
177
+ @IsBoolean()
178
+ showError?: boolean;
179
+
180
+ @Field({ dataType: DataType.STRING })
181
+ @Editor({
182
+ field_type: FieldType.TEXT,
183
+ label: 'Fallback Image',
184
+ description: 'Fallback image URL to use if the main image fails to load',
185
+ placeholder: 'https://example.com/fallback.jpg'
186
+ })
187
+ @IsOptional()
188
+ @IsString()
189
+ fallbackSrc?: string;
190
+
191
+ @Field({ dataType: DataType.STRING })
192
+ @Editor({
193
+ field_type: FieldType.TEXTAREA,
194
+ label: 'Responsive Sizes',
195
+ description: 'Responsive image sizes attribute for optimized loading',
196
+ placeholder: '(max-width: 768px) 100vw, 50vw'
197
+ })
198
+ @IsOptional()
199
+ @IsString()
200
+ sizes?: string;
201
+
202
+ @Field({ dataType: DataType.STRING })
203
+ @Editor({
204
+ field_type: FieldType.TEXTAREA,
205
+ label: 'Source Set',
206
+ description: 'Source set for responsive images (comma-separated)',
207
+ placeholder: 'image-320w.jpg 320w, image-640w.jpg 640w, image-1280w.jpg 1280w'
208
+ })
209
+ @IsOptional()
210
+ @IsString()
211
+ srcSet?: string;
212
+
213
+ // Support for placeholder content (React node)
214
+ @Field({ dataType: DataType.STRING })
215
+ @Editor({
216
+ field_type: FieldType.TEXTAREA,
217
+ label: 'Loading Placeholder',
218
+ description: 'Custom loading placeholder content (for advanced use)',
219
+ placeholder: 'Custom loading content...'
220
+ })
221
+ @IsOptional()
222
+ loadingPlaceholder?: ReactNode;
223
+
224
+ @Field({ dataType: DataType.STRING })
225
+ @Editor({
226
+ field_type: FieldType.TEXTAREA,
227
+ label: 'Error Placeholder',
228
+ description: 'Custom error placeholder content (for advanced use)',
229
+ placeholder: 'Custom error content...'
230
+ })
231
+ @IsOptional()
232
+ errorPlaceholder?: ReactNode;
233
+ }
234
+
235
+ export default ImageModel;
@@ -0,0 +1,241 @@
1
+ /**
2
+ * Schema for Logo component - Dynamic theme-aware logo
3
+ *
4
+ * Copyright (c) 2025 QwickApps.com. All rights reserved.
5
+ */
6
+
7
+ import { DataType, Editor, Field, FieldType, Model, Schema } from '@qwickapps/schema';
8
+ import { IsIn, IsNumber, IsOptional, IsString } from 'class-validator';
9
+ import { ReactNode } from 'react';
10
+ import 'reflect-metadata';
11
+
12
+ // Logo visual variants
13
+ export type LogoVariant = 'default' | 'high-contrast' | 'monochrome' | 'on-primary';
14
+
15
+ // Logo size options
16
+ export type LogoSize = 'tiny' | 'small' | 'medium' | 'large' | 'extra-large';
17
+
18
+ // Badge shape options
19
+ export type LogoBadgeShape = 'circle' | 'star' | 'square' | 'heart';
20
+
21
+ // Position type for badges and images (updated naming)
22
+ export type PositionType =
23
+ | 'none'
24
+ | 'top-left'
25
+ | 'top-center'
26
+ | 'top-right'
27
+ | 'start' // was 'center-left'
28
+ | 'center'
29
+ | 'end' // was 'center-right'
30
+ | 'bottom-left'
31
+ | 'bottom-center'
32
+ | 'bottom-right';
33
+
34
+ // Badge offset interface
35
+ export interface BadgeOffset {
36
+ /** Horizontal offset from the calculated position (positive = right, negative = left) */
37
+ x?: number;
38
+ /** Vertical offset from the calculated position (positive = down, negative = up) */
39
+ y?: number;
40
+ }
41
+
42
+ @Schema('Logo', '1.0.0')
43
+ export class LogoModel extends Model {
44
+ @Field({ defaultValue: 'Qwick Apps', dataType: DataType.STRING })
45
+ @Editor({
46
+ field_type: FieldType.TEXT,
47
+ label: 'Logo Name/Text',
48
+ description: 'Logo name/text to display. Supports up to TWO parts with \\n for line breaks and \\s for explicit spaces.',
49
+ placeholder: 'Enter logo text (e.g., "Qwick Apps", "Qwick\\nApps")'
50
+ })
51
+ @IsOptional()
52
+ @IsString()
53
+ name?: string;
54
+
55
+ @Field({ defaultValue: 'default', dataType: DataType.STRING })
56
+ @Editor({
57
+ field_type: FieldType.SELECT,
58
+ label: 'Visual Variant',
59
+ description: 'Visual style variant of the logo',
60
+ validation: {
61
+ options: [
62
+ { label: 'Default', value: 'default' },
63
+ { label: 'High Contrast', value: 'high-contrast' },
64
+ { label: 'Monochrome', value: 'monochrome' },
65
+ { label: 'On Primary Background', value: 'on-primary' }
66
+ ]
67
+ }
68
+ })
69
+ @IsOptional()
70
+ @IsString()
71
+ @IsIn(['default', 'high-contrast', 'monochrome', 'on-primary'])
72
+ variant?: LogoVariant;
73
+
74
+ @Field({ defaultValue: 'medium', dataType: DataType.STRING })
75
+ @Editor({
76
+ field_type: FieldType.SELECT,
77
+ label: 'Size',
78
+ description: 'Size variant of the logo (controls both text size and visual height)',
79
+ validation: {
80
+ options: [
81
+ { label: 'Tiny (16px)', value: 'tiny' },
82
+ { label: 'Small (20px)', value: 'small' },
83
+ { label: 'Medium (28px)', value: 'medium' },
84
+ { label: 'Large (36px)', value: 'large' },
85
+ { label: 'Extra Large (48px)', value: 'extra-large' }
86
+ ]
87
+ }
88
+ })
89
+ @IsOptional()
90
+ @IsString()
91
+ @IsIn(['tiny', 'small', 'medium', 'large', 'extra-large'])
92
+ size?: LogoSize;
93
+
94
+ @Field({ defaultValue: 'top-right', dataType: DataType.STRING })
95
+ @Editor({
96
+ field_type: FieldType.SELECT,
97
+ label: 'Badge Position',
98
+ description: 'Badge position and visibility. "none" hides the badge, others show it at the specified position.',
99
+ validation: {
100
+ options: [
101
+ { label: 'None (Hidden)', value: 'none' },
102
+ { label: 'Top Left', value: 'top-left' },
103
+ { label: 'Top Center', value: 'top-center' },
104
+ { label: 'Top Right', value: 'top-right' },
105
+ { label: 'Start (Left Center)', value: 'start' },
106
+ { label: 'Center', value: 'center' },
107
+ { label: 'End (Right Center)', value: 'end' },
108
+ { label: 'Bottom Left', value: 'bottom-left' },
109
+ { label: 'Bottom Center', value: 'bottom-center' },
110
+ { label: 'Bottom Right', value: 'bottom-right' }
111
+ ]
112
+ }
113
+ })
114
+ @IsOptional()
115
+ @IsString()
116
+ @IsIn(['none', 'top-left', 'top-center', 'top-right', 'start', 'center', 'end', 'bottom-left', 'bottom-center', 'bottom-right'])
117
+ badge?: PositionType;
118
+
119
+ @Field({ defaultValue: 'circle', dataType: DataType.STRING })
120
+ @Editor({
121
+ field_type: FieldType.SELECT,
122
+ label: 'Badge Shape',
123
+ description: 'Shape of the badge when visible',
124
+ validation: {
125
+ options: [
126
+ { label: 'Circle', value: 'circle' },
127
+ { label: 'Star', value: 'star' },
128
+ { label: 'Square', value: 'square' },
129
+ { label: 'Heart', value: 'heart' }
130
+ ]
131
+ }
132
+ })
133
+ @IsOptional()
134
+ @IsString()
135
+ @IsIn(['circle', 'star', 'square', 'heart'])
136
+ badgeShape?: LogoBadgeShape;
137
+
138
+ @Field({ dataType: DataType.NUMBER })
139
+ @Editor({
140
+ field_type: FieldType.NUMBER,
141
+ label: 'Badge Offset X',
142
+ description: 'Horizontal offset from calculated badge position (positive = right, negative = left)',
143
+ placeholder: '0'
144
+ })
145
+ @IsOptional()
146
+ @IsNumber()
147
+ badgeOffsetX?: number;
148
+
149
+ @Field({ dataType: DataType.NUMBER })
150
+ @Editor({
151
+ field_type: FieldType.NUMBER,
152
+ label: 'Badge Offset Y',
153
+ description: 'Vertical offset from calculated badge position (positive = down, negative = up)',
154
+ placeholder: '0'
155
+ })
156
+ @IsOptional()
157
+ @IsNumber()
158
+ badgeOffsetY?: number;
159
+
160
+ @Field({ defaultValue: 'Segoe UI, sans-serif', dataType: DataType.STRING })
161
+ @Editor({
162
+ field_type: FieldType.TEXT,
163
+ label: 'Font Family',
164
+ description: 'Font family for the logo text',
165
+ placeholder: 'Segoe UI, sans-serif'
166
+ })
167
+ @IsOptional()
168
+ @IsString()
169
+ fontFamily?: string;
170
+
171
+ @Field({ defaultValue: 'bold', dataType: DataType.STRING })
172
+ @Editor({
173
+ field_type: FieldType.TEXT,
174
+ label: 'Font Weight',
175
+ description: 'Font weight for the logo text',
176
+ placeholder: 'bold'
177
+ })
178
+ @IsOptional()
179
+ @IsString()
180
+ fontWeight?: string;
181
+
182
+ @Field({ defaultValue: 'logo-first-part', dataType: DataType.STRING })
183
+ @Editor({
184
+ field_type: FieldType.TEXT,
185
+ label: 'First Part CSS Class',
186
+ description: 'CSS class name for the first part of the logo text',
187
+ placeholder: 'logo-first-part'
188
+ })
189
+ @IsOptional()
190
+ @IsString()
191
+ firstPartClass?: string;
192
+
193
+ @Field({ defaultValue: 'logo-second-part', dataType: DataType.STRING })
194
+ @Editor({
195
+ field_type: FieldType.TEXT,
196
+ label: 'Second Part CSS Class',
197
+ description: 'CSS class name for the second part of the logo text',
198
+ placeholder: 'logo-second-part'
199
+ })
200
+ @IsOptional()
201
+ @IsString()
202
+ secondPartClass?: string;
203
+
204
+ // New image support properties
205
+ @Field({ dataType: DataType.STRING })
206
+ @Editor({
207
+ field_type: FieldType.IMAGE,
208
+ label: 'Logo Image',
209
+ description: 'Optional image to display alongside the logo text (ReactNode or image path)',
210
+ placeholder: 'Image path or React component'
211
+ })
212
+ @IsOptional()
213
+ image?: ReactNode | string;
214
+
215
+ @Field({ defaultValue: 'start', dataType: DataType.STRING })
216
+ @Editor({
217
+ field_type: FieldType.SELECT,
218
+ label: 'Image Position',
219
+ description: 'Position of the image relative to the logo text',
220
+ validation: {
221
+ options: [
222
+ { label: 'None (Hidden)', value: 'none' },
223
+ { label: 'Top Left', value: 'top-left' },
224
+ { label: 'Top Center', value: 'top-center' },
225
+ { label: 'Top Right', value: 'top-right' },
226
+ { label: 'Start (Left)', value: 'start' },
227
+ { label: 'Center', value: 'center' },
228
+ { label: 'End (Right)', value: 'end' },
229
+ { label: 'Bottom Left', value: 'bottom-left' },
230
+ { label: 'Bottom Center', value: 'bottom-center' },
231
+ { label: 'Bottom Right', value: 'bottom-right' }
232
+ ]
233
+ }
234
+ })
235
+ @IsOptional()
236
+ @IsString()
237
+ @IsIn(['none', 'top-left', 'top-center', 'top-right', 'start', 'center', 'end', 'bottom-left', 'bottom-center', 'bottom-right'])
238
+ imagePosition?: PositionType;
239
+ }
240
+
241
+ export default LogoModel;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Schema for Markdown component - Transforms Markdown strings into Framework components
3
+ *
4
+ * Copyright (c) 2025 QwickApps.com. All rights reserved.
5
+ */
6
+
7
+ import { IsBoolean, IsOptional, IsString } from 'class-validator';
8
+ import 'reflect-metadata';
9
+ import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
10
+
11
+ @Schema('Markdown', '1.0.0')
12
+ export class MarkdownModel extends Model {
13
+ @Field()
14
+ @Editor({
15
+ field_type: FieldType.TEXTAREA,
16
+ label: 'Markdown Content',
17
+ description: 'Markdown content to be transformed into React components',
18
+ placeholder: '# Enter Markdown content...\n\n**Bold text** and *italic text*.'
19
+ })
20
+ @IsOptional()
21
+ @IsString()
22
+ children?: string;
23
+
24
+ @Field()
25
+ @Editor({
26
+ field_type: FieldType.CHECKBOX,
27
+ label: 'Sanitize HTML',
28
+ description: 'Whether to sanitize HTML output for security'
29
+ })
30
+ @IsOptional()
31
+ @IsBoolean()
32
+ sanitize?: boolean;
33
+
34
+ @Field()
35
+ @Editor({
36
+ field_type: FieldType.TEXT,
37
+ label: 'Placeholder',
38
+ description: 'Fallback content to display when Markdown is empty',
39
+ placeholder: 'No content available'
40
+ })
41
+ @IsOptional()
42
+ @IsString()
43
+ placeholder?: string;
44
+
45
+ }
46
+
47
+ export default MarkdownModel;