@semcore/d3-chart 3.60.0 → 3.60.1

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.
Files changed (214) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/Area.js +14 -12
  3. package/lib/cjs/Area.js.map +1 -1
  4. package/lib/cjs/Axis.js +17 -15
  5. package/lib/cjs/Axis.js.map +1 -1
  6. package/lib/cjs/Bar.js +19 -17
  7. package/lib/cjs/Bar.js.map +1 -1
  8. package/lib/cjs/Bubble.js +15 -13
  9. package/lib/cjs/Bubble.js.map +1 -1
  10. package/lib/cjs/CompactHorizontalBar.js +19 -17
  11. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  12. package/lib/cjs/Donut.js +12 -10
  13. package/lib/cjs/Donut.js.map +1 -1
  14. package/lib/cjs/Dots.js +11 -9
  15. package/lib/cjs/Dots.js.map +1 -1
  16. package/lib/cjs/HorizontalBar.js +19 -17
  17. package/lib/cjs/HorizontalBar.js.map +1 -1
  18. package/lib/cjs/Hover.js +6 -4
  19. package/lib/cjs/Hover.js.map +1 -1
  20. package/lib/cjs/Line.js +12 -10
  21. package/lib/cjs/Line.js.map +1 -1
  22. package/lib/cjs/Plot.js +6 -4
  23. package/lib/cjs/Plot.js.map +1 -1
  24. package/lib/cjs/Radar.js +22 -20
  25. package/lib/cjs/Radar.js.map +1 -1
  26. package/lib/cjs/RadialTree.js +15 -13
  27. package/lib/cjs/RadialTree.js.map +1 -1
  28. package/lib/cjs/Reference.js +15 -13
  29. package/lib/cjs/Reference.js.map +1 -1
  30. package/lib/cjs/ScatterPlot.js +12 -10
  31. package/lib/cjs/ScatterPlot.js.map +1 -1
  32. package/lib/cjs/Tooltip.js +12 -10
  33. package/lib/cjs/Tooltip.js.map +1 -1
  34. package/lib/cjs/Venn.js +12 -10
  35. package/lib/cjs/Venn.js.map +1 -1
  36. package/lib/cjs/a11y/PlotA11yModule.js +5 -3
  37. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  38. package/lib/cjs/a11y/PlotA11yView.js +5 -3
  39. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  40. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
  41. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  42. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +20 -18
  43. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  44. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +9 -7
  45. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  46. package/lib/es6/Area.js +14 -12
  47. package/lib/es6/Area.js.map +1 -1
  48. package/lib/es6/Axis.js +17 -15
  49. package/lib/es6/Axis.js.map +1 -1
  50. package/lib/es6/Bar.js +19 -17
  51. package/lib/es6/Bar.js.map +1 -1
  52. package/lib/es6/Bubble.js +15 -13
  53. package/lib/es6/Bubble.js.map +1 -1
  54. package/lib/es6/CompactHorizontalBar.js +19 -17
  55. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  56. package/lib/es6/Donut.js +12 -10
  57. package/lib/es6/Donut.js.map +1 -1
  58. package/lib/es6/Dots.js +11 -9
  59. package/lib/es6/Dots.js.map +1 -1
  60. package/lib/es6/HorizontalBar.js +19 -17
  61. package/lib/es6/HorizontalBar.js.map +1 -1
  62. package/lib/es6/Hover.js +6 -4
  63. package/lib/es6/Hover.js.map +1 -1
  64. package/lib/es6/Line.js +12 -10
  65. package/lib/es6/Line.js.map +1 -1
  66. package/lib/es6/Plot.js +6 -4
  67. package/lib/es6/Plot.js.map +1 -1
  68. package/lib/es6/Radar.js +22 -20
  69. package/lib/es6/Radar.js.map +1 -1
  70. package/lib/es6/RadialTree.js +15 -13
  71. package/lib/es6/RadialTree.js.map +1 -1
  72. package/lib/es6/Reference.js +15 -13
  73. package/lib/es6/Reference.js.map +1 -1
  74. package/lib/es6/ScatterPlot.js +12 -10
  75. package/lib/es6/ScatterPlot.js.map +1 -1
  76. package/lib/es6/Tooltip.js +12 -10
  77. package/lib/es6/Tooltip.js.map +1 -1
  78. package/lib/es6/Venn.js +12 -10
  79. package/lib/es6/Venn.js.map +1 -1
  80. package/lib/es6/a11y/PlotA11yModule.js +5 -3
  81. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  82. package/lib/es6/a11y/PlotA11yView.js +5 -3
  83. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  84. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
  85. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  86. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +20 -18
  87. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  88. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +9 -7
  89. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  90. package/lib/esm/AnimatedClipPath.mjs +54 -0
  91. package/lib/esm/Area.mjs +189 -0
  92. package/lib/esm/Axis.mjs +406 -0
  93. package/lib/esm/Bar.mjs +201 -0
  94. package/lib/esm/Bubble.mjs +216 -0
  95. package/lib/esm/CompactHorizontalBar.mjs +518 -0
  96. package/lib/esm/Donut.mjs +415 -0
  97. package/lib/esm/Dots.mjs +120 -0
  98. package/lib/esm/GroupBar.mjs +94 -0
  99. package/lib/esm/HorizontalBar.mjs +181 -0
  100. package/lib/esm/Hover.mjs +217 -0
  101. package/lib/esm/Line.mjs +199 -0
  102. package/lib/esm/Pattern.mjs +520 -0
  103. package/lib/esm/Plot.mjs +137 -0
  104. package/lib/esm/Radar.mjs +706 -0
  105. package/lib/esm/RadialTree.mjs +565 -0
  106. package/lib/esm/Reference.mjs +243 -0
  107. package/lib/esm/ResponsiveContainer.mjs +99 -0
  108. package/lib/esm/ScatterPlot.mjs +194 -0
  109. package/lib/esm/StackBar.mjs +177 -0
  110. package/lib/esm/StackedArea.mjs +84 -0
  111. package/lib/esm/Tooltip.mjs +255 -0
  112. package/lib/esm/Venn.mjs +234 -0
  113. package/lib/esm/a11y/DataAccessibilityTable.mjs +100 -0
  114. package/lib/esm/a11y/PlotA11yModule.mjs +117 -0
  115. package/lib/esm/a11y/PlotA11yView.mjs +146 -0
  116. package/lib/esm/a11y/bezier.mjs +32 -0
  117. package/lib/esm/a11y/focus.mjs +44 -0
  118. package/lib/esm/a11y/hints.mjs +122 -0
  119. package/lib/esm/a11y/insights.mjs +700 -0
  120. package/lib/esm/a11y/intl.mjs +17 -0
  121. package/lib/esm/a11y/locale.mjs +39 -0
  122. package/lib/esm/a11y/serialize.mjs +363 -0
  123. package/lib/esm/a11y/summarize.mjs +14 -0
  124. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +33 -0
  125. package/lib/esm/a11y/translations/module/de.json.mjs +14 -0
  126. package/lib/esm/a11y/translations/module/en.json.mjs +14 -0
  127. package/lib/esm/a11y/translations/module/es.json.mjs +14 -0
  128. package/lib/esm/a11y/translations/module/fr.json.mjs +14 -0
  129. package/lib/esm/a11y/translations/module/it.json.mjs +14 -0
  130. package/lib/esm/a11y/translations/module/ja.json.mjs +14 -0
  131. package/lib/esm/a11y/translations/module/ko.json.mjs +14 -0
  132. package/lib/esm/a11y/translations/module/nl.json.mjs +14 -0
  133. package/lib/esm/a11y/translations/module/pl.json.mjs +14 -0
  134. package/lib/esm/a11y/translations/module/pt.json.mjs +14 -0
  135. package/lib/esm/a11y/translations/module/sv.json.mjs +14 -0
  136. package/lib/esm/a11y/translations/module/tr.json.mjs +14 -0
  137. package/lib/esm/a11y/translations/module/vi.json.mjs +14 -0
  138. package/lib/esm/a11y/translations/module/zh.json.mjs +14 -0
  139. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +33 -0
  140. package/lib/esm/a11y/translations/view/de.json.mjs +48 -0
  141. package/lib/esm/a11y/translations/view/en.json.mjs +48 -0
  142. package/lib/esm/a11y/translations/view/es.json.mjs +48 -0
  143. package/lib/esm/a11y/translations/view/fr.json.mjs +48 -0
  144. package/lib/esm/a11y/translations/view/it.json.mjs +48 -0
  145. package/lib/esm/a11y/translations/view/ja.json.mjs +48 -0
  146. package/lib/esm/a11y/translations/view/ko.json.mjs +48 -0
  147. package/lib/esm/a11y/translations/view/nl.json.mjs +48 -0
  148. package/lib/esm/a11y/translations/view/pl.json.mjs +48 -0
  149. package/lib/esm/a11y/translations/view/pt.json.mjs +48 -0
  150. package/lib/esm/a11y/translations/view/sv.json.mjs +48 -0
  151. package/lib/esm/a11y/translations/view/tr.json.mjs +48 -0
  152. package/lib/esm/a11y/translations/view/vi.json.mjs +48 -0
  153. package/lib/esm/a11y/translations/view/zh.json.mjs +48 -0
  154. package/lib/esm/color.mjs +127 -0
  155. package/lib/esm/component/Chart/AbstractChart.mjs +408 -0
  156. package/lib/esm/component/Chart/AreaChart.mjs +145 -0
  157. package/lib/esm/component/Chart/BarChart.mjs +240 -0
  158. package/lib/esm/component/Chart/BubbleChart.mjs +135 -0
  159. package/lib/esm/component/Chart/CigaretteChart.mjs +294 -0
  160. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +113 -0
  161. package/lib/esm/component/Chart/DonutChart.mjs +113 -0
  162. package/lib/esm/component/Chart/HistogramChart.mjs +166 -0
  163. package/lib/esm/component/Chart/LineChart.mjs +131 -0
  164. package/lib/esm/component/Chart/RadarChart.mjs +115 -0
  165. package/lib/esm/component/Chart/ScatterPlotChart.mjs +144 -0
  166. package/lib/esm/component/Chart/VennChart.mjs +141 -0
  167. package/lib/esm/component/Chart/index.mjs +27 -0
  168. package/lib/esm/component/ChartLegend/BaseLegend.mjs +91 -0
  169. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +86 -0
  170. package/lib/esm/component/ChartLegend/LegendFlex/legend-flex.shadow.css +12 -0
  171. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +240 -0
  172. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +4 -0
  173. package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +129 -0
  174. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +90 -0
  175. package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +19 -0
  176. package/lib/esm/component/ChartLegend/index.mjs +5 -0
  177. package/lib/esm/component/Cigarette/Cigarette.mjs +139 -0
  178. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +141 -0
  179. package/lib/esm/createElement.mjs +104 -0
  180. package/lib/esm/index.mjs +70 -0
  181. package/lib/esm/style/area.shadow.css +50 -0
  182. package/lib/esm/style/axis.shadow.css +88 -0
  183. package/lib/esm/style/bar.shadow.css +66 -0
  184. package/lib/esm/style/bubble.shadow.css +64 -0
  185. package/lib/esm/style/donut.shadow.css +36 -0
  186. package/lib/esm/style/dot.shadow.css +27 -0
  187. package/lib/esm/style/hover.shadow.css +9 -0
  188. package/lib/esm/style/line.shadow.css +43 -0
  189. package/lib/esm/style/plot.shadow.css +19 -0
  190. package/lib/esm/style/plotA11yModule.shadow.css +12 -0
  191. package/lib/esm/style/plotA11yView.shadow.css +39 -0
  192. package/lib/esm/style/radar.shadow.css +80 -0
  193. package/lib/esm/style/radial-tree.shadow.css +54 -0
  194. package/lib/esm/style/reference.shadow.css +43 -0
  195. package/lib/esm/style/scatterplot.shadow.css +41 -0
  196. package/lib/esm/style/tooltip.shadow.css +42 -0
  197. package/lib/esm/style/venn.shadow.css +48 -0
  198. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +31 -0
  199. package/lib/esm/translations/en.json.mjs +12 -0
  200. package/lib/esm/translations/es.json.mjs +11 -0
  201. package/lib/esm/translations/fr.json.mjs +11 -0
  202. package/lib/esm/translations/it.json.mjs +11 -0
  203. package/lib/esm/translations/ja.json.mjs +11 -0
  204. package/lib/esm/translations/ko.json.mjs +11 -0
  205. package/lib/esm/translations/nl.json.mjs +11 -0
  206. package/lib/esm/translations/pl.json.mjs +11 -0
  207. package/lib/esm/translations/pt.json.mjs +11 -0
  208. package/lib/esm/translations/sv.json.mjs +11 -0
  209. package/lib/esm/translations/tr.json.mjs +11 -0
  210. package/lib/esm/translations/vi.json.mjs +11 -0
  211. package/lib/esm/translations/zh.json.mjs +11 -0
  212. package/lib/esm/utils.mjs +266 -0
  213. package/package.json +11 -11
  214. package/vite.config.ts +2 -0
