@politicalwatch/tipi-uikit 1.7.17 → 1.7.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@politicalwatch/tipi-uikit",
3
- "version": "1.7.17",
3
+ "version": "1.7.19",
4
4
  "main": "src/components/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -28,13 +28,13 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@rushstack/eslint-patch": "^1.1.0",
31
- "@storybook/addon-essentials": "^7.6.8",
32
- "@storybook/addon-interactions": "^7.6.8",
33
- "@storybook/addon-links": "^7.6.8",
34
- "@storybook/blocks": "^7.6.8",
31
+ "@storybook/addon-essentials": "^7.6.9",
32
+ "@storybook/addon-interactions": "^7.6.9",
33
+ "@storybook/addon-links": "^7.6.9",
34
+ "@storybook/blocks": "^7.6.9",
35
35
  "@storybook/testing-library": "^0.2.2",
36
- "@storybook/vue3": "^7.6.8",
37
- "@storybook/vue3-vite": "^7.6.8",
36
+ "@storybook/vue3": "^7.6.9",
37
+ "@storybook/vue3-vite": "^7.6.9",
38
38
  "@vitejs/plugin-vue": "^5.0.0",
39
39
  "@vue/eslint-config-prettier": "^9.0.0",
40
40
  "@vue/test-utils": "^2.4.1",
@@ -47,7 +47,7 @@
47
47
  "react": "^18.2.0",
48
48
  "react-dom": "^18.2.0",
49
49
  "sass": "^1.67.0",
50
- "storybook": "^7.6.8",
50
+ "storybook": "^7.6.9",
51
51
  "stylelint": "^16.1.0",
52
52
  "terser": "^5.14.2",
53
53
  "vite": "^5.0.0",
@@ -280,7 +280,6 @@ class d3sliceschart extends d3chart {
280
280
  // .style('top', window.event['pageY'] - 40 + 'px');
281
281
  //})
282
282
  .on('mouseover', (event, d) => {
283
- console.log('MOUSEOVER in sliceschart', d);
284
283
  const total = d3.sum(this.data, (d) => d.value);
285
284
  const value = d.data.value > 0 && total > 0 ? Math.round((d.data.value / total) * 100) : 0;
286
285
  const key = d.data[this.cfg.key];
@@ -255,17 +255,14 @@ class d3sunburst extends d3chart {
255
255
  .append('path')
256
256
  .attr('class', 'chart__slice chart__slice--sunburst')
257
257
  .style('fill', (d) => this.colorElement(d.data))
258
- .on('mouseover', (d) => {
258
+ .on('mouseover', (event, d) => {
259
259
  const label = this.cfg.tooltip.suffixPlural
260
- ? pluralize(this.cfg.tooltip.suffix, d.target.__data__.data.value)
260
+ ? pluralize(this.cfg.tooltip.suffix, d.value)
261
261
  : this.cfg.tooltip.suffix;
262
262
  const text = this.cfg.tooltip.suffix
263
- ? `<div>${d.target.__data__.data[this.cfg.key]}: ${
264
- d.target.__data__.data.value
265
- } ${label}</div>`
266
- : `<div>${d.target.__data__.data[this.cfg.key]}: ${d.target.__data__.data.value}</div>`;
267
- // TODO fix values in tooltip for parent elements
268
- if (d.target.__data__.data.value) this.tooltip.html(text).classed('active', true);
263
+ ? `<div>${d.data[this.cfg.key]}: ${d.value} ${label}</div>`
264
+ : `<div>${d.data[this.cfg.key]}: ${d.value}</div>`;
265
+ this.tooltip.html(text).classed('active', true);
269
266
  })
270
267
  .on('mouseout', () => {
271
268
  this.tooltip.classed('active', false);
@@ -257,13 +257,13 @@ class d3wordscloud extends d3chart {
257
257
  .attr('text-anchor', 'middle')
258
258
  .attr('fill', (d) => d.color)
259
259
  .attr('transform', (d) => `translate(${[d.x, d.y]})rotate(${d.rotate})`)
260
- .on('mouseover', (d) => {
260
+ .on('mouseover', (event, d) => {
261
261
  const label = this.cfg.tooltip.suffixPlural
262
- ? pluralize(this.cfg.tooltip.suffix, d.target.__data__.value)
262
+ ? pluralize(this.cfg.tooltip.suffix, d.value)
263
263
  : this.cfg.tooltip.suffix;
264
264
  const text = this.cfg.tooltip.suffix
265
- ? `<div>${d.target.__data__.text}: ${d.target.__data__.value} ${label}</div>`
266
- : `<div>${d.target.__data__.text}: ${d.target.__data__.value}</div>`;
265
+ ? `<div>${d.text}: ${d.value} ${label}</div>`
266
+ : `<div>${d.text}: ${d.value}</div>`;
267
267
  this.tooltip.html(text).classed('active', true);
268
268
  })
269
269
  .on('mouseout', () => {