@reltio/components 1.4.1933 → 1.4.1935

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.
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "root" | "root_small" | "embedded" | "full" | "textBox" | "secondaryText">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "small" | "root" | "root_small" | "embedded" | "full" | "textBox" | "secondaryText">;
@@ -38,6 +38,10 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
38
38
  }
39
39
  },
40
40
  root_small: {},
41
+ small: {
42
+ width: '88px',
43
+ height: '88px'
44
+ },
41
45
  embedded: {
42
46
  flexShrink: 0,
43
47
  width: '190px',
@@ -33,15 +33,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
33
  __setModuleDefault(result, mod);
34
34
  return result;
35
35
  };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
36
  Object.defineProperty(exports, "__esModule", { value: true });
40
37
  exports.GaugeChart = void 0;
41
38
  var react_1 = __importStar(require("react"));
42
39
  var ramda_1 = require("ramda");
43
40
  var recharts_1 = require("recharts");
44
- var Typography_1 = __importDefault(require("@mui/material/Typography"));
45
41
  var helpers_1 = require("./helpers");
46
42
  var constants_1 = require("./constants");
47
43
  var styles_1 = require("./styles");
@@ -81,7 +77,7 @@ var GaugeChart = function (_a) {
81
77
  right: "".concat(((width - innerRadius * 2) / width / 2) * 100, "%"),
82
78
  opacity: animationIsEnd ? 1 : 0
83
79
  } },
84
- react_1.default.createElement(Typography_1.default, { className: styles.value }, renderValue(value)),
80
+ react_1.default.createElement("div", { className: styles.value }, renderValue(value)),
85
81
  label && (react_1.default.createElement("div", { ref: labelElRef, className: styles.label }, label)))));
86
82
  };
87
83
  exports.GaugeChart = GaugeChart;
@@ -1,4 +1,5 @@
1
1
  export declare const MAX_RADIUS = 200;
2
+ export declare const MIN_RADIUS = 120;
2
3
  export declare const RADIAN: number;
3
4
  export declare const ARC_WIDTH_AS_PERCENTAGES = 0.2;
4
5
  export declare const BOTTOM_INDICATOR_HEIGHT_AS_PERCENTAGES = 0.04;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INDICATOR_WIDTH_AS_PERCENTAGES = exports.TOP_INDICATOR_HEIGHT_AS_PERCENTAGES = exports.BOTTOM_INDICATOR_HEIGHT_AS_PERCENTAGES = exports.ARC_WIDTH_AS_PERCENTAGES = exports.RADIAN = exports.MAX_RADIUS = void 0;
3
+ exports.INDICATOR_WIDTH_AS_PERCENTAGES = exports.TOP_INDICATOR_HEIGHT_AS_PERCENTAGES = exports.BOTTOM_INDICATOR_HEIGHT_AS_PERCENTAGES = exports.ARC_WIDTH_AS_PERCENTAGES = exports.RADIAN = exports.MIN_RADIUS = exports.MAX_RADIUS = void 0;
4
4
  exports.MAX_RADIUS = 200;
5
+ exports.MIN_RADIUS = 120;
5
6
  exports.RADIAN = Math.PI / 180;
6
7
  exports.ARC_WIDTH_AS_PERCENTAGES = 0.2;
7
8
  exports.BOTTOM_INDICATOR_HEIGHT_AS_PERCENTAGES = 0.04;
@@ -7,7 +7,7 @@ var getGaugeIndicatorCoords = function (value, data, cx, cy, oR, iR) {
7
7
  var value = _a.value;
8
8
  return sum + value;
9
9
  }, 0);
10
- var angle = 180.0 * (1 - value / total);
10
+ var angle = 180.0 * (1 - Math.min(total, value) / total);
11
11
  var width = constants_1.INDICATOR_WIDTH_AS_PERCENTAGES * oR;
12
12
  var sin = Math.sin(-constants_1.RADIAN * angle);
13
13
  var cos = Math.cos(-constants_1.RADIAN * angle);
@@ -28,6 +28,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
28
28
  transition: 'opacity 0.5s'
29
29
  },
