@illinois-grad/grad-vue 2.3.4 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/GModal.vue.d.ts +4 -0
- package/dist/components/GPopover.vue.d.ts +2 -2
- package/dist/compose/useOverlayStack.d.ts +10 -0
- package/dist/grad-vue.css +1 -1
- package/dist/grad-vue.js +1 -1
- package/dist/{main-DEKKtASV.js → main-DmtFFIij.js} +991 -972
- package/dist/main-DmtFFIij.js.map +1 -0
- package/dist/plugin.js +1 -1
- package/package.json +1 -1
- package/dist/main-DEKKtASV.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { toArray as
|
|
3
|
-
import { createFocusTrap as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as A, useSlots as Me, useAttrs as lt, computed as x, openBlock as u, createBlock as q, resolveDynamicComponent as fe, mergeProps as ae, unref as g, withCtx as U, createElementBlock as v, Fragment as F, createElementVNode as n, renderSlot as P, normalizeClass as O, inject as be, onMounted as ie, onBeforeUnmount as ce, renderList as Z, createTextVNode as N, toDisplayString as C, createCommentVNode as M, useModel as j, useId as Y, toRef as _e, ref as E, createVNode as W, mergeModels as H, shallowRef as De, watch as Q, toValue as Ie, nextTick as X, useTemplateRef as ge, Teleport as Ee, Transition as $e, normalizeStyle as ve, onBeforeMount as Ne, withModifiers as de, withDirectives as we, vShow as at, getCurrentInstance as We, watchEffect as Fe, reactive as ot, toRaw as qe, vModelCheckbox as Pe, normalizeProps as st, guardReactiveProps as nt, shallowReactive as rt, provide as it } from "vue";
|
|
2
|
+
import { toArray as ut, unrefElement as dt, tryOnScopeDispose as ct, useFocusWithin as vt, useDebounceFn as ft, useClipboard as gt, useResizeObserver as Re } from "@vueuse/core";
|
|
3
|
+
import { createFocusTrap as bt } from "focus-trap";
|
|
4
|
+
const mt = { class: "g-btn--icon" }, pt = { class: "g-btn--label" }, ne = /* @__PURE__ */ A({
|
|
5
5
|
__name: "GButton",
|
|
6
6
|
props: {
|
|
7
7
|
size: { default: "medium" },
|
|
@@ -24,7 +24,7 @@ const ft = { class: "g-btn--icon" }, gt = { class: "g-btn--label" }, ne = /* @__
|
|
|
24
24
|
"mouseleave"
|
|
25
25
|
],
|
|
26
26
|
setup(e) {
|
|
27
|
-
const l = e, t = Me(), a =
|
|
27
|
+
const l = e, t = Me(), a = lt(), o = x(() => [
|
|
28
28
|
"g-btn",
|
|
29
29
|
`g-btn--${l.size}`,
|
|
30
30
|
`g-btn--${l.theme}`,
|
|
@@ -38,30 +38,30 @@ const ft = { class: "g-btn--icon" }, gt = { class: "g-btn--label" }, ne = /* @__
|
|
|
38
38
|
"g-btn-has-icon-svg": !!t.icon
|
|
39
39
|
}
|
|
40
40
|
]);
|
|
41
|
-
return (s,
|
|
41
|
+
return (s, r) => (u(), q(fe(l.component ? l.component : "button"), ae(g(a), {
|
|
42
42
|
to: l.to,
|
|
43
43
|
class: o.value,
|
|
44
44
|
type: l.to ? void 0 : "button",
|
|
45
|
-
onClick:
|
|
46
|
-
onFocus:
|
|
47
|
-
onBlur:
|
|
48
|
-
onKeydown:
|
|
49
|
-
onKeyup:
|
|
50
|
-
onMousedown:
|
|
51
|
-
onMouseup:
|
|
52
|
-
onMouseenter:
|
|
53
|
-
onMouseleave:
|
|
45
|
+
onClick: r[0] || (r[0] = (d) => s.$emit("click", d)),
|
|
46
|
+
onFocus: r[1] || (r[1] = (d) => s.$emit("focus", d)),
|
|
47
|
+
onBlur: r[2] || (r[2] = (d) => s.$emit("blur", d)),
|
|
48
|
+
onKeydown: r[3] || (r[3] = (d) => s.$emit("keydown", d)),
|
|
49
|
+
onKeyup: r[4] || (r[4] = (d) => s.$emit("keyup", d)),
|
|
50
|
+
onMousedown: r[5] || (r[5] = (d) => s.$emit("mousedown", d)),
|
|
51
|
+
onMouseup: r[6] || (r[6] = (d) => s.$emit("mouseup", d)),
|
|
52
|
+
onMouseenter: r[7] || (r[7] = (d) => s.$emit("mouseenter", d)),
|
|
53
|
+
onMouseleave: r[8] || (r[8] = (d) => s.$emit("mouseleave", d))
|
|
54
54
|
}), {
|
|
55
55
|
default: U(() => [
|
|
56
56
|
e.icon || t.icon ? (u(), v(F, { key: 0 }, [
|
|
57
|
-
n("span",
|
|
57
|
+
n("span", mt, [
|
|
58
58
|
t.icon ? P(s.$slots, "icon", { key: 0 }) : (u(), v("span", {
|
|
59
59
|
key: 1,
|
|
60
|
-
class:
|
|
60
|
+
class: O(e.icon + " g-btn--icon-span"),
|
|
61
61
|
"aria-hidden": "true"
|
|
62
62
|
}, null, 2))
|
|
63
63
|
]),
|
|
64
|
-
n("span",
|
|
64
|
+
n("span", pt, [
|
|
65
65
|
P(s.$slots, "default")
|
|
66
66
|
])
|
|
67
67
|
], 64)) : P(s.$slots, "default", { key: 1 })
|
|
@@ -88,7 +88,7 @@ function Ce(e) {
|
|
|
88
88
|
hasErrors: a
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const ht = ["id"], yt = /* @__PURE__ */ A({
|
|
92
92
|
__name: "GFormErrorMessages",
|
|
93
93
|
props: {
|
|
94
94
|
errors: {},
|
|
@@ -117,20 +117,20 @@ const bt = ["id"], mt = /* @__PURE__ */ T({
|
|
|
117
117
|
], -1)),
|
|
118
118
|
N(" " + C(a), 1)
|
|
119
119
|
]))), 128))
|
|
120
|
-
], 8,
|
|
120
|
+
], 8, ht)) : M("", !0);
|
|
121
121
|
}
|
|
122
122
|
}), z = (e, l) => {
|
|
123
123
|
const t = e.__vccOpts || e;
|
|
124
124
|
for (const [a, o] of l)
|
|
125
125
|
t[a] = o;
|
|
126
126
|
return t;
|
|
127
|
-
}, Be = /* @__PURE__ */ z(
|
|
127
|
+
}, Be = /* @__PURE__ */ z(yt, [["__scopeId", "data-v-e3a13c5d"]]), kt = ["for"], wt = ["id"], _t = {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: "g-text-input-prefix"
|
|
130
|
-
},
|
|
130
|
+
}, $t = ["value", "placeholder", "disabled", "aria-invalid"], Ct = {
|
|
131
131
|
key: 1,
|
|
132
132
|
class: "g-text-input-suffix"
|
|
133
|
-
},
|
|
133
|
+
}, xt = /* @__PURE__ */ A({
|
|
134
134
|
inheritAttrs: !1,
|
|
135
135
|
__name: "GTextInput",
|
|
136
136
|
props: /* @__PURE__ */ H({
|
|
@@ -149,94 +149,94 @@ const bt = ["id"], mt = /* @__PURE__ */ T({
|
|
|
149
149
|
}),
|
|
150
150
|
emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
|
|
151
151
|
setup(e, { emit: l }) {
|
|
152
|
-
const t = e, a = j(e, "modelValue"), o = Y(), { displayErrors: s, hasErrors:
|
|
152
|
+
const t = e, a = j(e, "modelValue"), o = Y(), { displayErrors: s, hasErrors: r } = Ce({
|
|
153
153
|
name: t.name,
|
|
154
154
|
value: a,
|
|
155
|
-
errors:
|
|
156
|
-
}), d = l,
|
|
155
|
+
errors: _e(t, "errors")
|
|
156
|
+
}), d = l, i = E(a.value ?? "");
|
|
157
157
|
let c = null;
|
|
158
|
-
function
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
a.value =
|
|
162
|
-
was:
|
|
163
|
-
to:
|
|
158
|
+
function b(f) {
|
|
159
|
+
if (f !== a.value) {
|
|
160
|
+
const p = a.value;
|
|
161
|
+
a.value = f, d("change", {
|
|
162
|
+
was: p,
|
|
163
|
+
to: f
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function m(
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
function m(f) {
|
|
168
|
+
const p = f.target.value;
|
|
169
|
+
i.value = p, c && clearTimeout(c), c = setTimeout(() => {
|
|
170
|
+
b(i.value), c = null;
|
|
171
171
|
}, t.debounce);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
c && (clearTimeout(c), c = null),
|
|
173
|
+
function h(f) {
|
|
174
|
+
c && (clearTimeout(c), c = null), b(f.target.value);
|
|
175
175
|
}
|
|
176
|
-
function L(
|
|
176
|
+
function L(f) {
|
|
177
177
|
c && (clearTimeout(c), c = null), setTimeout(() => {
|
|
178
|
-
const
|
|
179
|
-
|
|
178
|
+
const p = f.target.value;
|
|
179
|
+
b(p);
|
|
180
180
|
}, 0);
|
|
181
181
|
}
|
|
182
|
-
function S(
|
|
183
|
-
(
|
|
182
|
+
function S(f) {
|
|
183
|
+
(f.key === "PageUp" || f.key === "PageDown") && (c && (clearTimeout(c), c = null), b(f.target.value)), f.key === "Enter" && b(f.target.value);
|
|
184
184
|
}
|
|
185
|
-
return (
|
|
186
|
-
class:
|
|
185
|
+
return (f, p) => (u(), v("div", {
|
|
186
|
+
class: O(["g-text-input-wrap", { "g-text-input-has-error": g(r) }])
|
|
187
187
|
}, [
|
|
188
188
|
t.label ? (u(), v("label", {
|
|
189
189
|
key: 0,
|
|
190
|
-
for:
|
|
190
|
+
for: f.$attrs.id || g(o),
|
|
191
191
|
class: "g-text-input-label"
|
|
192
|
-
}, C(t.label), 9,
|
|
193
|
-
|
|
192
|
+
}, C(t.label), 9, kt)) : M("", !0),
|
|
193
|
+
f.$slots.instructions || e.instructions ? (u(), v("div", {
|
|
194
194
|
key: 1,
|
|
195
|
-
id: "instructions-" +
|
|
195
|
+
id: "instructions-" + g(o),
|
|
196
196
|
class: "g-text-input-instructions"
|
|
197
197
|
}, [
|
|
198
|
-
P(
|
|
198
|
+
P(f.$slots, "instructions", {}, () => [
|
|
199
199
|
N(C(e.instructions), 1)
|
|
200
200
|
], !0)
|
|
201
|
-
], 8,
|
|
201
|
+
], 8, wt)) : M("", !0),
|
|
202
202
|
n("div", {
|
|
203
|
-
class:
|
|
203
|
+
class: O([{
|
|
204
204
|
"g-text-input-field-wrapper": !0
|
|
205
205
|
}, `g-text-input-field-wrapper--${e.name || "nameless"}`])
|
|
206
206
|
}, [
|
|
207
|
-
t.prefix ? (u(), v("span",
|
|
207
|
+
t.prefix ? (u(), v("span", _t, C(t.prefix), 1)) : M("", !0),
|
|
208
208
|
n("input", ae({
|
|
209
209
|
value: a.value,
|
|
210
210
|
placeholder: t.placeholder,
|
|
211
211
|
disabled: t.disabled,
|
|
212
212
|
onInput: m,
|
|
213
|
-
onBlur:
|
|
213
|
+
onBlur: h,
|
|
214
214
|
onPaste: L,
|
|
215
215
|
onKeydown: S,
|
|
216
216
|
type: "text",
|
|
217
217
|
class: "g-text-input"
|
|
218
218
|
}, {
|
|
219
|
-
...
|
|
220
|
-
id:
|
|
221
|
-
"aria-describedby":
|
|
222
|
-
"aria-errormessage":
|
|
219
|
+
...f.$attrs,
|
|
220
|
+
id: f.$attrs.id || g(o),
|
|
221
|
+
"aria-describedby": f.$slots.instructions || e.instructions ? "instructions-" + g(o) : void 0,
|
|
222
|
+
"aria-errormessage": g(r) ? "error-message-" + g(o) : void 0
|
|
223
223
|
}, {
|
|
224
|
-
"aria-invalid":
|
|
225
|
-
}), null, 16,
|
|
226
|
-
t.suffix ? (u(), v("span",
|
|
224
|
+
"aria-invalid": g(r) ? "true" : "false"
|
|
225
|
+
}), null, 16, $t),
|
|
226
|
+
t.suffix ? (u(), v("span", Ct, C(t.suffix), 1)) : M("", !0)
|
|
227
227
|
], 2),
|
|
228
228
|
W(Be, {
|
|
229
|
-
errors:
|
|
230
|
-
id: "error-message-" +
|
|
229
|
+
errors: g(s),
|
|
230
|
+
id: "error-message-" + g(o)
|
|
231
231
|
}, null, 8, ["errors", "id"])
|
|
232
232
|
], 2));
|
|
233
233
|
}
|
|
234
|
-
}),
|
|
235
|
-
function
|
|
234
|
+
}), Ve = /* @__PURE__ */ z(xt, [["__scopeId", "data-v-a8882020"]]), Ze = 100, Ye = 200, He = 102;
|
|
235
|
+
function Qe() {
|
|
236
236
|
window._g_overlay_stack_state || (window._g_overlay_stack_state = {
|
|
237
|
-
stack:
|
|
238
|
-
modalStack:
|
|
239
|
-
scrollLockStack:
|
|
237
|
+
stack: E([]),
|
|
238
|
+
modalStack: E([]),
|
|
239
|
+
scrollLockStack: E([]),
|
|
240
240
|
updateBodyScrollLock() {
|
|
241
241
|
if (typeof document < "u")
|
|
242
242
|
if (t.value.length > 0) {
|
|
@@ -252,46 +252,57 @@ function qe() {
|
|
|
252
252
|
function xe(e, l = !1, t = !1) {
|
|
253
253
|
if (!document)
|
|
254
254
|
return {};
|
|
255
|
-
const { stack: a, modalStack: o, scrollLockStack: s, updateBodyScrollLock:
|
|
256
|
-
function
|
|
257
|
-
d.value.push(e), t && !s.value.includes(e) && (s.value.push(e),
|
|
255
|
+
const { stack: a, modalStack: o, scrollLockStack: s, updateBodyScrollLock: r } = Qe(), d = l ? o : a;
|
|
256
|
+
function i() {
|
|
257
|
+
d.value.push(e), t && !s.value.includes(e) && (s.value.push(e), r());
|
|
258
258
|
}
|
|
259
259
|
function c() {
|
|
260
|
-
const
|
|
261
|
-
|
|
260
|
+
const h = d.value.lastIndexOf(e);
|
|
261
|
+
h !== -1 && d.value.splice(h, 1);
|
|
262
262
|
const L = s.value.lastIndexOf(e);
|
|
263
|
-
L !== -1 && (s.value.splice(L, 1),
|
|
263
|
+
L !== -1 && (s.value.splice(L, 1), r());
|
|
264
264
|
}
|
|
265
|
-
const
|
|
266
|
-
const
|
|
267
|
-
return
|
|
265
|
+
const b = x(() => !l && o.value.length > 0 ? !1 : d.value.length > 0 && d.value[d.value.length - 1] === e), m = x(() => {
|
|
266
|
+
const h = d.value.indexOf(e);
|
|
267
|
+
return h === -1 ? 0 : (l ? Ye : Ze) + h;
|
|
268
268
|
});
|
|
269
|
-
return ce(c), { push:
|
|
269
|
+
return ce(c), { push: i, pop: c, isTop: b, zIndex: m };
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function Lt() {
|
|
272
272
|
if (!document)
|
|
273
273
|
return {};
|
|
274
|
-
const { stack: e, modalStack: l, scrollLockStack: t } =
|
|
274
|
+
const { stack: e, modalStack: l, scrollLockStack: t } = Qe(), a = x(() => l.value.length > 0), o = x(
|
|
275
275
|
() => e.value.length > 0 || l.value.length > 0
|
|
276
276
|
), s = x(() => t.value.length > 0);
|
|
277
277
|
return { hasModal: a, hasOverlay: o, hasScrollLock: s };
|
|
278
278
|
}
|
|
279
|
+
function St() {
|
|
280
|
+
if (typeof window > "u" || !window._g_overlay_stack_state)
|
|
281
|
+
return He;
|
|
282
|
+
const { stack: e, modalStack: l } = window._g_overlay_stack_state;
|
|
283
|
+
let t = 0;
|
|
284
|
+
return e.value.forEach((a, o) => {
|
|
285
|
+
t = Math.max(t, Ze + o);
|
|
286
|
+
}), l.value.forEach((a, o) => {
|
|
287
|
+
t = Math.max(t, Ye + o);
|
|
288
|
+
}), t > 0 ? t + 1 : He;
|
|
289
|
+
}
|
|
279
290
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
280
|
-
const
|
|
281
|
-
function
|
|
291
|
+
const It = (e) => e != null;
|
|
292
|
+
function Mt(e, l = {}) {
|
|
282
293
|
let t;
|
|
283
|
-
const { immediate: a, ...o } = l, s =
|
|
284
|
-
t && (t.pause(),
|
|
285
|
-
},
|
|
286
|
-
t && (t.unpause(),
|
|
294
|
+
const { immediate: a, ...o } = l, s = De(!1), r = De(!1), d = (m) => t && t.activate(m), i = (m) => t && t.deactivate(m), c = () => {
|
|
295
|
+
t && (t.pause(), r.value = !0);
|
|
296
|
+
}, b = () => {
|
|
297
|
+
t && (t.unpause(), r.value = !1);
|
|
287
298
|
};
|
|
288
|
-
return Q(x(() =>
|
|
289
|
-
const
|
|
290
|
-
return typeof
|
|
291
|
-
}).filter(
|
|
299
|
+
return Q(x(() => ut(Ie(e)).map((m) => {
|
|
300
|
+
const h = Ie(m);
|
|
301
|
+
return typeof h == "string" ? h : dt(h);
|
|
302
|
+
}).filter(It)), (m) => {
|
|
292
303
|
if (m.length)
|
|
293
304
|
if (!t)
|
|
294
|
-
t =
|
|
305
|
+
t = bt(m, {
|
|
295
306
|
...o,
|
|
296
307
|
onActivate() {
|
|
297
308
|
s.value = !0, l.onActivate && l.onActivate();
|
|
@@ -301,82 +312,82 @@ function xt(e, l = {}) {
|
|
|
301
312
|
}
|
|
302
313
|
}), a && d();
|
|
303
314
|
else {
|
|
304
|
-
const
|
|
305
|
-
t?.updateContainerElements(m), !
|
|
315
|
+
const h = t?.active;
|
|
316
|
+
t?.updateContainerElements(m), !h && a && d();
|
|
306
317
|
}
|
|
307
|
-
}, { flush: "post" }),
|
|
318
|
+
}, { flush: "post" }), ct(() => i()), {
|
|
308
319
|
hasFocus: s,
|
|
309
|
-
isPaused:
|
|
320
|
+
isPaused: r,
|
|
310
321
|
activate: d,
|
|
311
|
-
deactivate:
|
|
322
|
+
deactivate: i,
|
|
312
323
|
pause: c,
|
|
313
|
-
unpause:
|
|
324
|
+
unpause: b
|
|
314
325
|
};
|
|
315
326
|
}
|
|
316
|
-
function
|
|
317
|
-
const a =
|
|
327
|
+
function Ae(e, l, t = !1) {
|
|
328
|
+
const a = E(!1), { activate: o, deactivate: s, pause: r, unpause: d } = Mt(e, {
|
|
318
329
|
immediate: !0,
|
|
319
330
|
clickOutsideDeactivates: t,
|
|
320
331
|
initialFocus: () => {
|
|
321
332
|
if (a.value)
|
|
322
333
|
return !1;
|
|
323
|
-
const
|
|
324
|
-
if (
|
|
325
|
-
return
|
|
334
|
+
const i = e.value?.querySelector("[popover-focus]");
|
|
335
|
+
if (i)
|
|
336
|
+
return i;
|
|
326
337
|
const c = e.value?.querySelector("h2");
|
|
327
338
|
if (c)
|
|
328
339
|
return c;
|
|
329
|
-
const
|
|
340
|
+
const b = e.value?.querySelector(
|
|
330
341
|
"[aria-selected='true']"
|
|
331
342
|
);
|
|
332
|
-
if (
|
|
333
|
-
return
|
|
343
|
+
if (b)
|
|
344
|
+
return b;
|
|
334
345
|
},
|
|
335
346
|
onPostPause: () => a.value = !0,
|
|
336
347
|
onPostUnpause: () => {
|
|
337
|
-
|
|
348
|
+
X(() => {
|
|
338
349
|
a.value = !1;
|
|
339
|
-
}).catch((
|
|
340
|
-
console.error(
|
|
350
|
+
}).catch((i) => {
|
|
351
|
+
console.error(i);
|
|
341
352
|
});
|
|
342
353
|
}
|
|
343
354
|
});
|
|
344
|
-
return Q(l, (
|
|
345
|
-
|
|
355
|
+
return Q(l, (i) => {
|
|
356
|
+
i ? X(() => {
|
|
346
357
|
d();
|
|
347
358
|
}).catch((c) => {
|
|
348
359
|
console.error(c);
|
|
349
|
-
}) :
|
|
350
|
-
}), { activate: o, deactivate: s, pause:
|
|
360
|
+
}) : r();
|
|
361
|
+
}), { activate: o, deactivate: s, pause: r, unpause: d };
|
|
351
362
|
}
|
|
352
363
|
function Te(e, l, t, a, o) {
|
|
353
364
|
function s(d) {
|
|
354
|
-
for (const
|
|
355
|
-
if (
|
|
365
|
+
for (const i of e)
|
|
366
|
+
if (i.value?.contains(d.target))
|
|
356
367
|
return;
|
|
357
368
|
a();
|
|
358
369
|
}
|
|
359
|
-
function
|
|
360
|
-
d.key === "Escape" && t.value && l.value && (d.preventDefault(),
|
|
361
|
-
console.error(
|
|
370
|
+
function r(d) {
|
|
371
|
+
d.key === "Escape" && t.value && l.value && (d.preventDefault(), X(a).catch((i) => {
|
|
372
|
+
console.error(i);
|
|
362
373
|
}));
|
|
363
374
|
}
|
|
364
375
|
ie(() => {
|
|
365
|
-
document.addEventListener("mousedown", s), document.addEventListener("keydown",
|
|
376
|
+
document.addEventListener("mousedown", s), document.addEventListener("keydown", r);
|
|
366
377
|
}), ce(() => {
|
|
367
|
-
document.removeEventListener("mousedown", s), document.removeEventListener("keydown",
|
|
378
|
+
document.removeEventListener("mousedown", s), document.removeEventListener("keydown", r), o();
|
|
368
379
|
});
|
|
369
380
|
}
|
|
370
|
-
function
|
|
371
|
-
const o = a?.gap ?? 8, s = a?.margin ?? 16,
|
|
372
|
-
let d = !1,
|
|
373
|
-
|
|
374
|
-
let
|
|
375
|
-
|
|
376
|
-
const m = e.left + (e.width - l.width) / 2,
|
|
377
|
-
return { top: c, left:
|
|
381
|
+
function Xe(e, l, t, a) {
|
|
382
|
+
const o = a?.gap ?? 8, s = a?.margin ?? 16, r = a?.preferAbove ?? !1;
|
|
383
|
+
let d = !1, i = !1, c;
|
|
384
|
+
r ? e.top - l.height - o > t.top + s ? (c = e.top - l.height - o, d = !0) : e.bottom + l.height + o <= t.bottom - s ? c = e.bottom + o : (c = t.top + s, i = !0) : e.bottom + l.height + o > t.bottom - s && e.top - l.height - o > t.top + s ? (c = e.top - l.height - o, d = !0) : e.bottom + l.height + o > t.bottom - s && e.top - l.height - o <= t.top + s ? (c = t.top + s, i = !0) : c = e.bottom + o;
|
|
385
|
+
let b = e.left + (e.width - l.width) / 2;
|
|
386
|
+
b < t.left + s && (b = t.left + s), b + l.width > t.right - s && (b = t.right - l.width - s), b < t.left + s && (b = t.left + s);
|
|
387
|
+
const m = e.left + (e.width - l.width) / 2, h = b - m;
|
|
388
|
+
return { top: c, left: b, xOffset: h, placedAbove: d, overlay: i };
|
|
378
389
|
}
|
|
379
|
-
const
|
|
390
|
+
const Et = { class: "g-popover-wrap" }, Bt = ["id"], Vt = ["aria-labelledby"], At = /* @__PURE__ */ A({
|
|
380
391
|
__name: "GPopover",
|
|
381
392
|
props: /* @__PURE__ */ H({
|
|
382
393
|
minimal: { type: Boolean, default: !1 }
|
|
@@ -386,106 +397,108 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
386
397
|
}),
|
|
387
398
|
emits: /* @__PURE__ */ H(["show", "hide"], ["update:modelValue"]),
|
|
388
399
|
setup(e, { emit: l }) {
|
|
389
|
-
const t = e, a = l, o = j(e, "modelValue"), s = ge("triggerRef"),
|
|
390
|
-
Te([
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}),
|
|
400
|
+
const t = e, a = l, o = j(e, "modelValue"), s = ge("triggerRef"), r = ge("popoverRef"), d = Y(), { push: i, pop: c, isTop: b, zIndex: m } = xe(d, !0), { activate: h, deactivate: L } = Ae(r, b, !0);
|
|
401
|
+
Te([r, s], b, o, S, c), Q(o, (G) => {
|
|
402
|
+
G ? (X(() => {
|
|
403
|
+
X(() => h());
|
|
404
|
+
}), i(), a("show")) : (L(), c(), a("hide"));
|
|
394
405
|
});
|
|
395
406
|
function S() {
|
|
396
407
|
o.value = !1;
|
|
397
408
|
}
|
|
398
|
-
function
|
|
409
|
+
function f() {
|
|
399
410
|
o.value = !o.value;
|
|
400
411
|
}
|
|
401
|
-
const
|
|
412
|
+
const p = E({ top: 0, left: 0 }), y = E({ left: "50%" }), T = E(!1), w = E(!1);
|
|
402
413
|
let I = null;
|
|
403
414
|
function K() {
|
|
404
|
-
if (!s.value || !
|
|
415
|
+
if (!s.value || !r.value)
|
|
405
416
|
return;
|
|
406
|
-
const
|
|
417
|
+
const G = s.value.getBoundingClientRect(), J = r.value.getBoundingClientRect(), R = window.innerWidth - document.documentElement.clientWidth, te = window.innerWidth - R, ee = new DOMRect(0, 0, te, window.innerHeight), { top: se, left: $, xOffset: V, placedAbove: k, overlay: D } = Xe(G, J, ee, {
|
|
407
418
|
gap: t.minimal ? 0 : 8
|
|
408
419
|
});
|
|
409
|
-
|
|
410
|
-
left: `${
|
|
420
|
+
p.value = { top: se, left: $ }, y.value = {
|
|
421
|
+
left: `${J.width / 2 - V}px`,
|
|
411
422
|
top: k ? "auto" : void 0,
|
|
412
423
|
bottom: k ? "-8px" : void 0
|
|
413
|
-
},
|
|
424
|
+
}, T.value = k, w.value = D;
|
|
414
425
|
}
|
|
415
|
-
return Q(o, (
|
|
416
|
-
|
|
417
|
-
K(), window.addEventListener("resize", K),
|
|
426
|
+
return Q(o, (G) => {
|
|
427
|
+
G ? X(() => {
|
|
428
|
+
K(), window.addEventListener("resize", K), r.value && (I && I.disconnect(), I = new ResizeObserver(
|
|
418
429
|
() => K()
|
|
419
|
-
), I.observe(
|
|
430
|
+
), I.observe(r.value));
|
|
420
431
|
}) : (window.removeEventListener("resize", K), I && I.disconnect());
|
|
421
432
|
}), ce(() => {
|
|
422
433
|
window.removeEventListener("resize", K), I && I.disconnect();
|
|
423
|
-
}), (
|
|
434
|
+
}), (G, J) => (u(), v("div", Et, [
|
|
424
435
|
n("div", {
|
|
425
436
|
ref_key: "triggerRef",
|
|
426
437
|
ref: s,
|
|
427
438
|
class: "g-popover-trigger",
|
|
428
|
-
id: `${
|
|
439
|
+
id: `${g(d)}-trigger`
|
|
429
440
|
}, [
|
|
430
|
-
P(
|
|
431
|
-
], 8,
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
ref_key: "popoverRef",
|
|
440
|
-
ref: i,
|
|
441
|
-
class: G({
|
|
442
|
-
"g-popover": !0,
|
|
443
|
-
"g-popover-above": A.value,
|
|
444
|
-
"g-popover-below": !A.value,
|
|
445
|
-
"g-popover-minimal": e.minimal
|
|
446
|
-
}),
|
|
447
|
-
role: "dialog",
|
|
448
|
-
"aria-modal": "true",
|
|
449
|
-
"aria-labelledby": `${f(d)}-trigger`,
|
|
450
|
-
style: ve({
|
|
451
|
-
top: y.value.top + "px",
|
|
452
|
-
left: y.value.left + "px",
|
|
453
|
-
zIndex: f(m)
|
|
454
|
-
})
|
|
455
|
-
}, [
|
|
456
|
-
!w.value && !e.minimal ? (u(), v("div", {
|
|
441
|
+
P(G.$slots, "trigger", { toggle: f }, void 0, !0)
|
|
442
|
+
], 8, Bt),
|
|
443
|
+
(u(), q(Ee, { to: "#modal-root" }, [
|
|
444
|
+
W($e, {
|
|
445
|
+
name: "g-popover-expand",
|
|
446
|
+
appear: ""
|
|
447
|
+
}, {
|
|
448
|
+
default: U(() => [
|
|
449
|
+
o.value ? (u(), v("div", {
|
|
457
450
|
key: 0,
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
"aria-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
451
|
+
ref_key: "popoverRef",
|
|
452
|
+
ref: r,
|
|
453
|
+
class: O({
|
|
454
|
+
"g-popover": !0,
|
|
455
|
+
"g-popover-above": T.value,
|
|
456
|
+
"g-popover-below": !T.value,
|
|
457
|
+
"g-popover-minimal": e.minimal
|
|
458
|
+
}),
|
|
459
|
+
role: "dialog",
|
|
460
|
+
"aria-modal": "true",
|
|
461
|
+
"aria-labelledby": `${g(d)}-trigger`,
|
|
462
|
+
style: ve({
|
|
463
|
+
top: p.value.top + "px",
|
|
464
|
+
left: p.value.left + "px",
|
|
465
|
+
zIndex: g(m)
|
|
466
|
+
})
|
|
467
|
+
}, [
|
|
468
|
+
!w.value && !e.minimal ? (u(), v("div", {
|
|
469
|
+
key: 0,
|
|
470
|
+
class: O(["g-popover-arrow", { "g-popover-arrow-above": T.value }]),
|
|
471
|
+
style: ve(y.value),
|
|
474
472
|
"aria-hidden": "true"
|
|
475
|
-
},
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
473
|
+
}, null, 6)) : M("", !0),
|
|
474
|
+
P(G.$slots, "default", {}, void 0, !0),
|
|
475
|
+
e.minimal ? M("", !0) : (u(), v("button", {
|
|
476
|
+
key: 1,
|
|
477
|
+
class: "g-popover-close",
|
|
478
|
+
type: "button",
|
|
479
|
+
"aria-label": "Close popover",
|
|
480
|
+
onClick: S
|
|
481
|
+
}, [...J[0] || (J[0] = [
|
|
482
|
+
n("svg", {
|
|
483
|
+
class: "g-popover-close-icon",
|
|
484
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
485
|
+
viewBox: "0 0 51.26 51.26",
|
|
486
|
+
"aria-hidden": "true"
|
|
487
|
+
}, [
|
|
488
|
+
n("path", {
|
|
489
|
+
fill: "currentColor",
|
|
490
|
+
d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
|
|
491
|
+
})
|
|
492
|
+
], -1)
|
|
493
|
+
])]))
|
|
494
|
+
], 14, Vt)) : M("", !0)
|
|
495
|
+
]),
|
|
496
|
+
_: 3
|
|
497
|
+
})
|
|
498
|
+
]))
|
|
486
499
|
]));
|
|
487
500
|
}
|
|
488
|
-
}),
|
|
501
|
+
}), ze = /* @__PURE__ */ z(At, [["__scopeId", "data-v-e720238c"]]), Tt = ["disabled"], zt = { class: "g-select-btn-legend" }, Ot = { class: "g-select-btn-row" }, Gt = ["id", "name", "value", "checked", "disabled", "onChange"], Dt = ["for"], Ft = /* @__PURE__ */ A({
|
|
489
502
|
__name: "GSelectButton",
|
|
490
503
|
props: /* @__PURE__ */ H({
|
|
491
504
|
options: {},
|
|
@@ -500,57 +513,57 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
500
513
|
}),
|
|
501
514
|
emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
|
|
502
515
|
setup(e, { emit: l }) {
|
|
503
|
-
const t = e, a = l, o = j(e, "modelValue"), s = Y(), { displayErrors:
|
|
516
|
+
const t = e, a = l, o = j(e, "modelValue"), s = Y(), { displayErrors: r, hasErrors: d } = Ce({
|
|
504
517
|
name: t.name,
|
|
505
518
|
value: o,
|
|
506
|
-
errors:
|
|
507
|
-
}),
|
|
519
|
+
errors: _e(t, "errors")
|
|
520
|
+
}), i = x(() => t.options.map((h) => typeof h == "string" ? { label: h, value: h } : h)), c = x(() => [
|
|
508
521
|
"g-select-btn-group",
|
|
509
522
|
`g-select-btn-group--${t.size}`
|
|
510
|
-
]),
|
|
523
|
+
]), b = (h) => [
|
|
511
524
|
"g-select-btn",
|
|
512
|
-
|
|
525
|
+
h ? "g-select-btn--selected" : "",
|
|
513
526
|
{ "g-select-btn--disabled": t.disabled }
|
|
514
527
|
];
|
|
515
|
-
function m(
|
|
516
|
-
!t.disabled &&
|
|
528
|
+
function m(h) {
|
|
529
|
+
!t.disabled && h !== o.value && (o.value = h, a("change", h));
|
|
517
530
|
}
|
|
518
|
-
return (
|
|
519
|
-
class:
|
|
531
|
+
return (h, L) => (u(), v("fieldset", {
|
|
532
|
+
class: O(c.value),
|
|
520
533
|
disabled: t.disabled
|
|
521
534
|
}, [
|
|
522
|
-
n("legend",
|
|
535
|
+
n("legend", zt, C(t.label), 1),
|
|
523
536
|
n("div", {
|
|
524
|
-
class:
|
|
537
|
+
class: O(["g-select-btn-wrapper", { "g-select-btn-has-error": g(d) }])
|
|
525
538
|
}, [
|
|
526
|
-
n("div",
|
|
527
|
-
(u(!0), v(F, null, Z(
|
|
539
|
+
n("div", Ot, [
|
|
540
|
+
(u(!0), v(F, null, Z(i.value, (S, f) => (u(), v(F, {
|
|
528
541
|
key: S.value
|
|
529
542
|
}, [
|
|
530
543
|
n("input", {
|
|
531
544
|
class: "g-select-btn-radio",
|
|
532
545
|
type: "radio",
|
|
533
|
-
id: `${
|
|
534
|
-
name: t.name ||
|
|
546
|
+
id: `${g(s)}-${S.value}`,
|
|
547
|
+
name: t.name || g(s),
|
|
535
548
|
value: S.value,
|
|
536
549
|
checked: S.value === o.value,
|
|
537
550
|
disabled: t.disabled,
|
|
538
|
-
onChange: (
|
|
539
|
-
}, null, 40,
|
|
551
|
+
onChange: (p) => m(S.value)
|
|
552
|
+
}, null, 40, Gt),
|
|
540
553
|
n("label", {
|
|
541
|
-
for: `${
|
|
542
|
-
class:
|
|
543
|
-
}, C(S.label), 11,
|
|
554
|
+
for: `${g(s)}-${S.value}`,
|
|
555
|
+
class: O(b(S.value === o.value))
|
|
556
|
+
}, C(S.label), 11, Dt)
|
|
544
557
|
], 64))), 128))
|
|
545
558
|
]),
|
|
546
559
|
W(Be, {
|
|
547
|
-
errors:
|
|
548
|
-
id: "error-message-" +
|
|
560
|
+
errors: g(r),
|
|
561
|
+
id: "error-message-" + g(s)
|
|
549
562
|
}, null, 8, ["errors", "id"])
|
|
550
563
|
], 2)
|
|
551
|
-
], 10,
|
|
564
|
+
], 10, Tt));
|
|
552
565
|
}
|
|
553
|
-
}),
|
|
566
|
+
}), Pt = /* @__PURE__ */ z(Ft, [["__scopeId", "data-v-cde3230c"]]), Rt = ["width", "height"], Ht = ["cx", "cy", "r"], Kt = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"], Ut = ["cx", "cy", "r"], oe = 4, jt = /* @__PURE__ */ A({
|
|
554
567
|
__name: "GProgress",
|
|
555
568
|
props: {
|
|
556
569
|
label: { default: "Loading" },
|
|
@@ -573,7 +586,7 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
573
586
|
}
|
|
574
587
|
}), o = x(() => 2 * Math.PI * a.value), s = x(
|
|
575
588
|
() => t.value ? l.value / 100 * o.value : 0
|
|
576
|
-
),
|
|
589
|
+
), r = x(
|
|
577
590
|
() => t.value ? {
|
|
578
591
|
role: "progressbar",
|
|
579
592
|
"aria-valuenow": l.value,
|
|
@@ -585,11 +598,11 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
585
598
|
"aria-label": l.label
|
|
586
599
|
}
|
|
587
600
|
);
|
|
588
|
-
return (d,
|
|
601
|
+
return (d, i) => (u(), v("span", ae({ class: "g-progress" }, r.value), [
|
|
589
602
|
(u(), v("svg", {
|
|
590
603
|
width: a.value * 2 + oe,
|
|
591
604
|
height: a.value * 2 + oe,
|
|
592
|
-
class:
|
|
605
|
+
class: O([
|
|
593
606
|
"g-progress__svg",
|
|
594
607
|
{
|
|
595
608
|
"g-progress--determinate": t.value,
|
|
@@ -606,7 +619,7 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
606
619
|
r: a.value,
|
|
607
620
|
"stroke-width": oe,
|
|
608
621
|
fill: "none"
|
|
609
|
-
}, null, 8,
|
|
622
|
+
}, null, 8, Ht),
|
|
610
623
|
t.value ? (u(), v("circle", {
|
|
611
624
|
key: 0,
|
|
612
625
|
class: "g-progress__value",
|
|
@@ -618,7 +631,7 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
618
631
|
"stroke-dasharray": o.value,
|
|
619
632
|
"stroke-dashoffset": o.value - s.value,
|
|
620
633
|
style: { transform: "rotate(-90deg)", "transform-origin": "center" }
|
|
621
|
-
}, null, 8,
|
|
634
|
+
}, null, 8, Kt)) : (u(), v("circle", {
|
|
622
635
|
key: 1,
|
|
623
636
|
class: "g-progress__spinner",
|
|
624
637
|
cx: a.value + oe / 2,
|
|
@@ -626,11 +639,11 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
626
639
|
r: a.value,
|
|
627
640
|
"stroke-width": oe,
|
|
628
641
|
fill: "none"
|
|
629
|
-
}, null, 8,
|
|
630
|
-
], 10,
|
|
642
|
+
}, null, 8, Ut))
|
|
643
|
+
], 10, Rt))
|
|
631
644
|
], 16));
|
|
632
645
|
}
|
|
633
|
-
}),
|
|
646
|
+
}), Nt = /* @__PURE__ */ z(jt, [["__scopeId", "data-v-7dccaf49"]]), Wt = ["id", "aria-labelledby", "aria-describedby"], qt = { class: "g-alertdialog-inner" }, Zt = ["id"], Yt = ["id"], Qt = { class: "g-alertdialog-actions" }, Xt = /* @__PURE__ */ A({
|
|
634
647
|
__name: "GAlertDialog",
|
|
635
648
|
props: {
|
|
636
649
|
label: { default: "Confirmation" },
|
|
@@ -639,55 +652,55 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
639
652
|
},
|
|
640
653
|
emits: ["cancel", "confirm"],
|
|
641
654
|
setup(e, { emit: l }) {
|
|
642
|
-
const t = e, a = l, o =
|
|
655
|
+
const t = e, a = l, o = E(null), s = E(!0), r = Y(), { pop: d, push: i, isTop: c, zIndex: b } = xe(r, !0, !0), { deactivate: m, activate: h } = Ae(o, c);
|
|
643
656
|
function L() {
|
|
644
657
|
a("cancel");
|
|
645
658
|
}
|
|
646
659
|
return Te([o], c, s, L, d), ie(() => {
|
|
647
|
-
|
|
648
|
-
}),
|
|
660
|
+
i(), h();
|
|
661
|
+
}), Ne(() => {
|
|
649
662
|
d(), m();
|
|
650
|
-
}), (S,
|
|
651
|
-
W(
|
|
663
|
+
}), (S, f) => (u(), q(Ee, { to: "#modal-root" }, [
|
|
664
|
+
W($e, {
|
|
652
665
|
name: "g-fade",
|
|
653
666
|
appear: ""
|
|
654
667
|
}, {
|
|
655
668
|
default: U(() => [
|
|
656
669
|
n("div", {
|
|
657
|
-
id: "alertdialog-" +
|
|
670
|
+
id: "alertdialog-" + g(r),
|
|
658
671
|
class: "g-alertdialog",
|
|
659
672
|
role: "alertdialog",
|
|
660
673
|
"aria-modal": "true",
|
|
661
|
-
"aria-labelledby": "alertdialog-label-" +
|
|
662
|
-
"aria-describedby": "alertdialog-description-" +
|
|
674
|
+
"aria-labelledby": "alertdialog-label-" + g(r),
|
|
675
|
+
"aria-describedby": "alertdialog-description-" + g(r),
|
|
663
676
|
ref_key: "dialog",
|
|
664
677
|
ref: o,
|
|
665
|
-
style: ve({ zIndex:
|
|
678
|
+
style: ve({ zIndex: g(b) })
|
|
666
679
|
}, [
|
|
667
|
-
n("div",
|
|
680
|
+
n("div", qt, [
|
|
668
681
|
n("h2", {
|
|
669
|
-
id: "alertdialog-label-" +
|
|
682
|
+
id: "alertdialog-label-" + g(r),
|
|
670
683
|
class: "g-alertdialog-label"
|
|
671
|
-
}, C(t.label), 9,
|
|
684
|
+
}, C(t.label), 9, Zt),
|
|
672
685
|
n("div", {
|
|
673
|
-
id: "alertdialog-description-" +
|
|
686
|
+
id: "alertdialog-description-" + g(r),
|
|
674
687
|
class: "g-alertdialog-content"
|
|
675
688
|
}, [
|
|
676
689
|
P(S.$slots, "default", {}, void 0, !0)
|
|
677
|
-
], 8,
|
|
678
|
-
n("div",
|
|
690
|
+
], 8, Yt),
|
|
691
|
+
n("div", Qt, [
|
|
679
692
|
W(ne, {
|
|
680
693
|
outlined: "",
|
|
681
|
-
onClick:
|
|
694
|
+
onClick: f[0] || (f[0] = (p) => a("cancel"))
|
|
682
695
|
}, {
|
|
683
|
-
default: U(() => [...
|
|
696
|
+
default: U(() => [...f[2] || (f[2] = [
|
|
684
697
|
N("Cancel", -1)
|
|
685
698
|
])]),
|
|
686
699
|
_: 1
|
|
687
700
|
}),
|
|
688
701
|
W(ne, {
|
|
689
702
|
theme: t.buttonColor,
|
|
690
|
-
onClick:
|
|
703
|
+
onClick: f[1] || (f[1] = (p) => a("confirm"))
|
|
691
704
|
}, {
|
|
692
705
|
default: U(() => [
|
|
693
706
|
N(C(t.buttonText), 1)
|
|
@@ -696,17 +709,17 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
696
709
|
}, 8, ["theme"])
|
|
697
710
|
])
|
|
698
711
|
])
|
|
699
|
-
], 12,
|
|
712
|
+
], 12, Wt)
|
|
700
713
|
]),
|
|
701
714
|
_: 3
|
|
702
715
|
})
|
|
703
716
|
]));
|
|
704
717
|
}
|
|
705
|
-
}),
|
|
718
|
+
}), Wo = /* @__PURE__ */ z(Xt, [["__scopeId", "data-v-8bac6ffd"]]), Jt = ["id"], el = { class: "g-select-input-wrap" }, tl = ["id"], ll = ["value", "placeholder", "disabled", "aria-controls", "aria-expanded", "aria-activedescendant"], al = ["id", "aria-controls", "aria-expanded", "aria-activedescendant"], ol = ["id"], sl = ["id", "aria-selected", "onClick"], nl = {
|
|
706
719
|
key: 1,
|
|
707
720
|
"aria-live": "polite",
|
|
708
721
|
class: "g-select-combo-option g-select-option g-select-no-results"
|
|
709
|
-
},
|
|
722
|
+
}, rl = /* @__PURE__ */ A({
|
|
710
723
|
__name: "GSelect",
|
|
711
724
|
props: /* @__PURE__ */ H({
|
|
712
725
|
options: {},
|
|
@@ -725,218 +738,218 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
725
738
|
}),
|
|
726
739
|
emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
|
|
727
740
|
setup(e, { emit: l }) {
|
|
728
|
-
const t = e, a = l, o = j(e, "modelValue"), s = Y(),
|
|
741
|
+
const t = e, a = l, o = j(e, "modelValue"), s = Y(), r = E(null), d = E(null), i = E(!1), c = E(0), b = E(!1), m = E(!1), { push: h, pop: L, isTop: S } = xe(s), { displayErrors: f, hasErrors: p } = Ce({
|
|
729
742
|
name: t.name,
|
|
730
743
|
value: o,
|
|
731
|
-
errors:
|
|
732
|
-
}),
|
|
733
|
-
const
|
|
734
|
-
return
|
|
744
|
+
errors: _e(t, "errors")
|
|
745
|
+
}), y = E("below"), T = E(null), w = x(() => {
|
|
746
|
+
const _ = {};
|
|
747
|
+
return T.value !== null && (_.maxHeight = `${T.value}px`), y.value === "above" ? (_.top = "auto", _.bottom = "100%") : (_.top = "100%", _.bottom = "auto"), _;
|
|
735
748
|
});
|
|
736
749
|
function I() {
|
|
737
|
-
if (!
|
|
750
|
+
if (!i.value || !r.value)
|
|
738
751
|
return;
|
|
739
|
-
const
|
|
740
|
-
if (
|
|
741
|
-
|
|
752
|
+
const _ = r.value.getBoundingClientRect(), B = window.innerHeight - _.bottom, le = _.top, ue = d.value?.scrollHeight ?? 200, Le = Math.min(200, ue), Se = 8;
|
|
753
|
+
if (B >= Le) {
|
|
754
|
+
y.value = "below", T.value = Math.max(0, Math.floor(B - Se));
|
|
742
755
|
return;
|
|
743
756
|
}
|
|
744
|
-
if (
|
|
745
|
-
|
|
757
|
+
if (B < Le && le > B) {
|
|
758
|
+
y.value = "above", T.value = Math.max(0, Math.floor(le - Se));
|
|
746
759
|
return;
|
|
747
760
|
}
|
|
748
|
-
|
|
761
|
+
y.value = "below", T.value = Math.max(0, Math.floor(B - Se));
|
|
749
762
|
}
|
|
750
763
|
let K = null;
|
|
751
|
-
function
|
|
764
|
+
function G() {
|
|
752
765
|
if (K)
|
|
753
766
|
return;
|
|
754
|
-
const
|
|
767
|
+
const _ = () => {
|
|
755
768
|
I();
|
|
756
769
|
};
|
|
757
|
-
window.addEventListener("resize",
|
|
770
|
+
window.addEventListener("resize", _, { passive: !0 }), window.addEventListener("scroll", _, {
|
|
758
771
|
passive: !0,
|
|
759
772
|
capture: !0
|
|
760
773
|
}), K = () => {
|
|
761
|
-
window.removeEventListener("resize",
|
|
774
|
+
window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0), K = null;
|
|
762
775
|
};
|
|
763
776
|
}
|
|
764
|
-
function
|
|
777
|
+
function J() {
|
|
765
778
|
K && K();
|
|
766
779
|
}
|
|
767
|
-
const R = x(() => t.options.map((
|
|
768
|
-
if (!t.searchable || !
|
|
780
|
+
const R = x(() => t.options.map((_) => typeof _ == "string" ? { label: _, value: _ } : _)), te = E(""), ee = x(() => {
|
|
781
|
+
if (!t.searchable || !i.value || !te.value)
|
|
769
782
|
return R.value;
|
|
770
|
-
const
|
|
783
|
+
const _ = te.value.toLowerCase();
|
|
771
784
|
return R.value.filter(
|
|
772
|
-
(
|
|
785
|
+
(B) => B.label.toLowerCase().includes(_)
|
|
773
786
|
);
|
|
774
|
-
}), se = x(() => ee.value.findIndex((
|
|
787
|
+
}), se = x(() => ee.value.findIndex((_) => _.value === o.value));
|
|
775
788
|
Q(
|
|
776
789
|
() => o.value,
|
|
777
|
-
(
|
|
778
|
-
const
|
|
779
|
-
|
|
790
|
+
(_) => {
|
|
791
|
+
const B = ee.value.findIndex((le) => le.value === _);
|
|
792
|
+
B !== -1 && (c.value = B);
|
|
780
793
|
}
|
|
781
|
-
), Q(
|
|
782
|
-
|
|
783
|
-
}), Q(
|
|
784
|
-
|
|
794
|
+
), Q(i, (_) => {
|
|
795
|
+
_ ? h() : L();
|
|
796
|
+
}), Q(i, (_) => {
|
|
797
|
+
_ ? (G(), X(() => {
|
|
785
798
|
I();
|
|
786
|
-
})) : (
|
|
799
|
+
})) : (J(), y.value = "below", T.value = null);
|
|
787
800
|
});
|
|
788
|
-
function
|
|
789
|
-
if (!t.disabled && (
|
|
801
|
+
function $() {
|
|
802
|
+
if (!t.disabled && (i.value = !0, X(() => {
|
|
790
803
|
I();
|
|
791
804
|
}), t.searchable)) {
|
|
792
805
|
te.value = "";
|
|
793
|
-
const
|
|
794
|
-
(
|
|
806
|
+
const _ = ee.value.findIndex(
|
|
807
|
+
(B) => B.value === o.value
|
|
795
808
|
);
|
|
796
|
-
c.value =
|
|
809
|
+
c.value = _ !== -1 ? _ : 0, X(() => {
|
|
797
810
|
k.value && k.value.focus();
|
|
798
811
|
});
|
|
799
812
|
}
|
|
800
813
|
}
|
|
801
814
|
function V() {
|
|
802
|
-
|
|
815
|
+
i.value = !1, t.searchable && (te.value = "");
|
|
803
816
|
}
|
|
804
817
|
ce(() => {
|
|
805
|
-
|
|
818
|
+
J();
|
|
806
819
|
});
|
|
807
|
-
const k =
|
|
808
|
-
function D(
|
|
820
|
+
const k = E(null);
|
|
821
|
+
function D(_) {
|
|
809
822
|
if (!t.disabled && t.searchable) {
|
|
810
823
|
if (m.value) {
|
|
811
824
|
m.value = !1;
|
|
812
825
|
return;
|
|
813
826
|
}
|
|
814
|
-
|
|
827
|
+
$();
|
|
815
828
|
}
|
|
816
829
|
}
|
|
817
|
-
function re(
|
|
830
|
+
function re(_) {
|
|
818
831
|
if (!t.searchable) return;
|
|
819
|
-
|
|
820
|
-
const
|
|
832
|
+
i.value || $(), te.value = _.target.value;
|
|
833
|
+
const B = ee.value.findIndex(
|
|
821
834
|
(le) => le.value === o.value
|
|
822
835
|
);
|
|
823
|
-
c.value =
|
|
836
|
+
c.value = B !== -1 ? B : 0;
|
|
824
837
|
}
|
|
825
|
-
function me(
|
|
826
|
-
const
|
|
827
|
-
if (
|
|
828
|
-
|
|
838
|
+
function me(_) {
|
|
839
|
+
const B = _.relatedTarget;
|
|
840
|
+
if (b.value) {
|
|
841
|
+
b.value = !1;
|
|
829
842
|
return;
|
|
830
843
|
}
|
|
831
|
-
|
|
844
|
+
B && d.value && d.value.contains(B) || (t.searchable && (te.value = ""), V());
|
|
832
845
|
}
|
|
833
|
-
function pe(
|
|
834
|
-
const
|
|
835
|
-
|
|
846
|
+
function pe(_) {
|
|
847
|
+
const B = ee.value[_];
|
|
848
|
+
B && B.value !== o.value && (o.value = B.value, a("change", B.value)), m.value = !0, V(), setTimeout(() => {
|
|
836
849
|
m.value = !1;
|
|
837
850
|
}, 100);
|
|
838
851
|
}
|
|
839
852
|
function he() {
|
|
840
|
-
t.disabled || (
|
|
853
|
+
t.disabled || (i.value ? V() : $());
|
|
841
854
|
}
|
|
842
|
-
function ye(
|
|
855
|
+
function ye(_) {
|
|
843
856
|
if (t.disabled)
|
|
844
857
|
return;
|
|
845
|
-
const
|
|
846
|
-
if (!
|
|
847
|
-
|
|
858
|
+
const B = ee.value.length - 1;
|
|
859
|
+
if (!i.value && ["ArrowDown", "ArrowUp", "Enter", " "].includes(_.key)) {
|
|
860
|
+
_.preventDefault(), $();
|
|
848
861
|
return;
|
|
849
862
|
}
|
|
850
|
-
switch (
|
|
863
|
+
switch (_.key) {
|
|
851
864
|
case "ArrowDown":
|
|
852
|
-
|
|
865
|
+
_.preventDefault(), i.value ? (c.value = Math.min(B, c.value + 1), ke()) : $();
|
|
853
866
|
break;
|
|
854
867
|
case "ArrowUp":
|
|
855
|
-
|
|
868
|
+
_.preventDefault(), i.value ? (c.value = Math.max(0, c.value - 1), ke()) : $();
|
|
856
869
|
break;
|
|
857
870
|
case "Home":
|
|
858
|
-
|
|
871
|
+
_.preventDefault(), c.value = 0, ke();
|
|
859
872
|
break;
|
|
860
873
|
case "End":
|
|
861
|
-
|
|
874
|
+
_.preventDefault(), c.value = B, ke();
|
|
862
875
|
break;
|
|
863
876
|
case "Enter":
|
|
864
877
|
case " ":
|
|
865
|
-
|
|
878
|
+
_.preventDefault(), i.value ? pe(c.value) : $();
|
|
866
879
|
break;
|
|
867
880
|
case "Escape":
|
|
868
|
-
S.value && (
|
|
881
|
+
S.value && (_.preventDefault(), setTimeout(() => {
|
|
869
882
|
V();
|
|
870
883
|
}, 0));
|
|
871
884
|
break;
|
|
872
885
|
}
|
|
873
886
|
}
|
|
874
|
-
function
|
|
875
|
-
pe(
|
|
887
|
+
function et(_) {
|
|
888
|
+
pe(_);
|
|
876
889
|
}
|
|
877
|
-
function
|
|
878
|
-
|
|
890
|
+
function tt() {
|
|
891
|
+
b.value = !0;
|
|
879
892
|
}
|
|
880
893
|
function ke() {
|
|
881
|
-
|
|
882
|
-
const
|
|
894
|
+
X(() => {
|
|
895
|
+
const _ = document.getElementById(
|
|
883
896
|
`${s}-option-${c.value}`
|
|
884
897
|
);
|
|
885
|
-
|
|
898
|
+
_ && _.scrollIntoView({ block: "nearest" });
|
|
886
899
|
});
|
|
887
900
|
}
|
|
888
|
-
const
|
|
901
|
+
const Oe = x(() => t.clearButton && o.value !== null && o.value !== void 0 && !t.disabled);
|
|
889
902
|
function Ge() {
|
|
890
903
|
t.disabled || (o.value = null, a("change", null), t.searchable && (te.value = ""));
|
|
891
904
|
}
|
|
892
905
|
return ce(() => {
|
|
893
906
|
L();
|
|
894
|
-
}), (
|
|
895
|
-
class:
|
|
907
|
+
}), (_, B) => (u(), v("div", {
|
|
908
|
+
class: O(["g-select-root g-select-combo", { "g-select-open": i.value, "g-select-compact": e.compact, "g-select-has-error": g(p) }])
|
|
896
909
|
}, [
|
|
897
910
|
e.hiddenLabel ? M("", !0) : (u(), v("div", {
|
|
898
911
|
key: 0,
|
|
899
|
-
id:
|
|
912
|
+
id: g(s) + "-label",
|
|
900
913
|
class: "g-select-combo-label g-select-label"
|
|
901
|
-
}, C(t.label), 9,
|
|
902
|
-
n("div",
|
|
914
|
+
}, C(t.label), 9, Jt)),
|
|
915
|
+
n("div", el, [
|
|
903
916
|
t.searchable ? (u(), v("div", {
|
|
904
917
|
key: 0,
|
|
905
918
|
class: "g-select-combo-input g-select-control",
|
|
906
|
-
id:
|
|
919
|
+
id: g(s)
|
|
907
920
|
}, [
|
|
908
921
|
n("input", ae(
|
|
909
922
|
{
|
|
910
923
|
ref_key: "comboRef",
|
|
911
|
-
ref:
|
|
924
|
+
ref: r,
|
|
912
925
|
type: "text",
|
|
913
926
|
name: "comboInput",
|
|
914
927
|
class: ["g-select-search-input", { "g-select-clearable": e.clearButton }],
|
|
915
|
-
value:
|
|
916
|
-
placeholder:
|
|
928
|
+
value: i.value ? te.value : R.value[se.value] ? R.value[se.value].label : "",
|
|
929
|
+
placeholder: i.value ? "" : e.placeholder,
|
|
917
930
|
disabled: t.disabled,
|
|
918
931
|
onFocus: D,
|
|
919
932
|
onInput: re,
|
|
920
933
|
onKeydown: ye,
|
|
921
934
|
onBlur: me,
|
|
922
935
|
"aria-autocomplete": "list",
|
|
923
|
-
"aria-controls":
|
|
924
|
-
"aria-expanded":
|
|
936
|
+
"aria-controls": g(s) + "-listbox",
|
|
937
|
+
"aria-expanded": i.value ? "true" : "false",
|
|
925
938
|
"aria-haspopup": "listbox",
|
|
926
|
-
"aria-activedescendant":
|
|
939
|
+
"aria-activedescendant": i.value ? g(s) + "-option-" + c.value : void 0
|
|
927
940
|
},
|
|
928
|
-
e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby":
|
|
941
|
+
e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": g(s) + "-label" },
|
|
929
942
|
{
|
|
930
943
|
role: "combobox",
|
|
931
944
|
autocomplete: "off"
|
|
932
945
|
}
|
|
933
|
-
), null, 16,
|
|
934
|
-
|
|
946
|
+
), null, 16, ll),
|
|
947
|
+
Oe.value ? (u(), v("button", {
|
|
935
948
|
key: 0,
|
|
936
949
|
type: "button",
|
|
937
950
|
class: "g-select-clear-btn",
|
|
938
951
|
onClick: Ge
|
|
939
|
-
}, [...
|
|
952
|
+
}, [...B[0] || (B[0] = [
|
|
940
953
|
n("svg", {
|
|
941
954
|
role: "img",
|
|
942
955
|
"aria-label": "Clear Selection",
|
|
@@ -950,7 +963,7 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
950
963
|
})
|
|
951
964
|
], -1)
|
|
952
965
|
])])) : M("", !0),
|
|
953
|
-
|
|
966
|
+
B[1] || (B[1] = n("svg", {
|
|
954
967
|
class: "g-select-caret",
|
|
955
968
|
xmlns: "http://www.w3.org/2000/svg",
|
|
956
969
|
viewBox: "0 0 51.26 51.26",
|
|
@@ -962,21 +975,21 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
962
975
|
d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
|
|
963
976
|
})
|
|
964
977
|
], -1))
|
|
965
|
-
], 8,
|
|
978
|
+
], 8, tl)) : (u(), v("div", ae(
|
|
966
979
|
{
|
|
967
980
|
key: 1,
|
|
968
981
|
ref_key: "comboRef",
|
|
969
|
-
ref:
|
|
970
|
-
id:
|
|
982
|
+
ref: r,
|
|
983
|
+
id: g(s),
|
|
971
984
|
class: ["g-select-combo-button g-select-control", { "g-select-clearable": e.clearButton }],
|
|
972
985
|
role: "combobox",
|
|
973
|
-
"aria-controls":
|
|
974
|
-
"aria-expanded":
|
|
986
|
+
"aria-controls": g(s) + "-listbox",
|
|
987
|
+
"aria-expanded": i.value ? "true" : "false",
|
|
975
988
|
"aria-haspopup": "listbox"
|
|
976
989
|
},
|
|
977
|
-
e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby":
|
|
990
|
+
e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": g(s) + "-label" },
|
|
978
991
|
{
|
|
979
|
-
"aria-activedescendant":
|
|
992
|
+
"aria-activedescendant": i.value ? g(s) + "-option-" + c.value : void 0,
|
|
980
993
|
tabindex: "0",
|
|
981
994
|
onClick: he,
|
|
982
995
|
onKeydown: ye,
|
|
@@ -985,12 +998,12 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
985
998
|
}
|
|
986
999
|
), [
|
|
987
1000
|
N(C(R.value[se.value] ? R.value[se.value].label : "") + " ", 1),
|
|
988
|
-
|
|
1001
|
+
Oe.value ? (u(), v("button", {
|
|
989
1002
|
key: 0,
|
|
990
1003
|
type: "button",
|
|
991
1004
|
class: "g-select-clear-btn",
|
|
992
1005
|
onClick: de(Ge, ["stop"])
|
|
993
|
-
}, [...
|
|
1006
|
+
}, [...B[2] || (B[2] = [
|
|
994
1007
|
n("svg", {
|
|
995
1008
|
role: "img",
|
|
996
1009
|
"aria-label": "Clear Selection",
|
|
@@ -1004,7 +1017,7 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1004
1017
|
})
|
|
1005
1018
|
], -1)
|
|
1006
1019
|
])])) : M("", !0),
|
|
1007
|
-
|
|
1020
|
+
B[3] || (B[3] = n("svg", {
|
|
1008
1021
|
class: "g-select-caret",
|
|
1009
1022
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1010
1023
|
viewBox: "0 0 51.26 51.26",
|
|
@@ -1016,58 +1029,58 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1016
1029
|
d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
|
|
1017
1030
|
})
|
|
1018
1031
|
], -1))
|
|
1019
|
-
], 16,
|
|
1032
|
+
], 16, al)),
|
|
1020
1033
|
we(n("div", ae(
|
|
1021
1034
|
{
|
|
1022
1035
|
ref_key: "listboxRef",
|
|
1023
1036
|
ref: d,
|
|
1024
1037
|
class: ["g-select-combo-menu g-select-list", {
|
|
1025
|
-
"g-select-combo-menu--above":
|
|
1038
|
+
"g-select-combo-menu--above": y.value === "above"
|
|
1026
1039
|
}],
|
|
1027
1040
|
style: w.value,
|
|
1028
1041
|
role: "listbox",
|
|
1029
|
-
id:
|
|
1042
|
+
id: g(s) + "-listbox"
|
|
1030
1043
|
},
|
|
1031
|
-
e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby":
|
|
1044
|
+
e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": g(s) + "-label" },
|
|
1032
1045
|
{ tabindex: "-1" }
|
|
1033
1046
|
), [
|
|
1034
1047
|
ee.value.length > 0 ? (u(!0), v(F, { key: 0 }, Z(ee.value, (le, ue) => (u(), v("div", {
|
|
1035
1048
|
key: le.value,
|
|
1036
|
-
id:
|
|
1037
|
-
class:
|
|
1049
|
+
id: g(s) + "-option-" + ue,
|
|
1050
|
+
class: O(["g-select-combo-option g-select-option", {
|
|
1038
1051
|
"g-select-option-current": ue === c.value,
|
|
1039
1052
|
"ilw-theme-blue": le.value === o.value
|
|
1040
1053
|
}]),
|
|
1041
1054
|
role: "option",
|
|
1042
1055
|
"aria-selected": le.value === o.value ? "true" : "false",
|
|
1043
|
-
onMousedown:
|
|
1044
|
-
onClick: (Le) =>
|
|
1056
|
+
onMousedown: tt,
|
|
1057
|
+
onClick: (Le) => et(ue)
|
|
1045
1058
|
}, [
|
|
1046
|
-
P(
|
|
1059
|
+
P(_.$slots, "option", {
|
|
1047
1060
|
option: le,
|
|
1048
1061
|
selected: le.value === o.value,
|
|
1049
1062
|
index: ue
|
|
1050
1063
|
}, () => [
|
|
1051
1064
|
N(C(le.label), 1)
|
|
1052
1065
|
], !0)
|
|
1053
|
-
], 42,
|
|
1054
|
-
], 16,
|
|
1055
|
-
[
|
|
1066
|
+
], 42, sl))), 128)) : (u(), v("div", nl, " No results found. "))
|
|
1067
|
+
], 16, ol), [
|
|
1068
|
+
[at, i.value]
|
|
1056
1069
|
])
|
|
1057
1070
|
]),
|
|
1058
1071
|
W(Be, {
|
|
1059
|
-
errors: f
|
|
1060
|
-
id: "error-message-" +
|
|
1072
|
+
errors: g(f),
|
|
1073
|
+
id: "error-message-" + g(s)
|
|
1061
1074
|
}, null, 8, ["errors", "id"])
|
|
1062
1075
|
], 2));
|
|
1063
1076
|
}
|
|
1064
|
-
}),
|
|
1077
|
+
}), Je = /* @__PURE__ */ z(rl, [["__scopeId", "data-v-750e1c19"]]), il = ["aria-label"], ul = ["placeholder", "value", "aria-expanded", "aria-controls", "aria-activedescendant"], dl = {
|
|
1065
1078
|
key: 0,
|
|
1066
1079
|
class: "g-search-dropdown"
|
|
1067
|
-
},
|
|
1080
|
+
}, cl = {
|
|
1068
1081
|
"aria-live": "polite",
|
|
1069
1082
|
class: "g-search-result-count"
|
|
1070
|
-
},
|
|
1083
|
+
}, vl = ["id"], fl = ["aria-label"], gl = { class: "g-search-group-label" }, bl = ["id", "onMousedown", "aria-selected"], ml = ["id", "onMousedown", "aria-selected"], qo = /* @__PURE__ */ A({
|
|
1071
1084
|
__name: "GSearch",
|
|
1072
1085
|
props: /* @__PURE__ */ H({
|
|
1073
1086
|
results: {},
|
|
@@ -1081,47 +1094,47 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1081
1094
|
}),
|
|
1082
1095
|
emits: /* @__PURE__ */ H(["select", "submit"], ["update:modelValue"]),
|
|
1083
1096
|
setup(e, { emit: l }) {
|
|
1084
|
-
const t = j(e, "modelValue"), a = e, o = l, s =
|
|
1097
|
+
const t = j(e, "modelValue"), a = e, o = l, s = E(null), r = E(null), d = E(!0), i = E(-1), c = x(() => Array.isArray(a.results) && a.results.length && "items" in a.results[0] ? a.results.flatMap((I) => I.items) : a.results), b = x(() => c.value.length);
|
|
1085
1098
|
function m(I) {
|
|
1086
1099
|
const K = I.target.value;
|
|
1087
1100
|
t.value = K, a.auto && K.length > 1 && (d.value = !1);
|
|
1088
1101
|
}
|
|
1089
|
-
function
|
|
1090
|
-
|
|
1091
|
-
const I =
|
|
1102
|
+
function h() {
|
|
1103
|
+
X(() => {
|
|
1104
|
+
const I = r.value?.querySelector('[aria-selected="true"]');
|
|
1092
1105
|
I && I.scrollIntoView({ block: "nearest" });
|
|
1093
1106
|
});
|
|
1094
1107
|
}
|
|
1095
|
-
const { focused: L } =
|
|
1108
|
+
const { focused: L } = vt(s);
|
|
1096
1109
|
function S(I) {
|
|
1097
1110
|
const K = I.altKey;
|
|
1098
1111
|
if (I.key === "ArrowDown") {
|
|
1099
|
-
if (!
|
|
1112
|
+
if (!b.value)
|
|
1100
1113
|
return;
|
|
1101
|
-
I.preventDefault(), d.value = !1, K || (
|
|
1114
|
+
I.preventDefault(), d.value = !1, K || (i.value = (i.value + 1) % b.value, h());
|
|
1102
1115
|
} else if (I.key === "ArrowUp") {
|
|
1103
|
-
if (!
|
|
1116
|
+
if (!b.value)
|
|
1104
1117
|
return;
|
|
1105
|
-
I.preventDefault(), d.value = !1,
|
|
1118
|
+
I.preventDefault(), d.value = !1, i.value = (i.value - 1 + b.value) % b.value, h();
|
|
1106
1119
|
} else if (I.key === "Enter")
|
|
1107
|
-
d.value ? (o("submit", t.value), d.value = !1, I.preventDefault()) :
|
|
1120
|
+
d.value ? (o("submit", t.value), d.value = !1, I.preventDefault()) : f(c.value[i.value]);
|
|
1108
1121
|
else if (I.key === "Escape") {
|
|
1109
|
-
if (!
|
|
1122
|
+
if (!b.value)
|
|
1110
1123
|
return;
|
|
1111
|
-
I.preventDefault(),
|
|
1124
|
+
I.preventDefault(), y.value || (t.value = ""), d.value = !0, i.value = -1;
|
|
1112
1125
|
}
|
|
1113
1126
|
["Backspace", "Delete", "Clear", "Undo"].includes(I.key) && (d.value = !0);
|
|
1114
1127
|
}
|
|
1115
|
-
function
|
|
1116
|
-
o("select", I), t.value = "", d.value = !0,
|
|
1128
|
+
function f(I) {
|
|
1129
|
+
o("select", I), t.value = "", d.value = !0, i.value = -1;
|
|
1117
1130
|
}
|
|
1118
|
-
const
|
|
1131
|
+
const p = x(() => !!a.loading), y = x(() => L.value && !d.value), T = ft(() => {
|
|
1119
1132
|
o("submit", t.value);
|
|
1120
1133
|
}, 300);
|
|
1121
1134
|
Q(
|
|
1122
1135
|
() => t.value,
|
|
1123
1136
|
(I) => {
|
|
1124
|
-
I ? a.auto &&
|
|
1137
|
+
I ? a.auto && T() : i.value = -1;
|
|
1125
1138
|
}
|
|
1126
1139
|
);
|
|
1127
1140
|
const w = Y();
|
|
@@ -1132,7 +1145,7 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1132
1145
|
}, [
|
|
1133
1146
|
n("form", {
|
|
1134
1147
|
class: "g-search-form",
|
|
1135
|
-
onSubmit: K[0] || (K[0] = de((
|
|
1148
|
+
onSubmit: K[0] || (K[0] = de((G) => f(null), ["prevent"]))
|
|
1136
1149
|
}, [
|
|
1137
1150
|
n("input", {
|
|
1138
1151
|
ref_key: "inputRef",
|
|
@@ -1145,18 +1158,18 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1145
1158
|
onInput: m,
|
|
1146
1159
|
onKeydown: S,
|
|
1147
1160
|
role: "combobox",
|
|
1148
|
-
"aria-expanded":
|
|
1161
|
+
"aria-expanded": y.value,
|
|
1149
1162
|
"aria-autocomplete": "list",
|
|
1150
|
-
"aria-controls": `${
|
|
1151
|
-
"aria-activedescendant":
|
|
1152
|
-
}, null, 40,
|
|
1163
|
+
"aria-controls": `${g(w)}-list`,
|
|
1164
|
+
"aria-activedescendant": i.value >= 0 ? "g-search-option-" + c.value[i.value].id : void 0
|
|
1165
|
+
}, null, 40, ul),
|
|
1153
1166
|
n("button", {
|
|
1154
1167
|
type: "submit",
|
|
1155
1168
|
class: "g-search-submit",
|
|
1156
1169
|
"aria-label": "Submit search",
|
|
1157
1170
|
onKeydown: S
|
|
1158
1171
|
}, [
|
|
1159
|
-
|
|
1172
|
+
p.value ? (u(), q(Nt, {
|
|
1160
1173
|
key: 0,
|
|
1161
1174
|
size: "tiny"
|
|
1162
1175
|
})) : M("", !0),
|
|
@@ -1173,88 +1186,88 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1173
1186
|
], -1))
|
|
1174
1187
|
], 32)
|
|
1175
1188
|
], 32),
|
|
1176
|
-
|
|
1177
|
-
n("div",
|
|
1178
|
-
|
|
1179
|
-
N(C(
|
|
1189
|
+
y.value ? (u(), v("div", dl, [
|
|
1190
|
+
n("div", cl, [
|
|
1191
|
+
p.value ? M("", !0) : (u(), v(F, { key: 0 }, [
|
|
1192
|
+
N(C(b.value) + " result" + C(b.value === 1 ? "" : "s"), 1)
|
|
1180
1193
|
], 64))
|
|
1181
1194
|
]),
|
|
1182
1195
|
n("div", {
|
|
1183
1196
|
role: "listbox",
|
|
1184
|
-
id: `${
|
|
1197
|
+
id: `${g(w)}-list`,
|
|
1185
1198
|
ref_key: "listboxRef",
|
|
1186
|
-
ref:
|
|
1199
|
+
ref: r,
|
|
1187
1200
|
"aria-label": "Search results"
|
|
1188
1201
|
}, [
|
|
1189
|
-
|
|
1190
|
-
key:
|
|
1202
|
+
b.value > 0 && "items" in a.results[0] ? (u(!0), v(F, { key: 0 }, Z(a.results, (G, J) => (u(), v("div", {
|
|
1203
|
+
key: G.type,
|
|
1191
1204
|
class: "g-search-group",
|
|
1192
1205
|
role: "group",
|
|
1193
|
-
"aria-label":
|
|
1206
|
+
"aria-label": G.label
|
|
1194
1207
|
}, [
|
|
1195
|
-
P(I.$slots, "group", { group:
|
|
1196
|
-
n("div",
|
|
1208
|
+
P(I.$slots, "group", { group: G }, () => [
|
|
1209
|
+
n("div", gl, C(G.label), 1)
|
|
1197
1210
|
]),
|
|
1198
|
-
(u(!0), v(F, null, Z(
|
|
1211
|
+
(u(!0), v(F, null, Z(G.items, (R, te) => (u(), v("div", {
|
|
1199
1212
|
key: R.id,
|
|
1200
1213
|
id: "g-search-option-" + R.id,
|
|
1201
|
-
class:
|
|
1202
|
-
"g-search-option-active": c.value[
|
|
1214
|
+
class: O(["g-search-option", {
|
|
1215
|
+
"g-search-option-active": c.value[i.value] && c.value[i.value].id === R.id
|
|
1203
1216
|
}]),
|
|
1204
1217
|
role: "option",
|
|
1205
|
-
onMousedown: de((ee) =>
|
|
1206
|
-
"aria-selected": c.value[
|
|
1218
|
+
onMousedown: de((ee) => f(R), ["prevent"]),
|
|
1219
|
+
"aria-selected": c.value[i.value] && c.value[i.value].id === R.id
|
|
1207
1220
|
}, [
|
|
1208
1221
|
P(I.$slots, "option", { option: R }, () => [
|
|
1209
1222
|
N(C(R.title), 1)
|
|
1210
1223
|
])
|
|
1211
|
-
], 42,
|
|
1212
|
-
], 8,
|
|
1213
|
-
key:
|
|
1214
|
-
id: "g-search-option-" +
|
|
1215
|
-
class:
|
|
1216
|
-
"g-search-option-active":
|
|
1224
|
+
], 42, bl))), 128))
|
|
1225
|
+
], 8, fl))), 128)) : b.value > 0 ? (u(!0), v(F, { key: 1 }, Z(c.value, (G, J) => (u(), v("div", {
|
|
1226
|
+
key: G.id,
|
|
1227
|
+
id: "g-search-option-" + G.id,
|
|
1228
|
+
class: O(["g-search-option", {
|
|
1229
|
+
"g-search-option-active": i.value === J
|
|
1217
1230
|
}]),
|
|
1218
1231
|
role: "option",
|
|
1219
|
-
onMousedown: de((R) =>
|
|
1220
|
-
"aria-selected":
|
|
1232
|
+
onMousedown: de((R) => f(G), ["prevent"]),
|
|
1233
|
+
"aria-selected": i.value === J
|
|
1221
1234
|
}, [
|
|
1222
|
-
P(I.$slots, "option", { option:
|
|
1223
|
-
N(C(
|
|
1235
|
+
P(I.$slots, "option", { option: G }, () => [
|
|
1236
|
+
N(C(G.title), 1)
|
|
1224
1237
|
])
|
|
1225
|
-
], 42,
|
|
1226
|
-
], 8,
|
|
1238
|
+
], 42, ml))), 128)) : M("", !0)
|
|
1239
|
+
], 8, vl)
|
|
1227
1240
|
])) : M("", !0)
|
|
1228
|
-
], 8,
|
|
1241
|
+
], 8, il));
|
|
1229
1242
|
}
|
|
1230
|
-
}),
|
|
1231
|
-
class: /* @__PURE__ */
|
|
1243
|
+
}), pl = {
|
|
1244
|
+
class: /* @__PURE__ */ O({
|
|
1232
1245
|
"g-app-header": !0
|
|
1233
1246
|
})
|
|
1234
|
-
},
|
|
1247
|
+
}, hl = { class: "g-app-header__brand" }, yl = {
|
|
1235
1248
|
class: "g-app-header__brand-text",
|
|
1236
1249
|
href: "/"
|
|
1237
|
-
},
|
|
1250
|
+
}, kl = {
|
|
1238
1251
|
key: 0,
|
|
1239
1252
|
class: "g-app-header__block-i-container"
|
|
1240
|
-
},
|
|
1253
|
+
}, wl = { class: "g-app-header__title" }, _l = { class: "g-app-header__app-controls-wrap" }, $l = /* @__PURE__ */ A({
|
|
1241
1254
|
__name: "GAppHeader",
|
|
1242
1255
|
props: {
|
|
1243
1256
|
illinois: { type: Boolean, default: !1 },
|
|
1244
1257
|
brand: { default: "GRAD" }
|
|
1245
1258
|
},
|
|
1246
1259
|
setup(e) {
|
|
1247
|
-
return (l, t) => (u(), v("header",
|
|
1260
|
+
return (l, t) => (u(), v("header", pl, [
|
|
1248
1261
|
t[1] || (t[1] = n("div", { class: "g-app-header__background" }, [
|
|
1249
1262
|
n("div", { class: "g-app-header__background-pattern" }),
|
|
1250
1263
|
n("div", { class: "g-app-header__background-gradient" })
|
|
1251
1264
|
], -1)),
|
|
1252
|
-
n("div",
|
|
1265
|
+
n("div", hl, [
|
|
1253
1266
|
P(l.$slots, "left", {}, () => [
|
|
1254
|
-
n("a",
|
|
1267
|
+
n("a", yl, C(e.brand), 1)
|
|
1255
1268
|
], !0)
|
|
1256
1269
|
]),
|
|
1257
|
-
e.illinois ? (u(), v("div",
|
|
1270
|
+
e.illinois ? (u(), v("div", kl, [...t[0] || (t[0] = [
|
|
1258
1271
|
n("svg", {
|
|
1259
1272
|
class: "g-app-header__block-i",
|
|
1260
1273
|
role: "img",
|
|
@@ -1273,15 +1286,15 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1273
1286
|
})
|
|
1274
1287
|
], -1)
|
|
1275
1288
|
])])) : P(l.$slots, "icon", { key: 1 }, void 0, !0),
|
|
1276
|
-
n("div",
|
|
1289
|
+
n("div", wl, [
|
|
1277
1290
|
P(l.$slots, "title", {}, void 0, !0)
|
|
1278
1291
|
]),
|
|
1279
|
-
n("div",
|
|
1292
|
+
n("div", _l, [
|
|
1280
1293
|
P(l.$slots, "app-controls", { class: "g-app-header__app-controls" }, void 0, !0)
|
|
1281
1294
|
])
|
|
1282
1295
|
]));
|
|
1283
1296
|
}
|
|
1284
|
-
}),
|
|
1297
|
+
}), Zo = /* @__PURE__ */ z($l, [["__scopeId", "data-v-5c3dd169"]]), Cl = ["id"], xl = /* @__PURE__ */ A({
|
|
1285
1298
|
__name: "GSidebar",
|
|
1286
1299
|
props: {
|
|
1287
1300
|
backgroundColor: { default: "" },
|
|
@@ -1298,19 +1311,19 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1298
1311
|
() => {
|
|
1299
1312
|
},
|
|
1300
1313
|
!0
|
|
1301
|
-
), a = x(() => l.backgroundImage ? l.backgroundImage : l.theme === "light" ? "none" : "url('https://gradcdn.blob.core.windows.net/public/sidebar-bg2.jpg')"), o = x(() => l.backgroundColor ? l.backgroundColor : l.theme === "light" ? "#f9f9f9" : "#030913"), s = x(() => l.topOffsetVar ? `var(${l.topOffsetVar})` : l.topOffset ? l.topOffset : "var(--g-toolbar-height)"),
|
|
1302
|
-
function d(
|
|
1303
|
-
|
|
1314
|
+
), a = x(() => l.backgroundImage ? l.backgroundImage : l.theme === "light" ? "none" : "url('https://gradcdn.blob.core.windows.net/public/sidebar-bg2.jpg')"), o = x(() => l.backgroundColor ? l.backgroundColor : l.theme === "light" ? "#f9f9f9" : "#030913"), s = x(() => l.topOffsetVar ? `var(${l.topOffsetVar})` : l.topOffset ? l.topOffset : "var(--g-toolbar-height)"), r = Y();
|
|
1315
|
+
function d(i) {
|
|
1316
|
+
i.key === "Escape" && t?.isCollapsible?.value && t?.open?.value && (t.open.value = !1, document.getElementById(`${t.id}-hamburger`)?.focus());
|
|
1304
1317
|
}
|
|
1305
|
-
return (
|
|
1318
|
+
return (i, c) => (u(), v("div", {
|
|
1306
1319
|
ref: "sidebar-ref",
|
|
1307
|
-
id: `${
|
|
1308
|
-
class:
|
|
1320
|
+
id: `${g(t)?.id ?? g(r)}-sidebar`,
|
|
1321
|
+
class: O(["g-sidebar", [
|
|
1309
1322
|
`g-sidebar__${e.theme}`,
|
|
1310
1323
|
{
|
|
1311
|
-
"g-sidebar--collapsible":
|
|
1312
|
-
"g-sidebar--closed": !
|
|
1313
|
-
"g-sidebar--open":
|
|
1324
|
+
"g-sidebar--collapsible": g(t)?.isCollapsible?.value,
|
|
1325
|
+
"g-sidebar--closed": !g(t)?.open?.value && g(t)?.isCollapsible?.value,
|
|
1326
|
+
"g-sidebar--open": g(t)?.open?.value && g(t)?.isCollapsible?.value
|
|
1314
1327
|
}
|
|
1315
1328
|
]]),
|
|
1316
1329
|
style: ve({
|
|
@@ -1322,10 +1335,10 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1322
1335
|
}),
|
|
1323
1336
|
onKeydown: d
|
|
1324
1337
|
}, [
|
|
1325
|
-
P(
|
|
1326
|
-
], 46,
|
|
1338
|
+
P(i.$slots, "default", {}, void 0, !0)
|
|
1339
|
+
], 46, Cl));
|
|
1327
1340
|
}
|
|
1328
|
-
}),
|
|
1341
|
+
}), Yo = /* @__PURE__ */ z(xl, [["__scopeId", "data-v-859b6ad5"]]), Ll = ["id"], Sl = { class: "g-sidebar-menu__list" }, Il = ["href", "aria-current", "onClick"], Ml = /* @__PURE__ */ A({
|
|
1329
1342
|
__name: "GSidebarMenu",
|
|
1330
1343
|
props: /* @__PURE__ */ H({
|
|
1331
1344
|
title: {},
|
|
@@ -1345,7 +1358,7 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1345
1358
|
Q(
|
|
1346
1359
|
t,
|
|
1347
1360
|
() => {
|
|
1348
|
-
|
|
1361
|
+
X(() => {
|
|
1349
1362
|
const c = o.value?.querySelector(
|
|
1350
1363
|
".g-sidebar-menu__is-active"
|
|
1351
1364
|
);
|
|
@@ -1355,42 +1368,42 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1355
1368
|
{ immediate: !0 }
|
|
1356
1369
|
);
|
|
1357
1370
|
});
|
|
1358
|
-
const s =
|
|
1359
|
-
function d(c,
|
|
1360
|
-
if (!
|
|
1371
|
+
const s = We(), r = x(() => s?.appContext?.components?.RouterLink ?? null);
|
|
1372
|
+
function d(c, b) {
|
|
1373
|
+
if (!b.href || !b.href.startsWith("#"))
|
|
1361
1374
|
return;
|
|
1362
|
-
const m =
|
|
1363
|
-
|
|
1375
|
+
const m = b.href.slice(1), h = document.getElementById(m)?.querySelector("h2, h3, h4, h5");
|
|
1376
|
+
h && (c.preventDefault(), h.setAttribute("tabindex", "-1"), h.focus(), h.scrollIntoView({ block: "start" }), history.replaceState(null, "", b.href));
|
|
1364
1377
|
}
|
|
1365
|
-
const
|
|
1366
|
-
return (c,
|
|
1378
|
+
const i = Y();
|
|
1379
|
+
return (c, b) => (u(), v("nav", ae({
|
|
1367
1380
|
class: ["g-sidebar-menu", [
|
|
1368
1381
|
`g-sidebar-menu__${l.theme}`,
|
|
1369
1382
|
{ "g-sidebar-menu--compact": l.compact }
|
|
1370
1383
|
]]
|
|
1371
1384
|
}, {
|
|
1372
|
-
"aria-labelledby": e.title ?
|
|
1385
|
+
"aria-labelledby": e.title ? g(i) : void 0,
|
|
1373
1386
|
"aria-label": e.title ? void 0 : "Sidebar Menu"
|
|
1374
1387
|
}), [
|
|
1375
1388
|
e.title ? (u(), v("h2", {
|
|
1376
1389
|
key: 0,
|
|
1377
|
-
id:
|
|
1390
|
+
id: g(i),
|
|
1378
1391
|
class: "g-sidebar-menu__title"
|
|
1379
|
-
}, C(e.title), 9,
|
|
1380
|
-
|
|
1392
|
+
}, C(e.title), 9, Ll)) : M("", !0),
|
|
1393
|
+
b[0] || (b[0] = n("div", { class: "g-sidebar-menu__divider" }, null, -1)),
|
|
1381
1394
|
n("div", {
|
|
1382
1395
|
class: "g-sidebar-menu__content",
|
|
1383
1396
|
ref_key: "content",
|
|
1384
1397
|
ref: o
|
|
1385
1398
|
}, [
|
|
1386
|
-
n("ul",
|
|
1399
|
+
n("ul", Sl, [
|
|
1387
1400
|
(u(!0), v(F, null, Z(e.items, (m) => (u(), v("li", {
|
|
1388
1401
|
key: m.href || m.to,
|
|
1389
1402
|
class: "g-sidebar-menu__item",
|
|
1390
1403
|
ref_for: !0,
|
|
1391
1404
|
ref: "listItems"
|
|
1392
1405
|
}, [
|
|
1393
|
-
m.to &&
|
|
1406
|
+
m.to && r.value ? (u(), q(fe(r.value), {
|
|
1394
1407
|
key: 0,
|
|
1395
1408
|
class: "g-sidebar-menu__link",
|
|
1396
1409
|
to: m.to
|
|
@@ -1401,74 +1414,74 @@ const Lt = { class: "g-popover-wrap" }, St = ["id"], It = ["aria-labelledby"], M
|
|
|
1401
1414
|
_: 2
|
|
1402
1415
|
}, 1032, ["to"])) : (u(), v("a", {
|
|
1403
1416
|
key: 1,
|
|
1404
|
-
class:
|
|
1417
|
+
class: O(["g-sidebar-menu__link", {
|
|
1405
1418
|
"g-sidebar-menu__is-active": a.value === (m.href || "")
|
|
1406
1419
|
}]),
|
|
1407
1420
|
href: m.href || m.to || "#",
|
|
1408
1421
|
"aria-current": a.value === (m.href || "") ? "location" : void 0,
|
|
1409
|
-
onClick: (
|
|
1410
|
-
}, C(m.label), 11,
|
|
1422
|
+
onClick: (h) => d(h, m)
|
|
1423
|
+
}, C(m.label), 11, Il))
|
|
1411
1424
|
]))), 128))
|
|
1412
1425
|
])
|
|
1413
1426
|
], 512)
|
|
1414
1427
|
], 16));
|
|
1415
1428
|
}
|
|
1416
|
-
}),
|
|
1417
|
-
let
|
|
1418
|
-
function
|
|
1429
|
+
}), Qo = /* @__PURE__ */ z(Ml, [["__scopeId", "data-v-26c98caa"]]);
|
|
1430
|
+
let El = 1;
|
|
1431
|
+
function Bl(e, l) {
|
|
1419
1432
|
const t = document.createElement("div");
|
|
1420
1433
|
return t.className = "v-gtooltip", t.textContent = e, t.setAttribute("role", "tooltip"), t.setAttribute("id", l), t;
|
|
1421
1434
|
}
|
|
1422
|
-
function
|
|
1423
|
-
const t = e.getBoundingClientRect(), a = l.getBoundingClientRect(), o = new DOMRect(
|
|
1435
|
+
function Ke(e, l) {
|
|
1436
|
+
const t = e.getBoundingClientRect(), a = l.getBoundingClientRect(), o = new DOMRect(0, 0, window.innerWidth, window.innerHeight), { top: s, left: r, placedAbove: d } = Xe(t, a, o, {
|
|
1424
1437
|
gap: 8,
|
|
1425
1438
|
margin: 8,
|
|
1426
1439
|
preferAbove: !0
|
|
1427
|
-
}),
|
|
1428
|
-
l.style.setProperty("--v-gtooltip-arrow-x", `${
|
|
1440
|
+
}), b = (t.left + t.width / 2 - r) / a.width * 100;
|
|
1441
|
+
l.style.setProperty("--v-gtooltip-arrow-x", `${b}%`), l.classList.remove("v-gtooltip-bottom"), d || l.classList.add("v-gtooltip-bottom"), l.style.left = `${r}px`, l.style.top = `${s}px`, l.style.zIndex = `${St()}`, l.style.opacity = "1";
|
|
1429
1442
|
}
|
|
1430
|
-
function
|
|
1443
|
+
function Vl(e) {
|
|
1431
1444
|
e.style.opacity = "0";
|
|
1432
1445
|
}
|
|
1433
|
-
const
|
|
1446
|
+
const Al = {
|
|
1434
1447
|
mounted(e, l) {
|
|
1435
|
-
const t =
|
|
1436
|
-
let
|
|
1437
|
-
e.getAttribute("aria-describedby") ? d = e.getAttribute("aria-describedby") : (d = `v-gtooltip-${++
|
|
1438
|
-
const
|
|
1439
|
-
t.value || (t.value =
|
|
1440
|
-
t.value && (a.value || o.value) &&
|
|
1441
|
-
}),
|
|
1448
|
+
const t = E(null), a = E(!1), o = E(!1), s = E(l.value);
|
|
1449
|
+
let r = null, d;
|
|
1450
|
+
e.getAttribute("aria-describedby") ? d = e.getAttribute("aria-describedby") : (d = `v-gtooltip-${++El}`, e.setAttribute("aria-describedby", d));
|
|
1451
|
+
const i = () => {
|
|
1452
|
+
t.value || (t.value = Bl(s.value, d), (document.getElementById("modal-root") ?? document.body).appendChild(t.value), r = new ResizeObserver(() => {
|
|
1453
|
+
t.value && (a.value || o.value) && Ke(e, t.value);
|
|
1454
|
+
}), r.observe(t.value));
|
|
1442
1455
|
};
|
|
1443
|
-
|
|
1456
|
+
Fe(() => {
|
|
1444
1457
|
t.value && (t.value.textContent = s.value);
|
|
1445
|
-
}),
|
|
1446
|
-
a.value || o.value ? (
|
|
1458
|
+
}), Fe(() => {
|
|
1459
|
+
a.value || o.value ? (i(), t.value && Ke(e, t.value)) : t.value && (Vl(t.value), setTimeout(() => {
|
|
1447
1460
|
e.dispatchEvent(new CustomEvent("tooltip-hide"));
|
|
1448
1461
|
}, 150));
|
|
1449
1462
|
});
|
|
1450
1463
|
const c = () => {
|
|
1451
1464
|
a.value = !0;
|
|
1452
|
-
},
|
|
1465
|
+
}, b = () => {
|
|
1453
1466
|
a.value = !1;
|
|
1454
1467
|
}, m = () => {
|
|
1455
1468
|
o.value = !0;
|
|
1456
|
-
},
|
|
1469
|
+
}, h = () => {
|
|
1457
1470
|
o.value = !1;
|
|
1458
1471
|
}, L = (S) => {
|
|
1459
1472
|
(S.key === "Escape" || S.key === "Esc") && (a.value = !1, o.value = !1);
|
|
1460
1473
|
};
|
|
1461
|
-
e.addEventListener("mouseenter", c), e.addEventListener("mouseleave",
|
|
1474
|
+
e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", b), e.addEventListener("focus", m), e.addEventListener("blur", h), e.addEventListener("keydown", L), i(), e._v_gtooltip = {
|
|
1462
1475
|
onMouseEnter: c,
|
|
1463
|
-
onMouseLeave:
|
|
1476
|
+
onMouseLeave: b,
|
|
1464
1477
|
onFocus: m,
|
|
1465
|
-
onBlur:
|
|
1478
|
+
onBlur: h,
|
|
1466
1479
|
onKeyDown: L,
|
|
1467
1480
|
tooltip: t,
|
|
1468
1481
|
tooltipText: s,
|
|
1469
1482
|
isHovered: a,
|
|
1470
1483
|
isFocused: o,
|
|
1471
|
-
resizeObserver:
|
|
1484
|
+
resizeObserver: r,
|
|
1472
1485
|
tooltipId: d
|
|
1473
1486
|
};
|
|
1474
1487
|
},
|
|
@@ -1480,7 +1493,7 @@ const Ml = {
|
|
|
1480
1493
|
const l = e._v_gtooltip;
|
|
1481
1494
|
l && l.tooltip && l.tooltip.value && (l.resizeObserver && l.resizeObserver.disconnect(), l.tooltip.value.remove(), l.tooltip.value = null), e.removeEventListener("mouseenter", l.onMouseEnter), e.removeEventListener("mouseleave", l.onMouseLeave), e.removeEventListener("focus", l.onFocus), e.removeEventListener("blur", l.onBlur), e.removeEventListener("keydown", l.onKeyDown), e.removeAttribute("aria-describedby");
|
|
1482
1495
|
}
|
|
1483
|
-
},
|
|
1496
|
+
}, Tl = { class: "g-clipboard-text" }, zl = /* @__PURE__ */ A({
|
|
1484
1497
|
__name: "GClipboard",
|
|
1485
1498
|
props: {
|
|
1486
1499
|
text: {},
|
|
@@ -1488,21 +1501,21 @@ const Ml = {
|
|
|
1488
1501
|
copyLabel: {}
|
|
1489
1502
|
},
|
|
1490
1503
|
setup(e) {
|
|
1491
|
-
const l = e, t =
|
|
1504
|
+
const l = e, t = Al, { text: a, copy: o, copied: s, isSupported: r } = gt({
|
|
1492
1505
|
source: l.text
|
|
1493
|
-
}), d =
|
|
1494
|
-
|
|
1506
|
+
}), d = E(l.copyLabel ?? "Copy to clipboard"), i = () => {
|
|
1507
|
+
r.value ? (o(), d.value = "Copied") : d.value = "Copy not supported";
|
|
1495
1508
|
}, c = () => {
|
|
1496
1509
|
d.value = l.copyLabel ?? "Copy to clipboard";
|
|
1497
1510
|
};
|
|
1498
|
-
return (
|
|
1511
|
+
return (b, m) => (u(), v("div", Tl, [
|
|
1499
1512
|
e.hideText ? M("", !0) : (u(), v(F, { key: 0 }, [
|
|
1500
1513
|
N(C(l.text), 1)
|
|
1501
1514
|
], 64)),
|
|
1502
1515
|
we((u(), v("button", {
|
|
1503
1516
|
type: "button",
|
|
1504
1517
|
"aria-label": "Copy",
|
|
1505
|
-
onClick:
|
|
1518
|
+
onClick: i,
|
|
1506
1519
|
onTooltipHide: c,
|
|
1507
1520
|
class: "g-clipboard-text-button"
|
|
1508
1521
|
}, [...m[0] || (m[0] = [
|
|
@@ -1519,56 +1532,56 @@ const Ml = {
|
|
|
1519
1532
|
})
|
|
1520
1533
|
], -1)
|
|
1521
1534
|
])], 32)), [
|
|
1522
|
-
[
|
|
1535
|
+
[g(t), d.value]
|
|
1523
1536
|
])
|
|
1524
1537
|
]));
|
|
1525
1538
|
}
|
|
1526
|
-
}),
|
|
1539
|
+
}), Xo = /* @__PURE__ */ z(zl, [["__scopeId", "data-v-c74932aa"]]), Ol = { class: "g-history-scroller-wrapper" }, Gl = {
|
|
1527
1540
|
key: 0,
|
|
1528
1541
|
class: "g-history-shadow g-history-shadow--top",
|
|
1529
1542
|
"aria-hidden": "true"
|
|
1530
|
-
},
|
|
1543
|
+
}, Dl = {
|
|
1531
1544
|
key: 1,
|
|
1532
1545
|
class: "g-history-shadow g-history-shadow--bottom",
|
|
1533
1546
|
"aria-hidden": "true"
|
|
1534
|
-
},
|
|
1547
|
+
}, Fl = ["role", "aria-label"], Pl = /* @__PURE__ */ A({
|
|
1535
1548
|
__name: "GHistoryScroller",
|
|
1536
1549
|
props: {
|
|
1537
1550
|
label: {},
|
|
1538
1551
|
entries: { default: () => [] }
|
|
1539
1552
|
},
|
|
1540
1553
|
setup(e) {
|
|
1541
|
-
const l = e, t =
|
|
1542
|
-
async function
|
|
1554
|
+
const l = e, t = E(null), a = E(null), o = E(!0), s = E(!0);
|
|
1555
|
+
async function r({ focusLast: c = !1 } = {}) {
|
|
1543
1556
|
if (t.value && (t.value.scrollTop = t.value.scrollHeight), c && a.value) {
|
|
1544
|
-
const
|
|
1545
|
-
if (
|
|
1546
|
-
const m =
|
|
1547
|
-
await
|
|
1557
|
+
const b = a.value.querySelectorAll(".g-history-entry");
|
|
1558
|
+
if (b.length > 0) {
|
|
1559
|
+
const m = b[b.length - 1];
|
|
1560
|
+
await X(), m.focus();
|
|
1548
1561
|
}
|
|
1549
1562
|
}
|
|
1550
1563
|
}
|
|
1551
1564
|
function d() {
|
|
1552
1565
|
if (!t.value) return;
|
|
1553
|
-
const { scrollTop: c, scrollHeight:
|
|
1554
|
-
o.value = c + m >=
|
|
1566
|
+
const { scrollTop: c, scrollHeight: b, clientHeight: m } = t.value;
|
|
1567
|
+
o.value = c + m >= b - 2, s.value = c <= 2;
|
|
1555
1568
|
}
|
|
1556
1569
|
ie(() => {
|
|
1557
|
-
|
|
1558
|
-
}),
|
|
1559
|
-
o.value &&
|
|
1560
|
-
}),
|
|
1561
|
-
o.value &&
|
|
1570
|
+
X(r);
|
|
1571
|
+
}), Re(t, () => {
|
|
1572
|
+
o.value && r();
|
|
1573
|
+
}), Re(a, () => {
|
|
1574
|
+
o.value && r();
|
|
1562
1575
|
}), Q(
|
|
1563
1576
|
() => l.entries,
|
|
1564
1577
|
async () => {
|
|
1565
|
-
o.value && (await
|
|
1578
|
+
o.value && (await X(), r());
|
|
1566
1579
|
}
|
|
1567
1580
|
);
|
|
1568
|
-
const
|
|
1569
|
-
return (c,
|
|
1570
|
-
s.value ? M("", !0) : (u(), v("div",
|
|
1571
|
-
o.value ? M("", !0) : (u(), v("div",
|
|
1581
|
+
const i = x(() => [...l.entries].reverse());
|
|
1582
|
+
return (c, b) => (u(), v("div", Ol, [
|
|
1583
|
+
s.value ? M("", !0) : (u(), v("div", Gl)),
|
|
1584
|
+
o.value ? M("", !0) : (u(), v("div", Dl)),
|
|
1572
1585
|
n("div", {
|
|
1573
1586
|
ref_key: "scrollerRef",
|
|
1574
1587
|
ref: t,
|
|
@@ -1578,13 +1591,13 @@ const Ml = {
|
|
|
1578
1591
|
onScroll: d
|
|
1579
1592
|
}, [
|
|
1580
1593
|
W(ne, {
|
|
1581
|
-
class:
|
|
1594
|
+
class: O(["g-scroll-to-bottom-btn", { "scroll-to-bottom-btn--hidden": o.value }]),
|
|
1582
1595
|
size: "small",
|
|
1583
1596
|
type: "button",
|
|
1584
|
-
onClick:
|
|
1597
|
+
onClick: b[0] || (b[0] = () => r({ focusLast: !0 })),
|
|
1585
1598
|
"aria-label": "Jump to Latest"
|
|
1586
1599
|
}, {
|
|
1587
|
-
default: U(() => [...
|
|
1600
|
+
default: U(() => [...b[1] || (b[1] = [
|
|
1588
1601
|
n("svg", {
|
|
1589
1602
|
"aria-hidden": "true",
|
|
1590
1603
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1605,7 +1618,7 @@ const Ml = {
|
|
|
1605
1618
|
ref: a,
|
|
1606
1619
|
class: "g-history-list"
|
|
1607
1620
|
}, [
|
|
1608
|
-
(u(!0), v(F, null, Z(
|
|
1621
|
+
(u(!0), v(F, null, Z(i.value, (m) => (u(), v("div", {
|
|
1609
1622
|
role: "listitem",
|
|
1610
1623
|
key: m.id,
|
|
1611
1624
|
class: "g-history-entry",
|
|
@@ -1614,10 +1627,10 @@ const Ml = {
|
|
|
1614
1627
|
P(c.$slots, "default", { entry: m }, void 0, !0)
|
|
1615
1628
|
]))), 128))
|
|
1616
1629
|
], 512)
|
|
1617
|
-
], 40,
|
|
1630
|
+
], 40, Fl)
|
|
1618
1631
|
]));
|
|
1619
1632
|
}
|
|
1620
|
-
}),
|
|
1633
|
+
}), Jo = /* @__PURE__ */ z(Pl, [["__scopeId", "data-v-fa53fd7c"]]), Rl = { class: "g-three-way-toggle-wrapper" }, Hl = { class: "g-three-way-toggle-control" }, Kl = ["id"], Ul = ["aria-labelledby", "aria-describedby", "disabled", "aria-invalid", "aria-errormessage"], jl = { key: 0 }, Nl = { key: 1 }, Wl = { key: 2 }, ql = ["for"], Zl = ["id", "name", "checked", "disabled"], Yl = ["for"], Ql = ["id", "name", "checked", "disabled"], Xl = ["for"], Jl = ["id", "name", "checked", "disabled"], ea = ["id"], ta = /* @__PURE__ */ A({
|
|
1621
1634
|
__name: "GThreeWayToggle",
|
|
1622
1635
|
props: /* @__PURE__ */ H({
|
|
1623
1636
|
label: {},
|
|
@@ -1631,128 +1644,128 @@ const Ml = {
|
|
|
1631
1644
|
emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
|
|
1632
1645
|
setup(e, { emit: l }) {
|
|
1633
1646
|
const t = e, a = j(e, "modelValue"), o = l;
|
|
1634
|
-
function s(
|
|
1635
|
-
const
|
|
1636
|
-
a.value =
|
|
1637
|
-
was:
|
|
1638
|
-
to:
|
|
1647
|
+
function s(f) {
|
|
1648
|
+
const p = a.value;
|
|
1649
|
+
a.value = f, f !== p && o("change", {
|
|
1650
|
+
was: p,
|
|
1651
|
+
to: f
|
|
1639
1652
|
});
|
|
1640
1653
|
}
|
|
1641
|
-
function
|
|
1642
|
-
t.disabled || (a.value ===
|
|
1654
|
+
function r(f) {
|
|
1655
|
+
t.disabled || (a.value === f ? s(null) : s(f));
|
|
1643
1656
|
}
|
|
1644
|
-
function d(
|
|
1645
|
-
t.disabled || a.value ===
|
|
1657
|
+
function d(f) {
|
|
1658
|
+
t.disabled || a.value === f && s(null);
|
|
1646
1659
|
}
|
|
1647
|
-
const
|
|
1648
|
-
function S(
|
|
1649
|
-
t.disabled || (
|
|
1660
|
+
const i = Y(), c = x(() => `g-three-way-toggle-${i}`), b = Y(), m = Y(), h = Y(), L = x(() => a.value === !1 ? "g-left" : a.value === !0 ? "g-right" : "g-center");
|
|
1661
|
+
function S(f) {
|
|
1662
|
+
t.disabled || (f.key === "n" || f.key === "N" ? (s(!1), f.preventDefault()) : (f.key === "y" || f.key === "Y") && (s(!0), f.preventDefault()));
|
|
1650
1663
|
}
|
|
1651
|
-
return (
|
|
1652
|
-
n("div",
|
|
1664
|
+
return (f, p) => (u(), v("div", Rl, [
|
|
1665
|
+
n("div", Hl, [
|
|
1653
1666
|
n("span", {
|
|
1654
1667
|
class: "g-label",
|
|
1655
|
-
id:
|
|
1668
|
+
id: g(i)
|
|
1656
1669
|
}, [
|
|
1657
|
-
P(
|
|
1670
|
+
P(f.$slots, "label", {}, () => [
|
|
1658
1671
|
N(C(e.label), 1)
|
|
1659
1672
|
], !0)
|
|
1660
|
-
], 8,
|
|
1673
|
+
], 8, Kl),
|
|
1661
1674
|
n("fieldset", {
|
|
1662
|
-
class:
|
|
1675
|
+
class: O(["g-three-way-toggle", { "g-has-error": e.error }]),
|
|
1663
1676
|
role: "radiogroup",
|
|
1664
|
-
"aria-labelledby":
|
|
1677
|
+
"aria-labelledby": g(i),
|
|
1665
1678
|
"aria-describedby": e.describedby,
|
|
1666
1679
|
disabled: e.disabled,
|
|
1667
1680
|
"aria-invalid": e.error ? "true" : void 0,
|
|
1668
|
-
"aria-errormessage": e.error ?
|
|
1681
|
+
"aria-errormessage": e.error ? g(i) + "-error" : void 0
|
|
1669
1682
|
}, [
|
|
1670
1683
|
n("div", {
|
|
1671
|
-
class:
|
|
1684
|
+
class: O(["g-toggle-track", [L.value, { "g-disabled": e.disabled }]])
|
|
1672
1685
|
}, [
|
|
1673
1686
|
n("span", {
|
|
1674
|
-
class:
|
|
1687
|
+
class: O(["g-toggle-thumb", L.value]),
|
|
1675
1688
|
"aria-hidden": "true"
|
|
1676
1689
|
}, [
|
|
1677
|
-
a.value === !1 ? (u(), v("span",
|
|
1690
|
+
a.value === !1 ? (u(), v("span", jl, "NO")) : a.value === !0 ? (u(), v("span", Nl, "YES")) : (u(), v("span", Wl))
|
|
1678
1691
|
], 2),
|
|
1679
1692
|
n("label", {
|
|
1680
|
-
for:
|
|
1693
|
+
for: g(b),
|
|
1681
1694
|
class: "g-toggle-option g-left",
|
|
1682
|
-
onClick:
|
|
1695
|
+
onClick: p[1] || (p[1] = (y) => d(!1)),
|
|
1683
1696
|
onKeydown: S
|
|
1684
1697
|
}, [
|
|
1685
1698
|
n("input", {
|
|
1686
1699
|
type: "radio",
|
|
1687
|
-
id:
|
|
1700
|
+
id: g(b),
|
|
1688
1701
|
name: c.value,
|
|
1689
1702
|
checked: a.value === !1,
|
|
1690
1703
|
value: "false",
|
|
1691
1704
|
disabled: e.disabled,
|
|
1692
|
-
onChange:
|
|
1693
|
-
}, null, 40,
|
|
1694
|
-
|
|
1695
|
-
], 40,
|
|
1705
|
+
onChange: p[0] || (p[0] = (y) => r(!1))
|
|
1706
|
+
}, null, 40, Zl),
|
|
1707
|
+
p[5] || (p[5] = n("span", { class: "ilw-sr-only" }, "No", -1))
|
|
1708
|
+
], 40, ql),
|
|
1696
1709
|
n("label", {
|
|
1697
|
-
for:
|
|
1710
|
+
for: g(m),
|
|
1698
1711
|
class: "g-toggle-option g-center",
|
|
1699
1712
|
onKeydown: S
|
|
1700
1713
|
}, [
|
|
1701
1714
|
n("input", {
|
|
1702
1715
|
type: "radio",
|
|
1703
|
-
id:
|
|
1716
|
+
id: g(m),
|
|
1704
1717
|
name: c.value,
|
|
1705
1718
|
checked: a.value === null,
|
|
1706
1719
|
disabled: e.disabled,
|
|
1707
|
-
onChange:
|
|
1708
|
-
}, null, 40,
|
|
1709
|
-
|
|
1710
|
-
], 40,
|
|
1720
|
+
onChange: p[2] || (p[2] = (y) => r(null))
|
|
1721
|
+
}, null, 40, Ql),
|
|
1722
|
+
p[6] || (p[6] = n("span", { class: "ilw-sr-only" }, "Unset", -1))
|
|
1723
|
+
], 40, Yl),
|
|
1711
1724
|
n("label", {
|
|
1712
|
-
for:
|
|
1725
|
+
for: g(h),
|
|
1713
1726
|
class: "g-toggle-option g-right",
|
|
1714
|
-
onClick:
|
|
1727
|
+
onClick: p[4] || (p[4] = (y) => d(!0)),
|
|
1715
1728
|
onKeydown: S
|
|
1716
1729
|
}, [
|
|
1717
1730
|
n("input", {
|
|
1718
1731
|
type: "radio",
|
|
1719
|
-
id:
|
|
1732
|
+
id: g(h),
|
|
1720
1733
|
name: c.value,
|
|
1721
1734
|
value: "true",
|
|
1722
1735
|
checked: a.value === !0,
|
|
1723
1736
|
disabled: e.disabled,
|
|
1724
|
-
onChange:
|
|
1725
|
-
}, null, 40,
|
|
1726
|
-
|
|
1727
|
-
], 40,
|
|
1737
|
+
onChange: p[3] || (p[3] = (y) => r(!0))
|
|
1738
|
+
}, null, 40, Jl),
|
|
1739
|
+
p[7] || (p[7] = n("span", { class: "ilw-sr-only" }, "Yes", -1))
|
|
1740
|
+
], 40, Xl)
|
|
1728
1741
|
], 2)
|
|
1729
|
-
], 10,
|
|
1742
|
+
], 10, Ul)
|
|
1730
1743
|
]),
|
|
1731
1744
|
e.error ? (u(), v("div", {
|
|
1732
1745
|
key: 0,
|
|
1733
|
-
id: `${
|
|
1746
|
+
id: `${g(i)}-error`,
|
|
1734
1747
|
class: "g-form-error",
|
|
1735
1748
|
role: "alert",
|
|
1736
1749
|
"aria-atomic": "true"
|
|
1737
|
-
}, C(e.error), 9,
|
|
1750
|
+
}, C(e.error), 9, ea)) : M("", !0)
|
|
1738
1751
|
]));
|
|
1739
1752
|
}
|
|
1740
|
-
}),
|
|
1753
|
+
}), es = /* @__PURE__ */ z(ta, [["__scopeId", "data-v-b154ee55"]]), la = {
|
|
1741
1754
|
ref: "tableBodyRef",
|
|
1742
1755
|
class: "efficient-table-body"
|
|
1743
|
-
},
|
|
1756
|
+
}, aa = ["aria-rowindex"], oa = {
|
|
1744
1757
|
key: 0,
|
|
1745
1758
|
class: "table-group-checkbox"
|
|
1746
|
-
},
|
|
1759
|
+
}, sa = ["colspan"], na = ["aria-rowindex", "onMousedown", "onClick"], ra = ["checked", "onClick", "aria-label", "name"], ia = ["id"], ua = {
|
|
1747
1760
|
key: 0,
|
|
1748
1761
|
class: "editable-cell"
|
|
1749
|
-
},
|
|
1762
|
+
}, da = {
|
|
1750
1763
|
key: 0,
|
|
1751
1764
|
class: "cell-prefix"
|
|
1752
|
-
},
|
|
1765
|
+
}, ca = ["value", "onChange", "aria-labelledby", "aria-invalid", "name"], va = ["value"], fa = ["value", "onInput", "aria-labelledby", "aria-invalid", "aria-errormessage", "name"], ga = {
|
|
1753
1766
|
key: 3,
|
|
1754
1767
|
class: "cell-suffix"
|
|
1755
|
-
},
|
|
1768
|
+
}, ba = ["id"], ma = /* @__PURE__ */ A({
|
|
1756
1769
|
__name: "GTableBody",
|
|
1757
1770
|
props: {
|
|
1758
1771
|
data: {},
|
|
@@ -1770,259 +1783,259 @@ const Ml = {
|
|
|
1770
1783
|
emits: ["row-click", "toggle-row", "cell-change"],
|
|
1771
1784
|
setup(e, { emit: l }) {
|
|
1772
1785
|
const t = e, a = l;
|
|
1773
|
-
function o(
|
|
1774
|
-
t.bulkSelectionEnabled &&
|
|
1786
|
+
function o(f, p) {
|
|
1787
|
+
t.bulkSelectionEnabled && f.shiftKey && !f.target.closest("a,button,[tabindex],input") && f.preventDefault();
|
|
1775
1788
|
}
|
|
1776
|
-
function s(
|
|
1777
|
-
if (!t.rowClickable && !t.bulkSelectionEnabled ||
|
|
1789
|
+
function s(f, p) {
|
|
1790
|
+
if (!t.rowClickable && !t.bulkSelectionEnabled || f.target.closest("a,button,[tabindex],input"))
|
|
1778
1791
|
return;
|
|
1779
|
-
const
|
|
1792
|
+
const y = f.target.closest(
|
|
1780
1793
|
"tr"
|
|
1781
1794
|
);
|
|
1782
|
-
if (
|
|
1795
|
+
if (y) {
|
|
1783
1796
|
if (t.bulkSelectionEnabled)
|
|
1784
|
-
|
|
1797
|
+
y.querySelector(
|
|
1785
1798
|
"input[type=checkbox]"
|
|
1786
|
-
) && d(
|
|
1799
|
+
) && d(p, f.shiftKey);
|
|
1787
1800
|
else if (t.rowClickable) {
|
|
1788
|
-
const w =
|
|
1801
|
+
const w = y.querySelector("a[href]")?.getAttribute("href");
|
|
1789
1802
|
w && a("row-click", w);
|
|
1790
1803
|
}
|
|
1791
1804
|
}
|
|
1792
1805
|
}
|
|
1793
|
-
function
|
|
1794
|
-
return t.selectedRows?.includes(
|
|
1806
|
+
function r(f) {
|
|
1807
|
+
return t.selectedRows?.includes(f) ?? !1;
|
|
1795
1808
|
}
|
|
1796
|
-
function d(
|
|
1797
|
-
a("toggle-row",
|
|
1809
|
+
function d(f, p = !1) {
|
|
1810
|
+
a("toggle-row", f, p);
|
|
1798
1811
|
}
|
|
1799
|
-
function
|
|
1800
|
-
const w =
|
|
1801
|
-
a("cell-change", { row:
|
|
1812
|
+
function i(f, p, y) {
|
|
1813
|
+
const w = f.target.value;
|
|
1814
|
+
a("cell-change", { row: p, column: y, value: w });
|
|
1802
1815
|
}
|
|
1803
|
-
function c(
|
|
1804
|
-
const
|
|
1805
|
-
return
|
|
1816
|
+
function c(f, p) {
|
|
1817
|
+
const y = `${t.tableId}-th-${String(p.key)}`;
|
|
1818
|
+
return p.editable?.labelKey ? `${`${t.tableId}-td-${f.key}-${p.editable.labelKey}`} ${y} ` : y;
|
|
1806
1819
|
}
|
|
1807
|
-
const
|
|
1820
|
+
const b = x(
|
|
1808
1821
|
() => {
|
|
1809
|
-
for (const
|
|
1810
|
-
if (
|
|
1811
|
-
return
|
|
1822
|
+
for (const f of t.columns)
|
|
1823
|
+
if (f.editable?.labelKey)
|
|
1824
|
+
return f.editable.labelKey;
|
|
1812
1825
|
}
|
|
1813
1826
|
);
|
|
1814
|
-
function m(
|
|
1815
|
-
return
|
|
1827
|
+
function m(f) {
|
|
1828
|
+
return f.key === b.value;
|
|
1816
1829
|
}
|
|
1817
|
-
function
|
|
1818
|
-
return t.changeTracker ? t.changeTracker.hasChange(
|
|
1830
|
+
function h(f, p) {
|
|
1831
|
+
return t.changeTracker ? t.changeTracker.hasChange(f.key, p.key) : !1;
|
|
1819
1832
|
}
|
|
1820
|
-
function L(
|
|
1821
|
-
return t.changeTracker ? t.changeTracker.hasError(
|
|
1833
|
+
function L(f, p) {
|
|
1834
|
+
return t.changeTracker ? t.changeTracker.hasError(f.key, p.key) : !1;
|
|
1822
1835
|
}
|
|
1823
|
-
function S(
|
|
1836
|
+
function S(f, p) {
|
|
1824
1837
|
if (t.changeTracker)
|
|
1825
|
-
return t.changeTracker.getError(
|
|
1838
|
+
return t.changeTracker.getError(f.key, p.key);
|
|
1826
1839
|
}
|
|
1827
|
-
return (
|
|
1828
|
-
(u(!0), v(F, null, Z(e.data, (
|
|
1829
|
-
key:
|
|
1840
|
+
return (f, p) => (u(), v("tbody", la, [
|
|
1841
|
+
(u(!0), v(F, null, Z(e.data, (y, T) => (u(), v(F, {
|
|
1842
|
+
key: y.key
|
|
1830
1843
|
}, [
|
|
1831
|
-
e.groupBy && (
|
|
1844
|
+
e.groupBy && (T === 0 || y[e.groupBy] !== e.data[T - 1][e.groupBy]) ? (u(), v("tr", {
|
|
1832
1845
|
key: 0,
|
|
1833
|
-
"aria-rowindex": e.startIndex +
|
|
1846
|
+
"aria-rowindex": e.startIndex + T + 2
|
|
1834
1847
|
}, [
|
|
1835
|
-
e.bulkSelectionEnabled ? (u(), v("td",
|
|
1848
|
+
e.bulkSelectionEnabled ? (u(), v("td", oa)) : M("", !0),
|
|
1836
1849
|
n("td", {
|
|
1837
1850
|
colspan: e.columns.length,
|
|
1838
1851
|
class: "table-group-row"
|
|
1839
1852
|
}, [
|
|
1840
|
-
e.groupRender ? (u(), q(fe(e.groupRender(
|
|
1841
|
-
N(C(
|
|
1853
|
+
e.groupRender ? (u(), q(fe(e.groupRender(y[e.groupBy], y)), { key: 0 })) : (u(), v(F, { key: 1 }, [
|
|
1854
|
+
N(C(y[e.groupBy]), 1)
|
|
1842
1855
|
], 64))
|
|
1843
|
-
], 8,
|
|
1844
|
-
], 8,
|
|
1856
|
+
], 8, sa)
|
|
1857
|
+
], 8, aa)) : M("", !0),
|
|
1845
1858
|
n("tr", {
|
|
1846
|
-
class:
|
|
1859
|
+
class: O([
|
|
1847
1860
|
"efficient-table-row",
|
|
1848
1861
|
{
|
|
1849
|
-
"row-striped":
|
|
1862
|
+
"row-striped": T % 2 === 1,
|
|
1850
1863
|
"row-clickable": e.rowClickable || e.bulkSelectionEnabled
|
|
1851
1864
|
},
|
|
1852
|
-
e.rowClass ? e.rowClass(
|
|
1865
|
+
e.rowClass ? e.rowClass(y) : void 0
|
|
1853
1866
|
]),
|
|
1854
|
-
"aria-rowindex": e.startIndex +
|
|
1855
|
-
onMousedown: (w) => o(w,
|
|
1856
|
-
onClick: (w) => s(w,
|
|
1867
|
+
"aria-rowindex": e.startIndex + T + 2,
|
|
1868
|
+
onMousedown: (w) => o(w, y.key),
|
|
1869
|
+
onClick: (w) => s(w, y.key)
|
|
1857
1870
|
}, [
|
|
1858
1871
|
e.bulkSelectionEnabled ? (u(), v("td", {
|
|
1859
1872
|
key: 0,
|
|
1860
1873
|
class: "td-checkbox",
|
|
1861
|
-
onClick:
|
|
1874
|
+
onClick: p[0] || (p[0] = de(() => {
|
|
1862
1875
|
}, ["stop"]))
|
|
1863
1876
|
}, [
|
|
1864
1877
|
n("input", {
|
|
1865
1878
|
type: "checkbox",
|
|
1866
|
-
checked:
|
|
1867
|
-
onClick: (w) => d(
|
|
1868
|
-
"aria-label": `Select row ${
|
|
1869
|
-
name: `row-${
|
|
1879
|
+
checked: r(y.key),
|
|
1880
|
+
onClick: (w) => d(y.key, w.shiftKey),
|
|
1881
|
+
"aria-label": `Select row ${y.key}`,
|
|
1882
|
+
name: `row-${y.key}-checkbox`,
|
|
1870
1883
|
class: "g-bulk-select-checkbox"
|
|
1871
|
-
}, null, 8,
|
|
1884
|
+
}, null, 8, ra)
|
|
1872
1885
|
])) : M("", !0),
|
|
1873
1886
|
(u(!0), v(F, null, Z(e.columns, (w) => (u(), v("td", {
|
|
1874
1887
|
key: w.key,
|
|
1875
|
-
id: m(w) ? `${e.tableId}-td-${
|
|
1876
|
-
class:
|
|
1888
|
+
id: m(w) ? `${e.tableId}-td-${y.key}-${String(w.key)}` : void 0,
|
|
1889
|
+
class: O([
|
|
1877
1890
|
w.editable ? "editable-td" : "",
|
|
1878
|
-
|
|
1879
|
-
L(
|
|
1880
|
-
typeof w.tdClass == "function" ? w.tdClass(
|
|
1891
|
+
h(y, w) ? "g-cell-changed" : "",
|
|
1892
|
+
L(y, w) ? "g-cell-error" : "",
|
|
1893
|
+
typeof w.tdClass == "function" ? w.tdClass(y) : w.tdClass
|
|
1881
1894
|
])
|
|
1882
1895
|
}, [
|
|
1883
|
-
w.editable ? (u(), v("div",
|
|
1884
|
-
w.editable.prefix ? (u(), v("span",
|
|
1896
|
+
w.editable ? (u(), v("div", ua, [
|
|
1897
|
+
w.editable.prefix ? (u(), v("span", da, C(w.editable.prefix), 1)) : M("", !0),
|
|
1885
1898
|
w.editable.type === "select" ? (u(), v("select", {
|
|
1886
1899
|
key: 1,
|
|
1887
|
-
value:
|
|
1888
|
-
onChange: (I) =>
|
|
1889
|
-
"aria-labelledby": c(
|
|
1890
|
-
"aria-invalid": L(
|
|
1891
|
-
name: `row-${
|
|
1900
|
+
value: y[w.key],
|
|
1901
|
+
onChange: (I) => i(I, y, w),
|
|
1902
|
+
"aria-labelledby": c(y, w),
|
|
1903
|
+
"aria-invalid": L(y, w),
|
|
1904
|
+
name: `row-${y.key}-${String(w.key)}-select`,
|
|
1892
1905
|
class: "editable-input editable-select"
|
|
1893
1906
|
}, [
|
|
1894
1907
|
(u(!0), v(F, null, Z(w.editable.options, (I) => (u(), v("option", {
|
|
1895
1908
|
key: I.value,
|
|
1896
1909
|
value: I.value
|
|
1897
|
-
}, C(I.label), 9,
|
|
1898
|
-
], 40,
|
|
1910
|
+
}, C(I.label), 9, va))), 128))
|
|
1911
|
+
], 40, ca)) : (u(), v("input", ae({
|
|
1899
1912
|
key: 2,
|
|
1900
|
-
value:
|
|
1913
|
+
value: y[w.key]
|
|
1901
1914
|
}, { ref_for: !0 }, w.editable.inputAttributes, {
|
|
1902
|
-
onInput: (I) =>
|
|
1903
|
-
"aria-labelledby": c(
|
|
1904
|
-
"aria-invalid": L(
|
|
1905
|
-
"aria-errormessage": L(
|
|
1906
|
-
name: `row-${
|
|
1915
|
+
onInput: (I) => i(I, y, w),
|
|
1916
|
+
"aria-labelledby": c(y, w),
|
|
1917
|
+
"aria-invalid": L(y, w),
|
|
1918
|
+
"aria-errormessage": L(y, w) ? `${e.tableId}-error-${y.key}-${String(w.key)}` : void 0,
|
|
1919
|
+
name: `row-${y.key}-${String(w.key)}-input`,
|
|
1907
1920
|
class: "editable-input",
|
|
1908
1921
|
style: {
|
|
1909
1922
|
paddingLeft: w.editable.prefix ? "1.5rem" : void 0,
|
|
1910
1923
|
paddingRight: w.editable.suffix ? "2rem" : void 0
|
|
1911
1924
|
}
|
|
1912
|
-
}), null, 16,
|
|
1913
|
-
w.editable.suffix ? (u(), v("span",
|
|
1914
|
-
])) : w.display ? (u(), q(fe(w.display(
|
|
1915
|
-
N(C(
|
|
1925
|
+
}), null, 16, fa)),
|
|
1926
|
+
w.editable.suffix ? (u(), v("span", ga, C(w.editable.suffix), 1)) : M("", !0)
|
|
1927
|
+
])) : w.display ? (u(), q(fe(w.display(y)), { key: 1 })) : (u(), v(F, { key: 2 }, [
|
|
1928
|
+
N(C(y[w.key]), 1)
|
|
1916
1929
|
], 64)),
|
|
1917
|
-
L(
|
|
1930
|
+
L(y, w) ? (u(), v("div", {
|
|
1918
1931
|
key: 3,
|
|
1919
1932
|
role: "alert",
|
|
1920
1933
|
class: "g-cell-error-message",
|
|
1921
|
-
id: `${e.tableId}-error-${
|
|
1922
|
-
}, C(S(
|
|
1923
|
-
], 10,
|
|
1924
|
-
], 42,
|
|
1934
|
+
id: `${e.tableId}-error-${y.key}-${String(w.key)}`
|
|
1935
|
+
}, C(S(y, w)), 9, ba)) : M("", !0)
|
|
1936
|
+
], 10, ia))), 128))
|
|
1937
|
+
], 42, na)
|
|
1925
1938
|
], 64))), 128))
|
|
1926
1939
|
], 512));
|
|
1927
1940
|
}
|
|
1928
1941
|
});
|
|
1929
|
-
function
|
|
1942
|
+
function Ue(e) {
|
|
1930
1943
|
if (!(Array.isArray(e) && e.length === 0) && !(e === null || e === !1 || e === ""))
|
|
1931
1944
|
return e;
|
|
1932
1945
|
}
|
|
1933
|
-
function
|
|
1946
|
+
function ts(e) {
|
|
1934
1947
|
return Object.fromEntries(
|
|
1935
1948
|
Object.entries(e).filter(([l, t]) => t && (!Array.isArray(t) || t.length > 0))
|
|
1936
1949
|
);
|
|
1937
1950
|
}
|
|
1938
|
-
function
|
|
1951
|
+
function ls(e) {
|
|
1939
1952
|
if (e != null)
|
|
1940
1953
|
return Array.isArray(e) ? e.filter(
|
|
1941
1954
|
(l) => l != null
|
|
1942
1955
|
) : [e];
|
|
1943
1956
|
}
|
|
1944
|
-
function
|
|
1957
|
+
function as(e) {
|
|
1945
1958
|
let l = {};
|
|
1946
|
-
for (let [t, a] of Object.entries(
|
|
1959
|
+
for (let [t, a] of Object.entries(qe(e)))
|
|
1947
1960
|
Array.isArray(a) ? a.length > 0 && (l[t] = a) : a === !0 ? l[t] = "true" : l[t] = a || void 0;
|
|
1948
1961
|
return l;
|
|
1949
1962
|
}
|
|
1950
|
-
function
|
|
1963
|
+
function pa(e) {
|
|
1951
1964
|
const l = {};
|
|
1952
1965
|
return Object.keys(e).forEach((t) => {
|
|
1953
1966
|
const a = e[t];
|
|
1954
1967
|
a != null && a !== "" && a !== !1 && (Array.isArray(a) ? a.length > 0 && (l[t] = a.map((o) => String(o))) : l[t] = String(a));
|
|
1955
1968
|
}), l;
|
|
1956
1969
|
}
|
|
1957
|
-
function
|
|
1958
|
-
const t =
|
|
1970
|
+
function ha(e, l = {}) {
|
|
1971
|
+
const t = ot(
|
|
1959
1972
|
Object.fromEntries(
|
|
1960
|
-
Object.entries(e).map(([d,
|
|
1973
|
+
Object.entries(e).map(([d, i]) => [d, i])
|
|
1961
1974
|
)
|
|
1962
1975
|
), a = l.syncWith;
|
|
1963
1976
|
if (a) {
|
|
1964
1977
|
if (a.value) {
|
|
1965
1978
|
const d = Ie(a);
|
|
1966
|
-
Object.keys(e).forEach((
|
|
1967
|
-
if (d[
|
|
1968
|
-
const c = d[
|
|
1969
|
-
typeof c == "string" && (c.includes(",") ? t[
|
|
1979
|
+
Object.keys(e).forEach((i) => {
|
|
1980
|
+
if (d[i] !== void 0) {
|
|
1981
|
+
const c = d[i];
|
|
1982
|
+
typeof c == "string" && (c.includes(",") ? t[i] = c.split(",") : t[i] = c);
|
|
1970
1983
|
}
|
|
1971
1984
|
});
|
|
1972
1985
|
}
|
|
1973
1986
|
Q(
|
|
1974
1987
|
t,
|
|
1975
1988
|
(d) => {
|
|
1976
|
-
a.value =
|
|
1989
|
+
a.value = pa(d);
|
|
1977
1990
|
},
|
|
1978
1991
|
{ deep: !0 }
|
|
1979
1992
|
);
|
|
1980
1993
|
}
|
|
1981
1994
|
const o = x(() => {
|
|
1982
1995
|
for (const d of Object.keys(e))
|
|
1983
|
-
if (
|
|
1996
|
+
if (Ue(t[d]))
|
|
1984
1997
|
return !0;
|
|
1985
1998
|
return !1;
|
|
1986
1999
|
}), s = () => {
|
|
1987
2000
|
Object.keys(t).forEach((d) => {
|
|
1988
2001
|
t[d] = void 0;
|
|
1989
2002
|
});
|
|
1990
|
-
},
|
|
2003
|
+
}, r = x(() => {
|
|
1991
2004
|
const d = {};
|
|
1992
|
-
for (const
|
|
1993
|
-
d[
|
|
2005
|
+
for (const i of Object.keys(e))
|
|
2006
|
+
d[i] = !!Ue(t[i]);
|
|
1994
2007
|
return d;
|
|
1995
2008
|
});
|
|
1996
2009
|
return {
|
|
1997
2010
|
filters: t,
|
|
1998
2011
|
isFiltered: o,
|
|
1999
2012
|
clearFilters: s,
|
|
2000
|
-
filteredColumns:
|
|
2013
|
+
filteredColumns: r
|
|
2001
2014
|
};
|
|
2002
2015
|
}
|
|
2003
|
-
const
|
|
2016
|
+
const ya = { class: "g-table-outer-wrap" }, ka = {
|
|
2004
2017
|
key: 0,
|
|
2005
2018
|
class: "g-table-controls"
|
|
2006
|
-
},
|
|
2019
|
+
}, wa = { class: "g-clear-filters-wrap" }, _a = {
|
|
2007
2020
|
key: 0,
|
|
2008
2021
|
class: "pagination"
|
|
2009
|
-
},
|
|
2022
|
+
}, $a = { class: "g-result-count" }, Ca = ["aria-label", "aria-rowcount"], xa = { class: "g-table-head" }, La = { "aria-rowindex": "1" }, Sa = {
|
|
2010
2023
|
key: 0,
|
|
2011
2024
|
scope: "col",
|
|
2012
2025
|
class: "g-th g-th-checkbox"
|
|
2013
|
-
},
|
|
2026
|
+
}, Ia = ["checked", "indeterminate", "aria-label"], Ma = ["id", "aria-sort"], Ea = { class: "th-inner" }, Ba = ["onClick"], Va = {
|
|
2014
2027
|
key: 0,
|
|
2015
2028
|
class: "sort-indicator"
|
|
2016
|
-
},
|
|
2029
|
+
}, Aa = ["aria-label"], Ta = {
|
|
2017
2030
|
key: 1,
|
|
2018
2031
|
class: "g-column-head"
|
|
2019
|
-
},
|
|
2032
|
+
}, za = ["onClick", "aria-label"], Oa = { key: 1 }, Ga = { class: "g-filter-toggle" }, Da = ["onUpdate:modelValue", "id", "aria-describedby"], Fa = ["for"], Pa = ["id"], Ra = {
|
|
2020
2033
|
key: 2,
|
|
2021
2034
|
class: "g-multi-select"
|
|
2022
|
-
},
|
|
2035
|
+
}, Ha = ["onUpdate:modelValue", "id", "value"], Ka = ["for"], Ua = {
|
|
2023
2036
|
key: 1,
|
|
2024
2037
|
class: "g-bulk-actions-toolbar"
|
|
2025
|
-
},
|
|
2038
|
+
}, ja = { class: "g-selected-count" }, Na = { class: "g-bulk-actions" }, Wa = /* @__PURE__ */ A({
|
|
2026
2039
|
__name: "GTable",
|
|
2027
2040
|
props: /* @__PURE__ */ H({
|
|
2028
2041
|
label: {},
|
|
@@ -2055,85 +2068,85 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2055
2068
|
}),
|
|
2056
2069
|
emits: /* @__PURE__ */ H(["row-click", "bulk-action", "cell-change"], ["update:sortField", "update:sortOrder", "update:filter", "update:selectedRows"]),
|
|
2057
2070
|
setup(e, { emit: l }) {
|
|
2058
|
-
const t = j(e, "sortField"), a = j(e, "sortOrder"), o = j(e, "filter"), s = j(e, "selectedRows"),
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2071
|
+
const t = j(e, "sortField"), a = j(e, "sortOrder"), o = j(e, "filter"), s = j(e, "selectedRows"), r = e, d = l;
|
|
2072
|
+
function i($) {
|
|
2073
|
+
$.sortable && (t.value === $.key ? a.value === 1 ? a.value = -1 : a.value === -1 && (t.value = void 0, a.value = 1) : (t.value = $.key, a.value = 1));
|
|
2061
2074
|
}
|
|
2062
|
-
let c =
|
|
2063
|
-
c || (c =
|
|
2064
|
-
const { filters:
|
|
2075
|
+
let c = r.filtering;
|
|
2076
|
+
c || (c = ha({}));
|
|
2077
|
+
const { filters: b, filteredColumns: m, isFiltered: h, clearFilters: L } = c, S = x(() => r.data.map(($) => $.key)), f = x(() => s.value.filter(($) => S.value.includes($))), p = x(() => !r.bulkSelectionEnabled || r.data.length === 0 ? !1 : f.value.length === S.value.length), y = x(() => !r.bulkSelectionEnabled || r.data.length === 0 ? !1 : f.value.length > 0 && f.value.length < S.value.length), T = E(null);
|
|
2065
2078
|
function w() {
|
|
2066
|
-
if (
|
|
2079
|
+
if (p.value)
|
|
2067
2080
|
s.value = s.value.filter(
|
|
2068
|
-
(
|
|
2081
|
+
($) => !S.value.includes($)
|
|
2069
2082
|
);
|
|
2070
2083
|
else {
|
|
2071
|
-
const
|
|
2072
|
-
S.value.forEach((V) =>
|
|
2084
|
+
const $ = new Set(s.value);
|
|
2085
|
+
S.value.forEach((V) => $.add(V)), s.value = Array.from($);
|
|
2073
2086
|
}
|
|
2074
2087
|
}
|
|
2075
|
-
function I(
|
|
2076
|
-
if (V &&
|
|
2077
|
-
const k = S.value.indexOf(
|
|
2088
|
+
function I($, V = !1) {
|
|
2089
|
+
if (V && T.value) {
|
|
2090
|
+
const k = S.value.indexOf(T.value), D = S.value.indexOf($);
|
|
2078
2091
|
if (k !== -1 && D !== -1) {
|
|
2079
2092
|
const re = Math.min(k, D), me = Math.max(k, D), pe = S.value.slice(re, me + 1), he = new Set(s.value);
|
|
2080
2093
|
pe.forEach((ye) => he.add(ye)), s.value = Array.from(he);
|
|
2081
2094
|
}
|
|
2082
2095
|
} else
|
|
2083
|
-
s.value.includes(
|
|
2084
|
-
(k) => k !==
|
|
2085
|
-
) : s.value = [...s.value,
|
|
2086
|
-
|
|
2096
|
+
s.value.includes($) ? s.value = s.value.filter(
|
|
2097
|
+
(k) => k !== $
|
|
2098
|
+
) : s.value = [...s.value, $];
|
|
2099
|
+
T.value = $;
|
|
2087
2100
|
}
|
|
2088
|
-
function K(
|
|
2089
|
-
d("row-click",
|
|
2101
|
+
function K($) {
|
|
2102
|
+
d("row-click", $);
|
|
2090
2103
|
}
|
|
2091
|
-
function
|
|
2092
|
-
d("bulk-action",
|
|
2104
|
+
function G($) {
|
|
2105
|
+
d("bulk-action", $, s.value);
|
|
2093
2106
|
}
|
|
2094
|
-
function
|
|
2095
|
-
let V =
|
|
2096
|
-
const k =
|
|
2097
|
-
|
|
2107
|
+
function J($) {
|
|
2108
|
+
let V = $.value;
|
|
2109
|
+
const k = $.column.key, D = qe($.row[k]);
|
|
2110
|
+
$.column.editable?.inputAttributes?.type === "number" && (V = $.value === "" ? null : Number($.value)), $.row[k] = V;
|
|
2098
2111
|
const re = {
|
|
2099
|
-
row:
|
|
2100
|
-
column:
|
|
2112
|
+
row: $.row,
|
|
2113
|
+
column: $.column,
|
|
2101
2114
|
value: V,
|
|
2102
2115
|
previousValue: D
|
|
2103
2116
|
};
|
|
2104
2117
|
d("cell-change", re);
|
|
2105
2118
|
}
|
|
2106
|
-
const R = Y(), te = Me(), ee = x(() =>
|
|
2119
|
+
const R = Y(), te = Me(), ee = x(() => r.showPagination ? !0 : !!te.pagination), se = x(() => !!(h.value || ee.value));
|
|
2107
2120
|
return ie(() => {
|
|
2108
|
-
|
|
2121
|
+
r.rowClickable && r.bulkSelectionEnabled && console.warn(
|
|
2109
2122
|
"GTable: rowClickable and bulkSelectionEnabled cannot be used together. rowClickable will be ignored."
|
|
2110
2123
|
);
|
|
2111
|
-
for (const
|
|
2112
|
-
if (
|
|
2113
|
-
`GTable: Column "${String(
|
|
2114
|
-
),
|
|
2115
|
-
let V = o.value[
|
|
2116
|
-
o.value[
|
|
2124
|
+
for (const $ of r.columns)
|
|
2125
|
+
if ($.editable && $.display && console.warn(
|
|
2126
|
+
`GTable: Column "${String($.key)}" has both 'editable' and 'display' configured. 'display' will be ignored.`
|
|
2127
|
+
), $.filter && $.filter.type === "multi-select" && !Array.isArray(o.value[$.key])) {
|
|
2128
|
+
let V = o.value[$.key];
|
|
2129
|
+
o.value[$.key] = V ? [V] : [];
|
|
2117
2130
|
}
|
|
2118
2131
|
}), Q(
|
|
2119
|
-
() =>
|
|
2120
|
-
(
|
|
2121
|
-
for (const V of
|
|
2132
|
+
() => r.columns,
|
|
2133
|
+
($) => {
|
|
2134
|
+
for (const V of $)
|
|
2122
2135
|
if (V.filter && V.filter.type === "multi-select" && !Array.isArray(o.value[V.key])) {
|
|
2123
2136
|
let k = o.value[V.key];
|
|
2124
2137
|
o.value[V.key] = k ? [k] : [];
|
|
2125
2138
|
}
|
|
2126
2139
|
},
|
|
2127
2140
|
{ immediate: !0 }
|
|
2128
|
-
), (
|
|
2129
|
-
se.value ? (u(), v("div",
|
|
2130
|
-
n("div",
|
|
2131
|
-
|
|
2141
|
+
), ($, V) => (u(), v("div", ya, [
|
|
2142
|
+
se.value ? (u(), v("div", ka, [
|
|
2143
|
+
n("div", wa, [
|
|
2144
|
+
g(h) ? (u(), q(ne, {
|
|
2132
2145
|
key: 0,
|
|
2133
2146
|
outlined: "",
|
|
2134
2147
|
size: "small",
|
|
2135
2148
|
class: "clear-filters",
|
|
2136
|
-
onClick:
|
|
2149
|
+
onClick: g(L)
|
|
2137
2150
|
}, {
|
|
2138
2151
|
default: U(() => [...V[0] || (V[0] = [
|
|
2139
2152
|
n("svg", {
|
|
@@ -2152,49 +2165,49 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2152
2165
|
_: 1
|
|
2153
2166
|
}, 8, ["onClick"])) : M("", !0)
|
|
2154
2167
|
]),
|
|
2155
|
-
ee.value ? (u(), v("div",
|
|
2156
|
-
P(
|
|
2168
|
+
ee.value ? (u(), v("div", _a, [
|
|
2169
|
+
P($.$slots, "pagination", {}, void 0, !0)
|
|
2157
2170
|
])) : M("", !0),
|
|
2158
|
-
n("span",
|
|
2171
|
+
n("span", $a, C(r.resultCount || e.data.length) + " results", 1)
|
|
2159
2172
|
])) : M("", !0),
|
|
2160
2173
|
n("table", {
|
|
2161
2174
|
class: "g-table",
|
|
2162
2175
|
ref: "tableRef",
|
|
2163
2176
|
"aria-label": e.label,
|
|
2164
|
-
"aria-rowcount":
|
|
2177
|
+
"aria-rowcount": r.resultCount || e.data.length
|
|
2165
2178
|
}, [
|
|
2166
|
-
n("thead",
|
|
2167
|
-
n("tr",
|
|
2168
|
-
e.bulkSelectionEnabled ? (u(), v("th",
|
|
2179
|
+
n("thead", xa, [
|
|
2180
|
+
n("tr", La, [
|
|
2181
|
+
e.bulkSelectionEnabled ? (u(), v("th", Sa, [
|
|
2169
2182
|
n("input", {
|
|
2170
2183
|
type: "checkbox",
|
|
2171
|
-
checked:
|
|
2172
|
-
indeterminate:
|
|
2184
|
+
checked: p.value,
|
|
2185
|
+
indeterminate: y.value,
|
|
2173
2186
|
onChange: w,
|
|
2174
|
-
"aria-label":
|
|
2187
|
+
"aria-label": p.value ? "Deselect all rows" : "Select all rows",
|
|
2175
2188
|
class: "g-bulk-select-checkbox"
|
|
2176
|
-
}, null, 40,
|
|
2189
|
+
}, null, 40, Ia)
|
|
2177
2190
|
])) : M("", !0),
|
|
2178
2191
|
(u(!0), v(F, null, Z(e.columns, (k) => (u(), v("th", {
|
|
2179
2192
|
key: k.key,
|
|
2180
|
-
id: `${
|
|
2193
|
+
id: `${g(R)}-th-${String(k.key)}`,
|
|
2181
2194
|
"aria-sort": t.value === k.key ? a.value === 1 ? "ascending" : "descending" : "none",
|
|
2182
|
-
class:
|
|
2195
|
+
class: O([
|
|
2183
2196
|
"g-th",
|
|
2184
2197
|
{ sorted: t.value === k.key },
|
|
2185
|
-
{ filtered:
|
|
2198
|
+
{ filtered: g(m)[k.key] }
|
|
2186
2199
|
]),
|
|
2187
2200
|
scope: "col"
|
|
2188
2201
|
}, [
|
|
2189
|
-
n("div",
|
|
2202
|
+
n("div", Ea, [
|
|
2190
2203
|
k.sortable ? (u(), v("button", {
|
|
2191
2204
|
key: 0,
|
|
2192
2205
|
type: "button",
|
|
2193
2206
|
class: "g-column-head",
|
|
2194
|
-
onClick: (D) =>
|
|
2207
|
+
onClick: (D) => i(k)
|
|
2195
2208
|
}, [
|
|
2196
2209
|
N(C(k.label) + " ", 1),
|
|
2197
|
-
t.value === k.key ? (u(), v("span",
|
|
2210
|
+
t.value === k.key ? (u(), v("span", Va, [
|
|
2198
2211
|
(u(), v("svg", {
|
|
2199
2212
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2200
2213
|
viewBox: "0 0 640 640",
|
|
@@ -2209,16 +2222,16 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2209
2222
|
fill: "currentColor",
|
|
2210
2223
|
d: "M300.3 199.2C312.9 188.9 331.4 189.7 343.1 201.4L471.1 329.4C480.3 338.6 483 352.3 478 364.3C473 376.3 461.4 384 448.5 384L192.5 384C179.6 384 167.9 376.2 162.9 364.2C157.9 352.2 160.7 338.5 169.9 329.4L297.9 201.4L300.3 199.2z"
|
|
2211
2224
|
}, null, -1)
|
|
2212
|
-
])], 12,
|
|
2225
|
+
])], 12, Aa))
|
|
2213
2226
|
])) : M("", !0)
|
|
2214
|
-
], 8,
|
|
2215
|
-
k.filter ? (u(), q(
|
|
2227
|
+
], 8, Ba)) : (u(), v("span", Ta, C(k.label), 1)),
|
|
2228
|
+
k.filter ? (u(), q(ze, { key: 2 }, {
|
|
2216
2229
|
trigger: U(({ toggle: D }) => [
|
|
2217
2230
|
n("button", {
|
|
2218
2231
|
onClick: de(D, ["stop"]),
|
|
2219
|
-
"aria-label":
|
|
2220
|
-
class:
|
|
2221
|
-
"g-active":
|
|
2232
|
+
"aria-label": g(m)[k.key] ? "Column Filtered" : "Filter Column",
|
|
2233
|
+
class: O(["g-filter-btn", {
|
|
2234
|
+
"g-active": g(m)[k.key]
|
|
2222
2235
|
}]),
|
|
2223
2236
|
type: "button"
|
|
2224
2237
|
}, [...V[2] || (V[2] = [
|
|
@@ -2233,10 +2246,10 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2233
2246
|
d: "M96 128C83.1 128 71.4 135.8 66.4 147.8C61.4 159.8 64.2 173.5 73.4 182.6L256 365.3L256 480C256 488.5 259.4 496.6 265.4 502.6L329.4 566.6C338.6 575.8 352.3 578.5 364.3 573.5C376.3 568.5 384 556.9 384 544L384 365.3L566.6 182.7C575.8 173.5 578.5 159.8 573.5 147.8C568.5 135.8 556.9 128 544 128L96 128z"
|
|
2234
2247
|
})
|
|
2235
2248
|
], -1)
|
|
2236
|
-
])], 10,
|
|
2249
|
+
])], 10, za)
|
|
2237
2250
|
]),
|
|
2238
2251
|
default: U(() => [
|
|
2239
|
-
k.filter.type === "select" ? (u(), q(
|
|
2252
|
+
k.filter.type === "select" ? (u(), q(Je, {
|
|
2240
2253
|
key: 0,
|
|
2241
2254
|
modelValue: o.value[k.key],
|
|
2242
2255
|
"onUpdate:modelValue": (D) => o.value[k.key] = D,
|
|
@@ -2245,26 +2258,26 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2245
2258
|
label: "Filter select",
|
|
2246
2259
|
searchable: "",
|
|
2247
2260
|
"clear-button": ""
|
|
2248
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : k.filter.type === "toggle" ? (u(), v("div",
|
|
2249
|
-
n("div",
|
|
2261
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : k.filter.type === "toggle" ? (u(), v("div", Oa, [
|
|
2262
|
+
n("div", Ga, [
|
|
2250
2263
|
we(n("input", {
|
|
2251
2264
|
type: "checkbox",
|
|
2252
2265
|
"onUpdate:modelValue": (D) => o.value[k.key] = D,
|
|
2253
|
-
id: `${
|
|
2254
|
-
"aria-describedby": k.filter.description ? `${
|
|
2255
|
-
}, null, 8,
|
|
2256
|
-
[
|
|
2266
|
+
id: `${g(R)}-filter-${String(k.key)}`,
|
|
2267
|
+
"aria-describedby": k.filter.description ? `${g(R)}-filter-description-${String(k.key)}` : void 0
|
|
2268
|
+
}, null, 8, Da), [
|
|
2269
|
+
[Pe, o.value[k.key]]
|
|
2257
2270
|
]),
|
|
2258
2271
|
n("label", {
|
|
2259
|
-
for: `${
|
|
2260
|
-
}, C(k.filter.label), 9,
|
|
2272
|
+
for: `${g(R)}-filter-${String(k.key)}`
|
|
2273
|
+
}, C(k.filter.label), 9, Fa),
|
|
2261
2274
|
k.filter.description ? (u(), v("span", {
|
|
2262
2275
|
key: 0,
|
|
2263
2276
|
class: "g-filter-description",
|
|
2264
|
-
id: `${
|
|
2265
|
-
}, C(k.filter.description), 9,
|
|
2277
|
+
id: `${g(R)}-filter-description-${String(k.key)}`
|
|
2278
|
+
}, C(k.filter.description), 9, Pa)) : M("", !0)
|
|
2266
2279
|
])
|
|
2267
|
-
])) : k.filter.type === "multi-select" ? (u(), v("fieldset",
|
|
2280
|
+
])) : k.filter.type === "multi-select" ? (u(), v("fieldset", Ra, [
|
|
2268
2281
|
V[4] || (V[4] = n("legend", { class: "g-multi-select-legend" }, " Include values ", -1)),
|
|
2269
2282
|
(u(!0), v(F, null, Z(k.filter.options, (D) => (u(), v("div", {
|
|
2270
2283
|
key: D.value
|
|
@@ -2275,12 +2288,12 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2275
2288
|
id: `filter-${String(k.key)}-${D.value}`,
|
|
2276
2289
|
value: D.value,
|
|
2277
2290
|
name: "filter-multiselect"
|
|
2278
|
-
}, null, 8,
|
|
2279
|
-
[
|
|
2291
|
+
}, null, 8, Ha), [
|
|
2292
|
+
[Pe, o.value[k.key]]
|
|
2280
2293
|
]),
|
|
2281
2294
|
n("label", {
|
|
2282
2295
|
for: `filter-${String(k.key)}-${D.value}`
|
|
2283
|
-
}, C(D.label), 9,
|
|
2296
|
+
}, C(D.label), 9, Ka)
|
|
2284
2297
|
]))), 128)),
|
|
2285
2298
|
o.value[k.key] && o.value[k.key].length ? (u(), q(ne, {
|
|
2286
2299
|
key: 0,
|
|
@@ -2299,10 +2312,10 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2299
2312
|
_: 2
|
|
2300
2313
|
}, 1024)) : M("", !0)
|
|
2301
2314
|
])
|
|
2302
|
-
], 10,
|
|
2315
|
+
], 10, Ma))), 128))
|
|
2303
2316
|
])
|
|
2304
2317
|
]),
|
|
2305
|
-
W(
|
|
2318
|
+
W(ma, {
|
|
2306
2319
|
data: e.data,
|
|
2307
2320
|
columns: e.columns,
|
|
2308
2321
|
"group-by": e.groupBy,
|
|
@@ -2312,22 +2325,22 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2312
2325
|
"start-index": e.startIndex,
|
|
2313
2326
|
"bulk-selection-enabled": e.bulkSelectionEnabled,
|
|
2314
2327
|
"selected-rows": s.value,
|
|
2315
|
-
"table-id":
|
|
2328
|
+
"table-id": g(R),
|
|
2316
2329
|
"change-tracker": e.changeTracker,
|
|
2317
2330
|
onRowClick: K,
|
|
2318
2331
|
onToggleRow: I,
|
|
2319
|
-
onCellChange:
|
|
2332
|
+
onCellChange: J
|
|
2320
2333
|
}, null, 8, ["data", "columns", "group-by", "group-render", "row-clickable", "row-class", "start-index", "bulk-selection-enabled", "selected-rows", "table-id", "change-tracker"])
|
|
2321
|
-
], 8,
|
|
2322
|
-
e.bulkSelectionEnabled && s.value.length > 0 ? (u(), v("div",
|
|
2323
|
-
n("span",
|
|
2324
|
-
n("ul",
|
|
2334
|
+
], 8, Ca),
|
|
2335
|
+
e.bulkSelectionEnabled && s.value.length > 0 ? (u(), v("div", Ua, [
|
|
2336
|
+
n("span", ja, C(s.value.length) + " row" + C(s.value.length === 1 ? "" : "s") + " selected", 1),
|
|
2337
|
+
n("ul", Na, [
|
|
2325
2338
|
(u(!0), v(F, null, Z(e.bulkActions, (k) => (u(), v("li", {
|
|
2326
2339
|
key: k.id
|
|
2327
2340
|
}, [
|
|
2328
2341
|
W(ne, {
|
|
2329
2342
|
theme: k.theme || "accent",
|
|
2330
|
-
onClick: (D) =>
|
|
2343
|
+
onClick: (D) => G(k.id),
|
|
2331
2344
|
size: "small"
|
|
2332
2345
|
}, {
|
|
2333
2346
|
default: U(() => [
|
|
@@ -2340,10 +2353,10 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2340
2353
|
])) : M("", !0)
|
|
2341
2354
|
]));
|
|
2342
2355
|
}
|
|
2343
|
-
}),
|
|
2356
|
+
}), os = /* @__PURE__ */ z(Wa, [["__scopeId", "data-v-875824b8"]]), qa = {
|
|
2344
2357
|
class: "g-pagination",
|
|
2345
2358
|
"aria-label": "Pagination"
|
|
2346
|
-
},
|
|
2359
|
+
}, Za = ["disabled"], Ya = ["disabled"], Qa = { class: "page-range" }, Xa = ["disabled"], Ja = ["disabled"], eo = ["value"], to = ["value"], lo = /* @__PURE__ */ A({
|
|
2347
2360
|
__name: "GTablePagination",
|
|
2348
2361
|
props: /* @__PURE__ */ H({
|
|
2349
2362
|
start: {},
|
|
@@ -2358,18 +2371,18 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2358
2371
|
}),
|
|
2359
2372
|
emits: ["update:start", "update:pageSize"],
|
|
2360
2373
|
setup(e) {
|
|
2361
|
-
const l = e, t = x(() => Math.max(1, Math.ceil(l.total / l.pageSize))), a = j(e, "start"), o = j(e, "pageSize"), s = x(() => a.value ?? l.start),
|
|
2362
|
-
function
|
|
2363
|
-
|
|
2374
|
+
const l = e, t = x(() => Math.max(1, Math.ceil(l.total / l.pageSize))), a = j(e, "start"), o = j(e, "pageSize"), s = x(() => a.value ?? l.start), r = x(() => o.value ?? l.pageSize), d = x(() => l.total === 0 ? 0 : s.value + 1), i = x(() => l.total === 0 ? 0 : Math.min(s.value + r.value, l.total)), c = x(() => Math.floor(s.value / r.value) + 1);
|
|
2375
|
+
function b(h) {
|
|
2376
|
+
h < 1 || h > t.value || (a.value = (h - 1) * r.value);
|
|
2364
2377
|
}
|
|
2365
|
-
function m(
|
|
2366
|
-
o.value = parseInt(
|
|
2378
|
+
function m(h) {
|
|
2379
|
+
o.value = parseInt(h.target.value, 10);
|
|
2367
2380
|
}
|
|
2368
|
-
return (
|
|
2381
|
+
return (h, L) => (u(), v("nav", qa, [
|
|
2369
2382
|
n("button", {
|
|
2370
2383
|
class: "first-page g-pagination-button",
|
|
2371
2384
|
disabled: c.value === 1,
|
|
2372
|
-
onClick: L[0] || (L[0] = (S) =>
|
|
2385
|
+
onClick: L[0] || (L[0] = (S) => b(1))
|
|
2373
2386
|
}, [...L[4] || (L[4] = [
|
|
2374
2387
|
n("svg", {
|
|
2375
2388
|
role: "img",
|
|
@@ -2392,11 +2405,11 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2392
2405
|
n("path", { d: "M11 7l-5 5l5 5" }),
|
|
2393
2406
|
n("path", { d: "M17 7l-5 5l5 5" })
|
|
2394
2407
|
], -1)
|
|
2395
|
-
])], 8,
|
|
2408
|
+
])], 8, Za),
|
|
2396
2409
|
n("button", {
|
|
2397
2410
|
class: "prev-page g-pagination-button",
|
|
2398
2411
|
disabled: c.value === 1,
|
|
2399
|
-
onClick: L[1] || (L[1] = (S) =>
|
|
2412
|
+
onClick: L[1] || (L[1] = (S) => b(c.value - 1))
|
|
2400
2413
|
}, [...L[5] || (L[5] = [
|
|
2401
2414
|
n("svg", {
|
|
2402
2415
|
role: "img",
|
|
@@ -2418,12 +2431,12 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2418
2431
|
}),
|
|
2419
2432
|
n("path", { d: "M15 6l-6 6l6 6" })
|
|
2420
2433
|
], -1)
|
|
2421
|
-
])], 8,
|
|
2422
|
-
n("span",
|
|
2434
|
+
])], 8, Ya),
|
|
2435
|
+
n("span", Qa, C(d.value) + " to " + C(i.value), 1),
|
|
2423
2436
|
n("button", {
|
|
2424
2437
|
class: "next-page g-pagination-button",
|
|
2425
2438
|
disabled: c.value === t.value,
|
|
2426
|
-
onClick: L[2] || (L[2] = (S) =>
|
|
2439
|
+
onClick: L[2] || (L[2] = (S) => b(c.value + 1))
|
|
2427
2440
|
}, [...L[6] || (L[6] = [
|
|
2428
2441
|
n("svg", {
|
|
2429
2442
|
role: "img",
|
|
@@ -2445,11 +2458,11 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2445
2458
|
}),
|
|
2446
2459
|
n("path", { d: "M9 6l6 6l-6 6" })
|
|
2447
2460
|
], -1)
|
|
2448
|
-
])], 8,
|
|
2461
|
+
])], 8, Xa),
|
|
2449
2462
|
n("button", {
|
|
2450
2463
|
class: "last-page g-pagination-button",
|
|
2451
2464
|
disabled: c.value === t.value,
|
|
2452
|
-
onClick: L[3] || (L[3] = (S) =>
|
|
2465
|
+
onClick: L[3] || (L[3] = (S) => b(t.value))
|
|
2453
2466
|
}, [...L[7] || (L[7] = [
|
|
2454
2467
|
n("svg", {
|
|
2455
2468
|
role: "img",
|
|
@@ -2472,7 +2485,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2472
2485
|
n("path", { d: "M7 7l5 5l-5 5" }),
|
|
2473
2486
|
n("path", { d: "M13 7l5 5l-5 5" })
|
|
2474
2487
|
], -1)
|
|
2475
|
-
])], 8,
|
|
2488
|
+
])], 8, Ja),
|
|
2476
2489
|
n("select", {
|
|
2477
2490
|
id: "page-size-select",
|
|
2478
2491
|
class: "page-size-select",
|
|
@@ -2482,65 +2495,71 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2482
2495
|
(u(!0), v(F, null, Z(l.pageSizes || [10, 25, 50, 100], (S) => (u(), v("option", {
|
|
2483
2496
|
key: S,
|
|
2484
2497
|
value: S
|
|
2485
|
-
}, C(S), 9,
|
|
2486
|
-
], 40,
|
|
2498
|
+
}, C(S), 9, to))), 128))
|
|
2499
|
+
], 40, eo),
|
|
2487
2500
|
L[8] || (L[8] = n("label", {
|
|
2488
2501
|
class: "page-size-label",
|
|
2489
2502
|
for: "page-size-select"
|
|
2490
2503
|
}, "per page", -1))
|
|
2491
2504
|
]));
|
|
2492
2505
|
}
|
|
2493
|
-
}),
|
|
2506
|
+
}), ss = /* @__PURE__ */ z(lo, [["__scopeId", "data-v-46e71363"]]), ao = ["id"], oo = { class: "g-modal-inner" }, so = { class: "g-modal-header" }, no = ["id"], ro = ["id"], io = /* @__PURE__ */ A({
|
|
2494
2507
|
__name: "GModal",
|
|
2495
2508
|
props: {
|
|
2496
2509
|
label: {},
|
|
2497
2510
|
describedby: { default: void 0 },
|
|
2498
2511
|
hiddenLabel: { type: Boolean, default: !1 },
|
|
2499
|
-
size: { default: "medium" }
|
|
2512
|
+
size: { default: "medium" },
|
|
2513
|
+
classes: {}
|
|
2500
2514
|
},
|
|
2501
2515
|
emits: ["close"],
|
|
2502
2516
|
setup(e, { emit: l }) {
|
|
2503
|
-
const t =
|
|
2504
|
-
function
|
|
2505
|
-
|
|
2517
|
+
const t = e, a = l, o = ge("dialog"), s = E(!0), r = Y(), { pop: d, push: i, isTop: c, zIndex: b } = xe(r, !0, !0), { deactivate: m, activate: h } = Ae(o, c);
|
|
2518
|
+
function L() {
|
|
2519
|
+
a("close");
|
|
2506
2520
|
}
|
|
2507
|
-
|
|
2521
|
+
Te([o], c, s, L, d), ie(() => {
|
|
2522
|
+
i(), h();
|
|
2523
|
+
}), Ne(() => {
|
|
2508
2524
|
d(), m();
|
|
2509
|
-
})
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2525
|
+
});
|
|
2526
|
+
const S = x(() => {
|
|
2527
|
+
let f = [`g-modal--${t.size}`];
|
|
2528
|
+
return t.classes && (f = f.concat(Array.isArray(t.classes) ? t.classes : [t.classes])), f;
|
|
2529
|
+
});
|
|
2530
|
+
return (f, p) => (u(), q(Ee, { to: "#modal-root" }, [
|
|
2531
|
+
W($e, {
|
|
2513
2532
|
name: "g-fade",
|
|
2514
2533
|
appear: ""
|
|
2515
2534
|
}, {
|
|
2516
2535
|
default: U(() => [
|
|
2517
2536
|
n("div", ae({
|
|
2518
|
-
id: "modal-" +
|
|
2519
|
-
class: ["g-modal",
|
|
2537
|
+
id: "modal-" + g(r),
|
|
2538
|
+
class: ["g-modal", S.value],
|
|
2520
2539
|
role: "dialog",
|
|
2521
2540
|
"aria-modal": "true"
|
|
2522
2541
|
}, {
|
|
2523
|
-
"aria-labelledby": e.hiddenLabel ? void 0 : "modal-label-" +
|
|
2542
|
+
"aria-labelledby": e.hiddenLabel ? void 0 : "modal-label-" + g(r),
|
|
2524
2543
|
"aria-label": e.hiddenLabel ? e.label : void 0,
|
|
2525
2544
|
"aria-describedby": e.describedby ? e.describedby : void 0
|
|
2526
2545
|
}, {
|
|
2527
2546
|
ref_key: "dialog",
|
|
2528
|
-
ref:
|
|
2529
|
-
style: { zIndex:
|
|
2547
|
+
ref: o,
|
|
2548
|
+
style: { zIndex: g(b) }
|
|
2530
2549
|
}), [
|
|
2531
|
-
n("div",
|
|
2532
|
-
n("div",
|
|
2550
|
+
n("div", oo, [
|
|
2551
|
+
n("div", so, [
|
|
2533
2552
|
e.hiddenLabel ? M("", !0) : (u(), v("h2", {
|
|
2534
2553
|
key: 0,
|
|
2535
|
-
id: "modal-label-" +
|
|
2554
|
+
id: "modal-label-" + g(r),
|
|
2536
2555
|
class: "g-modal-label",
|
|
2537
2556
|
tabindex: "-1"
|
|
2538
|
-
}, C(e.label), 9,
|
|
2557
|
+
}, C(e.label), 9, no)),
|
|
2539
2558
|
n("button", {
|
|
2540
2559
|
class: "g-modal-close",
|
|
2541
|
-
onClick:
|
|
2560
|
+
onClick: L,
|
|
2542
2561
|
"aria-label": "Close"
|
|
2543
|
-
}, [...
|
|
2562
|
+
}, [...p[0] || (p[0] = [
|
|
2544
2563
|
n("svg", {
|
|
2545
2564
|
viewBox: "0 0 24 24",
|
|
2546
2565
|
width: "24",
|
|
@@ -2555,19 +2574,19 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2555
2574
|
])])
|
|
2556
2575
|
]),
|
|
2557
2576
|
n("div", {
|
|
2558
|
-
id: "modal-description-" +
|
|
2577
|
+
id: "modal-description-" + g(r),
|
|
2559
2578
|
class: "g-modal-content"
|
|
2560
2579
|
}, [
|
|
2561
|
-
P(
|
|
2562
|
-
], 8,
|
|
2580
|
+
P(f.$slots, "default", {}, void 0, !0)
|
|
2581
|
+
], 8, ro)
|
|
2563
2582
|
])
|
|
2564
|
-
], 16,
|
|
2583
|
+
], 16, ao)
|
|
2565
2584
|
]),
|
|
2566
2585
|
_: 3
|
|
2567
2586
|
})
|
|
2568
2587
|
]));
|
|
2569
2588
|
}
|
|
2570
|
-
}),
|
|
2589
|
+
}), ns = /* @__PURE__ */ z(io, [["__scopeId", "data-v-751b50fa"]]), uo = ["id", "aria-expanded", "aria-label", "aria-controls"], co = /* @__PURE__ */ A({
|
|
2571
2590
|
__name: "GHamburgerMenu",
|
|
2572
2591
|
props: {
|
|
2573
2592
|
label: { default: "Main Navigation" }
|
|
@@ -2581,19 +2600,19 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2581
2600
|
function s(d) {
|
|
2582
2601
|
d.key === "Escape" && t?.open?.value && (t.open.value = !1);
|
|
2583
2602
|
}
|
|
2584
|
-
const
|
|
2585
|
-
return (d,
|
|
2586
|
-
id: `${
|
|
2587
|
-
class:
|
|
2588
|
-
"g-hamburger-button--open":
|
|
2589
|
-
"g-hamburger-button--collapsible":
|
|
2603
|
+
const r = Y();
|
|
2604
|
+
return (d, i) => (u(), v("button", {
|
|
2605
|
+
id: `${g(t)?.id ?? g(r)}-hamburger`,
|
|
2606
|
+
class: O(["g-hamburger-button", {
|
|
2607
|
+
"g-hamburger-button--open": g(t)?.open?.value,
|
|
2608
|
+
"g-hamburger-button--collapsible": g(t)?.isCollapsible?.value
|
|
2590
2609
|
}]),
|
|
2591
2610
|
onClick: o,
|
|
2592
2611
|
onKeydown: s,
|
|
2593
|
-
"aria-expanded":
|
|
2612
|
+
"aria-expanded": g(t)?.open?.value ? "true" : "false",
|
|
2594
2613
|
"aria-label": e.label,
|
|
2595
|
-
"aria-controls":
|
|
2596
|
-
}, [...
|
|
2614
|
+
"aria-controls": g(t) ? `${g(t).id}-sidebar` : void 0
|
|
2615
|
+
}, [...i[0] || (i[0] = [
|
|
2597
2616
|
n("svg", {
|
|
2598
2617
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2599
2618
|
viewBox: "0 0 51.26 51.26"
|
|
@@ -2602,9 +2621,9 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2602
2621
|
n("path", { d: "M11.6 16.52h28.06a3.24 3.24 0 1 0 0-6.48H11.6a3.24 3.24 0 0 0 0 6.48ZM39.66 22.07H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48ZM39.66 34.1H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48Z" })
|
|
2603
2622
|
])
|
|
2604
2623
|
], -1)
|
|
2605
|
-
])], 42,
|
|
2624
|
+
])], 42, uo));
|
|
2606
2625
|
}
|
|
2607
|
-
}),
|
|
2626
|
+
}), rs = /* @__PURE__ */ z(co, [["__scopeId", "data-v-6c69828a"]]), vo = /* @__PURE__ */ A({
|
|
2608
2627
|
__name: "GDetailList",
|
|
2609
2628
|
props: {
|
|
2610
2629
|
variant: { default: "grid" }
|
|
@@ -2612,43 +2631,43 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2612
2631
|
setup(e) {
|
|
2613
2632
|
const l = e;
|
|
2614
2633
|
return (t, a) => (u(), v("dl", {
|
|
2615
|
-
class:
|
|
2634
|
+
class: O(["g-detail-list", `g-detail-list--${l.variant}`])
|
|
2616
2635
|
}, [
|
|
2617
2636
|
P(t.$slots, "default", {}, void 0, !0)
|
|
2618
2637
|
], 2));
|
|
2619
2638
|
}
|
|
2620
|
-
}),
|
|
2639
|
+
}), is = /* @__PURE__ */ z(vo, [["__scopeId", "data-v-9f983ea6"]]), fo = { class: "g-detail-list-item" }, go = { class: "g-detail-list-item__label" }, bo = { class: "g-detail-list-item__value" }, us = /* @__PURE__ */ A({
|
|
2621
2640
|
__name: "GDetailListItem",
|
|
2622
2641
|
props: {
|
|
2623
2642
|
label: {}
|
|
2624
2643
|
},
|
|
2625
2644
|
setup(e) {
|
|
2626
|
-
return (l, t) => (u(), v("div",
|
|
2627
|
-
n("dt",
|
|
2645
|
+
return (l, t) => (u(), v("div", fo, [
|
|
2646
|
+
n("dt", go, [
|
|
2628
2647
|
P(l.$slots, "label", {}, () => [
|
|
2629
2648
|
N(C(e.label), 1)
|
|
2630
2649
|
])
|
|
2631
2650
|
]),
|
|
2632
|
-
n("dd",
|
|
2651
|
+
n("dd", bo, [
|
|
2633
2652
|
P(l.$slots, "default")
|
|
2634
2653
|
])
|
|
2635
2654
|
]));
|
|
2636
2655
|
}
|
|
2637
|
-
}),
|
|
2656
|
+
}), mo = {
|
|
2638
2657
|
key: 0,
|
|
2639
2658
|
class: "g-scroll-lock-overlay"
|
|
2640
|
-
},
|
|
2659
|
+
}, ds = /* @__PURE__ */ A({
|
|
2641
2660
|
__name: "GOverlay",
|
|
2642
2661
|
setup(e) {
|
|
2643
|
-
const { hasScrollLock: l } =
|
|
2644
|
-
return (t, a) => (u(), q(
|
|
2662
|
+
const { hasScrollLock: l } = Lt();
|
|
2663
|
+
return (t, a) => (u(), q($e, { name: "g-fade" }, {
|
|
2645
2664
|
default: U(() => [
|
|
2646
|
-
|
|
2665
|
+
g(l) ? (u(), v("div", mo)) : M("", !0)
|
|
2647
2666
|
]),
|
|
2648
2667
|
_: 1
|
|
2649
2668
|
}));
|
|
2650
2669
|
}
|
|
2651
|
-
}),
|
|
2670
|
+
}), po = { class: "popover-content" }, ho = { class: "year-dropdown" }, yo = { class: "month-selector" }, ko = /* @__PURE__ */ A({
|
|
2652
2671
|
__name: "GTermSelectorControl",
|
|
2653
2672
|
props: /* @__PURE__ */ H({
|
|
2654
2673
|
termYears: { default: () => ["2026"] },
|
|
@@ -2664,17 +2683,17 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2664
2683
|
emits: ["update:modelValue"],
|
|
2665
2684
|
setup(e) {
|
|
2666
2685
|
const l = j(e, "modelValue");
|
|
2667
|
-
return (t, a) => (u(), v("div",
|
|
2668
|
-
n("div",
|
|
2669
|
-
W(
|
|
2686
|
+
return (t, a) => (u(), v("div", po, [
|
|
2687
|
+
n("div", ho, [
|
|
2688
|
+
W(Je, {
|
|
2670
2689
|
modelValue: l.value.year,
|
|
2671
2690
|
"onUpdate:modelValue": a[0] || (a[0] = (o) => l.value.year = o),
|
|
2672
2691
|
options: e.termYears,
|
|
2673
2692
|
label: e.yearLabel
|
|
2674
2693
|
}, null, 8, ["modelValue", "options", "label"])
|
|
2675
2694
|
]),
|
|
2676
|
-
n("div",
|
|
2677
|
-
W(
|
|
2695
|
+
n("div", yo, [
|
|
2696
|
+
W(Pt, {
|
|
2678
2697
|
modelValue: l.value.name,
|
|
2679
2698
|
"onUpdate:modelValue": a[1] || (a[1] = (o) => l.value.name = o),
|
|
2680
2699
|
options: e.termNames,
|
|
@@ -2684,10 +2703,10 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2684
2703
|
])
|
|
2685
2704
|
]));
|
|
2686
2705
|
}
|
|
2687
|
-
}),
|
|
2706
|
+
}), wo = /* @__PURE__ */ z(ko, [["__scopeId", "data-v-f9b2a431"]]), _o = { class: "g-term-selector" }, $o = { class: "g-term-label" }, Co = {
|
|
2688
2707
|
class: "popover-title",
|
|
2689
2708
|
tabindex: "-1"
|
|
2690
|
-
},
|
|
2709
|
+
}, xo = /* @__PURE__ */ A({
|
|
2691
2710
|
__name: "GTermSelector",
|
|
2692
2711
|
props: /* @__PURE__ */ H({
|
|
2693
2712
|
title: { default: "Period Selection" },
|
|
@@ -2704,8 +2723,8 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2704
2723
|
emits: ["update:modelValue"],
|
|
2705
2724
|
setup(e) {
|
|
2706
2725
|
const l = j(e, "modelValue");
|
|
2707
|
-
return (t, a) => (u(), v("div",
|
|
2708
|
-
W(
|
|
2726
|
+
return (t, a) => (u(), v("div", _o, [
|
|
2727
|
+
W(ze, null, {
|
|
2709
2728
|
trigger: U(({ toggle: o }) => [
|
|
2710
2729
|
W(ne, {
|
|
2711
2730
|
class: "g-term-selector-button",
|
|
@@ -2723,7 +2742,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2723
2742
|
n("path", { d: "M224 64C206.3 64 192 78.3 192 96L192 128L160 128C124.7 128 96 156.7 96 192L96 240L544 240L544 192C544 156.7 515.3 128 480 128L448 128L448 96C448 78.3 433.7 64 416 64C398.3 64 384 78.3 384 96L384 128L256 128L256 96C256 78.3 241.7 64 224 64zM96 288L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 288L96 288z" })
|
|
2724
2743
|
])
|
|
2725
2744
|
], -1)),
|
|
2726
|
-
n("span",
|
|
2745
|
+
n("span", $o, C(l.value?.name) + " " + C(l.value?.year), 1),
|
|
2727
2746
|
a[1] || (a[1] = n("span", { class: "g-caret" }, [
|
|
2728
2747
|
n("svg", {
|
|
2729
2748
|
role: "none presentation",
|
|
@@ -2738,14 +2757,14 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2738
2757
|
}, 8, ["onClick"])
|
|
2739
2758
|
]),
|
|
2740
2759
|
default: U(() => [
|
|
2741
|
-
n("h2",
|
|
2742
|
-
W(
|
|
2760
|
+
n("h2", Co, C(e.title), 1),
|
|
2761
|
+
W(wo, st(nt(t.$props)), null, 16)
|
|
2743
2762
|
]),
|
|
2744
2763
|
_: 1
|
|
2745
2764
|
})
|
|
2746
2765
|
]));
|
|
2747
2766
|
}
|
|
2748
|
-
}),
|
|
2767
|
+
}), cs = /* @__PURE__ */ z(xo, [["__scopeId", "data-v-68fc0cf4"]]), Lo = { class: "g-user-menu" }, So = ["aria-label", "aria-expanded", "onClick"], Io = { class: "g-user-menu__popover" }, Mo = { class: "g-user-menu__list" }, Eo = /* @__PURE__ */ A({
|
|
2749
2768
|
__name: "GUserMenu",
|
|
2750
2769
|
props: {
|
|
2751
2770
|
initials: {},
|
|
@@ -2754,13 +2773,13 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2754
2773
|
label: { default: "User menu" }
|
|
2755
2774
|
},
|
|
2756
2775
|
setup(e) {
|
|
2757
|
-
const t = `${Y()}-email`, a =
|
|
2758
|
-
|
|
2759
|
-
const
|
|
2760
|
-
return (d,
|
|
2761
|
-
W(
|
|
2776
|
+
const t = `${Y()}-email`, a = E(!1), o = ge("emailHeading");
|
|
2777
|
+
We()?.appContext?.components?.RouterLink;
|
|
2778
|
+
const r = Me();
|
|
2779
|
+
return (d, i) => (u(), v("div", Lo, [
|
|
2780
|
+
W(ze, {
|
|
2762
2781
|
modelValue: a.value,
|
|
2763
|
-
"onUpdate:modelValue":
|
|
2782
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => a.value = c),
|
|
2764
2783
|
minimal: ""
|
|
2765
2784
|
}, {
|
|
2766
2785
|
trigger: U(({ toggle: c }) => [
|
|
@@ -2771,10 +2790,10 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2771
2790
|
"aria-expanded": a.value,
|
|
2772
2791
|
"aria-haspopup": "menu",
|
|
2773
2792
|
onClick: c
|
|
2774
|
-
}, C(e.initials), 13,
|
|
2793
|
+
}, C(e.initials), 13, So)
|
|
2775
2794
|
]),
|
|
2776
2795
|
default: U(() => [
|
|
2777
|
-
n("div",
|
|
2796
|
+
n("div", Io, [
|
|
2778
2797
|
n("h2", {
|
|
2779
2798
|
id: t,
|
|
2780
2799
|
ref_key: "emailHeading",
|
|
@@ -2786,8 +2805,8 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2786
2805
|
class: "g-user-menu__nav",
|
|
2787
2806
|
"aria-labelledby": t
|
|
2788
2807
|
}, [
|
|
2789
|
-
n("ul",
|
|
2790
|
-
(u(!0), v(F, null, Z(
|
|
2808
|
+
n("ul", Mo, [
|
|
2809
|
+
(u(!0), v(F, null, Z(r.default(), (c, b) => (u(), v("li", { key: b }, [
|
|
2791
2810
|
(u(), q(fe(c)))
|
|
2792
2811
|
]))), 128))
|
|
2793
2812
|
])
|
|
@@ -2798,7 +2817,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2798
2817
|
}, 8, ["modelValue"])
|
|
2799
2818
|
]));
|
|
2800
2819
|
}
|
|
2801
|
-
}),
|
|
2820
|
+
}), vs = /* @__PURE__ */ z(Eo, [["__scopeId", "data-v-4b786fbc"]]), Bo = /* @__PURE__ */ A({
|
|
2802
2821
|
__name: "GCurrencyInput",
|
|
2803
2822
|
props: /* @__PURE__ */ H({
|
|
2804
2823
|
label: { default: void 0 },
|
|
@@ -2814,7 +2833,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2814
2833
|
emits: ["update:modelValue"],
|
|
2815
2834
|
setup(e) {
|
|
2816
2835
|
const l = e, t = j(e, "modelValue");
|
|
2817
|
-
return (a, o) => (u(), q(
|
|
2836
|
+
return (a, o) => (u(), q(Ve, ae({
|
|
2818
2837
|
modelValue: t.value,
|
|
2819
2838
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
|
|
2820
2839
|
name: l.name,
|
|
@@ -2829,7 +2848,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2829
2848
|
min: "0"
|
|
2830
2849
|
}, a.$attrs), null, 16, ["modelValue", "name", "label", "placeholder", "disabled", "errors", "instructions"]));
|
|
2831
2850
|
}
|
|
2832
|
-
}),
|
|
2851
|
+
}), fs = /* @__PURE__ */ z(Bo, [["__scopeId", "data-v-5a04a3f2"]]), Vo = /* @__PURE__ */ A({
|
|
2833
2852
|
__name: "GEmailInput",
|
|
2834
2853
|
props: /* @__PURE__ */ H({
|
|
2835
2854
|
label: { default: void 0 },
|
|
@@ -2845,7 +2864,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2845
2864
|
emits: ["update:modelValue"],
|
|
2846
2865
|
setup(e) {
|
|
2847
2866
|
const l = j(e, "modelValue");
|
|
2848
|
-
return (t, a) => (u(), q(
|
|
2867
|
+
return (t, a) => (u(), q(Ve, ae({
|
|
2849
2868
|
modelValue: l.value,
|
|
2850
2869
|
"onUpdate:modelValue": a[0] || (a[0] = (o) => l.value = o),
|
|
2851
2870
|
name: e.name,
|
|
@@ -2857,7 +2876,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2857
2876
|
type: "email"
|
|
2858
2877
|
}, t.$attrs), null, 16, ["modelValue", "name", "label", "placeholder", "disabled", "errors", "instructions"]));
|
|
2859
2878
|
}
|
|
2860
|
-
}),
|
|
2879
|
+
}), gs = /* @__PURE__ */ z(Vo, [["__scopeId", "data-v-dd981675"]]), Ao = /* @__PURE__ */ A({
|
|
2861
2880
|
__name: "GDateInput",
|
|
2862
2881
|
props: /* @__PURE__ */ H({
|
|
2863
2882
|
label: { default: void 0 },
|
|
@@ -2873,7 +2892,7 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2873
2892
|
emits: ["update:modelValue"],
|
|
2874
2893
|
setup(e) {
|
|
2875
2894
|
const l = e, t = j(e, "modelValue");
|
|
2876
|
-
return (a, o) => (u(), q(
|
|
2895
|
+
return (a, o) => (u(), q(Ve, ae({
|
|
2877
2896
|
modelValue: t.value,
|
|
2878
2897
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
|
|
2879
2898
|
name: l.name,
|
|
@@ -2885,17 +2904,17 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2885
2904
|
type: "date"
|
|
2886
2905
|
}, a.$attrs), null, 16, ["modelValue", "name", "label", "placeholder", "disabled", "errors", "instructions"]));
|
|
2887
2906
|
}
|
|
2888
|
-
}),
|
|
2907
|
+
}), je = /* @__PURE__ */ z(Ao, [["__scopeId", "data-v-9065f719"]]), To = { class: "g-date-range-input" }, zo = {
|
|
2889
2908
|
key: 0,
|
|
2890
2909
|
class: "g-date-range-input__label"
|
|
2891
|
-
},
|
|
2910
|
+
}, Oo = {
|
|
2892
2911
|
key: 1,
|
|
2893
2912
|
class: "g-date-range-input__instructions"
|
|
2894
|
-
},
|
|
2913
|
+
}, Go = { class: "g-date-range-input__fields" }, Do = {
|
|
2895
2914
|
key: 2,
|
|
2896
2915
|
class: "g-date-range-input__errors",
|
|
2897
2916
|
role: "alert"
|
|
2898
|
-
},
|
|
2917
|
+
}, Fo = /* @__PURE__ */ A({
|
|
2899
2918
|
__name: "GDateRangeInput",
|
|
2900
2919
|
props: /* @__PURE__ */ H({
|
|
2901
2920
|
label: { default: void 0 },
|
|
@@ -2913,10 +2932,10 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2913
2932
|
}),
|
|
2914
2933
|
emits: ["update:modelValue"],
|
|
2915
2934
|
setup(e) {
|
|
2916
|
-
const l = e, t = j(e, "modelValue"), a =
|
|
2935
|
+
const l = e, t = j(e, "modelValue"), a = E(t.value.start || null), o = E(t.value.end || null), { displayErrors: s } = Ce({
|
|
2917
2936
|
name: l.name,
|
|
2918
2937
|
value: t,
|
|
2919
|
-
errors:
|
|
2938
|
+
errors: _e(l, "errors")
|
|
2920
2939
|
});
|
|
2921
2940
|
return Q([a, o], () => {
|
|
2922
2941
|
t.value = {
|
|
@@ -2925,62 +2944,62 @@ const ba = { class: "g-table-outer-wrap" }, ma = {
|
|
|
2925
2944
|
};
|
|
2926
2945
|
}), Q(
|
|
2927
2946
|
t,
|
|
2928
|
-
(
|
|
2929
|
-
|
|
2947
|
+
(r) => {
|
|
2948
|
+
r.start !== a.value && (a.value = r.start), r.end !== o.value && (o.value = r.end);
|
|
2930
2949
|
},
|
|
2931
2950
|
{ deep: !0 }
|
|
2932
|
-
), (
|
|
2933
|
-
l.label ? (u(), v("div",
|
|
2934
|
-
l.instructions ? (u(), v("div",
|
|
2935
|
-
n("div",
|
|
2936
|
-
W(
|
|
2951
|
+
), (r, d) => (u(), v("div", To, [
|
|
2952
|
+
l.label ? (u(), v("div", zo, C(l.label), 1)) : M("", !0),
|
|
2953
|
+
l.instructions ? (u(), v("div", Oo, C(l.instructions), 1)) : M("", !0),
|
|
2954
|
+
n("div", Go, [
|
|
2955
|
+
W(je, {
|
|
2937
2956
|
modelValue: a.value,
|
|
2938
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
2957
|
+
"onUpdate:modelValue": d[0] || (d[0] = (i) => a.value = i),
|
|
2939
2958
|
label: l.startLabel,
|
|
2940
2959
|
disabled: l.disabled,
|
|
2941
2960
|
class: "g-date-range-input__field"
|
|
2942
2961
|
}, null, 8, ["modelValue", "label", "disabled"]),
|
|
2943
|
-
W(
|
|
2962
|
+
W(je, {
|
|
2944
2963
|
modelValue: o.value,
|
|
2945
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
2964
|
+
"onUpdate:modelValue": d[1] || (d[1] = (i) => o.value = i),
|
|
2946
2965
|
label: l.endLabel,
|
|
2947
2966
|
disabled: l.disabled,
|
|
2948
2967
|
class: "g-date-range-input__field"
|
|
2949
2968
|
}, null, 8, ["modelValue", "label", "disabled"])
|
|
2950
2969
|
]),
|
|
2951
|
-
|
|
2952
|
-
(u(!0), v(F, null, Z(
|
|
2970
|
+
g(s).length > 0 ? (u(), v("div", Do, [
|
|
2971
|
+
(u(!0), v(F, null, Z(g(s), (i, c) => (u(), v("div", {
|
|
2953
2972
|
key: c,
|
|
2954
2973
|
class: "g-date-range-input__error"
|
|
2955
|
-
}, C(
|
|
2974
|
+
}, C(i), 1))), 128))
|
|
2956
2975
|
])) : M("", !0)
|
|
2957
2976
|
]));
|
|
2958
2977
|
}
|
|
2959
|
-
}),
|
|
2960
|
-
function
|
|
2961
|
-
const e =
|
|
2962
|
-
const
|
|
2963
|
-
return Object.entries(e).forEach(([c,
|
|
2964
|
-
|
|
2965
|
-
}),
|
|
2978
|
+
}), bs = /* @__PURE__ */ z(Fo, [["__scopeId", "data-v-ea9fe44e"]]);
|
|
2979
|
+
function Po() {
|
|
2980
|
+
const e = rt({}), l = E(!1), t = x(() => {
|
|
2981
|
+
const i = {};
|
|
2982
|
+
return Object.entries(e).forEach(([c, b]) => {
|
|
2983
|
+
b && b.value && (i[c] = b.value.value);
|
|
2984
|
+
}), i;
|
|
2966
2985
|
}), a = x(() => {
|
|
2967
|
-
const
|
|
2968
|
-
return Object.entries(e).forEach(([c,
|
|
2969
|
-
const m =
|
|
2970
|
-
m && m.length > 0 && (
|
|
2971
|
-
}),
|
|
2986
|
+
const i = {};
|
|
2987
|
+
return Object.entries(e).forEach(([c, b]) => {
|
|
2988
|
+
const m = b.errors.value;
|
|
2989
|
+
m && m.length > 0 && (i[c] = m);
|
|
2990
|
+
}), i;
|
|
2972
2991
|
}), o = x(() => Object.keys(a.value).length > 0);
|
|
2973
|
-
function s(
|
|
2974
|
-
e[
|
|
2992
|
+
function s(i, c) {
|
|
2993
|
+
e[i] = c;
|
|
2975
2994
|
}
|
|
2976
|
-
function i
|
|
2977
|
-
delete e[
|
|
2995
|
+
function r(i) {
|
|
2996
|
+
delete e[i];
|
|
2978
2997
|
}
|
|
2979
|
-
async function d(
|
|
2998
|
+
async function d(i) {
|
|
2980
2999
|
if (!l.value) {
|
|
2981
3000
|
l.value = !0;
|
|
2982
3001
|
try {
|
|
2983
|
-
await
|
|
3002
|
+
await i(t.value);
|
|
2984
3003
|
} finally {
|
|
2985
3004
|
l.value = !1;
|
|
2986
3005
|
}
|
|
@@ -2993,11 +3012,11 @@ function Go() {
|
|
|
2993
3012
|
isSubmitting: l,
|
|
2994
3013
|
hasErrors: o,
|
|
2995
3014
|
registerField: s,
|
|
2996
|
-
unregisterField:
|
|
3015
|
+
unregisterField: r,
|
|
2997
3016
|
submit: d
|
|
2998
3017
|
};
|
|
2999
3018
|
}
|
|
3000
|
-
const
|
|
3019
|
+
const Ro = ["action", "method"], Ho = /* @__PURE__ */ A({
|
|
3001
3020
|
__name: "GForm",
|
|
3002
3021
|
props: /* @__PURE__ */ H({
|
|
3003
3022
|
action: { default: void 0 },
|
|
@@ -3008,44 +3027,44 @@ const Oo = ["action", "method"], Do = /* @__PURE__ */ T({
|
|
|
3008
3027
|
}),
|
|
3009
3028
|
emits: /* @__PURE__ */ H(["submit"], ["update:modelValue"]),
|
|
3010
3029
|
setup(e, { emit: l }) {
|
|
3011
|
-
const t = e, a = j(e, "modelValue"), o = l, s = be("form", null),
|
|
3012
|
-
s ||
|
|
3013
|
-
() =>
|
|
3014
|
-
(
|
|
3015
|
-
a.value = { ...
|
|
3030
|
+
const t = e, a = j(e, "modelValue"), o = l, s = be("form", null), r = s || Po();
|
|
3031
|
+
s || it("form", r), Q(
|
|
3032
|
+
() => r.values.value,
|
|
3033
|
+
(i) => {
|
|
3034
|
+
a.value = { ...i };
|
|
3016
3035
|
},
|
|
3017
3036
|
{ deep: !0 }
|
|
3018
3037
|
), Q(
|
|
3019
3038
|
() => a.value,
|
|
3020
|
-
(
|
|
3021
|
-
|
|
3022
|
-
const m =
|
|
3023
|
-
m && m.value.value !==
|
|
3039
|
+
(i) => {
|
|
3040
|
+
i && Object.entries(i).forEach(([c, b]) => {
|
|
3041
|
+
const m = r.fields[c];
|
|
3042
|
+
m && m.value.value !== b && (m.value.value = b);
|
|
3024
3043
|
});
|
|
3025
3044
|
},
|
|
3026
3045
|
{ deep: !0, immediate: !0 }
|
|
3027
3046
|
);
|
|
3028
|
-
async function d(
|
|
3029
|
-
|
|
3047
|
+
async function d(i) {
|
|
3048
|
+
i.preventDefault(), await r.submit(async (c) => {
|
|
3030
3049
|
o("submit", c);
|
|
3031
3050
|
});
|
|
3032
3051
|
}
|
|
3033
|
-
return (
|
|
3052
|
+
return (i, c) => (u(), v("form", {
|
|
3034
3053
|
onSubmit: d,
|
|
3035
3054
|
action: t.action,
|
|
3036
3055
|
method: t.method,
|
|
3037
3056
|
class: "g-form",
|
|
3038
3057
|
novalidate: ""
|
|
3039
3058
|
}, [
|
|
3040
|
-
P(
|
|
3041
|
-
isSubmitting:
|
|
3042
|
-
hasErrors:
|
|
3043
|
-
values:
|
|
3044
|
-
errors:
|
|
3059
|
+
P(i.$slots, "default", {
|
|
3060
|
+
isSubmitting: g(r).isSubmitting.value,
|
|
3061
|
+
hasErrors: g(r).hasErrors.value,
|
|
3062
|
+
values: g(r).values.value,
|
|
3063
|
+
errors: g(r).errors.value
|
|
3045
3064
|
}, void 0, !0)
|
|
3046
|
-
], 40,
|
|
3065
|
+
], 40, Ro));
|
|
3047
3066
|
}
|
|
3048
|
-
}),
|
|
3067
|
+
}), ms = /* @__PURE__ */ z(Ho, [["__scopeId", "data-v-d583c73a"]]), Ko = /* @__PURE__ */ A({
|
|
3049
3068
|
__name: "GSubmitButton",
|
|
3050
3069
|
props: {
|
|
3051
3070
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -3054,7 +3073,7 @@ const Oo = ["action", "method"], Do = /* @__PURE__ */ T({
|
|
|
3054
3073
|
},
|
|
3055
3074
|
setup(e) {
|
|
3056
3075
|
const l = e, t = be("form", null), a = x(() => l.disabled || (t?.isSubmitting.value ?? !1)), o = x(() => t?.isSubmitting.value ?? !1);
|
|
3057
|
-
return (s,
|
|
3076
|
+
return (s, r) => (u(), q(ne, {
|
|
3058
3077
|
type: "submit",
|
|
3059
3078
|
disabled: a.value,
|
|
3060
3079
|
variant: l.variant,
|
|
@@ -3064,58 +3083,58 @@ const Oo = ["action", "method"], Do = /* @__PURE__ */ T({
|
|
|
3064
3083
|
o.value ? (u(), v(F, { key: 0 }, [
|
|
3065
3084
|
N(C(l.loadingText), 1)
|
|
3066
3085
|
], 64)) : P(s.$slots, "default", { key: 1 }, () => [
|
|
3067
|
-
|
|
3086
|
+
r[0] || (r[0] = N("Submit", -1))
|
|
3068
3087
|
], !0)
|
|
3069
3088
|
]),
|
|
3070
3089
|
_: 3
|
|
3071
3090
|
}, 8, ["disabled", "variant"]));
|
|
3072
3091
|
}
|
|
3073
|
-
}),
|
|
3092
|
+
}), ps = /* @__PURE__ */ z(Ko, [["__scopeId", "data-v-c4e2ecac"]]);
|
|
3074
3093
|
export {
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3094
|
+
Ve as A,
|
|
3095
|
+
es as B,
|
|
3096
|
+
vs as C,
|
|
3097
|
+
ls as D,
|
|
3098
|
+
Xe as E,
|
|
3099
|
+
Ue as F,
|
|
3100
|
+
Wo as G,
|
|
3101
|
+
as as H,
|
|
3102
|
+
ts as I,
|
|
3103
|
+
pa as J,
|
|
3104
|
+
ha as K,
|
|
3105
|
+
Po as L,
|
|
3087
3106
|
Ce as M,
|
|
3088
3107
|
Te as N,
|
|
3089
|
-
|
|
3108
|
+
Ae as O,
|
|
3090
3109
|
xe as P,
|
|
3091
|
-
|
|
3092
|
-
|
|
3110
|
+
Lt as Q,
|
|
3111
|
+
Al as V,
|
|
3093
3112
|
ne as _,
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3113
|
+
Zo as a,
|
|
3114
|
+
Xo as b,
|
|
3115
|
+
fs as c,
|
|
3116
|
+
je as d,
|
|
3117
|
+
bs as e,
|
|
3118
|
+
is as f,
|
|
3119
|
+
us as g,
|
|
3120
|
+
gs as h,
|
|
3121
|
+
ms as i,
|
|
3122
|
+
rs as j,
|
|
3123
|
+
Jo as k,
|
|
3124
|
+
ns as l,
|
|
3125
|
+
ds as m,
|
|
3126
|
+
ze as n,
|
|
3127
|
+
Nt as o,
|
|
3128
|
+
qo as p,
|
|
3129
|
+
Je as q,
|
|
3130
|
+
Pt as r,
|
|
3131
|
+
Yo as s,
|
|
3132
|
+
Qo as t,
|
|
3133
|
+
ps as u,
|
|
3134
|
+
os as v,
|
|
3135
|
+
ma as w,
|
|
3136
|
+
ss as x,
|
|
3137
|
+
cs as y,
|
|
3138
|
+
wo as z
|
|
3120
3139
|
};
|
|
3121
|
-
//# sourceMappingURL=main-
|
|
3140
|
+
//# sourceMappingURL=main-DmtFFIij.js.map
|