@@ -0,0 +1,17 @@
1
+ import { createIntlCache, createIntl } from "@formatjs/intl";
2
+ import { normalizeLocale } from "./locale.mjs";
3
+ var messagesCache = createIntlCache();
4
+ var intlCache = {};
5
+ var getIntl = function getIntl2(locale, translations, availableLocales) {
6
+ var _normalizeLocale;
7
+ locale = (_normalizeLocale = normalizeLocale(locale, availableLocales)) !== null && _normalizeLocale !== void 0 ? _normalizeLocale : "en";
8
+ intlCache[locale] = createIntl({
9
+ locale,
10
+ defaultLocale: "en",
11
+ messages: translations || {}
12
+ }, messagesCache);
13
+ return intlCache[locale];
14
+ };
15
+ export {
16
+ getIntl
17
+ };
@@ -0,0 +1,39 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ var normalizeLocale = function normalizeLocale2(providedLocale) {
3
+ var _ref, _providedLocale, _globalThis$navigator;
4
+ var translations = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5
+ var translationNames = {};
6
+ for (var _locale in translations) {
7
+ translationNames[_locale.toLowerCase()] = _locale;
8
+ }
9
+ providedLocale = (_ref = (_providedLocale = providedLocale) !== null && _providedLocale !== void 0 ? _providedLocale : isAvailableLocale(globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 ? void 0 : _globalThis$navigator.language, translations)) !== null && _ref !== void 0 ? _ref : "en";
10
+ var locale = providedLocale.toLowerCase();
11
+ if (locale.includes("-") && !translations[locale]) {
12
+ var _locale$split = locale.split("-"), _locale$split2 = _slicedToArray(_locale$split, 1), localeBase = _locale$split2[0];
13
+ if (translations[localeBase]) {
14
+ locale = localeBase;
15
+ }
16
+ }
17
+ locale = translationNames[locale] ? translationNames[locale] : locale;
18
+ if (!translations[locale]) {
19
+ var availableLocales = Object.keys(translations).join(", ");
20
+ if (process.env.NODE_ENV !== "production") {
21
+ console.error('[Intergalactic @semcore/d3-charts a11y module]: No locale "'.concat(providedLocale, '" available. Available locales: ').concat(availableLocales));
22
+ }
23
+ return null;
24
+ }
25
+ return locale;
26
+ };
27
+ var isAvailableLocale = function isAvailableLocale2(locale, translations) {
28
+ if (typeof locale !== "string") {
29
+ return void 0;
30
+ }
31
+ var _locale$split3 = locale.split("-"), _locale$split4 = _slicedToArray(_locale$split3, 1), localeBase = _locale$split4[0];
32
+ if (!translations[localeBase]) {
33
+ return void 0;
34
+ }
35
+ return localeBase;
36
+ };
37
+ export {
38
+ normalizeLocale
39
+ };
@@ -0,0 +1,363 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
4
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
5
+ import { getIntl } from "./intl.mjs";
6
+ var formatLimitedSizeList = function formatLimitedSizeList2(items, intl) {
7
+ var maxFinalStringLength = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 100;
8
+ var includeEllipsis = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true;
9
+ var limit = items.length;
10
+ var stringifyList = function stringifyList2() {
11
+ var cutItems = items.slice(0, limit);
12
+ if (items.length > limit && includeEllipsis) {
13
+ cutItems.push(intl.formatMessage({
14
+ id: "ellipsis"
15
+ }, {
16
+ leftCount: limit - items.length
17
+ }));
18
+ }
19
+ return intl.formatList(cutItems);
20
+ };
21
+ var formattedList = stringifyList();
22
+ if (formattedList.length <= maxFinalStringLength) {
23
+ return formattedList;
24
+ }
25
+ var overflowRatio = formattedList.length / maxFinalStringLength;
26
+ limit = Math.floor(limit / overflowRatio);
27
+ if (limit === 0) {
28
+ limit = 1;
29
+ return stringifyList();
30
+ }
31
+ formattedList = stringifyList();
32
+ var maxIncreaseAttempts = 4;
33
+ for (var i = 0; i < maxIncreaseAttempts; i++) {
34
+ limit++;
35
+ var newLimitFormattedList = stringifyList();
36
+ if (newLimitFormattedList.length > maxFinalStringLength) {
37
+ return formattedList;
38
+ }
39
+ formattedList = newLimitFormattedList;
40
+ }
41
+ return formattedList;
42
+ };
43
+ var isReactComponent = function isReactComponent2(obj) {
44
+ return _typeof(obj) === "object" && obj && "displayName" in obj && typeof obj.displayName === "string";
45
+ };
46
+ var guessNumberAsTimestampMinDate = (/* @__PURE__ */ new Date("1975")).getTime();
47
+ var defaultValueFormatter = function defaultValueFormatter2(intl, value) {
48
+ var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, siblingsTimeMark = _ref.siblingsTimeMark, maxListSymbols = _ref.maxListSymbols, datesWithTime = _ref.datesWithTime;
49
+ if (typeof value === "number") {
50
+ if (value >= guessNumberAsTimestampMinDate) {
51
+ return defaultValueFormatter2(intl, new Date(value), {
52
+ siblingsTimeMark,
53
+ maxListSymbols,
54
+ datesWithTime
55
+ });
56
+ }
57
+ return intl.formatNumber(value);
58
+ }
59
+ if (value instanceof Date) {
60
+ if (datesWithTime || siblingsTimeMark && siblingsTimeMark instanceof Date && Math.abs(value.getTime() - siblingsTimeMark.getTime()) < 1e3 * 60 * 60 * 24 * 5) {
61
+ return intl.formatDate(value, {
62
+ dateStyle: "medium",
63
+ timeStyle: "medium"
64
+ });
65
+ }
66
+ return intl.formatDate(value, {
67
+ dateStyle: "medium"
68
+ });
69
+ }
70
+ if (Array.isArray(value)) {
71
+ var formattedValues = value.map(function(subValue) {
72
+ return defaultValueFormatter2(intl, subValue, {
73
+ siblingsTimeMark,
74
+ maxListSymbols,
75
+ datesWithTime
76
+ });
77
+ });
78
+ return formatLimitedSizeList(formattedValues, intl, maxListSymbols);
79
+ }
80
+ if (isReactComponent(value)) {
81
+ return String(value.displayName);
82
+ }
83
+ if (value === void 0 || value === null) {
84
+ return intl.formatMessage({
85
+ id: "data-not-available"
86
+ });
87
+ }
88
+ return String(value);
89
+ };
90
+ var formatValuesList = function formatValuesList2(values, _ref2) {
91
+ var intl = _ref2.intl, limit = _ref2.limit, datesWithTime = _ref2.datesWithTime, maxListSymbols = _ref2.maxListSymbols;
92
+ var result = values.slice(0, limit).map(function(_ref3) {
93
+ var rawValue = _ref3.value, label = _ref3.label;
94
+ if (rawValue === void 0) return label;
95
+ var value = defaultValueFormatter(intl, rawValue, {
96
+ datesWithTime,
97
+ maxListSymbols
98
+ });
99
+ if (String(value) === String(label)) return value;
100
+ return intl.formatMessage({
101
+ id: "value-labeled"
102
+ }, {
103
+ label,
104
+ value
105
+ });
106
+ });
107
+ if (values.length > limit) {
108
+ result.push(intl.formatMessage({
109
+ id: "ellipsis"
110
+ }, {
111
+ leftCount: limit - values.values.length
112
+ }));
113
+ }
114
+ return intl.formatList(result);
115
+ };
116
+ var serialize = function serialize2(_ref4, _ref5, _ref6) {
117
+ var insights = _ref4.insights, dataType = _ref4.dataType, dataRange = _ref4.dataRange, dataTitle = _ref4.dataTitle, entitiesCount = _ref4.entitiesCount;
118
+ var datesWithTime = _ref5.datesWithTime, maxListSymbols = _ref5.maxListSymbols, clustersLimit = _ref5.clustersLimit, valuesLimit = _ref5.valuesLimit, groupsLimit = _ref5.groupsLimit, titlesFormatter = _ref5.titlesFormatter, valuesFormatter = _ref5.valuesFormatter;
119
+ var locale = _ref6.locale, translations = _ref6.translations, availableLocales = _ref6.availableLocales;
120
+ if (insights.length === 0) return null;
121
+ var intl = getIntl(locale, translations, availableLocales);
122
+ var dataRangeSummary = intl.formatList(dataRange.map(function(range) {
123
+ var _valuesFormatter, _valuesFormatter2, _titlesFormatter;
124
+ var from = (_valuesFormatter = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(range.from, range.label)) !== null && _valuesFormatter !== void 0 ? _valuesFormatter : defaultValueFormatter(intl, range.from, {
125
+ siblingsTimeMark: range.to,
126
+ datesWithTime,
127
+ maxListSymbols
128
+ });
129
+ var to = (_valuesFormatter2 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(range.to, range.label)) !== null && _valuesFormatter2 !== void 0 ? _valuesFormatter2 : defaultValueFormatter(intl, range.to, {
130
+ siblingsTimeMark: range.from,
131
+ datesWithTime,
132
+ maxListSymbols
133
+ });
134
+ return intl.formatMessage({
135
+ id: range.label ? "additional-axe" : "additional-axe-no-label"
136
+ }, {
137
+ from,
138
+ to,
139
+ label: (_titlesFormatter = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(range.label)) !== null && _titlesFormatter !== void 0 ? _titlesFormatter : range.label
140
+ });
141
+ }));
142
+ if (dataType === "time-series") {
143
+ var _titlesFormatter3;
144
+ var trendsInsights = insights;
145
+ var trendsByDataKey = {};
146
+ var _iterator = _createForOfIteratorHelper(trendsInsights), _step;
147
+ try {
148
+ for (_iterator.s(); !(_step = _iterator.n()).done; ) {
149
+ var _trendsByDataKey$insi;
150
+ var insight = _step.value;
151
+ trendsByDataKey[insight.dataKey] = (_trendsByDataKey$insi = trendsByDataKey[insight.dataKey]) !== null && _trendsByDataKey$insi !== void 0 ? _trendsByDataKey$insi : [];
152
+ trendsByDataKey[insight.dataKey].push(insight);
153
+ }
154
+ } catch (err) {
155
+ _iterator.e(err);
156
+ } finally {
157
+ _iterator.f();
158
+ }
159
+ var entities = intl.formatMessage({
160
+ id: "entity-type-time-series"
161
+ }, {
162
+ count: entitiesCount
163
+ });
164
+ var entitiesList = Object.entries(trendsByDataKey).map(function(_ref7) {
165
+ var _primaryTrend$label, _titlesFormatter2, _valuesFormatter3, _valuesFormatter4;
166
+ var _ref8 = _slicedToArray(_ref7, 2), dataKey = _ref8[0], insights2 = _ref8[1];
167
+ var generalTrend = insights2.find(function(insight2) {
168
+ return insight2.type === "general-trend";
169
+ });
170
+ var localTrends = insights2.filter(function(insight2) {
171
+ return insight2 !== generalTrend;
172
+ });
173
+ var primaryTrend = generalTrend !== null && generalTrend !== void 0 ? generalTrend : localTrends[0];
174
+ var secondaryTrends = insights2.filter(function(insight2) {
175
+ return insight2 !== primaryTrend;
176
+ });
177
+ var summaryDataKey = entitiesCount !== 1 ? (_primaryTrend$label = primaryTrend.label) !== null && _primaryTrend$label !== void 0 ? _primaryTrend$label : dataKey : "";
178
+ var mainSummary = intl.formatMessage({
179
+ id: "time-series-general-trend"
180
+ }, {
181
+ dataKey: (_titlesFormatter2 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(summaryDataKey)) !== null && _titlesFormatter2 !== void 0 ? _titlesFormatter2 : summaryDataKey,
182
+ trend: intl.formatMessage({
183
+ id: "trend-".concat(primaryTrend.change.strength)
184
+ }),
185
+ from: (_valuesFormatter3 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(primaryTrend.change.from, dataKey)) !== null && _valuesFormatter3 !== void 0 ? _valuesFormatter3 : intl.formatNumber(primaryTrend.change.from),
186
+ to: (_valuesFormatter4 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(primaryTrend.change.to, dataKey)) !== null && _valuesFormatter4 !== void 0 ? _valuesFormatter4 : intl.formatNumber(primaryTrend.change.to)
187
+ });
188
+ var secondarySummaries = secondaryTrends.map(function(trend) {
189
+ var _valuesFormatter5, _valuesFormatter6;
190
+ return intl.formatMessage({
191
+ id: "time-series-local-trend"
192
+ }, {
193
+ trend: intl.formatMessage({
194
+ id: "trend-".concat(trend.change.strength)
195
+ }),
196
+ from: (_valuesFormatter5 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(trend.from, trend.dataKey)) !== null && _valuesFormatter5 !== void 0 ? _valuesFormatter5 : defaultValueFormatter(intl, trend.from, {
197
+ siblingsTimeMark: trend.to,
198
+ datesWithTime,
199
+ maxListSymbols
200
+ }),
201
+ to: (_valuesFormatter6 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(trend.to, trend.dataKey)) !== null && _valuesFormatter6 !== void 0 ? _valuesFormatter6 : defaultValueFormatter(intl, trend.to, {
202
+ siblingsTimeMark: trend.from,
203
+ datesWithTime,
204
+ maxListSymbols
205
+ })
206
+ });
207
+ });
208
+ if (secondarySummaries.length === 0) {
209
+ return mainSummary;
210
+ }
211
+ return intl.formatMessage({
212
+ id: "time-series-detailed-trend"
213
+ }, {
214
+ general: mainSummary,
215
+ locals: formatLimitedSizeList(secondarySummaries, intl, 400, false)
216
+ });
217
+ });
218
+ var summary = intl.formatMessage({
219
+ id: dataTitle ? "chart-summary" : "chart-summary-no-label"
220
+ }, {
221
+ entities,
222
+ entitiesList: intl.formatList(entitiesList),
223
+ label: (_titlesFormatter3 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter3 !== void 0 ? _titlesFormatter3 : dataTitle
224
+ });
225
+ if (dataRangeSummary.length > 0) {
226
+ return "".concat(summary, "\n").concat(dataRangeSummary);
227
+ }
228
+ return summary;
229
+ } else if (dataType === "points-cloud") {
230
+ var _titlesFormatter7;
231
+ var clustersInsights = insights;
232
+ var biggestClusters = clustersInsights.slice(0, clustersLimit);
233
+ var maxSize = clustersInsights[0].size;
234
+ var minSize = clustersInsights[clustersInsights.length - 1].size;
235
+ var _entities = maxSize === minSize ? intl.formatMessage({
236
+ id: "entity-type-clusters-single-size"
237
+ }, {
238
+ count: entitiesCount,
239
+ size: maxSize
240
+ }) : intl.formatMessage({
241
+ id: "entity-type-clusters-multiple-size"
242
+ }, {
243
+ count: entitiesCount,
244
+ maxSize,
245
+ minSize
246
+ });
247
+ var _entitiesList = biggestClusters.map(function(clusterInsight) {
248
+ var _valuesFormatter7, _titlesFormatter5, _valuesFormatter8, _titlesFormatter6;
249
+ var labels = formatLimitedSizeList(clusterInsight.labels.map(function(label) {
250
+ var _titlesFormatter4;
251
+ return (_titlesFormatter4 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(label)) !== null && _titlesFormatter4 !== void 0 ? _titlesFormatter4 : label;
252
+ }), intl, maxListSymbols);
253
+ var anonymous = clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);
254
+ return intl.formatMessage({
255
+ id: anonymous ? "entity-type-clusters-label-anonymous" : "entity-type-clusters-label"
256
+ }, {
257
+ relativeSize: intl.formatMessage({
258
+ id: "relative-size-".concat(clusterInsight.relativeSize)
259
+ }),
260
+ labels,
261
+ size: clusterInsight.size,
262
+ x: (_valuesFormatter7 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(clusterInsight.center.x, clusterInsight.labels)) !== null && _valuesFormatter7 !== void 0 ? _valuesFormatter7 : intl.formatNumber(clusterInsight.center.x),
263
+ xLabel: (_titlesFormatter5 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(clusterInsight.center.xLabel)) !== null && _titlesFormatter5 !== void 0 ? _titlesFormatter5 : clusterInsight.center.xLabel,
264
+ y: (_valuesFormatter8 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(clusterInsight.center.y, clusterInsight.labels)) !== null && _valuesFormatter8 !== void 0 ? _valuesFormatter8 : intl.formatNumber(clusterInsight.center.y),
265
+ yLabel: (_titlesFormatter6 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(clusterInsight.center.yLabel)) !== null && _titlesFormatter6 !== void 0 ? _titlesFormatter6 : clusterInsight.center.yLabel
266
+ });
267
+ });
268
+ if (insights.length > clustersLimit) {
269
+ _entitiesList.push(intl.formatMessage({
270
+ id: "ellipsis"
271
+ }, {
272
+ leftCount: insights.length - clustersLimit
273
+ }));
274
+ }
275
+ var _summary = intl.formatMessage({
276
+ id: dataTitle ? "chart-summary" : "chart-summary-no-label"
277
+ }, {
278
+ entities: _entities,
279
+ entitiesList: intl.formatList(_entitiesList),
280
+ label: (_titlesFormatter7 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter7 !== void 0 ? _titlesFormatter7 : dataTitle
281
+ });
282
+ if (dataRangeSummary.length > 0) {
283
+ return "".concat(_summary, "\n").concat(dataRangeSummary);
284
+ }
285
+ return _summary;
286
+ } else if (dataType === "values-set") {
287
+ var _titlesFormatter8;
288
+ var _ref9 = insights, _ref10 = _slicedToArray(_ref9, 1), valuesInsight = _ref10[0];
289
+ var _entities2 = intl.formatMessage({
290
+ id: "entity-type-values"
291
+ }, {
292
+ count: entitiesCount
293
+ });
294
+ var _entitiesList2 = formatValuesList(valuesInsight.values, {
295
+ intl,
296
+ limit: valuesLimit,
297
+ datesWithTime,
298
+ maxListSymbols
299
+ });
300
+ return intl.formatMessage({
301
+ id: dataTitle ? "chart-summary" : "chart-summary-no-label"
302
+ }, {
303
+ entities: _entities2,
304
+ entitiesList: _entitiesList2,
305
+ label: (_titlesFormatter8 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter8 !== void 0 ? _titlesFormatter8 : dataTitle
306
+ });
307
+ } else if (dataType === "grouped-values" || dataType === "indexed-groups") {
308
+ var _titlesFormatter9;
309
+ var groupInsights = insights;
310
+ var valueCounts = groupInsights.map(function(group) {
311
+ return group.values.length;
312
+ });
313
+ var minValuesCount = Math.min.apply(Math, _toConsumableArray(valueCounts));
314
+ var maxValuesCount = Math.max.apply(Math, _toConsumableArray(valueCounts));
315
+ var _entities3 = minValuesCount === maxValuesCount ? intl.formatMessage({
316
+ id: "entity-type-grouped-values-single-size"
317
+ }, {
318
+ groupsCount: groupInsights.length,
319
+ valuesCount: valueCounts[0]
320
+ }) : intl.formatMessage({
321
+ id: "entity-type-grouped-values-multiple-size"
322
+ }, {
323
+ groupsCount: groupInsights.length,
324
+ minValuesCount,
325
+ maxValuesCount
326
+ });
327
+ var _entitiesList3 = groupInsights.slice(0, groupsLimit).map(function(_ref11) {
328
+ var label = _ref11.label, values = _ref11.values;
329
+ var formattedValues = formatValuesList(values, {
330
+ intl,
331
+ limit: valuesLimit,
332
+ datesWithTime,
333
+ maxListSymbols
334
+ });
335
+ return intl.formatMessage({
336
+ id: "values-group"
337
+ }, {
338
+ label,
339
+ values: formattedValues
340
+ });
341
+ });
342
+ if (groupInsights.values.length > groupsLimit) {
343
+ _entitiesList3.push(intl.formatMessage({
344
+ id: "ellipsis"
345
+ }, {
346
+ leftCount: groupInsights.values.length - groupsLimit
347
+ }));
348
+ }
349
+ var _summary2 = intl.formatMessage({
350
+ id: dataTitle ? "chart-summary" : "chart-summary-no-label"
351
+ }, {
352
+ entities: _entities3,
353
+ entitiesList: intl.formatList(_entitiesList3),
354
+ label: (_titlesFormatter9 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter9 !== void 0 ? _titlesFormatter9 : dataTitle
355
+ });
356
+ return _summary2;
357
+ }
358
+ return null;
359
+ };
360
+ export {
361
+ defaultValueFormatter,
362
+ serialize
363
+ };
@@ -0,0 +1,14 @@
1
+ import { extractDataInsights } from "./insights.mjs";
2
+ import { serialize } from "./serialize.mjs";
3
+ var summarize = function summarize2(data, hints, config, locale, translations, availableLocales) {
4
+ var analyzedData = extractDataInsights(data, hints, config);
5
+ var summary = serialize(analyzedData, config, {
6
+ locale,
7
+ translations,
8
+ availableLocales
9
+ });
10
+ return summary;
11
+ };
12
+ export {
13
+ summarize
14
+ };
@@ -0,0 +1,33 @@
1
+ import de from "./de.json.mjs";
2
+ import en from "./en.json.mjs";
3
+ import es from "./es.json.mjs";
4
+ import fr from "./fr.json.mjs";
5
+ import it from "./it.json.mjs";
6
+ import ja from "./ja.json.mjs";
7
+ import ko from "./ko.json.mjs";
8
+ import nl from "./nl.json.mjs";
9
+ import pt from "./pt.json.mjs";
10
+ import tr from "./tr.json.mjs";
11
+ import vi from "./vi.json.mjs";
12
+ import zh from "./zh.json.mjs";
13
+ import pl from "./pl.json.mjs";
14
+ import sv from "./sv.json.mjs";
15
+ var localizedMessages = {
16
+ de,
17
+ en,
18
+ es,
19
+ fr,
20
+ it,
21
+ ja,
22
+ ko,
23
+ nl,
24
+ pt,
25
+ tr,
26
+ vi,
27
+ zh,
28
+ pl,
29
+ sv
30
+ };
31
+ export {
32
+ localizedMessages
33
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = "Drücken Sie die Tabulatortaste, um das Zugriffsmodul für grafische Diagramme zu aktivieren.";
2
+ const loading = "Lade Zugriffsmodul.";
3
+ const failed = "Zugriffsmodul konnte nicht geladen werden. Kontaktieren Sie den Support und helfen Sie uns, das Problem schneller zu beheben.";
4
+ const de = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ de as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = 'Press "Tab" to enable graphical charts accessibility module.';
2
+ const loading = "Loading accessibility module.";
3
+ const failed = "Failed to load accessibility module. Contact service user support to help us resolve issue faster.";
4
+ const en = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ en as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = 'Pulse "Tab" para activar el módulo de accesibilidad a los gráficos.';
2
+ const loading = "Cargando módulo de accesibilidad.";
3
+ const failed = "No se ha podido cargar el módulo de accesibilidad. Contacta con el servicio de asistencia al usuario para ayudarnos a resolver el problema rápidamente.";
4
+ const es = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ es as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = "Appuyez sur « Onglet » pour activer le module d’accessibilité aux diagrammes.";
2
+ const loading = "Chargement du module d’accessibilité en cours.";
3
+ const failed = "Impossible de charger le module d’accessibilité. Contactez le service d’assistance aux utilisateurs pour nous permettre de résoudre le problème plus rapidement.";
4
+ const fr = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ fr as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = 'Premi "Tab" per abilitare il modulo di accessibilità dei dati per i grafici.';
2
+ const loading = "Caricamento del modulo di accessibilità in corso.";
3
+ const failed = "Caricamento del modulo di accessibilità non riuscito. Contatta il servizio di assistenza utenti per risolvere il problema più in fretta.";
4
+ const it = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ it as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = "アクセシビリティモジュールのグラフィカルチャートを有効化するには「Tab」キーを押してください。";
2
+ const loading = "アクセシビリティモジュールのロード中。";
3
+ const failed = "アクセシビリティモジュールの読み込みに失敗しました。サービスユーザーサポートに連絡し、問題を迅速に解決します。";
4
+ const ja = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ ja as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = "'탭'을 누르면 그래픽 차트 접근성 모듈이 활성화됩니다.";
2
+ const loading = "접근성 모듈 로딩 중.";
3
+ const failed = "접근성 모듈을 불러오지 못했습니다. 사용자 지원 서비스 팀에 문의하시면 문제를 더 빨리 해결하실 수 있습니다.";
4
+ const ko = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ ko as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = "Druk op Tab om de toegankelijkheidsmodule voor grafieken in te schakelen.";
2
+ const loading = "De toegankelijkheidsmodule wordt geladen.";
3
+ const failed = "De toegankelijkheidsmodule kan niet worden geladen. Neem contact op met ons supportteam zodat we het probleem sneller kunnen oplossen.";
4
+ const nl = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ nl as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = "Naciśnij Tab, aby włączyć moduł dostępności wykresów graficznych.";
2
+ const loading = "Ładowanie modułu dostępności.";
3
+ const failed = "Nie udało się załadować modułu dostępności. Skontaktuj się ze wsparciem użytkowników, aby pomóc nam w szybszym rozwiązaniu problemu.";
4
+ const pl = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ pl as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = 'Pressione "Tab" para habilitar o módulo de acessibilidade a gráficos.';
2
+ const loading = "Carregando módulo de acessibilidade.";
3
+ const failed = "Falha ao carregar o módulo de acessibilidade. Entre em contato com o suporte ao usuário do serviço para nos ajudar a resolver o problema com mais rapidez.";
4
+ const pt = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ pt as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = 'Tryck på "Flik" för att aktivera åtkomstmodulen för grafiska diagram.';
2
+ const loading = "Laddar åtkomstmodul.";
3
+ const failed = "Det gick inte att ladda åtkomstmodulen. Kontakta supporten för att hjälpa oss att lösa problemet snabbare.";
4
+ const sv = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ sv as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = 'Grafik çizelgeleri erişilebilirlik modülünü etkinleştirmek için "Sekme" tuşuna basın.';
2
+ const loading = "Erişilebilirlik modülü yükleniyor.";
3
+ const failed = "Erişilebilirlik modülü yüklenemedi. Sorunu daha hızlı çözmemize yardımcı olmak için kullanıcı destek hizmeti ile iletişime geçin.";
4
+ const tr = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ tr as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };
@@ -0,0 +1,14 @@
1
+ const disabled = 'Nhấn "Tab" để bật mô-đun trợ năng biểu đồ đồ họa.';
2
+ const loading = "Đang tải mô-đun trợ năng.";
3
+ const failed = "Không tải được mô-đun trợ năng. Liên hệ với bộ phận hỗ trợ người dùng dịch vụ để giúp chúng tôi giải quyết vấn đề nhanh hơn.";
4
+ const vi = {
5
+ disabled,
6
+ loading,
7
+ failed
8
+ };
9
+ export {
10
+ vi as default,
11
+ disabled,
12
+ failed,
13
+ loading
14
+ };