viewkitjs 0.0.0-stage → 0.19.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 +53 -0
- package/LICENSE.md +7 -0
- package/README.md +36 -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 +84 -0
- package/fields/dist/derived.js +126 -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 +138 -0
- package/fields/dist/query/filter.js +475 -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 +94 -0
- package/fields/dist/query/settings.js +195 -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 +114 -0
- package/fields/dist/registry.js +864 -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 +517 -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 +295 -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 +261 -3
- package/postgres/CHANGELOG.md +676 -0
- package/postgres/README.md +35 -0
- package/postgres/dist/access.d.ts +131 -0
- package/postgres/dist/access.js +168 -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 +64 -0
- package/postgres/dist/check.d.ts +53 -0
- package/postgres/dist/check.js +326 -0
- package/postgres/dist/counts.d.ts +44 -0
- package/postgres/dist/counts.js +96 -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 +174 -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 +209 -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 +88 -0
- package/postgres/dist/definitions/money.d.ts +29 -0
- package/postgres/dist/definitions/money.js +80 -0
- package/postgres/dist/definitions/place.d.ts +50 -0
- package/postgres/dist/definitions/place.js +38 -0
- package/postgres/dist/definitions/relations.d.ts +9 -0
- package/postgres/dist/definitions/relations.js +48 -0
- package/postgres/dist/definitions/rollup.d.ts +17 -0
- package/postgres/dist/definitions/rollup.js +343 -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 +75 -0
- package/postgres/dist/figures.d.ts +37 -0
- package/postgres/dist/figures.js +88 -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 +85 -0
- package/postgres/dist/groups.js +189 -0
- package/postgres/dist/ids.d.ts +8 -0
- package/postgres/dist/ids.js +16 -0
- package/postgres/dist/index.d.ts +21 -0
- package/postgres/dist/index.js +20 -0
- package/postgres/dist/kept.d.ts +36 -0
- package/postgres/dist/kept.js +43 -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 +69 -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/records.d.ts +24 -0
- package/postgres/dist/records.js +183 -0
- package/postgres/dist/refusals.d.ts +38 -0
- package/postgres/dist/refusals.js +46 -0
- package/postgres/dist/relations.d.ts +23 -0
- package/postgres/dist/relations.js +71 -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 +189 -0
- package/postgres/dist/search.d.ts +56 -0
- package/postgres/dist/search.js +152 -0
- package/postgres/dist/several.d.ts +49 -0
- package/postgres/dist/several.js +174 -0
- package/postgres/dist/sort.d.ts +104 -0
- package/postgres/dist/sort.js +368 -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 +160 -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 +705 -0
- package/postgres/docs/guides/test-kit.md +110 -0
- package/postgres/docs/index.md +11 -0
- package/postgres/docs/reference/definitions.md +41 -0
- package/postgres/docs/reference/postgres.md +108 -0
- package/views/CHANGELOG.md +3582 -0
- package/views/README.md +104 -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/docs/contract.md +1181 -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 +74 -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,28 @@
|
|
|
1
|
+
# `viewkitjs/views/cells`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/cells` to draw a column's cell: a column, its row and the reader's overrides, handed to the field display, and the string formatters that take a column rather than a field. The door carries no client directive; each file behind it that renders or reads the provider carries its own. A column's glyph stays your app's, and so do the `CommandMenu` a command cell opens and the `RelationLink` a relation chip goes through (the provider's atoms).
|
|
4
|
+
|
|
5
|
+
## Drawing a cell
|
|
6
|
+
|
|
7
|
+
Guide: [cells](../guides/cells.md).
|
|
8
|
+
|
|
9
|
+
- `renderTypedCellValue` — draws one typed cell: takes a column (`ListColumn`), its row and optional `GridCellOptions`. The value is `valueOverride` when it is defined, else the column's accessor. An empty value draws `null` (a boolean draws its off state; a name draws the column's `nameFallback` words), and so does a column with no type. A `title` column draws the list's title cell, the hotspot that opens the row, with the column's `indicator` beside the name. Any other column hands its `field`, or one `legacyFieldFromColumn` builds, to `renderFieldValue`. A `command` column handed `commandItems` opens your `CommandMenu` atom: one trigger around the value, or a chevron beside a relation, user, link, email, phone or domain, which stay their own control. A relation chip goes where `onOpenRelation` says, else where your `RelationLink` atom says, and is inert under `slotOwnsClick`.
|
|
10
|
+
- `renderIdentityValue` — draws an identity's value without the title cell, for a host that draws the name in its own chrome. A number, percent, currency, date, datetime or name draws through its field; anything else as its text. It returns `null` for an empty value unless the column gives the row a name fallback.
|
|
11
|
+
- `GridCellOptions` — what a surface tells a cell, all optional.
|
|
12
|
+
- The formatting: `presentation` and `viewer`.
|
|
13
|
+
- The reader's overrides: `optionColors`, `dateStyle`, `durationStyle`, `decimals`, `withTime`, `percentDisplay` and `wrap` (text wraps instead of truncating).
|
|
14
|
+
- The row's answers: `currency` (the code a value is in when the caller knows it and the column does not), `valueOverride` (a pending value, which wins over the accessor; only typed cells honour it) and `markerReason`.
|
|
15
|
+
- The verbs: `onResolve` (clears a marker), `onToggle` (flips a checkbox or icon boolean; its presence makes it clickable), `booleanCheckbox` (a checkbox control the checkbox style draws in place of the tick box and its switch; the grid hands the components map's `Checkbox` while the provider's `gridCheckboxes` is `checkbox`, and a field row while `fieldRowCheckboxes` is), `commandItems` (a command column's verbs for this row; without them the cell is a read-only badge) and `onOpenRelation` (opens the record a chip points at, handed the clicked value, for a list whose relations go somewhere your app-wide answer cannot know).
|
|
16
|
+
- The host's: `entityIcon` (your glyph for an entity kind) and `slotOwnsClick` (a host whose own element is the button: every cell draws bare content) and `hostOwnsPlainClick` (a host whose plain click on a value is its own: links stay links, marked `data-cell-link`, and let the click through).
|
|
17
|
+
|
|
18
|
+
## Column-shaped text
|
|
19
|
+
|
|
20
|
+
- `formatDate` — a date column's value as text: takes the value, the column, a date style override, a show-time override and the viewer. The overrides win over the column's `format`. A date column, or a derived field whose result is a day, reads as a calendar day; anything else as an instant.
|
|
21
|
+
- `formatNumber` — a number as a column prints it, for a footer total that must match its cells: takes the value, the column and options that include the viewer. The column's format is read through `legacyNumberLikeFormat`, so a percent or currency column prints as one.
|
|
22
|
+
- `useCellFormat` — reads what the two formatters need from the provider: `{ viewer, presentation }`. The viewer is built from the provider's conventions and wording on each render, with that render's `now`; `presentation` is the provider's `presentation` applied to the defaults, or `undefined` when it has none.
|
|
23
|
+
- `resolveRowCurrency` — returns the options with `currency` set to the code this row's money value is in: the column's `currencyAccessor` answer for the row, else, for a column a currency field backs, the code its format names. The options come back unchanged when neither gives one.
|
|
24
|
+
|
|
25
|
+
## A column no registry field backs
|
|
26
|
+
|
|
27
|
+
- `legacyFieldFromColumn` — reads a column as a field definition, for display only: the same type, the column's label, and what a field requires that a column never had to say (a select's option labels from their values, a status option's `muted` slot, a multiselect open to custom values, a boolean's missing word as Yes or No, a currency's code from the column's format or `EUR`). It carries no write policy and no validation; whether the column is editable stays the column's answer. It throws `FieldDefinitionError` for a column with no type and for a `title` column, which is a role, not a storage type.
|
|
28
|
+
- `legacyNumberLikeFormat` — the column's number format as a `NumberLikeFormat`, read off its type: a percent column as `style: "percent"`, a currency column as `style: "currency"` with its code (`EUR` when it names none), anything else as plain or duration. `undefined` for a plain column with no format.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# `viewkitjs/views/display`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/display` to draw one field's value anywhere you hold a field definition and a value, or to print it as text. One renderer per storage type, keyed by the field's type, so a grid cell, a board card and a detail row read a value the same way. The door carries no client directive, so a server module may reach its string formatters; every file behind it that renders carries its own. A rendered value reads the provider's conventions, wording and presentation, so draw it under `ViewsProvider`; a string formatter handed no viewer reads the neutral conventions (`DEFAULT_CONVENTIONS`), never the runtime's locale or zone. What a field cannot know stays your app's: where a relation chip goes, the glyph of an entity kind, a boolean's icon, and the row's own answers (its currency, the words for an empty name). The [contract](../contract.md) names the slots and tokens the display paints with.
|
|
4
|
+
|
|
5
|
+
## Drawing a value
|
|
6
|
+
|
|
7
|
+
Guide: [display](../guides/display.md).
|
|
8
|
+
|
|
9
|
+
- `renderFieldValue` — the entry point: takes a field, its value and optional `DisplayOptions`, and returns what to draw for it. It returns `null` for an empty value (`null`, `""` or an empty array), except a boolean, which draws its off state, and a name handed `nameFallback`, which draws those words. Anything else goes to the field type's core in `DISPLAY_CORES`.
|
|
10
|
+
- `DISPLAY_CORES` — the table of renderers, one per field type, typed so a field type without a core fails to compile. `date` and `datetime` share one core. A lookup, a formula and a one-figure rollup draw as their result's shape; a rollup grouped by a field draws its parts beside its headline. A core does not skip empty values itself; `renderFieldValue` does that before it dispatches.
|
|
11
|
+
- `DisplayCore` — the type of one renderer: `(field, value, opts?) => ReactNode`, for a field definition of one type.
|
|
12
|
+
- `DisplayOptions` — what a surface tells a renderer that the field cannot know. Every member is optional; with none, a value draws in its field's own defaults.
|
|
13
|
+
- The formatting: `presentation` and `viewer`, which win over the provider's.
|
|
14
|
+
- The reader's overrides: `dateStyle`, `durationStyle`, `decimals`, `withTime` (wins over the field's `withTime`), `percentDisplay` (wins over the field's `format.display`), and `wrap` (`true` clamps text to three lines, `"full"` shows it whole; see `cellTextClass`).
|
|
15
|
+
- The row's answers: `currency` (the code this value is in), `nameFallback` (the words for an empty name), `optionColors` (a reader's colour per option) and `labelFallback` (a label for a select value no option names; without it the value draws as the muted unknown chip).
|
|
16
|
+
- A boolean's: `booleanIcon` (the two-state glyph), `marker`, `markerReason` and `onResolve` (the marker style's words, reason and clearing verb), `onToggle` (its presence makes a checkbox or icon boolean clickable; without it the glyph is plain), `booleanDisabled` (keeps the control's shape, disabled) and `booleanCheckbox` (a checkbox control, `ViewsCheckboxProps`, the checkbox style draws alone in place of the tick box and its switch: handed `checked`, the field's label, `tabIndex` -1 and `onCheckedChange`, or `readOnly` without `onToggle`).
|
|
17
|
+
- A relation's: `entityIcon` (your glyph for an entity kind) and `relationWrap` (where a chip goes; absent, the chip is inert).
|
|
18
|
+
- The host's slot: `slotOwnsClick`, set by a host whose own element is the button, such as a calendar card. Every core then draws bare content: an overflow count as plain text, a boolean with no toggle. `hostOwnsPlainClick`, set by a host whose plain click on a value is its own, such as the grid: an email, phone, url or domain stays a link, marked `data-cell-link`, not draggable, and lets its click through for the host to decide.
|
|
19
|
+
- `RelationWrap` — the type of `relationWrap`: `(relation, chip) => ReactNode`. The core draws the chip (its picture or glyph, through your `Avatar` atom, and its label); your function wraps it in your own link or button, since where a record opens is your app's.
|
|
20
|
+
- `MultiValueCell` — the layout for a value that holds several: several emails, phones, links or domains, a multiselect, the far side of a relation. It takes `items` (one drawn node per value), and optionally `details` (a word beside each value in the list, never in the cell), `wrap`, `title` (the native hover text) and `slotOwnsClick`. It shows one value, or three when wrapped, then a `+N` count that opens every value in a read-only list in the components map's `Popover`, drawn with the `List` and `Row` atoms. With `slotOwnsClick` the count is plain text and nothing opens. No items draws nothing.
|
|
21
|
+
With the provider's `severalValues: "fit"`, on one line it shows as many whole values as fit its width instead (at most 20 are measured), then the count, following its width; the first shows cut when even it doesn't fit. The count is drawn by the `CellMore` atom inside `data-slot="vk-cell-more"`, with `data-open` while the list is open.
|
|
22
|
+
- `ConvertedFigure` — a money figure shown in another currency than its record's own, marked: ≈ before its `children`, and a title naming the currency it came `from` ("Converted from USD", the `views.display.converted-from` message). `renderTypedCellValue` draws it around a converted cell, and a field row around a figure its host reads in another currency; an app draws it on a surface of its own.
|
|
23
|
+
- `ConversionLine` — the line under a money editor opened from a converted figure: the marked `figure`, then "as shown" (`views.display.as-shown`), so the record's own amount being edited and the figure the person clicked read as one value. An optional `className` spaces it.
|
|
24
|
+
|
|
25
|
+
## Formatting a value as text
|
|
26
|
+
|
|
27
|
+
- `formatDateValue` — prints a date or an instant: takes the value, the date style (`short` when none), whether to show the time, the kind (`"datetime"` by default; `"date"` reads a `YYYY-MM-DD` day key) and options carrying `presentation` and `viewer`. A `Date` handed for a day is read as its calendar day. A value that does not parse comes back as its own text, never "Invalid Date".
|
|
28
|
+
- `formatNumberValue` — prints a number in the style its format names (plain, duration, percent or currency): takes the value, a `NumberLikeFormat` (plain when none) and options (`decimals`, `currency`, `durationStyle`, `presentation`, `viewer`), which win over the format. A duration reads the value in its stored unit (milliseconds, or seconds when the format says so) and picks its own precision. A currency code comes from the options, then the format, then `EUR`. A `signed` format prints `+ ` or `− ` before the absolute value.
|
|
29
|
+
- `formatMoney` — writes an amount in its own currency, as a money cell does: takes the amount, the currency, the decimals (two by default) and options carrying `presentation` and `viewer`, and prints through `formatNumberValue`, so the amount reads in the viewer's locale and your presentation's look. With no options it takes the default presentation and the neutral conventions (`en-GB`). An absent currency is read as EUR and an absent amount as zero; a code `Intl` refuses is written as the code before the number.
|
|
30
|
+
- `NumberLikeFormat` — what `formatNumberValue` accepts: a number field's format, a percent format with `style: "percent"`, or a currency format with `style: "currency"` and an optional code. Wider than a number field's own format, so one function prints a footer total, a live format preview and all three numeric types.
|
|
31
|
+
- `webHref` — where a web address goes: the trimmed text when its scheme is http, https or ftp; `https:` before an address that opens with `//`; `https://` before a bare host. It returns `null` for empty text and for any other scheme (`javascript:`, `data:`), and for a host written with a port (`example.com:8080`), which reads as a scheme. Plain, so a server module may use it.
|
|
32
|
+
- `emailHref` — where an email address goes: `mailto:` the address alone, the text cut at the first `?`, `#`, `,`, `;` or space and each half of the address percent-encoded, so nothing stored after it adds a recipient or writes the mail. It returns `null` for text that holds no single address (`not an email`, `a@`, `a@b@c`). Plain, so a server module may use it.
|
|
33
|
+
|
|
34
|
+
## The viewer and the presentation
|
|
35
|
+
|
|
36
|
+
- `FieldViewerContext` — who is reading: `locale`, `now`, and optionally `language` (the names language a place's country is written in; `locale` when absent), `timeZone`, `region` (a phone of that country is written as at home), `fieldMessages` (fields' words, fields' English by default) and `messages` (the package's words, its English by default).
|
|
37
|
+
- `viewerFrom` — builds a `FieldViewerContext` from your conventions: their locale, names language, zone, region and messages, with the package's words (`resolveViewsMessage` unless you pass a resolver) and `now` (the current moment unless you pass one).
|
|
38
|
+
- `FieldPresentation` — every formatter a value is printed through, so your app can replace how numbers, durations and dates read: `message`, `number`, `duration`, `calendarDay`, `instant`, `relativeCalendarDay` and `relativeInstant`, each handed the viewer. The provider's `presentation` option returns one, given the defaults.
|
|
39
|
+
- `DEFAULT_FIELD_PRESENTATION` — the package's own `FieldPresentation`. Numbers print through `Intl.NumberFormat` in the viewer's locale; a percent, stored as 0 to 100, prints as it is with `%`; a currency defaults to `EUR` with two decimals. Days print `short` ("27 Sep", the year added when it is not the current one), `long` ("27 September 2026") or `numeric` ("27/09/2026"), a time ("14:05") after a comma, in the viewer's zone. Relative styles say "just now", "5m ago", "in 1d", and "today", "yesterday" or "tomorrow" for a day. Month names and relative words come from the viewer's messages.
|
|
40
|
+
|
|
41
|
+
## Paint for your own cells
|
|
42
|
+
|
|
43
|
+
- `CellSuffix` — the small, subtle unit after a value (a "/mo" after a price), as a component around its children, so every suffix reads alike.
|
|
44
|
+
- `cellTextClass` — the classes for text longer than its box: one truncated line by default, up to three wrapped lines for `true`, the whole value with its newlines for `"full"`.
|
|
45
|
+
- `CHIP_BASE` — the class string of a relation chip's row (icon and label in one line), shared by the inert chip and the default `RelationLink` atom.
|
|
46
|
+
- `CHIP_INTERACTIVE` — `CHIP_BASE` made a link or a button: it inherits the surrounding text colour, so an `<a>` and a `<button>` read the same, and its label turns the brand colour and underlines on its own hover. For a `relationWrap` or a `RelationLink` that wraps the chip in your control.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/chips`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/chips` in a client component: the door opens with the client directive. It holds the editor of a `multiselect` field, a value that is several values. The chosen values stay on screen while you edit them, as the very tags the cell draws, and adds and removes build a draft that commits once when the host closes the panel: several tags are one write and one undo step. A pick adds a value and keeps the panel open, so this editor never sees the `pick` reason. It owns the field of chips, the list and what a close means; its host owns the popover, the anchor and the write. It commits the list of values, a `string[]`. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `ChipsEditor` — the chips panel; its ref is a `ChipsEditorHandle`. Its top zone is a field holding the chosen values as tags, each with its remove, and the input among them, focused without scrolling; Backspace in an empty input takes the last chip. Below it are the values on offer, those not already chosen, filtered on their labels as you type, and, unless `creatable` is false, a row that adds the typed text when no chosen or offered value is it, ignoring case. A closed vocabulary passes `creatable={false}`: its search only filters what it offers. Enter adds the highlighted value and keeps the panel open; Tab and Shift-Tab ask the host to close with `tab` and `shift-tab`, and text typed but not added stays out. It takes `values` (what the cell holds), `suggestions` (what the column already holds, the same list its filter offers), `resolve` (one value's label and colour as a `PickerOption`, including a value just typed), `onRequestClose` (called with `escape`, `tab` or `shift-tab`) and `message`, and optionally `normalize`, the rule every added value goes through (default: trimmed), and `creatable` (default true), `seed`, the text the search opens with (a letter typed on the cell that opened it, the values held kept), and `addOption`, an `OptionAdd` from your app: a row after the matches reads "Add “word”" when no value held or offered is the word (by label or value, ignoring spaces at either end, case and accents; such a value is the first row instead), pressing it asks your app once, and the option it returns is added to the set and checked, the panel staying open, once `suggestions` carry it. A refusal shows in your app's words where the row was. With `addOption`, the panel's own Add row is not offered and a typed word is never added as itself.
|
|
6
|
+
- `ChipsEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Its close rule is the date editor's: Escape discards, and any other close, an outside click included, commits the list when it differs from `values` (compared as fields compares a list) and is a `noop` when it doesn't.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/date`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/date` in a client component: the door opens with the client directive. It holds the editor of a `date` and a `datetime` field: a value bar with a typeable date and a time chip, three quick days, your app's calendar, and a Clear row where the date may be empty. It owns the value bar, the calendar, the lenient reading of a typed date and the draft; its host owns the popover, the anchor and when a close means commit. It commits `YYYY-MM-DD` when no time is set, `YYYY-MM-DDTHH:MM` in local time, or `""` when the Clear row empties the date. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `DateEditor` — the date panel; its ref is a `DateEditorHandle`. The date box reads a typed date day first and writes it back as `dd/mm/yyyy`; the time chip offers quick picks every 15 minutes; Today, Tomorrow and Next Monday (a week on when today is a Monday) above the calendar each set their day as a calendar click does; the calendar is the pointer path to the same day, with a year picker from 1900 to ten years ahead (a typed date outside it still lands). It takes `initial` (the stored value, which picks the day and the month it opens on: a full ISO string; a wall clock with no offset, read on the browser's clock, the form a commit waiting for its write comes back in; or `YYYY-MM-DD`, that day in every time zone, never midnight UTC), `onRequestClose` (Enter means done, Escape means leave, and `pick` means a choice that ends the edit; Tab from the panel's last control asks to close with `tab`, and Shift-Tab from its first with `shift-tab`, while Tab between its own controls moves as usual, so a popover that keeps the focus in a loop can still be left; the panel never closes itself) and `message` (the fields message resolver, defaulting to the provider's conventions). With `timeOptional` the time chip starts empty and stays out of the commit until set; without it the chip carries the stored time, or 00:00, and every commit includes one. With `dayOnly`, for a calendar-day field, there is no time chip, the commit is the day, and a click on a day or a quick day asks to close with `pick`; without it, a day click keeps the panel open for the time and a quick day keeps the time, and on a desktop either puts the focus back in the date box, so Enter saves the day and time the panel shows. With `clearable` the panel ends with a Clear row: a click asks to close with `pick` and commits `""`, or nothing when there was no date. It is the panel's last Tab stop: Tab from the control before it (the calendar's day) moves the focus there itself, so a browser whose Tab skips buttons reaches it too, and Enter or Space empties the date from the keyboard. A Tab that leaves the panel before it, as WebKit's does from the date box when your calendar's days carry no `tabindex`, still saves and leaves. With `seed` the date box opens holding that text (a character typed on the cell), focused with the caret after it, and read as a typed date. With `focusDate` the date box takes the focus as the panel opens, without scrolling, so Tab walks the panel and leaves from its last control; leave it off on a phone, whose sheet opens with the keyboard down. The time chip's quick-pick closes when Tab leaves the time box, so Tab moves on to the quick days rather than through every quarter hour. With no stored value the box starts empty and the calendar on today's month, and a close with no interaction writes nothing. The panel opens on, and takes, the wall clock of the conventions' zone (`timeZone`), the hour the cell shows, and today and the quick days are that zone's; the commit is the browser's wall clock of the instant set, so `mergeLocalOntoInstant` lands it there. A time the zone skips commits nothing. A day with no time (with `timeOptional`, the time chip left or made empty) lands at the zone's first instant that day, its midnight or, where its clocks skip midnight, the moment they land on; where that is the browser's own start of the day it commits the bare day, which `mergeLocalOntoInstant` lays onto the stored clock, as before. A `dayOnly` field reads a stored instant's day on the browser's calendar, as its cell does, and a grid column of type `date` with no field keeps its editor on the browser's clock.
|
|
6
|
+
|
|
7
|
+
Handed `DateBody` in the components map, the editor opens it in place of its own value bar, quick days, time, calendar and Clear row. It hands the body the value on the conventions' calendar and clock (a day, or a day and a time, a stored day read as that day on any clock), `time` (false for a date-only field), `empty` (where the date may be emptied), the quick picks, today, the text typed on what opened it, `autoFocus` and `form`. A change from the body is the draft a close resolves, exactly as a calendar pick or a typed day is: `resolveClose` answers it unchanged, a datetime handed a bare day moves the day and keeps the time in force (the one it opened with, or the last one handed), while a field whose time is optional takes a bare day as holding no time, the empty pick is the Clear row's, and a value that isn't a date changes nothing. `onDone` asks the host to close with `pick`. Escape is taken before the body hears it and asks the host to close with `escape`, so your provider's rule for the field's type decides what it keeps; Tab walks the body's controls and asks to close with `tab` or `shift-tab` from either end, so a popover your body draws in a portal, outside its element, reads as a Tab out. `label` names the field for the body (default: the date box's words); the grid and the field row hand their field's name.
|
|
8
|
+
- `DateEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape discards: `"escape"` answers `cancel`. After a click on the Clear row, any other close commits `""`, or is a `noop` when there was no date. Otherwise every other close commits the draft when it differs from the stored value, and is a `noop` otherwise, with text still typed in the date box read first.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/location`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/location` in a client component: the door opens with the client directive. It holds the editor of a `location` field: the country first, then that country's own parts in its own order and with its own words (one country's postal code, county and city on one line, another's city first), the parts the country asks for marked as required and never refused. It owns the boxes, the country list, the region list and what a close means; its host owns the popover, the anchor and the write. It commits a `LocationValue` of `viewkitjs/fields` holding the field's parts, or null. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `LocationEditor` — the place editor; its ref is a `LocationEditorHandle`. It takes `field` (the location field, whose `parts` limit what it edits), `initial` (the stored place, or null) and `onRequestClose`, and optionally `allowEmpty`, `clearable` (its own body ends with a Clear row that empties the whole place, the country included; not drawn in a list opened from the boxes, nor with your `PartsBody`; default false), `conventions` (whose names language, `language`, names the countries and regions and picks each country's format; default: the provider's) and `label` (the field's name, for your `PartsBody`; default the field's label).
|
|
6
|
+
- Country: a field that takes the country opens on a searchable country list when its place has none (matched by name, marks ignored, or by code); once picked, the country is a button that opens the list again. Picking another country clears the region and its code.
|
|
7
|
+
- Region: where the country has a region list, the region is picked from it, storing the region's name and its ISO 3166-2 code; the list loads when the editor lands on that country. A typed region has no code.
|
|
8
|
+
- Parts: a field limited to some parts edits only those, and a part it names that the country's format has no place for comes after the country's lines, as does a part a stored place holds that its country has no place for.
|
|
9
|
+
- Keys: Tab walks the controls and then the Clear row, where drawn, its last stop (from the last box, or from the search of the first country list); Enter or Space presses it; Tab on it asks to close with `tab`, Shift-Tab goes back, and past either end the editor asks to close with `tab` or `shift-tab`. Escape in a list goes back to the boxes, keeping what was typed, and only the first country list, with nothing behind it, closes the editor. A list with boxes behind it carries the panel's `EDITOR_INNER_ESCAPE` mark, so an `EditorPanel` popover leaves that Escape to the list.
|
|
10
|
+
|
|
11
|
+
Handed `PartsBody` in the components map, the editor opens it in place of its boxes and lists, as `kind: "place"`: it hands the body the place's parts, the boxes the field takes and their rows in the country's own order, each box's words, the parts the country asks for, every country where the field takes one, the country's regions once loaded, and `opens: "countries"` where the place has no country yet. It keeps the region's code (read from the region, cleared with a new country), the draft, Escape, Tab and the close.
|
|
12
|
+
- `LocationEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape cancels. Each of the field's parts is trimmed, an empty one null; the same stored value as `initial` is a `noop`; every part empty commits null with `allowEmpty` and cancels without it; anything else commits. After a press on the Clear row, until the next edit, every close but Escape commits null, or is a `noop` when the place was already empty.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/name`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/name` in a client component: the door opens with the client directive. It holds the editor of a `name` field: three text boxes, given, family and full. Once a part is edited, the full box follows the parts ("given family") while nobody has typed in it, and stops once someone does; a stored full name the parts would not give is the person's own and is left as it is, and an editor closed untouched writes nothing. Tab walks the three boxes, and a blur that lands on another box is not a close. It owns the boxes and what a close means; its host owns where it mounts, the write, and keeping each part in its own column. It commits a `NameValue` of `viewkitjs/fields`, `{ full, given, family }`, or null. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `NameEditor` — the three boxes, the given box focused without scrolling; its ref is a `NameEditorHandle`. It takes `initial` (the stored name, or null) and `onRequestClose`, and optionally `seed` (the character that opened the editor, replacing the given box), `allowEmpty`, `conventions`, `boxClassName` (classes for each of its boxes, such as a frame where nothing round the editor frames them; a field row's drawn in place has one) and `label` (the field's name, for your `PartsBody`; default "Full name").
|
|
6
|
+
|
|
7
|
+
Handed `PartsBody` in the components map, the editor opens it in place of its three boxes, as `kind: "name"`: it hands the body `{ given, family, full }`, `full` as the rule above shows it, and keeps the rule itself (a full name typed in the body is its own, unless it is the parts joined, which follows them again; a changed part, while the full name isn't its own, makes it follow), the draft, Escape, Tab and the close.
|
|
8
|
+
- `NameEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape cancels. The name is tidied as fields tidies one; the same name as `initial` is a `noop`; three empty boxes commit null with `allowEmpty` and cancel without it; anything else commits.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/number`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/number` in a client component: the door opens with the client directive. It holds the editor of a `number`, `percent` and `currency` field. It is inline: it replaces the cell's own content rather than opening a panel over it, so its closes are the keyboard's and the blur's (Enter, Tab, Shift-Tab, Escape, a blur) and never `outside`. It owns the input, the reading of what is typed, and the unit chip with its own popover, which never blurs the input into a commit. Its host owns where it mounts and the write. It commits a `NumberEditValue`. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `NumberEditor` — the number input, focused without scrolling; its ref is a `NumberEditorHandle`. It opens on the stored number as a person types it: rounded to `decimals`, with no zeros at its end and no grouping (58000 opens as `58000`, 58000.5 as `58000.5`). ↑ adds 1 and ↓ takes 1, Shift with either 10, from 0 when the box is empty; a step keeps within `min` and `max` and is written to `decimals`. Text that reads as no number, a duration, and an arrow with ⌘, Ctrl or Alt don't step. It takes `initial` (the signed stored value), `onRequestClose`, and optionally:
|
|
6
|
+
- Text: `seed`, the character that opened the editor, replacing the text while `initial` stays the value it compares against; `decimals`, the rounding and the most digits the box opens on, in the stored unit (default 2, and 0 for a whole-number field); `conventions`, how your people write a number (default: the provider's); `allowEmpty`, which makes a blank input a real null commit.
|
|
7
|
+
- Limits: `min` and `max`, the field's lowest and highest value: a step keeps within them, and an app's number body is handed them.
|
|
8
|
+
- Unit: `unit`, the row's currency, drawn as a chip; `unitOptions`, which make the chip a picker; `unitLeft`, the chip before the figure; `code`, a fixed currency's code (`numberEditCode`), drawn beside the amount as a unit is and never part of the commit, ignored when `unit` is given.
|
|
9
|
+
- Duration: `durationUnit`, the unit a duration is stored in. The input then opens as written text (`1m 30s`), reads units, compounds or a bare number of seconds, and commits in that unit.
|
|
10
|
+
- Layout: `align`, `end` (the default, a right-aligned column) or `start` (a row read left to right, with the chip following the figure), and `boxClassName` (classes for its own box, such as a frame where nothing round the editor frames it; a field row's drawn in place has one).
|
|
11
|
+
- An app's number body: `type` (`number`, `percent` or `currency`; default `number`), `label`, `check` (the host's reading of a value and its unit, asked with the value rounded to `decimals`), `escapeKeeps` (the session keeps on Escape), `closeOnBlur` (default true: in place, a focus leaving the body closes it, and a Tab between its controls never reaches the grid; a sheet passes false) and `form` (`phone` in a sheet). Handed `NumberBody` in the components map, the editor opens it in place of its own box (a duration excepted), hands it the draft and the field's settings, and keeps the draft, the rounding, Escape's rule, Tab, ⌘ or Ctrl Enter, the close and the save; the body's `NaN` (text that reads as no number) closes as a cancel.
|
|
12
|
+
- `NumberEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape cancels. A blank input cancels, or with `allowEmpty` commits a null value (`noop` when it was already empty and the unit is unchanged). Text that is not a number cancels, never clears. The same number at the editor's decimals with the same unit is a `noop`; anything else commits.
|
|
13
|
+
- `NumberEditValue` — what a number commits: `{ value, unit }`, the value a number or null and the unit the chip shows (the `NumberCommit` of `viewkitjs/fields`). The host maps it onto its row, such as a unit onto a currency column.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/open-values`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/open-values` in a client component: the door opens with the client directive. An open pick-list (a field whose vocabulary is `custom-values`) has no options of its own: its values are whatever its records hold, which your app's list answers. This door carries those values to every editor of the field: your app provides them above a surface (a record's panel, a list's body), and the panel row, the grid cell and the card read them, so a field offers the same values wherever it is edited. A host asks for a field's values once, when its editor mounts. A closed field, or no provider, reads none and asks nothing. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `OpenValuesProvider` — provides its `value`, an `OpenValues` or undefined, to the editors below it.
|
|
6
|
+
- `OpenValues` — what the provider holds: `values`, field key to the values the list answered for it, most used first; `labels`, field key to value to its name, for the named values of a relation, user or actor field; and `onWanted(fieldKey)`, called when an editor of an open field opens, so your app may fetch its values.
|
|
7
|
+
- `useOpenValues` — the values an open field holds, as the nearest provider knows them, given the field or undefined. It calls the provider's `onWanted` with the field's key when it mounts, and returns an empty list for a closed field, no field or no provider.
|
|
8
|
+
- `useOpenValuesContext` — the nearest provider's `OpenValues` whole, or undefined: what a host hands `buildRelationFilters` as `farValues`.
|
|
9
|
+
- `offeredValues` — what an editor offers, each value once: given a field, the known values and those seen on screen (default none), it returns the field's declared options, then the known values, then the seen ones.
|
|
10
|
+
- `takesNewValues` — whether an editor of a field takes a value typed in that no option names: `true` for a select with `vocabulary: "custom-values"` and for a multiselect whose vocabulary is not `"closed"`, the line the field's own rule draws; `false` otherwise. A host passes it as the chips editor's `creatable`. A field whose binding carries an `addOption` takes a typed word only through your app's add, open or closed: its editors offer + Add instead of using the word.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/panel`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/panel` in a client component: the door opens with the client directive. It holds where an editor opens, for every surface: your popover on a desktop and your sheet on a phone, from the components map's `Popover` and `Sheet`, or nothing at all for a type-in editor that stays where its value stands. The editor inside never reads which. It takes the session your host opened (`viewkitjs/views/editors/session`), so the session's rules hold on every surface. Guide: [editors](../guides/editors.md#the-panel-a-popover-on-the-desktop-a-sheet-on-the-phone).
|
|
4
|
+
|
|
5
|
+
- `EditorPanel` — opens the editor it holds. The surface is chosen once, when the session opens, by the provider's `desktopQuery`: a window crossing the desktop width mid-edit keeps the panel it opened in. A panel already open in server-rendered HTML reads the server's answer, a desktop, so mount it on the person's tap, as a host does. What each dismissal means is the panel's, so every host agrees:
|
|
6
|
+
- On a desktop, your `Popover`, opened on `anchor`: its Escape is the session's (a discard, or a keep where the session keeps), asked once though the popover reports the close it causes right after `onEscape`, unless it comes from inside an element carrying `EDITOR_INNER_ESCAPE`, which the panel answers `false` to so the popover stays open and the editor closes its own list; and a press outside closes with `"outside"`, which the editor answers by its own rule, while the session is open: a press while the popover plays its exit after a close reaches nothing. Its panel carries `data-slot="vk-editor-panel"`.
|
|
7
|
+
- On a phone, your `Sheet`, titled with `title` (the field's name), handed `label` too whenever `title` is words, and a bar with ✕ (`views.editors.discard`) and ✓ (`views.editors.save`). ✕, a swipe, the backdrop and Escape discard; ✓ closes with `"enter"`, as done; a pick in a select saves on its own. With the provider's `sheetActions: "head"` the panel draws no bar: your `Sheet` is handed the ✕ and ✓ as `actions` (`close`, and `done` unless the host passed `savesOnPick`) for its own head. An app's body in the sheet (`TextBody`, `PartsBody`, `ValuesBody` or `LinksBody`) is handed `onStepChange`: while it stands on a step of its own (`ViewsBodyStep`), the sheet is titled with the step's title (and handed it as `label`), Back (`views.editors.back`) stands in the ✕'s place in the bar, or is handed as `actions.back` to a head of your own, and ✓ stays; Back and an Escape your `Sheet` reports as `escape-key` call the step's `onBack`, while a swipe, the backdrop and ✕ still discard the whole edit. Handed `null`, the head is the field's again. An Escape from an element the body marks `EDITOR_INNER_ESCAPE` inside its element is the body's: the sheet stays open. A picker always opens the sheet on a phone. A press inside the sheet stays in it: a click, a double-click or a context menu never bubbles through React's tree to what the panel is drawn in, such as a grid row.
|
|
8
|
+
- A type-in editor (`inPlace`) is drawn where it stands on a desktop, and on a phone too unless its host passes `sheetOnPhone`, which opens it in the sheet.
|
|
9
|
+
- A refusal your `onAttempt` gave (`refusal`) is drawn under the editor, with `role="alert"` and `data-slot="vk-editor-refusal"`, in the popover and the sheet. In place, your own box draws it: pass the children as a function of the `EditorSurface` to know where the editor is. An editor that draws the refusal itself (a range with bands, handed it as `refusal`) takes `editorDrawsRefusal`, and the panel draws none.
|
|
10
|
+
- `EditorPanelProps` — what the panel takes: `session` (an `EditSession`, from either mode), `title`, `anchor`, `inPlace` and `sheetOnPhone` (both default false), `snap` (the sheet's hint, default `auto`), the popover's `side`, `align`, `sideOffset`, `alignOffset`, `initialFocus`, `chrome`, `className`, `style` and `panelData`, handed on as they are, `onPanelClick` (a click inside the popover or the sheet; the sheet then keeps it, the popover leaves that to you), `editorDrawsRefusal` (default false: the editor draws the session's refusal, so the panel doesn't), `savesOnPick` (default false: the body saves on its pick, a pick of one, so a `Sheet` drawing the panel's buttons in its head is handed no `done`; the panel's own bar keeps its ✓), and `children`: the editor, or a function of the `EditorSurface` the panel chose.
|
|
11
|
+
- `EditorSurface` — where the panel opened its editor: `popover`, `sheet` or `in-place`. An `in-place` editor is drawn in its value's own box, which the panel scrolls into view as the editor opens, at the nearest edge (`scrollIntoView` with `nearest`), when `anchor` is that box: a box partly past the edge of what scrolls it opens whole.
|
|
12
|
+
- `EDITOR_INNER_ESCAPE` — the attribute name (`data-vk-inner-escape`) an editor puts on an inner level of its own, such as a list opened from its boxes, while Escape there closes that level rather than the edit. A popover that hears Escape on the document before the editor does then leaves it to the editor. The place editor carries it on its country and region lists. An app's body may carry it on a level inside its own element too (a list drawn in its rows' place): that Escape is the body's, and the editor stays open.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/range`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/range` in a client component: the door opens with the client directive. It holds the editor of a `range` field: two number boxes, low and high, inline like the number editor. Tab moves from low to high inside the editor, and a blur that lands on the other box is not a close. An empty box is an open end. It owns the two boxes and what a close means; its host owns where it mounts, the write, and keeping the pair in its own columns. It commits a `RangeValue` of `viewkitjs/fields`, `{ low, high }`, each a number or null. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `RangeEditor` — the two boxes, the low one focused without scrolling; its ref is a `RangeEditorHandle`. Each box opens on its end as the number editor's does, rounded to `decimals` with no zeros at its end, and steps as it does: ↑ adds 1 and ↓ takes 1, Shift with either 10, an empty end from 0, within `min` and `max`. It takes `initial` (the stored range, or null) and `onRequestClose`, and optionally `seed` (the character that opened the editor, replacing the low box), `decimals` (default 0), `allowEmpty`, `suffix` (a unit drawn after the high box, such as `%` or a currency code), `align` (`end` by default, or `start`), `conventions` (how a number is written; default: the provider's), `bands` (the field's `presets`, listed under the boxes; a click writes the band's ends into the boxes and closes as `pick`, so it is read and judged as typed ends are), `bandsAt` (`popover` by default, a small menu under the boxes; `below`, in the editor's own column, for an editor already in a sheet or a panel), `refusal` (your reason for refusing the range: with bands listed the editor draws it between the boxes and the bands, atop the menu or above the list, so you draw none and tell your `EditorPanel` with `editorDrawsRefusal`; without bands it draws nothing and you draw it as for any type-in), `boxClassName` (classes for the box holding the two inputs, such as a sheet's field), `min` and `max` (the lowest and highest either end may hold, as the field says: a step keeps within them) and `label` (the field's name, for your `PartsBody`; default the two ends' words).
|
|
6
|
+
|
|
7
|
+
Handed `PartsBody` in the components map, the editor opens it in place of its boxes and bands, as `kind: "range"`: it hands the body the two ends, `decimals`, the `suffix` as `unit`, and the `bands` for the body to draw as picks (a band picked closes as `pick`). It keeps the draft, rounds the ends to `decimals` as it closes, and draws no refusal of its own: your panel draws it. Escape, Tab and the close are as above.
|
|
8
|
+
- `RangeEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape cancels, and so does a box holding text that is not a number. Both ends unchanged as the boxes showed them is a `noop`, so a stored 2.555 that opened as 2.56 writes nothing. Two empty boxes cancel, or commit with `allowEmpty`. A low end above the high end commits as typed, for the host's acceptance to refuse in its own words.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/relation`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/relation` in a client component: the door opens with the client directive. It holds the picker for a link, the editor of a `relation` and a `user` field: search the candidates, pick one, and it replaces the link; and the editor of a relation holding several records, which adds and removes links with the list open. The candidates are the host's, through a `RelationSource`: a static list the panel filters on its labels, or a remote search your function answers a page at a time. The panel owns the search box, the rows, the paging (it waits before a typed query searches, drops an answer a newer query superseded, asks for the next page as the end of the list scrolls into view, and says when it is searching, failed or found nothing) and, in `RelationEditor`, what a close means: a pick is the commit, every other close discards (`RelationSetEditor` saves on every close but Escape). It never does the asking itself, so access stays in your function's closure. Its host owns the popover, the anchor and the write. It commits the picked id, or null for None. The door also re-exports `RelationCandidate`, `RelationSearch` and `RelationSource`, which are documented with the root door. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `RelationEditor` — the relation-picking panel, built from your app's command list, or opened in your app's `Picker` when the provider has one (the list filtered or fetched by the editor, the create rows as its `actions`); its ref is a `RelationEditorHandle`. It takes `candidates` (the `RelationSource`), `initial` (the linked id, or null), `clearable` (a None row for a link the surface says is optional, hidden while a query is typed), `onRequestClose` (called with `pick` when someone chooses), `kindGlyph` (the glyph worn by every candidate with no icon of its own; given, every row keeps a glyph lane so the labels line up), `noneLabel` (the surface's words for the None row), `message` (the fields message resolver, defaulting to the provider's conventions), `creates` (`RelationCreate` rows pinned under the list), `seed` (the text the search opens with, such as a letter typed on the cell that opened it), `label` (the field's name, for your `Picker`; default the search's words) and `focusSearch` (put the caret in the search as the panel opens, without scrolling; off by default, and left off on a phone so its sheet opens with the keyboard down). The list opens with the linked record highlighted, so an Enter pressed at once changes nothing; when a remote page doesn't hold it, nothing is highlighted until a key or typed text moves the highlight; with nothing linked, None or the first candidate; opened with a `seed`, the first match. It asks your command list for that through its root's `defaultValue`; a list that ignores it opens on its first row. A candidate's `sublabel` draws as a muted second line and its `badge` as a small chip at the row's end.
|
|
6
|
+
- `RelationEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. It answers `commit` with the picked id, or null for None, only for `pick` and only when it differs from `initial`; `noop` for a `pick` with nothing picked or the link already held; `cancel` for every other reason.
|
|
7
|
+
- `RelationCreate` — a row pinned under the list for a record that isn't in it yet: `label(query)` gives its words from the trimmed query, and `onCreate(query)` runs after the host has been asked to close, so your own create form opens with what was typed. In `RelationEditor` a click on it is a `pick` that resolves `noop`: nothing is written. In `RelationSetEditor` it saves the set as it stands first. The grid writes a record your form links on top of that save however soon you call the link, even before the editor has finished closing.
|
|
8
|
+
- `RELATION_SEARCH_DEBOUNCE_MS` — 200: how many milliseconds a typed query waits before a remote search runs. The empty query runs at once, so the panel opens on a first page.
|
|
9
|
+
- `RELATION_PAGE_SIZE` — 20: the rows per page when a remote source names no `pageSize`. A page shorter than the size ends the list.
|
|
10
|
+
- `RelationSetEditor` — the editor of a relation holding several records, on the same panel; its ref is a `RelationSetEditorHandle`. It takes `candidates`, `initial` (the linked records as `RelationSetItem`s, in their stored order), `lead` (the field leads by a flag), `onRequestClose` (called with `tab` or `shift-tab` from the search, and with `pick` from a create row; through your `LinksBody`, also with `pick` from its `onDone`, `escape` from inside it, and `tab` or `shift-tab` from its last or first control), `kindGlyph`, `message`, `creates`, `seed`, `label` and `focusSearch`, as `RelationEditor` does, and `links` (the field's `links`: handed, with your `LinksBody`, the set opens that body, handed each link's roles, the field's roles and the lead, and saves what it sets; left out, or without a `LinksBody`, nothing below changes); handed your `Picker`, it opens it with the linked records held and, where the field leads, `lead`, and your body's `onDone` closes it with `pick`, which saves the set. Without a `Picker`, the None row of `RelationEditor` hides while a query is typed; your body decides that for itself. The linked records are drawn first and chosen, whatever page a remote search holds, and filtered by the query on their labels; a click on a candidate adds it to the end of the set, a click on a linked record removes it, and the list stays open. With `lead`, the first link leads: it carries a Lead mark, every other linked record a Make lead action that moves it first, and removing the lead passes it to the next; a set stored with none marked reads its first link as the lead. Space on a highlighted linked record, with the search empty, makes it the lead too; with a query typed, Space types. On open the highlight sits on the first linked record, so an Enter does nothing until the highlight leaves it, by a key, by typing or by the pointer. The editor reads the highlighted record off the search's `aria-activedescendant` and the row's `data-value`, as cmdk sets them; a command list that sets neither keeps the Enter guard until a key or typing moves the highlight, and has no Space for the lead. With `focusSearch`, the caret goes back to the search after every click, so Tab still saves.
|
|
11
|
+
- `RelationSetEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. It answers `cancel` for `escape`; for every other reason, `noop` when the set holds the same records in the same order as it opened, each with the roles it opened with, else `commit` with the whole set as `RelationDraftLink[]` (from `viewkitjs/fields`), in order with the lead first: each link's `id`, its `kind` where known, its roles, and with `lead`, `primary` on every link, true on the first. A link keeps the `role` and `roles` it was stored with (a new link has neither) unless your `LinksBody` sets its roles; then it writes the key it was stored with: `role` (its first role, or null) on a link stored with `role`, `roles` on one stored with `roles`, `roles` beside `role` on a link stored with `role` alone once it holds two or more, and `roles` alone on a new link once it holds one.
|
|
12
|
+
- `RelationSetItem` — one linked record as the set editor holds it: a `RelationDraftLink` with the `label` its row shows and an optional `icon`.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/select`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/select` in a client component: the door opens with the client directive. It holds the picker for one value out of a set, the editor of a `select` and a `status` field. The panel draws each option as your app's row with its badge or tag and owns what a close means: a pick is the commit, and every other close discards. Its host owns the popover, the anchor, the exit gap and the write. It commits the picked option's `value`, a string, and `""` for None, which a host maps to null. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `SelectEditor` — the option-picking panel; its ref is a `SelectEditorHandle`. It takes `options` (`PickerOption`s in display order, colours already resolved), `initial` (the value the surface holds, checked in the list), `clearable` (a None row first, for a value the surface says is optional), `onRequestClose` (called with `pick` when someone chooses) and `message` (the fields message resolver, defaulting to the provider's conventions). A list of more than `SELECT_SEARCH_PAST` (8) options opens with a search over the option labels, the None row hidden while a query is typed; Enter picks the first match. When it may be emptied, it opens with the value it holds highlighted, or None when it holds nothing, so an Enter pressed at once changes nothing, and the arrows walk every row, None included; opened with a `seed`, on the first match. It asks your command list for that through its root's `defaultValue`; a list that ignores it opens on None. One that can't be emptied opens on its first option. With `creatable`, for an open select, the search is always there and, after the matches, a row uses the typed text when no option's value is it, ignoring case; picking that row commits the trimmed text. `seed` is the text the search opens with (a letter typed on the cell that opened it), ignored by a list with no search; `focusSearch` puts the caret in the search as it opens, without scrolling. `focusList`, for a host opened from the keyboard, gives a plain list the keys: the row it holds takes the focus as it opens (None when it may be emptied and holds nothing, else its first row), ↓ and ↑ move it between the rows, round at either end, and Enter picks the focused row; a list with a search ignores it. Tab and Shift-Tab, in the search or on a focused row, ask the host to close with `tab` or `shift-tab`, which picks nothing, so a popover that loops Tab inside it can't hold the focus there. `addOption`, an `OptionAdd` from your app, offers **+ Add**: the search is always there, an option a typed word names (its label or value, ignoring spaces at either end, case and accents) is the first row, and otherwise a row after the matches reads "Add “word”"; pressing it, or Enter on it, asks your app once, the row reads "Adding “word”…" while it answers, and the option it returns is picked once `options` carry it (after five seconds without it, the panel says so). A refusal shows in your app's words where the row was and nothing is picked; a new search clears it. With `addOption`, no Use row is offered and a typed word is never committed as itself; any close cancels an add in flight.
|
|
6
|
+
- `SelectEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. It answers `commit` with the picked value only for `pick`, and only when the pick differs from `initial` (`""` and null are the same absence); `noop` for a `pick` with nothing picked or the value already held; `cancel` for every other reason, so Escape and an outside click discard.
|
|
7
|
+
- `SELECT_SEARCH_PAST` — the number of options a closed list holds before it opens with a search: 8.
|
|
8
|
+
- `PickerOption` — one option as the panel draws it: its `value` and `label`, and a `slot` (a status's lifecycle state, drawn as your status badge) or a `color` (a category colour, drawn as your tag), or neither for a plain label. `icon` names your app's glyph, drawn before the label. Colours are resolved by the caller, never by the panel.
|
|
9
|
+
- `pickerOptionsFromField` — a select or status field's options dressed the way its cells draw them, so a pick in a form looks like the grid. Archived options are left out. A status keeps each option's slot (`muted` when it names none); a select takes the category colour chain: your `optionColors` overrides, then the field's own colour, then the derived hue. Each option's icon is carried. `extraValues` adds an open select's values, the ones its records hold, labelled with their raw code; an archived value stays out. `current` is the value your surface holds: offered after the options when no active option is it, labelled with its archived option's label or its raw code, so its own list shows it checked. A closed list gets no `extraValues`, so a stray value shows only on the record that holds it.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/session`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/session` in a client component: the door opens with the client directive. It holds the plumbing every host that opens an editor in a panel over a value repeats: the guard that lets a session answer once, and the gap that lets the popover's exit play before the value renders again behind it. A session that answers twice writes twice, and one that answers during its own exit unmounts the panel mid-flight. The host keeps its popover, its anchor, its focus and the shape of what it hands back. It is a door of its own so a host that needs the session does not load the editors. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `useAnchoredEditSession` — runs one edit session and returns an `EditSession`, `{ open, close, refusal, keeps }`. It opens already open; bind `open` to your popover and route every close to `close(reason)` (the popover's dismiss, the editor's `onRequestClose`, your own keys): only the first one counts. Escape discards: on `close("escape")` the session answers a cancel without asking the editor. With `escape: "keep"` (an `EditEscape`; default `"cancel"`), read once when the session opens and only on a desktop by the provider's `desktopQuery`, Escape keeps instead: the session asks the editor's `resolveClose("outside")`, as for a press outside, so what was typed is kept by the editor's own rule and a refusal stays open with its reason; a second Escape while that refusal stands throws the edit away. `keeps` says which. On any other reason it asks the editor's `resolveClose(reason)` through `editorRef` (a `noop` when there is no editor) and passes a commit's value through `mapPayload`, which never sees a cancel or a noop. Then one of two modes:
|
|
6
|
+
- Admitted, the one to prefer: `onAttempt(answer)` is asked at once whether this answer may close and returns an `EditSessionAttempt`. A refusal keeps the session open for another try, and its `reason` comes back as `refusal` until the next attempt; an acceptance closes it and calls `onClose` after the exit gap, a timer cleared if the host unmounts. While `onAttempt` runs the session counts as answered, so a close that arrives during it (a write that moves the focus, and a box that closes on blur) is ignored; a refusal, or an `onAttempt` that throws, opens it again for the next try.
|
|
7
|
+
- Deferred: the session closes at once and hands the answer to `onDone` after the exit gap, for a host whose answer still carries the write.
|
|
8
|
+
- Gap: `exitMs` sets it, defaulting to `EDITOR_EXIT_MS`.
|
|
9
|
+
- Leaving: `leave` (`"outside"` or `"discard"`, read once when the session opens; default `"discard"`) says what happens to a session still open when its page goes (`pagehide`: a reload, a closed tab, a removed frame, Back to another document), or when the grid or field row around it goes. `"outside"` asks the editor as for a press outside, so its draft is written by its own rule and a refusal writes nothing; `"discard"` asks nothing, which keeps a host of your own as it was. Pass `"outside"` to have its open editor asked; the grid and the field row pass it on a desktop and `"discard"` in a phone's sheet. Either way an answer already given and waiting out its exit is finished at once, inside the event, and the admitted mode's `onLeave` is called first. A session closed by Escape is never asked again. One `pagehide` listener per session, for its life; a page that comes back from the back-forward cache finds the session closed and its value written.
|
|
10
|
+
- `EditSession` — what the session hands its host, and what `EditorPanel` (`viewkitjs/views/editors/panel`) takes: `open`, `close(reason)`, and `refusal`, the reason the host gave for the last refused attempt until the next one, `null` otherwise and always in the deferred mode; and `keeps`, optional, true when this session's Escape keeps (an editor that checks its draft before a key closes it, the value list, checks it before Escape too).
|
|
11
|
+
- `useEscapeRule(type, list?)` — the provider's `escape` for a field type (`ViewsProvider`, `viewkitjs/views/react`): `"keep"` where it names the type keep, else `"cancel"`, and `"cancel"` with no provider. For an email, a phone, a link or a domain whose rule names its editors apart (`{ box, list }`), `list` (default false) says which: true where your host opens the value list (several values, or a single one opened as a list of one), false for the text box. A host of your own reads it and hands it to its session as `escape`.
|
|
12
|
+
- `EditSessionAttempt` — the host's answer to an attempt: `{ accepted: boolean; reason?: string }`. A refusal may say why; the reason is what `refusal` shows.
|
|
13
|
+
- `EDITOR_EXIT_MS` — 160: the milliseconds an anchored host waits between closing its popover and reporting its answer, so the exit animation plays out first.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/text`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/text` in a client component: the door opens with the client directive. It holds the one editor for every text-like value: `text`, `url`, `domain`, `email`, `phone` and `rich_text`, a line or a paragraph. It tidies what was typed (trimmed; rich text tidied only at its edges, with fields' `normalizeMarkdown`, so its first line keeps its indent), and an unchanged value closes as no save. It owns the box and what a close means; its host owns where it opens (in place, a popover, a sheet), the session and the write. It commits a string. Guide: [editors](../guides/editors.md#a-text-box).
|
|
4
|
+
|
|
5
|
+
- `TextEditor` — the box, focused without scrolling, its caret at the end; its ref is a `TextEditorHandle`. A line draws through the components map's `Input`; a paragraph (`multiline`) is the package's own textarea. Keys: Escape asks `onRequestClose("escape")`; Enter asks `"enter"` (in a paragraph only with ⌘ or Ctrl, and a bare Enter is a newline); Tab and Shift-Tab ask `"tab"` and `"shift-tab"`; leaving the box asks `"blur"` unless `closeOnBlur` is false. The box carries `data-slot="vk-text-editor"`. Handed the components map's `TextBody`, the editor opens it in place of its own box, in a frame carrying `data-slot="vk-text-body"`: it hands the body the draft and the field's settings (`ViewsTextBodyProps`), and keeps the draft, Escape's rule, Tab, ⌘ or Ctrl Enter (closes as `"enter"`), in place a press outside (`"blur"`), the close's tidy (a line's line breaks become a space; a phone that reads as the stored number is a `noop`) and the save.
|
|
6
|
+
- `TextEditorProps` — `type` (a `TextEditorType`), `initial` (the stored value, `""` when unset), `onRequestClose`, and optionally `seed` (type-to-replace: the draft opens on it, compared against `initial`), `multiline` (a paragraph; the default for rich text), `readOnly` (every close a `noop`), `closeOnBlur` (default true; a host in a popover or a sheet passes false), `label` (the box's accessible name), `chrome` (handed to your `Input`: `bare`, the default, or `field`), `rows` and `maxLines` (a paragraph opens at `rows`, default 1, and grows with its text to `maxLines`, default 12, then scrolls; `maxLines` no greater than `rows` keeps it at `rows`), `className`, `style`, `boxData` (`data-*` attributes set on the box, over its own slot), and for a `TextBody`: `check` (the host's reading of a value, handed to the body), `region` (a phone's country, handed to the body and read by its close), `escapeKeeps` (the session keeps on Escape: the frame carries `EDITOR_INNER_ESCAPE`) and `form` (`phone` in a sheet, default `computer`).
|
|
7
|
+
- `TextEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Read-only answers `noop`; Escape cancels; otherwise the tidied draft against the tidied `initial`: equal is a `noop`, different a `commit` of the tidied draft.
|
|
8
|
+
- `TextEditorType` — the types it edits: `text`, `url`, `domain`, `email`, `phone`, `rich_text`.
|
|
9
|
+
- `TEXT_INPUT_TYPE` — the native input type per `TextEditorType`, the phone keyboard each brings: `text` and `rich_text` `text`, `url` and `domain` `url`, `email` `email`, `phone` `tel`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# `viewkitjs/views/editors/value-list`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/editors/value-list` in a client component: the door opens with the client directive. It holds the editor of a field holding several values of one kind (a `multiple` email, phone, url or domain field), each with its label and one of them the main one. It is a draft, like the chips editor: the whole list commits once when the host closes it. It owns the rows, the reading of each value and what a close means; its host owns the popover, the anchor and the write. It commits a list of `ValueItem`s of `viewkitjs/fields`, `{ value, label, main }`, the main one first, or null. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `ValueListEditor` — the list of rows; its ref is a `ValueListEditorHandle`. Each row carries its main mark, its value, its label and a remove; an Add row appends an empty one, and an empty list opens on one blank row. Each value is read by its type's own rule (the field's single-value commit: an email's shape, a domain cleaned, a phone read in the region) when focus leaves its row, and a refusal shows under the row. Tab walks each row's mark, value, label and remove, then Add; Enter in a box and Tab out of the editor check every row first and stay open on a refusal; so does Escape with `escapeKeeps` (a host whose session keeps, `EditSession.keeps`), which also marks the list's box `EDITOR_INNER_ESCAPE`, so a popover leaves that Escape to the rows. It takes `field`, `initial` (the stored list, as items or as plain values) and `onRequestClose`, and optionally `labels` (default true; false draws no label boxes and commits every label null), `allowEmpty`, `region` (the record's country, where a phone typed without its country code is read; else the conventions' region) and `openLinks` (each stored value carries an open action beside it: mail, call or browse; a row typed over has none until it is saved; default false), `label` (the field's name for an app's `ValuesBody`; default `field.label`), `holds` (`"one"`: one line with no main mark, no label box and no Add row, × empties the line and it stays; default `"several"`) and `seed` (what was typed on what opened it: the first row's text starts as it). Handed `ValuesBody` (the components map), the editor opens it in place of its own rows, handing it the draft as lines, the field's type, its check, `labels`, `holds`, a phone's `region`, `typed` and `form`, and keeps the draft, which value is kept as stored, Escape, Tab and the close; with a body it draws no row, no reason and no open action of its own.
|
|
6
|
+
- `ValueListEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape cancels; any other close keeps what was built. Blank rows are dropped. A row left untouched keeps its stored value exactly as stored, and a row typed in commits its trimmed text for the field's commit to read. With no main mark the first row is the main one. The same values, labels and main as opened is a `noop`; an empty list commits null with `allowEmpty` and cancels without it.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# `viewkitjs/views/editors`
|
|
2
|
+
|
|
3
|
+
The table of editors, one per storage type. The door carries no client directive; each editor file behind it carries its own, and each editor also has a door of its own, which a host imports when it needs one editor and not the table. An editor owns its panel and what a close means. Its host (a grid cell, a form field, a drawer row, a card) owns the popover, the anchor, focus, when to commit, and the write. Every editor speaks the same handshake: when it sees a key or a pick that means done, it calls the host's `onRequestClose(reason)`; the host closes, then asks the editor's handle `resolveClose(reason)`, which answers `commit` with the value, `cancel` or `noop` (the `CloseReason` and `CloseResolution` of `viewkitjs/fields`). The words an editor draws come from the provider; an editor that takes `message` reads the fields messages from it instead. `hasEditCore`, documented with the root door, says whether a type has an editor of its own without loading any editor. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `EDIT_CORES` — the editor for each storage type, one member for every `FieldType`, so a type added to fields with no answer here fails to compile. `date` and `datetime` share `DateEditor`, `select` and `status` share `SelectEditor`, `multiselect` is `ChipsEditor`, `relation` and `user` share `RelationEditor`, `number`, `percent` and `currency` share `NumberEditor`, and `range`, `name` and `location` each have their own, and `text`, `url`, `domain`, `email`, `phone` and `rich_text` share `TextEditor`. A `null` member is a decision, not a gap: a `boolean` is edited by its checkbox, an `actor` is set by the system, and `lookup`, `rollup` and `formula` are read-only or derived. Each member is typed as its editor's props and handle, so binding the wrong editor is a type error. `ValueListEditor`, for a field holding several emails, phones, links or domains, has its own door and no member here.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# `viewkitjs/views/field-row`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/field-row` in a client component, under your `ViewsProvider`: the door opens with the client directive. It holds a record's field row: one field drawn as its label, its value and, on a click, its type's editor in place, and the write path that admits each edit at once, queues one record's writes, settles each on the save's receipt and rolls a failure back. The row knows no entity, only a binding, a value and a commit, so your app builds its record's panel (its sections, its related records) around the rows. It draws with your provider's `Popover`, `Sheet`, `Collapse`, `AppIcon`, icons, `CommandMenu` atom and toast port. The shapes its writes go through (the write target, the receipt, the admission, a value's note, the reconciliation error) are the root door's, described under [A write's target](views.md#a-writes-target), and this door re-exports them. Guide: [editors](../guides/editors.md).
|
|
4
|
+
|
|
5
|
+
- `FieldRow` — one field of a record: a glyph (the binding's `icon` through your `AppIcon`, else the type's icon), the label, and the value drawn by the display. Below the provider's `desktopQuery` the label stands above the value, which then takes the row's width; at it and above, glyph, label and value share one line. A writable row holding nothing draws your `views.field-row.empty` word, muted; a read-only one draws "—". A writable row's edit button is named by the label, then the value as it is drawn ("Stage, Won"; "Terms, Empty" for a row holding nothing); a row still loading, and a rich text laid over its button, are named by the label alone. A writable row opens its type's editor on a click, through the editor panel and one edit session: a picker (a select, a date, several tags, a relation or a set of records, several values, a place) anchored under the value in your `Popover` on a desktop and in your `Sheet` on a phone, by the provider's `desktopQuery`; a typed value (text, a number, money, a range, a name) in its own box on every width, except that with a `PartsBody` handed a name and a range open anchored under the value, as a place does, and that a single email or domain opens the value list holding one value, anchored, where the provider's `oneValue` says `list` for its type. Escape throws the edit away, unless the provider's `escape` keeps the field's type, on a desktop, where it keeps what was typed and a refusal stays open until a second Escape throws the edit away; a sheet's swipe or ✕ changes nothing. On a desktop the date editor opens with the keyboard in its date box (or your `DateBody`, focused), as a place's or a long select's does; and with an editor open in its popover, an Escape heard from the page itself or from an element holding the row closes that editor and goes no further, so a drawer around the row hears only the next one. On a desktop, a short select opened by Enter or Space on the row puts the focus on the value it holds, so the arrows walk it and Enter picks; opened by a pointer, it moves no focus. On a desktop, an editor closed by Tab, Shift-Tab, Escape, Enter or a pick puts the focus back on the row's own button, once its exit has played out and a write still saving has saved, so the next Tab moves on from that row; a press or a focus outside an editor's panel since the close lets that go, so a row opened meanwhile keeps its editor, and an outside press leaves the focus where it put it. A relation saves what its row stores (an id, a ref with the picked record's kind, or a set of records with its lead); a date field has no time box and ends with a Clear row where it may be empty, and so does a place, whose Clear empties it whole, country included; several values read a phone typed without its code in the binding's `region`. A value of several parts inside a writable row draws its count as plain text: the row's press opens the editor, which lists them all. A single email, phone, link or domain in a writable row reads as plain text too, with an open action beside the row's button (a mail, a call, the site), and a writable rich text lies over its button, so its links and "Show more" keep their own press while a press on its text edits. A money figure its host reads in another currency than the record's own (it hands the converted figure as `value` and that currency as `opts.currency`) is marked ≈ with the currency it came from, and its editor names it under the record's own amount. A boolean commits from its own control, a `command` field opens its verbs, and a read-only row draws a lock with its reason. A refused commit keeps the editor open with the reason under it, a saved value shows at once and stays until the receipt settles it, and a failed save rolls back with a retry. A text, an email, a phone, a link, a domain, long or rich text edits in place in the row; handed the components map's `TextBody`, the row opens it there, at every width, with the field's own check and the record's country. A number, money or a percent edits in place too; handed `NumberBody`, the row opens it there, at every width, with the field's own check and its limits (a duration keeps the editor's own box).
|
|
6
|
+
- `FieldRowProps` — the row's props: `binding`, `row`, `value` (the display value), `editValue` (the stored value the editor opens on), `writable`, `ready` (false refuses gestures while the record loads), `unread` (the value isn't read yet, drawn blank), `refusal` (why it's read-only here), `onCommit` (admits or refuses a draft, then settles; an editor still open when the page or the row goes is asked as for a press outside, so it can be called inside `pagehide`), `opts` (display options), `menu` (a `command` field's verbs), `meta` (a few words in the value's line), `note` (a sentence under the value, with an optional quote a tap opens) and `kindIcon` (your icon name for a record kind, the glyph a relation's candidates wear; unanswered, they wear the type's glyph).
|
|
7
|
+
- `RowEditor` — the editor a row mounts for its field's type, picked from `ROW_HOSTS`.
|
|
8
|
+
- `ROW_HOSTS` — the host each field type mounts in a row, or `null` for a type the row never opens (a boolean, a derived or system field).
|
|
9
|
+
- `RowEditorProps` — what a host receives: `binding`, `row`, `initial` (the stored value), `anchor` (the value as drawn, kept under an anchored editor), `shown` (the display value, whose labels a set of records opens on), `conversion` (the marked figure, when the row showed the amount converted, which a money host names under it), `onAttempt`, `onClose` (called with a `RowClosed` once the editor's exit has played out), `message`, `kindIcon` and `openedByKey` (true when a key, Enter or Space, pressed the row's button rather than a pointer).
|
|
10
|
+
- `RowClosed` — what a host's close tells its row: `focusBack`, true when the editor closed from the keys or a pick off a sheet, and the row takes the focus back on its button.
|
|
11
|
+
- `RowEditorAttempt` — the row's answer to a close: `{ accepted: true }`, or `{ accepted: false, reason }`, which keeps the editor open.
|
|
12
|
+
- `RowHostProps` — a host's props: `RowEditorProps` plus the field narrowed to the host's types.
|
|
13
|
+
- `useFieldWrite` — the write path for one record: given `FieldWriteOptions`, it returns `commit(fieldKey, value)`, which answers a `FieldWriteAdmission` at once, and `row`, the latest confirmed row. A commit is refused at once when the guard, a pending reconciliation, the same field still saving, a lock or the binding refuses it. Writes to one record run one at a time while the page stays, a queued one mapped again at dispatch against the latest row; when the page goes (`pagehide`), every write still waiting is mapped again and sent at once, inside the event, so your `save` may be called for a record whose earlier save hasn't answered. A failed save toasts through your toast port and rejects, and `refresh` runs in the background after each save.
|
|
14
|
+
- `FieldWriteOptions` — `row`, `rowId`, `bindings`, `write` (an `EntityWriteTarget`), `refresh`, and optionally `locked`, `admit`, `conventions` (default: the provider's), `refusalOf` (reads a failed save's own sentence, shown after the toast's failure line and on the row) and `timing` (follows each edit from its commit to the paint, named `<noun> <fieldKey> drawer edit`).
|
|
15
|
+
- `EditTiming` — what `timing` returns: `mark(step)`, `painted()` and `failed()`.
|
|
16
|
+
- `FieldWriteRefusal` — the error a write rejects with when it is refused with a sentence of its own: by the server (the sentence `refusalOf` read), or at dispatch, when a queued edit is mapped again and the guard, a lock, a missing binding or the binding's write refuses it. The row shows its message.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# `viewkitjs/views/grid`
|
|
2
|
+
|
|
3
|
+
The spreadsheet. The door carries no client directive; every rendering file behind it carries its own. What a column is (its schema, what may be done to it, its filters, its preferences) is the model of the root door, which every view reads; this door holds what a grid alone owns, the renderer and its personal preferences, and the helpers a host's binding shares with it: the commit types, the values a column's filter offers, a cell's copy text and the value an edit starts from, and the title link's class. The house menu rows, the group collapse and the type icons stay your app's: the grid takes them through its props. The bar a selection opens is `SelectionBar` from `viewkitjs/views/selection`, which your `selection`'s `renderBar` draws with your verbs. Guide: [the grid](../guides/the-grid.md).
|
|
4
|
+
|
|
5
|
+
## The grid
|
|
6
|
+
|
|
7
|
+
- `GridTable` — draws the spreadsheet: rows in their groups under a header whose column menus sort, group, format and hide, a checkbox rail and a ⋯ tail on each row, editors opened over cells, a selected range with copy, paste and undo, and a footer of figures per column. An edit shows in its cell at once and goes to `onCellCommit` (a batch to `onCellsCommit`); a failed write rolls the cell back. While `transitionPending` is true, or for one commit after `transitionKey` changes, it draws your app's loading atom instead of the rows, or, handed the components map's `RowsWait` and already showing rows, keeps them, inert, as that slot's children, its column names and footer standing outside the slot, as they are. It takes a `GridTableProps`.
|
|
8
|
+
- `GridTableProps` — what `GridTable` takes, flat, typed over your row. Five are required: `groups` (the rows, as the model's `ListGroup`s), `grouped` (whether they draw as group bands), `getRowId`, `columns` (the model's `ListColumn`s) and `onOpenRow` (what opening a row does: the title's text opens it; it receives the row and a `GridRowOpenedFrom`, which brings the focus back to the row's cell once what it opened closes). The rest are optional:
|
|
9
|
+
- Rows and groups: `rowHref`, `onPrefetchRow` (warm a row's detail on a pointer's intent), `rowClassName`, `rowIcon` and `showRowIcon` (the title cell's glyph, as a descriptor the grid sizes and colours, or the row's picture through your `Avatar` atom when the descriptor hands an `avatar`), `onOpenRelation` and `entityIcon` (opening the record a relation cell points at, and the glyph for a kind; without `onOpenRelation`, relation cells are inert), `isCollapsed` and `onToggleGroup` (your group collapse), `oneHeader` (a grouped grid draws one row of column names, pinned at the top over every group, in place of each group's own; each group's bar pins under it, and the row's checkbox picks every row; off by default, when each group draws its own with the box that picks its rows), `pinFooter` (the footer pins at the foot of the grid's scroll area, `--vk-scroll-inset-bottom` above its edge and, while rows are selected, a step above the bar `renderBar` draws, on a phone the rows then ending at the footer's bottom (measured where it stands; on the foot when it draws none), the rows passing under it, painted the ground and `data-stuck` only while they do; an ungrouped grid's stands at the foot even when its rows don't fill the area, in pages just above the pager, and a grouped grid's each pin while their group's rows run past the foot and close their group otherwise; off by default, when the footer stands after the last row), `renderGroupLabel`, `renderGroupFooter` (a group's paged continuation after its loaded rows), `onHideGroup`, `countOf`, `loadMore` (`hasMore`, `onReveal` and a `label`), `pages` (`GridPages`: `page` from 1, `size`, `total`, the view's count, `exact`, false for a capped count, `sizes`, the page-size pick's choices, default 25, 50 and 100, and `onPage` and `onSize`: an ungrouped grid draws the page you hand and the pager part `vk-grid-pager` under it, `loadMore` is then not drawn, picks clear on a page or size change, and the footer shows only the figures a group carries in `figures`; a grouped grid draws no pager; absent by default), `emptyState`, and `transitionKey`, `transitionPending` and `transitionLabel` (a view change: the wait paints before the new rows mount).
|
|
10
|
+
- Row actions and menus: `rowMenu` (a row's items, on right-click and in its ⋯ tail; the same builder a list takes), `contextMenu` (a right-click menu that differs from it), `rowActions` (buttons in the title cell's action lane, before the grid's own Edit), `onRowDelete` and `deleteLabel` (a delete row in the row's menu), `commands` (the verbs a `command` column's cell opens, by field key; without it a command column is a read-only badge) and `selection` (the list's selection; its optional `renderBar` draws the bar it opens, `SelectionBar` with your verbs, and without one the rows still tick and no bar is drawn).
|
|
11
|
+
- Sort, group and figures: `sort` (`GridSortState`), `sortMark` (a sorted column's header wears `icons.sortAsc` or `icons.sortDesc` after its name; off by default, `aria-sort` saying it either way), `groupBy` (`GridGroupByState`), `sortOptions` (the group band menu's sort, as `GridGroupSortOption`s), `groupMenu` (the parts a group band's ⋯ holds, as `GridGroupMenuPart`s: `"select"` (Select all in group, on a grid with a `selection`), `"sort"`, `"figures"`, `"hide"`; with it the sort list always searches through your `Command` on the `popover` route), `groupSummary` and `onGroupSummaryChange` (which figures ride beside a group's name), `groupFigures` (`GridGroupFigure`s), `countNoun` (`GroupCountNoun`), `aggregates`, `onAggregateChange` and `renderAggregate` (the footer's figure per column), `viewBacked` (a saved view, which changes figures only for field-backed columns) and `defaultCurrency` (the reader's currency, which a money column read as it was entered totals in).
|
|
12
|
+
- Format overrides and their handlers, every map keyed by field key: `optionColors`, `dateStyles`, `durationStyles`, `numberFormats` (decimals null is the field's own), `showTimeOverrides` and `percentDisplays`, each with its `on…Change` handler taking the field key first, and `formatsWritable` (false hides the stored format knobs from the column menu; default true).
|
|
13
|
+
- Columns and preferences: `columnState` and `onColumnStateChange` (order, widths, and which columns show), `renderAddColumn` (your own add-column cell at the header's end, or in the title column's header under `addColumnAt`; without it, or answering `undefined`, `false` or `""`, the grid's own lists the hidden columns; answering `null`, none is drawn and no room is kept for it), `addColumnOnPhone` ("+ Add column" on a phone too, its list in your `Sheet`, or your `Menu` on the `menu` route; off by default), `addColumnAt` (`"title"` stands "+ Add column" as a lone + at the right edge of the title column's header, in reach while the columns scroll, and the tail keeps no room for it; `"end"`, the default, the header row's last cell; with no title column shown it stands at the end), `phonePicking` (a phone picks rows by a long press, the boxes inside the name column before the picture, and always shown on a grouped grid, its titles row's box in the name column's head; needs `selection`; off by default), `parts` (a column per part of a name, a place or a range, offered under its field in "+ Add column"; off by default), `renderColumnMenuRows` (your rows in a column's menu, above Hide), `columnMenuItems` (the same rows as data, on the `menu` route), and the per-user toggles `freezeIdentity` (true on the bare prop, but a grid wired through `useGridTablePrefs` takes the preference `gridFreezeIdentity`, false in `LIST_VIEW_PREF_DEFAULTS`, so its identity columns start unfrozen until the person turns it on; start your prefs with `gridFreezeIdentity: true` to open it frozen), `alwaysCheckboxes`, `verticalBorders` and `scale`; and `headerVerticalBorders` (the header's columns ruled as the rows' are under `verticalBorders`, the last bare; off by default); and `fillWidth` (the columns share the grid's whole width, each in proportion to its own width and never below it, a column the person resized or one with a `grid.maxWidth` keeping its width; a table wider than the grid scrolls sideways as without it; off by default).
|
|
14
|
+
- Writes: `onCellCommit` (`GridCellCommitFn`) and `onCellsCommit` (`GridCellsCommitFn`).
|
|
15
|
+
- States held from outside, each off when left out, as a page that shows the grid's states side by side needs them: `hoveredRow` (a row, by its id, drawn as under the pointer: its tint, its rail's box, its ⋯ and the name's actions, and `data-hovered`, while a real pointer still hovers any row beside it; drawn, as a hover is, only on a screen whose pointer hovers) and `onHoveredRowChange` (the row a person's pointer moves onto, or null off it); `cellPick` (a `GridCellPick` drawn as picked, placed each time its value changes without taking the page's focus; while it is given, null included, a press outside the grid lets go of nothing, and a person's click, drag, keys and Escape move it as always) and `onCellPickChange` (each change a person makes, or null); `openColumnMenu` (the column, by its id, whose menu stands open on the first row of column names, its header cell `data-open`; while it is given, null included, the menus open and close only as it says) and `onOpenColumnMenuChange` (the column a person's press opens, or null when a press, a row of the menu or a press outside closes it, for you to answer).
|
|
16
|
+
- List config: `listConfig` (the settings layer every user of the list inherits, which may only take away from what the columns declare: the table read-only, per-column locks; a constraint on the screen, while your API guards its own writes). The grid only reads it: a surface of your own changes it.
|
|
17
|
+
- `useGridTablePrefs` — wires a list's view preferences to the grid. It takes `prefs` (the list's `ListViewPrefs`), `setPrefs` (stores a patch of them), `columns` (whose money reading the number formats read) and `viewBacked`, and returns `{ gridProps }` to spread on `GridTable`: the borders, row icon, frozen identity, checkboxes and scale, the format overrides, the column state, the group figures and the footer figures, each with the handler that writes it back through `setPrefs`.
|
|
18
|
+
- `useGridTableSettings` — wires a list's settings and a person's layer to the grid, for a list kept as `viewkitjs/fields/query`'s `ListSettings`. It takes `settings`, `layer` (the person's `ListPersonalLayer`), `columns` (the declared ones), `parts` (the same `parts` the grid takes, so a part column the settings place is drawn and moved as the grid draws it), `onChange` (a `ListSettingsChange`, never empty), `onLayerChange` (a layer patch), `defaults` (the reader's `ListDefaults`) and `formats` with `setFormats`, and returns `{ gridProps }` to spread on `GridTable`, as `useGridTablePrefs` does: a column hidden, moved, given a line break or a figure, and a group header's figures, come back through `onChange`; a resize through `onLayerChange` as the person's width (a width taken back by a double-click leaves it); a format through `setFormats`.
|
|
19
|
+
- `GridFormatPrefs` — how a list's fields read, which `useGridTableSettings` takes apart from its settings: `gridOptionColors`, `gridDateStyles`, `gridDurationStyles`, `gridShowTime`, `gridPercentDisplays`, `gridDecimals` and `gridCurrencies`, each keyed by field key.
|
|
20
|
+
|
|
21
|
+
## Sort, group and figures
|
|
22
|
+
|
|
23
|
+
- `GridSortState` — the list's sort, as the header menu reads and writes it: `value` (the sort key in force; for a place column, the part key `partKey(fieldKey, part)` its menu picked, read with `parsePartKey`), `dir` and `onChange({ value, dir })`. The menu is a second control for the same stored sort your view's options drive.
|
|
24
|
+
- `GridGroupByState` — the view's grouping, for the header menu's Group by and Ungroup: `fieldKey` (or null) and `onChange(fieldKey)`, null to ungroup. Present on lists backed by a saved view.
|
|
25
|
+
- `GridGroupSortOption` — one sort a group band's menu offers, sorting the rows of every group at once: its `value`, `label` and an optional `defaultDir`.
|
|
26
|
+
- `GridGroupFigure` — one figure a group's band can show, either a `GridDeclaredFigure` or a `GridDrawnFigure`. Both carry the summary `part` that turns it on.
|
|
27
|
+
- `GridCellPick` — a picked cell and its ranges, `GridTable`'s `cellPick` and what `onCellPickChange` tells: `cell` (a `GridCellAt`) and `ranges`, optional, each `{ from, to }`, two `GridCellAt` corners, the last the active one, which carries the fill dot and the verbs. A record a grouping draws twice is picked on its first copy; a row or a column the grid doesn't draw waits until it does.
|
|
28
|
+
- `GridCellAt` — one cell: `row` (its row's id, `getRowId`'s) and `column` (its column's id).
|
|
29
|
+
- `GridPages` — a grid in pages, `GridTable`'s `pages`: `page` (from 1), `size`, `total` (the view's count), `exact` (false for a capped count, which reads "of 1,000+"; default true), `sizes` (the page-size pick's choices; default 25, 50 and 100), `onPage` and `onSize`.
|
|
30
|
+
- `GridDeclaredFigure` — a figure the grid works out: its `column` (the column's id) and `kind` (a footer pick), written as that column's footer writes it, a paged group's from the source, or as your own footer cell where `renderAggregate` draws one; `label`, optional, is the column's header unless given.
|
|
31
|
+
- `GridDrawnFigure` — a figure you draw: its `label` and `render(group)`, how it draws for a group.
|
|
32
|
+
- `GridGroupMenuPart` — a part of a group band's ⋯ menu: `"select"` (Select all in group, which picks every row of the group or, when all are picked, clears them; on a grid that selects), `"sort"` (its sort choices), `"figures"` (the count and each figure, turned on and off) or `"hide"`.
|
|
33
|
+
- `GridRowOpenedFrom` — what `onOpenRow` hands with the row: the way back to the cell it was opened from. `focus()` puts the focus back on that cell and returns true; `element()` is that cell, for a dialog's final-focus option (pass the function itself: both are plain properties). A record a refetch moved under another group is found again by its id, at its first place; a record no longer shown sends the focus to the grid's frame (`focus()` returns false, `element()` is the frame; a dialog that focuses only a tabbable element, and so passes the frame on to its first one, still leaves the focus on the frame, with no cell selected). On a desktop the cell becomes the grid's selected cell once the focus is on it, so the next arrow moves from it; below your `desktopQuery` only the focus goes back, with no cell selected. Asked while a dialog closes, `element()` is settled again once the close is done: the focus moves to the cell (a row a refetch moved out of the drawn rows is drawn first) unless it went somewhere outside the grid. Once the grid is gone they return `false` and `null`.
|
|
34
|
+
- `GroupCountNoun` — a group count's noun, `{ one, other }`, so a header reads "2 companies"; without one the count is bare.
|
|
35
|
+
|
|
36
|
+
## Writes
|
|
37
|
+
|
|
38
|
+
- `GridCellCommitFn` — writes one cell: `(row, columnId, value, context?)`, returning a promise of nothing or a `GridCommitOutcome`. Nothing counts as confirmed; a rejection rolls the cell back. `context` is present on an undo or a redo.
|
|
39
|
+
- `GridCellsCommitFn` — writes several cells at once (a paste, a fill, an undo of several): `(edits)`, each `{ row, columnId, value, context? }`, returning a promise of nothing or one outcome per edit, in order. A failed edit rolls its own cell back. Without it, or for a single cell, the grid calls `GridCellCommitFn` for each.
|
|
40
|
+
- `GridCommitContext` — what a write is: `{ kind: "commit" }`, with `reload: false` when the caller reloads once after a second write, or `{ kind: "restore", expected }`, an undo or a redo writing a value back, `expected` the value the cell is held to before it.
|
|
41
|
+
- `GridCommitOutcome` — how a write ended. `confirmed`, with an optional `history` (false keeps it out of undo, or `{ prev, next }` are the values undo and redo write instead), `settlement` (`requested`: the row holds the value but its provider has not accepted it yet, and the cell says so) and `stored` (what was kept, when it isn't what the cell sent, as the row reads it in this column: the cell shows it in place of what was typed, undo and redo restore from it, and no "changed elsewhere" follows; ignored on an undo or a redo); `unconfirmed`, never in the undo history; or `failed`, with an optional `error`, which rolls the cell back.
|
|
42
|
+
|
|
43
|
+
## Helpers a binding shares
|
|
44
|
+
|
|
45
|
+
- `deriveGridSelectValues` — the values each select, status and multiselect column offers, given the columns and the rows: column id to values. A status offers its options; a select or multiselect offers its options, then the values the rows hold, each once. Archived values are left out unless `includeArchived` is set, as a filter sets it so a row still holding a retired value can be found.
|
|
46
|
+
- `deriveGridRelationValues` — the relations present in the loaded rows, given the columns and the rows: column id to `ListRelationValue`s, each once, sorted by label, for every relation, user and actor column (an actor's id is its key). It reads the rows, never the candidates a column can link to, so a filter lists only what the table holds.
|
|
47
|
+
- `cellEditBaseline` — the value an edit of a cell starts from: the column's pending value when one is given, else the column's `editAccessor`, else its `accessor`.
|
|
48
|
+
- `cellCopyText` — a cell's value as copied text, given its column and its baseline (from `cellEditBaseline`), which a CSV export can reuse. Empty for no value; a relation or an actor copies as its name, not its id; a select, status or multiselect copies as its options' labels, not their keys; a place, a name and a range copy as their cells write them; a list copies its items joined by commas, several values of one kind their values, the main one first.
|
|
49
|
+
- `GRID_TITLE_LINK_CLASS` — the class that dresses the row-open text inside a title cell (the element carrying `data-cell-open`) as a link on its own hover: the brand colour and an underline.
|
|
50
|
+
|
|
51
|
+
## The lab
|
|
52
|
+
|
|
53
|
+
What a grid's recorder hands your app while the lab asks for one. The lab itself, `setGridLab` and `GridLab`, is on the root door (`viewkitjs/views`), so an app's shell can set it without loading the grid.
|
|
54
|
+
|
|
55
|
+
- `GridRecording` — one recording: `v` (1), `id`, `session` (one per page life), `startedAt`, the `GridRecordingContext` it was made in, `scrolls` (`GridScrollSample`s), `frames` (each animation frame's time), `touches` (`GridTouchSample`s), its `summary` (a `GridRecordingSummary`) and `dropped` (the samples left out past a cap, per kind). Times are in milliseconds since the recording began.
|
|
56
|
+
- `GridRecordingContext` — what a recording was made in: `page` (the path), `lab` (`overscan`, the rows drawn beyond each edge of the view), `device` (`ua`, `dpr`, `screen`, `viewport`, `cores`) and `grid` (`rows`, `groups`, `rowHeight`).
|
|
57
|
+
- `GridScrollSample` — one scroll event of the grid's own area: `[time, scrollTop, scrollLeft, handler ms, rendered (0 or 1), rows drawn, pinned (0 or 1), scrollHeight]`.
|
|
58
|
+
- `GridTouchKind` — what a touch sample marks: `"start"` or `"end"`.
|
|
59
|
+
- `GridTouchSample` — `[time, kind, x, y]` in client pixels; an `"end"` carries the finger's release speed in pixels per second as `x` and `y`.
|
|
60
|
+
- `GridRecordingSummary` — what a recording adds up to: `durationMs`, `scrollEvents`, `eventGapMs`, `jumpPx` and `handlerMs` (each `{ p50, p90, max }`; gaps over a second are pauses and left out), `aheadPx` (`overscan` × the row height), `jumpsOverAhead` (scroll events that moved farther than the rows drawn ahead), `frameGapMs` and `framesOver50ms`, `maxLeftPx`, `pinFlips`, `scrollHeightChanges` and `longestStillTouchMs` (the longest stretch with a finger down and no scroll event).
|
|
61
|
+
- `GridSpread` — a spread of one measure in a summary: `{ p50, p90, max }`, by nearest rank.
|
|
62
|
+
- `GRID_RECORDER_CAPS` — the most samples one recording holds, per kind: `{ scrolls: 4000, frames: 8000, touches: 2000 }`.
|
|
63
|
+
|
|
64
|
+
The recorder can't see the screen: on iOS the screen scrolls on its own while the page draws, so it measures how late the page is, not how much of the screen was blank.
|