@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.
Files changed (152) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/cjs/Area.js +11 -11
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +16 -16
  5. package/lib/cjs/Bubble.js +12 -12
  6. package/lib/cjs/CompactHorizontalBar.js +16 -16
  7. package/lib/cjs/Donut.js +9 -9
  8. package/lib/cjs/Dots.js +8 -8
  9. package/lib/cjs/HorizontalBar.js +16 -16
  10. package/lib/cjs/Hover.js +3 -3
  11. package/lib/cjs/Line.js +9 -9
  12. package/lib/cjs/Plot.js +3 -3
  13. package/lib/cjs/Radar.js +19 -19
  14. package/lib/cjs/RadialTree.js +12 -12
  15. package/lib/cjs/Reference.js +12 -12
  16. package/lib/cjs/ScatterPlot.js +9 -9
  17. package/lib/cjs/Tooltip.js +9 -9
  18. package/lib/cjs/Venn.js +9 -9
  19. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  20. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  21. package/lib/cjs/a11y/PlotA11yView.js +21 -18
  22. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  23. package/lib/cjs/component/Chart/AbstractChart.js +5 -2
  24. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  25. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  26. package/lib/cjs/component/Chart/AreaChart.js +10 -0
  27. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  28. package/lib/cjs/component/Chart/BarChart.js +10 -0
  29. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  30. package/lib/cjs/component/Chart/BubbleChart.js +10 -0
  31. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  32. package/lib/cjs/component/Chart/CigaretteChart.js +10 -1
  33. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  34. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +10 -0
  35. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  36. package/lib/cjs/component/Chart/DonutChart.js +10 -0
  37. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  38. package/lib/cjs/component/Chart/HistogramChart.js +10 -0
  39. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  40. package/lib/cjs/component/Chart/LineChart.js +10 -0
  41. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  42. package/lib/cjs/component/Chart/RadarChart.js +11 -0
  43. package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
  44. package/lib/cjs/component/Chart/ScatterPlotChart.js +10 -0
  45. package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
  46. package/lib/cjs/component/Chart/VennChart.js +11 -3
  47. package/lib/cjs/component/Chart/VennChart.js.map +1 -1
  48. package/lib/cjs/component/ChartLegend/BaseLegend.js +4 -10
  49. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  50. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  51. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
  52. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  53. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +35 -30
  54. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  55. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  56. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +8 -7
  57. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  58. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  59. package/lib/cjs/translations/de.json +2 -1
  60. package/lib/cjs/translations/en.json +2 -1
  61. package/lib/cjs/translations/es.json +2 -1
  62. package/lib/cjs/translations/fr.json +2 -1
  63. package/lib/cjs/translations/it.json +2 -1
  64. package/lib/cjs/translations/ja.json +2 -1
  65. package/lib/cjs/translations/ko.json +2 -1
  66. package/lib/cjs/translations/nl.json +2 -1
  67. package/lib/cjs/translations/pl.json +2 -1
  68. package/lib/cjs/translations/pt.json +2 -1
  69. package/lib/cjs/translations/sv.json +2 -1
  70. package/lib/cjs/translations/tr.json +2 -1
  71. package/lib/cjs/translations/vi.json +2 -1
  72. package/lib/cjs/translations/zh.json +2 -1
  73. package/lib/es6/Area.js +11 -11
  74. package/lib/es6/Axis.js +14 -14
  75. package/lib/es6/Bar.js +16 -16
  76. package/lib/es6/Bubble.js +12 -12
  77. package/lib/es6/CompactHorizontalBar.js +16 -16
  78. package/lib/es6/Donut.js +9 -9
  79. package/lib/es6/Dots.js +8 -8
  80. package/lib/es6/HorizontalBar.js +16 -16
  81. package/lib/es6/Hover.js +3 -3
  82. package/lib/es6/Line.js +9 -9
  83. package/lib/es6/Plot.js +3 -3
  84. package/lib/es6/Radar.js +19 -19
  85. package/lib/es6/RadialTree.js +12 -12
  86. package/lib/es6/Reference.js +12 -12
  87. package/lib/es6/ScatterPlot.js +9 -9
  88. package/lib/es6/Tooltip.js +9 -9
  89. package/lib/es6/Venn.js +9 -9
  90. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  91. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  92. package/lib/es6/a11y/PlotA11yView.js +21 -18
  93. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  94. package/lib/es6/component/Chart/AbstractChart.js +5 -2
  95. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  96. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  97. package/lib/es6/component/Chart/AreaChart.js +10 -0
  98. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  99. package/lib/es6/component/Chart/BarChart.js +10 -0
  100. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  101. package/lib/es6/component/Chart/BubbleChart.js +10 -0
  102. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  103. package/lib/es6/component/Chart/CigaretteChart.js +10 -1
  104. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  105. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +10 -0
  106. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  107. package/lib/es6/component/Chart/DonutChart.js +10 -0
  108. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  109. package/lib/es6/component/Chart/HistogramChart.js +10 -0
  110. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  111. package/lib/es6/component/Chart/LineChart.js +10 -0
  112. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  113. package/lib/es6/component/Chart/RadarChart.js +11 -0
  114. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  115. package/lib/es6/component/Chart/ScatterPlotChart.js +10 -0
  116. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  117. package/lib/es6/component/Chart/VennChart.js +11 -3
  118. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  119. package/lib/es6/component/ChartLegend/BaseLegend.js +4 -10
  120. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  121. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  122. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +7 -5
  123. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  124. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +35 -30
  125. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  126. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  127. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +8 -7
  128. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  129. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  130. package/lib/es6/translations/de.json +2 -1
  131. package/lib/es6/translations/en.json +2 -1
  132. package/lib/es6/translations/es.json +2 -1
  133. package/lib/es6/translations/fr.json +2 -1
  134. package/lib/es6/translations/it.json +2 -1
  135. package/lib/es6/translations/ja.json +2 -1
  136. package/lib/es6/translations/ko.json +2 -1
  137. package/lib/es6/translations/nl.json +2 -1
  138. package/lib/es6/translations/pl.json +2 -1
  139. package/lib/es6/translations/pt.json +2 -1
  140. package/lib/es6/translations/sv.json +2 -1
  141. package/lib/es6/translations/tr.json +2 -1
  142. package/lib/es6/translations/vi.json +2 -1
  143. package/lib/es6/translations/zh.json +2 -1
  144. package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
  145. package/lib/types/component/Chart/AbstractChart.d.ts +2 -1
  146. package/lib/types/component/Chart/AbstractChart.type.d.ts +11 -1
  147. package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
  148. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +2 -1
  149. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +14 -4
  150. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
  151. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +13 -0
  152. 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;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KL,KAAK,GAAG,CAAC,CAAE;MAAEmB,aAAa,KAAAd,MAAA,CAAKL,KAAK,GAAG,CAAC;IAAG,CAAC;IAAA,QAEnEX;EAAI,GAAAwB,KAAA,kBAEVvD,KAAA,CAAAoC,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
