@semcore/d3-chart 3.36.0 → 3.37.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 +6 -0
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +10 -10
- package/lib/cjs/Bubble.js +12 -12
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +8 -8
- package/lib/cjs/HorizontalBar.js +10 -10
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +11 -11
- package/lib/cjs/ReferenceLine.js +9 -9
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +9 -9
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/DataAccessibilityTable.js +116 -0
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -0
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +11 -90
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +43 -30
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +10 -10
- package/lib/es6/Bubble.js +12 -12
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +8 -8
- package/lib/es6/HorizontalBar.js +10 -10
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +11 -11
- package/lib/es6/ReferenceLine.js +9 -9
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +9 -9
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/DataAccessibilityTable.js +108 -0
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -0
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +11 -90
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/serialize.js +41 -28
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/types/Plot.d.ts +4 -0
- package/lib/types/a11y/DataAccessibilityTable.d.ts +11 -0
- package/lib/types/a11y/hints.d.ts +6 -1
- package/lib/types/a11y/serialize.d.ts +2 -2
- package/package.json +6 -6
package/lib/es6/Bubble.js
CHANGED
|
@@ -18,18 +18,18 @@ import { getBubbleChartValueScale, CONSTANT, measureText } from './utils';
|
|
|
18
18
|
import Tooltip from './Tooltip';
|
|
19
19
|
import { PatternFill } from './Pattern';
|
|
20
20
|
/*__reshadow-styles__:"./style/bubble.shadow.css"*/
|
|
21
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
22
|
-
"__SBubble": "
|
|
23
|
-
"_color": "
|
|
24
|
-
"--color": "--
|
|
25
|
-
"_pattern": "
|
|
26
|
-
"--pattern": "--
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"__SCenter": "
|
|
29
|
-
"__SLabel": "
|
|
30
|
-
"_position_right": "
|
|
31
|
-
"_position_left": "
|
|
32
|
-
"--duration": "--
|
|
21
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SBubble_1teea_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_1teea);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SBubble_1teea_gg_:hover{opacity:.8}}.___SBubble_1teea_gg_.__color_1teea_gg_{fill:var(--color_1teea)}.___SBubble_1teea_gg_.__pattern_1teea_gg_.__color_1teea_gg_{fill:var(--pattern_1teea);stroke:var(--color_1teea);stroke-width:1px}.___SBubble_1teea_gg_.__transparent_1teea_gg_{opacity:.3}.___SCenter_1teea_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SCenter_1teea_gg_.__color_1teea_gg_{stroke:var(--color_1teea)}.___SCenter_1teea_gg_.__transparent_1teea_gg_{opacity:.3}.___SLabel_1teea_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLabel_1teea_gg_._position_right_1teea_gg_{text-anchor:end}.___SLabel_1teea_gg_._position_left_1teea_gg_{text-anchor:start}.___SLabel_1teea_gg_.__color_1teea_gg_{fill:var(--color_1teea)}.___SLabel_1teea_gg_.__transparent_1teea_gg_{opacity:.3}" /*__inner_css_end__*/, "1teea_gg_") /*__reshadow_css_end__*/, {
|
|
22
|
+
"__SBubble": "___SBubble_1teea_gg_",
|
|
23
|
+
"_color": "__color_1teea_gg_",
|
|
24
|
+
"--color": "--color_1teea",
|
|
25
|
+
"_pattern": "__pattern_1teea_gg_",
|
|
26
|
+
"--pattern": "--pattern_1teea",
|
|
27
|
+
"_transparent": "__transparent_1teea_gg_",
|
|
28
|
+
"__SCenter": "___SCenter_1teea_gg_",
|
|
29
|
+
"__SLabel": "___SLabel_1teea_gg_",
|
|
30
|
+
"_position_right": "_position_right_1teea_gg_",
|
|
31
|
+
"_position_left": "_position_left_1teea_gg_",
|
|
32
|
+
"--duration": "--duration_1teea"
|
|
33
33
|
});
|
|
34
34
|
var BubbleRoot = /*#__PURE__*/function (_Component) {
|
|
35
35
|
_inherits(BubbleRoot, _Component);
|
package/lib/es6/Donut.js
CHANGED
|
@@ -23,15 +23,15 @@ import { CONSTANT, getChartDefaultColorName } from './utils';
|
|
|
23
23
|
import Tooltip from './Tooltip';
|
|
24
24
|
import { PatternFill } from './Pattern';
|
|
25
25
|
/*__reshadow-styles__:"./style/donut.shadow.css"*/
|
|
26
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
27
|
-
"__SPie": "
|
|
28
|
-
"_color": "
|
|
29
|
-
"--color": "--
|
|
30
|
-
"_pattern": "
|
|
31
|
-
"--pattern": "--
|
|
32
|
-
"_transparent": "
|
|
33
|
-
"__SEmptyData": "
|
|
34
|
-
"__SLabel": "
|
|
26
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPie_1omq0_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPie_1omq0_gg_.__color_1omq0_gg_{fill:var(--color_1omq0)}.___SPie_1omq0_gg_.__pattern_1omq0_gg_.__color_1omq0_gg_{fill:var(--pattern_1omq0);stroke:var(--color_1omq0);stroke-width:1px}.___SPie_1omq0_gg_.__transparent_1omq0_gg_{opacity:.3}.___SEmptyData_1omq0_gg_{fill:var(--intergalactic-chart-palette-order-null, #e0e1e9)}.___SEmptyData_1omq0_gg_.__color_1omq0_gg_{fill:var(--color_1omq0)}.___SLabel_1omq0_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}" /*__inner_css_end__*/, "1omq0_gg_") /*__reshadow_css_end__*/, {
|
|
27
|
+
"__SPie": "___SPie_1omq0_gg_",
|
|
28
|
+
"_color": "__color_1omq0_gg_",
|
|
29
|
+
"--color": "--color_1omq0",
|
|
30
|
+
"_pattern": "__pattern_1omq0_gg_",
|
|
31
|
+
"--pattern": "--pattern_1omq0",
|
|
32
|
+
"_transparent": "__transparent_1omq0_gg_",
|
|
33
|
+
"__SEmptyData": "___SEmptyData_1omq0_gg_",
|
|
34
|
+
"__SLabel": "___SLabel_1omq0_gg_"
|
|
35
35
|
});
|
|
36
36
|
var DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');
|
|
37
37
|
function transitionAnglePie(_ref6) {
|
package/lib/es6/Dots.js
CHANGED
|
@@ -7,14 +7,14 @@ import trottle from '@semcore/utils/lib/rafTrottle';
|
|
|
7
7
|
import createElement from './createElement';
|
|
8
8
|
import { eventToPoint, invert, interpolateValue, getChartDefaultColorName } from './utils';
|
|
9
9
|
/*__reshadow-styles__:"./style/dot.shadow.css"*/
|
|
10
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
11
|
-
"__SDot": "
|
|
12
|
-
"_hide": "
|
|
13
|
-
"_color": "
|
|
14
|
-
"--color": "--
|
|
15
|
-
"_transparent": "
|
|
16
|
-
"__SDots": "
|
|
17
|
-
"--duration": "--
|
|
10
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDots_1mbj9_gg_ .___SDot_1mbj9_gg_{transition-duration:var(--duration_1mbj9)}.___SDot_1mbj9_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy,x,y;transition-timing-function:ease-in-out}.___SDot_1mbj9_gg_.__hide_1mbj9_gg_{display:none}.___SDot_1mbj9_gg_.__color_1mbj9_gg_{fill:var(--color_1mbj9)}.___SDot_1mbj9_gg_.__transparent_1mbj9_gg_{opacity:.3}" /*__inner_css_end__*/, "1mbj9_gg_") /*__reshadow_css_end__*/, {
|
|
11
|
+
"__SDot": "___SDot_1mbj9_gg_",
|
|
12
|
+
"_hide": "__hide_1mbj9_gg_",
|
|
13
|
+
"_color": "__color_1mbj9_gg_",
|
|
14
|
+
"--color": "--color_1mbj9",
|
|
15
|
+
"_transparent": "__transparent_1mbj9_gg_",
|
|
16
|
+
"__SDots": "___SDots_1mbj9_gg_",
|
|
17
|
+
"--duration": "--duration_1mbj9"
|
|
18
18
|
});
|
|
19
19
|
import { PatternSymbol, getPatternSymbolSize } from './Pattern';
|
|
20
20
|
var EXCLUDE_PROPS = ['data', 'scale', 'value', 'display'];
|
package/lib/es6/HorizontalBar.js
CHANGED
|
@@ -13,16 +13,16 @@ import AnimatedClipPath from './AnimatedClipPath';
|
|
|
13
13
|
import { scaleToBand, roundedPath } from './utils';
|
|
14
14
|
import { PatternFill } from './Pattern';
|
|
15
15
|
/*__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
16
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
17
|
-
"__SBar": "
|
|
18
|
-
"--duration": "--
|
|
19
|
-
"_color": "
|
|
20
|
-
"--color": "--
|
|
21
|
-
"_pattern": "
|
|
22
|
-
"--pattern": "--
|
|
23
|
-
"_hide": "
|
|
24
|
-
"_transparent": "
|
|
25
|
-
"__SBackground": "
|
|
16
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SBar_ddimu_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_ddimu);transition-timing-function:ease-in-out}.___SBar_ddimu_gg_.__color_ddimu_gg_{fill:var(--color_ddimu)}.___SBar_ddimu_gg_.__pattern_ddimu_gg_.__color_ddimu_gg_{fill:var(--pattern_ddimu);stroke:var(--color_ddimu);stroke-width:1px}.___SBar_ddimu_gg_.__hide_ddimu_gg_{display:none}.___SBar_ddimu_gg_.__transparent_ddimu_gg_{opacity:.3}.___SBackground_ddimu_gg_{fill:var(--intergalactic-chart-palette-order-other-data, #c4c7cf)}" /*__inner_css_end__*/, "ddimu_gg_") /*__reshadow_css_end__*/, {
|
|
17
|
+
"__SBar": "___SBar_ddimu_gg_",
|
|
18
|
+
"--duration": "--duration_ddimu",
|
|
19
|
+
"_color": "__color_ddimu_gg_",
|
|
20
|
+
"--color": "--color_ddimu",
|
|
21
|
+
"_pattern": "__pattern_ddimu_gg_",
|
|
22
|
+
"--pattern": "--pattern_ddimu",
|
|
23
|
+
"_hide": "__hide_ddimu_gg_",
|
|
24
|
+
"_transparent": "__transparent_ddimu_gg_",
|
|
25
|
+
"__SBackground": "___SBackground_ddimu_gg_"
|
|
26
26
|
});
|
|
27
27
|
export var MIN_WIDTH = 2;
|
|
28
28
|
var calcPartBarX = function calcPartBarX(x, minWidth, width) {
|
package/lib/es6/Hover.js
CHANGED
|
@@ -16,9 +16,9 @@ import trottle from '@semcore/utils/lib/rafTrottle';
|
|
|
16
16
|
import createElement from './createElement';
|
|
17
17
|
import { scaleOfBandwidth, getIndexFromData, eventToPoint, invert, CONSTANT, scaleToBand } from './utils';
|
|
18
18
|
/*__reshadow-styles__:"./style/hover.shadow.css"*/
|
|
19
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
20
|
-
"__SHoverLine": "
|
|
21
|
-
"__SHoverRect": "
|
|
19
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SHoverLine_vb4rs_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SHoverRect_vb4rs_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}" /*__inner_css_end__*/, "vb4rs_gg_") /*__reshadow_css_end__*/, {
|
|
20
|
+
"__SHoverLine": "___SHoverLine_vb4rs_gg_",
|
|
21
|
+
"__SHoverRect": "___SHoverRect_vb4rs_gg_"
|
|
22
22
|
});
|
|
23
23
|
import Tooltip from './Tooltip';
|
|
24
24
|
var Hover = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Line.js
CHANGED
|
@@ -15,15 +15,15 @@ import Dots from './Dots';
|
|
|
15
15
|
import AnimatedClipPath from './AnimatedClipPath';
|
|
16
16
|
import { resolvePatternDasharray } from './Pattern';
|
|
17
17
|
/*__reshadow-styles__:"./style/line.shadow.css"*/
|
|
18
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
19
|
-
"__SLine": "
|
|
20
|
-
"--duration": "--
|
|
21
|
-
"_color": "
|
|
22
|
-
"--color": "--
|
|
23
|
-
"_hide": "
|
|
24
|
-
"_transparent": "
|
|
25
|
-
"__SNull": "
|
|
26
|
-
"__SAria": "
|
|
18
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLine_1jvat_gg_{fill:transparent;stroke-width:3;stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:d;transition-duration:var(--duration_1jvat);transition-timing-function:ease-in-out}.___SLine_1jvat_gg_.__color_1jvat_gg_{stroke:var(--color_1jvat)}.___SLine_1jvat_gg_.__hide_1jvat_gg_{display:none}.___SLine_1jvat_gg_.__transparent_1jvat_gg_{opacity:.3}.___SNull_1jvat_gg_{fill:transparent;stroke:var(--intergalactic-border-primary, #c4c7cf);stroke-dasharray:4}.___SNull_1jvat_gg_.__hide_1jvat_gg_{display:none}.___SAria_1jvat_gg_{transition-property:d;transition-duration:var(--duration_1jvat);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SAria_1jvat_gg_.__color_1jvat_gg_{fill:var(--color_1jvat)}" /*__inner_css_end__*/, "1jvat_gg_") /*__reshadow_css_end__*/, {
|
|
19
|
+
"__SLine": "___SLine_1jvat_gg_",
|
|
20
|
+
"--duration": "--duration_1jvat",
|
|
21
|
+
"_color": "__color_1jvat_gg_",
|
|
22
|
+
"--color": "--color_1jvat",
|
|
23
|
+
"_hide": "__hide_1jvat_gg_",
|
|
24
|
+
"_transparent": "__transparent_1jvat_gg_",
|
|
25
|
+
"__SNull": "___SNull_1jvat_gg_",
|
|
26
|
+
"__SAria": "___SAria_1jvat_gg_"
|
|
27
27
|
});
|
|
28
28
|
var LineRoot = /*#__PURE__*/function (_Component) {
|
|
29
29
|
_inherits(LineRoot, _Component);
|
package/lib/es6/Plot.js
CHANGED
|
@@ -18,9 +18,9 @@ import { PlotA11yModule } from './a11y/PlotA11yModule';
|
|
|
18
18
|
import { makeDataHintsHandlers, makeDataHintsContainer } from './a11y/hints';
|
|
19
19
|
import colorResolverEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
|
|
20
20
|
/*__reshadow-styles__:"./style/plot.shadow.css"*/
|
|
21
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
22
|
-
"__SPlot": "
|
|
23
|
-
"_keyboardFocused": "
|
|
21
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlot_t1igf_gg_{overflow:hidden}.___SPlot_t1igf_gg_:active,.___SPlot_t1igf_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_t1igf_gg_.__keyboardFocused_t1igf_gg_{border:1px solid var(--intergalactic-chart-palette-order-9, #008ff8);box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}" /*__inner_css_end__*/, "t1igf_gg_") /*__reshadow_css_end__*/, {
|
|
22
|
+
"__SPlot": "___SPlot_t1igf_gg_",
|
|
23
|
+
"_keyboardFocused": "__keyboardFocused_t1igf_gg_"
|
|
24
24
|
});
|
|
25
25
|
var PlotRoot = /*#__PURE__*/function (_Component) {
|
|
26
26
|
_inherits(PlotRoot, _Component);
|
package/lib/es6/Radar.js
CHANGED
|
@@ -22,25 +22,25 @@ import { CONSTANT, eventToPoint, getChartDefaultColorName, measureText } from '.
|
|
|
22
22
|
import Tooltip from './Tooltip';
|
|
23
23
|
import { PatternFill, PatternSymbol, getPatternSymbolSize } from './Pattern';
|
|
24
24
|
/*__reshadow-styles__:"./style/radar.shadow.css"*/
|
|
25
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
26
|
-
"__SAxis": "
|
|
27
|
-
"__SAxisLine": "
|
|
28
|
-
"__SAxisTick": "
|
|
29
|
-
"_active": "
|
|
30
|
-
"__SAxisLabel": "
|
|
31
|
-
"_xDirection": "
|
|
32
|
-
"--xDirection": "--
|
|
33
|
-
"_yDirection": "
|
|
34
|
-
"--yDirection": "--
|
|
35
|
-
"__SPolygon": "
|
|
36
|
-
"_color": "
|
|
37
|
-
"--color": "--
|
|
38
|
-
"_pattern": "
|
|
39
|
-
"--pattern": "--
|
|
40
|
-
"__SPolygonDot": "
|
|
41
|
-
"_transparent": "
|
|
42
|
-
"__SPolygonLine": "
|
|
43
|
-
"__SPieRect": "
|
|
25
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SAxisLine_1effz_gg_,.___SAxisTick_1effz_gg_,.___SAxis_1effz_gg_{stroke:var(--intergalactic-chart-grid-line, #e0e1e9);stroke-width:1;fill:transparent}.___SAxisLine_1effz_gg_,.___SAxisTick_1effz_gg_{stroke-dasharray:2}.___SAxisLine_1effz_gg_.__active_1effz_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___SAxisLabel_1effz_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_1effz_gg_.__xDirection_1effz_gg_{text-anchor:var(--xDirection_1effz)}.___SAxisLabel_1effz_gg_.__yDirection_1effz_gg_{dominant-baseline:var(--yDirection_1effz)}.___SPolygonDot_1effz_gg_,.___SPolygon_1effz_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPolygon_1effz_gg_{opacity:.2}.___SPolygon_1effz_gg_.__color_1effz_gg_{fill:var(--color_1effz)}.___SPolygon_1effz_gg_.__pattern_1effz_gg_.__color_1effz_gg_{fill:var(--pattern_1effz);stroke:var(--color_1effz);stroke-width:1px}.___SPolygonDot_1effz_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #ffffff);r:6px}.___SPolygonDot_1effz_gg_.__transparent_1effz_gg_{opacity:.3}.___SPolygonDot_1effz_gg_.__color_1effz_gg_{fill:var(--color_1effz)}.___SPolygonLine_1effz_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SPolygonLine_1effz_gg_.__transparent_1effz_gg_{opacity:.3}.___SPolygonLine_1effz_gg_.__color_1effz_gg_{stroke:var(--color_1effz)}.___SPieRect_1effz_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}" /*__inner_css_end__*/, "1effz_gg_") /*__reshadow_css_end__*/, {
|
|
26
|
+
"__SAxis": "___SAxis_1effz_gg_",
|
|
27
|
+
"__SAxisLine": "___SAxisLine_1effz_gg_",
|
|
28
|
+
"__SAxisTick": "___SAxisTick_1effz_gg_",
|
|
29
|
+
"_active": "__active_1effz_gg_",
|
|
30
|
+
"__SAxisLabel": "___SAxisLabel_1effz_gg_",
|
|
31
|
+
"_xDirection": "__xDirection_1effz_gg_",
|
|
32
|
+
"--xDirection": "--xDirection_1effz",
|
|
33
|
+
"_yDirection": "__yDirection_1effz_gg_",
|
|
34
|
+
"--yDirection": "--yDirection_1effz",
|
|
35
|
+
"__SPolygon": "___SPolygon_1effz_gg_",
|
|
36
|
+
"_color": "__color_1effz_gg_",
|
|
37
|
+
"--color": "--color_1effz",
|
|
38
|
+
"_pattern": "__pattern_1effz_gg_",
|
|
39
|
+
"--pattern": "--pattern_1effz",
|
|
40
|
+
"__SPolygonDot": "___SPolygonDot_1effz_gg_",
|
|
41
|
+
"_transparent": "__transparent_1effz_gg_",
|
|
42
|
+
"__SPolygonLine": "___SPolygonLine_1effz_gg_",
|
|
43
|
+
"__SPieRect": "___SPieRect_1effz_gg_"
|
|
44
44
|
});
|
|
45
45
|
var clampAngle = function clampAngle(angle) {
|
|
46
46
|
angle = angle % (2 * Math.PI);
|
package/lib/es6/RadialTree.js
CHANGED
|
@@ -21,17 +21,17 @@ import createElement from './createElement';
|
|
|
21
21
|
import { getChartDefaultColorName, measureText } from './utils';
|
|
22
22
|
import { PatternSymbol, getPatternSymbolSize } from './Pattern';
|
|
23
23
|
/*__reshadow-styles__:"./style/radial-tree.shadow.css"*/
|
|
24
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
25
|
-
"__SRadian": "
|
|
26
|
-
"__SLine": "
|
|
27
|
-
"_color": "
|
|
28
|
-
"--color": "--
|
|
29
|
-
"_transparent": "
|
|
30
|
-
"__SCap": "
|
|
31
|
-
"_pattern": "
|
|
32
|
-
"__SIcon": "
|
|
33
|
-
"__SLabel": "
|
|
34
|
-
"__SLineCap": "
|
|
24
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SRadian_15cl5_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info, #008ff8)}.___SLine_15cl5_gg_{stroke:var(--intergalactic-text-large-info, #008ff8)}.___SLine_15cl5_gg_.__color_15cl5_gg_{stroke:var(--color_15cl5)}.___SLine_15cl5_gg_.__transparent_15cl5_gg_{opacity:.3}.___SCap_15cl5_gg_{transition:r .1s}.___SCap_15cl5_gg_.__pattern_15cl5_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:1px}.___SCap_15cl5_gg_.__transparent_15cl5_gg_,.___SIcon_15cl5_gg_.__transparent_15cl5_gg_,.___SLabel_15cl5_gg_.__transparent_15cl5_gg_{opacity:.3}.___SLabel_15cl5_gg_{fill:var(--color_15cl5)}@media (hover:hover){.___SRadian_15cl5_gg_:hover .___SLabel_15cl5_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_15cl5_gg_{transition:none}}" /*__inner_css_end__*/, "15cl5_gg_") /*__reshadow_css_end__*/, {
|
|
25
|
+
"__SRadian": "___SRadian_15cl5_gg_",
|
|
26
|
+
"__SLine": "___SLine_15cl5_gg_",
|
|
27
|
+
"_color": "__color_15cl5_gg_",
|
|
28
|
+
"--color": "--color_15cl5",
|
|
29
|
+
"_transparent": "__transparent_15cl5_gg_",
|
|
30
|
+
"__SCap": "___SCap_15cl5_gg_",
|
|
31
|
+
"_pattern": "__pattern_15cl5_gg_",
|
|
32
|
+
"__SIcon": "___SIcon_15cl5_gg_",
|
|
33
|
+
"__SLabel": "___SLabel_15cl5_gg_",
|
|
34
|
+
"__SLineCap": "___SLineCap_15cl5_gg_"
|
|
35
35
|
});
|
|
36
36
|
var baseAngle = -Math.PI / 2; // The top vertical line
|
|
37
37
|
var RadialTreeBase = /*#__PURE__*/function (_Component) {
|
package/lib/es6/ReferenceLine.js
CHANGED
|
@@ -11,15 +11,15 @@ import { Component, sstyled } from '@semcore/core';
|
|
|
11
11
|
import createElement from './createElement';
|
|
12
12
|
import { scaleOfBandwidth } from './utils';
|
|
13
13
|
/*__reshadow-styles__:"./style/reference-line.shadow.css"*/
|
|
14
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
15
|
-
"__SReferenceLine": "
|
|
16
|
-
"__STitle": "
|
|
17
|
-
"--transform-origin": "--transform-
|
|
18
|
-
"_position_top": "
|
|
19
|
-
"_position_bottom": "
|
|
20
|
-
"_position_right": "
|
|
21
|
-
"_position_left": "
|
|
22
|
-
"__SBackground": "
|
|
14
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SReferenceLine_19o5o_gg_{fill:none;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___STitle_19o5o_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79);transform-origin:var(--transform-origin_19o5o)}.___STitle_19o5o_gg_._position_top_19o5o_gg_{text-anchor:middle}.___STitle_19o5o_gg_._position_bottom_19o5o_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_19o5o_gg_._position_left_19o5o_gg_,.___STitle_19o5o_gg_._position_right_19o5o_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___SBackground_19o5o_gg_{fill:var(--intergalactic-chart-grid-period-bg, rgba(196, 199, 207, 0.2))}" /*__inner_css_end__*/, "19o5o_gg_") /*__reshadow_css_end__*/, {
|
|
15
|
+
"__SReferenceLine": "___SReferenceLine_19o5o_gg_",
|
|
16
|
+
"__STitle": "___STitle_19o5o_gg_",
|
|
17
|
+
"--transform-origin": "--transform-origin_19o5o",
|
|
18
|
+
"_position_top": "_position_top_19o5o_gg_",
|
|
19
|
+
"_position_bottom": "_position_bottom_19o5o_gg_",
|
|
20
|
+
"_position_right": "_position_right_19o5o_gg_",
|
|
21
|
+
"_position_left": "_position_left_19o5o_gg_",
|
|
22
|
+
"__SBackground": "___SBackground_19o5o_gg_"
|
|
23
23
|
});
|
|
24
24
|
var side2direction = {
|
|
25
25
|
left: 'vertical',
|
package/lib/es6/ScatterPlot.js
CHANGED
|
@@ -18,15 +18,15 @@ import { CONSTANT, getScatterPlotRadius } from './utils';
|
|
|
18
18
|
import Tooltip from './Tooltip';
|
|
19
19
|
import { PatternFill } from './Pattern';
|
|
20
20
|
/*__reshadow-styles__:"./style/scatterplot.shadow.css"*/
|
|
21
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
22
|
-
"__SScatterPlot": "
|
|
23
|
-
"_color": "
|
|
24
|
-
"--color": "--
|
|
25
|
-
"_pattern": "
|
|
26
|
-
"--pattern": "--
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"__SValue": "
|
|
29
|
-
"--duration": "--
|
|
21
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SScatterPlot_qouhj_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy;transition-duration:var(--duration_qouhj);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_qouhj_gg_:hover{opacity:.8}}.___SScatterPlot_qouhj_gg_.__color_qouhj_gg_{fill:var(--color_qouhj)}.___SScatterPlot_qouhj_gg_.__pattern_qouhj_gg_.__color_qouhj_gg_{fill:var(--pattern_qouhj);stroke:var(--color_qouhj);stroke-width:1px}.___SScatterPlot_qouhj_gg_.__transparent_qouhj_gg_{opacity:.3}.___SValue_qouhj_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50, 10px);stroke:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SValue_qouhj_gg_.__color_qouhj_gg_{stroke:var(--color_qouhj)}.___SValue_qouhj_gg_.__transparent_qouhj_gg_{opacity:.3}" /*__inner_css_end__*/, "qouhj_gg_") /*__reshadow_css_end__*/, {
|
|
22
|
+
"__SScatterPlot": "___SScatterPlot_qouhj_gg_",
|
|
23
|
+
"_color": "__color_qouhj_gg_",
|
|
24
|
+
"--color": "--color_qouhj",
|
|
25
|
+
"_pattern": "__pattern_qouhj_gg_",
|
|
26
|
+
"--pattern": "--pattern_qouhj",
|
|
27
|
+
"_transparent": "__transparent_qouhj_gg_",
|
|
28
|
+
"__SValue": "___SValue_qouhj_gg_",
|
|
29
|
+
"--duration": "--duration_qouhj"
|
|
30
30
|
});
|
|
31
31
|
var ScatterPlotRoot = /*#__PURE__*/function (_Component) {
|
|
32
32
|
_inherits(ScatterPlotRoot, _Component);
|
package/lib/es6/Tooltip.js
CHANGED
|
@@ -21,15 +21,15 @@ import createElement from './createElement';
|
|
|
21
21
|
import { CONSTANT, getChartDefaultColorName } from './utils';
|
|
22
22
|
import { useColorResolver } from '@semcore/utils/lib/use/useColorResolver';
|
|
23
23
|
/*__reshadow-styles__:"./style/tooltip.shadow.css"*/
|
|
24
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
25
|
-
"__STooltip": "
|
|
26
|
-
"__STitle": "
|
|
27
|
-
"__SDotGroup": "
|
|
28
|
-
"__SDot": "
|
|
29
|
-
"__SDotCircle": "
|
|
30
|
-
"_color": "
|
|
31
|
-
"--color": "--
|
|
32
|
-
"__SFooter": "
|
|
24
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___STooltip_1kxje_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:var(--intergalactic-popper-rounded, 6px);border:1px solid var(--intergalactic-border-secondary, #e0e1e9);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));padding:var(--intergalactic-spacing-3x, 12px)}.___STitle_1kxje_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SDotGroup_1kxje_gg_{display:flex;align-items:center}.___SDot_1kxje_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDotCircle_1kxje_gg_.__color_1kxje_gg_{background-color:var(--color_1kxje);width:8px;height:8px;border-radius:50%}.___SFooter_1kxje_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9);padding:var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);border-radius:0 0 var(--intergalactic-rounded-medium, 6px) var(--intergalactic-rounded-medium, 6px);margin:var(--intergalactic-spacing-3x, 12px) calc(-1*var(--intergalactic-spacing-3x, 12px)) calc(-1*var(--intergalactic-spacing-3x, 12px))}" /*__inner_css_end__*/, "1kxje_gg_") /*__reshadow_css_end__*/, {
|
|
25
|
+
"__STooltip": "___STooltip_1kxje_gg_",
|
|
26
|
+
"__STitle": "___STitle_1kxje_gg_",
|
|
27
|
+
"__SDotGroup": "___SDotGroup_1kxje_gg_",
|
|
28
|
+
"__SDot": "___SDot_1kxje_gg_",
|
|
29
|
+
"__SDotCircle": "___SDotCircle_1kxje_gg_",
|
|
30
|
+
"_color": "__color_1kxje_gg_",
|
|
31
|
+
"--color": "--color_1kxje",
|
|
32
|
+
"__SFooter": "___SFooter_1kxje_gg_"
|
|
33
33
|
});
|
|
34
34
|
import { PatternSymbol } from './Pattern';
|
|
35
35
|
|
package/lib/es6/Venn.js
CHANGED
|
@@ -20,15 +20,15 @@ import Tooltip from './Tooltip';
|
|
|
20
20
|
import { PatternFill } from './Pattern';
|
|
21
21
|
import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
|
|
22
22
|
/*__reshadow-styles__:"./style/venn.shadow.css"*/
|
|
23
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
24
|
-
"__SCircle": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"--color": "--
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"__SIntersection": "
|
|
29
|
-
"--duration": "--
|
|
30
|
-
"_pattern": "
|
|
31
|
-
"--pattern": "--
|
|
23
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCircle_4s19m_gg_,.___SIntersection_4s19m_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px}.___SCircle_4s19m_gg_{fill:var(--intergalactic-chart-palette-order-2, #59ddaa);fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_4s19m);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_4s19m_gg_:hover{fill-opacity:.7}}.___SCircle_4s19m_gg_.__color_4s19m_gg_{fill:var(--color_4s19m)}.___SCircle_4s19m_gg_.__pattern_4s19m_gg_.__color_4s19m_gg_{fill:var(--pattern_4s19m);fill-opacity:.7;stroke:var(--color_4s19m);stroke-width:1px}@media (hover:hover){.___SCircle_4s19m_gg_.__pattern_4s19m_gg_.__color_4s19m_gg_:hover{fill-opacity:.85}}.___SCircle_4s19m_gg_.__transparent_4s19m_gg_{opacity:.3}.___SIntersection_4s19m_gg_{fill-opacity:0}@media (hover:hover){.___SIntersection_4s19m_gg_:hover{fill-opacity:.1}}.___SIntersection_4s19m_gg_.__transparent_4s19m_gg_{opacity:.3}" /*__inner_css_end__*/, "4s19m_gg_") /*__reshadow_css_end__*/, {
|
|
24
|
+
"__SCircle": "___SCircle_4s19m_gg_",
|
|
25
|
+
"_color": "__color_4s19m_gg_",
|
|
26
|
+
"--color": "--color_4s19m",
|
|
27
|
+
"_transparent": "__transparent_4s19m_gg_",
|
|
28
|
+
"__SIntersection": "___SIntersection_4s19m_gg_",
|
|
29
|
+
"--duration": "--duration_4s19m",
|
|
30
|
+
"_pattern": "__pattern_4s19m_gg_",
|
|
31
|
+
"--pattern": "--pattern_4s19m"
|
|
32
32
|
});
|
|
33
33
|
var VennRoot = /*#__PURE__*/function (_Component) {
|
|
34
34
|
_inherits(VennRoot, _Component);
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
|
|
4
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { defaultValueFormatter } from './serialize';
|
|
7
|
+
export var DataAccessibilityTable = function DataAccessibilityTable(_ref) {
|
|
8
|
+
var id = _ref.id,
|
|
9
|
+
dataTableRef = _ref.dataTableRef,
|
|
10
|
+
data = _ref.data,
|
|
11
|
+
hints = _ref.hints,
|
|
12
|
+
config = _ref.config,
|
|
13
|
+
intl = _ref.intl;
|
|
14
|
+
var keys = React.useMemo(function () {
|
|
15
|
+
var _fromHints, _fromHints2, _fromHints3, _fromHints4, _fromHints5;
|
|
16
|
+
var fromHints = [];
|
|
17
|
+
(_fromHints = fromHints).push.apply(_fromHints, _toConsumableArray(hints.fields.verticalAxes));
|
|
18
|
+
(_fromHints2 = fromHints).push.apply(_fromHints2, _toConsumableArray(hints.fields.horizontalAxes));
|
|
19
|
+
(_fromHints3 = fromHints).push.apply(_fromHints3, _toConsumableArray(hints.fields.valueAxes));
|
|
20
|
+
(_fromHints4 = fromHints).push.apply(_fromHints4, _toConsumableArray(config.additionalFields));
|
|
21
|
+
(_fromHints5 = fromHints).push.apply(_fromHints5, _toConsumableArray(Object.keys(hints.fields.values)));
|
|
22
|
+
fromHints = _toConsumableArray(new Set(fromHints)).filter(function (key) {
|
|
23
|
+
return key in data[0];
|
|
24
|
+
});
|
|
25
|
+
if (fromHints.length === 0) {
|
|
26
|
+
data.forEach(function (row) {
|
|
27
|
+
var _fromHints6;
|
|
28
|
+
return (_fromHints6 = fromHints).push.apply(_fromHints6, _toConsumableArray(Object.keys(row)));
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return _toConsumableArray(new Set(fromHints));
|
|
32
|
+
}, [data, hints]);
|
|
33
|
+
var duplicatedBaseKeys = React.useMemo(function () {
|
|
34
|
+
var baseKeys = keys.filter(function (key) {
|
|
35
|
+
return !hints.titles.valuesAxes[key];
|
|
36
|
+
}).map(function (key) {
|
|
37
|
+
if (hints.fields.verticalAxes.has(key) && hints.axesTitle.vertical) return [key, hints.axesTitle.vertical];
|
|
38
|
+
if (hints.fields.horizontalAxes.has(key) && hints.axesTitle.horizontal) return [key, hints.axesTitle.horizontal];
|
|
39
|
+
}).filter(function (entry) {
|
|
40
|
+
return entry !== undefined;
|
|
41
|
+
}).map(function (entry) {
|
|
42
|
+
return entry;
|
|
43
|
+
});
|
|
44
|
+
var doublicated = {};
|
|
45
|
+
var handled = {};
|
|
46
|
+
var _iterator = _createForOfIteratorHelper(baseKeys),
|
|
47
|
+
_step;
|
|
48
|
+
try {
|
|
49
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
50
|
+
var _step$value = _slicedToArray(_step.value, 2),
|
|
51
|
+
key = _step$value[0],
|
|
52
|
+
label = _step$value[1];
|
|
53
|
+
if (handled[label]) {
|
|
54
|
+
doublicated[key] = true;
|
|
55
|
+
doublicated[handled[label]] = true;
|
|
56
|
+
}
|
|
57
|
+
handled[label] = key;
|
|
58
|
+
}
|
|
59
|
+
} catch (err) {
|
|
60
|
+
_iterator.e(err);
|
|
61
|
+
} finally {
|
|
62
|
+
_iterator.f();
|
|
63
|
+
}
|
|
64
|
+
return doublicated;
|
|
65
|
+
}, [keys, hints]);
|
|
66
|
+
var renderTitle = React.useCallback(function (dataKey) {
|
|
67
|
+
var _config$titlesFormatt;
|
|
68
|
+
var formatted = (_config$titlesFormatt = config.titlesFormatter) === null || _config$titlesFormatt === void 0 ? void 0 : _config$titlesFormatt.call(config, dataKey);
|
|
69
|
+
if (formatted !== undefined) return formatted;
|
|
70
|
+
if (hints.titles.valuesAxes[dataKey]) return hints.titles.valuesAxes[dataKey];
|
|
71
|
+
if (!duplicatedBaseKeys[dataKey]) {
|
|
72
|
+
if (hints.fields.verticalAxes.has(dataKey) && hints.axesTitle.vertical) return hints.axesTitle.vertical;
|
|
73
|
+
if (hints.fields.horizontalAxes.has(dataKey) && hints.axesTitle.horizontal) return hints.axesTitle.horizontal;
|
|
74
|
+
}
|
|
75
|
+
return dataKey;
|
|
76
|
+
}, [data, hints, duplicatedBaseKeys, config]);
|
|
77
|
+
var formatValue = React.useCallback(function (value, row) {
|
|
78
|
+
var _config$valuesFormatt, _config$valuesFormatt2;
|
|
79
|
+
return (_config$valuesFormatt = (_config$valuesFormatt2 = config.valuesFormatter) === null || _config$valuesFormatt2 === void 0 ? void 0 : _config$valuesFormatt2.call(config, value, row)) !== null && _config$valuesFormatt !== void 0 ? _config$valuesFormatt : defaultValueFormatter(intl, value);
|
|
80
|
+
}, [intl, config]);
|
|
81
|
+
return /*#__PURE__*/React.createElement("table", {
|
|
82
|
+
id: "".concat(id, "-data-table"),
|
|
83
|
+
tabIndex: 0,
|
|
84
|
+
ref: dataTableRef
|
|
85
|
+
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, keys.map(function (key, index) {
|
|
86
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
87
|
+
key: "".concat(key, "-").concat(index)
|
|
88
|
+
}, renderTitle(key));
|
|
89
|
+
}))), /*#__PURE__*/React.createElement("tbody", null, data.map(function (row, index) {
|
|
90
|
+
var key = "".concat(Object.values(row).filter(function (item) {
|
|
91
|
+
return _typeof(item) !== 'symbol';
|
|
92
|
+
}).join('-'), "-").concat(index);
|
|
93
|
+
var cells = keys.map(function (key) {
|
|
94
|
+
return _typeof(row[key]) !== 'symbol' ? [key, row[key]] : [key, ''];
|
|
95
|
+
});
|
|
96
|
+
return /*#__PURE__*/React.createElement("tr", {
|
|
97
|
+
key: key
|
|
98
|
+
}, cells.map(function (_ref2, index) {
|
|
99
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
100
|
+
key = _ref3[0],
|
|
101
|
+
value = _ref3[1];
|
|
102
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
103
|
+
key: "".concat(key, "-").concat(index)
|
|
104
|
+
}, formatValue(value, keys[index]));
|
|
105
|
+
}));
|
|
106
|
+
})));
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=DataAccessibilityTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataAccessibilityTable.js","names":["React","defaultValueFormatter","DataAccessibilityTable","_ref","id","dataTableRef","data","hints","config","intl","keys","useMemo","_fromHints","_fromHints2","_fromHints3","_fromHints4","_fromHints5","fromHints","push","apply","_toConsumableArray","fields","verticalAxes","horizontalAxes","valueAxes","additionalFields","Object","values","Set","filter","key","length","forEach","row","_fromHints6","duplicatedBaseKeys","baseKeys","titles","valuesAxes","map","has","axesTitle","vertical","horizontal","entry","undefined","doublicated","handled","_iterator","_createForOfIteratorHelper","_step","s","n","done","_step$value","_slicedToArray","value","label","err","e","f","renderTitle","useCallback","dataKey","_config$titlesFormatt","formatted","titlesFormatter","call","formatValue","_config$valuesFormatt","_config$valuesFormatt2","valuesFormatter","createElement","concat","tabIndex","ref","index","item","_typeof","join","cells","_ref2","_ref3"],"sources":["../../../src/a11y/DataAccessibilityTable.tsx"],"sourcesContent":["import React from 'react';\nimport { DataStructureHints, DataSummarizationConfig } from './hints';\nimport { Intl } from './intl';\nimport { defaultValueFormatter } from './serialize';\n\nexport const DataAccessibilityTable: React.FC<{\n id: string;\n dataTableRef: React.RefObject<HTMLTableElement>;\n data: Record<string | number, unknown>[];\n hints: DataStructureHints;\n config: DataSummarizationConfig;\n intl: Intl;\n}> = ({ id, dataTableRef, data, hints, config, intl }) => {\n const keys = React.useMemo(() => {\n let fromHints: (string | number)[] = [];\n fromHints.push(...hints.fields.verticalAxes);\n fromHints.push(...hints.fields.horizontalAxes);\n fromHints.push(...hints.fields.valueAxes);\n fromHints.push(...config.additionalFields);\n fromHints.push(...Object.keys(hints.fields.values));\n\n fromHints = [...new Set(fromHints)].filter((key) => key in data[0]);\n\n if (fromHints.length === 0) {\n data.forEach((row) => fromHints.push(...Object.keys(row)));\n }\n\n return [...new Set(fromHints)];\n }, [data, hints]);\n const duplicatedBaseKeys = React.useMemo(() => {\n const baseKeys = keys\n .filter((key) => !hints.titles.valuesAxes[key])\n .map((key) => {\n if (hints.fields.verticalAxes.has(key) && hints.axesTitle.vertical)\n return [key, hints.axesTitle.vertical];\n if (hints.fields.horizontalAxes.has(key) && hints.axesTitle.horizontal)\n return [key, hints.axesTitle.horizontal];\n })\n .filter((entry) => entry !== undefined)\n .map((entry) => entry!);\n const doublicated: Record<string, true> = {};\n const handled: Record<string, string | number> = {};\n for (const [key, label] of baseKeys) {\n if (handled[label]) {\n doublicated[key] = true;\n doublicated[handled[label]] = true;\n }\n handled[label] = key;\n }\n return doublicated;\n }, [keys, hints]);\n const renderTitle = React.useCallback(\n (dataKey: string | number) => {\n const formatted = config.titlesFormatter?.(dataKey);\n if (formatted !== undefined) return formatted;\n if (hints.titles.valuesAxes[dataKey]) return hints.titles.valuesAxes[dataKey];\n if (!duplicatedBaseKeys[dataKey]) {\n if (hints.fields.verticalAxes.has(dataKey) && hints.axesTitle.vertical)\n return hints.axesTitle.vertical;\n if (hints.fields.horizontalAxes.has(dataKey) && hints.axesTitle.horizontal)\n return hints.axesTitle.horizontal;\n }\n\n return dataKey;\n },\n [data, hints, duplicatedBaseKeys, config],\n );\n const formatValue = React.useCallback(\n (value: unknown, row: string) => {\n return config.valuesFormatter?.(value, row) ?? defaultValueFormatter(intl, value);\n },\n [intl, config],\n );\n\n return (\n <table id={`${id}-data-table`} tabIndex={0} ref={dataTableRef}>\n <thead>\n <tr>\n {keys.map((key, index) => (\n <th key={`${key}-${index}`}>{renderTitle(key)}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {data.map((row, index) => {\n const key = `${Object.values(row)\n .filter((item) => typeof item !== 'symbol')\n .join('-')}-${index}`;\n const cells = keys.map((key) =>\n typeof row[key] !== 'symbol' ? [key, row[key]] : [key, ''],\n );\n\n return (\n <tr key={key}>\n {cells.map(([key, value], index) => (\n <td key={`${key}-${index}`}>{formatValue(value, keys[index] as string)}</td>\n ))}\n </tr>\n );\n })}\n </tbody>\n </table>\n );\n};\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAASC,qBAAqB,QAAQ,aAAa;AAEnD,OAAO,IAAMC,sBAOX,GAAG,SAPQA,sBAOXA,CAAAC,IAAA,EAAwD;EAAA,IAAlDC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IAAEC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAEC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IAAEC,MAAM,GAAAL,IAAA,CAANK,MAAM;IAAEC,IAAI,GAAAN,IAAA,CAAJM,IAAI;EACjD,IAAMC,IAAI,GAAGV,KAAK,CAACW,OAAO,CAAC,YAAM;IAAA,IAAAC,UAAA,EAAAC,WAAA,EAAAC,WAAA,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AMI,KAAK,GAAGtE,IAAI,CAAC6B,GAAG,CAAC,UAACT,GAAG;MAAA,OACzBgD,OAAA,CAAO7C,GAAG,CAACH,GAAG,CAAC,MAAK,QAAQ,GAAG,CAACA,GAAG,EAAEG,GAAG,CAACH,GAAG,CAAC,CAAC,GAAG,CAACA,GAAG,EAAE,EAAE,CAAC;IAAA,EAC3D;IAED,oBACE9B,KAAA,CAAAwE,aAAA;MAAI1C,GAAG,EAAEA;IAAI,GACVkD,KAAK,CAACzC,GAAG,CAAC,UAAA0C,KAAA,EAAeL,KAAK;MAAA,IAAAM,KAAA,GAAA3B,cAAA,CAAA0B,KAAA;QAAlBnD,GAAG,GAAAoD,KAAA;QAAE1B,KAAK,GAAA0B,KAAA;MAAA,oBACrBlF,KAAA,CAAAwE,aAAA;QAAI1C,GAAG,KAAA2C,MAAA,CAAK3C,GAAG,OAAA2C,MAAA,CAAIG,KAAK;MAAG,GAAER,WAAW,CAACZ,KAAK,EAAE9C,IAAI,CAACkE,KAAK,CAAC,CAAW,CAAM;IAAA,CAC7E,CAAC,CACC;EAET,CAAC,CAAC,CACI,CACF;AAEZ,CAAC"}
|
|
@@ -10,8 +10,8 @@ import { normalizeLocale } from './locale';
|
|
|
10
10
|
import { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';
|
|
11
11
|
import { Root, sstyled } from '@semcore/core';
|
|
12
12
|
/*__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
|
|
13
|
-
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
14
|
-
"__SPlotA11yModule": "
|
|
13
|
+
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yModule_1m35e_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1m35e_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}" /*__inner_css_end__*/, "1m35e_gg_") /*__reshadow_css_end__*/, {
|
|
14
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1m35e_gg_"
|
|
15
15
|
});
|
|
16
16
|
import { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';
|
|
17
17
|
import { Box } from '@semcore/flex-box';
|