@ambuj.bhaskar/react-component-library 0.30.9 → 0.30.10
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/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +52 -46
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -74093,42 +74093,44 @@ function jEe({
|
|
|
74093
74093
|
lineTension: r,
|
|
74094
74094
|
opacity: o,
|
|
74095
74095
|
lineStroke: i,
|
|
74096
|
-
colors: a
|
|
74096
|
+
colors: a,
|
|
74097
|
+
barPercentage: s,
|
|
74098
|
+
categoryPercentage: l
|
|
74097
74099
|
}) {
|
|
74098
|
-
const
|
|
74100
|
+
const u = a, d = t === "doughnut" || t === "pie";
|
|
74099
74101
|
return {
|
|
74100
74102
|
labels: e.labels,
|
|
74101
74103
|
datasets: e.datasets.map(
|
|
74102
|
-
(
|
|
74103
|
-
var
|
|
74104
|
-
return
|
|
74105
|
-
...
|
|
74106
|
-
label:
|
|
74107
|
-
data:
|
|
74108
|
-
backgroundColor:
|
|
74109
|
-
(
|
|
74110
|
-
|
|
74104
|
+
(h, C) => {
|
|
74105
|
+
var m;
|
|
74106
|
+
return d ? {
|
|
74107
|
+
...h,
|
|
74108
|
+
label: h.label,
|
|
74109
|
+
data: h.data,
|
|
74110
|
+
backgroundColor: h.colors && h.colors.length === h.data.length ? (m = h.colors) == null ? void 0 : m.map((v) => W4(v, o)) : h.data.map(
|
|
74111
|
+
(v, A) => W4(
|
|
74112
|
+
u[A % u.length],
|
|
74111
74113
|
o
|
|
74112
74114
|
)
|
|
74113
74115
|
),
|
|
74114
|
-
borderColor:
|
|
74115
|
-
(
|
|
74116
|
+
borderColor: h.colors && h.colors.length === h.data.length ? h.colors : h.data.map(
|
|
74117
|
+
(v, A) => u[A % u.length]
|
|
74116
74118
|
),
|
|
74117
74119
|
borderWidth: 2
|
|
74118
74120
|
} : {
|
|
74119
|
-
...
|
|
74120
|
-
label:
|
|
74121
|
-
data:
|
|
74121
|
+
...h,
|
|
74122
|
+
label: h.label,
|
|
74123
|
+
data: h.data,
|
|
74122
74124
|
backgroundColor: W4(
|
|
74123
|
-
|
|
74125
|
+
h.color || u[C % u.length],
|
|
74124
74126
|
o
|
|
74125
74127
|
),
|
|
74126
|
-
borderColor:
|
|
74128
|
+
borderColor: h.color || u[C % u.length],
|
|
74127
74129
|
borderWidth: t === "line" ? i : 1,
|
|
74128
74130
|
fill: n == "fill",
|
|
74129
74131
|
tension: r ?? 0.4,
|
|
74130
|
-
barPercentage: (
|
|
74131
|
-
categoryPercentage: (
|
|
74132
|
+
barPercentage: s ?? (h == null ? void 0 : h.barPercentage) ?? 1,
|
|
74133
|
+
categoryPercentage: l ?? (h == null ? void 0 : h.categoryPercentage) ?? 0.7
|
|
74132
74134
|
};
|
|
74133
74135
|
}
|
|
74134
74136
|
)
|
|
@@ -74342,28 +74344,32 @@ const zEe = (e) => {
|
|
|
74342
74344
|
backgroundColor: d,
|
|
74343
74345
|
className: h = "",
|
|
74344
74346
|
colors: C = ["#4e79a7", "#f28e2b", "#e15759", "#76b7b2"],
|
|
74345
|
-
displayExternalLegend: m = !1
|
|
74347
|
+
displayExternalLegend: m = !1,
|
|
74348
|
+
barPercentage: v,
|
|
74349
|
+
categoryPercentage: A
|
|
74346
74350
|
}) => {
|
|
74347
|
-
var
|
|
74348
|
-
const
|
|
74351
|
+
var F, V, $;
|
|
74352
|
+
const p = wt(null);
|
|
74349
74353
|
$Ee(e);
|
|
74350
|
-
const [
|
|
74354
|
+
const [y, x] = Pt(
|
|
74351
74355
|
() => TS(t, e)
|
|
74352
74356
|
);
|
|
74353
74357
|
Rt(() => {
|
|
74354
|
-
|
|
74358
|
+
x(TS(t, e));
|
|
74355
74359
|
}, [t, e]);
|
|
74356
|
-
const
|
|
74357
|
-
input:
|
|
74360
|
+
const E = WEe(t, e, y), S = jEe({
|
|
74361
|
+
input: E,
|
|
74358
74362
|
type: e,
|
|
74359
74363
|
lineVariant: o,
|
|
74360
74364
|
lineTension: i,
|
|
74361
74365
|
opacity: a,
|
|
74362
74366
|
lineStroke: s,
|
|
74363
|
-
colors: C
|
|
74364
|
-
|
|
74365
|
-
|
|
74366
|
-
}, _ = (
|
|
74367
|
+
colors: C,
|
|
74368
|
+
barPercentage: v,
|
|
74369
|
+
categoryPercentage: A
|
|
74370
|
+
}), _ = UEe(t, e, C, y), M = (K) => {
|
|
74371
|
+
x((X) => KEe(X, K));
|
|
74372
|
+
}, H = ((F = n == null ? void 0 : n.plugins) == null ? void 0 : F.legend) || {}, k = Ul.merge(
|
|
74367
74373
|
{},
|
|
74368
74374
|
VEe({
|
|
74369
74375
|
type: e,
|
|
@@ -74371,26 +74377,26 @@ const zEe = (e) => {
|
|
|
74371
74377
|
hideLegend: m
|
|
74372
74378
|
}),
|
|
74373
74379
|
n
|
|
74374
|
-
),
|
|
74375
|
-
return
|
|
74380
|
+
), B = ZEe[e], I = (($ = (V = n == null ? void 0 : n.plugins) == null ? void 0 : V.legend) == null ? void 0 : $.position) ?? "bottom", P = QEe(I), R = zEe(I), T = H.height ?? P.height, N = H.width ?? P.width;
|
|
74381
|
+
return B ? /* @__PURE__ */ j.jsxs(
|
|
74376
74382
|
"div",
|
|
74377
74383
|
{
|
|
74378
74384
|
className: "awi_chart_container",
|
|
74379
|
-
style: { flexDirection:
|
|
74385
|
+
style: { flexDirection: R, height: u, width: l },
|
|
74380
74386
|
children: [
|
|
74381
74387
|
/* @__PURE__ */ j.jsx(
|
|
74382
74388
|
"div",
|
|
74383
74389
|
{
|
|
74384
74390
|
style: {
|
|
74385
74391
|
width: "100%",
|
|
74386
|
-
height: m ? `calc(100% - ${
|
|
74392
|
+
height: m ? `calc(100% - ${T})` : "100%"
|
|
74387
74393
|
},
|
|
74388
74394
|
children: /* @__PURE__ */ j.jsx(
|
|
74389
|
-
|
|
74395
|
+
B,
|
|
74390
74396
|
{
|
|
74391
|
-
ref:
|
|
74392
|
-
data:
|
|
74393
|
-
options:
|
|
74397
|
+
ref: p,
|
|
74398
|
+
data: S,
|
|
74399
|
+
options: k,
|
|
74394
74400
|
style: {
|
|
74395
74401
|
backgroundColor: d,
|
|
74396
74402
|
height: "100%",
|
|
@@ -74404,14 +74410,14 @@ const zEe = (e) => {
|
|
|
74404
74410
|
m && /* @__PURE__ */ j.jsx(
|
|
74405
74411
|
GEe,
|
|
74406
74412
|
{
|
|
74407
|
-
items:
|
|
74408
|
-
onToggleDataset:
|
|
74409
|
-
scrollable:
|
|
74410
|
-
height:
|
|
74411
|
-
width:
|
|
74412
|
-
legendConfig:
|
|
74413
|
+
items: _,
|
|
74414
|
+
onToggleDataset: M,
|
|
74415
|
+
scrollable: H.scrollable ?? !1,
|
|
74416
|
+
height: T,
|
|
74417
|
+
width: N,
|
|
74418
|
+
legendConfig: H,
|
|
74413
74419
|
backgroundColor: d,
|
|
74414
|
-
position:
|
|
74420
|
+
position: I
|
|
74415
74421
|
}
|
|
74416
74422
|
)
|
|
74417
74423
|
]
|