@semcore/d3-chart 3.16.0 → 3.17.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.
Files changed (145) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/lib/cjs/Area.js +9 -9
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +8 -8
  5. package/lib/cjs/Bubble.js +10 -10
  6. package/lib/cjs/Donut.js +7 -7
  7. package/lib/cjs/Dots.js +10 -10
  8. package/lib/cjs/HorizontalBar.js +8 -8
  9. package/lib/cjs/Hover.js +3 -3
  10. package/lib/cjs/Line.js +9 -9
  11. package/lib/cjs/Plot.js +4 -4
  12. package/lib/cjs/Plot.js.map +1 -1
  13. package/lib/cjs/Radar.js +17 -17
  14. package/lib/cjs/RadialTree.js +10 -10
  15. package/lib/cjs/ReferenceLine.js +9 -9
  16. package/lib/cjs/ScatterPlot.js +7 -7
  17. package/lib/cjs/Tooltip.js +8 -8
  18. package/lib/cjs/Venn.js +7 -7
  19. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  20. package/lib/cjs/a11y/PlotA11yView.js +3 -3
  21. package/lib/cjs/a11y/insights.js +12 -8
  22. package/lib/cjs/a11y/insights.js.map +1 -1
  23. package/lib/cjs/a11y/serialize.js +2 -1
  24. package/lib/cjs/a11y/serialize.js.map +1 -1
  25. package/lib/cjs/component/ChartLegend/BaseLegend.js +108 -0
  26. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -0
  27. package/lib/cjs/component/ChartLegend/BaseLegend.type.js +2 -0
  28. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -0
  29. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +93 -0
  30. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -0
  31. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js +2 -0
  32. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -0
  33. package/lib/cjs/component/ChartLegend/LegendFlex/legend-flex.shadow.css +11 -0
  34. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +230 -0
  35. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -0
  36. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +13 -0
  37. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -0
  38. package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +109 -0
  39. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +100 -0
  40. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -0
  41. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js +2 -0
  42. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -0
  43. package/lib/cjs/component/ChartLegend/LegendTable/legend-table.shadow.css +16 -0
  44. package/lib/cjs/component/ChartLegend/index.js +23 -0
  45. package/lib/cjs/component/ChartLegend/index.js.map +1 -0
  46. package/lib/cjs/index.js +20 -0
  47. package/lib/cjs/index.js.map +1 -1
  48. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +37 -0
  49. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -0
  50. package/lib/cjs/translations/de.json +3 -0
  51. package/lib/cjs/translations/en.json +3 -0
  52. package/lib/cjs/translations/es.json +3 -0
  53. package/lib/cjs/translations/fr.json +3 -0
  54. package/lib/cjs/translations/it.json +3 -0
  55. package/lib/cjs/translations/ja.json +3 -0
  56. package/lib/cjs/translations/ko.json +3 -0
  57. package/lib/cjs/translations/nl.json +3 -0
  58. package/lib/cjs/translations/pl.json +3 -0
  59. package/lib/cjs/translations/pt.json +3 -0
  60. package/lib/cjs/translations/sv.json +3 -0
  61. package/lib/cjs/translations/tr.json +3 -0
  62. package/lib/cjs/translations/vi.json +3 -0
  63. package/lib/cjs/translations/zh.json +3 -0
  64. package/lib/cjs/types/Plot.d.js.map +1 -1
  65. package/lib/cjs/types/index.d.js +73 -14
  66. package/lib/cjs/types/index.d.js.map +1 -1
  67. package/lib/es6/Area.js +9 -9
  68. package/lib/es6/Axis.js +14 -14
  69. package/lib/es6/Bar.js +8 -8
  70. package/lib/es6/Bubble.js +10 -10
  71. package/lib/es6/Donut.js +7 -7
  72. package/lib/es6/Dots.js +10 -10
  73. package/lib/es6/HorizontalBar.js +8 -8
  74. package/lib/es6/Hover.js +3 -3
  75. package/lib/es6/Line.js +9 -9
  76. package/lib/es6/Plot.js +4 -4
  77. package/lib/es6/Plot.js.map +1 -1
  78. package/lib/es6/Radar.js +17 -17
  79. package/lib/es6/RadialTree.js +10 -10
  80. package/lib/es6/ReferenceLine.js +9 -9
  81. package/lib/es6/ScatterPlot.js +7 -7
  82. package/lib/es6/Tooltip.js +8 -8
  83. package/lib/es6/Venn.js +7 -7
  84. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  85. package/lib/es6/a11y/PlotA11yView.js +3 -3
  86. package/lib/es6/a11y/insights.js +12 -8
  87. package/lib/es6/a11y/insights.js.map +1 -1
  88. package/lib/es6/a11y/serialize.js +2 -1
  89. package/lib/es6/a11y/serialize.js.map +1 -1
  90. package/lib/es6/component/ChartLegend/BaseLegend.js +100 -0
  91. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -0
  92. package/lib/es6/component/ChartLegend/BaseLegend.type.js +2 -0
  93. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -0
  94. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +86 -0
  95. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -0
  96. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js +2 -0
  97. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -0
  98. package/lib/es6/component/ChartLegend/LegendFlex/legend-flex.shadow.css +11 -0
  99. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +228 -0
  100. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -0
  101. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +6 -0
  102. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -0
  103. package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +109 -0
  104. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +94 -0
  105. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -0
  106. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js +2 -0
  107. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -0
  108. package/lib/es6/component/ChartLegend/LegendTable/legend-table.shadow.css +16 -0
  109. package/lib/es6/component/ChartLegend/index.js +5 -0
  110. package/lib/es6/component/ChartLegend/index.js.map +1 -0
  111. package/lib/es6/index.js +2 -0
  112. package/lib/es6/index.js.map +1 -1
  113. package/lib/es6/translations/__intergalactic-dynamic-locales.js +29 -0
  114. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -0
  115. package/lib/es6/translations/de.json +3 -0
  116. package/lib/es6/translations/en.json +3 -0
  117. package/lib/es6/translations/es.json +3 -0
  118. package/lib/es6/translations/fr.json +3 -0
  119. package/lib/es6/translations/it.json +3 -0
  120. package/lib/es6/translations/ja.json +3 -0
  121. package/lib/es6/translations/ko.json +3 -0
  122. package/lib/es6/translations/nl.json +3 -0
  123. package/lib/es6/translations/pl.json +3 -0
  124. package/lib/es6/translations/pt.json +3 -0
  125. package/lib/es6/translations/sv.json +3 -0
  126. package/lib/es6/translations/tr.json +3 -0
  127. package/lib/es6/translations/vi.json +3 -0
  128. package/lib/es6/translations/zh.json +3 -0
  129. package/lib/es6/types/Plot.d.js.map +1 -1
  130. package/lib/es6/types/index.d.js +20 -8
  131. package/lib/es6/types/index.d.js.map +1 -1
  132. package/lib/types/Plot.d.ts +5 -0
  133. package/lib/types/a11y/insights.d.ts +1 -0
  134. package/lib/types/component/ChartLegend/BaseLegend.d.ts +14 -0
  135. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +27 -0
  136. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +2 -0
  137. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +38 -0
  138. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +2 -0
  139. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +67 -0
  140. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +2 -0
  141. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +21 -0
  142. package/lib/types/component/ChartLegend/index.d.ts +4 -0
  143. package/lib/types/index.d.ts +20 -8
  144. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +41 -0
  145. package/package.json +3 -1
