@semcore/d3-chart 16.1.1 → 16.1.2-prerelease.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 +6 -0
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +13 -13
- 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 +3 -3
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/RadialTree.js.map +1 -1
- 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 +3 -2
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/a11y/locale.js +1 -0
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.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/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Reference.d.js.map +1 -1
- package/lib/cjs/utils.js +1 -0
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +13 -13
- 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 +3 -3
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/RadialTree.js.map +1 -1
- 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 +3 -2
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/a11y/locale.js +1 -0
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.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/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Reference.d.js.map +1 -1
- package/lib/es6/utils.js +1 -0
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/Area.mjs +12 -12
- package/lib/esm/Axis.mjs +15 -15
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +14 -14
- package/lib/esm/CompactHorizontalBar.mjs +17 -17
- package/lib/esm/Donut.mjs +10 -10
- package/lib/esm/Dots.mjs +9 -9
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +4 -4
- package/lib/esm/Line.mjs +10 -10
- package/lib/esm/Plot.mjs +4 -4
- package/lib/esm/Radar.mjs +20 -20
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ScatterPlot.mjs +10 -10
- package/lib/esm/Tooltip.mjs +10 -10
- package/lib/esm/Venn.mjs +10 -10
- package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +18 -18
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +7 -7
- package/lib/types/Plot.d.ts +1 -0
- package/lib/types/RadialTree.d.ts +1 -0
- package/lib/types/Reference.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +6 -0
- package/lib/types/component/Chart/BarChart.type.d.ts +5 -0
- package/lib/types/component/Chart/BubbleChart.type.d.ts +3 -0
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +5 -0
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +4 -0
- package/lib/types/component/Chart/DonutChart.type.d.ts +6 -0
- package/lib/types/component/Chart/HistogramChart.type.d.ts +3 -0
- package/lib/types/component/Chart/LineChart.type.d.ts +7 -0
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +4 -0
- package/lib/types/component/Chart/VennChart.type.d.ts +3 -0
- package/package.json +17 -17
package/lib/es6/ScatterPlot.js
CHANGED
|
@@ -18,17 +18,17 @@ import React from 'react';
|
|
|
18
18
|
import createElement from './createElement';
|
|
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__*/".
|
|
21
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_1bcfa_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy;transition-duration:var(--duration_1bcfa);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_1bcfa_gg_:hover{opacity:.8}}.___SScatterPlot_1bcfa_gg_.__color_1bcfa_gg_{fill:var(--color_1bcfa)}.___SScatterPlot_1bcfa_gg_.__pattern_1bcfa_gg_.__color_1bcfa_gg_{fill:var(--pattern_1bcfa);stroke:var(--color_1bcfa);stroke-width:1px}.___SScatterPlot_1bcfa_gg_.__transparent_1bcfa_gg_{opacity:.3}.___SValue_1bcfa_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50, 10px);stroke:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SValue_1bcfa_gg_.__color_1bcfa_gg_{stroke:var(--color_1bcfa)}.___SValue_1bcfa_gg_.__transparent_1bcfa_gg_{opacity:.3}", /*__inner_css_end__*/"1bcfa_gg_"),
|
|
22
22
|
/*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SScatterPlot": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"--color": "--
|
|
27
|
-
"_pattern": "
|
|
28
|
-
"--pattern": "--
|
|
29
|
-
"_transparent": "
|
|
30
|
-
"__SValue": "
|
|
31
|
-
"--duration": "--
|
|
24
|
+
"__SScatterPlot": "___SScatterPlot_1bcfa_gg_",
|
|
25
|
+
"_color": "__color_1bcfa_gg_",
|
|
26
|
+
"--color": "--color_1bcfa",
|
|
27
|
+
"_pattern": "__pattern_1bcfa_gg_",
|
|
28
|
+
"--pattern": "--pattern_1bcfa",
|
|
29
|
+
"_transparent": "__transparent_1bcfa_gg_",
|
|
30
|
+
"__SValue": "___SValue_1bcfa_gg_",
|
|
31
|
+
"--duration": "--duration_1bcfa"
|
|
32
32
|
});
|
|
33
33
|
import Tooltip from './Tooltip';
|
|
34
34
|
import { getScatterPlotRadius } from './utils';
|
package/lib/es6/Tooltip.js
CHANGED
|
@@ -24,17 +24,17 @@ import React from 'react';
|
|
|
24
24
|
import createElement from './createElement';
|
|
25
25
|
import { PatternSymbol } from './Pattern';
|
|
26
26
|
/*!__reshadow-styles__:"./style/tooltip.shadow.css"*/
|
|
27
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
27
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STooltip_1r5oq_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_1r5oq_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SDotGroup_1r5oq_gg_{display:flex;align-items:center}.___SDot_1r5oq_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDotCircle_1r5oq_gg_.__color_1r5oq_gg_{background-color:var(--color_1r5oq);width:8px;height:8px;border-radius:50%}.___SFooter_1r5oq_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__*/"1r5oq_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__STooltip": "
|
|
31
|
-
"__STitle": "
|
|
32
|
-
"__SDotGroup": "
|
|
33
|
-
"__SDot": "
|
|
34
|
-
"__SDotCircle": "
|
|
35
|
-
"_color": "
|
|
36
|
-
"--color": "--
|
|
37
|
-
"__SFooter": "
|
|
30
|
+
"__STooltip": "___STooltip_1r5oq_gg_",
|
|
31
|
+
"__STitle": "___STitle_1r5oq_gg_",
|
|
32
|
+
"__SDotGroup": "___SDotGroup_1r5oq_gg_",
|
|
33
|
+
"__SDot": "___SDot_1r5oq_gg_",
|
|
34
|
+
"__SDotCircle": "___SDotCircle_1r5oq_gg_",
|
|
35
|
+
"_color": "__color_1r5oq_gg_",
|
|
36
|
+
"--color": "--color_1r5oq",
|
|
37
|
+
"__SFooter": "___SFooter_1r5oq_gg_"
|
|
38
38
|
});
|
|
39
39
|
import { getChartDefaultColorName } from './utils';
|
|
40
40
|
|
package/lib/es6/Venn.js
CHANGED
|
@@ -20,17 +20,17 @@ import React from 'react';
|
|
|
20
20
|
import createElement from './createElement';
|
|
21
21
|
import { PatternFill } from './Pattern';
|
|
22
22
|
/*!__reshadow-styles__:"./style/venn.shadow.css"*/
|
|
23
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
23
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCircle_1g423_gg_,.___SIntersection_1g423_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px}.___SCircle_1g423_gg_{fill:var(--intergalactic-chart-palette-order-2, #59ddaa);fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1g423);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_1g423_gg_:hover{fill-opacity:.7}}.___SCircle_1g423_gg_.__color_1g423_gg_{fill:var(--color_1g423)}.___SCircle_1g423_gg_.__pattern_1g423_gg_.__color_1g423_gg_{fill:var(--pattern_1g423);fill-opacity:.7;stroke:var(--color_1g423);stroke-width:1px}@media (hover:hover){.___SCircle_1g423_gg_.__pattern_1g423_gg_.__color_1g423_gg_:hover{fill-opacity:.85}}.___SCircle_1g423_gg_.__transparent_1g423_gg_{opacity:.3}.___SIntersection_1g423_gg_{fill-opacity:0}@media (hover:hover){.___SIntersection_1g423_gg_:hover{fill-opacity:.1}}.___SIntersection_1g423_gg_.__transparent_1g423_gg_{opacity:.3}", /*__inner_css_end__*/"1g423_gg_"),
|
|
24
24
|
/*__reshadow_css_end__*/
|
|
25
25
|
{
|
|
26
|
-
"__SCircle": "
|
|
27
|
-
"_color": "
|
|
28
|
-
"--color": "--
|
|
29
|
-
"_transparent": "
|
|
30
|
-
"__SIntersection": "
|
|
31
|
-
"--duration": "--
|
|
32
|
-
"_pattern": "
|
|
33
|
-
"--pattern": "--
|
|
26
|
+
"__SCircle": "___SCircle_1g423_gg_",
|
|
27
|
+
"_color": "__color_1g423_gg_",
|
|
28
|
+
"--color": "--color_1g423",
|
|
29
|
+
"_transparent": "__transparent_1g423_gg_",
|
|
30
|
+
"__SIntersection": "___SIntersection_1g423_gg_",
|
|
31
|
+
"--duration": "--duration_1g423",
|
|
32
|
+
"_pattern": "__pattern_1g423_gg_",
|
|
33
|
+
"--pattern": "--pattern_1g423"
|
|
34
34
|
});
|
|
35
35
|
import Tooltip from './Tooltip';
|
|
36
36
|
import { getChartDefaultColorName } from './utils';
|
|
@@ -11,10 +11,10 @@ import { Box } from '@semcore/flex-box';
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { normalizeLocale } from './locale';
|
|
13
13
|
/*!__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
|
|
14
|
-
var styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
var styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yModule_1mrqn_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1mrqn_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}", /*__inner_css_end__*/"1mrqn_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SPlotA11yModule": "
|
|
17
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1mrqn_gg_"
|
|
18
18
|
});
|
|
19
19
|
import { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';
|
|
20
20
|
var globalWasFocused = false;
|
|
@@ -96,6 +96,7 @@ export var PlotA11yModule = function PlotA11yModule(props) {
|
|
|
96
96
|
setLoading(false);
|
|
97
97
|
setError(null);
|
|
98
98
|
})["catch"](function (error) {
|
|
99
|
+
// eslint-disable-next-line no-console
|
|
99
100
|
console.error(error);
|
|
100
101
|
setError(error);
|
|
101
102
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotA11yModule.js","names":["Root","sstyled","Context","I18nContext","useI18n","Box","React","normalizeLocale","styles","_sstyled","insert","localizedMessages","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","_ref","arguments[0]","_ref5","SPlotA11yModule","_React$useState","useState","_React$useState2","_slicedToArray","wasFocused","setWasFocused","_React$useState3","_React$useState4","navWithKeyboard","setNavWithKeyboard","_React$useState5","_React$useState6","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","_React$useState7","_React$useState8","loading","setLoading","_React$useState9","_React$useState0","error","setError","contextLocale","useContext","locale","useMemo","_props$locale","t","useEffect","_props$plotRef$curren","focusListener","plotRef","current","addEventListener","_props$plotRef$curren2","removeEventListener","_document$body","keyboardListener","event","navigationKeys","includes","key","document","body","_document$body2","shouldDisplayView","then","_ref6","PlotA11yView","Component","console","_ref2","createElement","_extends","_ref3","cn","_objectSpread","_assignProps","_ref4","_assignProps2","_assignProps3"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import { Root, sstyled } from '@semcore/core';\nimport { Context as I18nContext, useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';\nimport { Box } from '@semcore/flex-box';\nimport React from 'react';\n\nimport type { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport styles from '../style/plotA11yModule.shadow.css';\nimport { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';\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\n plotRef: React.RefObject<HTMLElement>;\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, localizedMessages),\n [props.locale],\n );\n const t = useI18n(localizedMessages, 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 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 {t('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 {t('loading')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} onFocus={hadnleHiddenElementsFocus}>\n {t('disabled')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n};\n"],"mappings":";;;;;;;AAAA,SAASA,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC7C,SAASC,OAAO,IAAIC,WAAW,EAAEC,OAAO,QAAQ,2CAA2C;AAC3F,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,KAAK,MAAM,OAAO;AAGzB,SAASC,eAAe,QAAQ,UAAU;AAAC;AAAA,IAAAC,MAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;AAAA;AAE3C,SAASC,iBAAiB,QAAQ,uDAAuD;AAEzF,IAAIC,gBAAgB,GAAG,KAAK;AAC5B,IAAIC,qBAAqB,GAAG,KAAK;AAajC,OAAO,IAAMC,cAAuC,GAAG,SAA1CA,cAAuCA,CAAIC,KAAK,EAAK;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EAChE,IAAMC,eAAe,
|
|
1
|
+
{"version":3,"file":"PlotA11yModule.js","names":["Root","sstyled","Context","I18nContext","useI18n","Box","React","normalizeLocale","styles","_sstyled","insert","localizedMessages","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","_ref","arguments[0]","_ref5","SPlotA11yModule","_React$useState","useState","_React$useState2","_slicedToArray","wasFocused","setWasFocused","_React$useState3","_React$useState4","navWithKeyboard","setNavWithKeyboard","_React$useState5","_React$useState6","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","_React$useState7","_React$useState8","loading","setLoading","_React$useState9","_React$useState0","error","setError","contextLocale","useContext","locale","useMemo","_props$locale","t","useEffect","_props$plotRef$curren","focusListener","plotRef","current","addEventListener","_props$plotRef$curren2","removeEventListener","_document$body","keyboardListener","event","navigationKeys","includes","key","document","body","_document$body2","shouldDisplayView","then","_ref6","PlotA11yView","Component","console","_ref2","createElement","_extends","_ref3","cn","_objectSpread","_assignProps","_ref4","_assignProps2","_assignProps3"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import { Root, sstyled } from '@semcore/core';\nimport { Context as I18nContext, useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';\nimport { Box } from '@semcore/flex-box';\nimport React from 'react';\n\nimport type { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport styles from '../style/plotA11yModule.shadow.css';\nimport { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';\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\n plotRef: React.RefObject<HTMLElement>;\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, localizedMessages),\n [props.locale],\n );\n const t = useI18n(localizedMessages, 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 {t('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 {t('loading')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} onFocus={hadnleHiddenElementsFocus}>\n {t('disabled')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -12,10 +12,10 @@ import { makeDataSummarizationConfig } from './hints';
|
|
|
12
12
|
import { getIntl } from './intl';
|
|
13
13
|
import { summarize } from './summarize';
|
|
14
14
|
/*!__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
|
|
15
|
-
var styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
15
|
+
var styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yView_otrv4_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;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);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_otrv4_gg_:focus,.___SPlotA11yView_otrv4_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_otrv4_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_otrv4_gg_ table,.___SPlotA11yView_otrv4_gg_ td,.___SPlotA11yView_otrv4_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}", /*__inner_css_end__*/"otrv4_gg_"),
|
|
16
16
|
/*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SPlotA11yView": "
|
|
18
|
+
"__SPlotA11yView": "___SPlotA11yView_otrv4_gg_"
|
|
19
19
|
});
|
|
20
20
|
import { localizedMessages } from './translations/view/__intergalactic-dynamic-locales';
|
|
21
21
|
export var PlotA11yView = function PlotA11yView(_ref3) {
|
package/lib/es6/a11y/locale.js
CHANGED
|
@@ -20,6 +20,7 @@ export var normalizeLocale = function normalizeLocale(providedLocale) {
|
|
|
20
20
|
if (!translations[locale]) {
|
|
21
21
|
var availableLocales = Object.keys(translations).join(', ');
|
|
22
22
|
if (process.env.NODE_ENV !== 'production') {
|
|
23
|
+
// eslint-disable-next-line no-console
|
|
23
24
|
console.error("[Intergalactic @semcore/d3-charts a11y module]: No locale \"".concat(providedLocale, "\" available. Available locales: ").concat(availableLocales));
|
|
24
25
|
}
|
|
25
26
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","names":["normalizeLocale","providedLocale","_ref","_globalThis$navigator","translations","arguments","length","undefined","translationNames","locale","toLowerCase","isAvailableLocale","globalThis","navigator","language","includes","_locale$split","split","_locale$split2","_slicedToArray","localeBase","availableLocales","Object","keys","join","process","env","NODE_ENV","console","error","concat","_locale$split3","_locale$split4"],"sources":["../../../src/a11y/locale.ts"],"sourcesContent":["export const normalizeLocale = (\n providedLocale: string,\n translations: { [locale: string]: {} } = {},\n) => {\n const translationNames: { [lowercasedName: string]: string } = {};\n for (const locale in translations) {\n translationNames[locale.toLowerCase()] = locale;\n }\n providedLocale =\n providedLocale ?? isAvailableLocale(globalThis?.navigator?.language, translations) ?? 'en';\n let locale = providedLocale.toLowerCase();\n if (locale.includes('-') && !translations[locale]) {\n const [localeBase] = locale.split('-');\n if (translations[localeBase]) {\n locale = localeBase;\n }\n }\n locale = translationNames[locale] ? translationNames[locale] : locale;\n if (!translations[locale]) {\n const availableLocales = Object.keys(translations).join(', ');\n if (process.env.NODE_ENV !== 'production') {\n console.error(\n `[Intergalactic @semcore/d3-charts a11y module]: No locale \"${providedLocale}\" available. Available locales: ${availableLocales}`,\n );\n }\n return null;\n }\n return locale;\n};\n\nconst isAvailableLocale = (locale: string, translations: { [locale: string]: {} }) => {\n if (typeof locale !== 'string') {\n return undefined;\n }\n const [localeBase] = locale.split('-');\n if (!translations[localeBase]) {\n return undefined;\n }\n return localeBase;\n};\n"],"mappings":";AAAA,OAAO,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAC1BC,cAAsB,EAEnB;EAAA,IAAAC,IAAA,EAAAC,qBAAA;EAAA,IADHC,YAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAMG,gBAAsD,GAAG,CAAC,CAAC;EACjE,KAAK,IAAMC,OAAM,IAAIL,YAAY,EAAE;IACjCI,gBAAgB,CAACC,OAAM,CAACC,WAAW,CAAC,CAAC,CAAC,GAAGD,OAAM;EACjD;EACAR,cAAc,IAAAC,IAAA,GACZD,cAAc,aAAdA,cAAc,cAAdA,cAAc,GAAIU,iBAAiB,CAACC,UAAU,aAAVA,UAAU,gBAAAT,qBAAA,GAAVS,UAAU,CAAEC,SAAS,cAAAV,qBAAA,uBAArBA,qBAAA,CAAuBW,QAAQ,EAAEV,YAAY,CAAC,cAAAF,IAAA,cAAAA,IAAA,GAAI,IAAI;EAC5F,IAAIO,MAAM,GAAGR,cAAc,CAACS,WAAW,CAAC,CAAC;EACzC,IAAID,MAAM,CAACM,QAAQ,CAAC,GAAG,CAAC,IAAI,CAACX,YAAY,CAACK,MAAM,CAAC,EAAE;IACjD,IAAAO,aAAA,GAAqBP,MAAM,CAACQ,KAAK,CAAC,GAAG,CAAC;MAAAC,cAAA,GAAAC,cAAA,CAAAH,aAAA;MAA/BI,UAAU,GAAAF,cAAA;IACjB,IAAId,YAAY,CAACgB,UAAU,CAAC,EAAE;MAC5BX,MAAM,GAAGW,UAAU;IACrB;EACF;EACAX,MAAM,GAAGD,gBAAgB,CAACC,MAAM,CAAC,GAAGD,gBAAgB,CAACC,MAAM,CAAC,GAAGA,MAAM;EACrE,IAAI,CAACL,YAAY,CAACK,MAAM,CAAC,EAAE;IACzB,IAAMY,gBAAgB,GAAGC,MAAM,CAACC,IAAI,CAACnB,YAAY,CAAC,CAACoB,IAAI,CAAC,IAAI,CAAC;IAC7D,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"locale.js","names":["normalizeLocale","providedLocale","_ref","_globalThis$navigator","translations","arguments","length","undefined","translationNames","locale","toLowerCase","isAvailableLocale","globalThis","navigator","language","includes","_locale$split","split","_locale$split2","_slicedToArray","localeBase","availableLocales","Object","keys","join","process","env","NODE_ENV","console","error","concat","_locale$split3","_locale$split4"],"sources":["../../../src/a11y/locale.ts"],"sourcesContent":["export const normalizeLocale = (\n providedLocale: string,\n translations: { [locale: string]: {} } = {},\n) => {\n const translationNames: { [lowercasedName: string]: string } = {};\n for (const locale in translations) {\n translationNames[locale.toLowerCase()] = locale;\n }\n providedLocale =\n providedLocale ?? isAvailableLocale(globalThis?.navigator?.language, translations) ?? 'en';\n let locale = providedLocale.toLowerCase();\n if (locale.includes('-') && !translations[locale]) {\n const [localeBase] = locale.split('-');\n if (translations[localeBase]) {\n locale = localeBase;\n }\n }\n locale = translationNames[locale] ? translationNames[locale] : locale;\n if (!translations[locale]) {\n const availableLocales = Object.keys(translations).join(', ');\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(\n `[Intergalactic @semcore/d3-charts a11y module]: No locale \"${providedLocale}\" available. Available locales: ${availableLocales}`,\n );\n }\n return null;\n }\n return locale;\n};\n\nconst isAvailableLocale = (locale: string, translations: { [locale: string]: {} }) => {\n if (typeof locale !== 'string') {\n return undefined;\n }\n const [localeBase] = locale.split('-');\n if (!translations[localeBase]) {\n return undefined;\n }\n return localeBase;\n};\n"],"mappings":";AAAA,OAAO,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAC1BC,cAAsB,EAEnB;EAAA,IAAAC,IAAA,EAAAC,qBAAA;EAAA,IADHC,YAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAMG,gBAAsD,GAAG,CAAC,CAAC;EACjE,KAAK,IAAMC,OAAM,IAAIL,YAAY,EAAE;IACjCI,gBAAgB,CAACC,OAAM,CAACC,WAAW,CAAC,CAAC,CAAC,GAAGD,OAAM;EACjD;EACAR,cAAc,IAAAC,IAAA,GACZD,cAAc,aAAdA,cAAc,cAAdA,cAAc,GAAIU,iBAAiB,CAACC,UAAU,aAAVA,UAAU,gBAAAT,qBAAA,GAAVS,UAAU,CAAEC,SAAS,cAAAV,qBAAA,uBAArBA,qBAAA,CAAuBW,QAAQ,EAAEV,YAAY,CAAC,cAAAF,IAAA,cAAAA,IAAA,GAAI,IAAI;EAC5F,IAAIO,MAAM,GAAGR,cAAc,CAACS,WAAW,CAAC,CAAC;EACzC,IAAID,MAAM,CAACM,QAAQ,CAAC,GAAG,CAAC,IAAI,CAACX,YAAY,CAACK,MAAM,CAAC,EAAE;IACjD,IAAAO,aAAA,GAAqBP,MAAM,CAACQ,KAAK,CAAC,GAAG,CAAC;MAAAC,cAAA,GAAAC,cAAA,CAAAH,aAAA;MAA/BI,UAAU,GAAAF,cAAA;IACjB,IAAId,YAAY,CAACgB,UAAU,CAAC,EAAE;MAC5BX,MAAM,GAAGW,UAAU;IACrB;EACF;EACAX,MAAM,GAAGD,gBAAgB,CAACC,MAAM,CAAC,GAAGD,gBAAgB,CAACC,MAAM,CAAC,GAAGA,MAAM;EACrE,IAAI,CAACL,YAAY,CAACK,MAAM,CAAC,EAAE;IACzB,IAAMY,gBAAgB,GAAGC,MAAM,CAACC,IAAI,CAACnB,YAAY,CAAC,CAACoB,IAAI,CAAC,IAAI,CAAC;IAC7D,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;MACzC;MACAC,OAAO,CAACC,KAAK,gEAAAC,MAAA,CACmD7B,cAAc,uCAAA6B,MAAA,CAAmCT,gBAAgB,CACjI,CAAC;IACH;IACA,OAAO,IAAI;EACb;EACA,OAAOZ,MAAM;AACf,CAAC;AAED,IAAME,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIF,MAAc,EAAEL,YAAsC,EAAK;EACpF,IAAI,OAAOK,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAOF,SAAS;EAClB;EACA,IAAAwB,cAAA,GAAqBtB,MAAM,CAACQ,KAAK,CAAC,GAAG,CAAC;IAAAe,cAAA,GAAAb,cAAA,CAAAY,cAAA;IAA/BX,UAAU,GAAAY,cAAA;EACjB,IAAI,CAAC5B,YAAY,CAACgB,UAAU,CAAC,EAAE;IAC7B,OAAOb,SAAS;EAClB;EACA,OAAOa,UAAU;AACnB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.type.js","names":[],"sources":["../../../../src/component/Chart/AreaChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type AreaChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type AreaChartProps = BaseChartProps<AreaChartData> & {\n groupKey: string;\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n showDots?: boolean;\n curve?: CurveFactory;\n stacked?: boolean;\n /** Callback triggered when a user clicks on a chart at a position corresponding to a data item */\n onClickArea?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type AreaChartType = Intergalactic.Component<typeof Flex, AreaChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"AreaChart.type.js","names":[],"sources":["../../../../src/component/Chart/AreaChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type AreaChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type AreaChartProps = BaseChartProps<AreaChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Controls whether to display dots on the area chart lines */\n showDots?: boolean;\n /** D3 curve factory for line interpolation (e.g., curveLinear, curveCardinal) */\n curve?: CurveFactory;\n /** Enables stacked area chart mode */\n stacked?: boolean;\n /** Callback triggered when a user clicks on a chart at a position corresponding to a data item */\n onClickArea?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type AreaChartType = Intergalactic.Component<typeof Flex, AreaChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarChart.type.js","names":[],"sources":["../../../../src/component/Chart/BarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\ntype TrendItem = {\n x: number;\n y: number;\n};\n\ntype BarKey = string;\n\nexport type BarChartData = Array<Record<BarKey, string | number | Date>>;\n\nexport type BarChartProps = BaseChartProps<BarChartData> & {\n groupKey: string;\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n type?: 'stack' | 'group';\n trend?: Record<LegendItemKey, TrendItem[]>;\n
|
|
1
|
+
{"version":3,"file":"BarChart.type.js","names":[],"sources":["../../../../src/component/Chart/BarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\ntype TrendItem = {\n x: number;\n y: number;\n};\n\ntype BarKey = string;\n\nexport type BarChartData = Array<Record<BarKey, string | number | Date>>;\n\nexport type BarChartProps = BaseChartProps<BarChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Controls whether bars are grouped side-by-side or stacked */\n type?: 'stack' | 'group';\n /** Optional trend line data to overlay on the bars */\n trend?: Record<LegendItemKey, TrendItem[]>;\n /** Handle click by `HoverRect`. `index` is an index of the data array. */\n onClickHoverRect?: (index: number, e: React.SyntheticEvent) => void;\n /** Handle click by Bar. */\n onClickBar?: (barItem: number, barKey: BarKey, e: React.SyntheticEvent) => void;\n};\n\nexport type BarChartType = Intergalactic.Component<typeof Flex, BarChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BubbleChart.type.js","names":[],"sources":["../../../../src/component/Chart/BubbleChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type ScaledValues = {\n x: number[];\n y: number[];\n};\n\nexport type BubbleChartData = Array<{\n x: number;\n y: number;\n value: number;\n label?: string;\n color?: string;\n}>;\n\nexport type BubbleChartProps = BaseChartProps<BubbleChartData> & {\n groupKey?: never;\n xScale?: ScaleLinear<any, any>;\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a bubble */\n onClickBubble?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type BubbleChartType = Intergalactic.Component<typeof Flex, BubbleChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"BubbleChart.type.js","names":[],"sources":["../../../../src/component/Chart/BubbleChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type ScaledValues = {\n x: number[];\n y: number[];\n};\n\nexport type BubbleChartData = Array<{\n x: number;\n y: number;\n value: number;\n label?: string;\n color?: string;\n}>;\n\nexport type BubbleChartProps = BaseChartProps<BubbleChartData> & {\n /** Field name that groups the data points */\n groupKey?: never;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a bubble */\n onClickBubble?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type BubbleChartType = Intergalactic.Component<typeof Flex, BubbleChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CigaretteChart.type.js","names":[],"sources":["../../../../src/component/Chart/CigaretteChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\ntype DataKey = string;\n\nexport type CigaretteChartData = Record<DataKey, number | typeof interpolateValue>;\n\nexport type CigaretteChartProps = Intergalactic.InternalTypings.EfficientOmit<\n BaseChartProps<CigaretteChartData>,\n 'xScale' | 'yScale'\n> & {\n tooltipTitle?: string;\n tooltipViewType?: 'all' | 'single';\n header?: React.ReactNode;\n duration?: number;\n onClick?: (key: DataKey, event: React.SyntheticEvent) => void;\n};\n\nexport type CigaretteChartType = Intergalactic.Component<'div', CigaretteChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"CigaretteChart.type.js","names":[],"sources":["../../../../src/component/Chart/CigaretteChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\ntype DataKey = string;\n\nexport type CigaretteChartData = Record<DataKey, number | typeof interpolateValue>;\n\nexport type CigaretteChartProps = Intergalactic.InternalTypings.EfficientOmit<\n BaseChartProps<CigaretteChartData>,\n 'xScale' | 'yScale'\n> & {\n /** Title text displayed in the tooltip */\n tooltipTitle?: string;\n /** Controls whether the tooltip shows all data or single item data */\n tooltipViewType?: 'all' | 'single';\n /** Header content for the chart */\n header?: React.ReactNode;\n /** Animation duration in milliseconds */\n duration?: number;\n /** Click handler that receives the data key and event */\n onClick?: (key: DataKey, event: React.SyntheticEvent) => void;\n};\n\nexport type CigaretteChartType = Intergalactic.Component<'div', CigaretteChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactHorizontalBarChart.type.js","names":[],"sources":["../../../../src/component/Chart/CompactHorizontalBarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\ntype BarKey = string;\n\nexport type CompactHorizontalBarChartData = Array<Record<BarKey, number | string>>;\n\nexport type CompactHorizontalBarChartProps = BaseChartProps<CompactHorizontalBarChartData> & {\n x: string;\n y: string;\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n\n /** Handle click by `HoverRect`. `index` is an index of the data array. */\n onClickHoverRect?: (index: number, e: React.SyntheticEvent) => void;\n\n /** Handle click by Bar. */\n onClickBar?: (barItem: number, e: React.SyntheticEvent) => void;\n};\n\nexport type CompactHorizontalBarChartType = Intergalactic.Component<\n typeof Flex,\n CompactHorizontalBarChartProps\n>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"CompactHorizontalBarChart.type.js","names":[],"sources":["../../../../src/component/Chart/CompactHorizontalBarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\ntype BarKey = string;\n\nexport type CompactHorizontalBarChartData = Array<Record<BarKey, number | string>>;\n\nexport type CompactHorizontalBarChartProps = BaseChartProps<CompactHorizontalBarChartData> & {\n /** Field name from data array for the x-axis values */\n x: string;\n /** Field name from data array for the y-axis values */\n y: string;\n /** Custom x-axis scale */\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n\n /** Handle click by `HoverRect`. `index` is an index of the data array. */\n onClickHoverRect?: (index: number, e: React.SyntheticEvent) => void;\n\n /** Handle click by Bar. */\n onClickBar?: (barItem: number, e: React.SyntheticEvent) => void;\n};\n\nexport type CompactHorizontalBarChartType = Intergalactic.Component<\n typeof Flex,\n CompactHorizontalBarChartProps\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonutChart.type.js","names":[],"sources":["../../../../src/component/Chart/DonutChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type DonutChartData = Record<DataKey, number>;\n\nexport type DonutChartProps = BaseChartProps<DonutChartData> & {\n groupKey?: never;\n xScale?: ScaleLinear<any, any>;\n yScale?: ScaleLinear<any, any>;\n innerRadius?: number;\n halfsize?: boolean;\n innerLabel?: React.ReactNode;\n /** Callback triggered when a user clicks on a pie */\n onClickPie?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type DonutChartType = Intergalactic.Component<typeof Flex, DonutChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DonutChart.type.js","names":[],"sources":["../../../../src/component/Chart/DonutChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type DonutChartData = Record<DataKey, number>;\n\nexport type DonutChartProps = BaseChartProps<DonutChartData> & {\n /** Internal */\n groupKey?: never;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Controls the inner radius of the donut */\n innerRadius?: number;\n /** Creates a semi-donut chart when enabled */\n halfsize?: boolean;\n /** Content displayed in the center of the donut */\n innerLabel?: React.ReactNode;\n /** Callback triggered when a user clicks on a pie */\n onClickPie?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type DonutChartType = Intergalactic.Component<typeof Flex, DonutChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HistogramChart.type.js","names":[],"sources":["../../../../src/component/Chart/HistogramChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type HistogramChartData = Array<Record<string, number | Date>>;\n\nexport type HistogramChartProps = BaseChartProps<HistogramChartData> & {\n groupKey: string;\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n};\n\nexport type HistogramChartType = Intergalactic.Component<typeof Flex, HistogramChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"HistogramChart.type.js","names":[],"sources":["../../../../src/component/Chart/HistogramChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type HistogramChartData = Array<Record<string, number | Date>>;\n\nexport type HistogramChartProps = BaseChartProps<HistogramChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n};\n\nexport type HistogramChartType = Intergalactic.Component<typeof Flex, HistogramChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.type.js","names":[],"sources":["../../../../src/component/Chart/LineChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\ntype AreaItem = {\n x: number;\n y0: number;\n y1: number;\n};\n\nexport type LineChartData = Array<Record<string, string | number | typeof interpolateValue | Date>>;\n\nexport type LineChartProps = BaseChartProps<LineChartData> & {\n groupKey: string;\n area?: Record<LegendItemKey, AreaItem[]>;\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n showDots?: boolean;\n curve?: CurveFactory;\n areaCurve?: CurveFactory;\n /** Callback triggered when a user clicks on a line */\n onClickLine?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type LineChartType = Intergalactic.Component<typeof Flex, LineChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"LineChart.type.js","names":[],"sources":["../../../../src/component/Chart/LineChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\ntype AreaItem = {\n x: number;\n y0: number;\n y1: number;\n};\n\nexport type LineChartData = Array<Record<string, string | number | typeof interpolateValue | Date>>;\n\nexport type LineChartProps = BaseChartProps<LineChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Optional area data for rendering filled areas under lines */\n area?: Record<LegendItemKey, AreaItem[]>;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Controls whether to display dots on the line chart */\n showDots?: boolean;\n /** D3 curve factory for line interpolation */\n curve?: CurveFactory;\n /** Curve factory specifically for area rendering */\n areaCurve?: CurveFactory;\n /** Callback triggered when a user clicks on a line */\n onClickLine?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type LineChartType = Intergalactic.Component<typeof Flex, LineChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScatterPlotChart.type.js","names":[],"sources":["../../../../src/component/Chart/ScatterPlotChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type ScatterPlotChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type ScatterPlotChartProps = BaseChartProps<ScatterPlotChartData> & {\n groupKey: string;\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n valueKey?: string;\n /** Callback triggered when a user clicks on a scatter item */\n onClickScatterItem?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type ScatterPlotChartType = Intergalactic.Component<typeof Flex, ScatterPlotChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ScatterPlotChart.type.js","names":[],"sources":["../../../../src/component/Chart/ScatterPlotChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type ScatterPlotChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type ScatterPlotChartProps = BaseChartProps<ScatterPlotChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Optional field name for additional value data */\n valueKey?: string;\n /** Callback triggered when a user clicks on a scatter item */\n onClickScatterItem?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type ScatterPlotChartType = Intergalactic.Component<typeof Flex, ScatterPlotChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VennChart.type.js","names":[],"sources":["../../../../src/component/Chart/VennChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type VennChartData = Record<DataKey, number>;\n\nexport type VennChartProps = BaseChartProps<VennChartData> & {\n groupKey?: never;\n xScale?: ScaleLinear<any, any>;\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a circle */\n onClickVennItem?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type VennChartType = Intergalactic.Component<typeof Flex, VennChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VennChart.type.js","names":[],"sources":["../../../../src/component/Chart/VennChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type VennChartData = Record<DataKey, number>;\n\nexport type VennChartProps = BaseChartProps<VennChartData> & {\n /** Internal */\n groupKey?: never;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a circle */\n onClickVennItem?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type VennChartType = Intergalactic.Component<typeof Flex, VennChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -16,12 +16,12 @@ import Divider from '@semcore/divider';
|
|
|
16
16
|
import { Flex } from '@semcore/flex-box';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
/*!__reshadow-styles__:"./legend-flex.shadow.css"*/
|
|
19
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
19
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_cldh8_gg_._direction_row_cldh8_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_cldh8_gg_._direction_column_cldh8_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"cldh8_gg_"),
|
|
20
20
|
/*__reshadow_css_end__*/
|
|
21
21
|
{
|
|
22
|
-
"__SLegendFlex": "
|
|
23
|
-
"_direction_row": "
|
|
24
|
-
"_direction_column": "
|
|
22
|
+
"__SLegendFlex": "___SLegendFlex_cldh8_gg_",
|
|
23
|
+
"_direction_row": "_direction_row_cldh8_gg_",
|
|
24
|
+
"_direction_column": "_direction_column_cldh8_gg_"
|
|
25
25
|
});
|
|
26
26
|
import { localizedMessages } from '../../../translations/__intergalactic-dynamic-locales';
|
|
27
27
|
import { BaseLegend } from '../BaseLegend';
|
|
@@ -24,25 +24,25 @@ import { Flex, Box } from '@semcore/flex-box';
|
|
|
24
24
|
import { Text as TypographyText } from '@semcore/typography';
|
|
25
25
|
import React from 'react';
|
|
26
26
|
/*!__reshadow-styles__:"./legend-item.shadow.css"*/
|
|
27
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
27
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendItem_94o7q_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_94o7q_gg_:hover{cursor:pointer}.___SLegendItem_94o7q_gg_.__disabled_94o7q_gg_:hover{cursor:default}}.___SPointShape_94o7q_gg_.__color_94o7q_gg_{background-color:var(--color_94o7q);margin-right:8px;flex-shrink:0}.___SPointShape_94o7q_gg_._shape_Circle_94o7q_gg_._size_l_94o7q_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Circle_94o7q_gg_._size_m_94o7q_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Line_94o7q_gg_._size_l_94o7q_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_94o7q_gg_._shape_Line_94o7q_gg_._size_m_94o7q_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_94o7q_gg_._shape_Square_94o7q_gg_._size_l_94o7q_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Square_94o7q_gg_._size_m_94o7q_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Pattern_94o7q_gg_{background-color:transparent;margin-right:4px}.___SIcon_94o7q_gg_{line-height:0;margin-right:4px}.___SIcon_94o7q_gg_._size_l_94o7q_gg_{margin-top:4px}.___SIcon_94o7q_gg_._size_m_94o7q_gg_{margin-top:2px}.___SLabel_94o7q_gg_{min-width:0}.___SAdditionalLabel_94o7q_gg_._size_l_94o7q_gg_,.___SCount_94o7q_gg_._size_l_94o7q_gg_,.___SLabel_94o7q_gg_._size_l_94o7q_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_94o7q_gg_._size_m_94o7q_gg_,.___SCount_94o7q_gg_._size_m_94o7q_gg_,.___SLabel_94o7q_gg_._size_m_94o7q_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_94o7q_gg_,.___SCount_94o7q_gg_{margin-left:4px}.___SAdditionalLabel_94o7q_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_94o7q_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_94o7q_gg_._size_l_94o7q_gg_::before{margin-top:10px}.___SAdditionalLabel_94o7q_gg_._size_m_94o7q_gg_::before{margin-top:8px}.___SPatternSymbol_94o7q_gg_{transform:scale(.8)}", /*__inner_css_end__*/"94o7q_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SLegendItem": "
|
|
31
|
-
"_disabled": "
|
|
32
|
-
"__SPointShape": "
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_shape_Circle": "
|
|
36
|
-
"_size_l": "
|
|
37
|
-
"_size_m": "
|
|
38
|
-
"_shape_Line": "
|
|
39
|
-
"_shape_Square": "
|
|
40
|
-
"_shape_Pattern": "
|
|
41
|
-
"__SIcon": "
|
|
42
|
-
"__SLabel": "
|
|
43
|
-
"__SAdditionalLabel": "
|
|
44
|
-
"__SCount": "
|
|
45
|
-
"__SPatternSymbol": "
|
|
30
|
+
"__SLegendItem": "___SLegendItem_94o7q_gg_",
|
|
31
|
+
"_disabled": "__disabled_94o7q_gg_",
|
|
32
|
+
"__SPointShape": "___SPointShape_94o7q_gg_",
|
|
33
|
+
"_color": "__color_94o7q_gg_",
|
|
34
|
+
"--color": "--color_94o7q",
|
|
35
|
+
"_shape_Circle": "_shape_Circle_94o7q_gg_",
|
|
36
|
+
"_size_l": "_size_l_94o7q_gg_",
|
|
37
|
+
"_size_m": "_size_m_94o7q_gg_",
|
|
38
|
+
"_shape_Line": "_shape_Line_94o7q_gg_",
|
|
39
|
+
"_shape_Square": "_shape_Square_94o7q_gg_",
|
|
40
|
+
"_shape_Pattern": "_shape_Pattern_94o7q_gg_",
|
|
41
|
+
"__SIcon": "___SIcon_94o7q_gg_",
|
|
42
|
+
"__SLabel": "___SLabel_94o7q_gg_",
|
|
43
|
+
"__SAdditionalLabel": "___SAdditionalLabel_94o7q_gg_",
|
|
44
|
+
"__SCount": "___SCount_94o7q_gg_",
|
|
45
|
+
"__SPatternSymbol": "___SPatternSymbol_94o7q_gg_"
|
|
46
46
|
});
|
|
47
47
|
import { StaticShapes } from './LegendItem.type';
|
|
48
48
|
import { PatternSymbol } from '../../../Pattern';
|
|
@@ -14,14 +14,14 @@ import { createComponent, sstyled, Root } from '@semcore/core';
|
|
|
14
14
|
import { Box } from '@semcore/flex-box';
|
|
15
15
|
import React from 'react';
|
|
16
16
|
/*!__reshadow-styles__:"./legend-table.shadow.css"*/
|
|
17
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
17
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendTable_17ats_gg_.__columns-count_17ats_gg_{font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_17ats_gg_._size_l_17ats_gg_{font-size:var(--intergalactic-fs-300, 16px);text-align:right}.___SColumnItem_17ats_gg_._size_m_17ats_gg_{font-size:var(--intergalactic-fs-200, 14px);text-align:right}", /*__inner_css_end__*/"17ats_gg_"),
|
|
18
18
|
/*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__SLegendTable": "
|
|
21
|
-
"_columns-count": "__columns-
|
|
22
|
-
"__SColumnItem": "
|
|
23
|
-
"_size_l": "
|
|
24
|
-
"_size_m": "
|
|
20
|
+
"__SLegendTable": "___SLegendTable_17ats_gg_",
|
|
21
|
+
"_columns-count": "__columns-count_17ats_gg_",
|
|
22
|
+
"__SColumnItem": "___SColumnItem_17ats_gg_",
|
|
23
|
+
"_size_l": "_size_l_17ats_gg_",
|
|
24
|
+
"_size_m": "_size_m_17ats_gg_"
|
|
25
25
|
});
|
|
26
26
|
import { BaseLegend } from '../BaseLegend';
|
|
27
27
|
import { LegendItemComponent } from '../LegendItem/LegendItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\n\nimport type { DataStructureHints } from './a11y/hints';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { PlotEventEmitter } from './utils';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0 */\n width?: number;\n /** Height of the svg element\n * @default 0 */\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n /** Allows to format titles (e.g. axes) in alt text and data table */\n titlesFormatter?: (key: string | number | null) => string | undefined;\n /** Allows to format values in alt text and data table */\n valuesFormatter?: (value: unknown, key: string | number | null) => string | undefined;\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\n\nimport type { DataStructureHints } from './a11y/hints';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { PlotEventEmitter } from './utils';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0 */\n width?: number;\n /** Height of the svg element\n * @default 0 */\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /** Event emitter for chart interactions */\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n /** Allows to format titles (e.g. axes) in alt text and data table */\n titlesFormatter?: (key: string | number | null) => string | undefined;\n /** Allows to format values in alt text and data table */\n valuesFormatter?: (value: unknown, key: string | number | null) => string | undefined;\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.js","names":[],"sources":["../../../src/types/Reference.d.ts"],"sourcesContent":["import type { UnknownProperties } from '@semcore/core';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n
|
|
1
|
+
{"version":3,"file":"Reference.d.js","names":[],"sources":["../../../src/types/Reference.d.ts"],"sourcesContent":["import type { UnknownProperties } from '@semcore/core';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Reference line title */\n title?: string;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineTitleProps extends ReferenceLineTitleProps, UnknownProperties {}\nexport type ReferenceLineTitleProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineBackgroundProps\n extends ReferenceLineBackgroundProps,\n UnknownProperties {}\nexport type ReferenceBackgroundProps = Context & {\n /** The position relative the `value` */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n/** @deprecated use ReferenceBackgroundProps instead **/\nexport type ReferenceLineBackgroundProps = ReferenceBackgroundProps;\n\nexport type ReferenceStripesProps = Context & {\n /** The position relative the `value` */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n\nexport declare const ReferenceLine: IntergalacticD3Component<\n 'line',\n ReferenceLineProps,\n Context\n> & {\n Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;\n /**\n * @deprecated use `ReferenceBackground` instead.\n */\n Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;\n};\nexport declare const ReferenceBackground: IntergalacticD3Component<\n 'rect',\n ReferenceLineBackgroundProps,\n Context\n>;\nexport declare const ReferenceStripes: IntergalacticD3Component<\n 'rect',\n ReferenceStripesProps,\n Context\n>;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/utils.js
CHANGED
|
@@ -112,6 +112,7 @@ export var getIndexFromData = function getIndexFromData(data, scale, key, value)
|
|
|
112
112
|
}
|
|
113
113
|
return _key2;
|
|
114
114
|
} else {
|
|
115
|
+
// eslint-disable-next-line no-console
|
|
115
116
|
console.warn('[d3-chart/utils/getIndexFromData] encountered incompatible scale type');
|
|
116
117
|
return null;
|
|
117
118
|
}
|