@semcore/d3-chart 17.0.0-prerelease.9 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -1
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +16 -16
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +20 -15
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +16 -16
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +8 -8
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +2 -2
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/Reference.js +12 -12
- 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/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +7 -7
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +9 -21
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +197 -57
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.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/style/bubble.shadow.css +4 -0
- package/lib/cjs/utils.js +3 -2
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +16 -16
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +20 -15
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +16 -16
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +8 -8
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +2 -2
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/Reference.js +12 -12
- 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/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +6 -5
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +9 -21
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +199 -59
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.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/style/bubble.shadow.css +4 -0
- package/lib/es6/utils.js +3 -2
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +1 -1
- package/lib/esm/Area.mjs +14 -14
- package/lib/esm/Axis.mjs +21 -23
- package/lib/esm/Bar.mjs +18 -18
- package/lib/esm/Bubble.mjs +24 -20
- package/lib/esm/CompactHorizontalBar.mjs +21 -20
- package/lib/esm/Donut.mjs +15 -13
- package/lib/esm/Dots.mjs +10 -10
- package/lib/esm/HorizontalBar.mjs +18 -18
- package/lib/esm/Hover.mjs +6 -6
- package/lib/esm/Line.mjs +12 -12
- package/lib/esm/Pattern.mjs +6 -7
- package/lib/esm/Plot.mjs +6 -7
- package/lib/esm/Radar.mjs +27 -29
- package/lib/esm/RadialTree.mjs +30 -75
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ResponsiveContainer.mjs +3 -5
- package/lib/esm/ScatterPlot.mjs +12 -11
- package/lib/esm/StackBar.mjs +2 -2
- package/lib/esm/StackedArea.mjs +2 -2
- package/lib/esm/Tooltip.mjs +15 -17
- package/lib/esm/Venn.mjs +13 -12
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -4
- package/lib/esm/a11y/PlotA11yModule.mjs +5 -4
- package/lib/esm/a11y/PlotA11yView.mjs +14 -21
- package/lib/esm/a11y/focus.mjs +2 -2
- package/lib/esm/a11y/hints.mjs +3 -3
- package/lib/esm/a11y/insights.mjs +15 -20
- package/lib/esm/a11y/intl.mjs +1 -1
- package/lib/esm/a11y/locale.mjs +1 -2
- package/lib/esm/a11y/serialize.mjs +17 -17
- package/lib/esm/component/Chart/AbstractChart.mjs +25 -38
- package/lib/esm/component/Chart/AreaChart.mjs +5 -4
- package/lib/esm/component/Chart/BarChart.mjs +4 -3
- package/lib/esm/component/Chart/BubbleChart.mjs +8 -8
- package/lib/esm/component/Chart/CigaretteChart.mjs +204 -64
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +2 -1
- package/lib/esm/component/Chart/DonutChart.mjs +3 -2
- package/lib/esm/component/Chart/HistogramChart.mjs +5 -4
- package/lib/esm/component/Chart/LineChart.mjs +5 -4
- package/lib/esm/component/Chart/RadarChart.mjs +4 -5
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +3 -2
- package/lib/esm/component/Chart/VennChart.mjs +3 -3
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +9 -14
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +6 -6
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +19 -19
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +9 -10
- package/lib/esm/component/ChartLegend/index.mjs +2 -0
- package/lib/esm/component/Cigarette/Cigarette.mjs +1 -2
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +2 -3
- package/lib/esm/createElement.mjs +1 -1
- package/lib/esm/index.mjs +1 -0
- package/lib/esm/style/bubble.shadow.css +4 -0
- package/lib/esm/utils.mjs +3 -3
- package/lib/types/a11y/PlotA11yView.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.d.ts +4 -7
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +7 -4
- package/package.json +17 -17
package/lib/es6/Hover.js
CHANGED
|
@@ -9,11 +9,11 @@ import trottle from '@semcore/core/lib/utils/rafTrottle';
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import createElement from './createElement';
|
|
11
11
|
/*!__reshadow-styles__:"./style/hover.shadow.css"*/
|
|
12
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
12
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SHoverLine_1hwe4_gg_,.___SHoverLine_1hwe4_gg_:focus-visible{outline:0;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SHoverRect_1hwe4_gg_,.___SHoverRect_1hwe4_gg_:focus-visible{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}", /*__inner_css_end__*/"1hwe4_gg_"),
|
|
13
13
|
/*__reshadow_css_end__*/
|
|
14
14
|
{
|
|
15
|
-
"__SHoverLine": "
|
|
16
|
-
"__SHoverRect": "
|
|
15
|
+
"__SHoverLine": "___SHoverLine_1hwe4_gg_",
|
|
16
|
+
"__SHoverRect": "___SHoverRect_1hwe4_gg_"
|
|
17
17
|
});
|
|
18
18
|
import Tooltip from './Tooltip';
|
|
19
19
|
import { scaleOfBandwidth, getIndexFromData, eventToPoint, invert, scaleToBand } from './utils';
|
package/lib/es6/Line.js
CHANGED
|
@@ -10,17 +10,17 @@ import createElement from './createElement';
|
|
|
10
10
|
import Dots from './Dots';
|
|
11
11
|
import { resolvePatternDasharray } from './Pattern';
|
|
12
12
|
/*!__reshadow-styles__:"./style/line.shadow.css"*/
|
|
13
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
13
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLine_1r87s_gg_{fill:transparent;stroke-width:3;stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:d;transition-duration:var(--duration_1r87s);transition-timing-function:ease-in-out}.___SLine_1r87s_gg_.__color_1r87s_gg_{stroke:var(--color_1r87s)}.___SLine_1r87s_gg_.__hide_1r87s_gg_{display:none}.___SLine_1r87s_gg_.__transparent_1r87s_gg_{opacity:.3}.___SNull_1r87s_gg_{fill:transparent;stroke:var(--intergalactic-border-primary, #c4c7cf);stroke-dasharray:4}.___SNull_1r87s_gg_.__hide_1r87s_gg_{display:none}.___SLineArea_1r87s_gg_{transition-property:d;transition-duration:var(--duration_1r87s);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLineArea_1r87s_gg_.__color_1r87s_gg_{fill:var(--color_1r87s)}", /*__inner_css_end__*/"1r87s_gg_"),
|
|
14
14
|
/*__reshadow_css_end__*/
|
|
15
15
|
{
|
|
16
|
-
"__SLine": "
|
|
17
|
-
"--duration": "--
|
|
18
|
-
"_color": "
|
|
19
|
-
"--color": "--
|
|
20
|
-
"_hide": "
|
|
21
|
-
"_transparent": "
|
|
22
|
-
"__SNull": "
|
|
23
|
-
"__SLineArea": "
|
|
16
|
+
"__SLine": "___SLine_1r87s_gg_",
|
|
17
|
+
"--duration": "--duration_1r87s",
|
|
18
|
+
"_color": "__color_1r87s_gg_",
|
|
19
|
+
"--color": "--color_1r87s",
|
|
20
|
+
"_hide": "__hide_1r87s_gg_",
|
|
21
|
+
"_transparent": "__transparent_1r87s_gg_",
|
|
22
|
+
"__SNull": "___SNull_1r87s_gg_",
|
|
23
|
+
"__SLineArea": "___SLineArea_1r87s_gg_"
|
|
24
24
|
});
|
|
25
25
|
import { definedData, definedNullData, scaleOfBandwidth, getNullData, interpolateValue, getChartDefaultColorName, eventToPoint, invert } from './utils';
|
|
26
26
|
class LineRoot extends Component {
|
package/lib/es6/Plot.js
CHANGED
|
@@ -10,10 +10,10 @@ import React from 'react';
|
|
|
10
10
|
import { makeDataHintsHandlers, makeDataHintsContainer } from './a11y/hints';
|
|
11
11
|
import { PlotA11yModule } from './a11y/PlotA11yModule';
|
|
12
12
|
/*!__reshadow-styles__:"./style/plot.shadow.css"*/
|
|
13
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
13
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlot_l2at0_gg_{overflow:hidden}.___SPlot_l2at0_gg_:focus{outline:0}.___SPlot_l2at0_gg_:active{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_l2at0_gg_:has(foreignObject[data-aria-only]:focus-within){outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;border-radius:var(--intergalactic-surface-rounded, 6px)}", /*__inner_css_end__*/"l2at0_gg_"),
|
|
14
14
|
/*__reshadow_css_end__*/
|
|
15
15
|
{
|
|
16
|
-
"__SPlot": "
|
|
16
|
+
"__SPlot": "___SPlot_l2at0_gg_"
|
|
17
17
|
});
|
|
18
18
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
19
19
|
import { eventToPoint, uniqueId } from './utils';
|
package/lib/es6/Radar.js
CHANGED
|
@@ -12,27 +12,27 @@ import React, { cloneElement } from 'react';
|
|
|
12
12
|
import createElement from './createElement';
|
|
13
13
|
import { PatternFill, PatternSymbol, getPatternSymbolSize } from './Pattern';
|
|
14
14
|
/*!__reshadow-styles__:"./style/radar.shadow.css"*/
|
|
15
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
15
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SAxisLine_rgkom_gg_,.___SAxisTick_rgkom_gg_,.___SAxis_rgkom_gg_{stroke:var(--intergalactic-chart-grid-line, #e0e1e9);stroke-width:1;fill:transparent}.___SAxisLine_rgkom_gg_,.___SAxisTick_rgkom_gg_{stroke-dasharray:2}.___SAxisLine_rgkom_gg_.__active_rgkom_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___SAxisLabel_rgkom_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_rgkom_gg_.__xDirection_rgkom_gg_{text-anchor:var(--xDirection_rgkom)}.___SAxisLabel_rgkom_gg_.__yDirection_rgkom_gg_{dominant-baseline:var(--yDirection_rgkom)}.___SPolygonDot_rgkom_gg_,.___SPolygon_rgkom_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPolygon_rgkom_gg_{opacity:.2}.___SPolygon_rgkom_gg_.__color_rgkom_gg_{fill:var(--color_rgkom)}.___SPolygon_rgkom_gg_.__pattern_rgkom_gg_.__color_rgkom_gg_{fill:var(--pattern_rgkom);stroke:var(--color_rgkom);stroke-width:1px}.___SPolygonDot_rgkom_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #ffffff);r:6px}.___SPolygonDot_rgkom_gg_.__transparent_rgkom_gg_{opacity:.3}.___SPolygonDot_rgkom_gg_.__color_rgkom_gg_{fill:var(--color_rgkom)}.___SPolygonLine_rgkom_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SPolygonLine_rgkom_gg_.__transparent_rgkom_gg_{opacity:.3}.___SPolygonLine_rgkom_gg_.__color_rgkom_gg_{stroke:var(--color_rgkom)}.___SPieRect_rgkom_gg_{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}", /*__inner_css_end__*/"rgkom_gg_"),
|
|
16
16
|
/*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SAxis": "
|
|
19
|
-
"__SAxisLine": "
|
|
20
|
-
"__SAxisTick": "
|
|
21
|
-
"_active": "
|
|
22
|
-
"__SAxisLabel": "
|
|
23
|
-
"_xDirection": "
|
|
24
|
-
"--xDirection": "--
|
|
25
|
-
"_yDirection": "
|
|
26
|
-
"--yDirection": "--
|
|
27
|
-
"__SPolygon": "
|
|
28
|
-
"_color": "
|
|
29
|
-
"--color": "--
|
|
30
|
-
"_pattern": "
|
|
31
|
-
"--pattern": "--
|
|
32
|
-
"__SPolygonDot": "
|
|
33
|
-
"_transparent": "
|
|
34
|
-
"__SPolygonLine": "
|
|
35
|
-
"__SPieRect": "
|
|
18
|
+
"__SAxis": "___SAxis_rgkom_gg_",
|
|
19
|
+
"__SAxisLine": "___SAxisLine_rgkom_gg_",
|
|
20
|
+
"__SAxisTick": "___SAxisTick_rgkom_gg_",
|
|
21
|
+
"_active": "__active_rgkom_gg_",
|
|
22
|
+
"__SAxisLabel": "___SAxisLabel_rgkom_gg_",
|
|
23
|
+
"_xDirection": "__xDirection_rgkom_gg_",
|
|
24
|
+
"--xDirection": "--xDirection_rgkom",
|
|
25
|
+
"_yDirection": "__yDirection_rgkom_gg_",
|
|
26
|
+
"--yDirection": "--yDirection_rgkom",
|
|
27
|
+
"__SPolygon": "___SPolygon_rgkom_gg_",
|
|
28
|
+
"_color": "__color_rgkom_gg_",
|
|
29
|
+
"--color": "--color_rgkom",
|
|
30
|
+
"_pattern": "__pattern_rgkom_gg_",
|
|
31
|
+
"--pattern": "--pattern_rgkom",
|
|
32
|
+
"__SPolygonDot": "___SPolygonDot_rgkom_gg_",
|
|
33
|
+
"_transparent": "__transparent_rgkom_gg_",
|
|
34
|
+
"__SPolygonLine": "___SPolygonLine_rgkom_gg_",
|
|
35
|
+
"__SPieRect": "___SPieRect_rgkom_gg_"
|
|
36
36
|
});
|
|
37
37
|
import Tooltip from './Tooltip';
|
|
38
38
|
import { eventToPoint, getChartDefaultColorName, measureText } from './utils';
|
package/lib/es6/RadialTree.js
CHANGED
|
@@ -10,20 +10,20 @@ import React from 'react';
|
|
|
10
10
|
import createElement from './createElement';
|
|
11
11
|
import { PatternSymbol, getPatternSymbolSize } from './Pattern';
|
|
12
12
|
/*!__reshadow-styles__:"./style/radial-tree.shadow.css"*/
|
|
13
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
13
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SRadian_1xb4i_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info, #008ff8)}.___SLine_1xb4i_gg_{stroke:var(--intergalactic-text-large-info, #008ff8)}.___SLine_1xb4i_gg_.__stroke_1xb4i_gg_{stroke:var(--stroke_1xb4i)}.___SLine_1xb4i_gg_.__transparent_1xb4i_gg_{opacity:.3}.___SCap_1xb4i_gg_{transition:r .1s}.___SCap_1xb4i_gg_.__pattern_1xb4i_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:1px}.___SCap_1xb4i_gg_.__transparent_1xb4i_gg_,.___SIcon_1xb4i_gg_.__transparent_1xb4i_gg_,.___SLabel_1xb4i_gg_.__transparent_1xb4i_gg_{opacity:.3}.___SLabel_1xb4i_gg_{fill:var(--color_1xb4i)}@media (hover:hover){.___SRadian_1xb4i_gg_:hover .___SLabel_1xb4i_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_1xb4i_gg_{transition:none}}", /*__inner_css_end__*/"1xb4i_gg_"),
|
|
14
14
|
/*__reshadow_css_end__*/
|
|
15
15
|
{
|
|
16
|
-
"__SRadian": "
|
|
17
|
-
"__SLine": "
|
|
18
|
-
"_stroke": "
|
|
19
|
-
"--stroke": "--
|
|
20
|
-
"_transparent": "
|
|
21
|
-
"__SCap": "
|
|
22
|
-
"_pattern": "
|
|
23
|
-
"__SIcon": "
|
|
24
|
-
"__SLabel": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"__SLineCap": "
|
|
16
|
+
"__SRadian": "___SRadian_1xb4i_gg_",
|
|
17
|
+
"__SLine": "___SLine_1xb4i_gg_",
|
|
18
|
+
"_stroke": "__stroke_1xb4i_gg_",
|
|
19
|
+
"--stroke": "--stroke_1xb4i",
|
|
20
|
+
"_transparent": "__transparent_1xb4i_gg_",
|
|
21
|
+
"__SCap": "___SCap_1xb4i_gg_",
|
|
22
|
+
"_pattern": "__pattern_1xb4i_gg_",
|
|
23
|
+
"__SIcon": "___SIcon_1xb4i_gg_",
|
|
24
|
+
"__SLabel": "___SLabel_1xb4i_gg_",
|
|
25
|
+
"--color": "--color_1xb4i",
|
|
26
|
+
"__SLineCap": "___SLineCap_1xb4i_gg_"
|
|
27
27
|
});
|
|
28
28
|
import { getChartDefaultColorName, measureText } from './utils';
|
|
29
29
|
const baseAngle = -Math.PI / 2; // The top vertical line
|
package/lib/es6/Reference.js
CHANGED
|
@@ -5,20 +5,20 @@ import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import createElement from './createElement';
|
|
7
7
|
/*!__reshadow-styles__:"./style/reference.shadow.css"*/
|
|
8
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
8
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SReferenceLine_112b5_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___STitle_112b5_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79);transform-origin:var(--transform-origin_112b5)}.___STitle_112b5_gg_._position_top_112b5_gg_{text-anchor:middle}.___STitle_112b5_gg_._position_bottom_112b5_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_112b5_gg_._position_left_112b5_gg_,.___STitle_112b5_gg_._position_right_112b5_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___SBackground_112b5_gg_{fill:var(--intergalactic-chart-grid-period-bg, rgba(196, 199, 207, 0.2))}.___SStripes_112b5_gg_{fill:var(--fill_112b5)}.___SStripesPatternPath_112b5_gg_{stroke:var(--intergalactic-chart-grid-period-pattern, rgba(25, 27, 35, 0.15));stroke-width:1px}", /*__inner_css_end__*/"112b5_gg_"),
|
|
9
9
|
/*__reshadow_css_end__*/
|
|
10
10
|
{
|
|
11
|
-
"__SReferenceLine": "
|
|
12
|
-
"__STitle": "
|
|
13
|
-
"--transform-origin": "--transform-
|
|
14
|
-
"_position_top": "
|
|
15
|
-
"_position_bottom": "
|
|
16
|
-
"_position_right": "
|
|
17
|
-
"_position_left": "
|
|
18
|
-
"__SBackground": "
|
|
19
|
-
"__SStripes": "
|
|
20
|
-
"--fill": "--
|
|
21
|
-
"__SStripesPatternPath": "
|
|
11
|
+
"__SReferenceLine": "___SReferenceLine_112b5_gg_",
|
|
12
|
+
"__STitle": "___STitle_112b5_gg_",
|
|
13
|
+
"--transform-origin": "--transform-origin_112b5",
|
|
14
|
+
"_position_top": "_position_top_112b5_gg_",
|
|
15
|
+
"_position_bottom": "_position_bottom_112b5_gg_",
|
|
16
|
+
"_position_right": "_position_right_112b5_gg_",
|
|
17
|
+
"_position_left": "_position_left_112b5_gg_",
|
|
18
|
+
"__SBackground": "___SBackground_112b5_gg_",
|
|
19
|
+
"__SStripes": "___SStripes_112b5_gg_",
|
|
20
|
+
"--fill": "--fill_112b5",
|
|
21
|
+
"__SStripesPatternPath": "___SStripesPatternPath_112b5_gg_"
|
|
22
22
|
});
|
|
23
23
|
import { scaleOfBandwidth } from './utils';
|
|
24
24
|
const side2direction = {
|
package/lib/es6/ScatterPlot.js
CHANGED
|
@@ -9,17 +9,17 @@ import React from 'react';
|
|
|
9
9
|
import createElement from './createElement';
|
|
10
10
|
import { PatternFill } from './Pattern';
|
|
11
11
|
/*!__reshadow-styles__:"./style/scatterplot.shadow.css"*/
|
|
12
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
12
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_1fqya_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy;transition-duration:var(--duration_1fqya);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_1fqya_gg_:hover{opacity:.8}}.___SScatterPlot_1fqya_gg_.__color_1fqya_gg_{fill:var(--color_1fqya)}.___SScatterPlot_1fqya_gg_.__pattern_1fqya_gg_.__color_1fqya_gg_{fill:var(--pattern_1fqya);stroke:var(--color_1fqya);stroke-width:1px}.___SScatterPlot_1fqya_gg_.__transparent_1fqya_gg_{opacity:.3}.___SValue_1fqya_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50, 10px);stroke:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SValue_1fqya_gg_.__color_1fqya_gg_{stroke:var(--color_1fqya)}.___SValue_1fqya_gg_.__transparent_1fqya_gg_{opacity:.3}", /*__inner_css_end__*/"1fqya_gg_"),
|
|
13
13
|
/*__reshadow_css_end__*/
|
|
14
14
|
{
|
|
15
|
-
"__SScatterPlot": "
|
|
16
|
-
"_color": "
|
|
17
|
-
"--color": "--
|
|
18
|
-
"_pattern": "
|
|
19
|
-
"--pattern": "--
|
|
20
|
-
"_transparent": "
|
|
21
|
-
"__SValue": "
|
|
22
|
-
"--duration": "--
|
|
15
|
+
"__SScatterPlot": "___SScatterPlot_1fqya_gg_",
|
|
16
|
+
"_color": "__color_1fqya_gg_",
|
|
17
|
+
"--color": "--color_1fqya",
|
|
18
|
+
"_pattern": "__pattern_1fqya_gg_",
|
|
19
|
+
"--pattern": "--pattern_1fqya",
|
|
20
|
+
"_transparent": "__transparent_1fqya_gg_",
|
|
21
|
+
"__SValue": "___SValue_1fqya_gg_",
|
|
22
|
+
"--duration": "--duration_1fqya"
|
|
23
23
|
});
|
|
24
24
|
import Tooltip from './Tooltip';
|
|
25
25
|
import { getScatterPlotRadius } from './utils';
|
package/lib/es6/Tooltip.js
CHANGED
|
@@ -13,17 +13,17 @@ import React from 'react';
|
|
|
13
13
|
import createElement from './createElement';
|
|
14
14
|
import { PatternSymbol } from './Pattern';
|
|
15
15
|
/*!__reshadow-styles__:"./style/tooltip.shadow.css"*/
|
|
16
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
16
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STooltip_942l4_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_942l4_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SDotGroup_942l4_gg_{display:flex;align-items:center}.___SDot_942l4_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDotCircle_942l4_gg_.__color_942l4_gg_{background-color:var(--color_942l4);width:8px;height:8px;border-radius:50%}.___SFooter_942l4_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__*/"942l4_gg_"),
|
|
17
17
|
/*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__STooltip": "
|
|
20
|
-
"__STitle": "
|
|
21
|
-
"__SDotGroup": "
|
|
22
|
-
"__SDot": "
|
|
23
|
-
"__SDotCircle": "
|
|
24
|
-
"_color": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"__SFooter": "
|
|
19
|
+
"__STooltip": "___STooltip_942l4_gg_",
|
|
20
|
+
"__STitle": "___STitle_942l4_gg_",
|
|
21
|
+
"__SDotGroup": "___SDotGroup_942l4_gg_",
|
|
22
|
+
"__SDot": "___SDot_942l4_gg_",
|
|
23
|
+
"__SDotCircle": "___SDotCircle_942l4_gg_",
|
|
24
|
+
"_color": "__color_942l4_gg_",
|
|
25
|
+
"--color": "--color_942l4",
|
|
26
|
+
"__SFooter": "___SFooter_942l4_gg_"
|
|
27
27
|
});
|
|
28
28
|
import { getChartDefaultColorName } from './utils';
|
|
29
29
|
|
package/lib/es6/Venn.js
CHANGED
|
@@ -12,17 +12,17 @@ import React from 'react';
|
|
|
12
12
|
import createElement from './createElement';
|
|
13
13
|
import { PatternFill } from './Pattern';
|
|
14
14
|
/*!__reshadow-styles__:"./style/venn.shadow.css"*/
|
|
15
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
15
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCircle_1pi5b_gg_,.___SIntersection_1pi5b_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px}.___SCircle_1pi5b_gg_{fill:var(--intergalactic-chart-palette-order-2, #59ddaa);fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1pi5b);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_1pi5b_gg_:hover{fill-opacity:.7}}.___SCircle_1pi5b_gg_.__color_1pi5b_gg_{fill:var(--color_1pi5b)}.___SCircle_1pi5b_gg_.__pattern_1pi5b_gg_.__color_1pi5b_gg_{fill:var(--pattern_1pi5b);fill-opacity:.7;stroke:var(--color_1pi5b);stroke-width:1px}@media (hover:hover){.___SCircle_1pi5b_gg_.__pattern_1pi5b_gg_.__color_1pi5b_gg_:hover{fill-opacity:.85}}.___SCircle_1pi5b_gg_.__transparent_1pi5b_gg_{opacity:.3}.___SIntersection_1pi5b_gg_{fill-opacity:0}@media (hover:hover){.___SIntersection_1pi5b_gg_:hover{fill-opacity:.1}}.___SIntersection_1pi5b_gg_.__transparent_1pi5b_gg_{opacity:.3}", /*__inner_css_end__*/"1pi5b_gg_"),
|
|
16
16
|
/*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SCircle": "
|
|
19
|
-
"_color": "
|
|
20
|
-
"--color": "--
|
|
21
|
-
"_transparent": "
|
|
22
|
-
"__SIntersection": "
|
|
23
|
-
"--duration": "--
|
|
24
|
-
"_pattern": "
|
|
25
|
-
"--pattern": "--
|
|
18
|
+
"__SCircle": "___SCircle_1pi5b_gg_",
|
|
19
|
+
"_color": "__color_1pi5b_gg_",
|
|
20
|
+
"--color": "--color_1pi5b",
|
|
21
|
+
"_transparent": "__transparent_1pi5b_gg_",
|
|
22
|
+
"__SIntersection": "___SIntersection_1pi5b_gg_",
|
|
23
|
+
"--duration": "--duration_1pi5b",
|
|
24
|
+
"_pattern": "__pattern_1pi5b_gg_",
|
|
25
|
+
"--pattern": "--pattern_1pi5b"
|
|
26
26
|
});
|
|
27
27
|
import Tooltip from './Tooltip';
|
|
28
28
|
import { getChartDefaultColorName } from './utils';
|
|
@@ -7,10 +7,10 @@ import { Context as I18nContext, useI18n } from '@semcore/core/lib/utils/enhance
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { normalizeLocale } from './locale';
|
|
9
9
|
/*!__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
|
|
10
|
-
const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
10
|
+
const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yModule_1t4qj_gg_{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0,}", /*__inner_css_end__*/"1t4qj_gg_"),
|
|
11
11
|
/*__reshadow_css_end__*/
|
|
12
12
|
{
|
|
13
|
-
"__SPlotA11yModule": "
|
|
13
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1t4qj_gg_"
|
|
14
14
|
});
|
|
15
15
|
import { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';
|
|
16
16
|
export function PlotA11yModule(props) {
|
|
@@ -10,13 +10,13 @@ import { makeDataSummarizationConfig } from './hints';
|
|
|
10
10
|
import { getIntl } from './intl';
|
|
11
11
|
import { summarize } from './summarize';
|
|
12
12
|
/*!__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
|
|
13
|
-
const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
13
|
+
const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yView_1h3zj_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);z-index:var(--intergalactic-z-index-overlay, 500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_1h3zj_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_1h3zj_gg_ table,.___SPlotA11yView_1h3zj_gg_ td,.___SPlotA11yView_1h3zj_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}", /*__inner_css_end__*/"1h3zj_gg_"),
|
|
14
14
|
/*__reshadow_css_end__*/
|
|
15
15
|
{
|
|
16
|
-
"__SPlotA11yView": "
|
|
16
|
+
"__SPlotA11yView": "___SPlotA11yView_1h3zj_gg_"
|
|
17
17
|
});
|
|
18
18
|
import { localizedMessages } from './translations/view/__intergalactic-dynamic-locales';
|
|
19
|
-
export
|
|
19
|
+
export function PlotA11yView({
|
|
20
20
|
id,
|
|
21
21
|
payload: providedData,
|
|
22
22
|
hints,
|
|
@@ -26,7 +26,7 @@ export const PlotA11yView = ({
|
|
|
26
26
|
config: providedConfig,
|
|
27
27
|
locale,
|
|
28
28
|
onCloseHandler
|
|
29
|
-
})
|
|
29
|
+
}) {
|
|
30
30
|
var _ref = arguments[0],
|
|
31
31
|
_ref2;
|
|
32
32
|
const SPlotA11yView = Box;
|
|
@@ -152,5 +152,6 @@ export const PlotA11yView = ({
|
|
|
152
152
|
"config": config,
|
|
153
153
|
"intl": intl
|
|
154
154
|
})));
|
|
155
|
-
}
|
|
155
|
+
}
|
|
156
|
+
;
|
|
156
157
|
//# sourceMappingURL=PlotA11yView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotA11yView.js","names":["Box","Root","sstyled","useAsyncI18nMessages","React","DataAccessibilityTable","heavyFindNextFocusableElement","makeDataSummarizationConfig","getIntl","summarize","styles","_sstyled","insert","localizedMessages","PlotA11yView","id","payload","providedData","hints","plotLabel","triggerRef","plotRef","config","providedConfig","locale","onCloseHandler","_ref","arguments[0]","_ref2","SPlotA11yView","translations","intl","useMemo","data","Array","isArray","rootRef","useRef","summary","setSummary","useState","generatingSummary","setGeneratingSummary","useEffect","current","focus","focusOutHandler","event","relatedTarget","requestIdleCallback","HTMLElement","contains","addEventListener","removeEventListener","disable","override","setTimeout","handleClose","useCallback","handleSkip","preventDefault","handleSkipKeyboard","key","handleGoToTable","dataTableRef","handleGoToTableKeyboard","texts","label","formatMessage","close","skipPlot","goToTable","summaryPlaceholder","table","createElement","cn","_assignProps"],"sources":["../../../src/a11y/PlotA11yView.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { Root, sstyled } from '@semcore/core';\nimport { useAsyncI18nMessages } from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport React from 'react';\n\nimport { DataAccessibilityTable } from './DataAccessibilityTable';\nimport { heavyFindNextFocusableElement } from './focus';\nimport { makeDataSummarizationConfig } from './hints';\nimport type { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { getIntl } from './intl';\nimport { summarize } from './summarize';\nimport styles from '../style/plotA11yView.shadow.css';\nimport { localizedMessages } from './translations/view/__intergalactic-dynamic-locales';\n\nexport type A11yViewProps = {\n id: string;\n payload: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n\n plotRef: React.RefObject<HTMLElement>;\n triggerRef: React.RefObject<HTMLElement>;\n onCloseHandler: () => void;\n};\n\nexport const PlotA11yView: React.FC<A11yViewProps> = ({\n id,\n payload: providedData,\n hints,\n plotLabel,\n triggerRef,\n plotRef,\n config: providedConfig,\n locale,\n onCloseHandler,\n}) => {\n const SPlotA11yView = Root;\n const translations = useAsyncI18nMessages(localizedMessages, locale);\n const intl = React.useMemo(\n () => getIntl(locale, translations, localizedMessages),\n [locale, translations, localizedMessages],\n );\n const config = React.useMemo(() => makeDataSummarizationConfig(providedConfig), [providedConfig]);\n const data = React.useMemo(\n () => (Array.isArray(providedData) ? providedData : [providedData]),\n [providedData],\n );\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n const [summary, setSummary] = React.useState<string | null>(null);\n const [generatingSummary, setGeneratingSummary] = React.useState(true);\n\n React.useEffect(() => {\n rootRef.current?.focus();\n\n function focusOutHandler(event: FocusEvent) {\n if (event.relatedTarget === null) {\n return requestIdleCallback(onCloseHandler);\n }\n\n if (!(event.relatedTarget instanceof HTMLElement)) return;\n\n if (rootRef.current?.contains(event.relatedTarget)) return;\n\n requestIdleCallback(onCloseHandler);\n }\n\n rootRef.current?.addEventListener('focusout', focusOutHandler);\n return () => rootRef.current?.removeEventListener('focusout', focusOutHandler);\n }, []);\n\n React.useEffect(() => {\n if (config.disable) {\n setSummary('');\n setGeneratingSummary(false);\n return;\n }\n if (config.override) {\n setSummary(config.override);\n setGeneratingSummary(false);\n return;\n }\n setTimeout(() => {\n setSummary(summarize(providedData, hints, config, locale, translations, localizedMessages));\n setGeneratingSummary(false);\n }, 0);\n }, [providedData, hints, config, locale, translations, localizedMessages]);\n\n const handleClose = React.useCallback(() => {\n onCloseHandler();\n\n requestIdleCallback(() => {\n triggerRef.current?.focus();\n });\n }, []);\n const handleSkip = React.useCallback((event: React.SyntheticEvent) => {\n event.preventDefault();\n if (!plotRef.current) return;\n\n heavyFindNextFocusableElement(plotRef.current)?.focus();\n\n onCloseHandler();\n }, []);\n const handleSkipKeyboard = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!(event.key === 'Enter' || event.key === ' ')) return;\n\n handleSkip(event);\n },\n [handleSkip],\n );\n const handleGoToTable = React.useCallback((event: React.SyntheticEvent) => {\n event.preventDefault();\n dataTableRef.current?.focus();\n }, []);\n const handleGoToTableKeyboard = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!(event.key === 'Enter' || event.key === ' ')) return;\n\n handleGoToTable(event);\n },\n [handleGoToTable],\n );\n\n const texts = React.useMemo(\n () => ({\n label: intl.formatMessage(\n { id: 'view-label' },\n { plotLabel: plotLabel ?? intl.formatMessage({ id: 'view-default-plot-label' }) },\n ),\n close: intl.formatMessage({ id: 'view-close' }),\n skipPlot: intl.formatMessage({ id: 'view-skip-plot' }),\n goToTable: intl.formatMessage({ id: 'view-go-to-table' }),\n summary: intl.formatMessage({ id: 'view-data-summary' }),\n summaryPlaceholder: intl.formatMessage({ id: 'view-summary-placeholder' }),\n table: intl.formatMessage({ id: 'view-table' }),\n }),\n [intl, plotLabel],\n );\n\n const dataTableRef = React.useRef<HTMLTableElement>(null);\n\n return sstyled(styles)(\n <SPlotA11yView\n render={Box}\n tabIndex={0}\n aria-label={texts.label}\n role='dialog'\n __excludeProps={['data']}\n ref={rootRef}\n >\n <button type='button' onClick={handleClose}>\n {texts.close}\n </button>\n <a href='#' onKeyDown={handleSkipKeyboard} onClick={handleSkip}>\n {texts.skipPlot}\n </a>\n <a href={`#${id}-data-table`} onKeyDown={handleGoToTableKeyboard} onClick={handleGoToTable}>\n {texts.goToTable}\n </a>\n <strong>\n <label htmlFor={`${id}-data-summary`}>{texts.summary}</label>\n </strong>\n <div id={`${id}-data-summary`} aria-busy={generatingSummary}>\n {generatingSummary ? texts.summaryPlaceholder : summary}\n </div>\n <strong>\n <label htmlFor={`${id}-data-table`}>{texts.table}</label>\n </strong>\n <DataAccessibilityTable\n id={id}\n dataTableRef={dataTableRef}\n data={data}\n hints={hints}\n config={config}\n intl={intl}\n />\n </SPlotA11yView>,\n ) as React.ReactElement;\n};\n"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC7C,SAASC,oBAAoB,QAAQ,8CAA8C;AACnF,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,6BAA6B,QAAQ,SAAS;AACvD,SAASC,2BAA2B,QAAQ,SAAS;AAErD,SAASC,OAAO,QAAQ,QAAQ;AAChC,SAASC,SAAS,QAAQ,aAAa;AAAC;AAAA,MAAAC,MAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;AAAA;AAExC,SAASC,iBAAiB,QAAQ,qDAAqD;AAevF,OAAO,MAAMC,YAAqC,GAAGA,CAAC;EACpDC,EAAE;EACFC,OAAO,EAAEC,YAAY;EACrBC,KAAK;EACLC,SAAS;EACTC,UAAU;EACVC,OAAO;EACPC,MAAM,EAAEC,cAAc;EACtBC,MAAM;EACNC;AACF,CAAC,KAAK;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACJ,MAAMC,aAAa,GA4GP7B,GAAG;EA3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,GAAG5D,EAAE;EAAe,IAAGmD,KAAK,CAAC5B,OAAe,CACtD,CAAC,eACTlC,KAAA,CAAAsE,aAAA,QAAA9C,KAAA,CAAA+C,EAAA;IAAA,MAAS,GAAG5D,EAAE,eAAe;IAAA,aAAa0B;EAAiB,IACxDA,iBAAiB,GAAGyB,KAAK,CAACM,kBAAkB,GAAGlC,OAC7C,CAAC,eACNlC,KAAA,CAAAsE,aAAA,WAAA9C,KAAA,CAAA+C,EAAA,6BACEvE,KAAA,CAAAsE,aAAA,UAAA9C,KAAA,CAAA+C,EAAA;IAAA,WAAgB,GAAG5D,EAAE;EAAa,IAAGmD,KAAK,CAACO,KAAa,CAClD,CAAC,eACTrE,KAAA,CAAAsE,aAAA,CAACrE,sBAAsB,EAAAuB,KAAA,CAAA+C,EAAA;IAAA,MACjB5D,EAAE;IAAA,gBACQiD,YAAY;IAAA,QACpB/B,IAAI;IAAA,SACHf,KAAK;IAAA,UACJI,MAAM;IAAA,QACRS;EAAI,EACX,CACY,CAAC;AAEpB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"PlotA11yView.js","names":["Box","Root","sstyled","useAsyncI18nMessages","React","DataAccessibilityTable","heavyFindNextFocusableElement","makeDataSummarizationConfig","getIntl","summarize","styles","_sstyled","insert","localizedMessages","PlotA11yView","id","payload","providedData","hints","plotLabel","triggerRef","plotRef","config","providedConfig","locale","onCloseHandler","_ref","arguments[0]","_ref2","SPlotA11yView","translations","intl","useMemo","data","Array","isArray","rootRef","useRef","summary","setSummary","useState","generatingSummary","setGeneratingSummary","useEffect","current","focus","focusOutHandler","event","relatedTarget","requestIdleCallback","HTMLElement","contains","addEventListener","removeEventListener","disable","override","setTimeout","handleClose","useCallback","handleSkip","preventDefault","handleSkipKeyboard","key","handleGoToTable","dataTableRef","handleGoToTableKeyboard","texts","label","formatMessage","close","skipPlot","goToTable","summaryPlaceholder","table","createElement","cn","_assignProps"],"sources":["../../../src/a11y/PlotA11yView.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { Root, sstyled } from '@semcore/core';\nimport { useAsyncI18nMessages } from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport React from 'react';\n\nimport { DataAccessibilityTable } from './DataAccessibilityTable';\nimport { heavyFindNextFocusableElement } from './focus';\nimport { makeDataSummarizationConfig } from './hints';\nimport type { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { getIntl } from './intl';\nimport { summarize } from './summarize';\nimport styles from '../style/plotA11yView.shadow.css';\nimport { localizedMessages } from './translations/view/__intergalactic-dynamic-locales';\n\nexport type A11yViewProps = {\n id: string;\n payload: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n\n plotRef: React.RefObject<HTMLElement>;\n triggerRef: React.RefObject<HTMLElement>;\n onCloseHandler: () => void;\n};\n\nexport function PlotA11yView({\n id,\n payload: providedData,\n hints,\n plotLabel,\n triggerRef,\n plotRef,\n config: providedConfig,\n locale,\n onCloseHandler,\n}: A11yViewProps) {\n const SPlotA11yView = Root;\n const translations = useAsyncI18nMessages(localizedMessages, locale);\n const intl = React.useMemo(\n () => getIntl(locale, translations, localizedMessages),\n [locale, translations, localizedMessages],\n );\n const config = React.useMemo(() => makeDataSummarizationConfig(providedConfig), [providedConfig]);\n const data = React.useMemo(\n () => (Array.isArray(providedData) ? providedData : [providedData]),\n [providedData],\n );\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n const [summary, setSummary] = React.useState<string | null>(null);\n const [generatingSummary, setGeneratingSummary] = React.useState(true);\n\n React.useEffect(() => {\n rootRef.current?.focus();\n\n function focusOutHandler(event: FocusEvent) {\n if (event.relatedTarget === null) {\n return requestIdleCallback(onCloseHandler);\n }\n\n if (!(event.relatedTarget instanceof HTMLElement)) return;\n\n if (rootRef.current?.contains(event.relatedTarget)) return;\n\n requestIdleCallback(onCloseHandler);\n }\n\n rootRef.current?.addEventListener('focusout', focusOutHandler);\n return () => rootRef.current?.removeEventListener('focusout', focusOutHandler);\n }, []);\n\n React.useEffect(() => {\n if (config.disable) {\n setSummary('');\n setGeneratingSummary(false);\n return;\n }\n if (config.override) {\n setSummary(config.override);\n setGeneratingSummary(false);\n return;\n }\n setTimeout(() => {\n setSummary(summarize(providedData, hints, config, locale, translations, localizedMessages));\n setGeneratingSummary(false);\n }, 0);\n }, [providedData, hints, config, locale, translations, localizedMessages]);\n\n const handleClose = React.useCallback(() => {\n onCloseHandler();\n\n requestIdleCallback(() => {\n triggerRef.current?.focus();\n });\n }, []);\n const handleSkip = React.useCallback((event: React.SyntheticEvent) => {\n event.preventDefault();\n if (!plotRef.current) return;\n\n heavyFindNextFocusableElement(plotRef.current)?.focus();\n\n onCloseHandler();\n }, []);\n const handleSkipKeyboard = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!(event.key === 'Enter' || event.key === ' ')) return;\n\n handleSkip(event);\n },\n [handleSkip],\n );\n const handleGoToTable = React.useCallback((event: React.SyntheticEvent) => {\n event.preventDefault();\n dataTableRef.current?.focus();\n }, []);\n const handleGoToTableKeyboard = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!(event.key === 'Enter' || event.key === ' ')) return;\n\n handleGoToTable(event);\n },\n [handleGoToTable],\n );\n\n const texts = React.useMemo(\n () => ({\n label: intl.formatMessage(\n { id: 'view-label' },\n { plotLabel: plotLabel ?? intl.formatMessage({ id: 'view-default-plot-label' }) },\n ),\n close: intl.formatMessage({ id: 'view-close' }),\n skipPlot: intl.formatMessage({ id: 'view-skip-plot' }),\n goToTable: intl.formatMessage({ id: 'view-go-to-table' }),\n summary: intl.formatMessage({ id: 'view-data-summary' }),\n summaryPlaceholder: intl.formatMessage({ id: 'view-summary-placeholder' }),\n table: intl.formatMessage({ id: 'view-table' }),\n }),\n [intl, plotLabel],\n );\n\n const dataTableRef = React.useRef<HTMLTableElement>(null);\n\n return sstyled(styles)(\n <SPlotA11yView\n render={Box}\n tabIndex={0}\n aria-label={texts.label}\n role='dialog'\n __excludeProps={['data']}\n ref={rootRef}\n >\n <button type='button' onClick={handleClose}>\n {texts.close}\n </button>\n <a href='#' onKeyDown={handleSkipKeyboard} onClick={handleSkip}>\n {texts.skipPlot}\n </a>\n <a href={`#${id}-data-table`} onKeyDown={handleGoToTableKeyboard} onClick={handleGoToTable}>\n {texts.goToTable}\n </a>\n <strong>\n <label htmlFor={`${id}-data-summary`}>{texts.summary}</label>\n </strong>\n <div id={`${id}-data-summary`} aria-busy={generatingSummary}>\n {generatingSummary ? texts.summaryPlaceholder : summary}\n </div>\n <strong>\n <label htmlFor={`${id}-data-table`}>{texts.table}</label>\n </strong>\n <DataAccessibilityTable\n id={id}\n dataTableRef={dataTableRef}\n data={data}\n hints={hints}\n config={config}\n intl={intl}\n />\n </SPlotA11yView>,\n ) as React.ReactElement;\n};\n"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC7C,SAASC,oBAAoB,QAAQ,8CAA8C;AACnF,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,6BAA6B,QAAQ,SAAS;AACvD,SAASC,2BAA2B,QAAQ,SAAS;AAErD,SAASC,OAAO,QAAQ,QAAQ;AAChC,SAASC,SAAS,QAAQ,aAAa;AAAC;AAAA,MAAAC,MAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;AAAA;AAExC,SAASC,iBAAiB,QAAQ,qDAAqD;AAevF,OAAO,SAASC,YAAYA,CAAC;EAC3BC,EAAE;EACFC,OAAO,EAAEC,YAAY;EACrBC,KAAK;EACLC,SAAS;EACTC,UAAU;EACVC,OAAO;EACPC,MAAM,EAAEC,cAAc;EACtBC,MAAM;EACNC;AACa,CAAC,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EAChB,MAAMC,aAAa,GA4GP7B,GAAG;EA3Gf,MAA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D,EAAE;EAAe,IAAGmD,KAAK,CAAC5B,OAAe,CACtD,CAAC,eACTlC,KAAA,CAAAsE,aAAA,QAAA9C,KAAA,CAAA+C,EAAA;IAAA,MAAS,GAAG5D,EAAE,eAAe;IAAA,aAAa0B;EAAiB,IACxDA,iBAAiB,GAAGyB,KAAK,CAACM,kBAAkB,GAAGlC,OAC7C,CAAC,eACNlC,KAAA,CAAAsE,aAAA,WAAA9C,KAAA,CAAA+C,EAAA,6BACEvE,KAAA,CAAAsE,aAAA,UAAA9C,KAAA,CAAA+C,EAAA;IAAA,WAAgB,GAAG5D,EAAE;EAAa,IAAGmD,KAAK,CAACO,KAAa,CAClD,CAAC,eACTrE,KAAA,CAAAsE,aAAA,CAACrE,sBAAsB,EAAAuB,KAAA,CAAA+C,EAAA;IAAA,MACjB5D,EAAE;IAAA,gBACQiD,YAAY;IAAA,QACpB/B,IAAI;IAAA,SACHf,KAAK;IAAA,UACJI,MAAM;IAAA,QACRS;EAAI,EACX,CACY,CAAC;AAEpB;AAAC","ignoreList":[]}
|
|
@@ -15,12 +15,12 @@ import React, { Fragment } from 'react';
|
|
|
15
15
|
import { Plot, XAxis, YAxis } from '../..';
|
|
16
16
|
import { makeDataHintsContainer } from '../../a11y/hints';
|
|
17
17
|
/*!__reshadow-styles__:"../../style/abstract-chart.shadow.css"*/
|
|
18
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
18
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STooltipChildrenWrapper_16iik_gg_{display:grid;grid-column-gap:var(--intergalactic-spacing-2x, 8px);-moz-column-gap:var(--intergalactic-spacing-2x, 8px);column-gap:var(--intergalactic-spacing-2x, 8px)}.___STooltipChildrenWrapper_16iik_gg_._columnsCount_2_16iik_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_16iik_gg_._columnsCount_3_16iik_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}", /*__inner_css_end__*/"16iik_gg_"),
|
|
19
19
|
/*__reshadow_css_end__*/
|
|
20
20
|
{
|
|
21
|
-
"__STooltipChildrenWrapper": "
|
|
22
|
-
"_columnsCount_2": "
|
|
23
|
-
"_columnsCount_3": "
|
|
21
|
+
"__STooltipChildrenWrapper": "___STooltipChildrenWrapper_16iik_gg_",
|
|
22
|
+
"_columnsCount_2": "_columnsCount_2_16iik_gg_",
|
|
23
|
+
"_columnsCount_3": "_columnsCount_3_16iik_gg_"
|
|
24
24
|
});
|
|
25
25
|
import { interpolateValue } from '../../utils';
|
|
26
26
|
import ChartLegend, { ChartLegendTable } from '../ChartLegend';
|
|
@@ -33,11 +33,6 @@ export class AbstractChart extends Component {
|
|
|
33
33
|
*/
|
|
34
34
|
_defineProperty(this, "plotPadding", 6);
|
|
35
35
|
_defineProperty(this, "dataHints", makeDataHintsContainer());
|
|
36
|
-
_defineProperty(this, "state", {
|
|
37
|
-
dataDefinitions: this.getDefaultDataDefinitions(),
|
|
38
|
-
highlightedLine: -1,
|
|
39
|
-
withTrend: false
|
|
40
|
-
});
|
|
41
36
|
this.setHighlightedLine = this.setHighlightedLine.bind(this);
|
|
42
37
|
this.handleChangeVisible = this.handleChangeVisible.bind(this);
|
|
43
38
|
this.handleMouseEnter = this.handleMouseEnter.bind(this);
|
|
@@ -45,6 +40,11 @@ export class AbstractChart extends Component {
|
|
|
45
40
|
this.resolveColor = this.resolveColor.bind(this);
|
|
46
41
|
this.tooltipValueFormatter = this.tooltipValueFormatter.bind(this);
|
|
47
42
|
this.handleWithTrendChange = this.handleWithTrendChange.bind(this);
|
|
43
|
+
this.state = {
|
|
44
|
+
dataDefinitions: this.getDefaultDataDefinitions(),
|
|
45
|
+
highlightedLine: -1,
|
|
46
|
+
withTrend: false
|
|
47
|
+
};
|
|
48
48
|
}
|
|
49
49
|
componentDidUpdate(prevProps) {
|
|
50
50
|
if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {
|
|
@@ -233,18 +233,6 @@ export class AbstractChart extends Component {
|
|
|
233
233
|
}
|
|
234
234
|
return total;
|
|
235
235
|
}
|
|
236
|
-
percentValue(data, key) {
|
|
237
|
-
const total = this.totalValue(data);
|
|
238
|
-
const value = data[key];
|
|
239
|
-
if (typeof value === 'number' && total !== 0) {
|
|
240
|
-
const percent = Math.round(100 * value / total);
|
|
241
|
-
return `${percent}%`;
|
|
242
|
-
}
|
|
243
|
-
if (value === null) {
|
|
244
|
-
return `0%`;
|
|
245
|
-
}
|
|
246
|
-
return NOT_A_VALUE;
|
|
247
|
-
}
|
|
248
236
|
getValueScale(values) {
|
|
249
237
|
const max = Math.max(...values);
|
|
250
238
|
const min = Math.min(...values);
|