@@ -0,0 +1,94 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ import { sstyled as _sstyled } from "@semcore/core";
8
+ import { assignProps as _assignProps2 } from "@semcore/core";
9
+ import { assignProps as _assignProps } from "@semcore/core";
10
+ import React from 'react';
11
+ import createComponent, { sstyled, Root } from '@semcore/core';
12
+ import { Box } from '@semcore/flex-box';
13
+ /*__reshadow-styles__:"./legend-table.shadow.css"*/
14
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLegendTable_zyu4h_gg_.__columns-count_zyu4h_gg_{display:grid;grid-template-columns:repeat(var(--columns-count_zyu4h),auto);align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:18px;grid-row-gap:8px}.___SColumnItem_zyu4h_gg_._size_l_zyu4h_gg_{font-size:var(--intergalactic-fs-300, 16px)}.___SColumnItem_zyu4h_gg_._size_m_zyu4h_gg_{font-size:var(--intergalactic-fs-200, 14px)}" /*__inner_css_end__*/, "zyu4h_gg_") /*__reshadow_css_end__*/, {
15
+ "__SLegendTable": "___SLegendTable_zyu4h_gg_",
16
+ "_columns-count": "__columns-count_zyu4h_gg_",
17
+ "--columns-count": "--columns-count_zyu4h",
18
+ "__SColumnItem": "___SColumnItem_zyu4h_gg_",
19
+ "_size_l": "_size_l_zyu4h_gg_",
20
+ "_size_m": "_size_m_zyu4h_gg_"
21
+ });
22
+ import { LegendItemComponent } from '../LegendItem/LegendItem';
23
+ import { BaseLegend } from '../BaseLegend';
24
+ var LegendTableRoot = /*#__PURE__*/function (_BaseLegend) {
25
+ _inherits(LegendTableRoot, _BaseLegend);
26
+ var _super = _createSuper(LegendTableRoot);
27
+ function LegendTableRoot() {
28
+ _classCallCheck(this, LegendTableRoot);
29
+ return _super.apply(this, arguments);
30
+ }
31
+ _createClass(LegendTableRoot, [{
32
+ key: "render",
33
+ value: function render() {
34
+ var _ref = this.asProps,
35
+ _ref3,
36
+ _items$;
37
+ var SLegendTable = Box;
38
+ var _this$asProps = this.asProps,
39
+ styles = _this$asProps.styles,
40
+ Children = _this$asProps.Children,
41
+ _this$asProps$size = _this$asProps.size,
42
+ size = _this$asProps$size === void 0 ? 'm' : _this$asProps$size,
43
+ items = _this$asProps.items;
44
+ var columnsCount = (_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.columns.length;
45
+ return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SLegendTable, _ref3.cn("SLegendTable", _objectSpread({}, _assignProps({
46
+ "columns-count": columnsCount + 1
47
+ }, _ref))), items.map(function (_ref5, index) {
48
+ var id = _ref5.id,
49
+ _ref5$columns = _ref5.columns,
50
+ columns = _ref5$columns === void 0 ? [] : _ref5$columns;
51
+ return /*#__PURE__*/React.createElement(React.Fragment, {
52
+ key: id
53
+ }, /*#__PURE__*/React.createElement(Children, null), columns.map(function (item, index) {
54
+ return /*#__PURE__*/React.createElement(React.Fragment, {
55
+ key: "".concat(id, "__").concat(index)
56
+ }, /*#__PURE__*/React.createElement(LegendTable.Column, {
57
+ index: index,
58
+ size: size,
59
+ styles: styles
60
+ }, item));
61
+ }));
62
+ }));
63
+ }
64
+ }]);
65
+ return LegendTableRoot;
66
+ }(BaseLegend);
67
+ _defineProperty(LegendTableRoot, "displayName", 'LegendTable');
68
+ _defineProperty(LegendTableRoot, "style", style);
69
+ _defineProperty(LegendTableRoot, "defaultProps", function () {
70
+ return {
71
+ children: /*#__PURE__*/React.createElement(LegendTable.LegendItem, null)
72
+ };
73
+ });
74
+ function ColumnComponent(props) {
75
+ var _ref2 = arguments[0],
76
+ _ref4;
77
+ var SColumnItem = Box;
78
+ var styles = props.styles,
79
+ index = props.index,
80
+ size = props.size,
81
+ Children = props.Children;
82
+ return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(SColumnItem, _ref4.cn("SColumnItem", _objectSpread({}, _assignProps2({
83
+ "style": {
84
+ gridColumnStart: "".concat(index + 2),
85
+ gridColumnEnd: "".concat(index + 3)
86
+ },
87
+ "size": size
88
+ }, _ref2))), /*#__PURE__*/React.createElement(Children, _ref4.cn("Children", {})));
89
+ }
90
+ export var LegendTable = createComponent(LegendTableRoot, {
91
+ LegendItem: LegendItemComponent,
92
+ Column: ColumnComponent
93
+ });
94
+ //# sourceMappingURL=LegendTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendTable.js","names":["React","createComponent","sstyled","Root","Box","style","_sstyled","insert","LegendItemComponent","BaseLegend","LegendTableRoot","_BaseLegend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref3","_items$","SLegendTable","_this$asProps","styles","Children","_this$asProps$size","size","items","columnsCount","columns","length","createElement","cn","_objectSpread","_assignProps","map","_ref5","index","id","_ref5$columns","Fragment","item","concat","LegendTable","Column","_defineProperty","children","LegendItem","ColumnComponent","props","_ref2","arguments[0]","_ref4","SColumnItem","_assignProps2","gridColumnStart","gridColumnEnd"],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendTableType, LegendTableProps, LegendColumnProps } from './LegendTable.type';\nimport style from './legend-table.shadow.css';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\nimport { BaseLegend } from '../BaseLegend';\n\nclass LegendTableRoot extends BaseLegend<LegendTableProps> {\n static displayName = 'LegendTable';\n static style = style;\n\n static defaultProps = () => ({\n children: <LegendTable.LegendItem />,\n });\n\n render() {\n const SLegendTable = Root;\n const { styles, Children, size = 'm', items } = this.asProps;\n const columnsCount = items[0]?.columns.length;\n\n return sstyled(styles)(\n <SLegendTable render={Box} columns-count={columnsCount + 1}>\n {items.map(({ id, columns = [] }, index) => {\n return (\n <React.Fragment key={id}>\n <Children />\n {columns.map((item, index) => {\n return (\n <React.Fragment key={`${id}__${index}`}>\n <LegendTable.Column index={index} size={size} styles={styles}>\n {item}\n </LegendTable.Column>\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </SLegendTable>,\n );\n }\n}\n\nfunction ColumnComponent(props: LegendColumnProps & IRootComponentProps) {\n const SColumnItem = Root;\n const { styles, index, size, Children } = props;\n\n return sstyled(styles)(\n <SColumnItem\n style={{ gridColumnStart: `${index + 2}`, gridColumnEnd: `${index + 3}` }}\n render={Box}\n size={size}\n >\n <Children />\n </SColumnItem>,\n );\n}\n\nexport const LegendTable: LegendTableType = createComponent(LegendTableRoot, {\n LegendItem: LegendItemComponent,\n Column: ColumnComponent,\n});\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LegendTable.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendTable.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.type.ts"],"sourcesContent":["import { Intergalactic } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';\nimport React from 'react';\nimport { LegendProps, LSize } from '../BaseLegend.type';\n\nexport type LegendTableProps = Omit<LegendProps, 'items'> & {\n /**\n * Legend items\n */\n items: Array<LegendItem & { columns: Array<React.ReactNode> }>;\n};\n\nexport type LegendColumnProps = {\n index: number;\n size: LSize;\n};\n\nexport type LegendTableType = Intergalactic.Component<typeof Box, LegendTableProps> & {\n LegendItem: LegendItemType;\n Column: Intergalactic.Component<typeof Box, Partial<LegendColumnProps>>;\n};\n"],"mappings":""}
@@ -0,0 +1,16 @@
1
+ SLegendTable[columns-count] {
2
+ display: grid;
3
+ grid-template-columns: repeat(var(--columns-count), auto);
4
+ align-items: center;
5
+ height: fit-content;
6
+ grid-column-gap: 18px;
7
+ grid-row-gap: 8px;
8
+ }
9
+
10
+ SColumnItem[size='l'] {
11
+ font-size: var(--intergalactic-fs-300, 16px);
12
+ }
13
+
14
+ SColumnItem[size='m'] {
15
+ font-size: var(--intergalactic-fs-200, 14px);
16
+ }
@@ -0,0 +1,5 @@
1
+ import { LegendFlex as ChartLegend } from './LegendFlex/LegendFlex';
2
+ import { LegendTable as ChartLegendTable } from './LegendTable/LegendTable';
3
+ export { ChartLegend, ChartLegendTable };
4
+ export default ChartLegend;
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["LegendFlex","ChartLegend","LegendTable","ChartLegendTable"],"sources":["../../../../src/component/ChartLegend/index.ts"],"sourcesContent":["import { LegendFlex as ChartLegend } from './LegendFlex/LegendFlex';\nimport { LegendTable as ChartLegendTable } from './LegendTable/LegendTable';\n\nexport { ChartLegend, ChartLegendTable };\n\nexport default ChartLegend;\n"],"mappings":"AAAA,SAASA,UAAU,IAAIC,WAAW,QAAQ,yBAAyB;AACnE,SAASC,WAAW,IAAIC,gBAAgB,QAAQ,2BAA2B;AAE3E,SAASF,WAAW,EAAEE,gBAAgB;AAEtC,eAAeF,WAAW"}
package/lib/es6/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as Plot } from './Plot';
2
+ export { ChartLegend, ChartLegendTable } from './component/ChartLegend';
2
3
  export { XAxis, YAxis } from './Axis';
