awing-library 2.1.2-dev.554 → 2.1.2-dev.555
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/dist/AWING/Chart/BarLine/component.d.ts.map +1 -1
- package/dist/AWING/Chart/BarLine/component.js +2 -1
- package/dist/AWING/Chart/BarLine/utils.d.ts +1 -1
- package/dist/AWING/Chart/BarLine/utils.d.ts.map +1 -1
- package/dist/AWING/Chart/BarLine/utils.js +3 -3
- package/dist/AWING/DataForm/container.test.js +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/component.tsx"],"names":[],"mappings":"AAwBA,OAAO,wBAAwB,CAAC;AAOhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAmB7C,QAAA,MAAM,gBAAgB,UAAW,iBAAiB,4CAqUjD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -32,6 +32,7 @@ const BarLineComponent = (props)=>{
|
|
|
32
32
|
const handleClose = ()=>{
|
|
33
33
|
setAnchorEl(null);
|
|
34
34
|
};
|
|
35
|
+
const titleCallbackBound = (tooltipItems)=>titleCallback(tooltipItems, t);
|
|
35
36
|
const { width = 'auto', height = 350, timeline = TimelineType.Day, optionCustom = {}, dataChart, type, enableExport = {
|
|
36
37
|
png: true,
|
|
37
38
|
pdf: true,
|
|
@@ -54,7 +55,7 @@ const BarLineComponent = (props)=>{
|
|
|
54
55
|
bodyColor: '#263238',
|
|
55
56
|
bodySpacing: 8,
|
|
56
57
|
callbacks: {
|
|
57
|
-
title:
|
|
58
|
+
title: titleCallbackBound,
|
|
58
59
|
label: labelCallback
|
|
59
60
|
},
|
|
60
61
|
titleColor: '#212121',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Chart as ChartJS, ChartTypeRegistry, TooltipItem } from 'chart.js';
|
|
2
2
|
import { DataSet } from '../../../Utils/exportFile';
|
|
3
3
|
export declare const getOrCreateLegendList: (id: string) => HTMLUListElement;
|
|
4
|
-
export declare const titleCallback: (tooltipItems: TooltipItem<keyof ChartTypeRegistry>[]) => string;
|
|
4
|
+
export declare const titleCallback: (tooltipItems: TooltipItem<keyof ChartTypeRegistry>[], t: any) => string;
|
|
5
5
|
export declare const labelCallback: (tooltipItem: TooltipItem<keyof ChartTypeRegistry>) => string;
|
|
6
6
|
export declare const exportToPNG: (element: HTMLElement, nameFile?: string) => void;
|
|
7
7
|
export declare const exportToJPG: (chartRef: ChartJS<keyof ChartTypeRegistry>, nameFile?: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,OAAQ,MAAM,qBAe/C,CAAC;AAEF,eAAO,MAAM,aAAa,iBAAkB,WAAW,CAAC,MAAM,iBAAiB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,OAAQ,MAAM,qBAe/C,CAAC;AAEF,eAAO,MAAM,aAAa,iBAAkB,WAAW,CAAC,MAAM,iBAAiB,CAAC,EAAE,KAAK,GAAG,WAUzF,CAAC;AAEF,eAAO,MAAM,aAAa,gBAAiB,WAAW,CAAC,MAAM,iBAAiB,CAAC,WAO9E,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAQlE,CAAC;AAGF,eAAO,MAAM,WAAW,aAAc,OAAO,CAAC,MAAM,iBAAiB,CAAC,aAAa,MAAM,SAUxF,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAuClE,CAAC;AAGF,eAAO,MAAM,YAAY,aAAoB,OAAO,CAAC,MAAM,iBAAiB,CAAC,kBA8D5E,CAAC;AAGF,eAAO,MAAM,aAAa,eAAgB,OAAO,EAAE,aAAa,MAAM,SAOrE,CAAC"}
|
|
@@ -17,16 +17,16 @@ const getOrCreateLegendList = (id)=>{
|
|
|
17
17
|
}
|
|
18
18
|
return listContainer;
|
|
19
19
|
};
|
|
20
|
-
const titleCallback = (tooltipItems)=>{
|
|
20
|
+
const titleCallback = (tooltipItems, t)=>{
|
|
21
21
|
const timeFormat = tooltipItems[0].raw?.x;
|
|
22
22
|
const isTimelineHour = timeFormat?.length > 8;
|
|
23
23
|
if (isTimelineHour) {
|
|
24
24
|
const timeText = moment(timeFormat, 'YYYYMMDDHH').format('HH[h] DD-MM-YYYY');
|
|
25
|
-
return 'Hour: ' + timeText;
|
|
25
|
+
return t('Common.Hour') + ': ' + timeText;
|
|
26
26
|
}
|
|
27
27
|
{
|
|
28
28
|
const timeText = moment(timeFormat, 'YYYYMMDD').format('DD-MM-YYYY');
|
|
29
|
-
return 'Day: ' + timeText;
|
|
29
|
+
return t('Common.Day') + ': ' + timeText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
const labelCallback = (tooltipItem)=>{
|
|
@@ -9,7 +9,7 @@ var __webpack_modules__ = {
|
|
|
9
9
|
"AWING/DataInput": function(module) {
|
|
10
10
|
module.exports = __WEBPACK_EXTERNAL_MODULE__DataInput_index_js_c7933a4f__;
|
|
11
11
|
},
|
|
12
|
-
"
|
|
12
|
+
"../helper": function(module) {
|
|
13
13
|
module.exports = __WEBPACK_EXTERNAL_MODULE__helper_js_663c9e82__;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
@@ -92,9 +92,9 @@ jest.mock('@mui/material', ()=>({
|
|
|
92
92
|
})
|
|
93
93
|
}));
|
|
94
94
|
const mockInputFactory = __webpack_require__("AWING/DataInput")["default"];
|
|
95
|
-
const mockCalculateValue = __webpack_require__("
|
|
96
|
-
const mockConvertFormulaToBinaryTree = __webpack_require__("
|
|
97
|
-
const mockReplaceFieldsValue = __webpack_require__("
|
|
95
|
+
const mockCalculateValue = __webpack_require__("../helper").calculateValue;
|
|
96
|
+
const mockConvertFormulaToBinaryTree = __webpack_require__("../helper").convertFormulaToBinaryTree;
|
|
97
|
+
const mockReplaceFieldsValue = __webpack_require__("../helper").replaceFieldsValue;
|
|
98
98
|
describe('DataForm Component', ()=>{
|
|
99
99
|
const mockFields = [
|
|
100
100
|
{
|