@zeyos/zx 5.0.0 → 5.2.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 (154) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +2 -1
  3. package/dist/types/components/account-menu/account-menu.d.ts +8 -0
  4. package/dist/types/components/activity-list/activity-list.d.ts +9 -1
  5. package/dist/types/components/app-icon/app-icon.d.ts +14 -2
  6. package/dist/types/components/app-sidebar/app-sidebar.d.ts +288 -14
  7. package/dist/types/components/calendar/calendar.d.ts +67 -5
  8. package/dist/types/components/card-view/card-view.d.ts +7 -4
  9. package/dist/types/components/card-view/record-card.d.ts +11 -0
  10. package/dist/types/components/context-menu/context-menu.d.ts +6 -2
  11. package/dist/types/components/data-filter/data-filter.d.ts +4 -4
  12. package/dist/types/components/dropdown/dropdown.d.ts +22 -7
  13. package/dist/types/components/field/field.d.ts +30 -0
  14. package/dist/types/components/fieldset/external-adapter.d.ts +83 -0
  15. package/dist/types/components/fieldset/fieldset.d.ts +7 -0
  16. package/dist/types/components/file-list/file-list.d.ts +35 -3
  17. package/dist/types/components/filter/filter.d.ts +127 -3
  18. package/dist/types/components/filter-panel/filter-panel.d.ts +36 -7
  19. package/dist/types/components/launcher/launcher.d.ts +8 -0
  20. package/dist/types/components/list-toolbar/list-toolbar.d.ts +15 -6
  21. package/dist/types/components/menu-button/menu-button.d.ts +6 -0
  22. package/dist/types/components/message/message.d.ts +14 -1
  23. package/dist/types/components/modal/modal.d.ts +30 -0
  24. package/dist/types/components/module-bar/module-bar.d.ts +395 -0
  25. package/dist/types/components/pagination/pagination.d.ts +17 -3
  26. package/dist/types/components/select/select.d.ts +6 -0
  27. package/dist/types/components/sheet/sheet.d.ts +15 -0
  28. package/dist/types/components/table/table.d.ts +265 -17
  29. package/dist/types/components/view/record-view.d.ts +59 -2
  30. package/dist/types/components/view-settings/view-settings.d.ts +879 -0
  31. package/dist/types/components/workspace-switcher/workspace-switcher.d.ts +327 -0
  32. package/dist/types/core/component.d.ts +12 -2
  33. package/dist/types/core/i18n.d.ts +27 -3
  34. package/dist/types/core/keyboard.d.ts +98 -1
  35. package/dist/types/core/messages.d.ts +382 -0
  36. package/dist/types/core/overlay-host.d.ts +28 -1
  37. package/dist/types/core/overlay-stack.d.ts +260 -0
  38. package/dist/types/index.d.ts +5 -2
  39. package/dist/types/internal/app-rail.d.ts +38 -0
  40. package/dist/types/internal/menu-items.d.ts +71 -3
  41. package/dist/types/zeyos/index.d.ts +1 -0
  42. package/dist/types/zeyos/launcher.d.ts +9 -0
  43. package/dist/types/zeyos/module-bar.d.ts +176 -0
  44. package/dist/types/zeyos/query.d.ts +31 -5
  45. package/dist/types/zeyos/table.d.ts +245 -8
  46. package/dist/types/zeyos/view.d.ts +16 -2
  47. package/dist/zx-zeyos.esm.js +4422 -430
  48. package/dist/zx-zeyos.esm.min.js +5 -5
  49. package/dist/zx.css +1417 -134
  50. package/dist/zx.esm.js +6986 -830
  51. package/dist/zx.esm.min.js +8 -8
  52. package/dist/zx.global.js +6986 -830
  53. package/dist/zx.global.min.js +8 -8
  54. package/dist/zx.min.css +1 -1
  55. package/docs/api.json +794 -17
  56. package/docs/llms.md +503 -63
  57. package/docs/llms.txt +6 -2
  58. package/package.json +1 -1
  59. package/src/components/account-menu/account-menu.js +12 -0
  60. package/src/components/activity-list/activity-list.js +27 -1
  61. package/src/components/app-icon/app-icon.css +13 -2
  62. package/src/components/app-icon/app-icon.js +11 -1
  63. package/src/components/app-rail/app-rail.css +19 -0
  64. package/src/components/app-sidebar/app-sidebar.css +204 -3
  65. package/src/components/app-sidebar/app-sidebar.js +646 -40
  66. package/src/components/breadcrumb/breadcrumb.css +1 -1
  67. package/src/components/calendar/calendar.css +1 -1
  68. package/src/components/calendar/calendar.js +26 -52
  69. package/src/components/card/card.css +2 -2
  70. package/src/components/card-view/card-view.css +5 -5
  71. package/src/components/card-view/card-view.js +13 -9
  72. package/src/components/card-view/record-card.js +14 -3
  73. package/src/components/code-editor/code-editor.css +1 -1
  74. package/src/components/code-editor/field-adapter.js +9 -2
  75. package/src/components/context-menu/context-menu.js +8 -2
  76. package/src/components/copy/copy-input.css +1 -1
  77. package/src/components/data-filter/data-filter.js +2 -2
  78. package/src/components/date-picker/time-picker.css +2 -2
  79. package/src/components/dock/dock.css +5 -4
  80. package/src/components/dropdown/dropdown.js +157 -72
  81. package/src/components/field/field.js +33 -3
  82. package/src/components/fieldset/external-adapter.js +363 -0
  83. package/src/components/fieldset/fieldset.js +10 -59
  84. package/src/components/file-list/file-list.js +144 -21
  85. package/src/components/filter/filter.css +86 -2
  86. package/src/components/filter/filter.js +300 -8
  87. package/src/components/filter-panel/filter-panel.js +149 -32
  88. package/src/components/finder/finder.css +1 -1
  89. package/src/components/kanban-view/kanban-view.css +3 -3
  90. package/src/components/kanban-view/kanban-view.js +5 -2
  91. package/src/components/launcher/launcher.css +1 -1
  92. package/src/components/launcher/launcher.js +29 -3
  93. package/src/components/list-toolbar/list-toolbar.js +39 -13
  94. package/src/components/master-panel/master-panel.js +0 -1
  95. package/src/components/menu-button/menu-button.css +63 -0
  96. package/src/components/menu-button/menu-button.js +97 -11
  97. package/src/components/message/message.js +60 -20
  98. package/src/components/modal/modal.css +1 -1
  99. package/src/components/modal/modal.js +66 -13
  100. package/src/components/module-bar/module-bar.css +486 -0
  101. package/src/components/module-bar/module-bar.js +1074 -0
  102. package/src/components/multi-value-editor/multi-value-editor.css +1 -1
  103. package/src/components/number-field/field-adapter.js +2 -1
  104. package/src/components/pagination/pagination.css +5 -5
  105. package/src/components/pagination/pagination.js +20 -4
  106. package/src/components/panel/panel.css +3 -2
  107. package/src/components/questionnaire/questionnaire.css +4 -4
  108. package/src/components/rating/field-adapter.js +2 -1
  109. package/src/components/rating/rating.css +1 -1
  110. package/src/components/search/search.css +4 -1
  111. package/src/components/select/select.js +9 -0
  112. package/src/components/sheet/sheet.css +1 -1
  113. package/src/components/sheet/sheet.js +74 -32
  114. package/src/components/slider/field-adapter.js +6 -1
  115. package/src/components/slider/slider.css +2 -2
  116. package/src/components/split-view/split-view.css +1 -1
  117. package/src/components/stat-tile/stat-tile.css +1 -1
  118. package/src/components/stepper/stepper.css +1 -1
  119. package/src/components/tabbox/tabbox.css +9 -5
  120. package/src/components/table/table.css +86 -11
  121. package/src/components/table/table.js +628 -57
  122. package/src/components/tag-picker/field-adapter.js +2 -1
  123. package/src/components/tooltip/tooltip.js +35 -17
  124. package/src/components/tree/tree.css +1 -1
  125. package/src/components/view/record-view.css +1 -1
  126. package/src/components/view/record-view.js +178 -18
  127. package/src/components/view-settings/view-settings.css +285 -0
  128. package/src/components/view-settings/view-settings.js +1830 -0
  129. package/src/components/workspace-switcher/workspace-switcher.css +188 -0
  130. package/src/components/workspace-switcher/workspace-switcher.js +463 -0
  131. package/src/core/component.js +88 -17
  132. package/src/core/fontawesome.js +5 -1
  133. package/src/core/i18n.js +47 -4
  134. package/src/core/icons.js +12 -2
  135. package/src/core/keyboard.js +206 -11
  136. package/src/core/messages.js +427 -0
  137. package/src/core/overlay-host.js +64 -9
  138. package/src/core/overlay-stack.js +487 -0
  139. package/src/core/position.js +22 -3
  140. package/src/index.js +5 -2
  141. package/src/internal/app-rail.js +134 -53
  142. package/src/internal/menu-items.js +61 -3
  143. package/src/zeyos/form.js +5 -3
  144. package/src/zeyos/index.js +3 -0
  145. package/src/zeyos/launcher.js +8 -3
  146. package/src/zeyos/module-bar.js +181 -0
  147. package/src/zeyos/query.js +44 -13
  148. package/src/zeyos/table.js +220 -80
  149. package/src/zeyos/view.js +43 -93
  150. package/styles/base.css +16 -1
  151. package/styles/print.css +1 -1
  152. package/styles/tokens/dark.css +4 -0
  153. package/styles/tokens/semantic.css +56 -28
  154. package/styles/zx.css +3 -0