+ {"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,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,aAA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+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 = Omit<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":""}
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":""}
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Trend"
2
+ "trend": "Trend",
3
+ "legendForChart": "Legende zum Chart"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Trend"
2
+ "trend": "Trend",
3
+ "legendForChart": "Chart legend"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Tendencia"
2
+ "trend": "Tendencia",
3
+ "legendForChart": "Leyenda del gráfico"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Tendance"
2
+ "trend": "Tendance",
3
+ "legendForChart": "Légende du diagramme"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Trend"
2
+ "trend": "Trend",
3
+ "legendForChart": "Legenda del grafico"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "トレンド"
2
+ "trend": "トレンド",
3
+ "legendForChart": "チャートの凡例"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "추세"
2
+ "trend": "추세",
3
+ "legendForChart": "차트 범례"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Trend"
2
+ "trend": "Trend",
3
+ "legendForChart": "Legenda van grafiek"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Trend"
2
+ "trend": "Trend",
3
+ "legendForChart": "Legenda wykresu"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Tendência"
2
+ "trend": "Tendência",
3
+ "legendForChart": "Legenda do gráfico"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Trend"
2
+ "trend": "Trend",
3
+ "legendForChart": "Diagramförklaring"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Trend"
2
+ "trend": "Trend",
3
+ "legendForChart": "Chart legend"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "Xu hướng"
2
+ "trend": "Xu hướng",
3
+ "legendForChart": "Chú thích biểu đồ"
3
4
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "trend": "趋势"
2
+ "trend": "趋势",
3
+ "legendForChart": "图例"
3
4
  }
@@ -7,6 +7,6 @@ export type A11yViewProps = {
7
7
  plotLabel: string;
8
8
  locale: NavigatorLanguage['language'];
9
9
  config: PartialDataSummarizationConfig;
10
- plotRef: React.RefObject<Element>;
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 = {}> extends Component<T, {}, ChartState, 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
- export type BaseChartProps<T extends ListData | ObjectData> = FlexProps & {
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
- bindOnChange: (id: LegendItemKey) => () => void;
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: () => void;
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 = Omit<LegendProps, 'items'> & {
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.54.0",
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.35.0",
19
- "@semcore/divider": "4.34.0",
20
- "@semcore/flex-box": "5.35.0",
21
- "@semcore/popper": "5.42.0",
22
- "@semcore/utils": "4.39.0",
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",