@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
|
@@ -15,8 +15,6 @@ import D from '../Core/Defaults.js';
|
|
|
15
15
|
const { defaultOptions } = D;
|
|
16
16
|
import H from '../Core/Globals.js';
|
|
17
17
|
const { doc } = H;
|
|
18
|
-
import U from '../Core/Utilities.js';
|
|
19
|
-
const { addEvent, extend, fireEvent, merge } = U;
|
|
20
18
|
import HU from './Utils/HTMLUtilities.js';
|
|
21
19
|
const { removeElement } = HU;
|
|
22
20
|
import A11yI18n from './A11yI18n.js';
|
|
@@ -37,6 +35,7 @@ import highContrastTheme from './HighContrastTheme.js';
|
|
|
37
35
|
import defaultOptionsA11Y from './Options/A11yDefaults.js';
|
|
38
36
|
import defaultLangOptions from './Options/LangDefaults.js';
|
|
39
37
|
import copyDeprecatedOptions from './Options/DeprecatedOptions.js';
|
|
38
|
+
import { addEvent, extend, fireEvent, merge } from '../Shared/Utilities.js';
|
|
40
39
|
/* *
|
|
41
40
|
*
|
|
42
41
|
* Class
|
|
@@ -5,9 +5,9 @@ import type HTMLElement from '../Core/Renderer/HTML/HTMLElement';
|
|
|
5
5
|
import type KeyboardNavigationHandler from './KeyboardNavigationHandler';
|
|
6
6
|
import type SVGElement from '../Core/Renderer/SVG/SVGElement';
|
|
7
7
|
import type ProxyProvider from './ProxyProvider';
|
|
8
|
+
import type { EventOptions } from '../Shared/Utilities.js';
|
|
8
9
|
import DOMElementProvider from './Utils/DOMElementProvider.js';
|
|
9
10
|
import EventProvider from './Utils/EventProvider.js';
|
|
10
|
-
import U from '../Core/Utilities.js';
|
|
11
11
|
/**
|
|
12
12
|
* The AccessibilityComponent base class, representing a part of the chart that
|
|
13
13
|
* has accessibility logic connected to it. This class can be inherited from to
|
|
@@ -75,7 +75,7 @@ declare class AccessibilityComponent {
|
|
|
75
75
|
* See EventProvider for details.
|
|
76
76
|
* @private
|
|
77
77
|
*/
|
|
78
|
-
addEvent<T>(el: (T | Class<T>), type: string, fn: (Function | EventCallback<T>), options?:
|
|
78
|
+
addEvent<T>(el: (T | Class<T>), type: string, fn: (Function | EventCallback<T>), options?: EventOptions): Function;
|
|
79
79
|
/**
|
|
80
80
|
* Create an element and keep track of it for later removal.
|
|
81
81
|
* See DOMElementProvider for details.
|
|
@@ -25,8 +25,7 @@ import H from '../../Core/Globals.js';
|
|
|
25
25
|
const { doc } = H;
|
|
26
26
|
import HU from '../Utils/HTMLUtilities.js';
|
|
27
27
|
const { addClass, getElement, getHeadingTagNameForElement, stripHTMLTagsFromString, visuallyHideElement } = HU;
|
|
28
|
-
import
|
|
29
|
-
const { attr, pick, replaceNested } = U;
|
|
28
|
+
import { attr, pick, replaceNested } from '../../Shared/Utilities.js';
|
|
30
29
|
/* *
|
|
31
30
|
*
|
|
32
31
|
* Functions
|
|
@@ -179,8 +178,8 @@ class InfoRegionsComponent extends AccessibilityComponent {
|
|
|
179
178
|
buildContent: function (chart) {
|
|
180
179
|
const formatter = accessibilityOptions.screenReaderSection
|
|
181
180
|
.beforeChartFormatter;
|
|
182
|
-
return formatter ? formatter(chart) :
|
|
183
|
-
component.defaultBeforeChartFormatter(
|
|
181
|
+
return formatter ? formatter(chart, component) :
|
|
182
|
+
component.defaultBeforeChartFormatter();
|
|
184
183
|
},
|
|
185
184
|
insertIntoDOM: function (el, chart) {
|
|
186
185
|
chart.renderTo.insertBefore(el, chart.renderTo.firstChild);
|
|
@@ -199,7 +198,7 @@ class InfoRegionsComponent extends AccessibilityComponent {
|
|
|
199
198
|
buildContent: function (chart) {
|
|
200
199
|
const formatter = accessibilityOptions.screenReaderSection
|
|
201
200
|
.afterChartFormatter;
|
|
202
|
-
return formatter ? formatter(chart) :
|
|
201
|
+
return formatter ? formatter(chart, component) :
|
|
203
202
|
component.defaultAfterChartFormatter();
|
|
204
203
|
},
|
|
205
204
|
insertIntoDOM: function (el, chart) {
|
|
@@ -477,7 +476,7 @@ class InfoRegionsComponent extends AccessibilityComponent {
|
|
|
477
476
|
const onPlayAsSoundClick = (chart.options.accessibility &&
|
|
478
477
|
chart.options.accessibility.screenReaderSection
|
|
479
478
|
.onPlayAsSoundClick);
|
|
480
|
-
(onPlayAsSoundClick || defaultHandler).call(this, e, chart);
|
|
479
|
+
(onPlayAsSoundClick || defaultHandler).call(this, e, chart, this);
|
|
481
480
|
};
|
|
482
481
|
}
|
|
483
482
|
}
|
|
@@ -16,13 +16,12 @@ const { animObject } = A;
|
|
|
16
16
|
import H from '../../Core/Globals.js';
|
|
17
17
|
const { doc } = H;
|
|
18
18
|
import Legend from '../../Core/Legend/Legend.js';
|
|
19
|
-
import U from '../../Core/Utilities.js';
|
|
20
|
-
const { addEvent, fireEvent, isNumber, pick, syncTimeout } = U;
|
|
21
19
|
import AccessibilityComponent from '../AccessibilityComponent.js';
|
|
22
20
|
import KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';
|
|
23
21
|
import CU from '../Utils/ChartUtilities.js';
|
|
24
22
|
const { getChartTitle } = CU;
|
|
25
23
|
import HU from '../Utils/HTMLUtilities.js';
|
|
24
|
+
import { addEvent, fireEvent, isNumber, pick, syncTimeout } from '../../Shared/Utilities.js';
|
|
26
25
|
const { stripHTMLTagsFromString: stripHTMLTags, addClass, removeClass } = HU;
|
|
27
26
|
/* *
|
|
28
27
|
*
|
|
@@ -11,13 +11,12 @@
|
|
|
11
11
|
*
|
|
12
12
|
* */
|
|
13
13
|
'use strict';
|
|
14
|
-
import U from '../../Core/Utilities.js';
|
|
15
|
-
const { attr } = U;
|
|
16
14
|
import AccessibilityComponent from '../AccessibilityComponent.js';
|
|
17
15
|
import KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';
|
|
18
16
|
import ChartUtilities from '../Utils/ChartUtilities.js';
|
|
19
17
|
const { getChartTitle, unhideChartElementFromAT } = ChartUtilities;
|
|
20
18
|
import HTMLUtilities from '../Utils/HTMLUtilities.js';
|
|
19
|
+
import { attr } from '../../Shared/Utilities.js';
|
|
21
20
|
const { getFakeMouseEvent } = HTMLUtilities;
|
|
22
21
|
/* *
|
|
23
22
|
*
|
|
@@ -24,12 +24,11 @@ import A from '../../Core/Animation/AnimationUtilities.js';
|
|
|
24
24
|
const { animObject } = A;
|
|
25
25
|
import T from '../../Core/Templating.js';
|
|
26
26
|
const { format } = T;
|
|
27
|
-
import U from '../../Core/Utilities.js';
|
|
28
|
-
const { clamp, pick, syncTimeout } = U;
|
|
29
27
|
import HU from '../Utils/HTMLUtilities.js';
|
|
30
28
|
const { getFakeMouseEvent } = HU;
|
|
31
29
|
import CU from '../Utils/ChartUtilities.js';
|
|
32
30
|
const { getAxisRangeDescription, fireEventOnWrappedOrUnwrappedElement } = CU;
|
|
31
|
+
import { clamp, internalClearTimeout, pick, syncTimeout } from '../../Shared/Utilities.js';
|
|
33
32
|
/**
|
|
34
33
|
* The NavigatorComponent class
|
|
35
34
|
*
|
|
@@ -145,7 +144,7 @@ class NavigatorComponent extends AccessibilityComponent {
|
|
|
145
144
|
*/
|
|
146
145
|
destroy() {
|
|
147
146
|
if (this.updateNavigatorThrottleTimer) {
|
|
148
|
-
|
|
147
|
+
internalClearTimeout(this.updateNavigatorThrottleTimer);
|
|
149
148
|
}
|
|
150
149
|
this.proxyProvider.removeGroup('navigator');
|
|
151
150
|
if (this.announcer) {
|
|
@@ -222,7 +221,7 @@ class NavigatorComponent extends AccessibilityComponent {
|
|
|
222
221
|
// Throttle updates so as not to reduce performance with
|
|
223
222
|
// continuous keypress.
|
|
224
223
|
if (this.updateNavigatorThrottleTimer) {
|
|
225
|
-
|
|
224
|
+
internalClearTimeout(this.updateNavigatorThrottleTimer);
|
|
226
225
|
}
|
|
227
226
|
this.updateNavigatorThrottleTimer = setTimeout(performUpdate.bind(this, beforeAnnounce), 20);
|
|
228
227
|
}
|
|
@@ -16,8 +16,7 @@ import Announcer from '../Utils/Announcer.js';
|
|
|
16
16
|
import ChartUtilities from '../Utils/ChartUtilities.js';
|
|
17
17
|
const { unhideChartElementFromAT, getAxisRangeDescription } = ChartUtilities;
|
|
18
18
|
import KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';
|
|
19
|
-
import
|
|
20
|
-
const { addEvent, attr } = U;
|
|
19
|
+
import { addEvent, attr } from '../../Shared/Utilities.js';
|
|
21
20
|
/* *
|
|
22
21
|
*
|
|
23
22
|
* Functions
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
'use strict';
|
|
14
14
|
import H from '../../../Core/Globals.js';
|
|
15
15
|
const { composed } = H;
|
|
16
|
-
import
|
|
17
|
-
const { addEvent, merge, pushUnique } = U;
|
|
16
|
+
import { addEvent, merge, pushUnique } from '../../../Shared/Utilities.js';
|
|
18
17
|
/* *
|
|
19
18
|
*
|
|
20
19
|
* Composition
|
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
'use strict';
|
|
14
14
|
import H from '../../../Core/Globals.js';
|
|
15
15
|
const { composed } = H;
|
|
16
|
-
import U from '../../../Core/Utilities.js';
|
|
17
|
-
const { addEvent, defined, pushUnique } = U;
|
|
18
16
|
import Announcer from '../../Utils/Announcer.js';
|
|
19
17
|
import ChartUtilities from '../../Utils/ChartUtilities.js';
|
|
20
18
|
const { getChartTitle } = ChartUtilities;
|
|
21
19
|
import EventProvider from '../../Utils/EventProvider.js';
|
|
22
20
|
import SeriesDescriber from './SeriesDescriber.js';
|
|
21
|
+
import { addEvent, defined, internalClearTimeout, pushUnique } from '../../../Shared/Utilities.js';
|
|
23
22
|
const { defaultPointDescriptionFormatter, defaultSeriesDescriptionFormatter } = SeriesDescriber;
|
|
24
23
|
/* *
|
|
25
24
|
*
|
|
@@ -184,7 +183,7 @@ class NewDataAnnouncer {
|
|
|
184
183
|
if (message) {
|
|
185
184
|
// Is there already one queued?
|
|
186
185
|
if (this.queuedAnnouncement) {
|
|
187
|
-
|
|
186
|
+
internalClearTimeout(this.queuedAnnouncementTimer);
|
|
188
187
|
}
|
|
189
188
|
// Build the announcement
|
|
190
189
|
this.queuedAnnouncement = {
|
|
@@ -221,7 +220,7 @@ class NewDataAnnouncer {
|
|
|
221
220
|
const chart = this.chart, annOptions = chart.options.accessibility.announceNewData;
|
|
222
221
|
// User supplied formatter?
|
|
223
222
|
if (annOptions.announcementFormatter) {
|
|
224
|
-
const formatterRes = annOptions.announcementFormatter(dirtySeries, newSeries, newPoint);
|
|
223
|
+
const formatterRes = annOptions.announcementFormatter(dirtySeries, newSeries, newPoint, this);
|
|
225
224
|
if (formatterRes !== false) {
|
|
226
225
|
return formatterRes.length ? formatterRes : null;
|
|
227
226
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (c) 2009-2026 Highsoft AS
|
|
4
4
|
* Author: Øystein Moseng
|
|
5
5
|
*
|
|
6
|
-
* Place
|
|
6
|
+
* Place descriptions on a series and its points.
|
|
7
7
|
*
|
|
8
8
|
* A commercial license may be required depending on use.
|
|
9
9
|
* See www.highcharts.com/license
|
|
@@ -19,8 +19,7 @@ import F from '../../../Core/Templating.js';
|
|
|
19
19
|
const { format, numberFormat } = F;
|
|
20
20
|
import HTMLUtilities from '../../Utils/HTMLUtilities.js';
|
|
21
21
|
const { reverseChildNodes, stripHTMLTagsFromString: stripHTMLTags } = HTMLUtilities;
|
|
22
|
-
import
|
|
23
|
-
const { find, isNumber, isString, pick, defined } = U;
|
|
22
|
+
import { defined, find, isString, isNumber, pick } from '../../../Shared/Utilities.js';
|
|
24
23
|
/* *
|
|
25
24
|
*
|
|
26
25
|
* Functions
|
|
@@ -172,7 +171,7 @@ function getPointA11yTimeDescription(point) {
|
|
|
172
171
|
if (dateXAxis) {
|
|
173
172
|
const tooltipDateFormat = dateXAxis.getXDateFormat(point.x || 0, chart.options.tooltip.dateTimeLabelFormats), dateFormat = seriesA11yOptions.dateFormatter &&
|
|
174
173
|
seriesA11yOptions.dateFormatter(point) ||
|
|
175
|
-
a11yOptions.dateFormatter
|
|
174
|
+
a11yOptions.dateFormatter?.(point) ||
|
|
176
175
|
seriesA11yOptions.dateFormat ||
|
|
177
176
|
a11yOptions.dateFormat ||
|
|
178
177
|
tooltipDateFormat;
|
|
@@ -17,11 +17,10 @@ import SeriesRegistry from '../../../Core/Series/SeriesRegistry.js';
|
|
|
17
17
|
const { seriesTypes } = SeriesRegistry;
|
|
18
18
|
import H from '../../../Core/Globals.js';
|
|
19
19
|
const { doc } = H;
|
|
20
|
-
import U from '../../../Core/Utilities.js';
|
|
21
|
-
const { defined, fireEvent } = U;
|
|
22
20
|
import KeyboardNavigationHandler from '../../KeyboardNavigationHandler.js';
|
|
23
21
|
import EventProvider from '../../Utils/EventProvider.js';
|
|
24
22
|
import ChartUtilities from '../../Utils/ChartUtilities.js';
|
|
23
|
+
import { defined, fireEvent } from '../../../Shared/Utilities.js';
|
|
25
24
|
const { getPointFromXY, getSeriesFromName, scrollAxisToPoint } = ChartUtilities;
|
|
26
25
|
/* *
|
|
27
26
|
*
|
|
@@ -17,8 +17,7 @@ const { unhideChartElementFromAT } = CU;
|
|
|
17
17
|
import HU from '../Utils/HTMLUtilities.js';
|
|
18
18
|
const { getFakeMouseEvent } = HU;
|
|
19
19
|
import KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';
|
|
20
|
-
import
|
|
21
|
-
const { attr, pick } = U;
|
|
20
|
+
import { attr, pick } from '../../Shared/Utilities.js';
|
|
22
21
|
/* *
|
|
23
22
|
*
|
|
24
23
|
* Functions
|
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
import H from '../Core/Globals.js';
|
|
15
15
|
const { doc, win } = H;
|
|
16
16
|
import MenuComponent from './Components/MenuComponent.js';
|
|
17
|
-
import U from '../Core/Utilities.js';
|
|
18
|
-
const { addEvent, defined, fireEvent } = U;
|
|
19
17
|
import EventProvider from './Utils/EventProvider.js';
|
|
20
18
|
import HTMLUtilities from './Utils/HTMLUtilities.js';
|
|
19
|
+
import { addEvent, defined, fireEvent } from '../Shared/Utilities.js';
|
|
21
20
|
const { getElement, simulatedEventTarget } = HTMLUtilities;
|
|
22
21
|
/* *
|
|
23
22
|
*
|
|
@@ -51,6 +51,13 @@ import type { DeepPartial } from '../../Shared/Types';
|
|
|
51
51
|
* @param {global.MouseEvent} evt
|
|
52
52
|
* Mouse click event
|
|
53
53
|
*
|
|
54
|
+
* @param {Highcharts.Chart} [chart]
|
|
55
|
+
* Chart context.
|
|
56
|
+
*
|
|
57
|
+
* @param {global.GlobalEventHandlers} [ctx]
|
|
58
|
+
* Since v12.5.0, the global event handlers context passed as an extra
|
|
59
|
+
* argument for arrow functions.
|
|
60
|
+
*
|
|
54
61
|
* @return {void}
|
|
55
62
|
*/
|
|
56
63
|
/**
|
|
@@ -61,6 +68,10 @@ import type { DeepPartial } from '../../Shared/Types';
|
|
|
61
68
|
* @param {T} context
|
|
62
69
|
* Context to format
|
|
63
70
|
*
|
|
71
|
+
* @param {*} [outerContext]
|
|
72
|
+
* Since v12.5.0, the outer context passed as an extra argument for
|
|
73
|
+
* arrow functions.
|
|
74
|
+
*
|
|
64
75
|
* @return {string}
|
|
65
76
|
* Formatted string for the screen reader module.
|
|
66
77
|
*/
|
|
@@ -69,6 +69,13 @@
|
|
|
69
69
|
* @param {global.MouseEvent} evt
|
|
70
70
|
* Mouse click event
|
|
71
71
|
*
|
|
72
|
+
* @param {Highcharts.Chart} [chart]
|
|
73
|
+
* Chart context.
|
|
74
|
+
*
|
|
75
|
+
* @param {global.GlobalEventHandlers} [ctx]
|
|
76
|
+
* Since v12.5.0, the global event handlers context passed as an extra
|
|
77
|
+
* argument for arrow functions.
|
|
78
|
+
*
|
|
72
79
|
* @return {void}
|
|
73
80
|
*/
|
|
74
81
|
/**
|
|
@@ -79,6 +86,10 @@
|
|
|
79
86
|
* @param {T} context
|
|
80
87
|
* Context to format
|
|
81
88
|
*
|
|
89
|
+
* @param {*} [outerContext]
|
|
90
|
+
* Since v12.5.0, the outer context passed as an extra argument for
|
|
91
|
+
* arrow functions.
|
|
92
|
+
*
|
|
82
93
|
* @return {string}
|
|
83
94
|
* Formatted string for the screen reader module.
|
|
84
95
|
*/
|
|
@@ -12,6 +12,64 @@ declare module '../../Core/Options' {
|
|
|
12
12
|
exposeElementToA11y?: SeriesAccessibilityOptions['exposeAsGroupOnly'];
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
declare module '../../Core/Series/SeriesOptions' {
|
|
16
|
+
interface SeriesOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Deprecated. Use
|
|
19
|
+
* [plotOptions.series.accessibility.description](#plotOptions.series.accessibility.description)
|
|
20
|
+
* instead.
|
|
21
|
+
*
|
|
22
|
+
* A description of the series to add to the screen reader information
|
|
23
|
+
* about the series.
|
|
24
|
+
*
|
|
25
|
+
* @since 5.0.0
|
|
26
|
+
* @requires modules/accessibility
|
|
27
|
+
* @deprecated 8.0.0
|
|
28
|
+
*/
|
|
29
|
+
description?: SeriesAccessibilityOptions['description'];
|
|
30
|
+
/**
|
|
31
|
+
* Deprecated. Use
|
|
32
|
+
* [plotOptions.series.accessibility.point.descriptionFormatter](#plotOptions.series.accessibility.point.descriptionFormatter)
|
|
33
|
+
* instead.
|
|
34
|
+
*
|
|
35
|
+
* Same as
|
|
36
|
+
* [accessibility.series.descriptionFormatter](#accessibility.series.descriptionFormatter),
|
|
37
|
+
* but for an individual series. Overrides the chart wide configuration.
|
|
38
|
+
*
|
|
39
|
+
* @requires modules/accessibility
|
|
40
|
+
* @since 5.0.12
|
|
41
|
+
* @deprecated 8.0.0
|
|
42
|
+
*/
|
|
43
|
+
pointDescriptionFormatter?: SeriesAccessibilityOptions['point']['descriptionFormatter'];
|
|
44
|
+
/**
|
|
45
|
+
* Deprecated. Use
|
|
46
|
+
* [plotOptions.series.accessibility.point.descriptionFormat](#plotOptions.series.accessibility.point.descriptionFormat)
|
|
47
|
+
* instead.
|
|
48
|
+
*
|
|
49
|
+
* Same as
|
|
50
|
+
* [accessibility.point.descriptionFormat](#accessibility.point.descriptionFormat),
|
|
51
|
+
* but for an individual series. Overrides the chart wide configuration.
|
|
52
|
+
*
|
|
53
|
+
* @requires modules/accessibility
|
|
54
|
+
* @since 11.1.0
|
|
55
|
+
* @deprecated next
|
|
56
|
+
*/
|
|
57
|
+
pointDescriptionFormat?: SeriesAccessibilityOptions['point']['descriptionFormat'];
|
|
58
|
+
/**
|
|
59
|
+
* Deprecated. Use
|
|
60
|
+
* [series.accessibility.keyboardNavigation](#plotOptions.series.accessibility.keyboardNavigation)
|
|
61
|
+
* instead.
|
|
62
|
+
*
|
|
63
|
+
* If set to `true`, the accessibility module will skip past the points
|
|
64
|
+
* in this series for keyboard navigation.
|
|
65
|
+
*
|
|
66
|
+
* @requires modules/accessibility
|
|
67
|
+
* @since 5.0.12
|
|
68
|
+
* @deprecated 8.0.0
|
|
69
|
+
*/
|
|
70
|
+
skipKeyboardNavigation?: boolean;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
15
73
|
/**
|
|
16
74
|
* Copy options that are deprecated over to new options. Logs warnings to
|
|
17
75
|
* console if deprecated options are used.
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
* chart.typeDescription -> accessibility.typeDescription
|
|
19
19
|
* series.description -> series.accessibility.description
|
|
20
20
|
* series.exposeElementToA11y -> series.accessibility.exposeAsGroupOnly
|
|
21
|
+
* series.pointDescriptionFormat ->
|
|
22
|
+
* series.accessibility.point.descriptionFormat
|
|
21
23
|
* series.pointDescriptionFormatter ->
|
|
22
24
|
* series.accessibility.pointDescriptionFormatter
|
|
23
25
|
* series.accessibility.pointDescriptionFormatter ->
|
|
@@ -61,8 +63,8 @@
|
|
|
61
63
|
*/
|
|
62
64
|
/* eslint-enable max-len */
|
|
63
65
|
'use strict';
|
|
64
|
-
import
|
|
65
|
-
|
|
66
|
+
import { pick } from '../../Shared/Utilities.js';
|
|
67
|
+
import { error } from '../../Core/Utilities.js';
|
|
66
68
|
/* *
|
|
67
69
|
*
|
|
68
70
|
* Functions
|
|
@@ -147,6 +149,9 @@ function copyDeprecatedSeriesOptions(chart) {
|
|
|
147
149
|
const oldToNewSeriesOptions = {
|
|
148
150
|
description: ['accessibility', 'description'],
|
|
149
151
|
exposeElementToA11y: ['accessibility', 'exposeAsGroupOnly'],
|
|
152
|
+
pointDescriptionFormat: [
|
|
153
|
+
'accessibility', 'point', 'descriptionFormat'
|
|
154
|
+
],
|
|
150
155
|
pointDescriptionFormatter: [
|
|
151
156
|
'accessibility', 'point', 'descriptionFormatter'
|
|
152
157
|
],
|
|
@@ -208,6 +208,15 @@ const langOptions = {
|
|
|
208
208
|
*/
|
|
209
209
|
changeAnnouncement: '{axisRangeDescription}'
|
|
210
210
|
},
|
|
211
|
+
/**
|
|
212
|
+
* Stock tools language options for accessibility.
|
|
213
|
+
*
|
|
214
|
+
* @since next
|
|
215
|
+
*/
|
|
216
|
+
stockTools: {
|
|
217
|
+
groupLabel: 'Stock chart tools',
|
|
218
|
+
arrowLabel: 'Toggle submenu'
|
|
219
|
+
},
|
|
211
220
|
/**
|
|
212
221
|
* Accessibility language options for the data table.
|
|
213
222
|
*
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
'use strict';
|
|
18
18
|
import H from '../Core/Globals.js';
|
|
19
19
|
const { doc, win } = H;
|
|
20
|
-
import U from '../Core/Utilities.js';
|
|
21
|
-
const { attr, css, merge } = U;
|
|
22
20
|
import EventProvider from './Utils/EventProvider.js';
|
|
23
21
|
import ChartUtilities from './Utils/ChartUtilities.js';
|
|
24
22
|
const { fireEventOnWrappedOrUnwrappedElement } = ChartUtilities;
|
|
25
23
|
import HTMLUtilities from './Utils/HTMLUtilities.js';
|
|
24
|
+
import { attr, css, merge } from '../Shared/Utilities.js';
|
|
26
25
|
const { cloneMouseEvent, cloneTouchEvent, getFakeMouseEvent, removeElement } = HTMLUtilities;
|
|
27
26
|
/* *
|
|
28
27
|
*
|
|
@@ -125,9 +124,7 @@ class ProxyElement {
|
|
|
125
124
|
*/
|
|
126
125
|
updateCSSClassName() {
|
|
127
126
|
const stringHasNoTooltip = (s) => (s.indexOf('highcharts-no-tooltip') > -1);
|
|
128
|
-
const
|
|
129
|
-
const groupDiv = legend.group && legend.group.div;
|
|
130
|
-
const noTooltipOnGroup = stringHasNoTooltip(groupDiv && groupDiv.className || '');
|
|
127
|
+
const noTooltipOnGroup = stringHasNoTooltip(this.chart.legend?.group?.div?.className || '');
|
|
131
128
|
const targetClassName = this.getTargetAttr(this.target.click, 'class') || '';
|
|
132
129
|
const noTooltipOnTarget = stringHasNoTooltip(targetClassName);
|
|
133
130
|
this.innerElement.className = noTooltipOnGroup || noTooltipOnTarget ?
|
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
'use strict';
|
|
18
18
|
import H from '../Core/Globals.js';
|
|
19
19
|
const { doc } = H;
|
|
20
|
-
import U from '../Core/Utilities.js';
|
|
21
|
-
const { attr, css } = U;
|
|
22
20
|
import CU from './Utils/ChartUtilities.js';
|
|
23
21
|
const { unhideChartElementFromAT } = CU;
|
|
24
22
|
import DOMElementProvider from './Utils/DOMElementProvider.js';
|
|
25
23
|
import HU from './Utils/HTMLUtilities.js';
|
|
26
24
|
const { removeChildNodes } = HU;
|
|
27
25
|
import ProxyElement from './ProxyElement.js';
|
|
26
|
+
import { attr, css } from '../Shared/Utilities.js';
|
|
28
27
|
/* *
|
|
29
28
|
*
|
|
30
29
|
* Class
|
|
@@ -17,8 +17,7 @@ import H from '../../Core/Globals.js';
|
|
|
17
17
|
const { doc } = H;
|
|
18
18
|
import HU from './HTMLUtilities.js';
|
|
19
19
|
const { addClass, visuallyHideElement } = HU;
|
|
20
|
-
import
|
|
21
|
-
const { attr } = U;
|
|
20
|
+
import { attr, internalClearTimeout } from '../../Shared/Utilities.js';
|
|
22
21
|
/* *
|
|
23
22
|
*
|
|
24
23
|
* Class
|
|
@@ -48,7 +47,7 @@ class Announcer {
|
|
|
48
47
|
// Delete contents after a little while to avoid user finding the live
|
|
49
48
|
// region in the DOM.
|
|
50
49
|
if (this.clearAnnouncementRegionTimer) {
|
|
51
|
-
|
|
50
|
+
internalClearTimeout(this.clearAnnouncementRegionTimer);
|
|
52
51
|
}
|
|
53
52
|
this.clearAnnouncementRegionTimer = setTimeout(() => {
|
|
54
53
|
this.announceRegion.innerHTML = AST.emptyHTML;
|
|
@@ -15,8 +15,7 @@ import H from '../../Core/Globals.js';
|
|
|
15
15
|
const { doc } = H;
|
|
16
16
|
import HU from './HTMLUtilities.js';
|
|
17
17
|
const { stripHTMLTagsFromString: stripHTMLTags } = HU;
|
|
18
|
-
import
|
|
19
|
-
const { defined, find, fireEvent } = U;
|
|
18
|
+
import { defined, find, fireEvent } from '../../Shared/Utilities.js';
|
|
20
19
|
/* *
|
|
21
20
|
*
|
|
22
21
|
* Functions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type EventOptions } from '../../Shared/Utilities.js';
|
|
1
2
|
import type { EventCallback } from '../../Core/Callback';
|
|
2
3
|
import DOMElementType from '../../Core/Renderer/DOMElementType';
|
|
3
|
-
import U from '../../Core/Utilities.js';
|
|
4
4
|
interface ElementsFocusEventRemovers {
|
|
5
5
|
element: DOMElementType;
|
|
6
6
|
remover: Function;
|
|
@@ -11,7 +11,7 @@ interface ElementsFocusEventRemovers {
|
|
|
11
11
|
declare class EventProvider {
|
|
12
12
|
constructor();
|
|
13
13
|
eventRemovers: Array<ElementsFocusEventRemovers>;
|
|
14
|
-
addEvent<T>(el: (Class<T> | T), type: string, fn: (EventCallback<T> | Function), options?:
|
|
14
|
+
addEvent<T>(el: (Class<T> | T), type: string, fn: (EventCallback<T> | Function), options?: EventOptions): Function;
|
|
15
15
|
/**
|
|
16
16
|
* Remove added event.
|
|
17
17
|
* @private
|
|
@@ -11,9 +11,13 @@
|
|
|
11
11
|
*
|
|
12
12
|
* */
|
|
13
13
|
'use strict';
|
|
14
|
+
/* *
|
|
15
|
+
*
|
|
16
|
+
* Imports
|
|
17
|
+
*
|
|
18
|
+
* */
|
|
19
|
+
import { addEvent } from '../../Shared/Utilities.js';
|
|
14
20
|
import H from '../../Core/Globals.js';
|
|
15
|
-
import U from '../../Core/Utilities.js';
|
|
16
|
-
const { addEvent } = U;
|
|
17
21
|
/**
|
|
18
22
|
* @private
|
|
19
23
|
*/
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
* */
|
|
11
11
|
'use strict';
|
|
12
12
|
import Fx from './Fx.js';
|
|
13
|
-
import
|
|
14
|
-
const { defined, getStyle, isArray, isNumber, isObject, merge, objectEach, pick } = U;
|
|
13
|
+
import { defined, getStyle, isArray, isNumber, isObject, merge, objectEach, pick } from '../../Shared/Utilities.js';
|
|
15
14
|
/* *
|
|
16
15
|
*
|
|
17
16
|
* Functions
|
|
@@ -13,8 +13,7 @@ import Color from '../Color/Color.js';
|
|
|
13
13
|
const { parse: color } = Color;
|
|
14
14
|
import H from '../Globals.js';
|
|
15
15
|
const { win } = H;
|
|
16
|
-
import
|
|
17
|
-
const { isNumber, objectEach } = U;
|
|
16
|
+
import { isNumber, objectEach } from '../../Shared/Utilities.js';
|
|
18
17
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
19
18
|
/* *
|
|
20
19
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AnyRecord } from '../Shared/Types.js';
|
|
1
2
|
/**
|
|
2
3
|
* Generic callback function.
|
|
3
4
|
*
|
|
@@ -23,11 +24,14 @@ export interface Callback<TScope, TReturn> {
|
|
|
23
24
|
* @param {TEvent} e
|
|
24
25
|
* Event argument.
|
|
25
26
|
*
|
|
27
|
+
* @param {TScope} [ctx]
|
|
28
|
+
* The context for the callback.
|
|
29
|
+
*
|
|
26
30
|
* @return {boolean|void}
|
|
27
31
|
* Return value.
|
|
28
32
|
*/
|
|
29
33
|
export interface EventCallback<TScope, TEvent = AnyRecord | Event> {
|
|
30
|
-
(this: TScope, e: TEvent): (boolean | void);
|
|
34
|
+
(this: TScope, e: TEvent, ctx?: TScope): (boolean | void);
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
37
|
* Generic formatter callback function.
|
|
@@ -40,10 +44,13 @@ export interface EventCallback<TScope, TEvent = AnyRecord | Event> {
|
|
|
40
44
|
* @param {TEvent} e
|
|
41
45
|
* Event argument.
|
|
42
46
|
*
|
|
47
|
+
* @param {TScope} [ctx]
|
|
48
|
+
* The context for the callback.
|
|
49
|
+
*
|
|
43
50
|
* @return {string}
|
|
44
51
|
* Return value.
|
|
45
52
|
*/
|
|
46
53
|
export interface FormatterCallback<TScope, TEvent = unknown> {
|
|
47
|
-
(this: TScope, e: TEvent): string;
|
|
54
|
+
(this: TScope, e: TEvent, ctx?: TScope): string;
|
|
48
55
|
}
|
|
49
56
|
export default Callback;
|