@ck-ui/component-library 2.0.4 → 2.0.5
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/{DropdownFooter-W4D9bbd6.js → DropdownFooter-DYusPa5E.js} +4 -3
- package/dist/assets/TableChipCell-B2fEKEbC.css +1 -0
- package/dist/assets/index-BB_JksPb.css +1 -0
- package/dist/assets/{index-BJ3ki-dZ.css → index-C8_uOajQ.css} +1 -1
- package/dist/assets/index-Ceh4ivv5.css +1 -0
- package/dist/assets/styles-BYpypz4h.css +1 -0
- package/dist/assets/{styles-CnUruVcX.css → styles-DU_mFQrB.css} +1 -1
- package/dist/assets/styles-Dikgm2G4.css +1 -0
- package/dist/components/Breadcrumb/index.js +51 -51
- package/dist/components/CKBadge/_types/ckBadge.types.d.ts +3 -1
- package/dist/components/CKBadge/_types/ckBadge.types.d.ts.map +1 -1
- package/dist/components/CKBadge/index.d.ts +1 -1
- package/dist/components/CKBadge/index.d.ts.map +1 -1
- package/dist/components/CKBadge/index.js +35 -32
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +74 -42
- package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/helpers.js +5 -5
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +418 -389
- package/dist/components/GroupedMultiSelect/_constant/constants.d.ts +2 -0
- package/dist/components/GroupedMultiSelect/_constant/constants.d.ts.map +1 -0
- package/dist/components/GroupedMultiSelect/_constant/constants.js +4 -0
- package/dist/components/GroupedMultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/MenuItem.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/MenuList.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/OptionsList.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/SearchResult.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/GroupedMultiSelect/_helpers/TriggerButton.js +113 -67
- package/dist/components/GroupedMultiSelect/index.d.ts.map +1 -1
- package/dist/components/GroupedMultiSelect/index.js +187 -164
- package/dist/components/GroupedSingleSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/GroupedSingleSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/GroupedSingleSelect/_helpers/OptionsList.js +1 -1
- package/dist/components/GroupedSingleSelect/_helpers/TriggerButton.js +1 -1
- package/dist/components/GroupedSingleSelect/index.d.ts.map +1 -1
- package/dist/components/GroupedSingleSelect/index.js +113 -97
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +4 -3
- package/dist/components/SingleSelectDropdown/index.js +6 -5
- package/dist/components/Table/_helpers/ColumnManager/index.js +1 -1
- package/dist/components/Table/_helpers/FilterColumnToolbar.js +1 -1
- package/dist/components/Table/_helpers/TableChipCell.d.ts +21 -0
- package/dist/components/Table/_helpers/TableChipCell.d.ts.map +1 -0
- package/dist/components/Table/_helpers/TableChipCell.js +158 -0
- package/dist/components/Table/_types/table.types.d.ts +12 -1
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +673 -402
- package/dist/main.d.ts +4 -3
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +116 -114
- package/dist/styles.module-D5ab7LbM.js +40 -0
- package/dist/styles.module-Y7TzrS2V.js +51 -0
- package/dist/table-filter-BwC2jvAO.js +8 -0
- package/package.json +1 -1
- package/dist/assets/index-DZaWJ3P3.css +0 -1
- package/dist/assets/index-DlcdXqx_.css +0 -1
- package/dist/assets/styles-B4HnRCM5.css +0 -1
- package/dist/assets/styles-DVAtoUQM.css +0 -1
- package/dist/styles.module-DBuEcddZ.js +0 -29
- package/dist/styles.module-DKDRix10.js +0 -39
- package/dist/table-filter-C0zetUfo.js +0 -6
|
@@ -2,16 +2,18 @@ import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as m, STACKED_AREA_PALETTE as I }
|
|
|
2
2
|
import { getBaseConfig as b, getStackedColumnChartShell as F, getStackedAreaChartShell as H, getStackedBarChartShell as O, getLineChartShell as j, getCommonChartShell as N, getScrollAreaChartShell as V, getMultipleLineChartShell as R, getMsCombiDy2dChartShell as W, getGroupChartShell as Y, getDoughnutChartShell as _ } from "./helpers.js";
|
|
3
3
|
import { getCurrencyPrefix as y, getLabelStep as p, getCartesianPalette as L, getCurrencySymbol as E, formatLargeNumber as A, getBarType as M, getGraphDataLength as G } from "../_utils/chartHelpers.js";
|
|
4
4
|
const z = (e = {}) => {
|
|
5
|
-
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), l = Array.isArray(e.graphData) ? e.graphData : [], d = l.some(
|
|
5
|
+
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), l = Array.isArray(e.graphData) ? e.graphData : [], d = l.some(
|
|
6
|
+
(r) => !!r.color
|
|
7
|
+
), a = L(e?.palettecolors)?.split(",")?.map((r) => r?.trim());
|
|
6
8
|
if (e.usePerBarColors && !Array.isArray(e.graphData)) {
|
|
7
9
|
const r = e.graphData, o = r?.category || [], g = r?.dataset || [];
|
|
8
10
|
if (g.length === 1) {
|
|
9
11
|
const f = (g[0].data || []).map((u, v) => {
|
|
10
|
-
const
|
|
12
|
+
const T = u.color || a[v % a.length], C = o[v]?.label || "";
|
|
11
13
|
return {
|
|
12
14
|
...u,
|
|
13
|
-
color:
|
|
14
|
-
toolText: e.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${
|
|
15
|
+
color: T,
|
|
16
|
+
toolText: e.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${C}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${T};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${C}</label></span><b style='text-align:right;color:#2B2B2B;font-weight:500;font-size:10px;'>${y(e.numberPrefix)}${u.value || ""}</b></div>`
|
|
15
17
|
};
|
|
16
18
|
}), x = {
|
|
17
19
|
...N(e),
|
|
@@ -39,16 +41,18 @@ const z = (e = {}) => {
|
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
const i = l?.map(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
const i = l?.map(
|
|
45
|
+
(r, o) => {
|
|
46
|
+
const g = r?.color || a[o % a.length];
|
|
47
|
+
let h;
|
|
48
|
+
return r.toolText ? h = r.toolText : e.plotToolText ? h = e.plotToolText : h = `<div style='font-size: 10px;font-weight:500;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${r.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${g};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${r.label || ""}</label></span><b style='text-align:right;color:#2B2B2B;font-weight:500;font-size:10px;'>${y(e.numberPrefix)}${r.value || ""}</b></div>`, {
|
|
49
|
+
...r,
|
|
50
|
+
color: g,
|
|
51
|
+
toolText: h
|
|
52
|
+
// toolText: props.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${item.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${itemColor};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${item.label || ""}</label></span><b style='text-align:right;'>${getCurrencyPrefix(props.numberPrefix)}${item.value || ""}</b></div>`
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
), n = {
|
|
52
56
|
...N(e),
|
|
53
57
|
bgColor: e.bgColor || "#ffffff",
|
|
54
58
|
labelStep: p(G(e), e.labelStep),
|
|
@@ -67,7 +71,10 @@ const z = (e = {}) => {
|
|
|
67
71
|
palettecolors: d ? void 0 : L(e.palettecolors),
|
|
68
72
|
maxLabelHeight: e.maxLabelHeight,
|
|
69
73
|
numbersuffix: e.numbersuffix || ""
|
|
70
|
-
}, s = e.graphData, c = e?.hideScroll ? {
|
|
74
|
+
}, s = e.graphData, c = e?.hideScroll ? {
|
|
75
|
+
chart: n,
|
|
76
|
+
data: i?.length > 0 ? i : e?.graphData || []
|
|
77
|
+
} : {
|
|
71
78
|
chart: n,
|
|
72
79
|
categories: s?.categories,
|
|
73
80
|
dataset: s?.dataset
|
|
@@ -117,7 +124,9 @@ const z = (e = {}) => {
|
|
|
117
124
|
}, X = (e = {}) => {
|
|
118
125
|
let t = E();
|
|
119
126
|
e.numberPrefix === "" ? t = "" : e.numberPrefix !== null && e.numberPrefix !== void 0 && (t = e.numberPrefix);
|
|
120
|
-
const l = e.graphData, d = (l?.dataset || []).some(
|
|
127
|
+
const l = e.graphData, d = (l?.dataset || []).some(
|
|
128
|
+
(i) => !!i.color
|
|
129
|
+
), a = (l?.dataset || []).map((i, n) => {
|
|
121
130
|
const c = i.data?.map((r) => {
|
|
122
131
|
const o = r.value;
|
|
123
132
|
return o == null || Number(o) === 0 || typeof o == "string" && o.trim() === "" ? { ...r, value: 0 } : r;
|
|
@@ -155,7 +164,9 @@ const z = (e = {}) => {
|
|
|
155
164
|
}
|
|
156
165
|
});
|
|
157
166
|
}, q = (e = {}) => {
|
|
158
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), l = e.graphData, d = (l?.dataset || []).some(
|
|
167
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), l = e.graphData, d = (l?.dataset || []).some(
|
|
168
|
+
(n) => !!n.color
|
|
169
|
+
), a = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:500'>Total</span><b style='color:#2B2B2B;font-weight:500;font-size:10px;'>$sum</b></div>", i = (l?.dataset || []).map((n, s) => ({
|
|
159
170
|
...n,
|
|
160
171
|
// plotToolText: props.plotToolText || (plotToolText: props.plotToolText || (
|
|
161
172
|
// index === 0
|
|
@@ -187,9 +198,7 @@ const z = (e = {}) => {
|
|
|
187
198
|
labelStep: p(l?.category?.length, e.labelStep),
|
|
188
199
|
showSum: e.showSum ? "1" : void 0
|
|
189
200
|
},
|
|
190
|
-
categories: [
|
|
191
|
-
{ category: l?.category || [] }
|
|
192
|
-
],
|
|
201
|
+
categories: [{ category: l?.category || [] }],
|
|
193
202
|
dataset: i
|
|
194
203
|
}
|
|
195
204
|
});
|
|
@@ -251,9 +260,9 @@ const z = (e = {}) => {
|
|
|
251
260
|
alpha: "60",
|
|
252
261
|
toolText: " "
|
|
253
262
|
};
|
|
254
|
-
const u = n.map((v,
|
|
255
|
-
const
|
|
256
|
-
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#737373;'><span style='width:10px;height:10px;border-radius:2px;background-color:${
|
|
263
|
+
const u = n.map((v, T) => {
|
|
264
|
+
const C = v.color || a[T % a.length], B = (v.data || [])[f]?.value ?? "", S = v.seriesname || "";
|
|
265
|
+
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#737373;'><span style='width:10px;height:10px;border-radius:2px;background-color:${C};display:inline-block'></span>${S}</span><b style='color:#2B2B2B;font-weight:500;font-size:10px;'>${t}${B}</b></div>`;
|
|
257
266
|
}).join("");
|
|
258
267
|
return {
|
|
259
268
|
...w,
|
|
@@ -300,17 +309,17 @@ const z = (e = {}) => {
|
|
|
300
309
|
anchorBorderColor: u,
|
|
301
310
|
anchorBorderThickness: "1",
|
|
302
311
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
303
|
-
data: v.map((
|
|
304
|
-
const D = g[
|
|
312
|
+
data: v.map((T, C) => {
|
|
313
|
+
const D = g[C]?.label || "";
|
|
305
314
|
if (e.plotToolText)
|
|
306
|
-
return { ...
|
|
307
|
-
const B = h[x]?.seriesname || "", S = (h[x]?.data || [])[
|
|
315
|
+
return { ...T };
|
|
316
|
+
const B = h[x]?.seriesname || "", S = (h[x]?.data || [])[C]?.value ?? "", k = f.color || d[x % d.length], P = `<div class='scroll-area-tooltip-row' data-series-index='${x}' style='display:flex;align-items:center;gap:5px;padding:2px 0;min-width:200px'><span class='scroll-area-dot' style='width:8px;height:8px;border-radius:2px;background-color:${k};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${B}</label><b style='text-align:right;margin-left:auto;color:#2B2B2B;font-weight:500;font-size:10px;'>${t}${S}</b></div>`;
|
|
308
317
|
return x === 0 ? {
|
|
309
|
-
...
|
|
318
|
+
...T,
|
|
310
319
|
// toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${label}</div>${row}`,
|
|
311
320
|
toolText: `<div style='font-size: 10px;font-weight:500;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${D}</div>${P}`
|
|
312
321
|
} : {
|
|
313
|
-
...
|
|
322
|
+
...T,
|
|
314
323
|
toolText: P
|
|
315
324
|
};
|
|
316
325
|
})
|
|
@@ -333,7 +342,9 @@ const z = (e = {}) => {
|
|
|
333
342
|
}
|
|
334
343
|
});
|
|
335
344
|
}
|
|
336
|
-
const n = Array.isArray(e?.graphData) ? e.graphData : [], s = n.map((o) => ({
|
|
345
|
+
const n = Array.isArray(e?.graphData) ? e.graphData : [], s = n.map((o) => ({
|
|
346
|
+
label: o?.label || ""
|
|
347
|
+
})), c = e.legendLabel || "Spend", r = n.map((o) => ({
|
|
337
348
|
value: o?.value,
|
|
338
349
|
// toolText: props?.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${item?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${lineColor};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${seriesName}</label></span><b style='text-align:right;'>${numberPrefix}${item?.value || ""}</b></div>`,
|
|
339
350
|
toolText: e?.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${o?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${a};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${c}</label></span><b style='text-align:right;color:#2B2B2B;font-weight:500;font-size:10px;'>${t}${o?.value || ""}</b></div>`
|
|
@@ -414,7 +425,10 @@ const z = (e = {}) => {
|
|
|
414
425
|
}
|
|
415
426
|
});
|
|
416
427
|
}, ae = (e = {}) => {
|
|
417
|
-
const l = e.graphData?.data || [], d = l.reduce(
|
|
428
|
+
const l = e.graphData?.data || [], d = l.reduce(
|
|
429
|
+
(o, g) => o + (Number(g.value) || 0),
|
|
430
|
+
0
|
|
431
|
+
), a = Math.round(d * 100) / 100, i = e.numberPrefix ?? "$", n = { ...e }, s = e?.formatLargeAmount;
|
|
418
432
|
if (!n.defaultCenterLabel)
|
|
419
433
|
n.defaultCenterLabel = s ? `Total{br}${A(a, i)}` : `Total{br}${i}${a}`;
|
|
420
434
|
else if (n.defaultCenterLabel.includes("{br}")) {
|
|
@@ -424,7 +438,13 @@ const z = (e = {}) => {
|
|
|
424
438
|
const c = (e.palettecolors || $).split(",").map((o) => o.trim()), r = l.map((o, g) => {
|
|
425
439
|
const h = Number(o.value) || 0, w = a > 0 ? (h / a * 100).toFixed(2) : "0", f = o.color || c[g % c.length];
|
|
426
440
|
let x;
|
|
427
|
-
return o.toolText ? x = o.toolText : e.plotToolText ? x = e.plotToolText : x = `<div style='font-size: 10px;font-weight:500;color:#2b2b2b;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${o.label}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;font-size: 10px;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373'><span style='width:8px;height:8px;border-radius:2px;background-color:${f};display:inline-block;margin-right:5px;color:#AAAAAA;'></span>${o.label}</label><b style='text-align:right;color:#2b2b2b;font-weight:500;font-size:10px;'>${s ? A(h, i) : i + "" + h}</b></div>`, x = x.replace(/\$plotFillColor/g, f).replace(/\$color/g, f).replace(/\$label/g, o.label || "").replace(/\$value/g, String(o.value ?? "")).replace(
|
|
441
|
+
return o.toolText ? x = o.toolText : e.plotToolText ? x = e.plotToolText : x = `<div style='font-size: 10px;font-weight:500;color:#2b2b2b;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${o.label}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;font-size: 10px;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373'><span style='width:8px;height:8px;border-radius:2px;background-color:${f};display:inline-block;margin-right:5px;color:#AAAAAA;'></span>${o.label}</label><b style='text-align:right;color:#2b2b2b;font-weight:500;font-size:10px;'>${s ? A(h, i) : i + "" + h}</b></div>`, x = x.replace(/\$plotFillColor/g, f).replace(/\$color/g, f).replace(/\$label/g, o.label || "").replace(/\$value/g, String(o.value ?? "")).replace(
|
|
442
|
+
/\$dataValue/g,
|
|
443
|
+
s ? A(h, i) : `${i}${h}`
|
|
444
|
+
).replace(/\$percentValue/g, w).replace(/\$unformattedSum/g, String(a)).replace(
|
|
445
|
+
/\$sum/g,
|
|
446
|
+
s ? A(a, i) : `${i}${a}`
|
|
447
|
+
), {
|
|
428
448
|
...o,
|
|
429
449
|
color: f,
|
|
430
450
|
displayValue: `${s ? A(h, i) : i + "" + o.value} (${w}%){br}${o.label}`,
|
|
@@ -448,7 +468,10 @@ const z = (e = {}) => {
|
|
|
448
468
|
width: e.width || m,
|
|
449
469
|
height: e.height || "400",
|
|
450
470
|
dataSource: {
|
|
451
|
-
chart: {
|
|
471
|
+
chart: {
|
|
472
|
+
...t?.chart || {},
|
|
473
|
+
...e.plotToolText ? { plotToolText: e.plotToolText } : {}
|
|
474
|
+
},
|
|
452
475
|
categories: t?.categories || [],
|
|
453
476
|
axis: t?.axis || []
|
|
454
477
|
}
|
|
@@ -460,7 +483,10 @@ const z = (e = {}) => {
|
|
|
460
483
|
width: e.width || "550",
|
|
461
484
|
height: e.height || "350",
|
|
462
485
|
dataSource: {
|
|
463
|
-
chart: {
|
|
486
|
+
chart: {
|
|
487
|
+
...t?.data?.chart || {},
|
|
488
|
+
...e.plotToolText ? { plotToolText: e.plotToolText } : {}
|
|
489
|
+
},
|
|
464
490
|
category: t?.data?.category
|
|
465
491
|
}
|
|
466
492
|
});
|
|
@@ -468,7 +494,9 @@ const z = (e = {}) => {
|
|
|
468
494
|
let t = [], l = [];
|
|
469
495
|
if (Array.isArray(e.graphData)) {
|
|
470
496
|
const n = e.graphData;
|
|
471
|
-
t = n.map((s) => ({
|
|
497
|
+
t = n.map((s) => ({
|
|
498
|
+
label: s.label || ""
|
|
499
|
+
})), l = [
|
|
472
500
|
{
|
|
473
501
|
seriesname: "Series 1",
|
|
474
502
|
data: n.map((s) => ({ value: s.value }))
|
|
@@ -482,7 +510,9 @@ const z = (e = {}) => {
|
|
|
482
510
|
data: s.data || []
|
|
483
511
|
}));
|
|
484
512
|
}
|
|
485
|
-
const d = y(e.numberPrefix), a = l.some(
|
|
513
|
+
const d = y(e.numberPrefix), a = l.some(
|
|
514
|
+
(n) => !!n.color
|
|
515
|
+
), i = {
|
|
486
516
|
...N(e),
|
|
487
517
|
bgColor: e.bgColor || "#ffffff",
|
|
488
518
|
xAxisName: e.xAxisName,
|
|
@@ -504,7 +534,7 @@ const z = (e = {}) => {
|
|
|
504
534
|
labelStep: p(t.length, e.labelStep),
|
|
505
535
|
numVisiblePlot: e.numVisiblePlot || "8",
|
|
506
536
|
scrollShowButtons: "0",
|
|
507
|
-
scrollColor: "#
|
|
537
|
+
scrollColor: "#9c9898",
|
|
508
538
|
scrollHeight: "10",
|
|
509
539
|
flatScrollBars: "1",
|
|
510
540
|
scrollPadding: "5",
|
|
@@ -521,7 +551,9 @@ const z = (e = {}) => {
|
|
|
521
551
|
}
|
|
522
552
|
});
|
|
523
553
|
}, ne = (e = {}) => {
|
|
524
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), l = e.graphData, d = (l?.dataset || []).some(
|
|
554
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), l = e.graphData, d = (l?.dataset || []).some(
|
|
555
|
+
(n) => !!n.color
|
|
556
|
+
), a = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:500'>Total</span><b style='color:#2B2B2B;font-weight:500;font-size:10px'>$sum</b></div>", i = (l?.dataset || []).map((n, s) => ({
|
|
525
557
|
...n,
|
|
526
558
|
// plotToolText: props.plotToolText || (
|
|
527
559
|
// index === 0
|
|
@@ -552,7 +584,7 @@ const z = (e = {}) => {
|
|
|
552
584
|
showSum: e.showSum ? "1" : void 0,
|
|
553
585
|
numVisiblePlot: e.numVisiblePlot || "6",
|
|
554
586
|
scrollShowButtons: "0",
|
|
555
|
-
scrollColor: "#
|
|
587
|
+
scrollColor: "#9c9898",
|
|
556
588
|
scrollHeight: "10",
|
|
557
589
|
flatScrollBars: "1",
|
|
558
590
|
scrollPadding: "5"
|
|
@@ -575,8 +607,8 @@ const z = (e = {}) => {
|
|
|
575
607
|
if (r > 0)
|
|
576
608
|
return { ...h, toolText: " " };
|
|
577
609
|
const x = n.map((u, v) => {
|
|
578
|
-
const
|
|
579
|
-
return `<div class='mscombi-tooltip-row' data-series-index='${v}' data-render-as='${k}' style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'><span class='mscombi-dot' style='width:8px;height:8px;border-radius:2px;background-color:${
|
|
610
|
+
const T = u.color || a[v % a.length], D = (u.data || [])[w]?.value ?? "", B = u.seriesname || "", S = u.tooltipPrefix !== void 0 ? u.tooltipPrefix : t, k = u.renderAs || "column";
|
|
611
|
+
return `<div class='mscombi-tooltip-row' data-series-index='${v}' data-render-as='${k}' style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'><span class='mscombi-dot' style='width:8px;height:8px;border-radius:2px;background-color:${T};display:inline-block;margin-right:5px;'></span>${B}</label><b style='text-align:right;color:#2B2B2B;font-weight:500;font-size:10px;'>${S}${D}</b></div>`;
|
|
580
612
|
}).join("");
|
|
581
613
|
return {
|
|
582
614
|
...h,
|
|
@@ -624,7 +656,7 @@ const z = (e = {}) => {
|
|
|
624
656
|
showLegend: "0",
|
|
625
657
|
numVisiblePlot: e?.numVisiblePlot || "12",
|
|
626
658
|
scrollShowButtons: "0",
|
|
627
|
-
scrollColor: "#
|
|
659
|
+
scrollColor: "#9c9898",
|
|
628
660
|
scrollHeight: "10",
|
|
629
661
|
flatScrollBars: "1",
|
|
630
662
|
scrollPadding: "5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../lib/components/FusionChart/_config/helpers.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../lib/components/FusionChart/_config/helpers.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,eAAO,MAAM,cAAc,GAAI,QAAO,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;CAQlE,CAAC;AAEH,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,QAAO,OAAO,CAAC,gBAAgB,CAAM,4BAatC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,2CAM3B;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;;;;;;;CAOC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;CAwBlC,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,+DAKjC,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS/B,CAAC;AAEH,eAAO,MAAM,0BAA0B,GACrC,QAAO,OAAO,CAAC,gBAAgB,CAAM,4BAuCpC,CAAC;AAEJ,eAAO,MAAM,kBAAkB,GAAI,QAAO,OAAO,CAAC,gBAAgB,CAAM,4BA8CrE,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAAI,QAAO,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBrE,CAAC;AAEH,eAAO,MAAM,yBAAyB,GACpC,QAAO,OAAO,CAAC,gBAAgB,CAAM,4BA6CpC,CAAC;AAEJ,eAAO,MAAM,uBAAuB,GAClC,QAAO,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBrC,CAAC;AAEH,eAAO,MAAM,wBAAwB,GACnC,QAAO,OAAO,CAAC,gBAAgB,CAAM,4BAmEpC,CAAC;AAEJ,eAAO,MAAM,uBAAuB,GAClC,QAAO,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DrC,CAAC;AAEH,eAAO,MAAM,wBAAwB,GACnC,QAAO,OAAO,CAAC,gBAAgB,CAAM,4BAuDpC,CAAC;AAEJ,eAAO,MAAM,qBAAqB,GAChC,QAAO,OAAO,CAAC,gBAAgB,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDrC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { LEGEND_HOVER_FONT_COLOR as
|
|
1
|
+
import { LEGEND_HOVER_FONT_COLOR as m, LEGEND_FONT_COLOR as C, DEFAULT_WIDTH as F, LABEL_FONT_COLOR as o, AXIS_NAME_FONT_COLOR as l, AXIS_LINE_COLOR as L, LABEL_STEP_DEFAULT as d, DEFAULT_PALETTE as g, PERCENT_TOOLTIP as f, VALUE_TOOLTIP as A, SERIES_TOOLTIP as b, EXTENDED_PALETTE as a, DIV_LINE_COLOR as c, CROSS_LINE_COLOR as S } from "../_constant/constants.js";
|
|
2
2
|
import { getCurrencySymbol as i } from "../_utils/chartHelpers.js";
|
|
3
3
|
const s = (e = {}) => ({
|
|
4
4
|
legendItemFontSize: 10,
|
|
5
5
|
legendIconScale: ".96",
|
|
6
6
|
legendBgAlpha: 20,
|
|
7
7
|
legendItemFontBold: 0,
|
|
8
|
-
legendItemFontColor: e?.legendItemFontColor ||
|
|
9
|
-
legendItemHoverFontColor:
|
|
8
|
+
legendItemFontColor: e?.legendItemFontColor || C,
|
|
9
|
+
legendItemHoverFontColor: m,
|
|
10
10
|
legendItemFont: e?.legendItemFont || "Inter"
|
|
11
11
|
}), r = (e, t = {}) => t.legendRight ? {
|
|
12
12
|
...e,
|
|
@@ -343,7 +343,7 @@ const s = (e = {}) => ({
|
|
|
343
343
|
// Scroll-specific properties
|
|
344
344
|
numVisiblePlot: e.numVisiblePlot || "8",
|
|
345
345
|
scrollShowButtons: "0",
|
|
346
|
-
scrollColor: "#
|
|
346
|
+
scrollColor: "#9c9898",
|
|
347
347
|
scrollHeight: "10",
|
|
348
348
|
flatScrollBars: "1",
|
|
349
349
|
scrollPadding: "5",
|
|
@@ -433,7 +433,7 @@ const s = (e = {}) => ({
|
|
|
433
433
|
plotBorderThickness: "3",
|
|
434
434
|
plotBorderColor: "#ffffff",
|
|
435
435
|
chartLeftMargin: "10",
|
|
436
|
-
chartTopMargin: "
|
|
436
|
+
chartTopMargin: "-20",
|
|
437
437
|
chartRightMargin: "10",
|
|
438
438
|
chartBottomMargin: "10",
|
|
439
439
|
pieRadius: e.pieRadius ?? 100,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/FusionChart/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/FusionChart/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AA8UnE,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kDAoWlD;yBApWe,WAAW"}
|