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
@@ -1,44 +0,0 @@
1
- import { type PointerEvent as ReactPointerEvent, type ReactElement, type ReactNode } from "react";
2
- /** How long the pointer rests on a row before its flyout opens: a sweep down the list opens none. */
3
- export declare const GRID_FLYOUT_HOVER_MS = 150;
4
- export type GridFlyouts = {
5
- /** The flyout showing now, by row id. */
6
- openId: string | null;
7
- /** Opens `id` after the hover delay; `null` closes whatever is open. */
8
- hoverTo: (id: string | null) => void;
9
- /** Drops a pending hover; an open flyout stays (the pointer is usually on its way in). */
10
- cancelHover: () => void;
11
- toggle: (id: string) => void;
12
- /** Opens `id` at once, dropping a pending hover; never closes it. */
13
- open: (id: string) => void;
14
- close: () => void;
15
- /** For the list that holds the rows: resting on a plain row closes the open flyout. */
16
- onListPointerOver: (event: ReactPointerEvent<HTMLElement>) => void;
17
- /** A flyout row hands its pointer events here, its popup's too through the React tree, so the list leaves them be. */
18
- claim: (event: ReactPointerEvent<HTMLElement>) => void;
19
- };
20
- /**
21
- * THE FLYOUTS' STATE — one open at a time across every `GridFlyoutRow` in a menu. The menu
22
- * that holds the rows owns it and calls `close()` when it closes itself.
23
- */
24
- export declare function useGridFlyouts(): GridFlyouts;
25
- /** Whether a press landed inside a grid flyout, read from its slot: the menu that opened it stays open. */
26
- export declare function insideGridFlyout(event: Event): boolean;
27
- /**
28
- * A menu row that opens its choices BESIDE the menu: the map's Popover anchored on the row.
29
- * A resting pointer opens it after a short delay; a mouse click opens it at once and never
30
- * closes it (the hover usually got there first); a tap toggles it, the only way in on a phone.
31
- * The row and its popup sit inside one element, so the popup's pointer events reach `claim`
32
- * through the React tree, and the menu's list leaves the flyout open while the pointer is in it.
33
- */
34
- export declare function GridFlyoutRow({ id, flyouts, label, detail, leading, title, children, }: {
35
- id: string;
36
- flyouts: GridFlyouts;
37
- label: ReactNode;
38
- /** The current choice, the row's right-hand detail. */
39
- detail?: ReactNode;
40
- leading?: ReactNode;
41
- title?: string;
42
- /** The flyout's rows. */
43
- children: ReactNode;
44
- }): ReactElement;
@@ -1,80 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useEffect, useRef, useState, } from "react";
4
- import { useViews } from "../../provider/context.js";
5
- export const GRID_FLYOUT_HOVER_MS = 150;
6
- export function useGridFlyouts() {
7
- const [openId, setOpenId] = useState(null);
8
- const timerRef = useRef(null);
9
- const claimed = useRef(new WeakSet());
10
- const cancelHover = () => {
11
- if (timerRef.current != null) {
12
- window.clearTimeout(timerRef.current);
13
- timerRef.current = null;
14
- }
15
- };
16
- useEffect(() => cancelHover, []);
17
- const hoverTo = (id) => {
18
- cancelHover();
19
- timerRef.current = window.setTimeout(() => {
20
- timerRef.current = null;
21
- setOpenId(id);
22
- }, GRID_FLYOUT_HOVER_MS);
23
- };
24
- return {
25
- openId,
26
- hoverTo,
27
- cancelHover,
28
- toggle: (id) => {
29
- cancelHover();
30
- setOpenId((current) => (current === id ? null : id));
31
- },
32
- open: (id) => {
33
- cancelHover();
34
- setOpenId(id);
35
- },
36
- close: () => {
37
- cancelHover();
38
- setOpenId(null);
39
- },
40
- onListPointerOver: (event) => {
41
- if (claimed.current.has(event.nativeEvent))
42
- return;
43
- if (openId != null)
44
- hoverTo(null);
45
- },
46
- claim: (event) => {
47
- claimed.current.add(event.nativeEvent);
48
- },
49
- };
50
- }
51
- export function insideGridFlyout(event) {
52
- const target = event.target;
53
- return target?.closest?.('[data-slot="vk-grid-flyout"]') != null;
54
- }
55
- export function GridFlyoutRow({ id, flyouts, label, detail, leading, title, children, }) {
56
- const { atoms, components, icons } = useViews();
57
- const { Row, List } = atoms;
58
- const { Popover } = components;
59
- const ChevronRight = icons.chevronRight;
60
- const anchor = useRef(null);
61
- const pressedWith = useRef(null);
62
- const open = flyouts.openId === id;
63
- return (_jsxs("div", { ref: anchor, onPointerOver: flyouts.claim, onPointerDown: (event) => {
64
- if (anchor.current?.contains(event.target))
65
- pressedWith.current = event.pointerType;
66
- }, onMouseEnter: () => flyouts.hoverTo(id), onMouseLeave: () => {
67
- pressedWith.current = null;
68
- flyouts.cancelHover();
69
- }, children: [_jsx(Row, { label: label, detail: detail, leading: leading, title: title, opens: true, open: open, trailing: _jsx(ChevronRight, { className: "size-3.5 shrink-0 text-(color:--vk-fg-subtlest)" }), onClick: () => {
70
- const pointer = pressedWith.current;
71
- pressedWith.current = null;
72
- if (pointer === "mouse")
73
- flyouts.open(id);
74
- else
75
- flyouts.toggle(id);
76
- } }), _jsx(Popover, { open: open, onOpenChange: (next) => {
77
- if (!next && flyouts.openId === id)
78
- flyouts.close();
79
- }, anchor: anchor, side: "right", align: "start", sideOffset: -2, alignOffset: -4, initialFocus: false, chrome: "menu", panelData: { "data-slot": "vk-grid-flyout" }, className: "min-w-32 max-w-80", onOutsidePress: (event) => anchor.current?.contains(event.target) ? false : undefined, children: _jsx(List, { children: children }) })] }));
80
- }
@@ -1,15 +0,0 @@
1
- import type { ReactElement } from "react";
2
- import type { ViewsIconName } from "../../contract.js";
3
- /** A knob row's leading glyph, by meaning, in the subtle ink every verb row's glyph wears at rest. */
4
- export declare function KnobGlyph({ name }: {
5
- name: ViewsIconName;
6
- }): ReactElement;
7
- /** One verb row in a grid menu: a glyph, a label, the chosen mark while active (its glyph then in the brand ink). */
8
- export declare function GridMenuRow({ label, icon, onClick, active, }: {
9
- label: string;
10
- icon: ViewsIconName;
11
- onClick: () => void;
12
- active?: boolean;
13
- }): ReactElement;
14
- /** The divider between a grid menu's blocks. */
15
- export declare function GridMenuSeparator(): ReactElement;
@@ -1,15 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useViews } from "../../provider/context.js";
4
- export function KnobGlyph({ name }) {
5
- const Glyph = useViews().icons[name];
6
- return _jsx(Glyph, { className: "size-4 text-(color:--vk-fg-subtle)" });
7
- }
8
- export function GridMenuRow({ label, icon, onClick, active = false, }) {
9
- const { atoms, icons } = useViews();
10
- const Glyph = icons[icon];
11
- return (_jsx(atoms.Row, { label: label, chosen: active, leading: _jsx(Glyph, { className: active ? "size-4 text-(color:--vk-fg-brand)" : "size-4 text-(color:--vk-fg-subtle)" }), onClick: onClick }));
12
- }
13
- export function GridMenuSeparator() {
14
- return _jsx("div", { role: "separator", className: "-mx-1 my-1.5 h-px bg-(color:--vk-border)" });
15
- }
@@ -1,7 +0,0 @@
1
- /** How many options a grid menu lists before it offers a search: a group band's Sort rows. */
2
- export declare const GRID_MENU_SEARCH_AFTER = 8;
3
- /** The options a grid menu lists for a search: every one while the search is empty, else those whose label
4
- * holds it. */
5
- export declare function matchMenuOptions<O extends {
6
- label: string;
7
- }>(options: readonly O[], query: string): O[];
@@ -1,7 +0,0 @@
1
- export const GRID_MENU_SEARCH_AFTER = 8;
2
- export function matchMenuOptions(options, query) {
3
- const needle = query.trim().toLowerCase();
4
- if (!needle)
5
- return [...options];
6
- return options.filter((option) => option.label.toLowerCase().includes(needle));
7
- }
@@ -1,16 +0,0 @@
1
- import type { GroupConfig } from "../model.js";
2
- type Groups = NonNullable<GroupConfig["groups"]>;
3
- /**
4
- * THE GROUP PANEL'S GROUPS: every group of the list in the panel's order (shown, then empty, then hidden),
5
- * each with a grip to drag it and an eye to show or hide it. The same row chrome, grip and sensors as the
6
- * Columns list (`LayoutColumnsList`), so the two editors read as one; `comfortable` is the phone sheet's
7
- * taller row.
8
- *
9
- * An empty group is dimmed (Hide empty groups hides it, the eye is still open); a group the reader hid is
10
- * dimmed with a crossed eye. Dragging one sets the list's order by hand.
11
- */
12
- export declare function GroupBucketsList({ groups, variant, }: {
13
- groups: Groups;
14
- variant?: "compact" | "comfortable";
15
- }): import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,44 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cx } from "../../internal/cx.js";
4
- import { useViews } from "../../provider/context.js";
5
- import { drawPanelButton } from "../panel-button.js";
6
- import { DRAGGING_CLASS, PANEL_ROW_CLASS, SHEET_ROW_CLASS, SHEET_ROW_GROUND_CLASS } from "./chrome.js";
7
- import { usePanelListSensors } from "./drag.js";
8
- import { moveItem, SortableFrame, useDragKit, useSortableItem } from "./drag-kit.js";
9
- export function GroupBucketsList({ groups, variant = "compact", }) {
10
- const kit = useDragKit();
11
- const sensors = usePanelListSensors(kit);
12
- const keys = groups.entries.map((entry) => entry.key);
13
- const handleDragEnd = (event) => {
14
- const { active, over } = event;
15
- if (!over || active.id === over.id)
16
- return;
17
- const from = keys.indexOf(String(active.id));
18
- const to = keys.indexOf(String(over.id));
19
- if (from === -1 || to === -1)
20
- return;
21
- groups.onReorder(moveItem(keys, from, to));
22
- };
23
- return (_jsx(SortableFrame, { kit: kit, sensors: sensors, items: keys, axis: "y", onDragEnd: handleDragEnd, nameOf: (key) => groups.entries.find((entry) => entry.key === key)?.label ?? key, children: groups.entries.map((entry) => (_jsx(GroupRow, { entry: entry, variant: variant, onToggle: groups.onToggle }, entry.key))) }));
24
- }
25
- function GroupRow({ entry, variant, onToggle, }) {
26
- const views = useViews();
27
- const { icons, messages } = views;
28
- const { attributes, listeners, setNodeRef, isDragging, style } = useSortableItem({ id: entry.key, axis: "y" });
29
- const comfortable = variant === "comfortable";
30
- const dim = entry.empty || entry.hidden;
31
- const glyph = comfortable ? "h-4 w-4" : "h-3.5 w-3.5";
32
- const label = entry.label || messages({ key: "views.panels.group-empty" });
33
- const Grip = icons.drag;
34
- const Eye = entry.hidden ? icons.hide : icons.show;
35
- return (_jsxs("div", { ref: setNodeRef, "data-vs-row": true, "data-group-entry": entry.key, style: style, className: cx(comfortable ? SHEET_ROW_CLASS : PANEL_ROW_CLASS, comfortable && !isDragging && SHEET_ROW_GROUND_CLASS, isDragging && DRAGGING_CLASS), children: [_jsx("span", { ...attributes, ...listeners, "data-base-ui-swipe-ignore": true, "aria-label": messages({ key: "views.panels.move", values: { label } }), className: "flex shrink-0 cursor-grab items-center text-(color:--vk-fg-subtlest) transition-colors hover:text-(color:--vk-fg-subtle) active:cursor-grabbing", style: { touchAction: "none" }, children: _jsx(Grip, { className: glyph }) }), _jsx("span", { className: cx("min-w-0 flex-1 truncate font-medium", comfortable ? "text-(length:--vk-sheet-text,15px)" : "text-sm", dim ? "text-(color:--vk-fg-subtle)" : "text-(color:--vk-fg)"), children: label }), drawPanelButton(views, {
36
- own: cx("flex shrink-0 items-center justify-center rounded-sm text-(color:--vk-fg-subtle) transition-colors hover:bg-(color:--vk-hovered) hover:text-(color:--vk-fg)", comfortable ? "h-7 w-7" : "h-5 w-5"),
37
- frame: cx("shrink-0", comfortable ? "h-7 w-7" : "h-5 w-5"),
38
- variant: "ghost",
39
- size: "icon",
40
- onClick: () => onToggle(entry.key, entry.hidden),
41
- "aria-label": messages({ key: entry.hidden ? "views.panels.show" : "views.panels.hide", values: { label } }),
42
- children: _jsx(Eye, { className: glyph }),
43
- })] }));
44
- }
@@ -1,24 +0,0 @@
1
- import type { LayoutColumnsConfig } from "../model.js";
2
- import type { PanelFieldEditor } from "./field-editor.js";
3
- type LayoutColumnsVariant = "compact" | "comfortable";
4
- /**
5
- * The Columns editor, a vertical sortable: a grip to reorder, an eye to show or hide, the row's body to open
6
- * the column's own settings, and Reset when any column differs from the view. Presentation only: the host
7
- * list owns the column state.
8
- *
9
- * Runs on both surfaces: a desktop panel (`compact`) and a phone's sheet (`comfortable`).
10
- */
11
- export declare function LayoutColumnsList({ columns, variant, onOpenColumn, canOpen, showNewLine, fieldEditor, }: {
12
- columns: LayoutColumnsConfig;
13
- variant?: LayoutColumnsVariant;
14
- /** Opens a column's settings drill-in. Omit and rows aren't clickable. */
15
- onOpenColumn?: (id: string) => void;
16
- /** Which rows open their settings; every row when absent. A phone opens only a row the field editor acts on. */
17
- canOpen?: (id: string) => boolean;
18
- /** Show the per-field "starts a new line" toggle (`columns.newLine`). The CALLER gates it by the active
19
- * view: this list can't know which view's drill-in it is serving. */
20
- showNewLine?: boolean;
21
- /** The app's field editor: its footer (Add field, the archived fields) draws under the rows. */
22
- fieldEditor?: PanelFieldEditor | null;
23
- }): import("react/jsx-runtime").JSX.Element;
24
- export {};
@@ -1,101 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cx } from "../../internal/cx.js";
4
- import { useViews } from "../../provider/context.js";
5
- import { DRAGGING_CLASS, PANEL_ROW_CLASS, PANEL_SEPARATOR_CLASS, SHEET_ROW_CLASS, SHEET_ROW_GROUND_CLASS, } from "./chrome.js";
6
- import { DisabledReason } from "../../atoms/DisabledReason.js";
7
- import { drawPanelButton } from "../panel-button.js";
8
- import { columnToggleRefusal, newLineRefusal } from "./column-refusals.js";
9
- import { usePanelListSensors } from "./drag.js";
10
- import { moveItem, SortableFrame, useDragKit, useSortableItem } from "./drag-kit.js";
11
- function columnRowValueLabel(item) {
12
- const first = item.settings?.choices?.[0];
13
- if (!first)
14
- return undefined;
15
- return first.options.find((o) => o.value === first.value)?.label ?? first.value;
16
- }
17
- export function LayoutColumnsList({ columns, variant = "compact", onOpenColumn, canOpen, showNewLine = false, fieldEditor, }) {
18
- const { atoms, messages } = useViews();
19
- const kit = useDragKit();
20
- const sensors = usePanelListSensors(kit);
21
- const footer = fieldEditor?.fieldsFooter(columns) ?? null;
22
- const visibleCount = columns.items.filter((i) => !i.hidden).length;
23
- const handleDragEnd = (event) => {
24
- const { active, over } = event;
25
- if (!over || active.id === over.id)
26
- return;
27
- const ids = columns.items.map((i) => i.id);
28
- const from = ids.indexOf(String(active.id));
29
- const to = ids.indexOf(String(over.id));
30
- if (from === -1 || to === -1)
31
- return;
32
- columns.onReorder(moveItem(ids, from, to));
33
- };
34
- return (_jsxs("div", { children: [_jsx(SortableFrame, { kit: kit, sensors: sensors, items: columns.items.map((i) => i.id), axis: "y", onDragEnd: handleDragEnd, nameOf: (id) => columns.items.find((item) => item.id === id)?.label ?? id, children: columns.items.map((item) => (_jsx(SortableColumnRow, { item: item, variant: variant, toggleRefusal: columnToggleRefusal(item, visibleCount, messages), onToggleHidden: columns.onToggleHidden, newLine: showNewLine ? columns.newLine : undefined, onOpen: onOpenColumn && (canOpen?.(item.id) ?? true) ? onOpenColumn : undefined }, item.id))) }), columns.dirty && columns.onReset && variant === "compact" && (_jsxs(_Fragment, { children: [_jsx("div", { className: PANEL_SEPARATOR_CLASS }), _jsx(atoms.ChoiceRow, { label: messages({ key: "views.panels.columns-reset" }), onClick: columns.onReset })] })), footer && (_jsxs(_Fragment, { children: [_jsx("div", { className: PANEL_SEPARATOR_CLASS }), footer] }))] }));
35
- }
36
- function SortableColumnRow({ item, variant, toggleRefusal, onToggleHidden, newLine, onOpen, }) {
37
- const views = useViews();
38
- const { icons, messages } = views;
39
- const { attributes, listeners, setNodeRef, isDragging, style } = useSortableItem({
40
- id: item.id,
41
- disabled: item.fixed,
42
- axis: "y",
43
- });
44
- const comfortable = variant === "comfortable";
45
- const glyph = comfortable ? "h-4 w-4" : "h-3.5 w-3.5";
46
- const value = columnRowValueLabel(item);
47
- const canToggle = toggleRefusal === null;
48
- const newLineReason = newLine ? newLineRefusal(item, newLine.firstFieldId, messages) : null;
49
- const inertNewLine = newLineReason !== null;
50
- const Grip = icons.drag;
51
- const NewLine = icons.enter;
52
- const Eye = item.hidden ? icons.hide : icons.show;
53
- const Chevron = icons.chevronRight;
54
- const iconFrame = cx("shrink-0", comfortable ? "h-7 w-7" : "h-5 w-5");
55
- const nameClass = cx("font-medium", comfortable ? "text-(length:--vk-sheet-text,15px)" : "text-sm", item.hidden ? "text-(color:--vk-fg-subtlest)" : "text-(color:--vk-fg)");
56
- return (_jsxs("div", { ref: setNodeRef, "data-vs-row": true, style: style, className: cx(comfortable ? SHEET_ROW_CLASS : PANEL_ROW_CLASS, comfortable && !isDragging && SHEET_ROW_GROUND_CLASS, isDragging && DRAGGING_CLASS), children: [!item.fixed && (_jsx("span", { ...attributes, ...listeners, "data-base-ui-swipe-ignore": true, className: "flex shrink-0 cursor-grab items-center text-(color:--vk-fg-subtlest) transition-colors hover:text-(color:--vk-fg-subtle) active:cursor-grabbing", style: { touchAction: "none" }, children: _jsx(Grip, { className: glyph }) })), _jsxs(RowBody, { onOpen: onOpen ? () => onOpen(item.id) : undefined, children: [_jsx("span", { className: cx("flex shrink-0 items-center justify-center", comfortable ? "h-7 w-7" : "h-4 w-4", item.hidden ? "text-(color:--vk-fg-subtlest)" : "text-(color:--vk-fg-subtle)"), children: item.icon }), value ? (_jsxs("span", { className: "flex min-w-0 flex-auto items-center gap-2.5 overflow-hidden", children: [_jsx("span", { className: cx("shrink-0 max-w-full truncate", nameClass), children: item.label }), _jsx("span", { className: cx("min-w-0 ml-auto truncate text-(color:--vk-fg-subtle)", comfortable ? "max-w-[35vw] text-(length:--vk-sheet-text,15px)" : "max-w-[120px] text-xs"), children: value })] })) : (_jsx("span", { className: cx("min-w-0 flex-auto truncate", nameClass), children: item.label }))] }), newLine && (_jsx(DisabledReason, { reason: newLineReason, side: "top", className: "inline-flex shrink-0", children: drawPanelButton(views, {
57
- own: cx("flex shrink-0 items-center justify-center rounded-sm transition-colors", comfortable ? "h-7 w-7" : "h-5 w-5", inertNewLine
58
- ? "cursor-default text-(color:--vk-fg-subtlest)"
59
- : newLine.has(item.id)
60
- ? "text-(color:--vk-fg) hover:bg-(color:--vk-hovered)"
61
- : "text-(color:--vk-fg-subtlest) hover:bg-(color:--vk-hovered) hover:text-(color:--vk-fg)"),
62
- frame: iconFrame,
63
- variant: "ghost",
64
- size: "icon",
65
- disabled: inertNewLine,
66
- onClick: () => newLine.onToggle(item.id),
67
- "aria-label": messages(newLine.has(item.id)
68
- ? { key: "views.panels.new-line-on", values: { label: item.label } }
69
- : { key: "views.panels.new-line-start", values: { label: item.label } }),
70
- "aria-pressed": newLine.has(item.id),
71
- children: _jsx(NewLine, { className: glyph }),
72
- }) })), !item.fixed && (_jsx(DisabledReason, { reason: toggleRefusal, side: "top", className: "inline-flex shrink-0", children: drawPanelButton(views, {
73
- own: cx("flex shrink-0 items-center justify-center rounded-sm transition-colors", comfortable ? "h-7 w-7" : "h-5 w-5", canToggle
74
- ? "text-(color:--vk-fg-subtle) hover:bg-(color:--vk-hovered) hover:text-(color:--vk-fg)"
75
- : "cursor-default text-(color:--vk-fg-subtlest)"),
76
- frame: iconFrame,
77
- variant: "ghost",
78
- size: "icon",
79
- disabled: !canToggle,
80
- onClick: () => onToggleHidden(item.id, !item.hidden),
81
- "aria-label": messages({
82
- key: item.hidden ? "views.panels.show" : "views.panels.hide",
83
- values: { label: item.label },
84
- }),
85
- children: _jsx(Eye, { className: glyph }),
86
- }) })), onOpen && _jsx(Chevron, { className: cx("shrink-0 text-(color:--vk-fg-subtlest)", glyph) })] }));
87
- }
88
- function RowBody({ onOpen, children }) {
89
- const views = useViews();
90
- const className = "flex min-w-0 flex-1 items-center gap-2.5 text-left";
91
- if (!onOpen)
92
- return _jsx("span", { className: className, children: children });
93
- return drawPanelButton(views, {
94
- own: className,
95
- frame: "h-auto min-w-0 flex-1 justify-start gap-2.5 p-0 text-left [font:inherit]",
96
- variant: "ghost",
97
- size: "sm",
98
- onClick: onOpen,
99
- children,
100
- });
101
- }
@@ -1,11 +0,0 @@
1
- import type { LayoutColumnItem, LayoutColumnsConfig } from "../model.js";
2
- import type { PanelFieldEditor } from "./field-editor.js";
3
- export declare function PopoverColumnDetail({ column, columns, onDone, fieldEditor, }: {
4
- column: LayoutColumnItem;
5
- columns: LayoutColumnsConfig;
6
- /** Called once a field editor's row has opened its window: the panel steps out of the way. */
7
- onDone?: () => void;
8
- /** The app's field editor: its rows for this column's field (Edit field, Archive field), so a hidden field
9
- * is edited from here without being shown first. */
10
- fieldEditor?: PanelFieldEditor | null;
11
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,24 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { cx } from "../../internal/cx.js";
4
- import { useViews } from "../../provider/context.js";
5
- import { PANEL_LIST_CLASS, PANEL_SEPARATOR_CLASS, SECTION_HEADING_CLASS, SECTION_RULE_CLASS } from "./chrome.js";
6
- import { columnToggleRefusal } from "./column-refusals.js";
7
- const noop = () => { };
8
- export function PopoverColumnDetail({ column, columns, onDone, fieldEditor, }) {
9
- const { atoms, icons, messages } = useViews();
10
- const { RadioRow, ToggleRow } = atoms;
11
- const Eye = icons.show;
12
- const editorRows = fieldEditor?.columnMenu(column.id, onDone ?? noop) ?? null;
13
- const visibleCount = columns.items.filter((item) => !item.hidden).length;
14
- const toggleRefusal = columnToggleRefusal(column, visibleCount, messages);
15
- const choices = column.settings?.choices ?? [];
16
- const allToggles = column.settings?.toggles ?? [];
17
- const toggles = allToggles.filter((toggle) => !toggle.section);
18
- const toggleSections = [
19
- ...new Set(allToggles.filter((toggle) => toggle.section).map((toggle) => toggle.section)),
20
- ];
21
- return (_jsxs("div", { "data-vs-detail": true, className: cx("max-h-96", PANEL_LIST_CLASS), children: [!column.fixed && (_jsx(ToggleRow, { icon: _jsx(Eye, { className: "h-3.5 w-3.5" }), label: messages({ key: "views.panels.column-visible" }), active: !column.hidden, disabled: toggleRefusal !== null, disabledReason: toggleRefusal ?? undefined, onClick: () => columns.onToggleHidden(column.id, !column.hidden) })), choices.map((choice) => (_jsxs("div", { children: [_jsx("div", { className: SECTION_RULE_CLASS }), _jsx("div", { className: SECTION_HEADING_CLASS, children: choice.label }), choice.options.map((option) => (_jsx(RadioRow, { selected: choice.value === option.value, label: option.label, onClick: () => choice.onChange(option.value) }, option.value)))] }, choice.key))), toggles.length > 0 && _jsx("div", { className: SECTION_RULE_CLASS }), toggles.map((toggle) => (_jsx(ToggleRow, { label: toggle.label, active: toggle.value, onClick: () => toggle.onChange(!toggle.value) }, toggle.key))), toggleSections.map((section) => (_jsxs("div", { children: [_jsx("div", { className: SECTION_RULE_CLASS }), _jsx("div", { className: SECTION_HEADING_CLASS, children: section }), allToggles
22
- .filter((toggle) => toggle.section === section)
23
- .map((toggle) => (_jsx(ToggleRow, { label: toggle.label, active: toggle.value, onClick: () => toggle.onChange(!toggle.value) }, toggle.key)))] }, section))), editorRows && (_jsxs(_Fragment, { children: [_jsx("div", { className: PANEL_SEPARATOR_CLASS }), editorRows] }))] }));
24
- }
@@ -1,2 +0,0 @@
1
- import { type DragKit, type DragSensors } from "./drag-kit.js";
2
- export declare function usePanelListSensors(kit: DragKit | null): DragSensors;
@@ -1,5 +0,0 @@
1
- "use client";
2
- import { useDragSensors } from "./drag-kit.js";
3
- export function usePanelListSensors(kit) {
4
- return useDragSensors(kit, { mouse: 8, touch: true, keyboard: true });
5
- }
@@ -1,4 +0,0 @@
1
- import type { LayoutConfig } from "../model.js";
2
- export declare function CompactLayoutDetail({ layout }: {
3
- layout: LayoutConfig;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,29 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cx } from "../../internal/cx.js";
4
- import { useViews } from "../../provider/context.js";
5
- import { resolvePersonalSection } from "../availability.js";
6
- import { drawPanelButton } from "../panel-button.js";
7
- import { PANEL_LIST_CLASS, SECTION_HEADING_CLASS, SECTION_RULE_CLASS } from "./chrome.js";
8
- const GLYPH = "h-3.5 w-3.5";
9
- const noPick = () => undefined;
10
- export function CompactLayoutDetail({ layout }) {
11
- const views = useViews();
12
- const { atoms, icons, messages } = views;
13
- const { RadioRow, ToggleRow } = atoms;
14
- const Options = icons.options;
15
- const Person = icons.person;
16
- const showSub = !layout.subOptionsFor || layout.value === layout.subOptionsFor;
17
- const hasToggles = showSub && !!layout.toggles && layout.toggles.length > 0;
18
- const density = !layout.densityFor || layout.densityFor.includes(layout.value) ? layout.density : undefined;
19
- const choices = (layout.choices ?? []).filter((choice) => !choice.views || choice.views.includes(layout.value));
20
- const personal = resolvePersonalSection(layout, messages);
21
- return (_jsxs("div", { "data-vs-detail": true, className: cx("max-h-64", PANEL_LIST_CLASS), children: [layout.options.map((opt) => (_jsx(RadioRow, { mark: "box", selected: layout.value === opt.value, label: opt.label, onClick: () => layout.onChange(opt.value) }, opt.value))), layout.refused?.map((refusal) => (_jsx(RadioRow, { mark: "box", selected: false, disabled: true, label: refusal.label, disabledReason: refusal.reason, onClick: noPick }, refusal.value))), hasToggles && (_jsxs(_Fragment, { children: [_jsx("div", { className: SECTION_RULE_CLASS }), _jsx("div", { className: SECTION_HEADING_CLASS, children: messages({ key: "views.panels.layout-options" }) }), layout.toggles.map((t) => (_jsx(ToggleRow, { icon: t.icon ?? _jsx(Options, { className: GLYPH }), label: t.label, active: t.value, onClick: () => t.onChange(!t.value), reset: t.reset }, t.key)))] })), choices.map((choice) => (_jsxs("div", { children: [_jsx("div", { className: SECTION_RULE_CLASS }), _jsx("div", { className: SECTION_HEADING_CLASS, children: choice.label }), choice.options.map((opt) => (_jsx(RadioRow, { mark: "box", selected: choice.value === opt.value, label: opt.label, onClick: () => choice.onChange(opt.value) }, opt.value)))] }, choice.key))), density && (_jsxs(_Fragment, { children: [_jsx("div", { className: SECTION_RULE_CLASS }), _jsx("div", { className: SECTION_HEADING_CLASS, children: messages({ key: "views.panels.layout-density" }) }), density.options.map((opt) => (_jsx(RadioRow, { mark: "box", selected: density.value === opt.value, label: opt.label, onClick: () => density.onChange(opt.value) }, opt.value)))] })), personal && (_jsxs(_Fragment, { children: [_jsx("div", { className: SECTION_RULE_CLASS }), _jsx("div", { className: SECTION_HEADING_CLASS, children: personal.label }), personal.toggles.map((t) => (_jsx(ToggleRow, { icon: t.icon ?? _jsx(Person, { className: GLYPH }), label: t.label, active: t.value, onClick: () => t.onChange(!t.value) }, t.key))), personal.choices.map((choice) => (_jsxs("div", { children: [_jsx("div", { className: "px-3 pt-1.5 pb-1 text-(length:--vk-caption-text,10px) font-medium text-(color:--vk-fg-subtle)", children: choice.label }), choice.options.map((opt) => (_jsx(RadioRow, { mark: "box", selected: choice.value === opt.value, label: opt.label, onClick: () => choice.onChange(opt.value) }, opt.value)))] }, choice.key))), personal.onReset && (drawPanelButton(views, {
22
- own: "w-full px-3 py-1.5 text-left text-xs text-(color:--vk-fg-subtle) transition-colors hover:text-(color:--vk-fg)",
23
- frame: "h-auto w-full justify-start px-3 py-1.5 text-left",
24
- variant: "ghost",
25
- size: "sm",
26
- onClick: personal.onReset,
27
- children: messages({ key: "views.panels.personal-reset" }),
28
- }))] }))] }));
29
- }
@@ -1,6 +0,0 @@
1
- import { type ActivePanel, type ViewOptionInputs } from "../model.js";
2
- /** The ordered root menu shared by popover and full-height overlay hosts. */
3
- export declare function PopoverRootList<S extends string = string, G extends string = string, T extends string = string>({ filters, sort, group, timeScopeConfig, dateRangeConfigs, toggles, layout, onOpenPanel, foldFilters, }: ViewOptionInputs<S, G, T> & {
4
- onOpenPanel: (panel: ActivePanel) => void;
5
- foldFilters?: boolean;
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,31 +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 { dimensionRows } from "../filter/filter-list.js";
5
- import { filterRowValueLabel, groupValueLabel, layoutValueLabel, sortValueLabel } from "../labels.js";
6
- import { countActiveFilters, isGroupActive, isSortActive } from "../model.js";
7
- const GLYPH = "h-3.5 w-3.5";
8
- const ROOT_LIST_CLASS = "p-(--vk-panel-padding,0.375rem)";
9
- export function PopoverRootList({ filters, sort, group, timeScopeConfig, dateRangeConfigs, toggles, layout, onOpenPanel, foldFilters = true, }) {
10
- const { atoms, icons, messages } = useViews();
11
- const { MenuRow, ToggleRow } = atoms;
12
- const hasToggles = !!toggles && toggles.length > 0;
13
- const showSubOptions = !layout?.subOptionsFor || layout.value === layout.subOptionsFor;
14
- const showColumns = layout?.columnsFor ? layout.columnsFor.includes(layout.value) : showSubOptions;
15
- const hasColumns = showColumns && !!layout?.columns && layout.columns.items.length > 0;
16
- const hasAnyFilter = (filters?.length ?? 0) > 0 || !!timeScopeConfig || (dateRangeConfigs?.length ?? 0) > 0;
17
- const activeFilterCount = countActiveFilters({ filters, dateRangeConfigs });
18
- const layoutRow = layout && (_jsx(MenuRow, { icon: _jsx(icons.layout, { className: GLYPH }), label: layout.label ?? messages({ key: "views.panels.layout" }), value: layoutValueLabel(layout), active: false, onClick: () => onOpenPanel({ type: "layout" }) }));
19
- const columnsRow = hasColumns && (_jsx(MenuRow, { icon: _jsx(icons.columns, { className: GLYPH }), label: layout.columnsLabelByView?.[layout.value] ?? messages({ key: "views.panels.columns" }), value: messages({
20
- key: "views.panels.columns-shown",
21
- values: { count: layout.columns.items.filter((column) => !column.hidden).length },
22
- }), active: false, onClick: () => onOpenPanel({ type: "columns" }) }));
23
- const sortRow = sort && (_jsx(MenuRow, { icon: _jsx(icons.sort, { className: GLYPH }), label: sort.label ?? messages({ key: "views.panels.sort" }), value: sortValueLabel(sort, messages), active: isSortActive(sort), onClick: () => onOpenPanel({ type: "sort" }) }));
24
- const groupRow = group && (_jsx(MenuRow, { icon: _jsx(icons.group, { className: GLYPH }), label: group.label ?? messages({ key: "views.panels.group" }), value: groupValueLabel(group, messages), active: isGroupActive(group), onClick: () => onOpenPanel({ type: "group" }) }));
25
- const toggleRows = hasToggles &&
26
- toggles.map((toggle) => (_jsx(ToggleRow, { icon: toggle.icon, label: toggle.label, active: toggle.value, onClick: () => toggle.onChange(!toggle.value), reset: toggle.reset }, toggle.key)));
27
- if (foldFilters) {
28
- return (_jsxs("div", { "data-vs-detail": true, className: ROOT_LIST_CLASS, children: [layoutRow, columnsRow, hasAnyFilter && (_jsx(MenuRow, { icon: _jsx(icons.filter, { className: GLYPH }), label: messages({ key: "views.panels.filter" }), value: filterRowValueLabel(activeFilterCount, messages), active: activeFilterCount > 0, onClick: () => onOpenPanel({ type: "filters" }) })), sortRow, groupRow, toggleRows] }));
29
- }
30
- return (_jsxs("div", { "data-vs-detail": true, className: ROOT_LIST_CLASS, children: [layoutRow, columnsRow, dimensionRows(filters, undefined, undefined, onOpenPanel), sortRow, groupRow, dimensionRows(undefined, timeScopeConfig, dateRangeConfigs, onOpenPanel), toggleRows] }));
31
- }
@@ -1,17 +0,0 @@
1
- import type { DragEndEvent } from "@dnd-kit/core";
2
- import { type KeyboardEventHandler } from "react";
3
- import { type DragKit, type DragSensors } from "../drag-kit.js";
4
- /** The mouse moves this far before a press becomes a drag, as the panels' lists: a press on a grip stays a press. */
5
- export declare const SORT_DRAG_DISTANCE = 8;
6
- export declare function useSortDrag(o: {
7
- /** The loaded drag kit (`useDragKit`); null, the rules move by the keys alone. */
8
- kit: DragKit | null;
9
- count: number;
10
- /** The rules' ids, in order: what a drag's `active` and `over` name. */
11
- ids: readonly string[];
12
- onMove: (from: number, to: number) => void;
13
- }): {
14
- sensors: DragSensors;
15
- onDragEnd: (event: Pick<DragEndEvent, "active" | "over">) => void;
16
- gripKeyDown: (i: number) => KeyboardEventHandler<HTMLElement>;
17
- };
@@ -1,39 +0,0 @@
1
- "use client";
2
- import { useLayoutEffect, useRef } from "react";
3
- import { useDragSensors } from "../drag-kit.js";
4
- export const SORT_DRAG_DISTANCE = 8;
5
- export function useSortDrag(o) {
6
- const { kit, count, ids, onMove } = o;
7
- const sensors = useDragSensors(kit, { mouse: SORT_DRAG_DISTANCE, touch: true });
8
- const follow = useRef(null);
9
- useLayoutEffect(() => {
10
- const to = follow.current;
11
- if (!to)
12
- return;
13
- follow.current = null;
14
- to.list
15
- ?.querySelectorAll('[data-slot="vk-sort-rule"]')[to.at]?.querySelector("button")
16
- ?.focus({ preventScroll: true });
17
- });
18
- const onDragEnd = ({ active, over }) => {
19
- if (!over || active.id === over.id)
20
- return;
21
- const from = ids.indexOf(String(active.id));
22
- const to = ids.indexOf(String(over.id));
23
- if (from < 0 || to < 0)
24
- return;
25
- onMove(from, to);
26
- };
27
- const gripKeyDown = (i) => (event) => {
28
- const to = event.key === "ArrowUp" ? i - 1 : event.key === "ArrowDown" ? i + 1 : null;
29
- if (to === null)
30
- return;
31
- event.preventDefault();
32
- event.stopPropagation();
33
- if (to < 0 || to >= count)
34
- return;
35
- follow.current = { list: event.currentTarget.closest('[data-slot="vk-sort-editor"]'), at: to };
36
- onMove(i, to);
37
- };
38
- return { sensors, onDragEnd, gripKeyDown };
39
- }
@@ -1,20 +0,0 @@
1
- import type { CollectionViewState } from "../view-state.js";
2
- /**
3
- * Linear's footer, one for one: their "Set default for everyone" sits under the display options, and nothing
4
- * anywhere else says "unsaved".
5
- *
6
- * Drawn only while `changes` is above zero: a panel over a view that matches everyone's has nothing to reset
7
- * and nothing to publish, and an always-on footer would be the persistent prompt this replaces. A member sees
8
- * Reset alone: a control that cannot be pressed teaches nothing, so the missing verb is simply not there.
9
- *
10
- * `className` replaces the footer's side inset (`px-3`, the rows' own), so a host with wider rows (a phone
11
- * sheet's `px-4`) lines it up with them.
12
- */
13
- export declare function ViewFooter({ view, onClear, words, className, }: {
14
- view?: CollectionViewState;
15
- /** With no shared view: Clear alone, which this takes the list back with. */
16
- onClear?: () => void;
17
- /** `kit`: Clear and Save, the toolbar's words for them, in place of Reset and Set default for everyone. */
18
- words?: "kit";
19
- className?: string;
20
- }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,41 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cx } from "../../internal/cx.js";
4
- import { useViews } from "../../provider/context.js";
5
- import { drawPanelButton } from "../panel-button.js";
6
- export function ViewFooter({ view, onClear, words, className, }) {
7
- const views = useViews();
8
- const { messages } = views;
9
- const kit = words === "kit";
10
- if (!view) {
11
- if (!onClear)
12
- return null;
13
- return (_jsx("div", { "data-vs-footer": true, "data-vs-inset": true, className: cx(className ?? "px-3", "py-2"), children: drawPanelButton(views, {
14
- own: "text-sm text-(color:--vk-fg-subtle) transition-colors hover:text-(color:--vk-fg) disabled:opacity-50",
15
- frame: "h-auto p-0",
16
- variant: "ghost",
17
- size: "sm",
18
- onClick: onClear,
19
- children: messages({ key: kit ? "views.panels.view-clear" : "views.panels.view-reset" }),
20
- }) }));
21
- }
22
- if (view.changes === 0)
23
- return null;
24
- return (_jsx("div", { "data-vs-footer": true, "data-vs-inset": true, className: cx(className ?? "px-3", "py-2"), children: _jsxs("div", { className: "flex min-w-0 flex-col items-start gap-1", children: [view.stale && (_jsx("p", { className: "m-0 text-xs text-(color:--vk-fg-subtle)", children: messages({ key: "views.panels.view-stale" }) })), _jsxs("div", { className: "flex items-center gap-4", children: [view.canPublish && (drawPanelButton(views, {
25
- own: "text-sm font-medium text-(color:--vk-fg-brand) transition-opacity hover:opacity-80 disabled:opacity-50",
26
- frame: "h-auto p-0",
27
- variant: "ghost",
28
- size: "sm",
29
- disabled: view.pending,
30
- onClick: view.onPublish,
31
- children: messages({ key: kit ? "views.panels.view-save" : "views.panels.view-publish" }),
32
- })), drawPanelButton(views, {
33
- own: "text-sm text-(color:--vk-fg-subtle) transition-colors hover:text-(color:--vk-fg) disabled:opacity-50",
34
- frame: "h-auto p-0",
35
- variant: "ghost",
36
- size: "sm",
37
- disabled: view.pending,
38
- onClick: view.onReset,
39
- children: messages({ key: kit ? "views.panels.view-clear" : "views.panels.view-reset" }),
40
- })] })] }) }));
41
- }