@chobantonov/jsonforms-extended-spec 0.0.0-stage → 0.2.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 (366) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -2
  3. package/conformance/authoring.json +2169 -0
  4. package/conformance/behavior.json +731 -0
  5. package/conformance/config-consumption.json +1531 -0
  6. package/conformance/expected-invalid.json +20 -0
  7. package/docs/audit.md +150 -0
  8. package/docs/conditional-fields.md +80 -0
  9. package/docs/draft-07-visual-support.md +43 -0
  10. package/docs/external-resources-proposal.md +536 -0
  11. package/docs/implementation-guide.md +180 -0
  12. package/docs/implementation-pitfalls.md +802 -0
  13. package/docs/implementation-web-typescript.md +41 -0
  14. package/docs/renderer-and-demo.md +1347 -0
  15. package/docs/renderer-selection.md +99 -0
  16. package/docs/spec.md +8321 -0
  17. package/docs/todo.md +149 -0
  18. package/examples/README.md +121 -0
  19. package/examples/additional-errors/README.md +169 -0
  20. package/examples/additional-errors/config.json +3 -0
  21. package/examples/additional-errors/data.json +11 -0
  22. package/examples/additional-errors/schema.json +56 -0
  23. package/examples/additional-errors/translations.json +64 -0
  24. package/examples/additional-errors/uischema.json +158 -0
  25. package/examples/additional-items-pagination/README.md +8 -0
  26. package/examples/additional-items-pagination/config.json +10 -0
  27. package/examples/additional-items-pagination/data.json +22 -0
  28. package/examples/additional-items-pagination/schema.json +30 -0
  29. package/examples/additional-items-pagination/translations.json +16 -0
  30. package/examples/additional-items-pagination/uischema.json +39 -0
  31. package/examples/additional-properties/README.md +188 -0
  32. package/examples/additional-properties/config.json +5 -0
  33. package/examples/additional-properties/data.json +31 -0
  34. package/examples/additional-properties/schema.json +78 -0
  35. package/examples/additional-properties/translations.json +80 -0
  36. package/examples/additional-properties/uischema.json +104 -0
  37. package/examples/ag-grid/README.md +62 -0
  38. package/examples/ag-grid/config.json +14 -0
  39. package/examples/ag-grid/data.json +124 -0
  40. package/examples/ag-grid/schema.json +48 -0
  41. package/examples/ag-grid/translations.json +58 -0
  42. package/examples/ag-grid/uischema.json +671 -0
  43. package/examples/array-choices/README.md +150 -0
  44. package/examples/array-choices/config.json +4 -0
  45. package/examples/array-choices/data.json +10 -0
  46. package/examples/array-choices/schema.json +68 -0
  47. package/examples/array-choices/translations.json +64 -0
  48. package/examples/array-choices/uischema.json +97 -0
  49. package/examples/array-controls/README.md +237 -0
  50. package/examples/array-controls/config.json +4 -0
  51. package/examples/array-controls/data.json +147 -0
  52. package/examples/array-controls/schema.json +374 -0
  53. package/examples/array-controls/translations.json +186 -0
  54. package/examples/array-controls/uischema.json +685 -0
  55. package/examples/array-detail-modes/README.md +11 -0
  56. package/examples/array-detail-modes/data.json +38 -0
  57. package/examples/array-detail-modes/schema.json +89 -0
  58. package/examples/array-detail-modes/translations.json +36 -0
  59. package/examples/array-detail-modes/uischema.json +73 -0
  60. package/examples/array-detail-modes/uischemas.d.mts +2 -0
  61. package/examples/array-detail-modes/uischemas.json +15 -0
  62. package/examples/boolean-controls/README.md +109 -0
  63. package/examples/boolean-controls/config.json +3 -0
  64. package/examples/boolean-controls/data.json +27 -0
  65. package/examples/boolean-controls/schema.json +98 -0
  66. package/examples/boolean-controls/translations.json +94 -0
  67. package/examples/boolean-controls/uischema.json +126 -0
  68. package/examples/button-actions/README.md +259 -0
  69. package/examples/button-actions/config.json +7 -0
  70. package/examples/button-actions/data.json +5 -0
  71. package/examples/button-actions/host.mjs +14 -0
  72. package/examples/button-actions/schema.json +20 -0
  73. package/examples/button-actions/translations.json +60 -0
  74. package/examples/button-actions/uischema.json +179 -0
  75. package/examples/catalog.json +634 -0
  76. package/examples/categorization/README.md +132 -0
  77. package/examples/categorization/config.json +7 -0
  78. package/examples/categorization/data.json +8 -0
  79. package/examples/categorization/schema.json +29 -0
  80. package/examples/categorization/translations.json +72 -0
  81. package/examples/categorization/uischema.json +288 -0
  82. package/examples/choice-controls/README.md +136 -0
  83. package/examples/choice-controls/config.json +10 -0
  84. package/examples/choice-controls/data.json +61 -0
  85. package/examples/choice-controls/schema.json +406 -0
  86. package/examples/choice-controls/translations.json +154 -0
  87. package/examples/choice-controls/uischema.json +575 -0
  88. package/examples/choice-controls/uischemas.d.mts +2 -0
  89. package/examples/choice-controls/uischemas.json +16 -0
  90. package/examples/code-editor/README.md +74 -0
  91. package/examples/code-editor/data.json +8 -0
  92. package/examples/code-editor/schema.json +28 -0
  93. package/examples/code-editor/translations.json +20 -0
  94. package/examples/code-editor/uischema.json +77 -0
  95. package/examples/collection-pagination/README.md +5 -0
  96. package/examples/collection-pagination/config.json +1 -0
  97. package/examples/collection-pagination/data.json +64 -0
  98. package/examples/collection-pagination/schema.json +23 -0
  99. package/examples/collection-pagination/translations.json +14 -0
  100. package/examples/collection-pagination/uischema.json +14 -0
  101. package/examples/color-control/README.md +151 -0
  102. package/examples/color-control/config.json +7 -0
  103. package/examples/color-control/data.json +11 -0
  104. package/examples/color-control/schema.json +61 -0
  105. package/examples/color-control/translations.json +76 -0
  106. package/examples/color-control/uischema.json +106 -0
  107. package/examples/combinators/README.md +223 -0
  108. package/examples/combinators/config.json +9 -0
  109. package/examples/combinators/data.json +23 -0
  110. package/examples/combinators/schema.json +232 -0
  111. package/examples/combinators/translations.json +178 -0
  112. package/examples/combinators/uischema.json +158 -0
  113. package/examples/conditional-fields/README.md +19 -0
  114. package/examples/conditional-fields/config.json +5 -0
  115. package/examples/conditional-fields/data.json +7 -0
  116. package/examples/conditional-fields/schema.json +59 -0
  117. package/examples/conditional-fields/translations.json +30 -0
  118. package/examples/conditional-fields/uischema.json +71 -0
  119. package/examples/container-validation-indicator/README.md +187 -0
  120. package/examples/container-validation-indicator/config.json +9 -0
  121. package/examples/container-validation-indicator/data.json +68 -0
  122. package/examples/container-validation-indicator/schema.json +222 -0
  123. package/examples/container-validation-indicator/translations.json +120 -0
  124. package/examples/container-validation-indicator/uischema.json +98 -0
  125. package/examples/cron-control/README.md +155 -0
  126. package/examples/cron-control/data.json +15 -0
  127. package/examples/cron-control/schema.json +72 -0
  128. package/examples/cron-control/translations.json +80 -0
  129. package/examples/cron-control/uischema.json +91 -0
  130. package/examples/destructive-confirmation/README.md +210 -0
  131. package/examples/destructive-confirmation/config.json +17 -0
  132. package/examples/destructive-confirmation/data.json +86 -0
  133. package/examples/destructive-confirmation/schema.json +204 -0
  134. package/examples/destructive-confirmation/translations.json +112 -0
  135. package/examples/destructive-confirmation/uischema.json +105 -0
  136. package/examples/draft-07-metaschema/README.md +11 -0
  137. package/examples/draft-07-metaschema/config.json +3 -0
  138. package/examples/draft-07-metaschema/data.json +25 -0
  139. package/examples/draft-07-metaschema/schema.json +172 -0
  140. package/examples/draft-07-metaschema/translations.json +10 -0
  141. package/examples/draft-07-metaschema/uischema.json +14 -0
  142. package/examples/dynamic-playground/README.md +95 -0
  143. package/examples/dynamic-playground/config.json +8 -0
  144. package/examples/dynamic-playground/configuration.json +152 -0
  145. package/examples/dynamic-playground/data.json +15 -0
  146. package/examples/dynamic-playground/dynamic-uischema.json +379 -0
  147. package/examples/dynamic-playground/host.mjs +37 -0
  148. package/examples/dynamic-playground/schema.json +48 -0
  149. package/examples/dynamic-playground/translations.json +76 -0
  150. package/examples/dynamic-playground/uischema.json +36 -0
  151. package/examples/editor-details/README.md +10 -0
  152. package/examples/editor-details/data.json +18 -0
  153. package/examples/editor-details/schema.json +49 -0
  154. package/examples/editor-details/translations.json +28 -0
  155. package/examples/editor-details/uischema.json +53 -0
  156. package/examples/editor-details/uischemas.d.mts +2 -0
  157. package/examples/editor-details/uischemas.json +14 -0
  158. package/examples/file-control/README.md +108 -0
  159. package/examples/file-control/data.json +28 -0
  160. package/examples/file-control/schema.json +89 -0
  161. package/examples/file-control/translations.json +46 -0
  162. package/examples/file-control/uischema.json +152 -0
  163. package/examples/group-layout/README.md +149 -0
  164. package/examples/group-layout/config.json +10 -0
  165. package/examples/group-layout/data.json +9 -0
  166. package/examples/group-layout/schema.json +51 -0
  167. package/examples/group-layout/translations.json +62 -0
  168. package/examples/group-layout/uischema.json +249 -0
  169. package/examples/index.d.ts +17 -0
  170. package/examples/index.js +69 -0
  171. package/examples/input-adornments/README.md +68 -0
  172. package/examples/input-adornments/data.json +41 -0
  173. package/examples/input-adornments/schema.json +207 -0
  174. package/examples/input-adornments/translations.json +106 -0
  175. package/examples/input-adornments/uischema.json +695 -0
  176. package/examples/job-application/README.md +23 -0
  177. package/examples/job-application/config.json +10 -0
  178. package/examples/job-application/data.json +68 -0
  179. package/examples/job-application/schema.json +196 -0
  180. package/examples/job-application/translations.json +388 -0
  181. package/examples/job-application/uischema.json +218 -0
  182. package/examples/job-application/uischemas.json +153 -0
  183. package/examples/json-editor/README.md +28 -0
  184. package/examples/json-editor/schema.json +1 -0
  185. package/examples/json-editor/translations.json +10 -0
  186. package/examples/json-editor/uischema.json +16 -0
  187. package/examples/json-inference/README.md +33 -0
  188. package/examples/json-inference/translations.json +10 -0
  189. package/examples/json-inference/uischema.json +16 -0
  190. package/examples/kitchen-sink/README.md +86 -0
  191. package/examples/kitchen-sink/config.json +14 -0
  192. package/examples/kitchen-sink/data.json +263 -0
  193. package/examples/kitchen-sink/invalid-data.json +263 -0
  194. package/examples/kitchen-sink/schema.json +515 -0
  195. package/examples/kitchen-sink/translations.json +270 -0
  196. package/examples/kitchen-sink/uischema.json +722 -0
  197. package/examples/label-interpolation/README.md +200 -0
  198. package/examples/label-interpolation/config.json +8 -0
  199. package/examples/label-interpolation/data.json +13 -0
  200. package/examples/label-interpolation/schema.json +64 -0
  201. package/examples/label-interpolation/translations.json +94 -0
  202. package/examples/label-interpolation/uischema.json +375 -0
  203. package/examples/layout-sizing/README.md +162 -0
  204. package/examples/layout-sizing/config.json +10 -0
  205. package/examples/layout-sizing/data.json +14 -0
  206. package/examples/layout-sizing/schema.json +58 -0
  207. package/examples/layout-sizing/translations.json +42 -0
  208. package/examples/layout-sizing/uischema.json +558 -0
  209. package/examples/markup-label/README.md +109 -0
  210. package/examples/markup-label/config.json +16 -0
  211. package/examples/markup-label/data.json +5 -0
  212. package/examples/markup-label/schema.json +24 -0
  213. package/examples/markup-label/translations.json +40 -0
  214. package/examples/markup-label/uischema.json +149 -0
  215. package/examples/mixed-control/README.md +164 -0
  216. package/examples/mixed-control/config.json +11 -0
  217. package/examples/mixed-control/data.json +70 -0
  218. package/examples/mixed-control/schema.json +221 -0
  219. package/examples/mixed-control/translations.json +158 -0
  220. package/examples/mixed-control/uischema.json +211 -0
  221. package/examples/null-control/README.md +111 -0
  222. package/examples/null-control/config.json +4 -0
  223. package/examples/null-control/data.json +6 -0
  224. package/examples/null-control/schema.json +36 -0
  225. package/examples/null-control/translations.json +42 -0
  226. package/examples/null-control/uischema.json +56 -0
  227. package/examples/numeric-controls/README.md +94 -0
  228. package/examples/numeric-controls/config.json +4 -0
  229. package/examples/numeric-controls/data.json +8 -0
  230. package/examples/numeric-controls/schema.json +52 -0
  231. package/examples/numeric-controls/translations.json +56 -0
  232. package/examples/numeric-controls/uischema.json +77 -0
  233. package/examples/object-control/README.md +220 -0
  234. package/examples/object-control/config.json +4 -0
  235. package/examples/object-control/data.json +62 -0
  236. package/examples/object-control/schema.json +252 -0
  237. package/examples/object-control/translations.json +160 -0
  238. package/examples/object-control/uischema.json +275 -0
  239. package/examples/object-control/uischemas.d.mts +2 -0
  240. package/examples/object-control/uischemas.json +59 -0
  241. package/examples/password-control/README.md +119 -0
  242. package/examples/password-control/config.json +3 -0
  243. package/examples/password-control/data.json +18 -0
  244. package/examples/password-control/schema.json +65 -0
  245. package/examples/password-control/translations.json +64 -0
  246. package/examples/password-control/uischema.json +94 -0
  247. package/examples/pre-touch-errors/README.md +176 -0
  248. package/examples/pre-touch-errors/config.json +4 -0
  249. package/examples/pre-touch-errors/data.json +5 -0
  250. package/examples/pre-touch-errors/schema.json +56 -0
  251. package/examples/pre-touch-errors/translations.json +68 -0
  252. package/examples/pre-touch-errors/uischema.json +85 -0
  253. package/examples/presentation/README.md +148 -0
  254. package/examples/presentation/config.json +9 -0
  255. package/examples/presentation/data.json +6 -0
  256. package/examples/presentation/schema.json +21 -0
  257. package/examples/presentation/translations.json +64 -0
  258. package/examples/presentation/uischema.json +210 -0
  259. package/examples/property-pagination/README.md +5 -0
  260. package/examples/property-pagination/config.json +1 -0
  261. package/examples/property-pagination/data.json +17 -0
  262. package/examples/property-pagination/schema.json +14 -0
  263. package/examples/property-pagination/translations.json +10 -0
  264. package/examples/property-pagination/uischema.json +24 -0
  265. package/examples/recursive-tree/README.md +49 -0
  266. package/examples/recursive-tree/config.json +1 -0
  267. package/examples/recursive-tree/data.json +40 -0
  268. package/examples/recursive-tree/schema.json +89 -0
  269. package/examples/recursive-tree/translations.json +42 -0
  270. package/examples/recursive-tree/uischema.json +84 -0
  271. package/examples/recursive-tree/uischemas.d.mts +2 -0
  272. package/examples/recursive-tree/uischemas.json +51 -0
  273. package/examples/split-layout/README.md +123 -0
  274. package/examples/split-layout/config.json +3 -0
  275. package/examples/split-layout/data.json +13 -0
  276. package/examples/split-layout/schema.json +50 -0
  277. package/examples/split-layout/translations.json +50 -0
  278. package/examples/split-layout/uischema.json +204 -0
  279. package/examples/string-controls/README.md +159 -0
  280. package/examples/string-controls/config.json +5 -0
  281. package/examples/string-controls/data.json +13 -0
  282. package/examples/string-controls/schema.json +70 -0
  283. package/examples/string-controls/translations.json +76 -0
  284. package/examples/string-controls/uischema.json +148 -0
  285. package/examples/table-row-details/README.md +69 -0
  286. package/examples/table-row-details/config.json +7 -0
  287. package/examples/table-row-details/data.json +280 -0
  288. package/examples/table-row-details/schema.json +61 -0
  289. package/examples/table-row-details/translations.json +56 -0
  290. package/examples/table-row-details/uischema.json +1303 -0
  291. package/examples/template-layout/README.md +250 -0
  292. package/examples/template-layout/config.json +9 -0
  293. package/examples/template-layout/data.json +20 -0
  294. package/examples/template-layout/host.mjs +13 -0
  295. package/examples/template-layout/schema.json +48 -0
  296. package/examples/template-layout/translations.json +70 -0
  297. package/examples/template-layout/uischema.json +177 -0
  298. package/examples/template-slots/README.md +19 -0
  299. package/examples/template-slots/data.json +4 -0
  300. package/examples/template-slots/schema.json +11 -0
  301. package/examples/template-slots/translations.json +26 -0
  302. package/examples/template-slots/uischema.json +47 -0
  303. package/examples/template-slots/uischemas.d.mts +2 -0
  304. package/examples/template-slots/uischemas.json +56 -0
  305. package/examples/temporal-controls/README.md +325 -0
  306. package/examples/temporal-controls/data.json +44 -0
  307. package/examples/temporal-controls/schema.json +208 -0
  308. package/examples/temporal-controls/translations.json +156 -0
  309. package/examples/temporal-controls/uischema.json +297 -0
  310. package/examples/tree-max-depth/README.md +5 -0
  311. package/examples/tree-max-depth/config.json +3 -0
  312. package/examples/tree-max-depth/data.json +31 -0
  313. package/examples/tree-max-depth/schema.json +258 -0
  314. package/examples/tree-max-depth/translations.json +42 -0
  315. package/examples/tree-max-depth/uischema.json +16 -0
  316. package/examples/tree-max-depth/uischemas.d.mts +2 -0
  317. package/examples/tree-max-depth/uischemas.json +50 -0
  318. package/examples/tuple-control/README.md +335 -0
  319. package/examples/tuple-control/config.json +4 -0
  320. package/examples/tuple-control/data.json +61 -0
  321. package/examples/tuple-control/schema.json +218 -0
  322. package/examples/tuple-control/translations.json +142 -0
  323. package/examples/tuple-control/uischema.json +128 -0
  324. package/examples/tuple-control/uischemas.d.mts +2 -0
  325. package/examples/tuple-control/uischemas.json +125 -0
  326. package/examples/validator-profile/README.md +197 -0
  327. package/examples/validator-profile/config.json +9 -0
  328. package/examples/validator-profile/data.json +16 -0
  329. package/examples/validator-profile/schema.json +139 -0
  330. package/examples/validator-profile/translations.json +34 -0
  331. package/examples/validator-profile/uischema.json +59 -0
  332. package/package.json +83 -3
  333. package/provenance.json +140 -0
  334. package/schemas/README.md +77 -0
  335. package/schemas/example.schema.json +37 -0
  336. package/schemas/jsonforms-config.schema.json +427 -0
  337. package/schemas/jsonforms-dynamic-uischema.schema.json +220 -0
  338. package/schemas/jsonforms-extended-config.schema.json +327 -0
  339. package/schemas/jsonforms-extended-uischema.schema.json +1923 -0
  340. package/schemas/jsonforms-rule.schema.json +104 -0
  341. package/schemas/jsonforms-uischema.schema.json +1421 -0
  342. package/typescript/README.md +540 -0
  343. package/typescript/lib/authoring/cssLength.d.ts +33 -0
  344. package/typescript/lib/authoring/cssLength.js +25 -0
  345. package/typescript/lib/authoring/dynamic.d.ts +73 -0
  346. package/typescript/lib/authoring/dynamic.js +8 -0
  347. package/typescript/lib/authoring/forSchema.d.ts +376 -0
  348. package/typescript/lib/authoring/forSchema.js +84 -0
  349. package/typescript/lib/authoring/schemaTypes.d.ts +111 -0
  350. package/typescript/lib/authoring/schemaTypes.js +15 -0
  351. package/typescript/lib/index.d.ts +4 -0
  352. package/typescript/lib/index.js +20 -0
  353. package/typescript/package.json +1 -0
  354. package/typescript/src/authoring/cssLength.ts +79 -0
  355. package/typescript/src/authoring/dynamic.ts +96 -0
  356. package/typescript/src/authoring/forSchema.ts +419 -0
  357. package/typescript/src/authoring/schemaTypes.ts +143 -0
  358. package/typescript/src/index.ts +4 -0
  359. package/typescript/test/schemaContract.test.ts +626 -0
  360. package/typescript/test/tsconfig.json +10 -0
  361. package/typescript/test/typedAuthoring.test.ts +140 -0
  362. package/typescript/test/typedAuthoringCoverage.test.ts +145 -0
  363. package/typescript/test/typedAuthoringCssLength.test.ts +81 -0
  364. package/typescript/test/typedAuthoringNames.test.ts +90 -0
  365. package/typescript/test/typedDynamic.test.ts +88 -0
  366. package/typescript/tsconfig.json +15 -0
