@credithub/harlan-components 1.52.0 → 1.52.1
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/components/chart/chartSystem.js +1 -1
- package/dist/components/chart/hooks/useChartData.js +1 -1
- package/dist/components/chart/utils/chartCustomization.d.ts +1 -1
- package/dist/components/chart/utils/chartCustomization.js +17 -1
- package/dist/components/chart/utils/chartUtils.js +1 -1
- package/dist/components/chart/utils/dataProcessing.js +1 -1
- package/lib/cjs/index.js +22 -6
- package/lib/esm/index.js +22 -6
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ var ChartSystem = function (_a) {
|
|
|
67
67
|
})
|
|
68
68
|
.filter(function (timestamp) { return timestamp !== null; });
|
|
69
69
|
if (datasOcorrencias.length > 0) {
|
|
70
|
-
ultimaOcorrenciaProtestos = new Date(Math.max.apply(Math, datasOcorrencias)).toLocaleDateString();
|
|
70
|
+
ultimaOcorrenciaProtestos = new Date(Math.max.apply(Math, datasOcorrencias)).toLocaleDateString('pt-BR');
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
var loadingProgress = (chartDataProgress + dividasProgress) / 2;
|
|
@@ -36,7 +36,7 @@ export var useDividasPublicas = function () {
|
|
|
36
36
|
.map(function (data) { return new Date(data).getTime(); })
|
|
37
37
|
.filter(function (timestamp) { return !isNaN(timestamp); });
|
|
38
38
|
var ultimaOcorrencia = datasValidas.length > 0
|
|
39
|
-
? new Date(Math.max.apply(Math, datasValidas)).toLocaleDateString()
|
|
39
|
+
? new Date(Math.max.apply(Math, datasValidas)).toLocaleDateString('pt-BR')
|
|
40
40
|
: '';
|
|
41
41
|
return {
|
|
42
42
|
quantidade: quantidade,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataInput, TimeFilter } from '../types/iChart';
|
|
2
1
|
import { ChartDataset, ChartOptions } from 'chart.js';
|
|
2
|
+
import { DataInput, TimeFilter } from '../types/iChart';
|
|
3
3
|
export declare function createDatasets(data: DataInput, uniqueDates: string[], timeFilter: TimeFilter): ChartDataset<'line' | 'bar', (number | {
|
|
4
4
|
x: string;
|
|
5
5
|
y: number | null;
|
|
@@ -133,11 +133,27 @@ export function getChartOptions(timeFilter) {
|
|
|
133
133
|
type: 'time',
|
|
134
134
|
time: {
|
|
135
135
|
unit: unit,
|
|
136
|
-
parser: 'yyyy-MM-dd'
|
|
136
|
+
parser: 'yyyy-MM-dd',
|
|
137
|
+
tooltipFormat: 'dd MMM yyyy',
|
|
138
|
+
displayFormats: {
|
|
139
|
+
day: 'dd MMM',
|
|
140
|
+
week: 'dd MMM',
|
|
141
|
+
month: 'MMM yyyy',
|
|
142
|
+
quarter: 'MMM yyyy',
|
|
143
|
+
year: 'yyyy'
|
|
144
|
+
}
|
|
137
145
|
},
|
|
138
146
|
title: {
|
|
139
147
|
display: true,
|
|
140
148
|
text: 'Data'
|
|
149
|
+
},
|
|
150
|
+
ticks: {
|
|
151
|
+
callback: function (value, index, values) {
|
|
152
|
+
return new Intl.DateTimeFormat('pt-BR', {
|
|
153
|
+
month: 'short',
|
|
154
|
+
year: 'numeric'
|
|
155
|
+
}).format(new Date(value));
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
}
|
|
143
159
|
},
|
|
@@ -14,7 +14,7 @@ export var useCalculation = function (itens, dataKey) {
|
|
|
14
14
|
.map(function (data) { return new Date(data).getTime(); })
|
|
15
15
|
.filter(function (timestamp) { return !isNaN(timestamp); });
|
|
16
16
|
return datas.length
|
|
17
|
-
? new Date(Math.max.apply(Math, datas)).toLocaleDateString()
|
|
17
|
+
? new Date(Math.max.apply(Math, datas)).toLocaleDateString('pt-BR')
|
|
18
18
|
: null;
|
|
19
19
|
})();
|
|
20
20
|
return { quantidade: quantidade, valorTotal: valorTotal, dataMaisRecente: dataMaisRecente };
|
|
@@ -67,7 +67,7 @@ var obterUltimaData = function (protestos) {
|
|
|
67
67
|
.map(function (p) { return new Date(converterParaFormatoValido(p.dataProtesto)).getTime(); })
|
|
68
68
|
.filter(function (d) { return !isNaN(d); });
|
|
69
69
|
return datas.length
|
|
70
|
-
? new Date(Math.max.apply(Math, datas)).toLocaleDateString()
|
|
70
|
+
? new Date(Math.max.apply(Math, datas)).toLocaleDateString('pt-BR')
|
|
71
71
|
: null;
|
|
72
72
|
};
|
|
73
73
|
export function processProtestData(document) {
|