3
4
  export { default as Line } from './Line';
4
5
  export { default as Bar } from './Bar';
@@ -19,4 +20,5 @@ export { default as ReferenceLine } from './ReferenceLine';
19
20
  export { HoverLine, HoverRect } from './Hover';
20
21
  export { minMax, interpolateValue } from './utils';
21
22
  export { colors } from './color';
23
+ export { makeDataHintsContainer } from './a11y/hints';
22
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","Plot","XAxis","YAxis","Line","Bar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","ScatterPlot","Bubble","RadialTree","Donut","Venn","Radar","getLabelOffsetPosition","Tooltip","ResponsiveContainer","ReferenceLine","HoverLine","HoverRect","minMax","interpolateValue","colors"],"sources":["../../src/index.js"],"sourcesContent":["export { default as Plot } from './Plot';\n\nexport { XAxis, YAxis } from './Axis';\n\nexport { default as Line } from './Line';\n\nexport { default as Bar } from './Bar';\nexport { default as HorizontalBar } from './HorizontalBar';\nexport { default as GroupBar } from './GroupBar';\nexport { default as StackBar } from './StackBar';\nexport { default as Area } from './Area';\nexport { default as StackedArea } from './StackedArea';\nexport { default as ScatterPlot } from './ScatterPlot';\nexport { default as Bubble } from './Bubble';\nexport { default as RadialTree } from './RadialTree';\nexport { default as Donut } from './Donut';\nexport { default as Venn } from './Venn';\nexport { default as Radar, getLabelOffsetPosition } from './Radar';\n\nexport { default as Tooltip } from './Tooltip';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport { default as ReferenceLine } from './ReferenceLine';\n\nexport { HoverLine, HoverRect } from './Hover';\n\nexport { minMax, interpolateValue } from './utils';\nexport { colors } from './color';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AAExC,SAASC,KAAK,EAAEC,KAAK,QAAQ,QAAQ;AAErC,SAASH,OAAO,IAAII,IAAI,QAAQ,QAAQ;AAExC,SAASJ,OAAO,IAAIK,GAAG,QAAQ,OAAO;AACtC,SAASL,OAAO,IAAIM,aAAa,QAAQ,iBAAiB;AAC1D,SAASN,OAAO,IAAIO,QAAQ,QAAQ,YAAY;AAChD,SAASP,OAAO,IAAIQ,QAAQ,QAAQ,YAAY;AAChD,SAASR,OAAO,IAAIS,IAAI,QAAQ,QAAQ;AACxC,SAAST,OAAO,IAAIU,WAAW,QAAQ,eAAe;AACtD,SAASV,OAAO,IAAIW,WAAW,QAAQ,eAAe;AACtD,SAASX,OAAO,IAAIY,MAAM,QAAQ,UAAU;AAC5C,SAASZ,OAAO,IAAIa,UAAU,QAAQ,cAAc;AACpD,SAASb,OAAO,IAAIc,KAAK,QAAQ,SAAS;AAC1C,SAASd,OAAO,IAAIe,IAAI,QAAQ,QAAQ;AACxC,SAASf,OAAO,IAAIgB,KAAK,EAAEC,sBAAsB,QAAQ,SAAS;AAElE,SAASjB,OAAO,IAAIkB,OAAO,QAAQ,WAAW;AAE9C,SAASlB,OAAO,IAAImB,mBAAmB,QAAQ,uBAAuB;AACtE,SAASnB,OAAO,IAAIoB,aAAa,QAAQ,iBAAiB;AAE1D,SAASC,SAAS,EAAEC,SAAS,QAAQ,SAAS;AAE9C,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,SAAS;AAClD,SAASC,MAAM,QAAQ,SAAS"}
1
+ {"version":3,"file":"index.js","names":["default","Plot","ChartLegend","ChartLegendTable","XAxis","YAxis","Line","Bar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","ScatterPlot","Bubble","RadialTree","Donut","Venn","Radar","getLabelOffsetPosition","Tooltip","ResponsiveContainer","ReferenceLine","HoverLine","HoverRect","minMax","interpolateValue","colors","makeDataHintsContainer"],"sources":["../../src/index.js"],"sourcesContent":["export { default as Plot } from './Plot';\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\nexport { XAxis, YAxis } from './Axis';\n\nexport { default as Line } from './Line';\n\nexport { default as Bar } from './Bar';\nexport { default as HorizontalBar } from './HorizontalBar';\nexport { default as GroupBar } from './GroupBar';\nexport { default as StackBar } from './StackBar';\nexport { default as Area } from './Area';\nexport { default as StackedArea } from './StackedArea';\nexport { default as ScatterPlot } from './ScatterPlot';\nexport { default as Bubble } from './Bubble';\nexport { default as RadialTree } from './RadialTree';\nexport { default as Donut } from './Donut';\nexport { default as Venn } from './Venn';\nexport { default as Radar, getLabelOffsetPosition } from './Radar';\n\nexport { default as Tooltip } from './Tooltip';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport { default as ReferenceLine } from './ReferenceLine';\n\nexport { HoverLine, HoverRect } from './Hover';\n\nexport { minMax, interpolateValue } from './utils';\nexport { colors } from './color';\n\nexport { makeDataHintsContainer } from './a11y/hints';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,yBAAyB;AACvE,SAASC,KAAK,EAAEC,KAAK,QAAQ,QAAQ;AAErC,SAASL,OAAO,IAAIM,IAAI,QAAQ,QAAQ;AAExC,SAASN,OAAO,IAAIO,GAAG,QAAQ,OAAO;AACtC,SAASP,OAAO,IAAIQ,aAAa,QAAQ,iBAAiB;AAC1D,SAASR,OAAO,IAAIS,QAAQ,QAAQ,YAAY;AAChD,SAAST,OAAO,IAAIU,QAAQ,QAAQ,YAAY;AAChD,SAASV,OAAO,IAAIW,IAAI,QAAQ,QAAQ;AACxC,SAASX,OAAO,IAAIY,WAAW,QAAQ,eAAe;AACtD,SAASZ,OAAO,IAAIa,WAAW,QAAQ,eAAe;AACtD,SAASb,OAAO,IAAIc,MAAM,QAAQ,UAAU;AAC5C,SAASd,OAAO,IAAIe,UAAU,QAAQ,cAAc;AACpD,SAASf,OAAO,IAAIgB,KAAK,QAAQ,SAAS;AAC1C,SAAShB,OAAO,IAAIiB,IAAI,QAAQ,QAAQ;AACxC,SAASjB,OAAO,IAAIkB,KAAK,EAAEC,sBAAsB,QAAQ,SAAS;AAElE,SAASnB,OAAO,IAAIoB,OAAO,QAAQ,WAAW;AAE9C,SAASpB,OAAO,IAAIqB,mBAAmB,QAAQ,uBAAuB;AACtE,SAASrB,OAAO,IAAIsB,aAAa,QAAQ,iBAAiB;AAE1D,SAASC,SAAS,EAAEC,SAAS,QAAQ,SAAS;AAE9C,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,SAAS;AAClD,SAASC,MAAM,QAAQ,SAAS;AAEhC,SAASC,sBAAsB,QAAQ,cAAc"}
@@ -0,0 +1,29 @@
1
+ import en from './en.json';
2
+ import es from './es.json';
3
+ import fr from './fr.json';
4
+ import it from './it.json';
5
+ import ja from './ja.json';
6
+ import ko from './ko.json';
7
+ import nl from './nl.json';
8
+ import pt from './pt.json';
9
+ import tr from './tr.json';
10
+ import vi from './vi.json';
11
+ import zh from './zh.json';
12
+ import pl from './pl.json';
13
+ import sv from './sv.json';
14
+ export var localizedMessages = {
15
+ en: en,
16
+ es: es,
17
+ fr: fr,
18
+ it: it,
19
+ ja: ja,
20
+ ko: ko,
21
+ nl: nl,
22
+ pt: pt,
23
+ tr: tr,
24
+ vi: vi,
25
+ zh: zh,
26
+ pl: pl,
27
+ sv: sv
28
+ };
29
+ //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["en","es","fr","it","ja","ko","nl","pt","tr","vi","zh","pl","sv","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pt from './pt.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\nimport pl from './pl.json';\nimport sv from './sv.json';\n\nexport const localizedMessages = {\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AACA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bb,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Trend"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Trend"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Tendencia"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Tendance"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Trend"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "トレンド"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "추세"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Trend"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Trend"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Tendência"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Trend"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Trend"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "Xu hướng"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "trend": "趋势"
3
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Context } from './context';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0*/\n width?: number;\n /** Height of the svg element\n * @default 0*/\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** @deprecated */\n eventEmitter?: unknown;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<BaseTag>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":""}
1
+ {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Context } from './context';\nimport { DataStructureHints } from './a11y/hints';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0*/\n width?: number;\n /** Height of the svg element\n * @default 0*/\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** @deprecated */\n eventEmitter?: unknown;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<BaseTag>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":""}
@@ -1,5 +1,7 @@
1
1
  // Utils
