@gisce/react-ooui 1.2.0-rc.43 → 1.2.0-rc.45
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/react-ooui.es.js +45 -19
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +1 -1
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/views/Graph/GraphDefaults.d.ts +18 -0
- package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/widgets/views/Graph/GraphDefaults.ts +19 -0
- package/src/widgets/views/Graph/GraphIndicator.tsx +17 -3
package/dist/react-ooui.es.js
CHANGED
|
@@ -20580,11 +20580,15 @@ function CommonIndicator({
|
|
|
20580
20580
|
icon: u,
|
|
20581
20581
|
suffix: c
|
|
20582
20582
|
}) {
|
|
20583
|
-
let d = a * fontGrowFactor < minFontSize ? minFontSize : a * fontGrowFactor
|
|
20584
|
-
|
|
20585
|
-
|
|
20586
|
-
|
|
20587
|
-
|
|
20583
|
+
let d = a * fontGrowFactor < minFontSize ? minFontSize : a * fontGrowFactor;
|
|
20584
|
+
const f = s == null ? void 0 : s.toLocaleString("es-ES", {
|
|
20585
|
+
useGrouping: !0
|
|
20586
|
+
});
|
|
20587
|
+
let p = o ? `${f}/${o}` : `${f}`;
|
|
20588
|
+
c && (p += " " + c);
|
|
20589
|
+
let h = getTextWidth(p, `bold ${Math.floor(d * 1.03)}px sans-serif`);
|
|
20590
|
+
u && (h = h * 2), h >= r * 0.85 && (d = r * 0.85 / h * d);
|
|
20591
|
+
const m = u && iconMapper(u);
|
|
20588
20592
|
return /* @__PURE__ */ jsx("div", {
|
|
20589
20593
|
ref: e,
|
|
20590
20594
|
style: {
|
|
@@ -20601,11 +20605,11 @@ function CommonIndicator({
|
|
|
20601
20605
|
margin: 0,
|
|
20602
20606
|
color: l
|
|
20603
20607
|
},
|
|
20604
|
-
children: [
|
|
20608
|
+
children: [m && /* @__PURE__ */ jsx(m, {
|
|
20605
20609
|
style: {
|
|
20606
20610
|
fontSize: d * 0.7
|
|
20607
20611
|
}
|
|
20608
|
-
}),
|
|
20612
|
+
}), m ? ` ${p}` : p]
|
|
20609
20613
|
})
|
|
20610
20614
|
});
|
|
20611
20615
|
}
|
|
@@ -20621,13 +20625,21 @@ function PercentageIndicator({
|
|
|
20621
20625
|
suffix: d
|
|
20622
20626
|
}) {
|
|
20623
20627
|
const f = r * 0.65;
|
|
20624
|
-
let p = f * fontGrowFactor < minFontSize ? minFontSize : f * fontGrowFactor
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20628
|
+
let p = f * fontGrowFactor < minFontSize ? minFontSize : f * fontGrowFactor;
|
|
20629
|
+
const h = l == null ? void 0 : l.toLocaleString("es-ES", {
|
|
20630
|
+
useGrouping: !0
|
|
20631
|
+
});
|
|
20632
|
+
let m = s ? `${h}/${s == null ? void 0 : s.toLocaleString("es-ES", {
|
|
20633
|
+
useGrouping: !0
|
|
20634
|
+
})}` : `${h}`;
|
|
20635
|
+
d && (m += " " + d);
|
|
20636
|
+
const g = `${o == null ? void 0 : o.toLocaleString("es-ES", {
|
|
20637
|
+
useGrouping: !0
|
|
20638
|
+
})}%`;
|
|
20639
|
+
let v = getTextWidth(g, `bold ${Math.floor(p * 1.03)}px sans-serif`);
|
|
20640
|
+
c && (v = v * 1.5);
|
|
20641
|
+
const C = c && iconMapper(c);
|
|
20642
|
+
return (v >= a * 0.85 || p * 2 < f) && (p = a * 0.85 / v * p), /* @__PURE__ */ jsx("div", {
|
|
20631
20643
|
ref: e,
|
|
20632
20644
|
style: {
|
|
20633
20645
|
width: "100%",
|
|
@@ -20641,8 +20653,8 @@ function PercentageIndicator({
|
|
|
20641
20653
|
},
|
|
20642
20654
|
children: /* @__PURE__ */ jsxs(Row, {
|
|
20643
20655
|
align: "middle",
|
|
20644
|
-
children: [
|
|
20645
|
-
children: /* @__PURE__ */ jsx(
|
|
20656
|
+
children: [C && /* @__PURE__ */ jsx(Col, {
|
|
20657
|
+
children: /* @__PURE__ */ jsx(C, {
|
|
20646
20658
|
style: {
|
|
20647
20659
|
fontSize: p * 1,
|
|
20648
20660
|
color: u,
|
|
@@ -20656,7 +20668,7 @@ function PercentageIndicator({
|
|
|
20656
20668
|
margin: 0,
|
|
20657
20669
|
color: u
|
|
20658
20670
|
},
|
|
20659
|
-
children:
|
|
20671
|
+
children: C ? ` ${o}%` : `${o}%`
|
|
20660
20672
|
}), /* @__PURE__ */ jsx(Title$2, {
|
|
20661
20673
|
style: {
|
|
20662
20674
|
fontSize: p * 0.4,
|
|
@@ -20664,13 +20676,18 @@ function PercentageIndicator({
|
|
|
20664
20676
|
color: u,
|
|
20665
20677
|
textAlign: "center"
|
|
20666
20678
|
},
|
|
20667
|
-
children:
|
|
20679
|
+
children: m
|
|
20668
20680
|
})]
|
|
20669
20681
|
})]
|
|
20670
20682
|
})
|
|
20671
20683
|
});
|
|
20672
20684
|
}
|
|
20673
|
-
const
|
|
20685
|
+
const formatter = (e) => (r) => {
|
|
20686
|
+
const a = r.value.toLocaleString("es-ES", {
|
|
20687
|
+
useGrouping: !0
|
|
20688
|
+
});
|
|
20689
|
+
return { name: e === "pie" ? r.x : r.type, value: a };
|
|
20690
|
+
}, DefaultGraphOptions = {
|
|
20674
20691
|
default: {
|
|
20675
20692
|
padding: "auto",
|
|
20676
20693
|
xAxis: {
|
|
@@ -20679,6 +20696,9 @@ const DefaultGraphOptions = {
|
|
|
20679
20696
|
legend: {
|
|
20680
20697
|
maxWidthRatio: 0.5,
|
|
20681
20698
|
maxItemWidth: 1e3
|
|
20699
|
+
},
|
|
20700
|
+
tooltip: {
|
|
20701
|
+
formatter: formatter("default")
|
|
20682
20702
|
}
|
|
20683
20703
|
},
|
|
20684
20704
|
pie: {
|
|
@@ -20697,6 +20717,9 @@ const DefaultGraphOptions = {
|
|
|
20697
20717
|
maxWidthRatio: 0.5,
|
|
20698
20718
|
maxItemWidth: 1e3
|
|
20699
20719
|
},
|
|
20720
|
+
tooltip: {
|
|
20721
|
+
formatter: formatter("pie")
|
|
20722
|
+
},
|
|
20700
20723
|
interactions: [
|
|
20701
20724
|
{
|
|
20702
20725
|
type: "element-active"
|
|
@@ -20709,6 +20732,9 @@ const DefaultGraphOptions = {
|
|
|
20709
20732
|
maxWidthRatio: 0.5,
|
|
20710
20733
|
maxItemWidth: 1e3
|
|
20711
20734
|
},
|
|
20735
|
+
tooltip: {
|
|
20736
|
+
formatter: formatter("barGrouped")
|
|
20737
|
+
},
|
|
20712
20738
|
label: {
|
|
20713
20739
|
position: "middle",
|
|
20714
20740
|
layout: [
|