@digitalwalletcorp/vue-core 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{components-2zQ2SZuY.js → components-BuTJ1wX8.js} +1 -1
- package/lib/{components-HaiHcseF.cjs → components-CKql5lWg.cjs} +1 -1
- package/lib/data-table.d.cts +0 -1
- package/lib/data-table.d.ts +0 -1
- package/lib/helpers/show-floating-component.d.cts +8 -4
- package/lib/helpers/show-floating-component.d.ts +8 -4
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +82 -82
- package/lib/nuxt.cjs +1 -1
- package/lib/nuxt.js +1 -1
- package/lib/register.cjs +1 -1
- package/lib/register.js +1 -1
- package/lib/types/data-table.d.cts +4 -4
- package/lib/types/data-table.d.ts +4 -4
- package/lib/{warning-popper.vue_vue_type_style_index_0_lang-zt-jCsvz.js → warning-popper.vue_vue_type_style_index_0_lang-BKV_FX6k.js} +637 -633
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-CHmkjVCO.cjs +1 -0
- package/package.json +1 -1
- package/src/data-table.vue +23 -18
- package/src/helpers/show-floating-component.ts +22 -14
- package/src/index.ts +1 -1
- package/src/types/data-table.ts +4 -4
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-CxVzqsbn.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { SvgTriangleButton as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as D, useSlots as J, openBlock as d, createElementBlock as f, normalizeStyle as F, renderSlot as C, createBlock as j, resolveDynamicComponent as te, mergeProps as le, createCommentVNode as M, normalizeClass as O, createTextVNode as Z, toDisplayString as N, ref as B, onMounted as G, onBeforeUnmount as U, useModel as se, computed as T, createElementVNode as v, createVNode as A, unref as _, createSlots as ie, withCtx as H, mergeModels as Q, withModifiers as ee, normalizeProps as Me, guardReactiveProps as Ae, Fragment as K, renderList as Y, shallowRef as Ue, watch as X, withKeys as ge, useAttrs as De, useId as ae, reactive as ye, Transition as Xe, inject as Ye, provide as qe, Teleport as Qe } from "vue";
|
|
2
|
+
import { SvgTriangleButton as Ie, SvgMemo as Je, SvgHighBrightness as Ze, SvgMoonPhases as et, SvgChevronDouble as _e, SvgChevron as $e, SvgBlackArrow as ke, SvgFolderDownload as tt, SvgCloudDownload as ot, SvgPointingTriangle as nt, SvgQuestion as ve, SvgHourglass as lt, SvgCritical as at, SvgWarningSign as Oe, SvgInfo as st, SvgNegativeSquaredCrossMark as it, SvgCornerDiagonal as rt, SvgRoundPushpin as dt, SvgPushpin as ct, SvgSquare as ut, SvgCircle as pt, SvgDiamond as mt } from "@digitalwalletcorp/vue-svg-icons";
|
|
3
|
+
const oe = /* @__PURE__ */ D({
|
|
4
4
|
__name: "label-icon",
|
|
5
5
|
props: {
|
|
6
6
|
preset: {},
|
|
@@ -11,44 +11,44 @@ const ne = /* @__PURE__ */ A({
|
|
|
11
11
|
labelStyle: { type: [Boolean, null, String, Object, Array] }
|
|
12
12
|
},
|
|
13
13
|
setup(a) {
|
|
14
|
-
const o = a, e =
|
|
15
|
-
return (t, l) => (d(),
|
|
14
|
+
const o = a, e = J();
|
|
15
|
+
return (t, l) => (d(), f("span", {
|
|
16
16
|
class: "dwui-label-icon",
|
|
17
|
-
style:
|
|
17
|
+
style: F(o.gap == null ? void 0 : { "--dwui-gap-label-icon": o.gap })
|
|
18
18
|
}, [
|
|
19
19
|
C(t.$slots, "icon", {}, () => [
|
|
20
|
-
o.preset != null ? (d(), j(
|
|
20
|
+
o.preset != null ? (d(), j(te(o.preset.icon), le({ key: 0 }, o.preset.iconProps, {
|
|
21
21
|
class: o.iconClass,
|
|
22
22
|
style: o.iconStyle
|
|
23
|
-
}), null, 16, ["class", "style"])) :
|
|
23
|
+
}), null, 16, ["class", "style"])) : M("", !0)
|
|
24
24
|
]),
|
|
25
|
-
e.default != null || o.preset != null ? (d(),
|
|
25
|
+
e.default != null || o.preset != null ? (d(), f("span", {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: O(["dwui-label", o.labelClass]),
|
|
28
|
-
style:
|
|
28
|
+
style: F(o.labelStyle)
|
|
29
29
|
}, [
|
|
30
30
|
C(t.$slots, "default", {}, () => [
|
|
31
|
-
|
|
31
|
+
Z(N(typeof o.preset?.label == "function" ? o.preset.label() : o.preset?.label), 1)
|
|
32
32
|
])
|
|
33
|
-
], 6)) :
|
|
33
|
+
], 6)) : M("", !0)
|
|
34
34
|
], 4));
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
37
|
-
function
|
|
36
|
+
}), gt = 70;
|
|
37
|
+
function Ne(a) {
|
|
38
38
|
const o = B(!0);
|
|
39
39
|
let e;
|
|
40
40
|
return G(() => {
|
|
41
41
|
const t = a.value;
|
|
42
42
|
t != null && (e = new ResizeObserver(() => {
|
|
43
|
-
o.value =
|
|
43
|
+
o.value = gt <= t.scrollHeight;
|
|
44
44
|
}), e.observe(t));
|
|
45
45
|
}), U(() => {
|
|
46
46
|
e?.disconnect();
|
|
47
47
|
}), o;
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const vt = ["disabled"], ft = { class: "dwui-accordion-legend" }, bt = ["aria-expanded"], Go = /* @__PURE__ */ D({
|
|
50
50
|
__name: "accordion-fieldset",
|
|
51
|
-
props: /* @__PURE__ */
|
|
51
|
+
props: /* @__PURE__ */ Q({
|
|
52
52
|
legend: {},
|
|
53
53
|
disabled: { type: Boolean },
|
|
54
54
|
initialExpand: { type: Boolean }
|
|
@@ -58,63 +58,63 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
58
58
|
}),
|
|
59
59
|
emits: ["update:expanded"],
|
|
60
60
|
setup(a) {
|
|
61
|
-
const o = a, e =
|
|
61
|
+
const o = a, e = J(), t = B(), l = se(a, "expanded"), n = B(!!o.initialExpand), s = T({
|
|
62
62
|
get: () => l.value ?? n.value,
|
|
63
63
|
set: (c) => {
|
|
64
64
|
n.value = c, l.value = c;
|
|
65
65
|
}
|
|
66
|
-
}), p =
|
|
66
|
+
}), p = Ne(t), r = () => {
|
|
67
67
|
s.value = !s.value;
|
|
68
68
|
};
|
|
69
|
-
return (c, h) => (d(),
|
|
69
|
+
return (c, h) => (d(), f("fieldset", {
|
|
70
70
|
class: "dwui-accordion-fieldset",
|
|
71
71
|
disabled: o.disabled
|
|
72
72
|
}, [
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
v("legend", ft, [
|
|
74
|
+
v("button", {
|
|
75
75
|
type: "button",
|
|
76
76
|
class: "dwui-accordion-toggle",
|
|
77
77
|
"aria-expanded": s.value,
|
|
78
78
|
onClick: r
|
|
79
79
|
}, [
|
|
80
|
-
|
|
80
|
+
A(_(Ie), {
|
|
81
81
|
direction: s.value ? "up" : "down"
|
|
82
82
|
}, null, 8, ["direction"]),
|
|
83
|
-
o.legend != null || e.legend != null || e.icon != null ? (d(), j(
|
|
83
|
+
o.legend != null || e.legend != null || e.icon != null ? (d(), j(oe, { key: 0 }, ie({ _: 2 }, [
|
|
84
84
|
e.icon != null ? {
|
|
85
85
|
name: "icon",
|
|
86
|
-
fn:
|
|
86
|
+
fn: H(() => [
|
|
87
87
|
C(c.$slots, "icon")
|
|
88
88
|
]),
|
|
89
89
|
key: "0"
|
|
90
90
|
} : void 0,
|
|
91
91
|
o.legend != null || e.legend != null ? {
|
|
92
92
|
name: "default",
|
|
93
|
-
fn:
|
|
93
|
+
fn: H(() => [
|
|
94
94
|
C(c.$slots, "legend", {}, () => [
|
|
95
|
-
|
|
95
|
+
Z(N(o.legend), 1)
|
|
96
96
|
])
|
|
97
97
|
]),
|
|
98
98
|
key: "1"
|
|
99
99
|
} : void 0
|
|
100
|
-
]), 1024)) :
|
|
101
|
-
], 8,
|
|
100
|
+
]), 1024)) : M("", !0)
|
|
101
|
+
], 8, bt)
|
|
102
102
|
]),
|
|
103
|
-
|
|
103
|
+
v("div", {
|
|
104
104
|
ref_key: "refContents",
|
|
105
105
|
ref: t,
|
|
106
|
-
class: O(["dwui-accordion-contents",
|
|
106
|
+
class: O(["dwui-accordion-contents", _(p) ? s.value ? "dwui-expanded" : "dwui-shrunk" : ""])
|
|
107
107
|
}, [
|
|
108
108
|
C(c.$slots, "default")
|
|
109
109
|
], 2)
|
|
110
|
-
], 8,
|
|
110
|
+
], 8, vt));
|
|
111
111
|
}
|
|
112
|
-
}),
|
|
112
|
+
}), ht = { class: "dwui-accordion-section" }, wt = {
|
|
113
113
|
key: 0,
|
|
114
114
|
class: "dwui-accordion-section-control"
|
|
115
|
-
},
|
|
115
|
+
}, yt = ["disabled", "aria-expanded"], Uo = /* @__PURE__ */ D({
|
|
116
116
|
__name: "accordion-section",
|
|
117
|
-
props: /* @__PURE__ */
|
|
117
|
+
props: /* @__PURE__ */ Q({
|
|
118
118
|
disabled: { type: Boolean },
|
|
119
119
|
initialExpand: { type: Boolean },
|
|
120
120
|
noGradient: { type: Boolean },
|
|
@@ -128,63 +128,63 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
128
128
|
}),
|
|
129
129
|
emits: ["update:expanded"],
|
|
130
130
|
setup(a) {
|
|
131
|
-
const o = a, e =
|
|
131
|
+
const o = a, e = J(), t = B(), l = se(a, "expanded"), n = B(!!o.initialExpand), s = T({
|
|
132
132
|
get: () => l.value ?? n.value,
|
|
133
|
-
set: (
|
|
134
|
-
n.value =
|
|
133
|
+
set: (k) => {
|
|
134
|
+
n.value = k, l.value = k;
|
|
135
135
|
}
|
|
136
|
-
}), p =
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
139
|
-
return
|
|
136
|
+
}), p = Ne(t), r = T(() => s.value ? o.collapsePreset : o.expandPreset), c = () => (s.value ? e["collapse-icon"] : e["expand-icon"]) ?? r.value?.icon, h = () => (s.value ? e["collapse-icon"] : e["expand-icon"]) == null ? r.value?.iconProps : void 0, m = T(() => {
|
|
137
|
+
const k = s.value ? o.collapseLabel : o.expandLabel;
|
|
138
|
+
if (k != null)
|
|
139
|
+
return k;
|
|
140
140
|
const x = r.value?.label;
|
|
141
141
|
return typeof x == "function" ? x() : x;
|
|
142
142
|
}), u = () => {
|
|
143
143
|
s.value = !s.value;
|
|
144
144
|
};
|
|
145
|
-
return (
|
|
146
|
-
|
|
145
|
+
return (k, x) => (d(), f("div", ht, [
|
|
146
|
+
v("div", {
|
|
147
147
|
ref_key: "refContents",
|
|
148
148
|
ref: t,
|
|
149
149
|
class: O(["dwui-accordion-section-contents", [
|
|
150
|
-
|
|
150
|
+
_(p) ? s.value ? "dwui-expanded" : "dwui-shrunk" : "",
|
|
151
151
|
{ "dwui-no-gradient": o.noGradient }
|
|
152
152
|
]])
|
|
153
153
|
}, [
|
|
154
|
-
C(
|
|
154
|
+
C(k.$slots, "default")
|
|
155
155
|
], 2),
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
_(p) ? (d(), f("div", wt, [
|
|
157
|
+
v("button", {
|
|
158
158
|
type: "button",
|
|
159
159
|
class: "dwui-accordion-section-toggle",
|
|
160
160
|
disabled: o.disabled,
|
|
161
161
|
"aria-expanded": s.value,
|
|
162
|
-
onClick:
|
|
162
|
+
onClick: ee(u, ["stop"])
|
|
163
163
|
}, [
|
|
164
|
-
c() != null || m.value != null ? (d(), j(
|
|
164
|
+
c() != null || m.value != null ? (d(), j(oe, { key: 0 }, ie({ _: 2 }, [
|
|
165
165
|
c() != null ? {
|
|
166
166
|
name: "icon",
|
|
167
|
-
fn:
|
|
168
|
-
(d(), j(
|
|
167
|
+
fn: H(() => [
|
|
168
|
+
(d(), j(te(c()), Me(Ae(h())), null, 16))
|
|
169
169
|
]),
|
|
170
170
|
key: "0"
|
|
171
171
|
} : void 0,
|
|
172
172
|
m.value != null ? {
|
|
173
173
|
name: "default",
|
|
174
|
-
fn:
|
|
175
|
-
|
|
174
|
+
fn: H(() => [
|
|
175
|
+
Z(N(m.value), 1)
|
|
176
176
|
]),
|
|
177
177
|
key: "1"
|
|
178
178
|
} : void 0
|
|
179
|
-
]), 1024)) : (d(), j(
|
|
179
|
+
]), 1024)) : (d(), j(_(Ie), {
|
|
180
180
|
key: 1,
|
|
181
181
|
direction: s.value ? "up" : "down"
|
|
182
182
|
}, null, 8, ["direction"]))
|
|
183
|
-
], 8,
|
|
184
|
-
])) :
|
|
183
|
+
], 8, yt)
|
|
184
|
+
])) : M("", !0)
|
|
185
185
|
]));
|
|
186
186
|
}
|
|
187
|
-
}),
|
|
187
|
+
}), _t = ["aria-label"], Xo = /* @__PURE__ */ D({
|
|
188
188
|
__name: "copy-button",
|
|
189
189
|
props: {
|
|
190
190
|
value: {},
|
|
@@ -192,7 +192,7 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
192
192
|
},
|
|
193
193
|
emits: ["emit:copy", "emit:error"],
|
|
194
194
|
setup(a, { emit: o }) {
|
|
195
|
-
const e = a, t = o, l =
|
|
195
|
+
const e = a, t = o, l = J(), n = async () => {
|
|
196
196
|
const s = String(typeof e.value == "function" ? e.value() : e.value);
|
|
197
197
|
try {
|
|
198
198
|
await navigator.clipboard.writeText(s);
|
|
@@ -202,18 +202,18 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
202
202
|
}
|
|
203
203
|
t("emit:copy", s);
|
|
204
204
|
};
|
|
205
|
-
return (s, p) => (d(),
|
|
205
|
+
return (s, p) => (d(), f("button", {
|
|
206
206
|
type: "button",
|
|
207
207
|
class: "dwui-copy-button",
|
|
208
208
|
"aria-label": l.default ? void 0 : e.label,
|
|
209
209
|
onClick: n
|
|
210
210
|
}, [
|
|
211
211
|
C(s.$slots, "default", {}, () => [
|
|
212
|
-
|
|
212
|
+
A(_(Je))
|
|
213
213
|
])
|
|
214
|
-
], 8,
|
|
214
|
+
], 8, _t));
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
216
|
+
}), $t = ["aria-label", "aria-checked"], kt = { class: "dwui-dark-mode-selector-track" }, St = { class: "dwui-dark-mode-selector-icon-light" }, Pt = { class: "dwui-dark-mode-selector-icon-dark" }, Yo = /* @__PURE__ */ D({
|
|
217
217
|
__name: "dark-mode-selector",
|
|
218
218
|
props: {
|
|
219
219
|
storageKey: { default: "dwui-color-scheme" },
|
|
@@ -223,34 +223,34 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
223
223
|
setup(a, { emit: o }) {
|
|
224
224
|
const e = a, t = o, l = B(!1);
|
|
225
225
|
let n = null, s = null;
|
|
226
|
-
const p = (
|
|
226
|
+
const p = ($) => $ === "light" || $ === "dark", r = () => s?.matches ? "dark" : "light", c = () => {
|
|
227
227
|
try {
|
|
228
|
-
const
|
|
229
|
-
return p(
|
|
228
|
+
const $ = localStorage.getItem(e.storageKey);
|
|
229
|
+
return p($) ? $ : null;
|
|
230
230
|
} catch {
|
|
231
231
|
return null;
|
|
232
232
|
}
|
|
233
|
-
}, h = (
|
|
233
|
+
}, h = ($) => {
|
|
234
234
|
const w = document.documentElement.classList;
|
|
235
|
-
w.remove(
|
|
236
|
-
}, m = (
|
|
235
|
+
w.remove($ === "dark" ? "light" : "dark"), w.add($), l.value = $ === "dark", n !== $ && (n = $, t("emit:change", $));
|
|
236
|
+
}, m = ($) => {
|
|
237
237
|
try {
|
|
238
|
-
localStorage.setItem(e.storageKey,
|
|
238
|
+
localStorage.setItem(e.storageKey, $);
|
|
239
239
|
} catch {
|
|
240
240
|
}
|
|
241
|
-
h(
|
|
241
|
+
h($);
|
|
242
242
|
}, u = () => {
|
|
243
243
|
m(l.value ? "light" : "dark");
|
|
244
|
-
},
|
|
245
|
-
m(
|
|
246
|
-
}, x = (
|
|
247
|
-
|
|
244
|
+
}, k = ($) => {
|
|
245
|
+
m($.matches ? "dark" : "light");
|
|
246
|
+
}, x = ($) => {
|
|
247
|
+
$.key === e.storageKey && h(p($.newValue) ? $.newValue : r());
|
|
248
248
|
};
|
|
249
249
|
return G(() => {
|
|
250
|
-
s = window.matchMedia("(prefers-color-scheme: dark)"), h(c() ?? r()), s.addEventListener("change",
|
|
250
|
+
s = window.matchMedia("(prefers-color-scheme: dark)"), h(c() ?? r()), s.addEventListener("change", k), window.addEventListener("storage", x);
|
|
251
251
|
}), U(() => {
|
|
252
|
-
s?.removeEventListener("change",
|
|
253
|
-
}), (
|
|
252
|
+
s?.removeEventListener("change", k), window.removeEventListener("storage", x);
|
|
253
|
+
}), ($, w) => (d(), f("button", {
|
|
254
254
|
type: "button",
|
|
255
255
|
role: "switch",
|
|
256
256
|
class: "dwui-dark-mode-selector",
|
|
@@ -258,25 +258,25 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
258
258
|
"aria-checked": l.value,
|
|
259
259
|
onClick: u
|
|
260
260
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
C(
|
|
264
|
-
|
|
261
|
+
v("span", kt, [
|
|
262
|
+
v("span", St, [
|
|
263
|
+
C($.$slots, "icon-light", {}, () => [
|
|
264
|
+
A(_(Ze))
|
|
265
265
|
])
|
|
266
266
|
]),
|
|
267
|
-
|
|
268
|
-
C(
|
|
269
|
-
|
|
267
|
+
v("span", Pt, [
|
|
268
|
+
C($.$slots, "icon-dark", {}, () => [
|
|
269
|
+
A(_(et), { "moon-age": 3.85 })
|
|
270
270
|
])
|
|
271
271
|
])
|
|
272
272
|
]),
|
|
273
|
-
w[0] || (w[0] =
|
|
274
|
-
], 8,
|
|
273
|
+
w[0] || (w[0] = v("span", { class: "dwui-dark-mode-selector-handle" }, null, -1))
|
|
274
|
+
], 8, $t));
|
|
275
275
|
}
|
|
276
|
-
}),
|
|
276
|
+
}), Ct = { class: "dwui-pagination" }, xt = { class: "dwui-pagination-list" }, Bt = ["disabled", "aria-label", "title"], Lt = ["disabled", "aria-label", "title"], Et = ["disabled", "aria-label", "title"], Tt = ["aria-current", "onClick"], Mt = ["disabled", "aria-label", "title"], At = ["disabled", "aria-label", "title"], Dt = ["disabled", "aria-label", "title"], It = {
|
|
277
277
|
key: 0,
|
|
278
278
|
class: "dwui-pagination-select"
|
|
279
|
-
},
|
|
279
|
+
}, Ot = ["value", "disabled"], Nt = ["value"], Ht = /* @__PURE__ */ D({
|
|
280
280
|
__name: "pagination",
|
|
281
281
|
props: {
|
|
282
282
|
current: {},
|
|
@@ -288,155 +288,155 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
288
288
|
},
|
|
289
289
|
emits: ["emit:changePage"],
|
|
290
290
|
setup(a, { emit: o }) {
|
|
291
|
-
const e = a, t = o, l = T(() => Math.ceil(e.totalCount / e.limit)), n = T(() => Math.min(Math.max(e.current, 1), l.value)), s = B(!1), p = T(() => l.value < 1 ? [] : s.value ? Array.from({ length: l.value }, (w,
|
|
291
|
+
const e = a, t = o, l = T(() => Math.ceil(e.totalCount / e.limit)), n = T(() => Math.min(Math.max(e.current, 1), l.value)), s = B(!1), p = T(() => l.value < 1 ? [] : s.value ? Array.from({ length: l.value }, (w, S) => S + 1) : [n.value]), r = T(() => {
|
|
292
292
|
if (l.value < 1)
|
|
293
293
|
return [];
|
|
294
294
|
const w = Math.min(
|
|
295
295
|
Math.max(n.value - Math.floor((e.maxPagination - 1) / 2), 1),
|
|
296
296
|
Math.max(l.value - e.maxPagination + 1, 1)
|
|
297
|
-
),
|
|
298
|
-
return Array.from({ length:
|
|
297
|
+
), S = Math.min(w + e.maxPagination - 1, l.value);
|
|
298
|
+
return Array.from({ length: S - w + 1 }, (b, L) => w + L);
|
|
299
299
|
}), c = (w) => {
|
|
300
300
|
w !== e.current && t("emit:changePage", w);
|
|
301
301
|
}, h = (w) => {
|
|
302
|
-
let
|
|
303
|
-
w < 0 ?
|
|
302
|
+
let S;
|
|
303
|
+
w < 0 ? S = Math.max(r.value[0] - e.maxPagination, 1) : S = Math.min(r.value[r.value.length - 1] + e.maxPagination, l.value) - e.maxPagination + 1, c(S + Math.round((e.maxPagination - 1) / 2));
|
|
304
304
|
}, m = (w) => {
|
|
305
305
|
c(Number(w.target.value));
|
|
306
306
|
}, u = () => {
|
|
307
307
|
s.value = !0;
|
|
308
|
-
},
|
|
308
|
+
}, k = (w) => {
|
|
309
309
|
document.activeElement !== w.currentTarget && (s.value = !1);
|
|
310
310
|
}, x = () => {
|
|
311
311
|
s.value = !0;
|
|
312
|
-
},
|
|
312
|
+
}, $ = () => {
|
|
313
313
|
s.value = !1;
|
|
314
314
|
};
|
|
315
|
-
return (w,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
315
|
+
return (w, S) => (d(), f("div", Ct, [
|
|
316
|
+
v("ul", xt, [
|
|
317
|
+
v("li", null, [
|
|
318
|
+
v("button", {
|
|
319
319
|
type: "button",
|
|
320
320
|
disabled: n.value <= 1,
|
|
321
321
|
"aria-label": e.labels.firstPage,
|
|
322
322
|
title: e.labels.firstPage,
|
|
323
|
-
onClick:
|
|
323
|
+
onClick: S[0] || (S[0] = (b) => c(1))
|
|
324
324
|
}, [
|
|
325
|
-
|
|
325
|
+
A(_(_e), {
|
|
326
326
|
direction: "left",
|
|
327
327
|
size: "1em",
|
|
328
328
|
"stroke-width": 8
|
|
329
329
|
})
|
|
330
|
-
], 8,
|
|
330
|
+
], 8, Bt)
|
|
331
331
|
]),
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
v("li", null, [
|
|
333
|
+
v("button", {
|
|
334
334
|
type: "button",
|
|
335
335
|
disabled: n.value <= 1,
|
|
336
336
|
"aria-label": e.labels.previousPage,
|
|
337
337
|
title: e.labels.previousPage,
|
|
338
|
-
onClick:
|
|
338
|
+
onClick: S[1] || (S[1] = (b) => c(n.value - 1))
|
|
339
339
|
}, [
|
|
340
|
-
|
|
340
|
+
A(_($e), {
|
|
341
341
|
direction: "left",
|
|
342
342
|
size: "1em",
|
|
343
343
|
"stroke-width": 8
|
|
344
344
|
})
|
|
345
|
-
], 8,
|
|
345
|
+
], 8, Lt)
|
|
346
346
|
]),
|
|
347
|
-
|
|
348
|
-
|
|
347
|
+
v("li", null, [
|
|
348
|
+
v("button", {
|
|
349
349
|
type: "button",
|
|
350
350
|
disabled: r.value.length === 0 || r.value[0] === 1,
|
|
351
351
|
"aria-label": e.labels.previousPages,
|
|
352
352
|
title: e.labels.previousPages,
|
|
353
|
-
onClick:
|
|
353
|
+
onClick: S[2] || (S[2] = (b) => h(-1))
|
|
354
354
|
}, [
|
|
355
|
-
|
|
355
|
+
A(_(ke), {
|
|
356
356
|
direction: "left",
|
|
357
357
|
size: "1em"
|
|
358
358
|
})
|
|
359
|
-
], 8,
|
|
359
|
+
], 8, Et)
|
|
360
360
|
]),
|
|
361
|
-
(d(!0),
|
|
362
|
-
|
|
361
|
+
(d(!0), f(K, null, Y(r.value, (b) => (d(), f("li", { key: b }, [
|
|
362
|
+
v("button", {
|
|
363
363
|
type: "button",
|
|
364
|
-
class: O(["dwui-pagination-page", { "dwui-current":
|
|
365
|
-
"aria-current":
|
|
366
|
-
onClick: (
|
|
367
|
-
},
|
|
364
|
+
class: O(["dwui-pagination-page", { "dwui-current": b === n.value }]),
|
|
365
|
+
"aria-current": b === n.value ? "page" : void 0,
|
|
366
|
+
onClick: (L) => c(b)
|
|
367
|
+
}, N(b), 11, Tt)
|
|
368
368
|
]))), 128)),
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
v("li", null, [
|
|
370
|
+
v("button", {
|
|
371
371
|
type: "button",
|
|
372
372
|
disabled: r.value.length === 0 || r.value[r.value.length - 1] === l.value,
|
|
373
373
|
"aria-label": e.labels.nextPages,
|
|
374
374
|
title: e.labels.nextPages,
|
|
375
|
-
onClick:
|
|
375
|
+
onClick: S[3] || (S[3] = (b) => h(1))
|
|
376
376
|
}, [
|
|
377
|
-
|
|
377
|
+
A(_(ke), {
|
|
378
378
|
direction: "right",
|
|
379
379
|
size: "1em"
|
|
380
380
|
})
|
|
381
|
-
], 8,
|
|
381
|
+
], 8, Mt)
|
|
382
382
|
]),
|
|
383
|
-
|
|
384
|
-
|
|
383
|
+
v("li", null, [
|
|
384
|
+
v("button", {
|
|
385
385
|
type: "button",
|
|
386
386
|
disabled: l.value <= n.value,
|
|
387
387
|
"aria-label": e.labels.nextPage,
|
|
388
388
|
title: e.labels.nextPage,
|
|
389
|
-
onClick:
|
|
389
|
+
onClick: S[4] || (S[4] = (b) => c(n.value + 1))
|
|
390
390
|
}, [
|
|
391
|
-
|
|
391
|
+
A(_($e), {
|
|
392
392
|
direction: "right",
|
|
393
393
|
size: "1em",
|
|
394
394
|
"stroke-width": 8
|
|
395
395
|
})
|
|
396
|
-
], 8,
|
|
396
|
+
], 8, At)
|
|
397
397
|
]),
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
v("li", null, [
|
|
399
|
+
v("button", {
|
|
400
400
|
type: "button",
|
|
401
401
|
disabled: l.value <= n.value,
|
|
402
402
|
"aria-label": e.labels.lastPage,
|
|
403
403
|
title: e.labels.lastPage,
|
|
404
|
-
onClick:
|
|
404
|
+
onClick: S[5] || (S[5] = (b) => c(l.value))
|
|
405
405
|
}, [
|
|
406
|
-
|
|
406
|
+
A(_(_e), {
|
|
407
407
|
direction: "right",
|
|
408
408
|
size: "1em",
|
|
409
409
|
"stroke-width": 8
|
|
410
410
|
})
|
|
411
|
-
], 8,
|
|
411
|
+
], 8, Dt)
|
|
412
412
|
])
|
|
413
413
|
]),
|
|
414
|
-
e.showPageSelect ? (d(),
|
|
415
|
-
|
|
416
|
-
|
|
414
|
+
e.showPageSelect ? (d(), f("label", It, [
|
|
415
|
+
v("span", null, N(e.labels.pageNumber), 1),
|
|
416
|
+
v("select", {
|
|
417
417
|
value: n.value,
|
|
418
418
|
disabled: l.value <= 1,
|
|
419
419
|
onPointerenter: u,
|
|
420
|
-
onPointerleave:
|
|
420
|
+
onPointerleave: k,
|
|
421
421
|
onFocus: x,
|
|
422
|
-
onBlur:
|
|
422
|
+
onBlur: $,
|
|
423
423
|
onChange: m
|
|
424
424
|
}, [
|
|
425
|
-
(d(!0),
|
|
426
|
-
key:
|
|
427
|
-
value:
|
|
428
|
-
},
|
|
429
|
-
], 40,
|
|
430
|
-
])) :
|
|
425
|
+
(d(!0), f(K, null, Y(p.value, (b) => (d(), f("option", {
|
|
426
|
+
key: b,
|
|
427
|
+
value: b
|
|
428
|
+
}, N(b) + " (" + N((b - 1) * e.limit + 1) + " - " + N(Math.min(b * e.limit, e.totalCount)) + ") ", 9, Nt))), 128))
|
|
429
|
+
], 40, Ot)
|
|
430
|
+
])) : M("", !0)
|
|
431
431
|
]));
|
|
432
432
|
}
|
|
433
|
-
}),
|
|
433
|
+
}), zt = { class: "dwui-data-table-controls" }, Rt = { class: "dwui-data-table-tools" }, jt = {
|
|
434
434
|
key: 0,
|
|
435
435
|
class: "dwui-data-table-total"
|
|
436
|
-
},
|
|
436
|
+
}, Wt = { class: "dwui-data-table-total-count" }, Kt = {
|
|
437
437
|
key: 1,
|
|
438
438
|
class: "dwui-data-table-limit"
|
|
439
|
-
},
|
|
439
|
+
}, Ft = ["value", "max"], Vt = ["title", "aria-label"], Gt = ["title", "aria-label"], Se = /* @__PURE__ */ D({
|
|
440
440
|
__name: "data-table-controls",
|
|
441
441
|
props: {
|
|
442
442
|
pagination: { type: Boolean },
|
|
@@ -459,8 +459,8 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
459
459
|
const r = p.target, c = Math.min(Math.max(Math.trunc(Number(r.value)) || 1, 1), e.maxLimit);
|
|
460
460
|
r.value = String(c), c !== e.limit && t("emit:changeLimit", c);
|
|
461
461
|
};
|
|
462
|
-
return (p, r) => (d(),
|
|
463
|
-
e.pagination ? (d(), j(
|
|
462
|
+
return (p, r) => (d(), f("div", zt, [
|
|
463
|
+
e.pagination ? (d(), j(Ht, {
|
|
464
464
|
key: 0,
|
|
465
465
|
current: e.current,
|
|
466
466
|
"total-count": e.totalCount,
|
|
@@ -469,46 +469,46 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
469
469
|
"show-page-select": e.showPageSelect,
|
|
470
470
|
labels: e.labels,
|
|
471
471
|
"onEmit:changePage": r[0] || (r[0] = (c) => t("emit:changePage", c))
|
|
472
|
-
}, null, 8, ["current", "total-count", "limit", "max-pagination", "show-page-select", "labels"])) :
|
|
473
|
-
|
|
474
|
-
e.showTotal ? (d(),
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
])) :
|
|
479
|
-
e.showLimit ? (d(),
|
|
480
|
-
|
|
481
|
-
|
|
472
|
+
}, null, 8, ["current", "total-count", "limit", "max-pagination", "show-page-select", "labels"])) : M("", !0),
|
|
473
|
+
v("div", Rt, [
|
|
474
|
+
e.showTotal ? (d(), f("span", jt, [
|
|
475
|
+
v("span", null, N(e.labels.totalCount), 1),
|
|
476
|
+
v("span", Wt, N(n.value), 1),
|
|
477
|
+
v("span", null, N(e.labels.totalUnit), 1)
|
|
478
|
+
])) : M("", !0),
|
|
479
|
+
e.showLimit ? (d(), f("label", Kt, [
|
|
480
|
+
v("span", null, N(e.labels.limit), 1),
|
|
481
|
+
v("input", {
|
|
482
482
|
type: "number",
|
|
483
483
|
value: e.limit,
|
|
484
484
|
min: "1",
|
|
485
485
|
max: e.maxLimit,
|
|
486
486
|
step: "1",
|
|
487
487
|
onChange: s
|
|
488
|
-
}, null, 40,
|
|
489
|
-
])) :
|
|
490
|
-
e.showDownloadPage ? (d(),
|
|
488
|
+
}, null, 40, Ft)
|
|
489
|
+
])) : M("", !0),
|
|
490
|
+
e.showDownloadPage ? (d(), f("button", {
|
|
491
491
|
key: 2,
|
|
492
492
|
type: "button",
|
|
493
493
|
title: e.labels.downloadPage,
|
|
494
494
|
"aria-label": e.labels.downloadPage,
|
|
495
495
|
onClick: r[1] || (r[1] = (c) => t("emit:downloadPage"))
|
|
496
496
|
}, [
|
|
497
|
-
|
|
498
|
-
], 8,
|
|
499
|
-
e.showDownloadAll ? (d(),
|
|
497
|
+
A(_(tt))
|
|
498
|
+
], 8, Vt)) : M("", !0),
|
|
499
|
+
e.showDownloadAll ? (d(), f("button", {
|
|
500
500
|
key: 3,
|
|
501
501
|
type: "button",
|
|
502
502
|
title: e.labels.downloadAll,
|
|
503
503
|
"aria-label": e.labels.downloadAll,
|
|
504
504
|
onClick: r[2] || (r[2] = (c) => t("emit:downloadAll"))
|
|
505
505
|
}, [
|
|
506
|
-
|
|
507
|
-
], 8,
|
|
506
|
+
A(_(ot))
|
|
507
|
+
], 8, Gt)) : M("", !0)
|
|
508
508
|
])
|
|
509
509
|
]));
|
|
510
510
|
}
|
|
511
|
-
}),
|
|
511
|
+
}), Pe = (a, o) => {
|
|
512
512
|
let e = a;
|
|
513
513
|
for (const t of o.replace(/\[(\w+)\]/g, ".$1").split(".")) {
|
|
514
514
|
if (e == null)
|
|
@@ -516,7 +516,7 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
516
516
|
e = e[t];
|
|
517
517
|
}
|
|
518
518
|
return e;
|
|
519
|
-
},
|
|
519
|
+
}, Ce = (a) => typeof a == "function" ? a() : a ?? "", xe = (a) => a === !0 || a === "true" || a === "1" || a === "on" || a === 1, Be = (a) => typeof a == "number" ? a : Number(String(a).replace(/[^+\-\d.]/g, "")), Ut = (a, o, e) => {
|
|
520
520
|
if (a == null && o == null)
|
|
521
521
|
return 0;
|
|
522
522
|
if (a == null)
|
|
@@ -527,9 +527,9 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
527
527
|
return 0;
|
|
528
528
|
switch (e) {
|
|
529
529
|
case "boolean":
|
|
530
|
-
return (
|
|
530
|
+
return (xe(a) ? 1 : 0) - (xe(o) ? 1 : 0);
|
|
531
531
|
case "number": {
|
|
532
|
-
const t =
|
|
532
|
+
const t = Be(a), l = Be(o);
|
|
533
533
|
return Number.isNaN(t) || Number.isNaN(l) ? (Number.isNaN(t) ? 0 : 1) - (Number.isNaN(l) ? 0 : 1) : t - l;
|
|
534
534
|
}
|
|
535
535
|
case "object":
|
|
@@ -543,13 +543,13 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
543
543
|
} catch {
|
|
544
544
|
return "";
|
|
545
545
|
}
|
|
546
|
-
},
|
|
546
|
+
}, Xt = ["rowspan", "colspan", "title", "aria-sort"], Yt = { class: "dwui-data-table-header" }, qt = ["role", "tabindex", "onClick", "onKeydown"], Qt = ["innerHTML"], Jt = { key: 2 }, Zt = ["onPointerdown"], eo = {
|
|
547
547
|
key: 0,
|
|
548
548
|
class: "dwui-data-table-no-data"
|
|
549
|
-
},
|
|
549
|
+
}, to = ["colspan"], oo = {
|
|
550
550
|
key: 0,
|
|
551
551
|
class: "dwui-data-table-loading"
|
|
552
|
-
},
|
|
552
|
+
}, qo = /* @__PURE__ */ D({
|
|
553
553
|
__name: "data-table",
|
|
554
554
|
props: {
|
|
555
555
|
dataList: {},
|
|
@@ -579,11 +579,11 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
579
579
|
labels: { default: void 0 },
|
|
580
580
|
formatTotalCount: { type: Function, default: void 0 }
|
|
581
581
|
},
|
|
582
|
-
emits: ["emit:selectRow", "emit:changeSort", "emit:
|
|
582
|
+
emits: ["emit:selectRow", "emit:changeSort", "emit:updateHeader", "emit:dblclickRow", "emit:changeLimit", "emit:changePage", "emit:downloadPage", "emit:downloadAll"],
|
|
583
583
|
setup(a, { expose: o, emit: e }) {
|
|
584
584
|
const t = a, l = e, n = B(), s = B(), p = B(), r = B({}), c = B(""), h = B(!1), m = B();
|
|
585
585
|
let u;
|
|
586
|
-
const
|
|
586
|
+
const k = T(() => t.headers.map((i) => r.value[i.id] == null ? i : { ...i, width: r.value[i.id] })), x = T(() => {
|
|
587
587
|
const i = {
|
|
588
588
|
totalCount: "Total",
|
|
589
589
|
totalUnit: "",
|
|
@@ -599,234 +599,238 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
599
599
|
nextPage: "Next page",
|
|
600
600
|
lastPage: "Last page",
|
|
601
601
|
...t.labels
|
|
602
|
-
},
|
|
603
|
-
for (const
|
|
604
|
-
const
|
|
605
|
-
|
|
602
|
+
}, g = {};
|
|
603
|
+
for (const y of Object.keys(i)) {
|
|
604
|
+
const E = i[y];
|
|
605
|
+
g[y] = typeof E == "function" ? E() : E;
|
|
606
606
|
}
|
|
607
|
-
return
|
|
608
|
-
}),
|
|
607
|
+
return g;
|
|
608
|
+
}), $ = T(() => Math.min(t.limit, t.maxLimit)), w = T(() => ({
|
|
609
609
|
showTotal: t.showTotal,
|
|
610
610
|
showLimit: t.showLimit,
|
|
611
611
|
showPageSelect: t.showPageSelect,
|
|
612
612
|
showDownloadPage: t.showDownloadPage,
|
|
613
613
|
showDownloadAll: t.showDownloadAll,
|
|
614
614
|
current: t.current,
|
|
615
|
-
limit:
|
|
615
|
+
limit: $.value,
|
|
616
616
|
maxLimit: t.maxLimit,
|
|
617
617
|
maxPagination: t.maxPagination,
|
|
618
618
|
totalCount: t.totalCount ?? t.dataList.length,
|
|
619
619
|
formatTotalCount: t.formatTotalCount,
|
|
620
620
|
labels: x.value
|
|
621
|
-
})),
|
|
622
|
-
const i =
|
|
621
|
+
})), S = Ue(void 0), b = T(() => {
|
|
622
|
+
const i = t.sortMode === "page" ? t.headers.find((y) => y.id === c.value) : void 0;
|
|
623
|
+
if (!i)
|
|
624
|
+
return t.dataList;
|
|
625
|
+
const g = i.compare ?? ((y, E) => {
|
|
626
|
+
const R = i.sortKey ?? i.id;
|
|
627
|
+
return Ut(Pe(y, R), Pe(E, R), i.type ?? "string");
|
|
628
|
+
});
|
|
629
|
+
return [...t.dataList].sort((y, E) => h.value ? g(E, y) : g(y, E));
|
|
630
|
+
}), L = T(() => {
|
|
631
|
+
const i = S.value;
|
|
623
632
|
if (i == null)
|
|
624
633
|
return -1;
|
|
625
|
-
const
|
|
626
|
-
if (
|
|
627
|
-
return
|
|
628
|
-
const
|
|
629
|
-
return
|
|
630
|
-
}),
|
|
634
|
+
const g = b.value.indexOf(i);
|
|
635
|
+
if (g !== -1)
|
|
636
|
+
return g;
|
|
637
|
+
const y = ce(i);
|
|
638
|
+
return y === "" ? -1 : b.value.findIndex((E) => ce(E) === y);
|
|
639
|
+
}), P = T(() => t.headers.reduce((i, g) => i + (g.colspan == null ? 1 : Number(g.colspan)), 0)), z = (i) => {
|
|
631
640
|
if (i != null)
|
|
632
641
|
return typeof i == "number" ? `${i}px` : i;
|
|
633
|
-
},
|
|
634
|
-
width:
|
|
635
|
-
minWidth:
|
|
636
|
-
maxWidth:
|
|
637
|
-
}),
|
|
642
|
+
}, I = (i) => ({
|
|
643
|
+
width: z(i.width),
|
|
644
|
+
minWidth: z(i.minWidth),
|
|
645
|
+
maxWidth: z(i.maxWidth)
|
|
646
|
+
}), V = (i) => {
|
|
638
647
|
if (c.value === i)
|
|
639
648
|
return h.value ? "descending" : "ascending";
|
|
640
|
-
},
|
|
649
|
+
}, W = (i) => {
|
|
641
650
|
if (!(!t.sortable || c.value !== i))
|
|
642
651
|
return h.value ? "down" : "up";
|
|
643
|
-
},
|
|
644
|
-
l("emit:updateHeader",
|
|
652
|
+
}, q = (i) => (t.current - 1) * $.value + i + 1, fe = () => Array.from(p.value?.children ?? []).filter((i) => i.tagName === "TR" && !i.classList.contains("dwui-data-table-no-data")), je = (i) => Array.from(i.children).filter((g) => g.tagName === "TD" || g.tagName === "TH"), be = () => {
|
|
653
|
+
l("emit:updateHeader", k.value.map((i) => ({ ...i })));
|
|
645
654
|
}, ue = () => {
|
|
646
|
-
|
|
647
|
-
},
|
|
648
|
-
const i = n.value,
|
|
649
|
-
if (!i || !
|
|
655
|
+
fe().forEach((i, g) => i.classList.toggle("dwui-selected", g === L.value));
|
|
656
|
+
}, We = () => {
|
|
657
|
+
const i = n.value, g = fe()[L.value];
|
|
658
|
+
if (!i || !g)
|
|
650
659
|
return;
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
}, re = (i,
|
|
654
|
-
|
|
655
|
-
},
|
|
656
|
-
t.selectable && (
|
|
657
|
-
},
|
|
658
|
-
|
|
659
|
-
},
|
|
660
|
-
if (i.target !== i.currentTarget ||
|
|
660
|
+
const y = s.value?.offsetHeight ?? 0, E = g.offsetTop, R = E + g.offsetHeight;
|
|
661
|
+
E < i.scrollTop + y ? i.scrollTop = E - y : i.scrollTop + i.clientHeight < R && (i.scrollTop = R - i.clientHeight);
|
|
662
|
+
}, re = (i, g) => {
|
|
663
|
+
S.value = i, l("emit:selectRow", i, g);
|
|
664
|
+
}, he = (i, g) => {
|
|
665
|
+
t.selectable && (g === L.value ? re(void 0, -1) : (re(i, g), n.value?.focus({ preventScroll: !0 })));
|
|
666
|
+
}, Ke = (i, g) => {
|
|
667
|
+
g !== L.value && he(i, g), l("emit:dblclickRow", i, g);
|
|
668
|
+
}, Fe = (i) => {
|
|
669
|
+
if (i.target !== i.currentTarget || L.value < 0 || i.key !== "ArrowUp" && i.key !== "ArrowDown")
|
|
661
670
|
return;
|
|
662
|
-
const
|
|
663
|
-
|
|
671
|
+
const g = L.value + (i.key === "ArrowUp" ? -1 : 1);
|
|
672
|
+
g < 0 || b.value.length <= g || (i.preventDefault(), re(b.value[g], g));
|
|
664
673
|
}, pe = (i) => {
|
|
665
|
-
|
|
674
|
+
!t.sortable || t.dataList.length === 0 || (h.value = c.value === i.id ? !h.value : !1, c.value = i.id, l("emit:changeSort", {
|
|
666
675
|
sortKey: c.value,
|
|
667
676
|
descending: h.value
|
|
668
|
-
})
|
|
669
|
-
|
|
670
|
-
const v = i.compare ?? ((L, I) => {
|
|
671
|
-
const Y = i.sortKey ?? i.id;
|
|
672
|
-
return Gt(Se(L, Y), Se(I, Y), i.type ?? "string");
|
|
673
|
-
}), _ = [...t.dataList].sort((L, I) => h.value ? v(I, L) : v(L, I));
|
|
674
|
-
l("emit:sortData", _);
|
|
675
|
-
}, Fe = (i, v) => {
|
|
677
|
+
}));
|
|
678
|
+
}, Ve = (i, g) => {
|
|
676
679
|
if (!t.resizable)
|
|
677
680
|
return;
|
|
678
681
|
i.preventDefault();
|
|
679
|
-
const
|
|
680
|
-
for (const [
|
|
681
|
-
r.value[t.headers[
|
|
682
|
-
m.value = { index:
|
|
683
|
-
},
|
|
682
|
+
const y = s.value?.firstElementChild, E = y ? je(y) : [];
|
|
683
|
+
for (const [R, ne] of E.entries())
|
|
684
|
+
r.value[t.headers[R].id] = ne.getBoundingClientRect().width;
|
|
685
|
+
m.value = { index: g, x: i.clientX }, i.currentTarget.setPointerCapture(i.pointerId), be();
|
|
686
|
+
}, Ge = (i) => {
|
|
684
687
|
if (!m.value)
|
|
685
688
|
return;
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
689
|
+
const g = i.clientX - m.value.x;
|
|
690
|
+
if (g === 0)
|
|
688
691
|
return;
|
|
689
692
|
m.value.x = i.clientX;
|
|
690
|
-
const
|
|
691
|
-
r.value[
|
|
692
|
-
const
|
|
693
|
-
for (const
|
|
694
|
-
r.value[
|
|
695
|
-
},
|
|
696
|
-
m.value && (m.value = void 0,
|
|
693
|
+
const y = m.value.index, E = t.headers.map((ne) => ne.id);
|
|
694
|
+
r.value[E[y]] += g;
|
|
695
|
+
const R = g / (E.length - y - 1);
|
|
696
|
+
for (const ne of E.slice(y + 1))
|
|
697
|
+
r.value[ne] -= R;
|
|
698
|
+
}, we = () => {
|
|
699
|
+
m.value && (m.value = void 0, be());
|
|
697
700
|
};
|
|
698
701
|
return G(() => {
|
|
699
702
|
u = new MutationObserver(ue), p.value && u.observe(p.value, { childList: !0 }), ue();
|
|
700
703
|
}), U(() => {
|
|
701
704
|
u?.disconnect();
|
|
702
|
-
}),
|
|
703
|
-
const
|
|
704
|
-
(
|
|
705
|
-
}),
|
|
706
|
-
|
|
707
|
-
}),
|
|
708
|
-
0 <= i &&
|
|
709
|
-
}, { flush: "post" }),
|
|
705
|
+
}), X(() => t.headers, (i, g) => {
|
|
706
|
+
const y = i.map((R) => R.id), E = g.map((R) => R.id);
|
|
707
|
+
(y.length !== E.length || y.some((R) => !E.includes(R))) && (r.value = {});
|
|
708
|
+
}), X(() => t.loading, (i, g) => {
|
|
709
|
+
g && !i && (t.sortMode === "page" && (c.value = "", h.value = !1), S.value != null && re(void 0, -1));
|
|
710
|
+
}), X(L, (i) => {
|
|
711
|
+
0 <= i && We();
|
|
712
|
+
}, { flush: "post" }), X(L, ue, { flush: "post" }), o({
|
|
710
713
|
/** ソートの状態を返す */
|
|
711
714
|
getSortContext: () => ({
|
|
712
715
|
sortKey: c.value,
|
|
713
716
|
descending: h.value
|
|
714
717
|
})
|
|
715
|
-
}), (i,
|
|
718
|
+
}), (i, g) => (d(), f("section", {
|
|
716
719
|
class: O(["dwui-data-table", { "dwui-selectable": t.selectable }])
|
|
717
720
|
}, [
|
|
718
|
-
t.controls === "both" || t.controls === "top" ? (d(), j(
|
|
721
|
+
t.controls === "both" || t.controls === "top" ? (d(), j(Se, le({ key: 0 }, w.value, {
|
|
719
722
|
pagination: t.pagination === "both" || t.pagination === "top",
|
|
720
|
-
"onEmit:changePage":
|
|
721
|
-
"onEmit:changeLimit":
|
|
722
|
-
"onEmit:downloadPage":
|
|
723
|
-
"onEmit:downloadAll":
|
|
724
|
-
}), null, 16, ["pagination"])) :
|
|
725
|
-
|
|
723
|
+
"onEmit:changePage": g[0] || (g[0] = (y) => l("emit:changePage", y)),
|
|
724
|
+
"onEmit:changeLimit": g[1] || (g[1] = (y) => l("emit:changeLimit", y)),
|
|
725
|
+
"onEmit:downloadPage": g[2] || (g[2] = (y) => l("emit:downloadPage")),
|
|
726
|
+
"onEmit:downloadAll": g[3] || (g[3] = (y) => l("emit:downloadAll"))
|
|
727
|
+
}), null, 16, ["pagination"])) : M("", !0),
|
|
728
|
+
v("div", {
|
|
726
729
|
ref_key: "refContent",
|
|
727
730
|
ref: n,
|
|
728
731
|
class: O(["dwui-data-table-content", [{ "dwui-loading": t.loading }, t.contentClass]]),
|
|
729
|
-
style:
|
|
732
|
+
style: F(t.contentStyle),
|
|
730
733
|
tabindex: "-1",
|
|
731
|
-
onKeydown:
|
|
734
|
+
onKeydown: Fe
|
|
732
735
|
}, [
|
|
733
|
-
|
|
736
|
+
v("table", {
|
|
734
737
|
class: O(t.tableClass),
|
|
735
|
-
style:
|
|
738
|
+
style: F(t.tableStyle)
|
|
736
739
|
}, [
|
|
737
|
-
|
|
740
|
+
v("thead", {
|
|
738
741
|
ref_key: "refThead",
|
|
739
742
|
ref: s
|
|
740
743
|
}, [
|
|
741
|
-
|
|
742
|
-
(d(!0),
|
|
743
|
-
key:
|
|
744
|
-
rowspan:
|
|
745
|
-
colspan:
|
|
746
|
-
title:
|
|
747
|
-
style:
|
|
748
|
-
"aria-sort":
|
|
744
|
+
v("tr", null, [
|
|
745
|
+
(d(!0), f(K, null, Y(k.value, (y, E) => (d(), f("th", {
|
|
746
|
+
key: y.id,
|
|
747
|
+
rowspan: y.rowspan,
|
|
748
|
+
colspan: y.colspan,
|
|
749
|
+
title: y.title,
|
|
750
|
+
style: F(I(y)),
|
|
751
|
+
"aria-sort": V(y.id),
|
|
749
752
|
scope: "col"
|
|
750
753
|
}, [
|
|
751
|
-
|
|
752
|
-
|
|
754
|
+
v("div", Yt, [
|
|
755
|
+
v("span", {
|
|
753
756
|
class: "dwui-data-table-sort",
|
|
754
757
|
role: t.sortable ? "button" : void 0,
|
|
755
758
|
tabindex: t.sortable ? 0 : void 0,
|
|
756
|
-
onClick: (
|
|
759
|
+
onClick: (R) => pe(y),
|
|
757
760
|
onKeydown: [
|
|
758
|
-
ge(
|
|
759
|
-
ge(
|
|
761
|
+
ge(ee((R) => pe(y), ["prevent"]), ["enter"]),
|
|
762
|
+
ge(ee((R) => pe(y), ["prevent"]), ["space"])
|
|
760
763
|
]
|
|
761
764
|
}, [
|
|
762
|
-
|
|
765
|
+
W(y.id) ? (d(), j(_(nt), {
|
|
763
766
|
key: 0,
|
|
764
|
-
direction:
|
|
767
|
+
direction: W(y.id),
|
|
765
768
|
size: "0.7em"
|
|
766
|
-
}, null, 8, ["direction"])) :
|
|
767
|
-
|
|
769
|
+
}, null, 8, ["direction"])) : M("", !0),
|
|
770
|
+
y.html ? (d(), f("span", {
|
|
768
771
|
key: 1,
|
|
769
|
-
innerHTML:
|
|
770
|
-
}, null, 8,
|
|
771
|
-
], 40,
|
|
772
|
+
innerHTML: _(Ce)(y.label)
|
|
773
|
+
}, null, 8, Qt)) : (d(), f("span", Jt, N(_(Ce)(y.label)), 1))
|
|
774
|
+
], 40, qt)
|
|
772
775
|
]),
|
|
773
|
-
t.resizable &&
|
|
776
|
+
t.resizable && E < k.value.length - 1 ? (d(), f("div", {
|
|
774
777
|
key: 0,
|
|
775
778
|
class: "dwui-data-table-resizer",
|
|
776
|
-
onPointerdown: (
|
|
777
|
-
onPointermove:
|
|
778
|
-
onPointerup:
|
|
779
|
-
onPointercancel:
|
|
780
|
-
}, null, 40,
|
|
781
|
-
], 12,
|
|
779
|
+
onPointerdown: (R) => Ve(R, E),
|
|
780
|
+
onPointermove: Ge,
|
|
781
|
+
onPointerup: we,
|
|
782
|
+
onPointercancel: we
|
|
783
|
+
}, null, 40, Zt)) : M("", !0)
|
|
784
|
+
], 12, Xt))), 128))
|
|
782
785
|
])
|
|
783
786
|
], 512),
|
|
784
|
-
|
|
787
|
+
v("tbody", {
|
|
785
788
|
ref_key: "refTbody",
|
|
786
789
|
ref: p
|
|
787
790
|
}, [
|
|
788
|
-
t.loading ?
|
|
791
|
+
t.loading ? M("", !0) : (d(), f(K, { key: 0 }, [
|
|
789
792
|
C(i.$slots, "default", {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
793
|
+
rows: b.value,
|
|
794
|
+
clickRow: he,
|
|
795
|
+
dblclickRow: Ke,
|
|
796
|
+
rowNumber: q,
|
|
797
|
+
selectedIndex: L.value
|
|
794
798
|
}),
|
|
795
|
-
t.dataList.length === 0 && t.showNoData ? (d(),
|
|
796
|
-
|
|
797
|
-
])) :
|
|
799
|
+
t.dataList.length === 0 && t.showNoData ? (d(), f("tr", eo, [
|
|
800
|
+
v("td", { colspan: P.value }, N(x.value.noData), 9, to)
|
|
801
|
+
])) : M("", !0)
|
|
798
802
|
], 64))
|
|
799
803
|
], 512)
|
|
800
804
|
], 6),
|
|
801
|
-
t.loading ? (d(),
|
|
805
|
+
t.loading ? (d(), f("div", oo, [
|
|
802
806
|
C(i.$slots, "loading", {}, () => [
|
|
803
|
-
|
|
807
|
+
g[8] || (g[8] = v("div", { class: "dwui-data-table-loading-spinner" }, null, -1))
|
|
804
808
|
])
|
|
805
|
-
])) :
|
|
809
|
+
])) : M("", !0)
|
|
806
810
|
], 38),
|
|
807
|
-
t.controls === "both" || t.controls === "bottom" ? (d(), j(
|
|
811
|
+
t.controls === "both" || t.controls === "bottom" ? (d(), j(Se, le({ key: 1 }, w.value, {
|
|
808
812
|
pagination: t.pagination === "both" || t.pagination === "bottom",
|
|
809
|
-
"onEmit:changePage":
|
|
810
|
-
"onEmit:changeLimit":
|
|
811
|
-
"onEmit:downloadPage":
|
|
812
|
-
"onEmit:downloadAll":
|
|
813
|
-
}), null, 16, ["pagination"])) :
|
|
813
|
+
"onEmit:changePage": g[4] || (g[4] = (y) => l("emit:changePage", y)),
|
|
814
|
+
"onEmit:changeLimit": g[5] || (g[5] = (y) => l("emit:changeLimit", y)),
|
|
815
|
+
"onEmit:downloadPage": g[6] || (g[6] = (y) => l("emit:downloadPage")),
|
|
816
|
+
"onEmit:downloadAll": g[7] || (g[7] = (y) => l("emit:downloadAll"))
|
|
817
|
+
}), null, 16, ["pagination"])) : M("", !0)
|
|
814
818
|
], 2));
|
|
815
819
|
}
|
|
816
|
-
}),
|
|
820
|
+
}), Le = {
|
|
817
821
|
top: "bottom",
|
|
818
822
|
bottom: "top",
|
|
819
823
|
left: "right",
|
|
820
824
|
right: "left"
|
|
821
|
-
}, me = (a, o, e) => Math.min(Math.max(a, o), e),
|
|
825
|
+
}, me = (a, o, e) => Math.min(Math.max(a, o), e), no = (a, o, e, t) => {
|
|
822
826
|
const { offset: l, margin: n, arrowMargin: s } = t, [p, r = "center"] = t.placement.split("-"), c = p === "top" || p === "bottom", h = a.top + a.height, m = a.left + a.width, u = {
|
|
823
827
|
top: a.top - n,
|
|
824
828
|
bottom: e.height - h - n,
|
|
825
829
|
left: a.left - n,
|
|
826
830
|
right: e.width - m - n
|
|
827
|
-
},
|
|
831
|
+
}, $ = (c ? o.height : o.width) + l <= u[p] || u[Le[p]] <= u[p] ? p : Le[p];
|
|
828
832
|
let w;
|
|
829
|
-
switch (
|
|
833
|
+
switch ($) {
|
|
830
834
|
case "top":
|
|
831
835
|
w = a.top - l - o.height;
|
|
832
836
|
break;
|
|
@@ -840,22 +844,22 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
840
844
|
w = m + l;
|
|
841
845
|
break;
|
|
842
846
|
}
|
|
843
|
-
const
|
|
844
|
-
let
|
|
847
|
+
const S = c ? a.left : a.top, b = c ? a.width : a.height, L = c ? o.width : o.height;
|
|
848
|
+
let P;
|
|
845
849
|
switch (r) {
|
|
846
850
|
case "start":
|
|
847
|
-
|
|
851
|
+
P = S;
|
|
848
852
|
break;
|
|
849
853
|
case "end":
|
|
850
|
-
|
|
854
|
+
P = S + b - L;
|
|
851
855
|
break;
|
|
852
856
|
default:
|
|
853
|
-
|
|
857
|
+
P = S + (b - L) / 2;
|
|
854
858
|
break;
|
|
855
859
|
}
|
|
856
|
-
const
|
|
857
|
-
return { top:
|
|
858
|
-
},
|
|
860
|
+
const z = me(c ? w : P, n, Math.max(n, e.height - n - o.height)), I = me(c ? P : w, n, Math.max(n, e.width - n - o.width)), V = S + b / 2, q = me(V - (c ? I : z), s, Math.max(s, L - s));
|
|
861
|
+
return { top: z, left: I, side: $, arrow: q };
|
|
862
|
+
}, lo = ["popover", "data-side"], ao = { class: "dwui-anchored-popover-content" }, Ee = 4, so = 7, io = 12, ro = 8, He = /* @__PURE__ */ D({
|
|
859
863
|
__name: "anchored-popover",
|
|
860
864
|
props: {
|
|
861
865
|
anchor: {},
|
|
@@ -873,14 +877,14 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
873
877
|
const u = n.value;
|
|
874
878
|
if (!t.anchor || !u)
|
|
875
879
|
return;
|
|
876
|
-
const
|
|
880
|
+
const k = {
|
|
877
881
|
width: document.documentElement.clientWidth,
|
|
878
882
|
height: document.documentElement.clientHeight
|
|
879
|
-
}, x =
|
|
883
|
+
}, x = no(t.anchor.getBoundingClientRect(), u.getBoundingClientRect(), k, {
|
|
880
884
|
placement: t.placement,
|
|
881
|
-
offset: t.arrow ?
|
|
882
|
-
margin:
|
|
883
|
-
arrowMargin:
|
|
885
|
+
offset: t.arrow ? Ee + so : Ee,
|
|
886
|
+
margin: ro,
|
|
887
|
+
arrowMargin: io
|
|
884
888
|
});
|
|
885
889
|
s.value = x.side, u.style.top = `${x.top}px`, u.style.left = `${x.left}px`, u.style.setProperty("--dwui-offset-arrow", `${x.arrow}px`), u.style.visibility = "visible";
|
|
886
890
|
}, h = (u) => {
|
|
@@ -895,7 +899,7 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
895
899
|
element: n,
|
|
896
900
|
show: r,
|
|
897
901
|
hide: p
|
|
898
|
-
}), (u,
|
|
902
|
+
}), (u, k) => (d(), f("div", {
|
|
899
903
|
ref_key: "refPanel",
|
|
900
904
|
ref: n,
|
|
901
905
|
class: O(["dwui-anchored-popover", { "dwui-arrow": t.arrow }]),
|
|
@@ -903,12 +907,12 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
903
907
|
"data-side": s.value,
|
|
904
908
|
onToggle: m
|
|
905
909
|
}, [
|
|
906
|
-
|
|
910
|
+
v("div", ao, [
|
|
907
911
|
C(u.$slots, "default")
|
|
908
912
|
])
|
|
909
|
-
], 42,
|
|
913
|
+
], 42, lo));
|
|
910
914
|
}
|
|
911
|
-
}),
|
|
915
|
+
}), co = ["aria-label"], Qo = /* @__PURE__ */ D({
|
|
912
916
|
inheritAttrs: !1,
|
|
913
917
|
__name: "help-button",
|
|
914
918
|
props: {
|
|
@@ -918,23 +922,23 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
918
922
|
},
|
|
919
923
|
emits: ["emit:open", "emit:close"],
|
|
920
924
|
setup(a, { emit: o }) {
|
|
921
|
-
const e = a, t = o, l =
|
|
925
|
+
const e = a, t = o, l = De(), n = B(), s = B();
|
|
922
926
|
return G(() => {
|
|
923
927
|
const p = s.value?.element;
|
|
924
928
|
n.value && p && (n.value.popoverTargetElement = p);
|
|
925
|
-
}), (p, r) => (d(),
|
|
926
|
-
|
|
929
|
+
}), (p, r) => (d(), f(K, null, [
|
|
930
|
+
v("button", le({
|
|
927
931
|
ref_key: "refButton",
|
|
928
932
|
ref: n,
|
|
929
933
|
type: "button",
|
|
930
934
|
class: "dwui-help-button",
|
|
931
935
|
"aria-label": e.label
|
|
932
|
-
},
|
|
936
|
+
}, _(l)), [
|
|
933
937
|
C(p.$slots, "icon", {}, () => [
|
|
934
|
-
|
|
938
|
+
A(_(ve))
|
|
935
939
|
])
|
|
936
|
-
], 16,
|
|
937
|
-
|
|
940
|
+
], 16, co),
|
|
941
|
+
A(He, {
|
|
938
942
|
ref_key: "refPopover",
|
|
939
943
|
ref: s,
|
|
940
944
|
class: "dwui-help-button-popover",
|
|
@@ -945,14 +949,14 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
945
949
|
"onEmit:open": r[0] || (r[0] = (c) => t("emit:open")),
|
|
946
950
|
"onEmit:close": r[1] || (r[1] = (c) => t("emit:close"))
|
|
947
951
|
}, {
|
|
948
|
-
default:
|
|
952
|
+
default: H(() => [
|
|
949
953
|
C(p.$slots, "default")
|
|
950
954
|
]),
|
|
951
955
|
_: 3
|
|
952
956
|
}, 8, ["anchor", "placement", "arrow"])
|
|
953
957
|
], 64));
|
|
954
958
|
}
|
|
955
|
-
}),
|
|
959
|
+
}), uo = ["aria-label", "aria-describedby"], po = 150, ze = /* @__PURE__ */ D({
|
|
956
960
|
inheritAttrs: !1,
|
|
957
961
|
__name: "icon-popper",
|
|
958
962
|
props: {
|
|
@@ -963,7 +967,7 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
963
967
|
},
|
|
964
968
|
emits: ["emit:open", "emit:close"],
|
|
965
969
|
setup(a, { emit: o }) {
|
|
966
|
-
const e = a, t = o, l =
|
|
970
|
+
const e = a, t = o, l = De(), n = B(), s = B(), p = B(!1), r = ae();
|
|
967
971
|
let c;
|
|
968
972
|
const h = () => {
|
|
969
973
|
c !== void 0 && (clearTimeout(c), c = void 0);
|
|
@@ -971,75 +975,75 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
971
975
|
h(), s.value?.show();
|
|
972
976
|
}, u = () => {
|
|
973
977
|
h(), s.value?.hide();
|
|
974
|
-
},
|
|
978
|
+
}, k = () => {
|
|
975
979
|
h(), c = setTimeout(() => {
|
|
976
980
|
c = void 0, s.value?.hide();
|
|
977
|
-
},
|
|
981
|
+
}, po);
|
|
978
982
|
}, x = (W) => {
|
|
979
|
-
const
|
|
980
|
-
!n.value?.contains(
|
|
981
|
-
},
|
|
983
|
+
const q = W.target;
|
|
984
|
+
!n.value?.contains(q) && !s.value?.element?.contains(q) && u();
|
|
985
|
+
}, $ = (W) => {
|
|
982
986
|
W.pointerType !== "touch" && m();
|
|
983
987
|
}, w = (W) => {
|
|
984
|
-
W.pointerType !== "touch" &&
|
|
985
|
-
},
|
|
988
|
+
W.pointerType !== "touch" && k();
|
|
989
|
+
}, S = (W) => {
|
|
986
990
|
W.pointerType !== "touch" && h();
|
|
987
|
-
},
|
|
991
|
+
}, b = (W) => {
|
|
988
992
|
W.pointerType === "touch" && (p.value ? u() : m());
|
|
989
|
-
},
|
|
993
|
+
}, L = () => {
|
|
990
994
|
m();
|
|
991
|
-
},
|
|
995
|
+
}, P = () => {
|
|
992
996
|
u();
|
|
993
|
-
},
|
|
997
|
+
}, z = () => {
|
|
994
998
|
u();
|
|
995
|
-
},
|
|
999
|
+
}, I = () => {
|
|
996
1000
|
p.value = !0, document.addEventListener("pointerdown", x, !0), t("emit:open");
|
|
997
|
-
},
|
|
1001
|
+
}, V = () => {
|
|
998
1002
|
p.value = !1, document.removeEventListener("pointerdown", x, !0), t("emit:close");
|
|
999
1003
|
};
|
|
1000
1004
|
return U(() => {
|
|
1001
1005
|
h(), document.removeEventListener("pointerdown", x, !0);
|
|
1002
|
-
}), (W,
|
|
1003
|
-
|
|
1006
|
+
}), (W, q) => (d(), f(K, null, [
|
|
1007
|
+
v("span", le({
|
|
1004
1008
|
ref_key: "refTrigger",
|
|
1005
1009
|
ref: n,
|
|
1006
1010
|
class: "dwui-icon-popper",
|
|
1007
1011
|
tabindex: "0",
|
|
1008
1012
|
"aria-label": e.label,
|
|
1009
|
-
"aria-describedby":
|
|
1010
|
-
},
|
|
1011
|
-
onPointerenter:
|
|
1013
|
+
"aria-describedby": _(r)
|
|
1014
|
+
}, _(l), {
|
|
1015
|
+
onPointerenter: $,
|
|
1012
1016
|
onPointerleave: w,
|
|
1013
|
-
onPointerdown:
|
|
1014
|
-
onFocus:
|
|
1015
|
-
onBlur:
|
|
1016
|
-
onKeydown: ge(
|
|
1017
|
+
onPointerdown: b,
|
|
1018
|
+
onFocus: L,
|
|
1019
|
+
onBlur: P,
|
|
1020
|
+
onKeydown: ge(z, ["esc"])
|
|
1017
1021
|
}), [
|
|
1018
1022
|
C(W.$slots, "icon")
|
|
1019
|
-
], 16,
|
|
1020
|
-
|
|
1023
|
+
], 16, uo),
|
|
1024
|
+
A(He, {
|
|
1021
1025
|
ref_key: "refPopover",
|
|
1022
1026
|
ref: s,
|
|
1023
|
-
id:
|
|
1027
|
+
id: _(r),
|
|
1024
1028
|
class: O(["dwui-icon-popper-popover", e.popoverClass]),
|
|
1025
1029
|
role: "tooltip",
|
|
1026
1030
|
mode: "manual",
|
|
1027
1031
|
anchor: n.value,
|
|
1028
1032
|
placement: e.placement,
|
|
1029
1033
|
arrow: e.arrow,
|
|
1030
|
-
onPointerenter:
|
|
1034
|
+
onPointerenter: S,
|
|
1031
1035
|
onPointerleave: w,
|
|
1032
|
-
"onEmit:open":
|
|
1033
|
-
"onEmit:close":
|
|
1036
|
+
"onEmit:open": I,
|
|
1037
|
+
"onEmit:close": V
|
|
1034
1038
|
}, {
|
|
1035
|
-
default:
|
|
1039
|
+
default: H(() => [
|
|
1036
1040
|
C(W.$slots, "default")
|
|
1037
1041
|
]),
|
|
1038
1042
|
_: 3
|
|
1039
1043
|
}, 8, ["id", "class", "anchor", "placement", "arrow"])
|
|
1040
1044
|
], 64));
|
|
1041
1045
|
}
|
|
1042
|
-
}),
|
|
1046
|
+
}), Jo = /* @__PURE__ */ D({
|
|
1043
1047
|
__name: "help-popper",
|
|
1044
1048
|
props: {
|
|
1045
1049
|
placement: { default: "right" },
|
|
@@ -1049,7 +1053,7 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1049
1053
|
emits: ["emit:open", "emit:close"],
|
|
1050
1054
|
setup(a, { emit: o }) {
|
|
1051
1055
|
const e = a, t = o;
|
|
1052
|
-
return (l, n) => (d(), j(
|
|
1056
|
+
return (l, n) => (d(), j(ze, {
|
|
1053
1057
|
class: "dwui-help-popper",
|
|
1054
1058
|
"popover-class": "dwui-help-popper-popover",
|
|
1055
1059
|
placement: e.placement,
|
|
@@ -1058,18 +1062,18 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1058
1062
|
"onEmit:open": n[0] || (n[0] = (s) => t("emit:open")),
|
|
1059
1063
|
"onEmit:close": n[1] || (n[1] = (s) => t("emit:close"))
|
|
1060
1064
|
}, {
|
|
1061
|
-
icon:
|
|
1065
|
+
icon: H(() => [
|
|
1062
1066
|
C(l.$slots, "icon", {}, () => [
|
|
1063
|
-
|
|
1067
|
+
A(_(ve))
|
|
1064
1068
|
])
|
|
1065
1069
|
]),
|
|
1066
|
-
default:
|
|
1070
|
+
default: H(() => [
|
|
1067
1071
|
C(l.$slots, "default")
|
|
1068
1072
|
]),
|
|
1069
1073
|
_: 3
|
|
1070
1074
|
}, 8, ["placement", "arrow", "label"]));
|
|
1071
1075
|
}
|
|
1072
|
-
}),
|
|
1076
|
+
}), Zo = /* @__PURE__ */ D({
|
|
1073
1077
|
__name: "hourglass-loading",
|
|
1074
1078
|
props: {
|
|
1075
1079
|
loading: { type: Boolean },
|
|
@@ -1078,14 +1082,14 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1078
1082
|
},
|
|
1079
1083
|
setup(a) {
|
|
1080
1084
|
const o = a;
|
|
1081
|
-
return (e, t) => o.loading ? (d(), j(
|
|
1085
|
+
return (e, t) => o.loading ? (d(), j(_(lt), {
|
|
1082
1086
|
key: 0,
|
|
1083
1087
|
duration: o.duration,
|
|
1084
1088
|
size: o.size,
|
|
1085
1089
|
class: "dwui-hourglass-loading"
|
|
1086
1090
|
}, null, 8, ["duration", "size"])) : C(e.$slots, "default", {}, void 0, void 0, 1);
|
|
1087
1091
|
}
|
|
1088
|
-
}),
|
|
1092
|
+
}), en = /* @__PURE__ */ D({
|
|
1089
1093
|
__name: "intersection-lazy-component",
|
|
1090
1094
|
props: {
|
|
1091
1095
|
root: {},
|
|
@@ -1109,9 +1113,9 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1109
1113
|
p();
|
|
1110
1114
|
}), U(() => {
|
|
1111
1115
|
s?.disconnect();
|
|
1112
|
-
}),
|
|
1116
|
+
}), X(() => [e.root, e.rootMargin, e.threshold], () => {
|
|
1113
1117
|
p();
|
|
1114
|
-
}, { flush: "post" }), (r, c) => (d(),
|
|
1118
|
+
}, { flush: "post" }), (r, c) => (d(), f("div", {
|
|
1115
1119
|
ref_key: "refTarget",
|
|
1116
1120
|
ref: l,
|
|
1117
1121
|
class: "dwui-intersection-lazy-component"
|
|
@@ -1119,10 +1123,10 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1119
1123
|
n.value ? C(r.$slots, "default", {}, void 0, void 0, 0) : C(r.$slots, "placeholder", {}, void 0, void 0, 1)
|
|
1120
1124
|
], 512));
|
|
1121
1125
|
}
|
|
1122
|
-
}),
|
|
1126
|
+
}), mo = {
|
|
1123
1127
|
type: "button",
|
|
1124
1128
|
class: "dwui-label-button"
|
|
1125
|
-
},
|
|
1129
|
+
}, tn = /* @__PURE__ */ D({
|
|
1126
1130
|
__name: "label-button",
|
|
1127
1131
|
props: {
|
|
1128
1132
|
preset: {},
|
|
@@ -1133,9 +1137,9 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1133
1137
|
labelStyle: { type: [Boolean, null, String, Object, Array] }
|
|
1134
1138
|
},
|
|
1135
1139
|
setup(a) {
|
|
1136
|
-
const o = a, e =
|
|
1137
|
-
return (t, l) => (d(),
|
|
1138
|
-
|
|
1140
|
+
const o = a, e = J();
|
|
1141
|
+
return (t, l) => (d(), f("button", mo, [
|
|
1142
|
+
A(oe, {
|
|
1139
1143
|
preset: o.preset,
|
|
1140
1144
|
gap: o.gap,
|
|
1141
1145
|
"icon-class": o.iconClass,
|
|
@@ -1145,14 +1149,14 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1145
1149
|
}, ie({ _: 2 }, [
|
|
1146
1150
|
e.icon != null ? {
|
|
1147
1151
|
name: "icon",
|
|
1148
|
-
fn:
|
|
1152
|
+
fn: H(() => [
|
|
1149
1153
|
C(t.$slots, "icon")
|
|
1150
1154
|
]),
|
|
1151
1155
|
key: "0"
|
|
1152
1156
|
} : void 0,
|
|
1153
1157
|
e.default != null ? {
|
|
1154
1158
|
name: "default",
|
|
1155
|
-
fn:
|
|
1159
|
+
fn: H(() => [
|
|
1156
1160
|
C(t.$slots, "default")
|
|
1157
1161
|
]),
|
|
1158
1162
|
key: "1"
|
|
@@ -1160,12 +1164,12 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1160
1164
|
]), 1032, ["preset", "gap", "icon-class", "icon-style", "label-class", "label-style"])
|
|
1161
1165
|
]));
|
|
1162
1166
|
}
|
|
1163
|
-
}),
|
|
1167
|
+
}), go = ["aria-labelledby", "aria-describedby"], vo = { class: "dwui-modal-dialog-header" }, fo = { class: "dwui-modal-dialog-icon" }, bo = ["id", "innerHTML"], ho = ["id"], wo = ["id"], yo = ["innerHTML"], _o = { key: 1 }, $o = {
|
|
1164
1168
|
key: 0,
|
|
1165
1169
|
class: "dwui-modal-dialog-images"
|
|
1166
|
-
},
|
|
1170
|
+
}, ko = ["src", "alt"], So = ["onClick"], on = /* @__PURE__ */ D({
|
|
1167
1171
|
__name: "modal-dialog",
|
|
1168
|
-
props: /* @__PURE__ */
|
|
1172
|
+
props: /* @__PURE__ */ Q({
|
|
1169
1173
|
type: { default: "info" },
|
|
1170
1174
|
title: { default: void 0 },
|
|
1171
1175
|
message: { default: void 0 },
|
|
@@ -1180,109 +1184,109 @@ const gt = ["disabled"], vt = { class: "dwui-accordion-legend" }, ft = ["aria-ex
|
|
|
1180
1184
|
open: { type: Boolean, default: !1 },
|
|
1181
1185
|
openModifiers: {}
|
|
1182
1186
|
}),
|
|
1183
|
-
emits: /* @__PURE__ */
|
|
1187
|
+
emits: /* @__PURE__ */ Q(["emit:close"], ["update:open"]),
|
|
1184
1188
|
setup(a, { emit: o }) {
|
|
1185
1189
|
const e = a, t = o, l = se(a, "open"), n = B(), s = B(), p = ae(), r = ae(), c = {
|
|
1186
|
-
info:
|
|
1190
|
+
info: st,
|
|
1187
1191
|
confirm: ve,
|
|
1188
|
-
warn:
|
|
1189
|
-
error:
|
|
1192
|
+
warn: Oe,
|
|
1193
|
+
error: at
|
|
1190
1194
|
}, h = ["cancel", "no", "yes", "ok"], m = T(() => e.buttons ?? (e.type === "confirm" ? ["yes", "no"] : ["ok"])), u = T(() => ({
|
|
1191
1195
|
ok: e.okLabel,
|
|
1192
1196
|
yes: e.yesLabel,
|
|
1193
1197
|
no: e.noLabel,
|
|
1194
1198
|
cancel: e.cancelLabel
|
|
1195
|
-
})),
|
|
1196
|
-
src:
|
|
1199
|
+
})), k = T(() => e.message == null ? [] : [e.message].flat()), x = T(() => [e.image ?? []].flat().map((P) => typeof P == "string" ? {
|
|
1200
|
+
src: P,
|
|
1197
1201
|
alt: ""
|
|
1198
|
-
} :
|
|
1199
|
-
|
|
1200
|
-
}, w = (
|
|
1201
|
-
|
|
1202
|
-
},
|
|
1203
|
-
if (
|
|
1202
|
+
} : P)), $ = (P) => {
|
|
1203
|
+
L(P);
|
|
1204
|
+
}, w = (P) => {
|
|
1205
|
+
P.preventDefault(), L("cancel");
|
|
1206
|
+
}, S = (P) => {
|
|
1207
|
+
if (P.key !== "ArrowLeft" && P.key !== "ArrowRight")
|
|
1204
1208
|
return;
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1207
|
-
},
|
|
1209
|
+
const z = [...s.value?.children ?? []], I = z.indexOf(document.activeElement);
|
|
1210
|
+
I < 0 || z[P.key === "ArrowRight" ? I + 1 : I - 1]?.focus();
|
|
1211
|
+
}, b = () => {
|
|
1208
1212
|
n.value?.showModal();
|
|
1209
|
-
const
|
|
1210
|
-
s.value?.children[
|
|
1211
|
-
},
|
|
1212
|
-
n.value?.close(), l.value = !1, t("emit:close",
|
|
1213
|
+
const P = h.find((I) => m.value.includes(I)), z = P ? m.value.indexOf(P) : -1;
|
|
1214
|
+
s.value?.children[z]?.focus();
|
|
1215
|
+
}, L = (P) => {
|
|
1216
|
+
n.value?.close(), l.value = !1, t("emit:close", P);
|
|
1213
1217
|
};
|
|
1214
1218
|
return G(() => {
|
|
1215
|
-
l.value &&
|
|
1216
|
-
}),
|
|
1217
|
-
|
|
1218
|
-
}, { flush: "post" }), (
|
|
1219
|
+
l.value && b();
|
|
1220
|
+
}), X(l, (P) => {
|
|
1221
|
+
P ? b() : n.value?.close();
|
|
1222
|
+
}, { flush: "post" }), (P, z) => (d(), f("dialog", {
|
|
1219
1223
|
ref_key: "refDialog",
|
|
1220
1224
|
ref: n,
|
|
1221
1225
|
class: O(["dwui-modal-dialog", `dwui-modal-dialog-${e.type}`]),
|
|
1222
|
-
"aria-labelledby": e.title ?
|
|
1223
|
-
"aria-describedby":
|
|
1226
|
+
"aria-labelledby": e.title ? _(p) : void 0,
|
|
1227
|
+
"aria-describedby": _(r),
|
|
1224
1228
|
onCancel: w,
|
|
1225
|
-
onKeydown:
|
|
1229
|
+
onKeydown: S
|
|
1226
1230
|
}, [
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
C(
|
|
1230
|
-
(d(), j(
|
|
1231
|
+
v("div", vo, [
|
|
1232
|
+
v("span", fo, [
|
|
1233
|
+
C(P.$slots, "icon", {}, () => [
|
|
1234
|
+
(d(), j(te(c[e.type])))
|
|
1231
1235
|
])
|
|
1232
1236
|
]),
|
|
1233
|
-
e.title ? (d(),
|
|
1234
|
-
e.html ? (d(),
|
|
1237
|
+
e.title ? (d(), f(K, { key: 0 }, [
|
|
1238
|
+
e.html ? (d(), f("span", {
|
|
1235
1239
|
key: 0,
|
|
1236
|
-
id:
|
|
1240
|
+
id: _(p),
|
|
1237
1241
|
class: "dwui-modal-dialog-title",
|
|
1238
1242
|
innerHTML: e.title
|
|
1239
|
-
}, null, 8,
|
|
1243
|
+
}, null, 8, bo)) : (d(), f("span", {
|
|
1240
1244
|
key: 1,
|
|
1241
|
-
id:
|
|
1245
|
+
id: _(p),
|
|
1242
1246
|
class: "dwui-modal-dialog-title"
|
|
1243
|
-
},
|
|
1244
|
-
], 64)) :
|
|
1247
|
+
}, N(e.title), 9, ho))
|
|
1248
|
+
], 64)) : M("", !0)
|
|
1245
1249
|
]),
|
|
1246
|
-
|
|
1247
|
-
id:
|
|
1250
|
+
v("div", {
|
|
1251
|
+
id: _(r),
|
|
1248
1252
|
class: "dwui-modal-dialog-body"
|
|
1249
1253
|
}, [
|
|
1250
|
-
C(
|
|
1251
|
-
(d(!0),
|
|
1252
|
-
e.html ? (d(),
|
|
1254
|
+
C(P.$slots, "default", {}, () => [
|
|
1255
|
+
(d(!0), f(K, null, Y(k.value, (I, V) => (d(), f(K, { key: V }, [
|
|
1256
|
+
e.html ? (d(), f("p", {
|
|
1253
1257
|
key: 0,
|
|
1254
|
-
innerHTML:
|
|
1255
|
-
}, null, 8,
|
|
1258
|
+
innerHTML: I
|
|
1259
|
+
}, null, 8, yo)) : (d(), f("p", _o, N(I), 1))
|
|
1256
1260
|
], 64))), 128)),
|
|
1257
|
-
x.value.length ? (d(),
|
|
1258
|
-
(d(!0),
|
|
1259
|
-
key:
|
|
1260
|
-
src:
|
|
1261
|
-
alt:
|
|
1262
|
-
}, null, 8,
|
|
1263
|
-
])) :
|
|
1261
|
+
x.value.length ? (d(), f("div", $o, [
|
|
1262
|
+
(d(!0), f(K, null, Y(x.value, (I, V) => (d(), f("img", {
|
|
1263
|
+
key: V,
|
|
1264
|
+
src: I.src,
|
|
1265
|
+
alt: I.alt
|
|
1266
|
+
}, null, 8, ko))), 128))
|
|
1267
|
+
])) : M("", !0)
|
|
1264
1268
|
])
|
|
1265
|
-
], 8,
|
|
1266
|
-
|
|
1269
|
+
], 8, wo),
|
|
1270
|
+
v("div", {
|
|
1267
1271
|
ref_key: "refButtons",
|
|
1268
1272
|
ref: s,
|
|
1269
1273
|
class: "dwui-modal-dialog-buttons"
|
|
1270
1274
|
}, [
|
|
1271
|
-
(d(!0),
|
|
1272
|
-
key:
|
|
1275
|
+
(d(!0), f(K, null, Y(m.value, (I) => (d(), f("button", {
|
|
1276
|
+
key: I,
|
|
1273
1277
|
type: "button",
|
|
1274
|
-
class: O(["dwui-modal-dialog-button", `dwui-modal-dialog-button-${
|
|
1275
|
-
onClick: (
|
|
1276
|
-
},
|
|
1278
|
+
class: O(["dwui-modal-dialog-button", `dwui-modal-dialog-button-${I}`]),
|
|
1279
|
+
onClick: (V) => $(I)
|
|
1280
|
+
}, N(u.value[I]), 11, So))), 128))
|
|
1277
1281
|
], 512)
|
|
1278
|
-
], 42,
|
|
1282
|
+
], 42, go));
|
|
1279
1283
|
}
|
|
1280
1284
|
});
|
|
1281
|
-
function
|
|
1282
|
-
const o = a.minWidth ?? 20, e = a.minHeight ?? 20, t = B(!1), l = B(!1), n =
|
|
1285
|
+
function Po(a) {
|
|
1286
|
+
const o = a.minWidth ?? 20, e = a.minHeight ?? 20, t = B(!1), l = B(!1), n = ye({
|
|
1283
1287
|
x: 0,
|
|
1284
1288
|
y: 0
|
|
1285
|
-
}), s =
|
|
1289
|
+
}), s = ye({
|
|
1286
1290
|
width: -1,
|
|
1287
1291
|
height: -1
|
|
1288
1292
|
});
|
|
@@ -1290,66 +1294,66 @@ function So(a) {
|
|
|
1290
1294
|
x: 0,
|
|
1291
1295
|
y: 0
|
|
1292
1296
|
};
|
|
1293
|
-
const h = (
|
|
1294
|
-
if (
|
|
1297
|
+
const h = (b) => {
|
|
1298
|
+
if (b.pointerId !== p)
|
|
1295
1299
|
return;
|
|
1296
|
-
|
|
1297
|
-
const
|
|
1300
|
+
b.preventDefault();
|
|
1301
|
+
const L = b.clientX - c.x, P = b.clientY - c.y;
|
|
1298
1302
|
if (c = {
|
|
1299
|
-
x:
|
|
1300
|
-
y:
|
|
1303
|
+
x: b.clientX,
|
|
1304
|
+
y: b.clientY
|
|
1301
1305
|
}, t.value)
|
|
1302
|
-
n.x +=
|
|
1306
|
+
n.x += L, n.y += P;
|
|
1303
1307
|
else if (l.value) {
|
|
1304
1308
|
if (r.endsWith("left")) {
|
|
1305
|
-
const
|
|
1306
|
-
n.x += s.width -
|
|
1309
|
+
const z = Math.max(o, s.width - L);
|
|
1310
|
+
n.x += s.width - z, s.width = z;
|
|
1307
1311
|
} else
|
|
1308
|
-
s.width = Math.max(o, s.width +
|
|
1312
|
+
s.width = Math.max(o, s.width + L);
|
|
1309
1313
|
if (r.startsWith("top")) {
|
|
1310
|
-
const
|
|
1311
|
-
n.y += s.height -
|
|
1314
|
+
const z = Math.max(e, s.height - P);
|
|
1315
|
+
n.y += s.height - z, s.height = z;
|
|
1312
1316
|
} else
|
|
1313
|
-
s.height = Math.max(e, s.height +
|
|
1317
|
+
s.height = Math.max(e, s.height + P);
|
|
1314
1318
|
}
|
|
1315
1319
|
}, m = () => {
|
|
1316
|
-
const
|
|
1317
|
-
n.x < 40 -
|
|
1318
|
-
}, u = (
|
|
1319
|
-
if (
|
|
1320
|
+
const b = a.target.value?.getBoundingClientRect().width || 0;
|
|
1321
|
+
n.x < 40 - b && (n.x = 40 - b), window.innerWidth - 40 < n.x && (n.x = window.innerWidth - 40), n.y < 0 && (n.y = 0), a.clampBottom && window.innerHeight - 20 < n.y && (n.y = window.innerHeight - 20);
|
|
1322
|
+
}, u = (b) => {
|
|
1323
|
+
if (b.pointerId !== p)
|
|
1320
1324
|
return;
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1323
|
-
},
|
|
1325
|
+
const L = t.value;
|
|
1326
|
+
k(), L && m();
|
|
1327
|
+
}, k = () => {
|
|
1324
1328
|
document.removeEventListener("pointermove", h, !0), document.removeEventListener("pointerup", u, !0), document.removeEventListener("pointercancel", u, !0), p = null, t.value = !1, l.value = !1;
|
|
1325
|
-
}, x = (
|
|
1326
|
-
|
|
1327
|
-
x:
|
|
1328
|
-
y:
|
|
1329
|
+
}, x = (b) => {
|
|
1330
|
+
k(), p = b.pointerId, c = {
|
|
1331
|
+
x: b.clientX,
|
|
1332
|
+
y: b.clientY
|
|
1329
1333
|
}, document.addEventListener("pointermove", h, !0), document.addEventListener("pointerup", u, !0), document.addEventListener("pointercancel", u, !0);
|
|
1330
|
-
},
|
|
1331
|
-
|
|
1332
|
-
}, w = (
|
|
1333
|
-
|
|
1334
|
-
},
|
|
1335
|
-
if (!
|
|
1334
|
+
}, $ = (b) => {
|
|
1335
|
+
b.isPrimary && a.dragMode() === "body" && (x(b), t.value = !0);
|
|
1336
|
+
}, w = (b) => {
|
|
1337
|
+
b.isPrimary && a.dragMode() === "header" && (x(b), t.value = !0);
|
|
1338
|
+
}, S = (b, L = "bottom-right") => {
|
|
1339
|
+
if (!b.isPrimary)
|
|
1336
1340
|
return;
|
|
1337
|
-
r =
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1341
|
+
r = L;
|
|
1342
|
+
const P = a.target.value?.getBoundingClientRect();
|
|
1343
|
+
P && (s.width < 0 && (s.width = P.width), s.height < 0 && (s.height = P.height)), x(b), l.value = !0;
|
|
1340
1344
|
};
|
|
1341
|
-
return U(
|
|
1345
|
+
return U(k), {
|
|
1342
1346
|
moving: t,
|
|
1343
1347
|
resizing: l,
|
|
1344
1348
|
currentPosition: n,
|
|
1345
1349
|
currentRect: s,
|
|
1346
|
-
onDragStart:
|
|
1350
|
+
onDragStart: $,
|
|
1347
1351
|
onDragHeaderStart: w,
|
|
1348
|
-
onResizeStart:
|
|
1349
|
-
teardown:
|
|
1352
|
+
onResizeStart: S,
|
|
1353
|
+
teardown: k
|
|
1350
1354
|
};
|
|
1351
1355
|
}
|
|
1352
|
-
const
|
|
1356
|
+
const Co = ["aria-labelledby"], xo = ["id"], Bo = ["aria-label"], Lo = ["onPointerdown"], Eo = /* @__PURE__ */ D({
|
|
1353
1357
|
__name: "movable-window",
|
|
1354
1358
|
props: {
|
|
1355
1359
|
name: {},
|
|
@@ -1362,7 +1366,7 @@ const Po = ["aria-labelledby"], Co = ["id"], xo = ["aria-label"], Bo = ["onPoint
|
|
|
1362
1366
|
},
|
|
1363
1367
|
emits: ["emit:close"],
|
|
1364
1368
|
setup(a, { expose: o, emit: e }) {
|
|
1365
|
-
const t = a, l = e, n = B(), s = ae(), p = ["top-left", "top-right", "bottom-left"], r =
|
|
1369
|
+
const t = a, l = e, n = B(), s = ae(), p = ["top-left", "top-right", "bottom-left"], r = Po({
|
|
1366
1370
|
target: n,
|
|
1367
1371
|
dragMode: () => t.dragMode,
|
|
1368
1372
|
clampBottom: t.clampBottom
|
|
@@ -1384,73 +1388,73 @@ const Po = ["aria-labelledby"], Co = ["id"], xo = ["aria-label"], Bo = ["onPoint
|
|
|
1384
1388
|
size: r.currentRect,
|
|
1385
1389
|
/** ドラッグ・リサイズのリスナーを解除する */
|
|
1386
1390
|
teardown: r.teardown
|
|
1387
|
-
}), (h, m) => (d(),
|
|
1391
|
+
}), (h, m) => (d(), f("div", {
|
|
1388
1392
|
ref_key: "refWindow",
|
|
1389
1393
|
ref: n,
|
|
1390
1394
|
class: "dwui-movable-window",
|
|
1391
1395
|
role: "dialog",
|
|
1392
|
-
"aria-labelledby":
|
|
1393
|
-
style:
|
|
1396
|
+
"aria-labelledby": _(s),
|
|
1397
|
+
style: F(c.value)
|
|
1394
1398
|
}, [
|
|
1395
|
-
|
|
1399
|
+
v("div", {
|
|
1396
1400
|
class: "dwui-movable-window-frame",
|
|
1397
1401
|
onPointerdown: m[2] || (m[2] = //@ts-ignore
|
|
1398
|
-
(...u) =>
|
|
1402
|
+
(...u) => _(r).onDragStart && _(r).onDragStart(...u))
|
|
1399
1403
|
}, [
|
|
1400
|
-
|
|
1404
|
+
v("div", {
|
|
1401
1405
|
class: O(["dwui-movable-window-header", [`${t.name}-header`, t.headerClass, { "dwui-movable": t.dragMode }]]),
|
|
1402
|
-
style:
|
|
1406
|
+
style: F(t.headerStyle),
|
|
1403
1407
|
onPointerdown: m[1] || (m[1] = //@ts-ignore
|
|
1404
|
-
(...u) =>
|
|
1408
|
+
(...u) => _(r).onDragHeaderStart && _(r).onDragHeaderStart(...u))
|
|
1405
1409
|
}, [
|
|
1406
|
-
|
|
1407
|
-
id:
|
|
1410
|
+
v("div", {
|
|
1411
|
+
id: _(s),
|
|
1408
1412
|
class: O(["dwui-movable-window-title", `${t.name}-title`])
|
|
1409
1413
|
}, [
|
|
1410
1414
|
C(h.$slots, "title")
|
|
1411
|
-
], 10,
|
|
1415
|
+
], 10, xo),
|
|
1412
1416
|
C(h.$slots, "actions"),
|
|
1413
|
-
|
|
1417
|
+
v("button", {
|
|
1414
1418
|
type: "button",
|
|
1415
1419
|
class: O(["dwui-movable-window-close-button", `${t.name}-close-button`]),
|
|
1416
1420
|
"aria-label": t.closeLabel,
|
|
1417
1421
|
onClick: m[0] || (m[0] = (u) => l("emit:close"))
|
|
1418
1422
|
}, [
|
|
1419
|
-
|
|
1420
|
-
], 10,
|
|
1423
|
+
A(_(it))
|
|
1424
|
+
], 10, Bo)
|
|
1421
1425
|
], 38),
|
|
1422
|
-
|
|
1426
|
+
v("div", {
|
|
1423
1427
|
class: O(["dwui-movable-window-body", [`${t.name}-body`, { "dwui-movable": t.dragMode === "body" }]])
|
|
1424
1428
|
}, [
|
|
1425
1429
|
C(h.$slots, "default")
|
|
1426
1430
|
], 2)
|
|
1427
1431
|
], 32),
|
|
1428
|
-
t.loading ? (d(),
|
|
1432
|
+
t.loading ? (d(), f("div", {
|
|
1429
1433
|
key: 0,
|
|
1430
1434
|
class: O(["dwui-movable-window-loading", `${t.name}-loading`])
|
|
1431
1435
|
}, [
|
|
1432
|
-
|
|
1436
|
+
v("div", {
|
|
1433
1437
|
class: O(["dwui-movable-window-spinner", `${t.name}-spinner`])
|
|
1434
1438
|
}, null, 2)
|
|
1435
|
-
], 2)) :
|
|
1436
|
-
(d(),
|
|
1439
|
+
], 2)) : M("", !0),
|
|
1440
|
+
(d(), f(K, null, Y(p, (u) => v("div", {
|
|
1437
1441
|
key: u,
|
|
1438
1442
|
class: O(["dwui-movable-window-corner", [`${t.name}-corner`, `dwui-${u}`]]),
|
|
1439
|
-
onPointerdown:
|
|
1440
|
-
}, null, 42,
|
|
1441
|
-
|
|
1443
|
+
onPointerdown: ee((k) => _(r).onResizeStart(k, u), ["prevent"])
|
|
1444
|
+
}, null, 42, Lo)), 64)),
|
|
1445
|
+
v("div", {
|
|
1442
1446
|
class: O(["dwui-movable-window-resizer", `${t.name}-resizer`]),
|
|
1443
|
-
onPointerdown: m[3] || (m[3] =
|
|
1447
|
+
onPointerdown: m[3] || (m[3] = ee((u) => _(r).onResizeStart(u, "bottom-right"), ["prevent"]))
|
|
1444
1448
|
}, [
|
|
1445
|
-
|
|
1449
|
+
A(_(rt), { direction: "bottom-right" })
|
|
1446
1450
|
], 34)
|
|
1447
|
-
], 12,
|
|
1451
|
+
], 12, Co));
|
|
1448
1452
|
}
|
|
1449
1453
|
}), de = [];
|
|
1450
|
-
let
|
|
1451
|
-
const
|
|
1454
|
+
let Te = 0;
|
|
1455
|
+
const To = () => (Te += 1, Te), nn = /* @__PURE__ */ D({
|
|
1452
1456
|
__name: "overlay-box",
|
|
1453
|
-
props: /* @__PURE__ */
|
|
1457
|
+
props: /* @__PURE__ */ Q({
|
|
1454
1458
|
title: { default: void 0 },
|
|
1455
1459
|
dragMode: { default: void 0 },
|
|
1456
1460
|
closeOnBackdrop: { type: Boolean, default: !1 },
|
|
@@ -1460,7 +1464,7 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1460
1464
|
open: { type: Boolean, default: !1 },
|
|
1461
1465
|
openModifiers: {}
|
|
1462
1466
|
}),
|
|
1463
|
-
emits: /* @__PURE__ */
|
|
1467
|
+
emits: /* @__PURE__ */ Q(["emit:close"], ["update:open"]),
|
|
1464
1468
|
setup(a, { emit: o }) {
|
|
1465
1469
|
const e = a, t = o, l = se(a, "open"), n = B(), s = B(0), p = /* @__PURE__ */ Symbol("dwui-overlay-box");
|
|
1466
1470
|
let r = null;
|
|
@@ -1472,37 +1476,37 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1472
1476
|
w.key !== "Escape" || !w.isTrusted || w.isComposing || w.target instanceof Element && w.target.closest("dialog") || de.at(-1) === p && (l.value = !1);
|
|
1473
1477
|
}, u = () => {
|
|
1474
1478
|
t("emit:close");
|
|
1475
|
-
},
|
|
1479
|
+
}, k = () => {
|
|
1476
1480
|
const w = de.indexOf(p);
|
|
1477
1481
|
0 <= w && de.splice(w, 1);
|
|
1478
1482
|
}, x = () => {
|
|
1479
|
-
s.value =
|
|
1480
|
-
const w = n.value,
|
|
1481
|
-
w && (w.position.x = (window.innerWidth - (
|
|
1482
|
-
},
|
|
1483
|
-
n.value?.teardown(),
|
|
1483
|
+
s.value = To();
|
|
1484
|
+
const w = n.value, S = w?.element?.getBoundingClientRect();
|
|
1485
|
+
w && (w.position.x = (window.innerWidth - (S?.width || 0)) / 2, w.position.y = Math.max(0, (window.innerHeight - (S?.height || 0)) / 2)), r = document.activeElement instanceof HTMLElement ? document.activeElement : null, w?.element?.focus(), de.push(p);
|
|
1486
|
+
}, $ = () => {
|
|
1487
|
+
n.value?.teardown(), k(), r?.isConnected && r.focus(), r = null;
|
|
1484
1488
|
};
|
|
1485
1489
|
return G(() => {
|
|
1486
1490
|
l.value && x();
|
|
1487
1491
|
}), U(() => {
|
|
1488
|
-
|
|
1489
|
-
}),
|
|
1490
|
-
w ? x() :
|
|
1491
|
-
}, { flush: "post" }), (w,
|
|
1492
|
+
k();
|
|
1493
|
+
}), X(l, (w) => {
|
|
1494
|
+
w ? x() : $();
|
|
1495
|
+
}, { flush: "post" }), (w, S) => (d(), j(Xe, {
|
|
1492
1496
|
name: "dwui-overlay-box-fade",
|
|
1493
1497
|
onAfterLeave: u
|
|
1494
1498
|
}, {
|
|
1495
|
-
default:
|
|
1496
|
-
l.value ? (d(),
|
|
1499
|
+
default: H(() => [
|
|
1500
|
+
l.value ? (d(), f("div", {
|
|
1497
1501
|
key: 0,
|
|
1498
1502
|
class: "dwui-overlay-box",
|
|
1499
|
-
style:
|
|
1503
|
+
style: F({ "--dwui-order-window": s.value })
|
|
1500
1504
|
}, [
|
|
1501
|
-
|
|
1505
|
+
v("div", {
|
|
1502
1506
|
class: "dwui-overlay-box-backdrop",
|
|
1503
1507
|
onClick: c
|
|
1504
1508
|
}),
|
|
1505
|
-
|
|
1509
|
+
A(Eo, {
|
|
1506
1510
|
ref_key: "refWindow",
|
|
1507
1511
|
ref: n,
|
|
1508
1512
|
class: "dwui-overlay-box-container",
|
|
@@ -1515,22 +1519,22 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1515
1519
|
onKeydown: m,
|
|
1516
1520
|
"onEmit:close": h
|
|
1517
1521
|
}, {
|
|
1518
|
-
title:
|
|
1522
|
+
title: H(() => [
|
|
1519
1523
|
C(w.$slots, "title", {}, () => [
|
|
1520
|
-
|
|
1524
|
+
Z(N(e.title), 1)
|
|
1521
1525
|
])
|
|
1522
1526
|
]),
|
|
1523
|
-
default:
|
|
1527
|
+
default: H(() => [
|
|
1524
1528
|
C(w.$slots, "default")
|
|
1525
1529
|
]),
|
|
1526
1530
|
_: 3
|
|
1527
1531
|
}, 8, ["drag-mode", "loading", "close-label"])
|
|
1528
|
-
], 4)) :
|
|
1532
|
+
], 4)) : M("", !0)
|
|
1529
1533
|
]),
|
|
1530
1534
|
_: 3
|
|
1531
1535
|
}));
|
|
1532
1536
|
}
|
|
1533
|
-
}),
|
|
1537
|
+
}), Mo = { class: "dwui-page-section" }, Ao = { class: "dwui-page-section-content" }, ln = /* @__PURE__ */ D({
|
|
1534
1538
|
__name: "page-section",
|
|
1535
1539
|
props: {
|
|
1536
1540
|
title: {},
|
|
@@ -1542,11 +1546,11 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1542
1546
|
},
|
|
1543
1547
|
setup(a) {
|
|
1544
1548
|
const o = a, e = {
|
|
1545
|
-
diamond: { component:
|
|
1546
|
-
circle: { component:
|
|
1547
|
-
square: { component:
|
|
1548
|
-
pushpin: { component:
|
|
1549
|
-
"round-pushpin": { component:
|
|
1549
|
+
diamond: { component: mt, shape: !0, color: "#1a44b6" },
|
|
1550
|
+
circle: { component: pt, shape: !0, color: "#e78b2f" },
|
|
1551
|
+
square: { component: ut, shape: !0, color: "#d13a2b" },
|
|
1552
|
+
pushpin: { component: ct, shape: !1 },
|
|
1553
|
+
"round-pushpin": { component: dt, shape: !1 }
|
|
1550
1554
|
}, t = T(() => {
|
|
1551
1555
|
const l = e[o.icon];
|
|
1552
1556
|
return {
|
|
@@ -1554,60 +1558,60 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1554
1558
|
props: l.shape ? { variant: o.iconVariant, color: o.iconColor ?? l.color } : {}
|
|
1555
1559
|
};
|
|
1556
1560
|
});
|
|
1557
|
-
return (l, n) => (d(),
|
|
1558
|
-
o.title != null ? (d(),
|
|
1561
|
+
return (l, n) => (d(), f("section", Mo, [
|
|
1562
|
+
o.title != null ? (d(), f("div", {
|
|
1559
1563
|
key: 0,
|
|
1560
1564
|
class: O(["dwui-page-section-title", o.titleClass]),
|
|
1561
|
-
style:
|
|
1565
|
+
style: F(o.titleStyle)
|
|
1562
1566
|
}, [
|
|
1563
|
-
|
|
1564
|
-
icon:
|
|
1567
|
+
A(oe, null, {
|
|
1568
|
+
icon: H(() => [
|
|
1565
1569
|
C(l.$slots, "icon", {}, () => [
|
|
1566
|
-
(d(), j(
|
|
1570
|
+
(d(), j(te(t.value.component), Me(Ae(t.value.props)), null, 16))
|
|
1567
1571
|
])
|
|
1568
1572
|
]),
|
|
1569
|
-
default:
|
|
1570
|
-
|
|
1573
|
+
default: H(() => [
|
|
1574
|
+
Z(" " + N(o.title), 1)
|
|
1571
1575
|
]),
|
|
1572
1576
|
_: 3
|
|
1573
1577
|
})
|
|
1574
|
-
], 6)) :
|
|
1575
|
-
|
|
1578
|
+
], 6)) : M("", !0),
|
|
1579
|
+
v("div", Ao, [
|
|
1576
1580
|
C(l.$slots, "default")
|
|
1577
1581
|
])
|
|
1578
1582
|
]));
|
|
1579
1583
|
}
|
|
1580
|
-
}),
|
|
1584
|
+
}), Do = { class: "dwui-page-title" }, Io = {
|
|
1581
1585
|
key: 0,
|
|
1582
1586
|
class: "dwui-page-title-actions"
|
|
1583
|
-
},
|
|
1587
|
+
}, an = /* @__PURE__ */ D({
|
|
1584
1588
|
__name: "page-title",
|
|
1585
1589
|
props: {
|
|
1586
1590
|
title: {}
|
|
1587
1591
|
},
|
|
1588
1592
|
setup(a) {
|
|
1589
|
-
const o = a, e =
|
|
1590
|
-
return (t, l) => (d(),
|
|
1591
|
-
|
|
1592
|
-
default:
|
|
1593
|
-
|
|
1593
|
+
const o = a, e = J();
|
|
1594
|
+
return (t, l) => (d(), f("section", Do, [
|
|
1595
|
+
A(oe, { class: "dwui-page-title-label" }, ie({
|
|
1596
|
+
default: H(() => [
|
|
1597
|
+
Z(" " + N(o.title), 1)
|
|
1594
1598
|
]),
|
|
1595
1599
|
_: 2
|
|
1596
1600
|
}, [
|
|
1597
1601
|
e.icon != null ? {
|
|
1598
1602
|
name: "icon",
|
|
1599
|
-
fn:
|
|
1603
|
+
fn: H(() => [
|
|
1600
1604
|
C(t.$slots, "icon")
|
|
1601
1605
|
]),
|
|
1602
1606
|
key: "0"
|
|
1603
1607
|
} : void 0
|
|
1604
1608
|
]), 1024),
|
|
1605
|
-
e.default != null ? (d(),
|
|
1609
|
+
e.default != null ? (d(), f("span", Io, [
|
|
1606
1610
|
C(t.$slots, "default")
|
|
1607
|
-
])) :
|
|
1611
|
+
])) : M("", !0)
|
|
1608
1612
|
]));
|
|
1609
1613
|
}
|
|
1610
|
-
}),
|
|
1614
|
+
}), sn = /* @__PURE__ */ D({
|
|
1611
1615
|
__name: "screen-loading",
|
|
1612
1616
|
props: {
|
|
1613
1617
|
loading: { type: Boolean }
|
|
@@ -1624,26 +1628,26 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1624
1628
|
o.loading && t();
|
|
1625
1629
|
}), U(() => {
|
|
1626
1630
|
l();
|
|
1627
|
-
}),
|
|
1631
|
+
}), X(() => o.loading, (n) => {
|
|
1628
1632
|
n ? t() : l();
|
|
1629
|
-
}, { flush: "post" }), (n, s) => (d(),
|
|
1633
|
+
}, { flush: "post" }), (n, s) => (d(), f("dialog", {
|
|
1630
1634
|
ref_key: "refDialog",
|
|
1631
1635
|
ref: e,
|
|
1632
1636
|
class: "dwui-screen-loading",
|
|
1633
1637
|
closedby: "none",
|
|
1634
|
-
onCancel: s[0] || (s[0] =
|
|
1638
|
+
onCancel: s[0] || (s[0] = ee(() => {
|
|
1635
1639
|
}, ["prevent"]))
|
|
1636
1640
|
}, [...s[1] || (s[1] = [
|
|
1637
|
-
|
|
1641
|
+
v("div", { class: "dwui-screen-loading-spinner" }, null, -1)
|
|
1638
1642
|
])], 544));
|
|
1639
1643
|
}
|
|
1640
|
-
}),
|
|
1644
|
+
}), Re = /* @__PURE__ */ Symbol("dwui-tab-group"), Oo = ["id", "aria-labelledby", "aria-busy", "hidden"], No = {
|
|
1641
1645
|
key: 0,
|
|
1642
1646
|
class: "dwui-tab-loading"
|
|
1643
|
-
},
|
|
1647
|
+
}, Ho = {
|
|
1644
1648
|
key: 1,
|
|
1645
1649
|
class: "dwui-tab-loading-spinner"
|
|
1646
|
-
},
|
|
1650
|
+
}, zo = /* @__PURE__ */ D({
|
|
1647
1651
|
__name: "tab-content",
|
|
1648
1652
|
props: {
|
|
1649
1653
|
tabId: {},
|
|
@@ -1654,15 +1658,15 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1654
1658
|
headerStyle: { type: [Boolean, null, String, Object, Array] }
|
|
1655
1659
|
},
|
|
1656
1660
|
setup(a) {
|
|
1657
|
-
const o = a, e =
|
|
1661
|
+
const o = a, e = Ye(Re, void 0), t = B(!1), l = () => e?.loadingSlot(), n = T(() => e?.activeTabId.value === o.tabId), s = T(() => !!e?.mounted.value && n.value), p = (r) => {
|
|
1658
1662
|
t.value = r;
|
|
1659
1663
|
};
|
|
1660
|
-
return (r, c) => o.disabled ?
|
|
1664
|
+
return (r, c) => o.disabled ? M("", !0) : (d(), f("div", {
|
|
1661
1665
|
key: 0,
|
|
1662
|
-
id:
|
|
1666
|
+
id: _(e) ? `${_(e).groupName}-${o.tabId}-panel` : void 0,
|
|
1663
1667
|
class: "dwui-tab-content",
|
|
1664
1668
|
role: "tabpanel",
|
|
1665
|
-
"aria-labelledby":
|
|
1669
|
+
"aria-labelledby": _(e) ? `${_(e).groupName}-${o.tabId}` : void 0,
|
|
1666
1670
|
"aria-busy": t.value ? "true" : void 0,
|
|
1667
1671
|
hidden: !n.value
|
|
1668
1672
|
}, [
|
|
@@ -1670,14 +1674,14 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1670
1674
|
activated: s.value,
|
|
1671
1675
|
setLoading: p
|
|
1672
1676
|
}),
|
|
1673
|
-
t.value ? (d(),
|
|
1674
|
-
l() != null ? (d(), j(
|
|
1675
|
-
])) :
|
|
1676
|
-
], 8,
|
|
1677
|
+
t.value ? (d(), f("div", No, [
|
|
1678
|
+
l() != null ? (d(), j(te(l()), { key: 0 })) : (d(), f("span", Ho))
|
|
1679
|
+
])) : M("", !0)
|
|
1680
|
+
], 8, Oo));
|
|
1677
1681
|
}
|
|
1678
|
-
}),
|
|
1682
|
+
}), Ro = { class: "dwui-tab-group" }, jo = ["id", "name", "disabled", "checked", "aria-selected", "aria-controls", "onChange"], Wo = ["for"], Ko = { class: "dwui-tab-items" }, rn = /* @__PURE__ */ D({
|
|
1679
1683
|
__name: "tab-group",
|
|
1680
|
-
props: /* @__PURE__ */
|
|
1684
|
+
props: /* @__PURE__ */ Q({
|
|
1681
1685
|
tabGroupName: {},
|
|
1682
1686
|
selectFirstEnabled: { type: Boolean },
|
|
1683
1687
|
headerClass: { type: [Boolean, null, String, Object, Array] },
|
|
@@ -1689,8 +1693,8 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1689
1693
|
}),
|
|
1690
1694
|
emits: ["update:selectedTabId"],
|
|
1691
1695
|
setup(a) {
|
|
1692
|
-
const o = a, e = se(a, "selectedTabId"), t =
|
|
1693
|
-
if (h.type !==
|
|
1696
|
+
const o = a, e = se(a, "selectedTabId"), t = J(), l = o.tabGroupName ?? ae(), n = (h) => {
|
|
1697
|
+
if (h.type !== zo)
|
|
1694
1698
|
return;
|
|
1695
1699
|
const m = h.props ?? {}, u = m.disabled;
|
|
1696
1700
|
return {
|
|
@@ -1708,73 +1712,73 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1708
1712
|
const h = [];
|
|
1709
1713
|
for (const m of t.default?.() ?? []) {
|
|
1710
1714
|
const u = Array.isArray(m.children) ? m.children : [m];
|
|
1711
|
-
for (const
|
|
1712
|
-
const x = n(
|
|
1715
|
+
for (const k of u) {
|
|
1716
|
+
const x = n(k);
|
|
1713
1717
|
x && h.push(x);
|
|
1714
1718
|
}
|
|
1715
1719
|
}
|
|
1716
1720
|
return h;
|
|
1717
1721
|
}), p = T(() => e.value != null ? e.value : (o.selectFirstEnabled ? s.value.find((m) => !m.disabled) : s.value[0])?.tabId), r = B(!1);
|
|
1718
|
-
|
|
1722
|
+
qe(Re, { groupName: l, activeTabId: p, mounted: r, loadingSlot: () => t.loading }), G(() => {
|
|
1719
1723
|
r.value = !0;
|
|
1720
1724
|
});
|
|
1721
1725
|
const c = (h) => {
|
|
1722
1726
|
e.value = h;
|
|
1723
1727
|
};
|
|
1724
|
-
return (h, m) => (d(),
|
|
1725
|
-
(d(), j(
|
|
1728
|
+
return (h, m) => (d(), f("div", Ro, [
|
|
1729
|
+
(d(), j(Qe, {
|
|
1726
1730
|
to: o.teleport ?? "body",
|
|
1727
1731
|
disabled: o.teleport == null
|
|
1728
1732
|
}, [
|
|
1729
|
-
|
|
1733
|
+
v("div", {
|
|
1730
1734
|
class: O(["dwui-tab-headers", o.headerClass]),
|
|
1731
1735
|
role: "tablist",
|
|
1732
|
-
style:
|
|
1736
|
+
style: F(o.headerStyle)
|
|
1733
1737
|
}, [
|
|
1734
|
-
(d(!0),
|
|
1738
|
+
(d(!0), f(K, null, Y(s.value, (u) => (d(), f(K, {
|
|
1735
1739
|
key: u.tabId
|
|
1736
1740
|
}, [
|
|
1737
|
-
|
|
1738
|
-
id: `${
|
|
1741
|
+
v("input", {
|
|
1742
|
+
id: `${_(l)}-${u.tabId}`,
|
|
1739
1743
|
type: "radio",
|
|
1740
1744
|
class: "dwui-tab-radio",
|
|
1741
1745
|
role: "tab",
|
|
1742
|
-
name:
|
|
1746
|
+
name: _(l),
|
|
1743
1747
|
disabled: u.disabled,
|
|
1744
1748
|
checked: u.tabId === p.value,
|
|
1745
1749
|
"aria-selected": u.tabId === p.value ? "true" : "false",
|
|
1746
|
-
"aria-controls": `${
|
|
1747
|
-
onChange: (
|
|
1748
|
-
}, null, 40,
|
|
1749
|
-
|
|
1750
|
-
for: `${
|
|
1750
|
+
"aria-controls": `${_(l)}-${u.tabId}-panel`,
|
|
1751
|
+
onChange: (k) => c(u.tabId)
|
|
1752
|
+
}, null, 40, jo),
|
|
1753
|
+
v("label", {
|
|
1754
|
+
for: `${_(l)}-${u.tabId}`,
|
|
1751
1755
|
class: O(["dwui-tab-item", [u.status != null ? `dwui-tab-${u.status}` : void 0, u.headerClass]]),
|
|
1752
|
-
style:
|
|
1756
|
+
style: F(u.headerStyle)
|
|
1753
1757
|
}, [
|
|
1754
|
-
|
|
1755
|
-
default:
|
|
1756
|
-
|
|
1758
|
+
A(oe, null, ie({
|
|
1759
|
+
default: H(() => [
|
|
1760
|
+
Z(" " + N(u.label), 1)
|
|
1757
1761
|
]),
|
|
1758
1762
|
_: 2
|
|
1759
1763
|
}, [
|
|
1760
1764
|
u.icon != null ? {
|
|
1761
1765
|
name: "icon",
|
|
1762
|
-
fn:
|
|
1763
|
-
(d(), j(
|
|
1766
|
+
fn: H(() => [
|
|
1767
|
+
(d(), j(te(u.icon)))
|
|
1764
1768
|
]),
|
|
1765
1769
|
key: "0"
|
|
1766
1770
|
} : void 0
|
|
1767
1771
|
]), 1024)
|
|
1768
|
-
], 14,
|
|
1772
|
+
], 14, Wo)
|
|
1769
1773
|
], 64))), 128))
|
|
1770
1774
|
], 6)
|
|
1771
1775
|
], 8, ["to", "disabled"])),
|
|
1772
|
-
|
|
1776
|
+
v("div", Ko, [
|
|
1773
1777
|
C(h.$slots, "default")
|
|
1774
1778
|
])
|
|
1775
1779
|
]));
|
|
1776
1780
|
}
|
|
1777
|
-
}),
|
|
1781
|
+
}), dn = /* @__PURE__ */ D({
|
|
1778
1782
|
__name: "warning-popper",
|
|
1779
1783
|
props: {
|
|
1780
1784
|
placement: { default: "right" },
|
|
@@ -1784,7 +1788,7 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1784
1788
|
emits: ["emit:open", "emit:close"],
|
|
1785
1789
|
setup(a, { emit: o }) {
|
|
1786
1790
|
const e = a, t = o;
|
|
1787
|
-
return (l, n) => (d(), j(
|
|
1791
|
+
return (l, n) => (d(), j(ze, {
|
|
1788
1792
|
class: "dwui-warning-popper",
|
|
1789
1793
|
"popover-class": "dwui-warning-popper-popover",
|
|
1790
1794
|
placement: e.placement,
|
|
@@ -1793,12 +1797,12 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1793
1797
|
"onEmit:open": n[0] || (n[0] = (s) => t("emit:open")),
|
|
1794
1798
|
"onEmit:close": n[1] || (n[1] = (s) => t("emit:close"))
|
|
1795
1799
|
}, {
|
|
1796
|
-
icon:
|
|
1800
|
+
icon: H(() => [
|
|
1797
1801
|
C(l.$slots, "icon", {}, () => [
|
|
1798
|
-
|
|
1802
|
+
A(_(Oe))
|
|
1799
1803
|
])
|
|
1800
1804
|
]),
|
|
1801
|
-
default:
|
|
1805
|
+
default: H(() => [
|
|
1802
1806
|
C(l.$slots, "default")
|
|
1803
1807
|
]),
|
|
1804
1808
|
_: 3
|
|
@@ -1806,28 +1810,28 @@ const Eo = () => (Ee += 1, Ee), on = /* @__PURE__ */ A({
|
|
|
1806
1810
|
}
|
|
1807
1811
|
});
|
|
1808
1812
|
export {
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1813
|
+
Eo as _,
|
|
1814
|
+
Xo as a,
|
|
1815
|
+
on as b,
|
|
1816
|
+
no as c,
|
|
1817
|
+
nn as d,
|
|
1818
|
+
sn as e,
|
|
1819
|
+
Go as f,
|
|
1820
|
+
Pe as g,
|
|
1821
|
+
Uo as h,
|
|
1822
|
+
Yo as i,
|
|
1823
|
+
qo as j,
|
|
1824
|
+
Qo as k,
|
|
1825
|
+
Jo as l,
|
|
1826
|
+
Zo as m,
|
|
1827
|
+
To as n,
|
|
1828
|
+
en as o,
|
|
1829
|
+
tn as p,
|
|
1830
|
+
oe as q,
|
|
1831
|
+
Ce as r,
|
|
1832
|
+
ln as s,
|
|
1833
|
+
an as t,
|
|
1834
|
+
zo as u,
|
|
1835
|
+
rn as v,
|
|
1836
|
+
dn as w
|
|
1833
1837
|
};
|