1mpacto-react-ui 2.0.18 → 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 +1 -1
- package/dist/src/components/Chart/PieChart.stories.d.ts +2 -15
- package/dist/src/components/index.d.ts +4 -3
- package/dist/src/interfaces/components/Chart/index.d.ts +25 -8
- 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
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IPieChart } from '../../interfaces/components/Chart';
|
|
2
|
-
declare const PieChart: ({ data, height, classNameContainer, id, options, CustomTooltip, threshold,
|
|
2
|
+
declare const PieChart: ({ data, height, classNameContainer, id, options, CustomTooltip, threshold, valueFormat, hideLabelBelowPercentage, }: IPieChart) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default PieChart;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ data, height, classNameContainer, id, options, CustomTooltip, threshold,
|
|
4
|
+
component: ({ data, height, classNameContainer, id, options, CustomTooltip, threshold, valueFormat, hideLabelBelowPercentage, }: import('..').IPieChart) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
parameters: {};
|
|
6
6
|
tags: string[];
|
|
7
7
|
argTypes: {
|
|
@@ -55,19 +55,6 @@ declare const meta: {
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
colors: {
|
|
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
58
|
options: {
|
|
72
59
|
control: "object";
|
|
73
60
|
description: string;
|
|
@@ -140,7 +127,7 @@ declare const meta: {
|
|
|
140
127
|
};
|
|
141
128
|
};
|
|
142
129
|
args: {};
|
|
143
|
-
render: (args: import('
|
|
130
|
+
render: (args: import('..').IPieChart) => import("react/jsx-runtime").JSX.Element;
|
|
144
131
|
};
|
|
145
132
|
export default meta;
|
|
146
133
|
type Story = StoryObj<typeof meta>;
|
|
@@ -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, };
|
|
@@ -687,6 +687,28 @@ export interface IPieChartThreshold {
|
|
|
687
687
|
*/
|
|
688
688
|
otherBackgroundColor?: string;
|
|
689
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
|
+
}
|
|
690
712
|
/**
|
|
691
713
|
* [ID] : Tipe komponen tooltip kustom untuk grafik pie.
|
|
692
714
|
* [EN] : Custom tooltip component type for pie chart.
|
|
@@ -716,10 +738,10 @@ export type TPieChartCustomTooltip = React.ComponentType<{
|
|
|
716
738
|
*/
|
|
717
739
|
export interface IPieChart {
|
|
718
740
|
/**
|
|
719
|
-
* [ID] : Data grafik pie.
|
|
720
|
-
* [EN] : Pie chart data.
|
|
741
|
+
* [ID] : Data grafik pie menggunakan format ChartData standar (labels + datasets).
|
|
742
|
+
* [EN] : Pie chart data using standard ChartData format (labels + datasets).
|
|
721
743
|
*/
|
|
722
|
-
data:
|
|
744
|
+
data: IPieChartData;
|
|
723
745
|
/**
|
|
724
746
|
* [ID] : ID grafik.
|
|
725
747
|
* [EN] : Chart ID.
|
|
@@ -750,11 +772,6 @@ export interface IPieChart {
|
|
|
750
772
|
* [EN] : Threshold configuration for grouping small data (optional).
|
|
751
773
|
*/
|
|
752
774
|
threshold?: IPieChartThreshold;
|
|
753
|
-
/**
|
|
754
|
-
* [ID] : Array warna kustom untuk slice pie (opsional, jika tidak disediakan akan random).
|
|
755
|
-
* [EN] : Custom color array for pie slices (optional, if not provided will be random).
|
|
756
|
-
*/
|
|
757
|
-
colors?: string[];
|
|
758
775
|
/**
|
|
759
776
|
* [ID] : Format tampilan nilai — 'percentage', 'decimal', atau 'currency' (default: 'percentage').
|
|
760
777
|
* [EN] : Value display format — 'percentage', 'decimal', or 'currency' (default: 'percentage').
|