InfoRegionsComponent.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /* *
  2. *
  3. * (c) 2009-2020 Øystein Moseng
  4. *
  5. * Accessibility component for chart info region and table.
  6. *
  7. * License: www.highcharts.com/license
  8. *
  9. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  10. *
  11. * */
  12. import H from '../../Core/Globals.js';
  13. var doc = H.doc;
  14. import U from '../../Core/Utilities.js';
  15. var extend = U.extend, format = U.format, pick = U.pick;
  16. import AccessibilityComponent from '../AccessibilityComponent.js';
  17. import Announcer from '../Utils/Announcer.js';
  18. import AnnotationsA11y from './AnnotationsA11y.js';
  19. var getAnnotationsInfoHTML = AnnotationsA11y.getAnnotationsInfoHTML;
  20. import ChartUtilities from '../Utils/ChartUtilities.js';
  21. var unhideChartElementFromAT = ChartUtilities.unhideChartElementFromAT, getChartTitle = ChartUtilities.getChartTitle, getAxisDescription = ChartUtilities.getAxisDescription;
  22. import HTMLUtilities from '../Utils/HTMLUtilities.js';
  23. var addClass = HTMLUtilities.addClass, setElAttrs = HTMLUtilities.setElAttrs, escapeStringForHTML = HTMLUtilities.escapeStringForHTML, stripHTMLTagsFromString = HTMLUtilities.stripHTMLTagsFromString, getElement = HTMLUtilities.getElement, visuallyHideElement = HTMLUtilities.visuallyHideElement;
  24. /* eslint-disable no-invalid-this, valid-jsdoc */
  25. /**
  26. * @private
  27. */
  28. function getTypeDescForMapChart(chart, formatContext) {
  29. return formatContext.mapTitle ?
  30. chart.langFormat('accessibility.chartTypes.mapTypeDescription', formatContext) :
  31. chart.langFormat('accessibility.chartTypes.unknownMap', formatContext);
  32. }
  33. /**
  34. * @private
  35. */
  36. function getTypeDescForCombinationChart(chart, formatContext) {
  37. return chart.langFormat('accessibility.chartTypes.combinationChart', formatContext);
  38. }
  39. /**
  40. * @private
  41. */
  42. function getTypeDescForEmptyChart(chart, formatContext) {
  43. return chart.langFormat('accessibility.chartTypes.emptyChart', formatContext);
  44. }
  45. /**
  46. * @private
  47. */
  48. function buildTypeDescriptionFromSeries(chart, types, context) {
  49. var firstType = types[0], typeExplaination = chart.langFormat('accessibility.seriesTypeDescriptions.' + firstType, context), multi = chart.series && chart.series.length < 2 ? 'Single' : 'Multiple';
  50. return (chart.langFormat('accessibility.chartTypes.' + firstType + multi, context) ||
  51. chart.langFormat('accessibility.chartTypes.default' + multi, context)) + (typeExplaination ? ' ' + typeExplaination : '');
  52. }
  53. /**
  54. * @private
  55. */
  56. function getTableSummary(chart) {
  57. return chart.langFormat('accessibility.table.tableSummary', { chart: chart });
  58. }
  59. /**
  60. * @private
  61. */
  62. function stripEmptyHTMLTags(str) {
  63. return str.replace(/<(\w+)[^>]*?>\s*<\/\1>/g, '');
  64. }
  65. /**
  66. * @private
  67. */
  68. function enableSimpleHTML(str) {
  69. return str
  70. .replace(/&lt;(h[1-7]|p|div|ul|ol|li)&gt;/g, '<$1>')
  71. .replace(/&lt;&#x2F;(h[1-7]|p|div|ul|ol|li|a|button)&gt;/g, '</$1>')
  72. .replace(/&lt;(div|a|button) id=&quot;([a-zA-Z\-0-9#]*?)&quot;&gt;/g, '<$1 id="$2">');
  73. }
  74. /**
  75. * @private
  76. */
  77. function stringToSimpleHTML(str) {
  78. return stripEmptyHTMLTags(enableSimpleHTML(escapeStringForHTML(str)));
  79. }
  80. /**
  81. * Return simplified explaination of chart type. Some types will not be familiar
  82. * to most users, but in those cases we try to add an explaination of the type.
  83. *
  84. * @private
  85. * @function Highcharts.Chart#getTypeDescription
  86. * @param {Array<string>} types The series types in this chart.
  87. * @return {string} The text description of the chart type.
  88. */
  89. H.Chart.prototype.getTypeDescription = function (types) {
  90. var firstType = types[0], firstSeries = this.series && this.series[0] || {}, formatContext = {
  91. numSeries: this.series.length,
  92. numPoints: firstSeries.points && firstSeries.points.length,
  93. chart: this,
  94. mapTitle: firstSeries.mapTitle
  95. };
  96. if (!firstType) {
  97. return getTypeDescForEmptyChart(this, formatContext);
  98. }
  99. if (firstType === 'map') {
  100. return getTypeDescForMapChart(this, formatContext);
  101. }
  102. if (this.types.length > 1) {
  103. return getTypeDescForCombinationChart(this, formatContext);
  104. }
  105. return buildTypeDescriptionFromSeries(this, types, formatContext);
  106. };
  107. /**
  108. * The InfoRegionsComponent class
  109. *
  110. * @private
  111. * @class
  112. * @name Highcharts.InfoRegionsComponent
  113. */
  114. var InfoRegionsComponent = function () { };
  115. InfoRegionsComponent.prototype = new AccessibilityComponent();
  116. extend(InfoRegionsComponent.prototype, /** @lends Highcharts.InfoRegionsComponent */ {
  117. /**
  118. * Init the component
  119. * @private
  120. */
  121. init: function () {
  122. var chart = this.chart;
  123. var component = this;
  124. this.initRegionsDefinitions();
  125. this.addEvent(chart, 'afterGetTable', function (e) {
  126. component.onDataTableCreated(e);
  127. });
  128. this.addEvent(chart, 'afterViewData', function (tableDiv) {
  129. component.dataTableDiv = tableDiv;
  130. // Use small delay to give browsers & AT time to register new table
  131. setTimeout(function () {
  132. component.focusDataTable();
  133. }, 300);
  134. });
  135. this.announcer = new Announcer(chart, 'assertive');
  136. },
  137. /**
  138. * @private
  139. */
  140. initRegionsDefinitions: function () {
  141. var component = this;
  142. this.screenReaderSections = {
  143. before: {
  144. element: null,
  145. buildContent: function (chart) {
  146. var formatter = chart.options.accessibility
  147. .screenReaderSection.beforeChartFormatter;
  148. return formatter ? formatter(chart) :
  149. component.defaultBeforeChartFormatter(chart);
  150. },
  151. insertIntoDOM: function (el, chart) {
  152. chart.renderTo.insertBefore(el, chart.renderTo.firstChild);
  153. },
  154. afterInserted: function () {
  155. if (typeof component.sonifyButtonId !== 'undefined') {
  156. component.initSonifyButton(component.sonifyButtonId);
  157. }
  158. if (typeof component.dataTableButtonId !== 'undefined') {
  159. component.initDataTableButton(component.dataTableButtonId);
  160. }
  161. }
  162. },
  163. after: {
  164. element: null,
  165. buildContent: function (chart) {
  166. var formatter = chart.options.accessibility.screenReaderSection
  167. .afterChartFormatter;
  168. return formatter ? formatter(chart) :
  169. component.defaultAfterChartFormatter();
  170. },
  171. insertIntoDOM: function (el, chart) {
  172. chart.renderTo.insertBefore(el, chart.container.nextSibling);
  173. }
  174. }
  175. };
  176. },
  177. /**
  178. * Called on chart render. Have to update the sections on render, in order
  179. * to get a11y info from series.
  180. */
  181. onChartRender: function () {
  182. var component = this;
  183. this.linkedDescriptionElement = this.getLinkedDescriptionElement();
  184. this.setLinkedDescriptionAttrs();
  185. Object.keys(this.screenReaderSections).forEach(function (regionKey) {
  186. component.updateScreenReaderSection(regionKey);
  187. });
  188. },
  189. /**
  190. * @private
  191. */
  192. getLinkedDescriptionElement: function () {
  193. var chartOptions = this.chart.options, linkedDescOption = chartOptions.accessibility.linkedDescription;
  194. if (!linkedDescOption) {
  195. return;
  196. }
  197. if (typeof linkedDescOption !== 'string') {
  198. return linkedDescOption;
  199. }
  200. var query = format(linkedDescOption, this.chart), queryMatch = doc.querySelectorAll(query);
  201. if (queryMatch.length === 1) {
  202. return queryMatch[0];
  203. }
  204. },
  205. /**
  206. * @private
  207. */
  208. setLinkedDescriptionAttrs: function () {
  209. var el = this.linkedDescriptionElement;
  210. if (el) {
  211. el.setAttribute('aria-hidden', 'true');
  212. addClass(el, 'highcharts-linked-description');
  213. }
  214. },
  215. /**
  216. * @private
  217. * @param {string} regionKey The name/key of the region to update
  218. */
  219. updateScreenReaderSection: function (regionKey) {
  220. var chart = this.chart, region = this.screenReaderSections[regionKey], content = region.buildContent(chart), sectionDiv = region.element = (region.element || this.createElement('div')), hiddenDiv = (sectionDiv.firstChild || this.createElement('div'));
  221. this.setScreenReaderSectionAttribs(sectionDiv, regionKey);
  222. hiddenDiv.innerHTML = content;
  223. sectionDiv.appendChild(hiddenDiv);
  224. region.insertIntoDOM(sectionDiv, chart);
  225. visuallyHideElement(hiddenDiv);
  226. unhideChartElementFromAT(chart, hiddenDiv);
  227. if (region.afterInserted) {
  228. region.afterInserted();
  229. }
  230. },
  231. /**
  232. * @private
  233. * @param {Highcharts.HTMLDOMElement} sectionDiv The section element
  234. * @param {string} regionKey Name/key of the region we are setting attrs for
  235. */
  236. setScreenReaderSectionAttribs: function (sectionDiv, regionKey) {
  237. var labelLangKey = ('accessibility.screenReaderSection.' + regionKey + 'RegionLabel'), chart = this.chart, labelText = chart.langFormat(labelLangKey, { chart: chart }), sectionId = 'highcharts-screen-reader-region-' + regionKey + '-' +
  238. chart.index;
  239. setElAttrs(sectionDiv, {
  240. id: sectionId,
  241. 'aria-label': labelText
  242. });
  243. // Sections are wrapped to be positioned relatively to chart in case
  244. // elements inside are tabbed to.
  245. sectionDiv.style.position = 'relative';
  246. if (chart.options.accessibility.landmarkVerbosity === 'all' &&
  247. labelText) {
  248. sectionDiv.setAttribute('role', 'region');
  249. }
  250. },
  251. /**
  252. * @private
  253. * @return {string}
  254. */
  255. defaultBeforeChartFormatter: function () {
  256. var _a;
  257. var chart = this.chart, format = chart.options.accessibility
  258. .screenReaderSection.beforeChartFormat, axesDesc = this.getAxesDescription(), shouldHaveSonifyBtn = chart.sonify && ((_a = chart.options.sonification) === null || _a === void 0 ? void 0 : _a.enabled), sonifyButtonId = 'highcharts-a11y-sonify-data-btn-' +
  259. chart.index, dataTableButtonId = 'hc-linkto-highcharts-data-table-' +
  260. chart.index, annotationsList = getAnnotationsInfoHTML(chart), annotationsTitleStr = chart.langFormat('accessibility.screenReaderSection.annotations.heading', { chart: chart }), context = {
  261. chartTitle: getChartTitle(chart),
  262. typeDescription: this.getTypeDescriptionText(),
  263. chartSubtitle: this.getSubtitleText(),
  264. chartLongdesc: this.getLongdescText(),
  265. xAxisDescription: axesDesc.xAxis,
  266. yAxisDescription: axesDesc.yAxis,
  267. playAsSoundButton: shouldHaveSonifyBtn ?
  268. this.getSonifyButtonText(sonifyButtonId) : '',
  269. viewTableButton: chart.getCSV ?
  270. this.getDataTableButtonText(dataTableButtonId) : '',
  271. annotationsTitle: annotationsList ? annotationsTitleStr : '',
  272. annotationsList: annotationsList
  273. }, formattedString = H.i18nFormat(format, context, chart);
  274. this.dataTableButtonId = dataTableButtonId;
  275. this.sonifyButtonId = sonifyButtonId;
  276. return stringToSimpleHTML(formattedString);
  277. },
  278. /**
  279. * @private
  280. * @return {string}
  281. */
  282. defaultAfterChartFormatter: function () {
  283. var chart = this.chart, format = chart.options.accessibility
  284. .screenReaderSection.afterChartFormat, context = {
  285. endOfChartMarker: this.getEndOfChartMarkerText()
  286. }, formattedString = H.i18nFormat(format, context, chart);
  287. return stringToSimpleHTML(formattedString);
  288. },
  289. /**
  290. * @private
  291. * @return {string}
  292. */
  293. getLinkedDescription: function () {
  294. var el = this.linkedDescriptionElement, content = el && el.innerHTML || '';
  295. return stripHTMLTagsFromString(content);
  296. },
  297. /**
  298. * @private
  299. * @return {string}
  300. */
  301. getLongdescText: function () {
  302. var chartOptions = this.chart.options, captionOptions = chartOptions.caption, captionText = captionOptions && captionOptions.text, linkedDescription = this.getLinkedDescription();
  303. return (chartOptions.accessibility.description ||
  304. linkedDescription ||
  305. captionText ||
  306. '');
  307. },
  308. /**
  309. * @private
  310. * @return {string}
  311. */
  312. getTypeDescriptionText: function () {
  313. var chart = this.chart;
  314. return chart.types ?
  315. chart.options.accessibility.typeDescription ||
  316. chart.getTypeDescription(chart.types) : '';
  317. },
  318. /**
  319. * @private
  320. * @param {string} buttonId
  321. * @return {string}
  322. */
  323. getDataTableButtonText: function (buttonId) {
  324. var chart = this.chart, buttonText = chart.langFormat('accessibility.table.viewAsDataTableButtonText', { chart: chart, chartTitle: getChartTitle(chart) });
  325. return '<button id="' + buttonId + '">' + buttonText + '</button>';
  326. },
  327. /**
  328. * @private
  329. * @param {string} buttonId
  330. * @return {string}
  331. */
  332. getSonifyButtonText: function (buttonId) {
  333. var _a;
  334. var chart = this.chart;
  335. if (((_a = chart.options.sonification) === null || _a === void 0 ? void 0 : _a.enabled) === false) {
  336. return '';
  337. }
  338. var buttonText = chart.langFormat('accessibility.sonification.playAsSoundButtonText', { chart: chart, chartTitle: getChartTitle(chart) });
  339. return '<button id="' + buttonId + '">' + buttonText + '</button>';
  340. },
  341. /**
  342. * @private
  343. * @return {string}
  344. */
  345. getSubtitleText: function () {
  346. var subtitle = (this.chart.options.subtitle);
  347. return stripHTMLTagsFromString(subtitle && subtitle.text || '');
  348. },
  349. /**
  350. * @private
  351. * @return {string}
  352. */
  353. getEndOfChartMarkerText: function () {
  354. var chart = this.chart, markerText = chart.langFormat('accessibility.screenReaderSection.endOfChartMarker', { chart: chart }), id = 'highcharts-end-of-chart-marker-' + chart.index;
  355. return '<div id="' + id + '">' + markerText + '</div>';
  356. },
  357. /**
  358. * @private
  359. * @param {Highcharts.Dictionary<string>} e
  360. */
  361. onDataTableCreated: function (e) {
  362. var chart = this.chart;
  363. if (chart.options.accessibility.enabled) {
  364. if (this.viewDataTableButton) {
  365. this.viewDataTableButton.setAttribute('aria-expanded', 'true');
  366. }
  367. e.html = e.html.replace('<table ', '<table tabindex="-1" summary="' + getTableSummary(chart) + '"');
  368. }
  369. },
  370. /**
  371. * @private
  372. */
  373. focusDataTable: function () {
  374. var tableDiv = this.dataTableDiv, table = tableDiv && tableDiv.getElementsByTagName('table')[0];
  375. if (table && table.focus) {
  376. table.focus();
  377. }
  378. },
  379. /**
  380. * @private
  381. * @param {string} sonifyButtonId
  382. */
  383. initSonifyButton: function (sonifyButtonId) {
  384. var _this = this;
  385. var el = this.sonifyButton = getElement(sonifyButtonId);
  386. var chart = this.chart;
  387. var defaultHandler = function (e) {
  388. el === null || el === void 0 ? void 0 : el.setAttribute('aria-hidden', 'true');
  389. el === null || el === void 0 ? void 0 : el.setAttribute('aria-label', '');
  390. e.preventDefault();
  391. e.stopPropagation();
  392. var announceMsg = chart.langFormat('accessibility.sonification.playAsSoundClickAnnouncement', { chart: chart });
  393. _this.announcer.announce(announceMsg);
  394. setTimeout(function () {
  395. el === null || el === void 0 ? void 0 : el.removeAttribute('aria-hidden');
  396. el === null || el === void 0 ? void 0 : el.removeAttribute('aria-label');
  397. if (chart.sonify) {
  398. chart.sonify();
  399. }
  400. }, 1000); // Delay to let screen reader speak the button press
  401. };
  402. if (el && chart) {
  403. setElAttrs(el, {
  404. tabindex: '-1'
  405. });
  406. el.onclick = function (e) {
  407. var _a;
  408. var onPlayAsSoundClick = (_a = chart.options.accessibility) === null || _a === void 0 ? void 0 : _a.screenReaderSection.onPlayAsSoundClick;
  409. (onPlayAsSoundClick || defaultHandler).call(this, e, chart);
  410. };
  411. }
  412. },
  413. /**
  414. * Set attribs and handlers for default viewAsDataTable button if exists.
  415. * @private
  416. * @param {string} tableButtonId
  417. */
  418. initDataTableButton: function (tableButtonId) {
  419. var el = this.viewDataTableButton = getElement(tableButtonId), chart = this.chart, tableId = tableButtonId.replace('hc-linkto-', '');
  420. if (el) {
  421. setElAttrs(el, {
  422. tabindex: '-1',
  423. 'aria-expanded': !!getElement(tableId)
  424. });
  425. el.onclick = chart.options.accessibility
  426. .screenReaderSection.onViewDataTableClick ||
  427. function () {
  428. chart.viewData();
  429. };
  430. }
  431. },
  432. /**
  433. * Return object with text description of each of the chart's axes.
  434. * @private
  435. * @return {Highcharts.Dictionary<string>}
  436. */
  437. getAxesDescription: function () {
  438. var chart = this.chart, shouldDescribeColl = function (collectionKey, defaultCondition) {
  439. var axes = chart[collectionKey];
  440. return axes.length > 1 || axes[0] &&
  441. pick(axes[0].options.accessibility &&
  442. axes[0].options.accessibility.enabled, defaultCondition);
  443. }, hasNoMap = !!chart.types && chart.types.indexOf('map') < 0, hasCartesian = !!chart.hasCartesianSeries, showXAxes = shouldDescribeColl('xAxis', !chart.angular && hasCartesian && hasNoMap), showYAxes = shouldDescribeColl('yAxis', hasCartesian && hasNoMap), desc = {};
  444. if (showXAxes) {
  445. desc.xAxis = this.getAxisDescriptionText('xAxis');
  446. }
  447. if (showYAxes) {
  448. desc.yAxis = this.getAxisDescriptionText('yAxis');
  449. }
  450. return desc;
  451. },
  452. /**
  453. * @private
  454. * @param {string} collectionKey
  455. * @return {string}
  456. */
  457. getAxisDescriptionText: function (collectionKey) {
  458. var component = this, chart = this.chart, axes = chart[collectionKey];
  459. return chart.langFormat('accessibility.axis.' + collectionKey + 'Description' + (axes.length > 1 ? 'Plural' : 'Singular'), {
  460. chart: chart,
  461. names: axes.map(function (axis) {
  462. return getAxisDescription(axis);
  463. }),
  464. ranges: axes.map(function (axis) {
  465. return component.getAxisRangeDescription(axis);
  466. }),
  467. numAxes: axes.length
  468. });
  469. },
  470. /**
  471. * Return string with text description of the axis range.
  472. * @private
  473. * @param {Highcharts.Axis} axis The axis to get range desc of.
  474. * @return {string} A string with the range description for the axis.
  475. */
  476. getAxisRangeDescription: function (axis) {
  477. var axisOptions = axis.options || {};
  478. // Handle overridden range description
  479. if (axisOptions.accessibility &&
  480. typeof axisOptions.accessibility.rangeDescription !== 'undefined') {
  481. return axisOptions.accessibility.rangeDescription;
  482. }
  483. // Handle category axes
  484. if (axis.categories) {
  485. return this.getCategoryAxisRangeDesc(axis);
  486. }
  487. // Use time range, not from-to?
  488. if (axis.dateTime && (axis.min === 0 || axis.dataMin === 0)) {
  489. return this.getAxisTimeLengthDesc(axis);
  490. }
  491. // Just use from and to.
  492. // We have the range and the unit to use, find the desc format
  493. return this.getAxisFromToDescription(axis);
  494. },
  495. /**
  496. * @private
  497. * @param {Highcharts.Axis} axis
  498. * @return {string}
  499. */
  500. getCategoryAxisRangeDesc: function (axis) {
  501. var chart = this.chart;
  502. if (axis.dataMax && axis.dataMin) {
  503. return chart.langFormat('accessibility.axis.rangeCategories', {
  504. chart: chart,
  505. axis: axis,
  506. numCategories: axis.dataMax - axis.dataMin + 1
  507. });
  508. }
  509. return '';
  510. },
  511. /**
  512. * @private
  513. * @param {Highcharts.Axis} axis
  514. * @return {string}
  515. */
  516. getAxisTimeLengthDesc: function (axis) {
  517. var chart = this.chart, range = {}, rangeUnit = 'Seconds';
  518. range.Seconds = ((axis.max || 0) - (axis.min || 0)) / 1000;
  519. range.Minutes = range.Seconds / 60;
  520. range.Hours = range.Minutes / 60;
  521. range.Days = range.Hours / 24;
  522. ['Minutes', 'Hours', 'Days'].forEach(function (unit) {
  523. if (range[unit] > 2) {
  524. rangeUnit = unit;
  525. }
  526. });
  527. var rangeValue = range[rangeUnit].toFixed(rangeUnit !== 'Seconds' &&
  528. rangeUnit !== 'Minutes' ? 1 : 0 // Use decimals for days/hours
  529. );
  530. // We have the range and the unit to use, find the desc format
  531. return chart.langFormat('accessibility.axis.timeRange' + rangeUnit, {
  532. chart: chart,
  533. axis: axis,
  534. range: rangeValue.replace('.0', '')
  535. });
  536. },
  537. /**
  538. * @private
  539. * @param {Highcharts.Axis} axis
  540. * @return {string}
  541. */
  542. getAxisFromToDescription: function (axis) {
  543. var chart = this.chart, dateRangeFormat = chart.options.accessibility
  544. .screenReaderSection.axisRangeDateFormat, format = function (axisKey) {
  545. return axis.dateTime ? chart.time.dateFormat(dateRangeFormat, axis[axisKey]) : axis[axisKey];
  546. };
  547. return chart.langFormat('accessibility.axis.rangeFromTo', {
  548. chart: chart,
  549. axis: axis,
  550. rangeFrom: format('min'),
  551. rangeTo: format('max')
  552. });
  553. },
  554. /**
  555. * Remove component traces
  556. */
  557. destroy: function () {
  558. var _a;
  559. (_a = this.announcer) === null || _a === void 0 ? void 0 : _a.destroy();
  560. }
  561. });
  562. export default InfoRegionsComponent;