@ambuj.bhaskar/react-component-library 0.30.8 → 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/assets/index.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.js +64 -57
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -681,6 +681,8 @@ export declare type ChartProps = {
|
|
|
681
681
|
lineTension?: number;
|
|
682
682
|
opacity?: number;
|
|
683
683
|
lineStroke?: number;
|
|
684
|
+
barPercentage?: number;
|
|
685
|
+
categoryPercentage?: number;
|
|
684
686
|
data: ChartData;
|
|
685
687
|
options?: any;
|
|
686
688
|
width?: string;
|
|
@@ -1304,6 +1306,7 @@ export declare type MultiselectProps = {
|
|
|
1304
1306
|
disabled?: boolean;
|
|
1305
1307
|
id?: string;
|
|
1306
1308
|
suffixIcon?: ReactNode | boolean;
|
|
1309
|
+
mode?: "multiple" | "tags";
|
|
1307
1310
|
};
|
|
1308
1311
|
|
|
1309
1312
|
declare type Option_2 = {
|
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
|
]
|
|
@@ -86035,7 +86041,8 @@ const GIe = {
|
|
|
86035
86041
|
id: E = "",
|
|
86036
86042
|
className: S = "",
|
|
86037
86043
|
textColor: _,
|
|
86038
|
-
textSize: M = "s"
|
|
86044
|
+
textSize: M = "s",
|
|
86045
|
+
mode: H = "multiple"
|
|
86039
86046
|
}) => (M = M ?? GIe[x], /* @__PURE__ */ j.jsx(
|
|
86040
86047
|
Ta,
|
|
86041
86048
|
{
|
|
@@ -86044,7 +86051,7 @@ const GIe = {
|
|
|
86044
86051
|
disabled: d,
|
|
86045
86052
|
showSearch: h,
|
|
86046
86053
|
className: `multi_select_container ${S} h_${x} text_${M}`,
|
|
86047
|
-
mode:
|
|
86054
|
+
mode: H,
|
|
86048
86055
|
style: {
|
|
86049
86056
|
width: y,
|
|
86050
86057
|
"--c_trigger_highlight": o,
|
|
@@ -86061,18 +86068,18 @@ const GIe = {
|
|
|
86061
86068
|
onChange: t,
|
|
86062
86069
|
popupClassName: `multi_select_dropdown h_${x} text_${M}`,
|
|
86063
86070
|
value: n,
|
|
86064
|
-
filterOption: (
|
|
86071
|
+
filterOption: (k, B) => ((B == null ? void 0 : B.label) ?? "").toLowerCase().includes(k.toLowerCase()),
|
|
86065
86072
|
title: p,
|
|
86066
86073
|
maxCount: m,
|
|
86067
86074
|
maxTagCount: C,
|
|
86068
|
-
maxTagPlaceholder: (
|
|
86075
|
+
maxTagPlaceholder: (k) => /* @__PURE__ */ j.jsx(
|
|
86069
86076
|
Da,
|
|
86070
86077
|
{
|
|
86071
86078
|
styles: { root: { pointerEvents: "none" } },
|
|
86072
|
-
title:
|
|
86079
|
+
title: k.map(({ label: B }) => B).join(", "),
|
|
86073
86080
|
children: /* @__PURE__ */ j.jsxs("span", { children: [
|
|
86074
86081
|
"+",
|
|
86075
|
-
|
|
86082
|
+
k.length
|
|
86076
86083
|
] })
|
|
86077
86084
|
}
|
|
86078
86085
|
)
|
|
@@ -89151,6 +89158,7 @@ const UPe = (e) => {
|
|
|
89151
89158
|
Ir,
|
|
89152
89159
|
{
|
|
89153
89160
|
icon: "deleteIcon",
|
|
89161
|
+
title: "Delete field",
|
|
89154
89162
|
size: "s",
|
|
89155
89163
|
variant: "secondary",
|
|
89156
89164
|
onClick: (s) => {
|
|
@@ -89186,6 +89194,7 @@ const UPe = (e) => {
|
|
|
89186
89194
|
Ir,
|
|
89187
89195
|
{
|
|
89188
89196
|
icon: "plus",
|
|
89197
|
+
title: "Add new section",
|
|
89189
89198
|
size: "s",
|
|
89190
89199
|
variant: "secondary",
|
|
89191
89200
|
onClick: (p) => {
|
|
@@ -89198,6 +89207,7 @@ const UPe = (e) => {
|
|
|
89198
89207
|
Ir,
|
|
89199
89208
|
{
|
|
89200
89209
|
icon: "deleteIcon",
|
|
89210
|
+
title: "Delete section",
|
|
89201
89211
|
size: "s",
|
|
89202
89212
|
variant: "secondary",
|
|
89203
89213
|
onClick: (p) => {
|
|
@@ -89326,7 +89336,7 @@ const UPe = (e) => {
|
|
|
89326
89336
|
maxHeight: n
|
|
89327
89337
|
},
|
|
89328
89338
|
children: [
|
|
89329
|
-
/* @__PURE__ */ j.jsxs("form", { className: "form-group-form", children: [
|
|
89339
|
+
/* @__PURE__ */ j.jsxs("form", { onSubmit: p(S), className: "form-group-form", children: [
|
|
89330
89340
|
/* @__PURE__ */ j.jsx("div", { className: "form-group-content", children: M() }),
|
|
89331
89341
|
(r || a) && /* @__PURE__ */ j.jsxs("div", { className: "form-group-actions", children: [
|
|
89332
89342
|
a && /* @__PURE__ */ j.jsx(
|
|
@@ -89344,10 +89354,7 @@ const UPe = (e) => {
|
|
|
89344
89354
|
type: "submit",
|
|
89345
89355
|
content: o,
|
|
89346
89356
|
loading: E,
|
|
89347
|
-
...i
|
|
89348
|
-
onClick: (H) => {
|
|
89349
|
-
H.preventDefault(), p(S);
|
|
89350
|
-
}
|
|
89357
|
+
...i
|
|
89351
89358
|
}
|
|
89352
89359
|
)
|
|
89353
89360
|
] })
|