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
@@ -0,0 +1,195 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { resolveViewsMessage } from "../../contract.js";
5
+ import { ViewsContext } from "../../provider/context.js";
6
+ import { useFilterEditor } from "../filter-editor/filter-editor.js";
7
+ import { filterWordsOf, useMapFilterBody } from "../filter-editor/map-filter-body.js";
8
+ import { rulesOf } from "../filter-editor/rules.js";
9
+ import { useGroupEditor } from "../group-editor/group-editor.js";
10
+ import { groupEditorPropsOf, groupEditorWordsOf } from "../group-editor/map-group-body.js";
11
+ import { groupLabel } from "../group-editor/rules.js";
12
+ import { glyph, X } from "../internal/editor-parts.js";
13
+ import { useToldStep } from "../internal/told-step.js";
14
+ import { HeaderBar } from "../phone-header/header-bar.js";
15
+ import { SheetButton } from "../sheet/bottom-sheet.js";
16
+ import { SheetPartsFrom } from "../sheet/sheet-parts.js";
17
+ import { sortEditorPropsOf, sortEditorWordsOf } from "../sort-editor/map-sort-body.js";
18
+ import { sortLabel } from "../sort-editor/rules.js";
19
+ import { useSortEditor } from "../sort-editor/sort-editor.js";
20
+ import { layoutMark, useCustomize } from "./customize.js";
21
+ import { DateRangeBody, useTimeRange } from "./map-ranges.js";
22
+ const BACK = ["M5 12l14 0", "M5 12l6 6", "M5 12l6 -6"];
23
+ export function customizeWordsOf(say) {
24
+ return {
25
+ title: say({ key: "views.panels.customize-title" }),
26
+ list: say({ key: "views.panels.customize-list" }),
27
+ layout: say({ key: "views.panels.layout" }),
28
+ columns: say({ key: "views.panels.columns" }),
29
+ filter: say({ key: "views.panels.filter" }),
30
+ sort: say({ key: "views.panels.sort" }),
31
+ group: say({ key: "views.panels.group" }),
32
+ showCounts: say({ key: "views.panels.show-counts" }),
33
+ shown: (count) => say({ key: "views.panels.columns-shown", values: { count } }),
34
+ none: say({ key: "views.panels.group-none" }),
35
+ shownHeading: say({ key: "views.panels.customize-shown" }),
36
+ hiddenHeading: say({ key: "views.panels.customize-hidden" }),
37
+ hideAll: say({ key: "views.panels.groups-hide-all" }),
38
+ showAll: say({ key: "views.panels.groups-show-all" }),
39
+ searchColumns: say({ key: "views.panels.customize-search" }),
40
+ findColumn: say({ key: "views.panels.customize-find" }),
41
+ noColumn: (words) => say({ key: "views.panels.customize-no-column", values: { words } }),
42
+ alwaysShown: say({ key: "views.panels.customize-always-shown" }),
43
+ reset: say({ key: "views.panels.view-reset" }),
44
+ save: say({ key: "views.panels.view-publish" }),
45
+ viewName: say({ key: "views.panels.customize-view-name" }),
46
+ layoutButton: (name) => say({ key: "views.panels.customize-layout-button", values: { name } }),
47
+ layoutSettings: (name) => say({ key: "views.panels.customize-layout-settings", values: { name } }),
48
+ share: say({ key: "views.panels.customize-share" }),
49
+ copyLink: say({ key: "views.panels.copy-link" }),
50
+ export: say({ key: "views.panels.export-csv" }),
51
+ back: say({ key: "views.panels.back" }),
52
+ close: say({ key: "views.panels.close" }),
53
+ freeze: "Freeze first column",
54
+ wrap: "Wrap text",
55
+ personalReset: say({ key: "views.panels.personal-reset" }),
56
+ columnsReset: say({ key: "views.panels.columns-reset" }),
57
+ toggleReset: (label) => say({ key: "views.panels.toggle-reset", values: { label } }),
58
+ stale: say({ key: "views.panels.view-stale" }),
59
+ columnShown: say({ key: "views.panels.customize-shown-fields" }),
60
+ columnSettings: (label) => say({ key: "views.panels.column-settings", values: { label } }),
61
+ newLineOn: (label) => say({ key: "views.panels.new-line-on", values: { label } }),
62
+ newLineStart: (label) => say({ key: "views.panels.new-line-start", values: { label } }),
63
+ nothingToPick: say({ key: "views.panels.filter-no-options" }),
64
+ rows: {
65
+ move: (label) => say({ key: "views.panels.sort-move", values: { label } }),
66
+ howKeys: say({ key: "views.panels.list-move-keys" }),
67
+ howHold: say({ key: "views.panels.list-move-hold" }),
68
+ movedTo: (label, at, of) => say({ key: "views.panels.list-moved", values: { label, at, of } }),
69
+ on: say({ key: "views.panels.toggle-on" }),
70
+ off: say({ key: "views.panels.toggle-off" }),
71
+ },
72
+ };
73
+ }
74
+ const columnsOf = (p, say) => {
75
+ const cols = p.columns;
76
+ return (cols?.items ?? []).map((c) => {
77
+ const rows = cols?.columnMenu?.(c.id, p.onDone);
78
+ const settings = c.settings && (c.settings.choices.length > 0 || c.settings.toggles.length > 0)
79
+ ? { choices: c.settings.choices.map(choiceOf), toggles: c.settings.toggles.map(toggleOf) } : undefined;
80
+ const refused = c.hidden ? say({ key: "views.panels.new-line-hidden" }) : c.id === cols?.firstFieldId ? say({ key: "views.panels.new-line-first" }) : undefined;
81
+ return { id: c.id, label: c.label, shown: !c.hidden, locked: !c.hideable || !!c.fixed, mark: c.icon,
82
+ ...(settings && { settings }), ...(rows != null && { rows }),
83
+ ...(cols?.onStartsLineChange && { line: { on: !!c.startsLine, ...(refused && { refused }) } }) };
84
+ });
85
+ };
86
+ export function customizeWriteOf(p, own, now, next) {
87
+ if (next.name !== now.name)
88
+ return own.onRename ? () => own.onRename(next.name) : null;
89
+ if (next.layout !== now.layout) {
90
+ const layout = p.layout;
91
+ return layout?.options.some((o) => o.value === next.layout) ? () => layout.onLayoutChange(next.layout) : null;
92
+ }
93
+ const was = new Map(now.columns.map((c) => [c.id, c.shown]));
94
+ const flipped = next.columns.some((c) => was.get(c.id) !== c.shown), moved = next.columns.some((c, at) => c.id !== now.columns[at]?.id);
95
+ const viewKit = p.columns;
96
+ if (!viewKit || (!flipped && !moved))
97
+ return null;
98
+ return () => viewKit.onColumnsChange(next.columns.map((c) => ({ id: c.id, hidden: !c.shown })));
99
+ }
100
+ const toggleOf = (t) => ({ key: t.key, label: t.label, value: t.value, onChange: t.onChange, ...(t.icon != null && { icon: t.icon }), ...(t.reset && { reset: t.reset }), ...(t.section && { section: t.section }) });
101
+ const choiceOf = (c) => ({ key: c.key, label: c.label, value: c.value, options: [...c.options], onChange: c.onChange });
102
+ function layoutSettingsOf(layout) {
103
+ return {
104
+ choices: [...(layout.density ? [choiceOf(layout.density)] : []), ...layout.choices.map(choiceOf)],
105
+ toggles: layout.toggles.map(toggleOf),
106
+ ...(layout.personal && { personal: { label: layout.personal.label, toggles: layout.personal.toggles.map(toggleOf), choices: layout.personal.choices.map(choiceOf),
107
+ ...(layout.personal.onReset && { onReset: layout.personal.onReset }) } }),
108
+ };
109
+ }
110
+ const NO_SORT = { label: "", options: [], rules: [], setAside: [], max: 1, addSort: true, onRulesChange() { } };
111
+ const NO_FILTER = { label: "", fields: [], filter: { op: "and", items: [] }, levels: 1, excludable: false, onFilterChange() { }, ruleValue: () => null };
112
+ const NO_GROUP = { label: "", dimensions: [], group: { value: "none" }, manualOrder: false, onGroupChange() { } };
113
+ const stay = () => undefined;
114
+ const levelOf = (parts) => parts.title !== undefined && parts.head.onBack ? { name: parts.title, back: parts.head.onBack } : null;
115
+ export function MapCustomizeBody(props) {
116
+ const { name, onRename, exportCount, onCopyLink, onExport, ...p } = props;
117
+ const views = React.useContext(ViewsContext);
118
+ const say = views?.messages ?? resolveViewsMessage;
119
+ const phone = p.form === "phone";
120
+ const w = React.useMemo(() => customizeWordsOf(say), [say]);
121
+ const sortWords = React.useMemo(() => sortEditorWordsOf(say), [say]);
122
+ const filterWords = React.useMemo(() => filterWordsOf(say), [say]);
123
+ const groupWords = React.useMemo(() => groupEditorWordsOf(say), [say]);
124
+ const wayWord = (operator) => (views?.conventions ? views.conventions.messages({ key: "filter.operator", values: { operator } }) : operator.replace(/_/g, " "));
125
+ const editorForm = phone ? "phone" : "narrow";
126
+ const sortProps = sortEditorPropsOf({ ...(p.sort ?? NO_SORT), form: p.form, onDone: stay }, sortWords, say);
127
+ const sorting = useSortEditor({ ...sortProps, form: editorForm, onDone: undefined });
128
+ const sortSaid = sortLabel(sortProps.rules, sortProps.fields);
129
+ const sort = p.sort && { says: sortSaid ? `${sortSaid.first}${sortSaid.more ? ` +${sortSaid.more}` : ""}` : w.none, inForce: !!sortSaid,
130
+ opens: sorting.body, level: levelOf(sorting) };
131
+ const filterHanded = { ...(p.filter ?? NO_FILTER), form: p.form, onDone: stay };
132
+ const map = useMapFilterBody(filterHanded, filterWords, say, views?.components.AppIcon, wayWord);
133
+ const filtering = useFilterEditor({ label: filterHanded.label, fields: map.kit.fields, filter: map.filter, levels: filterHanded.levels, form: editorForm, onFilterChange: map.change,
134
+ own: map.own, words: filterWords });
135
+ const ruleCount = rulesOf(map.filter).length;
136
+ const filter = p.filter && { says: ruleCount > 0 ? String(ruleCount) : w.none, inForce: ruleCount > 0, opens: filtering.body, level: levelOf(filtering) };
137
+ const groupProps = groupEditorPropsOf({ ...(p.group ?? NO_GROUP), form: p.form, onDone: stay }, groupWords);
138
+ const grouping = useGroupEditor(groupProps);
139
+ const group = p.group && { says: groupLabel(groupProps.group, groupProps.fields, w.none), inForce: p.group.group.value !== "none",
140
+ opens: grouping.body, level: grouping.level };
141
+ const view = { name: onRename ? name ?? "" : "", layout: p.layout?.value ?? "", columns: columnsOf(p, say), counts: false, freeze: false, wrap: false };
142
+ const shared = p.view, kit = p.foot === "kit";
143
+ const foot = shared ? (shared.changes > 0 && p.foot !== "none" ? {
144
+ changed: true, onReset: shared.onReset, ...(shared.canPublish && { onSave: shared.onPublish }), pending: shared.pending, stale: shared.stale,
145
+ words: { reset: say({ key: kit ? "views.panels.view-clear" : "views.panels.view-reset" }), save: say({ key: kit ? "views.panels.view-save" : "views.panels.view-publish" }) },
146
+ } : {}) : p.onClear && p.foot !== "none" ? { changed: true, onReset: p.onClear, words: { reset: say({ key: "views.panels.view-clear" }) } } : {};
147
+ const { words: footWords, ...footProps } = foot;
148
+ const timeField = p.fields?.items.find((f) => f.time);
149
+ const timeRange = useTimeRange(timeField?.time, timeField?.label ?? "", phone);
150
+ const fields = (p.fields?.items ?? []).map((f) => {
151
+ const base = { key: f.key, label: f.label, ...(f.icon != null && { icon: f.icon }), ...(f.section !== undefined && { section: f.section }), says: f.says,
152
+ inForce: f.inForce, ...(f.disabled !== undefined && { disabled: f.disabled }), place: f.place, ...(f.onOpen && { onOpen: f.onOpen }) };
153
+ const choices = (os) => os.map((o) => ({ value: o.value, label: o.label, ...(o.mark != null && { mark: o.mark }) }));
154
+ if (f.pick)
155
+ return { ...base, opens: { pick: { value: f.pick.value, choices: choices(f.pick.options), onChoose: f.pick.onChange } } };
156
+ if (f.check) {
157
+ const check = f.check;
158
+ return { ...base, opens: { check: { values: [...check.value], choices: choices(check.options), onChange: (v) => check.onChange(v) } } };
159
+ }
160
+ if (f.time && f === timeField) {
161
+ const onOpen = f.onOpen;
162
+ return { ...base, onOpen: () => { timeRange.open(); onOpen?.(); }, opens: { body: timeRange.body, level: timeRange.level } };
163
+ }
164
+ if (f.dates)
165
+ return { ...base, opens: { body: _jsx(DateRangeBody, { dates: f.dates, clear: say({ key: "views.panels.date-range-clear" }), phone: phone }) } };
166
+ return { ...base, opens: { body: f.body ?? null } };
167
+ });
168
+ const parts = useCustomize({
169
+ view, onViewChange: (next) => customizeWriteOf(p, { onRename }, view, next)?.(),
170
+ layouts: [...(p.layout?.options ?? []).map((o) => ({ id: o.value, name: o.label, mark: layoutMark(o.value) })),
171
+ ...(p.layout?.refused ?? []).map((o) => ({ id: o.value, name: o.label, mark: layoutMark(o.value), later: true }))],
172
+ filter, sort, group,
173
+ toggles: p.toggles.map(toggleOf),
174
+ ...(p.layout && { layoutSettings: layoutSettingsOf(p.layout) }),
175
+ ...(p.columns?.reset && { columnsReset: p.columns.reset }),
176
+ ...(p.columns?.onStartsLineChange && { onLineChange: p.columns.onStartsLineChange }),
177
+ ...(p.columns?.footer != null && { columnsFoot: p.columns.footer }),
178
+ ...(fields.length > 0 && { fields, foldFields: p.fields.folded }),
179
+ ...footProps,
180
+ ...(exportCount !== undefined && { exportCount }), ...(onCopyLink && { onCopyLink }), ...(onExport && { onExport }),
181
+ onClose: p.onDone, onScreenChange: p.onPageChange, screen: p.page, form: p.form,
182
+ words: { ...w, ...(p.layout && { layout: p.layout.label }), ...(p.columns && { columns: p.columns.label }),
183
+ ...(p.layout && p.layout.value !== "table" && { shownHeading: say({ key: "views.panels.customize-shown-fields" }) }), ...footWords },
184
+ });
185
+ const told = parts.level;
186
+ useToldStep({ head: { onBack: phone ? told?.back : undefined }, title: told?.name }, p.onStepChange);
187
+ const setParts = React.useContext(SheetPartsFrom);
188
+ React.useLayoutEffect(() => { if (phone && setParts)
189
+ setParts({ title: parts.title, head: parts.head, foot: parts.foot }); });
190
+ React.useLayoutEffect(() => () => setParts?.(null), [setParts]);
191
+ if (!phone || setParts)
192
+ return _jsx(_Fragment, { children: parts.body });
193
+ const { onBack, close } = parts.head;
194
+ return (_jsxs(_Fragment, { children: [_jsx(HeaderBar, { className: "o-sheet-row o-customize-own-head", title: parts.title, left: onBack ? _jsx(SheetButton, { "aria-label": w.back, className: "o-sheet-back", icon: glyph(BACK), onClick: onBack }) : close ? _jsx(SheetButton, { "aria-label": w.close, icon: glyph(X), onClick: p.onDone }) : _jsx("span", {}), right: close && onBack ? _jsx(SheetButton, { "aria-label": w.close, icon: glyph(X), onClick: p.onDone }) : _jsx("span", {}) }), parts.body, parts.foot] }));
195
+ }
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ import type { ViewsCustomizeField } from "../../provider/components.js";
3
+ type Time = NonNullable<ViewsCustomizeField["time"]>;
4
+ type Dates = NonNullable<ViewsCustomizeField["dates"]>;
5
+ /** The time range's screen: its presets (a pick writes and goes back), and Custom opening a level with the month. `level` is the
6
+ * level it stands on while Custom's month shows; `open`, told as its screen opens, starts it on the month while a custom range is
7
+ * in force (as the older page did), else on the presets, so the level never outlives its screen. Called for one time range,
8
+ * whether or not its screen shows, so it holds still. */
9
+ export declare function useTimeRange(time: Time | undefined, label: string, phone: boolean): {
10
+ body: (done: () => void) => React.ReactNode;
11
+ level: {
12
+ name: string;
13
+ back: () => void;
14
+ } | null;
15
+ open: () => void;
16
+ };
17
+ /** A date range's screen: its month, and Clear while a range stands. */
18
+ export declare function DateRangeBody({ dates, clear, phone }: {
19
+ dates: Dates;
20
+ clear: string;
21
+ phone: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { ViewsContext } from "../../provider/context.js";
5
+ import { MenuList, MenuListPanelRows } from "../menu-list/menu-list.js";
6
+ const CUSTOM = "\u0000custom";
7
+ function Month({ from, to, onSelect, minNights }) {
8
+ const views = React.useContext(ViewsContext);
9
+ if (!views)
10
+ return null;
11
+ const RangeCalendar = views.atoms.RangeCalendar;
12
+ return _jsx(RangeCalendar, { mode: "range", from: from, to: to, onSelect: onSelect, locale: views.conventions.locale, ...(minNights !== undefined && { minNights }) });
13
+ }
14
+ export function useTimeRange(time, label, phone) {
15
+ const [custom, setCustom] = React.useState(false);
16
+ const back = React.useCallback(() => setCustom(false), []);
17
+ const on = time?.custom?.on === true;
18
+ const open = React.useCallback(() => setCustom(on), [on]);
19
+ const level = time?.custom && custom ? { name: time.custom.label, back } : null;
20
+ const body = (done) => {
21
+ if (!time)
22
+ return null;
23
+ if (time.custom && custom)
24
+ return _jsx(Month, { from: time.custom.from, to: time.custom.to, minNights: 1, onSelect: time.custom.onPress });
25
+ const c = time.custom;
26
+ const rows = [{ kind: "pick", value: c?.on ? CUSTOM : time.value,
27
+ choices: [...time.options.map((o) => ({ value: o.value, label: o.label })), ...(c ? [{ value: CUSTOM, label: c.label, ...(c.says !== undefined && { detail: c.says }) }] : [])],
28
+ onChoose: (v) => { if (v === CUSTOM) {
29
+ setCustom(true);
30
+ return;
31
+ } if (v !== time.value)
32
+ time.onChange(v); done(); } }];
33
+ return phone ? _jsx(MenuList, { label: label, entries: rows }) : _jsx(MenuListPanelRows, { label: label, entries: rows });
34
+ };
35
+ return { body, level, open };
36
+ }
37
+ export function DateRangeBody({ dates, clear, phone }) {
38
+ const standing = dates.from != null || dates.to != null;
39
+ const rows = [{ icon: null, label: clear, onSelect: () => dates.onChange({ from: null, to: null }) }];
40
+ return (_jsxs(_Fragment, { children: [_jsx(Month, { from: dates.from, to: dates.to, onSelect: (next) => dates.onChange(next) }), standing && (phone ? _jsx(MenuList, { label: clear, entries: rows }) : _jsx(MenuListPanelRows, { label: clear, entries: rows }))] }));
41
+ }
@@ -0,0 +1,39 @@
1
+ import type { ReactNode } from "react";
2
+ import type { CustomizeChoice, CustomizeToggle } from "./customize.js";
3
+ import type { CustomizeWords } from "./words.js";
4
+ /** A column of the view: its id, its name, whether it is shown, whether it is locked (always shown, never moved), its type's mark;
5
+ * and what opens one level in from its row (VK-890): its own settings, and the app's rows for its field (Edit field, Archive
6
+ * field) under them. On a card layout, `line`: whether it starts a new line on the card, and why it can't where it can't. */
7
+ export interface CustomizeColumn {
8
+ id: string;
9
+ label: string;
10
+ shown: boolean;
11
+ locked?: boolean;
12
+ mark?: ReactNode;
13
+ settings?: {
14
+ choices: CustomizeChoice[];
15
+ toggles: CustomizeToggle[];
16
+ };
17
+ rows?: ReactNode;
18
+ line?: {
19
+ on: boolean;
20
+ refused?: string;
21
+ };
22
+ }
23
+ /** Whether a column opens a level of its own: it has a choice, a toggle or the app's rows. */
24
+ export declare const columnOpens: (c: CustomizeColumn) => boolean;
25
+ /** Whether a column has settings of its own: a choice or a toggle. */
26
+ export declare const columnOpensBySettings: (c: CustomizeColumn) => boolean;
27
+ /** What the Columns section says on Customize's list: how many are shown ("6 shown"), in the handed words. */
28
+ export declare const columnsSay: (columns: CustomizeColumn[], words?: Pick<CustomizeWords, "shown">) => string;
29
+ /** The columns with one shown or hidden, in its place; a locked column stays shown. */
30
+ export declare const setShown: (columns: CustomizeColumn[], id: string, shown: boolean) => CustomizeColumn[];
31
+ /** Every column hidden but the locked ones. */
32
+ export declare const hideAll: (columns: CustomizeColumn[]) => CustomizeColumn[];
33
+ /** Every column shown. */
34
+ export declare const showAll: (columns: CustomizeColumn[]) => CustomizeColumn[];
35
+ /** The columns with `id` moved to `over`'s place in the whole order: before it moving up, after it moving down. A locked column
36
+ * never moves, nor is moved past. */
37
+ export declare function moveColumn(columns: CustomizeColumn[], id: string, over: string): CustomizeColumn[];
38
+ /** The columns whose name holds the words, trimmed and whatever their case; no words, every column. */
39
+ export declare function findColumns(columns: CustomizeColumn[], words: string): CustomizeColumn[];
@@ -0,0 +1,21 @@
1
+ export const columnOpens = (c) => columnOpensBySettings(c) || !(c.rows == null || typeof c.rows === "boolean" || c.rows === "");
2
+ export const columnOpensBySettings = (c) => (c.settings?.choices.length ?? 0) > 0 || (c.settings?.toggles.length ?? 0) > 0;
3
+ export const columnsSay = (columns, words) => {
4
+ const n = columns.filter((c) => c.shown).length;
5
+ return words ? words.shown(n) : `${n} shown`;
6
+ };
7
+ export const setShown = (columns, id, shown) => columns.map((c) => (c.id === id && !c.locked ? { ...c, shown } : c));
8
+ export const hideAll = (columns) => columns.map((c) => (c.locked ? c : { ...c, shown: false }));
9
+ export const showAll = (columns) => columns.map((c) => ({ ...c, shown: true }));
10
+ export function moveColumn(columns, id, over) {
11
+ const from = columns.findIndex((c) => c.id === id), to = columns.findIndex((c) => c.id === over);
12
+ if (from < 0 || to < 0 || from === to || columns[from].locked || columns[to].locked)
13
+ return columns;
14
+ const next = [...columns], [moving] = next.splice(from, 1);
15
+ next.splice(to, 0, moving);
16
+ return next;
17
+ }
18
+ export function findColumns(columns, words) {
19
+ const w = words.trim().toLowerCase();
20
+ return w ? columns.filter((c) => c.label.toLowerCase().includes(w)) : columns;
21
+ }
@@ -0,0 +1,40 @@
1
+ export declare const CUSTOMIZE_TOKENS: readonly [{
2
+ readonly name: "--vk-border";
3
+ readonly kind: "colour";
4
+ readonly outright: "--border";
5
+ }, {
6
+ readonly name: "--vk-duration-base";
7
+ readonly kind: "motion";
8
+ readonly outright: "--duration-base";
9
+ }, {
10
+ readonly name: "--vk-duration-fast";
11
+ readonly kind: "motion";
12
+ readonly outright: "--duration-fast";
13
+ }, {
14
+ readonly name: "--vk-ease-in-out";
15
+ readonly kind: "motion";
16
+ readonly outright: "--ease-in-out";
17
+ }, {
18
+ readonly name: "--vk-fg-subtle";
19
+ readonly kind: "colour";
20
+ readonly outright: "--text-subtle";
21
+ }, {
22
+ readonly name: "--vk-font-size-sm";
23
+ readonly kind: "size";
24
+ readonly outright: "--text-sm";
25
+ }, {
26
+ readonly name: "--vk-line-height-sm";
27
+ readonly kind: "size";
28
+ readonly outright: "--text-sm--line-height";
29
+ }, {
30
+ readonly name: "--vk-overlay";
31
+ readonly kind: "colour";
32
+ readonly outright: "--surface-overlay";
33
+ }, {
34
+ readonly name: "--vk-spacing";
35
+ readonly kind: "size";
36
+ readonly outright: "--spacing";
37
+ }];
38
+ /** The prefixes of Customize's own machinery, set and read by it alone: its glide's timing (`--customize-`). Its frame sets the
39
+ * Pane's own `--pane-pad` and `--pane-edge`, the Pane's private names, for the Pane's parts it draws outside one. */
40
+ export declare const CUSTOMIZE_PRIVATE: readonly ["--customize-"];
@@ -0,0 +1,12 @@
1
+ export const CUSTOMIZE_TOKENS = [
2
+ { name: "--vk-border", kind: "colour", outright: "--border" },
3
+ { name: "--vk-duration-base", kind: "motion", outright: "--duration-base" },
4
+ { name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
5
+ { name: "--vk-ease-in-out", kind: "motion", outright: "--ease-in-out" },
6
+ { name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
7
+ { name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
8
+ { name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
9
+ { name: "--vk-overlay", kind: "colour", outright: "--surface-overlay" },
10
+ { name: "--vk-spacing", kind: "size", outright: "--spacing" },
11
+ ];
12
+ export const CUSTOMIZE_PRIVATE = ["--customize-"];
@@ -0,0 +1,65 @@
1
+ import type { MenuListWords } from "../menu-list/menu-list.js";
2
+ export interface CustomizeWords {
3
+ /** The title head's title ("Customize view"). */
4
+ title: string;
5
+ /** Its list's name to a screen reader. */
6
+ list: string;
7
+ layout: string;
8
+ columns: string;
9
+ filter: string;
10
+ sort: string;
11
+ group: string;
12
+ showCounts: string;
13
+ /** What Columns says: how many show. */
14
+ shown: (count: number) => string;
15
+ /** What a section with nothing set says. */
16
+ none: string;
17
+ shownHeading: string;
18
+ hiddenHeading: string;
19
+ hideAll: string;
20
+ showAll: string;
21
+ /** Columns' search on a computer, and on a phone. */
22
+ searchColumns: string;
23
+ findColumn: string;
24
+ /** What a search that finds no column says. */
25
+ noColumn: (words: string) => string;
26
+ /** Why the locked column can't be hidden. */
27
+ alwaysShown: string;
28
+ reset: string;
29
+ save: string;
30
+ /** The view's name box, to a screen reader. */
31
+ viewName: string;
32
+ /** The layout's button in the name head, to a screen reader. */
33
+ layoutButton: (name: string) => string;
34
+ /** A layout's settings' list, to a screen reader. */
35
+ layoutSettings: (name: string) => string;
36
+ /** The footer's list, to a screen reader. */
37
+ share: string;
38
+ copyLink: string;
39
+ export: string;
40
+ back: string;
41
+ close: string;
42
+ /** A table's two settings, as its own page draws them (the view's `freeze` and `wrap`). */
43
+ freeze: string;
44
+ wrap: string;
45
+ /** For you's way back to the view's own settings. */
46
+ personalReset: string;
47
+ /** Columns' way back to the view's own columns. */
48
+ columnsReset: string;
49
+ /** A setting's way back to its default. */
50
+ toggleReset: (label: string) => string;
51
+ /** The shared view moved after the reader's changes began. */
52
+ stale: string;
53
+ /** A column's own level (VK-890): its Shown row, the name of the › that opens it, and its new-line Toggle's two names. */
54
+ columnShown: string;
55
+ columnSettings: (label: string) => string;
56
+ newLineOn: (label: string) => string;
57
+ newLineStart: (label: string) => string;
58
+ /** A per-field filter's screen with nothing to pick (VK-891). */
59
+ nothingToPick: string;
60
+ /** The rows' own words (the Menu list's: a column's grip, how the columns move, a Switch's two words). */
61
+ rows?: Partial<MenuListWords>;
62
+ }
63
+ export declare const CUSTOMIZE_WORDS: CustomizeWords;
64
+ /** The words handed over the English. */
65
+ export declare const customizeWords: (given?: Partial<CustomizeWords>) => CustomizeWords;
@@ -0,0 +1,42 @@
1
+ export const CUSTOMIZE_WORDS = {
2
+ title: "Customize view",
3
+ list: "Customize",
4
+ layout: "Layout",
5
+ columns: "Columns",
6
+ filter: "Filter",
7
+ sort: "Sort",
8
+ group: "Group",
9
+ showCounts: "Show counts",
10
+ shown: (count) => `${count} shown`,
11
+ none: "None",
12
+ shownHeading: "Shown in the table",
13
+ hiddenHeading: "Hidden",
14
+ hideAll: "Hide all",
15
+ showAll: "Show all",
16
+ searchColumns: "Search columns",
17
+ findColumn: "Find a column",
18
+ noColumn: (words) => `No column is named “${words}”`,
19
+ alwaysShown: "Always shown",
20
+ reset: "Reset",
21
+ save: "Save for everyone",
22
+ viewName: "The view's name",
23
+ layoutButton: (name) => `Layout: ${name}`,
24
+ layoutSettings: (name) => `${name} settings`,
25
+ share: "Share the view",
26
+ copyLink: "Copy link to view",
27
+ export: "Export CSV",
28
+ back: "Back",
29
+ close: "Close",
30
+ freeze: "Freeze first column",
31
+ wrap: "Wrap text",
32
+ personalReset: "Use what the view says",
33
+ columnsReset: "Reset columns",
34
+ toggleReset: (label) => `Reset ${label}`,
35
+ stale: "Everyone's view changed since you started.",
36
+ columnShown: "Shown",
37
+ columnSettings: (label) => `${label} settings`,
38
+ newLineOn: (label) => `${label} starts a new line`,
39
+ newLineStart: (label) => `Start a new line at ${label}`,
40
+ nothingToPick: "Nothing to pick",
41
+ };
42
+ export const customizeWords = (given) => (given ? { ...CUSTOMIZE_WORDS, ...given } : CUSTOMIZE_WORDS);
@@ -0,0 +1,57 @@
1
+ /* Customize: a body (the Outright kit's, KIT-669; ViewKit's since VK-840). Every value it draws with is a name ViewKit's controls read
2
+ (docs/controls/customize.md); this file only lays out its own parts, as the toolbar's map draws them (step 3, parts 44–54 and
3
+ 59–62): its head, its screens, Reset and Save for everyone, its headings. The controls inside it (the Menu list, the Radio's cards,
4
+ the Input, the Button) are drawn by their own files, as they are. On a phone (data-customize-form="phone") it stands in the Sheet's
5
+ body and foot. Outside a Pane (the toolbar's popover) it stands in a frame of its own with the Pane's parts. The rules sit in the
6
+ components layer. */
7
+ @layer components {
8
+
9
+ /* ── What a screen holds, one under another ── */
10
+ /* Its columns' glide reads its timing here, on the control (glide.ts): how long a row glides and on what curve, how long a tick takes
11
+ where it finds none of its own, and the ground a row stands on where no box behind it paints one. */
12
+ .o-customize { --customize-glide: var(--vk-duration-base); --customize-glide-ease: var(--vk-ease-in-out); --customize-tick: var(--vk-duration-fast); --customize-ground: var(--vk-overlay); }
13
+ .o-customize { display: flex; flex-direction: column; gap: calc(var(--vk-spacing) * 1); min-width: 0; }
14
+ .o-customize[data-customize-form="phone"] { gap: calc(var(--vk-spacing) * 3); }
15
+ /* On a phone what a step holds, inside the Sheet's step, is laid out the same way. */
16
+ .o-customize-step { display: flex; flex-direction: column; gap: calc(var(--vk-spacing) * 3); min-width: 0; }
17
+
18
+ /* ── Outside a Pane: the Pane's head, body and foot in a frame of its own, as tall as what it holds, never past its limit, its body
19
+ scrolling between its head and foot (the Pane's own rules, pane.css, read its padding and edge from here) ── */
20
+ .o-customize-frame { --pane-pad: calc(var(--vk-spacing) * 2); --pane-edge: var(--vk-border); box-sizing: border-box; display: flex; flex-direction: column; min-width: 0; max-height: calc(var(--vk-spacing) * 140); padding: var(--pane-pad); }
21
+
22
+ /* ── Its head, in the Pane's head: a line as tall as its controls, 32 ── */
23
+ .o-customize-head { display: flex; align-items: center; gap: calc(var(--vk-spacing) * 2); min-height: calc(var(--vk-spacing) * 8); padding-bottom: calc(var(--vk-spacing) * 2); }
24
+ /* The title way's title stands where the rows' words start. */
25
+ .o-customize-head-title { padding-left: calc(var(--vk-spacing) * 2.5); }
26
+ .o-customize-name { flex: 1; min-width: 0; display: flex; }
27
+ .o-customize-name > * { flex: 1; min-width: 0; }
28
+ .o-customize-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
29
+
30
+ /* ── Columns' search on a computer: under the head, outside the Pane's scrolling body, the Input's Soft box at sm, as far over the first
31
+ heading as it stood in it (the screen's gap, 4); Group by's Picker draws its search the same in the Pane (KIT-827) ── */
32
+ .o-customize-search { flex: none; padding-bottom: calc(var(--vk-spacing) * 1); }
33
+
34
+ /* ── Reset and Save for everyone: words at the right, right over the footer's line ── */
35
+ /* In the Pane they keep the Pane's padding over the footer's line, their own now that the foot has no margin over it (KIT-814). */
36
+ .o-customize-words { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: calc(var(--vk-spacing) * 4); padding: calc(var(--vk-spacing) * 2) 0 var(--pane-pad, 0px); }
37
+ .o-customize-foot > .o-customize-words { padding: 0 0 calc(var(--vk-spacing) * 3); gap: calc(var(--vk-spacing) * 5); }
38
+ /* The shared view's stale note, the Notice, over Reset and Save: right under what scrolls, as they stand (KIT-814), its padding the gap. */
39
+ .o-customize-stale { flex: none; margin-top: 0; }
40
+
41
+ /* ── A heading over a block of columns, its actions at its end; a layout's name, a section's and For you's over their settings ── */
42
+ .o-customize-heading { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--vk-spacing) * 2); padding-right: calc(var(--vk-spacing) * 2); }
43
+ .o-customize-heading > .o-list-heading { flex: 1; min-width: 0; }
44
+ .o-customize-heading-words { margin-top: calc(var(--vk-spacing) * 1); }
45
+ [data-customize-form="phone"] .o-customize-heading { padding: 0 calc(var(--vk-spacing) * 1); }
46
+ [data-customize-form="phone"] .o-customize-heading-words { margin-top: calc(var(--vk-spacing) * 2); padding: 0 calc(var(--vk-spacing) * 1); font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); }
47
+ [data-customize-form="phone"] .o-customize-heading > .o-customize-heading-words { padding: 0; }
48
+
49
+ /* ── A column's own level (VK-890): the app's rows for its field under its settings, a line over them; the app's rows under Columns' ── */
50
+ .o-customize-rows, .o-customize-foot-rows { display: flex; flex-direction: column; min-width: 0; }
51
+
52
+ /* ── Nothing found by a search ── */
53
+ .o-customize-none { margin: 0; padding: calc(var(--vk-spacing) * 2); font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); color: var(--vk-fg-subtle); }
54
+
55
+ /* ── On a phone whose Sheet holds no head for it (an app's own Sheet), its own head over the body ── */
56
+ :where([data-vk-phone], [data-vk-phone] *).o-customize-own-head { flex: none; padding-bottom: calc(var(--vk-spacing) * 2); }
57
+ }
@@ -15,7 +15,7 @@ export const DATE_EDITOR_LOOKS = {
15
15
  options,
16
16
  looks: [
17
17
  { id: "attio", name: "Attio", picks: { ...DATE_EDITOR_ATTIO } },
18
- { id: "mihai", name: "Mihai's", picks: { ...DATE_EDITOR_MIHAI } },
18
+ { id: "mihai", name: "Outright", picks: { ...DATE_EDITOR_MIHAI } },
19
19
  ],
20
20
  };
21
21
  export const dateEditorWornOf = (el) => lookWornOf(DATE_EDITOR_LOOKS, el, ["line", "time", "days", "year", "picks", "calendar"]);
@@ -0,0 +1,31 @@
1
+ import { type MenuEntry } from "../menu/menu.js";
2
+ import { type SelectItem } from "../select/select.js";
3
+ import type { Quantifier } from "./rules.js";
4
+ import type { FilterEditorWords } from "./words.js";
5
+ /** A block's head: its relation's name and its quantifier's box. On a phone the box's press turns the sheet to its step (`step`). */
6
+ export declare function BlockHead({ id, label, items, value, onPick, size, step }: {
7
+ id: string;
8
+ label: string;
9
+ items: SelectItem[];
10
+ value: Quantifier;
11
+ onPick: (q: Quantifier) => void;
12
+ size: "sm" | "lg";
13
+ step?: {
14
+ open: false;
15
+ onOpenChange: (open: boolean) => void;
16
+ };
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ /** A group's ⋮ on a computer and in the narrow form: its Menu. */
19
+ export declare function GroupMenu({ entries, words }: {
20
+ entries: MenuEntry[];
21
+ words: FilterEditorWords;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ /** A menu's rows as a step of the phone's one sheet: each action and pick done then the step closed; a tick stays; a row that can't be
24
+ * used says why under it, as a phone has no tooltip. Its rows are the sheet's card rows, as Customize's and the group editor's are:
25
+ * in the Menu's own words rows, the sheet holding them would float with no ground, its rows run up under its head. */
26
+ export declare function MenuStep({ label, entries, onClose, words }: {
27
+ label: string;
28
+ entries: MenuEntry[];
29
+ onClose: () => void;
30
+ words?: FilterEditorWords["list"];
31
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
+ import { Button } from "../button/button.js";
4
+ import { DOTS_UP, glyph, MORE_LOOK } from "../internal/editor-parts.js";
5
+ import { Menu } from "../menu/menu.js";
6
+ import { MENU_LIST_CARD_FRAME } from "../menu-list/looks.js";
7
+ import { MenuList } from "../menu-list/menu-list.js";
8
+ import { Select } from "../select/select.js";
9
+ export function BlockHead({ id, label, items, value, onPick, size, step }) {
10
+ return (_jsxs("div", { className: "o-filter-editor-block-head", "data-block-head": id, children: [_jsxs("span", { className: "o-filter-editor-relation", children: [label, ":"] }), _jsx(Select, { size: size, listWidth: "rows", "aria-label": label, items: items, value: value, ...(step ?? {}), onValueChange: (v) => { if (typeof v === "string" && v !== value)
11
+ onPick(v); } })] }));
12
+ }
13
+ export function GroupMenu({ entries, words }) {
14
+ return _jsx(Menu, { label: words.groupActions, align: "end", entries: entries, trigger: _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", look: MORE_LOOK, className: "o-filter-editor-more", "aria-label": words.groupActions, icon: glyph(DOTS_UP) }) });
15
+ }
16
+ export function MenuStep({ label, entries, onClose, words }) {
17
+ const rows = entries.map((e) => {
18
+ if (e.kind === "pick")
19
+ return { ...e, onChoose: (v) => { e.onChoose?.(v); onClose(); } };
20
+ if (e.kind === "check")
21
+ return e.disabled ? { ...e, note: e.disabled } : e;
22
+ if (e.kind === undefined || e.kind === "action")
23
+ return { ...e, ...(e.disabled ? { note: e.disabled } : {}), onSelect: () => { e.onSelect?.(); onClose(); } };
24
+ return e;
25
+ });
26
+ return _jsx("div", { className: "o-filter-editor-menu-step", ...MENU_LIST_CARD_FRAME, children: _jsx(MenuList, { label: label, entries: rows, ...(words ? { words } : {}) }) });
27
+ }
@@ -40,6 +40,8 @@ export interface FilterEditorProps {
40
40
  /** ViewKit's own words and value body for a rule the kit has no box for (set aside, a way only ViewKit words, a field the kit
41
41
  * doesn't list, a choice with no values); null where the kit draws the rule itself. */
42
42
  own?: (rule: FilterRule) => FilterOwn | null;
43
+ /** Whether the filter itself may exclude its matches (an advanced filter's own group): its foot gets a group's ⋮ too (VK-827). */
44
+ excludable?: boolean;
43
45
  /** Its words; English unless handed. */
44
46
  words?: Partial<FilterEditorWords>;
45
47
  }
@@ -52,5 +54,7 @@ export interface FilterEditorParts {
52
54
  }
53
55
  /** The filter editor's state and the parts a shell pours in. */
54
56
  export declare function useFilterEditor(props: FilterEditorProps): FilterEditorParts;
57
+ /** @deprecated `useFilterEditor`, under the name the controls door gave it until the panels' older filter editor took a host's name. */
58
+ export declare const useFilterEditorParts: typeof useFilterEditor;
55
59
  /** The body alone, for a shell that holds only a body (the Popover). */
56
60
  export declare function FilterEditor(props: FilterEditorProps): import("react/jsx-runtime").JSX.Element;