@zeyos/zx 4.1.0 → 4.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.
- package/CHANGELOG.md +61 -0
- package/DESIGN-SYSTEM.md +33 -3
- package/README.md +17 -5
- package/dist/types/components/app-icon/app-icon.d.ts +8 -1
- package/dist/types/components/aurora/aurora.d.ts +72 -0
- package/dist/types/components/calendar/calendar-model.d.ts +202 -0
- package/dist/types/components/calendar/calendar.d.ts +500 -0
- package/dist/types/components/card-view/card-view.d.ts +303 -0
- package/dist/types/components/card-view/record-card.d.ts +242 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +572 -0
- package/dist/types/components/table/table.d.ts +120 -31
- package/dist/types/components/table-view/table-view.d.ts +192 -0
- package/dist/types/components/view/record-view.d.ts +464 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/zeyos/calendar.d.ts +91 -0
- package/dist/types/zeyos/icons.d.ts +19 -3
- package/dist/types/zeyos/index.d.ts +4 -0
- package/dist/types/zeyos/legacy-saved-views.d.ts +66 -0
- package/dist/types/zeyos/saved-views.d.ts +331 -0
- package/dist/types/zeyos/view.d.ts +305 -0
- package/dist/zx-zeyos.esm.js +4627 -1460
- package/dist/zx-zeyos.esm.min.js +1 -1
- package/dist/zx.css +2492 -410
- package/dist/zx.esm.js +4891 -115
- package/dist/zx.esm.min.js +3 -3
- package/dist/zx.global.js +4891 -115
- package/dist/zx.global.min.js +3 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +1702 -191
- package/docs/llms.md +207 -20
- package/docs/llms.txt +16 -6
- package/package.json +1 -1
- package/src/components/app-icon/app-icon.css +140 -30
- package/src/components/app-icon/app-icon.js +32 -5
- package/src/components/app-rail/app-rail.css +11 -2
- package/src/components/app-sidebar/app-sidebar.css +11 -2
- package/src/components/aurora/aurora.css +143 -0
- package/src/components/aurora/aurora.js +146 -0
- package/src/components/avatar/avatar.css +1 -1
- package/src/components/button/button.css +34 -2
- package/src/components/calendar/calendar-model.js +402 -0
- package/src/components/calendar/calendar.css +567 -0
- package/src/components/calendar/calendar.js +1524 -0
- package/src/components/card/card.css +25 -3
- package/src/components/card-view/card-view.css +389 -0
- package/src/components/card-view/card-view.js +527 -0
- package/src/components/card-view/record-card.js +392 -0
- package/src/components/context-menu/context-menu.css +2 -2
- package/src/components/date-picker/date-picker.css +15 -3
- package/src/components/datebox/date-range-box.css +15 -2
- package/src/components/datebox/datebox.css +16 -3
- package/src/components/dropdown/dropdown.css +15 -3
- package/src/components/kanban-view/kanban-view.css +216 -0
- package/src/components/kanban-view/kanban-view.js +1228 -0
- package/src/components/launcher/launcher.css +18 -5
- package/src/components/master-panel/master-panel.css +14 -3
- package/src/components/menu-button/menu-button.css +2 -2
- package/src/components/message/message.css +15 -10
- package/src/components/modal/modal.css +15 -3
- package/src/components/navigation-bar/navigation-bar.css +17 -5
- package/src/components/panel/panel.css +10 -2
- package/src/components/select/select.css +20 -4
- package/src/components/sheet/sheet.css +4 -1
- package/src/components/table/table.css +80 -4
- package/src/components/table/table.js +322 -37
- package/src/components/table-view/table-view.css +18 -0
- package/src/components/table-view/table-view.js +347 -0
- package/src/components/tag-picker/tag-picker.css +15 -3
- package/src/components/tooltip/tooltip.css +15 -3
- package/src/components/view/record-view.css +114 -0
- package/src/components/view/record-view.js +770 -0
- package/src/index.js +15 -0
- package/src/zeyos/calendar.js +115 -0
- package/src/zeyos/icons.js +15 -8
- package/src/zeyos/index.js +13 -0
- package/src/zeyos/launcher.js +2 -2
- package/src/zeyos/legacy-saved-views.js +155 -0
- package/src/zeyos/saved-views.js +815 -0
- package/src/zeyos/table.js +3 -1
- package/src/zeyos/view.js +543 -0
- package/styles/icons.css +3 -10
- package/styles/tokens/semantic.css +74 -2
- package/styles/zx.css +6 -0
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
import { RecordView } from '../view/record-view.js';
|
|
2
|
+
export type KanbanRecord = Record<string, any>;
|
|
3
|
+
export type RecordViewOptions = import('../view/record-view.js').RecordViewOptions;
|
|
4
|
+
export type RecordCardPreview = import('../card-view/record-card.js').RecordCardPreview;
|
|
5
|
+
export type RecordCardLink = import('../card-view/record-card.js').RecordCardLink;
|
|
6
|
+
export type RecordCardAction = import('../card-view/record-card.js').RecordCardAction;
|
|
7
|
+
export type KanbanAccessor = string | ((record: KanbanRecord, index: number) => unknown) | null;
|
|
8
|
+
export type KanbanCardField = string | ((record: KanbanRecord, index: number) => unknown) | null;
|
|
9
|
+
export type KanbanMovePoint = {
|
|
10
|
+
/**
|
|
11
|
+
* Column id.
|
|
12
|
+
*/
|
|
13
|
+
column: string;
|
|
14
|
+
/**
|
|
15
|
+
* Swim-lane id, or null when lanes are disabled.
|
|
16
|
+
*/
|
|
17
|
+
lane: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Zero-based position within the destination column and lane.
|
|
20
|
+
*/
|
|
21
|
+
index: number;
|
|
22
|
+
};
|
|
23
|
+
export type KanbanMoveContext = {
|
|
24
|
+
/**
|
|
25
|
+
* Record id.
|
|
26
|
+
*/
|
|
27
|
+
id: unknown;
|
|
28
|
+
/**
|
|
29
|
+
* Original position.
|
|
30
|
+
*/
|
|
31
|
+
from: KanbanMovePoint;
|
|
32
|
+
/**
|
|
33
|
+
* Proposed position.
|
|
34
|
+
*/
|
|
35
|
+
to: KanbanMovePoint;
|
|
36
|
+
/**
|
|
37
|
+
* Destination column.
|
|
38
|
+
*/
|
|
39
|
+
column: KanbanColumn;
|
|
40
|
+
/**
|
|
41
|
+
* Destination lane.
|
|
42
|
+
*/
|
|
43
|
+
swimlane: KanbanSwimlane | null;
|
|
44
|
+
};
|
|
45
|
+
export type KanbanColumn = {
|
|
46
|
+
/**
|
|
47
|
+
* Stable column id.
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* Visible column label.
|
|
52
|
+
*/
|
|
53
|
+
label: string;
|
|
54
|
+
/**
|
|
55
|
+
* Value written by local moves; defaults to `id`.
|
|
56
|
+
*/
|
|
57
|
+
value?: unknown;
|
|
58
|
+
/**
|
|
59
|
+
* Advisory work-in-progress limit.
|
|
60
|
+
*/
|
|
61
|
+
limit?: number | null;
|
|
62
|
+
/**
|
|
63
|
+
* Eligibility
|
|
64
|
+
* predicate. Returning false rejects the move before the cancelable event is emitted.
|
|
65
|
+
*/
|
|
66
|
+
accept?: (record: KanbanRecord, context: KanbanMoveContext) => boolean;
|
|
67
|
+
};
|
|
68
|
+
export type KanbanSwimlane = {
|
|
69
|
+
/**
|
|
70
|
+
* Stable lane id.
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* Visible lane label.
|
|
75
|
+
*/
|
|
76
|
+
label: string;
|
|
77
|
+
/**
|
|
78
|
+
* Value written by local moves; defaults to `id`.
|
|
79
|
+
*/
|
|
80
|
+
value?: unknown;
|
|
81
|
+
/**
|
|
82
|
+
* Eligibility
|
|
83
|
+
* predicate. Returning false rejects the move before the cancelable event is emitted.
|
|
84
|
+
*/
|
|
85
|
+
accept?: (record: KanbanRecord, context: KanbanMoveContext) => boolean;
|
|
86
|
+
};
|
|
87
|
+
export type KanbanDestination = {
|
|
88
|
+
/**
|
|
89
|
+
* Destination column; omitted keeps the current column.
|
|
90
|
+
*/
|
|
91
|
+
column?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Destination lane; omitted keeps the current lane.
|
|
94
|
+
*/
|
|
95
|
+
lane?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Zero-based destination position; omitted appends.
|
|
98
|
+
*/
|
|
99
|
+
index?: number;
|
|
100
|
+
};
|
|
101
|
+
export type KanbanViewState = {
|
|
102
|
+
/**
|
|
103
|
+
* State schema version.
|
|
104
|
+
*/
|
|
105
|
+
version: 1;
|
|
106
|
+
/**
|
|
107
|
+
* Shared field order.
|
|
108
|
+
*/
|
|
109
|
+
fieldOrder: string[];
|
|
110
|
+
/**
|
|
111
|
+
* Shared hidden fields.
|
|
112
|
+
*/
|
|
113
|
+
hiddenFields: string[];
|
|
114
|
+
/**
|
|
115
|
+
* Shared sort.
|
|
116
|
+
*/
|
|
117
|
+
sort: {
|
|
118
|
+
id: string;
|
|
119
|
+
dir: 'asc' | 'desc';
|
|
120
|
+
} | null;
|
|
121
|
+
/**
|
|
122
|
+
* Column order.
|
|
123
|
+
*/
|
|
124
|
+
columnOrder: string[];
|
|
125
|
+
/**
|
|
126
|
+
* Swim-lane order.
|
|
127
|
+
*/
|
|
128
|
+
swimlaneOrder: string[];
|
|
129
|
+
/**
|
|
130
|
+
* Collapsed column ids.
|
|
131
|
+
*/
|
|
132
|
+
collapsedColumns: string[];
|
|
133
|
+
/**
|
|
134
|
+
* Collapsed swim-lane ids.
|
|
135
|
+
*/
|
|
136
|
+
collapsedSwimlanes: string[];
|
|
137
|
+
};
|
|
138
|
+
export type KanbanViewOptions = {
|
|
139
|
+
/**
|
|
140
|
+
* Shared field descriptors.
|
|
141
|
+
*/
|
|
142
|
+
fields?: import('../view/record-view.js').ViewField[];
|
|
143
|
+
/**
|
|
144
|
+
* Records.
|
|
145
|
+
*/
|
|
146
|
+
data?: KanbanRecord[];
|
|
147
|
+
/**
|
|
148
|
+
* Stable record id accessor.
|
|
149
|
+
*/
|
|
150
|
+
recordId?: string | ((record: KanbanRecord) => unknown);
|
|
151
|
+
/**
|
|
152
|
+
* Shared initial sort.
|
|
153
|
+
*/
|
|
154
|
+
sort?: {
|
|
155
|
+
id: string;
|
|
156
|
+
dir: 'asc' | 'desc';
|
|
157
|
+
} | null;
|
|
158
|
+
/**
|
|
159
|
+
* Shared sort mode.
|
|
160
|
+
*/
|
|
161
|
+
sortMode?: 'local' | 'server';
|
|
162
|
+
/**
|
|
163
|
+
* Shared selection mode.
|
|
164
|
+
*/
|
|
165
|
+
selectable?: false | 'single' | 'multi';
|
|
166
|
+
/**
|
|
167
|
+
* Initial record ids.
|
|
168
|
+
*/
|
|
169
|
+
selection?: unknown[];
|
|
170
|
+
/**
|
|
171
|
+
* Shared field order.
|
|
172
|
+
*/
|
|
173
|
+
fieldOrder?: string[];
|
|
174
|
+
/**
|
|
175
|
+
* Shared hidden fields.
|
|
176
|
+
*/
|
|
177
|
+
hiddenFields?: string[];
|
|
178
|
+
/**
|
|
179
|
+
* Show shared field controls.
|
|
180
|
+
*/
|
|
181
|
+
fieldControls?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Empty-board content.
|
|
184
|
+
*/
|
|
185
|
+
emptyText?: string | Node | (() => string | Node) | null;
|
|
186
|
+
/**
|
|
187
|
+
* Column accessor.
|
|
188
|
+
*/
|
|
189
|
+
columnBy?: KanbanAccessor;
|
|
190
|
+
/**
|
|
191
|
+
* Explicit columns, or null to derive them.
|
|
192
|
+
*/
|
|
193
|
+
columns?: KanbanColumn[] | null;
|
|
194
|
+
/**
|
|
195
|
+
* Optional swim-lane accessor.
|
|
196
|
+
*/
|
|
197
|
+
swimlaneBy?: KanbanAccessor;
|
|
198
|
+
/**
|
|
199
|
+
* Explicit lanes, or null to derive them.
|
|
200
|
+
*/
|
|
201
|
+
swimlanes?: KanbanSwimlane[] | null;
|
|
202
|
+
/**
|
|
203
|
+
* Card title field or reader.
|
|
204
|
+
*/
|
|
205
|
+
titleField?: KanbanCardField;
|
|
206
|
+
/**
|
|
207
|
+
* Card subtitle field or reader.
|
|
208
|
+
*/
|
|
209
|
+
subtitleField?: KanbanCardField;
|
|
210
|
+
/**
|
|
211
|
+
* Preview field or reader.
|
|
212
|
+
*/
|
|
213
|
+
preview?: string | ((record: KanbanRecord, index: number) => RecordCardPreview) | null;
|
|
214
|
+
/**
|
|
215
|
+
* Preview alternative-text field or reader.
|
|
216
|
+
*/
|
|
217
|
+
previewAlt?: KanbanCardField;
|
|
218
|
+
/**
|
|
219
|
+
* Record-card primary link descriptor or reader.
|
|
220
|
+
*/
|
|
221
|
+
link?: RecordCardLink | ((record: KanbanRecord, index: number) => RecordCardLink) | null;
|
|
222
|
+
/**
|
|
223
|
+
* Card actions.
|
|
224
|
+
*/
|
|
225
|
+
actions?: RecordCardAction[] | ((record: KanbanRecord, index: number) => RecordCardAction[]);
|
|
226
|
+
/**
|
|
227
|
+
* Whether accepted moves update local data.
|
|
228
|
+
*/
|
|
229
|
+
moveMode?: 'local' | 'external';
|
|
230
|
+
/**
|
|
231
|
+
* Preferred column order.
|
|
232
|
+
*/
|
|
233
|
+
columnOrder?: string[];
|
|
234
|
+
/**
|
|
235
|
+
* Preferred swim-lane order.
|
|
236
|
+
*/
|
|
237
|
+
swimlaneOrder?: string[];
|
|
238
|
+
/**
|
|
239
|
+
* Initially collapsed columns.
|
|
240
|
+
*/
|
|
241
|
+
collapsedColumns?: string[];
|
|
242
|
+
/**
|
|
243
|
+
* Initially collapsed lanes.
|
|
244
|
+
*/
|
|
245
|
+
collapsedSwimlanes?: string[];
|
|
246
|
+
/**
|
|
247
|
+
* Show record counts and WIP indicators.
|
|
248
|
+
*/
|
|
249
|
+
showCounts?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Keep configured empty columns visible.
|
|
252
|
+
*/
|
|
253
|
+
showEmptyColumns?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Shared record-card treatment.
|
|
256
|
+
*/
|
|
257
|
+
variant?: 'outlined' | 'raised' | 'filled';
|
|
258
|
+
/**
|
|
259
|
+
* Accessible board label.
|
|
260
|
+
*/
|
|
261
|
+
label?: string;
|
|
262
|
+
onrecordmove?: (event: CustomEvent<Record<string, unknown>>) => void;
|
|
263
|
+
onrecordaction?: (event: CustomEvent<Record<string, unknown>>) => void;
|
|
264
|
+
};
|
|
265
|
+
export type KanbanCardMeta = {
|
|
266
|
+
record: KanbanRecord;
|
|
267
|
+
id: unknown;
|
|
268
|
+
index: number;
|
|
269
|
+
column: string;
|
|
270
|
+
lane: string | null;
|
|
271
|
+
};
|
|
272
|
+
export type KanbanSectionMeta = {
|
|
273
|
+
column: string;
|
|
274
|
+
lane: string | null;
|
|
275
|
+
list: HTMLElement;
|
|
276
|
+
};
|
|
277
|
+
export type KanbanKeyboardMove = {
|
|
278
|
+
id: unknown;
|
|
279
|
+
from: KanbanMovePoint;
|
|
280
|
+
to: KanbanMovePoint;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* Configurable record board with semantic columns, optional swim lanes, and equivalent pointer and
|
|
284
|
+
* keyboard movement. Local moves clone records; callback grouping remains fully usable for display
|
|
285
|
+
* and external moves but cannot be written safely by local cross-axis moves.
|
|
286
|
+
* @fires KanbanView#recordmove
|
|
287
|
+
* @fires KanbanView#recordaction
|
|
288
|
+
* @extends {RecordView}
|
|
289
|
+
*/
|
|
290
|
+
export declare class KanbanView extends RecordView {
|
|
291
|
+
_kanbanSnapshot: import("../../core/dom.js").TargetSnapshot;
|
|
292
|
+
_kanbanDestroyed: boolean;
|
|
293
|
+
_kanbanColumns: KanbanColumn[];
|
|
294
|
+
_kanbanSwimlanes: KanbanColumn[];
|
|
295
|
+
_kanbanColumnOrder: string[];
|
|
296
|
+
_kanbanSwimlaneOrder: string[];
|
|
297
|
+
_collapsedColumns: Set<string>;
|
|
298
|
+
_collapsedSwimlanes: Set<string>;
|
|
299
|
+
_keyboardMove: KanbanKeyboardMove | {
|
|
300
|
+
id: unknown;
|
|
301
|
+
from: {
|
|
302
|
+
column: string;
|
|
303
|
+
lane: string | null;
|
|
304
|
+
index: number;
|
|
305
|
+
};
|
|
306
|
+
to: {
|
|
307
|
+
column: string;
|
|
308
|
+
lane: string | null;
|
|
309
|
+
index: number;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
_dragId: unknown;
|
|
313
|
+
_dragDestination: KanbanMovePoint;
|
|
314
|
+
_announcementToken: number;
|
|
315
|
+
_cardMeta: WeakMap<object, any>;
|
|
316
|
+
_sectionMeta: WeakMap<object, any>;
|
|
317
|
+
_cardsById: Map<any, any>;
|
|
318
|
+
_toolbar: HTMLElement;
|
|
319
|
+
_board: HTMLElement;
|
|
320
|
+
_live: HTMLElement;
|
|
321
|
+
static cssName: string;
|
|
322
|
+
/** @type {Readonly<KanbanViewOptions & RecordViewOptions>} */
|
|
323
|
+
static defaults: Readonly<KanbanViewOptions & RecordViewOptions>;
|
|
324
|
+
/**
|
|
325
|
+
* Creates a Kanban record view.
|
|
326
|
+
* @param {Element|string|null} [target=null] Existing root, selector, or null.
|
|
327
|
+
* @param {KanbanViewOptions & RecordViewOptions} [options={}] Kanban and shared record-view options.
|
|
328
|
+
*/
|
|
329
|
+
constructor(target?: Element | string | null, options?: KanbanViewOptions & RecordViewOptions);
|
|
330
|
+
/** @returns {HTMLElement} Board root. */
|
|
331
|
+
render(): HTMLElement;
|
|
332
|
+
/** Returns resolved columns in visual order. @returns {KanbanColumn[]} */
|
|
333
|
+
getColumns(): KanbanColumn[];
|
|
334
|
+
/**
|
|
335
|
+
* Replaces configured columns. Pass null to derive them from current data.
|
|
336
|
+
* @param {KanbanColumn[]|null} columns Columns.
|
|
337
|
+
* @returns {this}
|
|
338
|
+
*/
|
|
339
|
+
setColumns(columns: KanbanColumn[] | null): this;
|
|
340
|
+
/** Returns resolved lane descriptors in visual order. @returns {KanbanSwimlane[]} */
|
|
341
|
+
getSwimlanes(): KanbanSwimlane[];
|
|
342
|
+
/**
|
|
343
|
+
* Replaces configured lanes. Pass null to derive them from current data.
|
|
344
|
+
* @param {KanbanSwimlane[]|null} lanes Lanes.
|
|
345
|
+
* @returns {this}
|
|
346
|
+
*/
|
|
347
|
+
setSwimlanes(lanes: KanbanSwimlane[] | null): this;
|
|
348
|
+
/** Returns the current resolved column order. @returns {string[]} */
|
|
349
|
+
getColumnOrder(): string[];
|
|
350
|
+
/**
|
|
351
|
+
* Reconciles and applies a preferred column order.
|
|
352
|
+
* @param {string[]} order Preferred ids.
|
|
353
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
354
|
+
* @returns {this}
|
|
355
|
+
*/
|
|
356
|
+
setColumnOrder(order: string[], options?: {
|
|
357
|
+
silent?: boolean;
|
|
358
|
+
}): this;
|
|
359
|
+
/**
|
|
360
|
+
* Moves a column relative to another.
|
|
361
|
+
* @param {string} id Moving id.
|
|
362
|
+
* @param {string} targetId Target id.
|
|
363
|
+
* @param {'before'|'after'} [position='before'] Target edge.
|
|
364
|
+
* @returns {this}
|
|
365
|
+
*/
|
|
366
|
+
moveColumn(id: string, targetId: string, position?: 'before' | 'after'): this;
|
|
367
|
+
/** Returns the current resolved lane order. @returns {string[]} */
|
|
368
|
+
getSwimlaneOrder(): string[];
|
|
369
|
+
/**
|
|
370
|
+
* Reconciles and applies a preferred lane order.
|
|
371
|
+
* @param {string[]} order Preferred ids.
|
|
372
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
373
|
+
* @returns {this}
|
|
374
|
+
*/
|
|
375
|
+
setSwimlaneOrder(order: string[], options?: {
|
|
376
|
+
silent?: boolean;
|
|
377
|
+
}): this;
|
|
378
|
+
/**
|
|
379
|
+
* Moves a lane relative to another.
|
|
380
|
+
* @param {string} id Moving id.
|
|
381
|
+
* @param {string} targetId Target id.
|
|
382
|
+
* @param {'before'|'after'} [position='before'] Target edge.
|
|
383
|
+
* @returns {this}
|
|
384
|
+
*/
|
|
385
|
+
moveSwimlane(id: string, targetId: string, position?: 'before' | 'after'): this;
|
|
386
|
+
/** Returns collapsed column ids. @returns {string[]} */
|
|
387
|
+
getCollapsedColumns(): string[];
|
|
388
|
+
/**
|
|
389
|
+
* Expands or collapses one column across every lane.
|
|
390
|
+
* @param {string} id Column id.
|
|
391
|
+
* @param {boolean} [collapsed=true] Desired state.
|
|
392
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
393
|
+
* @returns {this}
|
|
394
|
+
*/
|
|
395
|
+
setColumnCollapsed(id: string, collapsed?: boolean, options?: {
|
|
396
|
+
silent?: boolean;
|
|
397
|
+
}): this;
|
|
398
|
+
/** Toggles a column. @param {string} id Column id. @returns {this} */
|
|
399
|
+
toggleColumn(id: string): this;
|
|
400
|
+
/** Returns collapsed lane ids. @returns {string[]} */
|
|
401
|
+
getCollapsedSwimlanes(): string[];
|
|
402
|
+
/**
|
|
403
|
+
* Expands or collapses one lane.
|
|
404
|
+
* @param {string} id Lane id.
|
|
405
|
+
* @param {boolean} [collapsed=true] Desired state.
|
|
406
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
407
|
+
* @returns {this}
|
|
408
|
+
*/
|
|
409
|
+
setSwimlaneCollapsed(id: string, collapsed?: boolean, options?: {
|
|
410
|
+
silent?: boolean;
|
|
411
|
+
}): this;
|
|
412
|
+
/** Toggles a lane. @param {string} id Lane id. @returns {this} */
|
|
413
|
+
toggleSwimlane(id: string): this;
|
|
414
|
+
/**
|
|
415
|
+
* Proposes and, in local mode, commits a record move. Destination acceptance is checked before
|
|
416
|
+
* a cancelable `recordmove` event. WIP limits are reported but remain advisory.
|
|
417
|
+
* @param {unknown} id Record id.
|
|
418
|
+
* @param {KanbanDestination} destination Destination.
|
|
419
|
+
* @returns {this}
|
|
420
|
+
* @fires KanbanView#recordmove
|
|
421
|
+
* @fires RecordView#datachange
|
|
422
|
+
*/
|
|
423
|
+
moveRecord(id: unknown, destination: KanbanDestination): this;
|
|
424
|
+
/** Returns common plus board-specific serializable configuration. @returns {KanbanViewState} */
|
|
425
|
+
getViewState(): KanbanViewState;
|
|
426
|
+
/**
|
|
427
|
+
* Restores common and Kanban configuration. State from another record view is accepted safely.
|
|
428
|
+
* @param {Partial<KanbanViewState>|null} state Saved state.
|
|
429
|
+
* @param {{silent?:boolean}} [options={}] Event behavior.
|
|
430
|
+
* @returns {this}
|
|
431
|
+
*/
|
|
432
|
+
setViewState(state: Partial<KanbanViewState> | null, options?: {
|
|
433
|
+
silent?: boolean;
|
|
434
|
+
}): this;
|
|
435
|
+
/** Restores enhanced targets after base lifecycle cleanup. @returns {void} */
|
|
436
|
+
destroy(): void;
|
|
437
|
+
/** @protected @param {string} _reason Refresh reason. @returns {void} */
|
|
438
|
+
protected _refreshView(_reason: string): void;
|
|
439
|
+
/** @param {KanbanSwimlane} lane @param {KanbanColumn[]} columns @returns {HTMLElement} */
|
|
440
|
+
_renderLane(lane: KanbanSwimlane, columns: KanbanColumn[]): HTMLElement;
|
|
441
|
+
/** @param {KanbanColumn[]} columns @param {KanbanSwimlane|null} lane @param {boolean} hasLanes @returns {HTMLElement} */
|
|
442
|
+
_renderColumns(columns: KanbanColumn[], lane: KanbanSwimlane | null, hasLanes: boolean): HTMLElement;
|
|
443
|
+
/**
|
|
444
|
+
* @param {KanbanColumn} column
|
|
445
|
+
* @param {KanbanSwimlane|null} lane
|
|
446
|
+
* @param {{record:KanbanRecord,index:number}[]} entries
|
|
447
|
+
* @param {boolean} hasLanes
|
|
448
|
+
* @returns {HTMLElement}
|
|
449
|
+
*/
|
|
450
|
+
_renderColumn(column: KanbanColumn, lane: KanbanSwimlane | null, entries: {
|
|
451
|
+
record: KanbanRecord;
|
|
452
|
+
index: number;
|
|
453
|
+
}[], hasLanes: boolean): HTMLElement;
|
|
454
|
+
/** @param {KanbanRecord} record @param {number} index @param {string} column @param {string|null} lane @param {boolean} hasLanes @returns {HTMLLIElement} */
|
|
455
|
+
_renderCard(record: KanbanRecord, index: number, column: string, lane: string | null, hasLanes: boolean): HTMLLIElement;
|
|
456
|
+
/** @returns {HTMLElement} */
|
|
457
|
+
_emptyContent(): HTMLElement;
|
|
458
|
+
/** @returns {KanbanColumn[]} */
|
|
459
|
+
_rawColumns(): KanbanColumn[];
|
|
460
|
+
/** @returns {KanbanColumn[]} */
|
|
461
|
+
_resolvedColumns(): KanbanColumn[];
|
|
462
|
+
/** @returns {KanbanSwimlane[]} */
|
|
463
|
+
_rawSwimlanes(): KanbanSwimlane[];
|
|
464
|
+
/** @returns {KanbanSwimlane[]} */
|
|
465
|
+
_resolvedSwimlanes(): KanbanSwimlane[];
|
|
466
|
+
/** @param {KanbanAccessor} accessor @param {KanbanRecord} record @param {number} index @returns {unknown} */
|
|
467
|
+
_readAxis(accessor: KanbanAccessor, record: KanbanRecord, index: number): unknown;
|
|
468
|
+
/** @param {string} column @param {string|null} lane @returns {{record:KanbanRecord,index:number}[]} */
|
|
469
|
+
_recordsIn(column: string, lane: string | null): {
|
|
470
|
+
record: KanbanRecord;
|
|
471
|
+
index: number;
|
|
472
|
+
}[];
|
|
473
|
+
/** @param {unknown} id @returns {KanbanMovePoint|null} */
|
|
474
|
+
_recordLocation(id: unknown): KanbanMovePoint | null;
|
|
475
|
+
/**
|
|
476
|
+
* @param {KanbanRecord} record @param {KanbanMovePoint} from @param {KanbanMovePoint} to
|
|
477
|
+
* @param {KanbanColumn} column @param {KanbanSwimlane|null} lane @returns {KanbanRecord|null}
|
|
478
|
+
*/
|
|
479
|
+
_localMovedRecord(record: KanbanRecord, from: KanbanMovePoint, to: KanbanMovePoint, column: KanbanColumn, lane: KanbanSwimlane | null): KanbanRecord | null;
|
|
480
|
+
/** @param {MouseEvent} event @returns {void} */
|
|
481
|
+
_handleBoardClick(event: MouseEvent): void;
|
|
482
|
+
/** @param {MouseEvent} event @returns {void} */
|
|
483
|
+
_handleBoardDoubleClick(event: MouseEvent): void;
|
|
484
|
+
/** @param {KeyboardEvent} event @returns {void} */
|
|
485
|
+
_handleBoardKeydown(event: KeyboardEvent): void;
|
|
486
|
+
/** @param {KeyboardEvent} event @param {HTMLElement} handle @param {KanbanCardMeta} meta @returns {void} */
|
|
487
|
+
_handleMoveKeydown(event: KeyboardEvent, handle: HTMLElement, meta: KanbanCardMeta): void;
|
|
488
|
+
/** @param {Event} event @returns {void} */
|
|
489
|
+
_handlePreviewError(event: Event): void;
|
|
490
|
+
/** @param {DragEvent} event @returns {void} */
|
|
491
|
+
_handleDragStart(event: DragEvent): void;
|
|
492
|
+
/** @param {DragEvent} event @returns {void} */
|
|
493
|
+
_handleDragOver(event: DragEvent): void;
|
|
494
|
+
/** @param {DragEvent} event @returns {void} */
|
|
495
|
+
_handleDrop(event: DragEvent): void;
|
|
496
|
+
/** @param {DragEvent} event @param {KanbanSectionMeta} section @returns {KanbanMovePoint} */
|
|
497
|
+
_pointerDestination(event: DragEvent, section: KanbanSectionMeta): KanbanMovePoint;
|
|
498
|
+
/** @returns {void} */
|
|
499
|
+
_clearDrag(): void;
|
|
500
|
+
/** @returns {void} */
|
|
501
|
+
_clearDropMarkers(): void;
|
|
502
|
+
/** @returns {void} */
|
|
503
|
+
_syncKeyboardTarget(): void;
|
|
504
|
+
/** @returns {void} */
|
|
505
|
+
_syncCardSelection(): void;
|
|
506
|
+
/** @param {EventTarget|null} target @returns {KanbanCardMeta|null} */
|
|
507
|
+
_metaForTarget(target: EventTarget | null): KanbanCardMeta | null;
|
|
508
|
+
/** @param {unknown} id @returns {HTMLElement|null} */
|
|
509
|
+
_moveHandle(id: unknown): HTMLElement | null;
|
|
510
|
+
/** @param {KanbanRecord} record @param {number} index @returns {string} */
|
|
511
|
+
_recordName(record: KanbanRecord, index: number): string;
|
|
512
|
+
/** @param {KanbanMovePoint} point @returns {string} */
|
|
513
|
+
_targetName(point: KanbanMovePoint): string;
|
|
514
|
+
/** @param {string} message @returns {void} */
|
|
515
|
+
_announce(message: string): void;
|
|
516
|
+
/** @param {string} reason @returns {void} */
|
|
517
|
+
_emitKanbanState(reason: string): void;
|
|
518
|
+
/** @returns {Readonly<KanbanViewOptions & RecordViewOptions>} */
|
|
519
|
+
_kanbanOptions(): Readonly<KanbanViewOptions & RecordViewOptions>;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Validates and clones configured column or lane descriptors.
|
|
523
|
+
* @param {unknown} descriptors Descriptors.
|
|
524
|
+
* @param {'column'|'swimlane'} [axis='column'] Descriptor kind.
|
|
525
|
+
* @returns {KanbanColumn[]}
|
|
526
|
+
*/
|
|
527
|
+
export declare function normalizeKanbanDescriptors(descriptors: unknown, axis?: 'column' | 'swimlane'): KanbanColumn[];
|
|
528
|
+
/**
|
|
529
|
+
* Derives stable descriptors from distinct accessor values in first-seen order.
|
|
530
|
+
* @param {KanbanRecord[]} records Records.
|
|
531
|
+
* @param {KanbanAccessor} accessor Grouping accessor.
|
|
532
|
+
* @returns {KanbanColumn[]}
|
|
533
|
+
*/
|
|
534
|
+
export declare function deriveKanbanDescriptors(records: KanbanRecord[], accessor: KanbanAccessor): KanbanColumn[];
|
|
535
|
+
/**
|
|
536
|
+
* Reconciles a stale or partial order with available descriptors.
|
|
537
|
+
* @param {{id:string}[]} descriptors Available descriptors.
|
|
538
|
+
* @param {unknown} order Preferred order.
|
|
539
|
+
* @returns {string[]}
|
|
540
|
+
*/
|
|
541
|
+
export declare function reconcileKanbanOrder(descriptors: {
|
|
542
|
+
id: string;
|
|
543
|
+
}[], order: unknown): string[];
|
|
544
|
+
/**
|
|
545
|
+
* Reorders records around an already-cloned moved record. The input array and every input record
|
|
546
|
+
* remain untouched; destination index is relative to records in that one column/lane.
|
|
547
|
+
* @param {KanbanRecord[]} records Records.
|
|
548
|
+
* @param {unknown} id Moving record id.
|
|
549
|
+
* @param {KanbanRecord} movedRecord Cloned record carrying its destination axis values.
|
|
550
|
+
* @param {{recordId:string|((record:KanbanRecord)=>unknown),columnBy:KanbanAccessor,swimlaneBy:KanbanAccessor,destination:KanbanMovePoint}} options Accessors and destination.
|
|
551
|
+
* @returns {{records:KanbanRecord[],from:KanbanMovePoint,to:KanbanMovePoint}|null}
|
|
552
|
+
*/
|
|
553
|
+
export declare function reorderKanbanData(records: KanbanRecord[], id: unknown, movedRecord: KanbanRecord, options: {
|
|
554
|
+
recordId: string | ((record: KanbanRecord) => unknown);
|
|
555
|
+
columnBy: KanbanAccessor;
|
|
556
|
+
swimlaneBy: KanbanAccessor;
|
|
557
|
+
destination: KanbanMovePoint;
|
|
558
|
+
}): {
|
|
559
|
+
records: KanbanRecord[];
|
|
560
|
+
from: KanbanMovePoint;
|
|
561
|
+
to: KanbanMovePoint;
|
|
562
|
+
} | null;
|
|
563
|
+
/**
|
|
564
|
+
* Record movement event emitted before a local commit or external request.
|
|
565
|
+
* @event KanbanView#recordmove
|
|
566
|
+
* @type {CustomEvent<{record:KanbanRecord,id:unknown,from:KanbanMovePoint,to:KanbanMovePoint,column:KanbanColumn,swimlane:KanbanSwimlane|null,limitExceeded:boolean}>}
|
|
567
|
+
*/
|
|
568
|
+
/**
|
|
569
|
+
* Secondary card action event.
|
|
570
|
+
* @event KanbanView#recordaction
|
|
571
|
+
* @type {CustomEvent<{record:KanbanRecord,id:unknown,action:unknown,actionId:string|undefined,event:Event}>}
|
|
572
|
+
*/
|