@highcharts/grid-pro 2.2.0 → 2.3.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.txt +6 -0
- package/README.md +15 -9
- package/css/grid-pro.css +1262 -1122
- package/css/modules/grid-base-variables.css +131 -0
- package/css/modules/grid-button-variables.css +140 -0
- package/css/modules/grid-caption-variables.css +11 -0
- package/css/modules/grid-description-variables.css +11 -0
- package/css/modules/grid-input-variables.css +114 -0
- package/css/modules/grid-link-variables.css +18 -0
- package/css/modules/grid-menu-variables.css +50 -0
- package/css/modules/grid-pagination-variables.css +12 -0
- package/css/modules/grid-popup-variables.css +24 -0
- package/css/modules/grid-pro.css +234 -0
- package/css/modules/grid-table-variables.css +385 -0
- package/css/modules/grid-theme-default.css +55 -0
- package/es-modules/Accessibility/A11yI18n.js +1 -2
- package/es-modules/Accessibility/Accessibility.js +1 -2
- package/es-modules/Accessibility/AccessibilityComponent.d.ts +2 -2
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +5 -6
- package/es-modules/Accessibility/Components/LegendComponent.js +1 -2
- package/es-modules/Accessibility/Components/MenuComponent.js +1 -2
- package/es-modules/Accessibility/Components/NavigatorComponent.js +3 -4
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -2
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +1 -2
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +3 -4
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +3 -4
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +1 -2
- package/es-modules/Accessibility/Components/ZoomComponent.js +1 -2
- package/es-modules/Accessibility/FocusBorder.js +1 -2
- package/es-modules/Accessibility/KeyboardNavigation.js +1 -2
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +1 -2
- package/es-modules/Accessibility/Options/A11yDefaults.d.ts +11 -0
- package/es-modules/Accessibility/Options/A11yDefaults.js +11 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +58 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +7 -2
- package/es-modules/Accessibility/Options/LangDefaults.js +9 -0
- package/es-modules/Accessibility/ProxyElement.js +2 -5
- package/es-modules/Accessibility/ProxyProvider.js +1 -2
- package/es-modules/Accessibility/Utils/Announcer.js +2 -3
- package/es-modules/Accessibility/Utils/ChartUtilities.js +1 -2
- package/es-modules/Accessibility/Utils/EventProvider.d.ts +2 -2
- package/es-modules/Accessibility/Utils/EventProvider.js +6 -2
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +1 -2
- package/es-modules/Core/Animation/AnimationUtilities.js +1 -2
- package/es-modules/Core/Animation/Fx.js +1 -2
- package/es-modules/Core/Callback.d.ts +9 -2
- package/es-modules/Core/Chart/Chart.js +48 -41
- package/es-modules/Core/Chart/Chart3D.js +1 -2
- package/es-modules/Core/Chart/ChartDefaults.js +11 -0
- package/es-modules/Core/Chart/ChartOptions.d.ts +8 -0
- package/es-modules/Core/Chart/GanttChart.js +1 -2
- package/es-modules/Core/Chart/MapChart.js +1 -2
- package/es-modules/Core/Chart/StockChart.js +2 -3
- package/es-modules/Core/Color/Color.js +1 -2
- package/es-modules/Core/Defaults.js +36 -9
- package/es-modules/Core/Delaunay.d.ts +52 -0
- package/es-modules/Core/Delaunay.js +310 -0
- package/es-modules/Core/Foundation.js +1 -2
- package/es-modules/Core/Geometry/CircleUtilities.js +1 -2
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/HttpUtilities.js +1 -2
- package/es-modules/Core/MSPointer.js +1 -2
- package/es-modules/Core/Math3D.js +1 -2
- package/es-modules/Core/Options.d.ts +6 -2
- package/es-modules/Core/Pointer.js +23 -4
- package/es-modules/Core/PointerEvent.d.ts +2 -0
- package/es-modules/Core/Renderer/HTML/AST.js +2 -2
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -2
- package/es-modules/Core/Renderer/RendererUtilities.js +34 -19
- package/es-modules/Core/Responsive.d.ts +4 -2
- package/es-modules/Core/Responsive.js +10 -4
- package/es-modules/Core/Templating.d.ts +1 -1
- package/es-modules/Core/Templating.js +3 -4
- package/es-modules/Core/Time.d.ts +8 -0
- package/es-modules/Core/Time.js +2 -2
- package/es-modules/Core/Tooltip.d.ts +4 -8
- package/es-modules/Core/Tooltip.js +100 -81
- package/es-modules/Core/TooltipOptions.d.ts +44 -1
- package/es-modules/Core/Utilities.d.ts +25 -665
- package/es-modules/Core/Utilities.js +17 -1398
- package/es-modules/Data/ColumnUtils.d.ts +83 -80
- package/es-modules/Data/ColumnUtils.js +103 -113
- package/es-modules/Data/Connectors/CSVConnector.d.ts +9 -14
- package/es-modules/Data/Connectors/CSVConnector.js +3 -4
- package/es-modules/Data/Connectors/DataConnector.d.ts +52 -54
- package/es-modules/Data/Connectors/DataConnector.js +33 -52
- package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +40 -42
- package/es-modules/Data/Connectors/GoogleSheetsConnector.js +73 -88
- package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +4 -2
- package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +23 -28
- package/es-modules/Data/Connectors/HTMLTableConnector.js +3 -4
- package/es-modules/Data/Connectors/JSONConnector.d.ts +9 -14
- package/es-modules/Data/Connectors/JSONConnector.js +3 -4
- package/es-modules/Data/Converters/CSVConverter.d.ts +5 -5
- package/es-modules/Data/Converters/CSVConverter.js +3 -4
- package/es-modules/Data/Converters/CSVConverterOptions.d.ts +2 -2
- package/es-modules/Data/Converters/DataConverter.d.ts +76 -78
- package/es-modules/Data/Converters/DataConverter.js +26 -53
- package/es-modules/Data/Converters/DataConverterUtils.d.ts +88 -81
- package/es-modules/Data/Converters/DataConverterUtils.js +169 -181
- package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +4 -4
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +3 -3
- package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +2 -2
- package/es-modules/Data/Converters/HTMLTableConverter.d.ts +4 -4
- package/es-modules/Data/Converters/HTMLTableConverter.js +2 -3
- package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +2 -2
- package/es-modules/Data/Converters/JSONConverter.d.ts +7 -7
- package/es-modules/Data/Converters/JSONConverter.js +6 -6
- package/es-modules/Data/Converters/JSONConverterOptions.d.ts +2 -2
- package/es-modules/Data/DataCursor.d.ts +65 -70
- package/es-modules/Data/DataCursor.js +119 -139
- package/es-modules/Data/DataEvent.d.ts +55 -57
- package/es-modules/Data/DataPool.d.ts +10 -17
- package/es-modules/Data/DataPool.js +20 -9
- package/es-modules/Data/DataTable.d.ts +111 -113
- package/es-modules/Data/DataTable.js +3 -3
- package/es-modules/Data/DataTableCore.d.ts +9 -9
- package/es-modules/Data/DataTableCore.js +2 -2
- package/es-modules/Data/Formula/FormulaParser.js +1 -2
- package/es-modules/Data/Formula/FormulaProcessor.js +1 -2
- package/es-modules/Data/Modifiers/ChainModifier.d.ts +29 -34
- package/es-modules/Data/Modifiers/ChainModifier.js +7 -8
- package/es-modules/Data/Modifiers/DataModifier.d.ts +36 -41
- package/es-modules/Data/Modifiers/DataModifier.js +31 -53
- package/es-modules/Data/Modifiers/FilterModifier.d.ts +4 -4
- package/es-modules/Data/Modifiers/FilterModifier.js +3 -4
- package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +3 -2
- package/es-modules/Data/Modifiers/InvertModifier.d.ts +4 -4
- package/es-modules/Data/Modifiers/InvertModifier.js +3 -4
- package/es-modules/Data/Modifiers/MathModifier.d.ts +5 -4
- package/es-modules/Data/Modifiers/RangeModifier.d.ts +4 -4
- package/es-modules/Data/Modifiers/RangeModifier.js +3 -4
- package/es-modules/Data/Modifiers/SortModifier.d.ts +6 -11
- package/es-modules/Data/Modifiers/SortModifier.js +3 -4
- package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +3 -3
- package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +1 -1
- package/es-modules/Grid/Core/Accessibility/Accessibility.js +5 -6
- package/es-modules/Grid/Core/Data/DataProvider.d.ts +97 -0
- package/es-modules/Grid/Core/Data/DataProvider.js +89 -0
- package/es-modules/Grid/Core/Data/DataProviderRegistry.d.ts +20 -0
- package/es-modules/Grid/Core/Data/DataProviderRegistry.js +52 -0
- package/es-modules/Grid/Core/Data/DataProviderType.d.ts +19 -0
- package/es-modules/Grid/Core/Data/DataProviderType.js +15 -0
- package/es-modules/Grid/Core/Data/LocalDataProvider.d.ts +165 -0
- package/es-modules/Grid/Core/Data/LocalDataProvider.js +341 -0
- package/es-modules/Grid/Core/Defaults.js +4 -2
- package/es-modules/Grid/Core/Globals.d.ts +20 -16
- package/es-modules/Grid/Core/Globals.js +10 -8
- package/es-modules/Grid/Core/Grid.d.ts +31 -22
- package/es-modules/Grid/Core/Grid.js +214 -136
- package/es-modules/Grid/Core/GridUtils.d.ts +33 -0
- package/es-modules/Grid/Core/GridUtils.js +50 -3
- package/es-modules/Grid/Core/Options.d.ts +145 -4
- package/es-modules/Grid/Core/Pagination/Pagination.d.ts +3 -0
- package/es-modules/Grid/Core/Pagination/Pagination.js +63 -23
- package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +4 -0
- package/es-modules/Grid/Core/Querying/FilteringController.js +1 -2
- package/es-modules/Grid/Core/Querying/PaginationController.d.ts +2 -2
- package/es-modules/Grid/Core/Querying/PaginationController.js +3 -3
- package/es-modules/Grid/Core/Querying/QueryingController.d.ts +1 -1
- package/es-modules/Grid/Core/Querying/QueryingController.js +2 -26
- package/es-modules/Grid/Core/Responsive/ResponsiveComposition.d.ts +53 -0
- package/es-modules/Grid/Core/Responsive/ResponsiveComposition.js +229 -0
- package/es-modules/Grid/Core/Responsive/ResponsiveOptions.d.ts +58 -0
- package/es-modules/Grid/Core/Responsive/ResponsiveOptions.js +15 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +2 -3
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +3 -4
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +2 -2
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +17 -1
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +58 -15
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +1 -3
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +57 -3
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +397 -118
- package/es-modules/Grid/Core/Table/Body/CellContextMenu.d.ts +11 -0
- package/es-modules/Grid/Core/Table/Body/CellContextMenu.js +84 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +27 -13
- package/es-modules/Grid/Core/Table/Body/TableCell.js +74 -25
- package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +7 -15
- package/es-modules/Grid/Core/Table/Body/TableRow.js +24 -19
- package/es-modules/Grid/Core/Table/Cell.d.ts +16 -3
- package/es-modules/Grid/Core/Table/Cell.js +36 -3
- package/es-modules/Grid/Core/Table/CellContent/TextContent.js +3 -8
- package/es-modules/Grid/Core/Table/Column.d.ts +10 -4
- package/es-modules/Grid/Core/Table/Column.js +23 -34
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +9 -8
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +4 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +5 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +7 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +2 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +0 -1
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +4 -14
- package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +6 -1
- package/es-modules/Grid/Core/Table/Header/HeaderCell.js +33 -13
- package/es-modules/Grid/Core/Table/Header/HeaderRow.js +4 -5
- package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Header/TableHeader.js +3 -3
- package/es-modules/Grid/Core/Table/Row.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Row.js +2 -2
- package/es-modules/Grid/Core/Table/Table.d.ts +38 -12
- package/es-modules/Grid/Core/Table/Table.js +184 -91
- package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +6 -7
- package/es-modules/Grid/Core/UI/ContextMenuButton.js +5 -3
- package/es-modules/Grid/Core/UI/Popup.js +7 -9
- package/es-modules/Grid/Core/UI/SvgIcons.d.ts +42 -7
- package/es-modules/Grid/Core/UI/SvgIcons.js +206 -33
- package/es-modules/Grid/Core/UI/Toolbar.d.ts +5 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +4 -12
- package/es-modules/Grid/Core/UI/ToolbarButton.js +8 -26
- package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +2 -2
- package/es-modules/Grid/Pro/CellEditing/CellEditing.js +10 -10
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +1 -1
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +4 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/ColumnTypes/Validator.js +34 -32
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +1 -1
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +3 -4
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +1 -3
- package/es-modules/Grid/Pro/Data/DataSourceHelper.d.ts +74 -0
- package/es-modules/Grid/Pro/Data/DataSourceHelper.js +246 -0
- package/es-modules/Grid/Pro/Data/QuerySerializer.d.ts +46 -0
- package/es-modules/Grid/Pro/Data/QuerySerializer.js +169 -0
- package/es-modules/Grid/Pro/Data/RemoteDataProvider.d.ts +187 -0
- package/es-modules/Grid/Pro/Data/RemoteDataProvider.js +500 -0
- package/es-modules/Grid/Pro/Export/Exporting.js +1 -2
- package/es-modules/Grid/Pro/Export/ExportingComposition.js +1 -2
- package/es-modules/Grid/Pro/GridEvents.js +1 -2
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +0 -1
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +1 -2
- package/es-modules/Shared/BaseForm.js +1 -2
- package/es-modules/Shared/DownloadURL.js +1 -2
- package/es-modules/Shared/TimeBase.js +3 -3
- package/es-modules/Shared/Types.d.ts +7 -0
- package/es-modules/Shared/Utilities.d.ts +576 -0
- package/es-modules/Shared/Utilities.js +1368 -0
- package/es-modules/masters/grid-pro.src.d.ts +15 -11
- package/es-modules/masters/grid-pro.src.js +12 -5
- package/grid-pro.d.ts +15 -11
- package/grid-pro.js +3 -3
- package/grid-pro.js.map +1 -1
- package/grid-pro.src.d.ts +15 -11
- package/grid-pro.src.js +10408 -8009
- package/package.json +1 -1
- package/es-modules/Grid/Core/Pagination/Icons.d.ts +0 -7
- package/es-modules/Grid/Core/Pagination/Icons.js +0 -7
|
@@ -14,13 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* */
|
|
16
16
|
'use strict';
|
|
17
|
-
import Utils from '../../../Core/Utilities.js';
|
|
18
17
|
import ColumnFiltering from './Actions/ColumnFiltering/ColumnFiltering.js';
|
|
19
18
|
import Templating from '../../../Core/Templating.js';
|
|
20
19
|
import TextContent from './CellContent/TextContent.js';
|
|
21
20
|
import Globals from '../Globals.js';
|
|
22
21
|
import GridUtils from '../GridUtils.js';
|
|
23
|
-
|
|
22
|
+
import { fireEvent } from '../../../Shared/Utilities.js';
|
|
24
23
|
const { createOptionsProxy } = GridUtils;
|
|
25
24
|
/* *
|
|
26
25
|
*
|
|
@@ -50,6 +49,10 @@ export class Column {
|
|
|
50
49
|
*/
|
|
51
50
|
constructor(viewport, id, index) {
|
|
52
51
|
var _a;
|
|
52
|
+
/**
|
|
53
|
+
* Type of the data in the column.
|
|
54
|
+
*/
|
|
55
|
+
this.dataType = 'string';
|
|
53
56
|
/**
|
|
54
57
|
* The cells of the column.
|
|
55
58
|
*/
|
|
@@ -58,8 +61,6 @@ export class Column {
|
|
|
58
61
|
this.id = id;
|
|
59
62
|
this.index = index;
|
|
60
63
|
this.viewport = viewport;
|
|
61
|
-
this.loadData();
|
|
62
|
-
this.dataType = this.assumeDataType();
|
|
63
64
|
// Populate column options map if not exists, to prepare option
|
|
64
65
|
// references for each column.
|
|
65
66
|
if (grid.options && !grid.columnOptionsMap?.[id]) {
|
|
@@ -74,18 +75,31 @@ export class Column {
|
|
|
74
75
|
if (this.options.filtering?.enabled) {
|
|
75
76
|
this.filtering = new ColumnFiltering(this);
|
|
76
77
|
}
|
|
77
|
-
fireEvent(this, 'afterInit');
|
|
78
78
|
}
|
|
79
79
|
/* *
|
|
80
80
|
*
|
|
81
81
|
* Methods
|
|
82
82
|
*
|
|
83
83
|
* */
|
|
84
|
+
/**
|
|
85
|
+
* Initializes the column data-related properties.
|
|
86
|
+
*/
|
|
87
|
+
async init() {
|
|
88
|
+
this.loadData();
|
|
89
|
+
this.dataType = await this.assumeDataType();
|
|
90
|
+
fireEvent(this, 'afterInit');
|
|
91
|
+
}
|
|
84
92
|
/**
|
|
85
93
|
* Loads the data of the column from the viewport's data table.
|
|
86
94
|
*/
|
|
87
95
|
loadData() {
|
|
88
|
-
|
|
96
|
+
const dp = this.viewport.grid.dataProvider;
|
|
97
|
+
if (dp && 'getDataTable' in dp) {
|
|
98
|
+
this.data = dp.getDataTable(true)?.getColumn(this.id, true);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
delete this.data;
|
|
102
|
+
}
|
|
89
103
|
}
|
|
90
104
|
/**
|
|
91
105
|
* Creates a cell content instance.
|
|
@@ -101,40 +115,15 @@ export class Column {
|
|
|
101
115
|
* Assumes the data type of the column based on the options or data in the
|
|
102
116
|
* column if not specified.
|
|
103
117
|
*/
|
|
104
|
-
assumeDataType() {
|
|
118
|
+
async assumeDataType() {
|
|
105
119
|
const { grid } = this.viewport;
|
|
120
|
+
const dp = grid.dataProvider;
|
|
106
121
|
const type = grid.columnOptionsMap?.[this.id]?.options.dataType ??
|
|
107
122
|
grid.options?.columnDefaults?.dataType;
|
|
108
123
|
if (type) {
|
|
109
124
|
return type;
|
|
110
125
|
}
|
|
111
|
-
|
|
112
|
-
return 'string';
|
|
113
|
-
}
|
|
114
|
-
if (!Array.isArray(this.data)) {
|
|
115
|
-
// Typed array
|
|
116
|
-
return 'number';
|
|
117
|
-
}
|
|
118
|
-
for (let i = 0, iEnd = Math.min(this.data.length, 30); i < iEnd; ++i) {
|
|
119
|
-
if (!defined(this.data[i])) {
|
|
120
|
-
// If the data is null or undefined, we should look
|
|
121
|
-
// at the next value to determine the type.
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
switch (typeof this.data[i]) {
|
|
125
|
-
case 'number':
|
|
126
|
-
return 'number';
|
|
127
|
-
case 'boolean':
|
|
128
|
-
return 'boolean';
|
|
129
|
-
default:
|
|
130
|
-
return 'string';
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// eslint-disable-next-line no-console
|
|
134
|
-
console.warn(`Column "${this.id}" contains too few data points with ` +
|
|
135
|
-
'unambiguous types to correctly determine its dataType. It\'s ' +
|
|
136
|
-
'recommended to set the `dataType` option for it.');
|
|
137
|
-
return 'string';
|
|
126
|
+
return (await dp?.getColumnDataType(this.id)) ?? 'string';
|
|
138
127
|
}
|
|
139
128
|
/**
|
|
140
129
|
* Registers a cell in the column.
|
|
@@ -42,15 +42,16 @@ class IndependentResizingMode extends ResizingMode {
|
|
|
42
42
|
// Set the width of the resized column.
|
|
43
43
|
const width = this.columnWidths[column.id] = Math.round(Math.max((resizer.columnStartWidth || 0) + diff, ResizingMode.getMinWidth(column)) * 10) / 10;
|
|
44
44
|
this.columnWidthUnits[column.id] = 0; // Set to px
|
|
45
|
-
// Change width units of all columns
|
|
45
|
+
// Change width units of all columns to px.
|
|
46
46
|
const vp = this.viewport;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
this.
|
|
53
|
-
|
|
47
|
+
for (let i = 0; i < vp.columns.length; ++i) {
|
|
48
|
+
const col = vp.columns[i];
|
|
49
|
+
if (col.id === column.id) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const colWidth = this.columnWidths[col.id] = col.getWidth();
|
|
53
|
+
this.columnWidthUnits[col.id] = 0; // Set to px
|
|
54
|
+
col.setOptions({ width: colWidth });
|
|
54
55
|
}
|
|
55
56
|
column.setOptions({ width });
|
|
56
57
|
}
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* */
|
|
15
15
|
'use strict';
|
|
16
|
-
import
|
|
17
|
-
const { getStyle, defined } = U;
|
|
16
|
+
import { defined, getStyle } from '../../../../Shared/Utilities.js';
|
|
18
17
|
/* *
|
|
19
18
|
*
|
|
20
19
|
* Class
|
|
@@ -86,7 +85,9 @@ class ResizingMode {
|
|
|
86
85
|
*/
|
|
87
86
|
loadColumn(column) {
|
|
88
87
|
const rawWidth = column.options.width;
|
|
89
|
-
if (!rawWidth) {
|
|
88
|
+
if (!defined(rawWidth) || rawWidth === 'auto') {
|
|
89
|
+
delete this.columnWidths[column.id];
|
|
90
|
+
delete this.columnWidthUnits[column.id];
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
92
93
|
let value;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Grid from '../../../Grid';
|
|
1
2
|
import type Toolbar from '../../../UI/Toolbar';
|
|
2
3
|
import type Column from '../../Column';
|
|
3
4
|
import ToolbarButton from '../../../UI/ToolbarButton.js';
|
|
@@ -10,6 +11,10 @@ declare class HeaderCellToolbar implements Toolbar {
|
|
|
10
11
|
* The column that this toolbar belongs to.
|
|
11
12
|
*/
|
|
12
13
|
column: Column;
|
|
14
|
+
/**
|
|
15
|
+
* Reference to the Grid instance for icon registry and options.
|
|
16
|
+
*/
|
|
17
|
+
get grid(): Grid;
|
|
13
18
|
buttons: ToolbarButton[];
|
|
14
19
|
container?: HTMLDivElement;
|
|
15
20
|
focusCursor: number;
|
|
@@ -18,15 +18,20 @@ import Globals from '../../../Globals.js';
|
|
|
18
18
|
import SortToolbarButton from './ToolbarButtons/SortToolbarButton.js';
|
|
19
19
|
import FilterToolbarButton from './ToolbarButtons/FilterToolbarButton.js';
|
|
20
20
|
import MenuToolbarButton from './ToolbarButtons/MenuToolbarButton.js';
|
|
21
|
-
import
|
|
21
|
+
import { getStyle } from '../../../../../Shared/Utilities.js';
|
|
22
22
|
const { makeHTMLElement } = GridUtils;
|
|
23
|
-
const { getStyle } = U;
|
|
24
23
|
/* *
|
|
25
24
|
*
|
|
26
25
|
* Class
|
|
27
26
|
*
|
|
28
27
|
* */
|
|
29
28
|
class HeaderCellToolbar {
|
|
29
|
+
/**
|
|
30
|
+
* Reference to the Grid instance for icon registry and options.
|
|
31
|
+
*/
|
|
32
|
+
get grid() {
|
|
33
|
+
return this.column.viewport.grid;
|
|
34
|
+
}
|
|
30
35
|
/* *
|
|
31
36
|
*
|
|
32
37
|
* Constructor
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
import FilterPopup from '../FilterPopup.js';
|
|
17
17
|
import StateHelpers from '../StateHelpers.js';
|
|
18
18
|
import ContextMenuButton from '../../../../UI/ContextMenuButton.js';
|
|
19
|
-
import
|
|
20
|
-
const { addEvent } = U;
|
|
19
|
+
import { addEvent } from '../../../../../../Shared/Utilities.js';
|
|
21
20
|
/* *
|
|
22
21
|
*
|
|
23
22
|
* Class
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
'use strict';
|
|
16
16
|
import ContextMenuButton from '../../../../UI/ContextMenuButton.js';
|
|
17
17
|
import StateHelpers from '../StateHelpers.js';
|
|
18
|
-
import
|
|
19
|
-
const { addEvent } = U;
|
|
18
|
+
import { addEvent } from '../../../../../../Shared/Utilities.js';
|
|
20
19
|
/* *
|
|
21
20
|
*
|
|
22
21
|
* Class
|
|
@@ -29,7 +28,7 @@ class SortMenuButton extends ContextMenuButton {
|
|
|
29
28
|
*
|
|
30
29
|
* */
|
|
31
30
|
constructor(langOptions, direction) {
|
|
32
|
-
super({ icon: direction === 'asc' ? '
|
|
31
|
+
super({ icon: direction === 'asc' ? 'arrowUp' : 'arrowDown' });
|
|
33
32
|
this.direction = direction;
|
|
34
33
|
this.baseLabel = langOptions[direction === 'asc' ? 'sortAscending' : 'sortDescending'] || '';
|
|
35
34
|
this.options.label = this.baseLabel;
|
package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js
CHANGED
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
import FilterPopup from '../FilterPopup.js';
|
|
17
17
|
import ToolbarButton from '../../../../UI/ToolbarButton.js';
|
|
18
18
|
import StateHelpers from '../StateHelpers.js';
|
|
19
|
-
import
|
|
20
|
-
const { addEvent } = U;
|
|
19
|
+
import { addEvent } from '../../../../../../Shared/Utilities.js';
|
|
21
20
|
/* *
|
|
22
21
|
*
|
|
23
22
|
* Class
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
import ToolbarButton from '../../../../UI/ToolbarButton.js';
|
|
17
17
|
import StateHelpers from '../StateHelpers.js';
|
|
18
18
|
import MenuPopup from '../MenuPopup.js';
|
|
19
|
-
import
|
|
20
|
-
const { addEvent } = U;
|
|
19
|
+
import { addEvent } from '../../../../../../Shared/Utilities.js';
|
|
21
20
|
/* *
|
|
22
21
|
*
|
|
23
22
|
* Class
|
|
@@ -15,11 +15,9 @@
|
|
|
15
15
|
'use strict';
|
|
16
16
|
import ToolbarButton from '../../../../UI/ToolbarButton.js';
|
|
17
17
|
import GridUtils from '../../../../GridUtils.js';
|
|
18
|
-
import Globals from '../../../../Globals.js';
|
|
19
18
|
import StateHelpers from '../StateHelpers.js';
|
|
20
|
-
import
|
|
19
|
+
import { addEvent } from '../../../../../../Shared/Utilities.js';
|
|
21
20
|
const { formatText } = GridUtils;
|
|
22
|
-
const { addEvent } = U;
|
|
23
21
|
/* *
|
|
24
22
|
*
|
|
25
23
|
* Class
|
|
@@ -75,8 +73,7 @@ class SortToolbarButton extends ToolbarButton {
|
|
|
75
73
|
* */
|
|
76
74
|
constructor() {
|
|
77
75
|
super({
|
|
78
|
-
icon: '
|
|
79
|
-
classNameKey: 'headerCellSortIcon',
|
|
76
|
+
icon: 'arrowUpDown',
|
|
80
77
|
accessibility: {
|
|
81
78
|
ariaLabel: 'sort'
|
|
82
79
|
}
|
|
@@ -107,7 +104,6 @@ class SortToolbarButton extends ToolbarButton {
|
|
|
107
104
|
}
|
|
108
105
|
if (!this.sortPriorityIndicator) {
|
|
109
106
|
this.sortPriorityIndicator = document.createElement('span');
|
|
110
|
-
this.sortPriorityIndicator.className = Globals.getClassName('sortPriorityIndicator');
|
|
111
107
|
}
|
|
112
108
|
// Ensure the indicator is rendered to the right of the icon.
|
|
113
109
|
button.appendChild(this.sortPriorityIndicator);
|
|
@@ -126,13 +122,13 @@ class SortToolbarButton extends ToolbarButton {
|
|
|
126
122
|
void 0));
|
|
127
123
|
if (!StateHelpers.isSorted(column) || !columnSorting?.order) {
|
|
128
124
|
this.setActive(false);
|
|
129
|
-
this.setIcon('
|
|
125
|
+
this.setIcon('arrowUpDown');
|
|
130
126
|
this.renderSortPriorityIndicator();
|
|
131
127
|
this.updateA11yLabel(null);
|
|
132
128
|
return;
|
|
133
129
|
}
|
|
134
130
|
this.setActive(true);
|
|
135
|
-
this.setIcon(columnSorting.order === 'asc' ? '
|
|
131
|
+
this.setIcon(columnSorting.order === 'asc' ? 'arrowUp' : 'arrowDown');
|
|
136
132
|
const sortIndex = sortings.findIndex((sorting) => sorting.columnId === column.id);
|
|
137
133
|
const priority = (sortings.length > 1 && sortIndex !== -1 ?
|
|
138
134
|
sortIndex + 1 :
|
|
@@ -149,12 +145,6 @@ class SortToolbarButton extends ToolbarButton {
|
|
|
149
145
|
// If this grid is currently sorted, update the state
|
|
150
146
|
this.eventListenerDestroyers.push(addEvent(column.viewport.grid, 'afterSort', () => this.refreshState()));
|
|
151
147
|
}
|
|
152
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
153
|
-
renderActiveIndicator(render) {
|
|
154
|
-
// Sorting uses directional icons + priority indicators
|
|
155
|
-
// (for multi-sort), not the generic active dot indicator
|
|
156
|
-
// (reserved for filtering).
|
|
157
|
-
}
|
|
158
148
|
}
|
|
159
149
|
/* *
|
|
160
150
|
*
|
|
@@ -53,7 +53,12 @@ declare class HeaderCell extends Cell {
|
|
|
53
53
|
/**
|
|
54
54
|
* Render the cell container.
|
|
55
55
|
*/
|
|
56
|
-
render(): void
|
|
56
|
+
render(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns merged header styles from defaults and current column options.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
private getColumnStyles;
|
|
57
62
|
reflow(): void;
|
|
58
63
|
onKeyDown(e: KeyboardEvent): void;
|
|
59
64
|
onClick(e: MouseEvent): void;
|
|
@@ -15,13 +15,11 @@
|
|
|
15
15
|
* */
|
|
16
16
|
'use strict';
|
|
17
17
|
import Cell from '../Cell.js';
|
|
18
|
-
import
|
|
18
|
+
import { makeHTMLElement, setHTMLContent, createOptionsProxy, resolveStyleValue, mergeStyleValues } from '../../GridUtils.js';
|
|
19
19
|
import ColumnSorting from '../Actions/ColumnSorting.js';
|
|
20
20
|
import Globals from '../../Globals.js';
|
|
21
|
-
import Utilities from '../../../../Core/Utilities.js';
|
|
22
21
|
import ColumnToolbar from './ColumnToolbar/ColumnToolbar.js';
|
|
23
|
-
|
|
24
|
-
const { fireEvent, isString } = Utilities;
|
|
22
|
+
import { fireEvent, isString } from '../../../../Shared/Utilities.js';
|
|
25
23
|
/* *
|
|
26
24
|
*
|
|
27
25
|
* Class
|
|
@@ -102,12 +100,14 @@ class HeaderCell extends Cell {
|
|
|
102
100
|
/**
|
|
103
101
|
* Render the cell container.
|
|
104
102
|
*/
|
|
105
|
-
render() {
|
|
103
|
+
async render() {
|
|
106
104
|
const { column } = this;
|
|
107
105
|
const options = createOptionsProxy(this.superColumnOptions, column?.options);
|
|
108
106
|
const headerCellOptions = options.header || {};
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
const headerValue = column ?
|
|
108
|
+
headerCellOptions.formatter?.call(column) : void 0;
|
|
109
|
+
if (headerValue) {
|
|
110
|
+
this.value = headerValue.toString();
|
|
111
111
|
}
|
|
112
112
|
else if (isString(headerCellOptions.format)) {
|
|
113
113
|
this.value = column ?
|
|
@@ -151,7 +151,25 @@ class HeaderCell extends Cell {
|
|
|
151
151
|
this.htmlElement.classList[column?.dataType === 'number' ? 'add' : 'remove'](Globals.getClassName('rightAlign'));
|
|
152
152
|
// Add custom class name from column options
|
|
153
153
|
this.setCustomClassName(options.header?.className);
|
|
154
|
+
this.setCustomStyles(this.getColumnStyles());
|
|
154
155
|
fireEvent(this, 'afterRender', { column });
|
|
156
|
+
return Promise.resolve();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Returns merged header styles from defaults and current column options.
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
162
|
+
getColumnStyles() {
|
|
163
|
+
const { column } = this;
|
|
164
|
+
if (!column) {
|
|
165
|
+
return resolveStyleValue(this.superColumnOptions.header?.style);
|
|
166
|
+
}
|
|
167
|
+
const { grid } = this.row.viewport;
|
|
168
|
+
const rawColumnOptions = grid.columnOptionsMap?.[column.id]?.options;
|
|
169
|
+
return {
|
|
170
|
+
...mergeStyleValues(column, grid.options?.columnDefaults?.style, rawColumnOptions?.style),
|
|
171
|
+
...mergeStyleValues(column, grid.options?.columnDefaults?.header?.style, rawColumnOptions?.header?.style)
|
|
172
|
+
};
|
|
155
173
|
}
|
|
156
174
|
reflow() {
|
|
157
175
|
const th = this.htmlElement;
|
|
@@ -179,14 +197,16 @@ class HeaderCell extends Cell {
|
|
|
179
197
|
super.onKeyDown(e);
|
|
180
198
|
}
|
|
181
199
|
onClick(e) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
200
|
+
if (!this.column ||
|
|
201
|
+
!this.htmlElement.contains(e.target) ||
|
|
202
|
+
this.column.viewport.columnsResizer?.isResizing) {
|
|
185
203
|
return;
|
|
186
204
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
column.sorting?.
|
|
205
|
+
// Toggle sort only when clicking header text/area, not toolbar icons
|
|
206
|
+
if (!this.toolbar?.container?.contains(e.target) &&
|
|
207
|
+
(this.column.options.sorting?.enabled ??
|
|
208
|
+
this.column.options.sorting?.sortable)) {
|
|
209
|
+
this.column.sorting?.toggle(e);
|
|
190
210
|
}
|
|
191
211
|
fireEvent(this, 'click', {
|
|
192
212
|
originalEvent: e,
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
import Row from '../Row.js';
|
|
18
18
|
import HeaderCell from './HeaderCell.js';
|
|
19
19
|
import Globals from '../../Globals.js';
|
|
20
|
-
import
|
|
21
|
-
const { isString } = Utils;
|
|
20
|
+
import { isString } from '../../../../Shared/Utilities.js';
|
|
22
21
|
/* *
|
|
23
22
|
*
|
|
24
23
|
* Class
|
|
@@ -63,7 +62,7 @@ class HeaderRow extends Row {
|
|
|
63
62
|
*
|
|
64
63
|
* @internal
|
|
65
64
|
*/
|
|
66
|
-
renderContent(level) {
|
|
65
|
+
async renderContent(level) {
|
|
67
66
|
const headerOpt = this.viewport.grid.options?.header;
|
|
68
67
|
const vp = this.viewport;
|
|
69
68
|
const enabledColumns = vp.grid.enabledColumns || [];
|
|
@@ -71,7 +70,7 @@ class HeaderRow extends Row {
|
|
|
71
70
|
vp.theadElement?.appendChild(this.htmlElement);
|
|
72
71
|
this.htmlElement.classList.add(Globals.getClassName('headerRow'));
|
|
73
72
|
if (!headerOpt) {
|
|
74
|
-
super.render();
|
|
73
|
+
await super.render();
|
|
75
74
|
}
|
|
76
75
|
else {
|
|
77
76
|
const columnsOnLevel = this.getColumnsAtLevel(headerOpt, level);
|
|
@@ -110,7 +109,7 @@ class HeaderRow extends Row {
|
|
|
110
109
|
if (dataColumn?.index === 0 && i === 0) {
|
|
111
110
|
headerCell.htmlElement.classList.add(Globals.getClassName('columnFirst'));
|
|
112
111
|
}
|
|
113
|
-
headerCell.render();
|
|
112
|
+
await headerCell.render();
|
|
114
113
|
if (columnId) {
|
|
115
114
|
headerCell.htmlElement.setAttribute('rowSpan', (this.viewport.header?.levels || 1) - level);
|
|
116
115
|
}
|
|
@@ -70,7 +70,7 @@ class TableHeader {
|
|
|
70
70
|
/**
|
|
71
71
|
* Renders the table head content.
|
|
72
72
|
*/
|
|
73
|
-
render() {
|
|
73
|
+
async render() {
|
|
74
74
|
const vp = this.viewport;
|
|
75
75
|
if (!vp.grid.enabledColumns) {
|
|
76
76
|
return;
|
|
@@ -78,14 +78,14 @@ class TableHeader {
|
|
|
78
78
|
// Render regular, multiple level rows.
|
|
79
79
|
for (let i = 0, iEnd = this.levels; i < iEnd; i++) {
|
|
80
80
|
const row = new HeaderRow(vp, i + 1); // Avoid indexing from 0
|
|
81
|
-
row.renderContent(i);
|
|
81
|
+
await row.renderContent(i);
|
|
82
82
|
this.rows.push(row);
|
|
83
83
|
}
|
|
84
84
|
// Render an extra row for inline filtering.
|
|
85
85
|
if (vp.columns.some((column) => (column.options.filtering?.enabled &&
|
|
86
86
|
column.options.filtering.inline) || false)) {
|
|
87
87
|
const row = new FilterRow(vp);
|
|
88
|
-
row.renderContent();
|
|
88
|
+
await row.renderContent();
|
|
89
89
|
this.rows.push(row);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -39,7 +39,7 @@ declare abstract class Row {
|
|
|
39
39
|
* Renders the row's content. It does not attach the row element to the
|
|
40
40
|
* viewport nor pushes the rows to the viewport.rows array.
|
|
41
41
|
*/
|
|
42
|
-
render(): void
|
|
42
|
+
render(): Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* Reflows the row's content dimensions.
|
|
45
45
|
*/
|
|
@@ -54,11 +54,11 @@ class Row {
|
|
|
54
54
|
* Renders the row's content. It does not attach the row element to the
|
|
55
55
|
* viewport nor pushes the rows to the viewport.rows array.
|
|
56
56
|
*/
|
|
57
|
-
render() {
|
|
57
|
+
async render() {
|
|
58
58
|
const columns = this.viewport.columns;
|
|
59
59
|
for (let i = 0, iEnd = columns.length; i < iEnd; i++) {
|
|
60
60
|
const cell = this.createCell(columns[i]);
|
|
61
|
-
cell.render();
|
|
61
|
+
await cell.render();
|
|
62
62
|
}
|
|
63
63
|
this.rendered = true;
|
|
64
64
|
if (this.viewport.virtualRows) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type TableRow from './Body/TableRow';
|
|
2
|
-
import DataTable from '../../../Data/DataTable
|
|
2
|
+
import type DataTable from '../../../Data/DataTable';
|
|
3
|
+
import type { RowId } from '../Data/DataProvider';
|
|
3
4
|
import ColumnResizingMode from './ColumnResizing/ResizingMode.js';
|
|
4
5
|
import Column from './Column.js';
|
|
5
6
|
import TableHeader from './Header/TableHeader.js';
|
|
@@ -13,14 +14,6 @@ declare class Table {
|
|
|
13
14
|
* The data grid instance which the table (viewport) belongs to.
|
|
14
15
|
*/
|
|
15
16
|
readonly grid: Grid;
|
|
16
|
-
/**
|
|
17
|
-
* The presentation version of the data table. It has applied modifiers
|
|
18
|
-
* and is ready to be rendered.
|
|
19
|
-
*
|
|
20
|
-
* If you want to modify the data table, you should use the original
|
|
21
|
-
* instance that is stored in the `grid.dataTable` property.
|
|
22
|
-
*/
|
|
23
|
-
dataTable: DataTable;
|
|
24
17
|
/**
|
|
25
18
|
* The HTML element of the table.
|
|
26
19
|
*/
|
|
@@ -63,6 +56,10 @@ declare class Table {
|
|
|
63
56
|
* The flag that indicates if the table rows are virtualized.
|
|
64
57
|
*/
|
|
65
58
|
virtualRows: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Cell context menu instance (lazy created).
|
|
61
|
+
*/
|
|
62
|
+
private cellContextMenu?;
|
|
66
63
|
/**
|
|
67
64
|
* Constructs a new data grid table.
|
|
68
65
|
*
|
|
@@ -74,9 +71,17 @@ declare class Table {
|
|
|
74
71
|
*/
|
|
75
72
|
constructor(grid: Grid, tableElement: HTMLTableElement);
|
|
76
73
|
/**
|
|
77
|
-
*
|
|
74
|
+
* The presentation version of the data table. It has applied modifiers
|
|
75
|
+
* and is ready to be rendered.
|
|
76
|
+
*
|
|
77
|
+
* @deprecated Use `grid.dataProvider` instead.
|
|
78
|
+
*/
|
|
79
|
+
get dataTable(): DataTable | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Initializes the table. Should be called after creation so that the table
|
|
82
|
+
* can be asynchronously initialized.
|
|
78
83
|
*/
|
|
79
|
-
|
|
84
|
+
init(): Promise<void>;
|
|
80
85
|
/**
|
|
81
86
|
* Sets the minimum height of the table body.
|
|
82
87
|
*/
|
|
@@ -125,6 +130,11 @@ declare class Table {
|
|
|
125
130
|
* @param e Mouse event
|
|
126
131
|
*/
|
|
127
132
|
private onCellDblClick;
|
|
133
|
+
/**
|
|
134
|
+
* Delegated context menu handler for cells.
|
|
135
|
+
* @param e Mouse event
|
|
136
|
+
*/
|
|
137
|
+
private onCellContextMenu;
|
|
128
138
|
/**
|
|
129
139
|
* Delegated mousedown handler for cells.
|
|
130
140
|
* @param e Mouse event
|
|
@@ -145,6 +155,22 @@ declare class Table {
|
|
|
145
155
|
* @param e Keyboard event
|
|
146
156
|
*/
|
|
147
157
|
private onCellKeyDown;
|
|
158
|
+
/**
|
|
159
|
+
* Opens a cell context menu if configured and enabled.
|
|
160
|
+
*
|
|
161
|
+
* @param tableCell
|
|
162
|
+
* The target cell.
|
|
163
|
+
*
|
|
164
|
+
* @param clientX
|
|
165
|
+
* The viewport X coordinate for anchoring.
|
|
166
|
+
*
|
|
167
|
+
* @param clientY
|
|
168
|
+
* The viewport Y coordinate for anchoring.
|
|
169
|
+
*
|
|
170
|
+
* @returns
|
|
171
|
+
* True if the menu was opened.
|
|
172
|
+
*/
|
|
173
|
+
private openCellContextMenu;
|
|
148
174
|
/**
|
|
149
175
|
* Scrolls the table to the specified row.
|
|
150
176
|
*
|
|
@@ -194,7 +220,7 @@ declare class Table {
|
|
|
194
220
|
* @param id
|
|
195
221
|
* The ID of the row.
|
|
196
222
|
*/
|
|
197
|
-
getRow(id:
|
|
223
|
+
getRow(id: RowId): TableRow | undefined;
|
|
198
224
|
}
|
|
199
225
|
/**
|
|
200
226
|
* Represents the metadata of the viewport state. It is used to save the
|