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