@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.
- package/CHANGELOG.md +7 -1
- package/lib/cjs/Area.js +9 -9
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +8 -8
- package/lib/cjs/Bubble.js +10 -10
- package/lib/cjs/Donut.js +7 -7
- package/lib/cjs/Dots.js +10 -10
- package/lib/cjs/HorizontalBar.js +8 -8
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +4 -4
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +17 -17
- package/lib/cjs/RadialTree.js +10 -10
- package/lib/cjs/ReferenceLine.js +9 -9
- package/lib/cjs/ScatterPlot.js +7 -7
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +7 -7
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +3 -3
- package/lib/cjs/a11y/insights.js +12 -8
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +2 -1
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +108 -0
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -0
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js +2 -0
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -0
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +93 -0
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -0
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js +2 -0
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -0
- package/lib/cjs/component/ChartLegend/LegendFlex/legend-flex.shadow.css +11 -0
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +230 -0
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -0
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +13 -0
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -0
- package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +109 -0
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +100 -0
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -0
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js +2 -0
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -0
- package/lib/cjs/component/ChartLegend/LegendTable/legend-table.shadow.css +16 -0
- package/lib/cjs/component/ChartLegend/index.js +23 -0
- package/lib/cjs/component/ChartLegend/index.js.map +1 -0
- package/lib/cjs/index.js +20 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +37 -0
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/cjs/translations/de.json +3 -0
- package/lib/cjs/translations/en.json +3 -0
- package/lib/cjs/translations/es.json +3 -0
- package/lib/cjs/translations/fr.json +3 -0
- package/lib/cjs/translations/it.json +3 -0
- package/lib/cjs/translations/ja.json +3 -0
- package/lib/cjs/translations/ko.json +3 -0
- package/lib/cjs/translations/nl.json +3 -0
- package/lib/cjs/translations/pl.json +3 -0
- package/lib/cjs/translations/pt.json +3 -0
- package/lib/cjs/translations/sv.json +3 -0
- package/lib/cjs/translations/tr.json +3 -0
- package/lib/cjs/translations/vi.json +3 -0
- package/lib/cjs/translations/zh.json +3 -0
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +73 -14
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/es6/Area.js +9 -9
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +8 -8
- package/lib/es6/Bubble.js +10 -10
- package/lib/es6/Donut.js +7 -7
- package/lib/es6/Dots.js +10 -10
- package/lib/es6/HorizontalBar.js +8 -8
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +4 -4
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +17 -17
- package/lib/es6/RadialTree.js +10 -10
- package/lib/es6/ReferenceLine.js +9 -9
- package/lib/es6/ScatterPlot.js +7 -7
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +7 -7
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +3 -3
- package/lib/es6/a11y/insights.js +12 -8
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/serialize.js +2 -1
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +100 -0
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -0
- package/lib/es6/component/ChartLegend/BaseLegend.type.js +2 -0
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -0
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +86 -0
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -0
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js +2 -0
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -0
- package/lib/es6/component/ChartLegend/LegendFlex/legend-flex.shadow.css +11 -0
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +228 -0
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -0
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +6 -0
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -0
- package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +109 -0
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +94 -0
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -0
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js +2 -0
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -0
- package/lib/es6/component/ChartLegend/LegendTable/legend-table.shadow.css +16 -0
- package/lib/es6/component/ChartLegend/index.js +5 -0
- package/lib/es6/component/ChartLegend/index.js.map +1 -0
- package/lib/es6/index.js +2 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +29 -0
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -0
- package/lib/es6/translations/de.json +3 -0
- package/lib/es6/translations/en.json +3 -0
- package/lib/es6/translations/es.json +3 -0
- package/lib/es6/translations/fr.json +3 -0
- package/lib/es6/translations/it.json +3 -0
- package/lib/es6/translations/ja.json +3 -0
- package/lib/es6/translations/ko.json +3 -0
- package/lib/es6/translations/nl.json +3 -0
- package/lib/es6/translations/pl.json +3 -0
- package/lib/es6/translations/pt.json +3 -0
- package/lib/es6/translations/sv.json +3 -0
- package/lib/es6/translations/tr.json +3 -0
- package/lib/es6/translations/vi.json +3 -0
- package/lib/es6/translations/zh.json +3 -0
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/index.d.js +20 -8
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/types/Plot.d.ts +5 -0
- package/lib/types/a11y/insights.d.ts +1 -0
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +14 -0
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +27 -0
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +2 -0
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +38 -0
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +2 -0
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +67 -0
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +2 -0
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +21 -0
- package/lib/types/component/ChartLegend/index.d.ts +4 -0
- package/lib/types/index.d.ts +20 -8
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +41 -0
- package/package.json +3 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
SLegendItem {
|
|
2
|
+
align-items: flex-start;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
SLegendItem:hover {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
SLegendItem[disabled]:hover {
|
|
10
|
+
cursor: default;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
SPointShape[color] {
|
|
14
|
+
background-color: var(--color);
|
|
15
|
+
margin-right: 8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
SPointShape[shape='Circle'][size='l'] {
|
|
19
|
+
width: 16px;
|
|
20
|
+
height: 16px;
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
margin-top: 4px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
SPointShape[shape='Circle'][size='m'] {
|
|
26
|
+
width: 12px;
|
|
27
|
+
height: 12px;
|
|
28
|
+
border-radius: 6px;
|
|
29
|
+
margin-top: 4px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
SPointShape[shape='Line'][size='l'] {
|
|
33
|
+
width: 16px;
|
|
34
|
+
height: 4px;
|
|
35
|
+
border-radius: 3px;
|
|
36
|
+
margin-top: 9px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
SPointShape[shape='Line'][size='m'] {
|
|
40
|
+
width: 12px;
|
|
41
|
+
height: 4px;
|
|
42
|
+
border-radius: 3px;
|
|
43
|
+
margin-top: 8px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
SPointShape[shape='Square'][size='l'] {
|
|
47
|
+
width: 16px;
|
|
48
|
+
height: 16px;
|
|
49
|
+
border-radius: 2px;
|
|
50
|
+
margin-top: 4px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
SPointShape[shape='Square'][size='m'] {
|
|
54
|
+
width: 12px;
|
|
55
|
+
height: 12px;
|
|
56
|
+
border-radius: 2px;
|
|
57
|
+
margin-top: 4px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
SIcon {
|
|
61
|
+
line-height: 0;
|
|
62
|
+
margin-right: 4px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
SIcon[size='l'] {
|
|
66
|
+
margin-top: 4px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
SIcon[size='m'] {
|
|
70
|
+
margin-top: 2px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
SLabel[size='l'], SAdditionalLabel[size='l'], SCount[size='l'] {
|
|
74
|
+
font-size: var(--intergalactic-fs-300, 16px);
|
|
75
|
+
line-height: var(--intergalactic-lh-300, 150%);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
SLabel[size='m'], SAdditionalLabel[size='m'], SCount[size='m'] {
|
|
79
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
80
|
+
line-height: var(--intergalactic-lh-200, 142%);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
SAdditionalLabel, SCount {
|
|
84
|
+
margin-left: 4px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
SAdditionalLabel {
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: flex-start;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
SAdditionalLabel::before {
|
|
94
|
+
content: '';
|
|
95
|
+
display: inline-block;
|
|
96
|
+
background-color: var(--intergalactic-text-secondary, #6c6e79);
|
|
97
|
+
height: 4px;
|
|
98
|
+
width: 4px;
|
|
99
|
+
border-radius: 2px;
|
|
100
|
+
margin-right: 4px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
SAdditionalLabel[size='l']::before {
|
|
104
|
+
margin-top: 10px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
SAdditionalLabel[size='m']::before {
|
|
108
|
+
margin-top: 8px;
|
|
109
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.LegendTable = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
var _core = _interopRequireWildcard(require("@semcore/core"));
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
17
|
+
var _flexBox = require("@semcore/flex-box");
|
|
18
|
+
var _LegendItem = require("../LegendItem/LegendItem");
|
|
19
|
+
var _BaseLegend2 = require("../BaseLegend");
|
|
20
|
+
/*__reshadow-styles__:"./legend-table.shadow.css"*/
|
|
21
|
+
var style = ( /*__reshadow_css_start__*/_core.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__*/, {
|
|
22
|
+
"__SLegendTable": "___SLegendTable_zyu4h_gg_",
|
|
23
|
+
"_columns-count": "__columns-count_zyu4h_gg_",
|
|
24
|
+
"--columns-count": "--columns-count_zyu4h",
|
|
25
|
+
"__SColumnItem": "___SColumnItem_zyu4h_gg_",
|
|
26
|
+
"_size_l": "_size_l_zyu4h_gg_",
|
|
27
|
+
"_size_m": "_size_m_zyu4h_gg_"
|
|
28
|
+
});
|
|
29
|
+
var LegendTableRoot = /*#__PURE__*/function (_BaseLegend) {
|
|
30
|
+
(0, _inherits2["default"])(LegendTableRoot, _BaseLegend);
|
|
31
|
+
var _super = (0, _createSuper2["default"])(LegendTableRoot);
|
|
32
|
+
function LegendTableRoot() {
|
|
33
|
+
(0, _classCallCheck2["default"])(this, LegendTableRoot);
|
|
34
|
+
return _super.apply(this, arguments);
|
|
35
|
+
}
|
|
36
|
+
(0, _createClass2["default"])(LegendTableRoot, [{
|
|
37
|
+
key: "render",
|
|
38
|
+
value: function render() {
|
|
39
|
+
var _ref = this.asProps,
|
|
40
|
+
_ref3,
|
|
41
|
+
_items$;
|
|
42
|
+
var SLegendTable = _flexBox.Box;
|
|
43
|
+
var _this$asProps = this.asProps,
|
|
44
|
+
styles = _this$asProps.styles,
|
|
45
|
+
Children = _this$asProps.Children,
|
|
46
|
+
_this$asProps$size = _this$asProps.size,
|
|
47
|
+
size = _this$asProps$size === void 0 ? 'm' : _this$asProps$size,
|
|
48
|
+
items = _this$asProps.items;
|
|
49
|
+
var columnsCount = (_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.columns.length;
|
|
50
|
+
return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SLegendTable, _ref3.cn("SLegendTable", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
51
|
+
"columns-count": columnsCount + 1
|
|
52
|
+
}, _ref))), items.map(function (_ref5, index) {
|
|
53
|
+
var id = _ref5.id,
|
|
54
|
+
_ref5$columns = _ref5.columns,
|
|
55
|
+
columns = _ref5$columns === void 0 ? [] : _ref5$columns;
|
|
56
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
57
|
+
key: id
|
|
58
|
+
}, /*#__PURE__*/_react["default"].createElement(Children, null), columns.map(function (item, index) {
|
|
59
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
60
|
+
key: "".concat(id, "__").concat(index)
|
|
61
|
+
}, /*#__PURE__*/_react["default"].createElement(LegendTable.Column, {
|
|
62
|
+
index: index,
|
|
63
|
+
size: size,
|
|
64
|
+
styles: styles
|
|
65
|
+
}, item));
|
|
66
|
+
}));
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
}]);
|
|
70
|
+
return LegendTableRoot;
|
|
71
|
+
}(_BaseLegend2.BaseLegend);
|
|
72
|
+
(0, _defineProperty2["default"])(LegendTableRoot, "displayName", 'LegendTable');
|
|
73
|
+
(0, _defineProperty2["default"])(LegendTableRoot, "style", style);
|
|
74
|
+
(0, _defineProperty2["default"])(LegendTableRoot, "defaultProps", function () {
|
|
75
|
+
return {
|
|
76
|
+
children: /*#__PURE__*/_react["default"].createElement(LegendTable.LegendItem, null)
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
function ColumnComponent(props) {
|
|
80
|
+
var _ref2 = arguments[0],
|
|
81
|
+
_ref4;
|
|
82
|
+
var SColumnItem = _flexBox.Box;
|
|
83
|
+
var styles = props.styles,
|
|
84
|
+
index = props.index,
|
|
85
|
+
size = props.size,
|
|
86
|
+
Children = props.Children;
|
|
87
|
+
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SColumnItem, _ref4.cn("SColumnItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
88
|
+
"style": {
|
|
89
|
+
gridColumnStart: "".concat(index + 2),
|
|
90
|
+
gridColumnEnd: "".concat(index + 3)
|
|
91
|
+
},
|
|
92
|
+
"size": size
|
|
93
|
+
}, _ref2))), /*#__PURE__*/_react["default"].createElement(Children, _ref4.cn("Children", {})));
|
|
94
|
+
}
|
|
95
|
+
var LegendTable = (0, _core["default"])(LegendTableRoot, {
|
|
96
|
+
LegendItem: _LegendItem.LegendItemComponent,
|
|
97
|
+
Column: ColumnComponent
|
|
98
|
+
});
|
|
99
|
+
exports.LegendTable = LegendTable;
|
|
100
|
+
//# sourceMappingURL=LegendTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendTable.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_LegendItem","_BaseLegend2","style","sstyled","insert","LegendTableRoot","_BaseLegend","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_ref3","_items$","SLegendTable","Box","_this$asProps","styles","Children","_this$asProps$size","size","items","columnsCount","columns","length","createElement","cn","_objectSpread2","assignProps","map","_ref5","index","id","_ref5$columns","Fragment","item","concat","LegendTable","Column","BaseLegend","_defineProperty2","children","LegendItem","ColumnComponent","props","_ref2","arguments[0]","_ref4","SColumnItem","gridColumnStart","gridColumnEnd","createComponent","LegendItemComponent","exports"],"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 @@
|
|
|
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,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ChartLegend", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _LegendFlex.LegendFlex;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ChartLegendTable", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _LegendTable.LegendTable;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
exports["default"] = void 0;
|
|
19
|
+
var _LegendFlex = require("./LegendFlex/LegendFlex");
|
|
20
|
+
var _LegendTable = require("./LegendTable/LegendTable");
|
|
21
|
+
var _default = _LegendFlex.LegendFlex;
|
|
22
|
+
exports["default"] = _default;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_LegendFlex","require","_LegendTable","_default","ChartLegend","exports"],"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,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA4E,IAAAE,QAAA,GAI7DC,sBAAW;AAAAC,OAAA,cAAAF,QAAA"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -23,6 +23,18 @@ Object.defineProperty(exports, "Bubble", {
|
|
|
23
23
|
return _Bubble["default"];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
+
Object.defineProperty(exports, "ChartLegend", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _ChartLegend.ChartLegend;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "ChartLegendTable", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _ChartLegend.ChartLegendTable;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
26
38
|
Object.defineProperty(exports, "Donut", {
|
|
27
39
|
enumerable: true,
|
|
28
40
|
get: function get() {
|
|
@@ -149,6 +161,12 @@ Object.defineProperty(exports, "interpolateValue", {
|
|
|
149
161
|
return _utils.interpolateValue;
|
|
150
162
|
}
|
|
151
163
|
});
|
|
164
|
+
Object.defineProperty(exports, "makeDataHintsContainer", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function get() {
|
|
167
|
+
return _hints.makeDataHintsContainer;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
152
170
|
Object.defineProperty(exports, "minMax", {
|
|
153
171
|
enumerable: true,
|
|
154
172
|
get: function get() {
|
|
@@ -156,6 +174,7 @@ Object.defineProperty(exports, "minMax", {
|
|
|
156
174
|
}
|
|
157
175
|
});
|
|
158
176
|
var _Plot = _interopRequireDefault(require("./Plot"));
|
|
177
|
+
var _ChartLegend = require("./component/ChartLegend");
|
|
159
178
|
var _Axis = require("./Axis");
|
|
160
179
|
var _Line = _interopRequireDefault(require("./Line"));
|
|
161
180
|
var _Bar = _interopRequireDefault(require("./Bar"));
|
|
@@ -176,4 +195,5 @@ var _ReferenceLine = _interopRequireDefault(require("./ReferenceLine"));
|
|
|
176
195
|
var _Hover = require("./Hover");
|
|
177
196
|
var _utils = require("./utils");
|
|
178
197
|
var _color = require("./color");
|
|
198
|
+
var _hints = require("./a11y/hints");
|
|
179
199
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Plot","_interopRequireDefault","require","_Axis","_Line","_Bar","_HorizontalBar","_GroupBar","_StackBar","_Area","_StackedArea","_ScatterPlot","_Bubble","_RadialTree","_Donut","_Venn","_Radar","_interopRequireWildcard","_Tooltip","_ResponsiveContainer","_ReferenceLine","_Hover","_utils","_color"],"sources":["../../src/index.js"],"sourcesContent":["export { default as Plot } from './Plot';\
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Plot","_interopRequireDefault","require","_ChartLegend","_Axis","_Line","_Bar","_HorizontalBar","_GroupBar","_StackBar","_Area","_StackedArea","_ScatterPlot","_Bubble","_RadialTree","_Donut","_Venn","_Radar","_interopRequireWildcard","_Tooltip","_ResponsiveContainer","_ReferenceLine","_Hover","_utils","_color","_hints"],"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,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,IAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,KAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,YAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,YAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,OAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,WAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,MAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,KAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,MAAA,GAAAC,uBAAA,CAAAhB,OAAA;AAEA,IAAAiB,QAAA,GAAAlB,sBAAA,CAAAC,OAAA;AAEA,IAAAkB,oBAAA,GAAAnB,sBAAA,CAAAC,OAAA;AACA,IAAAmB,cAAA,GAAApB,sBAAA,CAAAC,OAAA;AAEA,IAAAoB,MAAA,GAAApB,OAAA;AAEA,IAAAqB,MAAA,GAAArB,OAAA;AACA,IAAAsB,MAAA,GAAAtB,OAAA;AAEA,IAAAuB,MAAA,GAAAvB,OAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.localizedMessages = void 0;
|
|
8
|
+
var _en = _interopRequireDefault(require("./en.json"));
|
|
9
|
+
var _es = _interopRequireDefault(require("./es.json"));
|
|
10
|
+
var _fr = _interopRequireDefault(require("./fr.json"));
|
|
11
|
+
var _it = _interopRequireDefault(require("./it.json"));
|
|
12
|
+
var _ja = _interopRequireDefault(require("./ja.json"));
|
|
13
|
+
var _ko = _interopRequireDefault(require("./ko.json"));
|
|
14
|
+
var _nl = _interopRequireDefault(require("./nl.json"));
|
|
15
|
+
var _pt = _interopRequireDefault(require("./pt.json"));
|
|
16
|
+
var _tr = _interopRequireDefault(require("./tr.json"));
|
|
17
|
+
var _vi = _interopRequireDefault(require("./vi.json"));
|
|
18
|
+
var _zh = _interopRequireDefault(require("./zh.json"));
|
|
19
|
+
var _pl = _interopRequireDefault(require("./pl.json"));
|
|
20
|
+
var _sv = _interopRequireDefault(require("./sv.json"));
|
|
21
|
+
var localizedMessages = {
|
|
22
|
+
en: _en["default"],
|
|
23
|
+
es: _es["default"],
|
|
24
|
+
fr: _fr["default"],
|
|
25
|
+
it: _it["default"],
|
|
26
|
+
ja: _ja["default"],
|
|
27
|
+
ko: _ko["default"],
|
|
28
|
+
nl: _nl["default"],
|
|
29
|
+
pt: _pt["default"],
|
|
30
|
+
tr: _tr["default"],
|
|
31
|
+
vi: _vi["default"],
|
|
32
|
+
zh: _zh["default"],
|
|
33
|
+
pl: _pl["default"],
|
|
34
|
+
sv: _sv["default"]
|
|
35
|
+
};
|
|
36
|
+
exports.localizedMessages = localizedMessages;
|
|
37
|
+
//# sourceMappingURL=__intergalactic-dynamic-locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["_en","_interopRequireDefault","require","_es","_fr","_it","_ja","_ko","_nl","_pt","_tr","_vi","_zh","_pl","_sv","localizedMessages","en","es","fr","it","ja","ko","nl","pt","tr","vi","zh","pl","sv","exports"],"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,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,GAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,GAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,GAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,GAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,GAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,GAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,GAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,GAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,GAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,GAAA,GAAAb,sBAAA,CAAAC,OAAA;AAEO,IAAMa,iBAAiB,GAAG;EAC/BC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA;AACF,CAAC;AAACC,OAAA,CAAAd,iBAAA,GAAAA,iBAAA"}
|
|
@@ -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":""}
|
package/lib/cjs/types/index.d.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
var _exportNames = {
|
|
8
|
+
makeDataHintsContainer: true,
|
|
8
9
|
Plot: true,
|
|
9
10
|
ResponsiveContainer: true,
|
|
10
11
|
Line: true,
|
|
@@ -14,14 +15,16 @@ var _exportNames = {
|
|
|
14
15
|
StackBar: true,
|
|
15
16
|
Area: true,
|
|
16
17
|
StackedArea: true,
|
|
17
|
-
RadialTree: true,
|
|
18
18
|
Radar: true,
|
|
19
19
|
Donut: true,
|
|
20
20
|
Tooltip: true,
|
|
21
21
|
ScatterPlot: true,
|
|
22
22
|
Bubble: true,
|
|
23
23
|
ReferenceLine: true,
|
|
24
|
-
Venn: true
|
|
24
|
+
Venn: true,
|
|
25
|
+
RadialTree: true,
|
|
26
|
+
ChartLegend: true,
|
|
27
|
+
ChartLegendTable: true
|
|
25
28
|
};
|
|
26
29
|
Object.defineProperty(exports, "Area", {
|
|
27
30
|
enumerable: true,
|
|
@@ -41,6 +44,18 @@ Object.defineProperty(exports, "Bubble", {
|
|
|
41
44
|
return _Bubble["default"];
|
|
42
45
|
}
|
|
43
46
|
});
|
|
47
|
+
Object.defineProperty(exports, "ChartLegend", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _ChartLegend.ChartLegend;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "ChartLegendTable", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function get() {
|
|
56
|
+
return _ChartLegend.ChartLegendTable;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
44
59
|
Object.defineProperty(exports, "Donut", {
|
|
45
60
|
enumerable: true,
|
|
46
61
|
get: function get() {
|
|
@@ -125,6 +140,13 @@ Object.defineProperty(exports, "Venn", {
|
|
|
125
140
|
return _Venn["default"];
|
|
126
141
|
}
|
|
127
142
|
});
|
|
143
|
+
Object.defineProperty(exports, "makeDataHintsContainer", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function get() {
|
|
146
|
+
return _hints.makeDataHintsContainer;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
var _hints = require("./a11y/hints");
|
|
128
150
|
var _Plot = _interopRequireWildcard(require("./Plot"));
|
|
129
151
|
Object.keys(_Plot).forEach(function (key) {
|
|
130
152
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -257,18 +279,6 @@ Object.keys(_StackedArea).forEach(function (key) {
|
|
|
257
279
|
}
|
|
258
280
|
});
|
|
259
281
|
});
|
|
260
|
-
var _RadialTree = _interopRequireWildcard(require("./RadialTree"));
|
|
261
|
-
Object.keys(_RadialTree).forEach(function (key) {
|
|
262
|
-
if (key === "default" || key === "__esModule") return;
|
|
263
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
264
|
-
if (key in exports && exports[key] === _RadialTree[key]) return;
|
|
265
|
-
Object.defineProperty(exports, key, {
|
|
266
|
-
enumerable: true,
|
|
267
|
-
get: function get() {
|
|
268
|
-
return _RadialTree[key];
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
282
|
var _Radar = _interopRequireWildcard(require("./Radar"));
|
|
273
283
|
Object.keys(_Radar).forEach(function (key) {
|
|
274
284
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -353,4 +363,53 @@ Object.keys(_Venn).forEach(function (key) {
|
|
|
353
363
|
}
|
|
354
364
|
});
|
|
355
365
|
});
|
|
366
|
+
var _RadialTree = _interopRequireWildcard(require("./RadialTree"));
|
|
367
|
+
Object.keys(_RadialTree).forEach(function (key) {
|
|
368
|
+
if (key === "default" || key === "__esModule") return;
|
|
369
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
370
|
+
if (key in exports && exports[key] === _RadialTree[key]) return;
|
|
371
|
+
Object.defineProperty(exports, key, {
|
|
372
|
+
enumerable: true,
|
|
373
|
+
get: function get() {
|
|
374
|
+
return _RadialTree[key];
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
var _ChartLegend = require("./component/ChartLegend");
|
|
379
|
+
var _LegendFlex = require("./component/ChartLegend/LegendFlex/LegendFlex.type");
|
|
380
|
+
Object.keys(_LegendFlex).forEach(function (key) {
|
|
381
|
+
if (key === "default" || key === "__esModule") return;
|
|
382
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
383
|
+
if (key in exports && exports[key] === _LegendFlex[key]) return;
|
|
384
|
+
Object.defineProperty(exports, key, {
|
|
385
|
+
enumerable: true,
|
|
386
|
+
get: function get() {
|
|
387
|
+
return _LegendFlex[key];
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
var _LegendTable = require("./component/ChartLegend/LegendTable/LegendTable.type");
|
|
392
|
+
Object.keys(_LegendTable).forEach(function (key) {
|
|
393
|
+
if (key === "default" || key === "__esModule") return;
|
|
394
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
395
|
+
if (key in exports && exports[key] === _LegendTable[key]) return;
|
|
396
|
+
Object.defineProperty(exports, key, {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function get() {
|
|
399
|
+
return _LegendTable[key];
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
});
|
|
403
|
+
var _LegendItem = require("./component/ChartLegend/LegendItem/LegendItem.type");
|
|
404
|
+
Object.keys(_LegendItem).forEach(function (key) {
|
|
405
|
+
if (key === "default" || key === "__esModule") return;
|
|
406
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
407
|
+
if (key in exports && exports[key] === _LegendItem[key]) return;
|
|
408
|
+
Object.defineProperty(exports, key, {
|
|
409
|
+
enumerable: true,
|
|
410
|
+
get: function get() {
|
|
411
|
+
return _LegendItem[key];
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
});
|
|
356
415
|
//# sourceMappingURL=index.d.js.map
|