viewkitjs 0.0.0-stage → 0.20.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.
- package/CHANGELOG.md +102 -0
- package/LICENSE.md +7 -0
- package/MIGRATION.md +116 -0
- package/README.md +40 -2
- package/fields/CHANGELOG.md +1299 -0
- package/fields/NOTICE.md +12 -0
- package/fields/README.md +134 -0
- package/fields/dist/accept.d.ts +39 -0
- package/fields/dist/accept.js +309 -0
- package/fields/dist/actor.d.ts +16 -0
- package/fields/dist/actor.js +44 -0
- package/fields/dist/bands.d.ts +5 -0
- package/fields/dist/bands.js +12 -0
- package/fields/dist/close.d.ts +19 -0
- package/fields/dist/close.js +1 -0
- package/fields/dist/codecs.d.ts +32 -0
- package/fields/dist/codecs.js +119 -0
- package/fields/dist/conventions.d.ts +61 -0
- package/fields/dist/conventions.js +97 -0
- package/fields/dist/countries.d.ts +11 -0
- package/fields/dist/countries.js +98 -0
- package/fields/dist/creatable.d.ts +85 -0
- package/fields/dist/creatable.js +188 -0
- package/fields/dist/date-codec.d.ts +17 -0
- package/fields/dist/date-codec.js +41 -0
- package/fields/dist/definitions.d.ts +2 -0
- package/fields/dist/definitions.js +2 -0
- package/fields/dist/derived.d.ts +88 -0
- package/fields/dist/derived.js +165 -0
- package/fields/dist/design/category-colors.d.ts +17 -0
- package/fields/dist/design/category-colors.js +41 -0
- package/fields/dist/design/stage-marks.d.ts +26 -0
- package/fields/dist/design/stage-marks.js +1 -0
- package/fields/dist/design/status-slots.d.ts +34 -0
- package/fields/dist/design/status-slots.js +72 -0
- package/fields/dist/domain.d.ts +6 -0
- package/fields/dist/domain.js +34 -0
- package/fields/dist/entities.d.ts +67 -0
- package/fields/dist/entities.js +528 -0
- package/fields/dist/equality.d.ts +41 -0
- package/fields/dist/equality.js +114 -0
- package/fields/dist/errors.d.ts +3 -0
- package/fields/dist/errors.js +6 -0
- package/fields/dist/format/time.d.ts +25 -0
- package/fields/dist/format/time.js +77 -0
- package/fields/dist/formula.d.ts +54 -0
- package/fields/dist/formula.js +510 -0
- package/fields/dist/index.d.ts +35 -0
- package/fields/dist/index.js +32 -0
- package/fields/dist/kit.d.ts +23 -0
- package/fields/dist/kit.js +25 -0
- package/fields/dist/labels.d.ts +3 -0
- package/fields/dist/labels.js +5 -0
- package/fields/dist/link.d.ts +33 -0
- package/fields/dist/link.js +58 -0
- package/fields/dist/location.d.ts +26 -0
- package/fields/dist/location.js +92 -0
- package/fields/dist/markdown.d.ts +7 -0
- package/fields/dist/markdown.js +64 -0
- package/fields/dist/messages.d.ts +374 -0
- package/fields/dist/messages.js +332 -0
- package/fields/dist/name.d.ts +23 -0
- package/fields/dist/name.js +53 -0
- package/fields/dist/normalize.d.ts +6 -0
- package/fields/dist/normalize.js +17 -0
- package/fields/dist/optimistic.d.ts +37 -0
- package/fields/dist/optimistic.js +56 -0
- package/fields/dist/options.d.ts +26 -0
- package/fields/dist/options.js +31 -0
- package/fields/dist/parse-number.d.ts +55 -0
- package/fields/dist/parse-number.js +142 -0
- package/fields/dist/phone.d.ts +47 -0
- package/fields/dist/phone.js +121 -0
- package/fields/dist/places/format.d.ts +29 -0
- package/fields/dist/places/format.js +97 -0
- package/fields/dist/places/formats.d.ts +25 -0
- package/fields/dist/places/formats.js +260 -0
- package/fields/dist/places/index.d.ts +13 -0
- package/fields/dist/places/index.js +21 -0
- package/fields/dist/places/load-regions.d.ts +7 -0
- package/fields/dist/places/load-regions.js +65 -0
- package/fields/dist/places/regions/AD.d.ts +4 -0
- package/fields/dist/places/regions/AD.js +11 -0
- package/fields/dist/places/regions/AE.d.ts +4 -0
- package/fields/dist/places/regions/AE.js +11 -0
- package/fields/dist/places/regions/AM.d.ts +4 -0
- package/fields/dist/places/regions/AM.js +15 -0
- package/fields/dist/places/regions/AR.d.ts +4 -0
- package/fields/dist/places/regions/AR.js +28 -0
- package/fields/dist/places/regions/AU.d.ts +4 -0
- package/fields/dist/places/regions/AU.js +13 -0
- package/fields/dist/places/regions/BB.d.ts +4 -0
- package/fields/dist/places/regions/BB.js +15 -0
- package/fields/dist/places/regions/BR.d.ts +4 -0
- package/fields/dist/places/regions/BR.js +31 -0
- package/fields/dist/places/regions/BS.d.ts +4 -0
- package/fields/dist/places/regions/BS.js +23 -0
- package/fields/dist/places/regions/BY.d.ts +4 -0
- package/fields/dist/places/regions/BY.js +11 -0
- package/fields/dist/places/regions/CA.d.ts +4 -0
- package/fields/dist/places/regions/CA.js +17 -0
- package/fields/dist/places/regions/CL.d.ts +4 -0
- package/fields/dist/places/regions/CL.js +20 -0
- package/fields/dist/places/regions/CN.d.ts +4 -0
- package/fields/dist/places/regions/CN.js +38 -0
- package/fields/dist/places/regions/CO.d.ts +4 -0
- package/fields/dist/places/regions/CO.js +37 -0
- package/fields/dist/places/regions/CR.d.ts +4 -0
- package/fields/dist/places/regions/CR.js +11 -0
- package/fields/dist/places/regions/CU.d.ts +4 -0
- package/fields/dist/places/regions/CU.js +20 -0
- package/fields/dist/places/regions/CV.d.ts +4 -0
- package/fields/dist/places/regions/CV.js +13 -0
- package/fields/dist/places/regions/EE.d.ts +4 -0
- package/fields/dist/places/regions/EE.js +19 -0
- package/fields/dist/places/regions/EG.d.ts +4 -0
- package/fields/dist/places/regions/EG.js +31 -0
- package/fields/dist/places/regions/ES.d.ts +4 -0
- package/fields/dist/places/regions/ES.js +56 -0
- package/fields/dist/places/regions/FM.d.ts +4 -0
- package/fields/dist/places/regions/FM.js +8 -0
- package/fields/dist/places/regions/HK.d.ts +4 -0
- package/fields/dist/places/regions/HK.js +7 -0
- package/fields/dist/places/regions/HN.d.ts +4 -0
- package/fields/dist/places/regions/HN.js +22 -0
- package/fields/dist/places/regions/ID.d.ts +4 -0
- package/fields/dist/places/regions/ID.js +38 -0
- package/fields/dist/places/regions/IE.d.ts +4 -0
- package/fields/dist/places/regions/IE.js +30 -0
- package/fields/dist/places/regions/IN.d.ts +4 -0
- package/fields/dist/places/regions/IN.js +40 -0
- package/fields/dist/places/regions/IQ.d.ts +4 -0
- package/fields/dist/places/regions/IQ.js +23 -0
- package/fields/dist/places/regions/IR.d.ts +4 -0
- package/fields/dist/places/regions/IR.js +35 -0
- package/fields/dist/places/regions/IT.d.ts +4 -0
- package/fields/dist/places/regions/IT.js +115 -0
- package/fields/dist/places/regions/JM.d.ts +4 -0
- package/fields/dist/places/regions/JM.js +18 -0
- package/fields/dist/places/regions/JP.d.ts +4 -0
- package/fields/dist/places/regions/JP.js +51 -0
- package/fields/dist/places/regions/KN.d.ts +4 -0
- package/fields/dist/places/regions/KN.js +6 -0
- package/fields/dist/places/regions/KP.d.ts +4 -0
- package/fields/dist/places/regions/KP.js +17 -0
- package/fields/dist/places/regions/KR.d.ts +4 -0
- package/fields/dist/places/regions/KR.js +21 -0
- package/fields/dist/places/regions/KY.d.ts +4 -0
- package/fields/dist/places/regions/KY.js +7 -0
- package/fields/dist/places/regions/KZ.d.ts +4 -0
- package/fields/dist/places/regions/KZ.js +24 -0
- package/fields/dist/places/regions/MN.d.ts +4 -0
- package/fields/dist/places/regions/MN.js +26 -0
- package/fields/dist/places/regions/MX.d.ts +4 -0
- package/fields/dist/places/regions/MX.js +36 -0
- package/fields/dist/places/regions/MY.d.ts +4 -0
- package/fields/dist/places/regions/MY.js +20 -0
- package/fields/dist/places/regions/MZ.d.ts +4 -0
- package/fields/dist/places/regions/MZ.js +15 -0
- package/fields/dist/places/regions/NG.d.ts +4 -0
- package/fields/dist/places/regions/NG.js +41 -0
- package/fields/dist/places/regions/NI.d.ts +4 -0
- package/fields/dist/places/regions/NI.js +21 -0
- package/fields/dist/places/regions/NR.d.ts +4 -0
- package/fields/dist/places/regions/NR.js +18 -0
- package/fields/dist/places/regions/PA.d.ts +4 -0
- package/fields/dist/places/regions/PA.js +18 -0
- package/fields/dist/places/regions/PE.d.ts +4 -0
- package/fields/dist/places/regions/PE.js +30 -0
- package/fields/dist/places/regions/PG.d.ts +4 -0
- package/fields/dist/places/regions/PG.js +26 -0
- package/fields/dist/places/regions/PH.d.ts +4 -0
- package/fields/dist/places/regions/PH.js +86 -0
- package/fields/dist/places/regions/PW.d.ts +4 -0
- package/fields/dist/places/regions/PW.js +20 -0
- package/fields/dist/places/regions/RO.d.ts +4 -0
- package/fields/dist/places/regions/RO.js +46 -0
- package/fields/dist/places/regions/RU.d.ts +4 -0
- package/fields/dist/places/regions/RU.js +89 -0
- package/fields/dist/places/regions/SO.d.ts +4 -0
- package/fields/dist/places/regions/SO.js +22 -0
- package/fields/dist/places/regions/SR.d.ts +4 -0
- package/fields/dist/places/regions/SR.js +14 -0
- package/fields/dist/places/regions/SV.d.ts +4 -0
- package/fields/dist/places/regions/SV.js +18 -0
- package/fields/dist/places/regions/TH.d.ts +4 -0
- package/fields/dist/places/regions/TH.js +81 -0
- package/fields/dist/places/regions/TR.d.ts +4 -0
- package/fields/dist/places/regions/TR.js +85 -0
- package/fields/dist/places/regions/TV.d.ts +4 -0
- package/fields/dist/places/regions/TV.js +13 -0
- package/fields/dist/places/regions/TW.d.ts +4 -0
- package/fields/dist/places/regions/TW.js +26 -0
- package/fields/dist/places/regions/UA.d.ts +4 -0
- package/fields/dist/places/regions/UA.js +31 -0
- package/fields/dist/places/regions/US.d.ts +4 -0
- package/fields/dist/places/regions/US.js +66 -0
- package/fields/dist/places/regions/UY.d.ts +4 -0
- package/fields/dist/places/regions/UY.js +23 -0
- package/fields/dist/places/regions/UZ.d.ts +4 -0
- package/fields/dist/places/regions/UZ.js +18 -0
- package/fields/dist/places/regions/VE.d.ts +4 -0
- package/fields/dist/places/regions/VE.js +29 -0
- package/fields/dist/places/regions/VN.d.ts +4 -0
- package/fields/dist/places/regions/VN.js +67 -0
- package/fields/dist/query/board.d.ts +28 -0
- package/fields/dist/query/board.js +44 -0
- package/fields/dist/query/buckets.d.ts +95 -0
- package/fields/dist/query/buckets.js +453 -0
- package/fields/dist/query/change.d.ts +8 -0
- package/fields/dist/query/change.js +43 -0
- package/fields/dist/query/collate.d.ts +10 -0
- package/fields/dist/query/collate.js +22 -0
- package/fields/dist/query/column-state.d.ts +25 -0
- package/fields/dist/query/column-state.js +10 -0
- package/fields/dist/query/date.d.ts +82 -0
- package/fields/dist/query/date.js +254 -0
- package/fields/dist/query/evaluate.d.ts +69 -0
- package/fields/dist/query/evaluate.js +84 -0
- package/fields/dist/query/figure-kinds.d.ts +26 -0
- package/fields/dist/query/figure-kinds.js +27 -0
- package/fields/dist/query/figures.d.ts +69 -0
- package/fields/dist/query/figures.js +169 -0
- package/fields/dist/query/filter.d.ts +153 -0
- package/fields/dist/query/filter.js +560 -0
- package/fields/dist/query/fold.d.ts +1 -0
- package/fields/dist/query/fold.js +4 -0
- package/fields/dist/query/group.d.ts +15 -0
- package/fields/dist/query/group.js +7 -0
- package/fields/dist/query/hold.d.ts +35 -0
- package/fields/dist/query/hold.js +70 -0
- package/fields/dist/query/index.d.ts +25 -0
- package/fields/dist/query/index.js +25 -0
- package/fields/dist/query/kit.d.ts +57 -0
- package/fields/dist/query/kit.js +29 -0
- package/fields/dist/query/layer.d.ts +35 -0
- package/fields/dist/query/layer.js +51 -0
- package/fields/dist/query/link.d.ts +8 -0
- package/fields/dist/query/link.js +18 -0
- package/fields/dist/query/list-link.d.ts +65 -0
- package/fields/dist/query/list-link.js +174 -0
- package/fields/dist/query/location.d.ts +20 -0
- package/fields/dist/query/location.js +36 -0
- package/fields/dist/query/name.d.ts +6 -0
- package/fields/dist/query/name.js +23 -0
- package/fields/dist/query/number.d.ts +94 -0
- package/fields/dist/query/number.js +180 -0
- package/fields/dist/query/option-counts.d.ts +38 -0
- package/fields/dist/query/option-counts.js +89 -0
- package/fields/dist/query/range.d.ts +22 -0
- package/fields/dist/query/range.js +79 -0
- package/fields/dist/query/read-rule.d.ts +3 -0
- package/fields/dist/query/read-rule.js +13 -0
- package/fields/dist/query/search.d.ts +20 -0
- package/fields/dist/query/search.js +77 -0
- package/fields/dist/query/set-aside.d.ts +82 -0
- package/fields/dist/query/set-aside.js +172 -0
- package/fields/dist/query/settings.d.ts +81 -0
- package/fields/dist/query/settings.js +117 -0
- package/fields/dist/query/sort.d.ts +32 -0
- package/fields/dist/query/sort.js +270 -0
- package/fields/dist/query/text.d.ts +55 -0
- package/fields/dist/query/text.js +80 -0
- package/fields/dist/range.d.ts +25 -0
- package/fields/dist/range.js +63 -0
- package/fields/dist/registry.d.ts +128 -0
- package/fields/dist/registry.js +1185 -0
- package/fields/dist/relation.d.ts +84 -0
- package/fields/dist/relation.js +106 -0
- package/fields/dist/root-domain.d.ts +4 -0
- package/fields/dist/root-domain.js +12 -0
- package/fields/dist/settlement.d.ts +4 -0
- package/fields/dist/settlement.js +11 -0
- package/fields/dist/spec-changes.d.ts +20 -0
- package/fields/dist/spec-changes.js +170 -0
- package/fields/dist/testing/backend.d.ts +75 -0
- package/fields/dist/testing/backend.js +1 -0
- package/fields/dist/testing/cases.d.ts +14 -0
- package/fields/dist/testing/cases.js +327 -0
- package/fields/dist/testing/compare.d.ts +39 -0
- package/fields/dist/testing/compare.js +123 -0
- package/fields/dist/testing/index.d.ts +7 -0
- package/fields/dist/testing/index.js +5 -0
- package/fields/dist/testing/memory.d.ts +4 -0
- package/fields/dist/testing/memory.js +90 -0
- package/fields/dist/testing/now.d.ts +4 -0
- package/fields/dist/testing/now.js +2 -0
- package/fields/dist/testing/query-of.d.ts +8 -0
- package/fields/dist/testing/query-of.js +16 -0
- package/fields/dist/testing/question.d.ts +3 -0
- package/fields/dist/testing/question.js +10 -0
- package/fields/dist/testing/reader.d.ts +11 -0
- package/fields/dist/testing/reader.js +12 -0
- package/fields/dist/testing/reference.d.ts +20 -0
- package/fields/dist/testing/reference.js +58 -0
- package/fields/dist/testing/runner.d.ts +32 -0
- package/fields/dist/testing/runner.js +145 -0
- package/fields/dist/testing/samples.d.ts +5 -0
- package/fields/dist/testing/samples.js +338 -0
- package/fields/dist/testing/speed.d.ts +35 -0
- package/fields/dist/testing/speed.js +134 -0
- package/fields/dist/testing/sweep.d.ts +11 -0
- package/fields/dist/testing/sweep.js +154 -0
- package/fields/dist/testing/text-order.d.ts +8 -0
- package/fields/dist/testing/text-order.js +73 -0
- package/fields/dist/testing/worked-out.d.ts +16 -0
- package/fields/dist/testing/worked-out.js +234 -0
- package/fields/dist/types.d.ts +722 -0
- package/fields/dist/types.js +1 -0
- package/fields/dist/value-list.d.ts +56 -0
- package/fields/dist/value-list.js +75 -0
- package/fields/dist/write-result.d.ts +49 -0
- package/fields/dist/write-result.js +34 -0
- package/fields/dist/zod.d.ts +29 -0
- package/fields/dist/zod.js +419 -0
- package/fields/docs/getting-started.md +147 -0
- package/fields/docs/guides/checking-definitions.md +530 -0
- package/fields/docs/guides/contact-values.md +466 -0
- package/fields/docs/guides/conventions.md +312 -0
- package/fields/docs/guides/derived-fields.md +701 -0
- package/fields/docs/guides/field-types.md +665 -0
- package/fields/docs/guides/names-and-places.md +356 -0
- package/fields/docs/guides/narrowing-names.md +146 -0
- package/fields/docs/guides/options.md +348 -0
- package/fields/docs/guides/queries.md +1055 -0
- package/fields/docs/guides/the-index.md +415 -0
- package/fields/docs/guides/validation-and-acceptance.md +314 -0
- package/fields/docs/guides/who-may-change.md +299 -0
- package/fields/docs/index.md +47 -0
- package/fields/docs/reference/definitions.md +22 -0
- package/fields/docs/reference/design-category-colors.md +8 -0
- package/fields/docs/reference/design-stage-marks.md +4 -0
- package/fields/docs/reference/design-status-slots.md +6 -0
- package/fields/docs/reference/fields.md +275 -0
- package/fields/docs/reference/format-time.md +9 -0
- package/fields/docs/reference/phone.md +17 -0
- package/fields/docs/reference/places.md +9 -0
- package/fields/docs/reference/query.md +296 -0
- package/fields/docs/reference/root-domain.md +5 -0
- package/fields/docs/reference/testing.md +87 -0
- package/fields/docs/reference/types.md +95 -0
- package/fields/skills/viewkit/SKILL.md +377 -0
- package/package.json +268 -3
- package/postgres/CHANGELOG.md +676 -0
- package/postgres/README.md +35 -0
- package/postgres/dist/access.d.ts +139 -0
- package/postgres/dist/access.js +171 -0
- package/postgres/dist/actor.d.ts +3 -0
- package/postgres/dist/actor.js +6 -0
- package/postgres/dist/bounds.d.ts +16 -0
- package/postgres/dist/bounds.js +69 -0
- package/postgres/dist/calendar.d.ts +31 -0
- package/postgres/dist/calendar.js +65 -0
- package/postgres/dist/check.d.ts +55 -0
- package/postgres/dist/check.js +337 -0
- package/postgres/dist/counts.d.ts +44 -0
- package/postgres/dist/counts.js +97 -0
- package/postgres/dist/cursor.d.ts +26 -0
- package/postgres/dist/cursor.js +210 -0
- package/postgres/dist/date-groups.d.ts +45 -0
- package/postgres/dist/date-groups.js +176 -0
- package/postgres/dist/definitions/build.d.ts +28 -0
- package/postgres/dist/definitions/build.js +181 -0
- package/postgres/dist/definitions/float.d.ts +55 -0
- package/postgres/dist/definitions/float.js +108 -0
- package/postgres/dist/definitions/formula-forms.d.ts +29 -0
- package/postgres/dist/definitions/formula-forms.js +209 -0
- package/postgres/dist/definitions/formula.d.ts +14 -0
- package/postgres/dist/definitions/formula.js +211 -0
- package/postgres/dist/definitions/index.d.ts +3 -0
- package/postgres/dist/definitions/index.js +2 -0
- package/postgres/dist/definitions/json.d.ts +14 -0
- package/postgres/dist/definitions/json.js +68 -0
- package/postgres/dist/definitions/label.d.ts +8 -0
- package/postgres/dist/definitions/label.js +35 -0
- package/postgres/dist/definitions/lookup.d.ts +8 -0
- package/postgres/dist/definitions/lookup.js +92 -0
- package/postgres/dist/definitions/money.d.ts +29 -0
- package/postgres/dist/definitions/money.js +85 -0
- package/postgres/dist/definitions/place.d.ts +57 -0
- package/postgres/dist/definitions/place.js +46 -0
- package/postgres/dist/definitions/relations.d.ts +9 -0
- package/postgres/dist/definitions/relations.js +81 -0
- package/postgres/dist/definitions/rollup.d.ts +17 -0
- package/postgres/dist/definitions/rollup.js +348 -0
- package/postgres/dist/definitions/storage.d.ts +120 -0
- package/postgres/dist/definitions/storage.js +334 -0
- package/postgres/dist/definitions/stored.d.ts +3 -0
- package/postgres/dist/definitions/stored.js +72 -0
- package/postgres/dist/definitions/user.d.ts +7 -0
- package/postgres/dist/definitions/user.js +42 -0
- package/postgres/dist/double.d.ts +6 -0
- package/postgres/dist/double.js +10 -0
- package/postgres/dist/field-values.d.ts +16 -0
- package/postgres/dist/field-values.js +78 -0
- package/postgres/dist/figures.d.ts +37 -0
- package/postgres/dist/figures.js +90 -0
- package/postgres/dist/filled.d.ts +7 -0
- package/postgres/dist/filled.js +47 -0
- package/postgres/dist/fold.d.ts +15 -0
- package/postgres/dist/fold.js +21 -0
- package/postgres/dist/groups.d.ts +86 -0
- package/postgres/dist/groups.js +191 -0
- package/postgres/dist/ids.d.ts +8 -0
- package/postgres/dist/ids.js +16 -0
- package/postgres/dist/index.d.ts +22 -0
- package/postgres/dist/index.js +21 -0
- package/postgres/dist/kept.d.ts +36 -0
- package/postgres/dist/kept.js +47 -0
- package/postgres/dist/keyed.d.ts +48 -0
- package/postgres/dist/keyed.js +269 -0
- package/postgres/dist/lanes.d.ts +26 -0
- package/postgres/dist/lanes.js +71 -0
- package/postgres/dist/limits.d.ts +12 -0
- package/postgres/dist/limits.js +1 -0
- package/postgres/dist/map.d.ts +198 -0
- package/postgres/dist/map.js +475 -0
- package/postgres/dist/page.d.ts +116 -0
- package/postgres/dist/page.js +577 -0
- package/postgres/dist/parts.d.ts +10 -0
- package/postgres/dist/parts.js +82 -0
- package/postgres/dist/phone.d.ts +28 -0
- package/postgres/dist/phone.js +54 -0
- package/postgres/dist/predicates.d.ts +8 -0
- package/postgres/dist/predicates.js +35 -0
- package/postgres/dist/range-groups.d.ts +22 -0
- package/postgres/dist/range-groups.js +97 -0
- package/postgres/dist/readable.d.ts +40 -0
- package/postgres/dist/readable.js +84 -0
- package/postgres/dist/records.d.ts +24 -0
- package/postgres/dist/records.js +186 -0
- package/postgres/dist/refusals.d.ts +45 -0
- package/postgres/dist/refusals.js +53 -0
- package/postgres/dist/relations.d.ts +23 -0
- package/postgres/dist/relations.js +72 -0
- package/postgres/dist/rules.d.ts +60 -0
- package/postgres/dist/rules.js +218 -0
- package/postgres/dist/search-indexes.d.ts +62 -0
- package/postgres/dist/search-indexes.js +190 -0
- package/postgres/dist/search.d.ts +56 -0
- package/postgres/dist/search.js +154 -0
- package/postgres/dist/several.d.ts +49 -0
- package/postgres/dist/several.js +174 -0
- package/postgres/dist/sort.d.ts +106 -0
- package/postgres/dist/sort.js +373 -0
- package/postgres/dist/sql.d.ts +60 -0
- package/postgres/dist/sql.js +247 -0
- package/postgres/dist/statement.d.ts +4 -0
- package/postgres/dist/statement.js +7 -0
- package/postgres/dist/steps.d.ts +18 -0
- package/postgres/dist/steps.js +18 -0
- package/postgres/dist/users.d.ts +35 -0
- package/postgres/dist/users.js +33 -0
- package/postgres/dist/value-rows.d.ts +23 -0
- package/postgres/dist/value-rows.js +64 -0
- package/postgres/dist/values.d.ts +56 -0
- package/postgres/dist/values.js +162 -0
- package/postgres/dist/view-counts.d.ts +14 -0
- package/postgres/dist/view-counts.js +50 -0
- package/postgres/dist/walker.d.ts +12 -0
- package/postgres/dist/walker.js +18 -0
- package/postgres/docs/guides/definitions.md +221 -0
- package/postgres/docs/guides/field-map.md +730 -0
- package/postgres/docs/guides/test-kit.md +112 -0
- package/postgres/docs/index.md +11 -0
- package/postgres/docs/reference/definitions.md +41 -0
- package/postgres/docs/reference/postgres.md +114 -0
- package/views/CHANGELOG.md +3582 -0
- package/views/README.md +105 -0
- package/views/dist/atoms/Avatar.d.ts +2 -0
- package/views/dist/atoms/Avatar.js +13 -0
- package/views/dist/atoms/CellMore.d.ts +2 -0
- package/views/dist/atoms/CellMore.js +4 -0
- package/views/dist/atoms/CommandMenu.d.ts +2 -0
- package/views/dist/atoms/CommandMenu.js +24 -0
- package/views/dist/atoms/DisabledReason.d.ts +13 -0
- package/views/dist/atoms/DisabledReason.js +27 -0
- package/views/dist/atoms/DrillRows.d.ts +3 -0
- package/views/dist/atoms/DrillRows.js +27 -0
- package/views/dist/atoms/List.d.ts +2 -0
- package/views/dist/atoms/List.js +6 -0
- package/views/dist/atoms/LoadMore.d.ts +2 -0
- package/views/dist/atoms/LoadMore.js +35 -0
- package/views/dist/atoms/Loading.d.ts +8 -0
- package/views/dist/atoms/Loading.js +10 -0
- package/views/dist/atoms/PanelRows.d.ts +5 -0
- package/views/dist/atoms/PanelRows.js +38 -0
- package/views/dist/atoms/PanelSearch.d.ts +2 -0
- package/views/dist/atoms/PanelSearch.js +23 -0
- package/views/dist/atoms/Pill.d.ts +2 -0
- package/views/dist/atoms/Pill.js +25 -0
- package/views/dist/atoms/PlatformMark.d.ts +2 -0
- package/views/dist/atoms/PlatformMark.js +4 -0
- package/views/dist/atoms/RangeCalendar.d.ts +8 -0
- package/views/dist/atoms/RangeCalendar.js +30 -0
- package/views/dist/atoms/RelationLink.d.ts +2 -0
- package/views/dist/atoms/RelationLink.js +6 -0
- package/views/dist/atoms/RelationRoles.d.ts +2 -0
- package/views/dist/atoms/RelationRoles.js +6 -0
- package/views/dist/atoms/Row.d.ts +3 -0
- package/views/dist/atoms/Row.js +31 -0
- package/views/dist/atoms/RowMenu.d.ts +2 -0
- package/views/dist/atoms/RowMenu.js +116 -0
- package/views/dist/atoms/SelectionSheet.d.ts +3 -0
- package/views/dist/atoms/SelectionSheet.js +31 -0
- package/views/dist/atoms/StatusBadge.d.ts +2 -0
- package/views/dist/atoms/StatusBadge.js +7 -0
- package/views/dist/atoms/StatusMarker.d.ts +2 -0
- package/views/dist/atoms/StatusMarker.js +21 -0
- package/views/dist/atoms/Tag.d.ts +2 -0
- package/views/dist/atoms/Tag.js +14 -0
- package/views/dist/atoms/TickBox.d.ts +2 -0
- package/views/dist/atoms/TickBox.js +8 -0
- package/views/dist/atoms/ToolbarButton.d.ts +2 -0
- package/views/dist/atoms/ToolbarButton.js +50 -0
- package/views/dist/atoms/defaults.d.ts +2 -0
- package/views/dist/atoms/defaults.js +51 -0
- package/views/dist/atoms/tones.d.ts +5 -0
- package/views/dist/atoms/tones.js +28 -0
- package/views/dist/atoms/types.d.ts +496 -0
- package/views/dist/atoms/types.js +3 -0
- package/views/dist/cells/cell-format.d.ts +147 -0
- package/views/dist/cells/cell-format.js +16 -0
- package/views/dist/cells/cell-title.d.ts +20 -0
- package/views/dist/cells/cell-title.js +8 -0
- package/views/dist/cells/cell-values.d.ts +28 -0
- package/views/dist/cells/cell-values.js +107 -0
- package/views/dist/cells/index.d.ts +4 -0
- package/views/dist/cells/index.js +4 -0
- package/views/dist/cells/legacy-field.d.ts +52 -0
- package/views/dist/cells/legacy-field.js +164 -0
- package/views/dist/cells/relation-wrap.d.ts +3 -0
- package/views/dist/cells/relation-wrap.js +26 -0
- package/views/dist/cells/use-cell-format.d.ts +5 -0
- package/views/dist/cells/use-cell-format.js +10 -0
- package/views/dist/contract.d.ts +1337 -0
- package/views/dist/contract.js +1824 -0
- package/views/dist/display/actor.d.ts +4 -0
- package/views/dist/display/actor.js +26 -0
- package/views/dist/display/boolean.d.ts +18 -0
- package/views/dist/display/boolean.js +50 -0
- package/views/dist/display/breakdown.d.ts +15 -0
- package/views/dist/display/breakdown.js +32 -0
- package/views/dist/display/converted.d.ts +19 -0
- package/views/dist/display/converted.js +12 -0
- package/views/dist/display/currency.d.ts +9 -0
- package/views/dist/display/currency.js +29 -0
- package/views/dist/display/date.d.ts +12 -0
- package/views/dist/display/date.js +28 -0
- package/views/dist/display/display-cores.d.ts +31 -0
- package/views/dist/display/display-cores.js +57 -0
- package/views/dist/display/entity-chip.d.ts +29 -0
- package/views/dist/display/entity-chip.js +8 -0
- package/views/dist/display/fit-values.d.ts +34 -0
- package/views/dist/display/fit-values.js +45 -0
- package/views/dist/display/format.d.ts +66 -0
- package/views/dist/display/format.js +206 -0
- package/views/dist/display/index.d.ts +9 -0
- package/views/dist/display/index.js +8 -0
- package/views/dist/display/link-click.d.ts +11 -0
- package/views/dist/display/link-click.js +3 -0
- package/views/dist/display/link.d.ts +29 -0
- package/views/dist/display/link.js +56 -0
- package/views/dist/display/location.d.ts +8 -0
- package/views/dist/display/location.js +22 -0
- package/views/dist/display/multi-value.d.ts +18 -0
- package/views/dist/display/multi-value.js +93 -0
- package/views/dist/display/name.d.ts +6 -0
- package/views/dist/display/name.js +14 -0
- package/views/dist/display/number.d.ts +11 -0
- package/views/dist/display/number.js +27 -0
- package/views/dist/display/options.d.ts +167 -0
- package/views/dist/display/options.js +1 -0
- package/views/dist/display/percent.d.ts +4 -0
- package/views/dist/display/percent.js +41 -0
- package/views/dist/display/phone.d.ts +11 -0
- package/views/dist/display/phone.js +49 -0
- package/views/dist/display/range.d.ts +6 -0
- package/views/dist/display/range.js +19 -0
- package/views/dist/display/relation.d.ts +4 -0
- package/views/dist/display/relation.js +44 -0
- package/views/dist/display/rich-text.d.ts +10 -0
- package/views/dist/display/rich-text.js +46 -0
- package/views/dist/display/select.d.ts +6 -0
- package/views/dist/display/select.js +40 -0
- package/views/dist/display/status-steps.d.ts +8 -0
- package/views/dist/display/status-steps.js +18 -0
- package/views/dist/display/text-class.d.ts +23 -0
- package/views/dist/display/text-class.js +5 -0
- package/views/dist/display/text.d.ts +19 -0
- package/views/dist/display/text.js +8 -0
- package/views/dist/display/use-display-options.d.ts +2 -0
- package/views/dist/display/use-display-options.js +14 -0
- package/views/dist/display/user.d.ts +11 -0
- package/views/dist/display/user.js +10 -0
- package/views/dist/display/value-list.d.ts +10 -0
- package/views/dist/display/value-list.js +12 -0
- package/views/dist/display/viewer.d.ts +4 -0
- package/views/dist/display/viewer.js +12 -0
- package/views/dist/display/web-href.d.ts +16 -0
- package/views/dist/display/web-href.js +19 -0
- package/views/dist/editors/BodyFrame.d.ts +30 -0
- package/views/dist/editors/BodyFrame.js +86 -0
- package/views/dist/editors/ChipsEditor.d.ts +76 -0
- package/views/dist/editors/ChipsEditor.js +118 -0
- package/views/dist/editors/DateEditor.d.ts +42 -0
- package/views/dist/editors/DateEditor.js +298 -0
- package/views/dist/editors/EditorPanel.d.ts +71 -0
- package/views/dist/editors/EditorPanel.js +158 -0
- package/views/dist/editors/LocationEditor.d.ts +33 -0
- package/views/dist/editors/LocationEditor.js +320 -0
- package/views/dist/editors/NameEditor.d.ts +29 -0
- package/views/dist/editors/NameEditor.js +119 -0
- package/views/dist/editors/NumberEditor.d.ts +90 -0
- package/views/dist/editors/NumberEditor.js +126 -0
- package/views/dist/editors/RangeEditor.d.ts +51 -0
- package/views/dist/editors/RangeEditor.js +125 -0
- package/views/dist/editors/RelationEditor.d.ts +52 -0
- package/views/dist/editors/RelationEditor.js +55 -0
- package/views/dist/editors/RelationSetEditor.d.ts +63 -0
- package/views/dist/editors/RelationSetEditor.js +222 -0
- package/views/dist/editors/SelectEditor.d.ts +104 -0
- package/views/dist/editors/SelectEditor.js +154 -0
- package/views/dist/editors/TextEditor.d.ts +61 -0
- package/views/dist/editors/TextEditor.js +102 -0
- package/views/dist/editors/ValueListEditor.d.ts +51 -0
- package/views/dist/editors/ValueListEditor.js +239 -0
- package/views/dist/editors/body-panel.d.ts +11 -0
- package/views/dist/editors/body-panel.js +11 -0
- package/views/dist/editors/body-step.d.ts +12 -0
- package/views/dist/editors/body-step.js +6 -0
- package/views/dist/editors/edit-cores.d.ts +86 -0
- package/views/dist/editors/edit-cores.js +39 -0
- package/views/dist/editors/edit-session.d.ts +113 -0
- package/views/dist/editors/edit-session.js +97 -0
- package/views/dist/editors/escape-rule.d.ts +34 -0
- package/views/dist/editors/escape-rule.js +15 -0
- package/views/dist/editors/inner-escape.d.ts +12 -0
- package/views/dist/editors/inner-escape.js +10 -0
- package/views/dist/editors/keep-inside.d.ts +12 -0
- package/views/dist/editors/keep-inside.js +20 -0
- package/views/dist/editors/leave-scope.d.ts +31 -0
- package/views/dist/editors/leave-scope.js +29 -0
- package/views/dist/editors/link-roles.d.ts +9 -0
- package/views/dist/editors/link-roles.js +19 -0
- package/views/dist/editors/number-body.d.ts +30 -0
- package/views/dist/editors/number-body.js +38 -0
- package/views/dist/editors/number-step.d.ts +39 -0
- package/views/dist/editors/number-step.js +47 -0
- package/views/dist/editors/open-value.d.ts +22 -0
- package/views/dist/editors/open-value.js +37 -0
- package/views/dist/editors/open-values.d.ts +32 -0
- package/views/dist/editors/open-values.js +33 -0
- package/views/dist/editors/option-add-flow.d.ts +66 -0
- package/views/dist/editors/option-add-flow.js +155 -0
- package/views/dist/editors/parts-body.d.ts +68 -0
- package/views/dist/editors/parts-body.js +117 -0
- package/views/dist/editors/picker-slot.d.ts +25 -0
- package/views/dist/editors/picker-slot.js +37 -0
- package/views/dist/editors/relation-kinds.d.ts +7 -0
- package/views/dist/editors/relation-kinds.js +21 -0
- package/views/dist/editors/relation-links-body.d.ts +36 -0
- package/views/dist/editors/relation-links-body.js +22 -0
- package/views/dist/editors/relation-panel.d.ts +69 -0
- package/views/dist/editors/relation-panel.js +40 -0
- package/views/dist/editors/relation-picker.d.ts +63 -0
- package/views/dist/editors/relation-picker.js +58 -0
- package/views/dist/editors/relation-source.d.ts +67 -0
- package/views/dist/editors/relation-source.js +108 -0
- package/views/dist/editors/tab-ends.d.ts +7 -0
- package/views/dist/editors/tab-ends.js +10 -0
- package/views/dist/editors/text-body.d.ts +16 -0
- package/views/dist/editors/text-body.js +30 -0
- package/views/dist/editors/values-body.d.ts +47 -0
- package/views/dist/editors/values-body.js +140 -0
- package/views/dist/field-row/FieldNoteLine.d.ts +14 -0
- package/views/dist/field-row/FieldNoteLine.js +15 -0
- package/views/dist/field-row/FieldRow.d.ts +81 -0
- package/views/dist/field-row/FieldRow.js +232 -0
- package/views/dist/field-row/FieldRowLane.d.ts +19 -0
- package/views/dist/field-row/FieldRowLane.js +21 -0
- package/views/dist/field-row/drawn-text.d.ts +7 -0
- package/views/dist/field-row/drawn-text.js +27 -0
- package/views/dist/field-row/editors/RowChipsEditor.d.ts +11 -0
- package/views/dist/field-row/editors/RowChipsEditor.js +27 -0
- package/views/dist/field-row/editors/RowDateEditor.d.ts +16 -0
- package/views/dist/field-row/editors/RowDateEditor.js +18 -0
- package/views/dist/field-row/editors/RowEditor.d.ts +39 -0
- package/views/dist/field-row/editors/RowEditor.js +66 -0
- package/views/dist/field-row/editors/RowNameEditor.d.ts +7 -0
- package/views/dist/field-row/editors/RowNameEditor.js +23 -0
- package/views/dist/field-row/editors/RowNumberEditor.d.ts +12 -0
- package/views/dist/field-row/editors/RowNumberEditor.js +34 -0
- package/views/dist/field-row/editors/RowPlaceEditor.d.ts +9 -0
- package/views/dist/field-row/editors/RowPlaceEditor.js +20 -0
- package/views/dist/field-row/editors/RowRangeEditor.d.ts +7 -0
- package/views/dist/field-row/editors/RowRangeEditor.js +25 -0
- package/views/dist/field-row/editors/RowRelationEditor.d.ts +20 -0
- package/views/dist/field-row/editors/RowRelationEditor.js +80 -0
- package/views/dist/field-row/editors/RowSelectEditor.d.ts +13 -0
- package/views/dist/field-row/editors/RowSelectEditor.js +26 -0
- package/views/dist/field-row/editors/RowTextEditor.d.ts +15 -0
- package/views/dist/field-row/editors/RowTextEditor.js +25 -0
- package/views/dist/field-row/editors/RowValueListEditor.d.ts +6 -0
- package/views/dist/field-row/editors/RowValueListEditor.js +34 -0
- package/views/dist/field-row/editors/host.d.ts +65 -0
- package/views/dist/field-row/editors/host.js +1 -0
- package/views/dist/field-row/editors/row-frame.d.ts +2 -0
- package/views/dist/field-row/editors/row-frame.js +1 -0
- package/views/dist/field-row/editors/row-session.d.ts +63 -0
- package/views/dist/field-row/editors/row-session.js +102 -0
- package/views/dist/field-row/field-row-button.d.ts +40 -0
- package/views/dist/field-row/field-row-button.js +18 -0
- package/views/dist/field-row/field-row-checkbox.d.ts +9 -0
- package/views/dist/field-row/field-row-checkbox.js +7 -0
- package/views/dist/field-row/index.d.ts +5 -0
- package/views/dist/field-row/index.js +5 -0
- package/views/dist/field-row/row-target.d.ts +20 -0
- package/views/dist/field-row/row-target.js +3 -0
- package/views/dist/field-row/useFieldWrite.d.ts +45 -0
- package/views/dist/field-row/useFieldWrite.js +233 -0
- package/views/dist/field-row/useRowSettlement.d.ts +33 -0
- package/views/dist/field-row/useRowSettlement.js +23 -0
- package/views/dist/fields/binding.d.ts +96 -0
- package/views/dist/fields/binding.js +128 -0
- package/views/dist/fields/currency.d.ts +82 -0
- package/views/dist/fields/currency.js +41 -0
- package/views/dist/fields/denomination.d.ts +42 -0
- package/views/dist/fields/denomination.js +11 -0
- package/views/dist/fields/edit-core-types.d.ts +40 -0
- package/views/dist/fields/edit-core-types.js +29 -0
- package/views/dist/fields/format-knobs.d.ts +34 -0
- package/views/dist/fields/format-knobs.js +36 -0
- package/views/dist/fields/menus.d.ts +30 -0
- package/views/dist/fields/menus.js +1 -0
- package/views/dist/fields/money.d.ts +65 -0
- package/views/dist/fields/money.js +88 -0
- package/views/dist/fields/number-edit.d.ts +17 -0
- package/views/dist/fields/number-edit.js +21 -0
- package/views/dist/fields/option-add.d.ts +25 -0
- package/views/dist/fields/option-add.js +9 -0
- package/views/dist/fields/prepare-write.d.ts +55 -0
- package/views/dist/fields/prepare-write.js +72 -0
- package/views/dist/fields/range-unit.d.ts +7 -0
- package/views/dist/fields/range-unit.js +13 -0
- package/views/dist/fields/relation-source-types.d.ts +66 -0
- package/views/dist/fields/relation-source-types.js +1 -0
- package/views/dist/fields/write-target.d.ts +56 -0
- package/views/dist/fields/write-target.js +10 -0
- package/views/dist/figures.d.ts +9 -0
- package/views/dist/figures.js +1 -0
- package/views/dist/filters/date-filter.d.ts +2 -0
- package/views/dist/filters/date-filter.js +1 -0
- package/views/dist/filters/filter-model.d.ts +181 -0
- package/views/dist/filters/filter-model.js +41 -0
- package/views/dist/filters/filter-tree.d.ts +146 -0
- package/views/dist/filters/filter-tree.js +256 -0
- package/views/dist/filters/number-filter.d.ts +2 -0
- package/views/dist/filters/number-filter.js +1 -0
- package/views/dist/filters/range-filter.d.ts +2 -0
- package/views/dist/filters/range-filter.js +1 -0
- package/views/dist/filters/registry.d.ts +103 -0
- package/views/dist/filters/registry.js +8 -0
- package/views/dist/filters/relation-filter.d.ts +16 -0
- package/views/dist/filters/relation-filter.js +63 -0
- package/views/dist/filters/text-filter.d.ts +2 -0
- package/views/dist/filters/text-filter.js +1 -0
- package/views/dist/grid/chrome/GridAddColumn.d.ts +23 -0
- package/views/dist/grid/chrome/GridAddColumn.js +106 -0
- package/views/dist/grid/chrome/GridAggregateMenu.d.ts +36 -0
- package/views/dist/grid/chrome/GridAggregateMenu.js +60 -0
- package/views/dist/grid/chrome/GridCellEditors.d.ts +81 -0
- package/views/dist/grid/chrome/GridCellEditors.js +156 -0
- package/views/dist/grid/chrome/GridCellOutline.d.ts +53 -0
- package/views/dist/grid/chrome/GridCellOutline.js +36 -0
- package/views/dist/grid/chrome/GridChipsEditor.d.ts +40 -0
- package/views/dist/grid/chrome/GridChipsEditor.js +39 -0
- package/views/dist/grid/chrome/GridColumnColorSection.d.ts +13 -0
- package/views/dist/grid/chrome/GridColumnColorSection.js +40 -0
- package/views/dist/grid/chrome/GridColumnDateSection.d.ts +27 -0
- package/views/dist/grid/chrome/GridColumnDateSection.js +23 -0
- package/views/dist/grid/chrome/GridColumnDurationSection.d.ts +23 -0
- package/views/dist/grid/chrome/GridColumnDurationSection.js +24 -0
- package/views/dist/grid/chrome/GridColumnMenu.d.ts +113 -0
- package/views/dist/grid/chrome/GridColumnMenu.js +149 -0
- package/views/dist/grid/chrome/GridColumnNumberSection.d.ts +29 -0
- package/views/dist/grid/chrome/GridColumnNumberSection.js +27 -0
- package/views/dist/grid/chrome/GridColumnPercentSection.d.ts +16 -0
- package/views/dist/grid/chrome/GridColumnPercentSection.js +16 -0
- package/views/dist/grid/chrome/GridColumnSortSection.d.ts +38 -0
- package/views/dist/grid/chrome/GridColumnSortSection.js +33 -0
- package/views/dist/grid/chrome/GridDateEditor.d.ts +41 -0
- package/views/dist/grid/chrome/GridDateEditor.js +26 -0
- package/views/dist/grid/chrome/GridFlyout.d.ts +44 -0
- package/views/dist/grid/chrome/GridFlyout.js +80 -0
- package/views/dist/grid/chrome/GridFooter.d.ts +40 -0
- package/views/dist/grid/chrome/GridFooter.js +55 -0
- package/views/dist/grid/chrome/GridGroupMenu.d.ts +47 -0
- package/views/dist/grid/chrome/GridGroupMenu.js +101 -0
- package/views/dist/grid/chrome/GridHeader.d.ts +83 -0
- package/views/dist/grid/chrome/GridHeader.js +58 -0
- package/views/dist/grid/chrome/GridLongTextEditor.d.ts +55 -0
- package/views/dist/grid/chrome/GridLongTextEditor.js +73 -0
- package/views/dist/grid/chrome/GridMenuRow.d.ts +15 -0
- package/views/dist/grid/chrome/GridMenuRow.js +15 -0
- package/views/dist/grid/chrome/GridNameEditor.d.ts +24 -0
- package/views/dist/grid/chrome/GridNameEditor.js +25 -0
- package/views/dist/grid/chrome/GridNumberEditor.d.ts +56 -0
- package/views/dist/grid/chrome/GridNumberEditor.js +42 -0
- package/views/dist/grid/chrome/GridPager.d.ts +7 -0
- package/views/dist/grid/chrome/GridPager.js +34 -0
- package/views/dist/grid/chrome/GridPlaceEditor.d.ts +29 -0
- package/views/dist/grid/chrome/GridPlaceEditor.js +26 -0
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +35 -0
- package/views/dist/grid/chrome/GridRangeEditor.js +32 -0
- package/views/dist/grid/chrome/GridRelationEditor.d.ts +47 -0
- package/views/dist/grid/chrome/GridRelationEditor.js +99 -0
- package/views/dist/grid/chrome/GridResizeHandle.d.ts +19 -0
- package/views/dist/grid/chrome/GridResizeHandle.js +19 -0
- package/views/dist/grid/chrome/GridRow.d.ts +32 -0
- package/views/dist/grid/chrome/GridRow.js +171 -0
- package/views/dist/grid/chrome/GridRowActions.d.ts +37 -0
- package/views/dist/grid/chrome/GridRowActions.js +36 -0
- package/views/dist/grid/chrome/GridRowCells.d.ts +4 -0
- package/views/dist/grid/chrome/GridRowCells.js +157 -0
- package/views/dist/grid/chrome/GridRowGlyph.d.ts +14 -0
- package/views/dist/grid/chrome/GridRowGlyph.js +18 -0
- package/views/dist/grid/chrome/GridSelectEditor.d.ts +35 -0
- package/views/dist/grid/chrome/GridSelectEditor.js +58 -0
- package/views/dist/grid/chrome/GridStructure.d.ts +64 -0
- package/views/dist/grid/chrome/GridStructure.js +87 -0
- package/views/dist/grid/chrome/GridTable.d.ts +4 -0
- package/views/dist/grid/chrome/GridTable.js +394 -0
- package/views/dist/grid/chrome/GridTableSurface.d.ts +80 -0
- package/views/dist/grid/chrome/GridTableSurface.js +39 -0
- package/views/dist/grid/chrome/GridTextEditor.d.ts +49 -0
- package/views/dist/grid/chrome/GridTextEditor.js +51 -0
- package/views/dist/grid/chrome/GridValueListEditor.d.ts +38 -0
- package/views/dist/grid/chrome/GridValueListEditor.js +29 -0
- package/views/dist/grid/chrome/StuckMarker.d.ts +26 -0
- package/views/dist/grid/chrome/StuckMarker.js +44 -0
- package/views/dist/grid/chrome/cell-clipboard.d.ts +10 -0
- package/views/dist/grid/chrome/cell-clipboard.js +28 -0
- package/views/dist/grid/chrome/cell-cut-off.d.ts +11 -0
- package/views/dist/grid/chrome/cell-cut-off.js +20 -0
- package/views/dist/grid/chrome/cells.d.ts +23 -0
- package/views/dist/grid/chrome/cells.js +19 -0
- package/views/dist/grid/chrome/checks.d.ts +56 -0
- package/views/dist/grid/chrome/checks.js +48 -0
- package/views/dist/grid/chrome/column-glyph.d.ts +16 -0
- package/views/dist/grid/chrome/column-glyph.js +52 -0
- package/views/dist/grid/chrome/editors.d.ts +9 -0
- package/views/dist/grid/chrome/editors.js +10 -0
- package/views/dist/grid/chrome/grid-add-column-items.d.ts +13 -0
- package/views/dist/grid/chrome/grid-add-column-items.js +47 -0
- package/views/dist/grid/chrome/grid-body-place.d.ts +4 -0
- package/views/dist/grid/chrome/grid-body-place.js +15 -0
- package/views/dist/grid/chrome/grid-button.d.ts +32 -0
- package/views/dist/grid/chrome/grid-button.js +12 -0
- package/views/dist/grid/chrome/grid-cell-classes.d.ts +96 -0
- package/views/dist/grid/chrome/grid-cell-classes.js +70 -0
- package/views/dist/grid/chrome/grid-cell-link.d.ts +13 -0
- package/views/dist/grid/chrome/grid-cell-link.js +9 -0
- package/views/dist/grid/chrome/grid-column-menu-items.d.ts +78 -0
- package/views/dist/grid/chrome/grid-column-menu-items.js +292 -0
- package/views/dist/grid/chrome/grid-columns-template.d.ts +45 -0
- package/views/dist/grid/chrome/grid-columns-template.js +18 -0
- package/views/dist/grid/chrome/grid-edit-escape.d.ts +4 -0
- package/views/dist/grid/chrome/grid-edit-escape.js +12 -0
- package/views/dist/grid/chrome/grid-edit-session.d.ts +67 -0
- package/views/dist/grid/chrome/grid-edit-session.js +141 -0
- package/views/dist/grid/chrome/grid-editor-layer.d.ts +7 -0
- package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
- package/views/dist/grid/chrome/grid-figure-value.d.ts +25 -0
- package/views/dist/grid/chrome/grid-figure-value.js +40 -0
- package/views/dist/grid/chrome/grid-fitted-box.d.ts +15 -0
- package/views/dist/grid/chrome/grid-fitted-box.js +26 -0
- package/views/dist/grid/chrome/grid-group-menu-items.d.ts +38 -0
- package/views/dist/grid/chrome/grid-group-menu-items.js +92 -0
- package/views/dist/grid/chrome/grid-group-menu-parts.d.ts +31 -0
- package/views/dist/grid/chrome/grid-group-menu-parts.js +21 -0
- package/views/dist/grid/chrome/grid-hover.d.ts +74 -0
- package/views/dist/grid/chrome/grid-hover.js +150 -0
- package/views/dist/grid/chrome/grid-lab.d.ts +7 -0
- package/views/dist/grid/chrome/grid-lab.js +7 -0
- package/views/dist/grid/chrome/grid-menu-focus.d.ts +65 -0
- package/views/dist/grid/chrome/grid-menu-focus.js +160 -0
- package/views/dist/grid/chrome/grid-menu-search.d.ts +7 -0
- package/views/dist/grid/chrome/grid-menu-search.js +7 -0
- package/views/dist/grid/chrome/grid-pages.d.ts +15 -0
- package/views/dist/grid/chrome/grid-pages.js +9 -0
- package/views/dist/grid/chrome/grid-row-menu-items.d.ts +49 -0
- package/views/dist/grid/chrome/grid-row-menu-items.js +159 -0
- package/views/dist/grid/chrome/grid-row-menu-key.d.ts +15 -0
- package/views/dist/grid/chrome/grid-row-menu-key.js +36 -0
- package/views/dist/grid/chrome/grid-row-props.d.ts +155 -0
- package/views/dist/grid/chrome/grid-row-props.js +1 -0
- package/views/dist/grid/chrome/grid-row-window.d.ts +78 -0
- package/views/dist/grid/chrome/grid-row-window.js +280 -0
- package/views/dist/grid/chrome/grid-rows-menu.d.ts +42 -0
- package/views/dist/grid/chrome/grid-rows-menu.js +85 -0
- package/views/dist/grid/chrome/grid-scroll-owner.d.ts +38 -0
- package/views/dist/grid/chrome/grid-scroll-owner.js +75 -0
- package/views/dist/grid/chrome/grid-styles.d.ts +50 -0
- package/views/dist/grid/chrome/grid-styles.js +11 -0
- package/views/dist/grid/chrome/grid-table-props.d.ts +310 -0
- package/views/dist/grid/chrome/grid-table-props.js +1 -0
- package/views/dist/grid/chrome/grid-wait.d.ts +22 -0
- package/views/dist/grid/chrome/grid-wait.js +4 -0
- package/views/dist/grid/chrome/useBarRoom.d.ts +19 -0
- package/views/dist/grid/chrome/useBarRoom.js +96 -0
- package/views/dist/grid/chrome/useGridBandFigures.d.ts +26 -0
- package/views/dist/grid/chrome/useGridBandFigures.js +50 -0
- package/views/dist/grid/chrome/useGridBatchApi.d.ts +34 -0
- package/views/dist/grid/chrome/useGridBatchApi.js +36 -0
- package/views/dist/grid/chrome/useGridBoxes.d.ts +22 -0
- package/views/dist/grid/chrome/useGridBoxes.js +22 -0
- package/views/dist/grid/chrome/useGridCellPick.d.ts +30 -0
- package/views/dist/grid/chrome/useGridCellPick.js +77 -0
- package/views/dist/grid/chrome/useGridColumnLayout.d.ts +32 -0
- package/views/dist/grid/chrome/useGridColumnLayout.js +251 -0
- package/views/dist/grid/chrome/useGridFocus.d.ts +48 -0
- package/views/dist/grid/chrome/useGridFocus.js +129 -0
- package/views/dist/grid/chrome/useGridHeaderDrag.d.ts +20 -0
- package/views/dist/grid/chrome/useGridHeaderDrag.js +37 -0
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +65 -0
- package/views/dist/grid/chrome/useGridKeyboard.js +463 -0
- package/views/dist/grid/chrome/useGridLongPress.d.ts +30 -0
- package/views/dist/grid/chrome/useGridLongPress.js +98 -0
- package/views/dist/grid/chrome/useGridPartColumns.d.ts +5 -0
- package/views/dist/grid/chrome/useGridPartColumns.js +9 -0
- package/views/dist/grid/chrome/useGridPendingReconciliation.d.ts +12 -0
- package/views/dist/grid/chrome/useGridPendingReconciliation.js +32 -0
- package/views/dist/grid/chrome/useGridRailReveal.d.ts +57 -0
- package/views/dist/grid/chrome/useGridRailReveal.js +67 -0
- package/views/dist/grid/chrome/useGridRangeActions.d.ts +51 -0
- package/views/dist/grid/chrome/useGridRangeActions.js +199 -0
- package/views/dist/grid/chrome/useGridRangeGestures.d.ts +33 -0
- package/views/dist/grid/chrome/useGridRangeGestures.js +241 -0
- package/views/dist/grid/chrome/useGridRecorder.d.ts +16 -0
- package/views/dist/grid/chrome/useGridRecorder.js +144 -0
- package/views/dist/grid/chrome/useGridRowOpener.d.ts +41 -0
- package/views/dist/grid/chrome/useGridRowOpener.js +83 -0
- package/views/dist/grid/chrome/useGridScaleStyles.d.ts +3 -0
- package/views/dist/grid/chrome/useGridScaleStyles.js +28 -0
- package/views/dist/grid/chrome/useGridScrollArea.d.ts +47 -0
- package/views/dist/grid/chrome/useGridScrollArea.js +120 -0
- package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +81 -0
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +336 -0
- package/views/dist/grid/chrome/useGridTableSelection.d.ts +31 -0
- package/views/dist/grid/chrome/useGridTableSelection.js +55 -0
- package/views/dist/grid/chrome/useHeaderDragReorder.d.ts +21 -0
- package/views/dist/grid/chrome/useHeaderDragReorder.js +218 -0
- package/views/dist/grid/core/clipboard-model.d.ts +123 -0
- package/views/dist/grid/core/clipboard-model.js +388 -0
- package/views/dist/grid/core/column-values.d.ts +27 -0
- package/views/dist/grid/core/column-values.js +76 -0
- package/views/dist/grid/core/commit-model.d.ts +48 -0
- package/views/dist/grid/core/commit-model.js +3 -0
- package/views/dist/grid/core/coordinates.d.ts +48 -0
- package/views/dist/grid/core/coordinates.js +27 -0
- package/views/dist/grid/core/edge-scroll.d.ts +21 -0
- package/views/dist/grid/core/edge-scroll.js +23 -0
- package/views/dist/grid/core/edit-values.d.ts +9 -0
- package/views/dist/grid/core/edit-values.js +1 -0
- package/views/dist/grid/core/editing-controller.d.ts +146 -0
- package/views/dist/grid/core/editing-controller.js +563 -0
- package/views/dist/grid/core/editing-model.d.ts +113 -0
- package/views/dist/grid/core/editing-model.js +168 -0
- package/views/dist/grid/core/flat-rows.d.ts +35 -0
- package/views/dist/grid/core/flat-rows.js +20 -0
- package/views/dist/grid/core/grid-aria.d.ts +31 -0
- package/views/dist/grid/core/grid-aria.js +41 -0
- package/views/dist/grid/core/grid-focus.d.ts +60 -0
- package/views/dist/grid/core/grid-focus.js +171 -0
- package/views/dist/grid/core/grid-recorder.d.ts +111 -0
- package/views/dist/grid/core/grid-recorder.js +223 -0
- package/views/dist/grid/core/grid-scale.d.ts +14 -0
- package/views/dist/grid/core/grid-scale.js +8 -0
- package/views/dist/grid/core/nav.d.ts +94 -0
- package/views/dist/grid/core/nav.js +92 -0
- package/views/dist/grid/core/part-edits.d.ts +18 -0
- package/views/dist/grid/core/part-edits.js +48 -0
- package/views/dist/grid/core/pending-reconciliation.d.ts +53 -0
- package/views/dist/grid/core/pending-reconciliation.js +60 -0
- package/views/dist/grid/core/range-model.d.ts +25 -0
- package/views/dist/grid/core/range-model.js +59 -0
- package/views/dist/grid/core/refusal-sentence.d.ts +3 -0
- package/views/dist/grid/core/refusal-sentence.js +15 -0
- package/views/dist/grid/core/row-opened-from.d.ts +21 -0
- package/views/dist/grid/core/row-opened-from.js +11 -0
- package/views/dist/grid/core/row-window.d.ts +40 -0
- package/views/dist/grid/core/row-window.js +43 -0
- package/views/dist/grid/core/spreadsheet-operations.d.ts +101 -0
- package/views/dist/grid/core/spreadsheet-operations.js +282 -0
- package/views/dist/grid/core/useGridEditing.d.ts +72 -0
- package/views/dist/grid/core/useGridEditing.js +105 -0
- package/views/dist/grid/core/useGridRange.d.ts +22 -0
- package/views/dist/grid/core/useGridRange.js +27 -0
- package/views/dist/grid/core/value-equality.d.ts +72 -0
- package/views/dist/grid/core/value-equality.js +104 -0
- package/views/dist/grid/core/write-states.d.ts +20 -0
- package/views/dist/grid/core/write-states.js +21 -0
- package/views/dist/grid/grid-format-props.d.ts +26 -0
- package/views/dist/grid/grid-format-props.js +65 -0
- package/views/dist/grid/index.d.ts +23 -0
- package/views/dist/grid/index.js +7 -0
- package/views/dist/grid/useGridTablePrefs.d.ts +48 -0
- package/views/dist/grid/useGridTablePrefs.js +47 -0
- package/views/dist/grid/useGridTableSettings.d.ts +60 -0
- package/views/dist/grid/useGridTableSettings.js +61 -0
- package/views/dist/grid-lab.d.ts +18 -0
- package/views/dist/grid-lab.js +16 -0
- package/views/dist/grouping/sort-groups.d.ts +17 -0
- package/views/dist/grouping/sort-groups.js +33 -0
- package/views/dist/grouping/types.d.ts +10 -0
- package/views/dist/grouping/types.js +1 -0
- package/views/dist/index.d.ts +31 -0
- package/views/dist/index.js +30 -0
- package/views/dist/internal/chip.d.ts +4 -0
- package/views/dist/internal/chip.js +3 -0
- package/views/dist/internal/count.d.ts +3 -0
- package/views/dist/internal/count.js +3 -0
- package/views/dist/internal/cx.d.ts +3 -0
- package/views/dist/internal/cx.js +3 -0
- package/views/dist/internal/reset.d.ts +9 -0
- package/views/dist/internal/reset.js +1 -0
- package/views/dist/internal/use-idle-write.d.ts +1 -0
- package/views/dist/internal/use-idle-write.js +13 -0
- package/views/dist/internal/viewport.d.ts +3 -0
- package/views/dist/internal/viewport.js +15 -0
- package/views/dist/internal/zone-clock.d.ts +20 -0
- package/views/dist/internal/zone-clock.js +77 -0
- package/views/dist/model/aggregates.d.ts +61 -0
- package/views/dist/model/aggregates.js +134 -0
- package/views/dist/model/body-frame.d.ts +34 -0
- package/views/dist/model/body-frame.js +15 -0
- package/views/dist/model/card-density.d.ts +8 -0
- package/views/dist/model/card-density.js +10 -0
- package/views/dist/model/card-layout.d.ts +85 -0
- package/views/dist/model/card-layout.js +90 -0
- package/views/dist/model/column-capabilities.d.ts +193 -0
- package/views/dist/model/column-capabilities.js +280 -0
- package/views/dist/model/column-filters.d.ts +109 -0
- package/views/dist/model/column-filters.js +348 -0
- package/views/dist/model/column-format.d.ts +103 -0
- package/views/dist/model/column-format.js +1 -0
- package/views/dist/model/column-from.d.ts +28 -0
- package/views/dist/model/column-from.js +165 -0
- package/views/dist/model/column-inspect.d.ts +28 -0
- package/views/dist/model/column-inspect.js +17 -0
- package/views/dist/model/column-knobs.d.ts +20 -0
- package/views/dist/model/column-knobs.js +16 -0
- package/views/dist/model/column-mark.d.ts +13 -0
- package/views/dist/model/column-mark.js +10 -0
- package/views/dist/model/column-money.d.ts +13 -0
- package/views/dist/model/column-money.js +27 -0
- package/views/dist/model/column-order.d.ts +36 -0
- package/views/dist/model/column-order.js +68 -0
- package/views/dist/model/column-schema.d.ts +355 -0
- package/views/dist/model/column-schema.js +1 -0
- package/views/dist/model/column-sort.d.ts +28 -0
- package/views/dist/model/column-sort.js +25 -0
- package/views/dist/model/column-state.d.ts +72 -0
- package/views/dist/model/column-state.js +92 -0
- package/views/dist/model/column-types.d.ts +97 -0
- package/views/dist/model/column-types.js +50 -0
- package/views/dist/model/column-warnings.d.ts +44 -0
- package/views/dist/model/column-warnings.js +24 -0
- package/views/dist/model/density.d.ts +3 -0
- package/views/dist/model/density.js +13 -0
- package/views/dist/model/field-type-of.d.ts +21 -0
- package/views/dist/model/field-type-of.js +11 -0
- package/views/dist/model/filter-capabilities.d.ts +1 -0
- package/views/dist/model/filter-capabilities.js +1 -0
- package/views/dist/model/index.d.ts +38 -0
- package/views/dist/model/index.js +20 -0
- package/views/dist/model/one-value.d.ts +6 -0
- package/views/dist/model/one-value.js +5 -0
- package/views/dist/model/part-columns.d.ts +17 -0
- package/views/dist/model/part-columns.js +69 -0
- package/views/dist/model/part-rows.d.ts +21 -0
- package/views/dist/model/part-rows.js +35 -0
- package/views/dist/model/part-write.d.ts +11 -0
- package/views/dist/model/part-write.js +52 -0
- package/views/dist/model/place-parts.d.ts +6 -0
- package/views/dist/model/place-parts.js +14 -0
- package/views/dist/model/preferences.d.ts +131 -0
- package/views/dist/model/preferences.js +67 -0
- package/views/dist/model/prefs-buckets.d.ts +145 -0
- package/views/dist/model/prefs-buckets.js +68 -0
- package/views/dist/model/relation-filters.d.ts +64 -0
- package/views/dist/model/relation-filters.js +93 -0
- package/views/dist/model/render-count.d.ts +8 -0
- package/views/dist/model/render-count.js +35 -0
- package/views/dist/model/row-icon.d.ts +29 -0
- package/views/dist/model/row-icon.js +5 -0
- package/views/dist/model/settings-columns.d.ts +34 -0
- package/views/dist/model/settings-columns.js +146 -0
- package/views/dist/model/settings-look.d.ts +17 -0
- package/views/dist/model/settings-look.js +23 -0
- package/views/dist/model/view-rules.d.ts +92 -0
- package/views/dist/model/view-rules.js +300 -0
- package/views/dist/panels/availability.d.ts +26 -0
- package/views/dist/panels/availability.js +28 -0
- package/views/dist/panels/customize-body.d.ts +45 -0
- package/views/dist/panels/customize-body.js +292 -0
- package/views/dist/panels/filter/DateFilterBody.d.ts +44 -0
- package/views/dist/panels/filter/DateFilterBody.js +84 -0
- package/views/dist/panels/filter/DateFilterCalendar.d.ts +19 -0
- package/views/dist/panels/filter/DateFilterCalendar.js +37 -0
- package/views/dist/panels/filter/DateFilterInput.d.ts +16 -0
- package/views/dist/panels/filter/DateFilterInput.js +36 -0
- package/views/dist/panels/filter/FilterIcon.d.ts +7 -0
- package/views/dist/panels/filter/FilterIcon.js +15 -0
- package/views/dist/panels/filter/MenuSelect.d.ts +12 -0
- package/views/dist/panels/filter/MenuSelect.js +50 -0
- package/views/dist/panels/filter/NumberFilterBody.d.ts +21 -0
- package/views/dist/panels/filter/NumberFilterBody.js +75 -0
- package/views/dist/panels/filter/RangeFilterBody.d.ts +19 -0
- package/views/dist/panels/filter/RangeFilterBody.js +78 -0
- package/views/dist/panels/filter/RelationFilterBody.d.ts +17 -0
- package/views/dist/panels/filter/RelationFilterBody.js +20 -0
- package/views/dist/panels/filter/TextFilterBody.d.ts +31 -0
- package/views/dist/panels/filter/TextFilterBody.js +43 -0
- package/views/dist/panels/filter/TimeScopeDetail.d.ts +6 -0
- package/views/dist/panels/filter/TimeScopeDetail.js +47 -0
- package/views/dist/panels/filter/details.d.ts +21 -0
- package/views/dist/panels/filter/details.js +100 -0
- package/views/dist/panels/filter/filter-list.d.ts +23 -0
- package/views/dist/panels/filter/filter-list.js +38 -0
- package/views/dist/panels/group-sort.d.ts +24 -0
- package/views/dist/panels/group-sort.js +58 -0
- package/views/dist/panels/index.d.ts +31 -0
- package/views/dist/panels/index.js +22 -0
- package/views/dist/panels/labels.d.ts +37 -0
- package/views/dist/panels/labels.js +166 -0
- package/views/dist/panels/model.d.ts +429 -0
- package/views/dist/panels/model.js +95 -0
- package/views/dist/panels/panel-button.d.ts +50 -0
- package/views/dist/panels/panel-button.js +21 -0
- package/views/dist/panels/quick/model.d.ts +102 -0
- package/views/dist/panels/quick/model.js +102 -0
- package/views/dist/panels/react/GroupBucketsList.d.ts +16 -0
- package/views/dist/panels/react/GroupBucketsList.js +44 -0
- package/views/dist/panels/react/LayoutColumnsList.d.ts +24 -0
- package/views/dist/panels/react/LayoutColumnsList.js +101 -0
- package/views/dist/panels/react/PopoverColumnDetail.d.ts +11 -0
- package/views/dist/panels/react/PopoverColumnDetail.js +24 -0
- package/views/dist/panels/react/chrome.d.ts +20 -0
- package/views/dist/panels/react/chrome.js +9 -0
- package/views/dist/panels/react/column-refusals.d.ts +7 -0
- package/views/dist/panels/react/column-refusals.js +14 -0
- package/views/dist/panels/react/customize-body.d.ts +15 -0
- package/views/dist/panels/react/customize-body.js +63 -0
- package/views/dist/panels/react/customize.d.ts +33 -0
- package/views/dist/panels/react/customize.js +113 -0
- package/views/dist/panels/react/drag-kit.d.ts +55 -0
- package/views/dist/panels/react/drag-kit.js +89 -0
- package/views/dist/panels/react/drag-load.d.ts +8 -0
- package/views/dist/panels/react/drag-load.js +24 -0
- package/views/dist/panels/react/drag.d.ts +2 -0
- package/views/dist/panels/react/drag.js +5 -0
- package/views/dist/panels/react/field-editor.d.ts +10 -0
- package/views/dist/panels/react/field-editor.js +1 -0
- package/views/dist/panels/react/filter/FilterEditor.d.ts +24 -0
- package/views/dist/panels/react/filter/FilterEditor.js +344 -0
- package/views/dist/panels/react/filter/FilterFieldList.d.ts +15 -0
- package/views/dist/panels/react/filter/FilterFieldList.js +57 -0
- package/views/dist/panels/react/filter/FilterValueBody.d.ts +5 -0
- package/views/dist/panels/react/filter/FilterValueBody.js +22 -0
- package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +22 -0
- package/views/dist/panels/react/filter/PhoneFilterEditor.js +186 -0
- package/views/dist/panels/react/filter/editor-ctx.d.ts +98 -0
- package/views/dist/panels/react/filter/editor-ctx.js +131 -0
- package/views/dist/panels/react/filter/filter-body.d.ts +19 -0
- package/views/dist/panels/react/filter/filter-body.js +72 -0
- package/views/dist/panels/react/filter/filter-part-body.d.ts +20 -0
- package/views/dist/panels/react/filter/filter-part-body.js +23 -0
- package/views/dist/panels/react/filter/rule-writes.d.ts +56 -0
- package/views/dist/panels/react/filter/rule-writes.js +152 -0
- package/views/dist/panels/react/filter-panel.d.ts +18 -0
- package/views/dist/panels/react/filter-panel.js +48 -0
- package/views/dist/panels/react/layout-detail.d.ts +4 -0
- package/views/dist/panels/react/layout-detail.js +29 -0
- package/views/dist/panels/react/order-details.d.ts +32 -0
- package/views/dist/panels/react/order-details.js +89 -0
- package/views/dist/panels/react/panel-header.d.ts +10 -0
- package/views/dist/panels/react/panel-header.js +20 -0
- package/views/dist/panels/react/panel-sheet.d.ts +23 -0
- package/views/dist/panels/react/panel-sheet.js +24 -0
- package/views/dist/panels/react/popover.d.ts +71 -0
- package/views/dist/panels/react/popover.js +47 -0
- package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +12 -0
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +148 -0
- package/views/dist/panels/react/quick/QuickFiltersReminder.d.ts +13 -0
- package/views/dist/panels/react/quick/QuickFiltersReminder.js +46 -0
- package/views/dist/panels/react/root-list.d.ts +6 -0
- package/views/dist/panels/react/root-list.js +31 -0
- package/views/dist/panels/react/sort/SortEditor.d.ts +24 -0
- package/views/dist/panels/react/sort/SortEditor.js +290 -0
- package/views/dist/panels/react/sort/SortFieldList.d.ts +12 -0
- package/views/dist/panels/react/sort/SortFieldList.js +34 -0
- package/views/dist/panels/react/sort/use-sort-drag.d.ts +17 -0
- package/views/dist/panels/react/sort/use-sort-drag.js +39 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +62 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +240 -0
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +30 -0
- package/views/dist/panels/react/toolbar/Toolbar.js +113 -0
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.d.ts +25 -0
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +85 -0
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.d.ts +20 -0
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +78 -0
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.d.ts +21 -0
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +126 -0
- package/views/dist/panels/react/toolbar/ToolbarButton.d.ts +5 -0
- package/views/dist/panels/react/toolbar/ToolbarButton.js +9 -0
- package/views/dist/panels/react/toolbar/ToolbarFilter.d.ts +28 -0
- package/views/dist/panels/react/toolbar/ToolbarFilter.js +42 -0
- package/views/dist/panels/react/toolbar/ToolbarFilterSheet.d.ts +12 -0
- package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +30 -0
- package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +19 -0
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +281 -0
- package/views/dist/panels/react/toolbar/ToolbarNew.d.ts +12 -0
- package/views/dist/panels/react/toolbar/ToolbarNew.js +31 -0
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +29 -0
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +33 -0
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +14 -0
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +16 -0
- package/views/dist/panels/react/toolbar/ToolbarSave.d.ts +8 -0
- package/views/dist/panels/react/toolbar/ToolbarSave.js +42 -0
- package/views/dist/panels/react/toolbar/ToolbarSearch.d.ts +9 -0
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +84 -0
- package/views/dist/panels/react/toolbar/ToolbarSort.d.ts +14 -0
- package/views/dist/panels/react/toolbar/ToolbarSort.js +29 -0
- package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +18 -0
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +81 -0
- package/views/dist/panels/react/toolbar/ToolbarViews.d.ts +13 -0
- package/views/dist/panels/react/toolbar/ToolbarViews.js +29 -0
- package/views/dist/panels/react/toolbar/bar-writes.d.ts +31 -0
- package/views/dist/panels/react/toolbar/bar-writes.js +82 -0
- package/views/dist/panels/react/toolbar/context.d.ts +83 -0
- package/views/dist/panels/react/toolbar/context.js +74 -0
- package/views/dist/panels/react/toolbar/panel-part.d.ts +54 -0
- package/views/dist/panels/react/toolbar/panel-part.js +49 -0
- package/views/dist/panels/react/toolbar/panel-state.d.ts +9 -0
- package/views/dist/panels/react/toolbar/panel-state.js +12 -0
- package/views/dist/panels/react/toolbar/use-box-narrow.d.ts +2 -0
- package/views/dist/panels/react/toolbar/use-box-narrow.js +18 -0
- package/views/dist/panels/react/toolbar/use-give-way.d.ts +4 -0
- package/views/dist/panels/react/toolbar/use-give-way.js +110 -0
- package/views/dist/panels/react/toolbar/use-list-settings-state.d.ts +10 -0
- package/views/dist/panels/react/toolbar/use-list-settings-state.js +10 -0
- package/views/dist/panels/react/view-actions.d.ts +4 -0
- package/views/dist/panels/react/view-actions.js +47 -0
- package/views/dist/panels/react/view-footer.d.ts +20 -0
- package/views/dist/panels/react/view-footer.js +41 -0
- package/views/dist/panels/react/views-row/FoldingViewRow.d.ts +5 -0
- package/views/dist/panels/react/views-row/FoldingViewRow.js +137 -0
- package/views/dist/panels/react/views-row/HScrollRow.d.ts +7 -0
- package/views/dist/panels/react/views-row/HScrollRow.js +42 -0
- package/views/dist/panels/react/views-row/PillGroup.d.ts +30 -0
- package/views/dist/panels/react/views-row/PillGroup.js +85 -0
- package/views/dist/panels/react/views-row/ViewAxes.d.ts +9 -0
- package/views/dist/panels/react/views-row/ViewAxes.js +16 -0
- package/views/dist/panels/react/views-row/ViewCreatePill.d.ts +7 -0
- package/views/dist/panels/react/views-row/ViewCreatePill.js +28 -0
- package/views/dist/panels/react/views-row/ViewPicker.d.ts +5 -0
- package/views/dist/panels/react/views-row/ViewPicker.js +112 -0
- package/views/dist/panels/react/views-row/ViewPickerRow.d.ts +7 -0
- package/views/dist/panels/react/views-row/ViewPickerRow.js +47 -0
- package/views/dist/panels/react/views-row/ViewTabs.d.ts +31 -0
- package/views/dist/panels/react/views-row/ViewTabs.js +29 -0
- package/views/dist/panels/react/views-row/in-frame.d.ts +8 -0
- package/views/dist/panels/react/views-row/in-frame.js +9 -0
- package/views/dist/panels/react/views-row/menu-classes.d.ts +6 -0
- package/views/dist/panels/react/views-row/menu-classes.js +3 -0
- package/views/dist/panels/react/views-row/use-anchored-toggle.d.ts +19 -0
- package/views/dist/panels/react/views-row/use-anchored-toggle.js +31 -0
- package/views/dist/panels/react.d.ts +67 -0
- package/views/dist/panels/react.js +58 -0
- package/views/dist/panels/settings/axes.d.ts +28 -0
- package/views/dist/panels/settings/axes.js +71 -0
- package/views/dist/panels/settings/filter-groups.d.ts +58 -0
- package/views/dist/panels/settings/filter-groups.js +305 -0
- package/views/dist/panels/settings/filters.d.ts +20 -0
- package/views/dist/panels/settings/filters.js +128 -0
- package/views/dist/panels/settings/group-buckets.d.ts +24 -0
- package/views/dist/panels/settings/group-buckets.js +69 -0
- package/views/dist/panels/settings/input.d.ts +84 -0
- package/views/dist/panels/settings/input.js +1 -0
- package/views/dist/panels/settings/layout.d.ts +5 -0
- package/views/dist/panels/settings/layout.js +259 -0
- package/views/dist/panels/settings/order.d.ts +21 -0
- package/views/dist/panels/settings/order.js +227 -0
- package/views/dist/panels/settings/settings-panels.d.ts +21 -0
- package/views/dist/panels/settings/settings-panels.js +33 -0
- package/views/dist/panels/settings/sort-keys.d.ts +25 -0
- package/views/dist/panels/settings/sort-keys.js +74 -0
- package/views/dist/panels/settings/sorts.d.ts +33 -0
- package/views/dist/panels/settings/sorts.js +135 -0
- package/views/dist/panels/sort-body-options.d.ts +4 -0
- package/views/dist/panels/sort-body-options.js +10 -0
- package/views/dist/panels/toolbar/clear.d.ts +9 -0
- package/views/dist/panels/toolbar/clear.js +33 -0
- package/views/dist/panels/toolbar/counts.d.ts +21 -0
- package/views/dist/panels/toolbar/counts.js +29 -0
- package/views/dist/panels/toolbar/edit-view.d.ts +5 -0
- package/views/dist/panels/toolbar/edit-view.js +18 -0
- package/views/dist/panels/toolbar/filter-words.d.ts +42 -0
- package/views/dist/panels/toolbar/filter-words.js +145 -0
- package/views/dist/panels/toolbar/model.d.ts +74 -0
- package/views/dist/panels/toolbar/model.js +110 -0
- package/views/dist/panels/use-filter-opened.d.ts +8 -0
- package/views/dist/panels/use-filter-opened.js +11 -0
- package/views/dist/panels/view-state.d.ts +38 -0
- package/views/dist/panels/view-state.js +1 -0
- package/views/dist/panels/views-row/model.d.ts +141 -0
- package/views/dist/panels/views-row/model.js +24 -0
- package/views/dist/provider/ViewsProvider.d.ts +103 -0
- package/views/dist/provider/ViewsProvider.js +75 -0
- package/views/dist/provider/components.d.ts +1375 -0
- package/views/dist/provider/components.js +5 -0
- package/views/dist/provider/context.d.ts +58 -0
- package/views/dist/provider/context.js +10 -0
- package/views/dist/provider/desktop.d.ts +12 -0
- package/views/dist/provider/desktop.js +25 -0
- package/views/dist/provider/icons.d.ts +6 -0
- package/views/dist/provider/icons.js +1 -0
- package/views/dist/provider/menu-groups.d.ts +9 -0
- package/views/dist/provider/menu-groups.js +44 -0
- package/views/dist/provider/missing-slot.d.ts +10 -0
- package/views/dist/provider/missing-slot.js +15 -0
- package/views/dist/provider/plain-input.d.ts +9 -0
- package/views/dist/provider/plain-input.js +7 -0
- package/views/dist/provider/ports.d.ts +57 -0
- package/views/dist/provider/ports.js +9 -0
- package/views/dist/react.d.ts +14 -0
- package/views/dist/react.js +5 -0
- package/views/dist/selection/SelectCheckbox.d.ts +19 -0
- package/views/dist/selection/SelectCheckbox.js +11 -0
- package/views/dist/selection/SelectionBar.d.ts +18 -0
- package/views/dist/selection/SelectionBar.js +100 -0
- package/views/dist/selection/SelectionBarPhone.d.ts +3 -0
- package/views/dist/selection/SelectionBarPhone.js +14 -0
- package/views/dist/selection/bar-overflow.d.ts +12 -0
- package/views/dist/selection/bar-overflow.js +55 -0
- package/views/dist/selection/bar-parts.d.ts +17 -0
- package/views/dist/selection/bar-parts.js +19 -0
- package/views/dist/selection/bar-room.d.ts +7 -0
- package/views/dist/selection/bar-room.js +3 -0
- package/views/dist/selection/index.d.ts +9 -0
- package/views/dist/selection/index.js +7 -0
- package/views/dist/selection/model.d.ts +55 -0
- package/views/dist/selection/model.js +86 -0
- package/views/dist/selection/row-click.d.ts +35 -0
- package/views/dist/selection/row-click.js +20 -0
- package/views/dist/selection/types.d.ts +21 -0
- package/views/dist/selection/types.js +1 -0
- package/views/dist/selection/useCheckDragSelect.d.ts +61 -0
- package/views/dist/selection/useCheckDragSelect.js +166 -0
- package/views/dist/selection/useListSelection.d.ts +39 -0
- package/views/dist/selection/useListSelection.js +48 -0
- package/views/dist/selection/useListSelectionShortcuts.d.ts +7 -0
- package/views/dist/selection/useListSelectionShortcuts.js +14 -0
- package/views/dist/selection/useRestIntent.d.ts +18 -0
- package/views/dist/selection/useRestIntent.js +35 -0
- package/views/dist/selection/verbs.d.ts +41 -0
- package/views/dist/selection/verbs.js +1 -0
- package/views/dist/styles.css +3165 -0
- package/views/dist/styles.unlayered.css +3164 -0
- package/views/docs/contract.md +1187 -0
- package/views/docs/getting-started.md +250 -0
- package/views/docs/guides/atoms.md +305 -0
- package/views/docs/guides/cells.md +302 -0
- package/views/docs/guides/columns.md +413 -0
- package/views/docs/guides/display.md +205 -0
- package/views/docs/guides/editors.md +496 -0
- package/views/docs/guides/ports.md +246 -0
- package/views/docs/guides/selection.md +284 -0
- package/views/docs/guides/the-grid.md +736 -0
- package/views/docs/guides/the-provider.md +478 -0
- package/views/docs/index.md +54 -0
- package/views/docs/install.md +101 -0
- package/views/docs/reference/cells.md +28 -0
- package/views/docs/reference/display.md +46 -0
- package/views/docs/reference/editors-chips.md +6 -0
- package/views/docs/reference/editors-date.md +8 -0
- package/views/docs/reference/editors-location.md +12 -0
- package/views/docs/reference/editors-name.md +8 -0
- package/views/docs/reference/editors-number.md +13 -0
- package/views/docs/reference/editors-open-values.md +10 -0
- package/views/docs/reference/editors-panel.md +12 -0
- package/views/docs/reference/editors-range.md +8 -0
- package/views/docs/reference/editors-relation.md +12 -0
- package/views/docs/reference/editors-select.md +9 -0
- package/views/docs/reference/editors-session.md +13 -0
- package/views/docs/reference/editors-text.md +9 -0
- package/views/docs/reference/editors-value-list.md +6 -0
- package/views/docs/reference/editors.md +5 -0
- package/views/docs/reference/field-row.md +16 -0
- package/views/docs/reference/grid.md +64 -0
- package/views/docs/reference/panels-react.md +172 -0
- package/views/docs/reference/panels.md +220 -0
- package/views/docs/reference/react.md +164 -0
- package/views/docs/reference/selection.md +41 -0
- package/views/docs/reference/views.md +638 -0
- package/views/docs/reshaping.md +19 -0
- package/views/skills/views/SKILL.md +103 -0
|
@@ -0,0 +1,3582 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@viewkitjs/views`. `0.x`: the API may change between minor versions.
|
|
4
|
+
|
|
5
|
+
This is `@viewkitjs/views`' history up to 0.15.0. From 0.19.0 the package is `viewkitjs`, and its changes are in [../CHANGELOG.md](../CHANGELOG.md).
|
|
6
|
+
|
|
7
|
+
## [0.15.0] — 2026-11-24
|
|
8
|
+
|
|
9
|
+
What an app building on the settings panels found: Customize's Hide all and Show all write as one change, a view's
|
|
10
|
+
part columns are listed in Customize's Columns, a toolbar panel host is handed its part's button and gives it the
|
|
11
|
+
focus back, every view tab opens its own menu on a right-click, and a field row's editors opened in place are framed.
|
|
12
|
+
A percent range's end that states no decimals is drawn and filtered at none. The peer moves: `@viewkitjs/fields`
|
|
13
|
+
`^0.18.0` (it was `^0.17.0`), so views installs beside the fields whose `ruleDecimalsOf` answers 0 there.
|
|
14
|
+
|
|
15
|
+
What an app changes when it takes this version:
|
|
16
|
+
|
|
17
|
+
- **Install `@viewkitjs/fields` 0.18 beside it**: the peer is `^0.18.0` (it was `^0.17.0`); fields' changelog says
|
|
18
|
+
what an app changes for fields itself (Changed).
|
|
19
|
+
- **With nothing new handed, these behave differently**:
|
|
20
|
+
- a field row's name, range and number editors, opened in place, draw a frame round their boxes, as its text editor
|
|
21
|
+
does; a grid cell's editors are unchanged (Changed);
|
|
22
|
+
- inside a toolbar panel host, the panel's own ✕ gives the part's button the focus back once the host has closed
|
|
23
|
+
(Changed);
|
|
24
|
+
- a right-click on a view tab that isn't open opens that view's menu, where the app hands it verbs; a click still
|
|
25
|
+
opens the view. Each tab handed verbs draws its `Menu` beside it, so a closed `Menu` of yours must render nothing
|
|
26
|
+
in place (Changed);
|
|
27
|
+
- a `CustomizeBody`'s `onColumnsChange` handed several columns shown or hidden at once writes them as one change,
|
|
28
|
+
where it wrote nothing (Changed);
|
|
29
|
+
- a percent range's end that states no decimals is drawn and filtered at none: "low end is 12.4" keeps a row whose
|
|
30
|
+
low end reads 12% (Fixed).
|
|
31
|
+
- **To take the rest, hand it**: `onHiddenChange` on a Columns config of your own, `parts` on the panels' builder,
|
|
32
|
+
`opener` in your `ToolbarPanelHost` (a host that guessed its opener can drop the guess), `boxClassName` on
|
|
33
|
+
`NameEditor` and `NumberEditor` (Added).
|
|
34
|
+
- **No message key is new, and no export is removed**: every name 0.14.0 exported is still exported.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- `ListColumnsConfig.onHiddenChange`, optional: several columns shown or hidden in one write. The panels' builder's Columns config hands it; a config of your own without it keeps writing nothing for a change to several columns at once.
|
|
39
|
+
- `parts` on the panels' builder (`SettingsPanelsInput`), optional, default false: hand it the same `parts` your grid takes. On the table, Customize's Columns, ViewKit's own and your `CustomizeBody`'s `columns.items`, then also lists each part column the view places ("Address · Country", worded as the grid's header), at its place in the view's order. It is shown, hidden and moved there as any column, so your Hide all and Show all reach it. A part column takes no `columnIcon` or `columnSettings`. Without `parts`, or with no part column placed, the list is as it was.
|
|
40
|
+
- `ToolbarPanelHost` is handed `opener`, a ref to its part's button (Options, Sort, Filter, Quick filters; ⋯ while the part is folded into it), the button the `Popover` would hang at. Give it the focus back as your host closes from inside (Escape, your own close), and read it as you open or close, never while drawing. A host that guessed its opener can drop the guess.
|
|
41
|
+
- `boxClassName` on `NameEditor` (each of its boxes) and `NumberEditor` (its own box), optional, as `RangeEditor` already takes: classes for a frame where nothing round the editor frames it.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- A `CustomizeBody`'s `onColumnsChange` handed several columns shown or hidden at once (your Hide all, your Show all) now writes them as one change to the view's settings, where it wrote nothing. A fixed or unhideable column stays shown, and a Hide all of every column leaves the first one shown. A new order alone, and one column shown or hidden, write as before; a new order together with a column shown or hidden still writes nothing.
|
|
46
|
+
- Inside a host, the panel's own ✕ now gives the part's button the focus back, once the host has closed, as it already did in the `Popover`.
|
|
47
|
+
- A field row's name, range and number editors, opened in place, now draw a frame round their boxes, as the row's text editor does: each of the name's three boxes, the range's two boxes as one, the number's box. Before, they drew with no frame, so in a record's drawer the name's full-name box read as the old value left behind. A grid cell's editors are unchanged, and an app's `PartsBody` or `NumberBody` draws its own.
|
|
48
|
+
- A view tab other than the open one, handed verbs (its option's `menu`), now opens them on a right-click, in a row of pills and in your own toolbar frame alike; a click on it still opens its view, and it carries no `popup`. The open tab's click and right-click work as before, and "Edit view…" stays on the open tab's menu alone. An app that hands verbs on the open view only sees no change; one that hands each view its own verbs gets a menu on every tab, each acting on its own view. Each tab handed verbs draws its `Menu` beside it, so a closed `Menu` must still render nothing in place.
|
|
49
|
+
- The peer `@viewkitjs/fields` is `^0.18.0` (it was `^0.17.0`).
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- A percent range's end column draws its figure at no decimals when the field states none, as the range's own cell does, and its filter rounds there: "low end is 12.4" keeps a row whose low end reads 12%. A range that states its decimals, or is whole, is drawn and filtered as before.
|
|
54
|
+
|
|
55
|
+
## [0.14.0] — 2026-11-23
|
|
56
|
+
|
|
57
|
+
`viewReaderFrom` rounds a number rule's "is" as the grid does, reading fields' new `ruleDecimalsOf`, and the peer
|
|
58
|
+
moves: `@viewkitjs/fields` `^0.17.0` (it was `^0.16.0`), so views installs beside the fields that exports it.
|
|
59
|
+
|
|
60
|
+
What an app changes when it takes this version:
|
|
61
|
+
|
|
62
|
+
- **Install `@viewkitjs/fields` 0.17 beside it**: the peer is `^0.17.0` (it was `^0.16.0`); fields' changelog says
|
|
63
|
+
what an app changes for fields itself (Changed).
|
|
64
|
+
- **A list filtered in memory through `viewReaderFrom` may keep other rows**: an "is" or "is not" at a fraction on a
|
|
65
|
+
whole range's end, or on a whole number drawn as a duration, now rounds at no decimals, as the grid's own filter
|
|
66
|
+
already did (Fixed).
|
|
67
|
+
- **No export is added or removed**, and no message key is new.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- The peer `@viewkitjs/fields` is `^0.17.0` (it was `^0.16.0`).
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
|
|
75
|
+
- `viewReaderFrom` reads a whole range's end, and a whole number drawn as a duration, at no decimals, as the grid's own filter does and as `ruleDecimalsOf` answers: an `eq` at a fraction on a whole range's low end now keeps the row whose end it rounds to, in memory as on the grid.
|
|
76
|
+
|
|
77
|
+
## [0.13.0] — 2026-11-23
|
|
78
|
+
|
|
79
|
+
Only the peer moves: `@viewkitjs/fields` `^0.16.0` (it was `^0.15.0`), so views installs beside the fields that lists
|
|
80
|
+
the types a person may create and compares two definitions of one field. Nothing else in views changed since 0.12.0.
|
|
81
|
+
|
|
82
|
+
What an app changes when it takes this version:
|
|
83
|
+
|
|
84
|
+
- **Install `@viewkitjs/fields` 0.16 beside it**: the peer is `^0.16.0` (it was `^0.15.0`); fields' changelog says
|
|
85
|
+
what an app changes for fields itself (Changed).
|
|
86
|
+
- **Nothing else**: no export is added or removed, and no message key is new.
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
|
|
90
|
+
- The peer `@viewkitjs/fields` is `^0.16.0` (it was `^0.15.0`).
|
|
91
|
+
|
|
92
|
+
## [0.12.0] — 2026-11-23
|
|
93
|
+
|
|
94
|
+
**A link's roles, set in your own body**: the components map takes `LinksBody`, and the set editor of a relation
|
|
95
|
+
whose field declares `links` opens it, handing it each link's roles, the field's roles and the lead, and saving what it
|
|
96
|
+
hands back. **+ Add** on a select holds the option your app returns when the field carries it a moment later, and
|
|
97
|
+
typing onto a selected multiselect cell keeps its first letter. The peer stays `@viewkitjs/fields` `^0.15.0`.
|
|
98
|
+
|
|
99
|
+
What an app changes when it takes this version:
|
|
100
|
+
|
|
101
|
+
- **Nothing, to keep what it has**: `LinksBody` is optional, and without one the set editor opens your `Picker` or
|
|
102
|
+
ViewKit's own list as before; the two fixes need no change in your code (Added, Fixed, For an adapter).
|
|
103
|
+
- **To set a link's roles in your own UI, hand `LinksBody`**, a component taking `ViewsLinksBodyProps` (Added).
|
|
104
|
+
- **A change of only a link's roles, or of only the lead, is a change**: the set editor's close saves it, and Escape
|
|
105
|
+
throws it away (Changed).
|
|
106
|
+
- **Under `bodyFrame: "popover"`, the popover around your links body is marked `data-vk-body="links"`**: style that
|
|
107
|
+
value where you style the others (For an adapter).
|
|
108
|
+
- **`OPTIONAL_COMPONENT_NAMES` and `OptionalComponentName` gain `"LinksBody"`**: a record typed over every optional
|
|
109
|
+
component name must name it (For an adapter).
|
|
110
|
+
- **`ChipsEditor` takes `seed`**, for a host of your own (Added).
|
|
111
|
+
- **New types from `@viewkitjs/views/react`**: `ViewsLinksBodyProps`, `ViewsLink` and `ViewsLinkRole` (Added).
|
|
112
|
+
- **No new message keys**, and **no export is removed**: every name 0.11.0 exported is still exported.
|
|
113
|
+
|
|
114
|
+
### Added
|
|
115
|
+
|
|
116
|
+
- **A link's roles, set in your own body.** The components map takes `LinksBody`, a whole links body your app draws (`ViewsLinksBodyProps`). Handed one, the set editor of a many relation whose field declares `links` opens it, in the grid and in a field row, on a computer and in the phone's sheet, in place of your `Picker` or ViewKit's own list. It hands your body the records (the linked ones first), each link with the roles it holds (`links`), the field's roles (`roles`, an archived one marked so you offer it only on a link that holds it) and, where the field leads, the lead. Your body hands back the whole list on every change (`onLinksChange`): a record linked or unlinked, a link's roles set. ViewKit drops a record it never handed, a role the field doesn't declare, an archived role a link didn't hold and a repeat, and saves the set on close with the lead first. Making another lead never moves a line while the body is open; unlinking the lead passes it to the first link left.
|
|
117
|
+
- Each link's roles are saved in the key the link was stored with. A link stored with `role` keeps `role` (its first role, or null); one stored with `roles` keeps `roles`; one stored with `role` alone gains `roles` beside it once it holds two or more, `role` kept as the first; a new link writes `roles` alone once it holds one. A link whose roles didn't change is saved as it was stored.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
// stored
|
|
121
|
+
{ kind: "person", id: "p1", role: "owner" }
|
|
122
|
+
// after your body ticks a second role
|
|
123
|
+
{ kind: "person", id: "p1", role: "owner", roles: ["owner", "champion"] }
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- `RelationSetEditor` takes `links` (the field's `links`), for a host of your own: handed, with your `LinksBody`, it opens that body.
|
|
127
|
+
- New types from `@viewkitjs/views/react`: `ViewsLinksBodyProps`, `ViewsLink` and `ViewsLinkRole`.
|
|
128
|
+
- `ChipsEditor` takes `seed`, the text its search opens with, for a host of your own; it is handed on to your `Picker` as `typed`.
|
|
129
|
+
|
|
130
|
+
### Changed
|
|
131
|
+
|
|
132
|
+
- The set editor counts a change of only a link's roles, or of only the lead, as a change: the close saves it, and Escape throws it away.
|
|
133
|
+
|
|
134
|
+
### Fixed
|
|
135
|
+
|
|
136
|
+
- **+ Add on a select holds the option your app returns.** When your app answered + Add first and its field carried the new option a moment later (the usual shape: the answer comes from a server, then your state re-renders the field), the select picked the option against the field from before the add, so the grid and the field row refused it as not one of the options, the panel stayed open and the cell stayed empty. The pick now waits until the render that carries the option has settled everywhere, so every check around the editor sees the field with the option, in the grid's cell, a field row and the phone's sheet. Nothing changes in your code. A multiselect's + Add was not affected.
|
|
137
|
+
- **Typing onto a selected multiselect cell keeps the first letter.** The letter that opened the cell was dropped, so typing "Onboarding" searched for "nboarding" (and + Add offered that). The letter now starts the chips editor's search, as it does a select's; the values the cell holds are kept. A list of values still opens as it is.
|
|
138
|
+
|
|
139
|
+
### For an adapter
|
|
140
|
+
|
|
141
|
+
- `LinksBody` is a new optional slot; without one, nothing changes, and `ViewsPickerProps` is unchanged. Escape and Tab from inside the body are the editor's (Tab walks your controls and saves when it leaves from either end); a popup you draw in a portal, or a level you mark `EDITOR_INNER_ESCAPE`, keeps its own Escape.
|
|
142
|
+
- `ViewsBodyKind` gains `"links"`: under `bodyFrame: "popover"`, the popover around your links body is marked `data-vk-body="links"`.
|
|
143
|
+
- `OPTIONAL_COMPONENT_NAMES` and `OptionalComponentName` gain `"LinksBody"`: a record typed over every optional component name must name it.
|
|
144
|
+
|
|
145
|
+
## [0.11.0] — 2026-11-23
|
|
146
|
+
|
|
147
|
+
**+ Add from a cell**: a select's or a multiselect's binding takes your app's add of an option (`addOption`), and its
|
|
148
|
+
pickers, in the grid and in a record's field row, on a computer and in the phone's sheet, offer **+ Add “word”** when
|
|
149
|
+
no option is the typed word, then hold the option your add returns. `ReadyToolbar`'s deprecated `showCounts` and
|
|
150
|
+
`onShowCountsChange` are gone, as 0.10.0 announced: Show counts is the view's. The peer stays `@viewkitjs/fields`
|
|
151
|
+
`^0.15.0`.
|
|
152
|
+
|
|
153
|
+
What an app changes when it takes this version:
|
|
154
|
+
|
|
155
|
+
- **`ReadyToolbar` no longer takes `showCounts` or `onShowCountsChange`**: code that hands either no longer compiles.
|
|
156
|
+
Keep Show counts in the settings, as the toolbar already reads it (Removed, with the code before and after).
|
|
157
|
+
- **+ Add stands only where you hand `addOption`**: a binding without it draws its pickers as before. Hand it only to
|
|
158
|
+
the readers who may add (Added).
|
|
159
|
+
- **With `addOption` handed, a picker never saves a typed word as itself**: on an open field, return the word as the
|
|
160
|
+
option's value, in the form the field stores it (Added).
|
|
161
|
+
- **Your own Picker body** is handed `onAdd`, `adding` and `addRefused` for a field whose binding carries an add, and
|
|
162
|
+
no `onCreate` then; a body that draws none of them offers no add (For an adapter).
|
|
163
|
+
- **New message keys**, each under Added: `views.editors.add-option`, `views.editors.adding-option`,
|
|
164
|
+
`views.editors.add-failed` and `views.editors.add-not-listed`. A resolver that falls back to `resolveViewsMessage`
|
|
165
|
+
reads them in English; one that words every message with a `switch` and no default, or a catalogue typed over every
|
|
166
|
+
`ViewsMessageKey`, must word them.
|
|
167
|
+
- **New types at the root**: `OptionAdd`, `OptionAdded`, `AddedOption` (Added).
|
|
168
|
+
- **No export is removed**: every name 0.10.0 exported is still exported; only `ReadyToolbarProps` loses its two
|
|
169
|
+
deprecated props.
|
|
170
|
+
|
|
171
|
+
### Added
|
|
172
|
+
|
|
173
|
+
- **+ Add from a cell.** A select's or multiselect's binding takes `addOption`, an `OptionAdd`: your app's add of an option to the field's list. Handed it, the select and several-values pickers, in the grid and in a record's field row, on a computer and in the phone's sheet, offer **+ Add “word”** after the matches when no option is the typed word. Pressing it, or Enter on it, calls your add once with the word, trimmed; the row says "Adding “word”…" while you answer. Resolve `{ option }` (the `AddedOption` you made, or one you already hold) and the cell holds that option, a select picking it and a multiselect adding it checked with its picker still open; resolve `{ refused }` with your words and the picker shows them and saves nothing. A rejected add shows "Couldn't add “word”". Hand `addOption` only to the readers who may add: ViewKit offers it wherever the binding carries it. `bindField` refuses it on any field but a select or a multiselect, and without a `write`; `columnFrom` carries it to the column's `addOption`.
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
const addOption: OptionAdd = async (typed) => {
|
|
177
|
+
const made = await addIndustry(typed); // your action, the guard against a duplicate
|
|
178
|
+
if ("refused" in made) return made;
|
|
179
|
+
setIndustryField((current) => withOption(current, made)); // the field you bind holds the new option
|
|
180
|
+
return { option: made };
|
|
181
|
+
};
|
|
182
|
+
bindField(industryField, { read, write, ...(mayAdd ? { addOption } : {}) });
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
- The picker picks the returned option once the field's options carry it, so update the field you hand the binding before or right after you resolve. After five seconds without it, it says "Added “word”, but the list hasn't shown it yet", and typing the word again picks it once the list catches up. A pick, or any close, while an add is in flight cancels it: its late answer changes nothing. Return a live option, never an archived one: an archived option is never listed, so the picker would wait for it. Refuse in your own words instead.
|
|
186
|
+
- A typed word that already names an option, by its label or value, ignoring spaces at either end, case and accents, picks that option and never asks your add; it is offered as the first row.
|
|
187
|
+
- With `addOption` handed, ViewKit's pickers never save a typed word as itself, open field or closed: no Use row, and no `onCreate` reaches your Picker body. On an open field (an open select, or a multiselect that is not `closed`), return the word itself as the option's value, in the form the field stores it.
|
|
188
|
+
- With `addOption`, a select's picker always shows its search, however short its list.
|
|
189
|
+
- `SelectEditor` and `ChipsEditor` take `addOption` too, for a host of your own.
|
|
190
|
+
- New types at the root: `OptionAdd`, `OptionAdded`, `AddedOption`.
|
|
191
|
+
- New message keys: `views.editors.add-option` ("Add “{value}”"), `views.editors.adding-option` ("Adding “{value}”…"), `views.editors.add-failed` ("Couldn't add “{value}”") and `views.editors.add-not-listed` ("Added “{value}”, but the list hasn't shown it yet"), each with `{ value }`.
|
|
192
|
+
|
|
193
|
+
### Removed
|
|
194
|
+
|
|
195
|
+
- `ReadyToolbar`'s `showCounts` and `onShowCountsChange`, deprecated since 0.9.0. Show counts is the view's: the toolbar reads it from `settings.showCounts` (absent is on), for the views row and the quick filters, and Customize's Show counts writes it back through `onChange`. This breaks code that hands either: it no longer compiles. Drop them and keep the choice in the settings:
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
// Before
|
|
199
|
+
<ReadyToolbar {...list} showCounts={showCounts} onShowCountsChange={setShowCounts} />
|
|
200
|
+
// After: the settings carry it, and the toolbar writes it through onChange
|
|
201
|
+
<ReadyToolbar {...list} />
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### For an adapter
|
|
205
|
+
|
|
206
|
+
- `ViewsPickerProps` gains three optional props, for a field whose binding carries an add: `onAdd(typed)` (draw an add row after the matches and call it with the typed text), `adding` (the text being added: draw its row as waiting, not pressable) and `addRefused` (the words to show where the add row was). A body handed `onAdd` gets no `onCreate`. A body that draws none of them keeps working and offers no add. Nothing changes for a field with no add.
|
|
207
|
+
|
|
208
|
+
## [0.10.0] — 2026-11-22
|
|
209
|
+
|
|
210
|
+
Inside your own toolbar frame, the Views part and Save draw every button through your `ToolbarButton`, each told
|
|
211
|
+
what it is (`part`, `current`, `onContextMenu`). On a phone ViewKit's quick filters take their phone form and leave a
|
|
212
|
+
reminder at the list's foot while a hold stands. The toolbar's search can open your own box. The panels' door loads
|
|
213
|
+
without the drag library, and a drag speaks your `messages`, naming the row by its label. The date and place
|
|
214
|
+
editors' Clear row is reached by Tab, and a grid's place cell can be emptied. The ready toolbar can drop the sort's
|
|
215
|
+
+, a set-aside rule whose field is back says so, and a related list's set-aside rule reads its labels. A grid in
|
|
216
|
+
pages offers Filled under any column whose figures carry `filled`. The peer stays `@viewkitjs/fields` `^0.15.0`.
|
|
217
|
+
|
|
218
|
+
What an app changes when it takes this version:
|
|
219
|
+
|
|
220
|
+
- **Your own toolbar frame draws the Views part and Save through your `ToolbarButton`**: inside `ToolbarSlotProvider`
|
|
221
|
+
the views chip, its tabs, "+N" and "+", and Clear and Save are your button, told `part`, `current` and
|
|
222
|
+
`onContextMenu`. Draw `part` as its `data-slot` and keep a tab's `icon`, which carries its drag grip;
|
|
223
|
+
`slot={{ appFrame: false }}` keeps them as they were. `Toolbar` and `ReadyToolbar` are unchanged (Changed, For an
|
|
224
|
+
adapter).
|
|
225
|
+
- **`ToolbarSlotState` has a required `appFrame`**: code that builds a whole one (not a `ToolbarSlotProvider` slot,
|
|
226
|
+
which is partial) adds `appFrame: false`, or its build fails (For an adapter).
|
|
227
|
+
- **`@viewkitjs/views/panels/react` loads without `@dnd-kit`**: the parts that drag draw still until the library has
|
|
228
|
+
arrived, and mount once more when it does. A test that drags awaits `loadPanelsDrag()` before its first render. An
|
|
229
|
+
app that renders a part that drags still installs the library (Changed).
|
|
230
|
+
- **A drag's screen-reader sentences are your `messages`**, and name the row by its label, not its id (Changed).
|
|
231
|
+
- **On a phone ViewKit's quick-filters panel takes the phone form**: taller rows, and with one value held at a time a
|
|
232
|
+
press holds it and closes the Sheet (Changed).
|
|
233
|
+
- **Clear is reachable**: the date and place editors' Clear row is the last Tab stop, and a grid's place cell on a
|
|
234
|
+
column that may be emptied ends with Clear (Changed).
|
|
235
|
+
- **A grid in pages offers Filled under a text, pick, relation or person column** whose handed figure carries
|
|
236
|
+
`filled`, and keeps a Filled picked while scrolling; figures without `filled` offer Count only there, as before
|
|
237
|
+
(Fixed).
|
|
238
|
+
- **`ReadyToolbar`'s `showCounts` and `onShowCountsChange` stay deprecated one more release**: they go in 0.11.0, as
|
|
239
|
+
0.9.0's entry shows how to keep Show counts in the settings (Changed).
|
|
240
|
+
- **New message keys**, each under Added: `views.panels.drag-instructions`, `views.panels.drag-picked-up`,
|
|
241
|
+
`views.panels.drag-over`, `views.panels.drag-not-over`, `views.panels.drag-dropped-over`,
|
|
242
|
+
`views.panels.drag-dropped`, `views.panels.drag-cancelled`, `views.panels.quick-reminder`,
|
|
243
|
+
`views.panels.quick-more`, `views.panels.quick-clear`, `views.panels.filter-set-aside-back` and
|
|
244
|
+
`views.panels.sort-set-aside-back`. A resolver that falls back to `resolveViewsMessage` reads them in English; one
|
|
245
|
+
that words every message with a `switch` and no default, or a catalogue typed over every `ViewsMessageKey`, must
|
|
246
|
+
word them.
|
|
247
|
+
- **New options, each off or unset by default**: `SearchField` in the components map; `QuickFiltersReminder` and its
|
|
248
|
+
`holder`; `ReadyToolbar`'s `quickFiltersOpen`, `onQuickFiltersOpenChange` and `addAfter`; the toolbar button's
|
|
249
|
+
`current`, `part` and `onContextMenu`; `loadPanelsDrag()`; and the `/panels` rules `quickPressCloses`,
|
|
250
|
+
`quickHeldNames` and `quickReminderWords` (Added); `filled` beside `totalled` in `aggregateOptions` and
|
|
251
|
+
`resolveAggregateKind`'s source figures (Fixed).
|
|
252
|
+
- **No export is removed**: every name 0.9.0 exported is still exported.
|
|
253
|
+
|
|
254
|
+
### Added
|
|
255
|
+
|
|
256
|
+
- The words a screen reader hears of a drag in the parts that drag (the views row's pills, the sort editor's rules on a computer and in a phone's sheet, the Columns list, the group order), worded through your `messages` like every other panel word, each naming the row by its label:
|
|
257
|
+
- `views.panels.drag-instructions`: "To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel."
|
|
258
|
+
- `views.panels.drag-picked-up` (`{ label }`): "Picked up draggable item {label}."
|
|
259
|
+
- `views.panels.drag-over` (`{ label, over }`): "Draggable item {label} was moved over droppable area {over}."
|
|
260
|
+
- `views.panels.drag-not-over` (`{ label }`): "Draggable item {label} is no longer over a droppable area."
|
|
261
|
+
- `views.panels.drag-dropped-over` (`{ label, over }`): "Draggable item {label} was dropped over droppable area {over}"
|
|
262
|
+
- `views.panels.drag-dropped` (`{ label }`): "Draggable item {label} was dropped."
|
|
263
|
+
- `views.panels.drag-cancelled` (`{ label }`): "Dragging was cancelled. Draggable item {label} was dropped."
|
|
264
|
+
- `QuickFiltersReminder` (`/panels/react`): on a phone, a pill at the list's foot saying a quick-filter hold stands while the quick filters are closed. It names the held values by their words, never their keys, the first two and "+N" for the rest; a press on the names calls your `onOpen`, and its ✕ lets every hold go. It stands where the selection bar's phone pill stands (your `selectionBar.phone` placement), draws nothing on a computer or while nothing is held, and steps aside while you hand it `hidden` (pass whether rows are selected or the quick filters are open). Place it once at your list's foot and hold the quick filters' open state so `onOpen` can open them.
|
|
265
|
+
- `ReadyToolbar` takes `quickFiltersOpen` and `onQuickFiltersOpenChange`, so an app can hold the quick filters' open state and open them from the reminder. Absent, the toolbar holds it as before.
|
|
266
|
+
- Three rules in `/panels`: `quickPressCloses(several)` (on a phone, whether a press closes the Sheet), `quickHeldNames(config, emptyLabel)` (every held value named by its words, for a reminder of your own) and `quickReminderWords(names, shown?)` (the first names and how many more), with the `QuickHeldName` type.
|
|
267
|
+
- Message keys: `views.panels.quick-reminder` (`{ names }`, "Quick filters: {names}"), `views.panels.quick-more` (`{ count }`, "+{count}") and `views.panels.quick-clear` ("Clear quick filters").
|
|
268
|
+
- An app can hand the toolbar its own search box: `SearchField` in the components map, typed `ViewsSearchFieldProps`. Handed one, the search opens it wherever it opens its own field, in place of its glass, field and ✕, on a computer and on a phone: from its button on the row and beside the phone's views, and filling its line in the narrow panel and on a phone with no views. It is handed the value, `onChange`, the placeholder, its name, `searching` and its words, the clear (`onClear`, `clearLabel`, and `closes`: whether the clear stands while the search is open and closes it, or shows only with a value and only clears), `form` (`computer` or `phone`) and `fill`. The shut button stays ViewKit's, and so do the open state, the caret on a press, Escape and a blur with nothing typed, caught on the frame around your box. Left out, the search draws as before.
|
|
269
|
+
|
|
270
|
+
```tsx
|
|
271
|
+
const components = {
|
|
272
|
+
...yourComponents,
|
|
273
|
+
SearchField: ({ value, onChange, onClear, clearLabel, closes, placeholder, label }: ViewsSearchFieldProps) => (
|
|
274
|
+
<KitSearchInput
|
|
275
|
+
value={value}
|
|
276
|
+
onValueChange={onChange}
|
|
277
|
+
placeholder={placeholder}
|
|
278
|
+
aria-label={label}
|
|
279
|
+
onClear={closes || value ? onClear : undefined}
|
|
280
|
+
clearLabel={clearLabel}
|
|
281
|
+
/>
|
|
282
|
+
),
|
|
283
|
+
};
|
|
284
|
+
```
|
|
285
|
+
- `loadPanelsDrag()` from `@viewkitjs/views/panels/react`: loads the drag library the parts that drag use, once, and resolves `true` once it has loaded, `false` when it isn't installed (or didn't arrive; a later call tries again). A test that drags a list awaits it first:
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
import { loadPanelsDrag } from "@viewkitjs/views/panels/react";
|
|
289
|
+
|
|
290
|
+
beforeAll(() => loadPanelsDrag());
|
|
291
|
+
```
|
|
292
|
+
- `ReadyToolbarProps.addAfter` (default `true`): the + after the sort pill. `false` draws none, and the sort editor, or your `SortBody`, has Add sort at its foot, as a `ToolbarSortPill` handed `addAfter={false}` already does. Left out, the ready toolbar draws the + as before.
|
|
293
|
+
- `views.panels.filter-set-aside-back`: "Set aside: its field is back in this list, and Put back filters by it again", a set-aside filter's reason once its field is listed again.
|
|
294
|
+
- `views.panels.sort-set-aside-back`: "Set aside: its field is back in this list, and Put back sorts by it again", a set-aside sort's reason once the list sorts by its field again.
|
|
295
|
+
- `QuickFiltersReminder` takes `holder`, an optional ref to your list's box. Leaving with the focus in it (its ✕ lets the last hold go, or it steps aside as your quick filters open from its names), the reminder hands the focus to that box, so the focus never falls to the page; a box that takes no focus of its own is given `tabindex="-1"`. A sheet you open from its names then hands the focus back into the box as it closes, since the box held the focus when the sheet opened. Without `holder`, the focus goes where the browser drops it, as before.
|
|
296
|
+
- The toolbar button (`ViewsToolbarButtonProps`) can be told what it is: `current` (a view tab; `true`, the open one, with `aria-current="true"`), `part` (`views-chip`, `views-tab`, `views-more`, `views-add`, `clear` or `save`, drawn as `vk-views-chip`, `vk-views-tab`, `vk-views-more`, `vk-views-add`, `vk-toolbar-clear` and `vk-toolbar-save-button`; the type is `ViewsToolbarButtonPart`) and `onContextMenu`. The default button draws each plainly: the open tab on the selected ground, the views chip and "+N" with a chevron after their words, Save on an edge.
|
|
297
|
+
- `ToolbarSlotState` has `appFrame`: true inside your own toolbar frame (`ToolbarSlotProvider`), false in `Toolbar`, `ReadyToolbar` and outside any toolbar.
|
|
298
|
+
|
|
299
|
+
### Changed
|
|
300
|
+
|
|
301
|
+
- A screen reader hears a dragged row by its name. **Before:** the parts that drag announced a drag in the drag library's own English, outside your `messages`, naming each row by its id ("Picked up draggable item deal-stage."). **Now:** the same sentences come from the keys above, so an app in another language announces in its own, and the row is named by its label ("Picked up draggable item Stage."). An app on the package's English hears only the row's name change.
|
|
302
|
+
- ViewKit's own quick-filters panel on a phone takes its phone form: its values are the phone sheet's taller rows, and with one value held at a time a press holds it and closes the Sheet (by touch or by key). With `several`, the Sheet stays open. A computer's panel is unchanged.
|
|
303
|
+
- `@viewkitjs/views/panels/react` loads without `@dnd-kit`. **Before:** importing anything from the door (the search, New, the toolbar's providers, `useListSettingsState`) loaded `@dnd-kit/core`, `@dnd-kit/sortable` and `@dnd-kit/utilities`, so plain Node (an app's tests, a server render) failed with `ERR_MODULE_NOT_FOUND` where they weren't installed. **Now:** the door loads in plain Node without them. It starts loading them as it loads, with `import()` (in a bundler, a chunk of its own), for the parts that drag (the views row's pills, the sort's rules, the Columns list, the group order). An app that renders a part that drags still installs them.
|
|
304
|
+
- The parts that drag draw still until the drag library has arrived. **Before:** the sort's rules, the Columns list and the group order rendered with dnd-kit on the server and on their first render, and only the views row's pills drew still while hydrating. **Now:** all four draw still (no grip lifts) on the server, while hydrating and until the library has arrived. The first time it arrives on a page, their rows mount again once: a pill that had focus loses it, and an open pill's menu closes. A test that drags awaits `loadPanelsDrag()` before its first render.
|
|
305
|
+
- A grid's place cell on a column that may be emptied now opens its editor with a Clear row at the end, the one a field row's place editor has, on a computer and in a phone's sheet; Clear empties the whole place. Before, the grid's place editor had none, so a place could be emptied in a field row but not in the grid. A column that may not be emptied shows no Clear, and an app that hands its own parts body sees nothing change.
|
|
306
|
+
- The date editor's and the place editor's Clear row is now the last Tab stop, after the editor's last box. Before, Tab walked the place editor's boxes and closed it after the last one, so Clear was never reached from the keyboard; in Safari, whose Tab skips buttons, the date editor's Tab passed from the calendar's day over its Clear row and closed. Now Tab from the last box (the calendar's day, in the date editor; the country search, in a place editor that opens on its country list) focuses Clear, Enter or Space on it empties the value, the next Tab closes the editor as before, and Shift+Tab goes back. An editor with no Clear row tabs and closes as it did. In Safari, a calendar whose days carry no `tabindex` still lets the Tab leave the date editor before Clear, saving as before.
|
|
307
|
+
- Inside your own toolbar frame (`ToolbarSlotProvider`), the Views part (`ToolbarViews`) draws its chip, its view tabs, its "+N" and its "+" through your `ToolbarButton`, and `ToolbarSave` its Clear and Save, told what each is by `part`, the open tab by `current` and a tab's verbs by `onContextMenu`. A tab's drag grip comes in its `icon`, and its verbs open on a click and a right-click as before. The search's ✕ stays the search field's own, and a `PillGroup`, `ViewTabs`, `ViewPicker` or `ViewCreatePill` you place yourself stays as it is. In `Toolbar` and `ReadyToolbar` nothing changes.
|
|
308
|
+
- `ReadyToolbar`'s `showCounts` and `onShowCountsChange` stay deprecated one more release, and go in 0.11.0. Handed, they still win over the view's value. Keep Show counts in the settings, as 0.9.0's entry shows.
|
|
309
|
+
|
|
310
|
+
### Fixed
|
|
311
|
+
|
|
312
|
+
- A rule set aside because its field was missing, whose field the list lists again (a view saved while the field was being restored), said "Set aside: its field is no longer in this list" beside that field's own label. Its reason now says the field is back, on the filter bar, in the filter editor (`asideFilterWords`' `why`) and, for a sort that can be put back, in the sort editor. A rule on a field truly gone, and the other reasons, read as before.
|
|
313
|
+
- A set-aside rule inside a related list's condition that carries a `part` was named by its field's key, and its values by their stored keys, though its relation lists that field. `asideFilterWords` now finds a related list's field by its key alone (those fields carry no part), so the rule reads its field's label and its options' labels, on the filter bar and in the filter editor. The list's own fields are still matched by key and part.
|
|
314
|
+
- A grid in pages, handed the whole list's figures, now offers Filled in the footer of a text, pick, relation or person column whenever the figure handed for that column carries `filled`, and reads it from there. Filled picked while the grid loaded rows as you scrolled stays Filled when it goes to pages, instead of falling back to None. Figures that carry no `filled` (an older backend) offer Count only there, as before. Unique stays off a footer handed figures: it isn't the database's to answer.
|
|
315
|
+
- `aggregateOptions` and `resolveAggregateKind`, called with a source list's figures, take an optional `filled` beside `totalled`: the keys whose figure carries `filled`. Left out, they answer as before.
|
|
316
|
+
|
|
317
|
+
### For an adapter
|
|
318
|
+
|
|
319
|
+
- `ToolbarSlotProvider` now sets `appFrame: true`. Inside it the Views part's chip, view tabs, "+N" and "+", and Clear and Save draw through your `ToolbarButton` instead of `panelButtons`' buttons and the `Pill` atom: draw `part` as its `data-slot`, and keep a tab's `icon`, which carries its drag grip. Pass `slot={{ appFrame: false }}` to keep them as they were. A tab's status colours don't reach your button. The views row's hidden measuring copy is `inert`, so its buttons never take focus or a stop in your frame.
|
|
320
|
+
- `ToolbarSlotState` has a new required field, `appFrame`: code that builds a whole one (not a `ToolbarSlotProvider` slot, which is partial) adds `appFrame: false`.
|
|
321
|
+
|
|
322
|
+
## [0.9.0] — 2026-11-21
|
|
323
|
+
|
|
324
|
+
Quick filters: a button on the row opens ViewKit's own quick-filters panel, holding values on top of the view as
|
|
325
|
+
fields' `ListHold`. Your own bodies, each in the components map: the views list (`ViewsListBody`), the group editor
|
|
326
|
+
(`GroupBody`), Customize (`CustomizeBody`), the quick filters (`QuickFiltersBody`), the field list a sort or a filter
|
|
327
|
+
picks from (`FieldsBody`) and a filter rule's way and value (`FilterPartBody`); the sort pill without its +, and the
|
|
328
|
+
fields' marks handed to `SortBody`. Show counts is the view's, kept in its settings. A date filters by "is not" a day.
|
|
329
|
+
The grid can be held from outside (`hoveredRow`, `cellPick`, `openColumnMenu`), its editing lift is a variable, and
|
|
330
|
+
`RowsWait` wraps the rows alone. A field row says Empty, is named by its value and stacks on a phone; its date editor
|
|
331
|
+
opens focused, a place can be cleared, and a write waiting behind a save goes when the page goes. A set-aside rule
|
|
332
|
+
on a field the list no longer shows reads its label, a related list's included. It needs `@viewkitjs/fields` 0.15.
|
|
333
|
+
|
|
334
|
+
What an app changes when it takes this version:
|
|
335
|
+
|
|
336
|
+
- **Install `@viewkitjs/fields` 0.15 beside it**: the peer is `^0.15.0` (it was `^0.14.0`) (Changed).
|
|
337
|
+
- **Show counts is the view's**: `ReadyToolbar` reads it from `settings.showCounts` and writes it through `onChange`.
|
|
338
|
+
Its `showCounts` and `onShowCountsChange` are deprecated and go in the next release; handed, they still win for
|
|
339
|
+
now (Changed, with the code before and after).
|
|
340
|
+
- **`QuickValues`, `QuickValueField`, `quickValuesFromTree` and `withQuickValues` are removed**: a quick filter holds
|
|
341
|
+
a `ListHold` on top of the view and narrows with fields' `withHold` (Removed, with the code before and after).
|
|
342
|
+
- **`RowsWait` wraps the grid's rows, not the whole grid**: draw it as a block in flow, and drop sizing that made it
|
|
343
|
+
fill the grid's frame (Changed).
|
|
344
|
+
- **A field row draws differently for an app that hands nothing**: an empty row the viewer may edit says Empty; its
|
|
345
|
+
edit button is named "<label>, <value>", so a test that finds it by the label alone changes; on a phone its label
|
|
346
|
+
stands above its value; its date editor opens with the keyboard in its date box; an Escape from the page closes the
|
|
347
|
+
row's editor and goes no further; a nullable place ends with Clear; a write waiting behind a save is sent on
|
|
348
|
+
`pagehide` (Changed).
|
|
349
|
+
- **A grid's short select opened from the keyboard takes the keys**, and a filter on a related record's field is
|
|
350
|
+
written into the view at once, waiting for its value (Changed).
|
|
351
|
+
- **A gone field names rules by where it stands**: one handed without `relation` names only a rule on the list's own
|
|
352
|
+
field, and a rule under a relation the list no longer has shows its own key (Changed).
|
|
353
|
+
- **Controls that can't be used stay Tab stops**: `aria-disabled` rather than `disabled`, their reason as
|
|
354
|
+
`aria-describedby`. Your `Button` forwards both, and your `Tooltip` opens on a keyboard focus inside a wrapper
|
|
355
|
+
(For an adapter).
|
|
356
|
+
- **Your own `Sheet` and an editor's step**: one that draws its own head (`sheetActions: "head"`) draws
|
|
357
|
+
`actions.back`, when handed, in `actions.close`'s place; for Escape to go back a step it reports
|
|
358
|
+
`onOpenChange(false, { reason: "escape-key" })` (For an adapter).
|
|
359
|
+
- **New message keys**, each under Added: `views.editors.back`, `views.panels.search-close`,
|
|
360
|
+
`views.panels.filter-relation-gone`, `views.panels.quick-filters`, `views.panels.quick-fields`,
|
|
361
|
+
`views.panels.quick-search`, `views.panels.quick-none`, `views.panels.quick-value`, `views.panels.quick-empty`,
|
|
362
|
+
`views.panels.advanced-filter-set-aside`, `views.selection.more-none` and `views.field-row.empty`. A resolver that
|
|
363
|
+
falls back to `resolveViewsMessage` reads them in English; one that words every message with a `switch` and no
|
|
364
|
+
default, or a catalogue typed over every `ViewsMessageKey`, must word them.
|
|
365
|
+
- **New options, each off or unset by default**: `ViewsListBody`, `GroupBody`, `CustomizeBody`, `QuickFiltersBody`,
|
|
366
|
+
`FieldsBody` and `FilterPartBody` in the components map; `ToolbarQuickFilters` and `ReadyToolbar`'s
|
|
367
|
+
`quickFilters`; `addAfter` on the sort pill; `hoveredRow`, `cellPick` and `openColumnMenu` on `GridTable`;
|
|
368
|
+
`clearable` on `LocationEditor`; `goneFields` on the panels' builder; and `--vk-editing-shadow` (Added).
|
|
369
|
+
- **No other export is removed**: every name 0.8.0 exported is still exported but the four above.
|
|
370
|
+
|
|
371
|
+
### Added
|
|
372
|
+
|
|
373
|
+
- On a phone, an app's own `TextBody`, `PartsBody` and `ValuesBody` can take a step of their own with a way back. In the editor's sheet each is handed `onStepChange`: hand it a `ViewsBodyStep` (`{ title, onBack }`) while your body stands on a step (a phone's countries, a label's list), and `null` once it is back. While it does, the sheet is titled with the step, Back stands in the ✕'s place and ✓ stays; Back and the sheet's Escape call `onBack`, and a swipe, the dim and ✕ still close the whole editor, discarding. `onStepChange` is absent on a computer, and a body that never calls it sees the sheet as before.
|
|
374
|
+
|
|
375
|
+
```tsx
|
|
376
|
+
function CountryStep(props: ViewsTextBodyProps) {
|
|
377
|
+
const [countries, setCountries] = useState(false);
|
|
378
|
+
useEffect(() => {
|
|
379
|
+
props.onStepChange?.(countries ? { title: "Country", onBack: () => setCountries(false) } : null);
|
|
380
|
+
}, [countries]);
|
|
381
|
+
// …
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
- `ViewsSheetActions` carries `back` while an editor's body stands on a step, and the message `views.editors.back` ("Back") names it in the panel's own bar.
|
|
386
|
+
- A date and a date-and-time filter offer "Is not", right after "Is", in the date filter's menu, the filter editor's way box and a phone's sheet: it keeps every record but those on the day picked, the records with no date included. Its summary reads "Not 31 Dec 2026"; on the toolbar's bar and in the filter editor's value box it says the day alone ("Closes on is not 31 Dec 2026"). It needs the fields release that offers it.
|
|
387
|
+
- The provider's `escape` can name what Escape does in an email, phone, link or domain field by the editor it opens: `{ box, list }` (`EditEscapeByEditor`, from `./react`), `box` its text box (a single value) and `list` the value list (several values, or a single one `oneValue` opens as a list of one). Each left out throws the edit away. A word alone still covers both editors, so the rules you write today keep working.
|
|
388
|
+
|
|
389
|
+
```tsx
|
|
390
|
+
// Several phones and emails keep what was typed; a single one throws it away.
|
|
391
|
+
<ViewsProvider escape={{ phone: { list: "keep" }, email: { list: "keep" }, date: "keep" }} />
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
- `useEscapeRule(type, list?)` (`/editors/session`) takes an optional `list`: true where your own host opens the value list. Called with the type alone, it reads the text box's rule, as before.
|
|
395
|
+
- `views.panels.search-close` ("Close search"): the name of the toolbar search's ✕ while a search its button opened stands open. Word it in your resolver apart from `views.panels.search-clear`, which the panels' search boxes and a search field filling its line still read.
|
|
396
|
+
- One word: `views.panels.filter-relation-gone` ("Its relation is no longer in this list"), Add filter's reason under a relation the list no longer lists.
|
|
397
|
+
- An app can hand ViewKit its own views list: `ViewsListBody` in the components map, typed `ViewsViewsListBodyProps`.
|
|
398
|
+
Handed one, the view picker's chip opens it in place of ViewKit's own list of views, in its popover on a computer and
|
|
399
|
+
in the Sheet on a phone. It is handed the axis's views (`views`, each its value, words, icon, count, `private` and its
|
|
400
|
+
own verbs as `menu`), the view in use, `form`, and, where the axis has them, `onCreate` with its word and `onReorder`
|
|
401
|
+
with `canDrag`; it hands back the view picked (`onViewChange`), an order (`onReorder`) and `onDone`; on a phone where
|
|
402
|
+
the sheet's head doesn't draw it, it is handed the ✕ as `actions`. ViewKit writes a pick only when it is one of the
|
|
403
|
+
views, and an order only when it is one whole block (the shared views or the reader's own), each once. The row's
|
|
404
|
+
pills stay ViewKit's. Left out, the picker opens ViewKit's own list, as before.
|
|
405
|
+
- An app can hand ViewKit its own group editor: `GroupBody` in the components map, typed `ViewsGroupBodyProps`. Handed
|
|
406
|
+
one, Customize's Group opens it in place of ViewKit's own group pages, on a computer and in the Sheet on a phone. It
|
|
407
|
+
is handed the group's name, the fields the list can be grouped by (`ViewsGroupDimension`: each its orders, the order
|
|
408
|
+
it opens in, and a date's steps), the group as one value (`ViewsGroupValue`: the field grouped by or `none`, its order
|
|
409
|
+
and direction, its date step, Hide empty groups, and the groups in the order the list shows them, each a
|
|
410
|
+
`ViewsGroupEntry` with its key, words, `empty` and `hidden`, no count), whether your own order may be picked
|
|
411
|
+
(`manualOrder`) and `form`. It hands back the whole group through `onGroupChange`, and ViewKit makes one write for
|
|
412
|
+
each change: a new Group by, order or date step alone; else Hide empty groups; else the groups (a new order, one shown
|
|
413
|
+
or hidden, all hidden, all shown). A new Group by keeps the order and step handed with it only where the new field
|
|
414
|
+
offers them. A value that changes two of those at once, names a field the list doesn't offer, names an order or step
|
|
415
|
+
the field grouped by doesn't offer, or adds or loses a group writes nothing; so does a second change handed before
|
|
416
|
+
ViewKit draws again. Inside Customize it gets no `actions` (Customize's head holds
|
|
417
|
+
the ✕) and its `onDone` goes back to Customize's list. Left out, Group opens ViewKit's own pages, as before.
|
|
418
|
+
- An app can hand ViewKit its own Customize: `CustomizeBody` in the components map, typed `ViewsCustomizeBodyProps`.
|
|
419
|
+
Handed one, everything that draws ViewKit's Customize opens it in its place: Options in its popover, your `host` or,
|
|
420
|
+
on a phone, the Sheet; the ready toolbar; `ViewOptionsPanelContent`; and `ViewOptionsPopoverPanel`. It is handed the
|
|
421
|
+
view's settings as data: the page it stands on (`ViewsCustomizePage`) with `onPageChange`; the layouts and the layout
|
|
422
|
+
in use's settings (`ViewsCustomizeLayout`); the columns with their own settings, a card's new lines and your field
|
|
423
|
+
editor's rows (`ViewsCustomizeColumns`, `ViewsCustomizeColumn`); the sort as `SortBody` is handed it, the filter as
|
|
424
|
+
`FilterBody` is handed it on a phone, and the group as `GroupBody` is handed it, each without `form`, `onDone` and
|
|
425
|
+
`actions`; the toggles, Show counts among them, read from the view (`ViewsCustomizeToggle`; a setting picked from a
|
|
426
|
+
few is a `ViewsCustomizeChoice`); on a shared view its drift with Reset and Set default for everyone; the foot's words
|
|
427
|
+
with its Clear; Clear all; `form`; and `onDone`. On a phone where the sheet's head doesn't draw it, it gets the ✕ as
|
|
428
|
+
`actions`. Each change is written through ViewKit's own checks, one at a time: a columns change is a reorder or one
|
|
429
|
+
column shown or hidden. The view's name, Copy link and Export are your app's to hand your body. A list whose filter is
|
|
430
|
+
only per-field values (a field's values, a time scope, a date range), with no filter tree, has nothing to hand a body
|
|
431
|
+
for them: ViewKit draws its own Customize for it even with a body handed. Left out, ViewKit's own Customize opens, as before.
|
|
432
|
+
- Quick filters: `ToolbarQuickFilters` (`/panels/react`), a button lit while a value is held, opens ViewKit's own quick-filters panel in your `Popover`, a host of yours, or on a phone your `Sheet`. Hand it a `QuickFiltersConfig` (`/panels`): the fields your list offers, each with its values and, when you count them, each value's count (fields' `countHoldValues` answers them for rows in memory), the hold (fields' `ListHold`) and `onHoldChange`. The panel draws a strip of the fields, one open; the open field's values, the most first, each count read with its value; a press holds a value and a second press lets it go (one in all, or `several`); a held value no count lists any more, drawn from the hold so it can be let go; one Tab stop with ↑ ↓ Home End; a search past eight values, and "Nothing matches." when it finds none. `QuickFiltersPanel` is the panel alone, for a holder of your own.
|
|
433
|
+
|
|
434
|
+
```tsx
|
|
435
|
+
<ToolbarQuickFilters
|
|
436
|
+
quickFilters={{
|
|
437
|
+
fields: [{ key: "stage", label: "Stage", values: stageOptions, counts: countHoldValues(rows, query, "stage", reader) }],
|
|
438
|
+
hold,
|
|
439
|
+
onHoldChange: setHold,
|
|
440
|
+
}}
|
|
441
|
+
/>
|
|
442
|
+
```
|
|
443
|
+
- `ReadyToolbar` takes `quickFilters`, and `hosts.quick`: handed them, the quick filters' button stands on the row.
|
|
444
|
+
- An app can hand ViewKit its own quick filters: `QuickFiltersBody` in the components map, typed `ViewsQuickFiltersBodyProps`. Handed one, the quick filters' button opens it in place of ViewKit's panel, on a computer and in the phone's Sheet. It is handed the fields with their values in the order to show them (each with its count and whether it is held), the hold, `several`, `showCounts` and `form`, and hands back the whole hold through `onHoldChange`; ViewKit writes nothing for a hold that holds a field twice, more than one value where `several` is false, or a value added on a field the strip doesn't offer. On a phone where the sheet's head doesn't draw it, it is handed the ✕ as `actions`.
|
|
445
|
+
- The panels' model for quick filters (`/panels`): `holdAfterPress`, `quickValuesShown`, `quickValuesFound`, `quickFirstOpen`, `holdStands`, `quickHoldFits` and `QUICK_SEARCH_AFTER`.
|
|
446
|
+
- Six words: `views.panels.quick-filters`, `views.panels.quick-fields`, `views.panels.quick-search`, `views.panels.quick-none`, `views.panels.quick-value` and `views.panels.quick-empty`.
|
|
447
|
+
- `showCountsOf` and `showCountsChange` (`/panels`): the view's Show counts read from a list's settings (on unless they say `showCounts: false`), and set on it as a change (off writes `false`, on takes the key out, nothing when nothing changes).
|
|
448
|
+
- The panels' builder takes `goneFields` (`SettingsPanelsInput`): the fields your list no longer shows (an archived one, say), each a `FilterGoneField` (`/panels`) with its `fieldKey`, `label` and its options' labels. The filter tree hands them on as `gone`. A set-aside filter on one of them reads them on the bar, in the sentence a screen reader hears and in the filter editor's set-aside row: "Client status is any of Active" where it read "ws_client_status is any of active". A value no option lists stays as it is stored. Nothing is stored in the saved rule; with no gone field handed for it, a set-aside filter is named by its key and stored value, as before.
|
|
449
|
+
|
|
450
|
+
```ts
|
|
451
|
+
settingsPanels({
|
|
452
|
+
...input,
|
|
453
|
+
goneFields: [{ fieldKey: "ws_client_status", label: "Client status", options: [{ value: "active", label: "Active" }] }],
|
|
454
|
+
});
|
|
455
|
+
```
|
|
456
|
+
- The open editor's lift, the shadow under the picked cell's ring while it is edited and under the box a value wider than its cell grows into, is a variable, `--vk-editing-shadow` (`VK_OPTIONAL_COLOURS`): a whole `box-shadow` value, one name for both places. Undeclared, it is what was drawn before, `0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2)`, at `0.5` in the dark. Declare it to dress the lift, or `none` to turn it off:
|
|
457
|
+
|
|
458
|
+
```css
|
|
459
|
+
:root { --vk-editing-shadow: none; }
|
|
460
|
+
```
|
|
461
|
+
- `GridTable` takes `hoveredRow`, a row's id, and draws that row as under the pointer: its tint, its rail's box, its ⋯ and the name's actions, as a real hover draws them. A real pointer still hovers any row beside it. `onHoveredRowChange` tells you the row a person's pointer moves onto, or null as it leaves. Left out, nothing changes.
|
|
462
|
+
- The grid's state `data-hovered`, on a row held under the pointer by `hoveredRow`. A real pointer's row wears none, its look being `:hover`, so a skin that dresses the hover writes both:
|
|
463
|
+
|
|
464
|
+
```css
|
|
465
|
+
[data-slot="vk-grid-row"]:hover,
|
|
466
|
+
[data-slot="vk-grid-row"][data-hovered] { … }
|
|
467
|
+
```
|
|
468
|
+
- `GridTable` takes `cellPick`, a `GridCellPick`: a cell, and ranges from one corner to the other, the last the active one. The grid draws them as a person's click and drag do (`data-focused`, `data-in-range`, `data-range-edge`), placing them each time the value changes, without taking the page's focus. While `cellPick` is given, null included, a press outside the grid lets go of nothing; a person's click, drag, keys and Escape still move the pick, and `onCellPickChange` tells you each change, or null. Left out, a press outside clears the pick, as before.
|
|
469
|
+
|
|
470
|
+
```tsx
|
|
471
|
+
<GridTable
|
|
472
|
+
{...props}
|
|
473
|
+
cellPick={{ cell: { row: "d3", column: "stage" }, ranges: [{ from: { row: "d3", column: "stage" }, to: { row: "d6", column: "value" } }] }}
|
|
474
|
+
/>
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
- `GridCellPick` and `GridCellAt` (`/grid`), the pick's types.
|
|
478
|
+
- `GridTable` takes `openColumnMenu`, a column's id, and stands that column's menu open on the first row of column names, through your `Menu` or `Popover` as a press opens it, its header cell `data-open`. While it is given, null included, the menus open and close only as it says: a person's press on a header, a row that closes the menu or a press outside is told through `onOpenColumnMenuChange` (the column's id, or null), and you decide. Left out, a press opens and closes them, as before.
|
|
479
|
+
- The quick filters take `heldLabels` (`QuickFiltersConfig`, `/panels`): the words of what the hold holds that the fields don't list, by field key, each a `QuickHeldLabels` with the field's `label` and each held value's words by its key. Keep them with your hold: a value held that no option lists any more (a deleted record, a retired option) then shows by its name, in ViewKit's panel and in your own `QuickFiltersBody`, where it showed by its key. A value the field lists keeps its own words; with none handed, a value shows by its key, as before.
|
|
480
|
+
|
|
481
|
+
```ts
|
|
482
|
+
<ToolbarQuickFilters
|
|
483
|
+
quickFilters={{
|
|
484
|
+
fields,
|
|
485
|
+
hold, // [{ fieldKey: "company", values: ["c_9f2"] }]
|
|
486
|
+
heldLabels: { company: { values: { c_9f2: "Acme Ltd" } } },
|
|
487
|
+
onHoldChange: setHold,
|
|
488
|
+
}}
|
|
489
|
+
/>
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
- `quickFieldsShown` (`/panels`): the fields the strip shows, those offered then each other field holding a value. `quickValuesShown` takes the field's held words as an optional fifth argument.
|
|
493
|
+
- `data-as-typed`, the mark on a phone drawn as typed (not read as international), is a state of the contract, `as-typed` in `ATOM_STATES`, beside `platform`. A skin checked against the contract's lists can dress it: `[data-slot="vk-phone"][data-as-typed]`.
|
|
494
|
+
- A phone's value is a part of the contract, `data-slot="vk-phone"` (`ATOM_SLOTS`): its `tel:` link, or its text where the slot owns the click or there is nothing to dial, alone and as each value shown in a list. ViewKit draws it as before; your skin gives a phone a look of its own at rest by it, a link's colour and an underline for example:
|
|
495
|
+
|
|
496
|
+
```css
|
|
497
|
+
[data-slot="vk-phone"] { color: var(--vk-fg-brand); text-decoration: underline; }
|
|
498
|
+
```
|
|
499
|
+
- An app's own `FilterBody`, open on the where of a relation the list no longer lists, is handed `relation.gone`: why, in words ("Its relation is no longer in this list", `views.panels.filter-relation-gone`), for its Add filter's disabled reason. On a relation the list lists it is absent. The relation's `label` falls back to the app's `goneFields` label before its key.
|
|
500
|
+
- A message key, `views.field-row.empty` ("Empty"), under a new namespace, `views.field-row.*`: what a field row the viewer may edit draws when it holds nothing.
|
|
501
|
+
- The display's other marks are states and parts of the contract, so a skin checked against the contract's lists can dress them: `converted` (a money figure shown in another currency than its record's), `partial` (a breakdown sparkline's bar for the period not yet complete), `cell-link` (a link whose plain click the host owns) and `no-nav` (a value whose press is its own, not the row's) in `ATOM_STATES`, and `vk-conversion` (the figure as shown, under a money editor) in `ATOM_SLOTS`. Nothing draws differently.
|
|
502
|
+
- `VK_INTERNAL_MARKS` names `data-vk-fit` and `data-vk-fit-value`, the marks a cell fitting its values measures by. They're ViewKit's own, like `VK_INTERNAL`: not public, not for a skin to style, and free to change in any release.
|
|
503
|
+
- `AdvancedFilter` and the bar's `{ kind: "advanced" }` item carry `aside: true` when the advanced filter holds rules and every one of them is set aside.
|
|
504
|
+
- A message key, `views.panels.advanced-filter-set-aside` ("Its rules are set aside"). An app whose resolver words every key adds it.
|
|
505
|
+
- A message key, `views.selection.more-none` ("No more actions for these"). An app whose resolver words every key adds it.
|
|
506
|
+
- `LocationEditor` takes `clearable`: its own body ends with a Clear row that empties the whole place, the country included, and commits `null` (nothing when the place was already empty). Default false. A body you hand as `PartsBody` is unchanged: it is still told it may be emptied by `allowEmpty`.
|
|
507
|
+
- The sort pill's + can be left out: `ToolbarSortPill` (`/panels/react`) takes `addAfter`, true by default. Handed `false`, as the kit's bar has it since its editor gained Add sort, the pill draws no + after "Sorted by …", and its editor (ViewKit's own, or your `SortBody`, handed `addSort: true`) has Add sort at its foot. The empty Sort still opens the fields. The ready toolbar doesn't pass it on.
|
|
508
|
+
|
|
509
|
+
```tsx
|
|
510
|
+
<ToolbarSortPill sorts={panels.sorts} addAfter={false} />
|
|
511
|
+
```
|
|
512
|
+
- An app can hand ViewKit its own field list: `FieldsBody` in the components map, typed `ViewsFieldsBodyProps` (a field is a `ViewsFieldsBodyField`). Handed one, everywhere ViewKit opens the sort's fields opens it in place of ViewKit's own rows: the empty Sort, Sort on the row's right, the + after the pill, and inside ViewKit's own sort editor Add sort, a rule's field and a set-aside sort's field, on a computer and on a phone. It is handed `purpose: "sort"`, the options as data (each marked as the grid's header marks its column, and a field another rule sorts `disabled` with "Sorted"), `own` (the rule's field being changed), `form`, and hands back the pick through `onPick`; a key not offered, or offered disabled, writes nothing. `onDone` closes what holds it with no pick. `SortFieldList` takes `onDone` and `form` for it.
|
|
513
|
+
- `SortBody`'s options (`ViewsSortBodyProps.options`), and Customize's sort section handed to `CustomizeBody`, carry what marks each field as the grid's header marks its column: its field's `type` (a place's part: the place's), the `part` it sorts by, and the header's `glyph`, drawn with your icons. Each is absent for an option your app built with no column behind it. `FieldsBody`'s fields carry the same.
|
|
514
|
+
- The panels' `SortOption` gains `part` and `mark`, and `FilterEditorField` gains `mark` (`/panels`): a field's mark (its type, its binding's icon, its column's own glyph), which the builder reads from the column. `FilterBody` and Customize's filter section are handed the fields without it.
|
|
515
|
+
- `FieldsBody` opens for a filter too: Filter and the + on the bar, a filter's field on the bar, a set-aside filter's field, and inside ViewKit's own filter editor Add filter and a rule's field, on a computer and on a phone. It is handed `purpose: "filter"`, the list's own fields, then, where a relation rule can stand, each relation with its `far` fields one level in, each marked as the grid's header marks its column, and the filter's field being changed as `own`. A pick is written as ViewKit's own list writes it: a relation's far field holds a relation rule on the bar until its value is picked. A key not offered writes nothing. `FilterFieldList` takes `onDone` and `form` for it.
|
|
516
|
+
- An app can hand ViewKit its own way and value for a filter rule: `FilterPartBody` in the components map, typed `ViewsFilterPartBodyProps`. Handed one, a rule's way and its value open it on the bar and in ViewKit's own filter editor, on a computer in a popover and on a phone on the editor's page, in place of ViewKit's ways menu and value body; never inside `FilterBody`'s `ruleValue`. It is handed `part` (`way` or `value`), the rule as data, its field, the ways its field offers and ViewKit's own value body (`own`, for a type your body doesn't draw), and hands back the rule through `onRuleChange`: a new way is written as ViewKit's own writes one, the value kept where it fits and emptied where not; a value is written once its way holds it, or emptied, the rule then waiting for its value. A rule naming another field or part, a way its field doesn't offer or a value its way can't hold writes nothing. ViewKit keeps the held rule, the Or top's wrap and the bar's keys.
|
|
517
|
+
- `FilterGoneField.relation`: hand a related list's field that the list no longer shows (an archived one, say) with
|
|
518
|
+
the relation's field key, and a set-aside rule inside that relation's where is named by its label and its values by
|
|
519
|
+
their options' labels, in the filter editor's set-aside row and on the bar ("Company › QA far"). A far field no entry
|
|
520
|
+
names still shows by its key.
|
|
521
|
+
- `asideFilterWords` takes a fifth argument, `relation`: the relation's field key, for a rule inside a relation's
|
|
522
|
+
where. Its field is then read among that relation's far fields, listed or handed as gone for it.
|
|
523
|
+
|
|
524
|
+
### Changed
|
|
525
|
+
|
|
526
|
+
- The peer `@viewkitjs/fields` is `^0.15.0` (it was `^0.14.0`): `ListHold` and `ListSettings.showCounts` are read from it.
|
|
527
|
+
- A Filter row over a relation, a user or an actor offers its records in the order your host handed them in `knownValues` (`@viewkitjs/postgres` hands them most held first), then the records on screen your host didn't name, A to Z. Before, every option was sorted A to Z, burying the most used. Hand `knownValues` in the order you want offered.
|
|
528
|
+
- With Hide empty groups on, the Group panel lists an empty group in its own place in the list's order, dimmed, where it listed every empty group after the shown ones. A drag in the panel, or a switch of its order to your own, keeps an empty group's place. A group the person hid is still listed after the shown ones. `GroupBody` receives its `groups` in the same order.
|
|
529
|
+
- An element inside your `PartsBody`, `ValuesBody`, `TextBody` or `NumberBody` that carries `EDITOR_INNER_ESCAPE` keeps its own Escape, as a popup you draw outside the body already did: your body hears it and the editor stays open, in the popover, in a grid cell and in the phone's sheet. A list you draw in your rows' place can go back to the rows on Escape; call `preventDefault()` on that Escape, so nothing around the editor takes it too. Escape anywhere else in your body still follows the field type's rule, and a body that marks nothing inside its element sees no change.
|
|
530
|
+
- `ViewOptionsPopoverPanel` hands its `sorts` and `filterTree` on to the panel.
|
|
531
|
+
- Show counts is part of the view. `ReadyToolbar` reads it from `settings.showCounts`, for the views row and the quick filters, and Customize's Show counts writes it back through `onChange` as a `ListSettingsChange`, where the toolbar used to hold it itself. A list whose settings say nothing shows its counts, as before; a saved view now keeps the choice.
|
|
532
|
+
- `ReadyToolbar`'s `showCounts` and `onShowCountsChange` are deprecated and go in the next release. Handed, they still win over the view's value for now. Keep Show counts in the settings instead:
|
|
533
|
+
|
|
534
|
+
```tsx
|
|
535
|
+
// Before
|
|
536
|
+
<ReadyToolbar {...list} showCounts={showCounts} onShowCountsChange={setShowCounts} />
|
|
537
|
+
// After: the settings carry it, and the toolbar writes it through onChange
|
|
538
|
+
<ReadyToolbar {...list} />
|
|
539
|
+
```
|
|
540
|
+
- A value held on a field the strip doesn't offer can be let go in ViewKit's panel: the field shows in its strip after the fields offered, named by its `heldLabels` label (else its key), with its held values alone, and leaves the strip once its last value goes. Where you cleared such a hold yourself, you no longer need to. Your own `QuickFiltersBody` is handed that field in `fields` too, after the fields offered.
|
|
541
|
+
- A field row the viewer may edit, holding nothing, draws the word for empty, muted in the colour of the read-only dash, inside its edit button. Before, it drew nothing: the button showed only on hover. A row the viewer can't edit still draws "—", and a yes/no its off state.
|
|
542
|
+
- A message resolver that words every key (a `switch` with no default) must word `views.field-row.empty`: until it does, it is a compile error. A resolver that words keys from its own catalog and hands the rest to ViewKit's English shows "Empty", in the row and in its button's name, until its catalog words the key.
|
|
543
|
+
- A field row's edit button is named by the field's label, then the value as the row draws it: a screen reader hears "Stage, Won, button" where it heard "Stage, button". A row holding nothing says your word for empty ("Terms, Empty"); a chip, a link or several values say their visible text ("Tags, Ops Sales"); a row still loading, and a rich text, keep the label alone. The verb menu's trigger keeps the label alone.
|
|
544
|
+
- A test that finds a row's edit button by its label alone (`getByRole("button", { name: "Stage" })`) no longer finds it: find it by the new name (`{ name: "Stage, Won" }`), or by its start (`{ name: /^Stage, / }`).
|
|
545
|
+
- `RowsWait` now wraps a grid's rows, not the whole grid. Before, its `children` were the grid's frame, column names and footer included, so a bar drawn along its top ran over the column names, and dimming it dimmed them and the footer. Now the column names stand above the slot and an ungrouped grid's footer below it, as they are, and a bar along the slot's top lies along the rows' top. Grouped, every group is inside the slot with its bar, column names and footer, and the one row of column names `oneHeader` draws stays above it. The slot now stands inside the grid's scroll area: draw it as a block in flow that neither scrolls nor clips, and drop any sizing that made it fill the grid's frame (`h-full`, a growing column flex), which it no longer needs. Its top now scrolls with the rows: a bar along it used to stay at the grid's top, and now sits at the first row's top and leaves sight once the grid is scrolled; a bar meant to stay in sight pins itself, sticky at `top: var(--vk-head-h)` under the column names. The slot mounts afresh when the grid changes shape (empty to rows, grouped to ungrouped, `oneHeader`), never during a wait. A grid with no rows yet still draws Loading in place of the whole grid, and an app that hands no `RowsWait` sees nothing change.
|
|
546
|
+
- With no verb spilled into it, the selection bar's More stays in its place as a Tab stop: `aria-disabled` rather than the `disabled` attribute, a press opening nothing, and why in your `Tooltip`. While a batch runs it is disabled as before, like every verb. Your `Button` receives `aria-disabled` and should forward it to its element.
|
|
547
|
+
- On a phone (below the provider's `desktopQuery`), a field row stands its label above its value, so the value takes the row's width: an email beside its mail button, or a phone number, reads whole. Before, the label kept its 128px column on every width and left the value about 130px on a 390px screen. On a desktop the row is unchanged. An editor open in a row stays open, with what was typed, when the screen crosses the line.
|
|
548
|
+
- A row your app draws by hand on the field row's frame (glyph, a `w-32` label, the value) lines up with it on a desktop as before; on a phone, stand its label above its value too, or it will no longer match the rows around it.
|
|
549
|
+
- A field row's date editor opens with the keyboard in its date box on a desktop, as the grid's date editor, the place editor and the long select already do: a date typed at once lands there, and Enter saves it. Before, the calendar opened with the keyboard left on the page, and the keys went nowhere. A `DateBody` you hand opens focused there too (its `autoFocus` follows the same rule). A phone's sheet still opens with the keyboard down.
|
|
550
|
+
- With a field row's editor open in its popover on a desktop, an Escape heard from the page itself or from an element holding the row closes that editor and goes no further. Before, an app's drawer or dialog around the row that listens for Escape on the document could hear it first and close the whole record. An Escape inside the editor's popover reaches your popover as before, and one from anywhere else on the page is left as it was. Grids, and the editors a row opens in place, are unchanged.
|
|
551
|
+
- A field row's place editor ends with a Clear row where the field may be empty (`nullable`), on a desktop and in a phone's sheet, as its date editor does. Before, a place could not be emptied there: its country stayed, so clearing every box saved a place that was only a country. A place that is only its country still saves as one.
|
|
552
|
+
- A field row's write that waits behind another save of the same record is sent when the page goes, instead of being lost. Before: writes to one record ran one at a time, always, so an edit made while an earlier one was saving waited for that save's answer, and a page closed or reloaded meanwhile took it with it. Now: they still run one at a time while the page stays; when the page goes (`pagehide`), every write still waiting is checked again against the latest saved row and sent at once, inside the event. Your write target's `save` may then be called for a record whose earlier save, on another field, hasn't answered, and the two may reach your server in either order. A save meant to outlive the page is yours to send with `fetch(…, { keepalive: true })` or a beacon.
|
|
553
|
+
- A gone field handed without `relation` names only a rule on the list's own field: a rule inside a relation's where
|
|
554
|
+
whose far field has the same key no longer takes its label, nor a list field the far field's.
|
|
555
|
+
- A rule left under a relation the list no longer has shows its own key ("name"), where it showed the label of the
|
|
556
|
+
list's field with the same key ("Name").
|
|
557
|
+
- The bar names a far field its relation doesn't list as "Company › key", where it read "key".
|
|
558
|
+
- A grid's select or status cell over a list with no search, opened from the keyboard (Enter, or a letter typed on the cell) on a computer, now opens ViewKit's own list with the focus on the option it holds: ↓ and ↑ walk the options and Enter saves the one reached. Before, the focus stayed on the cell, so ↓ and Enter went to the grid and only a click could pick. A list opened by a click, a list with a search, a phone's sheet, and an app's own `Picker` (which already took the focus) open as before.
|
|
559
|
+
- A new filter on a related record's field is written into the view at once, as a filter on the list's own field is:
|
|
560
|
+
from the bar's Filter and +, from the filter editor's Add filter on a computer and on a phone, from your
|
|
561
|
+
`FieldsBody`'s far pick, and when a filter on the bar is turned to a related record's field. Left without its value,
|
|
562
|
+
it stays after a reload, says what it waits for ("Type a value", "Choose") and narrows nothing until its value is in,
|
|
563
|
+
as before for a relation rule whose where holds no whole rule. Only a yes/no, the list's own or a related record's,
|
|
564
|
+
is still held until its value is picked, since a yes/no rule with no value is refused. Your `filterTree.onChange` now
|
|
565
|
+
receives the new relation rule with its far rule's empty value at the pick.
|
|
566
|
+
|
|
567
|
+
### Fixed
|
|
568
|
+
|
|
569
|
+
- 0.8.0's entry now lists the filter editor's twenty message keys under Added, as its own line said it did.
|
|
570
|
+
- The selection bar's verbs that open something say so to a screen reader: a group verb and More carry `aria-haspopup="menu"`, an options verb `aria-haspopup="dialog"`, and on a phone Actions `aria-haspopup="dialog"` for its sheet, each with `aria-expanded` while it is open. Your `Button` receives both props; one that spreads its props onto a `<button>` passes them on.
|
|
571
|
+
- In a narrow Columns list (a drawer's Columns popover), a column's name no longer collapses to its first letter beside its format label: the label gives its room up and truncates first, and the name truncates only when the row is too narrow for it. At a full page's width both read as before.
|
|
572
|
+
- A stored sort on a place with no part (`{ fieldKey: "address", direction }`, no `by`), which both answering sides sort by city, now shows as the sort by city: the sort pill, the sort editor and Sort read "Address · City", and the column's header marks it sorted. The stored sort is read as it is, never rewritten.
|
|
573
|
+
- A Sort row's value, in ViewKit's own English, names its direction in words: "Created, descending" and "Name, ascending", where it read "Created desc". `views.panels.sort-value` still hands your resolver `{ label, dir }` with `dir` as `asc` or `desc`, so a resolver that words the key itself is unchanged.
|
|
574
|
+
- Your `NumberBody` is handed the unit just picked: after it calls `onValueChange(value, "GBP")`, it is drawn with `unit: "GBP"`, as `value` is the value just typed. It was handed the unit the cell opened with until the editor closed, so a currency list kept ticking the old one. A body that hands back the `unit` it is drawn with on every change now keeps the pick.
|
|
575
|
+
- A yes/no column that writes no longer marks its grid cells `aria-readonly="true"`: a screen reader announced the cell as read-only while a press on its box wrote it. A cell is read-only to assistive technology when its column can't be written, a locked column and a read-only list included, whether or not an editor opens on it.
|
|
576
|
+
- A name's `PartsBody` that hands its full name back as the first and last name joined puts the name back to following them: a later first or last name moves the full name again. Before, any full name handed back other than the one drawn stayed the person's own for the rest of the edit. A stored full name the parts would not give follows them too once handed back that way.
|
|
577
|
+
- The toolbar search opened from its button shows its ✕ at its end for as long as it is open, empty or not, on a phone and a computer; a press clears the search and closes it, as Escape does. Before, an open, empty search had no ✕, so on a phone only a tap elsewhere put it away. A search field that fills its line (the narrow form, a phone with no views) keeps its ✕ "Clear" once something is typed.
|
|
578
|
+
- A text, number, range or date filter's box wrote what was typed only after a short idle (200 ms, 300 ms for a day), and a box taken away inside that wait (a Sheet's ✓ or a swipe, a popover closing, the Filter panel's Back or the phone filter editor's back row) dropped it: the box showed "acme", the filter held "acm". Each box now also writes what still waits the moment it goes away; Enter and the box's clear still write at once, once. Your `Popover` or `Sheet` may keep its content through a close animation or unmount it at once: either way, what was typed is written.
|
|
579
|
+
- A day typed in a date's box just before its way changes (Between's end, then Is before) no longer writes the old way back: the date body merges each write into the rule as last drawn, keeping only the days its way holds.
|
|
580
|
+
- On a phone, the filter editor's ✕ still takes the rules back to what they were as the sheet opened: a write that lands after it, such as a box writing as the sheet closes, is dropped until the sheet opens again.
|
|
581
|
+
- The filter editor, open on a related record's rule whose relation the list no longer lists, offered the list's own fields (and Related records) under Add filter, so a pick wrote a rule on the list's own field inside that relation's where. Add filter there now stands disabled with its reason, a Tab stop that offers nothing, at the editor's foot and at a group's foot inside the relation, on a computer and on a phone. Its rules can still be deleted. Under a relation the list lists, Add filter offers its far fields as before.
|
|
582
|
+
- In the filter editor, a set-aside rule's way and value, a set-aside relation's way, and the field of a rule under a relation the list no longer lists stay Tab stops: `aria-disabled`, a press opening nothing, never the `disabled` attribute, their reason in your `Tooltip` around them, as the bar's set-aside parts already were. They are dimmed by `opacity-50`, since your `Button` no longer sees `disabled`. On a phone the editor's rows change with them.
|
|
583
|
+
- Copying a relation's grid cell (⌘C, ⌘X, the row menu's Copy and Cut, a range) puts its records' names on the clipboard, comma separated, where a column whose stored value holds only ids or links (`editRead`) put the ids. The copy reads the names from what the cell shows (the binding's `read`). A copy and paste inside the grid still carries the stored links whole, roles and lead kept. A column that draws its own cell (`accessor: null`) copies its stored value, as before.
|
|
584
|
+
- A relation of one copied and pasted inside the grid lands on the very record copied when its column stores a bare id or `{ kind, id }`, from a fixed list or a remote source alike, even where two records share a name. Such a paste was refused before; it now reads the copied id, never the name.
|
|
585
|
+
- A phone kept as typed whose text holds no digit ("Ask reception for Jo") draws as its text, no longer as a link to `tel:` that dials nothing: in a grid's cell, a field row and a cell's whole list. It keeps `data-as-typed` and its title. A phone kept as typed with digits still links to them, and an international one is unchanged.
|
|
586
|
+
- The Filter panel's related-record body offers "every" only when its Where holds a rule that narrows the related records: a whole rule on a field they have. A Where whose only rules are set aside, or name a field the related records don't have, offers "any" and "none", with "every" disabled and its reason, as an empty Where does. `canChooseEvery` answers the same, and a group counts when one of its rules does. Such a rule is still kept: taking out the last rule that narrows doesn't drop an "every" rule that still holds one.
|
|
587
|
+
- Under such a relation, ViewKit writes nothing from a `FilterBody` level that adds or changes a rule: its far fields are unknown, so its rules may be kept or deleted only. A rule on the list's own field was written there before.
|
|
588
|
+
- A control that can't be used and says why (a set-aside filter's way and value, the field of a filter under a relation the list no longer lists, a full Add filter, a toolbar button with a reason) now carries its reason as its description, so a screen reader reads it with the control.
|
|
589
|
+
- In a narrow Columns list, a column's name now reads in full beside its format label whenever the row can hold it: the label gives up its room first, down to nothing, and the name is cut only when the row is too narrow for it alone.
|
|
590
|
+
- The filter editor's value box says a rule's value alone ("Northwind", "10", "20 – 100"), its comparison left to the way box beside it, on a computer and a phone. Until the rule is whole it says what it waits for by its type, as the bar does ("Type a value", "Type a number", "Choose a date", "Choose" for a pick), where it said "Choose" for every type (VK-592). The rule with no value stays in the view.
|
|
591
|
+
- The bar's value part says a range's value alone too ("20 – 100", "50"), where it repeated its comparison ("Overlaps 20 – 100", "≥ 50"). The box and the bar take their words from one helper.
|
|
592
|
+
- `views.panels.filter-choose` stays in the messages and is drawn nowhere.
|
|
593
|
+
- An advanced filter whose rules are all set aside no longer reads "Advanced filter 0". Its pill is drawn set aside, as a set-aside filter is: the toolbar button's `aside` (`data-aside`, the dashed warning edge), no count, and why in your `Tooltip`. It still opens the filter editor, where its rules show set aside. In "+N filters" it shows no count either.
|
|
594
|
+
- A `cellPick` you hand in comes back with its row. When a filter or a folded group takes the picked row out of sight, the grid no longer tells `onCellPickChange` null: the pick you hand stays the pick, and the grid places it again once the row is drawn. Without `cellPick`, a pick whose row is gone is still told null.
|
|
595
|
+
- A press on the grid's empty ground (below the rows, past the last column) lets a held `cellPick` go and tells `onCellPickChange` null, as Escape does. A press outside the grid still lets go of nothing while you hand a pick.
|
|
596
|
+
- With `openColumnMenu` handed in, `onOpenColumnMenuChange` hears each change once: a press on the open menu's own header tells one null, not two, and a press on another column's header tells that column alone, with no null before it.
|
|
597
|
+
- A filter whose top level joins by Or, with every rule set aside, now shows on the bar instead of nothing: one advanced filter drawn set aside, as a group of only set-aside rules is (the toolbar button's `aside`, no count, why in your `Tooltip`). It opens the filter editor on its rules, still joined by Or, and the view is not written until it is edited. `advancedFiltersOf` and `barItemsOf` return it as `{ path: [], count: 0, aside: true }` (the bar's with `kind: "advanced"`) where they returned `[]`; an Or top holding no rule still returns `[]`.
|
|
598
|
+
- On a phone, with `pinFooter` and rows picked, the rows went on drawing below the footer once it rose above the selection bar: a strip in the step between the footer and the bar, and whole rows beside and behind the bar. The rows now end at the footer's bottom while a bar stands, and that stretch shows what the grid stands on. A computer, a grid with no bar, and a grid with no pinned footer draw as before.
|
|
599
|
+
- In the quick-filters panel, a held value your `counts` don't list (a search or the view leaves it out) shows by its words with no count, after the counted values, and can still be let go. It no longer reads as a count of 0 you never gave. A value your `counts` list shows its count as before, held or not, and a value you list with no count still shows 0. `quickValuesShown` returns such a held value with no `count`.
|
|
600
|
+
- A set-aside filter whose field the list holds again names its value by that field's option labels ("Active"), on the bar, in the sentence a screen reader hears and in the filter editor, where it showed the stored value ("active"). A field the list no longer shows is still named by the options your app hands in `filterTree.gone`.
|
|
601
|
+
|
|
602
|
+
### Removed
|
|
603
|
+
|
|
604
|
+
- `QuickValues`, `QuickValueField`, `quickValuesFromTree` and `withQuickValues`. They wrote quick picks as ordinary filter rules; a quick filter now holds values on top of the view instead, as fields' `ListHold`, never on the filter bar. Where you wrote picks into the filter, keep a hold and narrow with it:
|
|
605
|
+
|
|
606
|
+
```ts
|
|
607
|
+
// Before
|
|
608
|
+
const filter = withQuickValues(settings.filter, quickFields, { stage: ["won"] });
|
|
609
|
+
// After
|
|
610
|
+
const hold: ListHold = [{ fieldKey: "stage", values: ["won"] }];
|
|
611
|
+
const filter = withHold(settings.filter, hold, reader.fieldOf); // from @viewkitjs/fields/query
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### For an adapter
|
|
615
|
+
|
|
616
|
+
- A `Sheet` that draws its own head (`sheetActions: "head"`) draws `actions.back`, when handed, in `actions.close`'s place on the left, with its own back arrow, and keeps ✓. `close` stays handed beside it.
|
|
617
|
+
- For Escape to go back a step, your `Sheet` reports it as `onOpenChange(false, { reason: "escape-key" })`. A sheet that reports it with no reason, or as `none`, closes the whole editor on it, as before.
|
|
618
|
+
- Your `Tooltip`'s child may be a plain wrapper around the control it explains: open it on a keyboard focus that lands inside the wrapper, not only on the wrapper itself. A trigger that checks `:focus-visible` checks the focused element (`event.target`).
|
|
619
|
+
- Your `Button` forwards `aria-describedby` to its element, as it does `aria-disabled`.
|
|
620
|
+
|
|
621
|
+
## [0.8.0] — 2026-11-20
|
|
622
|
+
|
|
623
|
+
The kit's toolbar: the views, Customize, the search and New on one row, and under it a filter bar holding the sort
|
|
624
|
+
pill, each filter in four joined parts, the advanced filters and the set-aside rules, folding a step at a time as it
|
|
625
|
+
narrows. And/or groups and the filter editor, on a computer and on a phone; Add sort in the sort editor; your own sort
|
|
626
|
+
and filter editors (`SortBody`, `FilterBody`) and your own toolbar frame (`ToolbarSlotProvider`). In the grid: rows
|
|
627
|
+
kept on screen while new ones load (`RowsWait`), a body's popover over its cell (`gridBodyPlace`), the pinned band's
|
|
628
|
+
edge named (`data-frozen-edge`, `vk-grid-frozen-shadow`, `--vk-frozen-shadow`), a number stepped with ↑ and ↓, a
|
|
629
|
+
figure pasted or set shown at once, and the pinned parts painting no ground at rest. It needs `@viewkitjs/fields`
|
|
630
|
+
0.14.
|
|
631
|
+
|
|
632
|
+
What an app changes when it takes this version:
|
|
633
|
+
|
|
634
|
+
- **Install `@viewkitjs/fields` 0.14 beside it**: the peer is `^0.14.0` (it was `^0.13.0`). This version reads
|
|
635
|
+
nothing fields 0.14 adds; the range names the fields it is released with.
|
|
636
|
+
- **The ready toolbar draws the kit's arrangement** (`arrangement: "kit"`): the row, then a filter bar always shown,
|
|
637
|
+
with Clear and Save on it, and on a phone New as a round + at the screen's corner. `arrangement="row"` keeps the old
|
|
638
|
+
order, and `arrangement="row" severalSorts={false} filterGroups={false}` the toolbar exactly as 0.6.0 drew it
|
|
639
|
+
(Changed).
|
|
640
|
+
- **And/or groups are on** (`filterGroups`, true by default): each filter and each advanced filter stands on the bar, a
|
|
641
|
+
filter whose top joins by Or shows as one advanced filter, and on a phone Filter opens the filter editor instead of
|
|
642
|
+
the filter list. Pass `filterGroups={false}` to keep the list and Filter's count (Changed).
|
|
643
|
+
- **Set-aside filters and sorts now show**, on the bar and in the editors, and a set-aside sort holds one of the three
|
|
644
|
+
sort places (Added, Changed).
|
|
645
|
+
- **`views.panels.filter-set-aside` is removed**: an override of it is no longer read; word
|
|
646
|
+
`views.panels.filter-set-aside-why`, by the rule's reason, instead (Removed). The new message keys are listed under
|
|
647
|
+
Added: a resolver that falls back to `resolveViewsMessage` reads them in English; one that words every message with
|
|
648
|
+
a `switch` and no default, or a catalogue typed over every `ViewsMessageKey`, must word them.
|
|
649
|
+
- **At rest the grid's pinned parts paint no ground** (the pinned columns, the checkbox rail, the column names, a
|
|
650
|
+
group's head, a pinned footer): an app that drew a ground only through them sets one on the grid's own host
|
|
651
|
+
(Changed).
|
|
652
|
+
- **With a `TextBody` or `NumberBody` handed, the grid's cell editor stands over the whole cell**, not inside its
|
|
653
|
+
padding (Changed).
|
|
654
|
+
- **Your `ToolbarButton` atom is handed five more props**, `iconAlone`, `aside`, `foot`, `joined` and `waits`: draw
|
|
655
|
+
them, and keep them off the props you spread onto your `<button>` (For an adapter).
|
|
656
|
+
- **New options, each off or unset by default**: `gridBodyPlace` on the provider; `RowsWait`, `SortBody` and
|
|
657
|
+
`FilterBody` in the components map; `addSort` on the sort editor; `Toolbar`'s `fold`; and the variables
|
|
658
|
+
`--vk-toolbar-foot`, `--vk-frozen-shadow` and `--vk-frozen-shadow-width`, each defaulting to what the package drew
|
|
659
|
+
before (Added).
|
|
660
|
+
- **No export is removed**: every name 0.7.0 exported is still exported; only the message key above is gone.
|
|
661
|
+
|
|
662
|
+
### Added
|
|
663
|
+
|
|
664
|
+
- A set-aside filter shows on `ReadyToolbar`'s filter bar, in its place among the filters. That is a rule your reading
|
|
665
|
+
of the settings set aside, or one whose field the list no longer lists. It is drawn as the kit draws it:
|
|
666
|
+
- its field is the toolbar button's `aside`, dashed in the warning colour, naming why on hover; it opens the fields,
|
|
667
|
+
and a pick points the rule at a field the list has, keeping its way where the field offers it and emptying its
|
|
668
|
+
value, whose list then opens;
|
|
669
|
+
- its way and its value are named by what they hold, disabled, with why;
|
|
670
|
+
- its ⋯ holds why, Put back once its field fits again, and Delete filter.
|
|
671
|
+
|
|
672
|
+
It narrows nothing until a person puts it back or finishes pointing it at another field. Folded into "+N filters",
|
|
673
|
+
a pick opens its field.
|
|
674
|
+
- `FilterEditor`, on a computer and in a phone's Filter sheet, shows a set-aside rule the same way: its field box
|
|
675
|
+
dashed and pointing it at another field (a phone turns the sheet's body to the fields), its way and value disabled
|
|
676
|
+
with why, its ⋮ holding why, Put back once it fits, and Delete condition. A set-aside relation rule, or one whose
|
|
677
|
+
relation the list no longer lists, is named by its relation and way, its rules not drawn, its ⋮ the same; a rule
|
|
678
|
+
under a relation the list no longer lists can only be deleted.
|
|
679
|
+
- The sort editor shows each set-aside sort after the rules, on a computer and a phone. Its field is dashed and
|
|
680
|
+
points it at another field. Its direction is disabled with why. Its ⋯ holds why, Put back once it fits, and Delete.
|
|
681
|
+
A phone's ✕ brings back a set-aside sort deleted since its sheet opened.
|
|
682
|
+
- While only set-aside sorts stand, the sort pill's empty Sort is dashed in the warning colour and opens the sort
|
|
683
|
+
editor, so they can be seen.
|
|
684
|
+
- `barItemsOf` returns a top-level set-aside rule or relation rule as `{ kind: "aside", path, node }`.
|
|
685
|
+
- `putBackAt(tree, path)` puts back the set-aside rule at a path. `setAsideFits(node, fields, relation?)` says whether
|
|
686
|
+
a set-aside rule fits the editor's fields again. `asideFilterWords` gives what a set-aside filter says, with `why`.
|
|
687
|
+
- `SortRulesConfig.setAside` lists the set-aside sorts (`SetAsideSortRule`: `fieldKey`, `by`, `label`, `dir`, `reason`,
|
|
688
|
+
and `value`, the sort key once it fits, else null). `onChange(rules, setAside?)` takes, when handed, the set-aside
|
|
689
|
+
sorts to keep: any it leaves out are deleted. `openSortPlaces(sorts)` is how many more rules fit.
|
|
690
|
+
- Message keys: `views.panels.filter-set-aside-why` and `views.panels.sort-set-aside-why` (`{ reason }`), and
|
|
691
|
+
`views.panels.put-back`.
|
|
692
|
+
- Slots: `vk-toolbar-filter-aside` (a set-aside filter on the bar) and `vk-sort-aside` (a set-aside sort's row).
|
|
693
|
+
- ↑ and ↓ step a number in ViewKit's own number box: ↑ adds 1 and ↓ takes 1, Shift with either 10, from 0 when the box
|
|
694
|
+
is empty. A step keeps within the field's `min` and `max` (a percent's 0 and 100 unless the field widens them) and is
|
|
695
|
+
written to the field's decimals. Text that reads as no number, a duration, and an arrow with ⌘, Ctrl or Alt don't
|
|
696
|
+
step. Nothing is drawn for it. An app that hands its own `NumberBody` is unchanged: its keys are its body's.
|
|
697
|
+
- A range's two boxes step the same way, each on its own. `RangeEditor` takes optional `min` and `max`, the lowest and
|
|
698
|
+
highest either end may hold.
|
|
699
|
+
- `Toolbar`'s `fold`: the kit's arrangement for parts you place yourself. Line 1 is the row and line 2 the filter bar,
|
|
700
|
+
a step smaller, or one line on a phone; there is no narrow form, and each line gives way as it narrows. A
|
|
701
|
+
`ToolbarPlacement` may say `shed` (its words may turn to its icon), `tabs` (how many of its view tabs may fold into
|
|
702
|
+
"+N") and `fold` (it may go behind ⋯), and `role: "separator"`. A `ToolbarPart` that may fold hands its `menu`
|
|
703
|
+
(`{ label, icon?, onSelect }`), its row behind ⋯. A folded part keeps its state, and what it opens hangs under ⋯.
|
|
704
|
+
The line holds still while ⋯'s menu, a folded part's panel or the views' "+N" list is open. Without `fold`, a
|
|
705
|
+
`Toolbar` draws its three forms as before.
|
|
706
|
+
- `ToolbarSeparator`, the line between the sort and the filters on a filter bar (or Filter while there is none).
|
|
707
|
+
- `ToolbarSave`, Clear and Save, from a `CollectionViewState`, or Clear alone from an `onClear`.
|
|
708
|
+
- `foldSteps` and `foldState` (`/panels`), the steps a folding line takes and what each stage holds; `arrangeToolbar`
|
|
709
|
+
takes `{ fold: true }`, and `ToolbarLine`'s kind may be `bar`.
|
|
710
|
+
- `ViewFooter` takes `words: "kit"` (Clear and Save) and, with no `view`, `onClear` (Clear alone). `ToolbarOptions`
|
|
711
|
+
and `ViewOptionsPanelContent` take `viewFoot` (`"kit"` or `"none"`) and `footClear`.
|
|
712
|
+
- `ViewAxes` and `FoldingViewRow` take `folded`: how many tabs fold into "+N", in place of measuring their own room.
|
|
713
|
+
- The words `views.panels.toolbar-more` ("More", ⋯), `views.panels.view-clear` ("Clear") and `views.panels.view-save`
|
|
714
|
+
("Save").
|
|
715
|
+
- `ToolbarFilters`, the filters on a filter bar, for an app that arranges its own toolbar: the builder's `filterTree`,
|
|
716
|
+
and optionally `open` and `onOpenChange` (Filter and +'s fields), `held` and `onHeldChange` (the rule waiting for its
|
|
717
|
+
value, held by you so your placement counts it, typed `Pending`) and `host`. `foldableFilters(tree, held)` is how many
|
|
718
|
+
of its filters may fold, for its placement.
|
|
719
|
+
- A toolbar part's placement takes `filters`, how many of its filters may fold into "+N filters"; the fold steps fold
|
|
720
|
+
them one at a time after the view tabs and before ⋯ (`foldSteps`, `foldState`'s `filtersFolded`), and
|
|
721
|
+
`useToolbarSlot()` hands a part its `filtersFolded`.
|
|
722
|
+
- The filter bar's reading of the tree: `barItemsOf` (each filter the bar shows, `BarItem`), `addOnBar` and
|
|
723
|
+
`barAddRefusal` (adding at the end, a top joined by Or wrapped first, and why it can't), `followBarKeys` (each
|
|
724
|
+
filter's key across a write) and `barFilterWords` (what a filter says, `BarFilterWords`).
|
|
725
|
+
- The toolbar button's `joined` (`start`, `middle` or `end`: buttons drawn as one, `data-joined`) and `waits` (words
|
|
726
|
+
saying what it waits for, in the placeholder's colour, `data-waits`); a button's own words keep to one line, cut with
|
|
727
|
+
"…" where its place is capped. An adapter's toolbar button draws both.
|
|
728
|
+
- Message keys: `views.panels.filter-waits`, `views.panels.filter-way-words`, `views.panels.filter-far-field`,
|
|
729
|
+
`views.panels.filter-rule-words`, `views.panels.filter-add-one`, `views.panels.filter-delete`,
|
|
730
|
+
`views.panels.filter-more` and `views.panels.filter-more-named`.
|
|
731
|
+
- Slots `vk-toolbar-filters`, `vk-toolbar-filter-rule`, `vk-toolbar-filter-add`, `vk-toolbar-more-filters` and
|
|
732
|
+
`vk-toolbar-filters-panel`; states `joined` and `waits`.
|
|
733
|
+
- `gridBodyPlace` on `ViewsProvider` (`ViewsGridBodyPlace`, from `@viewkitjs/views/react`): where a grid editor opens
|
|
734
|
+
the popover around a whole body your app hands (`Picker`, `DateBody`, `PartsBody`, `ValuesBody`) on a computer.
|
|
735
|
+
`under`, the default, keeps it 4px under the cell; `over` hands your `Popover` a `sideOffset` of minus the cell's
|
|
736
|
+
height, so its top stands on the cell's top. Give that popover at least the cell's width, so a press where the cell
|
|
737
|
+
was lands inside it. ViewKit's own bodies stay under the cell, and a field row and the phone's sheet are unchanged.
|
|
738
|
+
- A list's filter can hold and/or groups on screen, when the builder is handed `filterGroups: true`. `settingsPanels`
|
|
739
|
+
then hands `filterTree` (`FilterTreeConfig`: the tree, the fields a rule can name, one writer shared with the Filter
|
|
740
|
+
rows, and each rule's value as the Filter panel's own body for its field edits it), which `settingsFilterTree` also
|
|
741
|
+
builds alone, with the helpers `filterEditorFields`, `newRuleFor`, `newRelationRuleFor`, `heldUntilWhole`,
|
|
742
|
+
`emptyValueFor`, `withOperator`, `withField`, `filterWaysOf` and `takesValue`.
|
|
743
|
+
- The tree's operations by path (`FilterPath`), every one keeping the tree to 3 levels and 50 items a group: `nodeAt`,
|
|
744
|
+
`itemsAt`, `joinAt`, `addAt`, `replaceAt`, `removeAt` (a group or relation rule left empty goes with it), `setJoinAt`,
|
|
745
|
+
`canGroupAt` and `groupAt`, `canExcludeAt` and `setExcludedAt` (Exclude matches: a group joined by And made "not all
|
|
746
|
+
of"), `shownRuleCount`, `advancedFiltersOf`, `orLevelWrapped`, `settled`, `clearedTree`, `editView`, `editIn` and
|
|
747
|
+
`followAdvancedKeys`.
|
|
748
|
+
- `ToolbarAdvancedFilters`, an advanced filter's pill: "Advanced filter" with its rules counted, one for each group at
|
|
749
|
+
the filter's top (or the whole of a top joined by Or), opening the filter editor in your `Popover`.
|
|
750
|
+
- `FilterEditor`, the filter editor on a computer: each rule's field, how it compares and its value, each its own box
|
|
751
|
+
opening its list, then ⋮ (Convert to group, Delete condition); the second rule's join turning every join at its
|
|
752
|
+
level; groups within groups to 3 levels, each with Add filter, Delete group and Exclude matches; a relation rule as a
|
|
753
|
+
block, Any, None or Every where, its rules on the related record's fields. Every filter type and operator draws in
|
|
754
|
+
it, each value in its type's own body. A new yes/no rule, and a new relation block, wait in the editor until their
|
|
755
|
+
value is picked; every other new rule narrows nothing until it is whole.
|
|
756
|
+
- `FilterFieldList`, the fields a rule names, a relation's fields one level in; `FilterValueBody`, a rule's value alone.
|
|
757
|
+
- A Filter row whose rule can turn advanced carries `convert`, and `CompactFilterDetail` and `FilterPanelContent`
|
|
758
|
+
take `onConverted`: handed it, a filter's page shows Convert to advanced filter at its foot.
|
|
759
|
+
- `DateFilterBody` takes `operator={false}`, leaving its operator's menu out.
|
|
760
|
+
- `farWhereInputs` and `rootRuleIndexes`, what the Related records rows and Convert read.
|
|
761
|
+
- `usePhoneFilterEditor` and `PhoneFilterEditor`: the filter editor on a phone, in your `Sheet`, on every rule of the view. Each rule is Where or its join over its boxes, then ⋯ (Convert to group, Delete condition); groups nest to 3 levels with Add filter, Delete group and Exclude matches. Each box's list, a relation's Any, None or Every and Add filter's fields turn the sheet's body behind a back row, never a sheet on top. With no rule it reads "No filtering set up yet". ✕ takes the rules back to what they were when the sheet opened, in one change; ✓, a swipe, the dim and Escape keep them.
|
|
762
|
+
- `editWhole`: an edit on the whole filter tree in place, settled and kept to 3 levels.
|
|
763
|
+
- Four words: `views.panels.filter-empty`, `views.panels.filter-empty-line`, `views.panels.filter-clear-all` and `views.panels.filter-done`.
|
|
764
|
+
- `data-frozen-edge` (`GRID_STATES`): the header cell, the cells and the footer cell of the last pinned column carry
|
|
765
|
+
it, where the pinned band ends, wherever the title stands. With a column moved before the name two columns are
|
|
766
|
+
pinned and `data-frozen` stands on both; `data-frozen-edge` on the name's alone. To rule the pinned band's edge once,
|
|
767
|
+
turn `verticalBorders` off and draw the line on `[data-frozen-edge]`; `[data-frozen]` still rules every pinned
|
|
768
|
+
column.
|
|
769
|
+
- The footer's pinned cells carry `data-frozen`, as the header's and the rows' do. A rule on `[data-frozen]` now
|
|
770
|
+
reaches them too.
|
|
771
|
+
- `SortEditor` and `useSortEditor` take `addSort`: on a computer, Add sort stands at the editor's foot, after the
|
|
772
|
+
set-aside sorts (slot `vk-sort-add`). It opens the fields in your `Popover`, and a pick adds a rule at the end,
|
|
773
|
+
ascending. At three, a set-aside sort holding one of the places, it can't be used and says why. Off by default: on a
|
|
774
|
+
computer the editor leaves adding to what holds it, as before. A phone's editor has Add sort either way.
|
|
775
|
+
- While only set-aside sorts stand, the sort editor the sort pill's dashed Sort opens has Add sort at its foot, so a
|
|
776
|
+
sort can be added without putting back or deleting the set-aside one first. It stays while the editor is open, also
|
|
777
|
+
once the first rule is added.
|
|
778
|
+
- The components map takes an optional `RowsWait` (`ViewsRowsWaitProps`: `pending` and `children`). Handed one, a grid
|
|
779
|
+
that already shows rows keeps them on screen while new ones load (`transitionPending`, or the commit after
|
|
780
|
+
`transitionKey` changes), out of reach (`inert`), as the slot's children, and hands it `pending: true`: you draw how
|
|
781
|
+
they wait, a bar along the top or the rows dimmed. When the wait ends the new rows mount and `pending` is false. A
|
|
782
|
+
grid with no rows yet still draws your Loading atom in place of its body. Make the slot's box fill as the grid's
|
|
783
|
+
frame does. Left out, nothing changes: every wait draws Loading in place of the body, as before.
|
|
784
|
+
- The shadow at the pinned columns' edge, shown while they are parked, is a part of the contract,
|
|
785
|
+
`vk-grid-frozen-shadow` (`GRID_SLOTS`): one element down each group's rows, one on the column names' rail and one on
|
|
786
|
+
the footer's, where it was an unnamed box and the rails' own `::after`.
|
|
787
|
+
- Its look is two variables, each with today's look as its default: `--vk-frozen-shadow`, the colour it fades from
|
|
788
|
+
(`rgb(0 0 0 / 0.15)`, `rgb(0 0 0 / 0.6)` in the dark), and `--vk-frozen-shadow-width` (`calc(var(--spacing)*1.5)`,
|
|
789
|
+
what `w-1.5` drew). An app that draws its own pinned edge turns ViewKit's off with either variable alone
|
|
790
|
+
(`--vk-frozen-shadow: transparent`) or with a rule on the part.
|
|
791
|
+
- An app can hand ViewKit its own sort editor: `SortBody` in the components map, typed `ViewsSortBodyProps`. Handed
|
|
792
|
+
one, the sort pill opens it in place of ViewKit's own sort editor, in its popover on a computer and in the Sheet on a
|
|
793
|
+
phone (and so does anything that opens `SortEditor` or `useSortEditor`'s body). It is handed the rules, the
|
|
794
|
+
set-aside sorts, the fields, `max`, `form` and `addSort`, and hands back the whole rules on every change
|
|
795
|
+
(`onRulesChange`) and `onDone`; on a phone where the sheet's head doesn't draw them, it is handed the ✕ and ✓ as
|
|
796
|
+
`actions`. ViewKit checks each list against the rules and writes nothing when one breaks them, and keeps what ✕
|
|
797
|
+
takes back to. Left out, the pill opens ViewKit's own sort editor, as before.
|
|
798
|
+
- The contract's `### A panel's body` writes down the pattern every toolbar panel's body follows, `SortBody` the first.
|
|
799
|
+
- An app can hand ViewKit its own filter editor: `FilterBody` in the components map, typed `ViewsFilterBodyProps`.
|
|
800
|
+
Handed one, an advanced filter's pill opens it in place of ViewKit's own filter editor on a computer, and Filter opens
|
|
801
|
+
it in the Sheet on a phone (and so does anything that opens `FilterEditor`, `PhoneFilterEditor` or
|
|
802
|
+
`usePhoneFilterEditor`'s body). It is handed the level it is open on (`filter`: an advanced filter's group, or the
|
|
803
|
+
whole filter on a phone), the fields a rule may name, `levels`, `excludable`, `relation` where it stands on a
|
|
804
|
+
relation's where, `form`, and `ruleValue`, a rule's value in ViewKit's own body; it hands back the whole level on every
|
|
805
|
+
change (`onFilterChange`) and `onDone`; on a phone where the sheet's head doesn't draw them, it is handed the ✕ and ✓
|
|
806
|
+
as `actions`. ViewKit checks each level against the rules and writes nothing when one breaks them, wraps an Or top
|
|
807
|
+
into one advanced filter on its first write, takes an advanced filter emptied away, and keeps what ✕ takes back to.
|
|
808
|
+
Left out, both open ViewKit's own filter editor, as before.
|
|
809
|
+
- `PhoneFilterEditor` takes an optional `onDone`, which an app's `FilterBody` calls.
|
|
810
|
+
- `ToolbarSlotProvider` and `ToolbarRadioProvider`, for a toolbar frame of your own: the toolbar's parts fold in it as they do in `Toolbar`. Place `ToolbarRadioProvider` around your frame, so the parts' panels close each other, and each part in a `ToolbarSlotProvider` whose `slot` says where it stands and how far its line gave way: its words to its icon (`iconAlone`), its view tabs into "+N" (`tabsFolded`), its filters into "+N filters" (`filtersFolded`), itself behind your ⋯ (`folded` with `more`, your ⋯ button). What you leave out stays the default: the row's main line at `md`, folding nothing, in your provider's form (`"phone"` off a desktop).
|
|
811
|
+
|
|
812
|
+
```tsx
|
|
813
|
+
<ToolbarRadioProvider>
|
|
814
|
+
<MyToolbar>
|
|
815
|
+
<ToolbarSlotProvider slot={{ fold: true, tabsFolded: 2 }}>
|
|
816
|
+
<ToolbarViews views={views} />
|
|
817
|
+
</ToolbarSlotProvider>
|
|
818
|
+
<ToolbarSlotProvider slot={{ fold: true, iconAlone: true }}>
|
|
819
|
+
<ToolbarNew onAdd={onAdd} />
|
|
820
|
+
</ToolbarSlotProvider>
|
|
821
|
+
</MyToolbar>
|
|
822
|
+
</ToolbarRadioProvider>
|
|
823
|
+
```
|
|
824
|
+
- The filter editor's twenty message keys: `views.panels.advanced-filter`, `views.panels.filter-join`, `views.panels.filter-clear-all-filters`, `views.panels.filter-to-group`, `views.panels.filter-delete-rule`, `views.panels.filter-delete-group`, `views.panels.filter-exclude`, `views.panels.filter-exclude-needs-and`, `views.panels.filter-excluded`, `views.panels.filter-to-advanced`, `views.panels.filter-field`, `views.panels.filter-value`, `views.panels.filter-choose`, `views.panels.filter-search`, `views.panels.filter-relation-way`, `views.panels.filter-rule-actions`, `views.panels.filter-group-actions`, `views.panels.filter-or-full`, `views.panels.filter-too-deep` and `views.panels.filter-too-many`.
|
|
825
|
+
|
|
826
|
+
### Changed
|
|
827
|
+
|
|
828
|
+
- `barItemsOf` returns a top-level set-aside rule as an `aside` item where it returned none. A toolbar holding only
|
|
829
|
+
set-aside filters now shows them and +, not the empty Filter.
|
|
830
|
+
- A set-aside sort holds one of the three sort places. Adding a sort stops at three counting it, and says why. A
|
|
831
|
+
column header's sort pick lets the last live rule give way, never the set-aside sort.
|
|
832
|
+
- At rest the grid paints no ground of its own: the pinned Name column, its footer cell, the checkbox rail, the column names and a group's head show the page behind them, and paint `--vk-ground` only while the table is scrolled sideways or a head is stuck at the top. The name's row actions take the row's hover. An app that drew a ground only through these parts now sets one on the grid's own host.
|
|
833
|
+
- The grid's and a field row's number and range editors hand the field's `min` and `max` to ViewKit's own boxes as
|
|
834
|
+
well as to an app's body, so a step keeps within them. Typing past a limit is refused at the close as before.
|
|
835
|
+
- The number editor and the range editor's two boxes open on the stored number as a person types it: rounded to the
|
|
836
|
+
field's decimals, with no zeros at its end and no grouping. A whole 58,000 in a two-decimal money field opens as
|
|
837
|
+
`58000`, not `58000.00`; 58,000.5 opens as `58000.5`. Closing it untouched still writes nothing, and a value stored
|
|
838
|
+
with more digits than the field keeps (10.235 in a two-decimal field) no longer writes its rounded self when closed
|
|
839
|
+
untouched. What a cell shows at rest is unchanged, and so is `formatNumberText` of `@viewkitjs/fields`.
|
|
840
|
+
- `ReadyToolbar` draws the kit's arrangement by default (`arrangement: "kit"`). On a computer:
|
|
841
|
+
- the row holds the views, Customize beside them, and the search (a button that opens) and New at its end;
|
|
842
|
+
- under it the filter bar, always shown, a step smaller: the sort pill first, a separator, each filter in its place
|
|
843
|
+
with the advanced filters' pills among them (Filter, an empty place, while there is none), and Clear and Save at
|
|
844
|
+
its end while the list differs. Several sorts and and/or groups stay on;
|
|
845
|
+
- Clear takes the list back: a shared view (`view`) back to everyone's (`onReset`), or, with no shared view, the
|
|
846
|
+
list back to its default (nothing filtered, the default sort, no group), so a list that starts grouped or filtered
|
|
847
|
+
shows Clear at once. Save keeps a shared view for everyone (`onPublish`), shown only where `canPublish`
|
|
848
|
+
allows it; anyone else sees Clear alone. Customize's foot no longer carries them on a computer;
|
|
849
|
+
- a row with no room folds one step at a time from its end: words turn to icons, then the view tabs fold into "+N",
|
|
850
|
+
then the bar's last filters fold into "+N filters", then Customize, the sort and Filter (while there is no filter)
|
|
851
|
+
go behind ⋯. This replaces the narrow form under 700px. New, the search, Clear and Save never fold.
|
|
852
|
+
|
|
853
|
+
On a phone, one line: the views, the sort, Filter, Customize, then the search, which opens across the line. Clear and
|
|
854
|
+
Save stand in Customize's foot (with no shared view, Clear alone), and New is a round + fixed at the screen's
|
|
855
|
+
bottom-end corner, over the list. If your app keeps a bar at its foot, lift the + above it with
|
|
856
|
+
`--vk-toolbar-foot` (undeclared, `1rem`), set to that bar's height plus the room you want. The + is drawn into the
|
|
857
|
+
document's body, fixed to the screen, so: a list inside a drawer or a sheet has its + behind that overlay; two ready
|
|
858
|
+
toolbars on one phone page stack two + in the same corner; and `--vk-*` variables or a dark theme you declare on a
|
|
859
|
+
wrapper rather than on `:root` don't reach it.
|
|
860
|
+
|
|
861
|
+
To keep the order the toolbar had before, the views on the left and search, sort, filter, options and new on the
|
|
862
|
+
right with the narrow form under 700px:
|
|
863
|
+
|
|
864
|
+
```tsx
|
|
865
|
+
// before
|
|
866
|
+
<ReadyToolbar {...list} columns={columns} />
|
|
867
|
+
// to keep it
|
|
868
|
+
<ReadyToolbar {...list} columns={columns} arrangement="row" />
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
And for the toolbar exactly as 0.6.0 drew it, one sort and Filter without and/or groups:
|
|
872
|
+
|
|
873
|
+
```tsx
|
|
874
|
+
<ReadyToolbar {...list} columns={columns} arrangement="row" severalSorts={false} filterGroups={false} />
|
|
875
|
+
```
|
|
876
|
+
- `ReadyToolbar`'s filter bar holds each filter on a computer, as the kit's does. After the sort and its separator:
|
|
877
|
+
- each filter as four joined parts: its field, how it compares in lower case ("is any of"), its value (capped in
|
|
878
|
+
width and cut with "…", saying what it waits for until it is picked) and ⋯ (Convert to advanced filter, Delete
|
|
879
|
+
filter), each opening its own list. A related record's field stands as one filter, "Company › Industry";
|
|
880
|
+
- each advanced filter's pill, in its place among them;
|
|
881
|
+
- + after the last, opening the fields; while nothing filters, Filter, an empty place, in their stead. A pick adds a
|
|
882
|
+
filter at the end; a yes/no or a related record's field stands on the bar saying what it waits for and writes
|
|
883
|
+
nothing until its value is picked. Over a filter joined by Or, adding first wraps it into one advanced filter;
|
|
884
|
+
where nothing more can be added, Filter and + are disabled and say why;
|
|
885
|
+
- as the bar narrows its last filters fold into "+N filters", one at a time, which names each and opens what a
|
|
886
|
+
pick opens under itself. A filter with a part open, a rule waiting for its value and the filter that rule
|
|
887
|
+
replaces never fold, and the bar holds still while a part, an advanced filter or "+N filters"' menu is open.
|
|
888
|
+
|
|
889
|
+
The default has and/or groups on (`filterGroups`), and the filters stand on the bar only with them. In the kit
|
|
890
|
+
arrangement with `filterGroups={false}`, Filter keeps its count on the bar:
|
|
891
|
+
|
|
892
|
+
```tsx
|
|
893
|
+
<ReadyToolbar {...list} columns={columns} filterGroups={false} />
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
On a phone, and in `arrangement="row"`, Filter stays as it was.
|
|
897
|
+
- `editView` reads a top-level relation rule the bar shows as an advanced filter wrapped in a group of its own at its
|
|
898
|
+
place; where that would pass 3 levels, `FilterEditor` edits the relation in place, its relation and Any, None or
|
|
899
|
+
Every where heading the editor and its rules naming the relation's far fields.
|
|
900
|
+
- In a folding line an advanced filter's pill carries `data-open` while it is open, so the line holds still.
|
|
901
|
+
- With a `TextBody` or `NumberBody` handed, the grid's editor in a cell on a computer stands in a layer over the whole
|
|
902
|
+
cell, 1px past each edge so it covers the cell's lines, instead of inside the cell's padding. Your body fills the
|
|
903
|
+
layer's height and sets its own width. The cell keeps its padding, a body that grows still rises over the rows below
|
|
904
|
+
and the frozen columns, and a refusal or a converted figure hangs from the layer's edge. ViewKit's own editors are
|
|
905
|
+
unchanged.
|
|
906
|
+
- `ReadyToolbar` has and/or groups on (`filterGroups`, true by default). On a computer each advanced filter's pill
|
|
907
|
+
stands on the filter bar among the filters, and each filter's ⋯ there offers Convert to advanced filter; in
|
|
908
|
+
`arrangement="row"` the pills stand after Filter, and a filter's page offers Convert. Pass `filterGroups={false}`
|
|
909
|
+
to keep today's Filter. On a phone the pills and Convert don't show yet, and the phone's Filter keeps its own panel.
|
|
910
|
+
- With `filterGroups`, a filter whose top joins by Or shows as one advanced filter, untouched until someone edits it:
|
|
911
|
+
the Filter rows show none of its rules, and a filter added from them first wraps it under an And top. An Or that
|
|
912
|
+
shows no rule reads and writes as And.
|
|
913
|
+
- With `filterGroups`, Options' count counts each advanced filter, and its Clear (`settingsCleared(…, "options")`)
|
|
914
|
+
empties every rule and group, keeping the set-aside rules at the top; Filter's ✕ still clears its rows alone. That
|
|
915
|
+
Clear also takes away top-level rules no row shows (a rule on a row you disabled, or one its row can't read), which
|
|
916
|
+
Clear kept before.
|
|
917
|
+
- The filter editor offers each column's own value body, even where your `filterData.declared` replaces that column's
|
|
918
|
+
Filter row.
|
|
919
|
+
- `settingsFilters(input, writer?)` takes the build's shared writer (`filterWriter`); called without one, it builds
|
|
920
|
+
its own, as before.
|
|
921
|
+
- `ToolbarFilter` takes the builder's `filterTree`. Handed it, on a phone Filter opens the filter editor on every rule, an advanced filter's included, and its count and ✕ read the advanced filters too. An app handing both `filterTree` and a time range or date ranges loses them on a phone, since the phone's filter editor draws none.
|
|
922
|
+
- `ReadyToolbar` hands its Filter the filter tree: on a phone, with and/or groups on (the default), Filter opens the filter editor instead of the filter list. Pass `filterGroups={false}` to keep the list.
|
|
923
|
+
- `settingsCleared(…, "filters", { phone: true })` with and/or groups also empties the advanced filters.
|
|
924
|
+
- With `pinFooter`, the footer paints `--vk-ground` only while rows pass under it, and carries `data-stuck` then, as the column names and a group's head do. At rest (its rows end above it, few rows leave it standing at the foot, or a group's footer closes its group) it paints nothing and shows what the grid stands on. A skin that dresses `[data-stuck]` without naming a part now dresses the pinned footer too.
|
|
925
|
+
|
|
926
|
+
### Fixed
|
|
927
|
+
|
|
928
|
+
- The column names' line and each row's line now run under the checkbox rail from the grid's left edge, where a row's hover and a picked row's tint already start.
|
|
929
|
+
- A grid row, its column names and a group's footer place each cell in its own column, so an element added to a row (by an app's menu, a portal or a browser extension) can no longer move its cells a column right or wrap the row.
|
|
930
|
+
- A part column's edit made while a second ⌘Z waits builds on what that ⌘Z will put back, also when the edit it
|
|
931
|
+
undoes was itself typed while the first ⌘Z waited. It built on the whole the first ⌘Z took back, and the undo
|
|
932
|
+
was lost for that cell.
|
|
933
|
+
- The column names and a group's head read again whether they are stuck when the grid's size changes without a scroll (rows loaded or filtered away, a group folding).
|
|
934
|
+
- A number, a percent or an amount typed into a grid cell and saved shows in the cell at once, before your app answers or its rows are read again, as a field row shows it. Your `onCellCommit` is still handed `{ value, unit }`. A figure shown converted from the record's currency, an amount saved in a currency the record didn't hold, and a column with its own `render` still wait for the rows. A second edit of the cell while the first save waits now opens on the figure the cell shows, so its undo puts that figure back.
|
|
935
|
+
- A number, a percent or an amount pasted into a grid cell (⌘V or the cell menu's Paste), filled down, or set from the selection bar's `setColumnValue` now shows in its cells at once, before your app answers or its rows are read again, as the same figure typed into the cell does. Your `onCellCommit` and `onCellsCommit` are still handed the value as before. Where a typed figure waits for the rows, these wait too: a figure shown converted from the record's currency, an amount in a currency the record doesn't hold, a record with no currency of its own, and a column with its own `render`. A second paste, fill or set over a cell while the first write waits now builds on the figure the cell shows, so its undo puts that figure back. A bar set on an amount or a percent column no longer draws `[object Object]` until the rows come back.
|
|
936
|
+
- A value set from the selection bar's `setColumnValue` now paints its cells as a paste of the same value does. A date shows at once, before your app answers, where a date typed into the cell does, instead of waiting for the rows to be read again. A relation, a range and a list of several values keep what the cell shows until the rows come back, instead of drawing what your app is sent (a blank relation cell, or the new range or list before your app answered).
|
|
937
|
+
- While rows are selected, a grid keeps its last row and a pinned footer (`pinFooter`) a step above the selection bar `renderBar` draws, measured where it stands, not a fixed 3rem: a taller or shorter bar is cleared by its own height, and where `renderBar` draws nothing a pinned footer stays on the foot. The grid finds the bar in its frame or ViewKit's own `SelectionBar`; a bar portalled out of the frame by the app isn't seen.
|
|
938
|
+
- A paste into a grid cell of a relation holding several records is no longer always refused. A copy of another row's cell of the column links the same records, each link keeping its roles and the lead, as a fill does. Text from outside names records by their labels, separated by commas ("Okapi Health, Northbeam Logistics"), and the records it names replace the cell's links; a label none of the column's candidates has refuses the paste, naming it. On a column whose candidates come from a search, text is still picked from the list. Your `onCellCommit` and `onCellsCommit` receive the set as the cell's editor sends it: the ids, or the links. A relation of one pastes as before.
|
|
939
|
+
|
|
940
|
+
### Removed
|
|
941
|
+
|
|
942
|
+
- `views.panels.filter-set-aside`. An override of it is no longer read: the words now come from
|
|
943
|
+
`views.panels.filter-set-aside-why`, by the rule's reason.
|
|
944
|
+
|
|
945
|
+
```ts
|
|
946
|
+
// Before
|
|
947
|
+
case "views.panels.filter-set-aside":
|
|
948
|
+
return "Set aside: this filter no longer fits the list";
|
|
949
|
+
// After
|
|
950
|
+
case "views.panels.filter-set-aside-why":
|
|
951
|
+
return message.values.reason === "missing-field" ? "Set aside: its field is gone" : "Set aside: it no longer fits";
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
### For an adapter
|
|
955
|
+
|
|
956
|
+
- Your `ToolbarButton` receives three new props:
|
|
957
|
+
- `iconAlone`, in a folding row with no room: draw its icon alone, whatever your dress says of words;
|
|
958
|
+
- `aside`, when what it names left the list: its edge dashed in the warning's colour;
|
|
959
|
+
- `foot`, New's + standing alone at a phone list's foot: round, a finger's size, on the brand's ground.
|
|
960
|
+
|
|
961
|
+
Mark them `data-icon-alone`, `data-aside` and `data-foot`, and keep all three off the props you spread onto your
|
|
962
|
+
`<button>`.
|
|
963
|
+
- Your toolbar button takes `joined` and `waits`: round only the outer corners of a joined button (`start` its start,
|
|
964
|
+
`end` its end, `middle` none), and draw the words of a button that `waits` in your placeholder's colour.
|
|
965
|
+
- No atom gains a prop: the pill is the `ToolbarButton` atom with its words (`children`) and a count in words
|
|
966
|
+
(`more`). New slots for your styles: `vk-toolbar-advanced-filter`, `vk-toolbar-advanced-filter-panel`,
|
|
967
|
+
`vk-filter-editor`, `vk-filter-rule`, `vk-filter-group`, `vk-filter-relation`, `vk-filter-fields` and
|
|
968
|
+
`vk-filter-convert`. A group's ground reads `--vk-neutral`.
|
|
969
|
+
|
|
970
|
+
## [0.7.0] — 2026-11-19
|
|
971
|
+
|
|
972
|
+
Several sorts: the sort pill, its +, the sort editor and a sorted header's mark. Beside them: a footer that pins at
|
|
973
|
+
the grid's foot (`pinFooter`), "+ Add column" in the title's header (`addColumnAt`), picking rows on a phone by a long
|
|
974
|
+
press (`phonePicking`), the panels' own buttons drawn by your `Button` (`panelButtons`), and thirteen optional
|
|
975
|
+
`--vk-*` variables for what the package used to fix in its classes. The grid's chrome and the panels switch at your
|
|
976
|
+
`desktopQuery`, a date and time is shown, picked and pasted in your conventions' zone, and ⌘Z takes back the step on
|
|
977
|
+
top when it is pressed. It needs `@viewkitjs/fields` 0.13, as 0.6.0 did.
|
|
978
|
+
|
|
979
|
+
What an app changes when it takes this version:
|
|
980
|
+
|
|
981
|
+
- **An app that hands no `desktopQuery` now switches at 1024px, not 768px**, everywhere: the grid's chrome (a row's
|
|
982
|
+
and a group's ⋯, the row actions, the search in "+ Add column"'s list), the toolbar's and the panels' searches, a
|
|
983
|
+
view pill's grip and a view's ⋯ take their phone form from 768 to 1023px wide, as the editors, the sheets and
|
|
984
|
+
"+ Add column" already did. To keep 768px, hand `desktopQuery: "(min-width: 768px)"`, which moves the editors and
|
|
985
|
+
the sheets there too (For an adapter).
|
|
986
|
+
- **A date and time is shown, picked and pasted in your conventions' zone** (`timeZone`), where it used the
|
|
987
|
+
browser's clock, on for every app; the editor's commit still travels as the browser's `YYYY-MM-DDTHH:MM`. Where
|
|
988
|
+
your zone is your reader's, nothing changes. A `DateBody` that works out days itself takes them from the `today`
|
|
989
|
+
it is handed (Fixed, For an adapter).
|
|
990
|
+
- **The ready toolbar sorts by up to three rules** (`severalSorts`, on by default): the sort pill stands where Sort
|
|
991
|
+
stood. Pass `severalSorts={false}` to keep Sort's one rule; with it on, pass `severalSorts: true` to the builder
|
|
992
|
+
call whose `sort` reaches your grid's header, or a header pick there replaces every rule (Changed).
|
|
993
|
+
- **Twenty new message keys**, `views.panels.sorted-by` and the `views.panels.sort-*` keys the sort pill and the
|
|
994
|
+
sort editor say. A resolver that falls back to `resolveViewsMessage` reads them in English; one that words every
|
|
995
|
+
message with a `switch` and no default, or a catalogue typed over every `ViewsMessageKey`, must word them (For an
|
|
996
|
+
adapter).
|
|
997
|
+
- **Your `ToolbarButton` atom is handed four more props**, and a panel's `Sheet` may be handed `actions.done`: draw
|
|
998
|
+
them, or the sort pill loses its words and the sort editor's sheet its ✓ (For an adapter).
|
|
999
|
+
- **New options, each off or unset by default**: `pinFooter`, `addColumnAt`, `phonePicking` and `sortMark` on
|
|
1000
|
+
`GridTable`; `panelButtons` on the provider, which hands your `Button` five more props and the `secondary` variant
|
|
1001
|
+
once you set it; and thirteen `--vk-*` variables, each defaulting to what the package drew before (Added, For an
|
|
1002
|
+
adapter).
|
|
1003
|
+
- **Nothing is removed**: every name 0.6.0 exported is still exported.
|
|
1004
|
+
|
|
1005
|
+
### Added
|
|
1006
|
+
|
|
1007
|
+
- A list sorts by up to three rules, one per field, when the builder is handed `severalSorts: true`. `settingsPanels`
|
|
1008
|
+
then hands `sorts` (`SortRulesConfig`: the fields, the rules in order, the default rules, the most, one writer),
|
|
1009
|
+
which `settingsSorts` also builds alone, with the helpers `addSortRule`, `canAddSortRule`, `sortedValues`,
|
|
1010
|
+
`sortedField`, `sortFieldOf`, `sortRulesLabel`, `withFirstRule` and `isSortRulesActive`. Every set-aside sort is kept after the rules a person
|
|
1011
|
+
sets. With a manual order, no rule means the rows' hand order: the first rule leaves it and the last one taken away
|
|
1012
|
+
returns to it.
|
|
1013
|
+
- `ToolbarSortPill`, the sort as a pill: "Sorted by" its first rule's field, the rest counted (+1), opening the sort
|
|
1014
|
+
editor, its words its name; a + after it, while there are fewer than three, opening the fields; an empty "Sort" with
|
|
1015
|
+
no rule, and nothing where the list sorts by nothing. On a phone, "Sort" with its rules counted, opening the sort
|
|
1016
|
+
editor in your `Sheet`, its ✕ taking back what changed since it opened and its ✓ keeping it.
|
|
1017
|
+
- `SortEditor` and `useSortEditor`, the sort editor: each rule's grip (dragged, or ↑ and ↓ on it), its field, its
|
|
1018
|
+
direction and ×; on a phone each rule a row with ⋯, then Add sort and Clear all. `SortFieldList`, the fields a rule
|
|
1019
|
+
is picked from, a field already sorted greyed "Sorted".
|
|
1020
|
+
- `ToolbarSort` takes `sorts` too: Sort on the row's right then adds a rule from the fields, is counted once there are
|
|
1021
|
+
two, and can't be used at three, saying why.
|
|
1022
|
+
- `GridTable`'s `sortMark`: a sorted column's header wears `icons.sortAsc` or `icons.sortDesc` after its name. Off by
|
|
1023
|
+
default.
|
|
1024
|
+
- The grid's state `data-desktop` on `vk-grid`: present while the provider's `desktopQuery` matches (and where the
|
|
1025
|
+
screen can't be asked), absent on a phone.
|
|
1026
|
+
- `addColumnAt` on `GridTable`: `"title"` stands "+ Add column" as a lone round + at the right edge of the title
|
|
1027
|
+
column's header, where it stays in reach while the columns scroll (with the identity columns frozen), and the tail
|
|
1028
|
+
keeps only a row's ⋯'s width. `"end"`, the default, keeps it the header row's last cell, as before. With no title
|
|
1029
|
+
column shown it stands at the end. A phone still shows it only with `addColumnOnPhone`; its list opens as before
|
|
1030
|
+
(the Popover from the +'s left edge, your `Menu` on the `menu` route, your `Sheet` on a phone), and → from the
|
|
1031
|
+
header's last column still reaches it.
|
|
1032
|
+
- `GridTable` takes `pinFooter`: the footer pins at the foot of the grid's scroll area, its figures in sight whatever the scroll, with the rows passing under it. It stands `--vk-scroll-inset-bottom` above the edge and, while rows are selected, clear of the selection bar. An ungrouped grid's footer stands at the foot even when its rows don't fill the area (in pages, just above the pager); a grouped grid's footers each pin while their group's rows run past the foot and close their group otherwise. Off by default: the footer stands after the last row, as before.
|
|
1033
|
+
- `GridTable` takes `phonePicking`: on a phone (below the provider's `desktopQuery`), a long press on a row (450 ms, touch or pen, giving up past 10 px or a scroll) ticks it and starts picking. While picking, every row shows its box inside the name column, before its picture (`data-slot="vk-grid-name-check"`), a tap toggles a row, and picking ends when the last row is unticked or the bar clears it. A grouped grid shows those boxes at all times: a group's titles row holds its box in the name column's head (the one row of titles, under `oneHeader`, picks every row), and the group's fold stands over the boxes. An ungrouped grid's header holds no box. With it on, a `RowMenu` of your own that answers a long press through `onToggleSelect` ticks the pressed row once with the grid's, never twice; called with no press held, `onToggleSelect` still flips the row last pressed. Off by default: on a phone the boxes stay in the rail and nothing answers a long press. A desktop is unchanged either way.
|
|
1034
|
+
- `panelButtons` on `ViewsProvider` (`"own" | "button"`, default `"own"`): with `"button"`, the buttons ViewKit draws itself in the toolbar's panels, the search's ✕ and the views row are drawn by your `Button`: a filter's select, a range's presets and its clears, the Columns and group lists' eyes and new-line marks, a column's opener, Clear all, Reset, show or hide every group, a panel header's back and ✕, Export, Publish, the "+N" chip, the + and the views picker's chip, rows and ⋯. Left unset, they draw exactly as before. The `ToolbarButton` atom's parts stay the atom's either way.
|
|
1035
|
+
- Thirteen optional CSS variables dress what ViewKit used to fix in its classes. Undeclared, each place keeps
|
|
1036
|
+
today's look; declared once, every place of its kind takes the value:
|
|
1037
|
+
- `--vk-duration`: transitions and a panel's slide (`150ms`; a cell button's caret `100ms`).
|
|
1038
|
+
- `--vk-caption-text`: text under the smallest step, among it a panel's section labels and the `+N` count
|
|
1039
|
+
(`10px`, or `11px`); `--vk-caption-leading`: the `+N` count's line height (`0.9rem`); `--vk-caps-tracking`:
|
|
1040
|
+
a panel section label's letter spacing (`0.15em`).
|
|
1041
|
+
- `--vk-input-text`: an editor's search and add boxes (`13px`); `--vk-panel-title-text`: a panel's title
|
|
1042
|
+
(`15px`); `--vk-sheet-text`: a phone sheet's rows (`15px`).
|
|
1043
|
+
- `--vk-underline-offset` (`3px`, or `2px`) and `--vk-underline-width` (`1px`): a link's and a chip's underline.
|
|
1044
|
+
- `--vk-thick-line`: the fill handle's rim and a field note's quote bar (`2px`).
|
|
1045
|
+
- `--vk-selected-stroke`: the active view's name in the view picker (`0.4px`).
|
|
1046
|
+
- `--vk-focus-ring`: the grid chrome's keyboard focus (its header and footer cells, a group's name and its own buttons), a whole `box-shadow` (`inset 0 0 0 2px var(--vk-brand)`).
|
|
1047
|
+
- `--vk-outline-hover-shadow`: the hovered cell's lift, a whole `box-shadow` (`0 1px 2px rgb(0 0 0 / 0.05)`, and
|
|
1048
|
+
`0.22` in the dark).
|
|
1049
|
+
|
|
1050
|
+
### Changed
|
|
1051
|
+
|
|
1052
|
+
- `ReadyToolbar` has several sorts on (`severalSorts`, true by default): the sort pill stands where Sort stood, and
|
|
1053
|
+
Options' count and its Clear read every rule. Pass `severalSorts={false}` to keep Sort's one rule.
|
|
1054
|
+
- With `severalSorts`, Sort's one-field pick (the grid header's menu, Customize's Sort page) sets the first rule and
|
|
1055
|
+
keeps the others, a header's Clear sort takes the first rule away, Manual empties every rule, and Clear goes back to
|
|
1056
|
+
the view's default sort as its one rule. A field sorts once: a place sorts by one of its parts. Pass
|
|
1057
|
+
`severalSorts: true` to the builder call whose `sort` reaches your grid's header, or a header pick there replaces
|
|
1058
|
+
every rule. A header writer of your own keeps the other rules, or pass `severalSorts={false}` to the ready toolbar.
|
|
1059
|
+
- The rendering contract (`docs/contract.md`) says, in a section of its own, what ViewKit draws and what an app
|
|
1060
|
+
dresses: every control through a component, an atom or a body; every colour, size, line, radius, shadow and timing
|
|
1061
|
+
through a `--vk-*` variable or the app's Tailwind scale; every part through its `data-slot` and every state through
|
|
1062
|
+
its attribute. ViewKit draws a plain control of its own only where an app hands nothing. The package's tests hold
|
|
1063
|
+
its rendering to it.
|
|
1064
|
+
- The contract's Row state section describes what a row is handed today. It no longer names a `useGridRowState`
|
|
1065
|
+
hook, which the package never had.
|
|
1066
|
+
|
|
1067
|
+
### Fixed
|
|
1068
|
+
|
|
1069
|
+
- The grid's own chrome (a row's ⋯, a group's ⋯, the row actions, and the search in "+ Add column"'s list) takes its
|
|
1070
|
+
phone or computer form where the provider's `desktopQuery` says, the line the editors, the sheets and "+ Add column"
|
|
1071
|
+
itself already switch on. It used to switch at a fixed 768px, so between the app's line and 768px the grid was half
|
|
1072
|
+
a phone's and half a computer's.
|
|
1073
|
+
- ⌘Z and ⌘⇧Z take back or put back the step that was on top when they were pressed. An edit made while one waited
|
|
1074
|
+
for a write could be taken back in its place.
|
|
1075
|
+
- An undo leaves alone a cell an edit made after its press wrote: that edit already carries what the undo puts back,
|
|
1076
|
+
and the undo no longer writes over it.
|
|
1077
|
+
- A refused undo or redo goes back where it was in the history, and a redo pressed right after a refused undo does
|
|
1078
|
+
nothing.
|
|
1079
|
+
- A part column's edit made while an undo or a redo waits builds on what it will put back.
|
|
1080
|
+
- A part column's edit made while a newer write of its cell is still out builds on that write when the rows hold the
|
|
1081
|
+
value the app stored for an older one. It built on the rows before, and could drop the newer write's change.
|
|
1082
|
+
- The toolbar's search, the panels' search, a view pill's drag grip and a view's ⋯ in the view picker take their
|
|
1083
|
+
phone or computer form where the provider's `desktopQuery` says, as the grid's chrome does. They used to switch at a
|
|
1084
|
+
fixed 768px, so between the app's line and 768px a toolbar over a grid could be in the other form from the grid.
|
|
1085
|
+
- An edit written over a cell while ⌘Z or ⌘⇧Z waited for that cell's write puts back, when it is undone, what that
|
|
1086
|
+
⌘Z or ⌘⇧Z put back. It put back the value the first undo had taken away.
|
|
1087
|
+
- A part column's edit made while ⌘Z waits builds on what the undo puts back also when the app confirmed the write
|
|
1088
|
+
being undone with its own `history` and a `stored` value together, and the rows had already caught up with it.
|
|
1089
|
+
- A date-and-time editor opens on, and takes, the time in your conventions' zone (`timeZone`), the hour its cell
|
|
1090
|
+
shows, where it used the browser's clock. Today and the quick days are that zone's, and a `DateBody` is handed its
|
|
1091
|
+
`value` and `today` on that zone's calendar. The commit keeps its form: the browser's `YYYY-MM-DDTHH:MM`, which
|
|
1092
|
+
`mergeLocalOntoInstant` lands on the instant typed. A time the zone skips commits nothing, and a day with no time
|
|
1093
|
+
lands at the zone's first instant that day (its midnight, or the moment its clocks land on where they skip it).
|
|
1094
|
+
Where your zone is your reader's, nothing changes. A date-only field still reads a stored instant's day on the
|
|
1095
|
+
browser's calendar, as its cell shows it, and a grid column of type `date` with no field, which shows a day, keeps
|
|
1096
|
+
its editor on the browser's clock, as before.
|
|
1097
|
+
- A date and time pasted into a grid cell as text with no offset (`2026-11-20 10:00`) is read in your conventions'
|
|
1098
|
+
zone (`timeZone`), as the date editor reads a typed one, where it used the browser's clock. Text with a `Z`, an
|
|
1099
|
+
offset or a zone name is still the instant it names. A day pasted alone lands at the zone's first instant that
|
|
1100
|
+
day, and a time the zone skips, or a day that doesn't exist (30 February), is refused as not a date rather than
|
|
1101
|
+
moved. A cell copied while its save is still out copies as its instant, so it pastes back the same. Where your
|
|
1102
|
+
zone is your reader's, a date and time with its time reads as before; a day pasted alone now lands at midnight.
|
|
1103
|
+
- The reason a refused value gave stays whole at the bottom of an editor's popover when your `Popover` caps its height to the room it has and scrolls (a date picker opened upward from a field row low on the window): the editor scrolls above it, on the popover's ground (`--vk-overlay`). A popover with room is unchanged, and so is the sheet.
|
|
1104
|
+
|
|
1105
|
+
### For an adapter
|
|
1106
|
+
|
|
1107
|
+
- The `ToolbarButton` atom is handed four more props: `children` (its own words, shown whatever the dress, with
|
|
1108
|
+
their weight: "Sorted by **Amount**"), `more` (a count in words at its end, "+1"), `empty` (an empty place, its
|
|
1109
|
+
edge dashed) and `disabledReason` (with `disabled`: why it can't be used, in your `Tooltip`, the button still a Tab
|
|
1110
|
+
stop and a press doing nothing). Handed `children`, its words are its name in place of `label`. An atom of your own
|
|
1111
|
+
draws them, or the sort pill and Sort lose their words.
|
|
1112
|
+
- A toolbar panel's `Sheet` may be handed `actions.done` (✓) beside `actions.close` when your provider's
|
|
1113
|
+
`sheetActions` is `head`: the sort editor's, whose `close` takes its rules back to what they were when the sheet
|
|
1114
|
+
opened. Draw both, or the one button left throws a person's changes away.
|
|
1115
|
+
- An app that hands no `desktopQuery` now sees, from 768 to 1023px wide, the grid's chrome in its phone form, as its
|
|
1116
|
+
editors, sheets and "+ Add column" already were there: a row's and a group's ⋯ always shown, no row actions on
|
|
1117
|
+
hover, and a 16px search in "+ Add column"'s list. To keep the chrome's old line, hand
|
|
1118
|
+
`desktopQuery: "(min-width: 768px)"`; that moves the editors and the sheets to 768px too, which is the line to hand
|
|
1119
|
+
when the app's own shell switches at 768px (shadcn's `useIsMobile` does).
|
|
1120
|
+
- The chrome's classes read the frame's `data-desktop` through the frame's own group (`group/gridtable`), so an
|
|
1121
|
+
element of the app's own carrying `data-desktop` above the grid never switches them.
|
|
1122
|
+
- With `"title"`, the + sits inside the title column's `vk-grid-header-cell`, after its name, carrying `data-open`
|
|
1123
|
+
while its list is open; a press on it never opens the column's menu, takes the cell's focus or starts a drag. With
|
|
1124
|
+
`gridButtons: "button"` it is your `Button`, `variant` `ghost`, `size` `icon`, its name as `aria-label` and `title`.
|
|
1125
|
+
- Your own `renderAddColumn` node is drawn there as it renders, so an app that sets both renders one that fits a
|
|
1126
|
+
header cell.
|
|
1127
|
+
- An app that hands no `desktopQuery` now sees these in their phone form from 768 to 1023px wide (a 16px search, the
|
|
1128
|
+
grips hidden, a view's ⋯ always shown), as its grid already is there. To keep 768px, hand
|
|
1129
|
+
`desktopQuery: "(min-width: 768px)"`, which moves the grid, the editors and the sheets there too.
|
|
1130
|
+
- A `DateBody` that works out days itself (today, a week on) takes them from the `today` it is handed, not from its
|
|
1131
|
+
own clock, or its picks fall on another day near midnight.
|
|
1132
|
+
- `ViewsButtonProps` takes five more optional props, handed only with `panelButtons: "button"`: `aria-pressed`, `role`, `aria-selected`, `data-state` and `data-vs-row`, and its `variant` takes `secondary` (the views picker's chip, a filled chip with no border). Before you set the option, draw `secondary` and forward each of the five to your element, with the ref, `aria-haspopup`, `aria-expanded` and `data-slot` your `Button` already forwards for `gridButtons`.
|
|
1133
|
+
- Nothing to change: every variable is optional, and its default is what the package drew before. Declare one on the
|
|
1134
|
+
grid, a panel or an ancestor to restyle every place of its kind; `docs/contract.md`, Tokens, lists each.
|
|
1135
|
+
- Twenty new message keys, said by the sort pill and the sort editor: `views.panels.sorted-by`, `sort-more`,
|
|
1136
|
+
`sort-add-one`, `sort-add`, `sort-clear-all`, `sort-sorted`, `sort-max`, `sort-empty`, `sort-empty-line`,
|
|
1137
|
+
`sort-ascending`, `sort-descending`, `sort-direction`, `sort-field-named`, `sort-direction-named`, `sort-delete`,
|
|
1138
|
+
`sort-move`, `sort-remove`, `sort-actions`, `sort-search` and `sort-done` (each `views.panels.`). A resolver that
|
|
1139
|
+
falls back to `resolveViewsMessage` reads them in English; one that words every message with a `switch` and no
|
|
1140
|
+
default must word them.
|
|
1141
|
+
|
|
1142
|
+
## [0.6.0] — 2026-11-18
|
|
1143
|
+
|
|
1144
|
+
The controls. Both panels doors ship: `@viewkitjs/views/panels`, what a list's panels read and say, built from its
|
|
1145
|
+
settings with no React, and `@viewkitjs/views/panels/react`, the panels as they draw, the toolbar's frame, its parts
|
|
1146
|
+
and `ReadyToolbar`, every panel opening as a sheet on a phone. Beside them: whole bodies an app draws for the
|
|
1147
|
+
editors (`TextBody`, `NumberBody`, `PartsBody`, `ValuesBody`), the grid drawn with your own checkboxes, buttons and
|
|
1148
|
+
avatars, a field row drawn with your own checkbox and buttons, a grid that shows one page at a time with its pager
|
|
1149
|
+
(`pages`), a place column sorted by its parts, and country names in the reader's names language. It needs
|
|
1150
|
+
`@viewkitjs/fields` 0.13.
|
|
1151
|
+
|
|
1152
|
+
What an app changes when it takes this version:
|
|
1153
|
+
|
|
1154
|
+
- **Install `@viewkitjs/fields` 0.13** beside it: the peer is `^0.13.0`, for the conventions' names language
|
|
1155
|
+
(Changed).
|
|
1156
|
+
- **Five new atoms**, `Avatar`, `CellMore`, `Pill`, `RangeCalendar` and `ToolbarButton`: an adapter typed as the
|
|
1157
|
+
whole `ViewsAtoms` maps each one or leaves it to the default (For an adapter).
|
|
1158
|
+
- **Your icons map draws fifteen more glyphs**: an icons map typed `ViewsIcons` doesn't compile until it does (For
|
|
1159
|
+
an adapter).
|
|
1160
|
+
- **129 new message keys**, most of them `views.panels.*`. A resolver that falls back to `resolveViewsMessage` reads
|
|
1161
|
+
them in English; one that words every message with a `switch` and no default, or a `ViewsMessages` override typed
|
|
1162
|
+
over every key, must word them (For an adapter).
|
|
1163
|
+
- **The drawn panels need dnd-kit.** `@dnd-kit/core`, `@dnd-kit/sortable` and `@dnd-kit/utilities` are optional peers,
|
|
1164
|
+
reached only through `@viewkitjs/views/panels/react`: install them to use it. An app that takes only the grid
|
|
1165
|
+
installs none of them.
|
|
1166
|
+
- **On a phone your `Sheet` receives the toolbar's panels and the views picker's list** (Changed, For an adapter).
|
|
1167
|
+
- **Country and region names read the names language** instead of the locale (Changed).
|
|
1168
|
+
- **Nothing is removed**: every name 0.5.0 exported is still exported. Every new provider and grid option
|
|
1169
|
+
(`gridCheckboxes`, `gridButtons`, `fieldRowCheckboxes`, `fieldRowButtons`, `severalValues`, `bodyFrame`, `pages`,
|
|
1170
|
+
`fillWidth`, `oneHeader`, `headerVerticalBorders` and the rest) is off by default and draws as 0.5.0 did.
|
|
1171
|
+
|
|
1172
|
+
### Added
|
|
1173
|
+
|
|
1174
|
+
- **`datePicks`** on the provider (`ViewsDatePicks`): the quick days the date editors offer, in order. The date
|
|
1175
|
+
editor hands exactly these to an app's `DateBody` and its own panel draws the same; absent, today, tomorrow and
|
|
1176
|
+
next Monday, as on 0.5.0. `ViewsDatePick` gains `in-a-week`, today + 7 on the local calendar, worded by
|
|
1177
|
+
`date.in-a-week` ("In a week", `@viewkitjs/fields`). A `DateBody` that switches over `ViewsDatePick` with no
|
|
1178
|
+
default must handle it (For an adapter).
|
|
1179
|
+
|
|
1180
|
+
- **`views.panels.sort-none`** ("None"): a list with no sort reads None on Customize's Sort row
|
|
1181
|
+
(`sortValueLabel`), the way Group does, where it read a bare "asc". A resolver that words every message with a
|
|
1182
|
+
`switch` and no default must word it (For an adapter).
|
|
1183
|
+
- `ViewOptionsPanelContent` takes `closeButton` (default true): false draws no ✕ in its header while `onClose` still closes it from inside.
|
|
1184
|
+
- `oneValue` on `ViewsProvider`: `{ email: "list", domain: "list" }` opens a field holding one email or one domain as
|
|
1185
|
+
the value list holding one value (one line, no label, no main mark, no line to add another; × empties it), in the
|
|
1186
|
+
grid and in a field row alike, where it opens the text box in its cell by default. It writes the same string the text
|
|
1187
|
+
box writes, and a key typed on its cell starts its line. A phone and a link keep the text box. `ViewsOneValueEditors`
|
|
1188
|
+
is its type, from `@viewkitjs/views/react`.
|
|
1189
|
+
- `ValueListEditor` takes optional `holds` (`"one"` or `"several"`, the default) and `seed` (what was typed on what
|
|
1190
|
+
opened it: the first line starts as it).
|
|
1191
|
+
- `TextBody`, an optional slot in the components map for a whole body your app draws for a field typed as one string: a
|
|
1192
|
+
line of text, an email, a phone, a link, a domain, long text or rich text. Handed one, the grid's and a field row's
|
|
1193
|
+
text editors open it. It is handed the field's name (`label`), its text type (`kind`), whether it is a paragraph
|
|
1194
|
+
(`paragraph`), the draft (`value`), the host's own reading of a value (`check`), a phone's country (`region`), what was
|
|
1195
|
+
typed on what opened it (`typed`, already the draft), `autoFocus` and `form`, and hands back `onValueChange` and
|
|
1196
|
+
`onDone`. The editor keeps the draft, Escape's keep or throw-away by field type, Tab, ⌘ or Ctrl Enter, the close's
|
|
1197
|
+
tidy, the write check and the save, and draws the reason a value is refused. Left out, the text editors draw their own
|
|
1198
|
+
box as before.
|
|
1199
|
+
- `ViewsTextBodyProps`, from `@viewkitjs/views/react`. `TextEditor` takes optional `check`, `region`, `escapeKeeps` and
|
|
1200
|
+
`form`, handed to a text body; the grid's text editor takes optional `paragraph` and `region`; `gridTextOpensBox`
|
|
1201
|
+
takes an optional third argument, `inCell`.
|
|
1202
|
+
- `NumberBody`, an optional slot in the components map for a whole body your app draws for a number, money or a percent.
|
|
1203
|
+
Handed one, the grid's and a field row's number editors open it: in the grid cell on a computer, lifted over the rows
|
|
1204
|
+
below and the frozen columns, in the sheet on a phone, and in place in a field row at every width. A number formatted
|
|
1205
|
+
as a duration keeps the editor's own box. It is handed the field's name (`label`), its kind (`kind`: `number`, `money`
|
|
1206
|
+
or `percent`; a percent is stored 0 to 100), the draft (`value`), its unit and the units it may be put in (`unit`,
|
|
1207
|
+
`units`: money's currency code, or a number's unit), the digits the field keeps (`decimals`), its limits (`min`,
|
|
1208
|
+
`max`), how your people write a number (`locale`, `decimal`), whether it may be emptied (`empty`), where the figure
|
|
1209
|
+
stands (`align`), what was typed on what opened it (`typed`), `autoFocus`, `form` and `check`, the host's own reading
|
|
1210
|
+
of a value. It hands back `onValueChange` and `onDone`. The editor keeps the draft, rounds it to `decimals`, keeps
|
|
1211
|
+
Escape's keep or throw-away by field type, Tab, the write check and the save, and draws the reason a value is refused.
|
|
1212
|
+
Left out, the number editors draw their own box as before.
|
|
1213
|
+
- `ViewsNumberBodyProps`, from `@viewkitjs/views/react`. `NumberEditor` takes optional `type`, `label`, `min`, `max`,
|
|
1214
|
+
`check`, `escapeKeeps`, `closeOnBlur` and `form`, handed to a number body.
|
|
1215
|
+
- `PartsBody`, an optional slot in the components map for a whole body your app draws for a field made of parts: a
|
|
1216
|
+
name, a place or a range, told apart by `kind`. Handed one, the name, place and range editors open it in the grid and
|
|
1217
|
+
in a field row. Every kind is handed the field's name (`label`), whether it may be emptied (`empty`), what was typed on
|
|
1218
|
+
what opened it (`typed`, already the first part's value where it reads as one), `autoFocus` and `form`, and hands
|
|
1219
|
+
back `onValueChange` and `onDone`.
|
|
1220
|
+
- A name is handed `{ given, family, full }`, `full` as the editor's rule shows it: it follows the parts until a
|
|
1221
|
+
name of its own is typed, and a name stored written another way ("Nagy Imre") stays as it is.
|
|
1222
|
+
- A place is handed its parts, the boxes the field takes (`parts`) and those boxes in the country's own order
|
|
1223
|
+
(`rows`), each box's words for that country (`words`), the boxes it asks for (`required`), every country by name
|
|
1224
|
+
where the field takes the country (`countries`), the country's regions once loaded (`regions`), and
|
|
1225
|
+
`opens: "countries"` where the place has no country yet.
|
|
1226
|
+
- A range is handed its two ends, the `decimals` the editor rounds to as it closes, its `unit` and its `bands`.
|
|
1227
|
+
The editor keeps the draft, the full name's rule, the region's code, Escape's keep or throw-away by field type, Tab,
|
|
1228
|
+
the write check and the save and, on a phone, the panel's ✕ and ✓. Left out, the three editors draw as before.
|
|
1229
|
+
- `ViewsPartsBodyProps`, `ViewsPlacePart` and `ViewsPlaceParts`, from `@viewkitjs/views/react`. `NameEditor`,
|
|
1230
|
+
`LocationEditor` and `RangeEditor` take an optional `label`, the field's name for your body.
|
|
1231
|
+
- `ValuesBody`, an optional slot in the components map for a whole body your app draws for a field holding several
|
|
1232
|
+
emails, phones, links or domains. Handed one, the value list editor opens it in the grid and in a field row, in a
|
|
1233
|
+
popover under the values on a computer and the sheet on a phone. It is handed the field's name (`label`), its type
|
|
1234
|
+
(`kind`: `email`, `phone`, `url` or `domain`), the draft as lines (`{ value, label?, main }`, `[]` when there are
|
|
1235
|
+
none), whether a value carries a label (`labels`), whether the field holds one value or several (`holds`), a phone's
|
|
1236
|
+
country (`region`), whether it may be emptied (`empty`), what was typed on what opened it (`typed`), `autoFocus`,
|
|
1237
|
+
`form`, and `check`, the field's own reading of a value. It hands back `onValueChange` and `onDone`. The editor keeps
|
|
1238
|
+
the draft, which value is kept as stored, Escape's keep or throw-away by field type, Tab, the write check, the save
|
|
1239
|
+
and, on a phone, the panel's ✕ and ✓. Left out, the value list editor draws its own rows as before.
|
|
1240
|
+
- `ViewsValuesBodyProps` and `ViewsValueLine`, from `@viewkitjs/views/react`. `ValueListEditor` takes an optional
|
|
1241
|
+
`label`, the field's name for your body.
|
|
1242
|
+
- Three message keys, each a reason a disabled row hands your `Menu`: `views.menus.range-not-clearable` ("Nothing in this selection can be emptied"), `views.menus.add-column-all-shown-reason` ("No hidden column to add") and `views.menus.loading` ("Wait for current data before editing").
|
|
1243
|
+
- `bodyFrame`, an optional provider setting (`ViewsBodyFrame`, `"views"` or `"popover"`, default `"views"`): who sets the
|
|
1244
|
+
width and padding of the popover around a whole body your app hands, its `Picker`, `PartsBody` or `ValuesBody`, in the
|
|
1245
|
+
grid and a field row alike. At `"views"` nothing changes: the popover keeps the widths ViewKit gives its own lists,
|
|
1246
|
+
whether or not you hand a body. At `"popover"` an editor that opens your body hands its popover no width and no
|
|
1247
|
+
padding of ViewKit's, only its layer (and, in a field row, a cap at the screen's width less 2rem), so your `Popover`
|
|
1248
|
+
stands at its own width; and it marks the popover with the body it holds, `data-vk-body` (`picker`, `parts` or
|
|
1249
|
+
`values`), through `panelData`. A width is set here rather than by a variable because a whole body's width is not one
|
|
1250
|
+
number: a pick list, a place's parts and a value list each want their own.
|
|
1251
|
+
- `ViewsBodyFrame`, from `@viewkitjs/views/react`.
|
|
1252
|
+
- `@viewkitjs/views/panels/react`: the panels as they draw, each under your `ViewsProvider`, with the client directive. It holds the filter panel: a body per filter type (`TextFilterBody`, `NumberFilterBody`, `RangeFilterBody`, `RelationFilterBody`, `DateFilterBody` with `DateFilterFields`, `useDateFilterEditor`, `DateFilterCalendar` and `DateFilterInput`), the filter list (`CompactFilterList`, `dimensionRows`, `FilterSectionHeading`, `FilterIcon`) and the details (`CompactFilterDetail`, `CompactToggleDetail`, `CompactDateRangeDetail`, `CompactTimeScopeDetail`). `@viewkitjs/views/panels` stays the pure door, which a server file may read.
|
|
1253
|
+
- The `RangeCalendar` atom: the filter panel's month, a day or a range in ISO days, marked `data-slot="vk-range-calendar"`. The default is your components map's one-day `Calendar` on the end being picked.
|
|
1254
|
+
- Four icon names: `filter`, `filterStatus`, `filterCategory` and `filterMetric`, a filter row's glyphs.
|
|
1255
|
+
- The filter panel's words as `views.panels.*` keys: its placeholders, the bounds, a relation's choices, the toggle's On and Off, the date's boxes, its relative note and its menus' names.
|
|
1256
|
+
- The panels' words: `views.panels.search`, `group-by`, `sort`, `date-by`, `hide-empty-groups`, `groups`, `groups-hide-all`, `groups-show-all`, `group-remove`, `group-empty`, `move`, `show`, `hide`, `columns-reset`, `column-visible`, `new-line-first`, `new-line-on`, `new-line-start`, `layout-options`, `layout-density` and `personal-reset`. The Sort, Group, Layout and Columns panels that say them, and the Columns list's and the group order's drag, come with the controls' release.
|
|
1257
|
+
- `@viewkitjs/views/panels/react`, a client door for the panels as they draw, the one that reaches dnd-kit; `@viewkitjs/views/panels` stays pure, so a server file may import it. Both panels doors come in the release that publishes the panels.
|
|
1258
|
+
- The views row in `@viewkitjs/views/panels/react`: `PillGroup` (a row of pills that drags with dnd-kit by the mouse and the keyboard), `ViewTabs`, `HScrollRow`, `FoldingViewRow` (the row that folds what doesn't fit into "+N"), `ViewPicker` and `ViewPickerRow`, `ViewCreatePill` and `ViewAxes`; the axes they draw in `@viewkitjs/views/panels` (`ViewTabOption`, `CollectionViewsConfig`, `CollectionViewsInput`, `CollectionChildAxis`, `ViewsLayout`, `PillOption`, `toViewAxes`, `splitViewAxes`). A view's verbs are the package's menu rows, opened through your `Menu`; its glyph is your own icon's name, drawn by your `AppIcon`.
|
|
1259
|
+
- The `Pill` atom, with a plain default marked `data-slot="vk-pill"`.
|
|
1260
|
+
- The views row's dress hooks: `data-slot="vk-views-row"`, `"vk-views-more"`, `"vk-views-chip"` and `"vk-views-add"`.
|
|
1261
|
+
- One icon name, `moreVertical`; one optional colour, `--vk-selected` (falls back to `--vk-neutral`); two optional layout names, `--vk-scroll-row-inset` and `--vk-scroll-row-end`.
|
|
1262
|
+
- Fifteen `views.panels.*` keys for the row's words, from `views.panels.view-private` to `views.panels.view-menu`.
|
|
1263
|
+
- The Customize panel's words: `views.panels.customize-title`, `back`, `close`, `clear-all`, `filter`, `layout`, `columns`, `columns-shown`, `column`, `group`, `view-publish`, `view-reset`, `view-stale`, `copy-link`, `export-csv`, `share`, `coming-soon` and `loading`. The panel that says them comes with the controls' release.
|
|
1264
|
+
- `CollectionExportCsv` in the panels' pure door: a list's export, its count and its run.
|
|
1265
|
+
- Customize behind the drawn panels' door: `ViewOptionsPanelContent`, `PopoverRootList`, `ViewFooter`, `ViewOptionsActions`, `ViewOptionsPopoverPanel`, `useViewOptionsPopover`, `useViewActivePanel`, `viewOptionsPopoverClassName` and `keepPanelOpenForPortals`.
|
|
1266
|
+
- `leave` on `useAnchoredEditSession`: `"outside"` asks a session still open when its page or its surface goes as for a
|
|
1267
|
+
press outside; `"discard"`, the default, asks nothing. A host of your own asks nothing of an editor still open;
|
|
1268
|
+
pass `leave: "outside"` to have it asked. On every host, an answer already given and waiting out its exit is
|
|
1269
|
+
finished at once when the page or the surface around it goes (its `onClose`, or in the deferred mode its `onDone`,
|
|
1270
|
+
runs then instead of after the gap). `onLeave`, in the admitted mode, is called first.
|
|
1271
|
+
- **The panels built from a list's settings** (`@viewkitjs/views/panels`). `settingsPanels({ settings, layer, columns, onChange, onLayerChange })` takes a `ListSettings`, a person's
|
|
1272
|
+
`ListPersonalLayer` and the list's columns, and returns the Filter rows, Sort, Group, the grid header's Group by and
|
|
1273
|
+
the Layout panel. Each change comes back as a `ListSettingsChange` over the settings, or as a layer patch (a width,
|
|
1274
|
+
the folded groups, the phone's layout), so a list kept as settings never speaks `ListViewPrefs`. Each panel is also
|
|
1275
|
+
its own builder (`settingsFilters`, `settingsSort`, `settingsGroup`, `settingsGroupBy`, `settingsLayout`), beside the
|
|
1276
|
+
translations they stand on (`columnStateOf`, `columnsChangeOf`, `seenLook`, `lookChange` and their siblings).
|
|
1277
|
+
- **`useGridTableSettings`** on `@viewkitjs/views/grid`: the grid's props from a list's settings and a person's layer,
|
|
1278
|
+
as `useGridTablePrefs` gives them from a prefs blob. A column hidden, moved or given a figure comes back as a
|
|
1279
|
+
`ListSettingsChange`; a resize as the person's width. How the fields read stays yours, as `GridFormatPrefs`.
|
|
1280
|
+
- The toolbar in `@viewkitjs/views/panels/react`: `Toolbar`, a frame that places the parts you hand it at the start or the end, on one line or two, in three forms — one row, a narrow panel for a box under 700px (the search on its own line, the views under it) and the phone's one row — decided by its own box and your provider's `desktopQuery`, or by you (`phone`, `narrow`). Its parts: `ToolbarViews` (the views row or its picker, the stacked axes on the second line, a chip per axis on a phone, and Show counts), `ToolbarSearch` (a button that opens an inline field, or a field that fills its line; Escape and ✕ clear it; drawn through your `Input`), `ToolbarNew` (one verb, or a menu of several through your `Menu`, drawn disabled on the row where a list can't add) and any node of your own. `useToolbarSlot` tells a part where it stands; `useToolbarPanel` makes a part's menu, panel or pane one of the toolbar's, so opening one closes every other; `ToolbarButton` draws the button atom at the line's size.
|
|
1281
|
+
- The toolbar's arrangement in `@viewkitjs/views/panels`: `toolbarForm`, `arrangeToolbar`, `ToolbarForm`, `ToolbarPlacement`, `ToolbarLine`, `ToolbarSlot`, `TOOLBAR_NARROW_BELOW`; and what the toolbar owns over a list's settings: `withCounts`, `countsToggle` and `SHOW_COUNTS_KEY` (the toolbar's own Show counts), `groupShown` (no Group on a board). Both panels doors come in the release that publishes the panels.
|
|
1282
|
+
- The `ToolbarButton` atom, with a plain default marked `data-slot="vk-toolbar-button"`: a glyph in a circle, its word for a dress (`data-slot="vk-toolbar-word"`, hidden by default), a count (`data-slot="vk-toolbar-count"`) that becomes a ✕ badge with `onClear`, a dot (`data-slot="vk-toolbar-dot"`), and the states `data-open`, `data-changed`, `data-edge` and `data-disabled`.
|
|
1283
|
+
- The toolbar's dress hooks: `data-slot="vk-toolbar"` (with `data-form`), `"vk-toolbar-line"` (with `data-line`), `"vk-toolbar-cluster"`, `"vk-toolbar-search"` (with `data-expanded`), `"vk-toolbar-search-field"`, `"vk-toolbar-search-clear"` and `"vk-toolbar-new"`.
|
|
1284
|
+
- Three `views.panels.*` keys: `views.panels.show-counts`, `views.panels.toolbar-new` and `views.panels.toolbar-clear`.
|
|
1285
|
+
- The ready toolbar in `@viewkitjs/views/panels/react`: `ReadyToolbar` takes a list's `ListSettings`, a person's `ListPersonalLayer` and the list's columns (the builder's input), calls the builder, and draws the views on the left; search, sort, filter, options and new on the right. Every change comes back as a `ListSettingsChange` or a layer patch; its search writes the settings' search; the active view's menu gains "Edit view…", which opens Customize; its ✕s clear in one change. It holds its panels' state above its frame, so a change of form keeps a panel open on its page. `useListSettingsState` holds a list's settings and layer in memory, ready to spread into it.
|
|
1286
|
+
- The panel parts: `ToolbarOptions` (Customize behind its own button, with the count and its ✕, or the drift dot on a shared view), `ToolbarSort` (the sort panel, lit while the list sorts other than its default) and `ToolbarFilter` (the filter list and its drill-ins standing alone, with the count and its ✕). Each takes the builder's panels and opens in your `Popover`, or in a host you hand in (`ToolbarPanelHost`: your side drawer, your sheet). `useToolbarPanelState` holds a part's open state and page for your app; `FilterPanelContent` is the Filter panel for a host of your own.
|
|
1287
|
+
- In `@viewkitjs/views/panels`: `withEditView` (a row at the head of the active view's menu) and `settingsCleared` (a toolbar ✕ over a list's settings as one change, folded through the builder).
|
|
1288
|
+
- The panel parts' dress hooks: `data-slot="vk-toolbar-options"`, `"vk-toolbar-sort"`, `"vk-toolbar-filter"`, and their popovers' `"vk-toolbar-options-panel"`, `"vk-toolbar-sort-panel"` and `"vk-toolbar-filter-panel"` through your `Popover`'s `panelData`.
|
|
1289
|
+
- Two `views.panels.*` keys: `views.panels.toolbar-options` and `views.panels.edit-view`.
|
|
1290
|
+
- `gridCheckboxes` on `ViewsProvider` (`ViewsGridCheckboxes`, `"own" | "checkbox"`, default `"own"`): who draws a yes/no
|
|
1291
|
+
cell's box in the grid, the checkbox style. Left out, ViewKit draws its tick box in its own switch button, exactly as
|
|
1292
|
+
before. Set to `"checkbox"`, your `Checkbox` draws it, the same box your rail draws on the row: it stands alone in the
|
|
1293
|
+
cell, handed `checked`, the column's name as `aria-label`, `tabIndex` -1 and `onCheckedChange`, and one press writes
|
|
1294
|
+
the value once. Enter on the cell still flips it, through the grid. A cell the grid can't write (a locked column, a
|
|
1295
|
+
read-only list) is handed `readOnly` and a press that writes nothing. The `icon`, `text` and `marker` styles are as
|
|
1296
|
+
they were.
|
|
1297
|
+
- `ViewsCheckboxProps.readOnly`, optional: shown as it is and not pressable, unlike `disabled`, which greys it.
|
|
1298
|
+
- `DisplayOptions.booleanCheckbox` and `GridCellOptions.booleanCheckbox` (`ComponentType<ViewsCheckboxProps>`), both
|
|
1299
|
+
optional: a checkbox control the checkbox style draws alone in place of the tick box and its switch, handed `checked`,
|
|
1300
|
+
the field's label, `tabIndex` -1 and `onCheckedChange` (or `readOnly` without `onToggle`). The grid hands the
|
|
1301
|
+
components map's `Checkbox` here while `gridCheckboxes` is `checkbox`; a surface of your own that draws a yes/no can
|
|
1302
|
+
hand it too. A slot that owns the click (`slotOwnsClick`) keeps the tick box.
|
|
1303
|
+
- `gridButtons` on `ViewsProvider` (`ViewsGridButtons`, `"own" | "button"`, default `"own"`): who draws the buttons the
|
|
1304
|
+
grid draws itself, a group's fold and ⋯, "+ Add column", a row's ⋯, the name's actions (the pencil and your
|
|
1305
|
+
`rowActions`), an action column's buttons and a pick-list cell's ▾. Left out, ViewKit draws its own, exactly as
|
|
1306
|
+
before. Set to `"button"`, your `Button` draws them, so they take your pointer, hover, press and focus ring: the grid
|
|
1307
|
+
hands `variant` `"ghost"` (`"outline"` for the name's actions), `size` `"icon"` (`"sm"` for "+ Add column") and its
|
|
1308
|
+
box in `className` (the size, the place in the row or cell, and the reveal on hover); the look is yours. Each keeps
|
|
1309
|
+
its name, its place, what it opens and its tab order.
|
|
1310
|
+
- `ViewsButtonProps` takes six optional props more, which the grid hands its own buttons with `gridButtons: "button"`:
|
|
1311
|
+
`ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`.
|
|
1312
|
+
- "+ Add column" carries `data-open` (present, no value) while its menu is open, whatever `gridButtons` says, so a
|
|
1313
|
+
skin can dress it as it dresses a header cell whose menu is open.
|
|
1314
|
+
- **Your Avatar in a chip and before the name.** A new atom, `Avatar` (`ViewsAvatarProps`), draws a person's or a
|
|
1315
|
+
record's picture: a user's, a relation's and an actor's chip draw it at `size="chip"`, handed `label`, `avatarUrl`,
|
|
1316
|
+
`kind` (a relation's `entity`, `user` for a member, an actor's type) and `fallback`, the glyph the chip drew
|
|
1317
|
+
before. Hand your own through the provider's `atoms` to draw initials on a tone, or a record in its own shape;
|
|
1318
|
+
return `fallback` for a kind you don't dress. Hand none and every chip draws as before: the picture while it
|
|
1319
|
+
loads, the glyph otherwise.
|
|
1320
|
+
- **The row's picture before its name.** `ListRowIcon` takes an optional `avatar`, a `ListRowAvatar`
|
|
1321
|
+
(`{ label, avatarUrl?, kind? }`): the grid draws it through `Avatar` at `size="glyph"`, sized by `--vk-glyph`,
|
|
1322
|
+
with the row's `icon` as its fallback.
|
|
1323
|
+
|
|
1324
|
+
```ts
|
|
1325
|
+
rowIcon: (row) => ({ icon: "building", avatar: { label: row.name, avatarUrl: row.logo, kind: "company" } })
|
|
1326
|
+
```
|
|
1327
|
+
- The grid's record names are a named part, `vk-grid-title`: the words in a title cell that open the row. Your app
|
|
1328
|
+
styles them at rest and under the pointer with a rule on `[data-slot="vk-grid-title"]`, written outside any CSS layer
|
|
1329
|
+
or in a layer after `utilities`, for example a name underlined at rest. A rule that colours the name at rest wins
|
|
1330
|
+
under the pointer too, so write its `:hover` as well. With no rule the names look as before, and
|
|
1331
|
+
`GRID_TITLE_LINK_CLASS` dresses them as it did. A title drawn outside the grid carries no part.
|
|
1332
|
+
- **A footer figure's parts, and an empty footer cell's state.** A figure's kind and its value are parts of their own,
|
|
1333
|
+
`vk-grid-figure-label` and `vk-grid-figure-value` (the value's suffix inside it), and the offer an empty footer cell
|
|
1334
|
+
shows under the pointer is `vk-grid-figure-pick`, on a cell that now carries `data-empty`. A figure your own
|
|
1335
|
+
`renderAggregate` draws sits in `vk-grid-figure-value`, with no kind. So you can draw a figure value first, then
|
|
1336
|
+
its word in sentence case, and dress the offer:
|
|
1337
|
+
|
|
1338
|
+
```css
|
|
1339
|
+
[data-slot="vk-grid-figure-value"] { order: -1; }
|
|
1340
|
+
[data-slot="vk-grid-figure-label"],
|
|
1341
|
+
[data-slot="vk-grid-figure-pick"] { text-transform: none; letter-spacing: normal; }
|
|
1342
|
+
```
|
|
1343
|
+
|
|
1344
|
+
The offer's words are still `views.grid.figure-pick` ("Calculate"); answer it with "Add calculation" to word it
|
|
1345
|
+
so. Styling none of these, the footer draws as before.
|
|
1346
|
+
- `fillWidth` on `GridTable` (off by default): the columns share the grid's whole width, each growing in proportion to
|
|
1347
|
+
its own width and never below it. A column the person resized keeps its width and the others take the rest; a
|
|
1348
|
+
column that declares `grid.maxWidth` keeps its own. A table already wider than the grid is unchanged and scrolls
|
|
1349
|
+
sideways. Off, every column stands at its own width, as before.
|
|
1350
|
+
- `severalValues` on `ViewsProvider` (`ViewsSeveralValues`, `"first" | "fit"`, default `"first"`): how a cell of several
|
|
1351
|
+
values draws on one line, a multiselect's options, several emails, phones, links or domains, several records, a
|
|
1352
|
+
lookup's names or places. Left out, it draws its first value and a "+N" count at any width, exactly as before. Set to
|
|
1353
|
+
`"fit"`, it draws as many whole values as fit the cell's width, then the count, and follows a column resize; when even
|
|
1354
|
+
the first doesn't fit whole, it shows cut, then the count. A wrapped row shows three either way. Each cell measures
|
|
1355
|
+
its values once, when it mounts or they change, and works out a resize from what it kept, so fitting redraws no row.
|
|
1356
|
+
- The `CellMore` atom (`ViewsCellMoreProps`: `count`, and `inert` where the host owns the click): what the "+N" draws.
|
|
1357
|
+
Hand your own to draw your count tag there.
|
|
1358
|
+
- The count is marked `data-slot="vk-cell-more"`, and carries `data-open` (present, no value) while its list is open.
|
|
1359
|
+
- A new state, `data-open` (`GRID_STATES`' `open`): a header cell carries it while its column's menu is open, and a
|
|
1360
|
+
footer cell while its figure picker is open, on either menu route. It is present with an empty value, and absent
|
|
1361
|
+
when the menu is closed. Both cells already say `aria-expanded` as they open.
|
|
1362
|
+
- **One row of column names over a grouped grid.** `oneHeader` on `GridTable` draws a grouped grid with a single row
|
|
1363
|
+
of column names, pinned at the top of its scroll area (`vk-grid-head`), in place of each group's own; each group's
|
|
1364
|
+
bar pins under it, and the row's checkbox picks every row. While it is on, a group has no box of its own that picks
|
|
1365
|
+
its rows. A bar's `data-stuck` works as before: it says the bar has left where it rests, wherever it pins. Off by
|
|
1366
|
+
default: a grouped grid draws as before.
|
|
1367
|
+
- **A folded group says so.** A group's box (`vk-grid-group`) carries `data-collapsed` while it is folded, a state
|
|
1368
|
+
of the contract. With it you set the gap between groups yourself: each group after the first still stands `mt-5`
|
|
1369
|
+
below the one before, and a rule on the slot and the state, written outside any CSS layer or in a layer after
|
|
1370
|
+
`utilities` so it wins over the class, changes it. To stand the group after a folded one right under it:
|
|
1371
|
+
|
|
1372
|
+
```css
|
|
1373
|
+
[data-slot="vk-grid-group"][data-collapsed] + [data-slot="vk-grid-group"] {
|
|
1374
|
+
margin-top: 0;
|
|
1375
|
+
}
|
|
1376
|
+
```
|
|
1377
|
+
|
|
1378
|
+
Handed no rule, nothing moves.
|
|
1379
|
+
- **`data-stuck` is a state of the contract.** A pinned head (`vk-grid-head`, `vk-grid-group-head`) carries
|
|
1380
|
+
`data-stuck` while content passes under it, for a shadow or a ground of your own. When present its value is
|
|
1381
|
+
`"true"`, as before, so `[data-stuck]` and `[data-stuck="true"]` both match.
|
|
1382
|
+
- **Select all in group, from a group's ⋯.** Name `"select"` in `groupMenu` and, on a grid with a `selection`, each
|
|
1383
|
+
group's ⋯ menu leads with Select all in group, on the `popover` route and the `menu` route alike. It picks every
|
|
1384
|
+
row of the group (the rest of them, when some are picked), and reads Deselect all in group and clears them once
|
|
1385
|
+
all are picked. It is how a grid with one row of column names over its groups (`oneHeader`), whose groups have no
|
|
1386
|
+
box of their own, picks a whole group. Its words are `views.menus.group-select` (`{ selected }`). Left out of
|
|
1387
|
+
`groupMenu`, the menu is as before. `GridGroupMenuPart` gains the member `"select"`: a `switch` over it that
|
|
1388
|
+
names every part needs a case for it.
|
|
1389
|
+
- The grid writes its contract's twelve states (`GRID_STATES`, the contract's States), each on the part the
|
|
1390
|
+
contract names while it holds, and absent when it doesn't:
|
|
1391
|
+
- on a body cell: `data-focused`, `data-editing`, `data-in-range`, `data-range-edge`, `data-pending`,
|
|
1392
|
+
`data-invalid`, `data-empty`, `data-frozen`;
|
|
1393
|
+
- on a row: `data-selected` (the row is checked);
|
|
1394
|
+
- on a header cell: `data-frozen`, and `data-dragging` while it is dragged;
|
|
1395
|
+
- on the grid's frame (`vk-grid`): `data-empty` (no rows), `data-scrolled` (the table has scrolled sideways) and
|
|
1396
|
+
`data-parked` (the identity columns are parked behind the frozen band).
|
|
1397
|
+
- A flag is present with an empty value; `data-range-edge` carries the cell's outer edges of the range, in the order
|
|
1398
|
+
`top right bottom left`.
|
|
1399
|
+
- `--vk-selection-edge`, an optional colour: the line over the first picked row of a run and under every picked row.
|
|
1400
|
+
Undeclared it is `--vk-brand`, so picked rows look as before. Declare it `transparent` on the grid or an ancestor
|
|
1401
|
+
and a picked row keeps its ordinary line, drawn by its tint alone; the brand stays on everything else in the row,
|
|
1402
|
+
its focus ring and its checkbox included.
|
|
1403
|
+
- `--vk-head-glyph-fg`, an optional colour (`VK_OPTIONAL_COLOURS`): the colour of the column glyphs the grid draws in
|
|
1404
|
+
its header (a field's or a type's, a binding's `AppIcon`). Undeclared, they take the header's words' colour, as
|
|
1405
|
+
before, so an app can now darken the words and keep the glyphs quiet.
|
|
1406
|
+
- **The cell outlines take your corners and your colours.** The line of the cell under the pointer and the picked
|
|
1407
|
+
cell's ring now read four variables you may declare:
|
|
1408
|
+
- `--vk-outline-radius`, the corners of both. Undeclared, it is your Tailwind small radius, exactly what
|
|
1409
|
+
`rounded-sm` drew, so nothing moves. Declare `0` and a picked cell and a hovered cell are both straight.
|
|
1410
|
+
- `--vk-outline-hover`, the hovered cell's line (undeclared, `--vk-border-bold`).
|
|
1411
|
+
- `--vk-outline`, the picked ring at rest (undeclared, `--vk-fg-subtle`).
|
|
1412
|
+
- `--vk-outline-active`, the picked ring under the pointer or while editing (undeclared, `--vk-border-brand`).
|
|
1413
|
+
|
|
1414
|
+
`--vk-outline-radius` joins `VK_OPTIONAL_LAYOUT`; the three colours join `VK_OPTIONAL_COLOURS`. The hover is
|
|
1415
|
+
still pure CSS: nothing renders as the pointer moves.
|
|
1416
|
+
- **Your StatusBadge knows where its status stands.** `ViewsStatusBadgeProps` gains an optional `place`, a
|
|
1417
|
+
`ViewsStatusPlace` (`{ index, options }`): the field's active options in their order, archived ones out, and this
|
|
1418
|
+
option's index in them. A cell, the select editor's rows and the selection bar's options verb hand it, the same
|
|
1419
|
+
list for the same field everywhere, so a value gets the same place in each. Read it to show how far along a step
|
|
1420
|
+
is (a stage's progress). A stray value, an archived one, the None row and a badge that is no option (a boolean's
|
|
1421
|
+
marker, `StatusMarker`) are handed none, and ViewKit's own badge draws as before.
|
|
1422
|
+
- **`SelectEditor` takes `steps`**, the field's steps its badges are placed among (`statusSteps(field)` in the
|
|
1423
|
+
grid and a field row). Left out, its badges carry no place.
|
|
1424
|
+
- `headerVerticalBorders` on `GridTable` (off by default): the header's columns follow `verticalBorders` as the rows'
|
|
1425
|
+
do, a line on the right of each column but the last. Off, the header draws no line between its columns, as before.
|
|
1426
|
+
- `MenuRow` and `ToggleRow` take an optional `disabledReason`. The defaults show it in your `Tooltip` once the pointer rests on a disabled row, as `RadioRow` already does.
|
|
1427
|
+
- A filter row (`FilterConfig`) takes an optional `disabledReason`, shown on its disabled row.
|
|
1428
|
+
- Four message keys, each the reason a disabled panel control gives: `views.panels.filter-not-offered` ("This column can't be filtered"), `views.panels.column-always-shown` ("This column always shows"), `views.panels.column-last-shown` ("One column must stay shown") and `views.panels.new-line-hidden` ("A hidden field isn't on the card").
|
|
1429
|
+
- A selection verb (`SelectionVerbItem`, a group and `SelectionOptionsVerb`) takes an optional `disabledReason`, why it is disabled in the person's words. More's rows hand it to your `Menu`, the bar's own button shows it in your `Tooltip`, and the phone's default sheet draws it under the row. A group's rows that give no reason of their own carry the group's. While a batch runs (`busy`), no reason shows.
|
|
1430
|
+
- `gridButtons: "button"` now also reaches a command cell's ▾ and its trigger: the ▾ beside a relation, user, link,
|
|
1431
|
+
email, phone or domain is your `Button` (`ghost`, `icon`, a 20px box), and the trigger around any other value is your
|
|
1432
|
+
`Button` (`ghost`, `sm`) holding the value and its ▾, its `className` keeping the value's line and the cell's own type
|
|
1433
|
+
(`[font:inherit]`): your `Button` brings the pointer, hover, press and focus, never the text's size or weight. Each is
|
|
1434
|
+
handed the column's name as `aria-label`. Left at `own`, both are ViewKit's own, exactly as before.
|
|
1435
|
+
- `chip` on `ViewsProvider`'s `selectionBar` (`ViewsSelectionChip`, `"own" | "button"`, default `"own"`): who draws the
|
|
1436
|
+
selection bar's count chip on the desktop. Set to `"button"`, your `Button` draws it, handed `variant` `"outline"`,
|
|
1437
|
+
`size` `"sm"`, its box in `className`, `data-slot="vk-selection-chip"`, `aria-label` and `disabled` while a batch
|
|
1438
|
+
runs; it stays inside your `Tooltip`. `gridButtons` has no say over it.
|
|
1439
|
+
- Rich text's Show more and Show less, in a field row, carry `data-slot="vk-show-more"`.
|
|
1440
|
+
- A place column's header sorts it by each of its parts: Sort ascending and Sort descending each open the place's parts (City, Region, Country, Postal code, or the ones its field holds), the part in force shown beside the row, and Clear sort while the column sorts by any of them. Both menu routes offer it, and the header's `aria-sort` says so.
|
|
1441
|
+
- The Sort panel lists a place's parts as options of their own ("Address · City"), and shows a part sort the header picked.
|
|
1442
|
+
- `columnSortParts(column, viewBacked)` lists the parts a column offers a sort by, and `sortPartOf(value, fieldKey, parts)` reads the part a sort value names for that column.
|
|
1443
|
+
- `ToolbarSearch` and `ReadyToolbar` take `searching`. While it is true, a spinner stands where the search's glass is (on its button, and in its field on every form), and the field keeps its value and its typing, marked `aria-busy`. Your app decides when it is true, for a search that answers from a server.
|
|
1444
|
+
- The word `views.panels.searching` ("Searching"), the spinner's name, and the slot `vk-toolbar-search-spinner`.
|
|
1445
|
+
- `pages` on `GridTable` (absent by default): the grid shows one page of rows the app hands, and under it a pager, `vk-grid-pager`, with where you are (`26–50 of 213`, `of 1,000+` under a capped count), a page-size pick and Previous and Next. Its controls are your `Button`, the size pick your `Button` opening your `Menu`. Picks cover the page and clear when the page or its size changes; the footer shows only the figures you hand, so its totals cover the view; hand none and the footer is empty in pages, apart from your own `renderAggregate` cells. A grouped grid draws no pager and keeps each group's own "more". Absent, rows arrive as you scroll, as before.
|
|
1446
|
+
- `fieldRowCheckboxes` on `ViewsProvider` (`ViewsFieldRowCheckboxes`, `"own" | "checkbox"`, default `"own"`): who draws a
|
|
1447
|
+
field row's yes/no box, the checkbox style. Left out, ViewKit draws its tick box in its own switch button, exactly as
|
|
1448
|
+
before. Set to `"checkbox"`, your `Checkbox` draws it, handed `checked`, the field's name as `aria-label` and
|
|
1449
|
+
`onCheckedChange`, and no `tabIndex`, so it stays a Tab stop as the switch is; one press writes the value once. A row
|
|
1450
|
+
the field row can't write is handed `readOnly`. A value inside the row's own button (a command field's verbs) keeps
|
|
1451
|
+
the tick box. `gridCheckboxes` has no say over it.
|
|
1452
|
+
- `fieldRowButtons` on `ViewsProvider` (`ViewsFieldRowButtons`, `"own" | "button"`, default `"own"`): who draws a field
|
|
1453
|
+
row's own buttons, its edit target (around the value, beside a link's open action, under a rich text), the verb
|
|
1454
|
+
trigger around a value, the lane's ▾ and rich text's Show more. Left out, each is ViewKit's own, exactly as before.
|
|
1455
|
+
Set to `"button"`, each is your `Button`, `ghost`, `sm` (`icon` for the ▾), ViewKit's box in `className`: the
|
|
1456
|
+
target's keeps the row's own type (`[font:inherit]`) and grows with a wrapped value. `gridButtons` has no say over a
|
|
1457
|
+
field row.
|
|
1458
|
+
- `ViewsButtonProps["aria-disabled"]`, optional: a field row's edit target holds its focus with it while a write is
|
|
1459
|
+
pending.
|
|
1460
|
+
|
|
1461
|
+
### Changed
|
|
1462
|
+
|
|
1463
|
+
- **The peer is `@viewkitjs/fields` `^0.13.0`** (it was `^0.12.0`): the place cell, its editor and the country
|
|
1464
|
+
filter read the conventions' names language that fields 0.13 brings.
|
|
1465
|
+
- On a phone, the toolbar's Options, Sort and Filter parts open their panel in your `Sheet` instead of your `Popover`, full height, with every page the popover has (Customize's pages, a column's settings, a filter's drill-ins). A host you hand still takes the panel. Phone or desktop is the toolbar's form inside a `Toolbar` (its `phone` flag, else your provider's `desktopQuery`), and your `desktopQuery` outside one.
|
|
1466
|
+
- On a phone, `ViewPicker` opens its list of views in your `Sheet`: inside a `Toolbar`, in its phone form; placed on its own, below your `desktopQuery`. If your shell switches to its desktop at another width, hand that query to the provider.
|
|
1467
|
+
- With a `TextBody` handed, long text and a line the cell cut off open in the cell on a computer, the body standing in
|
|
1468
|
+
it and lifted over the rows below and the frozen columns, rather than in the panel over the cell. A text opened only to
|
|
1469
|
+
be read still opens the panel. On a phone the body stands in the sheet; in a field row, in place at every width.
|
|
1470
|
+
- With a `PartsBody` handed, a range in the grid, and a name or a range in a field row, open in a popover under the
|
|
1471
|
+
value on a computer and in the sheet on a phone, rather than in place, and the value stays on screen. Without one,
|
|
1472
|
+
they open in place as before.
|
|
1473
|
+
- On a phone, long text's and rich text's sheet frames its box and opens it three lines tall, growing to twelve, so an
|
|
1474
|
+
empty one shows where to type: a border, rounded, and the brand ring while it can be typed in. A line the cell cut off
|
|
1475
|
+
keeps its sheet as it was, and the panel over the cell on a computer is unchanged.
|
|
1476
|
+
- This changes what your app sees: with an editor open, a route change, Back inside your app, a drawer you close or a
|
|
1477
|
+
switch of views now calls your `onCellCommit` (or a field row's `onCommit`) with what the editor holds, where the
|
|
1478
|
+
previous version dropped it; a reload or a closed tab calls it too.
|
|
1479
|
+
- **A switch to Calendar fills the default date field** when the stored one is not a date column of the list
|
|
1480
|
+
(`settingsLayout`), as the switch to Board already did for a field the list can't lay a board out by. A stored date
|
|
1481
|
+
field the list draws is kept.
|
|
1482
|
+
- **Group by's None and the grid header's Ungroup clear a set-aside group** (`settingsGroup`, `settingsGroupBy`): no
|
|
1483
|
+
other control removes one, so they write `group: null` whenever the settings hold a group.
|
|
1484
|
+
- **A head back at rest carries no `data-stuck`.** A head that had been stuck and came back to rest carried
|
|
1485
|
+
`data-stuck="false"`; it now carries none, as a head that was never stuck didn't. A selector for a head at rest
|
|
1486
|
+
changes:
|
|
1487
|
+
|
|
1488
|
+
```css
|
|
1489
|
+
/* before */ [data-slot="vk-grid-group-head"][data-stuck="false"] { … }
|
|
1490
|
+
/* after */ [data-slot="vk-grid-group-head"]:not([data-stuck]) { … }
|
|
1491
|
+
```
|
|
1492
|
+
|
|
1493
|
+
A search of the apps known to run the package found nothing reading `data-stuck` but the package's own styles.
|
|
1494
|
+
- The contract's `data-scrolled` and `--vk-scrolled` are described as what they always were: the table has scrolled
|
|
1495
|
+
sideways.
|
|
1496
|
+
- The panels' default rows and buttons now show why they are disabled, in your `Tooltip`: a column filter that can't be opened, the Visible switch and the eye of a column that always shows or is the last one shown, and the card's new-line button on a hidden or the first field. Each disabled control that has a reason sits inside a plain wrapper `span` the tooltip listens on, since a disabled control doesn't hear the pointer.
|
|
1497
|
+
- The new-line button on the first field says "The first field already starts the card" through your `Tooltip` instead of the browser's own `title`.
|
|
1498
|
+
- The relation chip a list's `onOpenRelation` makes pressable carries `data-slot="vk-relation-link"`, the part the
|
|
1499
|
+
default `RelationLink` already carries, whatever the provider says. A skin rule you wrote on `vk-relation-link` now
|
|
1500
|
+
also reaches that button.
|
|
1501
|
+
- Every country and region name the package writes reads the conventions' names language (`conventions.language`, new in `@viewkitjs/fields`) instead of their locale: a place's cell, the place editor's country list and its regions, a country part column and its editor, and a place's country filter choices, named and ordered. Dates and numbers keep the locale. Conventions that state no `language` read as before.
|
|
1502
|
+
- A country typed, pasted or filled into a country cell is read in the names language, then the locale, then English.
|
|
1503
|
+
- The guides and the contract say when a server's refusal shows under `escape: "keep"`: the editor has closed by then,
|
|
1504
|
+
as it has after Enter, so the refusal shows on the cell in the grid and under the row in a field row. A value the
|
|
1505
|
+
editor or your app refuses on the spot still stays open with its reason. Nothing changes in how Escape behaves.
|
|
1506
|
+
- The retry line under a field row's failed write carries `data-slot="vk-field-retry"`, whatever the provider says. It
|
|
1507
|
+
stays ViewKit's own, as a note's disclosure (`data-field-note`) does: each is the sentence it says.
|
|
1508
|
+
|
|
1509
|
+
### Fixed
|
|
1510
|
+
|
|
1511
|
+
- **Every word the Filter, Sort and Customize panels draw is yours, and every number and date reads your
|
|
1512
|
+
conventions.** A text or number row's "Any" and a text rule's summary (`filterValueLabel` now hands them the
|
|
1513
|
+
conventions); the text, number, range and date operator menus (fields' `*FilterOperatorLabel`); a relative date's
|
|
1514
|
+
direction and unit menus (fields' new `filter.relative-direction` and `filter.relative-unit`); a yes/no column's
|
|
1515
|
+
choices (`views.panels.boolean-checked`, `views.panels.boolean-unchecked`, `views.panels.boolean-not`, and
|
|
1516
|
+
`views.display.boolean` for a text display's fallback); a relation's Where field page title
|
|
1517
|
+
(`views.panels.where-field-title`); a date range's days, in the conventions' locale (`dateRangeValueLabel` and
|
|
1518
|
+
`timeScopeRowValueLabel` take the conventions as an optional third argument); a number box's starting text, with
|
|
1519
|
+
your decimal; the views' and the export's counts, grouped in your locale; and a relation row's names, sorted in it.
|
|
1520
|
+
A relation target may name its noun (`RelationFilterTarget.noun`), and without one its label is lower-cased in your
|
|
1521
|
+
locale. With no words of yours, each reads as before.
|
|
1522
|
+
- **The Filter panel the builder makes speaks your words and reads your conventions.** `settingsFilters` (and so
|
|
1523
|
+
`settingsPanels` and `ReadyToolbar`) hands `resolve` and the new `conventions` input to the column rows and the
|
|
1524
|
+
Related records rows, where it handed neither: part labels ("Address · Country"), a select row's empty summary
|
|
1525
|
+
(`views.panels.filter-all-of`, where it wrote "All stage" in English) and a place's country choices, named in
|
|
1526
|
+
`conventions.language`, now follow the app. `ReadyToolbar` hands the provider's conventions where you hand none. A
|
|
1527
|
+
hidden column's rows sit under `views.panels.hidden-columns` and the relation rows under
|
|
1528
|
+
`views.panels.related-records`, worded by your resolver; `buildRelationFilters` takes `messages` and `conventions`
|
|
1529
|
+
for them. `HIDDEN_COLUMN_SECTION` stays, the heading's English.
|
|
1530
|
+
- **The row menu's Cut, Paste and Clear follow the same rule as the keyboard.** On a yes/no cell, which ⌘X, ⌘V and Delete already write, the three are no longer disabled, and Clear unticks it. A column the keyboard never writes, a computed or a `command` one, keeps them disabled, even where it is hand-written with `editable: true`.
|
|
1531
|
+
- An edit still open in the grid or a field row is no longer lost when its page goes (a reload, a closed tab, a removed
|
|
1532
|
+
frame, Back to another document) or when the grid or the row goes while the page stays (a route change, Back inside
|
|
1533
|
+
your app, a drawer you close, switching views). On a desktop the editor's draft is written as a press outside writes
|
|
1534
|
+
it, and an answer already given and waiting out the editor's exit is written at once. In a phone's sheet nothing is
|
|
1535
|
+
written, as when the sheet is swiped away. Escape still writes nothing, and so does the grid's own end of an edit
|
|
1536
|
+
(Escape on the cell, a row that left the data). A value the grid refuses writes nothing: when the page goes nothing
|
|
1537
|
+
is said, and when the grid goes while the page stays its reason is said in the toast port's `error`, as the grid says
|
|
1538
|
+
a refusal left behind when a cell's editor goes. A field row says nothing either way. A grid or a row hidden by
|
|
1539
|
+
`<Suspense>` or `<Activity mode="hidden">` above it counts as going.
|
|
1540
|
+
- **The selection bar's More no longer opens an empty menu.** With four verbs or fewer nothing spills into More, so
|
|
1541
|
+
it is drawn disabled in its usual place and opens nothing; with five or more it opens the extra verbs as before.
|
|
1542
|
+
- **One Escape that closes a menu no longer clears the selection too.** `useEscapeToClear` skips an Escape something
|
|
1543
|
+
open already took: a menu or popover that closes on the key marks it handled with `preventDefault`, as Radix and
|
|
1544
|
+
Base UI both do. The next Escape clears the selection.
|
|
1545
|
+
- **Sort's and Group by's search keep a filter search's inset.** Their search field sits in the same well as a
|
|
1546
|
+
filter's (`data-vs-inset`), so a host that insets its panel rows by that attribute insets the search with them, and
|
|
1547
|
+
the popover gives both the same padding.
|
|
1548
|
+
- **A filter with no options says so.** A several-values filter, or a one-value filter without its All row, whose
|
|
1549
|
+
option list is empty shows "Nothing to pick." in place of an empty box.
|
|
1550
|
+
- A Filter or Options part you place yourself, handed the builder's rows and no `onClear`, now clears every active filter on its ✕; it used to clear only the last of several. The builder's filter rows of one build now add up: several writes through them hand changes that build on each other, the last carrying them all. `settingsCleared` still gives the clear as one change.
|
|
1551
|
+
- A lookup column whose far field is a place now offers a sort only by the parts that place keeps (its `parts`), following a chain of lookups to its end, as a place column already did. It used to offer city, region, country and postal code whatever the far field kept.
|
|
1552
|
+
- A place's Filter part rows are only the parts it keeps (its `parts`, or a lookup's far field's, through a chain of lookups), as its sorts are. A place keeping `city` and `countryCode` offered Region and Postal code rows that filtered nothing. A rule on a part the place doesn't keep has no opinion on a row, as a part no row offers already had, and the panel conversions (`filterPanelFromTree`, `rootRulesByColumn`) keep it in the rest instead of reading it into a row. A place naming no parts offers all four, as before.
|
|
1553
|
+
- A grid that a layout move shifts while it shows (a pager moving its track by less than a screen, a transform, a
|
|
1554
|
+
slide that ends on screen), or that slides into view from off screen, draws the rows it now shows. It used to keep
|
|
1555
|
+
the rows it drew before the move, with empty row lines where the new ones belong, until something scrolled.
|
|
1556
|
+
- A part column's edit made while an earlier write of its cell is still on its way keeps that write's change when a
|
|
1557
|
+
later write of the cell is refused first. It built on the row before, and could put back what the earlier write
|
|
1558
|
+
changed.
|
|
1559
|
+
- A part column's edit made right after ⌘Z no longer builds on the value the undo is about to take back.
|
|
1560
|
+
- A field row whose save your server refused, pressed again, opens its editor on the refused value with your server's
|
|
1561
|
+
reason, as the retry line under the row says it, until the value changes. It used to open on the value with no
|
|
1562
|
+
reason.
|
|
1563
|
+
|
|
1564
|
+
### For an adapter
|
|
1565
|
+
|
|
1566
|
+
- **Four more message keys**, `views.panels.boolean-checked` ("Checked"), `views.panels.boolean-unchecked`
|
|
1567
|
+
("Unchecked"), `views.panels.boolean-not` (`{ label }`, "Not won") and `views.panels.where-field-title`
|
|
1568
|
+
(`{ relation, field }`, "Campaigns · Status"), and two in `@viewkitjs/fields`, `filter.relative-direction` and
|
|
1569
|
+
`filter.relative-unit`. A resolver that falls back to the package's English reads them; one that words every message
|
|
1570
|
+
with a `switch` and no default, or an override typed over every key, must word them. Your conventions' `messages`
|
|
1571
|
+
now also word the Filter's operator menus and a text or number row's summary.
|
|
1572
|
+
- **Two new message keys**, `views.panels.hidden-columns` ("Hidden columns") and `views.panels.related-records`
|
|
1573
|
+
("Related records"), the Filter panel's two headings. A resolver that falls back to `resolveViewsMessage` reads them
|
|
1574
|
+
in English; one that words every message with a `switch` and no default, or a `ViewsMessages` override typed over
|
|
1575
|
+
every key, must word them.
|
|
1576
|
+
- Your `Sheet` now also receives the toolbar's panels (`snap: "full"`, with `label` and no `title`: the panel's own header titles it) and the views picker's list (`snap: "auto"`, titled "Views"). With `sheetActions: "head"`, a panel's sheet is handed `actions.close` and no `done`: draw the ✕ in its head, and the panel draws none of its own.
|
|
1577
|
+
- A views picker row's ⋮ opens your `Menu` from inside that sheet: a press in the menu must not count as a press outside the sheet.
|
|
1578
|
+
- A values body opened for one value is handed `holds: "one"` and `labels: false`: one line, no label, no main mark, no
|
|
1579
|
+
line to add another while it holds one.
|
|
1580
|
+
- Hand every change through `onValueChange` as it is made, the whole text each time. A change equal to what your body
|
|
1581
|
+
was drawn with is no change, so an echo of the value you were handed never undoes a newer one.
|
|
1582
|
+
- Enter and Shift Enter are yours and do what the editor's own do: on a line they call `onDone()`, in a paragraph they
|
|
1583
|
+
make a new line. A step of your own that lists choices (a phone's countries) may take Enter for its pick.
|
|
1584
|
+
- Escape, Tab and ⌘ or Ctrl Enter from inside your body's element are taken before your body hears them: Tab walks your
|
|
1585
|
+
controls and closes from either end, ⌘ or Ctrl Enter closes as Enter. In place, a Tab between your controls moves the
|
|
1586
|
+
focus but your own key handlers don't hear it.
|
|
1587
|
+
- A popup you draw outside your body's element (a country list in a portal) keeps its own keys, carries
|
|
1588
|
+
`EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`) takes the focus while it is open and hands it back to your body when it closes; in
|
|
1589
|
+
place, the focus leaving your body for anywhere else closes the editor as a press outside does, and a press on your
|
|
1590
|
+
body's own surface doesn't.
|
|
1591
|
+
- Draw no reason a value is refused at the close: the editor draws it. Use `check` to say it as it is typed.
|
|
1592
|
+
- A phone's country is `region`; the phone opens written out, and a number handed back that reads as the stored one writes
|
|
1593
|
+
nothing.
|
|
1594
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the sheet holds them.
|
|
1595
|
+
- A body taller than its cell grows over the rows below; at the last row, where the scroll box clips it, open upward or
|
|
1596
|
+
scroll inside.
|
|
1597
|
+
- Hand every change through `onValueChange` as it is made: a number, never text. Hand `null` when your box is emptied and
|
|
1598
|
+
`NaN` when what is in it reads as no number; a close on `NaN` writes nothing, and a close on `null` clears only where
|
|
1599
|
+
the field may be emptied. A typed key that reads as no number opens your body with `value` as `NaN` and `typed` as the
|
|
1600
|
+
key.
|
|
1601
|
+
- Read what is typed in your box with `locale`, and with `decimal` where it is handed; without it, either separator
|
|
1602
|
+
reads. The editor rounds to `decimals`, so hand what was typed.
|
|
1603
|
+
- A percent is the percent: 40 is 40 %.
|
|
1604
|
+
- A unit changes only to one of `units`; a unit with no `units` is shown, with nothing to press. A unit you hand back
|
|
1605
|
+
that isn't on offer is ignored.
|
|
1606
|
+
- Enter, Shift Enter and Alt Enter are yours and call `onDone()`, as the editor's own box closes on Enter with any
|
|
1607
|
+
modifier; your own unit list may take Enter for its pick. Escape, Tab and ⌘ or Ctrl Enter from inside your body's
|
|
1608
|
+
element are taken before your body hears them: Tab walks your controls and closes from either end, ⌘ or Ctrl Enter
|
|
1609
|
+
closes as Enter.
|
|
1610
|
+
- A popup you draw outside your body's element (a unit list in a portal) keeps its own keys, carries
|
|
1611
|
+
`EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`), takes the focus while it is open and hands it
|
|
1612
|
+
back to your body when it closes; in place, the focus leaving your body for anywhere else closes the editor as a press
|
|
1613
|
+
outside does, and a press on your body's own surface doesn't.
|
|
1614
|
+
- Draw no reason a value is refused at the close: the editor draws it. Use `check` to say it as it is typed.
|
|
1615
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the sheet holds them.
|
|
1616
|
+
- A body taller than its cell grows over the rows below; at the last row, where the scroll box clips it, open upward or
|
|
1617
|
+
scroll inside.
|
|
1618
|
+
- Hand every change through `onValueChange` as it is made, the whole value each time. The editor holds the draft, so
|
|
1619
|
+
Escape (where your app keeps it), Tab out and a press outside save what was handed, and nothing else.
|
|
1620
|
+
- A name: hand `full` back as you were handed it unless the person typed a full name of their own.
|
|
1621
|
+
- A place: `regionCode` is the editor's, read from the region: a region named in the country's list (by its code, its
|
|
1622
|
+
name, its Latin name or its label, in any case) takes that region's label and code, any other has none, and a new
|
|
1623
|
+
country clears both. A part you leave out of the value is cleared.
|
|
1624
|
+
- A range: draw `bands` as picks, each handing its two ends, then `onDone("pick")`. The editor draws no refusal inside
|
|
1625
|
+
your body: the panel draws it.
|
|
1626
|
+
- `onDone()` closes as Enter does (the grid moves one row down); `onDone("pick")` closes as a pick.
|
|
1627
|
+
- Escape and Tab from inside your body's element are taken before your body hears them: Tab walks your controls and
|
|
1628
|
+
closes from either end. A key that starts in a popup you draw outside your body's element (a list in a portal) is
|
|
1629
|
+
left to you, and that popup carries `EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`), so a popover that hears Escape on the document first leaves it to your popup. Enter is yours.
|
|
1630
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the editor's panel holds them.
|
|
1631
|
+
- Hand every change through `onValueChange` as it is made, the whole list each time. A line you hand back as it was
|
|
1632
|
+
drawn keeps what is stored, so a phone or a link is not rewritten by opening the editor; a phone is matched however it
|
|
1633
|
+
is written.
|
|
1634
|
+
- Check each value as it is added or changed with `check`: its reason is in your app's words, and a value as it was
|
|
1635
|
+
stored always reads.
|
|
1636
|
+
- `labels: false`: draw no label, and none is saved. Offer your own labels when it is true.
|
|
1637
|
+
- `onDone()` closes as Enter does (the grid moves one row down). Enter is yours.
|
|
1638
|
+
- Escape and Tab from inside your body's element are taken before your body hears them: Tab walks your controls and
|
|
1639
|
+
closes from either end. A key that starts in a popup you draw outside your body's element (a label list in a portal)
|
|
1640
|
+
is left to you, and that popup carries `EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`).
|
|
1641
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the editor's panel holds them.
|
|
1642
|
+
- Three things differ from the editor's own rows: a list the write check refuses is said once, under your body in the
|
|
1643
|
+
panel, rather than under each row; where Escape keeps, an Escape over a refused list shows the reason and a second
|
|
1644
|
+
Escape throws the edit away; and focus leaving your body other than by Tab doesn't close the editor (a press outside
|
|
1645
|
+
does).
|
|
1646
|
+
- The row menu's Cut, Paste and Clear, "+ Add column"'s all-shown row, and a field row's verbs while their record loads now reach your `Menu` with a `disabledReason` whenever they are disabled. Each one says the sentence the grid already says for the same cause: the column's own reason (`reasons.editable`, `reasons.clearable`), "Nothing to paste", or the paste's own refusal ("Not a number"). A new key is used only where none fits. A verb you disabled with a reason of your own keeps it.
|
|
1647
|
+
- So a `Menu` that takes a disabled row only with its reason can drop any stand-in for those rows.
|
|
1648
|
+
- A `ViewsMessages` override typed over every key must map the three new ones.
|
|
1649
|
+
- Before you turn `bodyFrame: "popover"` on, give the popover that opens with `chrome: "menu"` a width that doesn't
|
|
1650
|
+
follow its content, or it widens and narrows as a list filters while a person types; a popover sized to its content
|
|
1651
|
+
(a `w-auto` menu panel) needs one. Setting a fixed width on your body's own root, with the popover sized to it, works
|
|
1652
|
+
too.
|
|
1653
|
+
- Cap it by the room on screen (your positioner's available width), so it stays on screen in the grid's last column.
|
|
1654
|
+
- Pad it as you want: ViewKit's own padding around a parts or values body is gone at `"popover"`.
|
|
1655
|
+
- A body that needs more room than the rest (a place's parts on one line) is reached by the popover's
|
|
1656
|
+
`[data-vk-body="parts"]`, or `"picker"` and `"values"` for the others.
|
|
1657
|
+
- An editor drawing ViewKit's own body (no `Picker`, `PartsBody` or `ValuesBody` handed) keeps ViewKit's width at
|
|
1658
|
+
either setting, and a phone's sheet is unchanged.
|
|
1659
|
+
- `ATOM_NAMES` gains `RangeCalendar`. An adapter typed as the whole `ViewsAtoms` won't compile until it maps it or leaves it to the default.
|
|
1660
|
+
- `ICON_NAMES` gains `filter`, `filterStatus`, `filterCategory` and `filterMetric`. An icon map typed `Record<ViewsIconName, …>` maps all four.
|
|
1661
|
+
- `ICON_NAMES` gains `options` (a layout setting's default glyph) and `person` (a For you setting's default glyph). An icon map typed `Record<ViewsIconName, …>` won't compile until it maps them both.
|
|
1662
|
+
- `VK_OPTIONAL_LAYOUT` gains `--vk-panel-padding`, the inset a panel's list keeps from its edge, `0.375rem` when you declare none. Declare it onto your menus' own padding if they have one.
|
|
1663
|
+
- `ATOM_NAMES` gains `Pill`. An adapter typed as the whole `ViewsAtoms` won't compile until it maps it or leaves it to the default (`Omit<ViewsAtoms, …>`).
|
|
1664
|
+
- `ICON_NAMES` gains `moreVertical`. An icon map typed `Record<ViewsIconName, …>` maps it.
|
|
1665
|
+
- `ICON_NAMES` gains `layout`, `columns` and `sort` (Customize's root rows), `back` (its header's arrow), `copyLink`, `export` and `share` (its actions) and `loading` (the export's spinner: map it to a glyph that turns by itself, as your app's spinner does). An icon map typed `Record<ViewsIconName, …>` won't compile until it maps all eight.
|
|
1666
|
+
- Your `onCellCommit` (and a field row's `onCommit`) can be called inside `pagehide`, as the page is going: send the
|
|
1667
|
+
write with `keepalive` (or a beacon) where it must outlive the page.
|
|
1668
|
+
- **Twenty-seven new message keys** for the builder's words: the layouts (`views.panels.layout-table`,
|
|
1669
|
+
`layout-list`, `layout-board`, `layout-calendar`, `layout-rows`) and the reasons one is refused, the look's toggles,
|
|
1670
|
+
the densities, the Layout panel's choices, Sort's Manual, two Group orders and a date's granularities. A resolver
|
|
1671
|
+
that falls back to `resolveViewsMessage` reads them in English; one that words every message with a `switch` and no
|
|
1672
|
+
default must word them, and a test that holds your catalogue to `VIEWS_MESSAGE_KEYS` fails until it does.
|
|
1673
|
+
- `ATOM_NAMES` gains `ToolbarButton`. An adapter typed as the whole `ViewsAtoms` won't compile until it maps it or leaves it to the default (`Omit<ViewsAtoms, …>`).
|
|
1674
|
+
- `ATOM_STATES` gains `changed`, `edge`, `expanded`, `form` and `line`.
|
|
1675
|
+
- A popup of your own that closes on Escape without either library calls `event.preventDefault()` on that Escape, so
|
|
1676
|
+
a selection under it survives the press.
|
|
1677
|
+
- **One new message key**, `views.panels.filter-no-options` ("Nothing to pick."). A resolver that falls back to
|
|
1678
|
+
`resolveViewsMessage` reads it in English; one that words every message with a `switch` and no default must word it.
|
|
1679
|
+
- Before you set `gridCheckboxes: "checkbox"`, forward `readOnly` to your Checkbox's control. An app that hasn't
|
|
1680
|
+
forwarded `readOnly` shows a read-only cell that looks pressable and does nothing when pressed.
|
|
1681
|
+
- Your Checkbox's element, or one around it, must be a `button`, an `input`, a `label` or carry `role="checkbox"`: the
|
|
1682
|
+
grid's row stands aside for those, so a press on the box writes the value and neither selects the cell nor opens the
|
|
1683
|
+
row. Hand `onCheckedChange` the new value once per press.
|
|
1684
|
+
- With the option on, each drawn row's yes/no cell is one of your Checkboxes, so one that draws more than its box (a
|
|
1685
|
+
label, a hidden input, an animated mark) draws it in every row.
|
|
1686
|
+
- An adapter that forwards `checked`, `onCheckedChange`, `disabled`, `tabIndex`, `aria-label` and `className` already
|
|
1687
|
+
has everything else the cell hands, and adds only `readOnly`. A Base UI checkbox takes `readOnly` as it is. A Radix
|
|
1688
|
+
checkbox has no read-only form, so its adapter has to stop the press itself (no `onCheckedChange` while `readOnly`, and
|
|
1689
|
+
no pointer on the box) before the app switches the option on.
|
|
1690
|
+
- Before you set `gridButtons: "button"`, forward `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and
|
|
1691
|
+
`data-open` to your `Button`'s element. An adapter that picks the props it forwards (one that forwards `aria-label`
|
|
1692
|
+
alone, say) leaves a group's ⋯ and "+ Add column" with nothing to anchor their menus on, and makes every grid button
|
|
1693
|
+
a Tab stop. An adapter that spreads the rest of its props onto a `forwardRef` button (or a React 19 function
|
|
1694
|
+
component that passes `ref` on) already does.
|
|
1695
|
+
- Hand `onClick` the click on that element: the row's ⋯ reads its place from `event.currentTarget`.
|
|
1696
|
+
- Let the `className` handed win over your size's own classes: the grid's box is in it (a 24px square, a full-height
|
|
1697
|
+
header cell). A `cn` built on `tailwind-merge` does.
|
|
1698
|
+
- With `gridButtons: "button"`, each drawn row's ⋯ is one of your `Button`s, and so is each button in an action
|
|
1699
|
+
column's cells and the hovered row's name actions. A `Button` that draws more than its element (a ripple layer, a
|
|
1700
|
+
`<span>` around its label) draws that in every row; one that warns in development about an icon-only button with no
|
|
1701
|
+
`aria-label` warns once per row for an action column whose actions give no `label`.
|
|
1702
|
+
- **`ViewsAtoms` gains `Avatar`.** Atoms typed as the whole `ViewsAtoms` need one: add your own, or spread
|
|
1703
|
+
`DEFAULT_VIEWS_ATOMS` under yours. Atoms passed to the provider as a partial set take the default, unchanged.
|
|
1704
|
+
- **One new slot**, `data-slot="vk-avatar"`, on the default's picture.
|
|
1705
|
+
- While any column grows, the tail ("+ Add column", a row's ⋯) stands at its own width right after the last column, so
|
|
1706
|
+
a row has no empty stretch past the columns. With every column holding a set width or a `grid.maxWidth`, the tail
|
|
1707
|
+
takes the rest again, as without the option.
|
|
1708
|
+
- A group's band, the footer and the one header over the groups (`oneHeader`) follow the same widths: they read the
|
|
1709
|
+
same columns' template as the rows.
|
|
1710
|
+
- Nothing changes unless you set `severalValues: "fit"` or hand a `CellMore`. With ViewKit's own, the count is the same
|
|
1711
|
+
element as before, its frame and all, now marked `data-slot="vk-cell-more"`.
|
|
1712
|
+
- A `CellMore` of yours draws inside a bare button (a bare span where the host owns the click, handed `inert`): ViewKit
|
|
1713
|
+
keeps its frame only for its own default, so wrapping `DefaultCellMore` in an atom of yours gives that bare button
|
|
1714
|
+
too. The button still opens the whole list and keeps its place in the row's click contract.
|
|
1715
|
+
- With `"fit"`, a cell's values box fills the room its host gives it, and a cell that mounts before it is laid out (a
|
|
1716
|
+
hidden tab, a drawer still opening) shows its first value until its first real width, then fits.
|
|
1717
|
+
- Dress the open cell as pressed with `[data-slot="vk-grid-header-cell"][data-open]` (and the footer cell's slot), for
|
|
1718
|
+
example on `--vk-pressed`. ViewKit draws no look of its own for it, so nothing changes until you do.
|
|
1719
|
+
- Dress the grid's states by their attributes (`[data-selected]`, `data-[focused]:…`), never by the classes ViewKit
|
|
1720
|
+
happens to use. ViewKit's own look for each state is unchanged.
|
|
1721
|
+
- `data-pending`: a write to the cell is in flight, any of them, from its send to the app's answer.
|
|
1722
|
+
- `data-invalid`: the latest write sent for the cell was refused. It holds until the cell's next write is sent, which
|
|
1723
|
+
is then the last commit; an undo or a redo is a write.
|
|
1724
|
+
- `data-empty` on a cell reads the value it shows. A value made of parts whose parts are all empty (a money, a range)
|
|
1725
|
+
doesn't count as empty, and a column with no value of its own (an action column) never is.
|
|
1726
|
+
- The grid drags no row, so no row carries `data-dragging`.
|
|
1727
|
+
- The glyphs are still drawn at 70% opacity, so a colour you set shows at 70% of itself: to reach an exact colour,
|
|
1728
|
+
set a stronger one. A column's own `icon` node is drawn as you hand it, and this colour doesn't reach it.
|
|
1729
|
+
- **Nothing to declare**: every default is what the outlines drew before. If you dressed the picked ring by a rule
|
|
1730
|
+
on `data-slot="vk-grid-outline"` (its `border-radius`, or `--vk-fg-subtle` set on it), the variables do the same
|
|
1731
|
+
for both outlines at once.
|
|
1732
|
+
- **One new line in your compiled CSS.** The new corner class reads Tailwind's `--radius-sm`, so an app whose
|
|
1733
|
+
Tailwind inlined `rounded-sm` before now emits `--radius-sm` on `:root` (Atlas: `calc(var(--radius) * 0.6)`),
|
|
1734
|
+
the same value.
|
|
1735
|
+
- **Nothing to add.** `place` is optional: an adapter typed as the whole `ViewsAtoms` keeps compiling, and a
|
|
1736
|
+
badge that ignores it draws as it did. `ViewsStatusOption` and `ViewsStatusPlace` are exported from
|
|
1737
|
+
`@viewkitjs/views/react` beside `ViewsStatusBadgeProps`.
|
|
1738
|
+
- With it on, a column's resize handle bar sits on the column's right edge, 1px inside the new line.
|
|
1739
|
+
- To rule only the pinned columns' edge, turn `verticalBorders` off and draw the line on the cells that carry
|
|
1740
|
+
`data-frozen`; it marks every pinned column, not only the last of them, so each pinned column is ruled.
|
|
1741
|
+
- Your own `MenuRow` and `ToggleRow` receive the reason as `disabledReason` on every row the panels disable themselves; a filter row you declare disabled carries the `disabledReason` you give it. A row that reads none looks as before.
|
|
1742
|
+
- A `ViewsMessages` override typed over every key must map the four new ones.
|
|
1743
|
+
- More's disabled rows now reach your `Menu` with the verb's `disabledReason`, a group's rows with the group's where they give none, and a group's own menu hands each disabled row its reason. Your own `SelectionSheet` receives the reasons on its `verbs`.
|
|
1744
|
+
- So a `Menu` that takes a disabled row only with its reason can drop its stand-in for these rows wherever your verbs set one; a verb that sets none still arrives without a reason.
|
|
1745
|
+
- Your `Button` renders a real `<button>`, so a row's click and the cell-range drag stand aside for a command cell's
|
|
1746
|
+
trigger as they do for ViewKit's own.
|
|
1747
|
+
- An app `CommandMenu` or `Tooltip` that clones the trigger it is handed (a trigger with `asChild`) composes its own handlers
|
|
1748
|
+
and attributes onto your `Button`: spread the rest of your props onto its element and forward `ref`.
|
|
1749
|
+
- Let the `className` handed win over your size's own classes; a `cn` built on `tailwind-merge` does.
|
|
1750
|
+
- A sort by a place's part arrives through the sort state's `onChange` as the part key, `{ value: "address::countryCode", dir }`: read it with `parsePartKey` from `@viewkitjs/fields/query`, which gives `{ id: "address", part: "countryCode" }`. The settings panels write it as `{ fieldKey: "address", direction, by: "countryCode" }`, as before. A place column offers these on a saved view only, and not when it declares a `sortKey`.
|
|
1751
|
+
- `FieldViewerContext` takes an optional `language`, the language a place's country is written in (`viewerFrom` fills it from the conventions). A viewer without one names countries in its `locale`, as before.
|
|
1752
|
+
- This needs the `@viewkitjs/fields` version whose conventions carry `language`.
|
|
1753
|
+
- The pager's slots: `vk-grid-pager`, `vk-grid-pager-range`, `vk-grid-pager-size` (`data-open` while its menu is open), `vk-grid-pager-previous`, `vk-grid-pager-next`. Its words: `views.grid.pager`, `views.grid.pager-range`, `views.grid.pager-size`, `views.grid.pager-sizes`, `views.grid.pager-previous`, `views.grid.pager-next`.
|
|
1754
|
+
- Forward `readOnly` to your `Checkbox` before you set `fieldRowCheckboxes: "checkbox"`, as for `gridCheckboxes`.
|
|
1755
|
+
- The panels' tick rows (`CheckRow`, and `RadioRow` with `mark="box"`) draw the `TickBox` atom inside a row that is
|
|
1756
|
+
itself the control: hand the picture of your box there through `atoms.TickBox` (a kit's checkbox mark), never your
|
|
1757
|
+
`Checkbox`.
|
|
1758
|
+
- Before you set `fieldRowButtons: "button"`, your `Button` forwards the ref and `aria-disabled` to its element, renders
|
|
1759
|
+
a real `<button>` (a rich text's layer lets a press through only to its links and buttons), and lets the `className`
|
|
1760
|
+
handed win over its own size; a `cn` built on `tailwind-merge` does.
|
|
1761
|
+
|
|
1762
|
+
## [0.5.0] — 2026-11-14
|
|
1763
|
+
|
|
1764
|
+
The selection bar, one conversion between a filter panel and a view's filter tree, figures worked out by
|
|
1765
|
+
`@viewkitjs/fields`, and the rows, icons and words the list's panels will draw with. It needs `@viewkitjs/fields`
|
|
1766
|
+
0.12. The panels' own door, `@viewkitjs/views/panels`, is still being built and is not in this version: a later
|
|
1767
|
+
release publishes it, with the controls.
|
|
1768
|
+
|
|
1769
|
+
What an app changes when it takes this version:
|
|
1770
|
+
|
|
1771
|
+
- **Install `@viewkitjs/fields` 0.12** beside it: the peer is `^0.12.0` (Changed).
|
|
1772
|
+
- **Your icons map draws two more glyphs**, `search` and `reset`: an icons map typed `ViewsIcons` doesn't compile
|
|
1773
|
+
until it does (For an adapter).
|
|
1774
|
+
- **Forty-six new message keys**, ten `views.selection.*` and thirty-six `views.panels.*`. A resolver that falls back
|
|
1775
|
+
to `resolveViewsMessage` reads them in English; one that words every message with a `switch` and no default must
|
|
1776
|
+
word them, and a test that holds your catalogue to `VIEWS_MESSAGE_KEYS` fails until it does (For an adapter).
|
|
1777
|
+
- **Fourteen names are removed**, each with what replaces it (Removed). None of them is needed by a grid, an editor
|
|
1778
|
+
or a display that an app draws.
|
|
1779
|
+
|
|
1780
|
+
### Added
|
|
1781
|
+
|
|
1782
|
+
- **The selection bar.** `SelectionBar` on `@viewkitjs/views/selection` draws the bar a selection opens: the count
|
|
1783
|
+
that clears it, your verbs as data (`SelectionVerb`: an action, a group, or an options verb picked as badges), the
|
|
1784
|
+
trash for `onDelete` and More. An island on a desktop, a pill on a phone whose Actions open the new
|
|
1785
|
+
`SelectionSheet` atom, which an app swaps for its own action sheet. Its words are the new `views.selection.*`
|
|
1786
|
+
messages, its slots `vk-selection-bar`, `vk-selection-pill` and `vk-selection-chip`, and it reads the new optional
|
|
1787
|
+
`--vk-float-shadow`. The provider's new `selectionBar` (`ViewsSelectionBarSettings`) places it.
|
|
1788
|
+
- One conversion between a filter panel and a view's filter tree, both ways: `filterPanelFromTree(tree, columns, { parts })`
|
|
1789
|
+
reads a tree into `{ op, rules, rest }`, a rule per column (and per part row), and `treeFromFilterPanel(panel, columns,
|
|
1790
|
+
{ parts })` writes it back. Whatever no row can draw (and/or groups, relation rules, a second rule on one column, an
|
|
1791
|
+
operator its editor doesn't write) is kept whole in `rest`, so a round trip loses no rule, and reading the tree it
|
|
1792
|
+
writes gives the same state.
|
|
1793
|
+
- Quick values convert through the same rules: `quickValuesFromTree(tree, fields)` reads an offered field's picks,
|
|
1794
|
+
`withQuickValues(tree, fields, values)` writes them as ordinary root rules. Types: `FilterPanelState`, `QuickValues`,
|
|
1795
|
+
`QuickValueField`.
|
|
1796
|
+
- Seven atoms for a list's panels' rows, each with a plain default: `ChoiceRow`, `CheckRow`, `RadioRow`,
|
|
1797
|
+
`DirectionButton`, `MenuRow`, `ToggleRow` and `PanelSearch`, marked `data-slot="vk-choice-row"` and so on. Your own
|
|
1798
|
+
panels may draw with them today.
|
|
1799
|
+
- Two icon names: `search` (a panel's text box) and `reset` (a setting's way back to the reader's default).
|
|
1800
|
+
- The `views.panels.*` message keys, for the panels' words.
|
|
1801
|
+
- `@dnd-kit/core`, `@dnd-kit/sortable` and `@dnd-kit/utilities` as optional peer dependencies, for the panels' door a
|
|
1802
|
+
later release publishes. This version reaches none of them: don't install them for it.
|
|
1803
|
+
|
|
1804
|
+
### Changed
|
|
1805
|
+
|
|
1806
|
+
- **The peer is `@viewkitjs/fields` `^0.12.0`.** `ListColumnState`, `ListDensity`, `FigureKind`, `partKey`,
|
|
1807
|
+
`parsePartKey` and a group header's figures (`ListGroupSummaryPart`, `ListGroupFigurePart`, `isGroupSummaryPart`,
|
|
1808
|
+
`normalizeGroupSummary`, `groupFigurePart`) are now `@viewkitjs/fields/query`'s, re-exported unchanged, so this
|
|
1809
|
+
version needs fields 0.12.0, which carries them.
|
|
1810
|
+
- A grid's figures (sum, average, smallest, largest, count, filled, unique and ratio) are now worked out by
|
|
1811
|
+
`@viewkitjs/fields`, whose query entry answers the same figures in memory and in the shape a database answers.
|
|
1812
|
+
Nothing changes in what a footer or a group band shows. `EMPTY_FIGURE`, `combineFigure`, `figureFor`,
|
|
1813
|
+
`figureOf`, `isGroupFigures`, `ratioFigure`, `ColumnFigure`, `FigureKind` and `GroupFigures` are still exported
|
|
1814
|
+
from `@viewkitjs/views`, now as `@viewkitjs/fields/query`'s own: import them from either.
|
|
1815
|
+
- `ListAggregateKind` is now `@viewkitjs/fields/query`'s `FigureKind` under the grid's name: the same picks, written
|
|
1816
|
+
once.
|
|
1817
|
+
- **`ListSelectionConfig.renderBar` is optional.** A selection with none ticks rows and draws no bar; an app that
|
|
1818
|
+
handed `() => null` can drop it.
|
|
1819
|
+
- The filter panel's rows leave a set-aside rule unseen and untouched: `rootRulesByColumn` and `rootRelationRules`
|
|
1820
|
+
never read one into a row, and `withRootRule` and `withRootRelationRules` keep it as it is when a row is written or
|
|
1821
|
+
cleared. Until a list shows set-aside rules, such a rule stays kept and filters nothing.
|
|
1822
|
+
|
|
1823
|
+
### Removed
|
|
1824
|
+
|
|
1825
|
+
- `OrderMode` and `OrderDir`. They restated `@viewkitjs/fields/query`'s `BucketOrderMode` and `SortDirection`, which
|
|
1826
|
+
`OrderChoice`, `defaultDirFor` and `sortDirFor` now name:
|
|
1827
|
+
|
|
1828
|
+
```ts
|
|
1829
|
+
// before
|
|
1830
|
+
import type { OrderDir, OrderMode } from "@viewkitjs/views";
|
|
1831
|
+
// after
|
|
1832
|
+
import type { BucketOrderMode, SortDirection } from "@viewkitjs/fields/query";
|
|
1833
|
+
```
|
|
1834
|
+
|
|
1835
|
+
- `ListStatusSlot` and `ListRowIconTone`, two more names for `StatusSlot`:
|
|
1836
|
+
|
|
1837
|
+
```ts
|
|
1838
|
+
// before
|
|
1839
|
+
import type { ListStatusSlot } from "@viewkitjs/views";
|
|
1840
|
+
// after
|
|
1841
|
+
import type { StatusSlot } from "@viewkitjs/fields/design/status-slots";
|
|
1842
|
+
```
|
|
1843
|
+
|
|
1844
|
+
- `withRootRuleState`. Write a panel's rules back with `treeFromFilterPanel`:
|
|
1845
|
+
|
|
1846
|
+
```ts
|
|
1847
|
+
// before
|
|
1848
|
+
withRootRuleState(tree, columns, rules, { parts: true });
|
|
1849
|
+
// after
|
|
1850
|
+
treeFromFilterPanel({ ...filterPanelFromTree(tree, columns, { parts: true }), rules }, columns, { parts: true });
|
|
1851
|
+
```
|
|
1852
|
+
|
|
1853
|
+
- `LIST_AGGREGATE_LABELS`. Word a figure with `aggregateLabel(kind, messages?)`, which gives the same English without
|
|
1854
|
+
`messages`:
|
|
1855
|
+
|
|
1856
|
+
```ts
|
|
1857
|
+
// before
|
|
1858
|
+
LIST_AGGREGATE_LABELS.sum;
|
|
1859
|
+
// after
|
|
1860
|
+
aggregateLabel("sum");
|
|
1861
|
+
```
|
|
1862
|
+
|
|
1863
|
+
- `PART_KEY_SEPARATOR`: `partKey` joins a key and its part, and `parsePartKey` splits one:
|
|
1864
|
+
|
|
1865
|
+
```ts
|
|
1866
|
+
// before
|
|
1867
|
+
`${columnId}${PART_KEY_SEPARATOR}${part}`;
|
|
1868
|
+
// after
|
|
1869
|
+
partKey(columnId, part);
|
|
1870
|
+
```
|
|
1871
|
+
|
|
1872
|
+
- `computeMinWidth`: sum the columns' widths and your gutter yourself.
|
|
1873
|
+
- `ListFieldFormatPrefs`, which nothing read.
|
|
1874
|
+
- `RELATED_RECORDS_SECTION`, `LIST_DEFAULT_MIN_WIDTH`, `LIST_LAYOUT_DEFAULTS`, `gridColumnIsNumericAgg` and
|
|
1875
|
+
`resolveGridRelation`, which only served the function beside them: `buildColumnFilters` places the relation rows,
|
|
1876
|
+
`clampColumnWidth` holds a column to 60 pixels when it states no `grid.minWidth`, `readViewLayout` fills in the shipped
|
|
1877
|
+
layout, `aggregateOptions` says which figures a column offers, and `@viewkitjs/fields`'
|
|
1878
|
+
`resolveRelationValue(raw, col.relation?.entity)` reads a relation value.
|
|
1879
|
+
|
|
1880
|
+
### Fixed
|
|
1881
|
+
|
|
1882
|
+
- A number between, or a range's end between, with one end still empty converts to `null` at that end, both ways, and
|
|
1883
|
+
filters nothing until both ends are in. It had been written as `0`, narrowing the list to values from 0.
|
|
1884
|
+
- A panel rule on "is empty" or "is not empty" converts to a rule whose value is `null`, which `filterValueSchema`
|
|
1885
|
+
accepts. A text row's had carried its box's `""`.
|
|
1886
|
+
- `filterPanelFromTree` and `quickValuesFromTree` no longer read a set-aside rule into a row, so writing the panel back
|
|
1887
|
+
with `treeFromFilterPanel` or `withQuickValues` keeps it set aside, where before it lost its mark and filtered again.
|
|
1888
|
+
- A footer or a group band totalling a column no longer reads a list, a yes/no or blank text as a number: a cell
|
|
1889
|
+
holding `[]`, `true` or `" "` is no value, as an empty cell is, so it no longer adds 0 or 1 to a sum or an average.
|
|
1890
|
+
|
|
1891
|
+
### For an adapter
|
|
1892
|
+
|
|
1893
|
+
- **Your icons map draws `search` and `reset`.** `ICON_NAMES` gains both, and `ViewsIcons` requires them:
|
|
1894
|
+
|
|
1895
|
+
```tsx
|
|
1896
|
+
// before
|
|
1897
|
+
const icons: ViewsIcons = { ...glyphs };
|
|
1898
|
+
// after
|
|
1899
|
+
const icons: ViewsIcons = { ...glyphs, search: SearchIcon, reset: ResetIcon };
|
|
1900
|
+
```
|
|
1901
|
+
|
|
1902
|
+
- **Forty-six new message keys**: ten `views.selection.*` (the selection bar's words) and thirty-six `views.panels.*`
|
|
1903
|
+
(the panels' words). A resolver that words every message with a `switch` and no default must word them too; one
|
|
1904
|
+
that falls back to `resolveViewsMessage` reads them in English. The [contract](docs/contract.md#message-keys) lists
|
|
1905
|
+
every key with its English.
|
|
1906
|
+
- `ATOM_NAMES` gains the seven panel rows and `SelectionSheet`. An adapter typed as the whole `ViewsAtoms` won't
|
|
1907
|
+
compile until it maps them or leaves them to the defaults (`Omit<ViewsAtoms, …>`); the provider's `atoms` takes any
|
|
1908
|
+
part of it, as before.
|
|
1909
|
+
|
|
1910
|
+
## [0.4.0] — 2026-11-13
|
|
1911
|
+
|
|
1912
|
+
Three bodies of work in one release: the field editors' last fixes, a grid that keeps up better on a phone, and
|
|
1913
|
+
what a second app's adapter found missing. Every grid menu, every pick list and the date editor can now draw through
|
|
1914
|
+
your app's own `Menu`, `Picker` and `DateBody`; a grid column can show one part of a name, a place or a range; a
|
|
1915
|
+
group band's figure can be declared and computed by the grid; Escape can keep what was typed, by field type; and a row
|
|
1916
|
+
opened from the grid hands back the way to its cell. It needs `@viewkitjs/fields` 0.11.
|
|
1917
|
+
|
|
1918
|
+
What an app changes when it takes this version:
|
|
1919
|
+
|
|
1920
|
+
- **Install `@viewkitjs/fields` 0.11** beside it: the peer is `^0.11.0` (Changed). Its lists of sort orders and
|
|
1921
|
+
filter parts now answer a range's `low` and `high` and a place's `postalCode`: code that accepts a `by` or a
|
|
1922
|
+
`part` because those lists hold it must also sort or filter by it (fields 0.11.0, Changed).
|
|
1923
|
+
- **A `RowMenu` atom of your own** is mounted once around a section's rows, not around each row, and is handed the
|
|
1924
|
+
props of the row a press or a right-click came from. One that wraps `children` and opens on a right-click needs
|
|
1925
|
+
nothing; one that reads its row from its `children`, or keeps state per row, reads it from the props when the menu
|
|
1926
|
+
opens. A `Menu` drawn in the page flow, not in a portal, now draws after the section's rows: make it a popover
|
|
1927
|
+
(For an adapter).
|
|
1928
|
+
- **Your types, where they use these.** `ViewsMenuItem.label` is text, not a node (Changed). `GridGroupFigure` is a
|
|
1929
|
+
union, so code that reads `render` off one checks its shape first (Changed). Atoms typed as the whole `ViewsAtoms`
|
|
1930
|
+
add a `RelationRoles`, or spread `DEFAULT_VIEWS_ATOMS` under yours (For an adapter). `Command` and `Calendar` are
|
|
1931
|
+
optional in `ViewsComponents` and gone from `COMPONENT_NAMES` and `ComponentName`: code that reads either back off a
|
|
1932
|
+
map typed `ViewsComponents` handles `undefined`, and a check of your map reads `OPTIONAL_COMPONENT_NAMES` too (For
|
|
1933
|
+
an adapter). `ATOM_NAMES` gains `RelationRoles`, so a check of your atoms against it fails the same way until you
|
|
1934
|
+
add one. `GridTable`'s `onOpenRow` is typed `(row, from) => void`: a handler that takes only the row is
|
|
1935
|
+
unchanged, but code of yours that calls an `onOpenRow` with the row alone no longer compiles, so give your own prop
|
|
1936
|
+
the type `(row) => void` (Changed).
|
|
1937
|
+
- **`renderAddColumn` answering `null`** draws no "+ Add column" and keeps no room for one, where `null` drew the
|
|
1938
|
+
grid's own (Changed).
|
|
1939
|
+
- **A `datetime` your save stores in another time zone** than the one it was typed in now warns that it changed
|
|
1940
|
+
elsewhere when your rows come back, where the cell showed your stored value without a word (Fixed).
|
|
1941
|
+
- **Your tests.** While a field row saves, its button is `aria-disabled`, no longer `disabled` (Fixed). A grid row
|
|
1942
|
+
draws two elements fewer, and each group's rows box ends with one `aria-hidden` box more (Changed, For an adapter).
|
|
1943
|
+
|
|
1944
|
+
New, and optional, each off until you set it: the provider's `menus`, `sheetActions`, `escape` and `sayRefusals`; the
|
|
1945
|
+
components map's `Picker` and `DateBody`; `GridTable`'s `parts`, `groupMenu` and `addColumnOnPhone`; a declared
|
|
1946
|
+
figure in `groupFigures`; and `setGridLab`, a recorder for measuring a grid on a device. `onOpenRow` now always hands a
|
|
1947
|
+
second argument, `from`, which a handler may read or ignore. Seven message keys are new:
|
|
1948
|
+
`views.grid.commit-refused`, `views.grid.commit-refused-many`, `views.menus.row-menu`, `views.menus.commands`,
|
|
1949
|
+
`views.menus.commands-unnamed`, `views.menus.column-menu` and `views.menus.figure-menu`. A resolver that answers every
|
|
1950
|
+
key fails to compile until it answers them; one that calls `resolveViewsMessage` for the rest reads them in English.
|
|
1951
|
+
|
|
1952
|
+
Fixed here, as 0.3.0's "Known in 0.3.0" promised: a date typed into a grid date cell and left by Tab is drawn in the
|
|
1953
|
+
cell at once, and in Safari a Tab out of a grid date cell's open editor selects the next cell, so → no longer lands
|
|
1954
|
+
one cell short (Fixed). No 0.3.1 was published: this version carries both.
|
|
1955
|
+
|
|
1956
|
+
Nothing else an app calls changes its signature. What is new is optional, and Changed says what behaves differently.
|
|
1957
|
+
|
|
1958
|
+
### For an adapter
|
|
1959
|
+
|
|
1960
|
+
- A sheet that draws a head of its own sets `sheetActions: "head"` on the provider and draws
|
|
1961
|
+
`actions.close` and, when handed, `actions.done` there with its own glyphs. The types are
|
|
1962
|
+
`ViewsSheetActions`, `ViewsSheetAction` and `ViewsSheetActionsPlace`.
|
|
1963
|
+
- A field row's editor host receives `openedByKey` (`RowEditorProps`), true when the row's button was pressed by a
|
|
1964
|
+
key rather than a pointer. A host of your own may read it; the select host uses it to focus its list.
|
|
1965
|
+
- `RangeEditor` takes `refusal`, your reason for refusing the range. With bands listed it draws it between the
|
|
1966
|
+
boxes and the bands, so a host of your own passes it there instead of drawing it, and gives its `EditorPanel`
|
|
1967
|
+
`editorDrawsRefusal` so the panel draws none. Without bands nothing changes: you draw the reason as before.
|
|
1968
|
+
- The grid writes a new paint flag on its root, `--vk-pin` (`relative` at rest, `sticky` once scrolled sideways). A
|
|
1969
|
+
stylesheet that styles the grid's frozen cells need not set their `position`.
|
|
1970
|
+
- **`RowMenu` wraps a section's rows, not one row.** The grid mounts your `RowMenu` atom once around each section's
|
|
1971
|
+
rows' container, instead of once around every row, and aims it at the row a press or a right-click came from: its
|
|
1972
|
+
props (`rowId`, `items`, `openHref`, `onDelete`, `deleteLabel`, `onToggleSelect`) are that row's, set in the same
|
|
1973
|
+
event your menu opens on. Right-click, the row's ⋯ and the menu key each open on their own row, as before.
|
|
1974
|
+
|
|
1975
|
+
What your atom receives now:
|
|
1976
|
+
|
|
1977
|
+
| | Before | Now |
|
|
1978
|
+
| --- | --- | --- |
|
|
1979
|
+
| `children` | one row's element | the rows' container: a component that passes the props and `ref` your trigger hands it (a `Slot`, `asChild`) to its own element |
|
|
1980
|
+
| `rowId`, `items`, `openHref`, `onDelete`, `deleteLabel` | that row's, fixed | the aimed row's; `rowId` is `""` and `items` empty before any row is aimed at |
|
|
1981
|
+
| `onToggleSelect` | there when the row could be selected | there from the first render wherever rows can be selected; it flips the row last pressed, so a long-press is armed before any press |
|
|
1982
|
+
| a right-click on no row | — | arrives with `defaultPrevented`, and opens nothing |
|
|
1983
|
+
|
|
1984
|
+
What to change: nothing, if your atom wraps `children` and opens on a right-click (the default does). An atom that
|
|
1985
|
+
reads the row from its own `children`, or that keeps per-row state of its own, reads it from the props at the moment
|
|
1986
|
+
the menu opens instead. An atom whose long-press selects calls `onToggleSelect` when the long-press fires, as before.
|
|
1987
|
+
|
|
1988
|
+
The default atom opens your components' `Menu` at the pointer. If your `Menu` is a popover (drawn in a portal, placed
|
|
1989
|
+
at its anchor), it opens where it did. If it draws in the page flow instead, it now draws after the section's rows,
|
|
1990
|
+
not after the row: make it a popover.
|
|
1991
|
+
- Set your menu's `aria-label` from `label`, and show a disabled row's `disabledReason` (a tooltip, a second
|
|
1992
|
+
line). Use the sheet's `label` where your sheet's title or accessible name takes only text.
|
|
1993
|
+
- This version needs `@viewkitjs/fields` 0.11.0, and its peer range says so (`^0.11.0`).
|
|
1994
|
+
- Atoms typed as the whole `ViewsAtoms` need a `RelationRoles`: add your own, or spread `DEFAULT_VIEWS_ATOMS` under
|
|
1995
|
+
yours. Atoms passed as a `Partial<ViewsAtoms>`, or typed without `RelationRoles`, take the default.
|
|
1996
|
+
- **`--vk-stick`** (0 or 1) joins the grid's tokens on its frame: 1 while `--vk-pin` is `sticky`, scaling the frozen
|
|
1997
|
+
cells' and the rail's sticky offsets. The column names' and the footer's frozen cells, and a group's name, now take
|
|
1998
|
+
`position: var(--vk-pin, sticky)` as a row's frozen cells do: plain boxes at rest, sticky once the table is
|
|
1999
|
+
scrolled sideways, where they looked the same before.
|
|
2000
|
+
- Each group's rows box (`[data-slot="vk-grid-rows"]`) is now `position: relative` and ends with one more element:
|
|
2001
|
+
an `aria-hidden` box after its rows that draws that shadow. A row's own rail slot no longer draws it. The column
|
|
2002
|
+
names' and the footer's slots still do.
|
|
2003
|
+
- Draw `beside` as a submenu whose trigger is the group's own row, `keepOpen` by not closing on that row, and
|
|
2004
|
+
`detail` at the row's end, as far as your menu can. An adapter that draws none of them keeps every group in place
|
|
2005
|
+
and every row closing, as before, and loses nothing it needs. A ticked row's `onSelect` fires on every pick, also
|
|
2006
|
+
when it is already ticked; ticked rows that close, inside a group, are one choice, and ticked rows with `keepOpen`
|
|
2007
|
+
are separate ticks. The types are `ViewsMenuItem` and `ViewsMenuRoute`.
|
|
2008
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own, and hand every change through
|
|
2009
|
+
`onValueChange` as it is made: the editor's panel holds the draft.
|
|
2010
|
+
- Draw the empty row from `empty`, never as an item. Typed text that names a known value in any case is taken
|
|
2011
|
+
as that value, so `onCreate` may hand back a value that is already a row.
|
|
2012
|
+
- Tab is taken before your body hears it.
|
|
2013
|
+
- A check of your components map's keys against `COMPONENT_NAMES` now finds `Command` missing from that list.
|
|
2014
|
+
Check against `COMPONENT_NAMES` and `OPTIONAL_COMPONENT_NAMES` together.
|
|
2015
|
+
- `ViewsComponents["Command"]` is now optional, so code that reads `Command` back off a map typed
|
|
2016
|
+
`ViewsComponents` sees it as possibly undefined. Type your map as `ViewsComponents & { Command:
|
|
2017
|
+
ViewsCommandParts }` where you read it back, or read it through `useViews()`, which always fills it.
|
|
2018
|
+
- Your body does its own search. A place's country list hands each country's name as its words and its code as
|
|
2019
|
+
its value; the package's own list also found a country by its code, so match the value too if you want that.
|
|
2020
|
+
- `badge` is the word for the row's end; `kind` is the record's kind as your app names it, for an avatar's shape
|
|
2021
|
+
with `avatarUrl`. They are two different things.
|
|
2022
|
+
- `glyph` arrives unsized: size it to your row.
|
|
2023
|
+
- An action's `key` is its identity among the actions.
|
|
2024
|
+
- Held records come first while nothing is typed, and by the same search as the rest once something is.
|
|
2025
|
+
- On this route the keys inside the list are yours. The package's own list keeps Enter from taking out the first
|
|
2026
|
+
linked record as it opens, and makes the highlighted linked record the lead on Space; if your body should do
|
|
2027
|
+
either, it does it.
|
|
2028
|
+
- Hand every change through `onValueChange` as it is made, on a computer too: a day pressed while a time may follow, a
|
|
2029
|
+
time set, a typed day once it reads as one. The editor holds the draft, so Escape (where your app keeps it) and a
|
|
2030
|
+
press outside save what was handed, and nothing else. A body that holds its own draft until a keep of its own loses
|
|
2031
|
+
those changes.
|
|
2032
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the editor's panel holds them.
|
|
2033
|
+
- Call `onDone` only for a pick that finishes the edit (a day on a field with no time, the empty pick), never on
|
|
2034
|
+
Escape or on leaving: the editor decides what those mean.
|
|
2035
|
+
- Escape is taken before your body hears it, so a popover of your own inside the body loses its Escape. Tab walks
|
|
2036
|
+
your body's controls and closes from either end: draw any popover of yours inside the body's element, since one in
|
|
2037
|
+
a portal reads as a Tab out.
|
|
2038
|
+
- On a date and time, a bare day moves the day and keeps the time in force; where the field's time is optional, a bare
|
|
2039
|
+
day holds no time.
|
|
2040
|
+
- `next-monday` is the Monday after today, a week on when today is a Monday.
|
|
2041
|
+
- `ViewsComponents["Calendar"]` is now optional: type your map as `ViewsComponents & { Calendar:
|
|
2042
|
+
ComponentType<ViewsCalendarProps> }` where you read it back, or read it through `useViews()`, which always fills it.
|
|
2043
|
+
|
|
2044
|
+
### Added
|
|
2045
|
+
|
|
2046
|
+
- Your sheet can hold an editor's ✕ and ✓ in its own head. Set the provider's `sheetActions` to `head` and
|
|
2047
|
+
your `Sheet` is handed `actions`: `close`, which throws the edit away as a swipe does, and `done`, which
|
|
2048
|
+
closes it as done, each a `label` and an `onPress`. The editor panel then draws no bar of its own. A pick
|
|
2049
|
+
of one (a select, a single relation), which saves on its pick, hands no `done`. `sheetActions` is `bar` by
|
|
2050
|
+
default: the panel's own bar, as before.
|
|
2051
|
+
- `EditorPanel` takes `savesOnPick`, for a body that saves on its pick: a sheet that draws the panel's
|
|
2052
|
+
buttons in its head is handed no ✓. The panel's own bar keeps its ✓.
|
|
2053
|
+
- `setGridLab` (on the root door) turns on, for one page, a recorder for measuring a grid on a device: it hands
|
|
2054
|
+
each recording of the grid's scrolls, frames and touches, with a summary, to a function you give (`record`).
|
|
2055
|
+
Off unless set; with it unset, nothing changes. The recording's shape is exported from `@viewkitjs/views/grid`
|
|
2056
|
+
as `GridRecording`, with its caps as `GRID_RECORDER_CAPS`.
|
|
2057
|
+
- `GridTable` takes `addColumnOnPhone`: "+ Add column" ends the header on a phone too, and its list opens in your
|
|
2058
|
+
`Sheet` (titled "Add column", half height), so a person who hides a column on a phone can bring it back there.
|
|
2059
|
+
Its search waits for a tap, as the grid's pickers do in a sheet. Off by default: a phone's header ends with
|
|
2060
|
+
nothing, as before.
|
|
2061
|
+
- `groupMenu` on `GridTable` names the parts a group band's ⋯ menu holds: `"sort"` (its sort choices),
|
|
2062
|
+
`"figures"` (the count and each figure, turned on and off) and `"hide"`, as `GridGroupMenuPart`s. The ⋯
|
|
2063
|
+
then holds exactly the parts you name and pass what they need (`sort` with `sortOptions`; `groupFigures`
|
|
2064
|
+
with `onGroupSummaryChange`; `onHideGroup`), so the figure toggles or Hide come without sort, and sort
|
|
2065
|
+
without them. With `groupMenu`, the sort list always searches through your `Command`, at any count, so
|
|
2066
|
+
you know from your props alone whether the menu reaches it: leave `"sort"` out while your `Command` isn't
|
|
2067
|
+
ready.
|
|
2068
|
+
|
|
2069
|
+
```tsx
|
|
2070
|
+
<GridTable groupMenu={["figures", "hide"]} groupFigures={figures} onGroupSummaryChange={setPart} onHideGroup={hide} … />
|
|
2071
|
+
```
|
|
2072
|
+
|
|
2073
|
+
Without `groupMenu` the ⋯ is as before: it opens for sort or Hide, carries the figure toggles with them,
|
|
2074
|
+
and searches past eight sort choices.
|
|
2075
|
+
- `ViewsProvider` takes `sayRefusals`, off by default. On, the grid says why your app refused an edit it sent (a cell,
|
|
2076
|
+
a batch, an undo or a redo) through the toast port's `error`: the error's own words, or "Couldn't save Amount." when
|
|
2077
|
+
it has none, and a batch once, with its count. Turn it on and stop toasting your own refusals, or each is said twice.
|
|
2078
|
+
- The messages `views.grid.commit-refused` (`{ field }`) and `views.grid.commit-refused-many` (`{ count, reason? }`).
|
|
2079
|
+
- A group band's figure can be declared instead of drawn: `{ part, column, kind }` in `groupFigures`, with an
|
|
2080
|
+
optional `label` (the column's header by default). The grid adds it up and writes it exactly as that
|
|
2081
|
+
column's footer does, in the column's format, decimals and currency, a paged group's figure read from the
|
|
2082
|
+
group's `figures`, or your own footer cell where `renderAggregate` draws one. A band and the footer under it
|
|
2083
|
+
then read the same:
|
|
2084
|
+
|
|
2085
|
+
```ts
|
|
2086
|
+
// before: summed and formatted by the app
|
|
2087
|
+
{ part: "total", label: "Value", render: (group) => euros.format(sumOf(group.items)) }
|
|
2088
|
+
// after: the grid's own figure
|
|
2089
|
+
{ part: "total", column: "value", kind: "sum" }
|
|
2090
|
+
```
|
|
2091
|
+
|
|
2092
|
+
A declared figure the group has nothing for (a paged group whose source didn't count it) is left out of the
|
|
2093
|
+
band. A figure with `render` draws as before. `GridGroupFigure` is now `GridDeclaredFigure | GridDrawnFigure`,
|
|
2094
|
+
both exported from `@viewkitjs/views/grid`.
|
|
2095
|
+
- `GridTable`'s `onOpenRow` receives, with the row, a `from` (`GridRowOpenedFrom`, exported from `/grid`): the way
|
|
2096
|
+
back to the cell the row was opened from, for when what it opened closes. `from.focus()` puts the focus back on
|
|
2097
|
+
that cell and returns true; `from.element` is that cell, for a dialog's final-focus option. The place is read again
|
|
2098
|
+
when you call it: a record a refetch moved under another group is found by its id, at its first place, and drawn
|
|
2099
|
+
if it moved out of the drawn rows; a record no longer shown sends the focus to the grid's frame (`focus()` returns
|
|
2100
|
+
false, `element()` is the frame). On a desktop the cell is selected too, so the next arrow moves from it; below
|
|
2101
|
+
your `desktopQuery` only the focus goes back, and no cell is selected. A dialog that asks for its final focus while
|
|
2102
|
+
React is closing it is answered again once the close is done, unless the focus went outside the grid. An
|
|
2103
|
+
`onOpenRow` that takes only the row is unchanged.
|
|
2104
|
+
|
|
2105
|
+
An app no longer finds the row again by searching the page for the grid's own row markup:
|
|
2106
|
+
|
|
2107
|
+
```tsx
|
|
2108
|
+
onOpenRow={(deal, from) => openDrawer(deal.id, { finalFocus: from.element })}
|
|
2109
|
+
```
|
|
2110
|
+
- Every menu the package opens names itself: your `Menu` is handed `label`, its accessible name. The row's
|
|
2111
|
+
menu is "Row actions" (`views.menus.row-menu`); a `command` field's verbs are "Actions for <field>"
|
|
2112
|
+
(`views.menus.commands`), or "Actions" (`views.menus.commands-unnamed`) when the opener hands no field.
|
|
2113
|
+
`CommandMenu` takes `label`, the field's name, which the cell and the field row hand it.
|
|
2114
|
+
- A disabled menu row can say why: `disabledReason` on `ViewsMenuItem`, on a row menu's `ViewsRowMenuItem`
|
|
2115
|
+
and on a verb's `FieldRowMenuItem`, handed through to your `Menu`. A row under a disabled group that gives
|
|
2116
|
+
no reason carries the group's.
|
|
2117
|
+
- Your `Sheet` is handed `label`, its title in words whenever the title is words.
|
|
2118
|
+
- The `RelationRoles` atom, marked `data-slot="vk-relation-roles"`, with its props type `ViewsRelationRolesProps`: a
|
|
2119
|
+
link's roles, drawn inside its chip after the record's name. It gets the `RelationValue` and its roles in order,
|
|
2120
|
+
each its stored `value` and its `label` from the field's `links.roles` (a role the field no longer declares keeps
|
|
2121
|
+
its value as its label), and draws only when the link holds one or more. The default draws the labels in the
|
|
2122
|
+
subtle colour after a middle dot (`Bea · Champion, Decision maker`), cut before the name in a narrow cell, and its
|
|
2123
|
+
hover names the record and every role. Swap it
|
|
2124
|
+
through the provider's `atoms` to draw roles your way, a tag per role or a second line.
|
|
2125
|
+
- **The lab can lock a flick to one direction on a touch screen.** `setGridLab({ boxes: 2 })` makes the grid scroll
|
|
2126
|
+
its rows up and down in their own box (`[data-slot="vk-grid-scroll"]`), inside an outer box that scrolls the table
|
|
2127
|
+
sideways (`[data-slot="vk-grid-pan"]`), on a device that doesn't hover with a fine pointer. iOS then keeps each
|
|
2128
|
+
flick to the direction it starts in. Without it, and on a mouse or a trackpad, the grid scrolls one box both ways,
|
|
2129
|
+
as before. While it is on, the up/down scroll bar sits at the table's right end, and a script that reads the
|
|
2130
|
+
table's sideways place reads it from `vk-grid-pan`.
|
|
2131
|
+
- **A recording says which mode ran:** `grid.boxes`, 1 or 2.
|
|
2132
|
+
- `ViewsProvider` takes `escape`, what Escape does in an editor of each field type: `{ date: "keep", location: "keep" }`
|
|
2133
|
+
keeps what was typed and closes the editor, as a press outside does; a value that would be refused stays open with
|
|
2134
|
+
its reason, and a second Escape while that refusal stands throws the edit away. A type left out throws the edit away, as every editor does today, so nothing changes until you
|
|
2135
|
+
name a type. It holds on a desktop; on a phone every way out of the sheet still throws the edit away. The grid's
|
|
2136
|
+
cells, the field row and a host built on the session follow it, and the grid's own Escape does too.
|
|
2137
|
+
- `useAnchoredEditSession` takes `escape: "cancel" | "keep"`, and its `EditSession` says `keeps`. `useEscapeRule(type)`
|
|
2138
|
+
reads the provider's rule for a field type, for a host of your own to hand its session. The types `EditEscape` and
|
|
2139
|
+
`ViewsEscapeRules` come from `@viewkitjs/views/react`.
|
|
2140
|
+
- `ValueListEditor` takes `escapeKeeps`: where its host's session keeps, Escape checks the rows first, as Enter does.
|
|
2141
|
+
- `GridTable` takes `parts`: a column per part of a name, a place or a range, beside the whole one. A place offers
|
|
2142
|
+
its country, region, city and postal code; a name its given and family names; a range its low and high ends. Each
|
|
2143
|
+
is hidden until a person picks it in "+ Add column", headed with the field and the part ("Address · Country").
|
|
2144
|
+
It reads, sorts, copies, edits and pastes as its part. Off by default.
|
|
2145
|
+
- A part column's id is `partKey(columnId, part)`, the key its Filter row already has with `parts: true` on the
|
|
2146
|
+
panels, so the rule a person sets on that row filters what the column shows. Its sort value is
|
|
2147
|
+
`partKey(fieldKey, part)`: `parsePartKey` turns it into a sort's `fieldKey` and `by`. Keep part columns out of
|
|
2148
|
+
your panels: hand them your declared columns, as before.
|
|
2149
|
+
- "+ Add column" drills into a field's parts: a field with parts is one row, with how many it offers and a ›, that
|
|
2150
|
+
opens the field (if hidden) and its hidden parts, with a row back. A search lists every hidden column, parts by
|
|
2151
|
+
their full label. A list with no parts reads as before.
|
|
2152
|
+
- `ListColumn.partOf` (`ListColumnPartOf`) marks a part column the grid derived: the whole column's id, the part and
|
|
2153
|
+
the whole's field. `ListColumnItem.partOf` carries the whole's id, the part and the part's word to your own
|
|
2154
|
+
`renderAddColumn`, so it can drill as the grid's own does.
|
|
2155
|
+
- The Filter panel's part rows (`parts: true`) gain a range's low and high ends, each a number row, and the Sort
|
|
2156
|
+
options gain a place's postal code and a range's two ends.
|
|
2157
|
+
- A part column of `GridTable`'s `parts` edits and pastes as its part, in a box of its own: text for a name's given
|
|
2158
|
+
or family name and a place's region, city and postal code, a number for a range's low or high end, and the select
|
|
2159
|
+
editor over every country by name (plain rows, searchable) for a place's country. A paste or a fill into a country
|
|
2160
|
+
cell takes a country's name, in the app's locale or in English, or its code.
|
|
2161
|
+
- A part's commit writes the whole value with that part replaced. `onCellCommit` and `onCellsCommit` receive the
|
|
2162
|
+
whole column's id and the whole value, so a place keeps its other parts, a range its other end and a name its other
|
|
2163
|
+
part. As with every composite value, the commit goes without a pending overlay, and the refetch repaints.
|
|
2164
|
+
- A name's given or family name rebuilds the full name only when the full name was empty or exactly the two joined by
|
|
2165
|
+
a space; a full name written another way ("Nagy Imre") is kept. A place's other country clears its region and its
|
|
2166
|
+
code, and another region clears its code.
|
|
2167
|
+
- A paste over two parts of one field in one row lands as one edit of the whole. A part edit made while the field's
|
|
2168
|
+
earlier ones are still in flight builds on them.
|
|
2169
|
+
- A part is locked, refused and read-only as its whole is: its lock, its reasons and its writability. A part may be
|
|
2170
|
+
emptied unless its whole declares `clearable: false`; emptying the last part is judged by the field. A box refuses
|
|
2171
|
+
a value the whole field would refuse, such as a range's low end above its high end, and stays open with the
|
|
2172
|
+
field's reason.
|
|
2173
|
+
- Escape in a part's box follows the box's own type, text or number, not the field's: `escape={{ name: "keep" }}` on
|
|
2174
|
+
the provider does not reach a given name's box.
|
|
2175
|
+
- `ListColumnPartOf` takes the row type (`ListColumnPartOf<Row>`) and gains `read(row)`, the whole value as stored on
|
|
2176
|
+
a row: the whole column's `editAccessor`, else its `accessor`.
|
|
2177
|
+
- `coerceWrite`, from `@viewkitjs/views`: a value coerced into a column's write shape by its type before any
|
|
2178
|
+
field is asked (a boolean read from its spellings, an email or a link trimmed and checked, several values split
|
|
2179
|
+
from text), answering `{ ok, value }` or `{ ok: false, reason }`.
|
|
2180
|
+
- The grid can open its own menus through your `Menu`. Set the provider's `menus` to `menu` and the footer's figure
|
|
2181
|
+
picker hands your `Menu` one row per figure, the current one `checked`, named "Calculate <column>". `popover`, the
|
|
2182
|
+
default, keeps ViewKit's rows in your `Popover`, as before.
|
|
2183
|
+
- A menu row may carry three hints: `beside`, on a group, to open its rows one level in rather than in place;
|
|
2184
|
+
`keepOpen`, on a checkable row, to leave the menu open when picked; and `detail`, its current value in words, for
|
|
2185
|
+
its end.
|
|
2186
|
+
- With the provider's `menus` set to `menu`, a column's header menu goes through your `Menu`: sort and group as rows,
|
|
2187
|
+
each format setting (decimals, currency, a date's or a duration's style, a percent's display) and each option's
|
|
2188
|
+
colour a group that opens beside it with its current choice as `detail`, Show time a tick that keeps the menu open,
|
|
2189
|
+
then move, your rows and Hide. It is named "Options for <column>".
|
|
2190
|
+
- `columnMenuItems(fieldKey)` hands your rows for a column's field as data on the `menu` route, beside
|
|
2191
|
+
`renderColumnMenuRows`, which still draws them on the `popover` route. Key them apart from the grid's own rows
|
|
2192
|
+
(`sort-asc`, `hide-column` and the rest).
|
|
2193
|
+
- On the `menu` route a pick of an option's colour closes the menu (one choice, its group ticking one colour:
|
|
2194
|
+
Automatic while the option has none of its own); on the `popover` route it still closes only the colours beside it.
|
|
2195
|
+
- With the provider's `menus` set to `menu`, a group's ⋯ goes through your `Menu`, named "Group options": its sort
|
|
2196
|
+
choices a group beside it, the current one ticked and named as its `detail` (picking it again flips its direction),
|
|
2197
|
+
with no search field; the Show figures as ticks that keep the menu open; Hide. `groupMenu` still chooses its parts.
|
|
2198
|
+
On the `popover` route the sort list still searches through your `Command`.
|
|
2199
|
+
- With the provider's `menus` set to `menu`, the grid's own "+ Add column" goes through your `Menu`, named "Add
|
|
2200
|
+
column": each hidden column a row, a field with parts a group beside it (its count as `detail`, the field and its
|
|
2201
|
+
hidden parts inside), no search field; on a phone your `Menu` too, in place of the `Sheet`. With nothing to add,
|
|
2202
|
+
one disabled row says all columns are shown. On the `popover` route it is as before.
|
|
2203
|
+
- `Picker`, an optional slot in the components map for a whole pick list your app draws: its search, its rows,
|
|
2204
|
+
its empty row and its create row. It is handed the rows as data (`ViewsPickerItem`: a value, its words, a
|
|
2205
|
+
status slot or a category colour, a glyph, a second line, a group), what is held (one value or `null`; several,
|
|
2206
|
+
a list), the empty row's words, the search's words, `onCreate` (handed what was typed, it returns the value it
|
|
2207
|
+
makes), what was typed on what opened it, `autoFocus` and `form`. It hands back `onValueChange` (the pick, or
|
|
2208
|
+
the whole new list) and `onDone` (a pick of one is made). Handed one, a select, a several-values field and a
|
|
2209
|
+
place's country and region lists open it; they keep their keys, their drafts and their saving, and on a phone
|
|
2210
|
+
the panel's ✕ and ✓. Left out, they draw from `Command` as before.
|
|
2211
|
+
- `ViewsPickerProps` and `ViewsPickerItem`, from `@viewkitjs/views/react`.
|
|
2212
|
+
- The relation editors, of one record and of several, open your `Picker` when the provider has one. The editor
|
|
2213
|
+
filters a static list by label or fetches a remote one a page at a time, as its own list does, and hands your
|
|
2214
|
+
body the rows to draw.
|
|
2215
|
+
- New optional `Picker` props for them: `onSearch` (hand it every typed query; draw `items` as handed, never
|
|
2216
|
+
filtered again), `doing` (`searching` or `failed`), `onRetry`, `onMore` (call it as the list's end comes into
|
|
2217
|
+
view), `actions` (`ViewsPickerAction`: rows that do something, such as create a record with what was typed;
|
|
2218
|
+
picking one closes the editor, then runs it) and `lead` (in a set whose field leads: which value leads,
|
|
2219
|
+
`onLead`, and the words for both).
|
|
2220
|
+
- A row (`ViewsPickerItem`) may carry `badge` (a word telling kinds apart), `glyph` (the record's own glyph),
|
|
2221
|
+
`avatarUrl` and `kind` (the record's kind).
|
|
2222
|
+
- `label` on `RelationEditor` and `RelationSetEditor`: the field's name, for your `Picker`.
|
|
2223
|
+
- `DateBody`, an optional slot in the components map for a whole date body your app draws: its typed line, its days,
|
|
2224
|
+
its quick picks and its time. It is handed the value on the local calendar (a day, a day and a time, or `null`),
|
|
2225
|
+
whether it holds a time, whether it may be emptied, the quick picks (`today`, `tomorrow`, `next-monday`, and `none`
|
|
2226
|
+
where it may be emptied), today, what was typed on what opened it, `autoFocus` and `form`. It hands back
|
|
2227
|
+
`onValueChange` and `onDone`. Handed one, the date editor opens it in the grid, a field row and a card, and keeps its
|
|
2228
|
+
keys, its draft, Escape's rule by field type, the write check and the saving; on a phone, the panel's ✕ and ✓. Left
|
|
2229
|
+
out, the date editor draws as before.
|
|
2230
|
+
- `ViewsDateBodyProps` and `ViewsDatePick`, from `@viewkitjs/views/react`. `DateEditor` takes an optional `label`, the
|
|
2231
|
+
field's name for your body.
|
|
2232
|
+
|
|
2233
|
+
### Changed
|
|
2234
|
+
|
|
2235
|
+
- The peer `@viewkitjs/fields` is `^0.11.0` (was `^0.10.0`): install fields 0.11 beside views 0.4. Under `0.x` a
|
|
2236
|
+
`^0.11.0` peer accepts no 0.12.
|
|
2237
|
+
- A grid row costs less to draw, so a fast flick through a long list keeps up better on a phone. A row draws two
|
|
2238
|
+
elements fewer (the checkbox column's backing and bottom line are now its own `::before` and `::after`). On a screen
|
|
2239
|
+
no pointer can hover (a phone): a cell at rest is no longer a positioned box (it becomes one while it is focused,
|
|
2240
|
+
edited or in a range, and a name or a pick-list cell stays one), rows no longer subscribe to the hover that draws the
|
|
2241
|
+
name's actions and the ▾. Everywhere, a date mounts its long form's tooltip at the first mouse or pen over it,
|
|
2242
|
+
not with the date. Nothing looks or behaves differently.
|
|
2243
|
+
- `renderAddColumn` answering `null` now draws no "+ Add column", and the header keeps no room for one, so you can
|
|
2244
|
+
turn on resizing, moving and hiding columns (`onColumnStateChange`) without it. Before, `null` drew the grid's
|
|
2245
|
+
own. Nothing else changes: leaving the prop out, or answering `undefined`, `false` or `""`, still draws the
|
|
2246
|
+
grid's own.
|
|
2247
|
+
|
|
2248
|
+
```tsx
|
|
2249
|
+
// Before: column state always brought "+ Add column".
|
|
2250
|
+
<GridTable onColumnStateChange={save} />
|
|
2251
|
+
// Now: column state without it.
|
|
2252
|
+
<GridTable onColumnStateChange={save} renderAddColumn={() => null} />
|
|
2253
|
+
```
|
|
2254
|
+
|
|
2255
|
+
The table asks `renderAddColumn` whether to draw and the header asks it for the cell: keep its answer a plain
|
|
2256
|
+
function of the columns it is handed.
|
|
2257
|
+
- `GridGroupFigure` is a union, `GridDeclaredFigure | GridDrawnFigure`. Code that builds a list of figures
|
|
2258
|
+
with `render` compiles as before; code that reads `render` off a `GridGroupFigure` checks its shape first,
|
|
2259
|
+
or types its list as the drawn kind:
|
|
2260
|
+
|
|
2261
|
+
```ts
|
|
2262
|
+
// before
|
|
2263
|
+
figures.map((figure) => figure.render(group))
|
|
2264
|
+
// after, a list you draw yourself
|
|
2265
|
+
const drawn: GridDrawnFigure<Deal>[] = figures;
|
|
2266
|
+
// after, a mixed list
|
|
2267
|
+
figures.map((figure) => ("render" in figure ? figure.render(group) : null))
|
|
2268
|
+
```
|
|
2269
|
+
- `GridTable`'s `onOpenRow` is `(row: Row, from: GridRowOpenedFrom) => void` (was `(row: Row) => void`). A handler
|
|
2270
|
+
that takes only the row is unchanged; code of yours that calls an `onOpenRow` with the row alone gives its own
|
|
2271
|
+
prop the type `(row: Row) => void`.
|
|
2272
|
+
- `ViewsMenuItem.label` is `string` (it was `ReactNode`). Every row the package builds was already words, so
|
|
2273
|
+
a `Menu` that writes its rows' names takes the label as it is, with no cast. A `Menu` of yours reads it
|
|
2274
|
+
unchanged; code that builds a `ViewsMenuItem` with an element as its label hands words instead:
|
|
2275
|
+
|
|
2276
|
+
```ts
|
|
2277
|
+
// before
|
|
2278
|
+
{ key: "pin", label: <b>Pin</b> }
|
|
2279
|
+
// after
|
|
2280
|
+
{ key: "pin", label: "Pin" }
|
|
2281
|
+
```
|
|
2282
|
+
- A relation chip on a `many` relation that declares `links` draws its link's roles, read with `relationRolesOf`,
|
|
2283
|
+
and the hover of a cell of several names them (`Bea · Champion, Decision maker, Ana`). A user, a one relation and a many relation without
|
|
2284
|
+
`links` draw none, whatever their values carry. A link with no role draws as before.
|
|
2285
|
+
- The set editor commits each link with the `role` and `roles` it was stored with, as it already kept `role`; a new
|
|
2286
|
+
link has neither. Nothing converts one into the other.
|
|
2287
|
+
- A place field limited to some `parts` offers part columns only for those.
|
|
2288
|
+
- `Command` is optional. An app that hands `Picker` and sets `menus: "menu"` needs none. A list that needs it, in an app that handed none, throws an error naming it. `COMPONENT_NAMES` no
|
|
2289
|
+
longer lists `Command`; `OPTIONAL_COMPONENT_NAMES` lists `Input`, `Command` and `Picker`.
|
|
2290
|
+
- With `Picker` handed and `menus: "menu"` set, nothing reaches `Command`: a relation goes through your
|
|
2291
|
+
`Picker` too.
|
|
2292
|
+
- `Calendar` is optional. Handed `DateBody`, it is never reached; the date editor drawn without one, in an app that
|
|
2293
|
+
handed no `Calendar`, throws an error naming it. `COMPONENT_NAMES` no longer lists `Calendar`;
|
|
2294
|
+
`OPTIONAL_COMPONENT_NAMES` lists `Input`, `Command`, `Picker`, `Calendar` and `DateBody`.
|
|
2295
|
+
|
|
2296
|
+
### Fixed
|
|
2297
|
+
|
|
2298
|
+
- A second click, a double-click or Enter on a grid cell whose column your list's settings lock says why it can't
|
|
2299
|
+
be edited ("locked by workspace settings"), as a column with no write does, and Enter keeps the focus on the
|
|
2300
|
+
cell. It had started an edit that opened nothing and said nothing. A locked text its cell cuts off still opens
|
|
2301
|
+
whole, read-only.
|
|
2302
|
+
- In WebKit (Safari), Tab out of the date editor closes it, keeps what it shows and, in a grid, selects the next cell,
|
|
2303
|
+
as in Chromium and Firefox. WebKit's Tab skips buttons, so from the calendar's day it passed the Clear row and left
|
|
2304
|
+
the editor on its own: the grid kept the date cell selected, and → landed one cell short.
|
|
2305
|
+
- A grid's one-line text editor (a link, an email, a phone, a domain, a plain text) grows past its cell when its
|
|
2306
|
+
value is wider than the cell, up to 320px, as a money editor does, so the whole value shows while it is edited. A
|
|
2307
|
+
link the cell shows without its `https://` had opened in a box the cell's width, cut at its end. A value that
|
|
2308
|
+
fits opens as it always did.
|
|
2309
|
+
- A day typed or picked into a grid's calendar-day (`date`) cell is drawn in the cell as soon as the editor closes,
|
|
2310
|
+
and your next read of the rows confirms it. It had been drawn only when that read came back, so the cell sat
|
|
2311
|
+
blank, or on its old day, for as long as your save and refetch took. A `datetime` cell still shows its new value
|
|
2312
|
+
when your rows are read again.
|
|
2313
|
+
- With no date stored, the date editor opens with an empty date box and the calendar on this month, in every host.
|
|
2314
|
+
It had shown today's date, which a close without a pick or a typed day never kept.
|
|
2315
|
+
- A field row's select or status of eight options or fewer, opened with Enter or Space on the row, puts the focus on
|
|
2316
|
+
the value it holds: the arrow keys walk its options and Enter picks one, and an Enter at once changes nothing.
|
|
2317
|
+
Nothing in the list had taken the focus, so the keys reached nothing. Opened with the pointer, or in the phone's
|
|
2318
|
+
sheet, it behaves as before.
|
|
2319
|
+
- Tab and Shift-Tab leave a select, from a long list's search or from a short list's focused option: the editor
|
|
2320
|
+
closes with nothing changed, and the host moves on as it does after every other picker (a field row and a card give
|
|
2321
|
+
the focus back to the field). A popover that keeps the focus inside it, as Radix's does, had looped Tab back to the
|
|
2322
|
+
search, so only Escape or a pick could leave.
|
|
2323
|
+
- A date and time set in a grid's `datetime` cell is drawn in the cell as soon as the editor closes, and your next
|
|
2324
|
+
read of the rows confirms it. It had been drawn only when that read came back, so the cell kept its old value, or
|
|
2325
|
+
sat blank, for as long as your save and refetch took. The minute the editor writes and the instant your rows
|
|
2326
|
+
store count as one value however each is spelled (with seconds, an offset or in UTC), so a row that stores what
|
|
2327
|
+
was written raises no "changed elsewhere" warning, and one that stores a different minute still does. Nothing
|
|
2328
|
+
changes in what your save receives or answers. The editor writes the minute in the viewer's own time zone: if
|
|
2329
|
+
your save stores it in another zone than the one it was typed in, the cell now warns that it changed elsewhere
|
|
2330
|
+
when your rows come back, where it had shown your stored value without a word.
|
|
2331
|
+
- On an iPhone, a fast flick through a long grid no longer leaves the whole screen empty under the column names, and
|
|
2332
|
+
the scroll no longer sticks while it draws. A frozen column's cells sat at z-index 0 when the table wasn't scrolled
|
|
2333
|
+
sideways, which made Safari draw every other cell as a layer of its own: each step of the scroll's drawing took
|
|
2334
|
+
120–160 ms on iOS. They now sit at 1 at rest (still under a neighbour's focus and range rings) and 7 while the
|
|
2335
|
+
table is scrolled sideways, as before.
|
|
2336
|
+
- An in-place grid editor grown past its cell (a money or number amount, or a line of text, wider than the cell)
|
|
2337
|
+
draws over the frozen identity columns while it is open, with the edge of the frozen block under it, so the whole
|
|
2338
|
+
value and the ≈ line under a converted amount read. With the table scrolled sideways it had been drawn under them.
|
|
2339
|
+
- A click on a field row right after a pick in another row opens its editor and keeps it open. The row you picked in
|
|
2340
|
+
waits for its save before taking the focus back; when the save landed after you had opened the next row, it took
|
|
2341
|
+
the focus anyway and that row's editor closed. A press or a focus anywhere now lets that wait go.
|
|
2342
|
+
- A start-aligned number editor (a record's field row) gives its amount's box way in a row narrower than the box
|
|
2343
|
+
and its currency, so the whole currency code stays inside the row, as on a phone. It had kept a fixed 160px box
|
|
2344
|
+
and pushed the code past the row's edge. A row wide enough looks as it did.
|
|
2345
|
+
- A percent shown as a bar draws its bar and its figure together, both whole, in a record's field row, read-only
|
|
2346
|
+
or not. There the figure had sat pushed right with a gap before it, and the bar had dropped onto a second line,
|
|
2347
|
+
cut off. In a grid's column the bar narrows and widens as before.
|
|
2348
|
+
- A refused range whose field names its bands shows its reason right under the two boxes, above the bands, in the
|
|
2349
|
+
grid, a record's field row and a sheet on a phone. On the desktop the bands' menu had covered the reason, and in
|
|
2350
|
+
a sheet the reason was drawn under every band, away from the boxes.
|
|
2351
|
+
- On an iPhone, a fast flick through a long grid leaves fewer empty strips. A row's frozen cells and checkbox rail
|
|
2352
|
+
are plain boxes while the table isn't scrolled sideways, and pin as soon as it is: a sticky element in every drawn
|
|
2353
|
+
row was what Safari couldn't keep up with as rows came and went. At rest they draw exactly where they did; in the
|
|
2354
|
+
first frame of a sideways swipe they move with the table before they pin.
|
|
2355
|
+
- A date or number cell no longer builds a new `Intl` formatter each time it is drawn. They are built once per
|
|
2356
|
+
locale, zone and options.
|
|
2357
|
+
- A grid drawn while off screen and then moved into view without a scroll (a pager that moves its track, a transform,
|
|
2358
|
+
a carousel) now draws its rows as it arrives. It used to show only empty row lines until something on the page
|
|
2359
|
+
scrolled or the window was resized. The grid now also watches its scroll area cross the edge of the window, where
|
|
2360
|
+
the browser has an `IntersectionObserver`.
|
|
2361
|
+
- In an app without Tailwind's base reset (preflight), the grid's menus drew their rows as the browser's grey
|
|
2362
|
+
bordered buttons, and a group's fold as a framed square. Every button, input, textarea and link the rendering
|
|
2363
|
+
draws itself now resets itself, at zero specificity: it looks the same with or without a base reset, any class
|
|
2364
|
+
on it still wins, and nothing of your app's is touched. The rendering needs no base reset of yours.
|
|
2365
|
+
- A grouped grid's pinned group head no longer rises over your page's own sticky header or bars. The grid's
|
|
2366
|
+
frame (`data-slot="vk-grid"`) is its own stacking context (`isolation: isolate`), so what the grid pins or
|
|
2367
|
+
lifts inside it (a group's head, the column names, frozen cells) stays inside it, under anything of your page
|
|
2368
|
+
with a positive z-index. It adds no z-index of its own. A wrapper of yours that set `isolation: isolate` around the
|
|
2369
|
+
grid for this can drop it.
|
|
2370
|
+
- A popover's Escape asks the edit session once, though the popover reports the close it causes after it.
|
|
2371
|
+
- A day pasted into a grid's calendar-day (`date`) field cell, or filled down from one, and a date and time pasted
|
|
2372
|
+
or filled into a `datetime` cell, are drawn in the cell as soon as they are written, as a value set through the
|
|
2373
|
+
cell's editor is, and your next read of the rows confirms them with no "changed elsewhere" warning. They had been
|
|
2374
|
+
drawn only when that read came back, so the cells kept their old values, or sat blank, for as long as your save and
|
|
2375
|
+
refetch took. A `date` column with no field still shows a pasted or filled day when your rows are read again, as
|
|
2376
|
+
its editor does. Nothing changes in what your save receives or answers.
|
|
2377
|
+
- A grid cell of a calendar-day (`date`) field reads the day your row hands its editor as that day's local midnight
|
|
2378
|
+
with no zone (`2026-11-15T00:00:00`, the spelling that keeps a bare day from opening a day early west of Greenwich)
|
|
2379
|
+
as the same day the editor, a paste and a fill write (`2026-11-15`). So a day typed through the cell's editor, as
|
|
2380
|
+
well as one pasted or filled, raises no "changed elsewhere" warning when your next read of the rows comes back. A day
|
|
2381
|
+
filled down from such a cell now fills every cell it covers, and undoing a typed day puts back the day it replaced:
|
|
2382
|
+
in 0.3.0 and before, the fill skipped those cells and the undo had no day to put back. A value with a zone (`Z`, an
|
|
2383
|
+
offset) or a time of day is still not read as a day, so no day moves across a time zone. Nothing changes in what
|
|
2384
|
+
your save receives.
|
|
2385
|
+
- A field row keeps the keyboard's place while its save is on its way. After a pick or an Enter in a row's editor, the
|
|
2386
|
+
focus waited on the page until the save landed, so a Tab pressed in that time started again from the top. The row
|
|
2387
|
+
now takes the focus back as soon as its editor closes, and a Tab moves on from it at once. While it saves, the row's
|
|
2388
|
+
button is marked `aria-disabled` (it was `disabled`), and a press on it opens nothing.
|
|
2389
|
+
- A fast flick through the grid draws faster on a phone, most of all once the table has moved sideways. The frozen
|
|
2390
|
+
columns' edge shadow is now drawn once for each group's rows rather than on every row. It looks the same.
|
|
2391
|
+
- A range's low or high end column (`GridTable`'s `parts`) draws the range's period after its unit, as the whole
|
|
2392
|
+
range's cell does: a yearly salary's "Salary · Low" reads "50,000 EUR /yr", where it read "50,000 EUR". The period
|
|
2393
|
+
rides the column's `format.suffix` ("EUR /yr", or "/mo" with no unit), so a part column's suffix now carries it.
|
|
2394
|
+
- The Filter panel's row for a range's low or high end (`parts: true`) shows and compares its figure as the end's
|
|
2395
|
+
column draws it: with the range's unit (%, a fixed currency code, else its suffix) beside the box, and at its
|
|
2396
|
+
decimals (the reader's setting for that column, else the range's, whole numbers for an integer range). An "equals
|
|
2397
|
+
10" now holds for 10.4 on a range shown with no decimals, where it compared at two.
|
|
2398
|
+
- A dialog that hands its final focus only to a tabbable element (as Base UI's does), given `from.element` while the
|
|
2399
|
+
row it was opened from isn't drawn, no longer lands the focus on the grid's first cell with that cell selected.
|
|
2400
|
+
The focus goes to the row's cell once the row is drawn, selected on a desktop and with no cell selected below your
|
|
2401
|
+
`desktopQuery`. For a record no longer shown, on any screen, it stays on the grid's frame with no cell selected.
|
|
2402
|
+
|
|
2403
|
+
## [0.3.0] — 2026-11-11
|
|
2404
|
+
|
|
2405
|
+
Two projects in one release. The field editors: every editor closes through one edit session, and on a phone in
|
|
2406
|
+
your `Sheet`; one text editor for every kind of text; a save can answer the value your server kept; an optional
|
|
2407
|
+
`Input` that every editor's text box draws through; and a record's field row, ready-made, from
|
|
2408
|
+
`@viewkitjs/views/field-row`. And the grid: it scrolls inside itself, draws only the rows on screen, is worked by
|
|
2409
|
+
keyboard alone, and is read by a screen reader as a grid. It needs `@viewkitjs/fields` 0.10.
|
|
2410
|
+
|
|
2411
|
+
What an app changes when it takes this version:
|
|
2412
|
+
|
|
2413
|
+
- **Install `@viewkitjs/fields` 0.10** beside it: the peer is `^0.10.0` (Changed).
|
|
2414
|
+
- **The grid needs a box with a height.** It scrolls inside itself, in both directions, so give its container the
|
|
2415
|
+
height the page has left; Changed shows a page before and after. Stop declaring `--vk-pinned-top`, and find the
|
|
2416
|
+
scroll area by `[data-slot="vk-grid-scroll"]` where you used `data-grid-scroller` (Removed). An adapter's
|
|
2417
|
+
`Collapse` crops with `overflow: clip`, never `overflow: hidden`, or the frozen columns stop sticking (For an
|
|
2418
|
+
adapter).
|
|
2419
|
+
- **Wrapping is gone.** Delete `wrapCells` where you hand it to `GridTable`, any switch that sets `gridWrapCells`,
|
|
2420
|
+
`{ wrap: true }` where you hand it to `renderTypedCellValue`, and any CSS of yours that sets or reads
|
|
2421
|
+
`--vk-chrome-h`, `--vk-cell-py` or `--vk-tail-py` (Removed).
|
|
2422
|
+
- **↓ stops on a group's footer**, then on the next group's bar and its column names, before that group's rows; ↑
|
|
2423
|
+
walks the same way back (Changed).
|
|
2424
|
+
- **An adapter's `Menu` puts the focus on its first row when it opens**, as its `Popover` already does, and a
|
|
2425
|
+
`RowMenu` of your own opens on any `contextmenu` (For an adapter).
|
|
2426
|
+
- **A table typed over `EDIT_CORES`** names a host for `text`, `url`, `domain`, `email`, `phone` and `rich_text`,
|
|
2427
|
+
where it answered `null` (Changed).
|
|
2428
|
+
- **Your grid tests.** The grid's keys listen on the grid, so press them on the focused cell, not on `window`. Below
|
|
2429
|
+
your desktop query the first click opens a cell's editor: answer the query in your `matchMedia` stub to keep a
|
|
2430
|
+
desktop's clicks. The name's buttons and a pick-list's ▾ are drawn only under the mouse: hover first (Changed).
|
|
2431
|
+
|
|
2432
|
+
New, and optional: the command list's root takes `defaultValue`, which an adapter hands its command library (cmdk's
|
|
2433
|
+
root takes it under that name), and a list that ignores it opens on its first row, as before; a field row's host
|
|
2434
|
+
closes with a `RowClosed`; `SelectEditor` takes `focusList`. Eight message keys are new, and an app that words its own
|
|
2435
|
+
messages adds them: `views.editors.discard`, `views.editors.save`, `views.editors.open-email`,
|
|
2436
|
+
`views.editors.open-phone`, `views.editors.open-link`, `views.grid.clear-required`, `views.display.converted-from`
|
|
2437
|
+
and `views.display.as-shown`.
|
|
2438
|
+
|
|
2439
|
+
Nothing else an app calls changes its signature. What is new is optional, and Changed says what behaves
|
|
2440
|
+
differently: among it, a screen between 768px and 1023px wide is now drawn as a phone unless your provider's
|
|
2441
|
+
`desktopQuery` says otherwise. The field row, the edit session and the phone's sheet are new since 0.2.0, so a line
|
|
2442
|
+
below that fixes or changes one of them describes this release's own work, not a change from 0.2.0.
|
|
2443
|
+
|
|
2444
|
+
Known in 0.3.0: a date typed into a grid date cell and left by Tab is saved, but the cell stays blank until a reload.
|
|
2445
|
+
In Safari, a Tab out of a grid date cell's open editor leaves the selection on that cell, so the next → lands one cell
|
|
2446
|
+
short. 0.3.1 fixes both.
|
|
2447
|
+
|
|
2448
|
+
### For an adapter
|
|
2449
|
+
|
|
2450
|
+
- `Popover`: 0.2.0 said a popover positioned `fixed` only to hide the opening jump could go back to your library's
|
|
2451
|
+
default. That holds only where your `Command` doesn't scroll as it mounts. The chips, select and relation editors,
|
|
2452
|
+
and the grid's Add column and group menu, mount a `Command.Root` with its rows before your popover has placed its
|
|
2453
|
+
popup, and a command library that scrolls its selected item into view on mount (cmdk does) scrolls the page
|
|
2454
|
+
towards the unplaced popup, which `preventScroll` on the focus can't stop. On such a library, keep the popover
|
|
2455
|
+
`fixed`, or stop your `Command` scrolling on mount. The contract's "Writing an adapter" says so.
|
|
2456
|
+
- Your `Collapse` now holds the grid's rows and frozen columns inside its clip. The clip must crop without
|
|
2457
|
+
scrolling (`overflow: clip`, never `overflow: hidden`), or the frozen columns stop sticking.
|
|
2458
|
+
- `Checkbox` is handed `tabIndex` (`-1` in the grid); pass it to the element that takes focus.
|
|
2459
|
+
- A `Popover` opened by a key in the grid's column menu or a group's ⋯ menu is asked for `initialFocus`; focus its first row when it is true, as the contract already says.
|
|
2460
|
+
- The grid sends the row-menu keys to your `RowMenu` as a `contextmenu` on the cell with no press before it: a `RowMenu` of your own opens on any `contextmenu`.
|
|
2461
|
+
- Your `Menu` puts focus on its first row when it opens, as your `Popover` does by default. A menu that gives focus back to nothing when it closes is fine: the grid puts it back on the cell.
|
|
2462
|
+
- Hand the command list's root its `defaultValue` (cmdk's root takes it under that name). While no item has that
|
|
2463
|
+
value, highlight none, never the first item, which in a relation picker is None. A list that ignores the prop keeps
|
|
2464
|
+
the old behaviour: it opens on its first row.
|
|
2465
|
+
- Your `Popover` may keep its panel on the page while it plays its exit, and give the focus back to nothing when it leaves: the grid waits for it to go, then puts the focus back on its cell. Focus that a press or a pick moved elsewhere stays there.
|
|
2466
|
+
- Your `Command.Input` should name its highlighted item in `aria-activedescendant`, and your `Command.Root` should leave alone an arrow key whose default the input prevented, as cmdk does. The group menu reads the highlight there to hand the arrows on at the list's ends; a list that names none keeps its arrows to itself.
|
|
2467
|
+
- The select's None row now reaches your command list with a value of its own, never `""`, and the list asks for its
|
|
2468
|
+
opening row through its root's `defaultValue`. A list that ignores `defaultValue` opens on None, and its arrows still
|
|
2469
|
+
walk every row.
|
|
2470
|
+
- Your `Command.Root` should move its highlight to the first item on Home and the last on End, as cmdk does. The group menu sends them into the search field when the arrows come into the list from below; a list that ignores them keeps its highlight where it was.
|
|
2471
|
+
- While your list reloads, it may keep the grid on the page `inert`: the grid waits for the inert to lift before it puts the focus back on its cell.
|
|
2472
|
+
|
|
2473
|
+
### Added
|
|
2474
|
+
|
|
2475
|
+
- A grid write can answer what your server kept: `{ status: "confirmed", stored }`, from `onCellCommit`, or as one
|
|
2476
|
+
of `onCellsCommit`'s outcomes. Answer it when what was stored isn't what the cell sent (an invisible character
|
|
2477
|
+
stripped, a label read as its key, `""` kept as `null`), with the value as your rows read it in that column. The cell
|
|
2478
|
+
shows it at once in place of what was typed, ⌘Z keeps its step and restores from it (unless `history` says
|
|
2479
|
+
otherwise), and when your rows carry it the cell clears with no "changed elsewhere" warning, for an object such as a
|
|
2480
|
+
name too. Until now such a write left the typed value on the cell, or warned that someone else had changed it, and the
|
|
2481
|
+
way around it was to reject the write, which lost its undo step. An answer without `stored` behaves as before.
|
|
2482
|
+
- `EditorPanel`, from `@viewkitjs/views/editors/panel`: opens an editor as your popover on the desktop and your sheet on the phone, chosen once when the editor opens. On the phone the sheet carries the field's name as its title and a bar with ✕ and ✓: ✕, a swipe and a tap outside change nothing, ✓ closes as done, and a pick in a select saves on its own. A picker always opens the sheet on the phone. A type-in editor stays where the value stands (`inPlace`), and goes into the sheet on the phone only when you pass `sheetOnPhone`. A value your `onAttempt` refuses stays open with its reason under the editor; its children may be a function of the `EditorSurface` it chose, so an in-place host can draw that reason in its own box.
|
|
2483
|
+
- An optional `desktopQuery` on `ViewsProvider`, and `DEFAULT_DESKTOP_QUERY` from `@viewkitjs/views/react`: the media query that means a desktop, `(min-width: 1024px)` unless you hand in the one your own shell switches on.
|
|
2484
|
+
- The edit session hands back `refusal`: the reason your `onAttempt` gave with `{ accepted: false, reason }`, until the next attempt. Its types `EditSession` and `EditSessionAttempt` are exported.
|
|
2485
|
+
- The contract names the panel's slots (`EDITOR_SLOTS`: `vk-editor-panel`, `vk-editor-bar`, `vk-editor-refusal`) and two messages, `views.editors.discard` and `views.editors.save`. An app that words its own messages adds them.
|
|
2486
|
+
- `TextEditor`, from `@viewkitjs/views/editors/text`: the one editor for text, link, email, phone, domain, long text and rich text. It trims what was typed (rich text is tidied only at its edges), an unchanged value closes without a save, and each type brings its own phone keyboard (`TEXT_INPUT_TYPE`). A paragraph (`multiline`) takes Enter as a newline and closes on ⌘ or Ctrl Enter. Its single-line box draws through your `Input`, and carries `data-slot="vk-text-editor"`, a new member of `EDITOR_SLOTS`.
|
|
2487
|
+
- An optional `Input` in the components map: a single-line text box, `ViewsInputProps`. Every editor's text box draws through it when you pass one: the number, the range, the date and its time, a name's three boxes, a place's parts, a value list's value and label, and the text editor. Without one they draw a plain `<input>`, as before, so nothing you pass today changes. Forward every prop to your element, `ref` included. `chrome` says whether the box sits bare (a grid cell, a panel that frames it: the default) or wears your field's frame (`field`).
|
|
2488
|
+
- `OPTIONAL_COMPONENT_NAMES`, beside `COMPONENT_NAMES`: the components you may leave out. `COMPONENT_NAMES` still lists the ones you must hand in.
|
|
2489
|
+
- `ViewsResolvedComponents`, from `@viewkitjs/views/react`: the map as `useViews()` hands it on, with `Input` always there.
|
|
2490
|
+
- A closed select or status with more than 8 options opens with a search on top that filters its options by
|
|
2491
|
+
label; Enter picks the first match, and there is no row to use typed text. 8 or fewer stay a plain list.
|
|
2492
|
+
`SELECT_SEARCH_PAST` (from `@viewkitjs/views/editors/select`) is that number.
|
|
2493
|
+
- `SelectEditor` takes `seed`, the text its search opens with, and `focusSearch`, which puts the caret in the
|
|
2494
|
+
search as it opens. A list with no search ignores both.
|
|
2495
|
+
- `region` on a field binding and on a list column: `(row) => string | null | undefined`, the record's country. A
|
|
2496
|
+
phone typed or pasted without its country code is read in it: by `prepareFieldWrite`, by the grid's write gate on
|
|
2497
|
+
an edit, a paste and a fill, by the grid's phone cell and by its editor of several phones. Absent, the conventions'
|
|
2498
|
+
region reads it, as before. `columnFrom` carries a binding's `region` onto its column.
|
|
2499
|
+
|
|
2500
|
+
```ts
|
|
2501
|
+
bindField(fields.phones, { read: (row) => row.phones, write, region: (row) => row.countryCode });
|
|
2502
|
+
```
|
|
2503
|
+
|
|
2504
|
+
- `hostOwnsPlainClick` in the display options: an email, phone, url or domain still draws as a link, marked
|
|
2505
|
+
`data-cell-link`, but no longer stops its click, so a host that owns the plain click (the grid) can decide.
|
|
2506
|
+
- `--vk-scroll-inset-bottom`, a length your app may declare (undeclared, `0px`): how much of the grid's foot you
|
|
2507
|
+
cover with something you float there, such as a phone's bottom bar. The grid's scroll area runs underneath it,
|
|
2508
|
+
the last row scrolls clear of it, and a cell the keyboard reveals stops above it.
|
|
2509
|
+
- The slots `vk-grid-scroll` (the one scroll area), `vk-grid-head` (an ungrouped grid's pinned header) and
|
|
2510
|
+
`vk-grid-group-head` (a group's pinned name bar and header row).
|
|
2511
|
+
- A plain text or a text name that its cell cuts off opens whole in a box over the cell, on a second click, a
|
|
2512
|
+
double-click or Enter: editable where the cell can be written, read-only (selectable, copyable) where it can't. It
|
|
2513
|
+
is still a line: Enter saves and moves down, and a newline is written as a space. On a phone the tap opens it whole
|
|
2514
|
+
in your `Sheet`.
|
|
2515
|
+
- `TextEditor` (`@viewkitjs/views/editors/text`) takes `wraps`: a line shown whole, in a textarea that wraps, where
|
|
2516
|
+
Enter closes and a newline is a space. Default `false`, so your editors don't change.
|
|
2517
|
+
- `isWholeTextColumn` and `gridTextOpensBox(column, whole)`, from `@viewkitjs/views`: whether a column's text
|
|
2518
|
+
opens whole in the box over its cell when the cell cuts it off, and whether an open text cell is drawn in that
|
|
2519
|
+
box rather than in the cell, for a grid host of your own.
|
|
2520
|
+
- The grid can be worked by keyboard alone. Tab enters it at its focused cell, or at the first cell on screen when none is focused, and every cell takes the browser's own focus, so the arrows, Home and End, Enter, typing, copy, cut, paste and Delete work from there. Tab past the grid's last cell, or Shift+Tab before its first, leaves it.
|
|
2521
|
+
- Escape with nothing open still clears the cell, and now also lets go of the grid: the next Tab or Shift+Tab leaves it, and an arrow comes back in where you were.
|
|
2522
|
+
- A group collapses and opens by keyboard: ↑ from its column names reaches its bar, where Enter, Space or ← collapse it and Enter, Space or → open it. → on an open bar reaches its ⋯ menu. Collapsing a group with focus inside it moves the focus to its bar.
|
|
2523
|
+
- ← from a row's first cell reaches its checkbox, and Space ticks it. The select-all, and a group's box, are reached the same way from the column names.
|
|
2524
|
+
- A screen reader reads the grid as a grid, or as a tree grid when it is grouped. Every row is numbered among all of them, whether or not it is drawn: a group's bar, its column names and its footer are rows too, so the total runs a little above the number of records. A cell is read with its column's name, a group's bar with its name, its count and whether it is open, and a grouped record with its place in its group ("3 of 25"). While more rows remain to load, a row reads its number with no total.
|
|
2525
|
+
- A sorted column's name says which way it sorts, a ticked row and the cells of a range say they are selected, and a cell that can't be written says it is read-only.
|
|
2526
|
+
- A place column is editable in the grid. A `location` column whose field is a place, and whose binding writes it,
|
|
2527
|
+
is now `editable` and opens `LocationEditor` (the country first, then that country's parts): in your `Popover`
|
|
2528
|
+
under the cell on a desktop, in your `Sheet` on a phone. A place missing a part its country asks for still saves,
|
|
2529
|
+
the part marked in the editor; a place emptied where the column can't be emptied keeps the editor open with the
|
|
2530
|
+
column's reason; Escape throws the edit away. A paste into a place is still refused. `GRID_TYPE_RULES.location.editor`
|
|
2531
|
+
is `"place"`, a new member of `GridEditorId`. A place your binding gives no write, or marks `mutability: "never"`,
|
|
2532
|
+
stays read-only as before.
|
|
2533
|
+
- `EDITOR_INNER_ESCAPE`, from `@viewkitjs/views/editors/panel`: the attribute an editor puts on an inner list of its
|
|
2534
|
+
own while Escape there closes the list rather than the edit. `EditorPanel`'s popover answers `false` to `onEscape`
|
|
2535
|
+
for an Escape from inside it, so a popover that hears Escape on the document first (Radix's does) stays open.
|
|
2536
|
+
`LocationEditor` carries it on its country and region lists, which close back to the boxes on Escape.
|
|
2537
|
+
- In the grid, a select or status column that may be emptied (`clearable`) opens its list with None first, and
|
|
2538
|
+
picking None empties the cell; Delete still clears it. A column that can't be emptied shows no None.
|
|
2539
|
+
- A letter typed on a select or status cell opens its list already filtered by that letter, when the list has a
|
|
2540
|
+
search; a list with no search opens as before.
|
|
2541
|
+
- `pickerOptionsFromField` takes `current`, the value your surface holds: it is offered after the options when no
|
|
2542
|
+
active option is it (a stray value, or an archived option's), so that surface's list shows it checked.
|
|
2543
|
+
- In the grid, Tab in a multiselect's editor saves the set and moves to the next cell, Shift-Tab to the one before.
|
|
2544
|
+
Enter still adds the highlighted value and keeps the editor open.
|
|
2545
|
+
- `ChipsEditor` takes `creatable` (default true). With `false` it filters what it offers as you type and offers no
|
|
2546
|
+
row to add the typed text. `takesNewValues(field)`, from `@viewkitjs/views/editors/open-values`, says which a
|
|
2547
|
+
field is: a multiselect whose vocabulary is not `"closed"` takes new values.
|
|
2548
|
+
- `ChipsEditor` asks its host to close with `tab` or `shift-tab`; its answer is the same as an outside click's.
|
|
2549
|
+
- `RelationEditor` takes `seed`, the text its search opens with, and `focusSearch`, which puts the caret in the search
|
|
2550
|
+
as it opens without scrolling. Both are optional; without them it opens as before.
|
|
2551
|
+
- A relation's binding may carry `create` (`RelationCellCreate`: `label(query)` and `onCreate(query, link)`). The grid
|
|
2552
|
+
pins it under a relation cell's candidates: a click closes the picker and calls `onCreate` with the trimmed query;
|
|
2553
|
+
the app opens its own form with it, and calling `link(id, kind?)` once that form saves links the new record to the
|
|
2554
|
+
cell as a change of its own, with its own undo. With a static candidate list, the new record must be among the
|
|
2555
|
+
candidates before `link` is called, since the grid links only a record its list offers. A member field refuses a
|
|
2556
|
+
create row, and so does a binding without a write.
|
|
2557
|
+
- `RelationSetEditor` (from `@viewkitjs/views/editors/relation`), the editor of a relation holding several records:
|
|
2558
|
+
clicks add and remove records with the list open, the linked records drawn first; a close by a click outside, the
|
|
2559
|
+
sheet's ✓, Tab or Shift-Tab answers the whole set as one change, and Escape or the sheet's ✕ throws it away. With
|
|
2560
|
+
`lead`, the first link leads, a "Make lead" action marks another, and removing the lead passes it to the next. A
|
|
2561
|
+
link keeps the role it was stored with; a new link has none. It answers `RelationDraftLink[]`.
|
|
2562
|
+
- The date editor takes three optional props. `dayOnly` is for a calendar-day field: the panel draws no time box,
|
|
2563
|
+
commits `YYYY-MM-DD`, and a click on a day saves it and asks your host to close with `pick`. `clearable` ends the
|
|
2564
|
+
panel with a Clear row where the date may be empty: a click asks to close with `pick` and commits `""`, the empty
|
|
2565
|
+
value your host maps to null (nothing, when there was no date). `seed` opens the date box holding a character typed
|
|
2566
|
+
on the cell, the caret after it; Enter saves the date it reads, and a seed that reads no date writes nothing.
|
|
2567
|
+
- Today, Tomorrow and Next Monday sit above the calendar, each setting its day as a calendar click does; on a
|
|
2568
|
+
datetime the time is kept and the panel stays open. Next Monday on a Monday is the Monday a week on.
|
|
2569
|
+
- `NumberEditor` takes `code`: the code of a currency the field fixes, drawn beside the amount while it is typed and
|
|
2570
|
+
never part of the commit (a `unit` wins over it). `numberEditCode(field)` reads it from a field: a money field with
|
|
2571
|
+
`code: { fixed }` gives its code, every other field none.
|
|
2572
|
+
- `RangeEditor` takes `bands` (a range field's `presets`), `bandsAt` and `boxClassName`. The bands list under the two
|
|
2573
|
+
boxes, in a small menu by default (`"popover"`) or in the editor's own column (`"below"`) where it already sits in a
|
|
2574
|
+
sheet or a panel. A click on a band saves it, read and judged exactly as typed ends are; the boxes stay, so a value
|
|
2575
|
+
between bands is still typed. `boxClassName` dresses the box that holds the two inputs.
|
|
2576
|
+
- `@viewkitjs/views/field-row`: a record's field row, ready-made. `FieldRow` draws one field of a record as its
|
|
2577
|
+
label, its value and, on a click, its type's editor in place: a picker anchored under the value in your
|
|
2578
|
+
`Popover` on a desktop and in your `Sheet` on a phone, a typed value in its own box on every width, a boolean from its own control, a `command` field's verbs through your
|
|
2579
|
+
`CommandMenu` atom. `useFieldWrite` is the write path behind it: a commit is admitted or refused at once, one
|
|
2580
|
+
record's writes run one at a time, each settles on your save's receipt, and a failure rolls back with a retry,
|
|
2581
|
+
toasted through your toast port. Build your record's panel around the rows; the row knows no entity.
|
|
2582
|
+
- Three optional inputs for what only your app knows: `useFieldWrite`'s `refusalOf` (reads a failed save's own
|
|
2583
|
+
sentence, shown on the row and after the toast's failure line) and `timing` (follows each edit to the paint),
|
|
2584
|
+
and the row's `kindIcon` (your icon name for a record kind, worn by a relation's candidates).
|
|
2585
|
+
- From `@viewkitjs/views` (the model, no React): the shapes a record's writes go through, `EntityWriteTarget`,
|
|
2586
|
+
`EntityWriteReceipt`, `FieldWriteAdmission`, `FieldWriteAdmissionGuard`, `LockedResolver`, `FieldNote` and
|
|
2587
|
+
`FieldWriteReconciliationRequired`, so a write target and its tests load none of the rendering. The field-row door
|
|
2588
|
+
re-exports them.
|
|
2589
|
+
- The field row's editors open through the editor panel: a picker (a select, a date, several tags, a relation, several values, a place) opens in your `Popover` on a desktop and in your `Sheet` on a phone, titled with the field's name and carrying its ✕ and ✓, so the row draws with `Sheet` from your provider's components. Typed values (text, a number, money, a range, a name) stay in their own box on every width.
|
|
2590
|
+
- Every editor in a field row follows the same three rules: Escape always throws the edit away, a value refused on the spot stays open with its reason, shown once (in the panel, or under the box), and a sheet's swipe or ✕ changes nothing. A retry refused on the spot keeps its line, with the refusal's reason.
|
|
2591
|
+
- A relation in a field row saves what its row stores: a bare id, a ref with the picked record's kind where the field stores refs, or the whole set with its lead.
|
|
2592
|
+
- A place edits in a field row, in the place editor under the value; an emptied place the field can't take stays open, saying so.
|
|
2593
|
+
- A relation holding several records edits in a field row: records are added and removed with the list open, one is marked lead where the field leads by a flag, and the set saves as one change. It opens on the labels the row shows, so a searched relation's linked records read by name.
|
|
2594
|
+
- A date field in a field row has no time box, and ends with a Clear row where it may be empty.
|
|
2595
|
+
- Several values in a field row read a phone typed without its country code in the record's country (the binding's `region`), and an emptied list the field can't take stays open, saying so.
|
|
2596
|
+
- `RowEditorProps.shown`: the row's display value, handed to every host.
|
|
2597
|
+
- `ValueListEditor` takes `openLinks`: each stored email, phone, link or domain carries a small open action beside it
|
|
2598
|
+
(mail, call or browse). A row typed over, or added, has none until it is saved, so it never opens half an address.
|
|
2599
|
+
- Three messages name the action: `views.editors.open-email`, `views.editors.open-phone` and
|
|
2600
|
+
`views.editors.open-link` (`{ value }`: "Email {value}", "Call {value}", "Open {value}").
|
|
2601
|
+
- In `RelationSetEditor`, Space on a highlighted linked record makes it the lead, as its Make lead action does, while
|
|
2602
|
+
the search is empty; with a query typed, Space types. It needs a command list that names its highlighted row by
|
|
2603
|
+
`aria-activedescendant` and the row's value by `data-value`, as cmdk does.
|
|
2604
|
+
- A money figure shown converted into another currency than its record's own now says so, the same way on every
|
|
2605
|
+
surface: it carries ≈, and its title names the currency it was converted from ("Converted from USD"). A grid
|
|
2606
|
+
cell, a card, a board, a calendar and the list look all draw it, through `renderTypedCellValue`; a field row
|
|
2607
|
+
draws it when its host reads the record in another currency (it hands the converted figure as `value` and that
|
|
2608
|
+
currency as `opts.currency`).
|
|
2609
|
+
- The money editor opened from such a figure, in the grid, a field row or a card, names it under the record's own
|
|
2610
|
+
amount it opens on: "≈ €7,147 as shown". The two read as one value, so nobody "corrects" the stored amount to the
|
|
2611
|
+
converted one.
|
|
2612
|
+
- `convertedFromOf(column, row)` (from `@viewkitjs/views`): the currency a column's figure was converted from for
|
|
2613
|
+
this row, or null. `ConvertedFigure` and `ConversionLine` (from `@viewkitjs/views/display`): the mark and the
|
|
2614
|
+
editor's line, for an app's own surface. Two messages word them: `views.display.converted-from` (`{ code }`,
|
|
2615
|
+
"Converted from {code}") and `views.display.as-shown` ("as shown").
|
|
2616
|
+
|
|
2617
|
+
Nothing an app calls changes: each editor still opens on, and saves, the amount in the record's own currency.
|
|
2618
|
+
- A row's menu opens from the keyboard. On a focused cell, Shift+F10, the menu key, or ⌘⇧\ (Ctrl+Shift+\ off a Mac, as in Google Sheets) opens the menu a right-click on that cell opens, under the cell, with focus on its first row. Escape or a pick closes it and puts focus back on the cell. Safari may keep ⌘⇧\ for its tab overview; fn+Shift+F10 opens the menu there.
|
|
2619
|
+
- The name's actions (`rowActions`) are now rows of the row's menu too, after Select, so Shift+F10, the menu key, ⌘⇧\ (Ctrl+Shift+\ off a Mac) and a right-click reach them, and a screen reader reads them. Before, only a pointer over the row reached them. An action shows there when it gives a glyph, a click and a label for the row.
|
|
2620
|
+
- `DateEditor` takes `focusDate`: the date box takes the focus as the panel opens, without scrolling, so the keyboard
|
|
2621
|
+
is in the panel. Off by default; leave it off on a phone, whose sheet opens with the keyboard down. A `seed` still
|
|
2622
|
+
focuses the box either way.
|
|
2623
|
+
- The command list's root takes `defaultValue`: the value of the item highlighted as the list opens.
|
|
2624
|
+
- `LocationEditor` takes `chrome` (`"bare"`, the default, or `"field"`), handed to each part's `Input`; `DateEditor`
|
|
2625
|
+
takes `fill`, which spans the calendar across its panel.
|
|
2626
|
+
- `NameEditor` takes `chrome` (`"bare"`, the default, or `"field"`), handed to each box's `Input`.
|
|
2627
|
+
- `SelectEditor` takes `focusList`, for a host that opened it from the keyboard. A plain list (eight options or
|
|
2628
|
+
fewer) then puts the focus on the row it holds, or on None when it may be emptied and holds nothing, so an Enter at
|
|
2629
|
+
once changes nothing; ↓ and ↑ move the focus between its rows, round at either end, and Enter picks the focused
|
|
2630
|
+
row. Off by default: a list opened by a pointer moves no focus, as before. A list with a search ignores it;
|
|
2631
|
+
`focusSearch` gives that one the keys.
|
|
2632
|
+
|
|
2633
|
+
### Changed
|
|
2634
|
+
|
|
2635
|
+
- The peer `@viewkitjs/fields` is `^0.10.0` (was `^0.9.0`): install fields 0.10 beside views 0.3. Under `0.x` a
|
|
2636
|
+
`^0.10.0` peer accepts no 0.11.
|
|
2637
|
+
- Escape always throws the edit away. The edit session answers Escape with a discard without asking the editor, and the date editor discards on Escape where it used to save a changed date, the grid's date cell included.
|
|
2638
|
+
- An editor of your own that calls `useAnchoredEditSession` keeps its call as it is: the session only adds `refusal` to what it hands back. Escape throws its edit away too.
|
|
2639
|
+
- On a phone, a grid cell's select, status, date, tags, relation, number, money and range editor opens in your `Sheet`, titled with the column's header, with ✕ and ✓. "A phone" is anything below your provider's desktop query, `(min-width: 1024px)` unless you hand in your own. ✕, a swipe, the backdrop and Escape change nothing; ✓ saves; a pick in a select or a relation saves on its own. The value is written once the sheet has slid away. A number or a range typed in the sheet is no longer saved by its box losing focus, so tapping ✕ after typing saves nothing. On the desktop each editor opens where it did before.
|
|
2640
|
+
- In a select, status, date, tags, relation, number or range editor, a value the grid refuses on the spot now keeps the editor open with the reason. Before, it closed the editor and said the reason in a toast. These are the refusals your field's own rules make, such as a number below its minimum or a fraction in an integer field. Change the value, or press Escape to throw the edit away. Leave the cell while the reason stands and nothing is written; the reason is said in a toast. On a desktop a number or a range shows the reason under the cell, and a picker under its list. On a phone each shows it in the sheet. A clear, a paste, a fill or the Delete key over cells still says a refusal in a toast, and so do the text, long text, name and list-of-values editors. A write your server refuses rolls the cell back with your message, as before.
|
|
2641
|
+
- These editors close through the shared edit session, so they keep its rules: Escape always throws the edit away, a refused value stays open with its reason, and a swiped sheet changes nothing. A picked value still lands after the popover's exit. If the cell is left before then, the value is still written, and the focus stays where it was put.
|
|
2642
|
+
- The sheet's panel carries `data-slot="vk-editor-panel"`, and a reason under a number or a range carries `data-slot="vk-editor-refusal"`. `vk-grid-editor` stays on the desktop's popover and on a number or range typed in the cell.
|
|
2643
|
+
- `EDIT_CORES` names `TextEditor` for `text`, `url`, `domain`, `email`, `phone` and `rich_text`, where it held `null`, and `hasEditCore` answers `true` for them: it says whether a type has an editor of its own. A table of yours typed over `EDIT_CORES` that answers `null` for one of these now has to name a host for it.
|
|
2644
|
+
- The grid's text cell trims what was typed, brings each type's phone keyboard, and on a phone opens in a sheet titled with the column's header, with ✕ and ✓, as long text now does too. ✕ and a swipe change nothing; ✓ saves and closes without moving the selection; the save lands once the sheet has slid away. A phone here is a window narrower than the provider's `desktopQuery`, `(min-width: 1024px)` unless you hand in your own: hand in your shell's own query if you want the sheet only where your shell switches to its phone layout. On a desktop it still types in the cell, and Enter still saves and moves down at once; a cell opened by typing compares against the value the row stored. A value the grid would refuse (an email that isn't one) stays in the cell with its reason under it, and the long-text panel keeps it open with its reason, instead of closing into a toast. Long text closes on Ctrl Enter as well as ⌘ Enter.
|
|
2645
|
+
- In the grid, a click on an email, phone, link or domain selects the cell like any other cell, a second click or a
|
|
2646
|
+
double-click opens its editor, and on a phone a tap opens it. A ⌘-click (Ctrl-click on Windows) on the value opens
|
|
2647
|
+
the link. A value in a cell's `+N` list still opens on a plain click.
|
|
2648
|
+
- The grid scrolls inside itself, in both directions, on every screen. Its frame fills the box you give it, and
|
|
2649
|
+
each group's name bar and header row stay pinned at the top of the grid's own scroll area until the next group
|
|
2650
|
+
pushes them off. Before, your page scrolled the rows and the grid pinned its headers to your page.
|
|
2651
|
+
- **Your list page's layout changes once.** Give the grid's container the height the page has left, as a definite
|
|
2652
|
+
height or as a flex column. The page itself stops scrolling the grid. Every box between your container and the
|
|
2653
|
+
grid passes the height down; `min-height: 0` lets a flex child shrink below its rows.
|
|
2654
|
+
|
|
2655
|
+
Before (the page scrolls; the toolbar and the grid stack in a page that grows):
|
|
2656
|
+
|
|
2657
|
+
```tsx
|
|
2658
|
+
<main className="overflow-y-auto">
|
|
2659
|
+
<Toolbar />
|
|
2660
|
+
<GridTable {...props} />
|
|
2661
|
+
</main>
|
|
2662
|
+
```
|
|
2663
|
+
|
|
2664
|
+
After (the page holds still; the grid fills what the toolbar leaves and scrolls itself):
|
|
2665
|
+
|
|
2666
|
+
```tsx
|
|
2667
|
+
<main className="flex h-dvh flex-col">
|
|
2668
|
+
<Toolbar />
|
|
2669
|
+
<div className="flex min-h-0 flex-1 flex-col">
|
|
2670
|
+
<GridTable {...props} />
|
|
2671
|
+
</div>
|
|
2672
|
+
</main>
|
|
2673
|
+
```
|
|
2674
|
+
|
|
2675
|
+
A container with no height gets a grid that grows to its rows: your page scrolls it, as before, but its
|
|
2676
|
+
headers no longer pin.
|
|
2677
|
+
- Sideways scrolling is the browser's own: a trackpad, Shift and the wheel, the scrollbar or a finger. The header
|
|
2678
|
+
and the rows move together because they are in one scroll area, and the first column stays frozen.
|
|
2679
|
+
- On a phone the header row pins at the top of the grid, as on a desktop.
|
|
2680
|
+
- What counts as a phone is your desktop query alone (by default `(min-width: 1024px)`). A screen between 768px
|
|
2681
|
+
and 1023px wide is now drawn as a phone: grouped rows have no indent under the group's caret, and the header
|
|
2682
|
+
has no "+ Add column" (your app's own column picker is the way in). It already opened editors in your `Sheet` and opened
|
|
2683
|
+
a record from a tap on its name. To keep a desktop's drawing there, hand the provider a `desktopQuery` that
|
|
2684
|
+
matches it.
|
|
2685
|
+
- The default load-more watches the grid's own scroll area and asks for more rows 600px before its end.
|
|
2686
|
+
- On a phone (anything below your provider's desktop query), one tap on a cell opens its field's editor in your
|
|
2687
|
+
`Sheet`. Before, a tap selected a cell and a second tap opened it, and a pick-list opened from a tap on its ▾. A
|
|
2688
|
+
cell that opens nothing is selected and the grid says why, as a desktop's second click does.
|
|
2689
|
+
- On a phone, a tap anywhere on the name's cell opens the record (your `onOpenRow`), not only a tap on the name's
|
|
2690
|
+
text. The name is edited inside the record.
|
|
2691
|
+
- A cell of several emails, phones, links or domains opens its value list in your `Sheet` on a phone, titled with the
|
|
2692
|
+
column's header, instead of your `Popover`.
|
|
2693
|
+
- On a desktop nothing changes: a click selects, and a second click, a double-click, Enter or typing edits.
|
|
2694
|
+
- A test of yours that clicks the grid on a screen your desktop query doesn't match now opens the editor on the first
|
|
2695
|
+
click. Answer your desktop query (by default `(min-width: 1024px)`) in your `matchMedia` stub to keep a desktop's
|
|
2696
|
+
clicks.
|
|
2697
|
+
- A read-only text that its cell cuts off can now be opened to read; one that fits still opens nothing.
|
|
2698
|
+
- Typing a letter on a cut-off text still replaces the value in the cell's one-line box. Links, emails, phones and
|
|
2699
|
+
domains keep their one-line box, cut off or not.
|
|
2700
|
+
- The grid draws only the rows on screen, with ten more each side, so 10,000 rows open, scroll and edit about as
|
|
2701
|
+
fast as 50. A stretch a fast fling reaches before its rows are drawn shows empty row lines for a frame. The focused
|
|
2702
|
+
row and the row being edited stay drawn when they scroll away, so an editor never loses its text.
|
|
2703
|
+
- The browser's own find (⌘F) finds only the rows drawn; your list's own search finds the rest.
|
|
2704
|
+
- A row no longer carries its own inline `grid-template-columns`: the columns' template is set once on the grid's
|
|
2705
|
+
scroll area, and every row, column-name row and footer reads it.
|
|
2706
|
+
- Two new slots: `data-slot="vk-grid-rows"` holds a group's rows, and `data-slot="vk-grid-gap"` stands for the
|
|
2707
|
+
rows not drawn, as tall as they are.
|
|
2708
|
+
- The outline a grid cell shows under the pointer is now drawn by the hovered cell's own `::after`, only while it is
|
|
2709
|
+
hovered. No cell carries an element for it any more, so a row draws one element fewer for each column but the
|
|
2710
|
+
name. It looks the same, in light and dark. If your own CSS styles a grid cell's `::after`, it now meets this
|
|
2711
|
+
outline on hover.
|
|
2712
|
+
- A row's action buttons on the name (your `rowActions` and the built-in Edit) are drawn only on the row under the
|
|
2713
|
+
mouse, and a pick-list's ▾ (a select, status, relation or tags cell) only on the cell under the mouse or the cell
|
|
2714
|
+
whose picker is open. Every other row draws neither, so a row draws fewer elements. They look and work as
|
|
2715
|
+
before: hovering a cell shows its ▾, and one click on it opens the picker.
|
|
2716
|
+
- On a phone, anything below your provider's desktop query, a pick-list's ▾ is never drawn: the whole cell opens the
|
|
2717
|
+
picker (one tap opens a cell's editor on a phone). A touch never counts as a hover.
|
|
2718
|
+
- A test of yours that finds the name's buttons or a ▾ in a row it has not hovered no longer finds them. Hover the
|
|
2719
|
+
row or the cell first (a `pointerover` with `pointerType: "mouse"`), on a screen that answers your desktop query.
|
|
2720
|
+
- ↓ from a group's last row now stops on its footer (when it has one), then on the next group's bar and its column names, before reaching that group's rows; before, it jumped straight to the next group's first row. ↑ walks the same way back. Tab and the Shift+arrow ranges still move from row to row across groups.
|
|
2721
|
+
- The grid's keys listen on the grid instead of the window; only ⌘Z still listens on the window, so an undo works wherever the focus is. A test that pressed the grid's keys on `window` or `document.body` presses them on the focused cell (`document.activeElement`) instead, as a keyboard does.
|
|
2722
|
+
- The grid's row checkboxes, its group bars' buttons and "+ Add column" are no longer Tab stops of their own; the arrows reach them as above.
|
|
2723
|
+
- A closed select no longer offers the values other records hold that no option names: a stray value shows only
|
|
2724
|
+
on the record that holds it. The grid does this itself. A host of your own that passed every record's values as
|
|
2725
|
+
`extraValues` to a closed select now passes the record's own value as `current`, and keeps `extraValues` for an
|
|
2726
|
+
open select's values:
|
|
2727
|
+
|
|
2728
|
+
```tsx
|
|
2729
|
+
// before
|
|
2730
|
+
pickerOptionsFromField(field, { extraValues: valuesOnScreen });
|
|
2731
|
+
// now, for a closed select
|
|
2732
|
+
pickerOptionsFromField(field, { current: record.stage });
|
|
2733
|
+
```
|
|
2734
|
+
- A closed multiselect in the grid offers its options alone, never the values other records hold that no option
|
|
2735
|
+
names, and offers no row to add typed text. A value the cell already holds stays as a chip, and is saved as it is
|
|
2736
|
+
when the set is.
|
|
2737
|
+
- Saving a closed multiselect through `prepareFieldWrite` reads the record's current value, so a value the set
|
|
2738
|
+
already holds passes though no option names it; only values added now must be options.
|
|
2739
|
+
- The grid's editor for several emails, phones, links or domains now asks the grid before it closes, as the other
|
|
2740
|
+
editors do: a list the grid would refuse (a value listed twice, an address that isn't one) stays open with the
|
|
2741
|
+
reason under it instead of closing into a toast.
|
|
2742
|
+
- Removing every value from a list whose column can't be emptied keeps the editor open, saying the field can't be
|
|
2743
|
+
emptied (in the column's own `reasons.clearable` words when it declares them). Escape still throws the edit away.
|
|
2744
|
+
Before, the editor closed and quietly dropped the whole edit.
|
|
2745
|
+
- A letter typed on a selected relation or member cell opens its picker already searching for that letter; a
|
|
2746
|
+
remote search runs once typing pauses.
|
|
2747
|
+
- On a desktop a relation or member picker opens with the caret in its search; on a phone its sheet opens on the
|
|
2748
|
+
list with the keyboard down, and a tap on the search raises it.
|
|
2749
|
+
- A writable relation that stores refs (it names `kinds`, or carries `links`) binds a write: `bindField` no longer
|
|
2750
|
+
refuses it. The grid edits and saves it; a surface you build on `RelationEditor` alone (a record's field row, a
|
|
2751
|
+
card, a form field) still commits one bare id, so keep such a relation off those surfaces until they edit it.
|
|
2752
|
+
- In the grid, a relation holding several records edits in `RelationSetEditor` and saves the whole set in the stored
|
|
2753
|
+
shape: ids, or links with their kind, stored role and one lead where the field leads by a flag. A one relation of
|
|
2754
|
+
several kinds saves `{ kind, id }`.
|
|
2755
|
+
- The grid's write gate takes a relation's whole set and a ref, each id held to the candidates when the list is
|
|
2756
|
+
static. A relation column with no field still takes an id alone.
|
|
2757
|
+
- In the grid, a `date` field's editor has no time box, and a click on a day or a quick day saves it at once, on the
|
|
2758
|
+
desktop and in the phone's sheet. A `datetime` keeps its time box (an empty time starts at 00:00), stays open after
|
|
2759
|
+
a day click, and ✓ in the phone's sheet saves the day and the time.
|
|
2760
|
+
- In the grid, a date column that may be emptied (`clearable`) ends its editor with a Clear row; a required date shows
|
|
2761
|
+
none, and Delete still clears.
|
|
2762
|
+
- In the grid, a character typed on a date cell opens its editor with that character in the date box, as on a text
|
|
2763
|
+
cell. Before, it opened the editor on the stored date and dropped the character.
|
|
2764
|
+
- Every date editor now shows the three quick days, yours included: a host that passes none of the new props keeps
|
|
2765
|
+
its panel otherwise. A click on a day of the next or the previous month also moves the calendar to that month.
|
|
2766
|
+
- In the grid, a money cell of one fixed currency shows its code (EUR) beside the amount while it is typed, as a
|
|
2767
|
+
per-record currency's chip and a money range already did.
|
|
2768
|
+
- In the grid, a range field with presets lists them under its two boxes: in a menu under the cell on the desktop, in
|
|
2769
|
+
the sheet with the boxes on a phone.
|
|
2770
|
+
- In the field row, a money field of one fixed currency shows its code beside the amount while it is typed, and a
|
|
2771
|
+
range field with presets lists them in a menu under its two boxes.
|
|
2772
|
+
- `useAnchoredEditSession`'s docs say what its deferred mode (`onDone`) is kept for: compatibility, for an app that
|
|
2773
|
+
still opens it. The package's own grid name editor is its one user here. Nothing in the mode changes, and a new
|
|
2774
|
+
host should prefer the admitted mode (`onAttempt` and `onClose`).
|
|
2775
|
+
- Delete, Clear or Cut over several cells empties what it can, then says in one toast which fields it left because
|
|
2776
|
+
they can't be emptied ("Not emptied: Stage and Owner can't be empty"). Before, those cells kept their values
|
|
2777
|
+
without a word, and a selection holding only such fields said "Nothing in this selection can be emptied".
|
|
2778
|
+
- A new message key for an adapter's words: `views.grid.clear-required`, with `{ fields }`, the fields' names
|
|
2779
|
+
already joined in the viewer's locale.
|
|
2780
|
+
- On a phone, where a tap on a grid's email, phone, link or domain cell opens its editor in the sheet, the sheet now
|
|
2781
|
+
carries the open action: beside a single value's box, and on each row of several. The desktop is unchanged: a
|
|
2782
|
+
⌘- or Ctrl-click on the cell still follows its link.
|
|
2783
|
+
- If your `contextMenu` already lists one of your `rowActions` under the same label, the menu shows it once, as yours. Listed under another label, it shows twice: give both the same label, or leave it out of one.
|
|
2784
|
+
- `RowEditor`'s `onClose`, and every row host's, now receives `{ focusBack }`: `true` when the editor closed from the
|
|
2785
|
+
keys or a pick off a sheet, and the row should take the focus back. A caller that mounts `RowEditor` itself and
|
|
2786
|
+
ignores the argument keeps today's behaviour; one that wants the row's, focuses its own trigger when it is `true`.
|
|
2787
|
+
|
|
2788
|
+
### Fixed
|
|
2789
|
+
|
|
2790
|
+
- The grid reference said `freezeIdentity` defaults to true. That is the bare `GridTable` prop's default; a grid wired
|
|
2791
|
+
through `useGridTablePrefs` takes the preference `gridFreezeIdentity`, which `LIST_VIEW_PREF_DEFAULTS` sets to
|
|
2792
|
+
false, so its title column starts unfrozen until the person turns it on. The reference and the grid guide now name
|
|
2793
|
+
both, and how to open a grid frozen: `gridFreezeIdentity: true` in your starting prefs. Nothing in the code changed.
|
|
2794
|
+
- A column locked in your `listConfig` refused an edit of one cell but still took a clear, a cut, a paste or a fill
|
|
2795
|
+
over several cells, a paste into one cell, and the cut, paste and clear of a single cell's context menu: the write
|
|
2796
|
+
reached your commit handler. The grid now refuses every one of them itself, before your handler runs. A clear,
|
|
2797
|
+
cut, paste or fill over several cells writes the columns that aren't locked and says the lock once per locked
|
|
2798
|
+
column, in the sentence an edit of one cell says (`views.grid.locked`, "Status is locked by workspace settings");
|
|
2799
|
+
a paste or a fill of several cells says it the way it says its other refusals (`views.grid.paste-skipped` or
|
|
2800
|
+
`views.grid.fill-skipped`, "2 cells weren't pasted: Status is locked by workspace settings"). Nothing in your code
|
|
2801
|
+
changes.
|
|
2802
|
+
- A grid phone cell opened on `[object Object]`, and a record's phone row opened empty: both now open on the phone written out, and an unchanged phone closes without a save. An unchanged text cell closes without handing the grid a value; Enter and Tab still move on.
|
|
2803
|
+
- On a grid scrolled sideways with no column frozen, the checkbox a row shows while you point at it, and the
|
|
2804
|
+
header's select-all, now sit on the checkbox lane's surface, in the row's hover tint, instead of drawing over the
|
|
2805
|
+
text of the cell passing beneath. Only that row's part of the lane comes up; unscrolled, and with a column frozen,
|
|
2806
|
+
the lane draws as before.
|
|
2807
|
+
- A column's menu and a footer's figure picker opened only by pointer. The arrows now reach a group's column names (↑ from its first row) and its footer (↓ from its last), Enter or Space opens the menu or the picker, and Escape or a pick puts focus back on the cell. A column's menu opened by a key starts with its first row focused; opened by a pointer, it opens as before.
|
|
2808
|
+
- A column that shows only its glyph had no name for a screen reader. It is now named after its field's label.
|
|
2809
|
+
- `prepareFieldWrite` refused an edit of a url kept without its scheme (`acme.com`) when it came back as stored; it
|
|
2810
|
+
now keeps it, as it keeps a phone.
|
|
2811
|
+
- After a fill drag let go past the edge of the grid's visible area, the first click on a cell did nothing and only
|
|
2812
|
+
the second selected it. The first click now selects the cell, as any other click does. The click a fill drag makes
|
|
2813
|
+
as it ends on the grid still changes nothing.
|
|
2814
|
+
- Dragging the fill dot past the top or bottom of the grid's visible area did nothing: the fill stopped at the last
|
|
2815
|
+
row on screen. Held near or past that edge, the drag now scrolls whatever scrolls the grid (the page, or a
|
|
2816
|
+
scrolling box around the grid), faster the further past the edge the pointer is, and keeps extending the fill to
|
|
2817
|
+
the row at the edge; letting go fills to that row.
|
|
2818
|
+
- An undo or a redo brings the cell it changed into view and selects it, as it always meant to: it used to look for
|
|
2819
|
+
the row in a way that never found it, so the grid stayed where it was.
|
|
2820
|
+
- Emptying a grid cell (typing it empty, Delete, Cut, a clear over a range) warned "changed elsewhere" when your
|
|
2821
|
+
rows came back holding `null` for it after the save had settled, though nobody else had changed anything. The
|
|
2822
|
+
grid now reads `null`, `undefined`, a blank text and an empty list as one empty value when it decides whether
|
|
2823
|
+
someone else changed a cell, so that warning no longer appears. A save that answers as it did before sees nothing
|
|
2824
|
+
else change: a genuine third value still warns, and you need not answer `stored: null` to keep it quiet.
|
|
2825
|
+
- On a phone, a grid cell whose number, money, range or text editor was open in the sheet went blank behind the
|
|
2826
|
+
sheet until it closed. The cell now keeps showing its value while the sheet is open, as a picker's cell does. On a
|
|
2827
|
+
desktop the editor still takes the value's place in the cell.
|
|
2828
|
+
- A tap inside an editor's sheet bubbled through React's tree to whatever the editor opened from, so in a grid in
|
|
2829
|
+
selection mode it could toggle the row behind the sheet. `EditorPanel` now keeps a click, a double-click or a
|
|
2830
|
+
context menu inside its sheet to itself, for every host. `onPanelClick` is called for a click in the sheet as well
|
|
2831
|
+
as in the popover; the popover's behaviour is unchanged.
|
|
2832
|
+
- A grid column your list's settings locked while one of its cells' editors was open closed the editor into a toast
|
|
2833
|
+
when it tried to save, and left it mounted with nothing to answer it until the next click. The editor now asks the
|
|
2834
|
+
lock before it closes, as it asks the write gate, so it stays open with the lock's sentence and Escape leaves it.
|
|
2835
|
+
A write the grid refuses on its way to your save also closes that cell's editor.
|
|
2836
|
+
- `useAnchoredEditSession`, in its `onAttempt` mode, ignores a close that arrives while `onAttempt` runs. Before, a
|
|
2837
|
+
host that wrote inside `onAttempt` and whose editor closes on blur could write twice when the write moved the focus:
|
|
2838
|
+
the blur closed the session again and asked `onAttempt` a second time. A refused attempt still leaves the session
|
|
2839
|
+
open for the next one, with its reason in `refusal`, and so does an `onAttempt` that throws. Nothing changes in how
|
|
2840
|
+
you call it.
|
|
2841
|
+
- The date editor reads a stored date with no time (`2026-12-01`) as that day in every time zone. West of UTC it
|
|
2842
|
+
opened on the day before, and a change to the time alone saved the day before; east of UTC its time box showed the
|
|
2843
|
+
zone's offset (02:00 in Bucharest) as a time. A date field in the grid now opens on its stored day and saves as that
|
|
2844
|
+
day. A stored date and time reads as it did.
|
|
2845
|
+
- The range editor's two boxes no longer run out past the start of a narrow cell on the desktop. Each keeps its width
|
|
2846
|
+
where the cell has room and shrinks where it has not.
|
|
2847
|
+
- `EditorPanel` reports a focus leaving its popover with no press (a Tab out of it, the popover's `focus-out`) as
|
|
2848
|
+
`close("blur")`, where it reported `close("outside")`. A host that spends the click after an outside press, so it
|
|
2849
|
+
can't open what sits under the popover, no longer spends the next click after a keyboard exit. Every editor in the
|
|
2850
|
+
package answers `"blur"` as it answers `"outside"`; a host of your own that tells the two apart now hears `"blur"`
|
|
2851
|
+
for a focus leaving.
|
|
2852
|
+
- With a group collapsed, the keyboard walked into its hidden rows. Tab, Enter, the arrows and a Shift+arrow range now skip a collapsed group's rows, and a copy, a clear, a paste and a fill over a range across it don't touch them, as a spreadsheet skips filtered rows.
|
|
2853
|
+
- Collapsing a group while one of its cells was being edited could close the editor. The edit now stays open, and nothing is lost, where your `Collapse` keeps a shut group mounted.
|
|
2854
|
+
- A writable field row whose value has several parts (several values, a place, a name) no longer draws a button inside its own button. Its "+N" is plain text, and a press anywhere on the value opens the editor, which lists every value. Several links in a writable row draw as text too; a read-only row keeps its links and its "+N" list, and a single link keeps its anchor.
|
|
2855
|
+
- In `RelationSetEditor`, an Enter after the pointer moved the highlight off the first linked record now acts on the
|
|
2856
|
+
highlighted record. Only while the highlight still sits on the record it opened on, and nothing was typed or
|
|
2857
|
+
arrowed, does an Enter do nothing. A set that opens empty has no such guard.
|
|
2858
|
+
- `prepareFieldWrite` passes a relation's stored value to the field's accept rule, so a link whose stored role was
|
|
2859
|
+
archived since no longer refuses the save of its set.
|
|
2860
|
+
- In the grid, a record your create form links to a relation holding several records joins the set however soon you
|
|
2861
|
+
call the link: one called before the editor has finished closing is written right after the editor's own save,
|
|
2862
|
+
never under it.
|
|
2863
|
+
- The default row menu, opened by a key after a tap on the row, opened nothing, and opened by a key after a click it ignored a pick for its first 300 ms. A key now forgets the press before it.
|
|
2864
|
+
- A row's checkbox reached by keyboard lost its focus when the grid scrolled its row far out of view. Its row now stays drawn, and the checkbox keeps the focus, as a focused cell's row does.
|
|
2865
|
+
- A writable field row nests no link or button inside its edit button, whatever its value draws.
|
|
2866
|
+
- A single email, phone, link or domain in a writable row reads as plain text inside the button, and an open action
|
|
2867
|
+
sits beside it, outside the button: a mail to the address, a call to the number, the site in the browser, the same
|
|
2868
|
+
action a phone's sheet carries. A press on the row, on the value's text included, opens its editor.
|
|
2869
|
+
- A writable rich text keeps its formatting, its links and its "Show more", which now sit outside the row's button:
|
|
2870
|
+
the value lies over the button, so a press on its text still opens the editor while a link or "Show more" takes
|
|
2871
|
+
its own press.
|
|
2872
|
+
- A read-only row is unchanged: its links stay links.
|
|
2873
|
+
- On a datetime, Enter after a quick day (Today, Tomorrow, Next Monday) or a calendar day saves the day and time
|
|
2874
|
+
`DateEditor` shows. The click left the focus on the day just pressed, so Enter pressed it again and nothing asked
|
|
2875
|
+
to close. On a desktop width a pick now puts the focus back in the date box, as a time picked from the list puts
|
|
2876
|
+
it in the time box. On a phone the focus stays where it was, so the keyboard doesn't rise, and the sheet's ✓ saves.
|
|
2877
|
+
- `EditorPanel` reports a press outside its popover only while its session is open. Your popover may stay mounted
|
|
2878
|
+
while it plays its exit after a close, its outside press still live; a press there reached the session's `close`
|
|
2879
|
+
as `"outside"` again. A host that spends the click after an outside press, so it can't open what sits under the
|
|
2880
|
+
popover, spent the next click after a Tab out of the editor. Nothing changes while the editor is open.
|
|
2881
|
+
- `DateEditor` can be left by Tab. Tab from its last control asks to close with `"tab"`, and Shift-Tab from its
|
|
2882
|
+
first with `"shift-tab"`, keeping what was typed or picked; Tab between its own controls (the date box, the time
|
|
2883
|
+
box, the quick days, the calendar) moves as before. A popover that keeps the focus in a loop held the keyboard in
|
|
2884
|
+
the panel, which could be left only by Escape, throwing the edit away. The editor now draws a root element with
|
|
2885
|
+
`display: contents` (`data-slot="vk-date-editor"`) around its parts, which changes no layout.
|
|
2886
|
+
- The grid's date cell moves to the next cell on a Tab out of its editor, and to the one before on Shift-Tab, as
|
|
2887
|
+
every other cell editor does.
|
|
2888
|
+
- On a desktop, Enter or Tab in an editor that opens over its cell (a text cut off in its cell, a date, a pick-list, chips, a place, a relation) moves the grid's focus to the next cell at once, while the editor plays its close. A key typed straight after it, the next value, an arrow or ⌘Z, now acts on the grid; it used to be lost for about 180 ms, and a click on the next cell in that moment opened its editor. A key in that moment writes the saved value first, so ⌘Z undoes it.
|
|
2889
|
+
- The grid's date cell, opened by Enter, a double-click or a click on the cell already selected, puts the focus in its
|
|
2890
|
+
date box on a desktop. The focus stayed on the cell, where the grid keeps Tab while a cell is editing, so Tab could
|
|
2891
|
+
not leave the editor and only Escape, which throws the edit away, closed it. Tab now walks the panel's controls and,
|
|
2892
|
+
from its last, saves and moves to the next cell; Shift-Tab from the date box moves to the cell before.
|
|
2893
|
+
- In `DateEditor`, Tab out of the time box closes its quick-pick of times, so the next Tab reaches the quick days
|
|
2894
|
+
rather than walking every quarter hour of the day.
|
|
2895
|
+
- A field row's closed select of more than eight options opens on a desktop with the caret in its search, as the
|
|
2896
|
+
grid's does, so the first keys filter the list. The search opened without the caret, and typing filtered nothing
|
|
2897
|
+
until a click into it. On a phone the sheet still opens with the keyboard down.
|
|
2898
|
+
- `RelationEditor`, and so every relation and member picker (a grid cell, a field row, a card), opens with the linked
|
|
2899
|
+
record highlighted. It opened on the None row above the candidates, so an Enter pressed at once emptied the field.
|
|
2900
|
+
When a remote search's page doesn't hold the linked record, nothing is highlighted until a key or typed text moves
|
|
2901
|
+
the highlight, and an Enter at once does nothing. With nothing linked it opens on None, or on the first candidate,
|
|
2902
|
+
as before; opened by a typed letter, on the first match.
|
|
2903
|
+
- A value cut short among several (several emails, phones, links or places, a multiselect, a relation's records) now
|
|
2904
|
+
ends in "…" wherever it is drawn: a grid cell, a field row, a card, the list look. The ellipsis sits on each value's
|
|
2905
|
+
own box; before, the value was clipped mid-word with nothing marking the cut. The count of hidden values (+N) is
|
|
2906
|
+
unchanged.
|
|
2907
|
+
- On a phone, a record's field row opens a place in the sheet with each part drawn as a box: the parts ask the app's
|
|
2908
|
+
`Input` for its field frame (`chrome: "field"`), as a typed cell's sheet already does, and a part picked from a list
|
|
2909
|
+
(a region, the country) takes a frame of the same height. On a desktop the popover's compact rows are unchanged.
|
|
2910
|
+
- On a phone, a field row's date sheet draws its calendar across the sheet's whole width: the app's `Calendar` gets
|
|
2911
|
+
`className: "w-full"` there. An adapter whose calendar merges its own classes with that one needs no change.
|
|
2912
|
+
- On a phone, a grid's name cell opens its three boxes in the sheet, titled with the column's header, with ✕ and ✓,
|
|
2913
|
+
as every other cell does: ✕ and a swipe change nothing, ✓ saves. In the sheet the boxes wear the app's field frame.
|
|
2914
|
+
On a desktop it still opens under the cell. It now closes by the same rules as the grid's other editors.
|
|
2915
|
+
- `EditorPanel` brings an in-place editor's box into view as it opens, at the nearest edge, when its `anchor` is that
|
|
2916
|
+
box. The grid's number, money and range cells edit in their own box, and one partly past the edge of the grid's
|
|
2917
|
+
scroller (its last column at the window's edge) opened cut off, its value out of sight.
|
|
2918
|
+
- In the grid, what a type-in cell hangs under itself (a refusal; under a money cell, the figure a converted amount
|
|
2919
|
+
shows) ends at the cell's right edge when, started at its left, it would run past the window or the grid's
|
|
2920
|
+
scroller.
|
|
2921
|
+
- Escape from a column's menu, a footer's figure picker or a group's ⋯ menu left the focus on the page when your `Popover` plays an exit, so the arrows did nothing. The focus now goes back to the column name, the footer cell or the bar's ⋯ once the panel has left the page.
|
|
2922
|
+
- In a column's menu and the figure picker, ↓ and ↑ now move between the rows, round at either end, and Enter picks the focused one. Before, only Tab moved, so ↓ then Enter picked the first row.
|
|
2923
|
+
- On a grouped grid, ⌘Z or ⇧⌘Z that changed a value cleared the selection and dropped the focus to the page, so the next arrow did nothing. The undone cell is now selected and holds the focus, and the next key moves from it. An undo of a row no longer shown leaves the focus where it was.
|
|
2924
|
+
- In a group's ⋯ menu, ↓ and ↑ now move between the rows (the sort choices, the Show toggles, Hide), round at either end, and Enter picks the focused one. Before, only Tab moved, so ↓ then Enter picked the first row. Past eight sort choices, where the menu searches them, ↓ past the last match goes on to the Show rows and ↑ from there comes back.
|
|
2925
|
+
- `SelectEditor`'s list of more than 8 options that may be emptied (`clearable`) opens with the value it holds
|
|
2926
|
+
highlighted, or None when it holds nothing, so an Enter pressed at once changes nothing. The arrows walk every row,
|
|
2927
|
+
None included, and Enter on None empties the field. It opened with nothing highlighted: ArrowDown never moved, and
|
|
2928
|
+
None could not be reached from the keyboard. Opened with a `seed`, it opens on the first match, as before. A list
|
|
2929
|
+
that can't be emptied, and a list of 8 or fewer, behave as before.
|
|
2930
|
+
- A field row whose editor closes by Tab, Shift-Tab, Escape, Enter or a pick puts the focus back on its own
|
|
2931
|
+
button, on a desktop, so the next Tab moves on from that row. The focus fell to the page, and the next Tab started
|
|
2932
|
+
again from the top. When the write is still saving, the focus goes back once it has saved, unless it was moved in
|
|
2933
|
+
the meantime. An outside press leaves the focus where it put it, and a phone's sheet is unchanged.
|
|
2934
|
+
- An empty list whose columns are wider than its box shows your empty message whole and centred in the width you
|
|
2935
|
+
can see, instead of centring it on the table's full width, past the box's edge. The grid keeps the message in view
|
|
2936
|
+
itself; you hand it `emptyState` as it is. If you wrapped your message to keep it in view (a sticky, `100cqw`-wide
|
|
2937
|
+
element), you can drop that wrapper.
|
|
2938
|
+
- A grid's number or money editor opened in a cell too narrow for the amount and its currency grows past the cell to
|
|
2939
|
+
show both in full, away from the side the column aligns to (a right-aligned column's grows left, the amount still
|
|
2940
|
+
flush with its edge), up to 320px, past which the amount scrolls in its box. It had been the cell's width, so the
|
|
2941
|
+
end of the amount was cut with nothing marking the cut. A cell wide enough opens its editor as before, and the line
|
|
2942
|
+
under the cell (the converted figure, a refusal) stays where it was.
|
|
2943
|
+
- A phone number too long for its box ends in "…", alone or as one of several, in a grid cell, a field row and a
|
|
2944
|
+
card. It had been cut mid-digit with nothing marking the cut. Its link and the count of the others are unchanged;
|
|
2945
|
+
the number underlines on its link's hover, as a relation's name does.
|
|
2946
|
+
- In the place editor drawn in your app's field frame (a field row's place on a phone), the country's box is as high
|
|
2947
|
+
as every other part's box. It had been sized to its text, shorter than the boxes under it. The bare editor (a
|
|
2948
|
+
popover on the desktop) is unchanged.
|
|
2949
|
+
- In the name editor drawn in your app's field frame (a grid's name cell on a phone), the Full name box spans the
|
|
2950
|
+
editor's width and is as high as the Given and Family boxes above it. It had been held narrower than they are,
|
|
2951
|
+
which cut a longer name short. The bare editor (a popover on the desktop) is unchanged.
|
|
2952
|
+
- In a group's ⋯ menu that searches its sort choices (more than eight), ↓ from the last row now comes round to the first sort choice, and ↑ from the row below the list comes back to the last one. Before, ↓ from the last row went back to the last sort choice, so ↓ bounced between the last two rows.
|
|
2953
|
+
- A sort picked by keyboard from a column's menu or a group's ⋯ menu left the focus on the page when your list reloads on a sort and holds the table it is leaving `inert` meanwhile. The focus now goes back to the column name or the ⋯ once the table is no longer inert, unless it has moved somewhere else first.
|
|
2954
|
+
|
|
2955
|
+
### Removed
|
|
2956
|
+
|
|
2957
|
+
- `--vk-pinned-top`. The grid no longer reads it, because its headers pin inside its own scroll area; stop
|
|
2958
|
+
declaring it for the grid.
|
|
2959
|
+
- The `data-grid-scroller` attribute. `[data-slot="vk-grid-scroll"]` is the one element that scrolls.
|
|
2960
|
+
- Wrapping leaves the grid. Every row is one height, and a cell's text stays on one line, cut off at the cell's edge.
|
|
2961
|
+
- `GridTable` no longer takes `wrapCells`. Delete the prop where you pass it: `<GridTable wrapCells={wrap} … />`
|
|
2962
|
+
becomes `<GridTable … />`.
|
|
2963
|
+
- The preference `gridWrapCells` is gone from `ListViewPrefs` and `LIST_VIEW_PREF_DEFAULTS`, and `wrapCells` from
|
|
2964
|
+
a view's layout (`ListViewLayout`, `LIST_LAYOUT_DEFAULTS`), so `gridProps` from `useGridTablePrefs` no longer
|
|
2965
|
+
carries it. Delete any switch that set it: `setPrefs({ gridWrapCells: next })` no longer type-checks. A value
|
|
2966
|
+
you already stored is ignored, and an old blob's `gridWrapCells` is no longer carried into a layout.
|
|
2967
|
+
- `GridCellOptions` no longer has `wrap`: `renderTypedCellValue(col, row, { wrap: true })` becomes
|
|
2968
|
+
`renderTypedCellValue(col, row)`. `DisplayOptions.wrap` is unchanged, so a field drawn outside the grid still wraps
|
|
2969
|
+
as before.
|
|
2970
|
+
- `--vk-chrome-h`, `--vk-cell-py` and `--vk-tail-py` leave `VK_TOKENS`. Only a wrapped row read them, and the
|
|
2971
|
+
grid no longer sets or reads them: delete any CSS of yours that sets them, and any that reads them, which would
|
|
2972
|
+
now get nothing.
|
|
2973
|
+
|
|
2974
|
+
## [0.2.0] — 2026-10-31
|
|
2975
|
+
|
|
2976
|
+
The grid's rendering, behind its own door, `@viewkitjs/views/grid`, and the package's documentation in `docs/`.
|
|
2977
|
+
It needs `@viewkitjs/fields` 0.9.
|
|
2978
|
+
|
|
2979
|
+
### For an adapter
|
|
2980
|
+
|
|
2981
|
+
- Messages: five keys are new, `views.menus.row-delete-failed`, `views.grid.paste-other-currency`,
|
|
2982
|
+
`views.grid.paste-ambiguous-option`, `views.grid.paste-skipped` and `views.grid.fill-skipped`, and one is gone,
|
|
2983
|
+
`views.grid.paste-failed`. A catalog that words its own messages adds the new ones and drops the old one, which
|
|
2984
|
+
`ViewsMessage`, a closed union, no longer holds; one that leaves a key out reads it in the package's English.
|
|
2985
|
+
Each is worded in its own line, here or under Changed.
|
|
2986
|
+
|
|
2987
|
+
- A new message, `views.menus.row-delete-failed` "Failed to delete the row": the plain row menu's error toast when
|
|
2988
|
+
the delete your `onDelete` ran rejects. A catalog that leaves it out gets the English.
|
|
2989
|
+
- The grid stops its sticky header and its group headers under `--vk-pinned-top`, the height of what your surface
|
|
2990
|
+
pins above it (a tab strip, a toolbar), read as `0px` when you declare none: declare it where you pin something
|
|
2991
|
+
over a grid. The grid read `--drawer-pinned-top` before: an app that set it for the grid sets `--vk-pinned-top`.
|
|
2992
|
+
- A new, optional port, `confirm({ message, confirmLabel, subject, destructive })`, resolving to whether the person
|
|
2993
|
+
said yes. The plain row menu's Delete asks it, `message` worded by `views.menus.row-delete-confirm`,
|
|
2994
|
+
`confirmLabel` by `views.menus.row-delete`, and `subject` the host's `deleteLabel`. Hand your own dialog through it
|
|
2995
|
+
to keep the plain row menu; hand nothing and Delete asks the browser's own confirm, as in 0.1.0. A rejection or a
|
|
2996
|
+
throw counts as no.
|
|
2997
|
+
- `Menu`: a group marked `disabled` reaches your `Menu` with every row under it marked `disabled`. Draw each row by
|
|
2998
|
+
its own flag; nothing else is needed.
|
|
2999
|
+
- Four slots stay as they are, and the handling in "Writing an adapter" is the contract's answer: `Menu`'s anchor (the
|
|
3000
|
+
menu library's root, positioner and popup), `Popover`'s `chrome: "menu"` (your menu surface laid over the card, no
|
|
3001
|
+
inset), `Command.Input`'s `chrome: "bare"` (the command library's own input) and `Sheet`'s `snap` (map it onto your
|
|
3002
|
+
snap points, or ignore it).
|
|
3003
|
+
- Now said, with nothing to change for an adapter that already does it: `Popover`'s `chrome: "menu"` has no card
|
|
3004
|
+
width (it is as wide as its list); `Command.Item`'s `chosen` (you colour the item, the package's row inside draws
|
|
3005
|
+
the check, so hide your copy's own tick); and `AppIcon` (it draws on the first paint: a static record of your icons,
|
|
3006
|
+
never icons loaded on demand).
|
|
3007
|
+
- `Command.Input`: the place editor focuses its country and region search through the input's `ref`, with
|
|
3008
|
+
`preventScroll`, no longer through `autoFocus`. Forward `ref` to the input, as the contract already asks.
|
|
3009
|
+
- `Popover`: an editor opened with `initialFocus={false}` takes its own focus with `preventScroll`, so a popup that
|
|
3010
|
+
places itself after mounting no longer jumps the page. An editor's popover positioned `fixed` only to hide that
|
|
3011
|
+
jump can go back to your library's default.
|
|
3012
|
+
- `Command.Input`: the grid's Add column search focuses through the input's `ref`, with `preventScroll`, no longer
|
|
3013
|
+
through `autoFocus`, and its popover opens with `initialFocus={false}`. Nothing in the package passes `autoFocus`
|
|
3014
|
+
any more, so a popover positioned `fixed` only to hide the opening jump can go back to your library's default for
|
|
3015
|
+
the whole grid.
|
|
3016
|
+
- `Row`'s `opens`: your row says a dialog opens beside it, `aria-haspopup="dialog"` with `aria-expanded` from
|
|
3017
|
+
`open`. The flyout is the components map's `Popover`, a dialog of plain rows, not a menu, and a row that said
|
|
3018
|
+
`menu` had a screen reader announce a menu it never found.
|
|
3019
|
+
- A list's CSV export of a money column writes the figure the column shows, in its reading. A column that binds its own
|
|
3020
|
+
raw read wrote the stored amount before.
|
|
3021
|
+
|
|
3022
|
+
### Added
|
|
3023
|
+
|
|
3024
|
+
- The `confirm` port: an app keeps the plain row menu and asks before a delete in its own dialog. `useViews().ports`
|
|
3025
|
+
always carries one (`ViewsResolvedPorts`), the browser's where the app handed none.
|
|
3026
|
+
- The grid, at `@viewkitjs/views/grid`: `GridTable` with its props, `useGridTablePrefs`, its group and figure types,
|
|
3027
|
+
and the helpers a host's binding shares with it (the commit types, a column's filter values, a cell's copy text and
|
|
3028
|
+
edit baseline, the title link's class).
|
|
3029
|
+
- A column's menu is drawn with the package's own pieces: it opens the components map's `Popover` in the
|
|
3030
|
+
`vk-grid-column-menu` slot, its rows are the `Row` atom, its colours the `Tag` atom, and each knob's choices fly out
|
|
3031
|
+
of a `vk-grid-flyout` popover beside the row, one open at a time, after a short hover or at once on a tap.
|
|
3032
|
+
- The package ships its documentation in `docs/`, starting at `docs/index.md`: getting started, from install to a grid
|
|
3033
|
+
drawn with your own primitives; a guide per concept (the provider, ports, atoms, the display, editors and the edit
|
|
3034
|
+
session, columns, cells, selection and the grid); and a reference per door naming every export. Every example in the
|
|
3035
|
+
docs and the README is compiled and run against the packed package before each release.
|
|
3036
|
+
- The contract states the four shapes of a value (stored, draft, commit, display) per type, what an edit core never
|
|
3037
|
+
does, and how a `command` field is edited by verbs on every surface.
|
|
3038
|
+
- `@viewkitjs/views/grid` exports `GridSortState`, `GridGroupSortOption`, `GridCellCommitFn` and `GridCellsCommitFn`
|
|
3039
|
+
by name, the types an app writes the grid's `sort`, `sortOptions`, `onCellCommit` and `onCellsCommit` against. Before,
|
|
3040
|
+
they were reachable only as `GridTableProps<Row>["sort"]` and the like, which still works.
|
|
3041
|
+
- The grid draws every slot the contract names, so a skin reaches each part through `data-slot`: `vk-grid-header`
|
|
3042
|
+
and `vk-grid-header-cell`, `vk-grid-row` and `vk-grid-cell`, `vk-grid-group` and `vk-grid-group-header`,
|
|
3043
|
+
`vk-grid-footer` and `vk-grid-footer-cell`, `vk-grid-rail`, `vk-grid-tail` (the right tail of the header, each
|
|
3044
|
+
row and the footer: a row's ⋯, the header's + Add column), `vk-grid-editor` (an inline editor, or
|
|
3045
|
+
the popup of an anchored one), `vk-grid-outline` (the focused cell's ring and the range's edges) and
|
|
3046
|
+
`vk-grid-resize-handle`. Before: only the frame, the row's ⋯ and the menus carried one.
|
|
3047
|
+
|
|
3048
|
+
### Changed
|
|
3049
|
+
|
|
3050
|
+
- The peer `@viewkitjs/fields` is `^0.9.0` (was `^0.8.0`): install fields 0.9 beside views 0.2. Under `0.x` a
|
|
3051
|
+
`^0.9.0` peer accepts no 0.10.
|
|
3052
|
+
|
|
3053
|
+
- The grid's layout variables are `--vk-*` names (the contract's Tokens, which now lists `--vk-tail-pl` too): a skin or
|
|
3054
|
+
an app that set a `--grid-*` name, `--grid-tail-pl` included, sets its `--vk-*` name.
|
|
3055
|
+
- The grid's own variables are `--vk-drag-shift` and `--vk-col-w-<id>` (were `--drag-shift` and `--gw-<id>`), which
|
|
3056
|
+
the contract names internal: an app neither sets nor reads them.
|
|
3057
|
+
- The grid counts a press as inside when it lands in the grid's React tree, not by your popover's wrapper: a press
|
|
3058
|
+
inside a popup outside the grid's tree (a toolbar's menu, a select in a window the app opens) now clears the
|
|
3059
|
+
focused cell, and a press on an overlay drawn inside the grid's root (a selection bar and its sheet, a
|
|
3060
|
+
confirmation window) now keeps it.
|
|
3061
|
+
- The grid turns mouse drag-select off itself; it no longer depends on what wraps a row.
|
|
3062
|
+
- `densityStyle` writes `--vk-row-py`, `--vk-head-mb` and `--vk-row-gap` (were `--dt-row-py`, `--dt-head-mb` and
|
|
3063
|
+
`--dt-row-gap`), now the contract's Tokens, with the same values at every density: an app whose rows look read or
|
|
3064
|
+
set an old name reads or sets its `--vk-*` name.
|
|
3065
|
+
- `ListFilterCapability` is `{ mode: "unavailable"; reason: string }`, the one answer `buildColumnFilters` reads. Its
|
|
3066
|
+
`server` and `local` members built a column exactly as no entry: an app that hands `capabilities` to
|
|
3067
|
+
`buildColumnFilters` drops those entries and keeps its unavailable ones.
|
|
3068
|
+
- `formatMoney` moves from the package's root to `@viewkitjs/views/display`, beside `formatNumberValue`, and writes an
|
|
3069
|
+
amount as a money cell does: through the presentation's `number` for the viewer, instead of in the `en-US` locale
|
|
3070
|
+
whatever the viewer's. It takes the options a cell gets (`presentation`, `viewer`) as a fourth argument; with none it
|
|
3071
|
+
reads in the default presentation and the neutral conventions (`en-GB`), so a dollar amount there reads
|
|
3072
|
+
"US$109.00", not "$109.00". To keep your app's look, hand it your presentation and viewer:
|
|
3073
|
+
|
|
3074
|
+
```ts
|
|
3075
|
+
// before
|
|
3076
|
+
import { formatMoney } from "@viewkitjs/views";
|
|
3077
|
+
formatMoney(1234.5, "EUR"); // "€1,234.50", on every page
|
|
3078
|
+
|
|
3079
|
+
// after
|
|
3080
|
+
import { formatMoney } from "@viewkitjs/views/display";
|
|
3081
|
+
formatMoney(1234.5, "EUR", 2, { presentation, viewer }); // "1.234,50 EUR" for a Romanian viewer
|
|
3082
|
+
```
|
|
3083
|
+
- Two doc comments your editor shows on hover say what their code does: `normalizeGroupSummary` returns `[]`, a bare
|
|
3084
|
+
group name, for a value it cannot read, never the default, and `setDurationStyle` always writes the column's entry,
|
|
3085
|
+
never dropping one.
|
|
3086
|
+
- The contract describes `vk-grid-rail` as the checkbox lane: the group caret is drawn in `vk-grid-group-header`.
|
|
3087
|
+
- The grid's doc comments, which your editor shows on hover, say what the code does in the library's own terms: none
|
|
3088
|
+
names a tracker key, a plan or a path in another app any more, and a check in the package holds it.
|
|
3089
|
+
- A paste or a fill of a money cell into a record that holds another currency is refused, with the message
|
|
3090
|
+
`views.grid.paste-other-currency` ("This record is in EUR"); the copied currency is carried only into a record with
|
|
3091
|
+
none of its own. Before, the copied currency was carried over, re-denominating the record. An app that words its own
|
|
3092
|
+
messages adds this one.
|
|
3093
|
+
- `readMoneyColumn` sets the column's `editAccessor` to the row's own amount, in every reading, keeping one the column
|
|
3094
|
+
already has.
|
|
3095
|
+
- A pasted label two options share is refused with the new message `views.grid.paste-ambiguous-option`, instead of
|
|
3096
|
+
landing on one of them; an app that words its own messages adds it.
|
|
3097
|
+
- A paste or a fill that refuses cells says why. One toast per reason it met, with how many cells that reason refused:
|
|
3098
|
+
`views.grid.paste-skipped` and `views.grid.fill-skipped`, each `{ count, reason }` ("2 cells weren't filled: This
|
|
3099
|
+
record is in EUR"), the `reason` one of the paste's own refusals in your words. A paste or a fill of one cell still
|
|
3100
|
+
says the reason alone. Before, any refusal of more than one cell said only `views.grid.paste-failed` ("Failed to
|
|
3101
|
+
paste 2 cells"), a fill included. The cells that fit are written, as before.
|
|
3102
|
+
- `views.grid.paste-failed` is removed. An app that words its own messages replaces it with the two new keys:
|
|
3103
|
+
|
|
3104
|
+
```ts
|
|
3105
|
+
// before
|
|
3106
|
+
case "views.grid.paste-failed":
|
|
3107
|
+
return `${message.values.count} cells could not be pasted`;
|
|
3108
|
+
|
|
3109
|
+
// after
|
|
3110
|
+
case "views.grid.paste-skipped":
|
|
3111
|
+
return `${message.values.count} cells were not pasted: ${message.values.reason}`;
|
|
3112
|
+
case "views.grid.fill-skipped":
|
|
3113
|
+
return `${message.values.count} cells were not filled: ${message.values.reason}`;
|
|
3114
|
+
```
|
|
3115
|
+
|
|
3116
|
+
### Fixed
|
|
3117
|
+
|
|
3118
|
+
- A menu group marked `disabled` disables its rows in every adapter: before, each row followed only its own flag, so a
|
|
3119
|
+
disabled group's rows could still be pressed.
|
|
3120
|
+
- The plain row menu's Delete, confirmed, tells the person when the delete fails: a rejecting `onDelete` calls the
|
|
3121
|
+
toast port's `error` with `views.menus.row-delete-failed`. Before: the rejection went unhandled and the row stayed
|
|
3122
|
+
with no word.
|
|
3123
|
+
- An email, one or several, draws as plain text when the host's own slot owns the click (`slotOwnsClick`), as a
|
|
3124
|
+
link, a domain and a phone already did, so the click reaches the host's row. Without it, each address is still a
|
|
3125
|
+
`mailto:` link.
|
|
3126
|
+
- A percent on Bar keeps a track you can read: the track never narrows below 1.5rem, and the figure's slot is the
|
|
3127
|
+
figure's own width (it counted a whole character each for the point and the sign). A narrow percent column on Bar
|
|
3128
|
+
shows the figure alone. Before: a column too narrow for both crushed a 100% bar to a dot.
|
|
3129
|
+
- A grid copy of a phone, one or several, and a CSV export of its column through `cellCopyText`, write each phone as
|
|
3130
|
+
`phoneText` writes it, in its international form, the main one first. Before: `[object Object]` for each.
|
|
3131
|
+
- Opening an editor leaves the page where it was: the chips, name, number, range, value list and place editors, the
|
|
3132
|
+
place editor's searches and the grid's long-text editor take focus with `preventScroll`. Before: on a popover that
|
|
3133
|
+
places itself after mounting, the page jumped to where the popup sat before it was placed.
|
|
3134
|
+
- A place and a phone drawn with no viewer (`renderFieldValue(field, value)`) take the provider's conventions, as a
|
|
3135
|
+
date, a number, a percent and an amount do: the country is named in the app's language, a phone from the app's
|
|
3136
|
+
region is written nationally, and its extension in the app's words. Before: the country was named in English
|
|
3137
|
+
and the phone written internationally, so the place display and the place editor beside it disagreed.
|
|
3138
|
+
- A percent on Bar never loses its leading digits: a figure wider than its box spills into the cell's padding, and
|
|
3139
|
+
past that it is cut at its end with an ellipsis ("100.…"). At a 60px column and the default density a whole
|
|
3140
|
+
figure fits at 0 decimals; 1 and 2 need a wider column. Before: the figure was cut at its front, and a 100.0 % row read "00.0 %".
|
|
3141
|
+
- A selected range shows the values inside it: its tint drew over every cell's value, the anchor's included, so the
|
|
3142
|
+
cells read as empty while the range was held. The tint now sits under the value; its colour, its boundary, the
|
|
3143
|
+
anchor's ring and the fill dot are unchanged.
|
|
3144
|
+
- Opening the grid's "+ Add column" can no longer scroll the page: its search took focus before a popover that
|
|
3145
|
+
places itself after mounting had moved it to its anchor.
|
|
3146
|
+
- The contract counts eighteen doors, as the package declares, and the usage skill names all of them.
|
|
3147
|
+
- The contract says what the `viewPrefs` port is read for: no view reads it; the grid's preferences come in through
|
|
3148
|
+
`useGridTablePrefs`, from wherever your app keeps them.
|
|
3149
|
+
- The grid's triggers say what they open: the header cell that opens a column's menu and the footer cell that opens
|
|
3150
|
+
its figure picker take `role="button"` and `aria-haspopup="dialog"`, and the group band's ⋯ says `dialog` too.
|
|
3151
|
+
Before, each said `menu` over a popover that is a dialog.
|
|
3152
|
+
- A money column read in another currency now edits the amount each row stores, in the row's own currency: its
|
|
3153
|
+
editor opens on that amount, and undo, cut, Delete, Clear, copy, paste and fill carry it. Before, they carried the
|
|
3154
|
+
converted figure beside the row's own currency, so an undo or a paste could store the converted figure as an amount
|
|
3155
|
+
in the row's currency. The cell, its total, sorting, grouping and filtering still read the converted figure.
|
|
3156
|
+
- Undoing a write into an empty number, percent or money cell empties it again. Before, it wrote 0. A fill from an
|
|
3157
|
+
empty cell no longer writes 0 either: it empties a column that can be emptied, and skips one that can't.
|
|
3158
|
+
- A copy of a number, percent or money cell pasted inside the grid lands as the number it copied, whatever the
|
|
3159
|
+
conventions read a decimal point as.
|
|
3160
|
+
- A select, status or multiselect cell copies as the labels it shows, alone, in a range and in an export, instead of
|
|
3161
|
+
its stored keys. A pasted label lands on its option, from the grid or from a spreadsheet; a pasted key still lands
|
|
3162
|
+
too, an exact match winning over one that differs only in case, and a copy pasted inside the grid lands on the exact
|
|
3163
|
+
option it copied.
|
|
3164
|
+
- With Wrap columns on, the selection rail beside a row that runs to several lines draws its line at the row's bottom
|
|
3165
|
+
and its backing over the whole row, instead of at a one-line row's height. The checkbox stays level with the first
|
|
3166
|
+
line.
|
|
3167
|
+
- A fill of a money, percent or date-and-time cell no longer draws "[object Object]" in the filled cells until its
|
|
3168
|
+
save lands, nor warns "Value was changed elsewhere" when it does. It paints nothing early, as a paste and the editor
|
|
3169
|
+
already did: each filled cell keeps its figure until the save's refetch draws the new one. A fill of a relation, a
|
|
3170
|
+
range or a list of several values does the same. A text, a select or a yes/no fill still shows at once.
|
|
3171
|
+
|
|
3172
|
+
### Removed
|
|
3173
|
+
|
|
3174
|
+
- The filter capability split and its wire format, which nothing sent: `validateFilterCapabilities`,
|
|
3175
|
+
`ListFilterCapabilityError`, `splitFilterRules`, `GridFilterSplit`, `GridPushdownSupport`, `serializeFilters`,
|
|
3176
|
+
`effectiveDecimals`, `gridFilterSupport`, `ListWireRule`, `ListWireRuleState` and `GRID_FILTER_PARAM_MAX_BYTES`. A
|
|
3177
|
+
list filters its rules in the browser, or evaluates its view at its source; the source registry
|
|
3178
|
+
(`defineGridFilters` and its types) and `ListFilterCapability`, which the Filter panel reads, stay.
|
|
3179
|
+
- `auditGridFilters`, a filter registry drift check for the filter split, which nothing called. The source registry
|
|
3180
|
+
(`defineGridFilters` and its types) stays.
|
|
3181
|
+
- `renderAs` on `FilterConfigBase`, which nothing read. `countsAsFilter` stays.
|
|
3182
|
+
- `onListConfigChange` and `listWritable` on `GridTableProps`, which the grid never read. The grid reads `listConfig`
|
|
3183
|
+
only; a settings surface of your own changes it and hands the grid the new value.
|
|
3184
|
+
|
|
3185
|
+
## [0.1.0] — 2026-10-30
|
|
3186
|
+
|
|
3187
|
+
The first publish: the rendering contract, the provider, the atoms, the model, the field display, the editors,
|
|
3188
|
+
cells and selection. The grid's rendering follows in 0.2.0.
|
|
3189
|
+
|
|
3190
|
+
### For an adapter
|
|
3191
|
+
|
|
3192
|
+
Everything an adapter written against the candidate of 27 October 2026 (the first to prove the components map on
|
|
3193
|
+
Base UI) changes or adds for 0.1.0, slot by slot. Each line names the slot, what changed, and what the adapter does.
|
|
3194
|
+
An adapter that hands partial `atoms` and keeps the package's English needs only the components map, the icons and
|
|
3195
|
+
the messages it translates.
|
|
3196
|
+
|
|
3197
|
+
#### The components map (`ViewsComponents`)
|
|
3198
|
+
|
|
3199
|
+
- `Checkbox`: `checked: boolean | "indeterminate"` → `checked: boolean` plus `indeterminate?: boolean`, Base UI's
|
|
3200
|
+
shape. Hand both to your checkbox; a press on a partial box that isn't `checked` hands `true`.
|
|
3201
|
+
- `Menu`: an item's `children` is a group drawn in place under its label, never a flyout. Drop any submenu and the
|
|
3202
|
+
hidden trigger it needed; draw a group label and its rows. A group row is a label: its own `onSelect`, `href` and
|
|
3203
|
+
`checked` are ignored.
|
|
3204
|
+
- `Menu`: a checkable row (`checked` set) closes the menu like any row. A Base UI adapter keeps `closeOnClick` on its
|
|
3205
|
+
checkbox items.
|
|
3206
|
+
- `Popover`: `onOutsidePress`'s `event` is the pointer press, also when the focus it moves would close the popup.
|
|
3207
|
+
An adapter whose popover closes on that focus first keeps the last press and asks the veto with it. Focus leaving
|
|
3208
|
+
by keyboard (a Tab out) closes without asking.
|
|
3209
|
+
- `Popover`: a popup handed `panelData` carrying `data-slot="vk-grid-column-menu"` or `data-slot="vk-grid-flyout"`
|
|
3210
|
+
sets it on the popup element, as for every `panelData`; dress those popups by their slot where your menus read
|
|
3211
|
+
tighter than your card popover. A flyout sits above the menu it opened from, as any later popup does. The grid
|
|
3212
|
+
opens them from 0.2.0.
|
|
3213
|
+
- `Calendar` takes `locale` (required, BCP 47), the conventions' locale. Hand your calendar the matching
|
|
3214
|
+
date-library locale (month and weekday names, the week's first day), or ignore it; a week-start lookup of your own
|
|
3215
|
+
can go.
|
|
3216
|
+
- `ViewsCloseReason` adds `close-press` and `swipe`. Pass your library's through instead of mapping them to `none`.
|
|
3217
|
+
- Stacking: the package's popups carry no `z-90` or `z-95`; your popup layer decides. Drop any containment worked
|
|
3218
|
+
around them.
|
|
3219
|
+
|
|
3220
|
+
#### The atoms (`ViewsAtoms`)
|
|
3221
|
+
|
|
3222
|
+
Two new atoms. An app that hands partial `atoms` needs nothing; one whose atoms object is typed as the whole
|
|
3223
|
+
`ViewsAtoms` adds both entries (or spreads `DEFAULT_VIEWS_ATOMS`).
|
|
3224
|
+
|
|
3225
|
+
- `PlatformMark` (`ViewsPlatformMarkProps`, `{ platform, className }`): a link's platform, drawn before it. The
|
|
3226
|
+
default draws nothing, so a link looks plain. Swap it to draw your own mark by `platform.key` into
|
|
3227
|
+
`data-slot="vk-platform"` (state `data-platform`, the key).
|
|
3228
|
+
- `RowMenu` (`ViewsRowMenuProps`, `ViewsRowMenuItem`): the row's right-click menu. The default runs without a swap:
|
|
3229
|
+
the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`),
|
|
3230
|
+
wrapped in `data-slot="vk-row-menu"`, its Delete asking the browser's own confirm
|
|
3231
|
+
(`views.menus.row-delete-confirm`); a long-press on a phone opens nothing. Swap it whole for your own (a dialog
|
|
3232
|
+
before a delete, a long-press). The grid draws it from 0.2.0.
|
|
3233
|
+
- `Row` and `RowContent` take `detail`, and `Row` takes `opens` and `open`. The default draws all three. A swapped
|
|
3234
|
+
`Row` draws `detail` at its right edge in the subtle colour (a chosen row draws it in the brand colour and no
|
|
3235
|
+
check); `opens` sets `aria-haspopup="menu"` and `aria-expanded` from `open`; `open` draws your pressed ground and
|
|
3236
|
+
sets `data-open` (a new state, beside `data-chosen`, `data-disabled`, `data-muted`, `data-checked`).
|
|
3237
|
+
|
|
3238
|
+
#### The icons (`ViewsIcons`)
|
|
3239
|
+
|
|
3240
|
+
`ViewsIcons` is a full record, so an adapter maps every new name: ten.
|
|
3241
|
+
|
|
3242
|
+
- Field types: `domain`, `name`.
|
|
3243
|
+
- A row's menu: `open` (Open page), `selectRow` (Select or Deselect).
|
|
3244
|
+
- The grid's menus: `moveLeft`, `moveRight`, `group`, `clearSort`, `sortRowsUp`, `sortRowsDown`. `sortRowsUp` and
|
|
3245
|
+
`sortRowsDown` are a menu's verbs, sorting the rows by a column; `sortAsc` and `sortDesc` stay the mark a sorted
|
|
3246
|
+
header wears.
|
|
3247
|
+
|
|
3248
|
+
#### The slots
|
|
3249
|
+
|
|
3250
|
+
- `data-slot="vk-grid-flyout"`: a flyout a menu row opens beside its menu (see `Popover`).
|
|
3251
|
+
- `data-slot="vk-grid-row-more"`: the row's ⋯ itself, which opens the row's menu.
|
|
3252
|
+
- `data-slot="vk-row-menu"` and `data-slot="vk-platform"`: the default `RowMenu` and `PlatformMark`.
|
|
3253
|
+
|
|
3254
|
+
#### The messages (`ViewsMessage`)
|
|
3255
|
+
|
|
3256
|
+
One changed and 118 new, each with its English (`resolveViewsMessage` answers any key a catalog leaves out). A value
|
|
3257
|
+
in `{ }` is interpolated.
|
|
3258
|
+
|
|
3259
|
+
- Changed: `views.display.boolean`'s `values.value` is `"true"` or `"false"` as text, not a boolean, so a catalog's
|
|
3260
|
+
`select` reads it. Drop the conversion in your resolver, and compare `value === "true"`: the text `"false"` is
|
|
3261
|
+
truthy.
|
|
3262
|
+
- The name editor: `views.editors.name-given` "Given name", `views.editors.name-family` "Family name",
|
|
3263
|
+
`views.editors.name-full` "Full name".
|
|
3264
|
+
- The value list editor: `views.editors.values-add` "Add", `views.editors.values-label` "Label",
|
|
3265
|
+
`views.editors.values-main` "Main", `views.editors.values-make-main` `{ value }` "Make {value} the main one",
|
|
3266
|
+
`views.editors.values-remove` `{ value }` "Remove {value}".
|
|
3267
|
+
- The place editor: `views.editors.place-country` "Country", `views.editors.place-country-search` "Search
|
|
3268
|
+
countries", `views.editors.place-change-country` "Change country", `views.editors.place-region-search` "Search",
|
|
3269
|
+
`views.editors.place-line1` "Address line 1", `views.editors.place-line2` "Address line 2",
|
|
3270
|
+
`views.editors.place-region` "Region", `views.editors.place-required` `{ label }` "{label} *"; a country's own
|
|
3271
|
+
words (`placeWordKey(kind, word)`): regions `views.editors.place-region-area` "Area", `-county` "County",
|
|
3272
|
+
`-department` "Department", `-district` "District", `-do-si` "Do/Si", `-emirate` "Emirate", `-island` "Island",
|
|
3273
|
+
`-oblast` "Oblast", `-parish` "Parish", `-prefecture` "Prefecture", `-province` "Province", `-state` "State";
|
|
3274
|
+
cities `views.editors.place-city-city` "City", `-district` "District", `-post-town` "Post town", `-suburb`
|
|
3275
|
+
"Suburb"; postal codes `views.editors.place-postal-eircode` "Eircode", `-pin` "PIN code", `-postal` "Postal
|
|
3276
|
+
code", `-zip` "ZIP code".
|
|
3277
|
+
- A panel's part row: `views.menus.part-row` `{ field, part }` "{field} · {part}".
|
|
3278
|
+
- A phone: `views.display.phone-extension` `{ extension }` "ext. {extension}", `views.display.phone-as-typed` "Not
|
|
3279
|
+
yet in international form".
|
|
3280
|
+
- The grid's 79 (its menus, rows, header, footer, toasts and paste refusals), listed with their English under Added,
|
|
3281
|
+
"The grid's words are message keys", `views.grid.add-column` "Add column" (the header's last cell) among them.
|
|
3282
|
+
The grid draws them from 0.2.0; a catalog that words them now is ready.
|
|
3283
|
+
|
|
3284
|
+
#### The docs
|
|
3285
|
+
|
|
3286
|
+
- `docs/install.md`'s `messages` example scopes the translator to `views` and strips the `views.` prefix;
|
|
3287
|
+
`docs/contract.md` gains "Writing an adapter", for the slots a Base UI adapter fills around its copies.
|
|
3288
|
+
|
|
3289
|
+
### Added
|
|
3290
|
+
|
|
3291
|
+
- `RowMenu`, the row's right-click menu, among the atoms (`ViewsRowMenuProps`, `ViewsRowMenuItem`). Its default
|
|
3292
|
+
draws the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯
|
|
3293
|
+
(`data-slot="vk-grid-row-more"`): Open page, the cell's Copy, Cut, Paste and Clear with their hints, Select or
|
|
3294
|
+
Deselect, the host's verbs, and Delete, which asks the browser's own confirm (`views.menus.row-delete-confirm`)
|
|
3295
|
+
before deleting. A row picked within 300 ms of the opening right-click runs nothing; a long-press on a phone opens
|
|
3296
|
+
nothing. An app with its own row menu swaps it whole. Two icon names, `open` and `selectRow`.
|
|
3297
|
+
- The grid's words are message keys: its menus, rows, header, footer, toasts and paste refusals, the figure names
|
|
3298
|
+
and the refusals the package words, each with its English as before, so an app's `messages` words the whole grid
|
|
3299
|
+
and nothing changes in English. `aggregateLabel(kind, messages?)` names a figure (`LIST_AGGREGATE_LABELS` stays,
|
|
3300
|
+
in English); `gridClearRefusal`, `columnClearRefusal`, `columnEditRefusal` and `gridEditRefusal` take the resolver
|
|
3301
|
+
last, and `gridNormalizeWrite` takes it in its options as `messages`; each defaults to `resolveViewsMessage`. 79
|
|
3302
|
+
new keys, for an app's translator to word, with today's English (a value in `{ }` is interpolated; one listed as
|
|
3303
|
+
choices is text, for a catalog's `select`):
|
|
3304
|
+
- A column's menu: `views.menus.sort-asc` "Sort ascending", `views.menus.sort-desc` "Sort descending",
|
|
3305
|
+
`views.menus.sort-clear` "Clear sort", `views.menus.group-by` `{ field }` "Group by {field}",
|
|
3306
|
+
`views.menus.ungroup` "Ungroup", `views.menus.move-left` "Move left", `views.menus.move-right` "Move right",
|
|
3307
|
+
`views.menus.hide-column` "Hide from view", `views.menus.format` "Format", `views.menus.date-style` `{ style }`
|
|
3308
|
+
(`short` "Short", `long` "Long", `numeric` "Numeric", `relative` "Relative"), `views.menus.show-time` "Show
|
|
3309
|
+
time", `views.menus.duration-style` `{ style }` (`adaptive` "Adaptive", `clock` "Clock", `units` "Units"),
|
|
3310
|
+
`views.menus.decimals` "Decimals", `views.menus.automatic` "Automatic", `views.menus.currency` "Currency",
|
|
3311
|
+
`views.menus.percent-display` "Display", `views.menus.percent-display-option` `{ display }` (`text` "Number",
|
|
3312
|
+
`bar` "Bar", `ring` "Ring"), `views.menus.colour` `{ colour }` (`gray` "Gray", `blue` "Blue", `green` "Green",
|
|
3313
|
+
`amber` "Amber", `red` "Red", `purple` "Purple", `pink` "Pink", `teal` "Teal"), `views.menus.colours-reset`
|
|
3314
|
+
"Reset colors".
|
|
3315
|
+
- A group's menu: `views.menus.group-options` "Group options", `views.menus.group-sort` "Sort rows",
|
|
3316
|
+
`views.menus.search` "Search", `views.menus.group-show` "Show", `views.menus.group-count` "Count",
|
|
3317
|
+
`views.menus.group-hide` "Hide group".
|
|
3318
|
+
- "+ Add column": `views.grid.add-column` "Add column" (the header's last cell), `views.menus.add-column-search`
|
|
3319
|
+
"Search columns…", `views.menus.add-column-no-match` `{ query }` "No column matches “{query}”.",
|
|
3320
|
+
`views.menus.add-column-all-shown` "Every column is shown.".
|
|
3321
|
+
- A row's menu: `views.menus.copy` "Copy", `views.menus.cut` "Cut", `views.menus.paste` "Paste",
|
|
3322
|
+
`views.menus.clear` "Clear", `views.menus.edit` "Edit"; and the plain row menu's, worded now and drawn once it
|
|
3323
|
+
ships: `views.menus.row-open` "Open page", `views.menus.row-select` `{ selected }` (`"false"` "Select", `"true"`
|
|
3324
|
+
"Deselect"), `views.menus.row-delete` "Delete", `views.menus.row-delete-confirm` "Delete this row?".
|
|
3325
|
+
- The footer: `views.grid.figure` `{ kind }` (`none` "None", `sum` "Sum", `avg` "Avg", `min` "Min", `max` "Max",
|
|
3326
|
+
`count` "Count", `filled` "Filled", `unique` "Unique", `ratio` "Ratio"), `views.grid.figure-pick` "Calculate".
|
|
3327
|
+
- The body and header: `views.grid.loading` "Loading rows", `views.grid.select-row` "Select row",
|
|
3328
|
+
`views.grid.select-group` "Select group", `views.grid.select-all` "Select all", `views.grid.row-menu` "Row
|
|
3329
|
+
menu", `views.grid.group-expand` "Expand group", `views.grid.group-collapse` "Collapse group",
|
|
3330
|
+
`views.grid.change-value` "Change value", `views.grid.value` "Value", `views.grid.edit-value` "Edit value",
|
|
3331
|
+
`views.grid.read-only` "Read-only", `views.grid.read-only-why` "Locked by workspace settings — this list is
|
|
3332
|
+
read-only for everyone".
|
|
3333
|
+
- Refusals: `views.grid.locked` `{ field }` "{field} is locked by workspace settings", `views.grid.not-clearable`
|
|
3334
|
+
"This field can't be emptied", `views.grid.computed` `{ from }` "Computed from {from}",
|
|
3335
|
+
`views.grid.cell-read-only` "Cell is read-only", `views.grid.clear-none` "Nothing in this selection can be
|
|
3336
|
+
emptied — the fields are required", `views.grid.write-not-list` "Not a list of values",
|
|
3337
|
+
`views.grid.write-not-boolean` "Not a yes/no value", `views.grid.write-marker` "This marker can only be cleared
|
|
3338
|
+
here", `views.grid.write-not-email` "Not an email address", `views.grid.write-not-url` "Not a web address —
|
|
3339
|
+
include http:// or https://", `views.grid.write-not-link` "Not a link", `views.grid.write-not-linkable` "Not one
|
|
3340
|
+
of the linkable records".
|
|
3341
|
+
- A paste: `views.grid.paste-refused` "Can't paste into this column", `views.grid.paste-empty` "Nothing to paste",
|
|
3342
|
+
`views.grid.paste-not-number` "Not a number", `views.grid.paste-not-duration` "Not a duration — try 90s or 2m
|
|
3343
|
+
30s", `views.grid.paste-not-date` "Not a date", `views.grid.paste-not-option` `{ value }` "“{value}” is not an
|
|
3344
|
+
option here", `views.grid.paste-pick` `{ value }` "“{value}” can't be pasted here — pick it from the list",
|
|
3345
|
+
`views.grid.paste-not-linkable` `{ value }` "“{value}” is not linkable here", `views.grid.paste-not-range` "Not
|
|
3346
|
+
a range — try 11–50, 200+ or up to 50", `views.grid.paste-failed` `{ count }` "Failed to paste {count} cell" (one)
|
|
3347
|
+
or "… cells" (more).
|
|
3348
|
+
- Warnings: `views.grid.changed-elsewhere` `{ field }` "{field} was changed elsewhere",
|
|
3349
|
+
`views.grid.changed-elsewhere-cells` `{ count }` "{count} cells were changed elsewhere", `views.grid.saved-value`
|
|
3350
|
+
"Showing the saved value.", `views.grid.saved-values` "Showing the saved values.", `views.grid.row-left` "Failed
|
|
3351
|
+
to save the change: the row left the list while you were editing".
|
|
3352
|
+
- `ListColumnsConfig` and `ListColumnItem`: a view's columns with what may be done to them (shown or hidden,
|
|
3353
|
+
reordered, reset), the list a grid's "+ Add column" offers. A host's own richer column config may extend it.
|
|
3354
|
+
- Several emails, phones, links or domains draw as their main value and a count ("ana@acme.ro +1"), each value's
|
|
3355
|
+
label beside it behind the count; a phone the way its country writes it. A plain list draws as items, the first
|
|
3356
|
+
main. `MultiValueCell` takes `details`, one word per value drawn in its popover.
|
|
3357
|
+
- `@viewkitjs/views/editors/value-list`: `ValueListEditor` and `ValueListEditorHandle`. A row per value, with its
|
|
3358
|
+
label, a main mark and a remove, and an Add row; each value is read by its type's own commit rule (a phone in the
|
|
3359
|
+
host's `region`, else the conventions'), its reason said under the row. It commits the whole list once, the main
|
|
3360
|
+
one first, as `{ value, label, main }` items; Escape discards and an untouched close writes nothing. Tab walks
|
|
3361
|
+
each row's main mark, value, label and remove, then Add, and Enter or Space presses a mark or a remove. Five words:
|
|
3362
|
+
`views.editors.values-add`, `views.editors.values-label`, `views.editors.values-main`,
|
|
3363
|
+
`views.editors.values-make-main` and `views.editors.values-remove`.
|
|
3364
|
+
- A column of several values mounts it: `GridEditorId` gains `values`, and `gridEditorKind` answers it for a
|
|
3365
|
+
`multiple` email, phone, url or domain column. `gridPasteKind(col)`: a `multiple` column pastes as a list (outside
|
|
3366
|
+
text splits on commas, a link's or a domain's only on a line break or a comma and a space so an address keeps its
|
|
3367
|
+
own commas, each value read by the field), every other column as its type says. `FieldBinding.labels`
|
|
3368
|
+
(`false`): a row that keeps only the values offers no label box; `columnFrom` copies it to `ListColumn.labels`, and
|
|
3369
|
+
`checkBinding` refuses it on a field holding one value.
|
|
3370
|
+
|
|
3371
|
+
- `@viewkitjs/views/editors/location`: `LocationEditor` asks for the country first, then shows only that country's
|
|
3372
|
+
parts in its own order, with its own words (County, State, ZIP code) and the parts it asks for marked, never
|
|
3373
|
+
refused. Where the country has a region list, a picked region stores its name and its ISO 3166-2 code; the list
|
|
3374
|
+
loads when the editor lands on that country (`loadRegions`, `@viewkitjs/fields/places`). A field limited to some
|
|
3375
|
+
parts edits only those, and never loses one its country's format has no place for. Picking another country clears
|
|
3376
|
+
the region and its code. `EDIT_CORES.location` is it. 27 new `views.editors.place-*` message keys, and
|
|
3377
|
+
`placeWordKey(kind, word)` for the word a country's format names (`docs/contract.md`). A place's whole value
|
|
3378
|
+
(`wrap: "full"`) is written in its country's order.
|
|
3379
|
+
- A domain (`@viewkitjs/fields`' `domain` type) draws as a link to `https://` it, labelled as it is kept, with no
|
|
3380
|
+
platform mark; it edits, filters and pastes as text, and a grid write is cleaned by the field's commit. A new icon
|
|
3381
|
+
name, `domain`: an app's icons map adds its glyph.
|
|
3382
|
+
- A url draws its platform before the link (`linkPlatform`, read with the provider's conventions, so an app's own
|
|
3383
|
+
platforms show too) through a new atom, `PlatformMark` (`ViewsPlatformMarkProps`, `{ platform, className }`).
|
|
3384
|
+
Its default draws nothing (see Changed). The package ships no brand art, so an app swaps in its own marks by
|
|
3385
|
+
the platform's key, drawn into `data-slot="vk-platform"`. An app whose atoms map is typed as the whole `ViewsAtoms` adds the entry
|
|
3386
|
+
(`DEFAULT_VIEWS_ATOMS.PlatformMark` keeps the default). A url drawn outside a provider draws its link with no
|
|
3387
|
+
mark.
|
|
3388
|
+
- A name draws its full name, else its given and family names, else the host's words for an empty one:
|
|
3389
|
+
`DisplayOptions.nameFallback`, or a column's `nameFallback(row)`; it may be a record's title.
|
|
3390
|
+
`@viewkitjs/views/editors/name`: `NameEditor`, three boxes, given, family and full; once a part is edited the full
|
|
3391
|
+
box follows the parts until a person types in it, and an editor closed untouched writes nothing. A name column
|
|
3392
|
+
edits in the `name` editor (`GridEditorId`), filters as text across its parts, pastes a text as its full name,
|
|
3393
|
+
and totals by its text. The Filter panel keeps a rule on one part of a value when it edits the column's own rule.
|
|
3394
|
+
- A Related records row's far relation, user or actor offers its far records by name: its target says
|
|
3395
|
+
which far fields its host names (`RelationFilterTarget.named`), and `buildRelationFilters` takes `farValues`, the
|
|
3396
|
+
host's values keyed by path (`farPathOf(relationKey, farKey)`, joined by `FAR_PATH_SEPARATOR`), asked when the row
|
|
3397
|
+
opens. `useOpenValuesContext()` reads the nearest `OpenValuesProvider` whole. Without either, the row stays greyed.
|
|
3398
|
+
- An engine run's actor wears the automation glyph.
|
|
3399
|
+
- A place is a column: `columnFrom` makes one, read-only, with no sort, no group, no card zone and no paste, listed
|
|
3400
|
+
in Filter but inert (it refused one, "location has no generic grid cell"). `renderLocation` draws a place's city
|
|
3401
|
+
and country (`locationShort`), and the whole place on one line when the host asks for the whole value
|
|
3402
|
+
(`wrap: "full"`, `locationText`); the country is named in the viewer's language. A footer's Filled and Unique read
|
|
3403
|
+
a place by its whole text.
|
|
3404
|
+
- `@viewkitjs/views/editors/open-values`: `OpenValuesProvider`, `useOpenValues(field)` and `offeredValues`. An app
|
|
3405
|
+
hands an open field's values (what its records hold) to every editor of it; the hook asks for a field's values once
|
|
3406
|
+
when its editor mounts, and reads none for a closed field or with no provider.
|
|
3407
|
+
- `ChipsEditor`'s Add row comes after the matches, Enter picks the first match, the list loops, and a typed value
|
|
3408
|
+
differing only in case from an offered one is that one, as `SelectEditor`'s creatable panel does.
|
|
3409
|
+
- `bindFields` binds a worked-out name that names its rename (`defineFields({ rename })`) as the field it renames:
|
|
3410
|
+
the name's own read shows it, the stored field's edit read opens its editor and the stored field's write saves it,
|
|
3411
|
+
so a list's cell and a drawer's row rename the record through one declaration. While the stored field is empty the
|
|
3412
|
+
editor opens on the name shown, and that name handed back unchanged reaches the stored field's write as its own
|
|
3413
|
+
empty value. The name's own spec may not bind an edit read.
|
|
3414
|
+
- `renderSelect` draws an open select's value as its own label. `SelectEditor` takes `creatable`: a search, and a
|
|
3415
|
+
row after the matches that uses the typed text (`editor.use-value`) when no option's value is it, ignoring case.
|
|
3416
|
+
Enter picks the first match; the list loops, so ArrowUp from it reaches the row.
|
|
3417
|
+
- The command root takes `loop`: the arrows wrap from the last item to the first and back.
|
|
3418
|
+
- `FilterConfigBase.onOpen`: a Filter row's detail opened, so a host may ask for what it offers.
|
|
3419
|
+
`buildColumnFilters` takes `knownValues` and `onValuesWanted`: an open select or multiselect column offers the
|
|
3420
|
+
values its host knows first, then those on screen, and its row's `onOpen` asks for them.
|
|
3421
|
+
- The actor display: a chip with a member's avatar, or the glyph for an automation (`automation`), an
|
|
3422
|
+
API key (`apiKey`) or the system (`system`). `ICON_NAMES` gains seven: those three and a glyph per
|
|
3423
|
+
new type (`actor`, `rich_text`, `range`, `lookup`); an app's `ViewsIcons` is a full record and adds
|
|
3424
|
+
all seven.
|
|
3425
|
+
- Rich text: one line in a cell, the plain lines when wrapped, and the app's renderer in a drawer,
|
|
3426
|
+
folded past 160px with Show more. A new component, `Markdown` (the app's markdown renderer), and two
|
|
3427
|
+
messages, `views.display.show-more` and `views.display.show-less`.
|
|
3428
|
+
- Range: drawn as "11–50" with its unit and period; a two-box editor (`@viewkitjs/views/editors/range`,
|
|
3429
|
+
a new subpath, its boxes worded by `views.editors.range-low` and `views.editors.range-high`, a `seed`
|
|
3430
|
+
for type-to-replace); a range
|
|
3431
|
+
filter (`FilterConfigRange`, `isRangeFilter`) with presets as quick picks. `GridEditorId`,
|
|
3432
|
+
`ListFilterEditor` and `GridPasteKind` gain `range`: a paste reads "11–50", "200+" or "up to 50".
|
|
3433
|
+
- Lookup: drawn as its far field (`presentedDef`); no editor.
|
|
3434
|
+
- A many relation draws its lead link first. `RelationCandidate.kind`: what a pick on a list of several
|
|
3435
|
+
kinds stores. `checkBinding` refuses a writable binding of a relation that stores refs: the relation
|
|
3436
|
+
editors commit a bare id.
|
|
3437
|
+
- A breakdown: a segmented bar per option or a sparkline per time bucket, with its headline. A footer
|
|
3438
|
+
totals the headline.
|
|
3439
|
+
- A number's or percent's `format.bands` tint its figure with the status colours (`--vk-success`,
|
|
3440
|
+
`--vk-warning`, `--vk-danger`); a band wins over the sign.
|
|
3441
|
+
- An option's icon draws in its badge, its tag and the picker; `ViewsTagProps.leading`;
|
|
3442
|
+
`PickerOption.icon`.
|
|
3443
|
+
- A title whose identity is a figure or a moment draws through its field; `renderIdentityValue` on
|
|
3444
|
+
`/cells`.
|
|
3445
|
+
- Two atoms for the waits: `Loading` (the list reloading, or more rows arriving) and `LoadMore` (how a
|
|
3446
|
+
list asks for its next page), each with a plain default an app swaps.
|
|
3447
|
+
- `--vk-gutter` (`VK_OPTIONAL_LAYOUT`): the page's side padding, which the grid's rows line up with;
|
|
3448
|
+
optional, `0px` without it.
|
|
3449
|
+
- The components map grows by three optional props: the popover's `style`, the collapse's
|
|
3450
|
+
`clipClassName` and the checkbox's `partialTone`. The toast port gains `warning`, and the icons gain
|
|
3451
|
+
`caretRight`.
|
|
3452
|
+
- An adapter that hands a full toast port adds `toast.warning`; one that builds a full `ViewsAtoms`
|
|
3453
|
+
object adds `Loading` and `LoadMore` (or spreads `DEFAULT_VIEWS_ATOMS`). Atoms passed to the provider
|
|
3454
|
+
as a partial override need nothing. The components map requires `Markdown` (the app's markdown
|
|
3455
|
+
renderer), and the icons the seven new names.
|
|
3456
|
+
- `@viewkitjs/views/cells`, moved from the portal: the typed cell (`renderTypedCellValue`), whose
|
|
3457
|
+
command menu and relation destination are the app's atoms, and the column-shaped string formatters,
|
|
3458
|
+
which take their viewer from the caller (`useCellFormat` reads the provider's).
|
|
3459
|
+
- `@viewkitjs/views/selection`, moved from the portal: `useListSelection` (its haptics through the
|
|
3460
|
+
provider's port), the row checkbox (the components map's), drag-select and the row-click rules.
|
|
3461
|
+
- The app's own pieces are atoms too: `CommandMenu` (a command cell's verb menu; the default is the
|
|
3462
|
+
components map's `Menu`) and `RelationLink` (where a relation chip goes; the default goes nowhere).
|
|
3463
|
+
The checkbox's `onCheckedChange` hands `{ event }` as its second argument.
|
|
3464
|
+
- `@viewkitjs/views/editors/session` (`useAnchoredEditSession`, `EDITOR_EXIT_MS`), and the host's
|
|
3465
|
+
verb-menu types (`FieldMenus`, `FieldRowMenuItem`) at the root door, moved from the portal.
|
|
3466
|
+
- `AppIcon` joins the components map: the app's icon component by the app's own names.
|
|
3467
|
+
- `ViewsPopoverProps` gains `alignOffset`, `initialFocus`, `onOutsidePress` and `onEscape`; `ViewsMenuItem` gains `shortcut` and `href`.
|
|
3468
|
+
- The components map grows for the editors: the popover's `chrome` (`panel` or `menu`), `onPanelClick` and `panelData`; the command root's `shouldFilter` and `filter`, its input's `ref`, `onKeyDown` and `chrome` (`search` or `bare`), a class on its empty state and groups; the calendar's controlled `month`, `captionLayout` and `startMonth`/`endMonth`; the tooltip's `align` and class. Every addition is optional.
|
|
3469
|
+
- The atoms: `Row`, `RowContent`, `TickBox`, `StatusBadge`, `StatusMarker` and `Tag`, each a default
|
|
3470
|
+
drawn from the app's theme (`DEFAULT_VIEWS_ATOMS`), swapped one at a time through the provider's
|
|
3471
|
+
`atoms`. The contract names them, their slots and states, and the optional tokens the defaults read.
|
|
3472
|
+
- The package's own messages: a closed list (`VIEWS_MESSAGE_KEYS`), the English resolver
|
|
3473
|
+
`resolveViewsMessage`, and the provider's `messages`.
|
|
3474
|
+
- The `List` atom (the inset a run of rows sits in), and a row's `size` (`compact` or `regular`) and
|
|
3475
|
+
`wrap`. A command item takes `chosen`. The display's words are message keys under
|
|
3476
|
+
`views.display.*`, and the rendering reads two more optional tokens, `--description-foreground`
|
|
3477
|
+
and `--input-placeholder`.
|
|
3478
|
+
- `@viewkitjs/views/display`: the field display, moved from the portal — `renderFieldValue` and one
|
|
3479
|
+
renderer per storage type, drawn through the atoms, the components map and the icons; the string
|
|
3480
|
+
formatters; `viewerFrom`. The provider takes an optional `presentation`, a function of the
|
|
3481
|
+
package's defaults (so the app's provider imports none of the display). The display's words are
|
|
3482
|
+
`views.display.*` keys, a span behind now is fields' `time.ago`, and nothing reads the runtime's
|
|
3483
|
+
locale or zone.
|
|
3484
|
+
- The field editors, moved from the portal: `@viewkitjs/views/editors` (`EDIT_CORES`, `hasEditCore`)
|
|
3485
|
+
and one door per editor — `/editors/select`, `/relation`, `/number`, `/date`, `/chips` — drawn
|
|
3486
|
+
through the components map (the command list, the popover, the calendar), the atoms and the icons.
|
|
3487
|
+
An editor's words default to the provider's conventions.
|
|
3488
|
+
- The rest intent on `/selection`: `useRestIntent(onRest, accepts?)` runs `onRest` once a mouse has
|
|
3489
|
+
rested on a row's openable part for `REST_INTENT_MS` (100 ms), so a record's read starts before the
|
|
3490
|
+
click. Once per visit; nothing when the pointer moves off first, with a button held, or for a finger.
|
|
3491
|
+
- A list's panels can offer one part of a value as a row of its own, off by default: `parts: true` on
|
|
3492
|
+
`buildColumnFilters`, `rootRulesByColumn`, `withRootRuleState` (new: the tree with its root rules replaced by the
|
|
3493
|
+
panel's state, every rule no row can name kept), `sortableColumns` and the new `groupableOrders`. Filter rows
|
|
3494
|
+
"Location · Country", "Location · Region", "Location · City" and "Location · Postal code" take a place's inert row;
|
|
3495
|
+
"Name · Given name" and "Name · Family name" follow the name's own. The country row lists the host's codes under its
|
|
3496
|
+
key, else every country by name (`conventions.locale`). Sort options "Location · City / Region / Country" and "Name ·
|
|
3497
|
+
Family name / Given name", and Group dimensions "Location · City / Region / Country", carry `by`
|
|
3498
|
+
(`SortableEntry`, `GroupableEntry`). A part row's key is `partKey(columnId, part)` (a sort's or group's,
|
|
3499
|
+
`partKey(fieldKey, by)`; `parsePartKey`, `PART_KEY_SEPARATOR`), and `withRootRule` takes a part. Which parts get a
|
|
3500
|
+
row: `FILTER_PART_ROWS`, `SORT_PART_ROWS`, `GROUP_PART_ROWS`; their words: `partWord`, `partLabel`, and the keys
|
|
3501
|
+
`views.editors.place-country`, `views.editors.place-region`, `views.editors.place-city-city`,
|
|
3502
|
+
`views.editors.place-postal-postal` and `views.menus.part-row`. `rowMatchesRules` filters by a part in memory; a
|
|
3503
|
+
part rule never pushes down.
|
|
3504
|
+
- The `Row` atom takes `detail` (what it says at its right edge: a setting's current choice or a live sample),
|
|
3505
|
+
`opens` (it opens a flyout) and `open` (that flyout is up; the state `data-open`). The icon list gains six glyphs
|
|
3506
|
+
for the grid's menus: `moveLeft`, `moveRight`, `group`, `clearSort`, `sortRowsUp` and `sortRowsDown` (a menu's
|
|
3507
|
+
verbs; `sortAsc` and `sortDesc` stay the mark a sorted header wears). The grid slots gain `vk-grid-flyout`.
|
|
3508
|
+
|
|
3509
|
+
### Changed
|
|
3510
|
+
|
|
3511
|
+
- The default `PlatformMark` draws nothing, so a url looks as a plain link. An app that wants marks swaps in an
|
|
3512
|
+
icon per platform key; the platform is still read for filters.
|
|
3513
|
+
- A `multiple` column mounts the value list editor and takes a paste and a cleared write, where it mounted no editor.
|
|
3514
|
+
- Several values are items, `{ value, label, main }` (fields' Changed). An email list draws its values, the
|
|
3515
|
+
main one first; a column's text filter holds when some value matches and a negative one when none does; `columnFrom`
|
|
3516
|
+
marks a multiple phone, url or domain `multiple` too, so no single-value editor mounts over a list.
|
|
3517
|
+
- `toListFilterRule` maps a rule on one part of a value only when asked (`{ parts: true }`); without it, such a rule
|
|
3518
|
+
has no editor. A url's platform rule used to open the whole url's text box, which reads the address, not the
|
|
3519
|
+
platform.
|
|
3520
|
+
- A phone is its international form, `{ number, extension }` (fields' Changed). It is drawn the way its country writes
|
|
3521
|
+
it: `0722 123 456` for a viewer whose conventions name RO (by calling code), `+40 722 123 456` elsewhere, its
|
|
3522
|
+
extension after it (`views.display.phone-extension`), dialled by its RFC 3966 link; a phone stored as text is drawn
|
|
3523
|
+
as before and flagged (`data-as-typed`, `views.display.phone-as-typed`). A column filter and the footer read it by
|
|
3524
|
+
its number. `gridNormalizeWrite` takes the record's country (`{ region }`), and `FieldViewerContext` carries
|
|
3525
|
+
`region`. The display imports `@viewkitjs/fields/phone`.
|
|
3526
|
+
- A group header can show every figure, not one: `ListGroupSummaryPart` was `"count" | "total"`, and now also takes
|
|
3527
|
+
`total:<columnId>`. `"total"` stays the list's first figure and each later one is `total:<columnId>`, so a stored
|
|
3528
|
+
`["count", "total"]` reads as before. `groupFigurePart(columnId, first)` names a figure's part, `isGroupSummaryPart`
|
|
3529
|
+
checks a stored one, and `normalizeGroupSummary` keeps every part it accepts.
|
|
3530
|
+
- `renderUrl` links a web address stored without a scheme to `https://` plus it, so a bare host opens the site
|
|
3531
|
+
instead of a path on the app, and draws a value of any scheme but http, https and ftp as plain text, no link.
|
|
3532
|
+
`webHref` (`@viewkitjs/views/display`) says where a web address goes, or null when it is no link, for an app's own
|
|
3533
|
+
links.
|
|
3534
|
+
- `sortDirFor` opens a date that looks ahead (`looksAhead`) soonest first.
|
|
3535
|
+
- The rendering paints its colours through its own names, `VK_COLOURS` (twenty) and
|
|
3536
|
+
`VK_OPTIONAL_COLOURS` (the status and category hues), which the app declares once
|
|
3537
|
+
(`docs/install.md`); it names no app variable. `APP_TOKENS` and `APP_OPTIONAL_TOKENS` are removed.
|
|
3538
|
+
- The provider's `translate` is replaced by `messages`, a resolver in `@viewkitjs/fields`' shape;
|
|
3539
|
+
`ViewsTranslate` is removed and `ViewsMessage` is a closed union.
|
|
3540
|
+
- A row in the default tone takes its colour from what it sits in; a node label (a badge) is laid out
|
|
3541
|
+
in a row instead of truncated; a muted button row brightens on hover; `aria-selected` rides only
|
|
3542
|
+
with a stated role.
|
|
3543
|
+
- `withRootRule` leaves a relation rule alone: setting or clearing a column's own filter keeps a
|
|
3544
|
+
relation rule that names the same field key, since it asks about the far records, not the column's value.
|
|
3545
|
+
- The peer `@viewkitjs/fields` is `^0.8.0`: the display, the editors and the model read what fields
|
|
3546
|
+
0.6.0 to 0.8.0 ship (the name, the full address and its formats, phones, several values, a link's
|
|
3547
|
+
platform, the domain, `looksAhead`, the list writers for places and names, a commit's `stored`), beside the
|
|
3548
|
+
vocabulary they already drew (actor, rich text, range, lookup, relation rules, open selects, `BoardLaneSpec`).
|
|
3549
|
+
Under `0.x` a `^0.8.0` peer accepts no 0.9.
|
|
3550
|
+
- An edit of several phones keeps an untouched phone kept as typed. `prepareFieldWrite` hands fields' two gates a
|
|
3551
|
+
phone binding's stored value as `stored`, so a phone that comes back as it is stored is kept exactly as stored,
|
|
3552
|
+
never read again; `prepareFieldRestore` keeps a restored snapshot's phones the same way, since it was stored once;
|
|
3553
|
+
`gridNormalizeWrite` takes `stored` from its caller (`{ stored }`, the cell's value before the edit) and hands it
|
|
3554
|
+
on.
|
|
3555
|
+
- `columnFrom` marks a column `editable` only when its type has an editor, or is a boolean: a place whose
|
|
3556
|
+
field may be edited is no longer `editable`, as no editor opens on one.
|
|
3557
|
+
|
|
3558
|
+
### Fixed
|
|
3559
|
+
|
|
3560
|
+
- A place or a name reached through a many relation (a list of them) draws every value through the several-values
|
|
3561
|
+
layout: the first, then "+N", the rest in its popover and all of them on the hover, each place in short (whole
|
|
3562
|
+
under `wrap: "full"`) and each name as written. A footer counts the list filled by one written value and unique as
|
|
3563
|
+
the set of them. Before: the cell drew nothing and the footer left the row out.
|
|
3564
|
+
- A `command` cell of an email, a phone or a domain, one or several, keeps its value a link and puts the verbs on
|
|
3565
|
+
the chevron beside it, as a relation, a member and a url already did. Before: the link sat inside the trigger's
|
|
3566
|
+
button, and a click on the address followed it instead of opening the verbs.
|
|
3567
|
+
|
|
3568
|
+
## [0.0.1] — unpublished
|
|
3569
|
+
|
|
3570
|
+
The version the workspace link carries; never on npm. The package check requires every packed
|
|
3571
|
+
version to have its heading, and this is it.
|
|
3572
|
+
|
|
3573
|
+
### Added
|
|
3574
|
+
|
|
3575
|
+
- The package exists: `@viewkitjs/views`, beside `@viewkitjs/fields` under the one scope. Nothing is
|
|
3576
|
+
published yet; the portal consumes it through the workspace link.
|
|
3577
|
+
- The rendering contract as the root door: the `vk` prefix, carried by the CSS variables and by the
|
|
3578
|
+
grid's slot values (`vk-grid-row`) because both share a global namespace; the grid's states as
|
|
3579
|
+
bare `data-*` attributes; the tokens the package owns and the app tokens it reads, the components
|
|
3580
|
+
map, the ports, the icon names and the message-key namespaces (`views.*`) — `docs/contract.md`
|
|
3581
|
+
and `src/contract.ts`, pinned to each other.
|
|
3582
|
+
- The React door: `ViewsProvider`, `useViews`, `NOOP_PORTS`, and the types every adapter implements.
|