@chobantonov/jsonforms-extended-spec 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/conformance/authoring.json +511 -0
  2. package/conformance/behavior.json +2373 -4
  3. package/conformance/config-consumption.json +13 -2
  4. package/docs/audit.md +17 -2
  5. package/docs/conditional-fields.md +133 -6
  6. package/docs/external-resources-proposal.md +8 -2
  7. package/docs/implementation-guide.md +129 -90
  8. package/docs/implementation-pitfalls.md +393 -1
  9. package/docs/implementation-web-typescript.md +2 -5
  10. package/docs/renderer-and-demo.md +47 -34
  11. package/docs/spec.md +235 -14
  12. package/docs/todo.md +72 -18
  13. package/examples/README.md +8 -2
  14. package/examples/additional-errors/README.md +7 -0
  15. package/examples/additional-properties/README.md +15 -0
  16. package/examples/catalog.json +16 -1
  17. package/examples/color-control/README.md +4 -1
  18. package/examples/conditional-fields/README.md +21 -3
  19. package/examples/conditional-fields/translations.json +4 -2
  20. package/examples/conditional-fields/uischema.json +67 -7
  21. package/examples/conditional-template-slots/README.md +14 -0
  22. package/examples/conditional-template-slots/config.json +7 -0
  23. package/examples/conditional-template-slots/data.json +5 -0
  24. package/examples/conditional-template-slots/schema.json +37 -0
  25. package/examples/conditional-template-slots/translations.json +16 -0
  26. package/examples/conditional-template-slots/uischema.json +22 -0
  27. package/examples/index.js +4 -3
  28. package/examples/kitchen-sink/README.md +93 -4
  29. package/examples/kitchen-sink/config.json +7 -0
  30. package/examples/kitchen-sink/data.json +14 -2
  31. package/examples/kitchen-sink/invalid-data.json +13 -1
  32. package/examples/kitchen-sink/schema.json +100 -1
  33. package/examples/kitchen-sink/translations.json +80 -2
  34. package/examples/kitchen-sink/uischema.json +239 -4
  35. package/examples/label-interpolation/README.md +58 -1
  36. package/examples/label-interpolation/config.json +8 -2
  37. package/examples/label-interpolation/translations.json +8 -4
  38. package/examples/label-interpolation/uischema.json +31 -8
  39. package/package.json +1 -1
  40. package/schemas/README.md +8 -3
  41. package/schemas/jsonforms-config.schema.json +1 -1
  42. package/schemas/jsonforms-extended-config.schema.json +5 -0
  43. package/schemas/jsonforms-extended-uischema.schema.json +11 -2
  44. package/schemas/jsonforms-uischema.schema.json +14 -1
  45. package/typescript/README.md +8 -2
  46. package/typescript/lib/authoring/forSchema.d.ts +10 -1
  47. package/typescript/src/authoring/forSchema.ts +10 -1
  48. package/typescript/test/schemaContract.test.ts +12 -0
  49. package/typescript/test/typedAuthoring.test.ts +12 -1
  50. package/typescript/test/typedAuthoringCoverage.test.ts +33 -0
@@ -2165,5 +2165,516 @@
2165
2165
  },
2166
2166
  "valid": false,
2167
2167
  "section": "18.3a"
