@framesquared/ui 0.1.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/LICENSE +21 -0
- package/dist/Operation-4K76GXM7-3ZEBIPBE.js +7 -0
- package/dist/Operation-4K76GXM7-3ZEBIPBE.js.map +1 -0
- package/dist/chunk-OYQY47EA.js +30 -0
- package/dist/chunk-OYQY47EA.js.map +1 -0
- package/dist/index.d.ts +1913 -0
- package/dist/index.js +7938 -0
- package/dist/index.js.map +1 -0
- package/package.json +27 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1913 @@
|
|
|
1
|
+
import { Container, ContainerConfig, Component, ComponentConfig } from '@framesquared/component';
|
|
2
|
+
import { NodeInterface, TreeStore, TreeStoreConfig } from '@framesquared/data';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @framesquared/ui – Panel
|
|
6
|
+
*
|
|
7
|
+
* The primary container with header, body, tools, and docking.
|
|
8
|
+
* Panel extends Container to provide:
|
|
9
|
+
* - Header with title, icon, and tool buttons
|
|
10
|
+
* - Body with custom padding/styling
|
|
11
|
+
* - Optional footer
|
|
12
|
+
* - Docked items (top/bottom/left/right)
|
|
13
|
+
* - Collapsible/expandable behavior
|
|
14
|
+
* - Closable with events
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
interface ToolConfig {
|
|
18
|
+
type: string;
|
|
19
|
+
handler?: (event: MouseEvent, tool: HTMLElement, panel: Panel) => void;
|
|
20
|
+
hidden?: boolean;
|
|
21
|
+
tooltip?: string;
|
|
22
|
+
}
|
|
23
|
+
interface PanelConfig extends ContainerConfig {
|
|
24
|
+
title?: string;
|
|
25
|
+
titleAlign?: 'left' | 'center' | 'right';
|
|
26
|
+
iconCls?: string;
|
|
27
|
+
icon?: string;
|
|
28
|
+
header?: boolean;
|
|
29
|
+
footer?: boolean;
|
|
30
|
+
tools?: ToolConfig[];
|
|
31
|
+
collapsible?: boolean;
|
|
32
|
+
collapsed?: boolean;
|
|
33
|
+
collapseDirection?: 'top' | 'bottom' | 'left' | 'right';
|
|
34
|
+
animCollapse?: boolean;
|
|
35
|
+
closable?: boolean;
|
|
36
|
+
bodyPadding?: number | string;
|
|
37
|
+
bodyStyle?: Record<string, string> | string;
|
|
38
|
+
bodyCls?: string;
|
|
39
|
+
frame?: boolean;
|
|
40
|
+
border?: boolean;
|
|
41
|
+
dockedItems?: Component[];
|
|
42
|
+
}
|
|
43
|
+
declare class Panel extends Container {
|
|
44
|
+
static $className: string;
|
|
45
|
+
static _titleCounter: number;
|
|
46
|
+
private _headerEl;
|
|
47
|
+
private _titleTextEl;
|
|
48
|
+
private _titleWrapEl;
|
|
49
|
+
private _iconEl;
|
|
50
|
+
private _toolsEl;
|
|
51
|
+
private _panelBodyEl;
|
|
52
|
+
private _footerEl;
|
|
53
|
+
private _collapsed;
|
|
54
|
+
private _title;
|
|
55
|
+
private _iconCls;
|
|
56
|
+
private _dockedItems;
|
|
57
|
+
constructor(config?: PanelConfig);
|
|
58
|
+
protected initialize(): void;
|
|
59
|
+
protected afterRender(): void;
|
|
60
|
+
protected onDestroy(): void;
|
|
61
|
+
private shouldShowHeader;
|
|
62
|
+
private buildHeader;
|
|
63
|
+
private addAutoTools;
|
|
64
|
+
private hasToolType;
|
|
65
|
+
private applyBodyStyles;
|
|
66
|
+
setTitle(title: string): void;
|
|
67
|
+
getTitle(): string;
|
|
68
|
+
setIconCls(iconCls: string): void;
|
|
69
|
+
getIconCls(): string;
|
|
70
|
+
addTool(tool: ToolConfig): void;
|
|
71
|
+
private renderTool;
|
|
72
|
+
collapse(): void;
|
|
73
|
+
expand(): void;
|
|
74
|
+
toggleCollapse(): void;
|
|
75
|
+
isCollapsed(): boolean;
|
|
76
|
+
close(): void;
|
|
77
|
+
addDocked(item: Component, _pos?: number): void;
|
|
78
|
+
removeDocked(item: Component, destroy?: boolean): void;
|
|
79
|
+
getDockedItems(_selector?: string): Component[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @framesquared/ui – Window
|
|
84
|
+
*
|
|
85
|
+
* A floating Panel rendered into document.body. Supports dragging
|
|
86
|
+
* (by header), modal mask, maximize/minimize/restore, constrain to
|
|
87
|
+
* viewport, and z-index management via ZIndexManager.
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
interface WindowConfig extends PanelConfig {
|
|
91
|
+
modal?: boolean;
|
|
92
|
+
draggable?: boolean;
|
|
93
|
+
resizable?: boolean;
|
|
94
|
+
constrain?: boolean;
|
|
95
|
+
constrainTo?: Element;
|
|
96
|
+
maximizable?: boolean;
|
|
97
|
+
minimizable?: boolean;
|
|
98
|
+
maximized?: boolean;
|
|
99
|
+
x?: number;
|
|
100
|
+
y?: number;
|
|
101
|
+
defaultFocus?: string;
|
|
102
|
+
closeAction?: 'destroy' | 'hide';
|
|
103
|
+
ghost?: boolean;
|
|
104
|
+
autoShow?: boolean;
|
|
105
|
+
}
|
|
106
|
+
declare class Window extends Panel {
|
|
107
|
+
static $className: string;
|
|
108
|
+
private _modal;
|
|
109
|
+
private _maskEl;
|
|
110
|
+
private _maximized;
|
|
111
|
+
private _restoreState;
|
|
112
|
+
private _closeAction;
|
|
113
|
+
private _draggable;
|
|
114
|
+
private _dragCleanup;
|
|
115
|
+
constructor(config?: WindowConfig);
|
|
116
|
+
protected initialize(): void;
|
|
117
|
+
protected afterRender(): void;
|
|
118
|
+
show(): void;
|
|
119
|
+
close(): void;
|
|
120
|
+
private showMask;
|
|
121
|
+
private hideMask;
|
|
122
|
+
center(): void;
|
|
123
|
+
maximize(): void;
|
|
124
|
+
restore(): void;
|
|
125
|
+
toggleMaximize(): void;
|
|
126
|
+
minimize(): void;
|
|
127
|
+
toFront(): void;
|
|
128
|
+
toBack(): void;
|
|
129
|
+
private setupDrag;
|
|
130
|
+
protected onDestroy(): void;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @framesquared/ui – MessageBox
|
|
135
|
+
*
|
|
136
|
+
* Static utility class for common dialog patterns:
|
|
137
|
+
* MessageBox.alert(title, message, callback?)
|
|
138
|
+
* MessageBox.confirm(title, message, callback?)
|
|
139
|
+
* MessageBox.prompt(title, message, callback?, multiline?)
|
|
140
|
+
* MessageBox.wait(message, title?)
|
|
141
|
+
* MessageBox.show(config)
|
|
142
|
+
*
|
|
143
|
+
* All dialogs are modal Windows that close on button click.
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
interface MessageBoxConfig {
|
|
147
|
+
title?: string;
|
|
148
|
+
message?: string;
|
|
149
|
+
icon?: 'INFO' | 'WARNING' | 'ERROR' | 'QUESTION';
|
|
150
|
+
buttons?: string[];
|
|
151
|
+
fn?: (buttonId: string, value?: string) => void;
|
|
152
|
+
prompt?: boolean;
|
|
153
|
+
multiline?: boolean;
|
|
154
|
+
progress?: boolean;
|
|
155
|
+
progressText?: string;
|
|
156
|
+
}
|
|
157
|
+
declare class MessageBox {
|
|
158
|
+
/**
|
|
159
|
+
* Shows an alert dialog with an OK button.
|
|
160
|
+
*/
|
|
161
|
+
static alert(title: string, message: string, callback?: (buttonId: string) => void): Window;
|
|
162
|
+
/**
|
|
163
|
+
* Shows a confirmation dialog with Yes and No buttons.
|
|
164
|
+
*/
|
|
165
|
+
static confirm(title: string, message: string, callback?: (buttonId: string) => void): Window;
|
|
166
|
+
/**
|
|
167
|
+
* Shows a prompt dialog with an input field and OK/Cancel buttons.
|
|
168
|
+
*/
|
|
169
|
+
static prompt(title: string, message: string, callback?: (buttonId: string, value?: string) => void, multiline?: boolean): Window;
|
|
170
|
+
/**
|
|
171
|
+
* Shows a wait/progress dialog (no buttons — must be closed programmatically).
|
|
172
|
+
*/
|
|
173
|
+
static wait(message: string, title?: string): Window;
|
|
174
|
+
/**
|
|
175
|
+
* General-purpose dialog with full config.
|
|
176
|
+
*/
|
|
177
|
+
static show(config: MessageBoxConfig): Window;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @framesquared/ui – ZIndexManager
|
|
182
|
+
*
|
|
183
|
+
* Manages z-index stack for floating components (Windows, menus, etc.).
|
|
184
|
+
* Tracks registration order; bringToFront/sendToBack reorder and
|
|
185
|
+
* reassign z-indices.
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
declare class ZIndexManager {
|
|
189
|
+
private static instance;
|
|
190
|
+
/** Ordered stack, lowest first, highest last. */
|
|
191
|
+
private stack;
|
|
192
|
+
private constructor();
|
|
193
|
+
static getInstance(): ZIndexManager;
|
|
194
|
+
register(component: Component): void;
|
|
195
|
+
unregister(component: Component): void;
|
|
196
|
+
bringToFront(component: Component): void;
|
|
197
|
+
sendToBack(component: Component): void;
|
|
198
|
+
/** Returns the topmost (active) component. */
|
|
199
|
+
getActive(): Component | undefined;
|
|
200
|
+
/** Iterates from highest z to lowest. */
|
|
201
|
+
eachTopDown(fn: (component: Component) => void): void;
|
|
202
|
+
clear(): void;
|
|
203
|
+
private syncZIndices;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @framesquared/ui – Button
|
|
208
|
+
*
|
|
209
|
+
* A clickable button component with text, icon, toggle, menu arrow,
|
|
210
|
+
* keyboard support, and accessibility. Renders as native <button>
|
|
211
|
+
* (or <a> if href is provided).
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
interface ButtonConfig extends ComponentConfig {
|
|
215
|
+
text?: string;
|
|
216
|
+
iconCls?: string;
|
|
217
|
+
iconAlign?: 'left' | 'right' | 'top' | 'bottom';
|
|
218
|
+
icon?: string;
|
|
219
|
+
scale?: 'small' | 'medium' | 'large';
|
|
220
|
+
handler?: (button: Button, event: Event) => void;
|
|
221
|
+
scope?: object;
|
|
222
|
+
pressed?: boolean;
|
|
223
|
+
enableToggle?: boolean;
|
|
224
|
+
toggleGroup?: string;
|
|
225
|
+
menu?: any;
|
|
226
|
+
menuAlign?: string;
|
|
227
|
+
arrowVisible?: boolean;
|
|
228
|
+
tooltip?: string;
|
|
229
|
+
href?: string;
|
|
230
|
+
target?: string;
|
|
231
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
232
|
+
ui?: string;
|
|
233
|
+
value?: string;
|
|
234
|
+
}
|
|
235
|
+
declare class Button extends Component {
|
|
236
|
+
static $className: string;
|
|
237
|
+
protected _pressed: boolean;
|
|
238
|
+
protected _scale: string;
|
|
239
|
+
protected _iconCls: string;
|
|
240
|
+
protected _textEl: HTMLElement | null;
|
|
241
|
+
protected _iconEl: HTMLElement | null;
|
|
242
|
+
constructor(config?: ButtonConfig);
|
|
243
|
+
protected initialize(): void;
|
|
244
|
+
render(container?: Element | string, position?: number | Element): void;
|
|
245
|
+
protected buildInnerDom(cfg: ButtonConfig): void;
|
|
246
|
+
protected applyButtonConfigs(cfg: ButtonConfig): void;
|
|
247
|
+
protected attachEvents(_cfg: ButtonConfig): void;
|
|
248
|
+
protected onButtonClick(e: Event): void;
|
|
249
|
+
private depressGroupMembers;
|
|
250
|
+
toggle(state?: boolean): void;
|
|
251
|
+
isPressed(): boolean;
|
|
252
|
+
setText(text: string): void;
|
|
253
|
+
setIconCls(iconCls: string): void;
|
|
254
|
+
setIcon(icon: string): void;
|
|
255
|
+
setTooltip(tooltip: string): void;
|
|
256
|
+
setScale(scale: string): void;
|
|
257
|
+
getValue(): string;
|
|
258
|
+
protected onDestroy(): void;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @framesquared/ui – SplitButton
|
|
263
|
+
*
|
|
264
|
+
* A button with two click zones: the main button area and a
|
|
265
|
+
* dropdown arrow area. Clicking the arrow fires `arrowHandler`
|
|
266
|
+
* and `'arrowclick'` event independently from the main click.
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
interface SplitButtonConfig extends ButtonConfig {
|
|
270
|
+
arrowHandler?: (button: SplitButton, event: Event) => void;
|
|
271
|
+
}
|
|
272
|
+
declare class SplitButton extends Button {
|
|
273
|
+
static $className: string;
|
|
274
|
+
private _splitArrowEl;
|
|
275
|
+
constructor(config?: SplitButtonConfig);
|
|
276
|
+
protected initialize(): void;
|
|
277
|
+
protected buildInnerDom(cfg: ButtonConfig): void;
|
|
278
|
+
protected attachEvents(cfg: ButtonConfig): void;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @framesquared/ui – CycleButton
|
|
283
|
+
*
|
|
284
|
+
* Cycles through a set of items on each click. Extends SplitButton
|
|
285
|
+
* to show the current item's text and advance on click.
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
interface CycleItem {
|
|
289
|
+
text: string;
|
|
290
|
+
iconCls?: string;
|
|
291
|
+
checked?: boolean;
|
|
292
|
+
}
|
|
293
|
+
interface CycleButtonConfig extends SplitButtonConfig {
|
|
294
|
+
items?: CycleItem[];
|
|
295
|
+
}
|
|
296
|
+
declare class CycleButton extends SplitButton {
|
|
297
|
+
static $className: string;
|
|
298
|
+
_cycleItems: CycleItem[];
|
|
299
|
+
private _activeIndex;
|
|
300
|
+
constructor(config?: CycleButtonConfig);
|
|
301
|
+
protected initialize(): void;
|
|
302
|
+
protected onButtonClick(e: Event): void;
|
|
303
|
+
getActiveItem(): CycleItem;
|
|
304
|
+
setActiveItem(item: CycleItem): void;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @framesquared/ui – SegmentedButton
|
|
309
|
+
*
|
|
310
|
+
* A Container that holds buttons in a group with single or multiple
|
|
311
|
+
* selection behavior. Manages toggle state across child buttons.
|
|
312
|
+
*/
|
|
313
|
+
|
|
314
|
+
interface SegmentedButtonConfig extends ContainerConfig {
|
|
315
|
+
allowMultiple?: boolean;
|
|
316
|
+
allowDepress?: boolean;
|
|
317
|
+
}
|
|
318
|
+
declare class SegmentedButton extends Container {
|
|
319
|
+
static $className: string;
|
|
320
|
+
private _allowMultiple;
|
|
321
|
+
private _allowDepress;
|
|
322
|
+
constructor(config?: SegmentedButtonConfig);
|
|
323
|
+
protected initialize(): void;
|
|
324
|
+
protected afterRender(): void;
|
|
325
|
+
private setupButtonListeners;
|
|
326
|
+
private attachSegmentListener;
|
|
327
|
+
private onSegmentClick;
|
|
328
|
+
getValue(): string | string[];
|
|
329
|
+
setValue(value: string | string[]): void;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @framesquared/ui – Toolbar
|
|
334
|
+
*
|
|
335
|
+
* A Container that arranges items horizontally (or vertically) with
|
|
336
|
+
* special shorthand items: '->' (fill), '-' (separator), ' ' (spacer),
|
|
337
|
+
* and plain text strings. Uses flexbox layout.
|
|
338
|
+
*/
|
|
339
|
+
|
|
340
|
+
interface ToolbarConfig extends ContainerConfig {
|
|
341
|
+
vertical?: boolean;
|
|
342
|
+
enableOverflow?: boolean;
|
|
343
|
+
defaultButtonUI?: string;
|
|
344
|
+
}
|
|
345
|
+
declare class Toolbar extends Container {
|
|
346
|
+
static $className: string;
|
|
347
|
+
constructor(config?: ToolbarConfig);
|
|
348
|
+
protected afterRender(): void;
|
|
349
|
+
}
|
|
350
|
+
declare class ToolbarFill extends Component {
|
|
351
|
+
constructor();
|
|
352
|
+
protected afterRender(): void;
|
|
353
|
+
}
|
|
354
|
+
declare class ToolbarSeparator extends Component {
|
|
355
|
+
constructor();
|
|
356
|
+
protected afterRender(): void;
|
|
357
|
+
}
|
|
358
|
+
declare class ToolbarSpacer extends Component {
|
|
359
|
+
constructor();
|
|
360
|
+
protected afterRender(): void;
|
|
361
|
+
}
|
|
362
|
+
declare class ToolbarTextItem extends Component {
|
|
363
|
+
constructor(config: {
|
|
364
|
+
text: string;
|
|
365
|
+
});
|
|
366
|
+
protected afterRender(): void;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @framesquared/ui – PagingToolbar
|
|
371
|
+
*
|
|
372
|
+
* A Toolbar bound to a data Store that provides page navigation:
|
|
373
|
+
* first, prev, page input, "of N", next, last, refresh.
|
|
374
|
+
* Optionally displays "Showing X - Y of Z".
|
|
375
|
+
*/
|
|
376
|
+
|
|
377
|
+
interface PagingToolbarConfig extends ToolbarConfig {
|
|
378
|
+
store?: any;
|
|
379
|
+
displayInfo?: boolean;
|
|
380
|
+
}
|
|
381
|
+
declare class PagingToolbar extends Toolbar {
|
|
382
|
+
static $className: string;
|
|
383
|
+
private _store;
|
|
384
|
+
private _displayInfo;
|
|
385
|
+
private _pageInput;
|
|
386
|
+
private _totalEl;
|
|
387
|
+
private _infoEl;
|
|
388
|
+
constructor(config?: PagingToolbarConfig);
|
|
389
|
+
protected initialize(): void;
|
|
390
|
+
protected afterRender(): void;
|
|
391
|
+
private moveFirst;
|
|
392
|
+
private movePrevious;
|
|
393
|
+
private moveNext;
|
|
394
|
+
private moveLast;
|
|
395
|
+
private doRefresh;
|
|
396
|
+
private loadPage;
|
|
397
|
+
private getTotalPages;
|
|
398
|
+
private updateInfo;
|
|
399
|
+
private createBtn;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @framesquared/ui – Menu
|
|
404
|
+
*
|
|
405
|
+
* A floating container that holds MenuItems. Shows at a specific
|
|
406
|
+
* position or aligned to a component. Registers with MenuManager
|
|
407
|
+
* for outside-click dismissal. Supports keyboard navigation.
|
|
408
|
+
*/
|
|
409
|
+
|
|
410
|
+
interface MenuConfig extends ContainerConfig {
|
|
411
|
+
plain?: boolean;
|
|
412
|
+
showSeparator?: boolean;
|
|
413
|
+
allowOtherMenus?: boolean;
|
|
414
|
+
}
|
|
415
|
+
declare class Menu extends Container {
|
|
416
|
+
static $className: string;
|
|
417
|
+
private _isMenuVisible;
|
|
418
|
+
constructor(config?: MenuConfig);
|
|
419
|
+
protected initialize(): void;
|
|
420
|
+
protected afterRender(): void;
|
|
421
|
+
showAt(x: number, y: number): void;
|
|
422
|
+
showBy(component: Component, _alignment?: string): void;
|
|
423
|
+
hide(): void;
|
|
424
|
+
isVisible(): boolean;
|
|
425
|
+
show(): void;
|
|
426
|
+
protected onDestroy(): void;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @framesquared/ui – MenuItem
|
|
431
|
+
*
|
|
432
|
+
* A clickable item within a Menu. Supports text, icon, handler,
|
|
433
|
+
* sub-menu indicator, href (link), and disabled state.
|
|
434
|
+
*/
|
|
435
|
+
|
|
436
|
+
interface MenuItemConfig extends ComponentConfig {
|
|
437
|
+
text?: string;
|
|
438
|
+
iconCls?: string;
|
|
439
|
+
handler?: (item: MenuItem, event: Event) => void;
|
|
440
|
+
menu?: any;
|
|
441
|
+
href?: string;
|
|
442
|
+
plain?: boolean;
|
|
443
|
+
}
|
|
444
|
+
declare class MenuItem extends Component {
|
|
445
|
+
static $className: string;
|
|
446
|
+
constructor(config?: MenuItemConfig);
|
|
447
|
+
protected afterRender(): void;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @framesquared/ui – CheckItem
|
|
452
|
+
*
|
|
453
|
+
* A menu item with checkbox behavior. Supports radio groups
|
|
454
|
+
* where only one item in the group can be checked at a time.
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
interface CheckItemConfig extends ComponentConfig {
|
|
458
|
+
text?: string;
|
|
459
|
+
iconCls?: string;
|
|
460
|
+
checked?: boolean;
|
|
461
|
+
group?: string;
|
|
462
|
+
handler?: (item: CheckItem, event: Event) => void;
|
|
463
|
+
}
|
|
464
|
+
declare class CheckItem extends Component {
|
|
465
|
+
static $className: string;
|
|
466
|
+
private _checked;
|
|
467
|
+
constructor(config?: CheckItemConfig);
|
|
468
|
+
protected initialize(): void;
|
|
469
|
+
protected afterRender(): void;
|
|
470
|
+
isChecked(): boolean;
|
|
471
|
+
setChecked(checked: boolean): void;
|
|
472
|
+
protected onDestroy(): void;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @framesquared/ui – MenuSeparator
|
|
477
|
+
* A visual separator line within a Menu.
|
|
478
|
+
*/
|
|
479
|
+
|
|
480
|
+
declare class MenuSeparator extends Component {
|
|
481
|
+
static $className: string;
|
|
482
|
+
constructor(config?: Record<string, unknown>);
|
|
483
|
+
protected afterRender(): void;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* @framesquared/ui – MenuManager
|
|
488
|
+
*
|
|
489
|
+
* Singleton that tracks all open menus and closes them when the
|
|
490
|
+
* user clicks outside of any menu.
|
|
491
|
+
*/
|
|
492
|
+
declare class MenuManager {
|
|
493
|
+
private static instance;
|
|
494
|
+
private menus;
|
|
495
|
+
private listening;
|
|
496
|
+
private constructor();
|
|
497
|
+
static getInstance(): MenuManager;
|
|
498
|
+
register(menu: any): void;
|
|
499
|
+
unregister(menu: any): void;
|
|
500
|
+
getOpenMenus(): any[];
|
|
501
|
+
closeAll(): void;
|
|
502
|
+
private onDocumentMouseDown;
|
|
503
|
+
private startListening;
|
|
504
|
+
private stopListening;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* @framesquared/ui – Tooltip
|
|
509
|
+
*
|
|
510
|
+
* A floating tip that appears near a target element on mouseenter.
|
|
511
|
+
* Supports show/hide delays, mouse tracking, anchor positioning,
|
|
512
|
+
* event delegation, dismissDelay, and closable mode.
|
|
513
|
+
*/
|
|
514
|
+
|
|
515
|
+
interface TooltipConfig extends ComponentConfig {
|
|
516
|
+
target?: Element | string;
|
|
517
|
+
html?: string;
|
|
518
|
+
title?: string;
|
|
519
|
+
anchor?: 'top' | 'bottom' | 'left' | 'right';
|
|
520
|
+
autoHide?: boolean;
|
|
521
|
+
showDelay?: number;
|
|
522
|
+
hideDelay?: number;
|
|
523
|
+
dismissDelay?: number;
|
|
524
|
+
trackMouse?: boolean;
|
|
525
|
+
mouseOffset?: [number, number];
|
|
526
|
+
delegate?: string;
|
|
527
|
+
maxWidth?: number;
|
|
528
|
+
closable?: boolean;
|
|
529
|
+
}
|
|
530
|
+
declare class Tooltip extends Component {
|
|
531
|
+
static $className: string;
|
|
532
|
+
private _targetEl;
|
|
533
|
+
private _showDelay;
|
|
534
|
+
private _hideDelay;
|
|
535
|
+
private _dismissDelay;
|
|
536
|
+
private _autoHide;
|
|
537
|
+
private _trackMouse;
|
|
538
|
+
private _mouseOffset;
|
|
539
|
+
private _delegate;
|
|
540
|
+
private _anchor;
|
|
541
|
+
private _maxWidth;
|
|
542
|
+
private _closable;
|
|
543
|
+
private _tipTitle;
|
|
544
|
+
private _tipHtml;
|
|
545
|
+
private _visible;
|
|
546
|
+
private _showTimer;
|
|
547
|
+
private _hideTimer;
|
|
548
|
+
private _dismissTimer;
|
|
549
|
+
private _lastMouseX;
|
|
550
|
+
private _lastMouseY;
|
|
551
|
+
private _cleanupFns;
|
|
552
|
+
constructor(config?: TooltipConfig);
|
|
553
|
+
protected initialize(): void;
|
|
554
|
+
private attachTargetListeners;
|
|
555
|
+
private onTargetEnter;
|
|
556
|
+
private onTargetLeave;
|
|
557
|
+
private onTargetMove;
|
|
558
|
+
private showTip;
|
|
559
|
+
hide(): void;
|
|
560
|
+
isVisible(): boolean;
|
|
561
|
+
private renderTip;
|
|
562
|
+
private updateContent;
|
|
563
|
+
private positionAtMouse;
|
|
564
|
+
private clearShowTimer;
|
|
565
|
+
private clearHideTimer;
|
|
566
|
+
private clearDismissTimer;
|
|
567
|
+
destroy(): void;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* @framesquared/ui – QuickTip
|
|
572
|
+
*
|
|
573
|
+
* Singleton that auto-creates tooltips from DOM data attributes.
|
|
574
|
+
* Uses event delegation on document.body to monitor mouseenter on
|
|
575
|
+
* elements with `data-qtip`, `data-qtitle`, `data-qwidth`.
|
|
576
|
+
*
|
|
577
|
+
* Usage:
|
|
578
|
+
* QuickTip.init(); // Start monitoring
|
|
579
|
+
* // Any element with data-qtip="text" now gets a tooltip
|
|
580
|
+
*/
|
|
581
|
+
declare class QuickTip {
|
|
582
|
+
static init(): void;
|
|
583
|
+
static enable(): void;
|
|
584
|
+
static disable(): void;
|
|
585
|
+
static isEnabled(): boolean;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @framesquared/ui – DataView
|
|
590
|
+
*
|
|
591
|
+
* Renders store records using a template function. Supports item
|
|
592
|
+
* events (click, dblclick, mouseenter, mouseleave), single/multi
|
|
593
|
+
* selection, hover tracking, empty text, and reactive store binding.
|
|
594
|
+
*/
|
|
595
|
+
|
|
596
|
+
interface DataViewConfig extends ComponentConfig {
|
|
597
|
+
store?: any;
|
|
598
|
+
itemTpl?: (record: any, index: number) => string;
|
|
599
|
+
itemSelector?: string;
|
|
600
|
+
itemCls?: string;
|
|
601
|
+
selectedItemCls?: string;
|
|
602
|
+
overItemCls?: string;
|
|
603
|
+
emptyText?: string;
|
|
604
|
+
multiSelect?: boolean;
|
|
605
|
+
singleSelect?: boolean;
|
|
606
|
+
trackOver?: boolean;
|
|
607
|
+
}
|
|
608
|
+
declare class DataView extends Component {
|
|
609
|
+
static $className: string;
|
|
610
|
+
_store: any;
|
|
611
|
+
private _itemTpl;
|
|
612
|
+
private _itemSelector;
|
|
613
|
+
private _itemCls;
|
|
614
|
+
private _selectedItemCls;
|
|
615
|
+
private _overItemCls;
|
|
616
|
+
private _emptyText;
|
|
617
|
+
private _multiSelect;
|
|
618
|
+
private _singleSelect;
|
|
619
|
+
private _trackOver;
|
|
620
|
+
private _selectedRecords;
|
|
621
|
+
private _contentEl;
|
|
622
|
+
constructor(config?: DataViewConfig);
|
|
623
|
+
protected initialize(): void;
|
|
624
|
+
protected afterRender(): void;
|
|
625
|
+
refresh(): void;
|
|
626
|
+
private renderItems;
|
|
627
|
+
private attachItemEvents;
|
|
628
|
+
private onItemClick;
|
|
629
|
+
private clearSelectionClasses;
|
|
630
|
+
getSelectedRecords(): any[];
|
|
631
|
+
getNodes(): HTMLElement[];
|
|
632
|
+
getNode(record: any): HTMLElement | null;
|
|
633
|
+
getRecord(node: HTMLElement): any | null;
|
|
634
|
+
private bindStoreEvents;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* @framesquared/ui – ListView
|
|
639
|
+
*
|
|
640
|
+
* A lightweight column-based list view using <table> for alignment.
|
|
641
|
+
* Simpler than a full Grid — no features, plugins, or editing.
|
|
642
|
+
* Supports item events, empty text, and reactive store binding.
|
|
643
|
+
*/
|
|
644
|
+
|
|
645
|
+
interface ListColumnConfig {
|
|
646
|
+
text: string;
|
|
647
|
+
dataIndex: string;
|
|
648
|
+
width?: number;
|
|
649
|
+
}
|
|
650
|
+
interface ListViewConfig extends ComponentConfig {
|
|
651
|
+
store?: any;
|
|
652
|
+
columns?: ListColumnConfig[];
|
|
653
|
+
emptyText?: string;
|
|
654
|
+
}
|
|
655
|
+
declare class ListView extends Component {
|
|
656
|
+
static $className: string;
|
|
657
|
+
private _store;
|
|
658
|
+
private _columns;
|
|
659
|
+
private _emptyText;
|
|
660
|
+
private _tableEl;
|
|
661
|
+
private _tbodyEl;
|
|
662
|
+
constructor(config?: ListViewConfig);
|
|
663
|
+
protected initialize(): void;
|
|
664
|
+
protected afterRender(): void;
|
|
665
|
+
refresh(): void;
|
|
666
|
+
private renderRows;
|
|
667
|
+
private bindStoreEvents;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* @framesquared/ui – Tab
|
|
672
|
+
*
|
|
673
|
+
* A tab component that renders as a clickable element with text,
|
|
674
|
+
* optional icon, optional close button, and active state styling.
|
|
675
|
+
*/
|
|
676
|
+
|
|
677
|
+
interface TabConfig extends ComponentConfig {
|
|
678
|
+
text?: string;
|
|
679
|
+
iconCls?: string;
|
|
680
|
+
closable?: boolean;
|
|
681
|
+
active?: boolean;
|
|
682
|
+
card?: Component;
|
|
683
|
+
}
|
|
684
|
+
declare class Tab extends Component {
|
|
685
|
+
static $className: string;
|
|
686
|
+
private _text;
|
|
687
|
+
private _closable;
|
|
688
|
+
private _active;
|
|
689
|
+
private _textEl;
|
|
690
|
+
private _closeEl;
|
|
691
|
+
/** The panel this tab represents */
|
|
692
|
+
card: Component | null;
|
|
693
|
+
constructor(config?: TabConfig);
|
|
694
|
+
protected initialize(): void;
|
|
695
|
+
protected afterRender(): void;
|
|
696
|
+
setActive(active: boolean): void;
|
|
697
|
+
isActive(): boolean;
|
|
698
|
+
setText(text: string): void;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* @framesquared/ui – TabBar
|
|
703
|
+
*
|
|
704
|
+
* A container for Tab components. Renders as a horizontal (or vertical)
|
|
705
|
+
* strip of tabs. Supports adding, removing, and overflow.
|
|
706
|
+
*/
|
|
707
|
+
|
|
708
|
+
interface TabBarConfig extends ComponentConfig {
|
|
709
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
710
|
+
}
|
|
711
|
+
declare class TabBar extends Component {
|
|
712
|
+
static $className: string;
|
|
713
|
+
private _tabs;
|
|
714
|
+
private _stripEl;
|
|
715
|
+
private _position;
|
|
716
|
+
constructor(config?: TabBarConfig);
|
|
717
|
+
protected initialize(): void;
|
|
718
|
+
protected afterRender(): void;
|
|
719
|
+
addTab(tab: Tab): void;
|
|
720
|
+
removeTab(tab: Tab): void;
|
|
721
|
+
getTabs(): Tab[];
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* @framesquared/ui – TabPanel
|
|
726
|
+
*
|
|
727
|
+
* A Panel that uses a card layout internally. Each child panel
|
|
728
|
+
* becomes a tab in the TabBar. Clicking a tab switches the
|
|
729
|
+
* visible card. Supports closable tabs, deferred rendering,
|
|
730
|
+
* and top/bottom/left/right tab positioning.
|
|
731
|
+
*/
|
|
732
|
+
|
|
733
|
+
interface TabPanelConfig extends PanelConfig {
|
|
734
|
+
activeTab?: number | Component;
|
|
735
|
+
tabPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
736
|
+
plain?: boolean;
|
|
737
|
+
deferredRender?: boolean;
|
|
738
|
+
minTabWidth?: number;
|
|
739
|
+
maxTabWidth?: number;
|
|
740
|
+
removePanelHeader?: boolean;
|
|
741
|
+
}
|
|
742
|
+
declare class TabPanel extends Panel {
|
|
743
|
+
static $className: string;
|
|
744
|
+
private static _idCounter;
|
|
745
|
+
private _tabBar;
|
|
746
|
+
private _tabItems;
|
|
747
|
+
private _tabs;
|
|
748
|
+
private _activeIndex;
|
|
749
|
+
private _tabPosition;
|
|
750
|
+
private _deferredRender;
|
|
751
|
+
private _tabBodyEl;
|
|
752
|
+
private _pendingTabItems;
|
|
753
|
+
constructor(config?: TabPanelConfig);
|
|
754
|
+
protected initialize(): void;
|
|
755
|
+
protected afterRender(): void;
|
|
756
|
+
private addTabItem;
|
|
757
|
+
private closeTab;
|
|
758
|
+
setActiveTab(tabOrIndex: number | Component): void;
|
|
759
|
+
private activateTab;
|
|
760
|
+
getActiveTab(): Component | undefined;
|
|
761
|
+
getTabItems(): Component[];
|
|
762
|
+
getTabBar(): TabBar | null;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* @framesquared/ui – Viewport
|
|
767
|
+
*
|
|
768
|
+
* A Container that fills the entire browser viewport.
|
|
769
|
+
* Renders into document.body, sets overflow: hidden,
|
|
770
|
+
* and fires 'resize' on window resize.
|
|
771
|
+
*/
|
|
772
|
+
|
|
773
|
+
interface ViewportConfig extends ContainerConfig {
|
|
774
|
+
}
|
|
775
|
+
declare class Viewport extends Container {
|
|
776
|
+
static $className: string;
|
|
777
|
+
private _resizeHandler;
|
|
778
|
+
constructor(config?: ViewportConfig);
|
|
779
|
+
protected initialize(): void;
|
|
780
|
+
protected afterRender(): void;
|
|
781
|
+
protected onDestroy(): void;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* @framesquared/ui – Accordion
|
|
786
|
+
*
|
|
787
|
+
* A Container that displays child panels as collapsible sections.
|
|
788
|
+
* By default only one panel is expanded at a time (single mode).
|
|
789
|
+
* Set multi:true to allow multiple expanded panels.
|
|
790
|
+
*/
|
|
791
|
+
|
|
792
|
+
interface AccordionConfig extends ContainerConfig {
|
|
793
|
+
multi?: boolean;
|
|
794
|
+
activeItem?: number;
|
|
795
|
+
}
|
|
796
|
+
declare class Accordion extends Container {
|
|
797
|
+
static $className: string;
|
|
798
|
+
private _multi;
|
|
799
|
+
private _expandedSet;
|
|
800
|
+
private _headerEls;
|
|
801
|
+
constructor(config?: AccordionConfig);
|
|
802
|
+
protected initialize(): void;
|
|
803
|
+
protected afterRender(): void;
|
|
804
|
+
expand(index: number): void;
|
|
805
|
+
collapse(index: number): void;
|
|
806
|
+
toggle(index: number): void;
|
|
807
|
+
isExpanded(index: number): boolean;
|
|
808
|
+
private doExpand;
|
|
809
|
+
private doCollapse;
|
|
810
|
+
private getSection;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* @framesquared/ui – CardContainer
|
|
815
|
+
*
|
|
816
|
+
* A Container with card layout behavior: only one child is visible
|
|
817
|
+
* at a time. Provides next(), prev(), and setActiveItem() for
|
|
818
|
+
* wizard-style navigation.
|
|
819
|
+
*/
|
|
820
|
+
|
|
821
|
+
interface CardContainerConfig extends ContainerConfig {
|
|
822
|
+
activeItem?: number;
|
|
823
|
+
}
|
|
824
|
+
declare class CardContainer extends Container {
|
|
825
|
+
static $className: string;
|
|
826
|
+
private _activeIndex;
|
|
827
|
+
constructor(config?: CardContainerConfig);
|
|
828
|
+
protected initialize(): void;
|
|
829
|
+
protected afterRender(): void;
|
|
830
|
+
setActiveItem(index: number): void;
|
|
831
|
+
next(): void;
|
|
832
|
+
prev(): void;
|
|
833
|
+
getActiveItem(): any;
|
|
834
|
+
getActiveIndex(): number;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* @framesquared/ui – Breadcrumb
|
|
839
|
+
*
|
|
840
|
+
* Displays a tree store as a breadcrumb path. Each segment is a
|
|
841
|
+
* clickable item. Non-leaf items have a dropdown arrow that shows
|
|
842
|
+
* their children for navigation.
|
|
843
|
+
*/
|
|
844
|
+
|
|
845
|
+
interface BreadcrumbNode {
|
|
846
|
+
id: string;
|
|
847
|
+
text: string;
|
|
848
|
+
leaf: boolean;
|
|
849
|
+
children: BreadcrumbNode[];
|
|
850
|
+
parent: BreadcrumbNode | null;
|
|
851
|
+
}
|
|
852
|
+
interface BreadcrumbStore {
|
|
853
|
+
getRoot(): BreadcrumbNode;
|
|
854
|
+
getNodeById(id: string): BreadcrumbNode | null;
|
|
855
|
+
}
|
|
856
|
+
interface BreadcrumbConfig extends ComponentConfig {
|
|
857
|
+
store?: BreadcrumbStore;
|
|
858
|
+
selection?: BreadcrumbNode | null;
|
|
859
|
+
showIcons?: boolean;
|
|
860
|
+
}
|
|
861
|
+
declare class Breadcrumb extends Component {
|
|
862
|
+
static $className: string;
|
|
863
|
+
private _store;
|
|
864
|
+
private _selection;
|
|
865
|
+
private _contentEl;
|
|
866
|
+
private _activeDropdown;
|
|
867
|
+
constructor(config?: BreadcrumbConfig);
|
|
868
|
+
protected initialize(): void;
|
|
869
|
+
protected afterRender(): void;
|
|
870
|
+
private renderPath;
|
|
871
|
+
private getPathToNode;
|
|
872
|
+
private navigateTo;
|
|
873
|
+
setSelection(node: BreadcrumbNode): void;
|
|
874
|
+
getSelection(): BreadcrumbNode | null;
|
|
875
|
+
private showDropdown;
|
|
876
|
+
private closeDropdown;
|
|
877
|
+
protected onDestroy(): void;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* @framesquared/ui – TreeGridColumn
|
|
882
|
+
*
|
|
883
|
+
* Column definition for the tree (first) column of a TreeGrid.
|
|
884
|
+
* Renders tree chrome: indentation, expander, icon, checkbox, node text.
|
|
885
|
+
*/
|
|
886
|
+
|
|
887
|
+
type ElbowType = 'line' | 'empty' | 'end' | 'end-plus' | 'tee' | 'tee-plus';
|
|
888
|
+
interface EditorConfig {
|
|
889
|
+
xtype: string;
|
|
890
|
+
/** options for combobox/select/radiogroup — array of {value,text} or plain strings */
|
|
891
|
+
options?: Array<{
|
|
892
|
+
value: string;
|
|
893
|
+
text: string;
|
|
894
|
+
} | string>;
|
|
895
|
+
/** legacy: ExtJS-style store for combobox */
|
|
896
|
+
store?: Array<{
|
|
897
|
+
value: string;
|
|
898
|
+
text: string;
|
|
899
|
+
} | string>;
|
|
900
|
+
displayField?: string;
|
|
901
|
+
valueField?: string;
|
|
902
|
+
minValue?: number;
|
|
903
|
+
maxValue?: number;
|
|
904
|
+
step?: number;
|
|
905
|
+
rows?: number;
|
|
906
|
+
allowBlank?: boolean;
|
|
907
|
+
[key: string]: unknown;
|
|
908
|
+
}
|
|
909
|
+
interface ColumnConfig {
|
|
910
|
+
dataIndex: string;
|
|
911
|
+
text?: string;
|
|
912
|
+
width?: number;
|
|
913
|
+
flex?: number;
|
|
914
|
+
hidden?: boolean;
|
|
915
|
+
renderer?: (value: unknown, record: NodeInterface) => string;
|
|
916
|
+
/** Editor config. Pass false to mark the column as read-only. */
|
|
917
|
+
editor?: EditorConfig | false;
|
|
918
|
+
}
|
|
919
|
+
declare class Column {
|
|
920
|
+
readonly isColumn: boolean;
|
|
921
|
+
dataIndex: string;
|
|
922
|
+
text: string;
|
|
923
|
+
width: number;
|
|
924
|
+
flex: number;
|
|
925
|
+
hidden: boolean;
|
|
926
|
+
renderer: ((value: unknown, record: NodeInterface) => string) | undefined;
|
|
927
|
+
editor: EditorConfig | false | undefined;
|
|
928
|
+
constructor(config: ColumnConfig);
|
|
929
|
+
/**
|
|
930
|
+
* Returns the rendered cell value HTML for this column.
|
|
931
|
+
*/
|
|
932
|
+
renderValue(record: NodeInterface): string;
|
|
933
|
+
}
|
|
934
|
+
interface TreeGridColumnConfig extends Omit<ColumnConfig, 'dataIndex'> {
|
|
935
|
+
dataIndex?: string;
|
|
936
|
+
indentSize?: number;
|
|
937
|
+
iconProperty?: string;
|
|
938
|
+
iconClsProperty?: string;
|
|
939
|
+
displayProperty?: string;
|
|
940
|
+
defaultFolderIcon?: string;
|
|
941
|
+
defaultFolderOpenIcon?: string;
|
|
942
|
+
defaultLeafIcon?: string;
|
|
943
|
+
showIcons?: boolean;
|
|
944
|
+
showExpanders?: boolean;
|
|
945
|
+
innerRenderer?: (value: unknown, record: NodeInterface) => string;
|
|
946
|
+
}
|
|
947
|
+
declare class TreeGridColumn extends Column {
|
|
948
|
+
readonly isTreeGridColumn: boolean;
|
|
949
|
+
indentSize: number;
|
|
950
|
+
iconProperty: string;
|
|
951
|
+
iconClsProperty: string;
|
|
952
|
+
displayProperty: string;
|
|
953
|
+
defaultFolderIcon: string;
|
|
954
|
+
defaultFolderOpenIcon: string;
|
|
955
|
+
defaultLeafIcon: string;
|
|
956
|
+
showIcons: boolean;
|
|
957
|
+
showExpanders: boolean;
|
|
958
|
+
innerRenderer: ((value: unknown, record: NodeInterface) => string) | undefined;
|
|
959
|
+
constructor(config?: TreeGridColumnConfig);
|
|
960
|
+
/**
|
|
961
|
+
* Computes the array of elbow types for a node based on depth and sibling position.
|
|
962
|
+
*/
|
|
963
|
+
computeElbows(record: NodeInterface): ElbowType[];
|
|
964
|
+
/**
|
|
965
|
+
* Renders the complete tree cell HTML.
|
|
966
|
+
*/
|
|
967
|
+
renderCell(record: NodeInterface, checkable: boolean, lines: boolean): string;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* @framesquared/ui – TreeGridView
|
|
972
|
+
*
|
|
973
|
+
* Renders the tree grid body: a <table> with rows for each visible node.
|
|
974
|
+
* First column uses TreeGridColumn for tree chrome; subsequent columns render plain values.
|
|
975
|
+
*/
|
|
976
|
+
|
|
977
|
+
interface TreeGridViewConfig {
|
|
978
|
+
store: TreeStore;
|
|
979
|
+
columns: (TreeGridColumn | Column)[];
|
|
980
|
+
rootVisible?: boolean;
|
|
981
|
+
checkable?: boolean;
|
|
982
|
+
lines?: boolean;
|
|
983
|
+
animate?: boolean;
|
|
984
|
+
animationDuration?: number;
|
|
985
|
+
expanderSelector?: string;
|
|
986
|
+
checkboxSelector?: string;
|
|
987
|
+
}
|
|
988
|
+
declare class TreeGridView {
|
|
989
|
+
el: HTMLElement | null;
|
|
990
|
+
private tableEl;
|
|
991
|
+
private tbodyEl;
|
|
992
|
+
private store;
|
|
993
|
+
private columns;
|
|
994
|
+
private rootVisible;
|
|
995
|
+
private checkable;
|
|
996
|
+
private lines;
|
|
997
|
+
private listeners;
|
|
998
|
+
private focusedNode;
|
|
999
|
+
private _rowCache;
|
|
1000
|
+
constructor(config: TreeGridViewConfig);
|
|
1001
|
+
on(event: string, fn: Function): void;
|
|
1002
|
+
un(event: string, fn: Function): void;
|
|
1003
|
+
private fireEvent;
|
|
1004
|
+
render(container: HTMLElement): void;
|
|
1005
|
+
refresh(): void;
|
|
1006
|
+
private _buildRow;
|
|
1007
|
+
refreshNode(record: NodeInterface): void;
|
|
1008
|
+
onNodeExpand(parentNode: NodeInterface, childNodes: NodeInterface[]): void;
|
|
1009
|
+
onNodeCollapse(parentNode: NodeInterface): void;
|
|
1010
|
+
onNodeInsert(parent: NodeInterface, _node: NodeInterface): void;
|
|
1011
|
+
onNodeRemove(_parent: NodeInterface, node: NodeInterface): void;
|
|
1012
|
+
onNodeUpdate(node: NodeInterface): void;
|
|
1013
|
+
getNodeRow(record: NodeInterface): HTMLElement | null;
|
|
1014
|
+
getRecord(rowElement: HTMLElement): NodeInterface | null;
|
|
1015
|
+
getNodeByEvent(event: Event): NodeInterface | null;
|
|
1016
|
+
focusRow(record: NodeInterface): void;
|
|
1017
|
+
getFocusedNode(): NodeInterface | null;
|
|
1018
|
+
markSelected(record: NodeInterface, selected: boolean): void;
|
|
1019
|
+
showLoadingIndicator(node: NodeInterface): void;
|
|
1020
|
+
hideLoadingIndicator(node: NodeInterface): void;
|
|
1021
|
+
private _refreshTreeColumnCell;
|
|
1022
|
+
private _visibleColumnIndex;
|
|
1023
|
+
private _flattenVisible;
|
|
1024
|
+
private _getRowRecord;
|
|
1025
|
+
private _onViewClick;
|
|
1026
|
+
private _onViewDblClick;
|
|
1027
|
+
private _onViewContextMenu;
|
|
1028
|
+
private _onKeyDown;
|
|
1029
|
+
setColumns(columns: (TreeGridColumn | Column)[]): void;
|
|
1030
|
+
setCheckable(checkable: boolean): void;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* @framesquared/ui – TreeGridSelectionModel
|
|
1035
|
+
*
|
|
1036
|
+
* Selection model for TreeGrid. Supports SINGLE, SIMPLE, and MULTI modes.
|
|
1037
|
+
* Tree-aware: tracks selected nodes from flatData, supports range selection.
|
|
1038
|
+
*/
|
|
1039
|
+
|
|
1040
|
+
interface TreeGridSelectionModelConfig {
|
|
1041
|
+
mode?: 'SINGLE' | 'SIMPLE' | 'MULTI';
|
|
1042
|
+
deselectOnCollapse?: boolean;
|
|
1043
|
+
pruneRemoved?: boolean;
|
|
1044
|
+
checkboxSelect?: boolean;
|
|
1045
|
+
}
|
|
1046
|
+
declare class TreeGridSelectionModel {
|
|
1047
|
+
private mode;
|
|
1048
|
+
private selected;
|
|
1049
|
+
private listeners;
|
|
1050
|
+
readonly deselectOnCollapse: boolean;
|
|
1051
|
+
readonly pruneRemoved: boolean;
|
|
1052
|
+
readonly checkboxSelect: boolean;
|
|
1053
|
+
private anchor;
|
|
1054
|
+
constructor(config?: TreeGridSelectionModelConfig);
|
|
1055
|
+
on(event: string, fn: Function): void;
|
|
1056
|
+
un(event: string, fn: Function): void;
|
|
1057
|
+
private fireEvent;
|
|
1058
|
+
select(nodes: NodeInterface | NodeInterface[], keepExisting?: boolean, suppressEvent?: boolean): void;
|
|
1059
|
+
deselect(nodes: NodeInterface | NodeInterface[], suppressEvent?: boolean): void;
|
|
1060
|
+
deselectAll(suppressEvent?: boolean): void;
|
|
1061
|
+
selectAll(flatData: NodeInterface[], suppressEvent?: boolean): void;
|
|
1062
|
+
/**
|
|
1063
|
+
* Selects a range of nodes between anchor and the given node (inclusive).
|
|
1064
|
+
*/
|
|
1065
|
+
selectRange(flatData: NodeInterface[], toNode: NodeInterface, suppressEvent?: boolean): void;
|
|
1066
|
+
isSelected(node: NodeInterface): boolean;
|
|
1067
|
+
getSelection(): NodeInterface[];
|
|
1068
|
+
getCount(): number;
|
|
1069
|
+
getMode(): string;
|
|
1070
|
+
setMode(mode: 'SINGLE' | 'SIMPLE' | 'MULTI'): void;
|
|
1071
|
+
/**
|
|
1072
|
+
* Removes a node from selection (for use when a node is removed from the store).
|
|
1073
|
+
*/
|
|
1074
|
+
onNodeRemoved(node: NodeInterface): void;
|
|
1075
|
+
/**
|
|
1076
|
+
* If deselectOnCollapse=true, deselects descendants of collapsed node.
|
|
1077
|
+
*/
|
|
1078
|
+
onNodeCollapsed(node: NodeInterface): void;
|
|
1079
|
+
/**
|
|
1080
|
+
* Selects all children of a node (direct or deep).
|
|
1081
|
+
*/
|
|
1082
|
+
selectChildren(node: NodeInterface, deep?: boolean, keepExisting?: boolean, suppressEvent?: boolean): void;
|
|
1083
|
+
deselectChildren(node: NodeInterface, deep?: boolean, suppressEvent?: boolean): void;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* @framesquared/ui – TreeGrid
|
|
1088
|
+
*
|
|
1089
|
+
* Hybrid tree + grid component. Renders hierarchical data with multiple
|
|
1090
|
+
* columns. The first column is a TreeGridColumn (tree chrome + value),
|
|
1091
|
+
* subsequent columns display plain field values.
|
|
1092
|
+
*/
|
|
1093
|
+
|
|
1094
|
+
interface TreeGridConfig extends PanelConfig {
|
|
1095
|
+
store: TreeStore | TreeStoreConfig | object[] | NodeInterface;
|
|
1096
|
+
rootVisible?: boolean;
|
|
1097
|
+
displayField?: string;
|
|
1098
|
+
useArrows?: boolean;
|
|
1099
|
+
lines?: boolean;
|
|
1100
|
+
singleExpand?: boolean;
|
|
1101
|
+
animate?: boolean;
|
|
1102
|
+
expandOnDblClick?: boolean;
|
|
1103
|
+
folderSort?: boolean;
|
|
1104
|
+
checkable?: boolean;
|
|
1105
|
+
cascadeChecks?: boolean;
|
|
1106
|
+
checkPropagation?: 'up' | 'down' | 'both' | 'none';
|
|
1107
|
+
onlyLeafCheckable?: boolean;
|
|
1108
|
+
columns?: (ColumnConfig | TreeGridColumnConfig)[];
|
|
1109
|
+
treeColumn?: TreeGridColumnConfig | number;
|
|
1110
|
+
enableDrag?: boolean;
|
|
1111
|
+
enableDrop?: boolean;
|
|
1112
|
+
ddGroup?: string;
|
|
1113
|
+
selModel?: TreeGridSelectionModelConfig;
|
|
1114
|
+
emptyText?: string;
|
|
1115
|
+
}
|
|
1116
|
+
declare class TreeGrid extends Panel {
|
|
1117
|
+
static $className: string;
|
|
1118
|
+
readonly isTreeGrid: boolean;
|
|
1119
|
+
private _store;
|
|
1120
|
+
private _columns;
|
|
1121
|
+
private _treeColumn;
|
|
1122
|
+
private _view;
|
|
1123
|
+
private _selModel;
|
|
1124
|
+
private _rootVisible;
|
|
1125
|
+
private _displayField;
|
|
1126
|
+
private _lines;
|
|
1127
|
+
private _singleExpand;
|
|
1128
|
+
private _checkable;
|
|
1129
|
+
private _cascadeChecks;
|
|
1130
|
+
private _checkPropagation;
|
|
1131
|
+
private _onlyLeafCheckable;
|
|
1132
|
+
private _animate;
|
|
1133
|
+
private _expandOnDblClick;
|
|
1134
|
+
private _folderSort;
|
|
1135
|
+
constructor(config: TreeGridConfig);
|
|
1136
|
+
protected initialize(): void;
|
|
1137
|
+
protected afterRender(): void;
|
|
1138
|
+
private _normalizeStore;
|
|
1139
|
+
private _normalizeColumns;
|
|
1140
|
+
private _wireStoreEvents;
|
|
1141
|
+
getStore(): TreeStore;
|
|
1142
|
+
getRootNode(): NodeInterface;
|
|
1143
|
+
setRootNode(rootOrData: NodeInterface | Record<string, unknown>): NodeInterface;
|
|
1144
|
+
getNodeById(id: string | number): NodeInterface | null;
|
|
1145
|
+
expandAll(callback?: () => void): void;
|
|
1146
|
+
collapseAll(callback?: () => void): void;
|
|
1147
|
+
expandNode(node: NodeInterface, deep?: boolean, callback?: (children: NodeInterface[]) => void): void;
|
|
1148
|
+
collapseNode(node: NodeInterface, deep?: boolean, callback?: () => void): void;
|
|
1149
|
+
toggleNode(node: NodeInterface): void;
|
|
1150
|
+
isNodeExpanded(node: NodeInterface): boolean;
|
|
1151
|
+
isNodeLoaded(node: NodeInterface): boolean;
|
|
1152
|
+
expandPath(path: string, options?: {
|
|
1153
|
+
separator?: string;
|
|
1154
|
+
field?: string;
|
|
1155
|
+
select?: boolean;
|
|
1156
|
+
}): Promise<NodeInterface>;
|
|
1157
|
+
selectPath(path: string, options?: {
|
|
1158
|
+
separator?: string;
|
|
1159
|
+
field?: string;
|
|
1160
|
+
}): Promise<NodeInterface>;
|
|
1161
|
+
getChecked(): NodeInterface[];
|
|
1162
|
+
getCheckedLeaves(): NodeInterface[];
|
|
1163
|
+
setChecked(node: NodeInterface, checked: boolean, suppressEvent?: boolean): void;
|
|
1164
|
+
toggleChecked(node: NodeInterface): void;
|
|
1165
|
+
checkAll(): void;
|
|
1166
|
+
uncheckAll(): void;
|
|
1167
|
+
private _updateAncestorChecks;
|
|
1168
|
+
getSelection(): NodeInterface[];
|
|
1169
|
+
select(nodes: NodeInterface | NodeInterface[] | number | number[], keepExisting?: boolean, suppressEvent?: boolean): void;
|
|
1170
|
+
deselect(nodes: NodeInterface | NodeInterface[] | number | number[], suppressEvent?: boolean): void;
|
|
1171
|
+
deselectAll(suppressEvent?: boolean): void;
|
|
1172
|
+
selectAll(suppressEvent?: boolean): void;
|
|
1173
|
+
private _updateSelectionVisuals;
|
|
1174
|
+
scrollToNode(node: NodeInterface, options?: {
|
|
1175
|
+
focus?: boolean;
|
|
1176
|
+
select?: boolean;
|
|
1177
|
+
}): Promise<void>;
|
|
1178
|
+
ensureNodeVisible(node: NodeInterface): Promise<void>;
|
|
1179
|
+
getView(): TreeGridView;
|
|
1180
|
+
getTreeColumn(): TreeGridColumn;
|
|
1181
|
+
getColumns(): (TreeGridColumn | Column)[];
|
|
1182
|
+
getColumnByDataIndex(dataIndex: string): Column | undefined;
|
|
1183
|
+
getNodeRow(node: NodeInterface): HTMLElement | null;
|
|
1184
|
+
getNodeFromRow(rowEl: HTMLElement): NodeInterface | null;
|
|
1185
|
+
getDepthIndent(depth: number): number;
|
|
1186
|
+
reload(): Promise<NodeInterface[]>;
|
|
1187
|
+
isRootVisible(): boolean;
|
|
1188
|
+
isCheckable(): boolean;
|
|
1189
|
+
getDisplayField(): string;
|
|
1190
|
+
private _collapseSiblings;
|
|
1191
|
+
protected fire(eventName: string, ...args: unknown[]): boolean;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* @framesquared/ui – TreeGridDragDrop
|
|
1196
|
+
*
|
|
1197
|
+
* Drag-and-drop plugin for TreeGrid. Enables reparenting and reordering
|
|
1198
|
+
* of tree nodes via pointer events.
|
|
1199
|
+
*/
|
|
1200
|
+
|
|
1201
|
+
interface TreeGridDragDropConfig {
|
|
1202
|
+
enableDrag?: boolean;
|
|
1203
|
+
enableDrop?: boolean;
|
|
1204
|
+
ddGroup?: string;
|
|
1205
|
+
appendOnly?: boolean;
|
|
1206
|
+
sortOnDrop?: boolean;
|
|
1207
|
+
allowContainerDrops?: boolean;
|
|
1208
|
+
expandDelay?: number;
|
|
1209
|
+
allowParentInserts?: boolean;
|
|
1210
|
+
displayField?: string;
|
|
1211
|
+
dragText?: string;
|
|
1212
|
+
copy?: boolean;
|
|
1213
|
+
allowCopy?: boolean;
|
|
1214
|
+
dropHighlightCls?: string;
|
|
1215
|
+
dropIndicatorCls?: string;
|
|
1216
|
+
nodeHighlightOnDrop?: boolean;
|
|
1217
|
+
containerScrollOnDrag?: boolean;
|
|
1218
|
+
containerScrollThreshold?: number;
|
|
1219
|
+
containerScrollSpeed?: number;
|
|
1220
|
+
}
|
|
1221
|
+
declare class TreeGridDragDrop {
|
|
1222
|
+
private treeGrid;
|
|
1223
|
+
private config;
|
|
1224
|
+
private dragging;
|
|
1225
|
+
private dragData;
|
|
1226
|
+
private ghostEl;
|
|
1227
|
+
private dropIndicatorEl;
|
|
1228
|
+
private highlightedRow;
|
|
1229
|
+
private expandTimer;
|
|
1230
|
+
private _pendingRecord;
|
|
1231
|
+
private _captureTarget;
|
|
1232
|
+
private _pointerId;
|
|
1233
|
+
private _downX;
|
|
1234
|
+
private _downY;
|
|
1235
|
+
private readonly _threshold;
|
|
1236
|
+
private _onPointerDown;
|
|
1237
|
+
private _onPointerMove;
|
|
1238
|
+
private _onPointerUp;
|
|
1239
|
+
constructor(config?: TreeGridDragDropConfig);
|
|
1240
|
+
init(treeGrid: TreeGrid): void;
|
|
1241
|
+
destroy(): void;
|
|
1242
|
+
private _handlePointerDown;
|
|
1243
|
+
private _handlePointerMove;
|
|
1244
|
+
private _handlePointerUp;
|
|
1245
|
+
private _executeDrop;
|
|
1246
|
+
private _insertNode;
|
|
1247
|
+
private _isValidDrop;
|
|
1248
|
+
private _computeDropPosition;
|
|
1249
|
+
private _createGhost;
|
|
1250
|
+
private _clearDropIndicators;
|
|
1251
|
+
private _showDropIndicator;
|
|
1252
|
+
private _startExpandTimer;
|
|
1253
|
+
private _cancelExpandTimer;
|
|
1254
|
+
private _cleanup;
|
|
1255
|
+
private _getRecordAtPoint;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* @framesquared/ui – TreeGridCellEditing
|
|
1260
|
+
*
|
|
1261
|
+
* Tree-aware inline cell editing plugin for TreeGrid.
|
|
1262
|
+
*/
|
|
1263
|
+
|
|
1264
|
+
interface TreeGridCellEditingConfig {
|
|
1265
|
+
editableTreeColumn?: boolean;
|
|
1266
|
+
addChildOnInsert?: boolean;
|
|
1267
|
+
addSiblingOnEnter?: boolean;
|
|
1268
|
+
clicksToEdit?: number;
|
|
1269
|
+
}
|
|
1270
|
+
declare class TreeGridCellEditing {
|
|
1271
|
+
private treeGrid;
|
|
1272
|
+
private config;
|
|
1273
|
+
private activeEditor;
|
|
1274
|
+
private editingRecord;
|
|
1275
|
+
private editingField;
|
|
1276
|
+
private _onClick;
|
|
1277
|
+
private _onDblClick;
|
|
1278
|
+
constructor(config?: TreeGridCellEditingConfig);
|
|
1279
|
+
init(treeGrid: TreeGrid): void;
|
|
1280
|
+
destroy(): void;
|
|
1281
|
+
startEdit(record: NodeInterface, dataIndex: string): void;
|
|
1282
|
+
completeEdit(): void;
|
|
1283
|
+
cancelEdit(): void;
|
|
1284
|
+
isEditing(): boolean;
|
|
1285
|
+
private _createEditorElement;
|
|
1286
|
+
private _getEditorValue;
|
|
1287
|
+
private _currentEditorConfig;
|
|
1288
|
+
private _removeEditor;
|
|
1289
|
+
private _focusNextCell;
|
|
1290
|
+
private _handleClick;
|
|
1291
|
+
private _handleDblClick;
|
|
1292
|
+
private _startEditFromEvent;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* @framesquared/ui – TreeGridRowEditing
|
|
1297
|
+
*
|
|
1298
|
+
* Tree-aware row editing plugin for TreeGrid.
|
|
1299
|
+
*/
|
|
1300
|
+
|
|
1301
|
+
interface TreeGridRowEditingConfig {
|
|
1302
|
+
clicksToEdit?: number;
|
|
1303
|
+
autoCancel?: boolean;
|
|
1304
|
+
saveBtnText?: string;
|
|
1305
|
+
cancelBtnText?: string;
|
|
1306
|
+
}
|
|
1307
|
+
declare class TreeGridRowEditing {
|
|
1308
|
+
private treeGrid;
|
|
1309
|
+
private config;
|
|
1310
|
+
private editingRecord;
|
|
1311
|
+
private editorRow;
|
|
1312
|
+
private fieldMap;
|
|
1313
|
+
private _onDblClick;
|
|
1314
|
+
constructor(config?: TreeGridRowEditingConfig);
|
|
1315
|
+
init(treeGrid: TreeGrid): void;
|
|
1316
|
+
destroy(): void;
|
|
1317
|
+
startEdit(record: NodeInterface): void;
|
|
1318
|
+
completeEdit(): void;
|
|
1319
|
+
cancelEdit(): void;
|
|
1320
|
+
isEditing(): boolean;
|
|
1321
|
+
private _removeEditorRow;
|
|
1322
|
+
private _handleDblClick;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* @framesquared/ui – TreeGridClipboard
|
|
1327
|
+
*
|
|
1328
|
+
* Copy/paste plugin for TreeGrid. Supports TSV copy with optional
|
|
1329
|
+
* hierarchy indentation and paste as children/siblings.
|
|
1330
|
+
*/
|
|
1331
|
+
|
|
1332
|
+
interface TreeGridClipboardConfig {
|
|
1333
|
+
copyHierarchy?: boolean;
|
|
1334
|
+
pasteAsChildren?: boolean;
|
|
1335
|
+
pasteIndentLevel?: boolean;
|
|
1336
|
+
indentCharacter?: string;
|
|
1337
|
+
includeHeaders?: boolean;
|
|
1338
|
+
}
|
|
1339
|
+
declare class TreeGridClipboard {
|
|
1340
|
+
private treeGrid;
|
|
1341
|
+
private config;
|
|
1342
|
+
private _onKeyDown;
|
|
1343
|
+
constructor(config?: TreeGridClipboardConfig);
|
|
1344
|
+
init(treeGrid: TreeGrid): void;
|
|
1345
|
+
destroy(): void;
|
|
1346
|
+
copyToClipboard(): string;
|
|
1347
|
+
pasteFromText(text: string): void;
|
|
1348
|
+
private _handleKeyDown;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* @framesquared/ui – TreeGridSummary
|
|
1353
|
+
*
|
|
1354
|
+
* Feature that adds a summary row aggregating values across visible nodes.
|
|
1355
|
+
*/
|
|
1356
|
+
|
|
1357
|
+
type SummaryType = 'sum' | 'count' | 'average' | 'min' | 'max' | 'none';
|
|
1358
|
+
interface SummaryColumnConfig {
|
|
1359
|
+
dataIndex: string;
|
|
1360
|
+
summaryType?: SummaryType;
|
|
1361
|
+
summaryRenderer?: (value: number, count: number) => string;
|
|
1362
|
+
}
|
|
1363
|
+
interface TreeGridSummaryConfig {
|
|
1364
|
+
position?: 'bottom' | 'top';
|
|
1365
|
+
includeCollapsed?: boolean;
|
|
1366
|
+
treeColumnSummaryText?: string;
|
|
1367
|
+
summaryColumns?: SummaryColumnConfig[];
|
|
1368
|
+
}
|
|
1369
|
+
declare class TreeGridSummary {
|
|
1370
|
+
private treeGrid;
|
|
1371
|
+
private config;
|
|
1372
|
+
private summaryRowEl;
|
|
1373
|
+
constructor(config?: TreeGridSummaryConfig);
|
|
1374
|
+
init(treeGrid: TreeGrid): void;
|
|
1375
|
+
destroy(): void;
|
|
1376
|
+
renderSummary(): void;
|
|
1377
|
+
updateSummary(): void;
|
|
1378
|
+
calculateSummary(dataIndex: string, summaryType: SummaryType): number;
|
|
1379
|
+
private _getNodes;
|
|
1380
|
+
private _buildSummaryRow;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* @framesquared/ui – TreeGridGroupingSummary
|
|
1385
|
+
*
|
|
1386
|
+
* Feature adding per-parent summary rows after each expanded parent's last child.
|
|
1387
|
+
*/
|
|
1388
|
+
|
|
1389
|
+
interface TreeGridGroupingSummaryConfig {
|
|
1390
|
+
includeDescendants?: boolean;
|
|
1391
|
+
summaryRowCls?: string;
|
|
1392
|
+
showSummaryFor?: 'all' | 'nonleaf';
|
|
1393
|
+
summaryColumns?: SummaryColumnConfig[];
|
|
1394
|
+
treeColumnSummaryText?: string;
|
|
1395
|
+
}
|
|
1396
|
+
declare class TreeGridGroupingSummary {
|
|
1397
|
+
private treeGrid;
|
|
1398
|
+
private config;
|
|
1399
|
+
constructor(config?: TreeGridGroupingSummaryConfig);
|
|
1400
|
+
init(treeGrid: TreeGrid): void;
|
|
1401
|
+
destroy(): void;
|
|
1402
|
+
private _renderGroupSummaries;
|
|
1403
|
+
private _findLastVisible;
|
|
1404
|
+
private _buildGroupSummaryRow;
|
|
1405
|
+
private _getChildNodes;
|
|
1406
|
+
private _calculate;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* @framesquared/ui – TreeGridRowExpander
|
|
1411
|
+
*
|
|
1412
|
+
* Plugin adding a detail-view expander column to each row.
|
|
1413
|
+
* Independent from tree expand/collapse.
|
|
1414
|
+
*/
|
|
1415
|
+
|
|
1416
|
+
interface TreeGridRowExpanderConfig {
|
|
1417
|
+
rowBodyTpl?: string | ((node: NodeInterface) => string);
|
|
1418
|
+
expandOnDblClick?: boolean;
|
|
1419
|
+
singleRowExpand?: boolean;
|
|
1420
|
+
bodyIndent?: boolean;
|
|
1421
|
+
}
|
|
1422
|
+
declare class TreeGridRowExpander {
|
|
1423
|
+
private treeGrid;
|
|
1424
|
+
private config;
|
|
1425
|
+
private expandedRows;
|
|
1426
|
+
private bodyRowMap;
|
|
1427
|
+
private _onClick;
|
|
1428
|
+
private _onDblClick;
|
|
1429
|
+
constructor(config?: TreeGridRowExpanderConfig);
|
|
1430
|
+
init(treeGrid: TreeGrid): void;
|
|
1431
|
+
destroy(): void;
|
|
1432
|
+
expandRow(record: NodeInterface): void;
|
|
1433
|
+
collapseRow(record: NodeInterface): void;
|
|
1434
|
+
toggleRow(record: NodeInterface): void;
|
|
1435
|
+
isRowExpanded(record: NodeInterface): boolean;
|
|
1436
|
+
private _insertBodyRow;
|
|
1437
|
+
private _collapseById;
|
|
1438
|
+
private _renderTpl;
|
|
1439
|
+
private _handleClick;
|
|
1440
|
+
private _handleDblClick;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* @framesquared/ui – TreeGridFilterPlugin
|
|
1445
|
+
*
|
|
1446
|
+
* Column filter integration for TreeGrid with tree-aware filtering.
|
|
1447
|
+
*/
|
|
1448
|
+
|
|
1449
|
+
interface TreeGridFilterPluginConfig {
|
|
1450
|
+
filterer?: 'bottomup' | 'topdown';
|
|
1451
|
+
showFilterRow?: boolean;
|
|
1452
|
+
menuFilter?: boolean;
|
|
1453
|
+
}
|
|
1454
|
+
interface FilterValue {
|
|
1455
|
+
dataIndex: string;
|
|
1456
|
+
value: unknown;
|
|
1457
|
+
operator?: 'eq' | 'lt' | 'gt' | 'contains' | 'gte' | 'lte';
|
|
1458
|
+
}
|
|
1459
|
+
declare class TreeGridFilterPlugin {
|
|
1460
|
+
private treeGrid;
|
|
1461
|
+
private config;
|
|
1462
|
+
private activeFilters;
|
|
1463
|
+
private filterRowEl;
|
|
1464
|
+
constructor(config?: TreeGridFilterPluginConfig);
|
|
1465
|
+
init(treeGrid: TreeGrid): void;
|
|
1466
|
+
destroy(): void;
|
|
1467
|
+
addFilter(filter: FilterValue): void;
|
|
1468
|
+
removeFilter(dataIndex: string): void;
|
|
1469
|
+
clearFilters(): void;
|
|
1470
|
+
getActiveFilters(): FilterValue[];
|
|
1471
|
+
getFilteredCount(): number;
|
|
1472
|
+
private _applyFilters;
|
|
1473
|
+
/** bottomup: a node is visible if it or any descendant matches */
|
|
1474
|
+
private _applyBottomUp;
|
|
1475
|
+
/** topdown: a node is visible only if it and all ancestors match */
|
|
1476
|
+
private _applyTopDown;
|
|
1477
|
+
private _matchesAllFilters;
|
|
1478
|
+
private _matchesFilter;
|
|
1479
|
+
private _showAllNodes;
|
|
1480
|
+
private _getVisibleNodes;
|
|
1481
|
+
private _renderFilterRow;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* @framesquared/ui – TreeGridStateMixin
|
|
1486
|
+
*
|
|
1487
|
+
* State persistence for TreeGrid. Saves and restores column widths,
|
|
1488
|
+
* expanded nodes, sort, checked state, scroll position, and filters.
|
|
1489
|
+
*/
|
|
1490
|
+
|
|
1491
|
+
interface ColumnStateEntry {
|
|
1492
|
+
id: string;
|
|
1493
|
+
width?: number;
|
|
1494
|
+
flex?: number;
|
|
1495
|
+
hidden?: boolean;
|
|
1496
|
+
}
|
|
1497
|
+
interface TreeGridState {
|
|
1498
|
+
columns?: ColumnStateEntry[];
|
|
1499
|
+
columnOrder?: string[];
|
|
1500
|
+
expandedNodes?: (string | number)[];
|
|
1501
|
+
checkedNodes?: (string | number)[];
|
|
1502
|
+
selectedNodes?: (string | number)[];
|
|
1503
|
+
scrollPosition?: {
|
|
1504
|
+
top: number;
|
|
1505
|
+
left: number;
|
|
1506
|
+
};
|
|
1507
|
+
sorters?: {
|
|
1508
|
+
property: string;
|
|
1509
|
+
direction: 'ASC' | 'DESC';
|
|
1510
|
+
}[];
|
|
1511
|
+
}
|
|
1512
|
+
declare class TreeGridStateMixin {
|
|
1513
|
+
private treeGrid;
|
|
1514
|
+
private stateId;
|
|
1515
|
+
private saveDebounceTimer;
|
|
1516
|
+
private readonly saveDebounceMs;
|
|
1517
|
+
constructor(stateId: string | {
|
|
1518
|
+
stateId: string;
|
|
1519
|
+
});
|
|
1520
|
+
init(treeGrid: TreeGrid): void;
|
|
1521
|
+
destroy(): void;
|
|
1522
|
+
getState(): TreeGridState;
|
|
1523
|
+
applyState(state: TreeGridState): void;
|
|
1524
|
+
saveState(): void;
|
|
1525
|
+
loadState(): TreeGridState | null;
|
|
1526
|
+
clearState(): void;
|
|
1527
|
+
private _debouncedSave;
|
|
1528
|
+
private _wireEvents;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
* @framesquared/ui – TreeGridLockable
|
|
1533
|
+
*
|
|
1534
|
+
* Mixin/plugin enabling locked (frozen) columns in a TreeGrid.
|
|
1535
|
+
* Splits the grid into locked (left) and normal (right) panels.
|
|
1536
|
+
*/
|
|
1537
|
+
|
|
1538
|
+
interface TreeGridLockableConfig {
|
|
1539
|
+
syncScroll?: boolean;
|
|
1540
|
+
}
|
|
1541
|
+
declare class TreeGridLockable {
|
|
1542
|
+
private treeGrid;
|
|
1543
|
+
private config;
|
|
1544
|
+
private lockedViewEl;
|
|
1545
|
+
private normalViewEl;
|
|
1546
|
+
private lockedView;
|
|
1547
|
+
private normalView;
|
|
1548
|
+
private _onLockedScroll;
|
|
1549
|
+
private _onNormalScroll;
|
|
1550
|
+
private _syncingScroll;
|
|
1551
|
+
constructor(config?: TreeGridLockableConfig);
|
|
1552
|
+
init(treeGrid: TreeGrid): void;
|
|
1553
|
+
destroy(): void;
|
|
1554
|
+
getLockedView(): TreeGridView | null;
|
|
1555
|
+
getNormalView(): TreeGridView | null;
|
|
1556
|
+
lockColumn(col: Column): void;
|
|
1557
|
+
unlockColumn(col: Column): void;
|
|
1558
|
+
private _rebuild;
|
|
1559
|
+
private _syncScrollFromLocked;
|
|
1560
|
+
private _syncScrollFromNormal;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* @framesquared/ui – TreeGridExporter
|
|
1565
|
+
*
|
|
1566
|
+
* Exports TreeGrid data to CSV, JSON, TSV, and XLSX formats.
|
|
1567
|
+
*/
|
|
1568
|
+
|
|
1569
|
+
interface ExportOptions {
|
|
1570
|
+
includeHeaders?: boolean;
|
|
1571
|
+
includeHidden?: boolean;
|
|
1572
|
+
expandedOnly?: boolean;
|
|
1573
|
+
allNodes?: boolean;
|
|
1574
|
+
indentCharacter?: string;
|
|
1575
|
+
indentMultiplier?: number;
|
|
1576
|
+
columns?: string[];
|
|
1577
|
+
filename?: string;
|
|
1578
|
+
}
|
|
1579
|
+
declare class TreeGridExporter {
|
|
1580
|
+
constructor(_options?: ExportOptions);
|
|
1581
|
+
/**
|
|
1582
|
+
* Exports the TreeGrid to CSV format.
|
|
1583
|
+
*/
|
|
1584
|
+
static exportToCsv(treeGrid: TreeGrid, options?: ExportOptions): string;
|
|
1585
|
+
/**
|
|
1586
|
+
* Exports the TreeGrid to TSV format.
|
|
1587
|
+
*/
|
|
1588
|
+
static exportToTsv(treeGrid: TreeGrid, options?: ExportOptions): string;
|
|
1589
|
+
/**
|
|
1590
|
+
* Exports the TreeGrid to nested JSON preserving hierarchy.
|
|
1591
|
+
*/
|
|
1592
|
+
static exportToJson(treeGrid: TreeGrid, options?: ExportOptions): string;
|
|
1593
|
+
/**
|
|
1594
|
+
* Exports the TreeGrid to XLSX format.
|
|
1595
|
+
* Returns an ArrayBuffer with the XLSX bytes.
|
|
1596
|
+
*/
|
|
1597
|
+
static exportToXlsx(treeGrid: TreeGrid, options?: ExportOptions): ArrayBuffer;
|
|
1598
|
+
/**
|
|
1599
|
+
* Triggers a browser download with the given content.
|
|
1600
|
+
*/
|
|
1601
|
+
static download(content: string | ArrayBuffer, filename: string, mimeType: string): void;
|
|
1602
|
+
private static _buildRows;
|
|
1603
|
+
private static _getColumns;
|
|
1604
|
+
private static _getNodes;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* @framesquared/ui – TreeColumn
|
|
1609
|
+
*
|
|
1610
|
+
* Column definition / renderer for tree nodes.
|
|
1611
|
+
*/
|
|
1612
|
+
|
|
1613
|
+
interface TreeColumnConfig {
|
|
1614
|
+
dataIndex?: string;
|
|
1615
|
+
indentSize?: number;
|
|
1616
|
+
header?: string;
|
|
1617
|
+
width?: number;
|
|
1618
|
+
}
|
|
1619
|
+
declare class TreeColumn {
|
|
1620
|
+
dataIndex: string;
|
|
1621
|
+
indentSize: number;
|
|
1622
|
+
header: string;
|
|
1623
|
+
width: number;
|
|
1624
|
+
constructor(config?: TreeColumnConfig);
|
|
1625
|
+
/**
|
|
1626
|
+
* Renders the full cell content for a tree node.
|
|
1627
|
+
*/
|
|
1628
|
+
renderCell(record: NodeInterface, checkable?: boolean): string;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* @framesquared/ui – TreeView
|
|
1633
|
+
*
|
|
1634
|
+
* Renders the flat list of visible tree nodes in a <table>.
|
|
1635
|
+
*/
|
|
1636
|
+
|
|
1637
|
+
interface TreeViewConfig {
|
|
1638
|
+
store: TreeStore;
|
|
1639
|
+
displayField?: string;
|
|
1640
|
+
checkable?: boolean;
|
|
1641
|
+
column?: TreeColumn;
|
|
1642
|
+
}
|
|
1643
|
+
declare class TreeView {
|
|
1644
|
+
el: HTMLElement | null;
|
|
1645
|
+
private tableEl;
|
|
1646
|
+
private store;
|
|
1647
|
+
private displayField;
|
|
1648
|
+
private checkable;
|
|
1649
|
+
private column;
|
|
1650
|
+
private listeners;
|
|
1651
|
+
constructor(config: TreeViewConfig);
|
|
1652
|
+
on(event: string, fn: Function): void;
|
|
1653
|
+
un(event: string, fn: Function): void;
|
|
1654
|
+
private fireEvent;
|
|
1655
|
+
render(container: HTMLElement): void;
|
|
1656
|
+
refresh(): void;
|
|
1657
|
+
private buildRow;
|
|
1658
|
+
refreshNode(record: NodeInterface): void;
|
|
1659
|
+
getNode(record: NodeInterface): HTMLElement | null;
|
|
1660
|
+
getRecord(el: HTMLElement): NodeInterface | null;
|
|
1661
|
+
focusNode(record: NodeInterface): void;
|
|
1662
|
+
private getRowRecord;
|
|
1663
|
+
private onViewClick;
|
|
1664
|
+
private onViewDblClick;
|
|
1665
|
+
private onViewContextMenu;
|
|
1666
|
+
private onKeyDown;
|
|
1667
|
+
markSelected(record: NodeInterface, selected: boolean): void;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* @framesquared/ui – TreePanel
|
|
1672
|
+
*
|
|
1673
|
+
* Main tree component. Extends Panel and uses TreeView for rendering.
|
|
1674
|
+
*/
|
|
1675
|
+
|
|
1676
|
+
interface TreePanelConfig extends PanelConfig {
|
|
1677
|
+
store: TreeStore;
|
|
1678
|
+
rootVisible?: boolean;
|
|
1679
|
+
displayField?: string;
|
|
1680
|
+
useArrows?: boolean;
|
|
1681
|
+
lines?: boolean;
|
|
1682
|
+
singleExpand?: boolean;
|
|
1683
|
+
checkable?: boolean;
|
|
1684
|
+
cascadeChecks?: boolean;
|
|
1685
|
+
}
|
|
1686
|
+
declare class TreePanel extends Panel {
|
|
1687
|
+
static $className: string;
|
|
1688
|
+
private _store;
|
|
1689
|
+
private _treeView;
|
|
1690
|
+
private _selModel;
|
|
1691
|
+
private _rootVisible;
|
|
1692
|
+
private _displayField;
|
|
1693
|
+
private _useArrows;
|
|
1694
|
+
private _lines;
|
|
1695
|
+
private _singleExpand;
|
|
1696
|
+
private _checkable;
|
|
1697
|
+
private _cascadeChecks;
|
|
1698
|
+
constructor(config: TreePanelConfig);
|
|
1699
|
+
protected initialize(): void;
|
|
1700
|
+
protected afterRender(): void;
|
|
1701
|
+
getStore(): TreeStore;
|
|
1702
|
+
getRootNode(): NodeInterface;
|
|
1703
|
+
expandAll(): void;
|
|
1704
|
+
collapseAll(): void;
|
|
1705
|
+
expandNode(node: NodeInterface, deep?: boolean): void;
|
|
1706
|
+
collapseNode(node: NodeInterface, deep?: boolean): void;
|
|
1707
|
+
private _collapseAllExcept;
|
|
1708
|
+
getSelection(): NodeInterface[];
|
|
1709
|
+
select(nodes: NodeInterface | NodeInterface[]): void;
|
|
1710
|
+
deselectAll(): void;
|
|
1711
|
+
getChecked(): NodeInterface[];
|
|
1712
|
+
getView(): TreeView;
|
|
1713
|
+
scrollToNode(node: NodeInterface): void;
|
|
1714
|
+
isRootVisible(): boolean;
|
|
1715
|
+
isCheckable(): boolean;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* @framesquared/ui – TreeSelectionModel
|
|
1720
|
+
*
|
|
1721
|
+
* Manages selection state for tree nodes, supporting single and multi-select modes.
|
|
1722
|
+
*/
|
|
1723
|
+
|
|
1724
|
+
interface TreeSelectionModelConfig {
|
|
1725
|
+
mode?: 'single' | 'multi' | 'simple';
|
|
1726
|
+
pruneRemoved?: boolean;
|
|
1727
|
+
}
|
|
1728
|
+
declare class TreeSelectionModel {
|
|
1729
|
+
private selected;
|
|
1730
|
+
private mode;
|
|
1731
|
+
private pruneRemoved;
|
|
1732
|
+
private listeners;
|
|
1733
|
+
constructor(config?: TreeSelectionModelConfig);
|
|
1734
|
+
on(event: string, fn: Function): void;
|
|
1735
|
+
un(event: string, fn: Function): void;
|
|
1736
|
+
fireEvent(event: string, ...args: unknown[]): void;
|
|
1737
|
+
select(records: NodeInterface | NodeInterface[], keepExisting?: boolean, suppressEvent?: boolean): void;
|
|
1738
|
+
deselect(records: NodeInterface | NodeInterface[], suppressEvent?: boolean): void;
|
|
1739
|
+
deselectAll(suppressEvent?: boolean): void;
|
|
1740
|
+
isSelected(record: NodeInterface): boolean;
|
|
1741
|
+
getSelection(): NodeInterface[];
|
|
1742
|
+
getCount(): number;
|
|
1743
|
+
selectNode(node: NodeInterface, keepExisting?: boolean, suppressEvent?: boolean): void;
|
|
1744
|
+
deselectNode(node: NodeInterface, suppressEvent?: boolean): void;
|
|
1745
|
+
isNodeSelected(node: NodeInterface): boolean;
|
|
1746
|
+
pruneRemovedNodes(removedNodes: NodeInterface[]): void;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* @framesquared/ui – CheckboxModel
|
|
1751
|
+
*
|
|
1752
|
+
* A selection model that adds checkbox-based check state management to tree nodes.
|
|
1753
|
+
*/
|
|
1754
|
+
|
|
1755
|
+
interface CheckboxModelConfig {
|
|
1756
|
+
cascadeChecks?: boolean;
|
|
1757
|
+
onlyLeafCheckable?: boolean;
|
|
1758
|
+
}
|
|
1759
|
+
declare class CheckboxModel extends TreeSelectionModel {
|
|
1760
|
+
private cascadeChecks;
|
|
1761
|
+
private onlyLeafCheckable;
|
|
1762
|
+
constructor(config?: CheckboxModelConfig);
|
|
1763
|
+
toggleCheck(node: NodeInterface): void;
|
|
1764
|
+
setChecked(node: NodeInterface, checked: boolean): void;
|
|
1765
|
+
getChecked(store: TreeStore): NodeInterface[];
|
|
1766
|
+
private updateParentCheck;
|
|
1767
|
+
isCheckable(node: NodeInterface): boolean;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* @framesquared/ui – TreeDragZone
|
|
1772
|
+
*
|
|
1773
|
+
* Drag source for tree nodes.
|
|
1774
|
+
*/
|
|
1775
|
+
|
|
1776
|
+
interface DragData {
|
|
1777
|
+
records: NodeInterface[];
|
|
1778
|
+
sourceTree: TreePanelLike;
|
|
1779
|
+
ddGroup: string;
|
|
1780
|
+
}
|
|
1781
|
+
/** Minimal interface TreeDragZone needs from TreePanel */
|
|
1782
|
+
interface TreePanelLike {
|
|
1783
|
+
getView(): {
|
|
1784
|
+
el: HTMLElement | null;
|
|
1785
|
+
};
|
|
1786
|
+
getSelection(): NodeInterface[];
|
|
1787
|
+
}
|
|
1788
|
+
declare class TreeDragZone {
|
|
1789
|
+
private tree;
|
|
1790
|
+
ddGroup: string;
|
|
1791
|
+
private dragging;
|
|
1792
|
+
private ghostEl;
|
|
1793
|
+
dragData: DragData | null;
|
|
1794
|
+
private startX;
|
|
1795
|
+
private startY;
|
|
1796
|
+
private dragThreshold;
|
|
1797
|
+
private boundPointerDown;
|
|
1798
|
+
private boundPointerMove;
|
|
1799
|
+
private boundPointerUp;
|
|
1800
|
+
constructor(tree: TreePanelLike, config?: {
|
|
1801
|
+
ddGroup?: string;
|
|
1802
|
+
});
|
|
1803
|
+
private init;
|
|
1804
|
+
private onPointerDown;
|
|
1805
|
+
private onPointerMove;
|
|
1806
|
+
private onPointerUp;
|
|
1807
|
+
private createGhost;
|
|
1808
|
+
private removeGhost;
|
|
1809
|
+
isDragging(): boolean;
|
|
1810
|
+
destroy(): void;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* @framesquared/ui – TreeDropZone
|
|
1815
|
+
*
|
|
1816
|
+
* Drop target for tree drag-and-drop.
|
|
1817
|
+
*/
|
|
1818
|
+
|
|
1819
|
+
declare class TreeDropZone {
|
|
1820
|
+
private tree;
|
|
1821
|
+
ddGroup: string;
|
|
1822
|
+
private appendOnly;
|
|
1823
|
+
private indicatorEl;
|
|
1824
|
+
private expandTimer;
|
|
1825
|
+
expandDelay: number;
|
|
1826
|
+
private boundDragOver;
|
|
1827
|
+
private boundDrop;
|
|
1828
|
+
constructor(tree: TreePanelLike & {
|
|
1829
|
+
getStore(): {
|
|
1830
|
+
insertBefore: Function;
|
|
1831
|
+
appendChild: Function;
|
|
1832
|
+
};
|
|
1833
|
+
}, config?: {
|
|
1834
|
+
ddGroup?: string;
|
|
1835
|
+
appendOnly?: boolean;
|
|
1836
|
+
sortOnDrop?: boolean;
|
|
1837
|
+
expandDelay?: number;
|
|
1838
|
+
});
|
|
1839
|
+
private init;
|
|
1840
|
+
getDropPosition(targetEl: HTMLElement, clientY: number): 'before' | 'after' | 'append';
|
|
1841
|
+
executeDrop(dragData: DragData, targetNode: NodeInterface, position: 'before' | 'after' | 'append'): void;
|
|
1842
|
+
private onDragOver;
|
|
1843
|
+
private onDrop;
|
|
1844
|
+
private clearExpandTimer;
|
|
1845
|
+
private removeIndicator;
|
|
1846
|
+
destroy(): void;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* @framesquared/ui – TreeViewDragDrop
|
|
1851
|
+
*
|
|
1852
|
+
* Plugin that wires TreeDragZone and TreeDropZone onto a TreePanel.
|
|
1853
|
+
*/
|
|
1854
|
+
|
|
1855
|
+
interface TreeViewDragDropConfig {
|
|
1856
|
+
enableDrag?: boolean;
|
|
1857
|
+
enableDrop?: boolean;
|
|
1858
|
+
ddGroup?: string;
|
|
1859
|
+
appendOnly?: boolean;
|
|
1860
|
+
sortOnDrop?: boolean;
|
|
1861
|
+
expandDelay?: number;
|
|
1862
|
+
allowParentInserts?: boolean;
|
|
1863
|
+
}
|
|
1864
|
+
type FullTreePanel = TreePanelLike & {
|
|
1865
|
+
getStore(): {
|
|
1866
|
+
insertBefore: Function;
|
|
1867
|
+
appendChild: Function;
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
declare class TreeViewDragDrop {
|
|
1871
|
+
private config;
|
|
1872
|
+
private dragZone;
|
|
1873
|
+
private dropZone;
|
|
1874
|
+
constructor(config?: TreeViewDragDropConfig);
|
|
1875
|
+
init(tree: FullTreePanel): void;
|
|
1876
|
+
getDragZone(): TreeDragZone | null;
|
|
1877
|
+
getDropZone(): TreeDropZone | null;
|
|
1878
|
+
destroy(): void;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* @framesquared/ui – CellEditingPlugin
|
|
1883
|
+
*
|
|
1884
|
+
* Simple in-place cell editing plugin for tree nodes.
|
|
1885
|
+
*/
|
|
1886
|
+
|
|
1887
|
+
interface CellEditingConfig {
|
|
1888
|
+
clicksToEdit?: number;
|
|
1889
|
+
}
|
|
1890
|
+
/** Minimal interface CellEditingPlugin needs from TreePanel */
|
|
1891
|
+
interface CellEditingTreePanel {
|
|
1892
|
+
on(event: string, fn: Function): void;
|
|
1893
|
+
getView(): {
|
|
1894
|
+
getNode(record: NodeInterface): HTMLElement | null;
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
declare class CellEditingPlugin {
|
|
1898
|
+
private tree;
|
|
1899
|
+
private config;
|
|
1900
|
+
private activeEditor;
|
|
1901
|
+
private editingNode;
|
|
1902
|
+
private field;
|
|
1903
|
+
constructor(config?: CellEditingConfig);
|
|
1904
|
+
init(tree: CellEditingTreePanel): void;
|
|
1905
|
+
startEdit(record: NodeInterface, fieldName?: string): void;
|
|
1906
|
+
completeEdit(): void;
|
|
1907
|
+
cancelEdit(): void;
|
|
1908
|
+
private cleanupEditor;
|
|
1909
|
+
isEditing(): boolean;
|
|
1910
|
+
destroy(): void;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
export { Accordion, type AccordionConfig, Breadcrumb, type BreadcrumbConfig, type BreadcrumbNode, type BreadcrumbStore, Button, type ButtonConfig, CardContainer, type CardContainerConfig, type CellEditingConfig, CellEditingPlugin, CheckItem, type CheckItemConfig, CheckboxModel, type CheckboxModelConfig, Column, type ColumnConfig, type ColumnStateEntry, CycleButton, type CycleButtonConfig, type CycleItem, DataView, type DataViewConfig, type DragData, type ElbowType, type ExportOptions, type FilterValue, type ListColumnConfig, ListView, type ListViewConfig, Menu, type MenuConfig, MenuItem, type MenuItemConfig, MenuManager, MenuSeparator, MessageBox, type MessageBoxConfig, PagingToolbar, type PagingToolbarConfig, Panel, type PanelConfig, QuickTip, SegmentedButton, type SegmentedButtonConfig, SplitButton, type SplitButtonConfig, type SummaryColumnConfig, type SummaryType, Tab, TabBar, type TabBarConfig, type TabConfig, TabPanel, type TabPanelConfig, type ToolConfig, Toolbar, type ToolbarConfig, ToolbarFill, ToolbarSeparator, ToolbarSpacer, ToolbarTextItem, Tooltip, type TooltipConfig, TreeColumn, type TreeColumnConfig, TreeDragZone, TreeDropZone, TreeGrid, TreeGridCellEditing, type TreeGridCellEditingConfig, TreeGridClipboard, type TreeGridClipboardConfig, TreeGridColumn, type TreeGridColumnConfig, type TreeGridConfig, TreeGridDragDrop, type TreeGridDragDropConfig, TreeGridExporter, TreeGridFilterPlugin, type TreeGridFilterPluginConfig, TreeGridGroupingSummary, type TreeGridGroupingSummaryConfig, TreeGridLockable, type TreeGridLockableConfig, TreeGridRowEditing, type TreeGridRowEditingConfig, TreeGridRowExpander, type TreeGridRowExpanderConfig, TreeGridSelectionModel, type TreeGridSelectionModelConfig, type TreeGridState, TreeGridStateMixin, TreeGridSummary, type TreeGridSummaryConfig, TreeGridView, type TreeGridViewConfig, TreePanel, type TreePanelConfig, type TreePanelLike, TreeSelectionModel, type TreeSelectionModelConfig, TreeView, type TreeViewConfig, TreeViewDragDrop, type TreeViewDragDropConfig, Viewport, type ViewportConfig, Window, type WindowConfig, ZIndexManager };
|