@jimka/typescript-ui 0.6.0 → 0.7.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/dist/lib/{AbstractInput-sRNPzWel.js → AbstractInput-W2PLJV5_.js} +2 -2
- package/dist/lib/{AbstractInput-sRNPzWel.js.map → AbstractInput-W2PLJV5_.js.map} +1 -1
- package/dist/lib/{Anchor-CwRhdP2J.js → Anchor-iZhsvMlT.js} +2 -2
- package/dist/lib/{Anchor-CwRhdP2J.js.map → Anchor-iZhsvMlT.js.map} +1 -1
- package/dist/lib/AnimatedDropdown-D0RhVgv3.js +2 -0
- package/dist/lib/AnimatedDropdown-D0RhVgv3.js.map +1 -0
- package/dist/lib/Border-6GsTNV-2.js +2 -0
- package/dist/lib/Border-6GsTNV-2.js.map +1 -0
- package/dist/lib/Button-CnFAiQuV.js +2 -0
- package/dist/lib/Button-CnFAiQuV.js.map +1 -0
- package/dist/lib/{Card-QYo27r5b.js → Card-C20k2YHU.js} +2 -2
- package/dist/lib/{Card-QYo27r5b.js.map → Card-C20k2YHU.js.map} +1 -1
- package/dist/lib/Checkbox-CM1z8keM.js +2 -0
- package/dist/lib/Checkbox-CM1z8keM.js.map +1 -0
- package/dist/lib/{CheckboxMenuRow-CesLhSnp.js → CheckboxMenuRow-C1h4LPHR.js} +2 -2
- package/dist/lib/{CheckboxMenuRow-CesLhSnp.js.map → CheckboxMenuRow-C1h4LPHR.js.map} +1 -1
- package/dist/lib/{CodeEditor-N1FQodcF.js → CodeEditor-CTL2WjF8.js} +2 -2
- package/dist/lib/{CodeEditor-N1FQodcF.js.map → CodeEditor-CTL2WjF8.js.map} +1 -1
- package/dist/lib/ComboBox-PZ5YPL0X.js +2 -0
- package/dist/lib/ComboBox-PZ5YPL0X.js.map +1 -0
- package/dist/lib/Component-D99-15Zt.js +2 -0
- package/dist/lib/Component-D99-15Zt.js.map +1 -0
- package/dist/lib/Container-FWRjgF6T.js +2 -0
- package/dist/lib/{Container-abY5Ww3W.js.map → Container-FWRjgF6T.js.map} +1 -1
- package/dist/lib/DOM-Cjh7_7TF.js +2 -0
- package/dist/lib/DOM-Cjh7_7TF.js.map +1 -0
- package/dist/lib/Dialog-DN78RaVH.js +2 -0
- package/dist/lib/Dialog-DN78RaVH.js.map +1 -0
- package/dist/lib/{FieldDecorator-BlYMfZ9L.js → FieldDecorator-DyPX8CFh.js} +2 -2
- package/dist/lib/{FieldDecorator-BlYMfZ9L.js.map → FieldDecorator-DyPX8CFh.js.map} +1 -1
- package/dist/lib/{Fit-BhlB-HAo.js → Fit-CaPMj7Up.js} +2 -2
- package/dist/lib/{Fit-BhlB-HAo.js.map → Fit-CaPMj7Up.js.map} +1 -1
- package/dist/lib/{FloatingPanel-DkJXsZ2D.js → FloatingPanel-Dsy_vJxi.js} +2 -2
- package/dist/lib/{FloatingPanel-DkJXsZ2D.js.map → FloatingPanel-Dsy_vJxi.js.map} +1 -1
- package/dist/lib/Glyph-DiEpD3gy.js +2 -0
- package/dist/lib/Glyph-DiEpD3gy.js.map +1 -0
- package/dist/lib/{Grid-Daiz7F5d.js → Grid-ft_UUpj8.js} +2 -2
- package/dist/lib/{Grid-Daiz7F5d.js.map → Grid-ft_UUpj8.js.map} +1 -1
- package/dist/lib/{GridConstraints-C58LuTqM.js → GridConstraints-CvZ0Nzaw.js} +2 -2
- package/dist/lib/{GridConstraints-C58LuTqM.js.map → GridConstraints-CvZ0Nzaw.js.map} +1 -1
- package/dist/lib/{Header-Dql3Zxc6.js → Header-Osm3IjDw.js} +2 -2
- package/dist/lib/{Header-Dql3Zxc6.js.map → Header-Osm3IjDw.js.map} +1 -1
- package/dist/lib/{IconText-PUjhTLlp.js → IconText-BBaYJ2Fx.js} +2 -2
- package/dist/lib/{IconText-PUjhTLlp.js.map → IconText-BBaYJ2Fx.js.map} +1 -1
- package/dist/lib/{LayoutSerialization-CMxunLfV.js → LayoutSerialization-BC64__O7.js} +2 -2
- package/dist/lib/{LayoutSerialization-CMxunLfV.js.map → LayoutSerialization-BC64__O7.js.map} +1 -1
- package/dist/lib/List-CQbZK_pT.js +2 -0
- package/dist/lib/List-CQbZK_pT.js.map +1 -0
- package/dist/lib/{Menu-Q0bpXXze.js → Menu-CwHluLGT.js} +2 -2
- package/dist/lib/{Menu-Q0bpXXze.js.map → Menu-CwHluLGT.js.map} +1 -1
- package/dist/lib/{MenuButton-DCXi0tsP.js → MenuButton-BqCT-1yv.js} +2 -2
- package/dist/lib/{MenuButton-DCXi0tsP.js.map → MenuButton-BqCT-1yv.js.map} +1 -1
- package/dist/lib/{OverlayFade-3pof2AJH.js → OverlayFade-CuEXgimf.js} +2 -2
- package/dist/lib/{OverlayFade-3pof2AJH.js.map → OverlayFade-CuEXgimf.js.map} +1 -1
- package/dist/lib/{Panel-Cy1pdlWO.js → Panel-CtViePqY.js} +2 -2
- package/dist/lib/{Panel-Cy1pdlWO.js.map → Panel-CtViePqY.js.map} +1 -1
- package/dist/lib/{Position-BwtxouxK.js → Position-BIEU1Eze.js} +2 -2
- package/dist/lib/Position-BIEU1Eze.js.map +1 -0
- package/dist/lib/{ProgressSpinner-DK8xEQ9y.js → ProgressSpinner-BuBvC1FY.js} +2 -2
- package/dist/lib/{ProgressSpinner-DK8xEQ9y.js.map → ProgressSpinner-BuBvC1FY.js.map} +1 -1
- package/dist/lib/RadioButton-Df5J-H6m.js +2 -0
- package/dist/lib/RadioButton-Df5J-H6m.js.map +1 -0
- package/dist/lib/RadioMenuRow-Cfv0x6Qj.js +2 -0
- package/dist/lib/RadioMenuRow-Cfv0x6Qj.js.map +1 -0
- package/dist/lib/{RovingTabIndex-pHEv5oLD.js → RovingTabIndex--w28AnXc.js} +2 -2
- package/dist/lib/{RovingTabIndex-pHEv5oLD.js.map → RovingTabIndex--w28AnXc.js.map} +1 -1
- package/dist/lib/Scrollbar-DcnueNJd.js +2 -0
- package/dist/lib/Scrollbar-DcnueNJd.js.map +1 -0
- package/dist/lib/SelectableText-DZNxjKXR.js +2 -0
- package/dist/lib/SelectableText-DZNxjKXR.js.map +1 -0
- package/dist/lib/{Slider-CTbwR6HR.js → Slider-DNfd8Lxz.js} +2 -2
- package/dist/lib/{Slider-CTbwR6HR.js.map → Slider-DNfd8Lxz.js.map} +1 -1
- package/dist/lib/{Spacer-srdN2d2b.js → Spacer-BznfGbwG.js} +2 -2
- package/dist/lib/{Spacer-srdN2d2b.js.map → Spacer-BznfGbwG.js.map} +1 -1
- package/dist/lib/TabButton-CAACsMov.js +2 -0
- package/dist/lib/TabButton-CAACsMov.js.map +1 -0
- package/dist/lib/{TabCloseButton-CY7BGitY.js → TabCloseButton-CCiqsX3y.js} +2 -2
- package/dist/lib/{TabCloseButton-CY7BGitY.js.map → TabCloseButton-CCiqsX3y.js.map} +1 -1
- package/dist/lib/Text-O-FWa5Cy.js +2 -0
- package/dist/lib/Text-O-FWa5Cy.js.map +1 -0
- package/dist/lib/{Tooltip-CUOJOqQi.js → Tooltip-CyICVu15.js} +2 -2
- package/dist/lib/Tooltip-CyICVu15.js.map +1 -0
- package/dist/lib/{Tree-C64JNPWJ.js → Tree-CSEguhlk.js} +2 -2
- package/dist/lib/{Tree-C64JNPWJ.js.map → Tree-CSEguhlk.js.map} +1 -1
- package/dist/lib/{VBox-DfJPWXqc.js → VBox-DVe4UXwX.js} +2 -2
- package/dist/lib/{VBox-DfJPWXqc.js.map → VBox-DVe4UXwX.js.map} +1 -1
- package/dist/lib/{VirtualScroller-DTIn19o1.js → VirtualScroller-ggPTCQb0.js} +2 -2
- package/dist/lib/{VirtualScroller-DTIn19o1.js.map → VirtualScroller-ggPTCQb0.js.map} +1 -1
- package/dist/lib/component/button.es.js +1 -1
- package/dist/lib/component/chart.es.js +1 -1
- package/dist/lib/component/chart.es.js.map +1 -1
- package/dist/lib/component/container.es.js +1 -1
- package/dist/lib/component/diagram.es.js +1 -1
- package/dist/lib/component/display.es.js +1 -1
- package/dist/lib/component/display.es.js.map +1 -1
- package/dist/lib/component/editor.es.js +2 -2
- package/dist/lib/component/editor.es.js.map +1 -1
- package/dist/lib/component/input.es.js +1 -1
- package/dist/lib/component/input.es.js.map +1 -1
- package/dist/lib/component/list.es.js +1 -1
- package/dist/lib/component/menubar.es.js +1 -1
- package/dist/lib/component/table.es.js +6 -6
- package/dist/lib/component/table.es.js.map +1 -1
- package/dist/lib/component/tree.es.js +1 -1
- package/dist/lib/core.es.js +1 -1
- package/dist/lib/core.es.js.map +1 -1
- package/dist/lib/glyphs/solid/index.es.js +1 -1
- package/dist/lib/layout.es.js +1 -1
- package/dist/lib/overlay.es.js +1 -1
- package/dist/lib/overlay.es.js.map +1 -1
- package/dist/lib/primitive.es.js +1 -1
- package/dist/lib/router.es.js +1 -1
- package/dist/lib/{selectionsEqual-gMG7gCVI.js → selectionsEqual-C7MrKMQr.js} +2 -2
- package/dist/lib/{selectionsEqual-gMG7gCVI.js.map → selectionsEqual-C7MrKMQr.js.map} +1 -1
- package/dist/lib/types/component/button/Button.d.ts +9 -0
- package/dist/lib/types/component/button/TabButton.d.ts +5 -0
- package/dist/lib/types/component/button/ToggleButton.d.ts +3 -0
- package/dist/lib/types/component/chart/AbstractChart.d.ts +2 -0
- package/dist/lib/types/component/display/Markdown.d.ts +2 -1
- package/dist/lib/types/component/input/AbstractCalendarDropdown.d.ts +2 -0
- package/dist/lib/types/component/input/AbstractPickerField.d.ts +2 -0
- package/dist/lib/types/component/input/AutoCompleteDropdown.d.ts +2 -0
- package/dist/lib/types/component/input/ComboBox.d.ts +3 -1
- package/dist/lib/types/component/input/Link.d.ts +2 -0
- package/dist/lib/types/component/input/PasswordField.d.ts +2 -0
- package/dist/lib/types/component/input/PickerInput.d.ts +2 -0
- package/dist/lib/types/component/input/SelectableText.d.ts +11 -0
- package/dist/lib/types/component/input/SpinButton.d.ts +2 -0
- package/dist/lib/types/component/input/Text.d.ts +16 -2
- package/dist/lib/types/component/input/TextArea.d.ts +2 -0
- package/dist/lib/types/component/input/TextField.d.ts +2 -0
- package/dist/lib/types/component/input/TextInput.d.ts +2 -0
- package/dist/lib/types/component/input/TimePickerDropdown.d.ts +3 -1
- package/dist/lib/types/component/input/UsernameField.d.ts +2 -0
- package/dist/lib/types/component/input/index.d.ts +2 -0
- package/dist/lib/types/component/list/AbstractSelectableList.d.ts +4 -2
- package/dist/lib/types/component/table/Body.d.ts +40 -14
- package/dist/lib/types/component/table/Header.d.ts +1 -1
- package/dist/lib/types/component/table/Row.d.ts +20 -2
- package/dist/lib/types/component/table/Table.d.ts +2 -0
- package/dist/lib/types/component/table/TableExporter.d.ts +3 -0
- package/dist/lib/types/component/table/TablePanel.d.ts +1 -0
- package/dist/lib/types/component/table/TreeTablePanel.d.ts +1 -0
- package/dist/lib/types/component/table/cell/Cell.d.ts +7 -2
- package/dist/lib/types/component/table/cell/Default.d.ts +1 -1
- package/dist/lib/types/component/table/cell/Header.d.ts +3 -0
- package/dist/lib/types/component/table/cell/ResizeHandle.d.ts +1 -1
- package/dist/lib/types/component/table/cell/renderer/CellRenderer.d.ts +2 -2
- package/dist/lib/types/component/table/cell/renderer/String.d.ts +3 -1
- package/dist/lib/types/component/table/index.d.ts +1 -1
- package/dist/lib/types/core/AnimatedDropdown.d.ts +2 -0
- package/dist/lib/types/core/ClassStyleRules.d.ts +46 -3
- package/dist/lib/types/core/Component.d.ts +30 -2
- package/dist/lib/types/core/DOM.d.ts +5 -1
- package/dist/lib/types/core/LayerManager.d.ts +1 -0
- package/dist/lib/types/core/StyleTarget.d.ts +2 -0
- package/dist/lib/types/core/Theme.d.ts +1 -0
- package/dist/lib/types/core/Util.d.ts +4 -0
- package/dist/lib/types/core/index.d.ts +1 -1
- package/dist/lib/types/layout/Table.d.ts +2 -0
- package/dist/lib/types/overlay/AbstractWindow.d.ts +3 -0
- package/dist/lib/types/overlay/PopupPanel.d.ts +2 -0
- package/dist/lib/validation.es.js +1 -1
- package/package.json +1 -1
- package/dist/lib/AnimatedDropdown-H3Rh-YMZ.js +0 -2
- package/dist/lib/AnimatedDropdown-H3Rh-YMZ.js.map +0 -1
- package/dist/lib/Border-0DJFDiij.js +0 -2
- package/dist/lib/Border-0DJFDiij.js.map +0 -1
- package/dist/lib/Button-MpMIYBYJ.js +0 -2
- package/dist/lib/Button-MpMIYBYJ.js.map +0 -1
- package/dist/lib/Checkbox-D0JYK-wc.js +0 -2
- package/dist/lib/Checkbox-D0JYK-wc.js.map +0 -1
- package/dist/lib/ComboBox-Dx8Tk9yg.js +0 -2
- package/dist/lib/ComboBox-Dx8Tk9yg.js.map +0 -1
- package/dist/lib/Component-B0ShfPVi.js +0 -2
- package/dist/lib/Component-B0ShfPVi.js.map +0 -1
- package/dist/lib/Container-abY5Ww3W.js +0 -2
- package/dist/lib/DOM-C-Edb3tA.js +0 -2
- package/dist/lib/DOM-C-Edb3tA.js.map +0 -1
- package/dist/lib/Dialog-cbA9V17e.js +0 -2
- package/dist/lib/Dialog-cbA9V17e.js.map +0 -1
- package/dist/lib/Glyph-_VeBacS2.js +0 -2
- package/dist/lib/Glyph-_VeBacS2.js.map +0 -1
- package/dist/lib/List-nx8220Fi.js +0 -2
- package/dist/lib/List-nx8220Fi.js.map +0 -1
- package/dist/lib/Position-BwtxouxK.js.map +0 -1
- package/dist/lib/RadioButton-BEwpqg1k.js +0 -2
- package/dist/lib/RadioButton-BEwpqg1k.js.map +0 -1
- package/dist/lib/RadioMenuRow-DP5qPyFR.js +0 -2
- package/dist/lib/RadioMenuRow-DP5qPyFR.js.map +0 -1
- package/dist/lib/Scrollbar-t8fFrUVQ.js +0 -2
- package/dist/lib/Scrollbar-t8fFrUVQ.js.map +0 -1
- package/dist/lib/TabButton-DLoMQzky.js +0 -2
- package/dist/lib/TabButton-DLoMQzky.js.map +0 -1
- package/dist/lib/Text-CMKnK9uB.js +0 -2
- package/dist/lib/Text-CMKnK9uB.js.map +0 -1
- package/dist/lib/Tooltip-CUOJOqQi.js.map +0 -1
- package/dist/lib/types/component/table/CellGeometry.d.ts +0 -6
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractInput, AbstractInputOptions } from "../../component/input/AbstractInput.js";
|
|
2
|
-
import { Component } from "../../core/Component.js";
|
|
2
|
+
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
3
3
|
import type { Handle } from "../../core/DOM.js";
|
|
4
4
|
import { Panel } from "../../core/Panel.js";
|
|
5
5
|
import { Event } from "../../core/Event.js";
|
|
6
6
|
import { AbstractStore } from "../../data/AbstractStore.js";
|
|
7
7
|
import { ModelRecord } from "../../data/ModelRecord.js";
|
|
8
8
|
import { ListItemRenderer } from "../../component/list/ListItemRenderer.js";
|
|
9
|
+
import { type ClassStyleDefaults } from "../../core/ClassStyleRules.js";
|
|
9
10
|
export interface SelectableListItem {
|
|
10
11
|
key: string;
|
|
11
12
|
label: string;
|
|
@@ -37,7 +38,7 @@ declare class SelectableListRow extends Component {
|
|
|
37
38
|
private readonly _handlers;
|
|
38
39
|
private _tooltipAttached;
|
|
39
40
|
private _renderer;
|
|
40
|
-
constructor(handlers: RowHandlers, index: number, rendererFactory: () => ListItemRenderer);
|
|
41
|
+
constructor(handlers: RowHandlers, index: number, rendererFactory: () => ListItemRenderer, subclassDefaults?: Partial<ComponentOptions>);
|
|
41
42
|
updateItem(item: SelectableListItem, index: number): this;
|
|
42
43
|
private applyTooltip;
|
|
43
44
|
getNaturalWidth(): number;
|
|
@@ -63,6 +64,7 @@ interface RowHandlers {
|
|
|
63
64
|
onDblClick: (index: number, event: MouseEvent) => void;
|
|
64
65
|
}
|
|
65
66
|
declare abstract class AbstractSelectableList<TValue, TOptions extends AbstractSelectableListOptions = AbstractSelectableListOptions> extends AbstractInput<TValue, TOptions> {
|
|
67
|
+
protected static readonly ownClassStyleDefaults: ClassStyleDefaults;
|
|
66
68
|
protected _items: Array<SelectableListItem>;
|
|
67
69
|
protected _rowPool: Array<SelectableListRow>;
|
|
68
70
|
protected _selectedSet: Set<number>;
|
|
@@ -3,13 +3,14 @@ import type { Handle } from "../../core/DOM.js";
|
|
|
3
3
|
import { AbstractStore } from "../../data/AbstractStore.js";
|
|
4
4
|
import { ModelRecord } from "../../data/ModelRecord.js";
|
|
5
5
|
import { Row } from "../../component/table/Row.js";
|
|
6
|
+
import type { ColumnWindowSlidePlan } from "../../component/table/Row.js";
|
|
6
7
|
import { CellEditorPool } from "../../component/table/cell/editor/CellEditorPool.js";
|
|
7
8
|
import { Event } from "../../core/Event.js";
|
|
8
9
|
import { VirtualRowView } from "../../component/shared/VirtualRowView.js";
|
|
9
10
|
import type { ColumnConfig } from "../../component/table/ColumnConfig.js";
|
|
10
11
|
import { Column } from "../../component/table/Column.js";
|
|
11
12
|
import type { TableHeader } from "../../component/table/Header.js";
|
|
12
|
-
export type BodyEvent = "verticalscroll" | "horizontalscroll" | "selection" | "cellclick";
|
|
13
|
+
export type BodyEvent = "verticalscroll" | "horizontalscroll" | "selection" | "cellclick" | "cellcontextmenu";
|
|
13
14
|
export interface CellClickEvent {
|
|
14
15
|
record: ModelRecord;
|
|
15
16
|
field: string;
|
|
@@ -18,6 +19,19 @@ export interface CellClickEvent {
|
|
|
18
19
|
rowIndex: number;
|
|
19
20
|
event: MouseEvent;
|
|
20
21
|
}
|
|
22
|
+
export interface BodyViewState {
|
|
23
|
+
store: AbstractStore;
|
|
24
|
+
columns: Column[];
|
|
25
|
+
columnConfigs: Map<string, ColumnConfig>;
|
|
26
|
+
hiddenColumns: Set<string>;
|
|
27
|
+
rowReadOnly: ((record: ModelRecord) => boolean) | null;
|
|
28
|
+
rowVisible: ((record: ModelRecord) => boolean) | null;
|
|
29
|
+
rowSeparator: ((record: ModelRecord) => {
|
|
30
|
+
label: string;
|
|
31
|
+
color: string | null;
|
|
32
|
+
} | null) | null;
|
|
33
|
+
rowIndented: ((record: ModelRecord) => boolean) | null;
|
|
34
|
+
}
|
|
21
35
|
export declare function resolveClickedColumn(cells: Component[], target: Handle | null): number;
|
|
22
36
|
export interface ColumnWindow {
|
|
23
37
|
firstCol: number;
|
|
@@ -26,13 +40,6 @@ export interface ColumnWindow {
|
|
|
26
40
|
lefts: number[];
|
|
27
41
|
}
|
|
28
42
|
export declare function computeColumnWindow(widths: number[], scrollX: number, viewportWidth: number): ColumnWindow;
|
|
29
|
-
export declare function buildTsv(rows: string[][], startRow: number, startCol: number, startOffset: number | null, endRow: number, endCol: number, endOffset: number | null): string;
|
|
30
|
-
export declare function locateCellInGrid(grid: Array<Array<{
|
|
31
|
-
element: Handle;
|
|
32
|
-
}>>, target: Handle): {
|
|
33
|
-
row: number;
|
|
34
|
-
col: number;
|
|
35
|
-
} | null;
|
|
36
43
|
declare class Body extends VirtualRowView<Row> {
|
|
37
44
|
private _store;
|
|
38
45
|
private _hiddenColumns;
|
|
@@ -42,7 +49,6 @@ declare class Body extends VirtualRowView<Row> {
|
|
|
42
49
|
private _rowVisible;
|
|
43
50
|
private _rowSeparator;
|
|
44
51
|
private _rowIndented;
|
|
45
|
-
private _cellGeom;
|
|
46
52
|
private _lastBodyWidth;
|
|
47
53
|
private _lastColumnWidths;
|
|
48
54
|
private _lastAriaRowCount;
|
|
@@ -53,6 +59,10 @@ declare class Body extends VirtualRowView<Row> {
|
|
|
53
59
|
private _selectedRecords;
|
|
54
60
|
private _anchorRecord;
|
|
55
61
|
private _focusedColIndex;
|
|
62
|
+
private _rangeAnchor;
|
|
63
|
+
private _rangeFocus;
|
|
64
|
+
private _contextMenuCell;
|
|
65
|
+
private _cellText;
|
|
56
66
|
private _editorPool;
|
|
57
67
|
private _header;
|
|
58
68
|
private _listeners;
|
|
@@ -65,6 +75,7 @@ declare class Body extends VirtualRowView<Row> {
|
|
|
65
75
|
private bindStore;
|
|
66
76
|
protected onStoreChange(): void;
|
|
67
77
|
protected getVisibleRecords(): ModelRecord[];
|
|
78
|
+
private computeVisibleFields;
|
|
68
79
|
protected createRow(): Row;
|
|
69
80
|
protected getTreeFieldName(): string | undefined;
|
|
70
81
|
protected computeRowAria(row: Row, dataIndex: number): void;
|
|
@@ -74,8 +85,8 @@ declare class Body extends VirtualRowView<Row> {
|
|
|
74
85
|
protected getHiddenColumns(): Set<string>;
|
|
75
86
|
protected getColumnConfigs(): Map<string, ColumnConfig>;
|
|
76
87
|
protected getRowPool(): Row[];
|
|
77
|
-
protected invalidateGeom(): void;
|
|
78
88
|
setHiddenColumns(hidden: Set<string>): this;
|
|
89
|
+
private filterUnhideable;
|
|
79
90
|
setColumns(columns: Column[]): this;
|
|
80
91
|
setRowReadOnly(predicate: ((record: ModelRecord) => boolean) | null): this;
|
|
81
92
|
setRowSeparator(predicate: ((record: ModelRecord) => {
|
|
@@ -88,6 +99,8 @@ declare class Body extends VirtualRowView<Row> {
|
|
|
88
99
|
private registerComboEditors;
|
|
89
100
|
private syncPoolCells;
|
|
90
101
|
setStore(store: AbstractStore): this;
|
|
102
|
+
private rebindStore;
|
|
103
|
+
bindViewState(state: BodyViewState): this;
|
|
91
104
|
protected init(element?: Handle): this;
|
|
92
105
|
protected onScrollerTick(): void;
|
|
93
106
|
private onFocus;
|
|
@@ -95,15 +108,26 @@ declare class Body extends VirtualRowView<Row> {
|
|
|
95
108
|
protected destructor(): void;
|
|
96
109
|
doLayout(): this;
|
|
97
110
|
renderWindow(bodyWidth?: number, columnWidths?: number[]): void;
|
|
111
|
+
private computeColumnWindowSlidePlan;
|
|
98
112
|
private renderWindowPass;
|
|
99
113
|
private updateColumnWidthCache;
|
|
100
114
|
private commitEditsOutsideWindow;
|
|
101
|
-
protected bindAndPositionRows(firstRow: number, windowSize: number, rowWidth: number, records: ModelRecord[], columns: ColumnWindow): void;
|
|
115
|
+
protected bindAndPositionRows(firstRow: number, windowSize: number, rowWidth: number, records: ModelRecord[], columns: ColumnWindow, slidePlan?: ColumnWindowSlidePlan): void;
|
|
102
116
|
protected onSubtreeClick(e: MouseEvent): void;
|
|
103
117
|
private onRowClick;
|
|
104
|
-
private
|
|
105
|
-
private
|
|
106
|
-
private
|
|
118
|
+
private locateCellFromTarget;
|
|
119
|
+
private getCellRangeBounds;
|
|
120
|
+
private isCellWithinBounds;
|
|
121
|
+
private refreshCellRangeHighlight;
|
|
122
|
+
private updateCellRangeVisualState;
|
|
123
|
+
private buildCopyText;
|
|
124
|
+
copySelectionToClipboard(): void;
|
|
125
|
+
copyContextMenuSelection(): void;
|
|
126
|
+
protected onCellMouseDown(e: MouseEvent): void;
|
|
127
|
+
protected onCellDragMove(e: MouseEvent): Event.ListenerResult;
|
|
128
|
+
protected onCellDragEnd(): Event.ListenerResult;
|
|
129
|
+
private onCellDragSelectStart;
|
|
130
|
+
protected onCellContextMenu(e: MouseEvent): Event.ListenerResult;
|
|
107
131
|
selectRecord(record: ModelRecord | null): void;
|
|
108
132
|
getSelectedRecord(): ModelRecord | null;
|
|
109
133
|
getSelectedRecords(): ModelRecord[];
|
|
@@ -112,10 +136,12 @@ declare class Body extends VirtualRowView<Row> {
|
|
|
112
136
|
on(event: "horizontalscroll", listener: (scrollLeft: number) => void): this;
|
|
113
137
|
on(event: "selection", listener: (records: ModelRecord[]) => void): this;
|
|
114
138
|
on(event: "cellclick", listener: (e: CellClickEvent) => void): this;
|
|
139
|
+
on(event: "cellcontextmenu", listener: (x: number, y: number) => void): this;
|
|
115
140
|
off(event: BodyEvent, listener: Function): this;
|
|
116
141
|
protected emit(event: "verticalscroll" | "horizontalscroll", offset: number): void;
|
|
117
142
|
protected emit(event: "selection", records: ModelRecord[]): void;
|
|
118
143
|
protected emit(event: "cellclick", detail: CellClickEvent): void;
|
|
144
|
+
protected emit(event: "cellcontextmenu", x: number, y: number): void;
|
|
119
145
|
private notifySelectionChange;
|
|
120
146
|
scrollToRecord(record: ModelRecord): void;
|
|
121
147
|
private applyReadOnlyState;
|
|
@@ -27,7 +27,6 @@ declare class TableHeader extends Component {
|
|
|
27
27
|
private _focusedCol;
|
|
28
28
|
private _columnsDirty;
|
|
29
29
|
private _geometry;
|
|
30
|
-
private _cellGeom;
|
|
31
30
|
private _filterRowVisible;
|
|
32
31
|
private _filterStates;
|
|
33
32
|
private _filterCellsDirty;
|
|
@@ -80,6 +79,7 @@ declare class TableHeader extends Component {
|
|
|
80
79
|
private wireFilterCell;
|
|
81
80
|
private reconcileFilterCells;
|
|
82
81
|
renderColumnWindow(geometry?: HeaderColumnGeometry): this;
|
|
82
|
+
private invalidateCellLayouts;
|
|
83
83
|
private positionFilterCells;
|
|
84
84
|
private positionColumnCells;
|
|
85
85
|
private positionParentCells;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { Component } from "../../core/Component.js";
|
|
2
2
|
import { AbstractModel } from "../../data/AbstractModel.js";
|
|
3
|
+
import { Field } from "../../data/Field.js";
|
|
3
4
|
import { ModelRecord } from "../../data/ModelRecord.js";
|
|
4
5
|
import { Cell } from "../../component/table/cell/Cell.js";
|
|
5
6
|
import type { ColumnConfig } from "../../component/table/ColumnConfig.js";
|
|
6
7
|
import { LayoutConstraints } from "../../layout/LayoutConstraints.js";
|
|
8
|
+
export interface ColumnWindowSlidePlan {
|
|
9
|
+
prevFirstCol: number;
|
|
10
|
+
prevLastCol: number;
|
|
11
|
+
delta: number;
|
|
12
|
+
enteringKeys: Map<number, string>;
|
|
13
|
+
}
|
|
14
|
+
export interface RetargetedCell {
|
|
15
|
+
cell: Cell<any>;
|
|
16
|
+
fieldName: string;
|
|
17
|
+
}
|
|
7
18
|
declare class Row extends Component {
|
|
8
19
|
private _model?;
|
|
9
20
|
private _data?;
|
|
@@ -16,12 +27,15 @@ declare class Row extends Component {
|
|
|
16
27
|
private _windowFirst;
|
|
17
28
|
private _cellKeys;
|
|
18
29
|
private _fieldNames;
|
|
30
|
+
private _cellCache;
|
|
31
|
+
private _lastRetargeted;
|
|
19
32
|
private _columnsDirty;
|
|
20
33
|
private _separatorMode;
|
|
21
34
|
constructor(model?: AbstractModel, data?: ModelRecord, hiddenColumns?: Set<string>, columnConfigs?: Map<string, ColumnConfig>, onCellCommit?: (record: ModelRecord) => void, treeFieldName?: string);
|
|
22
35
|
getTreeCell(): Cell<any> | null;
|
|
23
36
|
getColumnWindowStart(): number;
|
|
24
37
|
getFieldNames(): string[];
|
|
38
|
+
getRetargetedCells(): RetargetedCell[];
|
|
25
39
|
isSeparator(): boolean;
|
|
26
40
|
setFieldIndent(indented: boolean): void;
|
|
27
41
|
getData(): ModelRecord | undefined;
|
|
@@ -32,13 +46,17 @@ declare class Row extends Component {
|
|
|
32
46
|
addComponent(cell: Cell<any>, constraints?: LayoutConstraints): this;
|
|
33
47
|
setColumnFields(model: AbstractModel, hiddenColumns: Set<string>, columnConfigs: Map<string, ColumnConfig>, treeFieldName?: string): this;
|
|
34
48
|
renderSeparator(label: string, color: string | null): void;
|
|
35
|
-
setColumnWindow(firstCol: number, lastCol: number): boolean;
|
|
49
|
+
setColumnWindow(firstCol: number, lastCol: number, plan?: ColumnWindowSlidePlan): boolean;
|
|
50
|
+
private reconcileWindowSlide;
|
|
36
51
|
private commitCellValue;
|
|
37
|
-
|
|
52
|
+
static cellKey(field: Field, config: ColumnConfig | undefined, isTreeColumn: boolean): string;
|
|
38
53
|
private cellKeyFor;
|
|
39
54
|
private bindCell;
|
|
40
55
|
private static createCellForField;
|
|
56
|
+
private retireCell;
|
|
57
|
+
private disposeCellCache;
|
|
41
58
|
doLayout(): this;
|
|
59
|
+
protected destructor(): void;
|
|
42
60
|
}
|
|
43
61
|
declare const RowCallable: import("../../core/Callable.js").Callable<typeof Row>;
|
|
44
62
|
type RowCallable = Row;
|
|
@@ -109,6 +109,7 @@ declare class Table extends Component<TableOptions> {
|
|
|
109
109
|
private bindView;
|
|
110
110
|
protected destructor(): void;
|
|
111
111
|
private showColumnMenu;
|
|
112
|
+
private showCellMenu;
|
|
112
113
|
private columnsInMenuOrder;
|
|
113
114
|
private buildColumnMenuItems;
|
|
114
115
|
private showColumnDialog;
|
|
@@ -119,6 +120,7 @@ declare class Table extends Component<TableOptions> {
|
|
|
119
120
|
setExportMenuEnabled(enabled: boolean): this;
|
|
120
121
|
exportCSV(options?: ExportOptions): void;
|
|
121
122
|
exportJSON(options?: ExportOptions): void;
|
|
123
|
+
exportTSV(options?: ExportOptions): void;
|
|
122
124
|
private getExportColumns;
|
|
123
125
|
getCellText(field: string, record: ModelRecord): string;
|
|
124
126
|
private onColumnResizeStart;
|
|
@@ -9,7 +9,10 @@ export interface ExportOptions {
|
|
|
9
9
|
export declare class TableExporter {
|
|
10
10
|
static exportCSV(columns: Column[], records: ModelRecord[], columnConfigs: Map<string, ColumnConfig>, display: CellTextResolver, options?: ExportOptions): void;
|
|
11
11
|
static exportJSON(columns: Column[], records: ModelRecord[], columnConfigs: Map<string, ColumnConfig>, display: CellTextResolver, options?: ExportOptions): void;
|
|
12
|
+
static exportTSV(columns: Column[], records: ModelRecord[], columnConfigs: Map<string, ColumnConfig>, display: CellTextResolver, options?: ExportOptions): void;
|
|
12
13
|
static formatValue(column: Column, value: any, columnConfigs: Map<string, ColumnConfig>, display: CellTextResolver): any;
|
|
13
14
|
private static escapeCSVField;
|
|
15
|
+
static buildRectangularTSV(rows: string[][]): string;
|
|
16
|
+
private static escapeTSVField;
|
|
14
17
|
private static download;
|
|
15
18
|
}
|
|
@@ -19,6 +19,7 @@ declare class TablePanel extends Container {
|
|
|
19
19
|
setExportMenuEnabled(enabled: boolean): this;
|
|
20
20
|
exportCSV(options?: ExportOptions): void;
|
|
21
21
|
exportJSON(options?: ExportOptions): void;
|
|
22
|
+
exportTSV(options?: ExportOptions): void;
|
|
22
23
|
setPaginationBar(bar: PaginationBar): this;
|
|
23
24
|
getPaginationBar(): PaginationBar | undefined;
|
|
24
25
|
}
|
|
@@ -20,6 +20,7 @@ declare class TreeTablePanel extends Container {
|
|
|
20
20
|
setExportMenuEnabled(enabled: boolean): this;
|
|
21
21
|
exportCSV(options?: ExportOptions): void;
|
|
22
22
|
exportJSON(options?: ExportOptions): void;
|
|
23
|
+
exportTSV(options?: ExportOptions): void;
|
|
23
24
|
setPaginationBar(bar: PaginationBar): this;
|
|
24
25
|
getPaginationBar(): PaginationBar | undefined;
|
|
25
26
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Component } from "../../../core/Component.js";
|
|
1
|
+
import { Component, ComponentOptions } from "../../../core/Component.js";
|
|
2
|
+
import type { ClassStyleDefaults } from "../../../core/ClassStyleRules.js";
|
|
2
3
|
import { ListenerBag } from "../../../core/ListenerBag.js";
|
|
3
4
|
import { Card } from "../../../layout/Card.js";
|
|
4
5
|
import { CellRenderer } from "../../../component/table/cell/renderer/CellRenderer.js";
|
|
@@ -8,8 +9,10 @@ import { CellEditorPool } from "../../../component/table/cell/editor/CellEditorP
|
|
|
8
9
|
import { LayoutConstraints } from "../../../layout/LayoutConstraints.js";
|
|
9
10
|
export type CellEvent = "commit" | "editend";
|
|
10
11
|
export declare class Cell<T> extends Component {
|
|
12
|
+
protected static readonly ownClassStyleDefaults: ClassStyleDefaults;
|
|
11
13
|
private _readOnly;
|
|
12
14
|
private _requiredEmpty;
|
|
15
|
+
private _rangeSelected;
|
|
13
16
|
private _baseBackground;
|
|
14
17
|
private _renderer;
|
|
15
18
|
private _editor;
|
|
@@ -17,8 +20,9 @@ export declare class Cell<T> extends Component {
|
|
|
17
20
|
private _scrollIntoView;
|
|
18
21
|
protected _activeEditor: CellEditor<T> | null;
|
|
19
22
|
protected _listeners: ListenerBag<string>;
|
|
20
|
-
constructor(tag: string, renderer: CellRenderer<T>, editor?: CellEditor<T>, rendererConstraints?: LayoutConstraints, editorContraints?: LayoutConstraints);
|
|
23
|
+
constructor(tag: string, renderer: CellRenderer<T>, editor?: CellEditor<T>, rendererConstraints?: LayoutConstraints, editorContraints?: LayoutConstraints, subclassDefaults?: Partial<ComponentOptions>);
|
|
21
24
|
protected clampsToContentSize(): boolean;
|
|
25
|
+
protected canSkipUnchangedLayout(): boolean;
|
|
22
26
|
getEditorKey(): string | null;
|
|
23
27
|
setEditorPool(pool: CellEditorPool | null): this;
|
|
24
28
|
setScrollIntoViewHandler(handler: (() => void) | null): this;
|
|
@@ -30,6 +34,7 @@ export declare class Cell<T> extends Component {
|
|
|
30
34
|
isReadOnly(): boolean;
|
|
31
35
|
setReadOnly(value: boolean): this;
|
|
32
36
|
setRequiredEmpty(value: boolean): this;
|
|
37
|
+
setRangeSelected(value: boolean): this;
|
|
33
38
|
setBaseBackground(color: string | null): this;
|
|
34
39
|
private _applyStateTint;
|
|
35
40
|
onKeyDown(evnt: CustomEvent<ForwardedKeyDetail>): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StringRenderer } from "../../../component/table/cell/renderer/String.js";
|
|
2
2
|
import { Cell } from "../../../component/table/cell/Cell.js";
|
|
3
3
|
declare class DefaultCell extends Cell<String | null> {
|
|
4
|
-
constructor(tag?: string);
|
|
4
|
+
constructor(tag?: string, renderer?: StringRenderer);
|
|
5
5
|
getRenderer(): StringRenderer;
|
|
6
6
|
setValue(value: String | null): this;
|
|
7
7
|
}
|
|
@@ -14,6 +14,9 @@ declare class HeaderCell extends DefaultCell {
|
|
|
14
14
|
private _headerGlyphInstance;
|
|
15
15
|
private _columnFocused;
|
|
16
16
|
private _required;
|
|
17
|
+
private _activeStyleRule?;
|
|
18
|
+
private get activeStyleRule();
|
|
19
|
+
protected getRestingExclusionSuffixes(): readonly string[];
|
|
17
20
|
constructor(text: String, fieldName: string, headerGlyph?: string | null);
|
|
18
21
|
protected init(element?: Handle): this;
|
|
19
22
|
setFieldName(name: string): this;
|
|
@@ -11,7 +11,7 @@ interface ResizeHandleOptions extends ComponentOptions {
|
|
|
11
11
|
declare const RESIZE_HANDLE_CURSOR = "var(--ts-ui-table-resize-handle-cursor, ew-resize)";
|
|
12
12
|
declare class ResizeHandle extends Component<ResizeHandleOptions> {
|
|
13
13
|
private _listeners;
|
|
14
|
-
constructor(options?: ResizeHandleOptions);
|
|
14
|
+
constructor(options?: ResizeHandleOptions, subclassDefaults?: Partial<ComponentOptions>);
|
|
15
15
|
protected init(element?: Handle): this;
|
|
16
16
|
on(event: "dragstart", listener: (e: MouseEvent) => void): this;
|
|
17
17
|
on(event: "dragmove", listener: (clientX: number) => void): this;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component } from "../../../../core/Component.js";
|
|
1
|
+
import { Component, ComponentOptions } from "../../../../core/Component.js";
|
|
2
2
|
export declare abstract class CellRenderer<T> extends Component {
|
|
3
|
-
constructor();
|
|
3
|
+
constructor(subclassDefaults?: Partial<ComponentOptions>);
|
|
4
4
|
abstract getValue(): T;
|
|
5
5
|
abstract setValue(t: T): void;
|
|
6
6
|
getContentX(): number;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CellRenderer } from "../../../../component/table/cell/renderer/CellRenderer.js";
|
|
2
|
+
import { ComponentOptions } from "../../../../core/Component.js";
|
|
2
3
|
import { Text } from "../../../../component/input/Text.js";
|
|
3
4
|
declare class StringRenderer extends CellRenderer<String | null> {
|
|
4
5
|
private _text;
|
|
5
6
|
private _value;
|
|
6
7
|
private _display;
|
|
7
|
-
constructor();
|
|
8
|
+
constructor(subclassDefaults?: Partial<ComponentOptions>);
|
|
9
|
+
protected createText(): Text;
|
|
8
10
|
getText(): Text;
|
|
9
11
|
getValue(): String | null;
|
|
10
12
|
setValue(value: String | null): this;
|
|
@@ -14,7 +14,7 @@ export type { ExportOptions } from '../../component/table/TableExporter.js';
|
|
|
14
14
|
export { TableHeader } from '../../component/table/Header.js';
|
|
15
15
|
export type { TableHeaderEvent, HeaderColumnGeometry } from '../../component/table/Header.js';
|
|
16
16
|
export { Body } from '../../component/table/Body.js';
|
|
17
|
-
export type { BodyEvent, CellClickEvent } from '../../component/table/Body.js';
|
|
17
|
+
export type { BodyEvent, CellClickEvent, BodyViewState } from '../../component/table/Body.js';
|
|
18
18
|
export { TreeBody } from '../../component/table/TreeBody.js';
|
|
19
19
|
export type { FlatRecord, TreeBodySpec } from '../../component/table/TreeBody.js';
|
|
20
20
|
export { FooterRow } from '../../component/table/Footer.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../core/Component.js";
|
|
2
|
+
import type { ClassStyleDefaults } from "../core/ClassStyleRules.js";
|
|
2
3
|
import { DismissableLayer, LayerDismissMode } from "../core/LayerManager.js";
|
|
3
4
|
import { type Rect, type Handle } from "../core/DOM.js";
|
|
4
5
|
export interface AnimatedDropdownOptions extends ComponentOptions {
|
|
@@ -7,6 +8,7 @@ export interface AnimatedDropdownOptions extends ComponentOptions {
|
|
|
7
8
|
translatePx?: number;
|
|
8
9
|
}
|
|
9
10
|
declare class AnimatedDropdown<TOptions extends AnimatedDropdownOptions = AnimatedDropdownOptions> extends Component<TOptions> implements DismissableLayer {
|
|
11
|
+
protected static readonly ownClassStyleDefaults: ClassStyleDefaults;
|
|
10
12
|
private _dismissing;
|
|
11
13
|
private _open;
|
|
12
14
|
private _closeHandler;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { StyleRule } from "../core/StyleTarget.js";
|
|
2
|
+
import { type BorderOptions } from "../primitive/Border.js";
|
|
1
3
|
export declare const COMPONENT_CLASS = "ts-ui-component";
|
|
2
|
-
interface ClassStyleDefaults {
|
|
4
|
+
export interface ClassStyleDefaults {
|
|
3
5
|
visible?: boolean | null;
|
|
4
6
|
displayed?: boolean;
|
|
5
7
|
minSize?: {
|
|
@@ -12,7 +14,48 @@ interface ClassStyleDefaults {
|
|
|
12
14
|
} | null;
|
|
13
15
|
overflow?: string | null;
|
|
14
16
|
cursor?: string | null;
|
|
17
|
+
userSelect?: string | null;
|
|
18
|
+
outline?: string | null;
|
|
19
|
+
foregroundColor?: string | null;
|
|
20
|
+
font?: TextClassStyleDefaults | null;
|
|
21
|
+
backgroundColor?: string | null;
|
|
22
|
+
backgroundImage?: string | null;
|
|
23
|
+
shadow?: string | null;
|
|
24
|
+
borderRadius?: string | null;
|
|
25
|
+
border?: BorderOptions | string | null;
|
|
26
|
+
}
|
|
27
|
+
interface TextClassStyleDefaults {
|
|
28
|
+
fontFamily?: string | null;
|
|
29
|
+
fontKerning?: string | null;
|
|
30
|
+
fontSize?: string | null;
|
|
31
|
+
fontSizeAdjust?: string | null;
|
|
32
|
+
fontStretch?: string | null;
|
|
33
|
+
fontStyle?: string | null;
|
|
34
|
+
fontVariant?: string | null;
|
|
35
|
+
fontWeight?: string | null;
|
|
36
|
+
textAlign?: string | null;
|
|
37
|
+
textShadow?: string | null;
|
|
38
|
+
lineHeight?: string | null;
|
|
39
|
+
textOverflow?: string | null;
|
|
40
|
+
}
|
|
41
|
+
type ClassStyleBag = Readonly<Record<string, string | null>>;
|
|
42
|
+
export declare function registerStyleChainRoot(ctor: Function): void;
|
|
43
|
+
export declare function resolveDeclarations(defaults: ClassStyleDefaults): Record<string, string | null>;
|
|
44
|
+
export declare function ensureClassStyleRule(rawCtor: Function, defaults: ClassStyleDefaults): ClassStyleBag | null;
|
|
45
|
+
export declare function getStyleClassChain(rawCtor: Function): readonly string[];
|
|
46
|
+
export declare function ensureClassStateRule(ctor: Function, suffix: string, declarations: Record<string, string | null>, extractorMethodName?: string): ClassStyleBag | null;
|
|
47
|
+
export declare function styleGroupClassSuffix(group: string): string;
|
|
48
|
+
export declare function ensureStyleGroupRule(ctor: Function, group: string, declarations: Record<string, string | null>): ClassStyleBag | null;
|
|
49
|
+
export declare function writeClassStateDeclaration(rule: StyleRule, bag: ClassStyleBag | null, key: string, value: string | null): void;
|
|
50
|
+
export declare function writeManyClassStateDeclarations(rule: StyleRule, bag: ClassStyleBag | null, values: Record<string, string | null>): void;
|
|
51
|
+
export declare class StateStyleRule {
|
|
52
|
+
private readonly _rule;
|
|
53
|
+
private readonly _bag;
|
|
54
|
+
private readonly _hasElement;
|
|
55
|
+
constructor(ctor: Function, suffix: string, rule: StyleRule, resolveDefaults: () => Record<string, string | null>, hasElement: () => boolean, extractorMethodName?: string);
|
|
56
|
+
get classBag(): ClassStyleBag | null;
|
|
57
|
+
set(key: string, value: string | null): void;
|
|
58
|
+
setMany(values: Record<string, string | null>): void;
|
|
59
|
+
private _materialise;
|
|
15
60
|
}
|
|
16
|
-
type ClassStyleBag = Readonly<Record<string, string>>;
|
|
17
|
-
export declare function ensureClassStyleRule(ctor: Function, defaults: ClassStyleDefaults): ClassStyleBag | null;
|
|
18
61
|
export {};
|
|
@@ -9,6 +9,7 @@ import { Position } from "../primitive/Position.js";
|
|
|
9
9
|
import { Aria } from "../core/Aria.js";
|
|
10
10
|
import { Event } from "../core/Event.js";
|
|
11
11
|
import { StyleRule } from "../core/StyleTarget.js";
|
|
12
|
+
import { type ClassStyleDefaults, StateStyleRule } from "../core/ClassStyleRules.js";
|
|
12
13
|
export interface Comparator<V, U> {
|
|
13
14
|
(a: V, b: U): number;
|
|
14
15
|
}
|
|
@@ -47,6 +48,7 @@ export interface ComponentOptions {
|
|
|
47
48
|
shadow?: string;
|
|
48
49
|
outline?: string;
|
|
49
50
|
cursor?: string;
|
|
51
|
+
userSelect?: string;
|
|
50
52
|
preferredSize?: Size;
|
|
51
53
|
minSize?: Size;
|
|
52
54
|
maxSize?: Size;
|
|
@@ -65,6 +67,7 @@ export interface ComponentOptions {
|
|
|
65
67
|
attributes?: Record<string, string>;
|
|
66
68
|
components?: Array<Component | ComponentFactory | ConstrainedComponent>;
|
|
67
69
|
styleRules?: ComponentStyleRuleSpec[];
|
|
70
|
+
styleGroup?: string | null;
|
|
68
71
|
}
|
|
69
72
|
declare class Component<TOptions extends ComponentOptions = ComponentOptions> extends BaseObject {
|
|
70
73
|
private _components;
|
|
@@ -80,6 +83,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
80
83
|
private _top;
|
|
81
84
|
private _width;
|
|
82
85
|
private _height;
|
|
86
|
+
private _layoutDirty;
|
|
83
87
|
private _translateX;
|
|
84
88
|
private _translateY;
|
|
85
89
|
private _scrollLeft;
|
|
@@ -113,11 +117,11 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
113
117
|
private _layoutPaused;
|
|
114
118
|
private _aria;
|
|
115
119
|
private _whiteSpace;
|
|
116
|
-
private _userSelect;
|
|
117
120
|
private _verticalAlign;
|
|
118
121
|
private _styleRule;
|
|
119
122
|
private _inlineStyle;
|
|
120
123
|
private _inheritedStyleBag;
|
|
124
|
+
private _styleGroupBag;
|
|
121
125
|
private _clipFrame;
|
|
122
126
|
private _clipFrameStyle;
|
|
123
127
|
private _contentFrame;
|
|
@@ -141,6 +145,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
141
145
|
protected getCSSRule(): CSSStyleRule;
|
|
142
146
|
private ensureCSSRule;
|
|
143
147
|
protected createStyleRule(selectorSuffix: string): StyleRule;
|
|
148
|
+
protected createStateStyleRule(selectorSuffix: string, resolveDefaults: () => Record<string, string | null>, extractorMethodName?: string): StateStyleRule;
|
|
144
149
|
getElement(createIfMissing?: boolean): Handle | undefined;
|
|
145
150
|
protected getScrollElement(): Handle | undefined;
|
|
146
151
|
removeElement(): this;
|
|
@@ -172,6 +177,8 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
172
177
|
setId(id: string): this;
|
|
173
178
|
getName(): string | null;
|
|
174
179
|
setName(name: string | null): this;
|
|
180
|
+
getStyleGroup(): string | null;
|
|
181
|
+
setStyleGroup(group: string | null): this;
|
|
175
182
|
getDataAttribute(key: string): string | undefined;
|
|
176
183
|
setDataAttribute(key: string, value: string): this;
|
|
177
184
|
delDataAttribute(key: string): this;
|
|
@@ -268,6 +275,10 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
268
275
|
setVerticalAlign(align: string): this;
|
|
269
276
|
clearVerticalAlign(): this;
|
|
270
277
|
setSize(size: Size): this;
|
|
278
|
+
setBounds(x: number, y: number, width: number, height: number): boolean;
|
|
279
|
+
applyBounds(x: number, y: number, width: number, height: number): this;
|
|
280
|
+
protected canSkipUnchangedLayout(): boolean;
|
|
281
|
+
private writeBounds;
|
|
271
282
|
getWidth(): number;
|
|
272
283
|
setWidth(width: number): this;
|
|
273
284
|
protected clampsToContentSize(): boolean;
|
|
@@ -342,7 +353,20 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
342
353
|
clearUserSelect(): this;
|
|
343
354
|
focus(preventScroll?: boolean): this;
|
|
344
355
|
unfocus(): this;
|
|
345
|
-
|
|
356
|
+
protected matchesClassStyle(key: string, value: string | null): boolean;
|
|
357
|
+
protected getRestingExclusionSuffixes(): readonly string[];
|
|
358
|
+
private get restingIsolationSuffix();
|
|
359
|
+
private _chromeIsolationEnabled?;
|
|
360
|
+
protected isChromeIsolationEnabled(): boolean;
|
|
361
|
+
protected setChromeIsolationEnabled(enabled: boolean): void;
|
|
362
|
+
protected isRestingChromeIsolated(): boolean;
|
|
363
|
+
protected _restingStyleRule?: StyleRule;
|
|
364
|
+
protected get restingStyleRule(): StyleRule;
|
|
365
|
+
protected materialiseRestingRule(): void;
|
|
366
|
+
protected writeRuleDeclaration(key: string, value: string | null): void;
|
|
367
|
+
protected reconcileRuleDeclaration(key: string, value: string | null): void;
|
|
368
|
+
protected setReconciledCSSRules(values: Style): this;
|
|
369
|
+
protected getClassStyleDefaults(): ClassStyleDefaults;
|
|
346
370
|
applyStyle(element: Handle): this;
|
|
347
371
|
private applyBoxAndVisibilityStyles;
|
|
348
372
|
private replayGeometryStyles;
|
|
@@ -350,6 +374,8 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
350
374
|
private applyOverflowStyles;
|
|
351
375
|
private applyChromeStyles;
|
|
352
376
|
private applyMiscInlineStyles;
|
|
377
|
+
protected applySubclassStyles(): void;
|
|
378
|
+
private materialiseWhenNeeded;
|
|
353
379
|
protected materialiseStyleRule(): void;
|
|
354
380
|
private materialiseDeferredRules;
|
|
355
381
|
sync(): void;
|
|
@@ -378,6 +404,8 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
378
404
|
doLayout(): this;
|
|
379
405
|
onFirstLayout(callback: () => void): this;
|
|
380
406
|
private runFirstLayoutCallbacks;
|
|
407
|
+
invalidateLayout(): this;
|
|
408
|
+
isLayoutDirty(): boolean;
|
|
381
409
|
scheduleLayout(): this;
|
|
382
410
|
notifyIntrinsicSizeChanged(): this;
|
|
383
411
|
static afterNextLayout(callback: () => void): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TextMeasureOptions, TextMetrics } from "../core/Util.js";
|
|
1
|
+
import type { TextMeasureOptions, TextMeasureRequest, TextMetrics } from "../core/Util.js";
|
|
2
2
|
import type { Size } from "../primitive/Size.js";
|
|
3
3
|
import type { Component } from "../core/Component.js";
|
|
4
4
|
export interface Rect {
|
|
@@ -83,6 +83,7 @@ export interface DOMSink {
|
|
|
83
83
|
replaceLocationHash(hash: string): void;
|
|
84
84
|
pushHistoryPath(url: string): void;
|
|
85
85
|
replaceHistoryPath(url: string): void;
|
|
86
|
+
writeClipboardText(text: string): void;
|
|
86
87
|
addListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | AddEventListenerOptions): void;
|
|
87
88
|
removeListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | EventListenerOptions): void;
|
|
88
89
|
dispatchEvent(target: Handle, event: Event): void;
|
|
@@ -118,6 +119,7 @@ export interface DOMSource {
|
|
|
118
119
|
getElementRect(handle: Handle): Rect;
|
|
119
120
|
measureText(text: string, options?: TextMeasureOptions): TextMetrics;
|
|
120
121
|
measureTextWidths(texts: string[], options?: TextMeasureOptions): number[];
|
|
122
|
+
measureTexts(requests: TextMeasureRequest[]): TextMetrics[];
|
|
121
123
|
resolveFontSizePx(fontSizeCSS: string): number;
|
|
122
124
|
measureFontMetrics(): {
|
|
123
125
|
ascent: number;
|
|
@@ -222,6 +224,7 @@ export declare class ProductionDOMSink implements DOMSink {
|
|
|
222
224
|
replaceLocationHash(hash: string): void;
|
|
223
225
|
pushHistoryPath(url: string): void;
|
|
224
226
|
replaceHistoryPath(url: string): void;
|
|
227
|
+
writeClipboardText(text: string): void;
|
|
225
228
|
addListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | AddEventListenerOptions): void;
|
|
226
229
|
removeListener<T extends Event = Event>(target: Handle, type: string, handler: (event: T) => void, options?: boolean | EventListenerOptions): void;
|
|
227
230
|
dispatchEvent(target: Handle, event: Event): void;
|
|
@@ -257,6 +260,7 @@ export declare class ProductionDOMSource implements DOMSource {
|
|
|
257
260
|
getElementRect(handle: Handle): Rect;
|
|
258
261
|
measureText(text: string, options?: TextMeasureOptions): TextMetrics;
|
|
259
262
|
measureTextWidths(texts: string[], options?: TextMeasureOptions): number[];
|
|
263
|
+
measureTexts(requests: TextMeasureRequest[]): TextMetrics[];
|
|
260
264
|
resolveFontSizePx(fontSizeCSS: string): number;
|
|
261
265
|
measureFontMetrics(): {
|
|
262
266
|
ascent: number;
|
|
@@ -23,6 +23,7 @@ export declare namespace LayerManager {
|
|
|
23
23
|
function unregister(layer: DismissableLayer): void;
|
|
24
24
|
function containsAcrossLayers(layer: DismissableLayer, node: Handle | null): boolean;
|
|
25
25
|
function getTopLayer(): DismissableLayer | null;
|
|
26
|
+
function isTopmostInputLayer(layer: DismissableLayer): boolean;
|
|
26
27
|
function bringToFront(layer: DismissableLayer): void;
|
|
27
28
|
function getZIndex(layer: DismissableLayer): number;
|
|
28
29
|
}
|
|
@@ -9,6 +9,7 @@ declare abstract class StyleTarget<T> {
|
|
|
9
9
|
flush(): void;
|
|
10
10
|
isMaterialized(): boolean;
|
|
11
11
|
hasQueuedWrites(): boolean;
|
|
12
|
+
hasQueuedDeclarations(): boolean;
|
|
12
13
|
protected materialize(target: T): void;
|
|
13
14
|
protected abstract writeStyle(key: string, value: string | null): void;
|
|
14
15
|
protected abstract flushDirty(dirty: Record<string, string | null>): void;
|
|
@@ -16,6 +17,7 @@ declare abstract class StyleTarget<T> {
|
|
|
16
17
|
export type StyleRuleScope = {
|
|
17
18
|
scope: "class";
|
|
18
19
|
name: string;
|
|
20
|
+
suffix?: string;
|
|
19
21
|
} | {
|
|
20
22
|
scope: "component";
|
|
21
23
|
name: string;
|