2168
+ },
2169
+ {
2170
+ "id": "styling-part-jsonforms-uischema-list",
2171
+ "schema": "jsonforms-uischema.schema.json",
2172
+ "value": {
2173
+ "type": "Label",
2174
+ "text": "Membership",
2175
+ "options": {
2176
+ "part": "summary prominent summary"
2177
+ }
2178
+ },
2179
+ "valid": true,
2180
+ "section": "5.7"
2181
+ },
2182
+ {
2183
+ "id": "styling-part-jsonforms-uischema-empty",
2184
+ "schema": "jsonforms-uischema.schema.json",
2185
+ "value": {
2186
+ "type": "Label",
2187
+ "text": "Membership",
2188
+ "options": {
2189
+ "part": ""
2190
+ }
2191
+ },
2192
+ "valid": true,
2193
+ "section": "5.7"
2194
+ },
2195
+ {
2196
+ "id": "styling-part-jsonforms-uischema-whitespace",
2197
+ "schema": "jsonforms-uischema.schema.json",
2198
+ "value": {
2199
+ "type": "Label",
2200
+ "text": "Membership",
2201
+ "options": {
2202
+ "part": " \t\n"
2203
+ }
2204
+ },
2205
+ "valid": true,
2206
+ "section": "5.7"
2207
+ },
2208
+ {
2209
+ "id": "styling-part-jsonforms-uischema-separators",
2210
+ "schema": "jsonforms-uischema.schema.json",
2211
+ "value": {
2212
+ "type": "Label",
2213
+ "text": "Membership",
2214
+ "options": {
2215
+ "part": "summary\tprominent\naccount_holder"
2216
+ }
2217
+ },
2218
+ "valid": true,
2219
+ "section": "5.7"
2220
+ },
2221
+ {
2222
+ "id": "styling-part-jsonforms-uischema-unicode-separator",
2223
+ "schema": "jsonforms-uischema.schema.json",
2224
+ "value": {
2225
+ "type": "Label",
2226
+ "text": "Membership",
2227
+ "options": {
2228
+ "part": "summary prominent"
2229
+ }
2230
+ },
2231
+ "valid": true,
2232
+ "section": "5.7"
2233
+ },
2234
+ {
2235
+ "id": "styling-part-jsonforms-uischema-invalid-name",
2236
+ "schema": "jsonforms-uischema.schema.json",
2237
+ "value": {
2238
+ "type": "Label",
2239
+ "text": "Membership",
2240
+ "options": {
2241
+ "part": "summary 7notes"
2242
+ }
2243
+ },
2244
+ "valid": false,
2245
+ "section": "5.7"
2246
+ },
2247
+ {
2248
+ "id": "styling-part-jsonforms-uischema-punctuation",
2249
+ "schema": "jsonforms-uischema.schema.json",
2250
+ "value": {
2251
+ "type": "Label",
2252
+ "text": "Membership",
2253
+ "options": {
2254
+ "part": "summary bad.name"
2255
+ }
2256
+ },
2257
+ "valid": false,
2258
+ "section": "5.7"
2259
+ },
2260
+ {
2261
+ "id": "styling-part-jsonforms-uischema-array",
2262
+ "schema": "jsonforms-uischema.schema.json",
2263
+ "value": {
2264
+ "type": "Label",
2265
+ "text": "Membership",
2266
+ "options": {
2267
+ "part": [
2268
+ "summary"
2269
+ ]
2270
+ }
2271
+ },
2272
+ "valid": false,
2273
+ "section": "5.7"
2274
+ },
2275
+ {
2276
+ "id": "styling-part-jsonforms-uischema-null",
2277
+ "schema": "jsonforms-uischema.schema.json",
2278
+ "value": {
2279
+ "type": "Label",
2280
+ "text": "Membership",
2281
+ "options": {
2282
+ "part": null
2283
+ }
2284
+ },
2285
+ "valid": false,
2286
+ "section": "5.7"
2287
+ },
2288
+ {
2289
+ "id": "styling-part-jsonforms-uischema-Control",
2290
+ "schema": "jsonforms-uischema.schema.json",
2291
+ "value": {
2292
+ "type": "Control",
2293
+ "scope": "#",
2294
+ "options": {
2295
+ "part": "summary"
2296
+ }
2297
+ },
2298
+ "valid": true,
2299
+ "section": "5.7"
2300
+ },
2301
+ {
2302
+ "id": "styling-part-jsonforms-uischema-VerticalLayout",
2303
+ "schema": "jsonforms-uischema.schema.json",
2304
+ "value": {
2305
+ "type": "VerticalLayout",
2306
+ "elements": [],
2307
+ "options": {
2308
+ "part": "summary"
2309
+ }
2310
+ },
2311
+ "valid": true,
2312
+ "section": "5.7"
2313
+ },
2314
+ {
2315
+ "id": "styling-part-jsonforms-extended-uischema-list",
2316
+ "schema": "jsonforms-extended-uischema.schema.json",
2317
+ "value": {
2318
+ "type": "Label",
2319
+ "text": "Membership",
2320
+ "options": {
2321
+ "part": "summary prominent summary"
2322
+ }
2323
+ },
2324
+ "valid": true,
2325
+ "section": "5.7"
2326
+ },
2327
+ {
2328
+ "id": "styling-part-jsonforms-extended-uischema-empty",
2329
+ "schema": "jsonforms-extended-uischema.schema.json",
2330
+ "value": {
2331
+ "type": "Label",
2332
+ "text": "Membership",
2333
+ "options": {
2334
+ "part": ""
2335
+ }
2336
+ },
2337
+ "valid": true,
2338
+ "section": "5.7"
2339
+ },
2340
+ {
2341
+ "id": "styling-part-jsonforms-extended-uischema-whitespace",
2342
+ "schema": "jsonforms-extended-uischema.schema.json",
2343
+ "value": {
2344
+ "type": "Label",
2345
+ "text": "Membership",
2346
+ "options": {
2347
+ "part": " \t\n"
2348
+ }
2349
+ },
2350
+ "valid": true,
2351
+ "section": "5.7"
2352
+ },
2353
+ {
2354
+ "id": "styling-part-jsonforms-extended-uischema-separators",
2355
+ "schema": "jsonforms-extended-uischema.schema.json",
2356
+ "value": {
2357
+ "type": "Label",
2358
+ "text": "Membership",
2359
+ "options": {
2360
+ "part": "summary\tprominent\naccount_holder"
2361
+ }
2362
+ },
2363
+ "valid": true,
2364
+ "section": "5.7"
2365
+ },
2366
+ {
2367
+ "id": "styling-part-jsonforms-extended-uischema-unicode-separator",
2368
+ "schema": "jsonforms-extended-uischema.schema.json",
2369
+ "value": {
2370
+ "type": "Label",
2371
+ "text": "Membership",
2372
+ "options": {
2373
+ "part": "summary prominent"
2374
+ }
2375
+ },
2376
+ "valid": true,
2377
+ "section": "5.7"
2378
+ },
2379
+ {
2380
+ "id": "styling-part-jsonforms-extended-uischema-invalid-name",
2381
+ "schema": "jsonforms-extended-uischema.schema.json",
2382
+ "value": {
2383
+ "type": "Label",
2384
+ "text": "Membership",
2385
+ "options": {
2386
+ "part": "summary 7notes"
2387
+ }
2388
+ },
2389
+ "valid": false,
2390
+ "section": "5.7"
2391
+ },
2392
+ {
2393
+ "id": "styling-part-jsonforms-extended-uischema-punctuation",
2394
+ "schema": "jsonforms-extended-uischema.schema.json",
2395
+ "value": {
2396
+ "type": "Label",
2397
+ "text": "Membership",
2398
+ "options": {
2399
+ "part": "summary bad.name"
2400
+ }
2401
+ },
2402
+ "valid": false,
2403
+ "section": "5.7"
2404
+ },
2405
+ {
2406
+ "id": "styling-part-jsonforms-extended-uischema-array",
2407
+ "schema": "jsonforms-extended-uischema.schema.json",
2408
+ "value": {
2409
+ "type": "Label",
2410
+ "text": "Membership",
2411
+ "options": {
2412
+ "part": [
2413
+ "summary"
2414
+ ]
2415
+ }
2416
+ },
2417
+ "valid": false,
2418
+ "section": "5.7"
2419
+ },
2420
+ {
2421
+ "id": "styling-part-jsonforms-extended-uischema-null",
2422
+ "schema": "jsonforms-extended-uischema.schema.json",
2423
+ "value": {
2424
+ "type": "Label",
2425
+ "text": "Membership",
2426
+ "options": {
2427
+ "part": null
2428
+ }
2429
+ },
2430
+ "valid": false,
2431
+ "section": "5.7"
2432
+ },
2433
+ {
2434
+ "id": "styling-part-jsonforms-extended-uischema-Control",
2435
+ "schema": "jsonforms-extended-uischema.schema.json",
2436
+ "value": {
2437
+ "type": "Control",
2438
+ "scope": "#",
2439
+ "options": {
2440
+ "part": "summary"
2441
+ }
2442
+ },
2443
+ "valid": true,
2444
+ "section": "5.7"
2445
+ },
2446
+ {
2447
+ "id": "styling-part-jsonforms-extended-uischema-VerticalLayout",
2448
+ "schema": "jsonforms-extended-uischema.schema.json",
2449
+ "value": {
2450
+ "type": "VerticalLayout",
2451
+ "elements": [],
2452
+ "options": {
2453
+ "part": "summary"
2454
+ }
2455
+ },
2456
+ "valid": true,
2457
+ "section": "5.7"
2458
+ },
2459
+ {
2460
+ "id": "styling-part-custom-element",
2461
+ "schema": "jsonforms-extended-uischema.schema.json",
2462
+ "value": {
2463
+ "type": "MembershipBadge",
2464
+ "options": {
2465
+ "part": "summary"
2466
+ }
2467
+ },
2468
+ "valid": true,
2469
+ "section": "5.7"
2470
+ },
2471
+ {
2472
+ "id": "styling-text-param-spans-on",
2473
+ "schema": "jsonforms-extended-config.schema.json",
2474
+ "value": {
2475
+ "jsonformsExtended": {
2476
+ "markup": {
2477
+ "textParamSpans": true
2478
+ }
2479
+ }
2480
+ },
2481
+ "valid": true,
2482
+ "section": "9.4a"
2483
+ },
2484
+ {
2485
+ "id": "styling-text-param-spans-off",
2486
+ "schema": "jsonforms-extended-config.schema.json",
2487
+ "value": {
2488
+ "jsonformsExtended": {
2489
+ "markup": {
2490
+ "textParamSpans": false
2491
+ }
2492
+ }
2493
+ },
2494
+ "valid": true,
2495
+ "section": "9.4a"
2496
+ },
2497
+ {
2498
+ "id": "styling-text-param-spans-wrong-type",
2499
+ "schema": "jsonforms-extended-config.schema.json",
2500
+ "value": {
2501
+ "jsonformsExtended": {
2502
+ "markup": {
2503
+ "textParamSpans": "true"
2504
+ }
2505
+ }
2506
+ },
2507
+ "valid": false,
2508
+ "section": "9.4a"
2509
+ },
2510
+ {
2511
+ "id": "label-span-override-jsonforms-uischema-true",
2512
+ "schema": "jsonforms-uischema.schema.json",
2513
+ "value": {
2514
+ "type": "Label",
2515
+ "text": "Membership: {plan}",
2516
+ "options": {
2517
+ "interpolate": true,
2518
+ "textParamSpans": true,
2519
+ "textParams": {
2520
+ "plan": "Studio"
2521
+ }
2522
+ }
2523
+ },
2524
+ "valid": true,
2525
+ "section": "9.4a"
2526
+ },
2527
+ {
2528
+ "id": "label-span-override-jsonforms-uischema-false",
2529
+ "schema": "jsonforms-uischema.schema.json",
2530
+ "value": {
2531
+ "type": "Label",
2532
+ "text": "Membership: {plan}",
2533
+ "options": {
2534
+ "interpolate": true,
2535
+ "textParamSpans": false,
2536
+ "textParams": {
2537
+ "plan": "Studio"
2538
+ }
2539
+ }
2540
+ },
2541
+ "valid": true,
2542
+ "section": "9.4a"
2543
+ },
2544
+ {
2545
+ "id": "label-span-override-jsonforms-uischema-string",
2546
+ "schema": "jsonforms-uischema.schema.json",
2547
+ "value": {
2548
+ "type": "Label",
2549
+ "text": "Membership: {plan}",
2550
+ "options": {
2551
+ "interpolate": true,
2552
+ "textParamSpans": "true",
2553
+ "textParams": {
2554
+ "plan": "Studio"
2555
+ }
2556
+ }
2557
+ },
2558
+ "valid": false,
2559
+ "section": "9.4a"
2560
+ },
2561
+ {
2562
+ "id": "label-span-override-jsonforms-uischema-number",
2563
+ "schema": "jsonforms-uischema.schema.json",
2564
+ "value": {
2565
+ "type": "Label",
2566
+ "text": "Membership: {plan}",
2567
+ "options": {
2568
+ "interpolate": true,
2569
+ "textParamSpans": 1,
2570
+ "textParams": {
2571
+ "plan": "Studio"
2572
+ }
2573
+ }
2574
+ },
2575
+ "valid": false,
2576
+ "section": "9.4a"
2577
+ },
2578
+ {
2579
+ "id": "label-span-override-jsonforms-uischema-null",
2580
+ "schema": "jsonforms-uischema.schema.json",
2581
+ "value": {
2582
+ "type": "Label",
2583
+ "text": "Membership: {plan}",
2584
+ "options": {
2585
+ "interpolate": true,
2586
+ "textParamSpans": null,
2587
+ "textParams": {
2588
+ "plan": "Studio"
2589
+ }
2590
+ }
2591
+ },
2592
+ "valid": false,
2593
+ "section": "9.4a"
2594
+ },
2595
+ {
2596
+ "id": "label-span-override-jsonforms-extended-uischema-true",
2597
+ "schema": "jsonforms-extended-uischema.schema.json",
2598
+ "value": {
2599
+ "type": "Label",
2600
+ "text": "Membership: {plan}",
2601
+ "options": {
2602
+ "interpolate": true,
2603
+ "textParamSpans": true,
2604
+ "textParams": {
2605
+ "plan": "Studio"
2606
+ }
2607
+ }
2608
+ },
2609
+ "valid": true,
2610
+ "section": "9.4a"
2611
+ },
2612
+ {
2613
+ "id": "label-span-override-jsonforms-extended-uischema-false",
2614
+ "schema": "jsonforms-extended-uischema.schema.json",
2615
+ "value": {
2616
+ "type": "Label",
2617
+ "text": "Membership: {plan}",
2618
+ "options": {
2619
+ "interpolate": true,
2620
+ "textParamSpans": false,
2621
+ "textParams": {
2622
+ "plan": "Studio"
2623
+ }
2624
+ }
2625
+ },
2626
+ "valid": true,
2627
+ "section": "9.4a"
2628
+ },
2629
+ {
2630
+ "id": "label-span-override-jsonforms-extended-uischema-string",
2631
+ "schema": "jsonforms-extended-uischema.schema.json",
2632
+ "value": {
2633
+ "type": "Label",
2634
+ "text": "Membership: {plan}",
2635
+ "options": {
2636
+ "interpolate": true,
2637
+ "textParamSpans": "true",
2638
+ "textParams": {
2639
+ "plan": "Studio"
2640
+ }
2641
+ }
2642
+ },
2643
+ "valid": false,
2644
+ "section": "9.4a"
2645
+ },
2646
+ {
2647
+ "id": "label-span-override-jsonforms-extended-uischema-number",
2648
+ "schema": "jsonforms-extended-uischema.schema.json",
2649
+ "value": {
2650
+ "type": "Label",
2651
+ "text": "Membership: {plan}",
2652
+ "options": {
2653
+ "interpolate": true,
2654
+ "textParamSpans": 1,
2655
+ "textParams": {
2656
+ "plan": "Studio"
2657
+ }
2658
+ }
2659
+ },
2660
+ "valid": false,
2661
+ "section": "9.4a"
2662
+ },
2663
+ {
2664
+ "id": "label-span-override-jsonforms-extended-uischema-null",
2665
+ "schema": "jsonforms-extended-uischema.schema.json",
2666
+ "value": {
2667
+ "type": "Label",
2668
+ "text": "Membership: {plan}",
2669
+ "options": {
2670
+ "interpolate": true,
2671
+ "textParamSpans": null,
2672
+ "textParams": {
2673
+ "plan": "Studio"
2674
+ }
2675
+ }
2676
+ },
2677
+ "valid": false,
2678
+ "section": "9.4a"
2168
2679
  }
2169
2680
  ]