@campus-admin/ui 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/basic/icons.d.ts +3 -0
- package/dist/components/overlay/index.d.ts +2 -2
- package/dist/index.js +481 -470
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,9 +13,9 @@ import "element-plus/es/components/card/style/css";
|
|
|
13
13
|
import "element-plus/es/components/tag/style/css";
|
|
14
14
|
import "element-plus/es/components/icon/style/css";
|
|
15
15
|
import { Fragment as N, Teleport as Ft, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createSlots as It, createTextVNode as z, createVNode as B, defineAsyncComponent as Lt, defineComponent as V, guardReactiveProps as Rt, nextTick as zt, normalizeClass as H, normalizeProps as Bt, normalizeStyle as U, onActivated as Vt, onBeforeUnmount as Ht, onDeactivated as Ut, onMounted as Wt, openBlock as W, reactive as Gt, ref as G, renderList as K, renderSlot as q, resolveDynamicComponent as Kt, shallowRef as qt, toDisplayString as J, unref as Y, useId as Jt, useSlots as Yt, vShow as Xt, watch as Zt, withCtx as X, withDirectives as Qt, withModifiers as $t } from "vue";
|
|
16
|
-
import { ArrowDown as en, ArrowLeft as tn,
|
|
17
|
-
import
|
|
18
|
-
import
|
|
16
|
+
import { ArrowDown as en, ArrowLeft as tn, ArrowRight as nn, Bell as rn, Brush as an, ChatDotRound as on, Check as sn, Close as cn, Collection as ln, DataAnalysis as un, Delete as dn, Document as fn, Download as pn, EditPen as mn, Expand as hn, Files as gn, Fold as _n, Folder as vn, FullScreen as yn, Grid as bn, Hide as xn, Histogram as Sn, HomeFilled as Cn, Location as wn, Menu as Tn, Message as En, Monitor as Dn, Moon as On, MoreFilled as kn, Odometer as An, Paperclip as jn, Phone as Mn, Picture as Nn, Plus as Pn, Promotion as Fn, Refresh as In, ScaleToOriginal as Ln, Search as Rn, Setting as zn, ShoppingBag as Bn, Star as Vn, Sunny as Hn, Tickets as Un, Top as Wn, User as Gn, VideoCamera as Kn, View as qn, Warning as Jn } from "@element-plus/icons-vue";
|
|
17
|
+
import Yn from "element-plus/es/locale/lang/en";
|
|
18
|
+
import Xn from "element-plus/es/locale/lang/zh-cn";
|
|
19
19
|
import "element-plus/es/components/config-provider/style/css";
|
|
20
20
|
import "element-plus/es/components/avatar/style/css";
|
|
21
21
|
import "element-plus/es/components/avatar-group/style/css";
|
|
@@ -45,11 +45,11 @@ import "element-plus/es/components/segmented/style/css";
|
|
|
45
45
|
import "element-plus/es/components/statistic/style/css";
|
|
46
46
|
import "element-plus/es/components/countdown/style/css";
|
|
47
47
|
import "element-plus/es/components/check-tag/style/css";
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
48
|
+
import Zn from "markdown-it";
|
|
49
|
+
import Qn from "markdown-it-anchor";
|
|
50
|
+
import $n from "markdown-it-footnote";
|
|
51
|
+
import er from "markdown-it-container";
|
|
52
|
+
import tr from "dompurify";
|
|
53
53
|
import "element-plus/es/components/popover/style/css";
|
|
54
54
|
import "element-plus/es/components/popconfirm/style/css";
|
|
55
55
|
import "element-plus/es/components/tooltip/style/css";
|
|
@@ -119,7 +119,7 @@ import "element-plus/es/components/table-v2/style/css";
|
|
|
119
119
|
import "element-plus/es/components/table/style/css";
|
|
120
120
|
import "element-plus/es/components/table-column/style/css";
|
|
121
121
|
// packages/ui/src/shared/registry.ts
|
|
122
|
-
function
|
|
122
|
+
function nr(...e) {
|
|
123
123
|
let t = {};
|
|
124
124
|
for (let n of e) for (let [e, r] of Object.entries(n)) {
|
|
125
125
|
if (e in t) throw Error(`[campus/ui] 组件名重复:${e}(所有域、所有分类的组件名必须唯一)`);
|
|
@@ -128,7 +128,7 @@ function $n(...e) {
|
|
|
128
128
|
return t;
|
|
129
129
|
}
|
|
130
130
|
// packages/ui/src/components/basic/icon-font.ts
|
|
131
|
-
async function
|
|
131
|
+
async function rr(e) {
|
|
132
132
|
let t = getComputedStyle(e, "::before");
|
|
133
133
|
if (!t.content || [
|
|
134
134
|
"none",
|
|
@@ -143,60 +143,63 @@ async function er(e) {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
// packages/ui/src/components/basic/icons.ts
|
|
146
|
-
var
|
|
147
|
-
home:
|
|
148
|
-
chart:
|
|
149
|
-
document:
|
|
150
|
-
grid:
|
|
151
|
-
setting:
|
|
152
|
-
user:
|
|
153
|
-
bell:
|
|
154
|
-
edit:
|
|
155
|
-
monitor:
|
|
156
|
-
brush:
|
|
157
|
-
collection:
|
|
158
|
-
warning:
|
|
159
|
-
files:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
146
|
+
var ir = {
|
|
147
|
+
home: Cn,
|
|
148
|
+
chart: un,
|
|
149
|
+
document: fn,
|
|
150
|
+
grid: bn,
|
|
151
|
+
setting: zn,
|
|
152
|
+
user: Gn,
|
|
153
|
+
bell: rn,
|
|
154
|
+
edit: mn,
|
|
155
|
+
monitor: Dn,
|
|
156
|
+
brush: an,
|
|
157
|
+
collection: ln,
|
|
158
|
+
warning: Jn,
|
|
159
|
+
files: gn,
|
|
160
|
+
folder: vn,
|
|
161
|
+
shoppingBag: Bn,
|
|
162
|
+
tickets: Un,
|
|
163
|
+
histogram: Sn,
|
|
164
|
+
menu: Tn,
|
|
165
|
+
message: En,
|
|
166
|
+
gauge: An,
|
|
167
|
+
search: Rn,
|
|
168
|
+
check: sn,
|
|
169
|
+
delete: dn,
|
|
170
|
+
star: Vn,
|
|
171
|
+
plus: Pn,
|
|
172
|
+
download: pn,
|
|
173
|
+
fullscreen: yn,
|
|
174
|
+
refresh: In,
|
|
175
|
+
exitFullscreen: Ln,
|
|
176
|
+
chat: on,
|
|
177
|
+
sunny: Hn,
|
|
178
|
+
moon: On,
|
|
179
|
+
expand: hn,
|
|
180
|
+
fold: _n,
|
|
181
|
+
hide: xn,
|
|
182
|
+
view: qn,
|
|
181
183
|
arrowDown: en,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
right: nn,
|
|
185
|
+
close: cn,
|
|
186
|
+
location: wn,
|
|
184
187
|
back: tn,
|
|
185
|
-
more:
|
|
186
|
-
attachment:
|
|
187
|
-
phone:
|
|
188
|
-
image:
|
|
189
|
-
send:
|
|
190
|
-
pin:
|
|
191
|
-
video:
|
|
192
|
-
},
|
|
188
|
+
more: kn,
|
|
189
|
+
attachment: jn,
|
|
190
|
+
phone: Mn,
|
|
191
|
+
image: Nn,
|
|
192
|
+
send: Fn,
|
|
193
|
+
pin: Wn,
|
|
194
|
+
video: Kn
|
|
195
|
+
}, ar = /*#__PURE__*/ l(/* @__PURE__ */ V({
|
|
193
196
|
__name: "CaIcon",
|
|
194
197
|
props: {
|
|
195
198
|
name: {},
|
|
196
199
|
fallback: {}
|
|
197
200
|
},
|
|
198
201
|
setup(e) {
|
|
199
|
-
let t = e, n = P(() => t.name && Object.hasOwn(
|
|
202
|
+
let t = e, n = P(() => t.name && Object.hasOwn(ir, t.name) ? ir[t.name] : void 0), r = P(() => !n.value && !!t.name?.trim()), i = G(), a = G(!1), o = P(() => n.value ?? (!a.value && t.fallback ? ir[t.fallback] : void 0));
|
|
200
203
|
return Wt(() => {
|
|
201
204
|
Zt(() => t.name, async (e, t, n) => {
|
|
202
205
|
a.value = !1;
|
|
@@ -204,7 +207,7 @@ var tr = {
|
|
|
204
207
|
if (n(() => {
|
|
205
208
|
o = !0;
|
|
206
209
|
}), !r.value || !i.value) return;
|
|
207
|
-
let s = await
|
|
210
|
+
let s = await rr(i.value);
|
|
208
211
|
o || (a.value = s);
|
|
209
212
|
}, {
|
|
210
213
|
immediate: !0,
|
|
@@ -225,10 +228,10 @@ var tr = {
|
|
|
225
228
|
_: 3
|
|
226
229
|
}, 512)), [[Xt, o.value || a.value || !e.name]]);
|
|
227
230
|
}
|
|
228
|
-
}), [["__scopeId", "data-v-b4ddb60c"]]),
|
|
231
|
+
}), [["__scopeId", "data-v-b4ddb60c"]]), or = {
|
|
229
232
|
key: 1,
|
|
230
233
|
class: "ca-page-actions"
|
|
231
|
-
},
|
|
234
|
+
}, sr = /* @__PURE__ */ V({
|
|
232
235
|
__name: "CaPageActions",
|
|
233
236
|
setup(e) {
|
|
234
237
|
let t = G(null), n = G(!0);
|
|
@@ -237,19 +240,19 @@ var tr = {
|
|
|
237
240
|
}), Vt(() => n.value = !0), Ut(() => n.value = !1), (e, r) => t.value ? (W(), F(Ft, {
|
|
238
241
|
key: 0,
|
|
239
242
|
to: t.value
|
|
240
|
-
}, [n.value ? q(e.$slots, "default", {}, void 0, void 0, 0) : I("v-if", !0)], 8, ["to"])) : (W(), L("div",
|
|
243
|
+
}, [n.value ? q(e.$slots, "default", {}, void 0, void 0, 0) : I("v-if", !0)], 8, ["to"])) : (W(), L("div", or, [q(e.$slots, "default")]));
|
|
241
244
|
}
|
|
242
|
-
}),
|
|
243
|
-
CaLink:
|
|
244
|
-
CaText:
|
|
245
|
-
CaScrollbar:
|
|
246
|
-
CaDivider:
|
|
247
|
-
CaWatermark:
|
|
248
|
-
CaAlert:
|
|
249
|
-
CaCard:
|
|
250
|
-
CaIcon:
|
|
251
|
-
CaPageActions:
|
|
252
|
-
CaTag:
|
|
245
|
+
}), cr = e(f), lr = e(E), ur = e(yt), dr = e(Ne), fr = e(bt), pr = e($e), mr = e(he), hr = e(Nt), gr = {
|
|
246
|
+
CaLink: dr,
|
|
247
|
+
CaText: fr,
|
|
248
|
+
CaScrollbar: pr,
|
|
249
|
+
CaDivider: mr,
|
|
250
|
+
CaWatermark: hr,
|
|
251
|
+
CaAlert: cr,
|
|
252
|
+
CaCard: lr,
|
|
253
|
+
CaIcon: ar,
|
|
254
|
+
CaPageActions: sr,
|
|
255
|
+
CaTag: ur
|
|
253
256
|
};
|
|
254
257
|
// packages/ui/src/components/chart/chart-math.ts
|
|
255
258
|
function Z(e) {
|
|
@@ -259,25 +262,25 @@ function Q(e) {
|
|
|
259
262
|
let t = e.toFixed(2).replace(/\.?0+$/, "");
|
|
260
263
|
return t === "-0" || t === "" ? "0" : t;
|
|
261
264
|
}
|
|
262
|
-
function
|
|
265
|
+
function _r(e, t, n) {
|
|
263
266
|
return Math.min(n, Math.max(t, e));
|
|
264
267
|
}
|
|
265
|
-
function
|
|
268
|
+
function vr(e, t) {
|
|
266
269
|
let n = Math.floor(Math.log10(e)), r = e / 10 ** n, i;
|
|
267
270
|
return i = t ? r < 1.5 ? 1 : r < 3 ? 2 : r < 7 ? 5 : 10 : r <= 1 ? 1 : r <= 2 ? 2 : r <= 5 ? 5 : 10, i * 10 ** n;
|
|
268
271
|
}
|
|
269
|
-
function
|
|
272
|
+
function yr(e, t) {
|
|
270
273
|
let n = Math.max(0, -Math.floor(Math.log10(t)) + 2);
|
|
271
274
|
return Number(e.toFixed(Math.min(n, 12)));
|
|
272
275
|
}
|
|
273
|
-
function
|
|
276
|
+
function br(e, t, n = 5, r = !0) {
|
|
274
277
|
let i = Number.isFinite(e) ? e : 0, a = Number.isFinite(t) ? t : 1;
|
|
275
278
|
if (i > a && ([i, a] = [a, i]), r && (i = Math.min(i, 0), a = Math.max(a, 0)), i === a) {
|
|
276
279
|
let e = i === 0 ? 1 : Math.abs(i) * .1;
|
|
277
280
|
i = r && i >= 0 ? 0 : i - e, a += e;
|
|
278
281
|
}
|
|
279
|
-
let o = Math.max(2, Math.floor(n)), s =
|
|
280
|
-
for (let e = 0; e <= d; e++) u.push(
|
|
282
|
+
let o = Math.max(2, Math.floor(n)), s = vr(vr(a - i, !1) / (o - 1), !0), c = Math.floor(i / s) * s, l = Math.ceil(a / s) * s, u = [], d = Math.round((l - c) / s);
|
|
283
|
+
for (let e = 0; e <= d; e++) u.push(yr(c + e * s, s));
|
|
281
284
|
return {
|
|
282
285
|
min: u[0],
|
|
283
286
|
max: u[u.length - 1],
|
|
@@ -285,12 +288,12 @@ function _r(e, t, n = 5, r = !0) {
|
|
|
285
288
|
ticks: u
|
|
286
289
|
};
|
|
287
290
|
}
|
|
288
|
-
function
|
|
291
|
+
function xr(e, t, n, r) {
|
|
289
292
|
let i = t - e;
|
|
290
293
|
return i === 0 ? () => (n + r) / 2 : (t) => n + (t - e) / i * (r - n);
|
|
291
294
|
}
|
|
292
|
-
function
|
|
293
|
-
let i = Math.max(1, Math.floor(e)), a = (n - t) / i, o = a * (1 -
|
|
295
|
+
function Sr(e, t, n, r = .2) {
|
|
296
|
+
let i = Math.max(1, Math.floor(e)), a = (n - t) / i, o = a * (1 - _r(r, 0, .9));
|
|
294
297
|
return {
|
|
295
298
|
step: a,
|
|
296
299
|
bandwidth: o,
|
|
@@ -298,13 +301,13 @@ function yr(e, t, n, r = .2) {
|
|
|
298
301
|
center: (e) => t + e * a + a / 2
|
|
299
302
|
};
|
|
300
303
|
}
|
|
301
|
-
function
|
|
304
|
+
function Cr(e, t, n) {
|
|
302
305
|
if (e <= 0) return [];
|
|
303
306
|
let r = Math.max(1, Math.floor(t / Math.max(1, n))), i = Math.max(1, Math.ceil(e / r)), a = [];
|
|
304
307
|
for (let t = 0; t < e; t += i) a.push(t);
|
|
305
308
|
return a;
|
|
306
309
|
}
|
|
307
|
-
function
|
|
310
|
+
function wr(e, t) {
|
|
308
311
|
if (!e.length) return -1;
|
|
309
312
|
let n = 0, r = e.length - 1;
|
|
310
313
|
for (; n < r;) {
|
|
@@ -313,12 +316,12 @@ function xr(e, t) {
|
|
|
313
316
|
}
|
|
314
317
|
return n > 0 && t - e[n - 1] <= e[n] - t ? n - 1 : n;
|
|
315
318
|
}
|
|
316
|
-
function
|
|
319
|
+
function Tr(e) {
|
|
317
320
|
let t = [], n = [];
|
|
318
321
|
for (let r of e) r && Z(r.x) && Z(r.y) ? n.push(r) : n.length && (t.push(n), n = []);
|
|
319
322
|
return n.length && t.push(n), t;
|
|
320
323
|
}
|
|
321
|
-
function
|
|
324
|
+
function Er(e) {
|
|
322
325
|
let t = e.length, n = [], r = [];
|
|
323
326
|
for (let i = 0; i < t - 1; i++) n.push(e[i + 1].x - e[i].x), r.push(n[i] === 0 ? 0 : (e[i + 1].y - e[i].y) / n[i]);
|
|
324
327
|
let i = Array(t);
|
|
@@ -337,26 +340,26 @@ function Cr(e) {
|
|
|
337
340
|
}
|
|
338
341
|
return i;
|
|
339
342
|
}
|
|
340
|
-
function
|
|
343
|
+
function Dr(e, t) {
|
|
341
344
|
if (e.length < 2) return "";
|
|
342
345
|
if (!t || e.length === 2) return e.slice(1).map((e) => `L${Q(e.x)} ${Q(e.y)}`).join("");
|
|
343
|
-
let n =
|
|
346
|
+
let n = Er(e), r = "";
|
|
344
347
|
for (let t = 0; t < e.length - 1; t++) {
|
|
345
348
|
let i = e[t], a = e[t + 1], o = (a.x - i.x) / 3;
|
|
346
349
|
r += `C${Q(i.x + o)} ${Q(i.y + n[t] * o)} ${Q(a.x - o)} ${Q(a.y - n[t + 1] * o)} ${Q(a.x)} ${Q(a.y)}`;
|
|
347
350
|
}
|
|
348
351
|
return r;
|
|
349
352
|
}
|
|
350
|
-
function
|
|
351
|
-
return
|
|
353
|
+
function Or(e, t = !1) {
|
|
354
|
+
return Tr(e).filter((e) => e.length >= 2).map((e) => `M${Q(e[0].x)} ${Q(e[0].y)}${Dr(e, t)}`).join("");
|
|
352
355
|
}
|
|
353
|
-
function
|
|
354
|
-
return
|
|
356
|
+
function kr(e, t, n = !1) {
|
|
357
|
+
return Tr(e).filter((e) => e.length >= 2).map((e) => {
|
|
355
358
|
let r = e[0], i = e[e.length - 1];
|
|
356
|
-
return `M${Q(r.x)} ${Q(t)}L${Q(r.x)} ${Q(r.y)}${
|
|
359
|
+
return `M${Q(r.x)} ${Q(t)}L${Q(r.x)} ${Q(r.y)}${Dr(e, n)}L${Q(i.x)} ${Q(t)}Z`;
|
|
357
360
|
}).join("");
|
|
358
361
|
}
|
|
359
|
-
function
|
|
362
|
+
function Ar(e) {
|
|
360
363
|
let t = Math.max(0, ...e.map((e) => e.length)), n = Array(t).fill(0), r = Array(t).fill(0);
|
|
361
364
|
return e.map((e) => Array.from({ length: t }, (t, i) => {
|
|
362
365
|
let a = e[i];
|
|
@@ -375,14 +378,14 @@ function Dr(e) {
|
|
|
375
378
|
};
|
|
376
379
|
}));
|
|
377
380
|
}
|
|
378
|
-
function
|
|
381
|
+
function jr(e) {
|
|
379
382
|
let t = Infinity, n = -Infinity;
|
|
380
383
|
for (let r of e) Z(r) && (r < t && (t = r), r > n && (n = r));
|
|
381
384
|
return t === Infinity ? null : [t, n];
|
|
382
385
|
}
|
|
383
|
-
function
|
|
386
|
+
function Mr(e, t, n, r, i, a) {
|
|
384
387
|
if (n <= 0 || r <= 0) return "";
|
|
385
|
-
let o =
|
|
388
|
+
let o = _r(i, 0, Math.min(n, r) / 2), s = e + n, c = t + r;
|
|
386
389
|
if (o === 0) return `M${Q(e)} ${Q(t)}H${Q(s)}V${Q(c)}H${Q(e)}Z`;
|
|
387
390
|
switch (a) {
|
|
388
391
|
case "top": return `M${Q(e)} ${Q(c)}V${Q(t + o)}Q${Q(e)} ${Q(t)} ${Q(e + o)} ${Q(t)}H${Q(s - o)}Q${Q(s)} ${Q(t)} ${Q(s)} ${Q(t + o)}V${Q(c)}Z`;
|
|
@@ -391,8 +394,8 @@ function kr(e, t, n, r, i, a) {
|
|
|
391
394
|
case "left": return `M${Q(s)} ${Q(t)}H${Q(e + o)}Q${Q(e)} ${Q(t)} ${Q(e)} ${Q(t + o)}V${Q(c - o)}Q${Q(e)} ${Q(c)} ${Q(e + o)} ${Q(c)}H${Q(s)}Z`;
|
|
392
395
|
}
|
|
393
396
|
}
|
|
394
|
-
var
|
|
395
|
-
function
|
|
397
|
+
var Nr = Math.PI * 2;
|
|
398
|
+
function Pr(e, t = 0, n = Nr) {
|
|
396
399
|
let r = e.map((e) => Z(e) && e > 0 ? e : 0), i = r.reduce((e, t) => e + t, 0);
|
|
397
400
|
if (i <= 0) return [];
|
|
398
401
|
let a = t;
|
|
@@ -413,11 +416,11 @@ function $(e, t, n, r) {
|
|
|
413
416
|
y: t - n * Math.cos(r)
|
|
414
417
|
};
|
|
415
418
|
}
|
|
416
|
-
function
|
|
419
|
+
function Fr(e, t, n, r, i, a) {
|
|
417
420
|
let o = a - i;
|
|
418
421
|
if (o <= 0 || n <= 0) return "";
|
|
419
|
-
let s =
|
|
420
|
-
if (o >=
|
|
422
|
+
let s = _r(r, 0, n);
|
|
423
|
+
if (o >= Nr - 1e-6) {
|
|
421
424
|
let r = $(e, t, n, i), a = $(e, t, n, i + Math.PI), o = `M${Q(r.x)} ${Q(r.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(a.x)} ${Q(a.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(r.x)} ${Q(r.y)}Z`;
|
|
422
425
|
if (s > 0) {
|
|
423
426
|
let n = $(e, t, s, i), r = $(e, t, s, i + Math.PI);
|
|
@@ -430,17 +433,17 @@ function Mr(e, t, n, r, i, a) {
|
|
|
430
433
|
let d = $(e, t, s, a), f = $(e, t, s, i);
|
|
431
434
|
return `M${Q(l.x)} ${Q(l.y)}A${Q(n)} ${Q(n)} 0 ${c} 1 ${Q(u.x)} ${Q(u.y)}L${Q(d.x)} ${Q(d.y)}A${Q(s)} ${Q(s)} 0 ${c} 0 ${Q(f.x)} ${Q(f.y)}Z`;
|
|
432
435
|
}
|
|
433
|
-
function
|
|
436
|
+
function Ir(e, t, n, r, i) {
|
|
434
437
|
let a = i - r;
|
|
435
438
|
if (a <= 0 || n <= 0) return "";
|
|
436
|
-
if (a >=
|
|
439
|
+
if (a >= Nr - 1e-6) {
|
|
437
440
|
let i = $(e, t, n, r), a = $(e, t, n, r + Math.PI);
|
|
438
441
|
return `M${Q(i.x)} ${Q(i.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(a.x)} ${Q(a.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(i.x)} ${Q(i.y)}`;
|
|
439
442
|
}
|
|
440
443
|
let o = $(e, t, n, r), s = $(e, t, n, i);
|
|
441
444
|
return `M${Q(o.x)} ${Q(o.y)}A${Q(n)} ${Q(n)} 0 ${+(a > Math.PI)} 1 ${Q(s.x)} ${Q(s.y)}`;
|
|
442
445
|
}
|
|
443
|
-
function
|
|
446
|
+
function Lr(e) {
|
|
444
447
|
return e === "gauge" ? {
|
|
445
448
|
start: -3 * Math.PI / 4,
|
|
446
449
|
sweep: 3 * Math.PI / 2
|
|
@@ -449,34 +452,34 @@ function Pr(e) {
|
|
|
449
452
|
sweep: Math.PI
|
|
450
453
|
} : {
|
|
451
454
|
start: 0,
|
|
452
|
-
sweep:
|
|
455
|
+
sweep: Nr
|
|
453
456
|
};
|
|
454
457
|
}
|
|
455
|
-
function
|
|
458
|
+
function Rr(e, t, n) {
|
|
456
459
|
if (!t?.length) return n;
|
|
457
460
|
let r = [...t].sort((e, t) => e.at - t.at), i = n;
|
|
458
461
|
for (let t of r) e >= t.at && (i = t.color);
|
|
459
462
|
return i;
|
|
460
463
|
}
|
|
461
|
-
function
|
|
462
|
-
return !Z(e) || !Z(t) || t <= 0 ? 0 :
|
|
464
|
+
function zr(e, t) {
|
|
465
|
+
return !Z(e) || !Z(t) || t <= 0 ? 0 : _r(e / t * 100, 0, 100);
|
|
463
466
|
}
|
|
464
|
-
function
|
|
467
|
+
function Br(e) {
|
|
465
468
|
return Z(e) ? e.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "";
|
|
466
469
|
}
|
|
467
|
-
var
|
|
470
|
+
var Vr = [[1e8, "亿"], [1e4, "万"]], Hr = [
|
|
468
471
|
[1e9, "B"],
|
|
469
472
|
[1e6, "M"],
|
|
470
473
|
[1e3, "K"]
|
|
471
474
|
];
|
|
472
|
-
function
|
|
475
|
+
function Ur(e, t = Vr) {
|
|
473
476
|
if (!Z(e)) return "";
|
|
474
477
|
let n = Math.abs(e);
|
|
475
478
|
for (let [r, i] of t) if (n >= r) return `${Number((e / r).toFixed(2))}${i}`;
|
|
476
|
-
return
|
|
479
|
+
return Br(e);
|
|
477
480
|
}
|
|
478
|
-
function
|
|
479
|
-
let t =
|
|
481
|
+
function Wr(e) {
|
|
482
|
+
let t = jr(e);
|
|
480
483
|
if (!t) return null;
|
|
481
484
|
let n = -1;
|
|
482
485
|
return e.forEach((e, t) => {
|
|
@@ -489,10 +492,10 @@ function Vr(e) {
|
|
|
489
492
|
lastIndex: n
|
|
490
493
|
};
|
|
491
494
|
}
|
|
492
|
-
function
|
|
495
|
+
function Gr(e) {
|
|
493
496
|
return `${Number((e * 100).toFixed(1))}%`;
|
|
494
497
|
}
|
|
495
|
-
function
|
|
498
|
+
function Kr(e) {
|
|
496
499
|
let t = G(), n = G(0), r;
|
|
497
500
|
return Wt(() => {
|
|
498
501
|
let e = t.value;
|
|
@@ -508,7 +511,7 @@ function Ur(e) {
|
|
|
508
511
|
})
|
|
509
512
|
};
|
|
510
513
|
}
|
|
511
|
-
function
|
|
514
|
+
function qr() {
|
|
512
515
|
let e = G(/* @__PURE__ */ new Set());
|
|
513
516
|
function t(t, n) {
|
|
514
517
|
let r = new Set(e.value);
|
|
@@ -519,11 +522,11 @@ function Wr() {
|
|
|
519
522
|
toggle: t
|
|
520
523
|
};
|
|
521
524
|
}
|
|
522
|
-
function
|
|
525
|
+
function Jr(e, t) {
|
|
523
526
|
return t ?? `var(--ca-chart-${e % 8 + 1})`;
|
|
524
527
|
}
|
|
525
528
|
// packages/ui/src/components/chart/parts/ChartLegend.vue?vue&type=script&setup=true&lang.ts
|
|
526
|
-
var
|
|
529
|
+
var Yr = { class: "ca-chart__legend" }, Xr = /* @__PURE__ */ V({
|
|
527
530
|
__name: "ChartLegend",
|
|
528
531
|
props: {
|
|
529
532
|
items: {},
|
|
@@ -532,7 +535,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
532
535
|
},
|
|
533
536
|
emits: ["toggle"],
|
|
534
537
|
setup(e) {
|
|
535
|
-
return (t, n) => (W(), L("ul",
|
|
538
|
+
return (t, n) => (W(), L("ul", Yr, [(W(!0), L(N, null, K(e.items, (n, r) => (W(), L("li", { key: r }, [(W(), F(Kt(e.interactive ? "button" : "span"), {
|
|
536
539
|
class: H(["ca-chart__legend-item", { "is-off": n.off }]),
|
|
537
540
|
type: e.interactive ? "button" : void 0,
|
|
538
541
|
"aria-pressed": e.interactive ? !n.off : void 0,
|
|
@@ -550,7 +553,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
550
553
|
"onClick"
|
|
551
554
|
]))]))), 128))]));
|
|
552
555
|
}
|
|
553
|
-
}),
|
|
556
|
+
}), Zr = ["role"], Qr = /* @__PURE__ */ V({
|
|
554
557
|
__name: "ChartStatus",
|
|
555
558
|
props: {
|
|
556
559
|
loading: { type: Boolean },
|
|
@@ -562,9 +565,9 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
562
565
|
key: 0,
|
|
563
566
|
class: "ca-chart__status",
|
|
564
567
|
role: e.loading ? "status" : void 0
|
|
565
|
-
}, J(e.loading ? Y(t)("campus.chart.loading") : Y(t)("campus.chart.empty")), 9,
|
|
568
|
+
}, J(e.loading ? Y(t)("campus.chart.loading") : Y(t)("campus.chart.empty")), 9, Zr)) : I("v-if", !0);
|
|
566
569
|
}
|
|
567
|
-
}),
|
|
570
|
+
}), $r = { class: "ca-chart__sr" }, ei = { key: 0 }, ti = { scope: "row" }, ni = /* @__PURE__ */ V({
|
|
568
571
|
__name: "ChartTable",
|
|
569
572
|
props: {
|
|
570
573
|
caption: {},
|
|
@@ -572,19 +575,19 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
572
575
|
rows: {}
|
|
573
576
|
},
|
|
574
577
|
setup(e) {
|
|
575
|
-
return (t, n) => (W(), L("div",
|
|
576
|
-
e.caption ? (W(), L("caption",
|
|
578
|
+
return (t, n) => (W(), L("div", $r, [R("table", null, [
|
|
579
|
+
e.caption ? (W(), L("caption", ei, J(e.caption), 1)) : I("v-if", !0),
|
|
577
580
|
R("thead", null, [R("tr", null, [(W(!0), L(N, null, K(e.head, (e, t) => (W(), L("th", {
|
|
578
581
|
key: t,
|
|
579
582
|
scope: "col"
|
|
580
583
|
}, J(e), 1))), 128))])]),
|
|
581
|
-
R("tbody", null, [(W(!0), L(N, null, K(e.rows, (e, t) => (W(), L("tr", { key: t }, [R("th",
|
|
584
|
+
R("tbody", null, [(W(!0), L(N, null, K(e.rows, (e, t) => (W(), L("tr", { key: t }, [R("th", ti, J(e[0]), 1), (W(!0), L(N, null, K(e.slice(1), (e, t) => (W(), L("td", { key: t }, J(e), 1))), 128))]))), 128))])
|
|
582
585
|
])]));
|
|
583
586
|
}
|
|
584
|
-
}),
|
|
587
|
+
}), ri = {
|
|
585
588
|
key: 0,
|
|
586
589
|
class: "ca-chart__tip-title"
|
|
587
|
-
},
|
|
590
|
+
}, ii = { class: "ca-chart__tip-name" }, ai = { class: "ca-chart__tip-value" }, oi = /* @__PURE__ */ V({
|
|
588
591
|
__name: "ChartTooltip",
|
|
589
592
|
props: {
|
|
590
593
|
x: {},
|
|
@@ -601,7 +604,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
601
604
|
top: `${e.y}px`,
|
|
602
605
|
transform: e.x > e.width / 2 ? "translateX(calc(-100% - 12px))" : "translateX(12px)"
|
|
603
606
|
})
|
|
604
|
-
}, [e.title ? (W(), L("div",
|
|
607
|
+
}, [e.title ? (W(), L("div", ri, J(e.title), 1)) : I("v-if", !0), (W(!0), L(N, null, K(e.rows, (e, t) => (W(), L("div", {
|
|
605
608
|
key: t,
|
|
606
609
|
class: "ca-chart__tip-row"
|
|
607
610
|
}, [
|
|
@@ -609,35 +612,35 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
609
612
|
class: "ca-chart__key",
|
|
610
613
|
style: U({ "--key": e.color })
|
|
611
614
|
}, null, 4),
|
|
612
|
-
R("span",
|
|
613
|
-
R("span",
|
|
615
|
+
R("span", ii, J(e.name), 1),
|
|
616
|
+
R("span", ai, J(e.value), 1)
|
|
614
617
|
]))), 128))], 4));
|
|
615
618
|
}
|
|
616
|
-
}),
|
|
619
|
+
}), si = ["aria-busy"], ci = { class: "ca-chart__canvas" }, li = [
|
|
617
620
|
"aria-label",
|
|
618
621
|
"width",
|
|
619
622
|
"height",
|
|
620
623
|
"viewBox"
|
|
621
|
-
],
|
|
624
|
+
], ui = [
|
|
622
625
|
"x1",
|
|
623
626
|
"x2",
|
|
624
627
|
"y1",
|
|
625
628
|
"y2"
|
|
626
|
-
],
|
|
629
|
+
], di = ["x", "y"], fi = [
|
|
627
630
|
"x1",
|
|
628
631
|
"x2",
|
|
629
632
|
"y1",
|
|
630
633
|
"y2"
|
|
631
|
-
],
|
|
634
|
+
], pi = [
|
|
632
635
|
"x",
|
|
633
636
|
"y",
|
|
634
637
|
"text-anchor"
|
|
635
|
-
],
|
|
638
|
+
], mi = [
|
|
636
639
|
"x1",
|
|
637
640
|
"x2",
|
|
638
641
|
"y1",
|
|
639
642
|
"y2"
|
|
640
|
-
],
|
|
643
|
+
], hi = { class: "ca-chart__reveal" }, gi = ["d"], _i = ["d"], vi = { class: "ca-chart__fade" }, yi = ["cx", "cy"], bi = ["cx", "cy"], xi = 400, Si = /* @__PURE__ */ V({
|
|
641
644
|
__name: "CaLineChart",
|
|
642
645
|
props: {
|
|
643
646
|
categories: {},
|
|
@@ -672,14 +675,14 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
672
675
|
}
|
|
673
676
|
},
|
|
674
677
|
setup(e) {
|
|
675
|
-
let t = e, n = s(), { el: r, width: i } =
|
|
678
|
+
let t = e, n = s(), { el: r, width: i } = Kr(() => t.width), { hidden: a, toggle: o } = qr(), c = P(() => t.categories.length), l = P(() => t.series.map((e, t) => ({
|
|
676
679
|
index: t,
|
|
677
680
|
name: e.name,
|
|
678
681
|
data: e.data.slice(0, c.value),
|
|
679
|
-
color:
|
|
680
|
-
}))), u = P(() => l.value.filter((e) => !a.value.has(e.index))), d = P(() => c.value > 0 && l.value.some((e) =>
|
|
681
|
-
let e =
|
|
682
|
-
return
|
|
682
|
+
color: Jr(t, e.color)
|
|
683
|
+
}))), u = P(() => l.value.filter((e) => !a.value.has(e.index))), d = P(() => c.value > 0 && l.value.some((e) => jr(e.data))), f = (e) => (t.valueFormatter ?? Br)(e), p = P(() => n("campus.chart.compact") === "latin" ? Hr : Vr), m = (e) => (t.yFormatter ?? ((e) => Ur(e, p.value)))(e), h = P(() => {
|
|
684
|
+
let e = jr(u.value.flatMap((e) => e.data)) ?? [0, 1];
|
|
685
|
+
return br(t.yMin ?? e[0], t.yMax ?? e[1], 5, t.area || t.zero);
|
|
683
686
|
}), g = P(() => h.value.ticks.map((e) => ({
|
|
684
687
|
tick: e,
|
|
685
688
|
text: m(e)
|
|
@@ -687,12 +690,12 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
687
690
|
top: 12,
|
|
688
691
|
right: 16,
|
|
689
692
|
bottom: 28
|
|
690
|
-
}, y = P(() => Math.max(10, i.value - _.value - v.right)), b = P(() => Math.max(10, t.height - v.top - v.bottom)), x = P(() =>
|
|
691
|
-
let e =
|
|
693
|
+
}, y = P(() => Math.max(10, i.value - _.value - v.right)), b = P(() => Math.max(10, t.height - v.top - v.bottom)), x = P(() => xr(h.value.min, h.value.max, v.top + b.value, v.top)), S = P(() => {
|
|
694
|
+
let e = Sr(c.value, _.value, _.value + y.value, 0);
|
|
692
695
|
return Array.from({ length: c.value }, (t, n) => e.center(n));
|
|
693
696
|
}), C = P(() => x.value(Math.max(h.value.min, Math.min(0, h.value.max)))), w = P(() => {
|
|
694
697
|
let e = Math.max(1, ...t.categories.map((e) => e.length));
|
|
695
|
-
return
|
|
698
|
+
return Cr(c.value, y.value, Math.max(40, e * 7 + 16)).map((e) => {
|
|
696
699
|
let n = S.value[e], r = n - _.value < 20 ? "start" : i.value - n < 20 ? "end" : "middle";
|
|
697
700
|
return {
|
|
698
701
|
i: e,
|
|
@@ -708,15 +711,15 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
708
711
|
} : null), r = e.data.reduce((e, t, n) => Z(t) ? n : e, -1);
|
|
709
712
|
return {
|
|
710
713
|
...e,
|
|
711
|
-
line:
|
|
712
|
-
area: t.area ?
|
|
714
|
+
line: Or(n, t.smooth),
|
|
715
|
+
area: t.area ? kr(n, C.value, t.smooth) : "",
|
|
713
716
|
end: r >= 0 ? n[r] : null,
|
|
714
717
|
points: n
|
|
715
718
|
};
|
|
716
719
|
})), E = G(-1);
|
|
717
720
|
function D(e) {
|
|
718
721
|
let t = e.currentTarget.getBoundingClientRect();
|
|
719
|
-
E.value =
|
|
722
|
+
E.value = wr(S.value, e.clientX - t.left);
|
|
720
723
|
}
|
|
721
724
|
function O(e) {
|
|
722
725
|
let t = c.value - 1, n = E.value;
|
|
@@ -753,7 +756,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
753
756
|
series: l.value.length
|
|
754
757
|
})];
|
|
755
758
|
for (let r of l.value.slice(0, 6)) {
|
|
756
|
-
let i =
|
|
759
|
+
let i = Wr(r.data);
|
|
757
760
|
i && e.push(n("campus.chart.summarySeries", {
|
|
758
761
|
name: r.name,
|
|
759
762
|
min: f(i.min),
|
|
@@ -763,7 +766,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
763
766
|
}));
|
|
764
767
|
}
|
|
765
768
|
return e.join(" ");
|
|
766
|
-
}), te = P(() => t.categories.slice(0,
|
|
769
|
+
}), te = P(() => t.categories.slice(0, xi).map((e, t) => [e, ...l.value.map((e) => Z(e.data[t]) ? f(e.data[t]) : "")])), ne = P(() => [n("campus.chart.category"), ...l.value.map((e) => e.name)]);
|
|
767
770
|
return (t, n) => (W(), L("div", {
|
|
768
771
|
ref_key: "el",
|
|
769
772
|
ref: r,
|
|
@@ -773,7 +776,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
773
776
|
}]),
|
|
774
777
|
"aria-busy": e.loading || void 0
|
|
775
778
|
}, [
|
|
776
|
-
A.value && d.value ? (W(), F(
|
|
779
|
+
A.value && d.value ? (W(), F(Xr, {
|
|
777
780
|
key: 0,
|
|
778
781
|
items: j.value,
|
|
779
782
|
shape: "line",
|
|
@@ -784,7 +787,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
784
787
|
class: "ca-chart__plot",
|
|
785
788
|
style: U({ height: `${e.height}px` })
|
|
786
789
|
}, [
|
|
787
|
-
R("div",
|
|
790
|
+
R("div", ci, [d.value ? (W(), L("svg", {
|
|
788
791
|
key: 0,
|
|
789
792
|
class: "ca-chart__svg",
|
|
790
793
|
role: "img",
|
|
@@ -808,13 +811,13 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
808
811
|
x2: _.value + y.value,
|
|
809
812
|
y1: x.value(e.tick),
|
|
810
813
|
y2: x.value(e.tick)
|
|
811
|
-
}, null, 10,
|
|
814
|
+
}, null, 10, ui), R("text", {
|
|
812
815
|
class: "ca-chart__tick",
|
|
813
816
|
x: _.value - 8,
|
|
814
817
|
y: x.value(e.tick),
|
|
815
818
|
dy: "0.32em",
|
|
816
819
|
"text-anchor": "end"
|
|
817
|
-
}, J(e.text), 9,
|
|
820
|
+
}, J(e.text), 9, di)], 64))), 128)),
|
|
818
821
|
I(" 有负值时,0 线单独加深,表示正负分界 "),
|
|
819
822
|
h.value.min < 0 ? (W(), L("line", {
|
|
820
823
|
key: 0,
|
|
@@ -823,7 +826,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
823
826
|
x2: _.value + y.value,
|
|
824
827
|
y1: x.value(0),
|
|
825
828
|
y2: x.value(0)
|
|
826
|
-
}, null, 8,
|
|
829
|
+
}, null, 8, fi)) : I("v-if", !0)
|
|
827
830
|
]),
|
|
828
831
|
R("g", null, [(W(!0), L(N, null, K(w.value, (e) => (W(), L("text", {
|
|
829
832
|
key: e.i,
|
|
@@ -831,7 +834,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
831
834
|
x: e.x,
|
|
832
835
|
y: v.top + b.value + 18,
|
|
833
836
|
"text-anchor": e.anchor
|
|
834
|
-
}, J(e.text), 9,
|
|
837
|
+
}, J(e.text), 9, pi))), 128))]),
|
|
835
838
|
I(" 悬停十字线:贴着最近的数据位置,读者只需要瞄准某个类目 "),
|
|
836
839
|
k.value ? (W(), L("line", {
|
|
837
840
|
key: 0,
|
|
@@ -840,35 +843,35 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
840
843
|
x2: k.value.x,
|
|
841
844
|
y1: v.top,
|
|
842
845
|
y2: v.top + b.value
|
|
843
|
-
}, null, 8,
|
|
846
|
+
}, null, 8, mi)) : I("v-if", !0),
|
|
844
847
|
I(" 数据 "),
|
|
845
|
-
R("g",
|
|
848
|
+
R("g", hi, [(W(!0), L(N, null, K(T.value, (e) => (W(), L(N, { key: e.index }, [e.area ? (W(), L("path", {
|
|
846
849
|
key: 0,
|
|
847
850
|
class: "ca-chart__area",
|
|
848
851
|
d: e.area,
|
|
849
852
|
style: U({ fill: e.color })
|
|
850
|
-
}, null, 12,
|
|
853
|
+
}, null, 12, gi)) : I("v-if", !0), R("path", {
|
|
851
854
|
class: "ca-chart__line",
|
|
852
855
|
d: e.line,
|
|
853
856
|
style: U({ stroke: e.color })
|
|
854
|
-
}, null, 12,
|
|
855
|
-
R("g",
|
|
857
|
+
}, null, 12, _i)], 64))), 128))]),
|
|
858
|
+
R("g", vi, [I(" 没有悬停时在每条线末端放一个点,帮助读出“最新值” "), k.value ? (W(!0), L(N, { key: 1 }, K(T.value, (e) => (W(), L(N, { key: e.index }, [e.points[E.value] ? (W(), L("circle", {
|
|
856
859
|
key: 0,
|
|
857
860
|
class: "ca-chart__dot",
|
|
858
861
|
cx: e.points[E.value].x,
|
|
859
862
|
cy: e.points[E.value].y,
|
|
860
863
|
r: "4.5",
|
|
861
864
|
style: U({ fill: e.color })
|
|
862
|
-
}, null, 12,
|
|
865
|
+
}, null, 12, bi)) : I("v-if", !0)], 64))), 128)) : (W(!0), L(N, { key: 0 }, K(T.value, (e) => Qt((W(), L("circle", {
|
|
863
866
|
key: e.index,
|
|
864
867
|
class: "ca-chart__dot",
|
|
865
868
|
cx: e.end?.x,
|
|
866
869
|
cy: e.end?.y,
|
|
867
870
|
r: "4",
|
|
868
871
|
style: U({ fill: e.color })
|
|
869
|
-
}, null, 12,
|
|
870
|
-
], 40,
|
|
871
|
-
k.value ? (W(), F(
|
|
872
|
+
}, null, 12, yi)), [[Xt, e.end]])), 128))])
|
|
873
|
+
], 40, li)) : I("v-if", !0)]),
|
|
874
|
+
k.value ? (W(), F(oi, {
|
|
872
875
|
key: 0,
|
|
873
876
|
x: k.value.x,
|
|
874
877
|
y: v.top,
|
|
@@ -882,12 +885,12 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
882
885
|
"title",
|
|
883
886
|
"rows"
|
|
884
887
|
])) : I("v-if", !0),
|
|
885
|
-
B(
|
|
888
|
+
B(Qr, {
|
|
886
889
|
loading: e.loading,
|
|
887
890
|
empty: !d.value && !e.loading
|
|
888
891
|
}, null, 8, ["loading", "empty"])
|
|
889
892
|
], 4),
|
|
890
|
-
d.value ? (W(), F(
|
|
893
|
+
d.value ? (W(), F(ni, {
|
|
891
894
|
key: 1,
|
|
892
895
|
caption: e.title,
|
|
893
896
|
head: ne.value,
|
|
@@ -897,33 +900,33 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
897
900
|
"head",
|
|
898
901
|
"rows"
|
|
899
902
|
])) : I("v-if", !0)
|
|
900
|
-
], 10,
|
|
903
|
+
], 10, si));
|
|
901
904
|
}
|
|
902
|
-
}),
|
|
905
|
+
}), Ci = ["aria-busy"], wi = { class: "ca-chart__canvas" }, Ti = [
|
|
903
906
|
"aria-label",
|
|
904
907
|
"width",
|
|
905
908
|
"height",
|
|
906
909
|
"viewBox"
|
|
907
|
-
],
|
|
910
|
+
], Ei = { key: 0 }, Di = [
|
|
908
911
|
"x1",
|
|
909
912
|
"x2",
|
|
910
913
|
"y1",
|
|
911
914
|
"y2"
|
|
912
|
-
],
|
|
915
|
+
], Oi = ["x", "y"], ki = { key: 1 }, Ai = [
|
|
913
916
|
"x1",
|
|
914
917
|
"x2",
|
|
915
918
|
"y1",
|
|
916
919
|
"y2"
|
|
917
|
-
],
|
|
920
|
+
], ji = ["x", "y"], Mi = ["x", "y"], Ni = ["x", "y"], Pi = [
|
|
918
921
|
"x",
|
|
919
922
|
"y",
|
|
920
923
|
"width",
|
|
921
924
|
"height"
|
|
922
|
-
],
|
|
925
|
+
], Fi = ["d"], Ii = { class: "ca-chart__fade" }, Li = [
|
|
923
926
|
"x",
|
|
924
927
|
"y",
|
|
925
928
|
"text-anchor"
|
|
926
|
-
],
|
|
929
|
+
], Ri = 2, zi = 4, Bi = 400, Vi = /* @__PURE__ */ V({
|
|
927
930
|
__name: "CaBarChart",
|
|
928
931
|
props: {
|
|
929
932
|
categories: {},
|
|
@@ -957,17 +960,17 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
957
960
|
}
|
|
958
961
|
},
|
|
959
962
|
setup(e) {
|
|
960
|
-
let t = e, n = s(), { el: r, width: i } =
|
|
963
|
+
let t = e, n = s(), { el: r, width: i } = Kr(() => t.width), { hidden: a, toggle: o } = qr(), c = P(() => t.categories.length), l = P(() => t.series.map((e, t) => ({
|
|
961
964
|
index: t,
|
|
962
965
|
name: e.name,
|
|
963
966
|
data: e.data.slice(0, c.value),
|
|
964
|
-
color:
|
|
965
|
-
}))), u = P(() => l.value.filter((e) => !a.value.has(e.index))), d = P(() => c.value > 0 && l.value.some((e) =>
|
|
967
|
+
color: Jr(t, e.color)
|
|
968
|
+
}))), u = P(() => l.value.filter((e) => !a.value.has(e.index))), d = P(() => c.value > 0 && l.value.some((e) => jr(e.data))), f = (e) => (t.valueFormatter ?? Br)(e), p = P(() => n("campus.chart.compact") === "latin" ? Hr : Vr), m = (e) => (t.yFormatter ?? ((e) => Ur(e, p.value)))(e), h = P(() => Ar(u.value.map((e) => e.data))), g = P(() => {
|
|
966
969
|
let e = [];
|
|
967
970
|
if (t.stacked) for (let t of h.value) for (let n of t) n && e.push(n.from, n.to);
|
|
968
971
|
else for (let t of u.value) for (let n of t.data) Z(n) && e.push(n);
|
|
969
|
-
let n =
|
|
970
|
-
return
|
|
972
|
+
let n = jr(e) ?? [0, 1];
|
|
973
|
+
return br(n[0], n[1], 5, !0);
|
|
971
974
|
}), _ = P(() => g.value.ticks.map((e) => ({
|
|
972
975
|
tick: e,
|
|
973
976
|
text: m(e)
|
|
@@ -979,14 +982,14 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
979
982
|
bottom: 28,
|
|
980
983
|
left: Math.max(32, Math.max(..._.value.map((e) => e.text.length)) * 7 + 14)
|
|
981
984
|
};
|
|
982
|
-
let n =
|
|
985
|
+
let n = _r(Math.max(1, ...t.categories.map((e) => e.length)) * 13 + 16, 48, Math.max(48, i.value * .4));
|
|
983
986
|
return {
|
|
984
987
|
top: e,
|
|
985
988
|
right: t.showValues ? 56 : 24,
|
|
986
989
|
bottom: 28,
|
|
987
990
|
left: n
|
|
988
991
|
};
|
|
989
|
-
}), y = P(() => Math.max(10, i.value - v.value.left - v.value.right)), b = P(() => Math.max(10, t.height - v.value.top - v.value.bottom)), x = P(() => t.horizontal ?
|
|
992
|
+
}), y = P(() => Math.max(10, i.value - v.value.left - v.value.right)), b = P(() => Math.max(10, t.height - v.value.top - v.value.bottom)), x = P(() => t.horizontal ? xr(g.value.min, g.value.max, v.value.left, v.value.left + y.value) : xr(g.value.min, g.value.max, v.value.top + b.value, v.value.top)), S = P(() => t.horizontal ? Sr(c.value, v.value.top, v.value.top + b.value, .3) : Sr(c.value, v.value.left, v.value.left + y.value, .3));
|
|
990
993
|
P(() => x.value(0));
|
|
991
994
|
function C(e) {
|
|
992
995
|
if (!t.horizontal) return e;
|
|
@@ -1000,13 +1003,13 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1000
1003
|
pos: S.value.center(t)
|
|
1001
1004
|
}));
|
|
1002
1005
|
let e = Math.max(1, ...t.categories.map((e) => e.length));
|
|
1003
|
-
return
|
|
1006
|
+
return Cr(c.value, y.value, Math.max(40, e * 7 + 16)).map((e) => ({
|
|
1004
1007
|
i: e,
|
|
1005
1008
|
text: t.categories[e],
|
|
1006
1009
|
pos: S.value.center(e)
|
|
1007
1010
|
}));
|
|
1008
1011
|
}), T = (e) => e.length * 6.5, E = P(() => {
|
|
1009
|
-
let e = [], n = [], r = u.value.length, i = t.barSize, a = t.stacked ? S.value.bandwidth : (S.value.bandwidth -
|
|
1012
|
+
let e = [], n = [], r = u.value.length, i = t.barSize, a = t.stacked ? S.value.bandwidth : (S.value.bandwidth - Ri * (r - 1)) / r, o = Math.max(1, Math.min(i, a)), s = t.stacked ? o : o * r + Ri * (r - 1), l = Array.from({ length: c.value }, (e, t) => {
|
|
1010
1013
|
let n = 0, r = 0;
|
|
1011
1014
|
for (let e of h.value) {
|
|
1012
1015
|
let i = e[t];
|
|
@@ -1021,19 +1024,19 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1021
1024
|
for (let u = 0; u < c.value; u++) {
|
|
1022
1025
|
let c = r.data[u];
|
|
1023
1026
|
if (!Z(c)) continue;
|
|
1024
|
-
let d = S.value.center(u) - s / 2 + (t.stacked ? 0 : i * (o +
|
|
1027
|
+
let d = S.value.center(u) - s / 2 + (t.stacked ? 0 : i * (o + Ri)), p = 0, m = c;
|
|
1025
1028
|
if (t.stacked) {
|
|
1026
1029
|
let e = h.value[i][u];
|
|
1027
1030
|
if (!e) continue;
|
|
1028
1031
|
p = e.from, m = e.to;
|
|
1029
1032
|
}
|
|
1030
|
-
let g = c >= 0, _ = t.stacked && p !== 0 ?
|
|
1033
|
+
let g = c >= 0, _ = t.stacked && p !== 0 ? Ri : 0, v = x.value(p), y = x.value(m), b = !t.stacked || (g ? m === l[u].top : m === l[u].bottom), C = b ? zi : 0, w, E;
|
|
1031
1034
|
if (t.horizontal) {
|
|
1032
1035
|
let e = Math.min(v, y) + (g ? _ : 0), t = Math.max(v, y) - (g ? 0 : _), n = Math.max(t - e, c === 0 ? 0 : 1);
|
|
1033
|
-
w =
|
|
1036
|
+
w = Mr(g ? e : t - n, d, n, o, C, g ? "right" : "left"), E = g ? "0% 50%" : "100% 50%";
|
|
1034
1037
|
} else {
|
|
1035
1038
|
let e = Math.min(v, y) + (g ? 0 : _), t = Math.max(v, y) - (g ? _ : 0), n = Math.max(t - e, c === 0 ? 0 : 1);
|
|
1036
|
-
w =
|
|
1039
|
+
w = Mr(d, g ? t - n : e, o, n, C, g ? "top" : "bottom"), E = g ? "50% 100%" : "50% 0%";
|
|
1037
1040
|
}
|
|
1038
1041
|
if (e.push({
|
|
1039
1042
|
key: `${r.index}-${u}`,
|
|
@@ -1093,7 +1096,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1093
1096
|
if (e < 0 || e >= c.value) return null;
|
|
1094
1097
|
let n = S.value.center(e);
|
|
1095
1098
|
return {
|
|
1096
|
-
x: t.horizontal ?
|
|
1099
|
+
x: t.horizontal ? _r(O.value, v.value.left, v.value.left + y.value) : n,
|
|
1097
1100
|
y: t.horizontal ? n : v.value.top,
|
|
1098
1101
|
title: t.categories[e],
|
|
1099
1102
|
rows: u.value.map((t) => ({
|
|
@@ -1127,7 +1130,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1127
1130
|
series: l.value.length
|
|
1128
1131
|
})];
|
|
1129
1132
|
for (let r of l.value.slice(0, 6)) {
|
|
1130
|
-
let i =
|
|
1133
|
+
let i = Wr(r.data);
|
|
1131
1134
|
i && e.push(n("campus.chart.summarySeries", {
|
|
1132
1135
|
name: r.name,
|
|
1133
1136
|
min: f(i.min),
|
|
@@ -1137,7 +1140,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1137
1140
|
}));
|
|
1138
1141
|
}
|
|
1139
1142
|
return e.join(" ");
|
|
1140
|
-
}), ie = P(() => t.categories.slice(0,
|
|
1143
|
+
}), ie = P(() => t.categories.slice(0, Bi).map((e, t) => [e, ...l.value.map((e) => Z(e.data[t]) ? f(e.data[t]) : "")])), ae = P(() => [n("campus.chart.category"), ...l.value.map((e) => e.name)]);
|
|
1141
1144
|
return (t, n) => (W(), L("div", {
|
|
1142
1145
|
ref_key: "el",
|
|
1143
1146
|
ref: r,
|
|
@@ -1147,7 +1150,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1147
1150
|
}]),
|
|
1148
1151
|
"aria-busy": e.loading || void 0
|
|
1149
1152
|
}, [
|
|
1150
|
-
te.value && d.value ? (W(), F(
|
|
1153
|
+
te.value && d.value ? (W(), F(Xr, {
|
|
1151
1154
|
key: 0,
|
|
1152
1155
|
items: ne.value,
|
|
1153
1156
|
interactive: "",
|
|
@@ -1157,7 +1160,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1157
1160
|
class: "ca-chart__plot",
|
|
1158
1161
|
style: U({ height: `${e.height}px` })
|
|
1159
1162
|
}, [
|
|
1160
|
-
R("div",
|
|
1163
|
+
R("div", wi, [d.value ? (W(), L("svg", {
|
|
1161
1164
|
key: 0,
|
|
1162
1165
|
class: "ca-chart__svg",
|
|
1163
1166
|
role: "img",
|
|
@@ -1174,30 +1177,30 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1174
1177
|
onBlur: n[2] ||= (e) => D.value = -1
|
|
1175
1178
|
}, [
|
|
1176
1179
|
I(" 数值轴的网格与刻度 "),
|
|
1177
|
-
e.horizontal ? (W(), L("g",
|
|
1180
|
+
e.horizontal ? (W(), L("g", ki, [(W(!0), L(N, null, K(_.value, (e) => (W(), L(N, { key: e.tick }, [R("line", {
|
|
1178
1181
|
class: H(e.tick === 0 ? "ca-chart__baseline" : "ca-chart__grid"),
|
|
1179
1182
|
x1: x.value(e.tick),
|
|
1180
1183
|
x2: x.value(e.tick),
|
|
1181
1184
|
y1: v.value.top,
|
|
1182
1185
|
y2: v.value.top + b.value
|
|
1183
|
-
}, null, 10,
|
|
1186
|
+
}, null, 10, Ai), R("text", {
|
|
1184
1187
|
class: "ca-chart__tick",
|
|
1185
1188
|
x: x.value(e.tick),
|
|
1186
1189
|
y: v.value.top + b.value + 18,
|
|
1187
1190
|
"text-anchor": "middle"
|
|
1188
|
-
}, J(e.text), 9,
|
|
1191
|
+
}, J(e.text), 9, ji)], 64))), 128))])) : (W(), L("g", Ei, [(W(!0), L(N, null, K(_.value, (e) => (W(), L(N, { key: e.tick }, [R("line", {
|
|
1189
1192
|
class: H(e.tick === 0 ? "ca-chart__baseline" : "ca-chart__grid"),
|
|
1190
1193
|
x1: v.value.left,
|
|
1191
1194
|
x2: v.value.left + y.value,
|
|
1192
1195
|
y1: x.value(e.tick),
|
|
1193
1196
|
y2: x.value(e.tick)
|
|
1194
|
-
}, null, 10,
|
|
1197
|
+
}, null, 10, Di), R("text", {
|
|
1195
1198
|
class: "ca-chart__tick",
|
|
1196
1199
|
x: v.value.left - 8,
|
|
1197
1200
|
y: x.value(e.tick),
|
|
1198
1201
|
dy: "0.32em",
|
|
1199
1202
|
"text-anchor": "end"
|
|
1200
|
-
}, J(e.text), 9,
|
|
1203
|
+
}, J(e.text), 9, Oi)], 64))), 128))])),
|
|
1201
1204
|
I(" 类目轴标签 "),
|
|
1202
1205
|
R("g", null, [e.horizontal ? (W(!0), L(N, { key: 1 }, K(w.value, (e) => (W(), L("text", {
|
|
1203
1206
|
key: e.i,
|
|
@@ -1206,13 +1209,13 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1206
1209
|
y: e.pos,
|
|
1207
1210
|
dy: "0.32em",
|
|
1208
1211
|
"text-anchor": "end"
|
|
1209
|
-
}, J(e.text), 9,
|
|
1212
|
+
}, J(e.text), 9, Ni))), 128)) : (W(!0), L(N, { key: 0 }, K(w.value, (e) => (W(), L("text", {
|
|
1210
1213
|
key: e.i,
|
|
1211
1214
|
class: "ca-chart__tick",
|
|
1212
1215
|
x: e.pos,
|
|
1213
1216
|
y: v.value.top + b.value + 18,
|
|
1214
1217
|
"text-anchor": "middle"
|
|
1215
|
-
}, J(e.text), 9,
|
|
1218
|
+
}, J(e.text), 9, Mi))), 128))]),
|
|
1216
1219
|
M.value ? (W(), L("rect", {
|
|
1217
1220
|
key: 2,
|
|
1218
1221
|
class: "ca-chart__band",
|
|
@@ -1220,7 +1223,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1220
1223
|
y: M.value.y,
|
|
1221
1224
|
width: M.value.w,
|
|
1222
1225
|
height: M.value.h
|
|
1223
|
-
}, null, 8,
|
|
1226
|
+
}, null, 8, Pi)) : I("v-if", !0),
|
|
1224
1227
|
R("g", null, [(W(!0), L(N, null, K(E.value.bars, (t) => (W(), L("path", {
|
|
1225
1228
|
key: t.key,
|
|
1226
1229
|
class: H(["ca-chart__bar", e.horizontal ? "ca-chart__grow-x" : "ca-chart__grow-y"]),
|
|
@@ -1229,16 +1232,16 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1229
1232
|
fill: t.color,
|
|
1230
1233
|
transformOrigin: t.origin
|
|
1231
1234
|
})
|
|
1232
|
-
}, null, 14,
|
|
1233
|
-
R("g",
|
|
1235
|
+
}, null, 14, Fi))), 128))]),
|
|
1236
|
+
R("g", Ii, [(W(!0), L(N, null, K(E.value.labels, (e) => (W(), L("text", {
|
|
1234
1237
|
key: e.key,
|
|
1235
1238
|
class: "ca-chart__value",
|
|
1236
1239
|
x: e.x,
|
|
1237
1240
|
y: e.y,
|
|
1238
1241
|
"text-anchor": e.anchor
|
|
1239
|
-
}, J(e.text), 9,
|
|
1240
|
-
], 40,
|
|
1241
|
-
j.value ? (W(), F(
|
|
1242
|
+
}, J(e.text), 9, Li))), 128))])
|
|
1243
|
+
], 40, Ti)) : I("v-if", !0)]),
|
|
1244
|
+
j.value ? (W(), F(oi, {
|
|
1242
1245
|
key: 0,
|
|
1243
1246
|
x: j.value.x,
|
|
1244
1247
|
y: j.value.y,
|
|
@@ -1252,12 +1255,12 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1252
1255
|
"title",
|
|
1253
1256
|
"rows"
|
|
1254
1257
|
])) : I("v-if", !0),
|
|
1255
|
-
B(
|
|
1258
|
+
B(Qr, {
|
|
1256
1259
|
loading: e.loading,
|
|
1257
1260
|
empty: !d.value && !e.loading
|
|
1258
1261
|
}, null, 8, ["loading", "empty"])
|
|
1259
1262
|
], 4),
|
|
1260
|
-
d.value ? (W(), F(
|
|
1263
|
+
d.value ? (W(), F(ni, {
|
|
1261
1264
|
key: 1,
|
|
1262
1265
|
caption: e.title,
|
|
1263
1266
|
head: ae.value,
|
|
@@ -1267,20 +1270,20 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1267
1270
|
"head",
|
|
1268
1271
|
"rows"
|
|
1269
1272
|
])) : I("v-if", !0)
|
|
1270
|
-
], 10,
|
|
1273
|
+
], 10, Ci));
|
|
1271
1274
|
}
|
|
1272
|
-
}),
|
|
1275
|
+
}), Hi = ["aria-busy"], Ui = { class: "ca-pie-chart__body" }, Wi = { class: "ca-chart__canvas" }, Gi = [
|
|
1273
1276
|
"aria-label",
|
|
1274
1277
|
"width",
|
|
1275
1278
|
"height",
|
|
1276
1279
|
"viewBox"
|
|
1277
|
-
],
|
|
1280
|
+
], Ki = { class: "ca-chart__fade" }, qi = ["d", "onPointerenter"], Ji = { class: "ca-pie-chart__label" }, Yi = {
|
|
1278
1281
|
key: 0,
|
|
1279
1282
|
class: "ca-pie-chart__sub"
|
|
1280
|
-
},
|
|
1283
|
+
}, Xi = {
|
|
1281
1284
|
key: 0,
|
|
1282
1285
|
class: "ca-pie-chart__legend"
|
|
1283
|
-
},
|
|
1286
|
+
}, Zi = ["onPointerenter"], Qi = { class: "ca-pie-chart__name" }, $i = { class: "ca-pie-chart__num" }, ea = { class: "ca-pie-chart__pct" }, ta = 6, na = /*#__PURE__*/ l(/* @__PURE__ */ V({
|
|
1284
1287
|
__name: "CaPieChart",
|
|
1285
1288
|
props: {
|
|
1286
1289
|
items: {},
|
|
@@ -1304,25 +1307,25 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1304
1307
|
}
|
|
1305
1308
|
},
|
|
1306
1309
|
setup(e) {
|
|
1307
|
-
let t = e, n = s(), { el: r, width: i } =
|
|
1310
|
+
let t = e, n = s(), { el: r, width: i } = Kr(), a = (e) => (t.valueFormatter ?? Br)(e), o = P(() => _r(Math.min(t.size, i.value), 96, t.size)), c = P(() => o.value / 2 - ta), l = P(() => t.donut ? c.value * .64 : 0), u = P(() => t.items.map((e, t) => ({
|
|
1308
1311
|
index: t,
|
|
1309
1312
|
name: e.name,
|
|
1310
1313
|
value: Z(e.value) ? e.value : 0,
|
|
1311
|
-
color:
|
|
1312
|
-
}))), d = P(() =>
|
|
1314
|
+
color: Jr(t, e.color)
|
|
1315
|
+
}))), d = P(() => Pr(u.value.map((e) => e.value))), f = P(() => u.value.reduce((e, t) => e + (t.value > 0 ? t.value : 0), 0)), p = P(() => d.value.length > 0), m = G(-1), h = P(() => d.value.filter((e) => e.end > e.start).map((e) => {
|
|
1313
1316
|
let t = u.value[e.index], n = m.value === e.index ? 4 : 0;
|
|
1314
1317
|
return {
|
|
1315
1318
|
...e,
|
|
1316
1319
|
name: t.name,
|
|
1317
1320
|
color: t.color,
|
|
1318
|
-
d:
|
|
1321
|
+
d: Fr(o.value / 2, o.value / 2, c.value + n, l.value, e.start, e.end)
|
|
1319
1322
|
};
|
|
1320
1323
|
})), g = (e) => d.value[e]?.ratio ?? 0, _ = P(() => {
|
|
1321
1324
|
let e = m.value;
|
|
1322
1325
|
return e >= 0 && u.value[e] ? {
|
|
1323
1326
|
label: u.value[e].name,
|
|
1324
1327
|
value: a(u.value[e].value),
|
|
1325
|
-
sub:
|
|
1328
|
+
sub: Gr(g(e))
|
|
1326
1329
|
} : {
|
|
1327
1330
|
label: t.centerLabel ?? n("campus.chart.total"),
|
|
1328
1331
|
value: t.centerValue ?? a(f.value),
|
|
@@ -1347,7 +1350,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1347
1350
|
y: v.value.y,
|
|
1348
1351
|
title: e.name,
|
|
1349
1352
|
rows: [{
|
|
1350
|
-
name:
|
|
1353
|
+
name: Gr(g(m.value)),
|
|
1351
1354
|
color: e.color,
|
|
1352
1355
|
value: a(e.value)
|
|
1353
1356
|
}]
|
|
@@ -1368,7 +1371,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1368
1371
|
function S(e) {
|
|
1369
1372
|
e.target.matches?.(":focus-visible") && m.value < 0 && x(new KeyboardEvent("keydown", { key: "ArrowRight" }));
|
|
1370
1373
|
}
|
|
1371
|
-
let C = P(() =>
|
|
1374
|
+
let C = P(() => _r(Math.floor(l.value * 1.7 / Math.max(1, _.value.value.length * .62)), 13, 22)), w = P(() => {
|
|
1372
1375
|
let e = [n("campus.chart.summaryPie", {
|
|
1373
1376
|
title: t.title ?? "",
|
|
1374
1377
|
count: u.value.length,
|
|
@@ -1377,7 +1380,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1377
1380
|
for (let t of u.value.slice(0, 8)) e.push(n("campus.chart.summaryPieItem", {
|
|
1378
1381
|
name: t.name,
|
|
1379
1382
|
value: a(t.value),
|
|
1380
|
-
percent:
|
|
1383
|
+
percent: Gr(g(t.index))
|
|
1381
1384
|
}));
|
|
1382
1385
|
return e.join(" ");
|
|
1383
1386
|
}), T = P(() => [
|
|
@@ -1387,7 +1390,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1387
1390
|
]), E = P(() => u.value.map((e) => [
|
|
1388
1391
|
e.name,
|
|
1389
1392
|
a(e.value),
|
|
1390
|
-
|
|
1393
|
+
Gr(g(e.index))
|
|
1391
1394
|
]));
|
|
1392
1395
|
return (t, n) => (W(), L("div", {
|
|
1393
1396
|
ref_key: "el",
|
|
@@ -1397,7 +1400,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1397
1400
|
"is-animated": e.animated
|
|
1398
1401
|
}]),
|
|
1399
1402
|
"aria-busy": e.loading || void 0
|
|
1400
|
-
}, [R("div",
|
|
1403
|
+
}, [R("div", Ui, [
|
|
1401
1404
|
R("div", {
|
|
1402
1405
|
class: "ca-chart__plot",
|
|
1403
1406
|
style: U({
|
|
@@ -1405,7 +1408,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1405
1408
|
height: `${o.value}px`
|
|
1406
1409
|
})
|
|
1407
1410
|
}, [
|
|
1408
|
-
R("div",
|
|
1411
|
+
R("div", Wi, [p.value ? (W(), L("svg", {
|
|
1409
1412
|
key: 0,
|
|
1410
1413
|
class: "ca-chart__svg",
|
|
1411
1414
|
role: "img",
|
|
@@ -1417,7 +1420,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1417
1420
|
onKeydown: x,
|
|
1418
1421
|
onFocus: S,
|
|
1419
1422
|
onBlur: n[1] ||= (e) => m.value = -1
|
|
1420
|
-
}, [R("g",
|
|
1423
|
+
}, [R("g", Ki, [(W(!0), L(N, null, K(h.value, (e) => (W(), L("path", {
|
|
1421
1424
|
key: e.index,
|
|
1422
1425
|
class: H(["ca-chart__slice", { "is-dim": m.value >= 0 && m.value !== e.index }]),
|
|
1423
1426
|
d: e.d,
|
|
@@ -1425,21 +1428,21 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1425
1428
|
onPointerenter: (t) => m.value = e.index,
|
|
1426
1429
|
onPointermove: y,
|
|
1427
1430
|
onPointerleave: n[0] ||= (e) => m.value = -1
|
|
1428
|
-
}, null, 46,
|
|
1431
|
+
}, null, 46, qi))), 128))])], 40, Gi)) : I("v-if", !0)]),
|
|
1429
1432
|
I(" 环形图中心文字:HTML 叠在 SVG 上,方便按内圈宽度换行与省略 "),
|
|
1430
1433
|
e.donut && p.value ? (W(), L("div", {
|
|
1431
1434
|
key: 0,
|
|
1432
1435
|
class: "ca-pie-chart__center",
|
|
1433
1436
|
style: U({ width: `${l.value * 1.7}px` })
|
|
1434
1437
|
}, [
|
|
1435
|
-
R("span",
|
|
1438
|
+
R("span", Ji, J(_.value.label), 1),
|
|
1436
1439
|
R("strong", {
|
|
1437
1440
|
class: "ca-pie-chart__value",
|
|
1438
1441
|
style: U({ fontSize: `${C.value}px` })
|
|
1439
1442
|
}, J(_.value.value), 5),
|
|
1440
|
-
_.value.sub ? (W(), L("span",
|
|
1443
|
+
_.value.sub ? (W(), L("span", Yi, J(_.value.sub), 1)) : I("v-if", !0)
|
|
1441
1444
|
], 4)) : I("v-if", !0),
|
|
1442
|
-
b.value ? (W(), F(
|
|
1445
|
+
b.value ? (W(), F(oi, {
|
|
1443
1446
|
key: 1,
|
|
1444
1447
|
x: b.value.x,
|
|
1445
1448
|
y: b.value.y,
|
|
@@ -1453,13 +1456,13 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1453
1456
|
"title",
|
|
1454
1457
|
"rows"
|
|
1455
1458
|
])) : I("v-if", !0),
|
|
1456
|
-
B(
|
|
1459
|
+
B(Qr, {
|
|
1457
1460
|
loading: e.loading,
|
|
1458
1461
|
empty: !p.value && !e.loading
|
|
1459
1462
|
}, null, 8, ["loading", "empty"])
|
|
1460
1463
|
], 4),
|
|
1461
1464
|
I(" 图例清单:名称 / 数值 / 占比,悬停与扇区联动 "),
|
|
1462
|
-
e.legend && u.value.length ? (W(), L("ul",
|
|
1465
|
+
e.legend && u.value.length ? (W(), L("ul", Xi, [(W(!0), L(N, null, K(u.value, (e) => (W(), L("li", {
|
|
1463
1466
|
key: e.index,
|
|
1464
1467
|
class: H(["ca-pie-chart__row", { "is-active": m.value === e.index }]),
|
|
1465
1468
|
onPointerenter: (t) => m.value = e.value > 0 ? e.index : -1,
|
|
@@ -1469,11 +1472,11 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1469
1472
|
class: "ca-chart__key ca-chart__key--box",
|
|
1470
1473
|
style: U({ "--key": e.color })
|
|
1471
1474
|
}, null, 4),
|
|
1472
|
-
R("span",
|
|
1473
|
-
R("span",
|
|
1474
|
-
R("span",
|
|
1475
|
-
], 42,
|
|
1476
|
-
]), p.value ? (W(), F(
|
|
1475
|
+
R("span", Qi, J(e.name), 1),
|
|
1476
|
+
R("span", $i, J(a(e.value)), 1),
|
|
1477
|
+
R("span", ea, J(Y(Gr)(g(e.index))), 1)
|
|
1478
|
+
], 42, Zi))), 128))])) : I("v-if", !0)
|
|
1479
|
+
]), p.value ? (W(), F(ni, {
|
|
1477
1480
|
key: 0,
|
|
1478
1481
|
caption: e.title,
|
|
1479
1482
|
head: T.value,
|
|
@@ -1482,17 +1485,17 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1482
1485
|
"caption",
|
|
1483
1486
|
"head",
|
|
1484
1487
|
"rows"
|
|
1485
|
-
])) : I("v-if", !0)], 10,
|
|
1488
|
+
])) : I("v-if", !0)], 10, Hi));
|
|
1486
1489
|
}
|
|
1487
|
-
}), [["__scopeId", "data-v-75e32682"]]),
|
|
1490
|
+
}), [["__scopeId", "data-v-75e32682"]]), ra = [
|
|
1488
1491
|
"aria-label",
|
|
1489
1492
|
"width",
|
|
1490
1493
|
"height",
|
|
1491
1494
|
"viewBox"
|
|
1492
|
-
],
|
|
1495
|
+
], ia = {
|
|
1493
1496
|
key: 0,
|
|
1494
1497
|
class: "ca-chart__reveal"
|
|
1495
|
-
},
|
|
1498
|
+
}, aa = ["d"], oa = ["d"], sa = ["cx", "cy"], ca = { key: 1 }, la = ["d"], ua = 4, da = 5, fa = 2, pa = /* @__PURE__ */ V({
|
|
1496
1499
|
__name: "CaSparkline",
|
|
1497
1500
|
props: {
|
|
1498
1501
|
data: {},
|
|
@@ -1516,32 +1519,32 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1516
1519
|
}
|
|
1517
1520
|
},
|
|
1518
1521
|
setup(e) {
|
|
1519
|
-
let t = e, n = s(), { el: r, width: i } =
|
|
1522
|
+
let t = e, n = s(), { el: r, width: i } = Kr(() => t.width), a = (e) => (t.valueFormatter ?? Br)(e), o = P(() => jr(t.data)), c = P(() => Math.max(1, i.value - 8)), l = P(() => {
|
|
1520
1523
|
let e = t.data.length, n = o.value;
|
|
1521
1524
|
if (!e || !n) return null;
|
|
1522
1525
|
if (t.type === "bar") {
|
|
1523
|
-
let r = Math.max(n[1], 0), i = Math.min(n[0], 0), a =
|
|
1526
|
+
let r = Math.max(n[1], 0), i = Math.min(n[0], 0), a = xr(i, r === i ? i + 1 : r, t.height - 1, da), o = (c.value - fa * (e - 1)) / e, s = Math.max(1, Math.min(o, 14)), l = s * e + fa * (e - 1), u = ua + (c.value - l) / 2;
|
|
1524
1527
|
return {
|
|
1525
1528
|
kind: "bar",
|
|
1526
1529
|
bars: t.data.flatMap((e, t) => {
|
|
1527
1530
|
if (!Z(e)) return [];
|
|
1528
|
-
let n = a(0), r = a(e), i =
|
|
1531
|
+
let n = a(0), r = a(e), i = Mr(u + t * (s + fa), Math.min(n, r), s, Math.max(Math.abs(n - r), e === 0 ? 0 : 1), 2, e >= 0 ? "top" : "bottom");
|
|
1529
1532
|
return i ? [i] : [];
|
|
1530
1533
|
})
|
|
1531
1534
|
};
|
|
1532
1535
|
}
|
|
1533
|
-
let r =
|
|
1536
|
+
let r = xr(n[0], n[1], t.height - da, da), a = (t) => e === 1 ? i.value / 2 : ua + t / (e - 1) * c.value, s = t.data.map((e, t) => Z(e) ? {
|
|
1534
1537
|
x: a(t),
|
|
1535
1538
|
y: r(e)
|
|
1536
1539
|
} : null), l = [...s].reverse().find((e) => e) ?? null;
|
|
1537
1540
|
return {
|
|
1538
1541
|
kind: "line",
|
|
1539
|
-
line:
|
|
1540
|
-
area: t.area ?
|
|
1542
|
+
line: Or(s, t.smooth),
|
|
1543
|
+
area: t.area ? kr(s, t.height - 1, t.smooth) : "",
|
|
1541
1544
|
last: l
|
|
1542
1545
|
};
|
|
1543
1546
|
}), u = P(() => {
|
|
1544
|
-
let e =
|
|
1547
|
+
let e = Wr(t.data);
|
|
1545
1548
|
return e ? n("campus.chart.summarySpark", {
|
|
1546
1549
|
title: t.title ?? "",
|
|
1547
1550
|
count: e.count,
|
|
@@ -1563,18 +1566,18 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1563
1566
|
width: Y(i),
|
|
1564
1567
|
height: e.height,
|
|
1565
1568
|
viewBox: `0 0 ${Y(i)} ${e.height}`
|
|
1566
|
-
}, [l.value.kind === "line" ? (W(), L("g",
|
|
1569
|
+
}, [l.value.kind === "line" ? (W(), L("g", ia, [
|
|
1567
1570
|
l.value.area ? (W(), L("path", {
|
|
1568
1571
|
key: 0,
|
|
1569
1572
|
class: "ca-chart__area",
|
|
1570
1573
|
d: l.value.area,
|
|
1571
1574
|
style: U({ fill: e.color })
|
|
1572
|
-
}, null, 12,
|
|
1575
|
+
}, null, 12, aa)) : I("v-if", !0),
|
|
1573
1576
|
R("path", {
|
|
1574
1577
|
class: "ca-chart__line",
|
|
1575
1578
|
d: l.value.line,
|
|
1576
1579
|
style: U({ stroke: e.color })
|
|
1577
|
-
}, null, 12,
|
|
1580
|
+
}, null, 12, oa),
|
|
1578
1581
|
l.value.last ? (W(), L("circle", {
|
|
1579
1582
|
key: 1,
|
|
1580
1583
|
class: "ca-chart__dot",
|
|
@@ -1582,27 +1585,27 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1582
1585
|
cy: l.value.last.y,
|
|
1583
1586
|
r: "3.5",
|
|
1584
1587
|
style: U({ fill: e.color })
|
|
1585
|
-
}, null, 12,
|
|
1586
|
-
])) : (W(), L("g",
|
|
1588
|
+
}, null, 12, sa)) : I("v-if", !0)
|
|
1589
|
+
])) : (W(), L("g", ca, [(W(!0), L(N, null, K(l.value.bars, (t, n) => (W(), L("path", {
|
|
1587
1590
|
key: n,
|
|
1588
1591
|
class: "ca-chart__grow-y",
|
|
1589
1592
|
d: t,
|
|
1590
1593
|
style: U({ fill: e.color })
|
|
1591
|
-
}, null, 12,
|
|
1594
|
+
}, null, 12, la))), 128))]))], 8, ra)) : I("v-if", !0)], 6));
|
|
1592
1595
|
}
|
|
1593
|
-
}),
|
|
1596
|
+
}), ma = ["aria-busy"], ha = [
|
|
1594
1597
|
"aria-label",
|
|
1595
1598
|
"width",
|
|
1596
1599
|
"height",
|
|
1597
1600
|
"viewBox"
|
|
1598
|
-
],
|
|
1601
|
+
], ga = ["d", "stroke-width"], _a = [
|
|
1599
1602
|
"d",
|
|
1600
1603
|
"stroke-width",
|
|
1601
1604
|
"stroke-dasharray"
|
|
1602
|
-
],
|
|
1605
|
+
], va = { class: "ca-gauge__value" }, ya = {
|
|
1603
1606
|
key: 0,
|
|
1604
1607
|
class: "ca-gauge__label"
|
|
1605
|
-
},
|
|
1608
|
+
}, ba = /*#__PURE__*/ l(/* @__PURE__ */ V({
|
|
1606
1609
|
__name: "CaGauge",
|
|
1607
1610
|
props: {
|
|
1608
1611
|
value: {},
|
|
@@ -1621,10 +1624,10 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1621
1624
|
}
|
|
1622
1625
|
},
|
|
1623
1626
|
setup(e) {
|
|
1624
|
-
let t = e, n = s(), r = P(() =>
|
|
1627
|
+
let t = e, n = s(), r = P(() => zr(t.value, t.max)), i = P(() => Rr(r.value, t.thresholds, t.color)), a = P(() => Lr(t.shape)), o = P(() => t.size / 2), c = P(() => (t.size - t.thickness) / 2 - 1), l = P(() => t.shape === "half" ? o.value + t.thickness / 2 + 2 : t.size), u = P(() => Ir(o.value, o.value, c.value, a.value.start, a.value.start + a.value.sweep)), d = P(() => `${Number(r.value.toFixed(1))}%`), f = P(() => n("campus.chart.summaryGauge", {
|
|
1625
1628
|
title: t.title ?? t.label ?? "",
|
|
1626
|
-
value:
|
|
1627
|
-
max:
|
|
1629
|
+
value: Br(typeof t.value == "number" ? t.value : 0),
|
|
1630
|
+
max: Br(t.max),
|
|
1628
1631
|
percent: d.value
|
|
1629
1632
|
}));
|
|
1630
1633
|
return (t, n) => (W(), L("div", {
|
|
@@ -1650,7 +1653,7 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1650
1653
|
d: u.value,
|
|
1651
1654
|
"stroke-width": e.thickness,
|
|
1652
1655
|
"stroke-linecap": "round"
|
|
1653
|
-
}, null, 8,
|
|
1656
|
+
}, null, 8, ga),
|
|
1654
1657
|
I(" pathLength=100:dasharray 的第一个数就是百分比;0% 时不画(圆头线帽会在起点留一个小点,误导成“有进度”) "),
|
|
1655
1658
|
r.value > 0 ? (W(), L("path", {
|
|
1656
1659
|
key: 0,
|
|
@@ -1660,28 +1663,28 @@ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
|
|
|
1660
1663
|
"stroke-width": e.thickness,
|
|
1661
1664
|
"stroke-dasharray": `${r.value} 100`,
|
|
1662
1665
|
style: U({ stroke: i.value })
|
|
1663
|
-
}, null, 12,
|
|
1664
|
-
], 8,
|
|
1666
|
+
}, null, 12, _a)) : I("v-if", !0)
|
|
1667
|
+
], 8, ha)), R("div", { class: H(["ca-gauge__center", { "is-half": e.shape === "half" }]) }, [q(t.$slots, "center", {}, () => [R("strong", va, J(d.value), 1), e.label ? (W(), L("span", ya, J(e.label), 1)) : I("v-if", !0)], !0)], 2)], 14, ma));
|
|
1665
1668
|
}
|
|
1666
|
-
}), [["__scopeId", "data-v-83314498"]]),
|
|
1667
|
-
CaLineChart:
|
|
1668
|
-
CaBarChart:
|
|
1669
|
-
CaPieChart:
|
|
1670
|
-
CaSparkline:
|
|
1671
|
-
CaGauge:
|
|
1672
|
-
},
|
|
1669
|
+
}), [["__scopeId", "data-v-83314498"]]), xa = {
|
|
1670
|
+
CaLineChart: Si,
|
|
1671
|
+
CaBarChart: Vi,
|
|
1672
|
+
CaPieChart: na,
|
|
1673
|
+
CaSparkline: pa,
|
|
1674
|
+
CaGauge: ba
|
|
1675
|
+
}, Sa = /* @__PURE__ */ V({
|
|
1673
1676
|
__name: "CaConfigProvider",
|
|
1674
1677
|
props: { locale: {} },
|
|
1675
1678
|
setup(e) {
|
|
1676
|
-
let t = e, n = P(() => t.locale === "en-US" ?
|
|
1679
|
+
let t = e, n = P(() => t.locale === "en-US" ? Yn : Xn);
|
|
1677
1680
|
return (e, t) => (W(), F(Y(se), { locale: n.value }, {
|
|
1678
1681
|
default: X(() => [q(e.$slots, "default")]),
|
|
1679
1682
|
_: 3
|
|
1680
1683
|
}, 8, ["locale"]));
|
|
1681
1684
|
}
|
|
1682
|
-
}),
|
|
1685
|
+
}), Ca = { CaConfigProvider: Sa };
|
|
1683
1686
|
// packages/ui/src/components/display/doc-viewer/source.ts
|
|
1684
|
-
function
|
|
1687
|
+
function wa(e = "", t = "") {
|
|
1685
1688
|
let n = e.split(/[?#]/)[0].split(".").pop()?.toLowerCase();
|
|
1686
1689
|
return n === "doc" || n === "ppt" ? "legacy" : n === "md" || n === "markdown" ? "md" : n === "xls" || n === "xlsx" ? "xlsx" : [
|
|
1687
1690
|
"pdf",
|
|
@@ -1690,15 +1693,15 @@ function xa(e = "", t = "") {
|
|
|
1690
1693
|
"txt"
|
|
1691
1694
|
].includes(n ?? "") ? n : /pdf/.test(t) ? "pdf" : /wordprocessingml/.test(t) ? "docx" : /spreadsheetml|ms-excel/.test(t) ? "xlsx" : /markdown/.test(t) ? "md" : /csv/.test(t) ? "csv" : /^text\//.test(t) ? "txt" : "unsupported";
|
|
1692
1695
|
}
|
|
1693
|
-
function
|
|
1696
|
+
function Ta(e, t) {
|
|
1694
1697
|
let n = typeof t == "number" ? t : t?.[e] ?? a[e] ?? 20 * 1024 ** 2;
|
|
1695
1698
|
if (!Number.isFinite(n) || n <= 0) throw new c("invalidSize");
|
|
1696
1699
|
return n;
|
|
1697
1700
|
}
|
|
1698
|
-
function
|
|
1701
|
+
function Ea(e, t) {
|
|
1699
1702
|
if (e > t) throw new c("tooLarge");
|
|
1700
1703
|
}
|
|
1701
|
-
function
|
|
1704
|
+
function Da(e) {
|
|
1702
1705
|
try {
|
|
1703
1706
|
let t = new TextDecoder("utf-8", { fatal: !0 }).decode(e);
|
|
1704
1707
|
if (t.includes("\0")) throw Error("binary");
|
|
@@ -1707,19 +1710,19 @@ function wa(e) {
|
|
|
1707
1710
|
throw new c("invalidFile");
|
|
1708
1711
|
}
|
|
1709
1712
|
}
|
|
1710
|
-
function
|
|
1713
|
+
function Oa(e, t) {
|
|
1711
1714
|
let n = new Uint8Array(e), r = (...e) => e.every((e, t) => n[t] === e);
|
|
1712
1715
|
if (t === "pdf" && !r(37, 80, 68, 70, 45) || t === "docx" && !r(80, 75, 3, 4) || t === "xlsx" && !r(80, 75, 3, 4) && !r(208, 207, 17, 224, 161, 177, 26, 225)) throw new c("invalidFile");
|
|
1713
|
-
if (r(80, 75, 3, 4) &&
|
|
1716
|
+
if (r(80, 75, 3, 4) && Aa(e, t), [
|
|
1714
1717
|
"md",
|
|
1715
1718
|
"csv",
|
|
1716
1719
|
"txt"
|
|
1717
1720
|
].includes(t)) {
|
|
1718
1721
|
if (r(37, 80, 68, 70, 45) || r(80, 75) || r(208, 207, 17, 224)) throw new c("invalidFile");
|
|
1719
|
-
|
|
1722
|
+
Da(e);
|
|
1720
1723
|
}
|
|
1721
1724
|
}
|
|
1722
|
-
async function
|
|
1725
|
+
async function ka(e, t, n) {
|
|
1723
1726
|
let r, i = t.filename ?? "";
|
|
1724
1727
|
if (typeof e == "string" && t.type === "md") r = new Blob([e], { type: "text/markdown" });
|
|
1725
1728
|
else if (typeof e == "string") {
|
|
@@ -1735,8 +1738,8 @@ async function Ea(e, t, n) {
|
|
|
1735
1738
|
signal: n
|
|
1736
1739
|
});
|
|
1737
1740
|
if (!o.ok) throw new c("fetchFailed", String(o.status));
|
|
1738
|
-
let s = o.headers.get("content-type") ?? "", l =
|
|
1739
|
-
u &&
|
|
1741
|
+
let s = o.headers.get("content-type") ?? "", l = Ta(t.type ?? wa(i, s), t.maxSize), u = o.headers.get("content-length");
|
|
1742
|
+
u && Ea(Number(u), l);
|
|
1740
1743
|
let d = o.body?.getReader();
|
|
1741
1744
|
if (!d) throw new c("fetchFailed");
|
|
1742
1745
|
let f = [], p = 0;
|
|
@@ -1744,7 +1747,7 @@ async function Ea(e, t, n) {
|
|
|
1744
1747
|
for (;;) {
|
|
1745
1748
|
let { done: e, value: t } = await d.read();
|
|
1746
1749
|
if (e) break;
|
|
1747
|
-
p += t.byteLength,
|
|
1750
|
+
p += t.byteLength, Ea(p, l), f.push(t);
|
|
1748
1751
|
}
|
|
1749
1752
|
} catch (e) {
|
|
1750
1753
|
throw await d.cancel(), e;
|
|
@@ -1753,17 +1756,17 @@ async function Ea(e, t, n) {
|
|
|
1753
1756
|
}
|
|
1754
1757
|
r = new Blob(f, { type: s });
|
|
1755
1758
|
} else r = e instanceof Blob ? e : new Blob([e]);
|
|
1756
|
-
let a = t.type ??
|
|
1757
|
-
if (a === "unsupported" && r.size <=
|
|
1758
|
-
|
|
1759
|
+
let a = t.type ?? wa(i, r.type);
|
|
1760
|
+
if (a === "unsupported" && r.size <= Ta("txt", t.maxSize)) try {
|
|
1761
|
+
Da(await r.arrayBuffer()), a = "txt";
|
|
1759
1762
|
} catch {}
|
|
1760
|
-
return
|
|
1763
|
+
return Ea(r.size, Ta(a, t.maxSize)), {
|
|
1761
1764
|
blob: r,
|
|
1762
1765
|
filename: i,
|
|
1763
1766
|
type: a
|
|
1764
1767
|
};
|
|
1765
1768
|
}
|
|
1766
|
-
function
|
|
1769
|
+
function Aa(e, t) {
|
|
1767
1770
|
let n = new DataView(e), r = -1;
|
|
1768
1771
|
for (let t = e.byteLength - 22; t >= Math.max(0, e.byteLength - 65557); t--) if (n.getUint32(t, !0) === 101010256 && t + 22 + n.getUint16(t + 20, !0) === e.byteLength) {
|
|
1769
1772
|
r = t;
|
|
@@ -1784,22 +1787,22 @@ function Da(e, t) {
|
|
|
1784
1787
|
if (o !== r || !l.has("[Content_Types].xml") || !l.has(t === "docx" ? "word/document.xml" : "xl/workbook.xml")) throw new c("invalidFile");
|
|
1785
1788
|
}
|
|
1786
1789
|
// packages/ui/src/components/display/doc-viewer/markdown.ts
|
|
1787
|
-
function
|
|
1790
|
+
function ja(e) {
|
|
1788
1791
|
return /^(https?:\/\/|mailto:)/i.test(e);
|
|
1789
1792
|
}
|
|
1790
|
-
function
|
|
1791
|
-
let t = new
|
|
1793
|
+
function Ma(e = "ca-doc-") {
|
|
1794
|
+
let t = new Zn({
|
|
1792
1795
|
html: !1,
|
|
1793
1796
|
linkify: !0,
|
|
1794
1797
|
typographer: !1,
|
|
1795
1798
|
maxNesting: 32
|
|
1796
|
-
}).use(
|
|
1799
|
+
}).use(Qn, { slugify: (t) => e + encodeURIComponent(t.toLowerCase().replace(/\s+/g, "-")) }).use($n);
|
|
1797
1800
|
for (let e of [
|
|
1798
1801
|
"tip",
|
|
1799
1802
|
"info",
|
|
1800
1803
|
"warning",
|
|
1801
1804
|
"danger"
|
|
1802
|
-
]) t.use(
|
|
1805
|
+
]) t.use(er, e);
|
|
1803
1806
|
return t.block.ruler.before("fence", "ca-math", (e, t, n, r) => {
|
|
1804
1807
|
let i = (t) => e.src.slice(e.bMarks[t] + e.tShift[t], e.eMarks[t]);
|
|
1805
1808
|
if (e.sCount[t] - e.blkIndent >= 4 || i(t).trim() !== "$$") return !1;
|
|
@@ -1826,8 +1829,8 @@ function ka(e = "ca-doc-") {
|
|
|
1826
1829
|
}
|
|
1827
1830
|
}), t;
|
|
1828
1831
|
}
|
|
1829
|
-
function
|
|
1830
|
-
let n =
|
|
1832
|
+
function Na(e, t = !1) {
|
|
1833
|
+
let n = tr.sanitize(e, {
|
|
1831
1834
|
RETURN_DOM_FRAGMENT: !0,
|
|
1832
1835
|
ADD_TAGS: ["input"],
|
|
1833
1836
|
ADD_ATTR: ["checked", "disabled"],
|
|
@@ -1846,15 +1849,15 @@ function Aa(e, t = !1) {
|
|
|
1846
1849
|
}
|
|
1847
1850
|
for (let e of n.querySelectorAll("a")) {
|
|
1848
1851
|
let t = e.getAttribute("href") ?? "";
|
|
1849
|
-
!
|
|
1852
|
+
!ja(t) && !(t.startsWith("#") && Array.from(n.querySelectorAll("[id]")).some((e) => "#" + e.id === t)) && e.removeAttribute("href"), e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"), t.startsWith("#") && e.removeAttribute("target");
|
|
1850
1853
|
}
|
|
1851
1854
|
for (let e of n.querySelectorAll("img")) !t || !/^https?:\/\//i.test(e.getAttribute("src") ?? "") ? e.remove() : (e.removeAttribute("srcset"), e.setAttribute("loading", "lazy"), e.setAttribute("referrerpolicy", "no-referrer"));
|
|
1852
1855
|
let r = document.createElement("div");
|
|
1853
1856
|
return r.append(n), r.innerHTML;
|
|
1854
1857
|
}
|
|
1855
|
-
async function
|
|
1858
|
+
async function Pa(e, t, n) {
|
|
1856
1859
|
if (e.split("\n").some((e) => e.length > 1e5) || e.split("\n").length > 2e4) throw new c("complex");
|
|
1857
|
-
let r =
|
|
1860
|
+
let r = Ma(n), i = { docId: n }, a = r.parse(e, i), o = [], s = /* @__PURE__ */ new Set(), l = [];
|
|
1858
1861
|
for (let e = 0; e < a.length; e++) {
|
|
1859
1862
|
let t = a[e];
|
|
1860
1863
|
if (t.type === "heading_open" && o.push({
|
|
@@ -1916,14 +1919,14 @@ async function ja(e, t, n) {
|
|
|
1916
1919
|
}
|
|
1917
1920
|
};
|
|
1918
1921
|
return await d(a), {
|
|
1919
|
-
html:
|
|
1922
|
+
html: Na(r.renderer.render(a, r.options, i), t),
|
|
1920
1923
|
headings: o,
|
|
1921
1924
|
diagrams: l,
|
|
1922
1925
|
warnings: [...s]
|
|
1923
1926
|
};
|
|
1924
1927
|
}
|
|
1925
|
-
function
|
|
1926
|
-
let t =
|
|
1928
|
+
function Fa(e) {
|
|
1929
|
+
let t = tr.sanitize(e, {
|
|
1927
1930
|
RETURN_DOM_FRAGMENT: !0,
|
|
1928
1931
|
USE_PROFILES: {
|
|
1929
1932
|
svg: !0,
|
|
@@ -1945,7 +1948,7 @@ function Ma(e) {
|
|
|
1945
1948
|
return n.append(t), n.innerHTML;
|
|
1946
1949
|
}
|
|
1947
1950
|
// packages/ui/src/components/display/doc-viewer/sheets.ts
|
|
1948
|
-
function
|
|
1951
|
+
function Ia(e, t) {
|
|
1949
1952
|
let n = e["!ref"] ?? "A1", r = (e) => {
|
|
1950
1953
|
let t = /^([A-Z]+)([1-9]\d*)$/.exec(e);
|
|
1951
1954
|
if (!t) throw new c("invalidFile");
|
|
@@ -2006,26 +2009,26 @@ function Na(e, t) {
|
|
|
2006
2009
|
};
|
|
2007
2010
|
}
|
|
2008
2011
|
// packages/ui/src/components/display/doc-viewer/CaDocViewer.vue?vue&type=script&setup=true&lang.ts
|
|
2009
|
-
var
|
|
2012
|
+
var La = ["aria-busy"], Ra = { class: "ca-doc-controls" }, za = { class: "ca-doc-filename" }, Ba = {
|
|
2010
2013
|
key: 1,
|
|
2011
2014
|
class: "ca-doc-state",
|
|
2012
2015
|
role: "alert"
|
|
2013
|
-
},
|
|
2016
|
+
}, Va = {
|
|
2014
2017
|
key: 0,
|
|
2015
2018
|
class: "ca-doc-state"
|
|
2016
|
-
},
|
|
2019
|
+
}, Ha = {
|
|
2017
2020
|
key: 1,
|
|
2018
2021
|
class: "ca-doc-state"
|
|
2019
|
-
},
|
|
2022
|
+
}, Ua = {
|
|
2020
2023
|
key: 2,
|
|
2021
2024
|
class: "ca-doc-markdown-layout"
|
|
2022
|
-
},
|
|
2025
|
+
}, Wa = ["aria-label"], Ga = ["href", "onClick"], Ka = ["innerHTML"], qa = {
|
|
2023
2026
|
key: 3,
|
|
2024
2027
|
class: "ca-doc-state"
|
|
2025
|
-
},
|
|
2028
|
+
}, Ja = {
|
|
2026
2029
|
key: 4,
|
|
2027
2030
|
class: "ca-doc-text"
|
|
2028
|
-
},
|
|
2031
|
+
}, Ya = ["aria-label"], Xa = ["aria-label"], Za = { key: 0 }, Qa = { key: 1 }, $a = /* @__PURE__ */ V({
|
|
2029
2032
|
__name: "CaDocViewer",
|
|
2030
2033
|
props: {
|
|
2031
2034
|
source: {},
|
|
@@ -2053,7 +2056,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2053
2056
|
"download"
|
|
2054
2057
|
],
|
|
2055
2058
|
setup(e, { emit: t }) {
|
|
2056
|
-
let n = Lt(() => import("./CaDocPdf-BMSfqmuh.js")), i = Lt(() => import("./CaDocWord-BYX69Eoh.js")), a = e, o = t, l = s(), d = "ca-doc-" + Jt().replace(/[^\w-]/g, "") + "-", f = G(), p = G(), m = G(!1), h = G(""), g = G([]), _ = G(""), v = G(""), y = G([]), b = G("unsupported"), x = qt(), S = qt(), C = qt(), w = G(""), T = G(2e3), E = G(0), D = P(() => a.filename ?? "document"), O = P(() => C.value && w.value ?
|
|
2059
|
+
let n = Lt(() => import("./CaDocPdf-BMSfqmuh.js")), i = Lt(() => import("./CaDocWord-BYX69Eoh.js")), a = e, o = t, l = s(), d = "ca-doc-" + Jt().replace(/[^\w-]/g, "") + "-", f = G(), p = G(), m = G(!1), h = G(""), g = G([]), _ = G(""), v = G(""), y = G([]), b = G("unsupported"), x = qt(), S = qt(), C = qt(), w = G(""), T = G(2e3), E = G(0), D = P(() => a.filename ?? "document"), O = P(() => C.value && w.value ? Ia(C.value.Sheets[w.value], T.value) : void 0), ee = P(() => a.loading || m.value), k = P(() => a.error || h.value), A = 0, j;
|
|
2057
2060
|
function M(e) {
|
|
2058
2061
|
let t = e instanceof Error ? e : Error(String(e));
|
|
2059
2062
|
h.value = t instanceof c ? l(`campus.doc.${t.key}`, { name: t.detail }) : l("campus.doc.renderFailed"), m.value = !1, o("error", t);
|
|
@@ -2121,7 +2124,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2121
2124
|
else {
|
|
2122
2125
|
m.value = !0;
|
|
2123
2126
|
try {
|
|
2124
|
-
let n = await
|
|
2127
|
+
let n = await ka(a.source, a, t);
|
|
2125
2128
|
if (t.aborted || e !== A) return;
|
|
2126
2129
|
if (S.value = n.blob, n.type === "legacy" && a.converter) {
|
|
2127
2130
|
let r = await a.converter({
|
|
@@ -2129,8 +2132,8 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2129
2132
|
filename: D.value
|
|
2130
2133
|
});
|
|
2131
2134
|
if (t.aborted || e !== A) return;
|
|
2132
|
-
let i =
|
|
2133
|
-
|
|
2135
|
+
let i = wa("file." + r.type, r.type);
|
|
2136
|
+
Ea(r.blob.size, Ta(i, a.maxSize)), n = {
|
|
2134
2137
|
blob: r.blob,
|
|
2135
2138
|
filename: n.filename,
|
|
2136
2139
|
type: i
|
|
@@ -2141,9 +2144,9 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2141
2144
|
return;
|
|
2142
2145
|
}
|
|
2143
2146
|
let r = await n.blob.arrayBuffer();
|
|
2144
|
-
if (
|
|
2147
|
+
if (Oa(r, n.type), t.aborted || e !== A) return;
|
|
2145
2148
|
if (n.type === "md") {
|
|
2146
|
-
let n = await
|
|
2149
|
+
let n = await Pa(Da(r), a.allowImages, d);
|
|
2147
2150
|
if (t.aborted || e !== A) return;
|
|
2148
2151
|
_.value = n.html, y.value = n.headings, g.value = n.warnings, await zt();
|
|
2149
2152
|
for (let r of n.diagrams) {
|
|
@@ -2165,16 +2168,16 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2165
2168
|
let i = await n.render(r.id, r.source);
|
|
2166
2169
|
if (t.aborted || e !== A) return;
|
|
2167
2170
|
let a = Array.from(p.value?.querySelectorAll("[data-ca-diagram]") ?? []).find((e) => e.dataset.caDiagram === r.id);
|
|
2168
|
-
a && (a.innerHTML =
|
|
2171
|
+
a && (a.innerHTML = Fa(i.svg));
|
|
2169
2172
|
} catch {
|
|
2170
2173
|
throw new c("diagramFailed");
|
|
2171
2174
|
}
|
|
2172
2175
|
}
|
|
2173
|
-
} else if (n.type === "txt") v.value =
|
|
2176
|
+
} else if (n.type === "txt") v.value = Da(r);
|
|
2174
2177
|
else if (n.type === "xlsx" || n.type === "csv") {
|
|
2175
2178
|
let i = await u("xlsx");
|
|
2176
2179
|
if (t.aborted || e !== A) return;
|
|
2177
|
-
let a = i.read(n.type === "csv" ?
|
|
2180
|
+
let a = i.read(n.type === "csv" ? Da(r) : r, {
|
|
2178
2181
|
type: n.type === "csv" ? "string" : "array",
|
|
2179
2182
|
raw: !0,
|
|
2180
2183
|
cellHTML: !1,
|
|
@@ -2182,7 +2185,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2182
2185
|
bookVBA: !1
|
|
2183
2186
|
});
|
|
2184
2187
|
if (!a.SheetNames.length) throw new c("invalidFile");
|
|
2185
|
-
for (let e of a.SheetNames)
|
|
2188
|
+
for (let e of a.SheetNames) Ia(a.Sheets[e], 1);
|
|
2186
2189
|
C.value = a, w.value = a.SheetNames[0];
|
|
2187
2190
|
} else {
|
|
2188
2191
|
x.value = r;
|
|
@@ -2205,20 +2208,20 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2205
2208
|
class: "ca-doc-viewer",
|
|
2206
2209
|
"aria-busy": ee.value
|
|
2207
2210
|
}, [
|
|
2208
|
-
R("div",
|
|
2211
|
+
R("div", Ra, [q(t.$slots, "toolbar", {}, () => [R("span", za, J(D.value), 1)]), B(Y(r), {
|
|
2209
2212
|
disabled: e.source === void 0,
|
|
2210
2213
|
onClick: ae
|
|
2211
2214
|
}, {
|
|
2212
2215
|
default: X(() => [z(J(Y(l)("campus.doc.download")), 1)]),
|
|
2213
2216
|
_: 1
|
|
2214
2217
|
}, 8, ["disabled"])]),
|
|
2215
|
-
ee.value ? (W(), F(Y(
|
|
2218
|
+
ee.value ? (W(), F(Y(Po), {
|
|
2216
2219
|
key: 0,
|
|
2217
2220
|
animated: "",
|
|
2218
2221
|
rows: 5,
|
|
2219
2222
|
"aria-label": Y(l)("campus.common.loading")
|
|
2220
2223
|
}, null, 8, ["aria-label"])) : I("v-if", !0),
|
|
2221
|
-
k.value ? (W(), L("div",
|
|
2224
|
+
k.value ? (W(), L("div", Ba, [R("p", null, J(k.value), 1), B(Y(r), { onClick: ne }, {
|
|
2222
2225
|
default: X(() => [z(J(Y(l)("campus.doc.retry")), 1)]),
|
|
2223
2226
|
_: 1
|
|
2224
2227
|
})])) : (W(), L(N, { key: 2 }, [
|
|
@@ -2226,8 +2229,8 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2226
2229
|
key: e,
|
|
2227
2230
|
role: "status"
|
|
2228
2231
|
}, J(Y(l)("campus.doc.dependency", { name: e })), 1))), 128)),
|
|
2229
|
-
e.source === void 0 ? (W(), L("div",
|
|
2230
|
-
b.value === "md" && _.value ? (W(), L("div",
|
|
2232
|
+
e.source === void 0 ? (W(), L("div", Va, [q(t.$slots, "empty", {}, () => [z(J(Y(l)("campus.doc.empty")), 1)])])) : !ee.value && (b.value === "legacy" || b.value === "unsupported") ? (W(), L("div", Ha, [q(t.$slots, "unsupported", { type: b.value }, () => [z(J(Y(l)(b.value === "legacy" ? "campus.doc.convert" : "campus.doc.unsupported")), 1)])])) : I("v-if", !0),
|
|
2233
|
+
b.value === "md" && _.value ? (W(), L("div", Ua, [e.toc && y.value.length ? (W(), L("nav", {
|
|
2231
2234
|
key: 0,
|
|
2232
2235
|
class: "ca-doc-toc",
|
|
2233
2236
|
"aria-label": Y(l)("campus.doc.toc")
|
|
@@ -2236,13 +2239,13 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2236
2239
|
href: "#" + e.id,
|
|
2237
2240
|
style: U({ paddingInlineStart: (e.level - 1) * 10 + "px" }),
|
|
2238
2241
|
onClick: $t((t) => re(e.id), ["prevent"])
|
|
2239
|
-
}, J(e.text), 13,
|
|
2242
|
+
}, J(e.text), 13, Ga))), 128))], 8, Wa)) : I("v-if", !0), R("article", {
|
|
2240
2243
|
ref_key: "body",
|
|
2241
2244
|
ref: p,
|
|
2242
2245
|
class: "ca-doc-markdown",
|
|
2243
2246
|
onClick: ie,
|
|
2244
2247
|
innerHTML: _.value
|
|
2245
|
-
}, null, 8,
|
|
2248
|
+
}, null, 8, Ka)])) : b.value === "md" && !ee.value ? (W(), L("div", qa, J(Y(l)("campus.doc.empty")), 1)) : b.value === "txt" ? (W(), L("pre", Ja, J(v.value), 1)) : I("v-if", !0),
|
|
2246
2249
|
C.value && O.value ? (W(), L(N, { key: 5 }, [
|
|
2247
2250
|
R("div", {
|
|
2248
2251
|
class: "ca-doc-controls",
|
|
@@ -2261,7 +2264,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2261
2264
|
"aria-selected",
|
|
2262
2265
|
"type",
|
|
2263
2266
|
"onClick"
|
|
2264
|
-
]))), 128))], 8,
|
|
2267
|
+
]))), 128))], 8, Ya),
|
|
2265
2268
|
R("div", {
|
|
2266
2269
|
class: "ca-doc-sheet",
|
|
2267
2270
|
role: "region",
|
|
@@ -2274,11 +2277,11 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2274
2277
|
}, {
|
|
2275
2278
|
default: X(() => [z(J(e.text), 1)]),
|
|
2276
2279
|
_: 2
|
|
2277
|
-
}, 1032, ["colspan", "rowspan"]))), 128))]))), 128))])])], 8,
|
|
2278
|
-
O.value.shown < O.value.total ? (W(), L("p",
|
|
2280
|
+
}, 1032, ["colspan", "rowspan"]))), 128))]))), 128))])])], 8, Xa),
|
|
2281
|
+
O.value.shown < O.value.total ? (W(), L("p", Za, [z(J(Y(l)("campus.doc.rows", {
|
|
2279
2282
|
shown: O.value.shown,
|
|
2280
2283
|
total: O.value.total
|
|
2281
|
-
})) + " ", 1), O.value.capped ? (W(), L("span",
|
|
2284
|
+
})) + " ", 1), O.value.capped ? (W(), L("span", Qa, J(Y(l)("campus.doc.complex")), 1)) : (W(), F(Y(r), {
|
|
2282
2285
|
key: 0,
|
|
2283
2286
|
onClick: a[0] ||= (e) => T.value += 2e3
|
|
2284
2287
|
}, {
|
|
@@ -2300,18 +2303,18 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2300
2303
|
onError: M
|
|
2301
2304
|
}, null, 8, ["data"])) : I("v-if", !0)
|
|
2302
2305
|
], 64))
|
|
2303
|
-
], 8,
|
|
2306
|
+
], 8, La));
|
|
2304
2307
|
}
|
|
2305
|
-
}),
|
|
2306
|
-
CaPopover:
|
|
2307
|
-
CaPopconfirm:
|
|
2308
|
-
CaTooltip:
|
|
2309
|
-
CaDialog:
|
|
2310
|
-
CaDrawer:
|
|
2311
|
-
},
|
|
2308
|
+
}), eo = e(me), to = e(ge), no = e(Ge), ro = e(We), io = e(Tt), ao = {
|
|
2309
|
+
CaPopover: no,
|
|
2310
|
+
CaPopconfirm: ro,
|
|
2311
|
+
CaTooltip: io,
|
|
2312
|
+
CaDialog: eo,
|
|
2313
|
+
CaDrawer: to
|
|
2314
|
+
}, oo = {
|
|
2312
2315
|
key: 0,
|
|
2313
2316
|
class: "ca-doc-meta"
|
|
2314
|
-
},
|
|
2317
|
+
}, so = { class: "ca-doc-dialog-content" }, co = /* @__PURE__ */ V({
|
|
2315
2318
|
inheritAttrs: !1,
|
|
2316
2319
|
__name: "CaDocDialog",
|
|
2317
2320
|
props: {
|
|
@@ -2346,7 +2349,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2346
2349
|
localStorage.setItem("ca-doc-expanded", String(o.value));
|
|
2347
2350
|
} catch {}
|
|
2348
2351
|
}
|
|
2349
|
-
return (t, n) => (W(), F(Y(
|
|
2352
|
+
return (t, n) => (W(), F(Y(eo), {
|
|
2350
2353
|
"model-value": e.modelValue,
|
|
2351
2354
|
title: e.title || e.filename || Y(a)("campus.doc.title"),
|
|
2352
2355
|
width: "min(900px, 90vw)",
|
|
@@ -2369,7 +2372,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2369
2372
|
default: X(() => [z(J(Y(a)(o.value ? "campus.doc.restore" : "campus.doc.expand")), 1)]),
|
|
2370
2373
|
_: 1
|
|
2371
2374
|
}, 8, ["aria-pressed"])], 32)]),
|
|
2372
|
-
default: X(() => [e.meta ? (W(), L("dl",
|
|
2375
|
+
default: X(() => [e.meta ? (W(), L("dl", oo, [(W(!0), L(N, null, K(e.meta, (e, t) => (W(), L(N, { key: t }, [R("dt", null, J(t), 1), R("dd", null, J(e), 1)], 64))), 128))])) : I("v-if", !0), R("div", so, [B($a, Bt(Rt({
|
|
2373
2376
|
...c.value,
|
|
2374
2377
|
...t.$attrs
|
|
2375
2378
|
})), It({ _: 2 }, [K(t.$slots, (e, n) => ({
|
|
@@ -2383,13 +2386,13 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2383
2386
|
"fullscreen"
|
|
2384
2387
|
]));
|
|
2385
2388
|
}
|
|
2386
|
-
}),
|
|
2389
|
+
}), lo = { class: "ca-stat ca-card" }, uo = { class: "ca-stat__head" }, fo = { class: "ca-stat__title" }, po = {
|
|
2387
2390
|
key: 0,
|
|
2388
2391
|
class: "ca-stat__tag"
|
|
2389
|
-
},
|
|
2392
|
+
}, mo = { class: "ca-stat__value" }, ho = {
|
|
2390
2393
|
key: 0,
|
|
2391
2394
|
class: "ca-stat__hint"
|
|
2392
|
-
},
|
|
2395
|
+
}, go = /*#__PURE__*/ l(/* @__PURE__ */ V({
|
|
2393
2396
|
__name: "CaStatCard",
|
|
2394
2397
|
props: {
|
|
2395
2398
|
title: {},
|
|
@@ -2400,16 +2403,16 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2400
2403
|
},
|
|
2401
2404
|
setup(e) {
|
|
2402
2405
|
let t = e, n = P(() => t.trend === void 0 ? "" : `${t.trend >= 0 ? "↑" : "↓"} ${Math.abs(t.trend)}%`);
|
|
2403
|
-
return (t, r) => (W(), L("div",
|
|
2404
|
-
R("div",
|
|
2405
|
-
R("div",
|
|
2406
|
+
return (t, r) => (W(), L("div", lo, [
|
|
2407
|
+
R("div", uo, [R("span", fo, J(e.title), 1), e.tag ? (W(), L("span", po, J(e.tag), 1)) : I("v-if", !0)]),
|
|
2408
|
+
R("div", mo, [z(J(e.value) + " ", 1), n.value ? (W(), L("span", {
|
|
2406
2409
|
key: 0,
|
|
2407
2410
|
class: H(["ca-stat__trend", e.trend >= 0 ? "is-up" : "is-down"])
|
|
2408
2411
|
}, J(n.value), 3)) : I("v-if", !0)]),
|
|
2409
|
-
e.hint || t.$slots.default ? (W(), L("div",
|
|
2412
|
+
e.hint || t.$slots.default ? (W(), L("div", ho, [q(t.$slots, "default", {}, () => [z(J(e.hint), 1)], !0)])) : I("v-if", !0)
|
|
2410
2413
|
]));
|
|
2411
2414
|
}
|
|
2412
|
-
}), [["__scopeId", "data-v-
|
|
2415
|
+
}), [["__scopeId", "data-v-b1165200"]]), _o = /*#__PURE__*/ l(/* @__PURE__ */ V({
|
|
2413
2416
|
__name: "CaStatusTag",
|
|
2414
2417
|
props: {
|
|
2415
2418
|
value: {},
|
|
@@ -2422,58 +2425,59 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2422
2425
|
});
|
|
2423
2426
|
return (e, t) => (W(), F(Y(yt), {
|
|
2424
2427
|
type: n.value.type ?? "info",
|
|
2425
|
-
|
|
2428
|
+
class: "ca-status-tag",
|
|
2429
|
+
effect: "plain",
|
|
2426
2430
|
size: "small"
|
|
2427
2431
|
}, {
|
|
2428
2432
|
default: X(() => [z(J(n.value.label), 1)]),
|
|
2429
2433
|
_: 1
|
|
2430
2434
|
}, 8, ["type"]));
|
|
2431
2435
|
}
|
|
2432
|
-
}),
|
|
2433
|
-
CaAvatar:
|
|
2434
|
-
CaAvatarGroup:
|
|
2435
|
-
CaBadge:
|
|
2436
|
-
CaCalendar:
|
|
2437
|
-
CaCarousel:
|
|
2438
|
-
CaCarouselItem:
|
|
2439
|
-
CaCollapse:
|
|
2440
|
-
CaCollapseItem:
|
|
2441
|
-
CaDescriptions:
|
|
2442
|
-
CaDescriptionsItem:
|
|
2443
|
-
CaEmpty:
|
|
2444
|
-
CaImage:
|
|
2445
|
-
CaImageViewer:
|
|
2446
|
-
CaPagination:
|
|
2447
|
-
CaProgress:
|
|
2448
|
-
CaResult:
|
|
2449
|
-
CaSkeleton:
|
|
2450
|
-
CaSkeletonItem:
|
|
2451
|
-
CaTimeline:
|
|
2452
|
-
CaTimelineItem:
|
|
2453
|
-
CaTour:
|
|
2454
|
-
CaTourStep:
|
|
2455
|
-
CaTree:
|
|
2456
|
-
CaTreeV2:
|
|
2457
|
-
CaSegmented:
|
|
2458
|
-
CaStatistic:
|
|
2459
|
-
CaCountdown:
|
|
2460
|
-
CaCheckTag:
|
|
2461
|
-
CaDocViewer:
|
|
2462
|
-
CaDocDialog:
|
|
2463
|
-
CaStatCard:
|
|
2464
|
-
CaStatusTag:
|
|
2465
|
-
},
|
|
2466
|
-
CaContainer:
|
|
2467
|
-
CaHeader:
|
|
2468
|
-
CaAside:
|
|
2469
|
-
CaMain:
|
|
2470
|
-
CaFooter:
|
|
2471
|
-
CaRow:
|
|
2472
|
-
CaCol:
|
|
2473
|
-
CaSpace:
|
|
2474
|
-
CaSplitter:
|
|
2475
|
-
CaSplitterPanel:
|
|
2476
|
-
},
|
|
2436
|
+
}), [["__scopeId", "data-v-ed0d252f"]]), vo = e(v), yo = e(y), bo = e(x), xo = e(T), So = e(D), Co = e(O), wo = e(re), To = e(ie), Eo = e(fe), Do = e(pe), Oo = e(be), ko = e(Ee), Ao = e(De), jo = e(Ue), Mo = e(Ke), No = e(Ze), Po = e(rt), Fo = e(it), Io = e(Ct), Lo = e(wt), Ro = e(Et), zo = e(Dt), Bo = e(kt), Vo = e(jt), Ho = e(et), Uo = e(lt), Wo = e(le), Go = e(A), Ko = {
|
|
2437
|
+
CaAvatar: vo,
|
|
2438
|
+
CaAvatarGroup: yo,
|
|
2439
|
+
CaBadge: bo,
|
|
2440
|
+
CaCalendar: xo,
|
|
2441
|
+
CaCarousel: So,
|
|
2442
|
+
CaCarouselItem: Co,
|
|
2443
|
+
CaCollapse: wo,
|
|
2444
|
+
CaCollapseItem: To,
|
|
2445
|
+
CaDescriptions: Eo,
|
|
2446
|
+
CaDescriptionsItem: Do,
|
|
2447
|
+
CaEmpty: Oo,
|
|
2448
|
+
CaImage: ko,
|
|
2449
|
+
CaImageViewer: Ao,
|
|
2450
|
+
CaPagination: jo,
|
|
2451
|
+
CaProgress: Mo,
|
|
2452
|
+
CaResult: No,
|
|
2453
|
+
CaSkeleton: Po,
|
|
2454
|
+
CaSkeletonItem: Fo,
|
|
2455
|
+
CaTimeline: Io,
|
|
2456
|
+
CaTimelineItem: Lo,
|
|
2457
|
+
CaTour: Ro,
|
|
2458
|
+
CaTourStep: zo,
|
|
2459
|
+
CaTree: Bo,
|
|
2460
|
+
CaTreeV2: Vo,
|
|
2461
|
+
CaSegmented: Ho,
|
|
2462
|
+
CaStatistic: Uo,
|
|
2463
|
+
CaCountdown: Wo,
|
|
2464
|
+
CaCheckTag: Go,
|
|
2465
|
+
CaDocViewer: $a,
|
|
2466
|
+
CaDocDialog: co,
|
|
2467
|
+
CaStatCard: go,
|
|
2468
|
+
CaStatusTag: _o
|
|
2469
|
+
}, qo = e(ce), Jo = e(we), Yo = e(h), Xo = e(Fe), Zo = e(xe), Qo = e(Qe), $o = e(ne), es = e(ot), ts = e(st), ns = e(ct), rs = {
|
|
2470
|
+
CaContainer: qo,
|
|
2471
|
+
CaHeader: Jo,
|
|
2472
|
+
CaAside: Yo,
|
|
2473
|
+
CaMain: Xo,
|
|
2474
|
+
CaFooter: Zo,
|
|
2475
|
+
CaRow: Qo,
|
|
2476
|
+
CaCol: $o,
|
|
2477
|
+
CaSpace: es,
|
|
2478
|
+
CaSplitter: ts,
|
|
2479
|
+
CaSplitterPanel: ns
|
|
2480
|
+
}, is = /*#__PURE__*/ l(/* @__PURE__ */ V({
|
|
2477
2481
|
__name: "CaSchemaForm",
|
|
2478
2482
|
props: {
|
|
2479
2483
|
fields: {},
|
|
@@ -2525,6 +2529,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2525
2529
|
}), (t, n) => (W(), F(Y(Se), {
|
|
2526
2530
|
ref_key: "formRef",
|
|
2527
2531
|
ref: o,
|
|
2532
|
+
class: "ca-schema-form",
|
|
2528
2533
|
model: e.modelValue,
|
|
2529
2534
|
rules: l.value,
|
|
2530
2535
|
"label-width": e.labelWidth,
|
|
@@ -2605,7 +2610,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2605
2610
|
}), B(Y(w), { onClick: d }, {
|
|
2606
2611
|
default: X(() => [z(J(Y(a)("campus.form.reset")), 1)]),
|
|
2607
2612
|
_: 1
|
|
2608
|
-
})])]),
|
|
2613
|
+
})], !0)]),
|
|
2609
2614
|
_: 3
|
|
2610
2615
|
}))]),
|
|
2611
2616
|
_: 3
|
|
@@ -2615,41 +2620,41 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2615
2620
|
"label-width"
|
|
2616
2621
|
]));
|
|
2617
2622
|
}
|
|
2618
|
-
}),
|
|
2619
|
-
CaAutocomplete:
|
|
2620
|
-
CaCascader:
|
|
2621
|
-
CaCascaderPanel:
|
|
2622
|
-
CaCheckbox:
|
|
2623
|
-
CaCheckboxGroup:
|
|
2624
|
-
CaCheckboxButton:
|
|
2625
|
-
CaColorPickerPanel:
|
|
2626
|
-
CaDatePickerPanel:
|
|
2627
|
-
CaInputTag:
|
|
2628
|
-
CaInputOtp:
|
|
2629
|
-
CaMention:
|
|
2630
|
-
CaRate:
|
|
2631
|
-
CaSelectV2:
|
|
2632
|
-
CaSlider:
|
|
2633
|
-
CaTimePicker:
|
|
2634
|
-
CaTimeSelect:
|
|
2635
|
-
CaTransfer:
|
|
2636
|
-
CaTreeSelect:
|
|
2637
|
-
CaUpload:
|
|
2638
|
-
CaOptionGroup:
|
|
2639
|
-
CaRadio:
|
|
2640
|
-
CaColorPicker:
|
|
2641
|
-
CaDatePicker:
|
|
2642
|
-
CaForm:
|
|
2643
|
-
CaFormItem:
|
|
2644
|
-
CaInput:
|
|
2645
|
-
CaInputNumber:
|
|
2646
|
-
CaOption:
|
|
2647
|
-
CaRadioButton:
|
|
2648
|
-
CaRadioGroup:
|
|
2649
|
-
CaSelect:
|
|
2650
|
-
CaSwitch:
|
|
2651
|
-
CaSchemaForm:
|
|
2652
|
-
},
|
|
2623
|
+
}), [["__scopeId", "data-v-b8516b8d"]]), as = e(ae), os = e(ue), ss = e(Se), cs = e(Ce), ls = e(ke), us = e(Ae), ds = e(Be), fs = e(Je), ps = e(Ye), ms = e(tt), hs = e(pt), gs = e(_), _s = e(ee), vs = e(k), ys = e(j), bs = e(te), xs = e(M), Ss = e(oe), Cs = e(de), ws = e(Me), Ts = e(je), Es = e(Ie), Ds = e(Xe), Os = e(nt), ks = e(at), As = e(xt), js = e(St), Ms = e(Ot), Ns = e(At), Ps = e(Mt), Fs = e(Ve), Is = e(qe), Ls = {
|
|
2624
|
+
CaAutocomplete: gs,
|
|
2625
|
+
CaCascader: _s,
|
|
2626
|
+
CaCascaderPanel: vs,
|
|
2627
|
+
CaCheckbox: ys,
|
|
2628
|
+
CaCheckboxGroup: bs,
|
|
2629
|
+
CaCheckboxButton: xs,
|
|
2630
|
+
CaColorPickerPanel: Ss,
|
|
2631
|
+
CaDatePickerPanel: Cs,
|
|
2632
|
+
CaInputTag: ws,
|
|
2633
|
+
CaInputOtp: Ts,
|
|
2634
|
+
CaMention: Es,
|
|
2635
|
+
CaRate: Ds,
|
|
2636
|
+
CaSelectV2: Os,
|
|
2637
|
+
CaSlider: ks,
|
|
2638
|
+
CaTimePicker: As,
|
|
2639
|
+
CaTimeSelect: js,
|
|
2640
|
+
CaTransfer: Ms,
|
|
2641
|
+
CaTreeSelect: Ns,
|
|
2642
|
+
CaUpload: Ps,
|
|
2643
|
+
CaOptionGroup: Fs,
|
|
2644
|
+
CaRadio: Is,
|
|
2645
|
+
CaColorPicker: as,
|
|
2646
|
+
CaDatePicker: os,
|
|
2647
|
+
CaForm: ss,
|
|
2648
|
+
CaFormItem: cs,
|
|
2649
|
+
CaInput: ls,
|
|
2650
|
+
CaInputNumber: us,
|
|
2651
|
+
CaOption: ds,
|
|
2652
|
+
CaRadioButton: fs,
|
|
2653
|
+
CaRadioGroup: ps,
|
|
2654
|
+
CaSelect: ms,
|
|
2655
|
+
CaSwitch: hs,
|
|
2656
|
+
CaSchemaForm: is
|
|
2657
|
+
}, Rs = /* @__PURE__ */ V({
|
|
2653
2658
|
__name: "CaMenu",
|
|
2654
2659
|
setup(e, { expose: t }) {
|
|
2655
2660
|
let n = G();
|
|
@@ -2665,29 +2670,32 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2665
2670
|
_: 3
|
|
2666
2671
|
}, 512));
|
|
2667
2672
|
}
|
|
2668
|
-
}),
|
|
2669
|
-
CaAffix:
|
|
2670
|
-
CaAnchor:
|
|
2671
|
-
CaAnchorLink:
|
|
2672
|
-
CaBacktop:
|
|
2673
|
-
CaPageHeader:
|
|
2674
|
-
CaSteps:
|
|
2675
|
-
CaStep:
|
|
2676
|
-
CaTabs:
|
|
2677
|
-
CaTabPane:
|
|
2678
|
-
CaMenuItemGroup:
|
|
2679
|
-
CaBreadcrumb:
|
|
2680
|
-
CaBreadcrumbItem:
|
|
2681
|
-
CaDropdown:
|
|
2682
|
-
CaDropdownItem:
|
|
2683
|
-
CaDropdownMenu:
|
|
2684
|
-
CaMenu:
|
|
2685
|
-
CaMenuItem:
|
|
2686
|
-
CaSubMenu:
|
|
2687
|
-
},
|
|
2673
|
+
}), zs = e(S), Bs = e(C), Vs = e(_e), Hs = e(ve), Us = e(ye), Ws = e(Re), Gs = e(ft), Ks = e(d), qs = e(p), Js = e(m), Ys = e(b), Xs = e(He), Zs = e(dt), Qs = e(ut), $s = e(vt), ec = e(mt), tc = e(ze), nc = {
|
|
2674
|
+
CaAffix: Ks,
|
|
2675
|
+
CaAnchor: qs,
|
|
2676
|
+
CaAnchorLink: Js,
|
|
2677
|
+
CaBacktop: Ys,
|
|
2678
|
+
CaPageHeader: Xs,
|
|
2679
|
+
CaSteps: Zs,
|
|
2680
|
+
CaStep: Qs,
|
|
2681
|
+
CaTabs: $s,
|
|
2682
|
+
CaTabPane: ec,
|
|
2683
|
+
CaMenuItemGroup: tc,
|
|
2684
|
+
CaBreadcrumb: zs,
|
|
2685
|
+
CaBreadcrumbItem: Bs,
|
|
2686
|
+
CaDropdown: Vs,
|
|
2687
|
+
CaDropdownItem: Hs,
|
|
2688
|
+
CaDropdownMenu: Us,
|
|
2689
|
+
CaMenu: Rs,
|
|
2690
|
+
CaMenuItem: Ws,
|
|
2691
|
+
CaSubMenu: Gs
|
|
2692
|
+
}, rc = { class: "ca-data-table ca-card" }, ic = {
|
|
2688
2693
|
key: 1,
|
|
2689
2694
|
class: "ca-data-table__toolbar"
|
|
2690
|
-
},
|
|
2695
|
+
}, ac = ["aria-busy"], oc = { class: "ca-data-table__footer" }, sc = {
|
|
2696
|
+
class: "ca-data-table__total",
|
|
2697
|
+
"aria-live": "polite"
|
|
2698
|
+
}, cc = /*#__PURE__*/ l(/* @__PURE__ */ V({
|
|
2691
2699
|
__name: "CaDataTable",
|
|
2692
2700
|
props: {
|
|
2693
2701
|
columns: {},
|
|
@@ -2750,11 +2758,11 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2750
2758
|
}), t({
|
|
2751
2759
|
reload: y,
|
|
2752
2760
|
reset: x
|
|
2753
|
-
}), (t, n) => (W(), L("div",
|
|
2761
|
+
}), (t, n) => (W(), L("div", rc, [
|
|
2754
2762
|
e.search?.length ? (W(), F(Y(Se), {
|
|
2755
2763
|
key: 0,
|
|
2756
2764
|
class: "ca-data-table__search",
|
|
2757
|
-
|
|
2765
|
+
"label-position": "top",
|
|
2758
2766
|
onSubmit: $t(b, ["prevent"])
|
|
2759
2767
|
}, {
|
|
2760
2768
|
default: X(() => [(W(!0), L(N, null, K(e.search, (e) => (W(), F(Y(Ce), {
|
|
@@ -2767,7 +2775,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2767
2775
|
"onUpdate:modelValue": (t) => c[e.prop] = t,
|
|
2768
2776
|
placeholder: e.placeholder,
|
|
2769
2777
|
clearable: "",
|
|
2770
|
-
|
|
2778
|
+
class: "ca-data-table__filter"
|
|
2771
2779
|
}, {
|
|
2772
2780
|
default: X(() => [(W(!0), L(N, null, K(e.options, (e) => (W(), F(Y(Be), {
|
|
2773
2781
|
key: String(e.value),
|
|
@@ -2786,7 +2794,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2786
2794
|
type: "date",
|
|
2787
2795
|
"value-format": "YYYY-MM-DD",
|
|
2788
2796
|
placeholder: e.placeholder,
|
|
2789
|
-
|
|
2797
|
+
class: "ca-data-table__filter"
|
|
2790
2798
|
}, null, 8, [
|
|
2791
2799
|
"modelValue",
|
|
2792
2800
|
"onUpdate:modelValue",
|
|
@@ -2797,14 +2805,14 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2797
2805
|
"onUpdate:modelValue": (t) => c[e.prop] = t,
|
|
2798
2806
|
placeholder: e.placeholder,
|
|
2799
2807
|
clearable: "",
|
|
2800
|
-
|
|
2808
|
+
class: "ca-data-table__filter"
|
|
2801
2809
|
}, null, 8, [
|
|
2802
2810
|
"modelValue",
|
|
2803
2811
|
"onUpdate:modelValue",
|
|
2804
2812
|
"placeholder"
|
|
2805
2813
|
]))]),
|
|
2806
2814
|
_: 2
|
|
2807
|
-
}, 1032, ["label"]))), 128)), B(Y(Ce),
|
|
2815
|
+
}, 1032, ["label"]))), 128)), B(Y(Ce), { class: "ca-data-table__search-actions" }, {
|
|
2808
2816
|
default: X(() => [B(Y(w), {
|
|
2809
2817
|
type: "primary",
|
|
2810
2818
|
"native-type": "submit"
|
|
@@ -2819,7 +2827,7 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2819
2827
|
})]),
|
|
2820
2828
|
_: 1
|
|
2821
2829
|
})) : I("v-if", !0),
|
|
2822
|
-
t.$slots.toolbar ? (W(), L("div",
|
|
2830
|
+
t.$slots.toolbar ? (W(), L("div", ic, [q(t.$slots, "toolbar", { reload: y }, void 0, !0)])) : I("v-if", !0),
|
|
2823
2831
|
h.value ? (W(), F(Y(f), {
|
|
2824
2832
|
key: 2,
|
|
2825
2833
|
type: "error",
|
|
@@ -2837,7 +2845,10 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2837
2845
|
})]),
|
|
2838
2846
|
_: 1
|
|
2839
2847
|
}, 8, ["title"])) : I("v-if", !0),
|
|
2840
|
-
R("div",
|
|
2848
|
+
R("div", {
|
|
2849
|
+
class: "ca-data-table__table-scroll",
|
|
2850
|
+
"aria-busy": m.value
|
|
2851
|
+
}, [Qt((W(), F(Y(ht), {
|
|
2841
2852
|
ref_key: "tableRef",
|
|
2842
2853
|
ref: g,
|
|
2843
2854
|
data: d.value,
|
|
@@ -2890,8 +2901,8 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2890
2901
|
"data",
|
|
2891
2902
|
"row-key",
|
|
2892
2903
|
"empty-text"
|
|
2893
|
-
])), [[Y(Pt), m.value]])]),
|
|
2894
|
-
R("div",
|
|
2904
|
+
])), [[Y(Pt), m.value]])], 8, ac),
|
|
2905
|
+
R("div", oc, [R("span", sc, J(Y(a)("campus.table.total", { total: p.value })), 1), B(Y(Ue), {
|
|
2895
2906
|
"current-page": l.value,
|
|
2896
2907
|
"onUpdate:currentPage": n[1] ||= (e) => l.value = e,
|
|
2897
2908
|
"page-size": u.value,
|
|
@@ -2913,15 +2924,15 @@ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc
|
|
|
2913
2924
|
])])
|
|
2914
2925
|
]));
|
|
2915
2926
|
}
|
|
2916
|
-
}), [["__scopeId", "data-v-
|
|
2917
|
-
CaTable:
|
|
2918
|
-
CaTableColumn:
|
|
2919
|
-
CaTableV2:
|
|
2920
|
-
CaAutoResizer:
|
|
2921
|
-
CaDataTable:
|
|
2922
|
-
},
|
|
2923
|
-
function
|
|
2927
|
+
}), [["__scopeId", "data-v-ffa7e543"]]), lc = e(ht), uc = e(gt), dc = e(_t), fc = e(g), pc = {
|
|
2928
|
+
CaTable: lc,
|
|
2929
|
+
CaTableColumn: uc,
|
|
2930
|
+
CaTableV2: dc,
|
|
2931
|
+
CaAutoResizer: fc,
|
|
2932
|
+
CaDataTable: cc
|
|
2933
|
+
}, mc = nr(gr, n, xa, Ca, Ko, Ls, rs, nc, ao, pc), hc = {}, gc = nr(hc), _c = {}, vc = {}, yc = {}, bc = {}, xc = {}, Sc = nr(_c, vc, yc, bc, xc), Cc = nr(mc, Sc, gc);
|
|
2934
|
+
function wc(e) {
|
|
2924
2935
|
e.directive("ca-loading", Pe), e.directive("ca-infinite-scroll", Oe);
|
|
2925
|
-
for (let [t, n] of Object.entries(
|
|
2936
|
+
for (let [t, n] of Object.entries(Cc)) e.component(t, n);
|
|
2926
2937
|
}
|
|
2927
|
-
export {
|
|
2938
|
+
export { Ks as CaAffix, cr as CaAlert, qs as CaAnchor, Js as CaAnchorLink, Yo as CaAside, fc as CaAutoResizer, gs as CaAutocomplete, vo as CaAvatar, yo as CaAvatarGroup, Ys as CaBacktop, bo as CaBadge, Vi as CaBarChart, zs as CaBreadcrumb, Bs as CaBreadcrumbItem, r as CaButton, t as CaButtonGroup, xo as CaCalendar, lr as CaCard, So as CaCarousel, Co as CaCarouselItem, _s as CaCascader, vs as CaCascaderPanel, Go as CaCheckTag, ys as CaCheckbox, xs as CaCheckboxButton, bs as CaCheckboxGroup, $o as CaCol, wo as CaCollapse, To as CaCollapseItem, as as CaColorPicker, Ss as CaColorPickerPanel, Sa as CaConfigProvider, qo as CaContainer, Wo as CaCountdown, cc as CaDataTable, os as CaDatePicker, Cs as CaDatePickerPanel, Eo as CaDescriptions, Do as CaDescriptionsItem, eo as CaDialog, mr as CaDivider, co as CaDocDialog, $a as CaDocViewer, to as CaDrawer, Vs as CaDropdown, Hs as CaDropdownItem, Us as CaDropdownMenu, Oo as CaEmpty, Zo as CaFooter, ss as CaForm, cs as CaFormItem, ba as CaGauge, Jo as CaHeader, ar as CaIcon, ko as CaImage, Ao as CaImageViewer, ls as CaInput, us as CaInputNumber, Ts as CaInputOtp, ws as CaInputTag, Si as CaLineChart, dr as CaLink, Xo as CaMain, Es as CaMention, Rs as CaMenu, Ws as CaMenuItem, tc as CaMenuItemGroup, ds as CaOption, Fs as CaOptionGroup, sr as CaPageActions, Xs as CaPageHeader, jo as CaPagination, na as CaPieChart, ro as CaPopconfirm, no as CaPopover, Mo as CaProgress, Is as CaRadio, fs as CaRadioButton, ps as CaRadioGroup, Ds as CaRate, No as CaResult, Qo as CaRow, is as CaSchemaForm, pr as CaScrollbar, Ho as CaSegmented, ms as CaSelect, Os as CaSelectV2, Po as CaSkeleton, Fo as CaSkeletonItem, ks as CaSlider, es as CaSpace, pa as CaSparkline, ts as CaSplitter, ns as CaSplitterPanel, go as CaStatCard, Uo as CaStatistic, _o as CaStatusTag, Qs as CaStep, Zs as CaSteps, Gs as CaSubMenu, hs as CaSwitch, ec as CaTabPane, lc as CaTable, uc as CaTableColumn, dc as CaTableV2, $s as CaTabs, ur as CaTag, fr as CaText, As as CaTimePicker, js as CaTimeSelect, Io as CaTimeline, Lo as CaTimelineItem, io as CaTooltip, Ro as CaTour, zo as CaTourStep, Ms as CaTransfer, Bo as CaTree, Ns as CaTreeSelect, Vo as CaTreeV2, Ps as CaUpload, hr as CaWatermark, ir as ICONS, gr as basicComponents, n as buttonComponents, Sc as campusRegistry, _c as cardComponents, xa as chartComponents, mc as componentRegistry, Ca as configComponents, Ko as displayComponents, Ls as formComponents, wc as installUi, rs as layoutComponents, nc as navigationComponents, gc as omsRegistry, hc as omsSchoolComponents, ao as overlayComponents, vc as parentComponents, o as registerDocLoader, yc as studentComponents, pc as tableComponents, bc as teacherComponents, xc as telComponents, i as translateKey, Cc as uiComponents, s as useTranslate };
|