@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,53 @@
1
+ {
2
+ "type": "VerticalLayout",
3
+ "elements": [
4
+ {
5
+ "type": "Control",
6
+ "scope": "#/properties/object",
7
+ "label": "Generated object",
8
+ "options": {
9
+ "detail": "GENERATE"
10
+ }
11
+ },
12
+ {
13
+ "type": "Control",
14
+ "scope": "#/properties/mixed",
15
+ "label": "Mixed type layouts",
16
+ "options": {
17
+ "structuredLayout": "nested",
18
+ "collapsed": false,
19
+ "detail": "REGISTERED",
20
+ "object-detail": {
21
+ "type": "Control",
22
+ "scope": "#/properties/note",
23
+ "label": "Object-specific note"
24
+ },
25
+ "string-detail": {
26
+ "type": "VerticalLayout",
27
+ "elements": [
28
+ {
29
+ "type": "Label",
30
+ "text": "String-specific editor"
31
+ },
32
+ {
33
+ "type": "Control",
34
+ "scope": "#"
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "type": "Control",
42
+ "scope": "#/properties/rows",
43
+ "options": {
44
+ "table": true,
45
+ "cells": {
46
+ "value": {
47
+ "detail": "REGISTERED"
48
+ }
49
+ }
50
+ }
51
+ }
52
+ ]
53
+ }
@@ -0,0 +1,2 @@
1
+ import type { JsonFormsUISchemaRegistryEntry } from '@jsonforms/core';
2
+ export declare const uischemas: JsonFormsUISchemaRegistryEntry[];
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "match": {
4
+ "rank": 10,
5
+ "schemaPointer": "/properties/name",
6
+ "exists": true
7
+ },
8
+ "uischema": {
9
+ "type": "Control",
10
+ "scope": "#/properties/name",
11
+ "label": "Registered name"
12
+ }
13
+ }
14
+ ]
@@ -0,0 +1,108 @@
1
+ # File control
2
+
3
+ **Example ID:** `file-control` · **Domain:** Supplier attachments
4
+
5
+ Covers the [portable UI model, the renderer contract — File control](../../docs/spec.md#18184-file-control): renderer selection, storage encodings, media filters and byte-size bounds.
6
+
7
+ ## Files
8
+
9
+ | File | Purpose |
10
+ | ------------------- | --------------------------------------------------------------------------- |
11
+ | `schema.json` | Four selection/storage paths and a text attachment. |
12
+ | `uischema.json` | Inclusive and exclusive limits on original file bytes. |
13
+ | `data.json` | Small preloaded attachments; the image and bounded attachment start absent. |
14
+ | `translations.json` | Matching English and Bulgarian labels and instructions. |
15
+ | the host registration | Registers the runnable example. |
16
+
17
+ No global configuration or detail registry is needed.
18
+
19
+ ## What the form contains
20
+
21
+ ```text
22
+ Supplier logo image filter, data URL, at most 1 MiB
23
+ Signed contract data URL with encoded filename, at most 1 MiB
24
+ Encoded attachment base64 payload, at most 1 MiB
25
+ Receipt format: byte, base64 payload, at most 1 MiB
26
+ Small text attachment text filter, more than 0 and less than 1024 bytes
27
+ ```
28
+
29
+ The logo combines `contentEncoding: "base64"` with `format: "uri"` to
30
+ select the file editor and preserve the complete data URL. `format: "binary"`
31
+ is the project's filename-bearing data URL convention. Neither branch sends
32
+ files to a server.
33
+
34
+ ## Validation state
35
+
36
+ The supplied data has **no schema errors** under the demo validator. The
37
+ preloaded payloads encode “Signed.”, “Supplier” and “Paid”. This does not prove
38
+ that attachment sizes have been checked: size enforcement occurs when a local
39
+ file is selected, using its original byte size.
40
+
41
+ Bounds are numeric UI options here. This keeps the example compatible with
42
+ the demo validator's temporal format-bound keywords; those keywords do not
43
+ provide a general validator for the decoded size of an attachment.
44
+
45
+ ## Expected behavior
46
+
47
+ Select a small file in each field and inspect the demo's data pane. The first
48
+ two controls store data URLs, while the next two store only the base64 payload.
49
+ Select an image for the logo to see the schema-derived media filter.
50
+
51
+ For the bounded text attachment, try files of 0, 1, 1023 and 1024 bytes: only
52
+ the middle two satisfy both exclusive bounds. Main attachments accept exactly
53
+ 1048576 bytes and reject larger selections. A rejected replacement must leave
54
+ the previous committed attachment and its validity intact while showing a local
55
+ warning naming the refused file. A failed read likewise leaves the committed
56
+ value intact and shows a local error. With `restrict: false`, an accepted file
57
+ outside a size bound is stored but contributes an owned size error to form
58
+ validity. Try each case with an already valid attachment and check that local
59
+ operation feedback does not become an additional error.
60
+
61
+ ## Fallback behavior
62
+
63
+ Without a size option there is no example-defined size limit. Without a media
64
+ type there is no schema-derived chooser filter. Filters are chooser hints,
65
+ not verification of file contents. Without a file renderer, a string fallback
66
+ cannot demonstrate selection-time size checks or file conversion.
67
+
68
+ Schema validation modes control schema-error presentation; they do not supply
69
+ missing file validation or change the stored representation.
70
+
71
+ ## Conformance scope
72
+
73
+ This walkthrough describes the portable contract. Renderer support must be checked
74
+ by a host adapter; the package validates the authored assets, not live UI behavior.
75
+
76
+ ## Standalone host setup
77
+
78
+ Load the JSON assets listed in [the catalog](../catalog.json) into a host
79
+ with the relevant renderer capabilities. No framework registration module is
80
+ required by this package.
81
+
82
+ ## Files in table cells
83
+
84
+ The Table and AG Grid tabs edit the same supporting-document rows. Each row
85
+ contains a document name, a single-file picker, and a multiple-file picker in
86
+ the Related files column. Both table controls explicitly include that array
87
+ column using `options.cells.files: {}`. The first row starts with two files,
88
+ including a long filename to demonstrate truncation and its tooltip. Try replacing
89
+ and clearing a file, then adding and removing rows. Clearing a required file
90
+ should show validation feedback without a repeated field label or help paragraph
91
+ inside the cell. The fixture starts valid.
92
+
93
+ String-valued pickers select one file. Arrays whose homogeneous items are file
94
+ strings use the same renderer with multiple selection. Supporting files appends
95
+ a batch to an array with minItems: 1, maxItems: 3 and uniqueItems: true.
96
+ The restricted example prevents count violations; the validation-only example
97
+ allows them and exposes normal schema errors. Related files also demonstrates
98
+ an array-valued file cell in both table presentations. Remove files individually;
99
+ the selected batch is appended in chooser order.
100
+
101
+
102
+ ## Feature navigation
103
+
104
+ Explore one feature at a time using the tabs: **Multiple files**, **Single-file encodings**, **File-size limits**, **Table cells**. Tab titles are localized in English and Bulgarian. The tabs share the existing form data.
105
+
106
+ ### File-column search
107
+
108
+ In AG Grid, filter File and Related files by the decoded stored filename only. Multiple-file cells match any of their filenames. File content, base64 payloads and MIME metadata must not contribute to default column or quick-filter search. Encodings without a stored filename contribute empty search text. Verify that `receipt.txt` matches its row while a substring found only in its encoded payload does not.
@@ -0,0 +1,28 @@
1
+ {
2
+ "contract": "data:text/plain;filename=agreement.txt;base64,U2lnbmVkLg==",
3
+ "payload": "U3VwcGxpZXI=",
4
+ "receipt": "UGFpZA==",
5
+ "attachments": [
6
+ {
7
+ "name": "Supplier agreement",
8
+ "file": "data:text/plain;filename=agreement.txt;base64,U2lnbmVkLg==",
9
+ "files": [
10
+ "data:text/plain;filename=agreement.txt;base64,U2lnbmVkLg==",
11
+ "data:text/plain;filename=supplier-agreement-supporting-notes.txt;base64,Tm90ZXMu"
12
+ ]
13
+ },
14
+ {
15
+ "name": "Payment receipt",
16
+ "file": "data:text/plain;filename=receipt.txt;base64,UGFpZA==",
17
+ "files": [
18
+ "data:text/plain;filename=receipt.txt;base64,UGFpZA=="
19
+ ]
20
+ }
21
+ ],
22
+ "documents": [
23
+ "data:text/plain;filename=agreement.txt;base64,U2lnbmVkLg=="
24
+ ],
25
+ "unrestrictedDocuments": [
26
+ "data:text/plain;filename=agreement.txt;base64,U2lnbmVkLg=="
27
+ ]
28
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "type": "object",
3
+ "title": "Supplier attachments",
4
+ "properties": {
5
+ "logo": {
6
+ "type": "string",
7
+ "title": "Supplier logo",
8
+ "format": "uri",
9
+ "contentEncoding": "base64",
10
+ "contentMediaType": "image/*"
11
+ },
12
+ "contract": {
13
+ "type": "string",
14
+ "title": "Signed contract",
15
+ "format": "binary"
16
+ },
17
+ "payload": {
18
+ "type": "string",
19
+ "title": "Encoded attachment",
20
+ "contentEncoding": "base64"
21
+ },
22
+ "receipt": {
23
+ "type": "string",
24
+ "title": "Receipt",
25
+ "format": "byte"
26
+ },
27
+ "bounded": {
28
+ "type": "string",
29
+ "title": "Small text attachment",
30
+ "contentEncoding": "base64",
31
+ "contentMediaType": "text/plain"
32
+ },
33
+ "attachments": {
34
+ "type": "array",
35
+ "title": "Supporting documents",
36
+ "items": {
37
+ "type": "object",
38
+ "properties": {
39
+ "name": {
40
+ "type": "string",
41
+ "title": "Document name",
42
+ "minLength": 1
43
+ },
44
+ "file": {
45
+ "type": "string",
46
+ "title": "File",
47
+ "format": "binary",
48
+ "description": "Select one local document for this row."
49
+ },
50
+ "files": {
51
+ "type": "array",
52
+ "title": "Related files",
53
+ "maxItems": 3,
54
+ "items": {
55
+ "type": "string",
56
+ "format": "binary"
57
+ }
58
+ }
59
+ },
60
+ "required": [
61
+ "name",
62
+ "file"
63
+ ]
64
+ }
65
+ },
66
+ "documents": {
67
+ "type": "array",
68
+ "title": "Supporting files (restricted)",
69
+ "minItems": 1,
70
+ "maxItems": 3,
71
+ "uniqueItems": true,
72
+ "items": {
73
+ "type": "string",
74
+ "format": "binary"
75
+ }
76
+ },
77
+ "unrestrictedDocuments": {
78
+ "type": "array",
79
+ "title": "Supporting files (validation only)",
80
+ "minItems": 1,
81
+ "maxItems": 3,
82
+ "uniqueItems": true,
83
+ "items": {
84
+ "type": "string",
85
+ "format": "binary"
86
+ }
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "en": {
3
+ "intro.text": "Attach local files and inspect the stored value. Each main attachment is limited to 1 MiB; the small text attachment must contain 1–1023 bytes.",
4
+ "logo.label": "Supplier logo",
5
+ "contract.label": "Signed contract",
6
+ "payload.label": "Encoded attachment",
7
+ "receipt.label": "Receipt",
8
+ "bounded.label": "Small text attachment",
9
+ "tableIntro.text": "Compare single-file and multiple-file cells in Table and AG Grid. Both tabs edit the same documents. Related files shows filename pills; add files, remove one, or clear the selection.",
10
+ "tableTab.label": "Table",
11
+ "gridTab.label": "AG Grid",
12
+ "attachments.label": "Supporting documents",
13
+ "attachments.name.label": "Document name",
14
+ "attachments.file.label": "File",
15
+ "multipleIntro.text": "Select several files at once. Each array requires 1–3 files. The restricted picker prevents crossing the limits; the validation-only picker allows it and shows schema errors.",
16
+ "documents.label": "Supporting files (restricted)",
17
+ "unrestrictedDocuments.label": "Supporting files (validation only)",
18
+ "attachments.files.label": "Related files",
19
+ "featureNavigation.section1.label": "Multiple files",
20
+ "featureNavigation.section2.label": "Single-file encodings",
21
+ "featureNavigation.section3.label": "File-size limits",
22
+ "featureNavigation.section4.label": "Table cells"
23
+ },
24
+ "bg": {
25
+ "intro.text": "Прикачете локални файлове и разгледайте записаната стойност. Основните прикачени файлове са ограничени до 1 MiB; малкият текстов файл трябва да съдържа 1–1023 байта.",
26
+ "logo.label": "Лого на доставчика",
27
+ "contract.label": "Подписан договор",
28
+ "payload.label": "Кодиран прикачен файл",
29
+ "receipt.label": "Разписка",
30
+ "bounded.label": "Малък текстов файл",
31
+ "tableIntro.text": "Сравнете клетките за един и няколко файла в таблицата и AG Grid. Двата раздела редактират едни и същи документи. Свързаните файлове се показват като етикети с имената; добавете файлове, премахнете един или изчистете избора.",
32
+ "tableTab.label": "Таблица",
33
+ "gridTab.label": "AG Grid",
34
+ "attachments.label": "Придружаващи документи",
35
+ "attachments.name.label": "Име на документа",
36
+ "attachments.file.label": "Файл",
37
+ "multipleIntro.text": "Изберете няколко файла наведнъж. Всеки масив изисква 1–3 файла. Ограниченият избор предотвратява превишаване на границите; изборът само с валидация го допуска и показва грешки.",
38
+ "documents.label": "Придружаващи файлове (с ограничения)",
39
+ "unrestrictedDocuments.label": "Придружаващи файлове (само валидация)",
40
+ "attachments.files.label": "Свързани файлове",
41
+ "featureNavigation.section1.label": "Няколко файла",
42
+ "featureNavigation.section2.label": "Кодиране на единичен файл",
43
+ "featureNavigation.section3.label": "Ограничения за размер",
44
+ "featureNavigation.section4.label": "Клетки в таблица"
45
+ }
46
+ }
@@ -0,0 +1,152 @@
1
+ {
2
+ "type": "VerticalLayout",
3
+ "elements": [
4
+ {
5
+ "type": "Label",
6
+ "i18n": "intro"
7
+ },
8
+ {
9
+ "type": "Categorization",
10
+ "elements": [
11
+ {
12
+ "type": "Category",
13
+ "label": "Multiple files",
14
+ "i18n": "featureNavigation.section1",
15
+ "elements": [
16
+ {
17
+ "type": "Label",
18
+ "i18n": "multipleIntro"
19
+ },
20
+ {
21
+ "type": "Control",
22
+ "scope": "#/properties/documents",
23
+ "i18n": "documents",
24
+ "options": {
25
+ "restrict": true,
26
+ "formatMaximum": 1048576
27
+ }
28
+ },
29
+ {
30
+ "type": "Control",
31
+ "scope": "#/properties/unrestrictedDocuments",
32
+ "i18n": "unrestrictedDocuments",
33
+ "options": {
34
+ "restrict": false,
35
+ "formatMaximum": 1048576
36
+ }
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "type": "Category",
42
+ "label": "Single-file encodings",
43
+ "i18n": "featureNavigation.section2",
44
+ "elements": [
45
+ {
46
+ "type": "Control",
47
+ "scope": "#/properties/logo",
48
+ "options": {
49
+ "formatMaximum": 1048576
50
+ }
51
+ },
52
+ {
53
+ "type": "Control",
54
+ "scope": "#/properties/contract",
55
+ "options": {
56
+ "formatMaximum": 1048576
57
+ }
58
+ },
59
+ {
60
+ "type": "Control",
61
+ "scope": "#/properties/payload",
62
+ "options": {
63
+ "formatMaximum": 1048576
64
+ }
65
+ },
66
+ {
67
+ "type": "Control",
68
+ "scope": "#/properties/receipt",
69
+ "options": {
70
+ "formatMaximum": 1048576
71
+ }
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ "type": "Category",
77
+ "label": "File-size limits",
78
+ "i18n": "featureNavigation.section3",
79
+ "elements": [
80
+ {
81
+ "type": "Control",
82
+ "scope": "#/properties/bounded",
83
+ "options": {
84
+ "formatExclusiveMinimum": 0,
85
+ "formatExclusiveMaximum": 1024
86
+ }
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ "type": "Category",
92
+ "label": "Table cells",
93
+ "i18n": "featureNavigation.section4",
94
+ "elements": [
95
+ {
96
+ "type": "Label",
97
+ "i18n": "tableIntro"
98
+ },
99
+ {
100
+ "type": "Categorization",
101
+ "elements": [
102
+ {
103
+ "type": "Category",
104
+ "label": "Table",
105
+ "i18n": "tableTab",
106
+ "elements": [
107
+ {
108
+ "type": "Control",
109
+ "scope": "#/properties/attachments",
110
+ "i18n": "attachments",
111
+ "options": {
112
+ "table": true,
113
+ "pagination": {
114
+ "pageSize": 3
115
+ },
116
+ "cells": {
117
+ "files": {}
118
+ }
119
+ }
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ "type": "Category",
125
+ "label": "AG Grid",
126
+ "i18n": "gridTab",
127
+ "elements": [
128
+ {
129
+ "type": "Control",
130
+ "scope": "#/properties/attachments",
131
+ "i18n": "attachments",
132
+ "options": {
133
+ "table": true,
134
+ "pagination": {
135
+ "pageSize": 3
136
+ },
137
+ "variant": "ag-grid",
138
+ "cells": {
139
+ "files": {}
140
+ }
141
+ }
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ }
147
+ ]
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ }
@@ -0,0 +1,149 @@
1
+ # Example: group layout
2
+
3
+ **Example ID:** `group-layout`\
4
+ **Demo entry:** **Spec: Group layout** (`#spec-group-layout`)\
5
+ **Domain:** supplier record\
6
+ **Specs covered:**
7
+
8
+ - [Group](../../docs/spec.md#81-group)
9
+ - [Layout types and semantics](../../docs/spec.md#81-group)
10
+
11
+ A Group is the plainest container there is — "an ordinary Group presents
12
+ related controls as a labelled section". The tabs show its disclosure and
13
+ indicator options, then a Group with cover, header and action regions.
14
+
15
+ ## Files
16
+
17
+ | File | Role |
18
+ | --- | --- |
19
+ | `schema.json` | Supplier properties; the interest is in the arrangement, not the data. |
20
+ | `uischema.json` | The existing Group cases plus a Card regions tab with cover, authored heading and footer. |
21
+ | `data.json` | Half the properties filled, so the data indicator has something to distinguish. |
22
+ | `config.json` | `showUnfocusedDescription` and the image-data URL permission needed by the self-contained cover and header artwork. |
23
+ | `translations.json` | English and Bulgarian, including the indicator's accessible label. |
24
+
25
+ ## What the form contains
26
+
27
+ ```text
28
+ Supplier record
29
+ Identity plain group -> a labelled section, always open
30
+ Contact collapsible -> open, and marked as holding data
31
+ Additional details collapsible, collapsed -> nested, closed, also holds data
32
+ Insurance collapsible, collapsed -> closed, and holds nothing
33
+ Audit collapsed, NOT collapsible -> stays open; collapsed is ignored
34
+ ```
35
+
36
+ ## Expected behaviour
37
+
38
+ ### A plain group is just a section
39
+
40
+ **Identity** has no options at all. It draws a labelled section with no
41
+ disclosure control, and its contents are always present. Its default visual
42
+ treatment "belongs to the renderer family and does not require a variant" —
43
+ there is no `variant: "card"` to author.
44
+
45
+ Note it also contains a `HorizontalLayout`, so a group composes with the
46
+ sizing model rather than replacing it.
47
+
48
+ ### `collapsible` adds a disclosure control
49
+
50
+ **Contact** is collapsible and opens by default, because `collapsed` defaults
51
+ to false. The header is "an accessible disclosure control", so it can be
52
+ reached and operated from the keyboard.
53
+
54
+ For the suggested presentation, make the whole header the disclosure target,
55
+ keep the title at the leading edge, and put the data marker and chevron at the
56
+ trailing edge. The marker's tooltip uses its localized accessible name. Use
57
+ the UI framework's standard collapsible component and the application's theme;
58
+ see [§8.1 presentation recommendations](../../docs/spec.md#81-group).
59
+
60
+ ### `collapsed` initializes, and only when collapsible
61
+
62
+ **Insurance** starts closed. **Audit** asks for `collapsed: true` but never
63
+ asks for `collapsible`, so the option is ignored and the group stays an
64
+ ordinary open section — "ignored unless collapsible is true".
65
+
66
+ Note that a closed group's children are still in the document; the disclosure
67
+ hides them. Validation and data are unaffected by expansion, which is the point
68
+ of "collapsing must not clear data or suppress validation".
69
+
70
+ ### `showDataIndicator` marks the groups holding something
71
+
72
+ **Contact** and **Additional details** are marked; **Insurance** is not,
73
+ because none of its properties has a value. That asymmetry is what makes the
74
+ indicator worth anything — an indicator on everything says nothing.
75
+
76
+ The marker carries a localized accessible label, "Contains data", rather than
77
+ relying on the visual dot alone. **Switch the demo to Bulgarian** and it
78
+ translates with everything else.
79
+
80
+ ### Groups nest
81
+
82
+ **Additional details** sits inside **Contact**, collapsible inside
83
+ collapsible, and each keeps its own state: opening the outer one does not open
84
+ the inner.
85
+
86
+ ## Fallback behaviour
87
+
88
+ | Situation | Result |
89
+ | --- | --- |
90
+ | No options | A labelled section, always open, with no disclosure control. |
91
+ | `collapsible: true`, no `collapsed` | Collapsible, open. |
92
+ | `collapsed: true` without `collapsible` | Ignored. |
93
+ | `collapsed` set to a non-boolean | Ignored; the static fallback applies. |
94
+ | `showDataIndicator: true`, no descendant holds data | No marker. |
95
+ | A collapsed group | Children remain in the document, validated as normal. |
96
+
97
+ ## Cover, header and footer
98
+
99
+ The **Card regions** tab in `uischema.json` demonstrates the optional structural
100
+ regions. A self-contained courtyard photograph fills the 800px-wide card cover.
101
+ Two authored header Labels provide the title and smaller supporting text. The
102
+ footer follows the body with space on both sides of its divider.
103
+ The group starts
104
+ collapsed, showing its cover, single heading area, disclosure control and
105
+ indicator. Opening it reveals the controls and footer inside that frame.
106
+ Activating a footer button must not toggle the disclosure. Closing the Group hides
107
+ the controls and footer without changing data. Hiding the Group hides every region.
108
+ The image uses the ordinary ImageView URL and alternative-text rules; the
109
+ buttons use ordinary action dispatch and enabled/read-only behavior. The two
110
+ buttons select English or Bulgarian through the demo host's `setLocale` action.
111
+ The card's width limit comes from its parent VerticalLayout item constraint.
112
+
113
+ ## Not covered: `collapsed` driven from data
114
+
115
+ §8's worked example binds `collapsed` through `$dynamic`:
116
+
117
+ ```json
118
+ "$dynamic": { "options": { "collapsed": { "bind": "data.hideDetails" } } }
119
+ ```
120
+
121
+ The fixture uses static `collapsed` only. Dynamic binding is a separate
122
+ capability and must be verified in the selected renderer.
123
+
124
+ Two consequences worth knowing when it is implemented:
125
+
126
+ - expansion must **synchronize** when the effective boolean changes, while
127
+ leaving local header clicks alone in between;
128
+ - `$dynamic` is "one-way resolution, not a writable binding" — reopening a
129
+ group locally must not write back to the bound property.
130
+
131
+ ## Conformance scope
132
+
133
+ This walkthrough describes the portable contract. Renderer support must be checked
134
+ by a host adapter; the package validates the authored assets, not live UI behavior.
135
+
136
+ ## Standalone host setup
137
+
138
+ Load the JSON assets listed in [the catalog](../catalog.json) into a host
139
+ with the relevant renderer capabilities. No framework registration module is
140
+ required by this package.
141
+
142
+
143
+ ## Feature navigation
144
+
145
+ Explore one feature at a time using the tabs: **Identity group**, **Contact group**, **Insurance group**, **Audit group**, **False and zero**, and **Card regions**. Tab titles are localized in English and Bulgarian. The tabs share the existing form data.
146
+
147
+ ## Consolidated demo coverage
148
+
149
+ The False and zero tab starts collapsed with `false` and `0`: both count as present data.
@@ -0,0 +1,10 @@
1
+ {
2
+ "showUnfocusedDescription": true,
3
+ "jsonformsExtended": {
4
+ "security": {
5
+ "urlPolicy": {
6
+ "allowImageDataUrls": true
7
+ }
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "legalName": "Cascade Supplies",
3
+ "memberNumber": "1884213",
4
+ "contactName": "A. Ferreira",
5
+ "contactEmail": "support@example.test",
6
+ "alternatePhone": "+1 503 555 0113",
7
+ "active": false,
8
+ "count": 0
9
+ }