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