awing-library 2.1.78-beta → 2.1.80-beta

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,4 +1,4 @@
1
- import { ChartProps } from 'react-chartjs-2';
1
+ import { ChartOptions, ChartType } from 'chart.js';
2
2
  import { TYPE_CHART } from './Enums';
3
3
  export interface BaseStatistics<F> {
4
4
  onChangeQueryInput: (input: any) => void;
@@ -30,5 +30,5 @@ export interface ILoadings {
30
30
  }
31
31
  export interface IConfigChart {
32
32
  type: TYPE_CHART;
33
- options?: ChartProps;
33
+ options?: ChartOptions<ChartType>;
34
34
  }
@@ -1,12 +1,14 @@
1
+ import { DataObject } from '../../AWING/interface';
2
+ import { ChartOptions, ChartType } from 'chart.js';
1
3
  import 'chartjs-adapter-moment';
2
4
  import { ChartProps } from 'react-chartjs-2/dist/types';
3
5
  interface IChartJsContainer extends ChartProps {
4
6
  width?: number;
5
7
  height?: number;
6
8
  timeline?: number;
7
- optionCustom?: any;
9
+ optionCustom?: ChartOptions<ChartType>;
8
10
  chart: any;
9
- dataChart: any;
11
+ dataChart: DataObject[];
10
12
  optionsDefault?: boolean;
11
13
  }
12
14
  declare const BarLineComponent: (props: IChartJsContainer) => import("react/jsx-runtime").JSX.Element;
@@ -19,9 +19,9 @@ var Helpers_1 = require("../../Utils/Helpers");
19
19
  require("chartjs-adapter-moment");
20
20
  var moment_1 = __importDefault(require("moment"));
21
21
  var react_i18next_1 = require("react-i18next");
22
- var Styles_1 = require("./Styles");
23
- var Enums_1 = require("./Enums");
24
22
  var i18n_1 = __importDefault(require("../../i18n"));
23
+ var Enums_1 = require("./Enums");
24
+ var Styles_1 = require("./Styles");
25
25
  var BarLineComponent = function (props) {
26
26
  var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
27
27
  var optionsDefault = props.optionsDefault;
@@ -62,7 +62,7 @@ var BarLineComponent = function (props) {
62
62
  .slice(0, -1)
63
63
  .join(' ');
64
64
  }
65
- labels += ' ' + tooltipItem.formattedValue;
65
+ labels += ': ' + tooltipItem.formattedValue;
66
66
  return ' ' + labels;
67
67
  },
68
68
  },
@@ -1,10 +1,11 @@
1
- import { ChartProps } from 'react-chartjs-2/dist/types';
1
+ import { ChartData, ChartOptions, ChartType } from 'chart.js';
2
+ import { ChartProps, TypedChartComponent } from 'react-chartjs-2/dist/types';
2
3
  export interface IPieComponent extends ChartProps {
3
- dataConvert?: any;
4
- widthChart?: any;
5
- heightChart?: any;
6
- optionCustom?: any;
7
- chart: any;
4
+ dataConvert?: ChartData<ChartType>;
5
+ widthChart?: number;
6
+ heightChart?: number;
7
+ optionCustom?: ChartOptions<ChartType>;
8
+ chart: TypedChartComponent<"pie">;
8
9
  }
9
10
  declare const PieComponent: ({ chart, data, dataConvert, widthChart, heightChart, optionCustom, options, }: IPieComponent) => import("react/jsx-runtime").JSX.Element;
10
11
  export default PieComponent;
@@ -8,7 +8,7 @@ var chartColorDefaults = [
8
8
  '#dd040c',
9
9
  '#aed6dc',
10
10
  '#ff9a8d',
11
- '#4a536b'
11
+ '#4a536b',
12
12
  ];
13
13
  var PieComponent = function (_a) {
14
14
  var chart = _a.chart, data = _a.data, _b = _a.dataConvert, dataConvert = _b === void 0 ? {
@@ -515,6 +515,9 @@ var updateObjectFields = function (originalObj, changedValues) {
515
515
  obj[key] = value;
516
516
  }
517
517
  }
518
+ else {
519
+ obj[key] = value;
520
+ }
518
521
  }
519
522
  };
520
523
  // Update nested fields
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.78-beta",
3
+ "version": "2.1.80-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",