@@ -0,0 +1,879 @@
1
+ import { Component } from '../../core/component.js';
2
+ import { Search } from '../search/search.js';
3
+ import { Select } from '../select/select.js';
4
+ import { Toggle } from '../toggle/toggle.js';
5
+ export type ViewSettingsField = import('../view/record-view.js').ViewField & ViewSettingsFieldExtras;
6
+ export type ViewSettingsFieldExtras = {
7
+ /**
8
+ * Field type; decides the glyph, the type name, and whether the
9
+ * field is offered for grouping. See the built-in type map in the documentation.
10
+ */
11
+ type?: string;
12
+ /**
13
+ * `false` keeps the field out of the grouping and board choices;
14
+ * `true` offers it whatever its type. Omitted offers it when its type is discrete.
15
+ */
16
+ groupable?: boolean;
17
+ /**
18
+ * The panel offers no handle and no hide button for it, such as
19
+ * the record title; it keeps its place while the other fields arrange around it. This governs
20
+ * only what the panel offers: a bound view has no such notion, and when the view hides a locked
21
+ * field itself, the panel shows it under Hidden with Add like any other.
22
+ */
23
+ locked?: boolean;
24
+ };
25
+ export type ViewSettingsBoard = {
26
+ /**
27
+ * Field whose values are the board's columns.
28
+ */
29
+ columnBy: string | null;
30
+ /**
31
+ * Field whose values are the swim lanes, or null for none.
32
+ */
33
+ swimlaneBy: string | null;
34
+ /**
35
+ * Whether columns without cards stay visible.
36
+ */
37
+ showEmptyColumns?: boolean;
38
+ };
39
+ export type ViewSettingsBoardOptions = {
40
+ /**
41
+ * Initial column field.
42
+ */
43
+ columnBy?: string | null;
44
+ /**
45
+ * Initial swim-lane field, or null for none.
46
+ */
47
+ swimlaneBy?: string | null;
48
+ /**
49
+ * Whether columns without cards stay visible.
50
+ */
51
+ showEmptyColumns?: boolean;
52
+ /**
53
+ * The field ids offered for columns and swim lanes, in this order.
54
+ * Omitted offers the same fields as the Group section.
55
+ */
56
+ fields?: string[];
57
+ };
58
+ export type ViewSettingsState = {
59
+ /**
60
+ * Every field id, in order, hidden ones included.
61
+ */
62
+ fieldOrder: string[];
63
+ /**
64
+ * Hidden field ids, in field order.
65
+ */
66
+ hiddenFields: string[];
67
+ /**
68
+ * Grouping field, or null for none.
69
+ */
70
+ groupBy: string | null;
71
+ /**
72
+ * Board settings, or null when the section is omitted.
73
+ */
74
+ board: ViewSettingsBoard | null;
75
+ };
76
+ export type ViewSettingsGrouping = {
77
+ /**
78
+ * The field ids offered for grouping, in this order. Omitted offers
79
+ * every field with `groupable !== false` and a discrete type.
80
+ */
81
+ fields?: string[];
82
+ };
83
+ export type ViewSettingsSection = 'fields' | 'grouping' | 'board';
84
+ export type ViewSettingsChangeReason = 'order' | 'visibility' | 'group' | 'board';
85
+ export type ViewSettingsOptions = {
86
+ /**
87
+ * Field descriptors, in their default order. Bound to a
88
+ * view, a non-empty list is also the allow-list: the view's other fields are neither listed nor
89
+ * touched. An empty list takes every field the view has.
90
+ */
91
+ fields?: ViewSettingsField[];
92
+ /**
93
+ * Preferred field order; missing fields append.
94
+ */
95
+ fieldOrder?: string[];
96
+ /**
97
+ * Hidden field ids. A field with `visible: false` starts
98
+ * hidden too; a locked field never does.
99
+ */
100
+ hiddenFields?: string[];
101
+ /**
102
+ * Initial grouping field.
103
+ */
104
+ groupBy?: string | null;
105
+ /**
106
+ * The Group section. `false` omits it;
107
+ * an object restricts the fields it offers.
108
+ */
109
+ grouping?: boolean | ViewSettingsGrouping;
110
+ /**
111
+ * The Board section (column field,
112
+ * swim-lane field, show empty columns) with its initial values and, in `fields`, the fields it
113
+ * offers; `false` omits it.
114
+ */
115
+ board?: ViewSettingsBoardOptions | false;
116
+ /**
117
+ * Order and presence of the sections. Defaults to
118
+ * `['fields', 'grouping', 'board']`; a section whose option is `false` is always left out.
119
+ */
120
+ sections?: ViewSettingsSection[];
121
+ /**
122
+ * Extends or overrides the
123
+ * built-in type map, keyed by type name.
124
+ */
125
+ types?: Record<string, {
126
+ icon?: string;
127
+ label?: string;
128
+ }>;
129
+ /**
130
+ * Field count above which the field search is shown.
131
+ */
132
+ searchThreshold?: number;
133
+ /**
134
+ * Heading level of the section headings.
135
+ */
136
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
137
+ /**
138
+ * Accessible name of the region; omitted uses the
139
+ * `viewSettings.label` message ("View settings").
140
+ */
141
+ label?: string | null;
142
+ /**
143
+ * Localized messages.
144
+ */
145
+ msg?: Record<string, string> | Record<string, Record<string, string>>;
146
+ /**
147
+ * Any change the reader made.
148
+ */
149
+ onchange?: (event: CustomEvent<{
150
+ state: ViewSettingsState;
151
+ reason: ViewSettingsChangeReason;
152
+ }>) => void;
153
+ /**
154
+ * Field order changed.
155
+ */
156
+ onfieldorderchange?: (event: CustomEvent<{
157
+ order: string[];
158
+ }>) => void;
159
+ /**
160
+ * A field was added or hidden.
161
+ */
162
+ onfieldvisibilitychange?: (event: CustomEvent<{
163
+ visible: string[];
164
+ hidden: string[];
165
+ }>) => void;
166
+ /**
167
+ * Grouping field changed.
168
+ */
169
+ ongroupchange?: (event: CustomEvent<{
170
+ field: string | null;
171
+ }>) => void;
172
+ /**
173
+ * Board settings changed.
174
+ */
175
+ onboardchange?: (event: CustomEvent<{
176
+ board: ViewSettingsBoard;
177
+ }>) => void;
178
+ };
179
+ /**
180
+ * One field as the settings know it: a record-view field descriptor plus what only the settings
181
+ * need. Any other `ViewField` property (`get`, `render`, `width`, …) is carried along untouched.
182
+ * @typedef {import('../view/record-view.js').ViewField & ViewSettingsFieldExtras} ViewSettingsField
183
+ */
184
+ /**
185
+ * @typedef {Object} ViewSettingsFieldExtras
186
+ * @property {string} [type='text'] Field type; decides the glyph, the type name, and whether the
187
+ * field is offered for grouping. See the built-in type map in the documentation.
188
+ * @property {boolean} [groupable] `false` keeps the field out of the grouping and board choices;
189
+ * `true` offers it whatever its type. Omitted offers it when its type is discrete.
190
+ * @property {boolean} [locked=false] The panel offers no handle and no hide button for it, such as
191
+ * the record title; it keeps its place while the other fields arrange around it. This governs
192
+ * only what the panel offers: a bound view has no such notion, and when the view hides a locked
193
+ * field itself, the panel shows it under Hidden with Add like any other.
194
+ */
195
+ /**
196
+ * @typedef {Object} ViewSettingsBoard
197
+ * @property {string|null} columnBy Field whose values are the board's columns.
198
+ * @property {string|null} swimlaneBy Field whose values are the swim lanes, or null for none.
199
+ * @property {boolean} [showEmptyColumns=true] Whether columns without cards stay visible.
200
+ */
201
+ /**
202
+ * The `board` option: the initial board settings plus the fields the board may use.
203
+ * @typedef {Object} ViewSettingsBoardOptions
204
+ * @property {string|null} [columnBy=null] Initial column field.
205
+ * @property {string|null} [swimlaneBy=null] Initial swim-lane field, or null for none.
206
+ * @property {boolean} [showEmptyColumns=true] Whether columns without cards stay visible.
207
+ * @property {string[]} [fields] The field ids offered for columns and swim lanes, in this order.
208
+ * Omitted offers the same fields as the Group section.
209
+ */
210
+ /**
211
+ * @typedef {Object} ViewSettingsState
212
+ * @property {string[]} fieldOrder Every field id, in order, hidden ones included.
213
+ * @property {string[]} hiddenFields Hidden field ids, in field order.
214
+ * @property {string|null} groupBy Grouping field, or null for none.
215
+ * @property {ViewSettingsBoard|null} board Board settings, or null when the section is omitted.
216
+ */
217
+ /**
218
+ * @typedef {Object} ViewSettingsGrouping
219
+ * @property {string[]} [fields] The field ids offered for grouping, in this order. Omitted offers
220
+ * every field with `groupable !== false` and a discrete type.
221
+ */
222
+ /** @typedef {'fields'|'grouping'|'board'} ViewSettingsSection */
223
+ /** @typedef {'order'|'visibility'|'group'|'board'} ViewSettingsChangeReason */
224
+ /**
225
+ * @typedef {Object} ViewSettingsOptions
226
+ * @property {ViewSettingsField[]} [fields=[]] Field descriptors, in their default order. Bound to a
227
+ * view, a non-empty list is also the allow-list: the view's other fields are neither listed nor
228
+ * touched. An empty list takes every field the view has.
229
+ * @property {string[]} [fieldOrder=[]] Preferred field order; missing fields append.
230
+ * @property {string[]} [hiddenFields=[]] Hidden field ids. A field with `visible: false` starts
231
+ * hidden too; a locked field never does.
232
+ * @property {string|null} [groupBy=null] Initial grouping field.
233
+ * @property {boolean|ViewSettingsGrouping} [grouping=true] The Group section. `false` omits it;
234
+ * an object restricts the fields it offers.
235
+ * @property {ViewSettingsBoardOptions|false} [board=false] The Board section (column field,
236
+ * swim-lane field, show empty columns) with its initial values and, in `fields`, the fields it
237
+ * offers; `false` omits it.
238
+ * @property {ViewSettingsSection[]} [sections] Order and presence of the sections. Defaults to
239
+ * `['fields', 'grouping', 'board']`; a section whose option is `false` is always left out.
240
+ * @property {Record<string, {icon?: string, label?: string}>} [types={}] Extends or overrides the
241
+ * built-in type map, keyed by type name.
242
+ * @property {number} [searchThreshold=8] Field count above which the field search is shown.
243
+ * @property {2|3|4|5|6} [headingLevel=3] Heading level of the section headings.
244
+ * @property {string|null} [label=null] Accessible name of the region; omitted uses the
245
+ * `viewSettings.label` message ("View settings").
246
+ * @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
247
+ * @property {(event: CustomEvent<{state: ViewSettingsState, reason: ViewSettingsChangeReason}>) => void} [onchange]
248
+ * Any change the reader made.
249
+ * @property {(event: CustomEvent<{order: string[]}>) => void} [onfieldorderchange] Field order changed.
250
+ * @property {(event: CustomEvent<{visible: string[], hidden: string[]}>) => void} [onfieldvisibilitychange]
251
+ * A field was added or hidden.
252
+ * @property {(event: CustomEvent<{field: string|null}>) => void} [ongroupchange] Grouping field changed.
253
+ * @property {(event: CustomEvent<{board: ViewSettingsBoard}>) => void} [onboardchange] Board settings changed.
254
+ */
255
+ /**
256
+ * The content of a "View settings" panel for a record collection: which fields are shown and in
257
+ * what order, which hidden field to bring back, what the records are grouped by, and which fields
258
+ * a board uses for its columns and swim lanes. It is content, not a container — the host puts it
259
+ * in a `Sheet`, a `Dropdown`, or a settings page.
260
+ *
261
+ * - **Fields** — the shown fields, in order, each with its type glyph. Rows are rearranged by
262
+ * dragging the handle (pointer, touch, or pen) or from the keyboard, and hidden with one button.
263
+ * The hidden fields are listed below with an explicit Add button; with more than
264
+ * `searchThreshold` fields a search narrows them, and Enter adds the first match.
265
+ * - **Group by** — a `Select` of the groupable fields, with None.
266
+ * - **Board** — column field, swim-lane field, and whether empty columns stay.
267
+ *
268
+ * Every move is announced through a polite live region ("Owner moved to position 3 of 6").
269
+ *
270
+ * `bind(view)` connects a `TableView`, `CardView`, or `KanbanView`: order and visibility are
271
+ * pushed into the view and the view's own changes come back. Grouping and board settings are only
272
+ * reported — the host decides how its views apply them.
273
+ * @fires ViewSettings#change
274
+ * @fires ViewSettings#fieldorderchange
275
+ * @fires ViewSettings#fieldvisibilitychange
276
+ * @fires ViewSettings#groupchange
277
+ * @fires ViewSettings#boardchange
278
+ * @extends {Component<ViewSettingsOptions>}
279
+ */
280
+ export declare class ViewSettings extends Component<ViewSettingsOptions> {
281
+ _createdRoot: boolean;
282
+ _snapshot: import("../../core/dom.js").TargetSnapshot;
283
+ _destroyed: boolean;
284
+ /** @type {ViewSettingsField[]} */
285
+ _fields: ViewSettingsField[];
286
+ _ownIds: Set<string>;
287
+ _order: any;
288
+ _hidden: Set<string>;
289
+ _groupBy: any;
290
+ _board: ViewSettingsBoard;
291
+ /** @type {string[]|null} */
292
+ _boardFields: string[] | null;
293
+ _sections: ViewSettingsSection[];
294
+ _query: any;
295
+ /** @type {Search|null} */
296
+ _search: Search | null;
297
+ /** @type {Select|null} */
298
+ _groupSelect: Select | null;
299
+ /** @type {Select|null} */
300
+ _columnSelect: Select | null;
301
+ /** @type {Select|null} */
302
+ _laneSelect: Select | null;
303
+ /** @type {Toggle|null} */
304
+ _emptyToggle: Toggle | null;
305
+ /** @type {{view: Record<string, any>, controller: AbortController}|null} */
306
+ _bound: {
307
+ view: Record<string, any>;
308
+ controller: AbortController;
309
+ } | null;
310
+ _syncing: boolean;
311
+ _rendering: boolean;
312
+ /** @type {{id: string, original: string[]}|null} */
313
+ _grab: {
314
+ id: string;
315
+ original: string[];
316
+ } | null;
317
+ /** @type {DragState|null} */
318
+ _drag: DragState | null;
319
+ _announceToken: number;
320
+ _level: 2 | 3 | 4 | 5 | 6;
321
+ _instructionsId: string;
322
+ static cssName: string;
323
+ /** @type {Readonly<ViewSettingsOptions>} */
324
+ static defaults: Readonly<ViewSettingsOptions>;
325
+ /**
326
+ * Builds the panel. Runs inside the base constructor, so every piece of instance state is
327
+ * initialized here rather than in a class field.
328
+ * @returns {HTMLElement}
329
+ */
330
+ render(): HTMLElement;
331
+ /**
332
+ * Returns the current settings as a JSON-safe snapshot.
333
+ * @returns {ViewSettingsState}
334
+ */
335
+ getState(): ViewSettingsState;
336
+ /**
337
+ * Applies part of a state. Unknown field ids are ignored, missing ones append, and a locked
338
+ * field stays shown. Each part that actually changes emits its own event unless `silent`.
339
+ * A keyboard pick-up or pointer drag in progress is canceled first.
340
+ * @param {Partial<ViewSettingsState>} partial State to apply.
341
+ * @param {{silent?: boolean}} [options={}] Set `silent` to suppress events.
342
+ * @returns {this}
343
+ * @fires ViewSettings#fieldorderchange
344
+ * @fires ViewSettings#fieldvisibilitychange
345
+ * @fires ViewSettings#groupchange
346
+ * @fires ViewSettings#boardchange
347
+ */
348
+ setState(partial: Partial<ViewSettingsState>, { silent }?: {
349
+ silent?: boolean;
350
+ }): this;
351
+ /**
352
+ * Replaces the field descriptors, keeping order, visibility, grouping, and board settings for
353
+ * every id that still exists.
354
+ *
355
+ * While a view is bound, the view owns the field list: change it with the view's own
356
+ * `setFields()` and the panel follows through `statechange`. A `setFields()` here is not pushed
357
+ * to the view and lasts only until the view's next change.
358
+ * @param {ViewSettingsField[]} fields Next fields.
359
+ * @returns {this}
360
+ */
361
+ setFields(fields: ViewSettingsField[]): this;
362
+ /**
363
+ * Returns the field descriptors in their current order.
364
+ * @returns {ViewSettingsField[]}
365
+ */
366
+ getFields(): ViewSettingsField[];
367
+ /**
368
+ * Shows a hidden field at the end of the shown list.
369
+ * @param {string} id Field id.
370
+ * @returns {this}
371
+ * @fires ViewSettings#fieldvisibilitychange
372
+ */
373
+ showField(id: string): this;
374
+ /**
375
+ * Hides a shown field. A locked field and the last shown field cannot be hidden.
376
+ * @param {string} id Field id.
377
+ * @returns {this}
378
+ * @fires ViewSettings#fieldvisibilitychange
379
+ */
380
+ hideField(id: string): this;
381
+ /**
382
+ * Moves a shown field to a position among the movable shown fields (locked ones keep theirs).
383
+ * @param {string} id Field id.
384
+ * @param {number} index Zero-based target position among the movable shown fields.
385
+ * @returns {this}
386
+ * @fires ViewSettings#fieldorderchange
387
+ */
388
+ moveField(id: string, index: number): this;
389
+ /**
390
+ * Connects a record view (`TableView`, `CardView`, `KanbanView`, or anything exposing the
391
+ * `RecordView` state surface). The view's fields and state are read now; order and visibility
392
+ * changes made here are pushed through `setFieldOrder()` and `setFieldVisible()`; and the view's
393
+ * own `statechange` is followed, so a column hidden from a table header disappears here too.
394
+ * The view's labels and types win over the panel's own descriptors, which supply only what the
395
+ * view lacks (`locked`, `groupable`, a type the view leaves at its `'text'` default). While
396
+ * bound, the view owns the field list; see `setFields()`.
397
+ *
398
+ * Grouping and board settings are never applied to the view — they are emitted, and the host
399
+ * decides (a `CardView` is re-created or given a new `groupBy`, a `KanbanView` its axes). A
400
+ * view's own `groupBy`, `columnBy`, and `swimlaneBy` options are adopted when they name fields.
401
+ * @param {object} view Record view.
402
+ * @param {{board?: ViewSettingsBoard|false}} [options={}] `board` replaces the board settings
403
+ * read from the view.
404
+ * @returns {this}
405
+ */
406
+ bind(view: object, options?: {
407
+ board?: ViewSettingsBoard | false;
408
+ }): this;
409
+ /**
410
+ * Releases a bound view. The settings keep their current state.
411
+ * @returns {this}
412
+ */
413
+ unbind(): this;
414
+ /**
415
+ * Focuses the field search, or the first control of the shown list when there is no search.
416
+ * @returns {this}
417
+ */
418
+ focus(): this;
419
+ /**
420
+ * Destroys the nested controls, releases a bound view, and restores an enhanced target.
421
+ * @returns {void}
422
+ */
423
+ destroy(): void;
424
+ /**
425
+ * @param {string} text Heading text.
426
+ * @param {number} [offset=0] Levels below the section heading.
427
+ * @param {string} [className='zx-view-settings__heading'] Heading class.
428
+ * @returns {{element: HTMLElement, id: string}}
429
+ */
430
+ _heading(text: string, offset?: number, className?: string): {
431
+ element: HTMLElement;
432
+ id: string;
433
+ };
434
+ /** @returns {HTMLElement} The Fields section. */
435
+ _buildFieldsSection(): HTMLElement;
436
+ /** @returns {HTMLElement} The Group section. */
437
+ _buildGroupSection(): HTMLElement;
438
+ /** @returns {HTMLElement} The Board section. */
439
+ _buildBoardSection(): HTMLElement;
440
+ /**
441
+ * Creates or removes the field search to match the field count.
442
+ * @returns {void}
443
+ */
444
+ _syncSearch(): void;
445
+ /**
446
+ * Rebuilds both field lists, then puts focus back: on the control asked for, or else on the same
447
+ * control of the same field when focus was inside the lists. A pointer drag in progress ends —
448
+ * the rows it measured are about to be replaced — and so does a keyboard pick-up, unless the
449
+ * redraw is that pick-up's own step.
450
+ * @param {{id: string, part: 'handle'|'hide'|'add'}|null} [focus=null] Control to focus afterwards.
451
+ * @param {{keepGrab?: boolean}} [options={}] `keepGrab` marks a redraw made by the pick-up itself.
452
+ * @returns {void}
453
+ */
454
+ _renderFields(focus?: {
455
+ id: string;
456
+ part: 'handle' | 'hide' | 'add';
457
+ } | null, { keepGrab }?: {
458
+ keepGrab?: boolean;
459
+ }): void;
460
+ /**
461
+ * @param {ViewSettingsField} field Field.
462
+ * @param {boolean} canHideAny Whether more than one field is shown.
463
+ * @returns {HTMLElement}
464
+ */
465
+ _shownRow(field: ViewSettingsField, canHideAny: boolean): HTMLElement;
466
+ /**
467
+ * @param {ViewSettingsField} field Field.
468
+ * @returns {HTMLElement}
469
+ */
470
+ _hiddenRow(field: ViewSettingsField): HTMLElement;
471
+ /**
472
+ * The type glyph a row shows before its label. The glyph is decorative; the type name is the
473
+ * element's `title` for the pointer and visually hidden text for everyone else. It follows the
474
+ * label in the source, so a row reads "Owner, Text" — the glyph is placed first by CSS.
475
+ * @param {string|undefined} type Field type.
476
+ * @returns {HTMLElement}
477
+ */
478
+ _typeBadge(type: string | undefined): HTMLElement;
479
+ /** @param {string|undefined} type @returns {Element} The type's decorative glyph. */
480
+ _typeGlyph(type: string | undefined): Element;
481
+ /** @param {string|undefined} type @returns {string} The translated type name. */
482
+ _typeLabel(type: string | undefined): string;
483
+ /** @param {SelectFieldItem} item @returns {HTMLElement} Option content with the type glyph. */
484
+ _optionContent(item: SelectFieldItem): HTMLElement;
485
+ /** Refreshes the grouping and board controls from state. @returns {void} */
486
+ _syncGroupControls(): void;
487
+ /** @param {string} query @returns {void} */
488
+ _setQuery(query: string): void;
489
+ /** Adds the first hidden field matching the query; Enter in the search. @returns {void} */
490
+ _addFirstMatch(): void;
491
+ /**
492
+ * Shows a field from the hidden list and moves focus somewhere sensible.
493
+ * @param {string} id Field id.
494
+ * @param {boolean} fromButton Whether the Add button was used (focus moves to the next one).
495
+ * @returns {void}
496
+ */
497
+ _addFromPanel(id: string, fromButton: boolean): void;
498
+ /** @param {MouseEvent} event @returns {void} */
499
+ _onHiddenClick(event: MouseEvent): void;
500
+ /** @param {MouseEvent} event @returns {void} */
501
+ _onShownClick(event: MouseEvent): void;
502
+ /** @param {KeyboardEvent} event @returns {void} */
503
+ _onHandleKeydown(event: KeyboardEvent): void;
504
+ /** A picked-up field is dropped where it is when focus leaves it. @param {FocusEvent} event @returns {void} */
505
+ _onHandleFocusout(event: FocusEvent): void;
506
+ /**
507
+ * @param {string} id Field id.
508
+ * @param {number} target Target index among movable fields.
509
+ * @param {boolean} commit Whether the move is final (emitted) or part of a pick-up.
510
+ * @returns {void}
511
+ */
512
+ _moveFromKeyboard(id: string, target: number, commit: boolean): void;
513
+ /** @param {string} id @returns {void} */
514
+ _pickUp(id: string): void;
515
+ /**
516
+ * @param {{id: string, part: 'handle'|'hide'|'add'}|null} [focus] Control to focus afterwards;
517
+ * omitted keeps focus on the dropped row's handle when it had it.
518
+ * @returns {void}
519
+ */
520
+ _drop(focus?: {
521
+ id: string;
522
+ part: 'handle' | 'hide' | 'add';
523
+ } | null): void;
524
+ /** @returns {void} */
525
+ _cancelGrab(): void;
526
+ /**
527
+ * Ends whatever reordering is in progress before state changes from outside: a keyboard
528
+ * pick-up returns the row to where it was, and a pointer drag is dropped nowhere.
529
+ * @returns {void}
530
+ */
531
+ _settle(): void;
532
+ /** @param {string} id Field whose move was canceled. @returns {void} */
533
+ _announceCanceled(id: string): void;
534
+ /** @param {PointerEvent} event @returns {void} */
535
+ _onPointerDown(event: PointerEvent): void;
536
+ /** @param {PointerEvent} event @returns {void} */
537
+ _onPointerMove(event: PointerEvent): void;
538
+ /** @param {PointerEvent} event @returns {void} */
539
+ _onPointerUp(event: PointerEvent): void;
540
+ /**
541
+ * Starts a pointer drag: the dragged row follows the pointer, and a frame loop scrolls the
542
+ * nearest scroll container while the pointer rests near its top or bottom edge.
543
+ * @param {DragState} drag Press being promoted.
544
+ * @returns {void}
545
+ */
546
+ _beginDrag(drag: DragState): void;
547
+ /** @param {DragState} drag Active drag. @returns {void} */
548
+ _scheduleAutoScroll(drag: DragState): void;
549
+ /**
550
+ * Moves the dragged row under the pointer — compensating for any scroll since the drag began —
551
+ * and updates the insertion line.
552
+ * @param {DragState} drag Active drag.
553
+ * @returns {void}
554
+ */
555
+ _positionDrag(drag: DragState): void;
556
+ /**
557
+ * Resolves and marks the insertion point. The other rows are measured on every call rather than
558
+ * once at the start, so a list scrolled mid-drag still drops where the line says.
559
+ * @param {DragState} drag Active drag.
560
+ * @param {number} y Pointer client y.
561
+ * @returns {void}
562
+ */
563
+ _updateDropTarget(drag: DragState, y: number): void;
564
+ /** @param {DragState} drag @returns {void} */
565
+ _endDrag(drag: DragState): void;
566
+ /** @param {boolean} [announce=false] Whether to say so. @returns {void} */
567
+ _cancelDrag(announce?: boolean): void;
568
+ /** @param {string|null} field @returns {void} */
569
+ _setGroup(field: string | null): void;
570
+ /** @param {Partial<ViewSettingsBoard>} patch @returns {void} */
571
+ _setBoard(patch: Partial<ViewSettingsBoard>): void;
572
+ /** @param {boolean} [withChange=true] Whether `change` follows. @returns {void} */
573
+ _emitOrder(withChange?: boolean): void;
574
+ /** @returns {void} */
575
+ _emitVisibility(): void;
576
+ /** @returns {void} */
577
+ _emitGroup(): void;
578
+ /** @returns {void} */
579
+ _emitBoard(): void;
580
+ /** @param {ViewSettingsChangeReason} reason @returns {void} */
581
+ _emitChange(reason: ViewSettingsChangeReason): void;
582
+ /** Pushes order and visibility into the bound view. @returns {void} */
583
+ _pushToView(): void;
584
+ /**
585
+ * Reads fields, order, and visibility from the bound view. Silent: the view reported its own
586
+ * change already, and echoing it from here would hand the host the same change twice.
587
+ * @param {boolean} withFields Whether the field descriptors are re-read too.
588
+ * @returns {void}
589
+ */
590
+ _pullFromView(withFields: boolean): void;
591
+ /** @returns {string[]} Locked field ids. */
592
+ _lockedIds(): string[];
593
+ /** @returns {string[]} Shown, movable field ids in order. */
594
+ _movableIds(): string[];
595
+ /** @param {string} id @returns {ViewSettingsField|undefined} */
596
+ _field(id: string): ViewSettingsField | undefined;
597
+ /** @param {string} id @returns {boolean} Whether the field may be hidden now. */
598
+ _canHide(id: string): boolean;
599
+ /**
600
+ * Whether `candidate` keeps a hide button once `removed` is hidden.
601
+ * @param {string} candidate Field id.
602
+ * @param {string} removed Field being hidden.
603
+ * @returns {boolean}
604
+ */
605
+ _canHideAfter(candidate: string, removed: string): boolean;
606
+ /** @param {string} id @returns {HTMLElement|null} The shown row for a field. */
607
+ _row(id: string): HTMLElement | null;
608
+ /** @param {string} id @returns {{position: number, total: number}} 1-based place in the shown list. */
609
+ _position(id: string): {
610
+ position: number;
611
+ total: number;
612
+ };
613
+ /** @param {string} id @returns {void} */
614
+ _announceMove(id: string): void;
615
+ /** @returns {{id: string, part: 'handle'|'hide'|'add'}|null} The focused row control, if any. */
616
+ _activePart(): {
617
+ id: string;
618
+ part: 'handle' | 'hide' | 'add';
619
+ } | null;
620
+ /**
621
+ * @param {Element|null} element A focus target.
622
+ * @returns {{id: string, part: 'handle'|'hide'|'add'}|null} The row control it is, if any.
623
+ */
624
+ _partOf(element: Element | null): {
625
+ id: string;
626
+ part: 'handle' | 'hide' | 'add';
627
+ } | null;
628
+ /** @param {{id: string, part: 'handle'|'hide'|'add'}} focus @returns {void} */
629
+ _focusPart(focus: {
630
+ id: string;
631
+ part: 'handle' | 'hide' | 'add';
632
+ }): void;
633
+ /** @param {string} message @returns {void} */
634
+ _announce(message: string): void;
635
+ /**
636
+ * Resolves a message through the host translator, falling back to the built-in English text.
637
+ * @param {string} key Message key.
638
+ * @param {string} fallback Built-in text, with `%1`-style placeholders.
639
+ * @param {...unknown} args Interpolation values.
640
+ * @returns {string}
641
+ */
642
+ _message(key: string, fallback: string, ...args: unknown[]): string;
643
+ }
644
+ export type DragState = {
645
+ /**
646
+ * Field being dragged.
647
+ */
648
+ id: string;
649
+ /**
650
+ * Pointer that pressed the handle.
651
+ */
652
+ pointerId: number;
653
+ /**
654
+ * Pointer-down client x.
655
+ */
656
+ startX: number;
657
+ /**
658
+ * Pointer-down client y.
659
+ */
660
+ startY: number;
661
+ /**
662
+ * Whether the press has travelled far enough to be a drag.
663
+ */
664
+ active: boolean;
665
+ /**
666
+ * Whether the drag is being torn down.
667
+ */
668
+ ending: boolean;
669
+ /**
670
+ * Captured handle.
671
+ */
672
+ handle: HTMLElement;
673
+ /**
674
+ * Latest pointer client y.
675
+ */
676
+ y: number;
677
+ /**
678
+ * Dragged row.
679
+ */
680
+ row: HTMLElement;
681
+ /**
682
+ * Target index among the movable fields.
683
+ */
684
+ target: number | null;
685
+ /**
686
+ * Nearest scroll container of the list.
687
+ */
688
+ scroller: Element | null;
689
+ /**
690
+ * Its scroll position when the drag began.
691
+ */
692
+ startScroll: number;
693
+ /**
694
+ * Its scroll position when the row was last placed.
695
+ */
696
+ lastScroll: number;
697
+ /**
698
+ * Pending auto-scroll frame, or 0.
699
+ */
700
+ frame: number;
701
+ };
702
+ export type SelectFieldItem = {
703
+ ID: string;
704
+ name: string;
705
+ type: string;
706
+ };
707
+ /**
708
+ * Any change the reader made, after the specific event.
709
+ * @event ViewSettings#change
710
+ * @type {CustomEvent<{state: ViewSettingsState, reason: ViewSettingsChangeReason}>}
711
+ */
712
+ /**
713
+ * The field order changed.
714
+ * @event ViewSettings#fieldorderchange
715
+ * @type {CustomEvent<{order: string[]}>}
716
+ */
717
+ /**
718
+ * A field was added or hidden.
719
+ * @event ViewSettings#fieldvisibilitychange
720
+ * @type {CustomEvent<{visible: string[], hidden: string[]}>}
721
+ */
722
+ /**
723
+ * The grouping field changed; null is no grouping.
724
+ * @event ViewSettings#groupchange
725
+ * @type {CustomEvent<{field: string|null}>}
726
+ */
727
+ /**
728
+ * A board setting changed.
729
+ * @event ViewSettings#boardchange
730
+ * @type {CustomEvent<{board: ViewSettingsBoard}>}
731
+ */
732
+ /**
733
+ * @typedef {Object} DragState
734
+ * @property {string} id Field being dragged.
735
+ * @property {number} pointerId Pointer that pressed the handle.
736
+ * @property {number} startX Pointer-down client x.
737
+ * @property {number} startY Pointer-down client y.
738
+ * @property {boolean} active Whether the press has travelled far enough to be a drag.
739
+ * @property {boolean} ending Whether the drag is being torn down.
740
+ * @property {HTMLElement} handle Captured handle.
741
+ * @property {number} y Latest pointer client y.
742
+ * @property {HTMLElement} row Dragged row.
743
+ * @property {number|null} target Target index among the movable fields.
744
+ * @property {Element|null} scroller Nearest scroll container of the list.
745
+ * @property {number} startScroll Its scroll position when the drag began.
746
+ * @property {number} lastScroll Its scroll position when the row was last placed.
747
+ * @property {number} frame Pending auto-scroll frame, or 0.
748
+ */
749
+ /** @typedef {{ID: string, name: string, type: string}} SelectFieldItem */
750
+ /**
751
+ * Validates and clones field descriptors: ids become trimmed strings, a missing label is derived
752
+ * from the id, `type` defaults to `'text'`, and `locked` and `groupable` are read as booleans.
753
+ * @param {ViewSettingsField[]} fields Raw descriptors.
754
+ * @returns {ViewSettingsField[]}
755
+ */
756
+ export declare function normalizeViewSettingsFields(fields: ViewSettingsField[]): ViewSettingsField[];
757
+ /**
758
+ * Resolves a field type to its glyph and English name, through the host's `types` overrides, the
759
+ * alias table (`int` → number, `enum` → select, …), and the built-in map. An unknown type keeps
760
+ * its own name and the text glyph, so a server's new type still shows something sensible.
761
+ * @param {string|null|undefined} type Field type.
762
+ * @param {Record<string, {icon?: string, label?: string}>|null} [overrides=null] Host overrides.
763
+ * @returns {{type: string, icon: string, label: string, key: string|null}} `key` is the message
764
+ * key of a built-in label, null for a host-supplied or derived one.
765
+ */
766
+ export declare function resolveFieldType(type: string | null | undefined, overrides?: Record<string, {
767
+ icon?: string;
768
+ label?: string;
769
+ }> | null): {
770
+ type: string;
771
+ icon: string;
772
+ label: string;
773
+ key: string | null;
774
+ };
775
+ /**
776
+ * Whether a type sorts records into a few named buckets — what grouping, board columns, and swim
777
+ * lanes need: text, select (and enum), status, priority, boolean, and entity.
778
+ * @param {string|null|undefined} type Field type.
779
+ * @returns {boolean}
780
+ */
781
+ export declare function isDiscreteFieldType(type: string | null | undefined): boolean;
782
+ /**
783
+ * The field ids offered for grouping. `grouping.fields` restricts and orders them; otherwise every
784
+ * field is offered whose `groupable` is `true`, or is not `false` and whose type is discrete.
785
+ * @param {ViewSettingsField[]} fields Normalized fields.
786
+ * @param {boolean|ViewSettingsGrouping|null|undefined} grouping The `grouping` option.
787
+ * @returns {string[]}
788
+ */
789
+ export declare function groupingFieldIds(fields: ViewSettingsField[], grouping: boolean | ViewSettingsGrouping | null | undefined): string[];
790
+ /**
791
+ * Whether a field matches a search query. Case and accents are ignored, every word must appear,
792
+ * and the label, the id, and the type name are all searched — "date" finds every date field.
793
+ * @param {{id: string, label?: string}} field Field.
794
+ * @param {string} query Search text.
795
+ * @param {string} [typeLabel=''] The field's type name.
796
+ * @returns {boolean}
797
+ */
798
+ export declare function matchesFieldQuery(field: {
799
+ id: string;
800
+ label?: string;
801
+ }, query: string, typeLabel?: string): boolean;
802
+ /**
803
+ * Moves one shown field to a position among the movable shown fields. Locked fields keep their
804
+ * slots and hidden fields keep their place in the full order; the result is a new full order.
805
+ * An unknown, hidden, or locked id returns an unchanged copy.
806
+ * @param {string[]} order Full field order.
807
+ * @param {Iterable<string>} hidden Hidden field ids.
808
+ * @param {Iterable<string>} locked Locked field ids.
809
+ * @param {string} id Field to move.
810
+ * @param {number} index Target position among the movable shown fields; clamped.
811
+ * @returns {string[]}
812
+ */
813
+ export declare function moveVisibleField(order: string[], hidden: Iterable<string>, locked: Iterable<string>, id: string, index: number): string[];
814
+ /**
815
+ * Shows a hidden field at the end of the shown fields: it leaves the hidden set and moves to just
816
+ * after the last shown field, so "Add" puts it where the reader is looking.
817
+ * @param {string[]} order Full field order.
818
+ * @param {Iterable<string>} hidden Hidden field ids.
819
+ * @param {string} id Field to show.
820
+ * @returns {{order: string[], hidden: string[]}}
821
+ */
822
+ export declare function showFieldInOrder(order: string[], hidden: Iterable<string>, id: string): {
823
+ order: string[];
824
+ hidden: string[];
825
+ };
826
+ /**
827
+ * The gap a pointer is over, given the vertical midpoints of the rows: 0 is above the first row,
828
+ * `middles.length` below the last.
829
+ * @param {number[]} middles Row midpoints, top to bottom.
830
+ * @param {number} y Pointer position.
831
+ * @returns {number}
832
+ */
833
+ export declare function dropGapIndex(middles: number[], y: number): number;
834
+ /**
835
+ * Merges a bound view's field with the panel's own descriptor for it. The view's label and type
836
+ * win; the panel's descriptor supplies only what the view lacks — `locked`, `groupable`, and a
837
+ * type where the view reports just the `'text'` default a record view fills in for none.
838
+ * @param {ViewSettingsField|null} own The panel's descriptor, if it has one.
839
+ * @param {ViewSettingsField} field The view's descriptor.
840
+ * @returns {ViewSettingsField}
841
+ */
842
+ export declare function mergeViewField(own: ViewSettingsField | null, field: ViewSettingsField): ViewSettingsField;
843
+ /**
844
+ * How far a drag should scroll its container this frame: up when the pointer is within `edge`
845
+ * pixels of the top and the list continues above, down likewise at the bottom, otherwise 0.
846
+ * @param {number} y Pointer client y.
847
+ * @param {{top: number, bottom: number}} edges The container's visible top and bottom.
848
+ * @param {{top: number, bottom: number}} list The list's client rectangle.
849
+ * @param {number} [edge=32] Width of the edge band in pixels.
850
+ * @param {number} [step=12] Pixels per frame.
851
+ * @returns {number}
852
+ */
853
+ export declare function autoScrollDelta(y: number, edges: {
854
+ top: number;
855
+ bottom: number;
856
+ }, list: {
857
+ top: number;
858
+ bottom: number;
859
+ }, edge?: number, step?: number): number;
860
+ /**
861
+ * Resolves the sections to render, in order: the `sections` option (or the default order) with
862
+ * unknown and duplicate names dropped, and the grouping or board section removed when its option
863
+ * is `false`.
864
+ * @param {unknown} sections The `sections` option.
865
+ * @param {{grouping?: unknown, board?: unknown}} options The `grouping` and `board` options.
866
+ * @returns {ViewSettingsSection[]}
867
+ */
868
+ export declare function normalizeSections(sections: unknown, options?: {
869
+ grouping?: unknown;
870
+ board?: unknown;
871
+ }): ViewSettingsSection[];
872
+ /**
873
+ * Normalizes board settings. `false` and null mean no board. With `ids`, a field that does not
874
+ * exist becomes null, and a swim-lane field equal to the column field is dropped.
875
+ * @param {unknown} board Raw board settings.
876
+ * @param {string[]|null} [ids=null] Known field ids, or null to skip the check.
877
+ * @returns {ViewSettingsBoard|null}
878
+ */
879
+ export declare function normalizeBoard(board: unknown, ids?: string[] | null): ViewSettingsBoard | null;