nicklabs-ui 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +533 -546
- package/dist/nicklabs-ui.css +1 -1
- package/dist/src/components/NAlert.vue.d.ts +1 -1
- package/dist/src/components/NButton.vue.d.ts +1 -1
- package/dist/src/components/NCheckbox.vue.d.ts +3 -3
- package/dist/src/components/NCode.vue.d.ts +1 -1
- package/dist/src/components/NDatePicker.vue.d.ts +3 -3
- package/dist/src/components/NEmpty.vue.d.ts +1 -1
- package/dist/src/components/NFileSelect.vue.d.ts +3 -3
- package/dist/src/components/NForm.vue.d.ts +3 -3
- package/dist/src/components/NInput.vue.d.ts +3 -3
- package/dist/src/components/NLoading.vue.d.ts +1 -1
- package/dist/src/components/NModal.vue.d.ts +3 -3
- package/dist/src/components/NSelect.vue.d.ts +3 -3
- package/dist/src/components/NSwitch.vue.d.ts +3 -3
- package/dist/src/components/NTag.vue.d.ts +3 -3
- package/dist/src/components/NTextarea.vue.d.ts +3 -3
- package/dist/src/components/NToast.vue.d.ts +1 -1
- package/dist/src/components/NTooltip.vue.d.ts +1 -1
- package/dist/src/layouts/NBreadcrumb.vue.d.ts +1 -1
- package/dist/src/layouts/NCard.vue.d.ts +1 -1
- package/dist/src/layouts/NHeroSection.vue.d.ts +1 -1
- package/dist/src/layouts/NLayout.vue.d.ts +3 -3
- package/dist/src/layouts/NLoginLayout.vue.d.ts +1 -1
- package/dist/src/layouts/NNavigation.vue.d.ts +3 -3
- package/dist/src/layouts/NPaginate.vue.d.ts +3 -3
- package/dist/src/layouts/NSideFilter.vue.d.ts +3 -3
- package/dist/src/layouts/NSidebar.vue.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p,
|
|
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, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, onUnmounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, toDisplayString as T, unref as E, useCssVars as D, useSlots as ee, vModelText as te, watch as ne, withCtx as O, withDirectives as re, withModifiers as k } from "vue";
|
|
2
2
|
//#region src/components/NButton.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
3
|
+
var ie = ["type", "disabled"], ae = /* @__PURE__ */ p({
|
|
4
4
|
__name: "NButton",
|
|
5
5
|
props: {
|
|
6
6
|
variant: { default: "none" },
|
|
@@ -21,7 +21,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
setup(e) {
|
|
24
|
-
|
|
24
|
+
D((e) => ({
|
|
25
25
|
v7679b000: n.value,
|
|
26
26
|
aa741ce6: e.width,
|
|
27
27
|
d7ad7380: e.height
|
|
@@ -32,7 +32,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
32
32
|
lg: "8px 18px"
|
|
33
33
|
}, n = i(() => e.padding ?? t[e.size]);
|
|
34
34
|
return (t, n) => (b(), s("button", {
|
|
35
|
-
class:
|
|
35
|
+
class: h([
|
|
36
36
|
`variant-${e.variant}`,
|
|
37
37
|
`intent-${e.intent}`,
|
|
38
38
|
`radiusSize-${e.radiusSize}`,
|
|
@@ -41,16 +41,16 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
41
41
|
]),
|
|
42
42
|
type: e.type,
|
|
43
43
|
disabled: e.disabled
|
|
44
|
-
}, [w(t.$slots, "default", {}, void 0, !0)], 10,
|
|
44
|
+
}, [w(t.$slots, "default", {}, void 0, !0)], 10, ie));
|
|
45
45
|
}
|
|
46
46
|
}), A = (e, t) => {
|
|
47
47
|
let n = e.__vccOpts || e;
|
|
48
48
|
for (let [e, r] of t) n[e] = r;
|
|
49
49
|
return n;
|
|
50
|
-
}, j = /* @__PURE__ */ A(
|
|
50
|
+
}, j = /* @__PURE__ */ A(ae, [["__scopeId", "data-v-d06c4b84"]]), oe = { class: "input" }, se = {
|
|
51
51
|
key: 0,
|
|
52
52
|
class: "label"
|
|
53
|
-
},
|
|
53
|
+
}, ce = ["disabled"], M = [
|
|
54
54
|
"type",
|
|
55
55
|
"placeholder",
|
|
56
56
|
"disabled",
|
|
@@ -58,10 +58,10 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
58
58
|
"value",
|
|
59
59
|
"maxlength",
|
|
60
60
|
"autocomplete"
|
|
61
|
-
],
|
|
61
|
+
], N = ["disabled"], P = {
|
|
62
62
|
key: 2,
|
|
63
63
|
class: "actions"
|
|
64
|
-
},
|
|
64
|
+
}, F = {
|
|
65
65
|
key: 0,
|
|
66
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
67
67
|
width: "16",
|
|
@@ -72,7 +72,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
72
72
|
"stroke-width": "2",
|
|
73
73
|
"stroke-linecap": "round",
|
|
74
74
|
"stroke-linejoin": "round"
|
|
75
|
-
},
|
|
75
|
+
}, I = {
|
|
76
76
|
key: 1,
|
|
77
77
|
xmlns: "http://www.w3.org/2000/svg",
|
|
78
78
|
width: "16",
|
|
@@ -83,7 +83,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
83
83
|
"stroke-width": "2",
|
|
84
84
|
"stroke-linecap": "round",
|
|
85
85
|
"stroke-linejoin": "round"
|
|
86
|
-
},
|
|
86
|
+
}, L = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
87
87
|
__name: "NInput",
|
|
88
88
|
props: {
|
|
89
89
|
modelValue: { default: "" },
|
|
@@ -117,7 +117,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
117
117
|
"clear"
|
|
118
118
|
],
|
|
119
119
|
setup(e, { emit: t }) {
|
|
120
|
-
|
|
120
|
+
D((e) => ({ v70dd38b4: d.value }));
|
|
121
121
|
let n = t, r = i(() => e.type === "password"), a = i(() => e.type === "number"), l = S(!1), u = i(() => a.value ? "text" : r.value ? l.value ? "text" : "password" : e.type), d = i(() => {
|
|
122
122
|
let t = 12;
|
|
123
123
|
return r.value && (t += 24), e.clearable && (t += 24), `${t}px`;
|
|
@@ -137,11 +137,11 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
137
137
|
].includes(e.key) || e.ctrlKey || e.metaKey || /^[0-9]$/.test(e.key)), m = (e) => {
|
|
138
138
|
if (n("keydown", e), a.value) {
|
|
139
139
|
if (e.key === "ArrowUp") {
|
|
140
|
-
e.preventDefault(),
|
|
140
|
+
e.preventDefault(), C();
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
143
|
if (e.key === "ArrowDown") {
|
|
144
|
-
e.preventDefault(),
|
|
144
|
+
e.preventDefault(), x();
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
147
|
if (!p(e)) {
|
|
@@ -149,7 +149,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
},
|
|
152
|
+
}, g = (e) => {
|
|
153
153
|
if (a.value) {
|
|
154
154
|
let t = e.target, r = f(t.value);
|
|
155
155
|
t.value !== r && (t.value = r, n("update:modelValue", r));
|
|
@@ -165,11 +165,11 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
n("update:modelValue", t.value);
|
|
168
|
-
},
|
|
168
|
+
}, v = (t) => {
|
|
169
169
|
n("blur", t), a.value && e.modelValue === "" && n("update:modelValue", String(e.min === -Infinity ? 0 : e.min));
|
|
170
|
-
}, v = () => {
|
|
171
|
-
e.disabled || e.readonly || (n("update:modelValue", ""), n("clear"));
|
|
172
170
|
}, y = () => {
|
|
171
|
+
e.disabled || e.readonly || (n("update:modelValue", ""), n("clear"));
|
|
172
|
+
}, x = () => {
|
|
173
173
|
if (e.disabled) return;
|
|
174
174
|
let t = e.modelValue === "" ? e.min : Number(e.modelValue), r = Math.max(t - 1, e.min);
|
|
175
175
|
if (e.min <= r && r <= e.max) {
|
|
@@ -177,7 +177,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
n("update:modelValue", String(e.min));
|
|
180
|
-
},
|
|
180
|
+
}, C = () => {
|
|
181
181
|
if (e.disabled) return;
|
|
182
182
|
let t = e.modelValue === "" ? e.min : Number(e.modelValue), r = Math.min(t + 1, e.max);
|
|
183
183
|
if (e.min <= r && r <= e.max) {
|
|
@@ -185,8 +185,8 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
187
|
n("update:modelValue", String(e.min));
|
|
188
|
-
},
|
|
189
|
-
return (t, i) => (b(), s("div",
|
|
188
|
+
}, w = () => l.value = !l.value;
|
|
189
|
+
return (t, i) => (b(), s("div", oe, [e.title ? (b(), s("label", se, T(e.title), 1)) : o("", !0), c("div", { class: h({
|
|
190
190
|
common: !a.value,
|
|
191
191
|
number: a.value,
|
|
192
192
|
disabled: e.disabled
|
|
@@ -196,7 +196,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
196
196
|
class: "tool-button",
|
|
197
197
|
type: "button",
|
|
198
198
|
disabled: e.disabled || Number(e.modelValue) <= e.min,
|
|
199
|
-
onClick:
|
|
199
|
+
onClick: x
|
|
200
200
|
}, [...i[2] ||= [c("svg", {
|
|
201
201
|
xmlns: "http://www.w3.org/2000/svg",
|
|
202
202
|
width: "16",
|
|
@@ -207,7 +207,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
207
207
|
"stroke-width": "2",
|
|
208
208
|
"stroke-linecap": "round",
|
|
209
209
|
"stroke-linejoin": "round"
|
|
210
|
-
}, [c("path", { d: "M5 12h14" })], -1)]], 8,
|
|
210
|
+
}, [c("path", { d: "M5 12h14" })], -1)]], 8, ce)) : o("", !0),
|
|
211
211
|
c("input", {
|
|
212
212
|
type: u.value,
|
|
213
213
|
placeholder: e.placeholder,
|
|
@@ -217,18 +217,18 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
217
217
|
maxlength: e.maxlength,
|
|
218
218
|
autocomplete: e.autocomplete,
|
|
219
219
|
onFocus: i[0] ||= (e) => n("focus", e),
|
|
220
|
-
onBlur:
|
|
220
|
+
onBlur: v,
|
|
221
221
|
onInput: _,
|
|
222
222
|
onChange: i[1] ||= (e) => n("change", e),
|
|
223
223
|
onKeydown: m,
|
|
224
|
-
onCompositionend:
|
|
225
|
-
}, null, 40,
|
|
224
|
+
onCompositionend: g
|
|
225
|
+
}, null, 40, M),
|
|
226
226
|
a.value ? (b(), s("button", {
|
|
227
227
|
key: 1,
|
|
228
228
|
class: "tool-button",
|
|
229
229
|
type: "button",
|
|
230
230
|
disabled: e.disabled || Number(e.modelValue) >= e.max,
|
|
231
|
-
onClick:
|
|
231
|
+
onClick: C
|
|
232
232
|
}, [...i[3] ||= [c("svg", {
|
|
233
233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
234
234
|
width: "16",
|
|
@@ -239,18 +239,18 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
239
239
|
"stroke-width": "2",
|
|
240
240
|
"stroke-linecap": "round",
|
|
241
241
|
"stroke-linejoin": "round"
|
|
242
|
-
}, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8,
|
|
243
|
-
a.value ? o("", !0) : (b(), s("div",
|
|
242
|
+
}, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8, N)) : o("", !0),
|
|
243
|
+
a.value ? o("", !0) : (b(), s("div", P, [r.value && !e.disabled ? (b(), s("button", {
|
|
244
244
|
key: 0,
|
|
245
245
|
type: "button",
|
|
246
|
-
onClick:
|
|
246
|
+
onClick: w,
|
|
247
247
|
"aria-label": "Toggle password visibility"
|
|
248
|
-
}, [l.value ? (b(), s("svg",
|
|
248
|
+
}, [l.value ? (b(), s("svg", I, [...i[5] ||= [
|
|
249
249
|
c("path", { d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, null, -1),
|
|
250
250
|
c("path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, null, -1),
|
|
251
251
|
c("path", { d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, null, -1),
|
|
252
252
|
c("path", { d: "m2 2 20 20" }, null, -1)
|
|
253
|
-
]])) : (b(), s("svg",
|
|
253
|
+
]])) : (b(), s("svg", F, [...i[4] ||= [c("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }, null, -1), c("circle", {
|
|
254
254
|
cx: "12",
|
|
255
255
|
cy: "12",
|
|
256
256
|
r: "3"
|
|
@@ -258,7 +258,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
258
258
|
key: 1,
|
|
259
259
|
type: "button",
|
|
260
260
|
"aria-label": "Clear input",
|
|
261
|
-
onClick:
|
|
261
|
+
onClick: y
|
|
262
262
|
}, [...i[6] ||= [c("svg", {
|
|
263
263
|
xmlns: "http://www.w3.org/2000/svg",
|
|
264
264
|
width: "16",
|
|
@@ -272,7 +272,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
272
272
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]])) : o("", !0)]))
|
|
273
273
|
], 2)]));
|
|
274
274
|
}
|
|
275
|
-
}), [["__scopeId", "data-v-d5f9697c"]]),
|
|
275
|
+
}), [["__scopeId", "data-v-d5f9697c"]]), le = { class: "textarea" }, ue = ["textContent"], R = [
|
|
276
276
|
"rows",
|
|
277
277
|
"placeholder",
|
|
278
278
|
"disabled",
|
|
@@ -281,10 +281,10 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
281
281
|
"maxlength",
|
|
282
282
|
"autocomplete",
|
|
283
283
|
"wrap"
|
|
284
|
-
],
|
|
284
|
+
], z = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "char-count"
|
|
287
|
-
},
|
|
287
|
+
}, de = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
288
288
|
__name: "NTextarea",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -334,12 +334,12 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
334
334
|
};
|
|
335
335
|
return v(() => {
|
|
336
336
|
e.autofocus && r.value?.focus();
|
|
337
|
-
}), (t, i) => (b(), s("div",
|
|
337
|
+
}), (t, i) => (b(), s("div", le, [
|
|
338
338
|
e.title ? (b(), s("label", {
|
|
339
339
|
key: 0,
|
|
340
340
|
class: "label",
|
|
341
341
|
textContent: T(e.title)
|
|
342
|
-
}, null, 8,
|
|
342
|
+
}, null, 8, ue)) : o("", !0),
|
|
343
343
|
c("textarea", {
|
|
344
344
|
ref_key: "textareaRef",
|
|
345
345
|
ref: r,
|
|
@@ -358,14 +358,14 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
358
358
|
onChange: i[2] ||= (e) => n("change", e),
|
|
359
359
|
onKeydown: i[3] ||= (e) => n("keydown", e),
|
|
360
360
|
onPaste: i[4] ||= (e) => n("paste", e)
|
|
361
|
-
}, null, 40,
|
|
362
|
-
e.showCount ? (b(), s("div",
|
|
361
|
+
}, null, 40, R),
|
|
362
|
+
e.showCount ? (b(), s("div", z, T(u.value), 1)) : o("", !0)
|
|
363
363
|
]));
|
|
364
364
|
}
|
|
365
|
-
}), [["__scopeId", "data-v-3356cfbd"]]),
|
|
365
|
+
}), [["__scopeId", "data-v-3356cfbd"]]), B = { class: "checkbox" }, fe = {
|
|
366
366
|
key: 0,
|
|
367
367
|
class: "label"
|
|
368
|
-
},
|
|
368
|
+
}, pe = ["onClick"], me = ["checked", "disabled"], he = ["checked", "disabled"], ge = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
369
369
|
__name: "NCheckbox",
|
|
370
370
|
props: {
|
|
371
371
|
modelValue: { default: !1 },
|
|
@@ -394,7 +394,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
394
394
|
"change:values"
|
|
395
395
|
],
|
|
396
396
|
setup(t, { emit: n }) {
|
|
397
|
-
let r = n, a = S(null), l = i(() => !t.options || t.options.length === 0), u = i(() => !!t.multiple), f = i(() => Array.isArray(t.options) && t.options.length > 0), p = i(() => f.value ? Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue] : []), m = (e) => p.value.some((t) => t === e),
|
|
397
|
+
let r = n, a = S(null), l = i(() => !t.options || t.options.length === 0), u = i(() => !!t.multiple), f = i(() => Array.isArray(t.options) && t.options.length > 0), p = i(() => f.value ? Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue] : []), m = (e) => p.value.some((t) => t === e), g = (e) => {
|
|
398
398
|
if (t.disabled) return;
|
|
399
399
|
if (l.value) {
|
|
400
400
|
let e = !t.modelValue;
|
|
@@ -407,16 +407,16 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
407
407
|
};
|
|
408
408
|
return v(() => {
|
|
409
409
|
t.autofocus || a.value?.focus();
|
|
410
|
-
}), (n, r) => (b(), s("div",
|
|
410
|
+
}), (n, r) => (b(), s("div", B, [t.title ? (b(), s("h3", fe, T(t.title), 1)) : o("", !0), c("div", { class: h(["group", [t.direction]]) }, [l.value ? (b(), s("label", {
|
|
411
411
|
key: 1,
|
|
412
412
|
class: "item",
|
|
413
|
-
onClick: r[0] ||= k((e) =>
|
|
413
|
+
onClick: r[0] ||= k((e) => g(), ["prevent"])
|
|
414
414
|
}, [
|
|
415
415
|
c("input", {
|
|
416
416
|
type: "checkbox",
|
|
417
417
|
checked: !!t.modelValue,
|
|
418
418
|
disabled: t.disabled
|
|
419
|
-
}, null, 8,
|
|
419
|
+
}, null, 8, he),
|
|
420
420
|
r[2] ||= c("span", { class: "icon" }, [c("svg", {
|
|
421
421
|
xmlns: "http://www.w3.org/2000/svg",
|
|
422
422
|
width: "24",
|
|
@@ -432,13 +432,13 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
432
432
|
])) : (b(!0), s(e, { key: 0 }, C(t.options, (e, n) => (b(), s("label", {
|
|
433
433
|
key: `${e.label}${n}`,
|
|
434
434
|
class: "item",
|
|
435
|
-
onClick: k((t) =>
|
|
435
|
+
onClick: k((t) => g(e), ["prevent"])
|
|
436
436
|
}, [
|
|
437
437
|
c("input", {
|
|
438
438
|
type: "checkbox",
|
|
439
439
|
checked: m(e.value),
|
|
440
440
|
disabled: t.disabled
|
|
441
|
-
}, null, 8,
|
|
441
|
+
}, null, 8, me),
|
|
442
442
|
r[1] ||= c("span", { class: "icon" }, [c("svg", {
|
|
443
443
|
xmlns: "http://www.w3.org/2000/svg",
|
|
444
444
|
width: "24",
|
|
@@ -451,7 +451,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
451
451
|
"stroke-linejoin": "round"
|
|
452
452
|
}, [c("path", { d: "M20 6 9 17l-5-5" })])], -1),
|
|
453
453
|
d(" " + T(e.label), 1)
|
|
454
|
-
], 8,
|
|
454
|
+
], 8, pe))), 128))], 2)]));
|
|
455
455
|
}
|
|
456
456
|
}), [["__scopeId", "data-v-55b1d909"]]), _e = { class: "select" }, ve = {
|
|
457
457
|
key: 0,
|
|
@@ -459,7 +459,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
459
459
|
}, ye = { class: "select-chips-container" }, be = ["textContent"], xe = ["onClick"], Se = {
|
|
460
460
|
key: 0,
|
|
461
461
|
class: "search-box"
|
|
462
|
-
}, Ce = { class: "options" },
|
|
462
|
+
}, Ce = { class: "options" }, we = ["onClick"], V = {
|
|
463
463
|
key: 0,
|
|
464
464
|
xmlns: "http://www.w3.org/2000/svg",
|
|
465
465
|
width: "14",
|
|
@@ -470,10 +470,10 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
470
470
|
"stroke-width": "2.5",
|
|
471
471
|
"stroke-linecap": "round",
|
|
472
472
|
"stroke-linejoin": "round"
|
|
473
|
-
},
|
|
473
|
+
}, H = {
|
|
474
474
|
key: 0,
|
|
475
475
|
class: "empty"
|
|
476
|
-
},
|
|
476
|
+
}, Te = 240, U = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
477
477
|
__name: "NSelect",
|
|
478
478
|
props: {
|
|
479
479
|
modelValue: { default: () => void 0 },
|
|
@@ -511,62 +511,62 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
511
511
|
return t.multiple ? Array.isArray(t.modelValue) && t.modelValue.forEach((n) => {
|
|
512
512
|
e[n] = t.options.find((e) => e.value === n);
|
|
513
513
|
}) : t.modelValue !== void 0 && t.modelValue !== null && (e[t.modelValue] = t.options.find((e) => e.value === t.modelValue)), e;
|
|
514
|
-
}),
|
|
514
|
+
}), g = i(() => Object.keys(p.value).length > 0), y = async () => {
|
|
515
515
|
if (!t.disabled && (a.value = !a.value, a.value)) {
|
|
516
|
-
if (await
|
|
516
|
+
if (await m(), d.value) {
|
|
517
517
|
let e = d.value.getBoundingClientRect();
|
|
518
|
-
u.value = window.innerHeight - e.bottom <
|
|
518
|
+
u.value = window.innerHeight - e.bottom < Te;
|
|
519
519
|
}
|
|
520
520
|
t.searchable && f.value?.focus();
|
|
521
521
|
}
|
|
522
|
-
},
|
|
522
|
+
}, x = () => {
|
|
523
523
|
a.value = !1, l.value = "";
|
|
524
|
-
},
|
|
524
|
+
}, w = (e) => {
|
|
525
525
|
if (!a.value) return;
|
|
526
526
|
let t = e.target;
|
|
527
|
-
d.value && !d.value.contains(t) &&
|
|
528
|
-
},
|
|
527
|
+
d.value && !d.value.contains(t) && x();
|
|
528
|
+
}, E = (e) => p.value.hasOwnProperty(e), D = (e) => {
|
|
529
529
|
if (t.disabled) return;
|
|
530
530
|
let n;
|
|
531
|
-
t.multiple ? (
|
|
532
|
-
},
|
|
531
|
+
t.multiple ? (E(e.value) ? delete p.value[e.value] : p.value[e.value] = e, n = Object.keys(p.value), r("update:modelValue", n), r("change", n), r("change:item", e), r("change:value", n), r("change:values", n)) : (n = e.value, r("update:modelValue", n), r("change", n), r("change:item", e), r("change:value", n), x());
|
|
532
|
+
}, ee = () => {
|
|
533
533
|
if (t.disabled) return;
|
|
534
534
|
let e = t.multiple ? [] : void 0;
|
|
535
535
|
r("update:modelValue", e), r("change", e), r("change:value", e), r("change:values", []);
|
|
536
|
-
},
|
|
536
|
+
}, ne = i(() => {
|
|
537
537
|
let e = l.value.trim().toLowerCase();
|
|
538
538
|
return e ? t.options.filter((t) => t.label.toLowerCase().includes(e)) : t.options;
|
|
539
539
|
});
|
|
540
540
|
v(() => {
|
|
541
|
-
document.addEventListener("pointerdown",
|
|
542
|
-
}),
|
|
543
|
-
document.removeEventListener("pointerdown",
|
|
541
|
+
document.addEventListener("pointerdown", w);
|
|
542
|
+
}), _(() => {
|
|
543
|
+
document.removeEventListener("pointerdown", w);
|
|
544
544
|
});
|
|
545
|
-
let
|
|
545
|
+
let O = i(() => {
|
|
546
546
|
let e = Object.keys(p.value), n = e.length;
|
|
547
547
|
return n === 0 ? "" : t.multiple ? `已選 ${n} 項` : p.value[e[0]]?.label ?? "";
|
|
548
548
|
});
|
|
549
549
|
return (n, r) => (b(), s("div", _e, [t.title ? (b(), s("label", ve, T(t.title), 1)) : o("", !0), c("div", {
|
|
550
550
|
ref_key: "selectGroupRef",
|
|
551
551
|
ref: d,
|
|
552
|
-
class:
|
|
552
|
+
class: h(["group", {
|
|
553
553
|
open: a.value,
|
|
554
554
|
multiple: t.multiple
|
|
555
555
|
}])
|
|
556
556
|
}, [c("div", {
|
|
557
|
-
class:
|
|
558
|
-
onClick:
|
|
557
|
+
class: h(["trigger", { disabled: t.disabled }]),
|
|
558
|
+
onClick: y
|
|
559
559
|
}, [
|
|
560
|
-
c("div", ye, [!
|
|
560
|
+
c("div", ye, [!g.value || !t.multiple || t.multiple && t.multipleDisplay === "count" ? (b(), s("span", {
|
|
561
561
|
key: 0,
|
|
562
|
-
class:
|
|
563
|
-
textContent: T(
|
|
562
|
+
class: h(["trigger-text", { placeholder: !g.value }]),
|
|
563
|
+
textContent: T(g.value ? O.value : t.placeholder)
|
|
564
564
|
}, null, 10, be)) : o("", !0), t.multiple && t.multipleDisplay === "tags" ? (b(!0), s(e, { key: 1 }, C(p.value, (e, t) => (b(), s("div", {
|
|
565
565
|
key: `${e.label}${t}`,
|
|
566
566
|
class: "select-chip"
|
|
567
567
|
}, [c("span", null, T(e.label), 1), c("span", {
|
|
568
568
|
class: "remove-chip",
|
|
569
|
-
onClick: k((t) =>
|
|
569
|
+
onClick: k((t) => D(e), ["stop"])
|
|
570
570
|
}, [...r[1] ||= [c("svg", {
|
|
571
571
|
xmlns: "http://www.w3.org/2000/svg",
|
|
572
572
|
width: "14",
|
|
@@ -578,11 +578,11 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
578
578
|
"stroke-linecap": "round",
|
|
579
579
|
"stroke-linejoin": "round"
|
|
580
580
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]], 8, xe)]))), 128)) : o("", !0)]),
|
|
581
|
-
t.clearable &&
|
|
581
|
+
t.clearable && g.value && !t.disabled ? (b(), s("button", {
|
|
582
582
|
key: 0,
|
|
583
583
|
class: "clear-btn",
|
|
584
584
|
type: "button",
|
|
585
|
-
onClick: k(
|
|
585
|
+
onClick: k(ee, ["stop"])
|
|
586
586
|
}, [...r[2] ||= [c("svg", {
|
|
587
587
|
xmlns: "http://www.w3.org/2000/svg",
|
|
588
588
|
width: "14",
|
|
@@ -606,7 +606,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
606
606
|
"stroke-linejoin": "round",
|
|
607
607
|
class: "arrow-icon"
|
|
608
608
|
}, [c("path", { d: "m6 10 6 6 6-6" })], -1)
|
|
609
|
-
], 2), c("div", { class:
|
|
609
|
+
], 2), c("div", { class: h(["dropdown", { upward: u.value }]) }, [t.searchable ? (b(), s("div", Se, [r[4] ||= c("svg", {
|
|
610
610
|
xmlns: "http://www.w3.org/2000/svg",
|
|
611
611
|
width: "14",
|
|
612
612
|
height: "14",
|
|
@@ -621,102 +621,102 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
621
621
|
cx: "11",
|
|
622
622
|
cy: "11",
|
|
623
623
|
r: "8"
|
|
624
|
-
})], -1),
|
|
624
|
+
})], -1), re(c("input", {
|
|
625
625
|
ref_key: "searchInputRef",
|
|
626
626
|
ref: f,
|
|
627
627
|
type: "text",
|
|
628
628
|
class: "search-input",
|
|
629
629
|
placeholder: "Search...",
|
|
630
630
|
"onUpdate:modelValue": r[0] ||= (e) => l.value = e
|
|
631
|
-
}, null, 512), [[
|
|
631
|
+
}, null, 512), [[te, l.value]])])) : o("", !0), c("div", Ce, [(b(!0), s(e, null, C(ne.value, (e, t) => (b(), s("div", {
|
|
632
632
|
key: `${e.label}${t}`,
|
|
633
|
-
class:
|
|
634
|
-
onClick: (t) =>
|
|
635
|
-
}, [c("span", null, T(e.label), 1),
|
|
633
|
+
class: h(["option", { selected: E(e.value) }]),
|
|
634
|
+
onClick: (t) => D(e)
|
|
635
|
+
}, [c("span", null, T(e.label), 1), E(e.value) ? (b(), s("svg", V, [...r[5] ||= [c("path", { d: "M20 6 9 17l-5-5" }, null, -1)]])) : o("", !0)], 10, we))), 128)), ne.value.length === 0 ? (b(), s("div", H, " 無符合選項 ")) : o("", !0)])], 2)], 2)]));
|
|
636
636
|
}
|
|
637
|
-
}), [["__scopeId", "data-v-ab7179eb"]]),
|
|
637
|
+
}), [["__scopeId", "data-v-ab7179eb"]]), W = typeof Buffer == "function", G = typeof TextDecoder == "function" ? new TextDecoder() : void 0, K = typeof TextEncoder == "function" ? new TextEncoder() : void 0, q = Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="), J = ((e) => {
|
|
638
638
|
let t = {};
|
|
639
639
|
return e.forEach((e, n) => t[e] = n), t;
|
|
640
|
-
})(
|
|
640
|
+
})(q), Ee = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, Y = String.fromCharCode.bind(String), De = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), Oe = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), ke = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), Ae = typeof btoa == "function" ? (e) => btoa(e) : W ? (e) => Buffer.from(e, "binary").toString("base64") : (e) => {
|
|
641
641
|
let t, n, r, i, a = "", o = e.length % 3;
|
|
642
642
|
for (let o = 0; o < e.length;) {
|
|
643
643
|
if ((n = e.charCodeAt(o++)) > 255 || (r = e.charCodeAt(o++)) > 255 || (i = e.charCodeAt(o++)) > 255) throw TypeError("invalid character found");
|
|
644
|
-
t = n << 16 | r << 8 | i, a +=
|
|
644
|
+
t = n << 16 | r << 8 | i, a += q[t >> 18 & 63] + q[t >> 12 & 63] + q[t >> 6 & 63] + q[t & 63];
|
|
645
645
|
}
|
|
646
646
|
return o ? a.slice(0, o - 3) + "===".substring(o) : a;
|
|
647
|
-
}, je =
|
|
647
|
+
}, je = W ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
|
648
648
|
let t = 4096, n = [];
|
|
649
|
-
for (let r = 0, i = e.length; r < i; r += t) n.push(
|
|
649
|
+
for (let r = 0, i = e.length; r < i; r += t) n.push(Y.apply(null, e.subarray(r, r + t)));
|
|
650
650
|
return Ae(n.join(""));
|
|
651
651
|
}, Me = (e) => {
|
|
652
652
|
if (e.length < 2) {
|
|
653
653
|
var t = e.charCodeAt(0);
|
|
654
|
-
return t < 128 ? e : t < 2048 ?
|
|
654
|
+
return t < 128 ? e : t < 2048 ? Y(192 | t >>> 6) + Y(128 | t & 63) : Y(224 | t >>> 12 & 15) + Y(128 | t >>> 6 & 63) + Y(128 | t & 63);
|
|
655
655
|
} else {
|
|
656
656
|
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
|
|
657
|
-
return
|
|
657
|
+
return Y(240 | t >>> 18 & 7) + Y(128 | t >>> 12 & 63) + Y(128 | t >>> 6 & 63) + Y(128 | t & 63);
|
|
658
658
|
}
|
|
659
|
-
}, Ne = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Pe = (e) => e.replace(Ne, Me),
|
|
659
|
+
}, Ne = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Pe = (e) => e.replace(Ne, Me), X = W ? (e) => Buffer.from(e, "utf8").toString("base64") : K ? (e) => je(K.encode(e)) : (e) => Ae(Pe(e)), Fe = (e, t = !1) => t ? Oe(X(e)) : X(e), Ie = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, Le = (e) => {
|
|
660
660
|
switch (e.length) {
|
|
661
661
|
case 4:
|
|
662
662
|
var t = ((7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3)) - 65536;
|
|
663
|
-
return
|
|
664
|
-
case 3: return
|
|
665
|
-
default: return
|
|
663
|
+
return Y((t >>> 10) + 55296) + Y((t & 1023) + 56320);
|
|
664
|
+
case 3: return Y((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
|
|
665
|
+
default: return Y((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
|
|
666
666
|
}
|
|
667
|
-
},
|
|
667
|
+
}, Re = (e) => e.replace(Ie, Le), ze = typeof atob == "function" ? (e) => atob(ke(e)) : W ? (e) => Buffer.from(e, "base64").toString("binary") : (e) => {
|
|
668
668
|
if (e = e.replace(/\s+/g, ""), !Ee.test(e)) throw TypeError("malformed base64.");
|
|
669
669
|
e += "==".slice(2 - (e.length & 3));
|
|
670
670
|
let t, n, r, i = [];
|
|
671
|
-
for (let a = 0; a < e.length;) t =
|
|
671
|
+
for (let a = 0; a < e.length;) t = J[e.charAt(a++)] << 18 | J[e.charAt(a++)] << 12 | (n = J[e.charAt(a++)]) << 6 | (r = J[e.charAt(a++)]), n === 64 ? i.push(Y(t >> 16 & 255)) : r === 64 ? i.push(Y(t >> 16 & 255, t >> 8 & 255)) : i.push(Y(t >> 16 & 255, t >> 8 & 255, t & 255));
|
|
672
672
|
return i.join("");
|
|
673
|
-
},
|
|
674
|
-
let e =
|
|
675
|
-
localStorage.setItem(
|
|
676
|
-
},
|
|
677
|
-
let e = localStorage.getItem(
|
|
673
|
+
}, Be = W ? (e) => De(Buffer.from(e, "base64")) : (e) => De(ze(e).split("").map((e) => e.charCodeAt(0))), Ve = W ? (e) => Buffer.from(e, "base64").toString("utf8") : G ? (e) => G.decode(Be(e)) : (e) => Re(ze(e)), Z = (e) => ke(e.replace(/[-_]/g, (e) => e == "-" ? "+" : "/")), He = (e) => Ve(Z(e)), Ue = "N_UTILS_KEY", Q = [], We = () => {
|
|
674
|
+
let e = Fe(JSON.stringify(Q));
|
|
675
|
+
localStorage.setItem(Ue, e);
|
|
676
|
+
}, Ge = () => {
|
|
677
|
+
let e = localStorage.getItem(Ue) ?? "";
|
|
678
678
|
if (e.length == 0) return [];
|
|
679
679
|
try {
|
|
680
|
-
return JSON.parse(
|
|
680
|
+
return JSON.parse(He(e));
|
|
681
681
|
} catch {
|
|
682
682
|
return [];
|
|
683
683
|
}
|
|
684
|
-
},
|
|
684
|
+
}, Ke = () => {
|
|
685
685
|
Q.clear();
|
|
686
|
-
let e =
|
|
686
|
+
let e = Ge(), t = (/* @__PURE__ */ new Date()).getTime();
|
|
687
687
|
e.forEach((e) => {
|
|
688
688
|
e.expireTime && e.expireTime < t || Q.push({
|
|
689
689
|
key: e.key,
|
|
690
690
|
value: e.value,
|
|
691
691
|
expireTime: e.expireTime
|
|
692
692
|
});
|
|
693
|
-
}), Q.length > 0 &&
|
|
694
|
-
},
|
|
695
|
-
|
|
693
|
+
}), Q.length > 0 && We();
|
|
694
|
+
}, qe = (e) => (Ke(), Q.some((t) => t.key == e)), Je = (e, t, n) => {
|
|
695
|
+
Xe(e);
|
|
696
696
|
let r = {
|
|
697
697
|
key: e,
|
|
698
698
|
value: t
|
|
699
699
|
};
|
|
700
|
-
n && (r.expireTime = (/* @__PURE__ */ new Date()).getTime() + n * 1e3), Q.push(r),
|
|
701
|
-
},
|
|
702
|
-
|
|
700
|
+
n && (r.expireTime = (/* @__PURE__ */ new Date()).getTime() + n * 1e3), Q.push(r), We();
|
|
701
|
+
}, Ye = (e, t) => {
|
|
702
|
+
Ke();
|
|
703
703
|
let n = Q.find((t) => t.key == e);
|
|
704
704
|
return n ? n.value : t;
|
|
705
|
-
},
|
|
706
|
-
|
|
705
|
+
}, Xe = (e) => {
|
|
706
|
+
Ke();
|
|
707
707
|
let t = Q.findIndex((t) => t.key == e);
|
|
708
|
-
t != -1 && (Q.splice(t, 1),
|
|
709
|
-
},
|
|
710
|
-
set:
|
|
711
|
-
get:
|
|
712
|
-
has:
|
|
713
|
-
forget:
|
|
714
|
-
},
|
|
708
|
+
t != -1 && (Q.splice(t, 1), We());
|
|
709
|
+
}, Ze = {
|
|
710
|
+
set: Je,
|
|
711
|
+
get: Ye,
|
|
712
|
+
has: qe,
|
|
713
|
+
forget: Xe
|
|
714
|
+
}, Qe = { fullScreenToggle: (() => {
|
|
715
715
|
let e = !1;
|
|
716
716
|
return () => {
|
|
717
717
|
e ? document.exitFullscreen() : document.documentElement.requestFullscreen(), e = !e;
|
|
718
718
|
};
|
|
719
|
-
})() },
|
|
719
|
+
})() }, $e = {
|
|
720
720
|
random: (e = 5) => Array(e).fill(null).map(() => {
|
|
721
721
|
let e = Math.random() * 62;
|
|
722
722
|
return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(e);
|
|
@@ -724,9 +724,9 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
724
724
|
copy: (e) => {
|
|
725
725
|
navigator.clipboard.writeText(e);
|
|
726
726
|
}
|
|
727
|
-
},
|
|
727
|
+
}, et = [], tt = (e = "", t = !1, n = !1) => (et.clear(), new Promise((r, i) => {
|
|
728
728
|
let a = document.createElement("input");
|
|
729
|
-
|
|
729
|
+
et.push(a), a.hidden = !0, a.type = "file", a.accept = e, a.multiple = t, a.onchange = async (e) => {
|
|
730
730
|
let t = [];
|
|
731
731
|
a.files && a.files.length === 0 && r(t);
|
|
732
732
|
for (let e of a.files) {
|
|
@@ -744,16 +744,16 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
744
744
|
}, a.onerror = (e) => {
|
|
745
745
|
i(e);
|
|
746
746
|
}, a.click();
|
|
747
|
-
})),
|
|
748
|
-
all: (e = !1, t = !1) =>
|
|
749
|
-
image: async (e = !1, t = !1) =>
|
|
747
|
+
})), nt = {
|
|
748
|
+
all: (e = !1, t = !1) => tt("", e, t),
|
|
749
|
+
image: async (e = !1, t = !1) => tt([
|
|
750
750
|
"image/jpg",
|
|
751
751
|
"image/jpeg",
|
|
752
752
|
"image/png",
|
|
753
753
|
"image/gif",
|
|
754
754
|
"image/bmp"
|
|
755
755
|
].join(","), e, t),
|
|
756
|
-
documentFile: async (e = !1, t = !1) =>
|
|
756
|
+
documentFile: async (e = !1, t = !1) => tt([
|
|
757
757
|
".pdf",
|
|
758
758
|
"application/pdf",
|
|
759
759
|
".doc",
|
|
@@ -764,34 +764,34 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
764
764
|
"text/plain",
|
|
765
765
|
".md"
|
|
766
766
|
].join(","), e, t),
|
|
767
|
-
video: async (e = !1, t = !1) =>
|
|
767
|
+
video: async (e = !1, t = !1) => tt([
|
|
768
768
|
"video/mp4",
|
|
769
769
|
"video/quicktime",
|
|
770
770
|
"video/webm",
|
|
771
771
|
"video/ogg"
|
|
772
772
|
].join(","), e, t),
|
|
773
|
-
audio: async (e = !1, t = !1) =>
|
|
773
|
+
audio: async (e = !1, t = !1) => tt([
|
|
774
774
|
"audio/mp3",
|
|
775
775
|
"audio/wav",
|
|
776
776
|
"audio/ogg",
|
|
777
777
|
"audio/aac",
|
|
778
778
|
"audio/flac"
|
|
779
779
|
].join(","), e, t),
|
|
780
|
-
custom: (e = "", t = !1, n = !1) =>
|
|
781
|
-
},
|
|
780
|
+
custom: (e = "", t = !1, n = !1) => tt(e, t, n)
|
|
781
|
+
}, rt = (e) => new Promise((t, n) => {
|
|
782
782
|
let r = new FileReader();
|
|
783
783
|
r.readAsDataURL(e), r.onload = () => {
|
|
784
784
|
let e = r.result.split(";base64,");
|
|
785
785
|
e.length > 1 ? t(e[1]) : n(/* @__PURE__ */ Error("Failed to convert file to base64 string."));
|
|
786
786
|
}, r.onerror = n;
|
|
787
|
-
}),
|
|
788
|
-
convertBase64:
|
|
789
|
-
createImageUrlFromFile:
|
|
790
|
-
createImageUrlFromBlob:
|
|
787
|
+
}), it = (e) => at(new Blob([e], { type: "xxxx" })), at = (e) => (window.URL || window.webkitURL).createObjectURL(e), ot = {
|
|
788
|
+
convertBase64: rt,
|
|
789
|
+
createImageUrlFromFile: it,
|
|
790
|
+
createImageUrlFromBlob: at,
|
|
791
791
|
revokeObjectUrl: (e) => {
|
|
792
792
|
(window.URL || window.webkitURL).revokeObjectURL(e);
|
|
793
793
|
}
|
|
794
|
-
},
|
|
794
|
+
}, st = {
|
|
795
795
|
download: (e, t) => {
|
|
796
796
|
let n = document.createElement("a");
|
|
797
797
|
n.target = "_blank", t && (n.download = t), n.href = e, n.click(), n.remove();
|
|
@@ -800,12 +800,12 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
800
800
|
let t = document.createElement("a");
|
|
801
801
|
t.target = "_blank", t.href = e, t.click(), t.remove();
|
|
802
802
|
}
|
|
803
|
-
},
|
|
803
|
+
}, ct = async (e) => {
|
|
804
804
|
let t = e.includes("data:image/") ? e : `data:image/jpeg;base64,${e}`;
|
|
805
805
|
return (await fetch(t)).blob();
|
|
806
|
-
},
|
|
806
|
+
}, lt = (e) => new Promise(async (t, n) => {
|
|
807
807
|
try {
|
|
808
|
-
let r = typeof e == "string" ? await
|
|
808
|
+
let r = typeof e == "string" ? await ct(e) : e, i = window.URL || window.webkitURL, a = i.createObjectURL(r), o = document.createElement("img");
|
|
809
809
|
o.src = a, o.onload = () => {
|
|
810
810
|
i.revokeObjectURL(a), t(o);
|
|
811
811
|
}, o.onerror = (e) => {
|
|
@@ -814,39 +814,39 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
814
814
|
} catch (e) {
|
|
815
815
|
n(e);
|
|
816
816
|
}
|
|
817
|
-
}),
|
|
817
|
+
}), ut = (e, t) => {
|
|
818
818
|
let n = Math.min(t / e.width, t / e.height, 1), r = n * e.width, i = n * e.height, a = document.createElement("canvas"), o = a.getContext("2d");
|
|
819
819
|
return a.width = r, a.height = i, o.drawImage(e, 0, 0, r, i), a;
|
|
820
|
-
},
|
|
820
|
+
}, dt = (e) => {
|
|
821
821
|
let t = e.toDataURL("image/jpeg", .8).split(";base64,");
|
|
822
822
|
return t.length > 1 ? t[1] : "";
|
|
823
|
-
},
|
|
823
|
+
}, ft = (e) => new Promise((t, n) => {
|
|
824
824
|
e.toBlob((e) => {
|
|
825
825
|
e ? t(e) : n(/* @__PURE__ */ Error("Failed to create Blob from canvas."));
|
|
826
826
|
}, "image/jpeg", .8);
|
|
827
|
-
}),
|
|
828
|
-
thumbnailFromBlobToBase64: async (e, t) =>
|
|
829
|
-
thumbnailFromBlobToBlob: async (e, t) =>
|
|
830
|
-
thumbnailFromBase64ToBase64: async (e, t) =>
|
|
831
|
-
thumbnailFromBase64ToBlob: async (e, t) =>
|
|
832
|
-
},
|
|
827
|
+
}), pt = async (e, t) => ut(await lt(e), t), mt = {
|
|
828
|
+
thumbnailFromBlobToBase64: async (e, t) => dt(await pt(e, t)),
|
|
829
|
+
thumbnailFromBlobToBlob: async (e, t) => ft(await pt(e, t)),
|
|
830
|
+
thumbnailFromBase64ToBase64: async (e, t) => dt(await pt(e, t)),
|
|
831
|
+
thumbnailFromBase64ToBlob: async (e, t) => ft(await pt(e, t))
|
|
832
|
+
}, ht = () => {
|
|
833
833
|
let e = navigator.userAgent;
|
|
834
834
|
return !!/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e);
|
|
835
|
-
},
|
|
835
|
+
}, gt = () => {
|
|
836
836
|
let e = navigator.userAgent;
|
|
837
837
|
return !!/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e);
|
|
838
838
|
}, $ = {
|
|
839
|
-
store:
|
|
840
|
-
screen:
|
|
841
|
-
str:
|
|
842
|
-
input:
|
|
843
|
-
file:
|
|
844
|
-
link:
|
|
845
|
-
image:
|
|
839
|
+
store: Ze,
|
|
840
|
+
screen: Qe,
|
|
841
|
+
str: $e,
|
|
842
|
+
input: nt,
|
|
843
|
+
file: ot,
|
|
844
|
+
link: st,
|
|
845
|
+
image: mt,
|
|
846
846
|
device: {
|
|
847
|
-
isMobile:
|
|
848
|
-
isTablet:
|
|
849
|
-
isDesktop: () =>
|
|
847
|
+
isMobile: ht,
|
|
848
|
+
isTablet: gt,
|
|
849
|
+
isDesktop: () => ht() == 0 && gt() == 0
|
|
850
850
|
},
|
|
851
851
|
date: { getCalendarByDate: (e) => {
|
|
852
852
|
e.setDate(1);
|
|
@@ -870,7 +870,7 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
870
870
|
e > 0 && window.clearTimeout(e), e = window.setTimeout(t, n);
|
|
871
871
|
};
|
|
872
872
|
})() }
|
|
873
|
-
},
|
|
873
|
+
}, _t = { class: "file-select" }, vt = ["textContent"], yt = ["aria-disabled"], bt = { class: "inner" }, xt = { class: "text" }, St = ["textContent"], Ct = ["textContent"], wt = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
874
874
|
__name: "NFileSelect",
|
|
875
875
|
props: {
|
|
876
876
|
multiple: {
|
|
@@ -897,19 +897,19 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
897
897
|
console.log(e);
|
|
898
898
|
}
|
|
899
899
|
};
|
|
900
|
-
return (t, n) => (b(), s("div",
|
|
900
|
+
return (t, n) => (b(), s("div", _t, [e.title ? (b(), s("div", {
|
|
901
901
|
key: 0,
|
|
902
902
|
class: "title",
|
|
903
903
|
textContent: T(e.title)
|
|
904
|
-
}, null, 8,
|
|
905
|
-
class:
|
|
904
|
+
}, null, 8, vt)) : o("", !0), c("div", {
|
|
905
|
+
class: h(["select", {
|
|
906
906
|
multiple: e.multiple,
|
|
907
907
|
disabled: e.disabled
|
|
908
908
|
}]),
|
|
909
909
|
tabindex: "0",
|
|
910
910
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
911
911
|
onClick: r
|
|
912
|
-
}, [c("div",
|
|
912
|
+
}, [c("div", bt, [n[0] ||= c("span", {
|
|
913
913
|
class: "icon",
|
|
914
914
|
"aria-hidden": "true"
|
|
915
915
|
}, [c("svg", {
|
|
@@ -922,64 +922,51 @@ var ae = ["type", "disabled"], oe = /* @__PURE__ */ p({
|
|
|
922
922
|
"stroke-linejoin": "round",
|
|
923
923
|
"stroke-width": "2",
|
|
924
924
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
|
|
925
|
-
})])], -1), c("div",
|
|
925
|
+
})])], -1), c("div", xt, [c("p", {
|
|
926
926
|
class: "label",
|
|
927
927
|
textContent: T(e.label)
|
|
928
|
-
}, null, 8,
|
|
928
|
+
}, null, 8, St), c("p", {
|
|
929
929
|
class: "hint",
|
|
930
930
|
textContent: T(e.hint)
|
|
931
|
-
}, null, 8,
|
|
931
|
+
}, null, 8, Ct)])])], 10, yt)]));
|
|
932
932
|
}
|
|
933
|
-
}), [["__scopeId", "data-v-c90d900b"]])
|
|
934
|
-
Array.isArray;
|
|
935
|
-
var Et = /* @__PURE__ */ function(e) {
|
|
936
|
-
return e[e.MATCHER_NOT_FOUND = 1] = "MATCHER_NOT_FOUND", e[e.NAVIGATION_GUARD_REDIRECT = 2] = "NAVIGATION_GUARD_REDIRECT", e[e.NAVIGATION_ABORTED = 4] = "NAVIGATION_ABORTED", e[e.NAVIGATION_CANCELLED = 8] = "NAVIGATION_CANCELLED", e[e.NAVIGATION_DUPLICATED = 16] = "NAVIGATION_DUPLICATED", e;
|
|
937
|
-
}({});
|
|
938
|
-
Symbol(process.env.NODE_ENV === "production" ? "" : "navigation failure"), Et.MATCHER_NOT_FOUND, Et.NAVIGATION_GUARD_REDIRECT, Et.NAVIGATION_ABORTED, Et.NAVIGATION_CANCELLED, Et.NAVIGATION_DUPLICATED, Symbol(process.env.NODE_ENV === "production" ? "" : "router view location matched"), Symbol(process.env.NODE_ENV === "production" ? "" : "router view depth"), Symbol(process.env.NODE_ENV === "production" ? "" : "router");
|
|
939
|
-
var Dt = Symbol(process.env.NODE_ENV === "production" ? "" : "route location");
|
|
940
|
-
Symbol(process.env.NODE_ENV === "production" ? "" : "router view location");
|
|
941
|
-
function Ot(e) {
|
|
942
|
-
return m(Dt);
|
|
943
|
-
}
|
|
944
|
-
//#endregion
|
|
945
|
-
//#region src/layouts/NBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
946
|
-
var kt = { class: "breadcrumbs" }, At = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
933
|
+
}), [["__scopeId", "data-v-c90d900b"]]), Tt = { class: "breadcrumbs" }, Et = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
947
934
|
__name: "NBreadcrumb",
|
|
948
935
|
setup(e) {
|
|
949
|
-
return (e, t) => (b(), s("nav",
|
|
936
|
+
return (e, t) => (b(), s("nav", Tt, [...t[0] ||= [
|
|
950
937
|
c("span", null, "Home", -1),
|
|
951
938
|
c("span", null, "Admin", -1),
|
|
952
939
|
c("span", { class: "active" }, "Functions", -1)
|
|
953
940
|
]]));
|
|
954
941
|
}
|
|
955
|
-
}), [["__scopeId", "data-v-c06b466b"]]),
|
|
956
|
-
function
|
|
942
|
+
}), [["__scopeId", "data-v-c06b466b"]]), Dt = S(!1);
|
|
943
|
+
function Ot(e = "default") {
|
|
957
944
|
let t = `NSidebar:${e}:expanded`, n = x($.store.get(t, {}));
|
|
958
|
-
|
|
945
|
+
Dt.value = $.store.get("NSidebar:expanded", !1);
|
|
959
946
|
let r = (e) => !!n[e];
|
|
960
947
|
return {
|
|
961
948
|
isMenuExpanded: r,
|
|
962
949
|
toggleMenu: (e) => {
|
|
963
950
|
n[e] = !r(e), $.store.set(t, n);
|
|
964
951
|
},
|
|
965
|
-
isSidebarExpanded: () =>
|
|
952
|
+
isSidebarExpanded: () => Dt.value,
|
|
966
953
|
toggleSidebar: () => {
|
|
967
|
-
|
|
954
|
+
Dt.value = !Dt.value, $.store.set("NSidebar:expanded", Dt.value);
|
|
968
955
|
}
|
|
969
956
|
};
|
|
970
957
|
}
|
|
971
958
|
//#endregion
|
|
972
959
|
//#region src/layouts/NHeroSection.vue?vue&type=script&setup=true&lang.ts
|
|
973
|
-
var
|
|
960
|
+
var kt = { class: "hero-section" }, At = { class: "header" }, jt = ["innerHTML"], Mt = { class: "body" }, Nt = { class: "title-section" }, Pt = { class: "title" }, Ft = { key: 0 }, It = { class: "toolbar" }, Lt = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
974
961
|
__name: "NHeroSection",
|
|
975
962
|
props: {
|
|
976
963
|
icon: { default: "" },
|
|
977
964
|
title: { default: "" }
|
|
978
965
|
},
|
|
979
966
|
setup(e) {
|
|
980
|
-
let t =
|
|
981
|
-
return (n, r) => (b(), s("div",
|
|
982
|
-
c("div",
|
|
967
|
+
let t = Ot();
|
|
968
|
+
return (n, r) => (b(), s("div", kt, [
|
|
969
|
+
c("div", At, [f(j, {
|
|
983
970
|
class: "sidebar-toggle-button",
|
|
984
971
|
padding: "8px",
|
|
985
972
|
intent: "none",
|
|
@@ -1002,19 +989,19 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1002
989
|
c("path", { d: "M4 19h16" })
|
|
1003
990
|
], -1)]]),
|
|
1004
991
|
_: 1
|
|
1005
|
-
}), f(
|
|
992
|
+
}), f(Et)]),
|
|
1006
993
|
e.icon ? (b(), s("div", {
|
|
1007
994
|
key: 0,
|
|
1008
995
|
class: "icon-bg",
|
|
1009
996
|
innerHTML: e.icon
|
|
1010
|
-
}, null, 8,
|
|
1011
|
-
c("div",
|
|
997
|
+
}, null, 8, jt)) : o("", !0),
|
|
998
|
+
c("div", Mt, [c("div", Nt, [c("div", Pt, [e.title ? (b(), s("h1", Ft, T(e.title), 1)) : o("", !0)])]), c("div", It, [w(n.$slots, "default", {}, void 0, !0)])])
|
|
1012
999
|
]));
|
|
1013
1000
|
}
|
|
1014
|
-
}), [["__scopeId", "data-v-
|
|
1001
|
+
}), [["__scopeId", "data-v-a9b8ef66"]]), Rt = { class: "content-container" }, zt = {
|
|
1015
1002
|
key: 0,
|
|
1016
1003
|
class: "nav-tabs"
|
|
1017
|
-
},
|
|
1004
|
+
}, Bt = ["textContent", "onClick"], Vt = { class: "tab-content" }, Ht = { class: "footer" }, Ut = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1018
1005
|
__name: "NForm",
|
|
1019
1006
|
props: {
|
|
1020
1007
|
model: { default: () => ({}) },
|
|
@@ -1028,37 +1015,37 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1028
1015
|
},
|
|
1029
1016
|
emits: ["submit", "reset"],
|
|
1030
1017
|
setup(t, { emit: n }) {
|
|
1031
|
-
let r = n, i = `NForm:${
|
|
1018
|
+
let r = n, i = `NForm:${t.title}@${t.tabs.length}:tab`, a = S(t.tabs.length > 0 ? $.store.get(i, 0) : 0), l = () => {
|
|
1032
1019
|
t.disabled || r("submit", t.model);
|
|
1033
1020
|
}, u = () => {
|
|
1034
1021
|
t.disabled || r("reset");
|
|
1035
1022
|
};
|
|
1036
|
-
return (n, r) => (b(), s("div",
|
|
1023
|
+
return (n, r) => (b(), s("div", Rt, [f(Lt, {
|
|
1037
1024
|
icon: t.icon,
|
|
1038
1025
|
title: t.title
|
|
1039
1026
|
}, null, 8, ["icon", "title"]), c("form", {
|
|
1040
1027
|
onSubmit: k(l, ["prevent"]),
|
|
1041
1028
|
onReset: k(u, ["prevent"])
|
|
1042
1029
|
}, [
|
|
1043
|
-
t.tabs.length > 0 ? (b(), s("div",
|
|
1030
|
+
t.tabs.length > 0 ? (b(), s("div", zt, [(b(!0), s(e, null, C(t.tabs, (e, t) => (b(), s("button", {
|
|
1044
1031
|
key: `${e}${t}`,
|
|
1045
|
-
class:
|
|
1032
|
+
class: h(["nav-link", { active: a.value === t }]),
|
|
1046
1033
|
textContent: T(e),
|
|
1047
1034
|
onClick: () => {
|
|
1048
1035
|
a.value = t, E($).store.set(i, t);
|
|
1049
1036
|
}
|
|
1050
|
-
}, null, 10,
|
|
1051
|
-
c("div",
|
|
1052
|
-
c("div",
|
|
1037
|
+
}, null, 10, Bt))), 128))])) : o("", !0),
|
|
1038
|
+
c("div", Vt, [t.tabs.length > 0 ? (b(!0), s(e, { key: 0 }, C(t.tabs, (t, r) => (b(), s(e, null, [a.value === r ? w(n.$slots, `tab${r}`, { key: 0 }, void 0, !0) : o("", !0)], 64))), 256)) : o("", !0), t.tabs.length == 0 && n.$slots.tab0 ? w(n.$slots, "tab0", { key: 1 }, void 0, !0) : o("", !0)]),
|
|
1039
|
+
c("div", Ht, [w(n.$slots, "footer", {}, void 0, !0)])
|
|
1053
1040
|
], 32)]));
|
|
1054
1041
|
}
|
|
1055
|
-
}), [["__scopeId", "data-v-
|
|
1042
|
+
}), [["__scopeId", "data-v-adcf4fe8"]]), Wt = ["innerHTML"], Gt = { class: "title" }, Kt = {
|
|
1056
1043
|
key: 1,
|
|
1057
1044
|
class: "description"
|
|
1058
|
-
},
|
|
1045
|
+
}, qt = {
|
|
1059
1046
|
key: 2,
|
|
1060
1047
|
class: "action"
|
|
1061
|
-
},
|
|
1048
|
+
}, Jt = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1062
1049
|
__name: "NEmpty",
|
|
1063
1050
|
props: {
|
|
1064
1051
|
title: { default: "目前沒有資料" },
|
|
@@ -1067,36 +1054,36 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1067
1054
|
icon: { default: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"22 12 16 12 14 15 10 15 8 12 2 12\"/>\n <path d=\"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\"/>\n</svg>" }
|
|
1068
1055
|
},
|
|
1069
1056
|
setup(e) {
|
|
1070
|
-
return (t, n) => (b(), s("div", { class:
|
|
1057
|
+
return (t, n) => (b(), s("div", { class: h(["empty", [`size-${e.size}`]]) }, [
|
|
1071
1058
|
e.icon ? (b(), s("div", {
|
|
1072
1059
|
key: 0,
|
|
1073
1060
|
class: "icon",
|
|
1074
1061
|
innerHTML: e.icon
|
|
1075
|
-
}, null, 8,
|
|
1076
|
-
c("p",
|
|
1077
|
-
e.description ? (b(), s("p",
|
|
1078
|
-
t.$slots.default ? (b(), s("div",
|
|
1062
|
+
}, null, 8, Wt)) : o("", !0),
|
|
1063
|
+
c("p", Gt, T(e.title), 1),
|
|
1064
|
+
e.description ? (b(), s("p", Kt, T(e.description), 1)) : o("", !0),
|
|
1065
|
+
t.$slots.default ? (b(), s("div", qt, [w(t.$slots, "default", {}, void 0, !0)])) : o("", !0)
|
|
1079
1066
|
], 2));
|
|
1080
1067
|
}
|
|
1081
|
-
}), [["__scopeId", "data-v-b806fad9"]]),
|
|
1068
|
+
}), [["__scopeId", "data-v-b806fad9"]]), Yt = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1082
1069
|
__name: "NCard",
|
|
1083
1070
|
props: {
|
|
1084
1071
|
size: { default: "md" },
|
|
1085
1072
|
radius: { default: "md" }
|
|
1086
1073
|
},
|
|
1087
1074
|
setup(e) {
|
|
1088
|
-
return (t, n) => (b(), s("div", { class:
|
|
1075
|
+
return (t, n) => (b(), s("div", { class: h(["card", {
|
|
1089
1076
|
[`size-${e.size}`]: !0,
|
|
1090
1077
|
[`radius-${e.radius}`]: !0
|
|
1091
1078
|
}]) }, [w(t.$slots, "default", {}, void 0, !0)], 2));
|
|
1092
1079
|
}
|
|
1093
|
-
}), [["__scopeId", "data-v-2f12383f"]]),
|
|
1080
|
+
}), [["__scopeId", "data-v-2f12383f"]]), Xt = {
|
|
1094
1081
|
key: 0,
|
|
1095
1082
|
class: "paginate"
|
|
1096
|
-
},
|
|
1083
|
+
}, Zt = { class: "summary" }, Qt = { class: "pages" }, $t = {
|
|
1097
1084
|
key: 1,
|
|
1098
1085
|
class: "separator"
|
|
1099
|
-
},
|
|
1086
|
+
}, en = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1100
1087
|
__name: "NPaginate",
|
|
1101
1088
|
props: {
|
|
1102
1089
|
totalItems: {},
|
|
@@ -1127,7 +1114,7 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1127
1114
|
let t = Math.min(Math.max(1, e), u.value);
|
|
1128
1115
|
l.value !== t && (l.value = t, r("onPageChange", l.value));
|
|
1129
1116
|
}
|
|
1130
|
-
return (n, r) => t.totalItems > 0 ? (b(), s("div",
|
|
1117
|
+
return (n, r) => t.totalItems > 0 ? (b(), s("div", Xt, [c("span", Zt, "第 " + T(l.value) + " / " + T(u.value) + " 頁,共 " + T(t.totalItems) + " 筆", 1), c("div", Qt, [
|
|
1131
1118
|
f(j, {
|
|
1132
1119
|
variant: "outline",
|
|
1133
1120
|
padding: "",
|
|
@@ -1164,7 +1151,7 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1164
1151
|
"variant",
|
|
1165
1152
|
"intent",
|
|
1166
1153
|
"onClick"
|
|
1167
|
-
])) : (b(), s("span",
|
|
1154
|
+
])) : (b(), s("span", $t, "…"))], 64))), 128)),
|
|
1168
1155
|
f(j, {
|
|
1169
1156
|
variant: "outline",
|
|
1170
1157
|
padding: "",
|
|
@@ -1188,10 +1175,10 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1188
1175
|
}, 8, ["disabled"])
|
|
1189
1176
|
])])) : o("", !0);
|
|
1190
1177
|
}
|
|
1191
|
-
}), [["__scopeId", "data-v-06443bd8"]]),
|
|
1178
|
+
}), [["__scopeId", "data-v-06443bd8"]]), tn = { class: "table-scroll" }, nn = ["onClick"], rn = { class: "th-content" }, an = {
|
|
1192
1179
|
key: 0,
|
|
1193
1180
|
class: "sort-icon"
|
|
1194
|
-
},
|
|
1181
|
+
}, on = {
|
|
1195
1182
|
key: 0,
|
|
1196
1183
|
viewBox: "0 0 24 24",
|
|
1197
1184
|
fill: "none",
|
|
@@ -1199,7 +1186,7 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1199
1186
|
"stroke-width": "2",
|
|
1200
1187
|
"stroke-linecap": "round",
|
|
1201
1188
|
"stroke-linejoin": "round"
|
|
1202
|
-
},
|
|
1189
|
+
}, sn = {
|
|
1203
1190
|
key: 1,
|
|
1204
1191
|
viewBox: "0 0 24 24",
|
|
1205
1192
|
fill: "none",
|
|
@@ -1207,7 +1194,7 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1207
1194
|
"stroke-width": "2",
|
|
1208
1195
|
"stroke-linecap": "round",
|
|
1209
1196
|
"stroke-linejoin": "round"
|
|
1210
|
-
},
|
|
1197
|
+
}, cn = {
|
|
1211
1198
|
key: 2,
|
|
1212
1199
|
viewBox: "0 0 24 24",
|
|
1213
1200
|
fill: "none",
|
|
@@ -1215,13 +1202,13 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1215
1202
|
"stroke-width": "2",
|
|
1216
1203
|
"stroke-linecap": "round",
|
|
1217
1204
|
"stroke-linejoin": "round"
|
|
1218
|
-
},
|
|
1205
|
+
}, ln = {
|
|
1219
1206
|
key: 0,
|
|
1220
1207
|
class: "col-actions"
|
|
1221
|
-
},
|
|
1208
|
+
}, un = ["onClick"], dn = {
|
|
1222
1209
|
key: 0,
|
|
1223
1210
|
class: "col-actions"
|
|
1224
|
-
},
|
|
1211
|
+
}, fn = { key: 1 }, pn = ["colspan"], mn = { key: 2 }, hn = ["colspan"], gn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1225
1212
|
__name: "NTable",
|
|
1226
1213
|
props: {
|
|
1227
1214
|
columns: { default: () => [] },
|
|
@@ -1256,48 +1243,48 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1256
1243
|
let n = e[t.key];
|
|
1257
1244
|
return t.formatter ? t.formatter(n, e) : n;
|
|
1258
1245
|
};
|
|
1259
|
-
return (n, u) => (b(), s("div", { class:
|
|
1246
|
+
return (n, u) => (b(), s("div", { class: h(["table", [
|
|
1260
1247
|
{ striped: t.striped },
|
|
1261
1248
|
{ bordered: t.bordered },
|
|
1262
1249
|
{ hoverable: t.hoverable },
|
|
1263
1250
|
{ loading: t.loading }
|
|
1264
|
-
]]) }, [c("div",
|
|
1251
|
+
]]) }, [c("div", tn, [c("table", null, [c("thead", null, [c("tr", null, [(b(!0), s(e, null, C(t.columns, (e) => (b(), s("th", {
|
|
1265
1252
|
key: e.key,
|
|
1266
|
-
style:
|
|
1253
|
+
style: g({
|
|
1267
1254
|
width: e.width,
|
|
1268
1255
|
textAlign: e.align ?? "left"
|
|
1269
1256
|
}),
|
|
1270
|
-
class:
|
|
1257
|
+
class: h({ sortable: e.sortable }),
|
|
1271
1258
|
onClick: (t) => a(e)
|
|
1272
|
-
}, [c("span",
|
|
1259
|
+
}, [c("span", rn, [w(n.$slots, `header-${e.key}`, { col: e }, () => [d(T(e.label), 1)], !0), e.sortable ? (b(), s("span", an, [i.value.key !== e.key || i.value.order === null ? (b(), s("svg", on, [...u[0] ||= [c("path", { d: "M8 9l4-4 4 4" }, null, -1), c("path", { d: "M16 15l-4 4-4-4" }, null, -1)]])) : i.value.order === "asc" ? (b(), s("svg", sn, [...u[1] ||= [c("path", { d: "M8 15l4-6 4 6" }, null, -1)]])) : (b(), s("svg", cn, [...u[2] ||= [c("path", { d: "M8 9l4 6 4-6" }, null, -1)]]))])) : o("", !0)])], 14, nn))), 128)), n.$slots.actions ? (b(), s("th", ln, [w(n.$slots, "actions-header", {}, () => [u[3] ||= d("操作", -1)], !0)])) : o("", !0)])]), c("tbody", null, [!t.loading && t.rows.length > 0 ? (b(!0), s(e, { key: 0 }, C(t.rows, (i, a) => (b(), s("tr", {
|
|
1273
1260
|
key: i[t.rowKey] ?? a,
|
|
1274
1261
|
onClick: (e) => r("row-click", i)
|
|
1275
1262
|
}, [(b(!0), s(e, null, C(t.columns, (e) => (b(), s("td", {
|
|
1276
1263
|
key: e.key,
|
|
1277
|
-
style:
|
|
1264
|
+
style: g({ textAlign: e.align ?? "left" })
|
|
1278
1265
|
}, [w(n.$slots, `cell-${e.key}`, {
|
|
1279
1266
|
value: l(i, e),
|
|
1280
1267
|
row: i,
|
|
1281
1268
|
index: a
|
|
1282
|
-
}, () => [d(T(l(i, e)), 1)], !0)], 4))), 128)), n.$slots.actions ? (b(), s("td",
|
|
1269
|
+
}, () => [d(T(l(i, e)), 1)], !0)], 4))), 128)), n.$slots.actions ? (b(), s("td", dn, [w(n.$slots, "actions", {
|
|
1283
1270
|
row: i,
|
|
1284
1271
|
index: a
|
|
1285
|
-
}, void 0, !0)])) : o("", !0)], 8,
|
|
1272
|
+
}, void 0, !0)])) : o("", !0)], 8, un))), 128)) : !t.loading && t.rows.length === 0 ? (b(), s("tr", fn, [c("td", {
|
|
1286
1273
|
colspan: t.columns.length + +!!n.$slots.actions,
|
|
1287
1274
|
class: "empty-cell"
|
|
1288
|
-
}, [w(n.$slots, "empty", {}, () => [d(T(t.emptyText), 1)], !0)], 8,
|
|
1275
|
+
}, [w(n.$slots, "empty", {}, () => [d(T(t.emptyText), 1)], !0)], 8, pn)])) : t.loading ? (b(), s("tr", mn, [c("td", {
|
|
1289
1276
|
colspan: t.columns.length + +!!n.$slots.actions,
|
|
1290
1277
|
class: "loading-cell"
|
|
1291
1278
|
}, [w(n.$slots, "loading", {}, () => [u[4] ||= c("span", { class: "loading-dots" }, [
|
|
1292
1279
|
c("span"),
|
|
1293
1280
|
c("span"),
|
|
1294
1281
|
c("span")
|
|
1295
|
-
], -1)], !0)], 8,
|
|
1282
|
+
], -1)], !0)], 8, hn)])) : o("", !0)])])])], 2));
|
|
1296
1283
|
}
|
|
1297
|
-
}), [["__scopeId", "data-v-e6e63613"]]),
|
|
1284
|
+
}), [["__scopeId", "data-v-e6e63613"]]), _n = { class: "content-container" }, vn = {
|
|
1298
1285
|
key: 0,
|
|
1299
1286
|
class: "toolbar"
|
|
1300
|
-
},
|
|
1287
|
+
}, yn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1301
1288
|
__name: "NList",
|
|
1302
1289
|
props: {
|
|
1303
1290
|
title: { default: "" },
|
|
@@ -1345,7 +1332,7 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1345
1332
|
"sort"
|
|
1346
1333
|
],
|
|
1347
1334
|
setup(e, { emit: t }) {
|
|
1348
|
-
let n =
|
|
1335
|
+
let n = ee(), r = t, u = S(/* @__PURE__ */ new Set()), p = i(() => Array.from(u.value)), m = (e) => u.value.has(e), h = i(() => e.items.length > 0 && e.items.length === u.value.size), g = i(() => e.batchDeletable ? [{
|
|
1349
1336
|
key: "__select__",
|
|
1350
1337
|
label: "",
|
|
1351
1338
|
width: "40px"
|
|
@@ -1355,14 +1342,14 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1355
1342
|
let n = t.id;
|
|
1356
1343
|
u.value.has(n) ? u.value.delete(n) : u.value.add(n);
|
|
1357
1344
|
}
|
|
1358
|
-
function
|
|
1345
|
+
function v() {
|
|
1359
1346
|
e.batchDeletable && (h.value ? e.items.forEach((e) => u.value.delete(e.id)) : e.items.forEach((e) => u.value.add(e.id)), u.value = new Set(u.value));
|
|
1360
1347
|
}
|
|
1361
|
-
return (t, i) => (b(), s("div",
|
|
1348
|
+
return (t, i) => (b(), s("div", _n, [f(Lt, {
|
|
1362
1349
|
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"></path>\n <circle cx=\"12\" cy=\"7\" r=\"4\"></circle>\n </svg>",
|
|
1363
1350
|
title: e.title
|
|
1364
1351
|
}, {
|
|
1365
|
-
default: O(() => [n.toolbar || e.refreshable || e.creatable || e.batchDeletable ? (b(), s("div",
|
|
1352
|
+
default: O(() => [n.toolbar || e.refreshable || e.creatable || e.batchDeletable ? (b(), s("div", vn, [
|
|
1366
1353
|
w(t.$slots, "toolbar", {}, void 0, !0),
|
|
1367
1354
|
e.refreshable ? (b(), a(j, {
|
|
1368
1355
|
key: 0,
|
|
@@ -1452,11 +1439,11 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1452
1439
|
})) : o("", !0)
|
|
1453
1440
|
])) : o("", !0)]),
|
|
1454
1441
|
_: 3
|
|
1455
|
-
}, 8, ["title"]), f(
|
|
1442
|
+
}, 8, ["title"]), f(Yt, {
|
|
1456
1443
|
size: "none",
|
|
1457
1444
|
radius: "xl"
|
|
1458
1445
|
}, {
|
|
1459
|
-
default: O(() => [f(
|
|
1446
|
+
default: O(() => [f(gn, {
|
|
1460
1447
|
columns: g.value,
|
|
1461
1448
|
rows: e.items,
|
|
1462
1449
|
hoverable: "",
|
|
@@ -1467,7 +1454,7 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1467
1454
|
},
|
|
1468
1455
|
onSort: i[6] ||= (e) => r("sort", e)
|
|
1469
1456
|
}, l({
|
|
1470
|
-
empty: O(() => [f(
|
|
1457
|
+
empty: O(() => [f(Jt, {
|
|
1471
1458
|
title: e.emptyTitle,
|
|
1472
1459
|
description: e.emptyDescription,
|
|
1473
1460
|
icon: e.emptyIcon,
|
|
@@ -1484,15 +1471,15 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1484
1471
|
}, [
|
|
1485
1472
|
e.batchDeletable ? {
|
|
1486
1473
|
name: "header-__select__",
|
|
1487
|
-
fn: O(() => [f(
|
|
1474
|
+
fn: O(() => [f(ge, {
|
|
1488
1475
|
"model-value": h.value,
|
|
1489
|
-
"onUpdate:modelValue": i[4] ||= () =>
|
|
1476
|
+
"onUpdate:modelValue": i[4] ||= () => v()
|
|
1490
1477
|
}, null, 8, ["model-value"])]),
|
|
1491
1478
|
key: "0"
|
|
1492
1479
|
} : void 0,
|
|
1493
1480
|
e.batchDeletable ? {
|
|
1494
1481
|
name: "cell-__select__",
|
|
1495
|
-
fn: O(({ row: e }) => [f(
|
|
1482
|
+
fn: O(({ row: e }) => [f(ge, {
|
|
1496
1483
|
onClick: k((t) => _(e), ["stop"]),
|
|
1497
1484
|
"model-value": m(e.id)
|
|
1498
1485
|
}, null, 8, ["onClick", "model-value"])]),
|
|
@@ -1526,7 +1513,7 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1526
1513
|
fn: O(() => [w(t.$slots, "actions-header", {}, void 0, !0)]),
|
|
1527
1514
|
key: "3"
|
|
1528
1515
|
} : void 0
|
|
1529
|
-
]), 1032, ["columns", "rows"]), e.items.length > 0 ? (b(), a(
|
|
1516
|
+
]), 1032, ["columns", "rows"]), e.items.length > 0 ? (b(), a(en, {
|
|
1530
1517
|
key: 0,
|
|
1531
1518
|
totalItems: e.items.length,
|
|
1532
1519
|
pageSize: e.pageSize,
|
|
@@ -1540,11 +1527,11 @@ var Nt = { class: "hero-section" }, Pt = { class: "header" }, Ft = ["innerHTML"]
|
|
|
1540
1527
|
_: 3
|
|
1541
1528
|
})]));
|
|
1542
1529
|
}
|
|
1543
|
-
}), [["__scopeId", "data-v-b5402ec0"]]),
|
|
1544
|
-
function
|
|
1530
|
+
}), [["__scopeId", "data-v-b5402ec0"]]), bn = 0, xn = x([]);
|
|
1531
|
+
function Sn() {
|
|
1545
1532
|
let e = function(e, n = {}) {
|
|
1546
|
-
let r = ++
|
|
1547
|
-
|
|
1533
|
+
let r = ++bn, i = n.duration ?? 4e3;
|
|
1534
|
+
xn.push({
|
|
1548
1535
|
id: r,
|
|
1549
1536
|
description: e,
|
|
1550
1537
|
status: n.status ?? "info",
|
|
@@ -1566,34 +1553,34 @@ function En() {
|
|
|
1566
1553
|
status: "info"
|
|
1567
1554
|
});
|
|
1568
1555
|
function t(e) {
|
|
1569
|
-
let t =
|
|
1570
|
-
t !== -1 &&
|
|
1556
|
+
let t = xn.findIndex((t) => t.id === e);
|
|
1557
|
+
t !== -1 && xn.splice(t, 1);
|
|
1571
1558
|
}
|
|
1572
1559
|
return {
|
|
1573
|
-
toasts:
|
|
1560
|
+
toasts: xn,
|
|
1574
1561
|
toast: e,
|
|
1575
1562
|
removeToast: t
|
|
1576
1563
|
};
|
|
1577
1564
|
}
|
|
1578
1565
|
//#endregion
|
|
1579
1566
|
//#region src/components/NToast.vue?vue&type=script&setup=true&lang.ts
|
|
1580
|
-
var
|
|
1567
|
+
var Cn = { class: "icon-wrap" }, wn = ["innerHTML"], Tn = {
|
|
1581
1568
|
key: 0,
|
|
1582
1569
|
class: "arc-timer",
|
|
1583
1570
|
viewBox: "0 0 36 36",
|
|
1584
1571
|
width: "36",
|
|
1585
1572
|
height: "36",
|
|
1586
1573
|
"shape-rendering": "geometricPrecision"
|
|
1587
|
-
},
|
|
1574
|
+
}, En = { class: "body" }, Dn = {
|
|
1588
1575
|
key: 0,
|
|
1589
1576
|
class: "title"
|
|
1590
|
-
},
|
|
1577
|
+
}, On = {
|
|
1591
1578
|
key: 1,
|
|
1592
1579
|
class: "description"
|
|
1593
|
-
},
|
|
1580
|
+
}, kn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1594
1581
|
__name: "NToast",
|
|
1595
1582
|
setup(n) {
|
|
1596
|
-
let { toasts: i } =
|
|
1583
|
+
let { toasts: i } = Sn(), l = {
|
|
1597
1584
|
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>",
|
|
1598
1585
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <path d=\"m15 9-6 6\"/>\n <path d=\"m9 9 6 6\"/>\n </svg>",
|
|
1599
1586
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/>\n <path d=\"M12 9v4\"/>\n <path d=\"M12 17h.01\"/>\n </svg>",
|
|
@@ -1606,11 +1593,11 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1606
1593
|
}, {
|
|
1607
1594
|
default: O(() => [(b(!0), s(e, null, C(E(i), (e) => (b(), s("div", {
|
|
1608
1595
|
key: e.id,
|
|
1609
|
-
class:
|
|
1610
|
-
}, [c("div",
|
|
1596
|
+
class: h(["toast", [`${e.status}`]])
|
|
1597
|
+
}, [c("div", Cn, [c("div", {
|
|
1611
1598
|
class: "icon",
|
|
1612
1599
|
innerHTML: l[e.status]
|
|
1613
|
-
}, null, 8,
|
|
1600
|
+
}, null, 8, wn), e.duration > 0 ? (b(), s("svg", Tn, [u[0] ||= c("circle", {
|
|
1614
1601
|
class: "arc-track",
|
|
1615
1602
|
cx: "18",
|
|
1616
1603
|
cy: "18",
|
|
@@ -1621,30 +1608,30 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1621
1608
|
cy: "18",
|
|
1622
1609
|
r: "16",
|
|
1623
1610
|
transform: "rotate(-90 18 18)",
|
|
1624
|
-
style:
|
|
1625
|
-
}, null, 4)])) : o("", !0)]), c("div",
|
|
1611
|
+
style: g({ animationDuration: `${e.duration}ms` })
|
|
1612
|
+
}, null, 4)])) : o("", !0)]), c("div", En, [e.title ? (b(), s("p", Dn, T(e.title), 1)) : o("", !0), e.description ? (b(), s("p", On, T(e.description), 1)) : o("", !0)])], 2))), 128))]),
|
|
1626
1613
|
_: 1
|
|
1627
1614
|
})]));
|
|
1628
1615
|
}
|
|
1629
|
-
}), [["__scopeId", "data-v-3d2f3052"]]),
|
|
1616
|
+
}), [["__scopeId", "data-v-3d2f3052"]]), An = {
|
|
1630
1617
|
key: 0,
|
|
1631
1618
|
class: "loading-wrapper"
|
|
1632
|
-
},
|
|
1619
|
+
}, jn = {
|
|
1633
1620
|
key: 0,
|
|
1634
1621
|
class: "overlay"
|
|
1635
|
-
},
|
|
1622
|
+
}, Mn = { class: "content" }, Nn = {
|
|
1636
1623
|
key: 0,
|
|
1637
1624
|
class: "title"
|
|
1638
|
-
},
|
|
1625
|
+
}, Pn = {
|
|
1639
1626
|
key: 0,
|
|
1640
1627
|
class: "loading-inline"
|
|
1641
|
-
},
|
|
1628
|
+
}, Fn = {
|
|
1642
1629
|
key: 0,
|
|
1643
1630
|
class: "title"
|
|
1644
|
-
},
|
|
1631
|
+
}, In = {
|
|
1645
1632
|
key: 0,
|
|
1646
1633
|
class: "title"
|
|
1647
|
-
},
|
|
1634
|
+
}, Ln = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1648
1635
|
__name: "NLoading",
|
|
1649
1636
|
props: {
|
|
1650
1637
|
loading: {
|
|
@@ -1659,31 +1646,31 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1659
1646
|
}
|
|
1660
1647
|
},
|
|
1661
1648
|
setup(t) {
|
|
1662
|
-
return (r, i) => t.overlay ? (b(), s("div",
|
|
1663
|
-
default: O(() => [t.loading ? (b(), s("div",
|
|
1649
|
+
return (r, i) => t.overlay ? (b(), s("div", An, [w(r.$slots, "default", {}, void 0, !0), f(n, { name: "fade" }, {
|
|
1650
|
+
default: O(() => [t.loading ? (b(), s("div", jn, [c("div", Mn, [i[0] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1664
1651
|
cx: "25",
|
|
1665
1652
|
cy: "25",
|
|
1666
1653
|
r: "20",
|
|
1667
1654
|
fill: "none",
|
|
1668
1655
|
"stroke-width": "4"
|
|
1669
|
-
})])], -1), t.title ? (b(), s("p",
|
|
1656
|
+
})])], -1), t.title ? (b(), s("p", Nn, T(t.title), 1)) : o("", !0)])])) : o("", !0)]),
|
|
1670
1657
|
_: 1
|
|
1671
|
-
})])) : (b(), s(e, { key: 1 }, [t.loading ? (b(), s("div",
|
|
1658
|
+
})])) : (b(), s(e, { key: 1 }, [t.loading ? (b(), s("div", Pn, [t.variant === "spinner" ? (b(), s(e, { key: 0 }, [i[1] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1672
1659
|
cx: "25",
|
|
1673
1660
|
cy: "25",
|
|
1674
1661
|
r: "20",
|
|
1675
1662
|
fill: "none",
|
|
1676
1663
|
"stroke-width": "4"
|
|
1677
|
-
})])], -1), t.title ? (b(), s("p",
|
|
1664
|
+
})])], -1), t.title ? (b(), s("p", Fn, T(t.title), 1)) : o("", !0)], 64)) : o("", !0), t.variant === "dots" ? (b(), s(e, { key: 1 }, [i[2] ||= c("div", { class: "dots" }, [
|
|
1678
1665
|
c("span"),
|
|
1679
1666
|
c("span"),
|
|
1680
1667
|
c("span")
|
|
1681
|
-
], -1), t.title ? (b(), s("p",
|
|
1668
|
+
], -1), t.title ? (b(), s("p", In, T(t.title), 1)) : o("", !0)], 64)) : o("", !0)])) : w(r.$slots, "default", { key: 1 }, void 0, !0)], 64));
|
|
1682
1669
|
}
|
|
1683
|
-
}), [["__scopeId", "data-v-b1c571f6"]]),
|
|
1670
|
+
}), [["__scopeId", "data-v-b1c571f6"]]), Rn = { class: "code" }, zn = {
|
|
1684
1671
|
key: 0,
|
|
1685
1672
|
class: "header"
|
|
1686
|
-
},
|
|
1673
|
+
}, Bn = { class: "language-label" }, Vn = {
|
|
1687
1674
|
key: 0,
|
|
1688
1675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1689
1676
|
width: "14",
|
|
@@ -1694,7 +1681,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1694
1681
|
"stroke-width": "2",
|
|
1695
1682
|
"stroke-linecap": "round",
|
|
1696
1683
|
"stroke-linejoin": "round"
|
|
1697
|
-
},
|
|
1684
|
+
}, Hn = {
|
|
1698
1685
|
key: 1,
|
|
1699
1686
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1700
1687
|
width: "14",
|
|
@@ -1705,10 +1692,10 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1705
1692
|
"stroke-width": "2",
|
|
1706
1693
|
"stroke-linecap": "round",
|
|
1707
1694
|
"stroke-linejoin": "round"
|
|
1708
|
-
},
|
|
1695
|
+
}, Un = { class: "code-body" }, Wn = {
|
|
1709
1696
|
key: 0,
|
|
1710
1697
|
class: "gutter"
|
|
1711
|
-
},
|
|
1698
|
+
}, Gn = ["textContent"], Kn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1712
1699
|
__name: "NCode",
|
|
1713
1700
|
props: {
|
|
1714
1701
|
code: {},
|
|
@@ -1727,28 +1714,28 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1727
1714
|
}, 2e3);
|
|
1728
1715
|
} catch {}
|
|
1729
1716
|
}
|
|
1730
|
-
return (i, l) => (b(), s("div",
|
|
1731
|
-
class:
|
|
1717
|
+
return (i, l) => (b(), s("div", Rn, [(t.language, b(), s("div", zn, [c("span", Bn, T(t.language || "code"), 1), c("button", {
|
|
1718
|
+
class: h(["copy-btn", { copied: n.value }]),
|
|
1732
1719
|
onClick: a
|
|
1733
|
-
}, [n.value ? (b(), s("svg",
|
|
1720
|
+
}, [n.value ? (b(), s("svg", Hn, [...l[1] ||= [c("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (b(), s("svg", Vn, [...l[0] ||= [c("rect", {
|
|
1734
1721
|
x: "9",
|
|
1735
1722
|
y: "9",
|
|
1736
1723
|
width: "13",
|
|
1737
1724
|
height: "13",
|
|
1738
1725
|
rx: "2",
|
|
1739
1726
|
ry: "2"
|
|
1740
|
-
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, T(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div",
|
|
1727
|
+
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, T(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div", Un, [t.showLineNumbers ? (b(), s("div", Wn, [(b(!0), s(e, null, C(r.value, (e, t) => (b(), s("span", {
|
|
1741
1728
|
key: t,
|
|
1742
1729
|
class: "line-number"
|
|
1743
1730
|
}, T(t + 1), 1))), 128))])) : o("", !0), c("pre", {
|
|
1744
1731
|
class: "code-content",
|
|
1745
1732
|
textContent: T(t.code.trim())
|
|
1746
|
-
}, null, 8,
|
|
1733
|
+
}, null, 8, Gn)])]));
|
|
1747
1734
|
}
|
|
1748
|
-
}), [["__scopeId", "data-v-6fed5425"]]),
|
|
1735
|
+
}), [["__scopeId", "data-v-6fed5425"]]), qn = {
|
|
1749
1736
|
key: 0,
|
|
1750
1737
|
class: "label"
|
|
1751
|
-
},
|
|
1738
|
+
}, Jn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1752
1739
|
__name: "NSwitch",
|
|
1753
1740
|
props: {
|
|
1754
1741
|
modelValue: {
|
|
@@ -1770,15 +1757,15 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1770
1757
|
r("update:modelValue", e), r("change", e);
|
|
1771
1758
|
};
|
|
1772
1759
|
return (t, n) => (b(), s("div", {
|
|
1773
|
-
class:
|
|
1760
|
+
class: h(["switch", [
|
|
1774
1761
|
`size-${e.size}`,
|
|
1775
1762
|
{ checked: a.value },
|
|
1776
1763
|
{ disabled: e.disabled }
|
|
1777
1764
|
]]),
|
|
1778
1765
|
onClick: l
|
|
1779
|
-
}, [n[0] ||= c("div", { class: "inner" }, [c("div", { class: "handle" })], -1), e.label ? (b(), s("span",
|
|
1766
|
+
}, [n[0] ||= c("div", { class: "inner" }, [c("div", { class: "handle" })], -1), e.label ? (b(), s("span", qn, T(e.label), 1)) : o("", !0)], 2));
|
|
1780
1767
|
}
|
|
1781
|
-
}), [["__scopeId", "data-v-ba9c30d4"]]),
|
|
1768
|
+
}), [["__scopeId", "data-v-ba9c30d4"]]), Yn = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1782
1769
|
__name: "NTag",
|
|
1783
1770
|
props: {
|
|
1784
1771
|
intent: { default: "none" },
|
|
@@ -1798,7 +1785,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1798
1785
|
let n = t, r = (e) => {
|
|
1799
1786
|
e.stopPropagation(), n("close");
|
|
1800
1787
|
};
|
|
1801
|
-
return (t, n) => (b(), s("span", { class:
|
|
1788
|
+
return (t, n) => (b(), s("span", { class: h(["tag", [
|
|
1802
1789
|
`intent-${e.intent}`,
|
|
1803
1790
|
`variant-${e.variant}`,
|
|
1804
1791
|
`size-${e.size}`,
|
|
@@ -1827,49 +1814,49 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1827
1814
|
y2: "18"
|
|
1828
1815
|
})], -1)]])) : o("", !0)], 2));
|
|
1829
1816
|
}
|
|
1830
|
-
}), [["__scopeId", "data-v-77d4f175"]]),
|
|
1817
|
+
}), [["__scopeId", "data-v-77d4f175"]]), Xn = {
|
|
1831
1818
|
key: 0,
|
|
1832
1819
|
class: "label"
|
|
1833
|
-
},
|
|
1820
|
+
}, Zn = {
|
|
1834
1821
|
key: 0,
|
|
1835
1822
|
class: "picker-dropdown"
|
|
1836
|
-
},
|
|
1823
|
+
}, Qn = { class: "picker-header" }, $n = { class: "header-nav" }, er = { class: "header-nav" }, tr = { class: "picker-body" }, nr = { class: "weekday-grid" }, rr = { class: "day-grid" }, ir = {
|
|
1837
1824
|
key: 1,
|
|
1838
1825
|
class: "year-grid"
|
|
1839
|
-
},
|
|
1826
|
+
}, ar = {
|
|
1840
1827
|
key: 0,
|
|
1841
1828
|
class: "time-section"
|
|
1842
|
-
},
|
|
1829
|
+
}, or = { class: "time-sliders" }, sr = {
|
|
1843
1830
|
key: 0,
|
|
1844
1831
|
class: "time-row"
|
|
1845
|
-
},
|
|
1832
|
+
}, cr = ["value"], lr = { class: "time-val" }, ur = {
|
|
1846
1833
|
key: 1,
|
|
1847
1834
|
class: "time-row"
|
|
1848
|
-
},
|
|
1835
|
+
}, dr = ["value"], fr = { class: "time-val" }, pr = { class: "mobile-sheet" }, mr = { class: "picker-header" }, hr = { class: "header-nav" }, gr = { class: "header-nav" }, _r = { class: "picker-body" }, vr = { class: "weekday-grid" }, yr = { class: "day-grid" }, br = {
|
|
1849
1836
|
key: 1,
|
|
1850
1837
|
class: "year-grid"
|
|
1851
|
-
},
|
|
1838
|
+
}, xr = {
|
|
1852
1839
|
key: 0,
|
|
1853
1840
|
class: "time-section"
|
|
1854
|
-
},
|
|
1841
|
+
}, Sr = { class: "time-sliders" }, Cr = {
|
|
1855
1842
|
key: 0,
|
|
1856
1843
|
class: "time-row"
|
|
1857
|
-
},
|
|
1844
|
+
}, wr = ["value"], Tr = { class: "time-val" }, Er = {
|
|
1858
1845
|
key: 1,
|
|
1859
1846
|
class: "time-row"
|
|
1860
|
-
},
|
|
1847
|
+
}, Dr = ["value"], Or = { class: "time-val" }, kr = { class: "range-modal" }, Ar = { class: "range-body" }, jr = {
|
|
1861
1848
|
key: 0,
|
|
1862
1849
|
class: "range-sep"
|
|
1863
|
-
},
|
|
1850
|
+
}, Mr = { class: "range-cal" }, Nr = { class: "picker-header" }, Pr = { class: "header-nav" }, Fr = {
|
|
1864
1851
|
key: 1,
|
|
1865
1852
|
class: "header-nav-placeholder"
|
|
1866
|
-
},
|
|
1853
|
+
}, Ir = { class: "header-title no-click" }, Lr = { class: "header-nav" }, Rr = {
|
|
1867
1854
|
key: 1,
|
|
1868
1855
|
class: "header-nav-placeholder"
|
|
1869
|
-
},
|
|
1856
|
+
}, zr = { class: "weekday-grid" }, Br = { class: "day-grid range-day-grid" }, Vr = ["onClick", "onMouseenter"], Hr = { class: "range-footer" }, Ur = { class: "range-display" }, Wr = { class: "mobile-sheet" }, Gr = {
|
|
1870
1857
|
class: "picker-header",
|
|
1871
1858
|
style: { "margin-top": "8px" }
|
|
1872
|
-
},
|
|
1859
|
+
}, Kr = { class: "header-nav" }, qr = { class: "header-title no-click" }, Jr = { class: "header-nav" }, Yr = { class: "weekday-grid" }, Xr = { class: "day-grid range-day-grid" }, Zr = ["onClick"], Qr = { class: "range-footer" }, $r = { class: "range-display" }, ei = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
1873
1860
|
__name: "NDatePicker",
|
|
1874
1861
|
props: {
|
|
1875
1862
|
modelValue: { default: "" },
|
|
@@ -1919,13 +1906,13 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1919
1906
|
e === "month" ? a[e] = n - 1 : a[e] = n;
|
|
1920
1907
|
}), a;
|
|
1921
1908
|
}
|
|
1922
|
-
let m = i(() => t.format.includes("HH")),
|
|
1923
|
-
function
|
|
1924
|
-
|
|
1925
|
-
|
|
1909
|
+
let m = i(() => t.format.includes("HH")), g = i(() => t.format.includes("mm")), y = i(() => m.value || g.value), x = S(!1), w = S(null), E = S(typeof window < "u" && window.innerWidth < 768), D = null;
|
|
1910
|
+
function ee() {
|
|
1911
|
+
D && clearTimeout(D), D = setTimeout(() => {
|
|
1912
|
+
E.value = window.innerWidth < 768;
|
|
1926
1913
|
}, 150);
|
|
1927
1914
|
}
|
|
1928
|
-
let
|
|
1915
|
+
let te = [
|
|
1929
1916
|
"一月",
|
|
1930
1917
|
"二月",
|
|
1931
1918
|
"三月",
|
|
@@ -1938,7 +1925,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1938
1925
|
"十月",
|
|
1939
1926
|
"十一月",
|
|
1940
1927
|
"十二月"
|
|
1941
|
-
],
|
|
1928
|
+
], re = [
|
|
1942
1929
|
"日",
|
|
1943
1930
|
"一",
|
|
1944
1931
|
"二",
|
|
@@ -1946,7 +1933,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1946
1933
|
"四",
|
|
1947
1934
|
"五",
|
|
1948
1935
|
"六"
|
|
1949
|
-
], ie = /* @__PURE__ */ new Date(), ae = ie.getFullYear(),
|
|
1936
|
+
], ie = /* @__PURE__ */ new Date(), ae = ie.getFullYear(), A = ie.getMonth(), oe = ie.getDate();
|
|
1950
1937
|
function se(e, t) {
|
|
1951
1938
|
let n = new Date(e, t, 1).getDay(), r = new Date(e, t + 1, 0).getDate(), i = new Date(e, t, 0).getDate(), a = [];
|
|
1952
1939
|
for (let r = n - 1; r >= 0; r--) {
|
|
@@ -1984,9 +1971,9 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1984
1971
|
for (let t = 0; t < 12; t++) e.push(de.value + t);
|
|
1985
1972
|
return e;
|
|
1986
1973
|
});
|
|
1987
|
-
|
|
1974
|
+
ne(R, (e) => {
|
|
1988
1975
|
de.value = Math.floor(e / 12) * 12;
|
|
1989
|
-
}, { immediate: !0 }),
|
|
1976
|
+
}, { immediate: !0 }), ne(() => t.modelValue, (e) => {
|
|
1990
1977
|
if (!e) return;
|
|
1991
1978
|
let t = p(String(e));
|
|
1992
1979
|
t && (P.value = new Date(t.year, t.month, 1));
|
|
@@ -1998,7 +1985,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
1998
1985
|
}), me = i(() => t.range ? t.start && t.end ? `${t.start} → ${t.end}` : t.start ? `${t.start} → ...` : "" : pe.value);
|
|
1999
1986
|
function he() {
|
|
2000
1987
|
let e = p(String(t.modelValue));
|
|
2001
|
-
e ? (P.value = new Date(e.year, e.month, 1), I.value = e.hour, L.value = e.min, F.value =
|
|
1988
|
+
e ? (P.value = new Date(e.year, e.month, 1), I.value = e.hour, L.value = e.min, F.value = y.value ? {
|
|
2002
1989
|
year: e.year,
|
|
2003
1990
|
month: e.month,
|
|
2004
1991
|
day: e.day,
|
|
@@ -2010,59 +1997,59 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2010
1997
|
let n = p(String(t.modelValue));
|
|
2011
1998
|
return n ? n.year === e.year && n.month === e.month && n.day === e.day : !1;
|
|
2012
1999
|
}
|
|
2013
|
-
function V(e) {
|
|
2014
|
-
return ae === e.year && oe === e.month && A === e.day;
|
|
2015
|
-
}
|
|
2016
2000
|
function _e(e) {
|
|
2017
|
-
return
|
|
2001
|
+
return ae === e.year && A === e.month && oe === e.day;
|
|
2018
2002
|
}
|
|
2019
2003
|
function ve(e) {
|
|
2004
|
+
return y.value ? F.value !== null && F.value.year === e.year && F.value.month === e.month && F.value.day === e.day : ge(e);
|
|
2005
|
+
}
|
|
2006
|
+
function ye(e) {
|
|
2020
2007
|
let t = u(e.year, e.month, e.day, I.value, L.value);
|
|
2021
2008
|
l("update:modelValue", t), l("change", t);
|
|
2022
2009
|
}
|
|
2023
|
-
function
|
|
2024
|
-
if (
|
|
2010
|
+
function be(e) {
|
|
2011
|
+
if (y.value) F.value = { ...e }, P.value = new Date(e.year, e.month, 1), ye(e);
|
|
2025
2012
|
else {
|
|
2026
2013
|
let t = u(e.year, e.month, e.day, 0, 0);
|
|
2027
2014
|
l("update:modelValue", t), l("change", t), Z();
|
|
2028
2015
|
}
|
|
2029
2016
|
}
|
|
2030
|
-
function
|
|
2017
|
+
function xe(e) {
|
|
2031
2018
|
P.value = new Date(e, z.value, 1), N.value = "date";
|
|
2032
2019
|
}
|
|
2033
|
-
function
|
|
2020
|
+
function Se(e) {
|
|
2034
2021
|
P.value = new Date(R.value, z.value + e, 1);
|
|
2035
2022
|
}
|
|
2036
|
-
function
|
|
2023
|
+
function Ce(e) {
|
|
2037
2024
|
N.value === "year" ? de.value += e * 12 : P.value = new Date(R.value + e, z.value, 1);
|
|
2038
2025
|
}
|
|
2039
|
-
function
|
|
2040
|
-
e === "H" ? I.value = Math.max(0, Math.min(23, I.value + t)) : L.value = Math.max(0, Math.min(59, L.value + t)), F.value &&
|
|
2026
|
+
function we(e, t) {
|
|
2027
|
+
e === "H" ? I.value = Math.max(0, Math.min(23, I.value + t)) : L.value = Math.max(0, Math.min(59, L.value + t)), F.value && ye(F.value);
|
|
2041
2028
|
}
|
|
2042
|
-
function
|
|
2043
|
-
|
|
2044
|
-
ue = setInterval(() =>
|
|
2029
|
+
function V(e, t) {
|
|
2030
|
+
we(e, t), le = setTimeout(() => {
|
|
2031
|
+
ue = setInterval(() => we(e, t), 100);
|
|
2045
2032
|
}, 300);
|
|
2046
2033
|
}
|
|
2047
|
-
function
|
|
2034
|
+
function H() {
|
|
2048
2035
|
le &&= (clearTimeout(le), null), ue &&= (clearInterval(ue), null);
|
|
2049
2036
|
}
|
|
2050
|
-
function
|
|
2037
|
+
function Te(e, t) {
|
|
2051
2038
|
let n = parseInt(e.target.value);
|
|
2052
|
-
t === "H" ? I.value = n : L.value = n, F.value &&
|
|
2039
|
+
t === "H" ? I.value = n : L.value = n, F.value && ye(F.value);
|
|
2053
2040
|
}
|
|
2054
|
-
let
|
|
2055
|
-
year:
|
|
2056
|
-
month:
|
|
2057
|
-
days:
|
|
2041
|
+
let U = S(ae), W = S(A), G = S(null), K = S(null), q = S(null), J = S(null), Ee = i(() => !!K.value && !!q.value), Y = i(() => W.value === 11 ? U.value + 1 : U.value), De = i(() => W.value === 11 ? 0 : W.value + 1), Oe = i(() => se(U.value, W.value)), ke = i(() => se(Y.value, De.value)), Ae = i(() => [{
|
|
2042
|
+
year: U.value,
|
|
2043
|
+
month: W.value,
|
|
2044
|
+
days: Oe.value,
|
|
2058
2045
|
isLeft: !0
|
|
2059
2046
|
}, {
|
|
2060
|
-
year:
|
|
2061
|
-
month:
|
|
2062
|
-
days:
|
|
2047
|
+
year: Y.value,
|
|
2048
|
+
month: De.value,
|
|
2049
|
+
days: ke.value,
|
|
2063
2050
|
isLeft: !1
|
|
2064
2051
|
}]);
|
|
2065
|
-
function
|
|
2052
|
+
function je(e) {
|
|
2066
2053
|
let t = p(e);
|
|
2067
2054
|
return t ? {
|
|
2068
2055
|
year: t.year,
|
|
@@ -2071,49 +2058,49 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2071
2058
|
isCurrentMonth: !0
|
|
2072
2059
|
} : null;
|
|
2073
2060
|
}
|
|
2074
|
-
let
|
|
2061
|
+
let Me = i(() => G.value && J.value ? ce(G.value, J.value) <= 0 ? G.value : J.value : K.value ?? je(t.start)), Ne = i(() => G.value && J.value ? ce(G.value, J.value) <= 0 ? J.value : G.value : q.value ?? je(t.end)), Pe = i(() => {
|
|
2062
|
+
if (G.value) {
|
|
2063
|
+
let e = G.value;
|
|
2064
|
+
return `${e.year}-${M(e.month + 1)}-${M(e.day)}`;
|
|
2065
|
+
}
|
|
2075
2066
|
if (K.value) {
|
|
2076
2067
|
let e = K.value;
|
|
2077
2068
|
return `${e.year}-${M(e.month + 1)}-${M(e.day)}`;
|
|
2078
2069
|
}
|
|
2070
|
+
return t.start;
|
|
2071
|
+
}), X = i(() => {
|
|
2072
|
+
if (G.value) return "";
|
|
2079
2073
|
if (q.value) {
|
|
2080
2074
|
let e = q.value;
|
|
2081
2075
|
return `${e.year}-${M(e.month + 1)}-${M(e.day)}`;
|
|
2082
2076
|
}
|
|
2083
|
-
return t.start;
|
|
2084
|
-
}), Pe = i(() => {
|
|
2085
|
-
if (K.value) return "";
|
|
2086
|
-
if (J.value) {
|
|
2087
|
-
let e = J.value;
|
|
2088
|
-
return `${e.year}-${M(e.month + 1)}-${M(e.day)}`;
|
|
2089
|
-
}
|
|
2090
2077
|
return t.end;
|
|
2091
2078
|
});
|
|
2092
2079
|
function Fe() {
|
|
2093
2080
|
let e = p(t.start) ?? {
|
|
2094
2081
|
year: ae,
|
|
2095
|
-
month:
|
|
2082
|
+
month: A,
|
|
2096
2083
|
day: 1,
|
|
2097
2084
|
hour: 0,
|
|
2098
2085
|
min: 0
|
|
2099
2086
|
};
|
|
2100
|
-
|
|
2087
|
+
U.value = e.year, W.value = e.month, K.value = je(t.start), q.value = je(t.end), G.value = null, J.value = null;
|
|
2101
2088
|
}
|
|
2102
2089
|
function Ie() {
|
|
2103
|
-
|
|
2090
|
+
W.value === 0 ? (U.value--, W.value = 11) : W.value--;
|
|
2104
2091
|
}
|
|
2105
2092
|
function Le() {
|
|
2106
|
-
|
|
2093
|
+
W.value === 11 ? (U.value++, W.value = 0) : W.value++;
|
|
2107
2094
|
}
|
|
2108
2095
|
function Re(e) {
|
|
2109
|
-
if (!
|
|
2096
|
+
if (!G.value) G.value = { ...e }, K.value = null, q.value = null;
|
|
2110
2097
|
else {
|
|
2111
|
-
let t =
|
|
2112
|
-
|
|
2098
|
+
let t = G.value, [n, r] = ce(t, e) <= 0 ? [t, e] : [e, t];
|
|
2099
|
+
K.value = n, q.value = r, G.value = null, J.value = null;
|
|
2113
2100
|
}
|
|
2114
2101
|
}
|
|
2115
2102
|
function ze(e) {
|
|
2116
|
-
let t = e.year === ae && e.month ===
|
|
2103
|
+
let t = e.year === ae && e.month === A && e.day === oe, n = G.value && e.year === G.value.year && e.month === G.value.month && e.day === G.value.day, r = Me.value, i = Ne.value, a = r && e.year === r.year && e.month === r.month && e.day === r.day, o = i && e.year === i.year && e.month === i.month && e.day === i.day, s = r && i && ce(e, r) > 0 && ce(e, i) < 0;
|
|
2117
2104
|
return {
|
|
2118
2105
|
"is-other-month": !e.isCurrentMonth,
|
|
2119
2106
|
"is-today": t && !a && !o,
|
|
@@ -2124,49 +2111,49 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2124
2111
|
};
|
|
2125
2112
|
}
|
|
2126
2113
|
function Be() {
|
|
2127
|
-
if (!
|
|
2128
|
-
let e =
|
|
2114
|
+
if (!K.value || !q.value) return;
|
|
2115
|
+
let e = K.value, t = q.value;
|
|
2129
2116
|
l("update:start", `${e.year}-${M(e.month + 1)}-${M(e.day)}`), l("update:end", `${t.year}-${M(t.month + 1)}-${M(t.day)}`), Z();
|
|
2130
2117
|
}
|
|
2131
2118
|
function Ve() {
|
|
2132
|
-
t.disabled || (
|
|
2119
|
+
t.disabled || (x.value || (t.range ? Fe() : he()), x.value = !x.value);
|
|
2133
2120
|
}
|
|
2134
2121
|
function Z() {
|
|
2135
|
-
|
|
2122
|
+
x.value = !1, G.value = null, J.value = null;
|
|
2136
2123
|
}
|
|
2137
2124
|
function He() {
|
|
2138
2125
|
N.value = N.value === "date" ? "year" : "date";
|
|
2139
2126
|
}
|
|
2140
2127
|
let Ue = (e) => {
|
|
2141
2128
|
let t = e.target;
|
|
2142
|
-
|
|
2129
|
+
w.value?.contains(t) || E.value || Z();
|
|
2143
2130
|
};
|
|
2144
2131
|
v(() => {
|
|
2145
|
-
document.addEventListener("mousedown", Ue), window.addEventListener("resize",
|
|
2146
|
-
}),
|
|
2147
|
-
document.removeEventListener("mousedown", Ue), window.removeEventListener("resize",
|
|
2132
|
+
document.addEventListener("mousedown", Ue), window.addEventListener("resize", ee);
|
|
2133
|
+
}), _(() => {
|
|
2134
|
+
document.removeEventListener("mousedown", Ue), window.removeEventListener("resize", ee), D && clearTimeout(D), H();
|
|
2148
2135
|
});
|
|
2149
|
-
let
|
|
2136
|
+
let Q = (e) => {
|
|
2150
2137
|
e.stopPropagation(), l("update:modelValue", ""), l("change", ""), l("clear");
|
|
2151
2138
|
};
|
|
2152
2139
|
return (r, i) => (b(), s("div", {
|
|
2153
2140
|
ref_key: "containerRef",
|
|
2154
|
-
ref:
|
|
2141
|
+
ref: w,
|
|
2155
2142
|
class: "datepicker"
|
|
2156
2143
|
}, [
|
|
2157
|
-
t.title ? (b(), s("label",
|
|
2158
|
-
c("div", { class:
|
|
2159
|
-
open:
|
|
2144
|
+
t.title ? (b(), s("label", Xn, T(t.title), 1)) : o("", !0),
|
|
2145
|
+
c("div", { class: h(["date-picker", {
|
|
2146
|
+
open: x.value && !t.range && !E.value,
|
|
2160
2147
|
disabled: t.disabled
|
|
2161
2148
|
}]) }, [c("div", {
|
|
2162
2149
|
class: "picker-trigger",
|
|
2163
2150
|
onClick: Ve
|
|
2164
|
-
}, [c("span", { class:
|
|
2151
|
+
}, [c("span", { class: h(["text", { placeholder: !me.value }]) }, T(me.value || t.placeholder), 3), t.clearable && pe.value && !t.range ? (b(), a(j, {
|
|
2165
2152
|
key: 0,
|
|
2166
2153
|
variant: "ghost",
|
|
2167
2154
|
square: "",
|
|
2168
2155
|
class: "clear",
|
|
2169
|
-
onClick:
|
|
2156
|
+
onClick: Q
|
|
2170
2157
|
}, {
|
|
2171
2158
|
default: O(() => [...i[20] ||= [c("svg", {
|
|
2172
2159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2181,12 +2168,12 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2181
2168
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]]),
|
|
2182
2169
|
_: 1
|
|
2183
2170
|
})) : o("", !0)]), f(n, { name: "fade" }, {
|
|
2184
|
-
default: O(() => [
|
|
2185
|
-
c("div",
|
|
2186
|
-
c("div",
|
|
2171
|
+
default: O(() => [x.value && !t.range && !E.value ? (b(), s("div", Zn, [
|
|
2172
|
+
c("div", Qn, [
|
|
2173
|
+
c("div", $n, [f(j, {
|
|
2187
2174
|
variant: "ghost",
|
|
2188
2175
|
square: "",
|
|
2189
|
-
onClick: i[0] ||= (e) =>
|
|
2176
|
+
onClick: i[0] ||= (e) => Ce(-1)
|
|
2190
2177
|
}, {
|
|
2191
2178
|
default: O(() => [...i[21] ||= [c("svg", {
|
|
2192
2179
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2204,7 +2191,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2204
2191
|
key: 0,
|
|
2205
2192
|
variant: "ghost",
|
|
2206
2193
|
square: "",
|
|
2207
|
-
onClick: i[1] ||= (e) =>
|
|
2194
|
+
onClick: i[1] ||= (e) => Se(-1)
|
|
2208
2195
|
}, {
|
|
2209
2196
|
default: O(() => [...i[22] ||= [c("svg", {
|
|
2210
2197
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2222,12 +2209,12 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2222
2209
|
c("div", {
|
|
2223
2210
|
class: "header-title",
|
|
2224
2211
|
onClick: He
|
|
2225
|
-
}, [N.value === "date" ? (b(), s(e, { key: 0 }, [d(T(
|
|
2226
|
-
c("div",
|
|
2212
|
+
}, [N.value === "date" ? (b(), s(e, { key: 0 }, [d(T(te[z.value]) + " " + T(R.value), 1)], 64)) : (b(), s(e, { key: 1 }, [d(T(B.value[0]) + " - " + T(B.value[B.value.length - 1]), 1)], 64))]),
|
|
2213
|
+
c("div", er, [N.value === "date" ? (b(), a(j, {
|
|
2227
2214
|
key: 0,
|
|
2228
2215
|
variant: "ghost",
|
|
2229
2216
|
square: "",
|
|
2230
|
-
onClick: i[2] ||= (e) =>
|
|
2217
|
+
onClick: i[2] ||= (e) => Se(1)
|
|
2231
2218
|
}, {
|
|
2232
2219
|
default: O(() => [...i[23] ||= [c("svg", {
|
|
2233
2220
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2244,7 +2231,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2244
2231
|
})) : o("", !0), f(j, {
|
|
2245
2232
|
variant: "ghost",
|
|
2246
2233
|
square: "",
|
|
2247
|
-
onClick: i[3] ||= (e) =>
|
|
2234
|
+
onClick: i[3] ||= (e) => Ce(1)
|
|
2248
2235
|
}, {
|
|
2249
2236
|
default: O(() => [...i[24] ||= [c("svg", {
|
|
2250
2237
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2260,16 +2247,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2260
2247
|
_: 1
|
|
2261
2248
|
})])
|
|
2262
2249
|
]),
|
|
2263
|
-
c("div",
|
|
2250
|
+
c("div", tr, [N.value === "date" ? (b(), s(e, { key: 0 }, [c("div", nr, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2264
2251
|
key: e,
|
|
2265
2252
|
class: "weekday"
|
|
2266
|
-
}, T(e), 1)), 64))]), c("div",
|
|
2253
|
+
}, T(e), 1)), 64))]), c("div", rr, [(b(!0), s(e, null, C(fe.value, (e, t) => (b(), a(j, {
|
|
2267
2254
|
key: t,
|
|
2268
|
-
variant:
|
|
2269
|
-
intent:
|
|
2270
|
-
class:
|
|
2255
|
+
variant: ve(e) ? "solid" : _e(e) ? "mute" : "ghost",
|
|
2256
|
+
intent: ve(e) || _e(e) ? "primary" : "none",
|
|
2257
|
+
class: h(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
|
|
2271
2258
|
padding: "0",
|
|
2272
|
-
onClick: (t) =>
|
|
2259
|
+
onClick: (t) => be(e)
|
|
2273
2260
|
}, {
|
|
2274
2261
|
default: O(() => [d(T(e.day), 1)]),
|
|
2275
2262
|
_: 2
|
|
@@ -2278,12 +2265,12 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2278
2265
|
"intent",
|
|
2279
2266
|
"class",
|
|
2280
2267
|
"onClick"
|
|
2281
|
-
]))), 128))])], 64)) : (b(), s("div",
|
|
2268
|
+
]))), 128))])], 64)) : (b(), s("div", ir, [(b(!0), s(e, null, C(B.value, (e) => (b(), a(j, {
|
|
2282
2269
|
key: e,
|
|
2283
2270
|
variant: e === R.value ? "solid" : "ghost",
|
|
2284
2271
|
intent: e === R.value ? "primary" : "none",
|
|
2285
2272
|
class: "year-cell",
|
|
2286
|
-
onClick: (t) =>
|
|
2273
|
+
onClick: (t) => xe(e)
|
|
2287
2274
|
}, {
|
|
2288
2275
|
default: O(() => [d(T(e), 1)]),
|
|
2289
2276
|
_: 2
|
|
@@ -2292,16 +2279,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2292
2279
|
"intent",
|
|
2293
2280
|
"onClick"
|
|
2294
2281
|
]))), 128))]))]),
|
|
2295
|
-
|
|
2282
|
+
y.value && N.value === "date" ? (b(), s("div", ar, [c("div", or, [m.value ? (b(), s("div", sr, [
|
|
2296
2283
|
i[27] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2297
2284
|
f(j, {
|
|
2298
2285
|
variant: "ghost",
|
|
2299
2286
|
square: "",
|
|
2300
2287
|
size: "sm",
|
|
2301
2288
|
class: "time-step",
|
|
2302
|
-
onMousedown: i[4] ||= k((e) =>
|
|
2303
|
-
onMouseup:
|
|
2304
|
-
onMouseleave:
|
|
2289
|
+
onMousedown: i[4] ||= k((e) => V("H", -1), ["prevent"]),
|
|
2290
|
+
onMouseup: H,
|
|
2291
|
+
onMouseleave: H
|
|
2305
2292
|
}, {
|
|
2306
2293
|
default: O(() => [...i[25] ||= [c("svg", {
|
|
2307
2294
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2322,16 +2309,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2322
2309
|
min: "0",
|
|
2323
2310
|
max: "23",
|
|
2324
2311
|
value: I.value,
|
|
2325
|
-
onInput: i[5] ||= (e) =>
|
|
2326
|
-
}, null, 40,
|
|
2312
|
+
onInput: i[5] ||= (e) => Te(e, "H")
|
|
2313
|
+
}, null, 40, cr),
|
|
2327
2314
|
f(j, {
|
|
2328
2315
|
variant: "ghost",
|
|
2329
2316
|
square: "",
|
|
2330
2317
|
size: "sm",
|
|
2331
2318
|
class: "time-step",
|
|
2332
|
-
onMousedown: i[6] ||= k((e) =>
|
|
2333
|
-
onMouseup:
|
|
2334
|
-
onMouseleave:
|
|
2319
|
+
onMousedown: i[6] ||= k((e) => V("H", 1), ["prevent"]),
|
|
2320
|
+
onMouseup: H,
|
|
2321
|
+
onMouseleave: H
|
|
2335
2322
|
}, {
|
|
2336
2323
|
default: O(() => [...i[26] ||= [c("svg", {
|
|
2337
2324
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2346,17 +2333,17 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2346
2333
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2347
2334
|
_: 1
|
|
2348
2335
|
}),
|
|
2349
|
-
c("span",
|
|
2350
|
-
])) : o("", !0),
|
|
2336
|
+
c("span", lr, T(M(I.value)), 1)
|
|
2337
|
+
])) : o("", !0), g.value ? (b(), s("div", ur, [
|
|
2351
2338
|
i[30] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2352
2339
|
f(j, {
|
|
2353
2340
|
variant: "ghost",
|
|
2354
2341
|
square: "",
|
|
2355
2342
|
size: "sm",
|
|
2356
2343
|
class: "time-step",
|
|
2357
|
-
onMousedown: i[7] ||= k((e) =>
|
|
2358
|
-
onMouseup:
|
|
2359
|
-
onMouseleave:
|
|
2344
|
+
onMousedown: i[7] ||= k((e) => V("m", -1), ["prevent"]),
|
|
2345
|
+
onMouseup: H,
|
|
2346
|
+
onMouseleave: H
|
|
2360
2347
|
}, {
|
|
2361
2348
|
default: O(() => [...i[28] ||= [c("svg", {
|
|
2362
2349
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2377,16 +2364,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2377
2364
|
min: "0",
|
|
2378
2365
|
max: "59",
|
|
2379
2366
|
value: L.value,
|
|
2380
|
-
onInput: i[8] ||= (e) =>
|
|
2381
|
-
}, null, 40,
|
|
2367
|
+
onInput: i[8] ||= (e) => Te(e, "m")
|
|
2368
|
+
}, null, 40, dr),
|
|
2382
2369
|
f(j, {
|
|
2383
2370
|
variant: "ghost",
|
|
2384
2371
|
square: "",
|
|
2385
2372
|
size: "sm",
|
|
2386
2373
|
class: "time-step",
|
|
2387
|
-
onMousedown: i[9] ||= k((e) =>
|
|
2388
|
-
onMouseup:
|
|
2389
|
-
onMouseleave:
|
|
2374
|
+
onMousedown: i[9] ||= k((e) => V("m", 1), ["prevent"]),
|
|
2375
|
+
onMouseup: H,
|
|
2376
|
+
onMouseleave: H
|
|
2390
2377
|
}, {
|
|
2391
2378
|
default: O(() => [...i[29] ||= [c("svg", {
|
|
2392
2379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2401,23 +2388,23 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2401
2388
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2402
2389
|
_: 1
|
|
2403
2390
|
}),
|
|
2404
|
-
c("span",
|
|
2391
|
+
c("span", fr, T(M(L.value)), 1)
|
|
2405
2392
|
])) : o("", !0)])])) : o("", !0)
|
|
2406
2393
|
])) : o("", !0)]),
|
|
2407
2394
|
_: 1
|
|
2408
2395
|
})], 2),
|
|
2409
2396
|
f(n, { name: "sheet-slide" }, {
|
|
2410
|
-
default: O(() => [
|
|
2397
|
+
default: O(() => [x.value && !t.range && E.value ? (b(), s("div", {
|
|
2411
2398
|
key: 0,
|
|
2412
2399
|
class: "mobile-overlay",
|
|
2413
2400
|
onClick: k(Z, ["self"])
|
|
2414
|
-
}, [c("div",
|
|
2401
|
+
}, [c("div", pr, [
|
|
2415
2402
|
i[41] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2416
|
-
c("div",
|
|
2417
|
-
c("div",
|
|
2403
|
+
c("div", mr, [
|
|
2404
|
+
c("div", hr, [f(j, {
|
|
2418
2405
|
variant: "ghost",
|
|
2419
2406
|
square: "",
|
|
2420
|
-
onClick: i[10] ||= (e) =>
|
|
2407
|
+
onClick: i[10] ||= (e) => Ce(-1)
|
|
2421
2408
|
}, {
|
|
2422
2409
|
default: O(() => [...i[31] ||= [c("svg", {
|
|
2423
2410
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2435,7 +2422,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2435
2422
|
key: 0,
|
|
2436
2423
|
variant: "ghost",
|
|
2437
2424
|
square: "",
|
|
2438
|
-
onClick: i[11] ||= (e) =>
|
|
2425
|
+
onClick: i[11] ||= (e) => Se(-1)
|
|
2439
2426
|
}, {
|
|
2440
2427
|
default: O(() => [...i[32] ||= [c("svg", {
|
|
2441
2428
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2453,12 +2440,12 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2453
2440
|
c("div", {
|
|
2454
2441
|
class: "header-title",
|
|
2455
2442
|
onClick: He
|
|
2456
|
-
}, [N.value === "date" ? (b(), s(e, { key: 0 }, [d(T(
|
|
2457
|
-
c("div",
|
|
2443
|
+
}, [N.value === "date" ? (b(), s(e, { key: 0 }, [d(T(te[z.value]) + " " + T(R.value), 1)], 64)) : (b(), s(e, { key: 1 }, [d(T(B.value[0]) + " - " + T(B.value[B.value.length - 1]), 1)], 64))]),
|
|
2444
|
+
c("div", gr, [N.value === "date" ? (b(), a(j, {
|
|
2458
2445
|
key: 0,
|
|
2459
2446
|
variant: "ghost",
|
|
2460
2447
|
square: "",
|
|
2461
|
-
onClick: i[12] ||= (e) =>
|
|
2448
|
+
onClick: i[12] ||= (e) => Se(1)
|
|
2462
2449
|
}, {
|
|
2463
2450
|
default: O(() => [...i[33] ||= [c("svg", {
|
|
2464
2451
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2475,7 +2462,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2475
2462
|
})) : o("", !0), f(j, {
|
|
2476
2463
|
variant: "ghost",
|
|
2477
2464
|
square: "",
|
|
2478
|
-
onClick: i[13] ||= (e) =>
|
|
2465
|
+
onClick: i[13] ||= (e) => Ce(1)
|
|
2479
2466
|
}, {
|
|
2480
2467
|
default: O(() => [...i[34] ||= [c("svg", {
|
|
2481
2468
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2491,16 +2478,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2491
2478
|
_: 1
|
|
2492
2479
|
})])
|
|
2493
2480
|
]),
|
|
2494
|
-
c("div",
|
|
2481
|
+
c("div", _r, [N.value === "date" ? (b(), s(e, { key: 0 }, [c("div", vr, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2495
2482
|
key: e,
|
|
2496
2483
|
class: "weekday"
|
|
2497
|
-
}, T(e), 1)), 64))]), c("div",
|
|
2484
|
+
}, T(e), 1)), 64))]), c("div", yr, [(b(!0), s(e, null, C(fe.value, (e, t) => (b(), a(j, {
|
|
2498
2485
|
key: t,
|
|
2499
|
-
variant:
|
|
2500
|
-
intent:
|
|
2501
|
-
class:
|
|
2486
|
+
variant: ve(e) ? "solid" : _e(e) ? "mute" : "ghost",
|
|
2487
|
+
intent: ve(e) || _e(e) ? "primary" : "none",
|
|
2488
|
+
class: h(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
|
|
2502
2489
|
padding: "0",
|
|
2503
|
-
onClick: (t) =>
|
|
2490
|
+
onClick: (t) => be(e)
|
|
2504
2491
|
}, {
|
|
2505
2492
|
default: O(() => [d(T(e.day), 1)]),
|
|
2506
2493
|
_: 2
|
|
@@ -2509,12 +2496,12 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2509
2496
|
"intent",
|
|
2510
2497
|
"class",
|
|
2511
2498
|
"onClick"
|
|
2512
|
-
]))), 128))])], 64)) : (b(), s("div",
|
|
2499
|
+
]))), 128))])], 64)) : (b(), s("div", br, [(b(!0), s(e, null, C(B.value, (e) => (b(), a(j, {
|
|
2513
2500
|
key: e,
|
|
2514
2501
|
variant: e === R.value ? "solid" : "ghost",
|
|
2515
2502
|
intent: e === R.value ? "primary" : "none",
|
|
2516
2503
|
class: "year-cell",
|
|
2517
|
-
onClick: (t) =>
|
|
2504
|
+
onClick: (t) => xe(e)
|
|
2518
2505
|
}, {
|
|
2519
2506
|
default: O(() => [d(T(e), 1)]),
|
|
2520
2507
|
_: 2
|
|
@@ -2523,16 +2510,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2523
2510
|
"intent",
|
|
2524
2511
|
"onClick"
|
|
2525
2512
|
]))), 128))]))]),
|
|
2526
|
-
|
|
2513
|
+
y.value && N.value === "date" ? (b(), s("div", xr, [c("div", Sr, [m.value ? (b(), s("div", Cr, [
|
|
2527
2514
|
i[37] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2528
2515
|
f(j, {
|
|
2529
2516
|
variant: "ghost",
|
|
2530
2517
|
square: "",
|
|
2531
2518
|
size: "sm",
|
|
2532
2519
|
class: "time-step",
|
|
2533
|
-
onMousedown: i[14] ||= k((e) =>
|
|
2534
|
-
onMouseup:
|
|
2535
|
-
onMouseleave:
|
|
2520
|
+
onMousedown: i[14] ||= k((e) => V("H", -1), ["prevent"]),
|
|
2521
|
+
onMouseup: H,
|
|
2522
|
+
onMouseleave: H
|
|
2536
2523
|
}, {
|
|
2537
2524
|
default: O(() => [...i[35] ||= [c("svg", {
|
|
2538
2525
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2553,16 +2540,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2553
2540
|
min: "0",
|
|
2554
2541
|
max: "23",
|
|
2555
2542
|
value: I.value,
|
|
2556
|
-
onInput: i[15] ||= (e) =>
|
|
2557
|
-
}, null, 40,
|
|
2543
|
+
onInput: i[15] ||= (e) => Te(e, "H")
|
|
2544
|
+
}, null, 40, wr),
|
|
2558
2545
|
f(j, {
|
|
2559
2546
|
variant: "ghost",
|
|
2560
2547
|
square: "",
|
|
2561
2548
|
size: "sm",
|
|
2562
2549
|
class: "time-step",
|
|
2563
|
-
onMousedown: i[16] ||= k((e) =>
|
|
2564
|
-
onMouseup:
|
|
2565
|
-
onMouseleave:
|
|
2550
|
+
onMousedown: i[16] ||= k((e) => V("H", 1), ["prevent"]),
|
|
2551
|
+
onMouseup: H,
|
|
2552
|
+
onMouseleave: H
|
|
2566
2553
|
}, {
|
|
2567
2554
|
default: O(() => [...i[36] ||= [c("svg", {
|
|
2568
2555
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2577,17 +2564,17 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2577
2564
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2578
2565
|
_: 1
|
|
2579
2566
|
}),
|
|
2580
|
-
c("span",
|
|
2581
|
-
])) : o("", !0),
|
|
2567
|
+
c("span", Tr, T(M(I.value)), 1)
|
|
2568
|
+
])) : o("", !0), g.value ? (b(), s("div", Er, [
|
|
2582
2569
|
i[40] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2583
2570
|
f(j, {
|
|
2584
2571
|
variant: "ghost",
|
|
2585
2572
|
square: "",
|
|
2586
2573
|
size: "sm",
|
|
2587
2574
|
class: "time-step",
|
|
2588
|
-
onMousedown: i[17] ||= k((e) =>
|
|
2589
|
-
onMouseup:
|
|
2590
|
-
onMouseleave:
|
|
2575
|
+
onMousedown: i[17] ||= k((e) => V("m", -1), ["prevent"]),
|
|
2576
|
+
onMouseup: H,
|
|
2577
|
+
onMouseleave: H
|
|
2591
2578
|
}, {
|
|
2592
2579
|
default: O(() => [...i[38] ||= [c("svg", {
|
|
2593
2580
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2608,16 +2595,16 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2608
2595
|
min: "0",
|
|
2609
2596
|
max: "59",
|
|
2610
2597
|
value: L.value,
|
|
2611
|
-
onInput: i[18] ||= (e) =>
|
|
2612
|
-
}, null, 40,
|
|
2598
|
+
onInput: i[18] ||= (e) => Te(e, "m")
|
|
2599
|
+
}, null, 40, Dr),
|
|
2613
2600
|
f(j, {
|
|
2614
2601
|
variant: "ghost",
|
|
2615
2602
|
square: "",
|
|
2616
2603
|
size: "sm",
|
|
2617
2604
|
class: "time-step",
|
|
2618
|
-
onMousedown: i[19] ||= k((e) =>
|
|
2619
|
-
onMouseup:
|
|
2620
|
-
onMouseleave:
|
|
2605
|
+
onMousedown: i[19] ||= k((e) => V("m", 1), ["prevent"]),
|
|
2606
|
+
onMouseup: H,
|
|
2607
|
+
onMouseleave: H
|
|
2621
2608
|
}, {
|
|
2622
2609
|
default: O(() => [...i[39] ||= [c("svg", {
|
|
2623
2610
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2632,21 +2619,21 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2632
2619
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2633
2620
|
_: 1
|
|
2634
2621
|
}),
|
|
2635
|
-
c("span",
|
|
2622
|
+
c("span", Or, T(M(L.value)), 1)
|
|
2636
2623
|
])) : o("", !0)])])) : o("", !0)
|
|
2637
2624
|
])])) : o("", !0)]),
|
|
2638
2625
|
_: 1
|
|
2639
2626
|
}),
|
|
2640
2627
|
f(n, { name: "overlay-fade" }, {
|
|
2641
|
-
default: O(() => [
|
|
2628
|
+
default: O(() => [x.value && t.range && !E.value ? (b(), s("div", {
|
|
2642
2629
|
key: 0,
|
|
2643
2630
|
class: "range-overlay",
|
|
2644
2631
|
onClick: k(Z, ["self"])
|
|
2645
|
-
}, [c("div",
|
|
2632
|
+
}, [c("div", kr, [
|
|
2646
2633
|
i[46] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2647
|
-
c("div",
|
|
2648
|
-
c("div",
|
|
2649
|
-
c("div",
|
|
2634
|
+
c("div", Ar, [(b(!0), s(e, null, C(Ae.value, (t) => (b(), s(e, { key: t.isLeft ? "left" : "right" }, [t.isLeft ? o("", !0) : (b(), s("div", jr)), c("div", Mr, [
|
|
2635
|
+
c("div", Nr, [
|
|
2636
|
+
c("div", Pr, [t.isLeft ? (b(), a(j, {
|
|
2650
2637
|
key: 0,
|
|
2651
2638
|
variant: "ghost",
|
|
2652
2639
|
square: "",
|
|
@@ -2664,9 +2651,9 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2664
2651
|
"stroke-linejoin": "round"
|
|
2665
2652
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2666
2653
|
_: 1
|
|
2667
|
-
})) : (b(), s("div",
|
|
2668
|
-
c("div",
|
|
2669
|
-
c("div",
|
|
2654
|
+
})) : (b(), s("div", Fr))]),
|
|
2655
|
+
c("div", Ir, T(te[t.month]) + " " + T(t.year), 1),
|
|
2656
|
+
c("div", Lr, [t.isLeft ? (b(), s("div", Rr)) : (b(), a(j, {
|
|
2670
2657
|
key: 0,
|
|
2671
2658
|
variant: "ghost",
|
|
2672
2659
|
square: "",
|
|
@@ -2686,26 +2673,26 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2686
2673
|
_: 1
|
|
2687
2674
|
}))])
|
|
2688
2675
|
]),
|
|
2689
|
-
c("div",
|
|
2676
|
+
c("div", zr, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2690
2677
|
key: e,
|
|
2691
2678
|
class: "weekday"
|
|
2692
2679
|
}, T(e), 1)), 64))]),
|
|
2693
|
-
c("div",
|
|
2680
|
+
c("div", Br, [(b(!0), s(e, null, C(t.days, (e, t) => (b(), s("div", {
|
|
2694
2681
|
key: t,
|
|
2695
|
-
class:
|
|
2682
|
+
class: h(["range-day", ze(e)]),
|
|
2696
2683
|
onClick: (t) => Re(e),
|
|
2697
|
-
onMouseenter: (t) =>
|
|
2698
|
-
}, T(e.day), 43,
|
|
2684
|
+
onMouseenter: (t) => J.value = e
|
|
2685
|
+
}, T(e.day), 43, Vr))), 128))])
|
|
2699
2686
|
])], 64))), 128))]),
|
|
2700
|
-
c("div",
|
|
2701
|
-
c("span", { class:
|
|
2687
|
+
c("div", Hr, [c("div", Ur, [
|
|
2688
|
+
c("span", { class: h(["range-val", { "is-empty": !Pe.value }]) }, T(Pe.value || "開始日期"), 3),
|
|
2702
2689
|
i[44] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2703
|
-
c("span", { class:
|
|
2690
|
+
c("span", { class: h(["range-val", { "is-empty": !X.value }]) }, T(X.value || "結束日期"), 3)
|
|
2704
2691
|
]), f(j, {
|
|
2705
2692
|
variant: "solid",
|
|
2706
2693
|
intent: "primary",
|
|
2707
2694
|
class: "confirm-btn",
|
|
2708
|
-
disabled: !
|
|
2695
|
+
disabled: !Ee.value,
|
|
2709
2696
|
onClick: k(Be, ["stop"])
|
|
2710
2697
|
}, {
|
|
2711
2698
|
default: O(() => [...i[45] ||= [d("確認", -1)]]),
|
|
@@ -2715,15 +2702,15 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2715
2702
|
_: 1
|
|
2716
2703
|
}),
|
|
2717
2704
|
f(n, { name: "sheet-slide" }, {
|
|
2718
|
-
default: O(() => [
|
|
2705
|
+
default: O(() => [x.value && t.range && E.value ? (b(), s("div", {
|
|
2719
2706
|
key: 0,
|
|
2720
2707
|
class: "mobile-overlay",
|
|
2721
2708
|
onClick: k(Z, ["self"])
|
|
2722
|
-
}, [c("div",
|
|
2709
|
+
}, [c("div", Wr, [
|
|
2723
2710
|
i[51] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2724
2711
|
i[52] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2725
|
-
c("div",
|
|
2726
|
-
c("div",
|
|
2712
|
+
c("div", Gr, [
|
|
2713
|
+
c("div", Kr, [f(j, {
|
|
2727
2714
|
variant: "ghost",
|
|
2728
2715
|
square: "",
|
|
2729
2716
|
onClick: Ie
|
|
@@ -2741,8 +2728,8 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2741
2728
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2742
2729
|
_: 1
|
|
2743
2730
|
})]),
|
|
2744
|
-
c("div",
|
|
2745
|
-
c("div",
|
|
2731
|
+
c("div", qr, T(te[W.value]) + " " + T(U.value), 1),
|
|
2732
|
+
c("div", Jr, [f(j, {
|
|
2746
2733
|
variant: "ghost",
|
|
2747
2734
|
square: "",
|
|
2748
2735
|
onClick: Le
|
|
@@ -2761,24 +2748,24 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2761
2748
|
_: 1
|
|
2762
2749
|
})])
|
|
2763
2750
|
]),
|
|
2764
|
-
c("div",
|
|
2751
|
+
c("div", Yr, [(b(), s(e, null, C(re, (e) => c("span", {
|
|
2765
2752
|
key: e,
|
|
2766
2753
|
class: "weekday"
|
|
2767
2754
|
}, T(e), 1)), 64))]),
|
|
2768
|
-
c("div",
|
|
2755
|
+
c("div", Xr, [(b(!0), s(e, null, C(Oe.value, (e, t) => (b(), s("div", {
|
|
2769
2756
|
key: t,
|
|
2770
|
-
class:
|
|
2757
|
+
class: h(["range-day", ze(e)]),
|
|
2771
2758
|
onClick: (t) => Re(e)
|
|
2772
|
-
}, T(e.day), 11,
|
|
2773
|
-
c("div",
|
|
2774
|
-
c("span", { class:
|
|
2759
|
+
}, T(e.day), 11, Zr))), 128))]),
|
|
2760
|
+
c("div", Qr, [c("div", $r, [
|
|
2761
|
+
c("span", { class: h(["range-val", { "is-empty": !Pe.value }]) }, T(Pe.value || "開始日期"), 3),
|
|
2775
2762
|
i[49] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2776
|
-
c("span", { class:
|
|
2763
|
+
c("span", { class: h(["range-val", { "is-empty": !X.value }]) }, T(X.value || "結束日期"), 3)
|
|
2777
2764
|
]), f(j, {
|
|
2778
2765
|
variant: "solid",
|
|
2779
2766
|
intent: "primary",
|
|
2780
2767
|
class: "confirm-btn",
|
|
2781
|
-
disabled: !
|
|
2768
|
+
disabled: !Ee.value,
|
|
2782
2769
|
onClick: k(Be, ["stop"])
|
|
2783
2770
|
}, {
|
|
2784
2771
|
default: O(() => [...i[50] ||= [d("確認", -1)]]),
|
|
@@ -2789,7 +2776,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2789
2776
|
})
|
|
2790
2777
|
], 512));
|
|
2791
2778
|
}
|
|
2792
|
-
}), [["__scopeId", "data-v-1511ddb7"]]),
|
|
2779
|
+
}), [["__scopeId", "data-v-1511ddb7"]]), ti = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
2793
2780
|
__name: "NTooltip",
|
|
2794
2781
|
props: {
|
|
2795
2782
|
content: { default: "" },
|
|
@@ -2816,18 +2803,18 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2816
2803
|
}, [w(r.$slots, "default", {}, void 0, !0), f(n, { name: "fade" }, {
|
|
2817
2804
|
default: O(() => [t.value ? (b(), s("div", {
|
|
2818
2805
|
key: 0,
|
|
2819
|
-
class:
|
|
2806
|
+
class: h(["content", [e.position]]),
|
|
2820
2807
|
role: "tooltip",
|
|
2821
2808
|
onMouseenter: i,
|
|
2822
2809
|
onMouseleave: a
|
|
2823
|
-
}, [w(r.$slots, "content", {}, () => [d(T(e.content), 1)], !0), c("div", { class:
|
|
2810
|
+
}, [w(r.$slots, "content", {}, () => [d(T(e.content), 1)], !0), c("div", { class: h(["arrow", [e.position]]) }, null, 2)], 34)) : o("", !0)]),
|
|
2824
2811
|
_: 3
|
|
2825
2812
|
})], 32));
|
|
2826
2813
|
}
|
|
2827
|
-
}), [["__scopeId", "data-v-7a53ca0a"]]),
|
|
2814
|
+
}), [["__scopeId", "data-v-7a53ca0a"]]), ni = { class: "modal-header" }, ri = { class: "modal-title" }, ii = { class: "modal-content" }, ai = {
|
|
2828
2815
|
key: 0,
|
|
2829
2816
|
class: "modal-footer"
|
|
2830
|
-
},
|
|
2817
|
+
}, oi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
2831
2818
|
__name: "NModal",
|
|
2832
2819
|
props: {
|
|
2833
2820
|
show: {
|
|
@@ -2857,7 +2844,7 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2857
2844
|
}, u = () => {
|
|
2858
2845
|
e.closeOnClickOverlay && l();
|
|
2859
2846
|
}, d = S("");
|
|
2860
|
-
return
|
|
2847
|
+
return ne(() => e.show, (e) => {
|
|
2861
2848
|
e ? (d.value = document.body.style.overflow, document.body.style.overflow = "hidden", i("open")) : document.body.style.overflow = d.value;
|
|
2862
2849
|
}, { immediate: !0 }), y(() => {
|
|
2863
2850
|
e.show && (document.body.style.overflow = d.value);
|
|
@@ -2865,13 +2852,13 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2865
2852
|
default: O(() => [e.show ? (b(), s("div", {
|
|
2866
2853
|
key: 0,
|
|
2867
2854
|
class: "modal-overlay",
|
|
2868
|
-
style:
|
|
2855
|
+
style: g({ zIndex: e.zIndex }),
|
|
2869
2856
|
onClick: k(u, ["self"])
|
|
2870
2857
|
}, [c("div", {
|
|
2871
2858
|
class: "modal-container",
|
|
2872
|
-
style:
|
|
2859
|
+
style: g({ width: e.width })
|
|
2873
2860
|
}, [
|
|
2874
|
-
c("header",
|
|
2861
|
+
c("header", ni, [c("h3", ri, T(e.title), 1), e.showClose ? (b(), s("button", {
|
|
2875
2862
|
key: 0,
|
|
2876
2863
|
class: "close-btn",
|
|
2877
2864
|
onClick: l
|
|
@@ -2883,18 +2870,18 @@ var Dn = { class: "icon-wrap" }, On = ["innerHTML"], kn = {
|
|
|
2883
2870
|
fill: "currentColor",
|
|
2884
2871
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
|
|
2885
2872
|
})], -1)]])) : o("", !0)]),
|
|
2886
|
-
c("main",
|
|
2887
|
-
r.$slots.footer ? (b(), s("footer",
|
|
2873
|
+
c("main", ii, [w(r.$slots, "default", {}, void 0, !0)]),
|
|
2874
|
+
r.$slots.footer ? (b(), s("footer", ai, [w(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
2888
2875
|
], 4)], 4)) : o("", !0)]),
|
|
2889
2876
|
_: 3
|
|
2890
2877
|
})]));
|
|
2891
2878
|
}
|
|
2892
|
-
}), [["__scopeId", "data-v-ee2fac3c"]]),
|
|
2893
|
-
function
|
|
2879
|
+
}), [["__scopeId", "data-v-ee2fac3c"]]), si = 0, ci = x([]);
|
|
2880
|
+
function li() {
|
|
2894
2881
|
let e = function(e, t = {}) {
|
|
2895
|
-
let n = ++
|
|
2882
|
+
let n = ++si;
|
|
2896
2883
|
return new Promise((r) => {
|
|
2897
|
-
|
|
2884
|
+
ci.push({
|
|
2898
2885
|
id: n,
|
|
2899
2886
|
type: "alert",
|
|
2900
2887
|
message: e,
|
|
@@ -2920,8 +2907,8 @@ function pi() {
|
|
|
2920
2907
|
});
|
|
2921
2908
|
function t(e, t = {}) {
|
|
2922
2909
|
return new Promise((n) => {
|
|
2923
|
-
let r = ++
|
|
2924
|
-
|
|
2910
|
+
let r = ++si;
|
|
2911
|
+
ci.push({
|
|
2925
2912
|
id: r,
|
|
2926
2913
|
type: "confirm",
|
|
2927
2914
|
message: e,
|
|
@@ -2934,10 +2921,10 @@ function pi() {
|
|
|
2934
2921
|
});
|
|
2935
2922
|
}
|
|
2936
2923
|
function n() {
|
|
2937
|
-
for (;
|
|
2924
|
+
for (; ci.length > 0;) ci.shift().resolve(!1);
|
|
2938
2925
|
}
|
|
2939
2926
|
return {
|
|
2940
|
-
alerts:
|
|
2927
|
+
alerts: ci,
|
|
2941
2928
|
alert: e,
|
|
2942
2929
|
confirm: t,
|
|
2943
2930
|
clearAlerts: n
|
|
@@ -2945,18 +2932,18 @@ function pi() {
|
|
|
2945
2932
|
}
|
|
2946
2933
|
//#endregion
|
|
2947
2934
|
//#region src/components/NAlert.vue?vue&type=script&setup=true&lang.ts
|
|
2948
|
-
var
|
|
2935
|
+
var ui = { class: "cards-wrapper" }, di = ["innerHTML"], fi = { class: "card-body" }, pi = {
|
|
2949
2936
|
key: 0,
|
|
2950
2937
|
class: "card-title"
|
|
2951
|
-
},
|
|
2938
|
+
}, mi = { class: "card-message" }, hi = { class: "card-footer" }, gi = ["onClick"], _i = ["onClick"], vi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
2952
2939
|
__name: "NAlert",
|
|
2953
2940
|
setup(n) {
|
|
2954
|
-
let { alerts: r, clearAlerts: i } =
|
|
2955
|
-
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"
|
|
2941
|
+
let { alerts: r, clearAlerts: i } = li(), l = {
|
|
2942
|
+
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 12l3 3 5-6\"/></svg>",
|
|
2956
2943
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg>",
|
|
2957
2944
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></svg>",
|
|
2958
2945
|
info: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/></svg>",
|
|
2959
|
-
question: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0
|
|
2946
|
+
question: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 100 100\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"50\" cy=\"50\" r=\"44\"/><path d=\"M40 42 C40 33 45 29 51 29 C57 29 62 34 62 40 C62 48 54 52 52 58 C51 60 51 62 51 65\"/><circle cx=\"51\" cy=\"74\" r=\"3.5\" fill=\"currentColor\" stroke=\"none\"/></svg>"
|
|
2960
2947
|
};
|
|
2961
2948
|
function u(e) {
|
|
2962
2949
|
return l[e.status] ?? l.question;
|
|
@@ -2988,33 +2975,33 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
2988
2975
|
}
|
|
2989
2976
|
return v(() => document.addEventListener("keydown", m)), y(() => {
|
|
2990
2977
|
document.removeEventListener("keydown", m), i();
|
|
2991
|
-
}), (n, i) => (b(), a(t, { to: "body" }, [c("div", { class:
|
|
2978
|
+
}), (n, i) => (b(), a(t, { to: "body" }, [c("div", { class: h(["backdrop", { open: E(r).length > 0 }]) }, null, 2), c("div", { class: h(["alert-stack", { open: E(r).length > 0 }]) }, [c("div", ui, [(b(!0), s(e, null, C(E(r), (e, t) => (b(), s("div", {
|
|
2992
2979
|
key: e.id,
|
|
2993
|
-
class:
|
|
2994
|
-
style:
|
|
2980
|
+
class: h(["alert-card", `status-${e.status}`]),
|
|
2981
|
+
style: g(d(t))
|
|
2995
2982
|
}, [
|
|
2996
2983
|
c("div", {
|
|
2997
2984
|
class: "card-icon",
|
|
2998
2985
|
innerHTML: u(e)
|
|
2999
|
-
}, null, 8,
|
|
3000
|
-
c("div",
|
|
3001
|
-
c("div",
|
|
2986
|
+
}, null, 8, di),
|
|
2987
|
+
c("div", fi, [e.title ? (b(), s("p", pi, T(e.title), 1)) : o("", !0), c("p", mi, T(e.message), 1)]),
|
|
2988
|
+
c("div", hi, [e.type === "confirm" ? (b(), s("button", {
|
|
3002
2989
|
key: 0,
|
|
3003
2990
|
class: "btn btn-cancel",
|
|
3004
2991
|
onClick: (t) => p(e)
|
|
3005
|
-
}, T(e.cancelText), 9,
|
|
3006
|
-
class:
|
|
2992
|
+
}, T(e.cancelText), 9, gi)) : o("", !0), c("button", {
|
|
2993
|
+
class: h(["btn btn-confirm", `btn-${e.status}`]),
|
|
3007
2994
|
onClick: (t) => f(e)
|
|
3008
|
-
}, T(e.confirmText), 11,
|
|
2995
|
+
}, T(e.confirmText), 11, _i)])
|
|
3009
2996
|
], 6))), 128))])], 2)]));
|
|
3010
2997
|
}
|
|
3011
|
-
}), [["__scopeId", "data-v-
|
|
2998
|
+
}), [["__scopeId", "data-v-55bcfae2"]]), yi = { class: "nav" }, bi = ["onClick"], xi = ["innerHTML"], Si = { class: "nav-list" }, Ci = ["href", "onClick"], wi = ["innerHTML"], Ti = { class: "nav-text" }, Ei = { class: "user-capsule" }, Di = { class: "user-avatar" }, Oi = ["src"], ki = {
|
|
3012
2999
|
key: 1,
|
|
3013
3000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3014
3001
|
width: "36",
|
|
3015
3002
|
height: "36",
|
|
3016
3003
|
viewBox: "0 0 36 36"
|
|
3017
|
-
},
|
|
3004
|
+
}, Ai = { class: "user-info" }, ji = { class: "user-name-row" }, Mi = { class: "user-name" }, Ni = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3018
3005
|
__name: "NSidebar",
|
|
3019
3006
|
props: {
|
|
3020
3007
|
isOpen: {
|
|
@@ -3032,11 +3019,11 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3032
3019
|
"navigate"
|
|
3033
3020
|
],
|
|
3034
3021
|
setup(n, { emit: r }) {
|
|
3035
|
-
let { isMenuExpanded: i, toggleMenu: o } =
|
|
3022
|
+
let { isMenuExpanded: i, toggleMenu: o } = Ot(), l = S(!1), d = r, p = (e) => e.children?.some((e) => e.route === n.currentPath), m = (e) => n.currentPath === e, g = (e) => {
|
|
3036
3023
|
n.currentPath !== e.route && d("navigate", e);
|
|
3037
3024
|
};
|
|
3038
3025
|
return (r, _) => (b(), s("nav", {
|
|
3039
|
-
class:
|
|
3026
|
+
class: h(["sidebar", {
|
|
3040
3027
|
open: n.isOpen,
|
|
3041
3028
|
"hover-expanded": l.value
|
|
3042
3029
|
}]),
|
|
@@ -3061,13 +3048,13 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3061
3048
|
onMouseenter: _[2] ||= (e) => l.value = !0
|
|
3062
3049
|
}, [
|
|
3063
3050
|
_[9] ||= c("div", { class: "header" }, [c("div", { class: "brand-logo" }, [c("span", { class: "logo-text" }, "NICKLABS"), c("span", { class: "logo-icon" }, "N")])], -1),
|
|
3064
|
-
c("div",
|
|
3051
|
+
c("div", yi, [(b(!0), s(e, null, C(n.menus, (t) => (b(), s("div", { class: h(["menu", {
|
|
3065
3052
|
open: E(i)(t.title),
|
|
3066
3053
|
active: p(t)
|
|
3067
3054
|
}]) }, [c("div", {
|
|
3068
3055
|
class: "title",
|
|
3069
3056
|
onClick: (e) => E(o)(t.title)
|
|
3070
|
-
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8,
|
|
3057
|
+
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, xi), c("span", null, T(t.title), 1)]), _[6] ||= c("svg", {
|
|
3071
3058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3072
3059
|
width: "14",
|
|
3073
3060
|
height: "14",
|
|
@@ -3078,17 +3065,17 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3078
3065
|
"stroke-linecap": "round",
|
|
3079
3066
|
"stroke-linejoin": "round",
|
|
3080
3067
|
class: "icon"
|
|
3081
|
-
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8,
|
|
3068
|
+
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, bi), c("div", Si, [c("div", null, [(b(!0), s(e, null, C(t.children, (e) => (b(), s("a", {
|
|
3082
3069
|
href: e.route,
|
|
3083
|
-
onClick: k((t) =>
|
|
3084
|
-
}, [c("div", { class:
|
|
3085
|
-
c("div",
|
|
3086
|
-
c("div",
|
|
3070
|
+
onClick: k((t) => g(e), ["prevent"])
|
|
3071
|
+
}, [c("div", { class: h(["nav-item", { active: m(e.route) }]) }, [c("div", { innerHTML: e.icon }, null, 8, wi), c("span", Ti, T(e.title), 1)], 2)], 8, Ci))), 256))])])], 2))), 256))]),
|
|
3072
|
+
c("div", Ei, [w(r.$slots, "user", {}, () => [
|
|
3073
|
+
c("div", Di, [n.userAvatarUrl ? (b(), s("img", {
|
|
3087
3074
|
key: 0,
|
|
3088
3075
|
src: n.userAvatarUrl,
|
|
3089
3076
|
alt: "User Avatar"
|
|
3090
|
-
}, null, 8,
|
|
3091
|
-
c("div",
|
|
3077
|
+
}, null, 8, Oi)) : (b(), s("svg", ki, [..._[7] ||= [u("<defs data-v-061424c3><clipPath id=\"avatarClip\" data-v-061424c3><circle cx=\"18\" cy=\"18\" r=\"18\" data-v-061424c3></circle></clipPath></defs><circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#dbeafe\" data-v-061424c3></circle><g clip-path=\"url(#avatarClip)\" data-v-061424c3><circle cx=\"18\" cy=\"14\" r=\"6\" fill=\"#2563eb\" data-v-061424c3></circle><path d=\"M6,34 Q6,24 18,24 Q30,24 30,34\" fill=\"#2563eb\" data-v-061424c3></path></g>", 3)]]))]),
|
|
3078
|
+
c("div", Ai, [c("div", ji, [c("span", Mi, T(n.userName || "ADMINISTRATOR"), 1)])]),
|
|
3092
3079
|
f(j, {
|
|
3093
3080
|
class: "logout-btn",
|
|
3094
3081
|
intent: "error",
|
|
@@ -3122,12 +3109,12 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3122
3109
|
], !0)])
|
|
3123
3110
|
], 32),
|
|
3124
3111
|
(b(), a(t, { to: "body" }, [c("div", {
|
|
3125
|
-
class:
|
|
3112
|
+
class: h(["overlay", { active: n.isOpen }]),
|
|
3126
3113
|
onClick: _[3] ||= (e) => d("update:isOpen", !n.isOpen)
|
|
3127
3114
|
}, null, 2)]))
|
|
3128
3115
|
], 34));
|
|
3129
3116
|
}
|
|
3130
|
-
}), [["__scopeId", "data-v-061424c3"]]),
|
|
3117
|
+
}), [["__scopeId", "data-v-061424c3"]]), Pi = { class: "layout" }, Fi = { class: "main-content" }, Ii = { class: "copyright" }, Li = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3131
3118
|
__name: "NLayout",
|
|
3132
3119
|
props: {
|
|
3133
3120
|
isShowSidebar: {
|
|
@@ -3140,8 +3127,8 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3140
3127
|
},
|
|
3141
3128
|
emits: ["logout", "navigate"],
|
|
3142
3129
|
setup(e, { emit: t }) {
|
|
3143
|
-
let n =
|
|
3144
|
-
return (t, i) => (b(), s("div",
|
|
3130
|
+
let n = Ot(), r = t;
|
|
3131
|
+
return (t, i) => (b(), s("div", Pi, [e.isShowSidebar ? (b(), a(Ni, {
|
|
3145
3132
|
key: 0,
|
|
3146
3133
|
isOpen: E(n).isSidebarExpanded(),
|
|
3147
3134
|
"onUpdate:isOpen": i[0] ||= (e) => E(n).toggleSidebar(),
|
|
@@ -3153,18 +3140,18 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3153
3140
|
"isOpen",
|
|
3154
3141
|
"menus",
|
|
3155
3142
|
"currentPath"
|
|
3156
|
-
])) : o("", !0), c("main",
|
|
3143
|
+
])) : o("", !0), c("main", Fi, [w(t.$slots, "default", {}, void 0, !0), c("div", Ii, T(e.copyright), 1)])]));
|
|
3157
3144
|
}
|
|
3158
|
-
}), [["__scopeId", "data-v-f1e6b1f1"]]),
|
|
3145
|
+
}), [["__scopeId", "data-v-f1e6b1f1"]]), Ri = { class: "topbar" }, zi = { class: "topbar-left" }, Bi = { class: "topbar-right" }, Vi = {
|
|
3159
3146
|
key: 0,
|
|
3160
3147
|
class: "pill"
|
|
3161
|
-
},
|
|
3148
|
+
}, Hi = {
|
|
3162
3149
|
key: 0,
|
|
3163
3150
|
class: "name"
|
|
3164
|
-
},
|
|
3151
|
+
}, Ui = {
|
|
3165
3152
|
key: 1,
|
|
3166
3153
|
class: "separator"
|
|
3167
|
-
},
|
|
3154
|
+
}, Wi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3168
3155
|
__name: "NNavigation",
|
|
3169
3156
|
props: {
|
|
3170
3157
|
isShowSidebar: {
|
|
@@ -3189,7 +3176,7 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3189
3176
|
let n = t, r = () => {
|
|
3190
3177
|
document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
|
|
3191
3178
|
};
|
|
3192
|
-
return (t, i) => (b(), s("header",
|
|
3179
|
+
return (t, i) => (b(), s("header", Ri, [c("div", zi, [e.isShowSidebar ? (b(), a(j, {
|
|
3193
3180
|
key: 0,
|
|
3194
3181
|
onClick: i[0] ||= (e) => n("toggleSidebar"),
|
|
3195
3182
|
padding: "8px"
|
|
@@ -3232,9 +3219,9 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3232
3219
|
c("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
3233
3220
|
], -1)]]),
|
|
3234
3221
|
_: 1
|
|
3235
|
-
})) : o("", !0)]), c("div",
|
|
3236
|
-
e.isShowUser ? (b(), s("span",
|
|
3237
|
-
e.isShowUser && e.isShowLogoutButton ? (b(), s("div",
|
|
3222
|
+
})) : o("", !0)]), c("div", Bi, [e.isShowUser || e.isShowLogoutButton ? (b(), s("div", Vi, [
|
|
3223
|
+
e.isShowUser ? (b(), s("span", Hi, "Nick")) : o("", !0),
|
|
3224
|
+
e.isShowUser && e.isShowLogoutButton ? (b(), s("div", Ui)) : o("", !0),
|
|
3238
3225
|
e.isShowLogoutButton ? (b(), a(j, {
|
|
3239
3226
|
key: 2,
|
|
3240
3227
|
variant: "mute",
|
|
@@ -3260,10 +3247,10 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3260
3247
|
})) : o("", !0)
|
|
3261
3248
|
])) : o("", !0)])]));
|
|
3262
3249
|
}
|
|
3263
|
-
}), [["__scopeId", "data-v-bb912f40"]]),
|
|
3250
|
+
}), [["__scopeId", "data-v-bb912f40"]]), Gi = { class: "brand" }, Ki = ["src", "alt"], qi = {
|
|
3264
3251
|
key: 1,
|
|
3265
3252
|
class: "icon"
|
|
3266
|
-
},
|
|
3253
|
+
}, Ji = { key: 2 }, Yi = { key: 3 }, Xi = /* @__PURE__ */ A(/* @__PURE__ */ p({
|
|
3267
3254
|
__name: "NLoginLayout",
|
|
3268
3255
|
props: {
|
|
3269
3256
|
backgroundImage: { default: "" },
|
|
@@ -3275,25 +3262,25 @@ var mi = { class: "cards-wrapper" }, hi = ["innerHTML"], gi = { class: "card-bod
|
|
|
3275
3262
|
let t = i(() => !!e.logo && (e.logo.startsWith("http") || e.logo.startsWith("/")));
|
|
3276
3263
|
return (n, r) => (b(), s("div", {
|
|
3277
3264
|
class: "login-wrapper",
|
|
3278
|
-
style:
|
|
3279
|
-
}, [f(
|
|
3265
|
+
style: g({ "--login-bg": e.backgroundImage ? `url('${e.backgroundImage}')` : "var(--bg-gradient)" })
|
|
3266
|
+
}, [f(Yt, {
|
|
3280
3267
|
size: "lg",
|
|
3281
3268
|
radius: "xl",
|
|
3282
3269
|
class: "card"
|
|
3283
3270
|
}, {
|
|
3284
|
-
default: O(() => [c("div",
|
|
3271
|
+
default: O(() => [c("div", Gi, [
|
|
3285
3272
|
t.value ? (b(), s("img", {
|
|
3286
3273
|
key: 0,
|
|
3287
3274
|
class: "logo-img",
|
|
3288
3275
|
src: e.logo,
|
|
3289
3276
|
alt: e.title
|
|
3290
|
-
}, null, 8,
|
|
3291
|
-
e.title ? (b(), s("h1",
|
|
3292
|
-
e.description ? (b(), s("p",
|
|
3277
|
+
}, null, 8, Ki)) : (b(), s("div", qi, T(e.logo), 1)),
|
|
3278
|
+
e.title ? (b(), s("h1", Ji, T(e.title), 1)) : o("", !0),
|
|
3279
|
+
e.description ? (b(), s("p", Yi, T(e.description), 1)) : o("", !0)
|
|
3293
3280
|
]), w(n.$slots, "default", {}, void 0, !0)]),
|
|
3294
3281
|
_: 3
|
|
3295
3282
|
})], 4));
|
|
3296
3283
|
}
|
|
3297
3284
|
}), [["__scopeId", "data-v-f0866bc5"]]);
|
|
3298
3285
|
//#endregion
|
|
3299
|
-
export {
|
|
3286
|
+
export { vi as NAlert, j as NButton, Yt as NCard, ge as NCheckbox, Kn as NCode, ei as NDatePicker, Jt as NEmpty, wt as NFileSelect, Ut as NForm, L as NInput, Li as NLayout, yn as NList, Ln as NLoading, Xi as NLoginLayout, oi as NModal, Wi as NNavigation, U as NSelect, Ni as NSidebar, Jn as NSwitch, gn as NTable, Yn as NTag, de as NTextarea, kn as NToast, ti as NTooltip, li as useAlert, Ot as useSidebarManager, Sn as useToast };
|