viewkitjs 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (530) hide show
  1. package/CHANGELOG.md +218 -0
  2. package/MIGRATION.md +181 -11
  3. package/fields/dist/derived.d.ts +2 -1
  4. package/fields/dist/derived.js +9 -3
  5. package/fields/dist/entities.js +41 -3
  6. package/fields/dist/index.d.ts +1 -1
  7. package/fields/dist/index.js +1 -1
  8. package/fields/dist/messages.d.ts +8 -2
  9. package/fields/dist/messages.js +3 -0
  10. package/fields/dist/range.d.ts +6 -0
  11. package/fields/dist/range.js +8 -0
  12. package/fields/dist/registry.js +11 -1
  13. package/fields/dist/spec-changes.js +1 -0
  14. package/fields/dist/types.d.ts +23 -1
  15. package/fields/docs/guides/derived-fields.md +7 -5
  16. package/fields/docs/guides/field-types.md +2 -2
  17. package/fields/docs/guides/the-index.md +1 -1
  18. package/fields/docs/reference/fields.md +3 -1
  19. package/fields/docs/reference/types.md +3 -1
  20. package/fields/skills/viewkit/SKILL.md +1 -1
  21. package/package.json +2 -1
  22. package/postgres/dist/definitions/build.js +29 -5
  23. package/postgres/dist/definitions/label.d.ts +7 -0
  24. package/postgres/dist/definitions/label.js +9 -1
  25. package/postgres/dist/definitions/lookup.js +6 -2
  26. package/postgres/dist/definitions/place.d.ts +6 -3
  27. package/postgres/dist/definitions/rollup.js +5 -1
  28. package/postgres/dist/definitions/storage.d.ts +15 -0
  29. package/postgres/dist/definitions/storage.js +52 -1
  30. package/postgres/dist/definitions/stored.js +21 -0
  31. package/postgres/dist/phone.d.ts +13 -1
  32. package/postgres/dist/phone.js +23 -3
  33. package/postgres/dist/search-indexes.d.ts +6 -1
  34. package/postgres/dist/search-indexes.js +71 -25
  35. package/postgres/dist/search.js +3 -3
  36. package/postgres/docs/guides/definitions.md +22 -5
  37. package/postgres/docs/guides/field-map.md +5 -4
  38. package/postgres/docs/reference/definitions.md +3 -3
  39. package/postgres/docs/reference/postgres.md +1 -1
  40. package/views/dist/cells/cell-format.d.ts +2 -2
  41. package/views/dist/cells/cell-format.js +2 -2
  42. package/views/dist/cells/cell-values.js +9 -12
  43. package/views/dist/contract.d.ts +161 -18
  44. package/views/dist/contract.js +170 -28
  45. package/views/dist/controls/bulk-bar/bulk-bar-of.d.ts +66 -0
  46. package/views/dist/controls/bulk-bar/bulk-bar-of.js +22 -0
  47. package/views/dist/controls/bulk-bar/bulk-bar.d.ts +40 -0
  48. package/views/dist/controls/bulk-bar/bulk-bar.js +278 -0
  49. package/views/dist/controls/bulk-bar/looks.d.ts +10 -0
  50. package/views/dist/controls/bulk-bar/looks.js +14 -0
  51. package/views/dist/controls/bulk-bar/map-selection-bar.d.ts +19 -0
  52. package/views/dist/controls/bulk-bar/map-selection-bar.js +57 -0
  53. package/views/dist/controls/bulk-bar/tokens.d.ts +136 -0
  54. package/views/dist/controls/bulk-bar/tokens.js +36 -0
  55. package/views/dist/controls/bulk-bar/words.d.ts +50 -0
  56. package/views/dist/controls/bulk-bar/words.js +19 -0
  57. package/views/dist/controls/bulk-bar.css +96 -0
  58. package/views/dist/controls/button/button.js +3 -1
  59. package/views/dist/controls/button.css +5 -4
  60. package/views/dist/controls/checkbox/checkbox.js +3 -1
  61. package/views/dist/controls/checkbox.css +1 -1
  62. package/views/dist/controls/choice/tokens.d.ts +79 -0
  63. package/views/dist/controls/choice/tokens.js +22 -0
  64. package/views/dist/controls/choice.css +31 -0
  65. package/views/dist/controls/compound-editor/looks.js +1 -1
  66. package/views/dist/controls/controls.d.ts +8 -0
  67. package/views/dist/controls/controls.js +8 -0
  68. package/views/dist/controls/customize/customize.d.ts +176 -0
  69. package/views/dist/controls/customize/customize.js +348 -0
  70. package/views/dist/controls/customize/glide.d.ts +10 -0
  71. package/views/dist/controls/customize/glide.js +55 -0
  72. package/views/dist/controls/customize/looks.d.ts +13 -0
  73. package/views/dist/controls/customize/looks.js +11 -0
  74. package/views/dist/controls/customize/map-customize-body.d.ts +15 -0
  75. package/views/dist/controls/customize/map-customize-body.js +195 -0
  76. package/views/dist/controls/customize/map-ranges.d.ts +23 -0
  77. package/views/dist/controls/customize/map-ranges.js +41 -0
  78. package/views/dist/controls/customize/rules.d.ts +39 -0
  79. package/views/dist/controls/customize/rules.js +21 -0
  80. package/views/dist/controls/customize/tokens.d.ts +40 -0
  81. package/views/dist/controls/customize/tokens.js +12 -0
  82. package/views/dist/controls/customize/words.d.ts +65 -0
  83. package/views/dist/controls/customize/words.js +42 -0
  84. package/views/dist/controls/customize.css +57 -0
  85. package/views/dist/controls/date-editor/looks.js +1 -1
  86. package/views/dist/controls/filter-editor/block.d.ts +31 -0
  87. package/views/dist/controls/filter-editor/block.js +27 -0
  88. package/views/dist/controls/filter-editor/filter-editor.d.ts +4 -0
  89. package/views/dist/controls/filter-editor/filter-editor.js +86 -43
  90. package/views/dist/controls/filter-editor/how.d.ts +1 -1
  91. package/views/dist/controls/filter-editor/how.js +1 -0
  92. package/views/dist/controls/filter-editor/map-filter-body.d.ts +16 -1
  93. package/views/dist/controls/filter-editor/map-filter-body.js +39 -13
  94. package/views/dist/controls/filter-editor/map-rules.d.ts +27 -11
  95. package/views/dist/controls/filter-editor/map-rules.js +73 -42
  96. package/views/dist/controls/filter-editor/rules.d.ts +42 -5
  97. package/views/dist/controls/filter-editor/rules.js +55 -2
  98. package/views/dist/controls/filter-editor/words.d.ts +15 -0
  99. package/views/dist/controls/filter-editor/words.js +6 -0
  100. package/views/dist/controls/filter-editor.css +18 -0
  101. package/views/dist/controls/index.d.ts +33 -9
  102. package/views/dist/controls/index.js +32 -9
  103. package/views/dist/controls/inline-input/looks.js +1 -1
  104. package/views/dist/controls/input/input.js +10 -4
  105. package/views/dist/controls/internal/phone.d.ts +5 -4
  106. package/views/dist/controls/internal/phone.js +7 -7
  107. package/views/dist/controls/internal/scroll.js +5 -1
  108. package/views/dist/controls/internal/typed-run.d.ts +2 -0
  109. package/views/dist/controls/internal/typed-run.js +5 -0
  110. package/views/dist/controls/menu/map-menu.js +2 -2
  111. package/views/dist/controls/menu-list/menu-list.d.ts +16 -1
  112. package/views/dist/controls/menu-list/menu-list.js +26 -8
  113. package/views/dist/controls/menu-list.css +8 -0
  114. package/views/dist/controls/number-editor/looks.js +1 -1
  115. package/views/dist/controls/option/option.js +3 -1
  116. package/views/dist/controls/option.css +1 -1
  117. package/views/dist/controls/pane/pane.d.ts +4 -0
  118. package/views/dist/controls/pane/pane.js +2 -1
  119. package/views/dist/controls/picker/looks.js +1 -1
  120. package/views/dist/controls/picker/map-picker.d.ts +6 -2
  121. package/views/dist/controls/picker/map-picker.js +4 -2
  122. package/views/dist/controls/picker/picker.d.ts +7 -0
  123. package/views/dist/controls/picker/picker.js +57 -8
  124. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  125. package/views/dist/controls/popover/map-popover.js +2 -2
  126. package/views/dist/controls/popover/popover.js +2 -1
  127. package/views/dist/controls/popover.css +3 -0
  128. package/views/dist/controls/ports-host/map-ports-host.d.ts +7 -0
  129. package/views/dist/controls/ports-host/map-ports-host.js +43 -0
  130. package/views/dist/controls/press/tokens.d.ts +8 -0
  131. package/views/dist/controls/press/tokens.js +4 -0
  132. package/views/dist/controls/press.css +44 -0
  133. package/views/dist/controls/quick-filters/looks.d.ts +11 -0
  134. package/views/dist/controls/quick-filters/looks.js +9 -0
  135. package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +31 -0
  136. package/views/dist/controls/quick-filters/map-quick-filters-body.js +59 -0
  137. package/views/dist/controls/quick-filters/quick-filters.d.ts +37 -0
  138. package/views/dist/controls/quick-filters/quick-filters.js +89 -0
  139. package/views/dist/controls/quick-filters/reminder.d.ts +18 -0
  140. package/views/dist/controls/quick-filters/reminder.js +41 -0
  141. package/views/dist/controls/quick-filters/rules.d.ts +89 -0
  142. package/views/dist/controls/quick-filters/rules.js +52 -0
  143. package/views/dist/controls/quick-filters/tokens.d.ts +112 -0
  144. package/views/dist/controls/quick-filters/tokens.js +30 -0
  145. package/views/dist/controls/quick-filters/words.d.ts +25 -0
  146. package/views/dist/controls/quick-filters/words.js +13 -0
  147. package/views/dist/controls/quick-filters.css +118 -0
  148. package/views/dist/controls/sheet/bottom-sheet.d.ts +9 -4
  149. package/views/dist/controls/sheet/bottom-sheet.js +4 -4
  150. package/views/dist/controls/sheet/map-sheet.d.ts +4 -1
  151. package/views/dist/controls/sheet/map-sheet.js +19 -6
  152. package/views/dist/controls/sheet/sheet-parts.d.ts +10 -0
  153. package/views/dist/controls/sheet/sheet-parts.js +2 -0
  154. package/views/dist/controls/switch-row/switch-row.d.ts +15 -0
  155. package/views/dist/controls/switch-row/switch-row.js +9 -0
  156. package/views/dist/controls/switch-row/tokens.d.ts +51 -0
  157. package/views/dist/controls/switch-row/tokens.js +15 -0
  158. package/views/dist/controls/switch-row.css +39 -0
  159. package/views/dist/controls/switch.css +1 -1
  160. package/views/dist/controls/tag/tag.js +3 -1
  161. package/views/dist/controls/tag-field/tag-field.d.ts +20 -0
  162. package/views/dist/controls/tag-field/tag-field.js +19 -0
  163. package/views/dist/controls/tag-field/tokens.d.ts +7 -0
  164. package/views/dist/controls/tag-field/tokens.js +4 -0
  165. package/views/dist/controls/tag-field.css +13 -0
  166. package/views/dist/controls/text-editor/looks.js +1 -1
  167. package/views/dist/controls/text-editor/map-text-body.d.ts +1 -1
  168. package/views/dist/controls/text-editor/map-text-body.js +2 -2
  169. package/views/dist/controls/text-editor/text-editor.d.ts +3 -0
  170. package/views/dist/controls/text-editor/text-editor.js +17 -7
  171. package/views/dist/controls/text-editor.css +11 -0
  172. package/views/dist/controls/toast/toast.d.ts +5 -1
  173. package/views/dist/controls/toast/toast.js +5 -3
  174. package/views/dist/controls/tokens.js +18 -0
  175. package/views/dist/controls/toolbar/keys.d.ts +3 -0
  176. package/views/dist/controls/toolbar/keys.js +11 -0
  177. package/views/dist/controls/toolbar/looks.d.ts +10 -0
  178. package/views/dist/controls/toolbar/looks.js +40 -0
  179. package/views/dist/controls/toolbar/tokens.d.ts +28 -0
  180. package/views/dist/controls/toolbar/tokens.js +9 -0
  181. package/views/dist/controls/toolbar/toolbar.d.ts +111 -0
  182. package/views/dist/controls/toolbar/toolbar.js +370 -0
  183. package/views/dist/controls/toolbar/words.d.ts +28 -0
  184. package/views/dist/controls/toolbar/words.js +17 -0
  185. package/views/dist/controls/toolbar-button/looks.d.ts +4 -0
  186. package/views/dist/controls/toolbar-button/looks.js +21 -0
  187. package/views/dist/controls/toolbar-button/tokens.d.ts +103 -0
  188. package/views/dist/controls/toolbar-button/tokens.js +28 -0
  189. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +66 -0
  190. package/views/dist/controls/toolbar-button/toolbar-button.js +51 -0
  191. package/views/dist/controls/toolbar-button.css +75 -0
  192. package/views/dist/controls/toolbar.css +65 -0
  193. package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
  194. package/views/dist/controls/tooltip/map-tooltip.js +2 -2
  195. package/views/dist/controls/tooltip/tooltip.d.ts +3 -1
  196. package/views/dist/controls/tooltip/tooltip.js +2 -2
  197. package/views/dist/controls/values-editor/looks.js +1 -1
  198. package/views/dist/controls/values-editor/values.js +6 -2
  199. package/views/dist/controls/views-list/map-views-list-body.d.ts +4 -1
  200. package/views/dist/controls/views-list/map-views-list-body.js +128 -4
  201. package/views/dist/controls/views-list/rules.d.ts +26 -0
  202. package/views/dist/controls/views-list/rules.js +63 -0
  203. package/views/dist/controls/views-list/view-menu.d.ts +84 -0
  204. package/views/dist/controls/views-list/view-menu.js +201 -0
  205. package/views/dist/controls/views-list/views-list.d.ts +8 -1
  206. package/views/dist/controls/views-list/views-list.js +18 -3
  207. package/views/dist/controls/views-list/words.d.ts +54 -0
  208. package/views/dist/controls/views-list/words.js +10 -1
  209. package/views/dist/controls/views-list.css +5 -1
  210. package/views/dist/display/date.js +3 -3
  211. package/views/dist/display/format.d.ts +6 -0
  212. package/views/dist/display/format.js +3 -0
  213. package/views/dist/display/index.d.ts +1 -1
  214. package/views/dist/display/index.js +1 -1
  215. package/views/dist/display/options.d.ts +1 -1
  216. package/views/dist/display/range.d.ts +2 -1
  217. package/views/dist/display/range.js +4 -1
  218. package/views/dist/display/rich-text.js +0 -1
  219. package/views/dist/editors/ChipsEditor.d.ts +4 -5
  220. package/views/dist/editors/ChipsEditor.js +12 -78
  221. package/views/dist/editors/DateEditor.d.ts +12 -16
  222. package/views/dist/editors/DateEditor.js +40 -191
  223. package/views/dist/editors/EditorPanel.d.ts +2 -6
  224. package/views/dist/editors/EditorPanel.js +2 -2
  225. package/views/dist/editors/LocationEditor.d.ts +11 -19
  226. package/views/dist/editors/LocationEditor.js +19 -211
  227. package/views/dist/editors/NameEditor.d.ts +8 -16
  228. package/views/dist/editors/NameEditor.js +11 -100
  229. package/views/dist/editors/NumberEditor.d.ts +14 -21
  230. package/views/dist/editors/NumberEditor.js +22 -49
  231. package/views/dist/editors/RangeEditor.d.ts +9 -33
  232. package/views/dist/editors/RangeEditor.js +12 -97
  233. package/views/dist/editors/RelationEditor.d.ts +6 -9
  234. package/views/dist/editors/RelationEditor.js +11 -30
  235. package/views/dist/editors/RelationSetEditor.d.ts +13 -24
  236. package/views/dist/editors/RelationSetEditor.js +33 -101
  237. package/views/dist/editors/SelectEditor.d.ts +15 -17
  238. package/views/dist/editors/SelectEditor.js +15 -94
  239. package/views/dist/editors/TextEditor.d.ts +23 -26
  240. package/views/dist/editors/TextEditor.js +11 -48
  241. package/views/dist/editors/ValueListEditor.d.ts +14 -23
  242. package/views/dist/editors/ValueListEditor.js +16 -202
  243. package/views/dist/editors/body-panel.d.ts +13 -7
  244. package/views/dist/editors/body-panel.js +3 -7
  245. package/views/dist/editors/edit-cores.d.ts +15 -15
  246. package/views/dist/editors/edit-cores.js +14 -14
  247. package/views/dist/editors/number-body.d.ts +1 -1
  248. package/views/dist/editors/number-step.d.ts +0 -34
  249. package/views/dist/editors/number-step.js +0 -37
  250. package/views/dist/editors/option-add-flow.d.ts +1 -13
  251. package/views/dist/editors/option-add-flow.js +0 -22
  252. package/views/dist/editors/relation-links-body.d.ts +2 -3
  253. package/views/dist/editors/relation-picker.d.ts +13 -3
  254. package/views/dist/editors/relation-source.d.ts +0 -22
  255. package/views/dist/editors/relation-source.js +0 -21
  256. package/views/dist/field-row/FieldRow.js +5 -6
  257. package/views/dist/field-row/FieldRowLane.js +0 -1
  258. package/views/dist/field-row/editors/RowChipsEditor.js +2 -2
  259. package/views/dist/field-row/editors/RowDateEditor.d.ts +2 -2
  260. package/views/dist/field-row/editors/RowDateEditor.js +2 -2
  261. package/views/dist/field-row/editors/RowNameEditor.d.ts +2 -5
  262. package/views/dist/field-row/editors/RowNameEditor.js +7 -12
  263. package/views/dist/field-row/editors/RowNumberEditor.d.ts +1 -1
  264. package/views/dist/field-row/editors/RowNumberEditor.js +4 -4
  265. package/views/dist/field-row/editors/RowPlaceEditor.js +3 -3
  266. package/views/dist/field-row/editors/RowRangeEditor.d.ts +2 -5
  267. package/views/dist/field-row/editors/RowRangeEditor.js +7 -14
  268. package/views/dist/field-row/editors/RowRelationEditor.js +3 -3
  269. package/views/dist/field-row/editors/RowSelectEditor.js +2 -2
  270. package/views/dist/field-row/editors/RowTextEditor.d.ts +1 -1
  271. package/views/dist/field-row/editors/RowTextEditor.js +3 -4
  272. package/views/dist/field-row/editors/RowValueListEditor.js +5 -5
  273. package/views/dist/field-row/field-row-button.d.ts +6 -9
  274. package/views/dist/field-row/field-row-button.js +1 -6
  275. package/views/dist/field-row/field-row-checkbox.d.ts +1 -1
  276. package/views/dist/field-row/row-target.d.ts +0 -7
  277. package/views/dist/field-row/row-target.js +0 -2
  278. package/views/dist/grid/chrome/GridAddColumn.d.ts +2 -1
  279. package/views/dist/grid/chrome/GridAddColumn.js +8 -66
  280. package/views/dist/grid/chrome/GridAggregateMenu.d.ts +5 -7
  281. package/views/dist/grid/chrome/GridAggregateMenu.js +20 -39
  282. package/views/dist/grid/chrome/GridCellEditors.d.ts +2 -2
  283. package/views/dist/grid/chrome/GridCellEditors.js +12 -12
  284. package/views/dist/grid/chrome/GridChipsEditor.js +3 -3
  285. package/views/dist/grid/chrome/GridColumnMenu.d.ts +11 -12
  286. package/views/dist/grid/chrome/GridColumnMenu.js +32 -93
  287. package/views/dist/grid/chrome/GridDateEditor.d.ts +6 -6
  288. package/views/dist/grid/chrome/GridDateEditor.js +3 -3
  289. package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -6
  290. package/views/dist/grid/chrome/GridGroupMenu.js +21 -62
  291. package/views/dist/grid/chrome/GridHeader.d.ts +1 -2
  292. package/views/dist/grid/chrome/GridHeader.js +3 -2
  293. package/views/dist/grid/chrome/GridLongTextEditor.d.ts +17 -38
  294. package/views/dist/grid/chrome/GridLongTextEditor.js +6 -7
  295. package/views/dist/grid/chrome/GridNameEditor.js +4 -4
  296. package/views/dist/grid/chrome/GridNumberEditor.d.ts +4 -5
  297. package/views/dist/grid/chrome/GridNumberEditor.js +5 -6
  298. package/views/dist/grid/chrome/GridPlaceEditor.d.ts +2 -5
  299. package/views/dist/grid/chrome/GridPlaceEditor.js +5 -5
  300. package/views/dist/grid/chrome/GridRangeEditor.d.ts +6 -12
  301. package/views/dist/grid/chrome/GridRangeEditor.js +7 -15
  302. package/views/dist/grid/chrome/GridRelationEditor.js +5 -5
  303. package/views/dist/grid/chrome/GridRow.js +0 -3
  304. package/views/dist/grid/chrome/GridRowActions.d.ts +1 -1
  305. package/views/dist/grid/chrome/GridRowActions.js +0 -5
  306. package/views/dist/grid/chrome/GridRowCells.js +11 -7
  307. package/views/dist/grid/chrome/GridSelectEditor.js +3 -3
  308. package/views/dist/grid/chrome/GridStructure.js +0 -1
  309. package/views/dist/grid/chrome/GridTable.js +1 -1
  310. package/views/dist/grid/chrome/GridTextEditor.d.ts +5 -7
  311. package/views/dist/grid/chrome/GridTextEditor.js +5 -18
  312. package/views/dist/grid/chrome/GridValueListEditor.js +4 -4
  313. package/views/dist/grid/chrome/grid-body-place.d.ts +2 -3
  314. package/views/dist/grid/chrome/grid-body-place.js +4 -8
  315. package/views/dist/grid/chrome/grid-button.d.ts +7 -10
  316. package/views/dist/grid/chrome/grid-button.js +1 -6
  317. package/views/dist/grid/chrome/grid-cell-classes.js +1 -1
  318. package/views/dist/grid/chrome/grid-column-menu-items.d.ts +4 -4
  319. package/views/dist/grid/chrome/grid-column-menu-items.js +10 -6
  320. package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -1
  321. package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
  322. package/views/dist/grid/chrome/grid-fitted-box.d.ts +7 -1
  323. package/views/dist/grid/chrome/grid-fitted-box.js +4 -4
  324. package/views/dist/grid/chrome/grid-group-menu-parts.d.ts +5 -9
  325. package/views/dist/grid/chrome/grid-group-menu-parts.js +1 -3
  326. package/views/dist/grid/chrome/grid-hover.js +0 -1
  327. package/views/dist/grid/chrome/grid-menu-focus.d.ts +7 -31
  328. package/views/dist/grid/chrome/grid-menu-focus.js +7 -47
  329. package/views/dist/grid/chrome/grid-styles.d.ts +0 -3
  330. package/views/dist/grid/chrome/grid-styles.js +0 -1
  331. package/views/dist/grid/chrome/grid-table-props.d.ts +6 -10
  332. package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -4
  333. package/views/dist/grid/core/clipboard-model.js +9 -4
  334. package/views/dist/grid/core/editing-controller.d.ts +2 -1
  335. package/views/dist/grid/core/editing-controller.js +10 -2
  336. package/views/dist/grid/core/refusal-sentence.d.ts +3 -0
  337. package/views/dist/grid/core/refusal-sentence.js +2 -2
  338. package/views/dist/grid/core/write-states.d.ts +3 -1
  339. package/views/dist/grid/core/write-states.js +6 -2
  340. package/views/dist/grid/grid.css +240 -0
  341. package/views/dist/grid/looks.d.ts +5 -1
  342. package/views/dist/grid/looks.js +20 -12
  343. package/views/dist/grid-tokens.d.ts +109 -0
  344. package/views/dist/grid-tokens.js +29 -0
  345. package/views/dist/looks/index.d.ts +5 -0
  346. package/views/dist/looks/index.js +5 -0
  347. package/views/dist/looks/pieces.js +10 -0
  348. package/views/dist/model/body-frame.d.ts +0 -32
  349. package/views/dist/model/body-frame.js +1 -15
  350. package/views/dist/model/column-capabilities.d.ts +2 -0
  351. package/views/dist/model/column-filters.d.ts +2 -1
  352. package/views/dist/model/column-from.js +2 -2
  353. package/views/dist/model/column-inspect.d.ts +5 -5
  354. package/views/dist/model/column-inspect.js +2 -2
  355. package/views/dist/model/relation-filters.d.ts +2 -0
  356. package/views/dist/panels/customize-body.d.ts +1 -10
  357. package/views/dist/panels/customize-body.js +0 -3
  358. package/views/dist/panels/filter/MenuSelect.js +0 -5
  359. package/views/dist/panels/filter/RangeFilterBody.js +0 -1
  360. package/views/dist/panels/filter/details.d.ts +1 -5
  361. package/views/dist/panels/filter/details.js +0 -13
  362. package/views/dist/panels/filter/filter-list.d.ts +0 -1
  363. package/views/dist/panels/filter/filter-list.js +1 -1
  364. package/views/dist/panels/index.d.ts +2 -2
  365. package/views/dist/panels/index.js +2 -2
  366. package/views/dist/panels/labels.d.ts +4 -0
  367. package/views/dist/panels/labels.js +8 -0
  368. package/views/dist/panels/model.d.ts +10 -2
  369. package/views/dist/panels/panel-button.d.ts +10 -12
  370. package/views/dist/panels/panel-button.js +1 -6
  371. package/views/dist/panels/quick/model.d.ts +4 -0
  372. package/views/dist/panels/react/chrome.d.ts +0 -17
  373. package/views/dist/panels/react/chrome.js +0 -8
  374. package/views/dist/panels/react/customize-body.d.ts +14 -12
  375. package/views/dist/panels/react/customize-body.js +93 -19
  376. package/views/dist/panels/react/customize.d.ts +16 -12
  377. package/views/dist/panels/react/customize.js +4 -110
  378. package/views/dist/panels/react/filter/FilterEditor.d.ts +4 -18
  379. package/views/dist/panels/react/filter/FilterEditor.js +6 -330
  380. package/views/dist/panels/react/filter/FilterFieldList.d.ts +1 -1
  381. package/views/dist/panels/react/filter/FilterFieldList.js +27 -51
  382. package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +1 -11
  383. package/views/dist/panels/react/filter/PhoneFilterEditor.js +8 -144
  384. package/views/dist/panels/react/filter/editor-ctx.d.ts +1 -33
  385. package/views/dist/panels/react/filter/editor-ctx.js +5 -33
  386. package/views/dist/panels/react/filter/filter-body.js +5 -2
  387. package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -6
  388. package/views/dist/panels/react/filter/filter-part-body.js +0 -5
  389. package/views/dist/panels/react/filter/rule-writes.d.ts +1 -26
  390. package/views/dist/panels/react/filter/rule-writes.js +4 -95
  391. package/views/dist/panels/react/order-details.d.ts +1 -26
  392. package/views/dist/panels/react/order-details.js +3 -69
  393. package/views/dist/panels/react/panel-header.js +0 -1
  394. package/views/dist/panels/react/panel-step.d.ts +3 -0
  395. package/views/dist/panels/react/panel-step.js +2 -1
  396. package/views/dist/panels/react/popover.d.ts +4 -7
  397. package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +2 -4
  398. package/views/dist/panels/react/quick/QuickFiltersPanel.js +16 -136
  399. package/views/dist/panels/react/sort/SortEditor.d.ts +4 -4
  400. package/views/dist/panels/react/sort/SortEditor.js +8 -245
  401. package/views/dist/panels/react/sort/SortFieldList.d.ts +1 -1
  402. package/views/dist/panels/react/sort/SortFieldList.js +11 -25
  403. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +13 -3
  404. package/views/dist/panels/react/toolbar/ReadyToolbar.js +10 -3
  405. package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
  406. package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +2 -2
  407. package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
  408. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +16 -18
  409. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -1
  410. package/views/dist/panels/react/toolbar/ToolbarFilters.js +3 -3
  411. package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +12 -4
  412. package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -2
  413. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
  414. package/views/dist/panels/react/toolbar/ToolbarSave.js +0 -4
  415. package/views/dist/panels/react/toolbar/ToolbarSearch.js +0 -1
  416. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +3 -3
  417. package/views/dist/panels/react/view-actions.js +0 -1
  418. package/views/dist/panels/react/views-row/FoldingViewRow.js +2 -5
  419. package/views/dist/panels/react/views-row/ViewCreatePill.js +0 -1
  420. package/views/dist/panels/react/views-row/ViewPicker.js +30 -45
  421. package/views/dist/panels/react/views-row/ViewPickerRow.js +0 -2
  422. package/views/dist/panels/react/views-row/menu-classes.d.ts +0 -4
  423. package/views/dist/panels/react/views-row/menu-classes.js +0 -2
  424. package/views/dist/panels/react.d.ts +5 -12
  425. package/views/dist/panels/react.js +5 -12
  426. package/views/dist/panels/settings/filter-groups.d.ts +3 -0
  427. package/views/dist/panels/settings/filter-groups.js +40 -9
  428. package/views/dist/panels/settings/filters.d.ts +5 -0
  429. package/views/dist/panels/settings/filters.js +12 -6
  430. package/views/dist/panels/views-row/model.d.ts +10 -1
  431. package/views/dist/provider/ViewsProvider.d.ts +2 -46
  432. package/views/dist/provider/ViewsProvider.js +31 -27
  433. package/views/dist/provider/components.d.ts +295 -107
  434. package/views/dist/provider/context.d.ts +7 -21
  435. package/views/dist/provider/missing-slot.d.ts +3 -7
  436. package/views/dist/provider/missing-slot.js +2 -9
  437. package/views/dist/provider/ports.d.ts +18 -6
  438. package/views/dist/provider/ports.js +2 -1
  439. package/views/dist/react.d.ts +2 -3
  440. package/views/dist/react.js +1 -1
  441. package/views/dist/selection/SelectionBar.d.ts +2 -16
  442. package/views/dist/selection/SelectionBar.js +6 -4
  443. package/views/dist/selection/bar-props.d.ts +26 -0
  444. package/views/dist/selection/bar-props.js +1 -0
  445. package/views/dist/selection/index.d.ts +1 -1
  446. package/views/dist/selection/verbs.d.ts +32 -5
  447. package/views/dist/styles.css +694 -191
  448. package/views/dist/styles.unlayered.css +691 -188
  449. package/views/docs/contract.md +133 -130
  450. package/views/docs/controls/bulk-bar.md +41 -0
  451. package/views/docs/controls/choice.md +25 -0
  452. package/views/docs/controls/customize.md +17 -0
  453. package/views/docs/controls/popover.md +2 -0
  454. package/views/docs/controls/press.md +9 -0
  455. package/views/docs/controls/quick-filters.md +35 -0
  456. package/views/docs/controls/radio.md +1 -1
  457. package/views/docs/controls/switch-row.md +18 -0
  458. package/views/docs/controls/tag-field.md +7 -0
  459. package/views/docs/controls/toolbar-button.md +31 -0
  460. package/views/docs/controls/toolbar.md +14 -0
  461. package/views/docs/getting-started.md +222 -2
  462. package/views/docs/guides/atoms.md +2 -2
  463. package/views/docs/guides/cells.md +224 -4
  464. package/views/docs/guides/display.md +3 -3
  465. package/views/docs/guides/editors.md +235 -20
  466. package/views/docs/guides/looks.md +8 -2
  467. package/views/docs/guides/ports.md +7 -7
  468. package/views/docs/guides/selection.md +5 -1
  469. package/views/docs/guides/the-grid.md +15 -17
  470. package/views/docs/guides/the-provider.md +9 -15
  471. package/views/docs/install.md +4 -1
  472. package/views/docs/reference/cells.md +2 -2
  473. package/views/docs/reference/controls.md +215 -21
  474. package/views/docs/reference/display.md +1 -0
  475. package/views/docs/reference/editors-chips.md +2 -2
  476. package/views/docs/reference/editors-date.md +4 -4
  477. package/views/docs/reference/editors-location.md +4 -7
  478. package/views/docs/reference/editors-name.md +3 -5
  479. package/views/docs/reference/editors-number.md +10 -10
  480. package/views/docs/reference/editors-panel.md +3 -3
  481. package/views/docs/reference/editors-range.md +3 -5
  482. package/views/docs/reference/editors-relation.md +4 -4
  483. package/views/docs/reference/editors-select.md +3 -3
  484. package/views/docs/reference/editors-text.md +3 -4
  485. package/views/docs/reference/editors-value-list.md +3 -3
  486. package/views/docs/reference/field-row.md +1 -1
  487. package/views/docs/reference/grid.md +2 -2
  488. package/views/docs/reference/looks.md +25 -11
  489. package/views/docs/reference/panels-react.md +23 -37
  490. package/views/docs/reference/panels.md +8 -6
  491. package/views/docs/reference/react.md +24 -24
  492. package/views/docs/reference/selection.md +4 -2
  493. package/views/docs/reference/views.md +12 -11
  494. package/views/skills/views/SKILL.md +2 -2
  495. package/views/dist/editors/relation-panel.d.ts +0 -69
  496. package/views/dist/editors/relation-panel.js +0 -46
  497. package/views/dist/grid/chrome/GridColumnColorSection.d.ts +0 -13
  498. package/views/dist/grid/chrome/GridColumnColorSection.js +0 -40
  499. package/views/dist/grid/chrome/GridColumnDateSection.d.ts +0 -28
  500. package/views/dist/grid/chrome/GridColumnDateSection.js +0 -23
  501. package/views/dist/grid/chrome/GridColumnDurationSection.d.ts +0 -23
  502. package/views/dist/grid/chrome/GridColumnDurationSection.js +0 -24
  503. package/views/dist/grid/chrome/GridColumnNumberSection.d.ts +0 -29
  504. package/views/dist/grid/chrome/GridColumnNumberSection.js +0 -27
  505. package/views/dist/grid/chrome/GridColumnPercentSection.d.ts +0 -16
  506. package/views/dist/grid/chrome/GridColumnPercentSection.js +0 -16
  507. package/views/dist/grid/chrome/GridColumnSortSection.d.ts +0 -38
  508. package/views/dist/grid/chrome/GridColumnSortSection.js +0 -33
  509. package/views/dist/grid/chrome/GridFlyout.d.ts +0 -44
  510. package/views/dist/grid/chrome/GridFlyout.js +0 -80
  511. package/views/dist/grid/chrome/GridMenuRow.d.ts +0 -15
  512. package/views/dist/grid/chrome/GridMenuRow.js +0 -15
  513. package/views/dist/grid/chrome/grid-menu-search.d.ts +0 -7
  514. package/views/dist/grid/chrome/grid-menu-search.js +0 -7
  515. package/views/dist/panels/react/GroupBucketsList.d.ts +0 -16
  516. package/views/dist/panels/react/GroupBucketsList.js +0 -44
  517. package/views/dist/panels/react/LayoutColumnsList.d.ts +0 -24
  518. package/views/dist/panels/react/LayoutColumnsList.js +0 -101
  519. package/views/dist/panels/react/PopoverColumnDetail.d.ts +0 -11
  520. package/views/dist/panels/react/PopoverColumnDetail.js +0 -24
  521. package/views/dist/panels/react/drag.d.ts +0 -2
  522. package/views/dist/panels/react/drag.js +0 -5
  523. package/views/dist/panels/react/layout-detail.d.ts +0 -4
  524. package/views/dist/panels/react/layout-detail.js +0 -29
  525. package/views/dist/panels/react/root-list.d.ts +0 -6
  526. package/views/dist/panels/react/root-list.js +0 -31
  527. package/views/dist/panels/react/sort/use-sort-drag.d.ts +0 -17
  528. package/views/dist/panels/react/sort/use-sort-drag.js +0 -39
  529. package/views/dist/panels/react/view-footer.d.ts +0 -20
  530. package/views/dist/panels/react/view-footer.js +0 -41