30
30
  value: {
31
+ width: '100%',
31
32
  marginBottom: '2px',
32
33
  fontSize: '28px',
33
34
  lineHeight: '33px',
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "root" | "root_small" | "embedded" | "full" | "textBox" | "secondaryText">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "small" | "root" | "root_small" | "embedded" | "full" | "textBox" | "secondaryText">;
@@ -35,6 +35,10 @@ export var useStyles = makeStyles(function (theme) { return ({
35
35
  }
36
36
  },
37
37
  root_small: {},
38
+ small: {
39
+ width: '88px',
40
+ height: '88px'
41
+ },
38
42
  embedded: {
39
43
  flexShrink: 0,
40
44
  width: '190px',
@@ -12,7 +12,6 @@ var __assign = (this && this.__assign) || function () {
12
12
  import React, { useEffect, useRef, useState } from 'react';
13
13
  import { identity } from 'ramda';
14
14
  import { PieChart, Pie, Cell } from 'recharts';
15
- import Typography from '@mui/material/Typography';
16
15
  import { getGaugeIndicatorCoords } from './helpers';
17
16
  import { MAX_RADIUS, ARC_WIDTH_AS_PERCENTAGES, TOP_INDICATOR_HEIGHT_AS_PERCENTAGES } from './constants';
18
17
  import { useStyles } from './styles';
@@ -52,6 +51,6 @@ export var GaugeChart = function (_a) {
52
51
  right: "".concat(((width - innerRadius * 2) / width / 2) * 100, "%"),
53
52
  opacity: animationIsEnd ? 1 : 0
54
53
  } },
55
- React.createElement(Typography, { className: styles.value }, renderValue(value)),
54
+ React.createElement("div", { className: styles.value }, renderValue(value)),
56
55
  label && (React.createElement("div", { ref: labelElRef, className: styles.label }, label)))));
57
56
  };
@@ -1,4 +1,5 @@
1
1
  export declare const MAX_RADIUS = 200;
2
+ export declare const MIN_RADIUS = 120;
2
3
  export declare const RADIAN: number;
3
4
  export declare const ARC_WIDTH_AS_PERCENTAGES = 0.2;
4
5
  export declare const BOTTOM_INDICATOR_HEIGHT_AS_PERCENTAGES = 0.04;
@@ -1,4 +1,5 @@
1
1
  export var MAX_RADIUS = 200;
2
+ export var MIN_RADIUS = 120;
2
3
  export var RADIAN = Math.PI / 180;
3
4
  export var ARC_WIDTH_AS_PERCENTAGES = 0.2;
4
5
  export var BOTTOM_INDICATOR_HEIGHT_AS_PERCENTAGES = 0.04;
@@ -4,7 +4,7 @@ export var getGaugeIndicatorCoords = function (value, data, cx, cy, oR, iR) {
4
4
  var value = _a.value;
5
5
  return sum + value;
6
6
  }, 0);
7
- var angle = 180.0 * (1 - value / total);
7
+ var angle = 180.0 * (1 - Math.min(total, value) / total);
8
8
  var width = INDICATOR_WIDTH_AS_PERCENTAGES * oR;
9
9
  var sin = Math.sin(-RADIAN * angle);
10
10
  var cos = Math.cos(-RADIAN * angle);
@@ -25,6 +25,7 @@ export var useStyles = makeStyles(function (theme) { return ({
25
25
  transition: 'opacity 0.5s'
26
26
  },
27
27
  value: {
28
+ width: '100%',
28
29
  marginBottom: '2px',
29
30
  fontSize: '28px',
30
31
  lineHeight: '33px',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1933",
3
+ "version": "1.4.1935",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -8,7 +8,7 @@
8
8
  "@fluentui/react-context-selector": "^9.1.26",
9
9
  "@react-google-maps/api": "2.7.0",
10
10
  "@react-sigma/core": "3.4.0",
11
- "@reltio/mdm-sdk": "^1.4.1848",
11
+ "@reltio/mdm-sdk": "^1.4.1849",
12
12
  "d3-cloud": "^1.2.5",
13
13
  "d3-geo": "^2.0.1",
14
14
  "d3-hierarchy": "^2.0.0",
@@ -49,7 +49,7 @@
49
49
  "prop-types": "^15.6.2",
50
50
  "ramda": "^0.28.0",
51
51
  "react": "^17.0.2",
52
- "react-components": "bitbucket:reltio-ondemand/react-components#v3.27.1",
52
+ "react-components": "bitbucket:reltio-ondemand/react-components#v3.27.2",
53
53
  "react-resize-detector": "^9.1.1",
54
54
  "ui-i18n": "bitbucket:reltio-ondemand/ui-i18n#v1.4.0"
55
55
  },