1mpacto-react-ui 2.0.23 → 2.0.24

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("react/jsx-runtime"),v=require("chart.js"),g=require("react"),S=require("react-chartjs-2"),x=require("../../utils/common.cjs"),k=require("../PortalComponent/PortalComponent.cjs");v.Chart.register(v.ArcElement,v.Tooltip);const M=(t,l,n)=>{const r=l>0?t/l*100:0;switch(n){case"decimal":return x.formatNumber(t,"decimal");case"currency":return x.formatNumber(t,"currency");default:return`${Math.round(r)}%`}},m=()=>{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)},I=(t,l)=>Array.isArray(t)?t[l]||m():typeof t=="string"?t:m(),q=t=>{const l=t.labels??[],n=t.datasets[0];return n?(n.data??[]).map((o,a)=>({label:l[a]??"",value:o,backgroundColor:I(n.backgroundColor,a)})):[]},E=(t,l)=>{if(!l)return{labels:t.map(e=>e.label),values:t.map(e=>e.value),colors:t.map(e=>e.backgroundColor||m()),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||m()})});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}},T=(t,l,n)=>({chart:r,tooltip:o})=>{const a={};if(o.opacity===0){t(f=>({...f,style:{...f.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=o.dataPoints?.[0]?.label??"",u=o.dataPoints?.[0]?.raw??0,i=o.dataPoints?.[0]?.dataset.backgroundColor?.[s]??"",e=o.dataPoints?.[0]?.dataset.data?.reduce((f,b)=>f+b,0)||1,p=e>0?u/e*100:0;t({label:d,value:u,percentage:p,formattedValue:M(u,e,l),backgroundColor:typeof i=="string"?i:"#000",mergedItems:n[s]??[],style:a,dataPoints:o.dataPoints})},A=(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)=>{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),f=n.data.labels?.[s];r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle="#FFFFFF",r.font="bold 10px Inter, sans-serif",r.fillText(f,e||0,(p||0)-6),r.fillText(M(u,a,t),e||0,(p||0)+8),r.restore()})}}),B={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0}},elements:{arc:{hoverOffset:8,borderWidth:0}}},R=({data:t,height:l,classNameContainer:n,id:r,options:o,CustomTooltip:a,threshold:c,valueFormat:s,hideLabelBelowPercentage:d=5})=>{const[u,i]=g.useState({style:{opacity:0,position:"absolute",left:0,top:0},label:"",value:0,percentage:0,formattedValue:"",backgroundColor:"",mergedItems:[],dataPoints:[]}),e=g.useMemo(()=>q(t),[t]),{labels:p,values:f,colors:b,mergedMap:y}=g.useMemo(()=>E(e,c),[e,c]),P=g.useMemo(()=>({labels:p,datasets:[{...t.datasets[0],data:f,backgroundColor:b,hoverOffset:8,borderWidth:0}]}),[p,f,b,t.datasets]),C=g.useMemo(()=>{const O={plugins:{tooltip:{enabled:!a,external:a?({chart:j,tooltip:w})=>T(i,s,y)({chart:j,tooltip:w}):void 0}}};return x.mergeObjects(B,O,o??{})},[o,a,s,y]);return h.jsxs("div",{id:r,className:n,style:{height:l||"300px"},children:[a&&h.jsx(k.default,{selector:"body",children:h.jsx(a,{...u})}),h.jsx(S.Pie,{data:P,options:C,plugins:[A(s,d)]})]})};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("react/jsx-runtime"),v=require("chart.js"),h=require("react"),T=require("react-chartjs-2"),M=require("../../utils/common.cjs"),k=require("../PortalComponent/PortalComponent.cjs");v.Chart.register(v.ArcElement,v.Tooltip);const O=(t,n,e)=>{const a=n>0?t/n*100:0;switch(e){case"decimal":return M.formatNumber(t,"decimal");case"currency":return M.formatNumber(t,"currency");default:return`${Math.round(a)}%`}},D=()=>{const t=Math.floor(Math.random()*360),n=60+Math.floor(Math.random()*30),e=45+Math.floor(Math.random()*20);return((s,r,o)=>{r/=100,o/=100;const l=r*Math.min(o,1-o),u=d=>{const i=(d+s/30)%12,c=o-l*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*c).toString(16).padStart(2,"0")};return`#${u(0)}${u(8)}${u(4)}`})(t,n,e)},q=(t,n)=>Array.isArray(t)?t[n]||D():typeof t=="string"?t:D(),P=t=>t!=="data"&&t.startsWith("data"),B=t=>{const n=t.data?.length??0;return Object.keys(t).filter(e=>{const a=t[e];return P(e)&&Array.isArray(a)&&a.length===n})},j=(t,n,e)=>n.reduce((a,s)=>{const r=t[s];return Array.isArray(r)&&(a[s]=r[e]),a},{}),E=t=>Object.keys(t[0]??{}).filter(P).reduce((e,a)=>(e[a]=t.map(s=>s[a]),e),{}),C=(t,n={})=>({labels:t.map(e=>e.label),values:t.map(e=>e.value),colors:t.map(e=>e.backgroundColor||D()),extraDatasetData:E(t),mergedMap:n}),K=t=>{const n=t.labels??[],e=t.datasets[0];if(!e)return[];const a=e.data??[],s=B(e);return a.map((r,o)=>({label:n[o]??"",value:r,backgroundColor:q(e.backgroundColor,o),...j(e,s,o)}))},R=(t,n)=>{if(!n)return C(t);const{mode:e,value:a,otherLabel:s="Other",otherBackgroundColor:r="#B0BEC5"}=n,o=t.reduce((c,f)=>c+f.value,0),l=[],u=[];let d=0;t.forEach(c=>{(e==="percentage"?c.value/o*100<a:c.value<a)?(d+=c.value,u.push(c)):l.push(c)});const i={};if(d>0){const c=E(u);l.push({...c,label:s,value:d,backgroundColor:r}),i[l.length-1]=u}return C(l,i)},F=(t,n,e)=>({chart:a,tooltip:s})=>{const r={};if(s.opacity===0){t(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!s.dataPoints||s.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const o=a.canvas.getBoundingClientRect();r.left=o.left+window.pageXOffset+s.caretX+"px",r.top=o.top+window.pageYOffset+s.caretY+"px";const l=s.dataPoints[0].dataIndex,u=s.dataPoints[0].dataset,d=s.dataPoints?.[0]?.label??"",i=s.dataPoints?.[0]?.raw??0,c=u.backgroundColor?.[l]??"",f=u.data?.reduce((g,y)=>g+y,0)||1,p=f>0?i/f*100:0,b=Object.keys(u).filter(P),m=j(u,b,l);t({label:d,value:i,percentage:p,formattedValue:O(i,f,n),backgroundColor:typeof c=="string"?c:"#000",mergedItems:e[l]??[],style:r,dataPoints:s.dataPoints,...m})},L=(t,n)=>({id:"pieLabelPlugin",afterDraw(e){const{ctx:a}=e,s=e.getDatasetMeta(0),r=e.data.datasets[0].data.reduce((o,l)=>o+l,0);s.data.forEach((o,l)=>{const d=e.data.datasets[0].data[l]??0;if((r>0?d/r*100:0)<n)return;const{x:c,y:f}=o.tooltipPosition(!1),p=e.data.labels?.[l];a.save(),a.textAlign="center",a.textBaseline="middle",a.fillStyle="#FFFFFF",a.font="bold 10px Inter, sans-serif",a.fillText(p,c||0,(f||0)-6),a.fillText(O(d,r,t),c||0,(f||0)+8),a.restore()})}}),V={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0}},elements:{arc:{hoverOffset:8,borderWidth:0}}},$=({data:t,height:n,classNameContainer:e,id:a,options:s,CustomTooltip:r,threshold:o,valueFormat:l,hideLabelBelowPercentage:u=5})=>{const[d,i]=h.useState({style:{opacity:0,position:"absolute",left:0,top:0},label:"",value:0,percentage:0,formattedValue:"",backgroundColor:"",mergedItems:[],dataPoints:[]}),c=h.useMemo(()=>K(t),[t]),{labels:f,values:p,colors:b,extraDatasetData:m,mergedMap:g}=h.useMemo(()=>R(c,o),[c,o]),y=h.useMemo(()=>({labels:f,datasets:[{...t.datasets[0],...m,data:p,backgroundColor:b,hoverOffset:8,borderWidth:0}]}),[f,p,b,m,t.datasets]),w=h.useMemo(()=>{const A={plugins:{tooltip:{enabled:!r,external:r?({chart:I,tooltip:S})=>F(i,l,g)({chart:I,tooltip:S}):void 0}}};return M.mergeObjects(V,A,s??{})},[s,r,l,g]);return x.jsxs("div",{id:a,className:e,style:{height:n||"300px"},children:[r&&x.jsx(k.default,{selector:"body",children:x.jsx(r,{...d})}),x.jsx(T.Pie,{data:y,options:w,plugins:[L(l,u)]})]})};exports.default=$;
@@ -1,94 +1,111 @@
1
- import { jsxs as w, jsx as b } from "react/jsx-runtime";
2
- import { Chart as k, ArcElement as I, Tooltip as E } from "chart.js";
3
- import m from "react";
4
- import { Pie as S } from "react-chartjs-2";
5
- import { mergeObjects as A, formatNumber as y } from "../../utils/common.mjs";
6
- import B from "../PortalComponent/PortalComponent.mjs";
7
- k.register(I, E);
8
- const x = (t, l, n) => {
9
- const r = l > 0 ? t / l * 100 : 0;
10
- switch (n) {
1
+ import { jsxs as T, jsx as y } from "react/jsx-runtime";
2
+ import { Chart as j, ArcElement as k, Tooltip as B } from "chart.js";
3
+ import h from "react";
4
+ import { Pie as K } from "react-chartjs-2";
5
+ import { mergeObjects as S, formatNumber as D } from "../../utils/common.mjs";
6
+ import R from "../PortalComponent/PortalComponent.mjs";
7
+ j.register(k, B);
8
+ const C = (t, s, e) => {
9
+ const a = s > 0 ? t / s * 100 : 0;
10
+ switch (e) {
11
11
  case "decimal":
12
- return y(t, "decimal");
12
+ return D(t, "decimal");
13
13
  case "currency":
14
- return y(t, "currency");
14
+ return D(t, "currency");
15
15
  default:
16
- return `${Math.round(r)}%`;
16
+ return `${Math.round(a)}%`;
17
17
  }
18
- }, h = () => {
19
- const t = Math.floor(Math.random() * 360), l = 60 + Math.floor(Math.random() * 30), n = 45 + Math.floor(Math.random() * 20);
20
- return ((o, a, c) => {
21
- a /= 100, c /= 100;
22
- const s = a * Math.min(c, 1 - c), u = (d) => {
23
- const i = (d + o / 30) % 12, e = c - s * Math.max(Math.min(i - 3, 9 - i, 1), -1);
24
- return Math.round(255 * e).toString(16).padStart(2, "0");
18
+ }, v = () => {
19
+ const t = Math.floor(Math.random() * 360), s = 60 + Math.floor(Math.random() * 30), e = 45 + Math.floor(Math.random() * 20);
20
+ return ((r, o, n) => {
21
+ o /= 100, n /= 100;
22
+ const c = o * Math.min(n, 1 - n), d = (u) => {
23
+ const i = (u + r / 30) % 12, l = n - c * Math.max(Math.min(i - 3, 9 - i, 1), -1);
24
+ return Math.round(255 * l).toString(16).padStart(2, "0");
25
25
  };
26
- return `#${u(0)}${u(8)}${u(4)}`;
27
- })(t, l, n);
28
- }, T = (t, l) => Array.isArray(t) ? t[l] || h() : typeof t == "string" ? t : h(), F = (t) => {
29
- const l = t.labels ?? [], n = t.datasets[0];
30
- return n ? (n.data ?? []).map((o, a) => ({
31
- label: l[a] ?? "",
26
+ return `#${d(0)}${d(8)}${d(4)}`;
27
+ })(t, s, e);
28
+ }, F = (t, s) => Array.isArray(t) ? t[s] || v() : typeof t == "string" ? t : v(), M = (t) => t !== "data" && t.startsWith("data"), L = (t) => {
29
+ const s = t.data?.length ?? 0;
30
+ return Object.keys(t).filter((e) => {
31
+ const a = t[e];
32
+ return M(e) && Array.isArray(a) && a.length === s;
33
+ });
34
+ }, O = (t, s, e) => s.reduce((a, r) => {
35
+ const o = t[r];
36
+ return Array.isArray(o) && (a[r] = o[e]), a;
37
+ }, {}), E = (t) => Object.keys(t[0] ?? {}).filter(M).reduce((e, a) => (e[a] = t.map((r) => r[a]), e), {}), P = (t, s = {}) => ({
38
+ labels: t.map((e) => e.label),
39
+ values: t.map((e) => e.value),
40
+ colors: t.map((e) => e.backgroundColor || v()),
41
+ extraDatasetData: E(t),
42
+ mergedMap: s
43
+ }), V = (t) => {
44
+ const s = t.labels ?? [], e = t.datasets[0];
45
+ if (!e) return [];
46
+ const a = e.data ?? [], r = L(e);
47
+ return a.map((o, n) => ({
48
+ label: s[n] ?? "",
32
49
  value: o,
33
- backgroundColor: T(n.backgroundColor, a)
34
- })) : [];
35
- }, R = (t, l) => {
36
- if (!l)
37
- return {
38
- labels: t.map((e) => e.label),
39
- values: t.map((e) => e.value),
40
- colors: t.map((e) => e.backgroundColor || h()),
41
- mergedMap: {}
42
- };
43
- const { mode: n, value: r, otherLabel: o = "Other", otherBackgroundColor: a = "#B0BEC5" } = l, c = t.reduce((e, p) => e + p.value, 0), s = [], u = [];
44
- let d = 0;
45
- t.forEach((e) => {
46
- (n === "percentage" ? e.value / c * 100 < r : e.value < r) ? (d += e.value, u.push(e)) : s.push({
47
- label: e.label,
48
- value: e.value,
49
- color: e.backgroundColor || h()
50
- });
50
+ backgroundColor: F(e.backgroundColor, n),
51
+ ...O(e, r, n)
52
+ }));
53
+ }, $ = (t, s) => {
54
+ if (!s) return P(t);
55
+ const { mode: e, value: a, otherLabel: r = "Other", otherBackgroundColor: o = "#B0BEC5" } = s, n = t.reduce((l, f) => l + f.value, 0), c = [], d = [];
56
+ let u = 0;
57
+ t.forEach((l) => {
58
+ (e === "percentage" ? l.value / n * 100 < a : l.value < a) ? (u += l.value, d.push(l)) : c.push(l);
51
59
  });
52
60
  const i = {};
53
- return d > 0 && (s.push({ label: o, value: d, color: a }), i[s.length - 1] = u), {
54
- labels: s.map((e) => e.label),
55
- values: s.map((e) => e.value),
56
- colors: s.map((e) => e.color),
57
- mergedMap: i
58
- };
59
- }, V = (t, l, n) => ({ chart: r, tooltip: o }) => {
60
- const a = {};
61
- if (o.opacity === 0) {
62
- t((f) => ({ ...f, style: { ...f.style, opacity: 0, pointerEvents: "none" } }));
61
+ if (u > 0) {
62
+ const l = E(d);
63
+ c.push({
64
+ ...l,
65
+ label: r,
66
+ value: u,
67
+ backgroundColor: o
68
+ }), i[c.length - 1] = d;
69
+ }
70
+ return P(c, i);
71
+ }, W = (t, s, e) => ({ chart: a, tooltip: r }) => {
72
+ const o = {};
73
+ if (r.opacity === 0) {
74
+ t((p) => ({ ...p, style: { ...p.style, opacity: 0, pointerEvents: "none" } }));
63
75
  return;
64
76
  }
65
- if (!o.dataPoints || o.dataPoints.length === 0) return;
66
- a.opacity = "1", a.position = "absolute", a.pointerEvents = "none";
67
- const c = r.canvas.getBoundingClientRect();
68
- a.left = c.left + window.pageXOffset + o.caretX + "px", a.top = c.top + window.pageYOffset + o.caretY + "px";
69
- const s = o.dataPoints[0].dataIndex, u = o.dataPoints?.[0]?.label ?? "", d = o.dataPoints?.[0]?.raw ?? 0, i = o.dataPoints?.[0]?.dataset.backgroundColor?.[s] ?? "", e = o.dataPoints?.[0]?.dataset.data?.reduce((f, g) => f + g, 0) || 1, p = e > 0 ? d / e * 100 : 0;
77
+ if (!r.dataPoints || r.dataPoints.length === 0) return;
78
+ o.opacity = "1", o.position = "absolute", o.pointerEvents = "none";
79
+ const n = a.canvas.getBoundingClientRect();
80
+ o.left = n.left + window.pageXOffset + r.caretX + "px", o.top = n.top + window.pageYOffset + r.caretY + "px";
81
+ const c = r.dataPoints[0].dataIndex, d = r.dataPoints[0].dataset, u = r.dataPoints?.[0]?.label ?? "", i = r.dataPoints?.[0]?.raw ?? 0, l = d.backgroundColor?.[c] ?? "", f = d.data?.reduce((p, x) => p + x, 0) || 1, g = f > 0 ? i / f * 100 : 0, m = Object.keys(d).filter(M), b = O(
82
+ d,
83
+ m,
84
+ c
85
+ );
70
86
  t({
71
87
  label: u,
72
- value: d,
73
- percentage: p,
74
- formattedValue: x(d, e, l),
75
- backgroundColor: typeof i == "string" ? i : "#000",
76
- mergedItems: n[s] ?? [],
77
- style: a,
78
- dataPoints: o.dataPoints
88
+ value: i,
89
+ percentage: g,
90
+ formattedValue: C(i, f, s),
91
+ backgroundColor: typeof l == "string" ? l : "#000",
92
+ mergedItems: e[c] ?? [],
93
+ style: o,
94
+ dataPoints: r.dataPoints,
95
+ ...b
79
96
  });
80
- }, $ = (t, l) => ({
97
+ }, G = (t, s) => ({
81
98
  id: "pieLabelPlugin",
82
- afterDraw(n) {
83
- const { ctx: r } = n, o = n.getDatasetMeta(0), a = n.data.datasets[0].data.reduce((c, s) => c + s, 0);
84
- o.data.forEach((c, s) => {
85
- const d = n.data.datasets[0].data[s] ?? 0;
86
- if ((a > 0 ? d / a * 100 : 0) < l) return;
87
- const { x: e, y: p } = c.tooltipPosition(!1), f = n.data.labels?.[s];
88
- r.save(), r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = "#FFFFFF", r.font = "bold 10px Inter, sans-serif", r.fillText(f, e || 0, (p || 0) - 6), r.fillText(x(d, a, t), e || 0, (p || 0) + 8), r.restore();
99
+ afterDraw(e) {
100
+ const { ctx: a } = e, r = e.getDatasetMeta(0), o = e.data.datasets[0].data.reduce((n, c) => n + c, 0);
101
+ r.data.forEach((n, c) => {
102
+ const u = e.data.datasets[0].data[c] ?? 0;
103
+ if ((o > 0 ? u / o * 100 : 0) < s) return;
104
+ const { x: l, y: f } = n.tooltipPosition(!1), g = e.data.labels?.[c];
105
+ a.save(), a.textAlign = "center", a.textBaseline = "middle", a.fillStyle = "#FFFFFF", a.font = "bold 10px Inter, sans-serif", a.fillText(g, l || 0, (f || 0) - 6), a.fillText(C(u, o, t), l || 0, (f || 0) + 8), a.restore();
89
106
  });
90
107
  }
91
- }), j = {
108
+ }), H = {
92
109
  responsive: !0,
93
110
  maintainAspectRatio: !1,
94
111
  plugins: {
@@ -105,18 +122,18 @@ const x = (t, l, n) => {
105
122
  borderWidth: 0
106
123
  }
107
124
  }
108
- }, Y = ({
125
+ }, U = ({
109
126
  data: t,
110
- height: l,
111
- classNameContainer: n,
112
- id: r,
113
- options: o,
114
- CustomTooltip: a,
115
- threshold: c,
116
- valueFormat: s,
117
- hideLabelBelowPercentage: u = 5
127
+ height: s,
128
+ classNameContainer: e,
129
+ id: a,
130
+ options: r,
131
+ CustomTooltip: o,
132
+ threshold: n,
133
+ valueFormat: c,
134
+ hideLabelBelowPercentage: d = 5
118
135
  }) => {
119
- const [d, i] = m.useState({
136
+ const [u, i] = h.useState({
120
137
  style: { opacity: 0, position: "absolute", left: 0, top: 0 },
121
138
  label: "",
122
139
  value: 0,
@@ -125,45 +142,47 @@ const x = (t, l, n) => {
125
142
  backgroundColor: "",
126
143
  mergedItems: [],
127
144
  dataPoints: []
128
- }), e = m.useMemo(() => F(t), [t]), {
129
- labels: p,
130
- values: f,
131
- colors: g,
132
- mergedMap: v
133
- } = m.useMemo(() => R(e, c), [e, c]), M = m.useMemo(
145
+ }), l = h.useMemo(() => V(t), [t]), {
146
+ labels: f,
147
+ values: g,
148
+ colors: m,
149
+ extraDatasetData: b,
150
+ mergedMap: p
151
+ } = h.useMemo(() => $(l, n), [l, n]), x = h.useMemo(
134
152
  () => ({
135
- labels: p,
153
+ labels: f,
136
154
  datasets: [
137
155
  {
138
156
  ...t.datasets[0],
139
- data: f,
140
- backgroundColor: g,
157
+ ...b,
158
+ data: g,
159
+ backgroundColor: m,
141
160
  hoverOffset: 8,
142
161
  borderWidth: 0
143
162
  }
144
163
  ]
145
164
  }),
146
- [p, f, g, t.datasets]
147
- ), P = m.useMemo(() => A(j, {
165
+ [f, g, m, b, t.datasets]
166
+ ), w = h.useMemo(() => S(H, {
148
167
  plugins: {
149
168
  tooltip: {
150
- enabled: !a,
151
- external: a ? ({ chart: C, tooltip: O }) => V(i, s, v)({ chart: C, tooltip: O }) : void 0
169
+ enabled: !o,
170
+ external: o ? ({ chart: A, tooltip: I }) => W(i, c, p)({ chart: A, tooltip: I }) : void 0
152
171
  }
153
172
  }
154
- }, o ?? {}), [o, a, s, v]);
155
- return /* @__PURE__ */ w("div", { id: r, className: n, style: { height: l || "300px" }, children: [
156
- a && /* @__PURE__ */ b(B, { selector: "body", children: /* @__PURE__ */ b(a, { ...d }) }),
157
- /* @__PURE__ */ b(
158
- S,
173
+ }, r ?? {}), [r, o, c, p]);
174
+ return /* @__PURE__ */ T("div", { id: a, className: e, style: { height: s || "300px" }, children: [
175
+ o && /* @__PURE__ */ y(R, { selector: "body", children: /* @__PURE__ */ y(o, { ...u }) }),
176
+ /* @__PURE__ */ y(
177
+ K,
159
178
  {
160
- data: M,
161
- options: P,
162
- plugins: [$(s, u)]
179
+ data: x,
180
+ options: w,
181
+ plugins: [G(c, d)]
163
182
  }
164
183
  )
165
184
  ] });
166
185
  };
167
186
  export {
168
- Y as default
187
+ U as default
169
188
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="2.0.23",o={version:e};exports.default=o;exports.version=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="2.0.24",o={version:e};exports.default=o;exports.version=e;
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "2.0.23",
4
+ "version": "2.0.24",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=20.19.4",
@@ -1,4 +1,4 @@
1
- const o = "2.0.23", s = {
1
+ const o = "2.0.24", s = {
2
2
  version: o
3
3
  };
4
4
  export {
@@ -692,6 +692,11 @@ export interface IPieChartThreshold {
692
692
  * [EN] : Interface for pie chart dataset, extends ChartDataset<'pie'>.
693
693
  */
694
694
  export interface IPieChartDataSet extends ChartDataset<'pie'> {
695
+ /**
696
+ * [ID] : Properti dinamis lainnya.
697
+ * [EN] : Other dynamic properties.
698
+ */
699
+ [key: string]: unknown;
695
700
  /**
696
701
  * [ID] : background untuk slice pie chart
697
702
  * [EN] : background for slice pie chart
@@ -828,5 +833,10 @@ export interface IDataPieChartCustomTooltip {
828
833
  * [EN] : Tooltip data points.
829
834
  */
830
835
  dataPoints: TooltipItem<'pie'>[];
836
+ /**
837
+ * [ID] : Properti dinamis lainnya.
838
+ * [EN] : Other dynamic properties.
839
+ */
840
+ [key: string]: unknown;
831
841
  }
832
842
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "2.0.23",
4
+ "version": "2.0.24",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=20.19.4",