@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type { DataEventDetail } from '../DataEvent';
|
|
2
2
|
import type { RangeModifierOptions } from './RangeModifierOptions';
|
|
3
3
|
import DataModifier from './DataModifier.js';
|
|
4
4
|
import DataTable from '../DataTable.js';
|
|
@@ -13,7 +13,7 @@ declare class RangeModifier extends DataModifier {
|
|
|
13
13
|
/**
|
|
14
14
|
* Constructs an instance of the range modifier.
|
|
15
15
|
*
|
|
16
|
-
* @param {Partial<
|
|
16
|
+
* @param {Partial<RangeModifierOptions>} [options]
|
|
17
17
|
* Options to configure the range modifier.
|
|
18
18
|
*/
|
|
19
19
|
constructor(options?: Partial<RangeModifierOptions>);
|
|
@@ -29,14 +29,14 @@ declare class RangeModifier extends DataModifier {
|
|
|
29
29
|
* @param {DataTable} table
|
|
30
30
|
* Table to modify.
|
|
31
31
|
*
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {DataEventDetail} [eventDetail]
|
|
33
33
|
* Custom information for pending events.
|
|
34
34
|
*
|
|
35
35
|
* @return {DataTable}
|
|
36
36
|
* Table with `modified` property as a reference or modified table, if
|
|
37
37
|
* `modified` property of the original table is undefined.
|
|
38
38
|
*/
|
|
39
|
-
modifyTable(table: DataTable, eventDetail?:
|
|
39
|
+
modifyTable(table: DataTable, eventDetail?: DataEventDetail): DataTable;
|
|
40
40
|
}
|
|
41
41
|
declare module './DataModifierType' {
|
|
42
42
|
interface DataModifierTypes {
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* */
|
|
14
14
|
'use strict';
|
|
15
15
|
import DataModifier from './DataModifier.js';
|
|
16
|
-
import
|
|
17
|
-
const { merge } = U;
|
|
16
|
+
import { merge } from '../../Shared/Utilities.js';
|
|
18
17
|
/* *
|
|
19
18
|
*
|
|
20
19
|
* Class
|
|
@@ -32,7 +31,7 @@ class RangeModifier extends DataModifier {
|
|
|
32
31
|
/**
|
|
33
32
|
* Constructs an instance of the range modifier.
|
|
34
33
|
*
|
|
35
|
-
* @param {Partial<
|
|
34
|
+
* @param {Partial<RangeModifierOptions>} [options]
|
|
36
35
|
* Options to configure the range modifier.
|
|
37
36
|
*/
|
|
38
37
|
constructor(options) {
|
|
@@ -52,7 +51,7 @@ class RangeModifier extends DataModifier {
|
|
|
52
51
|
* @param {DataTable} table
|
|
53
52
|
* Table to modify.
|
|
54
53
|
*
|
|
55
|
-
* @param {
|
|
54
|
+
* @param {DataEventDetail} [eventDetail]
|
|
56
55
|
* Custom information for pending events.
|
|
57
56
|
*
|
|
58
57
|
* @return {DataTable}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type { DataEventDetail } from '../DataEvent';
|
|
2
2
|
import type SortModifierOptions from './SortModifierOptions';
|
|
3
3
|
import DataModifier from './DataModifier.js';
|
|
4
|
-
import DataTable from '../DataTable.js';
|
|
4
|
+
import DataTable, { type Row as DataTableRow } from '../DataTable.js';
|
|
5
5
|
/** @private */
|
|
6
6
|
interface SortRowReference {
|
|
7
7
|
index: number;
|
|
8
|
-
row:
|
|
8
|
+
row: DataTableRow;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Sort table rows according to values of a column.
|
|
@@ -22,7 +22,7 @@ declare class SortModifier extends DataModifier {
|
|
|
22
22
|
/**
|
|
23
23
|
* Constructs an instance of the sort modifier.
|
|
24
24
|
*
|
|
25
|
-
* @param {Partial<
|
|
25
|
+
* @param {Partial<SortModifierOptions>} [options]
|
|
26
26
|
* Options to configure the sort modifier.
|
|
27
27
|
*/
|
|
28
28
|
constructor(options?: Partial<SortModifierOptions>);
|
|
@@ -35,16 +35,11 @@ declare class SortModifier extends DataModifier {
|
|
|
35
35
|
* @param {Highcharts.DataTable} table
|
|
36
36
|
* Table with rows to reference.
|
|
37
37
|
*
|
|
38
|
-
* @return {Array<
|
|
38
|
+
* @return {Array<SortRowReference>}
|
|
39
39
|
* Array of row references.
|
|
40
40
|
*/
|
|
41
41
|
protected getRowReferences(table: DataTable): Array<SortRowReference>;
|
|
42
|
-
modifyTable(table: DataTable, eventDetail?:
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Additionally provided types for modifier events and options.
|
|
46
|
-
*/
|
|
47
|
-
declare namespace SortModifier {
|
|
42
|
+
modifyTable(table: DataTable, eventDetail?: DataEventDetail): DataTable;
|
|
48
43
|
}
|
|
49
44
|
declare module './DataModifierType' {
|
|
50
45
|
interface DataModifierTypes {
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* */
|
|
14
14
|
'use strict';
|
|
15
15
|
import DataModifier from './DataModifier.js';
|
|
16
|
-
import
|
|
17
|
-
const { merge } = U;
|
|
16
|
+
import { merge } from '../../Shared/Utilities.js';
|
|
18
17
|
/* *
|
|
19
18
|
*
|
|
20
19
|
* Class
|
|
@@ -59,7 +58,7 @@ class SortModifier extends DataModifier {
|
|
|
59
58
|
/**
|
|
60
59
|
* Constructs an instance of the sort modifier.
|
|
61
60
|
*
|
|
62
|
-
* @param {Partial<
|
|
61
|
+
* @param {Partial<SortModifierOptions>} [options]
|
|
63
62
|
* Options to configure the sort modifier.
|
|
64
63
|
*/
|
|
65
64
|
constructor(options) {
|
|
@@ -79,7 +78,7 @@ class SortModifier extends DataModifier {
|
|
|
79
78
|
* @param {Highcharts.DataTable} table
|
|
80
79
|
* Table with rows to reference.
|
|
81
80
|
*
|
|
82
|
-
* @return {Array<
|
|
81
|
+
* @return {Array<SortRowReference>}
|
|
83
82
|
* Array of row references.
|
|
84
83
|
*/
|
|
85
84
|
getRowReferences(table) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type DataModifierOptions from './DataModifierOptions';
|
|
2
|
-
import type
|
|
2
|
+
import type { CellType as DataTableCellType } from '../DataTable';
|
|
3
3
|
/**
|
|
4
4
|
* Definition of a sorting level when sorting by multiple columns.
|
|
5
5
|
*/
|
|
@@ -17,7 +17,7 @@ export interface SortModifierOrderByOption {
|
|
|
17
17
|
* Custom compare function for this level. If not set, the modifier-level
|
|
18
18
|
* `compare` is used.
|
|
19
19
|
*/
|
|
20
|
-
compare?: (a:
|
|
20
|
+
compare?: (a: DataTableCellType, b: DataTableCellType) => number;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Base options shared by sorting modifiers.
|
|
@@ -48,7 +48,7 @@ export interface SortModifierBaseOptions extends DataModifierOptions {
|
|
|
48
48
|
* A number indicating whether the first value (`a`) is less than (`-1`),
|
|
49
49
|
* equal to (`0`), or greater than (`1`) the second value (`b`).
|
|
50
50
|
*/
|
|
51
|
-
compare?: (a:
|
|
51
|
+
compare?: (a: DataTableCellType, b: DataTableCellType) => number;
|
|
52
52
|
/**
|
|
53
53
|
* Column to update with order index instead of change order of rows.
|
|
54
54
|
*/
|
|
@@ -20,10 +20,9 @@ import Globals from '../Globals.js';
|
|
|
20
20
|
import ColumnFiltering from '../Table/Actions/ColumnFiltering/ColumnFiltering.js';
|
|
21
21
|
import GridUtils from '../GridUtils.js';
|
|
22
22
|
import AST from '../../../Core/Renderer/HTML/AST.js';
|
|
23
|
-
import U from '../../../Core/Utilities.js';
|
|
24
23
|
import HTMLU from '../../../Accessibility/Utils/HTMLUtilities.js';
|
|
24
|
+
import { internalClearTimeout, replaceNested } from '../../../Shared/Utilities.js';
|
|
25
25
|
const { formatText } = GridUtils;
|
|
26
|
-
const { replaceNested } = U;
|
|
27
26
|
const { getHeadingTagNameForElement } = HTMLU;
|
|
28
27
|
/**
|
|
29
28
|
* Representing the accessibility functionalities for the Data Grid.
|
|
@@ -87,7 +86,7 @@ class Accessibility {
|
|
|
87
86
|
*/
|
|
88
87
|
announce(msg, assertive = false) {
|
|
89
88
|
if (this.announcerTimeout) {
|
|
90
|
-
|
|
89
|
+
internalClearTimeout(this.announcerTimeout);
|
|
91
90
|
}
|
|
92
91
|
this.announcerElement.remove();
|
|
93
92
|
this.announcerElement.setAttribute('aria-live', assertive ? 'assertive' : 'polite');
|
|
@@ -213,13 +212,13 @@ class Accessibility {
|
|
|
213
212
|
/**
|
|
214
213
|
* Set a11y options for the Grid.
|
|
215
214
|
*/
|
|
216
|
-
setA11yOptions() {
|
|
215
|
+
async setA11yOptions() {
|
|
217
216
|
const grid = this.grid;
|
|
218
217
|
const tableEl = grid.tableElement;
|
|
219
218
|
if (!tableEl) {
|
|
220
219
|
return;
|
|
221
220
|
}
|
|
222
|
-
tableEl.setAttribute('aria-rowcount', grid.
|
|
221
|
+
tableEl.setAttribute('aria-rowcount', await grid.dataProvider?.getRowCount() || 0);
|
|
223
222
|
if (grid.captionElement) {
|
|
224
223
|
tableEl.setAttribute('aria-labelledby', grid.captionElement.id);
|
|
225
224
|
}
|
|
@@ -393,7 +392,7 @@ class Accessibility {
|
|
|
393
392
|
}
|
|
394
393
|
this.element.remove();
|
|
395
394
|
this.announcerElement.remove();
|
|
396
|
-
|
|
395
|
+
internalClearTimeout(this.announcerTimeout);
|
|
397
396
|
}
|
|
398
397
|
}
|
|
399
398
|
/* *
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { RowObject as RowObjectType, CellType as DataTableCellType, Column as DataTableColumnType } from '../../../Data/DataTable';
|
|
2
|
+
import type QueryingController from '../Querying/QueryingController';
|
|
3
|
+
import type { ColumnDataType } from '../Table/Column';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for Grid data providers.
|
|
6
|
+
*
|
|
7
|
+
* Data providers are responsible for serving data to the grid, applying query
|
|
8
|
+
* modifiers and persisting edits.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class DataProvider {
|
|
11
|
+
/**
|
|
12
|
+
* Querying controller used to build and apply modifiers.
|
|
13
|
+
*/
|
|
14
|
+
protected readonly querying: QueryingController;
|
|
15
|
+
/**
|
|
16
|
+
* Provider options as passed via `grid.options.data`.
|
|
17
|
+
*/
|
|
18
|
+
protected readonly options: DataProviderOptions;
|
|
19
|
+
constructor(queryingController: QueryingController, options: DataProviderOptions);
|
|
20
|
+
/**
|
|
21
|
+
* Initializes the data provider.
|
|
22
|
+
*/
|
|
23
|
+
init(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns all available column IDs.
|
|
26
|
+
*/
|
|
27
|
+
abstract getColumnIds(): Promise<string[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns a stable row id for a given row index (as used by the viewport).
|
|
30
|
+
*/
|
|
31
|
+
abstract getRowId(rowIndex: number): Promise<RowId | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the current row index for a given stable row id.
|
|
34
|
+
*/
|
|
35
|
+
abstract getRowIndex(rowId: RowId): Promise<number | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns a row as an object keyed by column IDs.
|
|
38
|
+
*/
|
|
39
|
+
abstract getRowObject(rowIndex: number): Promise<RowObjectType | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the current number of rows in the presentation dataset (after
|
|
42
|
+
* applying all query modifiers).
|
|
43
|
+
*/
|
|
44
|
+
abstract getRowCount(): Promise<number>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the assumed / configured data type for a column.
|
|
47
|
+
*/
|
|
48
|
+
abstract getColumnDataType(columnId: string): Promise<ColumnDataType>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns a cell value for a given column and row index.
|
|
51
|
+
*/
|
|
52
|
+
abstract getValue(columnId: string, rowIndex: number): Promise<DataTableCellType>;
|
|
53
|
+
/**
|
|
54
|
+
* Persists a cell value for a given row id.
|
|
55
|
+
*/
|
|
56
|
+
abstract setValue(value: DataTableCellType, columnId: string, rowId: RowId): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Applies the current query modifiers to update the provider's presentation
|
|
59
|
+
* state.
|
|
60
|
+
*/
|
|
61
|
+
abstract applyQuery(): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Destroys the provider and releases resources.
|
|
64
|
+
*/
|
|
65
|
+
abstract destroy(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Returns the number of items before pagination has been applied.
|
|
68
|
+
*/
|
|
69
|
+
getPrePaginationRowCount(): Promise<number>;
|
|
70
|
+
/**
|
|
71
|
+
* Helper method to assume the data type of a column based on the sample
|
|
72
|
+
* of the column data.
|
|
73
|
+
*
|
|
74
|
+
* @param columnSample
|
|
75
|
+
* The sample of the column data to determine the data type from.
|
|
76
|
+
*
|
|
77
|
+
* @param columnId
|
|
78
|
+
* The id of the column to determine the data type for.
|
|
79
|
+
*/
|
|
80
|
+
protected static assumeColumnDataType(columnSample: DataTableColumnType, columnId: string): ColumnDataType;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A type for the row ID.
|
|
84
|
+
*/
|
|
85
|
+
export type RowId = number | string;
|
|
86
|
+
/**
|
|
87
|
+
* A base interface for the data provider options (`grid.options.data`).
|
|
88
|
+
*/
|
|
89
|
+
export interface DataProviderOptions {
|
|
90
|
+
/**
|
|
91
|
+
* The type of the data provider.
|
|
92
|
+
*
|
|
93
|
+
* @default 'local'
|
|
94
|
+
*/
|
|
95
|
+
providerType?: string;
|
|
96
|
+
}
|
|
97
|
+
export default DataProvider;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* Data Provider abstract class
|
|
4
|
+
*
|
|
5
|
+
* (c) 2020-2025 Highsoft AS
|
|
6
|
+
*
|
|
7
|
+
* License: www.highcharts.com/license
|
|
8
|
+
*
|
|
9
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
|
+
*
|
|
11
|
+
* Authors:
|
|
12
|
+
* - Dawid Dragula
|
|
13
|
+
*
|
|
14
|
+
* */
|
|
15
|
+
'use strict';
|
|
16
|
+
import { defined } from '../../../Shared/Utilities.js';
|
|
17
|
+
/**
|
|
18
|
+
* Base class for Grid data providers.
|
|
19
|
+
*
|
|
20
|
+
* Data providers are responsible for serving data to the grid, applying query
|
|
21
|
+
* modifiers and persisting edits.
|
|
22
|
+
*/
|
|
23
|
+
export class DataProvider {
|
|
24
|
+
/* *
|
|
25
|
+
*
|
|
26
|
+
* Constructor
|
|
27
|
+
*
|
|
28
|
+
* */
|
|
29
|
+
constructor(queryingController, options) {
|
|
30
|
+
this.querying = queryingController;
|
|
31
|
+
this.options = options;
|
|
32
|
+
}
|
|
33
|
+
/* *
|
|
34
|
+
*
|
|
35
|
+
* Methods
|
|
36
|
+
*
|
|
37
|
+
* */
|
|
38
|
+
/**
|
|
39
|
+
* Initializes the data provider.
|
|
40
|
+
*/
|
|
41
|
+
init() {
|
|
42
|
+
return Promise.resolve();
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Returns the number of items before pagination has been applied.
|
|
46
|
+
*/
|
|
47
|
+
async getPrePaginationRowCount() {
|
|
48
|
+
return await this.getRowCount();
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Helper method to assume the data type of a column based on the sample
|
|
52
|
+
* of the column data.
|
|
53
|
+
*
|
|
54
|
+
* @param columnSample
|
|
55
|
+
* The sample of the column data to determine the data type from.
|
|
56
|
+
*
|
|
57
|
+
* @param columnId
|
|
58
|
+
* The id of the column to determine the data type for.
|
|
59
|
+
*/
|
|
60
|
+
static assumeColumnDataType(columnSample, columnId) {
|
|
61
|
+
for (let i = 0, iEnd = columnSample.length; i < iEnd; ++i) {
|
|
62
|
+
if (!defined(columnSample[i])) {
|
|
63
|
+
// If the data is null or undefined, we should look
|
|
64
|
+
// at the next value to determine the type.
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
switch (typeof columnSample[i]) {
|
|
68
|
+
case 'number':
|
|
69
|
+
return 'number';
|
|
70
|
+
case 'boolean':
|
|
71
|
+
return 'boolean';
|
|
72
|
+
default:
|
|
73
|
+
return 'string';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// eslint-disable-next-line no-console
|
|
77
|
+
console.warn(`Column "${columnId}" sample does not contain any defined ` +
|
|
78
|
+
'values; defaulting dataType to "string". Set `dataType` option ' +
|
|
79
|
+
'for the column to determine the data type and avoid unnecessary ' +
|
|
80
|
+
'column scanning.');
|
|
81
|
+
return 'string';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/* *
|
|
85
|
+
*
|
|
86
|
+
* Default Export
|
|
87
|
+
*
|
|
88
|
+
* */
|
|
89
|
+
export default DataProvider;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DataProviderTypeRegistry } from './DataProviderType';
|
|
2
|
+
/**
|
|
3
|
+
* Record of data provider classes
|
|
4
|
+
*/
|
|
5
|
+
export declare const types: DataProviderTypeRegistry;
|
|
6
|
+
/**
|
|
7
|
+
* Method used to register new data provider classes.
|
|
8
|
+
*
|
|
9
|
+
* @param key
|
|
10
|
+
* Registry key of the data provider class.
|
|
11
|
+
*
|
|
12
|
+
* @param DataProviderClass
|
|
13
|
+
* Data provider class (aka class constructor) to register.
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerDataProvider<T extends keyof DataProviderTypeRegistry>(key: T, DataProviderClass: DataProviderTypeRegistry[T]): boolean;
|
|
16
|
+
declare const _default: {
|
|
17
|
+
readonly registerDataProvider: typeof registerDataProvider;
|
|
18
|
+
readonly types: DataProviderTypeRegistry;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* Data Provider Registry
|
|
4
|
+
*
|
|
5
|
+
* (c) 2020-2025 Highsoft AS
|
|
6
|
+
*
|
|
7
|
+
* License: www.highcharts.com/license
|
|
8
|
+
*
|
|
9
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
|
+
*
|
|
11
|
+
* Authors:
|
|
12
|
+
* - Dawid Dragula
|
|
13
|
+
*
|
|
14
|
+
* */
|
|
15
|
+
'use strict';
|
|
16
|
+
/* *
|
|
17
|
+
*
|
|
18
|
+
* Constants
|
|
19
|
+
*
|
|
20
|
+
* */
|
|
21
|
+
/**
|
|
22
|
+
* Record of data provider classes
|
|
23
|
+
*/
|
|
24
|
+
export const types = {};
|
|
25
|
+
/* *
|
|
26
|
+
*
|
|
27
|
+
* Functions
|
|
28
|
+
*
|
|
29
|
+
* */
|
|
30
|
+
/**
|
|
31
|
+
* Method used to register new data provider classes.
|
|
32
|
+
*
|
|
33
|
+
* @param key
|
|
34
|
+
* Registry key of the data provider class.
|
|
35
|
+
*
|
|
36
|
+
* @param DataProviderClass
|
|
37
|
+
* Data provider class (aka class constructor) to register.
|
|
38
|
+
*/
|
|
39
|
+
export function registerDataProvider(key, DataProviderClass) {
|
|
40
|
+
return (!!key &&
|
|
41
|
+
!types[key] &&
|
|
42
|
+
!!(types[key] = DataProviderClass));
|
|
43
|
+
}
|
|
44
|
+
/* *
|
|
45
|
+
*
|
|
46
|
+
* Default Export
|
|
47
|
+
*
|
|
48
|
+
* */
|
|
49
|
+
export default {
|
|
50
|
+
registerDataProvider,
|
|
51
|
+
types
|
|
52
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains all possible class types of the data provider registry.
|
|
3
|
+
*/
|
|
4
|
+
export type DataProviderClassType = DataProviderTypeRegistry[keyof DataProviderTypeRegistry];
|
|
5
|
+
/**
|
|
6
|
+
* Contains all possible types of the class registry.
|
|
7
|
+
*/
|
|
8
|
+
export type DataProviderType = DataProviderClassType['prototype'];
|
|
9
|
+
/**
|
|
10
|
+
* Union of all possible options of the data providers in the registry.
|
|
11
|
+
*/
|
|
12
|
+
export type DataProviderOptionsType = DataProviderType['options'];
|
|
13
|
+
/**
|
|
14
|
+
* Describes the class registry as a record object with class name and their
|
|
15
|
+
* class types (aka class constructor).
|
|
16
|
+
*/
|
|
17
|
+
export interface DataProviderTypeRegistry {
|
|
18
|
+
}
|
|
19
|
+
export default DataProviderType;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* Data Provider Type
|
|
4
|
+
*
|
|
5
|
+
* (c) 2020-2025 Highsoft AS
|
|
6
|
+
*
|
|
7
|
+
* License: www.highcharts.com/license
|
|
8
|
+
*
|
|
9
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
|
+
*
|
|
11
|
+
* Authors:
|
|
12
|
+
* - Dawid Dragula
|
|
13
|
+
*
|
|
14
|
+
* */
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { DataProviderOptions, RowId } from './DataProvider';
|
|
2
|
+
import { DataTableValue } from '../../../Data/DataTableOptions';
|
|
3
|
+
import type { ColumnDataType } from '../Table/Column';
|
|
4
|
+
import type { RowObject as RowObjectType, CellType as DataTableCellType } from '../../../Data/DataTable';
|
|
5
|
+
import type DataConnectorType from '../../../Data/Connectors/DataConnectorType';
|
|
6
|
+
import type { DataConnectorTypeOptions } from '../../../Data/Connectors/DataConnectorType';
|
|
7
|
+
import type { MakeOptional, TypedArray } from '../../../Shared/Types';
|
|
8
|
+
import { DataProvider } from './DataProvider.js';
|
|
9
|
+
import DataTable from '../../../Data/DataTable.js';
|
|
10
|
+
/**
|
|
11
|
+
* Local data provider for the Grid.
|
|
12
|
+
*
|
|
13
|
+
* Uses a DataTable instances to serve data to the grid, applying query
|
|
14
|
+
* modifiers and persisting edits locally.
|
|
15
|
+
*/
|
|
16
|
+
export declare class LocalDataProvider extends DataProvider {
|
|
17
|
+
static readonly tableChangeEventNames: readonly ["afterDeleteColumns", "afterDeleteRows", "afterSetCell", "afterSetColumns", "afterSetRows"];
|
|
18
|
+
/**
|
|
19
|
+
* The provider options.
|
|
20
|
+
*/
|
|
21
|
+
readonly options: LocalDataProviderOptions;
|
|
22
|
+
/**
|
|
23
|
+
* The original table. Mutations (e.g. setValue) are applied here.
|
|
24
|
+
*/
|
|
25
|
+
private dataTable?;
|
|
26
|
+
/**
|
|
27
|
+
* The connector instance used to populate the table.
|
|
28
|
+
*/
|
|
29
|
+
private connector?;
|
|
30
|
+
/**
|
|
31
|
+
* The presentation table after applying query modifiers.
|
|
32
|
+
*/
|
|
33
|
+
private presentationTable?;
|
|
34
|
+
/**
|
|
35
|
+
* The row count before pagination is applied.
|
|
36
|
+
*/
|
|
37
|
+
private prePaginationRowCount?;
|
|
38
|
+
/**
|
|
39
|
+
* Unbind callbacks for DataTable events.
|
|
40
|
+
*/
|
|
41
|
+
private dataTableEventDestructors;
|
|
42
|
+
/**
|
|
43
|
+
* Unbind callbacks for connector events.
|
|
44
|
+
*/
|
|
45
|
+
private connectorEventDestructors;
|
|
46
|
+
/**
|
|
47
|
+
* Map of row IDs (from `idColumn`) to original data table row indexes.
|
|
48
|
+
* Set only when `options.idColumn` is configured.
|
|
49
|
+
*/
|
|
50
|
+
private originalRowIndexesMap?;
|
|
51
|
+
init(): Promise<void>;
|
|
52
|
+
private initDataTable;
|
|
53
|
+
private setDataTable;
|
|
54
|
+
private handleTableChange;
|
|
55
|
+
private clearDataTableEvents;
|
|
56
|
+
private clearConnector;
|
|
57
|
+
private initConnector;
|
|
58
|
+
getColumnIds(): Promise<string[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the row ID for a given local row index. If not found, returns
|
|
61
|
+
* `undefined`.
|
|
62
|
+
*
|
|
63
|
+
* If the `data.idColumn` option is set, the row ID is the value of the
|
|
64
|
+
* row in the column with the given ID. Otherwise, the row ID is the
|
|
65
|
+
* original row index.
|
|
66
|
+
*
|
|
67
|
+
* @param rowIndex
|
|
68
|
+
* The local (presentation table) row index to get the row ID for.
|
|
69
|
+
*/
|
|
70
|
+
getRowId(rowIndex: number): Promise<RowId | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* Returns the local (presentation table) row index for a given row ID. If
|
|
73
|
+
* not found, returns `undefined`.
|
|
74
|
+
*
|
|
75
|
+
* @param rowId
|
|
76
|
+
* The row ID to get the row index for. If the `data.idColumn` option is
|
|
77
|
+
* set, the row ID is the value of the row in the column with the given ID.
|
|
78
|
+
* Otherwise, the row ID is the original row index.
|
|
79
|
+
*/
|
|
80
|
+
getRowIndex(rowId: RowId): Promise<number | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* Returns the original row index for a given local row index.
|
|
83
|
+
*
|
|
84
|
+
* @param localRowIndex
|
|
85
|
+
* The local row index to get the original row index for.
|
|
86
|
+
*/
|
|
87
|
+
getOriginalRowIndexFromLocal(localRowIndex: number): Promise<number | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the local (presentation table) row index for a given original
|
|
90
|
+
* data table row index.
|
|
91
|
+
*
|
|
92
|
+
* @param originalRowIndex
|
|
93
|
+
* The original data table row index to get the presentation table row index
|
|
94
|
+
* for.
|
|
95
|
+
*/
|
|
96
|
+
getLocalRowIndexFromOriginal(originalRowIndex: number): Promise<number | undefined>;
|
|
97
|
+
getRowObject(rowIndex: number): Promise<RowObjectType | undefined>;
|
|
98
|
+
getPrePaginationRowCount(): Promise<number>;
|
|
99
|
+
getRowCount(): Promise<number>;
|
|
100
|
+
getValue(columnId: string, rowIndex: number): Promise<DataTableCellType>;
|
|
101
|
+
setValue(value: DataTableCellType, columnId: string, rowId: RowId): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Applies querying modifiers and updates the presentation table.
|
|
104
|
+
*/
|
|
105
|
+
applyQuery(): Promise<void>;
|
|
106
|
+
destroy(): void;
|
|
107
|
+
getColumnDataType(columnId: string): Promise<ColumnDataType>;
|
|
108
|
+
/**
|
|
109
|
+
* Returns the current data table. When `presentation` is `true`, returns
|
|
110
|
+
* the presentation table (after modifiers).
|
|
111
|
+
*
|
|
112
|
+
* @param presentation
|
|
113
|
+
* Whether to return the presentation table (after modifiers).
|
|
114
|
+
*
|
|
115
|
+
* @return
|
|
116
|
+
* The data table.
|
|
117
|
+
*/
|
|
118
|
+
getDataTable(presentation?: boolean): DataTable | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Checks if the object is an instance of DataConnector.
|
|
121
|
+
*
|
|
122
|
+
* @param connector
|
|
123
|
+
* The object to check.
|
|
124
|
+
*
|
|
125
|
+
* @returns `true` if the object is an instance of DataConnector, `false`
|
|
126
|
+
* otherwise.
|
|
127
|
+
*/
|
|
128
|
+
private static isConnectorInstance;
|
|
129
|
+
}
|
|
130
|
+
export type GridDataConnectorTypeOptions = MakeOptional<DataConnectorTypeOptions, 'id'>;
|
|
131
|
+
export interface LocalDataProviderOptions extends DataProviderOptions {
|
|
132
|
+
providerType?: 'local';
|
|
133
|
+
/**
|
|
134
|
+
* Data table as a source of data for the grid.
|
|
135
|
+
*/
|
|
136
|
+
dataTable?: DataTable;
|
|
137
|
+
/**
|
|
138
|
+
* Connector instance or options used to populate the data table.
|
|
139
|
+
*/
|
|
140
|
+
connector?: GridDataConnectorTypeOptions | DataConnectorType;
|
|
141
|
+
/**
|
|
142
|
+
* Columns data to initialize the Grid with.
|
|
143
|
+
*/
|
|
144
|
+
columns?: Record<string, Array<DataTableValue> | TypedArray>;
|
|
145
|
+
/**
|
|
146
|
+
* Automatically update the grid when the data table changes. It is disabled
|
|
147
|
+
* by default unles the pagination is enabled.
|
|
148
|
+
*
|
|
149
|
+
* Use this option if you want the polling to update the grid when the data
|
|
150
|
+
* table changes.
|
|
151
|
+
*
|
|
152
|
+
* @default false
|
|
153
|
+
*/
|
|
154
|
+
updateOnChange?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* The column ID that contains the stable, unique row IDs. If not
|
|
157
|
+
* provided, the original row index is used as the row ID.
|
|
158
|
+
*/
|
|
159
|
+
idColumn?: string;
|
|
160
|
+
}
|
|
161
|
+
declare module './DataProviderType' {
|
|
162
|
+
interface DataProviderTypeRegistry {
|
|
163
|
+
local: typeof LocalDataProvider;
|
|
164
|
+
}
|
|
165
|
+
}
|