1mpacto-react-ui 2.0.17 → 2.0.19
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/PieChart.cjs +1 -0
- package/dist/components/Chart/PieChart.mjs +172 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +67 -65
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.d.ts +1 -1
- package/dist/package.json.mjs +1 -1
- package/dist/src/components/Chart/PieChart.d.ts +3 -0
- package/dist/src/components/Chart/PieChart.stories.d.ts +134 -0
- package/dist/src/components/index.d.ts +4 -3
- package/dist/src/interfaces/components/Chart/index.d.ts +220 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("react/jsx-runtime"),j=require("chart.js"),h=require("react"),E=require("react-chartjs-2"),w=require("../../utils/common.cjs"),T=require("../PortalComponent/PortalComponent.cjs");j.Chart.register(j.ArcElement,j.Tooltip);const I=(t,l,n)=>{const r=l>0?t/l*100:0;switch(n){case"decimal":return w.formatNumber(t,"decimal");case"currency":return w.formatNumber(t,"currency");case"percentage":default:return`${Math.round(r)}%`}},O=()=>{const t=Math.floor(Math.random()*360),l=60+Math.floor(Math.random()*30),n=45+Math.floor(Math.random()*20);return((o,a,c)=>{a/=100,c/=100;const s=a*Math.min(c,1-c),d=u=>{const i=(u+o/30)%12,e=c-s*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*e).toString(16).padStart(2,"0")};return`#${d(0)}${d(8)}${d(4)}`})(t,l,n)},A=(t,l)=>Array.isArray(t)?t[l]||O():typeof t=="string"?t:O(),B=t=>{const l=t.labels??[],n=t.datasets[0];return n?(n.data??[]).map((o,a)=>({label:l[a]??"",value:o,backgroundColor:A(n.backgroundColor,a)})):[]},R=(t,l)=>{if(!l)return{labels:t.map(e=>e.label),values:t.map(e=>e.value),colors:t.map(e=>e.backgroundColor||O()),mergedMap:{}};const{mode:n,value:r,otherLabel:o="Other",otherBackgroundColor:a="#B0BEC5"}=l,c=t.reduce((e,p)=>e+p.value,0),s=[],d=[];let u=0;t.forEach(e=>{(n==="percentage"?e.value/c*100<r:e.value<r)?(u+=e.value,d.push(e)):s.push({label:e.label,value:e.value,color:e.backgroundColor||O()})});const i={};return u>0&&(s.push({label:o,value:u,color:a}),i[s.length-1]=d),{labels:s.map(e=>e.label),values:s.map(e=>e.value),colors:s.map(e=>e.color),mergedMap:i}},F=(t,l,n)=>({chart:r,tooltip:o})=>{var g,f,b,m,v,x,y,M,S,k;const a={};if(o.opacity===0){t(P=>({...P,style:{...P.style,opacity:0,pointerEvents:"none"}}));return}if(!o.dataPoints||o.dataPoints.length===0)return;a.opacity="1",a.position="absolute",a.pointerEvents="none";const c=r.canvas.getBoundingClientRect();a.left=c.left+window.pageXOffset+o.caretX+"px",a.top=c.top+window.pageYOffset+o.caretY+"px";const s=o.dataPoints[0].dataIndex,d=((f=(g=o.dataPoints)==null?void 0:g[0])==null?void 0:f.label)??"",u=((m=(b=o.dataPoints)==null?void 0:b[0])==null?void 0:m.raw)??0,i=((y=(x=(v=o.dataPoints)==null?void 0:v[0])==null?void 0:x.dataset.backgroundColor)==null?void 0:y[s])??"",e=((k=(S=(M=o.dataPoints)==null?void 0:M[0])==null?void 0:S.dataset.data)==null?void 0:k.reduce((P,q)=>P+q,0))||1,p=e>0?u/e*100:0;t({label:d,value:u,percentage:p,formattedValue:I(u,e,l),backgroundColor:typeof i=="string"?i:"#000",mergedItems:n[s]??[],style:a,dataPoints:o.dataPoints})},V=(t,l)=>({id:"pieLabelPlugin",afterDraw(n){const{ctx:r}=n,o=n.getDatasetMeta(0),a=n.data.datasets[0].data.reduce((c,s)=>c+s,0);o.data.forEach((c,s)=>{var f;const u=n.data.datasets[0].data[s]??0;if((a>0?u/a*100:0)<l)return;const{x:e,y:p}=c.tooltipPosition(!1),g=(f=n.data.labels)==null?void 0:f[s];r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle="#FFFFFF",r.font="bold 10px Inter, sans-serif",r.fillText(g,e||0,(p||0)-6),r.fillText(I(u,a,t),e||0,(p||0)+8),r.restore()})}}),$={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0}},elements:{arc:{hoverOffset:8,borderWidth:0}}},D=({data:t,height:l,classNameContainer:n,id:r,options:o,CustomTooltip:a,threshold:c,valueFormat:s,hideLabelBelowPercentage:d=5})=>{const[u,i]=h.useState({style:{opacity:0,position:"absolute",left:0,top:0},label:"",value:0,percentage:0,formattedValue:"",backgroundColor:"",mergedItems:[],dataPoints:[]}),e=h.useMemo(()=>B(t),[t]),{labels:p,values:g,colors:f,mergedMap:b}=h.useMemo(()=>R(e,c),[e,c]),m=h.useMemo(()=>({labels:p,datasets:[{...t.datasets[0],data:g,backgroundColor:f,hoverOffset:8,borderWidth:0}]}),[p,g,f,t.datasets]),v=h.useMemo(()=>{const x={plugins:{tooltip:{enabled:!a,external:a?({chart:y,tooltip:M})=>F(i,s,b)({chart:y,tooltip:M}):void 0}}};return w.mergeObjects($,x,o??{})},[o,a,s,b]);return C.jsxs("div",{id:r,className:n,style:{height:l||"300px"},children:[a&&C.jsx(T.default,{selector:"body",children:C.jsx(a,{...u})}),C.jsx(E.Pie,{data:m,options:v,plugins:[V(s,d)]})]})};exports.default=D;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsxs as A, jsx as O } from "react/jsx-runtime";
|
|
2
|
+
import { Chart as B, ArcElement as T, Tooltip as F } from "chart.js";
|
|
3
|
+
import h from "react";
|
|
4
|
+
import { Pie as R } from "react-chartjs-2";
|
|
5
|
+
import { mergeObjects as V, formatNumber as I } from "../../utils/common.mjs";
|
|
6
|
+
import $ from "../PortalComponent/PortalComponent.mjs";
|
|
7
|
+
B.register(T, F);
|
|
8
|
+
const E = (t, l, n) => {
|
|
9
|
+
const r = l > 0 ? t / l * 100 : 0;
|
|
10
|
+
switch (n) {
|
|
11
|
+
case "decimal":
|
|
12
|
+
return I(t, "decimal");
|
|
13
|
+
case "currency":
|
|
14
|
+
return I(t, "currency");
|
|
15
|
+
case "percentage":
|
|
16
|
+
default:
|
|
17
|
+
return `${Math.round(r)}%`;
|
|
18
|
+
}
|
|
19
|
+
}, P = () => {
|
|
20
|
+
const t = Math.floor(Math.random() * 360), l = 60 + Math.floor(Math.random() * 30), n = 45 + Math.floor(Math.random() * 20);
|
|
21
|
+
return ((o, a, c) => {
|
|
22
|
+
a /= 100, c /= 100;
|
|
23
|
+
const s = a * Math.min(c, 1 - c), u = (d) => {
|
|
24
|
+
const i = (d + o / 30) % 12, e = c - s * Math.max(Math.min(i - 3, 9 - i, 1), -1);
|
|
25
|
+
return Math.round(255 * e).toString(16).padStart(2, "0");
|
|
26
|
+
};
|
|
27
|
+
return `#${u(0)}${u(8)}${u(4)}`;
|
|
28
|
+
})(t, l, n);
|
|
29
|
+
}, j = (t, l) => Array.isArray(t) ? t[l] || P() : typeof t == "string" ? t : P(), D = (t) => {
|
|
30
|
+
const l = t.labels ?? [], n = t.datasets[0];
|
|
31
|
+
return n ? (n.data ?? []).map((o, a) => ({
|
|
32
|
+
label: l[a] ?? "",
|
|
33
|
+
value: o,
|
|
34
|
+
backgroundColor: j(n.backgroundColor, a)
|
|
35
|
+
})) : [];
|
|
36
|
+
}, L = (t, l) => {
|
|
37
|
+
if (!l)
|
|
38
|
+
return {
|
|
39
|
+
labels: t.map((e) => e.label),
|
|
40
|
+
values: t.map((e) => e.value),
|
|
41
|
+
colors: t.map((e) => e.backgroundColor || P()),
|
|
42
|
+
mergedMap: {}
|
|
43
|
+
};
|
|
44
|
+
const { mode: n, value: r, otherLabel: o = "Other", otherBackgroundColor: a = "#B0BEC5" } = l, c = t.reduce((e, p) => e + p.value, 0), s = [], u = [];
|
|
45
|
+
let d = 0;
|
|
46
|
+
t.forEach((e) => {
|
|
47
|
+
(n === "percentage" ? e.value / c * 100 < r : e.value < r) ? (d += e.value, u.push(e)) : s.push({
|
|
48
|
+
label: e.label,
|
|
49
|
+
value: e.value,
|
|
50
|
+
color: e.backgroundColor || P()
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
const i = {};
|
|
54
|
+
return d > 0 && (s.push({ label: o, value: d, color: a }), i[s.length - 1] = u), {
|
|
55
|
+
labels: s.map((e) => e.label),
|
|
56
|
+
values: s.map((e) => e.value),
|
|
57
|
+
colors: s.map((e) => e.color),
|
|
58
|
+
mergedMap: i
|
|
59
|
+
};
|
|
60
|
+
}, G = (t, l, n) => ({ chart: r, tooltip: o }) => {
|
|
61
|
+
var m, f, g, b, v, C, y, x, w, k;
|
|
62
|
+
const a = {};
|
|
63
|
+
if (o.opacity === 0) {
|
|
64
|
+
t((M) => ({ ...M, style: { ...M.style, opacity: 0, pointerEvents: "none" } }));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (!o.dataPoints || o.dataPoints.length === 0) return;
|
|
68
|
+
a.opacity = "1", a.position = "absolute", a.pointerEvents = "none";
|
|
69
|
+
const c = r.canvas.getBoundingClientRect();
|
|
70
|
+
a.left = c.left + window.pageXOffset + o.caretX + "px", a.top = c.top + window.pageYOffset + o.caretY + "px";
|
|
71
|
+
const s = o.dataPoints[0].dataIndex, u = ((f = (m = o.dataPoints) == null ? void 0 : m[0]) == null ? void 0 : f.label) ?? "", d = ((b = (g = o.dataPoints) == null ? void 0 : g[0]) == null ? void 0 : b.raw) ?? 0, i = ((y = (C = (v = o.dataPoints) == null ? void 0 : v[0]) == null ? void 0 : C.dataset.backgroundColor) == null ? void 0 : y[s]) ?? "", e = ((k = (w = (x = o.dataPoints) == null ? void 0 : x[0]) == null ? void 0 : w.dataset.data) == null ? void 0 : k.reduce((M, S) => M + S, 0)) || 1, p = e > 0 ? d / e * 100 : 0;
|
|
72
|
+
t({
|
|
73
|
+
label: u,
|
|
74
|
+
value: d,
|
|
75
|
+
percentage: p,
|
|
76
|
+
formattedValue: E(d, e, l),
|
|
77
|
+
backgroundColor: typeof i == "string" ? i : "#000",
|
|
78
|
+
mergedItems: n[s] ?? [],
|
|
79
|
+
style: a,
|
|
80
|
+
dataPoints: o.dataPoints
|
|
81
|
+
});
|
|
82
|
+
}, H = (t, l) => ({
|
|
83
|
+
id: "pieLabelPlugin",
|
|
84
|
+
afterDraw(n) {
|
|
85
|
+
const { ctx: r } = n, o = n.getDatasetMeta(0), a = n.data.datasets[0].data.reduce((c, s) => c + s, 0);
|
|
86
|
+
o.data.forEach((c, s) => {
|
|
87
|
+
var f;
|
|
88
|
+
const d = n.data.datasets[0].data[s] ?? 0;
|
|
89
|
+
if ((a > 0 ? d / a * 100 : 0) < l) return;
|
|
90
|
+
const { x: e, y: p } = c.tooltipPosition(!1), m = (f = n.data.labels) == null ? void 0 : f[s];
|
|
91
|
+
r.save(), r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = "#FFFFFF", r.font = "bold 10px Inter, sans-serif", r.fillText(m, e || 0, (p || 0) - 6), r.fillText(E(d, a, t), e || 0, (p || 0) + 8), r.restore();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}), N = {
|
|
95
|
+
responsive: !0,
|
|
96
|
+
maintainAspectRatio: !1,
|
|
97
|
+
plugins: {
|
|
98
|
+
legend: {
|
|
99
|
+
display: !1
|
|
100
|
+
},
|
|
101
|
+
tooltip: {
|
|
102
|
+
enabled: !0
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
elements: {
|
|
106
|
+
arc: {
|
|
107
|
+
hoverOffset: 8,
|
|
108
|
+
borderWidth: 0
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, K = ({
|
|
112
|
+
data: t,
|
|
113
|
+
height: l,
|
|
114
|
+
classNameContainer: n,
|
|
115
|
+
id: r,
|
|
116
|
+
options: o,
|
|
117
|
+
CustomTooltip: a,
|
|
118
|
+
threshold: c,
|
|
119
|
+
valueFormat: s,
|
|
120
|
+
hideLabelBelowPercentage: u = 5
|
|
121
|
+
}) => {
|
|
122
|
+
const [d, i] = h.useState({
|
|
123
|
+
style: { opacity: 0, position: "absolute", left: 0, top: 0 },
|
|
124
|
+
label: "",
|
|
125
|
+
value: 0,
|
|
126
|
+
percentage: 0,
|
|
127
|
+
formattedValue: "",
|
|
128
|
+
backgroundColor: "",
|
|
129
|
+
mergedItems: [],
|
|
130
|
+
dataPoints: []
|
|
131
|
+
}), e = h.useMemo(() => D(t), [t]), {
|
|
132
|
+
labels: p,
|
|
133
|
+
values: m,
|
|
134
|
+
colors: f,
|
|
135
|
+
mergedMap: g
|
|
136
|
+
} = h.useMemo(() => L(e, c), [e, c]), b = h.useMemo(
|
|
137
|
+
() => ({
|
|
138
|
+
labels: p,
|
|
139
|
+
datasets: [
|
|
140
|
+
{
|
|
141
|
+
...t.datasets[0],
|
|
142
|
+
data: m,
|
|
143
|
+
backgroundColor: f,
|
|
144
|
+
hoverOffset: 8,
|
|
145
|
+
borderWidth: 0
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}),
|
|
149
|
+
[p, m, f, t.datasets]
|
|
150
|
+
), v = h.useMemo(() => V(N, {
|
|
151
|
+
plugins: {
|
|
152
|
+
tooltip: {
|
|
153
|
+
enabled: !a,
|
|
154
|
+
external: a ? ({ chart: y, tooltip: x }) => G(i, s, g)({ chart: y, tooltip: x }) : void 0
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}, o ?? {}), [o, a, s, g]);
|
|
158
|
+
return /* @__PURE__ */ A("div", { id: r, className: n, style: { height: l || "300px" }, children: [
|
|
159
|
+
a && /* @__PURE__ */ O($, { selector: "body", children: /* @__PURE__ */ O(a, { ...d }) }),
|
|
160
|
+
/* @__PURE__ */ O(
|
|
161
|
+
R,
|
|
162
|
+
{
|
|
163
|
+
data: b,
|
|
164
|
+
options: v,
|
|
165
|
+
plugins: [H(s, u)]
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
] });
|
|
169
|
+
};
|
|
170
|
+
export {
|
|
171
|
+
K as default
|
|
172
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/common.cjs"),l=require("./utils/formatBigNumber.cjs"),d=require("./utils/cookies.cjs"),m=require("./components/Alert/index.cjs"),t=require("./utils/yup.cjs"),c=require("./config/bigNumber/index.cjs"),n=require("./utils/axiosBigNumber.cjs"),b=require("./config/tailwind/colors.cjs"),g=require("./config/tailwind/screen.cjs"),p=require("./config/tailwind/nativeScreen.cjs"),q=require("./components/TPublish/TPublish.cjs"),T=require("./components/Button/Button.cjs"),C=require("./components/Popover/Popover.cjs"),y=require("./components/Calendar/Calendar.cjs"),B=require("./components/Calendar/CalendarRange.cjs"),h=require("./components/DatePicker/DatePicker.cjs"),N=require("./components/DatePicker/DateRangePicker.cjs"),D=require("./components/DatePicker/FilterDate.cjs"),O=require("./components/Input/InputFloatingInner.cjs"),S=require("./components/Input/InputReguler.cjs"),I=require("./components/Pagination/Pagination.cjs"),P=require("./components/Tabs/Tabs.cjs"),x=require("./components/Tabs/TabPanel.cjs"),M=require("./components/Table/Table.cjs"),R=require("./components/Virtualization/TableVirtualization.cjs"),v=require("./components/Virtualization/ListVirtualization.cjs"),A=require("./components/SelectDropdownContainer/SelectDropdownContainer.cjs"),F=require("./components/Switch/Switch.cjs"),L=require("./components/ButtonIcon/ButtonIcon.cjs"),E=require("./components/Badges/Badges.cjs"),j=require("./components/Chips/Chips.cjs"),u=require("./components/RadioCheckbox/RadioCheckbox.cjs"),k=require("./components/RadioCheckbox/RadioCheckboxLabel.cjs"),w=require("./components/Breadcrumbs/Breadcrumbs.cjs"),V=require("./components/Sidebar/Sidebar.cjs"),z=require("./components/Collapse/Collapse.cjs"),K=require("./components/Modal/ModalDialog.cjs"),U=require("./components/Timeline/Timeline.cjs"),G=require("./components/FilterContainer/FilterContainer.cjs"),_=require("./components/NumberFormat/NumberFormat.cjs"),H=require("./components/PortalComponent/PortalComponent.cjs"),J=require("./components/Upload/UploadFile.cjs"),Q=require("./components/TruncateComponent/TruncateComponent.cjs"),W=require("./components/Upload/UploadImage.cjs"),Y=require("./components/Textarea/Textarea.cjs"),Z=require("./components/Chart/DoughnutChart.cjs"),$=require("./components/DatePicker/MonthYearPicker.cjs"),X=require("./components/RadioCheckbox/CheckboxTable.cjs"),ee=require("./components/Input/InputNative.cjs"),re=require("./components/Upload/UploadMultipleFile.cjs"),te=require("./components/ErrorMessage/ErrorMessage.cjs"),ae=require("./components/Textarea/TextareaFloatingInner.cjs"),oe=require("./components/Step/Step.cjs"),ne=require("./components/Chart/LineChart.cjs"),ue=require("./components/Tooltip/Tooltip.cjs"),ie=require("./components/ButtonPopover/ButtonPopover.cjs"),se=require("./components/Chart/GradientLineChart.cjs"),le=require("./components/Chart/GradientBarChart.cjs"),ce=require("./components/Step/StepIndicator.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/common.cjs"),l=require("./utils/formatBigNumber.cjs"),d=require("./utils/cookies.cjs"),m=require("./components/Alert/index.cjs"),t=require("./utils/yup.cjs"),c=require("./config/bigNumber/index.cjs"),n=require("./utils/axiosBigNumber.cjs"),b=require("./config/tailwind/colors.cjs"),g=require("./config/tailwind/screen.cjs"),p=require("./config/tailwind/nativeScreen.cjs"),q=require("./components/TPublish/TPublish.cjs"),T=require("./components/Button/Button.cjs"),C=require("./components/Popover/Popover.cjs"),y=require("./components/Calendar/Calendar.cjs"),B=require("./components/Calendar/CalendarRange.cjs"),h=require("./components/DatePicker/DatePicker.cjs"),N=require("./components/DatePicker/DateRangePicker.cjs"),D=require("./components/DatePicker/FilterDate.cjs"),O=require("./components/Input/InputFloatingInner.cjs"),S=require("./components/Input/InputReguler.cjs"),I=require("./components/Pagination/Pagination.cjs"),P=require("./components/Tabs/Tabs.cjs"),x=require("./components/Tabs/TabPanel.cjs"),M=require("./components/Table/Table.cjs"),R=require("./components/Virtualization/TableVirtualization.cjs"),v=require("./components/Virtualization/ListVirtualization.cjs"),A=require("./components/SelectDropdownContainer/SelectDropdownContainer.cjs"),F=require("./components/Switch/Switch.cjs"),L=require("./components/ButtonIcon/ButtonIcon.cjs"),E=require("./components/Badges/Badges.cjs"),j=require("./components/Chips/Chips.cjs"),u=require("./components/RadioCheckbox/RadioCheckbox.cjs"),k=require("./components/RadioCheckbox/RadioCheckboxLabel.cjs"),w=require("./components/Breadcrumbs/Breadcrumbs.cjs"),V=require("./components/Sidebar/Sidebar.cjs"),z=require("./components/Collapse/Collapse.cjs"),K=require("./components/Modal/ModalDialog.cjs"),U=require("./components/Timeline/Timeline.cjs"),G=require("./components/FilterContainer/FilterContainer.cjs"),_=require("./components/NumberFormat/NumberFormat.cjs"),H=require("./components/PortalComponent/PortalComponent.cjs"),J=require("./components/Upload/UploadFile.cjs"),Q=require("./components/TruncateComponent/TruncateComponent.cjs"),W=require("./components/Upload/UploadImage.cjs"),Y=require("./components/Textarea/Textarea.cjs"),Z=require("./components/Chart/DoughnutChart.cjs"),$=require("./components/DatePicker/MonthYearPicker.cjs"),X=require("./components/RadioCheckbox/CheckboxTable.cjs"),ee=require("./components/Input/InputNative.cjs"),re=require("./components/Upload/UploadMultipleFile.cjs"),te=require("./components/ErrorMessage/ErrorMessage.cjs"),ae=require("./components/Textarea/TextareaFloatingInner.cjs"),oe=require("./components/Step/Step.cjs"),ne=require("./components/Chart/LineChart.cjs"),ue=require("./components/Tooltip/Tooltip.cjs"),ie=require("./components/ButtonPopover/ButtonPopover.cjs"),se=require("./components/Chart/GradientLineChart.cjs"),le=require("./components/Chart/GradientBarChart.cjs"),ce=require("./components/Chart/PieChart.cjs"),fe=require("./components/Step/StepIndicator.cjs"),de=require("./components/TextEditor/TextEditor.cjs"),me=require("./components/Collapse/CollapseV2.cjs"),be=require("./components/Table/TableSubMobile.cjs"),ge=require("./components/TimeRange/TimeRange.cjs"),pe=require("./components/Textarea/TextareaInnerLabel.cjs"),qe=require("./components/Input/InputInnerLabel.cjs"),Te=require("./components/Text/Text.cjs"),Ce=require("./hooks/useElementOrWindowMediaQuery.cjs"),ye=require("./hooks/useCountdown.cjs"),Be=require("./hooks/useAsyncDebounce.cjs"),he=require("./hooks/useCombinedResizeObserver.cjs"),Ne=require("./hooks/useStateRef.cjs"),De=require("./hooks/useMasonry.cjs"),Oe=require("./hooks/useOtpInput.cjs"),Se=require("bignumber.js"),i=require("./config/tailwind/typography.cjs"),Ie=require("@tanstack/react-table"),Pe=require("react-select"),xe=require("react-number-format"),Me=require("./components/Table/Table.config.cjs"),Re=require("react-toastify"),f=require("./hooks/useDeepCompareEffect.cjs"),ve=require("./hooks/useMergeRefs.cjs"),Ae=require("./hooks/useEventListener.cjs");function Fe(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}return o.default=r,Object.freeze(o)}const Le=Fe(Ie);exports.deepCompareEquals=e.deepCompareEquals;exports.deepMerge=e.deepMerge;exports.deleteKeysImmutable=e.deleteKeysImmutable;exports.deleteKeysMutable=e.deleteKeysMutable;exports.encryptRSAOAEP=e.encryptRSAOAEP;exports.extractElementStringToOriginalValue=e.extractElementStringToOriginalValue;exports.formatDate=e.formatDate;exports.formatDateRange=e.formatDateRange;exports.formatNumber=e.formatNumber;exports.groupByKey=e.groupByKey;exports.isAccurateBigNumber=e.isAccurateBigNumber;exports.isAccurateNumber=e.isAccurateNumber;exports.isObject=e.isObject;exports.parseBigDecimal=e.parseBigDecimal;exports.parseDecimal=e.parseDecimal;exports.parseFileName=e.parseFileName;exports.removeKeyObjectEmptyValue=e.removeKeyObjectEmptyValue;exports.setDigit=e.setDigit;exports.transformArrayMapping=e.transformArrayMapping;exports.transformArrayMappingObjectFC=e.transformArrayMappingObjectFC;exports.transformArrayOfObjectToArray=e.transformArrayOfObjectToArray;exports.transformArrayOfObjectToString=e.transformArrayOfObjectToString;exports.transformBigNumber=e.transformBigNumber;exports.transformBigNumberOpt=e.transformBigNumberOpt;exports.transformDataHistory=e.transformDataHistory;exports.transformLatLong=e.transformLatLong;exports.transformNumber=e.transformNumber;exports.transformSecondTime=e.transformSecondTime;exports.transfromIsNan=e.transfromIsNan;exports.formatBigNumber=l.formatBigNumber;exports.removeTrailingZeros=l.removeTrailingZeros;exports.cookieStorage=d.default;exports.openAlert=m.openAlert;exports.betweenBig=t.betweenBig;exports.lessThanBig=t.lessThanBig;exports.maxBig=t.maxBig;exports.minBig=t.minBig;exports.moreThanBig=t.moreThanBig;exports.BigNumber=c.BigNumber;exports.defaultConfig=c.defaultConfig;exports.convertBigNumbersToStrings=n.convertBigNumbersToStrings;exports.convertNumbersToBigNumbers=n.convertNumbersToBigNumbers;exports.convertTextToJsonBigNumbers=n.convertTextToJsonBigNumbers;exports.ConfigColors=b.default;exports.configScreens=g.default;exports.configNativeScreens=p.default;exports.TPublish=q.default;exports.Button=T.default;exports.Popover=C.default;exports.Calendar=y.default;exports.CalendarRange=B.default;exports.DatePicker=h.default;exports.DateRangePicker=N.default;exports.FilterDate=D.default;exports.InputFloatingInner=O.default;exports.InputReguler=S.default;exports.Pagination=I.default;exports.Tabs=P.default;exports.TabPanel=x.default;exports.Table=M.default;exports.TableVirtualization=R.default;exports.ListVirtualization=v.default;exports.SelectDropdownContainer=A.default;exports.Switch=F.default;exports.ButtonIcon=L.default;exports.Badges=E.default;exports.Chips=j.default;exports.DefaultCheckedChecboxIcon=u.DefaultCheckedChecboxIcon;exports.DefaultRadioChecboxIcon=u.DefaultRadioChecboxIcon;exports.RadioCheckbox=u.default;exports.RadioCheckboxLabel=k.default;exports.Breadcrumbs=w.default;exports.Sidebar=V.default;exports.Collapse=z.default;exports.ModalDialog=K.default;exports.Timeline=U.default;exports.FilterContainer=G.default;exports.NumberFormat=_.default;exports.PortalComponent=H.default;exports.UploadFile=J.default;exports.TruncateComponent=Q.default;exports.UploadImage=W.default;exports.Textarea=Y.default;exports.DoughnutChart=Z.default;exports.MonthYearPicker=$.default;exports.CheckboxTable=X.default;exports.InputNative=ee.default;exports.UploadMultipleFile=re.default;exports.ErrorMessage=te.default;exports.TextareaFloatingInner=ae.default;exports.Step=oe.default;exports.LineChart=ne.default;exports.Tooltip=ue.default;exports.ButtonPopover=ie.default;exports.GradientLineChart=se.default;exports.GradientBarChart=le.default;exports.PieChart=ce.default;exports.StepIndicator=fe.default;exports.TextEditor=de.default;exports.CollapseV2=me.default;exports.TableSubComponent=be.default;exports.TimeRange=ge.default;exports.TextareaInnerLabel=pe.default;exports.InputInnerLabel=qe.default;exports.Text=Te.default;exports.useElementOrWindowMediaQuery=Ce.default;exports.useCountdown=ye.default;exports.useAsyncDebounce=Be.default;exports.useCombinedResizeObserver=he.default;exports.useStateRef=Ne.default;exports.useMasonry=De.default;exports.useOtpInput=Oe.useOtpInput;exports.TypeBigNumber=Se;exports.configTypography=i.default;exports.configTypographyLabaBisnis=i.configTypographyLabaBisnis;exports.configTypographyPayhere=i.configTypographyPayhere;exports.utilTable=Le;Object.defineProperty(exports,"SelectDropdownContainerComponents",{enumerable:!0,get:()=>Pe.components});Object.defineProperty(exports,"PatternFormat",{enumerable:!0,get:()=>xe.PatternFormat});exports.ConfigTable=Me.ConfigTable;Object.defineProperty(exports,"AlertContainer",{enumerable:!0,get:()=>Re.ToastContainer});exports.useDeepCompareEffect=f.useDeepCompareEffect;exports.useDeepCompareMemoize=f.useDeepCompareMemoize;exports.useMergeRefs=ve.useMergeRefs;exports.useEventListener=Ae.useEventListener;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepCompareEquals as t, deepMerge as a, deleteKeysImmutable as f, deleteKeysMutable as m, encryptRSAOAEP as s, extractElementStringToOriginalValue as p, formatDate as l, formatDateRange as u, formatNumber as n, groupByKey as i, isAccurateBigNumber as d, isAccurateNumber as x, isObject as g, parseBigDecimal as c, parseDecimal as b, parseFileName as
|
|
1
|
+
import { deepCompareEquals as t, deepMerge as a, deleteKeysImmutable as f, deleteKeysMutable as m, encryptRSAOAEP as s, extractElementStringToOriginalValue as p, formatDate as l, formatDateRange as u, formatNumber as n, groupByKey as i, isAccurateBigNumber as d, isAccurateNumber as x, isObject as g, parseBigDecimal as c, parseDecimal as b, parseFileName as C, removeKeyObjectEmptyValue as T, setDigit as y, transformArrayMapping as B, transformArrayMappingObjectFC as h, transformArrayOfObjectToArray as D, transformArrayOfObjectToString as N, transformBigNumber as I, transformBigNumberOpt as S, transformDataHistory as O, transformLatLong as P, transformNumber as A, transformSecondTime as M, transfromIsNan as R } from "./utils/common.mjs";
|
|
2
2
|
import { formatBigNumber as F, removeTrailingZeros as L } from "./utils/formatBigNumber.mjs";
|
|
3
3
|
import { default as k } from "./utils/cookies.mjs";
|
|
4
4
|
import { openAlert as j } from "./components/Alert/index.mjs";
|
|
@@ -15,12 +15,12 @@ import { default as ne } from "./components/Calendar/Calendar.mjs";
|
|
|
15
15
|
import { default as de } from "./components/Calendar/CalendarRange.mjs";
|
|
16
16
|
import { default as ge } from "./components/DatePicker/DatePicker.mjs";
|
|
17
17
|
import { default as be } from "./components/DatePicker/DateRangePicker.mjs";
|
|
18
|
-
import { default as
|
|
18
|
+
import { default as Te } from "./components/DatePicker/FilterDate.mjs";
|
|
19
19
|
import { default as Be } from "./components/Input/InputFloatingInner.mjs";
|
|
20
20
|
import { default as De } from "./components/Input/InputReguler.mjs";
|
|
21
21
|
import { default as Ie } from "./components/Pagination/Pagination.mjs";
|
|
22
22
|
import { default as Oe } from "./components/Tabs/Tabs.mjs";
|
|
23
|
-
import { default as
|
|
23
|
+
import { default as Ae } from "./components/Tabs/TabPanel.mjs";
|
|
24
24
|
import { default as Re } from "./components/Table/Table.mjs";
|
|
25
25
|
import { default as Fe } from "./components/Virtualization/TableVirtualization.mjs";
|
|
26
26
|
import { default as Ee } from "./components/Virtualization/ListVirtualization.mjs";
|
|
@@ -41,12 +41,12 @@ import { default as nr } from "./components/NumberFormat/NumberFormat.mjs";
|
|
|
41
41
|
import { default as dr } from "./components/PortalComponent/PortalComponent.mjs";
|
|
42
42
|
import { default as gr } from "./components/Upload/UploadFile.mjs";
|
|
43
43
|
import { default as br } from "./components/TruncateComponent/TruncateComponent.mjs";
|
|
44
|
-
import { default as
|
|
44
|
+
import { default as Tr } from "./components/Upload/UploadImage.mjs";
|
|
45
45
|
import { default as Br } from "./components/Textarea/Textarea.mjs";
|
|
46
46
|
import { default as Dr } from "./components/Chart/DoughnutChart.mjs";
|
|
47
47
|
import { default as Ir } from "./components/DatePicker/MonthYearPicker.mjs";
|
|
48
48
|
import { default as Or } from "./components/RadioCheckbox/CheckboxTable.mjs";
|
|
49
|
-
import { default as
|
|
49
|
+
import { default as Ar } from "./components/Input/InputNative.mjs";
|
|
50
50
|
import { default as Rr } from "./components/Upload/UploadMultipleFile.mjs";
|
|
51
51
|
import { default as Fr } from "./components/ErrorMessage/ErrorMessage.mjs";
|
|
52
52
|
import { default as Er } from "./components/Textarea/TextareaFloatingInner.mjs";
|
|
@@ -56,33 +56,34 @@ import { default as Kr } from "./components/Tooltip/Tooltip.mjs";
|
|
|
56
56
|
import { default as Gr } from "./components/ButtonPopover/ButtonPopover.mjs";
|
|
57
57
|
import { default as Hr } from "./components/Chart/GradientLineChart.mjs";
|
|
58
58
|
import { default as Qr } from "./components/Chart/GradientBarChart.mjs";
|
|
59
|
-
import { default as Yr } from "./components/
|
|
60
|
-
import { default as Xr } from "./components/
|
|
61
|
-
import { default as $r } from "./components/
|
|
62
|
-
import { default as ro } from "./components/
|
|
63
|
-
import { default as to } from "./components/
|
|
64
|
-
import { default as fo } from "./components/
|
|
65
|
-
import { default as so } from "./components/
|
|
66
|
-
import { default as lo } from "./components/
|
|
67
|
-
import { default as no } from "./
|
|
68
|
-
import { default as xo } from "./hooks/
|
|
69
|
-
import { default as co } from "./hooks/
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as yo } from "./hooks/
|
|
72
|
-
import { default as ho } from "./hooks/
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import { default as
|
|
59
|
+
import { default as Yr } from "./components/Chart/PieChart.mjs";
|
|
60
|
+
import { default as Xr } from "./components/Step/StepIndicator.mjs";
|
|
61
|
+
import { default as $r } from "./components/TextEditor/TextEditor.mjs";
|
|
62
|
+
import { default as ro } from "./components/Collapse/CollapseV2.mjs";
|
|
63
|
+
import { default as to } from "./components/Table/TableSubMobile.mjs";
|
|
64
|
+
import { default as fo } from "./components/TimeRange/TimeRange.mjs";
|
|
65
|
+
import { default as so } from "./components/Textarea/TextareaInnerLabel.mjs";
|
|
66
|
+
import { default as lo } from "./components/Input/InputInnerLabel.mjs";
|
|
67
|
+
import { default as no } from "./components/Text/Text.mjs";
|
|
68
|
+
import { default as xo } from "./hooks/useElementOrWindowMediaQuery.mjs";
|
|
69
|
+
import { default as co } from "./hooks/useCountdown.mjs";
|
|
70
|
+
import { default as Co } from "./hooks/useAsyncDebounce.mjs";
|
|
71
|
+
import { default as yo } from "./hooks/useCombinedResizeObserver.mjs";
|
|
72
|
+
import { default as ho } from "./hooks/useStateRef.mjs";
|
|
73
|
+
import { default as No } from "./hooks/useMasonry.mjs";
|
|
74
|
+
import { useOtpInput as So } from "./hooks/useOtpInput.mjs";
|
|
75
|
+
import { default as Po } from "bignumber.js";
|
|
76
|
+
import { default as Mo, configTypographyLabaBisnis as Ro, configTypographyPayhere as vo } from "./config/tailwind/typography.mjs";
|
|
76
77
|
import * as e from "@tanstack/react-table";
|
|
77
|
-
import { components as
|
|
78
|
-
import { PatternFormat as
|
|
79
|
-
import { ConfigTable as
|
|
80
|
-
import { ToastContainer as
|
|
81
|
-
import { useDeepCompareEffect as
|
|
82
|
-
import { useMergeRefs as
|
|
83
|
-
import { useEventListener as
|
|
78
|
+
import { components as Lo } from "react-select";
|
|
79
|
+
import { PatternFormat as ko } from "react-number-format";
|
|
80
|
+
import { ConfigTable as jo } from "./components/Table/Table.config.mjs";
|
|
81
|
+
import { ToastContainer as zo } from "react-toastify";
|
|
82
|
+
import { useDeepCompareEffect as Uo, useDeepCompareMemoize as Go } from "./hooks/useDeepCompareEffect.mjs";
|
|
83
|
+
import { useMergeRefs as Ho } from "./hooks/useMergeRefs.mjs";
|
|
84
|
+
import { useEventListener as Qo } from "./hooks/useEventListener.mjs";
|
|
84
85
|
export {
|
|
85
|
-
|
|
86
|
+
zo as AlertContainer,
|
|
86
87
|
Ge as Badges,
|
|
87
88
|
J as BigNumber,
|
|
88
89
|
$e as Breadcrumbs,
|
|
@@ -94,9 +95,9 @@ export {
|
|
|
94
95
|
Or as CheckboxTable,
|
|
95
96
|
He as Chips,
|
|
96
97
|
tr as Collapse,
|
|
97
|
-
|
|
98
|
+
ro as CollapseV2,
|
|
98
99
|
$ as ConfigColors,
|
|
99
|
-
|
|
100
|
+
jo as ConfigTable,
|
|
100
101
|
ge as DatePicker,
|
|
101
102
|
be as DateRangePicker,
|
|
102
103
|
Qe as DefaultCheckedChecboxIcon,
|
|
@@ -104,12 +105,12 @@ export {
|
|
|
104
105
|
Dr as DoughnutChart,
|
|
105
106
|
Fr as ErrorMessage,
|
|
106
107
|
lr as FilterContainer,
|
|
107
|
-
|
|
108
|
+
Te as FilterDate,
|
|
108
109
|
Qr as GradientBarChart,
|
|
109
110
|
Hr as GradientLineChart,
|
|
110
111
|
Be as InputFloatingInner,
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
lo as InputInnerLabel,
|
|
113
|
+
Ar as InputNative,
|
|
113
114
|
De as InputReguler,
|
|
114
115
|
Vr as LineChart,
|
|
115
116
|
Ee as ListVirtualization,
|
|
@@ -117,42 +118,43 @@ export {
|
|
|
117
118
|
Ir as MonthYearPicker,
|
|
118
119
|
nr as NumberFormat,
|
|
119
120
|
Ie as Pagination,
|
|
120
|
-
|
|
121
|
+
ko as PatternFormat,
|
|
122
|
+
Yr as PieChart,
|
|
121
123
|
le as Popover,
|
|
122
124
|
dr as PortalComponent,
|
|
123
125
|
Ye as RadioCheckbox,
|
|
124
126
|
Xe as RadioCheckboxLabel,
|
|
125
127
|
we as SelectDropdownContainer,
|
|
126
|
-
|
|
128
|
+
Lo as SelectDropdownContainerComponents,
|
|
127
129
|
rr as Sidebar,
|
|
128
130
|
wr as Step,
|
|
129
|
-
|
|
131
|
+
Xr as StepIndicator,
|
|
130
132
|
Ve as Switch,
|
|
131
133
|
fe as TPublish,
|
|
132
|
-
|
|
134
|
+
Ae as TabPanel,
|
|
133
135
|
Re as Table,
|
|
134
|
-
|
|
136
|
+
to as TableSubComponent,
|
|
135
137
|
Fe as TableVirtualization,
|
|
136
138
|
Oe as Tabs,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
no as Text,
|
|
140
|
+
$r as TextEditor,
|
|
139
141
|
Br as Textarea,
|
|
140
142
|
Er as TextareaFloatingInner,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
so as TextareaInnerLabel,
|
|
144
|
+
fo as TimeRange,
|
|
143
145
|
sr as Timeline,
|
|
144
146
|
Kr as Tooltip,
|
|
145
147
|
br as TruncateComponent,
|
|
146
|
-
|
|
148
|
+
Po as TypeBigNumber,
|
|
147
149
|
gr as UploadFile,
|
|
148
|
-
|
|
150
|
+
Tr as UploadImage,
|
|
149
151
|
Rr as UploadMultipleFile,
|
|
150
152
|
z as betweenBig,
|
|
151
153
|
te as configNativeScreens,
|
|
152
154
|
re as configScreens,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
Mo as configTypography,
|
|
156
|
+
Ro as configTypographyLabaBisnis,
|
|
157
|
+
vo as configTypographyPayhere,
|
|
156
158
|
Y as convertBigNumbersToStrings,
|
|
157
159
|
Z as convertNumbersToBigNumbers,
|
|
158
160
|
X as convertTextToJsonBigNumbers,
|
|
@@ -179,8 +181,8 @@ export {
|
|
|
179
181
|
j as openAlert,
|
|
180
182
|
c as parseBigDecimal,
|
|
181
183
|
b as parseDecimal,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
C as parseFileName,
|
|
185
|
+
T as removeKeyObjectEmptyValue,
|
|
184
186
|
L as removeTrailingZeros,
|
|
185
187
|
y as setDigit,
|
|
186
188
|
B as transformArrayMapping,
|
|
@@ -190,20 +192,20 @@ export {
|
|
|
190
192
|
I as transformBigNumber,
|
|
191
193
|
S as transformBigNumberOpt,
|
|
192
194
|
O as transformDataHistory,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
195
|
+
P as transformLatLong,
|
|
196
|
+
A as transformNumber,
|
|
197
|
+
M as transformSecondTime,
|
|
196
198
|
R as transfromIsNan,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
199
|
+
Co as useAsyncDebounce,
|
|
200
|
+
yo as useCombinedResizeObserver,
|
|
201
|
+
co as useCountdown,
|
|
202
|
+
Uo as useDeepCompareEffect,
|
|
203
|
+
Go as useDeepCompareMemoize,
|
|
204
|
+
xo as useElementOrWindowMediaQuery,
|
|
205
|
+
Qo as useEventListener,
|
|
206
|
+
No as useMasonry,
|
|
207
|
+
Ho as useMergeRefs,
|
|
208
|
+
So as useOtpInput,
|
|
209
|
+
ho as useStateRef,
|
|
208
210
|
e as utilTable
|
|
209
211
|
};
|
package/dist/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="2.0.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="2.0.19",o={version:e};exports.default=o;exports.version=e;
|
package/dist/package.json.d.ts
CHANGED
package/dist/package.json.mjs
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IPieChart } from '../../interfaces/components/Chart';
|
|
2
|
+
declare const PieChart: ({ data, height, classNameContainer, id, options, CustomTooltip, threshold, valueFormat, hideLabelBelowPercentage, }: IPieChart) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default PieChart;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ data, height, classNameContainer, id, options, CustomTooltip, threshold, valueFormat, hideLabelBelowPercentage, }: import('..').IPieChart) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {};
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {
|
|
8
|
+
id: {
|
|
9
|
+
control: "text";
|
|
10
|
+
description: string;
|
|
11
|
+
table: {
|
|
12
|
+
category: string;
|
|
13
|
+
type: {
|
|
14
|
+
summary: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
data: {
|
|
19
|
+
control: "object";
|
|
20
|
+
description: string;
|
|
21
|
+
table: {
|
|
22
|
+
category: string;
|
|
23
|
+
type: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
height: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "number";
|
|
31
|
+
min: number;
|
|
32
|
+
step: number;
|
|
33
|
+
};
|
|
34
|
+
description: string;
|
|
35
|
+
table: {
|
|
36
|
+
category: string;
|
|
37
|
+
type: {
|
|
38
|
+
summary: string;
|
|
39
|
+
};
|
|
40
|
+
defaultValue: {
|
|
41
|
+
summary: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
classNameContainer: {
|
|
46
|
+
control: "text";
|
|
47
|
+
description: string;
|
|
48
|
+
table: {
|
|
49
|
+
category: string;
|
|
50
|
+
type: {
|
|
51
|
+
summary: string;
|
|
52
|
+
};
|
|
53
|
+
defaultValue: {
|
|
54
|
+
summary: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
options: {
|
|
59
|
+
control: "object";
|
|
60
|
+
description: string;
|
|
61
|
+
table: {
|
|
62
|
+
category: string;
|
|
63
|
+
type: {
|
|
64
|
+
summary: string;
|
|
65
|
+
};
|
|
66
|
+
defaultValue: {
|
|
67
|
+
summary: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
threshold: {
|
|
72
|
+
control: "object";
|
|
73
|
+
description: string;
|
|
74
|
+
table: {
|
|
75
|
+
category: string;
|
|
76
|
+
type: {
|
|
77
|
+
summary: string;
|
|
78
|
+
};
|
|
79
|
+
defaultValue: {
|
|
80
|
+
summary: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
valueFormat: {
|
|
85
|
+
control: "select";
|
|
86
|
+
options: string[];
|
|
87
|
+
description: string;
|
|
88
|
+
table: {
|
|
89
|
+
category: string;
|
|
90
|
+
type: {
|
|
91
|
+
summary: string;
|
|
92
|
+
};
|
|
93
|
+
defaultValue: {
|
|
94
|
+
summary: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
hideLabelBelowPercentage: {
|
|
99
|
+
control: {
|
|
100
|
+
type: "number";
|
|
101
|
+
min: number;
|
|
102
|
+
step: number;
|
|
103
|
+
};
|
|
104
|
+
description: string;
|
|
105
|
+
table: {
|
|
106
|
+
category: string;
|
|
107
|
+
type: {
|
|
108
|
+
summary: string;
|
|
109
|
+
};
|
|
110
|
+
defaultValue: {
|
|
111
|
+
summary: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
CustomTooltip: {
|
|
116
|
+
control: false;
|
|
117
|
+
description: string;
|
|
118
|
+
table: {
|
|
119
|
+
category: string;
|
|
120
|
+
type: {
|
|
121
|
+
summary: string;
|
|
122
|
+
};
|
|
123
|
+
defaultValue: {
|
|
124
|
+
summary: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
args: {};
|
|
130
|
+
render: (args: import('..').IPieChart) => import("react/jsx-runtime").JSX.Element;
|
|
131
|
+
};
|
|
132
|
+
export default meta;
|
|
133
|
+
type Story = StoryObj<typeof meta>;
|
|
134
|
+
export declare const Default: Story;
|
|
@@ -58,7 +58,7 @@ import { ITableVirtualization } from '../interfaces/components/Virtualization/Ta
|
|
|
58
58
|
import { default as DoughnutChart } from './Chart/DoughnutChart';
|
|
59
59
|
import { default as MonthYearPicker } from './DatePicker/MonthYearPicker';
|
|
60
60
|
import { default as CheckboxTable } from './RadioCheckbox/CheckboxTable';
|
|
61
|
-
import { IDataInnerLabelDoughnutChart, IDataDoughnutChart, IDataLineChart, TGradientLineChartCustomTooltip, IGradientLineChart, IGradientLineChartDataSet, IGradientLineChartData, TGradientBarChartCustomTooltip, IGradientBarChart, IGradientBarChartDataSet, IGradientBarChartData, IDataGradientBarChartCustomTooltip, IDataGradientLineChartCustomTooltip } from '../interfaces/components/Chart';
|
|
61
|
+
import { IDataInnerLabelDoughnutChart, IDataDoughnutChart, IDataLineChart, TGradientLineChartCustomTooltip, IGradientLineChart, IGradientLineChartDataSet, IGradientLineChartData, TGradientBarChartCustomTooltip, IGradientBarChart, IGradientBarChartDataSet, IGradientBarChartData, IDataGradientBarChartCustomTooltip, IDataGradientLineChartCustomTooltip, IPieChart, IPieChartDataSet, IPieChartData, TPieChartCustomTooltip, IDataPieChartCustomTooltip, IPieChartThreshold } from '../interfaces/components/Chart';
|
|
62
62
|
import { default as InputNative } from './Input/InputNative';
|
|
63
63
|
import { default as UploadMultipleFile } from './Upload/UploadMultipleFile';
|
|
64
64
|
import { IUploadMultipleFileValue } from '../interfaces/components/UploadFile';
|
|
@@ -72,6 +72,7 @@ import { default as ButtonPopover } from './ButtonPopover/ButtonPopover';
|
|
|
72
72
|
import { IRefButtonPopover } from '../interfaces/components/ButtonPopover';
|
|
73
73
|
import { default as GradientLineChart } from './Chart/GradientLineChart';
|
|
74
74
|
import { default as GradientBarChart } from './Chart/GradientBarChart';
|
|
75
|
+
import { default as PieChart } from './Chart/PieChart';
|
|
75
76
|
import { default as StepIndicator } from './Step/StepIndicator';
|
|
76
77
|
import { default as TextEditor } from './TextEditor/TextEditor';
|
|
77
78
|
import { ITextEditorProps } from '../interfaces/components/TextEditor';
|
|
@@ -84,5 +85,5 @@ import { default as Text } from './Text/Text';
|
|
|
84
85
|
import * as utilTable from '@tanstack/react-table';
|
|
85
86
|
import type * as SelectDropdownContainerType from 'react-select';
|
|
86
87
|
import type * as FilterContainerType from '../interfaces/components/FilterContainer';
|
|
87
|
-
export { TPublish, Button, Popover, Calendar, CalendarRange, DatePicker, DateRangePicker, FilterDate, InputFloatingInner, InputReguler, Pagination, Tabs, TabPanel, Table, TableVirtualization, ListVirtualization, SelectDropdownContainer, utilTable, Switch, ButtonIcon, Badges, Chips, RadioCheckbox, RadioCheckboxLabel, Breadcrumbs, Sidebar, Collapse, ModalDialog, SelectDropdownContainerComponents, Timeline, FilterContainer, NumberFormat, PatternFormat, DefaultCheckedChecboxIcon, DefaultRadioChecboxIcon, ConfigTable, PortalComponent, AlertContainer, UploadFile, TruncateComponent, UploadImage, Textarea, DoughnutChart, MonthYearPicker, CheckboxTable, InputNative, UploadMultipleFile, ErrorMessage, TextareaFloatingInner, Step, LineChart, Tooltip, ButtonPopover, GradientLineChart, GradientBarChart, StepIndicator, TextEditor, CollapseV2, TableSubComponent, TimeRange, TextareaInnerLabel, InputInnerLabel, Text, };
|
|
88
|
-
export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, ISidebarModule, SelectDropdownContainerType, FilterContainerType, IInputReguler, IInputFloatingInner, ITableConfig, TButtonVariants, TButtonSize, ITabsList, TTypeEventTabs, ITextarea, IListVirtualization, ITableVirtualization, IRefSidebar, IChildrenIconCompany, ICloneElementSidebar, IDataDoughnutChart, IDataInnerLabelDoughnutChart, ISelectDropdownContainer, IDatePicker, IPopover, IInputNative, IUploadMultipleFileValue, IDataStepList, IDataLineChart, IChips, IRefButtonPopover, TGradientLineChartCustomTooltip, IGradientLineChart, IGradientLineChartDataSet, IGradientLineChartData, TGradientBarChartCustomTooltip, IGradientBarChart, IGradientBarChartDataSet, IGradientBarChartData, IFilterDateButtonList, TKeyFilterDateButtonListType, IDataGradientBarChartCustomTooltip, IDataGradientLineChartCustomTooltip, ITextEditorProps, ICollapse, ITableColumnBreakpoint, TTableRenderSubComponent, TTableHandlerRowClick, TKeyLocale, ITimeRangeListTime, ITimeRange, TTimeRangeValue, IButton, TButtonIconVariants, TButtonIconSize, IButtonIcon, ISidebar, };
|
|
88
|
+
export { TPublish, Button, Popover, Calendar, CalendarRange, DatePicker, DateRangePicker, FilterDate, InputFloatingInner, InputReguler, Pagination, Tabs, TabPanel, Table, TableVirtualization, ListVirtualization, SelectDropdownContainer, utilTable, Switch, ButtonIcon, Badges, Chips, RadioCheckbox, RadioCheckboxLabel, Breadcrumbs, Sidebar, Collapse, ModalDialog, SelectDropdownContainerComponents, Timeline, FilterContainer, NumberFormat, PatternFormat, DefaultCheckedChecboxIcon, DefaultRadioChecboxIcon, ConfigTable, PortalComponent, AlertContainer, UploadFile, TruncateComponent, UploadImage, Textarea, DoughnutChart, MonthYearPicker, CheckboxTable, InputNative, UploadMultipleFile, ErrorMessage, TextareaFloatingInner, Step, LineChart, Tooltip, ButtonPopover, GradientLineChart, GradientBarChart, PieChart, StepIndicator, TextEditor, CollapseV2, TableSubComponent, TimeRange, TextareaInnerLabel, InputInnerLabel, Text, };
|
|
89
|
+
export type { ITableColumnDef, IRefPopover, IRefTableVirtualization, IRefListVirtualization, IRefSelectDropdownContainer, IChildrenSelectDropdownContainer, ISidebarModule, SelectDropdownContainerType, FilterContainerType, IInputReguler, IInputFloatingInner, ITableConfig, TButtonVariants, TButtonSize, ITabsList, TTypeEventTabs, ITextarea, IListVirtualization, ITableVirtualization, IRefSidebar, IChildrenIconCompany, ICloneElementSidebar, IDataDoughnutChart, IDataInnerLabelDoughnutChart, ISelectDropdownContainer, IDatePicker, IPopover, IInputNative, IUploadMultipleFileValue, IDataStepList, IDataLineChart, IChips, IRefButtonPopover, TGradientLineChartCustomTooltip, IGradientLineChart, IGradientLineChartDataSet, IGradientLineChartData, TGradientBarChartCustomTooltip, IGradientBarChart, IGradientBarChartDataSet, IGradientBarChartData, IFilterDateButtonList, TKeyFilterDateButtonListType, IDataGradientBarChartCustomTooltip, IDataGradientLineChartCustomTooltip, IPieChart, IPieChartDataSet, IPieChartData, TPieChartCustomTooltip, IDataPieChartCustomTooltip, IPieChartThreshold, ITextEditorProps, ICollapse, ITableColumnBreakpoint, TTableRenderSubComponent, TTableHandlerRowClick, TKeyLocale, ITimeRangeListTime, ITimeRange, TTimeRangeValue, IButton, TButtonIconVariants, TButtonIconSize, IButtonIcon, ISidebar, };
|
|
@@ -206,7 +206,15 @@ export interface ILineChart {
|
|
|
206
206
|
*/
|
|
207
207
|
height?: number;
|
|
208
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* [ID] : Tipe skala untuk grafik garis gradien.
|
|
211
|
+
* [EN] : Scale type for gradient line chart.
|
|
212
|
+
*/
|
|
209
213
|
type TGradientLineChartScales = Record<string, Scale<CoreScaleOptions>>;
|
|
214
|
+
/**
|
|
215
|
+
* [ID] : Target gradien — latar belakang atau border.
|
|
216
|
+
* [EN] : Gradient target — background or border.
|
|
217
|
+
*/
|
|
210
218
|
type TGradientLineChartGradientFor = 'background' | 'border';
|
|
211
219
|
/**
|
|
212
220
|
* [ID] : Parameter untuk mengatur gradien grafik garis.
|
|
@@ -280,10 +288,15 @@ export interface TGetGradientLineParams {
|
|
|
280
288
|
* [EN] : Custom tooltip component type for gradient line chart.
|
|
281
289
|
*/
|
|
282
290
|
export type TGradientLineChartCustomTooltip = React.ComponentType<{
|
|
291
|
+
/** [ID] : Label tooltip. [EN] : Tooltip label. */
|
|
283
292
|
label: string;
|
|
293
|
+
/** [ID] : Nama dataset. [EN] : Dataset name. */
|
|
284
294
|
dataset: string;
|
|
295
|
+
/** [ID] : Nilai tooltip. [EN] : Tooltip value. */
|
|
285
296
|
value: number;
|
|
297
|
+
/** [ID] : Gaya CSS tooltip. [EN] : Tooltip CSS style. */
|
|
286
298
|
style: React.CSSProperties;
|
|
299
|
+
/** [ID] : Titik data tooltip. [EN] : Tooltip data points. */
|
|
287
300
|
dataPoints: TooltipItem<'line'>[];
|
|
288
301
|
}>;
|
|
289
302
|
/**
|
|
@@ -400,7 +413,15 @@ export interface IDataGradientLineChartCustomTooltip {
|
|
|
400
413
|
*/
|
|
401
414
|
dataPoints: TooltipItem<'line'>[];
|
|
402
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* [ID] : Tipe skala untuk grafik batang gradien.
|
|
418
|
+
* [EN] : Scale type for gradient bar chart.
|
|
419
|
+
*/
|
|
403
420
|
type TGradientBarChartScales = Record<string, Scale<CoreScaleOptions>>;
|
|
421
|
+
/**
|
|
422
|
+
* [ID] : Target gradien — latar belakang atau border.
|
|
423
|
+
* [EN] : Gradient target — background or border.
|
|
424
|
+
*/
|
|
404
425
|
type TGradientBarChartGradientFor = 'background' | 'border';
|
|
405
426
|
/**
|
|
406
427
|
* [ID] : Parameter untuk mengatur gradien grafik batang.
|
|
@@ -474,10 +495,15 @@ export interface TGetGradientBarParams {
|
|
|
474
495
|
* [EN] : Custom tooltip component type for gradient bar chart.
|
|
475
496
|
*/
|
|
476
497
|
export type TGradientBarChartCustomTooltip = React.ComponentType<{
|
|
498
|
+
/** [ID] : Label tooltip. [EN] : Tooltip label. */
|
|
477
499
|
label: string;
|
|
500
|
+
/** [ID] : Nama dataset. [EN] : Dataset name. */
|
|
478
501
|
dataset: string;
|
|
502
|
+
/** [ID] : Nilai tooltip. [EN] : Tooltip value. */
|
|
479
503
|
value: number;
|
|
504
|
+
/** [ID] : Gaya CSS tooltip. [EN] : Tooltip CSS style. */
|
|
480
505
|
style: React.CSSProperties;
|
|
506
|
+
/** [ID] : Titik data tooltip. [EN] : Tooltip data points. */
|
|
481
507
|
dataPoints: TooltipItem<'bar'>[];
|
|
482
508
|
}>;
|
|
483
509
|
/**
|
|
@@ -609,4 +635,198 @@ export interface IDataGradientBarChartCustomTooltip {
|
|
|
609
635
|
*/
|
|
610
636
|
dataPoints: TooltipItem<'bar'>[];
|
|
611
637
|
}
|
|
638
|
+
/**
|
|
639
|
+
* [ID] : Item data individual untuk grafik pie.
|
|
640
|
+
* [EN] : Individual data item for pie chart.
|
|
641
|
+
*/
|
|
642
|
+
export interface IPieChartDataItem {
|
|
643
|
+
/**
|
|
644
|
+
* [ID] : Label data.
|
|
645
|
+
* [EN] : Data label.
|
|
646
|
+
*/
|
|
647
|
+
label: string;
|
|
648
|
+
/**
|
|
649
|
+
* [ID] : Nilai data.
|
|
650
|
+
* [EN] : Data value.
|
|
651
|
+
*/
|
|
652
|
+
value: number;
|
|
653
|
+
/**
|
|
654
|
+
* [ID] : Warna latar belakang (opsional, jika tidak disediakan akan digenerate random).
|
|
655
|
+
* [EN] : Background color (optional, if not provided will be randomly generated).
|
|
656
|
+
*/
|
|
657
|
+
backgroundColor?: string;
|
|
658
|
+
/**
|
|
659
|
+
* [ID] : Properti dinamis lainnya.
|
|
660
|
+
* [EN] : Other dynamic properties.
|
|
661
|
+
*/
|
|
662
|
+
[key: string]: unknown;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* [ID] : Konfigurasi threshold untuk pengelompokan data kecil ke slice "Other".
|
|
666
|
+
* [EN] : Threshold configuration for grouping small data into "Other" slice.
|
|
667
|
+
*/
|
|
668
|
+
export interface IPieChartThreshold {
|
|
669
|
+
/**
|
|
670
|
+
* [ID] : Mode threshold — 'percentage' untuk persentase dari total, 'value' untuk nilai absolut.
|
|
671
|
+
* [EN] : Threshold mode — 'percentage' for percentage of total, 'value' for absolute value.
|
|
672
|
+
*/
|
|
673
|
+
mode: 'percentage' | 'value';
|
|
674
|
+
/**
|
|
675
|
+
* [ID] : Nilai threshold. Data di bawah nilai ini akan digabung ke "Other".
|
|
676
|
+
* [EN] : Threshold value. Data below this value will be grouped into "Other".
|
|
677
|
+
*/
|
|
678
|
+
value: number;
|
|
679
|
+
/**
|
|
680
|
+
* [ID] : Label untuk slice "Other" (default: "Other").
|
|
681
|
+
* [EN] : Label for "Other" slice (default: "Other").
|
|
682
|
+
*/
|
|
683
|
+
otherLabel?: string;
|
|
684
|
+
/**
|
|
685
|
+
* [ID] : Warna latar belakang untuk slice "Other" (opsional).
|
|
686
|
+
* [EN] : Background color for "Other" slice (optional).
|
|
687
|
+
*/
|
|
688
|
+
otherBackgroundColor?: string;
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* [ID] : Interface untuk dataset grafik pie, menextend ChartDataset<'pie'>.
|
|
692
|
+
* [EN] : Interface for pie chart dataset, extends ChartDataset<'pie'>.
|
|
693
|
+
*/
|
|
694
|
+
export interface IPieChartDataSet extends ChartDataset<'pie'> {
|
|
695
|
+
/**
|
|
696
|
+
* [ID] : background untuk slice pie chart
|
|
697
|
+
* [EN] : background for slice pie chart
|
|
698
|
+
*/
|
|
699
|
+
backgroundColor: string[];
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* [ID] : Interface untuk data grafik pie menggunakan format ChartData standar.
|
|
703
|
+
* [EN] : Interface for pie chart data using standard ChartData format.
|
|
704
|
+
*/
|
|
705
|
+
export interface IPieChartData extends Omit<ChartData<'pie'>, 'datasets'> {
|
|
706
|
+
/**
|
|
707
|
+
* [ID] : Kumpulan dataset.
|
|
708
|
+
* [EN] : Collection of datasets.
|
|
709
|
+
*/
|
|
710
|
+
datasets: IPieChartDataSet[];
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* [ID] : Tipe komponen tooltip kustom untuk grafik pie.
|
|
714
|
+
* [EN] : Custom tooltip component type for pie chart.
|
|
715
|
+
*/
|
|
716
|
+
export type TPieChartCustomTooltip = React.ComponentType<{
|
|
717
|
+
/** [ID] : Label tooltip. [EN] : Tooltip label. */
|
|
718
|
+
label: string;
|
|
719
|
+
/** [ID] : Nilai mentah tooltip. [EN] : Raw tooltip value. */
|
|
720
|
+
value: number;
|
|
721
|
+
/** [ID] : Persentase tooltip. [EN] : Tooltip percentage. */
|
|
722
|
+
percentage: number;
|
|
723
|
+
/** [ID] : Nilai yang sudah diformat. [EN] : Formatted value. */
|
|
724
|
+
formattedValue: string;
|
|
725
|
+
/** [ID] : Warna latar belakang slice. [EN] : Slice background color. */
|
|
726
|
+
backgroundColor: string;
|
|
727
|
+
/** [ID] : Item yang digabung ke slice ini (hanya pada "Other"). */
|
|
728
|
+
/** [EN] : Items merged into this slice (only on "Other"). */
|
|
729
|
+
mergedItems: IPieChartDataItem[];
|
|
730
|
+
/** [ID] : Gaya CSS tooltip. [EN] : Tooltip CSS style. */
|
|
731
|
+
style: React.CSSProperties;
|
|
732
|
+
/** [ID] : Titik data tooltip. [EN] : Tooltip data points. */
|
|
733
|
+
dataPoints: TooltipItem<'pie'>[];
|
|
734
|
+
}>;
|
|
735
|
+
/**
|
|
736
|
+
* [ID] : Interface untuk komponen grafik pie.
|
|
737
|
+
* [EN] : Interface for pie chart component.
|
|
738
|
+
*/
|
|
739
|
+
export interface IPieChart {
|
|
740
|
+
/**
|
|
741
|
+
* [ID] : Data grafik pie menggunakan format ChartData standar (labels + datasets).
|
|
742
|
+
* [EN] : Pie chart data using standard ChartData format (labels + datasets).
|
|
743
|
+
*/
|
|
744
|
+
data: IPieChartData;
|
|
745
|
+
/**
|
|
746
|
+
* [ID] : ID grafik.
|
|
747
|
+
* [EN] : Chart ID.
|
|
748
|
+
*/
|
|
749
|
+
id: string;
|
|
750
|
+
/**
|
|
751
|
+
* [ID] : Opsi grafik (opsional).
|
|
752
|
+
* [EN] : Chart options (optional).
|
|
753
|
+
*/
|
|
754
|
+
options?: ChartOptions<'pie'>;
|
|
755
|
+
/**
|
|
756
|
+
* [ID] : Nama kelas CSS kontainer (opsional).
|
|
757
|
+
* [EN] : Container CSS class name (optional).
|
|
758
|
+
*/
|
|
759
|
+
classNameContainer?: string;
|
|
760
|
+
/**
|
|
761
|
+
* [ID] : Tinggi grafik (opsional).
|
|
762
|
+
* [EN] : Chart height (optional).
|
|
763
|
+
*/
|
|
764
|
+
height?: number;
|
|
765
|
+
/**
|
|
766
|
+
* [ID] : Tooltip kustom (opsional).
|
|
767
|
+
* [EN] : Custom tooltip (optional).
|
|
768
|
+
*/
|
|
769
|
+
CustomTooltip?: TPieChartCustomTooltip;
|
|
770
|
+
/**
|
|
771
|
+
* [ID] : Konfigurasi threshold untuk pengelompokan data kecil (opsional).
|
|
772
|
+
* [EN] : Threshold configuration for grouping small data (optional).
|
|
773
|
+
*/
|
|
774
|
+
threshold?: IPieChartThreshold;
|
|
775
|
+
/**
|
|
776
|
+
* [ID] : Format tampilan nilai — 'percentage', 'decimal', atau 'currency' (default: 'percentage').
|
|
777
|
+
* [EN] : Value display format — 'percentage', 'decimal', or 'currency' (default: 'percentage').
|
|
778
|
+
*/
|
|
779
|
+
valueFormat?: 'percentage' | 'decimal' | 'currency';
|
|
780
|
+
/**
|
|
781
|
+
* [ID] : Persentase minimum untuk menampilkan label pada slice (default: 5). Slice di bawah nilai ini disembunyikan.
|
|
782
|
+
* [EN] : Minimum percentage to show label on slice (default: 5). Slices below this value are hidden.
|
|
783
|
+
*/
|
|
784
|
+
hideLabelBelowPercentage?: number;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* [ID] : Interface untuk data tooltip kustom grafik pie.
|
|
788
|
+
* [EN] : Interface for pie chart custom tooltip data.
|
|
789
|
+
*/
|
|
790
|
+
export interface IDataPieChartCustomTooltip {
|
|
791
|
+
/**
|
|
792
|
+
* [ID] : Gaya CSS.
|
|
793
|
+
* [EN] : CSS style.
|
|
794
|
+
*/
|
|
795
|
+
style: React.CSSProperties;
|
|
796
|
+
/**
|
|
797
|
+
* [ID] : Label tooltip.
|
|
798
|
+
* [EN] : Tooltip label.
|
|
799
|
+
*/
|
|
800
|
+
label: string;
|
|
801
|
+
/**
|
|
802
|
+
* [ID] : Nilai tooltip.
|
|
803
|
+
* [EN] : Tooltip value.
|
|
804
|
+
*/
|
|
805
|
+
value: number;
|
|
806
|
+
/**
|
|
807
|
+
* [ID] : Persentase tooltip.
|
|
808
|
+
* [EN] : Tooltip percentage.
|
|
809
|
+
*/
|
|
810
|
+
percentage: number;
|
|
811
|
+
/**
|
|
812
|
+
* [ID] : Nilai yang sudah diformat sesuai valueFormat.
|
|
813
|
+
* [EN] : Formatted value according to valueFormat.
|
|
814
|
+
*/
|
|
815
|
+
formattedValue: string;
|
|
816
|
+
/**
|
|
817
|
+
* [ID] : Warna latar belakang tooltip.
|
|
818
|
+
* [EN] : Tooltip background color.
|
|
819
|
+
*/
|
|
820
|
+
backgroundColor: string;
|
|
821
|
+
/**
|
|
822
|
+
* [ID] : Item-item yang digabung ke slice ini (hanya ada pada slice "Other" hasil threshold).
|
|
823
|
+
* [EN] : Items merged into this slice (only present on "Other" slice from threshold).
|
|
824
|
+
*/
|
|
825
|
+
mergedItems: IPieChartDataItem[];
|
|
826
|
+
/**
|
|
827
|
+
* [ID] : Titik data tooltip.
|
|
828
|
+
* [EN] : Tooltip data points.
|
|
829
|
+
*/
|
|
830
|
+
dataPoints: TooltipItem<'pie'>[];
|
|
831
|
+
}
|
|
612
832
|
export {};
|