@centreon/ui 24.12.1 → 24.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "24.12.1",
3
+ "version": "24.12.2",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -117,19 +117,19 @@
117
117
  "@mui/material": "^5.16.7",
118
118
  "@react-spring/web": "^9.7.4",
119
119
  "@visx/clip-path": "^3.3.0",
120
- "@visx/curve": "^3.3.0",
121
- "@visx/event": "^3.3.0",
122
- "@visx/group": "^3.3.0",
123
- "@visx/hierarchy": "^3.3.0",
124
- "@visx/legend": "^3.10.3",
125
- "@visx/pattern": "^3.3.0",
126
- "@visx/point": "^3.3.0",
127
- "@visx/scale": "^3.5.0",
128
- "@visx/shape": "^3.5.0",
129
- "@visx/text": "^3.3.0",
130
- "@visx/threshold": "^3.5.0",
120
+ "@visx/curve": "^3.12.0",
121
+ "@visx/event": "^3.12.0",
122
+ "@visx/group": "^3.12.0",
123
+ "@visx/hierarchy": "^3.12.0",
124
+ "@visx/legend": "^3.12.0",
125
+ "@visx/pattern": "^3.12.0",
126
+ "@visx/point": "^3.12.0",
127
+ "@visx/scale": "^3.12.0",
128
+ "@visx/shape": "^3.12.0",
129
+ "@visx/text": "^3.12.0",
130
+ "@visx/threshold": "^3.12.0",
131
131
  "@visx/visx": "3.11.0",
132
- "@visx/zoom": "^3.3.0",
132
+ "@visx/zoom": "^3.12.0",
133
133
  "anylogger": "^1.0.11",
134
134
  "d3-array": "3.2.4",
135
135
  "dayjs": "^1.11.12",
@@ -9,7 +9,7 @@ import { getColorFromDataAndTresholds } from '../common/utils';
9
9
  import AnimatedPie from './AnimatedPie';
10
10
  import { thresholdThickness } from './Thresholds';
11
11
  import { GaugeProps } from './models';
12
- import { angles } from './utils';
12
+ import { getAngles } from './utils';
13
13
 
14
14
  const dataThickness = 45;
15
15
 
@@ -43,7 +43,7 @@ const PieData = ({
43
43
 
44
44
  return (
45
45
  <Pie
46
- {...angles}
46
+ {...getAngles()}
47
47
  data={pieData}
48
48
  innerRadius={radius - dataThickness * dataThicknessFactor}
49
49
  outerRadius={
@@ -6,7 +6,7 @@ import { useTheme } from '@mui/material';
6
6
 
7
7
  import AnimatedPie from './AnimatedPie';
8
8
  import { GaugeProps } from './models';
9
- import { angles } from './utils';
9
+ import { getAngles } from './utils';
10
10
 
11
11
  export const thresholdThickness = 12;
12
12
 
@@ -90,7 +90,7 @@ const Thresholds = ({
90
90
  <>
91
91
  {arcs.map(({ thresholdArc, thresholdScaleOrdinal }) => (
92
92
  <Pie
93
- {...angles}
93
+ {...getAngles()}
94
94
  data={thresholdArc}
95
95
  innerRadius={radius - thresholdThickness * thresholdThicknessFactor}
96
96
  key={`arc-${thresholdArc[0].name}`}
@@ -1,4 +1,12 @@
1
- export const angles = {
2
- endAngle: -(2 * Math.PI) / 3,
3
- startAngle: (2 * Math.PI) / 3
4
- };
1
+ import { includes } from 'ramda';
2
+
3
+ export const getAngles = () =>
4
+ includes('Firefox', window.navigator.userAgent)
5
+ ? {
6
+ endAngle: (2 * Math.PI) / 3,
7
+ startAngle: -(2 * Math.PI) / 3
8
+ }
9
+ : {
10
+ endAngle: -(2 * Math.PI) / 3,
11
+ startAngle: (2 * Math.PI) / 3
12
+ };