@semcore/d3-chart 2.3.0-1 → 2.3.2
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 +31 -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 +9 -9
- package/lib/cjs/GroupBar.js +6 -6
- package/lib/cjs/HorizontalBar.js +8 -8
- package/lib/cjs/Hover.js +4 -4
- package/lib/cjs/Line.js +8 -8
- package/lib/cjs/Plot.js +4 -4
- package/lib/cjs/RadialTree.js +11 -11
- package/lib/cjs/ReferenceLine.js +10 -10
- package/lib/cjs/ResponsiveContainer.js +1 -0
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +7 -7
- package/lib/cjs/StackBar.js +6 -6
- package/lib/cjs/StackedArea.js +7 -7
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +7 -7
- package/lib/cjs/a11y/PlotA11yModule.js +18 -6
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +7 -5
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/locale.js +6 -2
- package/lib/cjs/a11y/locale.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 +9 -9
- package/lib/es6/GroupBar.js +6 -6
- package/lib/es6/HorizontalBar.js +8 -8
- package/lib/es6/Hover.js +4 -4
- package/lib/es6/Line.js +8 -8
- package/lib/es6/Plot.js +4 -4
- package/lib/es6/RadialTree.js +11 -11
- package/lib/es6/ReferenceLine.js +10 -10
- package/lib/es6/ResponsiveContainer.js +1 -0
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +7 -7
- package/lib/es6/StackBar.js +6 -6
- package/lib/es6/StackedArea.js +7 -7
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +7 -7
- package/lib/es6/a11y/PlotA11yModule.js +14 -6
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +6 -5
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/locale.js +6 -2
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/types/a11y/hints.d.ts +2 -23
- package/lib/types/a11y/locale.d.ts +1 -1
- package/lib/types/a11y/serialize.d.ts +3 -3
- package/lib/types/a11y/summarize.d.ts +1 -1
- package/lib/types/utils.d.ts +4 -4
- package/package.json +2 -2
- package/lib/cjs/a11y/datasets/charts-a11y.js +0 -591
- package/lib/cjs/a11y/datasets/charts-a11y.js.map +0 -1
- package/lib/cjs/a11y/datasets/gold.json +0 -7961
- package/lib/cjs/a11y/datasets/imdb.json +0 -10002
- package/lib/cjs/a11y/datasets/readme.md +0 -5
- package/lib/cjs/a11y/datasets/stores.json +0 -6274
- package/lib/cjs/a11y/datasets/titanic.json +0 -5436
- package/lib/es6/a11y/datasets/charts-a11y.js +0 -590
- package/lib/es6/a11y/datasets/charts-a11y.js.map +0 -1
- package/lib/es6/a11y/datasets/gold.json +0 -7961
- package/lib/es6/a11y/datasets/imdb.json +0 -10002
- package/lib/es6/a11y/datasets/readme.md +0 -5
- package/lib/es6/a11y/datasets/stores.json +0 -6274
- package/lib/es6/a11y/datasets/titanic.json +0 -5436
- package/lib/types/a11y/datasets/charts-a11y.d.ts +0 -0
package/lib/es6/Bar.js
CHANGED
|
@@ -24,17 +24,17 @@ var style = (
|
|
|
24
24
|
/*__reshadow_css_start__*/
|
|
25
25
|
_sstyled.insert(
|
|
26
26
|
/*__inner_css_start__*/
|
|
27
|
-
".
|
|
27
|
+
".___SBar_19nw3_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_19nw3);transition-timing-function:ease-in-out}.___SBar_19nw3_gg_.__color_19nw3_gg_{fill:var(--color_19nw3)}.___SBar_19nw3_gg_.__hide_19nw3_gg_{display:none}.___SBackground_19nw3_gg_{fill:#c4c7cf}"
|
|
28
28
|
/*__inner_css_end__*/
|
|
29
|
-
, "
|
|
29
|
+
, "19nw3_gg_")
|
|
30
30
|
/*__reshadow_css_end__*/
|
|
31
31
|
, {
|
|
32
|
-
"__SBar": "
|
|
33
|
-
"--duration": "--
|
|
34
|
-
"_color": "
|
|
35
|
-
"--color": "--
|
|
36
|
-
"_hide": "
|
|
37
|
-
"__SBackground": "
|
|
32
|
+
"__SBar": "___SBar_19nw3_gg_",
|
|
33
|
+
"--duration": "--duration_19nw3",
|
|
34
|
+
"_color": "__color_19nw3_gg_",
|
|
35
|
+
"--color": "--color_19nw3",
|
|
36
|
+
"_hide": "__hide_19nw3_gg_",
|
|
37
|
+
"__SBackground": "___SBackground_19nw3_gg_"
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
var BarRoot = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Bubble.js
CHANGED
|
@@ -30,19 +30,19 @@ var style = (
|
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
31
|
_sstyled.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
33
|
+
".___SBubble_11l7c_gg_{fill:#2bb3ff;stroke:#fff;stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_11l7c);transition-timing-function:ease-in-out;opacity:.5}.___SBubble_11l7c_gg_:hover{opacity:.8}.___SBubble_11l7c_gg_.__color_11l7c_gg_{fill:var(--color_11l7c)}.___SCenter_11l7c_gg_{text-anchor:middle;font-size:11px;stroke:#2bb3ff}.___SCenter_11l7c_gg_.__color_11l7c_gg_{stroke:var(--color_11l7c)}.___SLabel_11l7c_gg_{fill:#2bb3ff}.___SLabel_11l7c_gg_._position_right_11l7c_gg_{text-anchor:end}.___SLabel_11l7c_gg_._position_left_11l7c_gg_{text-anchor:start}.___SLabel_11l7c_gg_.__color_11l7c_gg_{fill:var(--color_11l7c)}"
|
|
34
34
|
/*__inner_css_end__*/
|
|
35
|
-
, "
|
|
35
|
+
, "11l7c_gg_")
|
|
36
36
|
/*__reshadow_css_end__*/
|
|
37
37
|
, {
|
|
38
|
-
"__SBubble": "
|
|
39
|
-
"--duration": "--
|
|
40
|
-
"_color": "
|
|
41
|
-
"--color": "--
|
|
42
|
-
"__SCenter": "
|
|
43
|
-
"__SLabel": "
|
|
44
|
-
"_position_right": "
|
|
45
|
-
"_position_left": "
|
|
38
|
+
"__SBubble": "___SBubble_11l7c_gg_",
|
|
39
|
+
"--duration": "--duration_11l7c",
|
|
40
|
+
"_color": "__color_11l7c_gg_",
|
|
41
|
+
"--color": "--color_11l7c",
|
|
42
|
+
"__SCenter": "___SCenter_11l7c_gg_",
|
|
43
|
+
"__SLabel": "___SLabel_11l7c_gg_",
|
|
44
|
+
"_position_right": "_position_right_11l7c_gg_",
|
|
45
|
+
"_position_left": "_position_left_11l7c_gg_"
|
|
46
46
|
});
|
|
47
47
|
import ClipPath from './ClipPath';
|
|
48
48
|
import { scaleSqrt } from 'd3-scale';
|
package/lib/es6/Donut.js
CHANGED
|
@@ -34,16 +34,16 @@ var style = (
|
|
|
34
34
|
/*__reshadow_css_start__*/
|
|
35
35
|
_sstyled.insert(
|
|
36
36
|
/*__inner_css_start__*/
|
|
37
|
-
".
|
|
37
|
+
".___SPie_15pda_gg_{stroke:#fff;fill:#2bb3ff}.___SPie_15pda_gg_.__color_15pda_gg_{fill:var(--color_15pda)}.___SEmptyData_15pda_gg_{fill:#e0e1e9}.___SEmptyData_15pda_gg_.__color_15pda_gg_{fill:var(--color_15pda)}.___SLabel_15pda_gg_{text-anchor:middle;vertical-anchor:middle}"
|
|
38
38
|
/*__inner_css_end__*/
|
|
39
|
-
, "
|
|
39
|
+
, "15pda_gg_")
|
|
40
40
|
/*__reshadow_css_end__*/
|
|
41
41
|
, {
|
|
42
|
-
"__SPie": "
|
|
43
|
-
"_color": "
|
|
44
|
-
"--color": "--
|
|
45
|
-
"__SEmptyData": "
|
|
46
|
-
"__SLabel": "
|
|
42
|
+
"__SPie": "___SPie_15pda_gg_",
|
|
43
|
+
"_color": "__color_15pda_gg_",
|
|
44
|
+
"--color": "--color_15pda",
|
|
45
|
+
"__SEmptyData": "___SEmptyData_15pda_gg_",
|
|
46
|
+
"__SLabel": "___SLabel_15pda_gg_"
|
|
47
47
|
});
|
|
48
48
|
var DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');
|
|
49
49
|
|
package/lib/es6/Dots.js
CHANGED
|
@@ -12,18 +12,18 @@ var style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
_sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
15
|
+
".___SDots_cm5sn_gg_ .___SDot_cm5sn_gg_{transition-duration:var(--duration_cm5sn)}.___SDot_cm5sn_gg_{stroke-width:2px;stroke:#fff;r:6px;fill:#2bb3ff;transition-property:cx,cy;transition-timing-function:ease-in-out}.___SDot_cm5sn_gg_.__hide_cm5sn_gg_{display:none}.___SDot_cm5sn_gg_.__active_cm5sn_gg_{r:8px}.___SDot_cm5sn_gg_.__color_cm5sn_gg_{fill:var(--color_cm5sn)}"
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
, "
|
|
17
|
+
, "cm5sn_gg_")
|
|
18
18
|
/*__reshadow_css_end__*/
|
|
19
19
|
, {
|
|
20
|
-
"__SDots": "
|
|
21
|
-
"__SDot": "
|
|
22
|
-
"--duration": "--
|
|
23
|
-
"_hide": "
|
|
24
|
-
"_active": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"--color": "--
|
|
20
|
+
"__SDots": "___SDots_cm5sn_gg_",
|
|
21
|
+
"__SDot": "___SDot_cm5sn_gg_",
|
|
22
|
+
"--duration": "--duration_cm5sn",
|
|
23
|
+
"_hide": "__hide_cm5sn_gg_",
|
|
24
|
+
"_active": "__active_cm5sn_gg_",
|
|
25
|
+
"_color": "__color_cm5sn_gg_",
|
|
26
|
+
"--color": "--color_cm5sn"
|
|
27
27
|
});
|
|
28
28
|
var EXCLUDE_PROPS = ['data', 'scale', 'value', 'display'];
|
|
29
29
|
|
package/lib/es6/GroupBar.js
CHANGED
|
@@ -22,15 +22,15 @@ var _ref = (
|
|
|
22
22
|
/*__reshadow_css_start__*/
|
|
23
23
|
__css__(
|
|
24
24
|
/*__inner_css_start__*/
|
|
25
|
-
".
|
|
25
|
+
".___SBar_f03r7_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_f03r7_gg_.__color_f03r7_gg_{fill:var(--color)}.___SBar_f03r7_gg_.__hide_f03r7_gg_{display:none}.___SBackground_f03r7_gg_{fill:#c4c7cf}"
|
|
26
26
|
/*__inner_css_end__*/
|
|
27
|
-
, "
|
|
27
|
+
, "jel8ua_gg_")
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
, {
|
|
30
|
-
"__SBar": "
|
|
31
|
-
"_color": "
|
|
32
|
-
"_hide": "
|
|
33
|
-
"__SBackground": "
|
|
30
|
+
"__SBar": "___SBar_f03r7_gg_",
|
|
31
|
+
"_color": "__color_f03r7_gg_",
|
|
32
|
+
"_hide": "__hide_f03r7_gg_",
|
|
33
|
+
"__SBackground": "___SBackground_f03r7_gg_"
|
|
34
34
|
}),
|
|
35
35
|
style = _extends({}, _ref);
|
|
36
36
|
|
package/lib/es6/HorizontalBar.js
CHANGED
|
@@ -23,17 +23,17 @@ var style = (
|
|
|
23
23
|
/*__reshadow_css_start__*/
|
|
24
24
|
_sstyled.insert(
|
|
25
25
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
26
|
+
".___SBar_19nw3_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_19nw3);transition-timing-function:ease-in-out}.___SBar_19nw3_gg_.__color_19nw3_gg_{fill:var(--color_19nw3)}.___SBar_19nw3_gg_.__hide_19nw3_gg_{display:none}.___SBackground_19nw3_gg_{fill:#c4c7cf}"
|
|
27
27
|
/*__inner_css_end__*/
|
|
28
|
-
, "
|
|
28
|
+
, "19nw3_gg_")
|
|
29
29
|
/*__reshadow_css_end__*/
|
|
30
30
|
, {
|
|
31
|
-
"__SBar": "
|
|
32
|
-
"--duration": "--
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_hide": "
|
|
36
|
-
"__SBackground": "
|
|
31
|
+
"__SBar": "___SBar_19nw3_gg_",
|
|
32
|
+
"--duration": "--duration_19nw3",
|
|
33
|
+
"_color": "__color_19nw3_gg_",
|
|
34
|
+
"--color": "--color_19nw3",
|
|
35
|
+
"_hide": "__hide_19nw3_gg_",
|
|
36
|
+
"__SBackground": "___SBackground_19nw3_gg_"
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
var HorizontalBarRoot = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Hover.js
CHANGED
|
@@ -24,13 +24,13 @@ var style = (
|
|
|
24
24
|
/*__reshadow_css_start__*/
|
|
25
25
|
_sstyled.insert(
|
|
26
26
|
/*__inner_css_start__*/
|
|
27
|
-
".
|
|
27
|
+
".___SHoverLine_120bn_gg_{stroke:#a9abb6}.___SHoverRect_120bn_gg_{fill:rgba(196,199,207,.3)}"
|
|
28
28
|
/*__inner_css_end__*/
|
|
29
|
-
, "
|
|
29
|
+
, "120bn_gg_")
|
|
30
30
|
/*__reshadow_css_end__*/
|
|
31
31
|
, {
|
|
32
|
-
"__SHoverLine": "
|
|
33
|
-
"__SHoverRect": "
|
|
32
|
+
"__SHoverLine": "___SHoverLine_120bn_gg_",
|
|
33
|
+
"__SHoverRect": "___SHoverRect_120bn_gg_"
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
var Hover = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Line.js
CHANGED
|
@@ -25,17 +25,17 @@ var style = (
|
|
|
25
25
|
/*__reshadow_css_start__*/
|
|
26
26
|
_sstyled.insert(
|
|
27
27
|
/*__inner_css_start__*/
|
|
28
|
-
".
|
|
28
|
+
".___SLine_1sa7n_gg_{fill:transparent;stroke-width:3;stroke:#2bb3ff;transition-property:d;transition-duration:var(--duration_1sa7n);transition-timing-function:ease-in-out}.___SLine_1sa7n_gg_.__color_1sa7n_gg_{stroke:var(--color_1sa7n)}.___SLine_1sa7n_gg_.__hide_1sa7n_gg_{display:none}.___SNull_1sa7n_gg_{fill:transparent;stroke:#c4c7cf;stroke-dasharray:4}.___SNull_1sa7n_gg_.__hide_1sa7n_gg_{display:none}"
|
|
29
29
|
/*__inner_css_end__*/
|
|
30
|
-
, "
|
|
30
|
+
, "1sa7n_gg_")
|
|
31
31
|
/*__reshadow_css_end__*/
|
|
32
32
|
, {
|
|
33
|
-
"__SLine": "
|
|
34
|
-
"--duration": "--
|
|
35
|
-
"_color": "
|
|
36
|
-
"--color": "--
|
|
37
|
-
"_hide": "
|
|
38
|
-
"__SNull": "
|
|
33
|
+
"__SLine": "___SLine_1sa7n_gg_",
|
|
34
|
+
"--duration": "--duration_1sa7n",
|
|
35
|
+
"_color": "__color_1sa7n_gg_",
|
|
36
|
+
"--color": "--color_1sa7n",
|
|
37
|
+
"_hide": "__hide_1sa7n_gg_",
|
|
38
|
+
"__SNull": "___SNull_1sa7n_gg_"
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
var LineRoot = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Plot.js
CHANGED
|
@@ -28,13 +28,13 @@ var style = (
|
|
|
28
28
|
/*__reshadow_css_start__*/
|
|
29
29
|
_sstyled.insert(
|
|
30
30
|
/*__inner_css_start__*/
|
|
31
|
-
".
|
|
31
|
+
".___SPlot_jzcej_gg_{overflow:hidden}.___SPlot_jzcej_gg_:active,.___SPlot_jzcej_gg_:focus{outline:0;text-decoration:none}.___SPlot_jzcej_gg_.__keyboardFocused_jzcej_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}"
|
|
32
32
|
/*__inner_css_end__*/
|
|
33
|
-
, "
|
|
33
|
+
, "jzcej_gg_")
|
|
34
34
|
/*__reshadow_css_end__*/
|
|
35
35
|
, {
|
|
36
|
-
"__SPlot": "
|
|
37
|
-
"_keyboardFocused": "
|
|
36
|
+
"__SPlot": "___SPlot_jzcej_gg_",
|
|
37
|
+
"_keyboardFocused": "__keyboardFocused_jzcej_gg_"
|
|
38
38
|
});
|
|
39
39
|
import { PlotA11yModule } from './a11y/PlotA11yModule';
|
|
40
40
|
import { makeDataHintsHandlers, makeDataHintsContainer } from './a11y/hints';
|
package/lib/es6/RadialTree.js
CHANGED
|
@@ -31,20 +31,20 @@ var style = (
|
|
|
31
31
|
/*__reshadow_css_start__*/
|
|
32
32
|
_sstyled.insert(
|
|
33
33
|
/*__inner_css_start__*/
|
|
34
|
-
".
|
|
34
|
+
".___SRadian_102fp_gg_{cursor:pointer;fill:#008ff8}.___SLine_102fp_gg_{stroke:#008ff8}.___SLine_102fp_gg_.__color_102fp_gg_{stroke:var(--color_102fp)}.___SCap_102fp_gg_{transition:r .1s}.___SLabel_102fp_gg_{fill:var(--color_102fp);cursor:var(--text-cursor_102fp)}.___SRadian_102fp_gg_:hover .___SLabel_102fp_gg_{fill:var(--color-hovered_102fp)}@media (prefers-reduced-motion){.___SLineCap_102fp_gg_{transition:none}}"
|
|
35
35
|
/*__inner_css_end__*/
|
|
36
|
-
, "
|
|
36
|
+
, "102fp_gg_")
|
|
37
37
|
/*__reshadow_css_end__*/
|
|
38
38
|
, {
|
|
39
|
-
"__SRadian": "
|
|
40
|
-
"__SLine": "
|
|
41
|
-
"_color": "
|
|
42
|
-
"--color": "--
|
|
43
|
-
"__SCap": "
|
|
44
|
-
"__SLabel": "
|
|
45
|
-
"--text-cursor": "--text-
|
|
46
|
-
"--color-hovered": "--color-
|
|
47
|
-
"__SLineCap": "
|
|
39
|
+
"__SRadian": "___SRadian_102fp_gg_",
|
|
40
|
+
"__SLine": "___SLine_102fp_gg_",
|
|
41
|
+
"_color": "__color_102fp_gg_",
|
|
42
|
+
"--color": "--color_102fp",
|
|
43
|
+
"__SCap": "___SCap_102fp_gg_",
|
|
44
|
+
"__SLabel": "___SLabel_102fp_gg_",
|
|
45
|
+
"--text-cursor": "--text-cursor_102fp",
|
|
46
|
+
"--color-hovered": "--color-hovered_102fp",
|
|
47
|
+
"__SLineCap": "___SLineCap_102fp_gg_"
|
|
48
48
|
});
|
|
49
49
|
import { shade } from '@semcore/utils/lib/color';
|
|
50
50
|
import { measureText } from './utils';
|
package/lib/es6/ReferenceLine.js
CHANGED
|
@@ -25,19 +25,19 @@ var style = (
|
|
|
25
25
|
/*__reshadow_css_start__*/
|
|
26
26
|
_sstyled.insert(
|
|
27
27
|
/*__inner_css_start__*/
|
|
28
|
-
".
|
|
28
|
+
".___SReferenceLine_pz315_gg_{fill:none;stroke:#a9abb6}.___STitle_pz315_gg_{font-size:12px;fill:#6c6e79;transform-origin:var(--transform-origin_pz315)}.___STitle_pz315_gg_._position_top_pz315_gg_{text-anchor:middle}.___STitle_pz315_gg_._position_bottom_pz315_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_pz315_gg_._position_right_pz315_gg_{transform:rotate(-90deg);alignment-baseline:middle;text-anchor:middle}.___STitle_pz315_gg_._position_left_pz315_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___SBackground_pz315_gg_{fill:rgba(196,199,207,.2)}"
|
|
29
29
|
/*__inner_css_end__*/
|
|
30
|
-
, "
|
|
30
|
+
, "pz315_gg_")
|
|
31
31
|
/*__reshadow_css_end__*/
|
|
32
32
|
, {
|
|
33
|
-
"__SReferenceLine": "
|
|
34
|
-
"__STitle": "
|
|
35
|
-
"--transform-origin": "--transform-
|
|
36
|
-
"_position_top": "
|
|
37
|
-
"_position_bottom": "
|
|
38
|
-
"_position_right": "
|
|
39
|
-
"_position_left": "
|
|
40
|
-
"__SBackground": "
|
|
33
|
+
"__SReferenceLine": "___SReferenceLine_pz315_gg_",
|
|
34
|
+
"__STitle": "___STitle_pz315_gg_",
|
|
35
|
+
"--transform-origin": "--transform-origin_pz315",
|
|
36
|
+
"_position_top": "_position_top_pz315_gg_",
|
|
37
|
+
"_position_bottom": "_position_bottom_pz315_gg_",
|
|
38
|
+
"_position_right": "_position_right_pz315_gg_",
|
|
39
|
+
"_position_left": "_position_left_pz315_gg_",
|
|
40
|
+
"__SBackground": "___SBackground_pz315_gg_"
|
|
41
41
|
});
|
|
42
42
|
var MAP_ORIENTATION = {
|
|
43
43
|
left: 'vertical',
|
|
@@ -44,6 +44,7 @@ var ResponsiveContainerRoot = /*#__PURE__*/function (_Component) {
|
|
|
44
44
|
var _this$asProps = _this.asProps,
|
|
45
45
|
Children = _this$asProps.Children,
|
|
46
46
|
aspect = _this$asProps.aspect;
|
|
47
|
+
if (!_this.$container) return;
|
|
47
48
|
var _this$$container = _this.$container,
|
|
48
49
|
width = _this$$container.clientWidth,
|
|
49
50
|
height = _this$$container.clientHeight;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveContainer.js","names":["React","ResizeObserver","createComponent","Component","Root","sstyled","Box","trottle","fire","getOriginChildren","ResponsiveContainerRoot","props","createRef","entries","asProps","Children","aspect","$container","width","clientWidth","height","clientHeight","style","window","getComputedStyle","minHeight","Number","parseInt","getPropertyValue","maxHeight","size","forceUpdate","observer","handleResize","containerRef","current","observe","disconnect","SResponsiveContainer","styles","ResponsiveContainer"],"sources":["../../src/ResponsiveContainer.jsx"],"sourcesContent":["import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport trottle from '@semcore/utils/lib/rafTrottle';\nimport fire from '@semcore/utils/lib/fire';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\n\nclass ResponsiveContainerRoot extends Component {\n static displayName = 'ResponsiveContainer';\n\n containerRef = React.createRef();\n size = [0, 0];\n\n constructor(props) {\n super(props);\n this.observer = new ResizeObserver(this.handleResize);\n }\n\n get $container() {\n return this.containerRef.current;\n }\n\n handleResize = trottle((entries) => {\n const { Children, aspect } = this.asProps;\n let { clientWidth: width, clientHeight: height } = this.$container;\n\n if (aspect) {\n const style = window.getComputedStyle(this.$container);\n const minHeight = Number.parseInt(style.getPropertyValue('min-height'));\n const maxHeight = Number.parseInt(style.getPropertyValue('max-height'));\n height = width * aspect;\n\n if (height < minHeight) {\n height = minHeight;\n }\n if (height > maxHeight) {\n height = maxHeight;\n }\n }\n\n if (this.size[0] === width && this.size[1] === height) return;\n\n this.size = [width, height];\n\n fire(this, 'onResize', this.size, entries);\n\n if (typeof getOriginChildren(Children) === 'function') {\n this.forceUpdate();\n }\n });\n\n setContext() {\n const [width, height] = this.size;\n return {\n width,\n height,\n };\n }\n\n componentDidMount() {\n if (this.$container) {\n // TODO: may be we can increase perfomance here? (by lsroman)\n this.observer.observe(this.$container);\n }\n }\n\n // TODO component did update ref?\n\n componentWillUnmount() {\n this.observer.disconnect();\n }\n\n render() {\n const SResponsiveContainer = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SResponsiveContainer render={Box} ref={this.containerRef} />);\n }\n}\n\nconst ResponsiveContainer = createComponent(ResponsiveContainerRoot);\n\nexport default ResponsiveContainer;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AAEA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,EAA2CC,OAA3C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,OAAP,MAAoB,+BAApB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;;IAEMC,uB;;;;;EAMJ,iCAAYC,KAAZ,EAAmB;IAAA;;IAAA;;IACjB,0BAAMA,KAAN;;IADiB,4EAHJX,KAAK,CAACY,SAAN,EAGI;;IAAA,uDAFZ,CAAC,CAAD,EAAI,CAAJ,CAEY;;IAAA,+DASJL,OAAO,CAAC,UAACM,OAAD,EAAa;MAClC,oBAA6B,MAAKC,OAAlC;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;
|
|
1
|
+
{"version":3,"file":"ResponsiveContainer.js","names":["React","ResizeObserver","createComponent","Component","Root","sstyled","Box","trottle","fire","getOriginChildren","ResponsiveContainerRoot","props","createRef","entries","asProps","Children","aspect","$container","width","clientWidth","height","clientHeight","style","window","getComputedStyle","minHeight","Number","parseInt","getPropertyValue","maxHeight","size","forceUpdate","observer","handleResize","containerRef","current","observe","disconnect","SResponsiveContainer","styles","ResponsiveContainer"],"sources":["../../src/ResponsiveContainer.jsx"],"sourcesContent":["import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport trottle from '@semcore/utils/lib/rafTrottle';\nimport fire from '@semcore/utils/lib/fire';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\n\nclass ResponsiveContainerRoot extends Component {\n static displayName = 'ResponsiveContainer';\n\n containerRef = React.createRef();\n size = [0, 0];\n\n constructor(props) {\n super(props);\n this.observer = new ResizeObserver(this.handleResize);\n }\n\n get $container() {\n return this.containerRef.current;\n }\n\n handleResize = trottle((entries) => {\n const { Children, aspect } = this.asProps;\n\n if (!this.$container) return;\n\n let { clientWidth: width, clientHeight: height } = this.$container;\n\n if (aspect) {\n const style = window.getComputedStyle(this.$container);\n const minHeight = Number.parseInt(style.getPropertyValue('min-height'));\n const maxHeight = Number.parseInt(style.getPropertyValue('max-height'));\n height = width * aspect;\n\n if (height < minHeight) {\n height = minHeight;\n }\n if (height > maxHeight) {\n height = maxHeight;\n }\n }\n\n if (this.size[0] === width && this.size[1] === height) return;\n\n this.size = [width, height];\n\n fire(this, 'onResize', this.size, entries);\n\n if (typeof getOriginChildren(Children) === 'function') {\n this.forceUpdate();\n }\n });\n\n setContext() {\n const [width, height] = this.size;\n return {\n width,\n height,\n };\n }\n\n componentDidMount() {\n if (this.$container) {\n // TODO: may be we can increase perfomance here? (by lsroman)\n this.observer.observe(this.$container);\n }\n }\n\n // TODO component did update ref?\n\n componentWillUnmount() {\n this.observer.disconnect();\n }\n\n render() {\n const SResponsiveContainer = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SResponsiveContainer render={Box} ref={this.containerRef} />);\n }\n}\n\nconst ResponsiveContainer = createComponent(ResponsiveContainerRoot);\n\nexport default ResponsiveContainer;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AAEA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,EAA2CC,OAA3C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,OAAP,MAAoB,+BAApB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;;IAEMC,uB;;;;;EAMJ,iCAAYC,KAAZ,EAAmB;IAAA;;IAAA;;IACjB,0BAAMA,KAAN;;IADiB,4EAHJX,KAAK,CAACY,SAAN,EAGI;;IAAA,uDAFZ,CAAC,CAAD,EAAI,CAAJ,CAEY;;IAAA,+DASJL,OAAO,CAAC,UAACM,OAAD,EAAa;MAClC,oBAA6B,MAAKC,OAAlC;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;MAEA,IAAI,CAAC,MAAKC,UAAV,EAAs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,EAANA;MAFK,CAAP;IAID;;;WAED,6BAAoB;MAClB,IAAI,KAAKH,UAAT,EAAqB;QACnB;QACA,KAAKe,QAAL,CAAcI,OAAd,CAAsB,KAAKnB,UAA3B;MACD;IACF,C,CAED;;;;WAEA,gCAAuB;MACrB,KAAKe,QAAL,CAAcK,UAAd;IACD;;;WAED,kBAAS;MAAA;MAAA;;MACP,IAAMC,oBAAoB,GAE2BhC,GAFrD;MACA,IAAQiC,MAAR,GAAmB,KAAKzB,OAAxB,CAAQyB,MAAR;MACA,eAAOlC,OAAO,CAACkC,MAAD,CAAd,eAAuB,oBAAC,oBAAD;QAAA,OAAwC,KAAKL;MAA7C,WAAvB;IACD;;;;EAxEmC/B,S;;gBAAhCO,uB,iBACiB,qB;;AA0EvB,IAAM8B,mBAAmB,GAAGtC,eAAe,CAACQ,uBAAD,CAA3C;AAEA,eAAe8B,mBAAf"}
|
package/lib/es6/ScatterPlot.js
CHANGED
|
@@ -29,16 +29,16 @@ var style = (
|
|
|
29
29
|
/*__reshadow_css_start__*/
|
|
30
30
|
_sstyled.insert(
|
|
31
31
|
/*__inner_css_start__*/
|
|
32
|
-
".
|
|
32
|
+
".___SScatterPlot_vf7hu_gg_{fill:#2bb3ff;transition-property:cx,cy;transition-duration:var(--duration_vf7hu);transition-timing-function:ease-in-out;opacity:.5}.___SScatterPlot_vf7hu_gg_:hover{opacity:.8}.___SScatterPlot_vf7hu_gg_.__color_vf7hu_gg_{fill:var(--color_vf7hu)}.___SValue_vf7hu_gg_{text-anchor:middle;font-size:10px;stroke:#008ff8}.___SValue_vf7hu_gg_.__color_vf7hu_gg_{stroke:var(--color_vf7hu)}"
|
|
33
33
|
/*__inner_css_end__*/
|
|
34
|
-
, "
|
|
34
|
+
, "vf7hu_gg_")
|
|
35
35
|
/*__reshadow_css_end__*/
|
|
36
36
|
, {
|
|
37
|
-
"__SScatterPlot": "
|
|
38
|
-
"--duration": "--
|
|
39
|
-
"_color": "
|
|
40
|
-
"--color": "--
|
|
41
|
-
"__SValue": "
|
|
37
|
+
"__SScatterPlot": "___SScatterPlot_vf7hu_gg_",
|
|
38
|
+
"--duration": "--duration_vf7hu",
|
|
39
|
+
"_color": "__color_vf7hu_gg_",
|
|
40
|
+
"--color": "--color_vf7hu",
|
|
41
|
+
"__SValue": "___SValue_vf7hu_gg_"
|
|
42
42
|
});
|
|
43
43
|
import ClipPath from './ClipPath';
|
|
44
44
|
|
package/lib/es6/StackBar.js
CHANGED
|
@@ -27,15 +27,15 @@ var _ref = (
|
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
__css__(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
".
|
|
30
|
+
".___SBar_ns3re_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_ns3re_gg_.__color_ns3re_gg_{fill:var(--color)}.___SBar_ns3re_gg_.__hide_ns3re_gg_{display:none}.___SBackground_ns3re_gg_{fill:#c4c7cf}"
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
|
-
, "
|
|
32
|
+
, "bmt5z6_gg_")
|
|
33
33
|
/*__reshadow_css_end__*/
|
|
34
34
|
, {
|
|
35
|
-
"__SBar": "
|
|
36
|
-
"_color": "
|
|
37
|
-
"_hide": "
|
|
38
|
-
"__SBackground": "
|
|
35
|
+
"__SBar": "___SBar_ns3re_gg_",
|
|
36
|
+
"_color": "__color_ns3re_gg_",
|
|
37
|
+
"_hide": "__hide_ns3re_gg_",
|
|
38
|
+
"__SBackground": "___SBackground_ns3re_gg_"
|
|
39
39
|
}),
|
|
40
40
|
style = _extends({}, _ref);
|
|
41
41
|
|
package/lib/es6/StackedArea.js
CHANGED
|
@@ -26,16 +26,16 @@ var _ref = (
|
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
__css__(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
29
|
+
".___SArea_gga8q_gg_{fill:#2bb3ff;fill-opacity:.2}.___SArea_gga8q_gg_.__color_gga8q_gg_{fill:var(--color)}.___SAreaLine_gga8q_gg_{stroke:#2bb3ff;stroke-width:3;fill:transparent}.___SAreaLine_gga8q_gg_.__color_gga8q_gg_{stroke:var(--color)}.___SArea_gga8q_gg_,.___SAreaLine_gga8q_gg_{transition-property:d;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SNull_gga8q_gg_{fill:transparent;stroke:#8a8e9b;stroke-dasharray:4}.___SNull_gga8q_gg_.__hide_gga8q_gg_{display:none}"
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
, "
|
|
31
|
+
, "impyjf_gg_")
|
|
32
32
|
/*__reshadow_css_end__*/
|
|
33
33
|
, {
|
|
34
|
-
"__SArea": "
|
|
35
|
-
"_color": "
|
|
36
|
-
"__SAreaLine": "
|
|
37
|
-
"__SNull": "
|
|
38
|
-
"_hide": "
|
|
34
|
+
"__SArea": "___SArea_gga8q_gg_",
|
|
35
|
+
"_color": "__color_gga8q_gg_",
|
|
36
|
+
"__SAreaLine": "___SAreaLine_gga8q_gg_",
|
|
37
|
+
"__SNull": "___SNull_gga8q_gg_",
|
|
38
|
+
"_hide": "__hide_gga8q_gg_"
|
|
39
39
|
}),
|
|
40
40
|
style = _extends({}, _ref);
|
|
41
41
|
|
package/lib/es6/Tooltip.js
CHANGED
|
@@ -34,17 +34,17 @@ var style = (
|
|
|
34
34
|
/*__reshadow_css_start__*/
|
|
35
35
|
_sstyled.insert(
|
|
36
36
|
/*__inner_css_start__*/
|
|
37
|
-
".
|
|
37
|
+
".___STooltip_18frv_gg_{font-size:12px;line-height:1.33;position:relative;background-color:#fff;border-radius:6px;border:1px solid #e0e1e9;box-sizing:border-box;box-shadow:0px 1px 12px 0px rgba(25, 27, 35, 0.15);padding:12px}.___STitle_18frv_gg_{color:#6c6e79;margin-bottom:8px}.___SDotGroup_18frv_gg_{display:flex;align-items:center}.___SDot_18frv_gg_{width:8px;height:8px;border-radius:50%;margin-right:8px;background:#2bb3ff}.___SDot_18frv_gg_.__color_18frv_gg_{background:var(--color_18frv)}"
|
|
38
38
|
/*__inner_css_end__*/
|
|
39
|
-
, "
|
|
39
|
+
, "18frv_gg_")
|
|
40
40
|
/*__reshadow_css_end__*/
|
|
41
41
|
, {
|
|
42
|
-
"__STooltip": "
|
|
43
|
-
"__STitle": "
|
|
44
|
-
"__SDotGroup": "
|
|
45
|
-
"__SDot": "
|
|
46
|
-
"_color": "
|
|
47
|
-
"--color": "--
|
|
42
|
+
"__STooltip": "___STooltip_18frv_gg_",
|
|
43
|
+
"__STitle": "___STitle_18frv_gg_",
|
|
44
|
+
"__SDotGroup": "___SDotGroup_18frv_gg_",
|
|
45
|
+
"__SDot": "___SDot_18frv_gg_",
|
|
46
|
+
"_color": "__color_18frv_gg_",
|
|
47
|
+
"--color": "--color_18frv"
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
var TooltipRoot = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Venn.js
CHANGED
|
@@ -26,16 +26,16 @@ var style = (
|
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
_sstyled.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
29
|
+
".___SCircle_5ve8g_gg_{fill:#59ddaa;stroke:#fff;stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_5ve8g);transition-timing-function:ease-in-out}.___SCircle_5ve8g_gg_:hover{fill-opacity:.7}.___SCircle_5ve8g_gg_.__color_5ve8g_gg_{fill:var(--color_5ve8g)}.___SIntersection_5ve8g_gg_{stroke:#fff;stroke-width:2px;fill-opacity:0}.___SIntersection_5ve8g_gg_:hover{fill-opacity:.1}"
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
, "
|
|
31
|
+
, "5ve8g_gg_")
|
|
32
32
|
/*__reshadow_css_end__*/
|
|
33
33
|
, {
|
|
34
|
-
"__SCircle": "
|
|
35
|
-
"--duration": "--
|
|
36
|
-
"_color": "
|
|
37
|
-
"--color": "--
|
|
38
|
-
"__SIntersection": "
|
|
34
|
+
"__SCircle": "___SCircle_5ve8g_gg_",
|
|
35
|
+
"--duration": "--duration_5ve8g",
|
|
36
|
+
"_color": "__color_5ve8g_gg_",
|
|
37
|
+
"--color": "--color_5ve8g",
|
|
38
|
+
"__SIntersection": "___SIntersection_5ve8g_gg_"
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
var VennRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
4
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
4
5
|
import { assignProps as _assignProps3 } from "@semcore/core";
|
|
@@ -19,20 +20,22 @@ var styles = (
|
|
|
19
20
|
/*__reshadow_css_start__*/
|
|
20
21
|
_sstyled.insert(
|
|
21
22
|
/*__inner_css_start__*/
|
|
22
|
-
".
|
|
23
|
+
".___SPlotA11yModule_1toaf_gg_{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1toaf_gg_:focus{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1}"
|
|
23
24
|
/*__inner_css_end__*/
|
|
24
|
-
, "
|
|
25
|
+
, "1toaf_gg_")
|
|
25
26
|
/*__reshadow_css_end__*/
|
|
26
27
|
, {
|
|
27
|
-
"__SPlotA11yModule": "
|
|
28
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1toaf_gg_"
|
|
28
29
|
});
|
|
30
|
+
import { Context as I18nContext } from '@semcore/utils/lib/enhances/WithI18n';
|
|
31
|
+
import { Box } from '@semcore/flex-box';
|
|
29
32
|
var globalWasFocused = false;
|
|
30
33
|
var globalNavWithKeyboard = false;
|
|
31
34
|
export var PlotA11yModule = function PlotA11yModule(props) {
|
|
32
35
|
var _ref = arguments[0],
|
|
33
36
|
_ref5;
|
|
34
37
|
|
|
35
|
-
var SPlotA11yModule =
|
|
38
|
+
var SPlotA11yModule = Box;
|
|
36
39
|
|
|
37
40
|
var _React$useState = React.useState(globalWasFocused),
|
|
38
41
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -64,8 +67,11 @@ export var PlotA11yModule = function PlotA11yModule(props) {
|
|
|
64
67
|
error = _React$useState10[0],
|
|
65
68
|
setError = _React$useState10[1];
|
|
66
69
|
|
|
70
|
+
var contextLocale = React.useContext(I18nContext);
|
|
67
71
|
var locale = React.useMemo(function () {
|
|
68
|
-
|
|
72
|
+
var _props$locale;
|
|
73
|
+
|
|
74
|
+
return normalizeLocale((_props$locale = props.locale) !== null && _props$locale !== void 0 ? _props$locale : contextLocale, translations);
|
|
69
75
|
}, [props.locale]);
|
|
70
76
|
var texts = React.useMemo(function () {
|
|
71
77
|
return locale ? translations[locale] : {};
|
|
@@ -131,7 +137,9 @@ export var PlotA11yModule = function PlotA11yModule(props) {
|
|
|
131
137
|
if (plotA11yView) {
|
|
132
138
|
var _ref2;
|
|
133
139
|
|
|
134
|
-
return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(plotA11yView.Component, props
|
|
140
|
+
return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(plotA11yView.Component, _extends({}, props, {
|
|
141
|
+
locale: locale
|
|
142
|
+
}));
|
|
135
143
|
}
|
|
136
144
|
|
|
137
145
|
if (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotA11yModule.js","names":["React","normalizeLocale","translations","Root","sstyled","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","SPlotA11yModule","useState","wasFocused","setWasFocused","navWithKeyboard","setNavWithKeyboard","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","loading","setLoading","error","setError","locale","useMemo","texts","useEffect","focusListener","plotRef","current","addEventListener","removeEventListener","keyboardListener","event","navigationKeys","includes","key","document","body","shouldDisplayView","then","PlotA11yView","Component","console","styles","failed","disabled"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import React from 'react';\nimport { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport { translations } from './translations/module/translations';\nimport { Root, sstyled } from '@semcore/core';\nimport styles from '../style/plotA11yModule.shadow.css';\n\nlet globalWasFocused = false;\nlet globalNavWithKeyboard = false;\n\nexport type A11yViewProps = {\n id: string;\n data: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope\n plotRef: React.RefObject<Element>;\n};\n\nexport const PlotA11yModule: React.FC<A11yViewProps> = (props) => {\n const SPlotA11yModule = Root;\n const [wasFocused, setWasFocused] = React.useState(globalWasFocused);\n const [navWithKeyboard, setNavWithKeyboard] = React.useState(globalNavWithKeyboard);\n const [plotA11yView, setPlotA11yView] = React.useState<{\n Component: React.FC<A11yViewProps>;\n } | null>(null);\n\n const hadnleHiddenElementsFocus = React.useCallback(() => {\n setWasFocused(true);\n setNavWithKeyboard(true);\n }, []);\n\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState<Error | null>(null);\n\n const locale = React.useMemo(() => normalizeLocale(props.locale, translations)
|
|
1
|
+
{"version":3,"file":"PlotA11yModule.js","names":["React","normalizeLocale","translations","Root","sstyled","Context","I18nContext","Box","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","SPlotA11yModule","useState","wasFocused","setWasFocused","navWithKeyboard","setNavWithKeyboard","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","loading","setLoading","error","setError","contextLocale","useContext","locale","useMemo","texts","useEffect","focusListener","plotRef","current","addEventListener","removeEventListener","keyboardListener","event","navigationKeys","includes","key","document","body","shouldDisplayView","then","PlotA11yView","Component","console","styles","failed","disabled"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import React from 'react';\nimport { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport { translations } from './translations/module/translations';\nimport { Root, sstyled } from '@semcore/core';\nimport styles from '../style/plotA11yModule.shadow.css';\nimport { Context as I18nContext } from '@semcore/utils/lib/enhances/WithI18n';\nimport { Box } from '@semcore/flex-box';\n\nlet globalWasFocused = false;\nlet globalNavWithKeyboard = false;\n\nexport type A11yViewProps = {\n id: string;\n data: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope\n plotRef: React.RefObject<Element>;\n};\n\nexport const PlotA11yModule: React.FC<A11yViewProps> = (props) => {\n const SPlotA11yModule = Root;\n const [wasFocused, setWasFocused] = React.useState(globalWasFocused);\n const [navWithKeyboard, setNavWithKeyboard] = React.useState(globalNavWithKeyboard);\n const [plotA11yView, setPlotA11yView] = React.useState<{\n Component: React.FC<A11yViewProps>;\n } | null>(null);\n\n const hadnleHiddenElementsFocus = React.useCallback(() => {\n setWasFocused(true);\n setNavWithKeyboard(true);\n }, []);\n\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState<Error | null>(null);\n\n const contextLocale = React.useContext(I18nContext);\n const locale = React.useMemo(\n () => normalizeLocale(props.locale ?? contextLocale, translations),\n [props.locale],\n );\n const texts = React.useMemo(() => (locale ? translations[locale] : {}), [locale]);\n\n React.useEffect(() => {\n if (wasFocused) return;\n const focusListener = () => {\n globalWasFocused = true;\n setWasFocused(true);\n };\n\n props.plotRef.current?.addEventListener('focus', focusListener);\n return () => props.plotRef.current?.removeEventListener('focus', focusListener);\n }, [wasFocused, props.plotRef]);\n React.useEffect(() => {\n if (navWithKeyboard) return;\n const keyboardListener = (event: Event) => {\n const navigationKeys = [\n 'Tab',\n 'ArrowUp',\n 'ArrowLeft',\n 'ArrowDown',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowLeft',\n ];\n if ('key' in event && navigationKeys.includes((event as KeyboardEvent).key)) {\n setNavWithKeyboard(true);\n globalNavWithKeyboard = true;\n }\n };\n document.body?.addEventListener('keydown', keyboardListener);\n return () => document.body?.removeEventListener('keydown', keyboardListener);\n }, [navWithKeyboard]);\n\n const shouldDisplayView = wasFocused && navWithKeyboard;\n\n React.useEffect(() => {\n if (!shouldDisplayView) return;\n if (plotA11yView) return;\n if (loading) return;\n\n setLoading(true);\n\n import('./PlotA11yView')\n .then(({ PlotA11yView }) => {\n setPlotA11yView({ Component: PlotA11yView });\n setLoading(false);\n setError(null);\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.error(error);\n setError(error);\n });\n }, [plotA11yView, shouldDisplayView, loading, setLoading]);\n\n if (plotA11yView) {\n return sstyled(styles)(\n <plotA11yView.Component {...props} locale={locale!} />,\n ) as React.ReactElement;\n }\n\n if (error) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live=\"assertive\">\n {texts.failed}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n if (loading) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live=\"polite\">\n {texts.loading}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} onFocus={hadnleHiddenElementsFocus}>\n {texts.disabled}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n};\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,eAAT,QAAgC,UAAhC;AACA,SAASC,YAAT,QAA6B,oCAA7B;AACA,SAASC,IAAT,EAAeC,OAAf,QAA8B,eAA9B;;;;;;;;;;;;;;AAEA,SAASC,OAAO,IAAIC,WAApB,QAAuC,sCAAvC;AACA,SAASC,GAAT,QAAoB,mBAApB;AA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A,WAAoD7B;EAApD,YACGU,KAAK,CAACqB,QADT,CADF;AAKD,CAtGM"}
|
|
@@ -27,14 +27,15 @@ var styles = (
|
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
_sstyled.insert(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
".
|
|
30
|
+
".___SPlotA11yView_pwg9z_gg_{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:#fff;color:#000;border:3px solid #000;font-size:10px;padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_pwg9z_gg_:focus,.___SPlotA11yView_pwg9z_gg_.__focus-within_pwg9z_gg_{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_pwg9z_gg_:focus,.___SPlotA11yView_pwg9z_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_pwg9z_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:8px;display:block}.___SPlotA11yView_pwg9z_gg_ table,.___SPlotA11yView_pwg9z_gg_ td,.___SPlotA11yView_pwg9z_gg_ th{border:1px solid #000}"
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
|
-
, "
|
|
32
|
+
, "pwg9z_gg_")
|
|
33
33
|
/*__reshadow_css_end__*/
|
|
34
34
|
, {
|
|
35
|
-
"__SPlotA11yView": "
|
|
36
|
-
"_focus-within": "__focus-
|
|
35
|
+
"__SPlotA11yView": "___SPlotA11yView_pwg9z_gg_",
|
|
36
|
+
"_focus-within": "__focus-within_pwg9z_gg_"
|
|
37
37
|
});
|
|
38
|
+
import { Box } from '@semcore/flex-box';
|
|
38
39
|
export var PlotA11yView = function PlotA11yView(_ref3) {
|
|
39
40
|
var _ref = arguments[0],
|
|
40
41
|
_ref2;
|
|
@@ -46,7 +47,7 @@ export var PlotA11yView = function PlotA11yView(_ref3) {
|
|
|
46
47
|
plotRef = _ref3.plotRef,
|
|
47
48
|
providedConfig = _ref3.config,
|
|
48
49
|
locale = _ref3.locale;
|
|
49
|
-
var SPlotA11yView =
|
|
50
|
+
var SPlotA11yView = Box;
|
|
50
51
|
var intl = React.useMemo(function () {
|
|
51
52
|
return getIntl(locale);
|
|
52
53
|
}, [locale]);
|