@campus-admin/ui 1.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -335
- package/dist/campus/card/index.d.ts +9 -0
- package/dist/campus/index.d.ts +7 -0
- package/dist/campus/parent/index.d.ts +9 -0
- package/dist/campus/student/index.d.ts +9 -0
- package/dist/campus/teacher/index.d.ts +9 -0
- package/dist/campus/tel/index.d.ts +9 -0
- package/dist/{base/empty/src/empty.vue.d.ts → components/basic/CaIcon.vue.d.ts} +4 -7
- package/dist/components/basic/CaPageActions.vue.d.ts +15 -0
- package/dist/components/basic/icons.d.ts +48 -0
- package/dist/components/basic/index.d.ts +838 -0
- package/dist/components/button/index.d.ts +348 -0
- package/dist/components/chart/bar-chart/CaBarChart.vue.d.ts +31 -0
- package/dist/components/chart/chart-math.d.ts +178 -0
- package/dist/components/chart/gauge/CaGauge.vue.d.ts +31 -0
- package/dist/components/chart/index.d.ts +195 -0
- package/dist/components/chart/line-chart/CaLineChart.vue.d.ts +40 -0
- package/dist/components/chart/parts/ChartLegend.vue.d.ts +28 -0
- package/dist/{atom/slogan/src/slogan.vue.d.ts → components/chart/parts/ChartStatus.vue.d.ts} +3 -5
- package/dist/components/chart/parts/ChartTable.vue.d.ts +19 -0
- package/dist/components/chart/parts/ChartTooltip.vue.d.ts +23 -0
- package/dist/components/chart/pie-chart/CaPieChart.vue.d.ts +25 -0
- package/dist/components/chart/sparkline/CaSparkline.vue.d.ts +20 -0
- package/dist/components/chart/use-chart.d.ts +36 -0
- package/dist/components/config/CaConfigProvider.vue.d.ts +16 -0
- package/dist/components/config/index.d.ts +33 -0
- package/dist/components/display/index.d.ts +99 -0
- package/dist/{base/copyright/src/copyright.vue.d.ts → components/display/stat-card/CaStatCard.vue.d.ts} +7 -11
- package/dist/{base/skeleton/src/skeleton.vue.d.ts → components/display/status-tag/CaStatusTag.vue.d.ts} +4 -7
- package/dist/components/display/types.d.ts +7 -0
- package/dist/components/form/index.d.ts +112 -0
- package/dist/components/form/schema-form/CaSchemaForm.vue.d.ts +31 -0
- package/dist/components/form/types.d.ts +17 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/layout/index.d.ts +34 -0
- package/dist/components/navigation/CaMenu.vue.d.ts +13 -0
- package/dist/components/navigation/index.d.ts +64 -0
- package/dist/components/overlay/index.d.ts +1511 -0
- package/dist/components/table/data-table/CaDataTable.vue.d.ts +49 -0
- package/dist/components/table/index.d.ts +33 -0
- package/dist/components/table/types.d.ts +46 -0
- package/dist/index.d.ts +21 -1106
- package/dist/index.js +2187 -0
- package/dist/oms/index.d.ts +3 -0
- package/dist/oms/school/index.d.ts +10 -0
- package/dist/shared/inject.d.ts +8 -0
- package/dist/shared/registry.d.ts +5 -0
- package/dist/shared/types.d.ts +9 -0
- package/dist/shared/wrap.d.ts +7 -0
- package/dist/style.css +2 -0
- package/package.json +17 -49
- package/dist/atom/attendance-badge/index.d.ts +0 -5
- package/dist/atom/attendance-badge/src/attendance-badge.vue.d.ts +0 -13
- package/dist/atom/attendance-badge/src/core.d.ts +0 -11
- package/dist/atom/avatar/index.d.ts +0 -3
- package/dist/atom/avatar/src/avatar.vue.d.ts +0 -14
- package/dist/atom/button/index.d.ts +0 -3
- package/dist/atom/button/src/button.vue.d.ts +0 -40
- package/dist/atom/checkbox/index.d.ts +0 -3
- package/dist/atom/checkbox/src/checkbox.vue.d.ts +0 -24
- package/dist/atom/icon/index.d.ts +0 -3
- package/dist/atom/icon/src/icon.vue.d.ts +0 -27
- package/dist/atom/index.d.ts +0 -444
- package/dist/atom/input/index.d.ts +0 -3
- package/dist/atom/input/src/input.vue.d.ts +0 -43
- package/dist/atom/progress/index.d.ts +0 -4
- package/dist/atom/progress/src/core.d.ts +0 -9
- package/dist/atom/progress/src/progress.vue.d.ts +0 -19
- package/dist/atom/select/index.d.ts +0 -5
- package/dist/atom/select/src/core.d.ts +0 -9
- package/dist/atom/select/src/select.vue.d.ts +0 -22
- package/dist/atom/slogan/index.d.ts +0 -3
- package/dist/atom/switch/index.d.ts +0 -3
- package/dist/atom/switch/src/switch.vue.d.ts +0 -16
- package/dist/atom/tag/index.d.ts +0 -3
- package/dist/atom/tag/src/tag.vue.d.ts +0 -31
- package/dist/atom/textarea/index.d.ts +0 -3
- package/dist/atom/textarea/src/textarea.vue.d.ts +0 -19
- package/dist/base/breadcrumb/index.d.ts +0 -4
- package/dist/base/breadcrumb/src/breadcrumb.vue.d.ts +0 -29
- package/dist/base/class-tree/index.d.ts +0 -5
- package/dist/base/class-tree/src/class-tree.vue.d.ts +0 -29
- package/dist/base/class-tree/src/core.d.ts +0 -30
- package/dist/base/copyright/index.d.ts +0 -3
- package/dist/base/drawer/index.d.ts +0 -3
- package/dist/base/drawer/src/drawer.vue.d.ts +0 -36
- package/dist/base/empty/index.d.ts +0 -3
- package/dist/base/index.d.ts +0 -651
- package/dist/base/menu/core.d.ts +0 -34
- package/dist/base/menu/index.d.ts +0 -13
- package/dist/base/menu/side-menu/index.d.ts +0 -5
- package/dist/base/menu/side-menu/src/side-menu.vue.d.ts +0 -59
- package/dist/base/modal/index.d.ts +0 -4
- package/dist/base/modal/src/core.d.ts +0 -8
- package/dist/base/modal/src/modal.vue.d.ts +0 -46
- package/dist/base/page-header/index.d.ts +0 -3
- package/dist/base/page-header/src/page-header.vue.d.ts +0 -27
- package/dist/base/pagination/index.d.ts +0 -5
- package/dist/base/pagination/src/core.d.ts +0 -11
- package/dist/base/pagination/src/pagination.vue.d.ts +0 -26
- package/dist/base/search-form/index.d.ts +0 -3
- package/dist/base/search-form/src/search-form.vue.d.ts +0 -34
- package/dist/base/skeleton/index.d.ts +0 -3
- package/dist/base/statistic/index.d.ts +0 -3
- package/dist/base/statistic/src/statistic.vue.d.ts +0 -16
- package/dist/base/table/index.d.ts +0 -5
- package/dist/base/table/src/core.d.ts +0 -25
- package/dist/base/table/src/table.vue.d.ts +0 -44
- package/dist/base/toast/index.d.ts +0 -5
- package/dist/base/toast/src/store.d.ts +0 -56
- package/dist/base/toast/src/toast-container.vue.d.ts +0 -3
- package/dist/campus-ui.css +0 -2
- package/dist/campus-ui.js +0 -2229
- package/dist/campus-ui.umd.cjs +0 -1
- package/dist/core/index.d.ts +0 -4
- package/dist/core/namespace.d.ts +0 -16
- package/dist/core/theme.d.ts +0 -49
- package/dist/feature/daily-agenda/index.d.ts +0 -5
- package/dist/feature/daily-agenda/src/core.d.ts +0 -25
- package/dist/feature/daily-agenda/src/daily-agenda.vue.d.ts +0 -12
- package/dist/feature/daily-agenda/src/data.d.ts +0 -3
- package/dist/feature/index.d.ts +0 -61
- package/dist/feature/student-picker/index.d.ts +0 -5
- package/dist/feature/student-picker/src/core.d.ts +0 -19
- package/dist/feature/student-picker/src/student-picker.vue.d.ts +0 -26
- package/dist/feature/weekly-timetable/index.d.ts +0 -6
- package/dist/feature/weekly-timetable/src/core.d.ts +0 -33
- package/dist/feature/weekly-timetable/src/data.d.ts +0 -3
- package/dist/feature/weekly-timetable/src/weekly-timetable.vue.d.ts +0 -7
package/dist/campus-ui.js
DELETED
|
@@ -1,2229 +0,0 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Transition as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, nextTick as f, normalizeClass as p, normalizeStyle as m, onBeforeUnmount as h, openBlock as g, ref as _, renderList as v, renderSlot as y, resolveDynamicComponent as b, toDisplayString as x, unref as S, vModelSelect as C, vModelText as w, watch as T, withCtx as E, withDirectives as D, withKeys as O, withModifiers as k } from "vue";
|
|
2
|
-
import { createLocale as A, defaultMessage as j, formatDay as M, formatMonth as N, formatNumber as ee, installLocale as te, useLocale as P, weekdayLabels as ne } from "@campus-admin/locale";
|
|
3
|
-
import { AlertTriangle as re, ArrowDown as ie, ArrowLeft as ae, ArrowUp as oe, CalendarDays as se, Check as ce, CheckCircle2 as le, ChevronDown as ue, ChevronLeft as de, ChevronRight as F, ChevronsRight as fe, ChevronsUpDown as pe, Dot as me, GraduationCap as he, House as ge, Inbox as _e, Info as ve, Minus as ye, RotateCcw as be, Search as xe, UserRound as Se, UsersRound as Ce, X as I, XCircle as we } from "@lucide/vue";
|
|
4
|
-
//#region src/core/namespace.ts
|
|
5
|
-
var Te = "ca";
|
|
6
|
-
function L(e, t, n) {
|
|
7
|
-
let r = `ca-${e}`, i = t ? `${r}__${t}` : r;
|
|
8
|
-
return n && typeof n == "string" ? `${i}--${n}` : i;
|
|
9
|
-
}
|
|
10
|
-
function R(...e) {
|
|
11
|
-
return e.filter(Boolean).join(" ");
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/atom/attendance-badge/src/core.ts
|
|
15
|
-
var Ee = {
|
|
16
|
-
normal: "success",
|
|
17
|
-
late: "warning",
|
|
18
|
-
leave: "info",
|
|
19
|
-
absent: "danger",
|
|
20
|
-
early: "warning",
|
|
21
|
-
unknown: "neutral"
|
|
22
|
-
}, De = {
|
|
23
|
-
normal: "ca.attendance.normal",
|
|
24
|
-
late: "ca.attendance.late",
|
|
25
|
-
leave: "ca.attendance.leave",
|
|
26
|
-
absent: "ca.attendance.absent",
|
|
27
|
-
early: "ca.attendance.early",
|
|
28
|
-
unknown: "ca.attendance.unknown"
|
|
29
|
-
};
|
|
30
|
-
function Oe(e) {
|
|
31
|
-
let t = Object.prototype.hasOwnProperty.call(Ee, e) ? e : "unknown", n = De[t];
|
|
32
|
-
return {
|
|
33
|
-
labelKey: n,
|
|
34
|
-
tone: Ee[t],
|
|
35
|
-
label: j(n) ?? n
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/atom/attendance-badge/src/attendance-badge.vue
|
|
40
|
-
var ke = /* @__PURE__ */ d({
|
|
41
|
-
name: "CaAttendanceBadge",
|
|
42
|
-
__name: "attendance-badge",
|
|
43
|
-
props: {
|
|
44
|
-
status: { default: "unknown" },
|
|
45
|
-
time: {},
|
|
46
|
-
size: { default: "medium" }
|
|
47
|
-
},
|
|
48
|
-
setup(e) {
|
|
49
|
-
let { t } = P(), n = e, r = i(() => Oe(n.status)), a = i(() => t(r.value.labelKey)), l = i(() => R(L("attendance-badge"), L("attendance-badge", void 0, r.value.tone), L("attendance-badge", void 0, n.size)));
|
|
50
|
-
return (t, n) => (g(), s("span", { class: p(l.value) }, [
|
|
51
|
-
c("i", {
|
|
52
|
-
class: p(S(L)("attendance-badge", "dot")),
|
|
53
|
-
"aria-hidden": "true"
|
|
54
|
-
}, null, 2),
|
|
55
|
-
c("span", null, x(a.value), 1),
|
|
56
|
-
e.time ? (g(), s("time", {
|
|
57
|
-
key: 0,
|
|
58
|
-
class: p(S(L)("attendance-badge", "time"))
|
|
59
|
-
}, x(e.time), 3)) : o("", !0)
|
|
60
|
-
], 2));
|
|
61
|
-
}
|
|
62
|
-
}), Ae = ["src", "alt"], je = /* @__PURE__ */ d({
|
|
63
|
-
name: "CaAvatar",
|
|
64
|
-
__name: "avatar",
|
|
65
|
-
props: {
|
|
66
|
-
src: {},
|
|
67
|
-
name: {},
|
|
68
|
-
size: { default: "medium" },
|
|
69
|
-
shape: { default: "circle" }
|
|
70
|
-
},
|
|
71
|
-
setup(e) {
|
|
72
|
-
let t = e, n = _(!1), r = i(() => (t.name ?? "").trim().slice(0, 1)), o = i(() => R(L("avatar"), L("avatar", void 0, t.size), L("avatar", void 0, t.shape)));
|
|
73
|
-
return (t, i) => (g(), s("span", { class: p(o.value) }, [e.src && !n.value ? (g(), s("img", {
|
|
74
|
-
key: 0,
|
|
75
|
-
src: e.src,
|
|
76
|
-
alt: e.name ?? "",
|
|
77
|
-
onError: i[0] ||= (e) => n.value = !0
|
|
78
|
-
}, null, 40, Ae)) : r.value ? (g(), s("span", {
|
|
79
|
-
key: 1,
|
|
80
|
-
class: p(S(L)("avatar", "text"))
|
|
81
|
-
}, x(r.value), 3)) : (g(), a(S(Se), {
|
|
82
|
-
key: 2,
|
|
83
|
-
size: 16,
|
|
84
|
-
"aria-hidden": "true"
|
|
85
|
-
}))], 2));
|
|
86
|
-
}
|
|
87
|
-
}), Me = je, Ne = [
|
|
88
|
-
"type",
|
|
89
|
-
"disabled",
|
|
90
|
-
"aria-busy"
|
|
91
|
-
], Pe = /* @__PURE__ */ d({
|
|
92
|
-
name: "CaButton",
|
|
93
|
-
__name: "button",
|
|
94
|
-
props: {
|
|
95
|
-
type: { default: "neutral" },
|
|
96
|
-
variant: { default: "outline" },
|
|
97
|
-
size: { default: "medium" },
|
|
98
|
-
disabled: { type: Boolean },
|
|
99
|
-
loading: { type: Boolean },
|
|
100
|
-
block: { type: Boolean },
|
|
101
|
-
iconOnly: { type: Boolean },
|
|
102
|
-
nativeType: { default: "button" }
|
|
103
|
-
},
|
|
104
|
-
emits: ["click"],
|
|
105
|
-
setup(e, { emit: t }) {
|
|
106
|
-
let n = e, r = t, a = i(() => R(L("button"), L("button", void 0, n.type), L("button", void 0, n.variant), L("button", void 0, n.size), n.block ? L("button", void 0, "block") : "", n.iconOnly ? L("button", void 0, "icon-only") : "", n.loading ? L("button", void 0, "loading") : "")), c = i(() => n.disabled || n.loading);
|
|
107
|
-
function l(e) {
|
|
108
|
-
c.value || r("click", e);
|
|
109
|
-
}
|
|
110
|
-
return (t, n) => (g(), s("button", {
|
|
111
|
-
class: p(a.value),
|
|
112
|
-
type: e.nativeType,
|
|
113
|
-
disabled: c.value,
|
|
114
|
-
"aria-busy": e.loading || void 0,
|
|
115
|
-
onClick: l
|
|
116
|
-
}, [e.loading ? (g(), s("span", {
|
|
117
|
-
key: 0,
|
|
118
|
-
class: p(S(L)("button", "spinner")),
|
|
119
|
-
"aria-hidden": "true"
|
|
120
|
-
}, null, 2)) : t.$slots.icon ? (g(), s("span", {
|
|
121
|
-
key: 1,
|
|
122
|
-
class: p(S(L)("button", "icon"))
|
|
123
|
-
}, [y(t.$slots, "icon")], 2)) : o("", !0), t.$slots.default ? (g(), s("span", {
|
|
124
|
-
key: 2,
|
|
125
|
-
class: p(S(L)("button", "label"))
|
|
126
|
-
}, [y(t.$slots, "default")], 2)) : o("", !0)], 10, Ne));
|
|
127
|
-
}
|
|
128
|
-
}), Fe = ["checked", "disabled"], Ie = /* @__PURE__ */ d({
|
|
129
|
-
name: "CaCheckbox",
|
|
130
|
-
__name: "checkbox",
|
|
131
|
-
props: {
|
|
132
|
-
modelValue: {
|
|
133
|
-
type: [Boolean, String],
|
|
134
|
-
default: !1
|
|
135
|
-
},
|
|
136
|
-
label: {},
|
|
137
|
-
disabled: { type: Boolean }
|
|
138
|
-
},
|
|
139
|
-
emits: ["update:modelValue"],
|
|
140
|
-
setup(e, { emit: t }) {
|
|
141
|
-
let n = e, r = t, u = i(() => R(L("checkbox"), n.disabled ? L("checkbox", void 0, "disabled") : "", n.modelValue === !0 ? L("checkbox", void 0, "checked") : "", n.modelValue === "indeterminate" ? L("checkbox", void 0, "indeterminate") : ""));
|
|
142
|
-
function d() {
|
|
143
|
-
n.disabled || r("update:modelValue", n.modelValue !== !0);
|
|
144
|
-
}
|
|
145
|
-
return (t, n) => (g(), s("label", { class: p(u.value) }, [
|
|
146
|
-
c("input", {
|
|
147
|
-
class: p(S(L)("checkbox", "input")),
|
|
148
|
-
type: "checkbox",
|
|
149
|
-
checked: e.modelValue === !0,
|
|
150
|
-
disabled: e.disabled,
|
|
151
|
-
onChange: d
|
|
152
|
-
}, null, 42, Fe),
|
|
153
|
-
c("span", {
|
|
154
|
-
class: p(S(L)("checkbox", "box")),
|
|
155
|
-
"aria-hidden": "true"
|
|
156
|
-
}, [e.modelValue === "indeterminate" ? (g(), a(S(ye), {
|
|
157
|
-
key: 0,
|
|
158
|
-
size: 11
|
|
159
|
-
})) : e.modelValue === !0 ? (g(), a(S(ce), {
|
|
160
|
-
key: 1,
|
|
161
|
-
size: 11
|
|
162
|
-
})) : o("", !0)], 2),
|
|
163
|
-
e.label || t.$slots.default ? (g(), s("span", {
|
|
164
|
-
key: 0,
|
|
165
|
-
class: p(S(L)("checkbox", "label"))
|
|
166
|
-
}, [y(t.$slots, "default", {}, () => [l(x(e.label), 1)])], 2)) : o("", !0)
|
|
167
|
-
], 2));
|
|
168
|
-
}
|
|
169
|
-
}), Le = Ie, Re = ["aria-hidden"], ze = /* @__PURE__ */ d({
|
|
170
|
-
name: "CaIcon",
|
|
171
|
-
__name: "icon",
|
|
172
|
-
props: {
|
|
173
|
-
icon: {},
|
|
174
|
-
size: { default: 16 },
|
|
175
|
-
color: {},
|
|
176
|
-
decorative: {
|
|
177
|
-
type: Boolean,
|
|
178
|
-
default: !0
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
setup(e) {
|
|
182
|
-
let t = e, n = L("icon"), r = i(() => ({ color: t.color ?? void 0 }));
|
|
183
|
-
return (t, i) => (g(), s("span", {
|
|
184
|
-
class: p(S(n)),
|
|
185
|
-
style: m(r.value),
|
|
186
|
-
"aria-hidden": e.decorative ? "true" : void 0
|
|
187
|
-
}, [e.icon ? (g(), a(b(e.icon), {
|
|
188
|
-
key: 0,
|
|
189
|
-
size: e.size,
|
|
190
|
-
"stroke-width": 1.8
|
|
191
|
-
}, null, 8, ["size"])) : y(t.$slots, "default", {}, void 0, void 0, 1)], 14, Re));
|
|
192
|
-
}
|
|
193
|
-
}), Be = [
|
|
194
|
-
"type",
|
|
195
|
-
"value",
|
|
196
|
-
"placeholder",
|
|
197
|
-
"disabled",
|
|
198
|
-
"readonly",
|
|
199
|
-
"aria-invalid",
|
|
200
|
-
"aria-describedby"
|
|
201
|
-
], Ve = ["aria-label"], He = /* @__PURE__ */ d({
|
|
202
|
-
name: "CaInput",
|
|
203
|
-
__name: "input",
|
|
204
|
-
props: {
|
|
205
|
-
modelValue: {},
|
|
206
|
-
type: { default: "text" },
|
|
207
|
-
placeholder: {},
|
|
208
|
-
size: { default: "medium" },
|
|
209
|
-
disabled: { type: Boolean },
|
|
210
|
-
readonly: { type: Boolean },
|
|
211
|
-
clearable: { type: Boolean },
|
|
212
|
-
invalid: { type: Boolean },
|
|
213
|
-
errorId: {}
|
|
214
|
-
},
|
|
215
|
-
emits: [
|
|
216
|
-
"update:modelValue",
|
|
217
|
-
"enter",
|
|
218
|
-
"clear"
|
|
219
|
-
],
|
|
220
|
-
setup(e, { expose: t, emit: n }) {
|
|
221
|
-
let { t: r } = P(), a = e, l = n, d = _(), f = _(!1), m = i(() => R(L("input"), L("input", void 0, a.size), f.value ? L("input", void 0, "focused") : "", a.invalid ? L("input", void 0, "invalid") : "", a.disabled ? L("input", void 0, "disabled") : "")), h = i(() => a.clearable && !a.disabled && String(a.modelValue ?? "") !== "");
|
|
222
|
-
function v(e) {
|
|
223
|
-
l("update:modelValue", e.target.value);
|
|
224
|
-
}
|
|
225
|
-
function b() {
|
|
226
|
-
l("update:modelValue", ""), l("clear"), d.value?.focus();
|
|
227
|
-
}
|
|
228
|
-
function x() {
|
|
229
|
-
d.value?.focus();
|
|
230
|
-
}
|
|
231
|
-
return t({ focus: x }), (t, n) => (g(), s("div", { class: p(m.value) }, [
|
|
232
|
-
t.$slots.prefix ? (g(), s("span", {
|
|
233
|
-
key: 0,
|
|
234
|
-
class: p(S(L)("input", "affix"))
|
|
235
|
-
}, [y(t.$slots, "prefix")], 2)) : o("", !0),
|
|
236
|
-
c("input", {
|
|
237
|
-
ref_key: "inputRef",
|
|
238
|
-
ref: d,
|
|
239
|
-
class: p(S(L)("input", "inner")),
|
|
240
|
-
type: e.type,
|
|
241
|
-
value: e.modelValue,
|
|
242
|
-
placeholder: e.placeholder,
|
|
243
|
-
disabled: e.disabled,
|
|
244
|
-
readonly: e.readonly,
|
|
245
|
-
"aria-invalid": e.invalid || void 0,
|
|
246
|
-
"aria-describedby": e.errorId,
|
|
247
|
-
onInput: v,
|
|
248
|
-
onFocus: n[0] ||= (e) => f.value = !0,
|
|
249
|
-
onBlur: n[1] ||= (e) => f.value = !1,
|
|
250
|
-
onKeyup: n[2] ||= O((e) => l("enter"), ["enter"])
|
|
251
|
-
}, null, 42, Be),
|
|
252
|
-
h.value ? (g(), s("button", {
|
|
253
|
-
key: 1,
|
|
254
|
-
class: p(S(L)("input", "clear")),
|
|
255
|
-
type: "button",
|
|
256
|
-
"aria-label": S(r)("ca.common.clear"),
|
|
257
|
-
onClick: b
|
|
258
|
-
}, [u(S(I), { size: 12 })], 10, Ve)) : o("", !0),
|
|
259
|
-
t.$slots.suffix ? (g(), s("span", {
|
|
260
|
-
key: 2,
|
|
261
|
-
class: p(S(L)("input", "affix"))
|
|
262
|
-
}, [y(t.$slots, "suffix")], 2)) : o("", !0)
|
|
263
|
-
], 2));
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
//#endregion
|
|
267
|
-
//#region src/atom/progress/src/core.ts
|
|
268
|
-
function Ue(e) {
|
|
269
|
-
return Number.isFinite(e) ? Math.min(100, Math.max(0, e)) : 0;
|
|
270
|
-
}
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region src/atom/progress/src/progress.vue?vue&type=script&setup=true&lang.ts
|
|
273
|
-
var We = ["aria-valuenow"], Ge = [
|
|
274
|
-
"width",
|
|
275
|
-
"height",
|
|
276
|
-
"viewBox"
|
|
277
|
-
], Ke = [
|
|
278
|
-
"cx",
|
|
279
|
-
"cy",
|
|
280
|
-
"r",
|
|
281
|
-
"stroke-width"
|
|
282
|
-
], qe = [
|
|
283
|
-
"cx",
|
|
284
|
-
"cy",
|
|
285
|
-
"r",
|
|
286
|
-
"stroke-width",
|
|
287
|
-
"stroke-dasharray",
|
|
288
|
-
"stroke-dashoffset",
|
|
289
|
-
"transform"
|
|
290
|
-
], Je = /* @__PURE__ */ d({
|
|
291
|
-
name: "CaProgress",
|
|
292
|
-
__name: "progress",
|
|
293
|
-
props: {
|
|
294
|
-
percent: { default: 0 },
|
|
295
|
-
type: { default: "line" },
|
|
296
|
-
tone: { default: "primary" },
|
|
297
|
-
size: { default: 64 },
|
|
298
|
-
showText: { type: Boolean },
|
|
299
|
-
strokeWidth: { default: 6 }
|
|
300
|
-
},
|
|
301
|
-
setup(t) {
|
|
302
|
-
let n = t, r = i(() => Ue(n.percent)), a = i(() => R(L("progress"), L("progress", void 0, n.type), L("progress", void 0, n.tone))), l = i(() => (n.size - n.strokeWidth) / 2), u = i(() => 2 * Math.PI * l.value), d = i(() => u.value * (1 - r.value / 100));
|
|
303
|
-
return (n, i) => (g(), s("div", {
|
|
304
|
-
class: p(a.value),
|
|
305
|
-
role: "progressbar",
|
|
306
|
-
"aria-valuenow": Math.round(r.value),
|
|
307
|
-
"aria-valuemin": "0",
|
|
308
|
-
"aria-valuemax": "100"
|
|
309
|
-
}, [t.type === "circle" ? (g(), s(e, { key: 0 }, [(g(), s("svg", {
|
|
310
|
-
width: t.size,
|
|
311
|
-
height: t.size,
|
|
312
|
-
viewBox: `0 0 ${t.size} ${t.size}`,
|
|
313
|
-
"aria-hidden": "true"
|
|
314
|
-
}, [c("circle", {
|
|
315
|
-
cx: t.size / 2,
|
|
316
|
-
cy: t.size / 2,
|
|
317
|
-
r: l.value,
|
|
318
|
-
fill: "none",
|
|
319
|
-
stroke: "var(--ca-color-neutral-soft)",
|
|
320
|
-
"stroke-width": t.strokeWidth
|
|
321
|
-
}, null, 8, Ke), c("circle", {
|
|
322
|
-
cx: t.size / 2,
|
|
323
|
-
cy: t.size / 2,
|
|
324
|
-
r: l.value,
|
|
325
|
-
fill: "none",
|
|
326
|
-
stroke: "currentColor",
|
|
327
|
-
"stroke-width": t.strokeWidth,
|
|
328
|
-
"stroke-linecap": "round",
|
|
329
|
-
"stroke-dasharray": u.value,
|
|
330
|
-
"stroke-dashoffset": d.value,
|
|
331
|
-
transform: `rotate(-90 ${t.size / 2} ${t.size / 2})`
|
|
332
|
-
}, null, 8, qe)], 8, Ge)), c("span", { class: p(S(L)("progress", "text")) }, x(Math.round(r.value)) + "%", 3)], 64)) : (g(), s(e, { key: 1 }, [c("div", { class: p(S(L)("progress", "track")) }, [c("i", {
|
|
333
|
-
class: p(S(L)("progress", "bar")),
|
|
334
|
-
style: m({ width: `${r.value}%` })
|
|
335
|
-
}, null, 6)], 2), t.showText ? (g(), s("span", {
|
|
336
|
-
key: 0,
|
|
337
|
-
class: p(S(L)("progress", "text"))
|
|
338
|
-
}, x(Math.round(r.value)) + "%", 3)) : o("", !0)], 64))], 10, We));
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
//#endregion
|
|
342
|
-
//#region src/atom/select/src/core.ts
|
|
343
|
-
function Ye(e) {
|
|
344
|
-
return e.map((e) => typeof e == "string" ? {
|
|
345
|
-
label: e,
|
|
346
|
-
value: e
|
|
347
|
-
} : e);
|
|
348
|
-
}
|
|
349
|
-
function Xe(e, t) {
|
|
350
|
-
if (t !== void 0 && t !== "") return e.find((e) => e.value === String(t));
|
|
351
|
-
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region src/atom/select/src/select.vue?vue&type=script&setup=true&lang.ts
|
|
354
|
-
var Ze = ["disabled", "aria-expanded"], Qe = ["aria-label"], $e = ["aria-selected", "onClick"], et = /* @__PURE__ */ d({
|
|
355
|
-
name: "CaSelect",
|
|
356
|
-
__name: "select",
|
|
357
|
-
props: {
|
|
358
|
-
modelValue: {},
|
|
359
|
-
options: { default: () => [] },
|
|
360
|
-
placeholder: {},
|
|
361
|
-
size: { default: "medium" },
|
|
362
|
-
disabled: { type: Boolean },
|
|
363
|
-
clearable: { type: Boolean },
|
|
364
|
-
invalid: { type: Boolean }
|
|
365
|
-
},
|
|
366
|
-
emits: ["update:modelValue", "change"],
|
|
367
|
-
setup(t, { emit: n }) {
|
|
368
|
-
let { t: r } = P(), a = t, l = n, d = i(() => Ye(a.options)), f = i(() => Xe(d.value, a.modelValue)), m = i(() => a.placeholder ?? r("ca.select.placeholder")), h = _(!1), y = i(() => R(L("select"), L("select", void 0, a.size), h.value ? L("select", void 0, "open") : "", a.invalid ? L("select", void 0, "invalid") : "", a.disabled ? L("select", void 0, "disabled") : ""));
|
|
369
|
-
function b(e) {
|
|
370
|
-
e.disabled || (l("update:modelValue", e.value), l("change", e.value), h.value = !1);
|
|
371
|
-
}
|
|
372
|
-
function C(e) {
|
|
373
|
-
e.stopPropagation(), l("update:modelValue", ""), l("change", "");
|
|
374
|
-
}
|
|
375
|
-
function w() {
|
|
376
|
-
a.disabled || (h.value = !h.value);
|
|
377
|
-
}
|
|
378
|
-
function T() {
|
|
379
|
-
h.value = !1;
|
|
380
|
-
}
|
|
381
|
-
function E(e) {
|
|
382
|
-
e.key === "Escape" && T(), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), w());
|
|
383
|
-
}
|
|
384
|
-
return (n, i) => (g(), s("div", {
|
|
385
|
-
class: p(y.value),
|
|
386
|
-
onKeydown: E,
|
|
387
|
-
onFocusout: i[0] ||= (e) => {
|
|
388
|
-
e.currentTarget.contains(e.relatedTarget) || T();
|
|
389
|
-
}
|
|
390
|
-
}, [c("button", {
|
|
391
|
-
class: p(S(L)("select", "trigger")),
|
|
392
|
-
type: "button",
|
|
393
|
-
disabled: t.disabled,
|
|
394
|
-
"aria-expanded": h.value,
|
|
395
|
-
"aria-haspopup": "listbox",
|
|
396
|
-
onClick: w
|
|
397
|
-
}, [
|
|
398
|
-
f.value ? (g(), s("span", {
|
|
399
|
-
key: 0,
|
|
400
|
-
class: p(S(L)("select", "value"))
|
|
401
|
-
}, x(f.value.label), 3)) : (g(), s("span", {
|
|
402
|
-
key: 1,
|
|
403
|
-
class: p(S(L)("select", "placeholder"))
|
|
404
|
-
}, x(m.value), 3)),
|
|
405
|
-
t.clearable && f.value && !t.disabled ? (g(), s("span", {
|
|
406
|
-
key: 2,
|
|
407
|
-
class: p(S(L)("select", "clear")),
|
|
408
|
-
role: "button",
|
|
409
|
-
"aria-label": S(r)("ca.common.clear"),
|
|
410
|
-
onClick: C
|
|
411
|
-
}, [u(S(I), { size: 12 })], 10, Qe)) : o("", !0),
|
|
412
|
-
u(S(ue), {
|
|
413
|
-
size: 14,
|
|
414
|
-
class: p(S(L)("select", "arrow")),
|
|
415
|
-
"aria-hidden": "true"
|
|
416
|
-
}, null, 8, ["class"])
|
|
417
|
-
], 10, Ze), h.value ? (g(), s("ul", {
|
|
418
|
-
key: 0,
|
|
419
|
-
class: p(S(L)("select", "panel")),
|
|
420
|
-
role: "listbox"
|
|
421
|
-
}, [(g(!0), s(e, null, v(d.value, (e) => (g(), s("li", {
|
|
422
|
-
key: e.value,
|
|
423
|
-
class: p(S(R)(S(L)("select", "option"), e.disabled ? S(L)("select", "option", "disabled") : "")),
|
|
424
|
-
role: "option",
|
|
425
|
-
"aria-selected": e.value === String(t.modelValue ?? ""),
|
|
426
|
-
onClick: (t) => b(e)
|
|
427
|
-
}, x(e.label), 11, $e))), 128)), d.value.length ? o("", !0) : (g(), s("li", {
|
|
428
|
-
key: 0,
|
|
429
|
-
class: p(S(L)("select", "empty"))
|
|
430
|
-
}, x(S(r)("ca.select.empty")), 3))], 2)) : o("", !0)], 34));
|
|
431
|
-
}
|
|
432
|
-
}), tt = /* @__PURE__ */ d({
|
|
433
|
-
name: "CaSlogan",
|
|
434
|
-
__name: "slogan",
|
|
435
|
-
props: { title: { default: "" } },
|
|
436
|
-
setup(e) {
|
|
437
|
-
let t = e, { t: n } = P(), r = i(() => t.title || n("ca.slogan.default"));
|
|
438
|
-
return (e, t) => (g(), s("span", { class: p(S(L)("slogan")) }, x(r.value), 3));
|
|
439
|
-
}
|
|
440
|
-
}), nt = ["aria-checked", "disabled"], rt = /* @__PURE__ */ d({
|
|
441
|
-
name: "CaSwitch",
|
|
442
|
-
__name: "switch",
|
|
443
|
-
props: {
|
|
444
|
-
modelValue: {
|
|
445
|
-
type: Boolean,
|
|
446
|
-
default: !1
|
|
447
|
-
},
|
|
448
|
-
activeText: {},
|
|
449
|
-
inactiveText: {},
|
|
450
|
-
disabled: { type: Boolean }
|
|
451
|
-
},
|
|
452
|
-
emits: ["update:modelValue"],
|
|
453
|
-
setup(e, { emit: t }) {
|
|
454
|
-
let n = e, r = t, a = i(() => R(L("switch"), n.modelValue ? L("switch", void 0, "on") : "", n.disabled ? L("switch", void 0, "disabled") : ""));
|
|
455
|
-
function l() {
|
|
456
|
-
n.disabled || r("update:modelValue", !n.modelValue);
|
|
457
|
-
}
|
|
458
|
-
return (t, n) => (g(), s("button", {
|
|
459
|
-
class: p(a.value),
|
|
460
|
-
type: "button",
|
|
461
|
-
role: "switch",
|
|
462
|
-
"aria-checked": e.modelValue,
|
|
463
|
-
disabled: e.disabled,
|
|
464
|
-
onClick: l
|
|
465
|
-
}, [c("span", { class: p(S(L)("switch", "track")) }, [c("i", { class: p(S(L)("switch", "thumb")) }, null, 2)], 2), (e.modelValue ? e.activeText : e.inactiveText) ? (g(), s("span", {
|
|
466
|
-
key: 0,
|
|
467
|
-
class: p(S(L)("switch", "text"))
|
|
468
|
-
}, x(e.modelValue ? e.activeText : e.inactiveText), 3)) : o("", !0)], 10, nt));
|
|
469
|
-
}
|
|
470
|
-
}), it = ["aria-label"], at = /* @__PURE__ */ d({
|
|
471
|
-
name: "CaTag",
|
|
472
|
-
__name: "tag",
|
|
473
|
-
props: {
|
|
474
|
-
tone: { default: "primary" },
|
|
475
|
-
variant: { default: "soft" },
|
|
476
|
-
size: { default: "medium" },
|
|
477
|
-
closable: { type: Boolean },
|
|
478
|
-
dot: { type: Boolean }
|
|
479
|
-
},
|
|
480
|
-
emits: ["close"],
|
|
481
|
-
setup(e, { emit: t }) {
|
|
482
|
-
let { t: n } = P(), r = e, a = t, c = i(() => R(L("tag"), L("tag", void 0, r.tone), L("tag", void 0, r.variant), L("tag", void 0, r.size)));
|
|
483
|
-
return (t, r) => (g(), s("span", { class: p(c.value) }, [
|
|
484
|
-
e.dot ? (g(), s("i", {
|
|
485
|
-
key: 0,
|
|
486
|
-
class: p(S(L)("tag", "dot")),
|
|
487
|
-
"aria-hidden": "true"
|
|
488
|
-
}, null, 2)) : o("", !0),
|
|
489
|
-
y(t.$slots, "default"),
|
|
490
|
-
e.closable ? (g(), s("button", {
|
|
491
|
-
key: 1,
|
|
492
|
-
class: p(S(L)("tag", "close")),
|
|
493
|
-
type: "button",
|
|
494
|
-
"aria-label": S(n)("ca.common.remove"),
|
|
495
|
-
onClick: r[0] ||= (e) => a("close")
|
|
496
|
-
}, [u(S(I), { size: 11 })], 10, it)) : o("", !0)
|
|
497
|
-
], 2));
|
|
498
|
-
}
|
|
499
|
-
}), ot = [
|
|
500
|
-
"value",
|
|
501
|
-
"rows",
|
|
502
|
-
"placeholder",
|
|
503
|
-
"maxlength",
|
|
504
|
-
"disabled",
|
|
505
|
-
"aria-invalid"
|
|
506
|
-
], st = /* @__PURE__ */ d({
|
|
507
|
-
name: "CaTextarea",
|
|
508
|
-
__name: "textarea",
|
|
509
|
-
props: {
|
|
510
|
-
modelValue: {},
|
|
511
|
-
placeholder: {},
|
|
512
|
-
rows: { default: 3 },
|
|
513
|
-
maxlength: {},
|
|
514
|
-
disabled: { type: Boolean },
|
|
515
|
-
invalid: { type: Boolean },
|
|
516
|
-
showCount: { type: Boolean }
|
|
517
|
-
},
|
|
518
|
-
emits: ["update:modelValue"],
|
|
519
|
-
setup(t, { emit: n }) {
|
|
520
|
-
let r = t, a = n, u = _(!1), d = i(() => String(r.modelValue ?? "").length), f = i(() => R(L("textarea"), u.value ? L("textarea", void 0, "focused") : "", r.invalid ? L("textarea", void 0, "invalid") : "", r.disabled ? L("textarea", void 0, "disabled") : ""));
|
|
521
|
-
return (n, r) => (g(), s("div", { class: p(f.value) }, [c("textarea", {
|
|
522
|
-
class: p(S(L)("textarea", "inner")),
|
|
523
|
-
value: t.modelValue,
|
|
524
|
-
rows: t.rows,
|
|
525
|
-
placeholder: t.placeholder,
|
|
526
|
-
maxlength: t.maxlength,
|
|
527
|
-
disabled: t.disabled,
|
|
528
|
-
"aria-invalid": t.invalid || void 0,
|
|
529
|
-
onInput: r[0] ||= (e) => a("update:modelValue", e.target.value),
|
|
530
|
-
onFocus: r[1] ||= (e) => u.value = !0,
|
|
531
|
-
onBlur: r[2] ||= (e) => u.value = !1
|
|
532
|
-
}, null, 42, ot), t.showCount ? (g(), s("span", {
|
|
533
|
-
key: 0,
|
|
534
|
-
class: p(S(L)("textarea", "count"))
|
|
535
|
-
}, [l(x(d.value), 1), t.maxlength ? (g(), s(e, { key: 0 }, [l(" / " + x(t.maxlength), 1)], 64)) : o("", !0)], 2)) : o("", !0)], 2));
|
|
536
|
-
}
|
|
537
|
-
}), ct = {
|
|
538
|
-
CaAttendanceBadge: ke,
|
|
539
|
-
CaAvatar: je,
|
|
540
|
-
CaButton: Pe,
|
|
541
|
-
CaCheckbox: Ie,
|
|
542
|
-
CaIcon: ze,
|
|
543
|
-
CaInput: He,
|
|
544
|
-
CaProgress: Je,
|
|
545
|
-
CaSelect: et,
|
|
546
|
-
CaSlogan: tt,
|
|
547
|
-
CaSwitch: rt,
|
|
548
|
-
CaTag: at,
|
|
549
|
-
CaTextarea: st
|
|
550
|
-
}, lt = ["aria-label"], ut = ["onClick"], dt = /* @__PURE__ */ d({
|
|
551
|
-
name: "CaBreadcrumb",
|
|
552
|
-
__name: "breadcrumb",
|
|
553
|
-
props: {
|
|
554
|
-
items: {},
|
|
555
|
-
homeIcon: {
|
|
556
|
-
type: Boolean,
|
|
557
|
-
default: !0
|
|
558
|
-
}
|
|
559
|
-
},
|
|
560
|
-
emits: ["navigate"],
|
|
561
|
-
setup(t, { emit: n }) {
|
|
562
|
-
let { t: r } = P(), i = n, u = L("breadcrumb");
|
|
563
|
-
return (n, d) => (g(), s("nav", {
|
|
564
|
-
class: p(S(u)),
|
|
565
|
-
"aria-label": S(r)("ca.breadcrumb.label")
|
|
566
|
-
}, [c("ol", { class: p(S(L)("breadcrumb", "list")) }, [(g(!0), s(e, null, v(t.items, (e, n) => (g(), s("li", {
|
|
567
|
-
key: `${e.label}-${n}`,
|
|
568
|
-
class: p(S(L)("breadcrumb", "item"))
|
|
569
|
-
}, [n < t.items.length - 1 ? (g(), s("button", {
|
|
570
|
-
key: 0,
|
|
571
|
-
type: "button",
|
|
572
|
-
class: p(S(L)("breadcrumb", "link")),
|
|
573
|
-
onClick: (t) => i("navigate", e, n)
|
|
574
|
-
}, [t.homeIcon && n === 0 ? (g(), a(S(ge), {
|
|
575
|
-
key: 0,
|
|
576
|
-
size: 12
|
|
577
|
-
})) : o("", !0), l(" " + x(e.label), 1)], 10, ut)) : (g(), s("span", {
|
|
578
|
-
key: 1,
|
|
579
|
-
class: p(S(L)("breadcrumb", "current")),
|
|
580
|
-
"aria-current": "page"
|
|
581
|
-
}, x(e.label), 3)), n < t.items.length - 1 ? (g(), a(S(F), {
|
|
582
|
-
key: 2,
|
|
583
|
-
size: 11,
|
|
584
|
-
class: p(S(L)("breadcrumb", "separator")),
|
|
585
|
-
"aria-hidden": "true"
|
|
586
|
-
}, null, 8, ["class"])) : o("", !0)], 2))), 128))], 2), n.$slots.extra ? (g(), s("div", {
|
|
587
|
-
key: 0,
|
|
588
|
-
class: p(S(L)("breadcrumb", "extra"))
|
|
589
|
-
}, [y(n.$slots, "extra")], 2)) : o("", !0)], 10, lt));
|
|
590
|
-
}
|
|
591
|
-
});
|
|
592
|
-
//#endregion
|
|
593
|
-
//#region src/base/class-tree/src/core.ts
|
|
594
|
-
function ft(e, t) {
|
|
595
|
-
let n = [];
|
|
596
|
-
return e.forEach((e) => {
|
|
597
|
-
n.push({
|
|
598
|
-
id: e.id,
|
|
599
|
-
label: e.label,
|
|
600
|
-
level: 0,
|
|
601
|
-
isLeaf: !1,
|
|
602
|
-
disabled: e.disabled
|
|
603
|
-
}), t.has(e.id) && e.children.forEach((t) => {
|
|
604
|
-
n.push({
|
|
605
|
-
id: t.id,
|
|
606
|
-
label: t.label,
|
|
607
|
-
level: 1,
|
|
608
|
-
isLeaf: !0,
|
|
609
|
-
parentId: e.id,
|
|
610
|
-
disabled: t.disabled
|
|
611
|
-
});
|
|
612
|
-
});
|
|
613
|
-
}), n;
|
|
614
|
-
}
|
|
615
|
-
function pt(e) {
|
|
616
|
-
return new Set(e.map((e) => e.id));
|
|
617
|
-
}
|
|
618
|
-
function mt(e, t) {
|
|
619
|
-
let n = t.trim().toLowerCase();
|
|
620
|
-
return n ? e.map((e) => {
|
|
621
|
-
let t = e.label.toLowerCase().includes(n), r = e.children.filter((e) => e.label.toLowerCase().includes(n));
|
|
622
|
-
return t ? {
|
|
623
|
-
...e,
|
|
624
|
-
children: e.children
|
|
625
|
-
} : r.length ? {
|
|
626
|
-
...e,
|
|
627
|
-
children: r
|
|
628
|
-
} : null;
|
|
629
|
-
}).filter((e) => e !== null) : e;
|
|
630
|
-
}
|
|
631
|
-
//#endregion
|
|
632
|
-
//#region src/base/class-tree/src/class-tree.vue?vue&type=script&setup=true&lang.ts
|
|
633
|
-
var ht = ["placeholder", "aria-label"], gt = ["aria-expanded", "aria-selected"], _t = ["onClick"], vt = /* @__PURE__ */ d({
|
|
634
|
-
name: "CaClassTree",
|
|
635
|
-
__name: "class-tree",
|
|
636
|
-
props: {
|
|
637
|
-
modelValue: {},
|
|
638
|
-
grades: { default: () => [] },
|
|
639
|
-
searchable: {
|
|
640
|
-
type: Boolean,
|
|
641
|
-
default: !0
|
|
642
|
-
},
|
|
643
|
-
expandedKeys: {}
|
|
644
|
-
},
|
|
645
|
-
emits: [
|
|
646
|
-
"update:modelValue",
|
|
647
|
-
"update:expandedKeys",
|
|
648
|
-
"change"
|
|
649
|
-
],
|
|
650
|
-
setup(t, { emit: n }) {
|
|
651
|
-
let { t: r } = P(), l = t, u = n, d = _(""), f = _(pt(l.grades));
|
|
652
|
-
T(() => l.grades, (e) => {
|
|
653
|
-
f.value = pt(e);
|
|
654
|
-
}, { once: !0 });
|
|
655
|
-
let m = i(() => l.expandedKeys ? new Set(l.expandedKeys) : f.value), h = i(() => mt(l.grades, d.value)), y = i(() => ft(h.value, m.value));
|
|
656
|
-
function b(e) {
|
|
657
|
-
let t = new Set(m.value);
|
|
658
|
-
t.has(e) ? t.delete(e) : t.add(e), l.expandedKeys ? u("update:expandedKeys", [...t]) : f.value = t;
|
|
659
|
-
}
|
|
660
|
-
function C(e, t, n, r) {
|
|
661
|
-
!r && n && (u("update:modelValue", e), u("change", e, {
|
|
662
|
-
id: e,
|
|
663
|
-
label: t
|
|
664
|
-
}));
|
|
665
|
-
}
|
|
666
|
-
return (n, i) => (g(), s("div", { class: p(S(L)("class-tree")) }, [t.searchable ? D((g(), s("input", {
|
|
667
|
-
key: 0,
|
|
668
|
-
"onUpdate:modelValue": i[0] ||= (e) => d.value = e,
|
|
669
|
-
class: p(S(L)("class-tree", "search")),
|
|
670
|
-
type: "search",
|
|
671
|
-
placeholder: S(r)("ca.classTree.searchPlaceholder"),
|
|
672
|
-
"aria-label": S(r)("ca.classTree.searchLabel")
|
|
673
|
-
}, null, 10, ht)), [[w, d.value]]) : o("", !0), c("ul", {
|
|
674
|
-
class: p(S(L)("class-tree", "list")),
|
|
675
|
-
role: "tree"
|
|
676
|
-
}, [(g(!0), s(e, null, v(y.value, (e) => (g(), s("li", {
|
|
677
|
-
key: e.id,
|
|
678
|
-
class: p(S(R)(S(L)("class-tree", "node"), S(L)("class-tree", "node", `level-${e.level}`), t.modelValue === e.id ? S(L)("class-tree", "node", "selected") : "", e.disabled ? S(L)("class-tree", "node", "disabled") : "")),
|
|
679
|
-
role: "treeitem",
|
|
680
|
-
"aria-expanded": e.isLeaf ? void 0 : m.value.has(e.id),
|
|
681
|
-
"aria-selected": t.modelValue === e.id
|
|
682
|
-
}, [c("button", {
|
|
683
|
-
type: "button",
|
|
684
|
-
onClick: (t) => e.isLeaf ? C(e.id, e.label, !0, e.disabled) : b(e.id)
|
|
685
|
-
}, [
|
|
686
|
-
e.isLeaf ? (g(), a(S(Ce), {
|
|
687
|
-
key: 1,
|
|
688
|
-
size: 14
|
|
689
|
-
})) : (g(), a(S(F), {
|
|
690
|
-
key: 0,
|
|
691
|
-
size: 14,
|
|
692
|
-
class: p(S(R)(S(L)("class-tree", "arrow"), m.value.has(e.id) ? S(L)("class-tree", "arrow", "open") : ""))
|
|
693
|
-
}, null, 8, ["class"])),
|
|
694
|
-
e.isLeaf ? o("", !0) : (g(), a(S(he), {
|
|
695
|
-
key: 2,
|
|
696
|
-
size: 15,
|
|
697
|
-
class: p(S(L)("class-tree", "icon"))
|
|
698
|
-
}, null, 8, ["class"])),
|
|
699
|
-
c("span", { class: p(S(L)("class-tree", "label")) }, x(e.label), 3)
|
|
700
|
-
], 8, _t)], 10, gt))), 128)), y.value.length ? o("", !0) : (g(), s("li", {
|
|
701
|
-
key: 0,
|
|
702
|
-
class: p(S(L)("class-tree", "empty"))
|
|
703
|
-
}, x(S(r)("ca.classTree.empty")), 3))], 2)], 2));
|
|
704
|
-
}
|
|
705
|
-
}), yt = /* @__PURE__ */ d({
|
|
706
|
-
name: "CaCopyright",
|
|
707
|
-
__name: "copyright",
|
|
708
|
-
props: {
|
|
709
|
-
name: { default: "" },
|
|
710
|
-
displayCopyright: { default: "" },
|
|
711
|
-
partner: { default: "" }
|
|
712
|
-
},
|
|
713
|
-
setup(t) {
|
|
714
|
-
let n = t, { t: r } = P(), a = (/* @__PURE__ */ new Date()).getFullYear(), u = i(() => n.displayCopyright ? n.displayCopyright : n.name ? r("ca.copyright.line", {
|
|
715
|
-
year: a,
|
|
716
|
-
name: n.name
|
|
717
|
-
}) : ""), d = i(() => n.partner ? r("ca.copyright.poweredByPartner", { partner: n.partner }) : r("ca.copyright.poweredBy"));
|
|
718
|
-
return (t, n) => (g(), s("div", { class: p(S(L)("copyright")) }, [
|
|
719
|
-
u.value ? (g(), s(e, { key: 0 }, [l(x(u.value) + " ", 1), n[0] ||= c("br", null, null, -1)], 64)) : o("", !0),
|
|
720
|
-
l(" " + x(d.value) + " ", 1),
|
|
721
|
-
y(t.$slots, "default")
|
|
722
|
-
], 2));
|
|
723
|
-
}
|
|
724
|
-
}), z = 0, bt = "";
|
|
725
|
-
function xt() {
|
|
726
|
-
typeof document > "u" || (z === 0 && (bt = document.body.style.overflow, document.body.style.overflow = "hidden"), z += 1);
|
|
727
|
-
}
|
|
728
|
-
function B() {
|
|
729
|
-
typeof document > "u" || (z = Math.max(0, z - 1), z === 0 && (document.body.style.overflow = bt));
|
|
730
|
-
}
|
|
731
|
-
function St(e) {
|
|
732
|
-
return e ? Array.from(e.querySelectorAll("button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])")) : [];
|
|
733
|
-
}
|
|
734
|
-
//#endregion
|
|
735
|
-
//#region src/base/drawer/src/drawer.vue?vue&type=script&setup=true&lang.ts
|
|
736
|
-
var Ct = ["aria-label"], wt = ["aria-label"], Tt = /* @__PURE__ */ d({
|
|
737
|
-
name: "CaDrawer",
|
|
738
|
-
__name: "drawer",
|
|
739
|
-
props: {
|
|
740
|
-
modelValue: { type: Boolean },
|
|
741
|
-
title: {},
|
|
742
|
-
placement: { default: "right" },
|
|
743
|
-
size: { default: 420 },
|
|
744
|
-
maskClosable: {
|
|
745
|
-
type: Boolean,
|
|
746
|
-
default: !0
|
|
747
|
-
},
|
|
748
|
-
escClosable: {
|
|
749
|
-
type: Boolean,
|
|
750
|
-
default: !0
|
|
751
|
-
}
|
|
752
|
-
},
|
|
753
|
-
emits: ["update:modelValue", "closed"],
|
|
754
|
-
setup(e, { emit: r }) {
|
|
755
|
-
let { t: i } = P(), d = e, v = r, b = _(), C = null;
|
|
756
|
-
function w() {
|
|
757
|
-
v("update:modelValue", !1);
|
|
758
|
-
}
|
|
759
|
-
function D(e) {
|
|
760
|
-
d.modelValue && e.key === "Escape" && d.escClosable && (e.stopPropagation(), w());
|
|
761
|
-
}
|
|
762
|
-
return T(() => d.modelValue, async (e) => {
|
|
763
|
-
e ? (C = document.activeElement instanceof HTMLElement ? document.activeElement : null, xt(), document.addEventListener("keydown", D), await f(), St(b.value)[0]?.focus()) : (B(), document.removeEventListener("keydown", D), C?.focus(), C = null, v("closed"));
|
|
764
|
-
}), h(() => {
|
|
765
|
-
d.modelValue && B(), document.removeEventListener("keydown", D);
|
|
766
|
-
}), (r, d) => (g(), a(t, { to: "body" }, [u(n, { name: "ca-drawer" }, {
|
|
767
|
-
default: E(() => [e.modelValue ? (g(), s("div", {
|
|
768
|
-
key: 0,
|
|
769
|
-
class: p(S(L)("drawer")),
|
|
770
|
-
onClick: d[0] ||= k((t) => e.maskClosable && w(), ["self"])
|
|
771
|
-
}, [c("aside", {
|
|
772
|
-
ref_key: "panelRef",
|
|
773
|
-
ref: b,
|
|
774
|
-
class: p(S(R)(S(L)("drawer", "panel"), S(L)("drawer", void 0, e.placement))),
|
|
775
|
-
role: "dialog",
|
|
776
|
-
"aria-modal": "true",
|
|
777
|
-
"aria-label": e.title,
|
|
778
|
-
style: m(e.placement === "bottom" ? { height: typeof e.size == "number" ? `${e.size}px` : e.size } : { width: typeof e.size == "number" ? `${e.size}px` : e.size })
|
|
779
|
-
}, [
|
|
780
|
-
c("header", { class: p(S(L)("drawer", "header")) }, [c("h2", { class: p(S(L)("drawer", "title")) }, [y(r.$slots, "title", {}, () => [l(x(e.title), 1)])], 2), c("button", {
|
|
781
|
-
class: p(S(L)("drawer", "close")),
|
|
782
|
-
type: "button",
|
|
783
|
-
"aria-label": S(i)("ca.common.close"),
|
|
784
|
-
onClick: w
|
|
785
|
-
}, [u(S(I), { size: 18 })], 10, wt)], 2),
|
|
786
|
-
c("div", { class: p(S(L)("drawer", "body")) }, [y(r.$slots, "default")], 2),
|
|
787
|
-
r.$slots.footer ? (g(), s("footer", {
|
|
788
|
-
key: 0,
|
|
789
|
-
class: p(S(L)("drawer", "footer"))
|
|
790
|
-
}, [y(r.$slots, "footer")], 2)) : o("", !0)
|
|
791
|
-
], 14, Ct)], 2)) : o("", !0)]),
|
|
792
|
-
_: 3
|
|
793
|
-
})]));
|
|
794
|
-
}
|
|
795
|
-
}), Et = /* @__PURE__ */ d({
|
|
796
|
-
name: "CaEmpty",
|
|
797
|
-
__name: "empty",
|
|
798
|
-
props: {
|
|
799
|
-
title: {},
|
|
800
|
-
description: {},
|
|
801
|
-
size: {}
|
|
802
|
-
},
|
|
803
|
-
setup(e) {
|
|
804
|
-
let { t } = P(), n = e, r = L("empty"), a = i(() => n.title ?? t("ca.empty.title"));
|
|
805
|
-
return (t, n) => (g(), s("div", { class: p(S(r)) }, [
|
|
806
|
-
c("span", {
|
|
807
|
-
class: p(S(L)("empty", "icon")),
|
|
808
|
-
"aria-hidden": "true"
|
|
809
|
-
}, [y(t.$slots, "icon", {}, () => [u(S(_e), { size: 30 })])], 2),
|
|
810
|
-
c("p", { class: p(S(L)("empty", "title")) }, x(a.value), 3),
|
|
811
|
-
e.description ? (g(), s("p", {
|
|
812
|
-
key: 0,
|
|
813
|
-
class: p(S(L)("empty", "desc"))
|
|
814
|
-
}, x(e.description), 3)) : o("", !0),
|
|
815
|
-
t.$slots.default ? (g(), s("div", {
|
|
816
|
-
key: 1,
|
|
817
|
-
class: p(S(L)("empty", "action"))
|
|
818
|
-
}, [y(t.$slots, "default")], 2)) : o("", !0)
|
|
819
|
-
], 2));
|
|
820
|
-
}
|
|
821
|
-
}), Dt = Et, Ot = ["aria-label"], kt = ["aria-label"], At = ["disabled"], jt = /* @__PURE__ */ d({
|
|
822
|
-
name: "CaModal",
|
|
823
|
-
__name: "modal",
|
|
824
|
-
props: {
|
|
825
|
-
modelValue: { type: Boolean },
|
|
826
|
-
title: {},
|
|
827
|
-
width: {},
|
|
828
|
-
maskClosable: {
|
|
829
|
-
type: Boolean,
|
|
830
|
-
default: !0
|
|
831
|
-
},
|
|
832
|
-
escClosable: {
|
|
833
|
-
type: Boolean,
|
|
834
|
-
default: !0
|
|
835
|
-
},
|
|
836
|
-
destroyOnClose: { type: Boolean },
|
|
837
|
-
showFooter: {
|
|
838
|
-
type: Boolean,
|
|
839
|
-
default: !1
|
|
840
|
-
},
|
|
841
|
-
confirmText: {},
|
|
842
|
-
cancelText: {},
|
|
843
|
-
confirmLoading: { type: Boolean }
|
|
844
|
-
},
|
|
845
|
-
emits: [
|
|
846
|
-
"update:modelValue",
|
|
847
|
-
"confirm",
|
|
848
|
-
"cancel",
|
|
849
|
-
"closed"
|
|
850
|
-
],
|
|
851
|
-
setup(e, { emit: r }) {
|
|
852
|
-
let { t: d } = P(), v = e, b = i(() => v.confirmText ?? d("ca.common.confirm")), C = i(() => v.cancelText ?? d("ca.common.cancel")), w = r, D = _(), O = _(v.modelValue), A = null;
|
|
853
|
-
function j() {
|
|
854
|
-
w("update:modelValue", !1), w("cancel");
|
|
855
|
-
}
|
|
856
|
-
function M() {
|
|
857
|
-
w("confirm");
|
|
858
|
-
}
|
|
859
|
-
function N(e) {
|
|
860
|
-
if (!v.modelValue) return;
|
|
861
|
-
if (e.key === "Escape" && v.escClosable) {
|
|
862
|
-
e.stopPropagation(), j();
|
|
863
|
-
return;
|
|
864
|
-
}
|
|
865
|
-
if (e.key !== "Tab") return;
|
|
866
|
-
let t = St(D.value);
|
|
867
|
-
if (!t.length) return;
|
|
868
|
-
let n = t[0], r = t[t.length - 1];
|
|
869
|
-
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
870
|
-
}
|
|
871
|
-
return T(() => v.modelValue, async (e) => {
|
|
872
|
-
e ? (A = document.activeElement instanceof HTMLElement ? document.activeElement : null, xt(), document.addEventListener("keydown", N), O.value = !0, await f(), St(D.value)[0]?.focus()) : O.value && (B(), document.removeEventListener("keydown", N), A?.focus(), A = null, v.destroyOnClose && (O.value = !1), w("closed"));
|
|
873
|
-
}), h(() => {
|
|
874
|
-
v.modelValue && B(), document.removeEventListener("keydown", N);
|
|
875
|
-
}), (r, i) => (g(), a(t, { to: "body" }, [u(n, { name: "ca-modal" }, {
|
|
876
|
-
default: E(() => [e.modelValue && O.value ? (g(), s("div", {
|
|
877
|
-
key: 0,
|
|
878
|
-
class: p(S(L)("modal")),
|
|
879
|
-
onClick: i[0] ||= k((t) => e.maskClosable && j(), ["self"])
|
|
880
|
-
}, [c("section", {
|
|
881
|
-
ref_key: "panelRef",
|
|
882
|
-
ref: D,
|
|
883
|
-
class: p(S(R)(S(L)("modal", "panel"), S(L)("modal", void 0, "panel"))),
|
|
884
|
-
role: "dialog",
|
|
885
|
-
"aria-modal": "true",
|
|
886
|
-
"aria-label": e.title,
|
|
887
|
-
style: m({ width: typeof e.width == "number" ? `${e.width}px` : e.width })
|
|
888
|
-
}, [
|
|
889
|
-
c("header", { class: p(S(L)("modal", "header")) }, [c("h2", { class: p(S(L)("modal", "title")) }, [y(r.$slots, "title", {}, () => [l(x(e.title), 1)])], 2), c("button", {
|
|
890
|
-
class: p(S(L)("modal", "close")),
|
|
891
|
-
type: "button",
|
|
892
|
-
"aria-label": S(d)("ca.common.close"),
|
|
893
|
-
onClick: j
|
|
894
|
-
}, [u(S(I), { size: 18 })], 10, kt)], 2),
|
|
895
|
-
c("div", { class: p(S(L)("modal", "body")) }, [y(r.$slots, "default")], 2),
|
|
896
|
-
e.showFooter || r.$slots.footer ? (g(), s("footer", {
|
|
897
|
-
key: 0,
|
|
898
|
-
class: p(S(L)("modal", "footer"))
|
|
899
|
-
}, [y(r.$slots, "footer", {}, () => [c("button", {
|
|
900
|
-
class: p(S(L)("modal", "button")),
|
|
901
|
-
type: "button",
|
|
902
|
-
onClick: j
|
|
903
|
-
}, x(C.value), 3), c("button", {
|
|
904
|
-
class: p(S(R)(S(L)("modal", "button"), S(L)("modal", "button", "primary"))),
|
|
905
|
-
type: "button",
|
|
906
|
-
disabled: e.confirmLoading,
|
|
907
|
-
onClick: M
|
|
908
|
-
}, x(e.confirmLoading ? S(d)("ca.common.processing") : b.value), 11, At)])], 2)) : o("", !0)
|
|
909
|
-
], 14, Ot)], 2)) : o("", !0)]),
|
|
910
|
-
_: 3
|
|
911
|
-
})]));
|
|
912
|
-
}
|
|
913
|
-
}), Mt = ["aria-label"], Nt = /* @__PURE__ */ d({
|
|
914
|
-
name: "CaPageHeader",
|
|
915
|
-
__name: "page-header",
|
|
916
|
-
props: {
|
|
917
|
-
title: {},
|
|
918
|
-
description: {},
|
|
919
|
-
backable: { type: Boolean },
|
|
920
|
-
bordered: {
|
|
921
|
-
type: Boolean,
|
|
922
|
-
default: !0
|
|
923
|
-
}
|
|
924
|
-
},
|
|
925
|
-
emits: ["back"],
|
|
926
|
-
setup(e, { emit: t }) {
|
|
927
|
-
let { t: n } = P(), r = e, a = t, l = i(() => R(L("page-header"), r.bordered ? L("page-header", void 0, "bordered") : ""));
|
|
928
|
-
return (t, r) => (g(), s("header", { class: p(l.value) }, [c("div", { class: p(S(L)("page-header", "main")) }, [e.backable ? (g(), s("button", {
|
|
929
|
-
key: 0,
|
|
930
|
-
class: p(S(L)("page-header", "back")),
|
|
931
|
-
type: "button",
|
|
932
|
-
"aria-label": S(n)("ca.common.back"),
|
|
933
|
-
onClick: r[0] ||= (e) => a("back")
|
|
934
|
-
}, [u(S(ae), { size: 16 })], 10, Mt)) : o("", !0), c("div", { class: p(S(L)("page-header", "text")) }, [c("h1", { class: p(S(L)("page-header", "title")) }, x(e.title), 3), e.description ? (g(), s("p", {
|
|
935
|
-
key: 0,
|
|
936
|
-
class: p(S(L)("page-header", "desc"))
|
|
937
|
-
}, x(e.description), 3)) : o("", !0)], 2)], 2), t.$slots.default ? (g(), s("div", {
|
|
938
|
-
key: 0,
|
|
939
|
-
class: p(S(L)("page-header", "actions"))
|
|
940
|
-
}, [y(t.$slots, "default")], 2)) : o("", !0)], 2));
|
|
941
|
-
}
|
|
942
|
-
});
|
|
943
|
-
//#endregion
|
|
944
|
-
//#region src/base/pagination/src/core.ts
|
|
945
|
-
function Pt(e, t, n = 1) {
|
|
946
|
-
if (t <= 1) return t === 1 ? [{
|
|
947
|
-
type: "page",
|
|
948
|
-
page: 1
|
|
949
|
-
}] : [];
|
|
950
|
-
let r = [], i = Math.max(2, e - n), a = Math.min(t - 1, e + n);
|
|
951
|
-
r.push({
|
|
952
|
-
type: "page",
|
|
953
|
-
page: 1
|
|
954
|
-
}), i > 2 && r.push({
|
|
955
|
-
type: "ellipsis",
|
|
956
|
-
page: i - 1
|
|
957
|
-
});
|
|
958
|
-
for (let e = i; e <= a; e += 1) r.push({
|
|
959
|
-
type: "page",
|
|
960
|
-
page: e
|
|
961
|
-
});
|
|
962
|
-
return a < t - 1 && r.push({
|
|
963
|
-
type: "ellipsis",
|
|
964
|
-
page: a + 1
|
|
965
|
-
}), r.push({
|
|
966
|
-
type: "page",
|
|
967
|
-
page: t
|
|
968
|
-
}), r;
|
|
969
|
-
}
|
|
970
|
-
function Ft(e, t) {
|
|
971
|
-
return t <= 0 ? 1 : Math.max(1, Math.ceil(e / t));
|
|
972
|
-
}
|
|
973
|
-
//#endregion
|
|
974
|
-
//#region src/base/pagination/src/pagination.vue?vue&type=script&setup=true&lang.ts
|
|
975
|
-
var It = ["aria-label"], Lt = ["aria-label", "disabled"], Rt = [
|
|
976
|
-
"aria-current",
|
|
977
|
-
"disabled",
|
|
978
|
-
"onClick"
|
|
979
|
-
], zt = ["aria-label", "disabled"], Bt = /* @__PURE__ */ d({
|
|
980
|
-
name: "CaPagination",
|
|
981
|
-
__name: "pagination",
|
|
982
|
-
props: {
|
|
983
|
-
current: { default: 1 },
|
|
984
|
-
pageSize: { default: 10 },
|
|
985
|
-
total: {},
|
|
986
|
-
disabled: {
|
|
987
|
-
type: Boolean,
|
|
988
|
-
default: !1
|
|
989
|
-
},
|
|
990
|
-
showTotal: {
|
|
991
|
-
type: Boolean,
|
|
992
|
-
default: !0
|
|
993
|
-
}
|
|
994
|
-
},
|
|
995
|
-
emits: [
|
|
996
|
-
"update:current",
|
|
997
|
-
"update:pageSize",
|
|
998
|
-
"change"
|
|
999
|
-
],
|
|
1000
|
-
setup(t, { emit: n }) {
|
|
1001
|
-
let { t: r } = P(), a = t, l = n, d = i(() => Ft(a.total, a.pageSize)), f = i(() => Pt(a.current, d.value));
|
|
1002
|
-
function m(e) {
|
|
1003
|
-
if (a.disabled) return;
|
|
1004
|
-
let t = Math.min(d.value, Math.max(1, e));
|
|
1005
|
-
t !== a.current && (l("update:current", t), l("change", t, a.pageSize));
|
|
1006
|
-
}
|
|
1007
|
-
return (n, i) => (g(), s("nav", {
|
|
1008
|
-
class: p(S(L)("pagination")),
|
|
1009
|
-
"aria-label": S(r)("ca.pagination.label")
|
|
1010
|
-
}, [
|
|
1011
|
-
t.showTotal ? (g(), s("span", {
|
|
1012
|
-
key: 0,
|
|
1013
|
-
class: p(S(L)("pagination", "total"))
|
|
1014
|
-
}, x(S(r)("ca.pagination.total", { total: t.total })), 3)) : o("", !0),
|
|
1015
|
-
c("button", {
|
|
1016
|
-
class: p(S(L)("pagination", "arrow")),
|
|
1017
|
-
type: "button",
|
|
1018
|
-
"aria-label": S(r)("ca.pagination.prev"),
|
|
1019
|
-
disabled: t.disabled || t.current <= 1,
|
|
1020
|
-
onClick: i[0] ||= (e) => m(t.current - 1)
|
|
1021
|
-
}, [u(S(de), { size: 14 })], 10, Lt),
|
|
1022
|
-
(g(!0), s(e, null, v(f.value, (n, r) => (g(), s(e, { key: `${n.type}-${n.page}-${r}` }, [n.type === "ellipsis" ? (g(), s("span", {
|
|
1023
|
-
key: 0,
|
|
1024
|
-
class: p(S(L)("pagination", "ellipsis"))
|
|
1025
|
-
}, "…", 2)) : (g(), s("button", {
|
|
1026
|
-
key: 1,
|
|
1027
|
-
class: p(S(R)(S(L)("pagination", "item"), n.page === t.current ? S(L)("pagination", "item", "active") : "")),
|
|
1028
|
-
type: "button",
|
|
1029
|
-
"aria-current": n.page === t.current ? "page" : void 0,
|
|
1030
|
-
disabled: t.disabled,
|
|
1031
|
-
onClick: (e) => m(n.page)
|
|
1032
|
-
}, x(n.page), 11, Rt))], 64))), 128)),
|
|
1033
|
-
c("button", {
|
|
1034
|
-
class: p(S(L)("pagination", "arrow")),
|
|
1035
|
-
type: "button",
|
|
1036
|
-
"aria-label": S(r)("ca.pagination.next"),
|
|
1037
|
-
disabled: t.disabled || t.current >= d.value,
|
|
1038
|
-
onClick: i[1] ||= (e) => m(t.current + 1)
|
|
1039
|
-
}, [u(S(F), { size: 14 })], 10, zt)
|
|
1040
|
-
], 10, It));
|
|
1041
|
-
}
|
|
1042
|
-
}), Vt = ["disabled"], Ht = ["disabled"], Ut = /* @__PURE__ */ d({
|
|
1043
|
-
name: "CaSearchForm",
|
|
1044
|
-
__name: "search-form",
|
|
1045
|
-
props: {
|
|
1046
|
-
loading: { type: Boolean },
|
|
1047
|
-
columns: { default: 4 },
|
|
1048
|
-
visibleCount: { default: 3 },
|
|
1049
|
-
searchText: {},
|
|
1050
|
-
resetText: {}
|
|
1051
|
-
},
|
|
1052
|
-
emits: ["search", "reset"],
|
|
1053
|
-
setup(e, { expose: t, emit: n }) {
|
|
1054
|
-
let { t: r } = P(), a = e, d = i(() => a.searchText ?? r("ca.searchForm.search")), f = i(() => a.resetText ?? r("ca.searchForm.reset")), h = n, v = _(!1), b = _(0), C = L("search-form"), w = i(() => b.value > a.visibleCount), T = i(() => ({ gridTemplateColumns: `repeat(${a.columns}, minmax(0, 1fr))` }));
|
|
1055
|
-
return t({
|
|
1056
|
-
expand: () => {
|
|
1057
|
-
v.value = !0;
|
|
1058
|
-
},
|
|
1059
|
-
collapse: () => {
|
|
1060
|
-
v.value = !1;
|
|
1061
|
-
}
|
|
1062
|
-
}), (t, n) => (g(), s("form", {
|
|
1063
|
-
class: p(S(C)),
|
|
1064
|
-
onSubmit: n[2] ||= k((e) => h("search"), ["prevent"])
|
|
1065
|
-
}, [c("div", {
|
|
1066
|
-
class: p(S(R)(S(L)("search-form", "fields"), w.value && !v.value ? S(L)("search-form", "fields", "collapsed") : "")),
|
|
1067
|
-
style: m(w.value && !v.value ? {
|
|
1068
|
-
...T.value,
|
|
1069
|
-
maxHeight: "var(--ca-search-form-row, 100%)"
|
|
1070
|
-
} : T.value)
|
|
1071
|
-
}, [y(t.$slots, "default")], 6), c("div", { class: p(S(L)("search-form", "actions")) }, [
|
|
1072
|
-
c("button", {
|
|
1073
|
-
class: p(S(L)("search-form", "button")),
|
|
1074
|
-
type: "button",
|
|
1075
|
-
disabled: e.loading,
|
|
1076
|
-
onClick: n[0] ||= (e) => h("reset")
|
|
1077
|
-
}, [u(S(be), { size: 14 }), l(x(f.value), 1)], 10, Vt),
|
|
1078
|
-
c("button", {
|
|
1079
|
-
class: p(S(R)(S(L)("search-form", "button"), S(L)("search-form", "button", "primary"))),
|
|
1080
|
-
type: "submit",
|
|
1081
|
-
disabled: e.loading
|
|
1082
|
-
}, [u(S(xe), { size: 14 }), l(x(e.loading ? S(r)("ca.searchForm.searching") : d.value), 1)], 10, Ht),
|
|
1083
|
-
w.value ? (g(), s("button", {
|
|
1084
|
-
key: 0,
|
|
1085
|
-
class: p(S(L)("search-form", "toggle")),
|
|
1086
|
-
type: "button",
|
|
1087
|
-
onClick: n[1] ||= (e) => v.value = !v.value
|
|
1088
|
-
}, [l(x(v.value ? S(r)("ca.common.collapse") : S(r)("ca.common.expand")) + " ", 1), u(S(ue), {
|
|
1089
|
-
size: 13,
|
|
1090
|
-
class: p(S(R)(S(L)("search-form", "arrow"), v.value ? S(L)("search-form", "arrow", "open") : ""))
|
|
1091
|
-
}, null, 8, ["class"])], 2)) : o("", !0)
|
|
1092
|
-
], 2)], 34));
|
|
1093
|
-
}
|
|
1094
|
-
});
|
|
1095
|
-
//#endregion
|
|
1096
|
-
//#region src/base/menu/core.ts
|
|
1097
|
-
function V(e) {
|
|
1098
|
-
return e.key ?? e.value ?? e.label;
|
|
1099
|
-
}
|
|
1100
|
-
function Wt(e, t, n = 0, r = []) {
|
|
1101
|
-
let i = [];
|
|
1102
|
-
return e.forEach((e) => {
|
|
1103
|
-
let a = V(e), o = !!e.children?.length;
|
|
1104
|
-
i.push({
|
|
1105
|
-
...e,
|
|
1106
|
-
level: n,
|
|
1107
|
-
itemKey: a,
|
|
1108
|
-
expandable: o,
|
|
1109
|
-
parentKeys: r
|
|
1110
|
-
}), o && t.has(a) && i.push(...Wt(e.children, t, n + 1, [...r, a]));
|
|
1111
|
-
}), i;
|
|
1112
|
-
}
|
|
1113
|
-
function Gt(e) {
|
|
1114
|
-
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
1115
|
-
e.forEach((e) => {
|
|
1116
|
-
e.children?.length && (t.add(V(e)), n(e.children));
|
|
1117
|
-
});
|
|
1118
|
-
};
|
|
1119
|
-
return n(e), t;
|
|
1120
|
-
}
|
|
1121
|
-
//#endregion
|
|
1122
|
-
//#region src/base/menu/side-menu/src/side-menu.vue?vue&type=script&setup=true&lang.ts
|
|
1123
|
-
var Kt = ["aria-label"], qt = [
|
|
1124
|
-
"data-level",
|
|
1125
|
-
"disabled",
|
|
1126
|
-
"aria-expanded",
|
|
1127
|
-
"aria-current",
|
|
1128
|
-
"onClick"
|
|
1129
|
-
], Jt = ["data-size"], Yt = /* @__PURE__ */ d({
|
|
1130
|
-
name: "CaSideMenu",
|
|
1131
|
-
__name: "side-menu",
|
|
1132
|
-
props: {
|
|
1133
|
-
items: {},
|
|
1134
|
-
modelValue: {},
|
|
1135
|
-
expandedKeys: {},
|
|
1136
|
-
defaultExpandAll: {
|
|
1137
|
-
type: Boolean,
|
|
1138
|
-
default: !1
|
|
1139
|
-
},
|
|
1140
|
-
highlightBranch: {
|
|
1141
|
-
type: Boolean,
|
|
1142
|
-
default: !0
|
|
1143
|
-
},
|
|
1144
|
-
ariaLabel: {},
|
|
1145
|
-
indent: { default: 14 },
|
|
1146
|
-
indentStep: { default: 14 },
|
|
1147
|
-
levelOffset: { default: () => [] },
|
|
1148
|
-
subIcon: {}
|
|
1149
|
-
},
|
|
1150
|
-
emits: [
|
|
1151
|
-
"update:modelValue",
|
|
1152
|
-
"update:expandedKeys",
|
|
1153
|
-
"select",
|
|
1154
|
-
"expand-change"
|
|
1155
|
-
],
|
|
1156
|
-
setup(t, { emit: n }) {
|
|
1157
|
-
let { t: r } = P(), d = t, f = i(() => d.ariaLabel ?? r("ca.sideMenu.label")), h = me, C = fe, w = n, E = L("side-menu"), D = _(d.defaultExpandAll ? Gt(d.items) : /* @__PURE__ */ new Set());
|
|
1158
|
-
T(() => d.expandedKeys, (e) => {
|
|
1159
|
-
e !== void 0 && (D.value = new Set(e));
|
|
1160
|
-
}, { immediate: !0 });
|
|
1161
|
-
function O(e) {
|
|
1162
|
-
d.expandedKeys ? w("update:expandedKeys", [...e]) : D.value = e;
|
|
1163
|
-
}
|
|
1164
|
-
let k = i(() => d.expandedKeys ? new Set(d.expandedKeys) : D.value), A = i(() => Wt(d.items, k.value)), j = i(() => {
|
|
1165
|
-
if (!d.modelValue) return [];
|
|
1166
|
-
let e = (t, n) => {
|
|
1167
|
-
for (let r of t) {
|
|
1168
|
-
let t = V(r);
|
|
1169
|
-
if (t === d.modelValue) return n;
|
|
1170
|
-
if (r.children?.length) {
|
|
1171
|
-
let i = e(r.children, [...n, t]);
|
|
1172
|
-
if (i.length) return i;
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
return [];
|
|
1176
|
-
};
|
|
1177
|
-
return e(d.items, []);
|
|
1178
|
-
});
|
|
1179
|
-
T(j, (e) => {
|
|
1180
|
-
if (!e.length) return;
|
|
1181
|
-
let t = new Set(k.value), n = !1;
|
|
1182
|
-
e.forEach((e) => {
|
|
1183
|
-
t.has(e) || (t.add(e), n = !0);
|
|
1184
|
-
}), n && O(t);
|
|
1185
|
-
}, {
|
|
1186
|
-
immediate: !0,
|
|
1187
|
-
flush: "post"
|
|
1188
|
-
});
|
|
1189
|
-
function M(e, t, n) {
|
|
1190
|
-
O(e), w("expand-change", [...e], t, n);
|
|
1191
|
-
}
|
|
1192
|
-
function N(e) {
|
|
1193
|
-
let t = new Set(k.value), n = !t.has(e);
|
|
1194
|
-
n ? t.add(e) : t.delete(e), M(t, e, n);
|
|
1195
|
-
}
|
|
1196
|
-
function ee(e) {
|
|
1197
|
-
return !!d.modelValue && d.modelValue === e;
|
|
1198
|
-
}
|
|
1199
|
-
function te(e) {
|
|
1200
|
-
if (e.icon) return e.icon;
|
|
1201
|
-
if (e.level !== 0) return e.children?.length ? C : d.subIcon ?? h;
|
|
1202
|
-
}
|
|
1203
|
-
function ne(e) {
|
|
1204
|
-
return e.level > 0 && !e.icon && !e.children?.length;
|
|
1205
|
-
}
|
|
1206
|
-
function re(e) {
|
|
1207
|
-
if (!d.highlightBranch || !e.children?.length) return !1;
|
|
1208
|
-
let t = (e) => e.some((e) => V(e) === d.modelValue || (e.children ? t(e.children) : !1));
|
|
1209
|
-
return t(e.children);
|
|
1210
|
-
}
|
|
1211
|
-
function ie(e) {
|
|
1212
|
-
if (e.disabled) return;
|
|
1213
|
-
let t = V(e);
|
|
1214
|
-
if (e.children?.length) {
|
|
1215
|
-
N(t);
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
w("update:modelValue", t, e), w("select", e, t);
|
|
1219
|
-
}
|
|
1220
|
-
return (n, r) => (g(), s("nav", {
|
|
1221
|
-
class: p(S(E)),
|
|
1222
|
-
"aria-label": f.value
|
|
1223
|
-
}, [(g(!0), s(e, null, v(A.value, (e) => (g(), s("button", {
|
|
1224
|
-
key: e.itemKey,
|
|
1225
|
-
type: "button",
|
|
1226
|
-
"data-level": e.level,
|
|
1227
|
-
class: p(S(R)(S(L)("side-menu", "item"), ee(e.itemKey) ? S(L)("side-menu", "item", "active") : "", re(e) ? S(L)("side-menu", "item", "branch") : "", k.value.has(e.itemKey) ? S(L)("side-menu", "item", "open") : "", e.level > 0 ? S(L)("side-menu", "item", "sub") : "", e.disabled ? S(L)("side-menu", "item", "disabled") : "")),
|
|
1228
|
-
style: m({ paddingLeft: `${t.indent + e.level * t.indentStep + (t.levelOffset[e.level] ?? 0)}px` }),
|
|
1229
|
-
disabled: e.disabled,
|
|
1230
|
-
"aria-expanded": e.expandable ? k.value.has(e.itemKey) : void 0,
|
|
1231
|
-
"aria-current": ee(e.itemKey) ? "page" : void 0,
|
|
1232
|
-
onClick: (t) => ie(e)
|
|
1233
|
-
}, [
|
|
1234
|
-
te(e) || n.$slots.icon ? (g(), s("span", {
|
|
1235
|
-
key: 0,
|
|
1236
|
-
class: p(S(L)("side-menu", "icon")),
|
|
1237
|
-
"data-size": e.level === 0 ? 16 : 14
|
|
1238
|
-
}, [y(n.$slots, "icon", { item: e }, () => [(g(), a(b(te(e)), {
|
|
1239
|
-
size: e.level === 0 ? 16 : 14,
|
|
1240
|
-
"stroke-width": ne(e) ? 5 : 1.8
|
|
1241
|
-
}, null, 8, ["size", "stroke-width"]))])], 10, Jt)) : o("", !0),
|
|
1242
|
-
c("span", { class: p(S(L)("side-menu", "label")) }, [y(n.$slots, "default", { item: e }, () => [l(x(e.label), 1)])], 2),
|
|
1243
|
-
e.badge || e.expandable ? (g(), s("span", {
|
|
1244
|
-
key: 1,
|
|
1245
|
-
class: p(S(L)("side-menu", "tail"))
|
|
1246
|
-
}, [e.badge ? (g(), s("em", {
|
|
1247
|
-
key: 0,
|
|
1248
|
-
class: p(S(L)("side-menu", "badge"))
|
|
1249
|
-
}, x(e.badge), 3)) : o("", !0), e.expandable ? (g(), s("span", {
|
|
1250
|
-
key: 1,
|
|
1251
|
-
class: p(S(L)("side-menu", "arrow")),
|
|
1252
|
-
"aria-hidden": "true"
|
|
1253
|
-
}, [u(S(ue), { size: 14 })], 2)) : o("", !0)], 2)) : o("", !0)
|
|
1254
|
-
], 14, qt))), 128))], 10, Kt));
|
|
1255
|
-
}
|
|
1256
|
-
}), Xt = /* @__PURE__ */ d({
|
|
1257
|
-
name: "CaSkeleton",
|
|
1258
|
-
__name: "skeleton",
|
|
1259
|
-
props: {
|
|
1260
|
-
rows: { default: 3 },
|
|
1261
|
-
variant: { default: "text" }
|
|
1262
|
-
},
|
|
1263
|
-
setup(t) {
|
|
1264
|
-
let n = L("skeleton");
|
|
1265
|
-
return (r, i) => (g(), s("div", {
|
|
1266
|
-
class: p(S(R)(S(n), S(L)("skeleton", void 0, t.variant))),
|
|
1267
|
-
"aria-busy": "true",
|
|
1268
|
-
"aria-live": "polite"
|
|
1269
|
-
}, [t.variant === "avatar" ? (g(), s(e, { key: 0 }, [c("span", { class: p(S(L)("skeleton", "avatar")) }, null, 2), c("div", { class: p(S(L)("skeleton", "lines")) }, [(g(!0), s(e, null, v(t.rows, (e) => (g(), s("span", { key: e }))), 128))], 2)], 64)) : t.variant === "card" ? (g(), s(e, { key: 1 }, [c("span", { class: p(S(L)("skeleton", "block")) }, null, 2), c("div", { class: p(S(L)("skeleton", "lines")) }, [(g(!0), s(e, null, v(t.rows, (e) => (g(), s("span", {
|
|
1270
|
-
key: e,
|
|
1271
|
-
style: m({ width: e === t.rows ? "60%" : "100%" })
|
|
1272
|
-
}, null, 4))), 128))], 2)], 64)) : (g(!0), s(e, { key: 2 }, v(t.rows, (e) => (g(), s("span", {
|
|
1273
|
-
key: e,
|
|
1274
|
-
style: m({ width: e === t.rows ? "60%" : "100%" })
|
|
1275
|
-
}, null, 4))), 128))], 2));
|
|
1276
|
-
}
|
|
1277
|
-
}), Zt = { key: 0 }, Qt = /* @__PURE__ */ d({
|
|
1278
|
-
name: "CaStatistic",
|
|
1279
|
-
__name: "statistic",
|
|
1280
|
-
props: {
|
|
1281
|
-
label: {},
|
|
1282
|
-
value: {},
|
|
1283
|
-
unit: {},
|
|
1284
|
-
hint: {},
|
|
1285
|
-
tone: { default: "neutral" },
|
|
1286
|
-
card: { type: Boolean }
|
|
1287
|
-
},
|
|
1288
|
-
setup(e) {
|
|
1289
|
-
let { locale: t } = P(), n = e, r = i(() => R(L("statistic"), L("statistic", void 0, n.tone), n.card ? L("statistic", void 0, "card") : "")), a = i(() => typeof n.value == "number" ? ee(n.value, t.value) : n.value);
|
|
1290
|
-
return (t, n) => (g(), s("div", { class: p(r.value) }, [
|
|
1291
|
-
c("span", { class: p(S(L)("statistic", "label")) }, x(e.label), 3),
|
|
1292
|
-
c("b", { class: p(S(L)("statistic", "value")) }, [l(x(a.value), 1), e.unit ? (g(), s("small", Zt, x(e.unit), 1)) : o("", !0)], 2),
|
|
1293
|
-
e.hint ? (g(), s("span", {
|
|
1294
|
-
key: 0,
|
|
1295
|
-
class: p(S(L)("statistic", "hint"))
|
|
1296
|
-
}, x(e.hint), 3)) : o("", !0)
|
|
1297
|
-
], 2));
|
|
1298
|
-
}
|
|
1299
|
-
});
|
|
1300
|
-
//#endregion
|
|
1301
|
-
//#region src/base/table/src/core.ts
|
|
1302
|
-
function $t(e, t, n) {
|
|
1303
|
-
if (typeof n == "function") return n(e);
|
|
1304
|
-
if (typeof n == "string") {
|
|
1305
|
-
let t = e[n];
|
|
1306
|
-
if (t != null) return String(t);
|
|
1307
|
-
}
|
|
1308
|
-
let r = e?.id;
|
|
1309
|
-
return String(r ?? t);
|
|
1310
|
-
}
|
|
1311
|
-
function en(e) {
|
|
1312
|
-
return e.align ? e.align : e.numeric ? "right" : "left";
|
|
1313
|
-
}
|
|
1314
|
-
function tn(e, t, n, r = "zh-CN") {
|
|
1315
|
-
let i = [...e];
|
|
1316
|
-
return i.sort((e, i) => {
|
|
1317
|
-
let a = e[t.key], o = i[t.key];
|
|
1318
|
-
return typeof a == "number" && typeof o == "number" ? n === "asc" ? a - o : o - a : n === "asc" ? String(a ?? "").localeCompare(String(o ?? ""), r) : String(o ?? "").localeCompare(String(a ?? ""), r);
|
|
1319
|
-
}), i;
|
|
1320
|
-
}
|
|
1321
|
-
function nn(e, t, n) {
|
|
1322
|
-
if (t.render) return t.render(e, n);
|
|
1323
|
-
let r = e[t.key];
|
|
1324
|
-
return r == null ? "" : String(r);
|
|
1325
|
-
}
|
|
1326
|
-
//#endregion
|
|
1327
|
-
//#region src/base/table/src/table.vue?vue&type=script&setup=true&lang.ts
|
|
1328
|
-
var rn = ["aria-sort"], an = ["onClick"], on = { key: 0 }, sn = ["colspan"], cn = ["onClick"], ln = /* @__PURE__ */ d({
|
|
1329
|
-
name: "CaTable",
|
|
1330
|
-
__name: "table",
|
|
1331
|
-
props: {
|
|
1332
|
-
columns: {},
|
|
1333
|
-
data: { default: () => [] },
|
|
1334
|
-
rowKey: {},
|
|
1335
|
-
loading: {
|
|
1336
|
-
type: Boolean,
|
|
1337
|
-
default: !1
|
|
1338
|
-
},
|
|
1339
|
-
stripe: { type: Boolean },
|
|
1340
|
-
compact: { type: Boolean },
|
|
1341
|
-
sortKey: {},
|
|
1342
|
-
sortOrder: { default: null },
|
|
1343
|
-
emptyText: {}
|
|
1344
|
-
},
|
|
1345
|
-
emits: [
|
|
1346
|
-
"update:sortKey",
|
|
1347
|
-
"update:sortOrder",
|
|
1348
|
-
"row-click",
|
|
1349
|
-
"sort"
|
|
1350
|
-
],
|
|
1351
|
-
setup(t, { emit: n }) {
|
|
1352
|
-
let { locale: r, t: d } = P(), f = t, h = i(() => f.emptyText ?? d("ca.table.empty")), b = n, C = i(() => R(L("table"), f.stripe ? L("table", void 0, "stripe") : "", f.compact ? L("table", void 0, "compact") : "")), w = _({
|
|
1353
|
-
key: f.sortKey ?? "",
|
|
1354
|
-
order: f.sortOrder ?? null
|
|
1355
|
-
});
|
|
1356
|
-
T(() => f.sortKey, (e) => {
|
|
1357
|
-
e !== void 0 && (w.value.key = e ?? "");
|
|
1358
|
-
}), T(() => f.sortOrder, (e) => {
|
|
1359
|
-
e !== void 0 && (w.value.order = e ?? null);
|
|
1360
|
-
});
|
|
1361
|
-
let E = i(() => ({
|
|
1362
|
-
key: f.sortKey ?? w.value.key,
|
|
1363
|
-
order: f.sortOrder ?? w.value.order
|
|
1364
|
-
})), D = i(() => {
|
|
1365
|
-
let { key: e, order: t } = E.value;
|
|
1366
|
-
if (!e || !t) return f.data;
|
|
1367
|
-
let n = f.columns.find((t) => t.key === e);
|
|
1368
|
-
return n?.sortable ? tn(f.data, n, t, r.value) : f.data;
|
|
1369
|
-
});
|
|
1370
|
-
function O(e) {
|
|
1371
|
-
if (!e.sortable) return;
|
|
1372
|
-
let t = E.value.key !== e.key || E.value.order === null ? "asc" : E.value.order === "asc" ? "desc" : null;
|
|
1373
|
-
w.value = {
|
|
1374
|
-
key: t ? e.key : "",
|
|
1375
|
-
order: t
|
|
1376
|
-
}, b("update:sortKey", t ? e.key : ""), b("update:sortOrder", t), b("sort", e.key, t);
|
|
1377
|
-
}
|
|
1378
|
-
return (n, r) => (g(), s("div", { class: p(C.value) }, [c("div", { class: p(S(L)("table", "scroll")) }, [c("table", null, [c("thead", null, [c("tr", null, [(g(!0), s(e, null, v(t.columns, (t) => (g(), s("th", {
|
|
1379
|
-
key: t.key,
|
|
1380
|
-
style: m({ width: typeof t.width == "number" ? `${t.width}px` : t.width }),
|
|
1381
|
-
class: p(S(R)(t.sortable ? S(L)("table", "sortable") : "", S(L)("table", void 0, S(en)(t)))),
|
|
1382
|
-
"aria-sort": E.value.key === t.key && E.value.order ? E.value.order === "asc" ? "ascending" : "descending" : "none"
|
|
1383
|
-
}, [t.sortable ? (g(), s("button", {
|
|
1384
|
-
key: 0,
|
|
1385
|
-
type: "button",
|
|
1386
|
-
onClick: (e) => O(t)
|
|
1387
|
-
}, [l(x(t.title) + " ", 1), E.value.key === t.key && E.value.order === "asc" ? (g(), a(S(oe), {
|
|
1388
|
-
key: 0,
|
|
1389
|
-
size: 12
|
|
1390
|
-
})) : E.value.key === t.key && E.value.order === "desc" ? (g(), a(S(ie), {
|
|
1391
|
-
key: 1,
|
|
1392
|
-
size: 12
|
|
1393
|
-
})) : (g(), a(S(pe), {
|
|
1394
|
-
key: 2,
|
|
1395
|
-
size: 12,
|
|
1396
|
-
class: p(S(L)("table", "sort-idle"))
|
|
1397
|
-
}, null, 8, ["class"]))], 8, an)) : (g(), s(e, { key: 1 }, [l(x(t.title), 1)], 64))], 14, rn))), 128))])]), c("tbody", null, [t.loading ? (g(), s("tr", on, [c("td", {
|
|
1398
|
-
colspan: t.columns.length,
|
|
1399
|
-
class: p(S(L)("table", "state"))
|
|
1400
|
-
}, [c("span", {
|
|
1401
|
-
class: p(S(L)("table", "spinner")),
|
|
1402
|
-
"aria-hidden": "true"
|
|
1403
|
-
}, null, 2), l(x(S(d)("ca.common.loading")), 1)], 10, sn)])) : (g(!0), s(e, { key: 1 }, v(D.value, (r, i) => (g(), s("tr", {
|
|
1404
|
-
key: S($t)(r, i, t.rowKey),
|
|
1405
|
-
class: p(S(L)("table", "row")),
|
|
1406
|
-
onClick: (e) => b("row-click", r, i)
|
|
1407
|
-
}, [(g(!0), s(e, null, v(t.columns, (e) => (g(), s("td", {
|
|
1408
|
-
key: e.key,
|
|
1409
|
-
class: p(S(L)("table", void 0, S(en)(e)))
|
|
1410
|
-
}, [y(n.$slots, `cell-${e.key}`, {
|
|
1411
|
-
row: r,
|
|
1412
|
-
index: i,
|
|
1413
|
-
column: e
|
|
1414
|
-
}, () => [l(x(S(nn)(r, e, i)), 1)])], 2))), 128))], 10, cn))), 128))])])], 2), !D.value.length && !t.loading ? (g(), s("div", {
|
|
1415
|
-
key: 0,
|
|
1416
|
-
class: p(S(L)("table", "empty"))
|
|
1417
|
-
}, [y(n.$slots, "empty", {}, () => [u(S(Dt), {
|
|
1418
|
-
title: h.value,
|
|
1419
|
-
size: "small"
|
|
1420
|
-
}, null, 8, ["title"])])], 2)) : o("", !0)], 2));
|
|
1421
|
-
}
|
|
1422
|
-
}), H = _([]);
|
|
1423
|
-
function un(e) {
|
|
1424
|
-
H.value = e;
|
|
1425
|
-
}
|
|
1426
|
-
function U(e) {
|
|
1427
|
-
let t = Date.now() + Math.floor(Math.random() * 1e3), n = {
|
|
1428
|
-
id: t,
|
|
1429
|
-
text: e.title,
|
|
1430
|
-
description: e.description,
|
|
1431
|
-
tone: e.tone ?? "primary",
|
|
1432
|
-
duration: e.duration ?? 3e3
|
|
1433
|
-
};
|
|
1434
|
-
return H.value = [...H.value, n], n.duration > 0 && setTimeout(() => W(t), n.duration), t;
|
|
1435
|
-
}
|
|
1436
|
-
function W(e) {
|
|
1437
|
-
H.value = H.value.filter((t) => t.id !== e);
|
|
1438
|
-
}
|
|
1439
|
-
function dn() {
|
|
1440
|
-
H.value = [];
|
|
1441
|
-
}
|
|
1442
|
-
var fn = {
|
|
1443
|
-
show: U,
|
|
1444
|
-
success: (e, t) => U({
|
|
1445
|
-
title: e,
|
|
1446
|
-
description: t,
|
|
1447
|
-
tone: "success"
|
|
1448
|
-
}),
|
|
1449
|
-
warning: (e, t) => U({
|
|
1450
|
-
title: e,
|
|
1451
|
-
description: t,
|
|
1452
|
-
tone: "warning"
|
|
1453
|
-
}),
|
|
1454
|
-
error: (e, t) => U({
|
|
1455
|
-
title: e,
|
|
1456
|
-
description: t,
|
|
1457
|
-
tone: "danger"
|
|
1458
|
-
}),
|
|
1459
|
-
info: (e, t) => U({
|
|
1460
|
-
title: e,
|
|
1461
|
-
description: t,
|
|
1462
|
-
tone: "primary"
|
|
1463
|
-
}),
|
|
1464
|
-
close: W,
|
|
1465
|
-
clear: dn
|
|
1466
|
-
}, pn = { key: 0 }, mn = ["aria-label", "onClick"], hn = /* @__PURE__ */ d({
|
|
1467
|
-
name: "CaToastContainer",
|
|
1468
|
-
__name: "toast-container",
|
|
1469
|
-
setup(t) {
|
|
1470
|
-
let { t: n } = P(), i = {
|
|
1471
|
-
primary: ve,
|
|
1472
|
-
success: le,
|
|
1473
|
-
warning: re,
|
|
1474
|
-
danger: we
|
|
1475
|
-
};
|
|
1476
|
-
return (t, l) => (g(), s("div", {
|
|
1477
|
-
class: p(S(L)("toast-container")),
|
|
1478
|
-
"aria-live": "polite",
|
|
1479
|
-
"aria-atomic": "false"
|
|
1480
|
-
}, [u(r, { name: "ca-toast" }, {
|
|
1481
|
-
default: E(() => [(g(!0), s(e, null, v(S(H), (e) => (g(), s("div", {
|
|
1482
|
-
key: e.id,
|
|
1483
|
-
class: p(S(R)(S(L)("toast"), S(L)("toast", void 0, e.tone))),
|
|
1484
|
-
role: "status"
|
|
1485
|
-
}, [
|
|
1486
|
-
(g(), a(b(i[e.tone]), { size: 17 })),
|
|
1487
|
-
c("div", { class: p(S(L)("toast", "body")) }, [c("b", null, x(e.text), 1), e.description ? (g(), s("p", pn, x(e.description), 1)) : o("", !0)], 2),
|
|
1488
|
-
c("button", {
|
|
1489
|
-
class: p(S(L)("toast", "close")),
|
|
1490
|
-
type: "button",
|
|
1491
|
-
"aria-label": S(n)("ca.toast.close"),
|
|
1492
|
-
onClick: (t) => S(W)(e.id)
|
|
1493
|
-
}, [u(S(I), { size: 13 })], 10, mn)
|
|
1494
|
-
], 2))), 128))]),
|
|
1495
|
-
_: 1
|
|
1496
|
-
})], 2));
|
|
1497
|
-
}
|
|
1498
|
-
}), gn = {
|
|
1499
|
-
CaBreadcrumb: dt,
|
|
1500
|
-
CaClassTree: vt,
|
|
1501
|
-
CaCopyright: yt,
|
|
1502
|
-
CaDrawer: Tt,
|
|
1503
|
-
CaEmpty: Et,
|
|
1504
|
-
CaModal: jt,
|
|
1505
|
-
CaPageHeader: Nt,
|
|
1506
|
-
CaPagination: Bt,
|
|
1507
|
-
CaSearchForm: Ut,
|
|
1508
|
-
CaSideMenu: Yt,
|
|
1509
|
-
CaSkeleton: Xt,
|
|
1510
|
-
CaStatistic: Qt,
|
|
1511
|
-
CaTable: ln,
|
|
1512
|
-
CaToastContainer: hn
|
|
1513
|
-
};
|
|
1514
|
-
//#endregion
|
|
1515
|
-
//#region src/feature/daily-agenda/src/core.ts
|
|
1516
|
-
function _n(e, t, n = [
|
|
1517
|
-
9,
|
|
1518
|
-
10,
|
|
1519
|
-
11
|
|
1520
|
-
]) {
|
|
1521
|
-
let r = ne(t, "narrow");
|
|
1522
|
-
return Array.from({ length: 7 }, (t, i) => {
|
|
1523
|
-
let a = 7 + e * 7 + i;
|
|
1524
|
-
return {
|
|
1525
|
-
label: r[i],
|
|
1526
|
-
date: new Date(2026, 8, a),
|
|
1527
|
-
hasEvent: n.includes(a)
|
|
1528
|
-
};
|
|
1529
|
-
});
|
|
1530
|
-
}
|
|
1531
|
-
function vn(e, t) {
|
|
1532
|
-
let n = e + t;
|
|
1533
|
-
return {
|
|
1534
|
-
day: 7 + n * 7,
|
|
1535
|
-
offset: n
|
|
1536
|
-
};
|
|
1537
|
-
}
|
|
1538
|
-
function yn(e, t, n) {
|
|
1539
|
-
let r = n.trim();
|
|
1540
|
-
return e.filter((e) => e.day === t && e.title.includes(r));
|
|
1541
|
-
}
|
|
1542
|
-
function bn(e, t) {
|
|
1543
|
-
return N(e, t);
|
|
1544
|
-
}
|
|
1545
|
-
function xn(e, t, n, r) {
|
|
1546
|
-
let i = r(e.done ? "ca.agenda.doneState" : "ca.agenda.todoState");
|
|
1547
|
-
return r("ca.agenda.describe", {
|
|
1548
|
-
date: M(t, n),
|
|
1549
|
-
time: e.time,
|
|
1550
|
-
location: e.location,
|
|
1551
|
-
state: i
|
|
1552
|
-
});
|
|
1553
|
-
}
|
|
1554
|
-
//#endregion
|
|
1555
|
-
//#region src/feature/daily-agenda/src/data.ts
|
|
1556
|
-
var Sn = [
|
|
1557
|
-
{
|
|
1558
|
-
day: 11,
|
|
1559
|
-
time: "09:00",
|
|
1560
|
-
title: "阅读校务简报,确认今日工作安排",
|
|
1561
|
-
location: "行政办公室",
|
|
1562
|
-
done: !0
|
|
1563
|
-
},
|
|
1564
|
-
{
|
|
1565
|
-
day: 11,
|
|
1566
|
-
time: "11:00",
|
|
1567
|
-
title: "秋季运动会筹备工作协调会",
|
|
1568
|
-
location: "综合楼 · 第一会议室",
|
|
1569
|
-
done: !0
|
|
1570
|
-
},
|
|
1571
|
-
{
|
|
1572
|
-
day: 11,
|
|
1573
|
-
time: "14:30",
|
|
1574
|
-
title: "高一年级教学质量分析会",
|
|
1575
|
-
location: "教学楼 · 302 教研室",
|
|
1576
|
-
done: !1
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
day: 11,
|
|
1580
|
-
time: "16:30",
|
|
1581
|
-
title: "校园安全与设备巡检结果复核",
|
|
1582
|
-
location: "行政办公室",
|
|
1583
|
-
done: !1
|
|
1584
|
-
},
|
|
1585
|
-
{
|
|
1586
|
-
day: 10,
|
|
1587
|
-
time: "10:00",
|
|
1588
|
-
title: "新学期班主任工作交流会",
|
|
1589
|
-
location: "综合楼 · 第一会议室",
|
|
1590
|
-
done: !0
|
|
1591
|
-
},
|
|
1592
|
-
{
|
|
1593
|
-
day: 9,
|
|
1594
|
-
time: "14:00",
|
|
1595
|
-
title: "智慧食堂服务质量评议",
|
|
1596
|
-
location: "食堂二楼",
|
|
1597
|
-
done: !0
|
|
1598
|
-
}
|
|
1599
|
-
], Cn = ["aria-label"], wn = [
|
|
1600
|
-
"aria-pressed",
|
|
1601
|
-
"aria-label",
|
|
1602
|
-
"onClick"
|
|
1603
|
-
], Tn = ["aria-label"], En = ["onClick"], Dn = /* @__PURE__ */ d({
|
|
1604
|
-
name: "CaDailyAgenda",
|
|
1605
|
-
__name: "daily-agenda",
|
|
1606
|
-
props: { keyword: { default: "" } },
|
|
1607
|
-
emits: ["detail"],
|
|
1608
|
-
setup(t, { emit: n }) {
|
|
1609
|
-
let { locale: r, t: a } = P(), d = t, f = n, m = _(11), h = _(0), y = i(() => _n(h.value, r.value)), b = i(() => yn(Sn, m.value, d.keyword)), C = i(() => new Date(2026, 8, m.value)), w = i(() => bn(C.value, r.value));
|
|
1610
|
-
function T(e) {
|
|
1611
|
-
m.value = e.date.getDate();
|
|
1612
|
-
}
|
|
1613
|
-
function E(e) {
|
|
1614
|
-
let t = vn(h.value, e);
|
|
1615
|
-
h.value = t.offset, m.value = t.day;
|
|
1616
|
-
}
|
|
1617
|
-
function D() {
|
|
1618
|
-
h.value = 0, m.value = 11;
|
|
1619
|
-
}
|
|
1620
|
-
function O(e) {
|
|
1621
|
-
f("detail", e.title, xn(e, C.value, r.value, a));
|
|
1622
|
-
}
|
|
1623
|
-
return (t, n) => (g(), s("section", { class: p(S(L)("agenda")) }, [
|
|
1624
|
-
c("div", { class: p(S(L)("agenda", "head")) }, [c("h3", { class: p(S(L)("agenda", "heading")) }, x(S(a)("ca.agenda.title")), 3), c("button", {
|
|
1625
|
-
class: p(S(L)("agenda", "link")),
|
|
1626
|
-
type: "button",
|
|
1627
|
-
onClick: D
|
|
1628
|
-
}, x(S(a)("ca.agenda.backToToday")), 3)], 2),
|
|
1629
|
-
c("div", { class: p(S(L)("agenda", "month")) }, [c("span", null, x(w.value), 1), c("span", { class: p(S(L)("agenda", "count")) }, x(S(a)("ca.agenda.count", { count: b.value.length })), 3)], 2),
|
|
1630
|
-
c("div", { class: p(S(L)("agenda", "strip")) }, [
|
|
1631
|
-
c("button", {
|
|
1632
|
-
class: p(S(L)("agenda", "arrow")),
|
|
1633
|
-
type: "button",
|
|
1634
|
-
"aria-label": S(a)("ca.agenda.prevWeek"),
|
|
1635
|
-
onClick: n[0] ||= (e) => E(-1)
|
|
1636
|
-
}, [u(S(de), { size: 14 })], 10, Cn),
|
|
1637
|
-
(g(!0), s(e, null, v(y.value, (e) => (g(), s("button", {
|
|
1638
|
-
key: e.date.toISOString(),
|
|
1639
|
-
type: "button",
|
|
1640
|
-
class: p(S(R)(S(L)("agenda", "date"), e.date.getTime() === C.value.getTime() ? S(L)("agenda", "date", "selected") : "", e.hasEvent ? S(L)("agenda", "date", "has-event") : "")),
|
|
1641
|
-
"aria-pressed": e.date.getTime() === C.value.getTime(),
|
|
1642
|
-
"aria-label": S(a)("ca.agenda.dayLabel", { date: S(M)(e.date, S(r)) }),
|
|
1643
|
-
onClick: (t) => T(e)
|
|
1644
|
-
}, [c("small", null, x(e.label), 1), c("b", null, x(e.date.getDate().toString().padStart(2, "0")), 1)], 10, wn))), 128)),
|
|
1645
|
-
c("button", {
|
|
1646
|
-
class: p(S(L)("agenda", "arrow")),
|
|
1647
|
-
type: "button",
|
|
1648
|
-
"aria-label": S(a)("ca.agenda.nextWeek"),
|
|
1649
|
-
onClick: n[1] ||= (e) => E(1)
|
|
1650
|
-
}, [u(S(F), { size: 14 })], 10, Tn)
|
|
1651
|
-
], 2),
|
|
1652
|
-
c("div", {
|
|
1653
|
-
class: p(S(L)("agenda", "list")),
|
|
1654
|
-
"aria-live": "polite"
|
|
1655
|
-
}, [(g(!0), s(e, null, v(b.value, (e) => (g(), s("div", {
|
|
1656
|
-
key: e.title,
|
|
1657
|
-
class: p(S(R)(S(L)("agenda", "item"), e.done ? S(L)("agenda", "item", "done") : ""))
|
|
1658
|
-
}, [c("span", { class: p(S(L)("agenda", "dot")) }, null, 2), c("div", { class: p(S(L)("agenda", "card")) }, [
|
|
1659
|
-
c("div", { class: p(S(L)("agenda", "card-head")) }, [c("time", { class: p(S(L)("agenda", "time")) }, x(e.time), 3), c("button", {
|
|
1660
|
-
class: p(S(L)("agenda", "detail")),
|
|
1661
|
-
type: "button",
|
|
1662
|
-
onClick: (t) => O(e)
|
|
1663
|
-
}, x(S(a)("ca.agenda.detail")), 11, En)], 2),
|
|
1664
|
-
c("p", null, x(e.title), 1),
|
|
1665
|
-
c("small", { class: p(S(L)("agenda", "location")) }, x(e.location), 3)
|
|
1666
|
-
], 2)], 2))), 128)), b.value.length ? o("", !0) : (g(), s("div", {
|
|
1667
|
-
key: 0,
|
|
1668
|
-
class: p(S(L)("agenda", "empty"))
|
|
1669
|
-
}, [
|
|
1670
|
-
u(S(se), { size: 30 }),
|
|
1671
|
-
c("p", null, x(d.keyword ? S(a)("ca.agenda.emptySearchTitle") : S(a)("ca.agenda.emptyTitle")), 1),
|
|
1672
|
-
c("span", null, x(d.keyword ? S(a)("ca.agenda.emptySearchDescription") : S(a)("ca.agenda.emptyDescription")), 1)
|
|
1673
|
-
], 2))], 2),
|
|
1674
|
-
c("div", { class: p(S(L)("agenda", "footer")) }, [n[2] ||= c("i", null, null, -1), l(x(S(a)("ca.agenda.footer")), 1)], 2)
|
|
1675
|
-
], 2));
|
|
1676
|
-
}
|
|
1677
|
-
});
|
|
1678
|
-
//#endregion
|
|
1679
|
-
//#region src/feature/student-picker/src/core.ts
|
|
1680
|
-
function On(e, t) {
|
|
1681
|
-
let n = t.trim().toLowerCase();
|
|
1682
|
-
return n ? e.filter((e) => [
|
|
1683
|
-
e.name,
|
|
1684
|
-
e.studentNo,
|
|
1685
|
-
e.className,
|
|
1686
|
-
e.grade
|
|
1687
|
-
].filter(Boolean).join(" ").toLowerCase().includes(n)) : e;
|
|
1688
|
-
}
|
|
1689
|
-
function kn(e) {
|
|
1690
|
-
return e === void 0 || e === "" ? [] : Array.isArray(e) ? e.filter(Boolean) : [e];
|
|
1691
|
-
}
|
|
1692
|
-
function An(e, t) {
|
|
1693
|
-
return kn(e).includes(t);
|
|
1694
|
-
}
|
|
1695
|
-
function jn(e, t) {
|
|
1696
|
-
return kn(e)[0] === t ? void 0 : t;
|
|
1697
|
-
}
|
|
1698
|
-
function Mn(e, t) {
|
|
1699
|
-
let n = kn(e);
|
|
1700
|
-
return n.includes(t) ? n.filter((e) => e !== t) : [...n, t];
|
|
1701
|
-
}
|
|
1702
|
-
//#endregion
|
|
1703
|
-
//#region src/feature/student-picker/src/student-picker.vue?vue&type=script&setup=true&lang.ts
|
|
1704
|
-
var Nn = ["placeholder", "aria-label"], Pn = ["aria-multiselectable"], Fn = ["aria-selected", "onClick"], In = /* @__PURE__ */ d({
|
|
1705
|
-
name: "CaStudentPicker",
|
|
1706
|
-
__name: "student-picker",
|
|
1707
|
-
props: {
|
|
1708
|
-
modelValue: {},
|
|
1709
|
-
students: { default: () => [] },
|
|
1710
|
-
multiple: { type: Boolean },
|
|
1711
|
-
placeholder: {},
|
|
1712
|
-
loading: {
|
|
1713
|
-
type: Boolean,
|
|
1714
|
-
default: !1
|
|
1715
|
-
},
|
|
1716
|
-
clearable: {
|
|
1717
|
-
type: Boolean,
|
|
1718
|
-
default: !0
|
|
1719
|
-
}
|
|
1720
|
-
},
|
|
1721
|
-
emits: [
|
|
1722
|
-
"update:modelValue",
|
|
1723
|
-
"change",
|
|
1724
|
-
"search"
|
|
1725
|
-
],
|
|
1726
|
-
setup(t, { emit: n }) {
|
|
1727
|
-
let { t: r } = P(), l = t, d = i(() => l.placeholder ?? r("ca.studentPicker.placeholder")), f = n, m = _(""), h = i(() => On(l.students, m.value)), y = i(() => l.modelValue === void 0 || l.modelValue === "" ? [] : Array.isArray(l.modelValue) ? l.modelValue : [l.modelValue]);
|
|
1728
|
-
function b(e) {
|
|
1729
|
-
if (l.multiple) {
|
|
1730
|
-
let t = Mn(l.modelValue, e.id);
|
|
1731
|
-
f("update:modelValue", t), f("change", t, l.students.filter((e) => t.includes(e.id)));
|
|
1732
|
-
return;
|
|
1733
|
-
}
|
|
1734
|
-
let t = jn(l.modelValue, e.id);
|
|
1735
|
-
f("update:modelValue", t), f("change", t, l.students.filter((e) => e.id === t));
|
|
1736
|
-
}
|
|
1737
|
-
function C() {
|
|
1738
|
-
f("search", m.value);
|
|
1739
|
-
}
|
|
1740
|
-
return (n, i) => (g(), s("div", { class: p(S(L)("student-picker")) }, [c("div", { class: p(S(L)("student-picker", "search")) }, [
|
|
1741
|
-
u(S(xe), {
|
|
1742
|
-
size: 15,
|
|
1743
|
-
"aria-hidden": "true"
|
|
1744
|
-
}),
|
|
1745
|
-
D(c("input", {
|
|
1746
|
-
"onUpdate:modelValue": i[0] ||= (e) => m.value = e,
|
|
1747
|
-
class: p(S(L)("student-picker", "input")),
|
|
1748
|
-
type: "search",
|
|
1749
|
-
placeholder: d.value,
|
|
1750
|
-
"aria-label": S(r)("ca.studentPicker.searchLabel"),
|
|
1751
|
-
onInput: C
|
|
1752
|
-
}, null, 42, Nn), [[w, m.value]]),
|
|
1753
|
-
y.value.length ? (g(), s("span", {
|
|
1754
|
-
key: 0,
|
|
1755
|
-
class: p(S(L)("student-picker", "count"))
|
|
1756
|
-
}, x(S(r)("ca.studentPicker.selected", { count: y.value.length })), 3)) : o("", !0)
|
|
1757
|
-
], 2), c("div", {
|
|
1758
|
-
class: p(S(L)("student-picker", "list")),
|
|
1759
|
-
role: "listbox",
|
|
1760
|
-
"aria-multiselectable": t.multiple
|
|
1761
|
-
}, [t.loading ? (g(), s("div", {
|
|
1762
|
-
key: 0,
|
|
1763
|
-
class: p(S(L)("student-picker", "loading"))
|
|
1764
|
-
}, x(S(r)("ca.common.loading")), 3)) : (g(!0), s(e, { key: 1 }, v(h.value, (e) => (g(), s("button", {
|
|
1765
|
-
key: e.id,
|
|
1766
|
-
class: p(S(R)(S(L)("student-picker", "item"), S(An)(t.modelValue, e.id) ? S(L)("student-picker", "item", "selected") : "")),
|
|
1767
|
-
type: "button",
|
|
1768
|
-
role: "option",
|
|
1769
|
-
"aria-selected": S(An)(t.modelValue, e.id),
|
|
1770
|
-
onClick: (t) => b(e)
|
|
1771
|
-
}, [
|
|
1772
|
-
t.multiple ? (g(), a(S(Le), {
|
|
1773
|
-
key: 0,
|
|
1774
|
-
"model-value": S(An)(t.modelValue, e.id),
|
|
1775
|
-
tabindex: "-1"
|
|
1776
|
-
}, null, 8, ["model-value"])) : o("", !0),
|
|
1777
|
-
u(S(Me), {
|
|
1778
|
-
src: e.avatar,
|
|
1779
|
-
name: e.name,
|
|
1780
|
-
size: "small"
|
|
1781
|
-
}, null, 8, ["src", "name"]),
|
|
1782
|
-
c("span", { class: p(S(L)("student-picker", "info")) }, [c("b", null, x(e.name), 1), c("small", null, x([e.className, e.studentNo && S(r)("ca.studentPicker.studentNo", { no: e.studentNo })].filter(Boolean).join(" · ")), 1)], 2)
|
|
1783
|
-
], 10, Fn))), 128)), !h.value.length && !t.loading ? (g(), a(S(Dt), {
|
|
1784
|
-
key: 2,
|
|
1785
|
-
title: S(r)("ca.studentPicker.emptyTitle"),
|
|
1786
|
-
description: S(r)("ca.studentPicker.emptyDescription"),
|
|
1787
|
-
size: "small"
|
|
1788
|
-
}, null, 8, ["title", "description"])) : o("", !0)], 10, Pn)], 2));
|
|
1789
|
-
}
|
|
1790
|
-
}), Ln = [
|
|
1791
|
-
"blue",
|
|
1792
|
-
"green",
|
|
1793
|
-
"orange"
|
|
1794
|
-
], Rn = [
|
|
1795
|
-
"高一(1)班",
|
|
1796
|
-
"高一(2)班",
|
|
1797
|
-
"高一(3)班"
|
|
1798
|
-
];
|
|
1799
|
-
function zn(e, t, n = new Date(2026, 8, 11)) {
|
|
1800
|
-
let r = ne(t, "short");
|
|
1801
|
-
return Array.from({ length: 7 }, (t, i) => {
|
|
1802
|
-
let a = new Date(2026, 8, 7 + e * 7 + i);
|
|
1803
|
-
return {
|
|
1804
|
-
label: r[i],
|
|
1805
|
-
date: a,
|
|
1806
|
-
today: a.getTime() === n.getTime()
|
|
1807
|
-
};
|
|
1808
|
-
});
|
|
1809
|
-
}
|
|
1810
|
-
function Bn(e) {
|
|
1811
|
-
let t = e[0]?.date, n = e[6]?.date;
|
|
1812
|
-
return !t || !n ? "" : `${t.getMonth() + 1}.${t.getDate()} — ${n.getMonth() + 1}.${n.getDate()}`;
|
|
1813
|
-
}
|
|
1814
|
-
function Vn(e, t, n) {
|
|
1815
|
-
let r = [
|
|
1816
|
-
"语文",
|
|
1817
|
-
"数学",
|
|
1818
|
-
"英语",
|
|
1819
|
-
"物理",
|
|
1820
|
-
"化学",
|
|
1821
|
-
"历史",
|
|
1822
|
-
"体育",
|
|
1823
|
-
"班会"
|
|
1824
|
-
];
|
|
1825
|
-
return {
|
|
1826
|
-
day: t,
|
|
1827
|
-
row: e,
|
|
1828
|
-
subject: r[(e + t) % r.length],
|
|
1829
|
-
className: n,
|
|
1830
|
-
tone: Ln[(e + t) % 3]
|
|
1831
|
-
};
|
|
1832
|
-
}
|
|
1833
|
-
function Hn(e, t, n) {
|
|
1834
|
-
return e.find((e) => e.row === t && e.day === n);
|
|
1835
|
-
}
|
|
1836
|
-
function Un(e, t, n, r, i) {
|
|
1837
|
-
return i("ca.timetable.detail", {
|
|
1838
|
-
date: M(t, r),
|
|
1839
|
-
time: n.time
|
|
1840
|
-
});
|
|
1841
|
-
}
|
|
1842
|
-
var Wn = [
|
|
1843
|
-
{
|
|
1844
|
-
group: "早自习",
|
|
1845
|
-
label: "早读",
|
|
1846
|
-
time: "07:30–08:00"
|
|
1847
|
-
},
|
|
1848
|
-
{
|
|
1849
|
-
group: "上午",
|
|
1850
|
-
label: "第 1 节",
|
|
1851
|
-
time: "08:10–08:55"
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
group: "",
|
|
1855
|
-
label: "第 2 节",
|
|
1856
|
-
time: "09:05–09:50"
|
|
1857
|
-
},
|
|
1858
|
-
{
|
|
1859
|
-
group: "",
|
|
1860
|
-
label: "第 3 节",
|
|
1861
|
-
time: "10:10–10:55"
|
|
1862
|
-
},
|
|
1863
|
-
{
|
|
1864
|
-
group: "",
|
|
1865
|
-
label: "第 4 节",
|
|
1866
|
-
time: "11:05–11:50"
|
|
1867
|
-
},
|
|
1868
|
-
{
|
|
1869
|
-
group: "下午",
|
|
1870
|
-
label: "第 5 节",
|
|
1871
|
-
time: "14:00–14:45"
|
|
1872
|
-
},
|
|
1873
|
-
{
|
|
1874
|
-
group: "",
|
|
1875
|
-
label: "第 6 节",
|
|
1876
|
-
time: "14:55–15:40"
|
|
1877
|
-
},
|
|
1878
|
-
{
|
|
1879
|
-
group: "",
|
|
1880
|
-
label: "第 7 节",
|
|
1881
|
-
time: "15:50–16:35"
|
|
1882
|
-
}
|
|
1883
|
-
], Gn = [
|
|
1884
|
-
{
|
|
1885
|
-
day: 0,
|
|
1886
|
-
row: 0,
|
|
1887
|
-
subject: "语文",
|
|
1888
|
-
className: "高一(1)班",
|
|
1889
|
-
tone: "blue"
|
|
1890
|
-
},
|
|
1891
|
-
{
|
|
1892
|
-
day: 2,
|
|
1893
|
-
row: 0,
|
|
1894
|
-
subject: "语文",
|
|
1895
|
-
className: "高一(3)班",
|
|
1896
|
-
tone: "orange"
|
|
1897
|
-
},
|
|
1898
|
-
{
|
|
1899
|
-
day: 1,
|
|
1900
|
-
row: 1,
|
|
1901
|
-
subject: "语文",
|
|
1902
|
-
className: "高一(2)班",
|
|
1903
|
-
tone: "blue"
|
|
1904
|
-
},
|
|
1905
|
-
{
|
|
1906
|
-
day: 3,
|
|
1907
|
-
row: 1,
|
|
1908
|
-
subject: "语文",
|
|
1909
|
-
className: "高一(1)班",
|
|
1910
|
-
tone: "green"
|
|
1911
|
-
},
|
|
1912
|
-
{
|
|
1913
|
-
day: 4,
|
|
1914
|
-
row: 2,
|
|
1915
|
-
subject: "语文",
|
|
1916
|
-
className: "高一(3)班",
|
|
1917
|
-
tone: "orange"
|
|
1918
|
-
},
|
|
1919
|
-
{
|
|
1920
|
-
day: 0,
|
|
1921
|
-
row: 3,
|
|
1922
|
-
subject: "语文",
|
|
1923
|
-
className: "高一(3)班",
|
|
1924
|
-
tone: "orange"
|
|
1925
|
-
},
|
|
1926
|
-
{
|
|
1927
|
-
day: 2,
|
|
1928
|
-
row: 3,
|
|
1929
|
-
subject: "语文",
|
|
1930
|
-
className: "高一(2)班",
|
|
1931
|
-
tone: "blue"
|
|
1932
|
-
},
|
|
1933
|
-
{
|
|
1934
|
-
day: 4,
|
|
1935
|
-
row: 4,
|
|
1936
|
-
subject: "语文",
|
|
1937
|
-
className: "高一(1)班",
|
|
1938
|
-
tone: "green"
|
|
1939
|
-
},
|
|
1940
|
-
{
|
|
1941
|
-
day: 1,
|
|
1942
|
-
row: 5,
|
|
1943
|
-
subject: "语文",
|
|
1944
|
-
className: "高一(1)班",
|
|
1945
|
-
tone: "green"
|
|
1946
|
-
},
|
|
1947
|
-
{
|
|
1948
|
-
day: 3,
|
|
1949
|
-
row: 6,
|
|
1950
|
-
subject: "语文",
|
|
1951
|
-
className: "高一(2)班",
|
|
1952
|
-
tone: "blue"
|
|
1953
|
-
},
|
|
1954
|
-
{
|
|
1955
|
-
day: 0,
|
|
1956
|
-
row: 7,
|
|
1957
|
-
subject: "教研",
|
|
1958
|
-
className: "语文教研组",
|
|
1959
|
-
tone: "blue"
|
|
1960
|
-
}
|
|
1961
|
-
], Kn = ["aria-label"], qn = ["aria-selected"], Jn = ["aria-selected"], Yn = ["aria-label"], Xn = ["aria-label"], Zn = ["aria-label"], Qn = { class: "ca-sr-only" }, $n = ["rowspan"], er = ["onClick"], tr = /* @__PURE__ */ d({
|
|
1962
|
-
name: "CaWeeklyTimetable",
|
|
1963
|
-
__name: "weekly-timetable",
|
|
1964
|
-
emits: ["detail"],
|
|
1965
|
-
setup(t, { emit: n }) {
|
|
1966
|
-
let { locale: r, t: a } = P(), d = n, f = _("personal"), m = _(Rn[0]), h = _(0), y = i(() => zn(h.value, r.value)), b = i(() => Bn(y.value));
|
|
1967
|
-
function w(e, t) {
|
|
1968
|
-
if (!(h.value !== 0 || t > 4)) return f.value === "personal" ? Hn(Gn, e, t) : Vn(e, t, m.value);
|
|
1969
|
-
}
|
|
1970
|
-
function T(e, t) {
|
|
1971
|
-
let n = w(e, t), i = Wn[e], o = y.value[t];
|
|
1972
|
-
n && i && o && d("detail", `${n.className} · ${n.subject}`, Un(n, o.date, i, r.value, a));
|
|
1973
|
-
}
|
|
1974
|
-
return (t, n) => (g(), s("section", { class: p(S(L)("timetable")) }, [
|
|
1975
|
-
c("div", { class: p(S(L)("timetable", "toolbar")) }, [c("div", {
|
|
1976
|
-
class: p(S(L)("timetable", "tabs")),
|
|
1977
|
-
role: "tablist",
|
|
1978
|
-
"aria-label": S(a)("ca.timetable.tabsLabel")
|
|
1979
|
-
}, [c("button", {
|
|
1980
|
-
type: "button",
|
|
1981
|
-
role: "tab",
|
|
1982
|
-
"aria-selected": f.value === "personal",
|
|
1983
|
-
class: p(S(R)(S(L)("timetable", "tab"), f.value === "personal" ? S(L)("timetable", "tab", "active") : "")),
|
|
1984
|
-
onClick: n[0] ||= (e) => f.value = "personal"
|
|
1985
|
-
}, x(S(a)("ca.timetable.personal")), 11, qn), c("button", {
|
|
1986
|
-
type: "button",
|
|
1987
|
-
role: "tab",
|
|
1988
|
-
"aria-selected": f.value === "class",
|
|
1989
|
-
class: p(S(R)(S(L)("timetable", "tab"), f.value === "class" ? S(L)("timetable", "tab", "active") : "")),
|
|
1990
|
-
onClick: n[1] ||= (e) => f.value = "class"
|
|
1991
|
-
}, x(S(a)("ca.timetable.class")), 11, Jn)], 10, Kn), c("div", { class: p(S(L)("timetable", "week")) }, [
|
|
1992
|
-
c("button", {
|
|
1993
|
-
class: p(S(L)("timetable", "nav")),
|
|
1994
|
-
type: "button",
|
|
1995
|
-
"aria-label": S(a)("ca.timetable.prevWeek"),
|
|
1996
|
-
onClick: n[2] ||= (e) => h.value--
|
|
1997
|
-
}, [u(S(de), { size: 15 })], 10, Yn),
|
|
1998
|
-
c("span", null, [l(x(S(a)("ca.timetable.week", { week: 2 + h.value })) + " ", 1), c("b", null, x(b.value), 1)]),
|
|
1999
|
-
c("button", {
|
|
2000
|
-
class: p(S(L)("timetable", "nav")),
|
|
2001
|
-
type: "button",
|
|
2002
|
-
"aria-label": S(a)("ca.timetable.nextWeek"),
|
|
2003
|
-
onClick: n[3] ||= (e) => h.value++
|
|
2004
|
-
}, [u(S(F), { size: 15 })], 10, Xn),
|
|
2005
|
-
c("button", {
|
|
2006
|
-
class: p(S(L)("timetable", "today")),
|
|
2007
|
-
type: "button",
|
|
2008
|
-
onClick: n[4] ||= (e) => h.value = 0
|
|
2009
|
-
}, x(S(a)("ca.timetable.thisWeek")), 3)
|
|
2010
|
-
], 2)], 2),
|
|
2011
|
-
c("div", { class: p(S(L)("timetable", "meta")) }, [c("span", null, [
|
|
2012
|
-
l(x(f.value === "personal" ? S(a)("ca.timetable.personalSubtitle") : S(a)("ca.timetable.classSubtitle")) + " ", 1),
|
|
2013
|
-
c("i", { class: p(S(L)("timetable", "divider")) }, null, 2),
|
|
2014
|
-
l(" " + x(S(a)("ca.timetable.term")), 1)
|
|
2015
|
-
]), f.value === "class" ? D((g(), s("select", {
|
|
2016
|
-
key: 0,
|
|
2017
|
-
"onUpdate:modelValue": n[5] ||= (e) => m.value = e,
|
|
2018
|
-
class: p(S(L)("timetable", "select")),
|
|
2019
|
-
"aria-label": S(a)("ca.timetable.classLabel")
|
|
2020
|
-
}, [(g(!0), s(e, null, v(S(Rn), (e) => (g(), s("option", { key: e }, x(e), 1))), 128))], 10, Zn)), [[C, m.value]]) : (g(), s("span", {
|
|
2021
|
-
key: 1,
|
|
2022
|
-
class: p(S(L)("timetable", "count"))
|
|
2023
|
-
}, x(S(a)("ca.timetable.weekCount", { count: 11 })), 3))], 2),
|
|
2024
|
-
c("div", { class: p(S(L)("timetable", "scroll")) }, [c("table", { class: p(S(L)("timetable", "table")) }, [
|
|
2025
|
-
c("caption", Qn, x(S(a)("ca.timetable.caption", { range: b.value })), 1),
|
|
2026
|
-
c("colgroup", null, [
|
|
2027
|
-
c("col", { class: p(S(L)("timetable", "col", "group")) }, null, 2),
|
|
2028
|
-
c("col", { class: p(S(L)("timetable", "col", "period")) }, null, 2),
|
|
2029
|
-
(g(!0), s(e, null, v(y.value, (e) => (g(), s("col", {
|
|
2030
|
-
key: e.date.toISOString(),
|
|
2031
|
-
class: p(S(L)("timetable", "col", "day"))
|
|
2032
|
-
}, null, 2))), 128))
|
|
2033
|
-
]),
|
|
2034
|
-
c("thead", null, [c("tr", null, [c("th", {
|
|
2035
|
-
colspan: "2",
|
|
2036
|
-
class: p(S(L)("timetable", "period-head"))
|
|
2037
|
-
}, x(S(a)("ca.timetable.periodHeader")), 3), (g(!0), s(e, null, v(y.value, (e) => (g(), s("th", {
|
|
2038
|
-
key: e.date.toISOString(),
|
|
2039
|
-
class: p(S(R)(S(L)("timetable", "day"), e.today ? S(L)("timetable", "day", "today") : ""))
|
|
2040
|
-
}, [c("span", null, x(e.label), 1), c("b", null, x(e.date.getDate().toString().padStart(2, "0")), 1)], 2))), 128))])]),
|
|
2041
|
-
c("tbody", null, [(g(!0), s(e, null, v(S(Wn), (t, n) => (g(), s("tr", {
|
|
2042
|
-
key: t.time,
|
|
2043
|
-
class: p(n === 5 ? S(L)("timetable", "row", "afternoon") : "")
|
|
2044
|
-
}, [
|
|
2045
|
-
t.group ? (g(), s("th", {
|
|
2046
|
-
key: 0,
|
|
2047
|
-
rowspan: n === 0 ? 1 : n === 1 ? 4 : 3,
|
|
2048
|
-
class: p(S(L)("timetable", "group"))
|
|
2049
|
-
}, x(t.group), 11, $n)) : o("", !0),
|
|
2050
|
-
c("th", { class: p(S(L)("timetable", "period")) }, [c("span", null, x(t.label), 1), c("small", null, x(t.time), 1)], 2),
|
|
2051
|
-
(g(!0), s(e, null, v(y.value, (e, t) => (g(), s("td", {
|
|
2052
|
-
key: e.label,
|
|
2053
|
-
class: p(S(R)(S(L)("timetable", "cell"), t > 4 ? S(L)("timetable", "cell", "weekend") : "", e.today ? S(L)("timetable", "cell", "today") : ""))
|
|
2054
|
-
}, [w(n, t) ? (g(), s("button", {
|
|
2055
|
-
key: 0,
|
|
2056
|
-
type: "button",
|
|
2057
|
-
class: p(S(R)(S(L)("timetable", "lesson"), S(L)("timetable", "lesson", w(n, t)?.tone))),
|
|
2058
|
-
onClick: (e) => T(n, t)
|
|
2059
|
-
}, [c("b", null, x(w(n, t)?.className), 1), c("span", null, x(w(n, t)?.subject), 1)], 10, er)) : o("", !0)], 2))), 128))
|
|
2060
|
-
], 2))), 128))])
|
|
2061
|
-
], 2)], 2),
|
|
2062
|
-
c("div", { class: p(S(L)("timetable", "footer")) }, [c("span", null, [
|
|
2063
|
-
c("i", { class: p(S(R)(S(L)("timetable", "legend"), S(L)("timetable", "legend", "blue"))) }, null, 2),
|
|
2064
|
-
n[6] ||= l("高一(2)班 ", -1),
|
|
2065
|
-
c("i", { class: p(S(R)(S(L)("timetable", "legend"), S(L)("timetable", "legend", "green"))) }, null, 2),
|
|
2066
|
-
n[7] ||= l("高一(1)班 ", -1),
|
|
2067
|
-
c("i", { class: p(S(R)(S(L)("timetable", "legend"), S(L)("timetable", "legend", "orange"))) }, null, 2),
|
|
2068
|
-
n[8] ||= l("高一(3)班 ", -1)
|
|
2069
|
-
]), c("span", null, x(S(a)("ca.timetable.hint")), 1)], 2)
|
|
2070
|
-
], 2));
|
|
2071
|
-
}
|
|
2072
|
-
}), nr = {
|
|
2073
|
-
CaDailyAgenda: Dn,
|
|
2074
|
-
CaStudentPicker: In,
|
|
2075
|
-
CaWeeklyTimetable: tr
|
|
2076
|
-
}, rr = "data-ca-theme", ir = [
|
|
2077
|
-
"--ca-color-primary",
|
|
2078
|
-
"--ca-color-primary-hover",
|
|
2079
|
-
"--ca-color-primary-active",
|
|
2080
|
-
"--ca-color-primary-soft",
|
|
2081
|
-
"--ca-color-primary-text",
|
|
2082
|
-
"--ca-color-primary-contrast"
|
|
2083
|
-
], G = {
|
|
2084
|
-
r: 255,
|
|
2085
|
-
g: 255,
|
|
2086
|
-
b: 255
|
|
2087
|
-
}, K = {
|
|
2088
|
-
r: 0,
|
|
2089
|
-
g: 0,
|
|
2090
|
-
b: 0
|
|
2091
|
-
}, ar = {
|
|
2092
|
-
r: 22,
|
|
2093
|
-
g: 27,
|
|
2094
|
-
b: 34
|
|
2095
|
-
}, q = "light", J = "", Y = null;
|
|
2096
|
-
function or(e) {
|
|
2097
|
-
let t = e.trim(), n = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);
|
|
2098
|
-
if (n) {
|
|
2099
|
-
let e = n[1], t = e.length === 3 ? e.split("").map((e) => e + e).join("") : e;
|
|
2100
|
-
return {
|
|
2101
|
-
r: Number.parseInt(t.slice(0, 2), 16),
|
|
2102
|
-
g: Number.parseInt(t.slice(2, 4), 16),
|
|
2103
|
-
b: Number.parseInt(t.slice(4, 6), 16)
|
|
2104
|
-
};
|
|
2105
|
-
}
|
|
2106
|
-
let r = /^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})/i.exec(t);
|
|
2107
|
-
return r ? {
|
|
2108
|
-
r: Number(r[1]),
|
|
2109
|
-
g: Number(r[2]),
|
|
2110
|
-
b: Number(r[3])
|
|
2111
|
-
} : null;
|
|
2112
|
-
}
|
|
2113
|
-
function X({ r: e, g: t, b: n }) {
|
|
2114
|
-
let r = (e) => Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
|
|
2115
|
-
return `#${r(e)}${r(t)}${r(n)}`;
|
|
2116
|
-
}
|
|
2117
|
-
function Z(e, t, n) {
|
|
2118
|
-
let r = Math.max(0, Math.min(1, n));
|
|
2119
|
-
return {
|
|
2120
|
-
r: e.r + (t.r - e.r) * r,
|
|
2121
|
-
g: e.g + (t.g - e.g) * r,
|
|
2122
|
-
b: e.b + (t.b - e.b) * r
|
|
2123
|
-
};
|
|
2124
|
-
}
|
|
2125
|
-
function sr(e) {
|
|
2126
|
-
let t = e / 255;
|
|
2127
|
-
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
2128
|
-
}
|
|
2129
|
-
function Q({ r: e, g: t, b: n }) {
|
|
2130
|
-
return .2126 * sr(e) + .7152 * sr(t) + .0722 * sr(n);
|
|
2131
|
-
}
|
|
2132
|
-
function cr(e, t) {
|
|
2133
|
-
let n = Math.max(Q(e), Q(t)), r = Math.min(Q(e), Q(t));
|
|
2134
|
-
return (n + .05) / (r + .05);
|
|
2135
|
-
}
|
|
2136
|
-
function lr(e, t, n = 4.5) {
|
|
2137
|
-
let r = e;
|
|
2138
|
-
for (let e = 0; e < 10 && !(cr(r, t) >= n); e += 1) r = Z(r, K, .14);
|
|
2139
|
-
return r;
|
|
2140
|
-
}
|
|
2141
|
-
function ur(e, t, n = 4.5) {
|
|
2142
|
-
let r = e;
|
|
2143
|
-
for (let e = 0; e < 10 && !(cr(r, t) >= n); e += 1) r = Z(r, G, .16);
|
|
2144
|
-
return r;
|
|
2145
|
-
}
|
|
2146
|
-
function dr(e) {
|
|
2147
|
-
return cr(G, e) >= 3 ? "#ffffff" : X(Z(K, G, .24));
|
|
2148
|
-
}
|
|
2149
|
-
function fr(e, t) {
|
|
2150
|
-
if (t === "dark") {
|
|
2151
|
-
let t = Z(e, ar, .84);
|
|
2152
|
-
return {
|
|
2153
|
-
"--ca-color-primary": X(e),
|
|
2154
|
-
"--ca-color-primary-hover": X(Z(e, G, .18)),
|
|
2155
|
-
"--ca-color-primary-active": X(Z(e, G, .3)),
|
|
2156
|
-
"--ca-color-primary-soft": X(t),
|
|
2157
|
-
"--ca-color-primary-text": X(ur(e, t)),
|
|
2158
|
-
"--ca-color-primary-contrast": dr(e)
|
|
2159
|
-
};
|
|
2160
|
-
}
|
|
2161
|
-
let n = Z(e, G, .9);
|
|
2162
|
-
return {
|
|
2163
|
-
"--ca-color-primary": X(e),
|
|
2164
|
-
"--ca-color-primary-hover": X(Z(e, K, .14)),
|
|
2165
|
-
"--ca-color-primary-active": X(Z(e, K, .28)),
|
|
2166
|
-
"--ca-color-primary-soft": X(n),
|
|
2167
|
-
"--ca-color-primary-text": X(lr(e, n)),
|
|
2168
|
-
"--ca-color-primary-contrast": dr(e)
|
|
2169
|
-
};
|
|
2170
|
-
}
|
|
2171
|
-
function $() {
|
|
2172
|
-
return q === "auto" ? typeof window > "u" || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : q;
|
|
2173
|
-
}
|
|
2174
|
-
function pr() {
|
|
2175
|
-
if (typeof document > "u") return;
|
|
2176
|
-
let e = document.documentElement.style;
|
|
2177
|
-
if (!J) {
|
|
2178
|
-
ir.forEach((t) => e.removeProperty(t));
|
|
2179
|
-
return;
|
|
2180
|
-
}
|
|
2181
|
-
let t = or(J);
|
|
2182
|
-
if (!t) return;
|
|
2183
|
-
let n = fr(t, $());
|
|
2184
|
-
Object.entries(n).forEach(([t, n]) => e.setProperty(t, n));
|
|
2185
|
-
}
|
|
2186
|
-
function mr() {
|
|
2187
|
-
if (q !== "auto" || typeof window > "u" || typeof window.matchMedia != "function") {
|
|
2188
|
-
Y?.removeEventListener("change", hr), Y = null;
|
|
2189
|
-
return;
|
|
2190
|
-
}
|
|
2191
|
-
Y || (Y = window.matchMedia("(prefers-color-scheme: dark)"), Y.addEventListener("change", hr));
|
|
2192
|
-
}
|
|
2193
|
-
function hr() {
|
|
2194
|
-
typeof document > "u" || (document.documentElement.setAttribute(rr, $()), pr());
|
|
2195
|
-
}
|
|
2196
|
-
function gr(e) {
|
|
2197
|
-
q = e, typeof document < "u" && document.documentElement.setAttribute(rr, $()), mr(), pr();
|
|
2198
|
-
}
|
|
2199
|
-
function _r() {
|
|
2200
|
-
return q;
|
|
2201
|
-
}
|
|
2202
|
-
function vr() {
|
|
2203
|
-
return $() === "dark";
|
|
2204
|
-
}
|
|
2205
|
-
function yr(e) {
|
|
2206
|
-
or(e) && (J = e.trim(), pr());
|
|
2207
|
-
}
|
|
2208
|
-
function br() {
|
|
2209
|
-
return J;
|
|
2210
|
-
}
|
|
2211
|
-
function xr() {
|
|
2212
|
-
J = "", pr();
|
|
2213
|
-
}
|
|
2214
|
-
function Sr(e = {}) {
|
|
2215
|
-
gr(e.theme ?? "light"), e.primaryColor && yr(e.primaryColor);
|
|
2216
|
-
}
|
|
2217
|
-
//#endregion
|
|
2218
|
-
//#region src/index.ts
|
|
2219
|
-
var Cr = {
|
|
2220
|
-
...ct,
|
|
2221
|
-
...gn,
|
|
2222
|
-
...nr
|
|
2223
|
-
}, wr = { install(e) {
|
|
2224
|
-
Object.entries(Cr).forEach(([t, n]) => {
|
|
2225
|
-
e.component(t, n);
|
|
2226
|
-
}), te(e, A());
|
|
2227
|
-
} };
|
|
2228
|
-
//#endregion
|
|
2229
|
-
export { Te as COMPONENT_PREFIX, ke as CaAttendanceBadge, je as CaAvatar, dt as CaBreadcrumb, Pe as CaButton, Ie as CaCheckbox, vt as CaClassTree, yt as CaCopyright, Dn as CaDailyAgenda, Tt as CaDrawer, Et as CaEmpty, ze as CaIcon, He as CaInput, jt as CaModal, Nt as CaPageHeader, Bt as CaPagination, Je as CaProgress, Ut as CaSearchForm, et as CaSelect, Yt as CaSideMenu, Xt as CaSkeleton, tt as CaSlogan, Qt as CaStatistic, In as CaStudentPicker, rt as CaSwitch, ln as CaTable, at as CaTag, st as CaTextarea, hn as CaToastContainer, tr as CaWeeklyTimetable, wr as CampusUI, wr as default, rr as THEME_ATTRIBUTE, ct as atomComponents, gn as baseComponents, Cr as builtInComponents, dn as clearToasts, W as closeToast, R as cx, nr as featureComponents, br as getPrimaryColor, _r as getTheme, vr as isDarkTheme, L as ns, xr as resetPrimaryColor, yr as setPrimaryColor, gr as setTheme, un as setToasts, Sr as setupTheme, fn as toast, H as toasts };
|