@oneclick.dev/cms-core-modules 0.0.110 → 0.0.111
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/{Acquisition-Dt2rREU8.js → Acquisition-DgzDQH51.js} +1 -1
- package/dist/{Acquisition-DNCy8nQz.mjs → Acquisition-FV3QpaUX.mjs} +2 -2
- package/dist/{Audience-Bs7b0TNm.js → Audience-BSgNvcVb.js} +1 -1
- package/dist/{Audience-CUeMVYRy.mjs → Audience-ka0b7YPE.mjs} +2 -2
- package/dist/{ContentEditor-D9-1SJ5F.mjs → ContentEditor-pZPfo0qN.mjs} +4384 -4282
- package/dist/{ContentEditor-BprPiHMJ.js → ContentEditor-tYkh4vRV.js} +42 -42
- package/dist/{Create-89z41K73.js → Create--MOBOTA-.js} +1 -1
- package/dist/{Create-BCklc_T1.mjs → Create-BXNLRQag.mjs} +1 -1
- package/dist/DateFormatter-CSAbE3BC.js +1 -0
- package/dist/{DateFormatter-DUxlo8X8.mjs → DateFormatter-qbhRYxI_.mjs} +226 -222
- package/dist/{Detail-CNlljBfH.mjs → Detail-ChD5XurA.mjs} +1 -1
- package/dist/{Detail-C857g62L.js → Detail-RISEJJab.js} +1 -1
- package/dist/{Find-DIISO5GO.mjs → Find-zN_dKz4p.mjs} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Baqy-rTT.js +1 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dx4Bpa2m.mjs +1263 -0
- package/dist/{Overview-Di84CsR5.mjs → Overview-98nkJUWN.mjs} +162 -157
- package/dist/{Overview-C-Jb_BxY.mjs → Overview-BR_y8x3W.mjs} +1 -1
- package/dist/{Overview-DC9io1bk.js → Overview-CX-n6W7d.js} +1 -1
- package/dist/Overview-Dl8cMlsr.js +1 -0
- package/dist/{Overview-BKAti8nc.mjs → Overview-MpgkLB6m.mjs} +36 -36
- package/dist/{SeoHealth-az1YuNF2.js → SeoHealth-C5npw7mE.js} +1 -1
- package/dist/{SeoHealth-MC3lSCOY.mjs → SeoHealth-bVQj_Xgm.mjs} +29 -29
- package/dist/{TableView-DXHhJ-jm.mjs → TableView-Bf1fdJrD.mjs} +1838 -1822
- package/dist/TableView-DNcXyIMu.js +4 -0
- package/dist/{agenda-IOqtALWf.js → agenda-BaJu3-1c.js} +1 -1
- package/dist/{agenda-DcatSSYQ.mjs → agenda-BwVY_8oM.mjs} +3 -3
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-CI0B4xVj.js → exceptions-B6P9UiCj.js} +1 -1
- package/dist/{exceptions-YCQkHa6a.mjs → exceptions-De9-FvdP.mjs} +67 -67
- package/dist/{index-CpzDEMeC.mjs → index-B8GvmAwh.mjs} +438 -478
- package/dist/{index-wjkEPsNx.mjs → index-BIF2RB7k.mjs} +1212 -1316
- package/dist/index-ByRsp77L.js +70 -0
- package/dist/{index-BhWvXMOp.mjs → index-CFzn2Lus.mjs} +5 -9
- package/dist/{index-BFLV54kw.mjs → index-CkVwMqpn.mjs} +1114 -1100
- package/dist/index-DL6orwdK.js +35 -0
- package/dist/index-DUlYrnXH.js +58 -0
- package/dist/index-DZV720u-.mjs +439 -0
- package/dist/index-D_nfGegA.js +184 -0
- package/dist/index-DtSvAFLL.js +54 -0
- package/dist/{index-D30apIn-.mjs → index-L54VBzwJ.mjs} +2 -3
- package/dist/{index-BzWmWCo5.mjs → index-hH3e-IYz.mjs} +267 -267
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +15 -15
- package/dist/math-BJ-oX_IM.mjs +80 -0
- package/dist/math-emotyaF6.js +1 -0
- package/dist/{resources-CYOb5Bl6.mjs → resources-DwYxn2Vi.mjs} +1 -1
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/ScopedSelectAll.d.ts +1 -2
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/useFocus.d.ts +1 -0
- package/package.json +2 -2
- package/dist/DateFormatter-CYAD4GBN.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dh9jzvE0.mjs +0 -1255
- package/dist/Overview-UoZHUMUz.js +0 -1
- package/dist/TableView-DQW0A1oG.js +0 -4
- package/dist/array-CbATeQbk.js +0 -1
- package/dist/array-DT5pE8Gm.mjs +0 -108
- package/dist/index-A2kp8Isi.js +0 -75
- package/dist/index-B5aBwdxY.js +0 -54
- package/dist/index-BiT55eU0.js +0 -58
- package/dist/index-G7cIlnGN.js +0 -158
- package/dist/index-V78huaSJ.mjs +0 -442
- package/dist/index-vHmvbEwa.js +0 -35
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import { defineComponent as ht, toRefs as Dt, reactive as Et, ref as pt, watchEffect as Ot, watch as lt, onUnmounted as mt, provide as nt, openBlock as vt, createElementBlock as bt, renderSlot as Tt, toRaw as at, inject as zt, computed as Nt, onMounted as Wt, nextTick as Gt } from "vue";
|
|
2
|
+
import { c as Ht, b as Mt, e as it, Z as et, a as Ft, q as yt, E as Bt, l as J, D as $t, C as jt, S as Pt, v as ut, M as It, j as Ut, a1 as Yt, N as At, R as xt, X as Xt, _ as Vt, n as qt } from "./index-CkVwMqpn.mjs";
|
|
3
|
+
import { j as dt, f as j, s as M, e as k, h as ct, p as Zt, g as D, t as tt, k as Z, i as ot, a as gt, d as S, m as Jt, c as ft, b as Kt } from "./math-BJ-oX_IM.mjs";
|
|
4
|
+
const Qt = Object.assign(Object.assign({}, Ht), { tooltip: void 0, annotations: void 0 });
|
|
5
|
+
class te extends Mt {
|
|
6
|
+
constructor(e, n, i) {
|
|
7
|
+
var r;
|
|
8
|
+
super(e), this._defaultConfig = Qt, this.config = this._defaultConfig, n && (this.updateContainer(n, !0), this.component = n.component), i && this.setData(i, !0), !((r = this.component) === null || r === void 0) && r.datamodel.data && this.render();
|
|
9
|
+
}
|
|
10
|
+
setData(e, n) {
|
|
11
|
+
var i;
|
|
12
|
+
const { config: r } = this;
|
|
13
|
+
this.component && this.component.setData(e), n || this.render(), (i = r.tooltip) === null || i === void 0 || i.hide();
|
|
14
|
+
}
|
|
15
|
+
updateContainer(e, n) {
|
|
16
|
+
super.updateContainer(e), this._removeAllChildren(), this.component = e.component, e.sizing && (this.component.sizing = e.sizing), this.element.appendChild(this.component.element);
|
|
17
|
+
const i = e.tooltip;
|
|
18
|
+
i && (i.hasContainer() || i.setContainer(this._container), i.setComponents([this.component]));
|
|
19
|
+
const r = e.annotations;
|
|
20
|
+
r && this.element.appendChild(r.element), this.element.appendChild(this._svgDefs.node()), this.element.appendChild(this._svgDefsExternal.node()), n || this.render();
|
|
21
|
+
}
|
|
22
|
+
updateComponent(e, n) {
|
|
23
|
+
this.component.setConfig(e), n || this.render();
|
|
24
|
+
}
|
|
25
|
+
update(e, n, i) {
|
|
26
|
+
e && this.updateContainer(e, !0), n && this.updateComponent(n, !0), i && this.setData(i, !0), this.render();
|
|
27
|
+
}
|
|
28
|
+
getFitWidthScale() {
|
|
29
|
+
const { config: e, component: n } = this, i = n;
|
|
30
|
+
if (!i.getWidth)
|
|
31
|
+
return 1;
|
|
32
|
+
const r = i.getWidth() + e.margin.left + e.margin.right;
|
|
33
|
+
return this.width / r;
|
|
34
|
+
}
|
|
35
|
+
_preRender() {
|
|
36
|
+
var e;
|
|
37
|
+
super._preRender(), this.component.setSize(this.width, this.height, this.containerWidth, this.containerHeight), (e = this.config.annotations) === null || e === void 0 || e.setSize(this.width, this.height, this.containerWidth, this.containerHeight);
|
|
38
|
+
}
|
|
39
|
+
_render(e) {
|
|
40
|
+
var n;
|
|
41
|
+
const { config: i, component: r } = this;
|
|
42
|
+
super._render(e), r.g.attr("transform", `translate(${i.margin.left},${i.margin.top})`), r.render(e), (n = i.annotations) === null || n === void 0 || n.render(e), i.tooltip && i.tooltip.update();
|
|
43
|
+
}
|
|
44
|
+
// Re-defining the `render()` function to handle different sizing techniques (`Sizing.Extend` and `Sizing.FitWidth`)
|
|
45
|
+
// Not calling `super.render()` because we don't want it to interfere with setting the SVG size here.
|
|
46
|
+
render(e = this.config.duration) {
|
|
47
|
+
const { config: n, component: i } = this;
|
|
48
|
+
if (n.sizing === it.Extend || n.sizing === it.FitWidth) {
|
|
49
|
+
const r = n.sizing === it.FitWidth, d = i, l = d.getWidth() + n.margin.left + n.margin.right, t = d.getHeight() + n.margin.top + n.margin.bottom, s = r ? this.getFitWidthScale() : 1, a = this.svg.attr("width"), m = this.svg.attr("height"), h = l * s, c = t * s, v = a || m;
|
|
50
|
+
et(this.svg, v ? e : 0).attr("width", h).attr("height", c).attr("viewBox", `0 0 ${l} ${r ? c : t}`).attr("preserveAspectRatio", "xMinYMin");
|
|
51
|
+
} else
|
|
52
|
+
this.svg.attr("width", this.config.width || this.containerWidth).attr("height", this.config.height || this.containerHeight);
|
|
53
|
+
this._resizeObserver || this._setUpResizeObserver(), cancelAnimationFrame(this._renderAnimationFrameId), this._renderAnimationFrameId = requestAnimationFrame(() => {
|
|
54
|
+
this._preRender(), this._render(e);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
_onResize() {
|
|
58
|
+
var e;
|
|
59
|
+
const { config: n } = this;
|
|
60
|
+
super._onResize(), (e = n.tooltip) === null || e === void 0 || e.hide();
|
|
61
|
+
}
|
|
62
|
+
destroy() {
|
|
63
|
+
var e, n;
|
|
64
|
+
const { component: i, config: r } = this;
|
|
65
|
+
super.destroy(), i?.destroy(), (e = r.tooltip) === null || e === void 0 || e.destroy(), (n = r.annotations) === null || n === void 0 || n.destroy();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function ee(u) {
|
|
69
|
+
return u.innerRadius;
|
|
70
|
+
}
|
|
71
|
+
function ne(u) {
|
|
72
|
+
return u.outerRadius;
|
|
73
|
+
}
|
|
74
|
+
function ae(u) {
|
|
75
|
+
return u.startAngle;
|
|
76
|
+
}
|
|
77
|
+
function ie(u) {
|
|
78
|
+
return u.endAngle;
|
|
79
|
+
}
|
|
80
|
+
function oe(u) {
|
|
81
|
+
return u && u.padAngle;
|
|
82
|
+
}
|
|
83
|
+
function le(u, e, n, i, r, d, l, t) {
|
|
84
|
+
var s = n - u, a = i - e, m = l - r, h = t - d, c = h * s - m * a;
|
|
85
|
+
if (!(c * c < D))
|
|
86
|
+
return c = (m * (e - d) - h * (u - r)) / c, [u + c * s, e + c * a];
|
|
87
|
+
}
|
|
88
|
+
function Q(u, e, n, i, r, d, l) {
|
|
89
|
+
var t = u - n, s = e - i, a = (l ? d : -d) / Z(t * t + s * s), m = a * s, h = -a * t, c = u + m, v = e + h, b = n + m, _ = i + h, o = (c + b) / 2, C = (v + _) / 2, A = b - c, x = _ - v, y = A * A + x * x, L = r - d, R = c * _ - b * v, z = (x < 0 ? -1 : 1) * Z(Jt(0, L * L * y - R * R)), N = (R * x - A * z) / y, w = (-R * A - x * z) / y, E = (R * x + A * z) / y, O = (-R * A + x * z) / y, g = N - o, p = w - C, W = E - o, G = O - C;
|
|
90
|
+
return g * g + p * p > W * W + G * G && (N = E, w = O), {
|
|
91
|
+
cx: N,
|
|
92
|
+
cy: w,
|
|
93
|
+
x01: -m,
|
|
94
|
+
y01: -h,
|
|
95
|
+
x11: N * (r / L - 1),
|
|
96
|
+
y11: w * (r / L - 1)
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function se() {
|
|
100
|
+
var u = ee, e = ne, n = k(0), i = null, r = ae, d = ie, l = oe, t = null;
|
|
101
|
+
function s() {
|
|
102
|
+
var a, m, h = +u.apply(this, arguments), c = +e.apply(this, arguments), v = r.apply(this, arguments) - ct, b = d.apply(this, arguments) - ct, _ = gt(b - v), o = b > v;
|
|
103
|
+
if (t || (t = a = Zt()), c < h && (m = c, c = h, h = m), !(c > D)) t.moveTo(0, 0);
|
|
104
|
+
else if (_ > tt - D)
|
|
105
|
+
t.moveTo(c * j(v), c * M(v)), t.arc(0, 0, c, v, b, !o), h > D && (t.moveTo(h * j(b), h * M(b)), t.arc(0, 0, h, b, v, o));
|
|
106
|
+
else {
|
|
107
|
+
var C = v, A = b, x = v, y = b, L = _, R = _, z = l.apply(this, arguments) / 2, N = z > D && (i ? +i.apply(this, arguments) : Z(h * h + c * c)), w = ot(gt(c - h) / 2, +n.apply(this, arguments)), E = w, O = w, g, p;
|
|
108
|
+
if (N > D) {
|
|
109
|
+
var W = ft(N / h * M(z)), G = ft(N / c * M(z));
|
|
110
|
+
(L -= W * 2) > D ? (W *= o ? 1 : -1, x += W, y -= W) : (L = 0, x = y = (v + b) / 2), (R -= G * 2) > D ? (G *= o ? 1 : -1, C += G, A -= G) : (R = 0, C = A = (v + b) / 2);
|
|
111
|
+
}
|
|
112
|
+
var F = c * j(C), B = c * M(C), K = h * j(y), P = h * M(y);
|
|
113
|
+
if (w > D) {
|
|
114
|
+
var $ = c * j(A), I = c * M(A), U = h * j(x), Y = h * M(x), H;
|
|
115
|
+
if (_ < dt && (H = le(F, B, U, Y, $, I, K, P))) {
|
|
116
|
+
var X = F - H[0], V = B - H[1], f = $ - H[0], T = I - H[1], q = 1 / M(Kt((X * f + V * T) / (Z(X * X + V * V) * Z(f * f + T * T))) / 2), rt = Z(H[0] * H[0] + H[1] * H[1]);
|
|
117
|
+
E = ot(w, (h - rt) / (q - 1)), O = ot(w, (c - rt) / (q + 1));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
R > D ? O > D ? (g = Q(U, Y, F, B, c, O, o), p = Q($, I, K, P, c, O, o), t.moveTo(g.cx + g.x01, g.cy + g.y01), O < w ? t.arc(g.cx, g.cy, O, S(g.y01, g.x01), S(p.y01, p.x01), !o) : (t.arc(g.cx, g.cy, O, S(g.y01, g.x01), S(g.y11, g.x11), !o), t.arc(0, 0, c, S(g.cy + g.y11, g.cx + g.x11), S(p.cy + p.y11, p.cx + p.x11), !o), t.arc(p.cx, p.cy, O, S(p.y11, p.x11), S(p.y01, p.x01), !o))) : (t.moveTo(F, B), t.arc(0, 0, c, C, A, !o)) : t.moveTo(F, B), !(h > D) || !(L > D) ? t.lineTo(K, P) : E > D ? (g = Q(K, P, $, I, h, -E, o), p = Q(F, B, U, Y, h, -E, o), t.lineTo(g.cx + g.x01, g.cy + g.y01), E < w ? t.arc(g.cx, g.cy, E, S(g.y01, g.x01), S(p.y01, p.x01), !o) : (t.arc(g.cx, g.cy, E, S(g.y01, g.x01), S(g.y11, g.x11), !o), t.arc(0, 0, h, S(g.cy + g.y11, g.cx + g.x11), S(p.cy + p.y11, p.cx + p.x11), o), t.arc(p.cx, p.cy, E, S(p.y11, p.x11), S(p.y01, p.x01), !o))) : t.arc(0, 0, h, y, x, o);
|
|
121
|
+
}
|
|
122
|
+
if (t.closePath(), a) return t = null, a + "" || null;
|
|
123
|
+
}
|
|
124
|
+
return s.centroid = function() {
|
|
125
|
+
var a = (+u.apply(this, arguments) + +e.apply(this, arguments)) / 2, m = (+r.apply(this, arguments) + +d.apply(this, arguments)) / 2 - dt / 2;
|
|
126
|
+
return [j(m) * a, M(m) * a];
|
|
127
|
+
}, s.innerRadius = function(a) {
|
|
128
|
+
return arguments.length ? (u = typeof a == "function" ? a : k(+a), s) : u;
|
|
129
|
+
}, s.outerRadius = function(a) {
|
|
130
|
+
return arguments.length ? (e = typeof a == "function" ? a : k(+a), s) : e;
|
|
131
|
+
}, s.cornerRadius = function(a) {
|
|
132
|
+
return arguments.length ? (n = typeof a == "function" ? a : k(+a), s) : n;
|
|
133
|
+
}, s.padRadius = function(a) {
|
|
134
|
+
return arguments.length ? (i = a == null ? null : typeof a == "function" ? a : k(+a), s) : i;
|
|
135
|
+
}, s.startAngle = function(a) {
|
|
136
|
+
return arguments.length ? (r = typeof a == "function" ? a : k(+a), s) : r;
|
|
137
|
+
}, s.endAngle = function(a) {
|
|
138
|
+
return arguments.length ? (d = typeof a == "function" ? a : k(+a), s) : d;
|
|
139
|
+
}, s.padAngle = function(a) {
|
|
140
|
+
return arguments.length ? (l = typeof a == "function" ? a : k(+a), s) : l;
|
|
141
|
+
}, s.context = function(a) {
|
|
142
|
+
return arguments.length ? (t = a ?? null, s) : t;
|
|
143
|
+
}, s;
|
|
144
|
+
}
|
|
145
|
+
function re(u, e) {
|
|
146
|
+
return e < u ? -1 : e > u ? 1 : e >= u ? 0 : NaN;
|
|
147
|
+
}
|
|
148
|
+
function ue(u) {
|
|
149
|
+
return u;
|
|
150
|
+
}
|
|
151
|
+
function de() {
|
|
152
|
+
var u = ue, e = re, n = null, i = k(0), r = k(tt), d = k(0);
|
|
153
|
+
function l(t) {
|
|
154
|
+
var s, a = t.length, m, h, c = 0, v = new Array(a), b = new Array(a), _ = +i.apply(this, arguments), o = Math.min(tt, Math.max(-tt, r.apply(this, arguments) - _)), C, A = Math.min(Math.abs(o) / a, d.apply(this, arguments)), x = A * (o < 0 ? -1 : 1), y;
|
|
155
|
+
for (s = 0; s < a; ++s)
|
|
156
|
+
(y = b[v[s] = s] = +u(t[s], s, t)) > 0 && (c += y);
|
|
157
|
+
for (e != null ? v.sort(function(L, R) {
|
|
158
|
+
return e(b[L], b[R]);
|
|
159
|
+
}) : n != null && v.sort(function(L, R) {
|
|
160
|
+
return n(t[L], t[R]);
|
|
161
|
+
}), s = 0, h = c ? (o - a * x) / c : 0; s < a; ++s, _ = C)
|
|
162
|
+
m = v[s], y = b[m], C = _ + (y > 0 ? y * h : 0) + x, b[m] = {
|
|
163
|
+
data: t[m],
|
|
164
|
+
index: s,
|
|
165
|
+
value: y,
|
|
166
|
+
startAngle: _,
|
|
167
|
+
endAngle: C,
|
|
168
|
+
padAngle: A
|
|
169
|
+
};
|
|
170
|
+
return b;
|
|
171
|
+
}
|
|
172
|
+
return l.value = function(t) {
|
|
173
|
+
return arguments.length ? (u = typeof t == "function" ? t : k(+t), l) : u;
|
|
174
|
+
}, l.sortValues = function(t) {
|
|
175
|
+
return arguments.length ? (e = t, n = null, l) : e;
|
|
176
|
+
}, l.sort = function(t) {
|
|
177
|
+
return arguments.length ? (n = t, e = null, l) : n;
|
|
178
|
+
}, l.startAngle = function(t) {
|
|
179
|
+
return arguments.length ? (i = typeof t == "function" ? t : k(+t), l) : i;
|
|
180
|
+
}, l.endAngle = function(t) {
|
|
181
|
+
return arguments.length ? (r = typeof t == "function" ? t : k(+t), l) : r;
|
|
182
|
+
}, l.padAngle = function(t) {
|
|
183
|
+
return arguments.length ? (d = typeof t == "function" ? t : k(+t), l) : d;
|
|
184
|
+
}, l;
|
|
185
|
+
}
|
|
186
|
+
const ce = Object.assign(Object.assign({}, Ft), { id: (u, e) => {
|
|
187
|
+
var n;
|
|
188
|
+
return (n = u.id) !== null && n !== void 0 ? n : e;
|
|
189
|
+
}, value: void 0, angleRange: [0, 2 * Math.PI], padAngle: 0, sortFunction: void 0, cornerRadius: 0, color: void 0, radius: void 0, arcWidth: 20, centralLabel: void 0, centralSubLabel: void 0, centralSubLabelWrap: !0, showEmptySegments: !1, emptySegmentAngle: 0.5 * Math.PI / 180, showBackground: !0, backgroundAngleRange: void 0, centralLabelOffsetX: void 0, centralLabelOffsetY: void 0 });
|
|
190
|
+
function ge(u, e) {
|
|
191
|
+
u.style("fill", (n) => yt(n.data, e.color, n.index)).style("opacity", 0).each((n, i, r) => {
|
|
192
|
+
const d = r[i], l = (n.startAngle + n.endAngle) / 2, t = (n.endAngle - n.startAngle) / 2;
|
|
193
|
+
d._animState = {
|
|
194
|
+
startAngle: l - t,
|
|
195
|
+
endAngle: l + t,
|
|
196
|
+
innerRadius: n.innerRadius,
|
|
197
|
+
outerRadius: n.outerRadius,
|
|
198
|
+
padAngle: n.padAngle
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function fe(u, e, n, i) {
|
|
203
|
+
u.style("transition", `fill ${i}ms`).style("fill", (d) => yt(d.data, e.color, d.index));
|
|
204
|
+
const r = (d) => e.showEmptySegments || d.value ? 1 : 0;
|
|
205
|
+
i ? et(u, i).style("opacity", r).attrTween("d", (l, t, s) => {
|
|
206
|
+
const a = s[t], m = {
|
|
207
|
+
startAngle: l.startAngle,
|
|
208
|
+
endAngle: l.endAngle,
|
|
209
|
+
innerRadius: l.innerRadius,
|
|
210
|
+
outerRadius: l.outerRadius,
|
|
211
|
+
padAngle: l.padAngle
|
|
212
|
+
}, h = Bt(a._animState, m);
|
|
213
|
+
return (c) => (a._animState = h(c), n(a._animState));
|
|
214
|
+
}) : u.attr("d", n).style("opacity", r);
|
|
215
|
+
}
|
|
216
|
+
function he(u, e) {
|
|
217
|
+
et(u, e).style("opacity", 0).remove();
|
|
218
|
+
}
|
|
219
|
+
const Rt = Array.from({ length: 4 }, (u, e) => {
|
|
220
|
+
const n = -Math.PI / 2 + e * Math.PI / 2;
|
|
221
|
+
return [n, n + Math.PI];
|
|
222
|
+
}), [xe, Re, _e, Le] = Rt, _t = J`
|
|
223
|
+
label: donut-component;
|
|
224
|
+
`, pe = $t`
|
|
225
|
+
:root {
|
|
226
|
+
--vis-donut-central-label-font-size: 16px;
|
|
227
|
+
--vis-donut-central-label-text-color: #5b5f6d;
|
|
228
|
+
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
|
229
|
+
/* --vis-donut-central-label-font-family: */
|
|
230
|
+
--vis-donut-central-label-font-weight: 600;
|
|
231
|
+
|
|
232
|
+
--vis-donut-central-sub-label-font-size: 12px;
|
|
233
|
+
--vis-donut-central-sub-label-text-color: #5b5f6d;
|
|
234
|
+
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
|
235
|
+
/* --vis-donut-central-sub-label-font-family: */
|
|
236
|
+
--vis-donut-central-sub-label-font-weight: 500;
|
|
237
|
+
|
|
238
|
+
--vis-donut-background-color: #E7E9F3;
|
|
239
|
+
--vis-donut-segment-stroke-width: 0;
|
|
240
|
+
// The line segment color variable is not defined by default
|
|
241
|
+
// to allow it to fallback to the donut background color
|
|
242
|
+
/* --vis-donut-segment-stroke-color: none; */
|
|
243
|
+
|
|
244
|
+
--vis-dark-donut-central-label-text-color: #C2BECE;
|
|
245
|
+
--vis-dark-donut-central-sub-label-text-color: #C2BECE;
|
|
246
|
+
--vis-dark-donut-background-color: #18160C;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
body.theme-dark ${`.${_t}`} {
|
|
250
|
+
--vis-donut-central-label-text-color: var(--vis-dark-donut-central-label-text-color);
|
|
251
|
+
--vis-donut-central-sub-label-text-color: var(--vis-dark-donut-central-sub-label-text-color);
|
|
252
|
+
--vis-donut-background-color: var(--vis-dark-donut-background-color);
|
|
253
|
+
}
|
|
254
|
+
`, Lt = J`
|
|
255
|
+
label: background;
|
|
256
|
+
fill: var(--vis-donut-background-color);
|
|
257
|
+
`, st = J`
|
|
258
|
+
label: segment;
|
|
259
|
+
stroke-width: var(--vis-donut-segment-stroke-width);
|
|
260
|
+
stroke: var(--vis-donut-segment-stroke-color, var(--vis-donut-background-color));
|
|
261
|
+
`, St = J`
|
|
262
|
+
label: segment-exit;
|
|
263
|
+
`, wt = J`
|
|
264
|
+
label: central-label;
|
|
265
|
+
text-anchor: middle;
|
|
266
|
+
dominant-baseline: middle;
|
|
267
|
+
font-size: var(--vis-donut-central-label-font-size);
|
|
268
|
+
font-family: var(--vis-donut-central-label-font-family, var(--vis-font-family));
|
|
269
|
+
font-weight: var(--vis-donut-central-label-font-weight);
|
|
270
|
+
fill: var(--vis-donut-central-label-text-color);
|
|
271
|
+
`, kt = J`
|
|
272
|
+
label: central-label;
|
|
273
|
+
text-anchor: middle;
|
|
274
|
+
dominant-baseline: middle;
|
|
275
|
+
font-size: var(--vis-donut-central-sub-label-font-size);
|
|
276
|
+
font-family: var(--vis-donut-central-sub-label-font-family, var(--vis-font-family));
|
|
277
|
+
font-weight: var(--vis-donut-central-sub-label-font-weight);
|
|
278
|
+
fill: var(--vis-donut-central-sub-label-text-color);
|
|
279
|
+
`, me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
280
|
+
__proto__: null,
|
|
281
|
+
background: Lt,
|
|
282
|
+
centralLabel: wt,
|
|
283
|
+
centralSubLabel: kt,
|
|
284
|
+
root: _t,
|
|
285
|
+
segment: st,
|
|
286
|
+
segmentExit: St,
|
|
287
|
+
variables: pe
|
|
288
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
289
|
+
class Ct extends jt {
|
|
290
|
+
constructor(e) {
|
|
291
|
+
super(), this._defaultConfig = ce, this.config = this._defaultConfig, this.datamodel = new Pt(), this.arcGen = se(), this.events = {}, e && this.setConfig(e), this.arcBackground = this.g.append("path"), this.arcGroup = this.g.append("g"), this.centralLabel = this.g.append("text").attr("class", wt), this.centralSubLabel = this.g.append("text").attr("class", kt);
|
|
292
|
+
}
|
|
293
|
+
get bleed() {
|
|
294
|
+
return { top: 0, bottom: 0, left: 0, right: 0 };
|
|
295
|
+
}
|
|
296
|
+
_render(e) {
|
|
297
|
+
var n, i, r, d, l, t, s, a, m, h, c, v, b, _;
|
|
298
|
+
const { config: o, datamodel: C, bleed: A } = this, x = C.data.map((f, T) => ({
|
|
299
|
+
index: T,
|
|
300
|
+
datum: f
|
|
301
|
+
})).filter((f) => o.showEmptySegments || ut(f.datum, o.value, f.index)), y = It(e) ? e : o.duration, [L, R, z, N] = Rt.map((f) => o.angleRange && o.angleRange[0] === f[0] && o.angleRange[1] === f[1]), w = L || z, E = R || N, O = this._width * (E ? 2 : 1), g = this._height * (w ? 2 : 1), p = o.radius || Math.min(O - A.left - A.right, g - A.top - A.bottom) / 2, W = o.arcWidth === 0 ? 0 : Ut(p - o.arcWidth, 0, p - 1), G = this._height / 2 + (L ? p / 2 : z ? -p / 2 : 0), F = this._width / 2 + (N ? p / 2 : R ? -p / 2 : 0), B = `translate(${F},${G})`;
|
|
302
|
+
this.arcGroup.attr("transform", B), this.arcGen.startAngle((f) => f.startAngle).endAngle((f) => f.endAngle).innerRadius((f) => f.innerRadius).outerRadius((f) => f.outerRadius).padAngle((f) => f.padAngle).cornerRadius(o.cornerRadius);
|
|
303
|
+
const P = de().startAngle((i = (n = o.angleRange) === null || n === void 0 ? void 0 : n[0]) !== null && i !== void 0 ? i : 0).endAngle((d = (r = o.angleRange) === null || r === void 0 ? void 0 : r[1]) !== null && d !== void 0 ? d : 2 * Math.PI).padAngle(o.padAngle).value((f) => ut(f.datum, o.value, f.index) || 0).sort((f, T) => {
|
|
304
|
+
var q;
|
|
305
|
+
return (q = o.sortFunction) === null || q === void 0 ? void 0 : q.call(o, f.datum, T.datum);
|
|
306
|
+
})(x).map((f) => {
|
|
307
|
+
const T = Object.assign(Object.assign({}, f), {
|
|
308
|
+
data: f.data.datum,
|
|
309
|
+
index: f.data.index,
|
|
310
|
+
innerRadius: W,
|
|
311
|
+
outerRadius: p
|
|
312
|
+
});
|
|
313
|
+
return o.showEmptySegments && f.endAngle - f.startAngle - f.padAngle <= Number.EPSILON && (T.endAngle = f.startAngle + Math.max(o.emptySegmentAngle, o.padAngle), T.padAngle = f.padAngle / 2), T;
|
|
314
|
+
}), $ = this.arcGroup.selectAll(`.${st}`).data(P, (f) => o.id(f.data, f.index)), I = $.enter().append("path").attr("class", st).call(ge, o), U = $.merge(I);
|
|
315
|
+
U.call(fe, o, this.arcGen, y), U.sort((f, T) => T.value - f.value), $.exit().attr("class", St).call(he, y);
|
|
316
|
+
const Y = R ? "start" : N ? "end" : "middle";
|
|
317
|
+
this.centralLabel.attr("dy", o.centralSubLabel ? "-0.55em" : null).style("text-anchor", Y).text((l = o.centralLabel) !== null && l !== void 0 ? l : null), this.centralSubLabel.attr("dy", o.centralLabel ? "0.55em" : null).style("text-anchor", Y).text((t = o.centralSubLabel) !== null && t !== void 0 ? t : null), o.centralSubLabelWrap && Yt(this.centralSubLabel, W * 1.9);
|
|
318
|
+
const H = (o.centralLabelOffsetX || 0) + F;
|
|
319
|
+
let X = (o.centralLabelOffsetY || 0) + G;
|
|
320
|
+
w && o.centralLabelOffsetX === void 0 && o.centralLabelOffsetY === void 0 && (X = (L ? -this.centralSubLabel.node().getBoundingClientRect().height : z ? this.centralLabel.node().getBoundingClientRect().height : 0) + G);
|
|
321
|
+
const V = `translate(${H},${X})`;
|
|
322
|
+
this.centralLabel.attr("transform", V), this.centralSubLabel.attr("transform", V), this.arcBackground.attr("class", Lt).attr("visibility", o.showBackground ? null : "hidden").attr("transform", B), et(this.arcBackground, y).attr("d", this.arcGen({
|
|
323
|
+
startAngle: (h = (a = (s = o.backgroundAngleRange) === null || s === void 0 ? void 0 : s[0]) !== null && a !== void 0 ? a : (m = o.angleRange) === null || m === void 0 ? void 0 : m[0]) !== null && h !== void 0 ? h : 0,
|
|
324
|
+
endAngle: (_ = (v = (c = o.backgroundAngleRange) === null || c === void 0 ? void 0 : c[1]) !== null && v !== void 0 ? v : (b = o.angleRange) === null || b === void 0 ? void 0 : b[1]) !== null && _ !== void 0 ? _ : 2 * Math.PI,
|
|
325
|
+
innerRadius: W,
|
|
326
|
+
outerRadius: p
|
|
327
|
+
}));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
Ct.selectors = me;
|
|
331
|
+
const Se = /* @__PURE__ */ ht({
|
|
332
|
+
__name: "index",
|
|
333
|
+
props: {
|
|
334
|
+
component: {},
|
|
335
|
+
tooltip: {},
|
|
336
|
+
annotations: {},
|
|
337
|
+
duration: {},
|
|
338
|
+
margin: {},
|
|
339
|
+
padding: {},
|
|
340
|
+
sizing: {},
|
|
341
|
+
width: {},
|
|
342
|
+
height: {},
|
|
343
|
+
svgDefs: {},
|
|
344
|
+
ariaLabel: {},
|
|
345
|
+
data: {}
|
|
346
|
+
},
|
|
347
|
+
setup(u, { expose: e }) {
|
|
348
|
+
const n = u, { data: i } = Dt(n), r = At(n);
|
|
349
|
+
let d;
|
|
350
|
+
const l = Et({
|
|
351
|
+
component: void 0,
|
|
352
|
+
tooltip: void 0,
|
|
353
|
+
annotations: void 0
|
|
354
|
+
}), t = pt(), s = () => {
|
|
355
|
+
d || t.value && l.component && (d = new te(t.value, { ...at(l) }, i.value));
|
|
356
|
+
};
|
|
357
|
+
return Ot(() => {
|
|
358
|
+
var a;
|
|
359
|
+
s(), (a = l.component) == null || a.config, d?.updateContainer({ ...at(r.value), ...at(l) });
|
|
360
|
+
}), lt(i, () => {
|
|
361
|
+
d ? d.setData(i.value, !0) : s();
|
|
362
|
+
}), mt(() => d?.destroy()), nt(xt, {
|
|
363
|
+
data: i,
|
|
364
|
+
update: (a) => l.component = a,
|
|
365
|
+
destroy: () => l.component = void 0
|
|
366
|
+
}), nt(Xt, {
|
|
367
|
+
data: i,
|
|
368
|
+
update: (a) => l.tooltip = a,
|
|
369
|
+
destroy: () => {
|
|
370
|
+
l.tooltip = void 0;
|
|
371
|
+
}
|
|
372
|
+
}), nt(Vt, {
|
|
373
|
+
data: i,
|
|
374
|
+
update: (a) => l.annotations = a,
|
|
375
|
+
destroy: () => {
|
|
376
|
+
l.annotations = void 0;
|
|
377
|
+
}
|
|
378
|
+
}), e({
|
|
379
|
+
component: d
|
|
380
|
+
}), (a, m) => (vt(), bt("div", {
|
|
381
|
+
"data-vis-single-container": "",
|
|
382
|
+
ref_key: "elRef",
|
|
383
|
+
ref: t,
|
|
384
|
+
class: "unovis-single-container"
|
|
385
|
+
}, [
|
|
386
|
+
Tt(a.$slots, "default")
|
|
387
|
+
], 512));
|
|
388
|
+
}
|
|
389
|
+
}), ve = { "data-vis-component": "" }, we = /* @__PURE__ */ ht({
|
|
390
|
+
__name: "index",
|
|
391
|
+
props: {
|
|
392
|
+
id: { type: Function },
|
|
393
|
+
value: {},
|
|
394
|
+
angleRange: {},
|
|
395
|
+
padAngle: {},
|
|
396
|
+
sortFunction: { type: Function },
|
|
397
|
+
cornerRadius: {},
|
|
398
|
+
color: {},
|
|
399
|
+
radius: {},
|
|
400
|
+
arcWidth: {},
|
|
401
|
+
centralLabel: {},
|
|
402
|
+
centralSubLabel: {},
|
|
403
|
+
centralSubLabelWrap: { type: Boolean },
|
|
404
|
+
showEmptySegments: { type: Boolean },
|
|
405
|
+
emptySegmentAngle: {},
|
|
406
|
+
showBackground: { type: Boolean },
|
|
407
|
+
backgroundAngleRange: {},
|
|
408
|
+
centralLabelOffsetX: {},
|
|
409
|
+
centralLabelOffsetY: {},
|
|
410
|
+
duration: {},
|
|
411
|
+
events: {},
|
|
412
|
+
attributes: {},
|
|
413
|
+
data: {}
|
|
414
|
+
},
|
|
415
|
+
setup(u, { expose: e }) {
|
|
416
|
+
const n = zt(xt), i = u, r = Nt(() => n.data.value ?? i.data), d = At(i), l = pt();
|
|
417
|
+
return Wt(() => {
|
|
418
|
+
Gt(() => {
|
|
419
|
+
var t;
|
|
420
|
+
l.value = new Ct(d.value), (t = l.value) == null || t.setData(r.value), n.update(l.value);
|
|
421
|
+
});
|
|
422
|
+
}), mt(() => {
|
|
423
|
+
var t;
|
|
424
|
+
(t = l.value) == null || t.destroy(), n.destroy();
|
|
425
|
+
}), lt(d, (t, s) => {
|
|
426
|
+
var a;
|
|
427
|
+
qt(t, s) || (a = l.value) == null || a.setConfig(d.value);
|
|
428
|
+
}), lt(r, () => {
|
|
429
|
+
var t;
|
|
430
|
+
(t = l.value) == null || t.setData(r.value);
|
|
431
|
+
}), e({
|
|
432
|
+
component: l
|
|
433
|
+
}), (t, s) => (vt(), bt("div", ve));
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
export {
|
|
437
|
+
we as E,
|
|
438
|
+
Se as b
|
|
439
|
+
};
|