@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 { DataEventCallback, DataEventEmitter } from './DataEvent';
|
|
2
2
|
import type DataConnectorType from './Connectors/DataConnectorType';
|
|
3
3
|
import type { DataConnectorTypeOptions } from './Connectors/DataConnectorType';
|
|
4
4
|
import type DataPoolOptions from './DataPoolOptions';
|
|
@@ -11,7 +11,7 @@ import type DataPoolOptions from './DataPoolOptions';
|
|
|
11
11
|
* @param {DataPoolOptions} options
|
|
12
12
|
* Pool options with all connectors.
|
|
13
13
|
*/
|
|
14
|
-
declare class DataPool implements
|
|
14
|
+
declare class DataPool implements DataEventEmitter<Event> {
|
|
15
15
|
protected static readonly defaultOptions: DataPoolOptions;
|
|
16
16
|
/**
|
|
17
17
|
* Internal dictionary with the connectors and their IDs.
|
|
@@ -31,10 +31,10 @@ declare class DataPool implements DataEvent.Emitter<DataPool.Event> {
|
|
|
31
31
|
* Emits an event on this data pool to all registered callbacks of the given
|
|
32
32
|
* event.
|
|
33
33
|
*
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {DataTableEvent} e
|
|
35
35
|
* Event object with event information.
|
|
36
36
|
*/
|
|
37
|
-
emit(e:
|
|
37
|
+
emit(e: Event): void;
|
|
38
38
|
/**
|
|
39
39
|
* Loads the connector.
|
|
40
40
|
*
|
|
@@ -110,21 +110,14 @@ declare class DataPool implements DataEvent.Emitter<DataPool.Event> {
|
|
|
110
110
|
* @return {Function}
|
|
111
111
|
* Function to unregister callback from the event.
|
|
112
112
|
*/
|
|
113
|
-
on<T extends
|
|
113
|
+
on<T extends Event['type']>(type: T, callback: DataEventCallback<this, Extract<Event, {
|
|
114
114
|
type: T;
|
|
115
115
|
}>>): Function;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*
|
|
119
|
-
* @param options
|
|
120
|
-
* Connector options to set.
|
|
121
|
-
*/
|
|
122
|
-
setConnectorOptions(options: DataConnectorTypeOptions): void;
|
|
116
|
+
setConnectorOptions(options: DataConnectorTypeOptions, update?: boolean): void;
|
|
117
|
+
setConnectorOptions(options: DataConnectorTypeOptions, update: true): Promise<void>;
|
|
123
118
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
options: DataConnectorTypeOptions;
|
|
128
|
-
}
|
|
119
|
+
export interface Event {
|
|
120
|
+
type: ('load' | 'afterLoad' | 'setConnectorOptions' | 'afterSetConnectorOptions');
|
|
121
|
+
options: DataConnectorTypeOptions;
|
|
129
122
|
}
|
|
130
123
|
export default DataPool;
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
* */
|
|
13
13
|
'use strict';
|
|
14
14
|
import DataConnector from './Connectors/DataConnector.js';
|
|
15
|
-
import
|
|
16
|
-
const { addEvent, fireEvent, merge } = U;
|
|
15
|
+
import { addEvent, fireEvent, merge } from '../Shared/Utilities.js';
|
|
17
16
|
/* *
|
|
18
17
|
*
|
|
19
18
|
* Class
|
|
@@ -48,7 +47,7 @@ class DataPool {
|
|
|
48
47
|
* Emits an event on this data pool to all registered callbacks of the given
|
|
49
48
|
* event.
|
|
50
49
|
*
|
|
51
|
-
* @param {
|
|
50
|
+
* @param {DataTableEvent} e
|
|
52
51
|
* Event object with event information.
|
|
53
52
|
*/
|
|
54
53
|
emit(e) {
|
|
@@ -215,8 +214,12 @@ class DataPool {
|
|
|
215
214
|
*
|
|
216
215
|
* @param options
|
|
217
216
|
* Connector options to set.
|
|
217
|
+
*
|
|
218
|
+
* @param update
|
|
219
|
+
* Whether to update the existing connector with the new options and reload
|
|
220
|
+
* it (`true`) or replace it with a new connector instance (`false`).
|
|
218
221
|
*/
|
|
219
|
-
setConnectorOptions(options) {
|
|
222
|
+
async setConnectorOptions(options, update) {
|
|
220
223
|
const connectorsOptions = this.options.connectors;
|
|
221
224
|
const connectorsInstances = this.connectors;
|
|
222
225
|
this.emit({
|
|
@@ -229,12 +232,20 @@ class DataPool {
|
|
|
229
232
|
break;
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
|
-
|
|
233
|
-
if (
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
let existingConnector = connectorsInstances[options.id];
|
|
236
|
+
if (existingConnector) {
|
|
237
|
+
if (update) {
|
|
238
|
+
await existingConnector.update(options, true);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
existingConnector.stopPolling();
|
|
242
|
+
existingConnector = void 0;
|
|
243
|
+
delete connectorsInstances[options.id];
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (!existingConnector) {
|
|
247
|
+
connectorsOptions.push(options);
|
|
236
248
|
}
|
|
237
|
-
connectorsOptions.push(options);
|
|
238
249
|
this.emit({
|
|
239
250
|
type: 'afterSetConnectorOptions',
|
|
240
251
|
options
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type DataEvent from './DataEvent';
|
|
1
|
+
import type { DataEvent, DataEventCallback, DataEventDetail, DataEventEmitter } from './DataEvent';
|
|
2
2
|
import type DataModifier from './Modifiers/DataModifier';
|
|
3
3
|
import type DataTableOptions from './DataTableOptions';
|
|
4
4
|
import type { DataTableValue } from './DataTableOptions';
|
|
@@ -15,7 +15,7 @@ import DataTableCore from './DataTableCore.js';
|
|
|
15
15
|
* @param {Highcharts.DataTableOptions} [options]
|
|
16
16
|
* Options to initialize the new DataTable instance.
|
|
17
17
|
*/
|
|
18
|
-
declare class DataTable extends DataTableCore implements
|
|
18
|
+
declare class DataTable extends DataTableCore implements DataEventEmitter<Event> {
|
|
19
19
|
constructor(options?: DataTableOptions);
|
|
20
20
|
private modifier?;
|
|
21
21
|
private localRowIndexes?;
|
|
@@ -40,7 +40,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
40
40
|
* @emits #cloneTable
|
|
41
41
|
* @emits #afterCloneTable
|
|
42
42
|
*/
|
|
43
|
-
clone(skipColumns?: boolean, eventDetail?:
|
|
43
|
+
clone(skipColumns?: boolean, eventDetail?: DataEventDetail): DataTable;
|
|
44
44
|
/**
|
|
45
45
|
* Deletes columns from the table.
|
|
46
46
|
*
|
|
@@ -59,7 +59,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
59
59
|
* @emits #deleteColumns
|
|
60
60
|
* @emits #afterDeleteColumns
|
|
61
61
|
*/
|
|
62
|
-
deleteColumns(columnIds?: Array<string>, eventDetail?:
|
|
62
|
+
deleteColumns(columnIds?: Array<string>, eventDetail?: DataEventDetail): (ColumnCollection | undefined);
|
|
63
63
|
/**
|
|
64
64
|
* Deletes the row index references. This is useful when the original table
|
|
65
65
|
* is deleted, and the references are no longer needed. This table is
|
|
@@ -88,16 +88,16 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
88
88
|
* @emits #deleteRows
|
|
89
89
|
* @emits #afterDeleteRows
|
|
90
90
|
*/
|
|
91
|
-
deleteRows(rowIndex?: number | number[], rowCount?: number, eventDetail?:
|
|
91
|
+
deleteRows(rowIndex?: number | number[], rowCount?: number, eventDetail?: DataEventDetail): Array<Row>;
|
|
92
92
|
/**
|
|
93
93
|
* Emits an event on this table to all registered callbacks of the given
|
|
94
94
|
* event.
|
|
95
95
|
* @private
|
|
96
96
|
*
|
|
97
|
-
* @param {
|
|
97
|
+
* @param {Event} e
|
|
98
98
|
* Event object with event information.
|
|
99
99
|
*/
|
|
100
|
-
emit(e:
|
|
100
|
+
emit(e: Event): void;
|
|
101
101
|
/**
|
|
102
102
|
* Fetches a single cell value.
|
|
103
103
|
*
|
|
@@ -112,7 +112,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
112
112
|
* @return {Highcharts.DataTableCellType|undefined}
|
|
113
113
|
* Returns the cell value or `undefined`.
|
|
114
114
|
*/
|
|
115
|
-
getCell(columnId: string, rowIndex: number): (
|
|
115
|
+
getCell(columnId: string, rowIndex: number): (CellType | undefined);
|
|
116
116
|
/**
|
|
117
117
|
* Fetches the given column by the canonical column name.
|
|
118
118
|
* This function is a simplified wrap of {@link getColumns}.
|
|
@@ -128,7 +128,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
128
128
|
* @return {Highcharts.DataTableColumn|undefined}
|
|
129
129
|
* A copy of the column, or `undefined` if not found.
|
|
130
130
|
*/
|
|
131
|
-
getColumn(columnId: string, asReference?: boolean): (
|
|
131
|
+
getColumn(columnId: string, asReference?: boolean): (Column | undefined);
|
|
132
132
|
/**
|
|
133
133
|
* Fetches all column IDs.
|
|
134
134
|
*
|
|
@@ -138,9 +138,9 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
138
138
|
* Returns all column IDs.
|
|
139
139
|
*/
|
|
140
140
|
getColumnIds(): Array<string>;
|
|
141
|
-
getColumns(columnIds?: Array<string>, asReference?: boolean):
|
|
142
|
-
getColumns(columnIds: (Array<string> | undefined), asReference: true): Record<string,
|
|
143
|
-
getColumns(columnIds: (Array<string> | undefined), asReference: false, asBasicColumns: true): Record<string,
|
|
141
|
+
getColumns(columnIds?: Array<string>, asReference?: boolean): ColumnCollection;
|
|
142
|
+
getColumns(columnIds: (Array<string> | undefined), asReference: true): Record<string, Column>;
|
|
143
|
+
getColumns(columnIds: (Array<string> | undefined), asReference: false, asBasicColumns: true): Record<string, BasicColumn>;
|
|
144
144
|
/**
|
|
145
145
|
* Takes the original row index and returns the local row index in the
|
|
146
146
|
* modified table for which this function is called.
|
|
@@ -187,7 +187,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
187
187
|
* @return {Highcharts.DataTableRow}
|
|
188
188
|
* Returns the row values, or `undefined` if not found.
|
|
189
189
|
*/
|
|
190
|
-
getRow(rowIndex: number, columnIds?: Array<string>): (
|
|
190
|
+
getRow(rowIndex: number, columnIds?: Array<string>): (Row | undefined);
|
|
191
191
|
/**
|
|
192
192
|
* Returns the number of rows in this table.
|
|
193
193
|
*
|
|
@@ -214,7 +214,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
214
214
|
* @return {number|undefined}
|
|
215
215
|
* Index of the first row matching the cell value.
|
|
216
216
|
*/
|
|
217
|
-
getRowIndexBy(columnId: string, cellValue:
|
|
217
|
+
getRowIndexBy(columnId: string, cellValue: CellType, rowIndexOffset?: number): (number | undefined);
|
|
218
218
|
/**
|
|
219
219
|
* Retrieves the row at a given index. This function is a simplified wrap of
|
|
220
220
|
* {@link getRowObjects}.
|
|
@@ -230,7 +230,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
230
230
|
* @return {Highcharts.DataTableRowObject}
|
|
231
231
|
* Returns the row values, or `undefined` if not found.
|
|
232
232
|
*/
|
|
233
|
-
getRowObject(rowIndex: number, columnIds?: Array<string>): (
|
|
233
|
+
getRowObject(rowIndex: number, columnIds?: Array<string>): (RowObject | undefined);
|
|
234
234
|
/**
|
|
235
235
|
* Fetches all or a number of rows as an object.
|
|
236
236
|
*
|
|
@@ -248,7 +248,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
248
248
|
* @return {Highcharts.DataTableRowObject}
|
|
249
249
|
* Returns retrieved rows.
|
|
250
250
|
*/
|
|
251
|
-
getRowObjects(rowIndex?: number, rowCount?: number, columnIds?: Array<string>): (Array<
|
|
251
|
+
getRowObjects(rowIndex?: number, rowCount?: number, columnIds?: Array<string>): (Array<RowObject>);
|
|
252
252
|
/**
|
|
253
253
|
* Fetches all or a number of rows as an array.
|
|
254
254
|
*
|
|
@@ -266,7 +266,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
266
266
|
* @return {Highcharts.DataTableRow}
|
|
267
267
|
* Returns retrieved rows.
|
|
268
268
|
*/
|
|
269
|
-
getRows(rowIndex?: number, rowCount?: number, columnIds?: Array<string>): (Array<
|
|
269
|
+
getRows(rowIndex?: number, rowCount?: number, columnIds?: Array<string>): (Array<Row>);
|
|
270
270
|
/**
|
|
271
271
|
* Returns the unique version tag of the current state of the table.
|
|
272
272
|
*
|
|
@@ -302,7 +302,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
302
302
|
* @return {boolean}
|
|
303
303
|
* True, if a row has been found, otherwise false.
|
|
304
304
|
*/
|
|
305
|
-
hasRowWith(columnId: string, cellValue:
|
|
305
|
+
hasRowWith(columnId: string, cellValue: CellType): boolean;
|
|
306
306
|
/**
|
|
307
307
|
* Registers a callback function to be executed when a specific event is
|
|
308
308
|
* emitted. To stop listening to the event, call the function returned by
|
|
@@ -319,7 +319,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
319
319
|
* @return {Function}
|
|
320
320
|
* Function to unregister callback from the event.
|
|
321
321
|
*/
|
|
322
|
-
on<T extends
|
|
322
|
+
on<T extends Event['type']>(type: T, callback: DataEventCallback<this, Extract<Event, {
|
|
323
323
|
type: T;
|
|
324
324
|
}>>): Function;
|
|
325
325
|
/**
|
|
@@ -361,7 +361,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
361
361
|
* @emits #setCell
|
|
362
362
|
* @emits #afterSetCell
|
|
363
363
|
*/
|
|
364
|
-
setCell(columnId: string, rowIndex: number, cellValue:
|
|
364
|
+
setCell(columnId: string, rowIndex: number, cellValue: CellType, eventDetail?: DataEventDetail): void;
|
|
365
365
|
/**
|
|
366
366
|
* Replaces or updates multiple columns in the table with new data. If a
|
|
367
367
|
* column does not exist, it will be created and added to the table.
|
|
@@ -386,7 +386,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
386
386
|
* @emits #setColumns
|
|
387
387
|
* @emits #afterSetColumns
|
|
388
388
|
*/
|
|
389
|
-
setColumns(columns:
|
|
389
|
+
setColumns(columns: ColumnCollection, rowIndex?: number, eventDetail?: DataEventDetail, typeAsOriginal?: boolean): void;
|
|
390
390
|
/**
|
|
391
391
|
* Assigns a new data modifier to the table.
|
|
392
392
|
*
|
|
@@ -406,7 +406,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
406
406
|
* @emits #setModifier
|
|
407
407
|
* @emits #afterSetModifier
|
|
408
408
|
*/
|
|
409
|
-
setModifier(modifier?: DataModifier, eventDetail?:
|
|
409
|
+
setModifier(modifier?: DataModifier, eventDetail?: DataEventDetail): Promise<DataTable>;
|
|
410
410
|
/**
|
|
411
411
|
* Sets the original row indexes for the table. It is used to keep the
|
|
412
412
|
* reference to the original rows when modifying the table.
|
|
@@ -442,7 +442,7 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
442
442
|
* @emits #setRows
|
|
443
443
|
* @emits #afterSetRows
|
|
444
444
|
*/
|
|
445
|
-
setRow(row: (
|
|
445
|
+
setRow(row: (Row | RowObject), rowIndex?: number, insert?: boolean, eventDetail?: DataEventDetail): void;
|
|
446
446
|
/**
|
|
447
447
|
* Sets cell values for multiple rows. Will insert new rows, if no index was
|
|
448
448
|
* was provided, or if the index is higher than the total number of table
|
|
@@ -465,99 +465,97 @@ declare class DataTable extends DataTableCore implements DataEvent.Emitter<DataT
|
|
|
465
465
|
* @emits #setRows
|
|
466
466
|
* @emits #afterSetRows
|
|
467
467
|
*/
|
|
468
|
-
setRows(rows: Array<(
|
|
468
|
+
setRows(rows: Array<(Row | RowObject)>, rowIndex?: number, insert?: boolean, eventDetail?: DataEventDetail): void;
|
|
469
469
|
}
|
|
470
470
|
/**
|
|
471
471
|
* Additionally it provides necessary types for events.
|
|
472
472
|
*/
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
readonly modified?: DataTable;
|
|
561
|
-
}
|
|
473
|
+
/**
|
|
474
|
+
* Possible value types for a table cell.
|
|
475
|
+
*/
|
|
476
|
+
export type CellType = (boolean | number | null | string | undefined);
|
|
477
|
+
/**
|
|
478
|
+
* Conventional array of table cells typed as `CellType`.
|
|
479
|
+
*/
|
|
480
|
+
export interface BasicColumn extends Array<CellType> {
|
|
481
|
+
[index: number]: CellType;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Array of table cells in vertical expansion.
|
|
485
|
+
*/
|
|
486
|
+
export type Column = BasicColumn | TypedArray;
|
|
487
|
+
/**
|
|
488
|
+
* Collection of columns, where the key is the column name and
|
|
489
|
+
* the value is an array of column values.
|
|
490
|
+
*/
|
|
491
|
+
export interface ColumnCollection {
|
|
492
|
+
[columnId: string]: Column;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Event object for cell-related events.
|
|
496
|
+
*/
|
|
497
|
+
export interface CellEvent extends DataEvent {
|
|
498
|
+
readonly type: ('setCell' | 'afterSetCell');
|
|
499
|
+
readonly cellValue: CellType;
|
|
500
|
+
readonly columnId: string;
|
|
501
|
+
readonly rowIndex: number;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Event object for clone-related events.
|
|
505
|
+
*/
|
|
506
|
+
export interface CloneEvent extends DataEvent {
|
|
507
|
+
readonly type: ('cloneTable' | 'afterCloneTable');
|
|
508
|
+
readonly tableClone?: DataTable;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Event object for column-related events.
|
|
512
|
+
*/
|
|
513
|
+
export interface ColumnEvent extends DataEvent {
|
|
514
|
+
readonly type: ('deleteColumns' | 'afterDeleteColumns' | 'setColumns' | 'afterSetColumns');
|
|
515
|
+
readonly columns?: ColumnCollection;
|
|
516
|
+
readonly columnIds: Array<string>;
|
|
517
|
+
readonly rowIndex?: number;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* All information objects of DataTable events.
|
|
521
|
+
*/
|
|
522
|
+
export type Event = (CellEvent | CloneEvent | ColumnEvent | SetModifierEvent | RowEvent);
|
|
523
|
+
/**
|
|
524
|
+
* Event object for modifier-related events.
|
|
525
|
+
*/
|
|
526
|
+
export interface ModifierEvent extends DataEvent {
|
|
527
|
+
readonly type: ('setModifier' | 'afterSetModifier');
|
|
528
|
+
readonly modifier: (DataModifier | undefined);
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Array of table cells in horizontal expansion. Index of the array is the
|
|
532
|
+
* index of the column names.
|
|
533
|
+
*/
|
|
534
|
+
export interface Row extends Array<CellType> {
|
|
535
|
+
[index: number]: CellType;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Event object for row-related events.
|
|
539
|
+
*/
|
|
540
|
+
export interface RowEvent extends DataEvent {
|
|
541
|
+
readonly type: ('deleteRows' | 'afterDeleteRows' | 'setRows' | 'afterSetRows');
|
|
542
|
+
readonly rowCount: number;
|
|
543
|
+
readonly rowIndex: number | number[];
|
|
544
|
+
readonly rows?: Array<Row | RowObject>;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Object of row values, where the keys are the column names.
|
|
548
|
+
*/
|
|
549
|
+
export interface RowObject extends Record<string, CellType> {
|
|
550
|
+
[column: string]: CellType;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Event object for the setModifier events.
|
|
554
|
+
*/
|
|
555
|
+
export interface SetModifierEvent extends DataEvent {
|
|
556
|
+
readonly type: ('setModifier' | 'afterSetModifier' | 'setModifierError');
|
|
557
|
+
readonly error?: unknown;
|
|
558
|
+
readonly modifier?: DataModifier;
|
|
559
|
+
readonly modified?: DataTable;
|
|
562
560
|
}
|
|
563
561
|
export default DataTable;
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
import DataTableCore from './DataTableCore.js';
|
|
18
18
|
import ColumnUtils from './ColumnUtils.js';
|
|
19
19
|
const { splice, setLength } = ColumnUtils;
|
|
20
|
-
import
|
|
21
|
-
|
|
20
|
+
import { addEvent, defined, extend, fireEvent, isNumber } from '../Shared/Utilities.js';
|
|
21
|
+
import { uniqueKey } from '../Core/Utilities.js';
|
|
22
22
|
/* *
|
|
23
23
|
*
|
|
24
24
|
* Class
|
|
@@ -256,7 +256,7 @@ class DataTable extends DataTableCore {
|
|
|
256
256
|
* event.
|
|
257
257
|
* @private
|
|
258
258
|
*
|
|
259
|
-
* @param {
|
|
259
|
+
* @param {Event} e
|
|
260
260
|
* Event object with event information.
|
|
261
261
|
*/
|
|
262
262
|
emit(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import type { DataEventDetail } from './DataEvent.js';
|
|
2
|
+
import type { Column as DataTableColumn, ColumnCollection as DataTableColumnCollection, Row as DataTableRow, RowObject as DataTableRowObject } from './DataTable.js';
|
|
3
3
|
import type DataTableOptions from './DataTableOptions.js';
|
|
4
4
|
/**
|
|
5
5
|
* Class to manage columns and rows in a table structure. It provides methods
|
|
@@ -31,7 +31,7 @@ declare class DataTableCore {
|
|
|
31
31
|
*/
|
|
32
32
|
constructor(options?: DataTableOptions);
|
|
33
33
|
readonly autoId: boolean;
|
|
34
|
-
readonly columns: Record<string,
|
|
34
|
+
readonly columns: Record<string, DataTableColumn>;
|
|
35
35
|
readonly id: string;
|
|
36
36
|
modified?: this;
|
|
37
37
|
rowCount: number;
|
|
@@ -69,7 +69,7 @@ declare class DataTableCore {
|
|
|
69
69
|
* @return {Highcharts.DataTableColumn|undefined}
|
|
70
70
|
* A copy of the column, or `undefined` if not found.
|
|
71
71
|
*/
|
|
72
|
-
getColumn(columnId: string, asReference?: true): (
|
|
72
|
+
getColumn(columnId: string, asReference?: true): (DataTableColumn | undefined);
|
|
73
73
|
/**
|
|
74
74
|
* Retrieves all or the given columns. Simplified version of the full
|
|
75
75
|
* `DataTable.getColumns` method, always returning by reference.
|
|
@@ -81,7 +81,7 @@ declare class DataTableCore {
|
|
|
81
81
|
* Collection of columns. If a requested column was not found, it is
|
|
82
82
|
* `undefined`.
|
|
83
83
|
*/
|
|
84
|
-
getColumns(columnIds?: Array<string>, asReference?: true):
|
|
84
|
+
getColumns(columnIds?: Array<string>, asReference?: true): DataTableColumnCollection;
|
|
85
85
|
/**
|
|
86
86
|
* Retrieves the row at a given index.
|
|
87
87
|
*
|
|
@@ -94,7 +94,7 @@ declare class DataTableCore {
|
|
|
94
94
|
* @return {Record<string, number|string|undefined>|undefined}
|
|
95
95
|
* Returns the row values, or `undefined` if not found.
|
|
96
96
|
*/
|
|
97
|
-
getRow(rowIndex: number, columnIds?: Array<string>): (
|
|
97
|
+
getRow(rowIndex: number, columnIds?: Array<string>): (DataTableRow | undefined);
|
|
98
98
|
/**
|
|
99
99
|
* Sets cell values for a column. Will insert a new column, if not found.
|
|
100
100
|
*
|
|
@@ -113,7 +113,7 @@ declare class DataTableCore {
|
|
|
113
113
|
* @emits #setColumns
|
|
114
114
|
* @emits #afterSetColumns
|
|
115
115
|
*/
|
|
116
|
-
setColumn(columnId: string, column?:
|
|
116
|
+
setColumn(columnId: string, column?: DataTableColumn, rowIndex?: number, eventDetail?: DataEventDetail): void;
|
|
117
117
|
/**
|
|
118
118
|
* Sets cell values for multiple columns. Will insert new columns, if not
|
|
119
119
|
* found. Simplified version of the full `DataTableCore.setColumns`, limited
|
|
@@ -132,7 +132,7 @@ declare class DataTableCore {
|
|
|
132
132
|
* @emits #setColumns
|
|
133
133
|
* @emits #afterSetColumns
|
|
134
134
|
*/
|
|
135
|
-
setColumns(columns:
|
|
135
|
+
setColumns(columns: DataTableColumnCollection, rowIndex?: number, eventDetail?: DataEventDetail): void;
|
|
136
136
|
/**
|
|
137
137
|
* Sets cell values of a row. Will insert a new row if no index was
|
|
138
138
|
* provided, or if the index is higher than the total number of table rows.
|
|
@@ -152,7 +152,7 @@ declare class DataTableCore {
|
|
|
152
152
|
*
|
|
153
153
|
* @emits #afterSetRows
|
|
154
154
|
*/
|
|
155
|
-
setRow(row:
|
|
155
|
+
setRow(row: DataTableRowObject, rowIndex?: number, insert?: boolean, eventDetail?: DataEventDetail): void;
|
|
156
156
|
/**
|
|
157
157
|
* Returns the modified (clone) or the original data table if the modified
|
|
158
158
|
* one does not exist.
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
'use strict';
|
|
16
16
|
import ColumnUtils from './ColumnUtils.js';
|
|
17
17
|
const { setLength, splice } = ColumnUtils;
|
|
18
|
-
import
|
|
19
|
-
|
|
18
|
+
import { fireEvent, objectEach } from '../Shared/Utilities.js';
|
|
19
|
+
import { uniqueKey } from '../Core/Utilities.js';
|
|
20
20
|
/* *
|
|
21
21
|
*
|
|
22
22
|
* Class
|
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* */
|
|
13
13
|
'use strict';
|
|
14
|
+
import { defined } from '../../Shared/Utilities.js';
|
|
14
15
|
import FormulaTypes from './FormulaTypes.js';
|
|
15
16
|
const { isFormula, isFunction, isOperator, isRange, isReference, isValue } = FormulaTypes;
|
|
16
|
-
import U from '../../Core/Utilities.js';
|
|
17
|
-
const { defined } = U;
|
|
18
17
|
/* *
|
|
19
18
|
*
|
|
20
19
|
* Constants
|