@@ -9,7 +9,7 @@ The rendering itself is behind the other doors: the provider and the atoms at [`
9
9
  Guide: [the provider](../guides/the-provider.md).
10
10
 
11
11
  - `VK_PREFIX` — the prefix `"vk"`, worn by everything that shares a global namespace: the CSS variables (`--vk-*`) and the `data-slot` values (`vk-grid-row`). States are bare `data-*` attributes, and message keys live under `views.*` ([the contract](../contract.md)).
12
- - `GRID_SLOTS` — every `data-slot` value the grid draws, from `vk-grid` (the frame) to `vk-grid-aggregate-menu`, in the order of the [contract's Slots table](../contract.md#slots). A skin styles a part through its slot, never through a class name the package happens to use.
12
+ - `GRID_SLOTS` — every `data-slot` value the grid draws, from `vk-grid` (the frame) to `vk-grid-pager-next`, in the order of the [contract's Slots table](../contract.md#slots). A skin styles a part through its slot, never through a class name the package happens to use.
13
13
  - `GridSlot` — one member of `GRID_SLOTS`.
14
14
  - `GRID_STATES` — the flags the grid styles, each a `data-*` attribute present when true (`focused`, `selected`, `editing`, `in-range`, `range-edge`, `pending`, `invalid`, `dragging`, `empty`, `frozen`, `frozen-edge`, `scrolled`, `parked`, `collapsed`, `stuck`, `open`, `desktop`), as the [contract's States table](../contract.md#states) lists them with where each sits.
15
15
  - `GridState` — one member of `GRID_STATES`.
@@ -29,11 +29,12 @@ Guide: [the provider](../guides/the-provider.md).
29
29
  - `VK_CONTROL_TOKENS` — every name ViewKit's default controls (`viewkitjs/views/controls`) read, each with its `kind` (`colour`, `shadow`, `size` or `motion`): all optional, the ready stylesheet declaring each at the Outright look's value, and each standing for the Outright token [the controls' tokens](../contract.md#the-controls-tokens) names.
30
30
  - `VkControlToken` — one name of `VK_CONTROL_TOKENS`.
31
31
  - `VK_CONTROL_TOKENS_BY_PIECE` — each control's own list, by its piece: the names its stylesheet reads, a name two controls read in both, one kind and one token.
32
+ - `VK_GRID_TOKENS` — every name the grid's look stylesheet (`viewkitjs/views/grid.css`) reads beside the grid's own geometry, each with its `kind` and its Outright token: all optional, the ready stylesheet declaring each at the Outright look's value; all but `--vk-frozen-fade` are the controls' names too ([the grid's look tokens](../contract.md#the-grids-look-tokens)).
32
33
  - `ControlToken` — one name a control reads: `name`, `kind` and `outright`, the Outright token it stands for.
33
34
  - `VK_CONTROL_PRIVATE_FAMILIES` — the prefixes of the controls' own machinery, set and read by a control alone (the smooth corner's, the pressing room's, and each control's own): not public, and your app neither sets nor reads them.
34
- - `COMPONENT_NAMES` — the primitives your app hands in through the provider: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon` and `Markdown` ([the components map](../contract.md#the-components-map)).
35
+ - `COMPONENT_NAMES` — the primitives your app hands in through the provider: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon`, `Markdown`, `TextBody`, `NumberBody`, `Picker`, `LinksBody`, `DateBody`, `PartsBody`, `ValuesBody`, `SortBody`, `FilterBody`, `FilterPartBody`, `FieldsBody`, `QuickFiltersBody`, `ViewsListBody` and `CustomizeBody` ([the components map](../contract.md#the-components-map)).
35
36
  - `ComponentName` — one member of `COMPONENT_NAMES`.
36
- - `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (reached without one, it throws an error naming it), `Picker` (without one, the lists draw from `Command`), `LinksBody` (without one, the set editor of a relation whose field declares `links` opens `Picker`, else its own list), `Calendar` (reached without one, it throws an error naming it), `DateBody` (without one, the date editor draws its own around `Calendar`), `PartsBody` (without one, the name, place and range editors draw their own boxes), `ValuesBody` (without one, the value list editor draws its own rows), `TextBody` (without one, the text editors draw their own box) and `NumberBody` (without one, the number editors draw their own box), `SortBody` (without one, the sort pill opens ViewKit's own sort editor), `FilterBody` (without one, an advanced filter's pill and the phone's Filter open ViewKit's own filter editor), `FieldsBody` (without one, ViewKit's own sort and filter field lists), `FilterPartBody` (without one, a filter rule's way and value open ViewKit's ways menu and value body), `RowsWait` (without one, a grid waiting for new rows draws Loading in place of its body), `QuickFiltersBody` (without one, the quick filters' button opens ViewKit's own quick-filters panel), `ViewsListBody` (without one, the view picker opens ViewKit's own list of views), `GroupBody` (without one, Customize's Group opens ViewKit's own group pages), `CustomizeBody` (without one, Options opens ViewKit's own Customize) and `SearchField` (without one, the toolbar's search draws its own field) ([the components map](../contract.md#the-components-map)).
37
+ - `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (deprecated: read by nothing), `Calendar` (reached without one, it throws an error naming it), `RowsWait` (without one, a grid waiting for new rows draws Loading in place of its body), `GroupBody` (deprecated: read by nothing), `SearchField` (without one, the toolbar's search draws its own field), `PortsHost` (without one, an app that hands no `confirm` gets the browser's and one that hands no `toast` sees nothing) and `SelectionBar` (without one, a selection draws ViewKit's own bar) ([the components map](../contract.md#the-components-map)).
37
38
  - `OptionalComponentName` — one member of `OPTIONAL_COMPONENT_NAMES`.
38
39
  - `ATOM_NAMES` — the pieces the rendering is built from, and the pieces of your app's own it cannot draw itself (a command cell's verb menu, the row's right-click menu, where a relation goes, a wait, how a list asks for more), and the panels' rows. Each ships as a default, and your app swaps any of them through the provider's `atoms` ([the atoms](../contract.md#the-atoms)).
39
40
  - `AtomName` — one member of `ATOM_NAMES`.
@@ -41,7 +42,7 @@ Guide: [the provider](../guides/the-provider.md).
41
42
  - `AtomSlot` — one member of `ATOM_SLOTS`.
42
43
  - `EDITOR_SLOTS` — the `data-slot` values the editor panel marks its parts with, prefixed like the grid's (`vk-editor-panel`, `vk-editor-bar`, `vk-editor-refusal`) ([the editor panel](../contract.md#the-editor-panel)).
43
44
  - `EditorSlot` — one member of `EDITOR_SLOTS`.
44
- - `EDITOR_STATES` — the states the editor panel's popover carries: `vk-body`, the app's own body it holds (`picker`, `parts`, `values` or `links`), set only when the provider's `bodyFrame` is `popover`.
45
+ - `EDITOR_STATES` — the states the editor panel's popover carries: `vk-body`, the app's own body it holds (`picker`, `parts`, `values` or `links`).
45
46
  - `EditorState` — one member of `EDITOR_STATES`.
46
47
  - `SELECTION_SLOTS` — the `data-slot` values the selection bar marks its parts with, prefixed like the grid's (`vk-selection-bar`, `vk-selection-pill`, `vk-selection-chip`) ([slots](../contract.md#slots)).
47
48
  - `SelectionSlot` — one member of `SELECTION_SLOTS`.
@@ -100,7 +101,7 @@ Guide: [columns](../guides/columns.md).
100
101
 
101
102
  ## How a column's value reads
102
103
 
103
- - `ListColumnFormat` — how a column's value is drawn. Numbers: `style` (`plain`, or `duration`, a number stored in `unit`, milliseconds by default, and drawn as a span), `decimals`, `suffix`, `signed` and `signedTone` (`positive-good`, the default, tints a positive figure as good; `neutral` does not), `currency` (one code for the whole column). Dates: `dateStyle`, `withTime`; durations: `durationStyle`; percents: `percentDisplay`; text: `long` (a paragraph, read and edited in a panel). Booleans: `booleanDisplay`, which is a write policy as much as a look: `checkbox` (the default, a two-way flip), `icon` (a flip drawn with the column's own `icon(on)` glyph), `text` (the column's two words from its options, read-only) or `marker` (an exception raised elsewhere: nothing drawn when false, and the only write is resolving it to false). `ignoresOverrides` says a custom `render` does not read the format settings, so the menus withhold knobs it would ignore.
104
+ - `ListColumnFormat` — how a column's value is drawn. Numbers: `style` (`plain`, or `duration`, a number stored in `unit`, milliseconds by default, and drawn as a span), `decimals`, `suffix`, `signed` and `signedTone` (`positive-good`, the default, tints a positive figure as good; `neutral` does not), `currency` (one code for the whole column). Dates: `dateStyle`, `withTime` (a date-and-time shows its time unless it is `false`); durations: `durationStyle`; percents: `percentDisplay`; text: `long` (a paragraph, read and edited in a panel). Booleans: `booleanDisplay`, which is a write policy as much as a look: `checkbox` (the default, a two-way flip), `icon` (a flip drawn with the column's own `icon(on)` glyph), `text` (the column's two words from its options, read-only) or `marker` (an exception raised elsewhere: nothing drawn when false, and the only write is resolving it to false). `ignoresOverrides` says a custom `render` does not read the format settings, so the menus withhold knobs it would ignore.
104
105
  - `ListDateStyle` — how a date reads: `short`, `long`, `numeric` or `relative`.
105
106
  - `ListDurationStyle` — how a duration reads: `adaptive`, `clock` or `units`; the same union the duration formatter in `viewkitjs/fields` implements.
106
107
  - `ListNumberFormatState` — one field's number setting: `decimals` and, on a convertible money column, the `currency` reading in force and the `currencyOptions` the header menu offers.
@@ -122,7 +123,7 @@ What the machinery may do with each column type, declared once per type so a new
122
123
  - `typeRule` — the rule for a type, or `null` for a column that declares no type.
123
124
  - `GridEditorId` — which editor a writable column mounts when clicked, Entered or typed into: `text`, `select`, `number`, `date`, `relation`, `chips`, `range`, `name`, `values` (several emails, phones, links or domains, each with its label and a main one) or `place` (the country first, then its parts).
124
125
  - `ListFilterEditor` — which editor a column opens in the filter panel: `options`, `text`, `number`, `date`, `boolean`, `range`, or `none` (listed, opens nothing).
125
- - `GridPasteKind` — how a pasted clipboard cell becomes a commit: `text`, `option` (the pasted text matched against an offered option's label or key, exact before ignoring case, an in-grid copy landing on the exact option it copied, a label two options share refused), `number`, `date` (a day; a date and time with an offset or `Z` is the instant it names, one with none the wall clock in the conventions' `timeZone`, as typed, a day alone that zone's first instant, a time the zone skips or a day that doesn't exist refused), `boolean`, `relation` (the pasted label matched against the candidates, committing the id; on a relation of several, a copy of a relation cell lands its links whole, and text names records by their labels between commas, the set replacing the cell's links, a label no candidate has refused by name), `list` (the text split into several values, each read as an `option` is on a column of options), `range` (an in-grid pair, or text read as a range is written: "11–50", "10,001+", "up to 50"), or `none` (the type refuses paste).
126
+ - `GridPasteKind` — how a pasted clipboard cell becomes a commit: `text`, `option` (the pasted text matched against an offered option's label or key, exact before ignoring case, an in-grid copy landing on the exact option it copied, a label two options share refused), `number`, `date` (a day; a date and time with an offset or `Z` is the instant it names, one with none the wall clock in the conventions' `timeZone`, as typed, a day alone that zone's first instant, a time the zone skips or a day that doesn't exist refused), `boolean`, `relation` (the pasted label matched against the candidates, committing the id; on a relation of several, a copy of a relation cell lands its links whole, and text names records by their labels between commas, the set replacing the cell's links, a label no candidate has refused by name), `list` (the text split into several values, each read as an `option` is on a column of options), `range` (an in-grid pair, a band's name in any case, a name two bands share refused, or text read as a range is written: "11–50", "10,001+", "up to 50"), or `none` (the type refuses paste).
126
127
  - `GridValueKind` — what a written value must look like for a type: `any`, `email`, `url`, `boolean`, `relation` or `list`. `gridNormalizeWrite` holds a value to it.
127
128
  - `gridPasteKind` — how a paste becomes this column's value. A `multiple` column pastes as a `list` when it presents a field of a type that keeps several values, and takes no paste otherwise; any other column answers with its type's rule. Returns `null` for a column with no type.
128
129
  - `gridRelationSource` — the candidates the relation picker offers for a column: its `relation.source`, or a static list of its `relation.options`. Given an `entityIcon` resolver, each candidate without an icon of its own wears its kind's glyph, both in a static list and in each page a remote search returns; without one, the candidates come back untouched.
@@ -156,7 +157,7 @@ Three layers decide a write, and each may only take away from the one before: th
156
157
  - `isLongTextColumn` — whether a column holds a paragraph rather than a phrase: a `text` column with `format.long`, or a `rich_text` column. It reads and edits in the anchored long-text panel rather than the one-line input.
157
158
  - `gridColumnInspectable` — whether a cell opens a panel to be read in full, whatever its write state, so a long text that can't be edited can still be read. Long text is the one kind that always does; a cut-off line does when its cell cuts it off (`isWholeTextColumn`).
158
159
  - `isWholeTextColumn` — whether a column's text opens whole in that panel when its cell cuts it off: a plain `text` (not a paragraph) and a `title` that is text, not a person's name. Links, emails, phones and domains keep their one-line box.
159
- - `gridTextOpensBox(column, whole, inCell?)` — whether an open text cell is drawn in the panel over the cell rather than in the cell: a paragraph always, a line when it was opened `whole` (cut off when it opened); never with `inCell` (an app's `TextBody` is handed and the cell is writable: the body stands in the cell).
160
+ - `gridTextOpensBox(column, whole, writable?)` — whether an open text cell is drawn in the read-only panel over the cell rather than in the cell: never when `writable` (the text body stands in the cell); otherwise a paragraph always, and a line when it was opened `whole` (cut off when it opened). `writable` defaults to false.
160
161
 
161
162
  ## Column state
162
163
 
@@ -183,7 +184,7 @@ What a person changes about the columns (which are shown, in what order, at what
183
184
 
184
185
  - `columnManagedByView` — whether a saved view can store a column's filters, sorts and totals: only a column that presents a field.
185
186
  - `columnPlacedByView` — whether a saved view can place a column (its position, width and visibility): a column that presents a field, a computed (`custom`) column, which the view stores under its id, or a part column (`partOf`), placed as its whole is. A computed column still never filters, sorts, groups or totals.
186
- - `VIEW_FIELDLESS_FILTER_REASON` — the English sentence for why a saved view cannot filter on a column that presents no field.
187
+ - `VIEW_FIELDLESS_FILTER_REASON` — the English of `views.panels.filter-fieldless`, why a saved view cannot filter on a column that presents no field; the builder words it through your messages.
187
188
  - `resolveViewColumnOrder` — the column ids in the order a saved view draws them: the columns the view places take the view's requested order among their own slots (an unknown or repeated id dropped); a field column it does not name follows the ones it does; a computed column it does not name, and every column it cannot place, keeps its declared slot; a part column it does not name sits right after its whole.
188
189
  - `baseColumnOrder` — the complete order a Move or a header drag rewrites, which is the order the grid draws: `resolveViewColumnOrder` on a saved view, `resolveColumnOrder` off one. Returns column ids.
189
190
 
@@ -205,7 +206,7 @@ What a person changes about the columns (which are shown, in what order, at what
205
206
  The filter panel's rows come from the columns themselves: every column is listed, in the person's column order, and its type decides what its row opens.
206
207
 
207
208
  - `buildColumnFilters` — builds the filter panel's rows from a list's columns and returns them as filter configs. Each column gives one row in the person's `order`, opening its type's editor and reading and writing `rules` through `onRuleChange`; a column with no `accessor` is listed but opens nothing. A `declared` filter whose `key` matches a column id takes that column's row in place, and one matching no column is appended. A column `capabilities` marks unavailable is listed with its reason. A hidden column keeps its row and its rule under `HIDDEN_COLUMN_SECTION`. The other inputs:
208
- - Options: `selectValues` (the values a select's editor offers), `relationValues` (the relations present in the rows), `knownValues` and `knownLabels` (the values and names your host read for an open field, a relation, a user or an actor, offered ahead of those on screen), and `onValuesWanted`, called when such a row opens so your host can fetch them.
209
+ - Options: `selectValues` (the values a select's editor offers), `relationValues` (the relations present in the rows), `knownValues` and `knownLabels` (the values and names your host read for an open field, a relation, a user or an actor, offered ahead of those on screen), and `onValuesWanted`, called when such a row opens, or once by a filter on the bar that holds a value of it you haven't named, so your host can fetch them (their names in `knownValues` and `knownLabels`).
209
210
  - The order a Filter row offers: a fixed select or status, its declared options in their order, then the values the rows hold; an open select or tag list, `knownValues` in the order your host handed them, then those on screen; a relation, a user or an actor, the named `knownValues` in the order your host handed them (`viewkitjs/postgres` hands them most held first), then those on screen it didn't name, A to Z in the conventions' locale; a place's country, by the country's name.
210
211
  - Reading: `decimals` (what each number cell shows, so equality rounds as the eye does), `columnState` and `viewId` (what "hidden" means for this view), `icon` (each row's glyph), `messages` and `conventions`.
211
212
  - `parts: true` adds one row per part of a value right under its column ("Location · Country"), keyed `partKey(columnId, part)`; a location's whole-value row gives way to its parts.
@@ -490,7 +491,7 @@ One Filter panel row per relation the list's source can look across, under the s
490
491
  - `farWhereInputs` — a relation's far fields as the filter builder reads them: `{ columns, knownValues, knownLabels, onValuesWanted }`, each far field a column (greyed, with no accessor, where it has nothing to pick from: a far person, record or actor the target doesn't name with `farValues` handed, an option field with no options), the far values for the fields the target names. The Related records rows and the filter editor's far rules are built from it.
491
492
  - `buildRelationFilters` — builds the Related records rows, one `FilterConfigRelation` per target. It takes `targets` keyed by the relation's field key, the current `rules`, `onRuleChange(fieldKey, rule)`, the `subject` (what the list's rows are, plural and lower case), optionally an `icon` for the rows and a `fieldIcon` for each Where row, `farValues`, and `messages` and `conventions`, which word its Related records heading (`views.panels.related-records`) and reach its Where rows. A far relation, user or actor is offered only when its target names it and `farValues` answers it; without, it is listed greyed, as is a place and an option field that declares no options.
492
493
  - `RelationFilterTarget` — one relation the list can filter across: the far entity's `kind` ("campaign"), the relation's own `label` on the list's entity ("Campaigns"), the far `fields` a Where rule may name, `named`, the far relations, users or actors whose values the host answers by name, and an optional `noun` (`{ one, many }`), the far record's noun in your words; absent, the kind with its hyphens as spaces and the label lower-cased in the conventions' locale. A far field it leaves out stays greyed.
493
- - `FarValues` — the far values a host hands as `farValues`, keyed by `farPathOf`: `values`, each path's values; optionally `labels`, each path's values to their names; and `onWanted(path)`, called when a named far field's row opens, so the host can fetch its values.
494
+ - `FarValues` — the far values a host hands as `farValues`, keyed by `farPathOf`: `values`, each path's values; optionally `labels`, each path's values to their names; and `onWanted(path)`, called when a named far field's row opens, or once by a filter on the bar that holds a value of it the host hasn't named, so the host can fetch its values.
494
495
  - `farPathOf` — a far field's path, as the host keys its values: the relation's key (itself a two-hop path, `a.b`, for a rollup's second hop), `FAR_PATH_SEPARATOR` and the far field's key, such as `deals.owner`.
495
496
  - `FAR_PATH_SEPARATOR` — `.`, what separates a far path's hops and its far field; a field key never holds one.
496
497
  - `relationFilterKey` — a Related records row's key, from the relation's field key: the key with `relation:` before it.
@@ -572,7 +573,7 @@ A saved view's filter is a tree of rules keyed by field key; the Filter panel ed
572
573
 
573
574
  ## A value's parts as rows
574
575
 
575
- One part of a value can have a row of its own in the Filter, Sort and Group menus: "Location · Country", "Name · First name". A host turns these rows on with `parts: true`; the tables say which parts of which types get one.
576
+ One part of a value can have a row of its own in the Filter, Sort and Group menus: "Location · Country", "Name · First name". A host turns these rows on with `parts: true`; the tables say which parts of which types get one. A place has no whole filter: it is filtered only through its parts, so an app offers a place's filter with `parts: true` (its country, region, city and postal code; VK-735).
576
577
 
577
578
  - `partKey` — a part row's key: a column id (Filter) or a field key (Sort, Group), `::`, then the part.
578
579
  - `parsePartKey` — splits a key at its last separator: `{ id }` for a whole value, `{ id, part }` for a part.
@@ -59,7 +59,7 @@ export function AppViews({ children }: { children: ReactNode }) {
59
59
 
60
60
  ## Write the adapter against the contract
61
61
 
62
- `views/docs/contract.md` lists the nine required components and the optional `Input`, `Command`, `Picker`, `LinksBody`, `Calendar`, `DateBody`, `PartsBody`, `ValuesBody`, `TextBody`, `NumberBody`, `SortBody`, `FilterBody`, `FieldsBody`, `FilterPartBody`, `RowsWait`, `QuickFiltersBody`, `ViewsListBody`, `GroupBody`, `CustomizeBody` and `SearchField`, the five ports (`confirm` optional) and the icon names. Implement
62
+ `views/docs/contract.md` lists the twenty-three required components (`TextBody`, `NumberBody`, `Picker`, `LinksBody`, `DateBody`, `PartsBody`, `ValuesBody`, `SortBody`, `FilterBody`, `FilterPartBody`, `FieldsBody`, `QuickFiltersBody`, `ViewsListBody` and `CustomizeBody` among them: spread `CONTROLS` for ViewKit's own) and the optional `Input`, `Command` (deprecated), `Calendar`, `RowsWait`, `GroupBody` (deprecated), `SearchField`, `PortsHost` and `SelectionBar`, the five ports (`toast` and `confirm` optional: with `CONTROLS` spread, a missing one is ViewKit's Toast or alert dialog) and the icon names. Implement
63
63
  `ViewsComponents` over your own shadcn copies: a controlled `open` with `onOpenChange(open, details)`,
64
64
  an `anchor` element or ref on the popover and the menu, and no `asChild`; `AppIcon` is your own
65
65
  icon component by your own names. The shapes are Base UI's; `views/docs/contract.md`'s "Writing an
@@ -80,7 +80,7 @@ The atoms — `List`, `Row`, `RowContent`, `TickBox`, `StatusBadge`, `StatusMark
80
80
  `RelationLink`, `RelationRoles`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu` — ship as defaults drawn from your theme. Swap any of them through `atoms` so the views wear
81
81
  your own menus and pills. `CommandMenu`, `RowMenu` and `RelationLink` are your app's own pieces — the verb menu a
82
82
  command cell opens, the row's right-click menu, and where a relation chip goes; their defaults are the map's menu,
83
- the map's menu at the pointer (its Delete asks the `confirm` port, the browser's own confirm when you hand none), and a chip that goes nowhere. `Loading` and `LoadMore` are your waits — the list reloading, and how it asks for more rows; their
83
+ the map's menu at the pointer (its Delete asks the `confirm` port: ViewKit's alert dialog when you hand none and spread `CONTROLS`, else the browser's own confirm), and a chip that goes nowhere. `Loading` and `LoadMore` are your waits — the list reloading, and how it asks for more rows; their
84
84
  defaults are a plain ring and a sentinel past the last row. `PlatformMark` is a link's platform, drawn before
85
85
  it: the package ships no brand art, so its default draws nothing and a link looks plain; you draw your own
86
86
  marks by `platform.key`.
@@ -1,69 +0,0 @@
1
- import type { KeyboardEvent as ReactKeyboardEvent, ReactNode, Ref } from "react";
2
- import type { FieldMessageResolver } from "viewkitjs/fields";
3
- import { type RelationCandidate, type RelationSource } from "./relation-source.js";
4
- /**
5
- * A pinned row under the list for "it isn't in the list yet": the host opens
6
- * its own create form with what was typed already filled. Pinned rather than
7
- * appended to the results, because an affordance that only appears below a
8
- * scrolled list is one nobody finds — and a button rather than a command item,
9
- * because the filter would hide an item with no label to match while a query
10
- * is typed, which is exactly when the row is wanted. A click asks the host to
11
- * close (the core says what that close means), then `onCreate` runs.
12
- */
13
- export type RelationCreate = {
14
- /** The row's words; receives the trimmed query. */
15
- label: (query: string) => string;
16
- /** Runs AFTER the host has been asked to close, with the trimmed query. */
17
- onCreate: (query: string) => void;
18
- };
19
- /** The glyph lane every row of one panel shares, so each label starts at the same x. */
20
- export type RelationLane = {
21
- /** Draw the lane: the host named the kind's glyph, or a candidate carries its own. */
22
- glyphs: boolean;
23
- /** A glyph sized to the lane, or nothing. */
24
- glyph: (node?: ReactNode) => ReactNode;
25
- };
26
- /**
27
- * THE list a relation picker shows — one panel under the pick-one core and the
28
- * several-records core. It holds the search box, what the remote branch is
29
- * doing (a first page loading or failed, an empty answer, the next page), the
30
- * candidates with their glyph lane, paging at the end of the list, and the
31
- * pinned create rows. What a click MEANS is the core's: this panel only says
32
- * which candidate was chosen, and draws, above the candidates, whatever rows
33
- * the core puts there (the None row, the linked records).
34
- *
35
- * The candidates are the HOST's, through a discriminated source: a STATIC list
36
- * (every subscription you could link to, preloaded — the grid's shape, and any
37
- * small set's) or a REMOTE search over thousands of rows (a client, a person,
38
- * a deal). The panel owns the remote branch's choreography — when to ask, what
39
- * to drop, what to show meanwhile — and never the asking itself: the search
40
- * function is the host's, which is what keeps workspace tenancy in the host's
41
- * closure and in the routes.
42
- */
43
- export declare function RelationPanel({ candidates, query, onQueryChange, searchRef, onSearchKeyDown, before, drawsBefore, labels, hide, isChosen, onSelect, kindGlyph, message, creates, onCreate, startOn, }: {
44
- candidates: RelationSource;
45
- /** The typed query, controlled by the core: the remote search reads it, the create rows name it. */
46
- query: string;
47
- onQueryChange: (query: string) => void;
48
- searchRef?: Ref<HTMLInputElement>;
49
- onSearchKeyDown?: (event: ReactKeyboardEvent<HTMLInputElement>) => void;
50
- /** Rows drawn above the candidates, in the same list and lane. */
51
- before?: (lane: RelationLane) => ReactNode;
52
- /** The rows drawn above are on screen: a remote search that found nothing doesn't say "nothing matches" over them. */
53
- drawsBefore?: boolean;
54
- /** Labels for the rows drawn above, so a static search matches them as it matches a candidate. */
55
- labels?: ReadonlyMap<string, string>;
56
- /** A candidate already drawn above: left out of the candidates. */
57
- hide?: (id: string) => boolean;
58
- isChosen: (id: string) => boolean;
59
- onSelect: (candidate: RelationCandidate) => void;
60
- /** The kind's glyph, from the host. Worn by every candidate that brought no icon of its own; given, the glyph
61
- * lane is always drawn. */
62
- kindGlyph?: ReactNode;
63
- message?: FieldMessageResolver;
64
- creates?: RelationCreate[];
65
- /** A create row was clicked, with the trimmed query. */
66
- onCreate: (create: RelationCreate, query: string) => void;
67
- /** The row highlighted as the list opens, by its value (a candidate's id); without it, the first row. */
68
- startOn?: string;
69
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,46 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useViews } from "../provider/context.js";
4
- import { EndOfListSentinel, useRemotePage, } from "./relation-source.js";
5
- export function RelationPanel({ candidates, query, onQueryChange, searchRef, onSearchKeyDown, before, drawsBefore = false, labels, hide, isChosen, onSelect, kindGlyph, message, creates, onCreate, startOn, }) {
6
- const remote = candidates.kind === "remote";
7
- const page = useRemotePage(candidates, query);
8
- const rows = candidates.kind === "static" ? candidates.items : page.items;
9
- const views = useViews();
10
- const words = message ?? views.conventions.messages;
11
- const { Command } = views.components;
12
- const { List, Row, RowContent } = views.atoms;
13
- const Add = views.icons.add;
14
- const glyphs = kindGlyph != null || rows.some((candidate) => candidate.icon != null);
15
- const glyph = (node) => node != null ? (_jsx("span", { className: "flex size-3.5 items-center justify-center [&>svg]:size-3.5", children: node })) : undefined;
16
- const shown = hide ? rows.filter((candidate) => !hide(candidate.id)) : rows;
17
- const status = !remote
18
- ? null
19
- : page.failed && rows.length === 0
20
- ? words({ key: "editor.search-failed" })
21
- : page.searching
22
- ? words({ key: "editor.searching" })
23
- : rows.length === 0 && !page.loadingMore && !drawsBefore
24
- ? words({ key: "editor.nothing-matches" })
25
- : null;
26
- const moreStatus = !remote
27
- ? null
28
- : page.loadingMore
29
- ? words({ key: "editor.loading-more" })
30
- : page.failed && rows.length > 0
31
- ? words({ key: "editor.search-failed" })
32
- : null;
33
- const paging = remote && !page.exhausted && rows.length > 0;
34
- return (_jsxs(Command.Root, { shouldFilter: !remote, defaultValue: startOn, filter: remote
35
- ? undefined
36
- : (value, search) => {
37
- const label = rows.find((candidate) => candidate.id === value)?.label ?? labels?.get(value) ?? "";
38
- return label.toLowerCase().includes(search.toLowerCase()) ? 1 : 0;
39
- }, children: [_jsx(Command.Input, { ref: searchRef, placeholder: words({ key: "editor.search" }), className: "h-9 text-(length:--vk-input-text,13px)", value: query, onValueChange: onQueryChange, onKeyDown: (event) => {
40
- if (remote && page.searching && event.key === "Enter") {
41
- event.preventDefault();
42
- return;
43
- }
44
- onSearchKeyDown?.(event);
45
- } }), _jsxs(Command.List, { className: "max-h-72 overscroll-contain scrollbar-overlay", children: [remote ? (status && (_jsx("div", { role: "status", className: "py-4 text-center text-xs text-(color:--vk-fg-subtle)", children: status }))) : (_jsx(Command.Empty, { className: "py-4 text-center text-xs text-(color:--vk-fg-subtle)", children: words({ key: "editor.nothing-matches" }) })), _jsx(Command.Group, { className: "p-0", children: _jsxs(List, { children: [before?.({ glyphs, glyph }), shown.map((candidate) => (_jsx(Command.Item, { value: candidate.id, onSelect: () => onSelect(candidate), chosen: isChosen(candidate.id), children: _jsx(RowContent, { size: "compact", leading: glyph(candidate.icon ?? kindGlyph), leadingLane: glyphs, label: candidate.label, description: candidate.sublabel, trailing: candidate.badge ? (_jsx("span", { className: "ml-2 shrink-0 rounded-sm border border-(color:--vk-border) px-1.5 py-0.5 text-(length:--vk-caption-text,10px) font-medium uppercase tracking-wide text-(color:--vk-fg-subtle)", children: candidate.badge })) : undefined, chosen: isChosen(candidate.id), chosenTint: false }) }, candidate.id)))] }) }), paging && _jsx(EndOfListSentinel, { onReveal: page.loadMore }), moreStatus && (_jsx("div", { role: "status", className: "py-3 text-center text-xs text-(color:--vk-fg-subtle)", children: moreStatus }))] }), creates && creates.length > 0 && (_jsx("div", { className: "border-t border-(color:--vk-border)", children: creates.map((create, index) => (_jsx(Row, { size: "compact", tone: "muted", leading: _jsx(Add, { className: "h-3.5 w-3.5 shrink-0" }), label: create.label(query.trim()), onClick: () => onCreate(create, query.trim()) }, index))) }))] }));
46
- }
@@ -1,13 +0,0 @@
1
- import type { ListColumn, ListSelectColor } from "../../model/column-schema.js";
2
- import { type GridFlyouts } from "./GridFlyout.js";
3
- export declare const COLOR_DOTS: Record<ListSelectColor, string>;
4
- export declare const ALL_COLORS: ListSelectColor[];
5
- export declare function GridColumnColorSection<Row>({ column, values, optionColors, flyouts, onOptionColorChange, onClose, }: {
6
- column: ListColumn<Row>;
7
- values: string[];
8
- optionColors?: Record<string, ListSelectColor>;
9
- flyouts: GridFlyouts;
10
- /** Called with the FIELD key — the format map's key on every surface. */
11
- onOptionColorChange: (key: string, value: string, color: ListSelectColor | null) => void;
12
- onClose: () => void;
13
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,40 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { CATEGORY_DOT_CLASSES, resolveCategoryColor, } from "viewkitjs/fields/design/category-colors";
4
- import { prettifyOptionValue } from "../../model/column-state.js";
5
- import { fieldKeyOf } from "../../model/view-rules.js";
6
- import { useViews } from "../../provider/context.js";
7
- import { cx } from "../../internal/cx.js";
8
- import { GridFlyoutRow } from "./GridFlyout.js";
9
- import { GridMenuSeparator } from "./GridMenuRow.js";
10
- export const COLOR_DOTS = CATEGORY_DOT_CLASSES;
11
- export const ALL_COLORS = [
12
- "gray",
13
- "blue",
14
- "green",
15
- "amber",
16
- "red",
17
- "purple",
18
- "pink",
19
- "teal",
20
- ];
21
- export function GridColumnColorSection({ column, values, optionColors, flyouts, onOptionColorChange, onClose, }) {
22
- const { atoms, messages } = useViews();
23
- const { Row, Tag } = atoms;
24
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "max-h-72 overflow-y-auto overscroll-contain", children: values.map((value) => {
25
- const resolved = resolveCategoryColor(value, column.options, optionColors);
26
- return (_jsxs(GridFlyoutRow, { id: `color:${value}`, flyouts: flyouts, title: prettifyOptionValue(value), label: _jsx(Tag, { label: column.options?.find((option) => option.value === value)?.label ??
27
- prettifyOptionValue(value), color: resolved }), children: [_jsx(Row, { chosen: !optionColors?.[value], label: messages({ key: "views.menus.automatic" }), leading: _jsx("span", { className: "h-2.5 w-2.5 rounded-full border border-(color:--vk-border)" }), onClick: () => {
28
- onOptionColorChange(fieldKeyOf(column), value, null);
29
- flyouts.close();
30
- } }), ALL_COLORS.map((color) => (_jsx(Row, { chosen: resolved === color, label: messages({ key: "views.menus.colour", values: { colour: color } }), leading: _jsx("span", { className: cx("h-2.5 w-2.5 rounded-full", COLOR_DOTS[color]) }), onClick: () => {
31
- onOptionColorChange(fieldKeyOf(column), value, color);
32
- flyouts.close();
33
- } }, color)))] }, value));
34
- }) }), optionColors && Object.keys(optionColors).length > 0 && (_jsxs(_Fragment, { children: [_jsx(GridMenuSeparator, {}), _jsx(Row, { label: messages({ key: "views.menus.colours-reset" }), onClick: () => {
35
- for (const value of Object.keys(optionColors)) {
36
- onOptionColorChange(fieldKeyOf(column), value, null);
37
- }
38
- onClose();
39
- } })] }))] }));
40
- }
@@ -1,28 +0,0 @@
1
- import type { ListColumn } from "../../model/column-schema.js";
2
- import type { ListDateStyle } from "../../model/column-format.js";
3
- import { type GridFlyouts } from "./GridFlyout.js";
4
- export declare const DATE_STYLES: ListDateStyle[];
5
- /** The live sample beside each style: a few days before the provider's moment, so Relative reads as a real "3d ago"
6
- * rather than the "now" it would say of the moment it opened. None before the provider has a moment: the clock is
7
- * never read while drawing. */
8
- export declare const sampleDate: (now: Date | undefined) => Date | null;
9
- /**
10
- * The date-column row in the header menu — one Format row whose flyout holds
11
- * the styles (each beside a live sample) and, on a date-time, Show time —
12
- * split out of GridColumnMenu because that file is held under the component
13
- * ratchet's line ceiling rather than grown to hold them; the policy there is
14
- * split, not raise (the same reason GridColumnColorSection and
15
- * GridColumnDurationSection are their own files rather than inline).
16
- */
17
- export declare function GridColumnDateSection<Row>({ column, dateStyle, onDateStyleChange, showTime, onShowTimeChange, flyouts, onClose, }: {
18
- column: ListColumn<Row>;
19
- /** This column's date-style override. */
20
- dateStyle?: ListDateStyle;
21
- /** Both handlers are called with the FIELD key — the format map's key. */
22
- onDateStyleChange: (key: string, style: ListDateStyle) => void;
23
- /** Resolved show-time (override → declared `format.withTime`). */
24
- showTime?: boolean;
25
- onShowTimeChange?: (key: string, show: boolean) => void;
26
- flyouts: GridFlyouts;
27
- onClose: () => void;
28
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { temporalKindOf } from "../../model/field-type-of.js";
4
- import { fieldKeyOf } from "../../model/view-rules.js";
5
- import { formatDate } from "./cells.js";
6
- import { useCellFormat } from "../../cells/use-cell-format.js";
7
- import { useViews } from "../../provider/context.js";
8
- import { GridFlyoutRow } from "./GridFlyout.js";
9
- import { GridMenuSeparator, KnobGlyph } from "./GridMenuRow.js";
10
- export const DATE_STYLES = ["short", "long", "numeric", "relative"];
11
- export const sampleDate = (now) => now ? new Date(now.getTime() - 3 * 86_400_000) : null;
12
- export function GridColumnDateSection({ column, dateStyle, onDateStyleChange, showTime, onShowTimeChange, flyouts, onClose, }) {
13
- const activeDateStyle = dateStyle ?? column.format?.dateStyle ?? "short";
14
- const { viewer, presentation } = useCellFormat();
15
- const sample = sampleDate(viewer.now);
16
- const { atoms, messages } = useViews();
17
- const { Row } = atoms;
18
- const styleLabel = (style) => messages({ key: "views.menus.date-style", values: { style } });
19
- return (_jsxs(GridFlyoutRow, { id: "date-format", flyouts: flyouts, label: messages({ key: "views.menus.format" }), detail: styleLabel(activeDateStyle), leading: _jsx(KnobGlyph, { name: "calendar" }), children: [DATE_STYLES.map((style) => (_jsx(Row, { chosen: activeDateStyle === style, label: styleLabel(style), detail: _jsx("span", { className: "max-w-30 truncate", children: sample && formatDate(sample, column, style, false, viewer, presentation) }), onClick: () => {
20
- onDateStyleChange(fieldKeyOf(column), style);
21
- onClose();
22
- } }, style))), onShowTimeChange && temporalKindOf(column) === "datetime" && (_jsxs(_Fragment, { children: [_jsx(GridMenuSeparator, {}), _jsx(Row, { chosen: !!showTime, label: messages({ key: "views.menus.show-time" }), onClick: () => onShowTimeChange(fieldKeyOf(column), !showTime) })] }))] }));
23
- }
@@ -1,23 +0,0 @@
1
- import type { ListColumn } from "../../model/column-schema.js";
2
- import type { ListDurationStyle } from "../../model/column-format.js";
3
- import { type GridFlyouts } from "./GridFlyout.js";
4
- export declare const DURATION_STYLES: ListDurationStyle[];
5
- /** Live example beside each of the three duration renderings — long enough
6
- * (an hour and a half) that every style's shape is visible at a glance. */
7
- export declare const DURATION_SAMPLE_MS = 5904000;
8
- /**
9
- * The duration-column row in the header menu — one Format row whose flyout
10
- * holds the styles — split out of GridColumnMenu because that file is held
11
- * under the component ratchet's line ceiling rather than grown to hold them;
12
- * the policy there is split, not raise (the same reason GridColumnColorSection
13
- * is its own file rather than inline).
14
- */
15
- export declare function GridColumnDurationSection<Row>({ column, durationStyle, onDurationStyleChange, flyouts, onClose, }: {
16
- column: ListColumn<Row>;
17
- /** This column's duration-rendering override. */
18
- durationStyle?: ListDurationStyle;
19
- /** Called with the FIELD key — the format map's key on every surface. */
20
- onDurationStyleChange: (key: string, style: ListDurationStyle) => void;
21
- flyouts: GridFlyouts;
22
- onClose: () => void;
23
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,24 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { fieldKeyOf } from "../../model/view-rules.js";
4
- import { formatNumber } from "./cells.js";
5
- import { useUndatedCellFormat } from "../../cells/use-cell-format.js";
6
- import { useViews } from "../../provider/context.js";
7
- import { GridFlyoutRow } from "./GridFlyout.js";
8
- import { KnobGlyph } from "./GridMenuRow.js";
9
- export const DURATION_STYLES = ["adaptive", "clock", "units"];
10
- export const DURATION_SAMPLE_MS = 5_904_000;
11
- export function GridColumnDurationSection({ column, durationStyle, onDurationStyleChange, flyouts, onClose, }) {
12
- const activeDurationStyle = durationStyle ?? column.format?.durationStyle ?? "adaptive";
13
- const cellFormat = useUndatedCellFormat();
14
- const { atoms, messages } = useViews();
15
- const { Row } = atoms;
16
- const styleLabel = (style) => messages({ key: "views.menus.duration-style", values: { style } });
17
- return (_jsx(GridFlyoutRow, { id: "duration-format", flyouts: flyouts, label: messages({ key: "views.menus.format" }), detail: styleLabel(activeDurationStyle), leading: _jsx(KnobGlyph, { name: "duration" }), children: DURATION_STYLES.map((style) => (_jsx(Row, { chosen: activeDurationStyle === style, label: styleLabel(style), detail: _jsx("span", { className: "max-w-30 truncate", children: formatNumber(DURATION_SAMPLE_MS, column, {
18
- ...cellFormat,
19
- durationStyle: style,
20
- }) }), onClick: () => {
21
- onDurationStyleChange(fieldKeyOf(column), style);
22
- onClose();
23
- } }, style))) }));
24
- }
@@ -1,29 +0,0 @@
1
- import type { ListColumn } from "../../model/column-schema.js";
2
- import type { ListNumberFormatState } from "../../model/column-format.js";
3
- import { type GridFlyouts } from "./GridFlyout.js";
4
- /** Live example beside each of the shared `LIST_DECIMALS_CHOICES`. */
5
- export declare const DECIMALS_SAMPLE = 1234.567;
6
- /** What a plain number with no decimals draws: up to two, trailing zeros dropped (`formatNumberValue`). */
7
- export declare const AUTOMATIC_SAMPLE: string;
8
- /**
9
- * The number rows in the header menu — Decimals, and Currency on a column
10
- * whose binding states rates (Original · EUR · USD · RON), each one row whose
11
- * choices fly out. Lifted out of GridColumnMenu for the line ceiling; the
12
- * policy is split, not raise. Writes under the FIELD key.
13
- */
14
- export declare function GridColumnNumberSection<Row>({ column, fieldKey, decimals, currency, numberFormat, onNumberFormatChange, flyouts, onClose, }: {
15
- column: ListColumn<Row>;
16
- fieldKey: string;
17
- /** Offer the Decimals row. */
18
- decimals: boolean;
19
- /** Offer the Currency row (the column carries rates — `columnKnobs`). */
20
- currency: boolean;
21
- numberFormat?: ListNumberFormatState;
22
- /** `decimals: null` = the field's own (Automatic). */
23
- onNumberFormatChange: (key: string, patch: {
24
- decimals?: number | null;
25
- currency?: string;
26
- }) => void;
27
- flyouts: GridFlyouts;
28
- onClose: () => void;
29
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,27 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { LIST_DECIMALS_CHOICES } from "../../model/column-state.js";
4
- import { useViews } from "../../provider/context.js";
5
- import { GridFlyoutRow } from "./GridFlyout.js";
6
- import { KnobGlyph } from "./GridMenuRow.js";
7
- export const DECIMALS_SAMPLE = 1234.567;
8
- export const AUTOMATIC_SAMPLE = String(Number(DECIMALS_SAMPLE.toFixed(2)));
9
- export function GridColumnNumberSection({ column, fieldKey, decimals, currency, numberFormat, onNumberFormatChange, flyouts, onClose, }) {
10
- const chosen = numberFormat?.decimals ?? undefined;
11
- const declared = column.format?.decimals;
12
- const shown = chosen ?? declared;
13
- const currencyOptions = numberFormat?.currencyOptions ?? [];
14
- const { atoms, messages } = useViews();
15
- const { Row } = atoms;
16
- const automatic = messages({ key: "views.menus.automatic" });
17
- return (_jsxs(_Fragment, { children: [decimals && (_jsxs(GridFlyoutRow, { id: "decimals", flyouts: flyouts, label: messages({ key: "views.menus.decimals" }), detail: shown ?? automatic, leading: _jsx(KnobGlyph, { name: "number" }), children: [_jsx(Row, { chosen: chosen === undefined, label: automatic, detail: _jsx("span", { className: "tabular-nums", children: declared === undefined ? AUTOMATIC_SAMPLE : DECIMALS_SAMPLE.toFixed(declared) }), onClick: () => {
18
- onNumberFormatChange(fieldKey, { decimals: null });
19
- onClose();
20
- } }), LIST_DECIMALS_CHOICES.map((d) => (_jsx(Row, { chosen: chosen === d, label: d, detail: _jsx("span", { className: "tabular-nums", children: DECIMALS_SAMPLE.toFixed(d) }), onClick: () => {
21
- onNumberFormatChange(fieldKey, { decimals: d });
22
- onClose();
23
- } }, d)))] })), currency && currencyOptions.length > 0 && (_jsx(GridFlyoutRow, { id: "currency", flyouts: flyouts, label: messages({ key: "views.menus.currency" }), detail: currencyOptions.find((c) => c.value === numberFormat?.currency)?.label, leading: _jsx(KnobGlyph, { name: "currency" }), children: currencyOptions.map((c) => (_jsx(Row, { chosen: numberFormat?.currency === c.value, label: c.label, onClick: () => {
24
- onNumberFormatChange(fieldKey, { currency: c.value });
25
- onClose();
26
- } }, c.value))) }))] }));
27
- }
@@ -1,16 +0,0 @@
1
- import type { PercentDisplay } from "viewkitjs/fields";
2
- import type { ListColumn } from "../../model/column-schema.js";
3
- import { type GridFlyouts } from "./GridFlyout.js";
4
- export declare const DISPLAYS: PercentDisplay[];
5
- /** The percent row in the header menu — how the figure is drawn, one row
6
- * whose choices fly out. Split out of GridColumnMenu for the line ceiling;
7
- * the policy is split, not raise. */
8
- export declare function GridColumnPercentSection<Row>({ column, percentDisplay, onPercentDisplayChange, fieldKey, flyouts, onClose, }: {
9
- column: ListColumn<Row>;
10
- /** The workspace's choice for this field, when one is stored. */
11
- percentDisplay?: PercentDisplay;
12
- onPercentDisplayChange: (fieldKey: string, display: PercentDisplay) => void;
13
- fieldKey: string;
14
- flyouts: GridFlyouts;
15
- onClose: () => void;
16
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useViews } from "../../provider/context.js";
4
- import { GridFlyoutRow } from "./GridFlyout.js";
5
- import { KnobGlyph } from "./GridMenuRow.js";
6
- export const DISPLAYS = ["text", "bar", "ring"];
7
- export function GridColumnPercentSection({ column, percentDisplay, onPercentDisplayChange, fieldKey, flyouts, onClose, }) {
8
- const active = percentDisplay ?? column.format?.percentDisplay ?? "text";
9
- const { atoms, messages } = useViews();
10
- const { Row } = atoms;
11
- const displayLabel = (display) => messages({ key: "views.menus.percent-display-option", values: { display } });
12
- return (_jsx(GridFlyoutRow, { id: "percent-display", flyouts: flyouts, label: messages({ key: "views.menus.percent-display" }), detail: displayLabel(active), leading: _jsx(KnobGlyph, { name: "progress" }), children: DISPLAYS.map((display) => (_jsx(Row, { chosen: active === display, label: displayLabel(display), onClick: () => {
13
- onPercentDisplayChange(fieldKey, display);
14
- onClose();
15
- } }, display))) }));
16
- }
@@ -1,38 +0,0 @@
1
- import type { SortDirection } from "viewkitjs/fields/query";
2
- import { type GridFlyouts } from "./GridFlyout.js";
3
- /**
4
- * A place column's sort rows in the header menu: ascending and descending each fly out its parts, the part
5
- * in force the row's detail, and Clear sort while this column sorts by any of them. A pick writes the part key
6
- * (`partKey(fieldKey, part)`), which a host reads with `parsePartKey`.
7
- */
8
- export declare function GridColumnSortPartsSection({ fieldKey, parts, value, dir, onChange, flyouts, onClose, }: {
9
- /** The place's field key: the part key's whole. */
10
- fieldKey: string;
11
- /** The parts this column sorts by (`columnSortParts`). */
12
- parts: readonly string[];
13
- value: string;
14
- dir: SortDirection;
15
- onChange: (next: {
16
- value: string;
17
- dir: SortDirection;
18
- }) => void;
19
- flyouts: GridFlyouts;
20
- onClose: () => void;
21
- }): import("react/jsx-runtime").JSX.Element;
22
- /**
23
- * The sort rows in the header menu — ascending, descending, and Clear sort
24
- * while this column IS the sort. Split out of GridColumnMenu for the line
25
- * ceiling; the policy is split, not raise.
26
- */
27
- export declare function GridColumnSortSection({ sortKey, value, dir, onChange, onClose, }: {
28
- /** The key this column sorts by (`effectiveSortKey`). */
29
- sortKey: string;
30
- /** The list's current sort key and direction. */
31
- value: string;
32
- dir: SortDirection;
33
- onChange: (next: {
34
- value: string;
35
- dir: SortDirection;
36
- }) => void;
37
- onClose: () => void;
38
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,33 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { sortPartOf } from "../../model/column-sort.js";
4
- import { partKey, partWord } from "../../model/part-rows.js";
5
- import { useViews } from "../../provider/context.js";
6
- import { GridFlyoutRow } from "./GridFlyout.js";
7
- import { GridMenuRow, KnobGlyph } from "./GridMenuRow.js";
8
- export function GridColumnSortPartsSection({ fieldKey, parts, value, dir, onChange, flyouts, onClose, }) {
9
- const { atoms, messages } = useViews();
10
- const { Row } = atoms;
11
- const active = sortPartOf(value, fieldKey, parts);
12
- const word = (part) => partWord("location", part, messages) ?? part;
13
- const direction = (next) => (_jsx(GridFlyoutRow, { id: `sort-${next}`, flyouts: flyouts, label: messages({ key: next === "asc" ? "views.menus.sort-asc" : "views.menus.sort-desc" }), detail: active !== undefined && dir === next ? word(active) : undefined, leading: _jsx(KnobGlyph, { name: next === "asc" ? "sortRowsUp" : "sortRowsDown" }), children: parts.map((part) => (_jsx(Row, { chosen: active === part && dir === next, label: word(part), onClick: () => {
14
- onChange({ value: partKey(fieldKey, part), dir: next });
15
- onClose();
16
- } }, part))) }));
17
- return (_jsxs(_Fragment, { children: [direction("asc"), direction("desc"), active !== undefined && (_jsx(GridMenuRow, { label: messages({ key: "views.menus.sort-clear" }), icon: "clearSort", onClick: () => {
18
- onChange({ value: "", dir: "asc" });
19
- onClose();
20
- } }))] }));
21
- }
22
- export function GridColumnSortSection({ sortKey, value, dir, onChange, onClose, }) {
23
- const { messages } = useViews();
24
- const active = value === sortKey;
25
- const pick = (next) => {
26
- onChange({ value: sortKey, dir: next });
27
- onClose();
28
- };
29
- return (_jsxs(_Fragment, { children: [_jsx(GridMenuRow, { label: messages({ key: "views.menus.sort-asc" }), icon: "sortRowsUp", active: active && dir === "asc", onClick: () => pick("asc") }), _jsx(GridMenuRow, { label: messages({ key: "views.menus.sort-desc" }), icon: "sortRowsDown", active: active && dir === "desc", onClick: () => pick("desc") }), active && (_jsx(GridMenuRow, { label: messages({ key: "views.menus.sort-clear" }), icon: "clearSort", onClick: () => {
30
- onChange({ value: "", dir: "asc" });
31
- onClose();
32
- } }))] }));
33
- }