@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,98 @@
1
+ {
2
+ "type": "VerticalLayout",
3
+ "elements": [
4
+ {
5
+ "type": "Control",
6
+ "scope": "#/properties/fullName"
7
+ },
8
+ {
9
+ "type": "Categorization",
10
+ "options": {
11
+ "variant": "stepper",
12
+ "showNavButtons": true
13
+ },
14
+ "elements": [
15
+ {
16
+ "type": "Category",
17
+ "name": "personal",
18
+ "label": "Personal details",
19
+ "i18n": "personalDetails",
20
+ "elements": [
21
+ {
22
+ "type": "Control",
23
+ "scope": "#/properties/startDate"
24
+ },
25
+ {
26
+ "type": "Group",
27
+ "label": "Emergency contact",
28
+ "i18n": "emergencyContact",
29
+ "options": {
30
+ "collapsible": true,
31
+ "collapsed": true,
32
+ "showDataIndicator": true,
33
+ "showValidationIndicator": true
34
+ },
35
+ "elements": [
36
+ {
37
+ "type": "Control",
38
+ "scope": "#/properties/emergencyContact/properties/name"
39
+ },
40
+ {
41
+ "type": "Control",
42
+ "scope": "#/properties/emergencyContact/properties/relationship"
43
+ },
44
+ {
45
+ "type": "Control",
46
+ "scope": "#/properties/emergencyContact/properties/phone"
47
+ }
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "type": "Category",
54
+ "name": "compliance",
55
+ "label": "Compliance",
56
+ "i18n": "compliance",
57
+ "elements": [
58
+ {
59
+ "type": "Control",
60
+ "scope": "#/properties/certifications",
61
+ "options": {
62
+ "showValidationIndicator": false,
63
+ "elementLabelProp": "name",
64
+ "showSortButtons": true
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "type": "Category",
71
+ "label": "Composite cells",
72
+ "i18n": "compositeCells",
73
+ "elements": [
74
+ {
75
+ "type": "Control",
76
+ "scope": "#/properties/applicants",
77
+ "options": {
78
+ "table": true,
79
+ "cells": {
80
+ "contact": {
81
+ "summary": {
82
+ "type": "Control",
83
+ "scope": "#/properties/city"
84
+ }
85
+ },
86
+ "experience": {},
87
+ "oneOfContact": {},
88
+ "anyOfContact": {},
89
+ "allOfContact": {}
90
+ }
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ ]
96
+ }
97
+ ]
98
+ }
@@ -0,0 +1,155 @@
1
+ # Example: cron control
2
+
3
+ **Example ID:** `cron-control`\
4
+ **Demo entry:** **Spec: Cron control** (`#spec-cron-control`)\
5
+ **Domain:** an overnight replenishment job\
6
+ **Specs covered:**
7
+
8
+ - [The cron picker asks how often first](../../docs/spec.md#1825-cron-control)
9
+ - [Schema-driven and UI-driven format selection](../../docs/spec.md#1825-cron-control)
10
+ - [the shared clear-value contract](../../docs/spec.md#1825-cron-control)
11
+ - [pending edits, commit timing and cancellation](../../docs/spec.md#1825-cron-control)
12
+ - [The extended validator profile](../../docs/spec.md#1825-cron-control)
13
+
14
+ A cron expression is a string, and this is the control that stops it being
15
+ edited as one. Six values are hidden in six fields of punctuation, and the
16
+ question a reader actually has — *when does this run?* — is not answerable by
17
+ looking at `0 0/15 * * * *` unless they already know the dialect.
18
+
19
+ **Which dialect matters more than anything else here.** These six fields are
20
+ `second minute hour day-of-month month day-of-week`. Unix cron has **five** and
21
+ no seconds; Quartz has **seven** and adds a year. The same text means different
22
+ things in each, and the mistake does not announce itself — a five-field
23
+ expression ported from a crontab is a valid string that schedules nothing.
24
+
25
+ ## Files
26
+
27
+ | File | Role |
28
+ | --- | --- |
29
+ | `schema.json` | Three groups: `selectedBySchema` uses the `format` keyword, `selectedByUiSchema` holds plain strings, `rejected` holds two expressions from the wrong dialects. |
30
+ | `uischema.json` | A `VerticalLayout` of three `Group`s. The UI-schema group passes `options.format: "cron"`; the others carry no options at all. |
31
+ | `data.json` | A configured job. Two values are deliberately invalid — see below. |
32
+ | `translations.json` | English and Bulgarian. |
33
+ | — | No `config.json`: nothing here is global. No `uischemas.json`: there is no detail form. |
34
+
35
+ ## What the form contains
36
+
37
+ ```text
38
+ Job name (string, required, minLength 3)
39
+
40
+ Selected by the schema
41
+ Stock sync 0 0/15 * * * * format: cron, required
42
+ Supplier feed 0 30 6 ? * MON-FRI format: cron
43
+ Month-end report 0 0 23 L * ? format: cron
44
+
45
+ Selected by the UI schema
46
+ Cache warm-up 10 * * * * * options.format, pattern only
47
+ Archive sweep (empty) options.format, placeholder only
48
+
49
+ Not this dialect
50
+ Ported from crontab */15 * * * * five fields
51
+ Ported from Quartz 0 0 12 ? * MON 2027 seven fields
52
+ ```
53
+
54
+ ## The two routes, and what each one validates
55
+
56
+ | | Selected by the schema | Selected by the UI schema |
57
+ | --- | --- | --- |
58
+ | How | `{"type":"string","format":"cron"}` | `{"type":"string"}` + `options.format: "cron"` |
59
+ | Picks the renderer | yes | yes |
60
+ | Gives the validator something to check | **yes** | **no** |
61
+
62
+ `cron` is **not a standard JSON Schema format** or a JSON Schema keyword;
63
+ `format` is the standard keyword. To support cron expressions alongside the
64
+ cron renderer, the extended validator profile adds custom AJV validation by
65
+ registering the `cron` format (`createFormsAjv`, beside `color`). This makes the
66
+ first column true: failures are ordinary schema-validation errors. Without
67
+ registration, the control still appears, but AJV cannot validate the custom
68
+ format (it warns and ignores it or rejects the schema, depending on its
69
+ configuration). Local renderer feedback does not replace that validation or
70
+ publish additional errors. The second column is the plain-string route, where only
71
+ `pattern` applies — and the pattern here counts fields and nothing else, which
72
+ is as much as a regular expression can usefully say about cron.
73
+
74
+ ## Validation state
75
+
76
+ Validated with `createFormsAjv()`. The supplied data produces **exactly two**
77
+ errors, both in the third group:
78
+
79
+ | Path | Keyword | Message |
80
+ | --- | --- | --- |
81
+ | `/rejected/unixFiveField` | `format` | `must match format "cron"` |
82
+ | `/rejected/quartzSevenField` | `format` | `must match format "cron"` |
83
+
84
+ `*/15 * * * *` is a perfectly good Unix cron expression and has five fields.
85
+ `0 0 12 ? * MON 2027` is a perfectly good Quartz expression and has seven. Both
86
+ are rejected here, which is the point of the group: the control reports the
87
+ field that is wrong rather than reinterpreting the expression into whatever the
88
+ nearest six-field reading would be.
89
+
90
+ Everything else is valid. `10 * * * * *` — second 10 of every minute — is the
91
+ one shape a five-field dialect cannot express at all, and it is a real schedule.
92
+
93
+ ## Expected behavior
94
+
95
+ **The period is asked first, and it is a lens.** Opening the picker on Stock
96
+ sync shows `Repeats: Hourly`, because minutes and seconds are the coarsest
97
+ things that expression restricts. The period decides which of the six rows are
98
+ worth showing — a schedule that runs every hour has nothing to say about which
99
+ day it is, and five rows reading "Every" is a form that hides its own answer.
100
+
101
+ **A period selects nothing.** Archive sweep has no value. Its picker opens with
102
+ no period chosen, no rows, and an empty expression box; choosing "Yearly" makes
103
+ the rows appear, all reading "Every", and writes nothing. Pressing Apply without
104
+ an edit leaves the property empty.
105
+
106
+ **Choosing a value pins the time below it.** In cron, a field left alone means
107
+ *every* value, so "nine o'clock" with nothing else said is 3600 executions an
108
+ hour. Picking Hours = 9 therefore writes `0 0 9 * * *`. Never a day or a month:
109
+ that is the question being asked, and filling in a weekday beside a day of the
110
+ month would mean "the 1st, and only when it is a Monday" — these fields are
111
+ ANDed, not ORed.
112
+
113
+ **A field that is not a list is edited as text.** Month-end report uses `L`,
114
+ "the last day of the month". That is not a set of days, so the row shows the
115
+ text rather than a dropdown, with a note saying why. It is never reinterpreted
116
+ and never widened into a list that would mean something else.
117
+
118
+ **Applying an untouched picker writes nothing.** Every value in the first group
119
+ has a canonical spelling the picker could write back — `0 0/15` and its
120
+ asterisk form select the same minutes — and it does not, per the renderer contract: *existing data
121
+ must not be silently normalized solely because the renderer is mounted.*
122
+
123
+ **Clearing follows the shared contract.** The clear button carries
124
+ `control.clearValue`, appears on hover or focus, and returns the property to a
125
+ missing state — not an empty string, and not a schema default.
126
+
127
+ ## Fallback behavior
128
+
129
+ - **Without the renderer**, `format: "cron"` falls through to the string control
130
+ and the expression is editable as text. Nothing is lost but the picker; the
131
+ validator still rejects the wrong dialect, because the format is registered in
132
+ the profile rather than in the renderer.
133
+ - **Without the registered format** — a host that builds its own Ajv — the
134
+ schema route still selects the control, Ajv warns `unknown format "cron"`, and
135
+ the two invalid values are reported by the control instead of by the form.
136
+ - **`options.clearable: false`** removes the clear action; required validation is
137
+ unaffected.
138
+ - **`options.showActions: false`** commits each selection immediately instead of
139
+ staging it until Apply, and the picker then has no buttons.
140
+
141
+ ## Conformance scope
142
+
143
+ This walkthrough describes the portable contract. Renderer support must be checked
144
+ by a host adapter; the package validates the authored assets, not live UI behavior.
145
+
146
+ ## Standalone host setup
147
+
148
+ Load the JSON assets listed in [the catalog](../catalog.json) into a host
149
+ with the relevant renderer capabilities. No framework registration module is
150
+ required by this package.
151
+
152
+
153
+ ## Feature navigation
154
+
155
+ Explore one feature at a time using the tabs: **Schema selection**, **UI schema selection**, **Unsupported dialect**. Tab titles are localized in English and Bulgarian. The tabs share the existing form data.
@@ -0,0 +1,15 @@
1
+ {
2
+ "jobName": "Overnight replenishment",
3
+ "selectedBySchema": {
4
+ "stockSync": "0 0/15 * * * *",
5
+ "supplierFeed": "0 30 6 ? * MON-FRI",
6
+ "monthEndReport": "0 0 23 L * ?"
7
+ },
8
+ "selectedByUiSchema": {
9
+ "cacheWarm": "10 * * * * *"
10
+ },
11
+ "rejected": {
12
+ "unixFiveField": "*/15 * * * *",
13
+ "quartzSevenField": "0 0 12 ? * MON 2027"
14
+ }
15
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "type": "object",
3
+ "title": "Overnight replenishment job",
4
+ "properties": {
5
+ "jobName": {
6
+ "type": "string",
7
+ "title": "Job name",
8
+ "minLength": 3
9
+ },
10
+ "selectedBySchema": {
11
+ "type": "object",
12
+ "title": "Selected by the schema",
13
+ "properties": {
14
+ "stockSync": {
15
+ "type": "string",
16
+ "format": "cron",
17
+ "title": "Stock sync",
18
+ "description": "format: cron. Six fields, seconds first."
19
+ },
20
+ "supplierFeed": {
21
+ "type": "string",
22
+ "format": "cron",
23
+ "title": "Supplier feed",
24
+ "description": "A schedule the picker states as a list of weekdays."
25
+ },
26
+ "monthEndReport": {
27
+ "type": "string",
28
+ "format": "cron",
29
+ "title": "Month-end report",
30
+ "description": "Uses `L`, which is not a list of days — the picker edits this field as text."
31
+ }
32
+ },
33
+ "required": ["stockSync"]
34
+ },
35
+ "selectedByUiSchema": {
36
+ "type": "object",
37
+ "title": "Selected by the UI schema",
38
+ "properties": {
39
+ "cacheWarm": {
40
+ "type": "string",
41
+ "title": "Cache warm-up",
42
+ "pattern": "^\\S+( \\S+){5}$",
43
+ "description": "A plain string. Only `pattern` validates it, and it only counts fields."
44
+ },
45
+ "unset": {
46
+ "type": "string",
47
+ "title": "Archive sweep",
48
+ "description": "No schedule yet. The picker opens on nothing rather than on the placeholder."
49
+ }
50
+ }
51
+ },
52
+ "rejected": {
53
+ "type": "object",
54
+ "title": "Not this dialect",
55
+ "properties": {
56
+ "unixFiveField": {
57
+ "type": "string",
58
+ "format": "cron",
59
+ "title": "Ported from crontab",
60
+ "description": "Five fields. Valid Unix cron, and not a schedule this dialect can run."
61
+ },
62
+ "quartzSevenField": {
63
+ "type": "string",
64
+ "format": "cron",
65
+ "title": "Ported from Quartz",
66
+ "description": "Seven fields — Quartz adds a year."
67
+ }
68
+ }
69
+ }
70
+ },
71
+ "required": ["jobName"]
72
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "en": {
3
+ "group.selectedBySchema.label": "Selected by the schema",
4
+ "group.selectedByUiSchema.label": "Selected by the UI schema",
5
+ "group.rejected.label": "Not this dialect",
6
+ "cron.choose": "Choose a schedule",
7
+ "cron.repeats": "Repeats",
8
+ "cron.chooseRepeats": "Choose how often",
9
+ "cron.every": "Every",
10
+ "cron.expression": "Expression",
11
+ "cron.advanced": "Edited as text: this field uses syntax a list cannot state.",
12
+ "cron.error.sixFields": "A schedule has six fields: second, minute, hour, day of month, month, day of week.",
13
+ "control.clearValue": "Clear value",
14
+ "error.format": "This is not a schedule the scheduler can run.",
15
+ "error.pattern": "Six fields separated by single spaces.",
16
+ "error.required": "Give the job a name.",
17
+ "error.minLength": "At least three characters.",
18
+ "featureNavigation.section1.label": "Schema selection",
19
+ "featureNavigation.section2.label": "UI schema selection",
20
+ "featureNavigation.section3.label": "Unsupported dialect",
21
+ "cronExample.label": "Overnight replenishment job",
22
+ "cronExample/properties/jobName.label": "Job name",
23
+ "cronExample/properties/selectedBySchema.label": "Selected by the schema",
24
+ "cronExample/properties/selectedBySchema/properties/stockSync.label": "Stock sync",
25
+ "cronExample/properties/selectedBySchema/properties/stockSync.description": "format: cron. Six fields, seconds first.",
26
+ "cronExample/properties/selectedBySchema/properties/supplierFeed.label": "Supplier feed",
27
+ "cronExample/properties/selectedBySchema/properties/supplierFeed.description": "A schedule the picker states as a list of weekdays.",
28
+ "cronExample/properties/selectedBySchema/properties/monthEndReport.label": "Month-end report",
29
+ "cronExample/properties/selectedBySchema/properties/monthEndReport.description": "Uses `L`, which is not a list of days — the picker edits this field as text.",
30
+ "cronExample/properties/selectedByUiSchema.label": "Selected by the UI schema",
31
+ "cronExample/properties/selectedByUiSchema/properties/cacheWarm.label": "Cache warm-up",
32
+ "cronExample/properties/selectedByUiSchema/properties/cacheWarm.description": "A plain string. Only `pattern` validates it, and it only counts fields.",
33
+ "cronExample/properties/selectedByUiSchema/properties/unset.label": "Archive sweep",
34
+ "cronExample/properties/selectedByUiSchema/properties/unset.description": "No schedule yet. The picker opens on nothing rather than on the placeholder.",
35
+ "cronExample/properties/rejected.label": "Not this dialect",
36
+ "cronExample/properties/rejected/properties/unixFiveField.label": "Ported from crontab",
37
+ "cronExample/properties/rejected/properties/unixFiveField.description": "Five fields. Valid Unix cron, and not a schedule this dialect can run.",
38
+ "cronExample/properties/rejected/properties/quartzSevenField.label": "Ported from Quartz",
39
+ "cronExample/properties/rejected/properties/quartzSevenField.description": "Seven fields — Quartz adds a year."
40
+ },
41
+ "bg": {
42
+ "group.selectedBySchema.label": "Избрано от схемата",
43
+ "group.selectedByUiSchema.label": "Избрано от UI схемата",
44
+ "group.rejected.label": "Не е този диалект",
45
+ "cron.choose": "Изберете график",
46
+ "cron.repeats": "Повтаря се",
47
+ "cron.chooseRepeats": "Изберете колко често",
48
+ "cron.every": "Всяка стойност",
49
+ "cron.expression": "Израз",
50
+ "cron.advanced": "Редактира се като текст: полето използва синтаксис, който не може да се изрази със списък.",
51
+ "cron.error.sixFields": "Графикът има шест полета: секунда, минута, час, ден от месеца, месец, ден от седмицата.",
52
+ "control.clearValue": "Изчистване на стойността",
53
+ "error.format": "Това не е график, който планировчикът може да изпълни.",
54
+ "error.pattern": "Шест полета, разделени с по един интервал.",
55
+ "error.required": "Дайте име на задачата.",
56
+ "error.minLength": "Поне три знака.",
57
+ "featureNavigation.section1.label": "Избор чрез схема",
58
+ "featureNavigation.section2.label": "Избор чрез UI схема",
59
+ "featureNavigation.section3.label": "Неподдържан диалект",
60
+ "cronExample.label": "Нощна задача за попълване на запасите",
61
+ "cronExample/properties/jobName.label": "Име на задачата",
62
+ "cronExample/properties/selectedBySchema.label": "Избрано от схемата",
63
+ "cronExample/properties/selectedBySchema/properties/stockSync.label": "Синхронизиране на наличностите",
64
+ "cronExample/properties/selectedBySchema/properties/stockSync.description": "format: cron. Шест полета, започващи със секундите.",
65
+ "cronExample/properties/selectedBySchema/properties/supplierFeed.label": "Данни от доставчика",
66
+ "cronExample/properties/selectedBySchema/properties/supplierFeed.description": "График, който се представя като списък с дни от седмицата.",
67
+ "cronExample/properties/selectedBySchema/properties/monthEndReport.label": "Отчет в края на месеца",
68
+ "cronExample/properties/selectedBySchema/properties/monthEndReport.description": "Използва `L`, което не е списък с дни — полето се редактира като текст.",
69
+ "cronExample/properties/selectedByUiSchema.label": "Избрано от UI схемата",
70
+ "cronExample/properties/selectedByUiSchema/properties/cacheWarm.label": "Предварително зареждане на кеша",
71
+ "cronExample/properties/selectedByUiSchema/properties/cacheWarm.description": "Обикновен низ. Само `pattern` го валидира, като проверява броя на полетата.",
72
+ "cronExample/properties/selectedByUiSchema/properties/unset.label": "Обработка на архива",
73
+ "cronExample/properties/selectedByUiSchema/properties/unset.description": "Все още няма график. Редакторът се отваря без избрани стойности.",
74
+ "cronExample/properties/rejected.label": "Неподдържан диалект",
75
+ "cronExample/properties/rejected/properties/unixFiveField.label": "Пренесено от crontab",
76
+ "cronExample/properties/rejected/properties/unixFiveField.description": "Пет полета. Валиден Unix cron, който този диалект не поддържа.",
77
+ "cronExample/properties/rejected/properties/quartzSevenField.label": "Пренесено от Quartz",
78
+ "cronExample/properties/rejected/properties/quartzSevenField.description": "Седем полета — Quartz добавя година."
79
+ }
80
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "type": "VerticalLayout",
3
+ "elements": [
4
+ {
5
+ "type": "Control",
6
+ "scope": "#/properties/jobName"
7
+ },
8
+ {
9
+ "type": "Categorization",
10
+ "elements": [
11
+ {
12
+ "type": "Category",
13
+ "label": "Schema selection",
14
+ "i18n": "featureNavigation.section1",
15
+ "elements": [
16
+ {
17
+ "type": "Group",
18
+ "label": "Selected by the schema",
19
+ "i18n": "group.selectedBySchema",
20
+ "elements": [
21
+ {
22
+ "type": "Control",
23
+ "scope": "#/properties/selectedBySchema/properties/stockSync"
24
+ },
25
+ {
26
+ "type": "Control",
27
+ "scope": "#/properties/selectedBySchema/properties/supplierFeed"
28
+ },
29
+ {
30
+ "type": "Control",
31
+ "scope": "#/properties/selectedBySchema/properties/monthEndReport"
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "type": "Category",
39
+ "label": "UI schema selection",
40
+ "i18n": "featureNavigation.section2",
41
+ "elements": [
42
+ {
43
+ "type": "Group",
44
+ "label": "Selected by the UI schema",
45
+ "i18n": "group.selectedByUiSchema",
46
+ "elements": [
47
+ {
48
+ "type": "Control",
49
+ "scope": "#/properties/selectedByUiSchema/properties/cacheWarm",
50
+ "options": {
51
+ "format": "cron"
52
+ }
53
+ },
54
+ {
55
+ "type": "Control",
56
+ "scope": "#/properties/selectedByUiSchema/properties/unset",
57
+ "options": {
58
+ "format": "cron",
59
+ "placeholder": "0 0 3 * * *"
60
+ }
61
+ }
62
+ ]
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "type": "Category",
68
+ "label": "Unsupported dialect",
69
+ "i18n": "featureNavigation.section3",
70
+ "elements": [
71
+ {
72
+ "type": "Group",
73
+ "label": "Not this dialect",
74
+ "i18n": "group.rejected",
75
+ "elements": [
76
+ {
77
+ "type": "Control",
78
+ "scope": "#/properties/rejected/properties/unixFiveField"
79
+ },
80
+ {
81
+ "type": "Control",
82
+ "scope": "#/properties/rejected/properties/quartzSevenField"
83
+ }
84
+ ]
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ }
90
+ ]
91
+ }