2
2
 
3
+ export { makeDataHintsContainer } from './a11y/hints';
4
+
3
5
  // Color
4
6
  /**
5
7
  * @deprecated
@@ -26,14 +28,6 @@ export { default as Area } from './Area';
26
28
  export * from './Area';
27
29
  export { default as StackedArea } from './StackedArea';
28
30
  export * from './StackedArea';
29
-
30
- /** It becomes resolvable after building and moving file to lib dir */
31
-
32
- // @ts-ignore
33
- export { default as RadialTree } from './RadialTree';
34
-
35
- // @ts-ignore
36
- export * from './RadialTree';
37
31
  export { default as Radar } from './Radar';
38
32
  export * from './Radar';
39
33
  export { default as Donut } from './Donut';
@@ -48,4 +42,22 @@ export { default as ReferenceLine } from './ReferenceLine';
48
42
  export * from './ReferenceLine';
49
43
  export { default as Venn } from './Venn';
50
44
  export * from './Venn';
45
+
46
+ /** It becomes resolvable after building and moving file to lib dir */
47
+
48
+ // @ts-ignore
49
+ export { default as RadialTree } from './RadialTree';
50
+
51
+ // @ts-ignore
52
+ export * from './RadialTree';
53
+
54
+ // @ts-ignore
55
+ export { ChartLegend, ChartLegendTable } from './component/ChartLegend';
56
+
57
+ // @ts-ignore
58
+ export * from './component/ChartLegend/LegendFlex/LegendFlex.type';
59
+ // @ts-ignore
60
+ export * from './component/ChartLegend/LegendTable/LegendTable.type';
61
+ // @ts-ignore
62
+ export * from './component/ChartLegend/LegendItem/LegendItem.type';
51
63
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["default","Plot","ResponsiveContainer","Line","Bar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","RadialTree","Radar","Donut","Tooltip","ScatterPlot","Bubble","ReferenceLine","Venn"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\nexport declare function minMax(data: any, key: string | number): any;\nexport declare const interpolateValue: Symbol;\n\n// Color\n/**\n * @deprecated\n * This export will be removed in the next major release.\n */\nexport declare const colors: { [key: string]: string };\n\nexport { default as Plot } from './Plot';\nexport * from './Plot';\n\nexport * from './Axis';\nexport * from './Hover';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport * from './ResponsiveContainer';\n\nexport { default as Line } from './Line';\nexport * from './Line';\n\nexport { default as Bar } from './Bar';\nexport * from './Bar';\n\nexport { default as HorizontalBar } from './HorizontalBar';\nexport * from './HorizontalBar';\n\nexport { default as GroupBar } from './GroupBar';\nexport * from './GroupBar';\n\nexport { default as StackBar } from './StackBar';\nexport * from './StackBar';\n\nexport { default as Area } from './Area';\nexport * from './Area';\n\nexport { default as StackedArea } from './StackedArea';\nexport * from './StackedArea';\n\n/** It becomes resolvable after building and moving file to lib dir */\n\n// @ts-ignore\nexport { default as RadialTree } from './RadialTree';\n\n// @ts-ignore\nexport * from './RadialTree';\n\nexport { default as Radar } from './Radar';\nexport * from './Radar';\n\nexport { default as Donut } from './Donut';\nexport * from './Donut';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as ScatterPlot } from './ScatterPlot';\nexport * from './ScatterPlot';\n\nexport { default as Bubble } from './Bubble';\nexport * from './Bubble';\n\nexport { default as ReferenceLine } from './ReferenceLine';\nexport * from './ReferenceLine';\n\nexport { default as Venn } from './Venn';\nexport * from './Venn';\n"],"mappings":"AAAA;;AAIA;AACA;AACA;AACA;AACA;;AAGA,SAASA,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,cAAc,QAAQ;AACtB,cAAc,SAAS;AAEvB,SAASD,OAAO,IAAIE,mBAAmB,QAAQ,uBAAuB;AACtE,cAAc,uBAAuB;AAErC,SAASF,OAAO,IAAIG,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,SAASH,OAAO,IAAII,GAAG,QAAQ,OAAO;AACtC,cAAc,OAAO;AAErB,SAASJ,OAAO,IAAIK,aAAa,QAAQ,iBAAiB;AAC1D,cAAc,iBAAiB;AAE/B,SAASL,OAAO,IAAIM,QAAQ,QAAQ,YAAY;AAChD,cAAc,YAAY;AAE1B,SAASN,OAAO,IAAIO,QAAQ,QAAQ,YAAY;AAChD,cAAc,YAAY;AAE1B,SAASP,OAAO,IAAIQ,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,SAASR,OAAO,IAAIS,WAAW,QAAQ,eAAe;AACtD,cAAc,eAAe;;AAE7B;;AAEA;AACA,SAAST,OAAO,IAAIU,UAAU,QAAQ,cAAc;;AAEpD;AACA,cAAc,cAAc;AAE5B,SAASV,OAAO,IAAIW,KAAK,QAAQ,SAAS;AAC1C,cAAc,SAAS;AAEvB,SAASX,OAAO,IAAIY,KAAK,QAAQ,SAAS;AAC1C,cAAc,SAAS;AAEvB,SAASZ,OAAO,IAAIa,OAAO,QAAQ,WAAW;AAC9C,cAAc,WAAW;AAEzB,SAASb,OAAO,IAAIc,WAAW,QAAQ,eAAe;AACtD,cAAc,eAAe;AAE7B,SAASd,OAAO,IAAIe,MAAM,QAAQ,UAAU;AAC5C,cAAc,UAAU;AAExB,SAASf,OAAO,IAAIgB,aAAa,QAAQ,iBAAiB;AAC1D,cAAc,iBAAiB;AAE/B,SAAShB,OAAO,IAAIiB,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ"}
1
+ {"version":3,"file":"index.d.js","names":["makeDataHintsContainer","default","Plot","ResponsiveContainer","Line","Bar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","Radar","Donut","Tooltip","ScatterPlot","Bubble","ReferenceLine","Venn","RadialTree","ChartLegend","ChartLegendTable"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\nexport declare function minMax(data: any, key: string | number): any;\nexport declare const interpolateValue: Symbol;\n\nexport { makeDataHintsContainer } from './a11y/hints';\n\n// Color\n/**\n * @deprecated\n * This export will be removed in the next major release.\n */\nexport declare const colors: { [key: string]: string };\n\nexport { default as Plot } from './Plot';\nexport * from './Plot';\n\nexport * from './Axis';\nexport * from './Hover';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport * from './ResponsiveContainer';\n\nexport { default as Line } from './Line';\nexport * from './Line';\n\nexport { default as Bar } from './Bar';\nexport * from './Bar';\n\nexport { default as HorizontalBar } from './HorizontalBar';\nexport * from './HorizontalBar';\n\nexport { default as GroupBar } from './GroupBar';\nexport * from './GroupBar';\n\nexport { default as StackBar } from './StackBar';\nexport * from './StackBar';\n\nexport { default as Area } from './Area';\nexport * from './Area';\n\nexport { default as StackedArea } from './StackedArea';\nexport * from './StackedArea';\n\nexport { default as Radar } from './Radar';\nexport * from './Radar';\n\nexport { default as Donut } from './Donut';\nexport * from './Donut';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as ScatterPlot } from './ScatterPlot';\nexport * from './ScatterPlot';\n\nexport { default as Bubble } from './Bubble';\nexport * from './Bubble';\n\nexport { default as ReferenceLine } from './ReferenceLine';\nexport * from './ReferenceLine';\n\nexport { default as Venn } from './Venn';\nexport * from './Venn';\n\n/** It becomes resolvable after building and moving file to lib dir */\n\n// @ts-ignore\nexport { default as RadialTree } from './RadialTree';\n\n// @ts-ignore\nexport * from './RadialTree';\n\n// @ts-ignore\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\n\n// @ts-ignore\nexport * from './component/ChartLegend/LegendFlex/LegendFlex.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendTable/LegendTable.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendItem/LegendItem.type';\n"],"mappings":"AAAA;;AAIA,SAASA,sBAAsB,QAAQ,cAAc;;AAErD;AACA;AACA;AACA;AACA;;AAGA,SAASC,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,cAAc,QAAQ;AACtB,cAAc,SAAS;AAEvB,SAASD,OAAO,IAAIE,mBAAmB,QAAQ,uBAAuB;AACtE,cAAc,uBAAuB;AAErC,SAASF,OAAO,IAAIG,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,SAASH,OAAO,IAAII,GAAG,QAAQ,OAAO;AACtC,cAAc,OAAO;AAErB,SAASJ,OAAO,IAAIK,aAAa,QAAQ,iBAAiB;AAC1D,cAAc,iBAAiB;AAE/B,SAASL,OAAO,IAAIM,QAAQ,QAAQ,YAAY;AAChD,cAAc,YAAY;AAE1B,SAASN,OAAO,IAAIO,QAAQ,QAAQ,YAAY;AAChD,cAAc,YAAY;AAE1B,SAASP,OAAO,IAAIQ,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,SAASR,OAAO,IAAIS,WAAW,QAAQ,eAAe;AACtD,cAAc,eAAe;AAE7B,SAAST,OAAO,IAAIU,KAAK,QAAQ,SAAS;AAC1C,cAAc,SAAS;AAEvB,SAASV,OAAO,IAAIW,KAAK,QAAQ,SAAS;AAC1C,cAAc,SAAS;AAEvB,SAASX,OAAO,IAAIY,OAAO,QAAQ,WAAW;AAC9C,cAAc,WAAW;AAEzB,SAASZ,OAAO,IAAIa,WAAW,QAAQ,eAAe;AACtD,cAAc,eAAe;AAE7B,SAASb,OAAO,IAAIc,MAAM,QAAQ,UAAU;AAC5C,cAAc,UAAU;AAExB,SAASd,OAAO,IAAIe,aAAa,QAAQ,iBAAiB;AAC1D,cAAc,iBAAiB;AAE/B,SAASf,OAAO,IAAIgB,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;;AAEtB;;AAEA;AACA,SAAShB,OAAO,IAAIiB,UAAU,QAAQ,cAAc;;AAEpD;AACA,cAAc,cAAc;;AAE5B;AACA,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,yBAAyB;;AAEvE;AACA,cAAc,oDAAoD;AAClE;AACA,cAAc,sDAAsD;AACpE;AACA,cAAc,oDAAoD"}
@@ -1,6 +1,7 @@
1
1
  import { BoxProps } from '@semcore/flex-box';
2
2
  import { UnknownProperties, Intergalactic } from '@semcore/core';
3
3
  import { Context } from './context';
4
+ import { DataStructureHints } from './a11y/hints';
4
5
 
5
6
  /** @deprecated */
6
7
  export interface IPlotProps extends PlotProps, UnknownProperties {}
@@ -19,6 +20,10 @@ export type PlotProps = Context &
19
20
  * @default en
20
21
  * */
21
22
  locale?: NavigatorLanguage['language'];
23
+ /**
24
+ * Optional container for data hints (use it if you have a legend component upper in tree)
25
+ */
26
+ dataHints?: DataStructureHints;
22
27
  /** Optional prop to tune up alt text generating for charts */
23
28
  a11yAltTextConfig?: PlotSummarizerConfig;
24
29
 
@@ -10,6 +10,7 @@ export type TrendNode = {
10
10
  from: unknown;
11
11
  to: unknown;
12
12
  dataKey: string | number;
13
+ label?: string;
13
14
  };
14
15
  export type GeneralTrendNode = Omit<TrendNode, 'type'> & {
15
16
  type: 'general-trend';
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { Component, Intergalactic } from '@semcore/core';
3
+ import { LegendItemKey, LegendItemProps } from './LegendItem/LegendItem.type';
4
+ import { LegendProps } from './BaseLegend.type';
5
+ export declare abstract class BaseLegend<T extends LegendProps> extends Component<T> {
6
+ componentDidMount(): void;
7
+ componentDidUpdate(prevProps: T): void;
8
+ setHints(): void;
9
+ getItem(index: number): import("./LegendItem/LegendItem.type").LegendItem;
10
+ getLegendItemProps(_: {}, index: number): LegendItemProps & Intergalactic.InternalTypings.ComponentPropsNesting<'div'>;
11
+ bindOnChange: (id: LegendItemKey) => () => void;
12
+ bindOnMouseEnterItem: (id: LegendItemKey) => (e: React.SyntheticEvent) => void;
13
+ bindOnMouseLeaveItem: (id: LegendItemKey) => (e: React.SyntheticEvent) => void;
14
+ }
@@ -0,0 +1,27 @@
1
+ import { BoxProps } from '@semcore/flex-box';
2
+ import { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';
3
+ import { DataStructureHints } from '../../a11y/hints';
4
+ export type LSize = 'm' | 'l';
5
+ export type BaseChartLegendProps = {
6
+ /**
7
+ * Size for legend items
8
+ */
9
+ size?: LSize;
10
+ /**
11
+ * Shape of data item on Legend panel
12
+ */
13
+ shape?: ShapeType;
14
+ /**
15
+ * Handler for change visible for data items. Doesn't work if Shape one of 'Circle' | 'Line' | 'Square'
16
+ */
17
+ onChangeVisibleItem?: (key: LegendItemKey, isVisible: boolean) => void;
18
+ onMouseEnterItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;
19
+ onMouseLeaveItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;
20
+ dataHints?: DataStructureHints;
21
+ };
22
+ export type LegendProps = BoxProps & BaseChartLegendProps & {
23
+ /**
24
+ * Legend items
25
+ */
26
+ items: LegendItem[];
27
+ };
@@ -0,0 +1,2 @@
1
+ import { LegendFlexType } from './LegendFlex.type';
2
+ export declare const LegendFlex: LegendFlexType;
@@ -0,0 +1,38 @@
1
+ import { Flex, FlexProps } from '@semcore/flex-box';
2
+ import { Intergalactic } from '@semcore/core';
3
+ import { LegendItemType } from '../LegendItem/LegendItem.type';
4
+ import { LegendProps } from '../BaseLegend.type';
5
+ export type TrendProps = {
6
+ /**
7
+ * Flag for include trend LegendItem in Legend
8
+ */
9
+ withTrend: true;
10
+ /**
11
+ * Trend label (for localization)
12
+ */
13
+ trendLabel?: string;
14
+ /**
15
+ * Flag for describe are trend is visible
16
+ */
17
+ trendIsVisible: boolean;
18
+ /**
19
+ * Handler for change trend visibility
20
+ */
21
+ onTrendIsVisibleChange: (isVisible: boolean) => void;
22
+ };
23
+ type SuffixProps = {
24
+ /**
25
+ * Element after all Legend items
26
+ */
27
+ suffix?: React.ReactElement;
28
+ };
29
+ type AddonProps = ({
30
+ withTrend?: never;
31
+ } & SuffixProps) | ({
32
+ suffix?: never;
33
+ } & TrendProps);
34
+ export type LegendFlexProps = LegendProps & AddonProps & FlexProps;
35
+ export type LegendFlexType = Intergalactic.Component<typeof Flex, LegendFlexProps> & {
36
+ LegendItem: LegendItemType;
37
+ };
38
+ export {};
@@ -0,0 +1,2 @@
1
+ import { LegendItemType } from './LegendItem.type';
2
+ export declare const LegendItemComponent: LegendItemType;
@@ -0,0 +1,67 @@
1
+ import { Flex } from '@semcore/flex-box';
2
+ import { Intergalactic, Root } from '@semcore/core';
3
+ import Icon from '@semcore/icon';
4
+ import { Text } from '@semcore/typography';
5
+ import { LSize } from '../BaseLegend.type';
6
+ /**
7
+ * Key of chart data item
8
+ */
9
+ export type LegendItemKey = string;
10
+ export type LegendItem = {
11
+ /**
12
+ * One of keys from data set
13
+ */
14
+ id: LegendItemKey;
15
+ /**
16
+ * Label for data item in Legend
17
+ */
18
+ label: string;
19
+ /**
20
+ * Flag for selected data item
21
+ */
22
+ checked: boolean;
23
+ /**
24
+ * Color of data item
25
+ */
26
+ color: string;
27
+ /**
28
+ * Icon before label
29
+ */
30
+ icon?: typeof Icon;
31
+ /**
32
+ * Additional info with sub-label or count
33
+ */
34
+ additionalInfo?: {
35
+ label: string;
36
+ } | {
37
+ count: number;
38
+ };
39
+ };
40
+ export type LegendItemProps = LegendItem & {
41
+ /**
42
+ * Size for legend item
43
+ */
44
+ size: LSize;
45
+ /**
46
+ * Shape of data item on Legend panel
47
+ */
48
+ shape: ShapeType;
49
+ /**
50
+ * Handler for select/deselect legend item.
51
+ * !Need to redefine onClick, because we don't have `event` in it.
52
+ */
53
+ onClick: () => void;
54
+ };
55
+ export type ShapeProps = LegendItem & {
56
+ size: LSize;
57
+ shape: ShapeType;
58
+ };
59
+ export declare const StaticShapes: readonly ["Circle", "Line", "Square"];
60
+ export type ShapeType = 'Checkbox' | typeof StaticShapes[number];
61
+ export type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {
62
+ Shape: Intergalactic.Component<typeof Root, Partial<ShapeProps>>;
63
+ Icon: Intergalactic.Component<typeof Icon, Partial<LegendItem>>;
64
+ Label: Intergalactic.Component<typeof Text, Partial<Omit<LegendItem, 'theme'>>>;
65
+ AdditionalLabel: Intergalactic.Component<typeof Text, Partial<LegendItem>>;
66
+ Count: Intergalactic.Component<typeof Text, Partial<LegendItem>>;
67
+ };
@@ -0,0 +1,2 @@
1
+ import { LegendTableType } from './LegendTable.type';
2
+ export declare const LegendTable: LegendTableType;
@@ -0,0 +1,21 @@
1
+ import { Intergalactic } from '@semcore/core';
2
+ import { Box } from '@semcore/flex-box';
3
+ import { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';
4
+ import React from 'react';
5
+ import { LegendProps, LSize } from '../BaseLegend.type';
6
+ export type LegendTableProps = Omit<LegendProps, 'items'> & {
7
+ /**
8
+ * Legend items
9
+ */
10
+ items: Array<LegendItem & {
11
+ columns: Array<React.ReactNode>;
12
+ }>;
13
+ };
14
+ export type LegendColumnProps = {
15
+ index: number;
16
+ size: LSize;
17
+ };
18
+ export type LegendTableType = Intergalactic.Component<typeof Box, LegendTableProps> & {
19
+ LegendItem: LegendItemType;
20
+ Column: Intergalactic.Component<typeof Box, Partial<LegendColumnProps>>;
21
+ };
@@ -0,0 +1,4 @@
1
+ import { LegendFlex as ChartLegend } from './LegendFlex/LegendFlex';
2
+ import { LegendTable as ChartLegendTable } from './LegendTable/LegendTable';
3
+ export { ChartLegend, ChartLegendTable };
4
+ export default ChartLegend;