tosijs-ui 1.16.13 → 1.16.14

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.14
4
+
5
+ More reach for curated schema forms (#221): into arrays and unions, grouped into sections,
6
+ and usable as a review screen. All of it is off until you ask for it.
7
+
8
+ - **A curation can reach inside arrays and unions.** Give an array's, a union's or an
9
+ object's entry its own `fields`, with paths relative to the property: for an array they
10
+ apply to every item (`thresholds: { fields: { value: 'Threshold' } }`), for a union to the
11
+ branch the value currently matches. Items and branches keep what is not shown, an error in
12
+ an item property that is not shown is listed by its real path, and a union's
13
+ `picker: false` hides the variant picker. One `fields` covers every branch of a union: a
14
+ path the active branch lacks is left out, a path no branch has says so.
15
+ - **Sections.** An entry `{ section: 'Advanced', fields: {...}, collapsed?: true }` groups
16
+ fields in a titled panel. `collapsed: true` also works on an object or array entry. A
17
+ section or collapsed entry is marked `-invalid`, with a red title, while a field inside it
18
+ is in error. **TypeScript:** `FieldCuration`'s values now include `CuratedSection`, so code
19
+ that walks a curation and reads `entry.caption` needs the new guard: `isSection` is exported.
20
+ - **Proposals, for review screens.** `form.proposals = { path: { value, reason?, source? } }`
21
+ shows each proposed value under its field with Accept and Reject. `value` stays the
22
+ current value until one is accepted; accepting fires `proposalaccept` then `change`,
23
+ rejecting fires `proposalreject`. `acceptProposal(path)` / `rejectProposal(path)` do it
24
+ from code, and `proposalView` renders a proposal your own way. A proposal can be for a
25
+ whole array, object or union, and an object item of an array can be proposed whole
26
+ (`list.0`). One for an array item follows its item when items move. `proposalView` is
27
+ given `ProposalContext.readOnly`, and its `accept` / `reject` do nothing while the form is
28
+ read-only. Works with or without a curation. New localized strings: `Proposed`, `Accept`, `Reject`,
29
+ `Proposed changes to fields not shown here`.
30
+ - For TypeScript: `isSection` is exported; `ProposalContext.readOnly` tells a custom
31
+ `proposalView` that the form is read-only.
32
+ - **Fixed: an array item with several fields laid them out in two columns**, so the second
33
+ field sat in the column meant for the move and remove buttons and the buttons wrapped
34
+ underneath. Fields now stack and the buttons sit beside the first. The form now places an
35
+ item's children itself (`grid-column`), so a stylesheet of your own that arranged
36
+ `.schema-item` children may need a look.
37
+ - **Fixed: setting `value` with a different number of array items left the old rows.** A
38
+ longer array showed only the rows it had before, and a shorter one kept controls for items
39
+ that no longer existed. Arrays are now re-filled when their length changes.
40
+ - **Fixed: a schema `title` that is not a string** was handed to the label, or to a union's
41
+ picker option, as element properties. Only a string is a title now, for properties and for
42
+ `anyOf` / `oneOf` branches; anything else falls back to the key or the branch's value.
43
+ - Schema `title`s were already shown as written, never humanised or localized; the docs now
44
+ say so and a test holds it.
45
+
3
46
  ## 1.16.13
4
47
 
5
48
  Documentation only; no library code changed.