@@ -0,0 +1,38 @@
1
+ {
2
+ "default": [
3
+ {
4
+ "name": "Ada",
5
+ "note": "Visible in generated layouts"
6
+ }
7
+ ],
8
+ "generate": [
9
+ {
10
+ "name": "Ada",
11
+ "note": "Visible in generated layouts"
12
+ }
13
+ ],
14
+ "registered": [
15
+ {
16
+ "name": "Ada",
17
+ "note": "Visible in generated layouts"
18
+ }
19
+ ],
20
+ "fallback": [
21
+ {
22
+ "name": "Ada",
23
+ "note": "Visible in generated layouts"
24
+ }
25
+ ],
26
+ "inline": [
27
+ {
28
+ "name": "Ada",
29
+ "note": "Visible in generated layouts"
30
+ }
31
+ ],
32
+ "generatedSpelling": [
33
+ {
34
+ "name": "Ada",
35
+ "note": "Visible in generated layouts"
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "default": {
5
+ "type": "array",
6
+ "items": {
7
+ "type": "object",
8
+ "properties": {
9
+ "name": {
10
+ "type": "string"
11
+ },
12
+ "note": {
13
+ "type": "string"
14
+ }
15
+ }
16
+ }
17
+ },
18
+ "generate": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "properties": {
23
+ "name": {
24
+ "type": "string"
25
+ },
26
+ "note": {
27
+ "type": "string"
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "registered": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "properties": {
37
+ "name": {
38
+ "type": "string"
39
+ },
40
+ "note": {
41
+ "type": "string"
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "fallback": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "properties": {
51
+ "name": {
52
+ "type": "string"
53
+ },
54
+ "note": {
55
+ "type": "string"
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "inline": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "object",
64
+ "properties": {
65
+ "name": {
66
+ "type": "string"
67
+ },
68
+ "note": {
69
+ "type": "string"
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "generatedSpelling": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "object",
78
+ "properties": {
79
+ "name": {
80
+ "type": "string"
81
+ },
82
+ "note": {
83
+ "type": "string"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "en": {
3
+ "detailExample.name.label": "Name",
4
+ "detailExample.note.label": "Note",
5
+ "detailExample.value.label": "Value",
6
+ "detailExample.rows.label": "Rows",
7
+ "detailExample.object.label": "Object",
8
+ "detailExample.mixed.label": "Mixed",
9
+ "detailExample.registeredName.label": "Registered name",
10
+ "arrayDetail.0.label": "default",
11
+ "arrayDetail.1.label": "generate",
12
+ "arrayDetail.2.label": "registered",
13
+ "arrayDetail.3.label": "fallback",
14
+ "arrayDetail.4.label": "inline",
15
+ "arrayDetail.5.label": "generatedSpelling",
16
+ "arrayDetail.inlineNote.label": "Inline note",
17
+ "arrayDetail.inlineName.label": "Inline name"
18
+ },
19
+ "bg": {
20
+ "detailExample.name.label": "Име",
21
+ "detailExample.note.label": "Бележка",
22
+ "detailExample.value.label": "Стойност",
23
+ "detailExample.rows.label": "Редове",
24
+ "detailExample.object.label": "Обект",
25
+ "detailExample.mixed.label": "Смесена стойност",
26
+ "detailExample.registeredName.label": "Регистрирано име",
27
+ "arrayDetail.0.label": "По подразбиране",
28
+ "arrayDetail.1.label": "Генериран изглед",
29
+ "arrayDetail.2.label": "Регистриран изглед",
30
+ "arrayDetail.3.label": "Резервен изглед",
31
+ "arrayDetail.4.label": "Вграден изглед",
32
+ "arrayDetail.5.label": "Изписване GENERATED",
33
+ "arrayDetail.inlineNote.label": "Вградена бележка",
34
+ "arrayDetail.inlineName.label": "Вградено име"
35
+ }
36
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "type": "VerticalLayout",
3
+ "elements": [
4
+ {
5
+ "type": "Control",
6
+ "scope": "#/properties/default",
7
+ "label": "default",
8
+ "options": {
9
+ "detail": "DEFAULT",
10
+ "collapsed": false
11
+ }
12
+ },
13
+ {
14
+ "type": "Control",
15
+ "scope": "#/properties/generate",
16
+ "label": "generate",
17
+ "options": {
18
+ "detail": "generate",
19
+ "collapsed": false
20
+ }
21
+ },
22
+ {
23
+ "type": "Control",
24
+ "scope": "#/properties/registered",
25
+ "label": "registered",
26
+ "options": {
27
+ "detail": "REGISTERED",
28
+ "collapsed": false
29
+ }
30
+ },
31
+ {
32
+ "type": "Control",
33
+ "scope": "#/properties/fallback",
34
+ "label": "fallback",
35
+ "options": {
36
+ "detail": "REGISTERED",
37
+ "collapsed": false
38
+ }
39
+ },
40
+ {
41
+ "type": "Control",
42
+ "scope": "#/properties/inline",
43
+ "label": "inline",
44
+ "options": {
45
+ "detail": {
46
+ "type": "HorizontalLayout",
47
+ "elements": [
48
+ {
49
+ "type": "Control",
50
+ "scope": "#/properties/note",
51
+ "label": "Inline note"
52
+ },
53
+ {
54
+ "type": "Control",
55
+ "scope": "#/properties/name",
56
+ "label": "Inline name"
57
+ }
58
+ ]
59
+ },
60
+ "collapsed": false
61
+ }
62
+ },
63
+ {
64
+ "type": "Control",
65
+ "scope": "#/properties/generatedSpelling",
66
+ "label": "generatedSpelling",
67
+ "options": {
68
+ "detail": "GENERATED",
69
+ "collapsed": false
70
+ }
71
+ }
72
+ ]
73
+ }
@@ -0,0 +1,2 @@
1
+ import type { JsonFormsUISchemaRegistryEntry } from '@jsonforms/core';
2
+ export declare const uischemas: JsonFormsUISchemaRegistryEntry[];
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "match": {
4
+ "rank": 10,
5
+ "schemaPointer": "/properties/name",
6
+ "exists": true,
7
+ "notSchemaPath": "#/properties/fallback"
8
+ },
9
+ "uischema": {
10
+ "type": "Control",
11
+ "scope": "#/properties/name",
12
+ "label": "Registered name"
13
+ }
14
+ }
15
+ ]
@@ -0,0 +1,109 @@
1
+ # Example: boolean controls
2
+
3
+ **Example ID:** `boolean-controls`\
4
+ **Demo entry:** **Spec: Boolean controls** (`#spec-boolean-controls`)\
5
+ **Domain:** employee onboarding consent\
6
+ **Specs covered:**
7
+
8
+ - [Boolean checkbox and switch controls](../../docs/spec.md#1819-scalar-controls-and-temporal-editing)
9
+ - [Shared table-cell behavior](../../docs/spec.md#1819-scalar-controls-and-temporal-editing)
10
+ - [Honest rendering of invalid data](../../docs/spec.md#1819-scalar-controls-and-temporal-editing)
11
+
12
+ One example, because every boolean renderer answers the same three questions:
13
+ what is true, what is false, and what is neither.
14
+
15
+ ## Every renderer that handles a boolean
16
+
17
+ | Renderer | Where | Shown as |
18
+ | --- | --- | --- |
19
+ | `BooleanControl` | `notifications`, `newsletter`, `handbookAccepted`, `payrollOptOut` | Checkbox |
20
+ | `BooleanToggleControl` | `remoteWorker`, `importedCount` | Switch (`options.toggle`) |
21
+ | `BooleanCell` | `team[].active` | Checkbox in a table cell |
22
+ | `BooleanToggleCell` | `team[].onCall` | Switch in a table cell |
23
+ | `EnumArrayRenderer` | `channels` | Checkbox group — membership of an array, not a boolean value |
24
+
25
+ ## Validation state
26
+
27
+ Validated with Ajv (`allErrors`, `strict: false`), the supplied data produces
28
+ exactly four errors:
29
+
30
+ | Instance path | Keyword | Message |
31
+ | --- | --- | --- |
32
+ | `/handbookAccepted` | `const` | must be equal to constant |
33
+ | `/legacyFlag` | `type` | must be boolean |
34
+ | `/importedCount` | `type` | must be boolean |
35
+ | `/team/1/active` | `type` | must be boolean |
36
+
37
+ ## The three states
38
+
39
+ **True and false are both answers.** `notifications` is `false` and is
40
+ *required*: presence is satisfied, so there is no required error. Required means
41
+ the property must exist, not that it must be true.
42
+
43
+ **Absent is not false.** `newsletter` is missing, so its checkbox renders
44
+ **indeterminate** rather than unchecked. Rendering it must not write `false`
45
+ into the data — open the Data tab and confirm the property is still absent.
46
+
47
+ **A switch has no third state.** `remoteWorker` uses `options.toggle`. Where a
48
+ switch has no committed boolean it carries an accessible *"Not set"*, since it
49
+ cannot show indeterminate. Inspect it with a screen reader or check
50
+ `aria-describedby`.
51
+
52
+ ## Values that are not booleans
53
+
54
+ This is the part the implementation used to get wrong.
55
+
56
+ | Property | Holds | Must render as |
57
+ | --- | --- | --- |
58
+ | `legacyFlag` | the string `"false"` | **not checked** — indeterminate, with a type error |
59
+ | `importedCount` | the number `0` | switch off, announced as not a true/false value |
60
+ | `team[1].active` | the string `"false"` | same rules inside a table cell |
61
+
62
+ `!!data` made the string `"false"` render as **checked**, which the
63
+ specification names as forbidden: *"the string 'false' must not be shown as
64
+ checked"*. Truthiness also made `0`, `''` and `{}` look like deliberate
65
+ answers. The data is preserved for correction and reported by validation; it is
66
+ never presented as a valid true or false selection.
67
+
68
+ ## Agreement is a schema rule, not a widget
69
+
70
+ `handbookAccepted` is `{"type": "boolean", "const": true}` and holds `false`,
71
+ so it shows a `const` error. Neither a checkbox nor a switch implies a
72
+ true-only constraint on its own — the renderer contract is explicit that a required boolean with
73
+ value `false` satisfies presence.
74
+
75
+ ## Nullable
76
+
77
+ `payrollOptOut` is `["boolean", "null"]` and holds `null`. Null is a permitted
78
+ stored value here and is valid; it is **not** the same as absent, and the
79
+ control must not coerce it to `false`.
80
+
81
+ ## Checkbox group is not a boolean control
82
+
83
+ `channels` renders checkboxes, but each one reflects whether its value is **in
84
+ the array**. Ticking one adds a string; it never stores a boolean. It is
85
+ included here because it is the renderer most often mistaken for one.
86
+
87
+ ## Fallback behaviour
88
+
89
+ | Situation | Result |
90
+ | --- | --- |
91
+ | No `toggle` option | Checkbox, the default presentation. No variant is involved. |
92
+ | Value is not a boolean | Indeterminate checkbox / off switch, plus the validation error. Nothing is rewritten. |
93
+ | Locale switched to Bulgarian | "Not set" and the type messages translate; the stored values do not change. |
94
+
95
+ ## Conformance scope
96
+
97
+ This walkthrough describes the portable contract. Renderer support must be checked
98
+ by a host adapter; the package validates the authored assets, not live UI behavior.
99
+
100
+ ## Standalone host setup
101
+
102
+ Load the JSON assets listed in [the catalog](../catalog.json) into a host
103
+ with the relevant renderer capabilities. No framework registration module is
104
+ required by this package.
105
+
106
+
107
+ ## Feature navigation
108
+
109
+ Explore one feature at a time using the tabs: **Checkboxes**, **Switch**, **Invalid values**, **Checkbox groups**, **Table cells**. Tab titles are localized in English and Bulgarian. The tabs share the existing form data.
@@ -0,0 +1,3 @@
1
+ {
2
+ "showUnfocusedDescription": true
3
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "notifications": false,
3
+ "remoteWorker": true,
4
+ "handbookAccepted": false,
5
+ "payrollOptOut": null,
6
+ "legacyFlag": "false",
7
+ "importedCount": 0,
8
+ "channels": [
9
+ "SMS"
10
+ ],
11
+ "team": [
12
+ {
13
+ "name": "Jane Doe",
14
+ "active": true,
15
+ "onCall": false
16
+ },
17
+ {
18
+ "name": "Richard Roe",
19
+ "active": "false",
20
+ "onCall": true
21
+ }
22
+ ],
23
+ "escalation": [
24
+ "Email",
25
+ "Push"
26
+ ]
27
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "title": "Employee onboarding consent",
5
+ "required": [
6
+ "notifications"
7
+ ],
8
+ "properties": {
9
+ "notifications": {
10
+ "type": "boolean",
11
+ "title": "Send notifications",
12
+ "description": "Required: both true and false are valid answers, absence is not."
13
+ },
14
+ "newsletter": {
15
+ "type": "boolean",
16
+ "title": "Subscribe to the newsletter",
17
+ "description": "Optional, and unanswered on purpose."
18
+ },
19
+ "remoteWorker": {
20
+ "type": "boolean",
21
+ "title": "Works remotely",
22
+ "description": "Shown as a switch rather than a checkbox."
23
+ },
24
+ "handbookAccepted": {
25
+ "type": "boolean",
26
+ "const": true,
27
+ "title": "I accept the employee handbook",
28
+ "description": "Agreement: only true is valid. The widget does not imply this - const does."
29
+ },
30
+ "payrollOptOut": {
31
+ "type": [
32
+ "boolean",
33
+ "null"
34
+ ],
35
+ "title": "Opt out of payroll emails",
36
+ "description": "Nullable, so null is a permitted stored value."
37
+ },
38
+ "legacyFlag": {
39
+ "type": "boolean",
40
+ "title": "Legacy flag",
41
+ "description": "Holds the string \"false\", which is not a boolean at all."
42
+ },
43
+ "importedCount": {
44
+ "type": "boolean",
45
+ "title": "Imported flag",
46
+ "description": "Holds the number 0, which must not read as a deliberate no."
47
+ },
48
+ "channels": {
49
+ "type": "array",
50
+ "title": "Notification channels",
51
+ "uniqueItems": true,
52
+ "items": {
53
+ "type": "string",
54
+ "enum": [
55
+ "Email",
56
+ "SMS",
57
+ "Push"
58
+ ]
59
+ },
60
+ "description": "Checkboxes driven by array membership, not by a boolean value."
61
+ },
62
+ "team": {
63
+ "type": "array",
64
+ "title": "Team",
65
+ "items": {
66
+ "type": "object",
67
+ "properties": {
68
+ "name": {
69
+ "type": "string",
70
+ "title": "Name"
71
+ },
72
+ "active": {
73
+ "type": "boolean",
74
+ "title": "Active"
75
+ },
76
+ "onCall": {
77
+ "type": "boolean",
78
+ "title": "On call"
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "escalation": {
84
+ "type": "array",
85
+ "title": "Escalation channels",
86
+ "uniqueItems": true,
87
+ "items": {
88
+ "type": "string",
89
+ "enum": [
90
+ "Email",
91
+ "SMS",
92
+ "Push"
93
+ ]
94
+ },
95
+ "description": "The same checkbox group stacked vertically."
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "en": {
3
+ "boolean.notSet": "Not set",
4
+ "boolean.invalid": "Not a true or false value",
5
+ "error.required": "Choose yes or no.",
6
+ "error.type": "This value is not a true or false value.",
7
+ "error.const": "You must accept to continue.",
8
+ "featureNavigation.section1.label": "Checkboxes",
9
+ "featureNavigation.section2.label": "Switch",
10
+ "featureNavigation.section3.label": "Invalid values",
11
+ "featureNavigation.section4.label": "Checkbox groups",
12
+ "featureNavigation.section5.label": "Table cells",
13
+ "booleanIntro0_0.text": "Checkbox: the default boolean presentation",
14
+ "booleanIntro1_0.text": "Switch: options.toggle, not a new variant",
15
+ "booleanIntro2_0.text": "Values that are not booleans at all",
16
+ "booleanIntro3_0.text": "Checkbox group: membership of an array, horizontal by default",
17
+ "booleanIntro3_2.text": "The same group with options.vertical: true",
18
+ "booleanIntro4_0.text": "Boolean cells: checkbox and switch in a table",
19
+ "notifications.label": "Send notifications",
20
+ "notifications.description": "Required: both true and false are valid answers, absence is not.",
21
+ "newsletter.label": "Subscribe to the newsletter",
22
+ "newsletter.description": "Optional, and unanswered on purpose.",
23
+ "remoteWorker.label": "Works remotely",
24
+ "remoteWorker.description": "Shown as a switch rather than a checkbox.",
25
+ "handbookAccepted.label": "I accept the employee handbook",
26
+ "handbookAccepted.description": "Agreement: only true is valid. The widget does not imply this - const does.",
27
+ "payrollOptOut.label": "Opt out of payroll emails",
28
+ "payrollOptOut.description": "Nullable, so null is a permitted stored value.",
29
+ "legacyFlag.label": "Legacy flag",
30
+ "legacyFlag.description": "Holds the string \"false\", which is not a boolean at all.",
31
+ "importedCount.label": "Imported flag",
32
+ "importedCount.description": "Holds the number 0, which must not read as a deliberate no.",
33
+ "channels.Email": "Email",
34
+ "channels.SMS": "SMS",
35
+ "channels.Push": "Push",
36
+ "escalation.Email": "Email",
37
+ "escalation.SMS": "SMS",
38
+ "escalation.Push": "Push",
39
+ "channels.label": "Notification channels",
40
+ "channels.description": "Checkboxes driven by array membership, not by a boolean value.",
41
+ "team.label": "Team",
42
+ "team.name.label": "Name",
43
+ "team.active.label": "Active",
44
+ "team.onCall.label": "On call",
45
+ "escalation.label": "Escalation channels",
46
+ "escalation.description": "The same checkbox group stacked vertically."
47
+ },
48
+ "bg": {
49
+ "boolean.notSet": "Не е зададено",
50
+ "boolean.invalid": "Стойността не е да или не",
51
+ "error.required": "Изберете да или не.",
52
+ "error.type": "Стойността не е да или не.",
53
+ "error.const": "Трябва да приемете, за да продължите.",
54
+ "featureNavigation.section1.label": "Отметки",
55
+ "featureNavigation.section2.label": "Превключвател",
56
+ "featureNavigation.section3.label": "Невалидни стойности",
57
+ "featureNavigation.section4.label": "Групи отметки",
58
+ "featureNavigation.section5.label": "Клетки в таблица",
59
+ "booleanIntro0_0.text": "Отметка: стандартно представяне на булева стойност",
60
+ "booleanIntro1_0.text": "Превключвател чрез options.toggle",
61
+ "booleanIntro2_0.text": "Стойности, които не са булеви",
62
+ "booleanIntro3_0.text": "Група отметки за елементите на масив, хоризонтална по подразбиране",
63
+ "booleanIntro3_2.text": "Същата група с options.vertical: true",
64
+ "booleanIntro4_0.text": "Булеви клетки: отметка и превключвател в таблица",
65
+ "notifications.label": "Изпращане на известия",
66
+ "notifications.description": "Задължително поле: да и не са валидни отговори; липсата на отговор не е.",
67
+ "newsletter.label": "Абонамент за бюлетина",
68
+ "newsletter.description": "Незадължително поле, умишлено оставено без отговор.",
69
+ "remoteWorker.label": "Работи дистанционно",
70
+ "remoteWorker.description": "Показва се като превключвател вместо отметка.",
71
+ "handbookAccepted.label": "Приемам правилника за служителите",
72
+ "handbookAccepted.description": "Само да е валиден отговор. Това се изисква от const в схемата.",
73
+ "payrollOptOut.label": "Отказ от имейли за заплати",
74
+ "payrollOptOut.description": "Схемата допуска и стойност null.",
75
+ "legacyFlag.label": "Стар флаг",
76
+ "legacyFlag.description": "Съдържа низа \"false\", който не е булева стойност.",
77
+ "importedCount.label": "Импортиран флаг",
78
+ "importedCount.description": "Съдържа числото 0, което не означава изричен отговор не.",
79
+ "channels.Email": "Имейл",
80
+ "channels.SMS": "SMS",
81
+ "channels.Push": "Push известие",
82
+ "escalation.Email": "Имейл",
83
+ "escalation.SMS": "SMS",
84
+ "escalation.Push": "Push известие",
85
+ "channels.label": "Канали за известия",
86
+ "channels.description": "Отметки за членство в масив, а не за булева стойност.",
87
+ "team.label": "Екип",
88
+ "team.name.label": "Име",
89
+ "team.active.label": "Активен",
90
+ "team.onCall.label": "На разположение",
91
+ "escalation.label": "Канали за ескалация",
92
+ "escalation.description": "Същата група отметки, подредена вертикално."
93
+ }
94
+ }