@nxgt/material-vue 0.16.0 → 0.19.0
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/README.md +4 -0
- package/dist/_baseIsEqual-Cj6hHjs0.js +226 -0
- package/dist/abnfDiagram-O67JEVCF-Cl_I9xuI.js +89 -0
- package/dist/arc-DNNg1pxp.js +80 -0
- package/dist/architecture-7GRP2DOG-DDr0RGVC.js +3 -0
- package/dist/architectureDiagram-NJMV4G6O-CVS4UUCi.js +4146 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/blockDiagram-BEXU5L5S-B5Z0jbc8.js +1946 -0
- package/dist/c4Diagram-YGBWAQC7-B6jKsl3h.js +2990 -0
- package/dist/{camera-Cbd1TWFd.js → camera-oxz1xItP.js} +4 -4
- package/dist/channel-BA1GJyZ7.js +5 -0
- package/dist/chunk-2Q5K7J3B-kzxEEeTu.js +15 -0
- package/dist/chunk-3FUC2YCW-CX-v_TQz.js +364 -0
- package/dist/chunk-5DYCD2WN-B9vjeX2u.js +37 -0
- package/dist/chunk-5VM5RSS4-Cr17nBXp.js +5 -0
- package/dist/chunk-6AEJRKK7-D9IaQdwq.js +10 -0
- package/dist/chunk-742MDFTN-BIhVe9GR.js +275 -0
- package/dist/chunk-7INBJB4K-CwPgdc2G.js +4487 -0
- package/dist/chunk-7M6MHVWA-Deh_-m6x.js +4256 -0
- package/dist/chunk-7PRAP22T-CofnNOEr.js +67 -0
- package/dist/chunk-DUW6YSOI-BdOla2G8.js +10 -0
- package/dist/chunk-FOHPRMQF-Crq0JMf2.js +21388 -0
- package/dist/chunk-GNY47TPC-rS2K544k.js +75 -0
- package/dist/chunk-GTNCS2PH-BR0O70z_.js +490 -0
- package/dist/chunk-GWA4HPMP-DU9lUCZD.js +61 -0
- package/dist/chunk-J5ZVWO5B-CYzz6Pq8.js +12 -0
- package/dist/chunk-JWPE2WC7-Ccb0QaC8.js +8 -0
- package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
- package/dist/chunk-MBY4JIJT-HYVRUG_P.js +1847 -0
- package/dist/chunk-NETBCI7D-C8amwD_P.js +236 -0
- package/dist/chunk-O7XYJQB3-WMQqqzRb.js +3922 -0
- package/dist/chunk-UA2S7LBM-DtBatid7.js +363 -0
- package/dist/chunk-WEXAMYUT-Cc10h8ed.js +26 -0
- package/dist/chunk-XXDRQBXY-B2pGFcse.js +9 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
- package/dist/chunk-Z7XXMR3K-CJmsOGTV.js +676 -0
- package/dist/chunk-ZIGJFQKS-DBdWb0bj.js +1366 -0
- package/dist/classDiagram-v2-NBCMYWYE-Caqw5P6A.js +3397 -0
- package/dist/{components-DLtnz66n.js → components-IbdMALGv.js} +43465 -18610
- package/dist/components.js +5 -5
- package/dist/{composables-BJ2GgDD0.js → composables-6zV0t-y7.js} +1 -1
- package/dist/composables.js +1 -1
- package/dist/cose-bilkent-JH36ORCC-DStMi-eo.js +2251 -0
- package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +3 -0
- package/dist/cynefinDiagram-VND7K2PF-0Mq0e5NQ.js +349 -0
- package/dist/cytoscape.esm-_jXi1N4y.js +18151 -0
- package/dist/dagre-6A5THRUB-EHXNn6Wq.js +2192 -0
- package/dist/defaultLocale-DnzPsei5.js +201 -0
- package/dist/diagram-22UHCM2B-B3RAQlqQ.js +5084 -0
- package/dist/diagram-3UASUU5V-BznCZHss.js +525 -0
- package/dist/diagram-ATOU4E4O-DtIUxSAn.js +432 -0
- package/dist/diagram-CDSNMT55-DOjN3BR2.js +301 -0
- package/dist/diagram-MLGK6HIB-Dx2UboD6.js +134 -0
- package/dist/diagram-MPIPVDR6-DnPL3RV0.js +214 -0
- package/dist/dist-D9zvfe2i.js +59 -0
- package/dist/{dnd-Cmcrm28l.js → dnd-CaDeYjQx.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/ebnfDiagram-ZINNZB2B-BNbxCL0b.js +100 -0
- package/dist/elk-276RUBZZ-B9WeHolc.js +47597 -0
- package/dist/erDiagram-OPXOYQCR-DReZElBu.js +1970 -0
- package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +3 -0
- package/dist/flowDiagram-KWPJA3E3-DYss4vEI.js +17 -0
- package/dist/ganttDiagram-FUAMR5RP-64EZDDmC.js +3083 -0
- package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +3 -0
- package/dist/gitGraphDiagram-X574FWY7-DmMMrp5A.js +729 -0
- package/dist/graphlib-CrmIPC4m.js +372 -0
- package/dist/{i18n-DmMS3ID3.js → i18n-OBzfa-B7.js} +233 -924
- package/dist/i18n.js +2 -2
- package/dist/info-A6RAGUB7-BvtuPd9C.js +3 -0
- package/dist/infoDiagram-VRGFBTTK-XlBUAu0t.js +20 -0
- package/dist/init-MwSGRDIl.js +15 -0
- package/dist/isArrayLikeObject-VG1KOJ3m.js +539 -0
- package/dist/isEmpty-CMjyBU-a.js +136 -0
- package/dist/ishikawaDiagram-OU5B5YK6-C9cMWMPO.js +719 -0
- package/dist/journeyDiagram-ZHPQQLJL-DXdfP9BW.js +884 -0
- package/dist/kanban-definition-PNTS6WVX-DhOBy3A0.js +976 -0
- package/dist/katex-BMQ6LGsM.js +21962 -0
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/ui/chat/chat-composer-mentions.vue.d.ts +13 -0
- package/dist/lib/components/ui/chat/chat-composer.vue.d.ts +6 -2
- package/dist/lib/components/ui/contacts/consts.d.ts +1 -1
- package/dist/lib/components/ui/emoji/emoji-list.vue.d.ts +11 -0
- package/dist/lib/components/ui/emoji/emoji-picker.vue.d.ts +12 -0
- package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
- package/dist/lib/components/ui/emoji/index.d.ts +4 -0
- package/dist/lib/components/ui/emoji/types.d.ts +6 -0
- package/dist/lib/components/ui/markdown/index.d.ts +2 -0
- package/dist/lib/components/ui/markdown/markdown.utils.d.ts +10 -0
- package/dist/lib/components/ui/markdown/markdown.vue.d.ts +10 -0
- package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
- package/dist/lib/components/ui/markdown/partials/mermaid-diagram.vue.d.ts +7 -0
- package/dist/lib/components/ui/mentions/index.d.ts +4 -0
- package/dist/lib/components/ui/mentions/mention-list.vue.d.ts +16 -0
- package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
- package/dist/lib/components/ui/mentions/types.d.ts +5 -0
- package/dist/lib/components/ui/terminal/index.d.ts +3 -0
- package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
- package/dist/lib/components/ui/terminal/terminal.vue.d.ts +17 -0
- package/dist/lib/i18n/resources/en/index.d.ts +7 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +7 -0
- package/dist/lib/i18n/resources/fr/index.d.ts +7 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -0
- package/dist/lib/i18n/resources/index.d.ts +14 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/nuxt/component-names.d.ts +1 -1
- package/dist/lib-B9AHrvmh.js +389 -0
- package/dist/lib.js +1 -1
- package/dist/line-UP6dkL36.js +34 -0
- package/dist/linear-bD_QoED_.js +289 -0
- package/dist/main.js +9 -9
- package/dist/material-vue.css +1 -1
- package/dist/merge-B4IBXGaq.js +170 -0
- package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
- package/dist/mermaid.core-C_Rtflmc.js +1096 -0
- package/dist/mindmap-definition-NLK3R4M7-CO6s2Afv.js +1008 -0
- package/dist/ordinal-D_ZgubzR.js +65 -0
- package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
- package/dist/path-DGNPZRdx.js +85 -0
- package/dist/{pdf-outline-sidebar-BBXJRwdt.js → pdf-outline-sidebar-D5VedBgk.js} +3 -2
- package/dist/{pdf-page-DZyTFukn.js → pdf-page-B1Ze518d.js} +1 -1
- package/dist/{pdf-page-list-C3GukJ3_.js → pdf-page-list-CBJziavm.js} +3 -2
- package/dist/{pdf-reader-Ci4v2Ff9.js → pdf-reader-Cn1uxtJN.js} +13 -13
- package/dist/{pdf-sidebar-Dl8fQStG.js → pdf-sidebar-PXfgGlmq.js} +4 -4
- package/dist/{pdf-thumbnail-sidebar-GS_V0PGc.js → pdf-thumbnail-sidebar-7agqWsXT.js} +4 -3
- package/dist/{pdf-toolbar-D37w-WIK.js → pdf-toolbar-Blm9CFvh.js} +22 -21
- package/dist/pegDiagram-GJSIUBJH-gvsGke9W.js +94 -0
- package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
- package/dist/pieDiagram-5QR66LMP-DLBcErnI.js +205 -0
- package/dist/quadrantDiagram-O4NWA36T-Bn3CmGxM.js +2001 -0
- package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
- package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
- package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
- package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
- package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
- package/dist/railroadDiagram-XR7U4H2S-DLeBxWbV.js +76 -0
- package/dist/requirementDiagram-PLB6GJNP-JpWB5sEv.js +2228 -0
- package/dist/rolldown-runtime-CWhphoD1.js +23 -0
- package/dist/rough.esm-rcMoXTJj.js +1352 -0
- package/dist/sankeyDiagram-IPEJSGJF-a4rFl5rR.js +970 -0
- package/dist/sequenceDiagram-PO4LG4MO-CjUigcL2.js +4200 -0
- package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
- package/dist/src-CNRY2AUH.js +2142 -0
- package/dist/stateDiagram-v2-GCMORJYK-DJkVDIb0.js +2143 -0
- package/dist/{stx-player-C0FOaRjU.js → stx-player-rs3uH0iI.js} +17 -17
- package/dist/swimlanes-2SLR337P-D7Ff0hLr.js +4763 -0
- package/dist/swimlanesDiagram-TC7HE7FX-DZZ9d76C.js +28 -0
- package/dist/timeline-definition-EJHVYXUP-C0aHlt9K.js +1073 -0
- package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
- package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
- package/dist/usecaseDiagram-POWQR4AR-BrRAt7Wu.js +9932 -0
- package/dist/vennDiagram-UO4OBE2U-B22Jhju8.js +1880 -0
- package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
- package/dist/wardleyDiagram-VNRHLVJA-Dw4YgRiQ.js +645 -0
- package/dist/xychartDiagram-PMCCYNJV-DtuDs9I7.js +2214 -0
- package/lib/nuxt/component-names.ts +2 -0
- package/package.json +5 -1
- package/dist/lib-CT0uRn8S.js +0 -611
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { n as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.js";
|
|
3
|
+
import { m as n } from "./src-CNRY2AUH.js";
|
|
4
|
+
import { H as r, U as i, a, c as o, f as s, q as c, v as l, w as u, x as d, y as f } from "./chunk-O7XYJQB3-WMQqqzRb.js";
|
|
5
|
+
import { t as p } from "./ordinal-D_ZgubzR.js";
|
|
6
|
+
import { n as m } from "./path-DGNPZRdx.js";
|
|
7
|
+
import { m as h } from "./dist-D9zvfe2i.js";
|
|
8
|
+
import { t as g } from "./arc-DNNg1pxp.js";
|
|
9
|
+
import { t as _ } from "./array-CApNbSU9.js";
|
|
10
|
+
import { i as v, p as y } from "./chunk-ZIGJFQKS-DBdWb0bj.js";
|
|
11
|
+
import { t as b } from "./chunk-6AEJRKK7-D9IaQdwq.js";
|
|
12
|
+
import { t as x } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
|
|
13
|
+
//#region node_modules/d3-shape/src/descending.js
|
|
14
|
+
function S(e, t) {
|
|
15
|
+
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region node_modules/d3-shape/src/identity.js
|
|
19
|
+
function C(e) {
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region node_modules/d3-shape/src/pie.js
|
|
24
|
+
function w() {
|
|
25
|
+
var e = C, t = S, n = null, r = m(0), i = m(h), a = m(0);
|
|
26
|
+
function o(o) {
|
|
27
|
+
var s, c = (o = _(o)).length, l, u, d = 0, f = Array(c), p = Array(c), m = +r.apply(this, arguments), g = Math.min(h, Math.max(-h, i.apply(this, arguments) - m)), v, y = Math.min(Math.abs(g) / c, a.apply(this, arguments)), b = y * (g < 0 ? -1 : 1), x;
|
|
28
|
+
for (s = 0; s < c; ++s) (x = p[f[s] = s] = +e(o[s], s, o)) > 0 && (d += x);
|
|
29
|
+
for (t == null ? n != null && f.sort(function(e, t) {
|
|
30
|
+
return n(o[e], o[t]);
|
|
31
|
+
}) : f.sort(function(e, n) {
|
|
32
|
+
return t(p[e], p[n]);
|
|
33
|
+
}), s = 0, u = d ? (g - c * b) / d : 0; s < c; ++s, m = v) l = f[s], x = p[l], v = m + (x > 0 ? x * u : 0) + b, p[l] = {
|
|
34
|
+
data: o[l],
|
|
35
|
+
index: s,
|
|
36
|
+
value: x,
|
|
37
|
+
startAngle: m,
|
|
38
|
+
endAngle: v,
|
|
39
|
+
padAngle: y
|
|
40
|
+
};
|
|
41
|
+
return p;
|
|
42
|
+
}
|
|
43
|
+
return o.value = function(t) {
|
|
44
|
+
return arguments.length ? (e = typeof t == "function" ? t : m(+t), o) : e;
|
|
45
|
+
}, o.sortValues = function(e) {
|
|
46
|
+
return arguments.length ? (t = e, n = null, o) : t;
|
|
47
|
+
}, o.sort = function(e) {
|
|
48
|
+
return arguments.length ? (n = e, t = null, o) : n;
|
|
49
|
+
}, o.startAngle = function(e) {
|
|
50
|
+
return arguments.length ? (r = typeof e == "function" ? e : m(+e), o) : r;
|
|
51
|
+
}, o.endAngle = function(e) {
|
|
52
|
+
return arguments.length ? (i = typeof e == "function" ? e : m(+e), o) : i;
|
|
53
|
+
}, o.padAngle = function(e) {
|
|
54
|
+
return arguments.length ? (a = typeof e == "function" ? e : m(+e), o) : a;
|
|
55
|
+
}, o;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-5QR66LMP.mjs
|
|
59
|
+
var T = s.pie, E = {
|
|
60
|
+
sections: /* @__PURE__ */ new Map(),
|
|
61
|
+
showData: !1,
|
|
62
|
+
config: T
|
|
63
|
+
}, D = E.sections, O = E.showData, k = structuredClone(T), A = {
|
|
64
|
+
getConfig: /* @__PURE__ */ t(() => structuredClone(k), "getConfig"),
|
|
65
|
+
clear: /* @__PURE__ */ t(() => {
|
|
66
|
+
D = /* @__PURE__ */ new Map(), O = E.showData, a();
|
|
67
|
+
}, "clear"),
|
|
68
|
+
setDiagramTitle: c,
|
|
69
|
+
getDiagramTitle: u,
|
|
70
|
+
setAccTitle: i,
|
|
71
|
+
getAccTitle: f,
|
|
72
|
+
setAccDescription: r,
|
|
73
|
+
getAccDescription: l,
|
|
74
|
+
addSection: /* @__PURE__ */ t(({ label: e, value: t }) => {
|
|
75
|
+
if (t < 0) throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);
|
|
76
|
+
D.has(e) || (D.set(e, t), n.debug(`added new section: ${e}, with value: ${t}`));
|
|
77
|
+
}, "addSection"),
|
|
78
|
+
getSections: /* @__PURE__ */ t(() => D, "getSections"),
|
|
79
|
+
setShowData: /* @__PURE__ */ t((e) => {
|
|
80
|
+
O = e;
|
|
81
|
+
}, "setShowData"),
|
|
82
|
+
getShowData: /* @__PURE__ */ t(() => O, "getShowData")
|
|
83
|
+
}, j = /* @__PURE__ */ t((e, t) => {
|
|
84
|
+
x(e, t), t.setShowData(e.showData), e.sections.map(t.addSection);
|
|
85
|
+
}, "populateDb"), M = { parse: /* @__PURE__ */ t(async (t) => {
|
|
86
|
+
let r = await e("pie", t);
|
|
87
|
+
n.debug(r), j(r, A);
|
|
88
|
+
}, "parse") }, N = /* @__PURE__ */ t((e) => `
|
|
89
|
+
.pieCircle{
|
|
90
|
+
stroke: ${e.pieStrokeColor};
|
|
91
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
92
|
+
opacity : ${e.pieOpacity};
|
|
93
|
+
}
|
|
94
|
+
.pieCircle.highlighted{
|
|
95
|
+
scale: 1.05;
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
.pieCircle.highlightedOnHover:hover{
|
|
99
|
+
transition-duration: 250ms;
|
|
100
|
+
scale: 1.05;
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
.pieOuterCircle{
|
|
104
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
105
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
106
|
+
fill: none;
|
|
107
|
+
}
|
|
108
|
+
.pieTitleText {
|
|
109
|
+
text-anchor: middle;
|
|
110
|
+
font-size: ${e.pieTitleTextSize};
|
|
111
|
+
fill: ${e.pieTitleTextColor};
|
|
112
|
+
font-family: ${e.fontFamily};
|
|
113
|
+
}
|
|
114
|
+
.slice {
|
|
115
|
+
font-family: ${e.fontFamily};
|
|
116
|
+
fill: ${e.pieSectionTextColor};
|
|
117
|
+
font-size:${e.pieSectionTextSize};
|
|
118
|
+
// fill: white;
|
|
119
|
+
}
|
|
120
|
+
.legend text {
|
|
121
|
+
fill: ${e.pieLegendTextColor};
|
|
122
|
+
font-family: ${e.fontFamily};
|
|
123
|
+
font-size: ${e.pieLegendTextSize};
|
|
124
|
+
}
|
|
125
|
+
`, "getStyles"), P = /* @__PURE__ */ t((e) => {
|
|
126
|
+
let t = [...e.values()].reduce((e, t) => e + t, 0), n = [...e.entries()].map(([e, t]) => ({
|
|
127
|
+
label: e,
|
|
128
|
+
value: t
|
|
129
|
+
})).filter((e) => e.value / t * 100 >= 1);
|
|
130
|
+
return w().value((e) => e.value).sort(null)(n);
|
|
131
|
+
}, "createPieArcs"), F = {
|
|
132
|
+
parser: M,
|
|
133
|
+
db: A,
|
|
134
|
+
renderer: { draw: /* @__PURE__ */ t((e, t, r, i) => {
|
|
135
|
+
n.debug("rendering pie chart\n" + e);
|
|
136
|
+
let a = i.db, s = d(), c = v(a.getConfig(), s.pie), l = b(t), u = l.append("g");
|
|
137
|
+
u.attr("transform", "translate(225,225)");
|
|
138
|
+
let { themeVariables: f } = s, [m] = y(f.pieOuterStrokeWidth);
|
|
139
|
+
m ??= 2;
|
|
140
|
+
let h = c.legendPosition, _ = c.textPosition, x = c.donutHole > 0 && c.donutHole <= .9 ? c.donutHole : 0, S = g().innerRadius(x * 185).outerRadius(185), C = g().innerRadius(185 * _).outerRadius(185 * _), w = u.append("g");
|
|
141
|
+
w.append("circle").attr("cx", 0).attr("cy", 0).attr("r", 185 + m / 2).attr("class", "pieOuterCircle");
|
|
142
|
+
let T = a.getSections(), E = P(T), D = [
|
|
143
|
+
f.pie1,
|
|
144
|
+
f.pie2,
|
|
145
|
+
f.pie3,
|
|
146
|
+
f.pie4,
|
|
147
|
+
f.pie5,
|
|
148
|
+
f.pie6,
|
|
149
|
+
f.pie7,
|
|
150
|
+
f.pie8,
|
|
151
|
+
f.pie9,
|
|
152
|
+
f.pie10,
|
|
153
|
+
f.pie11,
|
|
154
|
+
f.pie12
|
|
155
|
+
], O = 0;
|
|
156
|
+
T.forEach((e) => {
|
|
157
|
+
O += e;
|
|
158
|
+
});
|
|
159
|
+
let k = E.filter((e) => (e.data.value / O * 100).toFixed(0) !== "0"), A = p(D).domain([...T.keys()]);
|
|
160
|
+
w.selectAll("mySlices").data(k).enter().append("path").attr("d", S).attr("fill", (e) => A(e.data.label)).attr("class", (e) => {
|
|
161
|
+
let t = "pieCircle";
|
|
162
|
+
return c.highlightSlice === "hover" ? t += " highlightedOnHover" : c.highlightSlice === e.data.label && (t += " highlighted"), t;
|
|
163
|
+
}), w.selectAll("mySlices").data(k).enter().append("text").text((e) => (e.data.value / O * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + C.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
|
|
164
|
+
let j = u.append("text").text(a.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText"), M = [...T.entries()].map(([e, t]) => ({
|
|
165
|
+
label: e,
|
|
166
|
+
value: t
|
|
167
|
+
})), N = u.selectAll(".legend").data(M).enter().append("g").attr("class", "legend");
|
|
168
|
+
N.append("rect").attr("width", 18).attr("height", 18).style("fill", (e) => A(e.label)).style("stroke", (e) => A(e.label)), N.append("text").attr("x", 22).attr("y", 14).text((e) => a.getShowData() ? `${e.label} [${e.value}]` : e.label);
|
|
169
|
+
let F = Math.max(...N.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0)), I = 450, L = 490, R = M.length * 22;
|
|
170
|
+
switch (h) {
|
|
171
|
+
case "center":
|
|
172
|
+
N.attr("transform", (e, t) => {
|
|
173
|
+
let n = 22 * M.length / 2, r = -F / 2 - 22, i = t * 22 - n;
|
|
174
|
+
return "translate(" + r + "," + i + ")";
|
|
175
|
+
});
|
|
176
|
+
break;
|
|
177
|
+
case "top":
|
|
178
|
+
I += R, N.attr("transform", (e, t) => `translate(${-F / 2 - 22}, ${t * 22 - 185})`), w.attr("transform", () => `translate(0, ${R + 22})`);
|
|
179
|
+
break;
|
|
180
|
+
case "bottom":
|
|
181
|
+
I += R, N.attr("transform", (e, t) => {
|
|
182
|
+
let n = -F / 2 - 22, r = t * 22 - -207;
|
|
183
|
+
return "translate(" + n + "," + r + ")";
|
|
184
|
+
});
|
|
185
|
+
break;
|
|
186
|
+
case "left":
|
|
187
|
+
L += 22 + F, N.attr("transform", (e, t) => {
|
|
188
|
+
let n = 22 * M.length / 2;
|
|
189
|
+
return "translate(-207," + (t * 22 - n) + ")";
|
|
190
|
+
}), w.attr("transform", () => `translate(${F + 18 + 4}, 0)`);
|
|
191
|
+
break;
|
|
192
|
+
default:
|
|
193
|
+
L += 22 + F, N.attr("transform", (e, t) => {
|
|
194
|
+
let n = 22 * M.length / 2;
|
|
195
|
+
return "translate(216," + (t * 22 - n) + ")";
|
|
196
|
+
});
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
let z = j.node()?.getBoundingClientRect().width ?? 0, B = 450 / 2 - z / 2, V = 450 / 2 + z / 2, H = Math.min(0, B), U = Math.max(L, V) - H;
|
|
200
|
+
l.attr("viewBox", `${H} 0 ${U} ${I}`), o(l, I, U, c.useMaxWidth);
|
|
201
|
+
}, "draw") },
|
|
202
|
+
styles: N
|
|
203
|
+
};
|
|
204
|
+
//#endregion
|
|
205
|
+
export { F as diagram };
|