@semcore/d3-chart 3.54.0 → 3.55.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 +24 -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 +12 -12
- 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/Reference.js +12 -12
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +9 -9
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +21 -18
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +5 -2
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +10 -0
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +10 -0
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +10 -0
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +10 -1
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +10 -0
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +10 -0
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +10 -0
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +10 -0
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +11 -0
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +10 -0
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +11 -3
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +4 -10
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +35 -30
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +8 -7
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/translations/de.json +2 -1
- package/lib/cjs/translations/en.json +2 -1
- package/lib/cjs/translations/es.json +2 -1
- package/lib/cjs/translations/fr.json +2 -1
- package/lib/cjs/translations/it.json +2 -1
- package/lib/cjs/translations/ja.json +2 -1
- package/lib/cjs/translations/ko.json +2 -1
- package/lib/cjs/translations/nl.json +2 -1
- package/lib/cjs/translations/pl.json +2 -1
- package/lib/cjs/translations/pt.json +2 -1
- package/lib/cjs/translations/sv.json +2 -1
- package/lib/cjs/translations/tr.json +2 -1
- package/lib/cjs/translations/vi.json +2 -1
- package/lib/cjs/translations/zh.json +2 -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 +12 -12
- 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/Reference.js +12 -12
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +9 -9
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +21 -18
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +5 -2
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +10 -0
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +10 -0
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +10 -0
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +10 -1
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +10 -0
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +10 -0
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +10 -0
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +10 -0
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +11 -0
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +10 -0
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +11 -3
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +4 -10
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +35 -30
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +8 -7
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/translations/de.json +2 -1
- package/lib/es6/translations/en.json +2 -1
- package/lib/es6/translations/es.json +2 -1
- package/lib/es6/translations/fr.json +2 -1
- package/lib/es6/translations/it.json +2 -1
- package/lib/es6/translations/ja.json +2 -1
- package/lib/es6/translations/ko.json +2 -1
- package/lib/es6/translations/nl.json +2 -1
- package/lib/es6/translations/pl.json +2 -1
- package/lib/es6/translations/pt.json +2 -1
- package/lib/es6/translations/sv.json +2 -1
- package/lib/es6/translations/tr.json +2 -1
- package/lib/es6/translations/vi.json +2 -1
- package/lib/es6/translations/zh.json +2 -1
- package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.d.ts +2 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +11 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +2 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +14 -4
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +13 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendTable.js","names":["React","createComponent","sstyled","Root","Box","style","_sstyled","insert","LegendItemComponent","BaseLegend","LegendTableRoot","_BaseLegend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref3","_items$","SLegendTable","_this$asProps","styles","Children","_this$asProps$size","size","items","columnsCount","columns","length","createElement","cn","_objectSpread","_assignProps","map","_ref5","index","id","_ref5$columns","Fragment","item","concat","LegendTable","Column","_defineProperty","children","LegendItem","ColumnComponent","props","_ref2","arguments[0]","_ref4","SColumnItem","_assignProps2","gridColumnStart","gridColumnEnd"],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendTableType, LegendTableProps, LegendColumnProps } from './LegendTable.type';\nimport style from './legend-table.shadow.css';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\nimport { BaseLegend } from '../BaseLegend';\n\nclass LegendTableRoot extends BaseLegend<LegendTableProps> {\n static displayName = 'LegendTable';\n static style = style;\n\n static defaultProps = () => ({\n children: <LegendTable.LegendItem />,\n });\n\n render() {\n const SLegendTable = Root;\n const { styles, Children, size = 'm', items } = this.asProps;\n const columnsCount = items[0]?.columns.length;\n\n return sstyled(styles)(\n <SLegendTable render={Box} columns-count={columnsCount + 1}>\n {items.map(({ id, columns = [] }, index) => {\n return (\n <React.Fragment key={id}>\n <Children />\n {columns.map((item, index) => {\n return (\n <React.Fragment key={`${id}__${index}`}>\n <LegendTable.Column index={index} size={size} styles={styles}>\n {item}\n </LegendTable.Column>\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </SLegendTable>,\n );\n }\n}\n\nfunction ColumnComponent(props: LegendColumnProps & IRootComponentProps) {\n const SColumnItem = Root;\n const { styles, index, size, Children } = props;\n\n return sstyled(styles)(\n <SColumnItem\n style={{ gridColumnStart: `${index + 2}`, gridColumnEnd: `${index + 3}` }}\n render={Box}\n size={size}\n >\n <Children />\n </SColumnItem>,\n );\n}\n\nexport const LegendTable: LegendTableType = createComponent(LegendTableRoot, {\n LegendItem: LegendItemComponent,\n Column: ColumnComponent,\n});\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,OAAO,EAAEC,IAAI,QAA6B,eAAe;AACnF,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAGxC,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAAC,IAErCC,eAAe,0BAAAC,WAAA;EAAAC,SAAA,CAAAF,eAAA,EAAAC,WAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAAK,eAAA,OAAAL,eAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,eAAA;IAAAS,GAAA;IAAAC,KAAA,EAQnB,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;QAAAC,KAAA;QAAAC,OAAA;MACP,IAAMC,YAAY,GAKMtB,GAAG;MAJ3B,IAAAuB,aAAA,GAAgD,IAAI,CAACJ,OAAO;QAApDK,MAAM,GAAAD,aAAA,CAANC,MAAM;QAAEC,QAAQ,GAAAF,aAAA,CAARE,QAAQ;QAAAC,kBAAA,GAAAH,aAAA,CAAEI,IAAI;QAAJA,IAAI,GAAAD,kBAAA,cAAG,GAAG,GAAAA,kBAAA;QAAEE,KAAK,GAAAL,aAAA,CAALK,KAAK;MAC3C,IAAMC,YAAY,IAAAR,OAAA,GAAGO,KAAK,CAAC,CAAC,CAAC,cAAAP,OAAA,uBAARA,OAAA,CAAUS,OAAO,CAACC,MAAM;MAE7C,OAAAX,KAAA,GAAOtB,OAAO,CAAC0B,MAAM,CAAC,eACpB5B,KAAA,CAAAoC,aAAA,CAACV,YAAY,EAAAF,KAAA,CAAAa,EAAA,iBAAAC,aAAA,KAAAC,YAAA;QAAA,iBAA6BN,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"LegendTable.js","names":["React","createComponent","sstyled","Root","Box","style","_sstyled","insert","LegendItemComponent","BaseLegend","LegendTableRoot","_BaseLegend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref3","_items$","SLegendTable","_this$asProps","styles","Children","_this$asProps$size","size","items","columnsCount","columns","length","createElement","cn","_objectSpread","_assignProps","map","_ref5","index","id","_ref5$columns","Fragment","item","concat","LegendTable","Column","_defineProperty","children","LegendItem","ColumnComponent","props","_ref2","arguments[0]","_ref4","SColumnItem","_assignProps2","gridColumnStart","gridColumnEnd"],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendTableType, LegendTableProps, LegendColumnProps } from './LegendTable.type';\nimport style from './legend-table.shadow.css';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\nimport { BaseLegend } from '../BaseLegend';\n\nclass LegendTableRoot extends BaseLegend<LegendTableProps> {\n static displayName = 'LegendTable';\n static style = style;\n\n static defaultProps = () => ({\n children: <LegendTable.LegendItem />,\n });\n\n render() {\n const SLegendTable = Root;\n const { styles, Children, size = 'm', items } = this.asProps;\n const columnsCount = items[0]?.columns.length;\n\n return sstyled(styles)(\n <SLegendTable render={Box} columns-count={columnsCount + 1} role={'group'}>\n {items.map(({ id, columns = [] }, index) => {\n return (\n <React.Fragment key={id}>\n <Children />\n {columns.map((item, index) => {\n return (\n <React.Fragment key={`${id}__${index}`}>\n <LegendTable.Column index={index} size={size} styles={styles}>\n {item}\n </LegendTable.Column>\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </SLegendTable>,\n );\n }\n}\n\nfunction ColumnComponent(props: LegendColumnProps & IRootComponentProps) {\n const SColumnItem = Root;\n const { styles, index, size, Children } = props;\n\n return sstyled(styles)(\n <SColumnItem\n style={{ gridColumnStart: `${index + 2}`, gridColumnEnd: `${index + 3}` }}\n render={Box}\n size={size}\n >\n <Children />\n </SColumnItem>,\n );\n}\n\nexport const LegendTable: LegendTableType = createComponent(LegendTableRoot, {\n LegendItem: LegendItemComponent,\n Column: ColumnComponent,\n});\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,OAAO,EAAEC,IAAI,QAA6B,eAAe;AACnF,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAGxC,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAAC,IAErCC,eAAe,0BAAAC,WAAA;EAAAC,SAAA,CAAAF,eAAA,EAAAC,WAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAAK,eAAA,OAAAL,eAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAA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aAAA,CAACP,QAAQ,EAAA4B,KAAA,CAAApB,EAAA,iBAAG,CACA;AAElB;AAEA,OAAO,IAAMW,WAA4B,GAAG/C,eAAe,CAACS,eAAe,EAAE;EAC3E0C,UAAU,EAAE5C,mBAAmB;EAC/ByC,MAAM,EAAEI;AACV,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendTable.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.type.ts"],"sourcesContent":["import { Intergalactic } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';\nimport React from 'react';\nimport { LegendProps, LSize } from '../BaseLegend.type';\n\nexport type LegendTableProps =
|
|
1
|
+
{"version":3,"file":"LegendTable.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.type.ts"],"sourcesContent":["import { Intergalactic } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';\nimport React from 'react';\nimport { LegendProps, LSize } from '../BaseLegend.type';\n\nexport type LegendTableProps = Intergalactic.InternalTypings.EfficientOmit<LegendProps, 'items'> & {\n /**\n * Legend items\n */\n items: Array<LegendItem & { columns: Array<React.ReactNode> }>;\n};\n\nexport type LegendColumnProps = {\n index: number;\n size: LSize;\n};\n\nexport type LegendTableType = Intergalactic.Component<typeof Box, LegendTableProps> & {\n LegendItem: LegendItemType;\n Column: Intergalactic.Component<typeof Box, Partial<LegendColumnProps>>;\n};\n"],"mappings":""}
|
|
@@ -7,6 +7,6 @@ export type A11yViewProps = {
|
|
|
7
7
|
plotLabel: string;
|
|
8
8
|
locale: NavigatorLanguage['language'];
|
|
9
9
|
config: PartialDataSummarizationConfig;
|
|
10
|
-
plotRef: React.RefObject<
|
|
10
|
+
plotRef: React.RefObject<HTMLElement>;
|
|
11
11
|
};
|
|
12
12
|
export declare const PlotA11yModule: React.FC<A11yViewProps>;
|
|
@@ -11,7 +11,7 @@ type ChartState = {
|
|
|
11
11
|
highlightedLine: number;
|
|
12
12
|
withTrend: boolean;
|
|
13
13
|
};
|
|
14
|
-
export declare abstract class AbstractChart<D extends ListData | ObjectData, T extends BaseChartProps<D>, E =
|
|
14
|
+
export declare abstract class AbstractChart<D extends ListData | ObjectData, T extends BaseChartProps<D>, E extends readonly ((...args: any[]) => any)[] = []> extends Component<T, {}, ChartState, E> {
|
|
15
15
|
static style: {};
|
|
16
16
|
static defaultProps: Partial<BaseChartProps<any>>;
|
|
17
17
|
/**
|
|
@@ -27,6 +27,7 @@ export declare abstract class AbstractChart<D extends ListData | ObjectData, T e
|
|
|
27
27
|
}>;
|
|
28
28
|
protected abstract get xScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;
|
|
29
29
|
protected abstract get yScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;
|
|
30
|
+
protected abstract getLegendAriaLabel(): string;
|
|
30
31
|
protected abstract renderChart(): React.ReactNode;
|
|
31
32
|
protected abstract renderTooltip(): React.ReactNode;
|
|
32
33
|
protected get dataKeys(): string[];
|
|
@@ -6,6 +6,7 @@ import { BaseChartLegendProps } from '../ChartLegend/BaseLegend.type';
|
|
|
6
6
|
import { TrendProps } from '../ChartLegend/LegendFlex/LegendFlex.type';
|
|
7
7
|
import { PatternsConfig } from '../../Pattern';
|
|
8
8
|
import { PlotSummarizerConfig } from '../../Plot';
|
|
9
|
+
import { Intergalactic } from '@semcore/utils/lib/core';
|
|
9
10
|
export type BaseLegendProps = BaseChartLegendProps & {
|
|
10
11
|
/**
|
|
11
12
|
* Disable hover (for transition items legend of each not hovered)
|
|
@@ -36,7 +37,16 @@ export type BaseLegendProps = BaseChartLegendProps & {
|
|
|
36
37
|
});
|
|
37
38
|
export type ObjectData = Record<string, unknown>;
|
|
38
39
|
export type ListData = ObjectData[];
|
|
39
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Chart, Legend must have an accessible names (aria-name).
|
|
42
|
+
* It should describe chart or legend content.
|
|
43
|
+
*/
|
|
44
|
+
export type AriaNameProps = Intergalactic.RequireAtLeastOne<{
|
|
45
|
+
'aria-label'?: string;
|
|
46
|
+
'aria-labelledby'?: string;
|
|
47
|
+
title?: string;
|
|
48
|
+
}>;
|
|
49
|
+
export type BaseChartProps<T extends ListData | ObjectData> = FlexProps & AriaNameProps & {
|
|
40
50
|
/**
|
|
41
51
|
* Chart data. For all charts except Donut(Pie), Radar and Venn should be an Array
|
|
42
52
|
*/
|
|
@@ -8,7 +8,7 @@ export declare abstract class BaseLegend<T extends LegendProps> extends Componen
|
|
|
8
8
|
setHints(): void;
|
|
9
9
|
getItem(index: number): import("./LegendItem/LegendItem.type").LegendItem;
|
|
10
10
|
getLegendItemProps(_: {}, index: number): LegendItemProps & Intergalactic.InternalTypings.ComponentPropsNesting<'div'>;
|
|
11
|
-
|
|
11
|
+
onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;
|
|
12
12
|
bindOnMouseEnterItem: (id: LegendItemKey) => (e: React.SyntheticEvent) => void;
|
|
13
13
|
bindOnMouseLeaveItem: (id: LegendItemKey) => (e: React.SyntheticEvent) => void;
|
|
14
14
|
}
|
|
@@ -3,8 +3,9 @@ import { BoxProps, FlexProps } from '@semcore/flex-box';
|
|
|
3
3
|
import { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';
|
|
4
4
|
import { DataStructureHints } from '../../a11y/hints';
|
|
5
5
|
import type { PatternsConfig } from '../../Pattern';
|
|
6
|
+
import { AriaNameProps } from '../Chart/AbstractChart.type';
|
|
6
7
|
export type LSize = 'm' | 'l';
|
|
7
|
-
export type BaseChartLegendProps = FlexProps & {
|
|
8
|
+
export type BaseChartLegendProps = FlexProps & AriaNameProps & {
|
|
8
9
|
/**
|
|
9
10
|
* Size for legend items
|
|
10
11
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Flex } from '@semcore/flex-box';
|
|
2
3
|
import { Intergalactic, Root } from '@semcore/core';
|
|
3
4
|
import Icon from '@semcore/icon';
|
|
@@ -53,15 +54,24 @@ export type LegendItemProps = LegendItem & {
|
|
|
53
54
|
/**
|
|
54
55
|
* Handler for select/deselect legend item.
|
|
55
56
|
* !Need to redefine onClick, because we don't have `event` in it.
|
|
57
|
+
* @deprecated
|
|
56
58
|
*/
|
|
57
|
-
onClick
|
|
59
|
+
onClick?: () => void;
|
|
58
60
|
/** Enables patterns symbols that enhances charts accessibility */
|
|
59
61
|
patterns?: PatternsConfig;
|
|
62
|
+
/**
|
|
63
|
+
* Handler for select/deselect legend item
|
|
64
|
+
*/
|
|
65
|
+
onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;
|
|
60
66
|
};
|
|
61
|
-
export type ShapeProps = LegendItem & {
|
|
67
|
+
export type ShapeProps = LegendItem & ({
|
|
62
68
|
size: LSize;
|
|
63
|
-
shape: ShapeType
|
|
64
|
-
}
|
|
69
|
+
shape: Exclude<ShapeType, 'Checkbox'>;
|
|
70
|
+
} | {
|
|
71
|
+
size: LSize;
|
|
72
|
+
shape: Extract<ShapeType, 'Checkbox'>;
|
|
73
|
+
onChange: (checked: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
74
|
+
});
|
|
65
75
|
export declare const StaticShapes: readonly ["Circle", "Line", "Square", "Pattern"];
|
|
66
76
|
export type ShapeType = 'Checkbox' | typeof StaticShapes[number];
|
|
67
77
|
export type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {
|
|
@@ -3,7 +3,7 @@ import { Box } from '@semcore/flex-box';
|
|
|
3
3
|
import { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { LegendProps, LSize } from '../BaseLegend.type';
|
|
6
|
-
export type LegendTableProps =
|
|
6
|
+
export type LegendTableProps = Intergalactic.InternalTypings.EfficientOmit<LegendProps, 'items'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Legend items
|
|
9
9
|
*/
|
|
@@ -1,41 +1,54 @@
|
|
|
1
1
|
export declare const localizedMessages: {
|
|
2
2
|
en: {
|
|
3
3
|
trend: string;
|
|
4
|
+
legendForChart: string;
|
|
4
5
|
};
|
|
5
6
|
es: {
|
|
6
7
|
trend: string;
|
|
8
|
+
legendForChart: string;
|
|
7
9
|
};
|
|
8
10
|
fr: {
|
|
9
11
|
trend: string;
|
|
12
|
+
legendForChart: string;
|
|
10
13
|
};
|
|
11
14
|
it: {
|
|
12
15
|
trend: string;
|
|
16
|
+
legendForChart: string;
|
|
13
17
|
};
|
|
14
18
|
ja: {
|
|
15
19
|
trend: string;
|
|
20
|
+
legendForChart: string;
|
|
16
21
|
};
|
|
17
22
|
ko: {
|
|
18
23
|
trend: string;
|
|
24
|
+
legendForChart: string;
|
|
19
25
|
};
|
|
20
26
|
nl: {
|
|
21
27
|
trend: string;
|
|
28
|
+
legendForChart: string;
|
|
22
29
|
};
|
|
23
30
|
pt: {
|
|
24
31
|
trend: string;
|
|
32
|
+
legendForChart: string;
|
|
25
33
|
};
|
|
26
34
|
tr: {
|
|
27
35
|
trend: string;
|
|
36
|
+
legendForChart: string;
|
|
28
37
|
};
|
|
29
38
|
vi: {
|
|
30
39
|
trend: string;
|
|
40
|
+
legendForChart: string;
|
|
31
41
|
};
|
|
32
42
|
zh: {
|
|
33
43
|
trend: string;
|
|
44
|
+
legendForChart: string;
|
|
34
45
|
};
|
|
35
46
|
pl: {
|
|
36
47
|
trend: string;
|
|
48
|
+
legendForChart: string;
|
|
37
49
|
};
|
|
38
50
|
sv: {
|
|
39
51
|
trend: string;
|
|
52
|
+
legendForChart: string;
|
|
40
53
|
};
|
|
41
54
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/d3-chart",
|
|
3
3
|
"description": "Semrush D3 Chart Component",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.55.2",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@formatjs/intl": "2.3.0",
|
|
18
|
-
"@semcore/animation": "2.
|
|
19
|
-
"@semcore/divider": "4.
|
|
20
|
-
"@semcore/flex-box": "5.
|
|
21
|
-
"@semcore/popper": "5.
|
|
22
|
-
"@semcore/utils": "4.
|
|
18
|
+
"@semcore/animation": "2.36.0",
|
|
19
|
+
"@semcore/divider": "4.35.0",
|
|
20
|
+
"@semcore/flex-box": "5.36.0",
|
|
21
|
+
"@semcore/popper": "5.43.0",
|
|
22
|
+
"@semcore/utils": "4.41.0",
|
|
23
23
|
"@types/d3-shape": "^3.1.0",
|
|
24
24
|
"@upsetjs/venn.js": "1.4.2",
|
|
25
25
|
"d3-array": "3.1.6",
|